@wandox/sdk 0.1.32 → 0.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -2
- package/dist/{arc-CioPTVlR.js → arc-D0KfcB3y.js} +1 -1
- package/dist/{arc-D3DbHFp3.cjs → arc-DtBHZfqY.cjs} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-DxudWzpN.cjs → architectureDiagram-3BPJPVTR-C2P4Wdju.cjs} +1 -1
- package/dist/{architectureDiagram-3BPJPVTR-Ca6Rglif.js → architectureDiagram-3BPJPVTR-VUz_J4KY.js} +3 -3
- package/dist/{blockDiagram-GPEHLZMM-Yn5xixU8.cjs → blockDiagram-GPEHLZMM-DyKZmQ5w.cjs} +1 -1
- package/dist/{blockDiagram-GPEHLZMM-ChXtK3M_.js → blockDiagram-GPEHLZMM-HQFLyzc_.js} +3 -3
- package/dist/{c4Diagram-AAUBKEIU-Da9pYrIH.js → c4Diagram-AAUBKEIU-DH1AHWgW.js} +2 -2
- package/dist/{c4Diagram-AAUBKEIU-DrzPSMNU.cjs → c4Diagram-AAUBKEIU-TV86wAk4.cjs} +1 -1
- package/dist/{channel-DbhX4bkx.cjs → channel-AJpjl4EL.cjs} +1 -1
- package/dist/{channel-lhgg4d-Z.js → channel-BlVX_pqv.js} +1 -1
- package/dist/{chunk-2J33WTMH-BD0Wesfp.cjs → chunk-2J33WTMH-B3QEVdxo.cjs} +1 -1
- package/dist/{chunk-2J33WTMH-2ChKkOqa.js → chunk-2J33WTMH-t0efBHaF.js} +1 -1
- package/dist/{chunk-4BX2VUAB-BHR93RDh.cjs → chunk-4BX2VUAB-B3PBOdBd.cjs} +1 -1
- package/dist/{chunk-4BX2VUAB-7mSXeK96.js → chunk-4BX2VUAB-B6_TK6LC.js} +1 -1
- package/dist/{chunk-55IACEB6-BTuQ65Ck.js → chunk-55IACEB6-Dn6M7DjU.js} +1 -1
- package/dist/{chunk-55IACEB6-BH_OU6H_.cjs → chunk-55IACEB6-DrbqgVSi.cjs} +1 -1
- package/dist/{chunk-727SXJPM-BnccE2nF.cjs → chunk-727SXJPM-BxPLhhtr.cjs} +1 -1
- package/dist/{chunk-727SXJPM-15eoo_Jp.js → chunk-727SXJPM-CZZ8vzvu.js} +5 -5
- package/dist/{chunk-AQP2D5EJ-Bo9qEj7F.js → chunk-AQP2D5EJ-B5tlMkxW.js} +3 -3
- package/dist/{chunk-AQP2D5EJ-lO8iIlJc.cjs → chunk-AQP2D5EJ-DEFjJjvF.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-CyMUdtfG.cjs → chunk-FMBD7UC4-gFc5W2fF.cjs} +1 -1
- package/dist/{chunk-FMBD7UC4-CNcIY-Tp.js → chunk-FMBD7UC4-rlodMWnO.js} +1 -1
- package/dist/{chunk-ND2GUHAM-cpaA7UYQ.cjs → chunk-ND2GUHAM-B9qs3P-w.cjs} +1 -1
- package/dist/{chunk-ND2GUHAM-D4a94ENo.js → chunk-ND2GUHAM-dJ5LgRGw.js} +1 -1
- package/dist/{chunk-QZHKN3VN-R0vs-DGO.js → chunk-QZHKN3VN-ChUvXVo2.js} +1 -1
- package/dist/{chunk-QZHKN3VN-Co-kjbN3.cjs → chunk-QZHKN3VN-D25PBsy4.cjs} +1 -1
- package/dist/{classDiagram-4FO5ZUOK-CbqKWjnE.js → classDiagram-4FO5ZUOK-CPy1KaCR.js} +2 -2
- package/dist/{classDiagram-4FO5ZUOK-D1axqCjS.cjs → classDiagram-4FO5ZUOK-wFEmQFl-.cjs} +1 -1
- package/dist/{classDiagram-v2-Q7XG4LA2-sFqdEE1I.js → classDiagram-v2-Q7XG4LA2-CSZEPTC6.js} +2 -2
- package/dist/{classDiagram-v2-Q7XG4LA2-D1axqCjS.cjs → classDiagram-v2-Q7XG4LA2-wFEmQFl-.cjs} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-xVCpwGiF.cjs → cose-bilkent-S5V4N54A-C4j5j5T6.cjs} +1 -1
- package/dist/{cose-bilkent-S5V4N54A-0mQl6Vf3.js → cose-bilkent-S5V4N54A-uRPNkg7E.js} +2 -2
- package/dist/{dagre-BM42HDAG-CoW4kJ-S.cjs → dagre-BM42HDAG-C--V1vcV.cjs} +1 -1
- package/dist/{dagre-BM42HDAG-BzUwXIpn.js → dagre-BM42HDAG-Iv0znKTe.js} +1 -1
- package/dist/{diagram-2AECGRRQ-1lKx7yON.js → diagram-2AECGRRQ-BSOkNy0d.js} +2 -2
- package/dist/{diagram-2AECGRRQ-NYDVOLPV.cjs → diagram-2AECGRRQ-DgTZEGRd.cjs} +1 -1
- package/dist/{diagram-5GNKFQAL-Dazq-bYh.js → diagram-5GNKFQAL-C91PObIK.js} +3 -3
- package/dist/{diagram-5GNKFQAL-bUagQsKx.cjs → diagram-5GNKFQAL-D5Mkr0VI.cjs} +1 -1
- package/dist/{diagram-KO2AKTUF-D2qkXjsL.cjs → diagram-KO2AKTUF-Bg-zssV4.cjs} +1 -1
- package/dist/{diagram-KO2AKTUF-CLmczKft.js → diagram-KO2AKTUF-CAH3eDcz.js} +2 -2
- package/dist/{diagram-LMA3HP47-BGSEnaOB.cjs → diagram-LMA3HP47-SMfJTnR5.cjs} +1 -1
- package/dist/{diagram-LMA3HP47-CELNhpuN.js → diagram-LMA3HP47-hOSm9f_K.js} +2 -2
- package/dist/{diagram-OG6HWLK6-Ch4tCuzD.js → diagram-OG6HWLK6-B-QlPomq.js} +3 -3
- package/dist/{diagram-OG6HWLK6-ehL7z21j.cjs → diagram-OG6HWLK6-DNEN_x2d.cjs} +1 -1
- package/dist/{erDiagram-TEJ5UH35-BUt_0_3y.cjs → erDiagram-TEJ5UH35-CG6J3vIN.cjs} +1 -1
- package/dist/{erDiagram-TEJ5UH35-4iEaO2FZ.js → erDiagram-TEJ5UH35-CmiMTzqm.js} +4 -4
- package/dist/{flowDiagram-I6XJVG4X-CnL9TmJ4.js → flowDiagram-I6XJVG4X-B-oB1PyG.js} +6 -6
- package/dist/{flowDiagram-I6XJVG4X-l_OuhLDt.cjs → flowDiagram-I6XJVG4X-BODLJZMQ.cjs} +1 -1
- package/dist/{ganttDiagram-6RSMTGT7-Deo05MSP.js → ganttDiagram-6RSMTGT7-4H-Azqhw.js} +3 -3
- package/dist/{ganttDiagram-6RSMTGT7-B9KlRuUy.cjs → ganttDiagram-6RSMTGT7-kGQE-0fY.cjs} +1 -1
- package/dist/{gitGraphDiagram-PVQCEYII-D5Km92vZ.cjs → gitGraphDiagram-PVQCEYII-Dj601cg2.cjs} +1 -1
- package/dist/{gitGraphDiagram-PVQCEYII-C0z4BKW0.js → gitGraphDiagram-PVQCEYII-ZKxubOBO.js} +3 -3
- package/dist/{index-BP1prynY.cjs → index-5xbDqXDX.cjs} +1 -1
- package/dist/{index-CqTYX11s.cjs → index-BPJc-VZw.cjs} +265 -265
- package/dist/{index-2p6OpkKo.cjs → index-BUHRhy1Y.cjs} +1 -1
- package/dist/{index-Cq00yE0b.js → index-BXVFHGjy.js} +4 -4
- package/dist/{index-Ba5zI0ll.js → index-B_nZ3LrV.js} +333 -331
- package/dist/{index-C2s6emQt.cjs → index-D3SW2cEr.cjs} +1 -1
- package/dist/{index-qxfBoy6M.js → index-D4dy8yHF.js} +25054 -24913
- package/dist/{index-6AGyZRc4.js → index-DkJpASom.js} +1 -1
- package/dist/{index-DG-vw0s1.cjs → index-DwVmVXmF.cjs} +2 -2
- package/dist/{index-CE_9sUtt.js → index-q34Z4QAw.js} +3 -3
- package/dist/{infoDiagram-5YYISTIA-BIOX1rtb.cjs → infoDiagram-5YYISTIA-CfJwXJqb.cjs} +1 -1
- package/dist/{infoDiagram-5YYISTIA-BagRF4_4.js → infoDiagram-5YYISTIA-mdLUb8Pf.js} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-DqBoe_NW.cjs → ishikawaDiagram-YF4QCWOH-BSPYHzHI.cjs} +1 -1
- package/dist/{ishikawaDiagram-YF4QCWOH-BQ8d0OVU.js → ishikawaDiagram-YF4QCWOH-CfS3BeT3.js} +1 -1
- package/dist/{journeyDiagram-JHISSGLW-B1rwd3zj.js → journeyDiagram-JHISSGLW-DUwZdGOg.js} +4 -4
- package/dist/{journeyDiagram-JHISSGLW-CszD79nr.cjs → journeyDiagram-JHISSGLW-nnM-h5QJ.cjs} +1 -1
- package/dist/{kanban-definition-UN3LZRKU-Dh0PCb4D.js → kanban-definition-UN3LZRKU-BtP29Iaf.js} +2 -2
- package/dist/{kanban-definition-UN3LZRKU-OBkVJz6T.cjs → kanban-definition-UN3LZRKU-Dt1TxPqZ.cjs} +1 -1
- package/dist/{linear-C_UIfrsT.cjs → linear-Bj7ETfty.cjs} +1 -1
- package/dist/{linear-zqWKeem9.js → linear-DZDNy162.js} +1 -1
- package/dist/{mermaid.core-BBvOg7Qw.cjs → mermaid.core-BTaTUIUu.cjs} +3 -3
- package/dist/{mermaid.core-B6KyHfvP.js → mermaid.core-Cc1KxlCM.js} +35 -35
- package/dist/{mindmap-definition-RKZ34NQL-DNUeY8GU.cjs → mindmap-definition-RKZ34NQL-Cf0zrR9M.cjs} +1 -1
- package/dist/{mindmap-definition-RKZ34NQL-DxdoIxDJ.js → mindmap-definition-RKZ34NQL-DZH26qfU.js} +3 -3
- package/dist/{pieDiagram-4H26LBE5-D-cxRy5s.cjs → pieDiagram-4H26LBE5-DRAafsrW.cjs} +1 -1
- package/dist/{pieDiagram-4H26LBE5-DHhBlzuW.js → pieDiagram-4H26LBE5-Ddif1ew2.js} +3 -3
- package/dist/{quadrantDiagram-W4KKPZXB-D9TkCc0Q.cjs → quadrantDiagram-W4KKPZXB-BbkfZqRA.cjs} +1 -1
- package/dist/{quadrantDiagram-W4KKPZXB-CGqNa97s.js → quadrantDiagram-W4KKPZXB-Cug5Y7_G.js} +2 -2
- package/dist/{requirementDiagram-4Y6WPE33-B_jqlh3e.cjs → requirementDiagram-4Y6WPE33-CWZD0-rx.cjs} +1 -1
- package/dist/{requirementDiagram-4Y6WPE33-Bt2WtRHt.js → requirementDiagram-4Y6WPE33-DwnBT67e.js} +3 -3
- package/dist/{sankeyDiagram-5OEKKPKP-BbRTca3X.js → sankeyDiagram-5OEKKPKP-BFE8-91E.js} +1 -1
- package/dist/{sankeyDiagram-5OEKKPKP-D8pQ53jS.cjs → sankeyDiagram-5OEKKPKP-I3_O-pWr.cjs} +1 -1
- package/dist/{sequenceDiagram-3UESZ5HK-CWmiw92i.cjs → sequenceDiagram-3UESZ5HK-CfoKZAsg.cjs} +1 -1
- package/dist/{sequenceDiagram-3UESZ5HK-CcqEtFwC.js → sequenceDiagram-3UESZ5HK-ChL5sWeE.js} +3 -3
- package/dist/{stateDiagram-AJRCARHV-DYPdua5Y.cjs → stateDiagram-AJRCARHV-DUnFbttq.cjs} +1 -1
- package/dist/{stateDiagram-AJRCARHV-Cq88b1Tx.js → stateDiagram-AJRCARHV-DuflU8kG.js} +2 -2
- package/dist/{stateDiagram-v2-BHNVJYJU-CxdPvM6i.cjs → stateDiagram-v2-BHNVJYJU-Cf7QVlcI.cjs} +1 -1
- package/dist/{stateDiagram-v2-BHNVJYJU-RJUVEtHQ.js → stateDiagram-v2-BHNVJYJU-DjhPlTO0.js} +2 -2
- package/dist/{timeline-definition-PNZ67QCA-CBEIY1Lw.cjs → timeline-definition-PNZ67QCA-DZfQpSWh.cjs} +1 -1
- package/dist/{timeline-definition-PNZ67QCA-By7osiII.js → timeline-definition-PNZ67QCA-Iy3R3U3O.js} +2 -2
- package/dist/{useWorkbenchSession-BLTRFEWl.cjs → useWorkbenchSession-CuBY6GKC.cjs} +1 -1
- package/dist/{useWorkbenchSession-CuCWHFoG.js → useWorkbenchSession-kwuVHEAF.js} +2 -2
- package/dist/{vennDiagram-CIIHVFJN-BpRNec9_.js → vennDiagram-CIIHVFJN-DcNPQahe.js} +1 -1
- package/dist/{vennDiagram-CIIHVFJN-CMlYTUk2.cjs → vennDiagram-CIIHVFJN-DxHgY0Ea.cjs} +1 -1
- package/dist/wandox.cjs +1 -1
- package/dist/wandox.css +1 -1
- package/dist/wandox.js +1 -1
- package/dist/wandox.umd.js +596 -596
- package/dist/{wardleyDiagram-YWT4CUSO-Bqi7M6ds.cjs → wardleyDiagram-YWT4CUSO-Dy3rxs_V.cjs} +1 -1
- package/dist/{wardleyDiagram-YWT4CUSO-DF7SXmn7.js → wardleyDiagram-YWT4CUSO-b2m-CjkO.js} +2 -2
- package/dist/{xychartDiagram-2RQKCTM6-P8AO8xfU.js → xychartDiagram-2RQKCTM6-CQEovrBb.js} +2 -2
- package/dist/{xychartDiagram-2RQKCTM6-Y82ZRBaL.cjs → xychartDiagram-2RQKCTM6-TK9Lfh_u.cjs} +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CqTYX11s.cjs"),pe=require("./useWorkbenchSession-BLTRFEWl.cjs"),xt=require("./index-BP1prynY.cjs"),Mt=require("./index-C2s6emQt.cjs");var Tt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z"}},{tag:"path",attrs:{d:"M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z"}}]},name:"aim",theme:"outlined"};function Fe(){return Fe=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},Fe.apply(this,arguments)}const Lt=(n,t)=>e.reactExports.createElement(e.Icon,Fe({},n,{ref:t,icon:Tt})),$t=e.reactExports.forwardRef(Lt);var Bt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888.3 693.2c-42.5-24.6-94.3-18-129.2 12.8l-53-30.7V523.6c0-15.7-8.4-30.3-22-38.1l-136-78.3v-67.1c44.2-15 76-56.8 76-106.1 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 49.3 31.8 91.1 76 106.1v67.1l-136 78.3c-13.6 7.8-22 22.4-22 38.1v151.6l-53 30.7c-34.9-30.8-86.8-37.4-129.2-12.8-53.5 31-71.7 99.4-41 152.9 30.8 53.5 98.9 71.9 152.2 41 42.5-24.6 62.7-73 53.6-118.8l48.7-28.3 140.6 81c6.8 3.9 14.4 5.9 22 5.9s15.2-2 22-5.9L674.5 740l48.7 28.3c-9.1 45.7 11.2 94.2 53.6 118.8 53.3 30.9 121.5 12.6 152.2-41 30.8-53.6 12.6-122-40.7-152.9zm-673 138.4a47.6 47.6 0 01-65.2-17.6c-13.2-22.9-5.4-52.3 17.5-65.5a47.6 47.6 0 0165.2 17.6c13.2 22.9 5.4 52.3-17.5 65.5zM522 463.8zM464 234a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm170 446.2l-122 70.3-122-70.3V539.8l122-70.3 122 70.3v140.4zm239.9 133.9c-13.2 22.9-42.4 30.8-65.2 17.6-22.8-13.2-30.7-42.6-17.5-65.5s42.4-30.8 65.2-17.6c22.9 13.2 30.7 42.5 17.5 65.5z"}}]},name:"deployment-unit",theme:"outlined"};function Ge(){return Ge=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},Ge.apply(this,arguments)}const Dt=(n,t)=>e.reactExports.createElement(e.Icon,Ge({},n,{ref:t,icon:Bt})),Ot=e.reactExports.forwardRef(Dt);var zt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};function Ke(){return Ke=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},Ke.apply(this,arguments)}const Wt=(n,t)=>e.reactExports.createElement(e.Icon,Ke({},n,{ref:t,icon:zt})),it=e.reactExports.forwardRef(Wt);var qt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"poweroff",theme:"outlined"};function He(){return He=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},He.apply(this,arguments)}const Vt=(n,t)=>e.reactExports.createElement(e.Icon,He({},n,{ref:t,icon:qt})),Ut=e.reactExports.forwardRef(Vt);var Qt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"};function Ze(){return Ze=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},Ze.apply(this,arguments)}const Ft=(n,t)=>e.reactExports.createElement(e.Icon,Ze({},n,{ref:t,icon:Qt})),Gt=e.reactExports.forwardRef(Ft);function Kt({active:n,agents:t,collapsed:a,onToggle:o,className:c,activeView:h="chat",onViewChange:l,onToolboxOpen:p,showLogout:w,onLogout:y,sidebarAgentMode:g=!1,onToggleSidebarMode:u,onAgentSelect:R}){const f=localStorage.getItem("sso_domain")||"",q=[{key:"chat",icon:e.jsxRuntimeExports.jsx(pe.RefIcon$4,{}),title:"对话"},...["maiduo","eccang"].includes(f)?[{key:"plan",icon:e.jsxRuntimeExports.jsx(Ot,{}),title:"自动化Beta"}]:[],{key:"professional",icon:e.jsxRuntimeExports.jsx(e.RefIcon$14,{}),title:"专业智能体"}],E=[...f==="yunduo"?[]:[{key:"toolbox",icon:e.jsxRuntimeExports.jsx(Gt,{}),label:"工具箱"},{key:"goals",icon:e.jsxRuntimeExports.jsx($t,{}),label:"目标追踪"}],{key:"settings",icon:e.jsxRuntimeExports.jsx(pe.RefIcon$3,{}),label:"通知配置"}];return e.jsxRuntimeExports.jsx("div",{className:"wandox-aside-wrap",children:e.jsxRuntimeExports.jsxs("div",{className:`wandox-aside ${a?"wandox-aside--collapsed":""} ${c||""}`,"aria-hidden":a,children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-aside-header",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-header__title",children:"AI 智能体"}),o&&e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-aside-header-toggle",onClick:o,"aria-label":a?"展开侧边栏":"收起侧边栏",title:a?"展开侧边栏":"收起侧边栏",children:e.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 24 24",children:[e.jsxRuntimeExports.jsx("title",{children:a?"展开侧边栏":"收起侧边栏"}),e.jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M21 5H11v14h10zM3 5h6v14H3zm0-2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm2 4.25a.75.75 0 0 0 0 1.5h2a.75.75 0 0 0 0-1.5zm-.75 3.5A.75.75 0 0 1 5 10h2a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75m.75 2a.75.75 0 0 0 0 1.5h2a.75.75 0 0 0 0-1.5z"})]})})]}),e.jsxRuntimeExports.jsx("div",{className:"wandox-aside-main-nav",children:e.jsxRuntimeExports.jsx("div",{className:"wandox-aside-nav-list",children:q.map(r=>{const x=h===r.key,k=r.key==="professional";return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsxs("div",{className:`wandox-aside-nav-item-wrap${x?" wandox-aside-nav-item-wrap--active":""}`,children:[e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>l==null?void 0:l(r.key),className:`wandox-aside-nav-item${x?" wandox-aside-nav-item--active":""}`,children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-nav-icon",children:r.icon}),e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-nav-title",children:r.title})]}),k&&!a&&u&&e.jsxRuntimeExports.jsx(e.Tooltip,{title:g?"收起列表":"展开列表",placement:"right",children:e.jsxRuntimeExports.jsx("button",{type:"button",className:`wandox-aside-mode-toggle${g?" wandox-aside-mode-toggle--active":""}`,onClick:b=>{b.stopPropagation(),u()},children:g?e.jsxRuntimeExports.jsx(e.RefIcon$12,{style:{fontSize:11}}):e.jsxRuntimeExports.jsx(e.RefIcon$13,{style:{fontSize:11}})})})]}),k&&(g||a)&&e.jsxRuntimeExports.jsx("div",{className:"wandox-aside-agent-list",children:t.map(b=>{const D=b.agent_id;if(!D)return null;const v=n===D&&h==="professional";return e.jsxRuntimeExports.jsx(e.Tooltip,{title:b.name,placement:"right",children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:`wandox-aside-agent-item${v?" wandox-aside-agent-item--active":""}`,onClick:()=>{R==null||R(D),h!=="professional"&&(l==null||l("professional"))},children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-agent-icon",children:e.getAgentIconById(b.icon)}),e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-agent-name",children:b.name})]})},D)})})]},r.key)})})}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-aside-bottom",children:[e.jsxRuntimeExports.jsx("p",{className:"wandox-aside-group-label",children:"系统功能"}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-aside-nav-list wandox-aside-nav-list--bottom",children:[E.map(r=>{const x=r.key!=="toolbox"&&h===r.key;return e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>{if(r.key==="toolbox"){p==null||p();return}l==null||l(r.key)},className:`wandox-aside-nav-item${x?" wandox-aside-nav-item--active":""}`,children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-nav-icon",children:r.icon}),e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-nav-title",children:r.label})]},r.key)}),w&&e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:y,className:"wandox-aside-nav-item wandox-aside-nav-item--logout",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-nav-icon",children:e.jsxRuntimeExports.jsx(Ut,{})}),e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-nav-title",children:"退出登录"})]})]}),e.jsxRuntimeExports.jsx("div",{style:{height:8}})]})]})})}function Ht(n){const{children:t}=n;return e.jsxRuntimeExports.jsx("div",{className:"wandox-layout wandox-root",children:e.jsxRuntimeExports.jsx("main",{className:"wandox-layout-content",style:{padding:0},children:t})})}function Zt(n){return n instanceof Error?n.message:"上传失败"}function Yt({open:n,playbook:t,onClose:a,onSubmit:o}){const c=e.reactExports.useMemo(()=>e.normalizeAgentInputFields(t==null?void 0:t.input_fields),[t]),[h,l]=e.reactExports.useState({}),[p,w]=e.reactExports.useState({}),[y,g]=e.reactExports.useState({}),u=e.useDynamicFieldOptions(c,h,l),R=e.reactExports.useMemo(()=>pe.getVisibleInputFields(c,h),[c,h]);e.reactExports.useEffect(()=>{n&&(l(pe.buildDefaultInputValues(c,(t==null?void 0:t.initial_params)??{})),w({}),g({}))},[c,n,t==null?void 0:t.initial_params]);const f=e.reactExports.useCallback((E,r)=>{l(x=>({...x,[E]:r}))},[]),q=e.reactExports.useCallback((E,r)=>async({file:x,onSuccess:k,onError:b})=>{var D,v;w(F=>({...F,[E]:!0}));try{const F=x,A=await e.POST_Api_V1_Oss_Upload2(F),z=(D=A==null?void 0:A.data)==null?void 0:D.url,C=((v=A==null?void 0:A.data)==null?void 0:v.name)||F.name;if(!z)throw new Error("上传结果缺少文件地址");g(I=>({...I,[z]:C})),l(I=>{if(r<=1)return{...I,[E]:z};const O=Array.isArray(I[E])?I[E]:I[E]?[I[E]]:[];return{...I,[E]:[...O,z]}}),k==null||k(A),e.staticMethods.success("上传成功")}catch(F){const A=F instanceof Error?F:new Error(Zt(F));b==null||b(A),e.staticMethods.error(A.message)}finally{w(F=>({...F,[E]:!1}))}},[]),U=()=>{if(!t)return;const E=R.filter(r=>r.required&&pe.isMissingFieldValue(h[r.name]));if(E.length>0){e.staticMethods.warning(`请填写必填参数:${E.map(r=>r.label).join("、")}`);return}o(t,h)};return e.jsxRuntimeExports.jsxs(xt.Drawer,{className:"wandox-playbook-params-drawer",title:e.jsxRuntimeExports.jsxs("div",{className:"wandox-playbook-params-drawer__title",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-playbook-params-drawer__title-main",children:"填写执行参数"}),e.jsxRuntimeExports.jsx("span",{className:"wandox-playbook-params-drawer__title-sub",children:t==null?void 0:t.name})]}),open:n,size:640,destroyOnHidden:!0,maskClosable:!1,onClose:a,footer:e.jsxRuntimeExports.jsx("div",{className:"wandox-playbook-params-drawer__footer",children:e.jsxRuntimeExports.jsxs(e.Space,{children:[e.jsxRuntimeExports.jsx(e.Button,{onClick:a,children:"取消"}),e.jsxRuntimeExports.jsx(e.Button,{type:"primary",onClick:U,children:"开始执行"})]})}),children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-playbook-params-drawer__intro",children:[e.jsxRuntimeExports.jsx("span",{children:"填写本次运行需要的参数"}),e.jsxRuntimeExports.jsxs("span",{children:[R.length," 项"]})]}),e.jsxRuntimeExports.jsxs(e.Form,{layout:"vertical",className:"wandox-playbook-params-drawer__form",children:[R.map(E=>e.jsxRuntimeExports.jsx(e.Form.Item,{required:E.required,label:e.jsxRuntimeExports.jsxs("span",{className:"wandox-playbook-params-drawer__label",children:[E.label,E.description||E.hint?e.jsxRuntimeExports.jsx(e.Tooltip,{title:E.description||E.hint,children:e.jsxRuntimeExports.jsx(e.RefIcon,{"aria-label":`${E.label}说明`})}):null]}),children:e.jsxRuntimeExports.jsx(pe.AgentInputFieldControl,{field:E,value:h[E.name],uploading:!!p[E.name],fileNameMap:y,getOptionState:u.getFieldState,onChange:f,onUpload:q,onDownloadTemplate:r=>window.open(r.path,"_blank","noopener,noreferrer")})},E.name)),R.length===0?e.jsxRuntimeExports.jsxs("div",{className:"wandox-playbook-params-drawer__empty",children:[e.jsxRuntimeExports.jsx(e.Spin,{size:"small"})," 正在读取参数配置"]}):null]})]})}function Xt({playbooks:n,onPlaybookClick:t,onPlaybookDelete:a,activePlaybookId:o}){const{t:c}=e.useLanguage(),[h,l]=e.reactExports.useState(""),[p,w]=e.reactExports.useState(!1),[y,g]=e.reactExports.useState(null),[u,R]=e.reactExports.useState(!1),f=n.filter(r=>{var x;return r.name.toLowerCase().includes(h.toLowerCase())||((x=r.description)==null?void 0:x.toLowerCase().includes(h.toLowerCase()))}),q=(r,x)=>{x.stopPropagation(),g(r),w(!0)},U=async()=>{if(y){R(!0);try{await e.DELETE_Api_V1_Playbooks_SolidifyView_ByPlaybookId(y.playbook_id),a==null||a(y.playbook_id),w(!1),g(null)}catch{}finally{R(!1)}}},E=()=>{w(!1),g(null)};return e.jsxRuntimeExports.jsxs("div",{className:"wandox-solidified-list",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-solidified-list-search",children:e.jsxRuntimeExports.jsx(e.Input.Search,{placeholder:"搜索",value:h,onChange:r=>l(r.target.value),allowClear:!0,enterButton:!1})}),e.jsxRuntimeExports.jsx("div",{className:"wandox-solidified-list-content",children:f.length===0?e.jsxRuntimeExports.jsx(e.Empty,{description:c(h?"noData":"solidified.empty"),image:e.Empty.PRESENTED_IMAGE_SIMPLE}):e.jsxRuntimeExports.jsx("div",{className:"wandox-solidified-list-grid",children:f.map(r=>e.jsxRuntimeExports.jsxs("div",{className:`wandox-solidified-card ${o===r.playbook_id?"active":""}`,onClick:()=>t==null?void 0:t(r.playbook_id),onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(t==null||t(r.playbook_id))},role:"button",tabIndex:0,children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-solidified-card-icon",children:e.jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e.jsxRuntimeExports.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",stroke:"currentColor",strokeWidth:"2",fill:"none"}),e.jsxRuntimeExports.jsx("path",{d:"M9 3v18M15 3v18M3 9h18M3 15h18",stroke:"currentColor",strokeWidth:"1.5"}),e.jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor"})]})}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-solidified-card-content",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-solidified-card-name",children:r.name}),r.description&&e.jsxRuntimeExports.jsx("div",{className:"wandox-solidified-card-desc",children:r.description})]}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-solidified-card-delete",onClick:x=>q(r,x),title:c("solidified.delete"),children:e.jsxRuntimeExports.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:e.jsxRuntimeExports.jsx("path",{d:"M6 7v12a2 2 0 002 2h8a2 2 0 002-2V7M4 7h16M10 11v6M14 11v6M9 7V4a1 1 0 011-1h4a1 1 0 011 1v3",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]},r.playbook_id))})}),e.jsxRuntimeExports.jsx(e.Modal,{title:c("solidified.deleteConfirm"),open:p,onOk:U,onCancel:E,okText:c("confirm"),cancelText:c("cancel"),okButtonProps:{danger:!0,loading:u},children:e.jsxRuntimeExports.jsxs("p",{children:[c("solidified.deleteConfirm")," 「",y==null?void 0:y.name,"」?"]})})]})}function Jt({inputParams:n,onSearch:t,loading:a=!1}){const[o]=e.Form.useForm();e.reactExports.useEffect(()=>{const l={};for(const p of n)p.default!==void 0&&p.default!==null&&p.default!==""&&(l[p.name]=p.default);o.setFieldsValue(l)},[n,o]);const c=()=>{o.validateFields().then(l=>{const p={};for(const w of Object.keys(l)){const y=l[w];y!=null&&y!==""&&(p[w]=y)}t(p)})},h=l=>{const{name:p,type:w,description:y}=l,g={placeholder:y||`请输入${p}`};switch(w){case"integer":return e.jsxRuntimeExports.jsx(e.TypedInputNumber,{...g,style:{width:"100%"}});case"array":return e.jsxRuntimeExports.jsx(e.Input,{...g});case"boolean":return e.jsxRuntimeExports.jsx(e.Input,{...g});case"string":default:return e.jsxRuntimeExports.jsx(e.Input,{...g})}};return e.jsxRuntimeExports.jsx("div",{className:"wandox-solidify-params-form",children:e.jsxRuntimeExports.jsxs(e.Form,{form:o,layout:"inline",onFinish:c,style:{marginBottom:16},children:[n.map(l=>e.jsxRuntimeExports.jsx(e.Form.Item,{name:l.name,label:l.description||l.name,rules:[{required:l.required,message:`请输入${l.description||l.name}`}],style:{marginBottom:8},children:h(l)},l.name)),e.jsxRuntimeExports.jsx(e.Form.Item,{style:{marginBottom:8},children:e.jsxRuntimeExports.jsx(e.Button,{type:"primary",htmlType:"submit",loading:a,children:"查询"})})]})})}function es({open:n,loading:t,playbooks:a,activePlaybookId:o,onClose:c,onPlaybookClick:h,onPlaybookDelete:l}){return e.jsxRuntimeExports.jsx(xt.Drawer,{title:"工具箱",placement:"right",size:"min(440px, 100vw)",open:n,loading:t,onClose:c,getContainer:!1,rootClassName:"wandox-toolbox-drawer",styles:{body:{padding:0,overflow:"hidden"}},children:e.jsxRuntimeExports.jsx(Xt,{playbooks:a,onPlaybookClick:h,onPlaybookDelete:l,activePlaybookId:o})})}const ts="https://ai.maiduox.com/#/aitools/operation/product";function ss(n){const{title:t,widgets:a,ssoDomain:o,ssoToken:c,ssoCompany:h,onExecuteComplete:l,activeAgent:p,agents:w,childAgents:y,externalRobotName:g,externalShowPanel:u,agentSwitcher:R}=n;n.onWidgetsUpdate,n.count,e.useLanguage();const[f,q]=e.reactExports.useState(!1),[U,E]=e.reactExports.useState(!1),[r,x]=e.reactExports.useState(null),[k,b]=e.reactExports.useState(null),[D,v]=e.reactExports.useState("results"),[F,A]=e.reactExports.useState(!1),[z,C]=e.reactExports.useState([]),[I,O]=e.reactExports.useState(null),[W,T]=e.reactExports.useState({}),[P,M]=e.reactExports.useState([]),[ee,Z]=e.reactExports.useState(!1),[J,me]=e.reactExports.useState(null),[ne,ie]=e.reactExports.useState(void 0),[K,ce]=e.reactExports.useState(!1),[xe,ye]=e.reactExports.useState(!1),Y=e.reactExports.useMemo(()=>(y||[]).map(s=>s.name),[y]),de=e.reactExports.useMemo(()=>!p||p==="default"?null:(w==null?void 0:w.find(m=>m.agent_id===p||m.agent_code===p))||null,[p,w]),L=e.reactExports.useMemo(()=>e.getAgentPackageBenefit(de),[de]);e.reactExports.useEffect(()=>{b(null)},[p]),e.reactExports.useEffect(()=>{ke(),y&&y.length>0&&N()},[y]),e.reactExports.useEffect(()=>{if(u&&(q(!0),g)){const s=Y.find(m=>m===g);s?b(s):Y.length>0}},[u,g,Y]);const ke=async()=>{try{const s=await e.GET_Api_V1_Notification_Webhooks({});s!=null&&s.data&&M(s.data.map(m=>({webhook_id:m.webhook_id,name:m.name,platform:m.platform})))}catch{}},N=async()=>{try{const s={};await Promise.all(y.map(async m=>{var Q;try{const S=await e.GET_Api_V1_Notification_Agents_Webhook_ByAgentId(m.agent_id,{});(Q=S==null?void 0:S.data)!=null&&Q.webhook_id&&(s[m.agent_id]=S.data.webhook_id)}catch{}})),T(s)}catch{}},G=e.reactExports.useMemo(()=>k?a.filter(s=>{var S;const m=(S=s.title)==null?void 0:S.match(/^(.+?)\s*巡检结果$/);return(m?m[1]:s.agent_name)===k}):a,[a,k]),he=e.reactExports.useMemo(()=>{if(!k)return"";const s=(y||[]).find(m=>m.name===k);return(s==null?void 0:s.agent_id)||""},[k,y]),Ne=o==="maiduo"&&k==="差评监控",Le=s=>{const m=k===s?null:s;b(m),m&&q(!0)},je=s=>{me(s),ie(W[s.agent_id]),Z(!0)},ae=e.reactExports.useCallback(async s=>{if(s){A(!0);try{const m=await e.GET_Api_V1_Agents_ActionExecutes({agent_id:s,limit:50});if(m!=null&&m.data&&Array.isArray(m.data)){const Q=m.data.map((S,ge)=>({id:S.id||S.execute_id||`record_${ge}`,action_name:S.action_name||S.display_name||"未知动作",action_id:S.action_id||"",status:S.status||"pending",created_at:S.created_at||"",completed_at:S.completed_at,action_params:S.action_params,output_type:S.output_type,output_data:S.output_data,outputs:S.outputs,error:S.error})).sort((S,ge)=>new Date(ge.created_at).getTime()-new Date(S.created_at).getTime());C(Q)}else C([])}catch{C([])}finally{A(!1)}}},[]),oe=s=>{if(!s)return"";try{const m=new Date(s),Q=m.toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit"}),S=m.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});return`${Q} ${S}`}catch{return s}},H=s=>({pending:"等待中",running:"执行中",success:"成功",failed:"失败"})[s]||s,X=s=>({pending:"wandox-exec-status--pending",running:"wandox-exec-status--running",success:"wandox-exec-status--success",failed:"wandox-exec-status--failed"})[s]||"";e.reactExports.useEffect(()=>{D==="history"&&he&&ae(he)},[D,he,ae]);const $=async()=>{if(!J||!ne){e.staticMethods.warning("请选择 Webhook");return}try{ce(!0),await e.POST_Api_V1_Notification_Agents_Webhook({},{agent_id:J.agent_id,webhook_id:ne}),e.staticMethods.success("绑定成功"),Z(!1),N()}catch(s){e.staticMethods.error((s==null?void 0:s.message)||"绑定失败")}finally{ce(!1)}},Se=async()=>{if(J)try{ce(!0),await e.DELETE_Api_V1_Notification_Agents_Webhook_Delete_ByAgentId(J.agent_id,{}),e.staticMethods.success("解绑成功"),Z(!1),ie(void 0),N()}catch(s){e.staticMethods.error((s==null?void 0:s.message)||"解绑失败")}finally{ce(!1)}},Ce=s=>{x(s),E(!0)},Ie=()=>{E(!1),x(null)},Ae=s=>{if(!s)return"";try{const m=new Date(s),Q=m.toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit"}),S=m.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});return`${Q}
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BPJc-VZw.cjs"),pe=require("./useWorkbenchSession-CuBY6GKC.cjs"),xt=require("./index-5xbDqXDX.cjs"),Mt=require("./index-D3SW2cEr.cjs");var Tt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z"}},{tag:"path",attrs:{d:"M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z"}}]},name:"aim",theme:"outlined"};function Fe(){return Fe=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},Fe.apply(this,arguments)}const Lt=(n,t)=>e.reactExports.createElement(e.Icon,Fe({},n,{ref:t,icon:Tt})),$t=e.reactExports.forwardRef(Lt);var Bt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M888.3 693.2c-42.5-24.6-94.3-18-129.2 12.8l-53-30.7V523.6c0-15.7-8.4-30.3-22-38.1l-136-78.3v-67.1c44.2-15 76-56.8 76-106.1 0-61.9-50.1-112-112-112s-112 50.1-112 112c0 49.3 31.8 91.1 76 106.1v67.1l-136 78.3c-13.6 7.8-22 22.4-22 38.1v151.6l-53 30.7c-34.9-30.8-86.8-37.4-129.2-12.8-53.5 31-71.7 99.4-41 152.9 30.8 53.5 98.9 71.9 152.2 41 42.5-24.6 62.7-73 53.6-118.8l48.7-28.3 140.6 81c6.8 3.9 14.4 5.9 22 5.9s15.2-2 22-5.9L674.5 740l48.7 28.3c-9.1 45.7 11.2 94.2 53.6 118.8 53.3 30.9 121.5 12.6 152.2-41 30.8-53.6 12.6-122-40.7-152.9zm-673 138.4a47.6 47.6 0 01-65.2-17.6c-13.2-22.9-5.4-52.3 17.5-65.5a47.6 47.6 0 0165.2 17.6c13.2 22.9 5.4 52.3-17.5 65.5zM522 463.8zM464 234a48.01 48.01 0 0196 0 48.01 48.01 0 01-96 0zm170 446.2l-122 70.3-122-70.3V539.8l122-70.3 122 70.3v140.4zm239.9 133.9c-13.2 22.9-42.4 30.8-65.2 17.6-22.8-13.2-30.7-42.6-17.5-65.5s42.4-30.8 65.2-17.6c22.9 13.2 30.7 42.5 17.5 65.5z"}}]},name:"deployment-unit",theme:"outlined"};function Ge(){return Ge=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},Ge.apply(this,arguments)}const Dt=(n,t)=>e.reactExports.createElement(e.Icon,Ge({},n,{ref:t,icon:Bt})),Ot=e.reactExports.forwardRef(Dt);var zt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 160H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0 624H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8zm0-312H120c-4.4 0-8 3.6-8 8v64c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-64c0-4.4-3.6-8-8-8z"}}]},name:"menu",theme:"outlined"};function Ke(){return Ke=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},Ke.apply(this,arguments)}const Wt=(n,t)=>e.reactExports.createElement(e.Icon,Ke({},n,{ref:t,icon:zt})),it=e.reactExports.forwardRef(Wt);var qt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"poweroff",theme:"outlined"};function He(){return He=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},He.apply(this,arguments)}const Vt=(n,t)=>e.reactExports.createElement(e.Icon,He({},n,{ref:t,icon:qt})),Ut=e.reactExports.forwardRef(Vt);var Qt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M876.6 239.5c-.5-.9-1.2-1.8-2-2.5-5-5-13.1-5-18.1 0L684.2 409.3l-67.9-67.9L788.7 169c.8-.8 1.4-1.6 2-2.5 3.6-6.1 1.6-13.9-4.5-17.5-98.2-58-226.8-44.7-311.3 39.7-67 67-89.2 162-66.5 247.4l-293 293c-3 3-2.8 7.9.3 11l169.7 169.7c3.1 3.1 8.1 3.3 11 .3l292.9-292.9c85.5 22.8 180.5.7 247.6-66.4 84.4-84.5 97.7-213.1 39.7-311.3zM786 499.8c-58.1 58.1-145.3 69.3-214.6 33.6l-8.8 8.8-.1-.1-274 274.1-79.2-79.2 230.1-230.1s0 .1.1.1l52.8-52.8c-35.7-69.3-24.5-156.5 33.6-214.6a184.2 184.2 0 01144-53.5L537 318.9a32.05 32.05 0 000 45.3l124.5 124.5a32.05 32.05 0 0045.3 0l132.8-132.8c3.7 51.8-14.4 104.8-53.6 143.9z"}}]},name:"tool",theme:"outlined"};function Ze(){return Ze=Object.assign?Object.assign.bind():function(n){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},Ze.apply(this,arguments)}const Ft=(n,t)=>e.reactExports.createElement(e.Icon,Ze({},n,{ref:t,icon:Qt})),Gt=e.reactExports.forwardRef(Ft);function Kt({active:n,agents:t,collapsed:a,onToggle:o,className:c,activeView:h="chat",onViewChange:l,onToolboxOpen:p,showLogout:w,onLogout:y,sidebarAgentMode:g=!1,onToggleSidebarMode:u,onAgentSelect:R}){const f=localStorage.getItem("sso_domain")||"",q=[{key:"chat",icon:e.jsxRuntimeExports.jsx(pe.RefIcon$4,{}),title:"对话"},...["maiduo","eccang"].includes(f)?[{key:"plan",icon:e.jsxRuntimeExports.jsx(Ot,{}),title:"自动化Beta"}]:[],{key:"professional",icon:e.jsxRuntimeExports.jsx(e.RefIcon$14,{}),title:"专业智能体"}],E=[...f==="yunduo"?[]:[{key:"toolbox",icon:e.jsxRuntimeExports.jsx(Gt,{}),label:"工具箱"},{key:"goals",icon:e.jsxRuntimeExports.jsx($t,{}),label:"目标追踪"}],{key:"settings",icon:e.jsxRuntimeExports.jsx(pe.RefIcon$3,{}),label:"通知配置"}];return e.jsxRuntimeExports.jsx("div",{className:"wandox-aside-wrap",children:e.jsxRuntimeExports.jsxs("div",{className:`wandox-aside ${a?"wandox-aside--collapsed":""} ${c||""}`,"aria-hidden":a,children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-aside-header",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-header__title",children:"AI 智能体"}),o&&e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-aside-header-toggle",onClick:o,"aria-label":a?"展开侧边栏":"收起侧边栏",title:a?"展开侧边栏":"收起侧边栏",children:e.jsxRuntimeExports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"18",height:"18",fill:"none",viewBox:"0 0 24 24",children:[e.jsxRuntimeExports.jsx("title",{children:a?"展开侧边栏":"收起侧边栏"}),e.jsxRuntimeExports.jsx("path",{fill:"currentColor",d:"M21 5H11v14h10zM3 5h6v14H3zm0-2a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm2 4.25a.75.75 0 0 0 0 1.5h2a.75.75 0 0 0 0-1.5zm-.75 3.5A.75.75 0 0 1 5 10h2a.75.75 0 0 1 0 1.5H5a.75.75 0 0 1-.75-.75m.75 2a.75.75 0 0 0 0 1.5h2a.75.75 0 0 0 0-1.5z"})]})})]}),e.jsxRuntimeExports.jsx("div",{className:"wandox-aside-main-nav",children:e.jsxRuntimeExports.jsx("div",{className:"wandox-aside-nav-list",children:q.map(r=>{const x=h===r.key,k=r.key==="professional";return e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsxs("div",{className:`wandox-aside-nav-item-wrap${x?" wandox-aside-nav-item-wrap--active":""}`,children:[e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>l==null?void 0:l(r.key),className:`wandox-aside-nav-item${x?" wandox-aside-nav-item--active":""}`,children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-nav-icon",children:r.icon}),e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-nav-title",children:r.title})]}),k&&!a&&u&&e.jsxRuntimeExports.jsx(e.Tooltip,{title:g?"收起列表":"展开列表",placement:"right",children:e.jsxRuntimeExports.jsx("button",{type:"button",className:`wandox-aside-mode-toggle${g?" wandox-aside-mode-toggle--active":""}`,onClick:b=>{b.stopPropagation(),u()},children:g?e.jsxRuntimeExports.jsx(e.RefIcon$12,{style:{fontSize:11}}):e.jsxRuntimeExports.jsx(e.RefIcon$13,{style:{fontSize:11}})})})]}),k&&(g||a)&&e.jsxRuntimeExports.jsx("div",{className:"wandox-aside-agent-list",children:t.map(b=>{const D=b.agent_id;if(!D)return null;const v=n===D&&h==="professional";return e.jsxRuntimeExports.jsx(e.Tooltip,{title:b.name,placement:"right",children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:`wandox-aside-agent-item${v?" wandox-aside-agent-item--active":""}`,onClick:()=>{R==null||R(D),h!=="professional"&&(l==null||l("professional"))},children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-agent-icon",children:e.getAgentIconById(b.icon)}),e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-agent-name",children:b.name})]})},D)})})]},r.key)})})}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-aside-bottom",children:[e.jsxRuntimeExports.jsx("p",{className:"wandox-aside-group-label",children:"系统功能"}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-aside-nav-list wandox-aside-nav-list--bottom",children:[E.map(r=>{const x=r.key!=="toolbox"&&h===r.key;return e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:()=>{if(r.key==="toolbox"){p==null||p();return}l==null||l(r.key)},className:`wandox-aside-nav-item${x?" wandox-aside-nav-item--active":""}`,children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-nav-icon",children:r.icon}),e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-nav-title",children:r.label})]},r.key)}),w&&e.jsxRuntimeExports.jsxs("button",{type:"button",onClick:y,className:"wandox-aside-nav-item wandox-aside-nav-item--logout",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-nav-icon",children:e.jsxRuntimeExports.jsx(Ut,{})}),e.jsxRuntimeExports.jsx("span",{className:"wandox-aside-nav-title",children:"退出登录"})]})]}),e.jsxRuntimeExports.jsx("div",{style:{height:8}})]})]})})}function Ht(n){const{children:t}=n;return e.jsxRuntimeExports.jsx("div",{className:"wandox-layout wandox-root",children:e.jsxRuntimeExports.jsx("main",{className:"wandox-layout-content",style:{padding:0},children:t})})}function Zt(n){return n instanceof Error?n.message:"上传失败"}function Yt({open:n,playbook:t,onClose:a,onSubmit:o}){const c=e.reactExports.useMemo(()=>e.normalizeAgentInputFields(t==null?void 0:t.input_fields),[t]),[h,l]=e.reactExports.useState({}),[p,w]=e.reactExports.useState({}),[y,g]=e.reactExports.useState({}),u=e.useDynamicFieldOptions(c,h,l),R=e.reactExports.useMemo(()=>pe.getVisibleInputFields(c,h),[c,h]);e.reactExports.useEffect(()=>{n&&(l(pe.buildDefaultInputValues(c,(t==null?void 0:t.initial_params)??{})),w({}),g({}))},[c,n,t==null?void 0:t.initial_params]);const f=e.reactExports.useCallback((E,r)=>{l(x=>({...x,[E]:r}))},[]),q=e.reactExports.useCallback((E,r)=>async({file:x,onSuccess:k,onError:b})=>{var D,v;w(F=>({...F,[E]:!0}));try{const F=x,A=await e.POST_Api_V1_Oss_Upload2(F),z=(D=A==null?void 0:A.data)==null?void 0:D.url,C=((v=A==null?void 0:A.data)==null?void 0:v.name)||F.name;if(!z)throw new Error("上传结果缺少文件地址");g(I=>({...I,[z]:C})),l(I=>{if(r<=1)return{...I,[E]:z};const O=Array.isArray(I[E])?I[E]:I[E]?[I[E]]:[];return{...I,[E]:[...O,z]}}),k==null||k(A),e.staticMethods.success("上传成功")}catch(F){const A=F instanceof Error?F:new Error(Zt(F));b==null||b(A),e.staticMethods.error(A.message)}finally{w(F=>({...F,[E]:!1}))}},[]),U=()=>{if(!t)return;const E=R.filter(r=>r.required&&pe.isMissingFieldValue(h[r.name]));if(E.length>0){e.staticMethods.warning(`请填写必填参数:${E.map(r=>r.label).join("、")}`);return}o(t,h)};return e.jsxRuntimeExports.jsxs(xt.Drawer,{className:"wandox-playbook-params-drawer",title:e.jsxRuntimeExports.jsxs("div",{className:"wandox-playbook-params-drawer__title",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-playbook-params-drawer__title-main",children:"填写执行参数"}),e.jsxRuntimeExports.jsx("span",{className:"wandox-playbook-params-drawer__title-sub",children:t==null?void 0:t.name})]}),open:n,size:640,destroyOnHidden:!0,maskClosable:!1,onClose:a,footer:e.jsxRuntimeExports.jsx("div",{className:"wandox-playbook-params-drawer__footer",children:e.jsxRuntimeExports.jsxs(e.Space,{children:[e.jsxRuntimeExports.jsx(e.Button,{onClick:a,children:"取消"}),e.jsxRuntimeExports.jsx(e.Button,{type:"primary",onClick:U,children:"开始执行"})]})}),children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-playbook-params-drawer__intro",children:[e.jsxRuntimeExports.jsx("span",{children:"填写本次运行需要的参数"}),e.jsxRuntimeExports.jsxs("span",{children:[R.length," 项"]})]}),e.jsxRuntimeExports.jsxs(e.Form,{layout:"vertical",className:"wandox-playbook-params-drawer__form",children:[R.map(E=>e.jsxRuntimeExports.jsx(e.Form.Item,{required:E.required,label:e.jsxRuntimeExports.jsxs("span",{className:"wandox-playbook-params-drawer__label",children:[E.label,E.description||E.hint?e.jsxRuntimeExports.jsx(e.Tooltip,{title:E.description||E.hint,children:e.jsxRuntimeExports.jsx(e.RefIcon,{"aria-label":`${E.label}说明`})}):null]}),children:e.jsxRuntimeExports.jsx(pe.AgentInputFieldControl,{field:E,value:h[E.name],uploading:!!p[E.name],fileNameMap:y,getOptionState:u.getFieldState,onChange:f,onUpload:q,onDownloadTemplate:r=>window.open(r.path,"_blank","noopener,noreferrer")})},E.name)),R.length===0?e.jsxRuntimeExports.jsxs("div",{className:"wandox-playbook-params-drawer__empty",children:[e.jsxRuntimeExports.jsx(e.Spin,{size:"small"})," 正在读取参数配置"]}):null]})]})}function Xt({playbooks:n,onPlaybookClick:t,onPlaybookDelete:a,activePlaybookId:o}){const{t:c}=e.useLanguage(),[h,l]=e.reactExports.useState(""),[p,w]=e.reactExports.useState(!1),[y,g]=e.reactExports.useState(null),[u,R]=e.reactExports.useState(!1),f=n.filter(r=>{var x;return r.name.toLowerCase().includes(h.toLowerCase())||((x=r.description)==null?void 0:x.toLowerCase().includes(h.toLowerCase()))}),q=(r,x)=>{x.stopPropagation(),g(r),w(!0)},U=async()=>{if(y){R(!0);try{await e.DELETE_Api_V1_Playbooks_SolidifyView_ByPlaybookId(y.playbook_id),a==null||a(y.playbook_id),w(!1),g(null)}catch{}finally{R(!1)}}},E=()=>{w(!1),g(null)};return e.jsxRuntimeExports.jsxs("div",{className:"wandox-solidified-list",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-solidified-list-search",children:e.jsxRuntimeExports.jsx(e.Input.Search,{placeholder:"搜索",value:h,onChange:r=>l(r.target.value),allowClear:!0,enterButton:!1})}),e.jsxRuntimeExports.jsx("div",{className:"wandox-solidified-list-content",children:f.length===0?e.jsxRuntimeExports.jsx(e.Empty,{description:c(h?"noData":"solidified.empty"),image:e.Empty.PRESENTED_IMAGE_SIMPLE}):e.jsxRuntimeExports.jsx("div",{className:"wandox-solidified-list-grid",children:f.map(r=>e.jsxRuntimeExports.jsxs("div",{className:`wandox-solidified-card ${o===r.playbook_id?"active":""}`,onClick:()=>t==null?void 0:t(r.playbook_id),onKeyDown:x=>{(x.key==="Enter"||x.key===" ")&&(t==null||t(r.playbook_id))},role:"button",tabIndex:0,children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-solidified-card-icon",children:e.jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 24 24",width:"24",height:"24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e.jsxRuntimeExports.jsx("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",stroke:"currentColor",strokeWidth:"2",fill:"none"}),e.jsxRuntimeExports.jsx("path",{d:"M9 3v18M15 3v18M3 9h18M3 15h18",stroke:"currentColor",strokeWidth:"1.5"}),e.jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"2",fill:"currentColor"})]})}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-solidified-card-content",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-solidified-card-name",children:r.name}),r.description&&e.jsxRuntimeExports.jsx("div",{className:"wandox-solidified-card-desc",children:r.description})]}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-solidified-card-delete",onClick:x=>q(r,x),title:c("solidified.delete"),children:e.jsxRuntimeExports.jsx("svg",{viewBox:"0 0 24 24",width:"16",height:"16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:e.jsxRuntimeExports.jsx("path",{d:"M6 7v12a2 2 0 002 2h8a2 2 0 002-2V7M4 7h16M10 11v6M14 11v6M9 7V4a1 1 0 011-1h4a1 1 0 011 1v3",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})})})]},r.playbook_id))})}),e.jsxRuntimeExports.jsx(e.Modal,{title:c("solidified.deleteConfirm"),open:p,onOk:U,onCancel:E,okText:c("confirm"),cancelText:c("cancel"),okButtonProps:{danger:!0,loading:u},children:e.jsxRuntimeExports.jsxs("p",{children:[c("solidified.deleteConfirm")," 「",y==null?void 0:y.name,"」?"]})})]})}function Jt({inputParams:n,onSearch:t,loading:a=!1}){const[o]=e.Form.useForm();e.reactExports.useEffect(()=>{const l={};for(const p of n)p.default!==void 0&&p.default!==null&&p.default!==""&&(l[p.name]=p.default);o.setFieldsValue(l)},[n,o]);const c=()=>{o.validateFields().then(l=>{const p={};for(const w of Object.keys(l)){const y=l[w];y!=null&&y!==""&&(p[w]=y)}t(p)})},h=l=>{const{name:p,type:w,description:y}=l,g={placeholder:y||`请输入${p}`};switch(w){case"integer":return e.jsxRuntimeExports.jsx(e.TypedInputNumber,{...g,style:{width:"100%"}});case"array":return e.jsxRuntimeExports.jsx(e.Input,{...g});case"boolean":return e.jsxRuntimeExports.jsx(e.Input,{...g});case"string":default:return e.jsxRuntimeExports.jsx(e.Input,{...g})}};return e.jsxRuntimeExports.jsx("div",{className:"wandox-solidify-params-form",children:e.jsxRuntimeExports.jsxs(e.Form,{form:o,layout:"inline",onFinish:c,style:{marginBottom:16},children:[n.map(l=>e.jsxRuntimeExports.jsx(e.Form.Item,{name:l.name,label:l.description||l.name,rules:[{required:l.required,message:`请输入${l.description||l.name}`}],style:{marginBottom:8},children:h(l)},l.name)),e.jsxRuntimeExports.jsx(e.Form.Item,{style:{marginBottom:8},children:e.jsxRuntimeExports.jsx(e.Button,{type:"primary",htmlType:"submit",loading:a,children:"查询"})})]})})}function es({open:n,loading:t,playbooks:a,activePlaybookId:o,onClose:c,onPlaybookClick:h,onPlaybookDelete:l}){return e.jsxRuntimeExports.jsx(xt.Drawer,{title:"工具箱",placement:"right",size:"min(440px, 100vw)",open:n,loading:t,onClose:c,getContainer:!1,rootClassName:"wandox-toolbox-drawer",styles:{body:{padding:0,overflow:"hidden"}},children:e.jsxRuntimeExports.jsx(Xt,{playbooks:a,onPlaybookClick:h,onPlaybookDelete:l,activePlaybookId:o})})}const ts="https://ai.maiduox.com/#/aitools/operation/product";function ss(n){const{title:t,widgets:a,ssoDomain:o,ssoToken:c,ssoCompany:h,onExecuteComplete:l,activeAgent:p,agents:w,childAgents:y,externalRobotName:g,externalShowPanel:u,agentSwitcher:R}=n;n.onWidgetsUpdate,n.count,e.useLanguage();const[f,q]=e.reactExports.useState(!1),[U,E]=e.reactExports.useState(!1),[r,x]=e.reactExports.useState(null),[k,b]=e.reactExports.useState(null),[D,v]=e.reactExports.useState("results"),[F,A]=e.reactExports.useState(!1),[z,C]=e.reactExports.useState([]),[I,O]=e.reactExports.useState(null),[W,T]=e.reactExports.useState({}),[P,M]=e.reactExports.useState([]),[ee,Z]=e.reactExports.useState(!1),[J,me]=e.reactExports.useState(null),[ne,ie]=e.reactExports.useState(void 0),[K,ce]=e.reactExports.useState(!1),[xe,ye]=e.reactExports.useState(!1),Y=e.reactExports.useMemo(()=>(y||[]).map(s=>s.name),[y]),de=e.reactExports.useMemo(()=>!p||p==="default"?null:(w==null?void 0:w.find(m=>m.agent_id===p||m.agent_code===p))||null,[p,w]),L=e.reactExports.useMemo(()=>e.getAgentPackageBenefit(de),[de]);e.reactExports.useEffect(()=>{b(null)},[p]),e.reactExports.useEffect(()=>{ke(),y&&y.length>0&&N()},[y]),e.reactExports.useEffect(()=>{if(u&&(q(!0),g)){const s=Y.find(m=>m===g);s?b(s):Y.length>0}},[u,g,Y]);const ke=async()=>{try{const s=await e.GET_Api_V1_Notification_Webhooks({});s!=null&&s.data&&M(s.data.map(m=>({webhook_id:m.webhook_id,name:m.name,platform:m.platform})))}catch{}},N=async()=>{try{const s={};await Promise.all(y.map(async m=>{var Q;try{const S=await e.GET_Api_V1_Notification_Agents_Webhook_ByAgentId(m.agent_id,{});(Q=S==null?void 0:S.data)!=null&&Q.webhook_id&&(s[m.agent_id]=S.data.webhook_id)}catch{}})),T(s)}catch{}},G=e.reactExports.useMemo(()=>k?a.filter(s=>{var S;const m=(S=s.title)==null?void 0:S.match(/^(.+?)\s*巡检结果$/);return(m?m[1]:s.agent_name)===k}):a,[a,k]),he=e.reactExports.useMemo(()=>{if(!k)return"";const s=(y||[]).find(m=>m.name===k);return(s==null?void 0:s.agent_id)||""},[k,y]),Ne=o==="maiduo"&&k==="差评监控",Le=s=>{const m=k===s?null:s;b(m),m&&q(!0)},je=s=>{me(s),ie(W[s.agent_id]),Z(!0)},ae=e.reactExports.useCallback(async s=>{if(s){A(!0);try{const m=await e.GET_Api_V1_Agents_ActionExecutes({agent_id:s,limit:50});if(m!=null&&m.data&&Array.isArray(m.data)){const Q=m.data.map((S,ge)=>({id:S.id||S.execute_id||`record_${ge}`,action_name:S.action_name||S.display_name||"未知动作",action_id:S.action_id||"",status:S.status||"pending",created_at:S.created_at||"",completed_at:S.completed_at,action_params:S.action_params,output_type:S.output_type,output_data:S.output_data,outputs:S.outputs,error:S.error})).sort((S,ge)=>new Date(ge.created_at).getTime()-new Date(S.created_at).getTime());C(Q)}else C([])}catch{C([])}finally{A(!1)}}},[]),oe=s=>{if(!s)return"";try{const m=new Date(s),Q=m.toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit"}),S=m.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});return`${Q} ${S}`}catch{return s}},H=s=>({pending:"等待中",running:"执行中",success:"成功",failed:"失败"})[s]||s,X=s=>({pending:"wandox-exec-status--pending",running:"wandox-exec-status--running",success:"wandox-exec-status--success",failed:"wandox-exec-status--failed"})[s]||"";e.reactExports.useEffect(()=>{D==="history"&&he&&ae(he)},[D,he,ae]);const $=async()=>{if(!J||!ne){e.staticMethods.warning("请选择 Webhook");return}try{ce(!0),await e.POST_Api_V1_Notification_Agents_Webhook({},{agent_id:J.agent_id,webhook_id:ne}),e.staticMethods.success("绑定成功"),Z(!1),N()}catch(s){e.staticMethods.error((s==null?void 0:s.message)||"绑定失败")}finally{ce(!1)}},Se=async()=>{if(J)try{ce(!0),await e.DELETE_Api_V1_Notification_Agents_Webhook_Delete_ByAgentId(J.agent_id,{}),e.staticMethods.success("解绑成功"),Z(!1),ie(void 0),N()}catch(s){e.staticMethods.error((s==null?void 0:s.message)||"解绑失败")}finally{ce(!1)}},Ce=s=>{x(s),E(!0)},Ie=()=>{E(!1),x(null)},Ae=s=>{if(!s)return"";try{const m=new Date(s),Q=m.toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit"}),S=m.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});return`${Q}
|
|
2
2
|
${S}`}catch{return s}},fe=(s,m)=>{const Q={high:"#ff4d4f",medium:"#faad14",low:"#52c41a"};return e.jsxRuntimeExports.jsxs("div",{className:"wandox-timeline-item",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-timeline-dot-wrapper",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-timeline-time",style:{whiteSpace:"pre-line"},children:Ae(s.timestamp||"")}),e.jsxRuntimeExports.jsx("div",{className:"wandox-timeline-dot",style:{background:Q[s.priority]}}),!m&&e.jsxRuntimeExports.jsx("div",{className:"wandox-timeline-line"})]}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-widget-card",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-widget-title",children:s.title}),s.ui_payload&&e.jsxRuntimeExports.jsx("div",{className:"wandox-widget-content wandox-markdown-content",children:e.jsxRuntimeExports.jsx(e.PayloadRenderer,{payload:s.ui_payload})}),s.actions&&s.actions.length>0&&e.jsxRuntimeExports.jsx("div",{className:"wandox-widget-actions",children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:"wandox-widget-view-detail-btn",onClick:()=>Ce(s),children:[e.jsxRuntimeExports.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img",children:[e.jsxRuntimeExports.jsx("title",{children:"快速执行"}),e.jsxRuntimeExports.jsx("path",{d:"M13 2L3 14H12L11 22L21 10H12L13 2Z",fill:"currentColor"})]}),"快速执行 (",s.actions.length,")"]})})]})]},s.id||`${s.type}_${s.title}_${s.timestamp}`)};return e.jsxRuntimeExports.jsxs("div",{className:"wandox-widget-section",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-section-header",children:[e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[R??e.jsxRuntimeExports.jsx("span",{className:"wandox-widget-section-title",children:t}),L&&e.jsxRuntimeExports.jsx(e.Popover,{title:e.jsxRuntimeExports.jsx("div",{style:{paddingBottom:"8px",borderBottom:"1px solid #f0f0f0"},children:e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:"8px"},children:[e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("strong",{children:L.packageName}),L.subtitle&&e.jsxRuntimeExports.jsx("div",{style:{color:"#999",fontSize:"11px",fontWeight:400},children:L.subtitle})]}),e.jsxRuntimeExports.jsx(e.Badge,{count:"生效中",style:{backgroundColor:"#52c41a",fontSize:"10px",lineHeight:"18px",height:"18px",minWidth:"50px"}})]})}),content:e.jsxRuntimeExports.jsxs("div",{style:{fontSize:"12px",lineHeight:"1.6",minWidth:"280px"},children:[e.jsxRuntimeExports.jsxs("div",{style:{marginBottom:"8px",display:"flex",justifyContent:"space-between"},children:[e.jsxRuntimeExports.jsx("div",{style:{color:"#999"},children:"套餐类型:"}),e.jsxRuntimeExports.jsx("strong",{children:L.packageName})]}),L.asinUsage&&e.jsxRuntimeExports.jsxs("div",{style:{marginBottom:L.asinUsagePercent!=null?"4px":"8px",display:"flex",justifyContent:"space-between",gap:"16px"},children:[e.jsxRuntimeExports.jsx("div",{style:{color:"#999"},children:"ASIN 已用:"}),e.jsxRuntimeExports.jsx("strong",{style:{color:"#9444f5"},children:L.asinUsage})]}),L.asinUsagePercent!=null&&e.jsxRuntimeExports.jsx("div",{style:{marginBottom:"8px"},children:e.jsxRuntimeExports.jsx("div",{style:{height:"6px",borderRadius:"3px",background:"#f0eaff",overflow:"hidden"},children:e.jsxRuntimeExports.jsx("div",{style:{height:"100%",width:`${L.asinUsagePercent}%`,borderRadius:"3px",background:"linear-gradient(90deg, #9444f5, #b47aff)",transition:"width 0.3s ease"}})})}),e.jsxRuntimeExports.jsxs("div",{style:{marginBottom:"8px",display:"flex",justifyContent:"space-between"},children:[e.jsxRuntimeExports.jsx("div",{style:{color:"#999"},children:L.remainingLabel}),e.jsxRuntimeExports.jsx("strong",{style:{color:"#9444f5",fontWeight:"bold"},children:L.remainingValue})]}),e.jsxRuntimeExports.jsxs("div",{style:{marginBottom:"8px",display:"flex",justifyContent:"space-between"},children:[e.jsxRuntimeExports.jsx("div",{style:{color:"#999"},children:"到期时间:"}),e.jsxRuntimeExports.jsx("strong",{children:L.endTime})]}),e.jsxRuntimeExports.jsxs("div",{style:{marginBottom:"8px",display:"flex",justifyContent:"space-between"},children:[e.jsxRuntimeExports.jsx("div",{style:{color:"#999"},children:"开通时间:"}),e.jsxRuntimeExports.jsx("strong",{children:L.startTime})]}),L.coverageItems.length>0&&e.jsxRuntimeExports.jsxs("div",{style:{padding:"8px 12px",background:"#faf8ff",borderRadius:"8px"},children:[e.jsxRuntimeExports.jsx("div",{style:{marginBottom:"4px",color:"#9444f5",fontSize:"13px",fontWeight:"bold"},children:L.coverageTitle}),e.jsxRuntimeExports.jsx("div",{style:{fontSize:"11px",color:"#666",lineHeight:"2"},children:L.coverageItems.map(s=>e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx(e.RefIcon$4,{style:{marginRight:"6px",color:"#9444f5"}}),s]},s))})]})]}),placement:"bottom",trigger:"hover",children:e.jsxRuntimeExports.jsx(e.Badge,{count:L.badgeText,style:{backgroundColor:L.badgeColor,color:L.badgeTextColor,cursor:"pointer"}})})]}),e.jsxRuntimeExports.jsx("div",{className:"wandox-inspection-controls",children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:`wandox-inspection-agent-btn ${f?"wandox-inspection-agent-btn--expanded":""}`,onClick:()=>{f?(q(!1),b(null)):q(!0)},children:[e.jsxRuntimeExports.jsxs("span",{className:"wandox-inspection-agent-icon",children:[e.jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 24 24",width:"14",height:"14",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e.jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"4",stroke:"currentColor",strokeWidth:"1.5"}),e.jsxRuntimeExports.jsx("circle",{cx:"12",cy:"12",r:"1.5",fill:"currentColor"})]}),e.jsxRuntimeExports.jsx("span",{className:"wandox-orbit-dot wandox-orbit-dot-1"}),e.jsxRuntimeExports.jsx("span",{className:"wandox-orbit-dot wandox-orbit-dot-2"}),e.jsxRuntimeExports.jsx("span",{className:"wandox-orbit-dot wandox-orbit-dot-3"})]}),e.jsxRuntimeExports.jsxs("span",{className:"wandox-inspection-agent-text",children:["巡检机器人(",Y.length,")"]})]})})]}),f&&e.jsxRuntimeExports.jsxs("div",{className:"wandox-timeline-list",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-agent-filter-row wandox-agent-filter-row--with-close",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-agent-filter-chips",children:[y.length>0&&e.jsxRuntimeExports.jsx("button",{type:"button",className:`wandox-agent-filter-chip ${k===null?"active":""}`,onClick:()=>b(null),children:"全部"}),y.map(s=>{const m=!!W[s.agent_id];return e.jsxRuntimeExports.jsxs("div",{className:`wandox-agent-filter-chip-compound ${k===s.name?"active":""}`,children:[e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-agent-filter-chip-name",onClick:()=>Le(s.name),children:s.name}),e.jsxRuntimeExports.jsx("button",{type:"button",className:`wandox-agent-filter-chip-webhook ${m?"bound":""}`,onClick:()=>je(s),title:m?"已绑定 Webhook,点击修改":"绑定 Webhook 通知",children:m?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-webhook-dot","aria-hidden":"true"}),e.jsxRuntimeExports.jsx("span",{className:"wandox-webhook-label",children:"已通知"})]}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-webhook-plus","aria-hidden":"true",children:"+"}),e.jsxRuntimeExports.jsx("span",{className:"wandox-webhook-label",children:"通知"})]})})]},s.agent_id)})]}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-timeline-list-close",onClick:()=>{q(!1),b(null),v("results")},title:"关闭",children:"✕"})]}),Ne&&e.jsxRuntimeExports.jsxs("div",{className:"wandox-negative-review-notice",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-negative-review-notice-icon","aria-hidden":"true",children:"ℹ️"}),e.jsxRuntimeExports.jsxs("span",{children:["差评监控需要先设置需要监控的ASIN,请前往AI工具》",e.jsxRuntimeExports.jsx("a",{href:ts,target:"_blank",rel:"noreferrer",className:"wandox-negative-review-notice-link",children:"新老诊断"}),"进行设置。每个asin每一次都需要0.01算力。"]})]}),e.jsxRuntimeExports.jsx("div",{className:"wandox-timeline-tabs-header",children:e.jsxRuntimeExports.jsxs("div",{className:"wandox-timeline-tabs-nav",children:[e.jsxRuntimeExports.jsxs("button",{type:"button",className:`wandox-timeline-tab-btn ${D==="results"?"active":""}`,onClick:()=>v("results"),children:["巡检结果",G.length>0&&e.jsxRuntimeExports.jsx("span",{className:"wandox-timeline-tab-badge",children:G.length})]}),e.jsxRuntimeExports.jsx("button",{type:"button",className:`wandox-timeline-tab-btn ${D==="history"?"active":""}`,onClick:()=>v("history"),children:"执行记录"})]})}),D==="results"?e.jsxRuntimeExports.jsx("div",{className:"wandox-timeline-list-content",children:G.length>0?G.sort((s,m)=>{const Q=s.timestamp?new Date(s.timestamp).getTime():0;return(m.timestamp?new Date(m.timestamp).getTime():0)-Q}).map((s,m,Q)=>fe(s,m===Q.length-1)):e.jsxRuntimeExports.jsxs("div",{className:"wandox-empty-state",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-empty-icon",children:"�"}),e.jsxRuntimeExports.jsx("div",{className:"wandox-empty-text",children:k?"没有符合筛选条件的数据":"暂无工作区数据"}),e.jsxRuntimeExports.jsx("div",{className:"wandox-empty-desc",children:k?"请调整筛选条件":"工作区数据将在这里显示"})]})}):e.jsxRuntimeExports.jsx("div",{className:"wandox-timeline-list-content wandox-history-panel",children:k?F?e.jsxRuntimeExports.jsxs("div",{className:"wandox-loading-state",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-spinner wandox-spinner--small"}),e.jsxRuntimeExports.jsx("span",{children:"加载中..."})]}):z.length===0?e.jsxRuntimeExports.jsx("div",{className:"wandox-empty-state",children:e.jsxRuntimeExports.jsx("div",{className:"wandox-empty-text",children:"暂无执行记录"})}):e.jsxRuntimeExports.jsx("div",{className:"wandox-exec-history-list",children:z.map(s=>e.jsxRuntimeExports.jsxs("div",{className:"wandox-exec-history-item",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-exec-history-header",onClick:()=>O(I===s.id?null:s.id),onKeyDown:m=>m.key==="Enter"&&O(I===s.id?null:s.id),role:"button",tabIndex:0,children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-exec-history-info",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-exec-history-name",children:s.action_name}),e.jsxRuntimeExports.jsx("span",{className:"wandox-exec-history-time",children:oe(s.created_at)})]}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-exec-history-status-wrapper",children:[e.jsxRuntimeExports.jsx("span",{className:`wandox-exec-status ${X(s.status)}`,children:H(s.status)}),e.jsxRuntimeExports.jsx("span",{className:"wandox-exec-history-arrow","aria-hidden":"true",children:I===s.id?"▼":"▶"})]})]}),I===s.id&&e.jsxRuntimeExports.jsxs("div",{className:"wandox-exec-history-detail",children:[s.action_params&&Object.keys(s.action_params).length>0&&e.jsxRuntimeExports.jsxs("div",{className:"wandox-exec-params",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-exec-section-label",children:"执行参数"}),e.jsxRuntimeExports.jsx("div",{className:"wandox-exec-params-list",children:Object.entries(s.action_params).map(([m,Q])=>e.jsxRuntimeExports.jsxs("div",{className:"wandox-exec-param-item",children:[e.jsxRuntimeExports.jsxs("span",{className:"wandox-exec-param-key",children:[m,":"]}),e.jsxRuntimeExports.jsx("span",{className:"wandox-exec-param-value",children:typeof Q=="object"?JSON.stringify(Q):String(Q)})]},m))})]}),s.error?e.jsxRuntimeExports.jsxs("div",{className:"wandox-exec-error",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-exec-error-label",children:"错误信息:"}),e.jsxRuntimeExports.jsx("span",{className:"wandox-exec-error-msg",children:s.error})]}):s.output_type&&s.output_data?e.jsxRuntimeExports.jsxs("div",{className:"wandox-exec-outputs",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-exec-section-label",children:"执行结果"}),e.jsxRuntimeExports.jsx(e.PayloadRenderer,{payload:{type:s.output_type,...s.output_data}})]}):s.outputs?e.jsxRuntimeExports.jsxs("div",{className:"wandox-exec-outputs",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-exec-section-label",children:"执行结果"}),e.jsxRuntimeExports.jsx(e.PayloadRenderer,{payload:s.outputs})]}):e.jsxRuntimeExports.jsx("div",{className:"wandox-exec-no-output",children:"暂无输出结果"})]})]},s.id))}):e.jsxRuntimeExports.jsxs("div",{className:"wandox-empty-state",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-empty-icon",children:"🤖"}),e.jsxRuntimeExports.jsx("div",{className:"wandox-empty-text",children:"请先选择机器人"}),e.jsxRuntimeExports.jsx("div",{className:"wandox-empty-desc",children:"在上方选择一个机器人查看执行记录"})]})})]}),e.jsxRuntimeExports.jsx(e.ActionDetailDrawer,{open:U,title:(r==null?void 0:r.title)||"动作详情",actions:(r==null?void 0:r.actions)||[],widgetId:r==null?void 0:r.id,ssoToken:c,ssoDomain:o,ssoCompany:h,onClose:Ie,onExecuteComplete:l}),e.jsxRuntimeExports.jsx(e.Modal,{title:e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[e.jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"currentColor",xmlns:"http://www.w3.org/2000/svg",children:[e.jsxRuntimeExports.jsx("path",{d:"M12 22C10.8954 22 10 21.1046 10 20V14C10 12.8954 10.8954 12 12 12C13.1046 12 14 12.8954 14 14V20C14 21.1046 13.1046 22 12 22Z"}),e.jsxRuntimeExports.jsx("path",{d:"M18 16C16.8954 16 16 15.1046 16 14V10C16 8.89543 16.8954 8 18 8C19.1046 8 20 8.89543 20 10V14C20 15.1046 19.1046 16 18 16Z"}),e.jsxRuntimeExports.jsx("path",{d:"M6 16C4.89543 16 4 15.1046 4 14V10C4 8.89543 4.89543 8 6 8C7.10457 8 8 8.89543 8 10V14C8 15.1046 7.10457 16 6 16Z"}),e.jsxRuntimeExports.jsx("path",{d:"M10.5 4C10.5 2.61929 11.6193 1.5 13 1.5H13.5C14.8807 1.5 16 2.61929 16 4V6H10.5V4Z"})]}),e.jsxRuntimeExports.jsx("span",{children:"配置 Webhook 通知"})]}),open:ee,onCancel:()=>{Z(!1),me(null),ie(void 0)},width:520,footer:null,centered:!0,children:e.jsxRuntimeExports.jsxs("div",{style:{padding:"8px 0"},children:[e.jsxRuntimeExports.jsxs("div",{style:{marginBottom:"20px",padding:"12px 16px",background:"#f5f7fa",borderRadius:"8px",border:"1px solid #e8eaed"},children:[e.jsxRuntimeExports.jsx("div",{style:{fontSize:"13px",color:"#666",marginBottom:"4px"},children:"智能体"}),e.jsxRuntimeExports.jsx("div",{style:{fontSize:"15px",color:"#1a1a1a",fontWeight:500},children:J==null?void 0:J.name})]}),e.jsxRuntimeExports.jsxs("div",{style:{marginBottom:"20px"},children:[e.jsxRuntimeExports.jsx("div",{style:{marginBottom:"8px",fontSize:"14px",color:"#333",fontWeight:500},children:"选择 通知地址"}),e.jsxRuntimeExports.jsx(e.Select,{style:{width:"100%"},size:"large",placeholder:"请选择 通知地址",value:ne,onChange:ie,options:P.map(s=>({label:`${s.name} (${s.platform==="dingtalk"?"钉钉":s.platform==="feishu"?"飞书":"企业微信"})`,value:s.webhook_id})),disabled:K,popupRender:s=>e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[s,e.jsxRuntimeExports.jsx(Mt.Divider,{style:{margin:"8px 0"}}),e.jsxRuntimeExports.jsx(e.Space,{style:{padding:"0 8px 4px"},children:e.jsxRuntimeExports.jsx(e.Button,{type:"text",icon:e.jsxRuntimeExports.jsx("span",{children:"+"}),onClick:()=>ye(!0),children:"添加新的通知地址"})})]})}),P.length===0&&e.jsxRuntimeExports.jsxs("div",{style:{marginTop:"8px",padding:"8px 12px",background:"#fff7e6",border:"1px solid #ffd591",borderRadius:"4px",fontSize:"13px",color:"#d46b08",display:"flex",alignItems:"center",gap:"6px"},children:[e.jsxRuntimeExports.jsx("span",{children:"⚠️"}),e.jsxRuntimeExports.jsx("span",{children:'暂无可用的 通知地址,请先在"通知配置"中创建'})]})]}),e.jsxRuntimeExports.jsxs("div",{style:{padding:"12px 16px",background:"#f0f9ff",borderRadius:"8px",border:"1px solid #bae7ff",marginBottom:"20px"},children:[e.jsxRuntimeExports.jsx("div",{style:{fontSize:"13px",color:"#0958d9",fontWeight:500,marginBottom:"8px"},children:"💡 功能说明"}),e.jsxRuntimeExports.jsxs("div",{style:{fontSize:"13px",color:"#096dd9",lineHeight:"1.8"},children:[e.jsxRuntimeExports.jsx("div",{children:"• 绑定后,该智能体执行完成时会自动发送通知"}),e.jsxRuntimeExports.jsx("div",{children:"• 通知内容包含执行结果和相关信息"}),e.jsxRuntimeExports.jsx("div",{children:"• 可随时修改或解除绑定"})]})]}),e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",gap:"12px",justifyContent:"flex-end"},children:[W[(J==null?void 0:J.agent_id)||""]&&e.jsxRuntimeExports.jsx("button",{type:"button",onClick:Se,disabled:K,style:{marginRight:"auto",padding:"8px 20px",border:"1px solid #ff4d4f",borderRadius:"6px",background:"#fff",color:"#ff4d4f",cursor:K?"not-allowed":"pointer",fontSize:"14px",fontWeight:500,transition:"all 0.2s",opacity:K?.6:1},onMouseEnter:s=>{K||(s.currentTarget.style.background="#fff1f0")},onMouseLeave:s=>{s.currentTarget.style.background="#fff"},children:"解除绑定"}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:()=>{Z(!1),me(null),ie(void 0)},disabled:K,style:{padding:"8px 24px",border:"1px solid #d9d9d9",borderRadius:"6px",background:"#fff",color:"#333",cursor:K?"not-allowed":"pointer",fontSize:"14px",fontWeight:500,transition:"all 0.2s",opacity:K?.6:1},onMouseEnter:s=>{K||(s.currentTarget.style.background="#fafafa")},onMouseLeave:s=>{s.currentTarget.style.background="#fff"},children:"取消"}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:$,disabled:K||!ne,style:{padding:"8px 24px",border:"none",borderRadius:"6px",background:K||!ne?"#d9d9d9":"#1890ff",color:"#fff",cursor:K||!ne?"not-allowed":"pointer",fontSize:"14px",fontWeight:500,transition:"all 0.2s"},onMouseEnter:s=>{!K&&ne&&(s.currentTarget.style.background="#40a9ff")},onMouseLeave:s=>{!K&&ne&&(s.currentTarget.style.background="#1890ff")},children:K?"保存中...":"保存"})]})]})}),e.jsxRuntimeExports.jsx(pe.QuickAddWebhook,{open:xe,onClose:()=>ye(!1),onSuccess:s=>{M(m=>[...m,s]),ie(s.webhook_id)}})]})}function ns({queueStatus:n}){if(!n)return null;const t=n.status==="waiting";return e.jsxRuntimeExports.jsx("div",{className:"wandox-queue-overlay",children:e.jsxRuntimeExports.jsx("div",{className:"wandox-queue-modal",children:t?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-queue-icon wandox-queue-icon--waiting",children:e.jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e.jsxRuntimeExports.jsx("circle",{cx:"32",cy:"32",r:"28",stroke:"#E5E7EB",strokeWidth:"4"}),e.jsxRuntimeExports.jsx("path",{d:"M32 16V32L44 38",stroke:"#8B5CF6",strokeWidth:"4",strokeLinecap:"round",strokeLinejoin:"round"})]})}),e.jsxRuntimeExports.jsx("div",{className:"wandox-queue-title",children:"当前使用人数较多,正在排队中..."}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-queue-stats",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-queue-stat",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-queue-stat-value",children:n.position}),e.jsxRuntimeExports.jsx("div",{className:"wandox-queue-stat-label",children:"前面还有"})]}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-queue-stat",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-queue-stat-value",children:["~",n.estimated_wait,"s"]}),e.jsxRuntimeExports.jsx("div",{className:"wandox-queue-stat-label",children:"预计等待"})]})]}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-queue-tip",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-queue-tip-icon",children:"💡"}),e.jsxRuntimeExports.jsx("span",{children:"小贴士:等待期间可先查看其他功能模块"})]})]}):e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-queue-icon wandox-queue-icon--ready",children:e.jsxRuntimeExports.jsxs("svg",{viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[e.jsxRuntimeExports.jsx("rect",{x:"4",y:"4",width:"56",height:"56",rx:"8",fill:"#10B981"}),e.jsxRuntimeExports.jsx("path",{d:"M18 32L28 42L46 22",stroke:"white",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"})]})}),e.jsxRuntimeExports.jsx("div",{className:"wandox-queue-title wandox-queue-title--ready",children:"轮到您了!"}),e.jsxRuntimeExports.jsx("div",{className:"wandox-queue-subtitle",children:"正在处理您的请求..."})]})})})}function as({open:n,actionName:t,defaultParams:a={},onCancel:o,onExecute:c}){const[h,l]=e.reactExports.useState({});e.reactExports.useEffect(()=>{if(n){const u={};for(const R of Object.keys(a)){const f=a[R];(typeof f=="string"||typeof f=="number")&&(u[R]=String(f))}l(u)}},[n,a]);const p=(u,R)=>{l(f=>({...f,[u]:R}))},w=u=>{u.preventDefault();const R={...a};for(const f of Object.keys(h))R[f]=h[f];c(R)},y=u=>{u.target===u.currentTarget&&o()},g=(u,R)=>typeof R=="object"&&R!==null?null:e.jsxRuntimeExports.jsxs("div",{className:"wandox-form-item",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-form-label",children:u}),e.jsxRuntimeExports.jsx("input",{type:"text",className:"wandox-form-input",placeholder:`请输入 ${u}`,value:h[u]||"",onChange:f=>p(u,f.target.value)})]},u);return n?e.jsxRuntimeExports.jsx("div",{className:"wandox-modal-overlay",onClick:y,children:e.jsxRuntimeExports.jsxs("div",{className:"wandox-modal",style:{width:600},children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-modal-header",children:[e.jsxRuntimeExports.jsxs("h3",{className:"wandox-modal-title",children:["执行 Action: ",t]}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-modal-close",onClick:o,"aria-label":"关闭",children:e.jsxRuntimeExports.jsx("svg",{width:"24",height:"24",viewBox:"0 0 16 16",fill:"currentColor",children:e.jsxRuntimeExports.jsx("path",{d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"})})})]}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-modal-body",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-modal-description",children:"以下是默认参数,您可以修改后执行,或直接使用默认值执行"}),e.jsxRuntimeExports.jsxs("form",{onSubmit:w,children:[Object.keys(a).map(u=>g(u,a[u])),Object.keys(a).length===0&&e.jsxRuntimeExports.jsx("div",{className:"wandox-empty-params",children:"该 Action 无需参数"})]})]}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-modal-footer",children:[e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-button wandox-button-default",onClick:o,children:"取消"}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-button wandox-button-primary",onClick:w,children:"执行"})]})]})}):null}const ot=["要努力呀,为了想要的生活,为了人间的烟火气,为了今天的风和月。","欣赏不来别人视若珍宝的,就该保持沉默。","日子总是有意思的,了无生趣的是打不起精神的你。","我们终其一生,就是要摆脱他人的期待,找到真正的自己。","别在最好的年纪选择了安逸,那是对自己最大的辜负。","你现在的气质里,藏着你走过的路、读过的书和爱过的人。","成长就是,你终于明白有些路只能一个人走。","不是每一次努力都有收获,但每一次收获都需要努力。","生活从不眷顾因循守旧、满足现状的人,而将更多机遇留给勇于探索的人。","所有的困难都是暂时的,熬过去就是晴天。","你若盛开,清风自来。","别人笑我太疯癫,我笑他人看不穿。","走慢一点,是为了走得更远。","不必羡慕别人,你的故事才刚刚开始。","心若向阳,何惧忧伤。","人生没有白走的路,每一步都算数。","你不是在浪费时间,你是在积蓄力量。","别让昨天的遗憾,占满今天的时间。","深夜的努力,终将照亮黎明。","只要路是对的,就不怕遥远。","生活不会辜负每一个认真的人。","做一个有温度的人,遇见有光的事。","你所经历的每一次失败,都是未来成功的伏笔。","不要因为走得太远,而忘记为什么出发。","把每一天当作礼物,而不是任务。","越努力,越幸运。","你值得拥有你所渴望的一切。","别把时间花在你不喜欢的事情上,除非它能带你去你喜欢的地方。","有些事现在不做,一辈子都不会做了。","你的潜力,远比你想象的要大。","不要等到准备好了才开始,开始了才会准备好。","慢慢来,比较快。","善待自己,你已经很努力了。","每一个你讨厌的早晨,都是别人求之不得的机会。","世界上只有一种真正的英雄主义,那就是认清生活的真相后仍然热爱它。","人生不是等待风暴过去,而是学会在雨中起舞。","别总想着逃离,先想想能不能改变。","你无法控制风向,但可以调整帆的方向。","没有人能替你走你该走的路。","不要因为没有掌声而停止歌唱。","把抱怨环境的心情,用来改善环境吧。","你今天的懒惰,是明天后悔的源头。","没有人永远年轻,但永远有人正在年轻。","读书破万卷,不如行路十里。","人生最大的遗憾,是轻易放弃了本不该放弃的。","你不是失败了,你只是还没成功。","今天的苦,是明天的底气。","别把别人的看法,活成自己的枷锁。","有一种勇敢,叫做即使害怕也要继续走。","生活是场修行,凡事皆有意义。","不要和自己过不去,人生很短,开心最重要。","你现在偷的懒,都是以后还的债。","最好的时机,就是现在。","你不必完美,但你必须真实。","与其等待一个完美的开始,不如从不完美中开始。","成功不是终点,失败也不是终结,重要的是继续的勇气。","每一个坚持的背后,都有一个不为人知的故事。","改变不了环境,就改变自己。","别用你的忙来掩盖你的懒,也别用你的懒来消耗你的忙。","人生就像骑自行车,要保持平衡就必须不断前行。","昨天已经过去,明天还未到来,今天才是你拥有的全部。","宁可辛苦一阵子,不要痛苦一辈子。","不要让今日的懒惰,成为明日的遗憾。","你的态度,决定了你人生的高度。","路是走出来的,不是想出来的。","做你自己,别人的角色已经有人在演了。","年轻时以为不读书不足惜,后来方知书中有乾坤。","你若想要,便去追;你若已得,便珍惜。","最怕你一生碌碌无为,还安慰自己平凡可贵。","人生没有捷径,弯路也是路。","种一棵树最好的时间是十年前,其次是现在。","每天进步一点点,人生就会不一样。","不要只是看,要有所感悟;不要只是听,要有所行动。","心态好了,一切都好了。","你的未来,取决于你现在的决定。","好好爱自己,才有能力去爱别人。","人生路上,勿忘初心。","有梦想就去追,别给自己的平庸找借口。","世界是你的,但首先你要努力。","坚持不一定成功,但放弃一定失败。","你比你想象的更坚强,比你感觉的更勇敢。","把每一次失败都当成学费,你就赚了。","选择了远方,便只顾风雨兼程。","人生的意义不在于拿一手好牌,而在于打好一手烂牌。","不要在还可以冲刺的年纪,选择散步。","钱不是万能的,但没有钱是万万不能的。努力赚钱,才是对自己最大的尊重。","所谓天才,不过是比别人多了一点坚持。","你改变不了昨天,但你可以决定明天。","做最好的自己,才能遇见最好的别人。","不要因为懒惰而失去了本来可以拥有的东西。","人生没有返回键,但有暂停和前进。","别等别人为你喝彩,先为自己鼓掌。","与其焦虑,不如行动。","每一个优秀的人,都曾经历过一段无人问津的岁月。","你的每一步努力,都在为未来的自己铺路。","不想当将军的士兵不是好士兵,但当不了将军的士兵也可以是好士兵。","生活的艺术,就是把每一个平凡的日子过得不平凡。","人生就是一场旅行,在乎的不是目的地,而是沿途的风景。","不要因为别人的否定,而放弃对自己的肯定。","勇敢不是不害怕,而是即使害怕也还是去做。","命运给了你一手烂牌,你要做的是把它打好。","真正的强大,是内心的平静。","你所不能击垮的,终将使你更强大。","成功的人找方法,失败的人找借口。","不要总是想着明天,今天就是你最年轻的一天。","人生最重要的不是你站在哪里,而是你朝哪个方向走。","每个人都是自己人生的主角,不要沦为配角。","你现在付出的努力,都是在为未来的幸福买单。","心宽了,路才宽。","你所拥有的,比你想要的更多。","不要用战术上的勤奋,掩盖战略上的懒惰。","很多人看起来很忙,实际上只是在低水平上勤奋。","格局大了,烦恼就少了。","你的圈子,决定了你的见识;你的见识,决定了你的未来。","别总是看别人的生活,好好经营自己的就够了。","脚踏实地,仰望星空,这才是人生的正确打开方式。","吃一堑,长一智;受一挫,强一分。","每一次跌倒,都是一次重新出发的机会。","低谷的时候,沉得住气;高峰的时候,守得住心。","你一定要过得很好,这样才不辜负自己受过的苦。","少说多做,是成功的捷径。","人生苦短,别把时间浪费在不值得的人和事上。","越是艰难处,越是修心时。","机会都是留给有准备的人的。","爱拼才会赢,努力才会赢。","人生就像一杯茶,不会苦一辈子,但总会苦一阵子。","不要轻言放弃,你不知道下一秒会发生什么奇迹。","真正的成熟,是能与不完美的自己握手言和。","你所走过的弯路,都是你成长的印记。","别人可以成功,你也可以。","只有不断超越自己,才能不断创造可能。","努力不一定成功,不努力一定不成功。","当你觉得累的时候,说明你在走上坡路。","不经历风雨,怎能见彩虹。","比起抱怨,不如改变。","年轻没有失败,试错才是成长。","你的样子,将决定你世界的样子。","愿你出走半生,归来仍是少年。","有时候你以为的终点,不过是下一段旅程的起点。","今天努力工作,明天努力生活。","不要总是活在别人的评价里,你自己最清楚自己是谁。","无论多难,都要坚持做你认为对的事。","你不需要变成别人,你只需要成为更好的自己。","凡事提前准备,才能游刃有余。","没有什么是理所当然的,感恩才能幸福。","不要把安全感建立在别人身上,那是一种危险的依赖。","清醒的认识自己,是成功的第一步。","沉默是金,但行动是钻石。","用行动证明,而不是用嘴巴解释。","最终你会明白,一切都是值得的。","把目光放长远,眼前的得失不算什么。","不要让自己的懒惰成为别人勤奋的舞台。","你的每一次选择,都在塑造未来的你。","有时候沉默不是因为没话说,而是因为懂得珍惜。","你今天的努力,是明天底气的来源。","先成为你想成为的人,其他的顺其自然。","把握现在,才能拥有未来。","越简单越快乐,越复杂越烦恼。","人生没有真正的绝境,除非你自己放弃。","你比你想象的更有力量。","把每一件平凡的事做好,就是不平凡。","那些没能打败你的,终将使你更强大。","做事情要有始有终,这是对自己最基本的尊重。","不在沉默中爆发,就在沉默中消亡。","不要害怕慢,就怕站。","只要还在走,就没有到不了的地方。","自律的人,才有资格谈自由。","与其等风来,不如追风去。","你有多自律,就有多自由。","凡是过往,皆为序章。","不要在该奋斗的年纪选择了安逸。","人生难得几回搏,此时不搏何时搏。","成长的代价是失去一些幼稚,但获得了更多可能。","有梦想的人,睡觉都是在充电。","不要辜负每一个认真的早晨。","生命的意义,在于不断地自我超越。","你有权利选择,但选择了就要承担。","最大的风险,是不冒任何风险。","生活会奖励那些敢于尝试的人。","不要拿别人的错误惩罚自己。","学会放下,才能腾出手来拥抱新的可能。","所有的天才都曾是努力的凡人。","比别人优秀不是目的,成为更好的自己才是。","你不需要被所有人喜欢,但你必须喜欢自己。","保持好奇心,世界就不会无聊。","每一个平静的背后,都有一颗强大的内心。","把抱怨的时间用来思考,把悲伤的时间用来行动。","只要心里有光,哪里都是出路。","你的奋斗轨迹,就是你最好的简历。","成功不是偶然的,它是努力、坚持和学习的结果。","不要小看自己,宇宙都是从一个点开始的。","真正的自由,是不依赖任何人的底气。","你的努力,终有一天会让你站在阳光下。","生活不在别处,就在此时此刻。","每一段经历,都是人生最好的礼物。"];function is(){return e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-skeleton-card",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-skeleton-row",children:[e.jsxRuntimeExports.jsx(e.Skeleton.Avatar,{active:!0,size:28,shape:"circle"}),e.jsxRuntimeExports.jsx(e.Skeleton.Input,{active:!0,style:{width:120,height:18}})]}),e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsxRuntimeExports.jsx(e.Skeleton.Input,{active:!0,block:!0,style:{height:40,borderRadius:10}}),e.jsxRuntimeExports.jsx(e.Skeleton.Button,{active:!0,style:{width:80,height:40,borderRadius:10}})]})]})}function os(){return e.jsxRuntimeExports.jsx("div",{className:"wandox-hub-skeleton-insights",children:[1,2,3].map(n=>e.jsxRuntimeExports.jsx("div",{className:"wandox-hub-skeleton-insight-card",children:e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-skeleton-insight-inner",children:[e.jsxRuntimeExports.jsx(e.Skeleton.Input,{active:!0,style:{width:52,height:22,borderRadius:100}}),e.jsxRuntimeExports.jsxs("div",{style:{flex:1},children:[e.jsxRuntimeExports.jsx(e.Skeleton.Input,{active:!0,block:!0,style:{height:16,marginBottom:6}}),e.jsxRuntimeExports.jsx(e.Skeleton.Input,{active:!0,style:{width:"70%",height:12}})]})]})},n))})}function rs(n){return!!n&&/^https?:\/\//.test(n)}function Ue(n){if(!n)return"✦";if(rs(n))return e.jsxRuntimeExports.jsx("img",{src:n,alt:""});const t=e.agentIconMap.get(n);return t?t.component:n}function ls(n,t){const a=`${n||""} ${t||""}`.toLowerCase();return a.includes("red")||a.includes("critical")?"wandox-insight-severity--red":a.includes("orange")||a.includes("high")?"wandox-insight-severity--orange":a.includes("yellow")||a.includes("medium")?"wandox-insight-severity--yellow":"wandox-insight-severity--gray"}function cs(n){const t=n.match(new RegExp("^\\p{Extended_Pictographic}","u"));return(t==null?void 0:t[0])||"📌"}function rt(n){return n.replace(new RegExp("^\\p{Extended_Pictographic}\\s*","u"),"")}function lt(n){var t;return n.bind_type==="playbook"&&n.bind_playbook_id&&((t=n.playbook_args)!=null&&t.length)?"执行":n.bind_type==="agent"?"找智能体聊聊":n.bind_type==="chat"?"分析一下":"查看详情"}function xs(n,t){const a=n.asin||n.ASIN||n.sku||n.seller_sku,o=n.site||n.marketplace||n.country;if(a||o)return[a,o&&`(${o})`].filter(Boolean).join(" ");const c=Object.values(n).find(h=>h!=null&&String(h).trim());return c?String(c):`参数 ${t+1}`}function ds(n,t){var o;const a=(o=n.query_template)==null?void 0:o.trim();return!a||!t?n.title:a.replace(/\{\{?\s*([\w.-]+)\s*\}?\}/g,(c,h)=>{const l=t[h];return l==null?c:String(l)})}function us(n){return!n||n.status==="disabled"||n.status==="error"||!n.scenes?[]:Object.entries(n.scenes).map(([t,a])=>({name:t,total_affected:a.total_affected,suggestions_count:a.suggestions_count,cards:Array.isArray(a.cards)?a.cards:[]})).filter(t=>t.cards.length>0)}function ps({agentLoading:n,mainAgentForHub:t,mainAgentQuestions:a,agents:o,hubChatOpen:c,setHubChatOpen:h,hubChatInput:l,setHubChatInput:p,hubScrollIdx:w,hubScrollFading:y,onHubChatSend:g,onHubInputFocus:u,onHubInputBlur:R,messages:f,executing:q,hubInlineChatInput:U,setHubInlineChatInput:E,onHubInlineSend:r,onEnterProfessional:x,playbooks:k,executePlaybook:b,onRequestPlaybookParams:D,onAbort:v,onRespondToProposal:F,ssoToken:A,ssoDomain:z,ssoCompany:C}){var Q,S,ge,Pe,be;const I=n&&!t,O=localStorage.getItem("sso_username")||"",W=localStorage.getItem("sso_user_id")||"",T=e.reactExports.useRef(null),P=e.reactExports.useRef(null),M=e.reactExports.useMemo(()=>[],[]),[ee,Z]=e.reactExports.useState(""),[J,me]=e.reactExports.useState([]),[ne,ie]=e.reactExports.useState(!1),[K,ce]=e.reactExports.useState("idle"),[xe,ye]=e.reactExports.useState(0),[Y,de]=e.reactExports.useState(null),[L,ke]=e.reactExports.useState(!1),N=o[0],G=(N==null?void 0:N.agent_code)||(N==null?void 0:N.agent_id)||"",he=(Q=N==null?void 0:N.questions)!=null&&Q.length?N.questions:a,Ne=z!=="yunduo"&&he[w%Math.max(he.length,1)]||"今天仓库订单处理的怎么样了?",Le=e.reactExports.useMemo(()=>ot[Math.floor(Math.random()*ot.length)],[]),je=e.reactExports.useMemo(()=>({Authorization:`Bearer ${A}`,"X-Tenant-ID":C,"X-Domain":z,"Content-Type":"application/json"}),[A,C,z]),ae=e.reactExports.useCallback(async(i=!1)=>{if(!(!A||!z)){ie(!0);try{const _=await fetch(`${e.getBaseURL()}/api/v1/insights/${i?"refresh":"recommendations"}`,{method:i?"POST":"GET",headers:je});if(!_.ok)throw new Error(`HTTP ${_.status}`);const ue=await _.json(),V=ue==null?void 0:ue.data;ce((V==null?void 0:V.status)||"error"),ye((V==null?void 0:V.total_cards)||0),me(us(V))}catch{ce("error"),ye(0),me([])}finally{ie(!1)}}},[je,z,A]);e.reactExports.useEffect(()=>{ae()},[ae]),e.reactExports.useEffect(()=>{!ee&&G&&Z(G)},[G,ee]);const oe=J,H=ee||G||((S=M[0])==null?void 0:S.agent_id)||(t==null?void 0:t.agent_id),X=e.useQuestionAutocomplete({token:A,domain:z,tenantId:C,agentId:H||"",limit:5});e.reactExports.useEffect(()=>{if(!L||c){X.clear();return}X.search(l)},[L,l,c,X.search,X.clear]);const $=oe.length>0&&oe.every(i=>i.cards.length===1),Se=M.slice(0,3),Ce=M.slice(3),Ie=H===G?N==null?void 0:N.name:(ge=M.find(i=>i.agent_id===H))==null?void 0:ge.name,Ae=H===G?N!=null&&N.icon?e.getAgentIconById(N.icon):e.getAgentIconById("robot"):Ue((Pe=M.find(i=>i.agent_id===H))==null?void 0:Pe.icon),fe=H===G?N==null?void 0:N.description:(be=M.find(i=>i.agent_id===H))==null?void 0:be.description,s=(i,_)=>{if(i.bind_type==="agent"&&i.bind_agent_code){x(i.bind_agent_code);return}if(i.bind_type==="playbook"&&i.bind_playbook_id&&_){h(!0),b({message:ds(i,_),playbook_id:i.bind_playbook_id,playbook_params:_});return}g(H,i.title)},m=(i,_,ue,V=!1,Be=!1)=>{const we=Array.isArray(_.playbook_args)?_.playbook_args:[],Re=_.bind_type==="playbook"&&!!_.bind_playbook_id&&we.length>0;return e.jsxRuntimeExports.jsxs("article",{className:`wandox-insight-card${V?" wandox-insight-card--modal":""}${Be?" wandox-insight-card--featured":""}`,children:[e.jsxRuntimeExports.jsxs("button",{type:"button",className:"wandox-insight-card-main",onClick:()=>{V&&de(null),s(_,we[0])},children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-insight-card-top",children:[e.jsxRuntimeExports.jsx("span",{className:`wandox-insight-severity ${ls(_.severity_color,_.priority)}`,children:_.severity_label||"观察"}),_.affected_count&&e.jsxRuntimeExports.jsx("span",{children:_.affected_count})]}),e.jsxRuntimeExports.jsx("h4",{children:_.title}),_.description&&e.jsxRuntimeExports.jsx("p",{children:_.description}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-insight-card-foot",children:[e.jsxRuntimeExports.jsx("span",{children:_.value_hint||"建议进一步确认"}),!Re&&e.jsxRuntimeExports.jsxs("strong",{children:[lt(_)," →"]})]})]}),Re&&e.jsxRuntimeExports.jsxs("div",{className:"wandox-insight-arg-list",children:[we.slice(0,V?10:3).map((ve,te)=>e.jsxRuntimeExports.jsxs("button",{type:"button",className:"wandox-insight-arg-action",onClick:()=>{V&&de(null),s(_,ve)},children:[e.jsxRuntimeExports.jsx("span",{children:xs(ve,te)}),e.jsxRuntimeExports.jsx("strong",{children:lt(_)})]},`${_.title}-${te}`)),!V&&we.length>3&&e.jsxRuntimeExports.jsxs("button",{type:"button",className:"wandox-insight-arg-more",onClick:()=>de(oe.find(ve=>ve.name===i)||null),children:["还有 ",we.length-3," 项可执行"]})]})]},`${i}-${_.title}-${ue}`)};return e.jsxRuntimeExports.jsx("div",{className:"wandox-view-scroll",children:e.jsxRuntimeExports.jsxs("div",{className:"wandox-view-content wandox-hub-v2",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-v2-header",children:[e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsxs("h1",{className:"wandox-hub-v2-title",children:["您好,",O||"欢迎回来"]}),e.jsxRuntimeExports.jsx("p",{className:"wandox-hub-v2-subtitle",children:Le})]}),z!=="yunduo"&&e.jsxRuntimeExports.jsxs("button",{type:"button",className:"wandox-hub-v2-report",onClick:()=>{const i=new URLSearchParams;A&&i.append("authorization",A),z&&i.append("x-domain",z),C&&i.append("x-tenant-id",C),W&&i.append("user_id",W),O&&i.append("username",O),window.open(`https://ai.wandox.com/trend-report/trend-report-6.html${i.toString()?`?${i.toString()}`:""}`,"_blank")},children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-hub-v2-report-logo",children:"麦"}),e.jsxRuntimeExports.jsxs("span",{children:[e.jsxRuntimeExports.jsx("strong",{children:"麦多趋势报告"}),e.jsxRuntimeExports.jsx("small",{children:"第六期 已更新 →"})]})]})]}),I?e.jsxRuntimeExports.jsx(is,{}):e.jsxRuntimeExports.jsxs("div",{ref:T,className:`wandox-hub-main-card${c?" wandox-hub-main-card--open":""}`,children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-hub-main-card-search",style:{opacity:c?0:1,maxHeight:c?0:520,transition:"opacity 0.2s ease, max-height 0.35s cubic-bezier(0.4,0,0.2,1)"},children:e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-v2-input-panel",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-v2-input-head",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-v2-agent-title",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-hub-v2-agent-mark",children:Ae}),e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("strong",{children:Ie||(t==null?void 0:t.name)||"通用问答"}),e.jsxRuntimeExports.jsx("span",{children:fe||"问什么都行,系统会自动分流到对应的专业能力"})]})]}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-v2-chip-row",style:{display:"none"},children:[G&&e.jsxRuntimeExports.jsxs("button",{type:"button",className:`wandox-hub-v2-chip${H===G?" wandox-hub-v2-chip--active":""}`,onClick:()=>Z(G),title:(N==null?void 0:N.description)||(N==null?void 0:N.name)||"全部",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-hub-v2-chip-icon",children:N!=null&&N.icon?e.getAgentIconById(N.icon):"✦"}),"全部"]}),Se.map(i=>e.jsxRuntimeExports.jsxs("button",{type:"button",className:`wandox-hub-v2-chip${i.agent_id===H?" wandox-hub-v2-chip--active":""}`,onClick:()=>Z(i.agent_id),title:i.description||i.name,children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-hub-v2-chip-icon",children:Ue(i.icon)}),i.name]},i.agent_id)),Ce.length>0&&e.jsxRuntimeExports.jsx(e.Dropdown,{menu:{items:Ce.map(i=>({key:i.agent_id,label:e.jsxRuntimeExports.jsxs("span",{className:"wandox-hub-v2-more-item",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-hub-v2-chip-icon",children:Ue(i.icon)}),e.jsxRuntimeExports.jsx("span",{children:i.name})]})})),onClick:({key:i})=>Z(String(i))},placement:"bottomRight",children:e.jsxRuntimeExports.jsxs("button",{type:"button",className:"wandox-hub-v2-chip wandox-hub-v2-chip--more",children:["更多 ",e.jsxRuntimeExports.jsx(e.RefIcon$3,{})]})})]})]}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-v2-input-wrap",children:[e.jsxRuntimeExports.jsx(e.Input.TextArea,{value:l,onChange:i=>p(i.target.value),onPressEnter:i=>{i.shiftKey||(i.preventDefault(),g(H))},onFocus:()=>{ke(!0),u==null||u()},onBlur:()=>{window.setTimeout(()=>ke(!1),120),R==null||R()},placeholder:"请随便问,看看 AI 搭子怎么帮你避坑",autoSize:{minRows:3,maxRows:7},variant:"borderless",className:"wandox-hub-v2-textarea"}),e.jsxRuntimeExports.jsx(e.QuestionAutocomplete,{open:L,rewrittenQuestion:X.rewrittenQuestion,questions:X.questions,loading:X.loading,placement:"bottom",onSelectRewrite:i=>{p(i),X.clear()},onSelectQuestion:i=>{p(""),X.clear(),g(H,i.title)}})]}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-v2-input-bottom",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-v2-example",children:[e.jsxRuntimeExports.jsx("span",{className:"wandox-hub-v2-example-label",children:"示例:"}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-hub-v2-example-text",onClick:()=>{p(Ne)},style:{opacity:y?0:1,transform:y?"translateY(-4px)":"translateY(0)"},children:Ne})]}),e.jsxRuntimeExports.jsx(e.Button,{type:"primary",icon:e.jsxRuntimeExports.jsx(e.RefIcon$15,{}),className:"wandox-hub-v2-send",onClick:()=>g(H),children:"发送问题"})]})]})}),e.jsxRuntimeExports.jsxs("div",{style:{height:c?"100%":0,display:"flex",flexDirection:"column",opacity:c?1:0,overflow:"hidden",transition:"opacity 0.3s ease 0.1s, max-height 0.4s cubic-bezier(0.4,0,0.2,1)",position:"relative",zIndex:c?1:-1},children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-chat-header",children:[t&&e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-chat-agent-avatar",children:[e.getAgentIconById(t.icon),t.is_main&&e.jsxRuntimeExports.jsx("div",{className:"wandox-hub-chat-agent-badge"})]}),e.jsxRuntimeExports.jsx("span",{className:"wandox-hub-chat-agent-name",children:t==null?void 0:t.name}),e.jsxRuntimeExports.jsx("span",{className:"wandox-hub-chat-status",children:"对话中"}),e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-hub-chat-close",onClick:()=>{v(),h(!1)},children:"×"})]}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-chat-section__body wandox-chat-section__body--hub",children:[e.jsxRuntimeExports.jsx(e.ChatMessageList,{messages:f,executing:q,ssoToken:A,ssoDomain:z,ssoCompany:C,onExecutePlaybook:i=>b(i),onFillPlaybookParams:i=>D({playbook_id:i.playbookId,name:i.playbookName,input_fields:i.inputFields,initial_params:i.initialParams,playbook_type:i.playbookType}),onRespondToProposal:F,containerRef:P,className:"wandox-hub-messages"}),e.jsxRuntimeExports.jsx(e.ConversationOutline,{messages:f,scrollContainerRef:P})]}),e.jsxRuntimeExports.jsx("div",{className:"wandox-hub-chat-input-row",children:e.jsxRuntimeExports.jsx(e.ChatInput,{executing:q,onSend:r,playbooks:k,value:U,onValueChange:E,placeholder:"继续提问…",ssoToken:A,ssoDomain:z,ssoCompany:C,onRequestPlaybookParams:D})}),e.jsxRuntimeExports.jsx("div",{className:"wandox-hub-chat-footer",children:e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-hub-chat-enter-link",onClick:()=>x(),children:"进入完整对话视图 →"})})]})]}),(ne||K==="error"||K==="success"&&xe>=0)&&K!=="disabled"&&e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-section wandox-hub-v2-insights",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-v2-section-heading",children:[e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-v2-section-kicker",children:[e.jsxRuntimeExports.jsx("span",{}),e.jsxRuntimeExports.jsx("strong",{children:"基于你的数据,建议先看"})]}),e.jsxRuntimeExports.jsx("p",{children:"系统每天扫描你的店铺数据,自动识别出值得处理的场景"})]}),e.jsxRuntimeExports.jsx(e.Button,{type:"text",size:"small",icon:e.jsxRuntimeExports.jsx(e.RefIcon$7,{}),className:"wandox-hub-v2-refresh",onClick:()=>ae(!0),children:"换一批"})]}),ne?e.jsxRuntimeExports.jsx(os,{}):K==="error"?e.jsxRuntimeExports.jsxs("div",{className:"wandox-insight-empty",children:[e.jsxRuntimeExports.jsx("strong",{children:"数据获取失败,请稍后重试"}),e.jsxRuntimeExports.jsx(e.Button,{type:"link",size:"small",onClick:()=>ae(),children:"重试"})]}):oe.length===0?e.jsxRuntimeExports.jsxs("div",{className:"wandox-insight-empty",children:[e.jsxRuntimeExports.jsx("strong",{children:"暂无场景推荐,数据正常"}),e.jsxRuntimeExports.jsx("span",{children:"当前没有扫描到需要优先处理的运营场景"})]}):e.jsxRuntimeExports.jsx("div",{className:`wandox-insight-scene-list${$?" wandox-insight-scene-list--single-cards":""}${oe.length===1?" wandox-insight-scene-list--one-scene":""}`,children:oe.map(i=>e.jsxRuntimeExports.jsxs("section",{className:"wandox-insight-scene",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-insight-scene-head",children:e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("strong",{children:rt(i.name)}),e.jsxRuntimeExports.jsxs("span",{children:["扫描到"," ",i.suggestions_count??i.cards.length," ","条建议"]})]})}),e.jsxRuntimeExports.jsx("div",{className:`wandox-insight-card-row${i.cards.length===1?" wandox-insight-card-row--single":""}`,children:i.cards.slice(0,4).map((_,ue)=>m(i.name,_,ue,!1,i.cards.length===1))}),i.cards.length>4&&e.jsxRuntimeExports.jsxs("button",{type:"button",className:"wandox-insight-view-all",onClick:()=>de(i),children:["查看全部 ",i.cards.length," 条建议 →"]})]},i.name))})]}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-section",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-v2-section-heading",children:[e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-hub-v2-section-kicker",children:[e.jsxRuntimeExports.jsx("span",{}),e.jsxRuntimeExports.jsx("strong",{children:"需要执行更专业的任务?"})]}),e.jsxRuntimeExports.jsx("p",{children:"直接进入对应专家,按业务流程一步步处理"})]}),e.jsxRuntimeExports.jsx(e.Button,{type:"link",size:"small",className:"wandox-hub-v2-refresh",onClick:()=>x(),children:"全部 →"})]}),I?e.jsxRuntimeExports.jsx("div",{className:"wandox-agent-grid",children:[1,2,3].map(i=>e.jsxRuntimeExports.jsxs("div",{className:"wandox-agent-entry-card",style:{pointerEvents:"none"},children:[e.jsxRuntimeExports.jsx(e.Skeleton.Avatar,{active:!0,size:36,shape:"square",style:{borderRadius:8,flexShrink:0}}),e.jsxRuntimeExports.jsxs("div",{style:{flex:1},children:[e.jsxRuntimeExports.jsx(e.Skeleton.Input,{active:!0,block:!0,style:{height:14,marginBottom:6}}),e.jsxRuntimeExports.jsx(e.Skeleton.Input,{active:!0,style:{width:"80%",height:11}})]})]},i))}):e.jsxRuntimeExports.jsx("div",{className:"wandox-agent-grid",children:o.filter(i=>!i.is_main).slice(0,4).map(i=>{const _=e.getAgentPackageBenefit(i);return e.jsxRuntimeExports.jsxs("button",{type:"button",className:`wandox-agent-entry-card${_?" wandox-agent-entry-card--with-badge":""}`,onClick:()=>x(i.agent_id||void 0),children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-agent-entry-icon",children:e.getAgentIconById(i.icon)}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-agent-entry-info",children:[e.jsxRuntimeExports.jsx("div",{className:"wandox-agent-entry-name",children:i.name}),e.jsxRuntimeExports.jsx("div",{className:"wandox-agent-entry-desc",children:i.description})]}),e.jsxRuntimeExports.jsx(e.RefIcon$6,{className:"wandox-agent-entry-arrow"}),_&&e.jsxRuntimeExports.jsx("span",{className:`wandox-agent-entry-badge wandox-agent-entry-badge--${_.kind}`,style:{background:_.badgeColor,color:_.badgeTextColor},children:_.badgeText})]},i.agent_id)})})]}),e.jsxRuntimeExports.jsx(e.Modal,{open:!!Y,onCancel:()=>de(null),footer:null,width:920,centered:!0,className:"wandox-insight-modal",title:Y?e.jsxRuntimeExports.jsxs("div",{className:"wandox-insight-modal-title",children:[e.jsxRuntimeExports.jsx("span",{children:cs(Y.name)}),e.jsxRuntimeExports.jsxs("div",{children:[e.jsxRuntimeExports.jsx("strong",{children:rt(Y.name)}),e.jsxRuntimeExports.jsxs("small",{children:[Y.cards.length," 条数据建议"]})]})]}):null,styles:{container:{padding:0}},children:Y&&e.jsxRuntimeExports.jsx("div",{className:"wandox-insight-modal-grid",children:Y.cards.map((i,_)=>m(Y.name,i,_,!0))})})]})})}function ms(n={}){const{presetAgents:t,initialAgentId:a}=n,{setAllQuestions:o}=e.useQuestionsStore(),[c,h]=e.reactExports.useState("default"),[l,p]=e.reactExports.useState([]),[w,y]=e.reactExports.useState([]),[g,u]=e.reactExports.useState([]),[R,f]=e.reactExports.useState(!1),[q,U]=e.reactExports.useState([]),[E,r]=e.reactExports.useState([]),[x,k]=e.reactExports.useState(!1),[b,D]=e.reactExports.useState(!1),v=e.reactExports.useRef(c),F=e.reactExports.useRef(0),A=e.reactExports.useRef(0);v.current=c;const z=e.reactExports.useCallback(async()=>{var O,W;if(t&&t.length>0){p(t),h(P=>{var M,ee;if(P&&P!=="default"&&t.some(Z=>Z.agent_code===P||Z.agent_id===P))return P;if(a){const Z=e.findAgentById(t,a);if(Z)return e.getAgentPrimaryId(Z);e.staticMethods.error("指定的智能体不存在,已切换到默认智能体")}return((M=t[0])==null?void 0:M.agent_code)||((ee=t[0])==null?void 0:ee.agent_id)||""});const T=[];for(const P of t)if(P.questions&&Array.isArray(P.questions)&&T.push(...P.questions),P.children)for(const M of P.children)M.questions&&Array.isArray(M.questions)&&T.push(...M.questions);o(T);return}k(!0);try{const{data:T}=await e.GET_Api_V1_Agents_List({page:1,page_size:99});if(p(T.filter(M=>!M.hidden)||[]),a){const M=e.findAgentById(T||[],a);M?h(e.getAgentPrimaryId(M)):(e.staticMethods.error("指定的智能体不存在,已切换到默认智能体"),h(((O=T[0])==null?void 0:O.agent_code)||""))}else h(((W=T[0])==null?void 0:W.agent_code)||"");const P=[];for(const M of T||[])if(M.questions&&Array.isArray(M.questions)&&P.push(...M.questions),M.children)for(const ee of M.children)ee.questions&&Array.isArray(ee.questions)&&P.push(...ee.questions);o(P)}catch{}k(!1)},[t,o,a]),C=e.reactExports.useCallback(async()=>{if(!c||c==="default")return;const O=c,W=++F.current;k(!0),D(!1),u([]);try{const{data:T}=await e.GET_Api_V1_Agents_Detail({agent_id:O});if(W!==F.current||v.current!==O)return;y(e.collectPlaybooksFromDetail(T));const P=T.playbook_groups||[];U(P);const M=T.children||[];r(M)}catch{if(W!==F.current||v.current!==O)return;u([])}finally{W===F.current&&v.current===O&&(k(!1),D(!0))}},[c]),I=e.reactExports.useCallback(async()=>{if(!c||c==="default"){u([]);return}const O=c,W=++A.current;f(!0);try{const{data:T}=await e.GET_Api_V1_Agents_UserPlaybooks({agent_id:O});if(W!==A.current||v.current!==O)return;const P=Array.isArray(T)?T:Array.isArray(T==null?void 0:T.user_playbooks)?T.user_playbooks:[];u(P)}catch{if(W!==A.current||v.current!==O)return;u([]),e.staticMethods.error("我的场景加载失败")}finally{W===A.current&&v.current===O&&f(!1)}},[c]);return{activeAgent:c,setActiveAgent:h,agents:l,playbooks:w,userPlaybooks:g,userPlaybooksLoading:R,playbookGroups:q,childAgents:E,loading:x,setLoading:k,playbooksLoaded:b,loadAgents:z,loadPlaybooks:C,loadUserPlaybooks:I}}function hs(n){const t=n.toLocaleDateString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit"}),a=n.toLocaleTimeString("zh-CN",{hour:"2-digit",minute:"2-digit"});return`${t}
|
|
3
3
|
${a}`}function Qe(n,t){return n.activeAgent===t.activeAgent&&n.webhookId===t.webhookId&&n.ssoToken===t.ssoToken&&n.ssoDomain===t.ssoDomain&&n.ssoCompany===t.ssoCompany}function js(n){const{activeAgent:t,webhookId:a="",ssoToken:o="",ssoDomain:c="",ssoCompany:h=""}=n,[l,p]=e.reactExports.useState([]),w=e.reactExports.useRef({activeAgent:t,webhookId:a,ssoToken:o,ssoDomain:c,ssoCompany:h});e.reactExports.useEffect(()=>{w.current={activeAgent:t,webhookId:a,ssoToken:o,ssoDomain:c,ssoCompany:h},p([])},[t,a,o,c,h]);const y=e.reactExports.useCallback(async()=>{if(!t)return;const g={activeAgent:t,webhookId:a,ssoToken:o,ssoDomain:c,ssoCompany:h};if(Qe(w.current,g))try{const u=await e.GET_Api_V1_Agents_Workspaces({agent_id:t,limit:10,use_cache:!1});if(!Qe(w.current,g))return;if(u!=null&&u.data&&Array.isArray(u.data)){const R=u.data.map(f=>{const q=Array.isArray(f.actions)?f.actions||[]:[],U=f.ui_payload,E=U==null?void 0:U.actions,r=Array.isArray(E)?E:[],k=[...q,...r].map(D=>{const v=D;return{label:v.display_name||v.label||"执行",action_id:v.action_id,playbook_id:v.playbook_id,display_name:v.display_name,display_icon:v.display_icon,params:v.params,params_fields_map:v.params_fields_map,type:v.type,url:v.url,style:v.style,status:v.action_status||v.status||void 0,sort_order:v.sort_order,executed_job_id:v.executed_job_id,supports_batch:v.supports_batch===!0,batch_max_items:v.batch_max_items,batch_id:v.batch_id,outputs:v.outputs}}),b=f.outputs;return{type:f.widget_type||"daily_report",priority:f.priority||"medium",title:f.title||"每日战报",summary:f.summary||"",timestamp:f.created_at?hs(new Date(f.created_at||"")):"",data:f.card_data||{},actions:k,id:f.inbox_id||"",agent_id:f.agent_id||"",read:!!f.is_read,ui_payload:b||U||{}}});if(R.length>0){const f=R.sort((q,U)=>{const E=q.timestamp?new Date(q.timestamp.replace(/\n/g," ")).getTime():0;return(U.timestamp?new Date(U.timestamp.replace(/\n/g," ")).getTime():0)-E});p(f)}else p([])}else p([])}catch(u){if(!Qe(w.current,g))return;throw p([]),u}},[t,a,o,c,h]);return{widgets:l,setWidgets:p,loadDailyReports:y}}function fs(){const[n,t]=e.reactExports.useState([]),[a,o]=e.reactExports.useState(!1),[c,h]=e.reactExports.useState(!1),[l,p]=e.reactExports.useState(""),[w,y]=e.reactExports.useState([]),[g,u]=e.reactExports.useState(!1),[R,f]=e.reactExports.useState(null),[q,U]=e.reactExports.useState(!0),E=e.reactExports.useRef(null),r=e.reactExports.useCallback(async()=>{if(E.current)return E.current;const C=(async()=>{o(!0);try{const I=await e.GET_Api_V1_Playbooks_SolidifyView_List({page:1,page_size:20});return Array.isArray(I==null?void 0:I.data)?(t(I.data),h(!0),!0):(h(!1),!1)}catch{return h(!1),!1}finally{o(!1),E.current=null}})();return E.current=C,C},[]),x=e.reactExports.useCallback(()=>c?Promise.resolve(!0):r(),[r,c]),k=e.reactExports.useCallback(C=>{p(C),f({session_id:C,type:"dashboard_intent",intents:[],data:{}}),U(!1),(async(O={})=>{u(!0);try{const W=await e.POST_Api_V1_Playbooks_SolidifyView_Run_ByPlaybookId(C,{params:O});W.success&&W.data&&(f(W.data),W.data.input_params&&y(W.data.input_params))}catch{}finally{u(!1)}})()},[]),b=e.reactExports.useCallback(C=>{if(!l)return;(async()=>{u(!0);try{const O=await e.POST_Api_V1_Playbooks_SolidifyView_Run_ByPlaybookId(l,{params:C});O.success&&O.data&&f(O.data)}catch{}finally{u(!1)}})()},[l]),D=e.reactExports.useCallback(C=>{l===C&&(p(""),f(null),y([])),r()},[l,r]),v=e.reactExports.useCallback(()=>{if(!l)return null;const C=n.find(I=>I.playbook_id===l);return(C==null?void 0:C.name)||null},[l,n]),F=e.reactExports.useCallback((C,I)=>{f(C),U(I!==void 0?I:!0)},[]),A=e.reactExports.useCallback(()=>{},[]),z=e.reactExports.useCallback(()=>{p(""),f(null),y([])},[]);return{solidifiedPlaybooks:n,solidifiedPlaybooksLoading:a,solidifiedPlaybooksLoaded:c,activeSolidifiedPlaybook:l,setActiveSolidifiedPlaybook:p,solidifyInputParams:w,solidifyLoading:g,dashboardData:R,setDashboardData:f,dashboardShowSaveButton:q,setDashboardShowSaveButton:U,loadSolidifiedPlaybooks:r,ensureSolidifiedPlaybooksLoaded:x,handleSolidifiedPlaybookClick:k,handleSolidifyParamsSearch:b,handleSolidifiedPlaybookDelete:D,getCurrentSolidifiedPlaybookName:v,handleDashboardPreview:F,handleSolidifyComplete:A,clearDashboard:z}}function Es(){const{allQuestions:n,setCurrentQuestion:t}=e.useQuestionsStore();e.reactExports.useEffect(()=>{if(n.length===0)return;const a=Math.floor(Math.random()*n.length);t(n[a]);const o=setInterval(()=>{const c=Math.floor(Math.random()*n.length);t(n[c])},1e4);return()=>{clearInterval(o)}},[n,t])}const ct={chat:{title:"对话",subtitle:""},plan:{title:"自动化",subtitle:"创建、管理并追踪自动化智能体的执行结果,支持定时触发与对内流转"},professional:{title:"专业智能体",subtitle:"深度分析与专业领域对话"},goals:{title:"目标追踪",subtitle:"跟踪关键业务指标和目标进展"},settings:{title:"通知配置",subtitle:"配置 Webhook 通知,实时接收系统重要事件"}},gs=5*60*1e3,Rs=3;function ys(n={}){const{showAside:t=!0,showLogout:a=!1,onLogout:o,presetAgents:c,webhookId:h,onReady:l,initialAgentId:p,initialPlaybookId:w,initialPlaybookParams:y}=n,g=localStorage.getItem("sso_token")||"",u=localStorage.getItem("sso_domain")||"maiduo",R=localStorage.getItem("sso_company")||"",q=`${e.getBaseURL()}/api/v1/oss/upload2`,U=e.reactExports.useCallback(async d=>{const{data:B}=await e.GET_Api_V1_Playbooks_Detail({playbook_id:d});return B},[]),E=e.reactExports.useCallback(d=>e.POST_Api_V1_Playbooks_SolidifyView_SaveV2({session_id:d.session_id||"",name:d.name,description:d.description}),[]),r=e.reactExports.useCallback(d=>e.POST_Api_V1_Playbooks_SolidifyView_PreviewV2({session_id:d.session_id||"",user_hint:d.user_hint||""}),[]),{activeAgent:x,setActiveAgent:k,agents:b,playbooks:D,userPlaybooks:v,userPlaybooksLoading:F,childAgents:A,loading:z,loadAgents:C,loadPlaybooks:I,loadUserPlaybooks:O,playbooksLoaded:W}=ms({presetAgents:c,initialAgentId:p}),[T,P]=e.reactExports.useState(()=>!!p),[M,ee]=e.reactExports.useState(!1),[Z,J]=e.reactExports.useState(!1),[me,ne]=e.reactExports.useState([]),[ie,K]=e.reactExports.useState(0),ce=e.reactExports.useRef(!1),{executing:xe,stopping:ye,executingRef:Y,queueStatus:de,messageData:L,actions:ke}=pe.useWorkbenchSession({activeAgent:x,webhookId:h,ssoToken:g,ssoDomain:u,ssoCompany:R,onRecommendationsUpdate:ne}),{sendMessage:N,executePlaybook:G,respondToProposal:he,stopCurrent:Ne,retrigger:Le,abort:je,clearMessages:ae}=ke;e.reactExports.useEffect(()=>{ce.current&&!xe&&K(d=>d+1),ce.current=xe},[xe]);const{widgets:oe,setWidgets:H,loadDailyReports:X}=js({activeAgent:x,webhookId:h,ssoToken:g,ssoDomain:u,ssoCompany:R}),$=fs();Es();const[Se,Ce]=e.reactExports.useState(()=>localStorage.getItem("wandox_sidebar_agent_mode")==="true"),Ie=e.reactExports.useCallback(()=>{Ce(d=>{const B=!d;return localStorage.setItem("wandox_sidebar_agent_mode",String(B)),B})},[]),[Ae,fe]=e.reactExports.useState(!1),[s,m]=e.reactExports.useState(!1),[Q,S]=e.reactExports.useState(!1),[ge,Pe]=e.reactExports.useState(!1),[be,i]=e.reactExports.useState(null),[_,ue]=e.reactExports.useState(!1),[V,Be]=e.reactExports.useState(null),[we,Re]=e.reactExports.useState(""),[ve,te]=e.reactExports.useState(null),[re,Ee]=e.reactExports.useState("chat"),[De,dt]=e.reactExports.useState(null),ut=e.reactExports.useCallback(()=>{fe(!0),m(!1)},[]),pt=e.reactExports.useCallback(()=>{fe(!1),m(!1)},[]),[Ye,Xe]=e.reactExports.useState(""),[Je,et]=e.reactExports.useState(0),[mt,ze]=e.reactExports.useState(!1),[tt,st]=e.reactExports.useState(!1),[ht,nt]=e.reactExports.useState(!1),[jt,ft]=e.reactExports.useState(""),Oe=e.reactExports.useRef(null),$e=e.reactExports.useRef(!1),[Et,gt]=e.reactExports.useState(null),[Rt,yt]=e.reactExports.useState(!1),bt=z||L.loading,wt=e.reactExports.useCallback(d=>{i(()=>d)},[]);e.reactExports.useEffect(()=>{l&&l({showInspectionResults:d=>{gt(d||null),yt(!0)}})},[l]),e.reactExports.useEffect(()=>{P(!!p),ee(!1),J(!1)},[p,w,y]);const vt=e.reactExports.useMemo(()=>(c||[]).map(d=>d.agent_id||d.agent_code||"").join("|"),[c]);e.reactExports.useEffect(()=>{C()},[vt]),e.reactExports.useEffect(()=>{if(x)return ne([]),I(),()=>{Y.current&&je()}},[x,h,g,u,R]),e.reactExports.useEffect(()=>{if(re!=="professional"){$e.current=!1;return}if(!x)return;$e.current||(L.loadMessagesAndDailyReport(),X()),$e.current=!1;let d=0,B=null;return B=setInterval(async()=>{try{await X(),d=0}catch{d++,d>=Rs&&B&&(clearInterval(B),B=null)}},gs),()=>{B&&clearInterval(B)}},[re,x,h,g,u,R]);const se=b.find(d=>d.is_main)??b[0],Me=(se==null?void 0:se.questions)||[];e.reactExports.useEffect(()=>{et(0),ze(!1)},[se==null?void 0:se.agent_id]),e.reactExports.useEffect(()=>{if(Me.length<=1||tt)return;let d;const B=setInterval(()=>{ze(!0),d=setTimeout(()=>{et(j=>(j+1)%Me.length),ze(!1)},350)},3500);return()=>{clearInterval(B),clearTimeout(d)}},[Me.length,tt]),e.reactExports.useEffect(()=>{if(Oe.current&&x&&x!=="default"){const d=Oe.current;Oe.current=null,N(d)}},[x,N]),e.reactExports.useEffect(()=>{if(!p||!T||!x||x==="default"||b.length===0)return;!!e.findAgentById(b,p)||P(!1)},[p,T,x,b]),e.reactExports.useEffect(()=>{!p||w||M||!x||x==="default"||!b.find(B=>e.matchesAgent(B,x)&&e.matchesAgent(B,p))||(ee(!0),Ee("professional"),$.clearDashboard(),P(!1))},[p,w,M,x,b,$]),e.reactExports.useEffect(()=>{var at;if(!p||!w||Z||!x||x==="default"||!W||!b.find(_e=>e.matchesAgent(_e,x)&&e.matchesAgent(_e,p)))return;const B=D.find(_e=>e.matchesPlaybook(_e,w));if(!B){Ee("professional"),e.staticMethods.error(`指定的剧本(${w})不存在,已切换到智能体界面`),J(!0),P(!1);return}J(!0),Ee("professional"),$e.current=!0,ae(),$.clearDashboard(),te(null),Re("");const j=y||{},le=Object.keys(j).length>0,qe=(B.input_fields??[]).filter(_e=>{if(!_e.required)return!1;const Ve=j[_e.name];return Ve==null||Ve===""});if((((at=B.input_fields)==null?void 0:at.length)??0)>0&&(!le||qe.length>0)){te(B),P(!1);return}G({message:B.name,playbook_id:w,playbook_params:j}),P(!1)},[p,w,Z,x,W,b,D,y]);const We=e.reactExports.useCallback(d=>{e.isSameAgentSelection(b,x,d)||(Y.current&&(je(),e.staticMethods.info("已中止当前剧本,切换智能体")),k(d),Re(""),te(null),$.clearDashboard(),ae(),H([]))},[je,x,b,ae,Y,k,$,H]),_t=(d,B)=>{const j=(B??Ye).trim()||Me[Je%Me.length]||"",le=d||(se==null?void 0:se.agent_id);!j||!le||(Xe(""),nt(!0),ae(),x===le?N(j):($e.current=!0,Oe.current=j,k(le)))},kt=(d,B)=>{$.handleDashboardPreview(d,B),Ee("chat"),k("default")},Nt=()=>{$.handleSolidifyComplete(),Ee("chat"),k("default")},St=d=>{Ee(d),(d==="goals"||d==="settings"||d==="plan"||d==="chat")&&$.clearDashboard()},Ct=()=>{m(!1),Pe(!0),$.ensureSolidifiedPlaybooksLoaded()},It=d=>{Pe(!1),$.handleSolidifiedPlaybookClick(d),Ee("chat"),k("default"),Re(""),te(null)},At=()=>{var d,B;if($.dashboardData)return e.jsxRuntimeExports.jsx(e.DashboardRenderer,{data:$.dashboardData,showSaveButton:$.dashboardShowSaveButton,onSaveSuccess:$.loadSolidifiedPlaybooks,onSaveDashboard:E,onPreviewDashboard:r,title:$.getCurrentSolidifiedPlaybookName()||void 0,customParamsForm:$.solidifyInputParams.length>0?e.jsxRuntimeExports.jsx(Jt,{inputParams:$.solidifyInputParams,onSearch:$.handleSolidifyParamsSearch,loading:$.solidifyLoading}):void 0,showGlobalFilter:$.solidifyInputParams.length>0});switch(re){case"chat":return e.jsxRuntimeExports.jsx(e.PlaybookContext.Provider,{value:{onExecutePlaybook:G,getPlaybookDetail:U,ossUploadUrl:q,ssoToken:g,ssoDomain:u,ssoCompany:R,onFillPlaybookParams:j=>{const le={playbook_id:j.playbookId,name:j.playbookName,input_fields:j.inputFields,initial_params:j.initialParams,playbook_type:j.playbookType};te(le),Ee("professional")}},children:e.jsxRuntimeExports.jsx(ps,{agentLoading:z,mainAgentForHub:se,mainAgentQuestions:Me,agents:b,hubChatOpen:ht,setHubChatOpen:nt,hubChatInput:Ye,setHubChatInput:Xe,hubScrollIdx:Je,hubScrollFading:mt,onHubChatSend:_t,onHubInputFocus:()=>st(!0),onHubInputBlur:()=>st(!1),messages:L.messages,executing:xe,hubInlineChatInput:jt,setHubInlineChatInput:ft,onHubInlineSend:(j,le,qe)=>{se!=null&&se.agent_id&&(x!==se.agent_id&&k(se.agent_id),N(j,le,qe))},onEnterProfessional:j=>{j&&k(j),Re(""),te(null),$.clearDashboard(),H([]),Ee("professional")},playbooks:D,executePlaybook:G,onRequestPlaybookParams:te,clearMessages:ae,onAbort:je,onRespondToProposal:he,ssoToken:g,ssoDomain:u,ssoCompany:R})});case"goals":return e.jsxRuntimeExports.jsx(e.GoalTracker,{});case"settings":return e.jsxRuntimeExports.jsx(pe.SettingsWithTabs,{});case"plan":return e.jsxRuntimeExports.jsx(pe.AutomationPage,{embedded:!0,onHeaderChange:dt,onCockpitEnter:ut,onCockpitExit:pt});case"professional":return e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(ss,{title:((d=b.find(j=>e.matchesAgent(j,x)))==null?void 0:d.name)||"Wandox智能体",agentSwitcher:Se?void 0:e.jsxRuntimeExports.jsxs("div",{style:{display:"inline-flex",alignItems:"center",height:34,background:"#fff",border:"1px solid #e5e0f0",borderRadius:10,boxSizing:"border-box",overflow:"hidden"},children:[e.jsxRuntimeExports.jsxs("div",{style:{display:"flex",alignItems:"center",padding:"0 0 0 8px"},children:[e.jsxRuntimeExports.jsx("div",{style:{width:22,height:22,flexShrink:0},children:e.getAgentIconById((B=b.find(j=>e.matchesAgent(j,x)))==null?void 0:B.icon)}),e.jsxRuntimeExports.jsx(e.Select,{value:x,onChange:j=>We(j),options:b.map(j=>({value:j.agent_id,label:j.name})),variant:"borderless",suffixIcon:e.jsxRuntimeExports.jsx(e.RefIcon$13,{style:{color:"#9275ff",verticalAlign:"middle"}}),style:{fontWeight:600,fontSize:14,minWidth:100,color:"#4a3a6a"},popupMatchSelectWidth:!1})]}),e.jsxRuntimeExports.jsx("button",{type:"button",onClick:Ie,title:"切换为侧边栏选择",style:{display:"flex",alignItems:"center",justifyContent:"center",width:34,height:"100%",cursor:"pointer",color:"#b0a0c8",borderLeft:"1px solid #e5e0f0",transition:"all 0.15s",background:"none",border:"none",padding:0},onMouseEnter:j=>{j.currentTarget.style.color="#7c3aed",j.currentTarget.style.background="#f5f0ff"},onMouseLeave:j=>{j.currentTarget.style.color="#b0a0c8",j.currentTarget.style.background="transparent"},children:e.jsxRuntimeExports.jsx(it,{style:{fontSize:13}})})]}),count:oe.length,widgets:oe,activeAgent:x,agents:b,childAgents:A,ssoDomain:u,ssoToken:g,ssoCompany:R,onWidgetsUpdate:H,onExecuteComplete:()=>{X()},externalRobotName:Et,externalShowPanel:Rt}),e.jsxRuntimeExports.jsx(e.Chat,{messages:L.messages,playbooks:D,messagesTotal:L.messagesTotal,loadMoreMessages:L.loadMoreMessages,loading:bt,executing:xe,ssoToken:g,ssoDomain:u,ssoCompany:R,activeAgent:x,webhookId:h,onExecutePlaybook:G,onSolidifySuccess:$.loadSolidifiedPlaybooks,onDashboardPreview:kt,onSolidifyComplete:Nt,onFillPlaybookParams:j=>{const le={playbook_id:j.playbookId,name:j.playbookName,input_fields:j.inputFields,initial_params:j.initialParams,playbook_type:j.playbookType};te(le)},onActionClick:j=>{j.action_id?(S(!0),be&&be({action_id:j.action_id,action_params:j.params})):j.playbook_id&&G({message:j.display_name||"执行",playbook_id:j.playbook_id,...j.params?{playbook_params:j.params}:{}})},onExecuteComplete:()=>{X()},onRespondToProposal:he,onRetrigger:Le}),e.jsxRuntimeExports.jsxs("div",{className:"chat-input-area",children:[e.jsxRuntimeExports.jsx(e.PlaybookHub,{playbooks:D,playbookLoading:z,onPlaybookClick:G,onSelectPlaybook:j=>{te(j)},recommendations:me,userPlaybooks:v,userPlaybooksLoading:F,onLoadUserPlaybooks:O,agentId:e.getAgentPrimaryId(b.find(j=>e.matchesAgent(j,x)))||x,recentRefreshKey:ie}),e.jsxRuntimeExports.jsx(e.ChatInput,{executing:xe,stopping:ye,onStop:Ne,onSend:N,playbooks:D,recommendations:me,value:we,onValueChange:Re,onRequestPlaybookParams:te,ssoToken:g,ssoDomain:u,ssoCompany:R})]})]});default:return null}},Te=re==="plan"?De??ct.plan:ct[re],Pt=(re==="plan"||!$.dashboardData)&&re!=="professional"&&re!=="chat";return e.jsxRuntimeExports.jsx(e.LanguageProvider,{children:e.jsxRuntimeExports.jsxs(Ht,{children:[e.jsxRuntimeExports.jsx("div",{className:`wandox-aside-overlay ${s?"wandox-aside-overlay--visible":""}`,onClick:()=>m(!1),onKeyDown:d=>d.key==="Escape"&&m(!1),role:"button",tabIndex:0,"aria-label":"关闭侧边栏"}),t&&e.jsxRuntimeExports.jsx(Kt,{active:x,agents:b,onChange:d=>{m(!1),We(d)},collapsed:Ae,onToggle:()=>fe(d=>!d),className:s?"wandox-aside--mobile-open":"",activeView:re,onViewChange:St,onToolboxOpen:Ct,showLogout:a,onLogout:o,sidebarAgentMode:Se,onToggleSidebarMode:Ie,onAgentSelect:d=>We(d)}),t&&Ae&&e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-aside-floating-open",onClick:()=>fe(!1),"aria-label":"展开侧边栏",title:"展开侧边栏",children:e.jsxRuntimeExports.jsx(it,{})}),e.jsxRuntimeExports.jsxs("div",{className:"wandox-workspace",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-mobile-header",children:[e.jsxRuntimeExports.jsx("button",{type:"button",className:"wandox-mobile-menu-btn",onClick:()=>{fe(!1),m(!0)},children:"☰"}),e.jsxRuntimeExports.jsx("h1",{className:"wandox-mobile-title",children:"Wandox"}),a&&o?e.jsxRuntimeExports.jsx("button",{type:"button",onClick:o,style:{width:40,height:40,background:"transparent",border:"none",cursor:"pointer"},children:"退出"}):e.jsxRuntimeExports.jsx("div",{style:{width:40}})]}),Pt&&e.jsxRuntimeExports.jsxs("div",{className:"wandox-workspace-topbar",children:[e.jsxRuntimeExports.jsxs("div",{className:"wandox-workspace-topbar-info",children:[e.jsxRuntimeExports.jsx("h1",{className:"wandox-workspace-topbar-title",children:(Te==null?void 0:Te.title)??"您好,欢迎使用 AI 智能体"}),e.jsxRuntimeExports.jsx("p",{className:"wandox-workspace-topbar-subtitle",children:(Te==null?void 0:Te.subtitle)??""})]}),e.jsxRuntimeExports.jsx("div",{className:"wandox-workspace-topbar-actions",children:re==="plan"?De==null?void 0:De.actions:null})]}),e.jsxRuntimeExports.jsx("div",{className:`wandox-workspace-container${re==="plan"?" wandox-workspace-container--automation":""}`,children:At()})]}),e.jsxRuntimeExports.jsx(es,{open:ge,loading:$.solidifiedPlaybooksLoading,playbooks:$.solidifiedPlaybooks,activePlaybookId:$.activeSolidifiedPlaybook,onClose:()=>Pe(!1),onPlaybookClick:It,onPlaybookDelete:$.handleSolidifiedPlaybookDelete}),e.jsxRuntimeExports.jsx(e.ActionExecutionDrawer,{open:Q,ssoToken:g,ssoDomain:u,ssoCompany:R,onClose:()=>S(!1),onExecuteAction:wt,onExecuteComplete:()=>{setTimeout(()=>{X()},1e3)}}),e.jsxRuntimeExports.jsx(as,{open:_,actionId:(V==null?void 0:V.action_id)||"",actionName:(V==null?void 0:V.display_name)||"",defaultParams:V==null?void 0:V.params,onCancel:()=>{ue(!1),Be(null)},onExecute:d=>{ue(!1),S(!0),be&&V&&be({action_id:V.action_id,action_params:d}),Be(null)}}),e.jsxRuntimeExports.jsx(Yt,{open:!!ve,playbook:ve,onClose:()=>te(null),onSubmit:(d,B)=>{te(null),G({message:d.name,playbook_id:d.playbook_id,playbook_params:B})}}),T&&e.jsxRuntimeExports.jsx(e.InitialRouteLoading,{}),e.jsxRuntimeExports.jsx(ns,{queueStatus:de})]})})}exports.default=ys;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ds as s, af as Ue, d0 as e, bK as ss, b9 as at, ba as Ss, cs as Pe, bb as nt, d9 as it, dZ as ot, aE as lt, dF as oe, N as ze, aZ as rt, bB as dt, bA as Cs, i as _e, e1 as Is, ai as Ve, L as bs, aq as ds, F as ct, bM as ut, ct as As, a6 as ht, a4 as xt, P as mt, aS as pt, B as ys, b1 as ft, aO as Xe, A as gt, by as Ps, y as bt, aA as yt, cv as Rs, ea as wt, J as jt, b0 as vt, aV as _t, bc as kt, o as Nt, v as St, n as Es, b4 as Ct, bz as pe, b3 as It, bR as At, eb as Ls, ck as ts, cu as as, R as Pt, Q as Rt, c0 as Et, S as Lt, T as Tt, ab as $t, aG as ws, a9 as Mt, aH as Dt, aF as Bt, d3 as Ae, d4 as Ot, cZ as zt, am as Wt, a as qt, ah as Vt, G as Ut, l as Qt, aQ as Gt, ad as Ft, aP as Kt } from "./index-
|
|
2
|
-
import { e as Zt, d as Ht, g as Yt, f as Xt, A as Jt, i as ea, Q as sa, u as ta, a as aa, S as na } from "./useWorkbenchSession-
|
|
3
|
-
import { D as Ts } from "./index-
|
|
4
|
-
import { Divider as ia } from "./index-
|
|
1
|
+
import { ds as s, af as Ue, d0 as e, bK as ss, b9 as at, ba as Ss, cs as Pe, bb as nt, d9 as it, dZ as ot, aE as lt, dF as oe, N as ze, aZ as rt, bB as dt, bA as Cs, i as _e, e1 as Is, ai as Ve, L as bs, aq as ds, F as ct, bM as ut, ct as As, a6 as ht, a4 as xt, P as mt, aS as pt, B as ys, b1 as ft, aO as Xe, A as gt, by as Ps, y as bt, aA as yt, cv as Rs, ea as wt, J as jt, b0 as vt, aV as _t, bc as kt, o as Nt, v as St, n as Es, b4 as Ct, bz as pe, b3 as It, bR as At, eb as Ls, ck as ts, cu as as, R as Pt, Q as Rt, c0 as Et, S as Lt, T as Tt, ab as $t, aG as ws, a9 as Mt, aH as Dt, aF as Bt, d3 as Ae, d4 as Ot, cZ as zt, am as Wt, a as qt, ah as Vt, G as Ut, l as Qt, aQ as Gt, ad as Ft, aP as Kt } from "./index-D4dy8yHF.js";
|
|
2
|
+
import { e as Zt, d as Ht, g as Yt, f as Xt, A as Jt, i as ea, Q as sa, u as ta, a as aa, S as na } from "./useWorkbenchSession-kwuVHEAF.js";
|
|
3
|
+
import { D as Ts } from "./index-DkJpASom.js";
|
|
4
|
+
import { Divider as ia } from "./index-q34Z4QAw.js";
|
|
5
5
|
var oa = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "defs", attrs: {}, children: [{ tag: "style", attrs: {} }] }, { tag: "path", attrs: { d: "M952 474H829.8C812.5 327.6 696.4 211.5 550 194.2V72c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v122.2C327.6 211.5 211.5 327.6 194.2 474H72c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h122.2C211.5 696.4 327.6 812.5 474 829.8V952c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V829.8C696.4 812.5 812.5 696.4 829.8 550H952c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zM512 756c-134.8 0-244-109.2-244-244s109.2-244 244-244 244 109.2 244 244-109.2 244-244 244z" } }, { tag: "path", attrs: { d: "M512 392c-32.1 0-62.1 12.4-84.8 35.2-22.7 22.7-35.2 52.7-35.2 84.8s12.5 62.1 35.2 84.8C449.9 619.4 480 632 512 632s62.1-12.5 84.8-35.2C619.4 574.1 632 544 632 512s-12.5-62.1-35.2-84.8A118.57 118.57 0 00512 392z" } }] }, name: "aim", theme: "outlined" };
|
|
6
6
|
function ns() {
|
|
7
7
|
return ns = Object.assign ? Object.assign.bind() : function(n) {
|