w-serv-orm 1.0.13 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -14
- package/dist/w-serv-orm.umd.js +2 -2
- package/dist/w-serv-orm.umd.js.map +1 -1
- package/docs/WServOrm.html +6 -7
- package/docs/WServOrm.mjs.html +21 -18
- package/docs/index.html +1 -1
- package/g-mOrm.mjs +16 -13
- package/package.json +3 -3
- package/src/WServOrm.mjs +20 -17
- package/src/getMapOrm.mjs +1 -1
- package/src/getProc.mjs +16 -16
package/README.md
CHANGED
|
@@ -20,29 +20,31 @@ npm i w-serv-orm
|
|
|
20
20
|
#### Example for server:
|
|
21
21
|
> **Link:** [[dev source code](https://github.com/yuda-lyu/w-serv-orm/blob/master/g-mOrm.mjs)]
|
|
22
22
|
```alias
|
|
23
|
-
import WOrm from 'w-orm-mongodb/src/WOrmMongodb.mjs' //自行選擇引用ORM
|
|
23
|
+
// import WOrm from 'w-orm-mongodb/src/WOrmMongodb.mjs' //自行選擇引用ORM
|
|
24
|
+
import WOrm from 'w-orm-lowdb/src/WOrmLowdb.mjs' //自行選擇引用ORM
|
|
24
25
|
import ds from './schema/index.mjs' //先行建置schema
|
|
25
26
|
import WServOrm from './src/WServOrm.mjs'
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
//st
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
28
|
+
// //st
|
|
29
|
+
// let st = {
|
|
30
|
+
// dbUsername: 'username',
|
|
31
|
+
// dbPassword: 'password',
|
|
32
|
+
// dbName: 'wservorm',
|
|
33
|
+
// dbIP: 'localhost',
|
|
34
|
+
// dbPort: 27017,
|
|
35
|
+
// }
|
|
36
36
|
|
|
37
37
|
//url, db
|
|
38
|
-
let url = `mongodb://${st.dbUsername}:${st.dbPassword}@${st.dbIP}:${st.dbPort}`
|
|
39
|
-
let db = st.dbName
|
|
38
|
+
// let url = `mongodb://${st.dbUsername}:${st.dbPassword}@${st.dbIP}:${st.dbPort}`
|
|
39
|
+
// let db = st.dbName
|
|
40
|
+
let url = './db.json'
|
|
41
|
+
let db = 'worm'
|
|
40
42
|
|
|
41
43
|
//WServOrm
|
|
42
44
|
let opt = {
|
|
43
45
|
getUserById: null,
|
|
44
|
-
|
|
45
|
-
|
|
46
|
+
useCheckUser: false,
|
|
47
|
+
useExcludeWhenNotAdmin: false,
|
|
46
48
|
}
|
|
47
49
|
let r = WServOrm(ds, WOrm, url, db, opt)
|
|
48
50
|
console.log(r) //回傳server用orm相關函數
|
|
@@ -71,4 +73,6 @@ console.log(r) //回傳server用orm相關函數
|
|
|
71
73
|
// addFunPostProcessing: [Function: addFunPostProcessing],
|
|
72
74
|
// procOrm: [AsyncFunction: procOrm]
|
|
73
75
|
// }
|
|
76
|
+
|
|
77
|
+
// export default r
|
|
74
78
|
```
|
package/dist/w-serv-orm.umd.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* w-serv-orm v1.0.
|
|
2
|
+
* w-serv-orm v1.0.15
|
|
3
3
|
* (c) 2018-2021 yuda-lyu(semisphere)
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
6
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("fs")):"function"==typeof define&&define.amd?define(["fs"],e):(t="undefined"!=typeof globalThis?globalThis:t||self)["w-serv-orm"]=e(t.fs)}(this,(function(t){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===e(r)?r:String(r)}function n(t,e,n){return(e=r(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o="object"==typeof global&&global&&global.Object===Object&&global,i="object"==typeof self&&self&&self.Object===Object&&self,a=o||i||Function("return this")(),u=a.Symbol;function s(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var c=Array.isArray,l=Object.prototype,f=l.hasOwnProperty,d=l.toString,p=u?u.toStringTag:void 0;var h=Object.prototype.toString;var g="[object Null]",v="[object Undefined]",b=u?u.toStringTag:void 0;function y(t){return null==t?void 0===t?v:g:b&&b in Object(t)?function(t){var e=f.call(t,p),r=t[p];try{t[p]=void 0;var n=!0}catch(t){}var o=d.call(t);return n&&(e?t[p]=r:delete t[p]),o}(t):function(t){return h.call(t)}(t)}function m(t){return null!=t&&"object"==typeof t}var w="[object Symbol]";function j(t){return"symbol"==typeof t||m(t)&&y(t)==w}var _=1/0,O=u?u.prototype:void 0,x=O?O.toString:void 0;function A(t){if("string"==typeof t)return t;if(c(t))return s(t,A)+"";if(j(t))return x?x.call(t):"";var e=t+"";return"0"==e&&1/t==-_?"-0":e}var S=/\s/;var k=/^\s+/;function $(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&S.test(t.charAt(e)););return e}(t)+1).replace(k,""):t}function I(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}function T(t){return t!=t}function D(t,e,r){return e==e?function(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}(t,e,r):function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}(t,T,r)}var P=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function M(t){return P.test(t)}var C="\\ud800-\\udfff",z="["+C+"]",E="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",L="\\ud83c[\\udffb-\\udfff]",F="[^"+C+"]",U="(?:\\ud83c[\\udde6-\\uddff]){2}",W="[\\ud800-\\udbff][\\udc00-\\udfff]",B="(?:"+E+"|"+L+")"+"?",N="[\\ufe0e\\ufe0f]?",V=N+B+("(?:\\u200d(?:"+[F,U,W].join("|")+")"+N+B+")*"),H="(?:"+[F+E+"?",E,U,W,z].join("|")+")",Y=RegExp(L+"(?="+L+")|"+H+V,"g");function R(t){return M(t)?function(t){return t.match(Y)||[]}(t):function(t){return t.split("")}(t)}function q(t){return null==t?"":A(t)}function Z(t,e,r){if((t=q(t))&&(r||void 0===e))return $(t);if(!t||!(e=A(e)))return t;var n=R(t),o=R(e),i=function(t,e){for(var r=-1,n=t.length;++r<n&&D(e,t[r],0)>-1;);return r}(n,o),a=function(t,e){for(var r=t.length;r--&&D(e,t[r],0)>-1;);return r}(n,o)+1;return function(t,e,r){var n=t.length;return r=void 0===r?n:r,!e&&r>=n?t:I(t,e,r)}(n,i,a).join("")}var J=Object.prototype;function X(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||J)}function G(t,e){return function(r){return t(e(r))}}var Q=G(Object.keys,Object),K=Object.prototype.hasOwnProperty;function tt(t){if(!X(t))return Q(t);var e=[];for(var r in Object(t))K.call(t,r)&&"constructor"!=r&&e.push(r);return e}function et(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var rt="[object AsyncFunction]",nt="[object Function]",ot="[object GeneratorFunction]",it="[object Proxy]";function at(t){if(!et(t))return!1;var e=y(t);return e==nt||e==ot||e==rt||e==it}var ut,st=a["__core-js_shared__"],ct=(ut=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||""))?"Symbol(src)_1."+ut:"";var lt=Function.prototype.toString;function ft(t){if(null!=t){try{return lt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var dt=/^\[object .+?Constructor\]$/,pt=Function.prototype,ht=Object.prototype,gt=pt.toString,vt=ht.hasOwnProperty,bt=RegExp("^"+gt.call(vt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yt(t){return!(!et(t)||(e=t,ct&&ct in e))&&(at(t)?bt:dt).test(ft(t));var e}function mt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return yt(r)?r:void 0}var wt=mt(a,"DataView"),jt=mt(a,"Map"),_t=mt(a,"Promise"),Ot=mt(a,"Set"),xt=mt(a,"WeakMap"),At="[object Map]",St="[object Promise]",kt="[object Set]",$t="[object WeakMap]",It="[object DataView]",Tt=ft(wt),Dt=ft(jt),Pt=ft(_t),Mt=ft(Ot),Ct=ft(xt),zt=y;(wt&&zt(new wt(new ArrayBuffer(1)))!=It||jt&&zt(new jt)!=At||_t&&zt(_t.resolve())!=St||Ot&&zt(new Ot)!=kt||xt&&zt(new xt)!=$t)&&(zt=function(t){var e=y(t),r="[object Object]"==e?t.constructor:void 0,n=r?ft(r):"";if(n)switch(n){case Tt:return It;case Dt:return At;case Pt:return St;case Mt:return kt;case Ct:return $t}return e});var Et=zt,Lt=9007199254740991;function Ft(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Lt}function Ut(t){return null!=t&&Ft(t.length)&&!at(t)}var Wt="[object String]";function Bt(t){return function(e){return null==e?void 0:e[t]}}var Nt=Bt("length"),Vt="\\ud800-\\udfff",Ht="["+Vt+"]",Yt="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Rt="\\ud83c[\\udffb-\\udfff]",qt="[^"+Vt+"]",Zt="(?:\\ud83c[\\udde6-\\uddff]){2}",Jt="[\\ud800-\\udbff][\\udc00-\\udfff]",Xt="(?:"+Yt+"|"+Rt+")"+"?",Gt="[\\ufe0e\\ufe0f]?",Qt=Gt+Xt+("(?:\\u200d(?:"+[qt,Zt,Jt].join("|")+")"+Gt+Xt+")*"),Kt="(?:"+[qt+Yt+"?",Yt,Zt,Jt,Ht].join("|")+")",te=RegExp(Rt+"(?="+Rt+")|"+Kt+Qt,"g");function ee(t){return M(t)?function(t){for(var e=te.lastIndex=0;te.test(t);)++e;return e}(t):Nt(t)}var re="[object Map]",ne="[object Set]";function oe(t){if(null==t)return 0;if(Ut(t))return"string"==typeof(e=t)||!c(e)&&m(e)&&y(e)==Wt?ee(t):t.length;var e,r=Et(t);return r==re||r==ne?t.size:tt(t).length}var ie=NaN,ae=/^[-+]0x[0-9a-f]+$/i,ue=/^0b[01]+$/i,se=/^0o[0-7]+$/i,ce=parseInt;var le=1/0,fe=17976931348623157e292;function de(t){return t?(t=function(t){if("number"==typeof t)return t;if(j(t))return ie;if(et(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=et(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=$(t);var r=ue.test(t);return r||se.test(t)?ce(t.slice(2),r?2:8):ae.test(t)?ie:+t}(t))===le||t===-le?(t<0?-1:1)*fe:t==t?t:0:0===t?t:0}function pe(t,e,r){var n,o,i=null==t?0:t.length;return i?I(t,(e=r||void 0===e?1:(n=de(e),o=n%1,n==n?o?n-o:n:0))<0?0:e,i):[]}function he(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}var ge,ve=function(t,e,r){for(var n=-1,o=Object(t),i=r(t),a=i.length;a--;){var u=i[ge?a:++n];if(!1===e(o[u],u,o))break}return t};function be(t){return m(t)&&"[object Arguments]"==y(t)}var ye=Object.prototype,me=ye.hasOwnProperty,we=ye.propertyIsEnumerable,je=be(function(){return arguments}())?be:function(t){return m(t)&&me.call(t,"callee")&&!we.call(t,"callee")},_e=je;var Oe="object"==typeof exports&&exports&&!exports.nodeType&&exports,xe=Oe&&"object"==typeof module&&module&&!module.nodeType&&module,Ae=xe&&xe.exports===Oe?a.Buffer:void 0,Se=(Ae?Ae.isBuffer:void 0)||function(){return!1},ke=9007199254740991,$e=/^(?:0|[1-9]\d*)$/;function Ie(t,e){var r=typeof t;return!!(e=null==e?ke:e)&&("number"==r||"symbol"!=r&&$e.test(t))&&t>-1&&t%1==0&&t<e}var Te={};function De(t){return function(e){return t(e)}}Te["[object Float32Array]"]=Te["[object Float64Array]"]=Te["[object Int8Array]"]=Te["[object Int16Array]"]=Te["[object Int32Array]"]=Te["[object Uint8Array]"]=Te["[object Uint8ClampedArray]"]=Te["[object Uint16Array]"]=Te["[object Uint32Array]"]=!0,Te["[object Arguments]"]=Te["[object Array]"]=Te["[object ArrayBuffer]"]=Te["[object Boolean]"]=Te["[object DataView]"]=Te["[object Date]"]=Te["[object Error]"]=Te["[object Function]"]=Te["[object Map]"]=Te["[object Number]"]=Te["[object Object]"]=Te["[object RegExp]"]=Te["[object Set]"]=Te["[object String]"]=Te["[object WeakMap]"]=!1;var Pe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Me=Pe&&"object"==typeof module&&module&&!module.nodeType&&module,Ce=Me&&Me.exports===Pe&&o.process,ze=function(){try{var t=Me&&Me.require&&Me.require("util").types;return t||Ce&&Ce.binding&&Ce.binding("util")}catch(t){}}(),Ee=ze&&ze.isTypedArray,Le=Ee?De(Ee):function(t){return m(t)&&Ft(t.length)&&!!Te[y(t)]},Fe=Object.prototype.hasOwnProperty;function Ue(t,e){var r=c(t),n=!r&&_e(t),o=!r&&!n&&Se(t),i=!r&&!n&&!o&&Le(t),a=r||n||o||i,u=a?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],s=u.length;for(var l in t)!e&&!Fe.call(t,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ie(l,s))||u.push(l);return u}function We(t){return Ut(t)?Ue(t):tt(t)}var Be=function(t,e){return function(r,n){if(null==r)return r;if(!Ut(r))return t(r,n);for(var o=r.length,i=e?o:-1,a=Object(r);(e?i--:++i<o)&&!1!==n(a[i],i,a););return r}}((function(t,e){return t&&ve(t,e,We)})),Ne=Be;function Ve(t){return t}function He(t,e){var r;return(c(t)?he:Ne)(t,"function"==typeof(r=e)?r:Ve)}function Ye(){let t,e,r=new Promise((function(){t=arguments[0],e=arguments[1]}));return r.resolve=t,r.reject=e,r}function Re(t){return"[object Array]"===Object.prototype.toString.call(t)}function qe(t){return"[object Object]"===Object.prototype.toString.call(t)}function Ze(t){let e=Object.prototype.toString.call(t);return"[object Function]"===e||"[object AsyncFunction]"===e}function Je(t,e){let r=Ye();if(!Re(t)&&!qe(t))return r.reject("rs is not an array or object"),r;let n=!1;if(qe(t)){n=!0;let e=[];He(t,((t,r)=>{e.push({k:r,v:t})})),t=e}Ze(e)||(e=function(t){return t});let o=-1,i=[];return t.reduce((function(t,r){return t.then((function(t){i.push(t),o+=1;let a=o,u=r;return n&&(a=r.k,u=r.v),Ze(e)?e(u,a):u}))}),Promise.resolve()).then((function(t){i.push(t),i=pe(i),r.resolve(i)})).catch((function(t){r.reject(t)})),r}function Xe(t){if(qe(t)){for(let e in t)return!0;return!1}return!1}var Ge="[object Boolean]";function Qe(t){return!0===(e=t)||!1===e||m(e)&&y(e)==Ge;var e}function Ke(t){return!(!function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)||""===t)}let tr={backup:async function(t){return await Je(t,(async(t,e)=>(console.log("backup...",e),{name:e,data:await t.select()})))},recover:async function(e,r,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(i=e,!t.existsSync(i)||t.lstatSync(i).isDirectory()||t.lstatSync(i).isSymbolicLink())throw console.log("fp",e),new Error("fp is not exist");var i;if(!Xe(r))throw console.log("woItems",r),new Error("invalid woItems");Ze(n)||(n=null),Qe(o)||(o=!1);let a=t.readFileSync(e,"utf8");a=Z(a);let u=function(t){if(!Ke(t))return{};let e={};try{e=JSON.parse(t)}catch(t){e={}}return e}(a);Ze(n)&&n(),await Je(u,(async t=>{console.log("recover...",t.name),o&&(console.log("needCreateStorage"),await r[t.name].createStorage());let e=null;return oe(t.data)>0&&(e=await r[t.name].insert(t.data)),e}))}};var er=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rr=/^\w*$/;function nr(t,e){if(c(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!j(t))||(rr.test(t)||!er.test(t)||null!=e&&t in Object(e))}var or=mt(Object,"create");var ir=Object.prototype.hasOwnProperty;var ar=Object.prototype.hasOwnProperty;function ur(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function sr(t,e){return t===e||t!=t&&e!=e}function cr(t,e){for(var r=t.length;r--;)if(sr(t[r][0],e))return r;return-1}ur.prototype.clear=function(){this.__data__=or?or(null):{},this.size=0},ur.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ur.prototype.get=function(t){var e=this.__data__;if(or){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return ir.call(e,t)?e[t]:void 0},ur.prototype.has=function(t){var e=this.__data__;return or?void 0!==e[t]:ar.call(e,t)},ur.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=or&&void 0===e?"__lodash_hash_undefined__":e,this};var lr=Array.prototype.splice;function fr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function dr(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function pr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}fr.prototype.clear=function(){this.__data__=[],this.size=0},fr.prototype.delete=function(t){var e=this.__data__,r=cr(e,t);return!(r<0)&&(r==e.length-1?e.pop():lr.call(e,r,1),--this.size,!0)},fr.prototype.get=function(t){var e=this.__data__,r=cr(e,t);return r<0?void 0:e[r][1]},fr.prototype.has=function(t){return cr(this.__data__,t)>-1},fr.prototype.set=function(t,e){var r=this.__data__,n=cr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},pr.prototype.clear=function(){this.size=0,this.__data__={hash:new ur,map:new(jt||fr),string:new ur}},pr.prototype.delete=function(t){var e=dr(this,t).delete(t);return this.size-=e?1:0,e},pr.prototype.get=function(t){return dr(this,t).get(t)},pr.prototype.has=function(t){return dr(this,t).has(t)},pr.prototype.set=function(t,e){var r=dr(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};var hr="Expected a function";function gr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(hr);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(gr.Cache||pr),r}gr.Cache=pr;var vr,br,yr,mr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wr=/\\(\\)?/g,jr=(vr=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(mr,(function(t,r,n,o){e.push(n?o.replace(wr,"$1"):r||t)})),e},br=gr(vr,(function(t){return 500===yr.size&&yr.clear(),t})),yr=br.cache,br),_r=jr;function Or(t,e){return c(t)?t:nr(t,e)?[t]:_r(q(t))}var xr=1/0;function Ar(t){if("string"==typeof t||j(t))return t;var e=t+"";return"0"==e&&1/t==-xr?"-0":e}function Sr(t,e){for(var r=0,n=(e=Or(e,t)).length;null!=t&&r<n;)t=t[Ar(e[r++])];return r&&r==n?t:void 0}function kr(t,e,r){var n=null==t?void 0:Sr(t,e);return void 0===n?r:n}function $r(t){var e=this.__data__=new fr(t);this.size=e.size}$r.prototype.clear=function(){this.__data__=new fr,this.size=0},$r.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},$r.prototype.get=function(t){return this.__data__.get(t)},$r.prototype.has=function(t){return this.__data__.has(t)},$r.prototype.set=function(t,e){var r=this.__data__;if(r instanceof fr){var n=r.__data__;if(!jt||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new pr(n)}return r.set(t,e),this.size=r.size,this};function Ir(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new pr;++e<r;)this.add(t[e])}function Tr(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function Dr(t,e){return t.has(e)}Ir.prototype.add=Ir.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Ir.prototype.has=function(t){return this.__data__.has(t)};var Pr=1,Mr=2;function Cr(t,e,r,n,o,i){var a=r&Pr,u=t.length,s=e.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(t),l=i.get(e);if(c&&l)return c==e&&l==t;var f=-1,d=!0,p=r&Mr?new Ir:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var h=t[f],g=e[f];if(n)var v=a?n(g,h,f,e,t,i):n(h,g,f,t,e,i);if(void 0!==v){if(v)continue;d=!1;break}if(p){if(!Tr(e,(function(t,e){if(!Dr(p,e)&&(h===t||o(h,t,r,n,i)))return p.push(e)}))){d=!1;break}}else if(h!==g&&!o(h,g,r,n,i)){d=!1;break}}return i.delete(t),i.delete(e),d}var zr=a.Uint8Array;function Er(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function Lr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var Fr=1,Ur=2,Wr="[object Boolean]",Br="[object Date]",Nr="[object Error]",Vr="[object Map]",Hr="[object Number]",Yr="[object RegExp]",Rr="[object Set]",qr="[object String]",Zr="[object Symbol]",Jr="[object ArrayBuffer]",Xr="[object DataView]",Gr=u?u.prototype:void 0,Qr=Gr?Gr.valueOf:void 0;function Kr(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function tn(t,e,r){var n=e(t);return c(t)?n:Kr(n,r(t))}function en(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i}function rn(){return[]}var nn=Object.prototype.propertyIsEnumerable,on=Object.getOwnPropertySymbols,an=on?function(t){return null==t?[]:(t=Object(t),en(on(t),(function(e){return nn.call(t,e)})))}:rn;function un(t){return tn(t,We,an)}var sn=1,cn=Object.prototype.hasOwnProperty;var ln=1,fn="[object Arguments]",dn="[object Array]",pn="[object Object]",hn=Object.prototype.hasOwnProperty;function gn(t,e,r,n,o,i){var a=c(t),u=c(e),s=a?dn:Et(t),l=u?dn:Et(e),f=(s=s==fn?pn:s)==pn,d=(l=l==fn?pn:l)==pn,p=s==l;if(p&&Se(t)){if(!Se(e))return!1;a=!0,f=!1}if(p&&!f)return i||(i=new $r),a||Le(t)?Cr(t,e,r,n,o,i):function(t,e,r,n,o,i,a){switch(r){case Xr:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Jr:return!(t.byteLength!=e.byteLength||!i(new zr(t),new zr(e)));case Wr:case Br:case Hr:return sr(+t,+e);case Nr:return t.name==e.name&&t.message==e.message;case Yr:case qr:return t==e+"";case Vr:var u=Er;case Rr:var s=n&Fr;if(u||(u=Lr),t.size!=e.size&&!s)return!1;var c=a.get(t);if(c)return c==e;n|=Ur,a.set(t,e);var l=Cr(u(t),u(e),n,o,i,a);return a.delete(t),l;case Zr:if(Qr)return Qr.call(t)==Qr.call(e)}return!1}(t,e,s,r,n,o,i);if(!(r&ln)){var h=f&&hn.call(t,"__wrapped__"),g=d&&hn.call(e,"__wrapped__");if(h||g){var v=h?t.value():t,b=g?e.value():e;return i||(i=new $r),o(v,b,r,n,i)}}return!!p&&(i||(i=new $r),function(t,e,r,n,o,i){var a=r&sn,u=un(t),s=u.length;if(s!=un(e).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in e:cn.call(e,l)))return!1}var f=i.get(t),d=i.get(e);if(f&&d)return f==e&&d==t;var p=!0;i.set(t,e),i.set(e,t);for(var h=a;++c<s;){var g=t[l=u[c]],v=e[l];if(n)var b=a?n(v,g,l,e,t,i):n(g,v,l,t,e,i);if(!(void 0===b?g===v||o(g,v,r,n,i):b)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var y=t.constructor,m=e.constructor;y==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,r,n,o,i))}function vn(t,e,r,n,o){return t===e||(null==t||null==e||!m(t)&&!m(e)?t!=t&&e!=e:gn(t,e,r,n,vn,o))}var bn=1,yn=2;function mn(t){return t==t&&!et(t)}function wn(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}function jn(t){var e=function(t){for(var e=We(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,mn(o)]}return e}(t);return 1==e.length&&e[0][2]?wn(e[0][0],e[0][1]):function(r){return r===t||function(t,e,r,n){var o=r.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var s=(u=r[o])[0],c=t[s],l=u[1];if(a&&u[2]){if(void 0===c&&!(s in t))return!1}else{var f=new $r;if(n)var d=n(c,l,s,t,e,f);if(!(void 0===d?vn(l,c,bn|yn,n,f):d))return!1}}return!0}(r,t,e)}}function _n(t,e){return null!=t&&e in Object(t)}function On(t,e){return null!=t&&function(t,e,r){for(var n=-1,o=(e=Or(e,t)).length,i=!1;++n<o;){var a=Ar(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&Ft(o)&&Ie(a,o)&&(c(t)||_e(t))}(t,e,_n)}var xn=1,An=2;function Sn(t){return nr(t)?Bt(Ar(t)):function(t){return function(e){return Sr(e,t)}}(t)}function kn(t){return"function"==typeof t?t:null==t?Ve:"object"==typeof t?c(t)?(e=t[0],r=t[1],nr(e)&&mn(r)?wn(Ar(e),r):function(t){var n=kr(t,e);return void 0===n&&n===r?On(t,e):vn(r,n,xn|An)}):jn(t):Sn(t);var e,r}function $n(t,e){var r=-1,n=Ut(t)?Array(t.length):[];return Ne(t,(function(t,o,i){n[++r]=e(t,o,i)})),n}function In(t,e){return(c(t)?s:$n)(t,kn(e))}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var Tn={};!function(t,e){t.exports=function(){var t=1e3,e=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",u="day",s="week",c="month",l="quarter",f="year",d="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},b=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},y={s:b,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),o=r%60;return(e<=0?"+":"-")+b(n,2,"0")+":"+b(o,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var n=12*(r.year()-e.year())+(r.month()-e.month()),o=e.clone().add(n,c),i=r-o<0,a=e.clone().add(n+(i?-1:1),c);return+(-(n+(r-o)/(i?o-a:a-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:f,w:s,d:u,D:d,h:a,m:i,s:o,ms:n,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},m="en",w={};w[m]=v;var j="$isDayjsObject",_=function(t){return t instanceof S||!(!t||!t[j])},O=function t(e,r,n){var o;if(!e)return m;if("string"==typeof e){var i=e.toLowerCase();w[i]&&(o=i),r&&(w[i]=r,o=i);var a=e.split("-");if(!o&&a.length>1)return t(a[0])}else{var u=e.name;w[u]=e,o=u}return!n&&o&&(m=o),o||!n&&m},x=function(t,e){if(_(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)},A=y;A.l=O,A.i=_,A.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function v(t){this.$L=O(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[j]=!0}var b=v.prototype;return b.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(A.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(h);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(e)}(t),this.init()},b.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},b.$utils=function(){return A},b.isValid=function(){return!(this.$d.toString()===p)},b.isSame=function(t,e){var r=x(t);return this.startOf(e)<=r&&r<=this.endOf(e)},b.isAfter=function(t,e){return x(t)<this.startOf(e)},b.isBefore=function(t,e){return this.endOf(e)<x(t)},b.$g=function(t,e,r){return A.u(t)?this[e]:this.set(r,t)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(t,e){var r=this,n=!!A.u(e)||e,l=A.p(t),p=function(t,e){var o=A.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return n?o:o.endOf(u)},h=function(t,e){return A.w(r.toDate()[t].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},g=this.$W,v=this.$M,b=this.$D,y="set"+(this.$u?"UTC":"");switch(l){case f:return n?p(1,0):p(31,11);case c:return n?p(1,v):p(0,v+1);case s:var m=this.$locale().weekStart||0,w=(g<m?g+7:g)-m;return p(n?b-w:b+(6-w),v);case u:case d:return h(y+"Hours",0);case a:return h(y+"Minutes",1);case i:return h(y+"Seconds",2);case o:return h(y+"Milliseconds",3);default:return this.clone()}},b.endOf=function(t){return this.startOf(t,!1)},b.$set=function(t,e){var r,s=A.p(t),l="set"+(this.$u?"UTC":""),p=(r={},r[u]=l+"Date",r[d]=l+"Date",r[c]=l+"Month",r[f]=l+"FullYear",r[a]=l+"Hours",r[i]=l+"Minutes",r[o]=l+"Seconds",r[n]=l+"Milliseconds",r)[s],h=s===u?this.$D+(e-this.$W):e;if(s===c||s===f){var g=this.clone().set(d,1);g.$d[p](h),g.init(),this.$d=g.set(d,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},b.set=function(t,e){return this.clone().$set(t,e)},b.get=function(t){return this[A.p(t)]()},b.add=function(n,l){var d,p=this;n=Number(n);var h=A.p(l),g=function(t){var e=x(p);return A.w(e.date(e.date()+Math.round(t*n)),p)};if(h===c)return this.set(c,this.$M+n);if(h===f)return this.set(f,this.$y+n);if(h===u)return g(1);if(h===s)return g(7);var v=(d={},d[i]=e,d[a]=r,d[o]=t,d)[h]||1,b=this.$d.getTime()+n*v;return A.w(b,this)},b.subtract=function(t,e){return this.add(-1*t,e)},b.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=t||"YYYY-MM-DDTHH:mm:ssZ",o=A.z(this),i=this.$H,a=this.$m,u=this.$M,s=r.weekdays,c=r.months,l=r.meridiem,f=function(t,r,o,i){return t&&(t[r]||t(e,n))||o[r].slice(0,i)},d=function(t){return A.s(i%12||12,t,"0")},h=l||function(t,e,r){var n=t<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(g,(function(t,n){return n||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return A.s(e.$y,4,"0");case"M":return u+1;case"MM":return A.s(u+1,2,"0");case"MMM":return f(r.monthsShort,u,c,3);case"MMMM":return f(c,u);case"D":return e.$D;case"DD":return A.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return f(r.weekdaysMin,e.$W,s,2);case"ddd":return f(r.weekdaysShort,e.$W,s,3);case"dddd":return s[e.$W];case"H":return String(i);case"HH":return A.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return h(i,a,!0);case"A":return h(i,a,!1);case"m":return String(a);case"mm":return A.s(a,2,"0");case"s":return String(e.$s);case"ss":return A.s(e.$s,2,"0");case"SSS":return A.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(n,d,p){var h,g=this,v=A.p(d),b=x(n),y=(b.utcOffset()-this.utcOffset())*e,m=this-b,w=function(){return A.m(g,b)};switch(v){case f:h=w()/12;break;case c:h=w();break;case l:h=w()/3;break;case s:h=(m-y)/6048e5;break;case u:h=(m-y)/864e5;break;case a:h=m/r;break;case i:h=m/e;break;case o:h=m/t;break;default:h=m}return p?h:A.a(h)},b.daysInMonth=function(){return this.endOf(c).$D},b.$locale=function(){return w[this.$L]},b.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),n=O(t,e,!0);return n&&(r.$L=n),r},b.clone=function(){return A.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},v}(),k=S.prototype;return x.prototype=k,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",u],["$M",c],["$y",f],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,S,x),t.$i=!0),x},x.locale=O,x.isDayjs=_,x.unix=function(t){return x(1e3*t)},x.en=w[m],x.Ls=w,x.p={},x}()}({get exports(){return Tn},set exports(t){Tn=t}});var Dn=Tn;var Pn=function(){try{var t=mt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Mn=Pn;function Cn(t,e,r){"__proto__"==e&&Mn?Mn(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var zn=Object.prototype.hasOwnProperty;function En(t,e,r){var n=t[e];zn.call(t,e)&&sr(n,r)&&(void 0!==r||e in t)||Cn(t,e,r)}function Ln(t,e,r,n){var o=!r;r||(r={});for(var i=-1,a=e.length;++i<a;){var u=e[i],s=n?n(r[u],t[u],u,r,t):void 0;void 0===s&&(s=t[u]),o?Cn(r,u,s):En(r,u,s)}return r}var Fn=Object.prototype.hasOwnProperty;function Un(t){if(!et(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=X(t),r=[];for(var n in t)("constructor"!=n||!e&&Fn.call(t,n))&&r.push(n);return r}function Wn(t){return Ut(t)?Ue(t,!0):Un(t)}var Bn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Nn=Bn&&"object"==typeof module&&module&&!module.nodeType&&module,Vn=Nn&&Nn.exports===Bn?a.Buffer:void 0,Hn=Vn?Vn.allocUnsafe:void 0;var Yn=G(Object.getPrototypeOf,Object),Rn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Kr(e,an(t)),t=Yn(t);return e}:rn,qn=Rn;function Zn(t){return tn(t,Wn,qn)}var Jn=Object.prototype.hasOwnProperty;function Xn(t){var e=new t.constructor(t.byteLength);return new zr(e).set(new zr(t)),e}var Gn=/\w*$/;var Qn=u?u.prototype:void 0,Kn=Qn?Qn.valueOf:void 0;var to="[object Boolean]",eo="[object Date]",ro="[object Map]",no="[object Number]",oo="[object RegExp]",io="[object Set]",ao="[object String]",uo="[object Symbol]",so="[object ArrayBuffer]",co="[object DataView]",lo="[object Float32Array]",fo="[object Float64Array]",po="[object Int8Array]",ho="[object Int16Array]",go="[object Int32Array]",vo="[object Uint8Array]",bo="[object Uint8ClampedArray]",yo="[object Uint16Array]",mo="[object Uint32Array]";function wo(t,e,r){var n,o=t.constructor;switch(e){case so:return Xn(t);case to:case eo:return new o(+t);case co:return function(t,e){var r=e?Xn(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case lo:case fo:case po:case ho:case go:case vo:case bo:case yo:case mo:return function(t,e){var r=e?Xn(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,r);case ro:return new o;case no:case ao:return new o(t);case oo:return function(t){var e=new t.constructor(t.source,Gn.exec(t));return e.lastIndex=t.lastIndex,e}(t);case io:return new o;case uo:return n=t,Kn?Object(Kn.call(n)):{}}}var jo=Object.create,_o=function(){function t(){}return function(e){if(!et(e))return{};if(jo)return jo(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),Oo=_o;var xo=ze&&ze.isMap,Ao=xo?De(xo):function(t){return m(t)&&"[object Map]"==Et(t)};var So=ze&&ze.isSet,ko=So?De(So):function(t){return m(t)&&"[object Set]"==Et(t)},$o=1,Io=2,To=4,Do="[object Arguments]",Po="[object Function]",Mo="[object GeneratorFunction]",Co="[object Object]",zo={};function Eo(t,e,r,n,o,i){var a,u=e&$o,s=e&Io,l=e&To;if(r&&(a=o?r(t,n,o,i):r(t)),void 0!==a)return a;if(!et(t))return t;var f=c(t);if(f){if(a=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Jn.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!u)return function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(t,a)}else{var d=Et(t),p=d==Po||d==Mo;if(Se(t))return function(t,e){if(e)return t.slice();var r=t.length,n=Hn?Hn(r):new t.constructor(r);return t.copy(n),n}(t,u);if(d==Co||d==Do||p&&!o){if(a=s||p?{}:function(t){return"function"!=typeof t.constructor||X(t)?{}:Oo(Yn(t))}(t),!u)return s?function(t,e){return Ln(t,qn(t),e)}(t,function(t,e){return t&&Ln(e,Wn(e),t)}(a,t)):function(t,e){return Ln(t,an(t),e)}(t,function(t,e){return t&&Ln(e,We(e),t)}(a,t))}else{if(!zo[d])return o?t:{};a=wo(t,d,u)}}i||(i=new $r);var h=i.get(t);if(h)return h;i.set(t,a),ko(t)?t.forEach((function(n){a.add(Eo(n,e,r,n,t,i))})):Ao(t)&&t.forEach((function(n,o){a.set(o,Eo(n,e,r,o,t,i))}));var g=f?void 0:(l?s?Zn:un:s?Wn:We)(t);return he(g||t,(function(n,o){g&&(n=t[o=n]),En(a,o,Eo(n,e,r,o,t,i))})),a}zo[Do]=zo["[object Array]"]=zo["[object ArrayBuffer]"]=zo["[object DataView]"]=zo["[object Boolean]"]=zo["[object Date]"]=zo["[object Float32Array]"]=zo["[object Float64Array]"]=zo["[object Int8Array]"]=zo["[object Int16Array]"]=zo["[object Int32Array]"]=zo["[object Map]"]=zo["[object Number]"]=zo[Co]=zo["[object RegExp]"]=zo["[object Set]"]=zo["[object String]"]=zo["[object Symbol]"]=zo["[object Uint8Array]"]=zo["[object Uint8ClampedArray]"]=zo["[object Uint16Array]"]=zo["[object Uint32Array]"]=!0,zo["[object Error]"]=zo[Po]=zo["[object WeakMap]"]=!1;var Lo=1,Fo=4;var Uo={},Wo={get exports(){return Uo},set exports(t){Uo=t}},Bo={},No={},Vo={get exports(){return No},set exports(t){No=t}},Ho={};function Yo(){var t={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return t}var Ro=/javascript\s*\:/gim;Ho.whiteList=Yo(),Ho.getDefaultWhiteList=Yo,Ho.onAttr=function(t,e,r){},Ho.onIgnoreAttr=function(t,e,r){},Ho.safeAttrValue=function(t,e){return Ro.test(e)?"":e};var qo={indexOf:function(t,e){var r,n;if(Array.prototype.indexOf)return t.indexOf(e);for(r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1},forEach:function(t,e,r){var n,o;if(Array.prototype.forEach)return t.forEach(e,r);for(n=0,o=t.length;n<o;n++)e.call(r,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}};var Zo=function(t,e){";"!==(t=qo.trimRight(t))[t.length-1]&&(t+=";");var r=t.length,n=!1,o=0,i=0,a="";function u(){if(!n){var r=qo.trim(t.slice(o,i)),u=r.indexOf(":");if(-1!==u){var s=qo.trim(r.slice(0,u)),c=qo.trim(r.slice(u+1));if(s){var l=e(o,a.length,s,c,r);l&&(a+=l+"; ")}}}o=i+1}for(;i<r;i++){var s=t[i];if("/"===s&&"*"===t[i+1]){var c=t.indexOf("*/",i+2);if(-1===c)break;o=(i=c+1)+1,n=!1}else"("===s?n=!0:")"===s?n=!1:";"===s?n||u():"\n"===s&&u()}return qo.trim(a)},Jo=Ho,Xo=Zo;function Go(t){return null==t}function Qo(t){(t=function(t){var e={};for(var r in t)e[r]=t[r];return e}(t||{})).whiteList=t.whiteList||Jo.whiteList,t.onAttr=t.onAttr||Jo.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||Jo.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||Jo.safeAttrValue,this.options=t}Qo.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,r=e.whiteList,n=e.onAttr,o=e.onIgnoreAttr,i=e.safeAttrValue;return Xo(t,(function(t,e,a,u,s){var c=r[a],l=!1;if(!0===c?l=c:"function"==typeof c?l=c(u):c instanceof RegExp&&(l=c.test(u)),!0!==l&&(l=!1),u=i(a,u)){var f,d={position:e,sourcePosition:t,source:s,isWhite:l};return l?Go(f=n(a,u,d))?a+":"+u:f:Go(f=o(a,u,d))?void 0:f}}))};var Ko=Qo;!function(t,e){var r=Ho,n=Ko;for(var o in(e=t.exports=function(t,e){return new n(e).process(t)}).FilterCSS=n,r)e[o]=r[o];"undefined"!=typeof window&&(window.filterCSS=t.exports)}(Vo,No);var ti={indexOf:function(t,e){var r,n;if(Array.prototype.indexOf)return t.indexOf(e);for(r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1},forEach:function(t,e,r){var n,o;if(Array.prototype.forEach)return t.forEach(e,r);for(n=0,o=t.length;n<o;n++)e.call(r,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1}},ei=No.FilterCSS,ri=No.getDefaultWhiteList,ni=ti;function oi(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var ii=new ei;function ai(t){return t.replace(ui,"<").replace(si,">")}var ui=/</g,si=/>/g,ci=/"/g,li=/"/g,fi=/&#([a-zA-Z0-9]*);?/gim,di=/:?/gim,pi=/&newline;?/gim,hi=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,gi=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,vi=/u\s*r\s*l\s*\(.*/gi;function bi(t){return t.replace(ci,""")}function yi(t){return t.replace(li,'"')}function mi(t){return t.replace(fi,(function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))}))}function wi(t){return t.replace(di,":").replace(pi," ")}function ji(t){for(var e="",r=0,n=t.length;r<n;r++)e+=t.charCodeAt(r)<32?" ":t.charAt(r);return ni.trim(e)}function _i(t){return t=ji(t=wi(t=mi(t=yi(t))))}function Oi(t){return t=ai(t=bi(t))}Bo.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},Bo.getDefaultWhiteList=oi,Bo.onTag=function(t,e,r){},Bo.onIgnoreTag=function(t,e,r){},Bo.onTagAttr=function(t,e,r){},Bo.onIgnoreTagAttr=function(t,e,r){},Bo.safeAttrValue=function(t,e,r,n){if(r=_i(r),"href"===e||"src"===e){if("#"===(r=ni.trim(r)))return"#";if("http://"!==r.substr(0,7)&&"https://"!==r.substr(0,8)&&"mailto:"!==r.substr(0,7)&&"tel:"!==r.substr(0,4)&&"data:image/"!==r.substr(0,11)&&"ftp://"!==r.substr(0,6)&&"./"!==r.substr(0,2)&&"../"!==r.substr(0,3)&&"#"!==r[0]&&"/"!==r[0])return""}else if("background"===e){if(hi.lastIndex=0,hi.test(r))return""}else if("style"===e){if(gi.lastIndex=0,gi.test(r))return"";if(vi.lastIndex=0,vi.test(r)&&(hi.lastIndex=0,hi.test(r)))return"";!1!==n&&(r=(n=n||ii).process(r))}return r=Oi(r)},Bo.escapeHtml=ai,Bo.escapeQuote=bi,Bo.unescapeQuote=yi,Bo.escapeHtmlEntities=mi,Bo.escapeDangerHtml5Entities=wi,Bo.clearNonPrintableCharacter=ji,Bo.friendlyAttrValue=_i,Bo.escapeAttrValue=Oi,Bo.onIgnoreTagStripAll=function(){return""},Bo.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var r=!Array.isArray(t),n=[],o=!1;return{onIgnoreTag:function(i,a,u){if(function(e){return!!r||-1!==ni.indexOf(t,e)}(i)){if(u.isClosing){var s="[/removed]",c=u.position+s.length;return n.push([!1!==o?o:u.position,c]),o=!1,s}return o||(o=u.position),"[removed]"}return e(i,a,u)},remove:function(t){var e="",r=0;return ni.forEach(n,(function(n){e+=t.slice(r,n[0]),r=n[1]})),e+=t.slice(r)}}},Bo.stripCommentTag=function(t){for(var e="",r=0;r<t.length;){var n=t.indexOf("\x3c!--",r);if(-1===n){e+=t.slice(r);break}e+=t.slice(r,n);var o=t.indexOf("--\x3e",n);if(-1===o)break;r=o+3}return e},Bo.stripBlankChar=function(t){var e=t.split("");return(e=e.filter((function(t){var e=t.charCodeAt(0);return 127!==e&&(!(e<=31)||(10===e||13===e))}))).join("")},Bo.attributeWrapSign='"',Bo.cssFilter=ii,Bo.getDefaultCSSWhiteList=ri;var xi={},Ai=ti;function Si(t){var e,r=Ai.spaceIndex(t);return e=-1===r?t.slice(1,-1):t.slice(1,r+1),"/"===(e=Ai.trim(e).toLowerCase()).slice(0,1)&&(e=e.slice(1)),"/"===e.slice(-1)&&(e=e.slice(0,-1)),e}function ki(t){return"</"===t.slice(0,2)}var $i=/[^a-zA-Z0-9\\_:.-]/gim;function Ii(t,e){for(;e<t.length;e++){var r=t[e];if(" "!==r)return"="===r?e:-1}}function Ti(t,e){for(;e<t.length;e++){var r=t[e];if(" "!==r)return"'"===r||'"'===r?e:-1}}function Di(t,e){for(;e>0;e--){var r=t[e];if(" "!==r)return"="===r?e:-1}}function Pi(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}xi.parseTag=function(t,e,r){var n="",o=0,i=!1,a=!1,u=0,s=t.length,c="",l="";t:for(u=0;u<s;u++){var f=t.charAt(u);if(!1===i){if("<"===f){i=u;continue}}else if(!1===a){if("<"===f){n+=r(t.slice(o,u)),i=u,o=u;continue}if(">"===f||u===s-1){n+=r(t.slice(o,i)),c=Si(l=t.slice(i,u+1)),n+=e(i,n.length,c,l,ki(l)),o=u+1,i=!1;continue}if('"'===f||"'"===f)for(var d=1,p=t.charAt(u-d);""===p.trim()||"="===p;){if("="===p){a=f;continue t}p=t.charAt(u-++d)}}else if(f===a){a=!1;continue}}return o<s&&(n+=r(t.substr(o))),n},xi.parseAttr=function(t,e){var r=0,n=0,o=[],i=!1,a=t.length;function u(t,r){if(!((t=(t=Ai.trim(t)).replace($i,"").toLowerCase()).length<1)){var n=e(t,r||"");n&&o.push(n)}}for(var s=0;s<a;s++){var c,l=t.charAt(s);if(!1!==i||"="!==l)if(!1===i||s!==n)if(/\s|\n|\t/.test(l)){if(t=t.replace(/\s|\n|\t/g," "),!1===i){if(-1===(c=Ii(t,s))){u(Ai.trim(t.slice(r,s))),i=!1,r=s+1;continue}s=c-1;continue}if(-1===(c=Di(t,s-1))){u(i,Pi(Ai.trim(t.slice(r,s)))),i=!1,r=s+1;continue}}else;else{if(-1===(c=t.indexOf(l,s+1)))break;u(i,Ai.trim(t.slice(n+1,c))),i=!1,r=(s=c)+1}else i=t.slice(r,s),r=s+1,n='"'===t.charAt(r)||"'"===t.charAt(r)?r:Ti(t,s+1)}return r<t.length&&(!1===i?u(t.slice(r)):u(i,Pi(Ai.trim(t.slice(r))))),Ai.trim(o.join(" "))};var Mi=No.FilterCSS,Ci=Bo,zi=xi,Ei=zi.parseTag,Li=zi.parseAttr,Fi=ti;function Ui(t){return null==t}function Wi(t){(t=function(t){var e={};for(var r in t)e[r]=t[r];return e}(t||{})).stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=Ci.onIgnoreTagStripAll),t.whiteList||t.allowList?t.whiteList=function(t){var e={};for(var r in t)Array.isArray(t[r])?e[r.toLowerCase()]=t[r].map((function(t){return t.toLowerCase()})):e[r.toLowerCase()]=t[r];return e}(t.whiteList||t.allowList):t.whiteList=Ci.whiteList,this.attributeWrapSign=!0===t.singleQuotedAttributeValue?"'":Ci.attributeWrapSign,t.onTag=t.onTag||Ci.onTag,t.onTagAttr=t.onTagAttr||Ci.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||Ci.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||Ci.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||Ci.safeAttrValue,t.escapeHtml=t.escapeHtml||Ci.escapeHtml,this.options=t,!1===t.css?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new Mi(t.css))}Wi.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this,r=e.options,n=r.whiteList,o=r.onTag,i=r.onIgnoreTag,a=r.onTagAttr,u=r.onIgnoreTagAttr,s=r.safeAttrValue,c=r.escapeHtml,l=e.attributeWrapSign,f=e.cssFilter;r.stripBlankChar&&(t=Ci.stripBlankChar(t)),r.allowCommentTag||(t=Ci.stripCommentTag(t));var d=!1;r.stripIgnoreTagBody&&(d=Ci.StripTagBody(r.stripIgnoreTagBody,i),i=d.onIgnoreTag);var p=Ei(t,(function(t,e,r,d,p){var h={sourcePosition:t,position:e,isClosing:p,isWhite:Object.prototype.hasOwnProperty.call(n,r)},g=o(r,d,h);if(!Ui(g))return g;if(h.isWhite){if(h.isClosing)return"</"+r+">";var v=function(t){var e=Fi.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var r="/"===(t=Fi.trim(t.slice(e+1,-1)))[t.length-1];return r&&(t=Fi.trim(t.slice(0,-1))),{html:t,closing:r}}(d),b=n[r],y=Li(v.html,(function(t,e){var n=-1!==Fi.indexOf(b,t),o=a(r,t,e,n);return Ui(o)?n?(e=s(r,t,e,f))?t+"="+l+e+l:t:Ui(o=u(r,t,e,n))?void 0:o:o}));return d="<"+r,y&&(d+=" "+y),v.closing&&(d+=" /"),d+=">"}return Ui(g=i(r,d,h))?c(d):g}),c);return d&&(p=d.remove(p)),p};var Bi=Wi;!function(t,e){var r=Bo,n=xi,o=Bi;function i(t,e){return new o(e).process(t)}(e=t.exports=i).filterXSS=i,e.FilterXSS=o,function(){for(var t in r)e[t]=r[t];for(var o in n)e[o]=n[o]}(),"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)}(Wo,Uo);var Ni=Uo;function Vi(){return"undefined"!=typeof self?self:"undefined"!=typeof window&&void 0!==window.document?window:"undefined"!=typeof global?global:null}function Hi(t){let e=function(){let t=Vi();return Ni||t.Tesseract}();let r=function t(r){return Re(r)||qe(r)?(He(r,(function(e,n){r[n]=t(e)})),r):Ke(r)?e(r,{onIgnoreTagAttr:function(t,r,n,o){if("style"===r)return r+'="'+e.escapeAttrValue(n)+'"'}}):r}(Eo(t,Lo|Fo));return r}let Yi=null,Ri=null;function qi(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"save";if(!Xe(Yi))throw console.log("ds",Yi),new Error("invalid ds");let o=Yi[t].keys,i=!1;Re(r)||(i=!0,r=[r]);let a=function(){if(!Ze(Dn))throw new Error("invalid dayjs");return Dn().format("YYYY-MM-DDTHH:mm:ss.SSSZ")}();return n.indexOf("insert")>=0&&(o.indexOf("userId")>=0&&He(r,((t,n)=>{r[n].userId=e})),o.indexOf("timeCreate")>=0&&He(r,((t,e)=>{r[e].timeCreate=a})),o.indexOf("userIdUpdate")>=0&&He(r,((t,n)=>{r[n].userIdUpdate=e})),o.indexOf("timeUpdate")>=0&&He(r,((t,e)=>{r[e].timeUpdate=a}))),(n.indexOf("insert")>=0||n.indexOf("save")>=0)&&(o.indexOf("userIdUpdate")>=0&&He(r,((t,n)=>{r[n].userIdUpdate=e})),o.indexOf("timeUpdate")>=0&&He(r,((t,e)=>{r[e].timeUpdate=a}))),r=In(r,((t,e)=>{let r={};return He(t,((t,e)=>{t=Hi(t),r[e]=t})),r})),r=i?r[0]:r}async function Zi(t,e,r,n){let o,i=null;if(!Xe(Ri))return Promise.reject("無有效woItems");let a=kr(Ri,e,null);if(null===a)return Promise.reject(`ORM找不到表名稱: ${e}`);if("select"===r){if(o=await a.select(n).catch((t=>{console.log(`${e}.select catch`,t),i="取得資料失敗"})),Ke(i))return Promise.reject(i)}else if("insert"===r||"save"===r){try{n=qi(e,t,n,r)}catch(t){return console.log("adjustData catch",t.toString()),i="調整資料失敗",Promise.reject(i)}if("insert"===r?o=await a.insert(n).catch((t=>{console.log(`${e}.save catch`,t),i="新增資料失敗"})):"save"===r&&(o=await a.save(n,{atomic:!0}).catch((t=>{console.log(`${e}.save catch`,t),i="儲存資料失敗"}))),Ke(i))return Promise.reject(i);o=Re(n)?In(n,(t=>({id:t.id}))):{id:n.id}}else if("del"===r)o=await a.del(n).catch((t=>{console.log(`${e}.del catch`,t),i="刪除資料失敗"}));else if("delAll"===r)o=await a.delAll(n).catch((t=>{console.log(`${e}.delAll catch`,t),i="刪除資料失敗"}));else if("mix"===r){if(!Xe(n))return Promise.reject("mix僅支援輸入ltdtDiffByKey結果物件");let r;o=[];let u=kr(n,"add",[]);if(oe(u)>0){try{u=qi(e,t,u,"insert+save")}catch(t){return console.log("adjustData catch",t.toString()),i="調整資料失敗",Promise.reject(i)}if(await a.insert(u).catch((t=>{console.log(`${e}.save catch`,t),i="新增資料失敗"})),Ke(i))return Promise.reject(i);r=In(u,(t=>({id:t.id}))),o=[...o,...r]}let s=kr(n,"del",[]);if(oe(s)>0){if(await a.del(s).catch((t=>{console.log(`${e}.save catch`,t),i="刪除資料失敗"})),Ke(i))return Promise.reject(i);r=In(s,(t=>({id:t.id}))),o=[...o,...r]}let c=kr(n,"diff",[]);if(oe(c)>0){try{c=qi(e,t,c)}catch(t){return console.log("adjustData catch",t.toString()),i="調整資料失敗",Promise.reject(i)}if(await a.save(c).catch((t=>{console.log(`${e}.save catch`,t),i="變更資料失敗"})),Ke(i))return Promise.reject(i);r=In(c,(t=>({id:t.id}))),o=[...o,...r]}}else i=`invalid mode: ${r}`;return Ke(i)?Promise.reject(i):o}function Ji(t,e){return Yi=t,Ri=e,Zi}function Xi(t,e){var r=[];return Ne(t,(function(t,n,o){e(t,n,o)&&r.push(t)})),r}function Gi(t){let e=!1;if(Ke(t))e=!isNaN(Number(t));else if(function(t){return"[object Number]"===Object.prototype.toString.call(t)}(t)){if(function(t){return t!=t}(t))return!1;e=!0}return e}function Qi(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Re(t)){let t=Ye();return t.reject("pms is not an array"),t}return t.reduce(((t,e)=>t.then(e)),Promise.resolve(e))}let Ki=[],ta=[],ea=[],ra=null,na=null,oa=!0,ia=!0;function aa(t){setTimeout((()=>{Ki.push(t)}),1)}function ua(t){setTimeout((()=>{ta.push(t)}),1)}function sa(t){setTimeout((()=>{ea.push(t)}),1)}async function ca(t,e,r,n){if(!Ze(ra))return Promise.reject("invalid mapOrm");if(oa&&!Ke(t))return console.log("userId",t),console.log("找不到使用者主鍵"),Promise.reject("找不到使用者主鍵");let o="n";if(oa){if(!Ze(na))return Promise.reject("invalid getUserById");let e=await na(t);if(!e)return console.log("userId",t),console.log("找不到使用者資訊"),Promise.reject("找不到使用者資訊");o=kr(e,"isAdmin"),"y"!==o&&"n"!==o&&(o="n");let r=kr(e,"isActive");if("y"!==r&&"n"!==r&&(r="n"),"y"!==r)return console.log("userId",t),console.log("oSelf",e),console.log("使用者被停權或無有效使用者資訊"),Promise.reject("使用者被停權或無有效使用者資訊")}if(await Je(Ki,(i=>i({woName:e,userId:t,isAdmin:o,mode:r,input:n}))),oe(ta)>0){let i={woName:e,userId:t,isAdmin:o,mode:r,input:n},a=await Qi(ta,i);n=a.input}let i=await ra(t,e,r,n);var a,u;return ia&&"n"===o&&"select"===r&&Re(i)&&(u=t=>{return r="isActive",!(qe(e=t)&&(Ke(r)||Gi(r))&&r in e&&"n"===t.isActive);var e,r},i=(c(a=i)?en:Xi)(a,kn(u))),oe(ea)>0&&(i=await Qi(ea,{woName:e,userId:t,isAdmin:o,mode:r,input:n,output:i})),i}function la(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function fa(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?la(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):la(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}return function(t,e,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=function(t,e,r,n){if(!Xe(t))throw console.log("ds",t),new Error("invalid ds");if(!Ze(e))throw console.log("WOrm",e),new Error("invalid WOrm");if(!Ke(r))throw console.log("url",r),new Error("invalid url");if(!Ke(n))throw console.log("db",n),new Error("invalid db");let o={};return He(We(t),(t=>{let i=new e({url:r,db:n,cl:t});o[t]=i})),o}(t,e,r,n),a=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ze(t)?(ra=t,oa=kr(e,"bCheckUser"),Qe(oa)||(oa=!0),na=kr(e,"getUserById"),ia=kr(e,"bExcludeWhenNotAdmin"),Qe(ia)||(ia=!0),{addFunCheck:aa,addFunPreProcessing:ua,addFunPostProcessing:sa,procOrm:ca}):Promise.reject("invalid mapOrm")}(Ji(t,i),o);return fa(fa({},tr),{},{woItems:i},a)}}));
|
|
6
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("fs")):"function"==typeof define&&define.amd?define(["fs"],e):(t="undefined"!=typeof globalThis?globalThis:t||self)["w-serv-orm"]=e(t.fs)}(this,(function(t){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function r(t){var r=function(t,r){if("object"!==e(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!==e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"===e(r)?r:String(r)}function n(t,e,n){return(e=r(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var o="object"==typeof global&&global&&global.Object===Object&&global,i="object"==typeof self&&self&&self.Object===Object&&self,a=o||i||Function("return this")(),u=a.Symbol;function s(t,e){for(var r=-1,n=null==t?0:t.length,o=Array(n);++r<n;)o[r]=e(t[r],r,t);return o}var c=Array.isArray,l=Object.prototype,f=l.hasOwnProperty,d=l.toString,p=u?u.toStringTag:void 0;var h=Object.prototype.toString;var g="[object Null]",v="[object Undefined]",b=u?u.toStringTag:void 0;function y(t){return null==t?void 0===t?v:g:b&&b in Object(t)?function(t){var e=f.call(t,p),r=t[p];try{t[p]=void 0;var n=!0}catch(t){}var o=d.call(t);return n&&(e?t[p]=r:delete t[p]),o}(t):function(t){return h.call(t)}(t)}function m(t){return null!=t&&"object"==typeof t}var w="[object Symbol]";function j(t){return"symbol"==typeof t||m(t)&&y(t)==w}var _=1/0,O=u?u.prototype:void 0,x=O?O.toString:void 0;function A(t){if("string"==typeof t)return t;if(c(t))return s(t,A)+"";if(j(t))return x?x.call(t):"";var e=t+"";return"0"==e&&1/t==-_?"-0":e}var S=/\s/;var k=/^\s+/;function $(t){return t?t.slice(0,function(t){for(var e=t.length;e--&&S.test(t.charAt(e)););return e}(t)+1).replace(k,""):t}function I(t,e,r){var n=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(r=r>o?o:r)<0&&(r+=o),o=e>r?0:r-e>>>0,e>>>=0;for(var i=Array(o);++n<o;)i[n]=t[n+e];return i}function T(t){return t!=t}function D(t,e,r){return e==e?function(t,e,r){for(var n=r-1,o=t.length;++n<o;)if(t[n]===e)return n;return-1}(t,e,r):function(t,e,r,n){for(var o=t.length,i=r+(n?1:-1);n?i--:++i<o;)if(e(t[i],i,t))return i;return-1}(t,T,r)}var P=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");function M(t){return P.test(t)}var C="\\ud800-\\udfff",z="["+C+"]",E="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",L="\\ud83c[\\udffb-\\udfff]",F="[^"+C+"]",U="(?:\\ud83c[\\udde6-\\uddff]){2}",W="[\\ud800-\\udbff][\\udc00-\\udfff]",B="(?:"+E+"|"+L+")"+"?",N="[\\ufe0e\\ufe0f]?",V=N+B+("(?:\\u200d(?:"+[F,U,W].join("|")+")"+N+B+")*"),H="(?:"+[F+E+"?",E,U,W,z].join("|")+")",Y=RegExp(L+"(?="+L+")|"+H+V,"g");function R(t){return M(t)?function(t){return t.match(Y)||[]}(t):function(t){return t.split("")}(t)}function q(t){return null==t?"":A(t)}function Z(t,e,r){if((t=q(t))&&(r||void 0===e))return $(t);if(!t||!(e=A(e)))return t;var n=R(t),o=R(e),i=function(t,e){for(var r=-1,n=t.length;++r<n&&D(e,t[r],0)>-1;);return r}(n,o),a=function(t,e){for(var r=t.length;r--&&D(e,t[r],0)>-1;);return r}(n,o)+1;return function(t,e,r){var n=t.length;return r=void 0===r?n:r,!e&&r>=n?t:I(t,e,r)}(n,i,a).join("")}var J=Object.prototype;function X(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||J)}function G(t,e){return function(r){return t(e(r))}}var Q=G(Object.keys,Object),K=Object.prototype.hasOwnProperty;function tt(t){if(!X(t))return Q(t);var e=[];for(var r in Object(t))K.call(t,r)&&"constructor"!=r&&e.push(r);return e}function et(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var rt="[object AsyncFunction]",nt="[object Function]",ot="[object GeneratorFunction]",it="[object Proxy]";function at(t){if(!et(t))return!1;var e=y(t);return e==nt||e==ot||e==rt||e==it}var ut,st=a["__core-js_shared__"],ct=(ut=/[^.]+$/.exec(st&&st.keys&&st.keys.IE_PROTO||""))?"Symbol(src)_1."+ut:"";var lt=Function.prototype.toString;function ft(t){if(null!=t){try{return lt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}var dt=/^\[object .+?Constructor\]$/,pt=Function.prototype,ht=Object.prototype,gt=pt.toString,vt=ht.hasOwnProperty,bt=RegExp("^"+gt.call(vt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function yt(t){return!(!et(t)||(e=t,ct&&ct in e))&&(at(t)?bt:dt).test(ft(t));var e}function mt(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return yt(r)?r:void 0}var wt=mt(a,"DataView"),jt=mt(a,"Map"),_t=mt(a,"Promise"),Ot=mt(a,"Set"),xt=mt(a,"WeakMap"),At="[object Map]",St="[object Promise]",kt="[object Set]",$t="[object WeakMap]",It="[object DataView]",Tt=ft(wt),Dt=ft(jt),Pt=ft(_t),Mt=ft(Ot),Ct=ft(xt),zt=y;(wt&&zt(new wt(new ArrayBuffer(1)))!=It||jt&&zt(new jt)!=At||_t&&zt(_t.resolve())!=St||Ot&&zt(new Ot)!=kt||xt&&zt(new xt)!=$t)&&(zt=function(t){var e=y(t),r="[object Object]"==e?t.constructor:void 0,n=r?ft(r):"";if(n)switch(n){case Tt:return It;case Dt:return At;case Pt:return St;case Mt:return kt;case Ct:return $t}return e});var Et=zt,Lt=9007199254740991;function Ft(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=Lt}function Ut(t){return null!=t&&Ft(t.length)&&!at(t)}var Wt="[object String]";function Bt(t){return function(e){return null==e?void 0:e[t]}}var Nt=Bt("length"),Vt="\\ud800-\\udfff",Ht="["+Vt+"]",Yt="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",Rt="\\ud83c[\\udffb-\\udfff]",qt="[^"+Vt+"]",Zt="(?:\\ud83c[\\udde6-\\uddff]){2}",Jt="[\\ud800-\\udbff][\\udc00-\\udfff]",Xt="(?:"+Yt+"|"+Rt+")"+"?",Gt="[\\ufe0e\\ufe0f]?",Qt=Gt+Xt+("(?:\\u200d(?:"+[qt,Zt,Jt].join("|")+")"+Gt+Xt+")*"),Kt="(?:"+[qt+Yt+"?",Yt,Zt,Jt,Ht].join("|")+")",te=RegExp(Rt+"(?="+Rt+")|"+Kt+Qt,"g");function ee(t){return M(t)?function(t){for(var e=te.lastIndex=0;te.test(t);)++e;return e}(t):Nt(t)}var re="[object Map]",ne="[object Set]";function oe(t){if(null==t)return 0;if(Ut(t))return"string"==typeof(e=t)||!c(e)&&m(e)&&y(e)==Wt?ee(t):t.length;var e,r=Et(t);return r==re||r==ne?t.size:tt(t).length}var ie=NaN,ae=/^[-+]0x[0-9a-f]+$/i,ue=/^0b[01]+$/i,se=/^0o[0-7]+$/i,ce=parseInt;var le=1/0,fe=17976931348623157e292;function de(t){return t?(t=function(t){if("number"==typeof t)return t;if(j(t))return ie;if(et(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=et(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=$(t);var r=ue.test(t);return r||se.test(t)?ce(t.slice(2),r?2:8):ae.test(t)?ie:+t}(t))===le||t===-le?(t<0?-1:1)*fe:t==t?t:0:0===t?t:0}function pe(t,e,r){var n,o,i=null==t?0:t.length;return i?I(t,(e=r||void 0===e?1:(n=de(e),o=n%1,n==n?o?n-o:n:0))<0?0:e,i):[]}function he(t,e){for(var r=-1,n=null==t?0:t.length;++r<n&&!1!==e(t[r],r,t););return t}var ge,ve=function(t,e,r){for(var n=-1,o=Object(t),i=r(t),a=i.length;a--;){var u=i[ge?a:++n];if(!1===e(o[u],u,o))break}return t};function be(t){return m(t)&&"[object Arguments]"==y(t)}var ye=Object.prototype,me=ye.hasOwnProperty,we=ye.propertyIsEnumerable,je=be(function(){return arguments}())?be:function(t){return m(t)&&me.call(t,"callee")&&!we.call(t,"callee")},_e=je;var Oe="object"==typeof exports&&exports&&!exports.nodeType&&exports,xe=Oe&&"object"==typeof module&&module&&!module.nodeType&&module,Ae=xe&&xe.exports===Oe?a.Buffer:void 0,Se=(Ae?Ae.isBuffer:void 0)||function(){return!1},ke=9007199254740991,$e=/^(?:0|[1-9]\d*)$/;function Ie(t,e){var r=typeof t;return!!(e=null==e?ke:e)&&("number"==r||"symbol"!=r&&$e.test(t))&&t>-1&&t%1==0&&t<e}var Te={};function De(t){return function(e){return t(e)}}Te["[object Float32Array]"]=Te["[object Float64Array]"]=Te["[object Int8Array]"]=Te["[object Int16Array]"]=Te["[object Int32Array]"]=Te["[object Uint8Array]"]=Te["[object Uint8ClampedArray]"]=Te["[object Uint16Array]"]=Te["[object Uint32Array]"]=!0,Te["[object Arguments]"]=Te["[object Array]"]=Te["[object ArrayBuffer]"]=Te["[object Boolean]"]=Te["[object DataView]"]=Te["[object Date]"]=Te["[object Error]"]=Te["[object Function]"]=Te["[object Map]"]=Te["[object Number]"]=Te["[object Object]"]=Te["[object RegExp]"]=Te["[object Set]"]=Te["[object String]"]=Te["[object WeakMap]"]=!1;var Pe="object"==typeof exports&&exports&&!exports.nodeType&&exports,Me=Pe&&"object"==typeof module&&module&&!module.nodeType&&module,Ce=Me&&Me.exports===Pe&&o.process,ze=function(){try{var t=Me&&Me.require&&Me.require("util").types;return t||Ce&&Ce.binding&&Ce.binding("util")}catch(t){}}(),Ee=ze&&ze.isTypedArray,Le=Ee?De(Ee):function(t){return m(t)&&Ft(t.length)&&!!Te[y(t)]},Fe=Object.prototype.hasOwnProperty;function Ue(t,e){var r=c(t),n=!r&&_e(t),o=!r&&!n&&Se(t),i=!r&&!n&&!o&&Le(t),a=r||n||o||i,u=a?function(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}(t.length,String):[],s=u.length;for(var l in t)!e&&!Fe.call(t,l)||a&&("length"==l||o&&("offset"==l||"parent"==l)||i&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Ie(l,s))||u.push(l);return u}function We(t){return Ut(t)?Ue(t):tt(t)}var Be=function(t,e){return function(r,n){if(null==r)return r;if(!Ut(r))return t(r,n);for(var o=r.length,i=e?o:-1,a=Object(r);(e?i--:++i<o)&&!1!==n(a[i],i,a););return r}}((function(t,e){return t&&ve(t,e,We)})),Ne=Be;function Ve(t){return t}function He(t,e){var r;return(c(t)?he:Ne)(t,"function"==typeof(r=e)?r:Ve)}function Ye(){let t,e,r=new Promise((function(){t=arguments[0],e=arguments[1]}));return r.resolve=t,r.reject=e,r}function Re(t){return"[object Array]"===Object.prototype.toString.call(t)}function qe(t){return"[object Object]"===Object.prototype.toString.call(t)}function Ze(t){let e=Object.prototype.toString.call(t);return"[object Function]"===e||"[object AsyncFunction]"===e}function Je(t,e){let r=Ye();if(!Re(t)&&!qe(t))return r.reject("rs is not an array or object"),r;let n=!1;if(qe(t)){n=!0;let e=[];He(t,((t,r)=>{e.push({k:r,v:t})})),t=e}Ze(e)||(e=function(t){return t});let o=-1,i=[];return t.reduce((function(t,r){return t.then((function(t){i.push(t),o+=1;let a=o,u=r;return n&&(a=r.k,u=r.v),Ze(e)?e(u,a):u}))}),Promise.resolve()).then((function(t){i.push(t),i=pe(i),r.resolve(i)})).catch((function(t){r.reject(t)})),r}function Xe(t){if(qe(t)){for(let e in t)return!0;return!1}return!1}var Ge="[object Boolean]";function Qe(t){return!0===(e=t)||!1===e||m(e)&&y(e)==Ge;var e}function Ke(t){return!(!function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)||""===t)}let tr={backup:async function(t){return await Je(t,(async(t,e)=>(console.log("backup...",e),{name:e,data:await t.select()})))},recover:async function(e,r,n){let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(i=e,!t.existsSync(i)||t.lstatSync(i).isDirectory()||t.lstatSync(i).isSymbolicLink())throw console.log("fp",e),new Error("fp is not exist");var i;if(!Xe(r))throw console.log("woItems",r),new Error("invalid woItems");Ze(n)||(n=null),Qe(o)||(o=!1);let a=t.readFileSync(e,"utf8");a=Z(a);let u=function(t){if(!Ke(t))return{};let e={};try{e=JSON.parse(t)}catch(t){e={}}return e}(a);Ze(n)&&n(),await Je(u,(async t=>{console.log("recover...",t.name),o&&(console.log("needCreateStorage"),await r[t.name].createStorage());let e=null;return oe(t.data)>0&&(e=await r[t.name].insert(t.data)),e}))}};var er=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,rr=/^\w*$/;function nr(t,e){if(c(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!j(t))||(rr.test(t)||!er.test(t)||null!=e&&t in Object(e))}var or=mt(Object,"create");var ir=Object.prototype.hasOwnProperty;var ar=Object.prototype.hasOwnProperty;function ur(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function sr(t,e){return t===e||t!=t&&e!=e}function cr(t,e){for(var r=t.length;r--;)if(sr(t[r][0],e))return r;return-1}ur.prototype.clear=function(){this.__data__=or?or(null):{},this.size=0},ur.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ur.prototype.get=function(t){var e=this.__data__;if(or){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return ir.call(e,t)?e[t]:void 0},ur.prototype.has=function(t){var e=this.__data__;return or?void 0!==e[t]:ar.call(e,t)},ur.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=or&&void 0===e?"__lodash_hash_undefined__":e,this};var lr=Array.prototype.splice;function fr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function dr(t,e){var r,n,o=t.__data__;return("string"==(n=typeof(r=e))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof e?"string":"hash"]:o.map}function pr(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}fr.prototype.clear=function(){this.__data__=[],this.size=0},fr.prototype.delete=function(t){var e=this.__data__,r=cr(e,t);return!(r<0)&&(r==e.length-1?e.pop():lr.call(e,r,1),--this.size,!0)},fr.prototype.get=function(t){var e=this.__data__,r=cr(e,t);return r<0?void 0:e[r][1]},fr.prototype.has=function(t){return cr(this.__data__,t)>-1},fr.prototype.set=function(t,e){var r=this.__data__,n=cr(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this},pr.prototype.clear=function(){this.size=0,this.__data__={hash:new ur,map:new(jt||fr),string:new ur}},pr.prototype.delete=function(t){var e=dr(this,t).delete(t);return this.size-=e?1:0,e},pr.prototype.get=function(t){return dr(this,t).get(t)},pr.prototype.has=function(t){return dr(this,t).has(t)},pr.prototype.set=function(t,e){var r=dr(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this};var hr="Expected a function";function gr(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError(hr);var r=function(){var n=arguments,o=e?e.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=t.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(gr.Cache||pr),r}gr.Cache=pr;var vr,br,yr,mr=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wr=/\\(\\)?/g,jr=(vr=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(mr,(function(t,r,n,o){e.push(n?o.replace(wr,"$1"):r||t)})),e},br=gr(vr,(function(t){return 500===yr.size&&yr.clear(),t})),yr=br.cache,br),_r=jr;function Or(t,e){return c(t)?t:nr(t,e)?[t]:_r(q(t))}var xr=1/0;function Ar(t){if("string"==typeof t||j(t))return t;var e=t+"";return"0"==e&&1/t==-xr?"-0":e}function Sr(t,e){for(var r=0,n=(e=Or(e,t)).length;null!=t&&r<n;)t=t[Ar(e[r++])];return r&&r==n?t:void 0}function kr(t,e,r){var n=null==t?void 0:Sr(t,e);return void 0===n?r:n}function $r(t){var e=this.__data__=new fr(t);this.size=e.size}$r.prototype.clear=function(){this.__data__=new fr,this.size=0},$r.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},$r.prototype.get=function(t){return this.__data__.get(t)},$r.prototype.has=function(t){return this.__data__.has(t)},$r.prototype.set=function(t,e){var r=this.__data__;if(r instanceof fr){var n=r.__data__;if(!jt||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new pr(n)}return r.set(t,e),this.size=r.size,this};function Ir(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new pr;++e<r;)this.add(t[e])}function Tr(t,e){for(var r=-1,n=null==t?0:t.length;++r<n;)if(e(t[r],r,t))return!0;return!1}function Dr(t,e){return t.has(e)}Ir.prototype.add=Ir.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Ir.prototype.has=function(t){return this.__data__.has(t)};var Pr=1,Mr=2;function Cr(t,e,r,n,o,i){var a=r&Pr,u=t.length,s=e.length;if(u!=s&&!(a&&s>u))return!1;var c=i.get(t),l=i.get(e);if(c&&l)return c==e&&l==t;var f=-1,d=!0,p=r&Mr?new Ir:void 0;for(i.set(t,e),i.set(e,t);++f<u;){var h=t[f],g=e[f];if(n)var v=a?n(g,h,f,e,t,i):n(h,g,f,t,e,i);if(void 0!==v){if(v)continue;d=!1;break}if(p){if(!Tr(e,(function(t,e){if(!Dr(p,e)&&(h===t||o(h,t,r,n,i)))return p.push(e)}))){d=!1;break}}else if(h!==g&&!o(h,g,r,n,i)){d=!1;break}}return i.delete(t),i.delete(e),d}var zr=a.Uint8Array;function Er(t){var e=-1,r=Array(t.size);return t.forEach((function(t,n){r[++e]=[n,t]})),r}function Lr(t){var e=-1,r=Array(t.size);return t.forEach((function(t){r[++e]=t})),r}var Fr=1,Ur=2,Wr="[object Boolean]",Br="[object Date]",Nr="[object Error]",Vr="[object Map]",Hr="[object Number]",Yr="[object RegExp]",Rr="[object Set]",qr="[object String]",Zr="[object Symbol]",Jr="[object ArrayBuffer]",Xr="[object DataView]",Gr=u?u.prototype:void 0,Qr=Gr?Gr.valueOf:void 0;function Kr(t,e){for(var r=-1,n=e.length,o=t.length;++r<n;)t[o+r]=e[r];return t}function tn(t,e,r){var n=e(t);return c(t)?n:Kr(n,r(t))}function en(t,e){for(var r=-1,n=null==t?0:t.length,o=0,i=[];++r<n;){var a=t[r];e(a,r,t)&&(i[o++]=a)}return i}function rn(){return[]}var nn=Object.prototype.propertyIsEnumerable,on=Object.getOwnPropertySymbols,an=on?function(t){return null==t?[]:(t=Object(t),en(on(t),(function(e){return nn.call(t,e)})))}:rn;function un(t){return tn(t,We,an)}var sn=1,cn=Object.prototype.hasOwnProperty;var ln=1,fn="[object Arguments]",dn="[object Array]",pn="[object Object]",hn=Object.prototype.hasOwnProperty;function gn(t,e,r,n,o,i){var a=c(t),u=c(e),s=a?dn:Et(t),l=u?dn:Et(e),f=(s=s==fn?pn:s)==pn,d=(l=l==fn?pn:l)==pn,p=s==l;if(p&&Se(t)){if(!Se(e))return!1;a=!0,f=!1}if(p&&!f)return i||(i=new $r),a||Le(t)?Cr(t,e,r,n,o,i):function(t,e,r,n,o,i,a){switch(r){case Xr:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case Jr:return!(t.byteLength!=e.byteLength||!i(new zr(t),new zr(e)));case Wr:case Br:case Hr:return sr(+t,+e);case Nr:return t.name==e.name&&t.message==e.message;case Yr:case qr:return t==e+"";case Vr:var u=Er;case Rr:var s=n&Fr;if(u||(u=Lr),t.size!=e.size&&!s)return!1;var c=a.get(t);if(c)return c==e;n|=Ur,a.set(t,e);var l=Cr(u(t),u(e),n,o,i,a);return a.delete(t),l;case Zr:if(Qr)return Qr.call(t)==Qr.call(e)}return!1}(t,e,s,r,n,o,i);if(!(r&ln)){var h=f&&hn.call(t,"__wrapped__"),g=d&&hn.call(e,"__wrapped__");if(h||g){var v=h?t.value():t,b=g?e.value():e;return i||(i=new $r),o(v,b,r,n,i)}}return!!p&&(i||(i=new $r),function(t,e,r,n,o,i){var a=r&sn,u=un(t),s=u.length;if(s!=un(e).length&&!a)return!1;for(var c=s;c--;){var l=u[c];if(!(a?l in e:cn.call(e,l)))return!1}var f=i.get(t),d=i.get(e);if(f&&d)return f==e&&d==t;var p=!0;i.set(t,e),i.set(e,t);for(var h=a;++c<s;){var g=t[l=u[c]],v=e[l];if(n)var b=a?n(v,g,l,e,t,i):n(g,v,l,t,e,i);if(!(void 0===b?g===v||o(g,v,r,n,i):b)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var y=t.constructor,m=e.constructor;y==m||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof m&&m instanceof m||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,r,n,o,i))}function vn(t,e,r,n,o){return t===e||(null==t||null==e||!m(t)&&!m(e)?t!=t&&e!=e:gn(t,e,r,n,vn,o))}var bn=1,yn=2;function mn(t){return t==t&&!et(t)}function wn(t,e){return function(r){return null!=r&&(r[t]===e&&(void 0!==e||t in Object(r)))}}function jn(t){var e=function(t){for(var e=We(t),r=e.length;r--;){var n=e[r],o=t[n];e[r]=[n,o,mn(o)]}return e}(t);return 1==e.length&&e[0][2]?wn(e[0][0],e[0][1]):function(r){return r===t||function(t,e,r,n){var o=r.length,i=o,a=!n;if(null==t)return!i;for(t=Object(t);o--;){var u=r[o];if(a&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<i;){var s=(u=r[o])[0],c=t[s],l=u[1];if(a&&u[2]){if(void 0===c&&!(s in t))return!1}else{var f=new $r;if(n)var d=n(c,l,s,t,e,f);if(!(void 0===d?vn(l,c,bn|yn,n,f):d))return!1}}return!0}(r,t,e)}}function _n(t,e){return null!=t&&e in Object(t)}function On(t,e){return null!=t&&function(t,e,r){for(var n=-1,o=(e=Or(e,t)).length,i=!1;++n<o;){var a=Ar(e[n]);if(!(i=null!=t&&r(t,a)))break;t=t[a]}return i||++n!=o?i:!!(o=null==t?0:t.length)&&Ft(o)&&Ie(a,o)&&(c(t)||_e(t))}(t,e,_n)}var xn=1,An=2;function Sn(t){return nr(t)?Bt(Ar(t)):function(t){return function(e){return Sr(e,t)}}(t)}function kn(t){return"function"==typeof t?t:null==t?Ve:"object"==typeof t?c(t)?(e=t[0],r=t[1],nr(e)&&mn(r)?wn(Ar(e),r):function(t){var n=kr(t,e);return void 0===n&&n===r?On(t,e):vn(r,n,xn|An)}):jn(t):Sn(t);var e,r}function $n(t,e){var r=-1,n=Ut(t)?Array(t.length):[];return Ne(t,(function(t,o,i){n[++r]=e(t,o,i)})),n}function In(t,e){return(c(t)?s:$n)(t,kn(e))}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var Tn={};!function(t,e){t.exports=function(){var t=1e3,e=6e4,r=36e5,n="millisecond",o="second",i="minute",a="hour",u="day",s="week",c="month",l="quarter",f="year",d="date",p="Invalid Date",h=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,v={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},b=function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},y={s:b,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),n=Math.floor(r/60),o=r%60;return(e<=0?"+":"-")+b(n,2,"0")+":"+b(o,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var n=12*(r.year()-e.year())+(r.month()-e.month()),o=e.clone().add(n,c),i=r-o<0,a=e.clone().add(n+(i?-1:1),c);return+(-(n+(r-o)/(i?o-a:a-o))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:f,w:s,d:u,D:d,h:a,m:i,s:o,ms:n,Q:l}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},m="en",w={};w[m]=v;var j="$isDayjsObject",_=function(t){return t instanceof S||!(!t||!t[j])},O=function t(e,r,n){var o;if(!e)return m;if("string"==typeof e){var i=e.toLowerCase();w[i]&&(o=i),r&&(w[i]=r,o=i);var a=e.split("-");if(!o&&a.length>1)return t(a[0])}else{var u=e.name;w[u]=e,o=u}return!n&&o&&(m=o),o||!n&&m},x=function(t,e){if(_(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)},A=y;A.l=O,A.i=_,A.w=function(t,e){return x(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function v(t){this.$L=O(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[j]=!0}var b=v.prototype;return b.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(A.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var n=e.match(h);if(n){var o=n[2]-1||0,i=(n[7]||"0").substring(0,3);return r?new Date(Date.UTC(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)):new Date(n[1],o,n[3]||1,n[4]||0,n[5]||0,n[6]||0,i)}}return new Date(e)}(t),this.init()},b.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},b.$utils=function(){return A},b.isValid=function(){return!(this.$d.toString()===p)},b.isSame=function(t,e){var r=x(t);return this.startOf(e)<=r&&r<=this.endOf(e)},b.isAfter=function(t,e){return x(t)<this.startOf(e)},b.isBefore=function(t,e){return this.endOf(e)<x(t)},b.$g=function(t,e,r){return A.u(t)?this[e]:this.set(r,t)},b.unix=function(){return Math.floor(this.valueOf()/1e3)},b.valueOf=function(){return this.$d.getTime()},b.startOf=function(t,e){var r=this,n=!!A.u(e)||e,l=A.p(t),p=function(t,e){var o=A.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return n?o:o.endOf(u)},h=function(t,e){return A.w(r.toDate()[t].apply(r.toDate("s"),(n?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},g=this.$W,v=this.$M,b=this.$D,y="set"+(this.$u?"UTC":"");switch(l){case f:return n?p(1,0):p(31,11);case c:return n?p(1,v):p(0,v+1);case s:var m=this.$locale().weekStart||0,w=(g<m?g+7:g)-m;return p(n?b-w:b+(6-w),v);case u:case d:return h(y+"Hours",0);case a:return h(y+"Minutes",1);case i:return h(y+"Seconds",2);case o:return h(y+"Milliseconds",3);default:return this.clone()}},b.endOf=function(t){return this.startOf(t,!1)},b.$set=function(t,e){var r,s=A.p(t),l="set"+(this.$u?"UTC":""),p=(r={},r[u]=l+"Date",r[d]=l+"Date",r[c]=l+"Month",r[f]=l+"FullYear",r[a]=l+"Hours",r[i]=l+"Minutes",r[o]=l+"Seconds",r[n]=l+"Milliseconds",r)[s],h=s===u?this.$D+(e-this.$W):e;if(s===c||s===f){var g=this.clone().set(d,1);g.$d[p](h),g.init(),this.$d=g.set(d,Math.min(this.$D,g.daysInMonth())).$d}else p&&this.$d[p](h);return this.init(),this},b.set=function(t,e){return this.clone().$set(t,e)},b.get=function(t){return this[A.p(t)]()},b.add=function(n,l){var d,p=this;n=Number(n);var h=A.p(l),g=function(t){var e=x(p);return A.w(e.date(e.date()+Math.round(t*n)),p)};if(h===c)return this.set(c,this.$M+n);if(h===f)return this.set(f,this.$y+n);if(h===u)return g(1);if(h===s)return g(7);var v=(d={},d[i]=e,d[a]=r,d[o]=t,d)[h]||1,b=this.$d.getTime()+n*v;return A.w(b,this)},b.subtract=function(t,e){return this.add(-1*t,e)},b.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||p;var n=t||"YYYY-MM-DDTHH:mm:ssZ",o=A.z(this),i=this.$H,a=this.$m,u=this.$M,s=r.weekdays,c=r.months,l=r.meridiem,f=function(t,r,o,i){return t&&(t[r]||t(e,n))||o[r].slice(0,i)},d=function(t){return A.s(i%12||12,t,"0")},h=l||function(t,e,r){var n=t<12?"AM":"PM";return r?n.toLowerCase():n};return n.replace(g,(function(t,n){return n||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return A.s(e.$y,4,"0");case"M":return u+1;case"MM":return A.s(u+1,2,"0");case"MMM":return f(r.monthsShort,u,c,3);case"MMMM":return f(c,u);case"D":return e.$D;case"DD":return A.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return f(r.weekdaysMin,e.$W,s,2);case"ddd":return f(r.weekdaysShort,e.$W,s,3);case"dddd":return s[e.$W];case"H":return String(i);case"HH":return A.s(i,2,"0");case"h":return d(1);case"hh":return d(2);case"a":return h(i,a,!0);case"A":return h(i,a,!1);case"m":return String(a);case"mm":return A.s(a,2,"0");case"s":return String(e.$s);case"ss":return A.s(e.$s,2,"0");case"SSS":return A.s(e.$ms,3,"0");case"Z":return o}return null}(t)||o.replace(":","")}))},b.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},b.diff=function(n,d,p){var h,g=this,v=A.p(d),b=x(n),y=(b.utcOffset()-this.utcOffset())*e,m=this-b,w=function(){return A.m(g,b)};switch(v){case f:h=w()/12;break;case c:h=w();break;case l:h=w()/3;break;case s:h=(m-y)/6048e5;break;case u:h=(m-y)/864e5;break;case a:h=m/r;break;case i:h=m/e;break;case o:h=m/t;break;default:h=m}return p?h:A.a(h)},b.daysInMonth=function(){return this.endOf(c).$D},b.$locale=function(){return w[this.$L]},b.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),n=O(t,e,!0);return n&&(r.$L=n),r},b.clone=function(){return A.w(this.$d,this)},b.toDate=function(){return new Date(this.valueOf())},b.toJSON=function(){return this.isValid()?this.toISOString():null},b.toISOString=function(){return this.$d.toISOString()},b.toString=function(){return this.$d.toUTCString()},v}(),k=S.prototype;return x.prototype=k,[["$ms",n],["$s",o],["$m",i],["$H",a],["$W",u],["$M",c],["$y",f],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),x.extend=function(t,e){return t.$i||(t(e,S,x),t.$i=!0),x},x.locale=O,x.isDayjs=_,x.unix=function(t){return x(1e3*t)},x.en=w[m],x.Ls=w,x.p={},x}()}({get exports(){return Tn},set exports(t){Tn=t}});var Dn=Tn;var Pn=function(){try{var t=mt(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),Mn=Pn;function Cn(t,e,r){"__proto__"==e&&Mn?Mn(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var zn=Object.prototype.hasOwnProperty;function En(t,e,r){var n=t[e];zn.call(t,e)&&sr(n,r)&&(void 0!==r||e in t)||Cn(t,e,r)}function Ln(t,e,r,n){var o=!r;r||(r={});for(var i=-1,a=e.length;++i<a;){var u=e[i],s=n?n(r[u],t[u],u,r,t):void 0;void 0===s&&(s=t[u]),o?Cn(r,u,s):En(r,u,s)}return r}var Fn=Object.prototype.hasOwnProperty;function Un(t){if(!et(t))return function(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}(t);var e=X(t),r=[];for(var n in t)("constructor"!=n||!e&&Fn.call(t,n))&&r.push(n);return r}function Wn(t){return Ut(t)?Ue(t,!0):Un(t)}var Bn="object"==typeof exports&&exports&&!exports.nodeType&&exports,Nn=Bn&&"object"==typeof module&&module&&!module.nodeType&&module,Vn=Nn&&Nn.exports===Bn?a.Buffer:void 0,Hn=Vn?Vn.allocUnsafe:void 0;var Yn=G(Object.getPrototypeOf,Object),Rn=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)Kr(e,an(t)),t=Yn(t);return e}:rn,qn=Rn;function Zn(t){return tn(t,Wn,qn)}var Jn=Object.prototype.hasOwnProperty;function Xn(t){var e=new t.constructor(t.byteLength);return new zr(e).set(new zr(t)),e}var Gn=/\w*$/;var Qn=u?u.prototype:void 0,Kn=Qn?Qn.valueOf:void 0;var to="[object Boolean]",eo="[object Date]",ro="[object Map]",no="[object Number]",oo="[object RegExp]",io="[object Set]",ao="[object String]",uo="[object Symbol]",so="[object ArrayBuffer]",co="[object DataView]",lo="[object Float32Array]",fo="[object Float64Array]",po="[object Int8Array]",ho="[object Int16Array]",go="[object Int32Array]",vo="[object Uint8Array]",bo="[object Uint8ClampedArray]",yo="[object Uint16Array]",mo="[object Uint32Array]";function wo(t,e,r){var n,o=t.constructor;switch(e){case so:return Xn(t);case to:case eo:return new o(+t);case co:return function(t,e){var r=e?Xn(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}(t,r);case lo:case fo:case po:case ho:case go:case vo:case bo:case yo:case mo:return function(t,e){var r=e?Xn(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}(t,r);case ro:return new o;case no:case ao:return new o(t);case oo:return function(t){var e=new t.constructor(t.source,Gn.exec(t));return e.lastIndex=t.lastIndex,e}(t);case io:return new o;case uo:return n=t,Kn?Object(Kn.call(n)):{}}}var jo=Object.create,_o=function(){function t(){}return function(e){if(!et(e))return{};if(jo)return jo(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}(),Oo=_o;var xo=ze&&ze.isMap,Ao=xo?De(xo):function(t){return m(t)&&"[object Map]"==Et(t)};var So=ze&&ze.isSet,ko=So?De(So):function(t){return m(t)&&"[object Set]"==Et(t)},$o=1,Io=2,To=4,Do="[object Arguments]",Po="[object Function]",Mo="[object GeneratorFunction]",Co="[object Object]",zo={};function Eo(t,e,r,n,o,i){var a,u=e&$o,s=e&Io,l=e&To;if(r&&(a=o?r(t,n,o,i):r(t)),void 0!==a)return a;if(!et(t))return t;var f=c(t);if(f){if(a=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&Jn.call(t,"index")&&(r.index=t.index,r.input=t.input),r}(t),!u)return function(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}(t,a)}else{var d=Et(t),p=d==Po||d==Mo;if(Se(t))return function(t,e){if(e)return t.slice();var r=t.length,n=Hn?Hn(r):new t.constructor(r);return t.copy(n),n}(t,u);if(d==Co||d==Do||p&&!o){if(a=s||p?{}:function(t){return"function"!=typeof t.constructor||X(t)?{}:Oo(Yn(t))}(t),!u)return s?function(t,e){return Ln(t,qn(t),e)}(t,function(t,e){return t&&Ln(e,Wn(e),t)}(a,t)):function(t,e){return Ln(t,an(t),e)}(t,function(t,e){return t&&Ln(e,We(e),t)}(a,t))}else{if(!zo[d])return o?t:{};a=wo(t,d,u)}}i||(i=new $r);var h=i.get(t);if(h)return h;i.set(t,a),ko(t)?t.forEach((function(n){a.add(Eo(n,e,r,n,t,i))})):Ao(t)&&t.forEach((function(n,o){a.set(o,Eo(n,e,r,o,t,i))}));var g=f?void 0:(l?s?Zn:un:s?Wn:We)(t);return he(g||t,(function(n,o){g&&(n=t[o=n]),En(a,o,Eo(n,e,r,o,t,i))})),a}zo[Do]=zo["[object Array]"]=zo["[object ArrayBuffer]"]=zo["[object DataView]"]=zo["[object Boolean]"]=zo["[object Date]"]=zo["[object Float32Array]"]=zo["[object Float64Array]"]=zo["[object Int8Array]"]=zo["[object Int16Array]"]=zo["[object Int32Array]"]=zo["[object Map]"]=zo["[object Number]"]=zo[Co]=zo["[object RegExp]"]=zo["[object Set]"]=zo["[object String]"]=zo["[object Symbol]"]=zo["[object Uint8Array]"]=zo["[object Uint8ClampedArray]"]=zo["[object Uint16Array]"]=zo["[object Uint32Array]"]=!0,zo["[object Error]"]=zo[Po]=zo["[object WeakMap]"]=!1;var Lo=1,Fo=4;var Uo={},Wo={get exports(){return Uo},set exports(t){Uo=t}},Bo={},No={},Vo={get exports(){return No},set exports(t){No=t}},Ho={};function Yo(){var t={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1};return t}var Ro=/javascript\s*\:/gim;Ho.whiteList=Yo(),Ho.getDefaultWhiteList=Yo,Ho.onAttr=function(t,e,r){},Ho.onIgnoreAttr=function(t,e,r){},Ho.safeAttrValue=function(t,e){return Ro.test(e)?"":e};var qo={indexOf:function(t,e){var r,n;if(Array.prototype.indexOf)return t.indexOf(e);for(r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1},forEach:function(t,e,r){var n,o;if(Array.prototype.forEach)return t.forEach(e,r);for(n=0,o=t.length;n<o;n++)e.call(r,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}};var Zo=function(t,e){";"!==(t=qo.trimRight(t))[t.length-1]&&(t+=";");var r=t.length,n=!1,o=0,i=0,a="";function u(){if(!n){var r=qo.trim(t.slice(o,i)),u=r.indexOf(":");if(-1!==u){var s=qo.trim(r.slice(0,u)),c=qo.trim(r.slice(u+1));if(s){var l=e(o,a.length,s,c,r);l&&(a+=l+"; ")}}}o=i+1}for(;i<r;i++){var s=t[i];if("/"===s&&"*"===t[i+1]){var c=t.indexOf("*/",i+2);if(-1===c)break;o=(i=c+1)+1,n=!1}else"("===s?n=!0:")"===s?n=!1:";"===s?n||u():"\n"===s&&u()}return qo.trim(a)},Jo=Ho,Xo=Zo;function Go(t){return null==t}function Qo(t){(t=function(t){var e={};for(var r in t)e[r]=t[r];return e}(t||{})).whiteList=t.whiteList||Jo.whiteList,t.onAttr=t.onAttr||Jo.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||Jo.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||Jo.safeAttrValue,this.options=t}Qo.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,r=e.whiteList,n=e.onAttr,o=e.onIgnoreAttr,i=e.safeAttrValue;return Xo(t,(function(t,e,a,u,s){var c=r[a],l=!1;if(!0===c?l=c:"function"==typeof c?l=c(u):c instanceof RegExp&&(l=c.test(u)),!0!==l&&(l=!1),u=i(a,u)){var f,d={position:e,sourcePosition:t,source:s,isWhite:l};return l?Go(f=n(a,u,d))?a+":"+u:f:Go(f=o(a,u,d))?void 0:f}}))};var Ko=Qo;!function(t,e){var r=Ho,n=Ko;for(var o in(e=t.exports=function(t,e){return new n(e).process(t)}).FilterCSS=n,r)e[o]=r[o];"undefined"!=typeof window&&(window.filterCSS=t.exports)}(Vo,No);var ti={indexOf:function(t,e){var r,n;if(Array.prototype.indexOf)return t.indexOf(e);for(r=0,n=t.length;r<n;r++)if(t[r]===e)return r;return-1},forEach:function(t,e,r){var n,o;if(Array.prototype.forEach)return t.forEach(e,r);for(n=0,o=t.length;n<o;n++)e.call(r,t[n],n,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1}},ei=No.FilterCSS,ri=No.getDefaultWhiteList,ni=ti;function oi(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var ii=new ei;function ai(t){return t.replace(ui,"<").replace(si,">")}var ui=/</g,si=/>/g,ci=/"/g,li=/"/g,fi=/&#([a-zA-Z0-9]*);?/gim,di=/:?/gim,pi=/&newline;?/gim,hi=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,gi=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,vi=/u\s*r\s*l\s*\(.*/gi;function bi(t){return t.replace(ci,""")}function yi(t){return t.replace(li,'"')}function mi(t){return t.replace(fi,(function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))}))}function wi(t){return t.replace(di,":").replace(pi," ")}function ji(t){for(var e="",r=0,n=t.length;r<n;r++)e+=t.charCodeAt(r)<32?" ":t.charAt(r);return ni.trim(e)}function _i(t){return t=ji(t=wi(t=mi(t=yi(t))))}function Oi(t){return t=ai(t=bi(t))}Bo.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]},Bo.getDefaultWhiteList=oi,Bo.onTag=function(t,e,r){},Bo.onIgnoreTag=function(t,e,r){},Bo.onTagAttr=function(t,e,r){},Bo.onIgnoreTagAttr=function(t,e,r){},Bo.safeAttrValue=function(t,e,r,n){if(r=_i(r),"href"===e||"src"===e){if("#"===(r=ni.trim(r)))return"#";if("http://"!==r.substr(0,7)&&"https://"!==r.substr(0,8)&&"mailto:"!==r.substr(0,7)&&"tel:"!==r.substr(0,4)&&"data:image/"!==r.substr(0,11)&&"ftp://"!==r.substr(0,6)&&"./"!==r.substr(0,2)&&"../"!==r.substr(0,3)&&"#"!==r[0]&&"/"!==r[0])return""}else if("background"===e){if(hi.lastIndex=0,hi.test(r))return""}else if("style"===e){if(gi.lastIndex=0,gi.test(r))return"";if(vi.lastIndex=0,vi.test(r)&&(hi.lastIndex=0,hi.test(r)))return"";!1!==n&&(r=(n=n||ii).process(r))}return r=Oi(r)},Bo.escapeHtml=ai,Bo.escapeQuote=bi,Bo.unescapeQuote=yi,Bo.escapeHtmlEntities=mi,Bo.escapeDangerHtml5Entities=wi,Bo.clearNonPrintableCharacter=ji,Bo.friendlyAttrValue=_i,Bo.escapeAttrValue=Oi,Bo.onIgnoreTagStripAll=function(){return""},Bo.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var r=!Array.isArray(t),n=[],o=!1;return{onIgnoreTag:function(i,a,u){if(function(e){return!!r||-1!==ni.indexOf(t,e)}(i)){if(u.isClosing){var s="[/removed]",c=u.position+s.length;return n.push([!1!==o?o:u.position,c]),o=!1,s}return o||(o=u.position),"[removed]"}return e(i,a,u)},remove:function(t){var e="",r=0;return ni.forEach(n,(function(n){e+=t.slice(r,n[0]),r=n[1]})),e+=t.slice(r)}}},Bo.stripCommentTag=function(t){for(var e="",r=0;r<t.length;){var n=t.indexOf("\x3c!--",r);if(-1===n){e+=t.slice(r);break}e+=t.slice(r,n);var o=t.indexOf("--\x3e",n);if(-1===o)break;r=o+3}return e},Bo.stripBlankChar=function(t){var e=t.split("");return(e=e.filter((function(t){var e=t.charCodeAt(0);return 127!==e&&(!(e<=31)||(10===e||13===e))}))).join("")},Bo.attributeWrapSign='"',Bo.cssFilter=ii,Bo.getDefaultCSSWhiteList=ri;var xi={},Ai=ti;function Si(t){var e,r=Ai.spaceIndex(t);return e=-1===r?t.slice(1,-1):t.slice(1,r+1),"/"===(e=Ai.trim(e).toLowerCase()).slice(0,1)&&(e=e.slice(1)),"/"===e.slice(-1)&&(e=e.slice(0,-1)),e}function ki(t){return"</"===t.slice(0,2)}var $i=/[^a-zA-Z0-9\\_:.-]/gim;function Ii(t,e){for(;e<t.length;e++){var r=t[e];if(" "!==r)return"="===r?e:-1}}function Ti(t,e){for(;e<t.length;e++){var r=t[e];if(" "!==r)return"'"===r||'"'===r?e:-1}}function Di(t,e){for(;e>0;e--){var r=t[e];if(" "!==r)return"="===r?e:-1}}function Pi(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}xi.parseTag=function(t,e,r){var n="",o=0,i=!1,a=!1,u=0,s=t.length,c="",l="";t:for(u=0;u<s;u++){var f=t.charAt(u);if(!1===i){if("<"===f){i=u;continue}}else if(!1===a){if("<"===f){n+=r(t.slice(o,u)),i=u,o=u;continue}if(">"===f||u===s-1){n+=r(t.slice(o,i)),c=Si(l=t.slice(i,u+1)),n+=e(i,n.length,c,l,ki(l)),o=u+1,i=!1;continue}if('"'===f||"'"===f)for(var d=1,p=t.charAt(u-d);""===p.trim()||"="===p;){if("="===p){a=f;continue t}p=t.charAt(u-++d)}}else if(f===a){a=!1;continue}}return o<s&&(n+=r(t.substr(o))),n},xi.parseAttr=function(t,e){var r=0,n=0,o=[],i=!1,a=t.length;function u(t,r){if(!((t=(t=Ai.trim(t)).replace($i,"").toLowerCase()).length<1)){var n=e(t,r||"");n&&o.push(n)}}for(var s=0;s<a;s++){var c,l=t.charAt(s);if(!1!==i||"="!==l)if(!1===i||s!==n)if(/\s|\n|\t/.test(l)){if(t=t.replace(/\s|\n|\t/g," "),!1===i){if(-1===(c=Ii(t,s))){u(Ai.trim(t.slice(r,s))),i=!1,r=s+1;continue}s=c-1;continue}if(-1===(c=Di(t,s-1))){u(i,Pi(Ai.trim(t.slice(r,s)))),i=!1,r=s+1;continue}}else;else{if(-1===(c=t.indexOf(l,s+1)))break;u(i,Ai.trim(t.slice(n+1,c))),i=!1,r=(s=c)+1}else i=t.slice(r,s),r=s+1,n='"'===t.charAt(r)||"'"===t.charAt(r)?r:Ti(t,s+1)}return r<t.length&&(!1===i?u(t.slice(r)):u(i,Pi(Ai.trim(t.slice(r))))),Ai.trim(o.join(" "))};var Mi=No.FilterCSS,Ci=Bo,zi=xi,Ei=zi.parseTag,Li=zi.parseAttr,Fi=ti;function Ui(t){return null==t}function Wi(t){(t=function(t){var e={};for(var r in t)e[r]=t[r];return e}(t||{})).stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=Ci.onIgnoreTagStripAll),t.whiteList||t.allowList?t.whiteList=function(t){var e={};for(var r in t)Array.isArray(t[r])?e[r.toLowerCase()]=t[r].map((function(t){return t.toLowerCase()})):e[r.toLowerCase()]=t[r];return e}(t.whiteList||t.allowList):t.whiteList=Ci.whiteList,this.attributeWrapSign=!0===t.singleQuotedAttributeValue?"'":Ci.attributeWrapSign,t.onTag=t.onTag||Ci.onTag,t.onTagAttr=t.onTagAttr||Ci.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||Ci.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||Ci.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||Ci.safeAttrValue,t.escapeHtml=t.escapeHtml||Ci.escapeHtml,this.options=t,!1===t.css?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new Mi(t.css))}Wi.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this,r=e.options,n=r.whiteList,o=r.onTag,i=r.onIgnoreTag,a=r.onTagAttr,u=r.onIgnoreTagAttr,s=r.safeAttrValue,c=r.escapeHtml,l=e.attributeWrapSign,f=e.cssFilter;r.stripBlankChar&&(t=Ci.stripBlankChar(t)),r.allowCommentTag||(t=Ci.stripCommentTag(t));var d=!1;r.stripIgnoreTagBody&&(d=Ci.StripTagBody(r.stripIgnoreTagBody,i),i=d.onIgnoreTag);var p=Ei(t,(function(t,e,r,d,p){var h={sourcePosition:t,position:e,isClosing:p,isWhite:Object.prototype.hasOwnProperty.call(n,r)},g=o(r,d,h);if(!Ui(g))return g;if(h.isWhite){if(h.isClosing)return"</"+r+">";var v=function(t){var e=Fi.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var r="/"===(t=Fi.trim(t.slice(e+1,-1)))[t.length-1];return r&&(t=Fi.trim(t.slice(0,-1))),{html:t,closing:r}}(d),b=n[r],y=Li(v.html,(function(t,e){var n=-1!==Fi.indexOf(b,t),o=a(r,t,e,n);return Ui(o)?n?(e=s(r,t,e,f))?t+"="+l+e+l:t:Ui(o=u(r,t,e,n))?void 0:o:o}));return d="<"+r,y&&(d+=" "+y),v.closing&&(d+=" /"),d+=">"}return Ui(g=i(r,d,h))?c(d):g}),c);return d&&(p=d.remove(p)),p};var Bi=Wi;!function(t,e){var r=Bo,n=xi,o=Bi;function i(t,e){return new o(e).process(t)}(e=t.exports=i).filterXSS=i,e.FilterXSS=o,function(){for(var t in r)e[t]=r[t];for(var o in n)e[o]=n[o]}(),"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)}(Wo,Uo);var Ni=Uo;function Vi(){return"undefined"!=typeof self?self:"undefined"!=typeof window&&void 0!==window.document?window:"undefined"!=typeof global?global:null}function Hi(t){let e=function(){let t=Vi();return Ni||t.Tesseract}();let r=function t(r){return Re(r)||qe(r)?(He(r,(function(e,n){r[n]=t(e)})),r):Ke(r)?e(r,{onIgnoreTagAttr:function(t,r,n,o){if("style"===r)return r+'="'+e.escapeAttrValue(n)+'"'}}):r}(Eo(t,Lo|Fo));return r}let Yi=null,Ri=null;function qi(t,e,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"save";if(!Xe(Yi))throw console.log("ds",Yi),new Error("invalid ds");let o=Yi[t].keys,i=!1;Re(r)||(i=!0,r=[r]);let a=function(){if(!Ze(Dn))throw new Error("invalid dayjs");return Dn().format("YYYY-MM-DDTHH:mm:ss.SSSZ")}();return n.indexOf("insert")>=0&&(o.indexOf("userId")>=0&&He(r,((t,n)=>{r[n].userId=e})),o.indexOf("timeCreate")>=0&&He(r,((t,e)=>{r[e].timeCreate=a})),o.indexOf("userIdUpdate")>=0&&He(r,((t,n)=>{r[n].userIdUpdate=e})),o.indexOf("timeUpdate")>=0&&He(r,((t,e)=>{r[e].timeUpdate=a}))),(n.indexOf("insert")>=0||n.indexOf("save")>=0)&&(o.indexOf("userIdUpdate")>=0&&He(r,((t,n)=>{r[n].userIdUpdate=e})),o.indexOf("timeUpdate")>=0&&He(r,((t,e)=>{r[e].timeUpdate=a}))),r=In(r,((t,e)=>{let r={};return He(t,((t,e)=>{t=Hi(t),r[e]=t})),r})),r=i?r[0]:r}async function Zi(t,e,r,n){let o,i=null;if(!Xe(Ri))return Promise.reject("無有效woItems");let a=kr(Ri,e,null);if(null===a)return Promise.reject(`ORM找不到表名稱: ${e}`);if("select"===r){if(o=await a.select(n).catch((t=>{console.log(`${e}.select catch`,t),i="取得資料失敗"})),Ke(i))return Promise.reject(i)}else if("insert"===r||"save"===r){try{n=qi(e,t,n,r)}catch(t){return console.log("adjustData catch",t.toString()),i="調整資料失敗",Promise.reject(i)}if("insert"===r?o=await a.insert(n).catch((t=>{console.log(`${e}.save catch`,t),i="新增資料失敗"})):"save"===r&&(o=await a.save(n).catch((t=>{console.log(`${e}.save catch`,t),i="儲存資料失敗"}))),Ke(i))return Promise.reject(i);o=Re(n)?In(n,(t=>({id:t.id}))):{id:n.id}}else if("del"===r)o=await a.del(n).catch((t=>{console.log(`${e}.del catch`,t),i="刪除資料失敗"}));else if("delAll"===r)o=await a.delAll(n).catch((t=>{console.log(`${e}.delAll catch`,t),i="刪除資料失敗"}));else if("mix"===r){if(!Xe(n))return Promise.reject("mix僅支援輸入ltdtDiffByKey結果物件");let r;o=[];let u=kr(n,"add",[]);if(oe(u)>0){try{u=qi(e,t,u,"insert+save")}catch(t){return console.log("adjustData catch",t.toString()),i="調整資料失敗",Promise.reject(i)}if(await a.insert(u).catch((t=>{console.log(`${e}.save catch`,t),i="新增資料失敗"})),Ke(i))return Promise.reject(i);r=In(u,(t=>({id:t.id}))),o=[...o,...r]}let s=kr(n,"del",[]);if(oe(s)>0){if(await a.del(s).catch((t=>{console.log(`${e}.save catch`,t),i="刪除資料失敗"})),Ke(i))return Promise.reject(i);r=In(s,(t=>({id:t.id}))),o=[...o,...r]}let c=kr(n,"diff",[]);if(oe(c)>0){try{c=qi(e,t,c)}catch(t){return console.log("adjustData catch",t.toString()),i="調整資料失敗",Promise.reject(i)}if(await a.save(c).catch((t=>{console.log(`${e}.save catch`,t),i="變更資料失敗"})),Ke(i))return Promise.reject(i);r=In(c,(t=>({id:t.id}))),o=[...o,...r]}}else i=`invalid mode: ${r}`;return Ke(i)?Promise.reject(i):o}function Ji(t,e){return Yi=t,Ri=e,Zi}function Xi(t,e){var r=[];return Ne(t,(function(t,n,o){e(t,n,o)&&r.push(t)})),r}function Gi(t){let e=!1;if(Ke(t))e=!isNaN(Number(t));else if(function(t){return"[object Number]"===Object.prototype.toString.call(t)}(t)){if(function(t){return t!=t}(t))return!1;e=!0}return e}function Qi(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!Re(t)){let t=Ye();return t.reject("pms is not an array"),t}return t.reduce(((t,e)=>t.then(e)),Promise.resolve(e))}let Ki=[],ta=[],ea=[],ra=null,na=null,oa=!0,ia=!0;function aa(t){setTimeout((()=>{Ki.push(t)}),1)}function ua(t){setTimeout((()=>{ta.push(t)}),1)}function sa(t){setTimeout((()=>{ea.push(t)}),1)}async function ca(t,e,r,n){if(!Ze(ra))return Promise.reject("invalid mapOrm");if(oa&&!Ke(t))return console.log("userId",t),console.log("找不到使用者主鍵"),Promise.reject("找不到使用者主鍵");let o="n";if(oa){if(!Ze(na))return Promise.reject("invalid getUserById");let e=await na(t);if(!e)return console.log("userId",t),console.log("找不到使用者資訊"),Promise.reject("找不到使用者資訊");o=kr(e,"isAdmin"),"y"!==o&&"n"!==o&&(o="n");let r=kr(e,"isActive");if("y"!==r&&"n"!==r&&(r="n"),"y"!==r)return console.log("userId",t),console.log("oSelf",e),console.log("使用者被停權或無有效使用者資訊"),Promise.reject("使用者被停權或無有效使用者資訊")}if(await Je(Ki,(i=>i({woName:e,userId:t,isAdmin:o,mode:r,input:n}))),oe(ta)>0){let i={woName:e,userId:t,isAdmin:o,mode:r,input:n},a=await Qi(ta,i);n=a.input}let i=await ra(t,e,r,n);var a,u;return ia&&"n"===o&&"select"===r&&Re(i)&&(u=t=>{return r="isActive",!(qe(e=t)&&(Ke(r)||Gi(r))&&r in e&&"n"===t.isActive);var e,r},i=(c(a=i)?en:Xi)(a,kn(u))),oe(ea)>0&&(i=await Qi(ea,{woName:e,userId:t,isAdmin:o,mode:r,input:n,output:i})),i}function la(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function fa(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?la(Object(r),!0).forEach((function(e){n(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):la(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}return function(t,e,r,n){let o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},i=function(t,e,r,n){if(!Xe(t))throw console.log("ds",t),new Error("invalid ds");if(!Ze(e))throw console.log("WOrm",e),new Error("invalid WOrm");if(!Ke(r))throw console.log("url",r),new Error("invalid url");if(!Ke(n))throw console.log("db",n),new Error("invalid db");let o={};return He(We(t),(t=>{let i=new e({url:r,db:n,cl:t});o[t]=i})),o}(t,e,r,n),a=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ze(t)?(ra=t,oa=kr(e,"useCheckUser"),Qe(oa)||(oa=!0),na=kr(e,"getUserById"),ia=kr(e,"useExcludeWhenNotAdmin"),Qe(ia)||(ia=!0),{addFunCheck:aa,addFunPreProcessing:ua,addFunPostProcessing:sa,procOrm:ca}):Promise.reject("invalid mapOrm")}(Ji(t,i),o);return fa(fa({},tr),{},{woItems:i},a)}}));
|
|
7
7
|
//# sourceMappingURL=w-serv-orm.umd.js.map
|