@nocobase/plugin-ai 2.1.0-alpha.14 → 2.1.0-alpha.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.
Files changed (48) hide show
  1. package/dist/ai/skills/business-analysis-report/SKILLS.md +84 -0
  2. package/dist/ai/tools/businessReportGenerator.d.ts +10 -0
  3. package/dist/ai/tools/businessReportGenerator.js +83 -0
  4. package/dist/ai/tools/subAgentWebSearch.d.ts +10 -0
  5. package/dist/ai/tools/subAgentWebSearch.js +103 -0
  6. package/dist/client/0e94d90f0134df30.js +10 -0
  7. package/dist/client/{4f9117811ffc7ab3.js → 1c3ef55a6d63c9a3.js} +1 -1
  8. package/dist/client/55d67b74f02b8d74.js +10 -0
  9. package/dist/client/{6dc8c9b641452067.js → 5d5c118d11e91913.js} +1 -1
  10. package/dist/client/8e82080c5e8ccfb7.js +10 -0
  11. package/dist/client/a8d6d81fb88f1a8e.js +10 -0
  12. package/dist/client/ai-employees/business-report/tools/index.d.ts +10 -0
  13. package/dist/client/ai-employees/business-report/ui/BusinessReportCard.d.ts +12 -0
  14. package/dist/client/ai-employees/business-report/ui/BusinessReportModal.d.ts +17 -0
  15. package/dist/client/ai-employees/business-report/ui/report-utils.d.ts +36 -0
  16. package/dist/client/ai-employees/chatbox/markdown/ECharts.d.ts +1 -2
  17. package/dist/client/ai-employees/chatbox/markdown/Markdown.d.ts +1 -1
  18. package/dist/client/c065565ccbb41f99.js +10 -0
  19. package/dist/client/d5e9663991c30eed.js +10 -0
  20. package/dist/client/f87cff5213f94856.js +10 -0
  21. package/dist/client/f8c075896e8b9c0b.js +10 -0
  22. package/dist/client/fd4e5dcaf24052c1.js +10 -0
  23. package/dist/client/index.js +4 -4
  24. package/dist/client/manager/ai-manager.d.ts +4 -23
  25. package/dist/externalVersion.js +15 -14
  26. package/dist/locale/en-US.json +20 -0
  27. package/dist/locale/zh-CN.json +20 -0
  28. package/dist/node_modules/fast-glob/package.json +1 -1
  29. package/dist/node_modules/flexsearch/package.json +1 -1
  30. package/dist/node_modules/fs-extra/package.json +1 -1
  31. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  32. package/dist/node_modules/openai/package.json +1 -1
  33. package/dist/node_modules/zod/package.json +1 -1
  34. package/dist/server/ai-employees/ai-employee.d.ts +4 -6
  35. package/dist/server/ai-employees/ai-employee.js +74 -54
  36. package/dist/server/ai-employees/prompts.d.ts +2 -0
  37. package/dist/server/ai-employees/prompts.js +5 -0
  38. package/dist/server/ai-employees/utils.js +1 -1
  39. package/dist/server/llm-providers/dashscope.js +1 -3
  40. package/dist/server/manager/ai-manager.d.ts +10 -0
  41. package/dist/server/manager/ai-manager.js +32 -0
  42. package/dist/server/utils.js +3 -0
  43. package/package.json +2 -2
  44. package/dist/client/39492c2121f4c722.js +0 -10
  45. package/dist/client/53190ab4290ef9d5.js +0 -10
  46. package/dist/client/7237366e104efa7a.js +0 -10
  47. package/dist/client/9c00efb8eb0b4d69.js +0 -10
  48. package/dist/client/d4e2ed9fa44a82b2.js +0 -10
@@ -0,0 +1,84 @@
1
+ ---
2
+ scope: GENERAL
3
+ name: business-analysis-report
4
+ description: Analyze business data with the data-query workflow and generate stakeholder-facing reports with markdown and ECharts.
5
+ introduction:
6
+ title: '{{t("ai.skills.businessAnalysisReport.title", { ns: "@nocobase/plugin-ai" })}}'
7
+ about: '{{t("ai.skills.businessAnalysisReport.about", { ns: "@nocobase/plugin-ai" })}}'
8
+ tools:
9
+ - getDataSources
10
+ - getCollectionNames
11
+ - getCollectionMetadata
12
+ - searchFieldMetadata
13
+ - dataQuery
14
+ - dataSourceQuery
15
+ - dataSourceCounting
16
+ - businessReportGenerator
17
+ ---
18
+
19
+ You are a business analyst focused on turning business data into decision-ready reports.
20
+
21
+ Your job is to understand the business question, use the data-query workflow to inspect and analyze data, and then package the findings into a polished report.
22
+
23
+ # Primary Workflow
24
+
25
+ ## 1. Understand the decision goal
26
+
27
+ - Clarify the business objective, audience, time range, and metrics.
28
+ - Identify the dimensions, measures, and comparison baselines needed to answer the question.
29
+
30
+ ## 2. Use the data-query workflow before reporting
31
+
32
+ - Inspect the schema with `getCollectionNames`, `getCollectionMetadata`, or `searchFieldMetadata`.
33
+ - Use `dataQuery` for grouped metrics, trends, comparisons, rankings, and post-aggregation filtering.
34
+ - Use `dataSourceQuery` for raw-row inspection and anomaly checks.
35
+ - Use `dataSourceCounting` only for the simplest count scenario.
36
+
37
+ Do not guess collection names, relation paths, or aliases.
38
+
39
+ ## 3. Generate a report, not just an answer
40
+
41
+ When the evidence is ready, call `businessReportGenerator`.
42
+
43
+ For business reporting, generate the final report directly with `businessReportGenerator`.
44
+ Do not call a separate chart-only tool first.
45
+ If charts are needed, include their ECharts `options` directly in the `charts` field of the same `businessReportGenerator` call.
46
+ When the report needs mixed text-and-chart layout, place charts inline by adding markdown placeholders such as `{{chart:1}}` and `{{chart:2}}` where each chart should appear.
47
+
48
+ The report should usually include:
49
+
50
+ - a clear title
51
+ - a short executive summary
52
+ - a markdown body with findings, caveats, and actions
53
+ - one or more ECharts charts when they help explain the result
54
+
55
+ ## 4. Keep the report stakeholder-friendly
56
+
57
+ Prefer this structure:
58
+
59
+ 1. Executive summary
60
+ 2. Key findings
61
+ 3. Supporting analysis
62
+ 4. Risks or caveats
63
+ 5. Recommended actions
64
+
65
+ # Report Rules
66
+
67
+ - The markdown must read like a business report rather than raw query output.
68
+ - Every chart must be grounded in the queried data.
69
+ - Prefer a small number of high-signal charts over many low-value charts.
70
+ - If the data is incomplete, say so explicitly in the report.
71
+ - Do not fabricate causes, trends, or recommendations that are unsupported by the data.
72
+ - Do not split chart generation and report generation into separate steps for the same report unless the user explicitly asks for a standalone chart.
73
+ - If charts should appear inside the narrative, use `{{chart:n}}` placeholders in the markdown instead of relying on charts being appended at the end.
74
+
75
+ # Available Tools
76
+
77
+ - `getDataSources`
78
+ - `getCollectionNames`
79
+ - `getCollectionMetadata`
80
+ - `searchFieldMetadata`
81
+ - `dataQuery`
82
+ - `dataSourceQuery`
83
+ - `dataSourceCounting`
84
+ - `businessReportGenerator`
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: import("@nocobase/ai").ToolsOptions;
10
+ export default _default;
@@ -0,0 +1,83 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __create = Object.create;
11
+ var __defProp = Object.defineProperty;
12
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
13
+ var __getOwnPropNames = Object.getOwnPropertyNames;
14
+ var __getProtoOf = Object.getPrototypeOf;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
29
+ // If the importer is in node compatibility mode or this is not an ESM
30
+ // file that has been converted to a CommonJS file using a Babel-
31
+ // compatible transform (i.e. "__esModule" has not been set), then set
32
+ // "default" to the CommonJS "module.exports" for node compatibility.
33
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
34
+ mod
35
+ ));
36
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
37
+ var businessReportGenerator_exports = {};
38
+ __export(businessReportGenerator_exports, {
39
+ default: () => businessReportGenerator_default
40
+ });
41
+ module.exports = __toCommonJS(businessReportGenerator_exports);
42
+ var import_ai = require("@nocobase/ai");
43
+ var import_zod = require("zod");
44
+ var import_package = __toESM(require("../../../package.json"));
45
+ const chartSchema = import_zod.z.object({
46
+ title: import_zod.z.string().optional().describe("Chart title shown in the report."),
47
+ summary: import_zod.z.string().optional().describe("Short explanation of what this chart shows."),
48
+ options: import_zod.z.object({}).catchall(import_zod.z.any()).describe("Valid ECharts options object.")
49
+ });
50
+ var businessReportGenerator_default = (0, import_ai.defineTools)({
51
+ scope: "GENERAL",
52
+ defaultPermission: "ALLOW",
53
+ introduction: {
54
+ title: `{{t("ai.tools.businessReportGenerator.title", { ns: "${import_package.default.name}" })}}`,
55
+ about: `{{t("ai.tools.businessReportGenerator.about", { ns: "${import_package.default.name}" })}}`
56
+ },
57
+ definition: {
58
+ name: "businessReportGenerator",
59
+ description: "Generate a complete business analysis report with markdown content and embedded ECharts charts in a single tool call.",
60
+ schema: import_zod.z.object({
61
+ title: import_zod.z.string().describe("Report title."),
62
+ summary: import_zod.z.string().optional().describe("Short executive summary shown in the report header."),
63
+ markdown: import_zod.z.string().describe(
64
+ "Main report body in markdown. Use sections for findings, risks, and recommendations. To place a chart inline at a specific position, insert placeholders like {{chart:1}}, {{chart:2}}."
65
+ ),
66
+ charts: import_zod.z.array(chartSchema).optional().describe(
67
+ "Charts included in the report. Put full ECharts options here directly instead of generating charts in a separate step."
68
+ ),
69
+ fileName: import_zod.z.string().optional().describe("Optional export file name without extension.")
70
+ })
71
+ },
72
+ invoke: async (_ctx, args) => {
73
+ var _a;
74
+ return {
75
+ status: "success",
76
+ content: JSON.stringify({
77
+ title: args.title,
78
+ chartCount: ((_a = args.charts) == null ? void 0 : _a.length) ?? 0,
79
+ fileName: args.fileName ?? null
80
+ })
81
+ };
82
+ }
83
+ });
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+ declare const _default: import("@nocobase/ai").ToolsOptions;
10
+ export default _default;
@@ -0,0 +1,103 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ var __defProp = Object.defineProperty;
11
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
12
+ var __getOwnPropNames = Object.getOwnPropertyNames;
13
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
14
+ var __export = (target, all) => {
15
+ for (var name in all)
16
+ __defProp(target, name, { get: all[name], enumerable: true });
17
+ };
18
+ var __copyProps = (to, from, except, desc) => {
19
+ if (from && typeof from === "object" || typeof from === "function") {
20
+ for (let key of __getOwnPropNames(from))
21
+ if (!__hasOwnProp.call(to, key) && key !== except)
22
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
23
+ }
24
+ return to;
25
+ };
26
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
27
+ var subAgentWebSearch_exports = {};
28
+ __export(subAgentWebSearch_exports, {
29
+ default: () => subAgentWebSearch_default
30
+ });
31
+ module.exports = __toCommonJS(subAgentWebSearch_exports);
32
+ var import_ai = require("@nocobase/ai");
33
+ var import_zod = require("zod");
34
+ var subAgentWebSearch_default = (0, import_ai.defineTools)({
35
+ scope: "SPECIFIED",
36
+ defaultPermission: "ALLOW",
37
+ introduction: {
38
+ title: '{{t("Web search")}}',
39
+ about: '{{t("Use web search to quickly find up-to-date information from the internet.")}}'
40
+ },
41
+ definition: {
42
+ name: "subAgentWebSearch",
43
+ description: "Use the query to search the web and return concise, relevant findings with source links.",
44
+ schema: import_zod.z.object({
45
+ query: import_zod.z.array(import_zod.z.string(), "A clear and specific web search query describing the information to retrieve.")
46
+ })
47
+ },
48
+ invoke: async (ctx, args, id) => {
49
+ var _a, _b, _c;
50
+ const pluginAI = ctx.app.pm.get("ai");
51
+ const { model } = ((_b = (_a = ctx.action) == null ? void 0 : _a.params) == null ? void 0 : _b.values) ?? {};
52
+ const { provider } = await pluginAI.aiManager.getLLMService({
53
+ ...model,
54
+ webSearch: true
55
+ });
56
+ if (!((_c = args.query) == null ? void 0 : _c.length)) {
57
+ return {
58
+ status: "success",
59
+ content: "Web search not invoke correctly. There is no query parameters provided"
60
+ };
61
+ }
62
+ const running = args.query.map(
63
+ (query) => provider.invoke(
64
+ {
65
+ messages: [
66
+ {
67
+ role: "system",
68
+ content: WEB_SEARCH_SYSTEM_PROMPT
69
+ },
70
+ {
71
+ role: "user",
72
+ content: query
73
+ }
74
+ ]
75
+ },
76
+ {
77
+ tags: ["langsmith:nostream"]
78
+ }
79
+ ).then((content) => content.text).then((result2) => ({ query, result: result2 }))
80
+ );
81
+ const result = await Promise.all(running);
82
+ return {
83
+ status: "success",
84
+ content: result
85
+ };
86
+ }
87
+ });
88
+ const WEB_SEARCH_SYSTEM_PROMPT = `You are a web search assistant.
89
+
90
+ Your primary task is to retrieve up-to-date information from the internet based on the user's input query.
91
+
92
+ Requirements:
93
+ 1. Actively attempt web retrieval first. Use internet search to find relevant and recent information.
94
+ 2. Summarize and synthesize findings clearly and concisely.
95
+ 3. Explicitly cite sources for key points whenever possible (for example: website/publication name, article title, and URL if available).
96
+ 4. Distinguish confirmed facts from uncertain or incomplete information.
97
+ 5. Do not fabricate search results, sources, or real-time data.
98
+ 6. If you cannot access reliable real-time information from the internet, clearly and honestly state that real-time retrieval was not possible, then provide the best available general information with that limitation noted.
99
+
100
+ Output style:
101
+ - Start with a brief direct answer.
102
+ - Then provide a structured summary of findings.
103
+ - End with a "Sources" section listing the origin of the information used.`;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * This file is part of the NocoBase (R) project.
3
+ * Copyright (c) 2020-2024 NocoBase Co., Ltd.
4
+ * Authors: NocoBase Team.
5
+ *
6
+ * This project is dual-licensed under AGPL-3.0 and NocoBase Commercial License.
7
+ * For more information, please refer to: https://www.nocobase.com/agreement.
8
+ */
9
+
10
+ (self.webpackChunk_nocobase_plugin_ai=self.webpackChunk_nocobase_plugin_ai||[]).push([["406"],{2341:function(e,t,n){"use strict";n.d(t,{A:function(){return A}});var r=n(1426),o=n(3059),i=n.n(o),a=n(9155),c=n.n(a),u=n(2059);let l=c().createContext(null);var s=({children:e})=>{let{prefixCls:t}=c().useContext(l);return c().createElement("div",{className:i()(`${t}-group-title`)},e&&c().createElement(u.Typography.Text,null,e))},f=n(7375),d=n(7782);let h=e=>{e.stopPropagation()};var p=e=>{let t,{prefixCls:n,info:o,className:l,direction:s,onClick:p,active:v,menu:m,...g}=e,y=(0,d.A)(g,{aria:!0,data:!0,attr:!0}),{disabled:b}=o,[w,E]=c().useState(!1),[A,S]=c().useState(!1),T=i()(l,`${n}-item`,{[`${n}-item-active`]:v&&!b},{[`${n}-item-disabled`]:b}),[O,x]=(0,a.useMemo)(()=>{let{trigger:e,...t}=m||{};return[e,t]},[m]);return c().createElement(u.Tooltip,{title:o.label,open:w&&A,onOpenChange:S,placement:"rtl"===s?"left":"right"},c().createElement("li",(0,r.A)({},y,{className:T,onClick:()=>{!b&&p&&p(o)}}),o.icon&&c().createElement("div",{className:`${n}-icon`},o.icon),c().createElement(u.Typography.Text,{className:`${n}-label`,ellipsis:{onEllipsis:E}},o.label),!b&&m&&c().createElement(u.Dropdown,{menu:x,placement:"rtl"===s?"bottomLeft":"bottomRight",trigger:["click"],disabled:b,onOpenChange:e=>{e&&S(!e)}},(t=c().createElement(f.EllipsisOutlined,{onClick:h,className:`${n}-menu-icon`}),O?"function"==typeof O?O(o,{originNode:t}):O:t))))},v=n(4921),m=n(5327),g=n(7790);let y="__ungrouped";var b=n(2019),w=n(9980),E=(0,n(7030).OF)("Conversations",e=>(e=>{let{componentCls:t}=e;return{[t]:{display:"flex",flexDirection:"column",gap:e.paddingXXS,overflowY:"auto",padding:e.paddingSM,[`&${t}-rtl`]:{direction:"rtl"},[`& ${t}-list`]:{display:"flex",gap:e.paddingXXS,flexDirection:"column",[`& ${t}-item`]:{paddingInlineStart:e.paddingXL},[`& ${t}-label`]:{color:e.colorTextDescription}},[`& ${t}-item`]:{display:"flex",height:e.controlHeightLG,minHeight:e.controlHeightLG,gap:e.paddingXS,padding:`0 ${(0,b.zA)(e.paddingXS)}`,alignItems:"center",borderRadius:e.borderRadiusLG,cursor:"pointer",transition:`all ${e.motionDurationMid} ${e.motionEaseInOut}`,"&:hover":{backgroundColor:e.colorBgTextHover},"&-active":{backgroundColor:e.colorBgTextHover,[`& ${t}-label, ${t}-menu-icon`]:{color:e.colorText}},"&-disabled":{cursor:"not-allowed",[`& ${t}-label`]:{color:e.colorTextDisabled}},"&:hover, &-active":{[`& ${t}-menu-icon`]:{opacity:1}}},[`& ${t}-label`]:{flex:1,color:e.colorText},[`& ${t}-menu-icon`]:{opacity:0,fontSize:e.fontSizeXL},[`& ${t}-group-title`]:{display:"flex",alignItems:"center",height:e.controlHeightLG,minHeight:e.controlHeightLG,padding:`0 ${(0,b.zA)(e.paddingXS)}`}}}})((0,w.oX)(e,{})),()=>({})),A=e=>{let{prefixCls:t,rootClassName:n,items:o,activeKey:a,defaultActiveKey:u,onActiveChange:f,menu:h,styles:b={},classNames:w={},groupable:A,className:S,style:T,...O}=e,x=(0,d.A)(O,{attr:!0,aria:!0,data:!0}),[C,_]=(0,v.A)(u,{value:a}),[R,k]=((e,t=[])=>{let[n,r,o]=c().useMemo(()=>{if(!e)return[!1,void 0,void 0];let t={sort:void 0,title:void 0};return"object"==typeof e&&(t={...t,...e}),[!0,t.sort,t.title]},[e]);return c().useMemo(()=>{if(!n)return[[{name:y,data:t,title:void 0}],n];let e=t.reduce((e,t)=>{let n=t.group||y;return e[n]||(e[n]=[]),e[n].push(t),e},{});return[(r?Object.keys(e).sort(r):Object.keys(e)).map(t=>({name:t===y?void 0:t,title:o,data:e[t]})),n]},[t,e])})(A,o),{getPrefixCls:M,direction:j}=(0,g.A)(),L=M("conversations",t),N=(0,m.A)("conversations"),[P,$,I]=E(L),D=i()(L,N.className,S,n,$,I,{[`${L}-rtl`]:"rtl"===j}),H=e=>{_(e.key),f&&f(e.key)};return P(c().createElement("ul",(0,r.A)({},x,{style:{...N.style,...T},className:D}),R.map((e,t)=>{let n=e.data.map((e,t)=>c().createElement(p,{key:e.key||`key-${t}`,info:e,prefixCls:L,direction:j,className:i()(w.item,N.classNames.item),style:{...N.styles.item,...b.item},menu:"function"==typeof h?h(e):h,active:C===e.key,onClick:H}));return k?c().createElement("li",{key:e.name||`key-${t}`},c().createElement(l.Provider,{value:{prefixCls:L}},e.title?.(e.name,{components:{GroupTitle:s}})||c().createElement(s,{key:e.name},e.name)),c().createElement("ul",{className:`${L}-list`},n)):n})))}},606:function(e,t,n){"use strict";let r;n.d(t,{A:function(){return j}});var o=n(1426),i=n(2059),a=n(3059),c=n.n(a),u=n(8993),l=n(7782),s=n(9155),f=n.n(s),d=n(5327),h=n(7790),p=n(7375),v=n(2094);let m=s.createContext({}),g=()=>({height:0}),y=e=>({height:e.scrollHeight}),b=s.createContext(null);var w=s.forwardRef(function(e,t){let{className:n,action:r,onClick:a,...u}=e,l=s.useContext(b),{prefixCls:f,disabled:d}=l,h=l[r],p=d??u.disabled??l[`${r}Disabled`];return s.createElement(i.Button,(0,o.A)({type:"text"},u,{ref:t,onClick:e=>{!p&&(h&&h(),a&&a(e))},className:c()(f,n,{[`${f}-disabled`]:p})}))}),E=s.forwardRef(function(e,t){return s.createElement(w,(0,o.A)({icon:s.createElement(p.ClearOutlined,null)},e,{action:"onClear",ref:t}))});let A=(0,s.memo)(e=>{let{className:t}=e;return f().createElement("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",className:t},f().createElement("title",null,"Stop Loading"),f().createElement("rect",{fill:"currentColor",height:"250",rx:"24",ry:"24",width:"250",x:"375",y:"375"}),f().createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",opacity:"0.45"}),f().createElement("circle",{cx:"500",cy:"500",fill:"none",r:"450",stroke:"currentColor",strokeWidth:"100",strokeDasharray:"600 9999999"},f().createElement("animateTransform",{attributeName:"transform",dur:"1s",from:"0 500 500",repeatCount:"indefinite",to:"360 500 500",type:"rotate"})))});var S=s.forwardRef(function(e,t){let{prefixCls:n}=s.useContext(b),{className:r}=e;return s.createElement(w,(0,o.A)({icon:null,color:"primary",variant:"text",shape:"circle"},e,{className:c()(r,`${n}-loading-button`),action:"onCancel",ref:t}),s.createElement(A,{className:`${n}-loading-icon`}))}),T=s.forwardRef(function(e,t){return s.createElement(w,(0,o.A)({icon:s.createElement(p.ArrowUpOutlined,null),type:"primary",shape:"circle"},e,{action:"onSend",ref:t}))});function O({className:e}){return f().createElement("svg",{color:"currentColor",viewBox:"0 0 1000 1000",xmlns:"http://www.w3.org/2000/svg",className:e},f().createElement("title",null,"Speech Recording"),Array.from({length:4}).map((e,t)=>f().createElement("rect",{fill:"currentColor",rx:70,ry:70,height:250,width:140,x:286.66666666666663*t,y:375,key:t},f().createElement("animate",{attributeName:"height",values:"250; 500; 250",keyTimes:"0; 0.5; 1",dur:"0.8s",begin:`${.2*t}s`,repeatCount:"indefinite"}),f().createElement("animate",{attributeName:"y",values:"375; 250; 375",keyTimes:"0; 0.5; 1",dur:"0.8s",begin:`${.2*t}s`,repeatCount:"indefinite"}))))}var x=s.forwardRef(function(e,t){let{speechRecording:n,onSpeechDisabled:r,prefixCls:i}=s.useContext(b),a=null;return a=n?s.createElement(O,{className:`${i}-recording-icon`}):r?s.createElement(p.AudioMutedOutlined,null):s.createElement(p.AudioOutlined,null),s.createElement(w,(0,o.A)({icon:a,color:"primary",variant:"text"},e,{action:"onSpeech",ref:t}))}),C=n(2019),_=n(9980),R=(0,n(7030).OF)("Sender",e=>{let{paddingXS:t,calc:n}=e,r=(0,_.oX)(e,{SenderContentMaxWidth:`calc(100% - ${(0,C.zA)(n(t).add(32).equal())})`});return[(e=>{let{componentCls:t,padding:n,paddingSM:r,paddingXS:o,paddingXXS:i,lineWidth:a,lineWidthBold:c,calc:u}=e;return{[t]:{position:"relative",width:"100%",boxSizing:"border-box",boxShadow:`${e.boxShadowTertiary}`,transition:`background ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:u(e.borderRadius).mul(2).equal()},borderColor:e.colorBorder,borderWidth:0,borderStyle:"solid","&:after":{content:'""',position:"absolute",inset:0,pointerEvents:"none",transition:`border-color ${e.motionDurationSlow}`,borderRadius:{_skip_check_:!0,value:"inherit"},borderStyle:"inherit",borderColor:"inherit",borderWidth:a},"&:focus-within":{boxShadow:`${e.boxShadowSecondary}`,borderColor:e.colorPrimary,"&:after":{borderWidth:c}},"&-disabled":{background:e.colorBgContainerDisabled},[`&${t}-rtl`]:{direction:"rtl"},[`${t}-content`]:{display:"flex",gap:o,width:"100%",paddingBlock:r,paddingInlineStart:n,paddingInlineEnd:r,boxSizing:"border-box",alignItems:"flex-end"},[`${t}-prefix`]:{flex:"none"},[`${t}-input`]:{padding:0,borderRadius:0,flex:"auto",alignSelf:"center",minHeight:"auto"},[`${t}-actions-list`]:{flex:"none",display:"flex","&-presets":{gap:e.paddingXS}},[`${t}-actions-btn`]:{"&-disabled":{opacity:.45},"&-loading-button":{padding:0,border:0},"&-loading-icon":{height:e.controlHeight,width:e.controlHeight,verticalAlign:"top"},"&-recording-icon":{height:"1.2em",width:"1.2em",verticalAlign:"top"}},[`${t}-footer`]:{paddingInlineStart:n,paddingInlineEnd:r,paddingBlockEnd:r,paddingBlockStart:i,boxSizing:"border-box"}}}})(r),(e=>{let{componentCls:t,calc:n}=e,r=`${t}-header`;return{[t]:{[r]:{borderBottomWidth:e.lineWidth,borderBottomStyle:"solid",borderBottomColor:e.colorBorder,"&-header":{background:e.colorFillAlter,fontSize:e.fontSize,lineHeight:e.lineHeight,paddingBlock:n(e.paddingSM).sub(e.lineWidthBold).equal(),paddingInlineStart:e.padding,paddingInlineEnd:e.paddingXS,display:"flex",[`${r}-title`]:{flex:"auto"}},"&-content":{padding:e.padding},"&-motion":{transition:["height","border"].map(t=>`${t} ${e.motionDurationSlow}`).join(","),overflow:"hidden","&-enter-start, &-leave-active":{borderBottomColor:"transparent"},"&-hidden":{display:"none"}}}}}})(r)]},()=>({}));!r&&"u">typeof window&&(r=window.SpeechRecognition||window.webkitSpeechRecognition);let k={SendButton:T,ClearButton:E,LoadingButton:S,SpeechButton:x},M=f().forwardRef((e,t)=>{var n,a;let{prefixCls:p,styles:v={},classNames:g={},className:y,rootClassName:w,style:E,defaultValue:A,value:O,readOnly:C,submitType:_="enter",onSubmit:M,loading:j,components:L,onCancel:N,onChange:P,actions:$,onKeyPress:I,onKeyDown:D,disabled:H,allowSpeech:z,prefix:B,footer:q,header:W,onPaste:Y,onPasteFile:F,autoSize:X={maxRows:8},...V}=e,{direction:K,getPrefixCls:G}=(0,h.A)(),U=G("sender",p),J=f().useRef(null),Q=f().useRef(null);(0,s.useImperativeHandle)(t,()=>{let e=(()=>({nativeElement:J.current,focus:Q.current?.focus,blur:Q.current?.blur}))(),{nativeElement:t}=e;return new Proxy(t,{get:(t,n)=>e[n]?e[n]:Reflect.get(t,n)})});let Z=(0,d.A)("sender"),ee=`${U}-input`,[et,en,er]=R(U),eo=c()(U,Z.className,y,w,en,er,{[`${U}-rtl`]:"rtl"===K,[`${U}-disabled`]:H}),ei=`${U}-actions-btn`,ea=`${U}-actions-list`,[ec,eu]=(0,u.vz)(A||"",{value:O}),el=(e,t)=>{eu(e),P&&P(e,t)},[es,ef,ed]=function(e,t){let n=(0,u._q)(e),[o,i,a]=f().useMemo(()=>"object"==typeof t?[t.recording,t.onRecordingChange,"boolean"==typeof t.recording]:[void 0,void 0,!1],[t]),[c,l]=f().useState(null);f().useEffect(()=>{if("u">typeof navigator&&"permissions"in navigator){let e=null;return navigator.permissions.query({name:"microphone"}).then(t=>{l(t.state),t.onchange=function(){l(this.state)},e=t}),()=>{e&&(e.onchange=null)}}},[]);let s=r&&"denied"!==c,d=f().useRef(null),[h,p]=(0,u.vz)(!1,{value:o}),v=f().useRef(!1),m=(0,u._q)(e=>{if(!e||h)if(v.current=e,a)i?.(!h);else{if(s&&!d.current){let e=new r;e.onstart=()=>{p(!0)},e.onend=()=>{p(!1)},e.onresult=e=>{v.current||n(e.results?.[0]?.[0]?.transcript),v.current=!1},d.current=e}d.current&&(h?(d.current.stop(),i?.(!1)):(d.current.start(),i?.(!0)))}});return[s,m,h]}(e=>{el(`${ec} ${e}`)},z),eh=(n=["input"],a=i.Input.TextArea,function(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null==n)return;n=n[t[r]]}return n}(L,n)||a),ep={...(0,l.A)(V,{attr:!0,aria:!0,data:!0}),ref:Q},ev=()=>{ec&&M&&!j&&M(ec)},em=f().useRef(!1),eg=f().createElement(i.Flex,{className:`${ea}-presets`},z&&f().createElement(x,null),j?f().createElement(S,null):f().createElement(T,null));"function"==typeof $?eg=$(eg,{components:k}):($||!1===$)&&(eg=$);let ey=null;return"function"==typeof q?ey=q({components:k}):q&&(ey=q),et(f().createElement("div",{ref:J,className:eo,style:{...Z.style,...E}},W&&f().createElement(m.Provider,{value:{prefixCls:U}},W),f().createElement(b.Provider,{value:{prefixCls:ei,onSend:ev,onSendDisabled:!ec,onClear:()=>{el("")},onClearDisabled:!ec,onCancel:N,onCancelDisabled:!j,onSpeech:()=>ef(!1),onSpeechDisabled:!es,speechRecording:ed,disabled:H}},f().createElement("div",{className:`${U}-content`,onMouseDown:e=>{e.target!==J.current?.querySelector(`.${ee}`)&&e.preventDefault(),Q.current?.focus()}},B&&f().createElement("div",{className:c()(`${U}-prefix`,Z.classNames.prefix,g.prefix),style:{...Z.styles.prefix,...v.prefix}},B),f().createElement(eh,(0,o.A)({},ep,{disabled:H,style:{...Z.styles.input,...v.input},className:c()(ee,Z.classNames.input,g.input),autoSize:X,value:ec,onChange:e=>{el(e.target.value,e),ef(!0)},onPressEnter:e=>{let t="Enter"===e.key&&!em.current;switch(_){case"enter":t&&!e.shiftKey&&(e.preventDefault(),ev());break;case"shiftEnter":t&&e.shiftKey&&(e.preventDefault(),ev())}I&&I(e)},onCompositionStart:()=>{em.current=!0},onCompositionEnd:()=>{em.current=!1},onKeyDown:D,onPaste:e=>{let t=e.clipboardData?.files;t?.length&&F&&(F(t[0],t),e.preventDefault()),Y?.(e)},variant:"borderless",readOnly:C})),eg&&f().createElement("div",{className:c()(ea,Z.classNames.actions,g.actions),style:{...Z.styles.actions,...v.actions}},eg)),ey&&f().createElement("div",{className:c()(`${U}-footer`,Z.classNames.footer,g.footer),style:{...Z.styles.footer,...v.footer}},ey))))});M.Header=function(e){let{title:t,onOpenChange:n,open:r,children:o,className:a,style:u,classNames:l={},styles:f={},closable:d,forceRender:h}=e,{prefixCls:b}=s.useContext(m),w=`${b}-header`;return s.createElement(v.Ay,{motionEnter:!0,motionLeave:!0,motionName:`${w}-motion`,leavedClassName:`${w}-motion-hidden`,onEnterStart:g,onEnterActive:y,onLeaveStart:y,onLeaveActive:g,visible:r,forceRender:h},({className:e,style:h})=>s.createElement("div",{className:c()(w,e,a),style:{...h,...u}},(!1!==d||t)&&s.createElement("div",{className:c()(`${w}-header`,l.header),style:{...f.header}},s.createElement("div",{className:`${w}-title`},t),!1!==d&&s.createElement("div",{className:`${w}-close`},s.createElement(i.Button,{type:"text",icon:s.createElement(p.CloseOutlined,null),size:"small",onClick:()=>{n?.(!r)}}))),o&&s.createElement("div",{className:c()(`${w}-content`,l.content),style:{...f.content}},o)))};var j=M},1911:function(e){"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};if("abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},o)).join(""))return!1;return!0}catch(e){return!1}}()?function(e,o){for(var i,a,c=function(e){if(null==e)throw TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u<arguments.length;u++){for(var l in i=Object(arguments[u]))n.call(i,l)&&(c[l]=i[l]);if(t){a=t(i);for(var s=0;s<a.length;s++)r.call(i,a[s])&&(c[a[s]]=i[a[s]])}}return c}:Object.assign},8405:function(e,t,n){"use strict";var r=n(5126);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,a){if(a!==r){var c=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},7465:function(e,t,n){e.exports=n(8405)()},5126:function(e){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},6768:function(e,t,n){"use strict";n.d(t,{A:function(){return eh}});var r=n(2549),o=n(942),i=n(5739),a=n(1114),c=n(2256),u=n(9155),l=n.n(u),s=n(9514),f=n.n(s),d=n(3059),h=n.n(d),p=n(8578);function v(e){return e instanceof HTMLElement||e instanceof SVGElement?e:e instanceof l().Component?f().findDOMNode(e):null}n(3455);var m=n(1834),g=u.createContext(null),y=function(){if("u">typeof Map)return Map;function e(e,t){var n=-1;return e.some(function(e,r){return e[0]===t&&(n=r,!0)}),n}function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n<r.length;n++){var o=r[n];e.call(t,o[1],o[0])}},t}(),b="u">typeof window&&"u">typeof document&&window.document===document,w=void 0!==n.g&&n.g.Math===Math?n.g:"u">typeof self&&self.Math===Math?self:"u">typeof window&&window.Math===Math?window:Function("return this")(),E="function"==typeof requestAnimationFrame?requestAnimationFrame.bind(w):function(e){return setTimeout(function(){return e(Date.now())},1e3/60)},A=["top","right","bottom","left","width","height","size","weight"],S="u">typeof MutationObserver,T=function(){function e(){this.connected_=!1,this.mutationEventsAdded_=!1,this.mutationsObserver_=null,this.observers_=[],this.onTransitionEnd_=this.onTransitionEnd_.bind(this),this.refresh=function(e){var t=!1,n=!1,r=0;function o(){t&&(t=!1,e()),n&&a()}function i(){E(o)}function a(){var e=Date.now();if(t){if(e-r<2)return;n=!0}else t=!0,n=!1,setTimeout(i,20);r=e}return a}(this.refresh.bind(this))}return e.prototype.addObserver=function(e){~this.observers_.indexOf(e)||this.observers_.push(e),this.connected_||this.connect_()},e.prototype.removeObserver=function(e){var t=this.observers_,n=t.indexOf(e);~n&&t.splice(n,1),!t.length&&this.connected_&&this.disconnect_()},e.prototype.refresh=function(){this.updateObservers_()&&this.refresh()},e.prototype.updateObservers_=function(){var e=this.observers_.filter(function(e){return e.gatherActive(),e.hasActive()});return e.forEach(function(e){return e.broadcastActive()}),e.length>0},e.prototype.connect_=function(){b&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),S?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){b&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;A.some(function(e){return!!~n.indexOf(e)})&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),O=function(e,t){for(var n=0,r=Object.keys(t);n<r.length;n++){var o=r[n];Object.defineProperty(e,o,{value:t[o],enumerable:!1,writable:!1,configurable:!0})}return e},x=function(e){return e&&e.ownerDocument&&e.ownerDocument.defaultView||w},C=M(0,0,0,0);function _(e){return parseFloat(e)||0}function R(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return t.reduce(function(t,n){return t+_(e["border-"+n+"-width"])},0)}var k="u">typeof SVGGraphicsElement?function(e){return e instanceof x(e).SVGGraphicsElement}:function(e){return e instanceof x(e).SVGElement&&"function"==typeof e.getBBox};function M(e,t,n,r){return{x:e,y:t,width:n,height:r}}var j=function(){function e(e){this.broadcastWidth=0,this.broadcastHeight=0,this.contentRect_=M(0,0,0,0),this.target=e}return e.prototype.isActive=function(){var e=function(e){if(!b)return C;if(k(e)){var t;return M(0,0,(t=e.getBBox()).width,t.height)}return function(e){var t,n=e.clientWidth,r=e.clientHeight;if(!n&&!r)return C;var o=x(e).getComputedStyle(e),i=function(e){for(var t={},n=0,r=["top","right","bottom","left"];n<r.length;n++){var o=r[n],i=e["padding-"+o];t[o]=_(i)}return t}(o),a=i.left+i.right,c=i.top+i.bottom,u=_(o.width),l=_(o.height);if("border-box"===o.boxSizing&&(Math.round(u+a)!==n&&(u-=R(o,"left","right")+a),Math.round(l+c)!==r&&(l-=R(o,"top","bottom")+c)),(t=e)!==x(t).document.documentElement){var s=Math.round(u+a)-n,f=Math.round(l+c)-r;1!==Math.abs(s)&&(u-=s),1!==Math.abs(f)&&(l-=f)}return M(i.left,i.top,u,l)}(e)}(this.target);return this.contentRect_=e,e.width!==this.broadcastWidth||e.height!==this.broadcastHeight},e.prototype.broadcastRect=function(){var e=this.contentRect_;return this.broadcastWidth=e.width,this.broadcastHeight=e.height,e},e}(),L=function(e,t){var n,r,o,i,a,c=(n=t.x,r=t.y,o=t.width,i=t.height,O(a=Object.create(("u">typeof DOMRectReadOnly?DOMRectReadOnly:Object).prototype),{x:n,y:r,width:o,height:i,top:r,right:n+o,bottom:i+r,left:n}),a);O(this,{target:e,contentRect:c})},N=function(){function e(e,t,n){if(this.activeObservations_=[],this.observations_=new y,"function"!=typeof e)throw TypeError("The callback provided as parameter 1 is not a function.");this.callback_=e,this.controller_=t,this.callbackCtx_=n}return e.prototype.observe=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof x(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)||(t.set(e,new j(e)),this.controller_.addObserver(this),this.controller_.refresh())}},e.prototype.unobserve=function(e){if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");if(!("u"<typeof Element)&&Element instanceof Object){if(!(e instanceof x(e).Element))throw TypeError('parameter 1 is not of type "Element".');var t=this.observations_;t.has(e)&&(t.delete(e),t.size||this.controller_.removeObserver(this))}},e.prototype.disconnect=function(){this.clearActive(),this.observations_.clear(),this.controller_.removeObserver(this)},e.prototype.gatherActive=function(){var e=this;this.clearActive(),this.observations_.forEach(function(t){t.isActive()&&e.activeObservations_.push(t)})},e.prototype.broadcastActive=function(){if(this.hasActive()){var e=this.callbackCtx_,t=this.activeObservations_.map(function(e){return new L(e.target,e.broadcastRect())});this.callback_.call(e,t,e),this.clearActive()}},e.prototype.clearActive=function(){this.activeObservations_.splice(0)},e.prototype.hasActive=function(){return this.activeObservations_.length>0},e}(),P="u">typeof WeakMap?new WeakMap:new y,$=function e(t){if(!(this instanceof e))throw TypeError("Cannot call a class as a function.");if(!arguments.length)throw TypeError("1 argument required, but only 0 present.");var n=new N(t,T.getInstance(),this);P.set(this,n)};["observe","unobserve","disconnect"].forEach(function(e){$.prototype[e]=function(){var t;return(t=P.get(this))[e].apply(t,arguments)}});var I=void 0!==w.ResizeObserver?w.ResizeObserver:$,D=new Map,H=new I(function(e){e.forEach(function(e){var t,n=e.target;null==(t=D.get(n))||t.forEach(function(e){return e(n)})})}),z=n(582),B=n(9520),q=n(126),W=n(6439),Y=function(e){(0,q.A)(n,e);var t=(0,W.A)(n);function n(){return(0,z.A)(this,n),t.apply(this,arguments)}return(0,B.A)(n,[{key:"render",value:function(){return this.props.children}}]),n}(u.Component),F=u.forwardRef(function(e,t){var n=e.children,r=e.disabled,a=u.useRef(null),c=u.useRef(null),l=u.useContext(g),s="function"==typeof n,f=s?n(a):n,d=u.useRef({width:-1,height:-1,offsetWidth:-1,offsetHeight:-1}),h=!s&&u.isValidElement(f)&&(0,m.f3)(f),p=h?f.ref:null,y=(0,m.xK)(p,a),b=function(){var e;return v(a.current)||(a.current&&"object"===(0,i.A)(a.current)?v(null==(e=a.current)?void 0:e.nativeElement):null)||v(c.current)};u.useImperativeHandle(t,function(){return b()});var w=u.useRef(e);w.current=e;var E=u.useCallback(function(e){var t=w.current,n=t.onResize,r=t.data,i=e.getBoundingClientRect(),a=i.width,c=i.height,u=e.offsetWidth,s=e.offsetHeight,f=Math.floor(a),h=Math.floor(c);if(d.current.width!==f||d.current.height!==h||d.current.offsetWidth!==u||d.current.offsetHeight!==s){var p={width:f,height:h,offsetWidth:u,offsetHeight:s};d.current=p;var v=u===Math.round(a)?a:u,m=s===Math.round(c)?c:s,g=(0,o.A)((0,o.A)({},p),{},{offsetWidth:v,offsetHeight:m});null==l||l(g,e,r),n&&Promise.resolve().then(function(){n(g,e)})}},[]);return u.useEffect(function(){var e=b();return e&&!r&&(D.has(e)||(D.set(e,new Set),H.observe(e)),D.get(e).add(E)),function(){D.has(e)&&(D.get(e).delete(E),!D.get(e).size&&(H.unobserve(e),D.delete(e)))}},[a.current,r]),u.createElement(Y,{ref:c},h?u.cloneElement(f,{ref:y}):f)}),X=u.forwardRef(function(e,t){var n=e.children;return("function"==typeof n?[n]:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=[];return l().Children.forEach(t,function(t){(null!=t||n.keepEmpty)&&(Array.isArray(t)?r=r.concat(e(t)):(0,p.isFragment)(t)&&t.props?r=r.concat(e(t.props.children,n)):r.push(t))}),r}(n)).map(function(n,o){var i=(null==n?void 0:n.key)||"".concat("rc-observer-key","-").concat(o);return u.createElement(F,(0,r.A)({},e,{key:i,ref:0===o?t:void 0}),n)})});X.Collection=function(e){var t=e.children,n=e.onBatchResize,r=u.useRef(0),o=u.useRef([]),i=u.useContext(g),a=u.useCallback(function(e,t,a){r.current+=1;var c=r.current;o.current.push({size:e,element:t,data:a}),Promise.resolve().then(function(){c===r.current&&(null==n||n(o.current),o.current=[])}),null==i||i(e,t,a)},[n,i]);return u.createElement(g.Provider,{value:a},t)};var V=u.forwardRef(function(e,t){var n,i=e.height,a=e.offsetY,l=e.offsetX,s=e.children,f=e.prefixCls,d=e.onInnerResize,p=e.innerProps,v=e.rtl,m=e.extra,g={},y={display:"flex",flexDirection:"column"};return void 0!==a&&(g={height:i,position:"relative",overflow:"hidden"},y=(0,o.A)((0,o.A)({},y),{},(n={transform:"translateY(".concat(a,"px)")},(0,c.A)(n,v?"marginRight":"marginLeft",-l),(0,c.A)(n,"position","absolute"),(0,c.A)(n,"left",0),(0,c.A)(n,"right",0),(0,c.A)(n,"top",0),n))),u.createElement("div",{style:g},u.createElement(X,{onResize:function(e){e.offsetHeight&&d&&d()}},u.createElement("div",(0,r.A)({style:y,className:h()((0,c.A)({},"".concat(f,"-holder-inner"),f)),ref:t},p),s,m)))});V.displayName="Filler";var K=function(e){return+setTimeout(e,16)},G=function(e){return clearTimeout(e)};"u">typeof window&&"requestAnimationFrame"in window&&(K=function(e){return window.requestAnimationFrame(e)},G=function(e){return window.cancelAnimationFrame(e)});var U=0,J=new Map,Q=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=U+=1;return!function t(r){if(0===r)J.delete(n),e();else{var o=K(function(){t(r-1)});J.set(n,o)}}(t),n};function Z(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]}Q.cancel=function(e){var t=J.get(e);return J.delete(e),G(t)};var ee=u.forwardRef(function(e,t){var n,r=e.prefixCls,i=e.rtl,l=e.scrollOffset,s=e.scrollRange,f=e.onStartMove,d=e.onStopMove,p=e.onScroll,v=e.horizontal,m=e.spinSize,g=e.containerSize,y=e.style,b=e.thumbStyle,w=u.useState(!1),E=(0,a.A)(w,2),A=E[0],S=E[1],T=u.useState(null),O=(0,a.A)(T,2),x=O[0],C=O[1],_=u.useState(null),R=(0,a.A)(_,2),k=R[0],M=R[1],j=!i,L=u.useRef(),N=u.useRef(),P=u.useState(!1),$=(0,a.A)(P,2),I=$[0],D=$[1],H=u.useRef(),z=function(){clearTimeout(H.current),D(!0),H.current=setTimeout(function(){D(!1)},3e3)},B=s-g||0,q=g-m||0,W=u.useMemo(function(){return 0===l||0===B?0:l/B*q},[l,B,q]),Y=u.useRef({top:W,dragging:A,pageY:x,startTop:k});Y.current={top:W,dragging:A,pageY:x,startTop:k};var F=function(e){S(!0),C(Z(e,v)),M(Y.current.top),f(),e.stopPropagation(),e.preventDefault()};u.useEffect(function(){var e=function(e){e.preventDefault()},t=L.current,n=N.current;return t.addEventListener("touchstart",e),n.addEventListener("touchstart",F),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",F)}},[]);var X=u.useRef();X.current=B;var V=u.useRef();V.current=q,u.useEffect(function(){if(A){var e,t=function(t){var n=Y.current,r=n.dragging,o=n.pageY,i=n.startTop;if(Q.cancel(e),r){var a=Z(t,v)-o,c=i;!j&&v?c-=a:c+=a;var u=X.current,l=V.current,s=Math.ceil((l?c/l:0)*u);s=Math.min(s=Math.max(s,0),u),e=Q(function(){p(s,v)})}},n=function(){S(!1),d()};return window.addEventListener("mousemove",t),window.addEventListener("touchmove",t),window.addEventListener("mouseup",n),window.addEventListener("touchend",n),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),Q.cancel(e)}}},[A]),u.useEffect(function(){z()},[l]),u.useImperativeHandle(t,function(){return{delayHidden:z}});var K="".concat(r,"-scrollbar"),G={position:"absolute",visibility:I&&B>0?null:"hidden"},U={position:"absolute",background:"rgba(0, 0, 0, 0.5)",borderRadius:99,cursor:"pointer",userSelect:"none"};return v?(G.height=8,G.left=0,G.right=0,G.bottom=0,U.height="100%",U.width=m,j?U.left=W:U.right=W):(G.width=8,G.top=0,G.bottom=0,j?G.right=0:G.left=0,U.width="100%",U.height=m,U.top=W),u.createElement("div",{ref:L,className:h()(K,(n={},(0,c.A)(n,"".concat(K,"-horizontal"),v),(0,c.A)(n,"".concat(K,"-vertical"),!v),(0,c.A)(n,"".concat(K,"-visible"),I),n)),style:(0,o.A)((0,o.A)({},G),y),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:z},u.createElement("div",{ref:N,className:h()("".concat(K,"-thumb"),(0,c.A)({},"".concat(K,"-thumb-moving"),A)),style:(0,o.A)((0,o.A)({},U),b),onMouseDown:F}))});function et(e){var t=e.children,n=e.setRef,r=u.useCallback(function(e){n(e)},[]);return u.cloneElement(t,{ref:r})}var en=function(){function e(){(0,z.A)(this,e),this.maps=void 0,this.id=0,this.maps=Object.create(null)}return(0,B.A)(e,[{key:"set",value:function(e,t){this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}}]),e}(),er=n(4148),eo=n(2761),ei=("u"<typeof navigator?"undefined":(0,i.A)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),ea=function(e,t){var n=(0,u.useRef)(!1),r=(0,u.useRef)(null),o=(0,u.useRef)({top:e,bottom:t});return o.current.top=e,o.current.bottom=t,function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=e<0&&o.current.top||e>0&&o.current.bottom;return t&&i?(clearTimeout(r.current),n.current=!1):(!i||n.current)&&(clearTimeout(r.current),n.current=!0,r.current=setTimeout(function(){n.current=!1},50)),!n.current&&i}},ec=14/15;function eu(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e/t*100;return isNaN(n)&&(n=0),Math.floor(n=Math.min(n=Math.max(n,20),e/2))}var el=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles"],es=[],ef={overflowY:"auto",overflowAnchor:"none"},ed=u.forwardRef(function(e,t){var n,l,f,d,p,m,g,y,b,w,E,A,S,T,O,x,C,_,R,k,M,j,L,N,P,$,I,D,H,z,B,q,W,Y,F,K=e.prefixCls,G=void 0===K?"rc-virtual-list":K,U=e.className,J=e.height,Z=e.itemHeight,ed=e.fullHeight,eh=e.style,ep=e.data,ev=e.children,em=e.itemKey,eg=e.virtual,ey=e.direction,eb=e.scrollWidth,ew=e.component,eE=e.onScroll,eA=e.onVirtualScroll,eS=e.onVisibleChange,eT=e.innerProps,eO=e.extraRender,ex=e.styles,eC=function(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if(({}).hasOwnProperty.call(e,r)){if(t.includes(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.includes(n)||({}).propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}(e,el),e_=!!(!1!==eg&&J&&Z),eR=e_&&ep&&(Z*ep.length>J||!!eb),ek="rtl"===ey,eM=h()(G,(0,c.A)({},"".concat(G,"-rtl"),ek),U),ej=ep||es,eL=(0,u.useRef)(),eN=(0,u.useRef)(),eP=(0,u.useState)(0),e$=(0,a.A)(eP,2),eI=e$[0],eD=e$[1],eH=(0,u.useState)(0),ez=(0,a.A)(eH,2),eB=ez[0],eq=ez[1],eW=(0,u.useState)(!1),eY=(0,a.A)(eW,2),eF=eY[0],eX=eY[1],eV=function(){eX(!0)},eK=function(){eX(!1)},eG=u.useCallback(function(e){return"function"==typeof em?em(e):null==e?void 0:e[em]},[em]);function eU(e){eD(function(t){var n,r=(n="function"==typeof e?e(t):e,Number.isNaN(ts.current)||(n=Math.min(n,ts.current)),n=Math.max(n,0));return eL.current.scrollTop=r,r})}var eJ=(0,u.useRef)({start:0,end:ej.length}),eQ=(0,u.useRef)(),eZ=(n=u.useState(ej),f=(l=(0,a.A)(n,2))[0],d=l[1],p=u.useState(null),g=(m=(0,a.A)(p,2))[0],y=m[1],u.useEffect(function(){var e=function(e,t,n){var r,o,i=e.length,a=t.length;if(0===i&&0===a)return null;i<a?(r=e,o=t):(r=t,o=e);var c={__EMPTY_ITEM__:!0};function u(e){return void 0!==e?n(e):c}for(var l=null,s=1!==Math.abs(i-a),f=0;f<o.length;f+=1){var d=u(r[f]);if(d!==u(o[f])){l=f,s=s||d!==u(o[f+1]);break}}return null===l?null:{index:l,multiple:s}}(f||[],ej||[],eG);(null==e?void 0:e.index)!==void 0&&y(ej[e.index]),d(ej)},[ej]),[g]);eQ.current=(0,a.A)(eZ,1)[0];var e0=function(e,t,n){var r=u.useState(0),o=(0,a.A)(r,2),i=o[0],c=o[1],l=(0,u.useRef)(new Map),s=(0,u.useRef)(new en),f=(0,u.useRef)();function d(){Q.cancel(f.current)}function h(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d();var t=function(){l.current.forEach(function(e,t){if(e&&e.offsetParent){var n=v(e),r=n.offsetHeight;s.current.get(t)!==r&&s.current.set(t,n.offsetHeight)}}),c(function(e){return e+1})};e?t():f.current=Q(t)}return(0,u.useEffect)(function(){return d},[]),[function(r,o){var i=e(r),a=l.current.get(i);o?(l.current.set(i,o),h()):l.current.delete(i),!a!=!o&&(o?null==t||t(r):null==n||n(r))},h,s.current,i]}(eG,null,null),e1=(0,a.A)(e0,4),e5=e1[0],e2=e1[1],e9=e1[2],e6=e1[3],e3=u.useMemo(function(){if(!e_)return{scrollHeight:void 0,start:0,end:ej.length-1,offset:void 0};if(!eR)return{scrollHeight:(null==(e=eN.current)?void 0:e.offsetHeight)||0,start:0,end:ej.length-1,offset:void 0};for(var e,t,n,r,o=0,i=ej.length,a=0;a<i;a+=1){var c=eG(ej[a]),u=e9.get(c),l=o+(void 0===u?Z:u);l>=eI&&void 0===t&&(t=a,n=o),l>eI+J&&void 0===r&&(r=a),o=l}return void 0===t&&(t=0,n=0,r=Math.ceil(J/Z)),void 0===r&&(r=ej.length-1),{scrollHeight:o,start:t,end:r=Math.min(r+1,ej.length-1),offset:n}},[eR,e_,eI,ej,e6,J]),e7=e3.scrollHeight,e4=e3.start,e8=e3.end,te=e3.offset;eJ.current.start=e4,eJ.current.end=e8;var tt=u.useState({width:0,height:J}),tn=(0,a.A)(tt,2),tr=tn[0],to=tn[1],ti=(0,u.useRef)(),ta=(0,u.useRef)(),tc=u.useMemo(function(){return eu(tr.width,eb)},[tr.width,eb]),tu=u.useMemo(function(){return eu(tr.height,e7)},[tr.height,e7]),tl=e7-J,ts=(0,u.useRef)(tl);ts.current=tl;var tf=eI<=0,td=eI>=tl,th=ea(tf,td),tp=function(){return{x:ek?-eB:eB,y:eI}},tv=(0,u.useRef)(tp()),tm=(0,eo._q)(function(){if(eA){var e=tp();(tv.current.x!==e.x||tv.current.y!==e.y)&&(eA(e),tv.current=e)}});function tg(e,t){t?((0,s.flushSync)(function(){eq(e)}),tm()):eU(e)}var ty=function(e){var t=e,n=eb-tr.width;return Math.min(t=Math.max(t,0),n)},tb=(0,eo._q)(function(e,t){t?((0,s.flushSync)(function(){eq(function(t){return ty(t+(ek?-e:e))})}),tm()):eU(function(t){return t+e})}),tw=(b=!!eb,w=(0,u.useRef)(0),E=(0,u.useRef)(null),A=(0,u.useRef)(null),S=(0,u.useRef)(!1),T=ea(tf,td),O=(0,u.useRef)(null),x=(0,u.useRef)(null),[function(e){if(e_){Q.cancel(x.current),x.current=Q(function(){O.current=null},2);var t,n=e.deltaX,r=e.deltaY,o=e.shiftKey,i=n,a=r;("sx"===O.current||!O.current&&o&&r&&!n)&&(i=r,a=0,O.current="sx");var c=Math.abs(i),u=Math.abs(a);(null===O.current&&(O.current=b&&c>u?"x":"y"),"y"===O.current)?(t=a,Q.cancel(E.current),w.current+=t,A.current=t,T(t)||(ei||e.preventDefault(),E.current=Q(function(){var e=S.current?10:1;tb(w.current*e),w.current=0}))):(tb(i,!0),ei||e.preventDefault())}},function(e){e_&&(S.current=e.detail===A.current)}]),tE=(0,a.A)(tw,2),tA=tE[0],tS=tE[1];C=function(e,t){return!th(e,t)&&(tA({preventDefault:function(){},deltaY:e}),!0)},R=(0,u.useRef)(!1),k=(0,u.useRef)(0),M=(0,u.useRef)(null),j=(0,u.useRef)(null),L=function(e){if(R.current){var t=Math.ceil(e.touches[0].pageY),n=k.current-t;k.current=t,C(n)&&e.preventDefault(),clearInterval(j.current),j.current=setInterval(function(){(!C(n*=ec,!0)||.1>=Math.abs(n))&&clearInterval(j.current)},16)}},N=function(){R.current=!1,_()},P=function(e){_(),1!==e.touches.length||R.current||(R.current=!0,k.current=Math.ceil(e.touches[0].pageY),M.current=e.target,M.current.addEventListener("touchmove",L),M.current.addEventListener("touchend",N))},_=function(){M.current&&(M.current.removeEventListener("touchmove",L),M.current.removeEventListener("touchend",N))},(0,er.A)(function(){return e_&&eL.current.addEventListener("touchstart",P),function(){var e;null==(e=eL.current)||e.removeEventListener("touchstart",P),_(),clearInterval(j.current)}},[e_]),(0,er.A)(function(){function e(e){e_&&e.preventDefault()}var t=eL.current;return t.addEventListener("wheel",tA),t.addEventListener("DOMMouseScroll",tS),t.addEventListener("MozMousePixelScroll",e),function(){t.removeEventListener("wheel",tA),t.removeEventListener("DOMMouseScroll",tS),t.removeEventListener("MozMousePixelScroll",e)}},[e_]),(0,er.A)(function(){eb&&eq(function(e){return ty(e)})},[tr.width,eb]);var tT=function(){var e,t;null==(e=ti.current)||e.delayHidden(),null==(t=ta.current)||t.delayHidden()},tO=($=function(){return e2(!0)},I=u.useRef(),D=u.useState(null),z=(H=(0,a.A)(D,2))[0],B=H[1],(0,er.A)(function(){if(z&&z.times<10){if(!eL.current)return void B(function(e){return(0,o.A)({},e)});$();var e=z.targetAlign,t=z.originAlign,n=z.index,r=z.offset,i=eL.current.clientHeight,a=!1,c=e,u=null;if(i){for(var l=e||t,s=0,f=0,d=0,h=Math.min(ej.length-1,n),p=0;p<=h;p+=1){var v=eG(ej[p]);f=s;var m=e9.get(v);s=d=f+(void 0===m?Z:m)}for(var g="top"===l?r:i-r,y=h;y>=0;y-=1){var b=eG(ej[y]),w=e9.get(b);if(void 0===w){a=!0;break}if((g-=w)<=0)break}switch(l){case"top":u=f-r;break;case"bottom":u=d-i+r;break;default:var E=eL.current.scrollTop;f<E?c="top":d>E+i&&(c="bottom")}null!==u&&eU(u),u!==z.lastTop&&(a=!0)}a&&B((0,o.A)((0,o.A)({},z),{},{times:z.times+1,targetAlign:c,lastTop:u}))}},[z,eL.current]),function(e){if(null==e)return void tT();if(Q.cancel(I.current),"number"==typeof e)eU(e);else if(e&&"object"===(0,i.A)(e)){var t,n=e.align;t="index"in e?e.index:ej.findIndex(function(t){return eG(t)===e.key});var r=e.offset;B({times:0,index:t,offset:void 0===r?0:r,originAlign:n})}});u.useImperativeHandle(t,function(){return{getScrollInfo:tp,scrollTo:function(e){e&&"object"===(0,i.A)(e)&&("left"in e||"top"in e)?(void 0!==e.left&&eq(ty(e.left)),tO(e.top)):tO(e)}}}),(0,er.A)(function(){eS&&eS(ej.slice(e4,e8+1),ej)},[e4,e8,ej]);var tx=(q=u.useMemo(function(){return[new Map,[]]},[ej,e9.id,Z]),Y=(W=(0,a.A)(q,2))[0],F=W[1],function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=Y.get(e),r=Y.get(t);if(void 0===n||void 0===r)for(var o=ej.length,i=F.length;i<o;i+=1){var a,c=eG(ej[i]);Y.set(c,i);var u=null!=(a=e9.get(c))?a:Z;if(F[i]=(F[i-1]||0)+u,c===e&&(n=i),c===t&&(r=i),void 0!==n&&void 0!==r)break}return{top:F[n-1]||0,bottom:F[r]}}),tC=null==eO?void 0:eO({start:e4,end:e8,virtual:eR,offsetX:eB,offsetY:te,rtl:ek,getSize:tx}),t_=ej.slice(e4,e8+1).map(function(e,t){var n=ev(e,e4+t,{style:{width:eb}}),r=eG(e);return u.createElement(et,{key:r,setRef:function(t){return e5(e,t)}},n)}),tR=null;J&&(tR=(0,o.A)((0,c.A)({},void 0===ed||ed?"height":"maxHeight",J),ef),e_&&(tR.overflowY="hidden",eb&&(tR.overflowX="hidden"),eF&&(tR.pointerEvents="none")));var tk={};return ek&&(tk.dir="rtl"),u.createElement("div",(0,r.A)({style:(0,o.A)((0,o.A)({},eh),{},{position:"relative"}),className:eM},tk,eC),u.createElement(X,{onResize:function(e){to({width:e.width||e.offsetWidth,height:e.height||e.offsetHeight})}},u.createElement(void 0===ew?"div":ew,{className:"".concat(G,"-holder"),style:tR,ref:eL,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==eI&&eU(t),null==eE||eE(e),tm()},onMouseEnter:tT},u.createElement(V,{prefixCls:G,height:e7,offsetX:eB,offsetY:te,scrollWidth:eb,onInnerResize:e2,ref:eN,innerProps:eT,rtl:ek,extra:tC},t_))),eR&&e7>J&&u.createElement(ee,{ref:ti,prefixCls:G,scrollOffset:eI,scrollRange:e7,rtl:ek,onScroll:tg,onStartMove:eV,onStopMove:eK,spinSize:tu,containerSize:tr.height,style:null==ex?void 0:ex.verticalScrollBar,thumbStyle:null==ex?void 0:ex.verticalScrollBarThumb}),eR&&eb&&u.createElement(ee,{ref:ta,prefixCls:G,scrollOffset:eB,scrollRange:eb,rtl:ek,onScroll:tg,onStartMove:eV,onStopMove:eK,spinSize:tc,containerSize:tr.width,horizontal:!0,style:null==ex?void 0:ex.horizontalScrollBar,thumbStyle:null==ex?void 0:ex.horizontalScrollBarThumb}))});ed.displayName="List";var eh=ed},5098:function(e){var t="u">typeof Element,n="function"==typeof Map,r="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,i){try{return function e(i,a){if(i===a)return!0;if(i&&a&&"object"==typeof i&&"object"==typeof a){var c,u,l,s;if(i.constructor!==a.constructor)return!1;if(Array.isArray(i)){if((c=i.length)!=a.length)return!1;for(u=c;0!=u--;)if(!e(i[u],a[u]))return!1;return!0}if(n&&i instanceof Map&&a instanceof Map){if(i.size!==a.size)return!1;for(s=i.entries();!(u=s.next()).done;)if(!a.has(u.value[0]))return!1;for(s=i.entries();!(u=s.next()).done;)if(!e(u.value[1],a.get(u.value[0])))return!1;return!0}if(r&&i instanceof Set&&a instanceof Set){if(i.size!==a.size)return!1;for(s=i.entries();!(u=s.next()).done;)if(!a.has(u.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(a)){if((c=i.length)!=a.length)return!1;for(u=c;0!=u--;)if(i[u]!==a[u])return!1;return!0}if(i.constructor===RegExp)return i.source===a.source&&i.flags===a.flags;if(i.valueOf!==Object.prototype.valueOf&&"function"==typeof i.valueOf&&"function"==typeof a.valueOf)return i.valueOf()===a.valueOf();if(i.toString!==Object.prototype.toString&&"function"==typeof i.toString&&"function"==typeof a.toString)return i.toString()===a.toString();if((c=(l=Object.keys(i)).length)!==Object.keys(a).length)return!1;for(u=c;0!=u--;)if(!Object.prototype.hasOwnProperty.call(a,l[u]))return!1;if(t&&i instanceof Element)return!1;for(u=c;0!=u--;)if(("_owner"!==l[u]&&"__v"!==l[u]&&"__o"!==l[u]||!i.$$typeof)&&!e(i[l[u]],a[l[u]]))return!1;return!0}return i!=i&&a!=a}(e,i)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},5195:function(e,t,n){"use strict";n.d(t,{m:function(){return eo}});var r,o,i,a,c=n(7465),u=n.n(c),l=n(3813),s=n.n(l),f=n(5098),d=n.n(f),h=n(9155),p=n.n(h),v=n(1911),m=n.n(v),g="bodyAttributes",y="htmlAttributes",b={BASE:"base",BODY:"body",HEAD:"head",HTML:"html",LINK:"link",META:"meta",NOSCRIPT:"noscript",SCRIPT:"script",STYLE:"style",TITLE:"title"};Object.keys(b).map(function(e){return b[e]});var w="cssText",E="href",A="innerHTML",S="itemprop",T={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},O=Object.keys(T).reduce(function(e,t){return e[T[t]]=t,e},{}),x=[b.NOSCRIPT,b.SCRIPT,b.STYLE],C="data-react-helmet",_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},R=function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")},k=function(){function e(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)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),M=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},j=function(e,t){if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)},L=function(e,t){var n={};for(var r in e)!(t.indexOf(r)>=0)&&Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},N=function(e,t){if(!e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&("object"==typeof t||"function"==typeof t)?t:e},P=function(e){var t=!(arguments.length>1)||void 0===arguments[1]||arguments[1];return!1===t?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")},$=function(e){var t=H(e,b.TITLE),n=H(e,"titleTemplate");if(n&&t)return n.replace(/%s/g,function(){return Array.isArray(t)?t.join(""):t});var r=H(e,"defaultTitle");return t||r||void 0},I=function(e,t){return t.filter(function(t){return void 0!==t[e]}).map(function(t){return t[e]}).reduce(function(e,t){return M({},e,t)},{})},D=function(e,t,n){var r={};return n.filter(function(t){return!!Array.isArray(t[e])||(void 0!==t[e]&&Y("Helmet: "+e+' should be of type "Array". Instead found type "'+_(t[e])+'"'),!1)}).map(function(t){return t[e]}).reverse().reduce(function(e,n){var o={};n.filter(function(e){for(var n=void 0,i=Object.keys(e),a=0;a<i.length;a++){var c=i[a],u=c.toLowerCase();-1!==t.indexOf(u)&&("rel"!==n||"canonical"!==e[n].toLowerCase())&&("rel"!==u||"stylesheet"!==e[u].toLowerCase())&&(n=u),-1!==t.indexOf(c)&&(c===A||c===w||c===S)&&(n=c)}if(!n||!e[n])return!1;var l=e[n].toLowerCase();return r[n]||(r[n]={}),o[n]||(o[n]={}),!r[n][l]&&(o[n][l]=!0,!0)}).reverse().forEach(function(t){return e.push(t)});for(var i=Object.keys(o),a=0;a<i.length;a++){var c=i[a],u=m()({},r[c],o[c]);r[c]=u}return e},[]).reverse()},H=function(e,t){for(var n=e.length-1;n>=0;n--){var r=e[n];if(r.hasOwnProperty(t))return r[t]}return null},z=(r=Date.now(),function(e){var t=Date.now();t-r>16?(r=t,e(t)):setTimeout(function(){z(e)},0)}),B=function(e){return clearTimeout(e)},q="u">typeof window?window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||z:n.g.requestAnimationFrame||z,W="u">typeof window?window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||B:n.g.cancelAnimationFrame||B,Y=function(e){return console&&"function"==typeof console.warn&&console.warn(e)},F=null,X=function(e,t){var n=e.baseTag,r=e.bodyAttributes,o=e.htmlAttributes,i=e.linkTags,a=e.metaTags,c=e.noscriptTags,u=e.onChangeClientState,l=e.scriptTags,s=e.styleTags,f=e.title,d=e.titleAttributes;G(b.BODY,r),G(b.HTML,o),K(f,d);var h={baseTag:U(b.BASE,n),linkTags:U(b.LINK,i),metaTags:U(b.META,a),noscriptTags:U(b.NOSCRIPT,c),scriptTags:U(b.SCRIPT,l),styleTags:U(b.STYLE,s)},p={},v={};Object.keys(h).forEach(function(e){var t=h[e],n=t.newTags,r=t.oldTags;n.length&&(p[e]=n),r.length&&(v[e]=h[e].oldTags)}),t&&t(),u(e,p,v)},V=function(e){return Array.isArray(e)?e.join(""):e},K=function(e,t){void 0!==e&&document.title!==e&&(document.title=V(e)),G(b.TITLE,t)},G=function(e,t){var n=document.getElementsByTagName(e)[0];if(n){for(var r=n.getAttribute(C),o=r?r.split(","):[],i=[].concat(o),a=Object.keys(t),c=0;c<a.length;c++){var u=a[c],l=t[u]||"";n.getAttribute(u)!==l&&n.setAttribute(u,l),-1===o.indexOf(u)&&o.push(u);var s=i.indexOf(u);-1!==s&&i.splice(s,1)}for(var f=i.length-1;f>=0;f--)n.removeAttribute(i[f]);o.length===i.length?n.removeAttribute(C):n.getAttribute(C)!==a.join(",")&&n.setAttribute(C,a.join(","))}},U=function(e,t){var n=document.head||document.querySelector(b.HEAD),r=n.querySelectorAll(e+"["+C+"]"),o=Array.prototype.slice.call(r),i=[],a=void 0;return t&&t.length&&t.forEach(function(t){var n=document.createElement(e);for(var r in t)if(t.hasOwnProperty(r))if(r===A)n.innerHTML=t.innerHTML;else if(r===w)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));else{var c=void 0===t[r]?"":t[r];n.setAttribute(r,c)}n.setAttribute(C,"true"),o.some(function(e,t){return a=t,n.isEqualNode(e)})?o.splice(a,1):i.push(n)}),o.forEach(function(e){return e.parentNode.removeChild(e)}),i.forEach(function(e){return n.appendChild(e)}),{oldTags:o,newTags:i}},J=function(e){return Object.keys(e).reduce(function(t,n){var r=void 0!==e[n]?n+'="'+e[n]+'"':""+n;return t?t+" "+r:r},"")},Q=function(e,t,n,r){var o=J(n),i=V(t);return o?"<"+e+" "+C+'="true" '+o+">"+P(i,r)+"</"+e+">":"<"+e+" "+C+'="true">'+P(i,r)+"</"+e+">"},Z=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[T[n]||n]=e[n],t},t)},ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(e).reduce(function(t,n){return t[O[n]||n]=e[n],t},t)},et=function(e,t,n){var r,o=Z(n,((r={key:t})[C]=!0,r));return[p().createElement(b.TITLE,o,t)]},en=function(e,t,n){switch(e){case b.TITLE:return{toComponent:function(){return et(e,t.title,t.titleAttributes,n)},toString:function(){return Q(e,t.title,t.titleAttributes,n)}};case g:case y:return{toComponent:function(){return Z(t)},toString:function(){return J(t)}};default:return{toComponent:function(){return t.map(function(t,n){var r,o=((r={key:n})[C]=!0,r);return Object.keys(t).forEach(function(e){var n=T[e]||e;n===A||n===w?o.dangerouslySetInnerHTML={__html:t.innerHTML||t.cssText}:o[n]=t[e]}),p().createElement(e,o)})},toString:function(){return t.reduce(function(t,r){var o=Object.keys(r).filter(function(e){return e!==A&&e!==w}).reduce(function(e,t){var o=void 0===r[t]?t:t+'="'+P(r[t],n)+'"';return e?e+" "+o:o},""),i=r.innerHTML||r.cssText||"",a=-1===x.indexOf(e);return t+"<"+e+" "+C+'="true" '+o+(a?"/>":">"+i+"</"+e+">")},"")}}}},er=function(e){var t=e.baseTag,n=e.bodyAttributes,r=e.encode,o=e.htmlAttributes,i=e.linkTags,a=e.metaTags,c=e.noscriptTags,u=e.scriptTags,l=e.styleTags,s=e.title,f=e.titleAttributes;return{base:en(b.BASE,t,r),bodyAttributes:en(g,n,r),htmlAttributes:en(y,o,r),link:en(b.LINK,i,r),meta:en(b.META,a,r),noscript:en(b.NOSCRIPT,c,r),script:en(b.SCRIPT,u,r),style:en(b.STYLE,l,r),title:en(b.TITLE,{title:void 0===s?"":s,titleAttributes:f},r)}},eo=(o=s()(function(e){var t;return{baseTag:(t=[E,"target"],e.filter(function(e){return void 0!==e[b.BASE]}).map(function(e){return e[b.BASE]}).reverse().reduce(function(e,n){if(!e.length)for(var r=Object.keys(n),o=0;o<r.length;o++){var i=r[o].toLowerCase();if(-1!==t.indexOf(i)&&n[i])return e.concat(n)}return e},[])),bodyAttributes:I(g,e),defer:H(e,"defer"),encode:H(e,"encodeSpecialCharacters"),htmlAttributes:I(y,e),linkTags:D(b.LINK,["rel",E],e),metaTags:D(b.META,["name","charset","http-equiv","property",S],e),noscriptTags:D(b.NOSCRIPT,[A],e),onChangeClientState:H(e,"onChangeClientState")||function(){},scriptTags:D(b.SCRIPT,["src",A],e),styleTags:D(b.STYLE,[w],e),title:$(e),titleAttributes:I("titleAttributes",e)}},function(e){F&&W(F),e.defer?F=q(function(){X(e,function(){F=null})}):(X(e),F=null)},er)(function(){return null}),a=i=function(e){function t(){return R(this,t),N(this,e.apply(this,arguments))}return j(t,e),t.prototype.shouldComponentUpdate=function(e){return!d()(this.props,e)},t.prototype.mapNestedChildrenToProps=function(e,t){if(!t)return null;switch(e.type){case b.SCRIPT:case b.NOSCRIPT:return{innerHTML:t};case b.STYLE:return{cssText:t}}throw Error("<"+e.type+" /> elements are self-closing and can not contain children. Refer to our API for more information.")},t.prototype.flattenArrayTypeChildren=function(e){var t,n=e.child,r=e.arrayTypeChildren,o=e.newChildProps,i=e.nestedChildren;return M({},r,((t={})[n.type]=[].concat(r[n.type]||[],[M({},o,this.mapNestedChildrenToProps(n,i))]),t))},t.prototype.mapObjectTypeChildren=function(e){var t,n,r=e.child,o=e.newProps,i=e.newChildProps,a=e.nestedChildren;switch(r.type){case b.TITLE:return M({},o,((t={})[r.type]=a,t.titleAttributes=M({},i),t));case b.BODY:return M({},o,{bodyAttributes:M({},i)});case b.HTML:return M({},o,{htmlAttributes:M({},i)})}return M({},o,((n={})[r.type]=M({},i),n))},t.prototype.mapArrayTypeChildrenToProps=function(e,t){var n=M({},t);return Object.keys(e).forEach(function(t){var r;n=M({},n,((r={})[t]=e[t],r))}),n},t.prototype.warnOnInvalidChildren=function(e,t){return!0},t.prototype.mapChildrenToProps=function(e,t){var n=this,r={};return p().Children.forEach(e,function(e){if(e&&e.props){var o=e.props,i=o.children,a=ee(L(o,["children"]));switch(n.warnOnInvalidChildren(e,i),e.type){case b.LINK:case b.META:case b.NOSCRIPT:case b.SCRIPT:case b.STYLE:r=n.flattenArrayTypeChildren({child:e,arrayTypeChildren:r,newChildProps:a,nestedChildren:i});break;default:t=n.mapObjectTypeChildren({child:e,newProps:t,newChildProps:a,nestedChildren:i})}}}),t=this.mapArrayTypeChildrenToProps(r,t)},t.prototype.render=function(){var e=this.props,t=e.children,n=M({},L(e,["children"]));return t&&(n=this.mapChildrenToProps(t,n)),p().createElement(o,n)},k(t,null,[{key:"canUseDOM",set:function(e){o.canUseDOM=e}}]),t}(p().Component),i.propTypes={base:u().object,bodyAttributes:u().object,children:u().oneOfType([u().arrayOf(u().node),u().node]),defaultTitle:u().string,defer:u().bool,encodeSpecialCharacters:u().bool,htmlAttributes:u().object,link:u().arrayOf(u().object),meta:u().arrayOf(u().object),noscript:u().arrayOf(u().object),onChangeClientState:u().func,script:u().arrayOf(u().object),style:u().arrayOf(u().object),title:u().string,titleAttributes:u().object,titleTemplate:u().string},i.defaultProps={defer:!0,encodeSpecialCharacters:!0},i.peek=o.peek,i.rewind=function(){var e=o.rewind();return e||(e=er({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}})),e},a);eo.renderStatic=eo.rewind},3813:function(e,t,n){"use strict";var r=n(9155),o=r&&"object"==typeof r&&"default"in r?r.default:r;function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=!!("u">typeof window&&window.document&&window.document.createElement);e.exports=function(e,t,n){if("function"!=typeof e)throw Error("Expected reducePropsToState to be a function.");if("function"!=typeof t)throw Error("Expected handleStateChangeOnClient to be a function.");if(void 0!==n&&"function"!=typeof n)throw Error("Expected mapStateOnServer to either be undefined or a function.");return function(c){if("function"!=typeof c)throw Error("Expected WrappedComponent to be a React component.");var u,l=[];function s(){u=e(l.map(function(e){return e.props})),f.canUseDOM?t(u):n&&(u=n(u))}var f=function(e){function t(){return e.apply(this,arguments)||this}t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e,t.peek=function(){return u},t.rewind=function(){if(t.canUseDOM)throw Error("You may only call rewind() on the server. Call peek() to read the current state.");var e=u;return u=void 0,l=[],e};var n=t.prototype;return n.UNSAFE_componentWillMount=function(){l.push(this),s()},n.componentDidUpdate=function(){s()},n.componentWillUnmount=function(){var e=l.indexOf(this);l.splice(e,1),s()},n.render=function(){return o.createElement(c,this.props)},t}(r.PureComponent);return i(f,"displayName","SideEffect("+(c.displayName||c.name||"Component")+")"),i(f,"canUseDOM",a),f}}}}]);