w-dwdata-tweq 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/_taskCpActualSrc/fpHash.json +1 -0
- package/dist/w-dwdata-tweq.umd.js +2 -2
- package/dist/w-dwdata-tweq.umd.js.map +1 -1
- package/docs/WDwdataTweq.mjs.html +14 -3
- package/docs/global.html +43 -3
- package/docs/index.html +1 -1
- package/g.mjs +2 -2
- package/package.json +2 -2
- package/src/WDwdataTweq.mjs +13 -2
- package/test/WDwdataTweq.test.mjs +2 -2
package/README.md
CHANGED
|
@@ -35,9 +35,9 @@ ev.on('change', (msg) => {
|
|
|
35
35
|
})
|
|
36
36
|
// change { event: 'start', msg: 'running...' }
|
|
37
37
|
// change { event: 'proc-callfun-download', msg: 'start...' }
|
|
38
|
-
// change { event: 'proc-callfun-download', msg: 'done' }
|
|
38
|
+
// change { event: 'proc-callfun-download', num: 2, msg: 'done' }
|
|
39
39
|
// change { event: 'proc-callfun-getCurrent', msg: 'start...' }
|
|
40
|
-
// change { event: 'proc-callfun-getCurrent', msg: 'done' }
|
|
40
|
+
// change { event: 'proc-callfun-getCurrent', num: 0, msg: 'done' }
|
|
41
41
|
// change { event: 'compare', msg: 'start...' }
|
|
42
42
|
// change { event: 'compare', msg: 'done' }
|
|
43
43
|
// change { event: 'proc-add-callfun-add', id: '111001', msg: 'start...' }
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"114115":"eyJpZCI6IjExNDExNSIsInRhZyI6IjIwMjUwODIxMTYzNzQ3NTExMTUiLCJudW1iZXIiOiIxMTUiLCJ0aW1lIjoiMjAyNS0wOC0yMVQxNjozNzo0NyswODowMCIsInRpbWVSZWMiOiIyMDI1LTA4LTIxIDE2OjM3OjQ3IiwidGltZVRhZyI6IjIwMjUwODIxMTYzNzQ3IiwibWwiOiI1LjEiLCJ1cmxXZWJFcUluZm9yIjoiaHR0cHM6Ly9zY3dlYi5jd2EuZ292LnR3L3poLVRXL2VhcnRocXVha2UvRGV0YWlscy8yMDI1MDgyMTE2Mzc0NzUxMTE1IiwidXJsV2ViRXFSZXBvcnQiOiJodHRwczovL3Njd2ViLmN3YS5nb3YudHcvemgtVFcvZWFydGhxdWFrZS9JbWdzLzIwMjUwODIxMTYzNzQ3NTExMTUiLCJ1cmxXZWJFcUludGVuc2l0eSI6Imh0dHBzOi8vc2N3ZWIuY3dhLmdvdi50dy96aC1UVy9lYXJ0aHF1YWtlL1NoYWtlTWFwLzIwMjUwODIxMTYzNzQ3NTExMTUiLCJ1cmxXZWJFcVdhdmUiOiJodHRwczovL3Njd2ViLmN3YS5nb3YudHcvemgtVFcvZWFydGhxdWFrZS9XYXZlZm9ybUFjYy8yMDI1MDgyMTE2Mzc0NzUxMTE1IiwidXJsUGljRXFSZXBvcnQiOiJodHRwczovL3Njd2ViLmN3YS5nb3YudHcvd2ViZGF0YS9PTERFUS8yMDI1MDgvMjAyNTA4MjExNjM3NDc1MTExNS5naWYiLCJ1cmxQaWNFcUludGVuc2l0eSI6Imh0dHBzOi8vc2N3ZWIuY3dhLmdvdi50dy93ZWJkYXRhL2RyYXdUcmFjZS9wbG90Q29udG91ci8yMDI1LzIwMjUxMTVpLnBuZyIsInVybFBpY0VxUGdhIjoiaHR0cHM6Ly9zY3dlYi5jd2EuZ292LnR3L3dlYmRhdGEvZHJhd1RyYWNlL3Bsb3RDb250b3VyLzIwMjUvMjAyNTExNWEucG5nIiwidXJsUGljRXFQZ3YiOiJodHRwczovL3Njd2ViLmN3YS5nb3YudHcvd2ViZGF0YS9kcmF3VHJhY2UvcGxvdENvbnRvdXIvMjAyNS8yMDI1MTE1di5wbmcifQ==","114116":"eyJpZCI6IjExNDExNiIsInRhZyI6IjIwMjUwODIyMTQwNjE1NTQxMTYiLCJudW1iZXIiOiIxMTYiLCJ0aW1lIjoiMjAyNS0wOC0yMlQxNDowNjoxNSswODowMCIsInRpbWVSZWMiOiIyMDI1LTA4LTIyIDE0OjA2OjE1IiwidGltZVRhZyI6IjIwMjUwODIyMTQwNjE1IiwibWwiOiI1LjQiLCJ1cmxXZWJFcUluZm9yIjoiaHR0cHM6Ly9zY3dlYi5jd2EuZ292LnR3L3poLVRXL2VhcnRocXVha2UvRGV0YWlscy8yMDI1MDgyMjE0MDYxNTU0MTE2IiwidXJsV2ViRXFSZXBvcnQiOiJodHRwczovL3Njd2ViLmN3YS5nb3YudHcvemgtVFcvZWFydGhxdWFrZS9JbWdzLzIwMjUwODIyMTQwNjE1NTQxMTYiLCJ1cmxXZWJFcUludGVuc2l0eSI6Imh0dHBzOi8vc2N3ZWIuY3dhLmdvdi50dy96aC1UVy9lYXJ0aHF1YWtlL1NoYWtlTWFwLzIwMjUwODIyMTQwNjE1NTQxMTYiLCJ1cmxXZWJFcVdhdmUiOiJodHRwczovL3Njd2ViLmN3YS5nb3YudHcvemgtVFcvZWFydGhxdWFrZS9XYXZlZm9ybUFjYy8yMDI1MDgyMjE0MDYxNTU0MTE2IiwidXJsUGljRXFSZXBvcnQiOiJodHRwczovL3Njd2ViLmN3YS5nb3YudHcvd2ViZGF0YS9PTERFUS8yMDI1MDgvMjAyNTA4MjIxNDA2MTU1NDExNi5naWYiLCJ1cmxQaWNFcUludGVuc2l0eSI6Imh0dHBzOi8vc2N3ZWIuY3dhLmdvdi50dy93ZWJkYXRhL2RyYXdUcmFjZS9wbG90Q29udG91ci8yMDI1LzIwMjUxMTZpLnBuZyIsInVybFBpY0VxUGdhIjoiaHR0cHM6Ly9zY3dlYi5jd2EuZ292LnR3L3dlYmRhdGEvZHJhd1RyYWNlL3Bsb3RDb250b3VyLzIwMjUvMjAyNTExNmEucG5nIiwidXJsUGljRXFQZ3YiOiJodHRwczovL3Njd2ViLmN3YS5nb3YudHcvd2ViZGF0YS9kcmF3VHJhY2UvcGxvdENvbnRvdXIvMjAyNS8yMDI1MTE2di5wbmcifQ=="}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* w-dwdata-tweq v1.0.
|
|
2
|
+
* w-dwdata-tweq v1.0.15
|
|
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("events"),require("chokidar"),require("url"),require("pino"),require("sharp")):"function"==typeof define&&define.amd?define(["fs","path","events","chokidar","url","pino","sharp"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["w-dwdata-tweq"]=t(e.fs,e.path,e.events,e.chokidar,e.url,e.pino,e.sharp)}(this,function(e,t,r,n,o,i,s){"use strict";var a="undefined"!=typeof document?document.currentScript:null,c=Array.isArray,u="object"==typeof global&&global&&global.Object===Object&&global,l="object"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function("return this")(),d=f.Symbol,p=Object.prototype,h=p.hasOwnProperty,y=p.toString,m=d?d.toStringTag:void 0;var v=Object.prototype.toString;var g=d?d.toStringTag:void 0;function b(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":g&&g in Object(e)?function(e){var t=h.call(e,m),r=e[m];try{e[m]=void 0;var n=!0}catch(e){}var o=y.call(e);return n&&(t?e[m]=r:delete e[m]),o}(e):function(e){return v.call(e)}(e)}function w(e){return null!=e&&"object"==typeof e}function S(e){return"symbol"==typeof e||w(e)&&"[object Symbol]"==b(e)}var _=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/;function E(e,t){if(c(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!S(e))||(O.test(e)||!_.test(e)||null!=t&&e in Object(t))}function j(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function x(e){if(!j(e))return!1;var t=b(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var R,A=f["__core-js_shared__"],T=(R=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+R:"";var $=Function.prototype.toString;function k(e){if(null!=e){try{return $.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var C=/^\[object .+?Constructor\]$/,D=Function.prototype,P=Object.prototype,N=D.toString,M=P.hasOwnProperty,L=RegExp("^"+N.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function F(e){return!(!j(e)||(t=e,T&&T in t))&&(x(e)?L:C).test(k(e));var t}function U(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return F(r)?r:void 0}var B=U(Object,"create");var q=Object.prototype.hasOwnProperty;var I=Object.prototype.hasOwnProperty;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])}}function H(e,t){return e===t||e!=e&&t!=t}function W(e,t){for(var r=e.length;r--;)if(H(e[r][0],t))return r;return-1}z.prototype.clear=function(){this.__data__=B?B(null):{},this.size=0},z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},z.prototype.get=function(e){var t=this.__data__;if(B){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return q.call(t,e)?t[e]:void 0},z.prototype.has=function(e){var t=this.__data__;return B?void 0!==t[e]:I.call(t,e)},z.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=B&&void 0===t?"__lodash_hash_undefined__":t,this};var Y=Array.prototype.splice;function J(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])}}J.prototype.clear=function(){this.__data__=[],this.size=0},J.prototype.delete=function(e){var t=this.__data__,r=W(t,e);return!(r<0)&&(r==t.length-1?t.pop():Y.call(t,r,1),--this.size,!0)},J.prototype.get=function(e){var t=this.__data__,r=W(t,e);return r<0?void 0:t[r][1]},J.prototype.has=function(e){return W(this.__data__,e)>-1},J.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 V=U(f,"Map");function K(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 G(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])}}G.prototype.clear=function(){this.size=0,this.__data__={hash:new z,map:new(V||J),string:new z}},G.prototype.delete=function(e){var t=K(this,e).delete(e);return this.size-=t?1:0,t},G.prototype.get=function(e){return K(this,e).get(e)},G.prototype.has=function(e){return K(this,e).has(e)},G.prototype.set=function(e,t){var r=K(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Z(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 s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(Z.Cache||G),r}Z.Cache=G;var X,Q,ee,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/\\(\\)?/g,ne=(X=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,function(e,r,n,o){t.push(n?o.replace(re,"$1"):r||e)}),t},Q=Z(X,function(e){return 500===ee.size&&ee.clear(),e}),ee=Q.cache,Q),oe=ne;function ie(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=d?d.prototype:void 0,ae=se?se.toString:void 0;function ce(e){if("string"==typeof e)return e;if(c(e))return ie(e,ce)+"";if(S(e))return ae?ae.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ue(e){return null==e?"":ce(e)}function le(e,t){return c(e)?e:E(e,t)?[e]:oe(ue(e))}function fe(e){if("string"==typeof e||S(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function de(e,t){for(var r=0,n=(t=le(t,e)).length;null!=e&&r<n;)e=e[fe(t[r++])];return r&&r==n?e:void 0}function pe(e,t,r){var n=null==e?void 0:de(e,t);return void 0===n?r:n}function he(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var ye,me=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),s=i.length;s--;){var a=i[ye?s:++n];if(!1===t(o[a],a,o))break}return e};function ve(e){return w(e)&&"[object Arguments]"==b(e)}var ge=Object.prototype,be=ge.hasOwnProperty,we=ge.propertyIsEnumerable,Se=ve(function(){return arguments}())?ve:function(e){return w(e)&&be.call(e,"callee")&&!we.call(e,"callee")},_e=Se;var Oe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ee=Oe&&"object"==typeof module&&module&&!module.nodeType&&module,je=Ee&&Ee.exports===Oe?f.Buffer:void 0,xe=(je?je.isBuffer:void 0)||function(){return!1},Re=/^(?:0|[1-9]\d*)$/;function Ae(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Re.test(e))&&e>-1&&e%1==0&&e<t}function Te(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var $e={};$e["[object Float32Array]"]=$e["[object Float64Array]"]=$e["[object Int8Array]"]=$e["[object Int16Array]"]=$e["[object Int32Array]"]=$e["[object Uint8Array]"]=$e["[object Uint8ClampedArray]"]=$e["[object Uint16Array]"]=$e["[object Uint32Array]"]=!0,$e["[object Arguments]"]=$e["[object Array]"]=$e["[object ArrayBuffer]"]=$e["[object Boolean]"]=$e["[object DataView]"]=$e["[object Date]"]=$e["[object Error]"]=$e["[object Function]"]=$e["[object Map]"]=$e["[object Number]"]=$e["[object Object]"]=$e["[object RegExp]"]=$e["[object Set]"]=$e["[object String]"]=$e["[object WeakMap]"]=!1;var ke="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ce=ke&&"object"==typeof module&&module&&!module.nodeType&&module,De=Ce&&Ce.exports===ke&&u.process,Pe=function(){try{var e=Ce&&Ce.require&&Ce.require("util").types;return e||De&&De.binding&&De.binding("util")}catch(e){}}(),Ne=Pe&&Pe.isTypedArray,Me=Ne?function(e){return function(t){return e(t)}}(Ne):function(e){return w(e)&&Te(e.length)&&!!$e[b(e)]},Le=Me,Fe=Object.prototype.hasOwnProperty;function Ue(e,t){var r=c(e),n=!r&&_e(e),o=!r&&!n&&xe(e),i=!r&&!n&&!o&&Le(e),s=r||n||o||i,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],u=a.length;for(var l in e)!t&&!Fe.call(e,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ae(l,u))||a.push(l);return a}var Be=Object.prototype;function qe(e,t){return function(r){return e(t(r))}}var Ie=qe(Object.keys,Object),ze=Object.prototype.hasOwnProperty;function He(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||Be))return Ie(e);var t,r,n=[];for(var o in Object(e))ze.call(e,o)&&"constructor"!=o&&n.push(o);return n}function We(e){return null!=e&&Te(e.length)&&!x(e)}function Ye(e){return We(e)?Ue(e):He(e)}var Je=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,s=Object(r);(t?i--:++i<o)&&!1!==n(s[i],i,s););return r}}(function(e,t){return e&&me(e,t,Ye)}),Ve=Je;function Ke(e){return e}function Ge(e,t){var r;return(c(e)?he:Ve)(e,"function"==typeof(r=t)?r:Ke)}var Ze=Array.prototype.reverse;function Xe(e){return"[object String]"===Object.prototype.toString.call(e)}function Qe(e){return!(!Xe(e)||""===e)}function et(e){let t=!1;if(Qe(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}function tt(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===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,st=/^0b[01]+$/i,at=/^0o[0-7]+$/i,ct=parseInt;function ut(e){if("number"==typeof e)return e;if(S(e))return NaN;if(j(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=j(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=ot(e);var r=st.test(e);return r||at.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}var pt=f.isFinite,ht=Math.min;var yt=function(e){var t=Math[e];return function(e,r){if(e=ut(e),(r=null==r?0:ht(dt(r),292))&&pt(e)){var n=(ue(e)+"e").split("e");return+((n=(ue(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}("round"),mt=yt;function vt(e){if(!et(e))return 0;return ft(e)}function gt(e){if(!et(e))return 0;e=vt(e);let t=mt(e);return"0"===String(t)?0:t}function bt(e,t={}){let r=pe(t,"fs");if(!r.existsSync(e))return!1;let n=r.lstatSync(e);return!n.isFile()&&!n.isSymbolicLink()}function wt(t){return bt(t,{fs:e})}function St(e,t={}){let r=pe(t,"fs");if(bt(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 _t(r){return function(e,t={}){let r=pe(t,"path"),n=pe(t,"fs");if(!n.existsSync(e)){let t=St(e,{fs:n});return t.error?t.error:{success:"done: "+e}}if(!bt(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 Ot(t){return St(t,{fs:e})}function Et(t){return function(e,t={}){let r=pe(t,"fs");if(!r.existsSync(e))return{success:"folder does not exist: "+e};if(!bt(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}}(t,{fs:e})}function jt(r,n=1){return function(e,t=1,r={}){let n=1,o=pe(r,"path"),i=pe(r,"fs");if(!bt(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);return function e(r){let s=[];return bt(r,{fs:i})?(Ge(i.readdirSync(r),function(a){let c=o.resolve(r,a),u=null;try{u=i.statSync(c)}catch(e){}u&&u.isDirectory()?(s.push({isFolder:!0,level:n,path:c,name:o.basename(c)}),n+=1,(n<=t||null===t)&&(s=s.concat(e(c))),n-=1):s.push({isFolder:!1,level:n,path:c,name:o.basename(c)})}),s):s}(e)}(r,n,{path:t,fs:e})}var xt=U(f,"DataView"),Rt=U(f,"Promise"),At=U(f,"Set"),Tt=U(f,"WeakMap"),$t="[object Map]",kt="[object Promise]",Ct="[object Set]",Dt="[object WeakMap]",Pt="[object DataView]",Nt=k(xt),Mt=k(V),Lt=k(Rt),Ft=k(At),Ut=k(Tt),Bt=b;(xt&&Bt(new xt(new ArrayBuffer(1)))!=Pt||V&&Bt(new V)!=$t||Rt&&Bt(Rt.resolve())!=kt||At&&Bt(new At)!=Ct||Tt&&Bt(new Tt)!=Dt)&&(Bt=function(e){var t=b(e),r="[object Object]"==t?e.constructor:void 0,n=r?k(r):"";if(n)switch(n){case Nt:return Pt;case Mt:return $t;case Lt:return kt;case Ft:return Ct;case Ut:return Dt}return t});var qt=Bt;function It(e){return function(t){return null==t?void 0:t[e]}}var zt=It("length"),Ht=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Wt(e){return Ht.test(e)}var Yt="\\ud800-\\udfff",Jt="["+Yt+"]",Vt="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Kt="\\ud83c[\\udffb-\\udfff]",Gt="[^"+Yt+"]",Zt="(?:\\ud83c[\\udde6-\\uddff]){2}",Xt="[\\ud800-\\udbff][\\udc00-\\udfff]",Qt="(?:"+Vt+"|"+Kt+")"+"?",er="[\\ufe0e\\ufe0f]?",tr=er+Qt+("(?:\\u200d(?:"+[Gt,Zt,Xt].join("|")+")"+er+Qt+")*"),rr="(?:"+[Gt+Vt+"?",Vt,Zt,Xt,Jt].join("|")+")",nr=RegExp(Kt+"(?="+Kt+")|"+rr+tr,"g");function or(e){return Wt(e)?function(e){for(var t=nr.lastIndex=0;nr.test(e);)++t;return t}(e):zt(e)}function ir(e){if(null==e)return 0;if(We(e))return"string"==typeof(t=e)||!c(t)&&w(t)&&"[object String]"==b(t)?or(e):e.length;var t,r=qt(e);return"[object Map]"==r||"[object Set]"==r?e.size:He(e).length}function sr(e){return"[object Object]"===Object.prototype.toString.call(e)}function ar(e){if(sr(e)){for(let t in e)return!0;return!1}return!1}function cr(e){return!!et(e)&&(e=vt(e),"number"==typeof(t=e)&&t==dt(t));var t}function ur(e){if(!cr(e))return!1;return gt(e)>=0}function lr(e){return!0===(t=e)||!1===t||w(t)&&"[object Boolean]"==b(t);var t}function fr(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}var dr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function hr(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 yr={exports:{}};var mr,vr={exports:{}},gr=hr(Object.freeze({__proto__:null,default:{}}));function br(){return mr||(mr=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!==dr&&dr.crypto&&(r=dr.crypto),!r)try{r=gr}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={},s=i.lib={},a=s.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=s.WordArray=a.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 s=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=s<<24-(n+i)%4*8}else for(var a=0;a<o;a+=4)t[n+a>>>2]=r[a>>>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=a.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=s.BufferedBlockAlgorithm=a.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,s=this.blockSize,a=i/(4*s),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*u,i);if(u){for(var f=0;f<u;f+=s)this._doProcessBlock(o,f);r=o.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:a.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)}(vr)),vr.exports}!function(e){e.exports=br().enc.Utf8}(yr);var wr=pr(yr.exports),Sr={exports:{}};!function(e){var t;e.exports=(t=br(),function(){var e=t,r=e.lib.WordArray;function n(e,t,n){for(var o=[],i=0,s=0;s<t;s++)if(s%4){var a=n[e.charCodeAt(s-1)]<<s%4*2|n[e.charCodeAt(s)]>>>6-s%4*2;o[i>>>2]|=a<<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 s=(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,a=0;a<4&&i+.75*a<r;a++)o.push(n.charAt(s>>>6*(3-a)&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 s=r.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return n(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(Sr);var _r=pr(Sr.exports);function Or(e){if(!Qe(e))return"";let t=wr.parse(e);return _r.stringify(t)}function Er(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function jr(e,t){var r=[];return Ve(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function xr(e){var t=this.__data__=new J(e);this.size=t.size}xr.prototype.clear=function(){this.__data__=new J,this.size=0},xr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},xr.prototype.get=function(e){return this.__data__.get(e)},xr.prototype.has=function(e){return this.__data__.has(e)},xr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof J){var n=r.__data__;if(!V||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new G(n)}return r.set(e,t),this.size=r.size,this};function Rr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new G;++t<r;)this.add(e[t])}function Ar(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 Tr(e,t){return e.has(t)}Rr.prototype.add=Rr.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Rr.prototype.has=function(e){return this.__data__.has(e)};function $r(e,t,r,n,o,i){var s=1&r,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))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 Rr:void 0;for(i.set(e,t),i.set(t,e);++f<a;){var h=e[f],y=t[f];if(n)var m=s?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(!Ar(t,function(e,t){if(!Tr(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 kr=f.Uint8Array;function Cr(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Dr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Pr=d?d.prototype:void 0,Nr=Pr?Pr.valueOf:void 0;var Mr=Object.prototype.propertyIsEnumerable,Lr=Object.getOwnPropertySymbols,Fr=Lr?function(e){return null==e?[]:(e=Object(e),Er(Lr(e),function(t){return Mr.call(e,t)}))}:function(){return[]};function Ur(e){return function(e,t,r){var n=t(e);return c(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,Ye,Fr)}var Br=Object.prototype.hasOwnProperty;var qr="[object Arguments]",Ir="[object Array]",zr="[object Object]",Hr=Object.prototype.hasOwnProperty;function Wr(e,t,r,n,o,i){var s=c(e),a=c(t),u=s?Ir:qt(e),l=a?Ir:qt(t),f=(u=u==qr?zr:u)==zr,d=(l=l==qr?zr:l)==zr,p=u==l;if(p&&xe(e)){if(!xe(t))return!1;s=!0,f=!1}if(p&&!f)return i||(i=new xr),s||Le(e)?$r(e,t,r,n,o,i):function(e,t,r,n,o,i,s){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 kr(e),new kr(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return H(+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 a=Cr;case"[object Set]":var c=1&n;if(a||(a=Dr),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var l=$r(a(e),a(t),n,o,i,s);return s.delete(e),l;case"[object Symbol]":if(Nr)return Nr.call(e)==Nr.call(t)}return!1}(e,t,u,r,n,o,i);if(!(1&r)){var h=f&&Hr.call(e,"__wrapped__"),y=d&&Hr.call(t,"__wrapped__");if(h||y){var m=h?e.value():e,v=y?t.value():t;return i||(i=new xr),o(m,v,r,n,i)}}return!!p&&(i||(i=new xr),function(e,t,r,n,o,i){var s=1&r,a=Ur(e),c=a.length;if(c!=Ur(t).length&&!s)return!1;for(var u=c;u--;){var l=a[u];if(!(s?l in t:Br.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=s;++u<c;){var y=e[l=a[u]],m=t[l];if(n)var v=s?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,b=t.constructor;g==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(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||!w(e)&&!w(t)?e!=e&&t!=t:Wr(e,t,r,n,Yr,o))}function Jr(e){return e==e&&!j(e)}function Vr(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}function Kr(e){var t=function(e){for(var t=Ye(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Jr(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,s=!n;if(null==e)return!i;for(e=Object(e);o--;){var a=r[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var c=(a=r[o])[0],u=e[c],l=a[1];if(s&&a[2]){if(void 0===u&&!(c in e))return!1}else{var f=new xr;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 Gr(e,t){return null!=e&&t in Object(e)}function Zr(e,t){return null!=e&&function(e,t,r){for(var n=-1,o=(t=le(t,e)).length,i=!1;++n<o;){var s=fe(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Te(o)&&Ae(s,o)&&(c(e)||_e(e))}(e,t,Gr)}function Xr(e){return E(e)?It(fe(e)):function(e){return function(t){return de(t,e)}}(e)}function Qr(e){return"function"==typeof e?e:null==e?Ke:"object"==typeof e?c(e)?function(e,t){return E(e)&&Jr(t)?Vr(fe(e),t):function(r){var n=pe(r,e);return void 0===n&&n===t?Zr(r,e):Yr(t,n,3)}}(e[0],e[1]):Kr(e):Xr(e)}function en(e,t){return(c(e)?Er:jr)(e,Qr(t))}function tn(e){return"[object Array]"===Object.prototype.toString.call(e)}function rn(e,t){return!!sr(e)&&(!(!Qe(t)&&!et(t))&&t in e)}function nn(e,t,r,n={}){let o=pe(n,"withInfor");lr(o)||(o=!0);let i={del:[],add:[],same:[],diff:[]};if(!Qe(r))return console.log("invalid key"),o&&(i.infor={}),i;tn(e)||(e=[e]),tn(t)||(t=[t]),e=en(e,e=>rn(e,r)),t=en(t,e=>rn(e,r));let s=new Map(t.map(e=>[e[r],e]));for(let t of e){let e=s.get(t[r]);if(e){JSON.stringify(t)===JSON.stringify(e)?i.same.push(e):i.diff.push(e),s.delete(t[r])}else i.del.push(t)}if(i.add=Array.from(s.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}var on={exports:{}};!function(e){e.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",s="hour",a="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,s=t.clone().add(n+(i?-1:1),u);return+(-(n+(r-o)/(i?o-s:s-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:a,D:d,h:s,m:i,s:o,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=m;var S="$isDayjsObject",_=function(e){return e instanceof x||!(!e||!e[S])},O=function e(t,r,n){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),r&&(w[i]=r,o=i);var s=t.split("-");if(!o&&s.length>1)return e(s[0])}else{var a=t.name;w[a]=t,o=a}return!n&&o&&(b=o),o||!n&&b},E=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new x(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 x=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(a)},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 b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return p(n?v-w:v+(6-w),m);case a:case d:return h(g+"Hours",0);case s: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[a]=l+"Date",r[d]=l+"Date",r[u]=l+"Month",r[f]=l+"FullYear",r[s]=l+"Hours",r[i]=l+"Minutes",r[o]=l+"Seconds",r[n]=l+"Milliseconds",r)[c],h=c===a?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===a)return y(1);if(h===c)return y(7);var m=(d={},d[i]=t,d[s]=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,s=this.$m,a=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 a+1;case"MM":return j.s(a+1,2,"0");case"MMM":return f(r.monthsShort,a,u,3);case"MMMM":return f(u,a);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,s,!0);case"A":return h(i,s,!1);case"m":return String(s);case"mm":return j.s(s,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,b=this-v,w=function(){return j.m(y,v)};switch(m){case f:h=w()/12;break;case u:h=w();break;case l:h=w()/3;break;case c:h=(b-g)/6048e5;break;case a:h=(b-g)/864e5;break;case s:h=b/r;break;case i:h=b/t;break;case o:h=b/e;break;default:h=b}return p?h:j.a(h)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return w[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}(),R=x.prototype;return E.prototype=R,[["$ms",n],["$s",o],["$m",i],["$H",s],["$W",a],["$M",u],["$y",f],["$D",d]].forEach(function(e){R[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),E.extend=function(e,t){return e.$i||(e(t,x,E),e.$i=!0),E},E.locale=O,E.isDayjs=_,E.unix=function(e){return E(1e3*e)},E.en=w[b],E.Ls=w,E.p={},E}()}(on);var sn=pr(on.exports);function an(){if(!tt(sn))throw new Error("invalid dayjs");return sn().format("YYYY-MM-DDTHH:mm:ssZ")}var cn={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,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new o(n,i||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.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},a.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,s=new Array(i);o<i;o++)s[o]=n[o].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,o,i,s){var a=r?r+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],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,s),!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},a.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||o&&!a.once||n&&a.context!==n||s(this,i);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||o&&!a[c].once||n&&a[c].context!==n)&&u.push(a[c]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a}(cn);var un=pr(cn.exports);function ln(){return new un}function fn(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 dn(){let e,t,r=new Promise(function(){e=arguments[0],t=arguments[1]});return r.resolve=e,r.reject=t,r}function pn(e,t){let r=dn();if(!tn(e)&&!sr(e))return r.reject("rs is not an array or object"),r;let n=!1;if(sr(e)){n=!0;let t=[];Ge(e,(e,r)=>{t.push({k:r,v:e})}),e=t}tt(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 s=o,a=r;return n&&(s=r.k,a=r.v),tt(t)?t(a,s):a})},Promise.resolve()).then(function(e){var t,n,o,s;i.push(e),s=null==(t=i)?0:t.length,i=s?fn(t,(n=o||void 0===n?1:dt(n))<0?0:n,s):[],r.resolve(i)}).catch(function(e){r.reject(e)}),r}function hn(e=10){et(e)||(e=10);let t=dn();return setTimeout(function(){t.resolve()},e),t}function yn(e){if(!cr(e))return!1;return gt(e)>0}var mn=qe(Object.getPrototypeOf,Object),vn=Function.prototype,gn=Object.prototype,bn=vn.toString,wn=gn.hasOwnProperty,Sn=bn.call(Object);function _n(e){if(!w(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(!w(e)||"[object Object]"!=b(e))return!1;var t=mn(e);if(null===t)return!0;var r=wn.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&bn.call(r)==Sn}(e)}function On(e){let t="";if(_n(e))t=e.message;else{if(Xe(e))return e;if(sr(e))return rn(e,"message")?e.message:JSON.stringify(e);if(tn(e))return JSON.stringify(e);t=function(e){if(!Qe(e)&&!et(e)&&!S(e))return"";let t="";try{t=String(e)}catch(e){}try{t=e.toString()}catch(e){}return t}(e)}return t}function En(e,t={}){let r=pe(t,"fs");return!!r.existsSync(e)&&(!r.lstatSync(e).isDirectory()&&!r.lstatSync(e).isSymbolicLink())}function jn(t){return En(t,{fs:e})}function xn(t){return function(e,t={}){let r=pe(t,"fs");if(!r.existsSync(e))return{success:"file does not exist: "+e};if(!En(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}}(t,{fs:e})}function Rn(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!bt(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};try{o.readdirSync(e).forEach(function(r){let i=n.resolve(e,r),s=n.resolve(t,r),a=o.lstatSync(i);if(a.isDirectory())St(s,{fs:o}),Rn(i,s,{path:n,fs:o});else if(a.isSymbolicLink()){let e=o.readlinkSync(i);o.symlinkSync(e,s)}else St(n.dirname(s),{fs:o}),o.copyFileSync(i,s)})}catch(e){return{error:e}}return{success:"done: "+t}}function An(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs"),i=pe(r,"useSync","");lr(i)||(i=!0);let s="";return s=i?Rn(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!bt(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};let i=async(e,t)=>{let r=o.readdirSync(e);for(let s of r){let r=n.join(e,s),a=n.join(t,s),c=o.lstatSync(r);if(c.isDirectory())St(a,{fs:o}),await i(r,a);else if(c.isSymbolicLink()){let e=o.readlinkSync(r);o.symlinkSync(e,a)}else St(n.dirname(a),{fs:o}),await new Promise((e,t)=>{let n=o.createReadStream(r),i=o.createWriteStream(a);n.on("error",t),i.on("error",t),i.on("finish",e),n.pipe(i)})}},s=null;return await i(e,t).then(()=>{s={success:"done: "+t}}).catch(e=>{s={error:e}}),s}(e,t,{path:n,fs:o}),s}function Tn(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 $n(e=300){return new function(e){let t=[],r=null,n=null;return yn(e)||(e=300),e=gt(e),function(o,...i){tt(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 kn(e,o={}){let i=pe(o,"polling");lr(i)||(i=!1);let s=pe(o,"timeInterval");yn(s)||(s=100),s=gt(s);let a=pe(o,"timeBinaryInterval");yn(a)||(a=300),a=gt(a);let c=new r.EventEmitter,u=e,l=null,f=setInterval(()=>{null===l&&jn(u)&&(l=n.watch(u,{usePolling:i,interval:s,binaryInterval:a,awaitWriteFinish:!0}),l.on("all",(e,r,n)=>{r=t.resolve(r),c.emit("change",{type:e,fp:r,stats:n})}))},s);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 Cn(t,r,n={}){wt(t)||Ot(t),wt(r)||Ot(r);let o=`${t}/fpHash.json`,i=`${r}/fpHash.json`,s=t=>{let r={};try{r=function(e){if(!Qe(e))return{};let t={};try{t=JSON.parse(e)}catch(e){t={}}return t}(e.readFileSync(t,"utf8"))}catch(e){}return r},a=(t,r)=>{try{let n=Tn(r);e.writeFileSync(t,n,"utf8")}catch(e){}},c=(e,t)=>pe(s(e),t,""),u=(e,t,r)=>{let n=s(e);n[t]=r,a(e,n)},l=(e,t)=>{let r=s(e);rn(r,t)&&delete r[t],a(e,r)},f=()=>s(o),d=e=>a(o,e),p=e=>c(o,e),h=()=>s(i),y=e=>a(i,e),m=e=>c(i,e),v=(e,t)=>u(i,e,t),g=e=>l(i,e),b=e=>{let t=[];return Ge(e,(e,r)=>{t.push({fp:r,hash:e})}),t};return{buildSrc:()=>{let e=ln();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=ln(),t=$n(300),r=kn(o);return r.on("change",r=>{t(()=>{(async()=>{let t=dn(),r=f();if(!ar(r))return t.resolve("no src"),t;let n=h(),o=b(r),i=nn(b(n),o,"fp",{withInfor:!1}),s=dn();return s.then(e=>{y(r)}).catch(()=>{}),e.emit("change",{kpSrc:r,kpTar:n,kpCmp:i,pm:s}),t})().catch(()=>{})})}),e.set=v,e.get=m,e.remove=g,e.readKp=h,e.writeKp=y,e.clear=r.clear,e}}}let Dn=o.fileURLToPath("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(Dn).href:"undefined"==typeof document?location.href:a&&"SCRIPT"===a.tagName.toUpperCase()&&a.src||new URL("w-dwdata-tweq.umd.js",document.baseURI).href),Pn=t.dirname(Dn);let Nn=async(r={})=>{let n=pe(r,"keyId");Qe(n)||(n="id");let o=pe(r,"fdDwAttime");Qe(o)||(o="./_dwAttime"),wt(o)||Ot(o);let s=pe(r,"fdDwCurrent");Qe(s)||(s="./_dwCurrent"),wt(s)||Ot(s);let a=pe(r,"fdTagModify");Qe(a)||(a="./_tagModify");let c=pe(r,"fdTagRemove");Qe(c)||(c="./_tagRemove");let u=pe(r,"fdResult");Qe(u)||(u="./_result"),wt(u)||Ot(u);let l=pe(r,"fdTaskCpActualSrc");Qe(l)||(l="./_taskCpActualSrc"),wt(l)||Ot(l);let f=pe(r,"fdTaskCpSrc");Qe(f)||(f="./_taskCpSrc"),wt(f)||Ot(f);let d=pe(r,"fdLog");Qe(d)||(d="./_logs"),wt(d)||Ot(d);let p=pe(r,"funDownload");if(!tt(p))throw new Error("invalid funDownload");let h=pe(r,"funGetCurrent");if(!tt(h))throw new Error("invalid funGetCurrent");let y=pe(r,"funAdd");if(!tt(y))throw new Error("invalid funAdd");let m=pe(r,"funModify");if(!tt(m))throw new Error("invalid funModify");let v=pe(r,"funRemove");if(!tt(v))throw new Error("invalid funRemove");let g=pe(r,"timeToleranceRemove");ur(g)||(g=36e5),g=vt(g),g>=0&&!wt(c)&&Ot(c);let b=ln(),w=function(e={}){let r=pe(e,"fdLog");Qe(r)||(r="./_logs");let n=pe(e,"interval");"day"!==n&&"hr"!==n&&(n="day");let o=i.transport({targets:[{level:"info",target:t.resolve(Pn,"./formatter.mjs"),options:{interval:n,fdLog:r}}]});return i(o)}({fdLog:d,interval:"hr"}),S={info:e=>{w.info(e),b.emit("change",{type:"info",...e})},warn:e=>{w.warn(e),b.emit("change",{type:"warn",...e})},error:e=>{w.error(e),b.emit("change",{type:"error",...e})}},_=async t=>{let r=await(async(t,r,n="")=>{let o="";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}]`);o=c;let i=`${o}/${r}`,s={time:an(),hash:n};e.writeFileSync(i,JSON.stringify(s),"utf8")})("remove",t);return r},O=async(t,r={})=>{let n=await(async(t,r,n={})=>{let o=pe(n,"checkTime");lr(o)||(o=!0);let i=pe(n,"timeNow"),s="",a=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=c,a=g;let u=`${s}/${r}`;if(!jn(u))return{b:!1,msg:`fp[${u}] is not a file`};if(!o)return{b:!0,msg:`fp[${u}] exists`};if(!ar(i))throw new Error("invalid timeNow");let l=e.readFileSync(u,"utf8"),f=pe(JSON.parse(l),"time"),d=sn(f),p=i.diff(d,"millisecond"),h=p>=a;return h?{b:h,msg:`time difference[${p}] >= time tolerance[${a}]`}:{b:h,msg:"allowable time difference"}})("remove",t,r);return n},E=async t=>{let r=await(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=c;let o=`${n}/${r}`;if(!jn(o))return;let i=e.readFileSync(o,"utf8"),s=JSON.parse(i),a=xn(o);if(a.error)throw new Error(a.error);return s})("remove",t);return r},j=null,x=(async()=>{await hn(1);let r=sn(),i=()=>{let e=sn(),t=e.diff(r,"second");return{timeRunStart:r.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunEnd:e.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunSpent:`${t}s`}};S.info({event:"start",msg:"running..."});let a="",c=Cn(l,l).buildSrc(),u=Cn(f,f);j=u.buildSrc();let d=[];try{S.info({event:"proc-callfun-download",msg:"start..."});let e=p();fr(e)&&(e=await e),S.info({event:"proc-callfun-download",num:ir(e),msg:"done"}),d=e}catch(e){console.log(e),S.error({event:"proc-callfun-download",msg:On(e)}),a="error at proc-callfun-download"}if(Qe(a))return console.log("error occurred, task canceled"),void S.info({event:"cancel",...i(),msg:a});let b=[];try{S.info({event:"proc-callfun-getCurrent",msg:"start..."});let e=h();fr(e)&&(e=await e),S.info({event:"proc-callfun-getCurrent",num:ir(e),msg:"done"}),b=e}catch(e){console.log(e),S.error({event:"proc-callfun-getCurrent",msg:On(e)}),a="error at proc-callfun-getCurrent"}if(Qe(a))return console.log("error occurred, task canceled"),void S.info({event:"cancel",...i(),msg:a});if(0===ir(d))return console.log("invalid data, task canceled"),void S.info({event:"cancel",...i(),msg:"no data"});let w=null;try{S.info({event:"compare",msg:"start..."}),w=nn(b,d,n,{withInfor:!1}),S.info({event:"compare",msg:"done"})}catch(e){console.log(e),S.error({event:"compare",msg:On(e)})}if(!ar(w))return console.log("can not calculate the difference, task canceled"),void S.info({event:"cancel",...i(),msg:"can not calculate the difference between the data before and after"});if(0!==ir(w.del)||0!==ir(w.add)||0!==ir(w.diff)){if(await pn(w.del,async e=>{if(!Qe(a)){try{S.info({event:"proc-remove-callfun-remove",[n]:e[n],msg:"start..."});let t=v(e);fr(t)&&(t=await t)}catch(t){console.log(t),S.error({event:"proc-remove-callfun-remove",[n]:e[n],msg:On(t)}),a="error at proc-remove-callfun-remove"}if(!Qe(a))try{if(c.remove(e[n]),g<=0)j.remove(e[n]),S.info({event:"proc-remove-callfun-remove",[n]:e[n],msg:"done"});else{(await O(e[n],{checkTime:!1})).b||(await _(e[n]),S.info({event:"proc-remove-callfun-remove",[n]:e[n],msg:"tag"}))}}catch(t){console.log(t),S.error({event:"proc-remove-otkActual-remove",[n]:e[n],msg:On(t)}),a="error at proc-remove-otkActual-remove"}}}),Qe(a))return console.log("error occurred, task canceled"),void S.info({event:"cancel",...i(),msg:a});if(await pn(w.add,async e=>{if(!Qe(a)){try{S.info({event:"proc-add-callfun-add",[n]:e[n],msg:"start..."});let t=y(e);fr(t)&&(t=await t)}catch(t){console.log(t),S.error({event:"proc-add-callfun-add",[n]:e[n],msg:On(t)}),a="error at proc-add-callfun-add"}if(!Qe(a))try{let t=Or(JSON.stringify(e));if(c.set(e[n],t),g<=0)j.set(e[n],t),S.info({event:"proc-add-callfun-add",[n]:e[n],msg:"done"});else{(await O(e[n],{checkTime:!1})).b?(await E(e[n]),S.info({event:"proc-add-callfun-add",[n]:e[n],msg:"release-tag"})):(j.set(e[n],t),S.info({event:"proc-add-callfun-add",[n]:e[n],msg:"done"}))}}catch(t){console.log(t),S.error({event:"proc-add-otkActual-set",[n]:e[n],msg:On(t)}),a="error at proc-add-otkActual-set"}}}),Qe(a))return console.log("error occurred, task canceled"),void S.info({event:"cancel",...i(),msg:a});if(await pn(w.diff,async e=>{if(!Qe(a)){try{S.info({event:"proc-diff-callfun-modify",[n]:e[n],msg:"start..."});let t=m(e);fr(t)&&(t=await t)}catch(t){console.log(t),S.error({event:"proc-diff-callfun-modify",[n]:e[n],msg:On(t)}),a="error at proc-diff-callfun-modify"}if(!Qe(a))try{let t=Or(JSON.stringify(e));c.set(e[n],t),j.set(e[n],t),S.info({event:"proc-diff-callfun-modify",[n]:e[n],msg:"done"})}catch(t){console.log(t),S.error({event:"proc-diff-otkActual-set",[n]:e[n],msg:On(t)}),a="error at proc-diff-otkActual-set"}}}),Qe(a))return console.log("error occurred, task canceled"),void S.info({event:"cancel",...i(),msg:a});{_t(s);let r=function(r,n,o={}){return An(r,n,{path:t,fs:e,...o})}(o,s);if(r.error)return console.log(r.error),S.error({event:"task-update-rawData",msg:r.error}),void(a="error at task-update-rawData")}if(Qe(a))return console.log("error occurred, task canceled"),void S.info({event:"cancel",...i(),msg:a});S.info({event:"end",...i(),msg:"done"})}else S.info({event:"cancel",...i(),msg:"no difference"})})().catch(e=>{console.log(e),S.error({event:"proc-coreSrc",msg:On(e)})}),R=(async()=>{await async function(e,t={}){let r=null,n=dn();if(!tt(e))return n.reject("waitfunction需輸入函數f"),n;let o=async()=>{let t=e();return fr(t)&&(t=await t),t};if(r=await o(),!0===r)return n.resolve(),n;let i=pe(t,"attemptNum",null);yn(i)||(i=200);let s=pe(t,"timeInterval",null);yn(s)||(s=1e3);let a=0,c=setInterval(async()=>{a+=1,r=await o(),!0===r&&(clearInterval(c),n.resolve()),a>i&&(clearInterval(c),n.reject(`exceeded attemptNum[${i}]`))},s);return n}(()=>null!==j);let e=sn(),t=jt(c,1),r=jt(a,1);0===ir(t)&&0===ir(r)||await pn(t,async t=>{(await O(t.name,{timeNow:e,checkTime:!0})).b&&(await E(t.name),S.info({event:"proc-detect-remove",[n]:t.name,from:"debounce",msg:"release-tag"}),j.remove(t.name),S.info({event:"proc-detect-remove",[n]:t.name,from:"debounce",msg:"done"}))})})().catch(e=>{console.log(e),S.error({event:"proc-coreDetect",msg:On(e)})});return b.srlog=S,Promise.all([x,R]).finally(()=>{b.emit("end")}),b};function Mn(e,t){var r=-1,n=We(e)?Array(e.length):[];return Ve(e,function(e,o,i){n[++r]=t(e,o,i)}),n}function Ln(e,t){return(c(e)?ie:Mn)(e,Qr(t))}var Fn=Array.prototype.join;function Un(e,t){return function(){return e.apply(t,arguments)}}const{toString:Bn}=Object.prototype,{getPrototypeOf:qn}=Object,{iterator:In,toStringTag:zn}=Symbol,Hn=(e=>t=>{const r=Bn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Wn=e=>(e=e.toLowerCase(),t=>Hn(t)===e),Yn=e=>t=>typeof t===e,{isArray:Jn}=Array,Vn=Yn("undefined");function Kn(e){return null!==e&&!Vn(e)&&null!==e.constructor&&!Vn(e.constructor)&&Xn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Gn=Wn("ArrayBuffer");const Zn=Yn("string"),Xn=Yn("function"),Qn=Yn("number"),eo=e=>null!==e&&"object"==typeof e,to=e=>{if("object"!==Hn(e))return!1;const t=qn(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||zn in e||In in e)},ro=Wn("Date"),no=Wn("File"),oo=Wn("Blob"),io=Wn("FileList"),so=Wn("URLSearchParams"),[ao,co,uo,lo]=["ReadableStream","Request","Response","Headers"].map(Wn);function fo(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),Jn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Kn(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function po(e,t){if(Kn(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 ho="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,yo=e=>!Vn(e)&&e!==ho;const mo=(vo="undefined"!=typeof Uint8Array&&qn(Uint8Array),e=>vo&&e instanceof vo);var vo;const go=Wn("HTMLFormElement"),bo=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),wo=Wn("RegExp"),So=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};fo(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)};const _o=Wn("AsyncFunction"),Oo=(Eo="function"==typeof setImmediate,jo=Xn(ho.postMessage),Eo?setImmediate:jo?(xo=`axios@${Math.random()}`,Ro=[],ho.addEventListener("message",({source:e,data:t})=>{e===ho&&t===xo&&Ro.length&&Ro.shift()()},!1),e=>{Ro.push(e),ho.postMessage(xo,"*")}):e=>setTimeout(e));var Eo,jo,xo,Ro;const Ao="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ho):"undefined"!=typeof process&&process.nextTick||Oo;var To={isArray:Jn,isArrayBuffer:Gn,isBuffer:Kn,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Xn(e.append)&&("formdata"===(t=Hn(e))||"object"===t&&Xn(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Gn(e.buffer),t},isString:Zn,isNumber:Qn,isBoolean:e=>!0===e||!1===e,isObject:eo,isPlainObject:to,isEmptyObject:e=>{if(!eo(e)||Kn(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:ao,isRequest:co,isResponse:uo,isHeaders:lo,isUndefined:Vn,isDate:ro,isFile:no,isBlob:oo,isRegExp:wo,isFunction:Xn,isStream:e=>eo(e)&&Xn(e.pipe),isURLSearchParams:so,isTypedArray:mo,isFileList:io,forEach:fo,merge:function e(){const{caseless:t}=yo(this)&&this||{},r={},n=(n,o)=>{const i=t&&po(r,o)||o;to(r[i])&&to(n)?r[i]=e(r[i],n):to(n)?r[i]=e({},n):Jn(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&fo(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(fo(t,(t,n)=>{r&&Xn(t)?e[n]=Un(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,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&qn(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Hn,kindOfTest:Wn,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(Jn(e))return e;let t=e.length;if(!Qn(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[In]).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:go,hasOwnProperty:bo,hasOwnProp:bo,reduceDescriptors:So,freezeMethods:e=>{So(e,(t,r)=>{if(Xn(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Xn(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 Jn(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:po,global:ho,isContextDefined:yo,isSpecCompliantForm:function(e){return!!(e&&Xn(e.append)&&"FormData"===e[zn]&&e[In])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(eo(e)){if(t.indexOf(e)>=0)return;if(Kn(e))return e;if(!("toJSON"in e)){t[n]=e;const o=Jn(e)?[]:{};return fo(e,(e,t)=>{const i=r(e,n+1);!Vn(i)&&(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:_o,isThenable:e=>e&&(eo(e)||Xn(e))&&Xn(e.then)&&Xn(e.catch),setImmediate:Oo,asap:Ao,isIterable:e=>null!=e&&Xn(e[In])};function $o(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)}To.inherits($o,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:To.toJSONObject(this.config),code:this.code,status:this.status}}});const ko=$o.prototype,Co={};["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=>{Co[e]={value:e}}),Object.defineProperties($o,Co),Object.defineProperty(ko,"isAxiosError",{value:!0}),$o.from=(e,t,r,n,o,i)=>{const s=Object.create(ko);return To.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),$o.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};function Do(e){return To.isPlainObject(e)||To.isArray(e)}function Po(e){return To.endsWith(e,"[]")?e.slice(0,-2):e}function No(e,t,r){return e?e.concat(t).map(function(e,t){return e=Po(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const Mo=To.toFlatObject(To,{},null,function(e){return/^is[A-Z]/.test(e)});function Lo(e,t,r){if(!To.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=To.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!To.isUndefined(t[e])})).metaTokens,o=r.visitor||u,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&To.isSpecCompliantForm(t);if(!To.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(To.isDate(e))return e.toISOString();if(To.isBoolean(e))return e.toString();if(!a&&To.isBlob(e))throw new $o("Blob is not supported. Use a Buffer instead.");return To.isArrayBuffer(e)||To.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(To.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(To.isArray(e)&&function(e){return To.isArray(e)&&!e.some(Do)}(e)||(To.isFileList(e)||To.endsWith(r,"[]"))&&(a=To.toArray(e)))return r=Po(r),a.forEach(function(e,n){!To.isUndefined(e)&&null!==e&&t.append(!0===s?No([r],n,i):null===s?r:r+"[]",c(e))}),!1;return!!Do(e)||(t.append(No(o,r,i),c(e)),!1)}const l=[],f=Object.assign(Mo,{defaultVisitor:u,convertValue:c,isVisitable:Do});if(!To.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!To.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),To.forEach(r,function(r,i){!0===(!(To.isUndefined(r)||null===r)&&o.call(t,r,To.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])}),l.pop()}}(e),t}function Fo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Uo(e,t){this._pairs=[],e&&Lo(e,this,t)}const Bo=Uo.prototype;function qo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Io(e,t,r){if(!t)return e;const n=r&&r.encode||qo;To.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):To.isURLSearchParams(t)?t.toString():new Uo(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Bo.append=function(e,t){this._pairs.push([e,t])},Bo.toString=function(e){const t=e?function(t){return e.call(this,t,Fo)}:Fo;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var zo=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){To.forEach(this.handlers,function(t){null!==t&&e(t)})}},Ho={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Wo={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Uo,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Yo="undefined"!=typeof window&&"undefined"!=typeof document,Jo="object"==typeof navigator&&navigator||void 0,Vo=Yo&&(!Jo||["ReactNative","NativeScript","NS"].indexOf(Jo.product)<0),Ko="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Go=Yo&&window.location.href||"http://localhost";var Zo={...Object.freeze({__proto__:null,hasBrowserEnv:Yo,hasStandardBrowserEnv:Vo,hasStandardBrowserWebWorkerEnv:Ko,navigator:Jo,origin:Go}),...Wo};function Xo(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;if(i=!i&&To.isArray(n)?n.length:i,a)return To.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s;n[i]&&To.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&To.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])),!s}if(To.isFormData(e)&&To.isFunction(e.entries)){const r={};return To.forEachEntry(e,(e,n)=>{t(function(e){return To.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const Qo={transitional:Ho,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=To.isObject(e);o&&To.isHTMLForm(e)&&(e=new FormData(e));if(To.isFormData(e))return n?JSON.stringify(Xo(e)):e;if(To.isArrayBuffer(e)||To.isBuffer(e)||To.isStream(e)||To.isFile(e)||To.isBlob(e)||To.isReadableStream(e))return e;if(To.isArrayBufferView(e))return e.buffer;if(To.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 Lo(e,new Zo.classes.URLSearchParams,{visitor:function(e,t,r,n){return Zo.isNode&&To.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=To.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Lo(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(To.isString(e))try{return(t||JSON.parse)(e),To.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Qo.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(To.isResponse(e)||To.isReadableStream(e))return e;if(e&&To.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw $o.from(e,$o.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:Zo.classes.FormData,Blob:Zo.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};To.forEach(["delete","get","head","post","put","patch"],e=>{Qo.headers[e]={}});var ei=Qo;const ti=To.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 ri=Symbol("internals");function ni(e){return e&&String(e).trim().toLowerCase()}function oi(e){return!1===e||null==e?e:To.isArray(e)?e.map(oi):String(e)}function ii(e,t,r,n,o){return To.isFunction(n)?n.call(this,t,r):(o&&(t=r),To.isString(t)?To.isString(n)?-1!==t.indexOf(n):To.isRegExp(n)?n.test(t):void 0:void 0)}class si{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=ni(t);if(!o)throw new Error("header name must be a non-empty string");const i=To.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=oi(e))}const i=(e,t)=>To.forEach(e,(e,r)=>o(e,r,t));if(To.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(To.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]&&ti[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(To.isObject(e)&&To.isIterable(e)){let r,n,o={};for(const t of e){if(!To.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?To.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=ni(e)){const r=To.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(To.isFunction(t))return t.call(this,e,r);if(To.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ni(e)){const r=To.findKey(this,e);return!(!r||void 0===this[r]||t&&!ii(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=ni(e)){const o=To.findKey(r,e);!o||t&&!ii(0,r[o],o,t)||(delete r[o],n=!0)}}return To.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&&!ii(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return To.forEach(this,(n,o)=>{const i=To.findKey(r,o);if(i)return t[i]=oi(n),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();s!==o&&delete t[o],t[s]=oi(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return To.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&To.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[ri]=this[ri]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ni(e);t[n]||(!function(e,t){const r=To.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 To.isArray(e)?e.forEach(n):n(e),this}}si.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),To.reduceDescriptors(si.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),To.freezeMethods(si);var ai=si;function ci(e,t){const r=this||ei,n=t||r,o=ai.from(n.headers);let i=n.data;return To.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function ui(e){return!(!e||!e.__CANCEL__)}function li(e,t,r){$o.call(this,null==e?"canceled":e,$o.ERR_CANCELED,t,r),this.name="CanceledError"}function fi(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new $o("Request failed with status code "+r.status,[$o.ERR_BAD_REQUEST,$o.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}To.inherits(li,$o,{__CANCEL__:!0});const di=(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,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=n[s];o||(o=c),r[i]=a,n[i]=c;let l=s,f=0;for(;l!==i;)f+=r[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+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 s=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},i-a)))},()=>r&&s(r)]}(r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,a=i-n,c=o(a);n=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},pi=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},hi=e=>(...t)=>To.asap(()=>e(...t));var yi=Zo.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Zo.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Zo.origin),Zo.navigator&&/(msie|trident)/i.test(Zo.navigator.userAgent)):()=>!0,mi=Zo.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];To.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),To.isString(n)&&s.push("path="+n),To.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.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 vi(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 gi=e=>e instanceof ai?{...e}:e;function bi(e,t){t=t||{};const r={};function n(e,t,r,n){return To.isPlainObject(e)&&To.isPlainObject(t)?To.merge.call({caseless:n},e,t):To.isPlainObject(t)?To.merge({},t):To.isArray(t)?t.slice():t}function o(e,t,r,o){return To.isUndefined(t)?To.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!To.isUndefined(t))return n(void 0,t)}function s(e,t){return To.isUndefined(t)?To.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(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:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>o(gi(e),gi(t),0,!0)};return To.forEach(Object.keys({...e,...t}),function(n){const i=c[n]||o,s=i(e[n],t[n],n);To.isUndefined(s)&&i!==a||(r[n]=s)}),r}var wi=e=>{const t=bi({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=ai.from(a),t.url=Io(vi(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),To.isFormData(n))if(Zo.hasStandardBrowserEnv||Zo.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(Zo.hasStandardBrowserEnv&&(o&&To.isFunction(o)&&(o=o(t)),o||!1!==o&&yi(t.url))){const e=i&&s&&mi.read(s);e&&a.set(i,e)}return t};var Si="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=wi(e);let o=n.data;const i=ai.from(n.headers).normalize();let s,a,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=n;function h(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let y=new XMLHttpRequest;function m(){if(!y)return;const n=ai.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());fi(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 $o("Request aborted",$o.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new $o("Network Error",$o.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Ho;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new $o(t,o.clarifyTimeoutError?$o.ETIMEDOUT:$o.ECONNABORTED,e,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&To.forEach(i.toJSON(),function(e,t){y.setRequestHeader(t,e)}),To.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),f&&"json"!==f&&(y.responseType=n.responseType),p&&([c,l]=di(p,!0),y.addEventListener("progress",c)),d&&y.upload&&([a,u]=di(d),y.upload.addEventListener("progress",a),y.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(s=t=>{y&&(r(!t||t.type?new li(null,e,y):t),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);v&&-1===Zo.protocols.indexOf(v)?r(new $o("Unsupported protocol "+v+":",$o.ERR_BAD_REQUEST,e)):y.send(o||null)})};var _i=(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,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof $o?t:new li(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new $o(`timeout ${t} of ms exceeded`,$o.ETIMEDOUT))},t);const s=()=>{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:a}=n;return a.unsubscribe=()=>To.asap(s),a}};const Oi=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},Ei=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()}},ji=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of Ei(e))yield*Oi(r,t)}(e,t);let i,s=0,a=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 a(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},xi="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ri=xi&&"function"==typeof ReadableStream,Ai=xi&&("function"==typeof TextEncoder?(Ti=new TextEncoder,e=>Ti.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ti;const $i=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ki=Ri&&$i(()=>{let e=!1;const t=new Request(Zo.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ci=Ri&&$i(()=>To.isReadableStream(new Response("").body)),Di={stream:Ci&&(e=>e.body)};var Pi;xi&&(Pi=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Di[e]&&(Di[e]=To.isFunction(Pi[e])?t=>t[e]():(t,r)=>{throw new $o(`Response type '${e}' is not supported`,$o.ERR_NOT_SUPPORT,r)})}));const Ni=async(e,t)=>{const r=To.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(To.isBlob(e))return e.size;if(To.isSpecCompliantForm(e)){const t=new Request(Zo.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return To.isArrayBufferView(e)||To.isArrayBuffer(e)?e.byteLength:(To.isURLSearchParams(e)&&(e+=""),To.isString(e)?(await Ai(e)).byteLength:void 0)})(t):r};var Mi=xi&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:d}=wi(e);u=u?(u+"").toLowerCase():"text";let p,h=_i([o,i&&i.toAbortSignal()],s);const y=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let m;try{if(c&&ki&&"get"!==r&&"head"!==r&&0!==(m=await Ni(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(To.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=pi(m,di(hi(c)));n=ji(r.body,65536,e,t)}}To.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...d,signal:h,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?f:void 0});let i=await fetch(p,d);const s=Ci&&("stream"===u||"response"===u);if(Ci&&(a||s&&y)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=i[t]});const t=To.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&pi(t,di(hi(a),!0))||[];i=new Response(ji(i.body,65536,r,()=>{n&&n(),y&&y()}),e)}u=u||"text";let v=await Di[To.findKey(Di,u)||"text"](i,e);return!s&&y&&y(),await new Promise((t,r)=>{fi(t,r,{data:v,headers:ai.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})})}catch(t){if(y&&y(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new $o("Network Error",$o.ERR_NETWORK,e,p),{cause:t.cause||t});throw $o.from(t,t&&t.code,e,p)}});const Li={http:null,xhr:Si,fetch:Mi};To.forEach(Li,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Fi=e=>`- ${e}`,Ui=e=>To.isFunction(e)||null===e||!1===e;var Bi=e=>{e=To.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!Ui(r)&&(n=Li[(t=String(r)).toLowerCase()],void 0===n))throw new $o(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new $o("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Fi).join("\n"):" "+Fi(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function qi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new li(null,e)}function Ii(e){qi(e),e.headers=ai.from(e.headers),e.data=ci.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Bi(e.adapter||ei.adapter)(e).then(function(t){return qi(e),t.data=ci.call(e,e.transformResponse,t),t.headers=ai.from(t.headers),t},function(t){return ui(t)||(qi(e),t&&t.response&&(t.response.data=ci.call(e,e.transformResponse,t.response),t.response.headers=ai.from(t.response.headers))),Promise.reject(t)})}const zi="1.11.0",Hi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Hi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Wi={};Hi.transitional=function(e,t,r){function n(e,t){return"[Axios v"+zi+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new $o(n(o," has been removed"+(t?" in "+t:"")),$o.ERR_DEPRECATED);return t&&!Wi[o]&&(Wi[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)}},Hi.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var Yi={assertOptions:function(e,t,r){if("object"!=typeof e)throw new $o("options must be an object",$o.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new $o("option "+i+" must be "+r,$o.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new $o("Unknown option "+i,$o.ERR_BAD_OPTION)}},validators:Hi};const Ji=Yi.validators;class Vi{constructor(e){this.defaults=e||{},this.interceptors={request:new zo,response:new zo}}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=bi(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Yi.assertOptions(r,{silentJSONParsing:Ji.transitional(Ji.boolean),forcedJSONParsing:Ji.transitional(Ji.boolean),clarifyTimeoutError:Ji.transitional(Ji.boolean)},!1),null!=n&&(To.isFunction(n)?t.paramsSerializer={serialize:n}:Yi.assertOptions(n,{encode:Ji.function,serialize:Ji.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Yi.assertOptions(t,{baseUrl:Ji.spelling("baseURL"),withXsrfToken:Ji.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&To.merge(o.common,o[t.method]);o&&To.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=ai.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.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(!a){const e=[Ii.bind(this),void 0];for(e.unshift(...s),e.push(...c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=s.length;let d=t;for(f=0;f<l;){const e=s[f++],t=s[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Ii.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 Io(vi((e=bi(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}To.forEach(["delete","get","head","options"],function(e){Vi.prototype[e]=function(t,r){return this.request(bi(r||{},{method:e,url:t,data:(r||{}).data}))}}),To.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(bi(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Vi.prototype[e]=t(),Vi.prototype[e+"Form"]=t(!0)});var Ki=Vi;class Gi{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 li(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 Gi(function(t){e=t}),cancel:e}}}var Zi=Gi;const Xi={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(Xi).forEach(([e,t])=>{Xi[t]=e});var Qi=Xi;const es=function e(t){const r=new Ki(t),n=Un(Ki.prototype.request,r);return To.extend(n,Ki.prototype,r,{allOwnKeys:!0}),To.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(bi(t,r))},n}(ei);es.Axios=Ki,es.CanceledError=li,es.CancelToken=Zi,es.isCancel=ui,es.VERSION=zi,es.toFormData=Lo,es.AxiosError=$o,es.Cancel=es.CanceledError,es.all=function(e){return Promise.all(e)},es.spread=function(e){return function(t){return e.apply(null,t)}},es.isAxiosError=function(e){return To.isObject(e)&&!0===e.isAxiosError},es.mergeConfig=bi,es.AxiosHeaders=ai,es.formToJSON=e=>Xo(To.isHTMLForm(e)?new FormData(e):e),es.getAdapter=Bi,es.HttpStatusCode=Qi,es.default=es;var ts=es;let rs=e=>{let t=Ln(e,(e,t)=>{let r=null==e?"":e;return`${encodeURIComponent(t)}=${encodeURIComponent(r)}`});var r,n;return n="&",null==(r=t)?"":Fn.call(r,n)};function ns(e){return e!=e}function os(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,ns,r)}var is="\\ud800-\\udfff",ss="["+is+"]",as="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",cs="\\ud83c[\\udffb-\\udfff]",us="[^"+is+"]",ls="(?:\\ud83c[\\udde6-\\uddff]){2}",fs="[\\ud800-\\udbff][\\udc00-\\udfff]",ds="(?:"+as+"|"+cs+")"+"?",ps="[\\ufe0e\\ufe0f]?",hs=ps+ds+("(?:\\u200d(?:"+[us,ls,fs].join("|")+")"+ps+ds+")*"),ys="(?:"+[us+as+"?",as,ls,fs,ss].join("|")+")",ms=RegExp(cs+"(?="+cs+")|"+ys+hs,"g");function vs(e){return Wt(e)?function(e){return e.match(ms)||[]}(e):function(e){return e.split("")}(e)}function gs(e,t,r){if((e=ue(e))&&(r||void 0===t))return ot(e);if(!e||!(t=ce(t)))return e;var n=vs(e),o=vs(t),i=function(e,t){for(var r=-1,n=e.length;++r<n&&os(t,e[r],0)>-1;);return r}(n,o),s=function(e,t){for(var r=e.length;r--&&os(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:fn(e,t,r)}(n,i,s).join("")}let bs=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)},ws=async(e,t)=>{wt(e)||Ot(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 pn(r,async t=>{let r=`${e}/${t.fn}`;await(async(e,t,r={})=>{let n=pe(r,"retries");ur(n)||(n=3),n=gt(n);let o=pe(r,"retrietimeDelays");ur(o)||(o=1e3),o=vt(o);let i="error",s=null,a=null;for(let r=1;r<=n&&(await bs(e,t).then(e=>{a=e,i="success"}).catch(e=>{s=e}),await hn(o),null===a);r++);if("error"===i)throw new Error(s);return a})(t.url,r)})};return async(t,r,n={})=>{if(!et(t))throw new Error("yearStart is not a number");if(t=gt(t),!et(r))throw new Error("yearEnd is not a number");r=gt(r);let o=pe(n,"keyId");Qe(o)||(o="id");let i=pe(n,"fdDwAttime");Qe(i)||(i="./_dwAttime"),wt(i)||Ot(i);let a=pe(n,"fdDwCurrent");Qe(a)||(a="./_dwCurrent"),wt(a)||Ot(a);let c=pe(n,"fdResult");Qe(c)||(c="./_result"),wt(c)||Ot(c);let u=pe(n,"fdTaskCpSrc");Qe(u)||(u="./_taskCpSrc"),wt(u)||Ot(u);let l=pe(n,"fdLog");Qe(l)||(l="./_logs"),wt(l)||Ot(l);let f=pe(n,"funDownload"),d=pe(n,"funGetCurrent"),p=pe(n,"funAdd"),h=pe(n,"funModify"),y=pe(n,"funRemove"),m=async()=>{let n=await(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 ts.post("https://scweb.cwa.gov.tw/zh-tw/earthquake/ajaxhandler",rs(r),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data}catch(e){console.log(e)}return n})(t,r),s=Ln(pe(n,"data",[]),e=>{let t=pe(e,0,""),r=pe(e,1,""),n=pe(e,2,""),o=pe(e,3,""),i=pe(e,4,""),s=pe(e,5,""),a=pe(e,6,""),c=pe(e,7,""),u=pe(e,8,"");r=gs(r);let l=sn(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 et(r)&&et(p)&&(y=`${gt(p)-1911}${r}`),{id:y,tag:t,number:r,time:f,timeRec:n,timeTag:d,ml:o,depth:i,location:s,intensity:a,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 a;return s=null==(a=s)?a:Ze.call(a),Ge(s,t=>{let r=`${i}/${t[o]}.json`;e.writeFileSync(r,JSON.stringify(t),"utf8")}),s};tt(f)||(f=m);let v=async()=>{let t=jt(a,1),r=[];return Ge(t,t=>{let n=e.readFileSync(t.path,"utf8"),o=JSON.parse(n);r.push(o)}),r};tt(d)||(d=v);let g=async e=>{let t=`${c}/${e[o]}`;wt(t)&&Et(t)};tt(y)||(y=g);let b=async e=>{let t=`${c}/${e[o]}`;wt(t)||Ot(t),_t(t),await ws(t,e);let r=`${t}/picEqReport.gif`,n=`${t}/picEqIntensityList.gif`;await(async(e,t,r,n,o,i)=>{await s(e,{animated:!1}).extract({left:r,top:n,width:o,height:i}).toFile(t)})(r,n,364,199,276,204)};tt(p)||(p=b);let w=async e=>{let t=`${c}/${e[o]}`;wt(t)||Ot(t),_t(t),await ws(t,e)};tt(h)||(h=w);let S={fdDwAttime:i,fdDwCurrent:a,fdResult:c,fdTaskCpSrc:u,fdLog:l,funDownload:f,funGetCurrent:d,funRemove:y,funAdd:p,funModify:h};return await Nn(S)}});
|
|
6
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("fs"),require("path"),require("events"),require("chokidar"),require("url"),require("pino"),require("sharp")):"function"==typeof define&&define.amd?define(["fs","path","events","chokidar","url","pino","sharp"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["w-dwdata-tweq"]=t(e.fs,e.path,e.events,e.chokidar,e.url,e.pino,e.sharp)}(this,function(e,t,r,n,o,i,s){"use strict";var a="undefined"!=typeof document?document.currentScript:null,c=Array.isArray,u="object"==typeof global&&global&&global.Object===Object&&global,l="object"==typeof self&&self&&self.Object===Object&&self,f=u||l||Function("return this")(),d=f.Symbol,p=Object.prototype,h=p.hasOwnProperty,y=p.toString,m=d?d.toStringTag:void 0;var v=Object.prototype.toString;var g=d?d.toStringTag:void 0;function b(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":g&&g in Object(e)?function(e){var t=h.call(e,m),r=e[m];try{e[m]=void 0;var n=!0}catch(e){}var o=y.call(e);return n&&(t?e[m]=r:delete e[m]),o}(e):function(e){return v.call(e)}(e)}function w(e){return null!=e&&"object"==typeof e}function S(e){return"symbol"==typeof e||w(e)&&"[object Symbol]"==b(e)}var _=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,O=/^\w*$/;function E(e,t){if(c(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!S(e))||(O.test(e)||!_.test(e)||null!=t&&e in Object(t))}function j(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function x(e){if(!j(e))return!1;var t=b(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}var R,A=f["__core-js_shared__"],T=(R=/[^.]+$/.exec(A&&A.keys&&A.keys.IE_PROTO||""))?"Symbol(src)_1."+R:"";var $=Function.prototype.toString;function k(e){if(null!=e){try{return $.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var C=/^\[object .+?Constructor\]$/,D=Function.prototype,P=Object.prototype,N=D.toString,M=P.hasOwnProperty,L=RegExp("^"+N.call(M).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function F(e){return!(!j(e)||(t=e,T&&T in t))&&(x(e)?L:C).test(k(e));var t}function U(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return F(r)?r:void 0}var B=U(Object,"create");var q=Object.prototype.hasOwnProperty;var I=Object.prototype.hasOwnProperty;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])}}function H(e,t){return e===t||e!=e&&t!=t}function W(e,t){for(var r=e.length;r--;)if(H(e[r][0],t))return r;return-1}z.prototype.clear=function(){this.__data__=B?B(null):{},this.size=0},z.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},z.prototype.get=function(e){var t=this.__data__;if(B){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return q.call(t,e)?t[e]:void 0},z.prototype.has=function(e){var t=this.__data__;return B?void 0!==t[e]:I.call(t,e)},z.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=B&&void 0===t?"__lodash_hash_undefined__":t,this};var Y=Array.prototype.splice;function J(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])}}J.prototype.clear=function(){this.__data__=[],this.size=0},J.prototype.delete=function(e){var t=this.__data__,r=W(t,e);return!(r<0)&&(r==t.length-1?t.pop():Y.call(t,r,1),--this.size,!0)},J.prototype.get=function(e){var t=this.__data__,r=W(t,e);return r<0?void 0:t[r][1]},J.prototype.has=function(e){return W(this.__data__,e)>-1},J.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 V=U(f,"Map");function K(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 G(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])}}G.prototype.clear=function(){this.size=0,this.__data__={hash:new z,map:new(V||J),string:new z}},G.prototype.delete=function(e){var t=K(this,e).delete(e);return this.size-=t?1:0,t},G.prototype.get=function(e){return K(this,e).get(e)},G.prototype.has=function(e){return K(this,e).has(e)},G.prototype.set=function(e,t){var r=K(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this};function Z(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 s=e.apply(this,n);return r.cache=i.set(o,s)||i,s};return r.cache=new(Z.Cache||G),r}Z.Cache=G;var X,Q,ee,te=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,re=/\\(\\)?/g,ne=(X=function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(te,function(e,r,n,o){t.push(n?o.replace(re,"$1"):r||e)}),t},Q=Z(X,function(e){return 500===ee.size&&ee.clear(),e}),ee=Q.cache,Q),oe=ne;function ie(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=d?d.prototype:void 0,ae=se?se.toString:void 0;function ce(e){if("string"==typeof e)return e;if(c(e))return ie(e,ce)+"";if(S(e))return ae?ae.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ue(e){return null==e?"":ce(e)}function le(e,t){return c(e)?e:E(e,t)?[e]:oe(ue(e))}function fe(e){if("string"==typeof e||S(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function de(e,t){for(var r=0,n=(t=le(t,e)).length;null!=e&&r<n;)e=e[fe(t[r++])];return r&&r==n?e:void 0}function pe(e,t,r){var n=null==e?void 0:de(e,t);return void 0===n?r:n}function he(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}var ye,me=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),s=i.length;s--;){var a=i[ye?s:++n];if(!1===t(o[a],a,o))break}return e};function ve(e){return w(e)&&"[object Arguments]"==b(e)}var ge=Object.prototype,be=ge.hasOwnProperty,we=ge.propertyIsEnumerable,Se=ve(function(){return arguments}())?ve:function(e){return w(e)&&be.call(e,"callee")&&!we.call(e,"callee")},_e=Se;var Oe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ee=Oe&&"object"==typeof module&&module&&!module.nodeType&&module,je=Ee&&Ee.exports===Oe?f.Buffer:void 0,xe=(je?je.isBuffer:void 0)||function(){return!1},Re=/^(?:0|[1-9]\d*)$/;function Ae(e,t){var r=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==r||"symbol"!=r&&Re.test(e))&&e>-1&&e%1==0&&e<t}function Te(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}var $e={};$e["[object Float32Array]"]=$e["[object Float64Array]"]=$e["[object Int8Array]"]=$e["[object Int16Array]"]=$e["[object Int32Array]"]=$e["[object Uint8Array]"]=$e["[object Uint8ClampedArray]"]=$e["[object Uint16Array]"]=$e["[object Uint32Array]"]=!0,$e["[object Arguments]"]=$e["[object Array]"]=$e["[object ArrayBuffer]"]=$e["[object Boolean]"]=$e["[object DataView]"]=$e["[object Date]"]=$e["[object Error]"]=$e["[object Function]"]=$e["[object Map]"]=$e["[object Number]"]=$e["[object Object]"]=$e["[object RegExp]"]=$e["[object Set]"]=$e["[object String]"]=$e["[object WeakMap]"]=!1;var ke="object"==typeof exports&&exports&&!exports.nodeType&&exports,Ce=ke&&"object"==typeof module&&module&&!module.nodeType&&module,De=Ce&&Ce.exports===ke&&u.process,Pe=function(){try{var e=Ce&&Ce.require&&Ce.require("util").types;return e||De&&De.binding&&De.binding("util")}catch(e){}}(),Ne=Pe&&Pe.isTypedArray,Me=Ne?function(e){return function(t){return e(t)}}(Ne):function(e){return w(e)&&Te(e.length)&&!!$e[b(e)]},Le=Me,Fe=Object.prototype.hasOwnProperty;function Ue(e,t){var r=c(e),n=!r&&_e(e),o=!r&&!n&&xe(e),i=!r&&!n&&!o&&Le(e),s=r||n||o||i,a=s?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],u=a.length;for(var l in e)!t&&!Fe.call(e,l)||s&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ae(l,u))||a.push(l);return a}var Be=Object.prototype;function qe(e,t){return function(r){return e(t(r))}}var Ie=qe(Object.keys,Object),ze=Object.prototype.hasOwnProperty;function He(e){if(r=(t=e)&&t.constructor,t!==("function"==typeof r&&r.prototype||Be))return Ie(e);var t,r,n=[];for(var o in Object(e))ze.call(e,o)&&"constructor"!=o&&n.push(o);return n}function We(e){return null!=e&&Te(e.length)&&!x(e)}function Ye(e){return We(e)?Ue(e):He(e)}var Je=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,s=Object(r);(t?i--:++i<o)&&!1!==n(s[i],i,s););return r}}(function(e,t){return e&&me(e,t,Ye)}),Ve=Je;function Ke(e){return e}function Ge(e,t){var r;return(c(e)?he:Ve)(e,"function"==typeof(r=t)?r:Ke)}var Ze=Array.prototype.reverse;function Xe(e){return"[object String]"===Object.prototype.toString.call(e)}function Qe(e){return!(!Xe(e)||""===e)}function et(e){let t=!1;if(Qe(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 tt=/\s/;var rt=/^\s+/;function nt(e){return e?e.slice(0,function(e){for(var t=e.length;t--&&tt.test(e.charAt(t)););return t}(e)+1).replace(rt,""):e}var ot=/^[-+]0x[0-9a-f]+$/i,it=/^0b[01]+$/i,st=/^0o[0-7]+$/i,at=parseInt;function ct(e){if("number"==typeof e)return e;if(S(e))return NaN;if(j(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=j(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=nt(e);var r=it.test(e);return r||st.test(e)?at(e.slice(2),r?2:8):ot.test(e)?NaN:+e}var ut=1/0;function lt(e){return e?(e=ct(e))===ut||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}function ft(e){var t=lt(e),r=t%1;return t==t?r?t-r:t:0}function dt(e){if(!et(e))return 0;return lt(e)}function pt(e){return!!et(e)&&(e=dt(e),"number"==typeof(t=e)&&t==ft(t));var t}var ht=f.isFinite,yt=Math.min;var mt=function(e){var t=Math[e];return function(e,r){if(e=ct(e),(r=null==r?0:yt(ft(r),292))&&ht(e)){var n=(ue(e)+"e").split("e");return+((n=(ue(t(n[0]+"e"+(+n[1]+r)))+"e").split("e"))[0]+"e"+(+n[1]-r))}return t(e)}}("round"),vt=mt;function gt(e){if(!et(e))return 0;e=dt(e);let t=vt(e);return"0"===String(t)?0:t}function bt(e){if(!pt(e))return!1;return gt(e)>=0}function wt(e){let t=Object.prototype.toString.call(e);return"[object Function]"===t||"[object AsyncFunction]"===t}function St(e,t={}){let r=pe(t,"fs");if(!r.existsSync(e))return!1;let n=r.lstatSync(e);return!n.isFile()&&!n.isSymbolicLink()}function _t(t){return St(t,{fs:e})}function Ot(e,t={}){let r=pe(t,"fs");if(St(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 Et(r){return function(e,t={}){let r=pe(t,"path"),n=pe(t,"fs");if(!n.existsSync(e)){let t=Ot(e,{fs:n});return t.error?t.error:{success:"done: "+e}}if(!St(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 jt(t){return Ot(t,{fs:e})}function xt(t){return function(e,t={}){let r=pe(t,"fs");if(!r.existsSync(e))return{success:"folder does not exist: "+e};if(!St(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}}(t,{fs:e})}function Rt(r,n=1){return function(e,t=1,r={}){let n=1,o=pe(r,"path"),i=pe(r,"fs");if(!St(e,{fs:i}))throw new Error(`fd[${e}] is not a folder`);return function e(r){let s=[];return St(r,{fs:i})?(Ge(i.readdirSync(r),function(a){let c=o.resolve(r,a),u=null;try{u=i.statSync(c)}catch(e){}u&&u.isDirectory()?(s.push({isFolder:!0,level:n,path:c,name:o.basename(c)}),n+=1,(n<=t||null===t)&&(s=s.concat(e(c))),n-=1):s.push({isFolder:!1,level:n,path:c,name:o.basename(c)})}),s):s}(e)}(r,n,{path:t,fs:e})}var At=U(f,"DataView"),Tt=U(f,"Promise"),$t=U(f,"Set"),kt=U(f,"WeakMap"),Ct="[object Map]",Dt="[object Promise]",Pt="[object Set]",Nt="[object WeakMap]",Mt="[object DataView]",Lt=k(At),Ft=k(V),Ut=k(Tt),Bt=k($t),qt=k(kt),It=b;(At&&It(new At(new ArrayBuffer(1)))!=Mt||V&&It(new V)!=Ct||Tt&&It(Tt.resolve())!=Dt||$t&&It(new $t)!=Pt||kt&&It(new kt)!=Nt)&&(It=function(e){var t=b(e),r="[object Object]"==t?e.constructor:void 0,n=r?k(r):"";if(n)switch(n){case Lt:return Mt;case Ft:return Ct;case Ut:return Dt;case Bt:return Pt;case qt:return Nt}return t});var zt=It;function Ht(e){return function(t){return null==t?void 0:t[e]}}var Wt=Ht("length"),Yt=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function Jt(e){return Yt.test(e)}var Vt="\\ud800-\\udfff",Kt="["+Vt+"]",Gt="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Zt="\\ud83c[\\udffb-\\udfff]",Xt="[^"+Vt+"]",Qt="(?:\\ud83c[\\udde6-\\uddff]){2}",er="[\\ud800-\\udbff][\\udc00-\\udfff]",tr="(?:"+Gt+"|"+Zt+")"+"?",rr="[\\ufe0e\\ufe0f]?",nr=rr+tr+("(?:\\u200d(?:"+[Xt,Qt,er].join("|")+")"+rr+tr+")*"),or="(?:"+[Xt+Gt+"?",Gt,Qt,er,Kt].join("|")+")",ir=RegExp(Zt+"(?="+Zt+")|"+or+nr,"g");function sr(e){return Jt(e)?function(e){for(var t=ir.lastIndex=0;ir.test(e);)++t;return t}(e):Wt(e)}function ar(e){if(null==e)return 0;if(We(e))return"string"==typeof(t=e)||!c(t)&&w(t)&&"[object String]"==b(t)?sr(e):e.length;var t,r=zt(e);return"[object Map]"==r||"[object Set]"==r?e.size:He(e).length}function cr(e){return"[object Object]"===Object.prototype.toString.call(e)}function ur(e){if(cr(e)){for(let t in e)return!0;return!1}return!1}function lr(e){return!0===(t=e)||!1===t||w(t)&&"[object Boolean]"==b(t);var t}function fr(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}var dr="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function pr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function hr(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 yr={exports:{}};var mr,vr={exports:{}},gr=hr(Object.freeze({__proto__:null,default:{}}));function br(){return mr||(mr=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!==dr&&dr.crypto&&(r=dr.crypto),!r)try{r=gr}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={},s=i.lib={},a=s.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=s.WordArray=a.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 s=r[i>>>2]>>>24-i%4*8&255;t[n+i>>>2]|=s<<24-(n+i)%4*8}else for(var a=0;a<o;a+=4)t[n+a>>>2]=r[a>>>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=a.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=s.BufferedBlockAlgorithm=a.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,s=this.blockSize,a=i/(4*s),u=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,l=e.min(4*u,i);if(u){for(var f=0;f<u;f+=s)this._doProcessBlock(o,f);r=o.splice(0,u),n.sigBytes-=l}return new c.init(r,l)},clone:function(){var e=a.clone.call(this);return e._data=this._data.clone(),e},_minBufferSize:0});s.Hasher=p.extend({cfg:a.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)}(vr)),vr.exports}!function(e){e.exports=br().enc.Utf8}(yr);var wr=pr(yr.exports),Sr={exports:{}};!function(e){var t;e.exports=(t=br(),function(){var e=t,r=e.lib.WordArray;function n(e,t,n){for(var o=[],i=0,s=0;s<t;s++)if(s%4){var a=n[e.charCodeAt(s-1)]<<s%4*2|n[e.charCodeAt(s)]>>>6-s%4*2;o[i>>>2]|=a<<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 s=(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,a=0;a<4&&i+.75*a<r;a++)o.push(n.charAt(s>>>6*(3-a)&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 s=r.charAt(64);if(s){var a=e.indexOf(s);-1!==a&&(t=a)}return n(e,t,o)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),t.enc.Base64)}(Sr);var _r=pr(Sr.exports);function Or(e){if(!Qe(e))return"";let t=wr.parse(e);return _r.stringify(t)}function Er(e,t){for(var r=-1,n=null==e?0:e.length,o=0,i=[];++r<n;){var s=e[r];t(s,r,e)&&(i[o++]=s)}return i}function jr(e,t){var r=[];return Ve(e,function(e,n,o){t(e,n,o)&&r.push(e)}),r}function xr(e){var t=this.__data__=new J(e);this.size=t.size}xr.prototype.clear=function(){this.__data__=new J,this.size=0},xr.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},xr.prototype.get=function(e){return this.__data__.get(e)},xr.prototype.has=function(e){return this.__data__.has(e)},xr.prototype.set=function(e,t){var r=this.__data__;if(r instanceof J){var n=r.__data__;if(!V||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new G(n)}return r.set(e,t),this.size=r.size,this};function Rr(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new G;++t<r;)this.add(e[t])}function Ar(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 Tr(e,t){return e.has(t)}Rr.prototype.add=Rr.prototype.push=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Rr.prototype.has=function(e){return this.__data__.has(e)};function $r(e,t,r,n,o,i){var s=1&r,a=e.length,c=t.length;if(a!=c&&!(s&&c>a))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 Rr:void 0;for(i.set(e,t),i.set(t,e);++f<a;){var h=e[f],y=t[f];if(n)var m=s?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(!Ar(t,function(e,t){if(!Tr(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 kr=f.Uint8Array;function Cr(e){var t=-1,r=Array(e.size);return e.forEach(function(e,n){r[++t]=[n,e]}),r}function Dr(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Pr=d?d.prototype:void 0,Nr=Pr?Pr.valueOf:void 0;var Mr=Object.prototype.propertyIsEnumerable,Lr=Object.getOwnPropertySymbols,Fr=Lr?function(e){return null==e?[]:(e=Object(e),Er(Lr(e),function(t){return Mr.call(e,t)}))}:function(){return[]};function Ur(e){return function(e,t,r){var n=t(e);return c(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,Ye,Fr)}var Br=Object.prototype.hasOwnProperty;var qr="[object Arguments]",Ir="[object Array]",zr="[object Object]",Hr=Object.prototype.hasOwnProperty;function Wr(e,t,r,n,o,i){var s=c(e),a=c(t),u=s?Ir:zt(e),l=a?Ir:zt(t),f=(u=u==qr?zr:u)==zr,d=(l=l==qr?zr:l)==zr,p=u==l;if(p&&xe(e)){if(!xe(t))return!1;s=!0,f=!1}if(p&&!f)return i||(i=new xr),s||Le(e)?$r(e,t,r,n,o,i):function(e,t,r,n,o,i,s){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 kr(e),new kr(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return H(+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 a=Cr;case"[object Set]":var c=1&n;if(a||(a=Dr),e.size!=t.size&&!c)return!1;var u=s.get(e);if(u)return u==t;n|=2,s.set(e,t);var l=$r(a(e),a(t),n,o,i,s);return s.delete(e),l;case"[object Symbol]":if(Nr)return Nr.call(e)==Nr.call(t)}return!1}(e,t,u,r,n,o,i);if(!(1&r)){var h=f&&Hr.call(e,"__wrapped__"),y=d&&Hr.call(t,"__wrapped__");if(h||y){var m=h?e.value():e,v=y?t.value():t;return i||(i=new xr),o(m,v,r,n,i)}}return!!p&&(i||(i=new xr),function(e,t,r,n,o,i){var s=1&r,a=Ur(e),c=a.length;if(c!=Ur(t).length&&!s)return!1;for(var u=c;u--;){var l=a[u];if(!(s?l in t:Br.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=s;++u<c;){var y=e[l=a[u]],m=t[l];if(n)var v=s?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,b=t.constructor;g==b||!("constructor"in e)||!("constructor"in t)||"function"==typeof g&&g instanceof g&&"function"==typeof b&&b instanceof b||(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||!w(e)&&!w(t)?e!=e&&t!=t:Wr(e,t,r,n,Yr,o))}function Jr(e){return e==e&&!j(e)}function Vr(e,t){return function(r){return null!=r&&(r[e]===t&&(void 0!==t||e in Object(r)))}}function Kr(e){var t=function(e){for(var t=Ye(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Jr(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,s=!n;if(null==e)return!i;for(e=Object(e);o--;){var a=r[o];if(s&&a[2]?a[1]!==e[a[0]]:!(a[0]in e))return!1}for(;++o<i;){var c=(a=r[o])[0],u=e[c],l=a[1];if(s&&a[2]){if(void 0===u&&!(c in e))return!1}else{var f=new xr;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 Gr(e,t){return null!=e&&t in Object(e)}function Zr(e,t){return null!=e&&function(e,t,r){for(var n=-1,o=(t=le(t,e)).length,i=!1;++n<o;){var s=fe(t[n]);if(!(i=null!=e&&r(e,s)))break;e=e[s]}return i||++n!=o?i:!!(o=null==e?0:e.length)&&Te(o)&&Ae(s,o)&&(c(e)||_e(e))}(e,t,Gr)}function Xr(e){return E(e)?Ht(fe(e)):function(e){return function(t){return de(t,e)}}(e)}function Qr(e){return"function"==typeof e?e:null==e?Ke:"object"==typeof e?c(e)?function(e,t){return E(e)&&Jr(t)?Vr(fe(e),t):function(r){var n=pe(r,e);return void 0===n&&n===t?Zr(r,e):Yr(t,n,3)}}(e[0],e[1]):Kr(e):Xr(e)}function en(e,t){return(c(e)?Er:jr)(e,Qr(t))}function tn(e){return"[object Array]"===Object.prototype.toString.call(e)}function rn(e,t){return!!cr(e)&&(!(!Qe(t)&&!et(t))&&t in e)}function nn(e,t,r,n={}){let o=pe(n,"withInfor");lr(o)||(o=!0);let i={del:[],add:[],same:[],diff:[]};if(!Qe(r))return console.log("invalid key"),o&&(i.infor={}),i;tn(e)||(e=[e]),tn(t)||(t=[t]),e=en(e,e=>rn(e,r)),t=en(t,e=>rn(e,r));let s=new Map(t.map(e=>[e[r],e]));for(let t of e){let e=s.get(t[r]);if(e){JSON.stringify(t)===JSON.stringify(e)?i.same.push(e):i.diff.push(e),s.delete(t[r])}else i.del.push(t)}if(i.add=Array.from(s.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}var on={exports:{}};!function(e){e.exports=function(){var e=1e3,t=6e4,r=36e5,n="millisecond",o="second",i="minute",s="hour",a="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,s=t.clone().add(n+(i?-1:1),u);return+(-(n+(r-o)/(i?o-s:s-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:a,D:d,h:s,m:i,s:o,ms:n,Q:l}[e]||String(e||"").toLowerCase().replace(/s$/,"")},u:function(e){return void 0===e}},b="en",w={};w[b]=m;var S="$isDayjsObject",_=function(e){return e instanceof x||!(!e||!e[S])},O=function e(t,r,n){var o;if(!t)return b;if("string"==typeof t){var i=t.toLowerCase();w[i]&&(o=i),r&&(w[i]=r,o=i);var s=t.split("-");if(!o&&s.length>1)return e(s[0])}else{var a=t.name;w[a]=t,o=a}return!n&&o&&(b=o),o||!n&&b},E=function(e,t){if(_(e))return e.clone();var r="object"==typeof t?t:{};return r.date=e,r.args=arguments,new x(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 x=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(a)},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 b=this.$locale().weekStart||0,w=(y<b?y+7:y)-b;return p(n?v-w:v+(6-w),m);case a:case d:return h(g+"Hours",0);case s: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[a]=l+"Date",r[d]=l+"Date",r[u]=l+"Month",r[f]=l+"FullYear",r[s]=l+"Hours",r[i]=l+"Minutes",r[o]=l+"Seconds",r[n]=l+"Milliseconds",r)[c],h=c===a?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===a)return y(1);if(h===c)return y(7);var m=(d={},d[i]=t,d[s]=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,s=this.$m,a=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 a+1;case"MM":return j.s(a+1,2,"0");case"MMM":return f(r.monthsShort,a,u,3);case"MMMM":return f(u,a);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,s,!0);case"A":return h(i,s,!1);case"m":return String(s);case"mm":return j.s(s,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,b=this-v,w=function(){return j.m(y,v)};switch(m){case f:h=w()/12;break;case u:h=w();break;case l:h=w()/3;break;case c:h=(b-g)/6048e5;break;case a:h=(b-g)/864e5;break;case s:h=b/r;break;case i:h=b/t;break;case o:h=b/e;break;default:h=b}return p?h:j.a(h)},v.daysInMonth=function(){return this.endOf(u).$D},v.$locale=function(){return w[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}(),R=x.prototype;return E.prototype=R,[["$ms",n],["$s",o],["$m",i],["$H",s],["$W",a],["$M",u],["$y",f],["$D",d]].forEach(function(e){R[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),E.extend=function(e,t){return e.$i||(e(t,x,E),e.$i=!0),E},E.locale=O,E.isDayjs=_,E.unix=function(e){return E(1e3*e)},E.en=w[b],E.Ls=w,E.p={},E}()}(on);var sn=pr(on.exports);function an(){if(!wt(sn))throw new Error("invalid dayjs");return sn().format("YYYY-MM-DDTHH:mm:ssZ")}var cn={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,s){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new o(n,i||e,s),c=r?r+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0===--e._eventsCount?e._events=new n:delete e._events[t]}function a(){this._events=new n,this._eventsCount=0}Object.create&&(n.prototype=Object.create(null),(new n).__proto__||(r=!1)),a.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},a.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,s=new Array(i);o<i;o++)s[o]=n[o].fn;return s},a.prototype.listenerCount=function(e){var t=r?r+e:e,n=this._events[t];return n?n.fn?1:n.length:0},a.prototype.emit=function(e,t,n,o,i,s){var a=r?r+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],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,s),!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},a.prototype.on=function(e,t,r){return i(this,e,t,r,!1)},a.prototype.once=function(e,t,r){return i(this,e,t,r,!0)},a.prototype.removeListener=function(e,t,n,o){var i=r?r+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var a=this._events[i];if(a.fn)a.fn!==t||o&&!a.once||n&&a.context!==n||s(this,i);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||o&&!a[c].once||n&&a[c].context!==n)&&u.push(a[c]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=r?r+e:e,this._events[t]&&s(this,t)):(this._events=new n,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=r,a.EventEmitter=a,e.exports=a}(cn);var un=pr(cn.exports);function ln(){return new un}function fn(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 dn(){let e,t,r=new Promise(function(){e=arguments[0],t=arguments[1]});return r.resolve=e,r.reject=t,r}function pn(e,t){let r=dn();if(!tn(e)&&!cr(e))return r.reject("rs is not an array or object"),r;let n=!1;if(cr(e)){n=!0;let t=[];Ge(e,(e,r)=>{t.push({k:r,v:e})}),e=t}wt(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 s=o,a=r;return n&&(s=r.k,a=r.v),wt(t)?t(a,s):a})},Promise.resolve()).then(function(e){var t,n,o,s;i.push(e),s=null==(t=i)?0:t.length,i=s?fn(t,(n=o||void 0===n?1:ft(n))<0?0:n,s):[],r.resolve(i)}).catch(function(e){r.reject(e)}),r}function hn(e=10){et(e)||(e=10);let t=dn();return setTimeout(function(){t.resolve()},e),t}function yn(e){if(!pt(e))return!1;return gt(e)>0}var mn=qe(Object.getPrototypeOf,Object),vn=Function.prototype,gn=Object.prototype,bn=vn.toString,wn=gn.hasOwnProperty,Sn=bn.call(Object);function _n(e){if(!w(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(!w(e)||"[object Object]"!=b(e))return!1;var t=mn(e);if(null===t)return!0;var r=wn.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&bn.call(r)==Sn}(e)}function On(e){let t="";if(_n(e))t=e.message;else{if(Xe(e))return e;if(cr(e))return rn(e,"message")?e.message:JSON.stringify(e);if(tn(e))return JSON.stringify(e);t=function(e){if(!Qe(e)&&!et(e)&&!S(e))return"";let t="";try{t=String(e)}catch(e){}try{t=e.toString()}catch(e){}return t}(e)}return t}function En(e,t={}){let r=pe(t,"fs");return!!r.existsSync(e)&&(!r.lstatSync(e).isDirectory()&&!r.lstatSync(e).isSymbolicLink())}function jn(t){return En(t,{fs:e})}function xn(t){return function(e,t={}){let r=pe(t,"fs");if(!r.existsSync(e))return{success:"file does not exist: "+e};if(!En(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}}(t,{fs:e})}function Rn(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!St(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};try{o.readdirSync(e).forEach(function(r){let i=n.resolve(e,r),s=n.resolve(t,r),a=o.lstatSync(i);if(a.isDirectory())Ot(s,{fs:o}),Rn(i,s,{path:n,fs:o});else if(a.isSymbolicLink()){let e=o.readlinkSync(i);o.symlinkSync(e,s)}else Ot(n.dirname(s),{fs:o}),o.copyFileSync(i,s)})}catch(e){return{error:e}}return{success:"done: "+t}}function An(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs"),i=pe(r,"useSync","");lr(i)||(i=!0);let s="";return s=i?Rn(e,t,{path:n,fs:o}):async function(e,t,r={}){let n=pe(r,"path"),o=pe(r,"fs");if(!St(e,{fs:o}))return{error:`fpSrc[${e}] is not a folder`};let i=async(e,t)=>{let r=o.readdirSync(e);for(let s of r){let r=n.join(e,s),a=n.join(t,s),c=o.lstatSync(r);if(c.isDirectory())Ot(a,{fs:o}),await i(r,a);else if(c.isSymbolicLink()){let e=o.readlinkSync(r);o.symlinkSync(e,a)}else Ot(n.dirname(a),{fs:o}),await new Promise((e,t)=>{let n=o.createReadStream(r),i=o.createWriteStream(a);n.on("error",t),i.on("error",t),i.on("finish",e),n.pipe(i)})}},s=null;return await i(e,t).then(()=>{s={success:"done: "+t}}).catch(e=>{s={error:e}}),s}(e,t,{path:n,fs:o}),s}function Tn(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 $n(e=300){return new function(e){let t=[],r=null,n=null;return yn(e)||(e=300),e=gt(e),function(o,...i){wt(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 kn(e,o={}){let i=pe(o,"polling");lr(i)||(i=!1);let s=pe(o,"timeInterval");yn(s)||(s=100),s=gt(s);let a=pe(o,"timeBinaryInterval");yn(a)||(a=300),a=gt(a);let c=new r.EventEmitter,u=e,l=null,f=setInterval(()=>{null===l&&jn(u)&&(l=n.watch(u,{usePolling:i,interval:s,binaryInterval:a,awaitWriteFinish:!0}),l.on("all",(e,r,n)=>{r=t.resolve(r),c.emit("change",{type:e,fp:r,stats:n})}))},s);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 Cn(t,r,n={}){_t(t)||jt(t),_t(r)||jt(r);let o=`${t}/fpHash.json`,i=`${r}/fpHash.json`,s=t=>{let r={};try{r=function(e){if(!Qe(e))return{};let t={};try{t=JSON.parse(e)}catch(e){t={}}return t}(e.readFileSync(t,"utf8"))}catch(e){}return r},a=(t,r)=>{try{let n=Tn(r);e.writeFileSync(t,n,"utf8")}catch(e){}},c=(e,t)=>pe(s(e),t,""),u=(e,t,r)=>{let n=s(e);n[t]=r,a(e,n)},l=(e,t)=>{let r=s(e);rn(r,t)&&delete r[t],a(e,r)},f=()=>s(o),d=e=>a(o,e),p=e=>c(o,e),h=()=>s(i),y=e=>a(i,e),m=e=>c(i,e),v=(e,t)=>u(i,e,t),g=e=>l(i,e),b=e=>{let t=[];return Ge(e,(e,r)=>{t.push({fp:r,hash:e})}),t};return{buildSrc:()=>{let e=ln();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=ln(),t=$n(300),r=kn(o);return r.on("change",r=>{t(()=>{(async()=>{let t=dn(),r=f();if(!ur(r))return t.resolve("no src"),t;let n=h(),o=b(r),i=nn(b(n),o,"fp",{withInfor:!1}),s=dn();return s.then(e=>{y(r)}).catch(()=>{}),e.emit("change",{kpSrc:r,kpTar:n,kpCmp:i,pm:s}),t})().catch(()=>{})})}),e.set=v,e.get=m,e.remove=g,e.readKp=h,e.writeKp=y,e.clear=r.clear,e}}}let Dn=o.fileURLToPath("undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(Dn).href:"undefined"==typeof document?location.href:a&&"SCRIPT"===a.tagName.toUpperCase()&&a.src||new URL("w-dwdata-tweq.umd.js",document.baseURI).href),Pn=t.dirname(Dn);let Nn=async(r={})=>{let n=pe(r,"keyId");Qe(n)||(n="id");let o=pe(r,"fdDwAttime");Qe(o)||(o="./_dwAttime"),_t(o)||jt(o);let s=pe(r,"fdDwCurrent");Qe(s)||(s="./_dwCurrent"),_t(s)||jt(s);let a=pe(r,"fdTagRemove");Qe(a)||(a="./_tagRemove");let c=pe(r,"fdResult");Qe(c)||(c="./_result"),_t(c)||jt(c);let u=pe(r,"fdTaskCpActualSrc");Qe(u)||(u="./_taskCpActualSrc"),_t(u)||jt(u);let l=pe(r,"fdTaskCpSrc");Qe(l)||(l="./_taskCpSrc"),_t(l)||jt(l);let f=pe(r,"fdLog");Qe(f)||(f="./_logs"),_t(f)||jt(f);let d=pe(r,"funDownload");if(!wt(d))throw new Error("invalid funDownload");let p=pe(r,"funGetCurrent");if(!wt(p))throw new Error("invalid funGetCurrent");let h=pe(r,"funAdd");if(!wt(h))throw new Error("invalid funAdd");let y=pe(r,"funModify");if(!wt(y))throw new Error("invalid funModify");let m=pe(r,"funRemove");if(!wt(m))throw new Error("invalid funRemove");let v=pe(r,"timeToleranceRemove");bt(v)||(v=0),v=dt(v),v>0&&!_t(a)&&jt(a);let g=ln(),b=function(e={}){let r=pe(e,"fdLog");Qe(r)||(r="./_logs");let n=pe(e,"interval");"day"!==n&&"hr"!==n&&(n="day");let o=i.transport({targets:[{level:"info",target:t.resolve(Pn,"./formatter.mjs"),options:{interval:n,fdLog:r}}]});return i(o)}({fdLog:f,interval:"hr"}),w={info:e=>{b.info(e),g.emit("change",{type:"info",...e})},warn:e=>{b.warn(e),g.emit("change",{type:"warn",...e})},error:e=>{b.error(e),g.emit("change",{type:"error",...e})}},S=async t=>{let r=await(async(t,r,n="")=>{let o="";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}]`);o=a;let i=`${o}/${r}`,s={time:an(),hash:n};e.writeFileSync(i,JSON.stringify(s),"utf8")})("remove",t);return r},_=async(t,r={})=>{let n=await(async(t,r,n={})=>{let o=pe(n,"checkTime");lr(o)||(o=!0);let i=pe(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=a,c=v;let u=`${s}/${r}`;if(!jn(u))return{b:!1,msg:`fp[${u}] is not a file`};if(!o)return{b:!0,msg:`fp[${u}] exists`};if(!ur(i))throw new Error("invalid timeNow");let l=e.readFileSync(u,"utf8"),f=pe(JSON.parse(l),"time"),d=sn(f),p=i.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},O=async t=>{let r=await(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=a;let o=`${n}/${r}`;if(!jn(o))return;let i=e.readFileSync(o,"utf8"),s=JSON.parse(i),c=xn(o);if(c.error)throw new Error(c.error);return s})("remove",t);return r},E=null,j=(async()=>{await hn(1);let r=sn(),i=()=>{let e=sn(),t=e.diff(r,"second");return{timeRunStart:r.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunEnd:e.format("YYYY-MM-DDTHH:mm:ssZ"),timeRunSpent:`${t}s`}};w.info({event:"start",msg:"running..."});let a="",c=Cn(u,u).buildSrc(),f=Cn(l,l);E=f.buildSrc();let g=[];try{w.info({event:"proc-callfun-download",msg:"start..."});let e=d();fr(e)&&(e=await e),w.info({event:"proc-callfun-download",num:ar(e),msg:"done"}),g=e}catch(e){console.log(e),w.error({event:"proc-callfun-download",msg:On(e)}),a="error at proc-callfun-download"}if(Qe(a))return console.log("error occurred, task canceled"),void w.info({event:"cancel",...i(),msg:a});let b=[];try{w.info({event:"proc-callfun-getCurrent",msg:"start..."});let e=p();fr(e)&&(e=await e),w.info({event:"proc-callfun-getCurrent",num:ar(e),msg:"done"}),b=e}catch(e){console.log(e),w.error({event:"proc-callfun-getCurrent",msg:On(e)}),a="error at proc-callfun-getCurrent"}if(Qe(a))return console.log("error occurred, task canceled"),void w.info({event:"cancel",...i(),msg:a});if(0===ar(g))return console.log("invalid data, task canceled"),void w.info({event:"cancel",...i(),msg:"no data"});let j=null;try{w.info({event:"compare",msg:"start..."}),j=nn(b,g,n,{withInfor:!1}),w.info({event:"compare",msg:"done"})}catch(e){console.log(e),w.error({event:"compare",msg:On(e)})}if(!ur(j))return console.log("can not calculate the difference, task canceled"),void w.info({event:"cancel",...i(),msg:"can not calculate the difference between the data before and after"});if(0!==ar(j.del)||0!==ar(j.add)||0!==ar(j.diff)){if(await pn(j.del,async e=>{if(!Qe(a)){try{w.info({event:"proc-remove-callfun-remove",[n]:e[n],msg:"start..."});let t=m(e);fr(t)&&(t=await t)}catch(t){console.log(t),w.error({event:"proc-remove-callfun-remove",[n]:e[n],msg:On(t)}),a="error at proc-remove-callfun-remove"}if(!Qe(a))try{if(c.remove(e[n]),v<=0)E.remove(e[n]),w.info({event:"proc-remove-callfun-remove",[n]:e[n],msg:"done"});else{(await _(e[n],{checkTime:!1})).b||(await S(e[n]),w.info({event:"proc-remove-callfun-remove",[n]:e[n],msg:"tag"}))}}catch(t){console.log(t),w.error({event:"proc-remove-otkActual-remove",[n]:e[n],msg:On(t)}),a="error at proc-remove-otkActual-remove"}}}),Qe(a))return console.log("error occurred, task canceled"),void w.info({event:"cancel",...i(),msg:a});if(await pn(j.add,async e=>{if(!Qe(a)){try{w.info({event:"proc-add-callfun-add",[n]:e[n],msg:"start..."});let t=h(e);fr(t)&&(t=await t)}catch(t){console.log(t),w.error({event:"proc-add-callfun-add",[n]:e[n],msg:On(t)}),a="error at proc-add-callfun-add"}if(!Qe(a))try{let t=Or(JSON.stringify(e));if(c.set(e[n],t),v<=0)E.set(e[n],t),w.info({event:"proc-add-callfun-add",[n]:e[n],msg:"done"});else{(await _(e[n],{checkTime:!1})).b?(await O(e[n]),w.info({event:"proc-add-callfun-add",[n]:e[n],msg:"release-tag"})):(E.set(e[n],t),w.info({event:"proc-add-callfun-add",[n]:e[n],msg:"done"}))}}catch(t){console.log(t),w.error({event:"proc-add-otkActual-set",[n]:e[n],msg:On(t)}),a="error at proc-add-otkActual-set"}}}),Qe(a))return console.log("error occurred, task canceled"),void w.info({event:"cancel",...i(),msg:a});if(await pn(j.diff,async e=>{if(!Qe(a)){try{w.info({event:"proc-diff-callfun-modify",[n]:e[n],msg:"start..."});let t=y(e);fr(t)&&(t=await t)}catch(t){console.log(t),w.error({event:"proc-diff-callfun-modify",[n]:e[n],msg:On(t)}),a="error at proc-diff-callfun-modify"}if(!Qe(a))try{let t=Or(JSON.stringify(e));c.set(e[n],t),E.set(e[n],t),w.info({event:"proc-diff-callfun-modify",[n]:e[n],msg:"done"})}catch(t){console.log(t),w.error({event:"proc-diff-otkActual-set",[n]:e[n],msg:On(t)}),a="error at proc-diff-otkActual-set"}}}),Qe(a))return console.log("error occurred, task canceled"),void w.info({event:"cancel",...i(),msg:a});{Et(s);let r=function(r,n,o={}){return An(r,n,{path:t,fs:e,...o})}(o,s);if(r.error)return console.log(r.error),w.error({event:"task-update-rawData",msg:r.error}),void(a="error at task-update-rawData")}if(Qe(a))return console.log("error occurred, task canceled"),void w.info({event:"cancel",...i(),msg:a});w.info({event:"end",...i(),msg:"done"})}else w.info({event:"cancel",...i(),msg:"no difference"})})().catch(e=>{console.log(e),w.error({event:"proc-coreSrc",msg:On(e)})}),x=(async()=>{await async function(e,t={}){let r=null,n=dn();if(!wt(e))return n.reject("waitfunction需輸入函數f"),n;let o=async()=>{let t=e();return fr(t)&&(t=await t),t};if(r=await o(),!0===r)return n.resolve(),n;let i=pe(t,"attemptNum",null);yn(i)||(i=200);let s=pe(t,"timeInterval",null);yn(s)||(s=1e3);let a=0,c=setInterval(async()=>{a+=1,r=await o(),!0===r&&(clearInterval(c),n.resolve()),a>i&&(clearInterval(c),n.reject(`exceeded attemptNum[${i}]`))},s);return n}(()=>null!==E);let e=sn(),t=Rt(a,1);0!==ar(t)&&await pn(t,async t=>{(await _(t.name,{timeNow:e,checkTime:!0})).b&&(await O(t.name),w.info({event:"proc-detect-remove",[n]:t.name,from:"debounce",msg:"release-tag"}),E.remove(t.name),w.info({event:"proc-detect-remove",[n]:t.name,from:"debounce",msg:"done"}))})})().catch(e=>{console.log(e),w.error({event:"proc-coreDetect",msg:On(e)})});return g.srlog=w,Promise.all([j,x]).finally(()=>{g.emit("end")}),g};function Mn(e,t){var r=-1,n=We(e)?Array(e.length):[];return Ve(e,function(e,o,i){n[++r]=t(e,o,i)}),n}function Ln(e,t){return(c(e)?ie:Mn)(e,Qr(t))}var Fn=Array.prototype.join;function Un(e,t){return function(){return e.apply(t,arguments)}}const{toString:Bn}=Object.prototype,{getPrototypeOf:qn}=Object,{iterator:In,toStringTag:zn}=Symbol,Hn=(e=>t=>{const r=Bn.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Wn=e=>(e=e.toLowerCase(),t=>Hn(t)===e),Yn=e=>t=>typeof t===e,{isArray:Jn}=Array,Vn=Yn("undefined");function Kn(e){return null!==e&&!Vn(e)&&null!==e.constructor&&!Vn(e.constructor)&&Xn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Gn=Wn("ArrayBuffer");const Zn=Yn("string"),Xn=Yn("function"),Qn=Yn("number"),eo=e=>null!==e&&"object"==typeof e,to=e=>{if("object"!==Hn(e))return!1;const t=qn(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||zn in e||In in e)},ro=Wn("Date"),no=Wn("File"),oo=Wn("Blob"),io=Wn("FileList"),so=Wn("URLSearchParams"),[ao,co,uo,lo]=["ReadableStream","Request","Response","Headers"].map(Wn);function fo(e,t,{allOwnKeys:r=!1}={}){if(null==e)return;let n,o;if("object"!=typeof e&&(e=[e]),Jn(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{if(Kn(e))return;const o=r?Object.getOwnPropertyNames(e):Object.keys(e),i=o.length;let s;for(n=0;n<i;n++)s=o[n],t.call(null,e[s],s,e)}}function po(e,t){if(Kn(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 ho="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,yo=e=>!Vn(e)&&e!==ho;const mo=(vo="undefined"!=typeof Uint8Array&&qn(Uint8Array),e=>vo&&e instanceof vo);var vo;const go=Wn("HTMLFormElement"),bo=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),wo=Wn("RegExp"),So=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};fo(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)};const _o=Wn("AsyncFunction"),Oo=(Eo="function"==typeof setImmediate,jo=Xn(ho.postMessage),Eo?setImmediate:jo?(xo=`axios@${Math.random()}`,Ro=[],ho.addEventListener("message",({source:e,data:t})=>{e===ho&&t===xo&&Ro.length&&Ro.shift()()},!1),e=>{Ro.push(e),ho.postMessage(xo,"*")}):e=>setTimeout(e));var Eo,jo,xo,Ro;const Ao="undefined"!=typeof queueMicrotask?queueMicrotask.bind(ho):"undefined"!=typeof process&&process.nextTick||Oo;var To={isArray:Jn,isArrayBuffer:Gn,isBuffer:Kn,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||Xn(e.append)&&("formdata"===(t=Hn(e))||"object"===t&&Xn(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&Gn(e.buffer),t},isString:Zn,isNumber:Qn,isBoolean:e=>!0===e||!1===e,isObject:eo,isPlainObject:to,isEmptyObject:e=>{if(!eo(e)||Kn(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:ao,isRequest:co,isResponse:uo,isHeaders:lo,isUndefined:Vn,isDate:ro,isFile:no,isBlob:oo,isRegExp:wo,isFunction:Xn,isStream:e=>eo(e)&&Xn(e.pipe),isURLSearchParams:so,isTypedArray:mo,isFileList:io,forEach:fo,merge:function e(){const{caseless:t}=yo(this)&&this||{},r={},n=(n,o)=>{const i=t&&po(r,o)||o;to(r[i])&&to(n)?r[i]=e(r[i],n):to(n)?r[i]=e({},n):Jn(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&fo(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(fo(t,(t,n)=>{r&&Xn(t)?e[n]=Un(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,s;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),i=o.length;i-- >0;)s=o[i],n&&!n(s,e,t)||a[s]||(t[s]=e[s],a[s]=!0);e=!1!==r&&qn(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:Hn,kindOfTest:Wn,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(Jn(e))return e;let t=e.length;if(!Qn(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{const r=(e&&e[In]).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:go,hasOwnProperty:bo,hasOwnProp:bo,reduceDescriptors:So,freezeMethods:e=>{So(e,(t,r)=>{if(Xn(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;const n=e[r];Xn(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 Jn(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:po,global:ho,isContextDefined:yo,isSpecCompliantForm:function(e){return!!(e&&Xn(e.append)&&"FormData"===e[zn]&&e[In])},toJSONObject:e=>{const t=new Array(10),r=(e,n)=>{if(eo(e)){if(t.indexOf(e)>=0)return;if(Kn(e))return e;if(!("toJSON"in e)){t[n]=e;const o=Jn(e)?[]:{};return fo(e,(e,t)=>{const i=r(e,n+1);!Vn(i)&&(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:_o,isThenable:e=>e&&(eo(e)||Xn(e))&&Xn(e.then)&&Xn(e.catch),setImmediate:Oo,asap:Ao,isIterable:e=>null!=e&&Xn(e[In])};function $o(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)}To.inherits($o,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:To.toJSONObject(this.config),code:this.code,status:this.status}}});const ko=$o.prototype,Co={};["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=>{Co[e]={value:e}}),Object.defineProperties($o,Co),Object.defineProperty(ko,"isAxiosError",{value:!0}),$o.from=(e,t,r,n,o,i)=>{const s=Object.create(ko);return To.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),$o.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};function Do(e){return To.isPlainObject(e)||To.isArray(e)}function Po(e){return To.endsWith(e,"[]")?e.slice(0,-2):e}function No(e,t,r){return e?e.concat(t).map(function(e,t){return e=Po(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}const Mo=To.toFlatObject(To,{},null,function(e){return/^is[A-Z]/.test(e)});function Lo(e,t,r){if(!To.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const n=(r=To.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!To.isUndefined(t[e])})).metaTokens,o=r.visitor||u,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&To.isSpecCompliantForm(t);if(!To.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(To.isDate(e))return e.toISOString();if(To.isBoolean(e))return e.toString();if(!a&&To.isBlob(e))throw new $o("Blob is not supported. Use a Buffer instead.");return To.isArrayBuffer(e)||To.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,r,o){let a=e;if(e&&!o&&"object"==typeof e)if(To.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else if(To.isArray(e)&&function(e){return To.isArray(e)&&!e.some(Do)}(e)||(To.isFileList(e)||To.endsWith(r,"[]"))&&(a=To.toArray(e)))return r=Po(r),a.forEach(function(e,n){!To.isUndefined(e)&&null!==e&&t.append(!0===s?No([r],n,i):null===s?r:r+"[]",c(e))}),!1;return!!Do(e)||(t.append(No(o,r,i),c(e)),!1)}const l=[],f=Object.assign(Mo,{defaultVisitor:u,convertValue:c,isVisitable:Do});if(!To.isObject(e))throw new TypeError("data must be an object");return function e(r,n){if(!To.isUndefined(r)){if(-1!==l.indexOf(r))throw Error("Circular reference detected in "+n.join("."));l.push(r),To.forEach(r,function(r,i){!0===(!(To.isUndefined(r)||null===r)&&o.call(t,r,To.isString(i)?i.trim():i,n,f))&&e(r,n?n.concat(i):[i])}),l.pop()}}(e),t}function Fo(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function Uo(e,t){this._pairs=[],e&&Lo(e,this,t)}const Bo=Uo.prototype;function qo(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Io(e,t,r){if(!t)return e;const n=r&&r.encode||qo;To.isFunction(r)&&(r={serialize:r});const o=r&&r.serialize;let i;if(i=o?o(t,r):To.isURLSearchParams(t)?t.toString():new Uo(t,r).toString(n),i){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}Bo.append=function(e,t){this._pairs.push([e,t])},Bo.toString=function(e){const t=e?function(t){return e.call(this,t,Fo)}:Fo;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var zo=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){To.forEach(this.handlers,function(t){null!==t&&e(t)})}},Ho={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},Wo={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:Uo,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const Yo="undefined"!=typeof window&&"undefined"!=typeof document,Jo="object"==typeof navigator&&navigator||void 0,Vo=Yo&&(!Jo||["ReactNative","NativeScript","NS"].indexOf(Jo.product)<0),Ko="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,Go=Yo&&window.location.href||"http://localhost";var Zo={...Object.freeze({__proto__:null,hasBrowserEnv:Yo,hasStandardBrowserEnv:Vo,hasStandardBrowserWebWorkerEnv:Ko,navigator:Jo,origin:Go}),...Wo};function Xo(e){function t(e,r,n,o){let i=e[o++];if("__proto__"===i)return!0;const s=Number.isFinite(+i),a=o>=e.length;if(i=!i&&To.isArray(n)?n.length:i,a)return To.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r,!s;n[i]&&To.isObject(n[i])||(n[i]=[]);return t(e,r,n[i],o)&&To.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])),!s}if(To.isFormData(e)&&To.isFunction(e.entries)){const r={};return To.forEachEntry(e,(e,n)=>{t(function(e){return To.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),n,r,0)}),r}return null}const Qo={transitional:Ho,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const r=t.getContentType()||"",n=r.indexOf("application/json")>-1,o=To.isObject(e);o&&To.isHTMLForm(e)&&(e=new FormData(e));if(To.isFormData(e))return n?JSON.stringify(Xo(e)):e;if(To.isArrayBuffer(e)||To.isBuffer(e)||To.isStream(e)||To.isFile(e)||To.isBlob(e)||To.isReadableStream(e))return e;if(To.isArrayBufferView(e))return e.buffer;if(To.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 Lo(e,new Zo.classes.URLSearchParams,{visitor:function(e,t,r,n){return Zo.isNode&&To.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((i=To.isFileList(e))||r.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return Lo(i?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||n?(t.setContentType("application/json",!1),function(e,t,r){if(To.isString(e))try{return(t||JSON.parse)(e),To.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(r||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Qo.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(To.isResponse(e)||To.isReadableStream(e))return e;if(e&&To.isString(e)&&(r&&!this.responseType||n)){const r=!(t&&t.silentJSONParsing)&&n;try{return JSON.parse(e)}catch(e){if(r){if("SyntaxError"===e.name)throw $o.from(e,$o.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:Zo.classes.FormData,Blob:Zo.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};To.forEach(["delete","get","head","post","put","patch"],e=>{Qo.headers[e]={}});var ei=Qo;const ti=To.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 ri=Symbol("internals");function ni(e){return e&&String(e).trim().toLowerCase()}function oi(e){return!1===e||null==e?e:To.isArray(e)?e.map(oi):String(e)}function ii(e,t,r,n,o){return To.isFunction(n)?n.call(this,t,r):(o&&(t=r),To.isString(t)?To.isString(n)?-1!==t.indexOf(n):To.isRegExp(n)?n.test(t):void 0:void 0)}class si{constructor(e){e&&this.set(e)}set(e,t,r){const n=this;function o(e,t,r){const o=ni(t);if(!o)throw new Error("header name must be a non-empty string");const i=To.findKey(n,o);(!i||void 0===n[i]||!0===r||void 0===r&&!1!==n[i])&&(n[i||t]=oi(e))}const i=(e,t)=>To.forEach(e,(e,r)=>o(e,r,t));if(To.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(To.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]&&ti[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(To.isObject(e)&&To.isIterable(e)){let r,n,o={};for(const t of e){if(!To.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[n=t[0]]=(r=o[n])?To.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=ni(e)){const r=To.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(To.isFunction(t))return t.call(this,e,r);if(To.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=ni(e)){const r=To.findKey(this,e);return!(!r||void 0===this[r]||t&&!ii(0,this[r],r,t))}return!1}delete(e,t){const r=this;let n=!1;function o(e){if(e=ni(e)){const o=To.findKey(r,e);!o||t&&!ii(0,r[o],o,t)||(delete r[o],n=!0)}}return To.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&&!ii(0,this[o],o,e,!0)||(delete this[o],n=!0)}return n}normalize(e){const t=this,r={};return To.forEach(this,(n,o)=>{const i=To.findKey(r,o);if(i)return t[i]=oi(n),void delete t[o];const s=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r)}(o):String(o).trim();s!==o&&delete t[o],t[s]=oi(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return To.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&To.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[ri]=this[ri]={accessors:{}}).accessors,r=this.prototype;function n(e){const n=ni(e);t[n]||(!function(e,t){const r=To.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 To.isArray(e)?e.forEach(n):n(e),this}}si.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),To.reduceDescriptors(si.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),To.freezeMethods(si);var ai=si;function ci(e,t){const r=this||ei,n=t||r,o=ai.from(n.headers);let i=n.data;return To.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function ui(e){return!(!e||!e.__CANCEL__)}function li(e,t,r){$o.call(this,null==e?"canceled":e,$o.ERR_CANCELED,t,r),this.name="CanceledError"}function fi(e,t,r){const n=r.config.validateStatus;r.status&&n&&!n(r.status)?t(new $o("Request failed with status code "+r.status,[$o.ERR_BAD_REQUEST,$o.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r)):e(r)}To.inherits(li,$o,{__CANCEL__:!0});const di=(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,s=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=n[s];o||(o=c),r[i]=a,n[i]=c;let l=s,f=0;for(;l!==i;)f+=r[l++],l%=e;if(i=(i+1)%e,i===s&&(s=(s+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 s=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=i?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},i-a)))},()=>r&&s(r)]}(r=>{const i=r.loaded,s=r.lengthComputable?r.total:void 0,a=i-n,c=o(a);n=i;e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:c||void 0,estimated:c&&s&&i<=s?(s-i)/c:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},pi=(e,t)=>{const r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},hi=e=>(...t)=>To.asap(()=>e(...t));var yi=Zo.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Zo.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Zo.origin),Zo.navigator&&/(msie|trident)/i.test(Zo.navigator.userAgent)):()=>!0,mi=Zo.hasStandardBrowserEnv?{write(e,t,r,n,o,i){const s=[e+"="+encodeURIComponent(t)];To.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),To.isString(n)&&s.push("path="+n),To.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.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 vi(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 gi=e=>e instanceof ai?{...e}:e;function bi(e,t){t=t||{};const r={};function n(e,t,r,n){return To.isPlainObject(e)&&To.isPlainObject(t)?To.merge.call({caseless:n},e,t):To.isPlainObject(t)?To.merge({},t):To.isArray(t)?t.slice():t}function o(e,t,r,o){return To.isUndefined(t)?To.isUndefined(e)?void 0:n(void 0,e,0,o):n(e,t,0,o)}function i(e,t){if(!To.isUndefined(t))return n(void 0,t)}function s(e,t){return To.isUndefined(t)?To.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(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:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>o(gi(e),gi(t),0,!0)};return To.forEach(Object.keys({...e,...t}),function(n){const i=c[n]||o,s=i(e[n],t[n],n);To.isUndefined(s)&&i!==a||(r[n]=s)}),r}var wi=e=>{const t=bi({},e);let r,{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:c}=t;if(t.headers=a=ai.from(a),t.url=Io(vi(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),To.isFormData(n))if(Zo.hasStandardBrowserEnv||Zo.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(r=a.getContentType())){const[e,...t]=r?r.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...t].join("; "))}if(Zo.hasStandardBrowserEnv&&(o&&To.isFunction(o)&&(o=o(t)),o||!1!==o&&yi(t.url))){const e=i&&s&&mi.read(s);e&&a.set(i,e)}return t};var Si="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){const n=wi(e);let o=n.data;const i=ai.from(n.headers).normalize();let s,a,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=n;function h(){u&&u(),l&&l(),n.cancelToken&&n.cancelToken.unsubscribe(s),n.signal&&n.signal.removeEventListener("abort",s)}let y=new XMLHttpRequest;function m(){if(!y)return;const n=ai.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders());fi(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 $o("Request aborted",$o.ECONNABORTED,e,y)),y=null)},y.onerror=function(){r(new $o("Network Error",$o.ERR_NETWORK,e,y)),y=null},y.ontimeout=function(){let t=n.timeout?"timeout of "+n.timeout+"ms exceeded":"timeout exceeded";const o=n.transitional||Ho;n.timeoutErrorMessage&&(t=n.timeoutErrorMessage),r(new $o(t,o.clarifyTimeoutError?$o.ETIMEDOUT:$o.ECONNABORTED,e,y)),y=null},void 0===o&&i.setContentType(null),"setRequestHeader"in y&&To.forEach(i.toJSON(),function(e,t){y.setRequestHeader(t,e)}),To.isUndefined(n.withCredentials)||(y.withCredentials=!!n.withCredentials),f&&"json"!==f&&(y.responseType=n.responseType),p&&([c,l]=di(p,!0),y.addEventListener("progress",c)),d&&y.upload&&([a,u]=di(d),y.upload.addEventListener("progress",a),y.upload.addEventListener("loadend",u)),(n.cancelToken||n.signal)&&(s=t=>{y&&(r(!t||t.type?new li(null,e,y):t),y.abort(),y=null)},n.cancelToken&&n.cancelToken.subscribe(s),n.signal&&(n.signal.aborted?s():n.signal.addEventListener("abort",s)));const v=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(n.url);v&&-1===Zo.protocols.indexOf(v)?r(new $o("Unsupported protocol "+v+":",$o.ERR_BAD_REQUEST,e)):y.send(o||null)})};var _i=(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,s();const t=e instanceof Error?e:this.reason;n.abort(t instanceof $o?t:new li(t instanceof Error?t.message:t))}};let i=t&&setTimeout(()=>{i=null,o(new $o(`timeout ${t} of ms exceeded`,$o.ETIMEDOUT))},t);const s=()=>{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:a}=n;return a.unsubscribe=()=>To.asap(s),a}};const Oi=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},Ei=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()}},ji=(e,t,r,n)=>{const o=async function*(e,t){for await(const r of Ei(e))yield*Oi(r,t)}(e,t);let i,s=0,a=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 a(),void e.close();let i=n.byteLength;if(r){let e=s+=i;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},xi="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,Ri=xi&&"function"==typeof ReadableStream,Ai=xi&&("function"==typeof TextEncoder?(Ti=new TextEncoder,e=>Ti.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer()));var Ti;const $i=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},ki=Ri&&$i(()=>{let e=!1;const t=new Request(Zo.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Ci=Ri&&$i(()=>To.isReadableStream(new Response("").body)),Di={stream:Ci&&(e=>e.body)};var Pi;xi&&(Pi=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!Di[e]&&(Di[e]=To.isFunction(Pi[e])?t=>t[e]():(t,r)=>{throw new $o(`Response type '${e}' is not supported`,$o.ERR_NOT_SUPPORT,r)})}));const Ni=async(e,t)=>{const r=To.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(To.isBlob(e))return e.size;if(To.isSpecCompliantForm(e)){const t=new Request(Zo.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return To.isArrayBufferView(e)||To.isArrayBuffer(e)?e.byteLength:(To.isURLSearchParams(e)&&(e+=""),To.isString(e)?(await Ai(e)).byteLength:void 0)})(t):r};var Mi=xi&&(async e=>{let{url:t,method:r,data:n,signal:o,cancelToken:i,timeout:s,onDownloadProgress:a,onUploadProgress:c,responseType:u,headers:l,withCredentials:f="same-origin",fetchOptions:d}=wi(e);u=u?(u+"").toLowerCase():"text";let p,h=_i([o,i&&i.toAbortSignal()],s);const y=h&&h.unsubscribe&&(()=>{h.unsubscribe()});let m;try{if(c&&ki&&"get"!==r&&"head"!==r&&0!==(m=await Ni(l,n))){let e,r=new Request(t,{method:"POST",body:n,duplex:"half"});if(To.isFormData(n)&&(e=r.headers.get("content-type"))&&l.setContentType(e),r.body){const[e,t]=pi(m,di(hi(c)));n=ji(r.body,65536,e,t)}}To.isString(f)||(f=f?"include":"omit");const o="credentials"in Request.prototype;p=new Request(t,{...d,signal:h,method:r.toUpperCase(),headers:l.normalize().toJSON(),body:n,duplex:"half",credentials:o?f:void 0});let i=await fetch(p,d);const s=Ci&&("stream"===u||"response"===u);if(Ci&&(a||s&&y)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=i[t]});const t=To.toFiniteNumber(i.headers.get("content-length")),[r,n]=a&&pi(t,di(hi(a),!0))||[];i=new Response(ji(i.body,65536,r,()=>{n&&n(),y&&y()}),e)}u=u||"text";let v=await Di[To.findKey(Di,u)||"text"](i,e);return!s&&y&&y(),await new Promise((t,r)=>{fi(t,r,{data:v,headers:ai.from(i.headers),status:i.status,statusText:i.statusText,config:e,request:p})})}catch(t){if(y&&y(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new $o("Network Error",$o.ERR_NETWORK,e,p),{cause:t.cause||t});throw $o.from(t,t&&t.code,e,p)}});const Li={http:null,xhr:Si,fetch:Mi};To.forEach(Li,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const Fi=e=>`- ${e}`,Ui=e=>To.isFunction(e)||null===e||!1===e;var Bi=e=>{e=To.isArray(e)?e:[e];const{length:t}=e;let r,n;const o={};for(let i=0;i<t;i++){let t;if(r=e[i],n=r,!Ui(r)&&(n=Li[(t=String(r)).toLowerCase()],void 0===n))throw new $o(`Unknown adapter '${t}'`);if(n)break;o[t||"#"+i]=n}if(!n){const e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new $o("There is no suitable adapter to dispatch the request "+(t?e.length>1?"since :\n"+e.map(Fi).join("\n"):" "+Fi(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return n};function qi(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new li(null,e)}function Ii(e){qi(e),e.headers=ai.from(e.headers),e.data=ci.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return Bi(e.adapter||ei.adapter)(e).then(function(t){return qi(e),t.data=ci.call(e,e.transformResponse,t),t.headers=ai.from(t.headers),t},function(t){return ui(t)||(qi(e),t&&t.response&&(t.response.data=ci.call(e,e.transformResponse,t.response),t.response.headers=ai.from(t.response.headers))),Promise.reject(t)})}const zi="1.11.0",Hi={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Hi[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Wi={};Hi.transitional=function(e,t,r){function n(e,t){return"[Axios v"+zi+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new $o(n(o," has been removed"+(t?" in "+t:"")),$o.ERR_DEPRECATED);return t&&!Wi[o]&&(Wi[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)}},Hi.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var Yi={assertOptions:function(e,t,r){if("object"!=typeof e)throw new $o("options must be an object",$o.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let o=n.length;for(;o-- >0;){const i=n[o],s=t[i];if(s){const t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new $o("option "+i+" must be "+r,$o.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new $o("Unknown option "+i,$o.ERR_BAD_OPTION)}},validators:Hi};const Ji=Yi.validators;class Vi{constructor(e){this.defaults=e||{},this.interceptors={request:new zo,response:new zo}}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=bi(this.defaults,t);const{transitional:r,paramsSerializer:n,headers:o}=t;void 0!==r&&Yi.assertOptions(r,{silentJSONParsing:Ji.transitional(Ji.boolean),forcedJSONParsing:Ji.transitional(Ji.boolean),clarifyTimeoutError:Ji.transitional(Ji.boolean)},!1),null!=n&&(To.isFunction(n)?t.paramsSerializer={serialize:n}:Yi.assertOptions(n,{encode:Ji.function,serialize:Ji.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),Yi.assertOptions(t,{baseUrl:Ji.spelling("baseURL"),withXsrfToken:Ji.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let i=o&&To.merge(o.common,o[t.method]);o&&To.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=ai.concat(i,o);const s=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,s.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(!a){const e=[Ii.bind(this),void 0];for(e.unshift(...s),e.push(...c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=s.length;let d=t;for(f=0;f<l;){const e=s[f++],t=s[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=Ii.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 Io(vi((e=bi(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}To.forEach(["delete","get","head","options"],function(e){Vi.prototype[e]=function(t,r){return this.request(bi(r||{},{method:e,url:t,data:(r||{}).data}))}}),To.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(bi(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}Vi.prototype[e]=t(),Vi.prototype[e+"Form"]=t(!0)});var Ki=Vi;class Gi{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 li(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 Gi(function(t){e=t}),cancel:e}}}var Zi=Gi;const Xi={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(Xi).forEach(([e,t])=>{Xi[t]=e});var Qi=Xi;const es=function e(t){const r=new Ki(t),n=Un(Ki.prototype.request,r);return To.extend(n,Ki.prototype,r,{allOwnKeys:!0}),To.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(bi(t,r))},n}(ei);es.Axios=Ki,es.CanceledError=li,es.CancelToken=Zi,es.isCancel=ui,es.VERSION=zi,es.toFormData=Lo,es.AxiosError=$o,es.Cancel=es.CanceledError,es.all=function(e){return Promise.all(e)},es.spread=function(e){return function(t){return e.apply(null,t)}},es.isAxiosError=function(e){return To.isObject(e)&&!0===e.isAxiosError},es.mergeConfig=bi,es.AxiosHeaders=ai,es.formToJSON=e=>Xo(To.isHTMLForm(e)?new FormData(e):e),es.getAdapter=Bi,es.HttpStatusCode=Qi,es.default=es;var ts=es;let rs=e=>{let t=Ln(e,(e,t)=>{let r=null==e?"":e;return`${encodeURIComponent(t)}=${encodeURIComponent(r)}`});var r,n;return n="&",null==(r=t)?"":Fn.call(r,n)};function ns(e){return e!=e}function os(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,ns,r)}var is="\\ud800-\\udfff",ss="["+is+"]",as="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",cs="\\ud83c[\\udffb-\\udfff]",us="[^"+is+"]",ls="(?:\\ud83c[\\udde6-\\uddff]){2}",fs="[\\ud800-\\udbff][\\udc00-\\udfff]",ds="(?:"+as+"|"+cs+")"+"?",ps="[\\ufe0e\\ufe0f]?",hs=ps+ds+("(?:\\u200d(?:"+[us,ls,fs].join("|")+")"+ps+ds+")*"),ys="(?:"+[us+as+"?",as,ls,fs,ss].join("|")+")",ms=RegExp(cs+"(?="+cs+")|"+ys+hs,"g");function vs(e){return Jt(e)?function(e){return e.match(ms)||[]}(e):function(e){return e.split("")}(e)}function gs(e,t,r){if((e=ue(e))&&(r||void 0===t))return nt(e);if(!e||!(t=ce(t)))return e;var n=vs(e),o=vs(t),i=function(e,t){for(var r=-1,n=e.length;++r<n&&os(t,e[r],0)>-1;);return r}(n,o),s=function(e,t){for(var r=e.length;r--&&os(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:fn(e,t,r)}(n,i,s).join("")}let bs=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)},ws=async(e,t)=>{_t(e)||jt(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 pn(r,async t=>{let r=`${e}/${t.fn}`;await(async(e,t,r={})=>{let n=pe(r,"retries");bt(n)||(n=3),n=gt(n);let o=pe(r,"retrietimeDelays");bt(o)||(o=1e3),o=dt(o);let i="error",s=null,a=null;for(let r=1;r<=n&&(await bs(e,t).then(e=>{a=e,i="success"}).catch(e=>{s=e}),await hn(o),null===a);r++);if("error"===i)throw new Error(s);return a})(t.url,r)})};return async(t,r,n={})=>{if(!et(t))throw new Error("yearStart is not a number");if(t=gt(t),!et(r))throw new Error("yearEnd is not a number");r=gt(r);let o=pe(n,"keyId");Qe(o)||(o="id");let i=pe(n,"fdDwAttime");Qe(i)||(i="./_dwAttime"),_t(i)||jt(i);let a=pe(n,"fdDwCurrent");Qe(a)||(a="./_dwCurrent"),_t(a)||jt(a);let c=pe(n,"fdResult");Qe(c)||(c="./_result"),_t(c)||jt(c);let u=pe(n,"fdTaskCpSrc");Qe(u)||(u="./_taskCpSrc"),_t(u)||jt(u);let l=pe(n,"fdLog");Qe(l)||(l="./_logs"),_t(l)||jt(l);let f=pe(n,"funDownload"),d=pe(n,"funGetCurrent"),p=pe(n,"funAdd"),h=pe(n,"funModify"),y=pe(n,"funRemove"),m=pe(n,"timeToleranceRemove");bt(m)||(m=0),m=dt(m);let v=async()=>{let n=await(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 ts.post("https://scweb.cwa.gov.tw/zh-tw/earthquake/ajaxhandler",rs(r),{headers:{"Content-Type":"application/x-www-form-urlencoded"}})).data}catch(e){console.log(e)}return n})(t,r),s=Ln(pe(n,"data",[]),e=>{let t=pe(e,0,""),r=pe(e,1,""),n=pe(e,2,""),o=pe(e,3,""),i=pe(e,4,""),s=pe(e,5,""),a=pe(e,6,""),c=pe(e,7,""),u=pe(e,8,"");r=gs(r);let l=sn(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 et(r)&&et(p)&&(y=`${gt(p)-1911}${r}`),{id:y,tag:t,number:r,time:f,timeRec:n,timeTag:d,ml:o,depth:i,location:s,intensity:a,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 a;return s=null==(a=s)?a:Ze.call(a),Ge(s,t=>{let r=`${i}/${t[o]}.json`;e.writeFileSync(r,JSON.stringify(t),"utf8")}),s};wt(f)||(f=v);let g=async()=>{let t=Rt(a,1),r=[];return Ge(t,t=>{let n=e.readFileSync(t.path,"utf8"),o=JSON.parse(n);r.push(o)}),r};wt(d)||(d=g);let b=async e=>{let t=`${c}/${e[o]}`;_t(t)&&xt(t)};wt(y)||(y=b);let w=async e=>{let t=`${c}/${e[o]}`;_t(t)||jt(t),Et(t),await ws(t,e);let r=`${t}/picEqReport.gif`,n=`${t}/picEqIntensityList.gif`;await(async(e,t,r,n,o,i)=>{await s(e,{animated:!1}).extract({left:r,top:n,width:o,height:i}).toFile(t)})(r,n,364,199,276,204)};wt(p)||(p=w);let S=async e=>{let t=`${c}/${e[o]}`;_t(t)||jt(t),Et(t),await ws(t,e)};wt(h)||(h=S);let _={fdDwAttime:i,fdDwCurrent:a,fdResult:c,fdTaskCpSrc:u,fdLog:l,funDownload:f,funGetCurrent:d,funRemove:y,funAdd:p,funModify:h,timeToleranceRemove:m};return await Nn(_)}});
|
|
7
7
|
//# sourceMappingURL=w-dwdata-tweq.umd.js.map
|