ddan-js 2.9.11 → 2.9.13
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/bin/t-hook.js +1 -0
- package/bin/t-hook.mjs +1 -0
- package/bin/{tiny/utils.d.ts → t-utils.d.ts} +2 -2
- package/bin/t-utils.js +1 -0
- package/bin/t-utils.mjs +1 -0
- package/bin/t-web.js +1 -0
- package/bin/t-web.mjs +1 -0
- package/bin/tiny/t-utils.d.ts +239 -0
- package/bin/tiny/t-web.d.ts +114 -0
- package/package.json +16 -5
- package/bin/ddan-tiny.js +0 -1
- package/bin/lib/class/event.js +0 -1
- package/bin/lib/class/getset.js +0 -1
- package/bin/lib/class/icon.js +0 -1
- package/bin/lib/class/persist.js +0 -1
- package/bin/lib/class/pipeTask.js +0 -1
- package/bin/lib/class/store.js +0 -1
- package/bin/lib/common/_Symbol.js +0 -1
- package/bin/lib/common/_freeGlobal.js +0 -1
- package/bin/lib/common/_object.js +0 -1
- package/bin/lib/common/_root.js +0 -1
- package/bin/lib/common/internal/asciiToArray.js +0 -1
- package/bin/lib/common/internal/castSlice.js +0 -1
- package/bin/lib/common/internal/createCaseFirst.js +0 -1
- package/bin/lib/common/internal/hasUnicode.js +0 -1
- package/bin/lib/common/internal/nodeTypes.js +0 -1
- package/bin/lib/common/internal/slice.js +0 -1
- package/bin/lib/common/internal/stringToArray.js +0 -1
- package/bin/lib/common/internal/unicodeToArray.js +0 -1
- package/bin/lib/common/internal/unicodeWords.js +0 -1
- package/bin/lib/modules/convert/base.js +0 -1
- package/bin/lib/modules/convert/base64.js +0 -1
- package/bin/lib/modules/convert/index.js +0 -1
- package/bin/lib/modules/convert/md5.js +0 -1
- package/bin/lib/modules/convert/pkcs.js +0 -1
- package/bin/lib/modules/convert/utf8.js +0 -1
- package/bin/lib/modules/crypto/base64.js +0 -1
- package/bin/lib/modules/crypto/const.js +0 -1
- package/bin/lib/modules/crypto/index.js +0 -1
- package/bin/lib/modules/crypto/rsa.js +0 -1
- package/bin/lib/modules/crypto/tea.js +0 -1
- package/bin/lib/modules/crypto/uuid.js +0 -1
- package/bin/lib/modules/css.js +0 -1
- package/bin/lib/modules/fetch.js +0 -1
- package/bin/lib/modules/gbk.js +0 -1
- package/bin/lib/modules/hook/base.js +0 -1
- package/bin/lib/modules/hook/hooker.js +0 -1
- package/bin/lib/modules/hook/index.js +0 -1
- package/bin/lib/modules/hook/log.js +0 -1
- package/bin/lib/modules/hook/modules/bezier.js +0 -1
- package/bin/lib/modules/hook/modules/debounce.js +0 -1
- package/bin/lib/modules/hook/modules/mutex.js +0 -1
- package/bin/lib/modules/hook/modules/pipeline.js +0 -1
- package/bin/lib/modules/hook/modules/polling.js +0 -1
- package/bin/lib/modules/hook/modules/safeTask.js +0 -1
- package/bin/lib/modules/hook/modules/throttle.js +0 -1
- package/bin/lib/modules/html.js +0 -1
- package/bin/lib/modules/http/index.js +0 -1
- package/bin/lib/modules/http/interceptor.js +0 -1
- package/bin/lib/modules/list/base.js +0 -1
- package/bin/lib/modules/list/index.js +0 -1
- package/bin/lib/modules/math/index.js +0 -1
- package/bin/lib/modules/node/rsa-web.js +0 -1
- package/bin/lib/modules/obj/index.js +0 -1
- package/bin/lib/modules/qs/decode.js +0 -1
- package/bin/lib/modules/qs/encode.js +0 -1
- package/bin/lib/modules/qs/index.js +0 -1
- package/bin/lib/modules/regex.js +0 -1
- package/bin/lib/modules/rsa.js +0 -1
- package/bin/lib/modules/rule/async-validator/index.js +0 -1
- package/bin/lib/modules/rule/async-validator/messages.js +0 -1
- package/bin/lib/modules/rule/async-validator/rule/enum.js +0 -1
- package/bin/lib/modules/rule/async-validator/rule/index.js +0 -1
- package/bin/lib/modules/rule/async-validator/rule/pattern.js +0 -1
- package/bin/lib/modules/rule/async-validator/rule/range.js +0 -1
- package/bin/lib/modules/rule/async-validator/rule/required.js +0 -1
- package/bin/lib/modules/rule/async-validator/rule/type.js +0 -1
- package/bin/lib/modules/rule/async-validator/rule/url.js +0 -1
- package/bin/lib/modules/rule/async-validator/rule/whitespace.js +0 -1
- package/bin/lib/modules/rule/async-validator/util.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/any.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/array.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/boolean.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/date.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/enum.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/float.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/index.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/integer.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/method.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/number.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/object.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/pattern.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/regexp.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/required.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/string.js +0 -1
- package/bin/lib/modules/rule/async-validator/validator/type.js +0 -1
- package/bin/lib/modules/rule/index.js +0 -1
- package/bin/lib/modules/string/index.js +0 -1
- package/bin/lib/modules/string/words.js +0 -1
- package/bin/lib/modules/time/const.js +0 -1
- package/bin/lib/modules/time/dtime.js +0 -1
- package/bin/lib/modules/time/frame.js +0 -1
- package/bin/lib/modules/time/index.js +0 -1
- package/bin/lib/tiny/hook.js +0 -1
- package/bin/lib/tiny/store.js +0 -1
- package/bin/lib/tiny/utils.js +0 -1
- package/bin/lib/tiny/web.js +0 -1
- package/bin/lib/tiny.js +0 -1
- package/bin/lib/util/function.js +0 -1
- package/bin/lib/util/includes.js +0 -1
- package/bin/lib/util/index.js +0 -1
- package/bin/lib/util/is.js +0 -1
- package/bin/lib/util/to.js +0 -1
- package/bin/tiny.d.ts +0 -6
- /package/bin/{tiny/web.d.ts → t-web.d.ts} +0 -0
- /package/bin/tiny/{hook.d.ts → t-hook.d.ts} +0 -0
- /package/bin/tiny/{store.d.ts → t-store.d.ts} +0 -0
package/bin/t-web.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("crypto")):"function"==typeof define&&define.amd?define(["crypto"],t):(e="undefined"!=typeof globalThis?globalThis:e||self)["d{web}"]=t(e.crypto)}(this,(function(e){"use strict";function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=t(e);var n={toUtf8:e=>{if(!e)return"";const t=e.replace(/\r\n/g,"\n");let r="";for(let e=0;e<t.length;e++){let n=t.charCodeAt(e);n<128?r+=String.fromCharCode(n):n>127&&n<2048?(r+=String.fromCharCode(n>>6|192),r+=String.fromCharCode(63&n|128)):(r+=String.fromCharCode(n>>12|224),r+=String.fromCharCode(n>>6&63|128),r+=String.fromCharCode(63&n|128))}return r},fromUtf8:e=>{let t="",r=0;if(!e)return"";let n=0,o=0,i=0;for(;r<e.length;)n=e.charCodeAt(r),n<128?(t+=String.fromCharCode(n),r++):n>191&&n<224?(o=e.charCodeAt(r+1),t+=String.fromCharCode((31&n)<<6|63&o),r+=2):(o=e.charCodeAt(r+1),i=e.charCodeAt(r+2),t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&i),r+=3);return t},toUtf8Bytes:e=>{if(!e)return new Uint8Array;const t=e.replace(/\r\n/g,"\n"),r=[];for(let e=0;e<t.length;e++){let n=t.charCodeAt(e);n<128?r.push(n):n<2048?(r.push(n>>6|192),r.push(63&n|128)):(r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128))}return new Uint8Array(r)},fromUtf8Bytes:e=>{let t="",r=0;if(!e||e.length<=0)return"";for(;r<e.length;){let n=e[r];if(n<128)t+=String.fromCharCode(n),r++;else if(n>191&&n<224){const o=e[r+1];t+=String.fromCharCode((31&n)<<6|63&o),r+=2}else{const o=e[r+1],i=e[r+2];t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&i),r+=3}}return t}};const o="object"==typeof global&&null!==global&&global.Object===Object&&global,i="object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis,s="object"==typeof self&&null!==self&&self.Object===Object&&self,a=i||o||s||Function("return this")(),u=a.Symbol,{toString:l,hasOwnProperty:c,propertyIsEnumerable:f}=Object.prototype,d=u?u.toStringTag:void 0;function h(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":d&&d in Object(e)?function(e){const t=c.call(e,d),r=e[d];let n=!1;try{e[d]=void 0,n=!0}catch(e){}const o=l.call(e);return n&&(t?e[d]=r:delete e[d]),o}(e):l.call(e)}var p={getTag:h,getType:function(e){return(h(e).match(/\w+/g)||["object","Undefined"])[1]||""},toString:l,hasOwnProperty:c,propertyIsEnumerable:f};const g="object"==typeof exports&&null!==exports&&!exports.nodeType&&exports,y=g&&"object"==typeof module&&null!==module&&!module.nodeType&&module,m=y&&y.exports===g&&o.process,b=(()=>{try{const e=y&&y.require&&y.require("util").types;return e||m&&m.binding&&m.binding("util")}catch(e){}})();var w="[object Function]",v="[object GeneratorFunction]",x="[object AsyncFunction]",A=9007199254740991;const j=/^(?:0|[1-9]\d*)$/,O=a?.Buffer?.isBuffer,$=/^\[object (?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)Array\]$/,C=b&&b.isTypedArray;function k(e){const t=typeof e;return null!=e&&("object"==t||"function"==t)}function q(e){return null!=e&&"object"==typeof e}const B=Array.isArray;function E(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=A}(e.length)&&!P(e)}function _(e){return q(e)&&E(e)}function P(e){var t=k(e)?p.getTag(e):"";return t===w||t===v||t===x}function F(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Object.prototype)}function S(e){return _(e)&&p.hasOwnProperty.call(e,"callee")&&(!p.propertyIsEnumerable.call(e,"callee")||"[object Arguments]"==p.toString.call(e))}const T="undefined"!=typeof window&&void 0!==window.document,U="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,R=C?e=>C(e):e=>q(e)&&$.test(p.getTag(e)),L="function"==typeof O?O:()=>!1;var I={is:function(e,t){return p.getTag(e)===`[object ${t}]`},isNumber:function(e){return"[object Number]"===p.getTag(e)},isString:function(e){return"string"==typeof e||!B(e)&&q(e)&&"[object String]"==p.getTag(e)},isObject:k,isObjectLike:q,isPlainObject:function(e){if(!q(e)||"[object Object]"!=p.getTag(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},isSymbol:function(e){return"symbol"==typeof e||q(e)&&"[object Symbol]"===p.getTag(e)},isFunction:P,isArray:B,isArrayLikeObject:_,isIndex:function(e,t){return!!(t=null==t?A:t)&&("number"==typeof e||j.test(e))&&e>-1&&e%1==0&&e<t},isArrayLike:E,isPrototype:F,isArguments:S,isPromise:function(e){return"[object Promise]"===(k(e)?p.getTag(e):"")},isBrowser:T,isNode:U,isBlobOrBuffer:e=>e instanceof Blob||e instanceof ArrayBuffer,isUint8Array:e=>e instanceof Uint8Array,isArrayBuffer:e=>e instanceof ArrayBuffer,isEmpty:e=>{if(null==e)return!0;if(E(e)&&(Array.isArray(e)||"string"==typeof e||"function"==typeof e.splice||L(e)||R(e)||S(e)))return!e.length;const t=p.getTag(e);if("[object Map]"===t||"[object Set]"===t)return!e.size;if(F(e))return!Object.keys(e).length;for(const t in e)if(p.hasOwnProperty.call(e,t))return!1;return!0}};const N="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var z={toBase64:(e="")=>{let t,r,o,i,s,a,u,l="",c=0;for(e=n.toUtf8(e);c<e.length;)t=e.charCodeAt(c++),r=e.charCodeAt(c++),o=e.charCodeAt(c++),i=t>>2,s=(3&t)<<4|r>>4,a=(15&r)<<2|o>>6,u=63&o,isNaN(r)?a=u=64:isNaN(o)&&(u=64),l=l+N.charAt(i)+N.charAt(s)+N.charAt(a)+N.charAt(u);return l},fromBase64:(e="")=>{let t,r,o,i,s,a,u,l="",c=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");c<e.length;)i=N.indexOf(e.charAt(c++)),s=N.indexOf(e.charAt(c++)),a=N.indexOf(e.charAt(c++)),u=N.indexOf(e.charAt(c++)),t=i<<2|s>>4,r=(15&s)<<4|a>>2,o=(3&a)<<6|u,l+=String.fromCharCode(t),64!=a&&(l+=String.fromCharCode(r)),64!=u&&(l+=String.fromCharCode(o));return l=n.fromUtf8(l),l},bytesToBase64:e=>{let t,r,n,o,i,s,a,u="",l=0;if(!e||!I.isArrayLike(e)||!I.isUint8Array(e))return"";for(;l<e.length;)t=e[l++],r=e[l++],n=e[l++],o=t>>2,i=(3&t)<<4|r>>4,s=(15&r)<<2|n>>6,a=63&n,isNaN(r)?s=a=64:isNaN(n)&&(a=64),u=u+N.charAt(o)+N.charAt(i)+N.charAt(s)+N.charAt(a);return u},base64ToBytes:(e="")=>{let t,r,n,o,i,s,a,u=[],l=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<e.length;)o=N.indexOf(e.charAt(l++)),i=N.indexOf(e.charAt(l++)),s=N.indexOf(e.charAt(l++)),a=N.indexOf(e.charAt(l++)),t=o<<2|i>>4,r=(15&i)<<4|s>>2,n=(3&s)<<6|a,u.push(t),64!=s&&u.push(r),64!=a&&u.push(n);return new Uint8Array(u)}};const M=e=>z.toBase64(e);var D=M;const K=new class{__defStyle="vertical-align: middle; mask-position: 50% 50%; mask-repeat: no-repeat; mask-size: 100%; -webkit-mask-position: 50% 50%; -webkit-mask-repeat: no-repeat; -webkit-mask-size: 100%; background-color: currentColor;";__map={back:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M609.408 149.376L277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"/></svg>',right:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"/></svg>',home:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 19.8h3.8v-7h3.303L12 4.697 3.897 12.8H7.2v7H11V17h2v2.8zm5 .2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-6H3.414a1 1 0 0 1-.707-1.707l8.586-8.586a1 1 0 0 1 1.414 0l8.586 8.586A1 1 0 0 1 20.586 14H18v6z" fill-rule="evenodd" fill-opacity=".9"/></svg>',close:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M764.288 214.592L512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"/></svg>',close_circle:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M466.752 512l-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248L466.752 512z"/><path fill="currentColor" d="M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"/></svg>',close_circle_fill:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336L512 457.664z"/></svg>',warning:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M928.99 755.83L574.6 203.25c-12.89-20.16-36.76-32.58-62.6-32.58s-49.71 12.43-62.6 32.58L95.01 755.83c-12.91 20.12-12.9 44.91.01 65.03 12.92 20.12 36.78 32.51 62.59 32.49h708.78c25.82.01 49.68-12.37 62.59-32.49 12.91-20.12 12.92-44.91.01-65.03zM554.67 768h-85.33v-85.33h85.33V768zm0-426.67v298.66h-85.33V341.32l85.33.01z" fill="currentColor"/></svg>',play:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M512 1024A512 512 0 1 1 512 0a512 512 0 0 1 0 1024zm3.008-92.992a416 416 0 1 0 0-832 416 416 0 0 0 0 832zM383.232 287.616l384 224.896-384 223.104v-448z" fill="currentColor"/></svg>',lock:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32H224zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96z"/><path fill="currentColor" d="M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32zm192-160v-64a192 192 0 1 0-384 0v64h384zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64z"/></svg>',lock_fill:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M467.2 713.92v115.968a44.8 44.8 0 0 0 89.6 0V713.92c26.752-14.72 44.8-42.304 44.8-73.92 0-47.104-40.128-85.312-89.6-85.312-49.472 0-89.6 38.208-89.6 85.312 0 31.616 18.048 59.136 44.8 73.92zM64 384h896v640H64V384zm268.8 0h358.4V256c0-94.272-80.256-170.688-179.2-170.688-98.944 0-179.2 76.416-179.2 170.688v128zM512 0c148.48 0 268.8 114.56 268.8 256v128H243.2V256C243.2 114.56 363.52 0 512 0z" fill="currentColor"/></svg>',plus:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64h352z"/></svg>',plus_circle:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64z"/><path fill="currentColor" d="M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0z"/><path fill="currentColor" d="M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"/></svg>',plus_circle_fill:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-38.4 409.6H326.4a38.4 38.4 0 1 0 0 76.8h147.2v147.2a38.4 38.4 0 0 0 76.8 0V550.4h147.2a38.4 38.4 0 0 0 0-76.8H550.4V326.4a38.4 38.4 0 1 0-76.8 0v147.2z"/></svg>',star:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 747.84l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72L512 747.84zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"/></svg>',star_fill:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M283.84 867.84L512 747.776l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72z"/></svg>',share:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M679.872 348.8l-301.76 188.608a127.808 127.808 0 0 1 5.12 52.16l279.936 104.96a128 128 0 1 1-22.464 59.904l-279.872-104.96a128 128 0 1 1-16.64-166.272l301.696-188.608a128 128 0 1 1 33.92 54.272z"/></svg>',love:'<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M171.712 571.648l.352.32 287.904 252.8a64 64 0 0 0 82.912 1.344l296.832-244.544a215.584 215.584 0 1 0-301.824-300.576L512 316.672l-25.888-35.616a215.584 215.584 0 1 0-314.4 290.624zM32 407.584A279.584 279.584 0 0 1 512 212.64a279.584 279.584 0 0 1 480 194.944 278.144 278.144 0 0 1-113.024 224.512l-295.36 243.392a128 128 0 0 1-165.888-2.592L129.984 620.16A278.976 278.976 0 0 1 32 407.584z"/></svg>',love_fill:'<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M32 407.584A279.584 279.584 0 0 1 512 212.64a279.584 279.584 0 0 1 480 194.944 278.144 278.144 0 0 1-113.024 224.512L562.592 892.8a96 96 0 0 1-124.416-1.952L130.016 620.16A278.976 278.976 0 0 1 32 407.584z"/></svg>'};getBase64=e=>{const t=this.getSVG(e);return t?.url||""};getSVG=e=>{if(!e)return;const t=this.__map[e];if(!t)return;return{url:this.toBase64(t),escape:this.toEscape(t)}};toBase64=e=>{if(!e)return"";const t=this._tiny(e);return`data:image/svg+xml;base64,${D(t)}`};_tiny=e=>e?e.replace(/<!--(.*)-->/g,"").replace(/[\r\n]/g," ").replace(/"/g,"'"):"";toEscape=e=>{if(!e)return"";return`data:image/svg+xml,${this._tiny(e).replace(/%/g,"%25").replace(/&/g,"%26").replace(/#/g,"%23").replace(/{/g,"%7B").replace(/}/g,"%7D").replace(/</g,"%3C").replace(/>/g,"%3E")}`};getStyle(e,t={}){if(!e)return"";const r=this.__map[e];return r?this.toStyle(r,t):""}toStyle(e,t={}){if(!e)return"";const r=this.toBase64(e);return r?this.getStyleByUrl(r,t):""}getStyleByUrl(e,t={}){if(!e)return"";const{key:r="mask-image",gradientValue:n="radial-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5))",gradient:o=!1,defStyle:i=this.__defStyle}=t,s=o&&n?`${n}, url("${e}")`:`url("${e}")`;return`${r}:${s};-webkit-${r}:${s};${i}`}},V=NaN,H=/^\s+|\s+$/g,W=/^[-+]0x[0-9a-f]+$/i,Z=/^0b[01]+$/i,Q=/^0o[0-7]+$/i,Y=parseInt,J=1/0,G=17976931348623157e292;function X(e){if("number"==typeof e)return e;if(I.isSymbol(e))return V;if(I.isObject(e)){const t="function"==typeof e.valueOf?e.valueOf():e;e=I.isObject(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(H,"");const t=Z.test(e);return t||Q.test(e)?Y(e.slice(2),t?2:8):W.test(e)?V:+e}function ee(e){return e?(e=X(e))===J||e===-J?(e<0?-1:1)*G:e==e?e:0:0===e?e:0}var te={toNumber:X,toFinite:ee,toInteger:function(e){var t=ee(e),r=t%1;return t==t?r?t-r:t:0}};function re(e){return e!=e}function ne(e,t){return function(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}(t,(function(t){return e[t]}))}var oe,ie,se=(oe=Object.keys,ie=Object,function(e){return oe(ie(e))}),ae=Math.max;function ue(e,t){var r=I.isArray(e)||I.isArguments(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,o=!!n;for(var i in e)!t&&!p.hasOwnProperty.call(e,i)||o&&("length"==i||I.isIndex(i,n))||r.push(i);return r}function le(e,t,r){const{length:n}=e;return r=void 0===r?n:r,!t&&r>=n?e:function(e,t,r){let n=null==e?0:e.length;if(!n)return[];(t=null==t?0:t)<0&&(t=-t>n?0:n+t),(r=(r=void 0===r?n:r)>n?n:r)<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;let o=-1;const i=new Array(n);for(;++o<n;)i[o]=e[o+t];return i}(e,t,r)}const ce=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff\\ufe0e\\ufe0f]");function fe(e){return ce.test(e)}const de="\\ud800-\\udfff",he=`[${de}]`,pe="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]",ge="\\ud83c[\\udffb-\\udfff]",ye=`[^${de}]`,me="(?:\\ud83c[\\udde6-\\uddff]){2}",be="[\\ud800-\\udbff][\\udc00-\\udfff]",we=`${`(?:${pe}|${ge})`}?`,ve="[\\ufe0e\\ufe0f]?",xe=ve+we+`(?:\\u200d(?:${[ye,me,be].join("|")})${ve+we})*`,Ae=`(?:${[`${ye}${pe}?`,pe,me,be,he].join("|")})`,je=RegExp(`${ge}(?=${ge})|${Ae+xe}`,"g");function Oe(e){return fe(e)?function(e){return e.match(je)||[]}(e):function(e){return e.split("")}(e)}function $e(e){return t=>{if(!t)return"";const r=fe(t)?Oe(t):void 0,n=r?r[0]:t[0],o=r?le(r,1).join(""):t.slice(1);return n[e]()+o}}const Ce="\\ud800-\\udfff",ke="\\u2700-\\u27bf",qe="a-z\\xdf-\\xf6\\xf8-\\xff",Be="A-Z\\xc0-\\xd6\\xd8-\\xde",Ee="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",_e="['’]",Pe=`[${Ee}]`,Fe=`[${ke}]`,Se=`[${qe}]`,Te=`[^${Ce}${Ee+"\\d"+ke+qe+Be}]`,Ue="(?:\\ud83c[\\udde6-\\uddff]){2}",Re="[\\ud800-\\udbff][\\udc00-\\udfff]",Le=`[${Be}]`,Ie=`(?:${Se}|${Te})`,Ne=`(?:${Le}|${Te})`,ze=`(?:${_e}(?:d|ll|m|re|s|t|ve))?`,Me=`(?:${_e}(?:D|LL|M|RE|S|T|VE))?`,De="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]|\\ud83c[\\udffb-\\udfff])?",Ke="[\\ufe0e\\ufe0f]?",Ve=Ke+De+`(?:\\u200d(?:${[`[^${Ce}]`,Ue,Re].join("|")})${Ke+De})*`,He=`(?:${[Fe,Ue,Re].join("|")})${Ve}`,We=RegExp([`${Le}?${Se}+${ze}(?=${[Pe,Le,"$"].join("|")})`,`${Ne}+${Me}(?=${[Pe,Le+Ie,"$"].join("|")})`,`${Le}?${Ie}+${ze}`,`${Le}+${Me}`,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",He].join("|"),"g");const Ze=RegExp.prototype.test.bind(/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/),Qe=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Ye(e,t){if(void 0===t){const t=Ze(e)?function(e){return e.match(We)}(e):function(e){return e.match(Qe)}(e);return t||[]}return e.match(t)||[]}function Je(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return`${e.map((e=>null==e?e:Je(e)))}`;if(I.isSymbol(e))return e.toString();const t=`${e}`;return"0"==t&&1/e==-Infinity?"-0":t}const Ge=$e("toUpperCase");$e("toLowerCase");var Xe=e=>Ye(Je(e).replace(/['\u2019]/g,"")).reduce(((e,t,r)=>e+(r?"-":"")+t.toLowerCase()),""),et=e=>Ye(Je(e).replace(/['\u2019]/g,"")).reduce(((e,t,r)=>(t=t.toLowerCase(),e+(r?Ge(t):t))),""),tt=(e,{number:t=!1,boolean:r=!1}={})=>{let n=e;return e&&"string"==typeof e?(t&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?n=Number(e):!r||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(n="true"===e.toLowerCase()),n):n},rt=e=>{try{if(!e)return"";const t=JSON.parse(e);return JSON.stringify(t,null,2)}catch(t){return e}};const nt=e=>{if(!e)return e;if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};for(const r in e)e.hasOwnProperty(r)&&(t[r]=nt(e[r]));return t};const ot=(e,t,r={})=>{const n=e||{},{ignoreUndefined:o=!0,cover:i=!1}=r;if(!t)return n;for(const s in t){if(!t.hasOwnProperty(s))continue;const a=t[s];"object"!=typeof a||"object"!=typeof e[s]||i?o&&void 0===a||r.ignoreNull&&null===a||r.ignoreZero&&0===a||r.ignoreEmptyArray&&Array.isArray(a)&&a.length<=0||r.ignoreEmptyString&&"string"==typeof a&&""===a.trim()||(n[s]=a):n[s]=it(e[s],a,r)}return n},it=(e,t,r={})=>{let n={};return n=e&&"object"==typeof e&&!Array.isArray(e)?ot(e,t,r):ot({...e},t,r),n},st=(e,t,r={})=>ot({...e},t,{cover:!0,...r}),at=(e,t,r,n,o=!1)=>{if(!e||!t||!r)return;let i=e[t];null!==i&&"object"==typeof i&&o&&Object.keys(i).forEach((e=>{at(i,e,r,n,o)})),Object.defineProperty(e,t,{configurable:!0,enumerable:!0,set:s=>{r.call(n,s,i),i=s,o&&at(e,t,r,n,o)},get:()=>i})};var ut={copy:(e,t={})=>{if(void 0===e)return;const r=JSON.parse(JSON.stringify(e));if("object"!=typeof r)return r;if(Array.isArray(r))return r;const{fields:n=[],camel:o=!1,pure:i=!0}=t;if((!n||n.length<=0)&&!o)return r;const s={};for(const e in r){if(!r.hasOwnProperty(e))continue;const a=o?i&&e.startsWith("_")?e:et(e):e;if(n.length>0&&!n.includes(e)&&!n.includes(a))continue;const u=r[e];t.ignoreNull&&null===u||(t.ignoreZero&&0===u||t.ignoreEmptyArray&&Array.isArray(u)&&u.length<=0||t.ignoreEmptyString&&"string"==typeof u&&""===u.trim()||(s[a]=u))}return s},clone:nt,merge:it,isEmpty:e=>0!==e&&(!e||"object"==typeof e&&(Array.isArray(e)?!e.length:Object.keys(e).length<=0)),parseValue:(e,{number:t=!1,boolean:r=!1}={})=>{if(!e&&"object"!=typeof e)return e;for(const[n,o]of Object.entries(e))if("object"==typeof o&&null!==o)for(const[e,n]of Object.entries(o))o[e]=tt(n,{number:t,boolean:r});else e[n]=tt(o,{number:t,boolean:r});return e},cloneClass:function(e){return e?"object"!=typeof e?e:Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e)):e},combine:st,combines:(e,t={})=>{let r={};if(!e||e.length<=0)return r;const{ignoreUndefined:n=!0,ignoreNull:o=!0,ignoreZero:i=!0,ignoreEmptyArray:s=!0,ignoreEmptyString:a=!0,cover:u=!0}=t;return e.forEach((e=>r=st(r,e,{ignoreUndefined:n,ignoreNull:o,ignoreZero:i,ignoreEmptyArray:s,ignoreEmptyString:a,cover:u}))),r},observe:at,find:(e,t)=>{if(e&&"object"==typeof e)return Object.entries(e||{}).find((([e,r])=>!(!t||!t(e,r))))}};class lt{__value=void 0;set(e){this.__value=e}get(){return this.__value}}var ct={singleton:function(){class e{static __instance__;constructor(){}static get Instance(){return e.__instance__||(e.__instance__=new this),e.__instance__}static get I(){return this.Instance}}return e},getset:function(e){const t=new lt;return void 0!==e&&t.set(e),t}};var ft={...I,...p,...ut,...ct,includes:function(e,t,r,n){e=I.isArrayLike(e)?e:function(e){return e?ne(e,function(e){return I.isArrayLike(e)?ue(e):function(e){if(!I.isPrototype(e))return se(e);var t=[];for(var r in Object(e))p.hasOwnProperty.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}(e)):[]}(e),r=r&&!n?te.toInteger(r):0;var o=e.length;return r<0&&(r=ae(o+r,0)),I.isString(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&function(e,t,r){if(t!=t)return 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,re,r);for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}(e,t,r)>-1},forof:(e,t)=>{if(!e)return;let r;if(I.isObject(e)&&(r=I.isArray(e)?e.entries():Object.entries(e),r))for(const[e,n]of r)t&&t(e,n)}};const dt=function(e,{sep:t="&",eq:r="=",max:n=1e3,multiple:o=!0,uri:i=!0,parseNumber:s=!1,parseBoolean:a=!1}={}){t=t||"&",r=r||"=";const u={};if("string"!=typeof e||0===e.length)return u;const l=/\+/g,c=n||1e3;let f=(e=e.split(t)).length;c>0&&f>c&&(f=c);for(let t=0;t<f;++t){let n,s,a,c,f=e[t].replace(l,"%20"),d=f.indexOf(r);d>=0?(n=f.substr(0,d),s=f.substr(d+1)):(n=f,s=""),a=i?decodeURIComponent(n):n,c=i?decodeURIComponent(s):s,p.hasOwnProperty.call(u,a)&&o?Array.isArray(u[a])?u[a].push(c):u[a]=[u[a],c]:u[a]=c}return ut.parseValue(u,{number:s,boolean:a}),u},ht=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},pt=function(e,t=!0){return t?encodeURIComponent(e):e},gt=function(e,{cleanZero:t=!1,cleanNull:r=!1,cleanWhitespace:n=!1}={}){return!(!t||0!==e)||(!(!r||null!=e)||!(!n||"string"!=typeof e||""!==e.trim()))},yt=/^(https?):\/\/([\w.\_\-]+)(?::(\d+))?/,mt=e=>{const t=(e||"").replace(/\\/g,"/").split("?")[0],r=t.match(/[\/]?([\w\_\-]+)[.]?[\w]*[?]?$/),n=r?r[1]:"",o=t.lastIndexOf("/")+1,i=t.substring(o),s=i.lastIndexOf("."),a=i.substring(0,s)||"",u=s>=0?i.substring(s):"";return{route:t.substring(0,o)||"",page:n,name:i,withoutExtension:a,extname:u}},bt=e=>{const t={href:e,url:"",origin:"",protocol:"",host:"",port:"",query:""};if(!e)return t;const r=e.match(yt);if(!r||r.length<4)return t;const n=r[3]||"",o=e.split("?");return t.url=o[0],t.origin=r[0],t.protocol=`${r[1]}:`,t.host=`${r[2]}${n?":"+n:""}`,t.port=n,t.query=o.length>1?o[1]:"",t},wt=(e,t)=>{if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("*"===t)return!0;const r=t.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp("^"+r+"$").test(e)};var vt={parse:dt,stringify:function(e,{sep:t="&",eq:r="=",name:n=null,uri:o=!0,cleanZero:i=!1,cleanNull:s=!1,cleanWhitespace:a=!1}={}){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(n){const u=pt(ht(n),o)+r,l=e[n];return Array.isArray(l)?l.map((function(e){return u+pt(ht(e),o)})).join(t):gt(l,{cleanZero:i,cleanNull:s,cleanWhitespace:a})?"":u+pt(ht(l),o)})).filter(Boolean).join(t):n?pt(ht(n),o)+r+pt(ht(e),o):""},https:e=>e?e.replace(/^http[s]?/,"https"):e,parseUrl:e=>{const t=bt(e),{origin:r="",url:n="",query:o=""}=t,i=mt(n),s=dt(o,{multiple:!0,uri:!1});return{...t,...i,pathname:n.substring(n.indexOf(r||"")+r.length),params:s}},parsePath:mt,parseHost:bt,join:(...e)=>{const t=[];let r=!1;return e.forEach((e=>{const n=e.trim();if(""===n)return;if(/^(\w+):\/\//.test(n))return t.length=0,t.push(n),void(r=!0);n.split("/").forEach((e=>{"."!==e&&""!==e&&(".."===e?t.length>0&&".."!==t[t.length-1]?t.pop():r||t.push(".."):t.push(e))}))})),t.join("/")},shExpMatch:wt,isLocalIpAddress:e=>!!e&&!!(wt(e,"127.0.0.1")||wt(e,"localhost")||wt(e,"192.168.*.*")),parseFileUrl:e=>{const t={href:e,file:"",url:"",protocol:"",host:"",query:"",params:{}};if(!e)return t;let r=e?e.replace(/\\/g,"/"):"";r.startsWith("file://")&&!r.startsWith("file:///")?r="file:///"+r.slice(7):r.startsWith("file:/")&&!r.startsWith("file:///")&&(r="file:///"+r.slice(6));const n=r.match(/^file:\/\/(?:([^\/\\]+))?(\/.*)?$/);if(!n||n.length<3)return t;t.protocol="file:";const o=n[1]||"",i=n[2]||"";t.host=o;const s=i.split("?");return t.url=t.protocol+`//${t.host}`+s[0],t.file=s[0],t.query=s.length>1?s[1]:"",t.params=dt(t.query,{multiple:!0,uri:!1}),t}};const xt="Expected a function",At=Math.max,jt=Math.min;function Ot(e,t=300,r={}){let n,o,i,s,a,u,l=0,c=!1,f=!1,d=!0;if("function"!=typeof e)throw new TypeError(xt);function h(t){const r=n,i=o;return n=o=void 0,l=t,s=e.apply(i,r),s}function p(e){const r=e-u;return void 0===u||r>=t||r<0||f&&e-l>=i}function g(){const e=Date.now();if(p(e))return y(e);a=setTimeout(g,function(e){const r=t-(e-u);return f?jt(r,i-(e-l)):r}(e))}function y(e){return a=void 0,d&&n?h(e):(n=o=void 0,s)}function m(...e){const r=Date.now(),i=p(r);if(n=e,o=this,u=r,i){if(void 0===a)return function(e){return l=e,a=setTimeout(g,t),c?h(e):s}(u);if(f)return a=setTimeout(g,t),h(u)}return void 0===a&&(a=setTimeout(g,t)),s}return t=te.toNumber(t)||0,I.isObject(r)&&(c=!!r.leading,f="maxWait"in r,i=f?At(te.toNumber(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d),m.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=u=o=a=void 0},m.flush=function(){return void 0===a?s:y(Date.now())},m.pending=function(){return void 0!==a},m}class $t{__list=[];constructor(e){this.push(e)}push(e){return e&&this.__list.push(e),this}clear(){return this.__list=[],this}_exec(e,t){let r;if(I.isFunction(e))r=e(t);else{if(I.isPromise(e))return e.then((e=>({...t,...e})));r=e}return I.isPromise(r)?r:Promise.resolve({...r,...t})}run(e){try{return this.__list.reduce(((e,t)=>e.then((e=>this._exec(t,e)))),Promise.resolve(e)).then((e=>[void 0,e])).catch((e=>[e,void 0]))}catch(e){return Promise.reject([e,void 0])}}}async function Ct(e,t,r){return e.then((e=>(r&&r(),[null,e]))).catch((e=>(t&&Object.assign(e,t),r&&r(),[e,void 0])))}const kt=(e,t)=>{try{let r;return r=I.isFunction(e)?e():e,Ct(Promise.resolve(r),void 0,t)}catch(e){return t&&t(),Promise.resolve([e,void 0])}},qt=e=>"string"==typeof(e="function"==typeof e?e():e)?new Error(e):e;var Bt={to:Ct,go:(e,t)=>kt(e,t),delay:(e=1e3)=>new Promise((t=>setTimeout(t,e))),safeRun:kt,toError:qt,timeout:(e,t=0,r="timeout")=>{if(t<=0)return kt(e);let n;function o(){n&&clearTimeout(n)}const i=new Promise((e=>{o(),n=setTimeout((()=>e([qt(r||"timeout"),void 0])),t)}));return Promise.race([kt(e,o),i])}};class Et{_func;_callback;constructor(e,t){this._func=e,this._callback=t}async run(){return Bt.safeRun(this._func).then((e=>{try{this._callback&&this._callback(e)}catch(e){console.log("[ddan] task",e)}finally{return e}}))}}class _t{__list=[];__count=0;__max=1;constructor(e=1){this.__count=0,this.__max=e>0?e:1,this.clear()}push(e,t){const r=new Et(e,t);return this.__list.push(r),this._step(),this}clear(){return this.__list=[],this.__count=0,this}_step(){if(this.__list.length<=0)return;if(this.__count>=this.__max)return;const e=this.__list.shift();e?(this.__count+=1,e?.run().finally((()=>{try{this.__count>0&&(this.__count-=1),this._step()}catch(e){console.error("[ddan] pipepine step finally",e)}}))):this._step()}async whenAll(){for(;;){if(this.__count<=0)break;await Bt.delay(100),this._step()}return this.clear()}}class Pt extends(ct.singleton()){__lockedMap=new Map;pipeline=new _t;constructor(){super()}lock(e,t){if(!e||!t)return;const r=Bt.safeRun(t);return this.__lockedMap.set(e,r),r}unlock(e){e&&this.__lockedMap.has(e)&&this.__lockedMap.delete(e)}async exec(e,t){if(!e||!t)return Bt.safeRun(e);const r=this.__lockedMap.get(t);if(r)return r;const n=this.lock(t,e);if(!n)return Bt.safeRun(e);const o=await n;return this.unlock(t),o}}function Ft(e){return Math.floor(Math.random()*e)}function St(e,t=10){return+parseFloat(Number(e).toExponential(t))}const Tt=180/Math.PI;var Ut={random:Ft,randomRange:function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},lerp:function(e,t,r){return e*(1-r)+t*r},randoms:function(e,t=1,r=!1){const n=[];for(;;){if(n.length>=t)break;if(!r&&n.length>=e)break;const o=Ft(e);r?n.push(o):n.includes(o)||n.push(o)}return n},strip:St,float:function(e,{digits:t=2,fixed:r=!1}={}){const n=St(e).toFixed(t);return r||!t?+n:+n.replace(/(\.[1-9]?)0+$/,"$1").replace(/\.$/,"")},radian2degree:function(e){return e*Tt},degree2radian:function(e){return e/Tt},calcDataSize:function(e){const t={gb:0,mb:0,kb:0,b:0,total:e,desc:""},r=[{name:"gb",divisor:1<<30},{name:"mb",divisor:1<<20},{name:"kb",divisor:1024},{name:"b",divisor:1}];for(const n of r){const r=Math.floor(e/n.divisor);t[n.name]=r,e-=r*n.divisor}return t.gb>0?t.desc=(t.gb+t.mb/1024).toFixed(2)+"GB":t.mb>0?t.desc=(t.mb+t.kb/1024).toFixed(2)+"MB":t.kb>0?t.desc=(t.kb+t.b/1024).toFixed(2)+"KB":t.desc=t.b+"B",t}};var Rt={bytes2str:e=>{if(!e||!I.isArrayLike(e))return"";return e.reduce(((e,t)=>e+String.fromCharCode(t)),"")},str2bytes:(e="")=>{const t=e,r=new Uint8Array(t.length);for(let e=0,n=t.length;e<n;e++)r[e]=t.charCodeAt(e);return r},str2hex:e=>{let t="";for(let r=0;r<e.length;r++)t+=e.charCodeAt(r).toString(16).padStart(2,"0");return t},hex2str:e=>{let t="";for(let r=0;r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t},concatBytes:(...e)=>{const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r},uint32ToBytes:e=>{const t=new Uint8Array(8);return t[0]=e[0]>>>24&255,t[1]=e[0]>>>16&255,t[2]=e[0]>>>8&255,t[3]=255&e[0],t[4]=e[1]>>>24&255,t[5]=e[1]>>>16&255,t[6]=e[1]>>>8&255,t[7]=255&e[1],t},bytesToUint32:e=>{const t=new Uint32Array(2);return t[0]=e[0]<<24|e[1]<<16|e[2]<<8|e[3],t[1]=e[4]<<24|e[5]<<16|e[6]<<8|e[7],t},hex2bytes:e=>{let t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++)t[r]=parseInt(e.substr(2*r,2),16);return t},bytes2hex:e=>Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join(""),toUint32:e=>{const t=Math.ceil(e.length/4),r=new Uint32Array(t);for(let n=0;n<t;n++)r[n]=e.charCodeAt(4*n)<<24|e.charCodeAt(4*n+1)<<16|e.charCodeAt(4*n+2)<<8|e.charCodeAt(4*n+3);return r},fromUint32:e=>{let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]>>>24&255,e[r]>>>16&255,e[r]>>>8&255,255&e[r]);return t.replace(/\0+$/,"")},flatten:function e(t,r=!1,n=[]){for(let o=0;o<t.length;o+=1){const i=t[o];r&&Array.isArray(i)?e(i,r,n):n.push(i)}return n}};var Lt={pkcs7Padding:(e,t)=>{const r=t-e.length%t,n=new Uint8Array(r).fill(r);return Rt.concatBytes(e,n)},pkcs7Unpadding:e=>{const t=e[e.length-1];return e.slice(0,-t)}};function It(e,t){return e<<t|e>>>32-t}function Nt(e,t){let r,n,o,i,s;return o=2147483648&e,i=2147483648&t,r=1073741824&e,n=1073741824&t,s=(1073741823&e)+(1073741823&t),r&n?2147483648^s^o^i:r|n?1073741824&s?3221225472^s^o^i:1073741824^s^o^i:s^o^i}function zt(e,t,r,n,o,i,s){return e=Nt(e,Nt(Nt(function(e,t,r){return e&t|~e&r}(t,r,n),o),s)),Nt(It(e,i),t)}function Mt(e,t,r,n,o,i,s){return e=Nt(e,Nt(Nt(function(e,t,r){return e&r|t&~r}(t,r,n),o),s)),Nt(It(e,i),t)}function Dt(e,t,r,n,o,i,s){return e=Nt(e,Nt(Nt(function(e,t,r){return e^t^r}(t,r,n),o),s)),Nt(It(e,i),t)}function Kt(e,t,r,n,o,i,s){return e=Nt(e,Nt(Nt(function(e,t,r){return t^(e|~r)}(t,r,n),o),s)),Nt(It(e,i),t)}function Vt(e){let t,r,n="",o="";for(r=0;r<=3;r++)t=e>>>8*r&255,o="0"+t.toString(16),n+=o.substr(o.length-2,2);return n}function Ht(e){let t,r,n,o,i,s,a,u,l,c=[];for(c=function(e){let t;const r=e.length,n=r+8,o=16*((n-n%64)/64+1),i=Array(o-1).fill(0);let s=0,a=0;for(;a<r;)t=(a-a%4)/4,s=a%4*8,i[t]=i[t]|e[a]<<s,a++;return t=(a-a%4)/4,s=a%4*8,i[t]=i[t]|128<<s,i[o-2]=r<<3,i[o-1]=r>>>29,i}(e),s=1732584193,a=4023233417,u=2562383102,l=271733878,t=0;t<c.length;t+=16)r=s,n=a,o=u,i=l,s=zt(s,a,u,l,c[t+0],7,3614090360),l=zt(l,s,a,u,c[t+1],12,3905402710),u=zt(u,l,s,a,c[t+2],17,606105819),a=zt(a,u,l,s,c[t+3],22,3250441966),s=zt(s,a,u,l,c[t+4],7,4118548399),l=zt(l,s,a,u,c[t+5],12,1200080426),u=zt(u,l,s,a,c[t+6],17,2821735955),a=zt(a,u,l,s,c[t+7],22,4249261313),s=zt(s,a,u,l,c[t+8],7,1770035416),l=zt(l,s,a,u,c[t+9],12,2336552879),u=zt(u,l,s,a,c[t+10],17,4294925233),a=zt(a,u,l,s,c[t+11],22,2304563134),s=zt(s,a,u,l,c[t+12],7,1804603682),l=zt(l,s,a,u,c[t+13],12,4254626195),u=zt(u,l,s,a,c[t+14],17,2792965006),a=zt(a,u,l,s,c[t+15],22,1236535329),s=Mt(s,a,u,l,c[t+1],5,4129170786),l=Mt(l,s,a,u,c[t+6],9,3225465664),u=Mt(u,l,s,a,c[t+11],14,643717713),a=Mt(a,u,l,s,c[t+0],20,3921069994),s=Mt(s,a,u,l,c[t+5],5,3593408605),l=Mt(l,s,a,u,c[t+10],9,38016083),u=Mt(u,l,s,a,c[t+15],14,3634488961),a=Mt(a,u,l,s,c[t+4],20,3889429448),s=Mt(s,a,u,l,c[t+9],5,568446438),l=Mt(l,s,a,u,c[t+14],9,3275163606),u=Mt(u,l,s,a,c[t+3],14,4107603335),a=Mt(a,u,l,s,c[t+8],20,1163531501),s=Mt(s,a,u,l,c[t+13],5,2850285829),l=Mt(l,s,a,u,c[t+2],9,4243563512),u=Mt(u,l,s,a,c[t+7],14,1735328473),a=Mt(a,u,l,s,c[t+12],20,2368359562),s=Dt(s,a,u,l,c[t+5],4,4294588738),l=Dt(l,s,a,u,c[t+8],11,2272392833),u=Dt(u,l,s,a,c[t+11],16,1839030562),a=Dt(a,u,l,s,c[t+14],23,4259657740),s=Dt(s,a,u,l,c[t+1],4,2763975236),l=Dt(l,s,a,u,c[t+4],11,1272893353),u=Dt(u,l,s,a,c[t+7],16,4139469664),a=Dt(a,u,l,s,c[t+10],23,3200236656),s=Dt(s,a,u,l,c[t+13],4,681279174),l=Dt(l,s,a,u,c[t+0],11,3936430074),u=Dt(u,l,s,a,c[t+3],16,3572445317),a=Dt(a,u,l,s,c[t+6],23,76029189),s=Dt(s,a,u,l,c[t+9],4,3654602809),l=Dt(l,s,a,u,c[t+12],11,3873151461),u=Dt(u,l,s,a,c[t+15],16,530742520),a=Dt(a,u,l,s,c[t+2],23,3299628645),s=Kt(s,a,u,l,c[t+0],6,4096336452),l=Kt(l,s,a,u,c[t+7],10,1126891415),u=Kt(u,l,s,a,c[t+14],15,2878612391),a=Kt(a,u,l,s,c[t+5],21,4237533241),s=Kt(s,a,u,l,c[t+12],6,1700485571),l=Kt(l,s,a,u,c[t+3],10,2399980690),u=Kt(u,l,s,a,c[t+10],15,4293915773),a=Kt(a,u,l,s,c[t+1],21,2240044497),s=Kt(s,a,u,l,c[t+8],6,1873313359),l=Kt(l,s,a,u,c[t+15],10,4264355552),u=Kt(u,l,s,a,c[t+6],15,2734768916),a=Kt(a,u,l,s,c[t+13],21,1309151649),s=Kt(s,a,u,l,c[t+4],6,4149444226),l=Kt(l,s,a,u,c[t+11],10,3174756917),u=Kt(u,l,s,a,c[t+2],15,718787259),a=Kt(a,u,l,s,c[t+9],21,3951481745),s=Nt(s,r),a=Nt(a,n),u=Nt(u,o),l=Nt(l,i);return Vt(s)+Vt(a)+Vt(u)+Vt(l)}const Wt=e=>{if("string"!=typeof e&&!(e instanceof Uint8Array))return"";return Ht("string"==typeof e?n.toUtf8Bytes(e):e)};var Zt={md5:Wt,md5Base64:e=>{const t=Wt(e);if(!t)return"";const r=Rt.hex2bytes(t);return z.bytesToBase64(r)}};const Qt=(e,t=!1)=>{const r=new Uint8Array(e);return t?z.bytesToBase64(r):r.reduce(((e,t)=>e+String.fromCharCode(t)),"")};var Yt={...Rt,...Lt,...n,...z,...Zt,str2ab:(e="",t=!1)=>{if(t)return z.base64ToBytes(e).buffer;{const t=new ArrayBuffer(e.length),r=new Uint8Array(t);for(let t=0,n=e.length;t<n;t++)r[t]=e.charCodeAt(t);return t}},ab2str:Qt,utf8ToBase64:e=>I.isBrowser?btoa(e):Buffer.from(e,"utf-8").toString("base64"),base64ToUtf8:e=>I.isBrowser?atob(e):Buffer.from(e,"base64").toString("utf-8"),getRandomBytes:e=>{const t=new Uint8Array(e);for(let r=0;r<e;r++)t[r]=Ut.random(256);return t},textEncode:e=>n.toUtf8Bytes(e),textDecode:e=>n.fromUtf8Bytes(new Uint8Array(e)),toDataUrl:(e,t="text/plain")=>e?"string"==typeof e?`data:${t};base64,`+z.toBase64(e):I.isArrayBuffer(e)?`data:${t};base64,`+Qt(e,!0):"":""};const Jt=e=>{try{const t=Yt.ab2str(e,!0);return t.match(/.{1,64}/g)?.join("\n")||""}catch(e){return""}},Gt=(e="",t="PUBLIC KEY")=>`-----BEGIN ${t}-----\n${e}\n-----END ${t}-----`;var Xt={RSAPublicKey:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApiLWsPmoaiGdr02AmPYS\n4/VgxyJNNJSK2VICirXl4P8qAP3b/6GIs7Hwnsmmuj7gledJ0XiZodFjDNgQEZEG\nj4K9KX8NixcrJwnTQV5UebiERdj+64ihwqPVWo9dIOj43ZPJ8f4dritJv5tnQaBb\nb9zTkU3Ofzk1g8RU00Ith6quOGZcU2IWC4OQ+5YiZvzrCBKEvjFwK2OvGq43tI51\nGaZdI9H09jisypqefsMvv6esjEQQOtl+WGlI5fof7KZUt3dppvuDI4CYgeXIoKKL\n9T9qDl8F9aNSs3XHx32YyA7L1FraFD6PjqRjueIFp2emsXQcIMeMqqgVyV+4qb+0\nuwIDAQAB",RSAPrivateKey:"MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCmItaw+ahqIZ2v\nTYCY9hLj9WDHIk00lIrZUgKKteXg/yoA/dv/oYizsfCeyaa6PuCV50nReJmh0WMM\n2BARkQaPgr0pfw2LFysnCdNBXlR5uIRF2P7riKHCo9Vaj10g6Pjdk8nx/h2uK0m/\nm2dBoFtv3NORTc5/OTWDxFTTQi2Hqq44ZlxTYhYLg5D7liJm/OsIEoS+MXArY68a\nrje0jnUZpl0j0fT2OKzKmp5+wy+/p6yMRBA62X5YaUjl+h/splS3d2mm+4MjgJiB\n5cigoov1P2oOXwX1o1KzdcfHfZjIDsvUWtoUPo+OpGO54gWnZ6axdBwgx4yqqBXJ\nX7ipv7S7AgMBAAECggEAE1kuWLkSsJ2OoDpt9iJ+a7cJmNd5V1zPWOTwr9fkWFJP\nQYNPKlPVOFxKUivY84rcHAkuMyuQ9OQOXZISOQGDWpZW0mzeFmtR1r+Rr2S9gNmI\n6huOAL9OW306HUxiA7GuPhv2omy+Zyjac2q1WVLEI2B78Um2+WEfxuNIH7xu0gRR\nz/wluevMBQlv6hSeMESP6e9s2kB+FuM4bL7+1sexwS1TudKbHybujaiB8un9E2V3\nC9BkE6yf00Rhvii6Q4E4w3PFQfcBEFnjOD0S2Watx8GIbYjlYvtquy8Yj7OtyZB6\nw5sxyaYhKVVnkpGAbOgaCj94ABYF47VuwXr45I4PzQKBgQDp6svzD+QKlARjcWgO\nrH7UEpFX6m49G6Ib4c63xEg9+GesTgfDxoYxtXDKsC7I8OwMrmffJGbyfjaAvzmg\nicM3Y7kF6UPO9+q2mBRsyhoJSNONTeUVyoFSc+QDsVgndlTZIjqC5XLrONGaSPLJ\n7jJzqKhp3NQcpO8+xY0d7Efm1QKBgQC10fCNuF1LUTYgsWvvGxTiCCAIBurZmHU+\nGMb2Okfoco/P+QNl1jEba91AC7FudW3g/lRn0vTnDajlNoz2/CKunrTKN4/9lEBI\ntiwEOvhc5FtapRifSfrrNwFqPM+LijvOkcteWVhAUWCEP1eLmpnXGqfmZxnTaaVe\n5DyDgyAVTwKBgQDhEawfOQEANJ9sV2f6BnsZ7quuXcCoR3hZP5G5O8EO735BSesq\nsk/YcG4QeCjr6vQU15LWH552YH5srpHyJ9uP5gHW8DTwZZaPDhFJA8S9fjcfVP3B\nU9HO1fdknjTl83N8YPTPkZpbPZZfzyTcqrYclwFEqtfkn8YbLdW0Hu6n6QKBgDEv\njvS3uD1ExfDILlurptWSvx+Mx4F/1c+roj8/+u3t9+uaAIpPDE/PuTW3NBOens/r\n3WeM0QWkU1lWjYHPKY61jlDaARDnRxCkf3nRfhibCf+Wg/erar6wzagwtTCZf55d\nIHfwkYgsu4BrJkK02wMuydbxczIW9U6bTaeCFG7PAoGAN3oHYzTEBwZ7ZKv11QiQ\nEp/HeHBvD8fH/e1uVyBel4Co7NO5pV2s8qjS8+3+jxumKLNXCirjqwHo03YCdzxi\ncy4GFDsukHmDQ7FF9VC4QV0fJ0F7jGYE9nNZ+K9qwS5KrihOSBPxj0HptrF6TSOw\nBTSwr0byL3TC0m0StkSNKpo=",generateKeys:async e=>{try{const t=await e.generateKey({name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!0,["encrypt","decrypt"]),r=await window.crypto.subtle.exportKey("spki",t.publicKey),n=Jt(r),o=Gt(n,"PUBLIC KEY"),i=await window.crypto.subtle.exportKey("pkcs8",t.privateKey),s=Jt(i);return{publicKey:n,publicKeyPem:o,privateKey:s,privateKeyPem:Gt(s,"PRIVATE KEY")}}catch(e){return console.error("generateKeys failed:",e),{publicKey:"",publicKeyPem:"",privateKey:"",privateKeyPem:""}}},format_pem_key:Gt,format_pem_content:Jt,encrypt:async(e,t,r)=>{try{const n=(new TextEncoder).encode(t),o=await e.importKey("spki",Yt.str2ab(r,!0),{name:"RSA-OAEP",hash:"SHA-256"},!0,["encrypt"]),i=[];for(let t=0;t<n.length;t+=190){let r=n.slice(t,t+190),s=await e.encrypt({name:"RSA-OAEP"},o,r);i.push(new Uint8Array(s))}const s=Yt.concatBytes(...i);return Yt.bytesToBase64(s)}catch(e){return console.error("[debug] encrypt",e),""}},decrypt:async(e,t,r)=>{try{const n=Yt.base64ToBytes(t),o=await e.importKey("pkcs8",Yt.str2ab(r,!0),{name:"RSA-OAEP",hash:"SHA-256"},!0,["decrypt"]),i=[],s=256;for(let t=0;t<n.length;t+=s){let r=n.slice(t,t+s),a=await e.decrypt({name:"RSA-OAEP"},o,r);i.push(new Uint8Array(a))}const a=Yt.concatBytes(...i);return(new TextDecoder).decode(a)}catch(e){return console.error("decrypt failed:",e),""}}};const er=()=>r.default.webcrypto.subtle;var tr=async e=>Xt.encrypt(er(),e,Xt.RSAPublicKey),rr=async e=>Xt.decrypt(er(),e,Xt.RSAPrivateKey);const nr="undefined"!=typeof window?window.crypto.subtle:{};var or=async e=>Xt.encrypt(nr,e,Xt.RSAPublicKey),ir=async e=>Xt.decrypt(nr,e,Xt.RSAPrivateKey);const sr=2654435769,ar=(e,t)=>{let r=0;for(let n=0;n<32;n++)r=r+sr>>>0,e[0]=e[0]+((e[1]<<4)+t[0]^e[1]+r^(e[1]>>>5)+t[1])>>>0,e[1]=e[1]+((e[0]<<4)+t[2]^e[0]+r^(e[0]>>>5)+t[3])>>>0;return e},ur=(e,t)=>{let r=3337565984;for(let n=0;n<32;n++)e[1]=e[1]-((e[0]<<4)+t[2]^e[0]+r^(e[0]>>>5)+t[3])>>>0,e[0]=e[0]-((e[1]<<4)+t[0]^e[1]+r^(e[1]>>>5)+t[1])>>>0,r=r-sr>>>0;return e},lr=e=>{const t=Yt.str2bytes(e),r=new Uint32Array(4);return r[0]=t[0]<<24|t[1]<<16|t[2]<<8|t[3],r[1]=t[4]<<24|t[5]<<16|t[6]<<8|t[7],r[2]=t[8]<<24|t[9]<<16|t[10]<<8|t[11],r[3]=t[12]<<24|t[13]<<16|t[14]<<8|t[15],r},cr=(e,t)=>{const r=Yt.pkcs7Padding(e,8),n=lr(t),o=[];for(let e=0;e<r.length;e+=8){const t=Yt.bytesToUint32(r.slice(e,e+8)),i=ar(t,n);o.push(Yt.uint32ToBytes(i))}return Yt.concatBytes(...o)},fr=(e,t)=>{const r=lr(t),n=[];for(let t=0;t<e.length;t+=8){const o=Yt.bytesToUint32(e.slice(t,t+8)),i=ur(o,r);n.push(Yt.uint32ToBytes(i))}const o=Yt.concatBytes(...n);return Yt.pkcs7Unpadding(o)};var dr="33576f37387276645054657a6831686e454664424e5652456f47794835795942",hr=(e,t)=>{const r=Yt.textEncode(e),n=cr(r,t);return Yt.bytesToBase64(n)},pr=(e,t)=>{const r=Yt.base64ToBytes(e),n=fr(r,t);return Yt.textDecode(n.buffer)};var gr={logString:e=>{try{const t=JSON.stringify(e);return void 0===t?"":hr(t,Yt.hex2str(dr))}catch(e){return""}},logParse:e=>{try{if(!e)return"";const t=pr(e,Yt.hex2str(dr));return rt(t)}catch(e){return""}},logRString:async e=>{try{const t=JSON.stringify(e);if(void 0===t)return"";return I.isBrowser?await or(t):await tr(t)}catch(e){return""}},logRParse:async e=>{try{if(!e)return"";const t=I.isBrowser?await ir(e):await rr(e);return rt(t)}catch(e){return""}}};const yr=(e,t,r)=>e*(1-r)+t*r,mr=(e,t,r)=>e===t?0:(r-e)/(t-e),br=(e,t,r)=>({x:yr(e.x,t.x,r),y:yr(e.y,t.y,r)}),wr=(e,t,r,n)=>{const o=br(e,t,n),i=br(t,r,n);return br(o,i,n)},vr=(e,t)=>{if(1===e.length)return e[0];const r=[];for(let n=0;n<e.length-1;n++)r.push({x:(1-t)*e[n].x+t*e[n+1].x,y:(1-t)*e[n].y+t*e[n+1].y});return vr(r,t)},xr=(e,t)=>{if(0===t||t===e)return 1;let r=1;for(let n=1;n<=t;n++)r=r*(e-n+1)/n;return r};var Ar={bezier1:br,bezier2:wr,bezier3:(e,t,r,n,o)=>{const i=wr(e,t,r,o),s=wr(t,r,n,o);return br(i,s,o)},bezier:vr,bezierCurve:(e,t)=>{const r=e.length-1;let n=0,o=0;for(let i=0;i<=r;i++){const s=xr(r,i)*Math.pow(1-t,r-i)*Math.pow(t,i);n+=s*e[i].x,o+=s*e[i].y}return{x:n,y:o}},lerp:yr,lerpAverage:(e,t,r="")=>{if(e.length<=0)return 0;if(1===e.length)return e[0].x;if(2===e.length)return yr(e[0].y,e[1].y,.5);const n=[],o=e.slice().sort(((e,t)=>e.x-t.x)),i=o.length,s=o[0].x,a=o[i-1].x;for(let e=s;e<=a;e+=t){let t=0;for(let n=0;n<i-1;n++){const i=o[n],s=o[n+1];if(e>=i.x&&e<=s.x){if("lerp"===r){const r=mr(i.x,s.x,e);t=br(i,s,r).y}else t=i.y;break}}e>o[i-1].x&&(t=o[i-1].y),n.push(t)}return n.reduce(((e,t)=>e+t),0)/n.length},proportion:mr};var jr={...Bt,...gr,...Ar,sleep:Bt.delay,run:async function(e,t=0){if(t<=0)return Bt.safeRun(e);const r=t>0?Date.now():0,n=await Bt.safeRun(e),o=Date.now()-r;return o<t&&await Bt.delay(t-o),n},exec:(e,t="")=>Pt.I.exec(e,t),debounce:Ot,throttle:function(e,t=300,r={}){let n=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return I.isObject(r)&&(n=r.leading?!!r.leading:n,o=r.trailing?!!r.trailing:o),Ot(e,t,{leading:n,maxWait:t,trailing:o})},task:e=>new $t(e),mutex:function(e){var t=null;return async function(...r){if((t=this||t||{}).__ddMutex)return!1;t.__ddMutex=!0;try{e&&await Promise.resolve(e.apply(this,r))}catch(e){console.log(e)}finally{t.__ddMutex=!1}}},polling:async function(e={}){const{func:t,interval:r=100,times:n=1e3}=e;let o=n;const i=r<1?100:r;do{if(!t)break;const[e,r]=await Bt.to(Promise.resolve(t()));if(e||!1===r)break;o>0&&o--,0!==o&&await Bt.delay(i)}while(-1===n||o>0)},pipe:(e,t)=>Pt.I.pipeline.push(e,t),pipeline:(e=1)=>new _t(e),safeTask:(e,t)=>new Et(e,t)};const Or=/%[sdj%]/g;let $r=()=>{};function Cr(e){if(!e||!e.length)return null;const t={};return e.forEach((e=>{const r=e.field;t[r]=t[r]||[],t[r].push(e)})),t}function kr(e,...t){let r=0;const n=t.length;if("function"==typeof e)return e.apply(null,t);if("string"==typeof e){return e.replace(Or,(e=>{if("%%"===e)return"%";if(r>=n)return e;switch(e){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(e){return"[Circular]"}break;default:return e}}))}return e}function qr(e,t){return null==e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!=typeof e||e))}function Br(e,t,r){let n=0;const o=e.length;!function i(s){if(s&&s.length)return void r(s);const a=n;n+=1,a<o?t(e[a],i):r([])}([])}"undefined"!=typeof process&&process.env&&"production"!==process.env.NODE_ENV&&"undefined"!=typeof window&&"undefined"!=typeof document&&($r=(e,t)=>{"undefined"!=typeof console&&console.warn&&"undefined"==typeof ASYNC_VALIDATOR_NO_WARNING&&t.every((e=>"string"==typeof e))&&console.warn(e,t)});class Er extends Error{errors;fields;constructor(e,t){super("Async Validation Error"),this.errors=e,this.fields=t}}function _r(e,t,r,n,o){if(t.first){const t=new Promise(((t,i)=>{const s=function(e){const t=[];return Object.keys(e).forEach((r=>{t.push(...e[r]||[])})),t}(e);Br(s,r,(e=>(n(e),e.length?i(new Er(e,Cr(e))):t(o))))}));return t.catch((e=>e)),t}const i=!0===t.firstFields?Object.keys(e):t.firstFields||[],s=Object.keys(e),a=s.length;let u=0;const l=[],c=new Promise(((t,c)=>{const f=e=>{if(l.push.apply(l,e),u++,u===a)return n(l),l.length?c(new Er(l,Cr(l))):t(o)};s.length||(n(l),t(o)),s.forEach((t=>{const n=e[t];-1!==i.indexOf(t)?Br(n,r,f):function(e,t,r){const n=[];let o=0;const i=e.length;function s(e){n.push(...e||[]),o++,o===i&&r(n)}e.forEach((e=>{t(e,s)}))}(n,r,f)}))}));return c.catch((e=>e)),c}function Pr(e,t){return r=>{let n;return n=e.fullFields?function(e,t){let r=e;for(let e=0;e<t.length;e++){if(null==r)return r;r=r[t[e]]}return r}(t,e.fullFields):t[r.field||e.fullField],(o=r)&&void 0!==o.message?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:"function"==typeof r?r():r,fieldValue:n,field:r.field||e.fullField};var o}}function Fr(e,t){if(t)for(const r in t)if(t.hasOwnProperty(r)){const n=t[r];"object"==typeof n&&"object"==typeof e[r]?e[r]={...e[r],...n}:e[r]=n}return e}const Sr=(e,t,r,n,o,i)=>{!e.required||r.hasOwnProperty(e.field||"")&&!qr(t,i||e.type)||n.push(kr(o.messages.required,e.fullField))};let Tr;const Ur=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,Rr=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,Lr={integer:e=>Lr.number(e)&&parseInt(e,10)===e,float:e=>Lr.number(e)&&!Lr.integer(e),array:e=>Array.isArray(e),regexp(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:e=>"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime()),number:e=>!isNaN(e)&&"number"==typeof e,object:e=>"object"==typeof e&&!Lr.array(e),method:e=>"function"==typeof e,email:e=>"string"==typeof e&&e.length<=320&&!!e.match(Ur),url:e=>"string"==typeof e&&e.length<=2048&&!!e.match((()=>{if(Tr)return Tr;const e="[a-fA-F\\d:]",t=t=>t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|$))`:"",r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",o=`\n(?:\n(?:${n}:){7}(?:${n}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${n}:){6}(?:${r}|:${n}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${n}:){5}(?::${r}|(?::${n}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${n}:){4}(?:(?::${n}){0,1}:${r}|(?::${n}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${n}:){3}(?:(?::${n}){0,2}:${r}|(?::${n}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${n}:){2}(?:(?::${n}){0,3}:${r}|(?::${n}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${n}:){1}(?:(?::${n}){0,4}:${r}|(?::${n}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${n}){0,5}:${r}|(?::${n}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),i=new RegExp(`(?:^${r}$)|(?:^${o}$)`),s=new RegExp(`^${r}$`),a=new RegExp(`^${o}$`),u=e=>e&&e.exact?i:new RegExp(`(?:${t(e)}${r}${t(e)})|(?:${t(e)}${o}${t(e)})`,"g");u.v4=e=>e&&e.exact?s:new RegExp(`${t(e)}${r}${t(e)}`,"g"),u.v6=e=>e&&e.exact?a:new RegExp(`${t(e)}${o}${t(e)}`,"g");const l=u.v4().source,c=u.v6().source;return Tr=new RegExp(`(?:^(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|${l}|${c}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?$)`,"i"),Tr})()),hex:e=>"string"==typeof e&&!!e.match(Rr)},Ir="enum";var Nr={required:Sr,whitespace:(e,t,r,n,o)=>{(/^\s+$/.test(t)||""===t)&&n.push(kr(o.messages.whitespace,e.fullField))},type:(e,t,r,n,o)=>{if(e.required&&void 0===t)return void Sr(e,t,r,n,o);const i=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(i)>-1?Lr[i](t)||n.push(kr(o.messages.types[i],e.fullField,e.type)):i&&typeof t!==e.type&&n.push(kr(o.messages.types[i],e.fullField,e.type))},range:(e,t,r,n,o)=>{const i="number"==typeof e.len,s="number"==typeof e.min,a="number"==typeof e.max,u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;let l=t,c="";const f="number"==typeof t,d="string"==typeof t,h=Array.isArray(t);if(f?c="number":d?c="string":h&&(c="array"),!c)return!1;h&&(l=t.length),d&&(l=t.replace(u,"_").length),i?l!==e.len&&n.push(kr(o.messages[c].len,e.fullField,e.len)):s&&!a&&l<e.min?n.push(kr(o.messages[c].min,e.fullField,e.min)):a&&!s&&l>e.max?n.push(kr(o.messages[c].max,e.fullField,e.max)):s&&a&&(l<e.min||l>e.max)&&n.push(kr(o.messages[c].range,e.fullField,e.min,e.max))},enum:(e,t,r,n,o)=>{e[Ir]=Array.isArray(e[Ir])?e[Ir]:[],-1===e[Ir].indexOf(t)&&n.push(kr(o.messages[Ir],e.fullField,e[Ir].join(", ")))},pattern:(e,t,r,n,o)=>{if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||n.push(kr(o.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"==typeof e.pattern){new RegExp(e.pattern).test(t)||n.push(kr(o.messages.pattern.mismatch,e.fullField,t,e.pattern))}}};const zr=(e,t,r,n,o)=>{const i=e.type,s=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(qr(t,i)&&!e.required)return r();Nr.required(e,t,n,s,o,i),qr(t,i)||Nr.type(e,t,n,s,o)}r(s)};var Mr={string:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field||"")){if(qr(t,"string")&&!e.required)return r();Nr.required(e,t,n,i,o,"string"),qr(t,"string")||(Nr.type(e,t,n,i,o),Nr.range(e,t,n,i,o),Nr.pattern(e,t,n,i,o),!0===e.whitespace&&Nr.whitespace(e,t,n,i,o))}r(i)},method:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(qr(t)&&!e.required)return r();Nr.required(e,t,n,i,o),void 0!==t&&Nr.type(e,t,n,i,o)}r(i)},number:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(""===t&&(t=void 0),qr(t)&&!e.required)return r();Nr.required(e,t,n,i,o),void 0!==t&&(Nr.type(e,t,n,i,o),Nr.range(e,t,n,i,o))}r(i)},boolean:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(qr(t)&&!e.required)return r();Nr.required(e,t,n,i,o),void 0!==t&&Nr.type(e,t,n,i,o)}r(i)},regexp:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(qr(t)&&!e.required)return r();Nr.required(e,t,n,i,o),qr(t)||Nr.type(e,t,n,i,o)}r(i)},integer:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(qr(t)&&!e.required)return r();Nr.required(e,t,n,i,o),void 0!==t&&(Nr.type(e,t,n,i,o),Nr.range(e,t,n,i,o))}r(i)},float:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(qr(t)&&!e.required)return r();Nr.required(e,t,n,i,o),void 0!==t&&(Nr.type(e,t,n,i,o),Nr.range(e,t,n,i,o))}r(i)},array:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(null==t&&!e.required)return r();Nr.required(e,t,n,i,o,"array"),null!=t&&(Nr.type(e,t,n,i,o),Nr.range(e,t,n,i,o))}r(i)},object:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(qr(t)&&!e.required)return r();Nr.required(e,t,n,i,o),void 0!==t&&Nr.type(e,t,n,i,o)}r(i)},enum:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(qr(t)&&!e.required)return r();Nr.required(e,t,n,i,o),void 0!==t&&Nr.enum(e,t,n,i,o)}r(i)},pattern:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(qr(t,"string")&&!e.required)return r();Nr.required(e,t,n,i,o),qr(t,"string")||Nr.pattern(e,t,n,i,o)}r(i)},date:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(qr(t,"date")&&!e.required)return r();if(Nr.required(e,t,n,i,o),!qr(t,"date")){let r;r=t instanceof Date?t:new Date(t),Nr.type(e,r,n,i,o),r&&Nr.range(e,r.getTime(),n,i,o)}}r(i)},url:zr,hex:zr,email:zr,required:(e,t,r,n,o)=>{const i=[],s=Array.isArray(t)?"array":typeof t;Nr.required(e,t,n,i,o,s),r(i)},any:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(qr(t)&&!e.required)return r();Nr.required(e,t,n,i,o)}r(i)}};function Dr(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone(){const e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}const Kr=Dr();class Vr{static register=function(e,t){if("function"!=typeof t)throw new Error("Cannot register a validator by type, validator is not a function");Mr[e]=t};static warning=$r;static messages=Kr;static validators=Mr;rules={};_messages=Kr;constructor(e){this.define(e)}define(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach((t=>{const r=e[t];this.rules[t]=Array.isArray(r)?r:[r]}))}messages(e){return e&&(this._messages=Fr(Dr(),e)),this._messages}validate(e,t={},r=(()=>{})){let n=e,o=t,i=r;if("function"==typeof o&&(i=o,o={}),!this.rules||0===Object.keys(this.rules).length)return i&&i(null,n),Promise.resolve(n);if(o.messages){let e=this.messages();e===Kr&&(e=Dr()),Fr(e,o.messages),o.messages=e}else o.messages=this.messages();const s={};(o.keys||Object.keys(this.rules)).forEach((t=>{const r=this.rules[t];let o=n[t];r.forEach((r=>{let i=r;"function"==typeof i.transform&&(n===e&&(n={...n}),o=n[t]=i.transform(o)),i="function"==typeof i?{validator:i}:{...i},i.validator=this.getValidationMethod(i),i.validator&&(i.field=t,i.fullField=i.fullField||t,i.type=this.getType(i),s[t]=s[t]||[],s[t].push({rule:i,value:o,source:n,field:t}))}))}));const a={};return _r(s,o,((e,t)=>{const r=e.rule;let i,s=!("object"!==r.type&&"array"!==r.type||"object"!=typeof r.fields&&"object"!=typeof r.defaultField);function u(e,t){return{...t,fullField:`${r.fullField}.${e}`,fullFields:r.fullFields?[...r.fullFields,e]:[e]}}function l(i=[]){let l=Array.isArray(i)?i:[i];!0===o.suppressWarning&&l.length&&Vr.warning("async-validator:",l),l.length&&void 0!==r.message&&(l=[].concat(r.message));let c=l.map(Pr(r,n));if(o.first&&c.length)return a[r.field]=1,t(c);if(s){if(r.required&&!e.value)return void 0!==r.message?c=[].concat(r.message).map(Pr(r,n)):o.error&&(c=[o.error(r,kr(o.messages.required,r.field))]),t(c);let i={};r.defaultField&&Object.keys(e.value).map((e=>{i[e]=r.defaultField})),i={...i,...e.rule.fields};const s={};Object.keys(i).forEach((e=>{const t=i[e],r=Array.isArray(t)?t:[t];s[e]=r.map(u.bind(null,e))}));const a=new Vr(s);a.messages(o.messages),e.rule.options&&(e.rule.options.messages=o.messages,e.rule.options.error=o.error),a.validate(e.value,e.rule.options||o,(e=>{const r=[];c&&c.length&&r.push(...c),e&&e.length&&r.push(...e),t(r.length?r:null)}))}else t(c)}if(s=s&&(r.required||!r.required&&e.value),r.field=e.field,r.asyncValidator)i=r.asyncValidator(r,e.value,l,e.source,o);else if(r.validator){try{i=r.validator(r,e.value,l,e.source,o)}catch(e){console.error?.(e),o.suppressValidatorError||setTimeout((()=>{throw e}),0),l(e.message)}!0===i?l():!1===i?l("function"==typeof r.message?r.message(r.fullField||r.field):r.message||`${r.fullField||r.field} fails`):i instanceof Array?l(i):i instanceof Error&&l(i.message)}i&&i.then&&i.then((()=>l()),(e=>l(e)))}),(e=>{!function(e){let t=[],r={};for(let r=0;r<e.length;r++)o=e[r],Array.isArray(o)?t=t.concat(...o):t.push(o);var o;t.length?(r=Cr(t),i(t,r)):i(null,n)}(e)}),n)}getType(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!Mr.hasOwnProperty(e.type))throw new Error(kr("Unknown rule type %s",e.type));return e.type||"string"}getValidationMethod(e){if("function"==typeof e.validator)return e.validator;const t=Object.keys(e),r=t.indexOf("message");return-1!==r&&t.splice(r,1),1===t.length&&"required"===t[0]?Mr.required:Mr[this.getType(e)]||void 0}}function Hr(e){return new Vr(e)}var Wr={validateId:function(e){return!!e&&(!(e.length<6)&&!!/^[A-Za-z0-9_-]+$/.test(e))},validatePhone:function(e){return!!e&&!!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e)},validator:Hr,validate:function(e,t,r={},n=(()=>{})){return jr.run(Hr(e).validate(t,r,n))},isChinese:function(e){return!!e&&!!/^[\u4E00-\u9FA5]+$/.test(e)},isNumber:function(e){return!!e&&!!/^[0-9]+$/.test(e)},isFloat:function(e){return!!e&&!!/^(\-|\+)?\d+(\.\d+)?$/.test(e)},isPhoneNumber:function(e){return!!e&&!!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e)}};const Zr=e=>{if(!e)return"";if(!ft.isObject(e))return"";let t="";return ft.forof(e,((e,r)=>{r&&(t+=`${Xe(e)}:${r};`)})),t},Qr=["display","position","top","bottom","left","right","padding","margin","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","height","width","fontSize","textAlign","fontFamily","border","borderLeft","borderRight","borderTop","borderBottom","borderColor","borderRadius","background","backgroundImage","backgroundRepeat","backgroundSize","backgroundPosition","color","overflow","opacity","flexDirection","justifyContent","alignItems","flexWrap","alignContent","alignSelf","flex","flexBasis","flexFlow","flexShrink","pointerEvents"],Yr=["top","bottom","left","right","padding","margin","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","height","width","border","borderLeft","borderRight","borderTop","borderBottom","borderColor","borderRadius"],Jr=(e,t="px")=>e&&t?"0"===e?e:Wr.isFloat(e.toString())?`${e}${t}`:e:e;var Gr={stringify:Zr,parse:(e,{camel:t=!1,pure:r=!0}={})=>{if(!e.trim())return;const n=vt.parse(e,{sep:";",eq:":",uri:!1}),o={};return ft.forof(n,((e,n)=>{if(!n)return;const i=t?r&&e.startsWith("_")?e:et(e):e;Wr.isFloat(n)||n.length>=2&&n.startsWith(".")&&Wr.isNumber(n.substr(1))?o[i]=+n:o[i]=n})),o},fixValue:Jr,style:(e,t="px")=>{if(!e)return"";const r=ft.copy(e,{fields:Qr});ft.forof(r,((e,n)=>{(Yr.includes(e)||Yr.includes(et(e)))&&(r[e]=Jr(n,t))}));return Zr(r)},commonFields:Qr};var Xr={getDataURL:(e,t)=>{const r={contentType:"",dataUrl:""};return Bt.to(fetch(e,{cache:t}).then((e=>(r.contentType=e.headers.get("content-type")||"",e.arrayBuffer()))).then((e=>(r.dataUrl=`data:${r.contentType};base64,`+Yt.ab2str(e,!0),r))))},getArrayBuffer:async(e,t)=>Bt.to(fetch(e,{cache:t}).then((e=>e.arrayBuffer()))),getJson:async(e,t)=>Bt.to(fetch(e,{cache:t}).then((e=>e.json()))),download:(e,t={})=>new Promise((r=>fetch(e).then((async e=>{if(!e.ok||200!==e.status)throw new Error(e.statusText);const n=+(e.headers.get("content-length")||""),o=e.body?.getReader();let i=0;const s=[];for(;;){const{done:e,value:r}=await o.read();if(e)break;s.push(r),i+=r.length;const a=Ut.float(100*i/n,{digits:2});t?.progress&&t?.progress(a,i,n)}const a=new Uint8Array(i);let u=0;for(const e of s)a.set(e,u),u+=e.length;t?.success&&t?.success(a),r(a)})).catch((e=>{t?.fail&&t?.fail(e),r(void 0)})))),getText:async(e,t)=>Bt.to(fetch(e,{cache:t}).then((e=>e.text()))),cache:async(e,t="no-cache")=>Bt.to(fetch(e,{cache:t}).then((()=>!0)))};const en=(e,t="",r=!1)=>{try{if(!e)return;const n=vt.parseUrl(e),o=t||n.name;if(!t||!r||!n.origin||n.origin===window.location.origin)((e,t)=>{try{const r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}catch(t){console.error(`[ddan] _downloadUrl ${e}`,t)}})(e,o);else{const t=n.params;t.t=Date.now();const r=`${n.url}?${vt.stringify(t,{uri:!1})}`,i=new XMLHttpRequest;i.open("GET",r,!0),i.responseType="blob",i.onload=function(){tn(i.response,o)},i.onerror=function(t){console.error(`[ddan] downloadUrl ${e}`,t)},i.send()}}catch(t){console.error(`[ddan] downloadUrl ${e}`,t)}},tn=(e,t="")=>{try{if(!e)return;const r=URL?.createObjectURL(e);if(!r)return;en(r,t),URL?.revokeObjectURL(r)}catch(e){console.error("[ddan] downloadFile",e)}},rn=e=>{try{const t=document.createElement("textarea");document.body.appendChild(t),t.style.position="fixed",t.style.clip="rect(0 0 0 0)",t.style.top="10px",t.style.opacity="0",t.value=e??"",t.select();const r=document.execCommand("copy");return document.body.removeChild(t),r}catch(e){return console.error("[ddan] copyText",e),!1}},nn=(e,t="denied")=>new Promise((r=>{const n=navigator?.permissions;if(!n||!n.query)return r(t);const o={name:e};n.query(o).then((e=>r(e.state))).catch((()=>r(t)))})),on=(e,t=!0)=>!(!t||"prompt"!==e)||"granted"===e,sn=(e,t)=>{if(!e||!t)return[];const r=[];let n;for(;null!==(n=t.exec(e));)r.push(n[1]);return r};var an={dataURLtoFile:(e,t)=>{let r=e.split(","),n=r[0].match(/:(.*?);/)[1],o=window.atob(r[1]),i=o.length,s=new Uint8Array(i);for(;i--;)s[i]=o.charCodeAt(i);return new File([s],t,{type:n})},dataURLtoBlob:e=>{let t=e.split(","),r=t[0].match(/:(.*?);/)[1],n=window.atob(t[1]),o=n.length,i=new Uint8Array(o);for(;o--;)i[o]=n.charCodeAt(o);return new Blob([i],{type:r})},blobToFile:(e,t)=>(e.lastModifiedDate=new Date,e.name=t,e),readAsDataURL:(e,t)=>{var r=new FileReader;r.readAsDataURL(e),r.onloadend=function(e){t&&t(e.target?.result)}},downloadUrl:en,download:(e,t="")=>{e&&("string"!=typeof e?tn(e,t):en(e,t))},downloadFile:tn,downloadImage:e=>{try{if(!e)return;const t=e.match(/\/(\w+.\w+)$/)[1],r=new Image;r.onload=()=>{let e=document.createElement("canvas");e.width=r.width,e.height=r.height;let n=e.getContext("2d");n&&n.drawImage(r,0,0,r.width,r.height);let o=e.toDataURL();en(o,t)},r.src=e,r.setAttribute("crossOrigin","Anonymous")}catch(e){console.error("[ddan] downloadImage",e)}return Promise.resolve()},watermark:(e,{width:t=400,height:r=300,angle:n=0,fillStyle:o="rgba(0, 0, 0, 0.2)",font:i="16px Arial",textAlign:s="left",textBaseline:a="middle"}={})=>{try{if(!e)return"";const u=document.createElement("canvas");u.width=t,u.height=r;const l=u.getContext("2d");return l?(n&&l.rotate(n*Math.PI/180),o&&(l.fillStyle=o),i&&(l.font=i),s&&(l.textAlign=s),a&&(l.textBaseline=a),l.fillText(e,u.width/10,u.height/2),`url(${u.toDataURL()})`):""}catch(e){return console.error("[ddan] watermark",e),""}},copyText:(e,t=!1)=>new Promise((r=>{!t&&navigator.clipboard?nn("clipboard-write").then((t=>{on(t,!1)?navigator.clipboard.writeText(e).then((()=>r(!0))).catch((()=>r(rn(e)))):r(rn(e))})).catch((()=>{r(rn(e))})):r(rn(e))})),queryPermission:nn,isAllowed:on,legacyCopy:rn,takeHtmlLinks:e=>{if(!e)return[];const t=[];return[/<script[^>]+src="([^"]+)"/g,/<link[^>]+rel="stylesheet"[^>]+href="([^"]+)"/g,/<link[^>]+rel="icon"[^>]+href="([^"]+)"/g].forEach((r=>{const n=sn(e,r);t.push(n)})),[].concat(...t)},takeHtml:sn,toBlobUrl:(e,t)=>{const r=new Blob([e],{type:t});return URL.createObjectURL(r)}};class un{list=[];constructor(){this.invoke=this.invoke.bind(this)}use(e){this.list=this.list.concat(e)}invoke(e){return this.list.reduce(((e,t)=>e.then((e=>t(e)))),Promise.resolve(e)).catch((e=>"REFETCH"===e.sig?Promise.resolve(e.result):Promise.reject(e)))}}const ln=({url:e,options:t})=>{const r={"Content-Type":"application/json; charset=utf-8",...t.headers||{}};return t.headers=r,new Promise(((r,n)=>{fetch(e,t).then((e=>{r(e.json())})).catch((e=>{n(e)}))}))};function cn(e){const{response:t}=e;return 0===t.code?Promise.resolve(t):Promise.reject(t)}function fn(e){const{url:t="",host:r,options:n}=e,o=e;if(t.startsWith("http://")||t.startsWith("https://")||(o.url=(r||"")+t),"GET"===n.method.toUpperCase()&&n.body){const e=JSON.parse(n.body);if(ft.isPlainObject(e)){const r=vt.stringify(e),n=-1===t.indexOf("?")?"?":"&";o.url=`${o.url||""}${n}${r}`,delete o.options.body}}return n&&n.plugins&&delete o.options?.plugins,n&&n.model&&delete o.options?.model,o}class dn{host="";reqConfig={};handleError;interceptors={request:new un,response:new un};constructor(e){this.host=e.host||"",this.reqConfig=e.config,this.interceptors.request.use(e.handleRequest||[]),this.interceptors.request.use(fn),this.interceptors.response.use(e.handleResponse||cn),this.handleError=e.handleError}static blockId="blockid";static requestLock={};lockR(e,t){dn.requestLock[e]={lock:!0,request:t()}}unlockR(e){delete dn.requestLock[e]}getIdFromReq(e){const{url:t,data:r={}}=e;return t+JSON.stringify(r)}getIdFromReqUrl(e){return e.url||""}async fetch(e,t){const r=ft.copy(this.reqConfig[e])||{},n={host:this.host,url:r.url||"",options:{...r||{},body:JSON.stringify({...t||{}})}};try{const o=await this.interceptors.request.invoke(n);let i;if(delete o.options.plugins,"block"===r.model)this.lockR(dn.blockId,(()=>ln(o))),i=await dn.requestLock[dn.blockId].request;else if(dn.requestLock[dn.blockId]&&dn.requestLock[dn.blockId].lock&&await dn.requestLock[dn.blockId].request,"debounce"===r.model||"debounceUrl"===r.model){let e;e="debounceUrl"===r.model?this.getIdFromReqUrl(o):this.getIdFromReq(o),dn.requestLock[e]||this.lockR(e,(()=>ln(o))),i=await dn.requestLock[e].request,this.unlockR(e)}else i=await ln(o);return this.interceptors.response.invoke({response:i,config:r,refetch:()=>({sig:"REFETCH",result:this.fetch(e,t)})})}catch(e){return this.handleError&&this.handleError(e),Promise.reject(e)}}}return{fetch:Xr,Http:dn,css:Gr,qs:vt,icon:K,html:an}}));
|
package/bin/t-web.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import e from"crypto";var t={toUtf8:e=>{if(!e)return"";const t=e.replace(/\r\n/g,"\n");let r="";for(let e=0;e<t.length;e++){let n=t.charCodeAt(e);n<128?r+=String.fromCharCode(n):n>127&&n<2048?(r+=String.fromCharCode(n>>6|192),r+=String.fromCharCode(63&n|128)):(r+=String.fromCharCode(n>>12|224),r+=String.fromCharCode(n>>6&63|128),r+=String.fromCharCode(63&n|128))}return r},fromUtf8:e=>{let t="",r=0;if(!e)return"";let n=0,o=0,i=0;for(;r<e.length;)n=e.charCodeAt(r),n<128?(t+=String.fromCharCode(n),r++):n>191&&n<224?(o=e.charCodeAt(r+1),t+=String.fromCharCode((31&n)<<6|63&o),r+=2):(o=e.charCodeAt(r+1),i=e.charCodeAt(r+2),t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&i),r+=3);return t},toUtf8Bytes:e=>{if(!e)return new Uint8Array;const t=e.replace(/\r\n/g,"\n"),r=[];for(let e=0;e<t.length;e++){let n=t.charCodeAt(e);n<128?r.push(n):n<2048?(r.push(n>>6|192),r.push(63&n|128)):(r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128))}return new Uint8Array(r)},fromUtf8Bytes:e=>{let t="",r=0;if(!e||e.length<=0)return"";for(;r<e.length;){let n=e[r];if(n<128)t+=String.fromCharCode(n),r++;else if(n>191&&n<224){const o=e[r+1];t+=String.fromCharCode((31&n)<<6|63&o),r+=2}else{const o=e[r+1],i=e[r+2];t+=String.fromCharCode((15&n)<<12|(63&o)<<6|63&i),r+=3}}return t}};const r="object"==typeof global&&null!==global&&global.Object===Object&&global,n="object"==typeof globalThis&&null!==globalThis&&globalThis.Object===Object&&globalThis,o="object"==typeof self&&null!==self&&self.Object===Object&&self,i=n||r||o||Function("return this")(),s=i.Symbol,{toString:a,hasOwnProperty:u,propertyIsEnumerable:l}=Object.prototype,c=s?s.toStringTag:void 0;function f(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){const t=u.call(e,c),r=e[c];let n=!1;try{e[c]=void 0,n=!0}catch(e){}const o=a.call(e);return n&&(t?e[c]=r:delete e[c]),o}(e):a.call(e)}var d={getTag:f,getType:function(e){return(f(e).match(/\w+/g)||["object","Undefined"])[1]||""},toString:a,hasOwnProperty:u,propertyIsEnumerable:l};const h="object"==typeof exports&&null!==exports&&!exports.nodeType&&exports,p=h&&"object"==typeof module&&null!==module&&!module.nodeType&&module,g=p&&p.exports===h&&r.process,y=(()=>{try{const e=p&&p.require&&p.require("util").types;return e||g&&g.binding&&g.binding("util")}catch(e){}})();var m="[object Function]",b="[object GeneratorFunction]",w="[object AsyncFunction]",v=9007199254740991;const x=/^(?:0|[1-9]\d*)$/,A=i?.Buffer?.isBuffer,j=/^\[object (?:Float(?:32|64)|(?:Int|Uint)(?:8|16|32)|Uint8Clamped)Array\]$/,O=y&&y.isTypedArray;function $(e){const t=typeof e;return null!=e&&("object"==t||"function"==t)}function C(e){return null!=e&&"object"==typeof e}const k=Array.isArray;function B(e){return null!=e&&function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=v}(e.length)&&!E(e)}function q(e){return C(e)&&B(e)}function E(e){var t=$(e)?d.getTag(e):"";return t===m||t===b||t===w}function _(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||Object.prototype)}function P(e){return q(e)&&d.hasOwnProperty.call(e,"callee")&&(!d.propertyIsEnumerable.call(e,"callee")||"[object Arguments]"==d.toString.call(e))}const F="undefined"!=typeof window&&void 0!==window.document,S="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,T=O?e=>O(e):e=>C(e)&&j.test(d.getTag(e)),U="function"==typeof A?A:()=>!1;var R={is:function(e,t){return d.getTag(e)===`[object ${t}]`},isNumber:function(e){return"[object Number]"===d.getTag(e)},isString:function(e){return"string"==typeof e||!k(e)&&C(e)&&"[object String]"==d.getTag(e)},isObject:$,isObjectLike:C,isPlainObject:function(e){if(!C(e)||"[object Object]"!=d.getTag(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},isSymbol:function(e){return"symbol"==typeof e||C(e)&&"[object Symbol]"===d.getTag(e)},isFunction:E,isArray:k,isArrayLikeObject:q,isIndex:function(e,t){return!!(t=null==t?v:t)&&("number"==typeof e||x.test(e))&&e>-1&&e%1==0&&e<t},isArrayLike:B,isPrototype:_,isArguments:P,isPromise:function(e){return"[object Promise]"===($(e)?d.getTag(e):"")},isBrowser:F,isNode:S,isBlobOrBuffer:e=>e instanceof Blob||e instanceof ArrayBuffer,isUint8Array:e=>e instanceof Uint8Array,isArrayBuffer:e=>e instanceof ArrayBuffer,isEmpty:e=>{if(null==e)return!0;if(B(e)&&(Array.isArray(e)||"string"==typeof e||"function"==typeof e.splice||U(e)||T(e)||P(e)))return!e.length;const t=d.getTag(e);if("[object Map]"===t||"[object Set]"===t)return!e.size;if(_(e))return!Object.keys(e).length;for(const t in e)if(d.hasOwnProperty.call(e,t))return!1;return!0}};const L="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";var I={toBase64:(e="")=>{let r,n,o,i,s,a,u,l="",c=0;for(e=t.toUtf8(e);c<e.length;)r=e.charCodeAt(c++),n=e.charCodeAt(c++),o=e.charCodeAt(c++),i=r>>2,s=(3&r)<<4|n>>4,a=(15&n)<<2|o>>6,u=63&o,isNaN(n)?a=u=64:isNaN(o)&&(u=64),l=l+L.charAt(i)+L.charAt(s)+L.charAt(a)+L.charAt(u);return l},fromBase64:(e="")=>{let r,n,o,i,s,a,u,l="",c=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");c<e.length;)i=L.indexOf(e.charAt(c++)),s=L.indexOf(e.charAt(c++)),a=L.indexOf(e.charAt(c++)),u=L.indexOf(e.charAt(c++)),r=i<<2|s>>4,n=(15&s)<<4|a>>2,o=(3&a)<<6|u,l+=String.fromCharCode(r),64!=a&&(l+=String.fromCharCode(n)),64!=u&&(l+=String.fromCharCode(o));return l=t.fromUtf8(l),l},bytesToBase64:e=>{let t,r,n,o,i,s,a,u="",l=0;if(!e||!R.isArrayLike(e)||!R.isUint8Array(e))return"";for(;l<e.length;)t=e[l++],r=e[l++],n=e[l++],o=t>>2,i=(3&t)<<4|r>>4,s=(15&r)<<2|n>>6,a=63&n,isNaN(r)?s=a=64:isNaN(n)&&(a=64),u=u+L.charAt(o)+L.charAt(i)+L.charAt(s)+L.charAt(a);return u},base64ToBytes:(e="")=>{let t,r,n,o,i,s,a,u=[],l=0;for(e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<e.length;)o=L.indexOf(e.charAt(l++)),i=L.indexOf(e.charAt(l++)),s=L.indexOf(e.charAt(l++)),a=L.indexOf(e.charAt(l++)),t=o<<2|i>>4,r=(15&i)<<4|s>>2,n=(3&s)<<6|a,u.push(t),64!=s&&u.push(r),64!=a&&u.push(n);return new Uint8Array(u)}};const N=e=>I.toBase64(e);var z=N;const M=new class{__defStyle="vertical-align: middle; mask-position: 50% 50%; mask-repeat: no-repeat; mask-size: 100%; -webkit-mask-position: 50% 50%; -webkit-mask-repeat: no-repeat; -webkit-mask-size: 100%; background-color: currentColor;";__map={back:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M609.408 149.376L277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"/></svg>',right:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"/></svg>',home:'<svg viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path d="M13 19.8h3.8v-7h3.303L12 4.697 3.897 12.8H7.2v7H11V17h2v2.8zm5 .2a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1v-6H3.414a1 1 0 0 1-.707-1.707l8.586-8.586a1 1 0 0 1 1.414 0l8.586 8.586A1 1 0 0 1 20.586 14H18v6z" fill-rule="evenodd" fill-opacity=".9"/></svg>',close:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M764.288 214.592L512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"/></svg>',close_circle:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M466.752 512l-90.496-90.496a32 32 0 0 1 45.248-45.248L512 466.752l90.496-90.496a32 32 0 1 1 45.248 45.248L557.248 512l90.496 90.496a32 32 0 1 1-45.248 45.248L512 557.248l-90.496 90.496a32 32 0 0 1-45.248-45.248L466.752 512z"/><path fill="currentColor" d="M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"/></svg>',close_circle_fill:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336L512 457.664z"/></svg>',warning:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M928.99 755.83L574.6 203.25c-12.89-20.16-36.76-32.58-62.6-32.58s-49.71 12.43-62.6 32.58L95.01 755.83c-12.91 20.12-12.9 44.91.01 65.03 12.92 20.12 36.78 32.51 62.59 32.49h708.78c25.82.01 49.68-12.37 62.59-32.49 12.91-20.12 12.92-44.91.01-65.03zM554.67 768h-85.33v-85.33h85.33V768zm0-426.67v298.66h-85.33V341.32l85.33.01z" fill="currentColor"/></svg>',play:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M512 1024A512 512 0 1 1 512 0a512 512 0 0 1 0 1024zm3.008-92.992a416 416 0 1 0 0-832 416 416 0 0 0 0 832zM383.232 287.616l384 224.896-384 223.104v-448z" fill="currentColor"/></svg>',lock:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M224 448a32 32 0 0 0-32 32v384a32 32 0 0 0 32 32h576a32 32 0 0 0 32-32V480a32 32 0 0 0-32-32H224zm0-64h576a96 96 0 0 1 96 96v384a96 96 0 0 1-96 96H224a96 96 0 0 1-96-96V480a96 96 0 0 1 96-96z"/><path fill="currentColor" d="M512 544a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V576a32 32 0 0 1 32-32zm192-160v-64a192 192 0 1 0-384 0v64h384zM512 64a256 256 0 0 1 256 256v128H256V320A256 256 0 0 1 512 64z"/></svg>',lock_fill:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path d="M467.2 713.92v115.968a44.8 44.8 0 0 0 89.6 0V713.92c26.752-14.72 44.8-42.304 44.8-73.92 0-47.104-40.128-85.312-89.6-85.312-49.472 0-89.6 38.208-89.6 85.312 0 31.616 18.048 59.136 44.8 73.92zM64 384h896v640H64V384zm268.8 0h358.4V256c0-94.272-80.256-170.688-179.2-170.688-98.944 0-179.2 76.416-179.2 170.688v128zM512 0c148.48 0 268.8 114.56 268.8 256v128H243.2V256C243.2 114.56 363.52 0 512 0z" fill="currentColor"/></svg>',plus:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M480 480V128a32 32 0 0 1 64 0v352h352a32 32 0 1 1 0 64H544v352a32 32 0 1 1-64 0V544H128a32 32 0 0 1 0-64h352z"/></svg>',plus_circle:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M352 480h320a32 32 0 1 1 0 64H352a32 32 0 0 1 0-64z"/><path fill="currentColor" d="M480 672V352a32 32 0 1 1 64 0v320a32 32 0 0 1-64 0z"/><path fill="currentColor" d="M512 896a384 384 0 1 0 0-768 384 384 0 0 0 0 768zm0 64a448 448 0 1 1 0-896 448 448 0 0 1 0 896z"/></svg>',plus_circle_fill:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm-38.4 409.6H326.4a38.4 38.4 0 1 0 0 76.8h147.2v147.2a38.4 38.4 0 0 0 76.8 0V550.4h147.2a38.4 38.4 0 0 0 0-76.8H550.4V326.4a38.4 38.4 0 1 0-76.8 0v147.2z"/></svg>',star:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M512 747.84l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72L512 747.84zM313.6 924.48a70.4 70.4 0 0 1-102.144-74.24l37.888-220.928L88.96 472.96A70.4 70.4 0 0 1 128 352.896l221.76-32.256 99.2-200.96a70.4 70.4 0 0 1 126.208 0l99.2 200.96 221.824 32.256a70.4 70.4 0 0 1 39.04 120.064L774.72 629.376l37.888 220.928a70.4 70.4 0 0 1-102.144 74.24L512 820.096l-198.4 104.32z"/></svg>',star_fill:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M283.84 867.84L512 747.776l228.16 119.936a6.4 6.4 0 0 0 9.28-6.72l-43.52-254.08 184.512-179.904a6.4 6.4 0 0 0-3.52-10.88l-255.104-37.12L517.76 147.904a6.4 6.4 0 0 0-11.52 0L392.192 379.072l-255.104 37.12a6.4 6.4 0 0 0-3.52 10.88L318.08 606.976l-43.584 254.08a6.4 6.4 0 0 0 9.28 6.72z"/></svg>',share:'<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg"><path fill="currentColor" d="M679.872 348.8l-301.76 188.608a127.808 127.808 0 0 1 5.12 52.16l279.936 104.96a128 128 0 1 1-22.464 59.904l-279.872-104.96a128 128 0 1 1-16.64-166.272l301.696-188.608a128 128 0 1 1 33.92 54.272z"/></svg>',love:'<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M171.712 571.648l.352.32 287.904 252.8a64 64 0 0 0 82.912 1.344l296.832-244.544a215.584 215.584 0 1 0-301.824-300.576L512 316.672l-25.888-35.616a215.584 215.584 0 1 0-314.4 290.624zM32 407.584A279.584 279.584 0 0 1 512 212.64a279.584 279.584 0 0 1 480 194.944 278.144 278.144 0 0 1-113.024 224.512l-295.36 243.392a128 128 0 0 1-165.888-2.592L129.984 620.16A278.976 278.976 0 0 1 32 407.584z"/></svg>',love_fill:'<svg class="icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="200" height="200"><path d="M32 407.584A279.584 279.584 0 0 1 512 212.64a279.584 279.584 0 0 1 480 194.944 278.144 278.144 0 0 1-113.024 224.512L562.592 892.8a96 96 0 0 1-124.416-1.952L130.016 620.16A278.976 278.976 0 0 1 32 407.584z"/></svg>'};getBase64=e=>{const t=this.getSVG(e);return t?.url||""};getSVG=e=>{if(!e)return;const t=this.__map[e];if(!t)return;return{url:this.toBase64(t),escape:this.toEscape(t)}};toBase64=e=>{if(!e)return"";const t=this._tiny(e);return`data:image/svg+xml;base64,${z(t)}`};_tiny=e=>e?e.replace(/<!--(.*)-->/g,"").replace(/[\r\n]/g," ").replace(/"/g,"'"):"";toEscape=e=>{if(!e)return"";return`data:image/svg+xml,${this._tiny(e).replace(/%/g,"%25").replace(/&/g,"%26").replace(/#/g,"%23").replace(/{/g,"%7B").replace(/}/g,"%7D").replace(/</g,"%3C").replace(/>/g,"%3E")}`};getStyle(e,t={}){if(!e)return"";const r=this.__map[e];return r?this.toStyle(r,t):""}toStyle(e,t={}){if(!e)return"";const r=this.toBase64(e);return r?this.getStyleByUrl(r,t):""}getStyleByUrl(e,t={}){if(!e)return"";const{key:r="mask-image",gradientValue:n="radial-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5))",gradient:o=!1,defStyle:i=this.__defStyle}=t,s=o&&n?`${n}, url("${e}")`:`url("${e}")`;return`${r}:${s};-webkit-${r}:${s};${i}`}},D=NaN,K=/^\s+|\s+$/g,V=/^[-+]0x[0-9a-f]+$/i,H=/^0b[01]+$/i,W=/^0o[0-7]+$/i,Z=parseInt,Q=1/0,Y=17976931348623157e292;function J(e){if("number"==typeof e)return e;if(R.isSymbol(e))return D;if(R.isObject(e)){const t="function"==typeof e.valueOf?e.valueOf():e;e=R.isObject(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(K,"");const t=H.test(e);return t||W.test(e)?Z(e.slice(2),t?2:8):V.test(e)?D:+e}function G(e){return e?(e=J(e))===Q||e===-Q?(e<0?-1:1)*Y:e==e?e:0:0===e?e:0}var X={toNumber:J,toFinite:G,toInteger:function(e){var t=G(e),r=t%1;return t==t?r?t-r:t:0}};function ee(e){return e!=e}function te(e,t){return function(e,t){for(var r=-1,n=e?e.length:0,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}(t,(function(t){return e[t]}))}var re,ne,oe=(re=Object.keys,ne=Object,function(e){return re(ne(e))}),ie=Math.max;function se(e,t){var r=R.isArray(e)||R.isArguments(e)?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],n=r.length,o=!!n;for(var i in e)!t&&!d.hasOwnProperty.call(e,i)||o&&("length"==i||R.isIndex(i,n))||r.push(i);return r}function ae(e,t,r){const{length:n}=e;return r=void 0===r?n:r,!t&&r>=n?e:function(e,t,r){let n=null==e?0:e.length;if(!n)return[];(t=null==t?0:t)<0&&(t=-t>n?0:n+t),(r=(r=void 0===r?n:r)>n?n:r)<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;let o=-1;const i=new Array(n);for(;++o<n;)i[o]=e[o+t];return i}(e,t,r)}const ue=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff\\ufe0e\\ufe0f]");function le(e){return ue.test(e)}const ce="\\ud800-\\udfff",fe=`[${ce}]`,de="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]",he="\\ud83c[\\udffb-\\udfff]",pe=`[^${ce}]`,ge="(?:\\ud83c[\\udde6-\\uddff]){2}",ye="[\\ud800-\\udbff][\\udc00-\\udfff]",me=`${`(?:${de}|${he})`}?`,be="[\\ufe0e\\ufe0f]?",we=be+me+`(?:\\u200d(?:${[pe,ge,ye].join("|")})${be+me})*`,ve=`(?:${[`${pe}${de}?`,de,ge,ye,fe].join("|")})`,xe=RegExp(`${he}(?=${he})|${ve+we}`,"g");function Ae(e){return le(e)?function(e){return e.match(xe)||[]}(e):function(e){return e.split("")}(e)}function je(e){return t=>{if(!t)return"";const r=le(t)?Ae(t):void 0,n=r?r[0]:t[0],o=r?ae(r,1).join(""):t.slice(1);return n[e]()+o}}const Oe="\\ud800-\\udfff",$e="\\u2700-\\u27bf",Ce="a-z\\xdf-\\xf6\\xf8-\\xff",ke="A-Z\\xc0-\\xd6\\xd8-\\xde",Be="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",qe="['’]",Ee=`[${Be}]`,_e=`[${$e}]`,Pe=`[${Ce}]`,Fe=`[^${Oe}${Be+"\\d"+$e+Ce+ke}]`,Se="(?:\\ud83c[\\udde6-\\uddff]){2}",Te="[\\ud800-\\udbff][\\udc00-\\udfff]",Ue=`[${ke}]`,Re=`(?:${Pe}|${Fe})`,Le=`(?:${Ue}|${Fe})`,Ie=`(?:${qe}(?:d|ll|m|re|s|t|ve))?`,Ne=`(?:${qe}(?:D|LL|M|RE|S|T|VE))?`,ze="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\u1ab0-\\u1aff\\u1dc0-\\u1dff]|\\ud83c[\\udffb-\\udfff])?",Me="[\\ufe0e\\ufe0f]?",De=Me+ze+`(?:\\u200d(?:${[`[^${Oe}]`,Se,Te].join("|")})${Me+ze})*`,Ke=`(?:${[_e,Se,Te].join("|")})${De}`,Ve=RegExp([`${Ue}?${Pe}+${Ie}(?=${[Ee,Ue,"$"].join("|")})`,`${Le}+${Ne}(?=${[Ee,Ue+Re,"$"].join("|")})`,`${Ue}?${Re}+${Ie}`,`${Ue}+${Ne}`,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])","\\d+",Ke].join("|"),"g");const He=RegExp.prototype.test.bind(/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/),We=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Ze(e,t){if(void 0===t){const t=He(e)?function(e){return e.match(Ve)}(e):function(e){return e.match(We)}(e);return t||[]}return e.match(t)||[]}function Qe(e){if(null==e)return"";if("string"==typeof e)return e;if(Array.isArray(e))return`${e.map((e=>null==e?e:Qe(e)))}`;if(R.isSymbol(e))return e.toString();const t=`${e}`;return"0"==t&&1/e==-Infinity?"-0":t}const Ye=je("toUpperCase");je("toLowerCase");var Je=e=>Ze(Qe(e).replace(/['\u2019]/g,"")).reduce(((e,t,r)=>e+(r?"-":"")+t.toLowerCase()),""),Ge=e=>Ze(Qe(e).replace(/['\u2019]/g,"")).reduce(((e,t,r)=>(t=t.toLowerCase(),e+(r?Ye(t):t))),""),Xe=(e,{number:t=!1,boolean:r=!1}={})=>{let n=e;return e&&"string"==typeof e?(t&&!Number.isNaN(Number(e))&&"string"==typeof e&&""!==e.trim()?n=Number(e):!r||null===e||"true"!==e.toLowerCase()&&"false"!==e.toLowerCase()||(n="true"===e.toLowerCase()),n):n},et=e=>{try{if(!e)return"";const t=JSON.parse(e);return JSON.stringify(t,null,2)}catch(t){return e}};const tt=e=>{if(!e)return e;if("object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};for(const r in e)e.hasOwnProperty(r)&&(t[r]=tt(e[r]));return t};const rt=(e,t,r={})=>{const n=e||{},{ignoreUndefined:o=!0,cover:i=!1}=r;if(!t)return n;for(const s in t){if(!t.hasOwnProperty(s))continue;const a=t[s];"object"!=typeof a||"object"!=typeof e[s]||i?o&&void 0===a||r.ignoreNull&&null===a||r.ignoreZero&&0===a||r.ignoreEmptyArray&&Array.isArray(a)&&a.length<=0||r.ignoreEmptyString&&"string"==typeof a&&""===a.trim()||(n[s]=a):n[s]=nt(e[s],a,r)}return n},nt=(e,t,r={})=>{let n={};return n=e&&"object"==typeof e&&!Array.isArray(e)?rt(e,t,r):rt({...e},t,r),n},ot=(e,t,r={})=>rt({...e},t,{cover:!0,...r}),it=(e,t,r,n,o=!1)=>{if(!e||!t||!r)return;let i=e[t];null!==i&&"object"==typeof i&&o&&Object.keys(i).forEach((e=>{it(i,e,r,n,o)})),Object.defineProperty(e,t,{configurable:!0,enumerable:!0,set:s=>{r.call(n,s,i),i=s,o&&it(e,t,r,n,o)},get:()=>i})};var st={copy:(e,t={})=>{if(void 0===e)return;const r=JSON.parse(JSON.stringify(e));if("object"!=typeof r)return r;if(Array.isArray(r))return r;const{fields:n=[],camel:o=!1,pure:i=!0}=t;if((!n||n.length<=0)&&!o)return r;const s={};for(const e in r){if(!r.hasOwnProperty(e))continue;const a=o?i&&e.startsWith("_")?e:Ge(e):e;if(n.length>0&&!n.includes(e)&&!n.includes(a))continue;const u=r[e];t.ignoreNull&&null===u||(t.ignoreZero&&0===u||t.ignoreEmptyArray&&Array.isArray(u)&&u.length<=0||t.ignoreEmptyString&&"string"==typeof u&&""===u.trim()||(s[a]=u))}return s},clone:tt,merge:nt,isEmpty:e=>0!==e&&(!e||"object"==typeof e&&(Array.isArray(e)?!e.length:Object.keys(e).length<=0)),parseValue:(e,{number:t=!1,boolean:r=!1}={})=>{if(!e&&"object"!=typeof e)return e;for(const[n,o]of Object.entries(e))if("object"==typeof o&&null!==o)for(const[e,n]of Object.entries(o))o[e]=Xe(n,{number:t,boolean:r});else e[n]=Xe(o,{number:t,boolean:r});return e},cloneClass:function(e){return e?"object"!=typeof e?e:Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e)):e},combine:ot,combines:(e,t={})=>{let r={};if(!e||e.length<=0)return r;const{ignoreUndefined:n=!0,ignoreNull:o=!0,ignoreZero:i=!0,ignoreEmptyArray:s=!0,ignoreEmptyString:a=!0,cover:u=!0}=t;return e.forEach((e=>r=ot(r,e,{ignoreUndefined:n,ignoreNull:o,ignoreZero:i,ignoreEmptyArray:s,ignoreEmptyString:a,cover:u}))),r},observe:it,find:(e,t)=>{if(e&&"object"==typeof e)return Object.entries(e||{}).find((([e,r])=>!(!t||!t(e,r))))}};class at{__value=void 0;set(e){this.__value=e}get(){return this.__value}}var ut={singleton:function(){class e{static __instance__;constructor(){}static get Instance(){return e.__instance__||(e.__instance__=new this),e.__instance__}static get I(){return this.Instance}}return e},getset:function(e){const t=new at;return void 0!==e&&t.set(e),t}};var lt={...R,...d,...st,...ut,includes:function(e,t,r,n){e=R.isArrayLike(e)?e:function(e){return e?te(e,function(e){return R.isArrayLike(e)?se(e):function(e){if(!R.isPrototype(e))return oe(e);var t=[];for(var r in Object(e))d.hasOwnProperty.call(e,r)&&"constructor"!=r&&t.push(r);return t}(e)}(e)):[]}(e),r=r&&!n?X.toInteger(r):0;var o=e.length;return r<0&&(r=ie(o+r,0)),R.isString(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&function(e,t,r){if(t!=t)return 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,ee,r);for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}(e,t,r)>-1},forof:(e,t)=>{if(!e)return;let r;if(R.isObject(e)&&(r=R.isArray(e)?e.entries():Object.entries(e),r))for(const[e,n]of r)t&&t(e,n)}};const ct=function(e,{sep:t="&",eq:r="=",max:n=1e3,multiple:o=!0,uri:i=!0,parseNumber:s=!1,parseBoolean:a=!1}={}){t=t||"&",r=r||"=";const u={};if("string"!=typeof e||0===e.length)return u;const l=/\+/g,c=n||1e3;let f=(e=e.split(t)).length;c>0&&f>c&&(f=c);for(let t=0;t<f;++t){let n,s,a,c,f=e[t].replace(l,"%20"),h=f.indexOf(r);h>=0?(n=f.substr(0,h),s=f.substr(h+1)):(n=f,s=""),a=i?decodeURIComponent(n):n,c=i?decodeURIComponent(s):s,d.hasOwnProperty.call(u,a)&&o?Array.isArray(u[a])?u[a].push(c):u[a]=[u[a],c]:u[a]=c}return st.parseValue(u,{number:s,boolean:a}),u},ft=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}},dt=function(e,t=!0){return t?encodeURIComponent(e):e},ht=function(e,{cleanZero:t=!1,cleanNull:r=!1,cleanWhitespace:n=!1}={}){return!(!t||0!==e)||(!(!r||null!=e)||!(!n||"string"!=typeof e||""!==e.trim()))},pt=/^(https?):\/\/([\w.\_\-]+)(?::(\d+))?/,gt=e=>{const t=(e||"").replace(/\\/g,"/").split("?")[0],r=t.match(/[\/]?([\w\_\-]+)[.]?[\w]*[?]?$/),n=r?r[1]:"",o=t.lastIndexOf("/")+1,i=t.substring(o),s=i.lastIndexOf("."),a=i.substring(0,s)||"",u=s>=0?i.substring(s):"";return{route:t.substring(0,o)||"",page:n,name:i,withoutExtension:a,extname:u}},yt=e=>{const t={href:e,url:"",origin:"",protocol:"",host:"",port:"",query:""};if(!e)return t;const r=e.match(pt);if(!r||r.length<4)return t;const n=r[3]||"",o=e.split("?");return t.url=o[0],t.origin=r[0],t.protocol=`${r[1]}:`,t.host=`${r[2]}${n?":"+n:""}`,t.port=n,t.query=o.length>1?o[1]:"",t},mt=(e,t)=>{if(e===t)return!0;if(!e)return!1;if(!t)return!1;if("*"===t)return!0;const r=t.replace(/\./g,"\\.").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp("^"+r+"$").test(e)};var bt={parse:ct,stringify:function(e,{sep:t="&",eq:r="=",name:n=null,uri:o=!0,cleanZero:i=!1,cleanNull:s=!1,cleanWhitespace:a=!1}={}){return t=t||"&",r=r||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(n){const u=dt(ft(n),o)+r,l=e[n];return Array.isArray(l)?l.map((function(e){return u+dt(ft(e),o)})).join(t):ht(l,{cleanZero:i,cleanNull:s,cleanWhitespace:a})?"":u+dt(ft(l),o)})).filter(Boolean).join(t):n?dt(ft(n),o)+r+dt(ft(e),o):""},https:e=>e?e.replace(/^http[s]?/,"https"):e,parseUrl:e=>{const t=yt(e),{origin:r="",url:n="",query:o=""}=t,i=gt(n),s=ct(o,{multiple:!0,uri:!1});return{...t,...i,pathname:n.substring(n.indexOf(r||"")+r.length),params:s}},parsePath:gt,parseHost:yt,join:(...e)=>{const t=[];let r=!1;return e.forEach((e=>{const n=e.trim();if(""===n)return;if(/^(\w+):\/\//.test(n))return t.length=0,t.push(n),void(r=!0);n.split("/").forEach((e=>{"."!==e&&""!==e&&(".."===e?t.length>0&&".."!==t[t.length-1]?t.pop():r||t.push(".."):t.push(e))}))})),t.join("/")},shExpMatch:mt,isLocalIpAddress:e=>!!e&&!!(mt(e,"127.0.0.1")||mt(e,"localhost")||mt(e,"192.168.*.*")),parseFileUrl:e=>{const t={href:e,file:"",url:"",protocol:"",host:"",query:"",params:{}};if(!e)return t;let r=e?e.replace(/\\/g,"/"):"";r.startsWith("file://")&&!r.startsWith("file:///")?r="file:///"+r.slice(7):r.startsWith("file:/")&&!r.startsWith("file:///")&&(r="file:///"+r.slice(6));const n=r.match(/^file:\/\/(?:([^\/\\]+))?(\/.*)?$/);if(!n||n.length<3)return t;t.protocol="file:";const o=n[1]||"",i=n[2]||"";t.host=o;const s=i.split("?");return t.url=t.protocol+`//${t.host}`+s[0],t.file=s[0],t.query=s.length>1?s[1]:"",t.params=ct(t.query,{multiple:!0,uri:!1}),t}};const wt="Expected a function",vt=Math.max,xt=Math.min;function At(e,t=300,r={}){let n,o,i,s,a,u,l=0,c=!1,f=!1,d=!0;if("function"!=typeof e)throw new TypeError(wt);function h(t){const r=n,i=o;return n=o=void 0,l=t,s=e.apply(i,r),s}function p(e){const r=e-u;return void 0===u||r>=t||r<0||f&&e-l>=i}function g(){const e=Date.now();if(p(e))return y(e);a=setTimeout(g,function(e){const r=t-(e-u);return f?xt(r,i-(e-l)):r}(e))}function y(e){return a=void 0,d&&n?h(e):(n=o=void 0,s)}function m(...e){const r=Date.now(),i=p(r);if(n=e,o=this,u=r,i){if(void 0===a)return function(e){return l=e,a=setTimeout(g,t),c?h(e):s}(u);if(f)return a=setTimeout(g,t),h(u)}return void 0===a&&(a=setTimeout(g,t)),s}return t=X.toNumber(t)||0,R.isObject(r)&&(c=!!r.leading,f="maxWait"in r,i=f?vt(X.toNumber(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d),m.cancel=function(){void 0!==a&&clearTimeout(a),l=0,n=u=o=a=void 0},m.flush=function(){return void 0===a?s:y(Date.now())},m.pending=function(){return void 0!==a},m}class jt{__list=[];constructor(e){this.push(e)}push(e){return e&&this.__list.push(e),this}clear(){return this.__list=[],this}_exec(e,t){let r;if(R.isFunction(e))r=e(t);else{if(R.isPromise(e))return e.then((e=>({...t,...e})));r=e}return R.isPromise(r)?r:Promise.resolve({...r,...t})}run(e){try{return this.__list.reduce(((e,t)=>e.then((e=>this._exec(t,e)))),Promise.resolve(e)).then((e=>[void 0,e])).catch((e=>[e,void 0]))}catch(e){return Promise.reject([e,void 0])}}}async function Ot(e,t,r){return e.then((e=>(r&&r(),[null,e]))).catch((e=>(t&&Object.assign(e,t),r&&r(),[e,void 0])))}const $t=(e,t)=>{try{let r;return r=R.isFunction(e)?e():e,Ot(Promise.resolve(r),void 0,t)}catch(e){return t&&t(),Promise.resolve([e,void 0])}},Ct=e=>"string"==typeof(e="function"==typeof e?e():e)?new Error(e):e;var kt={to:Ot,go:(e,t)=>$t(e,t),delay:(e=1e3)=>new Promise((t=>setTimeout(t,e))),safeRun:$t,toError:Ct,timeout:(e,t=0,r="timeout")=>{if(t<=0)return $t(e);let n;function o(){n&&clearTimeout(n)}const i=new Promise((e=>{o(),n=setTimeout((()=>e([Ct(r||"timeout"),void 0])),t)}));return Promise.race([$t(e,o),i])}};class Bt{_func;_callback;constructor(e,t){this._func=e,this._callback=t}async run(){return kt.safeRun(this._func).then((e=>{try{this._callback&&this._callback(e)}catch(e){console.log("[ddan] task",e)}finally{return e}}))}}class qt{__list=[];__count=0;__max=1;constructor(e=1){this.__count=0,this.__max=e>0?e:1,this.clear()}push(e,t){const r=new Bt(e,t);return this.__list.push(r),this._step(),this}clear(){return this.__list=[],this.__count=0,this}_step(){if(this.__list.length<=0)return;if(this.__count>=this.__max)return;const e=this.__list.shift();e?(this.__count+=1,e?.run().finally((()=>{try{this.__count>0&&(this.__count-=1),this._step()}catch(e){console.error("[ddan] pipepine step finally",e)}}))):this._step()}async whenAll(){for(;;){if(this.__count<=0)break;await kt.delay(100),this._step()}return this.clear()}}class Et extends(ut.singleton()){__lockedMap=new Map;pipeline=new qt;constructor(){super()}lock(e,t){if(!e||!t)return;const r=kt.safeRun(t);return this.__lockedMap.set(e,r),r}unlock(e){e&&this.__lockedMap.has(e)&&this.__lockedMap.delete(e)}async exec(e,t){if(!e||!t)return kt.safeRun(e);const r=this.__lockedMap.get(t);if(r)return r;const n=this.lock(t,e);if(!n)return kt.safeRun(e);const o=await n;return this.unlock(t),o}}function _t(e){return Math.floor(Math.random()*e)}function Pt(e,t=10){return+parseFloat(Number(e).toExponential(t))}const Ft=180/Math.PI;var St={random:_t,randomRange:function(e,t){return Math.floor(Math.random()*(t-e+1)+e)},lerp:function(e,t,r){return e*(1-r)+t*r},randoms:function(e,t=1,r=!1){const n=[];for(;;){if(n.length>=t)break;if(!r&&n.length>=e)break;const o=_t(e);r?n.push(o):n.includes(o)||n.push(o)}return n},strip:Pt,float:function(e,{digits:t=2,fixed:r=!1}={}){const n=Pt(e).toFixed(t);return r||!t?+n:+n.replace(/(\.[1-9]?)0+$/,"$1").replace(/\.$/,"")},radian2degree:function(e){return e*Ft},degree2radian:function(e){return e/Ft},calcDataSize:function(e){const t={gb:0,mb:0,kb:0,b:0,total:e,desc:""},r=[{name:"gb",divisor:1<<30},{name:"mb",divisor:1<<20},{name:"kb",divisor:1024},{name:"b",divisor:1}];for(const n of r){const r=Math.floor(e/n.divisor);t[n.name]=r,e-=r*n.divisor}return t.gb>0?t.desc=(t.gb+t.mb/1024).toFixed(2)+"GB":t.mb>0?t.desc=(t.mb+t.kb/1024).toFixed(2)+"MB":t.kb>0?t.desc=(t.kb+t.b/1024).toFixed(2)+"KB":t.desc=t.b+"B",t}};var Tt={bytes2str:e=>{if(!e||!R.isArrayLike(e))return"";return e.reduce(((e,t)=>e+String.fromCharCode(t)),"")},str2bytes:(e="")=>{const t=e,r=new Uint8Array(t.length);for(let e=0,n=t.length;e<n;e++)r[e]=t.charCodeAt(e);return r},str2hex:e=>{let t="";for(let r=0;r<e.length;r++)t+=e.charCodeAt(r).toString(16).padStart(2,"0");return t},hex2str:e=>{let t="";for(let r=0;r<e.length;r+=2)t+=String.fromCharCode(parseInt(e.substr(r,2),16));return t},concatBytes:(...e)=>{const t=e.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(t);let n=0;for(const t of e)r.set(t,n),n+=t.length;return r},uint32ToBytes:e=>{const t=new Uint8Array(8);return t[0]=e[0]>>>24&255,t[1]=e[0]>>>16&255,t[2]=e[0]>>>8&255,t[3]=255&e[0],t[4]=e[1]>>>24&255,t[5]=e[1]>>>16&255,t[6]=e[1]>>>8&255,t[7]=255&e[1],t},bytesToUint32:e=>{const t=new Uint32Array(2);return t[0]=e[0]<<24|e[1]<<16|e[2]<<8|e[3],t[1]=e[4]<<24|e[5]<<16|e[6]<<8|e[7],t},hex2bytes:e=>{let t=new Uint8Array(e.length/2);for(let r=0;r<t.length;r++)t[r]=parseInt(e.substr(2*r,2),16);return t},bytes2hex:e=>Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join(""),toUint32:e=>{const t=Math.ceil(e.length/4),r=new Uint32Array(t);for(let n=0;n<t;n++)r[n]=e.charCodeAt(4*n)<<24|e.charCodeAt(4*n+1)<<16|e.charCodeAt(4*n+2)<<8|e.charCodeAt(4*n+3);return r},fromUint32:e=>{let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]>>>24&255,e[r]>>>16&255,e[r]>>>8&255,255&e[r]);return t.replace(/\0+$/,"")},flatten:function e(t,r=!1,n=[]){for(let o=0;o<t.length;o+=1){const i=t[o];r&&Array.isArray(i)?e(i,r,n):n.push(i)}return n}};var Ut={pkcs7Padding:(e,t)=>{const r=t-e.length%t,n=new Uint8Array(r).fill(r);return Tt.concatBytes(e,n)},pkcs7Unpadding:e=>{const t=e[e.length-1];return e.slice(0,-t)}};function Rt(e,t){return e<<t|e>>>32-t}function Lt(e,t){let r,n,o,i,s;return o=2147483648&e,i=2147483648&t,r=1073741824&e,n=1073741824&t,s=(1073741823&e)+(1073741823&t),r&n?2147483648^s^o^i:r|n?1073741824&s?3221225472^s^o^i:1073741824^s^o^i:s^o^i}function It(e,t,r,n,o,i,s){return e=Lt(e,Lt(Lt(function(e,t,r){return e&t|~e&r}(t,r,n),o),s)),Lt(Rt(e,i),t)}function Nt(e,t,r,n,o,i,s){return e=Lt(e,Lt(Lt(function(e,t,r){return e&r|t&~r}(t,r,n),o),s)),Lt(Rt(e,i),t)}function zt(e,t,r,n,o,i,s){return e=Lt(e,Lt(Lt(function(e,t,r){return e^t^r}(t,r,n),o),s)),Lt(Rt(e,i),t)}function Mt(e,t,r,n,o,i,s){return e=Lt(e,Lt(Lt(function(e,t,r){return t^(e|~r)}(t,r,n),o),s)),Lt(Rt(e,i),t)}function Dt(e){let t,r,n="",o="";for(r=0;r<=3;r++)t=e>>>8*r&255,o="0"+t.toString(16),n+=o.substr(o.length-2,2);return n}function Kt(e){let t,r,n,o,i,s,a,u,l,c=[];for(c=function(e){let t;const r=e.length,n=r+8,o=16*((n-n%64)/64+1),i=Array(o-1).fill(0);let s=0,a=0;for(;a<r;)t=(a-a%4)/4,s=a%4*8,i[t]=i[t]|e[a]<<s,a++;return t=(a-a%4)/4,s=a%4*8,i[t]=i[t]|128<<s,i[o-2]=r<<3,i[o-1]=r>>>29,i}(e),s=1732584193,a=4023233417,u=2562383102,l=271733878,t=0;t<c.length;t+=16)r=s,n=a,o=u,i=l,s=It(s,a,u,l,c[t+0],7,3614090360),l=It(l,s,a,u,c[t+1],12,3905402710),u=It(u,l,s,a,c[t+2],17,606105819),a=It(a,u,l,s,c[t+3],22,3250441966),s=It(s,a,u,l,c[t+4],7,4118548399),l=It(l,s,a,u,c[t+5],12,1200080426),u=It(u,l,s,a,c[t+6],17,2821735955),a=It(a,u,l,s,c[t+7],22,4249261313),s=It(s,a,u,l,c[t+8],7,1770035416),l=It(l,s,a,u,c[t+9],12,2336552879),u=It(u,l,s,a,c[t+10],17,4294925233),a=It(a,u,l,s,c[t+11],22,2304563134),s=It(s,a,u,l,c[t+12],7,1804603682),l=It(l,s,a,u,c[t+13],12,4254626195),u=It(u,l,s,a,c[t+14],17,2792965006),a=It(a,u,l,s,c[t+15],22,1236535329),s=Nt(s,a,u,l,c[t+1],5,4129170786),l=Nt(l,s,a,u,c[t+6],9,3225465664),u=Nt(u,l,s,a,c[t+11],14,643717713),a=Nt(a,u,l,s,c[t+0],20,3921069994),s=Nt(s,a,u,l,c[t+5],5,3593408605),l=Nt(l,s,a,u,c[t+10],9,38016083),u=Nt(u,l,s,a,c[t+15],14,3634488961),a=Nt(a,u,l,s,c[t+4],20,3889429448),s=Nt(s,a,u,l,c[t+9],5,568446438),l=Nt(l,s,a,u,c[t+14],9,3275163606),u=Nt(u,l,s,a,c[t+3],14,4107603335),a=Nt(a,u,l,s,c[t+8],20,1163531501),s=Nt(s,a,u,l,c[t+13],5,2850285829),l=Nt(l,s,a,u,c[t+2],9,4243563512),u=Nt(u,l,s,a,c[t+7],14,1735328473),a=Nt(a,u,l,s,c[t+12],20,2368359562),s=zt(s,a,u,l,c[t+5],4,4294588738),l=zt(l,s,a,u,c[t+8],11,2272392833),u=zt(u,l,s,a,c[t+11],16,1839030562),a=zt(a,u,l,s,c[t+14],23,4259657740),s=zt(s,a,u,l,c[t+1],4,2763975236),l=zt(l,s,a,u,c[t+4],11,1272893353),u=zt(u,l,s,a,c[t+7],16,4139469664),a=zt(a,u,l,s,c[t+10],23,3200236656),s=zt(s,a,u,l,c[t+13],4,681279174),l=zt(l,s,a,u,c[t+0],11,3936430074),u=zt(u,l,s,a,c[t+3],16,3572445317),a=zt(a,u,l,s,c[t+6],23,76029189),s=zt(s,a,u,l,c[t+9],4,3654602809),l=zt(l,s,a,u,c[t+12],11,3873151461),u=zt(u,l,s,a,c[t+15],16,530742520),a=zt(a,u,l,s,c[t+2],23,3299628645),s=Mt(s,a,u,l,c[t+0],6,4096336452),l=Mt(l,s,a,u,c[t+7],10,1126891415),u=Mt(u,l,s,a,c[t+14],15,2878612391),a=Mt(a,u,l,s,c[t+5],21,4237533241),s=Mt(s,a,u,l,c[t+12],6,1700485571),l=Mt(l,s,a,u,c[t+3],10,2399980690),u=Mt(u,l,s,a,c[t+10],15,4293915773),a=Mt(a,u,l,s,c[t+1],21,2240044497),s=Mt(s,a,u,l,c[t+8],6,1873313359),l=Mt(l,s,a,u,c[t+15],10,4264355552),u=Mt(u,l,s,a,c[t+6],15,2734768916),a=Mt(a,u,l,s,c[t+13],21,1309151649),s=Mt(s,a,u,l,c[t+4],6,4149444226),l=Mt(l,s,a,u,c[t+11],10,3174756917),u=Mt(u,l,s,a,c[t+2],15,718787259),a=Mt(a,u,l,s,c[t+9],21,3951481745),s=Lt(s,r),a=Lt(a,n),u=Lt(u,o),l=Lt(l,i);return Dt(s)+Dt(a)+Dt(u)+Dt(l)}const Vt=e=>{if("string"!=typeof e&&!(e instanceof Uint8Array))return"";return Kt("string"==typeof e?t.toUtf8Bytes(e):e)};var Ht={md5:Vt,md5Base64:e=>{const t=Vt(e);if(!t)return"";const r=Tt.hex2bytes(t);return I.bytesToBase64(r)}};const Wt=(e,t=!1)=>{const r=new Uint8Array(e);return t?I.bytesToBase64(r):r.reduce(((e,t)=>e+String.fromCharCode(t)),"")};var Zt={...Tt,...Ut,...t,...I,...Ht,str2ab:(e="",t=!1)=>{if(t)return I.base64ToBytes(e).buffer;{const t=new ArrayBuffer(e.length),r=new Uint8Array(t);for(let t=0,n=e.length;t<n;t++)r[t]=e.charCodeAt(t);return t}},ab2str:Wt,utf8ToBase64:e=>R.isBrowser?btoa(e):Buffer.from(e,"utf-8").toString("base64"),base64ToUtf8:e=>R.isBrowser?atob(e):Buffer.from(e,"base64").toString("utf-8"),getRandomBytes:e=>{const t=new Uint8Array(e);for(let r=0;r<e;r++)t[r]=St.random(256);return t},textEncode:e=>t.toUtf8Bytes(e),textDecode:e=>t.fromUtf8Bytes(new Uint8Array(e)),toDataUrl:(e,t="text/plain")=>e?"string"==typeof e?`data:${t};base64,`+I.toBase64(e):R.isArrayBuffer(e)?`data:${t};base64,`+Wt(e,!0):"":""};const Qt=e=>{try{const t=Zt.ab2str(e,!0);return t.match(/.{1,64}/g)?.join("\n")||""}catch(e){return""}},Yt=(e="",t="PUBLIC KEY")=>`-----BEGIN ${t}-----\n${e}\n-----END ${t}-----`;var Jt={RSAPublicKey:"MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApiLWsPmoaiGdr02AmPYS\n4/VgxyJNNJSK2VICirXl4P8qAP3b/6GIs7Hwnsmmuj7gledJ0XiZodFjDNgQEZEG\nj4K9KX8NixcrJwnTQV5UebiERdj+64ihwqPVWo9dIOj43ZPJ8f4dritJv5tnQaBb\nb9zTkU3Ofzk1g8RU00Ith6quOGZcU2IWC4OQ+5YiZvzrCBKEvjFwK2OvGq43tI51\nGaZdI9H09jisypqefsMvv6esjEQQOtl+WGlI5fof7KZUt3dppvuDI4CYgeXIoKKL\n9T9qDl8F9aNSs3XHx32YyA7L1FraFD6PjqRjueIFp2emsXQcIMeMqqgVyV+4qb+0\nuwIDAQAB",RSAPrivateKey:"MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCmItaw+ahqIZ2v\nTYCY9hLj9WDHIk00lIrZUgKKteXg/yoA/dv/oYizsfCeyaa6PuCV50nReJmh0WMM\n2BARkQaPgr0pfw2LFysnCdNBXlR5uIRF2P7riKHCo9Vaj10g6Pjdk8nx/h2uK0m/\nm2dBoFtv3NORTc5/OTWDxFTTQi2Hqq44ZlxTYhYLg5D7liJm/OsIEoS+MXArY68a\nrje0jnUZpl0j0fT2OKzKmp5+wy+/p6yMRBA62X5YaUjl+h/splS3d2mm+4MjgJiB\n5cigoov1P2oOXwX1o1KzdcfHfZjIDsvUWtoUPo+OpGO54gWnZ6axdBwgx4yqqBXJ\nX7ipv7S7AgMBAAECggEAE1kuWLkSsJ2OoDpt9iJ+a7cJmNd5V1zPWOTwr9fkWFJP\nQYNPKlPVOFxKUivY84rcHAkuMyuQ9OQOXZISOQGDWpZW0mzeFmtR1r+Rr2S9gNmI\n6huOAL9OW306HUxiA7GuPhv2omy+Zyjac2q1WVLEI2B78Um2+WEfxuNIH7xu0gRR\nz/wluevMBQlv6hSeMESP6e9s2kB+FuM4bL7+1sexwS1TudKbHybujaiB8un9E2V3\nC9BkE6yf00Rhvii6Q4E4w3PFQfcBEFnjOD0S2Watx8GIbYjlYvtquy8Yj7OtyZB6\nw5sxyaYhKVVnkpGAbOgaCj94ABYF47VuwXr45I4PzQKBgQDp6svzD+QKlARjcWgO\nrH7UEpFX6m49G6Ib4c63xEg9+GesTgfDxoYxtXDKsC7I8OwMrmffJGbyfjaAvzmg\nicM3Y7kF6UPO9+q2mBRsyhoJSNONTeUVyoFSc+QDsVgndlTZIjqC5XLrONGaSPLJ\n7jJzqKhp3NQcpO8+xY0d7Efm1QKBgQC10fCNuF1LUTYgsWvvGxTiCCAIBurZmHU+\nGMb2Okfoco/P+QNl1jEba91AC7FudW3g/lRn0vTnDajlNoz2/CKunrTKN4/9lEBI\ntiwEOvhc5FtapRifSfrrNwFqPM+LijvOkcteWVhAUWCEP1eLmpnXGqfmZxnTaaVe\n5DyDgyAVTwKBgQDhEawfOQEANJ9sV2f6BnsZ7quuXcCoR3hZP5G5O8EO735BSesq\nsk/YcG4QeCjr6vQU15LWH552YH5srpHyJ9uP5gHW8DTwZZaPDhFJA8S9fjcfVP3B\nU9HO1fdknjTl83N8YPTPkZpbPZZfzyTcqrYclwFEqtfkn8YbLdW0Hu6n6QKBgDEv\njvS3uD1ExfDILlurptWSvx+Mx4F/1c+roj8/+u3t9+uaAIpPDE/PuTW3NBOens/r\n3WeM0QWkU1lWjYHPKY61jlDaARDnRxCkf3nRfhibCf+Wg/erar6wzagwtTCZf55d\nIHfwkYgsu4BrJkK02wMuydbxczIW9U6bTaeCFG7PAoGAN3oHYzTEBwZ7ZKv11QiQ\nEp/HeHBvD8fH/e1uVyBel4Co7NO5pV2s8qjS8+3+jxumKLNXCirjqwHo03YCdzxi\ncy4GFDsukHmDQ7FF9VC4QV0fJ0F7jGYE9nNZ+K9qwS5KrihOSBPxj0HptrF6TSOw\nBTSwr0byL3TC0m0StkSNKpo=",generateKeys:async e=>{try{const t=await e.generateKey({name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!0,["encrypt","decrypt"]),r=await window.crypto.subtle.exportKey("spki",t.publicKey),n=Qt(r),o=Yt(n,"PUBLIC KEY"),i=await window.crypto.subtle.exportKey("pkcs8",t.privateKey),s=Qt(i);return{publicKey:n,publicKeyPem:o,privateKey:s,privateKeyPem:Yt(s,"PRIVATE KEY")}}catch(e){return console.error("generateKeys failed:",e),{publicKey:"",publicKeyPem:"",privateKey:"",privateKeyPem:""}}},format_pem_key:Yt,format_pem_content:Qt,encrypt:async(e,t,r)=>{try{const n=(new TextEncoder).encode(t),o=await e.importKey("spki",Zt.str2ab(r,!0),{name:"RSA-OAEP",hash:"SHA-256"},!0,["encrypt"]),i=[];for(let t=0;t<n.length;t+=190){let r=n.slice(t,t+190),s=await e.encrypt({name:"RSA-OAEP"},o,r);i.push(new Uint8Array(s))}const s=Zt.concatBytes(...i);return Zt.bytesToBase64(s)}catch(e){return console.error("[debug] encrypt",e),""}},decrypt:async(e,t,r)=>{try{const n=Zt.base64ToBytes(t),o=await e.importKey("pkcs8",Zt.str2ab(r,!0),{name:"RSA-OAEP",hash:"SHA-256"},!0,["decrypt"]),i=[],s=256;for(let t=0;t<n.length;t+=s){let r=n.slice(t,t+s),a=await e.decrypt({name:"RSA-OAEP"},o,r);i.push(new Uint8Array(a))}const a=Zt.concatBytes(...i);return(new TextDecoder).decode(a)}catch(e){return console.error("decrypt failed:",e),""}}};const Gt=()=>e.webcrypto.subtle;var Xt=async e=>Jt.encrypt(Gt(),e,Jt.RSAPublicKey),er=async e=>Jt.decrypt(Gt(),e,Jt.RSAPrivateKey);const tr="undefined"!=typeof window?window.crypto.subtle:{};var rr=async e=>Jt.encrypt(tr,e,Jt.RSAPublicKey),nr=async e=>Jt.decrypt(tr,e,Jt.RSAPrivateKey);const or=2654435769,ir=(e,t)=>{let r=0;for(let n=0;n<32;n++)r=r+or>>>0,e[0]=e[0]+((e[1]<<4)+t[0]^e[1]+r^(e[1]>>>5)+t[1])>>>0,e[1]=e[1]+((e[0]<<4)+t[2]^e[0]+r^(e[0]>>>5)+t[3])>>>0;return e},sr=(e,t)=>{let r=3337565984;for(let n=0;n<32;n++)e[1]=e[1]-((e[0]<<4)+t[2]^e[0]+r^(e[0]>>>5)+t[3])>>>0,e[0]=e[0]-((e[1]<<4)+t[0]^e[1]+r^(e[1]>>>5)+t[1])>>>0,r=r-or>>>0;return e},ar=e=>{const t=Zt.str2bytes(e),r=new Uint32Array(4);return r[0]=t[0]<<24|t[1]<<16|t[2]<<8|t[3],r[1]=t[4]<<24|t[5]<<16|t[6]<<8|t[7],r[2]=t[8]<<24|t[9]<<16|t[10]<<8|t[11],r[3]=t[12]<<24|t[13]<<16|t[14]<<8|t[15],r},ur=(e,t)=>{const r=Zt.pkcs7Padding(e,8),n=ar(t),o=[];for(let e=0;e<r.length;e+=8){const t=Zt.bytesToUint32(r.slice(e,e+8)),i=ir(t,n);o.push(Zt.uint32ToBytes(i))}return Zt.concatBytes(...o)},lr=(e,t)=>{const r=ar(t),n=[];for(let t=0;t<e.length;t+=8){const o=Zt.bytesToUint32(e.slice(t,t+8)),i=sr(o,r);n.push(Zt.uint32ToBytes(i))}const o=Zt.concatBytes(...n);return Zt.pkcs7Unpadding(o)};var cr="33576f37387276645054657a6831686e454664424e5652456f47794835795942",fr=(e,t)=>{const r=Zt.textEncode(e),n=ur(r,t);return Zt.bytesToBase64(n)},dr=(e,t)=>{const r=Zt.base64ToBytes(e),n=lr(r,t);return Zt.textDecode(n.buffer)};var hr={logString:e=>{try{const t=JSON.stringify(e);return void 0===t?"":fr(t,Zt.hex2str(cr))}catch(e){return""}},logParse:e=>{try{if(!e)return"";const t=dr(e,Zt.hex2str(cr));return et(t)}catch(e){return""}},logRString:async e=>{try{const t=JSON.stringify(e);if(void 0===t)return"";return R.isBrowser?await rr(t):await Xt(t)}catch(e){return""}},logRParse:async e=>{try{if(!e)return"";const t=R.isBrowser?await nr(e):await er(e);return et(t)}catch(e){return""}}};const pr=(e,t,r)=>e*(1-r)+t*r,gr=(e,t,r)=>e===t?0:(r-e)/(t-e),yr=(e,t,r)=>({x:pr(e.x,t.x,r),y:pr(e.y,t.y,r)}),mr=(e,t,r,n)=>{const o=yr(e,t,n),i=yr(t,r,n);return yr(o,i,n)},br=(e,t)=>{if(1===e.length)return e[0];const r=[];for(let n=0;n<e.length-1;n++)r.push({x:(1-t)*e[n].x+t*e[n+1].x,y:(1-t)*e[n].y+t*e[n+1].y});return br(r,t)},wr=(e,t)=>{if(0===t||t===e)return 1;let r=1;for(let n=1;n<=t;n++)r=r*(e-n+1)/n;return r};var vr={bezier1:yr,bezier2:mr,bezier3:(e,t,r,n,o)=>{const i=mr(e,t,r,o),s=mr(t,r,n,o);return yr(i,s,o)},bezier:br,bezierCurve:(e,t)=>{const r=e.length-1;let n=0,o=0;for(let i=0;i<=r;i++){const s=wr(r,i)*Math.pow(1-t,r-i)*Math.pow(t,i);n+=s*e[i].x,o+=s*e[i].y}return{x:n,y:o}},lerp:pr,lerpAverage:(e,t,r="")=>{if(e.length<=0)return 0;if(1===e.length)return e[0].x;if(2===e.length)return pr(e[0].y,e[1].y,.5);const n=[],o=e.slice().sort(((e,t)=>e.x-t.x)),i=o.length,s=o[0].x,a=o[i-1].x;for(let e=s;e<=a;e+=t){let t=0;for(let n=0;n<i-1;n++){const i=o[n],s=o[n+1];if(e>=i.x&&e<=s.x){if("lerp"===r){const r=gr(i.x,s.x,e);t=yr(i,s,r).y}else t=i.y;break}}e>o[i-1].x&&(t=o[i-1].y),n.push(t)}return n.reduce(((e,t)=>e+t),0)/n.length},proportion:gr};var xr={...kt,...hr,...vr,sleep:kt.delay,run:async function(e,t=0){if(t<=0)return kt.safeRun(e);const r=t>0?Date.now():0,n=await kt.safeRun(e),o=Date.now()-r;return o<t&&await kt.delay(t-o),n},exec:(e,t="")=>Et.I.exec(e,t),debounce:At,throttle:function(e,t=300,r={}){let n=!0,o=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return R.isObject(r)&&(n=r.leading?!!r.leading:n,o=r.trailing?!!r.trailing:o),At(e,t,{leading:n,maxWait:t,trailing:o})},task:e=>new jt(e),mutex:function(e){var t=null;return async function(...r){if((t=this||t||{}).__ddMutex)return!1;t.__ddMutex=!0;try{e&&await Promise.resolve(e.apply(this,r))}catch(e){console.log(e)}finally{t.__ddMutex=!1}}},polling:async function(e={}){const{func:t,interval:r=100,times:n=1e3}=e;let o=n;const i=r<1?100:r;do{if(!t)break;const[e,r]=await kt.to(Promise.resolve(t()));if(e||!1===r)break;o>0&&o--,0!==o&&await kt.delay(i)}while(-1===n||o>0)},pipe:(e,t)=>Et.I.pipeline.push(e,t),pipeline:(e=1)=>new qt(e),safeTask:(e,t)=>new Bt(e,t)};const Ar=/%[sdj%]/g;let jr=()=>{};function Or(e){if(!e||!e.length)return null;const t={};return e.forEach((e=>{const r=e.field;t[r]=t[r]||[],t[r].push(e)})),t}function $r(e,...t){let r=0;const n=t.length;if("function"==typeof e)return e.apply(null,t);if("string"==typeof e){return e.replace(Ar,(e=>{if("%%"===e)return"%";if(r>=n)return e;switch(e){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(e){return"[Circular]"}break;default:return e}}))}return e}function Cr(e,t){return null==e||(!("array"!==t||!Array.isArray(e)||e.length)||!(!function(e){return"string"===e||"url"===e||"hex"===e||"email"===e||"date"===e||"pattern"===e}(t)||"string"!=typeof e||e))}function kr(e,t,r){let n=0;const o=e.length;!function i(s){if(s&&s.length)return void r(s);const a=n;n+=1,a<o?t(e[a],i):r([])}([])}"undefined"!=typeof process&&process.env&&"production"!==process.env.NODE_ENV&&"undefined"!=typeof window&&"undefined"!=typeof document&&(jr=(e,t)=>{"undefined"!=typeof console&&console.warn&&"undefined"==typeof ASYNC_VALIDATOR_NO_WARNING&&t.every((e=>"string"==typeof e))&&console.warn(e,t)});class Br extends Error{errors;fields;constructor(e,t){super("Async Validation Error"),this.errors=e,this.fields=t}}function qr(e,t,r,n,o){if(t.first){const t=new Promise(((t,i)=>{const s=function(e){const t=[];return Object.keys(e).forEach((r=>{t.push(...e[r]||[])})),t}(e);kr(s,r,(e=>(n(e),e.length?i(new Br(e,Or(e))):t(o))))}));return t.catch((e=>e)),t}const i=!0===t.firstFields?Object.keys(e):t.firstFields||[],s=Object.keys(e),a=s.length;let u=0;const l=[],c=new Promise(((t,c)=>{const f=e=>{if(l.push.apply(l,e),u++,u===a)return n(l),l.length?c(new Br(l,Or(l))):t(o)};s.length||(n(l),t(o)),s.forEach((t=>{const n=e[t];-1!==i.indexOf(t)?kr(n,r,f):function(e,t,r){const n=[];let o=0;const i=e.length;function s(e){n.push(...e||[]),o++,o===i&&r(n)}e.forEach((e=>{t(e,s)}))}(n,r,f)}))}));return c.catch((e=>e)),c}function Er(e,t){return r=>{let n;return n=e.fullFields?function(e,t){let r=e;for(let e=0;e<t.length;e++){if(null==r)return r;r=r[t[e]]}return r}(t,e.fullFields):t[r.field||e.fullField],(o=r)&&void 0!==o.message?(r.field=r.field||e.fullField,r.fieldValue=n,r):{message:"function"==typeof r?r():r,fieldValue:n,field:r.field||e.fullField};var o}}function _r(e,t){if(t)for(const r in t)if(t.hasOwnProperty(r)){const n=t[r];"object"==typeof n&&"object"==typeof e[r]?e[r]={...e[r],...n}:e[r]=n}return e}const Pr=(e,t,r,n,o,i)=>{!e.required||r.hasOwnProperty(e.field||"")&&!Cr(t,i||e.type)||n.push($r(o.messages.required,e.fullField))};let Fr;const Sr=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,Tr=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,Ur={integer:e=>Ur.number(e)&&parseInt(e,10)===e,float:e=>Ur.number(e)&&!Ur.integer(e),array:e=>Array.isArray(e),regexp(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:e=>"function"==typeof e.getTime&&"function"==typeof e.getMonth&&"function"==typeof e.getYear&&!isNaN(e.getTime()),number:e=>!isNaN(e)&&"number"==typeof e,object:e=>"object"==typeof e&&!Ur.array(e),method:e=>"function"==typeof e,email:e=>"string"==typeof e&&e.length<=320&&!!e.match(Sr),url:e=>"string"==typeof e&&e.length<=2048&&!!e.match((()=>{if(Fr)return Fr;const e="[a-fA-F\\d:]",t=t=>t&&t.includeBoundaries?`(?:(?<=\\s|^)(?=${e})|(?<=${e})(?=\\s|$))`:"",r="(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}",n="[a-fA-F\\d]{1,4}",o=`\n(?:\n(?:${n}:){7}(?:${n}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8\n(?:${n}:){6}(?:${r}|:${n}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4\n(?:${n}:){5}(?::${r}|(?::${n}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4\n(?:${n}:){4}(?:(?::${n}){0,1}:${r}|(?::${n}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4\n(?:${n}:){3}(?:(?::${n}){0,2}:${r}|(?::${n}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4\n(?:${n}:){2}(?:(?::${n}){0,3}:${r}|(?::${n}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4\n(?:${n}:){1}(?:(?::${n}){0,4}:${r}|(?::${n}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::${n}){0,5}:${r}|(?::${n}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})? // %eth0 %1\n`.replace(/\s*\/\/.*$/gm,"").replace(/\n/g,"").trim(),i=new RegExp(`(?:^${r}$)|(?:^${o}$)`),s=new RegExp(`^${r}$`),a=new RegExp(`^${o}$`),u=e=>e&&e.exact?i:new RegExp(`(?:${t(e)}${r}${t(e)})|(?:${t(e)}${o}${t(e)})`,"g");u.v4=e=>e&&e.exact?s:new RegExp(`${t(e)}${r}${t(e)}`,"g"),u.v6=e=>e&&e.exact?a:new RegExp(`${t(e)}${o}${t(e)}`,"g");const l=u.v4().source,c=u.v6().source;return Fr=new RegExp(`(?:^(?:(?:(?:[a-z]+:)?//)|www\\.)(?:\\S+(?::\\S*)?@)?(?:localhost|${l}|${c}|(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:[/?#][^\\s"]*)?$)`,"i"),Fr})()),hex:e=>"string"==typeof e&&!!e.match(Tr)},Rr="enum";var Lr={required:Pr,whitespace:(e,t,r,n,o)=>{(/^\s+$/.test(t)||""===t)&&n.push($r(o.messages.whitespace,e.fullField))},type:(e,t,r,n,o)=>{if(e.required&&void 0===t)return void Pr(e,t,r,n,o);const i=e.type;["integer","float","array","regexp","object","method","email","number","date","url","hex"].indexOf(i)>-1?Ur[i](t)||n.push($r(o.messages.types[i],e.fullField,e.type)):i&&typeof t!==e.type&&n.push($r(o.messages.types[i],e.fullField,e.type))},range:(e,t,r,n,o)=>{const i="number"==typeof e.len,s="number"==typeof e.min,a="number"==typeof e.max,u=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g;let l=t,c="";const f="number"==typeof t,d="string"==typeof t,h=Array.isArray(t);if(f?c="number":d?c="string":h&&(c="array"),!c)return!1;h&&(l=t.length),d&&(l=t.replace(u,"_").length),i?l!==e.len&&n.push($r(o.messages[c].len,e.fullField,e.len)):s&&!a&&l<e.min?n.push($r(o.messages[c].min,e.fullField,e.min)):a&&!s&&l>e.max?n.push($r(o.messages[c].max,e.fullField,e.max)):s&&a&&(l<e.min||l>e.max)&&n.push($r(o.messages[c].range,e.fullField,e.min,e.max))},enum:(e,t,r,n,o)=>{e[Rr]=Array.isArray(e[Rr])?e[Rr]:[],-1===e[Rr].indexOf(t)&&n.push($r(o.messages[Rr],e.fullField,e[Rr].join(", ")))},pattern:(e,t,r,n,o)=>{if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||n.push($r(o.messages.pattern.mismatch,e.fullField,t,e.pattern));else if("string"==typeof e.pattern){new RegExp(e.pattern).test(t)||n.push($r(o.messages.pattern.mismatch,e.fullField,t,e.pattern))}}};const Ir=(e,t,r,n,o)=>{const i=e.type,s=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Cr(t,i)&&!e.required)return r();Lr.required(e,t,n,s,o,i),Cr(t,i)||Lr.type(e,t,n,s,o)}r(s)};var Nr={string:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field||"")){if(Cr(t,"string")&&!e.required)return r();Lr.required(e,t,n,i,o,"string"),Cr(t,"string")||(Lr.type(e,t,n,i,o),Lr.range(e,t,n,i,o),Lr.pattern(e,t,n,i,o),!0===e.whitespace&&Lr.whitespace(e,t,n,i,o))}r(i)},method:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Cr(t)&&!e.required)return r();Lr.required(e,t,n,i,o),void 0!==t&&Lr.type(e,t,n,i,o)}r(i)},number:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(""===t&&(t=void 0),Cr(t)&&!e.required)return r();Lr.required(e,t,n,i,o),void 0!==t&&(Lr.type(e,t,n,i,o),Lr.range(e,t,n,i,o))}r(i)},boolean:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Cr(t)&&!e.required)return r();Lr.required(e,t,n,i,o),void 0!==t&&Lr.type(e,t,n,i,o)}r(i)},regexp:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Cr(t)&&!e.required)return r();Lr.required(e,t,n,i,o),Cr(t)||Lr.type(e,t,n,i,o)}r(i)},integer:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Cr(t)&&!e.required)return r();Lr.required(e,t,n,i,o),void 0!==t&&(Lr.type(e,t,n,i,o),Lr.range(e,t,n,i,o))}r(i)},float:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Cr(t)&&!e.required)return r();Lr.required(e,t,n,i,o),void 0!==t&&(Lr.type(e,t,n,i,o),Lr.range(e,t,n,i,o))}r(i)},array:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(null==t&&!e.required)return r();Lr.required(e,t,n,i,o,"array"),null!=t&&(Lr.type(e,t,n,i,o),Lr.range(e,t,n,i,o))}r(i)},object:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Cr(t)&&!e.required)return r();Lr.required(e,t,n,i,o),void 0!==t&&Lr.type(e,t,n,i,o)}r(i)},enum:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Cr(t)&&!e.required)return r();Lr.required(e,t,n,i,o),void 0!==t&&Lr.enum(e,t,n,i,o)}r(i)},pattern:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Cr(t,"string")&&!e.required)return r();Lr.required(e,t,n,i,o),Cr(t,"string")||Lr.pattern(e,t,n,i,o)}r(i)},date:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Cr(t,"date")&&!e.required)return r();if(Lr.required(e,t,n,i,o),!Cr(t,"date")){let r;r=t instanceof Date?t:new Date(t),Lr.type(e,r,n,i,o),r&&Lr.range(e,r.getTime(),n,i,o)}}r(i)},url:Ir,hex:Ir,email:Ir,required:(e,t,r,n,o)=>{const i=[],s=Array.isArray(t)?"array":typeof t;Lr.required(e,t,n,i,o,s),r(i)},any:(e,t,r,n,o)=>{const i=[];if(e.required||!e.required&&n.hasOwnProperty(e.field)){if(Cr(t)&&!e.required)return r();Lr.required(e,t,n,i,o)}r(i)}};function zr(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone(){const e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}const Mr=zr();class Dr{static register=function(e,t){if("function"!=typeof t)throw new Error("Cannot register a validator by type, validator is not a function");Nr[e]=t};static warning=jr;static messages=Mr;static validators=Nr;rules={};_messages=Mr;constructor(e){this.define(e)}define(e){if(!e)throw new Error("Cannot configure a schema with no rules");if("object"!=typeof e||Array.isArray(e))throw new Error("Rules must be an object");this.rules={},Object.keys(e).forEach((t=>{const r=e[t];this.rules[t]=Array.isArray(r)?r:[r]}))}messages(e){return e&&(this._messages=_r(zr(),e)),this._messages}validate(e,t={},r=(()=>{})){let n=e,o=t,i=r;if("function"==typeof o&&(i=o,o={}),!this.rules||0===Object.keys(this.rules).length)return i&&i(null,n),Promise.resolve(n);if(o.messages){let e=this.messages();e===Mr&&(e=zr()),_r(e,o.messages),o.messages=e}else o.messages=this.messages();const s={};(o.keys||Object.keys(this.rules)).forEach((t=>{const r=this.rules[t];let o=n[t];r.forEach((r=>{let i=r;"function"==typeof i.transform&&(n===e&&(n={...n}),o=n[t]=i.transform(o)),i="function"==typeof i?{validator:i}:{...i},i.validator=this.getValidationMethod(i),i.validator&&(i.field=t,i.fullField=i.fullField||t,i.type=this.getType(i),s[t]=s[t]||[],s[t].push({rule:i,value:o,source:n,field:t}))}))}));const a={};return qr(s,o,((e,t)=>{const r=e.rule;let i,s=!("object"!==r.type&&"array"!==r.type||"object"!=typeof r.fields&&"object"!=typeof r.defaultField);function u(e,t){return{...t,fullField:`${r.fullField}.${e}`,fullFields:r.fullFields?[...r.fullFields,e]:[e]}}function l(i=[]){let l=Array.isArray(i)?i:[i];!0===o.suppressWarning&&l.length&&Dr.warning("async-validator:",l),l.length&&void 0!==r.message&&(l=[].concat(r.message));let c=l.map(Er(r,n));if(o.first&&c.length)return a[r.field]=1,t(c);if(s){if(r.required&&!e.value)return void 0!==r.message?c=[].concat(r.message).map(Er(r,n)):o.error&&(c=[o.error(r,$r(o.messages.required,r.field))]),t(c);let i={};r.defaultField&&Object.keys(e.value).map((e=>{i[e]=r.defaultField})),i={...i,...e.rule.fields};const s={};Object.keys(i).forEach((e=>{const t=i[e],r=Array.isArray(t)?t:[t];s[e]=r.map(u.bind(null,e))}));const a=new Dr(s);a.messages(o.messages),e.rule.options&&(e.rule.options.messages=o.messages,e.rule.options.error=o.error),a.validate(e.value,e.rule.options||o,(e=>{const r=[];c&&c.length&&r.push(...c),e&&e.length&&r.push(...e),t(r.length?r:null)}))}else t(c)}if(s=s&&(r.required||!r.required&&e.value),r.field=e.field,r.asyncValidator)i=r.asyncValidator(r,e.value,l,e.source,o);else if(r.validator){try{i=r.validator(r,e.value,l,e.source,o)}catch(e){console.error?.(e),o.suppressValidatorError||setTimeout((()=>{throw e}),0),l(e.message)}!0===i?l():!1===i?l("function"==typeof r.message?r.message(r.fullField||r.field):r.message||`${r.fullField||r.field} fails`):i instanceof Array?l(i):i instanceof Error&&l(i.message)}i&&i.then&&i.then((()=>l()),(e=>l(e)))}),(e=>{!function(e){let t=[],r={};for(let r=0;r<e.length;r++)o=e[r],Array.isArray(o)?t=t.concat(...o):t.push(o);var o;t.length?(r=Or(t),i(t,r)):i(null,n)}(e)}),n)}getType(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type="pattern"),"function"!=typeof e.validator&&e.type&&!Nr.hasOwnProperty(e.type))throw new Error($r("Unknown rule type %s",e.type));return e.type||"string"}getValidationMethod(e){if("function"==typeof e.validator)return e.validator;const t=Object.keys(e),r=t.indexOf("message");return-1!==r&&t.splice(r,1),1===t.length&&"required"===t[0]?Nr.required:Nr[this.getType(e)]||void 0}}function Kr(e){return new Dr(e)}var Vr={validateId:function(e){return!!e&&(!(e.length<6)&&!!/^[A-Za-z0-9_-]+$/.test(e))},validatePhone:function(e){return!!e&&!!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e)},validator:Kr,validate:function(e,t,r={},n=(()=>{})){return xr.run(Kr(e).validate(t,r,n))},isChinese:function(e){return!!e&&!!/^[\u4E00-\u9FA5]+$/.test(e)},isNumber:function(e){return!!e&&!!/^[0-9]+$/.test(e)},isFloat:function(e){return!!e&&!!/^(\-|\+)?\d+(\.\d+)?$/.test(e)},isPhoneNumber:function(e){return!!e&&!!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(e)}};const Hr=e=>{if(!e)return"";if(!lt.isObject(e))return"";let t="";return lt.forof(e,((e,r)=>{r&&(t+=`${Je(e)}:${r};`)})),t},Wr=["display","position","top","bottom","left","right","padding","margin","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","height","width","fontSize","textAlign","fontFamily","border","borderLeft","borderRight","borderTop","borderBottom","borderColor","borderRadius","background","backgroundImage","backgroundRepeat","backgroundSize","backgroundPosition","color","overflow","opacity","flexDirection","justifyContent","alignItems","flexWrap","alignContent","alignSelf","flex","flexBasis","flexFlow","flexShrink","pointerEvents"],Zr=["top","bottom","left","right","padding","margin","marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","height","width","border","borderLeft","borderRight","borderTop","borderBottom","borderColor","borderRadius"],Qr=(e,t="px")=>e&&t?"0"===e?e:Vr.isFloat(e.toString())?`${e}${t}`:e:e;var Yr={stringify:Hr,parse:(e,{camel:t=!1,pure:r=!0}={})=>{if(!e.trim())return;const n=bt.parse(e,{sep:";",eq:":",uri:!1}),o={};return lt.forof(n,((e,n)=>{if(!n)return;const i=t?r&&e.startsWith("_")?e:Ge(e):e;Vr.isFloat(n)||n.length>=2&&n.startsWith(".")&&Vr.isNumber(n.substr(1))?o[i]=+n:o[i]=n})),o},fixValue:Qr,style:(e,t="px")=>{if(!e)return"";const r=lt.copy(e,{fields:Wr});lt.forof(r,((e,n)=>{(Zr.includes(e)||Zr.includes(Ge(e)))&&(r[e]=Qr(n,t))}));return Hr(r)},commonFields:Wr};var Jr={getDataURL:(e,t)=>{const r={contentType:"",dataUrl:""};return kt.to(fetch(e,{cache:t}).then((e=>(r.contentType=e.headers.get("content-type")||"",e.arrayBuffer()))).then((e=>(r.dataUrl=`data:${r.contentType};base64,`+Zt.ab2str(e,!0),r))))},getArrayBuffer:async(e,t)=>kt.to(fetch(e,{cache:t}).then((e=>e.arrayBuffer()))),getJson:async(e,t)=>kt.to(fetch(e,{cache:t}).then((e=>e.json()))),download:(e,t={})=>new Promise((r=>fetch(e).then((async e=>{if(!e.ok||200!==e.status)throw new Error(e.statusText);const n=+(e.headers.get("content-length")||""),o=e.body?.getReader();let i=0;const s=[];for(;;){const{done:e,value:r}=await o.read();if(e)break;s.push(r),i+=r.length;const a=St.float(100*i/n,{digits:2});t?.progress&&t?.progress(a,i,n)}const a=new Uint8Array(i);let u=0;for(const e of s)a.set(e,u),u+=e.length;t?.success&&t?.success(a),r(a)})).catch((e=>{t?.fail&&t?.fail(e),r(void 0)})))),getText:async(e,t)=>kt.to(fetch(e,{cache:t}).then((e=>e.text()))),cache:async(e,t="no-cache")=>kt.to(fetch(e,{cache:t}).then((()=>!0)))};const Gr=(e,t="",r=!1)=>{try{if(!e)return;const n=bt.parseUrl(e),o=t||n.name;if(!t||!r||!n.origin||n.origin===window.location.origin)((e,t)=>{try{const r=document.createElement("a");r.style.display="none",r.href=e,r.download=t,document.body.appendChild(r),r.click(),document.body.removeChild(r)}catch(t){console.error(`[ddan] _downloadUrl ${e}`,t)}})(e,o);else{const t=n.params;t.t=Date.now();const r=`${n.url}?${bt.stringify(t,{uri:!1})}`,i=new XMLHttpRequest;i.open("GET",r,!0),i.responseType="blob",i.onload=function(){Xr(i.response,o)},i.onerror=function(t){console.error(`[ddan] downloadUrl ${e}`,t)},i.send()}}catch(t){console.error(`[ddan] downloadUrl ${e}`,t)}},Xr=(e,t="")=>{try{if(!e)return;const r=URL?.createObjectURL(e);if(!r)return;Gr(r,t),URL?.revokeObjectURL(r)}catch(e){console.error("[ddan] downloadFile",e)}},en=e=>{try{const t=document.createElement("textarea");document.body.appendChild(t),t.style.position="fixed",t.style.clip="rect(0 0 0 0)",t.style.top="10px",t.style.opacity="0",t.value=e??"",t.select();const r=document.execCommand("copy");return document.body.removeChild(t),r}catch(e){return console.error("[ddan] copyText",e),!1}},tn=(e,t="denied")=>new Promise((r=>{const n=navigator?.permissions;if(!n||!n.query)return r(t);const o={name:e};n.query(o).then((e=>r(e.state))).catch((()=>r(t)))})),rn=(e,t=!0)=>!(!t||"prompt"!==e)||"granted"===e,nn=(e,t)=>{if(!e||!t)return[];const r=[];let n;for(;null!==(n=t.exec(e));)r.push(n[1]);return r};var on={dataURLtoFile:(e,t)=>{let r=e.split(","),n=r[0].match(/:(.*?);/)[1],o=window.atob(r[1]),i=o.length,s=new Uint8Array(i);for(;i--;)s[i]=o.charCodeAt(i);return new File([s],t,{type:n})},dataURLtoBlob:e=>{let t=e.split(","),r=t[0].match(/:(.*?);/)[1],n=window.atob(t[1]),o=n.length,i=new Uint8Array(o);for(;o--;)i[o]=n.charCodeAt(o);return new Blob([i],{type:r})},blobToFile:(e,t)=>(e.lastModifiedDate=new Date,e.name=t,e),readAsDataURL:(e,t)=>{var r=new FileReader;r.readAsDataURL(e),r.onloadend=function(e){t&&t(e.target?.result)}},downloadUrl:Gr,download:(e,t="")=>{e&&("string"!=typeof e?Xr(e,t):Gr(e,t))},downloadFile:Xr,downloadImage:e=>{try{if(!e)return;const t=e.match(/\/(\w+.\w+)$/)[1],r=new Image;r.onload=()=>{let e=document.createElement("canvas");e.width=r.width,e.height=r.height;let n=e.getContext("2d");n&&n.drawImage(r,0,0,r.width,r.height);let o=e.toDataURL();Gr(o,t)},r.src=e,r.setAttribute("crossOrigin","Anonymous")}catch(e){console.error("[ddan] downloadImage",e)}return Promise.resolve()},watermark:(e,{width:t=400,height:r=300,angle:n=0,fillStyle:o="rgba(0, 0, 0, 0.2)",font:i="16px Arial",textAlign:s="left",textBaseline:a="middle"}={})=>{try{if(!e)return"";const u=document.createElement("canvas");u.width=t,u.height=r;const l=u.getContext("2d");return l?(n&&l.rotate(n*Math.PI/180),o&&(l.fillStyle=o),i&&(l.font=i),s&&(l.textAlign=s),a&&(l.textBaseline=a),l.fillText(e,u.width/10,u.height/2),`url(${u.toDataURL()})`):""}catch(e){return console.error("[ddan] watermark",e),""}},copyText:(e,t=!1)=>new Promise((r=>{!t&&navigator.clipboard?tn("clipboard-write").then((t=>{rn(t,!1)?navigator.clipboard.writeText(e).then((()=>r(!0))).catch((()=>r(en(e)))):r(en(e))})).catch((()=>{r(en(e))})):r(en(e))})),queryPermission:tn,isAllowed:rn,legacyCopy:en,takeHtmlLinks:e=>{if(!e)return[];const t=[];return[/<script[^>]+src="([^"]+)"/g,/<link[^>]+rel="stylesheet"[^>]+href="([^"]+)"/g,/<link[^>]+rel="icon"[^>]+href="([^"]+)"/g].forEach((r=>{const n=nn(e,r);t.push(n)})),[].concat(...t)},takeHtml:nn,toBlobUrl:(e,t)=>{const r=new Blob([e],{type:t});return URL.createObjectURL(r)}};class sn{list=[];constructor(){this.invoke=this.invoke.bind(this)}use(e){this.list=this.list.concat(e)}invoke(e){return this.list.reduce(((e,t)=>e.then((e=>t(e)))),Promise.resolve(e)).catch((e=>"REFETCH"===e.sig?Promise.resolve(e.result):Promise.reject(e)))}}const an=({url:e,options:t})=>{const r={"Content-Type":"application/json; charset=utf-8",...t.headers||{}};return t.headers=r,new Promise(((r,n)=>{fetch(e,t).then((e=>{r(e.json())})).catch((e=>{n(e)}))}))};function un(e){const{response:t}=e;return 0===t.code?Promise.resolve(t):Promise.reject(t)}function ln(e){const{url:t="",host:r,options:n}=e,o=e;if(t.startsWith("http://")||t.startsWith("https://")||(o.url=(r||"")+t),"GET"===n.method.toUpperCase()&&n.body){const e=JSON.parse(n.body);if(lt.isPlainObject(e)){const r=bt.stringify(e),n=-1===t.indexOf("?")?"?":"&";o.url=`${o.url||""}${n}${r}`,delete o.options.body}}return n&&n.plugins&&delete o.options?.plugins,n&&n.model&&delete o.options?.model,o}class cn{host="";reqConfig={};handleError;interceptors={request:new sn,response:new sn};constructor(e){this.host=e.host||"",this.reqConfig=e.config,this.interceptors.request.use(e.handleRequest||[]),this.interceptors.request.use(ln),this.interceptors.response.use(e.handleResponse||un),this.handleError=e.handleError}static blockId="blockid";static requestLock={};lockR(e,t){cn.requestLock[e]={lock:!0,request:t()}}unlockR(e){delete cn.requestLock[e]}getIdFromReq(e){const{url:t,data:r={}}=e;return t+JSON.stringify(r)}getIdFromReqUrl(e){return e.url||""}async fetch(e,t){const r=lt.copy(this.reqConfig[e])||{},n={host:this.host,url:r.url||"",options:{...r||{},body:JSON.stringify({...t||{}})}};try{const o=await this.interceptors.request.invoke(n);let i;if(delete o.options.plugins,"block"===r.model)this.lockR(cn.blockId,(()=>an(o))),i=await cn.requestLock[cn.blockId].request;else if(cn.requestLock[cn.blockId]&&cn.requestLock[cn.blockId].lock&&await cn.requestLock[cn.blockId].request,"debounce"===r.model||"debounceUrl"===r.model){let e;e="debounceUrl"===r.model?this.getIdFromReqUrl(o):this.getIdFromReq(o),cn.requestLock[e]||this.lockR(e,(()=>an(o))),i=await cn.requestLock[e].request,this.unlockR(e)}else i=await an(o);return this.interceptors.response.invoke({response:i,config:r,refetch:()=>({sig:"REFETCH",result:this.fetch(e,t)})})}catch(e){return this.handleError&&this.handleError(e),Promise.reject(e)}}}const fn={fetch:Jr,Http:cn,css:Yr,qs:bt,icon:M,html:on};export{fn as default};
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
declare const dUtils: {
|
|
2
|
+
Event: {
|
|
3
|
+
new (type: string, eventInitDict?: EventInit | undefined): Event;
|
|
4
|
+
prototype: Event;
|
|
5
|
+
readonly NONE: 0;
|
|
6
|
+
readonly CAPTURING_PHASE: 1;
|
|
7
|
+
readonly AT_TARGET: 2;
|
|
8
|
+
readonly BUBBLING_PHASE: 3;
|
|
9
|
+
};
|
|
10
|
+
includes: typeof import("../util/includes").default;
|
|
11
|
+
forof: (source: any, cb: (key: any, val: any) => void) => void;
|
|
12
|
+
singleton: <T>() => {
|
|
13
|
+
new (): {};
|
|
14
|
+
__instance__: any;
|
|
15
|
+
readonly Instance: T;
|
|
16
|
+
readonly I: T;
|
|
17
|
+
};
|
|
18
|
+
getset: <T_1 = any>(t?: T_1 | undefined) => import("..").Ddan.IGetset<T_1>;
|
|
19
|
+
copy: (source: any, options?: {
|
|
20
|
+
fields?: string[] | undefined;
|
|
21
|
+
camel?: boolean | undefined;
|
|
22
|
+
pure?: boolean | undefined;
|
|
23
|
+
} & import("..").Ddan.IIgnoreParams) => any;
|
|
24
|
+
clone: (source: any) => any;
|
|
25
|
+
merge: (target: any, source: any, options?: import("..").Ddan.IIgnoreParams) => {};
|
|
26
|
+
isEmpty: (source: any) => boolean;
|
|
27
|
+
parseValue: (source: any, { number, boolean }?: {
|
|
28
|
+
number?: boolean | undefined;
|
|
29
|
+
boolean?: boolean | undefined;
|
|
30
|
+
}) => any;
|
|
31
|
+
cloneClass: <T_2>(source: T_2) => T_2;
|
|
32
|
+
combine: (target: any, source: any, options?: import("..").Ddan.IIgnoreParams) => any;
|
|
33
|
+
combines: (objs: any[], options?: import("..").Ddan.IIgnoreParams) => {};
|
|
34
|
+
observe: (obj: any, key: any, watchFun: any, owner: any, deep?: boolean) => void;
|
|
35
|
+
find: (obj: any, cb: (k: string, v: any) => boolean) => [string, unknown] | undefined;
|
|
36
|
+
getTag: (value: any) => string;
|
|
37
|
+
getType: (value: any) => string;
|
|
38
|
+
toString: () => string;
|
|
39
|
+
hasOwnProperty: (v: PropertyKey) => boolean;
|
|
40
|
+
propertyIsEnumerable: (v: PropertyKey) => boolean;
|
|
41
|
+
is: (val: any, type: string) => boolean;
|
|
42
|
+
isNumber: (value: any) => boolean;
|
|
43
|
+
isString: (value: any) => boolean;
|
|
44
|
+
isObject: (value: any) => boolean;
|
|
45
|
+
isObjectLike: (value: any) => boolean;
|
|
46
|
+
isPlainObject: (value: any) => boolean;
|
|
47
|
+
isSymbol: (value: any) => boolean;
|
|
48
|
+
isFunction: (value: any) => boolean;
|
|
49
|
+
isArray: (arg: any) => arg is any[];
|
|
50
|
+
isArrayLikeObject: (value: any) => boolean;
|
|
51
|
+
isIndex: (value: any, length: number) => boolean;
|
|
52
|
+
isArrayLike: (value: any) => boolean;
|
|
53
|
+
isPrototype: (value: any) => boolean;
|
|
54
|
+
isArguments: (value: any) => boolean;
|
|
55
|
+
isPromise: (value: any) => boolean;
|
|
56
|
+
isBrowser: boolean;
|
|
57
|
+
isNode: boolean;
|
|
58
|
+
isBlobOrBuffer: (data: any) => boolean;
|
|
59
|
+
isUint8Array: (data: any) => boolean;
|
|
60
|
+
isArrayBuffer: (data: any) => boolean;
|
|
61
|
+
base64: {
|
|
62
|
+
encode: (input: string) => string;
|
|
63
|
+
decode: (base64Str: string) => string;
|
|
64
|
+
encodeByOss: (input: string) => string;
|
|
65
|
+
};
|
|
66
|
+
tea: {
|
|
67
|
+
TEAKey: string;
|
|
68
|
+
encrypt: (v: Uint32Array, teaKey: Uint32Array) => Uint32Array;
|
|
69
|
+
decrypt: (v: Uint32Array, teaKey: Uint32Array) => Uint32Array;
|
|
70
|
+
toTeaKey: (str: string) => Uint32Array;
|
|
71
|
+
encode: (plaintext: string, key: string) => string;
|
|
72
|
+
decode: (ciphertext: string, key: string) => string;
|
|
73
|
+
encodeBytes: (plainbytes: Uint8Array, key: string) => Uint8Array;
|
|
74
|
+
decodeBytes: (cipherbytes: Uint8Array, key: string) => Uint8Array;
|
|
75
|
+
};
|
|
76
|
+
uuid: (len?: number, radix?: number) => string;
|
|
77
|
+
guid: (len: number, prefix?: boolean, sep?: string) => string;
|
|
78
|
+
getHexString: (len: number) => string;
|
|
79
|
+
keyNumber: string;
|
|
80
|
+
keyLower: string;
|
|
81
|
+
keyUpper: string;
|
|
82
|
+
keyChars: string;
|
|
83
|
+
str2ab: (content?: string, base64?: boolean) => ArrayBuffer;
|
|
84
|
+
ab2str: (data: ArrayBuffer, base64?: boolean) => string;
|
|
85
|
+
utf8ToBase64: (str: string) => string;
|
|
86
|
+
base64ToUtf8: (base64Str: string) => string;
|
|
87
|
+
getRandomBytes: (length: number) => Uint8Array;
|
|
88
|
+
textEncode: (text: string) => Uint8Array;
|
|
89
|
+
textDecode: (buf: ArrayBufferLike) => string;
|
|
90
|
+
toDataUrl: (textOrBuf: string | ArrayBuffer, contentType?: string) => string;
|
|
91
|
+
md5: (input: string | Uint8Array) => string;
|
|
92
|
+
md5Base64: (input: string | Uint8Array) => string;
|
|
93
|
+
toBase64: (input?: string) => string;
|
|
94
|
+
fromBase64: (input?: string) => string;
|
|
95
|
+
bytesToBase64: (bytes: Uint8Array) => string;
|
|
96
|
+
base64ToBytes: (input?: string) => Uint8Array;
|
|
97
|
+
toUtf8: (content: string) => string;
|
|
98
|
+
fromUtf8: (utftext: string) => string;
|
|
99
|
+
toUtf8Bytes: (content: string) => Uint8Array;
|
|
100
|
+
fromUtf8Bytes: (utf8Bytes: Uint8Array) => string;
|
|
101
|
+
pkcs7Padding: (plaintext: Uint8Array, blockSize: number) => Uint8Array;
|
|
102
|
+
pkcs7Unpadding: (ciphertext: Uint8Array) => Uint8Array;
|
|
103
|
+
bytes2str: (bytes: Uint8Array) => string;
|
|
104
|
+
str2bytes: (str?: string) => Uint8Array;
|
|
105
|
+
str2hex: (str: string) => string;
|
|
106
|
+
hex2str: (hexstr: string) => string;
|
|
107
|
+
concatBytes: (...args: Uint8Array[]) => Uint8Array;
|
|
108
|
+
uint32ToBytes: (uint32: Uint32Array) => Uint8Array;
|
|
109
|
+
bytesToUint32: (bytes: Uint8Array) => Uint32Array;
|
|
110
|
+
hex2bytes: (hex: string) => Uint8Array;
|
|
111
|
+
bytes2hex: (bytes: Uint8Array) => string;
|
|
112
|
+
toUint32: (str: string) => Uint32Array;
|
|
113
|
+
fromUint32: (uint32: Uint32Array) => string;
|
|
114
|
+
flatten: <T_3>(data: T_3[], recursive?: boolean, list?: T_3[]) => T_3[];
|
|
115
|
+
gbk: {
|
|
116
|
+
gbkLength: (str: string) => number;
|
|
117
|
+
gbkCut: (source: string, len: number) => string;
|
|
118
|
+
};
|
|
119
|
+
math: {
|
|
120
|
+
random: (max: number) => number;
|
|
121
|
+
randomRange: (min: number, max: number) => number;
|
|
122
|
+
lerp: (start: number, end: number, t: number) => number;
|
|
123
|
+
randoms: (max: number, count?: number, repeat?: boolean) => number[];
|
|
124
|
+
strip: (num: string | number, digits?: number) => number;
|
|
125
|
+
float: (num: string | number, { digits, fixed }?: {
|
|
126
|
+
digits?: number | undefined;
|
|
127
|
+
fixed?: boolean | undefined;
|
|
128
|
+
}) => number;
|
|
129
|
+
radian2degree: (radians: number) => number;
|
|
130
|
+
degree2radian: (degrees: number) => number;
|
|
131
|
+
calcDataSize: (data: number) => {
|
|
132
|
+
gb: number;
|
|
133
|
+
mb: number;
|
|
134
|
+
kb: number;
|
|
135
|
+
b: number;
|
|
136
|
+
total: number;
|
|
137
|
+
desc: string;
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
list: {
|
|
141
|
+
stepAction: <T_4>(list: T_4[], func: import("..").Ddan.Task<T_4, void>, stepCount?: number) => void;
|
|
142
|
+
skip: <T_5>(list: T_5[], count: number) => T_5[];
|
|
143
|
+
take: <T_6>(list: T_6[], count: number, skip?: number) => T_6[];
|
|
144
|
+
distinct: <T_7>(list: T_7[]) => T_7[];
|
|
145
|
+
randoms: <T_8>(list: T_8[], count?: number, repeat?: boolean) => T_8[];
|
|
146
|
+
toKV: (list: import("..").Ddan.KV<any>[], key: string, value: string) => import("..").Ddan.KV<any>;
|
|
147
|
+
groupBy: <T_9>(list: T_9[], key: string) => Record<string, T_9[]>;
|
|
148
|
+
first: <T_10>(list: T_10[]) => T_10 | undefined;
|
|
149
|
+
last: <T_11>(list: T_11[]) => T_11 | undefined;
|
|
150
|
+
toList: <T_12>(val: T_12 | T_12[]) => T_12[];
|
|
151
|
+
};
|
|
152
|
+
string: {
|
|
153
|
+
toString: (value: any) => any;
|
|
154
|
+
startCase: (string: any) => any;
|
|
155
|
+
snakeCase: (string: any) => any;
|
|
156
|
+
kebabCase: (string: any) => any;
|
|
157
|
+
camelCase: (string: any) => any;
|
|
158
|
+
upperCase: (string: any) => any;
|
|
159
|
+
upperFirst: (string: any) => any;
|
|
160
|
+
lowerCase: (string: any) => any;
|
|
161
|
+
lowerFirst: (string: any) => any;
|
|
162
|
+
splitOnFirst: (string: any, separator: any) => string[];
|
|
163
|
+
parseValue: (value?: any, { number, boolean }?: {
|
|
164
|
+
number?: boolean | undefined;
|
|
165
|
+
boolean?: boolean | undefined;
|
|
166
|
+
}) => any;
|
|
167
|
+
replace: (source: string, rules: import("..").Ddan.IRegexRule | import("..").Ddan.IRegexRule[]) => string;
|
|
168
|
+
jsonFormat: (jsonString: string) => string;
|
|
169
|
+
toLines: (content: string, separator?: string | RegExp) => string[];
|
|
170
|
+
};
|
|
171
|
+
time: {
|
|
172
|
+
now: () => import("../modules/time/dtime").default;
|
|
173
|
+
isToday: (date: any) => any;
|
|
174
|
+
parseTimestamp: ({ year, month, date, hour, minute, second }: {
|
|
175
|
+
year?: number | undefined;
|
|
176
|
+
month?: number | undefined;
|
|
177
|
+
date?: number | undefined;
|
|
178
|
+
hour?: number | undefined;
|
|
179
|
+
minute?: number | undefined;
|
|
180
|
+
second?: number | undefined;
|
|
181
|
+
}) => number;
|
|
182
|
+
todayZero: () => number;
|
|
183
|
+
format: (time: string | number | Date, reg?: string) => string;
|
|
184
|
+
countdown: (endTime: string | number | Date, reg?: string) => "" | import("..").Ddan.ICountdown;
|
|
185
|
+
dtime: (time: string | number | Date) => import("../modules/time/dtime").default;
|
|
186
|
+
loopFrame: (interval?: number) => import("../modules/time/frame").default;
|
|
187
|
+
getTimezoneOffset: () => number;
|
|
188
|
+
getLocalTime: typeof import("../modules/time/dtime").default.getLocalTime;
|
|
189
|
+
oneDay: number;
|
|
190
|
+
oneHour: number;
|
|
191
|
+
oneMinute: number;
|
|
192
|
+
oneSecond: number;
|
|
193
|
+
};
|
|
194
|
+
obj: {
|
|
195
|
+
copy: (source: any, options?: {
|
|
196
|
+
fields?: string[] | undefined;
|
|
197
|
+
camel?: boolean | undefined;
|
|
198
|
+
pure?: boolean | undefined;
|
|
199
|
+
} & import("..").Ddan.IIgnoreParams) => any;
|
|
200
|
+
clone: (source: any) => any;
|
|
201
|
+
merge: (target: any, source: any, options?: import("..").Ddan.IIgnoreParams) => {};
|
|
202
|
+
isEmpty: (source: any) => boolean;
|
|
203
|
+
parseValue: (source: any, { number, boolean }?: {
|
|
204
|
+
number?: boolean | undefined;
|
|
205
|
+
boolean?: boolean | undefined;
|
|
206
|
+
}) => any;
|
|
207
|
+
cloneClass: <T_2>(source: T_2) => T_2;
|
|
208
|
+
combine: (target: any, source: any, options?: import("..").Ddan.IIgnoreParams) => any;
|
|
209
|
+
combines: (objs: any[], options?: import("..").Ddan.IIgnoreParams) => {};
|
|
210
|
+
observe: (obj: any, key: any, watchFun: any, owner: any, deep?: boolean) => void;
|
|
211
|
+
find: (obj: any, cb: (k: string, v: any) => boolean) => [string, unknown] | undefined;
|
|
212
|
+
};
|
|
213
|
+
rule: {
|
|
214
|
+
validateId: (content: any) => boolean;
|
|
215
|
+
validatePhone: (content: any) => boolean;
|
|
216
|
+
validator: (rules: import("../modules/rule/async-validator").Rules) => import("../modules/rule/async-validator").default;
|
|
217
|
+
validate: (rules: import("../modules/rule/async-validator").Rules, source_: import("../modules/rule/async-validator").Values, o?: any, oc?: any) => Promise<import("../modules/rule/async-validator").Values>;
|
|
218
|
+
isChinese: (content: string) => boolean;
|
|
219
|
+
isNumber: (content: string) => boolean;
|
|
220
|
+
isFloat: (content: string) => boolean;
|
|
221
|
+
isPhoneNumber: (content: any) => boolean;
|
|
222
|
+
};
|
|
223
|
+
regex: {
|
|
224
|
+
pattern: {
|
|
225
|
+
num: string;
|
|
226
|
+
zh: string;
|
|
227
|
+
en: string;
|
|
228
|
+
};
|
|
229
|
+
regex: (patt: string, modifiers?: "i" | "g" | "m" | undefined) => RegExp;
|
|
230
|
+
entire: {
|
|
231
|
+
chinese: RegExp;
|
|
232
|
+
real: RegExp;
|
|
233
|
+
cssReal: RegExp;
|
|
234
|
+
id: RegExp;
|
|
235
|
+
yyyyMMdd: RegExp;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
export default dUtils;
|