@digiwin-aimk/agent-market 0.1.1 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +96 -96
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var a=document.createElement("style");a.appendChild(document.createTextNode(".aimk-detail{box-sizing:border-box;max-width:1328px;min-height:100%;padding:0 var(--comp-padding-lr-8) var(--comp-padding-tb-10);background:var(--bg-1);color:var(--text-1);font-family:var(--font-family-base);font-size:var(--font-4);line-height:var(--line-height-5)}.aimk-detail__nav{display:flex;align-items:center;gap:var(--comp-margin-4);margin:0 calc(var(--comp-padding-lr-8) * -1) var(--comp-margin-6);padding:var(--comp-padding-tb-8) var(--comp-padding-lr-8);background:var(--bg-3);color:var(--text-4);font-size:var(--font-4)}.aimk-detail__nav .is-current{color:var(--text-1)}.aimk-detail__nav button{display:inline-flex;align-items:center;gap:var(--comp-margin-3);padding:0;border:var(--border-none);background:transparent;color:var(--text-4);font-size:var(--font-4);cursor:pointer}.aimk-detail__nav img{width:13px;height:11px}.aimk-detail__card{border-radius:var(--border-radius-3);background:var(--bg-2)}.aimk-detail__hero{display:flex;align-items:center;justify-content:space-between;gap:var(--comp-margin-8);box-sizing:border-box;min-height:var(--size-16);background:transparent}.aimk-detail__identity{display:flex;align-items:center;gap:var(--comp-margin-6);flex:1 1 280px;min-width:280px}.aimk-detail__identity img{flex:none;width:var(--size-15);height:var(--size-15)}.aimk-detail__title{display:flex;align-items:center;gap:var(--comp-margin-4)}.aimk-detail__title h1{margin:0;font-size:var(--font-5);font-weight:var(--font-weight-3);line-height:var(--line-height-5);white-space:nowrap}.aimk-detail__title span{display:inline-flex;align-items:center;box-sizing:border-box;padding:var(--comp-padding-tb-2) var(--comp-padding-lr-4);border-radius:var(--border-radius-2);background:var(--color-border-1);color:var(--text-3);font-size:var(--font-3);line-height:var(--line-height-3);white-space:nowrap}.aimk-detail__title .is-model{background:var(--blue-1);color:var(--blue-6)}.aimk-detail__title .is-industry{background:var(--cyan-1);color:var(--cyan-6)}.aimk-detail__identity p{display:flex;align-items:center;gap:var(--comp-margin-4);margin:var(--comp-margin-2) 0 0;color:var(--text-2);font-size:var(--font-3)}.aimk-detail__sep{flex:none;width:var(--border-1);height:var(--size-6);background:var(--color-border-3)}.aimk-detail__count{display:inline-flex;align-items:center;gap:var(--comp-margin-3);color:var(--text-2);font-weight:var(--font-weight-1)}.aimk-detail__count b,.aimk-detail__count span{font-weight:var(--font-weight-1)}.aimk-detail__count span{color:var(--text-3)}.aimk-detail__stars{display:inline-flex;gap:var(--comp-margin-2);color:var(--yellow-6)}.aimk-detail__stars svg{width:var(--size-6);height:var(--size-6)}.aimk-detail__score{color:var(--yellow-6);font-weight:var(--font-weight-1)}.aimk-detail__actions{display:flex;flex:none;gap:var(--comp-margin-4)}.aimk-detail__actions button{height:var(--size-10);padding:0 var(--comp-padding-lr-5);border:var(--border-1) solid var(--color-border-2);border-radius:var(--border-radius-2);background:var(--bg-2);color:var(--text-1);font-size:var(--font-4);cursor:pointer}.aimk-detail__actions .is-primary{border-color:var(--blue-6);background:var(--blue-6);color:var(--text-white)}.aimk-detail__layout{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:var(--comp-margin-6);align-items:start;margin-top:var(--comp-margin-7)}.aimk-detail__main,.aimk-detail__side{display:flex;flex-direction:column;gap:var(--comp-margin-6);min-width:0}.aimk-detail__template{display:block;width:100%;padding:var(--comp-padding-tb-8) var(--comp-padding-lr-6);border-radius:var(--border-radius-3);background:var(--bg-2);box-sizing:border-box;color:var(--text-1)}.aimk-detail__template img,.aimk-detail__template video,.aimk-detail__template iframe{width:100%;height:auto}.aimk-detail__card{box-sizing:border-box;padding:var(--comp-padding-tb-8) var(--comp-padding-lr-6);border-radius:var(--border-radius-3);background:var(--bg-2)}@media(max-width:960px){.aimk-detail__layout{grid-template-columns:1fr}.aimk-detail__hero{height:auto;min-height:var(--size-16);flex-wrap:wrap}.aimk-detail__title{flex-wrap:wrap}}.aimk-detail__card{padding:var(--comp-padding-tb-8) var(--comp-padding-lr-6)}.aimk-detail__side>.aimk-detail__card{padding:var(--comp-padding-tb-8) var(--comp-padding-lr-6) var(--comp-padding-tb-9)}.aimk-detail__side>.aimk-detail__card:last-child>:not(.aimk-detail__heading){margin-left:0}.aimk-detail__heading{display:flex;align-items:center;gap:var(--comp-margin-4);margin:0 0 var(--comp-margin-6);font-size:var(--font-4);font-weight:var(--font-weight-3);line-height:var(--line-height-4)}.aimk-detail__heading i{width:var(--border-3);height:var(--font-4);border-radius:var(--border-radius-1);background:var(--primary-6)}.aimk-detail__card>:not(.aimk-detail__heading){margin-left:calc(var(--border-3) + var(--comp-margin-4))}.aimk-detail__note{display:flex;align-items:flex-start;gap:var(--comp-margin-4);margin:0;padding:var(--comp-padding-tb-6) var(--comp-padding-lr-6);border-radius:var(--border-radius-3);background:var(--eios-blue-1);color:var(--text-1);font-size:var(--font-4);line-height:var(--line-height-4)}.aimk-detail__note img{flex:none;width:var(--size-8);height:var(--size-8)}.aimk-detail__provider{display:flex;flex-direction:column;align-items:center;gap:var(--comp-margin-4);text-align:center}.aimk-detail__logo{width:var(--size-13);height:auto}.aimk-detail__provider b{font-size:var(--font-5);font-weight:var(--font-weight-3);line-height:var(--line-height-5)}.aimk-detail__cert{display:inline-flex;align-items:center;gap:var(--comp-margin-3);padding:var(--comp-padding-tb-2) var(--comp-padding-lr-3);border-radius:var(--border-radius-2);background:var(--success-1);color:var(--success-6);font-size:var(--font-3);line-height:var(--line-height-3)}.aimk-detail__cert svg{width:var(--size-6);height:var(--size-6);fill:currentColor}.aimk-detail__card>.aimk-detail__provider-desc{margin:var(--comp-margin-6) 0 0;padding-top:var(--comp-margin-6);border-top:var(--border-1) dashed var(--color-border-4);font-size:var(--font-3);line-height:var(--line-height-3);color:var(--text-3)}.aimk-index{box-sizing:border-box;min-height:100%;padding:0 var(--comp-padding-lr-8) var(--comp-padding-tb-10);background:var(--bg-1);color:var(--text-1);font-family:var(--font-family-base);font-size:var(--font-3);line-height:var(--line-height-3);max-width:1328px}.aimk-index__headline{display:flex;align-items:baseline;gap:var(--comp-margin-4);margin:0 calc(var(--comp-padding-lr-8) * -1);padding:14px var(--comp-padding-lr-8);background:var(--bg-3)}.aimk-index__headline h1{margin:0;font-size:var(--font-6);font-weight:var(--font-weight-3);line-height:var(--line-height-6)}.aimk-index__headline p{margin:0;color:var(--text-4);font-size:var(--font-3);line-height:var(--line-height-3)}.aimk-block__bar,.aimk-result__bar{display:flex;align-items:center;justify-content:space-between}.aimk-block__bar h2{padding:var(--comp-padding-tb-8) 0;display:flex;align-items:center;gap:var(--comp-margin-4);margin:0;font-size:var(--font-5);font-weight:var(--font-weight-3)}.aimk-pager{display:flex;gap:var(--comp-margin-4)}.aimk-pager button{width:var(--size-10);height:var(--size-10);border:var(--border-1) solid var(--color-border-1);border-radius:var(--border-radius-2);background:var(--bg-2);color:var(--text-3);cursor:pointer}.aimk-pager button:disabled{color:var(--text-5);cursor:default}.aimk-carousel{overflow:hidden;container-type:inline-size;padding:var(--border-1) 0}.aimk-carousel__track{display:flex;gap:var(--comp-margin-6);transition:transform .25s ease}.aimk-carousel .aimk-card{flex:0 0 calc((100cqw - 3 * var(--comp-margin-6)) / 4);width:calc((100cqw - 3 * var(--comp-margin-6)) / 4);max-width:calc((100cqw - 3 * var(--comp-margin-6)) / 4)}.aimk-card{height:168px;position:relative;box-sizing:border-box;min-width:0;padding:var(--comp-padding-tb-8);border-radius:var(--border-radius-4);gap:var(--size-5);cursor:pointer;background:var(--bg-3)}.aimk-carousel .aimk-card{background:linear-gradient(180deg,var(--blue-1) 0%,transparent 40%),var(--bg-3)}.aimk-card:hover{box-shadow:inset 0 0 0 var(--border-1) var(--blue-5),0 5px 12px 4px #07117914}.aimk-card__hot{position:absolute;top:0;right:0;display:block;width:62px;height:24px}.aimk-card__hot img{display:block;width:62px;height:24px}.aimk-card__main{display:flex;gap:var(--comp-margin-5)}.aimk-card.has-hot .aimk-card__main{padding-right:calc(62px + var(--size-6) - var(--comp-padding-tb-8))}.aimk-card__thumb{flex:none;width:var(--size-15);height:var(--size-15)}.aimk-card__thumb img{display:block;width:var(--size-15);height:var(--size-15)}.aimk-card__name{margin:var(--comp-margin-3) 0 0;font-size:var(--font-4);font-weight:var(--font-weight-3);line-height:var(--line-height-4);color:var(--text-1)}.aimk-card__supplier,.aimk-card__desc{margin:var(--comp-margin-3) 0 0;color:var(--text-3);font-size:var(--font-3);line-height:var(--line-height-3)}.aimk-card__desc{margin:0;display:-webkit-box;padding:var(--comp-padding-tb-7) 0 var(--comp-padding-tb-7);overflow:hidden;-webkit-box-orient:vertical;border-bottom:var(--border-1) dashed var(--color-border-2)}.aimk-card__tags{display:flex;flex-wrap:wrap;gap:var(--comp-margin-4);margin-top:var(--comp-margin-5)}.aimk-tag{padding:var(--comp-padding-tb-2) var(--comp-padding-lr-4);border-radius:var(--border-radius-2);font-size:var(--font-3);line-height:var(--line-height-3)}.aimk-tag.is-expert{background:var(--primary-1);color:var(--blue-6)}.aimk-tag.is-industry{background:var(--cyan-1);color:var(--cyan-6)}[data-theme=dark] .aimk-tag.is-industry{background:#3fd4cf33}.aimk-tag.is-other{background:var(--fill-1);color:var(--text-2)}[data-theme=dark] .aimk-tag.is-other{background:var(--fill-3)}.aimk-filter__tools{display:flex;align-items:center}.aimk-search{display:flex;align-items:center;gap:var(--comp-margin-4);width:200px;height:var(--size-10);padding:0 var(--comp-padding-lr-5);border:var(--border-1) solid var(--color-border-2);border-radius:var(--border-radius-2);background:var(--bg-2);color:var(--text-4)}.aimk-search svg{flex:none;width:14px;height:14px}.aimk-search input{width:100%;border:var(--border-none);outline:none;background:transparent;color:var(--text-1);font-size:var(--font-4)}.aimk-search input::placeholder{color:var(--text-4)}.aimk-collapse{display:inline-flex;align-items:center;gap:var(--comp-margin-3);border:var(--border-none);background:transparent;color:var(--text-3);font-size:var(--font-4);cursor:pointer}.aimk-collapse span{display:inline-flex;align-items:center;justify-content:center;width:var(--size-6);height:var(--size-6);transform:rotate(180deg);transform-origin:center}.aimk-collapse span.is-open{transform:none}.aimk-collapse span svg{display:block;width:var(--size-6);height:var(--size-6)}.aimk-filter{display:flex;flex-direction:column;gap:var(--size-7);padding:var(--comp-padding-tb-8) 0}.aimk-filter__row{display:flex;align-items:flex-start;gap:var(--comp-margin-8)}.aimk-filter__row>span{flex:none;padding-top:var(--comp-padding-tb-3);color:var(--text-3)}.aimk-filter__row>div{display:flex;flex-wrap:wrap;gap:var(--comp-margin-3) var(--comp-margin-4)}.aimk-filter__row button,.aimk-sort button{border:var(--border-none);border-radius:var(--border-radius-3);background:transparent;color:var(--text-1);font-size:var(--font-3);line-height:var(--line-height-3);cursor:pointer}.aimk-filter__row button{padding:var(--comp-padding-tb-3) var(--size-6)}.aimk-filter__row button.is-active{background:var(--primary-1);color:var(--blue-6)}.aimk-filter-card{margin-top:var(--comp-margin-10);padding:var(--comp-padding-tb-8) var(--comp-padding-lr-6);border-radius:var(--border-radius-3);background:var(--bg-2)}.aimk-filter-card .aimk-block__bar h2{padding:0}.aimk-filter-card .aimk-block__bar+.aimk-selected{margin-top:var(--comp-margin-6)}.aimk-selected{display:flex;align-items:center;gap:var(--comp-margin-9);padding-top:var(--comp-margin-5);border-top:var(--border-1) solid var(--color-border-1)}.aimk-selected>span{flex:none;color:var(--text-3)}.aimk-selected>div{display:flex;flex-wrap:wrap;gap:var(--comp-margin-4)}.aimk-chip{display:inline-flex;align-items:center;gap:var(--comp-margin-3);height:var(--size-10);padding:0 var(--comp-padding-lr-5);border:var(--border-none);border-radius:var(--border-radius-3);background:var(--fill-1);color:var(--text-1);font-size:var(--font-3);line-height:var(--line-height-3);cursor:pointer}[data-theme=dark] .aimk-chip{background:var(--fill-3)}.aimk-selected__clear{display:inline-flex;align-items:center;gap:var(--comp-margin-3);margin-left:auto;border:var(--border-none);background:transparent;color:var(--blue-6);font-size:var(--font-3);line-height:var(--line-height-3);cursor:pointer}.aimk-selected__clear img{width:var(--size-7);height:var(--size-7)}.aimk-result__bar{margin:var(--comp-margin-4) 0 var(--comp-margin-5)}.aimk-result__bar p{margin:0;color:var(--text-3)}.aimk-sort{display:flex;padding:var(--comp-padding-tb-2);border-radius:6px;background:var(--fill-2)}.aimk-sort button{padding:var(--comp-padding-tb-2) var(--comp-padding-lr-5)}.aimk-sort button.is-active{border-radius:var(--border-radius-3);background:var(--bg-2);color:var(--text-1);box-shadow:var(--shadow-4)}.aimk-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--comp-margin-6)}")),document.head.appendChild(a)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
2
|
import { jsx as r, jsxs as n, Fragment as V } from "react/jsx-runtime";
|
|
3
|
-
import { createContext as
|
|
4
|
-
import { injectThemeCSSVariables as Z, darkTheme as
|
|
5
|
-
import
|
|
3
|
+
import { createContext as le, useContext as oe, useMemo as L, useRef as q, useState as g, useEffect as k, useCallback as se } from "react";
|
|
4
|
+
import { injectThemeCSSVariables as Z, darkTheme as ce, defaultTheme as de } from "@webdpt-react/design-theme-token";
|
|
5
|
+
import he from "axios";
|
|
6
6
|
import { Spin as O } from "antd";
|
|
7
|
-
import
|
|
8
|
-
import { createRoot as
|
|
9
|
-
const
|
|
7
|
+
import ge from "dompurify";
|
|
8
|
+
import { createRoot as me } from "react-dom/client";
|
|
9
|
+
const Ae = {
|
|
10
10
|
"index.title": "AI智能体市场",
|
|
11
11
|
"index.subtitle": "行业智能体场景化选型入口",
|
|
12
12
|
"carousel.title": "精选智能体",
|
|
@@ -34,7 +34,7 @@ const me = {
|
|
|
34
34
|
"detail.note": "基于 EIOSpace 雅典娜底座运行,支持上传图纸在对话框内直接调用;体验版提供免费试用额度,正式授权前往云市场采购。",
|
|
35
35
|
"detail.defaultSupplier": "鼎捷数智",
|
|
36
36
|
"detail.defaultSupplierDesc": "鼎捷数智是鼎捷软件旗下专注于企业数字化与智能化转型的业务品牌,深耕制造业四十余年,为超过 50,000 家企业提供 ERP、MES、PLM 等管理软件及 AI 智能化解决方案。"
|
|
37
|
-
},
|
|
37
|
+
}, ue = {
|
|
38
38
|
"index.title": "AI智能體市場",
|
|
39
39
|
"index.subtitle": "行業智能體場景化選型入口",
|
|
40
40
|
"carousel.title": "精選智能體",
|
|
@@ -62,7 +62,7 @@ const me = {
|
|
|
62
62
|
"detail.note": "基於 EIOSpace 雅典娜底座運行,支援上傳圖紙在對話框內直接調用;體驗版提供免費試用額度,正式授權前往雲市場採購。",
|
|
63
63
|
"detail.defaultSupplier": "鼎捷數智",
|
|
64
64
|
"detail.defaultSupplierDesc": "鼎捷數智是鼎捷軟體旗下專注於企業數位化與智能化轉型的業務品牌,深耕製造業四十餘年,為超過 50,000 家企業提供 ERP、MES、PLM 等管理軟體及 AI 智化解決方案。"
|
|
65
|
-
},
|
|
65
|
+
}, we = {
|
|
66
66
|
"index.title": "AI Agent Market",
|
|
67
67
|
"index.subtitle": "Scenario-based selection entry for industry AI agents",
|
|
68
68
|
"carousel.title": "Featured Agents",
|
|
@@ -91,27 +91,27 @@ const me = {
|
|
|
91
91
|
"detail.defaultSupplier": "Digiwin",
|
|
92
92
|
"detail.defaultSupplierDesc": "Digiwin is a business brand of Digiwin Software focused on enterprise digital and intelligent transformation. With 40+ years in manufacturing, it serves 50,000+ enterprises with ERP, MES, PLM and AI solutions."
|
|
93
93
|
}, P = {
|
|
94
|
-
"zh-CN":
|
|
95
|
-
"zh-TW":
|
|
96
|
-
"en-US":
|
|
97
|
-
}, N = "zh-CN", X =
|
|
94
|
+
"zh-CN": Ae,
|
|
95
|
+
"zh-TW": ue,
|
|
96
|
+
"en-US": we
|
|
97
|
+
}, N = "zh-CN", X = le(N);
|
|
98
98
|
function G() {
|
|
99
|
-
const e =
|
|
99
|
+
const e = oe(X);
|
|
100
100
|
return L(() => {
|
|
101
101
|
const i = P[e] ?? P[N];
|
|
102
102
|
return (t, l) => {
|
|
103
103
|
let a = i[t] ?? t;
|
|
104
104
|
if (l)
|
|
105
|
-
for (const [
|
|
106
|
-
a = a.replaceAll(`{${
|
|
105
|
+
for (const [s, m] of Object.entries(l))
|
|
106
|
+
a = a.replaceAll(`{${s}}`, String(m));
|
|
107
107
|
return a;
|
|
108
108
|
};
|
|
109
109
|
}, [e]);
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function pe({ locale: e = N, children: i }) {
|
|
112
112
|
return /* @__PURE__ */ r(X.Provider, { value: e, children: i });
|
|
113
113
|
}
|
|
114
|
-
const
|
|
114
|
+
const Ce = "/restful/standard/digiSpace/v1/isv/curl/forward";
|
|
115
115
|
let U = null;
|
|
116
116
|
function _(e) {
|
|
117
117
|
U = e;
|
|
@@ -119,19 +119,19 @@ function _(e) {
|
|
|
119
119
|
function $() {
|
|
120
120
|
return U;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function fe(e) {
|
|
123
123
|
return e.includes("/receive.html") ? e : `${e.replace(/\/+$/, "")}/receive.html`;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function xe() {
|
|
126
126
|
if (!U)
|
|
127
127
|
throw new Error("中转配置未注入:请先调用 setForwardConfig()");
|
|
128
128
|
return U;
|
|
129
129
|
}
|
|
130
|
-
const K =
|
|
130
|
+
const K = he.create({ timeout: 3e4 });
|
|
131
131
|
function H(e) {
|
|
132
132
|
return typeof e == "object" && e !== null;
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function ee(e) {
|
|
135
135
|
let i = e;
|
|
136
136
|
if (H(i) && "status" in i && "response" in i && (i = i.response), H(i) && "success" in i && "data" in i) {
|
|
137
137
|
if (i.success === !1)
|
|
@@ -142,15 +142,15 @@ function xe(e) {
|
|
|
142
142
|
return i;
|
|
143
143
|
}
|
|
144
144
|
function ke(e, i, t) {
|
|
145
|
-
const l = { "digi-middleware-auth-user": t ?? "" };
|
|
145
|
+
const l = { "digi-middleware-auth-user": t ?? "" }, a = (s) => ee(s);
|
|
146
146
|
return e.method === "GET" ? K.get(e.api, {
|
|
147
147
|
baseURL: i,
|
|
148
148
|
params: e.params ?? {},
|
|
149
149
|
headers: l
|
|
150
|
-
}).then((
|
|
150
|
+
}).then((s) => a(s.data)) : K.post(e.api, e.body ?? {}, {
|
|
151
151
|
baseURL: i,
|
|
152
152
|
headers: l
|
|
153
|
-
}).then((
|
|
153
|
+
}).then((s) => a(s.data));
|
|
154
154
|
}
|
|
155
155
|
async function Fe(e, i) {
|
|
156
156
|
const t = {
|
|
@@ -160,7 +160,7 @@ async function Fe(e, i) {
|
|
|
160
160
|
headers: e.headers ?? {},
|
|
161
161
|
method: e.method,
|
|
162
162
|
appId: i.appId
|
|
163
|
-
}, l = await K.post(
|
|
163
|
+
}, l = await K.post(Ce, t, {
|
|
164
164
|
baseURL: i.forwardBaseUrl,
|
|
165
165
|
headers: {
|
|
166
166
|
...i.token ? { token: i.token } : {},
|
|
@@ -169,10 +169,10 @@ async function Fe(e, i) {
|
|
|
169
169
|
});
|
|
170
170
|
if (l.status !== 200)
|
|
171
171
|
throw new Error(`中转接口异常:HTTP ${l.status}`);
|
|
172
|
-
return
|
|
172
|
+
return ee(l.data);
|
|
173
173
|
}
|
|
174
174
|
async function S(e) {
|
|
175
|
-
const i =
|
|
175
|
+
const i = xe();
|
|
176
176
|
if (i.mode === "direct") {
|
|
177
177
|
if (!i.directBaseUrl)
|
|
178
178
|
throw new Error("direct 模式需在 ForwardConfig 中提供 directBaseUrl");
|
|
@@ -605,8 +605,8 @@ let F = null, Y = 0;
|
|
|
605
605
|
function Oe(e) {
|
|
606
606
|
if (F && !F.closed)
|
|
607
607
|
return F;
|
|
608
|
-
const i = window.screen.width * 0.7, t = window.screen.height * 0.7, l = Math.max(0, Math.round((window.screen.width - i) / 2)), a = Math.max(0, Math.round((window.screen.height - t) / 2)),
|
|
609
|
-
return F = window.open(e, "aimkMarket",
|
|
608
|
+
const i = window.screen.width * 0.7, t = window.screen.height * 0.7, l = Math.max(0, Math.round((window.screen.width - i) / 2)), a = Math.max(0, Math.round((window.screen.height - t) / 2)), s = `width=${i},height=${t},left=${l},top=${a},menubar=no,toolbar=no,location=no,status=no`;
|
|
609
|
+
return F = window.open(e, "aimkMarket", s), Y = Date.now(), F;
|
|
610
610
|
}
|
|
611
611
|
function y(e, i) {
|
|
612
612
|
const t = $()?.marketBridgeUrl;
|
|
@@ -614,35 +614,35 @@ function y(e, i) {
|
|
|
614
614
|
console.warn("marketBridgeUrl 未配置,无法与云市场通行:请在 ForwardConfig 中配置");
|
|
615
615
|
return;
|
|
616
616
|
}
|
|
617
|
-
const l =
|
|
617
|
+
const l = fe(t), a = Oe(l);
|
|
618
618
|
if (!a) {
|
|
619
619
|
console.warn("云市场窗口打开失败:可能被浏览器弹窗拦截");
|
|
620
620
|
return;
|
|
621
621
|
}
|
|
622
|
-
const
|
|
622
|
+
const s = () => {
|
|
623
623
|
a.postMessage({ source: "aimk-sdk", type: e, payload: i }, l), a.focus();
|
|
624
624
|
};
|
|
625
|
-
|
|
625
|
+
s(), Date.now() - Y < 1500 && (setTimeout(s, 400), setTimeout(s, 1200));
|
|
626
626
|
}
|
|
627
627
|
function ye({ agent: e, onBack: i }) {
|
|
628
|
-
const t = G(), l = q(null), [a,
|
|
628
|
+
const t = G(), l = q(null), [a, s] = g(null), [m, h] = g(null), [B, p] = g(""), [E, v] = g(!0);
|
|
629
629
|
k(() => {
|
|
630
|
-
let
|
|
630
|
+
let d = !1;
|
|
631
631
|
return Ge(e.code).then((u) => {
|
|
632
|
-
|
|
632
|
+
d || (s(u), p(ge.sanitize(u.detailDescription ?? "")));
|
|
633
633
|
}).catch((u) => {
|
|
634
634
|
console.error("加载智能体详情失败:", u);
|
|
635
635
|
}).finally(() => {
|
|
636
|
-
|
|
636
|
+
d || v(!1);
|
|
637
637
|
}), e.servicerId && De(e.servicerId).then((u) => {
|
|
638
|
-
|
|
638
|
+
d || h(u);
|
|
639
639
|
}).catch((u) => {
|
|
640
640
|
console.error("加载服务商信息失败:", u);
|
|
641
641
|
}), () => {
|
|
642
|
-
|
|
642
|
+
d = !0;
|
|
643
643
|
};
|
|
644
644
|
}, [e.code, e.servicerId]);
|
|
645
|
-
const
|
|
645
|
+
const c = () => ({
|
|
646
646
|
code: e.code,
|
|
647
647
|
itemId: a?.itemId,
|
|
648
648
|
name: a?.displayName ?? e.name,
|
|
@@ -651,47 +651,47 @@ function ye({ agent: e, onBack: i }) {
|
|
|
651
651
|
}), C = () => y("navigate", {
|
|
652
652
|
url: `/agent/detail?code=${e.code}`,
|
|
653
653
|
mode: "self",
|
|
654
|
-
...
|
|
654
|
+
...c(),
|
|
655
655
|
actions: [{
|
|
656
656
|
type: "buy"
|
|
657
657
|
}]
|
|
658
658
|
}), A = () => y("navigate", {
|
|
659
659
|
url: `/agent/detail?code=${e.code}`,
|
|
660
660
|
mode: "self",
|
|
661
|
-
...
|
|
661
|
+
...c(),
|
|
662
662
|
actions: [{
|
|
663
663
|
type: "consult"
|
|
664
664
|
}]
|
|
665
665
|
}), x = () => y("navigate", {
|
|
666
666
|
url: `/agent/detail?code=${e.code}`,
|
|
667
667
|
mode: "self",
|
|
668
|
-
...
|
|
668
|
+
...c(),
|
|
669
669
|
actions: [{
|
|
670
670
|
type: "trial"
|
|
671
671
|
}]
|
|
672
672
|
});
|
|
673
673
|
return k(() => {
|
|
674
|
-
const
|
|
674
|
+
const d = () => {
|
|
675
675
|
F?.close(), F = null, Y = 0;
|
|
676
676
|
};
|
|
677
|
-
return window.addEventListener("pagehide",
|
|
678
|
-
window.removeEventListener("pagehide",
|
|
677
|
+
return window.addEventListener("pagehide", d), () => {
|
|
678
|
+
window.removeEventListener("pagehide", d), d();
|
|
679
679
|
};
|
|
680
680
|
}, []), k(() => {
|
|
681
|
-
const
|
|
682
|
-
if (!
|
|
681
|
+
const d = l.current;
|
|
682
|
+
if (!d) return;
|
|
683
683
|
const u = () => {
|
|
684
|
-
const M =
|
|
684
|
+
const M = d.contentDocument?.documentElement;
|
|
685
685
|
if (!M) return;
|
|
686
686
|
const D = document.documentElement.getAttribute("data-theme") === "dark";
|
|
687
|
-
Z(D ?
|
|
688
|
-
|
|
687
|
+
Z(D ? ce : de, M), requestAnimationFrame(() => {
|
|
688
|
+
d.style.height = `${M.scrollHeight}px`;
|
|
689
689
|
});
|
|
690
690
|
};
|
|
691
|
-
|
|
691
|
+
d.addEventListener("load", u), d.srcdoc = Se;
|
|
692
692
|
const I = new MutationObserver(u);
|
|
693
693
|
return I.observe(document.documentElement, { attributes: !0, attributeFilter: ["data-theme"] }), () => {
|
|
694
|
-
|
|
694
|
+
d.removeEventListener("load", u), I.disconnect();
|
|
695
695
|
};
|
|
696
696
|
}, []), /* @__PURE__ */ n("section", { className: "aimk-detail", children: [
|
|
697
697
|
/* @__PURE__ */ n("div", { className: "aimk-detail__nav", children: [
|
|
@@ -712,7 +712,7 @@ function ye({ agent: e, onBack: i }) {
|
|
|
712
712
|
/* @__PURE__ */ n("div", { children: [
|
|
713
713
|
/* @__PURE__ */ n("div", { className: "aimk-detail__title", children: [
|
|
714
714
|
/* @__PURE__ */ r("h1", { children: e.name }),
|
|
715
|
-
e.tags.map((
|
|
715
|
+
e.tags.map((d) => /* @__PURE__ */ r("span", { className: `is-${d.tone}`, children: d.label }, d.label))
|
|
716
716
|
] }),
|
|
717
717
|
/* @__PURE__ */ r("p", { children: /* @__PURE__ */ r("span", { children: e.supplier }) })
|
|
718
718
|
] })
|
|
@@ -773,7 +773,7 @@ function Ne({ agent: e }) {
|
|
|
773
773
|
function Te() {
|
|
774
774
|
return /* @__PURE__ */ r("span", { className: "aimk-card__hot", children: /* @__PURE__ */ r("img", { src: Ke, alt: "Hot" }) });
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function re({ agent: e, selected: i, onSelect: t, showHot: l }) {
|
|
777
777
|
const a = !!(l && e.hot);
|
|
778
778
|
return /* @__PURE__ */ n(
|
|
779
779
|
"article",
|
|
@@ -791,38 +791,38 @@ function ee({ agent: e, selected: i, onSelect: t, showHot: l }) {
|
|
|
791
791
|
] })
|
|
792
792
|
] }),
|
|
793
793
|
/* @__PURE__ */ r("p", { className: "aimk-card__desc", children: e.description }),
|
|
794
|
-
/* @__PURE__ */ r("div", { className: "aimk-card__tags", children: e.tags.map((
|
|
794
|
+
/* @__PURE__ */ r("div", { className: "aimk-card__tags", children: e.tags.map((s) => /* @__PURE__ */ r("span", { className: `aimk-tag is-${s.tone}`, children: s.label }, s.label)) })
|
|
795
795
|
]
|
|
796
796
|
}
|
|
797
797
|
);
|
|
798
798
|
}
|
|
799
799
|
const Ye = 4;
|
|
800
800
|
function Re({ agents: e, loading: i, onSelectAgent: t }) {
|
|
801
|
-
const [l, a] = g(0),
|
|
801
|
+
const [l, a] = g(0), s = G(), m = Math.max(e.length - Ye, 0);
|
|
802
802
|
return /* @__PURE__ */ n("section", { className: "aimk-block", children: [
|
|
803
803
|
/* @__PURE__ */ n("div", { className: "aimk-block__bar", children: [
|
|
804
|
-
/* @__PURE__ */ r("h2", { children:
|
|
804
|
+
/* @__PURE__ */ r("h2", { children: s("carousel.title") }),
|
|
805
805
|
/* @__PURE__ */ n("div", { className: "aimk-pager", children: [
|
|
806
|
-
/* @__PURE__ */ r("button", { type: "button", "aria-label":
|
|
807
|
-
/* @__PURE__ */ r("button", { type: "button", "aria-label":
|
|
806
|
+
/* @__PURE__ */ r("button", { type: "button", "aria-label": s("carousel.prev"), disabled: l === 0, onClick: () => a((h) => Math.max(h - 1, 0)), children: "‹" }),
|
|
807
|
+
/* @__PURE__ */ r("button", { type: "button", "aria-label": s("carousel.next"), disabled: l >= m, onClick: () => a((h) => Math.min(h + 1, m)), children: "›" })
|
|
808
808
|
] })
|
|
809
809
|
] }),
|
|
810
|
-
/* @__PURE__ */ r(O, { spinning: !!i, children: /* @__PURE__ */ r("div", { className: "aimk-carousel", children: /* @__PURE__ */ r("div", { className: "aimk-carousel__track", style: { transform: `translateX(calc(${l} * (100cqw - 3 * var(--comp-margin-6)) / -4 - ${l} * var(--comp-margin-6)))` }, children: e.map((h) => /* @__PURE__ */ r(
|
|
810
|
+
/* @__PURE__ */ r(O, { spinning: !!i, children: /* @__PURE__ */ r("div", { className: "aimk-carousel", children: /* @__PURE__ */ r("div", { className: "aimk-carousel__track", style: { transform: `translateX(calc(${l} * (100cqw - 3 * var(--comp-margin-6)) / -4 - ${l} * var(--comp-margin-6)))` }, children: e.map((h) => /* @__PURE__ */ r(re, { agent: h, showHot: !0, onSelect: () => t(h) }, h.id)) }) }) })
|
|
811
811
|
] });
|
|
812
812
|
}
|
|
813
813
|
function R(e) {
|
|
814
814
|
return e.children.flatMap((i) => [i, ...R(i)]);
|
|
815
815
|
}
|
|
816
816
|
const We = "data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20fill='none'%20version='1.1'%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%3e%3cpath%20d='M9.84995265685425,3L9.84995265685425,4.5L11.779218156854249,4.5Q12.263451056854247,4.5,12.656283056854248,4.783136799999999Q13.049114056854249,5.066273499999999,13.202243056854249,5.525658099999999L13.754946056854248,7.1837726Q13.916831056854248,7.6694202,13.617507056854247,8.084710099999999Q13.425229056854247,8.351481,13.145227056854248,8.4468856Q13.249978056854248,9.0483055,13.249978056854248,10Q13.249978056854248,11.5906668,12.468142056854248,13.675562C12.394960056854249,13.870713,12.208400056854249,14,11.999977556854247,14L2.999976636854248,14C2.940020676854248,14,2.880553426854248,13.989217,2.824414906854248,13.968164C2.565854726854248,13.871204,2.4348519768542483,13.582998,2.531812046854248,13.324438Q3.249976656854248,11.4093332,3.249976656854248,10Q3.249976656854248,8.9810348,3.142760336854248,8.4989505Q2.666724536854248,8.4791241,2.3824474468542483,8.084710600000001Q2.083123476854248,7.6694212,2.245006292854248,7.1837726L2.797710836854248,5.5256586Q2.950839166854248,5.066273499999999,3.343670556854248,4.783136799999999Q3.736501856854248,4.500000200000001,4.220736256854249,4.5000005000000005L5.999976656854248,4.5L5.999976656854248,3.0000001000000003Q5.999976656854248,2.58578652,6.292869556854248,2.29289329Q6.585762956854248,2,6.999977156854248,2L8.849952256854248,2Q9.264165856854248,2,9.557058856854248,2.29289317Q9.84995265685425,2.585787,9.84995265685425,3ZM3.499976656854248,7.5L12.806265056854247,7.5L12.253560056854248,5.8418865Q12.139597456854249,5.5,11.779218156854249,5.5L9.84995265685425,5.5Q9.43573905685425,5.5,9.142846156854247,5.2071068Q8.849952256854248,4.9142129,8.849952256854248,4.5L8.849952256854248,3L6.999977156854248,3L6.999977156854248,4.5Q6.999977156854248,4.9142139,6.707083656854248,5.2071071Q6.414189856854248,5.5,5.999976656854248,5.5L4.2207355568542475,5.5000005000000005Q3.860356256854248,5.5000005000000005,3.7463941568542483,5.8418865L3.193689556854248,7.5L3.499976656854248,7.5ZM4.154163256854249,8.5Q4.249976656854248,9.089808900000001,4.249976656854248,10Q4.249976656854248,11.3278103,3.705188056854248,13L5.649583356854248,13Q5.924370256854248,12.216526,6.073575456854249,11.5202351Q6.162281556854248,11.1062737,6.206397056854248,10.723938C6.235507956854248,10.4716425,6.449132456854248,10.28125,6.703101656854248,10.28125C6.979244256854248,10.28125,7.203101656854248,10.5051079,7.203101656854248,10.78125C7.203101656854248,10.8004007,7.202001556854248,10.8195362,7.199806256854248,10.838562L7.199806256854248,10.838562Q7.150062056854248,11.2692375,7.051377756854248,11.7297649Q6.921164556854248,12.337426,6.705229256854248,13L8.649583356854247,13Q8.924370756854248,12.216525,9.073575456854247,11.5202351Q9.162281556854248,11.1062737,9.206397056854248,10.723938C9.23550795685425,10.4716425,9.449132456854247,10.28125,9.703101656854248,10.28125C9.979244256854248,10.28125,10.203101656854248,10.5051079,10.203101656854248,10.78125C10.203101656854248,10.8004007,10.202001056854249,10.8195362,10.199805756854248,10.838562L10.199805756854248,10.838562Q10.150062056854248,11.2692375,10.051377756854247,11.7297649Q9.921164556854247,12.337426,9.705229256854249,13L11.649597656854247,13Q12.249977056854249,11.2885885,12.249977056854249,10Q12.249977056854249,8.9821434,12.142993456854247,8.5L4.154163256854249,8.5Z'%20fill-rule='evenodd'%20fill='%233C60FF'%20fill-opacity='1'/%3e%3c/svg%3e";
|
|
817
|
-
function ze({ categoryTree: e, loading: i = !1, selectedKeys: t, onToggleKey: l, onClearKeys: a, keyword:
|
|
817
|
+
function ze({ categoryTree: e, loading: i = !1, selectedKeys: t, onToggleKey: l, onClearKeys: a, keyword: s, onKeywordChange: m }) {
|
|
818
818
|
const [h, B] = g(!0), p = G(), E = L(() => {
|
|
819
|
-
const
|
|
819
|
+
const c = /* @__PURE__ */ new Map(), C = (A) => {
|
|
820
820
|
A.forEach((x) => {
|
|
821
|
-
|
|
821
|
+
c.set(x.key, x.title), C(x.children);
|
|
822
822
|
});
|
|
823
823
|
};
|
|
824
|
-
return C(e),
|
|
825
|
-
}, [e]), v = t.map((
|
|
824
|
+
return C(e), c;
|
|
825
|
+
}, [e]), v = t.map((c) => ({ key: c, label: E.get(c) ?? String(c) }));
|
|
826
826
|
return /* @__PURE__ */ n("section", { className: "aimk-block aimk-filter-card", children: [
|
|
827
827
|
/* @__PURE__ */ n("div", { className: "aimk-block__bar", children: [
|
|
828
828
|
/* @__PURE__ */ r("h2", { children: p("filter.title") }),
|
|
@@ -835,22 +835,22 @@ function ze({ categoryTree: e, loading: i = !1, selectedKeys: t, onToggleKey: l,
|
|
|
835
835
|
/* @__PURE__ */ r(
|
|
836
836
|
"input",
|
|
837
837
|
{
|
|
838
|
-
value:
|
|
838
|
+
value: s,
|
|
839
839
|
placeholder: p("filter.searchPlaceholder"),
|
|
840
|
-
onChange: (
|
|
840
|
+
onChange: (c) => m(c.target.value)
|
|
841
841
|
}
|
|
842
842
|
)
|
|
843
843
|
] }),
|
|
844
|
-
/* @__PURE__ */ n("button", { type: "button", className: "aimk-collapse", onClick: () => B((
|
|
844
|
+
/* @__PURE__ */ n("button", { type: "button", className: "aimk-collapse", onClick: () => B((c) => !c), children: [
|
|
845
845
|
p(h ? "filter.collapse" : "filter.expand"),
|
|
846
846
|
/* @__PURE__ */ r("span", { className: h ? "is-open" : "", "aria-hidden": "true", children: /* @__PURE__ */ r("svg", { viewBox: "0 0 12 12", children: /* @__PURE__ */ r("path", { d: "M2.2 7.6 6 3.8l3.8 3.8", fill: "none", stroke: "currentColor", strokeWidth: "1.2", strokeLinecap: "round", strokeLinejoin: "round" }) }) })
|
|
847
847
|
] })
|
|
848
848
|
] })
|
|
849
849
|
] }),
|
|
850
|
-
h ? /* @__PURE__ */ r(O, { spinning: i, children: /* @__PURE__ */ r("div", { className: "aimk-filter", children: e.map((
|
|
851
|
-
const C = R(
|
|
850
|
+
h ? /* @__PURE__ */ r(O, { spinning: i, children: /* @__PURE__ */ r("div", { className: "aimk-filter", children: e.map((c) => {
|
|
851
|
+
const C = R(c);
|
|
852
852
|
return /* @__PURE__ */ n("div", { className: "aimk-filter__row", children: [
|
|
853
|
-
/* @__PURE__ */ r("span", { children:
|
|
853
|
+
/* @__PURE__ */ r("span", { children: c.title }),
|
|
854
854
|
/* @__PURE__ */ n("div", { children: [
|
|
855
855
|
/* @__PURE__ */ r(
|
|
856
856
|
"button",
|
|
@@ -872,14 +872,14 @@ function ze({ categoryTree: e, loading: i = !1, selectedKeys: t, onToggleKey: l,
|
|
|
872
872
|
A.key
|
|
873
873
|
))
|
|
874
874
|
] })
|
|
875
|
-
] },
|
|
875
|
+
] }, c.key);
|
|
876
876
|
}) }) }) : null,
|
|
877
877
|
v.length > 0 ? /* @__PURE__ */ n("div", { className: "aimk-selected", children: [
|
|
878
878
|
/* @__PURE__ */ r("span", { children: p("filter.selectedLabel") }),
|
|
879
|
-
/* @__PURE__ */ r("div", { children: v.map((
|
|
880
|
-
|
|
879
|
+
/* @__PURE__ */ r("div", { children: v.map((c) => /* @__PURE__ */ n("button", { type: "button", className: "aimk-chip", onClick: () => l(c.key), children: [
|
|
880
|
+
c.label,
|
|
881
881
|
/* @__PURE__ */ r("span", { "aria-hidden": "true", children: "×" })
|
|
882
|
-
] },
|
|
882
|
+
] }, c.key)) }),
|
|
883
883
|
/* @__PURE__ */ n("button", { type: "button", className: "aimk-selected__clear", onClick: () => a(t), children: [
|
|
884
884
|
/* @__PURE__ */ r("img", { src: We, alt: "" }),
|
|
885
885
|
p("filter.clear")
|
|
@@ -900,7 +900,7 @@ function Ve({ total: e, sortKey: i, onSortChange: t }) {
|
|
|
900
900
|
] });
|
|
901
901
|
}
|
|
902
902
|
function Pe({ onSelectAgent: e }) {
|
|
903
|
-
const i = G(), [t, l] = g([]), [a,
|
|
903
|
+
const i = G(), [t, l] = g([]), [a, s] = g(!0), [m, h] = g([]), [B, p] = g(!0), [E, v] = g(0), [c, C] = g([]), [A, x] = g(!0), [d, u] = g([]), [I, M] = g(""), [D, ie] = g(""), [j, te] = g("default");
|
|
904
904
|
k(() => {
|
|
905
905
|
let o = !1;
|
|
906
906
|
return je().then((w) => {
|
|
@@ -918,18 +918,18 @@ function Pe({ onSelectAgent: e }) {
|
|
|
918
918
|
}).catch((o) => {
|
|
919
919
|
console.error(o?.response?.data?.errorMessage ?? o?.message ?? o);
|
|
920
920
|
}).finally(() => {
|
|
921
|
-
|
|
921
|
+
s(!1);
|
|
922
922
|
});
|
|
923
923
|
}, []);
|
|
924
924
|
const b = L(
|
|
925
|
-
() => new Set(
|
|
926
|
-
[
|
|
927
|
-
), W = L(() =>
|
|
925
|
+
() => new Set(c.filter((o) => o.id === "industry").flatMap((o) => R(o).map((w) => w.key))),
|
|
926
|
+
[c]
|
|
927
|
+
), W = L(() => d.filter((o) => b.has(o)), [d, b]), z = L(() => d.filter((o) => !b.has(o)), [d, b]);
|
|
928
928
|
k(() => {
|
|
929
|
-
const o = window.setTimeout(() =>
|
|
929
|
+
const o = window.setTimeout(() => ie(I.trim()), 300);
|
|
930
930
|
return () => window.clearTimeout(o);
|
|
931
931
|
}, [I]);
|
|
932
|
-
const Q = q(0), J =
|
|
932
|
+
const Q = q(0), J = se(() => {
|
|
933
933
|
p(!0);
|
|
934
934
|
const o = Q.current + 1;
|
|
935
935
|
Q.current = o, (j === "hot" ? Me() : Ee({
|
|
@@ -948,9 +948,9 @@ function Pe({ onSelectAgent: e }) {
|
|
|
948
948
|
k(() => {
|
|
949
949
|
J();
|
|
950
950
|
}, [J]);
|
|
951
|
-
const
|
|
951
|
+
const ne = (o) => {
|
|
952
952
|
u((w) => w.includes(o) ? w.filter((f) => f !== o) : [...w, o]);
|
|
953
|
-
},
|
|
953
|
+
}, ae = (o) => {
|
|
954
954
|
u((w) => w.filter((f) => !o.includes(f)));
|
|
955
955
|
};
|
|
956
956
|
return /* @__PURE__ */ n("section", { className: "aimk-index", children: [
|
|
@@ -969,18 +969,18 @@ function Pe({ onSelectAgent: e }) {
|
|
|
969
969
|
/* @__PURE__ */ r(
|
|
970
970
|
ze,
|
|
971
971
|
{
|
|
972
|
-
categoryTree:
|
|
972
|
+
categoryTree: c,
|
|
973
973
|
loading: A,
|
|
974
|
-
selectedKeys:
|
|
975
|
-
onToggleKey:
|
|
976
|
-
onClearKeys:
|
|
974
|
+
selectedKeys: d,
|
|
975
|
+
onToggleKey: ne,
|
|
976
|
+
onClearKeys: ae,
|
|
977
977
|
keyword: I,
|
|
978
978
|
onKeywordChange: M
|
|
979
979
|
}
|
|
980
980
|
),
|
|
981
981
|
/* @__PURE__ */ n(O, { spinning: B, children: [
|
|
982
|
-
/* @__PURE__ */ r(Ve, { total: E, sortKey: j, onSortChange:
|
|
983
|
-
/* @__PURE__ */ r("div", { className: "aimk-grid", children: m.map((o) => /* @__PURE__ */ r(
|
|
982
|
+
/* @__PURE__ */ r(Ve, { total: E, sortKey: j, onSortChange: te }),
|
|
983
|
+
/* @__PURE__ */ r("div", { className: "aimk-grid", children: m.map((o) => /* @__PURE__ */ r(re, { agent: o, onSelect: () => e(o) }, o.id)) })
|
|
984
984
|
] })
|
|
985
985
|
] });
|
|
986
986
|
}
|
|
@@ -988,14 +988,14 @@ function He() {
|
|
|
988
988
|
document.documentElement.style.getPropertyValue("--primary-6") || Z();
|
|
989
989
|
}
|
|
990
990
|
function qe({ forwardConfig: e, locale: i, initialAgent: t = null, onSelectAgent: l }) {
|
|
991
|
-
const [a,
|
|
991
|
+
const [a, s] = g(t);
|
|
992
992
|
e && _(e), k(() => {
|
|
993
993
|
He();
|
|
994
994
|
}, []);
|
|
995
|
-
const m = a ? /* @__PURE__ */ r(ye, { agent: a, onBack: () =>
|
|
996
|
-
l?.(h),
|
|
995
|
+
const m = a ? /* @__PURE__ */ r(ye, { agent: a, onBack: () => s(null) }, a.code) : /* @__PURE__ */ r(Pe, { onSelectAgent: (h) => {
|
|
996
|
+
l?.(h), s(h);
|
|
997
997
|
} });
|
|
998
|
-
return /* @__PURE__ */ r(
|
|
998
|
+
return /* @__PURE__ */ r(pe, { locale: i, children: m });
|
|
999
999
|
}
|
|
1000
1000
|
class tr {
|
|
1001
1001
|
options;
|
|
@@ -1015,7 +1015,7 @@ class tr {
|
|
|
1015
1015
|
/** 挂载渲染;重复调用为幂等重渲染(配置注入 + render) */
|
|
1016
1016
|
mount() {
|
|
1017
1017
|
const { forwardConfig: i } = this.options;
|
|
1018
|
-
return i && _(i), this.root || (this.root =
|
|
1018
|
+
return i && _(i), this.root || (this.root = me(this.container)), this.root.render(
|
|
1019
1019
|
/* @__PURE__ */ r(
|
|
1020
1020
|
qe,
|
|
1021
1021
|
{
|
|
@@ -1039,7 +1039,7 @@ class tr {
|
|
|
1039
1039
|
export {
|
|
1040
1040
|
ye as AimkDetail,
|
|
1041
1041
|
Pe as AimkIndex,
|
|
1042
|
-
|
|
1042
|
+
pe as AimkLocaleProvider,
|
|
1043
1043
|
tr as AimkSDK,
|
|
1044
1044
|
qe as default,
|
|
1045
1045
|
$ as getForwardConfig,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@digiwin-aimk/agent-market",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "AIMK 智能体市场 SDK:智能体列表 + 详情视图,可嵌入任意 React 宿主应用",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@webdpt-react/design-theme-token": "^1.7.1",
|
|
30
30
|
"antd": "^6.7.1",
|
|
31
|
-
"axios": "1.
|
|
32
|
-
"dompurify": "3.
|
|
31
|
+
"axios": "1.21.1",
|
|
32
|
+
"dompurify": "3.5.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/react": "^19.1.1",
|