@huanban/rulego-editor-core 1.1.5 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +2 -2
- package/dist/index.esm.js +36 -0
- package/dist/index.umd.js +2 -2
- package/package.json +1 -1
package/dist/index.cjs.js
CHANGED
|
@@ -114,7 +114,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
114
114
|
请确认:
|
|
115
115
|
1. 该消息已被规则链处理
|
|
116
116
|
2. 规则链已开启调试模式
|
|
117
|
-
3. 日志尚未过期`,noDebugLogs:"暂无调试日志记录",enableDebugHint:"请先发送消息到规则链并开启调试模式",loadFailedManual:"加载失败,请手动输入消息 ID",noNodes:"当前规则链无节点",queryingChainLogs:"正在查询规则链日志...",queryingNodes:"查询节点 {{start}}~{{end}} / {{total}}..."},debugConsole:{title:"调试控制台",clear:"清除"},aiProvider:{gitee_ai:"Gitee AI",deepseek:"DeepSeek",qwen:"通义千问",zhipu:"智谱 AI",openai:"OpenAI",ollama:"Ollama (本地)"},customNode:{onlyRightAnchorOut:"只允许从右边的锚点连出",inputSingleOutput:"Input节点只能允许引出一条边",externalCannotConnectGroupChild:"外部节点不允许连接组内节点",onlyLeftAnchorIn:"只允许从左边锚点连入",agentOnlyRightOrBottomOut:"只允许从右边和底部的锚点连出",agentOrchestrationLabel:"智能体编排",agentOrchestrationOnlyRightOrBottomOut:"智能体编排节点只能从右侧或底部锚点连出",agentOrchestrationOnlyLeftIn:"智能体编排节点只能从左侧锚点连入",anchorLlm:"大模型",anchorTool:"工具",anchorMemory:"记忆",anchorKnowledge:"知识库"},groupNode:{onlyRightAnchorOut:"只允许从右边的锚点连出",notToInput:"禁止连到输入类节点",onlyLeftAnchorIn:"只允许从左边锚点连入"},importExport:{exportTitle:"导出规则链",importTitle:"导入规则链",exportTab:"导出",importTab:"导入",nodes:"节点",edges:"连线",size:"大小",name:"名称",fileLoaded:"文件已加载,点击重新选择",dropHint:"拖拽 JSON 文件到此处,或点击选择文件",invalidRuleChainJson:"JSON 格式不符合 RuleGo 规则链规范(缺少 ruleChain 或 metadata 字段)",jsonParseFailed:"JSON 解析失败: {{message}}",selectJsonFile:"请选择 .json 文件",copied:"已复制到剪贴板",downloaded:"已下载: {{fileName}}",noImportData:"没有可导入的数据",importSuccess:"规则链导入成功",downloadFile:"下载文件",confirmImport:"确认导入"},workflowList:{title:"工作流列表",searchPlaceholder:"搜索工作流...",create:"新建",createTitle:"新建工作流",defaultName:"新工作流",namePlaceholder:"输入工作流名称",descriptionPlaceholder:"可选描述",empty:"暂无工作流",createFirst:"创建第一个工作流",design:"设计",info:"信息",logs:"日志",online:"已上线",offline:"已下线",onlineAction:"上线",offlineAction:"下线",confirmDelete:"确定删除工作流「{{name}}」吗?此操作不可恢复。",operateFailed:"操作失败",copyFailed:"复制失败",deleteFailed:"删除失败",createFailed:"创建失败"},dataView:{title:"规则链数据",copyJson:"复制",downloadJson:"下载",copied:"JSON 已复制到剪贴板",copyFailed:"复制失败",downloaded:"已下载 {{fileName}}",downloadFailed:"下载失败"},validation:{title:"规则链校验",revalidate:"重新校验",validate:"校验",clearResults:"清除结果",close:"关闭",all:"全部",validating:"正在校验...",empty:"无校验结果,请点击校验按钮开始",noFilteredResults:"当前筛选无结果"},ruleChainSettings:{title:"规则链设置",nameRequired:"规则链名称不能为空",namePlaceholder:"请输入规则链名称",descriptionPlaceholder:"请输入规则链描述",root:"根链",additionalInfo:"额外配置 (JSON)"},debugPanel:{sendMessage:"发送消息",debugLogs:"调试日志",runLogs:"运行日志",chainId:"规则链 ID",msgType:"消息类型",msgTypePlaceholder:"如 TEST_MSG",msgBodyJson:"消息体 (JSON)",sending:"发送中...",sendTestMessage:"发送测试消息",responseData:"响应数据",nodeLabel:"节点",loading:"加载中...",refresh:"刷新",noDebugLogs:"暂无调试日志",debugModeHint:'需要在节点上开启"调试模式"并发送消息',time:"时间",type:"类型",relation:"关系",operate:"操作",data:"数据",metadata:"元数据",error:"错误",noRunLogs:"暂无运行日志",runLogDetail:"日志详情",selectChainFirst:"请先选择规则链",noSendCallback:"未配置发送消息回调",invalidJson:"消息体 JSON 格式错误",sendSuccess:"消息发送成功",sendFailed:"发送失败: {{message}}",unknownError:"未知错误",sendException:"发送异常: {{message}}",loadDebugLogsFailed:"加载调试日志失败",loadRunLogsFailed:"加载运行日志失败",copied:"已复制",copyFailed:"复制失败"},searchPanel:{placeholder:"搜索节点名称、类型或 ID...",resultCount:"{{count}} 个结果",matchCount:"{{count}} 个匹配",noMatch:"无匹配",empty:"没有找到匹配的节点"},workflowInfo:{noData:"请选择一个工作流查看详情",baseInfo:"基础信息",varsSecrets:"变量与秘钥",integration:"应用集成",maintenance:"维护验证",online:"已上线",offline:"已下线",saveBaseInfo:"保存基础信息",saveVars:"保存变量",saveSecrets:"保存秘钥",saving:"保存中...",vars:"变量",secrets:"秘钥",varName:"变量名",varValue:"变量值",secretName:"秘钥名",secretValue:"秘钥值",apiIntegration:"API 集成",executeAPI:"执行 API:",notifyAPI:"通知 API:",webSocket:"WebSocket",debugWS:"Debug WS:",runtimeWS:"Runtime WS:",endpointWS:"Endpoint WS:",mcpIntegration:"MCP 集成",mcpSSE:"MCP SSE:",action:"操作",add:"添加",delete:"删除",saveFailed:"保存失败"},maintenance:{title:"维护验证",noApi:"当前请求适配器未提供维护接口",noIssues:"未返回问题",validating:"校验中...",runValidate:"运行校验",schemaDiff:"结构差异",repairPlan:"修复建议",patchPreview:"补丁预览",validateResult:"校验结果",valid:"通过",invalid:"未通过"},logViewer:{title:"调试控制台 (Debug Console)",empty:"暂无调试日志"},copilot:{placeholder:"问点什么...",send:"发送",userRole:"用户",assistantRole:"助手"},aiProperties:{modelSelector:"大模型算子选择",loading:"大模型引擎加载中...",fallback:"AI 服务暂时不可用,您的规则链将以普通降级模式运行。",selectPlaceholder:"-- 请选择大模型 --",empty:"后台暂未返回可用模型,请检查 AI 接口配置。"}},components:{"start-node":"输入",delay:"延迟",exec:"命令行",fetchNodeOutput:"取回节点输出",functions:"函数",log:"日志","x/python":"Python脚本",break:"中断",comment:"注释",end:"结束",for:"循环",fork:"并行分支",groupAction:"节点组",inclusive:"包容分支",join:"合并",ref:"节点引用",switch:"条件分支",while:"While循环",iterator:"迭代器",exprFilter:"表达式过滤",fieldFilter:"字段过滤",groupFilter:"过滤器组",jsFilter:"js过滤",jsSwitch:"js路由",msgTypeSwitch:"消息路由","x/luaFilter":"Lua脚本过滤",exprTransform:"表达式转换",jsTransform:"js转换",metadataTransform:"元数据转换","text/template":"模板转换","x/luaTransform":"Lua脚本转换",cacheDelete:"缓存删除",cacheGet:"缓存获取",cacheSet:"缓存设置",dbClient:"数据库",mqttClient:"MQTT发布者",net:"TCP/UDP",sendEmail:"发邮件",ssh:"SSH",restApiCall:"HTTP客户端","x/receiveEmail":"收邮件","x/fileDelete":"文件删除","x/fileList":"文件列表","x/fileRead":"文件读取","x/fileWrite":"文件写入","x/grpcClient":"gRPC 客户端","x/kafkaProducer":"Kafka发布者","x/mongodbClient":"MongoDB","x/natsClient":"NATS","x/nsqClient":"NSQ发布者","x/opengeminiQuery":"opengemini读","x/opengeminiWrite":"opengemini写","x/otel":"OpenTelemetry","x/pulsarClient":"Pulsar发布者","x/rabbitmqClient":"RabbitMQ","x/redisClient":"Redis","x/redisPub":"Redis发布者","x/wukongimSender":"WuKongIM发","x/beanstalkdWorker":"Beanstalkd Worker","x/beanstalkdTube":"Beanstalkd Tube","x/jsonQuery":"JSON查询","x/odooCrudCreate":"Odoo创建","x/odooCrudUpdate":"Odoo更新","x/soapParse":"SOAP解析","x/soapRequest":"SOAP请求",flow:"子规则链",simple_admission:"极简录取规则链",temperature_conversion:"温度转换","ai/llm":"AI文本生成","ai/createImage":"图像生成","ai/agent":"智能体","ai/intent":"意图识别","ai/localIntent":"本地意图识别","ai/mcpClient":"MCP 客户端","ai/transform/documentLoader":"文档加载器","ai/transform/textChunker":"文本分块","ai/embedding/openai":"OpenAI Embedding","ai/indexer/milvus":"Milvus索引","ai/indexer/redis":"Redis索引","ai/retriever/milvus":"Milvus检索","ai/retriever/redis":"Redis检索","ci/exec":"命令行","ci/gitClone":"Git拉取","ci/gitCommit":"Git提交","ci/gitCreateTag":"Git创建标签","ci/gitLog":"获取Git日志","ci/gitPush":"Git推送","ci/ps":"服务器指标","x/modbus":"Modbus","x/opcua":"OPC_UA订阅","x/opcuaRead":"OPC UA读取","x/opcuaWrite":"OPC UA写入","x/serialControl":"串口控制","x/serialIn":"串口输入","x/serialOut":"串口输出","x/serialRequest":"串口请求","x/streamAggregator":"流聚合器","x/streamTransform":"流转换器","endpoint/http":"HTTP","endpoint/ws":"Websocket","endpoint/ws_client":"Websocket客户端","endpoint/mqtt":"MQTT","endpoint/kafka":"Kafka","endpoint/nats":"Nats","endpoint/nsq":"NSQ","endpoint/pulsar":"Pulsar","endpoint/rabbitmq":"RabbitMQ","endpoint/redis":"Redis","endpoint/redis/stream":"Redis流","endpoint/net":"TCP/UDP","endpoint/net_client":"TCP/UDP客户端","endpoint/schedule":"定时调度","endpoint/grpc/stream":"gRPC流客户端","endpoint/wukongim":"WuKongIM收","endpoint/mcpServer":"MCP服务器","endpoint/beanstalkdTubeset":"Beanstalkd","endpoint/mysql_cdc":"MYSQL CDC","endpoint/opcua":"OPC_UA订阅"},fields:{jsScript:"JS脚本",script:"脚本",expr:"表达式",template:"模板",server:"服务器地址",username:"用户名",password:"密码",topic:"主题",key:"键",headers:"请求头",host:"主机地址",port:"端口",cmd:"命令",timeout:"超时时间(秒)",targetId:"目标ID",periodInSeconds:"延迟时间(秒)",maxPendingMsgs:"最大待处理消息数",periodInSecondsPattern:"延迟时间表达式(秒)",functionName:"函数名称",args:"参数列表",targetNodeId:"目标节点ID",range:"遍历范围",do:"执行动作",allMatches:"全部匹配",nodeIds:"节点ID列表",checkAllKeys:"检查所有键",dataNames:"数据字段名",metadataNames:"元数据字段名",mapping:"字段映射",isNew:"替换全部元数据",restEndpointUrlPattern:"HTTP URL地址",requestMethod:"请求方法",readTimeoutMs:"超时(毫秒)",maxParallelRequestsCount:"最大并发数",enableProxy:"开启代理",proxyScheme:"代理协议",proxyHost:"代理主机",proxyPort:"代理端口",driverName:"数据库驱动",dsn:"数据源名称(DSN)",sql:"SQL语句",params:"参数列表",getOne:"返回一条记录",poolSize:"连接池大小",protocol:"协议",connectTimeout:"连接超时(秒)",heartbeatInterval:"心跳间隔(秒)",maxReconnectInterval:"重连间隔(秒)",qOS:"QOS",smtpHost:"SMTP主机",smtpPort:"SMTP端口",fromEmail:"发送邮箱",toEmail:"收件邮箱",ccEmail:"抄送邮箱",bccEmail:"密送邮箱",path:"文件路径",content:"内容",append:"追加写入",recursive:"递归查找",dataType:"数据类型",exchange:"交换机",exchangeType:"交换机类型",durable:"持久化",autoDelete:"自动删除",channel:"频道",partition:"分区编号",database:"数据库名",collection:"集合名",opType:"操作类型",filter:"查询条件",doc:"文档内容",one:"仅返回一条",db:"数据库编号",service:"服务名",method:"方法名",request:"请求体",url:"API地址",model:"模型名称",systemPrompt:"系统提示词",messages:"消息列表",images:"图片列表",prompt:"提示词",n:"生成数量",size:"尺寸",quality:"质量",style:"风格",response_format:"返回格式",repository:"仓库地址",directory:"目录",reference:"分支/标签",authType:"认证方式",authUser:"认证用户名",authPassword:"认证密码/Token",pattern:"匹配模式",message:"消息",tag:"标签名",limit:"数量限制",startTime:"开始时间",endTime:"结束时间",refSpecs:"引用规范",options:"选项",unitId:"单元ID",address:"寄存器地址",quantity:"寄存器数量",value:"值",regType:"寄存器类型",policy:"安全策略",mode:"安全模式",auth:"认证方式",baudRate:"波特率",dataBits:"数据位",stopBits:"停止位",parity:"校验位",dtr:"DTR",rts:"RTS",action:"控制动作",splitType:"分割方式",splitKey:"分割标记",data:"数据",addChar:"附加字符",requestTimeout:"请求超时(毫秒)",metricExpr:"指标表达式",metrics:"指标列表",extend:"继承父链上下文",uID:"用户ID",token:"认证Token",channelType:"频道类型",channelID:"频道ID"},category:{filter:"过滤器",transform:"转换器",action:"动作",external:"外部集成",flow:"子规则链",common:"公共",custom:"自定义",ai:"AI",ci:"CI/CD",iot:"IoT",stats:"流式计算",endpoint:"输入端",endpoints:"输入端",storage:"存储",knowledge:"知识库",image:"图像",audio:"音频",file:"文件",other:"其他"},relationTypes:{Success:"成功",Failure:"失败",True:"真",False:"假",Default:"Default",Stream:"流式",NotFound:"未找到"},validation:{orphanNode:'节点 "{{name}}" 是孤立的, 没有任何连接',startNoConnection:"起始节点 (Input) 没有连接到任何节点",missingRelationType:"连接缺少关系类型",missingNodeType:'节点 "{{name}}" 缺少类型定义',cyclicConnection:"检测到循环连接",duplicateNodeId:"存在重复的节点ID"},action:{saveSuccess:"规则链保存成功",saveFailed:"保存失败: {{error}}",deleteSuccess:"删除成功",loadFailed:"加载失败: {{error}}",exportSuccess:"导出成功",importSuccess:"导入成功",importFailed:"导入失败: 数据格式错误",undoSuccess:"已撤销: {{description}}",redoSuccess:"已重做: {{description}}",noUndoAvailable:"没有可撤销的操作",noRedoAvailable:"没有可重做的操作"}},yD={Input:"Input","Input node already exists":"Only one input node can exist","At least one input node is required":"At least one input endpoint or default input node is required",toolbar:{save:"Save",undo:"Undo",redo:"Redo",delete:"Delete Selected",zoomIn:"Zoom In",zoomOut:"Zoom Out",fitView:"Fit View",fullscreen:"Fullscreen",autoLayout:"Auto Layout"},sidebar:{searchPlaceholder:"Search components...",noResults:"No matching components"},panel:{title:"Edit Properties",nodeName:"Node Name"},contextMenu:{edit:"Edit",editProperties:"Edit Properties",copy:"Copy",delete:"Delete",selectAll:"Select All",fitView:"Fit View",paste:"Paste",disconnect:"Disconnect",resetZoom:"Reset Zoom",runFromNode:"Run From This Node",runSingleNode:"Run This Node Only"},editor:{toolbar:{save:"Save",undo:"Undo",redo:"Redo",previousStep:"Previous Step",nextStep:"Next Step",delete:"Delete",zoomIn:"Zoom In",zoomOut:"Zoom Out",fitView:"Fit View",minimap:"Minimap",newChain:"New Rule Chain",export:"Export",import:"Import",canvasActions:"Canvas Actions",selectChain:"Select Rule Chain",info:"Info",run:"Run",aiChat:"AI Assistant",debugConsole:"Debug Panel",clearDebugHighlight:"Clear Debug Highlight",selection:"Box Select",closeSelection:"Close Box Select",selectionUnavailable:"Box select plugin is unavailable",componentManage:"Component Manage",switchLang:"中文",switchTheme:"Theme",searchNode:"Search",deploy:"Deploy",undeploy:"Undeploy",deleteChain:"Delete",reload:"Reload",runHistory:"Run History",autoLayout:"Auto Layout",trace:"Trace",resetZoom:"Reset Zoom",validate:"Validate Rule Chain",debugOn:"Enable Debug",debugOff:"Disable Debug",viewData:"View Data",settings:"Settings",fullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",zoomOptions:"Zoom Options",saving:"⏳ Saving...",saved:"✅ Saved",failed:"❌ Failed",timeout:"Timed out",invalidJsonCannotSave:`⛔ Rule-chain data is invalid and cannot be saved:
|
|
117
|
+
3. 日志尚未过期`,noDebugLogs:"暂无调试日志记录",enableDebugHint:"请先发送消息到规则链并开启调试模式",loadFailedManual:"加载失败,请手动输入消息 ID",noNodes:"当前规则链无节点",queryingChainLogs:"正在查询规则链日志...",queryingNodes:"查询节点 {{start}}~{{end}} / {{total}}..."},debugConsole:{title:"调试控制台",clear:"清除"},aiProvider:{gitee_ai:"Gitee AI",deepseek:"DeepSeek",qwen:"通义千问",zhipu:"智谱 AI",openai:"OpenAI",ollama:"Ollama (本地)"},customNode:{onlyRightAnchorOut:"只允许从右边的锚点连出",inputSingleOutput:"Input节点只能允许引出一条边",externalCannotConnectGroupChild:"外部节点不允许连接组内节点",onlyLeftAnchorIn:"只允许从左边锚点连入",agentOnlyRightOrBottomOut:"只允许从右边和底部的锚点连出",agentOrchestrationLabel:"智能体编排",agentOrchestrationOnlyRightOrBottomOut:"智能体编排节点只能从右侧或底部锚点连出",agentOrchestrationOnlyLeftIn:"智能体编排节点只能从左侧锚点连入",anchorLlm:"大模型",anchorTool:"工具",anchorMemory:"记忆",anchorKnowledge:"知识库"},groupNode:{onlyRightAnchorOut:"只允许从右边的锚点连出",notToInput:"禁止连到输入类节点",onlyLeftAnchorIn:"只允许从左边锚点连入"},importExport:{exportTitle:"导出规则链",importTitle:"导入规则链",exportTab:"导出",importTab:"导入",nodes:"节点",edges:"连线",size:"大小",name:"名称",fileLoaded:"文件已加载,点击重新选择",dropHint:"拖拽 JSON 文件到此处,或点击选择文件",invalidRuleChainJson:"JSON 格式不符合 RuleGo 规则链规范(缺少 ruleChain 或 metadata 字段)",jsonParseFailed:"JSON 解析失败: {{message}}",selectJsonFile:"请选择 .json 文件",copied:"已复制到剪贴板",downloaded:"已下载: {{fileName}}",noImportData:"没有可导入的数据",importSuccess:"规则链导入成功",downloadFile:"下载文件",confirmImport:"确认导入"},workflowList:{title:"工作流列表",searchPlaceholder:"搜索工作流...",create:"新建",createTitle:"新建工作流",createAndOpen:"创建并打开",defaultName:"新工作流",id:"ID",idPlaceholder:"规则链 ID,不可包含 /、\\ 或 .",idInvalid:"ID 不能为空,且不能包含 /、\\ 或 .",namePlaceholder:"输入工作流名称",descriptionPlaceholder:"可选描述",chainType:"规则链类型",rootChain:"主链",subChain:"子链",debugMode:"调试模式",debugModeHint:"开启后便于调试规则链执行过程",category:"分类",categoryPlaceholder:"可选分类,如 IoT / AI / 数据同步",initialStatus:"初始状态",initialStopped:"停用",initialRunning:"运行",openAfterCreate:"创建后进入编辑器",updateTime:"更新时间",more:"更多操作",rowHint:"单击查看信息,双击进入设计",empty:"暂无工作流",createFirst:"创建第一个工作流",design:"设计",info:"信息",logs:"日志",online:"已上线",offline:"已下线",onlineAction:"上线",offlineAction:"下线",confirmDelete:"确定删除工作流「{{name}}」吗?此操作不可恢复。",operateFailed:"操作失败",copyFailed:"复制失败",deleteFailed:"删除失败",createFailed:"创建失败"},dataView:{title:"规则链数据",copyJson:"复制",downloadJson:"下载",copied:"JSON 已复制到剪贴板",copyFailed:"复制失败",downloaded:"已下载 {{fileName}}",downloadFailed:"下载失败"},validation:{title:"规则链校验",revalidate:"重新校验",validate:"校验",clearResults:"清除结果",close:"关闭",all:"全部",validating:"正在校验...",empty:"无校验结果,请点击校验按钮开始",noFilteredResults:"当前筛选无结果"},ruleChainSettings:{title:"规则链设置",nameRequired:"规则链名称不能为空",namePlaceholder:"请输入规则链名称",descriptionPlaceholder:"请输入规则链描述",root:"根链",additionalInfo:"额外配置 (JSON)"},debugPanel:{sendMessage:"发送消息",debugLogs:"调试日志",runLogs:"运行日志",chainId:"规则链 ID",msgType:"消息类型",msgTypePlaceholder:"如 TEST_MSG",msgBodyJson:"消息体 (JSON)",sending:"发送中...",sendTestMessage:"发送测试消息",responseData:"响应数据",nodeLabel:"节点",loading:"加载中...",refresh:"刷新",noDebugLogs:"暂无调试日志",debugModeHint:'需要在节点上开启"调试模式"并发送消息',time:"时间",type:"类型",relation:"关系",operate:"操作",data:"数据",metadata:"元数据",error:"错误",noRunLogs:"暂无运行日志",runLogDetail:"日志详情",selectChainFirst:"请先选择规则链",noSendCallback:"未配置发送消息回调",invalidJson:"消息体 JSON 格式错误",sendSuccess:"消息发送成功",sendFailed:"发送失败: {{message}}",unknownError:"未知错误",sendException:"发送异常: {{message}}",loadDebugLogsFailed:"加载调试日志失败",loadRunLogsFailed:"加载运行日志失败",copied:"已复制",copyFailed:"复制失败"},searchPanel:{placeholder:"搜索节点名称、类型或 ID...",resultCount:"{{count}} 个结果",matchCount:"{{count}} 个匹配",noMatch:"无匹配",empty:"没有找到匹配的节点"},workflowInfo:{noData:"请选择一个工作流查看详情",baseInfo:"基础信息",varsSecrets:"变量与秘钥",integration:"应用集成",maintenance:"维护验证",online:"已上线",offline:"已下线",saveBaseInfo:"保存基础信息",saveVars:"保存变量",saveSecrets:"保存秘钥",saving:"保存中...",vars:"变量",secrets:"秘钥",varName:"变量名",varValue:"变量值",secretName:"秘钥名",secretValue:"秘钥值",apiIntegration:"API 集成",executeAPI:"执行 API:",notifyAPI:"通知 API:",webSocket:"WebSocket",debugWS:"Debug WS:",runtimeWS:"Runtime WS:",endpointWS:"Endpoint WS:",mcpIntegration:"MCP 集成",mcpSSE:"MCP SSE:",action:"操作",add:"添加",delete:"删除",saveFailed:"保存失败"},maintenance:{title:"维护验证",noApi:"当前请求适配器未提供维护接口",noIssues:"未返回问题",validating:"校验中...",runValidate:"运行校验",schemaDiff:"结构差异",repairPlan:"修复建议",patchPreview:"补丁预览",validateResult:"校验结果",valid:"通过",invalid:"未通过"},logViewer:{title:"调试控制台 (Debug Console)",empty:"暂无调试日志"},copilot:{placeholder:"问点什么...",send:"发送",userRole:"用户",assistantRole:"助手"},aiProperties:{modelSelector:"大模型算子选择",loading:"大模型引擎加载中...",fallback:"AI 服务暂时不可用,您的规则链将以普通降级模式运行。",selectPlaceholder:"-- 请选择大模型 --",empty:"后台暂未返回可用模型,请检查 AI 接口配置。"}},components:{"start-node":"输入",delay:"延迟",exec:"命令行",fetchNodeOutput:"取回节点输出",functions:"函数",log:"日志","x/python":"Python脚本",break:"中断",comment:"注释",end:"结束",for:"循环",fork:"并行分支",groupAction:"节点组",inclusive:"包容分支",join:"合并",ref:"节点引用",switch:"条件分支",while:"While循环",iterator:"迭代器",exprFilter:"表达式过滤",fieldFilter:"字段过滤",groupFilter:"过滤器组",jsFilter:"js过滤",jsSwitch:"js路由",msgTypeSwitch:"消息路由","x/luaFilter":"Lua脚本过滤",exprTransform:"表达式转换",jsTransform:"js转换",metadataTransform:"元数据转换","text/template":"模板转换","x/luaTransform":"Lua脚本转换",cacheDelete:"缓存删除",cacheGet:"缓存获取",cacheSet:"缓存设置",dbClient:"数据库",mqttClient:"MQTT发布者",net:"TCP/UDP",sendEmail:"发邮件",ssh:"SSH",restApiCall:"HTTP客户端","x/receiveEmail":"收邮件","x/fileDelete":"文件删除","x/fileList":"文件列表","x/fileRead":"文件读取","x/fileWrite":"文件写入","x/grpcClient":"gRPC 客户端","x/kafkaProducer":"Kafka发布者","x/mongodbClient":"MongoDB","x/natsClient":"NATS","x/nsqClient":"NSQ发布者","x/opengeminiQuery":"opengemini读","x/opengeminiWrite":"opengemini写","x/otel":"OpenTelemetry","x/pulsarClient":"Pulsar发布者","x/rabbitmqClient":"RabbitMQ","x/redisClient":"Redis","x/redisPub":"Redis发布者","x/wukongimSender":"WuKongIM发","x/beanstalkdWorker":"Beanstalkd Worker","x/beanstalkdTube":"Beanstalkd Tube","x/jsonQuery":"JSON查询","x/odooCrudCreate":"Odoo创建","x/odooCrudUpdate":"Odoo更新","x/soapParse":"SOAP解析","x/soapRequest":"SOAP请求",flow:"子规则链",simple_admission:"极简录取规则链",temperature_conversion:"温度转换","ai/llm":"AI文本生成","ai/createImage":"图像生成","ai/agent":"智能体","ai/intent":"意图识别","ai/localIntent":"本地意图识别","ai/mcpClient":"MCP 客户端","ai/transform/documentLoader":"文档加载器","ai/transform/textChunker":"文本分块","ai/embedding/openai":"OpenAI Embedding","ai/indexer/milvus":"Milvus索引","ai/indexer/redis":"Redis索引","ai/retriever/milvus":"Milvus检索","ai/retriever/redis":"Redis检索","ci/exec":"命令行","ci/gitClone":"Git拉取","ci/gitCommit":"Git提交","ci/gitCreateTag":"Git创建标签","ci/gitLog":"获取Git日志","ci/gitPush":"Git推送","ci/ps":"服务器指标","x/modbus":"Modbus","x/opcua":"OPC_UA订阅","x/opcuaRead":"OPC UA读取","x/opcuaWrite":"OPC UA写入","x/serialControl":"串口控制","x/serialIn":"串口输入","x/serialOut":"串口输出","x/serialRequest":"串口请求","x/streamAggregator":"流聚合器","x/streamTransform":"流转换器","endpoint/http":"HTTP","endpoint/ws":"Websocket","endpoint/ws_client":"Websocket客户端","endpoint/mqtt":"MQTT","endpoint/kafka":"Kafka","endpoint/nats":"Nats","endpoint/nsq":"NSQ","endpoint/pulsar":"Pulsar","endpoint/rabbitmq":"RabbitMQ","endpoint/redis":"Redis","endpoint/redis/stream":"Redis流","endpoint/net":"TCP/UDP","endpoint/net_client":"TCP/UDP客户端","endpoint/schedule":"定时调度","endpoint/grpc/stream":"gRPC流客户端","endpoint/wukongim":"WuKongIM收","endpoint/mcpServer":"MCP服务器","endpoint/beanstalkdTubeset":"Beanstalkd","endpoint/mysql_cdc":"MYSQL CDC","endpoint/opcua":"OPC_UA订阅"},fields:{jsScript:"JS脚本",script:"脚本",expr:"表达式",template:"模板",server:"服务器地址",username:"用户名",password:"密码",topic:"主题",key:"键",headers:"请求头",host:"主机地址",port:"端口",cmd:"命令",timeout:"超时时间(秒)",targetId:"目标ID",periodInSeconds:"延迟时间(秒)",maxPendingMsgs:"最大待处理消息数",periodInSecondsPattern:"延迟时间表达式(秒)",functionName:"函数名称",args:"参数列表",targetNodeId:"目标节点ID",range:"遍历范围",do:"执行动作",allMatches:"全部匹配",nodeIds:"节点ID列表",checkAllKeys:"检查所有键",dataNames:"数据字段名",metadataNames:"元数据字段名",mapping:"字段映射",isNew:"替换全部元数据",restEndpointUrlPattern:"HTTP URL地址",requestMethod:"请求方法",readTimeoutMs:"超时(毫秒)",maxParallelRequestsCount:"最大并发数",enableProxy:"开启代理",proxyScheme:"代理协议",proxyHost:"代理主机",proxyPort:"代理端口",driverName:"数据库驱动",dsn:"数据源名称(DSN)",sql:"SQL语句",params:"参数列表",getOne:"返回一条记录",poolSize:"连接池大小",protocol:"协议",connectTimeout:"连接超时(秒)",heartbeatInterval:"心跳间隔(秒)",maxReconnectInterval:"重连间隔(秒)",qOS:"QOS",smtpHost:"SMTP主机",smtpPort:"SMTP端口",fromEmail:"发送邮箱",toEmail:"收件邮箱",ccEmail:"抄送邮箱",bccEmail:"密送邮箱",path:"文件路径",content:"内容",append:"追加写入",recursive:"递归查找",dataType:"数据类型",exchange:"交换机",exchangeType:"交换机类型",durable:"持久化",autoDelete:"自动删除",channel:"频道",partition:"分区编号",database:"数据库名",collection:"集合名",opType:"操作类型",filter:"查询条件",doc:"文档内容",one:"仅返回一条",db:"数据库编号",service:"服务名",method:"方法名",request:"请求体",url:"API地址",model:"模型名称",systemPrompt:"系统提示词",messages:"消息列表",images:"图片列表",prompt:"提示词",n:"生成数量",size:"尺寸",quality:"质量",style:"风格",response_format:"返回格式",repository:"仓库地址",directory:"目录",reference:"分支/标签",authType:"认证方式",authUser:"认证用户名",authPassword:"认证密码/Token",pattern:"匹配模式",message:"消息",tag:"标签名",limit:"数量限制",startTime:"开始时间",endTime:"结束时间",refSpecs:"引用规范",options:"选项",unitId:"单元ID",address:"寄存器地址",quantity:"寄存器数量",value:"值",regType:"寄存器类型",policy:"安全策略",mode:"安全模式",auth:"认证方式",baudRate:"波特率",dataBits:"数据位",stopBits:"停止位",parity:"校验位",dtr:"DTR",rts:"RTS",action:"控制动作",splitType:"分割方式",splitKey:"分割标记",data:"数据",addChar:"附加字符",requestTimeout:"请求超时(毫秒)",metricExpr:"指标表达式",metrics:"指标列表",extend:"继承父链上下文",uID:"用户ID",token:"认证Token",channelType:"频道类型",channelID:"频道ID"},category:{filter:"过滤器",transform:"转换器",action:"动作",external:"外部集成",flow:"子规则链",common:"公共",custom:"自定义",ai:"AI",ci:"CI/CD",iot:"IoT",stats:"流式计算",endpoint:"输入端",endpoints:"输入端",storage:"存储",knowledge:"知识库",image:"图像",audio:"音频",file:"文件",other:"其他"},relationTypes:{Success:"成功",Failure:"失败",True:"真",False:"假",Default:"Default",Stream:"流式",NotFound:"未找到"},validation:{orphanNode:'节点 "{{name}}" 是孤立的, 没有任何连接',startNoConnection:"起始节点 (Input) 没有连接到任何节点",missingRelationType:"连接缺少关系类型",missingNodeType:'节点 "{{name}}" 缺少类型定义',cyclicConnection:"检测到循环连接",duplicateNodeId:"存在重复的节点ID"},action:{saveSuccess:"规则链保存成功",saveFailed:"保存失败: {{error}}",deleteSuccess:"删除成功",loadFailed:"加载失败: {{error}}",exportSuccess:"导出成功",importSuccess:"导入成功",importFailed:"导入失败: 数据格式错误",undoSuccess:"已撤销: {{description}}",redoSuccess:"已重做: {{description}}",noUndoAvailable:"没有可撤销的操作",noRedoAvailable:"没有可重做的操作"}},yD={Input:"Input","Input node already exists":"Only one input node can exist","At least one input node is required":"At least one input endpoint or default input node is required",toolbar:{save:"Save",undo:"Undo",redo:"Redo",delete:"Delete Selected",zoomIn:"Zoom In",zoomOut:"Zoom Out",fitView:"Fit View",fullscreen:"Fullscreen",autoLayout:"Auto Layout"},sidebar:{searchPlaceholder:"Search components...",noResults:"No matching components"},panel:{title:"Edit Properties",nodeName:"Node Name"},contextMenu:{edit:"Edit",editProperties:"Edit Properties",copy:"Copy",delete:"Delete",selectAll:"Select All",fitView:"Fit View",paste:"Paste",disconnect:"Disconnect",resetZoom:"Reset Zoom",runFromNode:"Run From This Node",runSingleNode:"Run This Node Only"},editor:{toolbar:{save:"Save",undo:"Undo",redo:"Redo",previousStep:"Previous Step",nextStep:"Next Step",delete:"Delete",zoomIn:"Zoom In",zoomOut:"Zoom Out",fitView:"Fit View",minimap:"Minimap",newChain:"New Rule Chain",export:"Export",import:"Import",canvasActions:"Canvas Actions",selectChain:"Select Rule Chain",info:"Info",run:"Run",aiChat:"AI Assistant",debugConsole:"Debug Panel",clearDebugHighlight:"Clear Debug Highlight",selection:"Box Select",closeSelection:"Close Box Select",selectionUnavailable:"Box select plugin is unavailable",componentManage:"Component Manage",switchLang:"中文",switchTheme:"Theme",searchNode:"Search",deploy:"Deploy",undeploy:"Undeploy",deleteChain:"Delete",reload:"Reload",runHistory:"Run History",autoLayout:"Auto Layout",trace:"Trace",resetZoom:"Reset Zoom",validate:"Validate Rule Chain",debugOn:"Enable Debug",debugOff:"Disable Debug",viewData:"View Data",settings:"Settings",fullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",zoomOptions:"Zoom Options",saving:"⏳ Saving...",saved:"✅ Saved",failed:"❌ Failed",timeout:"Timed out",invalidJsonCannotSave:`⛔ Rule-chain data is invalid and cannot be saved:
|
|
118
118
|
|
|
119
119
|
{{error}}`,validationFailedCannotSave:`Rule-chain validation failed and cannot be saved:
|
|
120
120
|
|
|
@@ -123,7 +123,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
123
123
|
Check:
|
|
124
124
|
1. The message was processed by this rule chain
|
|
125
125
|
2. Debug mode is enabled
|
|
126
|
-
3. Logs have not expired`,noDebugLogs:"No debug logs",enableDebugHint:"Send a message to the rule chain and enable debug mode first",loadFailedManual:"Load failed. Enter a message ID manually",noNodes:"The current rule chain has no nodes",queryingChainLogs:"Querying rule-chain logs...",queryingNodes:"Querying nodes {{start}}~{{end}} / {{total}}..."},debugConsole:{title:"Debug Console",clear:"Clear"},aiProvider:{gitee_ai:"Gitee AI",deepseek:"DeepSeek",qwen:"Tongyi Qianwen",zhipu:"Zhipu AI",openai:"OpenAI",ollama:"Ollama (Local)"},customNode:{onlyRightAnchorOut:"Only the right anchor can connect out",inputSingleOutput:"Input can only connect to one outgoing edge",externalCannotConnectGroupChild:"External nodes cannot connect to nodes inside a group",onlyLeftAnchorIn:"Only the left anchor can connect in",agentOnlyRightOrBottomOut:"Only right and bottom anchors can connect out",agentOrchestrationLabel:"Agent Orchestration",agentOrchestrationOnlyRightOrBottomOut:"Agent orchestration can only connect out from the right or bottom anchors",agentOrchestrationOnlyLeftIn:"Agent orchestration can only connect in from the left anchor",anchorLlm:"LLM",anchorTool:"Tools",anchorMemory:"Memory",anchorKnowledge:"Knowledge"},groupNode:{onlyRightAnchorOut:"Only the right anchor can connect out",notToInput:"Cannot connect to input nodes",onlyLeftAnchorIn:"Only the left anchor can connect in"},importExport:{exportTitle:"Export Rule Chain",importTitle:"Import Rule Chain",exportTab:"Export",importTab:"Import",nodes:"Nodes",edges:"Edges",size:"Size",name:"Name",fileLoaded:"File loaded. Click to choose again",dropHint:"Drop a JSON file here, or click to choose one",invalidRuleChainJson:"Invalid RuleGo rule-chain JSON: missing ruleChain or metadata",jsonParseFailed:"JSON parse failed: {{message}}",selectJsonFile:"Choose a .json file",copied:"Copied to clipboard",downloaded:"Downloaded: {{fileName}}",noImportData:"No data to import",importSuccess:"Rule chain imported",downloadFile:"Download File",confirmImport:"Confirm Import"},workflowList:{title:"Workflow List",searchPlaceholder:"Search workflows...",create:"New",createTitle:"New Workflow",defaultName:"New Workflow",namePlaceholder:"Enter workflow name",descriptionPlaceholder:"Optional description",empty:"No workflows",createFirst:"Create first workflow",design:"Design",info:"Info",logs:"Logs",online:"Online",offline:"Offline",onlineAction:"Start",offlineAction:"Stop",confirmDelete:'Delete workflow "{{name}}"? This action cannot be undone.',operateFailed:"Operation failed",copyFailed:"Copy failed",deleteFailed:"Delete failed",createFailed:"Create failed"},dataView:{title:"Rule Chain Data",copyJson:"Copy",downloadJson:"Download",copied:"JSON copied to clipboard",copyFailed:"Copy failed",downloaded:"Downloaded {{fileName}}",downloadFailed:"Download failed"},validation:{title:"Rule Chain Validation",revalidate:"Revalidate",validate:"Validate",clearResults:"Clear results",close:"Close",all:"All",validating:"Validating...",empty:"No validation results. Click Validate to start.",noFilteredResults:"No results for the current filter"},ruleChainSettings:{title:"Rule Chain Settings",nameRequired:"Rule chain name is required",namePlaceholder:"Enter rule chain name",descriptionPlaceholder:"Enter rule chain description",root:"Root Chain",additionalInfo:"Additional Info (JSON)"},debugPanel:{sendMessage:"Send Message",debugLogs:"Debug Logs",runLogs:"Run Logs",chainId:"Rule Chain ID",msgType:"Message Type",msgTypePlaceholder:"e.g. TEST_MSG",msgBodyJson:"Message Body (JSON)",sending:"Sending...",sendTestMessage:"Send Test Message",responseData:"Response Data",nodeLabel:"Node",loading:"Loading...",refresh:"Refresh",noDebugLogs:"No debug logs",debugModeHint:"Enable Debug Mode on the node and send a message first",time:"Time",type:"Type",relation:"Relation",operate:"Actions",data:"Data",metadata:"Metadata",error:"Error",noRunLogs:"No run logs",runLogDetail:"Run Log Details",selectChainFirst:"Select a rule chain first",noSendCallback:"Send message callback is not configured",invalidJson:"Message body JSON is invalid",sendSuccess:"Message sent successfully",sendFailed:"Send failed: {{message}}",unknownError:"Unknown error",sendException:"Send exception: {{message}}",loadDebugLogsFailed:"Failed to load debug logs",loadRunLogsFailed:"Failed to load run logs",copied:"Copied",copyFailed:"Copy failed"},searchPanel:{placeholder:"Search node name, type, or ID...",resultCount:"{{count}} result(s)",matchCount:"{{count}} match(es)",noMatch:"No matches",empty:"No matching nodes found"},workflowInfo:{noData:"Select a workflow to view details",baseInfo:"Basic Info",varsSecrets:"Variables & Secrets",integration:"App Integration",maintenance:"Maintenance",online:"Online",offline:"Offline",saveBaseInfo:"Save Basic Info",saveVars:"Save Variables",saveSecrets:"Save Secrets",saving:"Saving...",vars:"Variables",secrets:"Secrets",varName:"Variable Name",varValue:"Variable Value",secretName:"Secret Name",secretValue:"Secret Value",apiIntegration:"API Integration",executeAPI:"Execute API:",notifyAPI:"Notify API:",webSocket:"WebSocket",debugWS:"Debug WS:",runtimeWS:"Runtime WS:",endpointWS:"Endpoint WS:",mcpIntegration:"MCP Integration",mcpSSE:"MCP SSE:",action:"Actions",add:"Add",delete:"Delete",saveFailed:"Save failed"},maintenance:{title:"Maintenance",noApi:"The current request adapter does not provide maintenance APIs",noIssues:"No issues returned",validating:"Validating...",runValidate:"Run Validation",schemaDiff:"Schema Diff",repairPlan:"Repair Plan",patchPreview:"Patch Preview",validateResult:"Validation Result",valid:"Passed",invalid:"Failed"},logViewer:{title:"Debug Console",empty:"No debug logs"},copilot:{placeholder:"Ask something...",send:"Send",userRole:"User",assistantRole:"Assistant"},aiProperties:{modelSelector:"LLM Operator",loading:"Loading LLM engine...",fallback:"AI service is temporarily unavailable. This rule chain will run in normal fallback mode.",selectPlaceholder:"-- Select LLM --",empty:"The backend did not return any available models. Check the AI API configuration."}},components:{"start-node":"Input",delay:"Delay",exec:"Exec Command",fetchNodeOutput:"Fetch Node Output",functions:"Functions",log:"Log","x/python":"Python Script",break:"Break",comment:"Comment",end:"End",for:"For Loop",fork:"Fork",groupAction:"Group Action",inclusive:"Inclusive Gateway",join:"Join",ref:"Reference Node",switch:"Switch",while:"While Loop",iterator:"Iterator",exprFilter:"Expr Filter",fieldFilter:"Field Filter",groupFilter:"Group Filter",jsFilter:"JS Filter",jsSwitch:"JS Switch",msgTypeSwitch:"Msg Type Switch","x/luaFilter":"Lua Filter",exprTransform:"Expr Transform",jsTransform:"JS Transform",metadataTransform:"Metadata Transform","text/template":"Template Transform","x/luaTransform":"Lua Transform",cacheDelete:"Cache Delete",cacheGet:"Cache Get",cacheSet:"Cache Set",dbClient:"Database",mqttClient:"MQTT",net:"TCP/UDP",sendEmail:"Send Email",ssh:"SSH","x/receiveEmail":"Receive Email",restApiCall:"REST API Call","x/fileDelete":"File Delete","x/fileList":"File List","x/fileRead":"File Read","x/fileWrite":"File Write","x/grpcClient":"gRPC Client","x/kafkaProducer":"Kafka","x/mongodbClient":"MongoDB","x/natsClient":"NATS","x/nsqClient":"NSQ","x/opengeminiQuery":"OpenGemini Query","x/opengeminiWrite":"OpenGemini Write","x/otel":"OpenTelemetry","x/pulsarClient":"Pulsar","x/rabbitmqClient":"RabbitMQ","x/redisClient":"Redis","x/redisPub":"Redis Pub","x/wukongimSender":"WuKong IM","x/beanstalkdWorker":"Beanstalkd Worker","x/beanstalkdTube":"Beanstalkd Tube","x/jsonQuery":"JSON Query","x/odooCrudCreate":"Odoo Create","x/odooCrudUpdate":"Odoo Update","x/soapParse":"SOAP Parse","x/soapRequest":"SOAP Request",flow:"Sub Rule Chain",simple_admission:"Simple Admission",temperature_conversion:"Temperature Conversion","ai/llm":"AI LLM","ai/createImage":"AI Image","ai/agent":"Agent","ai/intent":"Intent Recognition","ai/localIntent":"Local Intent Recognition","ai/mcpClient":"MCP Client","ai/transform/documentLoader":"Document Loader","ai/transform/textChunker":"Text Chunker","ai/embedding/openai":"OpenAI Embedding","ai/indexer/milvus":"Milvus Indexer","ai/indexer/redis":"Redis Indexer","ai/retriever/milvus":"Milvus Retriever","ai/retriever/redis":"Redis Retriever","ci/exec":"Command Line","ci/gitClone":"Git Clone","ci/gitCommit":"Git Commit","ci/gitCreateTag":"Git Create Tag","ci/gitLog":"Git Log","ci/gitPush":"Git Push","ci/ps":"Server Metrics","x/opcua":"OPC UA Subscribe","x/modbus":"Modbus","x/opcuaRead":"OPC UA Read","x/opcuaWrite":"OPC UA Write","x/serialControl":"Serial Control","x/serialIn":"Serial Input","x/serialOut":"Serial Output","x/serialRequest":"Serial Request","x/streamAggregator":"Stream Aggregator","x/streamTransform":"Stream Transform","endpoint/http":"HTTP Server","endpoint/ws":"WebSocket","endpoint/ws_client":"WebSocket Client","endpoint/mqtt":"MQTT Subscribe","endpoint/kafka":"Kafka Consumer","endpoint/nats":"NATS Subscribe","endpoint/nsq":"NSQ Consumer","endpoint/pulsar":"Pulsar Consumer","endpoint/rabbitmq":"RabbitMQ Consumer","endpoint/redis":"Redis Subscribe","endpoint/redis/stream":"Redis Stream","endpoint/net":"TCP/UDP Server","endpoint/net_client":"TCP/UDP Client","endpoint/schedule":"Scheduler","endpoint/grpc/stream":"gRPC Stream","endpoint/wukongim":"WuKong IM Receiver","endpoint/mcpServer":"MCP Server","endpoint/beanstalkdTubeset":"Beanstalkd","endpoint/mysql_cdc":"MySQL CDC","endpoint/opcua":"OPC UA Server"},fields:{jsScript:"JS Script",script:"Script",expr:"Expression",template:"Template",server:"Server",username:"Username",password:"Password",topic:"Topic",key:"Key",headers:"Headers",host:"Host",port:"Port",cmd:"Command",timeout:"Timeout (sec)",targetId:"Target ID",periodInSeconds:"Period (sec)",maxPendingMsgs:"Max Pending Messages",periodInSecondsPattern:"Period Expression (sec)",functionName:"Function Name",args:"Arguments",targetNodeId:"Target Node ID",range:"Iteration Range",do:"Action",allMatches:"All Must Match",nodeIds:"Node IDs",checkAllKeys:"Check All Keys",dataNames:"Data Field Names",metadataNames:"Metadata Field Names",mapping:"Field Mapping",isNew:"Replace All Metadata",restEndpointUrlPattern:"Endpoint URL",requestMethod:"Method",readTimeoutMs:"Timeout (ms)",maxParallelRequestsCount:"Max Concurrency",enableProxy:"Enable Proxy",proxyScheme:"Proxy Scheme",proxyHost:"Proxy Host",proxyPort:"Proxy Port",driverName:"Driver",dsn:"DSN",sql:"SQL",params:"Parameters",getOne:"Return One Record",poolSize:"Pool Size",protocol:"Protocol",connectTimeout:"Connect Timeout (sec)",heartbeatInterval:"Heartbeat Interval (sec)",maxReconnectInterval:"Max Reconnect Interval (sec)",qOS:"QoS",smtpHost:"SMTP Host",smtpPort:"SMTP Port",fromEmail:"From Email",toEmail:"To Email",ccEmail:"CC Email",bccEmail:"BCC Email",path:"File Path",content:"Content",append:"Append",recursive:"Recursive",dataType:"Data Type",exchange:"Exchange",exchangeType:"Exchange Type",durable:"Durable",autoDelete:"Auto Delete",channel:"Channel",partition:"Partition",database:"Database",collection:"Collection",opType:"Operation Type",filter:"Filter",doc:"Document",one:"Return One",db:"DB Number",service:"Service",method:"Method",request:"Request Body",url:"API URL",model:"Model Name",systemPrompt:"System Prompt",messages:"Messages",images:"Images",prompt:"Prompt",n:"Count",size:"Size",quality:"Quality",style:"Style",response_format:"Response Format",repository:"Repository URL",directory:"Directory",reference:"Branch/Tag",authType:"Auth Type",authUser:"Auth User",authPassword:"Auth Password/Token",pattern:"Pattern",message:"Message",tag:"Tag",limit:"Limit",startTime:"Start Time",endTime:"End Time",refSpecs:"Ref Specs",options:"Options",unitId:"Unit ID",address:"Register Address",quantity:"Register Quantity",value:"Value",regType:"Register Type",policy:"Security Policy",mode:"Security Mode",auth:"Auth",baudRate:"Baud Rate",dataBits:"Data Bits",stopBits:"Stop Bits",parity:"Parity",dtr:"DTR",rts:"RTS",action:"Action",splitType:"Split Type",splitKey:"Split Key",data:"Data",addChar:"Append Char",requestTimeout:"Request Timeout (ms)",metricExpr:"Metric Expression",metrics:"Metrics",extend:"Extend Parent Context",uID:"User ID",token:"Auth Token",channelType:"Channel Type",channelID:"Channel ID"},category:{filter:"Filter",transform:"Transform",action:"Action",external:"External",flow:"Flow",common:"Common",custom:"Custom",ai:"AI",ci:"CI/CD",iot:"IoT",stats:"Stream Computing",endpoint:"Endpoint",endpoints:"Endpoint",storage:"Storage",knowledge:"Knowledge",image:"Image",audio:"Audio",file:"File",other:"Other"},relationTypes:{Success:"Success",Failure:"Failure",True:"True",False:"False",Default:"Default",Stream:"Stream",NotFound:"Not Found"},validation:{orphanNode:'Node "{{name}}" is orphaned with no connections',startNoConnection:"Start node (Input) has no connections",missingRelationType:"Connection is missing relation type",missingNodeType:'Node "{{name}}" is missing type definition',cyclicConnection:"Cyclic connection detected",duplicateNodeId:"Duplicate node ID found"},action:{saveSuccess:"Rule chain saved successfully",saveFailed:"Save failed: {{error}}",deleteSuccess:"Deleted successfully",loadFailed:"Load failed: {{error}}",exportSuccess:"Exported successfully",importSuccess:"Imported successfully",importFailed:"Import failed: invalid data format",undoSuccess:"Undone: {{description}}",redoSuccess:"Redone: {{description}}",noUndoAvailable:"Nothing to undo",noRedoAvailable:"Nothing to redo"}},V7={startNodeId:"$node_start_input",nodeCount:0,edgeCount:0,nodeWidth:100,relationTypeSplit:"/"},F7={isReady:!1,isDirty:!1,isLoading:!1,selectedNode:null,selectedEdge:null,ruleChain:null,nodeComponents:{},componentGroups:[],currentNodeView:null,currentNodeModel:{},currentEdgeModel:{},canUndo:!1,canRedo:!1};class v4{constructor(e){this.lfInstance=null,this.plugins=[],this.initialized=!1,this.disposeLocaleChange=null,this.options=e,this.internalData={...V7},this.store=new Bw({...F7}),this.eventBus=new Jw,this.dataAdapter=new u4,this.componentRegistry=new N4({adapter:e.adapterComponents}),this.history=new h4({maxHistory:e.maxHistory??50}),this.validation=new ND,this.validation.registerBuiltinRules(),this.theme=new m4,this.i18n=new MD({locale:e.locale??"zh-CN",fallback:"en-US"}),this.i18n.register("zh-CN",mD),this.i18n.register("en-US",yD),this.disposeLocaleChange=this.i18n.onLocaleChange(()=>{this.syncComponentState()}),this.loadComponents(e.components??f4),e.plugins&&e.plugins.forEach(i=>this.use(i))}init(e){if(this.initialized){console.warn("[EditorCore] 编辑器已初始化, 请勿重复调用");return}if(this.lfInstance=e,this.options.features||(this.options.features={}),this.componentRegistry.hasCategory("ai")||(this.options.features.aiCopilot=!1),e)try{P4(e)}catch(a){console.error("[EditorCore] 自定义节点注册失败:",a)}const i=this.options.theme??"light";this.theme.setTheme(i),this.plugins.forEach(a=>{if(a.onInit)try{a.onInit(this)}catch(n){console.error(`[EditorCore] 插件 "${a.name}" 初始化出错:`,n)}}),this.store.setState({isReady:!0}),this.initialized=!0,this.eventBus.emit("editor:ready")}destroy(){var e;this.plugins.forEach(i=>{if(i.onDestroy)try{i.onDestroy(this)}catch(a){console.error(`[EditorCore] 插件 "${i.name}" 销毁出错:`,a)}}),this.store.destroy(),this.eventBus.destroy(),this.history.destroy(),this.theme.destroy(),(e=this.disposeLocaleChange)==null||e.call(this),this.disposeLocaleChange=null,this.i18n.destroy(),this.validation.clear(),this.componentRegistry.clear(),this.plugins=[],this.lfInstance=null,this.initialized=!1}loadComponents(e){const i=TM(e);yg(i),this.componentRegistry.clear();const a=this.componentRegistry.loadFromRawData(i);return this.syncComponentState(a)}registerComponents(e,i=!0){return yg(e),this.componentRegistry.registerAll(e,i),this.syncComponentState()}syncComponentState(e=this.componentRegistry.getGroups()){const i=this.localizeComponentGroups(e);return this.store.setState({nodeComponents:this.componentRegistry.getMap(),componentGroups:i}),i}localizeComponentGroups(e){return e.map(i=>({...i,label:hD(this.i18n,`category.${i.category}`,i.label||i.category)}))}loadData(e){this.internalData.nodeCount=0,this.internalData.edgeCount=0,this.store.setState({ruleChain:e.ruleChain,isDirty:!1,selectedNode:null,selectedEdge:null});const i=this.dataAdapter.adapterIn(e,this.componentRegistry.getMap(),this.internalData,{startX:280,startY:280});mg(i,"render"),this.eventBus.emit("editor:data-loaded",{lfData:i,ruleChain:e.ruleChain}),this.history.clear()}exportData(e,i){const a=this.store.getState().ruleChain;if(!a)throw new Error("[EditorCore] 无法导出: 规则链配置为空");return this.dataAdapter.adapterOut(e,a,this.internalData,i)}validateGraph(e){return this.validation.validate(e,{startNodeId:this.internalData.startNodeId})}on(e,i){return this.eventBus.on(e,i)}emit(e,...i){this.eventBus.emit(e,...i)}use(e){if(this.plugins.some(i=>i.name===e.name)){console.warn(`[EditorCore] 插件 "${e.name}" 已安装, 跳过`);return}this.plugins.push(e),this.initialized&&e.onInit&&e.onInit(this)}getInternalData(){return{...this.internalData}}getLfInstance(){return this.lfInstance}getOptions(){return this.options}}const X7=new Set(["fork","switch","inclusive","while","for","groupFilter","groupAction","iterator"]),$7=new Set(["comment"]);function W2(t,e){return!!(t==="group-node"||e!=null&&e.type&&X7.has(e.type))}function q7(t,e){mg(t,"layout");const i={layerGapX:(e==null?void 0:e.layerGapX)??250,nodeGapY:(e==null?void 0:e.nodeGapY)??100,startX:(e==null?void 0:e.startX)??100,startY:(e==null?void 0:e.startY)??200,startNodeId:(e==null?void 0:e.startNodeId)??"$node_start_input",groupNodeHeight:(e==null?void 0:e.groupNodeHeight)??200},{nodes:a,edges:n}=t;if(!a||a.length===0)return t;const r=[],o=[],l=[],s=new Set;a.forEach(y=>{y.type==="group-node"&&Array.isArray(y.children)&&y.children.forEach(x=>s.add(x))}),a.forEach(y=>{var P,D,b;const x=((D=(P=y.properties)==null?void 0:P.model)==null?void 0:D.type)||((b=y.properties)==null?void 0:b.type)||"";$7.has(x)?r.push(y):s.has(y.id)?l.push(y):o.push(y)});const c=new Map;a.forEach(y=>c.set(y.id,{x:y.x,y:y.y}));const d=new Map,I=new Map,g=new Map;o.forEach(y=>{g.set(y.id,y),d.set(y.id,[]),I.set(y.id,0)}),n.forEach(y=>{d.has(y.sourceNodeId)&&g.has(y.targetNodeId)&&(d.get(y.sourceNodeId).push(y.targetNodeId),I.set(y.targetNodeId,(I.get(y.targetNodeId)||0)+1))});const u=[],N=new Set,h=[];g.has(i.startNodeId)&&h.push(i.startNodeId),o.forEach(y=>{y.id!==i.startNodeId&&(I.get(y.id)||0)===0&&h.push(y.id)}),h.length===0&&o.length>0&&h.push(o[0].id);let M=[...h];for(M.forEach(y=>N.add(y));M.length>0;){u.push([...M]);const y=[];M.forEach(x=>{(d.get(x)||[]).forEach(D=>{N.has(D)||(N.add(D),y.push(D))})}),M=y}o.forEach(y=>{N.has(y.id)||(u.length===0&&u.push([]),u[u.length-1].push(y.id),N.add(y.id))});for(let y=1;y<u.length;y++){const x=u[y-1],P=new Map;x.forEach((D,b)=>P.set(D,b)),u[y].sort((D,b)=>{const p=_2(D,n,P),j=_2(b,n,P);return p-j})}let m=i.startX;if(u.forEach((y,x)=>{const P=y.some(j=>{const S=g.get(j);return S?W2(S.type||"",S.properties):!1});if(x>0){const Z=u[x-1].some(z=>{const W=g.get(z);return W?W2(W.type||"",W.properties):!1})||P?i.layerGapX+100:i.layerGapX;m+=Z}const D=P?Math.max(i.nodeGapY,i.groupNodeHeight+20):i.nodeGapY,b=(y.length-1)*D,p=i.startY-b/2;y.forEach((j,S)=>{const Z=g.get(j);Z&&(Z.x=m,Z.y=p+S*D)})}),r.length>0){let y=i.startY;o.forEach(P=>{P.y<y&&(y=P.y)});const x=y-120;r.forEach((P,D)=>{P.x=i.startX+D*300,P.y=x})}return l.length>0&&a.forEach(D=>{if(D.type==="group-node"&&Array.isArray(D.children)){const p=D.children.map(k=>l.find(E=>E.id===k)).filter(Boolean);if(p.length===0)return;const j=120,S=30,z=p.length*S+(p.length-1)*60+50+30,W=Math.max(300,j+30*2+60),R=D.y-z/2+50+S/2;p.forEach((k,E)=>{k.x=D.x,k.y=R+E*(S+60)}),D.properties||(D.properties={}),D.properties.width=W,D.properties.height=Math.max(200,z)}}),K7(a,n,g,i),t}function _2(t,e,i){let a=0,n=0;return e.forEach(r=>{r.targetNodeId===t&&i.has(r.sourceNodeId)&&(a+=i.get(r.sourceNodeId),n++)}),n>0?a/n:1/0}function K7(t,e,i,a){const n=new Map;i.forEach(o=>{const l=`${o.x}_${o.y}`;n.has(l)||n.set(l,[]),n.get(l).push(o)}),n.forEach(o=>{if(o.length>1){const l=o[0].y,s=a.nodeGapY;o.forEach((c,d)=>{c.y=l+(d-(o.length-1)/2)*s})}});const r=new Map;e.forEach(o=>{const l=i.get(o.sourceNodeId),s=i.get(o.targetNodeId);if(!l||!s)return;const c=`h_${l.y}_${s.y}`;r.has(c)||r.set(c,[]),r.get(c).push(o)}),r.forEach(o=>{if(o.length>1){const l=Math.min(a.nodeGapY*.3,20);o.forEach((s,c)=>{if(c===0)return;const d=i.get(s.targetNodeId);d&&(d.y+=l*c)})}})}function eee(t){if(!t||t.length===0)return!1;let e=0;return t.forEach(i=>{const a=i.additionalInfo||{};!a.layoutX&&!a.layoutY&&e++}),e>t.length*.5}const tee=["flow","end","break"];class fr{static validate(e){var c;const i=[];if(!((c=e==null?void 0:e.metadata)!=null&&c.nodes))return{valid:!0,issues:[],errors:[],warnings:[]};const a=e.metadata.nodes,n=e.metadata.connections||[],r=e.metadata.endpoints||[];if(a.length+r.length>Ue.maxGraphNodes)throw new Do("GRAPH_NODES_LIMIT",`validate graph has ${a.length+r.length} nodes, max is ${Ue.maxGraphNodes}`);if(n.length>Ue.maxGraphEdges)throw new Do("GRAPH_EDGES_LIMIT",`validate graph has ${n.length} edges, max is ${Ue.maxGraphEdges}`);const o=new Set(a.map(d=>d.id));a.forEach(d=>{fr._validateNode(d,o,i)}),fr._validateConnections(n,a,o,i),fr._validateFirstNode(e,i);const l=i.filter(d=>d.severity==="error"),s=i.filter(d=>d.severity==="warning");return{valid:l.length===0,issues:i,errors:l,warnings:s}}static _validateNode(e,i,a){const n=e.configuration||{},r={nodeId:e.id,nodeName:e.name,nodeType:e.type};switch(e.type){case"switch":case"inclusive":{(!Array.isArray(n.cases)||n.cases.length===0)&&a.push({...r,severity:"warning",message:`${e.type} 节点 "${e.name}" 没有配置任何条件分支 (cases)`,category:"missing_config"});break}case"for":{n.range||a.push({...r,severity:"error",message:`for 节点 "${e.name}" 缺少遍历范围 (range)`,category:"missing_config"}),n.do?fr._validateNodeRef(n.do,e,"do",i,a):a.push({...r,severity:"error",message:`for 节点 "${e.name}" 缺少循环体目标 (do)`,category:"missing_config"});break}case"while":{n.condition||n.jsScript||a.push({...r,severity:"error",message:`while 节点 "${e.name}" 缺少循环条件 (condition)`,category:"missing_config"}),n.do?fr._validateNodeRef(n.do,e,"do",i,a):a.push({...r,severity:"error",message:`while 节点 "${e.name}" 缺少循环体目标 (do)`,category:"missing_config"});break}case"groupFilter":{const o=fr._parseNodeIds(n.nodeIds);o.length===0?a.push({...r,severity:"error",message:`groupFilter 节点 "${e.name}" 缺少过滤器节点列表 (nodeIds)`,category:"missing_config"}):o.forEach(l=>{fr._validateNodeRef(l,e,"nodeIds",i,a)});break}case"groupAction":{const o=fr._parseNodeIds(n.nodeIds);o.length===0?a.push({...r,severity:"error",message:`groupAction 节点 "${e.name}" 缺少动作节点列表 (nodeIds)`,category:"missing_config"}):o.forEach(l=>{fr._validateNodeRef(l,e,"nodeIds",i,a)});break}case"iterator":{a.push({...r,severity:"warning",message:`iterator 节点 "${e.name}" 已弃用,建议替换为 for 节点`,category:"deprecated"});break}}}static _validateNodeRef(e,i,a,n,r){e.startsWith("chain:")||n.has(e)||r.push({nodeId:i.id,nodeName:i.name,nodeType:i.type,severity:"error",message:`${i.type} 节点 "${i.name}" 的 ${a} 引用了不存在的节点: "${e}"`,category:"invalid_reference"})}static _validateConnections(e,i,a,n){const r=new Map,o=new Map;i.forEach(l=>{r.set(l.id,l.type),o.set(l.id,l.name)}),e.forEach(l=>{a.has(l.fromId)||n.push({severity:"error",message:`连接的源节点不存在: "${l.fromId}"`,category:"connection"}),a.has(l.toId)||n.push({severity:"error",message:`连接的目标节点不存在: "${l.toId}"`,category:"connection"});const s=r.get(l.fromId);s&&tee.includes(s)&&n.push({nodeId:l.fromId,nodeName:o.get(l.fromId),nodeType:s,severity:"warning",message:`终端节点 "${o.get(l.fromId)}" (${s}) 不应有输出连接`,category:"connection"})})}static _validateFirstNode(e,i){var r,o;const a=((r=e.metadata)==null?void 0:r.firstNodeIndex)??0,n=((o=e.metadata)==null?void 0:o.nodes)||[];n.length>0&&(a<0||a>=n.length)&&i.push({severity:"error",message:`firstNodeIndex (${a}) 超出节点范围 (0-${n.length-1})`,category:"connection"})}static _parseNodeIds(e){return e?Array.isArray(e)?e.map(i=>String(i).trim()).filter(Boolean):typeof e=="string"?e.split(",").map(i=>i.trim()).filter(Boolean):[]:[]}}const j4=[{id:"gitee_ai",labelKey:"editor.aiProvider.gitee_ai",label:"Gitee AI",url:"https://ai.gitee.com/v1",defaultModel:"DeepSeek-V4-Flash",models:[{label:"DeepSeek-V4-Flash",value:"DeepSeek-V4-Flash"},{label:"DeepSeek-R1",value:"DeepSeek-R1"},{label:"GLM-5.1",value:"GLM-5.1"},{label:"Qwen3-Coder",value:"Qwen3-Coder"}]},{id:"deepseek",labelKey:"editor.aiProvider.deepseek",label:"DeepSeek",url:"https://api.deepseek.com",defaultModel:"deepseek-chat",models:[{label:"DeepSeek-V4-Flash",value:"deepseek-v4-flash"},{label:"DeepSeek-V3.2",value:"deepseek-chat"},{label:"DeepSeek-R1",value:"deepseek-reasoner"}]},{id:"qwen",labelKey:"editor.aiProvider.qwen",label:"通义千问",url:"https://dashscope.aliyuncs.com/compatible-mode/v1",defaultModel:"qwen-plus",models:[{label:"qwen-plus",value:"qwen-plus"},{label:"qwen-turbo",value:"qwen-turbo"},{label:"qwen-max",value:"qwen-max"}]},{id:"zhipu",labelKey:"editor.aiProvider.zhipu",label:"智谱 AI",url:"https://open.bigmodel.cn/api/paas/v4",defaultModel:"glm-5",models:[{label:"glm-5.1",value:"glm-5.1"},{label:"glm-5",value:"glm-5"},{label:"glm-4.7",value:"glm-4.7"}]},{id:"openai",labelKey:"editor.aiProvider.openai",label:"OpenAI",url:"https://api.openai.com/v1",defaultModel:"gpt-4o",models:[{label:"gpt-4o",value:"gpt-4o"},{label:"gpt-4o-mini",value:"gpt-4o-mini"}]},{id:"ollama",labelKey:"editor.aiProvider.ollama",label:"Ollama (本地)",url:"http://localhost:11434/v1",defaultModel:"llama3",models:[{label:"llama3",value:"llama3"},{label:"qwen2",value:"qwen2"},{label:"mistral",value:"mistral"}]}];function T4(t){const e=typeof window<"u"?window:void 0;return Array.isArray(e==null?void 0:e[t])?e[t]:[]}function Vs(t){if(Array.isArray(t)&&t.length>0)return t;const e=T4("rulegoAiProviders");return e.length>0?e:j4}function S4(t){return Array.isArray(t)&&t.length>0?t:T4("rulegoAiEmbeddingProviders")}const iee=["string","number","boolean","object","array"],aee=["string","number","boolean","object"];function nee(t){return Array.isArray(t)?t.filter(e=>e&&typeof e=="object"&&!Array.isArray(e)).map(e=>({...e})):[]}function ree(t=1){return{name:"",title:"",description:"",type:"string",order:t,required:!1,properties:[],itemsType:"string",itemsProperties:[]}}function wp(t){const e=t&&typeof t=="object"&&!Array.isArray(t)?t:{},i=e.properties&&typeof e.properties=="object"&&!Array.isArray(e.properties)?e.properties:{},a=new Set(Array.isArray(e.required)?e.required.map(String):[]);return Object.keys(i).map((n,r)=>{var c;const o=i[n]||{},l=String(o.type||"string"),s=String(((c=o.items)==null?void 0:c.type)||"string");return{name:n,title:String(o.title||""),description:String(o.description||""),type:l,order:Number.isFinite(Number(o.order))?Number(o.order):r+1,required:a.has(n),properties:l==="object"?wp(o):[],itemsType:s,itemsProperties:l==="array"&&s==="object"?wp(o.items):[]}}).sort((n,r)=>Number(n.order||0)-Number(r.order||0))}function Cp(t){const e={type:"object",properties:{},required:[]};return t.filter(i=>i.name.trim()).sort((i,a)=>Number(i.order||0)-Number(a.order||0)).forEach((i,a)=>{const n=i.name.trim(),r={type:i.type||"string",order:Number.isFinite(Number(i.order))?Number(i.order):a+1};if(i.title.trim()&&(r.title=i.title.trim()),i.description.trim()&&(r.description=i.description.trim()),i.type==="object"){const o=Cp(i.properties||[]);r.properties=o.properties,o.required&&(r.required=o.required)}if(i.type==="array"&&(r.items={type:i.itemsType||"string"},r.items.type==="object")){const o=Cp(i.itemsProperties||[]);r.items.properties=o.properties,o.required&&(r.items.required=o.required)}e.properties[n]=r,i.required&&e.required.push(n)}),e.required.length===0&&delete e.required,e}function Uh(t){return t.map(e=>({...e,properties:Uh(e.properties||[]),itemsProperties:Uh(e.itemsProperties||[])}))}function oee(t){return t.map((e,i)=>({...e,order:i+1}))}function w4(t,e){if(!e)return t;const i=e.split(".").filter(Boolean);let a=t,n;for(const r of i){if(r==="items"){a=(n==null?void 0:n.itemsProperties)||[];continue}if(n=a[Number(r)],!n)return[];a=n.properties||[]}return a}function lee(t,e,i){const a=Uh(t);return i(w4(a,e)),a}function see(t,e="{}"){if(typeof t=="string")return t.trim()||e;if(t==null)return e;try{return JSON.stringify(t,null,2)}catch{return e}}function cee(t,e={}){if(!t.trim())return e;const i=JSON.parse(t);return i&&typeof i=="object"&&!Array.isArray(i)?i:e}function pD(t){if(!t||typeof t!="object")return null;const e=t,i=String(e.name||e.Name||e.tool_name||e.type||"").trim();if(!i)return null;const a=e.params_one_of||e.paramsOneOf||e.ParamsOneOf||e.parameters||e.schema||{},n=(a==null?void 0:a.open_api_v3)||(a==null?void 0:a.openApiV3)||(a==null?void 0:a.OpenApiV3)||a;return{value:i,label:i,desc:String(e.desc||e.Desc||e.tool_desc||e.description||""),parameters:n&&typeof n=="object"&&!Array.isArray(n)?n:{},fields:Array.isArray(e.fields)?e.fields:[],defaultGlobalDir:String(e.defaultGlobalDir||e.default_global_dir||""),raw:t}}function C4(t){var a,n;const e=t&&typeof t=="object"?t:{},i=(n=(a=e==null?void 0:e.builtins)==null?void 0:a["ai/tools"])==null?void 0:n.tools;return Array.isArray(i)?i.map(pD).filter(Boolean):[]}function dee(...t){for(const e of t){if(Array.isArray(e)){const a=e.map(pD).filter(Boolean);if(a.length>0)return a}const i=C4(e);if(i.length>0)return i}return[]}function Iee(...t){for(const e of t){if(typeof e=="string"&&e.trim())return e;if(e&&typeof e=="object"){const i=e.skillPath;if(typeof i=="string"&&i.trim())return i}}return""}const Fs={default:{label:"经典",labelEn:"Classic",vars:{"--hb-bg-root":"#f6f5f5","--hb-bg-toolbar":"#ffffff","--hb-bg-sidebar":"#f6f5f5","--hb-bg-canvas":"#ffffff","--hb-bg-drawer":"#ffffff","--hb-bg-modal":"#ffffff","--hb-bg-hover":"#ecf5ff","--hb-bg-active":"#ecf5ff","--hb-bg-section":"#fafbfc","--hb-bg-input":"#ffffff","--hb-bg-tag":"#f0f0f0","--hb-text-primary":"#333333","--hb-text-secondary":"#606266","--hb-text-muted":"#888888","--hb-text-disabled":"#aaaaaa","--hb-color-primary":"#409eff","--hb-color-primary-light":"#c6e2ff","--hb-color-primary-bg":"#ecf5ff","--hb-color-success":"#27ae60","--hb-color-warning":"#fa8c16","--hb-color-danger":"#f56c6c","--hb-color-title":"#c0392b","--hb-border-color":"#dcdfe6","--hb-border-light":"#eeeeee","--hb-border-strong":"#dddddd","--hb-radius-sm":"4px","--hb-radius-md":"6px","--hb-radius-lg":"8px","--hb-shadow-sm":"0 1px 4px rgba(0,0,0,0.08)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.12)","--hb-shadow-lg":"0 8px 32px rgba(0,0,0,0.15)","--hb-overlay":"rgba(0,0,0,0.3)"}},dark:{label:"暗夜",labelEn:"Dark",vars:{"--hb-bg-root":"#1a1a2e","--hb-bg-toolbar":"#16213e","--hb-bg-sidebar":"#1a1a2e","--hb-bg-canvas":"#0f3460","--hb-bg-drawer":"#16213e","--hb-bg-modal":"#16213e","--hb-bg-hover":"#1a3a5c","--hb-bg-active":"#1a3a5c","--hb-bg-section":"#0f3460","--hb-bg-input":"#1a1a2e","--hb-bg-tag":"#0f3460","--hb-text-primary":"#e0e0e0","--hb-text-secondary":"#b0b0b0","--hb-text-muted":"#808080","--hb-text-disabled":"#555555","--hb-color-primary":"#5dade2","--hb-color-primary-light":"#1a3a5c","--hb-color-primary-bg":"#162d50","--hb-color-success":"#2ecc71","--hb-color-warning":"#f39c12","--hb-color-danger":"#e74c3c","--hb-color-title":"#e74c3c","--hb-border-color":"#2c3e50","--hb-border-light":"#1e2d3d","--hb-border-strong":"#34495e","--hb-radius-sm":"4px","--hb-radius-md":"6px","--hb-radius-lg":"8px","--hb-shadow-sm":"0 1px 4px rgba(0,0,0,0.3)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.4)","--hb-shadow-lg":"0 8px 32px rgba(0,0,0,0.5)","--hb-overlay":"rgba(0,0,0,0.6)"}},nature:{label:"自然",labelEn:"Nature",vars:{"--hb-bg-root":"#f0f4e8","--hb-bg-toolbar":"#fafdf5","--hb-bg-sidebar":"#f0f4e8","--hb-bg-canvas":"#fefffe","--hb-bg-drawer":"#fafdf5","--hb-bg-modal":"#fafdf5","--hb-bg-hover":"#e8f5e9","--hb-bg-active":"#e8f5e9","--hb-bg-section":"#f5f9f0","--hb-bg-input":"#ffffff","--hb-bg-tag":"#e8f5e9","--hb-text-primary":"#2e4a2e","--hb-text-secondary":"#4a6741","--hb-text-muted":"#7a9a70","--hb-text-disabled":"#a0bfa0","--hb-color-primary":"#4caf50","--hb-color-primary-light":"#c8e6c9","--hb-color-primary-bg":"#e8f5e9","--hb-color-success":"#388e3c","--hb-color-warning":"#f9a825","--hb-color-danger":"#d32f2f","--hb-color-title":"#2e7d32","--hb-border-color":"#c5e1a5","--hb-border-light":"#dcedc8","--hb-border-strong":"#aed581","--hb-radius-sm":"6px","--hb-radius-md":"8px","--hb-radius-lg":"12px","--hb-shadow-sm":"0 1px 4px rgba(76,175,80,0.1)","--hb-shadow-md":"0 4px 12px rgba(76,175,80,0.12)","--hb-shadow-lg":"0 8px 24px rgba(76,175,80,0.15)","--hb-overlay":"rgba(46,77,46,0.3)"}},elegant:{label:"优雅",labelEn:"Elegant",vars:{"--hb-bg-root":"#f3f0f7","--hb-bg-toolbar":"#faf8fc","--hb-bg-sidebar":"#f3f0f7","--hb-bg-canvas":"#fefcff","--hb-bg-drawer":"#faf8fc","--hb-bg-modal":"#faf8fc","--hb-bg-hover":"#ede7f6","--hb-bg-active":"#ede7f6","--hb-bg-section":"#f5f2fa","--hb-bg-input":"#ffffff","--hb-bg-tag":"#ede7f6","--hb-text-primary":"#37274a","--hb-text-secondary":"#5c4a72","--hb-text-muted":"#9575aa","--hb-text-disabled":"#bba8cc","--hb-color-primary":"#7c4dff","--hb-color-primary-light":"#d1c4e9","--hb-color-primary-bg":"#ede7f6","--hb-color-success":"#66bb6a","--hb-color-warning":"#ffa726","--hb-color-danger":"#ef5350","--hb-color-title":"#7c4dff","--hb-border-color":"#d1c4e9","--hb-border-light":"#e8e0f0","--hb-border-strong":"#b39ddb","--hb-radius-sm":"6px","--hb-radius-md":"10px","--hb-radius-lg":"14px","--hb-shadow-sm":"0 1px 6px rgba(124,77,255,0.08)","--hb-shadow-md":"0 4px 16px rgba(124,77,255,0.1)","--hb-shadow-lg":"0 8px 28px rgba(124,77,255,0.15)","--hb-overlay":"rgba(55,39,74,0.35)"}},tech:{label:"科技",labelEn:"Tech",vars:{"--hb-bg-root":"#0d1117","--hb-bg-toolbar":"#161b22","--hb-bg-sidebar":"#0d1117","--hb-bg-canvas":"#1c2333","--hb-bg-drawer":"#161b22","--hb-bg-modal":"#161b22","--hb-bg-hover":"#1f3044","--hb-bg-active":"#1f3044","--hb-bg-section":"#1c2333","--hb-bg-input":"#0d1117","--hb-bg-tag":"#1c2333","--hb-text-primary":"#c9d1d9","--hb-text-secondary":"#8b949e","--hb-text-muted":"#6e7681","--hb-text-disabled":"#484f58","--hb-color-primary":"#00bcd4","--hb-color-primary-light":"#1a4a54","--hb-color-primary-bg":"#0d3038","--hb-color-success":"#3fb950","--hb-color-warning":"#d29922","--hb-color-danger":"#f85149","--hb-color-title":"#00bcd4","--hb-border-color":"#30363d","--hb-border-light":"#21262d","--hb-border-strong":"#3d444d","--hb-radius-sm":"3px","--hb-radius-md":"6px","--hb-radius-lg":"8px","--hb-shadow-sm":"0 1px 4px rgba(0,188,212,0.1)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.4)","--hb-shadow-lg":"0 8px 32px rgba(0,0,0,0.5)","--hb-overlay":"rgba(0,0,0,0.65)"}},modern:{label:"现代",labelEn:"Modern",vars:{"--hb-bg-root":"#f8fafc","--hb-bg-toolbar":"#ffffff","--hb-bg-sidebar":"#ffffff","--hb-bg-canvas":"#ffffff","--hb-bg-drawer":"#ffffff","--hb-bg-modal":"#ffffff","--hb-bg-hover":"rgba(59,130,246,0.06)","--hb-bg-active":"rgba(59,130,246,0.1)","--hb-bg-section":"#f8fafc","--hb-bg-input":"#ffffff","--hb-bg-tag":"#f1f5f9","--hb-text-primary":"#334155","--hb-text-secondary":"#64748b","--hb-text-muted":"#94a3b8","--hb-text-disabled":"#cbd5e1","--hb-color-primary":"#3b82f6","--hb-color-primary-light":"#bfdbfe","--hb-color-primary-bg":"#eff6ff","--hb-color-success":"#22c55e","--hb-color-warning":"#eab308","--hb-color-danger":"#ef4444","--hb-color-title":"#1e40af","--hb-border-color":"rgba(0,0,0,0.08)","--hb-border-light":"rgba(0,0,0,0.04)","--hb-border-strong":"rgba(0,0,0,0.1)","--hb-radius-sm":"7px","--hb-radius-md":"10px","--hb-radius-lg":"12px","--hb-shadow-sm":"0 1px 3px rgba(0,0,0,0.06)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.08)","--hb-shadow-lg":"0 8px 24px rgba(0,0,0,0.12)","--hb-overlay":"rgba(0,0,0,0.25)","--hb-node-selected-stroke":"#3b82f6","--hb-node-selected-shadow":"0 0 8px rgba(59,130,246,0.3)","--hb-node-hover-brightness":"0.96","--hb-node-radius":"10px","--hb-node-shadow-offset":"2px","--hb-port-fill":"#ffffff","--hb-port-stroke":"#94a3b8","--hb-port-hover-fill":"#3b82f6","--hb-port-hover-stroke":"#3b82f6","--hb-edge-stroke":"#94a3b8","--hb-edge-hover-stroke":"#3b82f6"}}};function is(t){return{"--hb-bg-root":t.root,"--hb-bg-toolbar":t.toolbar,"--hb-bg-sidebar":t.sidebar,"--hb-bg-canvas":t.canvas,"--hb-bg-drawer":t.toolbar,"--hb-bg-modal":t.toolbar,"--hb-bg-hover":t.hover,"--hb-bg-active":t.active,"--hb-bg-section":t.section,"--hb-bg-input":t.input,"--hb-bg-tag":t.tag,"--hb-text-primary":t.text,"--hb-text-secondary":t.secondary,"--hb-text-muted":t.muted,"--hb-text-disabled":t.disabled,"--hb-color-primary":t.primary,"--hb-color-primary-light":t.primaryLight,"--hb-color-primary-bg":t.primaryBg,"--hb-color-success":t.success,"--hb-color-warning":t.warning,"--hb-color-danger":t.danger,"--hb-color-title":t.title,"--hb-border-color":t.border,"--hb-border-light":t.borderLight,"--hb-border-strong":t.borderStrong,"--hb-radius-sm":t.radiusSm||"6px","--hb-radius-md":t.radiusMd||"8px","--hb-radius-lg":t.radiusLg||"10px","--hb-shadow-sm":`0 1px 4px ${t.shadowColor}`,"--hb-shadow-md":`0 4px 12px ${t.shadowColor}`,"--hb-shadow-lg":`0 8px 28px ${t.shadowColor}`,"--hb-overlay":t.overlay,"--hb-node-selected-stroke":t.primary,"--hb-node-selected-shadow":`0 0 8px ${t.shadowColor}`,"--hb-node-hover-brightness":"0.96","--hb-node-radius":t.radiusMd||"8px","--hb-node-shadow-offset":"2px","--hb-port-fill":t.input,"--hb-port-stroke":t.muted,"--hb-port-hover-fill":t.primary,"--hb-port-hover-stroke":t.primary,"--hb-edge-stroke":t.muted,"--hb-edge-hover-stroke":t.primary}}Object.assign(Fs,{colorful:{label:"彩色",labelEn:"Colorful",vars:is({root:"#f8fafc",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f8fafc",input:"#ffffff",tag:"#eef2ff",hover:"rgba(37,99,235,0.08)",active:"rgba(139,92,246,0.12)",text:"#172033",secondary:"#475569",muted:"#64748b",disabled:"#cbd5e1",primary:"#2563eb",primaryLight:"#bfdbfe",primaryBg:"#eff6ff",success:"#10b981",warning:"#f59e0b",danger:"#f43f5e",title:"#7c3aed",border:"#dbe4f0",borderLight:"#edf2f7",borderStrong:"#cbd5e1",shadowColor:"rgba(15,23,42,0.10)",overlay:"rgba(15,23,42,0.32)"})},"ant-blue":{label:"蚂蚁蓝",labelEn:"Ant Blue",vars:is({root:"#f0f7ff",toolbar:"#ffffff",sidebar:"#f7fbff",canvas:"#ffffff",section:"#f0f7ff",input:"#ffffff",tag:"#e6f4ff",hover:"rgba(22,119,255,0.08)",active:"rgba(22,119,255,0.12)",text:"#102a43",secondary:"#42526e",muted:"#6b7c93",disabled:"#b8c4d6",primary:"#1677ff",primaryLight:"#91caff",primaryBg:"#e6f4ff",success:"#52c41a",warning:"#faad14",danger:"#ff4d4f",title:"#0958d9",border:"#bae0ff",borderLight:"#e6f4ff",borderStrong:"#91caff",shadowColor:"rgba(22,119,255,0.12)",overlay:"rgba(16,42,67,0.28)",radiusSm:"6px",radiusMd:"8px",radiusLg:"12px"})},material:{label:"Material",labelEn:"Material",vars:is({root:"#f8fbff",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f1f5fb",input:"#ffffff",tag:"#e8f0fe",hover:"rgba(26,115,232,0.08)",active:"rgba(26,115,232,0.13)",text:"#202124",secondary:"#5f6368",muted:"#80868b",disabled:"#bdc1c6",primary:"#1a73e8",primaryLight:"#a8c7fa",primaryBg:"#e8f0fe",success:"#188038",warning:"#fbbc04",danger:"#ea4335",title:"#174ea6",border:"#dadce0",borderLight:"#edf1f7",borderStrong:"#c9d2df",shadowColor:"rgba(60,64,67,0.14)",overlay:"rgba(32,33,36,0.30)",radiusSm:"4px",radiusMd:"8px",radiusLg:"12px"})},tailwind:{label:"Tailwind",labelEn:"Tailwind",vars:is({root:"#f8fafc",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f1f5f9",input:"#ffffff",tag:"#e0f2fe",hover:"rgba(14,165,233,0.08)",active:"rgba(14,165,233,0.14)",text:"#0f172a",secondary:"#475569",muted:"#64748b",disabled:"#cbd5e1",primary:"#0ea5e9",primaryLight:"#bae6fd",primaryBg:"#e0f2fe",success:"#10b981",warning:"#f59e0b",danger:"#f43f5e",title:"#0284c7",border:"#dbe4f0",borderLight:"#eef2f7",borderStrong:"#cbd5e1",shadowColor:"rgba(15,23,42,0.10)",overlay:"rgba(15,23,42,0.30)",radiusSm:"6px",radiusMd:"10px",radiusLg:"14px"})},github:{label:"GitHub",labelEn:"GitHub",vars:is({root:"#f6f8fa",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f6f8fa",input:"#ffffff",tag:"#ddf4ff",hover:"rgba(9,105,218,0.08)",active:"rgba(9,105,218,0.12)",text:"#24292f",secondary:"#57606a",muted:"#6e7781",disabled:"#afb8c1",primary:"#0969da",primaryLight:"#b6e3ff",primaryBg:"#ddf4ff",success:"#1a7f37",warning:"#bf8700",danger:"#cf222e",title:"#0969da",border:"#d0d7de",borderLight:"#eaeef2",borderStrong:"#afb8c1",shadowColor:"rgba(31,35,40,0.12)",overlay:"rgba(31,35,40,0.32)",radiusSm:"6px",radiusMd:"6px",radiusLg:"8px"})},vscode:{label:"VS Code",labelEn:"VS Code",vars:is({root:"#1e1e1e",toolbar:"#252526",sidebar:"#252526",canvas:"#1e1e1e",section:"#2d2d30",input:"#1e1e1e",tag:"#2d2d30",hover:"rgba(0,122,204,0.18)",active:"rgba(0,122,204,0.28)",text:"#f3f4f6",secondary:"#cccccc",muted:"#9ca3af",disabled:"#6b7280",primary:"#007acc",primaryLight:"#2b88d8",primaryBg:"#094771",success:"#4ec9b0",warning:"#dcdcaa",danger:"#f44747",title:"#4fc1ff",border:"#3c3c3c",borderLight:"#333333",borderStrong:"#505050",shadowColor:"rgba(0,0,0,0.42)",overlay:"rgba(0,0,0,0.62)",radiusSm:"3px",radiusMd:"5px",radiusLg:"7px"})},apple:{label:"苹果",labelEn:"Apple",vars:is({root:"#f5f5f7",toolbar:"#ffffff",sidebar:"#fbfbfd",canvas:"#ffffff",section:"#f5f5f7",input:"#ffffff",tag:"#eef5ff",hover:"rgba(0,122,255,0.08)",active:"rgba(0,122,255,0.13)",text:"#1d1d1f",secondary:"#424245",muted:"#6e6e73",disabled:"#b7b7bd",primary:"#007aff",primaryLight:"#b9dcff",primaryBg:"#eef5ff",success:"#34c759",warning:"#ffcc00",danger:"#ff3b30",title:"#007aff",border:"#d2d2d7",borderLight:"#ebebef",borderStrong:"#c7c7cc",shadowColor:"rgba(0,0,0,0.10)",overlay:"rgba(29,29,31,0.28)",radiusSm:"7px",radiusMd:"10px",radiusLg:"14px"})}});const gee={light:"default",classic:"default",blue:"tech",antd:"ant-blue",ant:"ant-blue",google:"material",tailwindcss:"tailwind",gh:"github",vs:"vscode","visual-studio-code":"vscode",mac:"apple",macos:"apple"};function ml(t){const e=String(t||"").trim().toLowerCase();return e?Object.prototype.hasOwnProperty.call(Fs,e)?e:gee[e]||"default":"default"}function uee(){let t="";for(const[e,i]of Object.entries(Fs)){const a=e==="default"?'.huanban_rulego_editor_root, .huanban_rulego_editor_root[data-theme="default"]':`.huanban_rulego_editor_root[data-theme="${e}"]`,n=Object.entries(i.vars).map(([r,o])=>` ${r}: ${o};`).join(`
|
|
126
|
+
3. Logs have not expired`,noDebugLogs:"No debug logs",enableDebugHint:"Send a message to the rule chain and enable debug mode first",loadFailedManual:"Load failed. Enter a message ID manually",noNodes:"The current rule chain has no nodes",queryingChainLogs:"Querying rule-chain logs...",queryingNodes:"Querying nodes {{start}}~{{end}} / {{total}}..."},debugConsole:{title:"Debug Console",clear:"Clear"},aiProvider:{gitee_ai:"Gitee AI",deepseek:"DeepSeek",qwen:"Tongyi Qianwen",zhipu:"Zhipu AI",openai:"OpenAI",ollama:"Ollama (Local)"},customNode:{onlyRightAnchorOut:"Only the right anchor can connect out",inputSingleOutput:"Input can only connect to one outgoing edge",externalCannotConnectGroupChild:"External nodes cannot connect to nodes inside a group",onlyLeftAnchorIn:"Only the left anchor can connect in",agentOnlyRightOrBottomOut:"Only right and bottom anchors can connect out",agentOrchestrationLabel:"Agent Orchestration",agentOrchestrationOnlyRightOrBottomOut:"Agent orchestration can only connect out from the right or bottom anchors",agentOrchestrationOnlyLeftIn:"Agent orchestration can only connect in from the left anchor",anchorLlm:"LLM",anchorTool:"Tools",anchorMemory:"Memory",anchorKnowledge:"Knowledge"},groupNode:{onlyRightAnchorOut:"Only the right anchor can connect out",notToInput:"Cannot connect to input nodes",onlyLeftAnchorIn:"Only the left anchor can connect in"},importExport:{exportTitle:"Export Rule Chain",importTitle:"Import Rule Chain",exportTab:"Export",importTab:"Import",nodes:"Nodes",edges:"Edges",size:"Size",name:"Name",fileLoaded:"File loaded. Click to choose again",dropHint:"Drop a JSON file here, or click to choose one",invalidRuleChainJson:"Invalid RuleGo rule-chain JSON: missing ruleChain or metadata",jsonParseFailed:"JSON parse failed: {{message}}",selectJsonFile:"Choose a .json file",copied:"Copied to clipboard",downloaded:"Downloaded: {{fileName}}",noImportData:"No data to import",importSuccess:"Rule chain imported",downloadFile:"Download File",confirmImport:"Confirm Import"},workflowList:{title:"Workflow List",searchPlaceholder:"Search workflows...",create:"New",createTitle:"New Workflow",createAndOpen:"Create and open",defaultName:"New Workflow",id:"ID",idPlaceholder:"Rule chain ID. Do not use /, \\ or .",idInvalid:"ID is required and cannot contain /, \\ or .",namePlaceholder:"Enter workflow name",descriptionPlaceholder:"Optional description",chainType:"Rule chain type",rootChain:"Main chain",subChain:"Sub chain",debugMode:"Debug mode",debugModeHint:"Enable execution debug details for this chain",category:"Category",categoryPlaceholder:"Optional category, such as IoT / AI / Sync",initialStatus:"Initial status",initialStopped:"Stopped",initialRunning:"Running",openAfterCreate:"Open editor after create",updateTime:"Updated",more:"More actions",rowHint:"Click for info, double-click to design",empty:"No workflows",createFirst:"Create first workflow",design:"Design",info:"Info",logs:"Logs",online:"Online",offline:"Offline",onlineAction:"Start",offlineAction:"Stop",confirmDelete:'Delete workflow "{{name}}"? This action cannot be undone.',operateFailed:"Operation failed",copyFailed:"Copy failed",deleteFailed:"Delete failed",createFailed:"Create failed"},dataView:{title:"Rule Chain Data",copyJson:"Copy",downloadJson:"Download",copied:"JSON copied to clipboard",copyFailed:"Copy failed",downloaded:"Downloaded {{fileName}}",downloadFailed:"Download failed"},validation:{title:"Rule Chain Validation",revalidate:"Revalidate",validate:"Validate",clearResults:"Clear results",close:"Close",all:"All",validating:"Validating...",empty:"No validation results. Click Validate to start.",noFilteredResults:"No results for the current filter"},ruleChainSettings:{title:"Rule Chain Settings",nameRequired:"Rule chain name is required",namePlaceholder:"Enter rule chain name",descriptionPlaceholder:"Enter rule chain description",root:"Root Chain",additionalInfo:"Additional Info (JSON)"},debugPanel:{sendMessage:"Send Message",debugLogs:"Debug Logs",runLogs:"Run Logs",chainId:"Rule Chain ID",msgType:"Message Type",msgTypePlaceholder:"e.g. TEST_MSG",msgBodyJson:"Message Body (JSON)",sending:"Sending...",sendTestMessage:"Send Test Message",responseData:"Response Data",nodeLabel:"Node",loading:"Loading...",refresh:"Refresh",noDebugLogs:"No debug logs",debugModeHint:"Enable Debug Mode on the node and send a message first",time:"Time",type:"Type",relation:"Relation",operate:"Actions",data:"Data",metadata:"Metadata",error:"Error",noRunLogs:"No run logs",runLogDetail:"Run Log Details",selectChainFirst:"Select a rule chain first",noSendCallback:"Send message callback is not configured",invalidJson:"Message body JSON is invalid",sendSuccess:"Message sent successfully",sendFailed:"Send failed: {{message}}",unknownError:"Unknown error",sendException:"Send exception: {{message}}",loadDebugLogsFailed:"Failed to load debug logs",loadRunLogsFailed:"Failed to load run logs",copied:"Copied",copyFailed:"Copy failed"},searchPanel:{placeholder:"Search node name, type, or ID...",resultCount:"{{count}} result(s)",matchCount:"{{count}} match(es)",noMatch:"No matches",empty:"No matching nodes found"},workflowInfo:{noData:"Select a workflow to view details",baseInfo:"Basic Info",varsSecrets:"Variables & Secrets",integration:"App Integration",maintenance:"Maintenance",online:"Online",offline:"Offline",saveBaseInfo:"Save Basic Info",saveVars:"Save Variables",saveSecrets:"Save Secrets",saving:"Saving...",vars:"Variables",secrets:"Secrets",varName:"Variable Name",varValue:"Variable Value",secretName:"Secret Name",secretValue:"Secret Value",apiIntegration:"API Integration",executeAPI:"Execute API:",notifyAPI:"Notify API:",webSocket:"WebSocket",debugWS:"Debug WS:",runtimeWS:"Runtime WS:",endpointWS:"Endpoint WS:",mcpIntegration:"MCP Integration",mcpSSE:"MCP SSE:",action:"Actions",add:"Add",delete:"Delete",saveFailed:"Save failed"},maintenance:{title:"Maintenance",noApi:"The current request adapter does not provide maintenance APIs",noIssues:"No issues returned",validating:"Validating...",runValidate:"Run Validation",schemaDiff:"Schema Diff",repairPlan:"Repair Plan",patchPreview:"Patch Preview",validateResult:"Validation Result",valid:"Passed",invalid:"Failed"},logViewer:{title:"Debug Console",empty:"No debug logs"},copilot:{placeholder:"Ask something...",send:"Send",userRole:"User",assistantRole:"Assistant"},aiProperties:{modelSelector:"LLM Operator",loading:"Loading LLM engine...",fallback:"AI service is temporarily unavailable. This rule chain will run in normal fallback mode.",selectPlaceholder:"-- Select LLM --",empty:"The backend did not return any available models. Check the AI API configuration."}},components:{"start-node":"Input",delay:"Delay",exec:"Exec Command",fetchNodeOutput:"Fetch Node Output",functions:"Functions",log:"Log","x/python":"Python Script",break:"Break",comment:"Comment",end:"End",for:"For Loop",fork:"Fork",groupAction:"Group Action",inclusive:"Inclusive Gateway",join:"Join",ref:"Reference Node",switch:"Switch",while:"While Loop",iterator:"Iterator",exprFilter:"Expr Filter",fieldFilter:"Field Filter",groupFilter:"Group Filter",jsFilter:"JS Filter",jsSwitch:"JS Switch",msgTypeSwitch:"Msg Type Switch","x/luaFilter":"Lua Filter",exprTransform:"Expr Transform",jsTransform:"JS Transform",metadataTransform:"Metadata Transform","text/template":"Template Transform","x/luaTransform":"Lua Transform",cacheDelete:"Cache Delete",cacheGet:"Cache Get",cacheSet:"Cache Set",dbClient:"Database",mqttClient:"MQTT",net:"TCP/UDP",sendEmail:"Send Email",ssh:"SSH","x/receiveEmail":"Receive Email",restApiCall:"REST API Call","x/fileDelete":"File Delete","x/fileList":"File List","x/fileRead":"File Read","x/fileWrite":"File Write","x/grpcClient":"gRPC Client","x/kafkaProducer":"Kafka","x/mongodbClient":"MongoDB","x/natsClient":"NATS","x/nsqClient":"NSQ","x/opengeminiQuery":"OpenGemini Query","x/opengeminiWrite":"OpenGemini Write","x/otel":"OpenTelemetry","x/pulsarClient":"Pulsar","x/rabbitmqClient":"RabbitMQ","x/redisClient":"Redis","x/redisPub":"Redis Pub","x/wukongimSender":"WuKong IM","x/beanstalkdWorker":"Beanstalkd Worker","x/beanstalkdTube":"Beanstalkd Tube","x/jsonQuery":"JSON Query","x/odooCrudCreate":"Odoo Create","x/odooCrudUpdate":"Odoo Update","x/soapParse":"SOAP Parse","x/soapRequest":"SOAP Request",flow:"Sub Rule Chain",simple_admission:"Simple Admission",temperature_conversion:"Temperature Conversion","ai/llm":"AI LLM","ai/createImage":"AI Image","ai/agent":"Agent","ai/intent":"Intent Recognition","ai/localIntent":"Local Intent Recognition","ai/mcpClient":"MCP Client","ai/transform/documentLoader":"Document Loader","ai/transform/textChunker":"Text Chunker","ai/embedding/openai":"OpenAI Embedding","ai/indexer/milvus":"Milvus Indexer","ai/indexer/redis":"Redis Indexer","ai/retriever/milvus":"Milvus Retriever","ai/retriever/redis":"Redis Retriever","ci/exec":"Command Line","ci/gitClone":"Git Clone","ci/gitCommit":"Git Commit","ci/gitCreateTag":"Git Create Tag","ci/gitLog":"Git Log","ci/gitPush":"Git Push","ci/ps":"Server Metrics","x/opcua":"OPC UA Subscribe","x/modbus":"Modbus","x/opcuaRead":"OPC UA Read","x/opcuaWrite":"OPC UA Write","x/serialControl":"Serial Control","x/serialIn":"Serial Input","x/serialOut":"Serial Output","x/serialRequest":"Serial Request","x/streamAggregator":"Stream Aggregator","x/streamTransform":"Stream Transform","endpoint/http":"HTTP Server","endpoint/ws":"WebSocket","endpoint/ws_client":"WebSocket Client","endpoint/mqtt":"MQTT Subscribe","endpoint/kafka":"Kafka Consumer","endpoint/nats":"NATS Subscribe","endpoint/nsq":"NSQ Consumer","endpoint/pulsar":"Pulsar Consumer","endpoint/rabbitmq":"RabbitMQ Consumer","endpoint/redis":"Redis Subscribe","endpoint/redis/stream":"Redis Stream","endpoint/net":"TCP/UDP Server","endpoint/net_client":"TCP/UDP Client","endpoint/schedule":"Scheduler","endpoint/grpc/stream":"gRPC Stream","endpoint/wukongim":"WuKong IM Receiver","endpoint/mcpServer":"MCP Server","endpoint/beanstalkdTubeset":"Beanstalkd","endpoint/mysql_cdc":"MySQL CDC","endpoint/opcua":"OPC UA Server"},fields:{jsScript:"JS Script",script:"Script",expr:"Expression",template:"Template",server:"Server",username:"Username",password:"Password",topic:"Topic",key:"Key",headers:"Headers",host:"Host",port:"Port",cmd:"Command",timeout:"Timeout (sec)",targetId:"Target ID",periodInSeconds:"Period (sec)",maxPendingMsgs:"Max Pending Messages",periodInSecondsPattern:"Period Expression (sec)",functionName:"Function Name",args:"Arguments",targetNodeId:"Target Node ID",range:"Iteration Range",do:"Action",allMatches:"All Must Match",nodeIds:"Node IDs",checkAllKeys:"Check All Keys",dataNames:"Data Field Names",metadataNames:"Metadata Field Names",mapping:"Field Mapping",isNew:"Replace All Metadata",restEndpointUrlPattern:"Endpoint URL",requestMethod:"Method",readTimeoutMs:"Timeout (ms)",maxParallelRequestsCount:"Max Concurrency",enableProxy:"Enable Proxy",proxyScheme:"Proxy Scheme",proxyHost:"Proxy Host",proxyPort:"Proxy Port",driverName:"Driver",dsn:"DSN",sql:"SQL",params:"Parameters",getOne:"Return One Record",poolSize:"Pool Size",protocol:"Protocol",connectTimeout:"Connect Timeout (sec)",heartbeatInterval:"Heartbeat Interval (sec)",maxReconnectInterval:"Max Reconnect Interval (sec)",qOS:"QoS",smtpHost:"SMTP Host",smtpPort:"SMTP Port",fromEmail:"From Email",toEmail:"To Email",ccEmail:"CC Email",bccEmail:"BCC Email",path:"File Path",content:"Content",append:"Append",recursive:"Recursive",dataType:"Data Type",exchange:"Exchange",exchangeType:"Exchange Type",durable:"Durable",autoDelete:"Auto Delete",channel:"Channel",partition:"Partition",database:"Database",collection:"Collection",opType:"Operation Type",filter:"Filter",doc:"Document",one:"Return One",db:"DB Number",service:"Service",method:"Method",request:"Request Body",url:"API URL",model:"Model Name",systemPrompt:"System Prompt",messages:"Messages",images:"Images",prompt:"Prompt",n:"Count",size:"Size",quality:"Quality",style:"Style",response_format:"Response Format",repository:"Repository URL",directory:"Directory",reference:"Branch/Tag",authType:"Auth Type",authUser:"Auth User",authPassword:"Auth Password/Token",pattern:"Pattern",message:"Message",tag:"Tag",limit:"Limit",startTime:"Start Time",endTime:"End Time",refSpecs:"Ref Specs",options:"Options",unitId:"Unit ID",address:"Register Address",quantity:"Register Quantity",value:"Value",regType:"Register Type",policy:"Security Policy",mode:"Security Mode",auth:"Auth",baudRate:"Baud Rate",dataBits:"Data Bits",stopBits:"Stop Bits",parity:"Parity",dtr:"DTR",rts:"RTS",action:"Action",splitType:"Split Type",splitKey:"Split Key",data:"Data",addChar:"Append Char",requestTimeout:"Request Timeout (ms)",metricExpr:"Metric Expression",metrics:"Metrics",extend:"Extend Parent Context",uID:"User ID",token:"Auth Token",channelType:"Channel Type",channelID:"Channel ID"},category:{filter:"Filter",transform:"Transform",action:"Action",external:"External",flow:"Flow",common:"Common",custom:"Custom",ai:"AI",ci:"CI/CD",iot:"IoT",stats:"Stream Computing",endpoint:"Endpoint",endpoints:"Endpoint",storage:"Storage",knowledge:"Knowledge",image:"Image",audio:"Audio",file:"File",other:"Other"},relationTypes:{Success:"Success",Failure:"Failure",True:"True",False:"False",Default:"Default",Stream:"Stream",NotFound:"Not Found"},validation:{orphanNode:'Node "{{name}}" is orphaned with no connections',startNoConnection:"Start node (Input) has no connections",missingRelationType:"Connection is missing relation type",missingNodeType:'Node "{{name}}" is missing type definition',cyclicConnection:"Cyclic connection detected",duplicateNodeId:"Duplicate node ID found"},action:{saveSuccess:"Rule chain saved successfully",saveFailed:"Save failed: {{error}}",deleteSuccess:"Deleted successfully",loadFailed:"Load failed: {{error}}",exportSuccess:"Exported successfully",importSuccess:"Imported successfully",importFailed:"Import failed: invalid data format",undoSuccess:"Undone: {{description}}",redoSuccess:"Redone: {{description}}",noUndoAvailable:"Nothing to undo",noRedoAvailable:"Nothing to redo"}},V7={startNodeId:"$node_start_input",nodeCount:0,edgeCount:0,nodeWidth:100,relationTypeSplit:"/"},F7={isReady:!1,isDirty:!1,isLoading:!1,selectedNode:null,selectedEdge:null,ruleChain:null,nodeComponents:{},componentGroups:[],currentNodeView:null,currentNodeModel:{},currentEdgeModel:{},canUndo:!1,canRedo:!1};class v4{constructor(e){this.lfInstance=null,this.plugins=[],this.initialized=!1,this.disposeLocaleChange=null,this.options=e,this.internalData={...V7},this.store=new Bw({...F7}),this.eventBus=new Jw,this.dataAdapter=new u4,this.componentRegistry=new N4({adapter:e.adapterComponents}),this.history=new h4({maxHistory:e.maxHistory??50}),this.validation=new ND,this.validation.registerBuiltinRules(),this.theme=new m4,this.i18n=new MD({locale:e.locale??"zh-CN",fallback:"en-US"}),this.i18n.register("zh-CN",mD),this.i18n.register("en-US",yD),this.disposeLocaleChange=this.i18n.onLocaleChange(()=>{this.syncComponentState()}),this.loadComponents(e.components??f4),e.plugins&&e.plugins.forEach(i=>this.use(i))}init(e){if(this.initialized){console.warn("[EditorCore] 编辑器已初始化, 请勿重复调用");return}if(this.lfInstance=e,this.options.features||(this.options.features={}),this.componentRegistry.hasCategory("ai")||(this.options.features.aiCopilot=!1),e)try{P4(e)}catch(a){console.error("[EditorCore] 自定义节点注册失败:",a)}const i=this.options.theme??"light";this.theme.setTheme(i),this.plugins.forEach(a=>{if(a.onInit)try{a.onInit(this)}catch(n){console.error(`[EditorCore] 插件 "${a.name}" 初始化出错:`,n)}}),this.store.setState({isReady:!0}),this.initialized=!0,this.eventBus.emit("editor:ready")}destroy(){var e;this.plugins.forEach(i=>{if(i.onDestroy)try{i.onDestroy(this)}catch(a){console.error(`[EditorCore] 插件 "${i.name}" 销毁出错:`,a)}}),this.store.destroy(),this.eventBus.destroy(),this.history.destroy(),this.theme.destroy(),(e=this.disposeLocaleChange)==null||e.call(this),this.disposeLocaleChange=null,this.i18n.destroy(),this.validation.clear(),this.componentRegistry.clear(),this.plugins=[],this.lfInstance=null,this.initialized=!1}loadComponents(e){const i=TM(e);yg(i),this.componentRegistry.clear();const a=this.componentRegistry.loadFromRawData(i);return this.syncComponentState(a)}registerComponents(e,i=!0){return yg(e),this.componentRegistry.registerAll(e,i),this.syncComponentState()}syncComponentState(e=this.componentRegistry.getGroups()){const i=this.localizeComponentGroups(e);return this.store.setState({nodeComponents:this.componentRegistry.getMap(),componentGroups:i}),i}localizeComponentGroups(e){return e.map(i=>({...i,label:hD(this.i18n,`category.${i.category}`,i.label||i.category)}))}loadData(e){this.internalData.nodeCount=0,this.internalData.edgeCount=0,this.store.setState({ruleChain:e.ruleChain,isDirty:!1,selectedNode:null,selectedEdge:null});const i=this.dataAdapter.adapterIn(e,this.componentRegistry.getMap(),this.internalData,{startX:280,startY:280});mg(i,"render"),this.eventBus.emit("editor:data-loaded",{lfData:i,ruleChain:e.ruleChain}),this.history.clear()}exportData(e,i){const a=this.store.getState().ruleChain;if(!a)throw new Error("[EditorCore] 无法导出: 规则链配置为空");return this.dataAdapter.adapterOut(e,a,this.internalData,i)}validateGraph(e){return this.validation.validate(e,{startNodeId:this.internalData.startNodeId})}on(e,i){return this.eventBus.on(e,i)}emit(e,...i){this.eventBus.emit(e,...i)}use(e){if(this.plugins.some(i=>i.name===e.name)){console.warn(`[EditorCore] 插件 "${e.name}" 已安装, 跳过`);return}this.plugins.push(e),this.initialized&&e.onInit&&e.onInit(this)}getInternalData(){return{...this.internalData}}getLfInstance(){return this.lfInstance}getOptions(){return this.options}}const X7=new Set(["fork","switch","inclusive","while","for","groupFilter","groupAction","iterator"]),$7=new Set(["comment"]);function W2(t,e){return!!(t==="group-node"||e!=null&&e.type&&X7.has(e.type))}function q7(t,e){mg(t,"layout");const i={layerGapX:(e==null?void 0:e.layerGapX)??250,nodeGapY:(e==null?void 0:e.nodeGapY)??100,startX:(e==null?void 0:e.startX)??100,startY:(e==null?void 0:e.startY)??200,startNodeId:(e==null?void 0:e.startNodeId)??"$node_start_input",groupNodeHeight:(e==null?void 0:e.groupNodeHeight)??200},{nodes:a,edges:n}=t;if(!a||a.length===0)return t;const r=[],o=[],l=[],s=new Set;a.forEach(y=>{y.type==="group-node"&&Array.isArray(y.children)&&y.children.forEach(x=>s.add(x))}),a.forEach(y=>{var P,D,b;const x=((D=(P=y.properties)==null?void 0:P.model)==null?void 0:D.type)||((b=y.properties)==null?void 0:b.type)||"";$7.has(x)?r.push(y):s.has(y.id)?l.push(y):o.push(y)});const c=new Map;a.forEach(y=>c.set(y.id,{x:y.x,y:y.y}));const d=new Map,I=new Map,g=new Map;o.forEach(y=>{g.set(y.id,y),d.set(y.id,[]),I.set(y.id,0)}),n.forEach(y=>{d.has(y.sourceNodeId)&&g.has(y.targetNodeId)&&(d.get(y.sourceNodeId).push(y.targetNodeId),I.set(y.targetNodeId,(I.get(y.targetNodeId)||0)+1))});const u=[],N=new Set,h=[];g.has(i.startNodeId)&&h.push(i.startNodeId),o.forEach(y=>{y.id!==i.startNodeId&&(I.get(y.id)||0)===0&&h.push(y.id)}),h.length===0&&o.length>0&&h.push(o[0].id);let M=[...h];for(M.forEach(y=>N.add(y));M.length>0;){u.push([...M]);const y=[];M.forEach(x=>{(d.get(x)||[]).forEach(D=>{N.has(D)||(N.add(D),y.push(D))})}),M=y}o.forEach(y=>{N.has(y.id)||(u.length===0&&u.push([]),u[u.length-1].push(y.id),N.add(y.id))});for(let y=1;y<u.length;y++){const x=u[y-1],P=new Map;x.forEach((D,b)=>P.set(D,b)),u[y].sort((D,b)=>{const p=_2(D,n,P),j=_2(b,n,P);return p-j})}let m=i.startX;if(u.forEach((y,x)=>{const P=y.some(j=>{const S=g.get(j);return S?W2(S.type||"",S.properties):!1});if(x>0){const Z=u[x-1].some(z=>{const W=g.get(z);return W?W2(W.type||"",W.properties):!1})||P?i.layerGapX+100:i.layerGapX;m+=Z}const D=P?Math.max(i.nodeGapY,i.groupNodeHeight+20):i.nodeGapY,b=(y.length-1)*D,p=i.startY-b/2;y.forEach((j,S)=>{const Z=g.get(j);Z&&(Z.x=m,Z.y=p+S*D)})}),r.length>0){let y=i.startY;o.forEach(P=>{P.y<y&&(y=P.y)});const x=y-120;r.forEach((P,D)=>{P.x=i.startX+D*300,P.y=x})}return l.length>0&&a.forEach(D=>{if(D.type==="group-node"&&Array.isArray(D.children)){const p=D.children.map(k=>l.find(E=>E.id===k)).filter(Boolean);if(p.length===0)return;const j=120,S=30,z=p.length*S+(p.length-1)*60+50+30,W=Math.max(300,j+30*2+60),R=D.y-z/2+50+S/2;p.forEach((k,E)=>{k.x=D.x,k.y=R+E*(S+60)}),D.properties||(D.properties={}),D.properties.width=W,D.properties.height=Math.max(200,z)}}),K7(a,n,g,i),t}function _2(t,e,i){let a=0,n=0;return e.forEach(r=>{r.targetNodeId===t&&i.has(r.sourceNodeId)&&(a+=i.get(r.sourceNodeId),n++)}),n>0?a/n:1/0}function K7(t,e,i,a){const n=new Map;i.forEach(o=>{const l=`${o.x}_${o.y}`;n.has(l)||n.set(l,[]),n.get(l).push(o)}),n.forEach(o=>{if(o.length>1){const l=o[0].y,s=a.nodeGapY;o.forEach((c,d)=>{c.y=l+(d-(o.length-1)/2)*s})}});const r=new Map;e.forEach(o=>{const l=i.get(o.sourceNodeId),s=i.get(o.targetNodeId);if(!l||!s)return;const c=`h_${l.y}_${s.y}`;r.has(c)||r.set(c,[]),r.get(c).push(o)}),r.forEach(o=>{if(o.length>1){const l=Math.min(a.nodeGapY*.3,20);o.forEach((s,c)=>{if(c===0)return;const d=i.get(s.targetNodeId);d&&(d.y+=l*c)})}})}function eee(t){if(!t||t.length===0)return!1;let e=0;return t.forEach(i=>{const a=i.additionalInfo||{};!a.layoutX&&!a.layoutY&&e++}),e>t.length*.5}const tee=["flow","end","break"];class fr{static validate(e){var c;const i=[];if(!((c=e==null?void 0:e.metadata)!=null&&c.nodes))return{valid:!0,issues:[],errors:[],warnings:[]};const a=e.metadata.nodes,n=e.metadata.connections||[],r=e.metadata.endpoints||[];if(a.length+r.length>Ue.maxGraphNodes)throw new Do("GRAPH_NODES_LIMIT",`validate graph has ${a.length+r.length} nodes, max is ${Ue.maxGraphNodes}`);if(n.length>Ue.maxGraphEdges)throw new Do("GRAPH_EDGES_LIMIT",`validate graph has ${n.length} edges, max is ${Ue.maxGraphEdges}`);const o=new Set(a.map(d=>d.id));a.forEach(d=>{fr._validateNode(d,o,i)}),fr._validateConnections(n,a,o,i),fr._validateFirstNode(e,i);const l=i.filter(d=>d.severity==="error"),s=i.filter(d=>d.severity==="warning");return{valid:l.length===0,issues:i,errors:l,warnings:s}}static _validateNode(e,i,a){const n=e.configuration||{},r={nodeId:e.id,nodeName:e.name,nodeType:e.type};switch(e.type){case"switch":case"inclusive":{(!Array.isArray(n.cases)||n.cases.length===0)&&a.push({...r,severity:"warning",message:`${e.type} 节点 "${e.name}" 没有配置任何条件分支 (cases)`,category:"missing_config"});break}case"for":{n.range||a.push({...r,severity:"error",message:`for 节点 "${e.name}" 缺少遍历范围 (range)`,category:"missing_config"}),n.do?fr._validateNodeRef(n.do,e,"do",i,a):a.push({...r,severity:"error",message:`for 节点 "${e.name}" 缺少循环体目标 (do)`,category:"missing_config"});break}case"while":{n.condition||n.jsScript||a.push({...r,severity:"error",message:`while 节点 "${e.name}" 缺少循环条件 (condition)`,category:"missing_config"}),n.do?fr._validateNodeRef(n.do,e,"do",i,a):a.push({...r,severity:"error",message:`while 节点 "${e.name}" 缺少循环体目标 (do)`,category:"missing_config"});break}case"groupFilter":{const o=fr._parseNodeIds(n.nodeIds);o.length===0?a.push({...r,severity:"error",message:`groupFilter 节点 "${e.name}" 缺少过滤器节点列表 (nodeIds)`,category:"missing_config"}):o.forEach(l=>{fr._validateNodeRef(l,e,"nodeIds",i,a)});break}case"groupAction":{const o=fr._parseNodeIds(n.nodeIds);o.length===0?a.push({...r,severity:"error",message:`groupAction 节点 "${e.name}" 缺少动作节点列表 (nodeIds)`,category:"missing_config"}):o.forEach(l=>{fr._validateNodeRef(l,e,"nodeIds",i,a)});break}case"iterator":{a.push({...r,severity:"warning",message:`iterator 节点 "${e.name}" 已弃用,建议替换为 for 节点`,category:"deprecated"});break}}}static _validateNodeRef(e,i,a,n,r){e.startsWith("chain:")||n.has(e)||r.push({nodeId:i.id,nodeName:i.name,nodeType:i.type,severity:"error",message:`${i.type} 节点 "${i.name}" 的 ${a} 引用了不存在的节点: "${e}"`,category:"invalid_reference"})}static _validateConnections(e,i,a,n){const r=new Map,o=new Map;i.forEach(l=>{r.set(l.id,l.type),o.set(l.id,l.name)}),e.forEach(l=>{a.has(l.fromId)||n.push({severity:"error",message:`连接的源节点不存在: "${l.fromId}"`,category:"connection"}),a.has(l.toId)||n.push({severity:"error",message:`连接的目标节点不存在: "${l.toId}"`,category:"connection"});const s=r.get(l.fromId);s&&tee.includes(s)&&n.push({nodeId:l.fromId,nodeName:o.get(l.fromId),nodeType:s,severity:"warning",message:`终端节点 "${o.get(l.fromId)}" (${s}) 不应有输出连接`,category:"connection"})})}static _validateFirstNode(e,i){var r,o;const a=((r=e.metadata)==null?void 0:r.firstNodeIndex)??0,n=((o=e.metadata)==null?void 0:o.nodes)||[];n.length>0&&(a<0||a>=n.length)&&i.push({severity:"error",message:`firstNodeIndex (${a}) 超出节点范围 (0-${n.length-1})`,category:"connection"})}static _parseNodeIds(e){return e?Array.isArray(e)?e.map(i=>String(i).trim()).filter(Boolean):typeof e=="string"?e.split(",").map(i=>i.trim()).filter(Boolean):[]:[]}}const j4=[{id:"gitee_ai",labelKey:"editor.aiProvider.gitee_ai",label:"Gitee AI",url:"https://ai.gitee.com/v1",defaultModel:"DeepSeek-V4-Flash",models:[{label:"DeepSeek-V4-Flash",value:"DeepSeek-V4-Flash"},{label:"DeepSeek-R1",value:"DeepSeek-R1"},{label:"GLM-5.1",value:"GLM-5.1"},{label:"Qwen3-Coder",value:"Qwen3-Coder"}]},{id:"deepseek",labelKey:"editor.aiProvider.deepseek",label:"DeepSeek",url:"https://api.deepseek.com",defaultModel:"deepseek-chat",models:[{label:"DeepSeek-V4-Flash",value:"deepseek-v4-flash"},{label:"DeepSeek-V3.2",value:"deepseek-chat"},{label:"DeepSeek-R1",value:"deepseek-reasoner"}]},{id:"qwen",labelKey:"editor.aiProvider.qwen",label:"通义千问",url:"https://dashscope.aliyuncs.com/compatible-mode/v1",defaultModel:"qwen-plus",models:[{label:"qwen-plus",value:"qwen-plus"},{label:"qwen-turbo",value:"qwen-turbo"},{label:"qwen-max",value:"qwen-max"}]},{id:"zhipu",labelKey:"editor.aiProvider.zhipu",label:"智谱 AI",url:"https://open.bigmodel.cn/api/paas/v4",defaultModel:"glm-5",models:[{label:"glm-5.1",value:"glm-5.1"},{label:"glm-5",value:"glm-5"},{label:"glm-4.7",value:"glm-4.7"}]},{id:"openai",labelKey:"editor.aiProvider.openai",label:"OpenAI",url:"https://api.openai.com/v1",defaultModel:"gpt-4o",models:[{label:"gpt-4o",value:"gpt-4o"},{label:"gpt-4o-mini",value:"gpt-4o-mini"}]},{id:"ollama",labelKey:"editor.aiProvider.ollama",label:"Ollama (本地)",url:"http://localhost:11434/v1",defaultModel:"llama3",models:[{label:"llama3",value:"llama3"},{label:"qwen2",value:"qwen2"},{label:"mistral",value:"mistral"}]}];function T4(t){const e=typeof window<"u"?window:void 0;return Array.isArray(e==null?void 0:e[t])?e[t]:[]}function Vs(t){if(Array.isArray(t)&&t.length>0)return t;const e=T4("rulegoAiProviders");return e.length>0?e:j4}function S4(t){return Array.isArray(t)&&t.length>0?t:T4("rulegoAiEmbeddingProviders")}const iee=["string","number","boolean","object","array"],aee=["string","number","boolean","object"];function nee(t){return Array.isArray(t)?t.filter(e=>e&&typeof e=="object"&&!Array.isArray(e)).map(e=>({...e})):[]}function ree(t=1){return{name:"",title:"",description:"",type:"string",order:t,required:!1,properties:[],itemsType:"string",itemsProperties:[]}}function wp(t){const e=t&&typeof t=="object"&&!Array.isArray(t)?t:{},i=e.properties&&typeof e.properties=="object"&&!Array.isArray(e.properties)?e.properties:{},a=new Set(Array.isArray(e.required)?e.required.map(String):[]);return Object.keys(i).map((n,r)=>{var c;const o=i[n]||{},l=String(o.type||"string"),s=String(((c=o.items)==null?void 0:c.type)||"string");return{name:n,title:String(o.title||""),description:String(o.description||""),type:l,order:Number.isFinite(Number(o.order))?Number(o.order):r+1,required:a.has(n),properties:l==="object"?wp(o):[],itemsType:s,itemsProperties:l==="array"&&s==="object"?wp(o.items):[]}}).sort((n,r)=>Number(n.order||0)-Number(r.order||0))}function Cp(t){const e={type:"object",properties:{},required:[]};return t.filter(i=>i.name.trim()).sort((i,a)=>Number(i.order||0)-Number(a.order||0)).forEach((i,a)=>{const n=i.name.trim(),r={type:i.type||"string",order:Number.isFinite(Number(i.order))?Number(i.order):a+1};if(i.title.trim()&&(r.title=i.title.trim()),i.description.trim()&&(r.description=i.description.trim()),i.type==="object"){const o=Cp(i.properties||[]);r.properties=o.properties,o.required&&(r.required=o.required)}if(i.type==="array"&&(r.items={type:i.itemsType||"string"},r.items.type==="object")){const o=Cp(i.itemsProperties||[]);r.items.properties=o.properties,o.required&&(r.items.required=o.required)}e.properties[n]=r,i.required&&e.required.push(n)}),e.required.length===0&&delete e.required,e}function Uh(t){return t.map(e=>({...e,properties:Uh(e.properties||[]),itemsProperties:Uh(e.itemsProperties||[])}))}function oee(t){return t.map((e,i)=>({...e,order:i+1}))}function w4(t,e){if(!e)return t;const i=e.split(".").filter(Boolean);let a=t,n;for(const r of i){if(r==="items"){a=(n==null?void 0:n.itemsProperties)||[];continue}if(n=a[Number(r)],!n)return[];a=n.properties||[]}return a}function lee(t,e,i){const a=Uh(t);return i(w4(a,e)),a}function see(t,e="{}"){if(typeof t=="string")return t.trim()||e;if(t==null)return e;try{return JSON.stringify(t,null,2)}catch{return e}}function cee(t,e={}){if(!t.trim())return e;const i=JSON.parse(t);return i&&typeof i=="object"&&!Array.isArray(i)?i:e}function pD(t){if(!t||typeof t!="object")return null;const e=t,i=String(e.name||e.Name||e.tool_name||e.type||"").trim();if(!i)return null;const a=e.params_one_of||e.paramsOneOf||e.ParamsOneOf||e.parameters||e.schema||{},n=(a==null?void 0:a.open_api_v3)||(a==null?void 0:a.openApiV3)||(a==null?void 0:a.OpenApiV3)||a;return{value:i,label:i,desc:String(e.desc||e.Desc||e.tool_desc||e.description||""),parameters:n&&typeof n=="object"&&!Array.isArray(n)?n:{},fields:Array.isArray(e.fields)?e.fields:[],defaultGlobalDir:String(e.defaultGlobalDir||e.default_global_dir||""),raw:t}}function C4(t){var a,n;const e=t&&typeof t=="object"?t:{},i=(n=(a=e==null?void 0:e.builtins)==null?void 0:a["ai/tools"])==null?void 0:n.tools;return Array.isArray(i)?i.map(pD).filter(Boolean):[]}function dee(...t){for(const e of t){if(Array.isArray(e)){const a=e.map(pD).filter(Boolean);if(a.length>0)return a}const i=C4(e);if(i.length>0)return i}return[]}function Iee(...t){for(const e of t){if(typeof e=="string"&&e.trim())return e;if(e&&typeof e=="object"){const i=e.skillPath;if(typeof i=="string"&&i.trim())return i}}return""}const Fs={default:{label:"经典",labelEn:"Classic",vars:{"--hb-bg-root":"#f6f5f5","--hb-bg-toolbar":"#ffffff","--hb-bg-sidebar":"#f6f5f5","--hb-bg-canvas":"#ffffff","--hb-bg-drawer":"#ffffff","--hb-bg-modal":"#ffffff","--hb-bg-hover":"#ecf5ff","--hb-bg-active":"#ecf5ff","--hb-bg-section":"#fafbfc","--hb-bg-input":"#ffffff","--hb-bg-tag":"#f0f0f0","--hb-text-primary":"#333333","--hb-text-secondary":"#606266","--hb-text-muted":"#888888","--hb-text-disabled":"#aaaaaa","--hb-color-primary":"#409eff","--hb-color-primary-light":"#c6e2ff","--hb-color-primary-bg":"#ecf5ff","--hb-color-success":"#27ae60","--hb-color-warning":"#fa8c16","--hb-color-danger":"#f56c6c","--hb-color-title":"#c0392b","--hb-border-color":"#dcdfe6","--hb-border-light":"#eeeeee","--hb-border-strong":"#dddddd","--hb-radius-sm":"4px","--hb-radius-md":"6px","--hb-radius-lg":"8px","--hb-shadow-sm":"0 1px 4px rgba(0,0,0,0.08)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.12)","--hb-shadow-lg":"0 8px 32px rgba(0,0,0,0.15)","--hb-overlay":"rgba(0,0,0,0.3)"}},dark:{label:"暗夜",labelEn:"Dark",vars:{"--hb-bg-root":"#1a1a2e","--hb-bg-toolbar":"#16213e","--hb-bg-sidebar":"#1a1a2e","--hb-bg-canvas":"#0f3460","--hb-bg-drawer":"#16213e","--hb-bg-modal":"#16213e","--hb-bg-hover":"#1a3a5c","--hb-bg-active":"#1a3a5c","--hb-bg-section":"#0f3460","--hb-bg-input":"#1a1a2e","--hb-bg-tag":"#0f3460","--hb-text-primary":"#e0e0e0","--hb-text-secondary":"#b0b0b0","--hb-text-muted":"#808080","--hb-text-disabled":"#555555","--hb-color-primary":"#5dade2","--hb-color-primary-light":"#1a3a5c","--hb-color-primary-bg":"#162d50","--hb-color-success":"#2ecc71","--hb-color-warning":"#f39c12","--hb-color-danger":"#e74c3c","--hb-color-title":"#e74c3c","--hb-border-color":"#2c3e50","--hb-border-light":"#1e2d3d","--hb-border-strong":"#34495e","--hb-radius-sm":"4px","--hb-radius-md":"6px","--hb-radius-lg":"8px","--hb-shadow-sm":"0 1px 4px rgba(0,0,0,0.3)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.4)","--hb-shadow-lg":"0 8px 32px rgba(0,0,0,0.5)","--hb-overlay":"rgba(0,0,0,0.6)"}},nature:{label:"自然",labelEn:"Nature",vars:{"--hb-bg-root":"#f0f4e8","--hb-bg-toolbar":"#fafdf5","--hb-bg-sidebar":"#f0f4e8","--hb-bg-canvas":"#fefffe","--hb-bg-drawer":"#fafdf5","--hb-bg-modal":"#fafdf5","--hb-bg-hover":"#e8f5e9","--hb-bg-active":"#e8f5e9","--hb-bg-section":"#f5f9f0","--hb-bg-input":"#ffffff","--hb-bg-tag":"#e8f5e9","--hb-text-primary":"#2e4a2e","--hb-text-secondary":"#4a6741","--hb-text-muted":"#7a9a70","--hb-text-disabled":"#a0bfa0","--hb-color-primary":"#4caf50","--hb-color-primary-light":"#c8e6c9","--hb-color-primary-bg":"#e8f5e9","--hb-color-success":"#388e3c","--hb-color-warning":"#f9a825","--hb-color-danger":"#d32f2f","--hb-color-title":"#2e7d32","--hb-border-color":"#c5e1a5","--hb-border-light":"#dcedc8","--hb-border-strong":"#aed581","--hb-radius-sm":"6px","--hb-radius-md":"8px","--hb-radius-lg":"12px","--hb-shadow-sm":"0 1px 4px rgba(76,175,80,0.1)","--hb-shadow-md":"0 4px 12px rgba(76,175,80,0.12)","--hb-shadow-lg":"0 8px 24px rgba(76,175,80,0.15)","--hb-overlay":"rgba(46,77,46,0.3)"}},elegant:{label:"优雅",labelEn:"Elegant",vars:{"--hb-bg-root":"#f3f0f7","--hb-bg-toolbar":"#faf8fc","--hb-bg-sidebar":"#f3f0f7","--hb-bg-canvas":"#fefcff","--hb-bg-drawer":"#faf8fc","--hb-bg-modal":"#faf8fc","--hb-bg-hover":"#ede7f6","--hb-bg-active":"#ede7f6","--hb-bg-section":"#f5f2fa","--hb-bg-input":"#ffffff","--hb-bg-tag":"#ede7f6","--hb-text-primary":"#37274a","--hb-text-secondary":"#5c4a72","--hb-text-muted":"#9575aa","--hb-text-disabled":"#bba8cc","--hb-color-primary":"#7c4dff","--hb-color-primary-light":"#d1c4e9","--hb-color-primary-bg":"#ede7f6","--hb-color-success":"#66bb6a","--hb-color-warning":"#ffa726","--hb-color-danger":"#ef5350","--hb-color-title":"#7c4dff","--hb-border-color":"#d1c4e9","--hb-border-light":"#e8e0f0","--hb-border-strong":"#b39ddb","--hb-radius-sm":"6px","--hb-radius-md":"10px","--hb-radius-lg":"14px","--hb-shadow-sm":"0 1px 6px rgba(124,77,255,0.08)","--hb-shadow-md":"0 4px 16px rgba(124,77,255,0.1)","--hb-shadow-lg":"0 8px 28px rgba(124,77,255,0.15)","--hb-overlay":"rgba(55,39,74,0.35)"}},tech:{label:"科技",labelEn:"Tech",vars:{"--hb-bg-root":"#0d1117","--hb-bg-toolbar":"#161b22","--hb-bg-sidebar":"#0d1117","--hb-bg-canvas":"#1c2333","--hb-bg-drawer":"#161b22","--hb-bg-modal":"#161b22","--hb-bg-hover":"#1f3044","--hb-bg-active":"#1f3044","--hb-bg-section":"#1c2333","--hb-bg-input":"#0d1117","--hb-bg-tag":"#1c2333","--hb-text-primary":"#c9d1d9","--hb-text-secondary":"#8b949e","--hb-text-muted":"#6e7681","--hb-text-disabled":"#484f58","--hb-color-primary":"#00bcd4","--hb-color-primary-light":"#1a4a54","--hb-color-primary-bg":"#0d3038","--hb-color-success":"#3fb950","--hb-color-warning":"#d29922","--hb-color-danger":"#f85149","--hb-color-title":"#00bcd4","--hb-border-color":"#30363d","--hb-border-light":"#21262d","--hb-border-strong":"#3d444d","--hb-radius-sm":"3px","--hb-radius-md":"6px","--hb-radius-lg":"8px","--hb-shadow-sm":"0 1px 4px rgba(0,188,212,0.1)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.4)","--hb-shadow-lg":"0 8px 32px rgba(0,0,0,0.5)","--hb-overlay":"rgba(0,0,0,0.65)"}},modern:{label:"现代",labelEn:"Modern",vars:{"--hb-bg-root":"#f8fafc","--hb-bg-toolbar":"#ffffff","--hb-bg-sidebar":"#ffffff","--hb-bg-canvas":"#ffffff","--hb-bg-drawer":"#ffffff","--hb-bg-modal":"#ffffff","--hb-bg-hover":"rgba(59,130,246,0.06)","--hb-bg-active":"rgba(59,130,246,0.1)","--hb-bg-section":"#f8fafc","--hb-bg-input":"#ffffff","--hb-bg-tag":"#f1f5f9","--hb-text-primary":"#334155","--hb-text-secondary":"#64748b","--hb-text-muted":"#94a3b8","--hb-text-disabled":"#cbd5e1","--hb-color-primary":"#3b82f6","--hb-color-primary-light":"#bfdbfe","--hb-color-primary-bg":"#eff6ff","--hb-color-success":"#22c55e","--hb-color-warning":"#eab308","--hb-color-danger":"#ef4444","--hb-color-title":"#1e40af","--hb-border-color":"rgba(0,0,0,0.08)","--hb-border-light":"rgba(0,0,0,0.04)","--hb-border-strong":"rgba(0,0,0,0.1)","--hb-radius-sm":"7px","--hb-radius-md":"10px","--hb-radius-lg":"12px","--hb-shadow-sm":"0 1px 3px rgba(0,0,0,0.06)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.08)","--hb-shadow-lg":"0 8px 24px rgba(0,0,0,0.12)","--hb-overlay":"rgba(0,0,0,0.25)","--hb-node-selected-stroke":"#3b82f6","--hb-node-selected-shadow":"0 0 8px rgba(59,130,246,0.3)","--hb-node-hover-brightness":"0.96","--hb-node-radius":"10px","--hb-node-shadow-offset":"2px","--hb-port-fill":"#ffffff","--hb-port-stroke":"#94a3b8","--hb-port-hover-fill":"#3b82f6","--hb-port-hover-stroke":"#3b82f6","--hb-edge-stroke":"#94a3b8","--hb-edge-hover-stroke":"#3b82f6"}}};function is(t){return{"--hb-bg-root":t.root,"--hb-bg-toolbar":t.toolbar,"--hb-bg-sidebar":t.sidebar,"--hb-bg-canvas":t.canvas,"--hb-bg-drawer":t.toolbar,"--hb-bg-modal":t.toolbar,"--hb-bg-hover":t.hover,"--hb-bg-active":t.active,"--hb-bg-section":t.section,"--hb-bg-input":t.input,"--hb-bg-tag":t.tag,"--hb-text-primary":t.text,"--hb-text-secondary":t.secondary,"--hb-text-muted":t.muted,"--hb-text-disabled":t.disabled,"--hb-color-primary":t.primary,"--hb-color-primary-light":t.primaryLight,"--hb-color-primary-bg":t.primaryBg,"--hb-color-success":t.success,"--hb-color-warning":t.warning,"--hb-color-danger":t.danger,"--hb-color-title":t.title,"--hb-border-color":t.border,"--hb-border-light":t.borderLight,"--hb-border-strong":t.borderStrong,"--hb-radius-sm":t.radiusSm||"6px","--hb-radius-md":t.radiusMd||"8px","--hb-radius-lg":t.radiusLg||"10px","--hb-shadow-sm":`0 1px 4px ${t.shadowColor}`,"--hb-shadow-md":`0 4px 12px ${t.shadowColor}`,"--hb-shadow-lg":`0 8px 28px ${t.shadowColor}`,"--hb-overlay":t.overlay,"--hb-node-selected-stroke":t.primary,"--hb-node-selected-shadow":`0 0 8px ${t.shadowColor}`,"--hb-node-hover-brightness":"0.96","--hb-node-radius":t.radiusMd||"8px","--hb-node-shadow-offset":"2px","--hb-port-fill":t.input,"--hb-port-stroke":t.muted,"--hb-port-hover-fill":t.primary,"--hb-port-hover-stroke":t.primary,"--hb-edge-stroke":t.muted,"--hb-edge-hover-stroke":t.primary}}Object.assign(Fs,{colorful:{label:"彩色",labelEn:"Colorful",vars:is({root:"#f8fafc",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f8fafc",input:"#ffffff",tag:"#eef2ff",hover:"rgba(37,99,235,0.08)",active:"rgba(139,92,246,0.12)",text:"#172033",secondary:"#475569",muted:"#64748b",disabled:"#cbd5e1",primary:"#2563eb",primaryLight:"#bfdbfe",primaryBg:"#eff6ff",success:"#10b981",warning:"#f59e0b",danger:"#f43f5e",title:"#7c3aed",border:"#dbe4f0",borderLight:"#edf2f7",borderStrong:"#cbd5e1",shadowColor:"rgba(15,23,42,0.10)",overlay:"rgba(15,23,42,0.32)"})},"ant-blue":{label:"蚂蚁蓝",labelEn:"Ant Blue",vars:is({root:"#f0f7ff",toolbar:"#ffffff",sidebar:"#f7fbff",canvas:"#ffffff",section:"#f0f7ff",input:"#ffffff",tag:"#e6f4ff",hover:"rgba(22,119,255,0.08)",active:"rgba(22,119,255,0.12)",text:"#102a43",secondary:"#42526e",muted:"#6b7c93",disabled:"#b8c4d6",primary:"#1677ff",primaryLight:"#91caff",primaryBg:"#e6f4ff",success:"#52c41a",warning:"#faad14",danger:"#ff4d4f",title:"#0958d9",border:"#bae0ff",borderLight:"#e6f4ff",borderStrong:"#91caff",shadowColor:"rgba(22,119,255,0.12)",overlay:"rgba(16,42,67,0.28)",radiusSm:"6px",radiusMd:"8px",radiusLg:"12px"})},material:{label:"Material",labelEn:"Material",vars:is({root:"#f8fbff",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f1f5fb",input:"#ffffff",tag:"#e8f0fe",hover:"rgba(26,115,232,0.08)",active:"rgba(26,115,232,0.13)",text:"#202124",secondary:"#5f6368",muted:"#80868b",disabled:"#bdc1c6",primary:"#1a73e8",primaryLight:"#a8c7fa",primaryBg:"#e8f0fe",success:"#188038",warning:"#fbbc04",danger:"#ea4335",title:"#174ea6",border:"#dadce0",borderLight:"#edf1f7",borderStrong:"#c9d2df",shadowColor:"rgba(60,64,67,0.14)",overlay:"rgba(32,33,36,0.30)",radiusSm:"4px",radiusMd:"8px",radiusLg:"12px"})},tailwind:{label:"Tailwind",labelEn:"Tailwind",vars:is({root:"#f8fafc",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f1f5f9",input:"#ffffff",tag:"#e0f2fe",hover:"rgba(14,165,233,0.08)",active:"rgba(14,165,233,0.14)",text:"#0f172a",secondary:"#475569",muted:"#64748b",disabled:"#cbd5e1",primary:"#0ea5e9",primaryLight:"#bae6fd",primaryBg:"#e0f2fe",success:"#10b981",warning:"#f59e0b",danger:"#f43f5e",title:"#0284c7",border:"#dbe4f0",borderLight:"#eef2f7",borderStrong:"#cbd5e1",shadowColor:"rgba(15,23,42,0.10)",overlay:"rgba(15,23,42,0.30)",radiusSm:"6px",radiusMd:"10px",radiusLg:"14px"})},github:{label:"GitHub",labelEn:"GitHub",vars:is({root:"#f6f8fa",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f6f8fa",input:"#ffffff",tag:"#ddf4ff",hover:"rgba(9,105,218,0.08)",active:"rgba(9,105,218,0.12)",text:"#24292f",secondary:"#57606a",muted:"#6e7781",disabled:"#afb8c1",primary:"#0969da",primaryLight:"#b6e3ff",primaryBg:"#ddf4ff",success:"#1a7f37",warning:"#bf8700",danger:"#cf222e",title:"#0969da",border:"#d0d7de",borderLight:"#eaeef2",borderStrong:"#afb8c1",shadowColor:"rgba(31,35,40,0.12)",overlay:"rgba(31,35,40,0.32)",radiusSm:"6px",radiusMd:"6px",radiusLg:"8px"})},vscode:{label:"VS Code",labelEn:"VS Code",vars:is({root:"#1e1e1e",toolbar:"#252526",sidebar:"#252526",canvas:"#1e1e1e",section:"#2d2d30",input:"#1e1e1e",tag:"#2d2d30",hover:"rgba(0,122,204,0.18)",active:"rgba(0,122,204,0.28)",text:"#f3f4f6",secondary:"#cccccc",muted:"#9ca3af",disabled:"#6b7280",primary:"#007acc",primaryLight:"#2b88d8",primaryBg:"#094771",success:"#4ec9b0",warning:"#dcdcaa",danger:"#f44747",title:"#4fc1ff",border:"#3c3c3c",borderLight:"#333333",borderStrong:"#505050",shadowColor:"rgba(0,0,0,0.42)",overlay:"rgba(0,0,0,0.62)",radiusSm:"3px",radiusMd:"5px",radiusLg:"7px"})},apple:{label:"苹果",labelEn:"Apple",vars:is({root:"#f5f5f7",toolbar:"#ffffff",sidebar:"#fbfbfd",canvas:"#ffffff",section:"#f5f5f7",input:"#ffffff",tag:"#eef5ff",hover:"rgba(0,122,255,0.08)",active:"rgba(0,122,255,0.13)",text:"#1d1d1f",secondary:"#424245",muted:"#6e6e73",disabled:"#b7b7bd",primary:"#007aff",primaryLight:"#b9dcff",primaryBg:"#eef5ff",success:"#34c759",warning:"#ffcc00",danger:"#ff3b30",title:"#007aff",border:"#d2d2d7",borderLight:"#ebebef",borderStrong:"#c7c7cc",shadowColor:"rgba(0,0,0,0.10)",overlay:"rgba(29,29,31,0.28)",radiusSm:"7px",radiusMd:"10px",radiusLg:"14px"})}});const gee={light:"default",classic:"default",blue:"tech",antd:"ant-blue",ant:"ant-blue",google:"material",tailwindcss:"tailwind",gh:"github",vs:"vscode","visual-studio-code":"vscode",mac:"apple",macos:"apple"};function ml(t){const e=String(t||"").trim().toLowerCase();return e?Object.prototype.hasOwnProperty.call(Fs,e)?e:gee[e]||"default":"default"}function uee(){let t="";for(const[e,i]of Object.entries(Fs)){const a=e==="default"?'.huanban_rulego_editor_root, .huanban_rulego_editor_root[data-theme="default"]':`.huanban_rulego_editor_root[data-theme="${e}"]`,n=Object.entries(i.vars).map(([r,o])=>` ${r}: ${o};`).join(`
|
|
127
127
|
`);t+=`${a} {
|
|
128
128
|
${n}
|
|
129
129
|
}
|
package/dist/index.esm.js
CHANGED
|
@@ -53860,9 +53860,27 @@ const r4 = {
|
|
|
53860
53860
|
searchPlaceholder: "搜索工作流...",
|
|
53861
53861
|
create: "新建",
|
|
53862
53862
|
createTitle: "新建工作流",
|
|
53863
|
+
createAndOpen: "创建并打开",
|
|
53863
53864
|
defaultName: "新工作流",
|
|
53865
|
+
id: "ID",
|
|
53866
|
+
idPlaceholder: "规则链 ID,不可包含 /、\\ 或 .",
|
|
53867
|
+
idInvalid: "ID 不能为空,且不能包含 /、\\ 或 .",
|
|
53864
53868
|
namePlaceholder: "输入工作流名称",
|
|
53865
53869
|
descriptionPlaceholder: "可选描述",
|
|
53870
|
+
chainType: "规则链类型",
|
|
53871
|
+
rootChain: "主链",
|
|
53872
|
+
subChain: "子链",
|
|
53873
|
+
debugMode: "调试模式",
|
|
53874
|
+
debugModeHint: "开启后便于调试规则链执行过程",
|
|
53875
|
+
category: "分类",
|
|
53876
|
+
categoryPlaceholder: "可选分类,如 IoT / AI / 数据同步",
|
|
53877
|
+
initialStatus: "初始状态",
|
|
53878
|
+
initialStopped: "停用",
|
|
53879
|
+
initialRunning: "运行",
|
|
53880
|
+
openAfterCreate: "创建后进入编辑器",
|
|
53881
|
+
updateTime: "更新时间",
|
|
53882
|
+
more: "更多操作",
|
|
53883
|
+
rowHint: "单击查看信息,双击进入设计",
|
|
53866
53884
|
empty: "暂无工作流",
|
|
53867
53885
|
createFirst: "创建第一个工作流",
|
|
53868
53886
|
design: "设计",
|
|
@@ -55244,9 +55262,27 @@ Check:
|
|
|
55244
55262
|
searchPlaceholder: "Search workflows...",
|
|
55245
55263
|
create: "New",
|
|
55246
55264
|
createTitle: "New Workflow",
|
|
55265
|
+
createAndOpen: "Create and open",
|
|
55247
55266
|
defaultName: "New Workflow",
|
|
55267
|
+
id: "ID",
|
|
55268
|
+
idPlaceholder: "Rule chain ID. Do not use /, \\ or .",
|
|
55269
|
+
idInvalid: "ID is required and cannot contain /, \\ or .",
|
|
55248
55270
|
namePlaceholder: "Enter workflow name",
|
|
55249
55271
|
descriptionPlaceholder: "Optional description",
|
|
55272
|
+
chainType: "Rule chain type",
|
|
55273
|
+
rootChain: "Main chain",
|
|
55274
|
+
subChain: "Sub chain",
|
|
55275
|
+
debugMode: "Debug mode",
|
|
55276
|
+
debugModeHint: "Enable execution debug details for this chain",
|
|
55277
|
+
category: "Category",
|
|
55278
|
+
categoryPlaceholder: "Optional category, such as IoT / AI / Sync",
|
|
55279
|
+
initialStatus: "Initial status",
|
|
55280
|
+
initialStopped: "Stopped",
|
|
55281
|
+
initialRunning: "Running",
|
|
55282
|
+
openAfterCreate: "Open editor after create",
|
|
55283
|
+
updateTime: "Updated",
|
|
55284
|
+
more: "More actions",
|
|
55285
|
+
rowHint: "Click for info, double-click to design",
|
|
55250
55286
|
empty: "No workflows",
|
|
55251
55287
|
createFirst: "Create first workflow",
|
|
55252
55288
|
design: "Design",
|
package/dist/index.umd.js
CHANGED
|
@@ -114,7 +114,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
114
114
|
请确认:
|
|
115
115
|
1. 该消息已被规则链处理
|
|
116
116
|
2. 规则链已开启调试模式
|
|
117
|
-
3. 日志尚未过期`,noDebugLogs:"暂无调试日志记录",enableDebugHint:"请先发送消息到规则链并开启调试模式",loadFailedManual:"加载失败,请手动输入消息 ID",noNodes:"当前规则链无节点",queryingChainLogs:"正在查询规则链日志...",queryingNodes:"查询节点 {{start}}~{{end}} / {{total}}..."},debugConsole:{title:"调试控制台",clear:"清除"},aiProvider:{gitee_ai:"Gitee AI",deepseek:"DeepSeek",qwen:"通义千问",zhipu:"智谱 AI",openai:"OpenAI",ollama:"Ollama (本地)"},customNode:{onlyRightAnchorOut:"只允许从右边的锚点连出",inputSingleOutput:"Input节点只能允许引出一条边",externalCannotConnectGroupChild:"外部节点不允许连接组内节点",onlyLeftAnchorIn:"只允许从左边锚点连入",agentOnlyRightOrBottomOut:"只允许从右边和底部的锚点连出",agentOrchestrationLabel:"智能体编排",agentOrchestrationOnlyRightOrBottomOut:"智能体编排节点只能从右侧或底部锚点连出",agentOrchestrationOnlyLeftIn:"智能体编排节点只能从左侧锚点连入",anchorLlm:"大模型",anchorTool:"工具",anchorMemory:"记忆",anchorKnowledge:"知识库"},groupNode:{onlyRightAnchorOut:"只允许从右边的锚点连出",notToInput:"禁止连到输入类节点",onlyLeftAnchorIn:"只允许从左边锚点连入"},importExport:{exportTitle:"导出规则链",importTitle:"导入规则链",exportTab:"导出",importTab:"导入",nodes:"节点",edges:"连线",size:"大小",name:"名称",fileLoaded:"文件已加载,点击重新选择",dropHint:"拖拽 JSON 文件到此处,或点击选择文件",invalidRuleChainJson:"JSON 格式不符合 RuleGo 规则链规范(缺少 ruleChain 或 metadata 字段)",jsonParseFailed:"JSON 解析失败: {{message}}",selectJsonFile:"请选择 .json 文件",copied:"已复制到剪贴板",downloaded:"已下载: {{fileName}}",noImportData:"没有可导入的数据",importSuccess:"规则链导入成功",downloadFile:"下载文件",confirmImport:"确认导入"},workflowList:{title:"工作流列表",searchPlaceholder:"搜索工作流...",create:"新建",createTitle:"新建工作流",defaultName:"新工作流",namePlaceholder:"输入工作流名称",descriptionPlaceholder:"可选描述",empty:"暂无工作流",createFirst:"创建第一个工作流",design:"设计",info:"信息",logs:"日志",online:"已上线",offline:"已下线",onlineAction:"上线",offlineAction:"下线",confirmDelete:"确定删除工作流「{{name}}」吗?此操作不可恢复。",operateFailed:"操作失败",copyFailed:"复制失败",deleteFailed:"删除失败",createFailed:"创建失败"},dataView:{title:"规则链数据",copyJson:"复制",downloadJson:"下载",copied:"JSON 已复制到剪贴板",copyFailed:"复制失败",downloaded:"已下载 {{fileName}}",downloadFailed:"下载失败"},validation:{title:"规则链校验",revalidate:"重新校验",validate:"校验",clearResults:"清除结果",close:"关闭",all:"全部",validating:"正在校验...",empty:"无校验结果,请点击校验按钮开始",noFilteredResults:"当前筛选无结果"},ruleChainSettings:{title:"规则链设置",nameRequired:"规则链名称不能为空",namePlaceholder:"请输入规则链名称",descriptionPlaceholder:"请输入规则链描述",root:"根链",additionalInfo:"额外配置 (JSON)"},debugPanel:{sendMessage:"发送消息",debugLogs:"调试日志",runLogs:"运行日志",chainId:"规则链 ID",msgType:"消息类型",msgTypePlaceholder:"如 TEST_MSG",msgBodyJson:"消息体 (JSON)",sending:"发送中...",sendTestMessage:"发送测试消息",responseData:"响应数据",nodeLabel:"节点",loading:"加载中...",refresh:"刷新",noDebugLogs:"暂无调试日志",debugModeHint:'需要在节点上开启"调试模式"并发送消息',time:"时间",type:"类型",relation:"关系",operate:"操作",data:"数据",metadata:"元数据",error:"错误",noRunLogs:"暂无运行日志",runLogDetail:"日志详情",selectChainFirst:"请先选择规则链",noSendCallback:"未配置发送消息回调",invalidJson:"消息体 JSON 格式错误",sendSuccess:"消息发送成功",sendFailed:"发送失败: {{message}}",unknownError:"未知错误",sendException:"发送异常: {{message}}",loadDebugLogsFailed:"加载调试日志失败",loadRunLogsFailed:"加载运行日志失败",copied:"已复制",copyFailed:"复制失败"},searchPanel:{placeholder:"搜索节点名称、类型或 ID...",resultCount:"{{count}} 个结果",matchCount:"{{count}} 个匹配",noMatch:"无匹配",empty:"没有找到匹配的节点"},workflowInfo:{noData:"请选择一个工作流查看详情",baseInfo:"基础信息",varsSecrets:"变量与秘钥",integration:"应用集成",maintenance:"维护验证",online:"已上线",offline:"已下线",saveBaseInfo:"保存基础信息",saveVars:"保存变量",saveSecrets:"保存秘钥",saving:"保存中...",vars:"变量",secrets:"秘钥",varName:"变量名",varValue:"变量值",secretName:"秘钥名",secretValue:"秘钥值",apiIntegration:"API 集成",executeAPI:"执行 API:",notifyAPI:"通知 API:",webSocket:"WebSocket",debugWS:"Debug WS:",runtimeWS:"Runtime WS:",endpointWS:"Endpoint WS:",mcpIntegration:"MCP 集成",mcpSSE:"MCP SSE:",action:"操作",add:"添加",delete:"删除",saveFailed:"保存失败"},maintenance:{title:"维护验证",noApi:"当前请求适配器未提供维护接口",noIssues:"未返回问题",validating:"校验中...",runValidate:"运行校验",schemaDiff:"结构差异",repairPlan:"修复建议",patchPreview:"补丁预览",validateResult:"校验结果",valid:"通过",invalid:"未通过"},logViewer:{title:"调试控制台 (Debug Console)",empty:"暂无调试日志"},copilot:{placeholder:"问点什么...",send:"发送",userRole:"用户",assistantRole:"助手"},aiProperties:{modelSelector:"大模型算子选择",loading:"大模型引擎加载中...",fallback:"AI 服务暂时不可用,您的规则链将以普通降级模式运行。",selectPlaceholder:"-- 请选择大模型 --",empty:"后台暂未返回可用模型,请检查 AI 接口配置。"}},components:{"start-node":"输入",delay:"延迟",exec:"命令行",fetchNodeOutput:"取回节点输出",functions:"函数",log:"日志","x/python":"Python脚本",break:"中断",comment:"注释",end:"结束",for:"循环",fork:"并行分支",groupAction:"节点组",inclusive:"包容分支",join:"合并",ref:"节点引用",switch:"条件分支",while:"While循环",iterator:"迭代器",exprFilter:"表达式过滤",fieldFilter:"字段过滤",groupFilter:"过滤器组",jsFilter:"js过滤",jsSwitch:"js路由",msgTypeSwitch:"消息路由","x/luaFilter":"Lua脚本过滤",exprTransform:"表达式转换",jsTransform:"js转换",metadataTransform:"元数据转换","text/template":"模板转换","x/luaTransform":"Lua脚本转换",cacheDelete:"缓存删除",cacheGet:"缓存获取",cacheSet:"缓存设置",dbClient:"数据库",mqttClient:"MQTT发布者",net:"TCP/UDP",sendEmail:"发邮件",ssh:"SSH",restApiCall:"HTTP客户端","x/receiveEmail":"收邮件","x/fileDelete":"文件删除","x/fileList":"文件列表","x/fileRead":"文件读取","x/fileWrite":"文件写入","x/grpcClient":"gRPC 客户端","x/kafkaProducer":"Kafka发布者","x/mongodbClient":"MongoDB","x/natsClient":"NATS","x/nsqClient":"NSQ发布者","x/opengeminiQuery":"opengemini读","x/opengeminiWrite":"opengemini写","x/otel":"OpenTelemetry","x/pulsarClient":"Pulsar发布者","x/rabbitmqClient":"RabbitMQ","x/redisClient":"Redis","x/redisPub":"Redis发布者","x/wukongimSender":"WuKongIM发","x/beanstalkdWorker":"Beanstalkd Worker","x/beanstalkdTube":"Beanstalkd Tube","x/jsonQuery":"JSON查询","x/odooCrudCreate":"Odoo创建","x/odooCrudUpdate":"Odoo更新","x/soapParse":"SOAP解析","x/soapRequest":"SOAP请求",flow:"子规则链",simple_admission:"极简录取规则链",temperature_conversion:"温度转换","ai/llm":"AI文本生成","ai/createImage":"图像生成","ai/agent":"智能体","ai/intent":"意图识别","ai/localIntent":"本地意图识别","ai/mcpClient":"MCP 客户端","ai/transform/documentLoader":"文档加载器","ai/transform/textChunker":"文本分块","ai/embedding/openai":"OpenAI Embedding","ai/indexer/milvus":"Milvus索引","ai/indexer/redis":"Redis索引","ai/retriever/milvus":"Milvus检索","ai/retriever/redis":"Redis检索","ci/exec":"命令行","ci/gitClone":"Git拉取","ci/gitCommit":"Git提交","ci/gitCreateTag":"Git创建标签","ci/gitLog":"获取Git日志","ci/gitPush":"Git推送","ci/ps":"服务器指标","x/modbus":"Modbus","x/opcua":"OPC_UA订阅","x/opcuaRead":"OPC UA读取","x/opcuaWrite":"OPC UA写入","x/serialControl":"串口控制","x/serialIn":"串口输入","x/serialOut":"串口输出","x/serialRequest":"串口请求","x/streamAggregator":"流聚合器","x/streamTransform":"流转换器","endpoint/http":"HTTP","endpoint/ws":"Websocket","endpoint/ws_client":"Websocket客户端","endpoint/mqtt":"MQTT","endpoint/kafka":"Kafka","endpoint/nats":"Nats","endpoint/nsq":"NSQ","endpoint/pulsar":"Pulsar","endpoint/rabbitmq":"RabbitMQ","endpoint/redis":"Redis","endpoint/redis/stream":"Redis流","endpoint/net":"TCP/UDP","endpoint/net_client":"TCP/UDP客户端","endpoint/schedule":"定时调度","endpoint/grpc/stream":"gRPC流客户端","endpoint/wukongim":"WuKongIM收","endpoint/mcpServer":"MCP服务器","endpoint/beanstalkdTubeset":"Beanstalkd","endpoint/mysql_cdc":"MYSQL CDC","endpoint/opcua":"OPC_UA订阅"},fields:{jsScript:"JS脚本",script:"脚本",expr:"表达式",template:"模板",server:"服务器地址",username:"用户名",password:"密码",topic:"主题",key:"键",headers:"请求头",host:"主机地址",port:"端口",cmd:"命令",timeout:"超时时间(秒)",targetId:"目标ID",periodInSeconds:"延迟时间(秒)",maxPendingMsgs:"最大待处理消息数",periodInSecondsPattern:"延迟时间表达式(秒)",functionName:"函数名称",args:"参数列表",targetNodeId:"目标节点ID",range:"遍历范围",do:"执行动作",allMatches:"全部匹配",nodeIds:"节点ID列表",checkAllKeys:"检查所有键",dataNames:"数据字段名",metadataNames:"元数据字段名",mapping:"字段映射",isNew:"替换全部元数据",restEndpointUrlPattern:"HTTP URL地址",requestMethod:"请求方法",readTimeoutMs:"超时(毫秒)",maxParallelRequestsCount:"最大并发数",enableProxy:"开启代理",proxyScheme:"代理协议",proxyHost:"代理主机",proxyPort:"代理端口",driverName:"数据库驱动",dsn:"数据源名称(DSN)",sql:"SQL语句",params:"参数列表",getOne:"返回一条记录",poolSize:"连接池大小",protocol:"协议",connectTimeout:"连接超时(秒)",heartbeatInterval:"心跳间隔(秒)",maxReconnectInterval:"重连间隔(秒)",qOS:"QOS",smtpHost:"SMTP主机",smtpPort:"SMTP端口",fromEmail:"发送邮箱",toEmail:"收件邮箱",ccEmail:"抄送邮箱",bccEmail:"密送邮箱",path:"文件路径",content:"内容",append:"追加写入",recursive:"递归查找",dataType:"数据类型",exchange:"交换机",exchangeType:"交换机类型",durable:"持久化",autoDelete:"自动删除",channel:"频道",partition:"分区编号",database:"数据库名",collection:"集合名",opType:"操作类型",filter:"查询条件",doc:"文档内容",one:"仅返回一条",db:"数据库编号",service:"服务名",method:"方法名",request:"请求体",url:"API地址",model:"模型名称",systemPrompt:"系统提示词",messages:"消息列表",images:"图片列表",prompt:"提示词",n:"生成数量",size:"尺寸",quality:"质量",style:"风格",response_format:"返回格式",repository:"仓库地址",directory:"目录",reference:"分支/标签",authType:"认证方式",authUser:"认证用户名",authPassword:"认证密码/Token",pattern:"匹配模式",message:"消息",tag:"标签名",limit:"数量限制",startTime:"开始时间",endTime:"结束时间",refSpecs:"引用规范",options:"选项",unitId:"单元ID",address:"寄存器地址",quantity:"寄存器数量",value:"值",regType:"寄存器类型",policy:"安全策略",mode:"安全模式",auth:"认证方式",baudRate:"波特率",dataBits:"数据位",stopBits:"停止位",parity:"校验位",dtr:"DTR",rts:"RTS",action:"控制动作",splitType:"分割方式",splitKey:"分割标记",data:"数据",addChar:"附加字符",requestTimeout:"请求超时(毫秒)",metricExpr:"指标表达式",metrics:"指标列表",extend:"继承父链上下文",uID:"用户ID",token:"认证Token",channelType:"频道类型",channelID:"频道ID"},category:{filter:"过滤器",transform:"转换器",action:"动作",external:"外部集成",flow:"子规则链",common:"公共",custom:"自定义",ai:"AI",ci:"CI/CD",iot:"IoT",stats:"流式计算",endpoint:"输入端",endpoints:"输入端",storage:"存储",knowledge:"知识库",image:"图像",audio:"音频",file:"文件",other:"其他"},relationTypes:{Success:"成功",Failure:"失败",True:"真",False:"假",Default:"Default",Stream:"流式",NotFound:"未找到"},validation:{orphanNode:'节点 "{{name}}" 是孤立的, 没有任何连接',startNoConnection:"起始节点 (Input) 没有连接到任何节点",missingRelationType:"连接缺少关系类型",missingNodeType:'节点 "{{name}}" 缺少类型定义',cyclicConnection:"检测到循环连接",duplicateNodeId:"存在重复的节点ID"},action:{saveSuccess:"规则链保存成功",saveFailed:"保存失败: {{error}}",deleteSuccess:"删除成功",loadFailed:"加载失败: {{error}}",exportSuccess:"导出成功",importSuccess:"导入成功",importFailed:"导入失败: 数据格式错误",undoSuccess:"已撤销: {{description}}",redoSuccess:"已重做: {{description}}",noUndoAvailable:"没有可撤销的操作",noRedoAvailable:"没有可重做的操作"}},rb={Input:"Input","Input node already exists":"Only one input node can exist","At least one input node is required":"At least one input endpoint or default input node is required",toolbar:{save:"Save",undo:"Undo",redo:"Redo",delete:"Delete Selected",zoomIn:"Zoom In",zoomOut:"Zoom Out",fitView:"Fit View",fullscreen:"Fullscreen",autoLayout:"Auto Layout"},sidebar:{searchPlaceholder:"Search components...",noResults:"No matching components"},panel:{title:"Edit Properties",nodeName:"Node Name"},contextMenu:{edit:"Edit",editProperties:"Edit Properties",copy:"Copy",delete:"Delete",selectAll:"Select All",fitView:"Fit View",paste:"Paste",disconnect:"Disconnect",resetZoom:"Reset Zoom",runFromNode:"Run From This Node",runSingleNode:"Run This Node Only"},editor:{toolbar:{save:"Save",undo:"Undo",redo:"Redo",previousStep:"Previous Step",nextStep:"Next Step",delete:"Delete",zoomIn:"Zoom In",zoomOut:"Zoom Out",fitView:"Fit View",minimap:"Minimap",newChain:"New Rule Chain",export:"Export",import:"Import",canvasActions:"Canvas Actions",selectChain:"Select Rule Chain",info:"Info",run:"Run",aiChat:"AI Assistant",debugConsole:"Debug Panel",clearDebugHighlight:"Clear Debug Highlight",selection:"Box Select",closeSelection:"Close Box Select",selectionUnavailable:"Box select plugin is unavailable",componentManage:"Component Manage",switchLang:"中文",switchTheme:"Theme",searchNode:"Search",deploy:"Deploy",undeploy:"Undeploy",deleteChain:"Delete",reload:"Reload",runHistory:"Run History",autoLayout:"Auto Layout",trace:"Trace",resetZoom:"Reset Zoom",validate:"Validate Rule Chain",debugOn:"Enable Debug",debugOff:"Disable Debug",viewData:"View Data",settings:"Settings",fullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",zoomOptions:"Zoom Options",saving:"⏳ Saving...",saved:"✅ Saved",failed:"❌ Failed",timeout:"Timed out",invalidJsonCannotSave:`⛔ Rule-chain data is invalid and cannot be saved:
|
|
117
|
+
3. 日志尚未过期`,noDebugLogs:"暂无调试日志记录",enableDebugHint:"请先发送消息到规则链并开启调试模式",loadFailedManual:"加载失败,请手动输入消息 ID",noNodes:"当前规则链无节点",queryingChainLogs:"正在查询规则链日志...",queryingNodes:"查询节点 {{start}}~{{end}} / {{total}}..."},debugConsole:{title:"调试控制台",clear:"清除"},aiProvider:{gitee_ai:"Gitee AI",deepseek:"DeepSeek",qwen:"通义千问",zhipu:"智谱 AI",openai:"OpenAI",ollama:"Ollama (本地)"},customNode:{onlyRightAnchorOut:"只允许从右边的锚点连出",inputSingleOutput:"Input节点只能允许引出一条边",externalCannotConnectGroupChild:"外部节点不允许连接组内节点",onlyLeftAnchorIn:"只允许从左边锚点连入",agentOnlyRightOrBottomOut:"只允许从右边和底部的锚点连出",agentOrchestrationLabel:"智能体编排",agentOrchestrationOnlyRightOrBottomOut:"智能体编排节点只能从右侧或底部锚点连出",agentOrchestrationOnlyLeftIn:"智能体编排节点只能从左侧锚点连入",anchorLlm:"大模型",anchorTool:"工具",anchorMemory:"记忆",anchorKnowledge:"知识库"},groupNode:{onlyRightAnchorOut:"只允许从右边的锚点连出",notToInput:"禁止连到输入类节点",onlyLeftAnchorIn:"只允许从左边锚点连入"},importExport:{exportTitle:"导出规则链",importTitle:"导入规则链",exportTab:"导出",importTab:"导入",nodes:"节点",edges:"连线",size:"大小",name:"名称",fileLoaded:"文件已加载,点击重新选择",dropHint:"拖拽 JSON 文件到此处,或点击选择文件",invalidRuleChainJson:"JSON 格式不符合 RuleGo 规则链规范(缺少 ruleChain 或 metadata 字段)",jsonParseFailed:"JSON 解析失败: {{message}}",selectJsonFile:"请选择 .json 文件",copied:"已复制到剪贴板",downloaded:"已下载: {{fileName}}",noImportData:"没有可导入的数据",importSuccess:"规则链导入成功",downloadFile:"下载文件",confirmImport:"确认导入"},workflowList:{title:"工作流列表",searchPlaceholder:"搜索工作流...",create:"新建",createTitle:"新建工作流",createAndOpen:"创建并打开",defaultName:"新工作流",id:"ID",idPlaceholder:"规则链 ID,不可包含 /、\\ 或 .",idInvalid:"ID 不能为空,且不能包含 /、\\ 或 .",namePlaceholder:"输入工作流名称",descriptionPlaceholder:"可选描述",chainType:"规则链类型",rootChain:"主链",subChain:"子链",debugMode:"调试模式",debugModeHint:"开启后便于调试规则链执行过程",category:"分类",categoryPlaceholder:"可选分类,如 IoT / AI / 数据同步",initialStatus:"初始状态",initialStopped:"停用",initialRunning:"运行",openAfterCreate:"创建后进入编辑器",updateTime:"更新时间",more:"更多操作",rowHint:"单击查看信息,双击进入设计",empty:"暂无工作流",createFirst:"创建第一个工作流",design:"设计",info:"信息",logs:"日志",online:"已上线",offline:"已下线",onlineAction:"上线",offlineAction:"下线",confirmDelete:"确定删除工作流「{{name}}」吗?此操作不可恢复。",operateFailed:"操作失败",copyFailed:"复制失败",deleteFailed:"删除失败",createFailed:"创建失败"},dataView:{title:"规则链数据",copyJson:"复制",downloadJson:"下载",copied:"JSON 已复制到剪贴板",copyFailed:"复制失败",downloaded:"已下载 {{fileName}}",downloadFailed:"下载失败"},validation:{title:"规则链校验",revalidate:"重新校验",validate:"校验",clearResults:"清除结果",close:"关闭",all:"全部",validating:"正在校验...",empty:"无校验结果,请点击校验按钮开始",noFilteredResults:"当前筛选无结果"},ruleChainSettings:{title:"规则链设置",nameRequired:"规则链名称不能为空",namePlaceholder:"请输入规则链名称",descriptionPlaceholder:"请输入规则链描述",root:"根链",additionalInfo:"额外配置 (JSON)"},debugPanel:{sendMessage:"发送消息",debugLogs:"调试日志",runLogs:"运行日志",chainId:"规则链 ID",msgType:"消息类型",msgTypePlaceholder:"如 TEST_MSG",msgBodyJson:"消息体 (JSON)",sending:"发送中...",sendTestMessage:"发送测试消息",responseData:"响应数据",nodeLabel:"节点",loading:"加载中...",refresh:"刷新",noDebugLogs:"暂无调试日志",debugModeHint:'需要在节点上开启"调试模式"并发送消息',time:"时间",type:"类型",relation:"关系",operate:"操作",data:"数据",metadata:"元数据",error:"错误",noRunLogs:"暂无运行日志",runLogDetail:"日志详情",selectChainFirst:"请先选择规则链",noSendCallback:"未配置发送消息回调",invalidJson:"消息体 JSON 格式错误",sendSuccess:"消息发送成功",sendFailed:"发送失败: {{message}}",unknownError:"未知错误",sendException:"发送异常: {{message}}",loadDebugLogsFailed:"加载调试日志失败",loadRunLogsFailed:"加载运行日志失败",copied:"已复制",copyFailed:"复制失败"},searchPanel:{placeholder:"搜索节点名称、类型或 ID...",resultCount:"{{count}} 个结果",matchCount:"{{count}} 个匹配",noMatch:"无匹配",empty:"没有找到匹配的节点"},workflowInfo:{noData:"请选择一个工作流查看详情",baseInfo:"基础信息",varsSecrets:"变量与秘钥",integration:"应用集成",maintenance:"维护验证",online:"已上线",offline:"已下线",saveBaseInfo:"保存基础信息",saveVars:"保存变量",saveSecrets:"保存秘钥",saving:"保存中...",vars:"变量",secrets:"秘钥",varName:"变量名",varValue:"变量值",secretName:"秘钥名",secretValue:"秘钥值",apiIntegration:"API 集成",executeAPI:"执行 API:",notifyAPI:"通知 API:",webSocket:"WebSocket",debugWS:"Debug WS:",runtimeWS:"Runtime WS:",endpointWS:"Endpoint WS:",mcpIntegration:"MCP 集成",mcpSSE:"MCP SSE:",action:"操作",add:"添加",delete:"删除",saveFailed:"保存失败"},maintenance:{title:"维护验证",noApi:"当前请求适配器未提供维护接口",noIssues:"未返回问题",validating:"校验中...",runValidate:"运行校验",schemaDiff:"结构差异",repairPlan:"修复建议",patchPreview:"补丁预览",validateResult:"校验结果",valid:"通过",invalid:"未通过"},logViewer:{title:"调试控制台 (Debug Console)",empty:"暂无调试日志"},copilot:{placeholder:"问点什么...",send:"发送",userRole:"用户",assistantRole:"助手"},aiProperties:{modelSelector:"大模型算子选择",loading:"大模型引擎加载中...",fallback:"AI 服务暂时不可用,您的规则链将以普通降级模式运行。",selectPlaceholder:"-- 请选择大模型 --",empty:"后台暂未返回可用模型,请检查 AI 接口配置。"}},components:{"start-node":"输入",delay:"延迟",exec:"命令行",fetchNodeOutput:"取回节点输出",functions:"函数",log:"日志","x/python":"Python脚本",break:"中断",comment:"注释",end:"结束",for:"循环",fork:"并行分支",groupAction:"节点组",inclusive:"包容分支",join:"合并",ref:"节点引用",switch:"条件分支",while:"While循环",iterator:"迭代器",exprFilter:"表达式过滤",fieldFilter:"字段过滤",groupFilter:"过滤器组",jsFilter:"js过滤",jsSwitch:"js路由",msgTypeSwitch:"消息路由","x/luaFilter":"Lua脚本过滤",exprTransform:"表达式转换",jsTransform:"js转换",metadataTransform:"元数据转换","text/template":"模板转换","x/luaTransform":"Lua脚本转换",cacheDelete:"缓存删除",cacheGet:"缓存获取",cacheSet:"缓存设置",dbClient:"数据库",mqttClient:"MQTT发布者",net:"TCP/UDP",sendEmail:"发邮件",ssh:"SSH",restApiCall:"HTTP客户端","x/receiveEmail":"收邮件","x/fileDelete":"文件删除","x/fileList":"文件列表","x/fileRead":"文件读取","x/fileWrite":"文件写入","x/grpcClient":"gRPC 客户端","x/kafkaProducer":"Kafka发布者","x/mongodbClient":"MongoDB","x/natsClient":"NATS","x/nsqClient":"NSQ发布者","x/opengeminiQuery":"opengemini读","x/opengeminiWrite":"opengemini写","x/otel":"OpenTelemetry","x/pulsarClient":"Pulsar发布者","x/rabbitmqClient":"RabbitMQ","x/redisClient":"Redis","x/redisPub":"Redis发布者","x/wukongimSender":"WuKongIM发","x/beanstalkdWorker":"Beanstalkd Worker","x/beanstalkdTube":"Beanstalkd Tube","x/jsonQuery":"JSON查询","x/odooCrudCreate":"Odoo创建","x/odooCrudUpdate":"Odoo更新","x/soapParse":"SOAP解析","x/soapRequest":"SOAP请求",flow:"子规则链",simple_admission:"极简录取规则链",temperature_conversion:"温度转换","ai/llm":"AI文本生成","ai/createImage":"图像生成","ai/agent":"智能体","ai/intent":"意图识别","ai/localIntent":"本地意图识别","ai/mcpClient":"MCP 客户端","ai/transform/documentLoader":"文档加载器","ai/transform/textChunker":"文本分块","ai/embedding/openai":"OpenAI Embedding","ai/indexer/milvus":"Milvus索引","ai/indexer/redis":"Redis索引","ai/retriever/milvus":"Milvus检索","ai/retriever/redis":"Redis检索","ci/exec":"命令行","ci/gitClone":"Git拉取","ci/gitCommit":"Git提交","ci/gitCreateTag":"Git创建标签","ci/gitLog":"获取Git日志","ci/gitPush":"Git推送","ci/ps":"服务器指标","x/modbus":"Modbus","x/opcua":"OPC_UA订阅","x/opcuaRead":"OPC UA读取","x/opcuaWrite":"OPC UA写入","x/serialControl":"串口控制","x/serialIn":"串口输入","x/serialOut":"串口输出","x/serialRequest":"串口请求","x/streamAggregator":"流聚合器","x/streamTransform":"流转换器","endpoint/http":"HTTP","endpoint/ws":"Websocket","endpoint/ws_client":"Websocket客户端","endpoint/mqtt":"MQTT","endpoint/kafka":"Kafka","endpoint/nats":"Nats","endpoint/nsq":"NSQ","endpoint/pulsar":"Pulsar","endpoint/rabbitmq":"RabbitMQ","endpoint/redis":"Redis","endpoint/redis/stream":"Redis流","endpoint/net":"TCP/UDP","endpoint/net_client":"TCP/UDP客户端","endpoint/schedule":"定时调度","endpoint/grpc/stream":"gRPC流客户端","endpoint/wukongim":"WuKongIM收","endpoint/mcpServer":"MCP服务器","endpoint/beanstalkdTubeset":"Beanstalkd","endpoint/mysql_cdc":"MYSQL CDC","endpoint/opcua":"OPC_UA订阅"},fields:{jsScript:"JS脚本",script:"脚本",expr:"表达式",template:"模板",server:"服务器地址",username:"用户名",password:"密码",topic:"主题",key:"键",headers:"请求头",host:"主机地址",port:"端口",cmd:"命令",timeout:"超时时间(秒)",targetId:"目标ID",periodInSeconds:"延迟时间(秒)",maxPendingMsgs:"最大待处理消息数",periodInSecondsPattern:"延迟时间表达式(秒)",functionName:"函数名称",args:"参数列表",targetNodeId:"目标节点ID",range:"遍历范围",do:"执行动作",allMatches:"全部匹配",nodeIds:"节点ID列表",checkAllKeys:"检查所有键",dataNames:"数据字段名",metadataNames:"元数据字段名",mapping:"字段映射",isNew:"替换全部元数据",restEndpointUrlPattern:"HTTP URL地址",requestMethod:"请求方法",readTimeoutMs:"超时(毫秒)",maxParallelRequestsCount:"最大并发数",enableProxy:"开启代理",proxyScheme:"代理协议",proxyHost:"代理主机",proxyPort:"代理端口",driverName:"数据库驱动",dsn:"数据源名称(DSN)",sql:"SQL语句",params:"参数列表",getOne:"返回一条记录",poolSize:"连接池大小",protocol:"协议",connectTimeout:"连接超时(秒)",heartbeatInterval:"心跳间隔(秒)",maxReconnectInterval:"重连间隔(秒)",qOS:"QOS",smtpHost:"SMTP主机",smtpPort:"SMTP端口",fromEmail:"发送邮箱",toEmail:"收件邮箱",ccEmail:"抄送邮箱",bccEmail:"密送邮箱",path:"文件路径",content:"内容",append:"追加写入",recursive:"递归查找",dataType:"数据类型",exchange:"交换机",exchangeType:"交换机类型",durable:"持久化",autoDelete:"自动删除",channel:"频道",partition:"分区编号",database:"数据库名",collection:"集合名",opType:"操作类型",filter:"查询条件",doc:"文档内容",one:"仅返回一条",db:"数据库编号",service:"服务名",method:"方法名",request:"请求体",url:"API地址",model:"模型名称",systemPrompt:"系统提示词",messages:"消息列表",images:"图片列表",prompt:"提示词",n:"生成数量",size:"尺寸",quality:"质量",style:"风格",response_format:"返回格式",repository:"仓库地址",directory:"目录",reference:"分支/标签",authType:"认证方式",authUser:"认证用户名",authPassword:"认证密码/Token",pattern:"匹配模式",message:"消息",tag:"标签名",limit:"数量限制",startTime:"开始时间",endTime:"结束时间",refSpecs:"引用规范",options:"选项",unitId:"单元ID",address:"寄存器地址",quantity:"寄存器数量",value:"值",regType:"寄存器类型",policy:"安全策略",mode:"安全模式",auth:"认证方式",baudRate:"波特率",dataBits:"数据位",stopBits:"停止位",parity:"校验位",dtr:"DTR",rts:"RTS",action:"控制动作",splitType:"分割方式",splitKey:"分割标记",data:"数据",addChar:"附加字符",requestTimeout:"请求超时(毫秒)",metricExpr:"指标表达式",metrics:"指标列表",extend:"继承父链上下文",uID:"用户ID",token:"认证Token",channelType:"频道类型",channelID:"频道ID"},category:{filter:"过滤器",transform:"转换器",action:"动作",external:"外部集成",flow:"子规则链",common:"公共",custom:"自定义",ai:"AI",ci:"CI/CD",iot:"IoT",stats:"流式计算",endpoint:"输入端",endpoints:"输入端",storage:"存储",knowledge:"知识库",image:"图像",audio:"音频",file:"文件",other:"其他"},relationTypes:{Success:"成功",Failure:"失败",True:"真",False:"假",Default:"Default",Stream:"流式",NotFound:"未找到"},validation:{orphanNode:'节点 "{{name}}" 是孤立的, 没有任何连接',startNoConnection:"起始节点 (Input) 没有连接到任何节点",missingRelationType:"连接缺少关系类型",missingNodeType:'节点 "{{name}}" 缺少类型定义',cyclicConnection:"检测到循环连接",duplicateNodeId:"存在重复的节点ID"},action:{saveSuccess:"规则链保存成功",saveFailed:"保存失败: {{error}}",deleteSuccess:"删除成功",loadFailed:"加载失败: {{error}}",exportSuccess:"导出成功",importSuccess:"导入成功",importFailed:"导入失败: 数据格式错误",undoSuccess:"已撤销: {{description}}",redoSuccess:"已重做: {{description}}",noUndoAvailable:"没有可撤销的操作",noRedoAvailable:"没有可重做的操作"}},rb={Input:"Input","Input node already exists":"Only one input node can exist","At least one input node is required":"At least one input endpoint or default input node is required",toolbar:{save:"Save",undo:"Undo",redo:"Redo",delete:"Delete Selected",zoomIn:"Zoom In",zoomOut:"Zoom Out",fitView:"Fit View",fullscreen:"Fullscreen",autoLayout:"Auto Layout"},sidebar:{searchPlaceholder:"Search components...",noResults:"No matching components"},panel:{title:"Edit Properties",nodeName:"Node Name"},contextMenu:{edit:"Edit",editProperties:"Edit Properties",copy:"Copy",delete:"Delete",selectAll:"Select All",fitView:"Fit View",paste:"Paste",disconnect:"Disconnect",resetZoom:"Reset Zoom",runFromNode:"Run From This Node",runSingleNode:"Run This Node Only"},editor:{toolbar:{save:"Save",undo:"Undo",redo:"Redo",previousStep:"Previous Step",nextStep:"Next Step",delete:"Delete",zoomIn:"Zoom In",zoomOut:"Zoom Out",fitView:"Fit View",minimap:"Minimap",newChain:"New Rule Chain",export:"Export",import:"Import",canvasActions:"Canvas Actions",selectChain:"Select Rule Chain",info:"Info",run:"Run",aiChat:"AI Assistant",debugConsole:"Debug Panel",clearDebugHighlight:"Clear Debug Highlight",selection:"Box Select",closeSelection:"Close Box Select",selectionUnavailable:"Box select plugin is unavailable",componentManage:"Component Manage",switchLang:"中文",switchTheme:"Theme",searchNode:"Search",deploy:"Deploy",undeploy:"Undeploy",deleteChain:"Delete",reload:"Reload",runHistory:"Run History",autoLayout:"Auto Layout",trace:"Trace",resetZoom:"Reset Zoom",validate:"Validate Rule Chain",debugOn:"Enable Debug",debugOff:"Disable Debug",viewData:"View Data",settings:"Settings",fullscreen:"Fullscreen",exitFullscreen:"Exit Fullscreen",zoomOptions:"Zoom Options",saving:"⏳ Saving...",saved:"✅ Saved",failed:"❌ Failed",timeout:"Timed out",invalidJsonCannotSave:`⛔ Rule-chain data is invalid and cannot be saved:
|
|
118
118
|
|
|
119
119
|
{{error}}`,validationFailedCannotSave:`Rule-chain validation failed and cannot be saved:
|
|
120
120
|
|
|
@@ -123,7 +123,7 @@ function print() { __p += __j.call(arguments, '') }
|
|
|
123
123
|
Check:
|
|
124
124
|
1. The message was processed by this rule chain
|
|
125
125
|
2. Debug mode is enabled
|
|
126
|
-
3. Logs have not expired`,noDebugLogs:"No debug logs",enableDebugHint:"Send a message to the rule chain and enable debug mode first",loadFailedManual:"Load failed. Enter a message ID manually",noNodes:"The current rule chain has no nodes",queryingChainLogs:"Querying rule-chain logs...",queryingNodes:"Querying nodes {{start}}~{{end}} / {{total}}..."},debugConsole:{title:"Debug Console",clear:"Clear"},aiProvider:{gitee_ai:"Gitee AI",deepseek:"DeepSeek",qwen:"Tongyi Qianwen",zhipu:"Zhipu AI",openai:"OpenAI",ollama:"Ollama (Local)"},customNode:{onlyRightAnchorOut:"Only the right anchor can connect out",inputSingleOutput:"Input can only connect to one outgoing edge",externalCannotConnectGroupChild:"External nodes cannot connect to nodes inside a group",onlyLeftAnchorIn:"Only the left anchor can connect in",agentOnlyRightOrBottomOut:"Only right and bottom anchors can connect out",agentOrchestrationLabel:"Agent Orchestration",agentOrchestrationOnlyRightOrBottomOut:"Agent orchestration can only connect out from the right or bottom anchors",agentOrchestrationOnlyLeftIn:"Agent orchestration can only connect in from the left anchor",anchorLlm:"LLM",anchorTool:"Tools",anchorMemory:"Memory",anchorKnowledge:"Knowledge"},groupNode:{onlyRightAnchorOut:"Only the right anchor can connect out",notToInput:"Cannot connect to input nodes",onlyLeftAnchorIn:"Only the left anchor can connect in"},importExport:{exportTitle:"Export Rule Chain",importTitle:"Import Rule Chain",exportTab:"Export",importTab:"Import",nodes:"Nodes",edges:"Edges",size:"Size",name:"Name",fileLoaded:"File loaded. Click to choose again",dropHint:"Drop a JSON file here, or click to choose one",invalidRuleChainJson:"Invalid RuleGo rule-chain JSON: missing ruleChain or metadata",jsonParseFailed:"JSON parse failed: {{message}}",selectJsonFile:"Choose a .json file",copied:"Copied to clipboard",downloaded:"Downloaded: {{fileName}}",noImportData:"No data to import",importSuccess:"Rule chain imported",downloadFile:"Download File",confirmImport:"Confirm Import"},workflowList:{title:"Workflow List",searchPlaceholder:"Search workflows...",create:"New",createTitle:"New Workflow",defaultName:"New Workflow",namePlaceholder:"Enter workflow name",descriptionPlaceholder:"Optional description",empty:"No workflows",createFirst:"Create first workflow",design:"Design",info:"Info",logs:"Logs",online:"Online",offline:"Offline",onlineAction:"Start",offlineAction:"Stop",confirmDelete:'Delete workflow "{{name}}"? This action cannot be undone.',operateFailed:"Operation failed",copyFailed:"Copy failed",deleteFailed:"Delete failed",createFailed:"Create failed"},dataView:{title:"Rule Chain Data",copyJson:"Copy",downloadJson:"Download",copied:"JSON copied to clipboard",copyFailed:"Copy failed",downloaded:"Downloaded {{fileName}}",downloadFailed:"Download failed"},validation:{title:"Rule Chain Validation",revalidate:"Revalidate",validate:"Validate",clearResults:"Clear results",close:"Close",all:"All",validating:"Validating...",empty:"No validation results. Click Validate to start.",noFilteredResults:"No results for the current filter"},ruleChainSettings:{title:"Rule Chain Settings",nameRequired:"Rule chain name is required",namePlaceholder:"Enter rule chain name",descriptionPlaceholder:"Enter rule chain description",root:"Root Chain",additionalInfo:"Additional Info (JSON)"},debugPanel:{sendMessage:"Send Message",debugLogs:"Debug Logs",runLogs:"Run Logs",chainId:"Rule Chain ID",msgType:"Message Type",msgTypePlaceholder:"e.g. TEST_MSG",msgBodyJson:"Message Body (JSON)",sending:"Sending...",sendTestMessage:"Send Test Message",responseData:"Response Data",nodeLabel:"Node",loading:"Loading...",refresh:"Refresh",noDebugLogs:"No debug logs",debugModeHint:"Enable Debug Mode on the node and send a message first",time:"Time",type:"Type",relation:"Relation",operate:"Actions",data:"Data",metadata:"Metadata",error:"Error",noRunLogs:"No run logs",runLogDetail:"Run Log Details",selectChainFirst:"Select a rule chain first",noSendCallback:"Send message callback is not configured",invalidJson:"Message body JSON is invalid",sendSuccess:"Message sent successfully",sendFailed:"Send failed: {{message}}",unknownError:"Unknown error",sendException:"Send exception: {{message}}",loadDebugLogsFailed:"Failed to load debug logs",loadRunLogsFailed:"Failed to load run logs",copied:"Copied",copyFailed:"Copy failed"},searchPanel:{placeholder:"Search node name, type, or ID...",resultCount:"{{count}} result(s)",matchCount:"{{count}} match(es)",noMatch:"No matches",empty:"No matching nodes found"},workflowInfo:{noData:"Select a workflow to view details",baseInfo:"Basic Info",varsSecrets:"Variables & Secrets",integration:"App Integration",maintenance:"Maintenance",online:"Online",offline:"Offline",saveBaseInfo:"Save Basic Info",saveVars:"Save Variables",saveSecrets:"Save Secrets",saving:"Saving...",vars:"Variables",secrets:"Secrets",varName:"Variable Name",varValue:"Variable Value",secretName:"Secret Name",secretValue:"Secret Value",apiIntegration:"API Integration",executeAPI:"Execute API:",notifyAPI:"Notify API:",webSocket:"WebSocket",debugWS:"Debug WS:",runtimeWS:"Runtime WS:",endpointWS:"Endpoint WS:",mcpIntegration:"MCP Integration",mcpSSE:"MCP SSE:",action:"Actions",add:"Add",delete:"Delete",saveFailed:"Save failed"},maintenance:{title:"Maintenance",noApi:"The current request adapter does not provide maintenance APIs",noIssues:"No issues returned",validating:"Validating...",runValidate:"Run Validation",schemaDiff:"Schema Diff",repairPlan:"Repair Plan",patchPreview:"Patch Preview",validateResult:"Validation Result",valid:"Passed",invalid:"Failed"},logViewer:{title:"Debug Console",empty:"No debug logs"},copilot:{placeholder:"Ask something...",send:"Send",userRole:"User",assistantRole:"Assistant"},aiProperties:{modelSelector:"LLM Operator",loading:"Loading LLM engine...",fallback:"AI service is temporarily unavailable. This rule chain will run in normal fallback mode.",selectPlaceholder:"-- Select LLM --",empty:"The backend did not return any available models. Check the AI API configuration."}},components:{"start-node":"Input",delay:"Delay",exec:"Exec Command",fetchNodeOutput:"Fetch Node Output",functions:"Functions",log:"Log","x/python":"Python Script",break:"Break",comment:"Comment",end:"End",for:"For Loop",fork:"Fork",groupAction:"Group Action",inclusive:"Inclusive Gateway",join:"Join",ref:"Reference Node",switch:"Switch",while:"While Loop",iterator:"Iterator",exprFilter:"Expr Filter",fieldFilter:"Field Filter",groupFilter:"Group Filter",jsFilter:"JS Filter",jsSwitch:"JS Switch",msgTypeSwitch:"Msg Type Switch","x/luaFilter":"Lua Filter",exprTransform:"Expr Transform",jsTransform:"JS Transform",metadataTransform:"Metadata Transform","text/template":"Template Transform","x/luaTransform":"Lua Transform",cacheDelete:"Cache Delete",cacheGet:"Cache Get",cacheSet:"Cache Set",dbClient:"Database",mqttClient:"MQTT",net:"TCP/UDP",sendEmail:"Send Email",ssh:"SSH","x/receiveEmail":"Receive Email",restApiCall:"REST API Call","x/fileDelete":"File Delete","x/fileList":"File List","x/fileRead":"File Read","x/fileWrite":"File Write","x/grpcClient":"gRPC Client","x/kafkaProducer":"Kafka","x/mongodbClient":"MongoDB","x/natsClient":"NATS","x/nsqClient":"NSQ","x/opengeminiQuery":"OpenGemini Query","x/opengeminiWrite":"OpenGemini Write","x/otel":"OpenTelemetry","x/pulsarClient":"Pulsar","x/rabbitmqClient":"RabbitMQ","x/redisClient":"Redis","x/redisPub":"Redis Pub","x/wukongimSender":"WuKong IM","x/beanstalkdWorker":"Beanstalkd Worker","x/beanstalkdTube":"Beanstalkd Tube","x/jsonQuery":"JSON Query","x/odooCrudCreate":"Odoo Create","x/odooCrudUpdate":"Odoo Update","x/soapParse":"SOAP Parse","x/soapRequest":"SOAP Request",flow:"Sub Rule Chain",simple_admission:"Simple Admission",temperature_conversion:"Temperature Conversion","ai/llm":"AI LLM","ai/createImage":"AI Image","ai/agent":"Agent","ai/intent":"Intent Recognition","ai/localIntent":"Local Intent Recognition","ai/mcpClient":"MCP Client","ai/transform/documentLoader":"Document Loader","ai/transform/textChunker":"Text Chunker","ai/embedding/openai":"OpenAI Embedding","ai/indexer/milvus":"Milvus Indexer","ai/indexer/redis":"Redis Indexer","ai/retriever/milvus":"Milvus Retriever","ai/retriever/redis":"Redis Retriever","ci/exec":"Command Line","ci/gitClone":"Git Clone","ci/gitCommit":"Git Commit","ci/gitCreateTag":"Git Create Tag","ci/gitLog":"Git Log","ci/gitPush":"Git Push","ci/ps":"Server Metrics","x/opcua":"OPC UA Subscribe","x/modbus":"Modbus","x/opcuaRead":"OPC UA Read","x/opcuaWrite":"OPC UA Write","x/serialControl":"Serial Control","x/serialIn":"Serial Input","x/serialOut":"Serial Output","x/serialRequest":"Serial Request","x/streamAggregator":"Stream Aggregator","x/streamTransform":"Stream Transform","endpoint/http":"HTTP Server","endpoint/ws":"WebSocket","endpoint/ws_client":"WebSocket Client","endpoint/mqtt":"MQTT Subscribe","endpoint/kafka":"Kafka Consumer","endpoint/nats":"NATS Subscribe","endpoint/nsq":"NSQ Consumer","endpoint/pulsar":"Pulsar Consumer","endpoint/rabbitmq":"RabbitMQ Consumer","endpoint/redis":"Redis Subscribe","endpoint/redis/stream":"Redis Stream","endpoint/net":"TCP/UDP Server","endpoint/net_client":"TCP/UDP Client","endpoint/schedule":"Scheduler","endpoint/grpc/stream":"gRPC Stream","endpoint/wukongim":"WuKong IM Receiver","endpoint/mcpServer":"MCP Server","endpoint/beanstalkdTubeset":"Beanstalkd","endpoint/mysql_cdc":"MySQL CDC","endpoint/opcua":"OPC UA Server"},fields:{jsScript:"JS Script",script:"Script",expr:"Expression",template:"Template",server:"Server",username:"Username",password:"Password",topic:"Topic",key:"Key",headers:"Headers",host:"Host",port:"Port",cmd:"Command",timeout:"Timeout (sec)",targetId:"Target ID",periodInSeconds:"Period (sec)",maxPendingMsgs:"Max Pending Messages",periodInSecondsPattern:"Period Expression (sec)",functionName:"Function Name",args:"Arguments",targetNodeId:"Target Node ID",range:"Iteration Range",do:"Action",allMatches:"All Must Match",nodeIds:"Node IDs",checkAllKeys:"Check All Keys",dataNames:"Data Field Names",metadataNames:"Metadata Field Names",mapping:"Field Mapping",isNew:"Replace All Metadata",restEndpointUrlPattern:"Endpoint URL",requestMethod:"Method",readTimeoutMs:"Timeout (ms)",maxParallelRequestsCount:"Max Concurrency",enableProxy:"Enable Proxy",proxyScheme:"Proxy Scheme",proxyHost:"Proxy Host",proxyPort:"Proxy Port",driverName:"Driver",dsn:"DSN",sql:"SQL",params:"Parameters",getOne:"Return One Record",poolSize:"Pool Size",protocol:"Protocol",connectTimeout:"Connect Timeout (sec)",heartbeatInterval:"Heartbeat Interval (sec)",maxReconnectInterval:"Max Reconnect Interval (sec)",qOS:"QoS",smtpHost:"SMTP Host",smtpPort:"SMTP Port",fromEmail:"From Email",toEmail:"To Email",ccEmail:"CC Email",bccEmail:"BCC Email",path:"File Path",content:"Content",append:"Append",recursive:"Recursive",dataType:"Data Type",exchange:"Exchange",exchangeType:"Exchange Type",durable:"Durable",autoDelete:"Auto Delete",channel:"Channel",partition:"Partition",database:"Database",collection:"Collection",opType:"Operation Type",filter:"Filter",doc:"Document",one:"Return One",db:"DB Number",service:"Service",method:"Method",request:"Request Body",url:"API URL",model:"Model Name",systemPrompt:"System Prompt",messages:"Messages",images:"Images",prompt:"Prompt",n:"Count",size:"Size",quality:"Quality",style:"Style",response_format:"Response Format",repository:"Repository URL",directory:"Directory",reference:"Branch/Tag",authType:"Auth Type",authUser:"Auth User",authPassword:"Auth Password/Token",pattern:"Pattern",message:"Message",tag:"Tag",limit:"Limit",startTime:"Start Time",endTime:"End Time",refSpecs:"Ref Specs",options:"Options",unitId:"Unit ID",address:"Register Address",quantity:"Register Quantity",value:"Value",regType:"Register Type",policy:"Security Policy",mode:"Security Mode",auth:"Auth",baudRate:"Baud Rate",dataBits:"Data Bits",stopBits:"Stop Bits",parity:"Parity",dtr:"DTR",rts:"RTS",action:"Action",splitType:"Split Type",splitKey:"Split Key",data:"Data",addChar:"Append Char",requestTimeout:"Request Timeout (ms)",metricExpr:"Metric Expression",metrics:"Metrics",extend:"Extend Parent Context",uID:"User ID",token:"Auth Token",channelType:"Channel Type",channelID:"Channel ID"},category:{filter:"Filter",transform:"Transform",action:"Action",external:"External",flow:"Flow",common:"Common",custom:"Custom",ai:"AI",ci:"CI/CD",iot:"IoT",stats:"Stream Computing",endpoint:"Endpoint",endpoints:"Endpoint",storage:"Storage",knowledge:"Knowledge",image:"Image",audio:"Audio",file:"File",other:"Other"},relationTypes:{Success:"Success",Failure:"Failure",True:"True",False:"False",Default:"Default",Stream:"Stream",NotFound:"Not Found"},validation:{orphanNode:'Node "{{name}}" is orphaned with no connections',startNoConnection:"Start node (Input) has no connections",missingRelationType:"Connection is missing relation type",missingNodeType:'Node "{{name}}" is missing type definition',cyclicConnection:"Cyclic connection detected",duplicateNodeId:"Duplicate node ID found"},action:{saveSuccess:"Rule chain saved successfully",saveFailed:"Save failed: {{error}}",deleteSuccess:"Deleted successfully",loadFailed:"Load failed: {{error}}",exportSuccess:"Exported successfully",importSuccess:"Imported successfully",importFailed:"Import failed: invalid data format",undoSuccess:"Undone: {{description}}",redoSuccess:"Redone: {{description}}",noUndoAvailable:"Nothing to undo",noRedoAvailable:"Nothing to redo"}},K7={startNodeId:"$node_start_input",nodeCount:0,edgeCount:0,nodeWidth:100,relationTypeSplit:"/"},eee={isReady:!1,isDirty:!1,isLoading:!1,selectedNode:null,selectedEdge:null,ruleChain:null,nodeComponents:{},componentGroups:[],currentNodeView:null,currentNodeModel:{},currentEdgeModel:{},canUndo:!1,canRedo:!1};class rA{constructor(e){this.lfInstance=null,this.plugins=[],this.initialized=!1,this.disposeLocaleChange=null,this.options=e,this.internalData={...K7},this.store=new Ks({...eee}),this.eventBus=new Gx,this.dataAdapter=new EC,this.componentRegistry=new VC({adapter:e.adapterComponents}),this.history=new FC({maxHistory:e.maxHistory??50}),this.validation=new tb,this.validation.registerBuiltinRules(),this.theme=new $C,this.i18n=new ab({locale:e.locale??"zh-CN",fallback:"en-US"}),this.i18n.register("zh-CN",nb),this.i18n.register("en-US",rb),this.disposeLocaleChange=this.i18n.onLocaleChange(()=>{this.syncComponentState()}),this.loadComponents(e.components??tA),e.plugins&&e.plugins.forEach(i=>this.use(i))}init(e){if(this.initialized){console.warn("[EditorCore] 编辑器已初始化, 请勿重复调用");return}if(this.lfInstance=e,this.options.features||(this.options.features={}),this.componentRegistry.hasCategory("ai")||(this.options.features.aiCopilot=!1),e)try{nA(e)}catch(a){console.error("[EditorCore] 自定义节点注册失败:",a)}const i=this.options.theme??"light";this.theme.setTheme(i),this.plugins.forEach(a=>{if(a.onInit)try{a.onInit(this)}catch(n){console.error(`[EditorCore] 插件 "${a.name}" 初始化出错:`,n)}}),this.store.setState({isReady:!0}),this.initialized=!0,this.eventBus.emit("editor:ready")}destroy(){var e;this.plugins.forEach(i=>{if(i.onDestroy)try{i.onDestroy(this)}catch(a){console.error(`[EditorCore] 插件 "${i.name}" 销毁出错:`,a)}}),this.store.destroy(),this.eventBus.destroy(),this.history.destroy(),this.theme.destroy(),(e=this.disposeLocaleChange)==null||e.call(this),this.disposeLocaleChange=null,this.i18n.destroy(),this.validation.clear(),this.componentRegistry.clear(),this.plugins=[],this.lfInstance=null,this.initialized=!1}loadComponents(e){const i=uu(e);tg(i),this.componentRegistry.clear();const a=this.componentRegistry.loadFromRawData(i);return this.syncComponentState(a)}registerComponents(e,i=!0){return tg(e),this.componentRegistry.registerAll(e,i),this.syncComponentState()}syncComponentState(e=this.componentRegistry.getGroups()){const i=this.localizeComponentGroups(e);return this.store.setState({nodeComponents:this.componentRegistry.getMap(),componentGroups:i}),i}localizeComponentGroups(e){return e.map(i=>({...i,label:ib(this.i18n,`category.${i.category}`,i.label||i.category)}))}loadData(e){this.internalData.nodeCount=0,this.internalData.edgeCount=0,this.store.setState({ruleChain:e.ruleChain,isDirty:!1,selectedNode:null,selectedEdge:null});const i=this.dataAdapter.adapterIn(e,this.componentRegistry.getMap(),this.internalData,{startX:280,startY:280});eg(i,"render"),this.eventBus.emit("editor:data-loaded",{lfData:i,ruleChain:e.ruleChain}),this.history.clear()}exportData(e,i){const a=this.store.getState().ruleChain;if(!a)throw new Error("[EditorCore] 无法导出: 规则链配置为空");return this.dataAdapter.adapterOut(e,a,this.internalData,i)}validateGraph(e){return this.validation.validate(e,{startNodeId:this.internalData.startNodeId})}on(e,i){return this.eventBus.on(e,i)}emit(e,...i){this.eventBus.emit(e,...i)}use(e){if(this.plugins.some(i=>i.name===e.name)){console.warn(`[EditorCore] 插件 "${e.name}" 已安装, 跳过`);return}this.plugins.push(e),this.initialized&&e.onInit&&e.onInit(this)}getInternalData(){return{...this.internalData}}getLfInstance(){return this.lfInstance}getOptions(){return this.options}}const tee=new Set(["fork","switch","inclusive","while","for","groupFilter","groupAction","iterator"]),iee=new Set(["comment"]);function oA(t,e){return!!(t==="group-node"||e!=null&&e.type&&tee.has(e.type))}function aee(t,e){eg(t,"layout");const i={layerGapX:(e==null?void 0:e.layerGapX)??250,nodeGapY:(e==null?void 0:e.nodeGapY)??100,startX:(e==null?void 0:e.startX)??100,startY:(e==null?void 0:e.startY)??200,startNodeId:(e==null?void 0:e.startNodeId)??"$node_start_input",groupNodeHeight:(e==null?void 0:e.groupNodeHeight)??200},{nodes:a,edges:n}=t;if(!a||a.length===0)return t;const r=[],o=[],l=[],s=new Set;a.forEach(y=>{y.type==="group-node"&&Array.isArray(y.children)&&y.children.forEach(x=>s.add(x))}),a.forEach(y=>{var P,D,b;const x=((D=(P=y.properties)==null?void 0:P.model)==null?void 0:D.type)||((b=y.properties)==null?void 0:b.type)||"";iee.has(x)?r.push(y):s.has(y.id)?l.push(y):o.push(y)});const c=new Map;a.forEach(y=>c.set(y.id,{x:y.x,y:y.y}));const d=new Map,I=new Map,g=new Map;o.forEach(y=>{g.set(y.id,y),d.set(y.id,[]),I.set(y.id,0)}),n.forEach(y=>{d.has(y.sourceNodeId)&&g.has(y.targetNodeId)&&(d.get(y.sourceNodeId).push(y.targetNodeId),I.set(y.targetNodeId,(I.get(y.targetNodeId)||0)+1))});const u=[],N=new Set,h=[];g.has(i.startNodeId)&&h.push(i.startNodeId),o.forEach(y=>{y.id!==i.startNodeId&&(I.get(y.id)||0)===0&&h.push(y.id)}),h.length===0&&o.length>0&&h.push(o[0].id);let M=[...h];for(M.forEach(y=>N.add(y));M.length>0;){u.push([...M]);const y=[];M.forEach(x=>{(d.get(x)||[]).forEach(D=>{N.has(D)||(N.add(D),y.push(D))})}),M=y}o.forEach(y=>{N.has(y.id)||(u.length===0&&u.push([]),u[u.length-1].push(y.id),N.add(y.id))});for(let y=1;y<u.length;y++){const x=u[y-1],P=new Map;x.forEach((D,b)=>P.set(D,b)),u[y].sort((D,b)=>{const p=lA(D,n,P),j=lA(b,n,P);return p-j})}let m=i.startX;if(u.forEach((y,x)=>{const P=y.some(j=>{const S=g.get(j);return S?oA(S.type||"",S.properties):!1});if(x>0){const Z=u[x-1].some(z=>{const W=g.get(z);return W?oA(W.type||"",W.properties):!1})||P?i.layerGapX+100:i.layerGapX;m+=Z}const D=P?Math.max(i.nodeGapY,i.groupNodeHeight+20):i.nodeGapY,b=(y.length-1)*D,p=i.startY-b/2;y.forEach((j,S)=>{const Z=g.get(j);Z&&(Z.x=m,Z.y=p+S*D)})}),r.length>0){let y=i.startY;o.forEach(P=>{P.y<y&&(y=P.y)});const x=y-120;r.forEach((P,D)=>{P.x=i.startX+D*300,P.y=x})}return l.length>0&&a.forEach(D=>{if(D.type==="group-node"&&Array.isArray(D.children)){const p=D.children.map(k=>l.find(E=>E.id===k)).filter(Boolean);if(p.length===0)return;const j=120,S=30,z=p.length*S+(p.length-1)*60+50+30,W=Math.max(300,j+30*2+60),R=D.y-z/2+50+S/2;p.forEach((k,E)=>{k.x=D.x,k.y=R+E*(S+60)}),D.properties||(D.properties={}),D.properties.width=W,D.properties.height=Math.max(200,z)}}),nee(a,n,g,i),t}function lA(t,e,i){let a=0,n=0;return e.forEach(r=>{r.targetNodeId===t&&i.has(r.sourceNodeId)&&(a+=i.get(r.sourceNodeId),n++)}),n>0?a/n:1/0}function nee(t,e,i,a){const n=new Map;i.forEach(o=>{const l=`${o.x}_${o.y}`;n.has(l)||n.set(l,[]),n.get(l).push(o)}),n.forEach(o=>{if(o.length>1){const l=o[0].y,s=a.nodeGapY;o.forEach((c,d)=>{c.y=l+(d-(o.length-1)/2)*s})}});const r=new Map;e.forEach(o=>{const l=i.get(o.sourceNodeId),s=i.get(o.targetNodeId);if(!l||!s)return;const c=`h_${l.y}_${s.y}`;r.has(c)||r.set(c,[]),r.get(c).push(o)}),r.forEach(o=>{if(o.length>1){const l=Math.min(a.nodeGapY*.3,20);o.forEach((s,c)=>{if(c===0)return;const d=i.get(s.targetNodeId);d&&(d.y+=l*c)})}})}function ree(t){if(!t||t.length===0)return!1;let e=0;return t.forEach(i=>{const a=i.additionalInfo||{};!a.layoutX&&!a.layoutY&&e++}),e>t.length*.5}const oee=["flow","end","break"];class Zr{static validate(e){var c;const i=[];if(!((c=e==null?void 0:e.metadata)!=null&&c.nodes))return{valid:!0,issues:[],errors:[],warnings:[]};const a=e.metadata.nodes,n=e.metadata.connections||[],r=e.metadata.endpoints||[];if(a.length+r.length>Ue.maxGraphNodes)throw new go("GRAPH_NODES_LIMIT",`validate graph has ${a.length+r.length} nodes, max is ${Ue.maxGraphNodes}`);if(n.length>Ue.maxGraphEdges)throw new go("GRAPH_EDGES_LIMIT",`validate graph has ${n.length} edges, max is ${Ue.maxGraphEdges}`);const o=new Set(a.map(d=>d.id));a.forEach(d=>{Zr._validateNode(d,o,i)}),Zr._validateConnections(n,a,o,i),Zr._validateFirstNode(e,i);const l=i.filter(d=>d.severity==="error"),s=i.filter(d=>d.severity==="warning");return{valid:l.length===0,issues:i,errors:l,warnings:s}}static _validateNode(e,i,a){const n=e.configuration||{},r={nodeId:e.id,nodeName:e.name,nodeType:e.type};switch(e.type){case"switch":case"inclusive":{(!Array.isArray(n.cases)||n.cases.length===0)&&a.push({...r,severity:"warning",message:`${e.type} 节点 "${e.name}" 没有配置任何条件分支 (cases)`,category:"missing_config"});break}case"for":{n.range||a.push({...r,severity:"error",message:`for 节点 "${e.name}" 缺少遍历范围 (range)`,category:"missing_config"}),n.do?Zr._validateNodeRef(n.do,e,"do",i,a):a.push({...r,severity:"error",message:`for 节点 "${e.name}" 缺少循环体目标 (do)`,category:"missing_config"});break}case"while":{n.condition||n.jsScript||a.push({...r,severity:"error",message:`while 节点 "${e.name}" 缺少循环条件 (condition)`,category:"missing_config"}),n.do?Zr._validateNodeRef(n.do,e,"do",i,a):a.push({...r,severity:"error",message:`while 节点 "${e.name}" 缺少循环体目标 (do)`,category:"missing_config"});break}case"groupFilter":{const o=Zr._parseNodeIds(n.nodeIds);o.length===0?a.push({...r,severity:"error",message:`groupFilter 节点 "${e.name}" 缺少过滤器节点列表 (nodeIds)`,category:"missing_config"}):o.forEach(l=>{Zr._validateNodeRef(l,e,"nodeIds",i,a)});break}case"groupAction":{const o=Zr._parseNodeIds(n.nodeIds);o.length===0?a.push({...r,severity:"error",message:`groupAction 节点 "${e.name}" 缺少动作节点列表 (nodeIds)`,category:"missing_config"}):o.forEach(l=>{Zr._validateNodeRef(l,e,"nodeIds",i,a)});break}case"iterator":{a.push({...r,severity:"warning",message:`iterator 节点 "${e.name}" 已弃用,建议替换为 for 节点`,category:"deprecated"});break}}}static _validateNodeRef(e,i,a,n,r){e.startsWith("chain:")||n.has(e)||r.push({nodeId:i.id,nodeName:i.name,nodeType:i.type,severity:"error",message:`${i.type} 节点 "${i.name}" 的 ${a} 引用了不存在的节点: "${e}"`,category:"invalid_reference"})}static _validateConnections(e,i,a,n){const r=new Map,o=new Map;i.forEach(l=>{r.set(l.id,l.type),o.set(l.id,l.name)}),e.forEach(l=>{a.has(l.fromId)||n.push({severity:"error",message:`连接的源节点不存在: "${l.fromId}"`,category:"connection"}),a.has(l.toId)||n.push({severity:"error",message:`连接的目标节点不存在: "${l.toId}"`,category:"connection"});const s=r.get(l.fromId);s&&oee.includes(s)&&n.push({nodeId:l.fromId,nodeName:o.get(l.fromId),nodeType:s,severity:"warning",message:`终端节点 "${o.get(l.fromId)}" (${s}) 不应有输出连接`,category:"connection"})})}static _validateFirstNode(e,i){var r,o;const a=((r=e.metadata)==null?void 0:r.firstNodeIndex)??0,n=((o=e.metadata)==null?void 0:o.nodes)||[];n.length>0&&(a<0||a>=n.length)&&i.push({severity:"error",message:`firstNodeIndex (${a}) 超出节点范围 (0-${n.length-1})`,category:"connection"})}static _parseNodeIds(e){return e?Array.isArray(e)?e.map(i=>String(i).trim()).filter(Boolean):typeof e=="string"?e.split(",").map(i=>i.trim()).filter(Boolean):[]:[]}}const sA=[{id:"gitee_ai",labelKey:"editor.aiProvider.gitee_ai",label:"Gitee AI",url:"https://ai.gitee.com/v1",defaultModel:"DeepSeek-V4-Flash",models:[{label:"DeepSeek-V4-Flash",value:"DeepSeek-V4-Flash"},{label:"DeepSeek-R1",value:"DeepSeek-R1"},{label:"GLM-5.1",value:"GLM-5.1"},{label:"Qwen3-Coder",value:"Qwen3-Coder"}]},{id:"deepseek",labelKey:"editor.aiProvider.deepseek",label:"DeepSeek",url:"https://api.deepseek.com",defaultModel:"deepseek-chat",models:[{label:"DeepSeek-V4-Flash",value:"deepseek-v4-flash"},{label:"DeepSeek-V3.2",value:"deepseek-chat"},{label:"DeepSeek-R1",value:"deepseek-reasoner"}]},{id:"qwen",labelKey:"editor.aiProvider.qwen",label:"通义千问",url:"https://dashscope.aliyuncs.com/compatible-mode/v1",defaultModel:"qwen-plus",models:[{label:"qwen-plus",value:"qwen-plus"},{label:"qwen-turbo",value:"qwen-turbo"},{label:"qwen-max",value:"qwen-max"}]},{id:"zhipu",labelKey:"editor.aiProvider.zhipu",label:"智谱 AI",url:"https://open.bigmodel.cn/api/paas/v4",defaultModel:"glm-5",models:[{label:"glm-5.1",value:"glm-5.1"},{label:"glm-5",value:"glm-5"},{label:"glm-4.7",value:"glm-4.7"}]},{id:"openai",labelKey:"editor.aiProvider.openai",label:"OpenAI",url:"https://api.openai.com/v1",defaultModel:"gpt-4o",models:[{label:"gpt-4o",value:"gpt-4o"},{label:"gpt-4o-mini",value:"gpt-4o-mini"}]},{id:"ollama",labelKey:"editor.aiProvider.ollama",label:"Ollama (本地)",url:"http://localhost:11434/v1",defaultModel:"llama3",models:[{label:"llama3",value:"llama3"},{label:"qwen2",value:"qwen2"},{label:"mistral",value:"mistral"}]}];function cA(t){const e=typeof window<"u"?window:void 0;return Array.isArray(e==null?void 0:e[t])?e[t]:[]}function xs(t){if(Array.isArray(t)&&t.length>0)return t;const e=cA("rulegoAiProviders");return e.length>0?e:sA}function dA(t){return Array.isArray(t)&&t.length>0?t:cA("rulegoAiEmbeddingProviders")}const lee=["string","number","boolean","object","array"],see=["string","number","boolean","object"];function cee(t){return Array.isArray(t)?t.filter(e=>e&&typeof e=="object"&&!Array.isArray(e)).map(e=>({...e})):[]}function dee(t=1){return{name:"",title:"",description:"",type:"string",order:t,required:!1,properties:[],itemsType:"string",itemsProperties:[]}}function ob(t){const e=t&&typeof t=="object"&&!Array.isArray(t)?t:{},i=e.properties&&typeof e.properties=="object"&&!Array.isArray(e.properties)?e.properties:{},a=new Set(Array.isArray(e.required)?e.required.map(String):[]);return Object.keys(i).map((n,r)=>{var c;const o=i[n]||{},l=String(o.type||"string"),s=String(((c=o.items)==null?void 0:c.type)||"string");return{name:n,title:String(o.title||""),description:String(o.description||""),type:l,order:Number.isFinite(Number(o.order))?Number(o.order):r+1,required:a.has(n),properties:l==="object"?ob(o):[],itemsType:s,itemsProperties:l==="array"&&s==="object"?ob(o.items):[]}}).sort((n,r)=>Number(n.order||0)-Number(r.order||0))}function lb(t){const e={type:"object",properties:{},required:[]};return t.filter(i=>i.name.trim()).sort((i,a)=>Number(i.order||0)-Number(a.order||0)).forEach((i,a)=>{const n=i.name.trim(),r={type:i.type||"string",order:Number.isFinite(Number(i.order))?Number(i.order):a+1};if(i.title.trim()&&(r.title=i.title.trim()),i.description.trim()&&(r.description=i.description.trim()),i.type==="object"){const o=lb(i.properties||[]);r.properties=o.properties,o.required&&(r.required=o.required)}if(i.type==="array"&&(r.items={type:i.itemsType||"string"},r.items.type==="object")){const o=lb(i.itemsProperties||[]);r.items.properties=o.properties,o.required&&(r.items.required=o.required)}e.properties[n]=r,i.required&&e.required.push(n)}),e.required.length===0&&delete e.required,e}function Uh(t){return t.map(e=>({...e,properties:Uh(e.properties||[]),itemsProperties:Uh(e.itemsProperties||[])}))}function Iee(t){return t.map((e,i)=>({...e,order:i+1}))}function IA(t,e){if(!e)return t;const i=e.split(".").filter(Boolean);let a=t,n;for(const r of i){if(r==="items"){a=(n==null?void 0:n.itemsProperties)||[];continue}if(n=a[Number(r)],!n)return[];a=n.properties||[]}return a}function gee(t,e,i){const a=Uh(t);return i(IA(a,e)),a}function uee(t,e="{}"){if(typeof t=="string")return t.trim()||e;if(t==null)return e;try{return JSON.stringify(t,null,2)}catch{return e}}function Nee(t,e={}){if(!t.trim())return e;const i=JSON.parse(t);return i&&typeof i=="object"&&!Array.isArray(i)?i:e}function sb(t){if(!t||typeof t!="object")return null;const e=t,i=String(e.name||e.Name||e.tool_name||e.type||"").trim();if(!i)return null;const a=e.params_one_of||e.paramsOneOf||e.ParamsOneOf||e.parameters||e.schema||{},n=(a==null?void 0:a.open_api_v3)||(a==null?void 0:a.openApiV3)||(a==null?void 0:a.OpenApiV3)||a;return{value:i,label:i,desc:String(e.desc||e.Desc||e.tool_desc||e.description||""),parameters:n&&typeof n=="object"&&!Array.isArray(n)?n:{},fields:Array.isArray(e.fields)?e.fields:[],defaultGlobalDir:String(e.defaultGlobalDir||e.default_global_dir||""),raw:t}}function gA(t){var a,n;const e=t&&typeof t=="object"?t:{},i=(n=(a=e==null?void 0:e.builtins)==null?void 0:a["ai/tools"])==null?void 0:n.tools;return Array.isArray(i)?i.map(sb).filter(Boolean):[]}function hee(...t){for(const e of t){if(Array.isArray(e)){const a=e.map(sb).filter(Boolean);if(a.length>0)return a}const i=gA(e);if(i.length>0)return i}return[]}function Mee(...t){for(const e of t){if(typeof e=="string"&&e.trim())return e;if(e&&typeof e=="object"){const i=e.skillPath;if(typeof i=="string"&&i.trim())return i}}return""}const Ps={default:{label:"经典",labelEn:"Classic",vars:{"--hb-bg-root":"#f6f5f5","--hb-bg-toolbar":"#ffffff","--hb-bg-sidebar":"#f6f5f5","--hb-bg-canvas":"#ffffff","--hb-bg-drawer":"#ffffff","--hb-bg-modal":"#ffffff","--hb-bg-hover":"#ecf5ff","--hb-bg-active":"#ecf5ff","--hb-bg-section":"#fafbfc","--hb-bg-input":"#ffffff","--hb-bg-tag":"#f0f0f0","--hb-text-primary":"#333333","--hb-text-secondary":"#606266","--hb-text-muted":"#888888","--hb-text-disabled":"#aaaaaa","--hb-color-primary":"#409eff","--hb-color-primary-light":"#c6e2ff","--hb-color-primary-bg":"#ecf5ff","--hb-color-success":"#27ae60","--hb-color-warning":"#fa8c16","--hb-color-danger":"#f56c6c","--hb-color-title":"#c0392b","--hb-border-color":"#dcdfe6","--hb-border-light":"#eeeeee","--hb-border-strong":"#dddddd","--hb-radius-sm":"4px","--hb-radius-md":"6px","--hb-radius-lg":"8px","--hb-shadow-sm":"0 1px 4px rgba(0,0,0,0.08)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.12)","--hb-shadow-lg":"0 8px 32px rgba(0,0,0,0.15)","--hb-overlay":"rgba(0,0,0,0.3)"}},dark:{label:"暗夜",labelEn:"Dark",vars:{"--hb-bg-root":"#1a1a2e","--hb-bg-toolbar":"#16213e","--hb-bg-sidebar":"#1a1a2e","--hb-bg-canvas":"#0f3460","--hb-bg-drawer":"#16213e","--hb-bg-modal":"#16213e","--hb-bg-hover":"#1a3a5c","--hb-bg-active":"#1a3a5c","--hb-bg-section":"#0f3460","--hb-bg-input":"#1a1a2e","--hb-bg-tag":"#0f3460","--hb-text-primary":"#e0e0e0","--hb-text-secondary":"#b0b0b0","--hb-text-muted":"#808080","--hb-text-disabled":"#555555","--hb-color-primary":"#5dade2","--hb-color-primary-light":"#1a3a5c","--hb-color-primary-bg":"#162d50","--hb-color-success":"#2ecc71","--hb-color-warning":"#f39c12","--hb-color-danger":"#e74c3c","--hb-color-title":"#e74c3c","--hb-border-color":"#2c3e50","--hb-border-light":"#1e2d3d","--hb-border-strong":"#34495e","--hb-radius-sm":"4px","--hb-radius-md":"6px","--hb-radius-lg":"8px","--hb-shadow-sm":"0 1px 4px rgba(0,0,0,0.3)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.4)","--hb-shadow-lg":"0 8px 32px rgba(0,0,0,0.5)","--hb-overlay":"rgba(0,0,0,0.6)"}},nature:{label:"自然",labelEn:"Nature",vars:{"--hb-bg-root":"#f0f4e8","--hb-bg-toolbar":"#fafdf5","--hb-bg-sidebar":"#f0f4e8","--hb-bg-canvas":"#fefffe","--hb-bg-drawer":"#fafdf5","--hb-bg-modal":"#fafdf5","--hb-bg-hover":"#e8f5e9","--hb-bg-active":"#e8f5e9","--hb-bg-section":"#f5f9f0","--hb-bg-input":"#ffffff","--hb-bg-tag":"#e8f5e9","--hb-text-primary":"#2e4a2e","--hb-text-secondary":"#4a6741","--hb-text-muted":"#7a9a70","--hb-text-disabled":"#a0bfa0","--hb-color-primary":"#4caf50","--hb-color-primary-light":"#c8e6c9","--hb-color-primary-bg":"#e8f5e9","--hb-color-success":"#388e3c","--hb-color-warning":"#f9a825","--hb-color-danger":"#d32f2f","--hb-color-title":"#2e7d32","--hb-border-color":"#c5e1a5","--hb-border-light":"#dcedc8","--hb-border-strong":"#aed581","--hb-radius-sm":"6px","--hb-radius-md":"8px","--hb-radius-lg":"12px","--hb-shadow-sm":"0 1px 4px rgba(76,175,80,0.1)","--hb-shadow-md":"0 4px 12px rgba(76,175,80,0.12)","--hb-shadow-lg":"0 8px 24px rgba(76,175,80,0.15)","--hb-overlay":"rgba(46,77,46,0.3)"}},elegant:{label:"优雅",labelEn:"Elegant",vars:{"--hb-bg-root":"#f3f0f7","--hb-bg-toolbar":"#faf8fc","--hb-bg-sidebar":"#f3f0f7","--hb-bg-canvas":"#fefcff","--hb-bg-drawer":"#faf8fc","--hb-bg-modal":"#faf8fc","--hb-bg-hover":"#ede7f6","--hb-bg-active":"#ede7f6","--hb-bg-section":"#f5f2fa","--hb-bg-input":"#ffffff","--hb-bg-tag":"#ede7f6","--hb-text-primary":"#37274a","--hb-text-secondary":"#5c4a72","--hb-text-muted":"#9575aa","--hb-text-disabled":"#bba8cc","--hb-color-primary":"#7c4dff","--hb-color-primary-light":"#d1c4e9","--hb-color-primary-bg":"#ede7f6","--hb-color-success":"#66bb6a","--hb-color-warning":"#ffa726","--hb-color-danger":"#ef5350","--hb-color-title":"#7c4dff","--hb-border-color":"#d1c4e9","--hb-border-light":"#e8e0f0","--hb-border-strong":"#b39ddb","--hb-radius-sm":"6px","--hb-radius-md":"10px","--hb-radius-lg":"14px","--hb-shadow-sm":"0 1px 6px rgba(124,77,255,0.08)","--hb-shadow-md":"0 4px 16px rgba(124,77,255,0.1)","--hb-shadow-lg":"0 8px 28px rgba(124,77,255,0.15)","--hb-overlay":"rgba(55,39,74,0.35)"}},tech:{label:"科技",labelEn:"Tech",vars:{"--hb-bg-root":"#0d1117","--hb-bg-toolbar":"#161b22","--hb-bg-sidebar":"#0d1117","--hb-bg-canvas":"#1c2333","--hb-bg-drawer":"#161b22","--hb-bg-modal":"#161b22","--hb-bg-hover":"#1f3044","--hb-bg-active":"#1f3044","--hb-bg-section":"#1c2333","--hb-bg-input":"#0d1117","--hb-bg-tag":"#1c2333","--hb-text-primary":"#c9d1d9","--hb-text-secondary":"#8b949e","--hb-text-muted":"#6e7681","--hb-text-disabled":"#484f58","--hb-color-primary":"#00bcd4","--hb-color-primary-light":"#1a4a54","--hb-color-primary-bg":"#0d3038","--hb-color-success":"#3fb950","--hb-color-warning":"#d29922","--hb-color-danger":"#f85149","--hb-color-title":"#00bcd4","--hb-border-color":"#30363d","--hb-border-light":"#21262d","--hb-border-strong":"#3d444d","--hb-radius-sm":"3px","--hb-radius-md":"6px","--hb-radius-lg":"8px","--hb-shadow-sm":"0 1px 4px rgba(0,188,212,0.1)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.4)","--hb-shadow-lg":"0 8px 32px rgba(0,0,0,0.5)","--hb-overlay":"rgba(0,0,0,0.65)"}},modern:{label:"现代",labelEn:"Modern",vars:{"--hb-bg-root":"#f8fafc","--hb-bg-toolbar":"#ffffff","--hb-bg-sidebar":"#ffffff","--hb-bg-canvas":"#ffffff","--hb-bg-drawer":"#ffffff","--hb-bg-modal":"#ffffff","--hb-bg-hover":"rgba(59,130,246,0.06)","--hb-bg-active":"rgba(59,130,246,0.1)","--hb-bg-section":"#f8fafc","--hb-bg-input":"#ffffff","--hb-bg-tag":"#f1f5f9","--hb-text-primary":"#334155","--hb-text-secondary":"#64748b","--hb-text-muted":"#94a3b8","--hb-text-disabled":"#cbd5e1","--hb-color-primary":"#3b82f6","--hb-color-primary-light":"#bfdbfe","--hb-color-primary-bg":"#eff6ff","--hb-color-success":"#22c55e","--hb-color-warning":"#eab308","--hb-color-danger":"#ef4444","--hb-color-title":"#1e40af","--hb-border-color":"rgba(0,0,0,0.08)","--hb-border-light":"rgba(0,0,0,0.04)","--hb-border-strong":"rgba(0,0,0,0.1)","--hb-radius-sm":"7px","--hb-radius-md":"10px","--hb-radius-lg":"12px","--hb-shadow-sm":"0 1px 3px rgba(0,0,0,0.06)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.08)","--hb-shadow-lg":"0 8px 24px rgba(0,0,0,0.12)","--hb-overlay":"rgba(0,0,0,0.25)","--hb-node-selected-stroke":"#3b82f6","--hb-node-selected-shadow":"0 0 8px rgba(59,130,246,0.3)","--hb-node-hover-brightness":"0.96","--hb-node-radius":"10px","--hb-node-shadow-offset":"2px","--hb-port-fill":"#ffffff","--hb-port-stroke":"#94a3b8","--hb-port-hover-fill":"#3b82f6","--hb-port-hover-stroke":"#3b82f6","--hb-edge-stroke":"#94a3b8","--hb-edge-hover-stroke":"#3b82f6"}}};function vs(t){return{"--hb-bg-root":t.root,"--hb-bg-toolbar":t.toolbar,"--hb-bg-sidebar":t.sidebar,"--hb-bg-canvas":t.canvas,"--hb-bg-drawer":t.toolbar,"--hb-bg-modal":t.toolbar,"--hb-bg-hover":t.hover,"--hb-bg-active":t.active,"--hb-bg-section":t.section,"--hb-bg-input":t.input,"--hb-bg-tag":t.tag,"--hb-text-primary":t.text,"--hb-text-secondary":t.secondary,"--hb-text-muted":t.muted,"--hb-text-disabled":t.disabled,"--hb-color-primary":t.primary,"--hb-color-primary-light":t.primaryLight,"--hb-color-primary-bg":t.primaryBg,"--hb-color-success":t.success,"--hb-color-warning":t.warning,"--hb-color-danger":t.danger,"--hb-color-title":t.title,"--hb-border-color":t.border,"--hb-border-light":t.borderLight,"--hb-border-strong":t.borderStrong,"--hb-radius-sm":t.radiusSm||"6px","--hb-radius-md":t.radiusMd||"8px","--hb-radius-lg":t.radiusLg||"10px","--hb-shadow-sm":`0 1px 4px ${t.shadowColor}`,"--hb-shadow-md":`0 4px 12px ${t.shadowColor}`,"--hb-shadow-lg":`0 8px 28px ${t.shadowColor}`,"--hb-overlay":t.overlay,"--hb-node-selected-stroke":t.primary,"--hb-node-selected-shadow":`0 0 8px ${t.shadowColor}`,"--hb-node-hover-brightness":"0.96","--hb-node-radius":t.radiusMd||"8px","--hb-node-shadow-offset":"2px","--hb-port-fill":t.input,"--hb-port-stroke":t.muted,"--hb-port-hover-fill":t.primary,"--hb-port-hover-stroke":t.primary,"--hb-edge-stroke":t.muted,"--hb-edge-hover-stroke":t.primary}}Object.assign(Ps,{colorful:{label:"彩色",labelEn:"Colorful",vars:vs({root:"#f8fafc",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f8fafc",input:"#ffffff",tag:"#eef2ff",hover:"rgba(37,99,235,0.08)",active:"rgba(139,92,246,0.12)",text:"#172033",secondary:"#475569",muted:"#64748b",disabled:"#cbd5e1",primary:"#2563eb",primaryLight:"#bfdbfe",primaryBg:"#eff6ff",success:"#10b981",warning:"#f59e0b",danger:"#f43f5e",title:"#7c3aed",border:"#dbe4f0",borderLight:"#edf2f7",borderStrong:"#cbd5e1",shadowColor:"rgba(15,23,42,0.10)",overlay:"rgba(15,23,42,0.32)"})},"ant-blue":{label:"蚂蚁蓝",labelEn:"Ant Blue",vars:vs({root:"#f0f7ff",toolbar:"#ffffff",sidebar:"#f7fbff",canvas:"#ffffff",section:"#f0f7ff",input:"#ffffff",tag:"#e6f4ff",hover:"rgba(22,119,255,0.08)",active:"rgba(22,119,255,0.12)",text:"#102a43",secondary:"#42526e",muted:"#6b7c93",disabled:"#b8c4d6",primary:"#1677ff",primaryLight:"#91caff",primaryBg:"#e6f4ff",success:"#52c41a",warning:"#faad14",danger:"#ff4d4f",title:"#0958d9",border:"#bae0ff",borderLight:"#e6f4ff",borderStrong:"#91caff",shadowColor:"rgba(22,119,255,0.12)",overlay:"rgba(16,42,67,0.28)",radiusSm:"6px",radiusMd:"8px",radiusLg:"12px"})},material:{label:"Material",labelEn:"Material",vars:vs({root:"#f8fbff",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f1f5fb",input:"#ffffff",tag:"#e8f0fe",hover:"rgba(26,115,232,0.08)",active:"rgba(26,115,232,0.13)",text:"#202124",secondary:"#5f6368",muted:"#80868b",disabled:"#bdc1c6",primary:"#1a73e8",primaryLight:"#a8c7fa",primaryBg:"#e8f0fe",success:"#188038",warning:"#fbbc04",danger:"#ea4335",title:"#174ea6",border:"#dadce0",borderLight:"#edf1f7",borderStrong:"#c9d2df",shadowColor:"rgba(60,64,67,0.14)",overlay:"rgba(32,33,36,0.30)",radiusSm:"4px",radiusMd:"8px",radiusLg:"12px"})},tailwind:{label:"Tailwind",labelEn:"Tailwind",vars:vs({root:"#f8fafc",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f1f5f9",input:"#ffffff",tag:"#e0f2fe",hover:"rgba(14,165,233,0.08)",active:"rgba(14,165,233,0.14)",text:"#0f172a",secondary:"#475569",muted:"#64748b",disabled:"#cbd5e1",primary:"#0ea5e9",primaryLight:"#bae6fd",primaryBg:"#e0f2fe",success:"#10b981",warning:"#f59e0b",danger:"#f43f5e",title:"#0284c7",border:"#dbe4f0",borderLight:"#eef2f7",borderStrong:"#cbd5e1",shadowColor:"rgba(15,23,42,0.10)",overlay:"rgba(15,23,42,0.30)",radiusSm:"6px",radiusMd:"10px",radiusLg:"14px"})},github:{label:"GitHub",labelEn:"GitHub",vars:vs({root:"#f6f8fa",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f6f8fa",input:"#ffffff",tag:"#ddf4ff",hover:"rgba(9,105,218,0.08)",active:"rgba(9,105,218,0.12)",text:"#24292f",secondary:"#57606a",muted:"#6e7781",disabled:"#afb8c1",primary:"#0969da",primaryLight:"#b6e3ff",primaryBg:"#ddf4ff",success:"#1a7f37",warning:"#bf8700",danger:"#cf222e",title:"#0969da",border:"#d0d7de",borderLight:"#eaeef2",borderStrong:"#afb8c1",shadowColor:"rgba(31,35,40,0.12)",overlay:"rgba(31,35,40,0.32)",radiusSm:"6px",radiusMd:"6px",radiusLg:"8px"})},vscode:{label:"VS Code",labelEn:"VS Code",vars:vs({root:"#1e1e1e",toolbar:"#252526",sidebar:"#252526",canvas:"#1e1e1e",section:"#2d2d30",input:"#1e1e1e",tag:"#2d2d30",hover:"rgba(0,122,204,0.18)",active:"rgba(0,122,204,0.28)",text:"#f3f4f6",secondary:"#cccccc",muted:"#9ca3af",disabled:"#6b7280",primary:"#007acc",primaryLight:"#2b88d8",primaryBg:"#094771",success:"#4ec9b0",warning:"#dcdcaa",danger:"#f44747",title:"#4fc1ff",border:"#3c3c3c",borderLight:"#333333",borderStrong:"#505050",shadowColor:"rgba(0,0,0,0.42)",overlay:"rgba(0,0,0,0.62)",radiusSm:"3px",radiusMd:"5px",radiusLg:"7px"})},apple:{label:"苹果",labelEn:"Apple",vars:vs({root:"#f5f5f7",toolbar:"#ffffff",sidebar:"#fbfbfd",canvas:"#ffffff",section:"#f5f5f7",input:"#ffffff",tag:"#eef5ff",hover:"rgba(0,122,255,0.08)",active:"rgba(0,122,255,0.13)",text:"#1d1d1f",secondary:"#424245",muted:"#6e6e73",disabled:"#b7b7bd",primary:"#007aff",primaryLight:"#b9dcff",primaryBg:"#eef5ff",success:"#34c759",warning:"#ffcc00",danger:"#ff3b30",title:"#007aff",border:"#d2d2d7",borderLight:"#ebebef",borderStrong:"#c7c7cc",shadowColor:"rgba(0,0,0,0.10)",overlay:"rgba(29,29,31,0.28)",radiusSm:"7px",radiusMd:"10px",radiusLg:"14px"})}});const mee={light:"default",classic:"default",blue:"tech",antd:"ant-blue",ant:"ant-blue",google:"material",tailwindcss:"tailwind",gh:"github",vs:"vscode","visual-studio-code":"vscode",mac:"apple",macos:"apple"};function Sl(t){const e=String(t||"").trim().toLowerCase();return e?Object.prototype.hasOwnProperty.call(Ps,e)?e:mee[e]||"default":"default"}function yee(){let t="";for(const[e,i]of Object.entries(Ps)){const a=e==="default"?'.huanban_rulego_editor_root, .huanban_rulego_editor_root[data-theme="default"]':`.huanban_rulego_editor_root[data-theme="${e}"]`,n=Object.entries(i.vars).map(([r,o])=>` ${r}: ${o};`).join(`
|
|
126
|
+
3. Logs have not expired`,noDebugLogs:"No debug logs",enableDebugHint:"Send a message to the rule chain and enable debug mode first",loadFailedManual:"Load failed. Enter a message ID manually",noNodes:"The current rule chain has no nodes",queryingChainLogs:"Querying rule-chain logs...",queryingNodes:"Querying nodes {{start}}~{{end}} / {{total}}..."},debugConsole:{title:"Debug Console",clear:"Clear"},aiProvider:{gitee_ai:"Gitee AI",deepseek:"DeepSeek",qwen:"Tongyi Qianwen",zhipu:"Zhipu AI",openai:"OpenAI",ollama:"Ollama (Local)"},customNode:{onlyRightAnchorOut:"Only the right anchor can connect out",inputSingleOutput:"Input can only connect to one outgoing edge",externalCannotConnectGroupChild:"External nodes cannot connect to nodes inside a group",onlyLeftAnchorIn:"Only the left anchor can connect in",agentOnlyRightOrBottomOut:"Only right and bottom anchors can connect out",agentOrchestrationLabel:"Agent Orchestration",agentOrchestrationOnlyRightOrBottomOut:"Agent orchestration can only connect out from the right or bottom anchors",agentOrchestrationOnlyLeftIn:"Agent orchestration can only connect in from the left anchor",anchorLlm:"LLM",anchorTool:"Tools",anchorMemory:"Memory",anchorKnowledge:"Knowledge"},groupNode:{onlyRightAnchorOut:"Only the right anchor can connect out",notToInput:"Cannot connect to input nodes",onlyLeftAnchorIn:"Only the left anchor can connect in"},importExport:{exportTitle:"Export Rule Chain",importTitle:"Import Rule Chain",exportTab:"Export",importTab:"Import",nodes:"Nodes",edges:"Edges",size:"Size",name:"Name",fileLoaded:"File loaded. Click to choose again",dropHint:"Drop a JSON file here, or click to choose one",invalidRuleChainJson:"Invalid RuleGo rule-chain JSON: missing ruleChain or metadata",jsonParseFailed:"JSON parse failed: {{message}}",selectJsonFile:"Choose a .json file",copied:"Copied to clipboard",downloaded:"Downloaded: {{fileName}}",noImportData:"No data to import",importSuccess:"Rule chain imported",downloadFile:"Download File",confirmImport:"Confirm Import"},workflowList:{title:"Workflow List",searchPlaceholder:"Search workflows...",create:"New",createTitle:"New Workflow",createAndOpen:"Create and open",defaultName:"New Workflow",id:"ID",idPlaceholder:"Rule chain ID. Do not use /, \\ or .",idInvalid:"ID is required and cannot contain /, \\ or .",namePlaceholder:"Enter workflow name",descriptionPlaceholder:"Optional description",chainType:"Rule chain type",rootChain:"Main chain",subChain:"Sub chain",debugMode:"Debug mode",debugModeHint:"Enable execution debug details for this chain",category:"Category",categoryPlaceholder:"Optional category, such as IoT / AI / Sync",initialStatus:"Initial status",initialStopped:"Stopped",initialRunning:"Running",openAfterCreate:"Open editor after create",updateTime:"Updated",more:"More actions",rowHint:"Click for info, double-click to design",empty:"No workflows",createFirst:"Create first workflow",design:"Design",info:"Info",logs:"Logs",online:"Online",offline:"Offline",onlineAction:"Start",offlineAction:"Stop",confirmDelete:'Delete workflow "{{name}}"? This action cannot be undone.',operateFailed:"Operation failed",copyFailed:"Copy failed",deleteFailed:"Delete failed",createFailed:"Create failed"},dataView:{title:"Rule Chain Data",copyJson:"Copy",downloadJson:"Download",copied:"JSON copied to clipboard",copyFailed:"Copy failed",downloaded:"Downloaded {{fileName}}",downloadFailed:"Download failed"},validation:{title:"Rule Chain Validation",revalidate:"Revalidate",validate:"Validate",clearResults:"Clear results",close:"Close",all:"All",validating:"Validating...",empty:"No validation results. Click Validate to start.",noFilteredResults:"No results for the current filter"},ruleChainSettings:{title:"Rule Chain Settings",nameRequired:"Rule chain name is required",namePlaceholder:"Enter rule chain name",descriptionPlaceholder:"Enter rule chain description",root:"Root Chain",additionalInfo:"Additional Info (JSON)"},debugPanel:{sendMessage:"Send Message",debugLogs:"Debug Logs",runLogs:"Run Logs",chainId:"Rule Chain ID",msgType:"Message Type",msgTypePlaceholder:"e.g. TEST_MSG",msgBodyJson:"Message Body (JSON)",sending:"Sending...",sendTestMessage:"Send Test Message",responseData:"Response Data",nodeLabel:"Node",loading:"Loading...",refresh:"Refresh",noDebugLogs:"No debug logs",debugModeHint:"Enable Debug Mode on the node and send a message first",time:"Time",type:"Type",relation:"Relation",operate:"Actions",data:"Data",metadata:"Metadata",error:"Error",noRunLogs:"No run logs",runLogDetail:"Run Log Details",selectChainFirst:"Select a rule chain first",noSendCallback:"Send message callback is not configured",invalidJson:"Message body JSON is invalid",sendSuccess:"Message sent successfully",sendFailed:"Send failed: {{message}}",unknownError:"Unknown error",sendException:"Send exception: {{message}}",loadDebugLogsFailed:"Failed to load debug logs",loadRunLogsFailed:"Failed to load run logs",copied:"Copied",copyFailed:"Copy failed"},searchPanel:{placeholder:"Search node name, type, or ID...",resultCount:"{{count}} result(s)",matchCount:"{{count}} match(es)",noMatch:"No matches",empty:"No matching nodes found"},workflowInfo:{noData:"Select a workflow to view details",baseInfo:"Basic Info",varsSecrets:"Variables & Secrets",integration:"App Integration",maintenance:"Maintenance",online:"Online",offline:"Offline",saveBaseInfo:"Save Basic Info",saveVars:"Save Variables",saveSecrets:"Save Secrets",saving:"Saving...",vars:"Variables",secrets:"Secrets",varName:"Variable Name",varValue:"Variable Value",secretName:"Secret Name",secretValue:"Secret Value",apiIntegration:"API Integration",executeAPI:"Execute API:",notifyAPI:"Notify API:",webSocket:"WebSocket",debugWS:"Debug WS:",runtimeWS:"Runtime WS:",endpointWS:"Endpoint WS:",mcpIntegration:"MCP Integration",mcpSSE:"MCP SSE:",action:"Actions",add:"Add",delete:"Delete",saveFailed:"Save failed"},maintenance:{title:"Maintenance",noApi:"The current request adapter does not provide maintenance APIs",noIssues:"No issues returned",validating:"Validating...",runValidate:"Run Validation",schemaDiff:"Schema Diff",repairPlan:"Repair Plan",patchPreview:"Patch Preview",validateResult:"Validation Result",valid:"Passed",invalid:"Failed"},logViewer:{title:"Debug Console",empty:"No debug logs"},copilot:{placeholder:"Ask something...",send:"Send",userRole:"User",assistantRole:"Assistant"},aiProperties:{modelSelector:"LLM Operator",loading:"Loading LLM engine...",fallback:"AI service is temporarily unavailable. This rule chain will run in normal fallback mode.",selectPlaceholder:"-- Select LLM --",empty:"The backend did not return any available models. Check the AI API configuration."}},components:{"start-node":"Input",delay:"Delay",exec:"Exec Command",fetchNodeOutput:"Fetch Node Output",functions:"Functions",log:"Log","x/python":"Python Script",break:"Break",comment:"Comment",end:"End",for:"For Loop",fork:"Fork",groupAction:"Group Action",inclusive:"Inclusive Gateway",join:"Join",ref:"Reference Node",switch:"Switch",while:"While Loop",iterator:"Iterator",exprFilter:"Expr Filter",fieldFilter:"Field Filter",groupFilter:"Group Filter",jsFilter:"JS Filter",jsSwitch:"JS Switch",msgTypeSwitch:"Msg Type Switch","x/luaFilter":"Lua Filter",exprTransform:"Expr Transform",jsTransform:"JS Transform",metadataTransform:"Metadata Transform","text/template":"Template Transform","x/luaTransform":"Lua Transform",cacheDelete:"Cache Delete",cacheGet:"Cache Get",cacheSet:"Cache Set",dbClient:"Database",mqttClient:"MQTT",net:"TCP/UDP",sendEmail:"Send Email",ssh:"SSH","x/receiveEmail":"Receive Email",restApiCall:"REST API Call","x/fileDelete":"File Delete","x/fileList":"File List","x/fileRead":"File Read","x/fileWrite":"File Write","x/grpcClient":"gRPC Client","x/kafkaProducer":"Kafka","x/mongodbClient":"MongoDB","x/natsClient":"NATS","x/nsqClient":"NSQ","x/opengeminiQuery":"OpenGemini Query","x/opengeminiWrite":"OpenGemini Write","x/otel":"OpenTelemetry","x/pulsarClient":"Pulsar","x/rabbitmqClient":"RabbitMQ","x/redisClient":"Redis","x/redisPub":"Redis Pub","x/wukongimSender":"WuKong IM","x/beanstalkdWorker":"Beanstalkd Worker","x/beanstalkdTube":"Beanstalkd Tube","x/jsonQuery":"JSON Query","x/odooCrudCreate":"Odoo Create","x/odooCrudUpdate":"Odoo Update","x/soapParse":"SOAP Parse","x/soapRequest":"SOAP Request",flow:"Sub Rule Chain",simple_admission:"Simple Admission",temperature_conversion:"Temperature Conversion","ai/llm":"AI LLM","ai/createImage":"AI Image","ai/agent":"Agent","ai/intent":"Intent Recognition","ai/localIntent":"Local Intent Recognition","ai/mcpClient":"MCP Client","ai/transform/documentLoader":"Document Loader","ai/transform/textChunker":"Text Chunker","ai/embedding/openai":"OpenAI Embedding","ai/indexer/milvus":"Milvus Indexer","ai/indexer/redis":"Redis Indexer","ai/retriever/milvus":"Milvus Retriever","ai/retriever/redis":"Redis Retriever","ci/exec":"Command Line","ci/gitClone":"Git Clone","ci/gitCommit":"Git Commit","ci/gitCreateTag":"Git Create Tag","ci/gitLog":"Git Log","ci/gitPush":"Git Push","ci/ps":"Server Metrics","x/opcua":"OPC UA Subscribe","x/modbus":"Modbus","x/opcuaRead":"OPC UA Read","x/opcuaWrite":"OPC UA Write","x/serialControl":"Serial Control","x/serialIn":"Serial Input","x/serialOut":"Serial Output","x/serialRequest":"Serial Request","x/streamAggregator":"Stream Aggregator","x/streamTransform":"Stream Transform","endpoint/http":"HTTP Server","endpoint/ws":"WebSocket","endpoint/ws_client":"WebSocket Client","endpoint/mqtt":"MQTT Subscribe","endpoint/kafka":"Kafka Consumer","endpoint/nats":"NATS Subscribe","endpoint/nsq":"NSQ Consumer","endpoint/pulsar":"Pulsar Consumer","endpoint/rabbitmq":"RabbitMQ Consumer","endpoint/redis":"Redis Subscribe","endpoint/redis/stream":"Redis Stream","endpoint/net":"TCP/UDP Server","endpoint/net_client":"TCP/UDP Client","endpoint/schedule":"Scheduler","endpoint/grpc/stream":"gRPC Stream","endpoint/wukongim":"WuKong IM Receiver","endpoint/mcpServer":"MCP Server","endpoint/beanstalkdTubeset":"Beanstalkd","endpoint/mysql_cdc":"MySQL CDC","endpoint/opcua":"OPC UA Server"},fields:{jsScript:"JS Script",script:"Script",expr:"Expression",template:"Template",server:"Server",username:"Username",password:"Password",topic:"Topic",key:"Key",headers:"Headers",host:"Host",port:"Port",cmd:"Command",timeout:"Timeout (sec)",targetId:"Target ID",periodInSeconds:"Period (sec)",maxPendingMsgs:"Max Pending Messages",periodInSecondsPattern:"Period Expression (sec)",functionName:"Function Name",args:"Arguments",targetNodeId:"Target Node ID",range:"Iteration Range",do:"Action",allMatches:"All Must Match",nodeIds:"Node IDs",checkAllKeys:"Check All Keys",dataNames:"Data Field Names",metadataNames:"Metadata Field Names",mapping:"Field Mapping",isNew:"Replace All Metadata",restEndpointUrlPattern:"Endpoint URL",requestMethod:"Method",readTimeoutMs:"Timeout (ms)",maxParallelRequestsCount:"Max Concurrency",enableProxy:"Enable Proxy",proxyScheme:"Proxy Scheme",proxyHost:"Proxy Host",proxyPort:"Proxy Port",driverName:"Driver",dsn:"DSN",sql:"SQL",params:"Parameters",getOne:"Return One Record",poolSize:"Pool Size",protocol:"Protocol",connectTimeout:"Connect Timeout (sec)",heartbeatInterval:"Heartbeat Interval (sec)",maxReconnectInterval:"Max Reconnect Interval (sec)",qOS:"QoS",smtpHost:"SMTP Host",smtpPort:"SMTP Port",fromEmail:"From Email",toEmail:"To Email",ccEmail:"CC Email",bccEmail:"BCC Email",path:"File Path",content:"Content",append:"Append",recursive:"Recursive",dataType:"Data Type",exchange:"Exchange",exchangeType:"Exchange Type",durable:"Durable",autoDelete:"Auto Delete",channel:"Channel",partition:"Partition",database:"Database",collection:"Collection",opType:"Operation Type",filter:"Filter",doc:"Document",one:"Return One",db:"DB Number",service:"Service",method:"Method",request:"Request Body",url:"API URL",model:"Model Name",systemPrompt:"System Prompt",messages:"Messages",images:"Images",prompt:"Prompt",n:"Count",size:"Size",quality:"Quality",style:"Style",response_format:"Response Format",repository:"Repository URL",directory:"Directory",reference:"Branch/Tag",authType:"Auth Type",authUser:"Auth User",authPassword:"Auth Password/Token",pattern:"Pattern",message:"Message",tag:"Tag",limit:"Limit",startTime:"Start Time",endTime:"End Time",refSpecs:"Ref Specs",options:"Options",unitId:"Unit ID",address:"Register Address",quantity:"Register Quantity",value:"Value",regType:"Register Type",policy:"Security Policy",mode:"Security Mode",auth:"Auth",baudRate:"Baud Rate",dataBits:"Data Bits",stopBits:"Stop Bits",parity:"Parity",dtr:"DTR",rts:"RTS",action:"Action",splitType:"Split Type",splitKey:"Split Key",data:"Data",addChar:"Append Char",requestTimeout:"Request Timeout (ms)",metricExpr:"Metric Expression",metrics:"Metrics",extend:"Extend Parent Context",uID:"User ID",token:"Auth Token",channelType:"Channel Type",channelID:"Channel ID"},category:{filter:"Filter",transform:"Transform",action:"Action",external:"External",flow:"Flow",common:"Common",custom:"Custom",ai:"AI",ci:"CI/CD",iot:"IoT",stats:"Stream Computing",endpoint:"Endpoint",endpoints:"Endpoint",storage:"Storage",knowledge:"Knowledge",image:"Image",audio:"Audio",file:"File",other:"Other"},relationTypes:{Success:"Success",Failure:"Failure",True:"True",False:"False",Default:"Default",Stream:"Stream",NotFound:"Not Found"},validation:{orphanNode:'Node "{{name}}" is orphaned with no connections',startNoConnection:"Start node (Input) has no connections",missingRelationType:"Connection is missing relation type",missingNodeType:'Node "{{name}}" is missing type definition',cyclicConnection:"Cyclic connection detected",duplicateNodeId:"Duplicate node ID found"},action:{saveSuccess:"Rule chain saved successfully",saveFailed:"Save failed: {{error}}",deleteSuccess:"Deleted successfully",loadFailed:"Load failed: {{error}}",exportSuccess:"Exported successfully",importSuccess:"Imported successfully",importFailed:"Import failed: invalid data format",undoSuccess:"Undone: {{description}}",redoSuccess:"Redone: {{description}}",noUndoAvailable:"Nothing to undo",noRedoAvailable:"Nothing to redo"}},K7={startNodeId:"$node_start_input",nodeCount:0,edgeCount:0,nodeWidth:100,relationTypeSplit:"/"},eee={isReady:!1,isDirty:!1,isLoading:!1,selectedNode:null,selectedEdge:null,ruleChain:null,nodeComponents:{},componentGroups:[],currentNodeView:null,currentNodeModel:{},currentEdgeModel:{},canUndo:!1,canRedo:!1};class rA{constructor(e){this.lfInstance=null,this.plugins=[],this.initialized=!1,this.disposeLocaleChange=null,this.options=e,this.internalData={...K7},this.store=new Ks({...eee}),this.eventBus=new Gx,this.dataAdapter=new EC,this.componentRegistry=new VC({adapter:e.adapterComponents}),this.history=new FC({maxHistory:e.maxHistory??50}),this.validation=new tb,this.validation.registerBuiltinRules(),this.theme=new $C,this.i18n=new ab({locale:e.locale??"zh-CN",fallback:"en-US"}),this.i18n.register("zh-CN",nb),this.i18n.register("en-US",rb),this.disposeLocaleChange=this.i18n.onLocaleChange(()=>{this.syncComponentState()}),this.loadComponents(e.components??tA),e.plugins&&e.plugins.forEach(i=>this.use(i))}init(e){if(this.initialized){console.warn("[EditorCore] 编辑器已初始化, 请勿重复调用");return}if(this.lfInstance=e,this.options.features||(this.options.features={}),this.componentRegistry.hasCategory("ai")||(this.options.features.aiCopilot=!1),e)try{nA(e)}catch(a){console.error("[EditorCore] 自定义节点注册失败:",a)}const i=this.options.theme??"light";this.theme.setTheme(i),this.plugins.forEach(a=>{if(a.onInit)try{a.onInit(this)}catch(n){console.error(`[EditorCore] 插件 "${a.name}" 初始化出错:`,n)}}),this.store.setState({isReady:!0}),this.initialized=!0,this.eventBus.emit("editor:ready")}destroy(){var e;this.plugins.forEach(i=>{if(i.onDestroy)try{i.onDestroy(this)}catch(a){console.error(`[EditorCore] 插件 "${i.name}" 销毁出错:`,a)}}),this.store.destroy(),this.eventBus.destroy(),this.history.destroy(),this.theme.destroy(),(e=this.disposeLocaleChange)==null||e.call(this),this.disposeLocaleChange=null,this.i18n.destroy(),this.validation.clear(),this.componentRegistry.clear(),this.plugins=[],this.lfInstance=null,this.initialized=!1}loadComponents(e){const i=uu(e);tg(i),this.componentRegistry.clear();const a=this.componentRegistry.loadFromRawData(i);return this.syncComponentState(a)}registerComponents(e,i=!0){return tg(e),this.componentRegistry.registerAll(e,i),this.syncComponentState()}syncComponentState(e=this.componentRegistry.getGroups()){const i=this.localizeComponentGroups(e);return this.store.setState({nodeComponents:this.componentRegistry.getMap(),componentGroups:i}),i}localizeComponentGroups(e){return e.map(i=>({...i,label:ib(this.i18n,`category.${i.category}`,i.label||i.category)}))}loadData(e){this.internalData.nodeCount=0,this.internalData.edgeCount=0,this.store.setState({ruleChain:e.ruleChain,isDirty:!1,selectedNode:null,selectedEdge:null});const i=this.dataAdapter.adapterIn(e,this.componentRegistry.getMap(),this.internalData,{startX:280,startY:280});eg(i,"render"),this.eventBus.emit("editor:data-loaded",{lfData:i,ruleChain:e.ruleChain}),this.history.clear()}exportData(e,i){const a=this.store.getState().ruleChain;if(!a)throw new Error("[EditorCore] 无法导出: 规则链配置为空");return this.dataAdapter.adapterOut(e,a,this.internalData,i)}validateGraph(e){return this.validation.validate(e,{startNodeId:this.internalData.startNodeId})}on(e,i){return this.eventBus.on(e,i)}emit(e,...i){this.eventBus.emit(e,...i)}use(e){if(this.plugins.some(i=>i.name===e.name)){console.warn(`[EditorCore] 插件 "${e.name}" 已安装, 跳过`);return}this.plugins.push(e),this.initialized&&e.onInit&&e.onInit(this)}getInternalData(){return{...this.internalData}}getLfInstance(){return this.lfInstance}getOptions(){return this.options}}const tee=new Set(["fork","switch","inclusive","while","for","groupFilter","groupAction","iterator"]),iee=new Set(["comment"]);function oA(t,e){return!!(t==="group-node"||e!=null&&e.type&&tee.has(e.type))}function aee(t,e){eg(t,"layout");const i={layerGapX:(e==null?void 0:e.layerGapX)??250,nodeGapY:(e==null?void 0:e.nodeGapY)??100,startX:(e==null?void 0:e.startX)??100,startY:(e==null?void 0:e.startY)??200,startNodeId:(e==null?void 0:e.startNodeId)??"$node_start_input",groupNodeHeight:(e==null?void 0:e.groupNodeHeight)??200},{nodes:a,edges:n}=t;if(!a||a.length===0)return t;const r=[],o=[],l=[],s=new Set;a.forEach(y=>{y.type==="group-node"&&Array.isArray(y.children)&&y.children.forEach(x=>s.add(x))}),a.forEach(y=>{var P,D,b;const x=((D=(P=y.properties)==null?void 0:P.model)==null?void 0:D.type)||((b=y.properties)==null?void 0:b.type)||"";iee.has(x)?r.push(y):s.has(y.id)?l.push(y):o.push(y)});const c=new Map;a.forEach(y=>c.set(y.id,{x:y.x,y:y.y}));const d=new Map,I=new Map,g=new Map;o.forEach(y=>{g.set(y.id,y),d.set(y.id,[]),I.set(y.id,0)}),n.forEach(y=>{d.has(y.sourceNodeId)&&g.has(y.targetNodeId)&&(d.get(y.sourceNodeId).push(y.targetNodeId),I.set(y.targetNodeId,(I.get(y.targetNodeId)||0)+1))});const u=[],N=new Set,h=[];g.has(i.startNodeId)&&h.push(i.startNodeId),o.forEach(y=>{y.id!==i.startNodeId&&(I.get(y.id)||0)===0&&h.push(y.id)}),h.length===0&&o.length>0&&h.push(o[0].id);let M=[...h];for(M.forEach(y=>N.add(y));M.length>0;){u.push([...M]);const y=[];M.forEach(x=>{(d.get(x)||[]).forEach(D=>{N.has(D)||(N.add(D),y.push(D))})}),M=y}o.forEach(y=>{N.has(y.id)||(u.length===0&&u.push([]),u[u.length-1].push(y.id),N.add(y.id))});for(let y=1;y<u.length;y++){const x=u[y-1],P=new Map;x.forEach((D,b)=>P.set(D,b)),u[y].sort((D,b)=>{const p=lA(D,n,P),j=lA(b,n,P);return p-j})}let m=i.startX;if(u.forEach((y,x)=>{const P=y.some(j=>{const S=g.get(j);return S?oA(S.type||"",S.properties):!1});if(x>0){const Z=u[x-1].some(z=>{const W=g.get(z);return W?oA(W.type||"",W.properties):!1})||P?i.layerGapX+100:i.layerGapX;m+=Z}const D=P?Math.max(i.nodeGapY,i.groupNodeHeight+20):i.nodeGapY,b=(y.length-1)*D,p=i.startY-b/2;y.forEach((j,S)=>{const Z=g.get(j);Z&&(Z.x=m,Z.y=p+S*D)})}),r.length>0){let y=i.startY;o.forEach(P=>{P.y<y&&(y=P.y)});const x=y-120;r.forEach((P,D)=>{P.x=i.startX+D*300,P.y=x})}return l.length>0&&a.forEach(D=>{if(D.type==="group-node"&&Array.isArray(D.children)){const p=D.children.map(k=>l.find(E=>E.id===k)).filter(Boolean);if(p.length===0)return;const j=120,S=30,z=p.length*S+(p.length-1)*60+50+30,W=Math.max(300,j+30*2+60),R=D.y-z/2+50+S/2;p.forEach((k,E)=>{k.x=D.x,k.y=R+E*(S+60)}),D.properties||(D.properties={}),D.properties.width=W,D.properties.height=Math.max(200,z)}}),nee(a,n,g,i),t}function lA(t,e,i){let a=0,n=0;return e.forEach(r=>{r.targetNodeId===t&&i.has(r.sourceNodeId)&&(a+=i.get(r.sourceNodeId),n++)}),n>0?a/n:1/0}function nee(t,e,i,a){const n=new Map;i.forEach(o=>{const l=`${o.x}_${o.y}`;n.has(l)||n.set(l,[]),n.get(l).push(o)}),n.forEach(o=>{if(o.length>1){const l=o[0].y,s=a.nodeGapY;o.forEach((c,d)=>{c.y=l+(d-(o.length-1)/2)*s})}});const r=new Map;e.forEach(o=>{const l=i.get(o.sourceNodeId),s=i.get(o.targetNodeId);if(!l||!s)return;const c=`h_${l.y}_${s.y}`;r.has(c)||r.set(c,[]),r.get(c).push(o)}),r.forEach(o=>{if(o.length>1){const l=Math.min(a.nodeGapY*.3,20);o.forEach((s,c)=>{if(c===0)return;const d=i.get(s.targetNodeId);d&&(d.y+=l*c)})}})}function ree(t){if(!t||t.length===0)return!1;let e=0;return t.forEach(i=>{const a=i.additionalInfo||{};!a.layoutX&&!a.layoutY&&e++}),e>t.length*.5}const oee=["flow","end","break"];class Zr{static validate(e){var c;const i=[];if(!((c=e==null?void 0:e.metadata)!=null&&c.nodes))return{valid:!0,issues:[],errors:[],warnings:[]};const a=e.metadata.nodes,n=e.metadata.connections||[],r=e.metadata.endpoints||[];if(a.length+r.length>Ue.maxGraphNodes)throw new go("GRAPH_NODES_LIMIT",`validate graph has ${a.length+r.length} nodes, max is ${Ue.maxGraphNodes}`);if(n.length>Ue.maxGraphEdges)throw new go("GRAPH_EDGES_LIMIT",`validate graph has ${n.length} edges, max is ${Ue.maxGraphEdges}`);const o=new Set(a.map(d=>d.id));a.forEach(d=>{Zr._validateNode(d,o,i)}),Zr._validateConnections(n,a,o,i),Zr._validateFirstNode(e,i);const l=i.filter(d=>d.severity==="error"),s=i.filter(d=>d.severity==="warning");return{valid:l.length===0,issues:i,errors:l,warnings:s}}static _validateNode(e,i,a){const n=e.configuration||{},r={nodeId:e.id,nodeName:e.name,nodeType:e.type};switch(e.type){case"switch":case"inclusive":{(!Array.isArray(n.cases)||n.cases.length===0)&&a.push({...r,severity:"warning",message:`${e.type} 节点 "${e.name}" 没有配置任何条件分支 (cases)`,category:"missing_config"});break}case"for":{n.range||a.push({...r,severity:"error",message:`for 节点 "${e.name}" 缺少遍历范围 (range)`,category:"missing_config"}),n.do?Zr._validateNodeRef(n.do,e,"do",i,a):a.push({...r,severity:"error",message:`for 节点 "${e.name}" 缺少循环体目标 (do)`,category:"missing_config"});break}case"while":{n.condition||n.jsScript||a.push({...r,severity:"error",message:`while 节点 "${e.name}" 缺少循环条件 (condition)`,category:"missing_config"}),n.do?Zr._validateNodeRef(n.do,e,"do",i,a):a.push({...r,severity:"error",message:`while 节点 "${e.name}" 缺少循环体目标 (do)`,category:"missing_config"});break}case"groupFilter":{const o=Zr._parseNodeIds(n.nodeIds);o.length===0?a.push({...r,severity:"error",message:`groupFilter 节点 "${e.name}" 缺少过滤器节点列表 (nodeIds)`,category:"missing_config"}):o.forEach(l=>{Zr._validateNodeRef(l,e,"nodeIds",i,a)});break}case"groupAction":{const o=Zr._parseNodeIds(n.nodeIds);o.length===0?a.push({...r,severity:"error",message:`groupAction 节点 "${e.name}" 缺少动作节点列表 (nodeIds)`,category:"missing_config"}):o.forEach(l=>{Zr._validateNodeRef(l,e,"nodeIds",i,a)});break}case"iterator":{a.push({...r,severity:"warning",message:`iterator 节点 "${e.name}" 已弃用,建议替换为 for 节点`,category:"deprecated"});break}}}static _validateNodeRef(e,i,a,n,r){e.startsWith("chain:")||n.has(e)||r.push({nodeId:i.id,nodeName:i.name,nodeType:i.type,severity:"error",message:`${i.type} 节点 "${i.name}" 的 ${a} 引用了不存在的节点: "${e}"`,category:"invalid_reference"})}static _validateConnections(e,i,a,n){const r=new Map,o=new Map;i.forEach(l=>{r.set(l.id,l.type),o.set(l.id,l.name)}),e.forEach(l=>{a.has(l.fromId)||n.push({severity:"error",message:`连接的源节点不存在: "${l.fromId}"`,category:"connection"}),a.has(l.toId)||n.push({severity:"error",message:`连接的目标节点不存在: "${l.toId}"`,category:"connection"});const s=r.get(l.fromId);s&&oee.includes(s)&&n.push({nodeId:l.fromId,nodeName:o.get(l.fromId),nodeType:s,severity:"warning",message:`终端节点 "${o.get(l.fromId)}" (${s}) 不应有输出连接`,category:"connection"})})}static _validateFirstNode(e,i){var r,o;const a=((r=e.metadata)==null?void 0:r.firstNodeIndex)??0,n=((o=e.metadata)==null?void 0:o.nodes)||[];n.length>0&&(a<0||a>=n.length)&&i.push({severity:"error",message:`firstNodeIndex (${a}) 超出节点范围 (0-${n.length-1})`,category:"connection"})}static _parseNodeIds(e){return e?Array.isArray(e)?e.map(i=>String(i).trim()).filter(Boolean):typeof e=="string"?e.split(",").map(i=>i.trim()).filter(Boolean):[]:[]}}const sA=[{id:"gitee_ai",labelKey:"editor.aiProvider.gitee_ai",label:"Gitee AI",url:"https://ai.gitee.com/v1",defaultModel:"DeepSeek-V4-Flash",models:[{label:"DeepSeek-V4-Flash",value:"DeepSeek-V4-Flash"},{label:"DeepSeek-R1",value:"DeepSeek-R1"},{label:"GLM-5.1",value:"GLM-5.1"},{label:"Qwen3-Coder",value:"Qwen3-Coder"}]},{id:"deepseek",labelKey:"editor.aiProvider.deepseek",label:"DeepSeek",url:"https://api.deepseek.com",defaultModel:"deepseek-chat",models:[{label:"DeepSeek-V4-Flash",value:"deepseek-v4-flash"},{label:"DeepSeek-V3.2",value:"deepseek-chat"},{label:"DeepSeek-R1",value:"deepseek-reasoner"}]},{id:"qwen",labelKey:"editor.aiProvider.qwen",label:"通义千问",url:"https://dashscope.aliyuncs.com/compatible-mode/v1",defaultModel:"qwen-plus",models:[{label:"qwen-plus",value:"qwen-plus"},{label:"qwen-turbo",value:"qwen-turbo"},{label:"qwen-max",value:"qwen-max"}]},{id:"zhipu",labelKey:"editor.aiProvider.zhipu",label:"智谱 AI",url:"https://open.bigmodel.cn/api/paas/v4",defaultModel:"glm-5",models:[{label:"glm-5.1",value:"glm-5.1"},{label:"glm-5",value:"glm-5"},{label:"glm-4.7",value:"glm-4.7"}]},{id:"openai",labelKey:"editor.aiProvider.openai",label:"OpenAI",url:"https://api.openai.com/v1",defaultModel:"gpt-4o",models:[{label:"gpt-4o",value:"gpt-4o"},{label:"gpt-4o-mini",value:"gpt-4o-mini"}]},{id:"ollama",labelKey:"editor.aiProvider.ollama",label:"Ollama (本地)",url:"http://localhost:11434/v1",defaultModel:"llama3",models:[{label:"llama3",value:"llama3"},{label:"qwen2",value:"qwen2"},{label:"mistral",value:"mistral"}]}];function cA(t){const e=typeof window<"u"?window:void 0;return Array.isArray(e==null?void 0:e[t])?e[t]:[]}function xs(t){if(Array.isArray(t)&&t.length>0)return t;const e=cA("rulegoAiProviders");return e.length>0?e:sA}function dA(t){return Array.isArray(t)&&t.length>0?t:cA("rulegoAiEmbeddingProviders")}const lee=["string","number","boolean","object","array"],see=["string","number","boolean","object"];function cee(t){return Array.isArray(t)?t.filter(e=>e&&typeof e=="object"&&!Array.isArray(e)).map(e=>({...e})):[]}function dee(t=1){return{name:"",title:"",description:"",type:"string",order:t,required:!1,properties:[],itemsType:"string",itemsProperties:[]}}function ob(t){const e=t&&typeof t=="object"&&!Array.isArray(t)?t:{},i=e.properties&&typeof e.properties=="object"&&!Array.isArray(e.properties)?e.properties:{},a=new Set(Array.isArray(e.required)?e.required.map(String):[]);return Object.keys(i).map((n,r)=>{var c;const o=i[n]||{},l=String(o.type||"string"),s=String(((c=o.items)==null?void 0:c.type)||"string");return{name:n,title:String(o.title||""),description:String(o.description||""),type:l,order:Number.isFinite(Number(o.order))?Number(o.order):r+1,required:a.has(n),properties:l==="object"?ob(o):[],itemsType:s,itemsProperties:l==="array"&&s==="object"?ob(o.items):[]}}).sort((n,r)=>Number(n.order||0)-Number(r.order||0))}function lb(t){const e={type:"object",properties:{},required:[]};return t.filter(i=>i.name.trim()).sort((i,a)=>Number(i.order||0)-Number(a.order||0)).forEach((i,a)=>{const n=i.name.trim(),r={type:i.type||"string",order:Number.isFinite(Number(i.order))?Number(i.order):a+1};if(i.title.trim()&&(r.title=i.title.trim()),i.description.trim()&&(r.description=i.description.trim()),i.type==="object"){const o=lb(i.properties||[]);r.properties=o.properties,o.required&&(r.required=o.required)}if(i.type==="array"&&(r.items={type:i.itemsType||"string"},r.items.type==="object")){const o=lb(i.itemsProperties||[]);r.items.properties=o.properties,o.required&&(r.items.required=o.required)}e.properties[n]=r,i.required&&e.required.push(n)}),e.required.length===0&&delete e.required,e}function Uh(t){return t.map(e=>({...e,properties:Uh(e.properties||[]),itemsProperties:Uh(e.itemsProperties||[])}))}function Iee(t){return t.map((e,i)=>({...e,order:i+1}))}function IA(t,e){if(!e)return t;const i=e.split(".").filter(Boolean);let a=t,n;for(const r of i){if(r==="items"){a=(n==null?void 0:n.itemsProperties)||[];continue}if(n=a[Number(r)],!n)return[];a=n.properties||[]}return a}function gee(t,e,i){const a=Uh(t);return i(IA(a,e)),a}function uee(t,e="{}"){if(typeof t=="string")return t.trim()||e;if(t==null)return e;try{return JSON.stringify(t,null,2)}catch{return e}}function Nee(t,e={}){if(!t.trim())return e;const i=JSON.parse(t);return i&&typeof i=="object"&&!Array.isArray(i)?i:e}function sb(t){if(!t||typeof t!="object")return null;const e=t,i=String(e.name||e.Name||e.tool_name||e.type||"").trim();if(!i)return null;const a=e.params_one_of||e.paramsOneOf||e.ParamsOneOf||e.parameters||e.schema||{},n=(a==null?void 0:a.open_api_v3)||(a==null?void 0:a.openApiV3)||(a==null?void 0:a.OpenApiV3)||a;return{value:i,label:i,desc:String(e.desc||e.Desc||e.tool_desc||e.description||""),parameters:n&&typeof n=="object"&&!Array.isArray(n)?n:{},fields:Array.isArray(e.fields)?e.fields:[],defaultGlobalDir:String(e.defaultGlobalDir||e.default_global_dir||""),raw:t}}function gA(t){var a,n;const e=t&&typeof t=="object"?t:{},i=(n=(a=e==null?void 0:e.builtins)==null?void 0:a["ai/tools"])==null?void 0:n.tools;return Array.isArray(i)?i.map(sb).filter(Boolean):[]}function hee(...t){for(const e of t){if(Array.isArray(e)){const a=e.map(sb).filter(Boolean);if(a.length>0)return a}const i=gA(e);if(i.length>0)return i}return[]}function Mee(...t){for(const e of t){if(typeof e=="string"&&e.trim())return e;if(e&&typeof e=="object"){const i=e.skillPath;if(typeof i=="string"&&i.trim())return i}}return""}const Ps={default:{label:"经典",labelEn:"Classic",vars:{"--hb-bg-root":"#f6f5f5","--hb-bg-toolbar":"#ffffff","--hb-bg-sidebar":"#f6f5f5","--hb-bg-canvas":"#ffffff","--hb-bg-drawer":"#ffffff","--hb-bg-modal":"#ffffff","--hb-bg-hover":"#ecf5ff","--hb-bg-active":"#ecf5ff","--hb-bg-section":"#fafbfc","--hb-bg-input":"#ffffff","--hb-bg-tag":"#f0f0f0","--hb-text-primary":"#333333","--hb-text-secondary":"#606266","--hb-text-muted":"#888888","--hb-text-disabled":"#aaaaaa","--hb-color-primary":"#409eff","--hb-color-primary-light":"#c6e2ff","--hb-color-primary-bg":"#ecf5ff","--hb-color-success":"#27ae60","--hb-color-warning":"#fa8c16","--hb-color-danger":"#f56c6c","--hb-color-title":"#c0392b","--hb-border-color":"#dcdfe6","--hb-border-light":"#eeeeee","--hb-border-strong":"#dddddd","--hb-radius-sm":"4px","--hb-radius-md":"6px","--hb-radius-lg":"8px","--hb-shadow-sm":"0 1px 4px rgba(0,0,0,0.08)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.12)","--hb-shadow-lg":"0 8px 32px rgba(0,0,0,0.15)","--hb-overlay":"rgba(0,0,0,0.3)"}},dark:{label:"暗夜",labelEn:"Dark",vars:{"--hb-bg-root":"#1a1a2e","--hb-bg-toolbar":"#16213e","--hb-bg-sidebar":"#1a1a2e","--hb-bg-canvas":"#0f3460","--hb-bg-drawer":"#16213e","--hb-bg-modal":"#16213e","--hb-bg-hover":"#1a3a5c","--hb-bg-active":"#1a3a5c","--hb-bg-section":"#0f3460","--hb-bg-input":"#1a1a2e","--hb-bg-tag":"#0f3460","--hb-text-primary":"#e0e0e0","--hb-text-secondary":"#b0b0b0","--hb-text-muted":"#808080","--hb-text-disabled":"#555555","--hb-color-primary":"#5dade2","--hb-color-primary-light":"#1a3a5c","--hb-color-primary-bg":"#162d50","--hb-color-success":"#2ecc71","--hb-color-warning":"#f39c12","--hb-color-danger":"#e74c3c","--hb-color-title":"#e74c3c","--hb-border-color":"#2c3e50","--hb-border-light":"#1e2d3d","--hb-border-strong":"#34495e","--hb-radius-sm":"4px","--hb-radius-md":"6px","--hb-radius-lg":"8px","--hb-shadow-sm":"0 1px 4px rgba(0,0,0,0.3)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.4)","--hb-shadow-lg":"0 8px 32px rgba(0,0,0,0.5)","--hb-overlay":"rgba(0,0,0,0.6)"}},nature:{label:"自然",labelEn:"Nature",vars:{"--hb-bg-root":"#f0f4e8","--hb-bg-toolbar":"#fafdf5","--hb-bg-sidebar":"#f0f4e8","--hb-bg-canvas":"#fefffe","--hb-bg-drawer":"#fafdf5","--hb-bg-modal":"#fafdf5","--hb-bg-hover":"#e8f5e9","--hb-bg-active":"#e8f5e9","--hb-bg-section":"#f5f9f0","--hb-bg-input":"#ffffff","--hb-bg-tag":"#e8f5e9","--hb-text-primary":"#2e4a2e","--hb-text-secondary":"#4a6741","--hb-text-muted":"#7a9a70","--hb-text-disabled":"#a0bfa0","--hb-color-primary":"#4caf50","--hb-color-primary-light":"#c8e6c9","--hb-color-primary-bg":"#e8f5e9","--hb-color-success":"#388e3c","--hb-color-warning":"#f9a825","--hb-color-danger":"#d32f2f","--hb-color-title":"#2e7d32","--hb-border-color":"#c5e1a5","--hb-border-light":"#dcedc8","--hb-border-strong":"#aed581","--hb-radius-sm":"6px","--hb-radius-md":"8px","--hb-radius-lg":"12px","--hb-shadow-sm":"0 1px 4px rgba(76,175,80,0.1)","--hb-shadow-md":"0 4px 12px rgba(76,175,80,0.12)","--hb-shadow-lg":"0 8px 24px rgba(76,175,80,0.15)","--hb-overlay":"rgba(46,77,46,0.3)"}},elegant:{label:"优雅",labelEn:"Elegant",vars:{"--hb-bg-root":"#f3f0f7","--hb-bg-toolbar":"#faf8fc","--hb-bg-sidebar":"#f3f0f7","--hb-bg-canvas":"#fefcff","--hb-bg-drawer":"#faf8fc","--hb-bg-modal":"#faf8fc","--hb-bg-hover":"#ede7f6","--hb-bg-active":"#ede7f6","--hb-bg-section":"#f5f2fa","--hb-bg-input":"#ffffff","--hb-bg-tag":"#ede7f6","--hb-text-primary":"#37274a","--hb-text-secondary":"#5c4a72","--hb-text-muted":"#9575aa","--hb-text-disabled":"#bba8cc","--hb-color-primary":"#7c4dff","--hb-color-primary-light":"#d1c4e9","--hb-color-primary-bg":"#ede7f6","--hb-color-success":"#66bb6a","--hb-color-warning":"#ffa726","--hb-color-danger":"#ef5350","--hb-color-title":"#7c4dff","--hb-border-color":"#d1c4e9","--hb-border-light":"#e8e0f0","--hb-border-strong":"#b39ddb","--hb-radius-sm":"6px","--hb-radius-md":"10px","--hb-radius-lg":"14px","--hb-shadow-sm":"0 1px 6px rgba(124,77,255,0.08)","--hb-shadow-md":"0 4px 16px rgba(124,77,255,0.1)","--hb-shadow-lg":"0 8px 28px rgba(124,77,255,0.15)","--hb-overlay":"rgba(55,39,74,0.35)"}},tech:{label:"科技",labelEn:"Tech",vars:{"--hb-bg-root":"#0d1117","--hb-bg-toolbar":"#161b22","--hb-bg-sidebar":"#0d1117","--hb-bg-canvas":"#1c2333","--hb-bg-drawer":"#161b22","--hb-bg-modal":"#161b22","--hb-bg-hover":"#1f3044","--hb-bg-active":"#1f3044","--hb-bg-section":"#1c2333","--hb-bg-input":"#0d1117","--hb-bg-tag":"#1c2333","--hb-text-primary":"#c9d1d9","--hb-text-secondary":"#8b949e","--hb-text-muted":"#6e7681","--hb-text-disabled":"#484f58","--hb-color-primary":"#00bcd4","--hb-color-primary-light":"#1a4a54","--hb-color-primary-bg":"#0d3038","--hb-color-success":"#3fb950","--hb-color-warning":"#d29922","--hb-color-danger":"#f85149","--hb-color-title":"#00bcd4","--hb-border-color":"#30363d","--hb-border-light":"#21262d","--hb-border-strong":"#3d444d","--hb-radius-sm":"3px","--hb-radius-md":"6px","--hb-radius-lg":"8px","--hb-shadow-sm":"0 1px 4px rgba(0,188,212,0.1)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.4)","--hb-shadow-lg":"0 8px 32px rgba(0,0,0,0.5)","--hb-overlay":"rgba(0,0,0,0.65)"}},modern:{label:"现代",labelEn:"Modern",vars:{"--hb-bg-root":"#f8fafc","--hb-bg-toolbar":"#ffffff","--hb-bg-sidebar":"#ffffff","--hb-bg-canvas":"#ffffff","--hb-bg-drawer":"#ffffff","--hb-bg-modal":"#ffffff","--hb-bg-hover":"rgba(59,130,246,0.06)","--hb-bg-active":"rgba(59,130,246,0.1)","--hb-bg-section":"#f8fafc","--hb-bg-input":"#ffffff","--hb-bg-tag":"#f1f5f9","--hb-text-primary":"#334155","--hb-text-secondary":"#64748b","--hb-text-muted":"#94a3b8","--hb-text-disabled":"#cbd5e1","--hb-color-primary":"#3b82f6","--hb-color-primary-light":"#bfdbfe","--hb-color-primary-bg":"#eff6ff","--hb-color-success":"#22c55e","--hb-color-warning":"#eab308","--hb-color-danger":"#ef4444","--hb-color-title":"#1e40af","--hb-border-color":"rgba(0,0,0,0.08)","--hb-border-light":"rgba(0,0,0,0.04)","--hb-border-strong":"rgba(0,0,0,0.1)","--hb-radius-sm":"7px","--hb-radius-md":"10px","--hb-radius-lg":"12px","--hb-shadow-sm":"0 1px 3px rgba(0,0,0,0.06)","--hb-shadow-md":"0 4px 12px rgba(0,0,0,0.08)","--hb-shadow-lg":"0 8px 24px rgba(0,0,0,0.12)","--hb-overlay":"rgba(0,0,0,0.25)","--hb-node-selected-stroke":"#3b82f6","--hb-node-selected-shadow":"0 0 8px rgba(59,130,246,0.3)","--hb-node-hover-brightness":"0.96","--hb-node-radius":"10px","--hb-node-shadow-offset":"2px","--hb-port-fill":"#ffffff","--hb-port-stroke":"#94a3b8","--hb-port-hover-fill":"#3b82f6","--hb-port-hover-stroke":"#3b82f6","--hb-edge-stroke":"#94a3b8","--hb-edge-hover-stroke":"#3b82f6"}}};function vs(t){return{"--hb-bg-root":t.root,"--hb-bg-toolbar":t.toolbar,"--hb-bg-sidebar":t.sidebar,"--hb-bg-canvas":t.canvas,"--hb-bg-drawer":t.toolbar,"--hb-bg-modal":t.toolbar,"--hb-bg-hover":t.hover,"--hb-bg-active":t.active,"--hb-bg-section":t.section,"--hb-bg-input":t.input,"--hb-bg-tag":t.tag,"--hb-text-primary":t.text,"--hb-text-secondary":t.secondary,"--hb-text-muted":t.muted,"--hb-text-disabled":t.disabled,"--hb-color-primary":t.primary,"--hb-color-primary-light":t.primaryLight,"--hb-color-primary-bg":t.primaryBg,"--hb-color-success":t.success,"--hb-color-warning":t.warning,"--hb-color-danger":t.danger,"--hb-color-title":t.title,"--hb-border-color":t.border,"--hb-border-light":t.borderLight,"--hb-border-strong":t.borderStrong,"--hb-radius-sm":t.radiusSm||"6px","--hb-radius-md":t.radiusMd||"8px","--hb-radius-lg":t.radiusLg||"10px","--hb-shadow-sm":`0 1px 4px ${t.shadowColor}`,"--hb-shadow-md":`0 4px 12px ${t.shadowColor}`,"--hb-shadow-lg":`0 8px 28px ${t.shadowColor}`,"--hb-overlay":t.overlay,"--hb-node-selected-stroke":t.primary,"--hb-node-selected-shadow":`0 0 8px ${t.shadowColor}`,"--hb-node-hover-brightness":"0.96","--hb-node-radius":t.radiusMd||"8px","--hb-node-shadow-offset":"2px","--hb-port-fill":t.input,"--hb-port-stroke":t.muted,"--hb-port-hover-fill":t.primary,"--hb-port-hover-stroke":t.primary,"--hb-edge-stroke":t.muted,"--hb-edge-hover-stroke":t.primary}}Object.assign(Ps,{colorful:{label:"彩色",labelEn:"Colorful",vars:vs({root:"#f8fafc",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f8fafc",input:"#ffffff",tag:"#eef2ff",hover:"rgba(37,99,235,0.08)",active:"rgba(139,92,246,0.12)",text:"#172033",secondary:"#475569",muted:"#64748b",disabled:"#cbd5e1",primary:"#2563eb",primaryLight:"#bfdbfe",primaryBg:"#eff6ff",success:"#10b981",warning:"#f59e0b",danger:"#f43f5e",title:"#7c3aed",border:"#dbe4f0",borderLight:"#edf2f7",borderStrong:"#cbd5e1",shadowColor:"rgba(15,23,42,0.10)",overlay:"rgba(15,23,42,0.32)"})},"ant-blue":{label:"蚂蚁蓝",labelEn:"Ant Blue",vars:vs({root:"#f0f7ff",toolbar:"#ffffff",sidebar:"#f7fbff",canvas:"#ffffff",section:"#f0f7ff",input:"#ffffff",tag:"#e6f4ff",hover:"rgba(22,119,255,0.08)",active:"rgba(22,119,255,0.12)",text:"#102a43",secondary:"#42526e",muted:"#6b7c93",disabled:"#b8c4d6",primary:"#1677ff",primaryLight:"#91caff",primaryBg:"#e6f4ff",success:"#52c41a",warning:"#faad14",danger:"#ff4d4f",title:"#0958d9",border:"#bae0ff",borderLight:"#e6f4ff",borderStrong:"#91caff",shadowColor:"rgba(22,119,255,0.12)",overlay:"rgba(16,42,67,0.28)",radiusSm:"6px",radiusMd:"8px",radiusLg:"12px"})},material:{label:"Material",labelEn:"Material",vars:vs({root:"#f8fbff",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f1f5fb",input:"#ffffff",tag:"#e8f0fe",hover:"rgba(26,115,232,0.08)",active:"rgba(26,115,232,0.13)",text:"#202124",secondary:"#5f6368",muted:"#80868b",disabled:"#bdc1c6",primary:"#1a73e8",primaryLight:"#a8c7fa",primaryBg:"#e8f0fe",success:"#188038",warning:"#fbbc04",danger:"#ea4335",title:"#174ea6",border:"#dadce0",borderLight:"#edf1f7",borderStrong:"#c9d2df",shadowColor:"rgba(60,64,67,0.14)",overlay:"rgba(32,33,36,0.30)",radiusSm:"4px",radiusMd:"8px",radiusLg:"12px"})},tailwind:{label:"Tailwind",labelEn:"Tailwind",vars:vs({root:"#f8fafc",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f1f5f9",input:"#ffffff",tag:"#e0f2fe",hover:"rgba(14,165,233,0.08)",active:"rgba(14,165,233,0.14)",text:"#0f172a",secondary:"#475569",muted:"#64748b",disabled:"#cbd5e1",primary:"#0ea5e9",primaryLight:"#bae6fd",primaryBg:"#e0f2fe",success:"#10b981",warning:"#f59e0b",danger:"#f43f5e",title:"#0284c7",border:"#dbe4f0",borderLight:"#eef2f7",borderStrong:"#cbd5e1",shadowColor:"rgba(15,23,42,0.10)",overlay:"rgba(15,23,42,0.30)",radiusSm:"6px",radiusMd:"10px",radiusLg:"14px"})},github:{label:"GitHub",labelEn:"GitHub",vars:vs({root:"#f6f8fa",toolbar:"#ffffff",sidebar:"#ffffff",canvas:"#ffffff",section:"#f6f8fa",input:"#ffffff",tag:"#ddf4ff",hover:"rgba(9,105,218,0.08)",active:"rgba(9,105,218,0.12)",text:"#24292f",secondary:"#57606a",muted:"#6e7781",disabled:"#afb8c1",primary:"#0969da",primaryLight:"#b6e3ff",primaryBg:"#ddf4ff",success:"#1a7f37",warning:"#bf8700",danger:"#cf222e",title:"#0969da",border:"#d0d7de",borderLight:"#eaeef2",borderStrong:"#afb8c1",shadowColor:"rgba(31,35,40,0.12)",overlay:"rgba(31,35,40,0.32)",radiusSm:"6px",radiusMd:"6px",radiusLg:"8px"})},vscode:{label:"VS Code",labelEn:"VS Code",vars:vs({root:"#1e1e1e",toolbar:"#252526",sidebar:"#252526",canvas:"#1e1e1e",section:"#2d2d30",input:"#1e1e1e",tag:"#2d2d30",hover:"rgba(0,122,204,0.18)",active:"rgba(0,122,204,0.28)",text:"#f3f4f6",secondary:"#cccccc",muted:"#9ca3af",disabled:"#6b7280",primary:"#007acc",primaryLight:"#2b88d8",primaryBg:"#094771",success:"#4ec9b0",warning:"#dcdcaa",danger:"#f44747",title:"#4fc1ff",border:"#3c3c3c",borderLight:"#333333",borderStrong:"#505050",shadowColor:"rgba(0,0,0,0.42)",overlay:"rgba(0,0,0,0.62)",radiusSm:"3px",radiusMd:"5px",radiusLg:"7px"})},apple:{label:"苹果",labelEn:"Apple",vars:vs({root:"#f5f5f7",toolbar:"#ffffff",sidebar:"#fbfbfd",canvas:"#ffffff",section:"#f5f5f7",input:"#ffffff",tag:"#eef5ff",hover:"rgba(0,122,255,0.08)",active:"rgba(0,122,255,0.13)",text:"#1d1d1f",secondary:"#424245",muted:"#6e6e73",disabled:"#b7b7bd",primary:"#007aff",primaryLight:"#b9dcff",primaryBg:"#eef5ff",success:"#34c759",warning:"#ffcc00",danger:"#ff3b30",title:"#007aff",border:"#d2d2d7",borderLight:"#ebebef",borderStrong:"#c7c7cc",shadowColor:"rgba(0,0,0,0.10)",overlay:"rgba(29,29,31,0.28)",radiusSm:"7px",radiusMd:"10px",radiusLg:"14px"})}});const mee={light:"default",classic:"default",blue:"tech",antd:"ant-blue",ant:"ant-blue",google:"material",tailwindcss:"tailwind",gh:"github",vs:"vscode","visual-studio-code":"vscode",mac:"apple",macos:"apple"};function Sl(t){const e=String(t||"").trim().toLowerCase();return e?Object.prototype.hasOwnProperty.call(Ps,e)?e:mee[e]||"default":"default"}function yee(){let t="";for(const[e,i]of Object.entries(Ps)){const a=e==="default"?'.huanban_rulego_editor_root, .huanban_rulego_editor_root[data-theme="default"]':`.huanban_rulego_editor_root[data-theme="${e}"]`,n=Object.entries(i.vars).map(([r,o])=>` ${r}: ${o};`).join(`
|
|
127
127
|
`);t+=`${a} {
|
|
128
128
|
${n}
|
|
129
129
|
}
|