@blueking/bkflow-canvas-editor 1.1.0-beta.32 → 1.1.0-beta.33

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context-D8RDJWRx.cjs");exports.PLUGIN_GROUP_ICON_MAP=e.PLUGIN_GROUP_ICON_MAP;exports.SOPS_PLUGIN_GROUP_NAME=e.SOPS_PLUGIN_GROUP_NAME;exports.provideVariableInputCreateVariable=e.provideVariableInputCreateVariable;exports.resolveSopsPluginSources=e.resolveSopsPluginSources;exports.useFlowApi=e.useFlowApi;exports.useVariableInputCreateVariable=e.useVariableInputCreateVariable;exports.withSopsPluginGroup=e.withSopsPluginGroup;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./context-DXxB0x9T.cjs");exports.PLUGIN_GROUP_ICON_MAP=e.PLUGIN_GROUP_ICON_MAP;exports.SOPS_PLUGIN_GROUP_NAME=e.SOPS_PLUGIN_GROUP_NAME;exports.provideVariableInputCreateVariable=e.provideVariableInputCreateVariable;exports.resolveSopsPluginSources=e.resolveSopsPluginSources;exports.useFlowApi=e.useFlowApi;exports.useVariableInputCreateVariable=e.useVariableInputCreateVariable;exports.withSopsPluginGroup=e.withSopsPluginGroup;
@@ -1,4 +1,4 @@
1
- import { P as r, S as s, p as i, r as o, u as p, a as u, w as P } from "./context-DcQH3Knl.js";
1
+ import { P as r, S as s, p as i, r as o, u as p, a as u, w as P } from "./context-BGCiN3VZ.js";
2
2
  export {
3
3
  r as PLUGIN_GROUP_ICON_MAP,
4
4
  s as SOPS_PLUGIN_GROUP_NAME,
@@ -59,9 +59,9 @@ class p extends Error {
59
59
  super(e || C), this.name = "ApiError", this.httpStatus = a.httpStatus, this.code = a.code, this.data = a.data, this.cause = a.cause;
60
60
  }
61
61
  }
62
- const k = (t) => Object.prototype.toString.call(t) === "[object Object]", D = (t) => k(t) && typeof t.result == "boolean" && Object.prototype.hasOwnProperty.call(t, "data") && (Object.prototype.hasOwnProperty.call(t, "code") || Object.prototype.hasOwnProperty.call(t, "message")), h = (t) => typeof t == "string" ? t : k(t) ? typeof t.err_msg == "string" ? t.err_msg : typeof t.message == "string" ? t.message : typeof t.detail == "string" ? t.detail : k(t.detail) && typeof t.detail.detail == "string" ? t.detail.detail : "" : "";
62
+ const _ = (t) => Object.prototype.toString.call(t) === "[object Object]", D = (t) => _(t) && typeof t.result == "boolean" && Object.prototype.hasOwnProperty.call(t, "data") && (Object.prototype.hasOwnProperty.call(t, "code") || Object.prototype.hasOwnProperty.call(t, "message")), h = (t) => typeof t == "string" ? t : _(t) ? typeof t.err_msg == "string" ? t.err_msg : typeof t.message == "string" ? t.message : typeof t.detail == "string" ? t.detail : _(t.detail) && typeof t.detail.detail == "string" ? t.detail.detail : "" : "";
63
63
  function W(t) {
64
- const e = k(t) && typeof t.status == "number" && Object.prototype.hasOwnProperty.call(t, "config") && Object.prototype.hasOwnProperty.call(t, "data"), a = e ? t.data : t;
64
+ const e = _(t) && typeof t.status == "number" && Object.prototype.hasOwnProperty.call(t, "config") && Object.prototype.hasOwnProperty.call(t, "data"), a = e ? t.data : t;
65
65
  if (!D(a)) return a;
66
66
  if (a.result) return a.data;
67
67
  throw new p(h(a) || C, {
@@ -86,7 +86,7 @@ function X(t) {
86
86
  cause: t
87
87
  });
88
88
  }
89
- if (k(t) && k(t.response)) {
89
+ if (_(t) && _(t.response)) {
90
90
  const e = t.response, a = e.data;
91
91
  return D(a) && !a.result ? new p(h(a) || C, {
92
92
  httpStatus: typeof e.status == "number" ? e.status : void 0,
@@ -404,7 +404,7 @@ function a2(t) {
404
404
  const s = t.enableThirdPlugin !== !1, [o, l] = await Promise.all([
405
405
  n(),
406
406
  s ? c() : Promise.resolve([])
407
- ]), _ = o.map(async (f) => {
407
+ ]), k = o.map(async (f) => {
408
408
  if (f.name === "bkflow")
409
409
  return {
410
410
  ...f,
@@ -421,7 +421,7 @@ function a2(t) {
421
421
  )
422
422
  };
423
423
  });
424
- return await Promise.all(_);
424
+ return await Promise.all(k);
425
425
  },
426
426
  /**
427
427
  * 获取标准运维插件指定来源下的分类列表
@@ -443,7 +443,7 @@ function a2(t) {
443
443
  * 获取统一插件详情(含原生表单描述符)
444
444
  */
445
445
  async fetchSopsPluginDetail(s) {
446
- return await e.post("/bkflow/plugin/detail/", {
446
+ return await e.post("/bkflow/inner_plugin/plugin_all_types_detail/", {
447
447
  space_id: String(a.space_id),
448
448
  template_id: String(s.template_id),
449
449
  plugin_type: s.plugin_type,
@@ -590,9 +590,9 @@ function a2(t) {
590
590
  forceFail: "forced_fail",
591
591
  resume: "callback",
592
592
  gatewaySkip: "skip_exg"
593
- }, { task_id: l, node_id: _, action: m, data: f, operation: b } = s, L = b ?? o[m] ?? m;
593
+ }, { task_id: l, node_id: k, action: m, data: f, operation: b } = s, L = b ?? o[m] ?? m;
594
594
  return await e.post(
595
- `/bkflow/task/${l}/node/${_}/operate_node/${L}/`,
595
+ `/bkflow/task/${l}/node/${k}/operate_node/${L}/`,
596
596
  i(f ?? {})
597
597
  );
598
598
  }
@@ -1 +1 @@
1
- "use strict";const R=require("bkui-vue/lib/message"),P=require("axios"),F=require("vue"),B="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M13,12%20L3,12%20C2.72385763,12%202.5,12.2238576%202.5,12.5%20C2.5,12.7761424%202.72385763,13%203,13%20L13,13%20C13.2761424,13%2013.5,12.7761424%2013.5,12.5%20C13.5,12.2238576%2013.2761424,12%2013,12%20Z%20M5,6.5%20L4,6.5%20C3.72385763,6.5%203.5,6.72385763%203.5,7%20L3.5,10.5%20C3.5,10.7761424%203.72385763,11%204,11%20L5,11%20C5.27614237,11%205.5,10.7761424%205.5,10.5%20L5.5,7%20C5.5,6.72385763%205.27614237,6.5%205,6.5%20Z%20M8.5,3.5%20L7.5,3.5%20C7.22385763,3.5%207,3.72385763%207,4%20L7,10.5%20C7,10.7761424%207.22385763,11%207.5,11%20L8.5,11%20C8.77614237,11%209,10.7761424%209,10.5%20L9,4%20C9,3.72385763%208.77614237,3.5%208.5,3.5%20Z%20M12,5%20L11,5%20C10.7238576,5%2010.5,5.22385763%2010.5,5.5%20L10.5,10.5%20C10.5,10.7761424%2010.7238576,11%2011,11%20L12,11%20C12.2761424,11%2012.5,10.7761424%2012.5,10.5%20L12.5,5.5%20C12.5,5.22385763%2012.2761424,5%2012,5%20Z'%20fill='%23F8A54F'%20fill-rule='evenodd'/%3e%3c/svg%3e",U="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='19loczb8h__f71x3hmpea'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.5,2.5%20C6.17779929,2.5%204.26643215,4.28054945%204.02558864,6.56651687%20L4.026,6.558%20L4.03,6.54%20L3.99928094,6.75189877%20C3.76394842,8.11436335%203.07389664,8.46527789%203.00547979,8.87325046%20L3,8.93829715%20C3,9.39912427%204.33397403,9.2134945%204.33397403,9.69904945%20L4.33397403,10.9924271%20C4.33401331,11.5290486%204.757596,11.9699791%205.29378397,11.9915459%20C5.90300757,12.0163699%206.26264111,12.0687043%206.37268552,12.1485262%20C6.45725813,12.2098718%206.51932943,12.4266274%206.55889942,12.7987929%20L6.57276328,12.9456332%20C6.61875295,13.4959998%207.10219523,13.904878%207.65256183,13.8588884%20C7.70929358,13.8541478%207.76551689,13.8445713%207.82061902,13.8302632%20L10.1746185,13.2277878%20C10.5547586,13.1298644%2010.8424468,12.818586%2010.9101698,12.431922%20C11.0509156,11.6378879%2011.2333254,10.9899099%2011.4579782,10.4880363%20C12.402959,9.65300356%2013,8.42466038%2013,7.05516145%20C13,4.53941525%2010.9852814,2.5%208.5,2.5%20Z%20M8.9876109,3.8125%20C9.12361371,3.8219246%209.2572817,3.84136285%209.38686376,3.87081473%20L9.51119251,4.49813988%20C9.7435063,4.58296131%209.9565579,4.70842634%2010.1410081,4.86687748%20L10.7410548,4.6624814%20C10.8461213,4.77852183%2010.9412649,4.90339782%2011.0247344,5.03652034%20L11.1333032,5.22560144%20C11.2050986,5.36461434%2011.2658038,5.51128472%2011.3125,5.66384549%20L10.8356146,6.08677455%20C10.8560442,6.20399306%2010.8665509,6.32474578%2010.8665509,6.4484437%20C10.8665509,6.57390873%2010.8554605,6.69642857%2010.8344472,6.81541419%20L11.3101652,7.23775422%20C11.1934246,7.61473834%2010.9949656,7.95579117%2010.7358014,8.2391183%20L10.135171,8.03413318%20C9.95188828,8.19022817%209.74117149,8.31392609%209.51177621,8.39815848%20L9.38744747,9.02607267%20C9.20182991,9.06789435%209.00920792,9.09027778%208.81133259,9.09027778%20C8.61579208,9.09027778%208.4249212,9.06848338%208.24163845,9.02725074%20L8.11730971,8.40051463%20C7.88616332,8.31628224%207.67369542,8.19199529%207.48924527,8.03531126%20L6.88803117,8.24029638%20C6.79055277,8.13368056%206.70182991,8.0188182%206.6224463,7.89747644%20L6.47068352,7.63240947%20C6.408811,7.50753348%206.35569402,7.37676711%206.31366741,7.24128844%20L6.78938536,6.81894841%20C6.76778835,6.69878472%206.75669799,6.57449777%206.75669799,6.44785466%20C6.75669799,6.32297867%206.76778835,6.20045883%206.78880166,6.08147321%20L6.3125,5.65913318%20C6.3504407,5.53661334%206.39713694,5.41821677%206.45142132,5.30394345%20L6.64696183,4.96230159%20C6.719341,4.8562748%206.79814091,4.75496032%206.88452895,4.66071429%20L7.48457565,4.8656994%20C7.67077691,4.70665923%207.88499591,4.58060516%208.11906082,4.49578373%20L8.24338956,3.86904762%20C8.37122052,3.84077381%208.50197,3.82133557%208.63622169,3.8125%20Z%20M8.8119163,5.50598338%20C8.29592283,5.50598338%207.87799148,5.92773437%207.87799148,6.4484437%20C7.87799148,6.96915303%208.29592283,7.39090402%208.8119163,7.39090402%20C9.32790976,7.39090402%209.74584112,6.96915303%209.74584112,6.4484437%20C9.74584112,5.92773437%209.32790976,5.50598338%208.8119163,5.50598338%20Z%20M8.8119163,5.88296751%20C9.12139176,5.88296751%209.37227119,6.13613982%209.37227119,6.4484437%20C9.37227119,6.76074758%209.12139176,7.01391989%208.8119163,7.01391989%20C8.50244084,7.01391989%208.25156141,6.76074758%208.25156141,6.4484437%20C8.25156141,6.13613982%208.50244084,5.88296751%208.8119163,5.88296751%20Z'%20fill='url(%2319loczb8h__f71x3hmpea)'%20fill-rule='evenodd'/%3e%3c/svg%3e",S="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.03846154,2.5%20C7.295,2.5%206.6923077,3.10269231%206.6923077,3.84615384%20L6.6923077,4.42307693%20L4.38461538,4.42307693%20C4.17230769,4.42307693%204,4.59538461%204,4.8076923%20L4,6.92307693%20L4.57692308,6.92307693%20C5.32038461,6.92307693%205.92307693,7.52576923%205.92307693,8.26923077%20C5.92307693,9.0126923%205.32038461,9.61538461%204.57692308,9.61538461%20L4,9.61538461%20L4,12.1153846%20C4,12.3276923%204.17230769,12.5%204.38461538,12.5%20L6.6923077,12.5%20L6.6923077,11.9230769%20C6.6923077,11.1796154%207.295,10.5769231%208.03846154,10.5769231%20C8.78192307,10.5769231%209.38461539,11.1796154%209.38461539,11.9230769%20L9.38461539,12.5%20L11.6923077,12.5%20C11.9046154,12.5%2012.0769231,12.3276923%2012.0769231,12.1153846%20L12.0769231,9.61538461%20L12.6538462,9.61538461%20C13.3973077,9.61538461%2014,9.0126923%2014,8.26923077%20C14,7.52576923%2013.3973077,6.92307693%2012.6538462,6.92307693%20L12.0769231,6.92307693%20L12.0769231,4.8076923%20C12.0769231,4.59538461%2011.9046154,4.42307693%2011.6923077,4.42307693%20L9.38461539,4.42307693%20L9.38461539,3.84615384%20C9.38461539,3.10269231%208.78192307,2.5%208.03846154,2.5%20Z'%20fill='%235AB88E'%20fill-rule='evenodd'/%3e%3c/svg%3e",Z="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='vgdxp7v4l__zvhmfdo4ha'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.44875881,3.88645164%20C7.88887563,4.38553286%207.31548649,5.06473362%206.78138741,5.85400744%20C6.4216379,5.88402737%206.07416654,5.92655559%205.74142896,5.98159211%20C5.68126606,5.77270348%205.6321535,5.570069%205.59409127,5.37619034%20C5.50937211,4.9434031%205.48727146,4.57065572%205.52901714,4.29797476%20C5.55848467,4.10784858%205.61741973,3.97275892%205.6935442,3.92772904%20C5.81878123,3.85393006%206.26447771,3.90646492%207.05027868,4.63319723%20L7.64454064,3.96650477%20C7.22094482,3.57499494%206.82067746,3.29856148%206.45356107,3.14470937%20C6.13432943,3.01087055%205.66653229,2.90329916%205.25153116,3.14721103%20C4.84512474,3.38611959%204.42398453,3.99777552%204.72725459,5.55130656%20C4.76531682,5.74893772%204.81442938,5.95282302%204.87336445,6.16421332%20C4.66586389,6.21799902%204.46818584,6.27678802%204.2815581,6.34183119%20C2.80940913,6.85216989%202.5,7.528869%202.5,8.0066861%20C2.5,8.49826234%202.82905415,8.85850142%203.10654011,9.07364421%20C3.42454394,9.32130857%203.86532916,9.53770219%204.41661765,9.71532006%20L4.68428111,8.85725059%20C3.65660079,8.5257806%203.38525389,8.1555349%203.38525389,8.0066861%20C3.38525389,7.91787716%203.46997306,7.79654664%203.61731074,7.67646695%20C3.82849474,7.50385239%204.15754889,7.33749199%204.56641096,7.19489735%20C4.75058305,7.13110501%204.9470333,7.07356682%205.15330604,7.02228279%20C5.27240401,7.34374613%205.41114699,7.67271446%205.56585156,8.00543527%20C5.34975629,8.47074408%205.16558418,8.93230041%205.01824651,9.37384344%20C4.76040556,10.1518598%204.62534603,10.8610805%204.62780166,11.4227032%20C4.63025729,11.9092761%204.74076054,12.5522028%205.25521461,12.8549037%20C5.43570327,12.9612243%205.62478661,13%205.80895872,13%20C6.05083808,13%206.2804393,12.9312044%206.46338358,12.8549037%20C6.8329556,12.6998008%207.23567859,12.4196148%207.66050223,12.0243525%20L7.06501244,11.3589109%20C6.27184459,12.0956498%205.82369249,12.1494355%205.69722765,12.0743857%20C5.60882504,12.0218508%205.51428337,11.8229689%205.51182774,11.4176999%20C5.50937211,10.9536419%205.62847006,10.3457385%205.85561565,9.66028354%20C5.92437324,9.45264574%206.00172552,9.24125546%206.08890031,9.02611266%20C6.10363407,9.05112927%206.11714004,9.07614586%206.13187381,9.1024133%20C6.59967093,9.92671036%207.13254221,10.6947201%207.67400818,11.321386%20C8.20687945,11.9380452%208.74220636,12.4121098%209.22105382,12.691045%20C9.49240072,12.8499004%209.84601114,13%2010.2008494,13%20C10.3874771,13%2010.5753327,12.9587226%2010.7533657,12.8536529%20C11.2678198,12.550952%2011.378323,11.9067745%2011.3807786,11.4202015%20C11.3832343,10.8585788%2011.2481747,10.1493581%2010.9903338,9.37009095%20C10.8589577,8.97232696%2010.6956584,8.55705136%2010.5065751,8.13802326%20L9.70235691,8.5170248%20C9.87916211,8.9072838%2010.0301832,9.29128866%2010.1517368,9.66028354%20C10.3788824,10.3457385%2010.4979804,10.9536419%2010.4955247,11.4189507%20C10.4942969,11.8242197%2010.3985274,12.0243525%2010.3101248,12.0756365%20C10.2217222,12.1281714%2010.0043991,12.1119106%209.65938341,11.910527%20C9.2640273,11.6803742%208.80605269,11.2713527%208.33702774,10.7272417%20C7.833624,10.1443548%207.33513152,9.42762914%206.89680191,8.65336529%20C6.77402052,8.43697167%206.658606,8.22182889%206.55055837,8.00543527%20C6.65983383,7.78654%206.77647615,7.56889555%206.89925754,7.35250195%20C7.02081114,7.13735916%207.14604815,6.92847053%207.27496864,6.72583605%20C7.51316455,6.71332774%207.7550439,6.70707359%208.00060669,6.70707359%20C9.30454518,6.70707359%2010.5249923,6.88093898%2011.4348024,7.19614818%20C11.8448923,7.33749199%2012.1727187,7.50385239%2012.3839027,7.67771778%20C12.5312403,7.7990483%2012.6159595,7.91912799%2012.6159595,8.00793694%20C12.6159595,8.10425085%2012.5189622,8.23433719%2012.3495239,8.36567435%20C12.111328,8.54954639%2011.7442116,8.72341178%2011.2886926,8.86850806%20L11.5526726,9.72782838%20C12.1125558,9.55021049%2012.5607079,9.33256604%2012.883623,9.08365086%20C13.1647924,8.86725724%2013.5,8.50451651%2013.5,8.00793694%20C13.5012134,7.528869%2013.1918043,6.85216989%2011.7196553,6.34183119%20C10.7202147,5.99535125%209.39908685,5.80522507%208.00060669,5.80522507%20L7.91097628,5.80522507%20C8.2805483,5.31740132%208.66117063,4.89587157%209.03197046,4.56440157%20C9.35734117,4.27420898%209.66306686,4.06782201%209.91599654,3.9677556%20C10.0928018,3.89770911%2010.2376838,3.88394998%2010.3138083,3.92772904%20C10.3960718,3.97651141%2010.4586903,4.12786186%2010.4844744,4.34425547%20C10.5213088,4.64945802%2010.4844744,5.06348279%2010.3776546,5.54129991%20L11.23958,5.7401819%20C11.3697283,5.15354257%2011.411474,4.64695636%2011.3611336,4.23418242%20C11.3181601,3.87519417%2011.1781893,3.39612623%2010.7545935,3.14721103%20C10.3481871,2.90830248%209.61886555,2.84200848%208.44875881,3.88645164%20Z%20M8.42307307,6.91304349%20C7.83892612,6.91304349%207.36538145,7.39969049%207.36538145,8%20C7.36538145,8.60030951%207.83892612,9.08695653%208.42307307,9.08695653%20C9.00722001,9.08695653%209.48076468,8.60030951%209.48076468,8%20C9.48076468,7.39969049%209.00722001,6.91304349%208.42307307,6.91304349%20Z'%20fill='url(%23vgdxp7v4l__zvhmfdo4ha)'%20fill-rule='evenodd'/%3e%3c/svg%3e",V="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='7doce0e6d__r8m44v5xza'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M11,3.5%20L5,3.5%20C3.8954305,3.5%203,4.3954305%203,5.5%20L3,9.5%20C3,10.6045695%203.8954305,11.5%205,11.5%20L9.536,11.5%20L12.0312272,13.0147852%20L11.4996566,11.5%20L11.0252355,11.4998441%20C12.1181756,11.4863297%2013,10.5961454%2013,9.5%20L13,5.5%20C13,4.3954305%2012.1045695,3.5%2011,3.5%20Z%20M8,9%20C8.27614237,9%208.5,9.22385763%208.5,9.5%20C8.5,9.77614237%208.27614237,10%208,10%20L5,10%20C4.72385763,10%204.5,9.77614237%204.5,9.5%20C4.5,9.22385763%204.72385763,9%205,9%20Z%20M11,7%20C11.2761424,7%2011.5,7.22385763%2011.5,7.5%20C11.5,7.77614237%2011.2761424,8%2011,8%20L5,8%20C4.72385763,8%204.5,7.77614237%204.5,7.5%20C4.5,7.22385763%204.72385763,7%205,7%20Z%20M11,5%20C11.2761424,5%2011.5,5.22385763%2011.5,5.5%20C11.5,5.77614237%2011.2761424,6%2011,6%20L5,6%20C4.72385763,6%204.5,5.77614237%204.5,5.5%20C4.5,5.22385763%204.72385763,5%205,5%20Z'%20fill='url(%237doce0e6d__r8m44v5xza)'%20fill-rule='evenodd'/%3e%3c/svg%3e",$="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='32px'%20height='32px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIcon/Node/知识库%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='2.20648492%25'%20y1='2.12255434%25'%20x2='100%25'%20y2='96.1961861%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%234DB9E3'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23BA70EF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Icon/Node/知识库'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M28,2%20C29.1045695,2%2030,2.8954305%2030,4%20L30,28%20C30,29.1045695%2029.1045695,30%2028,30%20L4,30%20C2.8954305,30%202,29.1045695%202,28%20L2,4%20C2,2.8954305%202.8954305,2%204,2%20L28,2%20Z%20M17.3479972,6%20L14.1475857,6%20C13.7208642,6%2013.3652629,6.35778176%2013.3652629,6.78711986%20L13.3652629,25.2128801%20C13.3652629,25.6422183%2013.7208642,26%2014.1475857,26%20L17.3479972,26%20C17.7747188,26%2018.1303201,25.6422183%2018.1303201,25.2128801%20L18.1303201,6.78711986%20C18.1658802,6.35778176%2017.8102789,6%2017.3479972,6%20Z%20M10.9827343,8.64758499%20L7.78232282,8.64758499%20C7.35560129,8.64758499%207,9.00536675%207,9.43470484%20L7,25.2128801%20C7,25.6422183%207.35560129,26%207.78232282,26%20L10.9827343,26%20C11.4094559,26%2011.7650571,25.6422183%2011.7650571,25.2128801%20L11.7650571,9.43470484%20C11.7650571,9.00536673%2011.4094559,8.64758499%2010.9827343,8.64758499%20Z%20M22.1841746,8.25402505%20L22.0419342,8.25402505%20L18.9126429,8.86225404%20C18.4859213,8.93381039%2018.2014403,9.36314849%2018.2725606,9.7924866%20L21.2951715,25.3202147%20C21.3662917,25.7137746%2021.6863328,25.9642218%2022.0774943,25.9642218%20L22.2197348,25.9642218%20L25.349026,25.3559928%20C25.7757476,25.2486584%2026.0602286,24.8193202%2025.9891084,24.3899821%20L23.0020576,8.89803221%20C22.8953773,8.50447228%2022.575336,8.25402505%2022.1841746,8.25402505%20Z%20M10.0937311,10.4364937%20C10.4848925,10.4364937%2010.8049337,10.7584973%2010.8049337,11.1520572%20C10.8049337,11.5456172%2010.4848925,11.8676208%2010.0937311,11.8676208%20L8.67132601,11.8676208%20C8.28016461,11.8676208%207.96012346,11.5456172%207.96012346,11.1520572%20C7.96012346,10.7584973%208.28016461,10.4364937%208.67132601,10.4364937%20L10.0937311,10.4364937%20Z%20M22.4686557,10.4722719%20C22.539776,10.8658319%2022.2908551,11.2593918%2021.8996937,11.3309481%20L20.4772885,11.6171735%20L20.335048,11.6171735%20C20.0150069,11.6171735%2019.6949657,11.3667263%2019.6238455,11.0447227%20C19.5527252,10.6511628%2019.8016461,10.2576029%2020.1928074,10.1860465%20L21.6152126,9.89982112%20C22.006374,9.82826478%2022.3975355,10.078712%2022.4686557,10.4722719%20Z%20M16.4945542,7.82468694%20C16.8857156,7.82468694%2017.2057567,8.14669052%2017.2057567,8.54025046%20C17.2057567,8.9338104%2016.8857156,9.25581397%2016.4945542,9.25581397%20L15.072149,9.25581397%20C14.6809876,9.25581397%2014.3609465,8.93381039%2014.3609465,8.54025046%20C14.3609465,8.14669054%2014.6809876,7.82468694%2015.072149,7.82468694%20L16.4945542,7.82468694%20Z'%20id='形状结合备份'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",D=S,w="sops",j="标准运维插件",z="sops",H="sops_",T="标准运维",b={bkflow:S,[w]:S,data:B,agent:U,model:Z,output:V,knowledgebase:$},W={bkflow:"bkflow-canvas-icon bkflow-canvas-plugin",[w]:"bkflow-canvas-icon bkflow-canvas-plugin",data:"bkflow-canvas-icon bkflow-canvas-data",agent:"bkflow-canvas-icon bkflow-canvas-zhinengti",model:"bkflow-canvas-icon bkflow-canvas-model-filled",knowledgebase:"bkflow-canvas-icon bkflow-canvas-knowledgebase-filled"},x=t=>!!(t.fetchSopsPluginCategories&&t.fetchSopsPluginList&&t.fetchSopsPluginDetail);function K(t){if(!x(t))throw new Error("标准运维插件目录查询接口缺失:fetchSopsPluginCategories / fetchSopsPluginList / fetchSopsPluginDetail");return t}const X=(t,e)=>{const a=e?.display_name||t;return(a.startsWith(T)?a.slice(T.length):a)||a},Y=(t,e)=>e?t.startsWith(H)||e.source_key===z:!1;function E(t){const e=t?.uniform_api?.api??{};return Object.entries(e).filter(([a,u])=>Y(a,u)).map(([a,u])=>({id:a,name:X(a,u)}))}function Q(t,e){const a=E(e.spaceConfig);return a.length===0||!x(e.api)?t:[...t,{id:w,name:w,alias:j,properties:{},iconUrl:b[w],children:a}]}function q(t){return(t.find(a=>a.name===w)?.children??[]).filter(a=>"id"in a&&"name"in a)}const C="请求失败";class p extends Error{httpStatus;code;data;cause;constructor(e,a={}){super(e||C),this.name="ApiError",this.httpStatus=a.httpStatus,this.code=a.code,this.data=a.data,this.cause=a.cause}}const _=t=>Object.prototype.toString.call(t)==="[object Object]",v=t=>_(t)&&typeof t.result=="boolean"&&Object.prototype.hasOwnProperty.call(t,"data")&&(Object.prototype.hasOwnProperty.call(t,"code")||Object.prototype.hasOwnProperty.call(t,"message")),h=t=>typeof t=="string"?t:_(t)?typeof t.err_msg=="string"?t.err_msg:typeof t.message=="string"?t.message:typeof t.detail=="string"?t.detail:_(t.detail)&&typeof t.detail.detail=="string"?t.detail.detail:"":"";function J(t){const e=_(t)&&typeof t.status=="number"&&Object.prototype.hasOwnProperty.call(t,"config")&&Object.prototype.hasOwnProperty.call(t,"data"),a=e?t.data:t;if(!v(a))return a;if(a.result)return a.data;throw new p(h(a)||C,{code:a.code===void 0||a.code===null?void 0:String(a.code),httpStatus:e?t.status:void 0,data:a.data,cause:t})}function N(t){if(t instanceof p)return t;if(P.isAxiosError(t)){const e=t.response?.data;return v(e)&&!e.result?new p(h(e)||t.message||C,{httpStatus:t.response?.status,code:e.code===void 0||e.code===null?void 0:String(e.code),data:e.data,cause:t}):new p(h(e)||t.response?.statusText||t.message||C,{httpStatus:t.response?.status,data:e,cause:t})}if(_(t)&&_(t.response)){const e=t.response,a=e.data;return v(a)&&!a.result?new p(h(a)||C,{httpStatus:typeof e.status=="number"?e.status:void 0,code:a.code===void 0||a.code===null?void 0:String(a.code),data:a.data,cause:t}):new p(h(a)||(typeof e.statusText=="string"?e.statusText:"")||C,{httpStatus:typeof e.status=="number"?e.status:void 0,data:a,cause:t})}return t instanceof Error?new p(t.message,{cause:t}):typeof t=="string"?new p(t,{cause:t}):new p(h(t)||C,{data:t,cause:t})}const O=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1),e2=(t=8)=>{let e="";for(let a=0;a<t-1;a++)e+=O();return e},I=(t=32)=>{let e="";const a="abcdef0123456789";for(let u=0;u<t;u++)e+=a.charAt(Math.floor(Math.random()*a.length));return e},t2=()=>`00-${I(32)}-${I(16)}-01`,s2=t=>t.httpStatus!==401&&t.httpStatus!==404&&!!t.message&&!t.message.includes("1211011");function a2(t){const{headers:e,...a}=t.axiosConfig||{},u={baseURL:t.baseURL||(typeof window>"u"?void 0:window.API_HOST),xsrfCookieName:t.xsrfCookieName||"bk-incident_csrftoken",xsrfHeaderName:"X-CSRFToken",withCredentials:!0,...a,headers:t.axiosConfig?.headers},i=t.axiosInstance??P.create(u),c=(r={})=>{const s={...r},o=P.AxiosHeaders.from(s.headers);return o.has("traceparent")||o.set("traceparent",t2()),{...s,headers:o}};async function n(r,s={}){try{return J(await r())}catch(o){const l=N(o);throw s.errorHandling!=="delegate"&&s2(l)&&R({theme:"error",message:l.message,ellipsisLine:3}),l}}return{request(r){return n(()=>i.request(c(r)),r)},get(r,s={}){return n(()=>i.get(r,c(s)),s)},delete(r,s={}){return n(()=>i.delete(r,c(s)),s)},post(r,s,o={}){return n(()=>i.post(r,s,c(o)),o)},put(r,s,o={}){return n(()=>i.put(r,s,c(o)),o)},patch(r,s,o={}){return n(()=>i.patch(r,s,c(o)),o)}}}const d="/bkflow/template",g={errorHandling:"delegate"};function o2(t,e){const{scope_type:a,scope_value:u,space_id:i}=e,c=n=>({template_id:Number(n),space_id:i,scope_type:a,scope_value:u});return{fetchDebugContext(n){return t.get(`${d}/debug_context/`,{...g,params:c(n)})},fetchDebugInputSchema(n){return t.get(`${d}/debug_input_schema/`,{...g,params:c(n)})},fetchDebugResetImpact(n){return t.post(`${d}/debug_reset_impact/`,{...c(n)},g)},updateNodeDebugMock(n){const r={...c(n.templateId),node_id:n.nodeId,enable:n.enable};return n.mockResult!==void 0&&(r.mock_result=n.mockResult),n.mockOutputs!==void 0&&(r.mock_outputs=n.mockOutputs),n.mockError!==void 0&&(r.mock_error=n.mockError),t.post(`${d}/debug_node_mock/`,r,g)},runNodeDebugStep(n){const r={...c(n.templateId),node_id:n.nodeId,mode:n.mode};return n.inputOverrides!==void 0&&(r.input_overrides=n.inputOverrides),n.mockResult!==void 0&&(r.mock_result=n.mockResult),n.mockOutputs!==void 0&&(r.mock_outputs=n.mockOutputs),n.mockError!==void 0&&(r.mock_error=n.mockError),t.post(`${d}/debug_step_run/`,r,g)},runGlobalDebug(n){return t.post(`${d}/debug_global_run/`,{...c(n.templateId),inputs:n.inputs},g)},terminateDebug(n){const r={...c(n.templateId)};return n.nodeId!==void 0&&(r.node_id=n.nodeId),t.post(`${d}/debug_terminate/`,r,g)},resetDebugResult(n){const r={...c(n.templateId)};return n.nodeIds!==void 0&&(r.node_ids=n.nodeIds),t.post(`${d}/debug_reset/`,r,g)}}}const A=0,n2=["dmn_plugin","subprocess_plugin"],G=(t=[])=>[{code_name:"INNER",id:A,name:"内置",priority:1},...t];function r2(t){const e=a2(t),{scopeData:a}=t,u=o2(e,a),i=s=>({...s,...a}),c=async()=>await e.get("/bkflow/plugin/tags/",{params:{...a}}),n=async()=>[...(await e.get("/metas/category/list_categories/",{params:a})).map(o=>({...o,iconUrl:b[o.name]??D})),{id:"bkflow",name:"bkflow",alias:"插件",properties:{},iconUrl:b.bkflow??D}],r=async s=>(await e.post("/metas/plugin/list_plugins/",i({category:s}))).apis;return{...u,async fetchFlowDetail(s){return await e.get(`/bkflow/template/${s}/fetch_template/`,{params:a})},async fetchFlowDetailByVersion(s,o){return await e.post(`/bkflow/template/${s}/preview_task_tree/`,{...a,is_all_nodes:!0,version:o})},async fetchFlowDraftDetail(s){return await e.get(`/bkflow/template/${s}/get_draft_template/`,{params:a})},async fetchSpaceFlowConfig(s){return await e.get(`/bkflow/template/${s}/get_space_related_configs/`,{params:a})},async fetchSystemVariables(s){const o=await e.get("/bkflow/variable/system_variables/",{params:{template_id:s,...a}});return Object.values(o)},async saveFlow(s,o){await e.put(`/bkflow/template/${s}/update_template/`,i(o))},async fetchInnerVariableDetail(s){return await e.get(`/bkflow/variable/${s}/variable_class_detail/`,{params:{...a}})},async fetchBkFlowInnerPluginList(){return(await e.get("/bkflow/inner_plugin/plugins/",{params:{...a}})).filter(o=>!n2.includes(o.code))},async fetchBkFlowInnerPluginDetail(s,o){return await e.get(`/bkflow/inner_plugin/${s}/plugin_detail/`,{params:{version:o,...a}})},async fetchBkFlowThirdPartyPluginTags(){return c()},async fetchBkFlowThirdPartyPluginList(s){return await e.get("/bkflow/plugin/list_plugin/",{params:{tag:s,...a}})},async searchBkFlowThirdPartyPlugins(s){return await e.get("/bkflow/plugin/list_plugin/",{params:{offset:0,limit:200,search_term:s,...a}})},async fetchBkFlowThirdPartyPluginMeta(s){return await e.get("/bkflow/plugin/meta/",{params:{plugin_code:s,...a}})},async fetchBkFlowThirdPartyPluginAppDetail(s,o){return await e.get("/bkflow/plugin/get_plugin_app_detail/",{params:{plugin_code:s,plugin_version:o,...a}})},async fetchBkFlowThirdPartyPluginDetail(s,o){return await e.get("/bkflow/plugin/plugin_detail/",{params:{plugin_code:s,plugin_version:o,with_app_detail:!0,...a}})},async fetchPluginGroupList(){return n()},async fetchCategoryPlugins(s){return r(s)},async fetchPluginDetail(s){return await e.get("/metas/plugin/get_plugin/",{params:{plugin_id:s,...a}})},async fetchAllPluginGroups(){const s=t.enableThirdPlugin!==!1,[o,l]=await Promise.all([n(),s?c():Promise.resolve([])]),k=o.map(async f=>{if(f.name==="bkflow")return{...f,children:G(s?l:[])};const L=await r(f.name);return{...f,children:L.map(y=>({...y,category_id:f.id}))}});return await Promise.all(k)},async fetchSopsPluginCategories(s){return await e.get("/bkflow/uniform/category_list/",{params:{...s,...a}})},async fetchSopsPluginList(s){return await e.get("/bkflow/uniform/uniform_plugin_list/",{params:{...s,...a}})},async fetchSopsPluginDetail(s){return await e.post("/bkflow/plugin/detail/",{space_id:String(a.space_id),template_id:String(s.template_id),plugin_type:s.plugin_type,plugin_code:s.plugin_code,plugin_version:s.plugin_version,source_key:s.source_key??"",scope_type:a.scope_type,scope_value:String(a.scope_value)})},async fetchApplyInstructionData(s){return await e.post("/metas/plugin/apply_instruction/",i(s))},async fetchVariableRef(s){return{data:await e.post("/bkflow/template/analysis_constants_ref/",i(s))}},async fetchCustomVariableTypes(){return{data:await e.get("/bkflow/variable/variable_class_list/",{params:a})}},async fetchFlowOperateRecord(s){return{data:await e.get(`/bkflow/template/${s}/operation_record/`,{params:a})}},async createFlowTask(s){return{data:await e.post("/bkflow/template/create_task/",i(s))}},async getFlowTaskDetail(s){return await e.get("/bkflow/template/get_task_detail/",{params:{task_id:s.task_id,...a}})},async executeFlowTask(s){await e.post("/bkflow/template/operate_task/",i({...s,action:"start"}))},async revokeFlowTask(s){await e.post("/bkflow/template/operate_task/",i({...s,action:"revoke"}))},async fetchControlConfig(){return await e.get("/bkflow/space_config/get_control_config/",{params:a})},async checkSpaceConfig(s,o){return await e.get(`/bkflow/space_config/${s}/check_space_config/`,{params:{...a,...o}})},async drawPipeline(s){return await e.post("/bkflow/template/draw_pipeline/",i(s))},async createMockDebugTask(s){const{template_id:o,...l}=s;return{data:await e.post(`/bkflow/template/${o}/create_mock_task/`,i(l))}},async stopMockDebugTask(s){throw new Error("TODO(mock-debug-api): replace with final mock debug stop API.")},async fetchTaskState(s){return await e.get("/bkflow/template/get_task_states/",{params:{task_id:s.task_id,...a}})},async fetchTaskNodeDetail(s){return await e.get("/bkflow/task/get_task_node_detail/",{params:{task_id:s.task_id,node_id:s.node_id,...s.component_code?{component_code:s.component_code}:{},...a}})},async fetchTaskNodeSnapshot(s){return await e.get("/bkflow/task/get_node_snapshot_config/",{params:{task_id:s.task_id,node_id:s.node_id,...a}})},async fetchTaskNodeLog(s){return await e.get("/bkflow/task/get_task_node_log/",{params:{task_id:s.task_id,node_id:s.node_id,version:s.version,...a}})},async operateTaskNode(s){const o={retry:"retry",skip:"skip",forceFail:"forced_fail",resume:"callback",gatewaySkip:"skip_exg"},{task_id:l,node_id:k,action:m,data:f,operation:L}=s,y=L??o[m]??m;return await e.post(`/bkflow/task/${l}/node/${k}/operate_node/${y}/`,i(f??{}))}}}function i2(t){const e=r2(t);return{fetchFlowDetail:e.fetchFlowDetail,fetchFlowDraftDetail:e.fetchFlowDraftDetail,fetchFlowDetailByVersion:e.fetchFlowDetailByVersion,fetchSpaceFlowConfig:e.fetchSpaceFlowConfig,fetchSystemVariables:e.fetchSystemVariables,fetchUserApi:t.fetchUserApi,scopeData:t.scopeData,fetchVariableRef:e.fetchVariableRef,fetchCustomVariableTypes:e.fetchCustomVariableTypes,fetchFlowOperateRecord:e.fetchFlowOperateRecord,createFlowTask:e.createFlowTask,executeFlowTask:e.executeFlowTask,revokeFlowTask:e.revokeFlowTask,saveFlow:e.saveFlow,fetchBkFlowInnerPluginList:e.fetchBkFlowInnerPluginList,fetchInnerVariableDetail:e.fetchInnerVariableDetail,fetchBkFlowInnerPluginDetail:e.fetchBkFlowInnerPluginDetail,fetchBkFlowThirdPartyPluginList:e.fetchBkFlowThirdPartyPluginList,searchBkFlowThirdPartyPlugins:e.searchBkFlowThirdPartyPlugins,fetchBkFlowThirdPartyPluginTags:e.fetchBkFlowThirdPartyPluginTags,fetchBkFlowThirdPartyPluginMeta:e.fetchBkFlowThirdPartyPluginMeta,fetchBkFlowThirdPartyPluginDetail:e.fetchBkFlowThirdPartyPluginDetail,fetchBkFlowThirdPartyPluginAppDetail:e.fetchBkFlowThirdPartyPluginAppDetail,fetchPluginGroupList:e.fetchPluginGroupList,fetchCategoryPlugins:e.fetchCategoryPlugins,fetchPluginDetail:e.fetchPluginDetail,fetchApplyInstructionData:e.fetchApplyInstructionData,fetchAllPluginGroups:e.fetchAllPluginGroups,fetchSopsPluginCategories:e.fetchSopsPluginCategories,fetchSopsPluginList:e.fetchSopsPluginList,fetchSopsPluginDetail:e.fetchSopsPluginDetail,enableThirdPlugin:t.enableThirdPlugin,fetchControlConfig:e.fetchControlConfig,checkSpaceConfig:e.checkSpaceConfig,drawPipeline:e.drawPipeline,createMockDebugTask:e.createMockDebugTask,stopMockDebugTask:e.stopMockDebugTask,fetchTaskState:e.fetchTaskState,fetchTaskNodeDetail:e.fetchTaskNodeDetail,fetchTaskNodeSnapshot:e.fetchTaskNodeSnapshot,fetchTaskNodeLog:e.fetchTaskNodeLog,operateTaskNode:e.operateTaskNode,getFlowTaskDetail:e.getFlowTaskDetail,fetchDebugContext:e.fetchDebugContext,fetchDebugInputSchema:e.fetchDebugInputSchema,fetchDebugResetImpact:e.fetchDebugResetImpact,updateNodeDebugMock:e.updateNodeDebugMock,runNodeDebugStep:e.runNodeDebugStep,runGlobalDebug:e.runGlobalDebug,terminateDebug:e.terminateDebug,resetDebugResult:e.resetDebugResult}}const M=Symbol("variableInputCreateVariable"),c2=t=>{F.provide(M,t)},l2=()=>F.inject(M,null);exports.ApiError=p;exports.BKFLOW_INNER_PLUGIN_TAG_ID=A;exports.PLUGGIN_GROUP_FONT_CLASS_MAP=W;exports.PLUGIN_GROUP_DEFAULT_ICON=D;exports.PLUGIN_GROUP_ICON_MAP=b;exports.SOPS_PLUGIN_GROUP_NAME=w;exports.buildBkflowPluginTagList=G;exports.ensureSopsCatalogApi=K;exports.generateId=e2;exports.getSopsPluginSources=q;exports.normalizeApiError=N;exports.provideVariableInputCreateVariable=c2;exports.random4=O;exports.resolveSopsPluginSources=E;exports.useFlowApi=i2;exports.useVariableInputCreateVariable=l2;exports.withSopsPluginGroup=Q;
1
+ "use strict";const R=require("bkui-vue/lib/message"),P=require("axios"),F=require("vue"),B="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M13,12%20L3,12%20C2.72385763,12%202.5,12.2238576%202.5,12.5%20C2.5,12.7761424%202.72385763,13%203,13%20L13,13%20C13.2761424,13%2013.5,12.7761424%2013.5,12.5%20C13.5,12.2238576%2013.2761424,12%2013,12%20Z%20M5,6.5%20L4,6.5%20C3.72385763,6.5%203.5,6.72385763%203.5,7%20L3.5,10.5%20C3.5,10.7761424%203.72385763,11%204,11%20L5,11%20C5.27614237,11%205.5,10.7761424%205.5,10.5%20L5.5,7%20C5.5,6.72385763%205.27614237,6.5%205,6.5%20Z%20M8.5,3.5%20L7.5,3.5%20C7.22385763,3.5%207,3.72385763%207,4%20L7,10.5%20C7,10.7761424%207.22385763,11%207.5,11%20L8.5,11%20C8.77614237,11%209,10.7761424%209,10.5%20L9,4%20C9,3.72385763%208.77614237,3.5%208.5,3.5%20Z%20M12,5%20L11,5%20C10.7238576,5%2010.5,5.22385763%2010.5,5.5%20L10.5,10.5%20C10.5,10.7761424%2010.7238576,11%2011,11%20L12,11%20C12.2761424,11%2012.5,10.7761424%2012.5,10.5%20L12.5,5.5%20C12.5,5.22385763%2012.2761424,5%2012,5%20Z'%20fill='%23F8A54F'%20fill-rule='evenodd'/%3e%3c/svg%3e",U="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='19loczb8h__f71x3hmpea'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.5,2.5%20C6.17779929,2.5%204.26643215,4.28054945%204.02558864,6.56651687%20L4.026,6.558%20L4.03,6.54%20L3.99928094,6.75189877%20C3.76394842,8.11436335%203.07389664,8.46527789%203.00547979,8.87325046%20L3,8.93829715%20C3,9.39912427%204.33397403,9.2134945%204.33397403,9.69904945%20L4.33397403,10.9924271%20C4.33401331,11.5290486%204.757596,11.9699791%205.29378397,11.9915459%20C5.90300757,12.0163699%206.26264111,12.0687043%206.37268552,12.1485262%20C6.45725813,12.2098718%206.51932943,12.4266274%206.55889942,12.7987929%20L6.57276328,12.9456332%20C6.61875295,13.4959998%207.10219523,13.904878%207.65256183,13.8588884%20C7.70929358,13.8541478%207.76551689,13.8445713%207.82061902,13.8302632%20L10.1746185,13.2277878%20C10.5547586,13.1298644%2010.8424468,12.818586%2010.9101698,12.431922%20C11.0509156,11.6378879%2011.2333254,10.9899099%2011.4579782,10.4880363%20C12.402959,9.65300356%2013,8.42466038%2013,7.05516145%20C13,4.53941525%2010.9852814,2.5%208.5,2.5%20Z%20M8.9876109,3.8125%20C9.12361371,3.8219246%209.2572817,3.84136285%209.38686376,3.87081473%20L9.51119251,4.49813988%20C9.7435063,4.58296131%209.9565579,4.70842634%2010.1410081,4.86687748%20L10.7410548,4.6624814%20C10.8461213,4.77852183%2010.9412649,4.90339782%2011.0247344,5.03652034%20L11.1333032,5.22560144%20C11.2050986,5.36461434%2011.2658038,5.51128472%2011.3125,5.66384549%20L10.8356146,6.08677455%20C10.8560442,6.20399306%2010.8665509,6.32474578%2010.8665509,6.4484437%20C10.8665509,6.57390873%2010.8554605,6.69642857%2010.8344472,6.81541419%20L11.3101652,7.23775422%20C11.1934246,7.61473834%2010.9949656,7.95579117%2010.7358014,8.2391183%20L10.135171,8.03413318%20C9.95188828,8.19022817%209.74117149,8.31392609%209.51177621,8.39815848%20L9.38744747,9.02607267%20C9.20182991,9.06789435%209.00920792,9.09027778%208.81133259,9.09027778%20C8.61579208,9.09027778%208.4249212,9.06848338%208.24163845,9.02725074%20L8.11730971,8.40051463%20C7.88616332,8.31628224%207.67369542,8.19199529%207.48924527,8.03531126%20L6.88803117,8.24029638%20C6.79055277,8.13368056%206.70182991,8.0188182%206.6224463,7.89747644%20L6.47068352,7.63240947%20C6.408811,7.50753348%206.35569402,7.37676711%206.31366741,7.24128844%20L6.78938536,6.81894841%20C6.76778835,6.69878472%206.75669799,6.57449777%206.75669799,6.44785466%20C6.75669799,6.32297867%206.76778835,6.20045883%206.78880166,6.08147321%20L6.3125,5.65913318%20C6.3504407,5.53661334%206.39713694,5.41821677%206.45142132,5.30394345%20L6.64696183,4.96230159%20C6.719341,4.8562748%206.79814091,4.75496032%206.88452895,4.66071429%20L7.48457565,4.8656994%20C7.67077691,4.70665923%207.88499591,4.58060516%208.11906082,4.49578373%20L8.24338956,3.86904762%20C8.37122052,3.84077381%208.50197,3.82133557%208.63622169,3.8125%20Z%20M8.8119163,5.50598338%20C8.29592283,5.50598338%207.87799148,5.92773437%207.87799148,6.4484437%20C7.87799148,6.96915303%208.29592283,7.39090402%208.8119163,7.39090402%20C9.32790976,7.39090402%209.74584112,6.96915303%209.74584112,6.4484437%20C9.74584112,5.92773437%209.32790976,5.50598338%208.8119163,5.50598338%20Z%20M8.8119163,5.88296751%20C9.12139176,5.88296751%209.37227119,6.13613982%209.37227119,6.4484437%20C9.37227119,6.76074758%209.12139176,7.01391989%208.8119163,7.01391989%20C8.50244084,7.01391989%208.25156141,6.76074758%208.25156141,6.4484437%20C8.25156141,6.13613982%208.50244084,5.88296751%208.8119163,5.88296751%20Z'%20fill='url(%2319loczb8h__f71x3hmpea)'%20fill-rule='evenodd'/%3e%3c/svg%3e",S="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.03846154,2.5%20C7.295,2.5%206.6923077,3.10269231%206.6923077,3.84615384%20L6.6923077,4.42307693%20L4.38461538,4.42307693%20C4.17230769,4.42307693%204,4.59538461%204,4.8076923%20L4,6.92307693%20L4.57692308,6.92307693%20C5.32038461,6.92307693%205.92307693,7.52576923%205.92307693,8.26923077%20C5.92307693,9.0126923%205.32038461,9.61538461%204.57692308,9.61538461%20L4,9.61538461%20L4,12.1153846%20C4,12.3276923%204.17230769,12.5%204.38461538,12.5%20L6.6923077,12.5%20L6.6923077,11.9230769%20C6.6923077,11.1796154%207.295,10.5769231%208.03846154,10.5769231%20C8.78192307,10.5769231%209.38461539,11.1796154%209.38461539,11.9230769%20L9.38461539,12.5%20L11.6923077,12.5%20C11.9046154,12.5%2012.0769231,12.3276923%2012.0769231,12.1153846%20L12.0769231,9.61538461%20L12.6538462,9.61538461%20C13.3973077,9.61538461%2014,9.0126923%2014,8.26923077%20C14,7.52576923%2013.3973077,6.92307693%2012.6538462,6.92307693%20L12.0769231,6.92307693%20L12.0769231,4.8076923%20C12.0769231,4.59538461%2011.9046154,4.42307693%2011.6923077,4.42307693%20L9.38461539,4.42307693%20L9.38461539,3.84615384%20C9.38461539,3.10269231%208.78192307,2.5%208.03846154,2.5%20Z'%20fill='%235AB88E'%20fill-rule='evenodd'/%3e%3c/svg%3e",Z="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='vgdxp7v4l__zvhmfdo4ha'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M8.44875881,3.88645164%20C7.88887563,4.38553286%207.31548649,5.06473362%206.78138741,5.85400744%20C6.4216379,5.88402737%206.07416654,5.92655559%205.74142896,5.98159211%20C5.68126606,5.77270348%205.6321535,5.570069%205.59409127,5.37619034%20C5.50937211,4.9434031%205.48727146,4.57065572%205.52901714,4.29797476%20C5.55848467,4.10784858%205.61741973,3.97275892%205.6935442,3.92772904%20C5.81878123,3.85393006%206.26447771,3.90646492%207.05027868,4.63319723%20L7.64454064,3.96650477%20C7.22094482,3.57499494%206.82067746,3.29856148%206.45356107,3.14470937%20C6.13432943,3.01087055%205.66653229,2.90329916%205.25153116,3.14721103%20C4.84512474,3.38611959%204.42398453,3.99777552%204.72725459,5.55130656%20C4.76531682,5.74893772%204.81442938,5.95282302%204.87336445,6.16421332%20C4.66586389,6.21799902%204.46818584,6.27678802%204.2815581,6.34183119%20C2.80940913,6.85216989%202.5,7.528869%202.5,8.0066861%20C2.5,8.49826234%202.82905415,8.85850142%203.10654011,9.07364421%20C3.42454394,9.32130857%203.86532916,9.53770219%204.41661765,9.71532006%20L4.68428111,8.85725059%20C3.65660079,8.5257806%203.38525389,8.1555349%203.38525389,8.0066861%20C3.38525389,7.91787716%203.46997306,7.79654664%203.61731074,7.67646695%20C3.82849474,7.50385239%204.15754889,7.33749199%204.56641096,7.19489735%20C4.75058305,7.13110501%204.9470333,7.07356682%205.15330604,7.02228279%20C5.27240401,7.34374613%205.41114699,7.67271446%205.56585156,8.00543527%20C5.34975629,8.47074408%205.16558418,8.93230041%205.01824651,9.37384344%20C4.76040556,10.1518598%204.62534603,10.8610805%204.62780166,11.4227032%20C4.63025729,11.9092761%204.74076054,12.5522028%205.25521461,12.8549037%20C5.43570327,12.9612243%205.62478661,13%205.80895872,13%20C6.05083808,13%206.2804393,12.9312044%206.46338358,12.8549037%20C6.8329556,12.6998008%207.23567859,12.4196148%207.66050223,12.0243525%20L7.06501244,11.3589109%20C6.27184459,12.0956498%205.82369249,12.1494355%205.69722765,12.0743857%20C5.60882504,12.0218508%205.51428337,11.8229689%205.51182774,11.4176999%20C5.50937211,10.9536419%205.62847006,10.3457385%205.85561565,9.66028354%20C5.92437324,9.45264574%206.00172552,9.24125546%206.08890031,9.02611266%20C6.10363407,9.05112927%206.11714004,9.07614586%206.13187381,9.1024133%20C6.59967093,9.92671036%207.13254221,10.6947201%207.67400818,11.321386%20C8.20687945,11.9380452%208.74220636,12.4121098%209.22105382,12.691045%20C9.49240072,12.8499004%209.84601114,13%2010.2008494,13%20C10.3874771,13%2010.5753327,12.9587226%2010.7533657,12.8536529%20C11.2678198,12.550952%2011.378323,11.9067745%2011.3807786,11.4202015%20C11.3832343,10.8585788%2011.2481747,10.1493581%2010.9903338,9.37009095%20C10.8589577,8.97232696%2010.6956584,8.55705136%2010.5065751,8.13802326%20L9.70235691,8.5170248%20C9.87916211,8.9072838%2010.0301832,9.29128866%2010.1517368,9.66028354%20C10.3788824,10.3457385%2010.4979804,10.9536419%2010.4955247,11.4189507%20C10.4942969,11.8242197%2010.3985274,12.0243525%2010.3101248,12.0756365%20C10.2217222,12.1281714%2010.0043991,12.1119106%209.65938341,11.910527%20C9.2640273,11.6803742%208.80605269,11.2713527%208.33702774,10.7272417%20C7.833624,10.1443548%207.33513152,9.42762914%206.89680191,8.65336529%20C6.77402052,8.43697167%206.658606,8.22182889%206.55055837,8.00543527%20C6.65983383,7.78654%206.77647615,7.56889555%206.89925754,7.35250195%20C7.02081114,7.13735916%207.14604815,6.92847053%207.27496864,6.72583605%20C7.51316455,6.71332774%207.7550439,6.70707359%208.00060669,6.70707359%20C9.30454518,6.70707359%2010.5249923,6.88093898%2011.4348024,7.19614818%20C11.8448923,7.33749199%2012.1727187,7.50385239%2012.3839027,7.67771778%20C12.5312403,7.7990483%2012.6159595,7.91912799%2012.6159595,8.00793694%20C12.6159595,8.10425085%2012.5189622,8.23433719%2012.3495239,8.36567435%20C12.111328,8.54954639%2011.7442116,8.72341178%2011.2886926,8.86850806%20L11.5526726,9.72782838%20C12.1125558,9.55021049%2012.5607079,9.33256604%2012.883623,9.08365086%20C13.1647924,8.86725724%2013.5,8.50451651%2013.5,8.00793694%20C13.5012134,7.528869%2013.1918043,6.85216989%2011.7196553,6.34183119%20C10.7202147,5.99535125%209.39908685,5.80522507%208.00060669,5.80522507%20L7.91097628,5.80522507%20C8.2805483,5.31740132%208.66117063,4.89587157%209.03197046,4.56440157%20C9.35734117,4.27420898%209.66306686,4.06782201%209.91599654,3.9677556%20C10.0928018,3.89770911%2010.2376838,3.88394998%2010.3138083,3.92772904%20C10.3960718,3.97651141%2010.4586903,4.12786186%2010.4844744,4.34425547%20C10.5213088,4.64945802%2010.4844744,5.06348279%2010.3776546,5.54129991%20L11.23958,5.7401819%20C11.3697283,5.15354257%2011.411474,4.64695636%2011.3611336,4.23418242%20C11.3181601,3.87519417%2011.1781893,3.39612623%2010.7545935,3.14721103%20C10.3481871,2.90830248%209.61886555,2.84200848%208.44875881,3.88645164%20Z%20M8.42307307,6.91304349%20C7.83892612,6.91304349%207.36538145,7.39969049%207.36538145,8%20C7.36538145,8.60030951%207.83892612,9.08695653%208.42307307,9.08695653%20C9.00722001,9.08695653%209.48076468,8.60030951%209.48076468,8%20C9.48076468,7.39969049%209.00722001,6.91304349%208.42307307,6.91304349%20Z'%20fill='url(%23vgdxp7v4l__zvhmfdo4ha)'%20fill-rule='evenodd'/%3e%3c/svg%3e",V="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2016%2016'%20class='design-iconfont'%3e%3cdefs%3e%3clinearGradient%20x1='0%25'%20y1='0%25'%20x2='100%25'%20y2='96.1961861%25'%20id='7doce0e6d__r8m44v5xza'%3e%3cstop%20stop-color='%234D76E3'%20offset='0%25'/%3e%3cstop%20stop-color='%23D787EE'%20offset='100%25'/%3e%3c/linearGradient%3e%3c/defs%3e%3cpath%20d='M13,1%20C14.1045695,1%2015,1.8954305%2015,3%20L15,13%20C15,14.1045695%2014.1045695,15%2013,15%20L3,15%20C1.8954305,15%201,14.1045695%201,13%20L1,3%20C1,1.8954305%201.8954305,1%203,1%20L13,1%20Z%20M11,3.5%20L5,3.5%20C3.8954305,3.5%203,4.3954305%203,5.5%20L3,9.5%20C3,10.6045695%203.8954305,11.5%205,11.5%20L9.536,11.5%20L12.0312272,13.0147852%20L11.4996566,11.5%20L11.0252355,11.4998441%20C12.1181756,11.4863297%2013,10.5961454%2013,9.5%20L13,5.5%20C13,4.3954305%2012.1045695,3.5%2011,3.5%20Z%20M8,9%20C8.27614237,9%208.5,9.22385763%208.5,9.5%20C8.5,9.77614237%208.27614237,10%208,10%20L5,10%20C4.72385763,10%204.5,9.77614237%204.5,9.5%20C4.5,9.22385763%204.72385763,9%205,9%20Z%20M11,7%20C11.2761424,7%2011.5,7.22385763%2011.5,7.5%20C11.5,7.77614237%2011.2761424,8%2011,8%20L5,8%20C4.72385763,8%204.5,7.77614237%204.5,7.5%20C4.5,7.22385763%204.72385763,7%205,7%20Z%20M11,5%20C11.2761424,5%2011.5,5.22385763%2011.5,5.5%20C11.5,5.77614237%2011.2761424,6%2011,6%20L5,6%20C4.72385763,6%204.5,5.77614237%204.5,5.5%20C4.5,5.22385763%204.72385763,5%205,5%20Z'%20fill='url(%237doce0e6d__r8m44v5xza)'%20fill-rule='evenodd'/%3e%3c/svg%3e",$="data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='UTF-8'?%3e%3csvg%20width='32px'%20height='32px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3ctitle%3eIcon/Node/知识库%3c/title%3e%3cdefs%3e%3clinearGradient%20x1='2.20648492%25'%20y1='2.12255434%25'%20x2='100%25'%20y2='96.1961861%25'%20id='linearGradient-1'%3e%3cstop%20stop-color='%234DB9E3'%20offset='0%25'%3e%3c/stop%3e%3cstop%20stop-color='%23BA70EF'%20offset='100%25'%3e%3c/stop%3e%3c/linearGradient%3e%3c/defs%3e%3cg%20id='Icon/Node/知识库'%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cpath%20d='M28,2%20C29.1045695,2%2030,2.8954305%2030,4%20L30,28%20C30,29.1045695%2029.1045695,30%2028,30%20L4,30%20C2.8954305,30%202,29.1045695%202,28%20L2,4%20C2,2.8954305%202.8954305,2%204,2%20L28,2%20Z%20M17.3479972,6%20L14.1475857,6%20C13.7208642,6%2013.3652629,6.35778176%2013.3652629,6.78711986%20L13.3652629,25.2128801%20C13.3652629,25.6422183%2013.7208642,26%2014.1475857,26%20L17.3479972,26%20C17.7747188,26%2018.1303201,25.6422183%2018.1303201,25.2128801%20L18.1303201,6.78711986%20C18.1658802,6.35778176%2017.8102789,6%2017.3479972,6%20Z%20M10.9827343,8.64758499%20L7.78232282,8.64758499%20C7.35560129,8.64758499%207,9.00536675%207,9.43470484%20L7,25.2128801%20C7,25.6422183%207.35560129,26%207.78232282,26%20L10.9827343,26%20C11.4094559,26%2011.7650571,25.6422183%2011.7650571,25.2128801%20L11.7650571,9.43470484%20C11.7650571,9.00536673%2011.4094559,8.64758499%2010.9827343,8.64758499%20Z%20M22.1841746,8.25402505%20L22.0419342,8.25402505%20L18.9126429,8.86225404%20C18.4859213,8.93381039%2018.2014403,9.36314849%2018.2725606,9.7924866%20L21.2951715,25.3202147%20C21.3662917,25.7137746%2021.6863328,25.9642218%2022.0774943,25.9642218%20L22.2197348,25.9642218%20L25.349026,25.3559928%20C25.7757476,25.2486584%2026.0602286,24.8193202%2025.9891084,24.3899821%20L23.0020576,8.89803221%20C22.8953773,8.50447228%2022.575336,8.25402505%2022.1841746,8.25402505%20Z%20M10.0937311,10.4364937%20C10.4848925,10.4364937%2010.8049337,10.7584973%2010.8049337,11.1520572%20C10.8049337,11.5456172%2010.4848925,11.8676208%2010.0937311,11.8676208%20L8.67132601,11.8676208%20C8.28016461,11.8676208%207.96012346,11.5456172%207.96012346,11.1520572%20C7.96012346,10.7584973%208.28016461,10.4364937%208.67132601,10.4364937%20L10.0937311,10.4364937%20Z%20M22.4686557,10.4722719%20C22.539776,10.8658319%2022.2908551,11.2593918%2021.8996937,11.3309481%20L20.4772885,11.6171735%20L20.335048,11.6171735%20C20.0150069,11.6171735%2019.6949657,11.3667263%2019.6238455,11.0447227%20C19.5527252,10.6511628%2019.8016461,10.2576029%2020.1928074,10.1860465%20L21.6152126,9.89982112%20C22.006374,9.82826478%2022.3975355,10.078712%2022.4686557,10.4722719%20Z%20M16.4945542,7.82468694%20C16.8857156,7.82468694%2017.2057567,8.14669052%2017.2057567,8.54025046%20C17.2057567,8.9338104%2016.8857156,9.25581397%2016.4945542,9.25581397%20L15.072149,9.25581397%20C14.6809876,9.25581397%2014.3609465,8.93381039%2014.3609465,8.54025046%20C14.3609465,8.14669054%2014.6809876,7.82468694%2015.072149,7.82468694%20L16.4945542,7.82468694%20Z'%20id='形状结合备份'%20fill='url(%23linearGradient-1)'%3e%3c/path%3e%3c/g%3e%3c/svg%3e",D=S,w="sops",j="标准运维插件",z="sops",H="sops_",T="标准运维",b={bkflow:S,[w]:S,data:B,agent:U,model:Z,output:V,knowledgebase:$},W={bkflow:"bkflow-canvas-icon bkflow-canvas-plugin",[w]:"bkflow-canvas-icon bkflow-canvas-plugin",data:"bkflow-canvas-icon bkflow-canvas-data",agent:"bkflow-canvas-icon bkflow-canvas-zhinengti",model:"bkflow-canvas-icon bkflow-canvas-model-filled",knowledgebase:"bkflow-canvas-icon bkflow-canvas-knowledgebase-filled"},x=t=>!!(t.fetchSopsPluginCategories&&t.fetchSopsPluginList&&t.fetchSopsPluginDetail);function K(t){if(!x(t))throw new Error("标准运维插件目录查询接口缺失:fetchSopsPluginCategories / fetchSopsPluginList / fetchSopsPluginDetail");return t}const X=(t,e)=>{const a=e?.display_name||t;return(a.startsWith(T)?a.slice(T.length):a)||a},Y=(t,e)=>e?t.startsWith(H)||e.source_key===z:!1;function E(t){const e=t?.uniform_api?.api??{};return Object.entries(e).filter(([a,u])=>Y(a,u)).map(([a,u])=>({id:a,name:X(a,u)}))}function Q(t,e){const a=E(e.spaceConfig);return a.length===0||!x(e.api)?t:[...t,{id:w,name:w,alias:j,properties:{},iconUrl:b[w],children:a}]}function q(t){return(t.find(a=>a.name===w)?.children??[]).filter(a=>"id"in a&&"name"in a)}const C="请求失败";class p extends Error{httpStatus;code;data;cause;constructor(e,a={}){super(e||C),this.name="ApiError",this.httpStatus=a.httpStatus,this.code=a.code,this.data=a.data,this.cause=a.cause}}const _=t=>Object.prototype.toString.call(t)==="[object Object]",v=t=>_(t)&&typeof t.result=="boolean"&&Object.prototype.hasOwnProperty.call(t,"data")&&(Object.prototype.hasOwnProperty.call(t,"code")||Object.prototype.hasOwnProperty.call(t,"message")),h=t=>typeof t=="string"?t:_(t)?typeof t.err_msg=="string"?t.err_msg:typeof t.message=="string"?t.message:typeof t.detail=="string"?t.detail:_(t.detail)&&typeof t.detail.detail=="string"?t.detail.detail:"":"";function J(t){const e=_(t)&&typeof t.status=="number"&&Object.prototype.hasOwnProperty.call(t,"config")&&Object.prototype.hasOwnProperty.call(t,"data"),a=e?t.data:t;if(!v(a))return a;if(a.result)return a.data;throw new p(h(a)||C,{code:a.code===void 0||a.code===null?void 0:String(a.code),httpStatus:e?t.status:void 0,data:a.data,cause:t})}function N(t){if(t instanceof p)return t;if(P.isAxiosError(t)){const e=t.response?.data;return v(e)&&!e.result?new p(h(e)||t.message||C,{httpStatus:t.response?.status,code:e.code===void 0||e.code===null?void 0:String(e.code),data:e.data,cause:t}):new p(h(e)||t.response?.statusText||t.message||C,{httpStatus:t.response?.status,data:e,cause:t})}if(_(t)&&_(t.response)){const e=t.response,a=e.data;return v(a)&&!a.result?new p(h(a)||C,{httpStatus:typeof e.status=="number"?e.status:void 0,code:a.code===void 0||a.code===null?void 0:String(a.code),data:a.data,cause:t}):new p(h(a)||(typeof e.statusText=="string"?e.statusText:"")||C,{httpStatus:typeof e.status=="number"?e.status:void 0,data:a,cause:t})}return t instanceof Error?new p(t.message,{cause:t}):typeof t=="string"?new p(t,{cause:t}):new p(h(t)||C,{data:t,cause:t})}const O=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1),e2=(t=8)=>{let e="";for(let a=0;a<t-1;a++)e+=O();return e},I=(t=32)=>{let e="";const a="abcdef0123456789";for(let u=0;u<t;u++)e+=a.charAt(Math.floor(Math.random()*a.length));return e},t2=()=>`00-${I(32)}-${I(16)}-01`,s2=t=>t.httpStatus!==401&&t.httpStatus!==404&&!!t.message&&!t.message.includes("1211011");function a2(t){const{headers:e,...a}=t.axiosConfig||{},u={baseURL:t.baseURL||(typeof window>"u"?void 0:window.API_HOST),xsrfCookieName:t.xsrfCookieName||"bk-incident_csrftoken",xsrfHeaderName:"X-CSRFToken",withCredentials:!0,...a,headers:t.axiosConfig?.headers},i=t.axiosInstance??P.create(u),c=(r={})=>{const s={...r},o=P.AxiosHeaders.from(s.headers);return o.has("traceparent")||o.set("traceparent",t2()),{...s,headers:o}};async function n(r,s={}){try{return J(await r())}catch(o){const l=N(o);throw s.errorHandling!=="delegate"&&s2(l)&&R({theme:"error",message:l.message,ellipsisLine:3}),l}}return{request(r){return n(()=>i.request(c(r)),r)},get(r,s={}){return n(()=>i.get(r,c(s)),s)},delete(r,s={}){return n(()=>i.delete(r,c(s)),s)},post(r,s,o={}){return n(()=>i.post(r,s,c(o)),o)},put(r,s,o={}){return n(()=>i.put(r,s,c(o)),o)},patch(r,s,o={}){return n(()=>i.patch(r,s,c(o)),o)}}}const d="/bkflow/template",g={errorHandling:"delegate"};function o2(t,e){const{scope_type:a,scope_value:u,space_id:i}=e,c=n=>({template_id:Number(n),space_id:i,scope_type:a,scope_value:u});return{fetchDebugContext(n){return t.get(`${d}/debug_context/`,{...g,params:c(n)})},fetchDebugInputSchema(n){return t.get(`${d}/debug_input_schema/`,{...g,params:c(n)})},fetchDebugResetImpact(n){return t.post(`${d}/debug_reset_impact/`,{...c(n)},g)},updateNodeDebugMock(n){const r={...c(n.templateId),node_id:n.nodeId,enable:n.enable};return n.mockResult!==void 0&&(r.mock_result=n.mockResult),n.mockOutputs!==void 0&&(r.mock_outputs=n.mockOutputs),n.mockError!==void 0&&(r.mock_error=n.mockError),t.post(`${d}/debug_node_mock/`,r,g)},runNodeDebugStep(n){const r={...c(n.templateId),node_id:n.nodeId,mode:n.mode};return n.inputOverrides!==void 0&&(r.input_overrides=n.inputOverrides),n.mockResult!==void 0&&(r.mock_result=n.mockResult),n.mockOutputs!==void 0&&(r.mock_outputs=n.mockOutputs),n.mockError!==void 0&&(r.mock_error=n.mockError),t.post(`${d}/debug_step_run/`,r,g)},runGlobalDebug(n){return t.post(`${d}/debug_global_run/`,{...c(n.templateId),inputs:n.inputs},g)},terminateDebug(n){const r={...c(n.templateId)};return n.nodeId!==void 0&&(r.node_id=n.nodeId),t.post(`${d}/debug_terminate/`,r,g)},resetDebugResult(n){const r={...c(n.templateId)};return n.nodeIds!==void 0&&(r.node_ids=n.nodeIds),t.post(`${d}/debug_reset/`,r,g)}}}const A=0,n2=["dmn_plugin","subprocess_plugin"],G=(t=[])=>[{code_name:"INNER",id:A,name:"内置",priority:1},...t];function r2(t){const e=a2(t),{scopeData:a}=t,u=o2(e,a),i=s=>({...s,...a}),c=async()=>await e.get("/bkflow/plugin/tags/",{params:{...a}}),n=async()=>[...(await e.get("/metas/category/list_categories/",{params:a})).map(o=>({...o,iconUrl:b[o.name]??D})),{id:"bkflow",name:"bkflow",alias:"插件",properties:{},iconUrl:b.bkflow??D}],r=async s=>(await e.post("/metas/plugin/list_plugins/",i({category:s}))).apis;return{...u,async fetchFlowDetail(s){return await e.get(`/bkflow/template/${s}/fetch_template/`,{params:a})},async fetchFlowDetailByVersion(s,o){return await e.post(`/bkflow/template/${s}/preview_task_tree/`,{...a,is_all_nodes:!0,version:o})},async fetchFlowDraftDetail(s){return await e.get(`/bkflow/template/${s}/get_draft_template/`,{params:a})},async fetchSpaceFlowConfig(s){return await e.get(`/bkflow/template/${s}/get_space_related_configs/`,{params:a})},async fetchSystemVariables(s){const o=await e.get("/bkflow/variable/system_variables/",{params:{template_id:s,...a}});return Object.values(o)},async saveFlow(s,o){await e.put(`/bkflow/template/${s}/update_template/`,i(o))},async fetchInnerVariableDetail(s){return await e.get(`/bkflow/variable/${s}/variable_class_detail/`,{params:{...a}})},async fetchBkFlowInnerPluginList(){return(await e.get("/bkflow/inner_plugin/plugins/",{params:{...a}})).filter(o=>!n2.includes(o.code))},async fetchBkFlowInnerPluginDetail(s,o){return await e.get(`/bkflow/inner_plugin/${s}/plugin_detail/`,{params:{version:o,...a}})},async fetchBkFlowThirdPartyPluginTags(){return c()},async fetchBkFlowThirdPartyPluginList(s){return await e.get("/bkflow/plugin/list_plugin/",{params:{tag:s,...a}})},async searchBkFlowThirdPartyPlugins(s){return await e.get("/bkflow/plugin/list_plugin/",{params:{offset:0,limit:200,search_term:s,...a}})},async fetchBkFlowThirdPartyPluginMeta(s){return await e.get("/bkflow/plugin/meta/",{params:{plugin_code:s,...a}})},async fetchBkFlowThirdPartyPluginAppDetail(s,o){return await e.get("/bkflow/plugin/get_plugin_app_detail/",{params:{plugin_code:s,plugin_version:o,...a}})},async fetchBkFlowThirdPartyPluginDetail(s,o){return await e.get("/bkflow/plugin/plugin_detail/",{params:{plugin_code:s,plugin_version:o,with_app_detail:!0,...a}})},async fetchPluginGroupList(){return n()},async fetchCategoryPlugins(s){return r(s)},async fetchPluginDetail(s){return await e.get("/metas/plugin/get_plugin/",{params:{plugin_id:s,...a}})},async fetchAllPluginGroups(){const s=t.enableThirdPlugin!==!1,[o,l]=await Promise.all([n(),s?c():Promise.resolve([])]),k=o.map(async f=>{if(f.name==="bkflow")return{...f,children:G(s?l:[])};const L=await r(f.name);return{...f,children:L.map(y=>({...y,category_id:f.id}))}});return await Promise.all(k)},async fetchSopsPluginCategories(s){return await e.get("/bkflow/uniform/category_list/",{params:{...s,...a}})},async fetchSopsPluginList(s){return await e.get("/bkflow/uniform/uniform_plugin_list/",{params:{...s,...a}})},async fetchSopsPluginDetail(s){return await e.post("/bkflow/inner_plugin/plugin_all_types_detail/",{space_id:String(a.space_id),template_id:String(s.template_id),plugin_type:s.plugin_type,plugin_code:s.plugin_code,plugin_version:s.plugin_version,source_key:s.source_key??"",scope_type:a.scope_type,scope_value:String(a.scope_value)})},async fetchApplyInstructionData(s){return await e.post("/metas/plugin/apply_instruction/",i(s))},async fetchVariableRef(s){return{data:await e.post("/bkflow/template/analysis_constants_ref/",i(s))}},async fetchCustomVariableTypes(){return{data:await e.get("/bkflow/variable/variable_class_list/",{params:a})}},async fetchFlowOperateRecord(s){return{data:await e.get(`/bkflow/template/${s}/operation_record/`,{params:a})}},async createFlowTask(s){return{data:await e.post("/bkflow/template/create_task/",i(s))}},async getFlowTaskDetail(s){return await e.get("/bkflow/template/get_task_detail/",{params:{task_id:s.task_id,...a}})},async executeFlowTask(s){await e.post("/bkflow/template/operate_task/",i({...s,action:"start"}))},async revokeFlowTask(s){await e.post("/bkflow/template/operate_task/",i({...s,action:"revoke"}))},async fetchControlConfig(){return await e.get("/bkflow/space_config/get_control_config/",{params:a})},async checkSpaceConfig(s,o){return await e.get(`/bkflow/space_config/${s}/check_space_config/`,{params:{...a,...o}})},async drawPipeline(s){return await e.post("/bkflow/template/draw_pipeline/",i(s))},async createMockDebugTask(s){const{template_id:o,...l}=s;return{data:await e.post(`/bkflow/template/${o}/create_mock_task/`,i(l))}},async stopMockDebugTask(s){throw new Error("TODO(mock-debug-api): replace with final mock debug stop API.")},async fetchTaskState(s){return await e.get("/bkflow/template/get_task_states/",{params:{task_id:s.task_id,...a}})},async fetchTaskNodeDetail(s){return await e.get("/bkflow/task/get_task_node_detail/",{params:{task_id:s.task_id,node_id:s.node_id,...s.component_code?{component_code:s.component_code}:{},...a}})},async fetchTaskNodeSnapshot(s){return await e.get("/bkflow/task/get_node_snapshot_config/",{params:{task_id:s.task_id,node_id:s.node_id,...a}})},async fetchTaskNodeLog(s){return await e.get("/bkflow/task/get_task_node_log/",{params:{task_id:s.task_id,node_id:s.node_id,version:s.version,...a}})},async operateTaskNode(s){const o={retry:"retry",skip:"skip",forceFail:"forced_fail",resume:"callback",gatewaySkip:"skip_exg"},{task_id:l,node_id:k,action:m,data:f,operation:L}=s,y=L??o[m]??m;return await e.post(`/bkflow/task/${l}/node/${k}/operate_node/${y}/`,i(f??{}))}}}function i2(t){const e=r2(t);return{fetchFlowDetail:e.fetchFlowDetail,fetchFlowDraftDetail:e.fetchFlowDraftDetail,fetchFlowDetailByVersion:e.fetchFlowDetailByVersion,fetchSpaceFlowConfig:e.fetchSpaceFlowConfig,fetchSystemVariables:e.fetchSystemVariables,fetchUserApi:t.fetchUserApi,scopeData:t.scopeData,fetchVariableRef:e.fetchVariableRef,fetchCustomVariableTypes:e.fetchCustomVariableTypes,fetchFlowOperateRecord:e.fetchFlowOperateRecord,createFlowTask:e.createFlowTask,executeFlowTask:e.executeFlowTask,revokeFlowTask:e.revokeFlowTask,saveFlow:e.saveFlow,fetchBkFlowInnerPluginList:e.fetchBkFlowInnerPluginList,fetchInnerVariableDetail:e.fetchInnerVariableDetail,fetchBkFlowInnerPluginDetail:e.fetchBkFlowInnerPluginDetail,fetchBkFlowThirdPartyPluginList:e.fetchBkFlowThirdPartyPluginList,searchBkFlowThirdPartyPlugins:e.searchBkFlowThirdPartyPlugins,fetchBkFlowThirdPartyPluginTags:e.fetchBkFlowThirdPartyPluginTags,fetchBkFlowThirdPartyPluginMeta:e.fetchBkFlowThirdPartyPluginMeta,fetchBkFlowThirdPartyPluginDetail:e.fetchBkFlowThirdPartyPluginDetail,fetchBkFlowThirdPartyPluginAppDetail:e.fetchBkFlowThirdPartyPluginAppDetail,fetchPluginGroupList:e.fetchPluginGroupList,fetchCategoryPlugins:e.fetchCategoryPlugins,fetchPluginDetail:e.fetchPluginDetail,fetchApplyInstructionData:e.fetchApplyInstructionData,fetchAllPluginGroups:e.fetchAllPluginGroups,fetchSopsPluginCategories:e.fetchSopsPluginCategories,fetchSopsPluginList:e.fetchSopsPluginList,fetchSopsPluginDetail:e.fetchSopsPluginDetail,enableThirdPlugin:t.enableThirdPlugin,fetchControlConfig:e.fetchControlConfig,checkSpaceConfig:e.checkSpaceConfig,drawPipeline:e.drawPipeline,createMockDebugTask:e.createMockDebugTask,stopMockDebugTask:e.stopMockDebugTask,fetchTaskState:e.fetchTaskState,fetchTaskNodeDetail:e.fetchTaskNodeDetail,fetchTaskNodeSnapshot:e.fetchTaskNodeSnapshot,fetchTaskNodeLog:e.fetchTaskNodeLog,operateTaskNode:e.operateTaskNode,getFlowTaskDetail:e.getFlowTaskDetail,fetchDebugContext:e.fetchDebugContext,fetchDebugInputSchema:e.fetchDebugInputSchema,fetchDebugResetImpact:e.fetchDebugResetImpact,updateNodeDebugMock:e.updateNodeDebugMock,runNodeDebugStep:e.runNodeDebugStep,runGlobalDebug:e.runGlobalDebug,terminateDebug:e.terminateDebug,resetDebugResult:e.resetDebugResult}}const M=Symbol("variableInputCreateVariable"),c2=t=>{F.provide(M,t)},l2=()=>F.inject(M,null);exports.ApiError=p;exports.BKFLOW_INNER_PLUGIN_TAG_ID=A;exports.PLUGGIN_GROUP_FONT_CLASS_MAP=W;exports.PLUGIN_GROUP_DEFAULT_ICON=D;exports.PLUGIN_GROUP_ICON_MAP=b;exports.SOPS_PLUGIN_GROUP_NAME=w;exports.buildBkflowPluginTagList=G;exports.ensureSopsCatalogApi=K;exports.generateId=e2;exports.getSopsPluginSources=q;exports.normalizeApiError=N;exports.provideVariableInputCreateVariable=c2;exports.random4=O;exports.resolveSopsPluginSources=E;exports.useFlowApi=i2;exports.useVariableInputCreateVariable=l2;exports.withSopsPluginGroup=Q;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./index-BRwaB9qA.cjs"),L={class:"debug-result-node-list"},D=["data-node-id","aria-selected","onClick","onKeydown"],z=["title"],A={key:0,class:"debug-result-node-list__mock","data-test":"node-mock-flag"},P={key:1,class:"debug-result-node-list__empty"},I=e.defineComponent({__name:"node-list",props:{nodes:{},modelValue:{default:""}},emits:["update:modelValue"],setup(c,{emit:g}){const t=c,s=g,r=e.ref(""),m=e.ref("all"),_=e.ref(null),p={not_run:"未执行",finished:"成功",failed:"失败",running:"正在调试",suspended:"挂起",skipped:"跳过",revoked:"终止"},k=[{value:"all",label:"全部"},{value:"finished",icon:"bkflow-canvas-dark-circle-checkbox",iconColor:"#5fb8ac",tooltip:p.finished},{value:"failed",icon:"bkflow-canvas-dark-circle-close",iconColor:"#fa4e41",tooltip:p.failed},{value:"revoked",icon:"bkflow-canvas-stop-fill",iconColor:"#fa4e41",tooltip:p.revoked},{value:"running",iconComponent:d.LoadingStatusIcon,iconColor:"#3a84ff",tooltip:p.running},{value:"not_run",icon:"bkflow-canvas-weizhixing2",iconColor:"#b8bbc4",tooltip:p.not_run},{value:"suspended",icon:"bkflow-canvas-zanting",iconColor:"#f59500",tooltip:p.suspended},{value:"skipped",icon:"bkflow-canvas-tiaoguo2",iconColor:"#6e89af",tooltip:p.skipped}],w=e.computed(()=>k.map(a=>({...a,count:a.value==="all"?t.nodes.length:t.nodes.filter(n=>n.status===a.value).length}))),V=e.computed(()=>{const a=r.value.trim().toLowerCase();return t.nodes.filter(n=>m.value!=="all"&&n.status!==m.value?!1:a?n.name.toLowerCase().includes(a)||n.type.toLowerCase().includes(a)||(n.typeName??"").toLowerCase().includes(a):!0)}),C=e.computed(()=>r.value.trim()?"搜索结果为空":m.value!=="all"?`暂无${p[m.value]}状态节点`:"暂无节点"),x=()=>{r.value="",m.value="all"},y=a=>{const n=_.value,v=n?.querySelector(`[data-node-id="${CSS.escape(a)}"]`);if(!n||!v)return;const o=n.getBoundingClientRect(),b=v.getBoundingClientRect();b.top<o.top?n.scrollTop-=o.top-b.top:b.bottom>o.bottom&&(n.scrollTop+=b.bottom-o.bottom)};return e.watch(()=>t.modelValue,async a=>{if(!a)return;!V.value.some(v=>v.id===a)&&t.nodes.some(v=>v.id===a)&&(r.value="",m.value="all"),await e.nextTick(),y(a)},{flush:"post"}),(a,n)=>{const v=e.resolveComponent("bk-input");return e.openBlock(),e.createElementBlock("aside",L,[e.createVNode(v,{modelValue:r.value,"onUpdate:modelValue":n[0]||(n[0]=o=>r.value=o),class:"debug-result-node-list__search",placeholder:"搜索节点名称 / 类型",type:"search",clearable:"","data-test":"node-search"},null,8,["modelValue"]),e.createVNode(d.SegmentTabs,{modelValue:m.value,"onUpdate:modelValue":n[1]||(n[1]=o=>m.value=o),class:"debug-result-node-list__filters","data-test":"status-filters",items:w.value},null,8,["modelValue","items"]),V.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"itemsRef",ref:_,class:"debug-result-node-list__items",role:"listbox"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id,class:e.normalizeClass(["debug-result-node-list__item",`is-${o.status}`,{"is-active":o.id===t.modelValue,"is-unconfigured":!o.isConfigured}]),role:"option","data-test":"node-item","data-node-id":o.id,"aria-selected":o.id===t.modelValue,tabindex:"0",onClick:b=>s("update:modelValue",o.id),onKeydown:e.withKeys(e.withModifiers(b=>s("update:modelValue",o.id),["prevent"]),["enter","space"])},[e.createElementVNode("span",{class:e.normalizeClass(["debug-result-node-list__status",`is-${o.status}`,{"is-placeholder":!o.isConfigured}])},[o.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(o.icon),"data-test":"node-icon"},null,2)):e.createCommentVNode("",!0)],2),e.createElementVNode("span",{class:"debug-result-node-list__name",title:o.isConfigured?`${o.name} ${o.typeName||o.type}`:o.name},e.toDisplayString(o.name),9,z),o.isMock?(e.openBlock(),e.createElementBlock("span",A,"MOCK")):e.createCommentVNode("",!0)],42,D))),128))],512)):(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(d.EmptyException,{"is-search":!1,title:C.value,onClear:x},null,8,["title"])]))])}}}),H=d._export_sfc(I,[["__scopeId","data-v-db0cb31c"]]);function U(c){if(c==null)return"";if(typeof c=="string")return c;if(typeof c=="object"){const g=c,t=g.message;if(typeof t=="string"&&t){const s=g.type;return typeof s=="string"&&s?`${s}: ${t}`:t}try{return JSON.stringify(c)}catch{return String(c)}}return String(c)}const O={class:"debug-result-tabs"},F={class:"debug-result-tabs__failed-actions","data-test":"output-error-actions"},G={class:"debug-result-tabs__execution","data-test":"tab-execution"},K={class:"debug-result-tabs__row"},j={class:"value"},q={class:"debug-result-tabs__row"},Y={class:"value"},J={key:0,class:"debug-result-tabs__row is-error"},Q={class:"value"},W={class:"debug-result-tabs__mock-hint","data-test":"mock-banner"},X={class:"debug-result-tabs__logs","data-test":"tab-logs"},Z=e.defineComponent({__name:"result-tabs",props:{result:{},component:{},isMock:{type:Boolean,default:!1},canRunNodeDebug:{type:Boolean,default:!1}},emits:["reEditMock","runReal","runMock","logsTabActive"],setup(c,{emit:g}){const t=c,s=g,r=e.ref("execution");e.watch(r,f=>s("logsTabActive",f==="logs"),{immediate:!0});const m={not_run:"未调试",running:"正在调试",finished:"成功",failed:"失败",suspended:"挂起",skipped:"跳过",revoked:"已终止"},_=e.computed(()=>m[t.result.execution.status]??t.result.execution.status),p=e.computed(()=>d.formatSummaryDuration(t.result.execution.durationMs)),k=e.computed(()=>U(t.result.error||t.result.execution.errorDetail)),w=e.computed(()=>t.result.execution.status==="revoked"),V=e.computed(()=>d.isDebugAbnormalStatus(t.result.execution.status)),C=e.computed(()=>w.value?"该节点调试已终止,可":"该节点执行失败,可"),{loading:x,error:y,visibleInputs:a,visibleOutputs:n,outputNameMap:v}=d.usePluginParamMeta({component:()=>t.component}),o=e.computed(()=>t.result.loading||x.value),b=e.computed(()=>t.result.detailError||y.value),h=e.computed(()=>a.value.filter(({key:f})=>Object.prototype.hasOwnProperty.call(t.result.inputs,f)).map(({key:f,name:l})=>({key:f,name:l,value:t.result.inputs[f]}))),B=e.computed(()=>d.orderDebugRowsByDeclaredKeys(d.toDebugOutputValueRows(t.result.outputs,v.value),n.value.map(f=>f.key))),R=e.computed(()=>d.shouldShowMockReEditHint(t.isMock,n.value)),T=e.computed(()=>t.result.logs==null?"":d.normalizeLogText(t.result.logs));return(f,l)=>{const i=e.resolveComponent("bk-button"),u=e.resolveComponent("bk-tab-panel"),S=e.resolveComponent("bk-tab");return e.openBlock(),e.createElementBlock("div",O,[e.createVNode(S,{active:r.value,"onUpdate:active":l[3]||(l[3]=E=>r.value=E),type:"card-grid"},e.createSlots({default:e.withCtx(()=>[e.createVNode(u,{name:"execution",label:"执行信息"},{default:e.withCtx(()=>[e.createElementVNode("div",G,[e.createElementVNode("div",K,[l[8]||(l[8]=e.createElementVNode("span",{class:"label"},"执行状态",-1)),e.createElementVNode("span",j,e.toDisplayString(_.value),1)]),e.createElementVNode("div",q,[l[9]||(l[9]=e.createElementVNode("span",{class:"label"},"调试用时",-1)),e.createElementVNode("span",Y,e.toDisplayString(p.value),1)]),k.value?(e.openBlock(),e.createElementBlock("div",J,[l[10]||(l[10]=e.createElementVNode("span",{class:"label"},"错误信息",-1)),e.createElementVNode("span",Q,e.toDisplayString(k.value),1)])):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(u,{name:"inputs",label:"输入参数"},{default:e.withCtx(()=>[e.createVNode(d.DebugValueTable,{rows:h.value,loading:o.value,error:b.value,"empty-text":"暂无输入参数"},null,8,["rows","loading","error"])]),_:1}),e.createVNode(u,{name:"outputs",label:"输出结果"},{default:e.withCtx(()=>[e.createVNode(d.DebugValueTable,{rows:B.value,loading:o.value,error:b.value,"empty-text":"暂无输出结果"},e.createSlots({_:2},[R.value?{name:"toolbar",fn:e.withCtx(()=>[e.createElementVNode("div",W,[l[12]||(l[12]=e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-info debug-result-tabs__mock-info","aria-hidden":"true"},null,-1)),l[13]||(l[13]=e.createElementVNode("span",null,"当前为 Mock 数据",-1)),e.createVNode(i,{text:"",theme:"primary",size:"small","data-test":"re-edit-mock",onClick:l[2]||(l[2]=E=>s("reEditMock"))},{default:e.withCtx(()=>[...l[11]||(l[11]=[e.createTextVNode(" 重新编辑 ",-1)])]),_:1})])]),key:"0"}:void 0]),1032,["rows","loading","error"])]),_:1}),e.createVNode(u,{name:"logs",label:"调用日志"},{default:e.withCtx(()=>[e.createElementVNode("div",X,[e.createVNode(d.CallLogsViewer,{"log-text":T.value,loading:t.result.logLoading,error:t.result.logError},null,8,["log-text","loading","error"])])]),_:1})]),_:2},[V.value&&t.canRunNodeDebug?{name:"setting",fn:e.withCtx(()=>[e.createElementVNode("div",F,[l[6]||(l[6]=e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-alert"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(C.value),1),e.createVNode(i,{text:"",theme:"primary","data-test":"rerun-real",onClick:l[0]||(l[0]=E=>s("runReal"))},{default:e.withCtx(()=>[...l[4]||(l[4]=[e.createTextVNode("重新调试",-1)])]),_:1}),l[7]||(l[7]=e.createElementVNode("span",null,"或直接",-1)),e.createVNode(i,{text:"",theme:"primary","data-test":"run-mock",onClick:l[1]||(l[1]=E=>s("runMock"))},{default:e.withCtx(()=>[...l[5]||(l[5]=[e.createTextVNode("Mock 输出",-1)])]),_:1})])]),key:"0"}:void 0]),1032,["active"])])}}}),ee=d._export_sfc(Z,[["__scopeId","data-v-2a925689"]]),te={class:"debug-result-drawer__header"},oe={class:"debug-result-drawer__header-left"},le={class:"debug-result-drawer__body"},se={class:"debug-result-drawer__content"},ne={class:"debug-result-drawer__result"},ae={key:1,class:"debug-result-drawer__unselected","data-test":"node-unselected"},N=44,$=420,ue=e.defineComponent({__name:"index",props:{open:{type:Boolean},context:{},pipelineTree:{},mockNodeIds:{},modelValue:{default:""},result:{},hasGlobalRun:{type:Boolean,default:!1},viewParamsPending:{type:Boolean,default:!1},offsetLeft:{default:0}},emits:["update:open","update:modelValue","reEditMock","runReal","runMock","viewParams","logsTabActive"],setup(c,{emit:g}){const t=c,s=g,r=e.ref($),m=e.ref(!1);let _=0,p=0,k="",w="";const V=e.computed(()=>({left:`${t.offsetLeft}px`,height:`${t.open?r.value:N}px`})),C=()=>{t.open||(r.value=$),s("update:open",!t.open)},x=i=>{const u=i>N;u!==t.open&&s("update:open",u)},y=i=>{const u=p-(i.clientY-_);r.value=Math.max(N,Math.min(window.innerHeight*.8,u)),x(r.value)},a=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",a),document.body.style.cursor=k,document.body.style.userSelect=w,m.value=!1,r.value<=N&&(r.value=$,s("update:open",!1))},n=i=>{i.preventDefault(),m.value=!0,_=i.clientY,t.open?p=r.value:(s("update:open",!0),r.value=N,p=N),k=document.body.style.cursor,w=document.body.style.userSelect,document.body.style.cursor="ns-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",y),document.addEventListener("mouseup",a)};e.onBeforeUnmount(a);const v=e.computed({get:()=>t.modelValue,set:i=>s("update:modelValue",i)});e.watch(()=>t.modelValue,i=>{i||s("logsTabActive",!1)},{immediate:!0});const o=e.computed(()=>d.buildDebugResultNodeItems(t.pipelineTree,t.context?.nodes,t.mockNodeIds)),b=e.computed(()=>t.mockNodeIds.has(t.modelValue)),h=e.computed(()=>t.pipelineTree?.activities?.[t.modelValue]?.component),B=e.computed(()=>{const i=o.value.find(u=>u.id===t.modelValue);return i?.type==="ServiceActivity"&&i.isConfigured}),R=()=>{!t.hasGlobalRun||t.viewParamsPending||s("viewParams")},T=()=>{t.modelValue&&s("reEditMock",t.modelValue)},f=()=>{t.modelValue&&s("runReal",t.modelValue)},l=()=>{t.modelValue&&s("runMock",t.modelValue)};return(i,u)=>{const S=e.resolveComponent("bk-button"),E=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["debug-result-drawer-wrapper",{"is-resizing":m.value}]),style:e.normalizeStyle(V.value)},[e.createElementVNode("div",{class:"debug-result-drawer__resize",onMousedown:n},null,32),e.createElementVNode("section",{class:e.normalizeClass(["debug-result-drawer",{"is-collapsed":!t.open}])},[e.createElementVNode("header",te,[e.createElementVNode("div",oe,[u[3]||(u[3]=e.createElementVNode("span",{class:"debug-result-drawer__title"},"调试结果",-1)),u[4]||(u[4]=e.createElementVNode("span",{class:"debug-result-drawer__divider"},null,-1)),e.withDirectives((e.openBlock(),e.createBlock(S,{text:"",theme:"primary",disabled:!t.hasGlobalRun,loading:t.viewParamsPending,onClick:R},{default:e.withCtx(()=>[...u[2]||(u[2]=[e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-audit view-params-icon"},null,-1),e.createTextVNode(" 查看参数 ",-1)])]),_:1},8,["disabled","loading"])),[[E,{content:"请先进行调试",disabled:t.hasGlobalRun}]])]),e.createElementVNode("span",{class:"debug-result-drawer__collapse",onClick:C},[e.createElementVNode("span",null,e.toDisplayString(t.open?"收起":"展开"),1),e.createElementVNode("i",{class:e.normalizeClass(["bkflow-canvas-icon bkflow-canvas-arrows-down debug-result-drawer__collapse-icon",{"is-expanded":t.open}])},null,2)])]),e.createElementVNode("div",le,[e.createElementVNode("div",se,[e.createVNode(H,{modelValue:v.value,"onUpdate:modelValue":u[0]||(u[0]=M=>v.value=M),nodes:o.value},null,8,["modelValue","nodes"]),e.createElementVNode("div",ne,[t.modelValue?(e.openBlock(),e.createBlock(ee,{key:0,result:t.result,component:h.value,"is-mock":b.value,"can-run-node-debug":B.value,onReEditMock:T,onRunReal:f,onRunMock:l,onLogsTabActive:u[1]||(u[1]=M=>s("logsTabActive",M))},null,8,["result","component","is-mock","can-run-node-debug"])):(e.openBlock(),e.createElementBlock("div",ae," 请先选择节点查看调试详情 "))])])])],2)],6)}}}),re=d._export_sfc(ue,[["__scopeId","data-v-84a5277a"]]);exports.default=re;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),d=require("./index-DsMNLLad.cjs"),L={class:"debug-result-node-list"},D=["data-node-id","aria-selected","onClick","onKeydown"],z=["title"],A={key:0,class:"debug-result-node-list__mock","data-test":"node-mock-flag"},P={key:1,class:"debug-result-node-list__empty"},I=e.defineComponent({__name:"node-list",props:{nodes:{},modelValue:{default:""}},emits:["update:modelValue"],setup(c,{emit:g}){const t=c,s=g,r=e.ref(""),m=e.ref("all"),_=e.ref(null),p={not_run:"未执行",finished:"成功",failed:"失败",running:"正在调试",suspended:"挂起",skipped:"跳过",revoked:"终止"},k=[{value:"all",label:"全部"},{value:"finished",icon:"bkflow-canvas-dark-circle-checkbox",iconColor:"#5fb8ac",tooltip:p.finished},{value:"failed",icon:"bkflow-canvas-dark-circle-close",iconColor:"#fa4e41",tooltip:p.failed},{value:"revoked",icon:"bkflow-canvas-stop-fill",iconColor:"#fa4e41",tooltip:p.revoked},{value:"running",iconComponent:d.LoadingStatusIcon,iconColor:"#3a84ff",tooltip:p.running},{value:"not_run",icon:"bkflow-canvas-weizhixing2",iconColor:"#b8bbc4",tooltip:p.not_run},{value:"suspended",icon:"bkflow-canvas-zanting",iconColor:"#f59500",tooltip:p.suspended},{value:"skipped",icon:"bkflow-canvas-tiaoguo2",iconColor:"#6e89af",tooltip:p.skipped}],w=e.computed(()=>k.map(a=>({...a,count:a.value==="all"?t.nodes.length:t.nodes.filter(n=>n.status===a.value).length}))),V=e.computed(()=>{const a=r.value.trim().toLowerCase();return t.nodes.filter(n=>m.value!=="all"&&n.status!==m.value?!1:a?n.name.toLowerCase().includes(a)||n.type.toLowerCase().includes(a)||(n.typeName??"").toLowerCase().includes(a):!0)}),C=e.computed(()=>r.value.trim()?"搜索结果为空":m.value!=="all"?`暂无${p[m.value]}状态节点`:"暂无节点"),x=()=>{r.value="",m.value="all"},y=a=>{const n=_.value,v=n?.querySelector(`[data-node-id="${CSS.escape(a)}"]`);if(!n||!v)return;const o=n.getBoundingClientRect(),b=v.getBoundingClientRect();b.top<o.top?n.scrollTop-=o.top-b.top:b.bottom>o.bottom&&(n.scrollTop+=b.bottom-o.bottom)};return e.watch(()=>t.modelValue,async a=>{if(!a)return;!V.value.some(v=>v.id===a)&&t.nodes.some(v=>v.id===a)&&(r.value="",m.value="all"),await e.nextTick(),y(a)},{flush:"post"}),(a,n)=>{const v=e.resolveComponent("bk-input");return e.openBlock(),e.createElementBlock("aside",L,[e.createVNode(v,{modelValue:r.value,"onUpdate:modelValue":n[0]||(n[0]=o=>r.value=o),class:"debug-result-node-list__search",placeholder:"搜索节点名称 / 类型",type:"search",clearable:"","data-test":"node-search"},null,8,["modelValue"]),e.createVNode(d.SegmentTabs,{modelValue:m.value,"onUpdate:modelValue":n[1]||(n[1]=o=>m.value=o),class:"debug-result-node-list__filters","data-test":"status-filters",items:w.value},null,8,["modelValue","items"]),V.value.length>0?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"itemsRef",ref:_,class:"debug-result-node-list__items",role:"listbox"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.value,o=>(e.openBlock(),e.createElementBlock("div",{key:o.id,class:e.normalizeClass(["debug-result-node-list__item",`is-${o.status}`,{"is-active":o.id===t.modelValue,"is-unconfigured":!o.isConfigured}]),role:"option","data-test":"node-item","data-node-id":o.id,"aria-selected":o.id===t.modelValue,tabindex:"0",onClick:b=>s("update:modelValue",o.id),onKeydown:e.withKeys(e.withModifiers(b=>s("update:modelValue",o.id),["prevent"]),["enter","space"])},[e.createElementVNode("span",{class:e.normalizeClass(["debug-result-node-list__status",`is-${o.status}`,{"is-placeholder":!o.isConfigured}])},[o.icon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(o.icon),"data-test":"node-icon"},null,2)):e.createCommentVNode("",!0)],2),e.createElementVNode("span",{class:"debug-result-node-list__name",title:o.isConfigured?`${o.name} ${o.typeName||o.type}`:o.name},e.toDisplayString(o.name),9,z),o.isMock?(e.openBlock(),e.createElementBlock("span",A,"MOCK")):e.createCommentVNode("",!0)],42,D))),128))],512)):(e.openBlock(),e.createElementBlock("div",P,[e.createVNode(d.EmptyException,{"is-search":!1,title:C.value,onClear:x},null,8,["title"])]))])}}}),H=d._export_sfc(I,[["__scopeId","data-v-db0cb31c"]]);function U(c){if(c==null)return"";if(typeof c=="string")return c;if(typeof c=="object"){const g=c,t=g.message;if(typeof t=="string"&&t){const s=g.type;return typeof s=="string"&&s?`${s}: ${t}`:t}try{return JSON.stringify(c)}catch{return String(c)}}return String(c)}const O={class:"debug-result-tabs"},F={class:"debug-result-tabs__failed-actions","data-test":"output-error-actions"},G={class:"debug-result-tabs__execution","data-test":"tab-execution"},K={class:"debug-result-tabs__row"},j={class:"value"},q={class:"debug-result-tabs__row"},Y={class:"value"},J={key:0,class:"debug-result-tabs__row is-error"},Q={class:"value"},W={class:"debug-result-tabs__mock-hint","data-test":"mock-banner"},X={class:"debug-result-tabs__logs","data-test":"tab-logs"},Z=e.defineComponent({__name:"result-tabs",props:{result:{},component:{},isMock:{type:Boolean,default:!1},canRunNodeDebug:{type:Boolean,default:!1}},emits:["reEditMock","runReal","runMock","logsTabActive"],setup(c,{emit:g}){const t=c,s=g,r=e.ref("execution");e.watch(r,f=>s("logsTabActive",f==="logs"),{immediate:!0});const m={not_run:"未调试",running:"正在调试",finished:"成功",failed:"失败",suspended:"挂起",skipped:"跳过",revoked:"已终止"},_=e.computed(()=>m[t.result.execution.status]??t.result.execution.status),p=e.computed(()=>d.formatSummaryDuration(t.result.execution.durationMs)),k=e.computed(()=>U(t.result.error||t.result.execution.errorDetail)),w=e.computed(()=>t.result.execution.status==="revoked"),V=e.computed(()=>d.isDebugAbnormalStatus(t.result.execution.status)),C=e.computed(()=>w.value?"该节点调试已终止,可":"该节点执行失败,可"),{loading:x,error:y,visibleInputs:a,visibleOutputs:n,outputNameMap:v}=d.usePluginParamMeta({component:()=>t.component}),o=e.computed(()=>t.result.loading||x.value),b=e.computed(()=>t.result.detailError||y.value),h=e.computed(()=>a.value.filter(({key:f})=>Object.prototype.hasOwnProperty.call(t.result.inputs,f)).map(({key:f,name:l})=>({key:f,name:l,value:t.result.inputs[f]}))),B=e.computed(()=>d.orderDebugRowsByDeclaredKeys(d.toDebugOutputValueRows(t.result.outputs,v.value),n.value.map(f=>f.key))),R=e.computed(()=>d.shouldShowMockReEditHint(t.isMock,n.value)),T=e.computed(()=>t.result.logs==null?"":d.normalizeLogText(t.result.logs));return(f,l)=>{const i=e.resolveComponent("bk-button"),u=e.resolveComponent("bk-tab-panel"),S=e.resolveComponent("bk-tab");return e.openBlock(),e.createElementBlock("div",O,[e.createVNode(S,{active:r.value,"onUpdate:active":l[3]||(l[3]=E=>r.value=E),type:"card-grid"},e.createSlots({default:e.withCtx(()=>[e.createVNode(u,{name:"execution",label:"执行信息"},{default:e.withCtx(()=>[e.createElementVNode("div",G,[e.createElementVNode("div",K,[l[8]||(l[8]=e.createElementVNode("span",{class:"label"},"执行状态",-1)),e.createElementVNode("span",j,e.toDisplayString(_.value),1)]),e.createElementVNode("div",q,[l[9]||(l[9]=e.createElementVNode("span",{class:"label"},"调试用时",-1)),e.createElementVNode("span",Y,e.toDisplayString(p.value),1)]),k.value?(e.openBlock(),e.createElementBlock("div",J,[l[10]||(l[10]=e.createElementVNode("span",{class:"label"},"错误信息",-1)),e.createElementVNode("span",Q,e.toDisplayString(k.value),1)])):e.createCommentVNode("",!0)])]),_:1}),e.createVNode(u,{name:"inputs",label:"输入参数"},{default:e.withCtx(()=>[e.createVNode(d.DebugValueTable,{rows:h.value,loading:o.value,error:b.value,"empty-text":"暂无输入参数"},null,8,["rows","loading","error"])]),_:1}),e.createVNode(u,{name:"outputs",label:"输出结果"},{default:e.withCtx(()=>[e.createVNode(d.DebugValueTable,{rows:B.value,loading:o.value,error:b.value,"empty-text":"暂无输出结果"},e.createSlots({_:2},[R.value?{name:"toolbar",fn:e.withCtx(()=>[e.createElementVNode("div",W,[l[12]||(l[12]=e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-info debug-result-tabs__mock-info","aria-hidden":"true"},null,-1)),l[13]||(l[13]=e.createElementVNode("span",null,"当前为 Mock 数据",-1)),e.createVNode(i,{text:"",theme:"primary",size:"small","data-test":"re-edit-mock",onClick:l[2]||(l[2]=E=>s("reEditMock"))},{default:e.withCtx(()=>[...l[11]||(l[11]=[e.createTextVNode(" 重新编辑 ",-1)])]),_:1})])]),key:"0"}:void 0]),1032,["rows","loading","error"])]),_:1}),e.createVNode(u,{name:"logs",label:"调用日志"},{default:e.withCtx(()=>[e.createElementVNode("div",X,[e.createVNode(d.CallLogsViewer,{"log-text":T.value,loading:t.result.logLoading,error:t.result.logError},null,8,["log-text","loading","error"])])]),_:1})]),_:2},[V.value&&t.canRunNodeDebug?{name:"setting",fn:e.withCtx(()=>[e.createElementVNode("div",F,[l[6]||(l[6]=e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-alert"},null,-1)),e.createElementVNode("span",null,e.toDisplayString(C.value),1),e.createVNode(i,{text:"",theme:"primary","data-test":"rerun-real",onClick:l[0]||(l[0]=E=>s("runReal"))},{default:e.withCtx(()=>[...l[4]||(l[4]=[e.createTextVNode("重新调试",-1)])]),_:1}),l[7]||(l[7]=e.createElementVNode("span",null,"或直接",-1)),e.createVNode(i,{text:"",theme:"primary","data-test":"run-mock",onClick:l[1]||(l[1]=E=>s("runMock"))},{default:e.withCtx(()=>[...l[5]||(l[5]=[e.createTextVNode("Mock 输出",-1)])]),_:1})])]),key:"0"}:void 0]),1032,["active"])])}}}),ee=d._export_sfc(Z,[["__scopeId","data-v-2a925689"]]),te={class:"debug-result-drawer__header"},oe={class:"debug-result-drawer__header-left"},le={class:"debug-result-drawer__body"},se={class:"debug-result-drawer__content"},ne={class:"debug-result-drawer__result"},ae={key:1,class:"debug-result-drawer__unselected","data-test":"node-unselected"},N=44,$=420,ue=e.defineComponent({__name:"index",props:{open:{type:Boolean},context:{},pipelineTree:{},mockNodeIds:{},modelValue:{default:""},result:{},hasGlobalRun:{type:Boolean,default:!1},viewParamsPending:{type:Boolean,default:!1},offsetLeft:{default:0}},emits:["update:open","update:modelValue","reEditMock","runReal","runMock","viewParams","logsTabActive"],setup(c,{emit:g}){const t=c,s=g,r=e.ref($),m=e.ref(!1);let _=0,p=0,k="",w="";const V=e.computed(()=>({left:`${t.offsetLeft}px`,height:`${t.open?r.value:N}px`})),C=()=>{t.open||(r.value=$),s("update:open",!t.open)},x=i=>{const u=i>N;u!==t.open&&s("update:open",u)},y=i=>{const u=p-(i.clientY-_);r.value=Math.max(N,Math.min(window.innerHeight*.8,u)),x(r.value)},a=()=>{document.removeEventListener("mousemove",y),document.removeEventListener("mouseup",a),document.body.style.cursor=k,document.body.style.userSelect=w,m.value=!1,r.value<=N&&(r.value=$,s("update:open",!1))},n=i=>{i.preventDefault(),m.value=!0,_=i.clientY,t.open?p=r.value:(s("update:open",!0),r.value=N,p=N),k=document.body.style.cursor,w=document.body.style.userSelect,document.body.style.cursor="ns-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",y),document.addEventListener("mouseup",a)};e.onBeforeUnmount(a);const v=e.computed({get:()=>t.modelValue,set:i=>s("update:modelValue",i)});e.watch(()=>t.modelValue,i=>{i||s("logsTabActive",!1)},{immediate:!0});const o=e.computed(()=>d.buildDebugResultNodeItems(t.pipelineTree,t.context?.nodes,t.mockNodeIds)),b=e.computed(()=>t.mockNodeIds.has(t.modelValue)),h=e.computed(()=>t.pipelineTree?.activities?.[t.modelValue]?.component),B=e.computed(()=>{const i=o.value.find(u=>u.id===t.modelValue);return i?.type==="ServiceActivity"&&i.isConfigured}),R=()=>{!t.hasGlobalRun||t.viewParamsPending||s("viewParams")},T=()=>{t.modelValue&&s("reEditMock",t.modelValue)},f=()=>{t.modelValue&&s("runReal",t.modelValue)},l=()=>{t.modelValue&&s("runMock",t.modelValue)};return(i,u)=>{const S=e.resolveComponent("bk-button"),E=e.resolveDirective("bk-tooltips");return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["debug-result-drawer-wrapper",{"is-resizing":m.value}]),style:e.normalizeStyle(V.value)},[e.createElementVNode("div",{class:"debug-result-drawer__resize",onMousedown:n},null,32),e.createElementVNode("section",{class:e.normalizeClass(["debug-result-drawer",{"is-collapsed":!t.open}])},[e.createElementVNode("header",te,[e.createElementVNode("div",oe,[u[3]||(u[3]=e.createElementVNode("span",{class:"debug-result-drawer__title"},"调试结果",-1)),u[4]||(u[4]=e.createElementVNode("span",{class:"debug-result-drawer__divider"},null,-1)),e.withDirectives((e.openBlock(),e.createBlock(S,{text:"",theme:"primary",disabled:!t.hasGlobalRun,loading:t.viewParamsPending,onClick:R},{default:e.withCtx(()=>[...u[2]||(u[2]=[e.createElementVNode("i",{class:"bkflow-canvas-icon bkflow-canvas-audit view-params-icon"},null,-1),e.createTextVNode(" 查看参数 ",-1)])]),_:1},8,["disabled","loading"])),[[E,{content:"请先进行调试",disabled:t.hasGlobalRun}]])]),e.createElementVNode("span",{class:"debug-result-drawer__collapse",onClick:C},[e.createElementVNode("span",null,e.toDisplayString(t.open?"收起":"展开"),1),e.createElementVNode("i",{class:e.normalizeClass(["bkflow-canvas-icon bkflow-canvas-arrows-down debug-result-drawer__collapse-icon",{"is-expanded":t.open}])},null,2)])]),e.createElementVNode("div",le,[e.createElementVNode("div",se,[e.createVNode(H,{modelValue:v.value,"onUpdate:modelValue":u[0]||(u[0]=M=>v.value=M),nodes:o.value},null,8,["modelValue","nodes"]),e.createElementVNode("div",ne,[t.modelValue?(e.openBlock(),e.createBlock(ee,{key:0,result:t.result,component:h.value,"is-mock":b.value,"can-run-node-debug":B.value,onReEditMock:T,onRunReal:f,onRunMock:l,onLogsTabActive:u[1]||(u[1]=M=>s("logsTabActive",M))},null,8,["result","component","is-mock","can-run-node-debug"])):(e.openBlock(),e.createElementBlock("div",ae," 请先选择节点查看调试详情 "))])])])],2)],6)}}}),re=d._export_sfc(ue,[["__scopeId","data-v-84a5277a"]]);exports.default=re;
@@ -1,6 +1,6 @@
1
1
  import { provide as Jt, inject as $e, ref as B, shallowRef as Ct, defineComponent as Ce, useSlots as oa, openBlock as y, createElementBlock as P, normalizeClass as te, renderSlot as Ze, createElementVNode as D, createBlock as ne, unref as p, createCommentVNode as J, toDisplayString as se, watch as Ve, resolveComponent as ye, withCtx as z, createVNode as L, resolveDirective as Qt, withDirectives as st, computed as T, createTextVNode as He, Fragment as Me, renderList as dt, withModifiers as wt, onMounted as $t, onBeforeUnmount as an, Teleport as Gr, normalizeStyle as qt, resolveDynamicComponent as dn, toRaw as Hd, isRef as Ja, withKeys as Rn, vShow as Xt, reactive as Fn, createSlots as nl, Transition as Xs, createApp as og, getCurrentInstance as en, h as Ft, toRefs as Lo, nextTick as Et, mergeProps as wn, defineAsyncComponent as gd, warn as iO, watchEffect as Yr, readonly as dA, getCurrentScope as _f, onScopeDispose as Ru, toValue as pa, hasInjectionContext as rpe, shallowReadonly as ipe, onBeforeMount as lg, isVNode as Dl, Comment as qr, cloneVNode as uO, Text as fA, toRef as Un, onUnmounted as xf, onDeactivated as cO, markRaw as dO, useAttrs as hi, onActivated as pA, onUpdated as sg, toHandlerKey as vA, vModelCheckbox as mA, vModelRadio as gA, onBeforeUpdate as fO, vModelText as pO, render as h0, TransitionGroup as vO, createStaticVNode as hd, normalizeProps as wa, guardReactiveProps as Aa, useModel as hA, mergeModels as jd, toHandlers as mO } from "vue";
2
2
  import { Message as Ea, Select as b0, bkTooltips as rg, Input as gO } from "bkui-vue";
3
- import { u as hO, b as bA, B as bO, a as ig, c as Ml, g as Mn, S as Sl, A as yA, d as yO, e as Fr, f as wO, h as wA, p as AA, w as kA, n as bd } from "./context-DcQH3Knl.js";
3
+ import { u as hO, b as bA, B as bO, a as ig, c as Ml, g as Mn, S as Sl, A as yA, d as yO, e as Fr, f as wO, h as wA, p as AA, w as kA, n as bd } from "./context-BGCiN3VZ.js";
4
4
  import { ArrowsLeft as AO, EditLine as kO, CopyShape as CA, Copy as CO, FilliscreenLine as _O, UnfullScreen as xO, AngleUpFill as SO, Info as _A, AngleDoubleDownLine as EO, Plus as xA, ExclamationCircleShape as IO, Del as TO, InfoLine as OO, AngleRight as DO, ArrowsRight as MO, Share as SA } from "bkui-vue/lib/icon";
5
5
  import { Message as ug, InfoBox as No } from "bkui-vue/lib";
6
6
  import Ln from "bkui-vue/lib/message";
@@ -54056,8 +54056,8 @@ const npe = {
54056
54056
  emits: ["save", "saveSuccess", "executeSuccess", "back", "createVariable"],
54057
54057
  setup(e, { expose: t, emit: n }) {
54058
54058
  const a = gd(
54059
- () => import("./index-ksKovAb8.js")
54060
- ), o = gd(() => import("./index-BKJAOqn4.js")), l = gd(() => import("./index-Bx_UOiCu.js")), r = oa(), s = e, u = n, d = T(() => ({
54059
+ () => import("./index-DQiaXJcu.js")
54060
+ ), o = gd(() => import("./index-DH-OFKmv.js")), l = gd(() => import("./index-rIpHf27c.js")), r = oa(), s = e, u = n, d = T(() => ({
54061
54061
  canEdit: s.permissions?.canEdit ?? !1,
54062
54062
  canDebug: s.permissions?.canDebug ?? !1,
54063
54063
  canExecute: s.permissions?.canExecute ?? !1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),M=require("bkui-vue/lib"),N=require("bkui-vue/lib/message"),s=require("./index-BRwaB9qA.cjs"),O={key:0,class:"mock-data-sideslider__title-sep"},F=["title"],S={class:"mock-data-sideslider"},D={class:"mock-data-sideslider__footer"},j="当前节点的输出不支持mock,是否需要在调试时跳过当前节点?",q="跳过调试",Y=e.defineComponent({__name:"index",props:{show:{type:Boolean},node:{default:null},outputs:{default:()=>({})},pending:{type:Boolean,default:!1}},emits:["confirm","close","update:show"],setup(f,{emit:y}){const o=f,p=y,h=s.useFlowApiConfig(),k=e.ref(!1),u=e.shallowRef([]),d=e.ref({}),_=e.ref({}),m=e.ref(!1),b=e.computed(()=>m.value?j:"暂无输出结果"),C=e.computed(()=>m.value?q:"确定"),w=async()=>{if(o.node){k.value=!0,_.value={},m.value=!1;try{const t=await s.pluginDetailRequest(h,o.node.component);u.value=s.mergeOutputs(t.outputs??[]),m.value=s.hasOnlySystemOutputs(t.outputs);const n=o.outputs??{},a={};u.value.forEach(l=>{const c=Object.prototype.hasOwnProperty.call(n,l.key)?n[l.key]:l.type==="object"?{}:void 0,r=s.resolveMockFormControl(l);a[l.key]=r==="json-editor"||r==="data-table"?s.formatJsonFieldValue(c):c}),d.value=a}catch(t){console.error(t),u.value=[],d.value={},m.value=!1,N({theme:"error",message:"加载输出结果失败"})}finally{k.value=!1}}},g=()=>{const t={},n={};return u.value.forEach(a=>{const l=d.value[a.key],c=s.resolveMockFormControl(a);if(c==="json-editor"||c==="data-table"){const r=s.parseJsonFieldValue(l);if(!r.valid){t[a.key]=r.message;return}r.value!==void 0&&(n[a.key]=r.value);return}l!==void 0&&l!==""&&(n[a.key]=l)}),{errors:t,outputs:n}},x=t=>{M.InfoBox({title:"确认 Mock 输出?",content:"Mock 输出将覆盖当前输出结果,执行时跳过该节点并以 Mock 值替代实际输出",confirmText:"确定",cancelText:"取消",width:400,onConfirm:()=>{t()}})},V=()=>{if(m.value){p("confirm",{outputs:{}});return}const{errors:t,outputs:n}=g();_.value=t,!(Object.keys(t).length>0)&&x(()=>p("confirm",{outputs:n}))},v=()=>{p("close"),p("update:show",!1)};return e.watch(()=>[o.show,o.node?.id],([t])=>{t&&o.node&&(d.value=s.cloneDeep(o.outputs??{}),w())},{immediate:!0}),(t,n)=>{const a=e.resolveComponent("bk-form-item"),l=e.resolveComponent("bk-form"),c=e.resolveComponent("bk-exception"),r=e.resolveComponent("bk-button"),B=e.resolveComponent("bk-sideslider"),E=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(B,{"is-show":o.show,width:960,"quick-close":"","esc-close":!1,onClosed:v},{header:e.withCtx(()=>[n[0]||(n[0]=e.createElementVNode("span",{class:"mock-data-sideslider__title"},"Mock输出",-1)),o.node?.name?(e.openBlock(),e.createElementBlock("span",O,"-")):e.createCommentVNode("",!0),o.node?.name?(e.openBlock(),e.createElementBlock("span",{key:1,class:"mock-data-sideslider__title-node",title:o.node.name},e.toDisplayString(o.node.name),9,F)):e.createCommentVNode("",!0)]),footer:e.withCtx(()=>[e.createElementVNode("div",D,[e.createVNode(r,{theme:"primary","data-test":"mock-confirm",loading:o.pending,onClick:V},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.value),1)]),_:1},8,["loading"]),e.createVNode(r,{disabled:o.pending,onClick:v},{default:e.withCtx(()=>[...n[1]||(n[1]=[e.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",S,[u.value.length>0?(e.openBlock(),e.createBlock(l,{key:0,"form-type":"vertical","label-width":120,"data-test":"mock-outputs-form"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,i=>(e.openBlock(),e.createBlock(a,{key:i.key,label:i.name||i.key},{default:e.withCtx(()=>[e.createVNode(s.MockFieldRenderer,{modelValue:d.value[i.key],"onUpdate:modelValue":T=>d.value[i.key]=T,field:i,error:_.value[i.key]},null,8,["modelValue","onUpdate:modelValue","field","error"])]),_:2},1032,["label"]))),128))]),_:1})):k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:1,class:"mock-data-sideslider__exception",scene:"part",type:"empty",title:b.value},null,8,["title"]))])),[[E,{loading:k.value}]])]),_:1},8,["is-show"])}}}),I=s._export_sfc(Y,[["__scopeId","data-v-c4e2476a"]]);exports.default=I;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),M=require("bkui-vue/lib"),N=require("bkui-vue/lib/message"),s=require("./index-DsMNLLad.cjs"),O={key:0,class:"mock-data-sideslider__title-sep"},F=["title"],S={class:"mock-data-sideslider"},D={class:"mock-data-sideslider__footer"},j="当前节点的输出不支持mock,是否需要在调试时跳过当前节点?",q="跳过调试",Y=e.defineComponent({__name:"index",props:{show:{type:Boolean},node:{default:null},outputs:{default:()=>({})},pending:{type:Boolean,default:!1}},emits:["confirm","close","update:show"],setup(f,{emit:y}){const o=f,p=y,h=s.useFlowApiConfig(),k=e.ref(!1),u=e.shallowRef([]),d=e.ref({}),_=e.ref({}),m=e.ref(!1),b=e.computed(()=>m.value?j:"暂无输出结果"),C=e.computed(()=>m.value?q:"确定"),w=async()=>{if(o.node){k.value=!0,_.value={},m.value=!1;try{const t=await s.pluginDetailRequest(h,o.node.component);u.value=s.mergeOutputs(t.outputs??[]),m.value=s.hasOnlySystemOutputs(t.outputs);const n=o.outputs??{},a={};u.value.forEach(l=>{const c=Object.prototype.hasOwnProperty.call(n,l.key)?n[l.key]:l.type==="object"?{}:void 0,r=s.resolveMockFormControl(l);a[l.key]=r==="json-editor"||r==="data-table"?s.formatJsonFieldValue(c):c}),d.value=a}catch(t){console.error(t),u.value=[],d.value={},m.value=!1,N({theme:"error",message:"加载输出结果失败"})}finally{k.value=!1}}},g=()=>{const t={},n={};return u.value.forEach(a=>{const l=d.value[a.key],c=s.resolveMockFormControl(a);if(c==="json-editor"||c==="data-table"){const r=s.parseJsonFieldValue(l);if(!r.valid){t[a.key]=r.message;return}r.value!==void 0&&(n[a.key]=r.value);return}l!==void 0&&l!==""&&(n[a.key]=l)}),{errors:t,outputs:n}},x=t=>{M.InfoBox({title:"确认 Mock 输出?",content:"Mock 输出将覆盖当前输出结果,执行时跳过该节点并以 Mock 值替代实际输出",confirmText:"确定",cancelText:"取消",width:400,onConfirm:()=>{t()}})},V=()=>{if(m.value){p("confirm",{outputs:{}});return}const{errors:t,outputs:n}=g();_.value=t,!(Object.keys(t).length>0)&&x(()=>p("confirm",{outputs:n}))},v=()=>{p("close"),p("update:show",!1)};return e.watch(()=>[o.show,o.node?.id],([t])=>{t&&o.node&&(d.value=s.cloneDeep(o.outputs??{}),w())},{immediate:!0}),(t,n)=>{const a=e.resolveComponent("bk-form-item"),l=e.resolveComponent("bk-form"),c=e.resolveComponent("bk-exception"),r=e.resolveComponent("bk-button"),B=e.resolveComponent("bk-sideslider"),E=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(B,{"is-show":o.show,width:960,"quick-close":"","esc-close":!1,onClosed:v},{header:e.withCtx(()=>[n[0]||(n[0]=e.createElementVNode("span",{class:"mock-data-sideslider__title"},"Mock输出",-1)),o.node?.name?(e.openBlock(),e.createElementBlock("span",O,"-")):e.createCommentVNode("",!0),o.node?.name?(e.openBlock(),e.createElementBlock("span",{key:1,class:"mock-data-sideslider__title-node",title:o.node.name},e.toDisplayString(o.node.name),9,F)):e.createCommentVNode("",!0)]),footer:e.withCtx(()=>[e.createElementVNode("div",D,[e.createVNode(r,{theme:"primary","data-test":"mock-confirm",loading:o.pending,onClick:V},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(C.value),1)]),_:1},8,["loading"]),e.createVNode(r,{disabled:o.pending,onClick:v},{default:e.withCtx(()=>[...n[1]||(n[1]=[e.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",S,[u.value.length>0?(e.openBlock(),e.createBlock(l,{key:0,"form-type":"vertical","label-width":120,"data-test":"mock-outputs-form"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u.value,i=>(e.openBlock(),e.createBlock(a,{key:i.key,label:i.name||i.key},{default:e.withCtx(()=>[e.createVNode(s.MockFieldRenderer,{modelValue:d.value[i.key],"onUpdate:modelValue":T=>d.value[i.key]=T,field:i,error:_.value[i.key]},null,8,["modelValue","onUpdate:modelValue","field","error"])]),_:2},1032,["label"]))),128))]),_:1})):k.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(c,{key:1,class:"mock-data-sideslider__exception",scene:"part",type:"empty",title:b.value},null,8,["title"]))])),[[E,{loading:k.value}]])]),_:1},8,["is-show"])}}}),I=s._export_sfc(Y,[["__scopeId","data-v-c4e2476a"]]);exports.default=I;
@@ -1,7 +1,7 @@
1
1
  import { defineComponent as q, ref as f, shallowRef as J, computed as x, watch as P, resolveComponent as p, resolveDirective as U, openBlock as l, createBlock as v, withCtx as i, withDirectives as z, createElementBlock as y, Fragment as A, renderList as W, createVNode as b, createCommentVNode as g, createElementVNode as V, createTextVNode as C, toDisplayString as M } from "vue";
2
2
  import { InfoBox as X } from "bkui-vue/lib";
3
3
  import G from "bkui-vue/lib/message";
4
- import { u as H, c as K, M as Q, p as Z, m as $, h as ee, r as T, f as te, a as oe, _ as se } from "./index-4ViZr_el.js";
4
+ import { u as H, c as K, M as Q, p as Z, m as $, h as ee, r as T, f as te, a as oe, _ as se } from "./index-Ckf2dijc.js";
5
5
  const ae = {
6
6
  key: 0,
7
7
  class: "mock-data-sideslider__title-sep"
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as A, ref as V, shallowRef as x, computed as C, watch as U, resolveComponent as j, resolveDirective as K, openBlock as l, createBlock as f, createSlots as S, withCtx as y, withDirectives as G, createElementBlock as d, createElementVNode as i, createCommentVNode as v, Fragment as H, renderList as J, toDisplayString as B, unref as Y, createVNode as R, createTextVNode as E } from "vue";
2
- import { c as _, u as z, i as M, b as Q, d as W, g as X, D as Z, B as ee, R as te, E as ae, _ as oe } from "./index-4ViZr_el.js";
2
+ import { c as _, u as z, i as M, b as Q, d as W, g as X, D as Z, B as ee, R as te, E as ae, _ as oe } from "./index-Ckf2dijc.js";
3
3
  import "bkui-vue/lib/message";
4
4
  import "bkui-vue/lib/icon";
5
5
  import "monaco-editor";
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-BRwaB9qA.cjs");require("bkui-vue/lib/message");require("bkui-vue/lib/icon");require("monaco-editor");const N={string:"input",text:"input",textarea:"textarea",int:"input",integer:"input",number:"input",float:"input",json:"json",object:"json",array:"array",list:"array",select:"select",time:"timepicker",datetime:"timepicker"},h=l=>l.replace(/^\$\{(.+)\}$/,"$1"),g=l=>`\${${h(l)}}`;function F(l,c){const a=g(l.key),n=c?s.cloneDeep(c):{},d=l.custom_type??n.custom_type??N[l.type]??"input";return{...n,key:a,name:l.name??n.name??h(l.key),custom_type:d,desc:n.desc??"",index:n.index??0,show_type:"show",source_info:n.source_info??{},source_tag:n.source_tag??"",source_type:n.source_type??"custom",validation:n.validation??"",value:l.default??n.value,meta:{...n.meta??{},required:l.required??n.meta?.required??!1}}}function D(l,c={}){if(!l)return{};const a=l.constants;return a&&Object.keys(a).length>0?{...a}:Array.isArray(l.fields)&&l.fields.length>0?l.fields.reduce((n,d)=>{const r=g(d.key);return n[r]=F(d,c[r]),n},{}):{}}const j={class:"global-debug-input"},q={key:0,class:"global-debug-input__params","data-test":"input-params"},R={key:0},L=["title"],O={class:"col-value"},T={key:1,class:"global-debug-input__value"},I={key:1,class:"form-params-wrapper"},P={class:"sideslider-footer-buttons"},$=e.defineComponent({__name:"index",props:{show:{type:Boolean},schema:{},pipelineConstants:{default:()=>({})},initialValues:{default:()=>({})},pending:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["confirm","close","update:show"],setup(l,{emit:c}){const a=l,n=c,d=s.useFlowApiConfig(),r=e.ref({}),p=e.shallowRef([]),m=e.shallowRef([]),f=e.shallowRef(!1),y=e.ref(),v=e.ref(),k=e.computed(()=>p.value.filter(t=>s.isBuiltinUsageVariable(t))),V=e.computed(()=>k.value.length>0||m.value.length>0),b=e.computed(()=>[...p.value].sort((t,o)=>(t.index??0)-(o.index??0)).map(t=>{const o=Object.prototype.hasOwnProperty.call(r.value,t.key)?r.value[t.key]:t.value;return{key:t.key,name:t.name||t.key,value:o,display:s.formatDebugValue(o),isComplex:s.isComplexDebugValue(o)}}));e.watch(()=>a.show,t=>{t&&(r.value=s.cloneDeep(a.initialValues??{}),w())});const w=async()=>{const t=D(a.schema,a.pipelineConstants),o=Object.values(t).filter(i=>typeof i=="object"&&i!==null&&i.show_type==="show");if(p.value=o,a.readonly||Object.keys(t).length<1){m.value=[];return}f.value=!0;try{m.value=await s.getInputFormsFromConstants(d,t)}catch(i){console.error("Failed to build debug input forms from schema:",i),m.value=[]}finally{f.value=!1}},B=t=>{r.value={...r.value,...s.cloneDeep(t)}},C=async()=>{const[t,o]=await Promise.all([Promise.resolve(typeof v.value?.validate=="function"?v.value.validate():!0),Promise.resolve(typeof y.value?.validate=="function"?y.value.validate():!0)]);!t||!o||n("confirm",s.cloneDeep(r.value))},_=()=>{n("close"),n("update:show",!1)};return(t,o)=>{const i=e.resolveComponent("bk-button"),x=e.resolveComponent("bk-sideslider"),E=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(x,{title:"调试参数","is-show":a.show,width:960,"quick-close":!0,"esc-close":!1,onClosed:_},e.createSlots({default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",j,[a.readonly?(e.openBlock(),e.createElementBlock("table",q,[o[2]||(o[2]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",{class:"col-name"},"参数名"),e.createElementVNode("th",{class:"col-value"},"参数值")])],-1)),e.createElementVNode("tbody",null,[b.value.length===0?(e.openBlock(),e.createElementBlock("tr",R,[...o[1]||(o[1]=[e.createElementVNode("td",{class:"global-debug-input__empty",colspan:"2"},"暂无参数",-1)])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,u=>(e.openBlock(),e.createElementBlock("tr",{key:u.key,"data-test":"input-row"},[e.createElementVNode("td",{class:"col-name",title:u.key},e.toDisplayString(u.name),9,L),e.createElementVNode("td",O,[u.isComplex?(e.openBlock(),e.createBlock(s.DebugJsonViewer,{key:0,value:u.value,"data-test":"json-viewer"},null,8,["value"])):(e.openBlock(),e.createElementBlock("pre",T,e.toDisplayString(u.display),1))])]))),128))])])):(e.openBlock(),e.createElementBlock("div",I,[k.value.length>0?(e.openBlock(),e.createBlock(e.unref(s.BuiltinVariableUsageForm),{key:0,ref_key:"builtinVariableFormRef",ref:v,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=u=>r.value=u),variables:k.value},null,8,["modelValue","variables"])):e.createCommentVNode("",!0),m.value.length>0?(e.openBlock(),e.createBlock(s.RenderForm,{key:1,ref_key:"renderFormRef",ref:y,scheme:m.value,editable:"","form-option":{showRequired:!0,showGroup:!0,showLabel:!1,showHook:!1,showDesc:!0,formEdit:!0},"form-data":r.value,onChange:B},null,8,["scheme","form-data"])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s.EmptyException,{key:2,title:"暂无参数"}))]))])),[[E,{loading:f.value}]])]),_:2},[a.readonly?void 0:{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",P,[e.createVNode(i,{theme:"primary","data-test":"save-and-run",loading:a.pending,onClick:C},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode(" 保存并执行 ",-1)])]),_:1},8,["loading"]),e.createVNode(i,{disabled:a.pending,onClick:_},{default:e.withCtx(()=>[...o[4]||(o[4]=[e.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),key:"0"}]),1032,["is-show"])}}}),S=s._export_sfc($,[["__scopeId","data-v-01a33593"]]);exports.default=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),s=require("./index-DsMNLLad.cjs");require("bkui-vue/lib/message");require("bkui-vue/lib/icon");require("monaco-editor");const N={string:"input",text:"input",textarea:"textarea",int:"input",integer:"input",number:"input",float:"input",json:"json",object:"json",array:"array",list:"array",select:"select",time:"timepicker",datetime:"timepicker"},h=l=>l.replace(/^\$\{(.+)\}$/,"$1"),g=l=>`\${${h(l)}}`;function F(l,c){const a=g(l.key),n=c?s.cloneDeep(c):{},d=l.custom_type??n.custom_type??N[l.type]??"input";return{...n,key:a,name:l.name??n.name??h(l.key),custom_type:d,desc:n.desc??"",index:n.index??0,show_type:"show",source_info:n.source_info??{},source_tag:n.source_tag??"",source_type:n.source_type??"custom",validation:n.validation??"",value:l.default??n.value,meta:{...n.meta??{},required:l.required??n.meta?.required??!1}}}function D(l,c={}){if(!l)return{};const a=l.constants;return a&&Object.keys(a).length>0?{...a}:Array.isArray(l.fields)&&l.fields.length>0?l.fields.reduce((n,d)=>{const r=g(d.key);return n[r]=F(d,c[r]),n},{}):{}}const j={class:"global-debug-input"},q={key:0,class:"global-debug-input__params","data-test":"input-params"},R={key:0},L=["title"],O={class:"col-value"},T={key:1,class:"global-debug-input__value"},I={key:1,class:"form-params-wrapper"},P={class:"sideslider-footer-buttons"},$=e.defineComponent({__name:"index",props:{show:{type:Boolean},schema:{},pipelineConstants:{default:()=>({})},initialValues:{default:()=>({})},pending:{type:Boolean,default:!1},readonly:{type:Boolean,default:!1}},emits:["confirm","close","update:show"],setup(l,{emit:c}){const a=l,n=c,d=s.useFlowApiConfig(),r=e.ref({}),p=e.shallowRef([]),m=e.shallowRef([]),f=e.shallowRef(!1),y=e.ref(),v=e.ref(),k=e.computed(()=>p.value.filter(t=>s.isBuiltinUsageVariable(t))),V=e.computed(()=>k.value.length>0||m.value.length>0),b=e.computed(()=>[...p.value].sort((t,o)=>(t.index??0)-(o.index??0)).map(t=>{const o=Object.prototype.hasOwnProperty.call(r.value,t.key)?r.value[t.key]:t.value;return{key:t.key,name:t.name||t.key,value:o,display:s.formatDebugValue(o),isComplex:s.isComplexDebugValue(o)}}));e.watch(()=>a.show,t=>{t&&(r.value=s.cloneDeep(a.initialValues??{}),w())});const w=async()=>{const t=D(a.schema,a.pipelineConstants),o=Object.values(t).filter(i=>typeof i=="object"&&i!==null&&i.show_type==="show");if(p.value=o,a.readonly||Object.keys(t).length<1){m.value=[];return}f.value=!0;try{m.value=await s.getInputFormsFromConstants(d,t)}catch(i){console.error("Failed to build debug input forms from schema:",i),m.value=[]}finally{f.value=!1}},B=t=>{r.value={...r.value,...s.cloneDeep(t)}},C=async()=>{const[t,o]=await Promise.all([Promise.resolve(typeof v.value?.validate=="function"?v.value.validate():!0),Promise.resolve(typeof y.value?.validate=="function"?y.value.validate():!0)]);!t||!o||n("confirm",s.cloneDeep(r.value))},_=()=>{n("close"),n("update:show",!1)};return(t,o)=>{const i=e.resolveComponent("bk-button"),x=e.resolveComponent("bk-sideslider"),E=e.resolveDirective("bkloading");return e.openBlock(),e.createBlock(x,{title:"调试参数","is-show":a.show,width:960,"quick-close":!0,"esc-close":!1,onClosed:_},e.createSlots({default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",j,[a.readonly?(e.openBlock(),e.createElementBlock("table",q,[o[2]||(o[2]=e.createElementVNode("thead",null,[e.createElementVNode("tr",null,[e.createElementVNode("th",{class:"col-name"},"参数名"),e.createElementVNode("th",{class:"col-value"},"参数值")])],-1)),e.createElementVNode("tbody",null,[b.value.length===0?(e.openBlock(),e.createElementBlock("tr",R,[...o[1]||(o[1]=[e.createElementVNode("td",{class:"global-debug-input__empty",colspan:"2"},"暂无参数",-1)])])):e.createCommentVNode("",!0),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(b.value,u=>(e.openBlock(),e.createElementBlock("tr",{key:u.key,"data-test":"input-row"},[e.createElementVNode("td",{class:"col-name",title:u.key},e.toDisplayString(u.name),9,L),e.createElementVNode("td",O,[u.isComplex?(e.openBlock(),e.createBlock(s.DebugJsonViewer,{key:0,value:u.value,"data-test":"json-viewer"},null,8,["value"])):(e.openBlock(),e.createElementBlock("pre",T,e.toDisplayString(u.display),1))])]))),128))])])):(e.openBlock(),e.createElementBlock("div",I,[k.value.length>0?(e.openBlock(),e.createBlock(e.unref(s.BuiltinVariableUsageForm),{key:0,ref_key:"builtinVariableFormRef",ref:v,modelValue:r.value,"onUpdate:modelValue":o[0]||(o[0]=u=>r.value=u),variables:k.value},null,8,["modelValue","variables"])):e.createCommentVNode("",!0),m.value.length>0?(e.openBlock(),e.createBlock(s.RenderForm,{key:1,ref_key:"renderFormRef",ref:y,scheme:m.value,editable:"","form-option":{showRequired:!0,showGroup:!0,showLabel:!1,showHook:!1,showDesc:!0,formEdit:!0},"form-data":r.value,onChange:B},null,8,["scheme","form-data"])):e.createCommentVNode("",!0),V.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(s.EmptyException,{key:2,title:"暂无参数"}))]))])),[[E,{loading:f.value}]])]),_:2},[a.readonly?void 0:{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",P,[e.createVNode(i,{theme:"primary","data-test":"save-and-run",loading:a.pending,onClick:C},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode(" 保存并执行 ",-1)])]),_:1},8,["loading"]),e.createVNode(i,{disabled:a.pending,onClick:_},{default:e.withCtx(()=>[...o[4]||(o[4]=[e.createTextVNode("取消",-1)])]),_:1},8,["disabled"])])]),key:"0"}]),1032,["is-show"])}}}),S=s._export_sfc($,[["__scopeId","data-v-01a33593"]]);exports.default=S;