@nocobase/plugin-notification-manager 2.2.0-alpha.3 → 2.2.0-alpha.5
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/dist/client-v2/index.js +1 -1
- package/dist/client-v2/locale.d.ts +1 -1
- package/dist/externalVersion.js +9 -9
- package/dist/node_modules/uuid/dist/bin/uuid +2 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/index.js +104 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/max.js +7 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/md5.js +200 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/native.js +10 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/nil.js +7 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/parse.js +44 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/regex.js +7 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/rng.js +23 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/sha1.js +82 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/stringify.js +38 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v1.js +131 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v1ToV6.js +26 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v3.js +11 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v35.js +63 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v4.js +32 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v5.js +11 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v6.js +42 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v6ToV1.js +26 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/v7.js +152 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/validate.js +12 -0
- package/dist/node_modules/uuid/dist/commonjs-browser/version.js +15 -0
- package/dist/node_modules/uuid/dist/esm-browser/index.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/max.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/md5.js +172 -113
- package/dist/node_modules/uuid/dist/esm-browser/native.js +4 -2
- package/dist/node_modules/uuid/dist/esm-browser/nil.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/parse.js +34 -6
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +14 -8
- package/dist/node_modules/uuid/dist/esm-browser/sha1.js +68 -62
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +25 -29
- package/dist/node_modules/uuid/dist/esm-browser/v1.js +117 -75
- package/dist/node_modules/uuid/dist/esm-browser/v1ToV6.js +16 -6
- package/dist/node_modules/uuid/dist/esm-browser/v3.js +3 -8
- package/dist/node_modules/uuid/dist/esm-browser/v35.js +47 -31
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +19 -21
- package/dist/node_modules/uuid/dist/esm-browser/v5.js +3 -8
- package/dist/node_modules/uuid/dist/esm-browser/v6.js +32 -16
- package/dist/node_modules/uuid/dist/esm-browser/v6ToV1.js +15 -5
- package/dist/node_modules/uuid/dist/esm-browser/v7.js +139 -58
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +2 -2
- package/dist/node_modules/uuid/dist/esm-browser/version.js +5 -5
- package/dist/node_modules/uuid/dist/{esm → esm-node}/index.js +1 -1
- package/dist/node_modules/uuid/dist/esm-node/max.js +1 -0
- package/dist/node_modules/uuid/dist/esm-node/md5.js +10 -0
- package/dist/node_modules/uuid/dist/esm-node/native.js +4 -0
- package/dist/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/dist/node_modules/uuid/dist/esm-node/parse.js +37 -0
- package/dist/node_modules/uuid/dist/{esm → esm-node}/regex.js +1 -1
- package/dist/node_modules/uuid/dist/esm-node/rng.js +10 -0
- package/dist/node_modules/uuid/dist/esm-node/sha1.js +10 -0
- package/dist/node_modules/uuid/dist/esm-node/stringify.js +31 -0
- package/dist/node_modules/uuid/dist/esm-node/v1.js +125 -0
- package/dist/node_modules/uuid/dist/esm-node/v1ToV6.js +20 -0
- package/dist/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/dist/node_modules/uuid/dist/esm-node/v35.js +55 -0
- package/dist/node_modules/uuid/dist/esm-node/v4.js +25 -0
- package/dist/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/dist/node_modules/uuid/dist/esm-node/v6.js +32 -0
- package/dist/node_modules/uuid/dist/esm-node/v6ToV1.js +20 -0
- package/dist/node_modules/uuid/dist/esm-node/v7.js +146 -0
- package/dist/node_modules/uuid/dist/esm-node/validate.js +5 -0
- package/dist/node_modules/uuid/dist/esm-node/version.js +8 -0
- package/dist/node_modules/uuid/dist/index.js +1 -0
- package/dist/node_modules/uuid/dist/max.js +7 -0
- package/dist/node_modules/uuid/dist/md5-browser.js +200 -0
- package/dist/node_modules/uuid/dist/md5.js +17 -0
- package/dist/node_modules/uuid/dist/native-browser.js +10 -0
- package/dist/node_modules/uuid/dist/native.js +11 -0
- package/dist/node_modules/uuid/dist/nil.js +7 -0
- package/dist/node_modules/uuid/dist/parse.js +44 -0
- package/dist/node_modules/uuid/dist/regex.js +7 -0
- package/dist/node_modules/uuid/dist/rng-browser.js +23 -0
- package/dist/node_modules/uuid/dist/rng.js +17 -0
- package/dist/node_modules/uuid/dist/sha1-browser.js +82 -0
- package/dist/node_modules/uuid/dist/sha1.js +17 -0
- package/dist/node_modules/uuid/dist/stringify.js +38 -0
- package/dist/node_modules/uuid/dist/uuid-bin.js +75 -0
- package/dist/node_modules/uuid/dist/v1.js +131 -0
- package/dist/node_modules/uuid/dist/v1ToV6.js +26 -0
- package/dist/node_modules/uuid/dist/v3.js +11 -0
- package/dist/node_modules/uuid/dist/v35.js +63 -0
- package/dist/node_modules/uuid/dist/v4.js +32 -0
- package/dist/node_modules/uuid/dist/v5.js +11 -0
- package/dist/node_modules/uuid/dist/v6.js +38 -0
- package/dist/node_modules/uuid/dist/v6ToV1.js +26 -0
- package/dist/node_modules/uuid/dist/v7.js +152 -0
- package/dist/node_modules/uuid/dist/validate.js +12 -0
- package/dist/node_modules/uuid/dist/version.js +15 -0
- package/dist/node_modules/uuid/package.json +1 -1
- package/package.json +2 -2
- package/dist/node_modules/uuid/dist/cjs/index.d.ts +0 -15
- package/dist/node_modules/uuid/dist/cjs/index.js +0 -1
- package/dist/node_modules/uuid/dist/cjs/max.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/max.js +0 -3
- package/dist/node_modules/uuid/dist/cjs/md5.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs/md5.js +0 -13
- package/dist/node_modules/uuid/dist/cjs/native.d.ts +0 -6
- package/dist/node_modules/uuid/dist/cjs/native.js +0 -4
- package/dist/node_modules/uuid/dist/cjs/nil.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/nil.js +0 -3
- package/dist/node_modules/uuid/dist/cjs/package.json +0 -1
- package/dist/node_modules/uuid/dist/cjs/parse.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/parse.js +0 -11
- package/dist/node_modules/uuid/dist/cjs/regex.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/regex.js +0 -3
- package/dist/node_modules/uuid/dist/cjs/rng.d.ts +0 -1
- package/dist/node_modules/uuid/dist/cjs/rng.js +0 -13
- package/dist/node_modules/uuid/dist/cjs/sha1.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs/sha1.js +0 -13
- package/dist/node_modules/uuid/dist/cjs/stringify.d.ts +0 -3
- package/dist/node_modules/uuid/dist/cjs/stringify.js +0 -39
- package/dist/node_modules/uuid/dist/cjs/types.d.ts +0 -21
- package/dist/node_modules/uuid/dist/cjs/types.js +0 -2
- package/dist/node_modules/uuid/dist/cjs/uuid-bin.d.ts +0 -1
- package/dist/node_modules/uuid/dist/cjs/uuid-bin.js +0 -72
- package/dist/node_modules/uuid/dist/cjs/v1.d.ts +0 -11
- package/dist/node_modules/uuid/dist/cjs/v1.js +0 -87
- package/dist/node_modules/uuid/dist/cjs/v1ToV6.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/v1ToV6.js +0 -13
- package/dist/node_modules/uuid/dist/cjs/v3.d.ts +0 -9
- package/dist/node_modules/uuid/dist/cjs/v3.js +0 -14
- package/dist/node_modules/uuid/dist/cjs/v35.d.ts +0 -7
- package/dist/node_modules/uuid/dist/cjs/v35.js +0 -44
- package/dist/node_modules/uuid/dist/cjs/v4.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs/v4.js +0 -29
- package/dist/node_modules/uuid/dist/cjs/v5.d.ts +0 -9
- package/dist/node_modules/uuid/dist/cjs/v5.js +0 -14
- package/dist/node_modules/uuid/dist/cjs/v6.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs/v6.js +0 -22
- package/dist/node_modules/uuid/dist/cjs/v6ToV1.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/v6ToV1.js +0 -13
- package/dist/node_modules/uuid/dist/cjs/v7.d.ts +0 -9
- package/dist/node_modules/uuid/dist/cjs/v7.js +0 -69
- package/dist/node_modules/uuid/dist/cjs/validate.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/validate.js +0 -7
- package/dist/node_modules/uuid/dist/cjs/version.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs/version.js +0 -10
- package/dist/node_modules/uuid/dist/cjs-browser/index.d.ts +0 -15
- package/dist/node_modules/uuid/dist/cjs-browser/index.js +0 -31
- package/dist/node_modules/uuid/dist/cjs-browser/max.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/max.js +0 -3
- package/dist/node_modules/uuid/dist/cjs-browser/md5.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/md5.js +0 -137
- package/dist/node_modules/uuid/dist/cjs-browser/native.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs-browser/native.js +0 -4
- package/dist/node_modules/uuid/dist/cjs-browser/nil.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/nil.js +0 -3
- package/dist/node_modules/uuid/dist/cjs-browser/package.json +0 -1
- package/dist/node_modules/uuid/dist/cjs-browser/parse.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/parse.js +0 -11
- package/dist/node_modules/uuid/dist/cjs-browser/regex.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/regex.js +0 -3
- package/dist/node_modules/uuid/dist/cjs-browser/rng.d.ts +0 -1
- package/dist/node_modules/uuid/dist/cjs-browser/rng.js +0 -14
- package/dist/node_modules/uuid/dist/cjs-browser/sha1.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/sha1.js +0 -72
- package/dist/node_modules/uuid/dist/cjs-browser/stringify.d.ts +0 -3
- package/dist/node_modules/uuid/dist/cjs-browser/stringify.js +0 -39
- package/dist/node_modules/uuid/dist/cjs-browser/types.d.ts +0 -21
- package/dist/node_modules/uuid/dist/cjs-browser/types.js +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/uuid-bin.d.ts +0 -1
- package/dist/node_modules/uuid/dist/cjs-browser/uuid-bin.js +0 -72
- package/dist/node_modules/uuid/dist/cjs-browser/v1.d.ts +0 -11
- package/dist/node_modules/uuid/dist/cjs-browser/v1.js +0 -87
- package/dist/node_modules/uuid/dist/cjs-browser/v1ToV6.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/v1ToV6.js +0 -13
- package/dist/node_modules/uuid/dist/cjs-browser/v3.d.ts +0 -9
- package/dist/node_modules/uuid/dist/cjs-browser/v3.js +0 -14
- package/dist/node_modules/uuid/dist/cjs-browser/v35.d.ts +0 -7
- package/dist/node_modules/uuid/dist/cjs-browser/v35.js +0 -44
- package/dist/node_modules/uuid/dist/cjs-browser/v4.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs-browser/v4.js +0 -29
- package/dist/node_modules/uuid/dist/cjs-browser/v5.d.ts +0 -9
- package/dist/node_modules/uuid/dist/cjs-browser/v5.js +0 -14
- package/dist/node_modules/uuid/dist/cjs-browser/v6.d.ts +0 -4
- package/dist/node_modules/uuid/dist/cjs-browser/v6.js +0 -22
- package/dist/node_modules/uuid/dist/cjs-browser/v6ToV1.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/v6ToV1.js +0 -13
- package/dist/node_modules/uuid/dist/cjs-browser/v7.d.ts +0 -9
- package/dist/node_modules/uuid/dist/cjs-browser/v7.js +0 -69
- package/dist/node_modules/uuid/dist/cjs-browser/validate.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/validate.js +0 -7
- package/dist/node_modules/uuid/dist/cjs-browser/version.d.ts +0 -2
- package/dist/node_modules/uuid/dist/cjs-browser/version.js +0 -10
- package/dist/node_modules/uuid/dist/esm/bin/uuid +0 -2
- package/dist/node_modules/uuid/dist/esm/index.d.ts +0 -15
- package/dist/node_modules/uuid/dist/esm/max.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/max.js +0 -1
- package/dist/node_modules/uuid/dist/esm/md5.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm/md5.js +0 -11
- package/dist/node_modules/uuid/dist/esm/native.d.ts +0 -6
- package/dist/node_modules/uuid/dist/esm/native.js +0 -2
- package/dist/node_modules/uuid/dist/esm/nil.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/nil.js +0 -1
- package/dist/node_modules/uuid/dist/esm/parse.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/parse.js +0 -9
- package/dist/node_modules/uuid/dist/esm/regex.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/rng.d.ts +0 -1
- package/dist/node_modules/uuid/dist/esm/rng.js +0 -10
- package/dist/node_modules/uuid/dist/esm/sha1.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm/sha1.js +0 -11
- package/dist/node_modules/uuid/dist/esm/stringify.d.ts +0 -3
- package/dist/node_modules/uuid/dist/esm/stringify.js +0 -35
- package/dist/node_modules/uuid/dist/esm/types.d.ts +0 -21
- package/dist/node_modules/uuid/dist/esm/types.js +0 -1
- package/dist/node_modules/uuid/dist/esm/uuid-bin.d.ts +0 -1
- package/dist/node_modules/uuid/dist/esm/uuid-bin.js +0 -70
- package/dist/node_modules/uuid/dist/esm/v1.d.ts +0 -11
- package/dist/node_modules/uuid/dist/esm/v1.js +0 -83
- package/dist/node_modules/uuid/dist/esm/v1ToV6.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/v1ToV6.js +0 -10
- package/dist/node_modules/uuid/dist/esm/v3.d.ts +0 -9
- package/dist/node_modules/uuid/dist/esm/v3.js +0 -9
- package/dist/node_modules/uuid/dist/esm/v35.d.ts +0 -7
- package/dist/node_modules/uuid/dist/esm/v35.js +0 -39
- package/dist/node_modules/uuid/dist/esm/v4.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm/v4.js +0 -27
- package/dist/node_modules/uuid/dist/esm/v5.d.ts +0 -9
- package/dist/node_modules/uuid/dist/esm/v5.js +0 -9
- package/dist/node_modules/uuid/dist/esm/v6.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm/v6.js +0 -20
- package/dist/node_modules/uuid/dist/esm/v6ToV1.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/v6ToV1.js +0 -10
- package/dist/node_modules/uuid/dist/esm/v7.d.ts +0 -9
- package/dist/node_modules/uuid/dist/esm/v7.js +0 -65
- package/dist/node_modules/uuid/dist/esm/validate.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/validate.js +0 -5
- package/dist/node_modules/uuid/dist/esm/version.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm/version.js +0 -8
- package/dist/node_modules/uuid/dist/esm-browser/index.d.ts +0 -15
- package/dist/node_modules/uuid/dist/esm-browser/max.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/md5.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/native.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm-browser/nil.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/parse.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/regex.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/rng.d.ts +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/sha1.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/stringify.d.ts +0 -3
- package/dist/node_modules/uuid/dist/esm-browser/types.d.ts +0 -21
- package/dist/node_modules/uuid/dist/esm-browser/types.js +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/uuid-bin.d.ts +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/uuid-bin.js +0 -70
- package/dist/node_modules/uuid/dist/esm-browser/v1.d.ts +0 -11
- package/dist/node_modules/uuid/dist/esm-browser/v1ToV6.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/v3.d.ts +0 -9
- package/dist/node_modules/uuid/dist/esm-browser/v35.d.ts +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/v4.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm-browser/v5.d.ts +0 -9
- package/dist/node_modules/uuid/dist/esm-browser/v6.d.ts +0 -4
- package/dist/node_modules/uuid/dist/esm-browser/v6ToV1.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/v7.d.ts +0 -9
- package/dist/node_modules/uuid/dist/esm-browser/validate.d.ts +0 -2
- package/dist/node_modules/uuid/dist/esm-browser/version.d.ts +0 -2
package/dist/client-v2/index.js
CHANGED
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("ahooks"),require("react-i18next"),require("@nocobase/client-v2"),require("dayjs"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("lodash")):"function"==typeof define&&define.amd?define("@nocobase/plugin-notification-manager/client-v2",["ahooks","react-i18next","@nocobase/client-v2","dayjs","react","antd","@nocobase/plugin-workflow/client-v2","@ant-design/icons","@nocobase/flow-engine","@nocobase/utils/client","lodash"],n):"object"==typeof exports?exports["@nocobase/plugin-notification-manager/client-v2"]=n(require("ahooks"),require("react-i18next"),require("@nocobase/client-v2"),require("dayjs"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("lodash")):e["@nocobase/plugin-notification-manager/client-v2"]=n(e.ahooks,e["react-i18next"],e["@nocobase/client-v2"],e.dayjs,e.react,e.antd,e["@nocobase/plugin-workflow/client-v2"],e["@ant-design/icons"],e["@nocobase/flow-engine"],e["@nocobase/utils/client"],e.lodash)}(self,function(e,n,t,r,o,i,a,u,l,c,s){return function(){"use strict";var f,p,y,b={667:function(e,n,t){t.d(n,{$:function(){return b}});var r=t(485),o=t(807);function i(e,n,t,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){t(e);return}u.done?n(l):Promise.resolve(l).then(r,o)}function a(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var a=e.apply(n,t);function u(e){i(a,r,o,u,l,"next",e)}function l(e){i(a,r,o,u,l,"throw",e)}u(void 0)})}}function u(e,n,t){return(u=f()?Reflect.construct:function(e,n,t){var r=[null];r.push.apply(r,n);var o=new(Function.bind.apply(e,r));return t&&c(o,t.prototype),o}).apply(null,arguments)}function l(e){return(l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,n){return(c=Object.setPrototypeOf||function(e,n){return e.__proto__=n,e})(e,n)}function s(e){var n="function"==typeof Map?new Map:void 0;return(s=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==n){if(n.has(e))return n.get(e);n.set(e,t)}function t(){return u(e,arguments,l(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),c(t,e)})(e)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function p(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];if(t)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(e,i)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var y="notification-manager",b=function(e){var n;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,n,t,o,i;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return n=r,t=arguments,n=l(n),e=function(e,n){var t;if(n&&("object"==((t=n)&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)||"function"==typeof n))return n;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,f()?Reflect.construct(n,t||[],l(this).constructor):n.apply(this,t)),i=void 0,(o="manager")in e?Object.defineProperty(e,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[o]=i,e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&c(r,e),n=[{key:"channelTypes",get:function(){return this.manager.channelTypes}},{key:"registerChannelType",value:function(e){this.manager.registerChannelType(e)}},{key:"beforeLoad",value:function(){return a(function(){return p(this,function(e){return this.manager=new o.A,[2]})}).call(this)}},{key:"load",value:function(){return a(function(){return p(this,function(e){return this.pluginSettingsManager.addMenuItem({key:y,title:this.t("Notification manager"),icon:"NotificationOutlined",aclSnippet:"pm.notification"}),this.pluginSettingsManager.addPageTabItem({menuKey:y,key:"channels",title:this.t("Channels"),aclSnippet:"pm.notification.channels",sort:1,componentLoader:function(){return t.e("49").then(t.bind(t,624))}}),this.pluginSettingsManager.addPageTabItem({menuKey:y,key:"logs",title:this.t("Logs"),aclSnippet:"pm.notification.logs",sort:3,componentLoader:function(){return t.e("852").then(t.bind(t,487))}}),[2]})}).call(this)}}],function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,n),r}(s(r.Plugin));n.A=b},488:function(e,n,t){t.d(n,{kj:function(){return l},yr:function(){return u}});var r=t(694),o=t(953),i="notification-manager",a="@nocobase/plugin-notification-manager";function u(){return(0,o.useTranslation)([i,a,"client","data-source-manager"],{nsMode:"fallback"})}function l(){var e=(0,r.useFlowEngine)();return function(n,t){return e.context.t(n,function(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){var r;r=t[n],n in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r})}return e}({ns:[i,a,"client"],nsMode:"fallback"},t))}}},807:function(e,n,t){t.d(n,{A:function(){return o}});var r=t(768),o=function(){var e;function n(){var e,t;if(!(this instanceof n))throw TypeError("Cannot call a class as a function");e="channelTypes",t=new r.Registry,e in this?Object.defineProperty(this,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):this[e]=t}return e=[{key:"registerChannelType",value:function(e){this.channelTypes.register(e.type,e)}}],function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(n.prototype,e),n}()},553:function(e,n,t){t.d(n,{L:function(){return o}});var r,o=((r={}).templates="templates",r.channels="notificationChannels",r.messages="messages",r.logs="notificationSendLogs",r)},375:function(e){e.exports=u},485:function(e){e.exports=t},694:function(e){e.exports=l},197:function(e){e.exports=a},768:function(e){e.exports=c},625:function(n){n.exports=e},59:function(e){e.exports=i},185:function(e){e.exports=r},773:function(e){e.exports=s},155:function(e){e.exports=o},953:function(e){e.exports=n}},v={};function d(e){var n=v[e];if(void 0!==n)return n.exports;var t=v[e]={exports:{}};return b[e](t,t.exports,d),t.exports}d.m=b,d.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return d.d(n,{a:n}),n},d.d=function(e,n){for(var t in n)d.o(n,t)&&!d.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:n[t]})},d.f={},d.e=function(e){return Promise.all(Object.keys(d.f).reduce(function(n,t){return d.f[t](e,n),n},[]))},d.u=function(e){return""+e+"."+({49:"3feca41b2843a6b2",852:"543c355801fd322f"})[e]+".js"},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},m={},d.l=function(e,n,t,r){if(m[e])return void m[e].push(n);if(void 0!==t)for(var o,i,a=document.getElementsByTagName("script"),u=0;u<a.length;u++){var l=a[u];if(l.getAttribute("src")==e||l.getAttribute("data-rspack")=="@nocobase/plugin-notification-manager/client-v2:"+t){o=l;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,d.nc&&o.setAttribute("nonce",d.nc),o.setAttribute("data-rspack","@nocobase/plugin-notification-manager/client-v2:"+t),o.src=e),m[e]=[n];var c=function(n,t){o.onerror=o.onload=null,clearTimeout(s);var r=m[e];if(delete m[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(t)}),n)return n(t)},s=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.bind(null,o.onload),i&&document.head.appendChild(o)},d.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.g.importScripts&&(h=d.g.location+"");var m,h,g=d.g.document;if(!h&&g&&(g.currentScript&&"SCRIPT"===g.currentScript.tagName.toUpperCase()&&(h=g.currentScript.src),!h)){var w=g.getElementsByTagName("script");if(w.length)for(var S=w.length-1;S>-1&&(!h||!/^http(s?):/.test(h));)h=w[S--].src}if(!h)throw Error("Automatic publicPath is not supported in this browser");d.p=h.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f={889:0},d.f.j=function(e,n){var t=d.o(f,e)?f[e]:void 0;if(0!==t)if(t)n.push(t[2]);else{var r=new Promise(function(n,r){t=f[e]=[n,r]});n.push(t[2]=r);var o=d.p+d.u(e),i=Error();d.l(o,function(n){if(d.o(f,e)&&(0!==(t=f[e])&&(f[e]=void 0),t)){var r=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,t[1](i)}},"chunk-"+e,e)}},p=function(e,n){var t,r,o=n[0],i=n[1],a=n[2],u=0;if(o.some(function(e){return 0!==f[e]})){for(t in i)d.o(i,t)&&(d.m[t]=i[t]);a&&a(d)}for(e&&e(n);u<o.length;u++)r=o[u],d.o(f,r)&&f[r]&&f[r][0](),f[r]=0},(y=self.webpackChunk_nocobase_plugin_notification_manager_client_v2=self.webpackChunk_nocobase_plugin_notification_manager_client_v2||[]).forEach(p.bind(null,0)),y.push=p.bind(null,y.push.bind(y));var O={};return!function(){var e="",n="u">typeof document?document.currentScript:null;if(n&&n.src){var t=n.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");t.indexOf("/static/plugins/@nocobase/plugin-notification-manager/dist/client-v2/")>=0&&(e=t.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-notification-manager/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var a=window.location.pathname||"/",u=a.indexOf(i);e=u>=0?a.slice(0,u+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-notification-manager/dist/client-v2/"}d.p=e}(),!function(){d.r(O),d.d(O,{UserAddition:function(){return F},PluginNotificationManagerClientV2:function(){return e.$},UserSelect:function(){return _},ContentConfigForm:function(){return w},MessageConfigForm:function(){return g},NotificationManager:function(){return n.A},default:function(){return e.A}});var e=d(667),n=d(807),t=d(485),r=d(694),o=d(625),i=d(59),a=d(155),u=d.n(a),l=d(553),c=d(488);function s(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function f(e,n,t,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){t(e);return}u.done?n(l):Promise.resolve(l).then(r,o)}function p(e){return function(){var n=this,t=arguments;return new Promise(function(r,o){var i=e.apply(n,t);function a(e){f(i,r,o,a,u,"next",e)}function u(e){f(i,r,o,a,u,"throw",e)}a(void 0)})}}function y(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function b(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{},r=Object.keys(t);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.forEach(function(n){y(e,n,t[n])})}return e}function v(e,n){return function(e){if(Array.isArray(e))return e}(e)||function(e,n){var t,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,u=!1;try{for(o=o.call(e);!(a=(t=o.next()).done)&&(i.push(t.value),!n||i.length!==n);a=!0);}catch(e){u=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(u)throw r}}return i}}(e,n)||m(e,n)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function m(e,n){if(e){if("string"==typeof e)return s(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return s(e,n)}}function h(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];if(t)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(e,i)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function g(n){var f,d,g=n.variableOptions,w=n.namePrefix,S=(0,c.yr)().t,O=(0,c.kj)(),j=(0,r.useFlowContext)(),k=null!=(f=j.app.pm.get(e.A))?f:j.app.pm.get("notification-manager"),x=i.Form.useFormInstance(),P=v((0,a.useState)({}),2),E=P[0],T=P[1],A=v((0,a.useState)(!1),2),C=A[0],_=A[1],q=(0,a.useMemo)(function(){var e;return((function(e){if(Array.isArray(e))return s(e)})(e=null!=w?w:[])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||m(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat(["channelName"])},[w]),I=function(e){return"string"==typeof e?e:e&&(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"&&"string"==typeof e.value?e.value:void 0}(i.Form.useWatch(q,x)),M=I?E[I]:void 0;(0,o.useRequest)(function(){return p(function(){var e,n,t;return h(this,function(r){switch(r.label){case 0:if(!I||M)return[2,null];return[4,j.api.request({url:"/".concat(l.L.channels,":get"),method:"get",params:{filterByTk:I}})];case 1:return[2,null!=(e=null==(t=r.sent())||null==(n=t.data)?void 0:n.data)?e:null]}})})()},{refreshDeps:[I,M],ready:!!(I&&C&&!M),onSuccess:function(e){I&&(null==e?void 0:e.notificationType)&&T(function(n){var t,r;return n[I]===e.notificationType?n:(t=b({},n),r=null!=(r=y({},I,e.notificationType))?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):(function(e){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n.push.apply(n,t)}return n})(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}),t)})}});var F=(0,a.useMemo)(function(){return M?null==k?void 0:k.channelTypes.get(M):void 0},[M,k]),L=null==F||null==(d=F.components)?void 0:d.MessageConfigFormLoader,$=(0,a.useMemo)(function(){return L?(0,a.lazy)(L):null},[L]);return u().createElement(u().Fragment,null,u().createElement(i.Form.Item,{name:q,label:S("Channel"),rules:[{required:!0,message:S("The field value is required")}]},u().createElement(t.RemoteSelect,{request:function(){return p(function(){var e,n,t;return h(this,function(r){switch(r.label){case 0:return[4,j.api.resource(l.L.channels).list()];case 1:return[2,Array.isArray(t=null==(n=r.sent())||null==(e=n.data)?void 0:e.data)?t:[]]}})})()},cacheKey:"@nocobase/plugin-notification-manager:".concat(l.L.channels,":list"),onLoaded:function(e){_(!0),T(function(n){return function(e,n){var t=e,r=!0,o=!1,i=void 0;try{for(var a,u=n[Symbol.iterator]();!(r=(a=u.next()).done);r=!0){var l=a.value;(null==l?void 0:l.name)&&(null==l?void 0:l.notificationType)&&e[l.name]!==l.notificationType&&(t===e&&(t=b({},e)),t[l.name]=l.notificationType)}}catch(e){o=!0,i=e}finally{try{r||null==u.return||u.return()}finally{if(o)throw i}}return t}(n,e)})},mapOptions:function(e){return{label:O(e.title||e.name),value:e.name}}})),$?u().createElement(a.Suspense,{fallback:u().createElement(i.Spin,null)},u().createElement($,{variableOptions:g,namePrefix:w})):null)}function w(n){var t,o,l=n.variableOptions,c=n.channelType,s=n.namePrefix,f=(0,r.useFlowContext)(),p=null!=(t=f.app.pm.get(e.A))?t:f.app.pm.get("notification-manager"),y=(0,a.useMemo)(function(){return c?null==p?void 0:p.channelTypes.get(c):void 0},[c,p]),b=null==y||null==(o=y.components)?void 0:o.ContentConfigFormLoader,v=(0,a.useMemo)(function(){return b?(0,a.lazy)(b):null},[b]);return v?u().createElement(a.Suspense,{fallback:u().createElement(i.Spin,null)},u().createElement(v,{variableOptions:l,namePrefix:s})):null}var S=d(197);function j(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function k(e,n,t,r,o,i,a){try{var u=e[i](a),l=u.value}catch(e){t(e);return}u.done?n(l):Promise.resolve(l).then(r,o)}var x=/\{\{\s*([^{}]+?)\s*\}\}/g;function P(e){return e.isForeignKey?"users"===e.target:"users"===e.collectionName&&"id"===e.name}function E(e){if("string"==typeof e){var n=e.trim().match(/^\{\{\s*(.+?)\s*\}\}$/);if(n)return n[1].split(".")}}function T(e){var n=e.value,o=e.onChange,i=(0,r.useFlowContext)();return u().createElement(t.RemoteSelect,{value:n,onChange:function(e){return null==o?void 0:o(null==e?"":String(e))},request:function(){var e;return(e=function(){var e,n,t;return function(e,n){var t,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),u=Object.defineProperty;return u(a,"next",{value:l(0)}),u(a,"throw",{value:l(1)}),u(a,"return",{value:l(2)}),"function"==typeof Symbol&&u(a,Symbol.iterator,{value:function(){return this}}),a;function l(u){return function(l){var c=[u,l];if(t)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(t=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=n.call(e,i)}catch(e){c=[6,e],r=0}finally{t=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}(this,function(r){switch(r.label){case 0:return[4,i.api.resource("users").list()];case 1:return[2,Array.isArray(t=null==(n=r.sent())||null==(e=n.data)?void 0:e.data)?t:[]]}})},function(){var n=this,t=arguments;return new Promise(function(r,o){var i=e.apply(n,t);function a(e){k(i,r,o,a,u,"next",e)}function u(e){k(i,r,o,a,u,"throw",e)}a(void 0)})})()},mapOptions:function(e){return{label:e.nickname||String(e.id),value:String(e.id)}},style:{width:"100%"}})}function A(e){var n=e.value,t=e.onChange,o=(0,c.yr)().t,i=(0,S.useWorkflowVariableOptions)({types:[P]}),l=(0,a.useMemo)(function(){return[{name:"constant",title:o("Select users"),type:"string",paths:["constant"]}].concat(function(e){if(Array.isArray(e))return j(e)}(i)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(i)||function(e){if(e){if("string"==typeof e)return j(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return j(e,void 0)}}(i)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())},[o,i]),s=(0,a.useMemo)(function(){return{formatPathToValue:function(e){var n,t,r;return(null==e||null==(n=e.paths)?void 0:n[0])==="constant"?"":(r=null!=(t=null==e?void 0:e.paths)?t:[]).length?"{{".concat(r.join("."),"}}"):""},parseValueToPath:E,variableRegExp:x,renderInputComponent:function(e){var n;return(null==e||null==(n=e.paths)?void 0:n[0])==="constant"?T:null},resolveValueFromPath:function(e){var n;if((null==e||null==(n=e.paths)?void 0:n[0])==="constant")return""},resolvePathFromValue:function(e){var n;return null!=(n=E(e))?n:["constant"]}}},[]);return u().createElement(r.VariableInput,{value:null!=n?n:"",onChange:t,metaTree:l,converters:s,clearValue:"",style:{width:"100%"}})}function C(e){var n,t=i.theme.useToken().token;return u().createElement("div",{style:{border:"".concat(t.lineWidth,"px dashed ").concat(t.colorBorder),padding:t.paddingSM}},u().createElement(S.FilterDynamicComponent,{collection:"users",value:null!=(n=e.value.filter)?n:{},onChange:function(n){var t;return null==(t=e.onChange)?void 0:t.call(e,{filter:null!=n?n:{}})}}))}function _(e){var n;return e.value&&"object"==((n=e.value)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)?u().createElement(C,{value:e.value,onChange:e.onChange}):u().createElement(A,{value:"string"==typeof e.value?e.value:"",onChange:e.onChange})}var q=d(375);function I(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function M(e,n){if(e){if("string"==typeof e)return I(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if("Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t)return Array.from(t);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return I(e,n)}}function F(e){var n,t=e.value,r=void 0===t?[]:t,o=e.onChange,l=e.disabled,s=(0,c.yr)().t,f=function(e){if(Array.isArray(e))return e}(n=(0,a.useState)(!1))||function(e){var n,t,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(n=r.next()).done)&&(o.push(n.value),2!==o.length);i=!0);}catch(e){a=!0,t=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw t}}return o}}(n)||M(n,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=f[0],y=f[1],b=(0,a.useCallback)(function(e){null==o||o(((function(e){if(Array.isArray(e))return I(e)})(r)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||M(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])),y(!1)},[o,r]),v=u().createElement(i.Button,{icon:u().createElement(q.PlusOutlined,null),type:"dashed",block:!0,disabled:l},s("Add user"));return l?v:u().createElement(i.Popover,{open:p,onOpenChange:y,content:u().createElement(i.Space,{direction:"vertical",size:"small"},u().createElement(i.Button,{type:"text",onClick:function(){return b("")}},s("Select users")),u().createElement(i.Button,{type:"text",onClick:function(){return b({filter:{}})}},s("Query users")))},v)}}(),O}()});
|
|
10
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("ahooks"),require("react-i18next"),require("@nocobase/client-v2"),require("dayjs"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("lodash")):"function"==typeof define&&define.amd?define("@nocobase/plugin-notification-manager/client-v2",["ahooks","react-i18next","@nocobase/client-v2","dayjs","react","antd","@nocobase/plugin-workflow/client-v2","@ant-design/icons","@nocobase/flow-engine","@nocobase/utils/client","lodash"],t):"object"==typeof exports?exports["@nocobase/plugin-notification-manager/client-v2"]=t(require("ahooks"),require("react-i18next"),require("@nocobase/client-v2"),require("dayjs"),require("react"),require("antd"),require("@nocobase/plugin-workflow/client-v2"),require("@ant-design/icons"),require("@nocobase/flow-engine"),require("@nocobase/utils/client"),require("lodash")):e["@nocobase/plugin-notification-manager/client-v2"]=t(e.ahooks,e["react-i18next"],e["@nocobase/client-v2"],e.dayjs,e.react,e.antd,e["@nocobase/plugin-workflow/client-v2"],e["@ant-design/icons"],e["@nocobase/flow-engine"],e["@nocobase/utils/client"],e.lodash)}(self,function(e,t,n,r,o,i,a,l,u,c,s){return function(){"use strict";var f,p,y,b={667:function(e,t,n){n.d(t,{$:function(){return b}});var r=n(485),o=n(807);function i(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function a(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var a=e.apply(t,n);function l(e){i(a,r,o,l,u,"next",e)}function u(e){i(a,r,o,l,u,"throw",e)}l(void 0)})}}function l(e,t,n){return(l=f()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&c(o,n.prototype),o}).apply(null,arguments)}function u(e){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function s(e){var t="function"==typeof Map?new Map:void 0;return(s=function(e){if(null===e||-1===Function.toString.call(e).indexOf("[native code]"))return e;if("function"!=typeof e)throw TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return l(e,arguments,u(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),c(n,e)})(e)}function f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(f=function(){return!!e})()}function p(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(a,"next",{value:u(0)}),l(a,"throw",{value:u(1)}),l(a,"return",{value:u(2)}),"function"==typeof Symbol&&l(a,Symbol.iterator,{value:function(){return this}}),a;function u(l){return function(u){var c=[l,u];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var y="notification-manager",b=function(e){var t;if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");function r(){var e,t,n,o,i;if(!(this instanceof r))throw TypeError("Cannot call a class as a function");return t=r,n=arguments,t=u(t),e=function(e,t){var n;if(t&&("object"==((n=t)&&"u">typeof Symbol&&n.constructor===Symbol?"symbol":typeof n)||"function"==typeof t))return t;if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(this,f()?Reflect.construct(t,n||[],u(this).constructor):t.apply(this,n)),i=void 0,(o="manager")in e?Object.defineProperty(e,o,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[o]=i,e}return r.prototype=Object.create(e&&e.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),e&&c(r,e),t=[{key:"channelTypes",get:function(){return this.manager.channelTypes}},{key:"registerChannelType",value:function(e){this.manager.registerChannelType(e)}},{key:"beforeLoad",value:function(){return a(function(){return p(this,function(e){return this.manager=new o.A,[2]})}).call(this)}},{key:"load",value:function(){return a(function(){return p(this,function(e){return this.pluginSettingsManager.addMenuItem({key:y,title:this.t("Notification manager"),icon:"NotificationOutlined",aclSnippet:"pm.notification"}),this.pluginSettingsManager.addPageTabItem({menuKey:y,key:"channels",title:this.t("Channels"),aclSnippet:"pm.notification.channels",sort:1,componentLoader:function(){return n.e("49").then(n.bind(n,624))}}),this.pluginSettingsManager.addPageTabItem({menuKey:y,key:"logs",title:this.t("Logs"),aclSnippet:"pm.notification.logs",sort:3,componentLoader:function(){return n.e("852").then(n.bind(n,487))}}),[2]})}).call(this)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(r.prototype,t),r}(s(r.Plugin));t.A=b},488:function(e,t,n){n.d(t,{kj:function(){return u},yr:function(){return l}});var r=n(694),o=n(953),i="notification-manager",a="@nocobase/plugin-notification-manager";function l(){return(0,o.useTranslation)([i,a,"client","data-source-manager"],{nsMode:"fallback"})}function u(){var e=(0,r.useFlowEngine)();return function(t,n){return e.context.t(t,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({ns:[i,a,"client"],nsMode:"fallback"},n))}}},807:function(e,t,n){n.d(t,{A:function(){return o}});var r=n(768),o=function(){var e;function t(){var e,n;if(!(this instanceof t))throw TypeError("Cannot call a class as a function");e="channelTypes",n=new r.Registry,e in this?Object.defineProperty(this,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):this[e]=n}return e=[{key:"registerChannelType",value:function(e){this.channelTypes.register(e.type,e)}}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}(t.prototype,e),t}()},553:function(e,t,n){n.d(t,{L:function(){return o}});var r,o=((r={}).templates="templates",r.channels="notificationChannels",r.messages="messages",r.logs="notificationSendLogs",r)},375:function(e){e.exports=l},485:function(e){e.exports=n},694:function(e){e.exports=u},197:function(e){e.exports=a},768:function(e){e.exports=c},625:function(t){t.exports=e},59:function(e){e.exports=i},185:function(e){e.exports=r},773:function(e){e.exports=s},155:function(e){e.exports=o},953:function(e){e.exports=t}},d={};function m(e){var t=d[e];if(void 0!==t)return t.exports;var n=d[e]={exports:{}};return b[e](n,n.exports,m),n.exports}m.m=b,m.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return m.d(t,{a:t}),t},m.d=function(e,t){for(var n in t)m.o(t,n)&&!m.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},m.f={},m.e=function(e){return Promise.all(Object.keys(m.f).reduce(function(t,n){return m.f[n](e,t),t},[]))},m.u=function(e){return""+e+"."+({49:"3feca41b2843a6b2",852:"543c355801fd322f"})[e]+".js"},m.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),m.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},v={},m.l=function(e,t,n,r){if(v[e])return void v[e].push(t);if(void 0!==n)for(var o,i,a=document.getElementsByTagName("script"),l=0;l<a.length;l++){var u=a[l];if(u.getAttribute("src")==e||u.getAttribute("data-rspack")=="@nocobase/plugin-notification-manager/client-v2:"+n){o=u;break}}o||(i=!0,(o=document.createElement("script")).timeout=120,m.nc&&o.setAttribute("nonce",m.nc),o.setAttribute("data-rspack","@nocobase/plugin-notification-manager/client-v2:"+n),o.src=e),v[e]=[t];var c=function(t,n){o.onerror=o.onload=null,clearTimeout(s);var r=v[e];if(delete v[e],o.parentNode&&o.parentNode.removeChild(o),r&&r.forEach(function(e){return e(n)}),t)return t(n)},s=setTimeout(c.bind(null,void 0,{type:"timeout",target:o}),12e4);o.onerror=c.bind(null,o.onerror),o.onload=c.bind(null,o.onload),i&&document.head.appendChild(o)},m.r=function(e){"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},m.g.importScripts&&(h=m.g.location+"");var v,h,g=m.g.document;if(!h&&g&&(g.currentScript&&"SCRIPT"===g.currentScript.tagName.toUpperCase()&&(h=g.currentScript.src),!h)){var w=g.getElementsByTagName("script");if(w.length)for(var O=w.length-1;O>-1&&(!h||!/^http(s?):/.test(h));)h=w[O--].src}if(!h)throw Error("Automatic publicPath is not supported in this browser");m.p=h.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),f={889:0},m.f.j=function(e,t){var n=m.o(f,e)?f[e]:void 0;if(0!==n)if(n)t.push(n[2]);else{var r=new Promise(function(t,r){n=f[e]=[t,r]});t.push(n[2]=r);var o=m.p+m.u(e),i=Error();m.l(o,function(t){if(m.o(f,e)&&(0!==(n=f[e])&&(f[e]=void 0),n)){var r=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;i.message="Loading chunk "+e+" failed.\n("+r+": "+o+")",i.name="ChunkLoadError",i.type=r,i.request=o,n[1](i)}},"chunk-"+e,e)}},p=function(e,t){var n,r,o=t[0],i=t[1],a=t[2],l=0;if(o.some(function(e){return 0!==f[e]})){for(n in i)m.o(i,n)&&(m.m[n]=i[n]);a&&a(m)}for(e&&e(t);l<o.length;l++)r=o[l],m.o(f,r)&&f[r]&&f[r][0](),f[r]=0},(y=self.webpackChunk_nocobase_plugin_notification_manager_client_v2=self.webpackChunk_nocobase_plugin_notification_manager_client_v2||[]).forEach(p.bind(null,0)),y.push=p.bind(null,y.push.bind(y));var S={};return!function(){var e="",t="u">typeof document?document.currentScript:null;if(t&&t.src){var n=t.src.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"");n.indexOf("/static/plugins/@nocobase/plugin-notification-manager/dist/client-v2/")>=0&&(e=n.replace(/\/[^\/]+$/,"/"))}if(!e){var r=window.__webpack_public_path__||"";r&&("/"!==r.charAt(r.length-1)&&(r+="/"),e=r+"static/plugins/@nocobase/plugin-notification-manager/dist/client-v2/")}if(!e){var o=window.__nocobase_modern_client_prefix__||"v",i="/"+(o=String(o).replace(/^\/+|\/+$/g,"")||"v")+"/";if(!(e=window.__nocobase_public_path__||"")&&window.location&&window.location.pathname){var a=window.location.pathname||"/",l=a.indexOf(i);e=l>=0?a.slice(0,l+1):"/"}e&&(e=e.replace(RegExp("/"+o+"/?$"),"/")),e||(e="/"),"/"!==e.charAt(e.length-1)&&(e+="/"),e+="static/plugins/@nocobase/plugin-notification-manager/dist/client-v2/"}m.p=e}(),!function(){m.r(S),m.d(S,{UserAddition:function(){return B},PluginNotificationManagerClientV2:function(){return e.$},UserSelect:function(){return N},ContentConfigForm:function(){return w},MessageConfigForm:function(){return g},NotificationManager:function(){return t.A},default:function(){return e.A}});var e=m(667),t=m(807),n=m(485),r=m(694),o=m(625),i=m(59),a=m(155),l=m.n(a),u=m(553),c=m(488);function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function f(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function p(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){f(i,r,o,a,l,"next",e)}function l(e){f(i,r,o,a,l,"throw",e)}a(void 0)})}}function y(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){y(e,t,n[t])})}return e}function d(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n,r,o=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var i=[],a=!0,l=!1;try{for(o=o.call(e);!(a=(n=o.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){l=!0,r=e}finally{try{a||null==o.return||o.return()}finally{if(l)throw r}}return i}}(e,t)||v(e,t)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){if(e){if("string"==typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}}function h(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(a,"next",{value:u(0)}),l(a,"throw",{value:u(1)}),l(a,"return",{value:u(2)}),"function"==typeof Symbol&&l(a,Symbol.iterator,{value:function(){return this}}),a;function u(l){return function(u){var c=[l,u];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}function g(t){var f,m,g=t.variableOptions,w=t.namePrefix,O=(0,c.yr)().t,S=(0,c.kj)(),j=(0,r.useFlowContext)(),k=null!=(f=j.app.pm.get(e.A))?f:j.app.pm.get("notification-manager"),x=i.Form.useFormInstance(),P=d((0,a.useState)({}),2),E=P[0],T=P[1],C=d((0,a.useState)(!1),2),A=C[0],_=C[1],M=(0,a.useMemo)(function(){var e;return((function(e){if(Array.isArray(e))return s(e)})(e=null!=w?w:[])||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||v(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat(["channelName"])},[w]),q=function(e){return"string"==typeof e?e:e&&(void 0===e?"undefined":e&&"u">typeof Symbol&&e.constructor===Symbol?"symbol":typeof e)=="object"&&"string"==typeof e.value?e.value:void 0}(i.Form.useWatch(M,x)),I=q?E[q]:void 0;(0,o.useRequest)(function(){return p(function(){var e,t,n;return h(this,function(r){switch(r.label){case 0:if(!q||I)return[2,null];return[4,j.api.request({url:"/".concat(u.L.channels,":get"),method:"get",params:{filterByTk:q}})];case 1:return[2,null!=(e=null==(n=r.sent())||null==(t=n.data)?void 0:t.data)?e:null]}})})()},{refreshDeps:[q,I],ready:!!(q&&A&&!I),onSuccess:function(e){q&&(null==e?void 0:e.notificationType)&&T(function(t){var n,r;return t[q]===e.notificationType?t:(n=b({},t),r=null!=(r=y({},q,e.notificationType))?r:{},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n)})}});var F=(0,a.useMemo)(function(){return I?null==k?void 0:k.channelTypes.get(I):void 0},[I,k]),$=null==F||null==(m=F.components)?void 0:m.MessageConfigFormLoader,L=(0,a.useMemo)(function(){return $?(0,a.lazy)($):null},[$]);return l().createElement(l().Fragment,null,l().createElement(i.Form.Item,{name:M,label:O("Channel"),rules:[{required:!0,message:O("The field value is required")}]},l().createElement(n.RemoteSelect,{request:function(){return p(function(){var e,t,n;return h(this,function(r){switch(r.label){case 0:return[4,j.api.resource(u.L.channels).list()];case 1:return[2,Array.isArray(n=null==(t=r.sent())||null==(e=t.data)?void 0:e.data)?n:[]]}})})()},cacheKey:"@nocobase/plugin-notification-manager:".concat(u.L.channels,":list"),onLoaded:function(e){_(!0),T(function(t){return function(e,t){var n=e,r=!0,o=!1,i=void 0;try{for(var a,l=t[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var u=a.value;(null==u?void 0:u.name)&&(null==u?void 0:u.notificationType)&&e[u.name]!==u.notificationType&&(n===e&&(n=b({},e)),n[u.name]=u.notificationType)}}catch(e){o=!0,i=e}finally{try{r||null==l.return||l.return()}finally{if(o)throw i}}return n}(t,e)})},mapOptions:function(e){return{label:S(e.title||e.name),value:e.name}}})),L?l().createElement(a.Suspense,{fallback:l().createElement(i.Spin,null)},l().createElement(L,{variableOptions:g,namePrefix:w})):null)}function w(t){var n,o,u=t.variableOptions,c=t.channelType,s=t.namePrefix,f=(0,r.useFlowContext)(),p=null!=(n=f.app.pm.get(e.A))?n:f.app.pm.get("notification-manager"),y=(0,a.useMemo)(function(){return c?null==p?void 0:p.channelTypes.get(c):void 0},[c,p]),b=null==y||null==(o=y.components)?void 0:o.ContentConfigFormLoader,d=(0,a.useMemo)(function(){return b?(0,a.lazy)(b):null},[b]);return d?l().createElement(a.Suspense,{fallback:l().createElement(i.Spin,null)},l().createElement(d,{variableOptions:u,namePrefix:s})):null}var O=m(375),j=m(197);function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(e){n(e);return}l.done?t(u):Promise.resolve(u).then(r,o)}function P(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var i=e.apply(t,n);function a(e){x(i,r,o,a,l,"next",e)}function l(e){x(i,r,o,a,l,"throw",e)}a(void 0)})}}function E(e,t){if(e){if("string"==typeof e)return k(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return k(e,t)}}function T(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype),l=Object.defineProperty;return l(a,"next",{value:u(0)}),l(a,"throw",{value:u(1)}),l(a,"return",{value:u(2)}),"function"==typeof Symbol&&l(a,Symbol.iterator,{value:function(){return this}}),a;function u(l){return function(u){var c=[l,u];if(n)throw TypeError("Generator is already executing.");for(;a&&(a=0,c[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&c[0]?r.return:c[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,c[1])).done)return o;switch(r=0,o&&(c=[2&c[0],o.value]),c[0]){case 0:case 1:o=c;break;case 4:return i.label++,{value:c[1],done:!1};case 5:i.label++,r=c[1],c=[0];continue;case 7:c=i.ops.pop(),i.trys.pop();continue;default:if(!(o=(o=i.trys).length>0&&o[o.length-1])&&(6===c[0]||2===c[0])){i=0;continue}if(3===c[0]&&(!o||c[1]>o[0]&&c[1]<o[3])){i.label=c[1];break}if(6===c[0]&&i.label<o[1]){i.label=o[1],o=c;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(c);break}o[2]&&i.ops.pop(),i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e],r=0}finally{n=o=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}}var C="null",A="$scopes",_="$jobsMapByNodeKey";function M(e){return e.isForeignKey?"users"===e.target:"users"===e.collectionName&&"id"===e.name}function q(e,t){return{name:e,title:t,type:"",paths:[e],disabled:!0}}function I(e){var t=e.value,o=e.onChange,i=(0,r.useFlowContext)();return l().createElement(n.RemoteSelect,{value:t,onChange:function(e){return null==o?void 0:o(null==e?"":String(e))},request:function(){return P(function(){var e,t,n;return T(this,function(r){switch(r.label){case 0:return[4,i.api.resource("users").list()];case 1:return[2,Array.isArray(n=null==(t=r.sent())||null==(e=t.data)?void 0:e.data)?n:[]]}})})()},mapOptions:function(e){return{label:e.nickname||String(e.id),value:String(e.id)}},style:{width:"100%"}})}function F(e){var t,n=e.metaTree,u=e.onChange,c=e.translate,s=e.value,f=i.theme.useToken().token,p=(0,r.useResolvedMetaTree)(n).resolvedMetaTree,y=function(e){if(Array.isArray(e))return e}(t=(0,a.useState)(0))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||E(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),b=y[0],d=y[1],m=(0,a.useMemo)(function(){var e;return null!=(e=function(e){if("string"==typeof e){var t=e.trim().match(/^\{\{\s*(.+?)\s*\}\}$/);if(t)return t[1].split(".")}}(null!=s?s:""))?e:["constant"]},[s]),v="constant"!==m[0],h=(0,o.useMemoizedFn)(function(e,t){return l().createElement(i.Tooltip,{title:"string"==typeof e?c(e):e,placement:"top",destroyTooltipOnHide:!0},l().createElement(O.QuestionCircleOutlined,{"aria-label":"".concat("string"==typeof t?t:"variable"," tooltip"),style:{marginLeft:f.marginXXS,color:f.colorTextDescription}}))}),g=(0,o.useMemoizedFn)(function(e){var t=function(e){return e.map(function(e){var n,r,o=e.meta,i=!!o&&!!("function"==typeof o.disabled?o.disabled():o.disabled),a=o?"function"==typeof o.disabledReason?o.disabledReason():o.disabledReason:void 0,u="string"==typeof e.label?c(e.label):e.label,s=function(e){if(e){var t,n=e.options;return null!=(t=e.tooltip)?t:null==n?void 0:n.tooltip}}(o),f=s||i?l().createElement("span",null,u,h(s||a||c("This variable is not available"),u)):u;return n=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{},r=Object.keys(n);"function"==typeof Object.getOwnPropertySymbols&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(e){return Object.getOwnPropertyDescriptor(n,e).enumerable}))),r.forEach(function(t){var r;r=n[t],t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r})}return e}({},e),r=r={disabled:i,label:f,children:Array.isArray(e.children)?t(e.children):e.children},Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(r)):(function(e){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t.push.apply(t,n)}return t})(Object(r)).forEach(function(e){Object.defineProperty(n,e,Object.getOwnPropertyDescriptor(r,e))}),n})};return t((0,r.buildContextSelectorItems)(e))}),w=(0,a.useMemo)(function(){return b>=0?g(null!=p?p:[]):[]},[g,p,b]),S=(0,o.useMemoizedFn)(function(e){return P(function(){var t,n,o,i;return T(this,function(a){switch(a.label){case 0:if(n=null==(t=e[e.length-1])?void 0:t.meta,!t||t.children||t.isLeaf||!(null==n?void 0:n.children))return[2];t.loading=!0,d(function(e){return e+1}),a.label=1;case 1:return a.trys.push([1,,3,4]),[4,(0,r.loadMetaTreeChildren)(n)];case 2:return o=a.sent(),n.children=o,i=g(o),t.children=i,t.isLeaf=!i.length,[3,4];case 3:return t.loading=!1,d(function(e){return e+1}),[7];case 4:return[2]}})})()}),k=(0,o.useMemoizedFn)(function(e,t){var n,r,o=null==t||null==(n=t[t.length-1])?void 0:n.meta;if(o){var i,a,l=null==(r=o.paths)?void 0:r[0];null==u||u(l===C||"constant"===l?"":(a=null!=(i=null==o?void 0:o.paths)?i:[]).length?"{{".concat(a.join("."),"}}"):"")}}),x=v?l().createElement(j.WorkflowVariableTag,{value:null!=s?s:"",onClear:function(){return null==u?void 0:u("")},metaTree:null!=p?p:n,style:{width:"100%",minWidth:0}}):l().createElement(I,{value:null!=s?s:"",onChange:u});return l().createElement(i.Space.Compact,{style:{display:"flex",alignItems:"flex-start",width:"100%"}},l().createElement("div",{style:{flex:1,minWidth:0}},x),l().createElement(i.Cascader,{value:m,options:w,loadData:S,onChange:k},l().createElement(i.Button,{type:m.length?"primary":"default"},"x")))}function $(e){var t=e.value,n=e.onChange,i=(0,c.yr)().t,u=(0,r.useFlowContext)(),s=(0,j.useWorkflowVariableOptions)({types:[M]}),f=(0,o.useMemoizedFn)(function(e){var t,n;return null!=(t=null==u||null==(n=u.t)?void 0:n.call(u,e,{ns:"workflow",nsMode:"fallback"}))?t:i(e)}),p=(0,a.useMemo)(function(){var e,t,n,r;return[{name:C,title:f("Null"),type:"string",paths:[C]},{name:"constant",title:f("Constant"),type:"string",paths:["constant"]}].concat(function(e){if(Array.isArray(e))return k(e)}(r=[null!=(e=(n=new Map(s.map(function(e){return[e.name,e]}))).get(A))?e:q(A,f("Scope variables")),null!=(t=n.get(_))?t:q(_,f("Node result")),n.get("$context"),n.get("$system"),n.get("$env")].filter(Boolean))||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||E(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}())},[f,s]);return l().createElement(F,{value:null!=t?t:"",onChange:n,metaTree:p,translate:f})}function L(e){var t,n=i.theme.useToken().token;return l().createElement("div",{style:{border:"".concat(n.lineWidth,"px dashed ").concat(n.colorBorder),padding:n.paddingSM}},l().createElement(j.FilterDynamicComponent,{collection:"users",value:null!=(t=e.value.filter)?t:{},onChange:function(t){var n;return null==(n=e.onChange)?void 0:n.call(e,{filter:null!=t?t:{}})}}))}function N(e){var t;return e.value&&"object"==((t=e.value)&&"u">typeof Symbol&&t.constructor===Symbol?"symbol":typeof t)?l().createElement(L,{value:e.value,onChange:e.onChange}):l().createElement($,{value:"string"==typeof e.value?e.value:"",onChange:e.onChange})}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function D(e,t){if(e){if("string"==typeof e)return R(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return R(e,t)}}function B(e){var t,n=e.value,r=void 0===n?[]:n,o=e.onChange,u=e.disabled,s=(0,c.yr)().t,f=function(e){if(Array.isArray(e))return e}(t=(0,a.useState)(!1))||function(e){var t,n,r=null==e?null:"u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o=[],i=!0,a=!1;try{for(r=r.call(e);!(i=(t=r.next()).done)&&(o.push(t.value),2!==o.length);i=!0);}catch(e){a=!0,n=e}finally{try{i||null==r.return||r.return()}finally{if(a)throw n}}return o}}(t)||D(t,2)||function(){throw TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),p=f[0],y=f[1],b=(0,a.useCallback)(function(e){null==o||o(((function(e){if(Array.isArray(e))return R(e)})(r)||function(e){if("u">typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(r)||D(r)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).concat([e])),y(!1)},[o,r]),d=l().createElement(i.Button,{icon:l().createElement(O.PlusOutlined,null),type:"dashed",block:!0,disabled:u},s("Add user"));return u?d:l().createElement(i.Popover,{open:p,onOpenChange:y,content:l().createElement(i.Space,{direction:"vertical",size:"small"},l().createElement(i.Button,{type:"text",onClick:function(){return b("")}},s("Select users")),l().createElement(i.Button,{type:"text",onClick:function(){return b({filter:{}})}},s("Query users")))},d)}}(),S}()});
|
|
@@ -7,6 +7,6 @@
|
|
|
7
7
|
* For more information, please refer to: https://www.nocobase.com/agreement.
|
|
8
8
|
*/
|
|
9
9
|
export declare const NAMESPACE = "notification-manager";
|
|
10
|
-
export declare function useNotificationTranslation(): import("react-i18next").UseTranslationResponse<("notification-manager" | "
|
|
10
|
+
export declare function useNotificationTranslation(): import("react-i18next").UseTranslationResponse<("notification-manager" | "client" | "data-source-manager" | "@nocobase/plugin-notification-manager")[], undefined>;
|
|
11
11
|
export declare function useT(): (key: string, options?: Record<string, any>) => string;
|
|
12
12
|
export declare function tExpr(key: string): string;
|
package/dist/externalVersion.js
CHANGED
|
@@ -10,15 +10,15 @@
|
|
|
10
10
|
module.exports = {
|
|
11
11
|
"react": "18.2.0",
|
|
12
12
|
"antd": "5.24.2",
|
|
13
|
-
"@nocobase/client": "2.2.0-alpha.
|
|
14
|
-
"@nocobase/utils": "2.2.0-alpha.
|
|
15
|
-
"@nocobase/flow-engine": "2.2.0-alpha.
|
|
13
|
+
"@nocobase/client": "2.2.0-alpha.5",
|
|
14
|
+
"@nocobase/utils": "2.2.0-alpha.5",
|
|
15
|
+
"@nocobase/flow-engine": "2.2.0-alpha.5",
|
|
16
16
|
"react-i18next": "11.18.6",
|
|
17
|
-
"@nocobase/client-v2": "2.2.0-alpha.
|
|
18
|
-
"@nocobase/database": "2.2.0-alpha.
|
|
19
|
-
"@nocobase/server": "2.2.0-alpha.
|
|
20
|
-
"@nocobase/cache": "2.2.0-alpha.
|
|
21
|
-
"@nocobase/logger": "2.2.0-alpha.
|
|
17
|
+
"@nocobase/client-v2": "2.2.0-alpha.5",
|
|
18
|
+
"@nocobase/database": "2.2.0-alpha.5",
|
|
19
|
+
"@nocobase/server": "2.2.0-alpha.5",
|
|
20
|
+
"@nocobase/cache": "2.2.0-alpha.5",
|
|
21
|
+
"@nocobase/logger": "2.2.0-alpha.5",
|
|
22
22
|
"@formily/react": "2.3.7",
|
|
23
23
|
"@formily/core": "2.3.7",
|
|
24
24
|
"ahooks": "3.7.8",
|
|
@@ -26,6 +26,6 @@ module.exports = {
|
|
|
26
26
|
"lodash": "4.18.1",
|
|
27
27
|
"dayjs": "1.11.13",
|
|
28
28
|
"@formily/shared": "2.3.7",
|
|
29
|
-
"@nocobase/plugin-workflow": "2.2.0-alpha.
|
|
29
|
+
"@nocobase/plugin-workflow": "2.2.0-alpha.5",
|
|
30
30
|
"@formily/antd-v5": "1.2.3"
|
|
31
31
|
};
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "MAX", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _max.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "NIL", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _nil.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "parse", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _parse.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "stringify", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function get() {
|
|
27
|
+
return _stringify.default;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "v1", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function get() {
|
|
33
|
+
return _v.default;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "v1ToV6", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function get() {
|
|
39
|
+
return _v1ToV.default;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "v3", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function get() {
|
|
45
|
+
return _v2.default;
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports, "v4", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function get() {
|
|
51
|
+
return _v3.default;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
Object.defineProperty(exports, "v5", {
|
|
55
|
+
enumerable: true,
|
|
56
|
+
get: function get() {
|
|
57
|
+
return _v4.default;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
Object.defineProperty(exports, "v6", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function get() {
|
|
63
|
+
return _v5.default;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
Object.defineProperty(exports, "v6ToV1", {
|
|
67
|
+
enumerable: true,
|
|
68
|
+
get: function get() {
|
|
69
|
+
return _v6ToV.default;
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
Object.defineProperty(exports, "v7", {
|
|
73
|
+
enumerable: true,
|
|
74
|
+
get: function get() {
|
|
75
|
+
return _v6.default;
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
Object.defineProperty(exports, "validate", {
|
|
79
|
+
enumerable: true,
|
|
80
|
+
get: function get() {
|
|
81
|
+
return _validate.default;
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
Object.defineProperty(exports, "version", {
|
|
85
|
+
enumerable: true,
|
|
86
|
+
get: function get() {
|
|
87
|
+
return _version.default;
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
var _max = _interopRequireDefault(require("./max.js"));
|
|
91
|
+
var _nil = _interopRequireDefault(require("./nil.js"));
|
|
92
|
+
var _parse = _interopRequireDefault(require("./parse.js"));
|
|
93
|
+
var _stringify = _interopRequireDefault(require("./stringify.js"));
|
|
94
|
+
var _v = _interopRequireDefault(require("./v1.js"));
|
|
95
|
+
var _v1ToV = _interopRequireDefault(require("./v1ToV6.js"));
|
|
96
|
+
var _v2 = _interopRequireDefault(require("./v3.js"));
|
|
97
|
+
var _v3 = _interopRequireDefault(require("./v4.js"));
|
|
98
|
+
var _v4 = _interopRequireDefault(require("./v5.js"));
|
|
99
|
+
var _v5 = _interopRequireDefault(require("./v6.js"));
|
|
100
|
+
var _v6ToV = _interopRequireDefault(require("./v6ToV1.js"));
|
|
101
|
+
var _v6 = _interopRequireDefault(require("./v7.js"));
|
|
102
|
+
var _validate = _interopRequireDefault(require("./validate.js"));
|
|
103
|
+
var _version = _interopRequireDefault(require("./version.js"));
|
|
104
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
/*
|
|
8
|
+
* Browser-compatible JavaScript MD5
|
|
9
|
+
*
|
|
10
|
+
* Modification of JavaScript MD5
|
|
11
|
+
* https://github.com/blueimp/JavaScript-MD5
|
|
12
|
+
*
|
|
13
|
+
* Copyright 2011, Sebastian Tschan
|
|
14
|
+
* https://blueimp.net
|
|
15
|
+
*
|
|
16
|
+
* Licensed under the MIT license:
|
|
17
|
+
* https://opensource.org/licenses/MIT
|
|
18
|
+
*
|
|
19
|
+
* Based on
|
|
20
|
+
* A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
|
|
21
|
+
* Digest Algorithm, as defined in RFC 1321.
|
|
22
|
+
* Version 2.2 Copyright (C) Paul Johnston 1999 - 2009
|
|
23
|
+
* Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet
|
|
24
|
+
* Distributed under the BSD License
|
|
25
|
+
* See http://pajhome.org.uk/crypt/md5 for more info.
|
|
26
|
+
*/
|
|
27
|
+
function md5(bytes) {
|
|
28
|
+
if (typeof bytes === 'string') {
|
|
29
|
+
var msg = unescape(encodeURIComponent(bytes)); // UTF8 escape
|
|
30
|
+
|
|
31
|
+
bytes = new Uint8Array(msg.length);
|
|
32
|
+
for (var i = 0; i < msg.length; ++i) {
|
|
33
|
+
bytes[i] = msg.charCodeAt(i);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return md5ToHexEncodedArray(wordsToMd5(bytesToWords(bytes), bytes.length * 8));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/*
|
|
40
|
+
* Convert an array of little-endian words to an array of bytes
|
|
41
|
+
*/
|
|
42
|
+
function md5ToHexEncodedArray(input) {
|
|
43
|
+
var output = [];
|
|
44
|
+
var length32 = input.length * 32;
|
|
45
|
+
var hexTab = '0123456789abcdef';
|
|
46
|
+
for (var i = 0; i < length32; i += 8) {
|
|
47
|
+
var x = input[i >> 5] >>> i % 32 & 0xff;
|
|
48
|
+
var hex = parseInt(hexTab.charAt(x >>> 4 & 0x0f) + hexTab.charAt(x & 0x0f), 16);
|
|
49
|
+
output.push(hex);
|
|
50
|
+
}
|
|
51
|
+
return output;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Calculate output length with padding and bit length
|
|
56
|
+
*/
|
|
57
|
+
function getOutputLength(inputLength8) {
|
|
58
|
+
return (inputLength8 + 64 >>> 9 << 4) + 14 + 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/*
|
|
62
|
+
* Calculate the MD5 of an array of little-endian words, and a bit length.
|
|
63
|
+
*/
|
|
64
|
+
function wordsToMd5(x, len) {
|
|
65
|
+
/* append padding */
|
|
66
|
+
x[len >> 5] |= 0x80 << len % 32;
|
|
67
|
+
x[getOutputLength(len) - 1] = len;
|
|
68
|
+
var a = 1732584193;
|
|
69
|
+
var b = -271733879;
|
|
70
|
+
var c = -1732584194;
|
|
71
|
+
var d = 271733878;
|
|
72
|
+
for (var i = 0; i < x.length; i += 16) {
|
|
73
|
+
var olda = a;
|
|
74
|
+
var oldb = b;
|
|
75
|
+
var oldc = c;
|
|
76
|
+
var oldd = d;
|
|
77
|
+
a = md5ff(a, b, c, d, x[i], 7, -680876936);
|
|
78
|
+
d = md5ff(d, a, b, c, x[i + 1], 12, -389564586);
|
|
79
|
+
c = md5ff(c, d, a, b, x[i + 2], 17, 606105819);
|
|
80
|
+
b = md5ff(b, c, d, a, x[i + 3], 22, -1044525330);
|
|
81
|
+
a = md5ff(a, b, c, d, x[i + 4], 7, -176418897);
|
|
82
|
+
d = md5ff(d, a, b, c, x[i + 5], 12, 1200080426);
|
|
83
|
+
c = md5ff(c, d, a, b, x[i + 6], 17, -1473231341);
|
|
84
|
+
b = md5ff(b, c, d, a, x[i + 7], 22, -45705983);
|
|
85
|
+
a = md5ff(a, b, c, d, x[i + 8], 7, 1770035416);
|
|
86
|
+
d = md5ff(d, a, b, c, x[i + 9], 12, -1958414417);
|
|
87
|
+
c = md5ff(c, d, a, b, x[i + 10], 17, -42063);
|
|
88
|
+
b = md5ff(b, c, d, a, x[i + 11], 22, -1990404162);
|
|
89
|
+
a = md5ff(a, b, c, d, x[i + 12], 7, 1804603682);
|
|
90
|
+
d = md5ff(d, a, b, c, x[i + 13], 12, -40341101);
|
|
91
|
+
c = md5ff(c, d, a, b, x[i + 14], 17, -1502002290);
|
|
92
|
+
b = md5ff(b, c, d, a, x[i + 15], 22, 1236535329);
|
|
93
|
+
a = md5gg(a, b, c, d, x[i + 1], 5, -165796510);
|
|
94
|
+
d = md5gg(d, a, b, c, x[i + 6], 9, -1069501632);
|
|
95
|
+
c = md5gg(c, d, a, b, x[i + 11], 14, 643717713);
|
|
96
|
+
b = md5gg(b, c, d, a, x[i], 20, -373897302);
|
|
97
|
+
a = md5gg(a, b, c, d, x[i + 5], 5, -701558691);
|
|
98
|
+
d = md5gg(d, a, b, c, x[i + 10], 9, 38016083);
|
|
99
|
+
c = md5gg(c, d, a, b, x[i + 15], 14, -660478335);
|
|
100
|
+
b = md5gg(b, c, d, a, x[i + 4], 20, -405537848);
|
|
101
|
+
a = md5gg(a, b, c, d, x[i + 9], 5, 568446438);
|
|
102
|
+
d = md5gg(d, a, b, c, x[i + 14], 9, -1019803690);
|
|
103
|
+
c = md5gg(c, d, a, b, x[i + 3], 14, -187363961);
|
|
104
|
+
b = md5gg(b, c, d, a, x[i + 8], 20, 1163531501);
|
|
105
|
+
a = md5gg(a, b, c, d, x[i + 13], 5, -1444681467);
|
|
106
|
+
d = md5gg(d, a, b, c, x[i + 2], 9, -51403784);
|
|
107
|
+
c = md5gg(c, d, a, b, x[i + 7], 14, 1735328473);
|
|
108
|
+
b = md5gg(b, c, d, a, x[i + 12], 20, -1926607734);
|
|
109
|
+
a = md5hh(a, b, c, d, x[i + 5], 4, -378558);
|
|
110
|
+
d = md5hh(d, a, b, c, x[i + 8], 11, -2022574463);
|
|
111
|
+
c = md5hh(c, d, a, b, x[i + 11], 16, 1839030562);
|
|
112
|
+
b = md5hh(b, c, d, a, x[i + 14], 23, -35309556);
|
|
113
|
+
a = md5hh(a, b, c, d, x[i + 1], 4, -1530992060);
|
|
114
|
+
d = md5hh(d, a, b, c, x[i + 4], 11, 1272893353);
|
|
115
|
+
c = md5hh(c, d, a, b, x[i + 7], 16, -155497632);
|
|
116
|
+
b = md5hh(b, c, d, a, x[i + 10], 23, -1094730640);
|
|
117
|
+
a = md5hh(a, b, c, d, x[i + 13], 4, 681279174);
|
|
118
|
+
d = md5hh(d, a, b, c, x[i], 11, -358537222);
|
|
119
|
+
c = md5hh(c, d, a, b, x[i + 3], 16, -722521979);
|
|
120
|
+
b = md5hh(b, c, d, a, x[i + 6], 23, 76029189);
|
|
121
|
+
a = md5hh(a, b, c, d, x[i + 9], 4, -640364487);
|
|
122
|
+
d = md5hh(d, a, b, c, x[i + 12], 11, -421815835);
|
|
123
|
+
c = md5hh(c, d, a, b, x[i + 15], 16, 530742520);
|
|
124
|
+
b = md5hh(b, c, d, a, x[i + 2], 23, -995338651);
|
|
125
|
+
a = md5ii(a, b, c, d, x[i], 6, -198630844);
|
|
126
|
+
d = md5ii(d, a, b, c, x[i + 7], 10, 1126891415);
|
|
127
|
+
c = md5ii(c, d, a, b, x[i + 14], 15, -1416354905);
|
|
128
|
+
b = md5ii(b, c, d, a, x[i + 5], 21, -57434055);
|
|
129
|
+
a = md5ii(a, b, c, d, x[i + 12], 6, 1700485571);
|
|
130
|
+
d = md5ii(d, a, b, c, x[i + 3], 10, -1894986606);
|
|
131
|
+
c = md5ii(c, d, a, b, x[i + 10], 15, -1051523);
|
|
132
|
+
b = md5ii(b, c, d, a, x[i + 1], 21, -2054922799);
|
|
133
|
+
a = md5ii(a, b, c, d, x[i + 8], 6, 1873313359);
|
|
134
|
+
d = md5ii(d, a, b, c, x[i + 15], 10, -30611744);
|
|
135
|
+
c = md5ii(c, d, a, b, x[i + 6], 15, -1560198380);
|
|
136
|
+
b = md5ii(b, c, d, a, x[i + 13], 21, 1309151649);
|
|
137
|
+
a = md5ii(a, b, c, d, x[i + 4], 6, -145523070);
|
|
138
|
+
d = md5ii(d, a, b, c, x[i + 11], 10, -1120210379);
|
|
139
|
+
c = md5ii(c, d, a, b, x[i + 2], 15, 718787259);
|
|
140
|
+
b = md5ii(b, c, d, a, x[i + 9], 21, -343485551);
|
|
141
|
+
a = safeAdd(a, olda);
|
|
142
|
+
b = safeAdd(b, oldb);
|
|
143
|
+
c = safeAdd(c, oldc);
|
|
144
|
+
d = safeAdd(d, oldd);
|
|
145
|
+
}
|
|
146
|
+
return [a, b, c, d];
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/*
|
|
150
|
+
* Convert an array bytes to an array of little-endian words
|
|
151
|
+
* Characters >255 have their high-byte silently ignored.
|
|
152
|
+
*/
|
|
153
|
+
function bytesToWords(input) {
|
|
154
|
+
if (input.length === 0) {
|
|
155
|
+
return [];
|
|
156
|
+
}
|
|
157
|
+
var length8 = input.length * 8;
|
|
158
|
+
var output = new Uint32Array(getOutputLength(length8));
|
|
159
|
+
for (var i = 0; i < length8; i += 8) {
|
|
160
|
+
output[i >> 5] |= (input[i / 8] & 0xff) << i % 32;
|
|
161
|
+
}
|
|
162
|
+
return output;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/*
|
|
166
|
+
* Add integers, wrapping at 2^32. This uses 16-bit operations internally
|
|
167
|
+
* to work around bugs in some JS interpreters.
|
|
168
|
+
*/
|
|
169
|
+
function safeAdd(x, y) {
|
|
170
|
+
var lsw = (x & 0xffff) + (y & 0xffff);
|
|
171
|
+
var msw = (x >> 16) + (y >> 16) + (lsw >> 16);
|
|
172
|
+
return msw << 16 | lsw & 0xffff;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
/*
|
|
176
|
+
* Bitwise rotate a 32-bit number to the left.
|
|
177
|
+
*/
|
|
178
|
+
function bitRotateLeft(num, cnt) {
|
|
179
|
+
return num << cnt | num >>> 32 - cnt;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/*
|
|
183
|
+
* These functions implement the four basic operations the algorithm uses.
|
|
184
|
+
*/
|
|
185
|
+
function md5cmn(q, a, b, x, s, t) {
|
|
186
|
+
return safeAdd(bitRotateLeft(safeAdd(safeAdd(a, q), safeAdd(x, t)), s), b);
|
|
187
|
+
}
|
|
188
|
+
function md5ff(a, b, c, d, x, s, t) {
|
|
189
|
+
return md5cmn(b & c | ~b & d, a, b, x, s, t);
|
|
190
|
+
}
|
|
191
|
+
function md5gg(a, b, c, d, x, s, t) {
|
|
192
|
+
return md5cmn(b & d | c & ~d, a, b, x, s, t);
|
|
193
|
+
}
|
|
194
|
+
function md5hh(a, b, c, d, x, s, t) {
|
|
195
|
+
return md5cmn(b ^ c ^ d, a, b, x, s, t);
|
|
196
|
+
}
|
|
197
|
+
function md5ii(a, b, c, d, x, s, t) {
|
|
198
|
+
return md5cmn(c ^ (b | ~d), a, b, x, s, t);
|
|
199
|
+
}
|
|
200
|
+
var _default = exports.default = md5;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);
|
|
8
|
+
var _default = exports.default = {
|
|
9
|
+
randomUUID
|
|
10
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _validate = _interopRequireDefault(require("./validate.js"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
|
+
function parse(uuid) {
|
|
10
|
+
if (!(0, _validate.default)(uuid)) {
|
|
11
|
+
throw TypeError('Invalid UUID');
|
|
12
|
+
}
|
|
13
|
+
var v;
|
|
14
|
+
var arr = new Uint8Array(16);
|
|
15
|
+
|
|
16
|
+
// Parse ########-....-....-....-............
|
|
17
|
+
arr[0] = (v = parseInt(uuid.slice(0, 8), 16)) >>> 24;
|
|
18
|
+
arr[1] = v >>> 16 & 0xff;
|
|
19
|
+
arr[2] = v >>> 8 & 0xff;
|
|
20
|
+
arr[3] = v & 0xff;
|
|
21
|
+
|
|
22
|
+
// Parse ........-####-....-....-............
|
|
23
|
+
arr[4] = (v = parseInt(uuid.slice(9, 13), 16)) >>> 8;
|
|
24
|
+
arr[5] = v & 0xff;
|
|
25
|
+
|
|
26
|
+
// Parse ........-....-####-....-............
|
|
27
|
+
arr[6] = (v = parseInt(uuid.slice(14, 18), 16)) >>> 8;
|
|
28
|
+
arr[7] = v & 0xff;
|
|
29
|
+
|
|
30
|
+
// Parse ........-....-....-####-............
|
|
31
|
+
arr[8] = (v = parseInt(uuid.slice(19, 23), 16)) >>> 8;
|
|
32
|
+
arr[9] = v & 0xff;
|
|
33
|
+
|
|
34
|
+
// Parse ........-....-....-....-############
|
|
35
|
+
// (Use "/" to avoid 32-bit truncation when bit-shifting high-order bytes)
|
|
36
|
+
arr[10] = (v = parseInt(uuid.slice(24, 36), 16)) / 0x10000000000 & 0xff;
|
|
37
|
+
arr[11] = v / 0x100000000 & 0xff;
|
|
38
|
+
arr[12] = v >>> 24 & 0xff;
|
|
39
|
+
arr[13] = v >>> 16 & 0xff;
|
|
40
|
+
arr[14] = v >>> 8 & 0xff;
|
|
41
|
+
arr[15] = v & 0xff;
|
|
42
|
+
return arr;
|
|
43
|
+
}
|
|
44
|
+
var _default = exports.default = parse;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _default = exports.default = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = rng;
|
|
7
|
+
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
8
|
+
// require the crypto API and do not support built-in fallback to lower quality random number
|
|
9
|
+
// generators (like Math.random()).
|
|
10
|
+
|
|
11
|
+
var getRandomValues;
|
|
12
|
+
var rnds8 = new Uint8Array(16);
|
|
13
|
+
function rng() {
|
|
14
|
+
// lazy load so that environments that need to polyfill have a chance to do so
|
|
15
|
+
if (!getRandomValues) {
|
|
16
|
+
// getRandomValues needs to be invoked in a context where "this" is a Crypto implementation.
|
|
17
|
+
getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);
|
|
18
|
+
if (!getRandomValues) {
|
|
19
|
+
throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return getRandomValues(rnds8);
|
|
23
|
+
}
|