w-dwdata-tweq 1.0.26 → 1.0.27
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* w-dwdata-tweq v1.0.
|
|
2
|
+
* w-dwdata-tweq v1.0.27
|
|
3
3
|
* (c) 2018-2021 yuda-lyu(semisphere)
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("fs"),require("path"),require("crypto"),require("events"),require("chokidar"),require("url"),require("pino"),require("sharp")):"function"==typeof define&&define.amd?define(["fs","path","crypto","events","chokidar","url","pino","sharp"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["w-dwdata-tweq"]=t(e.fs,e.path,e.crypto,e.events,e.chokidar,e.url,e.pino,e.sharp)}(this,function(e,t,r,n,o,i,a,s){"use strict";var c="undefined"!=typeof document?document.currentScript:null,u=Array.isArray,l="object"==typeof global&&global&&global.Object===Object&&global,f="object"==typeof self&&self&&self.Object===Object&&self,d=l||f||Function("return this")(),p=d.Symbol,h=Object.prototype,y=h.hasOwnProperty,m=h.toString,v=p?p.toStringTag:void 0;var g=Object.prototype.toString;var w=p?p.toStringTag:void 0;function b(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":w&&w in Object(e)?function(e){var t=y.call(e,v),r=e[v];try{e[v]=void 0;var n=!0}catch(e){}var o=m.call(e);return n&&(t?e[v]=r:delete e[v]),o}(e):function(e){return g.call(e)}(e)}function S(e){return null!=e&&"object"==typeof e}function _(e){return"symbol"==typeof e||S(e)&&"[object Symbol]"==b(e)}var O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E=/^\w*$/;function j(e,t){if(u(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!_(e))||(E.test(e)||!O.test(e)||null!=t&&e in Object(t))}function R(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function x(e){if(!R(e))return!1;var t=b(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var A,T=d["__core-js_shared__"],C=(A=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"";var k=Function.prototype.toString;function $(e){if(null!=e){try{return k.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var D=/^\[object .+?Constructor\]$/,P=Function.prototype,N=Object.prototype,F=P.toString,M=N.hasOwnProperty,L=RegExp("^"+F.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function B(e){return!(!R(e)||(t=e,C&&C in t))&&(x(e)?L:D).test($(e));var t}function U(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return B(r)?r:void 0}var I=U(Object,"create");var q=Object.prototype.hasOwnProperty;var z=Object.prototype.hasOwnProperty;function H(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function W(e,t){return e===t||e!=e&&t!=t}function Y(e,t){for(var r=e.length;r--;)if(W(e[r][0],t))return r;return-1}H.prototype.clear=function(){this.__data__=I?I(null):{},this.size=0},H.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},H.prototype.get=function(e){var t=this.__data__;if(I){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return q.call(t,e)?t[e]:void 0},H.prototype.has=function(e){var t=this.__data__;return I?void 0!==t[e]:z.call(t,e)},H.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=I&&void 0===t?"__lodash_hash_undefined__":t,this};var J=Array.prototype.splice;function V(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}V.prototype.clear=function(){this.__data__=[],this.size=0},V.prototype.delete=function(e){var t=this.__data__,r=Y(t,e);return!(r<0)&&(r==t.length-1?t.pop():J.call(t,r,1),--this.size,!0)},V.prototype.get=function(e){var t=this.__data__,r=Y(t,e);return r<0?void 0:t[r][1]},V.prototype.has=function(e){return Y(this.__data__,e)>-1},V.prototype.set=function(e,t){var r=this.__data__,n=Y(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var K=U(d,"Map");function G(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function Z(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Z.prototype.clear=function(){this.size=0,this.__data__={hash:new H,map:new(K||V),string:new H}},Z.prototype.delete=function(e){var t=G(this,e).delete(e);return this.size-=t?1:0,t},Z.prototype.get=function(e){return G(this,e).get(e)},Z.prototype.has=function(e){return G(this,e).has(e)},Z.prototype.set=function(e,t){var r=G(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function X(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(X.Cache||Z),r}X.Cache=Z;var Q,ee,te,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/\\(\\)?/g,oe=(Q=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,function(e,r,n,o){t.push(n?o.replace(ne,"$1"):r||e)}),t},ee=X(Q,function(e){return 500===te.size&&te.clear(),e}),te=ee.cache,ee),ie=oe;function ae(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var se=p?p.prototype:void 0,ce=se?se.toString:void 0;function ue(e){if("string"==typeof e)return e;if(u(e))return ae(e,ue)+"";if(_(e))return ce?ce.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function le(e){return null==e?"":ue(e)}function fe(e,t){return u(e)?e:j(e,t)?[e]:ie(le(e))}function de(e){if("string"==typeof e||_(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function pe(e,t){for(var r=0,n=(t=fe(t,e)).length;null!=e&&r<n;)e=e[de(t[r++])];return r&&r==n?e:void 0}function he(e,t,r){var n=null==e?void 0:pe(e,t);return void 0===n?r:n}function ye(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var me,ve=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[me?a:++n];if(!1===t(o[s],s,o))break}return e};function ge(e){return S(e)&&"[object Arguments]"==b(e)}var we=Object.prototype,be=we.hasOwnProperty,Se=we.propertyIsEnumerable,_e=ge(function(){return arguments}())?ge:function(e){return S(e)&&be.call(e,"callee")&&!Se.call(e,"callee")},Oe=_e;var Ee="object"==typeof exports&&exports&&!exports.nodeType&&exports,je=Ee&&"object"==typeof module&&module&&!module.nodeType&&module,Re=je&&je.exports===Ee?d.Buffer:void 0,xe=(Re?Re.isBuffer:void 0)||function(){return!1},Ae=/^(?:0|[1-9]\d*)$/;function Te(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Ae.test(e))&&e>-1&&e%1==0&&e<t}function Ce(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var ke={};ke["[object Float32Array]"]=ke["[object Float64Array]"]=ke["[object Int8Array]"]=ke["[object Int16Array]"]=ke["[object Int32Array]"]=ke["[object Uint8Array]"]=ke["[object Uint8ClampedArray]"]=ke["[object Uint16Array]"]=ke["[object Uint32Array]"]=!0,ke["[object Arguments]"]=ke["[object Array]"]=ke["[object ArrayBuffer]"]=ke["[object Boolean]"]=ke["[object DataView]"]=ke["[object Date]"]=ke["[object Error]"]=ke["[object Function]"]=ke["[object Map]"]=ke["[object Number]"]=ke["[object Object]"]=ke["[object RegExp]"]=ke["[object Set]"]=ke["[object String]"]=ke["[object WeakMap]"]=!1;var $e="object"==typeof exports&&exports&&!exports.nodeType&&exports,De=$e&&"object"==typeof module&&module&&!module.nodeType&&module,Pe=De&&De.exports===$e&&l.process,Ne=function(){try{var e=De&&De.require&&De.require("util").types;return e||Pe&&Pe.binding&&Pe.binding("util")}catch(e){}}(),Fe=Ne&&Ne.isTypedArray,Me=Fe?function(e){return function(t){return e(t)}}(Fe):function(e){return S(e)&&Ce(e.length)&&!!ke[b(e)]},Le=Me,Be=Object.prototype.hasOwnProperty;function Ue(e,t){var r=u(e),n=!r&&Oe(e),o=!r&&!n&&xe(e),i=!r&&!n&&!o&&Le(e),a=r||n||o||i,s=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=s.length;for(var l in e)!t&&!Be.call(e,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Te(l,c))||s.push(l);return s}var Ie=Object.prototype;function qe(e,t){return function(r){return e(t(r))}}var ze=qe(Object.keys,Object),He=Object.prototype.hasOwnProperty;function We(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||Ie))return ze(e);var t,r,n=[];for(var o in Object(e))He.call(e,o)&&"constructor"!=o&&n.push(o);return n}function Ye(e){return null!=e&&Ce(e.length)&&!x(e)}function Je(e){return Ye(e)?Ue(e):We(e)}var Ve=function(e,t){return function(r,n){if(null==r)return r;if(!Ye(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Object(r);(t?i--:++i<o)&&!1!==n(a[i],i,a););return r}}(function(e,t){return e&&ve(e,t,Je)}),Ke=Ve;function Ge(e){return e}function Ze(e,t){var r;return(u(e)?ye:Ke)(e,"function"==typeof(r=t)?r:Ge)}var Xe=Array.prototype.reverse;function Qe(e){return"[object String]"===Object.prototype.toString.call(e)}function et(e){return!(!Qe(e)||""===e)}function tt(e){let t=!1;if(et(e))t=!isNaN(Number(e));else if(function(e){return"[object Number]"===Object.prototype.toString.call(e)}(e)){if(function(e){return e!=e}(e))return!1;t=!0}return t}var rt=/\s/;var nt=/^\s+/;function ot(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&rt.test(e.charAt(t)););return t}(e)+1).replace(nt,""):e}var it=/^[-+]0x[0-9a-f]+$/i,at=/^0b[01]+$/i,st=/^0o[0-7]+$/i,ct=parseInt;function ut(e){if("number"==typeof e)return e;if(_(e))return NaN;if(R(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=R(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ot(e);var r=at.test(e);return r||st.test(e)?ct(e.slice(2),r?2:8):it.test(e)?NaN:+e}var lt=1/0;function ft(e){return e?(e=ut(e))===lt||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function dt(e){var t=ft(e),r=t%1;return t==t?r?t-r:t:0}function pt(e){if(!tt(e))return 0;return ft(e)}function ht(e){return!!tt(e)&&(e=pt(e),"number"==typeof(t=e)&&t==dt(t));var t}var yt=d.isFinite,mt=Math.min;var vt=function(e){var t=Math[e];return function(e,r){if(e=ut(e),(r=null==r?0:mt(dt(r),292))&&yt(e)){var n=(le(e)+"e").split("e");return+((n=(le(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}("round"),gt=vt;function wt(e){if(!tt(e))return 0;e=pt(e);let t=gt(e);return"0"===String(t)?0:t}function bt(e){if(!ht(e))return!1;return wt(e)>=0}function St(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t}function _t(e,t={}){let r=he(t,"fs");if(!r.existsSync(e))return!1;let n=r.lstatSync(e);return!n.isFile()&&!n.isSymbolicLink()}function Ot(t){return _t(t,{fs:e})}function Et(e,t={}){let r=he(t,"fs");if(_t(e,{fs:r}))return{success:"input folder is already exists: "+e};if(r.existsSync(e))return{error:"input path already exists: "+e};try{r.mkdirSync(e,{recursive:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function jt(r){return function(e,t={}){let r=he(t,"path"),n=he(t,"fs");if(!n.existsSync(e)){let t=Et(e,{fs:n});return t.error?t.error:{success:"done: "+e}}if(!_t(e,{fs:n}))return{error:"input path is not a folder"};try{let t=n.readdirSync(e);for(let o of t){let t=r.join(e,o);n.statSync(t).isDirectory()?n.rmSync(t,{recursive:!0,force:!0}):n.unlinkSync(t)}}catch(e){return{error:e}}return{success:"done: "+e}}(r,{path:t,fs:e})}function Rt(t){return Et(t,{fs:e})}function xt(e,t={}){let r=he(t,"fs");if(!r.existsSync(e))return{success:"folder does not exist: "+e};if(!_t(e,{fs:r}))return{error:"input path is not a folder: "+e};try{r.rmSync(e,{recursive:!0,force:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function At(e){if(!ht(e))return!1;return wt(e)>0}function Tt(e,t=1,r={}){let n=1,o=he(r,"path"),i=he(r,"fs");if(!_t(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);return null!==t&&At(t)&&(t=wt(t))<1&&(t=1),function e(r){let a=[];return _t(r,{fs:i})?(Ze(i.readdirSync(r),function(s){let c=o.resolve(r,s),u=null;try{u=i.statSync(c)}catch(e){}u&&u.isDirectory()?(a.push({isFolder:!0,level:n,path:c,name:o.basename(c)}),n+=1,(n<=t||null===t)&&(a=a.concat(e(c))),n-=1):a.push({isFolder:!1,level:n,path:c,name:o.basename(c)})}),a):a}(e)}function Ct(r,n=1){return Tt(r,n,{path:t,fs:e})}function kt(e){let t,r=Object.prototype.toString.call(e);if(t="[object Promise]"===r,t)return!0;if("[object Function]"!==r)return!1;try{t="function"!=typeof e.subscribe&&"function"==typeof e.then}catch(e){}return t}function $t(e){var t=this.__data__=new V(e);this.size=t.size}$t.prototype.clear=function(){this.__data__=new V,this.size=0},$t.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},$t.prototype.get=function(e){return this.__data__.get(e)},$t.prototype.has=function(e){return this.__data__.has(e)},$t.prototype.set=function(e,t){var r=this.__data__;if(r instanceof V){var n=r.__data__;if(!K||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Z(n)}return r.set(e,t),this.size=r.size,this};function Dt(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Z;++t<r;)this.add(e[t])}function Pt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Nt(e,t){return e.has(t)}Dt.prototype.add=Dt.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Dt.prototype.has=function(e){return this.__data__.has(e)};function Ft(e,t,r,n,o,i){var a=1&r,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var f=-1,d=!0,p=2&r?new Dt:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var h=e[f],y=t[f];if(n)var m=a?n(y,h,f,t,e,i):n(h,y,f,e,t,i);if(void 0!==m){if(m)continue;d=!1;break}if(p){if(!Pt(t,function(e,t){if(!Nt(p,t)&&(h===e||o(h,e,r,n,i)))return p.push(t)})){d=!1;break}}else if(h!==y&&!o(h,y,r,n,i)){d=!1;break}}return i.delete(e),i.delete(t),d}var Mt=d.Uint8Array;function Lt(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Bt(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Ut=p?p.prototype:void 0,It=Ut?Ut.valueOf:void 0;function qt(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}var zt=Object.prototype.propertyIsEnumerable,Ht=Object.getOwnPropertySymbols,Wt=Ht?function(e){return null==e?[]:(e=Object(e),qt(Ht(e),function(t){return zt.call(e,t)}))}:function(){return[]};function Yt(e){return function(e,t,r){var n=t(e);return u(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,Je,Wt)}var Jt=Object.prototype.hasOwnProperty;var Vt=U(d,"DataView"),Kt=U(d,"Promise"),Gt=U(d,"Set"),Zt=U(d,"WeakMap"),Xt="[object Map]",Qt="[object Promise]",er="[object Set]",tr="[object WeakMap]",rr="[object DataView]",nr=$(Vt),or=$(K),ir=$(Kt),ar=$(Gt),sr=$(Zt),cr=b;(Vt&&cr(new Vt(new ArrayBuffer(1)))!=rr||K&&cr(new K)!=Xt||Kt&&cr(Kt.resolve())!=Qt||Gt&&cr(new Gt)!=er||Zt&&cr(new Zt)!=tr)&&(cr=function(e){var t=b(e),r="[object Object]"==t?e.constructor:void 0,n=r?$(r):"";if(n)switch(n){case nr:return rr;case or:return Xt;case ir:return Qt;case ar:return er;case sr:return tr}return t});var ur=cr,lr="[object Arguments]",fr="[object Array]",dr="[object Object]",pr=Object.prototype.hasOwnProperty;function hr(e,t,r,n,o,i){var a=u(e),s=u(t),c=a?fr:ur(e),l=s?fr:ur(t),f=(c=c==lr?dr:c)==dr,d=(l=l==lr?dr:l)==dr,p=c==l;if(p&&xe(e)){if(!xe(t))return!1;a=!0,f=!1}if(p&&!f)return i||(i=new $t),a||Le(e)?Ft(e,t,r,n,o,i):function(e,t,r,n,o,i,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Mt(e),new Mt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return W(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Lt;case"[object Set]":var c=1&n;if(s||(s=Bt),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var l=Ft(s(e),s(t),n,o,i,a);return a.delete(e),l;case"[object Symbol]":if(It)return It.call(e)==It.call(t)}return!1}(e,t,c,r,n,o,i);if(!(1&r)){var h=f&&pr.call(e,"__wrapped__"),y=d&&pr.call(t,"__wrapped__");if(h||y){var m=h?e.value():e,v=y?t.value():t;return i||(i=new $t),o(m,v,r,n,i)}}return!!p&&(i||(i=new $t),function(e,t,r,n,o,i){var a=1&r,s=Yt(e),c=s.length;if(c!=Yt(t).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in t:Jt.call(t,l)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var p=!0;i.set(e,t),i.set(t,e);for(var h=a;++u<c;){var y=e[l=s[u]],m=t[l];if(n)var v=a?n(m,y,l,t,e,i):n(y,m,l,e,t,i);if(!(void 0===v?y===m||o(y,m,r,n,i):v)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var g=e.constructor,w=t.constructor;g==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof w&&w instanceof w||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,r,n,o,i))}function yr(e,t,r,n,o){return e===t||(null==e||null==t||!S(e)&&!S(t)?e!=e&&t!=t:hr(e,t,r,n,yr,o))}function mr(e){return e==e&&!R(e)}function vr(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}function gr(e){var t=function(e){for(var t=Je(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,mr(o)]}return t}(e);return 1==t.length&&t[0][2]?vr(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,a=!n;if(null==e)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var c=(s=r[o])[0],u=e[c],l=s[1];if(a&&s[2]){if(void 0===u&&!(c in e))return!1}else{var f=new $t;if(n)var d=n(u,l,c,e,t,f);if(!(void 0===d?yr(l,u,3,n,f):d))return!1}}return!0}(r,e,t)}}function wr(e,t){return null!=e&&t in Object(e)}function br(e,t){return null!=e&&function(e,t,r){for(var n=-1,o=(t=fe(t,e)).length,i=!1;++n<o;){var a=de(t[n]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Ce(o)&&Te(a,o)&&(u(e)||Oe(e))}(e,t,wr)}function Sr(e){return function(t){return null==t?void 0:t[e]}}function _r(e){return j(e)?Sr(de(e)):function(e){return function(t){return pe(t,e)}}(e)}function Or(e){return"function"==typeof e?e:null==e?Ge:"object"==typeof e?u(e)?function(e,t){return j(e)&&mr(t)?vr(de(e),t):function(r){var n=he(r,e);return void 0===n&&n===t?br(r,e):yr(t,n,3)}}(e[0],e[1]):gr(e):_r(e)}function Er(e,t){var r=-1,n=Ye(e)?Array(e.length):[];return Ke(e,function(e,o,i){n[++r]=t(e,o,i)}),n}function jr(e,t){return(u(e)?ae:Er)(e,Or(t))}function Rr(e,t){return et(e)&&bt(t)?0===(t=wt(t))?e:function(e,t){if(!et(e))return"";if(!bt(t))return"";if(0===(t=wt(t)))return"";let r=e.length-t;return r<0&&(r=0),e.substring(r,r+t)}(e,e.length-t):""}function xr(e,t){var r=[];return Ke(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function Ar(e,t){return(u(e)?qt:xr)(e,Or(t))}function Tr(e){return"[object Array]"===Object.prototype.toString.call(e)}function Cr(e){return!0===(t=e)||!1===t||S(t)&&"[object Boolean]"==b(t);var t}function kr(e){return"[object Object]"===Object.prototype.toString.call(e)}function $r(e,t){return!!kr(e)&&(!(!et(t)&&!tt(t))&&t in e)}function Dr(e,t,r,n={}){let o=he(n,"withInfor");Cr(o)||(o=!0);let i={del:[],add:[],same:[],diff:[]};if(!et(r))return console.log("invalid key"),o&&(i.infor={}),i;Tr(e)||(e=[e]),Tr(t)||(t=[t]),e=Ar(e,e=>$r(e,r)),t=Ar(t,e=>$r(e,r));let a=new Map(t.map(e=>[e[r],e]));for(let t of e){let e=a.get(t[r]);if(e){JSON.stringify(t)===JSON.stringify(e)?i.same.push(e):i.diff.push(e),a.delete(t[r])}else i.del.push(t)}if(i.add=Array.from(a.values()),o){let e={};for(let t of i.del)e[t[r]]="del";for(let t of i.add)e[t[r]]="add";for(let t of i.diff)e[t[r]]="diff";for(let t of i.same)e[t[r]]="same";i.infor=e}return i}function Pr(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}function Nr(){let e,t,r=new Promise(function(){e=arguments[0],t=arguments[1]});return r.resolve=e,r.reject=t,r}function Fr(e,t){let r=Nr();if(!Tr(e)&&!kr(e))return r.reject("rs is not an array or object"),r;let n=!1;if(kr(e)){n=!0;let t=[];Ze(e,(e,r)=>{t.push({k:r,v:e})}),e=t}St(t)||(t=function(e){return e});let o=-1,i=[];return e.reduce(function(e,r){return e.then(function(e){i.push(e),o+=1;let a=o,s=r;return n&&(a=r.k,s=r.v),St(t)?t(s,a):s})},Promise.resolve()).then(function(e){var t,n,o,a;i.push(e),a=null==(t=i)?0:t.length,i=a?Pr(t,(n=o||void 0===n?1:dt(n))<0?0:n,a):[],r.resolve(i)}).catch(function(e){r.reject(e)}),r}function Mr(e,t={}){let r=he(t,"fs");return!!r.existsSync(e)&&(!r.lstatSync(e).isDirectory()&&!r.lstatSync(e).isSymbolicLink())}function Lr(e,t,r={}){let n=he(r,"path"),o=he(r,"fs"),i=he(r,"useSync","");Cr(i)||(i=!0);let a="";return a=i?function(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!Mr(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};try{Et(n.dirname(t),{fs:o}),o.copyFileSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!Mr(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};let i=null;return await(async(e,t)=>{Et(n.dirname(t),{fs:o}),await new Promise((r,n)=>{let i=o.createReadStream(e),a=o.createWriteStream(t);i.on("error",n),a.on("error",n),a.on("finish",r),i.pipe(a)})})(e,t).then(()=>{i={success:"done: "+t}}).catch(e=>{i={error:e}}),i}(e,t,{path:n,fs:o}),a}function Br(e,t={}){let r=he(t,"fs");if(!r.existsSync(e))return{success:"file does not exist: "+e};if(!Mr(e,{fs:r}))return{error:"input path is not a file: "+e};try{r.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}}function Ur(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!_t(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};try{o.readdirSync(e).forEach(function(r){let i=n.resolve(e,r),a=n.resolve(t,r),s=o.lstatSync(i);if(s.isDirectory())Et(a,{fs:o}),Ur(i,a,{path:n,fs:o});else if(s.isSymbolicLink()){let e=o.readlinkSync(i);o.symlinkSync(e,a)}else Et(n.dirname(a),{fs:o}),o.copyFileSync(i,a)})}catch(e){return{error:e}}return{success:"done: "+t}}function Ir(e,t,r={}){let n=he(r,"path"),o=he(r,"fs"),i=he(r,"useSync","");Cr(i)||(i=!0);let a="";return a=i?Ur(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!_t(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};let i=async(e,t)=>{let r=o.readdirSync(e);for(let a of r){let r=n.join(e,a),s=n.join(t,a),c=o.lstatSync(r);if(c.isDirectory())Et(s,{fs:o}),await i(r,s);else if(c.isSymbolicLink()){let e=o.readlinkSync(r);o.symlinkSync(e,s)}else Et(n.dirname(s),{fs:o}),await new Promise((e,t)=>{let n=o.createReadStream(r),i=o.createWriteStream(s);n.on("error",t),i.on("error",t),i.on("finish",e),n.pipe(i)})}},a=null;return await i(e,t).then(()=>{a={success:"done: "+t}}).catch(e=>{a={error:e}}),a}(e,t,{path:n,fs:o}),a}function qr(e,t={}){let r=he(t,"fs"),n=he(t,"crypto"),o=he(t,"type","");et(o)||(o="sha512");let i=Nr();if(!Mr(e,{fs:r}))return i.reject(`fp[${e}] is not a file`),i;try{let t=n.createHash(o),a=r.createReadStream(e);a.on("readable",()=>{let e=a.read();e?t.update(e):i.resolve(t.digest("hex"))}),a.on("error",e=>{i.reject(e.toString())})}catch(e){i.reject(e.toString())}return i}var zr=Array.prototype.join;function Hr(e,t){return null==e?"":zr.call(e,t)}async function Wr(e,t=1,r={}){let n=he(r,"path"),o=he(r,"fs"),i=he(r,"crypto"),a=he(r,"type","");et(a)||(a="md5");let s=he(r,"forFile",null);Cr(s)||(s=!0);let c=he(r,"forFolder",null);if(Cr(c)||(c=!1),!_t(e,{fs:o}))throw new Error(`fd[${e}] is not a folder`);let u=Tt(e,t,{path:n,fs:o});return u=await Fr(u,async e=>{let t="";return s&&!e.isFolder&&(t=await qr(e.path,{fs:o,crypto:i,type:a})),c&&e.isFolder&&(t=await async function(e,t={}){let r=he(t,"path"),n=he(t,"fs"),o=he(t,"crypto"),i=he(t,"type","");et(i)||(i="md5");let a=[],s=Tt(e,null,{path:r,fs:n});return await Fr(s,async e=>{if(e.isFolder)return;let t=await qr(e.path,{fs:n,crypto:o,type:i});a.push(t)}),Hr(a,"|")}(e.path,{path:n,fs:o,crypto:i,type:a})),e.hash=t,e}),u}async function Yr(e,t,r={}){let n=he(r,"path"),o=he(r,"fs"),i=he(r,"crypto"),a=he(r,"type","");if(et(a)||(a="md5"),!_t(e,{fs:o}))throw new Error(`fdSrc[${e}] is not a folder`);if(!_t(t,{fs:o}))return void await Ir(e,t,{path:n,fs:o,useSync:!1});let s=n.sep,c=n.sep.length,u=(e,t)=>{let r=e.isFolder?"folder":"file",n=e.path.replace(t,"");var o,i;return i=c,(et(o=n)&&bt(i)?0===(i=wt(i))?"":o.substring(0,i):"")===s&&(n=Rr(n,c)),n=n.replaceAll("\\","/"),{id:`${r}|${n}`,isFolder:e.isFolder,name:e.name,rpath:n,hash:e.hash}},l=(e,t)=>e=jr(e,e=>u(e,t)),f=await Wr(e,null,{path:n,fs:o,crypto:i,type:a,forFile:!0,forFolder:!1});f=l(f,n.resolve(e));let d=await Wr(t,null,{path:n,fs:o,crypto:i,type:a,forFile:!0,forFolder:!1});d=l(d,n.resolve(t));let p=Dr(d,f,"id",{withInfor:!1});await Fr(p.del,async e=>{if(e.isFolder){xt(n.resolve(t,e.rpath),{fs:o})}}),await Fr(p.del,async e=>{if(!e.isFolder){Br(n.resolve(t,e.rpath),{fs:o})}}),await Fr([...p.add,...p.diff],async r=>{if(!r.isFolder){let i=n.resolve(e,r.rpath),a=n.resolve(t,r.rpath);await Lr(i,a,{path:n,fs:o,useSync:!1})}})}var Jr=Sr("length"),Vr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Kr(e){return Vr.test(e)}var Gr="\\ud800-\\udfff",Zr="["+Gr+"]",Xr="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Qr="\\ud83c[\\udffb-\\udfff]",en="[^"+Gr+"]",tn="(?:\\ud83c[\\udde6-\\uddff]){2}",rn="[\\ud800-\\udbff][\\udc00-\\udfff]",nn="(?:"+Xr+"|"+Qr+")"+"?",on="[\\ufe0e\\ufe0f]?",an=on+nn+("(?:\\u200d(?:"+[en,tn,rn].join("|")+")"+on+nn+")*"),sn="(?:"+[en+Xr+"?",Xr,tn,rn,Zr].join("|")+")",cn=RegExp(Qr+"(?="+Qr+")|"+sn+an,"g");function un(e){return Kr(e)?function(e){for(var t=cn.lastIndex=0;cn.test(e);)++t;return t}(e):Jr(e)}function ln(e){if(null==e)return 0;if(Ye(e))return"string"==typeof(t=e)||!u(t)&&S(t)&&"[object String]"==b(t)?un(e):e.length;var t,r=ur(e);return"[object Map]"==r||"[object Set]"==r?e.size:We(e).length}function fn(e){if(kr(e)){for(let t in e)return!0;return!1}return!1}var dn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function pn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function hn(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var yn={exports:{}};var mn,vn={exports:{}},gn=hn(Object.freeze({__proto__:null,default:{}}));function wn(){return mn||(mn=1,function(e){var t;e.exports=(t=t||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==dn&&dn.crypto&&(r=dn.crypto),!r)try{r=gn}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),i={},a=i.lib={},s=a.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,o=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var a=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=a<<24-(n+i)%4*8}else for(var s=0;s<o;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=i.enc={},l=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},d=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,o=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*u,i);if(u){for(var f=0;f<u;f+=a)this._doProcessBlock(o,f);r=o.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=p.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new h.HMAC.init(e,r).finalize(t)}}});var h=i.algo={};return i}(Math),t)}(vn)),vn.exports}!function(e){e.exports=wn().enc.Utf8}(yn);var bn=pn(yn.exports),Sn={exports:{}};!function(e){var t;e.exports=(t=wn(),function(){var e=t,r=e.lib.WordArray;function n(e,t,n){for(var o=[],i=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;o[i>>>2]|=s<<24-i%4*8,i++}return r.create(o,i)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var o=[],i=0;i<r;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<r;s++)o.push(n.charAt(a>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<r.length;i++)o[r.charCodeAt(i)]=i}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(Sn);var _n=pn(Sn.exports);function On(e){if(!et(e))return"";let t=bn.parse(e);return _n.stringify(t)}var En={exports:{}};!function(e){e.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",s="day",c="week",u="month",l="quarter",f="year",d="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,m={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(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},v=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},g={s:v,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+v(n,2,"0")+":"+v(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,u),i=r-o<0,a=t.clone().add(n+(i?-1:1),u);return+(-(n+(r-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:f,w:c,d:s,D:d,h:a,m:i,s:o,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",b={};b[w]=m;var S="$isDayjsObject",_=function(e){return e instanceof R||!(!e||!e[S])},O=function e(t,r,n){var o;if(!t)return w;if("string"==typeof t){var i=t.toLowerCase();b[i]&&(o=i),r&&(b[i]=r,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;b[s]=t,o=s}return!n&&o&&(w=o),o||!n&&w},E=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new R(r)},j=g;j.l=O,j.i=_,j.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var R=function(){function m(e){this.$L=O(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[S]=!0}var v=m.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(j.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(h);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return j},v.isValid=function(){return!(this.$d.toString()===p)},v.isSame=function(e,t){var r=E(e);return this.startOf(t)<=r&&r<=this.endOf(t)},v.isAfter=function(e,t){return E(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<E(e)},v.$g=function(e,t,r){return j.u(e)?this[t]:this.set(r,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var r=this,n=!!j.u(t)||t,l=j.p(e),p=function(e,t){var o=j.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?o:o.endOf(s)},h=function(e,t){return j.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},y=this.$W,m=this.$M,v=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case f:return n?p(1,0):p(31,11);case u:return n?p(1,m):p(0,m+1);case c:var w=this.$locale().weekStart||0,b=(y<w?y+7:y)-w;return p(n?v-b:v+(6-b),m);case s:case d:return h(g+"Hours",0);case a:return h(g+"Minutes",1);case i:return h(g+"Seconds",2);case o:return h(g+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var r,c=j.p(e),l="set"+(this.$u?"UTC":""),p=(r={},r[s]=l+"Date",r[d]=l+"Date",r[u]=l+"Month",r[f]=l+"FullYear",r[a]=l+"Hours",r[i]=l+"Minutes",r[o]=l+"Seconds",r[n]=l+"Milliseconds",r)[c],h=c===s?this.$D+(t-this.$W):t;if(c===u||c===f){var y=this.clone().set(d,1);y.$d[p](h),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[j.p(e)]()},v.add=function(n,l){var d,p=this;n=Number(n);var h=j.p(l),y=function(e){var t=E(p);return j.w(t.date(t.date()+Math.round(e*n)),p)};if(h===u)return this.set(u,this.$M+n);if(h===f)return this.set(f,this.$y+n);if(h===s)return y(1);if(h===c)return y(7);var m=(d={},d[i]=t,d[a]=r,d[o]=e,d)[h]||1,v=this.$d.getTime()+n*m;return j.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=j.z(this),i=this.$H,a=this.$m,s=this.$M,c=r.weekdays,u=r.months,l=r.meridiem,f=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},d=function(e){return j.s(i%12||12,e,"0")},h=l||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(y,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return j.s(t.$y,4,"0");case"M":return s+1;case"MM":return j.s(s+1,2,"0");case"MMM":return f(r.monthsShort,s,u,3);case"MMMM":return f(u,s);case"D":return t.$D;case"DD":return j.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(r.weekdaysMin,t.$W,c,2);case"ddd":return f(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(i);case"HH":return j.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return h(i,a,!0);case"A":return h(i,a,!1);case"m":return String(a);case"mm":return j.s(a,2,"0");case"s":return String(t.$s);case"ss":return j.s(t.$s,2,"0");case"SSS":return j.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,d,p){var h,y=this,m=j.p(d),v=E(n),g=(v.utcOffset()-this.utcOffset())*t,w=this-v,b=function(){return j.m(y,v)};switch(m){case f:h=b()/12;break;case u:h=b();break;case l:h=b()/3;break;case c:h=(w-g)/6048e5;break;case s:h=(w-g)/864e5;break;case a:h=w/r;break;case i:h=w/t;break;case o:h=w/e;break;default:h=w}return p?h:j.a(h)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return b[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=O(e,t,!0);return n&&(r.$L=n),r},v.clone=function(){return j.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),x=R.prototype;return E.prototype=x,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",s],["$M",u],["$y",f],["$D",d]].forEach(function(e){x[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),E.extend=function(e,t){return e.$i||(e(t,R,E),e.$i=!0),E},E.locale=O,E.isDayjs=_,E.unix=function(e){return E(1e3*e)},E.en=b[w],E.Ls=b,E.p={},E}()}(En);var jn=pn(En.exports);function Rn(){if(!St(jn))throw new Error("invalid dayjs");return jn().format("YYYY-MM-DDTHH:mm:ssZ")}var xn={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function i(e,t,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,i||e,a),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,a=new Array(i);o<i;o++)a[o]=n[o].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,o,i,a){var s=r?r+e:e;if(!this._events[s])return!1;var c,u,l=this._events[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,o),!0;case 5:return l.fn.call(l.context,t,n,o,i),!0;case 6:return l.fn.call(l.context,t,n,o,i,a),!0}for(u=1,c=new Array(f-1);u<f;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,o);break;default:if(!c)for(d=1,c=new Array(f-1);d<f;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},s.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||a(this,i);else{for(var c=0,u=[],l=s.length;c<l;c++)(s[c].fn!==t||o&&!s[c].once||n&&s[c].context!==n)&&u.push(s[c]);u.length?this._events[i]=1===u.length?u[0]:u:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(xn);var An=pn(xn.exports);function Tn(){return new An}function Cn(e=10){tt(e)||(e=10);let t=Nr();return setTimeout(function(){t.resolve()},e),t}var kn=qe(Object.getPrototypeOf,Object),$n=Function.prototype,Dn=Object.prototype,Pn=$n.toString,Nn=Dn.hasOwnProperty,Fn=Pn.call(Object);function Mn(e){if(!S(e))return!1;var t=b(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!function(e){if(!S(e)||"[object Object]"!=b(e))return!1;var t=kn(e);if(null===t)return!0;var r=Nn.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Pn.call(r)==Fn}(e)}function Ln(e){let t="";if(Mn(e))t=e.message;else{if(Qe(e))return e;if(kr(e))return $r(e,"message")?e.message:JSON.stringify(e);if(Tr(e))return JSON.stringify(e);t=function(e){if(!et(e)&&!tt(e)&&!_(e))return"";let t="";try{t=String(e)}catch(e){}try{t=e.toString()}catch(e){}return t}(e)}return t}function Bn(t){return Mr(t,{fs:e})}function Un(e,t=!1){if(function(e){return"[object Undefined]"===Object.prototype.toString.call(e)}(e))return"";let r="";try{r=t?JSON.stringify(e,null,2):JSON.stringify(e)}catch(e){r=""}return r}function In(e=300){return new function(e){let t=[],r=null,n=null;return At(e)||(e=300),e=wt(e),function(o,...i){St(o)?(n=Date.now(),t.push({func:o,input:i}),null===r&&(r=setInterval(()=>{if(Date.now()-n>e){let e=t.pop();t=[],e.func(...e.input)}0===t.length&&(clearInterval(r),r=null)},10))):console.log("func is not a function")}}(e)}function qn(e,r={}){let i=he(r,"polling");Cr(i)||(i=!1);let a=he(r,"timeInterval");At(a)||(a=100),a=wt(a);let s=he(r,"timeBinaryInterval");At(s)||(s=300),s=wt(s);let c=new n.EventEmitter,u=e,l=null,f=setInterval(()=>{null===l&&Bn(u)&&(l=o.watch(u,{usePolling:i,interval:a,binaryInterval:s,awaitWriteFinish:!0}),l.on("all",(e,r,n)=>{r=t.resolve(r),c.emit("change",{type:e,fp:r,stats:n})}))},a);return c.clear=()=>{(()=>{if(null!==l){try{l.unwatch(u)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}})(),clearInterval(f)},c}function zn(t,r,n={}){Ot(t)||Rt(t),Ot(r)||Rt(r);let o=`${t}/fpHash.json`,i=`${r}/fpHash.json`,a=t=>{let r={};try{r=function(e){if(!et(e))return{};let t={};try{t=JSON.parse(e)}catch(e){t={}}return t}(e.readFileSync(t,"utf8"))}catch(e){}return r},s=(t,r)=>{try{let n=Un(r);e.writeFileSync(t,n,"utf8")}catch(e){}},c=(e,t)=>he(a(e),t,""),u=(e,t,r)=>{let n=a(e);n[t]=r,s(e,n)},l=(e,t)=>{let r=a(e);$r(r,t)&&delete r[t],s(e,r)},f=()=>a(o),d=e=>s(o,e),p=e=>c(o,e),h=()=>a(i),y=e=>s(i,e),m=e=>c(i,e),v=(e,t)=>u(i,e,t),g=e=>l(i,e),w=e=>{let t=[];return Ze(e,(e,r)=>{t.push({fp:r,hash:e})}),t};return{buildSrc:()=>{let e=Tn();return e.set=(t,r)=>{((e,t)=>{u(o,e,t)})(t,r),e.emit("set",{type:"set",fp:t,hash:r})},e.get=p,e.remove=t=>{(e=>{l(o,e)})(t),e.emit("remove",{type:"remove",fp:t})},e.readKp=f,e.writeKp=d,e},buildTar:()=>{let e=Tn(),t=In(300),r=qn(o);return r.on("change",r=>{t(()=>{(async()=>{let t=Nr(),r=f();if(!fn(r))return t.resolve("no src"),t;let n=h(),o=w(r),i=Dr(w(n),o,"fp",{withInfor:!1}),a=Nr();return a.then(e=>{y(r)}).catch(()=>{}),e.emit("change",{kpSrc:r,kpTar:n,kpCmp:i,pm:a}),t})().catch(()=>{})})}),e.set=v,e.get=m,e.remove=g,e.readKp=h,e.writeKp=y,e.clear=r.clear,e}}}let Hn=i.fileURLToPath("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(Hn).href:"undefined"==typeof document?location.href:c&&"SCRIPT"===c.tagName.toUpperCase()&&c.src||new URL("w-dwdata-tweq.umd.js",document.baseURI).href),Wn=t.dirname(Hn);let Yn=async(r={})=>{let n=he(r,"keyId");et(n)||(n="id");let o=he(r,"fdTagRemove");et(o)||(o="./_tagRemove");let i=he(r,"fdTaskCpActualSrc");et(i)||(i="./_taskCpActualSrc"),Ot(i)||Rt(i);let s=he(r,"fdTaskCpSrc");et(s)||(s="./_taskCpSrc"),Ot(s)||Rt(s);let c=he(r,"fdLog");et(c)||(c="./_logs"),Ot(c)||Rt(c);let u=he(r,"funGetNew");if(!St(u))throw new Error("invalid funGetNew");let l=he(r,"funGetCurrent");if(!St(l))throw new Error("invalid funGetCurrent");let f=he(r,"funAdd"),d=he(r,"funModify"),p=he(r,"funRemove"),h=he(r,"funAfterStart"),y=he(r,"funBeforeEnd"),m=he(r,"timeToleranceRemove");bt(m)||(m=0),m=pt(m),m>0&&!Ot(o)&&Rt(o);let v=he(r,"eventNameProcCallfunGetNew");et(v)||(v="proc-callfun-getNew");let g=he(r,"eventNameProcCallfunGetCurrent");et(g)||(g="proc-callfun-getCurrent");let w=he(r,"eventNameProcAddCallfunAdd");et(w)||(w="proc-add-callfun-add");let b=he(r,"eventNameProcDiffCallfunModify");et(b)||(b="proc-diff-callfun-modify");let S=he(r,"eventNameProcRemoveCallfunRemove");et(S)||(S="proc-remove-callfun-remove");let _=he(r,"eventNameProcCallfunAfterStart");et(_)||(_="proc-callfun-afterStart");let O=he(r,"eventNameProcCallfunBeforeEnd");et(O)||(O="proc-callfun-beforeEnd");let E=he(r,"eventNameProcCoreDetect");et(E)||(E="proc-coreDetect");let j=he(r,"eventNameProcRetakeRemove");et(j)||(j="proc-retake-remove");let R=he(r,"eventNameProcCoreRetake");et(R)||(R="proc-coreRetake");let x=Tn(),A=function(e={}){let r=he(e,"fdLog");et(r)||(r="./_logs");let n=he(e,"interval");"day"!==n&&"hr"!==n&&(n="day");let o=a.transport({targets:[{level:"info",target:t.resolve(Wn,"./formatter.mjs"),options:{interval:n,fdLog:r}}]});return a(o)}({fdLog:c,interval:"hr"}),T={info:e=>{A.info(e),x.emit("change",{type:"info",...e})},warn:e=>{A.warn(e),x.emit("change",{type:"warn",...e})},error:e=>{A.error(e),x.emit("change",{type:"error",...e})}},C=async t=>{let r=await(async(t,r,n="")=>{let i="";if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);i=o;let a=`${i}/${r}`,s={time:Rn(),hash:n};e.writeFileSync(a,JSON.stringify(s),"utf8")})("remove",t);return r},k=async(t,r={})=>{let n=await(async(t,r,n={})=>{let i=he(n,"checkTime");Cr(i)||(i=!0);let a=he(n,"timeNow"),s="",c=0;if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);s=o,c=m;let u=`${s}/${r}`;if(!Bn(u))return{b:!1,msg:`fp[${u}] is not a file`};if(!i)return{b:!0,msg:`fp[${u}] exists`};if(!fn(a))throw new Error("invalid timeNow");let l=e.readFileSync(u,"utf8"),f=he(JSON.parse(l),"time"),d=jn(f),p=a.diff(d,"millisecond"),h=p>=c;return h?{b:h,msg:`time difference[${p}] >= time tolerance[${c}]`}:{b:h,msg:"allowable time difference"}})("remove",t,r);return n},$=async(t,r)=>{let n="";if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);n=o;let i=`${n}/${r}`;if(!Bn(i))return;let a=e.readFileSync(i,"utf8"),s=JSON.parse(a),c=Br(i,{fs:e});if(c.error)throw new Error(c.error);return s},D=async e=>await $("remove",e),P=null,N=null,F=(async()=>{await Cn(1),T.info({event:"start",msg:"running..."});let e=jn(),t=zn(i,i);P=t.buildSrc();let r=zn(s,s);N=r.buildSrc();let o="";et(o)||await(async()=>{if(St(h))try{T.info({event:_,msg:"start..."});let e=h();kt(e)&&(e=await e),T.info({event:_,msg:"done"})}catch(e){console.log(e),T.error({event:_,msg:Ln(e)}),o="error at proc-callfun-afterStart"}return et(o)?(console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-afterStart",msg:o})):null})().catch(()=>{});et(o)||await(async()=>{let e=[];try{T.info({event:v,msg:"start..."});let t=u();kt(t)&&(t=await t),e=t,T.info({event:v,num:ln(t),msg:"done"})}catch(e){console.log(e),T.error({event:v,msg:Ln(e)}),o="error at proc-callfun-getNew"}if(et(o))return console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-main",msg:o});let t=[];try{T.info({event:g,msg:"start..."});let e=l();kt(e)&&(e=await e),t=e,T.info({event:g,num:ln(e),msg:"done"})}catch(e){console.log(e),T.error({event:g,msg:Ln(e)}),o="error at proc-callfun-getCurrent"}if(et(o))return console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-main",msg:o});if(0===ln(e))return console.log("invalid data, task canceled"),void T.info({event:"cancel-stage-main",msg:"no data"});let r=null;try{T.info({event:"proc-compare",msg:"start..."}),r=Dr(t,e,n,{withInfor:!1});let o=ln(r.del),i=ln(r.add),a=ln(r.diff),s=ln(r.same);T.info({event:"proc-compare",numRemove:o,numAdd:i,numModify:a,numSame:s,msg:"done"})}catch(e){console.log(e),T.error({event:"proc-compare",msg:Ln(e)}),o="error at proc-compare"}return et(o)?(console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-main",msg:o})):fn(r)?0!==ln(r.del)||0!==ln(r.add)||0!==ln(r.diff)?(await Fr(r.del,async e=>{if(!et(o)){try{if(T.info({event:S,[n]:e[n],msg:"start..."}),St(p)){let t=p(e);kt(t)&&(t=await t)}}catch(t){console.log(t),T.error({event:S,[n]:e[n],msg:Ln(t)}),o="error at proc-remove-callfun-remove"}if(!et(o))try{P.remove(e[n]),m<=0?(N.remove(e[n]),T.info({event:S,[n]:e[n],msg:"done"})):(await k(e[n],{checkTime:!1})).b||(await C(e[n]),T.info({event:S,[n]:e[n],msg:"add-tag"}))}catch(t){console.log(t),T.error({event:S,[n]:e[n],msg:Ln(t)}),o="error at proc-remove-callfun-remove"}}}),et(o)?(console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-main",msg:o})):(await Fr(r.add,async e=>{if(!et(o)){try{if(T.info({event:w,[n]:e[n],msg:"start..."}),St(f)){let t=f(e);kt(t)&&(t=await t)}}catch(t){console.log(t),T.error({event:w,[n]:e[n],msg:Ln(t)}),o="error at proc-add-callfun-add"}if(!et(o))try{let t=On(JSON.stringify(e));P.set(e[n],t),N.set(e[n],t),m>0&&(await k(e[n],{checkTime:!1})).b&&(await D(e[n]),T.info({event:w,[n]:e[n],msg:"release-tag"})),T.info({event:w,[n]:e[n],msg:"done"})}catch(t){console.log(t),T.error({event:w,[n]:e[n],msg:Ln(t)}),o="error at proc-add-callfun-add"}}}),et(o)?(console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-main",msg:o})):(await Fr(r.diff,async e=>{if(!et(o)){try{if(T.info({event:b,[n]:e[n],msg:"start..."}),St(d)){let t=d(e);kt(t)&&(t=await t)}}catch(t){console.log(t),T.error({event:b,[n]:e[n],msg:Ln(t)}),o="error at proc-diff-callfun-modify"}if(!et(o))try{let t=On(JSON.stringify(e));P.set(e[n],t),N.set(e[n],t),T.info({event:b,[n]:e[n],msg:"done"})}catch(t){console.log(t),T.error({event:b,[n]:e[n],msg:Ln(t)}),o="error at proc-diff-callfun-modify"}}}),et(o)?(console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-main",msg:o})):null))):void T.info({event:"cancel-stage-main",msg:"no difference"}):(console.log("can not calculate the difference, task canceled"),void T.info({event:"cancel-stage-main",msg:"can not calculate the difference between the data before and after"}))})().catch(()=>{});await(async()=>{if(St(y))try{T.info({event:O,msg:"start..."});let e=y();kt(e)&&(e=await e),T.info({event:O,msg:"done"})}catch(e){console.log(e),T.error({event:O,msg:Ln(e)}),o="error at proc-callfun-beforeEnd"}return et(o)?(console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-beforeEnd",msg:o})):null})().catch(()=>{}),T.info({event:"end",...(()=>{let t=jn(),r=t.diff(e,"second");return{timeRunStart:e.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunEnd:t.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunSpent:`${r}s`}})(),msg:"done"})})().catch(e=>{console.log(e),T.error({event:E,msg:Ln(e)})}),M=(async()=>{await async function(e,t={}){let r=null,n=Nr();if(!St(e))return n.reject("waitfunction需輸入函數f"),n;let o=async()=>{let t=e();return kt(t)&&(t=await t),t};if(r=await o(),!0===r)return n.resolve(),n;let i=he(t,"attemptNum",null);At(i)||(i=200);let a=he(t,"timeInterval",null);At(a)||(a=1e3);let s=0,c=setInterval(async()=>{s+=1,r=await o(),!0===r&&(clearInterval(c),n.resolve()),s>i&&(clearInterval(c),n.reject(`exceeded attemptNum[${i}]`))},a);return n}(()=>null!==N);let e=jn(),t=Ct(o,1);0!==ln(t)&&await Fr(t,async t=>{let r=(await k(t.name,{timeNow:e,checkTime:!0})).b,o=!et(P.get(t.name)),i=et(N.get(t.name));r&&o&&i&&(await D(t.name),T.info({event:j,[n]:t.name,from:"debounce",msg:"release-tag"}),N.remove(t.name),T.info({event:j,[n]:t.name,from:"debounce",msg:"done"}))})})().catch(e=>{console.log(e),T.error({event:R,msg:Ln(e)})});return x.srlog=T,Promise.all([F,M]).finally(()=>{x.emit("end")}),x},Jn=async(n={})=>{let o=he(n,"keyId");et(o)||(o="id");let i=he(n,"fdTagRemove");et(i)||(i="./_tagRemove");let a=he(n,"fdDwAttime");et(a)||(a="./_dwAttime"),Ot(a)||Rt(a);let s=he(n,"fdDwCurrent");et(s)||(s="./_dwCurrent"),Ot(s)||Rt(s);let c=he(n,"fdTaskCpActualSrc");et(c)||(c="./_taskCpActualSrc"),Ot(c)||Rt(c);let u=he(n,"fdTaskCpSrc");et(u)||(u="./_taskCpSrc"),Ot(u)||Rt(u);let l=he(n,"fdLog");et(l)||(l="./_logs"),Ot(l)||Rt(l);let f=he(n,"funDownload");if(!St(f))throw new Error("invalid funDownload");let d=he(n,"funGetCurrent");if(!St(d))throw new Error("invalid funGetCurrent");let p=he(n,"funAdd");if(!St(p))throw new Error("invalid funAdd");let h=he(n,"funModify");if(!St(h))throw new Error("invalid funModify");let y=he(n,"funRemove");if(!St(y))throw new Error("invalid funRemove");let m=he(n,"funAfterStart"),v=he(n,"funBeforeEnd"),g=he(n,"timeToleranceRemove");bt(g)||(g=0),g=pt(g);let w=async()=>{await function(n,o,i={}){return Yr(n,o,{path:t,fs:e,crypto:r,...i})}(a,s)};return Yn({keyId:o,fdTagRemove:i,fdTaskCpActualSrc:c,fdTaskCpSrc:u,fdLog:l,funGetNew:f,funGetCurrent:d,funAdd:p,funModify:h,funRemove:y,funAfterStart:async()=>{if(St(m)){let e=m();kt(e)&&(e=await e)}},funBeforeEnd:async()=>{if(await w(),St(v)){let e=v();kt(e)&&(e=await e)}},timeToleranceRemove:g,eventNameProcCallfunGetNew:"proc-callfun-download"})};function Vn(e,t){return function(){return e.apply(t,arguments)}}const{toString:Kn}=Object.prototype,{getPrototypeOf:Gn}=Object,{iterator:Zn,toStringTag:Xn}=Symbol,Qn=(e=>t=>{const r=Kn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),eo=e=>(e=e.toLowerCase(),t=>Qn(t)===e),to=e=>t=>typeof t===e,{isArray:ro}=Array,no=to("undefined");function oo(e){return null!==e&&!no(e)&&null!==e.constructor&&!no(e.constructor)&&so(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const io=eo("ArrayBuffer");const ao=to("string"),so=to("function"),co=to("number"),uo=e=>null!==e&&"object"==typeof e,lo=e=>{if("object"!==Qn(e))return!1;const t=Gn(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Xn in e||Zn in e)},fo=eo("Date"),po=eo("File"),ho=eo("Blob"),yo=eo("FileList"),mo=eo("URLSearchParams"),[vo,go,wo,bo]=["ReadableStream","Request","Response","Headers"].map(eo);function So(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),ro(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(oo(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(n=0;n<i;n++)a=o[n],t.call(null,e[a],a,e)}}function _o(e,t){if(oo(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const Oo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Eo=e=>!no(e)&&e!==Oo;const jo=(Ro="undefined"!=typeof Uint8Array&&Gn(Uint8Array),e=>Ro&&e instanceof Ro);var Ro;const xo=eo("HTMLFormElement"),Ao=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),To=eo("RegExp"),Co=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};So(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)};const ko=eo("AsyncFunction"),$o=(Do="function"==typeof setImmediate,Po=so(Oo.postMessage),Do?setImmediate:Po?(No=`axios@${Math.random()}`,Fo=[],Oo.addEventListener("message",({source:e,data:t})=>{e===Oo&&t===No&&Fo.length&&Fo.shift()()},!1),e=>{Fo.push(e),Oo.postMessage(No,"*")}):e=>setTimeout(e));var Do,Po,No,Fo;const Mo="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Oo):"undefined"!=typeof process&&process.nextTick||$o;var Lo={isArray:ro,isArrayBuffer:io,isBuffer:oo,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||so(e.append)&&("formdata"===(t=Qn(e))||"object"===t&&so(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&io(e.buffer),t},isString:ao,isNumber:co,isBoolean:e=>!0===e||!1===e,isObject:uo,isPlainObject:lo,isEmptyObject:e=>{if(!uo(e)||oo(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:vo,isRequest:go,isResponse:wo,isHeaders:bo,isUndefined:no,isDate:fo,isFile:po,isBlob:ho,isRegExp:To,isFunction:so,isStream:e=>uo(e)&&so(e.pipe),isURLSearchParams:mo,isTypedArray:jo,isFileList:yo,forEach:So,merge:function e(){const{caseless:t,skipUndefined:r}=Eo(this)&&this||{},n={},o=(o,i)=>{const a=t&&_o(n,i)||i;lo(n[a])&&lo(o)?n[a]=e(n[a],o):lo(o)?n[a]=e({},o):ro(o)?n[a]=o.slice():r&&no(o)||(n[a]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&So(arguments[e],o);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(So(t,(t,n)=>{r&&so(t)?e[n]=Vn(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&Gn(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Qn,kindOfTest:eo,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(ro(e))return e;let t=e.length;if(!co(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Zn]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:xo,hasOwnProperty:Ao,hasOwnProp:Ao,reduceDescriptors:Co,freezeMethods:e=>{Co(e,(t,r)=>{if(so(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];so(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return ro(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:_o,global:Oo,isContextDefined:Eo,isSpecCompliantForm:function(e){return!!(e&&so(e.append)&&"FormData"===e[Xn]&&e[Zn])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(uo(e)){if(t.indexOf(e)>=0)return;if(oo(e))return e;if(!("toJSON"in e)){t[n]=e;const o=ro(e)?[]:{};return So(e,(e,t)=>{const i=r(e,n+1);!no(i)&&(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:ko,isThenable:e=>e&&(uo(e)||so(e))&&so(e.then)&&so(e.catch),setImmediate:$o,asap:Mo,isIterable:e=>null!=e&&so(e[Zn])};function Bo(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}Lo.inherits(Bo,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Lo.toJSONObject(this.config),code:this.code,status:this.status}}});const Uo=Bo.prototype,Io={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Io[e]={value:e}}),Object.defineProperties(Bo,Io),Object.defineProperty(Uo,"isAxiosError",{value:!0}),Bo.from=(e,t,r,n,o,i)=>{const a=Object.create(Uo);Lo.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return Bo.call(a,s,c,r,n,o),e&&null==a.cause&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};function qo(e){return Lo.isPlainObject(e)||Lo.isArray(e)}function zo(e){return Lo.endsWith(e,"[]")?e.slice(0,-2):e}function Ho(e,t,r){return e?e.concat(t).map(function(e,t){return e=zo(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const Wo=Lo.toFlatObject(Lo,{},null,function(e){return/^is[A-Z]/.test(e)});function Yo(e,t,r){if(!Lo.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Lo.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Lo.isUndefined(t[e])})).metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Lo.isSpecCompliantForm(t);if(!Lo.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Lo.isDate(e))return e.toISOString();if(Lo.isBoolean(e))return e.toString();if(!s&&Lo.isBlob(e))throw new Bo("Blob is not supported. Use a Buffer instead.");return Lo.isArrayBuffer(e)||Lo.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(Lo.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Lo.isArray(e)&&function(e){return Lo.isArray(e)&&!e.some(qo)}(e)||(Lo.isFileList(e)||Lo.endsWith(r,"[]"))&&(s=Lo.toArray(e)))return r=zo(r),s.forEach(function(e,n){!Lo.isUndefined(e)&&null!==e&&t.append(!0===a?Ho([r],n,i):null===a?r:r+"[]",c(e))}),!1;return!!qo(e)||(t.append(Ho(o,r,i),c(e)),!1)}const l=[],f=Object.assign(Wo,{defaultVisitor:u,convertValue:c,isVisitable:qo});if(!Lo.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Lo.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),Lo.forEach(r,function(r,i){!0===(!(Lo.isUndefined(r)||null===r)&&o.call(t,r,Lo.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])}),l.pop()}}(e),t}function Jo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Vo(e,t){this._pairs=[],e&&Yo(e,this,t)}const Ko=Vo.prototype;function Go(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Zo(e,t,r){if(!t)return e;const n=r&&r.encode||Go;Lo.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):Lo.isURLSearchParams(t)?t.toString():new Vo(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Ko.append=function(e,t){this._pairs.push([e,t])},Ko.toString=function(e){const t=e?function(t){return e.call(this,t,Jo)}:Jo;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Xo=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Lo.forEach(this.handlers,function(t){null!==t&&e(t)})}},Qo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ei={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Vo,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ti="undefined"!=typeof window&&"undefined"!=typeof document,ri="object"==typeof navigator&&navigator||void 0,ni=ti&&(!ri||["ReactNative","NativeScript","NS"].indexOf(ri.product)<0),oi="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ii=ti&&window.location.href||"http://localhost";var ai={...Object.freeze({__proto__:null,hasBrowserEnv:ti,hasStandardBrowserEnv:ni,hasStandardBrowserWebWorkerEnv:oi,navigator:ri,origin:ii}),...ei};function si(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&Lo.isArray(n)?n.length:i,s)return Lo.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&Lo.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&Lo.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!a}if(Lo.isFormData(e)&&Lo.isFunction(e.entries)){const r={};return Lo.forEachEntry(e,(e,n)=>{t(function(e){return Lo.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const ci={transitional:Qo,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=Lo.isObject(e);o&&Lo.isHTMLForm(e)&&(e=new FormData(e));if(Lo.isFormData(e))return n?JSON.stringify(si(e)):e;if(Lo.isArrayBuffer(e)||Lo.isBuffer(e)||Lo.isStream(e)||Lo.isFile(e)||Lo.isBlob(e)||Lo.isReadableStream(e))return e;if(Lo.isArrayBufferView(e))return e.buffer;if(Lo.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Yo(e,new ai.classes.URLSearchParams,{visitor:function(e,t,r,n){return ai.isNode&&Lo.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=Lo.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Yo(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(Lo.isString(e))try{return(t||JSON.parse)(e),Lo.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ci.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Lo.isResponse(e)||Lo.isReadableStream(e))return e;if(e&&Lo.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw Bo.from(e,Bo.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ai.classes.FormData,Blob:ai.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Lo.forEach(["delete","get","head","post","put","patch"],e=>{ci.headers[e]={}});var ui=ci;const li=Lo.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const fi=Symbol("internals");function di(e){return e&&String(e).trim().toLowerCase()}function pi(e){return!1===e||null==e?e:Lo.isArray(e)?e.map(pi):String(e)}function hi(e,t,r,n,o){return Lo.isFunction(n)?n.call(this,t,r):(o&&(t=r),Lo.isString(t)?Lo.isString(n)?-1!==t.indexOf(n):Lo.isRegExp(n)?n.test(t):void 0:void 0)}class yi{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=di(t);if(!o)throw new Error("header name must be a non-empty string");const i=Lo.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=pi(e))}const i=(e,t)=>Lo.forEach(e,(e,r)=>o(e,r,t));if(Lo.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Lo.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&li[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(Lo.isObject(e)&&Lo.isIterable(e)){let r,n,o={};for(const t of e){if(!Lo.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?Lo.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=di(e)){const r=Lo.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Lo.isFunction(t))return t.call(this,e,r);if(Lo.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=di(e)){const r=Lo.findKey(this,e);return!(!r||void 0===this[r]||t&&!hi(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=di(e)){const o=Lo.findKey(r,e);!o||t&&!hi(0,r[o],o,t)||(delete r[o],n=!0)}}return Lo.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!hi(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Lo.forEach(this,(n,o)=>{const i=Lo.findKey(r,o);if(i)return t[i]=pi(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();a!==o&&delete t[o],t[a]=pi(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Lo.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Lo.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[fi]=this[fi]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=di(e);t[n]||(!function(e,t){const r=Lo.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return Lo.isArray(e)?e.forEach(n):n(e),this}}yi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Lo.reduceDescriptors(yi.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Lo.freezeMethods(yi);var mi=yi;function vi(e,t){const r=this||ui,n=t||r,o=mi.from(n.headers);let i=n.data;return Lo.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function gi(e){return!(!e||!e.__CANCEL__)}function wi(e,t,r){Bo.call(this,null==e?"canceled":e,Bo.ERR_CANCELED,t,r),this.name="CanceledError"}function bi(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Bo("Request failed with status code "+r.status,[Bo.ERR_BAD_REQUEST,Bo.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}Lo.inherits(wi,Bo,{__CANCEL__:!0});const Si=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(r=e,n||(n=setTimeout(()=>{n=null,a(r)},i-s)))},()=>r&&a(r)]}(r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})},r)},_i=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Oi=e=>(...t)=>Lo.asap(()=>e(...t));var Ei=ai.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ai.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ai.origin),ai.navigator&&/(msie|trident)/i.test(ai.navigator.userAgent)):()=>!0,ji=ai.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];Lo.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),Lo.isString(n)&&a.push("path="+n),Lo.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ri(e,t,r){let n=!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const xi=e=>e instanceof mi?{...e}:e;function Ai(e,t){t=t||{};const r={};function n(e,t,r,n){return Lo.isPlainObject(e)&&Lo.isPlainObject(t)?Lo.merge.call({caseless:n},e,t):Lo.isPlainObject(t)?Lo.merge({},t):Lo.isArray(t)?t.slice():t}function o(e,t,r,o){return Lo.isUndefined(t)?Lo.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!Lo.isUndefined(t))return n(void 0,t)}function a(e,t){return Lo.isUndefined(t)?Lo.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(xi(e),xi(t),0,!0)};return Lo.forEach(Object.keys({...e,...t}),function(n){const i=c[n]||o,a=i(e[n],t[n],n);Lo.isUndefined(a)&&i!==s||(r[n]=a)}),r}var Ti=e=>{const t=Ai({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;if(t.headers=a=mi.from(a),t.url=Zo(Ri(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Lo.isFormData(r))if(ai.hasStandardBrowserEnv||ai.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(Lo.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&a.set(e,r)})}if(ai.hasStandardBrowserEnv&&(n&&Lo.isFunction(n)&&(n=n(t)),n||!1!==n&&Ei(t.url))){const e=o&&i&&ji.read(i);e&&a.set(o,e)}return t};var Ci="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Ti(e);let o=n.data;const i=mi.from(n.headers).normalize();let a,s,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=n;function h(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function m(){if(!y)return;const n=mi.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());bi(function(e){t(e),h()},function(e){r(e),h()},{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y}),y=null}y.open(n.method.toUpperCase(),n.url,!0),y.timeout=n.timeout,"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(m)},y.onabort=function(){y&&(r(new Bo("Request aborted",Bo.ECONNABORTED,e,y)),y=null)},y.onerror=function(t){const n=new Bo(t&&t.message?t.message:"Network Error",Bo.ERR_NETWORK,e,y);n.event=t||null,r(n),y=null},y.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Qo;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Bo(t,o.clarifyTimeoutError?Bo.ETIMEDOUT:Bo.ECONNABORTED,e,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&Lo.forEach(i.toJSON(),function(e,t){y.setRequestHeader(t,e)}),Lo.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),f&&"json"!==f&&(y.responseType=n.responseType),p&&([c,l]=Si(p,!0),y.addEventListener("progress",c)),d&&y.upload&&([s,u]=Si(d),y.upload.addEventListener("progress",s),y.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=t=>{y&&(r(!t||t.type?new wi(null,e,y):t),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);v&&-1===ai.protocols.indexOf(v)?r(new Bo("Unsupported protocol "+v+":",Bo.ERR_BAD_REQUEST,e)):y.send(o||null)})};var ki=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Bo?t:new wi(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Bo(`timeout ${t} of ms exceeded`,Bo.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=n;return s.unsubscribe=()=>Lo.asap(a),s}};const $i=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},Di=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Pi=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of Di(e))yield*$i(r,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:Ni}=Lo,Fi=(({Request:e,Response:t})=>({Request:e,Response:t}))(Lo.global),{ReadableStream:Mi,TextEncoder:Li}=Lo.global,Bi=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Ui=e=>{e=Lo.merge.call({skipUndefined:!0},Fi,e);const{fetch:t,Request:r,Response:n}=e,o=t?Ni(t):"function"==typeof fetch,i=Ni(r),a=Ni(n);if(!o)return!1;const s=o&&Ni(Mi),c=o&&("function"==typeof Li?(u=new Li,e=>u.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var u;const l=i&&s&&Bi(()=>{let e=!1;const t=new r(ai.origin,{body:new Mi,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),f=a&&s&&Bi(()=>Lo.isReadableStream(new n("").body)),d={stream:f&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new Bo(`Response type '${e}' is not supported`,Bo.ERR_NOT_SUPPORT,r)})});const p=async(e,t)=>{const n=Lo.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Lo.isBlob(e))return e.size;if(Lo.isSpecCompliantForm(e)){const t=new r(ai.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Lo.isArrayBufferView(e)||Lo.isArrayBuffer(e)?e.byteLength:(Lo.isURLSearchParams(e)&&(e+=""),Lo.isString(e)?(await c(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:a,data:s,signal:c,cancelToken:u,timeout:h,onDownloadProgress:y,onUploadProgress:m,responseType:v,headers:g,withCredentials:w="same-origin",fetchOptions:b}=Ti(e),S=t||fetch;v=v?(v+"").toLowerCase():"text";let _=ki([c,u&&u.toAbortSignal()],h),O=null;const E=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let j;try{if(m&&l&&"get"!==a&&"head"!==a&&0!==(j=await p(g,s))){let e,t=new r(o,{method:"POST",body:s,duplex:"half"});if(Lo.isFormData(s)&&(e=t.headers.get("content-type"))&&g.setContentType(e),t.body){const[e,r]=_i(j,Si(Oi(m)));s=Pi(t.body,65536,e,r)}}Lo.isString(w)||(w=w?"include":"omit");const t=i&&"credentials"in r.prototype,c={...b,signal:_,method:a.toUpperCase(),headers:g.normalize().toJSON(),body:s,duplex:"half",credentials:t?w:void 0};O=i&&new r(o,c);let u=await(i?S(O,b):S(o,c));const h=f&&("stream"===v||"response"===v);if(f&&(y||h&&E)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=Lo.toFiniteNumber(u.headers.get("content-length")),[r,o]=y&&_i(t,Si(Oi(y),!0))||[];u=new n(Pi(u.body,65536,r,()=>{o&&o(),E&&E()}),e)}v=v||"text";let R=await d[Lo.findKey(d,v)||"text"](u,e);return!h&&E&&E(),await new Promise((t,r)=>{bi(t,r,{data:R,headers:mi.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:O})})}catch(t){if(E&&E(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Bo("Network Error",Bo.ERR_NETWORK,e,O),{cause:t.cause||t});throw Bo.from(t,t&&t.code,e,O)}}},Ii=new Map,qi=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let a,s,c=i.length,u=Ii;for(;c--;)a=i[c],s=u.get(a),void 0===s&&u.set(a,s=c?new Map:Ui(t)),u=s;return s};qi();const zi={http:null,xhr:Ci,fetch:{get:qi}};Lo.forEach(zi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Hi=e=>`- ${e}`,Wi=e=>Lo.isFunction(e)||null===e||!1===e;var Yi=(e,t)=>{e=Lo.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let a=0;a<r;a++){let r;if(n=e[a],o=n,!Wi(n)&&(o=zi[(r=String(n)).toLowerCase()],void 0===o))throw new Bo(`Unknown adapter '${r}'`);if(o&&(Lo.isFunction(o)||(o=o.get(t))))break;i[r||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Bo("There is no suitable adapter to dispatch the request "+(r?e.length>1?"since :\n"+e.map(Hi).join("\n"):" "+Hi(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function Ji(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new wi(null,e)}function Vi(e){Ji(e),e.headers=mi.from(e.headers),e.data=vi.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Yi(e.adapter||ui.adapter,e)(e).then(function(t){return Ji(e),t.data=vi.call(e,e.transformResponse,t),t.headers=mi.from(t.headers),t},function(t){return gi(t)||(Ji(e),t&&t.response&&(t.response.data=vi.call(e,e.transformResponse,t.response),t.response.headers=mi.from(t.response.headers))),Promise.reject(t)})}const Ki="1.12.2",Gi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Zi={};Gi.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Ki+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new Bo(n(o," has been removed"+(t?" in "+t:"")),Bo.ERR_DEPRECATED);return t&&!Zi[o]&&(Zi[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},Gi.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var Xi={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Bo("options must be an object",Bo.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new Bo("option "+i+" must be "+r,Bo.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Bo("Unknown option "+i,Bo.ERR_BAD_OPTION)}},validators:Gi};const Qi=Xi.validators;class ea{constructor(e){this.defaults=e||{},this.interceptors={request:new Xo,response:new Xo}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ai(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Xi.assertOptions(r,{silentJSONParsing:Qi.transitional(Qi.boolean),forcedJSONParsing:Qi.transitional(Qi.boolean),clarifyTimeoutError:Qi.transitional(Qi.boolean)},!1),null!=n&&(Lo.isFunction(n)?t.paramsSerializer={serialize:n}:Xi.assertOptions(n,{encode:Qi.function,serialize:Qi.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Xi.assertOptions(t,{baseUrl:Qi.spelling("baseURL"),withXsrfToken:Qi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Lo.merge(o.common,o[t.method]);o&&Lo.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=mi.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,f=0;if(!s){const e=[Vi.bind(this),void 0];for(e.unshift(...a),e.push(...c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=a.length;let d=t;for(;f<l;){const e=a[f++],t=a[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Vi.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return Zo(Ri((e=Ai(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Lo.forEach(["delete","get","head","options"],function(e){ea.prototype[e]=function(t,r){return this.request(Ai(r||{},{method:e,url:t,data:(r||{}).data}))}}),Lo.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(Ai(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ea.prototype[e]=t(),ea.prototype[e+"Form"]=t(!0)});var ta=ea;class ra{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new wi(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ra(function(t){e=t}),cancel:e}}}var na=ra;const oa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(oa).forEach(([e,t])=>{oa[t]=e});var ia=oa;const aa=function e(t){const r=new ta(t),n=Vn(ta.prototype.request,r);return Lo.extend(n,ta.prototype,r,{allOwnKeys:!0}),Lo.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Ai(t,r))},n}(ui);aa.Axios=ta,aa.CanceledError=wi,aa.CancelToken=na,aa.isCancel=gi,aa.VERSION=Ki,aa.toFormData=Yo,aa.AxiosError=Bo,aa.Cancel=aa.CanceledError,aa.all=function(e){return Promise.all(e)},aa.spread=function(e){return function(t){return e.apply(null,t)}},aa.isAxiosError=function(e){return Lo.isObject(e)&&!0===e.isAxiosError},aa.mergeConfig=Ai,aa.AxiosHeaders=mi,aa.formToJSON=e=>si(Lo.isHTMLForm(e)?new FormData(e):e),aa.getAdapter=Yi,aa.HttpStatusCode=ia,aa.default=aa;var sa=aa;let ca=async(e,t)=>{let r={draw:6,"columns[0][data]":0,"columns[0][name]":"EventNo","columns[0][searchable]":!1,"columns[0][orderable]":!0,"columns[0][search][value]":"","columns[0][search][regex]":!1,"columns[1][data]":1,"columns[1][name]":"MaxIntensity","columns[1][searchable]":!0,"columns[1][orderable]":!0,"columns[1][search][value]":"","columns[1][search][regex]":!1,"columns[2][data]":2,"columns[2][name]":"OriginTime","columns[2][searchable]":!0,"columns[2][orderable]":!0,"columns[2][search][value]":"","columns[2][search][regex]":!1,"columns[3][data]":3,"columns[3][name]":"MagnitudeValue","columns[3][searchable]":!0,"columns[3][orderable]":!0,"columns[3][search][value]":"","columns[3][search][regex]":!1,"columns[4][data]":4,"columns[4][name]":"Depth","columns[4][searchable]":!0,"columns[4][orderable]":!0,"columns[4][search][value]":"","columns[4][search][regex]":!1,"columns[5][data]":5,"columns[5][name]":"Description","columns[5][searchable]":!0,"columns[5][orderable]":!0,"columns[5][search][value]":"","columns[5][search][regex]":!1,"columns[6][data]":6,"columns[6][name]":"Description","columns[6][searchable]":!0,"columns[6][orderable]":!0,"columns[6][search][value]":"","columns[6][search][regex]":!1,"order[0][column]":2,"order[0][dir]":"desc",start:0,length:-1,"search[value]":"","search[regex]":!1,Search:"",txtSDate:`${e}-1-1`,txtEDate:`${t+1}-1-1`,txtSscale:"",txtEscale:"",txtSdepth:"",txtEdepth:"",txtLonS:"",txtLonE:"",txtLatS:"",txtLatE:"",ddlCity:"",ddlTown:"",ddlCitySta:"",ddlStation:"",txtIntensityB:"",txtIntensityE:"",txtLon:"",txtLat:"",txtKM:"",ddlStationName:"------",cblEventNo:"Y",txtSDatePWS:"",txtEDatePWS:"",txtSscalePWS:"",txtEscalePWS:"",ddlMark:""},n=null;try{n=(await sa.post("https://scweb.cwa.gov.tw/zh-tw/earthquake/ajaxhandler",(o=r,Hr(jr(o,(e,t)=>{let r=null==e?"":e;return`${encodeURIComponent(t)}=${encodeURIComponent(r)}`}),"&")),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data}catch(e){console.log(e)}var o;return n};function ua(e){return e!=e}function la(e,t,r){return t==t?function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}(e,ua,r)}var fa="\\ud800-\\udfff",da="["+fa+"]",pa="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ha="\\ud83c[\\udffb-\\udfff]",ya="[^"+fa+"]",ma="(?:\\ud83c[\\udde6-\\uddff]){2}",va="[\\ud800-\\udbff][\\udc00-\\udfff]",ga="(?:"+pa+"|"+ha+")"+"?",wa="[\\ufe0e\\ufe0f]?",ba=wa+ga+("(?:\\u200d(?:"+[ya,ma,va].join("|")+")"+wa+ga+")*"),Sa="(?:"+[ya+pa+"?",pa,ma,va,da].join("|")+")",_a=RegExp(ha+"(?="+ha+")|"+Sa+ba,"g");function Oa(e){return Kr(e)?function(e){return e.match(_a)||[]}(e):function(e){return e.split("")}(e)}function Ea(e,t,r){if((e=le(e))&&(r||void 0===t))return ot(e);if(!e||!(t=ue(t)))return e;var n=Oa(e),o=Oa(t),i=function(e,t){for(var r=-1,n=e.length;++r<n&&la(t,e[r],0)>-1;);return r}(n,o),a=function(e,t){for(var r=e.length;r--&&la(t,e[r],0)>-1;);return r}(n,o)+1;return function(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:Pr(e,t,r)}(n,i,a).join("")}let ja=async(t,r)=>{let n=await fetch(t);if(!n.ok)throw new Error(`can not download file, status[${n.status}]: ${n.statusText}`);let o=await n.arrayBuffer(),i=Buffer.from(o);e.writeFileSync(r,i)},Ra=async(e,t)=>{Ot(e)||Rt(e);let r=[{url:t.urlPicEqReport,fn:"picEqReport.gif"},{url:t.urlPicEqIntensity,fn:"picEqIntensity.png"},{url:t.urlPicEqPga,fn:"picEqPga.png"},{url:t.urlPicEqPgv,fn:"picEqPgv.png"}];await Fr(r,async t=>{let r=`${e}/${t.fn}`;await(async(e,t,r={})=>{let n=he(r,"retries");bt(n)||(n=3),n=wt(n);let o=he(r,"retrietimeDelays");bt(o)||(o=1e3),o=pt(o);let i="error",a=null,s=null;for(let r=1;r<=n&&(await ja(e,t).then(e=>{s=e,i="success"}).catch(e=>{console.log(e),a=e}),await Cn(o),null===s);r++);if("error"===i)throw new Error(a);return s})(t.url,r)})};return async(t,r,n={})=>{if(!tt(t))throw new Error("yearStart is not a number");if(t=wt(t),!tt(r))throw new Error("yearEnd is not a number");r=wt(r);let o=he(n,"keyId");et(o)||(o="id");let i=he(n,"fdTagRemove");et(i)||(i="./_tagRemove");let a=he(n,"fdDwAttime");et(a)||(a="./_dwAttime"),Ot(a)||Rt(a);let c=he(n,"fdDwCurrent");et(c)||(c="./_dwCurrent"),Ot(c)||Rt(c);let u=he(n,"fdResult");et(u)||(u="./_result"),Ot(u)||Rt(u);let l=he(n,"fdTaskCpActualSrc");et(l)||(l="./_taskCpActualSrc"),Ot(l)||Rt(l);let f=he(n,"fdTaskCpSrc");et(f)||(f="./_taskCpSrc"),Ot(f)||Rt(f);let d=he(n,"fdLog");et(d)||(d="./_logs"),Ot(d)||Rt(d);let p=he(n,"funDownload"),h=he(n,"funGetCurrent"),y=he(n,"funAdd"),m=he(n,"funModify"),v=he(n,"funRemove"),g=he(n,"timeToleranceRemove");bt(g)||(g=0),g=pt(g);let w=async()=>{let n=await ca(t,r),i=jr(he(n,"data",[]),e=>{let t=he(e,0,""),r=he(e,1,""),n=he(e,2,""),o=he(e,3,""),i=he(e,4,""),a=he(e,5,""),s=he(e,6,""),c=he(e,7,""),u=he(e,8,"");r=Ea(r);let l=jn(n,"YYYY-MM-DD HH-mm:ss"),f=l.format("YYYY-MM-DDTHH:mm:ssZ"),d=l.format("YYYYMMDDHHmmss"),p=l.format("YYYY"),h=l.format("YYYYMM"),y="";return tt(r)&&tt(p)&&(y=`${wt(p)-1911}${r}`),{id:y,tag:t,number:r,time:f,timeRec:n,timeTag:d,ml:o,depth:i,location:a,intensity:s,longitude:c,latitude:u,urlWebEqInfor:`https://scweb.cwa.gov.tw/zh-TW/earthquake/Details/${t}`,urlWebEqReport:`https://scweb.cwa.gov.tw/zh-TW/earthquake/Imgs/${t}`,urlWebEqIntensity:`https://scweb.cwa.gov.tw/zh-TW/earthquake/ShakeMap/${t}`,urlWebEqWave:`https://scweb.cwa.gov.tw/zh-TW/earthquake/WaveformAcc/${t}`,urlPicEqReport:`https://scweb.cwa.gov.tw/webdata/OLDEQ/${h}/${t}.gif`,urlPicEqIntensity:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${p}/${p}${r}i.png`,urlPicEqPga:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${p}/${p}${r}a.png`,urlPicEqPgv:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${p}/${p}${r}v.png`}});var s;return i=null==(s=i)?s:Xe.call(s),Ze(i,t=>{let r=`${a}/${t[o]}.json`;e.writeFileSync(r,JSON.stringify(t),"utf8")}),i};St(p)||(p=w);let b=async()=>{let t=Ct(c,1),r=[];return Ze(t,t=>{let n=e.readFileSync(t.path,"utf8"),o=JSON.parse(n);r.push(o)}),r};St(h)||(h=b);let S=async t=>{let r=`${u}/${t[o]}`;Ot(r)&&xt(r,{fs:e})};St(v)||(v=S);let _=async(t,r)=>{await Ra(t,r);let n=`${t}/picEqReport.gif`,o=`${t}/picEqIntensityList.gif`;await(async(t,r,n,o,i,a)=>{let c=e.readFileSync(t),u=await s(c,{animated:!1}).extract({left:n,top:o,width:i,height:a}).toBuffer();e.writeFileSync(r,u)})(n,o,364,199,276,204)},O=async e=>{let t=`${u}/${e[o]}`;Ot(t)||Rt(t),jt(t),await _(t,e)};St(y)||(y=O);let E=async e=>{let t=`${u}/${e[o]}`;Ot(t)||Rt(t),jt(t),await _(t,e)};St(m)||(m=E);let j={fdTagRemove:i,fdDwAttime:a,fdDwCurrent:c,fdTaskCpActualSrc:l,fdTaskCpSrc:f,fdLog:d,funDownload:p,funGetCurrent:h,funRemove:v,funAdd:y,funModify:m,timeToleranceRemove:g};return await Jn(j)}});
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("fs"),require("path"),require("crypto"),require("events"),require("chokidar"),require("url"),require("pino"),require("sharp")):"function"==typeof define&&define.amd?define(["fs","path","crypto","events","chokidar","url","pino","sharp"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["w-dwdata-tweq"]=t(e.fs,e.path,e.crypto,e.events,e.chokidar,e.url,e.pino,e.sharp)}(this,function(e,t,r,n,o,i,a,s){"use strict";var c="undefined"!=typeof document?document.currentScript:null,u=Array.isArray,l="object"==typeof global&&global&&global.Object===Object&&global,f="object"==typeof self&&self&&self.Object===Object&&self,d=l||f||Function("return this")(),p=d.Symbol,h=Object.prototype,y=h.hasOwnProperty,m=h.toString,v=p?p.toStringTag:void 0;var g=Object.prototype.toString;var w=p?p.toStringTag:void 0;function b(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":w&&w in Object(e)?function(e){var t=y.call(e,v),r=e[v];try{e[v]=void 0;var n=!0}catch(e){}var o=m.call(e);return n&&(t?e[v]=r:delete e[v]),o}(e):function(e){return g.call(e)}(e)}function S(e){return null!=e&&"object"==typeof e}function _(e){return"symbol"==typeof e||S(e)&&"[object Symbol]"==b(e)}var O=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E=/^\w*$/;function j(e,t){if(u(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!_(e))||(E.test(e)||!O.test(e)||null!=t&&e in Object(t))}function R(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function x(e){if(!R(e))return!1;var t=b(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var A,T=d["__core-js_shared__"],C=(A=/[^.]+$/.exec(T&&T.keys&&T.keys.IE_PROTO||""))?"Symbol(src)_1."+A:"";var k=Function.prototype.toString;function $(e){if(null!=e){try{return k.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var D=/^\[object .+?Constructor\]$/,P=Function.prototype,N=Object.prototype,F=P.toString,M=N.hasOwnProperty,L=RegExp("^"+F.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function B(e){return!(!R(e)||(t=e,C&&C in t))&&(x(e)?L:D).test($(e));var t}function U(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return B(r)?r:void 0}var I=U(Object,"create");var q=Object.prototype.hasOwnProperty;var z=Object.prototype.hasOwnProperty;function H(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function Y(e,t){return e===t||e!=e&&t!=t}function W(e,t){for(var r=e.length;r--;)if(Y(e[r][0],t))return r;return-1}H.prototype.clear=function(){this.__data__=I?I(null):{},this.size=0},H.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},H.prototype.get=function(e){var t=this.__data__;if(I){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return q.call(t,e)?t[e]:void 0},H.prototype.has=function(e){var t=this.__data__;return I?void 0!==t[e]:z.call(t,e)},H.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=I&&void 0===t?"__lodash_hash_undefined__":t,this};var J=Array.prototype.splice;function V(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}V.prototype.clear=function(){this.__data__=[],this.size=0},V.prototype.delete=function(e){var t=this.__data__,r=W(t,e);return!(r<0)&&(r==t.length-1?t.pop():J.call(t,r,1),--this.size,!0)},V.prototype.get=function(e){var t=this.__data__,r=W(t,e);return r<0?void 0:t[r][1]},V.prototype.has=function(e){return W(this.__data__,e)>-1},V.prototype.set=function(e,t){var r=this.__data__,n=W(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this};var K=U(d,"Map");function G(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function Z(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Z.prototype.clear=function(){this.size=0,this.__data__={hash:new H,map:new(K||V),string:new H}},Z.prototype.delete=function(e){var t=G(this,e).delete(e);return this.size-=t?1:0,t},Z.prototype.get=function(e){return G(this,e).get(e)},Z.prototype.has=function(e){return G(this,e).has(e)},Z.prototype.set=function(e,t){var r=G(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function X(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(X.Cache||Z),r}X.Cache=Z;var Q,ee,te,re=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ne=/\\(\\)?/g,oe=(Q=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(re,function(e,r,n,o){t.push(n?o.replace(ne,"$1"):r||e)}),t},ee=X(Q,function(e){return 500===te.size&&te.clear(),e}),te=ee.cache,ee),ie=oe;function ae(e,t){for(var r=-1,n=null==e?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var se=p?p.prototype:void 0,ce=se?se.toString:void 0;function ue(e){if("string"==typeof e)return e;if(u(e))return ae(e,ue)+"";if(_(e))return ce?ce.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function le(e){return null==e?"":ue(e)}function fe(e,t){return u(e)?e:j(e,t)?[e]:ie(le(e))}function de(e){if("string"==typeof e||_(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function pe(e,t){for(var r=0,n=(t=fe(t,e)).length;null!=e&&r<n;)e=e[de(t[r++])];return r&&r==n?e:void 0}function he(e,t,r){var n=null==e?void 0:pe(e,t);return void 0===n?r:n}function ye(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var me,ve=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),a=i.length;a--;){var s=i[me?a:++n];if(!1===t(o[s],s,o))break}return e};function ge(e){return S(e)&&"[object Arguments]"==b(e)}var we=Object.prototype,be=we.hasOwnProperty,Se=we.propertyIsEnumerable,_e=ge(function(){return arguments}())?ge:function(e){return S(e)&&be.call(e,"callee")&&!Se.call(e,"callee")},Oe=_e;var Ee="object"==typeof exports&&exports&&!exports.nodeType&&exports,je=Ee&&"object"==typeof module&&module&&!module.nodeType&&module,Re=je&&je.exports===Ee?d.Buffer:void 0,xe=(Re?Re.isBuffer:void 0)||function(){return!1},Ae=/^(?:0|[1-9]\d*)$/;function Te(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Ae.test(e))&&e>-1&&e%1==0&&e<t}function Ce(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var ke={};ke["[object Float32Array]"]=ke["[object Float64Array]"]=ke["[object Int8Array]"]=ke["[object Int16Array]"]=ke["[object Int32Array]"]=ke["[object Uint8Array]"]=ke["[object Uint8ClampedArray]"]=ke["[object Uint16Array]"]=ke["[object Uint32Array]"]=!0,ke["[object Arguments]"]=ke["[object Array]"]=ke["[object ArrayBuffer]"]=ke["[object Boolean]"]=ke["[object DataView]"]=ke["[object Date]"]=ke["[object Error]"]=ke["[object Function]"]=ke["[object Map]"]=ke["[object Number]"]=ke["[object Object]"]=ke["[object RegExp]"]=ke["[object Set]"]=ke["[object String]"]=ke["[object WeakMap]"]=!1;var $e="object"==typeof exports&&exports&&!exports.nodeType&&exports,De=$e&&"object"==typeof module&&module&&!module.nodeType&&module,Pe=De&&De.exports===$e&&l.process,Ne=function(){try{var e=De&&De.require&&De.require("util").types;return e||Pe&&Pe.binding&&Pe.binding("util")}catch(e){}}(),Fe=Ne&&Ne.isTypedArray,Me=Fe?function(e){return function(t){return e(t)}}(Fe):function(e){return S(e)&&Ce(e.length)&&!!ke[b(e)]},Le=Me,Be=Object.prototype.hasOwnProperty;function Ue(e,t){var r=u(e),n=!r&&Oe(e),o=!r&&!n&&xe(e),i=!r&&!n&&!o&&Le(e),a=r||n||o||i,s=a?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],c=s.length;for(var l in e)!t&&!Be.call(e,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Te(l,c))||s.push(l);return s}var Ie=Object.prototype;function qe(e,t){return function(r){return e(t(r))}}var ze=qe(Object.keys,Object),He=Object.prototype.hasOwnProperty;function Ye(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||Ie))return ze(e);var t,r,n=[];for(var o in Object(e))He.call(e,o)&&"constructor"!=o&&n.push(o);return n}function We(e){return null!=e&&Ce(e.length)&&!x(e)}function Je(e){return We(e)?Ue(e):Ye(e)}var Ve=function(e,t){return function(r,n){if(null==r)return r;if(!We(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Object(r);(t?i--:++i<o)&&!1!==n(a[i],i,a););return r}}(function(e,t){return e&&ve(e,t,Je)}),Ke=Ve;function Ge(e){return e}function Ze(e,t){var r;return(u(e)?ye:Ke)(e,"function"==typeof(r=t)?r:Ge)}var Xe=Array.prototype.reverse;function Qe(e){return"[object String]"===Object.prototype.toString.call(e)}function et(e){return!(!Qe(e)||""===e)}function tt(e){let t=!1;if(et(e))t=!isNaN(Number(e));else if(function(e){return"[object Number]"===Object.prototype.toString.call(e)}(e)){if(function(e){return e!=e}(e))return!1;t=!0}return t}var rt=/\s/;var nt=/^\s+/;function ot(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&rt.test(e.charAt(t)););return t}(e)+1).replace(nt,""):e}var it=/^[-+]0x[0-9a-f]+$/i,at=/^0b[01]+$/i,st=/^0o[0-7]+$/i,ct=parseInt;function ut(e){if("number"==typeof e)return e;if(_(e))return NaN;if(R(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=R(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ot(e);var r=at.test(e);return r||st.test(e)?ct(e.slice(2),r?2:8):it.test(e)?NaN:+e}var lt=1/0;function ft(e){return e?(e=ut(e))===lt||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function dt(e){var t=ft(e),r=t%1;return t==t?r?t-r:t:0}function pt(e){if(!tt(e))return 0;return ft(e)}function ht(e){return!!tt(e)&&(e=pt(e),"number"==typeof(t=e)&&t==dt(t));var t}var yt=d.isFinite,mt=Math.min;var vt=function(e){var t=Math[e];return function(e,r){if(e=ut(e),(r=null==r?0:mt(dt(r),292))&&yt(e)){var n=(le(e)+"e").split("e");return+((n=(le(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}("round"),gt=vt;function wt(e){if(!tt(e))return 0;e=pt(e);let t=gt(e);return"0"===String(t)?0:t}function bt(e){if(!ht(e))return!1;return wt(e)>=0}function St(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t}function _t(e,t={}){let r=he(t,"fs");if(!r.existsSync(e))return!1;let n=r.lstatSync(e);return!n.isFile()&&!n.isSymbolicLink()}function Ot(t){return _t(t,{fs:e})}function Et(e,t={}){let r=he(t,"fs");if(_t(e,{fs:r}))return{success:"input folder is already exists: "+e};if(r.existsSync(e))return{error:"input path already exists: "+e};try{r.mkdirSync(e,{recursive:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function jt(r){return function(e,t={}){let r=he(t,"path"),n=he(t,"fs");if(!n.existsSync(e)){let t=Et(e,{fs:n});return t.error?t.error:{success:"done: "+e}}if(!_t(e,{fs:n}))return{error:"input path is not a folder"};try{let t=n.readdirSync(e);for(let o of t){let t=r.join(e,o);n.statSync(t).isDirectory()?n.rmSync(t,{recursive:!0,force:!0}):n.unlinkSync(t)}}catch(e){return{error:e}}return{success:"done: "+e}}(r,{path:t,fs:e})}function Rt(t){return Et(t,{fs:e})}function xt(e,t={}){let r=he(t,"fs");if(!r.existsSync(e))return{success:"folder does not exist: "+e};if(!_t(e,{fs:r}))return{error:"input path is not a folder: "+e};try{r.rmSync(e,{recursive:!0,force:!0})}catch(e){return{error:e}}return{success:"done: "+e}}function At(e){if(!ht(e))return!1;return wt(e)>0}function Tt(e,t=1,r={}){let n=1,o=he(r,"path"),i=he(r,"fs");if(!_t(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);return null!==t&&At(t)&&(t=wt(t))<1&&(t=1),function e(r){let a=[];return _t(r,{fs:i})?(Ze(i.readdirSync(r),function(s){let c=o.resolve(r,s),u=null;try{u=i.statSync(c)}catch(e){}u&&u.isDirectory()?(a.push({isFolder:!0,level:n,path:c,name:o.basename(c)}),n+=1,(n<=t||null===t)&&(a=a.concat(e(c))),n-=1):a.push({isFolder:!1,level:n,path:c,name:o.basename(c)})}),a):a}(e)}function Ct(r,n=1){return Tt(r,n,{path:t,fs:e})}function kt(e){let t,r=Object.prototype.toString.call(e);if(t="[object Promise]"===r,t)return!0;if("[object Function]"!==r)return!1;try{t="function"!=typeof e.subscribe&&"function"==typeof e.then}catch(e){}return t}function $t(e){var t=this.__data__=new V(e);this.size=t.size}$t.prototype.clear=function(){this.__data__=new V,this.size=0},$t.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},$t.prototype.get=function(e){return this.__data__.get(e)},$t.prototype.has=function(e){return this.__data__.has(e)},$t.prototype.set=function(e,t){var r=this.__data__;if(r instanceof V){var n=r.__data__;if(!K||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Z(n)}return r.set(e,t),this.size=r.size,this};function Dt(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Z;++t<r;)this.add(e[t])}function Pt(e,t){for(var r=-1,n=null==e?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}function Nt(e,t){return e.has(t)}Dt.prototype.add=Dt.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Dt.prototype.has=function(e){return this.__data__.has(e)};function Ft(e,t,r,n,o,i){var a=1&r,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var f=-1,d=!0,p=2&r?new Dt:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var h=e[f],y=t[f];if(n)var m=a?n(y,h,f,t,e,i):n(h,y,f,e,t,i);if(void 0!==m){if(m)continue;d=!1;break}if(p){if(!Pt(t,function(e,t){if(!Nt(p,t)&&(h===e||o(h,e,r,n,i)))return p.push(t)})){d=!1;break}}else if(h!==y&&!o(h,y,r,n,i)){d=!1;break}}return i.delete(e),i.delete(t),d}var Mt=d.Uint8Array;function Lt(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Bt(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Ut=p?p.prototype:void 0,It=Ut?Ut.valueOf:void 0;function qt(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}var zt=Object.prototype.propertyIsEnumerable,Ht=Object.getOwnPropertySymbols,Yt=Ht?function(e){return null==e?[]:(e=Object(e),qt(Ht(e),function(t){return zt.call(e,t)}))}:function(){return[]};function Wt(e){return function(e,t,r){var n=t(e);return u(e)?n:function(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}(n,r(e))}(e,Je,Yt)}var Jt=Object.prototype.hasOwnProperty;var Vt=U(d,"DataView"),Kt=U(d,"Promise"),Gt=U(d,"Set"),Zt=U(d,"WeakMap"),Xt="[object Map]",Qt="[object Promise]",er="[object Set]",tr="[object WeakMap]",rr="[object DataView]",nr=$(Vt),or=$(K),ir=$(Kt),ar=$(Gt),sr=$(Zt),cr=b;(Vt&&cr(new Vt(new ArrayBuffer(1)))!=rr||K&&cr(new K)!=Xt||Kt&&cr(Kt.resolve())!=Qt||Gt&&cr(new Gt)!=er||Zt&&cr(new Zt)!=tr)&&(cr=function(e){var t=b(e),r="[object Object]"==t?e.constructor:void 0,n=r?$(r):"";if(n)switch(n){case nr:return rr;case or:return Xt;case ir:return Qt;case ar:return er;case sr:return tr}return t});var ur=cr,lr="[object Arguments]",fr="[object Array]",dr="[object Object]",pr=Object.prototype.hasOwnProperty;function hr(e,t,r,n,o,i){var a=u(e),s=u(t),c=a?fr:ur(e),l=s?fr:ur(t),f=(c=c==lr?dr:c)==dr,d=(l=l==lr?dr:l)==dr,p=c==l;if(p&&xe(e)){if(!xe(t))return!1;a=!0,f=!1}if(p&&!f)return i||(i=new $t),a||Le(e)?Ft(e,t,r,n,o,i):function(e,t,r,n,o,i,a){switch(r){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!i(new Mt(e),new Mt(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Y(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var s=Lt;case"[object Set]":var c=1&n;if(s||(s=Bt),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=2,a.set(e,t);var l=Ft(s(e),s(t),n,o,i,a);return a.delete(e),l;case"[object Symbol]":if(It)return It.call(e)==It.call(t)}return!1}(e,t,c,r,n,o,i);if(!(1&r)){var h=f&&pr.call(e,"__wrapped__"),y=d&&pr.call(t,"__wrapped__");if(h||y){var m=h?e.value():e,v=y?t.value():t;return i||(i=new $t),o(m,v,r,n,i)}}return!!p&&(i||(i=new $t),function(e,t,r,n,o,i){var a=1&r,s=Wt(e),c=s.length;if(c!=Wt(t).length&&!a)return!1;for(var u=c;u--;){var l=s[u];if(!(a?l in t:Jt.call(t,l)))return!1}var f=i.get(e),d=i.get(t);if(f&&d)return f==t&&d==e;var p=!0;i.set(e,t),i.set(t,e);for(var h=a;++u<c;){var y=e[l=s[u]],m=t[l];if(n)var v=a?n(m,y,l,t,e,i):n(y,m,l,e,t,i);if(!(void 0===v?y===m||o(y,m,r,n,i):v)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var g=e.constructor,w=t.constructor;g==w||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof w&&w instanceof w||(p=!1)}return i.delete(e),i.delete(t),p}(e,t,r,n,o,i))}function yr(e,t,r,n,o){return e===t||(null==e||null==t||!S(e)&&!S(t)?e!=e&&t!=t:hr(e,t,r,n,yr,o))}function mr(e){return e==e&&!R(e)}function vr(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}function gr(e){var t=function(e){for(var t=Je(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,mr(o)]}return t}(e);return 1==t.length&&t[0][2]?vr(t[0][0],t[0][1]):function(r){return r===e||function(e,t,r,n){var o=r.length,i=o,a=!n;if(null==e)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){var c=(s=r[o])[0],u=e[c],l=s[1];if(a&&s[2]){if(void 0===u&&!(c in e))return!1}else{var f=new $t;if(n)var d=n(u,l,c,e,t,f);if(!(void 0===d?yr(l,u,3,n,f):d))return!1}}return!0}(r,e,t)}}function wr(e,t){return null!=e&&t in Object(e)}function br(e,t){return null!=e&&function(e,t,r){for(var n=-1,o=(t=fe(t,e)).length,i=!1;++n<o;){var a=de(t[n]);if(!(i=null!=e&&r(e,a)))break;e=e[a]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Ce(o)&&Te(a,o)&&(u(e)||Oe(e))}(e,t,wr)}function Sr(e){return function(t){return null==t?void 0:t[e]}}function _r(e){return j(e)?Sr(de(e)):function(e){return function(t){return pe(t,e)}}(e)}function Or(e){return"function"==typeof e?e:null==e?Ge:"object"==typeof e?u(e)?function(e,t){return j(e)&&mr(t)?vr(de(e),t):function(r){var n=he(r,e);return void 0===n&&n===t?br(r,e):yr(t,n,3)}}(e[0],e[1]):gr(e):_r(e)}function Er(e,t){var r=-1,n=We(e)?Array(e.length):[];return Ke(e,function(e,o,i){n[++r]=t(e,o,i)}),n}function jr(e,t){return(u(e)?ae:Er)(e,Or(t))}function Rr(e,t){return et(e)&&bt(t)?0===(t=wt(t))?e:function(e,t){if(!et(e))return"";if(!bt(t))return"";if(0===(t=wt(t)))return"";let r=e.length-t;return r<0&&(r=0),e.substring(r,r+t)}(e,e.length-t):""}function xr(e,t){var r=[];return Ke(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function Ar(e,t){return(u(e)?qt:xr)(e,Or(t))}function Tr(e){return"[object Array]"===Object.prototype.toString.call(e)}function Cr(e){return!0===(t=e)||!1===t||S(t)&&"[object Boolean]"==b(t);var t}function kr(e){return"[object Object]"===Object.prototype.toString.call(e)}function $r(e,t){return!!kr(e)&&(!(!et(t)&&!tt(t))&&t in e)}function Dr(e,t,r,n={}){let o=he(n,"withInfor");Cr(o)||(o=!0);let i={del:[],add:[],same:[],diff:[]};if(!et(r))return console.log("invalid key"),o&&(i.infor={}),i;Tr(e)||(e=[e]),Tr(t)||(t=[t]),e=Ar(e,e=>$r(e,r)),t=Ar(t,e=>$r(e,r));let a=new Map(t.map(e=>[e[r],e]));for(let t of e){let e=a.get(t[r]);if(e){JSON.stringify(t)===JSON.stringify(e)?i.same.push(e):i.diff.push(e),a.delete(t[r])}else i.del.push(t)}if(i.add=Array.from(a.values()),o){let e={};for(let t of i.del)e[t[r]]="del";for(let t of i.add)e[t[r]]="add";for(let t of i.diff)e[t[r]]="diff";for(let t of i.same)e[t[r]]="same";i.infor=e}return i}function Pr(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(r=r>o?o:r)<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}function Nr(){let e,t,r=new Promise(function(){e=arguments[0],t=arguments[1]});return r.resolve=e,r.reject=t,r}function Fr(e,t){let r=Nr();if(!Tr(e)&&!kr(e))return r.reject("rs is not an array or object"),r;let n=!1;if(kr(e)){n=!0;let t=[];Ze(e,(e,r)=>{t.push({k:r,v:e})}),e=t}St(t)||(t=function(e){return e});let o=-1,i=[];return e.reduce(function(e,r){return e.then(function(e){i.push(e),o+=1;let a=o,s=r;return n&&(a=r.k,s=r.v),St(t)?t(s,a):s})},Promise.resolve()).then(function(e){var t,n,o,a;i.push(e),a=null==(t=i)?0:t.length,i=a?Pr(t,(n=o||void 0===n?1:dt(n))<0?0:n,a):[],r.resolve(i)}).catch(function(e){r.reject(e)}),r}function Mr(e,t={}){let r=he(t,"fs");return!!r.existsSync(e)&&(!r.lstatSync(e).isDirectory()&&!r.lstatSync(e).isSymbolicLink())}function Lr(e,t,r={}){let n=he(r,"path"),o=he(r,"fs"),i=he(r,"useSync","");Cr(i)||(i=!0);let a="";return a=i?function(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!Mr(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};try{Et(n.dirname(t),{fs:o}),o.copyFileSync(e,t)}catch(e){return{error:e}}return{success:"done: "+t}}(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!Mr(e,{fs:o}))return{error:`fpSrc[${e}] is not a file`};let i=null;return await(async(e,t)=>{Et(n.dirname(t),{fs:o}),await new Promise((r,n)=>{let i=o.createReadStream(e),a=o.createWriteStream(t);i.on("error",n),a.on("error",n),a.on("finish",r),i.pipe(a)})})(e,t).then(()=>{i={success:"done: "+t}}).catch(e=>{i={error:e}}),i}(e,t,{path:n,fs:o}),a}function Br(e,t={}){let r=he(t,"fs");if(!r.existsSync(e))return{success:"file does not exist: "+e};if(!Mr(e,{fs:r}))return{error:"input path is not a file: "+e};try{r.unlinkSync(e)}catch(e){return{error:e}}return{success:"done: "+e}}function Ur(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!_t(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};try{o.readdirSync(e).forEach(function(r){let i=n.resolve(e,r),a=n.resolve(t,r),s=o.lstatSync(i);if(s.isDirectory())Et(a,{fs:o}),Ur(i,a,{path:n,fs:o});else if(s.isSymbolicLink()){let e=o.readlinkSync(i);o.symlinkSync(e,a)}else Et(n.dirname(a),{fs:o}),o.copyFileSync(i,a)})}catch(e){return{error:e}}return{success:"done: "+t}}function Ir(e,t,r={}){let n=he(r,"path"),o=he(r,"fs"),i=he(r,"useSync","");Cr(i)||(i=!0);let a="";return a=i?Ur(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=he(r,"path"),o=he(r,"fs");if(!_t(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};let i=async(e,t)=>{let r=o.readdirSync(e);for(let a of r){let r=n.join(e,a),s=n.join(t,a),c=o.lstatSync(r);if(c.isDirectory())Et(s,{fs:o}),await i(r,s);else if(c.isSymbolicLink()){let e=o.readlinkSync(r);o.symlinkSync(e,s)}else Et(n.dirname(s),{fs:o}),await new Promise((e,t)=>{let n=o.createReadStream(r),i=o.createWriteStream(s);n.on("error",t),i.on("error",t),i.on("finish",e),n.pipe(i)})}},a=null;return await i(e,t).then(()=>{a={success:"done: "+t}}).catch(e=>{a={error:e}}),a}(e,t,{path:n,fs:o}),a}function qr(e,t={}){let r=he(t,"fs"),n=he(t,"crypto"),o=he(t,"type","");et(o)||(o="sha512");let i=Nr();if(!Mr(e,{fs:r}))return i.reject(`fp[${e}] is not a file`),i;try{let t=n.createHash(o),a=r.createReadStream(e);a.on("readable",()=>{let e=a.read();e?t.update(e):i.resolve(t.digest("hex"))}),a.on("error",e=>{i.reject(e.toString())})}catch(e){i.reject(e.toString())}return i}var zr=Array.prototype.join;function Hr(e,t){return null==e?"":zr.call(e,t)}async function Yr(e,t=1,r={}){let n=he(r,"path"),o=he(r,"fs"),i=he(r,"crypto"),a=he(r,"type","");et(a)||(a="md5");let s=he(r,"forFile",null);Cr(s)||(s=!0);let c=he(r,"forFolder",null);if(Cr(c)||(c=!1),!_t(e,{fs:o}))throw new Error(`fd[${e}] is not a folder`);let u=Tt(e,t,{path:n,fs:o});return u=await Fr(u,async e=>{let t="";return s&&!e.isFolder&&(t=await qr(e.path,{fs:o,crypto:i,type:a})),c&&e.isFolder&&(t=await async function(e,t={}){let r=he(t,"path"),n=he(t,"fs"),o=he(t,"crypto"),i=he(t,"type","");et(i)||(i="md5");let a=[],s=Tt(e,null,{path:r,fs:n});return await Fr(s,async e=>{if(e.isFolder)return;let t=await qr(e.path,{fs:n,crypto:o,type:i});a.push(t)}),Hr(a,"|")}(e.path,{path:n,fs:o,crypto:i,type:a})),e.hash=t,e}),u}async function Wr(e,t,r={}){let n=he(r,"path"),o=he(r,"fs"),i=he(r,"crypto"),a=he(r,"type","");if(et(a)||(a="md5"),!_t(e,{fs:o}))throw new Error(`fdSrc[${e}] is not a folder`);if(!_t(t,{fs:o}))return void await Ir(e,t,{path:n,fs:o,useSync:!1});let s=n.sep,c=n.sep.length,u=(e,t)=>{let r=e.isFolder?"folder":"file",n=e.path.replace(t,"");var o,i;return i=c,(et(o=n)&&bt(i)?0===(i=wt(i))?"":o.substring(0,i):"")===s&&(n=Rr(n,c)),n=n.replaceAll("\\","/"),{id:`${r}|${n}`,isFolder:e.isFolder,name:e.name,rpath:n,hash:e.hash}},l=(e,t)=>e=jr(e,e=>u(e,t)),f=await Yr(e,null,{path:n,fs:o,crypto:i,type:a,forFile:!0,forFolder:!1});f=l(f,n.resolve(e));let d=await Yr(t,null,{path:n,fs:o,crypto:i,type:a,forFile:!0,forFolder:!1});d=l(d,n.resolve(t));let p=Dr(d,f,"id",{withInfor:!1});await Fr(p.del,async e=>{if(e.isFolder){xt(n.resolve(t,e.rpath),{fs:o})}}),await Fr(p.del,async e=>{if(!e.isFolder){Br(n.resolve(t,e.rpath),{fs:o})}}),await Fr([...p.add,...p.diff],async r=>{if(!r.isFolder){let i=n.resolve(e,r.rpath),a=n.resolve(t,r.rpath);await Lr(i,a,{path:n,fs:o,useSync:!1})}})}var Jr=Sr("length"),Vr=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Kr(e){return Vr.test(e)}var Gr="\\ud800-\\udfff",Zr="["+Gr+"]",Xr="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Qr="\\ud83c[\\udffb-\\udfff]",en="[^"+Gr+"]",tn="(?:\\ud83c[\\udde6-\\uddff]){2}",rn="[\\ud800-\\udbff][\\udc00-\\udfff]",nn="(?:"+Xr+"|"+Qr+")"+"?",on="[\\ufe0e\\ufe0f]?",an=on+nn+("(?:\\u200d(?:"+[en,tn,rn].join("|")+")"+on+nn+")*"),sn="(?:"+[en+Xr+"?",Xr,tn,rn,Zr].join("|")+")",cn=RegExp(Qr+"(?="+Qr+")|"+sn+an,"g");function un(e){return Kr(e)?function(e){for(var t=cn.lastIndex=0;cn.test(e);)++t;return t}(e):Jr(e)}function ln(e){if(null==e)return 0;if(We(e))return"string"==typeof(t=e)||!u(t)&&S(t)&&"[object String]"==b(t)?un(e):e.length;var t,r=ur(e);return"[object Map]"==r||"[object Set]"==r?e.size:Ye(e).length}function fn(e){if(kr(e)){for(let t in e)return!0;return!1}return!1}var dn="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function pn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function hn(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){if(this instanceof e){var r=[null];return r.push.apply(r,arguments),new(Function.bind.apply(t,r))}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var yn={exports:{}};var mn,vn={exports:{}},gn=hn(Object.freeze({__proto__:null,default:{}}));function wn(){return mn||(mn=1,function(e){var t;e.exports=(t=t||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==dn&&dn.crypto&&(r=dn.crypto),!r)try{r=gn}catch(e){}var n=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},o=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),i={},a=i.lib={},s=a.Base={extend:function(e){var t=o(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},c=a.WordArray=s.extend({init:function(e,r){e=this.words=e||[],this.sigBytes=r!=t?r:4*e.length},toString:function(e){return(e||l).stringify(this)},concat:function(e){var t=this.words,r=e.words,n=this.sigBytes,o=e.sigBytes;if(this.clamp(),n%4)for(var i=0;i<o;i++){var a=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=a<<24-(n+i)%4*8}else for(var s=0;s<o;s+=4)t[n+s>>>2]=r[s>>>2];return this.sigBytes+=o,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=s.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r<e;r+=4)t.push(n());return new c.init(t,e)}}),u=i.enc={},l=u.Hex={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push((i>>>4).toString(16)),n.push((15&i).toString(16))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n+=2)r[n>>>3]|=parseInt(e.substr(n,2),16)<<24-n%8*4;return new c.init(r,t/2)}},f=u.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,n=[],o=0;o<r;o++){var i=t[o>>>2]>>>24-o%4*8&255;n.push(String.fromCharCode(i))}return n.join("")},parse:function(e){for(var t=e.length,r=[],n=0;n<t;n++)r[n>>>2]|=(255&e.charCodeAt(n))<<24-n%4*8;return new c.init(r,t)}},d=u.Utf8={stringify:function(e){try{return decodeURIComponent(escape(f.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return f.parse(unescape(encodeURIComponent(e)))}},p=a.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new c.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=d.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,n=this._data,o=n.words,i=n.sigBytes,a=this.blockSize,s=i/(4*a),u=(s=t?e.ceil(s):e.max((0|s)-this._minBufferSize,0))*a,l=e.min(4*u,i);if(u){for(var f=0;f<u;f+=a)this._doProcessBlock(o,f);r=o.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=s.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});a.Hasher=p.extend({cfg:s.extend(),init:function(e){this.cfg=this.cfg.extend(e),this.reset()},reset:function(){p.reset.call(this),this._doReset()},update:function(e){return this._append(e),this._process(),this},finalize:function(e){return e&&this._append(e),this._doFinalize()},blockSize:16,_createHelper:function(e){return function(t,r){return new e.init(r).finalize(t)}},_createHmacHelper:function(e){return function(t,r){return new h.HMAC.init(e,r).finalize(t)}}});var h=i.algo={};return i}(Math),t)}(vn)),vn.exports}!function(e){e.exports=wn().enc.Utf8}(yn);var bn=pn(yn.exports),Sn={exports:{}};!function(e){var t;e.exports=(t=wn(),function(){var e=t,r=e.lib.WordArray;function n(e,t,n){for(var o=[],i=0,a=0;a<t;a++)if(a%4){var s=n[e.charCodeAt(a-1)]<<a%4*2|n[e.charCodeAt(a)]>>>6-a%4*2;o[i>>>2]|=s<<24-i%4*8,i++}return r.create(o,i)}e.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,n=this._map;e.clamp();for(var o=[],i=0;i<r;i+=3)for(var a=(t[i>>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,s=0;s<4&&i+.75*s<r;s++)o.push(n.charAt(a>>>6*(3-s)&63));var c=n.charAt(64);if(c)for(;o.length%4;)o.push(c);return o.join("")},parse:function(e){var t=e.length,r=this._map,o=this._reverseMap;if(!o){o=this._reverseMap=[];for(var i=0;i<r.length;i++)o[r.charCodeAt(i)]=i}var a=r.charAt(64);if(a){var s=e.indexOf(a);-1!==s&&(t=s)}return n(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(Sn);var _n=pn(Sn.exports);function On(e){if(!et(e))return"";let t=bn.parse(e);return _n.stringify(t)}var En={exports:{}};!function(e){e.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",s="day",c="week",u="month",l="quarter",f="year",d="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|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,m={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(e){var t=["th","st","nd","rd"],r=e%100;return"["+e+(t[(r-20)%10]||t[r]||t[0])+"]"}},v=function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},g={s:v,z:function(e){var t=-e.utcOffset(),r=Math.abs(t),n=Math.floor(r/60),o=r%60;return(t<=0?"+":"-")+v(n,2,"0")+":"+v(o,2,"0")},m:function e(t,r){if(t.date()<r.date())return-e(r,t);var n=12*(r.year()-t.year())+(r.month()-t.month()),o=t.clone().add(n,u),i=r-o<0,a=t.clone().add(n+(i?-1:1),u);return+(-(n+(r-o)/(i?o-a:a-o))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:u,y:f,w:c,d:s,D:d,h:a,m:i,s:o,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},w="en",b={};b[w]=m;var S="$isDayjsObject",_=function(e){return e instanceof R||!(!e||!e[S])},O=function e(t,r,n){var o;if(!t)return w;if("string"==typeof t){var i=t.toLowerCase();b[i]&&(o=i),r&&(b[i]=r,o=i);var a=t.split("-");if(!o&&a.length>1)return e(a[0])}else{var s=t.name;b[s]=t,o=s}return!n&&o&&(w=o),o||!n&&w},E=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new R(r)},j=g;j.l=O,j.i=_,j.w=function(e,t){return E(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var R=function(){function m(e){this.$L=O(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[S]=!0}var v=m.prototype;return v.parse=function(e){this.$d=function(e){var t=e.date,r=e.utc;if(null===t)return new Date(NaN);if(j.u(t))return new Date;if(t instanceof Date)return new Date(t);if("string"==typeof t&&!/Z$/i.test(t)){var n=t.match(h);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(t)}(e),this.init()},v.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},v.$utils=function(){return j},v.isValid=function(){return!(this.$d.toString()===p)},v.isSame=function(e,t){var r=E(e);return this.startOf(t)<=r&&r<=this.endOf(t)},v.isAfter=function(e,t){return E(e)<this.startOf(t)},v.isBefore=function(e,t){return this.endOf(t)<E(e)},v.$g=function(e,t,r){return j.u(e)?this[t]:this.set(r,e)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(e,t){var r=this,n=!!j.u(t)||t,l=j.p(e),p=function(e,t){var o=j.w(r.$u?Date.UTC(r.$y,t,e):new Date(r.$y,t,e),r);return n?o:o.endOf(s)},h=function(e,t){return j.w(r.toDate()[e].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(t)),r)},y=this.$W,m=this.$M,v=this.$D,g="set"+(this.$u?"UTC":"");switch(l){case f:return n?p(1,0):p(31,11);case u:return n?p(1,m):p(0,m+1);case c:var w=this.$locale().weekStart||0,b=(y<w?y+7:y)-w;return p(n?v-b:v+(6-b),m);case s:case d:return h(g+"Hours",0);case a:return h(g+"Minutes",1);case i:return h(g+"Seconds",2);case o:return h(g+"Milliseconds",3);default:return this.clone()}},v.endOf=function(e){return this.startOf(e,!1)},v.$set=function(e,t){var r,c=j.p(e),l="set"+(this.$u?"UTC":""),p=(r={},r[s]=l+"Date",r[d]=l+"Date",r[u]=l+"Month",r[f]=l+"FullYear",r[a]=l+"Hours",r[i]=l+"Minutes",r[o]=l+"Seconds",r[n]=l+"Milliseconds",r)[c],h=c===s?this.$D+(t-this.$W):t;if(c===u||c===f){var y=this.clone().set(d,1);y.$d[p](h),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},v.set=function(e,t){return this.clone().$set(e,t)},v.get=function(e){return this[j.p(e)]()},v.add=function(n,l){var d,p=this;n=Number(n);var h=j.p(l),y=function(e){var t=E(p);return j.w(t.date(t.date()+Math.round(e*n)),p)};if(h===u)return this.set(u,this.$M+n);if(h===f)return this.set(f,this.$y+n);if(h===s)return y(1);if(h===c)return y(7);var m=(d={},d[i]=t,d[a]=r,d[o]=e,d)[h]||1,v=this.$d.getTime()+n*m;return j.w(v,this)},v.subtract=function(e,t){return this.add(-1*e,t)},v.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=e||"YYYY-MM-DDTHH:mm:ssZ",o=j.z(this),i=this.$H,a=this.$m,s=this.$M,c=r.weekdays,u=r.months,l=r.meridiem,f=function(e,r,o,i){return e&&(e[r]||e(t,n))||o[r].slice(0,i)},d=function(e){return j.s(i%12||12,e,"0")},h=l||function(e,t,r){var n=e<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(y,function(e,n){return n||function(e){switch(e){case"YY":return String(t.$y).slice(-2);case"YYYY":return j.s(t.$y,4,"0");case"M":return s+1;case"MM":return j.s(s+1,2,"0");case"MMM":return f(r.monthsShort,s,u,3);case"MMMM":return f(u,s);case"D":return t.$D;case"DD":return j.s(t.$D,2,"0");case"d":return String(t.$W);case"dd":return f(r.weekdaysMin,t.$W,c,2);case"ddd":return f(r.weekdaysShort,t.$W,c,3);case"dddd":return c[t.$W];case"H":return String(i);case"HH":return j.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return h(i,a,!0);case"A":return h(i,a,!1);case"m":return String(a);case"mm":return j.s(a,2,"0");case"s":return String(t.$s);case"ss":return j.s(t.$s,2,"0");case"SSS":return j.s(t.$ms,3,"0");case"Z":return o}return null}(e)||o.replace(":","")})},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(n,d,p){var h,y=this,m=j.p(d),v=E(n),g=(v.utcOffset()-this.utcOffset())*t,w=this-v,b=function(){return j.m(y,v)};switch(m){case f:h=b()/12;break;case u:h=b();break;case l:h=b()/3;break;case c:h=(w-g)/6048e5;break;case s:h=(w-g)/864e5;break;case a:h=w/r;break;case i:h=w/t;break;case o:h=w/e;break;default:h=w}return p?h:j.a(h)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return b[this.$L]},v.locale=function(e,t){if(!e)return this.$L;var r=this.clone(),n=O(e,t,!0);return n&&(r.$L=n),r},v.clone=function(){return j.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},m}(),x=R.prototype;return E.prototype=x,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",s],["$M",u],["$y",f],["$D",d]].forEach(function(e){x[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),E.extend=function(e,t){return e.$i||(e(t,R,E),e.$i=!0),E},E.locale=O,E.isDayjs=_,E.unix=function(e){return E(1e3*e)},E.en=b[w],E.Ls=b,E.p={},E}()}(En);var jn=pn(En.exports);function Rn(){if(!St(jn))throw new Error("invalid dayjs");return jn().format("YYYY-MM-DDTHH:mm:ssZ")}var xn={exports:{}};!function(e){var t=Object.prototype.hasOwnProperty,r="~";function n(){}function o(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function i(e,t,n,i,a){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,i||e,a),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],s]:e._events[c].push(s):(e._events[c]=s,e._eventsCount++),e}function a(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function s(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),s.prototype.eventNames=function(){var e,n,o=[];if(0===this._eventsCount)return o;for(n in e=this._events)t.call(e,n)&&o.push(r?n.slice(1):n);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},s.prototype.listeners=function(e){var t=r?r+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var o=0,i=n.length,a=new Array(i);o<i;o++)a[o]=n[o].fn;return a},s.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},s.prototype.emit=function(e,t,n,o,i,a){var s=r?r+e:e;if(!this._events[s])return!1;var c,u,l=this._events[s],f=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),f){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,n),!0;case 4:return l.fn.call(l.context,t,n,o),!0;case 5:return l.fn.call(l.context,t,n,o,i),!0;case 6:return l.fn.call(l.context,t,n,o,i,a),!0}for(u=1,c=new Array(f-1);u<f;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var d,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),f){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,n);break;case 4:l[u].fn.call(l[u].context,t,n,o);break;default:if(!c)for(d=1,c=new Array(f-1);d<f;d++)c[d-1]=arguments[d];l[u].fn.apply(l[u].context,c)}}return!0},s.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},s.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},s.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return a(this,i),this;var s=this._events[i];if(s.fn)s.fn!==t||o&&!s.once||n&&s.context!==n||a(this,i);else{for(var c=0,u=[],l=s.length;c<l;c++)(s[c].fn!==t||o&&!s[c].once||n&&s[c].context!==n)&&u.push(s[c]);u.length?this._events[i]=1===u.length?u[0]:u:a(this,i)}return this},s.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&a(this,t)):(this._events=new n,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=r,s.EventEmitter=s,e.exports=s}(xn);var An=pn(xn.exports);function Tn(){return new An}function Cn(e=10){tt(e)||(e=10);let t=Nr();return setTimeout(function(){t.resolve()},e),t}var kn=qe(Object.getPrototypeOf,Object),$n=Function.prototype,Dn=Object.prototype,Pn=$n.toString,Nn=Dn.hasOwnProperty,Fn=Pn.call(Object);function Mn(e){if(!S(e))return!1;var t=b(e);return"[object Error]"==t||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!function(e){if(!S(e)||"[object Object]"!=b(e))return!1;var t=kn(e);if(null===t)return!0;var r=Nn.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&Pn.call(r)==Fn}(e)}function Ln(e){let t="";if(Mn(e))t=e.message;else{if(Qe(e))return e;if(kr(e))return $r(e,"message")?e.message:JSON.stringify(e);if(Tr(e))return JSON.stringify(e);t=function(e){if(!et(e)&&!tt(e)&&!_(e))return"";let t="";try{t=String(e)}catch(e){}try{t=e.toString()}catch(e){}return t}(e)}return t}function Bn(t){return Mr(t,{fs:e})}function Un(e,t=!1){if(function(e){return"[object Undefined]"===Object.prototype.toString.call(e)}(e))return"";let r="";try{r=t?JSON.stringify(e,null,2):JSON.stringify(e)}catch(e){r=""}return r}function In(e=300){return new function(e){let t=[],r=null,n=null;return At(e)||(e=300),e=wt(e),function(o,...i){St(o)?(n=Date.now(),t.push({func:o,input:i}),null===r&&(r=setInterval(()=>{if(Date.now()-n>e){let e=t.pop();t=[],e.func(...e.input)}0===t.length&&(clearInterval(r),r=null)},10))):console.log("func is not a function")}}(e)}function qn(e,r={}){let i=he(r,"polling");Cr(i)||(i=!1);let a=he(r,"timeInterval");At(a)||(a=100),a=wt(a);let s=he(r,"timeBinaryInterval");At(s)||(s=300),s=wt(s);let c=new n.EventEmitter,u=e,l=null,f=setInterval(()=>{null===l&&Bn(u)&&(l=o.watch(u,{usePolling:i,interval:a,binaryInterval:s,awaitWriteFinish:!0}),l.on("all",(e,r,n)=>{r=t.resolve(r),c.emit("change",{type:e,fp:r,stats:n})}))},a);return c.clear=()=>{(()=>{if(null!==l){try{l.unwatch(u)}catch(e){console.log(e)}l.close().catch(e=>{console.log(e)}).finally(()=>{l=null})}})(),clearInterval(f)},c}function zn(t,r,n={}){Ot(t)||Rt(t),Ot(r)||Rt(r);let o=`${t}/fpHash.json`,i=`${r}/fpHash.json`,a=t=>{let r={};try{r=function(e){if(!et(e))return{};let t={};try{t=JSON.parse(e)}catch(e){t={}}return t}(e.readFileSync(t,"utf8"))}catch(e){}return r},s=(t,r)=>{try{let n=Un(r);e.writeFileSync(t,n,"utf8")}catch(e){}},c=(e,t)=>he(a(e),t,""),u=(e,t,r)=>{let n=a(e);n[t]=r,s(e,n)},l=(e,t)=>{let r=a(e);$r(r,t)&&delete r[t],s(e,r)},f=()=>a(o),d=e=>s(o,e),p=e=>c(o,e),h=()=>a(i),y=e=>s(i,e),m=e=>c(i,e),v=(e,t)=>u(i,e,t),g=e=>l(i,e),w=e=>{let t=[];return Ze(e,(e,r)=>{t.push({fp:r,hash:e})}),t};return{buildSrc:()=>{let e=Tn();return e.set=(t,r)=>{((e,t)=>{u(o,e,t)})(t,r),e.emit("set",{type:"set",fp:t,hash:r})},e.get=p,e.remove=t=>{(e=>{l(o,e)})(t),e.emit("remove",{type:"remove",fp:t})},e.readKp=f,e.writeKp=d,e},buildTar:()=>{let e=Tn(),t=In(300),r=qn(o);return r.on("change",r=>{t(()=>{(async()=>{let t=Nr(),r=f();if(!fn(r))return t.resolve("no src"),t;let n=h(),o=w(r),i=Dr(w(n),o,"fp",{withInfor:!1}),a=Nr();return a.then(e=>{y(r)}).catch(()=>{}),e.emit("change",{kpSrc:r,kpTar:n,kpCmp:i,pm:a}),t})().catch(()=>{})})}),e.set=v,e.get=m,e.remove=g,e.readKp=h,e.writeKp=y,e.clear=r.clear,e}}}let Hn=i.fileURLToPath("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(Hn).href:"undefined"==typeof document?location.href:c&&"SCRIPT"===c.tagName.toUpperCase()&&c.src||new URL("w-dwdata-tweq.umd.js",document.baseURI).href),Yn=t.dirname(Hn);let Wn=async(r={})=>{let n=he(r,"keyId");et(n)||(n="id");let o=he(r,"fdTagRemove");et(o)||(o="./_tagRemove");let i=he(r,"fdTaskCpActualSrc");et(i)||(i="./_taskCpActualSrc"),Ot(i)||Rt(i);let s=he(r,"fdTaskCpSrc");et(s)||(s="./_taskCpSrc"),Ot(s)||Rt(s);let c=he(r,"fdLog");et(c)||(c="./_logs"),Ot(c)||Rt(c);let u=he(r,"funGetNew");if(!St(u))throw new Error("invalid funGetNew");let l=he(r,"funGetCurrent");if(!St(l))throw new Error("invalid funGetCurrent");let f=he(r,"funAdd"),d=he(r,"funModify"),p=he(r,"funRemove"),h=he(r,"funAfterStart"),y=he(r,"funBeforeEnd"),m=he(r,"timeToleranceRemove");bt(m)||(m=0),m=pt(m),m>0&&!Ot(o)&&Rt(o);let v=he(r,"eventNameProcCallfunGetNew");et(v)||(v="proc-callfun-getNew");let g=he(r,"eventNameProcCallfunGetCurrent");et(g)||(g="proc-callfun-getCurrent");let w=he(r,"eventNameProcAddCallfunAdd");et(w)||(w="proc-add-callfun-add");let b=he(r,"eventNameProcDiffCallfunModify");et(b)||(b="proc-diff-callfun-modify");let S=he(r,"eventNameProcRemoveCallfunRemove");et(S)||(S="proc-remove-callfun-remove");let _=he(r,"eventNameProcCallfunAfterStart");et(_)||(_="proc-callfun-afterStart");let O=he(r,"eventNameProcCallfunBeforeEnd");et(O)||(O="proc-callfun-beforeEnd");let E=he(r,"eventNameProcCoreDetect");et(E)||(E="proc-coreDetect");let j=he(r,"eventNameProcRetakeRemove");et(j)||(j="proc-retake-remove");let R=he(r,"eventNameProcCoreRetake");et(R)||(R="proc-coreRetake");let x=Tn(),A=function(e={}){let r=he(e,"fdLog");et(r)||(r="./_logs");let n=he(e,"interval");"day"!==n&&"hr"!==n&&(n="day");let o=a.transport({targets:[{level:"info",target:t.resolve(Yn,"./formatter.mjs"),options:{interval:n,fdLog:r}}]});return a(o)}({fdLog:c,interval:"hr"}),T={info:e=>{A.info(e),x.emit("change",{type:"info",...e})},warn:e=>{A.warn(e),x.emit("change",{type:"warn",...e})},error:e=>{A.error(e),x.emit("change",{type:"error",...e})}},C=async t=>{let r=await(async(t,r,n="")=>{let i="";if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);i=o;let a=`${i}/${r}`,s={time:Rn(),hash:n};e.writeFileSync(a,JSON.stringify(s),"utf8")})("remove",t);return r},k=async(t,r={})=>{let n=await(async(t,r,n={})=>{let i=he(n,"checkTime");Cr(i)||(i=!0);let a=he(n,"timeNow"),s="",c=0;if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);s=o,c=m;let u=`${s}/${r}`;if(!Bn(u))return{b:!1,msg:`fp[${u}] is not a file`};if(!i)return{b:!0,msg:`fp[${u}] exists`};if(!fn(a))throw new Error("invalid timeNow");let l=e.readFileSync(u,"utf8"),f=he(JSON.parse(l),"time"),d=jn(f),p=a.diff(d,"millisecond"),h=p>=c;return h?{b:h,msg:`time difference[${p}] >= time tolerance[${c}]`}:{b:h,msg:"allowable time difference"}})("remove",t,r);return n},$=async(t,r)=>{let n="";if("add"===t)throw new Error("does not support add");if("modify"===t)throw new Error("does not support modify");if("remove"!==t)throw new Error(`invalid mode[${t}]`);n=o;let i=`${n}/${r}`;if(!Bn(i))return;let a=e.readFileSync(i,"utf8"),s=JSON.parse(a),c=Br(i,{fs:e});if(c.error)throw new Error(c.error);return s},D=async e=>await $("remove",e),P=null,N=null,F=(async()=>{await Cn(1);let e=jn();T.info({event:"start",timeRunStart:e.format("YYYY-MM-DDTHH:mm:ssZ"),msg:"running..."});let t=zn(i,i);P=t.buildSrc();let r=zn(s,s);N=r.buildSrc();let o="";et(o)||await(async()=>{if(St(h))try{T.info({event:_,msg:"start..."});let e=h();kt(e)&&(e=await e),T.info({event:_,msg:"done"})}catch(e){console.log(e),T.error({event:_,msg:Ln(e)}),o="error at proc-callfun-afterStart"}return et(o)?(console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-afterStart",msg:o})):null})().catch(()=>{});et(o)||await(async()=>{let e=[];try{T.info({event:v,msg:"start..."});let t=u();kt(t)&&(t=await t),e=t,T.info({event:v,num:ln(t),msg:"done"})}catch(e){console.log(e),T.error({event:v,msg:Ln(e)}),o="error at proc-callfun-getNew"}if(et(o))return console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-main",msg:o});let t=[];try{T.info({event:g,msg:"start..."});let e=l();kt(e)&&(e=await e),t=e,T.info({event:g,num:ln(e),msg:"done"})}catch(e){console.log(e),T.error({event:g,msg:Ln(e)}),o="error at proc-callfun-getCurrent"}if(et(o))return console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-main",msg:o});if(0===ln(e))return console.log("invalid data, task canceled"),void T.info({event:"cancel-stage-main",msg:"no data"});let r=null;try{T.info({event:"proc-compare",msg:"start..."}),r=Dr(t,e,n,{withInfor:!1});let o=ln(r.del),i=ln(r.add),a=ln(r.diff),s=ln(r.same);T.info({event:"proc-compare",numRemove:o,numAdd:i,numModify:a,numSame:s,msg:"done"})}catch(e){console.log(e),T.error({event:"proc-compare",msg:Ln(e)}),o="error at proc-compare"}return et(o)?(console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-main",msg:o})):fn(r)?0!==ln(r.del)||0!==ln(r.add)||0!==ln(r.diff)?(await Fr(r.del,async e=>{if(!et(o)){try{if(T.info({event:S,[n]:e[n],msg:"start..."}),St(p)){let t=p(e);kt(t)&&(t=await t)}}catch(t){console.log(t),T.error({event:S,[n]:e[n],msg:Ln(t)}),o="error at proc-remove-callfun-remove"}if(!et(o))try{P.remove(e[n]),m<=0?(N.remove(e[n]),T.info({event:S,[n]:e[n],msg:"done"})):(await k(e[n],{checkTime:!1})).b||(await C(e[n]),T.info({event:S,[n]:e[n],msg:"add-tag"}))}catch(t){console.log(t),T.error({event:S,[n]:e[n],msg:Ln(t)}),o="error at proc-remove-callfun-remove"}}}),et(o)?(console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-main",msg:o})):(await Fr(r.add,async e=>{if(!et(o)){try{if(T.info({event:w,[n]:e[n],msg:"start..."}),St(f)){let t=f(e);kt(t)&&(t=await t)}}catch(t){console.log(t),T.error({event:w,[n]:e[n],msg:Ln(t)}),o="error at proc-add-callfun-add"}if(!et(o))try{let t=On(JSON.stringify(e));P.set(e[n],t),N.set(e[n],t),m>0&&(await k(e[n],{checkTime:!1})).b&&(await D(e[n]),T.info({event:w,[n]:e[n],msg:"release-tag"})),T.info({event:w,[n]:e[n],msg:"done"})}catch(t){console.log(t),T.error({event:w,[n]:e[n],msg:Ln(t)}),o="error at proc-add-callfun-add"}}}),et(o)?(console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-main",msg:o})):(await Fr(r.diff,async e=>{if(!et(o)){try{if(T.info({event:b,[n]:e[n],msg:"start..."}),St(d)){let t=d(e);kt(t)&&(t=await t)}}catch(t){console.log(t),T.error({event:b,[n]:e[n],msg:Ln(t)}),o="error at proc-diff-callfun-modify"}if(!et(o))try{let t=On(JSON.stringify(e));P.set(e[n],t),N.set(e[n],t),T.info({event:b,[n]:e[n],msg:"done"})}catch(t){console.log(t),T.error({event:b,[n]:e[n],msg:Ln(t)}),o="error at proc-diff-callfun-modify"}}}),et(o)?(console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-main",msg:o})):null))):void T.info({event:"cancel-stage-main",msg:"no difference"}):(console.log("can not calculate the difference, task canceled"),void T.info({event:"cancel-stage-main",msg:"can not calculate the difference between the data before and after"}))})().catch(()=>{});await(async()=>{if(St(y))try{T.info({event:O,msg:"start..."});let e=y();kt(e)&&(e=await e),T.info({event:O,msg:"done"})}catch(e){console.log(e),T.error({event:O,msg:Ln(e)}),o="error at proc-callfun-beforeEnd"}return et(o)?(console.log("error occurred, task canceled"),void T.info({event:"cancel-stage-beforeEnd",msg:o})):null})().catch(()=>{}),T.info({event:"end",...(()=>{let t=jn(),r=t.diff(e,"second");return{timeRunStart:e.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunEnd:t.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunSpent:`${r}s`}})(),msg:"done"})})().catch(e=>{console.log(e),T.error({event:E,msg:Ln(e)})}),M=(async()=>{if(m<=0)return;await async function(e,t={}){let r=null,n=Nr();if(!St(e))return n.reject("waitfunction需輸入函數f"),n;let o=async()=>{let t=e();return kt(t)&&(t=await t),t};if(r=await o(),!0===r)return n.resolve(),n;let i=he(t,"attemptNum",null);At(i)||(i=200);let a=he(t,"timeInterval",null);At(a)||(a=1e3);let s=0,c=setInterval(async()=>{s+=1,r=await o(),!0===r&&(clearInterval(c),n.resolve()),s>i&&(clearInterval(c),n.reject(`exceeded attemptNum[${i}]`))},a);return n}(()=>null!==N);let e=jn(),t=Ct(o,1);0!==ln(t)&&await Fr(t,async t=>{let r=(await k(t.name,{timeNow:e,checkTime:!0})).b,o=!et(P.get(t.name)),i=et(N.get(t.name));r&&o&&i&&(await D(t.name),T.info({event:j,[n]:t.name,from:"debounce",msg:"release-tag"}),N.remove(t.name),T.info({event:j,[n]:t.name,from:"debounce",msg:"done"}))})})().catch(e=>{console.log(e),T.error({event:R,msg:Ln(e)})});return x.srlog=T,Promise.all([F,M]).finally(()=>{x.emit("end")}),x},Jn=async(n={})=>{let o=he(n,"keyId");et(o)||(o="id");let i=he(n,"fdTagRemove");et(i)||(i="./_tagRemove");let a=he(n,"fdDwAttime");et(a)||(a="./_dwAttime"),Ot(a)||Rt(a);let s=he(n,"fdDwCurrent");et(s)||(s="./_dwCurrent"),Ot(s)||Rt(s);let c=he(n,"fdTaskCpActualSrc");et(c)||(c="./_taskCpActualSrc"),Ot(c)||Rt(c);let u=he(n,"fdTaskCpSrc");et(u)||(u="./_taskCpSrc"),Ot(u)||Rt(u);let l=he(n,"fdLog");et(l)||(l="./_logs"),Ot(l)||Rt(l);let f=he(n,"funDownload");if(!St(f))throw new Error("invalid funDownload");let d=he(n,"funGetCurrent");if(!St(d))throw new Error("invalid funGetCurrent");let p=he(n,"funAdd");if(!St(p))throw new Error("invalid funAdd");let h=he(n,"funModify");if(!St(h))throw new Error("invalid funModify");let y=he(n,"funRemove");if(!St(y))throw new Error("invalid funRemove");let m=he(n,"funAfterStart"),v=he(n,"funBeforeEnd"),g=he(n,"timeToleranceRemove");bt(g)||(g=0),g=pt(g);let w=async()=>{await function(n,o,i={}){return Wr(n,o,{path:t,fs:e,crypto:r,...i})}(a,s)};return Wn({keyId:o,fdTagRemove:i,fdTaskCpActualSrc:c,fdTaskCpSrc:u,fdLog:l,funGetNew:f,funGetCurrent:d,funAdd:p,funModify:h,funRemove:y,funAfterStart:async()=>{if(St(m)){let e=m();kt(e)&&(e=await e)}},funBeforeEnd:async()=>{if(await w(),St(v)){let e=v();kt(e)&&(e=await e)}},timeToleranceRemove:g,eventNameProcCallfunGetNew:"proc-callfun-download"})};function Vn(e,t){return function(){return e.apply(t,arguments)}}const{toString:Kn}=Object.prototype,{getPrototypeOf:Gn}=Object,{iterator:Zn,toStringTag:Xn}=Symbol,Qn=(e=>t=>{const r=Kn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),eo=e=>(e=e.toLowerCase(),t=>Qn(t)===e),to=e=>t=>typeof t===e,{isArray:ro}=Array,no=to("undefined");function oo(e){return null!==e&&!no(e)&&null!==e.constructor&&!no(e.constructor)&&so(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const io=eo("ArrayBuffer");const ao=to("string"),so=to("function"),co=to("number"),uo=e=>null!==e&&"object"==typeof e,lo=e=>{if("object"!==Qn(e))return!1;const t=Gn(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||Xn in e||Zn in e)},fo=eo("Date"),po=eo("File"),ho=eo("Blob"),yo=eo("FileList"),mo=eo("URLSearchParams"),[vo,go,wo,bo]=["ReadableStream","Request","Response","Headers"].map(eo);function So(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),ro(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(oo(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let a;for(n=0;n<i;n++)a=o[n],t.call(null,e[a],a,e)}}function _o(e,t){if(oo(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n,o=r.length;for(;o-- >0;)if(n=r[o],t===n.toLowerCase())return n;return null}const Oo="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,Eo=e=>!no(e)&&e!==Oo;const jo=(Ro="undefined"!=typeof Uint8Array&&Gn(Uint8Array),e=>Ro&&e instanceof Ro);var Ro;const xo=eo("HTMLFormElement"),Ao=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),To=eo("RegExp"),Co=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};So(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)};const ko=eo("AsyncFunction"),$o=(Do="function"==typeof setImmediate,Po=so(Oo.postMessage),Do?setImmediate:Po?(No=`axios@${Math.random()}`,Fo=[],Oo.addEventListener("message",({source:e,data:t})=>{e===Oo&&t===No&&Fo.length&&Fo.shift()()},!1),e=>{Fo.push(e),Oo.postMessage(No,"*")}):e=>setTimeout(e));var Do,Po,No,Fo;const Mo="undefined"!=typeof queueMicrotask?queueMicrotask.bind(Oo):"undefined"!=typeof process&&process.nextTick||$o;var Lo={isArray:ro,isArrayBuffer:io,isBuffer:oo,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||so(e.append)&&("formdata"===(t=Qn(e))||"object"===t&&so(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&io(e.buffer),t},isString:ao,isNumber:co,isBoolean:e=>!0===e||!1===e,isObject:uo,isPlainObject:lo,isEmptyObject:e=>{if(!uo(e)||oo(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:vo,isRequest:go,isResponse:wo,isHeaders:bo,isUndefined:no,isDate:fo,isFile:po,isBlob:ho,isRegExp:To,isFunction:so,isStream:e=>uo(e)&&so(e.pipe),isURLSearchParams:mo,isTypedArray:jo,isFileList:yo,forEach:So,merge:function e(){const{caseless:t,skipUndefined:r}=Eo(this)&&this||{},n={},o=(o,i)=>{const a=t&&_o(n,i)||i;lo(n[a])&&lo(o)?n[a]=e(n[a],o):lo(o)?n[a]=e({},o):ro(o)?n[a]=o.slice():r&&no(o)||(n[a]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&So(arguments[e],o);return n},extend:(e,t,r,{allOwnKeys:n}={})=>(So(t,(t,n)=>{r&&so(t)?e[n]=Vn(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,a;const s={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)a=o[i],n&&!n(a,e,t)||s[a]||(t[a]=e[a],s[a]=!0);e=!1!==r&&Gn(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Qn,kindOfTest:eo,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return-1!==n&&n===r},toArray:e=>{if(!e)return null;if(ro(e))return e;let t=e.length;if(!co(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[Zn]).call(e);let n;for(;(n=r.next())&&!n.done;){const r=n.value;t.call(e,r[0],r[1])}},matchAll:(e,t)=>{let r;const n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:xo,hasOwnProperty:Ao,hasOwnProp:Ao,reduceDescriptors:Co,freezeMethods:e=>{Co(e,(t,r)=>{if(so(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];so(n)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")}))})},toObjectSet:(e,t)=>{const r={},n=e=>{e.forEach(e=>{r[e]=!0})};return ro(e)?n(e):n(String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:_o,global:Oo,isContextDefined:Eo,isSpecCompliantForm:function(e){return!!(e&&so(e.append)&&"FormData"===e[Xn]&&e[Zn])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(uo(e)){if(t.indexOf(e)>=0)return;if(oo(e))return e;if(!("toJSON"in e)){t[n]=e;const o=ro(e)?[]:{};return So(e,(e,t)=>{const i=r(e,n+1);!no(i)&&(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:ko,isThenable:e=>e&&(uo(e)||so(e))&&so(e.then)&&so(e.catch),setImmediate:$o,asap:Mo,isIterable:e=>null!=e&&so(e[Zn])};function Bo(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}Lo.inherits(Bo,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:Lo.toJSONObject(this.config),code:this.code,status:this.status}}});const Uo=Bo.prototype,Io={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Io[e]={value:e}}),Object.defineProperties(Bo,Io),Object.defineProperty(Uo,"isAxiosError",{value:!0}),Bo.from=(e,t,r,n,o,i)=>{const a=Object.create(Uo);Lo.toFlatObject(e,a,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const s=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return Bo.call(a,s,c,r,n,o),e&&null==a.cause&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",i&&Object.assign(a,i),a};function qo(e){return Lo.isPlainObject(e)||Lo.isArray(e)}function zo(e){return Lo.endsWith(e,"[]")?e.slice(0,-2):e}function Ho(e,t,r){return e?e.concat(t).map(function(e,t){return e=zo(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const Yo=Lo.toFlatObject(Lo,{},null,function(e){return/^is[A-Z]/.test(e)});function Wo(e,t,r){if(!Lo.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=Lo.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!Lo.isUndefined(t[e])})).metaTokens,o=r.visitor||u,i=r.dots,a=r.indexes,s=(r.Blob||"undefined"!=typeof Blob&&Blob)&&Lo.isSpecCompliantForm(t);if(!Lo.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(Lo.isDate(e))return e.toISOString();if(Lo.isBoolean(e))return e.toString();if(!s&&Lo.isBlob(e))throw new Bo("Blob is not supported. Use a Buffer instead.");return Lo.isArrayBuffer(e)||Lo.isTypedArray(e)?s&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let s=e;if(e&&!o&&"object"==typeof e)if(Lo.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(Lo.isArray(e)&&function(e){return Lo.isArray(e)&&!e.some(qo)}(e)||(Lo.isFileList(e)||Lo.endsWith(r,"[]"))&&(s=Lo.toArray(e)))return r=zo(r),s.forEach(function(e,n){!Lo.isUndefined(e)&&null!==e&&t.append(!0===a?Ho([r],n,i):null===a?r:r+"[]",c(e))}),!1;return!!qo(e)||(t.append(Ho(o,r,i),c(e)),!1)}const l=[],f=Object.assign(Yo,{defaultVisitor:u,convertValue:c,isVisitable:qo});if(!Lo.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!Lo.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),Lo.forEach(r,function(r,i){!0===(!(Lo.isUndefined(r)||null===r)&&o.call(t,r,Lo.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])}),l.pop()}}(e),t}function Jo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Vo(e,t){this._pairs=[],e&&Wo(e,this,t)}const Ko=Vo.prototype;function Go(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Zo(e,t,r){if(!t)return e;const n=r&&r.encode||Go;Lo.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):Lo.isURLSearchParams(t)?t.toString():new Vo(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Ko.append=function(e,t){this._pairs.push([e,t])},Ko.toString=function(e){const t=e?function(t){return e.call(this,t,Jo)}:Jo;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var Xo=class{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){Lo.forEach(this.handlers,function(t){null!==t&&e(t)})}},Qo={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},ei={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Vo,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const ti="undefined"!=typeof window&&"undefined"!=typeof document,ri="object"==typeof navigator&&navigator||void 0,ni=ti&&(!ri||["ReactNative","NativeScript","NS"].indexOf(ri.product)<0),oi="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,ii=ti&&window.location.href||"http://localhost";var ai={...Object.freeze({__proto__:null,hasBrowserEnv:ti,hasStandardBrowserEnv:ni,hasStandardBrowserWebWorkerEnv:oi,navigator:ri,origin:ii}),...ei};function si(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const a=Number.isFinite(+i),s=o>=e.length;if(i=!i&&Lo.isArray(n)?n.length:i,s)return Lo.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!a;n[i]&&Lo.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&Lo.isArray(n[i])&&(n[i]=function(e){const t={},r=Object.keys(e);let n;const o=r.length;let i;for(n=0;n<o;n++)i=r[n],t[i]=e[i];return t}(n[i])),!a}if(Lo.isFormData(e)&&Lo.isFunction(e.entries)){const r={};return Lo.forEachEntry(e,(e,n)=>{t(function(e){return Lo.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const ci={transitional:Qo,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=Lo.isObject(e);o&&Lo.isHTMLForm(e)&&(e=new FormData(e));if(Lo.isFormData(e))return n?JSON.stringify(si(e)):e;if(Lo.isArrayBuffer(e)||Lo.isBuffer(e)||Lo.isStream(e)||Lo.isFile(e)||Lo.isBlob(e)||Lo.isReadableStream(e))return e;if(Lo.isArrayBufferView(e))return e.buffer;if(Lo.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let i;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return Wo(e,new ai.classes.URLSearchParams,{visitor:function(e,t,r,n){return ai.isNode&&Lo.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=Lo.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Wo(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(Lo.isString(e))try{return(t||JSON.parse)(e),Lo.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||ci.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(Lo.isResponse(e)||Lo.isReadableStream(e))return e;if(e&&Lo.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e,this.parseReviver)}catch(e){if(r){if("SyntaxError"===e.name)throw Bo.from(e,Bo.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ai.classes.FormData,Blob:ai.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Lo.forEach(["delete","get","head","post","put","patch"],e=>{ci.headers[e]={}});var ui=ci;const li=Lo.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);const fi=Symbol("internals");function di(e){return e&&String(e).trim().toLowerCase()}function pi(e){return!1===e||null==e?e:Lo.isArray(e)?e.map(pi):String(e)}function hi(e,t,r,n,o){return Lo.isFunction(n)?n.call(this,t,r):(o&&(t=r),Lo.isString(t)?Lo.isString(n)?-1!==t.indexOf(n):Lo.isRegExp(n)?n.test(t):void 0:void 0)}class yi{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=di(t);if(!o)throw new Error("header name must be a non-empty string");const i=Lo.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=pi(e))}const i=(e,t)=>Lo.forEach(e,(e,r)=>o(e,r,t));if(Lo.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(Lo.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))i((e=>{const t={};let r,n,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),r=e.substring(0,o).trim().toLowerCase(),n=e.substring(o+1).trim(),!r||t[r]&&li[r]||("set-cookie"===r?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t})(e),t);else if(Lo.isObject(e)&&Lo.isIterable(e)){let r,n,o={};for(const t of e){if(!Lo.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?Lo.isArray(r)?[...r,t[1]]:[r,t[1]]:t[1]}i(o,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=di(e)){const r=Lo.findKey(this,e);if(r){const e=this[r];if(!t)return e;if(!0===t)return function(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}(e);if(Lo.isFunction(t))return t.call(this,e,r);if(Lo.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=di(e)){const r=Lo.findKey(this,e);return!(!r||void 0===this[r]||t&&!hi(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=di(e)){const o=Lo.findKey(r,e);!o||t&&!hi(0,r[o],o,t)||(delete r[o],n=!0)}}return Lo.isArray(e)?e.forEach(o):o(e),n}clear(e){const t=Object.keys(this);let r=t.length,n=!1;for(;r--;){const o=t[r];e&&!hi(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return Lo.forEach(this,(n,o)=>{const i=Lo.findKey(r,o);if(i)return t[i]=pi(n),void delete t[o];const a=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();a!==o&&delete t[o],t[a]=pi(n),r[a]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return Lo.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&Lo.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){const t=(this[fi]=this[fi]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=di(e);t[n]||(!function(e,t){const r=Lo.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return Lo.isArray(e)?e.forEach(n):n(e),this}}yi.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Lo.reduceDescriptors(yi.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),Lo.freezeMethods(yi);var mi=yi;function vi(e,t){const r=this||ui,n=t||r,o=mi.from(n.headers);let i=n.data;return Lo.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function gi(e){return!(!e||!e.__CANCEL__)}function wi(e,t,r){Bo.call(this,null==e?"canceled":e,Bo.ERR_CANCELED,t,r),this.name="CanceledError"}function bi(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new Bo("Request failed with status code "+r.status,[Bo.ERR_BAD_REQUEST,Bo.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}Lo.inherits(wi,Bo,{__CANCEL__:!0});const Si=(e,t,r=3)=>{let n=0;const o=function(e,t){e=e||10;const r=new Array(e),n=new Array(e);let o,i=0,a=0;return t=void 0!==t?t:1e3,function(s){const c=Date.now(),u=n[a];o||(o=c),r[i]=s,n[i]=c;let l=a,f=0;for(;l!==i;)f+=r[l++],l%=e;if(i=(i+1)%e,i===a&&(a=(a+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return function(e,t){let r,n,o=0,i=1e3/t;const a=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),s=t-o;s>=i?a(e,t):(r=e,n||(n=setTimeout(()=>{n=null,a(r)},i-s)))},()=>r&&a(r)]}(r=>{const i=r.loaded,a=r.lengthComputable?r.total:void 0,s=i-n,c=o(s);n=i;e({loaded:i,total:a,progress:a?i/a:void 0,bytes:s,rate:c||void 0,estimated:c&&a&&i<=a?(a-i)/c:void 0,event:r,lengthComputable:null!=a,[t?"download":"upload"]:!0})},r)},_i=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},Oi=e=>(...t)=>Lo.asap(()=>e(...t));var Ei=ai.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,ai.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(ai.origin),ai.navigator&&/(msie|trident)/i.test(ai.navigator.userAgent)):()=>!0,ji=ai.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const a=[e+"="+encodeURIComponent(t)];Lo.isNumber(r)&&a.push("expires="+new Date(r).toGMTString()),Lo.isString(n)&&a.push("path="+n),Lo.isString(o)&&a.push("domain="+o),!0===i&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function Ri(e,t,r){let n=!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(n||0==r)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const xi=e=>e instanceof mi?{...e}:e;function Ai(e,t){t=t||{};const r={};function n(e,t,r,n){return Lo.isPlainObject(e)&&Lo.isPlainObject(t)?Lo.merge.call({caseless:n},e,t):Lo.isPlainObject(t)?Lo.merge({},t):Lo.isArray(t)?t.slice():t}function o(e,t,r,o){return Lo.isUndefined(t)?Lo.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!Lo.isUndefined(t))return n(void 0,t)}function a(e,t){return Lo.isUndefined(t)?Lo.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function s(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}const c={url:i,method:i,data:i,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:s,headers:(e,t,r)=>o(xi(e),xi(t),0,!0)};return Lo.forEach(Object.keys({...e,...t}),function(n){const i=c[n]||o,a=i(e[n],t[n],n);Lo.isUndefined(a)&&i!==s||(r[n]=a)}),r}var Ti=e=>{const t=Ai({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:o,xsrfCookieName:i,headers:a,auth:s}=t;if(t.headers=a=mi.from(a),t.url=Zo(Ri(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),s&&a.set("Authorization","Basic "+btoa((s.username||"")+":"+(s.password?unescape(encodeURIComponent(s.password)):""))),Lo.isFormData(r))if(ai.hasStandardBrowserEnv||ai.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(Lo.isFunction(r.getHeaders)){const e=r.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,r])=>{t.includes(e.toLowerCase())&&a.set(e,r)})}if(ai.hasStandardBrowserEnv&&(n&&Lo.isFunction(n)&&(n=n(t)),n||!1!==n&&Ei(t.url))){const e=o&&i&&ji.read(i);e&&a.set(o,e)}return t};var Ci="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=Ti(e);let o=n.data;const i=mi.from(n.headers).normalize();let a,s,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=n;function h(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(a),n.signal&&n.signal.removeEventListener("abort",a)}let y=new XMLHttpRequest;function m(){if(!y)return;const n=mi.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());bi(function(e){t(e),h()},function(e){r(e),h()},{data:f&&"text"!==f&&"json"!==f?y.response:y.responseText,status:y.status,statusText:y.statusText,headers:n,config:e,request:y}),y=null}y.open(n.method.toUpperCase(),n.url,!0),y.timeout=n.timeout,"onloadend"in y?y.onloadend=m:y.onreadystatechange=function(){y&&4===y.readyState&&(0!==y.status||y.responseURL&&0===y.responseURL.indexOf("file:"))&&setTimeout(m)},y.onabort=function(){y&&(r(new Bo("Request aborted",Bo.ECONNABORTED,e,y)),y=null)},y.onerror=function(t){const n=new Bo(t&&t.message?t.message:"Network Error",Bo.ERR_NETWORK,e,y);n.event=t||null,r(n),y=null},y.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Qo;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new Bo(t,o.clarifyTimeoutError?Bo.ETIMEDOUT:Bo.ECONNABORTED,e,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&Lo.forEach(i.toJSON(),function(e,t){y.setRequestHeader(t,e)}),Lo.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),f&&"json"!==f&&(y.responseType=n.responseType),p&&([c,l]=Si(p,!0),y.addEventListener("progress",c)),d&&y.upload&&([s,u]=Si(d),y.upload.addEventListener("progress",s),y.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(a=t=>{y&&(r(!t||t.type?new wi(null,e,y):t),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(a),n.signal&&(n.signal.aborted?a():n.signal.addEventListener("abort",a)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);v&&-1===ai.protocols.indexOf(v)?r(new Bo("Unsupported protocol "+v+":",Bo.ERR_BAD_REQUEST,e)):y.send(o||null)})};var ki=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController;const o=function(e){if(!r){r=!0,a();const t=e instanceof Error?e:this.reason;n.abort(t instanceof Bo?t:new wi(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new Bo(`timeout ${t} of ms exceeded`,Bo.ETIMEDOUT))},t);const a=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:s}=n;return s.unsubscribe=()=>Lo.asap(a),s}};const $i=function*(e,t){let r=e.byteLength;if(!t||r<t)return void(yield e);let n,o=0;for(;o<r;)n=o+t,yield e.slice(o,n),o=n},Di=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},Pi=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of Di(e))yield*$i(r,t)}(e,t);let i,a=0,s=e=>{i||(i=!0,n&&n(e))};return new ReadableStream({async pull(e){try{const{done:t,value:n}=await o.next();if(t)return s(),void e.close();let i=n.byteLength;if(r){let e=a+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw s(e),e}},cancel:e=>(s(e),o.return())},{highWaterMark:2})},{isFunction:Ni}=Lo,Fi=(({Request:e,Response:t})=>({Request:e,Response:t}))(Lo.global),{ReadableStream:Mi,TextEncoder:Li}=Lo.global,Bi=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Ui=e=>{e=Lo.merge.call({skipUndefined:!0},Fi,e);const{fetch:t,Request:r,Response:n}=e,o=t?Ni(t):"function"==typeof fetch,i=Ni(r),a=Ni(n);if(!o)return!1;const s=o&&Ni(Mi),c=o&&("function"==typeof Li?(u=new Li,e=>u.encode(e)):async e=>new Uint8Array(await new r(e).arrayBuffer()));var u;const l=i&&s&&Bi(()=>{let e=!1;const t=new r(ai.origin,{body:new Mi,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),f=a&&s&&Bi(()=>Lo.isReadableStream(new n("").body)),d={stream:f&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,r)=>{let n=t&&t[e];if(n)return n.call(t);throw new Bo(`Response type '${e}' is not supported`,Bo.ERR_NOT_SUPPORT,r)})});const p=async(e,t)=>{const n=Lo.toFiniteNumber(e.getContentLength());return null==n?(async e=>{if(null==e)return 0;if(Lo.isBlob(e))return e.size;if(Lo.isSpecCompliantForm(e)){const t=new r(ai.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return Lo.isArrayBufferView(e)||Lo.isArrayBuffer(e)?e.byteLength:(Lo.isURLSearchParams(e)&&(e+=""),Lo.isString(e)?(await c(e)).byteLength:void 0)})(t):n};return async e=>{let{url:o,method:a,data:s,signal:c,cancelToken:u,timeout:h,onDownloadProgress:y,onUploadProgress:m,responseType:v,headers:g,withCredentials:w="same-origin",fetchOptions:b}=Ti(e),S=t||fetch;v=v?(v+"").toLowerCase():"text";let _=ki([c,u&&u.toAbortSignal()],h),O=null;const E=_&&_.unsubscribe&&(()=>{_.unsubscribe()});let j;try{if(m&&l&&"get"!==a&&"head"!==a&&0!==(j=await p(g,s))){let e,t=new r(o,{method:"POST",body:s,duplex:"half"});if(Lo.isFormData(s)&&(e=t.headers.get("content-type"))&&g.setContentType(e),t.body){const[e,r]=_i(j,Si(Oi(m)));s=Pi(t.body,65536,e,r)}}Lo.isString(w)||(w=w?"include":"omit");const t=i&&"credentials"in r.prototype,c={...b,signal:_,method:a.toUpperCase(),headers:g.normalize().toJSON(),body:s,duplex:"half",credentials:t?w:void 0};O=i&&new r(o,c);let u=await(i?S(O,b):S(o,c));const h=f&&("stream"===v||"response"===v);if(f&&(y||h&&E)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=Lo.toFiniteNumber(u.headers.get("content-length")),[r,o]=y&&_i(t,Si(Oi(y),!0))||[];u=new n(Pi(u.body,65536,r,()=>{o&&o(),E&&E()}),e)}v=v||"text";let R=await d[Lo.findKey(d,v)||"text"](u,e);return!h&&E&&E(),await new Promise((t,r)=>{bi(t,r,{data:R,headers:mi.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:O})})}catch(t){if(E&&E(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Bo("Network Error",Bo.ERR_NETWORK,e,O),{cause:t.cause||t});throw Bo.from(t,t&&t.code,e,O)}}},Ii=new Map,qi=e=>{let t=e?e.env:{};const{fetch:r,Request:n,Response:o}=t,i=[n,o,r];let a,s,c=i.length,u=Ii;for(;c--;)a=i[c],s=u.get(a),void 0===s&&u.set(a,s=c?new Map:Ui(t)),u=s;return s};qi();const zi={http:null,xhr:Ci,fetch:{get:qi}};Lo.forEach(zi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Hi=e=>`- ${e}`,Yi=e=>Lo.isFunction(e)||null===e||!1===e;var Wi=(e,t)=>{e=Lo.isArray(e)?e:[e];const{length:r}=e;let n,o;const i={};for(let a=0;a<r;a++){let r;if(n=e[a],o=n,!Yi(n)&&(o=zi[(r=String(n)).toLowerCase()],void 0===o))throw new Bo(`Unknown adapter '${r}'`);if(o&&(Lo.isFunction(o)||(o=o.get(t))))break;i[r||"#"+a]=o}if(!o){const e=Object.entries(i).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Bo("There is no suitable adapter to dispatch the request "+(r?e.length>1?"since :\n"+e.map(Hi).join("\n"):" "+Hi(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function Ji(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new wi(null,e)}function Vi(e){Ji(e),e.headers=mi.from(e.headers),e.data=vi.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Wi(e.adapter||ui.adapter,e)(e).then(function(t){return Ji(e),t.data=vi.call(e,e.transformResponse,t),t.headers=mi.from(t.headers),t},function(t){return gi(t)||(Ji(e),t&&t.response&&(t.response.data=vi.call(e,e.transformResponse,t.response),t.response.headers=mi.from(t.response.headers))),Promise.reject(t)})}const Ki="1.12.2",Gi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Gi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Zi={};Gi.transitional=function(e,t,r){function n(e,t){return"[Axios v"+Ki+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new Bo(n(o," has been removed"+(t?" in "+t:"")),Bo.ERR_DEPRECATED);return t&&!Zi[o]&&(Zi[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},Gi.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var Xi={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Bo("options must be an object",Bo.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],a=t[i];if(a){const t=e[i],r=void 0===t||a(t,i,e);if(!0!==r)throw new Bo("option "+i+" must be "+r,Bo.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Bo("Unknown option "+i,Bo.ERR_BAD_OPTION)}},validators:Gi};const Qi=Xi.validators;class ea{constructor(e){this.defaults=e||{},this.interceptors={request:new Xo,response:new Xo}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ai(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Xi.assertOptions(r,{silentJSONParsing:Qi.transitional(Qi.boolean),forcedJSONParsing:Qi.transitional(Qi.boolean),clarifyTimeoutError:Qi.transitional(Qi.boolean)},!1),null!=n&&(Lo.isFunction(n)?t.paramsSerializer={serialize:n}:Xi.assertOptions(n,{encode:Qi.function,serialize:Qi.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Xi.assertOptions(t,{baseUrl:Qi.spelling("baseURL"),withXsrfToken:Qi.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&Lo.merge(o.common,o[t.method]);o&&Lo.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=mi.concat(i,o);const a=[];let s=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(s=s&&e.synchronous,a.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,f=0;if(!s){const e=[Vi.bind(this),void 0];for(e.unshift(...a),e.push(...c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=a.length;let d=t;for(;f<l;){const e=a[f++],t=a[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Vi.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return Zo(Ri((e=Ai(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}Lo.forEach(["delete","get","head","options"],function(e){ea.prototype[e]=function(t,r){return this.request(Ai(r||{},{method:e,url:t,data:(r||{}).data}))}}),Lo.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(Ai(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}ea.prototype[e]=t(),ea.prototype[e+"Form"]=t(!0)});var ta=ea;class ra{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;const n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new wi(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ra(function(t){e=t}),cancel:e}}}var na=ra;const oa={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(oa).forEach(([e,t])=>{oa[t]=e});var ia=oa;const aa=function e(t){const r=new ta(t),n=Vn(ta.prototype.request,r);return Lo.extend(n,ta.prototype,r,{allOwnKeys:!0}),Lo.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(Ai(t,r))},n}(ui);aa.Axios=ta,aa.CanceledError=wi,aa.CancelToken=na,aa.isCancel=gi,aa.VERSION=Ki,aa.toFormData=Wo,aa.AxiosError=Bo,aa.Cancel=aa.CanceledError,aa.all=function(e){return Promise.all(e)},aa.spread=function(e){return function(t){return e.apply(null,t)}},aa.isAxiosError=function(e){return Lo.isObject(e)&&!0===e.isAxiosError},aa.mergeConfig=Ai,aa.AxiosHeaders=mi,aa.formToJSON=e=>si(Lo.isHTMLForm(e)?new FormData(e):e),aa.getAdapter=Wi,aa.HttpStatusCode=ia,aa.default=aa;var sa=aa;let ca=async(e,t)=>{let r={draw:6,"columns[0][data]":0,"columns[0][name]":"EventNo","columns[0][searchable]":!1,"columns[0][orderable]":!0,"columns[0][search][value]":"","columns[0][search][regex]":!1,"columns[1][data]":1,"columns[1][name]":"MaxIntensity","columns[1][searchable]":!0,"columns[1][orderable]":!0,"columns[1][search][value]":"","columns[1][search][regex]":!1,"columns[2][data]":2,"columns[2][name]":"OriginTime","columns[2][searchable]":!0,"columns[2][orderable]":!0,"columns[2][search][value]":"","columns[2][search][regex]":!1,"columns[3][data]":3,"columns[3][name]":"MagnitudeValue","columns[3][searchable]":!0,"columns[3][orderable]":!0,"columns[3][search][value]":"","columns[3][search][regex]":!1,"columns[4][data]":4,"columns[4][name]":"Depth","columns[4][searchable]":!0,"columns[4][orderable]":!0,"columns[4][search][value]":"","columns[4][search][regex]":!1,"columns[5][data]":5,"columns[5][name]":"Description","columns[5][searchable]":!0,"columns[5][orderable]":!0,"columns[5][search][value]":"","columns[5][search][regex]":!1,"columns[6][data]":6,"columns[6][name]":"Description","columns[6][searchable]":!0,"columns[6][orderable]":!0,"columns[6][search][value]":"","columns[6][search][regex]":!1,"order[0][column]":2,"order[0][dir]":"desc",start:0,length:-1,"search[value]":"","search[regex]":!1,Search:"",txtSDate:`${e}-1-1`,txtEDate:`${t+1}-1-1`,txtSscale:"",txtEscale:"",txtSdepth:"",txtEdepth:"",txtLonS:"",txtLonE:"",txtLatS:"",txtLatE:"",ddlCity:"",ddlTown:"",ddlCitySta:"",ddlStation:"",txtIntensityB:"",txtIntensityE:"",txtLon:"",txtLat:"",txtKM:"",ddlStationName:"------",cblEventNo:"Y",txtSDatePWS:"",txtEDatePWS:"",txtSscalePWS:"",txtEscalePWS:"",ddlMark:""},n=null;try{n=(await sa.post("https://scweb.cwa.gov.tw/zh-tw/earthquake/ajaxhandler",(o=r,Hr(jr(o,(e,t)=>{let r=null==e?"":e;return`${encodeURIComponent(t)}=${encodeURIComponent(r)}`}),"&")),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data}catch(e){console.log(e)}var o;return n};function ua(e){return e!=e}function la(e,t,r){return t==t?function(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}(e,t,r):function(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}(e,ua,r)}var fa="\\ud800-\\udfff",da="["+fa+"]",pa="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ha="\\ud83c[\\udffb-\\udfff]",ya="[^"+fa+"]",ma="(?:\\ud83c[\\udde6-\\uddff]){2}",va="[\\ud800-\\udbff][\\udc00-\\udfff]",ga="(?:"+pa+"|"+ha+")"+"?",wa="[\\ufe0e\\ufe0f]?",ba=wa+ga+("(?:\\u200d(?:"+[ya,ma,va].join("|")+")"+wa+ga+")*"),Sa="(?:"+[ya+pa+"?",pa,ma,va,da].join("|")+")",_a=RegExp(ha+"(?="+ha+")|"+Sa+ba,"g");function Oa(e){return Kr(e)?function(e){return e.match(_a)||[]}(e):function(e){return e.split("")}(e)}function Ea(e,t,r){if((e=le(e))&&(r||void 0===t))return ot(e);if(!e||!(t=ue(t)))return e;var n=Oa(e),o=Oa(t),i=function(e,t){for(var r=-1,n=e.length;++r<n&&la(t,e[r],0)>-1;);return r}(n,o),a=function(e,t){for(var r=e.length;r--&&la(t,e[r],0)>-1;);return r}(n,o)+1;return function(e,t,r){var n=e.length;return r=void 0===r?n:r,!t&&r>=n?e:Pr(e,t,r)}(n,i,a).join("")}let ja=async(t,r)=>{let n=await fetch(t);if(!n.ok)throw new Error(`can not download file, status[${n.status}]: ${n.statusText}`);let o=await n.arrayBuffer(),i=Buffer.from(o);e.writeFileSync(r,i)},Ra=async(e,t)=>{Ot(e)||Rt(e);let r=[{url:t.urlPicEqReport,fn:"picEqReport.gif"},{url:t.urlPicEqIntensity,fn:"picEqIntensity.png"},{url:t.urlPicEqPga,fn:"picEqPga.png"},{url:t.urlPicEqPgv,fn:"picEqPgv.png"}];await Fr(r,async t=>{let r=`${e}/${t.fn}`;await(async(e,t,r={})=>{let n=he(r,"retries");bt(n)||(n=3),n=wt(n);let o=he(r,"retrietimeDelays");bt(o)||(o=1e3),o=pt(o);let i="error",a=null,s=null;for(let r=1;r<=n&&(await ja(e,t).then(e=>{s=e,i="success"}).catch(e=>{console.log(e),a=e}),await Cn(o),null===s);r++);if("error"===i)throw new Error(a);return s})(t.url,r)})};return async(t,r,n={})=>{if(!tt(t))throw new Error("yearStart is not a number");if(t=wt(t),!tt(r))throw new Error("yearEnd is not a number");r=wt(r);let o=he(n,"keyId");et(o)||(o="id");let i=he(n,"fdTagRemove");et(i)||(i="./_tagRemove");let a=he(n,"fdDwAttime");et(a)||(a="./_dwAttime"),Ot(a)||Rt(a);let c=he(n,"fdDwCurrent");et(c)||(c="./_dwCurrent"),Ot(c)||Rt(c);let u=he(n,"fdResult");et(u)||(u="./_result"),Ot(u)||Rt(u);let l=he(n,"fdTaskCpActualSrc");et(l)||(l="./_taskCpActualSrc"),Ot(l)||Rt(l);let f=he(n,"fdTaskCpSrc");et(f)||(f="./_taskCpSrc"),Ot(f)||Rt(f);let d=he(n,"fdLog");et(d)||(d="./_logs"),Ot(d)||Rt(d);let p=he(n,"funDownload"),h=he(n,"funGetCurrent"),y=he(n,"funAdd"),m=he(n,"funModify"),v=he(n,"funRemove"),g=he(n,"timeToleranceRemove");bt(g)||(g=0),g=pt(g);let w=async()=>{let n=await ca(t,r),i=jr(he(n,"data",[]),e=>{let t=he(e,0,""),r=he(e,1,""),n=he(e,2,""),o=he(e,3,""),i=he(e,4,""),a=he(e,5,""),s=he(e,6,""),c=he(e,7,""),u=he(e,8,"");r=Ea(r);let l=jn(n,"YYYY-MM-DD HH-mm:ss"),f=l.format("YYYY-MM-DDTHH:mm:ssZ"),d=l.format("YYYYMMDDHHmmss"),p=l.format("YYYY"),h=l.format("YYYYMM"),y="";return tt(r)&&tt(p)&&(y=`${wt(p)-1911}${r}`),{id:y,tag:t,number:r,time:f,timeRec:n,timeTag:d,ml:o,depth:i,location:a,intensity:s,longitude:c,latitude:u,urlWebEqInfor:`https://scweb.cwa.gov.tw/zh-TW/earthquake/Details/${t}`,urlWebEqReport:`https://scweb.cwa.gov.tw/zh-TW/earthquake/Imgs/${t}`,urlWebEqIntensity:`https://scweb.cwa.gov.tw/zh-TW/earthquake/ShakeMap/${t}`,urlWebEqWave:`https://scweb.cwa.gov.tw/zh-TW/earthquake/WaveformAcc/${t}`,urlPicEqReport:`https://scweb.cwa.gov.tw/webdata/OLDEQ/${h}/${t}.gif`,urlPicEqIntensity:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${p}/${p}${r}i.png`,urlPicEqPga:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${p}/${p}${r}a.png`,urlPicEqPgv:`https://scweb.cwa.gov.tw/webdata/drawTrace/plotContour/${p}/${p}${r}v.png`}});var s;return i=null==(s=i)?s:Xe.call(s),Ze(i,t=>{let r=`${a}/${t[o]}.json`;e.writeFileSync(r,JSON.stringify(t),"utf8")}),i};St(p)||(p=w);let b=async()=>{let t=Ct(c,1),r=[];return Ze(t,t=>{let n=e.readFileSync(t.path,"utf8"),o=JSON.parse(n);r.push(o)}),r};St(h)||(h=b);let S=async t=>{let r=`${u}/${t[o]}`;Ot(r)&&xt(r,{fs:e})};St(v)||(v=S);let _=async(t,r)=>{await Ra(t,r);let n=`${t}/picEqReport.gif`,o=`${t}/picEqIntensityList.gif`;await(async(t,r,n,o,i,a)=>{let c=e.readFileSync(t),u=await s(c,{animated:!1}).extract({left:n,top:o,width:i,height:a}).toBuffer();e.writeFileSync(r,u)})(n,o,364,199,276,204)},O=async e=>{let t=`${u}/${e[o]}`;Ot(t)||Rt(t),jt(t),await _(t,e)};St(y)||(y=O);let E=async e=>{let t=`${u}/${e[o]}`;Ot(t)||Rt(t),jt(t),await _(t,e)};St(m)||(m=E);let j={fdTagRemove:i,fdDwAttime:a,fdDwCurrent:c,fdTaskCpActualSrc:l,fdTaskCpSrc:f,fdLog:d,funDownload:p,funGetCurrent:h,funRemove:v,funAdd:y,funModify:m,timeToleranceRemove:g};return await Jn(j)}});
|
|
7
7
|
//# sourceMappingURL=w-dwdata-tweq.umd.js.map
|