!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("rxjs"),require("@gsp-bef/gsp-cm-metadata"),require("@farris/ui-perfect-scrollbar"),require("@farris/ui-combo-lookup"),require("@farris/ui-datatable"),require("@farris/ui-dialog"),require("@farris/ui-combo-list"),require("@angular/common"),require("@angular/forms"),require("lodash-es"),require("@farris/ui-splitter"),require("@farris/ui-tabs"),require("@farris/ui-popover"),require("@farris/ui-datagrid"),require("@farris/ui-sidebar"),require("@farris/ui-draggable"),require("@farris/ui-treetable"),require("@farris/ui-datagrid-filter"),require("@angular/common/http"),require("@farris/ui-modal"),require("@farris/ui-messager"),require("@farris/ui-notify"),require("@angular/core"),require("@gsp-sys/sysmgr-ui"),require("@ecp-caf/caf-common"),require("@farris/rtf")):"function"==typeof define&&define.amd?define("@gsp-svc/expression",["exports","rxjs","@gsp-bef/gsp-cm-metadata","@farris/ui-perfect-scrollbar","@farris/ui-combo-lookup","@farris/ui-datatable","@farris/ui-dialog","@farris/ui-combo-list","@angular/common","@angular/forms","lodash-es","@farris/ui-splitter","@farris/ui-tabs","@farris/ui-popover","@farris/ui-datagrid","@farris/ui-sidebar","@farris/ui-draggable","@farris/ui-treetable","@farris/ui-datagrid-filter","@angular/common/http","@farris/ui-modal","@farris/ui-messager","@farris/ui-notify","@angular/core","@gsp-sys/sysmgr-ui","@ecp-caf/caf-common","@farris/rtf"],t):t((e["gsp-svc"]=e["gsp-svc"]||{},e["gsp-svc"].expression={}),e.rxjs,e.gspCmMetadata,e.uiPerfectScrollbar,e.uiComboLookup,e.uiDatatable,e.uiDialog,e.uiComboList,e.ng.common,e.ng.forms,e.lodashEs,e.uiSplitter,e.uiTabs,e.uiPopover,e.uiDatagrid,e.uiSidebar,e.uiDraggable,e.uiTreetable,e.uiDatagridFilter,e.ng.common.http,e.uiModal,e.uiMessager,e.uiNotify,e.ng.core,e.sysmgrUi,e.cafCommon,e.rtf)}(this,function(e,L,t,B,j,_,V,W,H,G,z,Y,q,U,J,$,K,Q,Z,X,ee,te,ne,y,ae,ie,re){"use strict";var se=function(e,t){return(se=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])}))(e,t)};function oe(e,t,o,l){return new(o=o||Promise)(function(n,a){function i(e){try{s(l.next(e))}catch(t){a(t)}}function r(e){try{s(l["throw"](e))}catch(t){a(t)}}function s(e){var t;e.done?n(e.value):((t=e.value)instanceof o?t:new o(function(e){e(t)})).then(i,r)}s((l=l.apply(e,t||[])).next())})}function le(n,a){var i,r,s,o={label:0,sent:function(){if(1&s[0])throw s[1];return s[1]},trys:[],ops:[]},e={next:t(0),"throw":t(1),"return":t(2)};return"function"==typeof Symbol&&(e[Symbol.iterator]=function(){return this}),e;function t(t){return function(e){return l([t,e])}}function l(e){if(i)throw new TypeError("Generator is already executing.");for(;o;)try{if(i=1,r&&(s=2&e[0]?r["return"]:e[0]?r["throw"]||((s=r["return"])&&s.call(r),0):r.next)&&!(s=s.call(r,e[1])).done)return s;switch(r=0,(e=s?[2&e[0],s.value]:e)[0]){case 0:case 1:s=e;break;case 4:return o.label++,{value:e[1],done:!1};case 5:o.label++,r=e[1],e=[0];continue;case 7:e=o.ops.pop(),o.trys.pop();continue;default:if(!(s=0<(s=o.trys).length&&s[s.length-1])&&(6===e[0]||2===e[0])){o=0;continue}if(3===e[0]&&(!s||e[1]>s[0]&&e[1]<s[3]))o.label=e[1];else if(6===e[0]&&o.label<s[1])o.label=s[1],s=e;else{if(!(s&&o.label<s[2])){s[2]&&o.ops.pop(),o.trys.pop();continue}o.label=s[2],o.ops.push(e)}}e=a.call(n,o)}catch(t){e=[6,t],r=0}finally{i=s=0}if(5&e[0])throw e[1];return{value:e[0]?e[1]:void 0,done:!0}}}function F(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],a=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return{value:(e=e&&a>=e.length?void 0:e)&&e[a++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function ce(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,i,r=n.call(e),s=[];try{for(;(void 0===t||0<t--)&&!(a=r.next()).done;)s.push(a.value)}catch(o){i={error:o}}finally{try{a&&!a.done&&(n=r["return"])&&n.call(r)}finally{if(i)throw i.error}}return s}function C(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(ce(arguments[t]));return e}a.prototype.closeWindow=function(){this.windowClosed.next()},a.prototype.setExpression=function(e){this._expressionsource.next(e)},a.prototype.getExpression=function(){return this._expressionsource.asObservable()},a.prototype.insertExpression=function(e){this._insertexpression.next(e)},a.prototype.currentExpression=function(){return this._insertexpression.asObservable()},a.prototype.pushclearExpression=function(){this._clearexpression.next()},a.prototype.clearExpression=function(){return this._clearexpression.asObservable()},a.prototype.clearFuncSelect=function(){this._clearFuncSelect.next()},a.prototype.subClearFuncSelect=function(){return this._clearFuncSelect.asObservable()},a.prototype.clearVarSelect=function(){this._clearVarSelect.next()},a.prototype.subClearVarSelect=function(){return this._clearVarSelect.asObservable()},a.decorators=[{type:y.Injectable}];var n=a;function a(){this.windowClosed=new L.Subject,this.windowClosed$=this.windowClosed.asObservable(),this._expressionsource=new L.Subject,this._insertexpression=new L.Subject,this._clearexpression=new L.Subject,this._clearFuncSelect=new L.Subject,this._clearVarSelect=new L.Subject}var pe="Session",ye="Context",ue={ExpressionTitle:"高级表达式",ExpressionSave:"保存",ExpressionCancel:"取消",CheckFront:"校验",ResetFront:"重置",AiAssistant:"智能助手",HelpFront:"说明",ImportFront:"导入",Advanced:"高级",String:"字符",Estimate:"判断",DateTime:"时间",Translate:"转换",Analytical:"数据",Math:"数学",Extend:"扩展",FunctionSemanticName:"语义化名称",FunctionName:"函数名称",FunctionParameter:"参数",Variable:"变量",VariableSessionValue:"会话",VariableContextParameter:"上下文",VariableName:"名称",VariableSemanticNameValue:"语义化名称",Entity:"数据模型",EntityAllColumn:"编号/名称",EntityCode:"编号",EntityName:"名称",EntityType:"类型",EntityPropList:"属性列表",Help:"帮助",HelpCode:"编号",HelpName:"名称",HelpDesc:"请选择",HelpDescription:"请选择",SaveButton:"保存",CancelButton:"取消",FunctionDescription:"函数说明：",VarDescription:"变量说明：",CurrentProp:"当前属性：",CurrentChosedProp:"当前选择属性：",PopverTitleDesc:"使用说明",HelpButtonDesc:{$implicit:{syntax:"语法支持",desc:'支持JavaScript语法,不支持"and、or、in、not in"等写法,可用&&代替and，||代替or',buttonDesc:"按钮",checkButtonDesc:"校验：语法校验",resetButtonDesc:"重置：清空编辑框",functionDesc:"函数",clickFunctionDesc:"单击：展示函数说明，参数，返回类型和示例",dbclickFunctionDesc:"双击：将函数插入到编辑框中",entityDesc:"数据",insertByStructureDesc:'按结构：将形如"saleOrder.code"的链式结构插值到编辑框中',insertByPropertyDesc:'按属性：将"code"属性插值到编辑框中',otherDesc:"其他",areaChangeDesc:"区域伸缩：函数区域和数据区域可以改变大小",chainedStrucDesc:'链式结构：形如"saleOrder.code"以.分隔的结构为链式结构'}},InsertType:"插值方式",InsertByStruct:"结构",InsertByAttr:"属性",GetEnum:"枚举取值",EnumJudge:"枚举判断",NewDataTypeString:"字符串",NewDataTypeByte:"字节",NewDataTypeBoolean:"布尔",NewDataTypeDate:"日期",NewDataTypeDateTime:"日期时间",NewDataTypeDecimal:"十进制数",NewDataTypeInteger:"整数",NewDataTypeEnum:"枚举",EntityType_Main:"主表",EntityType_ChildTable:"子表",EntityType_Other:"实体",EntitySet:"子表",EntityEnum:"枚举",EntityEnum_Int:"整数",EntityEnum_String:"字符串"},de={ExpressionTitle:"Advanced Expression",ExpressionSave:"Save",ExpressionCancel:"Cancel",CheckFront:"Check",ResetFront:"Reset",AiAssistant:"Assistant",HelpFront:"Tips",ImportFront:"Import",Advanced:"Advanced",String:"String",Estimate:"Estimate",DateTime:"DateTime",Translate:"Translate",Analytical:"Entity",Math:"Math",Extend:"Extend",FunctionSemanticName:"Semantic Name",FunctionName:"Name",FunctionParameter:"Parameter",Variable:"Variable",VariableSessionValue:"Session",VariableContextParameter:"Context",VariableName:"Name",VariableSemanticNameValue:"Semantic Name",Entity:"Data Model",EntityAllColumn:"Code/Name",EntityCode:"Code",EntityName:"Name",EntityType:"Type",EntityPropList:"PropertyList",Help:"Help",HelpCode:"Code",HelpName:"Name",HelpDesc:"Please Choose",HelpDescription:"Select",SaveButton:"Save",CancelButton:"Cancel",FunctionDescription:"Function Description：",VarDescription:"Var Description：",CurrentProp:"Current Property：",CurrentChosedProp:"Currently Selected Property：",PopverTitleDesc:"Description",HelpButtonDesc:{$implicit:{syntax:"Syntax Support",desc:'Supports JavaScript syntax, does not support "and, or, in, not in" etc, use && not "and", || not "or"',buttonDesc:"Button",checkButtonDesc:"Check: Syntax verification",resetButtonDesc:"Reset: Clear the edit box",functionDesc:"Function",clickFunctionDesc:"Click: Display function description, parameters, return types and examples",dbclickFunctionDesc:"Double-click: Insert the function into the edit box",entityDesc:"Data",insertByStructureDesc:'By Struct: Insert the chain structure like "saleOrder.code" into the edit box',insertByPropertyDesc:'By Attr: Insert the "code" attribute into the edit box',otherDesc:"Others",areaChangeDesc:"Area scaling: Function area and Data area can be changed in size",chainedStrucDesc:'Chain structure: The structure separated by "saleOrder.code" is a chain structure'}},InsertType:"Insert",InsertByStruct:"Struct",InsertByAttr:"Attr",GetEnum:"GetEnum",EnumJudge:"EnumJudge",NewDataTypeString:"String",NewDataTypeByte:"Byte",NewDataTypeBoolean:"Boolean",NewDataTypeDate:"Date",NewDataTypeDateTime:"DateTime",NewDataTypeDecimal:"Decimal",NewDataTypeInteger:"Integer",NewDataTypeEnum:"Enum",EntityType_Main:"MainTable",EntityType_ChildTable:"ChildTable",EntityType_Other:"Entity",EntitySet:"ChildTable",EntityEnum:"Enum",EntityEnum_Int:"Integer",EntityEnum_String:"String"},me={ExpressionTitle:"高級表達式",ExpressionSave:"保存",ExpressionCancel:"取消",CheckFront:"校驗",ResetFront:"重置",AiAssistant:"智能助手",HelpFront:"說明",ImportFront:"導入",Advanced:"高級",String:"字符",Estimate:"判斷",DateTime:"時間",Translate:"轉換",Analytical:"數據",Math:"數學",Extend:"擴展",FunctionSemanticName:"語義化名稱",FunctionName:"函數名稱",FunctionParameter:"參數",Variable:"變量",VariableSessionValue:"會話",VariableContextParameter:"上下文",VariableName:"名稱",VariableSemanticNameValue:"語義化名稱",Entity:"數據模型",EntityAllColumn:"編號/名稱",EntityCode:"編號",EntityName:"名稱",EntityType:"類型",EntityPropList:"屬性列表",Help:"幫助",HelpCode:"編號",HelpName:"名稱",HelpDesc:"請選擇",HelpDescription:"請選擇",SaveButton:"保存",CancelButton:"取消",FunctionDescription:"函數說明：",VarDescription:"變量說明：",CurrentProp:"當前屬性：",CurrentChosedProp:"當前選擇屬性：",PopverTitleDesc:"使用說明",HelpButtonDesc:{$implicit:{syntax:"語法支持",desc:'支持JavaScript語法,不支持"and、or、in、not in"等寫法,可用&&代替and，||代替or',buttonDesc:"按鈕",checkButtonDesc:"校驗：語法校驗",resetButtonDesc:"重置：清空編輯框",functionDesc:"函數",clickFunctionDesc:"單擊：展示函數說明，參數，返回類型和示例",dbclickFunctionDesc:"雙擊：將函數插入到編輯框中",entityDesc:"數據",insertByStructureDesc:'按結構：將形如"saleOrder.code"的鍊式結構插值到編輯框中',insertByPropertyDesc:'按屬性：將"code"屬性插值到編輯框中',otherDesc:"其他",areaChangeDesc:"區域伸縮：函數區域和數據區域可以改變大小",chainedStrucDesc:'鍊式結構：形如"saleOrder.code"以.分隔的結構為鍊式結構'}},InsertType:"插值方式",InsertByStruct:"結構",InsertByAttr:"屬性",GetEnum:"枚舉取值",EnumJudge:"枚舉判斷",NewDataTypeString:"字符串",NewDataTypeByte:"字節",NewDataTypeBoolean:"布爾",NewDataTypeDate:"日期",NewDataTypeDateTime:"日期時間",NewDataTypeDecimal:"十進制數",NewDataTypeInteger:"整數",NewDataTypeEnum:"枚舉",EntityType_Main:"主錶",EntityType_ChildTable:"子錶",EntityType_Other:"實體",EntitySet:"子錶",EntityEnum:"枚舉",EntityEnum_Int:"整數",EntityEnum_String:"字符串"},he={CheckSuccess:"语法校验通过!",ConfirmWhenError:"可能存在的语法问题如下, 是否仍保存?",EsprimaSplit:"】--\x3e【",ErrorText:"在第 {0} 行，第 {1} 列出现错误, 原因是【{2}】。请检查红色下划线以及附近语法是否正常!",ErrorDetail:"存在 {0} 个异常，详细信息如下：",Error:"异常",ContextNotSet:"在第 {0} 行, 上下文变量 --\x3e 未设置!",SessionNotSet:"在第 {0} 行, 会话变量 --\x3e 未设置!",ContextNotExist:"在第 {0} 行, 上下文变量【{1}】 --\x3e 不存在!",SessionNotExist:"在第 {0} 行, 会话变量【{1}】 --\x3e 不存在!",ParamIllegal:"在第 {0} 行, 函数【{1}】的参数不合法, 请检查!",ParamArrayIllegal:"在第 {0} 行, 函数【{1}】的数组类型参数不合法, 请检查!",ParamNumberWithZero:"在第 {0} 行, 函数【{1}】的参数数量不匹配, 需要 0 个或 {2} 个, 实际 {3} 个，请检查!",ParamNumber:"在第 {0} 行, 函数【{1}】的参数数量不匹配, 需要 {2} 个, 实际 {3} 个, 请检查!",SimpleNoProperty:"在第 {0} 行, 普通属性【{1}】没有子属性!",ChildNoProperty:"在第 {0} 行, 子表【{1}】没有属性【{2}】!",PropertyNoProperty:"在第 {0} 行, 字段【{1}】没有属性【{2}】!",AddTwoManyParameters:"在第 {0} 行, 函数【{1}】的参数数量过多, 请检查!",Token:"意外的记号",ILLEGAL:"非法的标识符",EndOfInpur:"意外的结束标识"},fe={CheckSuccess:"Grammar verification passed!",ConfirmWhenError:"The possible grammar issues are as follows. Do you still want to save them?",EsprimaSplit:"】--\x3e【",ErrorText:"Error in row {0}, column {1} due to 【{2}】. Please check if the red underline and nearby syntax are normal!",ErrorDetail:"There are {0} exceptions, with detailed information as follows:",Error:"Error",ContextNotSet:"In line {0}, the context variable --\x3e is not set",SessionNotSet:"In line {0}, the session variable --\x3e is not set",ContextNotExist:"In line {0}, the context variable 【{1}】 --\x3e does not exist",SessionNotExist:"In line {0}, the session variable 【{1}】 --\x3e does not exist",ParamIllegal:"In line {0}, the parameter of function 【{1}】 is illegal. Please check!",ParamArrayIllegal:"In line {0}, the array type parameter of function 【{1}】 is illegal. Please check!",ParamNumberWithZero:"In line {0}, the number of parameters for function 【{1}】 does not match. Expected 0 or {2}, actual {3}, please check!",ParamNumber:"In line {0}, the number of parameters for function 【{1}】 does not match. Expected {2}, actual {3}, please check!",SimpleNoProperty:"In line {0}, the regular attribute 【{1}】 has no sub attributes",ChildNoProperty:"In row {0}, sub table 【{1}】 does not have attribute 【{2}】",PropertyNoProperty:"In line {0}, field 【{1}】 does not have attribute 【{2}】",AddTwoManyParameters:"In line {0}, there are too many parameters for function [{1}], please check!",Token:"Unexpected token",ILLEGAL:"Unexpected token ILLEGAL",EndOfInpur:"Unexpected end of input"},ge={CheckSuccess:"語法校驗通過！",ConfirmWhenError:"可能存在的語法問題如下,是否仍保存？",EsprimaSplit:"】--\x3e【",ErrorText:"在第{0}行,第{1}列出現錯誤,原因是【{2}】。請檢查紅色底線以及附近語法是否正常！",ErrorDetail:"存在{0}個异常,詳細資訊如下:",Error:"异常",ContextNotSet:"在第{0}行,上下文變數--\x3e未設定",SessionNotSet:"在第{0}行,會話變數--\x3e未設定",ContextNotExist:"在第{0}行,上下文變數【{1}】--\x3e不存在",SessionNotExist:"在第{0}行,會話變數【{1}】--\x3e不存在",ParamIllegal:"在第{0}行,函數【{1}】的參數不合法,請檢查！",ParamArrayIllegal:"在第{0}行,函數【{1}】的數組類型參數不合法,請檢查！",ParamNumberWithZero:"在第{0}行,函數【{1}】的參數數量不匹配,需要0個或{2}個,實際{3}個,請檢查！",ParamNumber:"在第{0}行,函數【{1}】的參數數量不匹配,需要{2}個,實際{3}個,請檢查！",SimpleNoProperty:"在第{0}行,普通内容【{1}】沒有子内容",ChildNoProperty:"在第{0}行,子錶【{1}】沒有内容【{2}】",PropertyNoProperty:"在第{0}行,欄位【{1}】沒有内容【{2}】",AddTwoManyParameters:"在第{0}行，函數【{1}】的參數數量過多，請檢查！",Token:"意外的記號",ILLEGAL:"非法的識別字",EndOfInpur:"意外的結束標識"},u=(ke.prototype.transform=function(e){return this.resource[e]||e},ke.prototype.check=function(e){return this.checkResource[e]||e},ke.decorators=[{type:y.Pipe,args:[{name:"locale"}]}],ke.ctorParameters=function(){return[{type:String,decorators:[{type:y.Inject,args:[y.LOCALE_ID]}]}]},ke);function ke(e){e=localStorage.getItem("languageCode")||"zh-CHS",this.languageCode=e||"zh-CHS","en"==this.languageCode?this.resource=de:"zh-CHT"==this.languageCode?this.resource=me:this.resource=ue,"en"==this.languageCode?this.checkResource=fe:"zh-CHT"==this.languageCode?this.checkResource=ge:this.checkResource=he}var be=[{key:"if",name:"if()\n{\n\n}",params:[],description:"if条件成立，执行括号中内容",type:"Advanced",keyFront:"",className:""},{key:"if else",name:"if()\n{\n\n}\nelse\n{\n\n}",params:[],description:"if条件成立，执行括号中内容；否则执行else中内容",type:"Advanced",keyFront:"",className:""},{key:"for",name:"for(;;)\n{\n\n}",params:[],description:"for循环：示例：for(var i=0;i<5;i++){}",type:"Advanced",keyFront:"",className:""},{key:"return",name:"return ;",params:[],description:"返回值",type:"Advanced",keyFront:"",className:""},{key:"var",name:"var ",params:[],description:"变量定义",type:"Advanced",keyFront:"",className:""},{key:"true",name:"true ",params:[],description:"正确",type:"Advanced",keyFront:"",className:""},{key:"false",name:"false ",params:[],description:"错误",type:"Advanced",keyFront:"",className:""},{key:"Invoke",name:"内置扩展调用",params:[],description:"内置扩展调用函数调用方法",type:"",keyFront:"DefaultExtendFunctionProxy",className:""}],ve=[{key:"IsNull",name:"是空值",params:[{key:"obj",name:"检测对象",type:"object"}],description:"【功能】判断检测对象是否为空值（null）。检测对象为null返回true，否则返回false\n    【参数】\n        【obj】检测对象\n    【返回值】true或false\n    【示例】\n        【场景】提交单据Order，单据包含编号code字段\n        【需求】判断提交单据的编号是否为null\n        【举例】是空值(Order.code)",type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsNullOrWhiteSpace",name:"是空串",params:[{key:"obj",name:"检测对象",type:"object"}],description:'【功能】判断检测对象是否为null值或空串""。检测对象为null或""返回true，否则返回false\n    【参数】\n        【obj】检测对象\n    【返回值】true或false\n    【示例】\n        【场景】提交单据Order，单据包含编号code字段\n        【需求】判断提交单据的编号是否为null或空串""\n        【举例】是空值(Order.code)',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsNaN",name:"非数字",params:[{key:"obj",name:"检测对象",type:"object"}],description:"【功能】判断检测对象是否可以转换成数字(Double)。检测对象不能转为数字返回true，否则返回false\n    【参数】\n        【obj】检测对象\n    【返回值】true或false\n    【示例】\n        【场景】提交单据Order，单据包含单据总额sum字段\n        【需求】判断提交单据的单据总额是否为非数字\n        【举例】非数字(Order.sum)",type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsNumber",name:"是数字",params:[{key:"obj",name:"检测对象",type:"object"}],description:"【功能】判断检测对象是否可以转换成数字(Double)。检测对象能转为数字返回true，否则返回false\n    【参数】\n        【obj】检测对象\n    【返回值】true或false\n    【示例】\n        【场景】提交单据Order，单据包含单据总额sum字段\n        【需求】判断提交单据的单据总额是否是数字\n        【举例】是数字(Order.sum)",type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ExistData",name:"子表有无数据",params:[{key:"table",name:"主表.子表",type:"string"}],description:'【功能】判断子表中有没有数据。有数据返回true，无数据返回false（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n    【返回值】true或false\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips\n        【需求】判断差旅明细子表是否有数据\n        【举例】子表有无数据("Order.trips")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"CountOfChild",name:"子表数据数量",params:[{key:"table",name:"主表.子表",type:"string"}],description:'【功能】返回子表数据的数量（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n    【返回值】数量（数值类型）\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips\n        【需求】获取差旅明细子表的数量\n        【举例】子表数据数量("Order.trips")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"SortChildData",name:"子表数据排序",params:[{key:"table",name:"主表.子表",type:"string"},{key:"property",name:"子表排序字段",type:"string"},{key:"order",name:"排序方式",type:"string"}],description:'【功能】对子表数据进行排序（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段（字段类型应为数字类型）\n        【order】排序方式（"ESC"表示正序从小到大，"DESC"表示倒序从大到小）\n    【返回值】无\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差费用money字段\n        【需求】按照出差费用money字段对差旅明细从小到大排序\n        【举例】子表数据排序("Order.trips","money","ESC")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IncludedInList",name:"是否在列表中",params:[{key:"property",name:"字段",type:"object"},{key:"list",name:"数据列表",type:"list"}],description:'【功能】：判断字段是否在数据列表中存在。字段在列表中存在返回true，不存在返回false。支持判断字符和数字类型\n    【参数】\n        【property】字段\n        【list】数据列表\n    【返回值】true或false\n    【示例】是否在列表中(Order.name,["Zs","Ls"])\n    【示例】是否在列表中(Order.quantity,[100,200])',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"CountByProp",name:"子表列非空数",params:[{key:"table",name:"主表.子表",type:"string"},{key:"property",name:"子表字段",type:"string"}],description:'【功能】：统计子表某字段不为null的数据数量（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段\n    【返回值】子表字段不为null的数量（数值类型）\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差方式way字段\n        【需求】统计差旅明细子表trips中出差方式way不为空的数据数量\n        【举例】子表列非空数("Order.trips","way")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"SumByProp",name:"子表字段求和",params:[{key:"table",name:"主表.子表",type:"string"},{key:"property",name:"子表字段",type:"string"}],description:'【功能】求和子表某字段（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段（数值类型）\n    【返回值】子表某字段的和（数值类型）\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差费用money字段\n        【需求】对差旅明细子表trips的出差费用money字段求和\n        【举例】子表字段求和("Order.trips","money")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"AvgByProp",name:"子表列平均值",params:[{key:"table",name:"主表.子表",type:"string"},{key:"property",name:"子表字段",type:"string"}],description:'【功能】求子表某字段的平均值（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段（数值类型）\n    【返回值】子表某字段的平均值（数值类型）\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差费用money字段\n        【需求】获取差旅明细子表trips的出差费用money的平均值\n        【举例】子表列平均值("Order.trips","money")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"MaxByProp",name:"子表列最大值",params:[{key:"table",name:"主表.子表",type:"string"},{key:"property",name:"子表字段",type:"string"}],description:'【功能】求子表某字段的最大值（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段（数值类型）\n    【返回值】子表某字段的最大值（数值类型）\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差费用money字段\n        【需求】获取差旅明细子表trips的出差费用money的最大值\n        【举例】子表列最大值("Order.trips","money")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"MinByProp",name:"子表列最小值",params:[{key:"table",name:"主表.子表",type:"string"},{key:"property",name:"子表字段",type:"string"}],description:'【功能】求子表某字段的最小值（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段（数值类型）\n    【返回值】子表某字段的最小值（数值类型）\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差费用money字段\n        【需求】获取差旅明细子表trips的出差费用money的最小值\n        【举例】子表列最小值("Order.trips","money")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsExistRecord",name:"子表有无等于匹配值",params:[{key:"table",name:"主表.子表",type:"string"},{key:"property",name:"子表字段",type:"string"},{key:"match",name:"匹配值",type:"string"}],description:'【功能】判断子表某字段是否存在等于匹配值的数据（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段\n        【match】匹配值\n    【返回值】true或false\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差方式way\n        【需求】判断差旅明细子表trips是否存在出差方式way等于\'火车\'的数据\n        【举例】子表有无等于匹配值("Order.trips","way","火车")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsContainMatch",name:"子表有无包含匹配值",params:[{key:"table",name:"主表.子表",type:"string"},{key:"property",name:"子表字段",type:"string"},{key:"match",name:"匹配值",type:"string"}],description:'【功能】判断子表某字段是否存在包含匹配值的数据（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段\n        【match】匹配值\n    【返回值】true或false\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差方式way\n        【需求】判断差旅明细子表trips是否存在出差方式way包含匹配值\'飞机\'的数据\n        【举例】子表有无包含匹配值("Order.trips","way","飞机")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ListGreaterThan",name:"子表有无大于匹配值",params:[{key:"table",name:"主表.子表",type:"string"},{key:"property",name:"子表字段",type:"string"},{key:"match",name:"匹配值",type:"double"}],description:'【功能】判断子表某字段是否存在大于匹配值的数据（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段（数值类型）\n        【match】匹配值\n    【返回值】true或false\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差距离distance\n        【需求】判断差旅明细子表trips是否存在出差距离distance大于1000的数据\n        【举例】子表有无大于匹配值("Order.trips","distance",1000)',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ListLessThan",name:"子表有无小于匹配值",params:[{key:"table",name:"主表.子表",type:"string"},{key:"property",name:"子表字段",type:"string"},{key:"match",name:"匹配值",type:"double"}],description:'【功能】判断子表某字段是否存在小于匹配值的数据（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段（数值类型）\n        【match】匹配值\n    【返回值】true或false\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差距离distance\n        【需求】判断差旅明细子表trips是否存在出差距离distance小于10的数据\n        【举例】子表有无小于匹配值("Order.trips","distance",10)',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ListStartWith",name:"子表有无以匹配值开头",params:[{key:"table",name:"主表.子表",type:"string"},{key:"property",name:"子表字段",type:"string"},{key:"match",name:"匹配值",type:"string"}],description:'【功能】判断子表某字段有无开头是匹配值的数据（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段\n        【match】匹配值\n    【返回值】true或false\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含编号code字段\n        【需求】判断差旅明细子表trips是否存在编号code字段以\'0001\'开头的数据\n        【举例】子表有无以匹配值开头("Order.trips","code","0001")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ListEndWith",name:"子表有无以匹配值结尾",params:[{key:"table",name:"主表.子表",type:"string"},{key:"property",name:"子表字段",type:"string"},{key:"match",name:"匹配值",type:"string"}],description:'【功能】判断子表某字段有无结尾是匹配值的数据（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段\n        【match】匹配值\n    【返回值】true或false\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含编号code字段\n        【需求】判断差旅明细子表trips是否存在编号code字段以\'0002\'结尾的数据\n        【举例】子表有无以匹配值结尾("Order.trips","code","0002")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"GetComputeJsonData",name:"子表字段取JSON串",params:[{key:"table",name:"主表.子表",type:"string"},{key:"property",name:"子表字段",type:"string"}],description:'【功能】判断子表某字段有无结尾是匹配值的数据（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段\n    【返回值】子表某字段的JSON格式\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含编号code字段\n        【需求】将差旅明细子表trips编号code字段用一个列表统计数据，并返回序列化后的值\n        【举例】子表字段取JSON串("Order.trips","code")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"MultiplyChildNumber",name:"子表属性乘积求和",params:[{key:"table",name:"主表.子表",type:"string"},{key:"prop1",name:"属性一",type:"string"},{key:"prop2",name:"属性二",type:"string"}],description:'【功能】对子表的两个数字类型属性，先做乘积，然后求和（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【prop1】属性一（数值类型）\n        【prop2】属性二（数值类型）\n    【返回值】求和值（数值类型）\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差天数days、出差费用money\n        【需求】获取差旅明细的总费用，即子表出差天数*出差费用的总和\n        【举例】子表属性乘积求和("Order.trips","days","money")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"MinValueOfPeriod",name:"时间范围内取最小值",params:[{key:"table",name:"主表.子表",type:"string"},{key:"timeProp",name:"比较时间字段",type:"string"},{key:"valueProp",name:"取值字段",type:"string"},{key:"startTime",name:"起始时间",type:"string"},{key:"endTime",name:"结束时间",type:"string"}],description:'【功能】在指定时间范围内，取子表某字段的最小值（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【timeProp】比较时间字段（字段类型应为时间类型）\n        【valueProp】取值字段（字段类型应为数字类型）\n        【startTime】起始时间（支持\'yyyy-MM-dd\' 或 \'yyyy-MM-dd hh:mm:ss\'）\n        【endTime】结束时间（支持\'yyyy-MM-dd\' 或 \'yyyy-MM-dd hh:mm:ss\'）\n    【返回值】时间范围内，子表某字段的最小值\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差费用money字段，出差日期date字段\n        【需求】获取2022-10-01到2022-10-07时间段内，哪一天的出差费用money最小\n        【举例】时间范围内取最小值("Order.trips","date","money","2022-10-01","2022-10-07")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"MaxValueOfPeriod",name:"时间范围内取最大值",params:[{key:"table",name:"主表.子表",type:"string"},{key:"timeProp",name:"比较时间字段",type:"string"},{key:"valueProp",name:"取值字段",type:"string"},{key:"startTime",name:"起始时间",type:"string"},{key:"endTime",name:"结束时间",type:"string"}],description:'【功能】在指定时间范围内，取子表某字段的最大值（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【timeProp】比较时间字段（字段类型应为时间类型）\n        【valueProp】取值字段（字段类型应为数字类型）\n        【startTime】起始时间（支持\'yyyy-MM-dd\' 或 \'yyyy-MM-dd hh:mm:ss\'）\n        【endTime】结束时间（支持\'yyyy-MM-dd\' 或 \'yyyy-MM-dd hh:mm:ss\'）\n    【返回值】时间范围内，子表某字段的最大值\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差费用money字段，出差日期date字段\n        【需求】获取2022-10-01到2022-10-07时间段内，哪一天的出差费用money最大\n        【举例】时间范围内取最大值("Order.trips","date","money","2022-10-01","2022-10-07")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"AvgValueOfPeriod",name:"时间范围内取平均值",params:[{key:"table",name:"主表.子表",type:"string"},{key:"timeProp",name:"比较时间字段",type:"string"},{key:"valueProp",name:"取值字段",type:"string"},{key:"startTime",name:"起始时间",type:"string"},{key:"endTime",name:"结束时间",type:"string"}],description:'【功能】在指定时间范围内，取子表某字段的平均值（所有参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【timeProp】比较时间字段（字段类型应为时间类型）\n        【valueProp】取值字段（字段类型应为数字类型）\n        【startTime】起始时间（支持\'yyyy-MM-dd\' 或 \'yyyy-MM-dd hh:mm:ss\'）\n        【endTime】结束时间（支持\'yyyy-MM-dd\' 或 \'yyyy-MM-dd hh:mm:ss\'）\n    【返回值】时间范围内，子表某字段的平均值\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差费用money字段，出差日期date字段\n        【需求】获取2022-10-01到2022-10-07时间段内，平均的出差费用money是多少\n        【举例】时间范围内取平均值("Order.trips","date","money","2022-10-01","2022-10-07")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"GetSessionValue",name:"获取会话变量",params:[{key:"name",name:"名称",type:"string"}],description:'【功能】获取用户会话变量的值\n    【参数】\n        【name】会话变量名\n    【返回值】对象(object)\n    【示例】\n        【举例】获取会话变量("会话变量一")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"GetContextParameter",name:"获取上下文变量",params:[{key:"name",name:"名称",type:"string"}],description:'【功能】获取上下文变量的值\n    【参数】\n        【name】上下文变量名\n    【返回值】对象(object)\n    【示例】\n        【举例】获取上下文变量("上下文变量一")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"getComputeJsonData",name:"根据属性名获取JSON串"},{key:"GetInjectedEntity",name:"根据注入名获取注入对象",params:[{key:"name",name:"注入名",type:"string"}],description:'【功能】获取运行时注入对象的实际对象(参数用""包起来），不支持获取属性    \n    【参数】\n        【name】注入名\n    【返回值】对象(object)\n    【示例】\n        【举例】根据注入名获取注入对象("注入名")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"GetChainedPropertyValue",name:"根据属性名获取属性值",params:[{key:"property",name:"属性名",type:"string"}],description:'【功能】：获取运行时注入属性的实际值(参数用""包起来）\n    【参数】\n        【property】属性名\n    【返回值】对象(object)\n    【示例】\n        【举例】根据属性名获取属性值("属性名")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ParseEnum",name:"枚举取值",params:[{key:"name",name:"枚举字段",type:"string"},{key:"map",name:"枚举集合",type:"obj"}],description:"【功能】：将枚举解析为显示值【返回值类型】：数字或字符串\n【示例】：枚举显示值(SysApproval.version,Enum.SysApproval.version) == '通过'【返回值】：\"true\"",type:"Special",keyFront:"DefaultFunction",className:""}],Ee=[{key:"DayDifference",name:"天数差",params:[{key:"date1",name:"时间一",type:"obj"},{key:"date2",name:"时间二",type:"obj"}],description:'【功能】计算两个时间的天数差，计算时以年月日为准，自动忽略时分秒。时间一若早于时间二，返回正数；若晚于时间二，返回负数\n    【参数】\n        【date1】时间一\n        【date2】时间二\n    【返回值】两个日期的天数差\n    【示例】\n        【示例一】天数差("2024-01-01","2024-01-11")\n        【返回值】10\n        【示例一】天数差("2024-01-11","2024-01-01")\n        【返回值】-10',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"DateTimeAddDays",name:"增加天数",params:[{key:"date",name:"日期时间",type:"string"},{key:"value",name:"增加天数",type:"int"}],description:'【功能】：在指定日期时间上增加指定天数\n【返回值类型】：日期时间(DateTime)\n【示例】：增加天数("2019-01-30T10:00:00+08:00",2)【返回值】:2019-02-01T10:00+08:00',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"DateTimeAddYears",name:"增加年数",params:[{key:"date",name:"日期时间",type:"string"},{key:"value",name:"增加年数",type:"int"}],description:'【功能】：在指定日期时间上增加指定年数\n【返回值类型】：日期时间(DateTime)\n【示例】：增加年数("2019-01-30T10:00:00+08:00",2)【返回值】:2021-01-30T10:00+08:00',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"DateTimeAddMonths",name:"增加月数",params:[{key:"date",name:"日期时间",type:"string"},{key:"value",name:"增加月数",type:"int"}],description:'【功能】：在指定日期时间上增加指定的月数\n【返回值类型】：日期时间(DateTime)\n【示例】：增加月数("2019-01-30T10:00:00+08:00",1)【返回值】:2019-02-28T10:00+08:00',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"GetFirstDayOfMonth",name:"日期所在月第一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：获取指定日期时间所在月的第一天的日期\n【返回值类型】：日期时间(DateTime)\n【示例】：日期所在月第一天("2019-01-30T10:00:00+08:00")【返回值】:2019-01-01',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"GetLastDayOfMonth",name:"日期所在月最后一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：获取指定日期时间所在月的最后一天的日期\n【返回值类型】：日期时间(DateTime)\n【示例】：日期所在月最后一天("2019-01-30T10:00:00+08:00")【返回值】:2019-01-31',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"GetDateTimeNow",name:"当前日期时间",params:[],description:"【功能】：获取当前的日期时间\n【返回值类型】：日期时间(DateTime)\n【示例】：当前日期时间()【返回值】:2019-01-30T12:00:00.000+08:00",type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"CompareDate",name:"比较两个时间",params:[{key:"date1",name:"日期时间一",type:"string"},{key:"date2",name:"日期时间二",type:"string"}],description:'【功能】：比较两个时间值，并返回一个整数\n【返回值类型】：数值(int32)日期1早于日期2，返回-1;日期1等于日期2，返回0;日期1晚于日期2，返回1\n【示例】：比较两个时间("2019-01-30T10:00:00+08:00","2019-02-01T10:00:00+08:00")【返回值】：-1',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FormatDate",name:"格式化当前日期",params:[{key:"format",name:"格式",type:"string"}],description:'【功能】：使用指定的格式将当前日期时间值转换为其等效的字符串表示形式\n【返回值类型】：字符串(String)\n【示例】：格式化当前日期("yyyy-MM-dd HH:mm:ss")【返回值】："2019-01-30 01:00:00"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FormatDefineDate",name:"格式化指定日期",params:[{key:"format",name:"格式",type:"string"},{key:"date",name:"日期时间",type:"string"}],description:'【功能】：使用指定的格式将指定的日期时间值转换为其等效的字符串表示形式\n【返回值类型】：字符串(String)\n【示例】：格式化指定日期("yyyy-MM-dd HH:mm:ss","2019-01-30 01:00:00")【返回值】："2019-01-30 01:00:00"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"Today",name:"今天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的今天，格式为"yyyy-MM-dd"形式，无参数则默认返回当前日期的今天\n【返回值类型】：字符串(String)\n【示例】：今天("2019-01-30T10:00:00+08:00")【返回值】："2019-01-30"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"Yesterday",name:"昨天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的昨天，格式为"yyyy-MM-dd"形式，无参数则默认返回当前日期的昨天\n【返回值类型】：字符串(String)\n【示例】：昨天("2019-01-30T10:00:00+08:00")【返回值】："2019-01-29"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"Tomorrow",name:"明天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的明天，格式为"yyyy-MM-dd"形式，无参数则默认返回当前日期的明天\n【返回值类型】：字符串(String)\n【示例】：明天("2019-01-30T10:00:00+08:00")【返回值】："2019-01-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"ThisYear",name:"本年",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的本年，格式为"yyyy"形式，无参数则默认返回当前日期的本年\n【返回值类型】：字符串(String)\n【示例】：本年("2019-01-30T10:00:00+08:00")【返回值】："2019"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastYear",name:"去年",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的去年，格式为"yyyy"形式，无参数则默认返回当前日期的去年\n【返回值类型】：字符串(String)\n【示例】：去年("2019-01-30T10:00:00+08:00")【返回值】："2018"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"NextYear",name:"明年",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的明年，格式为"yyyy"形式，无参数则默认返回当前日期的明年\n【返回值类型】：字符串(String)\n【示例】：明年("2019-01-30T01:00:00+08:00")【返回值】："2020"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"ThisMonth",name:"本月",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的本月，格式为"MM"形式，无参数则默认返回当前日期的本月\n【返回值类型】：字符串(String)\n【示例】：本月("2019-01-30T01:00:00+08:00")【返回值】："1"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastMonth",name:"上月",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的上月，格式为"MM"形式，无参数则默认返回当前日期的上月\n【返回值类型】：字符串(String)\n【示例】：上月("2019-02-30 01:00:00")【返回值】："1"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"NextMonth",name:"下月",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的下月，格式为"MM"形式，无参数则默认返回当前日期的下月\n【返回值类型】：字符串(String)\n【示例】：下月("2019-01-30T01:00:00+08:00")【返回值】："2"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"ThisWeek",name:"本周",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期在本年的第几周，格式为"ww"形式，无参数则默认返回当前日期在本年的第几周\n【返回值类型】：字符串(String)\n【示例】：本周("2019-01-30T01:00:00+08:00")【返回值】："5"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastWeek",name:"上周",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的上周，格式为"ww"形式，无参数则默认返回当前日期的上周\n【返回值类型】：字符串(String)\n【示例】：上周("2019-01-30T01:00:00+08:00")【返回值】："4"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"NextWeek",name:"下周",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的下周，格式为"ww"形式，无参数则默认返回当前日期的下周\n【返回值类型】：字符串(String)\n【示例】：下周("2019-01-30T01:00:00+08:00")【返回值】："6"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"DayOfWeek",name:"星期几",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期是本周的星期几，格式为"n"，无参数则默认返回当前日期是本周的星期几\n【返回值类型】：字符串(String)\n【示例】：星期几("2019-01-30T01:00:00+08:00")【返回值】："3"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfWeek",name:"本周第一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的本周第一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的本周第一天\n【返回值类型】：字符串(String)\n【示例】：本周第一天("2019-01-30T01:00:00+08:00")【返回值】："2019-01-28"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfWeek",name:"本周最后一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的本周最后一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的本周第一天\n【返回值类型】：字符串(String)\n【示例】：本周最后一天("2019-01-30T01:00:00+08:00")【返回值】："2019-02-03"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfLastWeek",name:"上周第一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的上周第一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的上周第一天\n【返回值类型】：字符串(String)\n【示例】：上周第一天("2019-01-30T01:00:00+08:00")【返回值】："2019-01-21"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfLastWeek",name:"上周最后一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的上周最后一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的上周最后一天\n【返回值类型】：字符串(System.String)\n【示例】：上周最后一天("2019-01-30T01:00:00+08:00")【返回值】："2019-01-27"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfNextWeek",name:"下周第一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的下周第一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的下周第一天\n【返回值类型】：字符串(String)\n【示例】：下周第一天("2019-01-30T01:00:00+08:00")【返回值】："2019-02-04"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfNextWeek",name:"下周最后一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的下周最后一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的下周最后一天\n【返回值类型】：字符串(String)\n【示例】：下周最后一天("2019-01-30T01:00:00+08:00")【返回值】："2019-02-10"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfMonth",name:"本月第一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的本月第一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的本月第一天\n【返回值类型】：字符串(String)\n【示例】：本月第一天("2019-01-30T01:00:00+08:00")【返回值】："2019-01-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfMonth",name:"本月最后一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的本月最后一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的本月最后一天\n【返回值类型】：字符串(String)\n【示例】：本月最后一天("2019-01-30T01:00:00+08:00")【返回值】："2019-01-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfLastMonth",name:"上月第一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的上月第一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的上月第一天\n【返回值类型】：字符串(String)\n【示例】：上月第一天("2019-01-30T01:00:00+08:00")【返回值】："2018-12-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfLastMonth",name:"上月最后一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的上月最后一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的上月最后一天\n【返回值类型】：字符串(String)\n【示例】：上月最后一天("2019-01-30T01:00:00+08:00")【返回值】："2018-12-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfNextMonth",name:"下月第一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的下月第一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的下月第一天\n【返回值类型】：字符串(String)\n【示例】：下月第一天("2019-01-30T01:00:00+08:00")【返回值】："2019-02-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfNextMonth",name:"下月最后一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的下月最后一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的下月最后一天\n【返回值类型】：字符串(String)\n【示例】：下月最后一天("2019-01-30T01:00:00+08:00")【返回值】："2019-02-28"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfYear",name:"本年第一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的本年第一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的本年第一天\n【返回值类型】：字符串(String)\n【示例】：本年第一天("2019-01-30T01:00:00+08:00")【返回值】："2019-01-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfYear",name:"本年最后一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的本年最后一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的本年最后一天\n【返回值类型】：字符串(String)\n【示例】：本年最后一天("2019-01-30T01:00:00+08:00")【返回值】："2019-12-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfLastYear",name:"上年第一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的上年第一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的上年第一天\n【返回值类型】：字符串(String)\n【示例】：上年第一天("2019-01-30T01:00:00+08:00")【返回值】："2018-01-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfLastYear",name:"上年最后一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的上年最后一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的上年最后一天\n【返回值类型】：字符串(String)\n【示例】：上年最后一天("2019-01-30T01:00:00+08:00")【返回值】："2018-12-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfNextYear",name:"下年第一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的下年第一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的下年第一天\n【返回值类型】：字符串(String)\n【示例】：下年第一天("2019-01-30T01:00:00+08:00")【返回值】："2020-01-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfNextYear",name:"下年最后一天",params:[{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定日期的下年最后一天，格式为"yyyy-MM-dd"，无参数则默认返回当前日期的下年最后一天\n【返回值类型】：字符串(String)\n【示例】：下年最后一天("2019-01-30T01:00:00+08:00")【返回值】："2020-12-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"GetDate",name:"返回指定格式的日期",params:[{key:"format",name:"格式",type:"string"},{key:"date",name:"日期时间",type:"string"}],description:'【功能】：返回指定形式的日期，无参数则默认返回当前日期的指定格式日期\n【返回值类型】：字符串(String)\n DD：今天    LD：昨天    ND：明天    YY：本年    LY：上年    NY：下年    MM：本月    LM：上月    NM：下月  \n  WD：星期几 WW：本周    LW：上周    NW：下周    FDW：本周首日    LDW：本周尾日  \n  FDLW：上周首日    LDLW：上周尾日    FDNW：下周首日    LDNW：下周尾日  \n FDM：本月首日  LDM：本月尾日  FDLM：上月首日  LDLM：上月尾日  FDNM：下月首日  LDNM：下月尾日  \n  FDY：本年首日  LDY：本年尾日  FDLY：上年首日  LDLY：上年尾日  FDNY：下年首日  LDNY：下年尾日  \n  【示例】：返回指定格式的日期("LD","2019-01-30T01:00:00+08:00")【返回值】："2019-01-29"',type:"DateTime",keyFront:"DefaultFunction",className:""}],xe=[{key:"NumberThousandSeparator",name:"数字千位分隔",params:[{key:"property",name:"数字类型字段",type:"int32"}],description:"【功能】对数字添加千位分割符，以逗号作为千位分隔符\n【参数】\n  【property】字段（链式结构）\n【返回值】字符型\n【示例】\n  【场景】提交单据Order，单据包含总费用totalCost\n  【需求】优化总费用展示，对总费用添加千位分隔符\n  【举例】数字千位分隔(Order.totalCost)\n  【返回值】1,234,567.89",type:"Math",keyFront:"DefaultFunction",className:""},{key:"abs",name:"绝对值",params:[{key:"value",name:"数值",type:"double"}],description:"【功能】：返回一个数值的绝对值\n【返回值类型】：数值(Double)\n【示例】：绝对值(-1.5)【返回值】：1.5",type:"Math",keyFront:"Math",className:""},{key:"Round",name:"四舍五入"},{key:"round",name:"四舍五入",params:[{key:"value1",name:"数值",type:"double"},{key:"value2",name:"小数位数",type:"int32"}],description:"【功能】：根据小数位数精度，对数值四舍五入\n【value1】：数值\n【value2】：四舍五入小数位数\n【返回值类型】：数值(Double)\n【示例】：四舍五入(1.52,1)【返回值】：1.5",type:"Math",keyFront:"DefaultFunction",className:""},{key:"random",name:"随机数",params:[],description:"【功能】：随机生成大于等于 0.0 且小于 1.0 的伪随机值\n【返回值类型】：数值(Double)\n【示例】：随机数()【返回值】：0.624508349393",type:"Math",keyFront:"Math",className:""},{key:"sin",name:"正弦",params:[{key:"value",name:"数值",type:"double"}],description:"【功能】：返回一个数字的正弦值\n【返回值类型】：数值(Double)一个以弧度表示的角\n【示例】：正弦(1)【返回值】：0.84187098",type:"Math",keyFront:"Math",className:""},{key:"cos",name:"余弦",params:[{key:"value",name:"数值",type:"double"}],description:"【功能】：返回一个数字的余弦值\n【返回值类型】：数值(Double)一个以弧度表示的角\n【示例】：余弦(3)【返回值】：-0.9899924",type:"Math",keyFront:"Math",className:""},{key:"ceil",name:"向上舍入",params:[{key:"value",name:"数值",type:"double"}],description:"【功能】：返回大于或等于函数参数，并且与之最接近的整数\n【返回值类型】：数值(Int32)\n【示例】：向上舍入(3.2)【返回值】：4",type:"Math",keyFront:"Math",className:""},{key:"floor",name:"向下舍入",params:[{key:"value",name:"数值",type:"double"}],description:"【功能】：返回小于或等于函数参数，并且与之最接近的整数\n【返回值类型】：数值(Int32)\n【示例】：向下舍入(3.2)【返回值】：3",type:"Math",keyFront:"Math",className:""},{key:"BankerRound",name:"银行家舍入"},{key:"bankerRound",name:"银行家舍入",params:[{key:"value1",name:"数值",type:"double"},{key:"value2",name:"小数位数",type:"int32"}],description:"【功能】：使用银行家舍入标准，把指定数字舍入为最接近的数字\n【value1】：舍入数值\n【value2】：舍入小数位数\n【返回值类型】：数值(Double)\n【示例】：银行家舍入(36.124,2)【返回值】：36.12",type:"Math",keyFront:"DefaultFunction",className:""}],De=[{key:"StringSubstring",name:"取子字符串"},{key:"SubString",name:"取子字符串",params:[{key:"data",name:"字符串",type:"str"},{key:"start",name:"起始位置",type:"int"},{key:"length",name:"长度",type:"int"}],description:'【功能】：从字符串中指定位置开始，截取指定长度的字符串并返回\n【返回值类型】：字符串(String)\n【示例】：取子字符串("ABCDEFG",2,3)【返回值】："CDE"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringLength",name:"取字符串长度"},{key:"Length",name:"取字符串长度",params:[{key:"data",name:"字符串",type:"str"}],description:'【功能】：获取字符串的长度\n【返回值类型】：数值(Int32)\n【示例】：取字符串长度("ABCDEF")【返回值】：6',type:"String",keyFront:"DefaultFunction",className:""},{key:"Contains",name:"是否包含",params:[{key:"data",name:"字符串",type:"str"},{key:"target",name:"目标字符串",type:"str"}],description:'【功能】：判断字符串中是否包含目标字符串\n【返回值类型】：布尔(Boolean)\n【示例】：是否包含(salesorder.code,"表达式")【返回值】：false',type:"String",keyFront:"DefaultFunction",className:""},{key:"NotContains",name:"是否不包含",params:[{key:"data",name:"字符串",type:"str"},{key:"target",name:"目标字符串",type:"str"}],description:'【功能】：判断字符串中是否不包含目标字符串\n【返回值类型】：布尔(Boolean)\n【示例】：是否不包含(salesorder.code,"表达式")【返回值】：true',type:"String",keyFront:"DefaultFunction",className:""},{key:"StartsWith",name:"开头是",params:[{key:"data",name:"字符串",type:"str"},{key:"target",name:"目标字符串",type:"str"}],description:'【功能】：判断字符串是否以目标字符串开头\n【返回值类型】：布尔(Boolean)\n【示例】：开头是(salesorder.code,"表达式")【返回值】：false',type:"String",keyFront:"DefaultFunction",className:""},{key:"NotStartsWith",name:"开头不是",params:[{key:"data",name:"字符串",type:"str"},{key:"target",name:"目标字符串",type:"str"}],description:'【功能】：判断字符串是否不以目标字符串开头\n【返回值类型】：布尔(Boolean)\n【示例】：开头不是(salesorder.code,"表达式")【返回值】：true',type:"String",keyFront:"DefaultFunction",className:""},{key:"EndsWith",name:"结尾是",params:[{key:"data",name:"字符串",type:"str"},{key:"target",name:"目标字符串",type:"str"}],description:'【功能】：判断字符串是否以目标字符串结尾\n【返回值类型】：布尔(Boolean)\n【示例】：结尾是(salesorder.code,"表达式")【返回值】：false',type:"String",keyFront:"DefaultFunction",className:""},{key:"NotEndsWith",name:"结尾不是",params:[{key:"data",name:"字符串",type:"str"},{key:"target",name:"目标字符串",type:"str"}],description:'【功能】：判断字符串是否不以目标字符串结尾\n【返回值类型】：布尔(Boolean)\n【示例】：结尾不是(salesorder.code,"表达式")【返回值】：false',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringReplace",name:"字符串替换"},{key:"Replace",name:"字符串替换",params:[{key:"data",name:"字符串",type:"str"},{key:"oldVal",name:"被替换值",type:"str"},{key:"newVal",name:"替换值",type:"str"}],description:'【功能】：将字符串中的"被替换值"替换为"替换值"\n【返回值类型】：字符串(String)\n【示例】：字符串替换("123412","12","00")【返回值】："003400"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringToUpper",name:"转大写"},{key:"ToUpper",name:"转大写",params:[{key:"data",name:"字符串",type:"str"}],description:'【功能】：将字符串转换为大写\n【返回值类型】：字符串(String)\n【示例】：转大写("abc")【返回值】："ABC"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringToLower",name:"转小写"},{key:"ToLower",name:"转小写",params:[{key:"data",name:"字符串",type:"str"}],description:'【功能】：将字符串转换为小写\n【返回值类型】：字符串(String)\n【示例】：转小写("ABC")【返回值】："abc"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringIndexOf",name:"首个匹配字符索引"},{key:"IndexOf",name:"首个匹配字符索引",params:[{key:"data",name:"字符串",type:"str"},{key:"target",name:"目标字符串",type:"str"}],description:'【功能】：在字符串中检索目标字符串，找到首个匹配的字符串并返回索引位置(从0开始)。如果未找到则返回-1，如果目标字符串为空则返回0，如果原字符串为null则返回-1\n【返回值类型】：数值(Int32)\n【示例】：首个匹配字符索引("12001234012","01")【返回值】：3\n【示例】：首个匹配字符索引("12002323","34")【返回值】：-1\n【示例】：首个匹配字符索引("120011","")【返回值】：0',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringLastIndexOf",name:"最后匹配字符索引"},{key:"LastIndexOf",name:"最后匹配字符索引",params:[{key:"data",name:"字符串",type:"str"},{key:"target",name:"目标字符串",type:"str"}],description:'【功能】：在字符串中检索目标字符串，找到最后一个匹配的字符串后返回索引位置(从0开始)。如果未找到则返回-1，如果目标字符串为空串则返回原字符串长度，如果原字符串为null则返回-1\n【返回值类型】：数值(Int32)\n【示例】：最后匹配字符索引("12001234012","01")【返回值】：8\n【示例】：最后匹配字符索引("12002323","34")【返回值】：-1\n【示例】：最后匹配字符索引("120011","")【返回值】：6',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringTrimStart",name:"删除头部空格"},{key:"TrimStart",name:"删除头部空格",params:[{key:"data",name:"字符串",type:"str"}],description:'【功能】：删除字符串的头部空格并返回\n【返回值类型】：字符串(String)\n【示例】：删除头部空格("    ABC")【返回值】："ABC"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringTrimEnd",name:"删除尾部空格"},{key:"TrimEnd",name:"删除尾部空格",params:[{key:"data",name:"字符串",type:"str"}],description:'【功能】：删除字符串的尾部空格并返回\n【返回值类型】：字符串(String)\n【示例】：删除尾部空格("ABC    ")【返回值】："ABC"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringTrim",name:"删除头尾部空格"},{key:"Trim",name:"删除头尾部空格",params:[{key:"data",name:"字符串",type:"str"}],description:'【功能】：删除字符串的头尾部空格并返回\n【返回值类型】：字符串(String)\n【示例】：删除头尾部空格("    ABC    ")【返回值】："ABC"',type:"String",keyFront:"DefaultFunction",className:""},{key:"CreateGuid",name:"唯一标识符",params:[],description:'【功能】：获取唯一标识符Guid\n【返回值类型】：字符串(String)\n【示例】：唯一标识符()【返回值】："7722A793-14DF-49CD-B7E7-DF4987YYD2"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringAdd",name:"字符串相加"},{key:"Add",name:"字符串相加",params:[{key:"str1",name:"第一个字符串",type:"str"},{key:"str2",name:"第二个字符串",type:"str"}],description:'【功能】：将若干字符串拼接成一个新字符串，最多支持10个字符串拼接，最少2个；编辑器中默认插入两个，多个字符串可手动添加\n【返回值类型】：字符串(String)\n【示例】：字符串相加("Hello","World")【返回值】："HelloWord"',type:"String",keyFront:"DefaultFunction",className:""}],Se=[{key:"ToStringX",name:"转字符串",params:[{key:"obj",name:"转换值",type:"object"}],description:'【功能】：将转换值转换为字符串\n【返回值类型】：字符串(String)\n【示例】：转字符串(123)【返回值】："123"',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToDateTime",name:"转日期时间",params:[{key:"obj",name:"转换值",type:"object"}],description:'【功能】：将转换值转换成日期时间\n【返回值类型】：日期时间(OffsetDateTime)\n【示例】：转日期时间("2019-01-30T10:00:00+08:00")【返回值】: 2019-01-30T10:00+08:00',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToBoolean",name:"转布尔值",params:[{key:"obj",name:"转换值",type:"object"}],description:'【功能】：将转换值转换成等效的布尔值\n【返回值类型】：布尔值(Boolean)\n【示例】：转布尔值("True")【返回值】：true',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToDecimal",name:"转数值"},{key:"ToBigDecimal",name:"转数值",params:[{key:"obj",name:"转换值",type:"object"}],description:'【功能】：将转换值转换成十进制数值\n【返回值类型】：十进制数值(BigDecimal)\n【示例】：转数值("40.23")【返回值】：40.23',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToCustomBigDecimal",name:"转自定义精度数值",params:[{key:"obj",name:"转换值",type:"object"},{key:"number",name:"小数位数",type:"int"}],description:'【功能】：将转换值转换成指定精度的十进制数值\n【返回值类型】：十进制数值(BigDecimal)\n【示例】：转自定义精度数值("40.2,2")【返回值】：40.20',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToDouble",name:"转双精度浮点数",params:[{key:"obj",name:"转换值",type:"object"}],description:'【功能】：将转换值转换成双精度浮点数\n【返回值类型】：双精度浮点数(Double)\n【示例】：转双精度浮点数("40.23")【返回值】：40.23',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToSingle",name:"转单精度浮点数"},{key:"ToFloat",name:"转单精度浮点数",params:[{key:"obj",name:"转换值",type:"object"}],description:'【功能】：将转换值转换成单精度浮点数\n【返回值类型】：单精度浮点数(Float)\n【示例】：转单精度浮点数("40.23")【返回值】：40.23',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToByte",name:"转8位无符号整数",params:[{key:"obj",name:"转换值",type:"object"}],description:'【功能】：将转换值转换成8位无符号整数\n【返回值类型】：8位无符号整数(Byte)\n【示例】：转8位无符号整数("10")【返回值】：10',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToInt16",name:"转16位有符号整数",params:[{key:"obj",name:"转换值",type:"object"}],description:'【功能】：将转换值转换成16位有符号整数\n【返回值类型】：16位有符号整数(Int16)\n【示例】：转16位有符号整数("10")【返回值】：10',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToInt32",name:"转32位有符号整数",params:[{key:"obj",name:"转换值",type:"object"}],description:'【功能】：将转换值转换成32位有符号整数\n【返回值类型】：32位有符号整数(Int32)\n【示例】：转32位有符号整数("10")【返回值】：10',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToChineseMoney",name:"转中文大写金额",params:[{key:"obj",name:"转换值",type:"object"}],description:'【功能】：将转换值转换成中文大写金额\n【返回值类型】：字符串(String)\n【示例】：转中文大写金额(40.23)【返回值】："肆拾元零贰角叁分"',type:"Translate",keyFront:"DefaultFunction",className:""}],Ne=[{key:"if",name:"if()\n{\n\n}",params:[],description:"If the condition is established, the content in the brackets is executed",type:"Advanced",keyFront:"",className:""},{key:"if else",name:"if()\n{\n\n}\nelse\n{\n\n}",params:[],description:"If the condition is established, execute the content in the brackets; otherwise execute the content in the else",type:"Advanced",keyFront:"",className:""},{key:"for",name:"for(;;)\n{\n\n}",params:[],description:"for loop: Example: for(var i=0;i<5;i++){}",type:"Advanced",keyFront:"",className:""},{key:"return",name:"return ;",params:[],description:"return value",type:"Advanced",keyFront:"",className:""},{key:"var",name:"var ",params:[],description:"variable definitions",type:"Advanced",keyFront:"",className:""},{key:"true",name:"true ",params:[],description:"true",type:"Advanced",keyFront:"",className:""},{key:"false",name:"false ",params:[],description:"false",type:"Advanced",keyFront:"",className:""},{key:"Invoke",name:"Invoke",params:[],description:"Built-in extension call function call method",type:"",keyFront:"DefaultExtendFunctionProxy",className:""}],Fe=[{key:"SortChildData",name:"SortChildData",params:[{key:"setName",name:"Subtable",type:"string"},{key:"propName",name:"Sort Field",type:"string"},{key:"order",name:"Sort by",type:"string"}],description:'[Function] Sort subtable data (all parameters are wrapped with "")\n    [parameter]\n      [setName] child table (chain structure)\n      [propName] Sort field (field type should be numeric type)\n      [order] Sorting method ("ESC" means positive order from small to big, "DESC" means reverse order from big to small)\n    [Return value] None\n    [Example]\n      [Scenario] Submit the document Order, the document contains the travel details sub-table trips, and the sub-table contains the travel expense money field\n      [Requirement] Sort the sub-tables from small to large according to the travel expense money field\n      [Example]SortChildData("Order.trips","money","ESC")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IncludedInList",name:"IncludedInList",params:[{key:"propName",name:"propName",type:"object"},{key:"list",name:"datalists",type:"list"}],description:'[Function]: Determine whether the field exists in the data list. Returns true if the field exists in the list, and returns false if it does not exist. Support for judging character and number types. \n[propName] table property (chain structure)\n[list] data list\n[return value type]: Boolean (Boolean)\n[Example]: IncludedInList(Order.name,["Zs","Ls"])\n[Example]: IncludedInList(Order.quantity,[100,200])',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ExistData",name:"ExistData",params:[{key:"propName",name:"property",type:"string"}],description:'[Function]: Determine whether there is data in the sub-table. If there is data, it returns true, and if there is no data, it returns false. (All parameters are wrapped with "")\n[propName]Sub-table properties (chain structure)\n[Return value type]: Boolean (Boolean)\n[Example]: ExistData("Order.OrderItems")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"SumByProp",name:"SumByProp",params:[{key:"chainedPropName",name:"chainedPropName",type:"string"},{key:"propertyName",name:"propertyName",type:"string"}],description:'[Function]: Count the sum of all the data in the sub-table for a certain attribute (all parameters are wrapped with "") \n[setName] the sub-table attribute of the main table (chain structure) \n[propName] the sub-table attribute \n[return value type]: numeric value (Double)\n[Example]: SumByProp("Order.OrderItems","Quantity")"',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"CountByProp",name:"CountByProp",params:[{key:"chainedPropName",name:"chainedPropName",type:"string"},{key:"propertyName",name:"propertyName",type:"string"}],description:'[Function]: Count the number of records of all data in the sub-table where a certain attribute is not null (all parameters are wrapped with "") [setName] Sub-table properties of the main table (chain structure) [propName] Sub-table properties [Return value Type]: Number (Int32);\n[Example]:CountByProp("Order.OrderItems","Quantity")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"AvgByProp",name:"AvgByProp",params:[{key:"chainedPropName",name:"chainedPropName",type:"string"},{key:"propertyName",name:"propertyName",type:"string"}],description:'[Function]: Count the average value of a certain numeric attribute of all data in the sub-table (all parameters are wrapped with "") \n[setName] the sub-table attribute of the main table (chain structure) \n[propName] the sub-table attribute \n[return value type] : Value (Double)\n[Example]: AvgByProp("Order.OrderItems","Quantity")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"MaxByProp",name:"MaxByProp",params:[{key:"chainedPropName",name:"chainedPropName",type:"string"},{key:"propertyName",name:"propertyName",type:"string"}],description:'[Function]: Return the maximum value of a certain numeric attribute of all data in the sub-table (all parameters are wrapped with "") \n[setName] the sub-table attribute of the main table (chain structure) \n[propName] the sub-table attribute \n[return value type] : Numerical value (Double)\n[Example]: MaxByProp("Order.OrderItems","Quantity")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"MinByProp",name:"MinByProp",params:[{key:"chainedPropName",name:"chainedPropName",type:"string"},{key:"propertyName",name:"propertyName",type:"string"}],description:'[Function]: Return the minimum value of a certain numeric attribute of all data in the sub-table (all parameters are wrapped with "") \n[setName] the sub-table attribute of the main table (chain structure) \n[propName] the sub-table attribute \n[return value type] : Numerical value (Double)\n[Example]: MinByProp("Order.OrderItems","Quantity")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsNull",name:"IsNull",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Judge whether the detection object is a null value (null) \n[Return value type]: Boolean value (Boolean)\n [Example]: IsNull("semantic expression") [Return value]: False',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsNullOrWhiteSpace",name:"IsNullOrWhiteSpace",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Determine whether the detection object is null, empty or only composed of spaces \n[Return value type]: Boolean value (Boolean)\n [Example]: IsNullOrWhiteSpace("semantic expression") [Return value]: False [example]: IsNullOrWhiteSpace(null) [return value]: True [example]: IsNullOrWhiteSpace(" ") [return value]: True',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsNaN",name:"IsNaN",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Determine whether the detection object can be converted into a number (Double) \n[Return value type]: Boolean value (Boolean)\n [Example]: IsNaN("semantic expression") [Return value]: True [Example ]: IsNaN(12.3) [Return value]: False [Example]: IsNaN("123") [Return value]: False',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsNumber",name:"IsNumber",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Determine whether the detection object can be converted into a number (Double) \n[Return value type]: Boolean (Boolean)\n [Example]: IsNumber("semantic expression") [Return value]: False [Example ]: IsNumber(12.3) [return value]: True [example]: IsNumber("123") [return value]: True',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsExistRecord",name:"IsExistRecord",params:[{key:"chainedPropName",name:"chainedPropName",type:"string"},{key:"propertyName",name:"propertyName",type:"string"},{key:"match",name:"match",type:"string"}],description:'[Function]: Determine whether an attribute in all data of the sub-table has a value equal to the matching character (all parameters are wrapped with "") \n[setName] the sub-table attribute of the main table (chain structure) \n[propName] the sub-table attribute \n[match ] Matching value \n[Return value type]: Boolean value (Boolean)\n [Example]: IsExistRecord("salesorder.items", "code", "lc") [Return value]: False/True',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ListGreaterThan",name:"ListGreaterThan",params:[{key:"chainedPropName",name:"chainedPropName",type:"string"},{key:"propertyName",name:"propertyName",type:"string"},{key:"match",name:"match",type:"double"}],description:'[Function]: Determine whether an attribute in all data of the sub-table has a value greater than the matching character (the first two parameters are wrapped with "") \n[setName] the sub-table attribute of the main table (chain structure) \n[propName] the sub-table attribute \n[Match] Match value \n[Return value type]: Boolean value (Boolean)\n [Example]: ListGreaterThan("salesorder.items", "num", 100) [Return value]: False/True',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ListLessThan",name:"ListLessThan",params:[{key:"chainedPropName",name:"chainedPropName",type:"string"},{key:"propertyName",name:"propertyName",type:"string"},{key:"match",name:"match",type:"double"}],description:'[Function]: Determine whether an attribute in all data of the sub-table has a value less than the matching character (the first two parameters are wrapped with "") \n[setName] the sub-table attribute of the main table (chain structure) \n[propName] the sub-table attribute \n[Match] Match value \n[Return value type]: Boolean value (Boolean)\n [Example]:ListLessThan("salesorder.items", "num", 100) [Return value]: False/True',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ListStartWith",name:"ListStartWith",params:[{key:"chainedPropName",name:"chainedPropName",type:"string"},{key:"propertyName",name:"propertyName",type:"string"},{key:"match",name:"match",type:"string"}],description:'[Function]: Determine whether a certain attribute in all data of the sub-table has a value with a matching character at the beginning (all parameters are wrapped with "") \n[setName] the sub-table attribute of the main table (chain structure) \n[propName] the sub-table attribute \n[ match] Matching value \n[Return value type]: Boolean value (Boolean)\n [Example]: ListStartWith("salesorder.items", "code", "lc") [Return value]: False/True ',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ListEndWith",name:"ListEndWith",params:[{key:"chainedPropName",name:"chainedPropName",type:"string"},{key:"propertyName",name:"propertyName",type:"string"},{key:"match",name:"match",type:"string"}],description:'[Function]: Determine whether an attribute in all data of the sub-table exists and ends with a matching character value (all parameters are wrapped with "") \n[setName] Sub-table attribute of the main table (chain structure) \n[propName] Sub-table attribute \n[match] match value \n[return value type]: Boolean value (Boolean)\n[example]: ListEndWith("salesorder.items", "code", "lc") [return value]: False/True ',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"GetSessionValue",name:"GetSessionValue",params:[{key:"name",name:"name",type:"string"}],description:"[Function]: Get the value of the user session variable \n[name]: The name of the session variable \n[Return value type]: Object (Object)",type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"GetContextParameter",name:"GetContextParameter",params:[{key:"name",name:"name",type:"string"}],description:"[Function]: Get the value of the context variable \n[name]: The name of the context variable \n[Return value type]: Object (Object)",type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"getComputeJsonData",name:"getComputeJsonData"},{key:"GetComputeJsonData",name:"GetComputeJsonData",params:[{key:"chainedPropName",name:"chainedPropName",type:"string"},{key:"propertyName",name:"propertyName",type:"string"}],description:'[Function]: Get the value of a certain attribute of all data in the sub-table and return it in the form of a JSON string (all parameters are wrapped with "") \n[setName] the sub-table attribute of the main table (chain structure) \n[propName] the sub-table attribute \n[Return value type]: Object (String) [Return value example]: [11,22,33]',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"GetInjectedEntity",name:"GetInjectedEntity",params:[{key:"objName",name:"objName",type:"string"}],description:'[Function]: Get the actual object of the object injected at runtime (parameters are wrapped with ""), does not support getting properties \n[objName] injection name \n[return value type]: object (Object)',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"GetChainedPropertyValue",name:"GetChainedPropertyValue",params:[{key:"propName",name:"propName",type:"string"}],description:'[Function]: Get the actual value of the injected property at runtime (parameters are wrapped with "") \n[propName] property (chain structure) \n[Return value type]: Object (Object)',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"MultiplyChildNumber",name:"MultiplyChildNumber",params:[{key:"childTable",name:"childTable",type:"string"},{key:"prop1",name:"property1",type:"string"},{key:"prop2",name:"property2",type:"string"}],description:"[Function] For the two numeric type attributes of the subtable, first do the product, and then sum (all parameters are wrapped with \"\")\n[Parameter]\n  [Table] \n  [table] Subtable properties in the main table (chain structure)\n  [prop1] Attribute one (the type should be a numeric type)\n  [prop2] Attribute two (the type should be a numeric type)\n[ReturnType] number\n[Example]\n  [Scenes] Submit the document 'Order', the document contains the travel details sub-table 'trips', and the sub-table contains the business trip 'days' and travel expenses 'money'\n  [Requirement] Get the total cost of travel details, that is, the sum of the sub-table travel days * travel expenses\n  [Demo] MultiplyChildNumber(\"Order.trips\",\"days\",\"money\")",type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ParseEnum",name:"ParseEnum",params:[{key:"name",name:"name",type:"string"},{key:"map",name:"map",type:"obj"}],description:"[Function]: Resolve enumeration to display value [Return value type]: number or string  n [Example]: ParseEnum(SysApproval.version, Enum.SysApproval.version)== 'Pass' [Return value]：\"true\"",type:"Special",keyFront:"DefaultFunction",className:""}],Te=[{key:"DayDifference",name:"DayDifference",params:[{key:"date1",name:"date1",type:"obj"},{key:"date2",name:"date2",type:"obj"}],description:'[Function] Calculate the difference in days between two times, based on the year, month, and day, and automatically ignore the hours, minutes, and seconds. If time one is earlier than time two, return a positive number; If it is later than time two, return a negative number.\n     [Parameters]\n        [date1] Time 1\n        [date2] Time 2\n     [Return Value] The difference in days between two dates.\n     [Example]\n        [Example] DayDifference("2024-01-01","2024-01-11")\n        [Return Value] 10\n        [Example] DayDifference("2024-01-11","2024-01-01")\n        [Return Value] -10',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"DateTimeAddDays",name:"DateTimeAddDays",params:[{key:"date",name:"date",type:"string"},{key:"value",name:"value",type:"int"}],description:'[Function]: Add the specified number of days to the specified date and time \n[Return value type]: DateTime (DateTime)\n[Example]: DateTimeAddDays("2019-01-30T10:00:00+08:00", 2 )[Return value]: 2019-02-01T10:00+08:00',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"DateTimeAddYears",name:"DateTimeAddYears",params:[{key:"date",name:"date",type:"string"},{key:"value",name:"value",type:"int"}],description:'[Function]: Add the specified number of years to the specified date and time \n[Return value type]: DateTime (DateTime)\n[Example]: DateTimeAddYears("2019-01-30T10:00:00+08:00", 2 )[Return value]:2021-01-30T10:00+08:00',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"DateTimeAddMonths",name:"DateTimeAddMonths",params:[{key:"date",name:"date",type:"string"},{key:"value",name:"value",type:"int"}],description:'[Function]: Add the specified number of months to the specified date and time \n[Return value type]: DateTime (DateTime)\n [Example]: DateTimeAddMonths("2019-01-30T10:00:00+08:00) ",1)[Return value]: 2019-02-28T10:00+08:00',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"GetFirstDayOfMonth",name:"GetFirstDayOfMonth",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Get the date of the first day of the month where the specified date and time are located \n[Return value type]: DateTime (DateTime)\n [Example]: GetFirstDayOfMonth("2019-01-30T10:00 :00+08:00")[Return value]: 2019-01-01',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"GetLastDayOfMonth",name:"GetLastDayOfMonth",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Get the date of the last day of the month where the specified date and time are located \n[Return value type]: DateTime (DateTime)\n[Example]: GetLastDayOfMonth("2019-01- 30T10:00:00+08:00")[Return value]: 2019-01-31',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"GetDateTimeNow",name:"GetDateTimeNow",params:[],description:"[Function]: Get the current date and time \n[Return value type]: DateTime (DateTime)\n[Example]: GetDateTimeNow() [Return value]: 2019-01-30T12:00:00.000+08:00 ",type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"CompareDate",name:"CompareDate",params:[{key:"str1",name:"date1",type:"string"},{key:"str2",name:"date2",type:"string"}],description:'[Function]: Compare two time values and return an integer \n[Return value type]: Numeric (int32) date 1 is earlier than date 2, return -1; date 1 is equal to date 2, return 0; date 1 is later than date 2 , Return 1\n[Example]: CompareDate("2019-01-30T10:00:00+08:00", "2019-02-01T10:00:00+08:00") [Return value] : -1',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FormatDate",name:"FormatDate",params:[{key:"format",name:"format",type:"string"}],description:'[Function]: Use the specified format to convert the current date and time value into its equivalent string representation \n[Return value type]: String (String)\n [Example]: FormatDate("yyyy-MM- dd HH:mm:ss")[Return value]: "2019-01-30 01:00:00"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FormatDefineDate",name:"FormatDefineDate",params:[{key:"format",name:"format",type:"string"},{key:"date",name:"date",type:"string"}],description:'[Function]: Use the specified format to convert the specified date and time value into its equivalent string representation \n[Return value type]: String (String)\n [Example]: FormatDefineDate("yyyy-MM -dd HH:mm:ss","2019-01-30 01:00:00") [Return value]: "2019-01-30 01:00:00"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"Today",name:"Today",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return today of the specified date, the format is "yyyy-MM-dd", without parameters, it will return to today of the current date by default \n[Return value type]: String (String)\n [Example]: Today(" 2019-01-30T10:00:00+08:00")[Return value]: "2019-01-30"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"Yesterday",name:"Yesterday",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the yesterday of the specified date, the format is "yyyy-MM-dd", if there is no parameter, it will return the yesterday of the current date by default. \n[Return value type]: String (String)\n [Example]: Yesterday(" 2019-01-30T10:00:00+08:00")[Return value]: "2019-01-29"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"Tomorrow",name:"Tomorrow",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return tomorrow of the specified date, the format is "yyyy-MM-dd", without parameters, it will default to tomorrow of the current date \n[Return value type]: String (String)\n [Example]: Tomorrow(" 2019-01-30T10:00:00+08:00")[Return value]: "2019-01-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"ThisYear",name:"ThisYear",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the current year of the specified date, the format is "yyyy", without parameters, it will default to the current year of the current date. \n[Return value type]: String (String)\n [Example]: ThisYear("2019 -01-30T10:00:00+08:00")[Return value]: "2019"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastYear",name:"LastYear",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the last year of the specified date, the format is "yyyy", if there is no parameter, it will return the last year of the current date by default. \n[Return value type]: String (String)\n [Example]: LastYear("2019-01- 30T10:00:00+08:00")[Return value]: "2018"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"NextYear",name:"NextYear",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the next year of the specified date, the format is "yyyy", if there is no parameter, it will return the next year of the current date by default. \n[Return value type]: String (String)\n [Example]: NextYear ("2019-01- 30T01:00:00+08:00")[Return value]: "2020"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"ThisMonth",name:"ThisMonth",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the current month of the specified date, the format is "MM", without parameters, it will return the current month of the current date by default. \n[Return value type]: String (String)\n [Example]: This month ("2019 -01-30T01:00:00+08:00")[Return value]: "1"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastMonth",name:"LastMonth",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the last month of the specified date, the format is "MM", without parameters, it will default to the last month of the current date. \n[Return value type]: String (String)\n [Example]: LastMonth ("2019 -02-30 01:00:00")[Return value]: "1"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"NextMonth",name:"NextMonth",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the next month of the specified date, the format is "MM", without parameters, the next month of the current date will be returned by default. \n[Return value type]: String (String)\n [Example]: NextMonth ("2019 -01-30T01:00:00+08:00")[Return value]: "2"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"ThisWeek",name:"ThisWeek",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the week of the specified date in the current year, the format is "ww", without parameters, the default return is the week of the current date in the year \n[Return value type]: String (String)\n[ Example]: ThisWeek ("2019-01-30T01:00:00+08:00") [Return value]: "5"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastWeek",name:"LastWeek",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the last week of the specified date, the format is "ww", if there is no parameter, it will return the last week of the current date by default. \n[Return value type]: String (String)\n [Example]: LastWeek ("2019 -01-30T01:00:00+08:00")[Return value]: "4"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"NextWeek",name:"NextWeek",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the next week of the specified date, the format is "ww", without parameters, it will return the next week of the current date by default \n[Return value type]: String (String)\n [Example]: NextWeek ("2019 -01-30T01:00:00+08:00")[Return value]: "6"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"DayOfWeek",name:"DayOfWeek",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the specified date is the day of the week, the format is "n", if there is no parameter, the default return current date is the day of the week \n[Return value type]: String (String)\n [Example]: DayOfWeek("2019-01-30T01:00:00+08:00") [Return value]: "3"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfWeek",name:"FirstDayOfWeek",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the first day of the week of the specified date, the format is "yyyy-MM-dd", if there is no parameter, it will default to the first day of the week of the current date. \n[Return value type]: String (String)\n [Example]: FirstDayOfWeek("2019-01-30T01:00:00+08:00") [Return value]: "2019-01-28"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfWeek",name:"LastDayOfWeek",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the last day of the week on the specified date, the format is "yyyy-MM-dd", if there is no parameter, it will default to the first day of the week on the current date \n[Return value type]: String (String)\n[ Example]: LastDayOfWeek("2019-01-30T01:00:00+08:00") [Return value]: "2019-02-03"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfLastWeek",name:"FirstDayOfLastWeek",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the first day of the last week of the specified date, the format is "yyyy-MM-dd", if there is no parameter, it will default to the first day of the last week of the current date. \n[Return value type]: String (String)\n [Example]: FirstDayOfLastWeek("2019-01-30T01:00:00+08:00") [Return value]: "2019-01-21"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfLastWeek",name:"LastDayOfLastWeek",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the last day of the last week of the specified date, the format is "yyyy-MM-dd", without parameters, it will default to the last day of the last week of the current date. \n[Return value type]: String (System.String)\n [Example]: LastDayOfLastWeek("2019-01-30T01:00:00+08:00") [Return value]: "2019-01-27"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfNextWeek",name:"FirstDayOfNextWeek",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the first day of the next week of the specified date, the format is "yyyy-MM-dd", without parameters, it will default to the first day of the next week of the current date. \n[Return value type]: String (String)\n [Example]: FirstDayOfNextWeek("2019-01-30T01:00:00+08:00") [Return value]: "2019-02-04"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfNextWeek",name:"LastDayOfNextWeek",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the last day of the next week of the specified date, the format is "yyyy-MM-dd", without parameters, it will return the last day of the next week of the current date by default \n[Return value type]: String (String)\n [Example 】: LastDayOfNextWeek("2019-01-30T01:00:00+08:00") [Return value]: "2019-02-10"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfMonth",name:"FirstDayOfMonth",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the first day of the month of the specified date, the format is "yyyy-MM-dd", without parameters, it will default to the first day of the month of the current date. \n[Return value type]: String (String)\n [Example]: FirstDayOfMonth("2019-01-30T01:00:00+08:00") [Return value]: "2019-01-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfMonth",name:"LastDayOfMonth",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the last day of the month on the specified date, the format is "yyyy-MM-dd", if there is no parameter, it will return the last day of the month on the current date by default \n[Return value type]: String (String)\n [Example 】: LastDayOfMonth("2019-01-30T01:00:00+08:00") [Return value]: "2019-01-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfLastMonth",name:"FirstDayOfLastMonth",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the first day of the previous month of the specified date, in the format "yyyy-MM-dd", without parameters, it will default to the first day of the previous month of the current date. \n[Return value type]: String (String)\n [Example]: FirstDayOfLastMonth("2019-01-30T01:00:00+08:00") [Return value]: "2018-12-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfLastMonth",name:"LastDayOfLastMonth",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the last day of the previous month of the specified date, the format is "yyyy-MM-dd", if there is no parameter, it will default to the last day of the previous month of the current date. \n[Return value type]: String (String)\n [Example 】: LastDayOfLastMonth("2019-01-30T01:00:00+08:00") [Return value]: "2018-12-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfNextMonth",name:"FirstDayOfNextMonth",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the first day of the next month of the specified date, the format is "yyyy-MM-dd", without parameters, it will default to the first day of the next month of the current date. \n[Return value type]: String (String)\n [Example]: FirstDayOfNextMonth("2019-01-30T01:00:00+08:00") [Return value]: "2019-02-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfNextMonth",name:"LastDayOfNextMonth",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the last day of the next month of the specified date, the format is "yyyy-MM-dd", without parameters, it will default to the last day of the next month of the current date \n[Return value type]: String (String)\n [Example]: LastDayOfNextMonth("2019-01-30T01:00:00+08:00") [Return value]: "2019-02-28"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfYear",name:"FirstDayOfYear",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the first day of the current year of the specified date, the format is "yyyy-MM-dd", if there is no parameter, it will default to the first day of the current year of the current date. \n[Return value type]: String (String)\n [Example]: FirstDayOfYear("2019-01-30T01:00:00+08:00") [Return value]: "2019-01-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfYear",name:"LastDayOfYear",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the last day of the current year of the specified date, the format is "yyyy-MM-dd", without parameters, it will default to the last day of the current year of the current date \n[Return value type]: String (String)\n [Example]: LastDayOfYear("2019-01-30T01:00:00+08:00") [Return value]: "2019-12-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfLastYear",name:"FirstDayOfLastYear",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the first day of the previous year of the specified date, the format is "yyyy-MM-dd", without parameters, it will default to the first day of the previous year of the current date. \n[Return value type]: String (String)\n [Example]: FirstDayOfLastYear("2019-01-30T01:00:00+08:00") [Return value]: "2018-01-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfLastYear",name:"LastDayOfLastYear",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the last day of the previous year on the specified date, the format is "yyyy-MM-dd", without parameters, it will default to the last day of the previous year on the current date \n[Return value type]: String (String)\n [Example]: LastDayOfLastYear("2019-01-30T01:00:00+08:00") [Return value]: "2018-12-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfNextYear",name:"FirstDayOfNextYear",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the first day of the next year of the specified date, the format is "yyyy-MM-dd", without parameters, it will default to the first day of the next year of the current date. \n[Return value type]: String (String)\n [Example]: FirstDayOfNextYear("2019-01-30T01:00:00+08:00") [Return value]: "2020-01-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfNextYear",name:"LastDayOfNextYear",params:[{key:"date",name:"date",type:"string"}],description:'[Function]: Return the last day of the next year of the specified date, the format is "yyyy-MM-dd", without parameters, it will return the last day of the next year of the current date by default \n[Return value type]: String (String)\n [Example]: LastDayOfNextYear("2019-01-30T01:00:00+08:00") [Return value]: "2020-12-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"GetDate",name:"GetDate",params:[{key:"format",name:"format",type:"string"},{key:"date",name:"date",type:"string"}],description:'[Function]: Return the date in the specified format, and return the current date in the specified format by default without parameters \n[Return value type]: String (String)\nDD: Today\tLD: Yesterday\tND: Tomorrow\tYY: This year tLY: Last year\tNY: Next year\tMM: This month\tLM: Last month\tNM: Next month\nWD: Day of the week\tWW: This week\tLW: Last week\tNW: Next week\tFDW: First week Day\tLDW: Last day of this week\nFDLW: First day of last week\tLDLW: Last day of last week\tFDNW: First day of next week\tLDNW: Last day of next week\tFDM: First day of this month\tLDM: Last day of this month \tFDLM: the first day of the previous month\tLDLM: the last day of the previous month\nFDNM: the first day of the next month\tLDNM: the last day of the next month\tFDY: the first day of the year\tLDY: the last day of the year\tFDLY: the first day of the previous year tLDLY: Last day of the previous year\tFDNY: First day of the next year\tLDNY: Last day of the next year\n[Example]: GetDate("LD","2019-01-30T01:00:00+08:00 ")[Return value]: "2019-01-29"',type:"DateTime",keyFront:"DefaultFunction",className:""}],we=[{key:"abs",name:"abs",params:[{key:"value",name:"value",type:"double"}],description:"[Function]: Return the absolute value of a numerical value \n[Return value type]: Numerical value (Double)\n [Example]: abs(-1.5) [Return value]: 1.5",type:"Math",keyFront:"Math",className:""},{key:"Round",name:"Round"},{key:"round",name:"round",params:[{key:"value1",name:"value",type:"double"},{key:"value2",name:"Decimal",type:"int32"}],description:"[Function]: According to the precision of decimal places, the value is rounded \n[value1]: Value \n[value2]: Round off the number of decimal places \n[Return value type]: Number (Double)\n [Example]: round(1.52, 1) [Return value ]: 1.5",type:"Math",keyFront:"DefaultFunction",className:""},{key:"random",name:"random",params:[],description:"[Function]: Randomly generate a pseudo-random value greater than or equal to 0.0 and less than 1.0 \n[Return value type]: Numeric (Double)\n [Example]: random() [Return value]: 0.624508349393",type:"Math",keyFront:"Math",className:""},{key:"sin",name:"sin",params:[{key:"value",name:"value",type:"double"}],description:"[Function]: Return the sine value of a number \n[Return value type]: Value (Double) an angle expressed in radians\n [Example]: sin(1) [Return value]: 0.84187098",type:"Math",keyFront:"Math",className:""},{key:"cos",name:"cos",params:[{key:"value",name:"value",type:"double"}],description:"[Function]: Return the cosine value of a number \n[Return value type]: Value (Double) an angle expressed in radians\n [Example]: cos(3) [Return value]: -0.9899924",type:"Math",keyFront:"Math",className:""},{key:"ceil",name:"ceil",params:[{key:"value",name:"value",type:"double"}],description:"[Function]: Return the integer greater than or equal to the function parameter and closest to it \n[Return value type]: Numeric (Int32)\n [Example]: ceil(3.2) [Return value]: 4",type:"Math",keyFront:"Math",className:""},{key:"floor",name:"floor",params:[{key:"value",name:"value",type:"double"}],description:"[Function]: Return the integer less than or equal to the function parameter and the closest integer \n[Return value type]: Numeric (Int32)\n [Example]: floor(3.2) [Return value]: 3",type:"Math",keyFront:"Math",className:""},{key:"BankerRound",name:"BankerRound"},{key:"bankerRound",name:"bankerRound",params:[{key:"value1",name:"value",type:"double"},{key:"value2",name:"Decimal",type:"int32"}],description:"[Function]: Use the banker’s rounding standard to round the specified number to the nearest number \n[value1]: Rounding value \n[value2]: Rounding off the number of decimal places \n[Return value type]: Numerical value (Double)\n【 Example]: bankerRound(36.124,2) [Return value]: 36.12",type:"Math",keyFront:"DefaultFunction",className:""},{key:"NumberThousandSeparator",name:"NumberThousandSeparator",params:[{key:"property",name:"property",type:"int32"}],description:"[Function] Add thousands separator to numbers, use comma as thousands separator\n[Parameter]\n  [Property] field（chain structure）\n[ReturnType] string\n[Example]\n  [Scenes] Submit a document 'Order', the document contains the total cost 'totalCost'\n  [Requirement] Optimize the display of total cost and add thousands separator to total cost\n  [Demo] NumberThousandSeparator(Order.totalCost)\n  [Return] 1,234,567.89",type:"Math",keyFront:"DefaultFunction",className:""}],Ce=[{key:"StringSubstring",name:"SubString"},{key:"SubString",name:"SubString",params:[{key:"data",name:"data",type:"str"},{key:"start",name:"start",type:"int"},{key:"length",name:"length",type:"int"}],description:'[Function]: Start from the specified position in the string, intercept a string of specified length and return \n[Return value type]: String (String)\n [Example]: SubString("ABCDEFG",2,3) [Return value]: "CDE"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringLength",name:"Length"},{key:"Length",name:"Length",params:[{key:"data",name:"data",type:"str"}],description:'[Function]: Get the length of the string \n[Return value type]: Numeric (Int32)\n [Example]: Length("ABCDEF") [Return value]: 6',type:"String",keyFront:"DefaultFunction",className:""},{key:"Contains",name:"Contains",params:[{key:"data",name:"data",type:"str"},{key:"target",name:"target",type:"str"}],description:'[Function]: Determine whether the string contains the target string \n[Return value type]: Boolean (Boolean)\n [Example]: Contains(salesorder.code, "expression") [Return value]: false',type:"String",keyFront:"DefaultFunction",className:""},{key:"NotContains",name:"NotContains",params:[{key:"data",name:"data",type:"str"},{key:"target",name:"target",type:"str"}],description:'[Function]: Determine whether the string not contains the target string \n[Return value type]: Boolean (Boolean)\n [Example]: NotContains(salesorder.code, "expression") [Return value]: true',type:"String",keyFront:"DefaultFunction",className:""},{key:"StartsWith",name:"StartsWith",params:[{key:"data",name:"data",type:"str"},{key:"target",name:"target",type:"str"}],description:'[Function]: Determine whether the string starts with the target string \n[Return value type]: Boolean (Boolean)\n [Example]: StartsWith(salesorder.code, "expression") [Return value]: false',type:"String",keyFront:"DefaultFunction",className:""},{key:"NotStartsWith",name:"NotStartsWith",params:[{key:"data",name:"data",type:"str"},{key:"target",name:"target",type:"str"}],description:'[Function]: Determine whether the string not starts with the target string \n[Return value type]: Boolean (Boolean)\n [Example]: NotStartsWith(salesorder.code, "expression") [Return value]: true',type:"String",keyFront:"DefaultFunction",className:""},{key:"EndsWith",name:"EndsWith",params:[{key:"data",name:"data",type:"str"},{key:"target",name:"target",type:"str"}],description:'[Function]: Determine whether the string ends with the target string \n[Return value type]: Boolean (Boolean)\n [Example]: EndsWith(salesorder.code, "expression") [Return value]: false',type:"String",keyFront:"DefaultFunction",className:""},{key:"NotEndsWith",name:"NotEndsWith",params:[{key:"data",name:"data",type:"str"},{key:"target",name:"target",type:"str"}],description:'[Function]: Determine whether the string not ends with the target string \n[Return value type]: Boolean (Boolean)\n [Example]: NotEndsWith(salesorder.code, "expression") [Return value]: true',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringReplace",name:"Replace"},{key:"Replace",name:"Replace",params:[{key:"data",name:"data",type:"str"},{key:"oldVal",name:"oldValue",type:"str"},{key:"newVal",name:"newValue",type:"str"}],description:'[Function]: Replace the "replaced value" in the string with "replacement value" \n[Return value type]: String (String)\n [Example]: Replace("123412","12"," 00") [Return value]: "003400"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringToUpper",name:"ToUpper"},{key:"ToUpper",name:"ToUpper",params:[{key:"data",name:"data",type:"str"}],description:'[Function]: Convert a string to upper case \n[Return value type]: String (String)\n [Example]: ToUpper("abc") [Return value]: "ABC"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringToLower",name:"ToLower"},{key:"ToLower",name:"ToLower",params:[{key:"data",name:"data",type:"str"}],description:'[Function]: Convert a string to lower case \n[Return value type]: String (String)\n [Example]: ToLower("ABC") [Return value]: "abc"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringIndexOf",name:"IndexOf"},{key:"IndexOf",name:"IndexOf",params:[{key:"data",name:"data",type:"str"},{key:"target",name:"target",type:"str"}],description:'[Function]: Retrieve the target string in the string, find the first matching string and return the index position (starting from 0). If not found, it returns -1, if the target string is empty, it returns 0, if the original string is null, it returns -1 \n[Return value type]: Number (Int32)\n[Example]: IndexOf("12001234012", "01") [Return value]: 3\n [Example]: IndexOf("12002323", "34") [Return value]: -1\n[ Example]: IndexOf("120011","") [Return value]: 0',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringLastIndexOf",name:"LastIndexOf"},{key:"LastIndexOf",name:"LastIndexOf",params:[{key:"data",name:"data",type:"str"},{key:"target",name:"target",type:"str"}],description:'[Function]: Retrieve the target string in the string, and return the index position (starting from 0) after finding the last matched string. If not found, it returns -1, if the target string is an empty string, it returns the length of the original string, if the original string is null, it returns -1 \n[Return value type]: Number (Int32)\n[Example]: LastIndexOf("12001234012", "01") [Return value]: 8\n [Example]: LastIndexOf("12002323", "34") [Return value]: -1\n [Example]: LastIndexOf("120011", "") [Return value]: 6',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringTrimStart",name:"TrimStart"},{key:"TrimStart",name:"TrimStart",params:[{key:"data",name:"data",type:"str"}],description:'[Function]: Delete the head space of the string and return \n[Return value type]: String (String)\n [Example]: TrimStart("ABC") [Return value]: "ABC"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringTrimEnd",name:"TrimEnd"},{key:"TrimEnd",name:"TrimEnd",params:[{key:"data",name:"data",type:"str"}],description:'[Function]: Delete the trailing space of the string and return \n[Return value type]: String (String)\n[Example]: TrimEnd("ABC") [Return value]: "ABC"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringTrim",name:"Trim"},{key:"Trim",name:"Trim",params:[{key:"data",name:"data",type:"str"}],description:'[Function]: Delete the space at the beginning and end of the string and return \n[Return value type]: String (String)\n [Example]: Trim("ABC") [Return value]: "ABC"',type:"String",keyFront:"DefaultFunction",className:""},{key:"CreateGuid",name:"CreateGuid",params:[],description:'[Function]: Obtain the unique identifier Guid \n[Return value type]: String (String)\n [Example]: Unique identifier () [Return value]: "7722A793-14DF-49CD-B7E7-DF4987YYD2"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringAdd",name:"Add"},{key:"Add",name:"Add",params:[{key:"str1",name:"firstStr",type:"str"},{key:"str2",name:"secondStr",type:"str"}],description:'[Function]: Concatenate several strings into a new string, support up to 10 strings and at least 2; two are inserted by default in the editor, and multiple strings can be added manually. \n[Return value type]: string (String)\n[Example]: Add("Hello", "World") [Return value]: "HelloWord"',type:"String",keyFront:"DefaultFunction",className:""}],Ie=[{key:"ToStringX",name:"ToStringX",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Convert the converted value to a string \n[Return value type]: String (String)\n [Example]: ToStringX(123) [Return value]: "123"',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToDateTime",name:"ToDateTime",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Convert the converted value to date and time \n[Return value type]: Date and time (OffsetDateTime)\n [Example]: ToDateTime("2019-01-30T10:00:00+08:00") [Return Value]: 2019-01-30T10:00+08:00',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToBoolean",name:"ToBoolean",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Convert the converted value into an equivalent Boolean value \n[Return value type]: Boolean value (Boolean)\n [Example]: ToBoolean("True") [Return value]: true',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToDecimal",name:"ToDecimal"},{key:"ToBigDecimal",name:"ToBigDecimal",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Convert the converted value into a decimal value \n[Return value type]: Decimal value (BigDecimal)\n [Example]: ToBigDecimal("40.23") [Return value]: 40.23',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToCustomBigDecimal",name:"ToCustomBigDecimal",params:[{key:"obj",name:"obj",type:"object"},{key:"number",name:"number",type:"int"}],description:'[Function]: Convert the converted value into a decimal value with the specified precision \n[Return value type]: Decimal value (BigDecimal)\n [Example]: ToCustomBigDecimal("40.2,2") [Return value]: 40.20',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToDouble",name:"ToDouble",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Convert the converted value into a double-precision floating-point number \n[Return value type]: Double-precision floating-point number (Double)\n [Example]: ToDouble("40.23") [Return value]: 40.23',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToSingle",name:"ToSingle"},{key:"ToFloat",name:"ToFloat",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Convert the converted value into a single-precision floating-point number \n[Return value type]: Single-precision floating-point number (Float)\n [Example]: ToFloat("40.23") [Return value]: 40.23',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToByte",name:"ToByte",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Convert the converted value into 8-bit unsigned integer \n[Return value type]: 8-bit unsigned integer (Byte)\n [Example]: ToByte("10") [Return value]: 10',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToInt16",name:"ToInt16",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Convert the converted value into a 16-bit signed integer \n[Return value type]: 16-bit signed integer (Int16)\n [Example]: ToInt16("10") [Return value]: 10',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToInt32",name:"ToInt32",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Convert the converted value into a 32-bit signed integer \n[Return value type]: 32-bit signed integer (Int32)\n [Example]: ToInt32("10") [Return value]: 10',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToChineseMoney",name:"ToChineseMoney",params:[{key:"obj",name:"obj",type:"object"}],description:'[Function]: Convert the converted value to Chinese uppercase amount \n[Return value type]: String (String)\n [Example]: ToChineseMoney(40.23) [Return value]: "四十元零二角三分 "',type:"Translate",keyFront:"DefaultFunction",className:""}],Me=[{key:"if",name:"if()\n{\n\n}",params:[],description:"if條件成立，執行括號中內容",type:"Advanced",keyFront:"",className:""},{key:"if else",name:"if()\n{\n\n}\nelse\n{\n\n}",params:[],description:"if條件成立，執行括號中內容；否則執行else中內容",type:"Advanced",keyFront:"",className:""},{key:"for",name:"for(;;)\n{\n\n}",params:[],description:"for循環：示例：for(var i=0;i<5;i++){}",type:"Advanced",keyFront:"",className:""},{key:"return",name:"return ;",params:[],description:"返回值",type:"Advanced",keyFront:"",className:""},{key:"var",name:"var ",params:[],description:"變量定義",type:"Advanced",keyFront:"",className:""},{key:"true",name:"true ",params:[],description:"正確",type:"Advanced",keyFront:"",className:""},{key:"false",name:"false ",params:[],description:"錯誤",type:"Advanced",keyFront:"",className:""},{key:"Invoke",name:"内置擴展調用",params:[],description:"内置擴展調用函數調用方法",type:"",keyFront:"DefaultExtendFunctionProxy",className:""}],Oe=[{key:"IsNull",name:"是空值",params:[{key:"obj",name:"檢測對象",type:"object"}],description:'【功能】：判斷檢測對像是否為空值(null)\n【返回值類型】：布爾值(Boolean)\n【示例】：是空值("語義化表達式")【返回值】：False',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsNullOrWhiteSpace",name:"是空串",params:[{key:"obj",name:"待判斷字符串",type:"object"}],description:'【功能】：判斷檢測對像是否為null、空還是僅有空格組成\n【返回值類型】：布爾值(Boolean)\n【示例】：是空串("語義化表達式")【返回值】：False【示例】：是空串(null)【返回值】：True【示例】：是空串(" ")【返回值】：True',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsNaN",name:"非數字",params:[{key:"obj",name:"檢測對象",type:"object"}],description:'【功能】：判斷檢測對像是否可以轉換成數字(Double)\n【返回值類型】：布爾值(Boolean)\n【示例】：非數字("語義化表達式")【返回值】：True【示例】：非數字(12.3)【返回值】：False【示例】：非數字("123")【返回值】：False',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsNumber",name:"是數字",params:[{key:"obj",name:"檢測對象",type:"object"}],description:'【功能】：判斷檢測對像是否可以轉換成數字(Double)\n【返回值類型】：布爾值(Boolean)\n【示例】：是數字("語義化表達式")【返回值】：False【示例】：是數字(12.3)【返回值】：True【示例】：是數字("123")【返回值】：True',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ExistData",name:"子錶有無數據",params:[{key:"propName",name:"子錶",type:"string"}],description:'【功能】：判斷子表中有沒有數據。有數據返回true，無數據返回false。 （所有參數用""包起來）\n【propName】子表屬性（鍊式結構）\n【返回值類型】：布爾(Boolean)\n【示例】：子錶有無數據("Order.OrderItems")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"CountOfChild",name:"子錶數據數量",params:[{key:"table",name:"主表.子表",type:"string"}],description:'【功能】返回子表数据的数量（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n    【返回值】数量（数值类型）\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips\n        【需求】获取差旅明细子表的数量\n        【举例】子錶數據數量("Order.trips")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"SortChildData",name:"子錶數據排序",params:[{key:"setName",name:"子錶",type:"string"},{key:"propName",name:"排序字段",type:"string"},{key:"order",name:"排序方式",type:"string"}],description:'【功能】對子表數據進行排序（所有參數用""包起來）\n    【參數】\n      【setName】子表（鍊式結構）\n      【propName】排序字段（字段類型應為數字類型）\n      【order】排序方式（"ESC"表示正序從小到大，"DESC"表示倒序從大到小）\n    【返回值】無\n    【示例】\n      【場景】提交單據Order，單據包含差旅明細子表trips，子表包含出差費用money字段\n      【需求】按照出差費用money字段對子表從小到大排序\n      【舉例】子錶數據排序("Order.trips","money","ESC")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IncludedInList",name:"是否在列表中",params:[{key:"propName",name:"字段",type:"object"},{key:"list",name:"數據列表",type:"list"}],description:'【功能】：判斷字段是否在數據列表中存在。字段在列表中存在返回true，不存在返回false。支持判斷字符和數字類型。 \n【propName】表屬性（鍊式結構）\n【list】數據列表\n【返回值類型】：布爾(Boolean)\n【示例】：是否在列表中(Order.name,["Zs","Ls"])\n【示例】：是否在列表中(Order.quantity,[100,200])',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"CountByProp",name:"子錶列非空數",params:[{key:"chainedPropName",name:"實體集合屬性名",type:"string"},{key:"propertyName",name:"類型屬性名",type:"string"}],description:'【功能】：統計子表所有數據某屬性不為null的記錄數（所有參數用""包起來）\n【setName】主表的子表屬性（鍊式結構）\n【propName】子表屬性\n【返回值類型】：數值(Int32);\n【示例】：子錶列非空數("Order.OrderItems","Quantity")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"SumByProp",name:"子錶字段求和",params:[{key:"chainedPropName",name:"實體集合屬性名",type:"string"},{key:"propertyName",name:"類型屬性名",type:"string"}],description:'【功能】：統計子表中所有數據某屬性的和（所有參數用""包起來）\n【setName】主表的子表屬性（鍊式結構）\n【propName】子表屬性\n【返回值類型】：數值(Double)\n【示例】：子錶字段求和("Order.OrderItems","Quantity")"',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"AvgByProp",name:"子錶列平均值",params:[{key:"chainedPropName",name:"實體集合屬性名",type:"string"},{key:"propertyName",name:"類型屬性名",type:"string"}],description:'【功能】：統計子表所有數據某數字类型屬性的平均值（所有參數用""包起來）\n【setName】主表的子表屬性（鍊式結構）\n【propName】子表屬性\n【返回值類型】：數值(Double)\n【示例】：子錶列平均值("Order.OrderItems","Quantity")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"MaxByProp",name:"子錶列最大值",params:[{key:"chainedPropName",name:"實體集合屬性名",type:"string"},{key:"propertyName",name:"類型屬性名",type:"string"}],description:'【功能】：返回子表所有數據某數字类型屬性的最大值（所有參數用""包起來）\n【setName】主表的子表屬性（鍊式結構）\n【propName】子表屬性\n【返回值類型】：數值(Double)\n【示例】：子錶列最大值("Order.OrderItems","Quantity")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"MinByProp",name:"子錶列最小值",params:[{key:"chainedPropName",name:"實體集合屬性名",type:"string"},{key:"propertyName",name:"類型屬性名",type:"string"}],description:'【功能】：返回子表所有數據某數字类型屬性的最小值（所有參數用""包起來）\n【setName】主表的子表屬性（鍊式結構）\n【propName】子表屬性\n【返回值類型】：數值(Double)\n【示例】：子錶列最小值("Order.OrderItems","Quantity")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsExistRecord",name:"子錶有無等於匹配值",params:[{key:"chainedPropName",name:"鍊式名稱",type:"string"},{key:"propertyName",name:"屬性名",type:"string"},{key:"match",name:"匹配值",type:"string"}],description:'【功能】：判斷子表所有數據某屬性是否存在等於匹配字符的值（所有參數用""包起來）\n【setName】主表的子表屬性（鍊式結構）\n【propName】子表屬性\n【match】匹配值\n【返回值類型】：布爾值(Boolean)\n【示例】：子錶有無等於匹配值("salesorder.items","code","lc")【返回值】：False/True',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"IsContainMatch",name:"子錶有無包含匹配值",params:[{key:"table",name:"主錶.子錶",type:"string"},{key:"property",name:"子錶字段",type:"string"},{key:"match",name:"匹配值",type:"string"}],description:'【功能】判断子表某字段是否存在包含匹配值的数据（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【property】子表字段\n        【match】匹配值\n    【返回值】true或false\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差方式way\n        【需求】判断差旅明细子表trips是否存在出差方式way包含匹配值\'飞机\'的数据\n        【举例】子錶有無包含匹配值("Order.trips","way","飞机")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ListGreaterThan",name:"子錶有無大於匹配值",params:[{key:"chainedPropName",name:"鍊式名稱",type:"string"},{key:"propertyName",name:"屬性名",type:"string"},{key:"match",name:"匹配值",type:"double"}],description:'【功能】：判斷子表所有數據某數字类型屬性是否存在大於匹配字符的值（前兩個參數用""包起來）\n【setName】主表的子表屬性（鍊式結構）\n【propName】子表屬性\n【match】匹配值\n【返回值類型】：布爾值(Boolean)\n【示例】：子錶有無大於匹配值("salesorder.items","num",100)【返回值】：False/True',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ListLessThan",name:"子錶有無小於匹配值",params:[{key:"chainedPropName",name:"鍊式名稱",type:"string"},{key:"propertyName",name:"屬性名",type:"string"},{key:"match",name:"匹配值",type:"double"}],description:'【功能】：判斷子表所有數據某數字类型屬性是否存在小於匹配字符的值（前兩個參數用""包起來）\n【setName】主表的子表屬性（鍊式結構）\n【propName】子表屬性\n【match】匹配值\n【返回值類型】：布爾值(Boolean)\n【示例】：子錶有無小於匹配值("salesorder.items","num",100)【返回值】：False/True',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ListStartWith",name:"子錶有無以匹配值開頭",params:[{key:"chainedPropName",name:"鍊式名稱",type:"string"},{key:"propertyName",name:"屬性名",type:"string"},{key:"match",name:"匹配值",type:"string"}],description:'【功能】：判斷子表所有數據某屬性是否存在開頭是匹配字符的值（所有參數用""包起來）\n【setName】主表的子表屬性（鍊式結構）\n【propName】子表屬性\n【match】匹配值\n【返回值類型】：布爾值(Boolean)\n【示例】：子錶有無以匹配值開頭("salesorder.items","code","lc")【返回值】：False/True',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ListEndWith",name:"子錶有無以匹配值結尾",params:[{key:"chainedPropName",name:"鍊式名稱",type:"string"},{key:"propertyName",name:"屬性名",type:"string"},{key:"match",name:"匹配值",type:"string"}],description:'【功能】：判斷子表所有數據某屬性是否存在結尾是匹配字符的值（所有參數用""包起來）\n【setName】主表的子表屬性（鍊式結構）\n【propName】子表屬性\n【match】匹配值\n【返回值類型】：布爾值(Boolean)\n【示例】：子錶有無以匹配值結尾("salesorder.items","code","lc")【返回值】：False/True',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"GetComputeJsonData",name:"子錶字段取JSON串",params:[{key:"chainedPropName",name:"鍊式名稱",type:"string"},{key:"propertyName",name:"屬性名",type:"string"}],description:'【功能】：獲取子表中所有數據某屬性的值，並以JSON串形式返回（所有參數用""包起來）\n【setName】主表的子表屬性（鍊式結構）\n【propName】子表屬性\n【返回值類型】：對象(String)【返回值示例】：[11,22,33]',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"MultiplyChildNumber",name:"子錶屬性乘積求和",params:[{key:"childTable",name:"子錶鍊式名稱",type:"string"},{key:"prop1",name:"屬性一",type:"string"},{key:"prop2",name:"屬性二",type:"string"}],description:'【功能】對子表的兩個數字類型屬性，先做乘積，然後求和（所有參數用""包起來）\n【參數】\n  【table】主表中子表屬性（鍊式結構）\n  【prop1】屬性一（類型應為數字類型）\n  【prop2】屬性二（類型應為數字類型）\n【返回值】數字型\n【示例】\n  【場景】提交單據Order，單據包含差旅明細子表trips，子表包含出差天數days、出差費用money\n  【需求】獲取差旅明細的總費用，即子表出差天數x出差費用的總和\n  【舉例】子錶屬性乘積求和("Order.trips","days","money")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"MinValueOfPeriod",name:"時間範圍內取最小值",params:[{key:"table",name:"主表.子表",type:"string"},{key:"timeProp",name:"比较时间字段",type:"string"},{key:"valueProp",name:"取值字段",type:"string"},{key:"startTime",name:"起始时间",type:"string"},{key:"endTime",name:"结束时间",type:"string"}],description:'【功能】在指定时间范围内，取子表某字段的最小值（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【timeProp】比较时间字段（字段类型应为时间类型）\n        【valueProp】取值字段（字段类型应为数字类型）\n        【startTime】起始时间（支持\'yyyy-MM-dd\' 或 \'yyyy-MM-dd hh:mm:ss\'）\n        【endTime】结束时间（支持\'yyyy-MM-dd\' 或 \'yyyy-MM-dd hh:mm:ss\'）\n    【返回值】时间范围内，子表某字段的最小值\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差费用money字段，出差日期date字段\n        【需求】获取2022-10-01到2022-10-07时间段内，哪一天的出差费用money最小\n        【举例】時間範圍內取最小值("Order.trips","date","money","2022-10-01","2022-10-07")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"MaxValueOfPeriod",name:"時間範圍內取最大值",params:[{key:"table",name:"主表.子表",type:"string"},{key:"timeProp",name:"比较时间字段",type:"string"},{key:"valueProp",name:"取值字段",type:"string"},{key:"startTime",name:"起始时间",type:"string"},{key:"endTime",name:"结束时间",type:"string"}],description:'【功能】在指定时间范围内，取子表某字段的最大值（参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【timeProp】比较时间字段（字段类型应为时间类型）\n        【valueProp】取值字段（字段类型应为数字类型）\n        【startTime】起始时间（支持\'yyyy-MM-dd\' 或 \'yyyy-MM-dd hh:mm:ss\'）\n        【endTime】结束时间（支持\'yyyy-MM-dd\' 或 \'yyyy-MM-dd hh:mm:ss\'）\n    【返回值】时间范围内，子表某字段的最大值\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差费用money字段，出差日期date字段\n        【需求】获取2022-10-01到2022-10-07时间段内，哪一天的出差费用money最大\n        【举例】時間範圍內取最大值("Order.trips","date","money","2022-10-01","2022-10-07")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"AvgValueOfPeriod",name:"時間範圍內取平均值",params:[{key:"table",name:"主表.子表",type:"string"},{key:"timeProp",name:"比较时间字段",type:"string"},{key:"valueProp",name:"取值字段",type:"string"},{key:"startTime",name:"起始时间",type:"string"},{key:"endTime",name:"结束时间",type:"string"}],description:'【功能】在指定时间范围内，取子表某字段的平均值（所有参数用""包起来）\n    【参数】\n        【table】主表.子表（链式结构）\n        【timeProp】比较时间字段（字段类型应为时间类型）\n        【valueProp】取值字段（字段类型应为数字类型）\n        【startTime】起始时间（支持\'yyyy-MM-dd\' 或 \'yyyy-MM-dd hh:mm:ss\'）\n        【endTime】结束时间（支持\'yyyy-MM-dd\' 或 \'yyyy-MM-dd hh:mm:ss\'）\n    【返回值】时间范围内，子表某字段的平均值\n    【示例】\n        【场景】提交单据Order，单据包含差旅明细子表trips，子表包含出差费用money字段，出差日期date字段\n        【需求】获取2022-10-01到2022-10-07时间段内，平均的出差费用money是多少\n        【举例】時間範圍內取平均值("Order.trips","date","money","2022-10-01","2022-10-07")',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"GetSessionValue",name:"獲取會話變量的值",params:[{key:"name",name:"會話變量名",type:"string"}],description:"【功能】：獲取用戶會話變量的值\n【name】：會話變量名稱\n【返回值類型】：對象(Object)",type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"GetContextParameter",name:"獲取上下文變量的值",params:[{key:"name",name:"上下文變量名",type:"string"}],description:"【功能】：獲取上下文變量的值\n【name】：上下文變量名稱\n【返回值類型】：對象(Object)",type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"getComputeJsonData",name:"根據屬性名獲取JSON串"},{key:"GetInjectedEntity",name:"根據注入名獲取注入對象",params:[{key:"name",name:"注入名",type:"string"}],description:'【功能】：獲取運行時注入對象的實際對象(參數用""包起來），不支持獲取屬性\n【name】注入对象名稱\n【返回值類型】：對象(Object)',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"GetChainedPropertyValue",name:"根據屬性名獲取屬性值",params:[{key:"propName",name:"属性",type:"string"}],description:'【功能】：獲取運行時注入屬性的實際值(參數用""包起來）\n【propName】屬性（鍊式結構）\n【返回值類型】：對象(Object)',type:"Analytical",keyFront:"DefaultFunction",className:""},{key:"ParseEnum",name:"枚舉取值",params:[{key:"name",name:"枚舉欄位",type:"string"},{key:"map",name:"枚舉集合",type:"obj"}],description:"【功能】：將枚舉解析為顯示值【返回值類型】：數位或字串\n【示例】：枚舉取值(SysApproval.version，Enum.SysApproval.version)== '通過'【返回值】：\"true\"",type:"Special",keyFront:"DefaultFunction",className:""}],Ae=[{key:"DayDifference",name:"天數差",params:[{key:"date1",name:"時間一",type:"obj"},{key:"date2",name:"時間二",type:"obj"}],description:'【功能】計算兩個時間的天數差，計算時以年月日為准，自動忽略時分秒。時間一若早於時間二，返回正數； 若晚於時間二，返回負數\n    【參數】\n        【date1】時間一\n        【date2】時間二\n    【返回值】兩個日期的天數差\n    【示例】\n        【示例一】天數差("2024-01-01","2024-01-11")\n        【返回值】10\n        【示例一】天數差("2024-01-11","2024-01-01")\n        【返回值】-10',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"DateTimeAddDays",name:"增加天數",params:[{key:"date",name:"日期時間",type:"string"},{key:"value",name:"增加天數",type:"int"}],description:'【功能】：在指定日期時間上增加指定天數\n【返回值類型】：日期時間(DateTime)\n【示例】：增加天數("2019-01-30T10:00:00+08:00",2)【返回值】:2019-02-01T10:00+08:00',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"DateTimeAddYears",name:"增加年數",params:[{key:"date",name:"日期時間",type:"string"},{key:"value",name:"增加年數",type:"int"}],description:'【功能】：在指定日期時間上增加指定年數\n【返回值類型】：日期時間(DateTime)\n【示例】：增加年數("2019-01-30T10:00:00+08:00",2)【返回值】:2021-01-30T10:00+08:00',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"DateTimeAddMonths",name:"增加月數",params:[{key:"date",name:"日期時間",type:"string"},{key:"value",name:"增加月數",type:"int"}],description:'【功能】：在指定日期時間上增加指定的月數\n【返回值類型】：日期時間(DateTime)\n【示例】：增加月數("2019-01-30T10:00:00+08:00",1)【返回值】:2019-02-28T10:00+08:00',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"GetFirstDayOfMonth",name:"日期所在月第一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：獲取指定日期時間所在月的第一天的日期\n【返回值類型】：日期時間(DateTime)\n【示例】：日期所在月第一天("2019-01-30T10:00:00+08:00")【返回值】:2019-01-01',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"GetLastDayOfMonth",name:"日期所在月最後一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：獲取指定日期時間所在月的最後一天的日期\n【返回值類型】：日期時間(DateTime)\n【示例】：日期所在月最後一天("2019-01-30T10:00:00+08:00")【返回值】:2019-01-31',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"GetDateTimeNow",name:"當前日期時間",params:[],description:"【功能】：獲取當前的日期時間\n【返回值類型】：日期時間(DateTime)\n【示例】：當前日期時間()【返回值】:2019-01-30T12:00:00.000+08:00",type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"CompareDate",name:"比較兩個時間",params:[{key:"str1",name:"日期時間1",type:"string"},{key:"str2",name:"日期時間2",type:"string"}],description:'【功能】：比較兩個時間值，並返回一個整數\n【返回值類型】：數值(int32)日期1早於日期2，返回-1;日期1等於日期2，返回0;日期1晚於日期2，返回1\n【示例】：比較兩個時間("2019-01-30T10:00:00+08:00","2019-02-01T10:00:00+08:00")【返回值】：-1',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FormatDate",name:"格式化當前日期",params:[{key:"format",name:"格式串",type:"string"}],description:'【功能】：使用指定的格式將當前日期時間值轉換為其等效的字符串表示形式\n【返回值類型】：字符串(String)\n【示例】：格式化當前日期("yyyy-MM-dd HH:mm:ss")【返回值】："2019-01-30 01:00:00"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FormatDefineDate",name:"格式化指定日期",params:[{key:"format",name:"格式串",type:"string"},{key:"date",name:"日期時間",type:"string"}],description:'【功能】：使用指定的格式將指定的日期時間值轉換為其等效的字符串表示形式\n【返回值類型】：字符串(String)\n【示例】：格式化指定日期("yyyy-MM-dd HH:mm:ss","2019-01-30 01:00:00")【返回值】："2019-01-30 01:00:00"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"Today",name:"今天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的今天，格式為"yyyy-MM-dd"形式，無參數則默認返回當前日期的今天\n【返回值類型】：字符串(String)\n【示例】：今天("2019-01-30T10:00:00+08:00")【返回值】："2019-01-30"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"Yesterday",name:"昨天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的昨天，格式為"yyyy-MM-dd"形式，無參數則默認返回當前日期的昨天\n【返回值類型】：字符串(String)\n【示例】：昨天("2019-01-30T10:00:00+08:00")【返回值】："2019-01-29"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"Tomorrow",name:"明天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的明天，格式為"yyyy-MM-dd"形式，無參數則默認返回當前日期的明天\n【返回值類型】：字符串(String)\n【示例】：明天("2019-01-30T10:00:00+08:00")【返回值】："2019-01-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"ThisYear",name:"本年",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的本年，格式為"yyyy"形式，無參數則默認返回當前日期的本年\n【返回值類型】：字符串(String)\n【示例】：本年("2019-01-30T10:00:00+08:00")【返回值】："2019"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastYear",name:"去年",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的去年，格式為"yyyy"形式，無參數則默認返回當前日期的去年\n【返回值類型】：字符串(String)\n【示例】：去年("2019-01-30T10:00:00+08:00")【返回值】："2018"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"NextYear",name:"明年",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的明年，格式為"yyyy"形式，無參數則默認返回當前日期的明年\n【返回值類型】：字符串(String)\n【示例】：明年("2019-01-30T01:00:00+08:00")【返回值】："2020"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"ThisMonth",name:"本月",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的本月，格式為"MM"形式，無參數則默認返回當前日期的本月\n【返回值類型】：字符串(String)\n【示例】：本月("2019-01-30T01:00:00+08:00")【返回值】："1"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastMonth",name:"上月",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的上月，格式為"MM"形式，無參數則默認返回當前日期的上月\n【返回值類型】：字符串(String)\n【示例】：上月("2019-02-30 01:00:00")【返回值】："1"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"NextMonth",name:"下月",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的下月，格式為"MM"形式，無參數則默認返回當前日期的下月\n【返回值類型】：字符串(String)\n【示例】：下月("2019-01-30T01:00:00+08:00")【返回值】："2"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"ThisWeek",name:"本週",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期在本年的第幾週，格式為"ww"形式，無參數則默認返回當前日期在本年的第幾週\n【返回值類型】：字符串(String)\n【示例】：本週("2019-01-30T01:00:00+08:00")【返回值】："5"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastWeek",name:"上週",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的上週，格式為"ww"形式，無參數則默認返回當前日期的上週\n【返回值類型】：字符串(String)\n【示例】：上週("2019-01-30T01:00:00+08:00")【返回值】："4"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"NextWeek",name:"下週",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的下週，格式為"ww"形式，無參數則默認返回當前日期的下週\n【返回值類型】：字符串(String)\n【示例】：下週("2019-01-30T01:00:00+08:00")【返回值】："6"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"DayOfWeek",name:"星期幾",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期是本週的星期幾，格式為"n"，無參數則默認返回當前日期是本週的星期幾\n【返回值類型】：字符串(String)\n【示例】：星期幾("2019-01-30T01:00:00+08:00")【返回值】："3"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfWeek",name:"本週第一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的本週第一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的本週第一天\n【返回值類型】：字符串(String)\n【示例】：本週第一天("2019-01-30T01:00:00+08:00")【返回值】："2019-01-28"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfWeek",name:"本週最後一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的本週最後一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的本週第一天\n【返回值類型】：字符串(String)\n【示例】：本週最後一天("2019-01-30T01:00:00+08:00")【返回值】："2019-02-03"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfLastWeek",name:"上週第一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的上週第一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的上週第一天\n【返回值類型】：字符串(String)\n【示例】：上週第一天("2019-01-30T01:00:00+08:00")【返回值】："2019-01-21"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfLastWeek",name:"上週最後一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的上週最後一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的上週最後一天\n【返回值類型】：字符串(System.String)\n【示例】：上週最後一天("2019-01-30T01:00:00+08:00")【返回值】："2019-01-27"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfNextWeek",name:"下週第一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的下週第一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的下週第一天\n【返回值類型】：字符串(String)\n【示例】：下週第一天("2019-01-30T01:00:00+08:00")【返回值】："2019-02-04"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfNextWeek",name:"下週最後一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的下週最後一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的下週最後一天\n【返回值類型】：字符串(String)\n【示例】：下週最後一天("2019-01-30T01:00:00+08:00")【返回值】："2019-02-10"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfMonth",name:"本月第一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的本月第一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的本月第一天\n【返回值類型】：字符串(String)\n【示例】：本月第一天("2019-01-30T01:00:00+08:00")【返回值】："2019-01-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfMonth",name:"本月最後一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的本月最後一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的本月最後一天\n【返回值類型】：字符串(String)\n【示例】：本月最後一天("2019-01-30T01:00:00+08:00")【返回值】："2019-01-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfLastMonth",name:"上月第一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的上月第一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的上月第一天\n【返回值類型】：字符串(String)\n【示例】：上月第一天("2019-01-30T01:00:00+08:00")【返回值】："2018-12-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfLastMonth",name:"上月最後一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的上月最後一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的上月最後一天\n【返回值類型】：字符串(String)\n【示例】：上月最後一天("2019-01-30T01:00:00+08:00")【返回值】："2018-12-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfNextMonth",name:"下月第一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的下月第一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的下月第一天\n【返回值類型】：字符串(String)\n【示例】：下月第一天("2019-01-30T01:00:00+08:00")【返回值】："2019-02-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfNextMonth",name:"下月最後一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的下月最後一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的下月最後一天\n【返回值類型】：字符串(String)\n【示例】：下月最後一天("2019-01-30T01:00:00+08:00")【返回值】："2019-02-28"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfYear",name:"本年第一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的本年第一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的本年第一天\n【返回值類型】：字符串(String)\n【示例】：本年第一天("2019-01-30T01:00:00+08:00")【返回值】："2019-01-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfYear",name:"本年最後一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的本年最後一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的本年最後一天\n【返回值類型】：字符串(String)\n【示例】：本年最後一天("2019-01-30T01:00:00+08:00")【返回值】："2019-12-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfLastYear",name:"上年第一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的上年第一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的上年第一天\n【返回值類型】：字符串(String)\n【示例】：上年第一天("2019-01-30T01:00:00+08:00")【返回值】："2018-01-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfLastYear",name:"上年最後一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的上年最後一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的上年最後一天\n【返回值類型】：字符串(String)\n【示例】：上年最後一天("2019-01-30T01:00:00+08:00")【返回值】："2018-12-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"FirstDayOfNextYear",name:"下年第一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的下年第一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的下年第一天\n【返回值類型】：字符串(String)\n【示例】：下年第一天("2019-01-30T01:00:00+08:00")【返回值】："2020-01-01"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"LastDayOfNextYear",name:"下年最後一天",params:[{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定日期的下年最後一天，格式為"yyyy-MM-dd"，無參數則默認返回當前日期的下年最後一天\n【返回值類型】：字符串(String)\n【示例】：下年最後一天("2019-01-30T01:00:00+08:00")【返回值】："2020-12-31"',type:"DateTime",keyFront:"DefaultFunction",className:""},{key:"GetDate",name:"返回指定形式的日期",params:[{key:"format",name:"格式串",type:"string"},{key:"date",name:"日期時間",type:"string"}],description:'【功能】：返回指定形式的日期，無參數則默認返回當前日期的指定格式日期\n【返回值類型】：字符串(String)\nDD：今天\tLD：昨天\tND：明天\tYY：本年\tLY：上年\tNY：下年\tMM：本月\tLM：上月\tNM：下月\nWD：星期幾\tWW：本週\tLW：上週\tNW：下週\tFDW：本週首日\tLDW：本週尾日\tFDLW：上週首日\tLDLW：上週尾日\nFDNW：下週首日\tLDNW：下週尾日\tFDM：本月首日\tLDM：本月尾日\tFDLM：上月首日\tLDLM：上月尾日\tFDNM：下月首日\tLDNM：下月尾日\nFDY：本年首日\tLDY：本年尾日\tFDLY：上年首日\tLDLY：上年尾日\tFDNY：下年首日\tLDNY：下年尾日\n【示例】：返回指定格式的日期("LD","2019-01-30T01:00:00+08:00")【返回值】："2019-01-29"',type:"DateTime",keyFront:"DefaultFunction",className:""}],Re=[{key:"NumberThousandSeparator",name:"數字千位分隔",params:[{key:"property",name:"數字類型字段",type:"int32"}],description:"【功能】對數字添加千位分割符，以逗號作為千位分隔符\n【參數】\n  【property】字段（鍊式結構）\n【返回值】字符型\n【示例】\n  【場景】提交單據Order，單據包含總費用totalCost\n  【需求】優化總費用展示，對總費用添加千位分隔符\n  【舉例】數字千位分隔(Order.totalCost)\n  【返回值】1,234,567.89",type:"Math",keyFront:"DefaultFunction",className:""},{key:"abs",name:"絕對值",params:[{key:"value",name:"數值",type:"double"}],description:"【功能】：返回一個數值的絕對值\n【返回值類型】：數值(Double)\n【示例】：絕對值(-1.5)【返回值】：1.5",type:"Math",keyFront:"Math",className:""},{key:"Round",name:"四捨五入"},{key:"round",name:"四捨五入",params:[{key:"value1",name:"數值",type:"double"},{key:"value2",name:"小數位數",type:"int32"}],description:"【功能】：根據小數位數精度，對數值四捨五入\n【value1】：數值\n【value2】：四捨五入小數位數\n【返回值類型】：數值(Double)\n【示例】：四捨五入(1.52,1)【返回值】：1.5",type:"Math",keyFront:"DefaultFunction",className:""},{key:"random",name:"隨機數",params:[],description:"【功能】：隨機生成大於等於 0.0 且小於 1.0 的偽隨機值\n【返回值類型】：數值(Double)\n【示例】：隨機數()【返回值】：0.624508349393",type:"Math",keyFront:"Math",className:""},{key:"sin",name:"正弦",params:[{key:"value",name:"數值",type:"double"}],description:"【功能】：返回一個數字的正弦值\n【返回值類型】：數值(Double)一個以弧度表示的角\n【示例】：正弦(1)【返回值】：0.84187098",type:"Math",keyFront:"Math",className:""},{key:"cos",name:"餘弦",params:[{key:"value",name:"數值",type:"double"}],description:"【功能】：返回一個數字的餘弦值\n【返回值類型】：數值(Double)一個以弧度表示的角\n【示例】：餘弦(3)【返回值】：-0.9899924",type:"Math",keyFront:"Math",className:""},{key:"ceil",name:"向上舍入",params:[{key:"value",name:"數值",type:"double"}],description:"【功能】：返回大於或等於函數參數，並且與之最接近的整數\n【返回值類型】：數值(Int32)\n【示例】：向上舍入(3.2)【返回值】：4",type:"Math",keyFront:"Math",className:""},{key:"floor",name:"向下舍入",params:[{key:"value",name:"數值",type:"double"}],description:"【功能】：返回小於或等於函數參數，並且與之最接近的整數\n【返回值類型】：數值(Int32)\n【示例】：向下舍入(3.2)【返回值】：3",type:"Math",keyFront:"Math",className:""},{key:"BankerRound",name:"銀行家舍入"},{key:"bankerRound",name:"銀行家舍入",params:[{key:"value1",name:"數值",type:"double"},{key:"value2",name:"小數位數",type:"int32"}],description:"【功能】：使用銀行家舍入標準，把指定數字舍入為最接近的數字\n【value1】：舍入數值\n【value2】：舍入小數位數\n【返回值類型】：數值(Double)\n【示例】：銀行家舍入(36.124,2)【返回值】：36.12",type:"Math",keyFront:"DefaultFunction",className:""}],Pe=[{key:"StringSubstring",name:"取子字符串"},{key:"SubString",name:"取子字符串",params:[{key:"data",name:"源字符串",type:"str"},{key:"start",name:"起始位置",type:"int"},{key:"length",name:"長度",type:"int"}],description:'【功能】：從字符串中指定位置開始，截取指定長度的字符串並返回\n【返回值類型】：字符串(String)\n【示例】：取子字符串("ABCDEFG",2,3)【返回值】："CDE"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringLength",name:"取字符串長度"},{key:"Length",name:"取字符串長度",params:[{key:"data",name:"源字符串",type:"str"}],description:'【功能】：獲取字符串的長度\n【返回值類型】：數值(Int32)\n【示例】：取字符串長度("ABCDEF")【返回值】：6',type:"String",keyFront:"DefaultFunction",className:""},{key:"Contains",name:"是否包含",params:[{key:"data",name:"源字符串",type:"str"},{key:"target",name:"目標字符串",type:"str"}],description:'【功能】：判斷字符串中是否包含目標字符串\n【返回值類型】：布爾(Boolean)\n【示例】：是否包含(salesorder.code,"表達式")【返回值】：false',type:"String",keyFront:"DefaultFunction",className:""},{key:"NotContains",name:"是否不包含",params:[{key:"data",name:"字符串",type:"str"},{key:"target",name:"目標字符串",type:"str"}],description:'【功能】：判斷字符串中是否不包含目標字符串\n【返回值類型】：布爾(Boolean)\n【示例】：是否不包含(salesorder.code,"表達式")【返回值】：true',type:"String",keyFront:"DefaultFunction",className:""},{key:"StartsWith",name:"開頭是",params:[{key:"data",name:"源字符串",type:"str"},{key:"target",name:"目標字符串",type:"str"}],description:'【功能】：判斷字符串是否以目標字符串開頭\n【返回值類型】：布爾(Boolean)\n【示例】：開頭是(salesorder.code,"表達式")【返回值】：false',type:"String",keyFront:"DefaultFunction",className:""},{key:"NotStartsWith",name:"開頭不是",params:[{key:"data",name:"字符串",type:"str"},{key:"target",name:"目標字符串",type:"str"}],description:'【功能】：判斷字符串是否不以目標字符串開頭\n【返回值類型】：布爾(Boolean)\n【示例】：開頭不是(salesorder.code,"表達式")【返回值】：true',type:"String",keyFront:"DefaultFunction",className:""},{key:"EndsWith",name:"結尾是",params:[{key:"data",name:"源字符串",type:"str"},{key:"target",name:"目標字符串",type:"str"}],description:'【功能】：判斷字符串是否以目標字符串結尾\n【返回值類型】：布爾(Boolean)\n【示例】：結尾是(salesorder.code,"表達式")【返回值】：false',type:"String",keyFront:"DefaultFunction",className:""},{key:"NotEndsWith",name:"結尾不是",params:[{key:"data",name:"字符串",type:"str"},{key:"target",name:"目標字符串",type:"str"}],description:'【功能】：判斷字符串是否不以目標字符串結尾\n【返回值類型】：布爾(Boolean)\n【示例】：結尾不是(salesorder.code,"表達式")【返回值】：false',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringReplace",name:"字符串替換"},{key:"Replace",name:"字符串替換",params:[{key:"data",name:"源字符串",type:"str"},{key:"oldVal",name:"被替換值",type:"str"},{key:"newVal",name:"替換值",type:"str"}],description:'【功能】：將字符串中的"被替換值"替換為"替換值"\n【返回值類型】：字符串(String)\n【示例】：字符串替換("123412","12","00")【返回值】："003400"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringToUpper",name:"轉大寫"},{key:"ToUpper",name:"轉大寫",params:[{key:"data",name:"源字符串",type:"str"}],description:'【功能】：將源字符串轉換為大寫\n【data】：源字符串\n【返回值類型】：字符串(System.String)\n【示例】：ToUpper("abc")\n【返回值】："ABC"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringToLower",name:"轉小寫"},{key:"ToLower",name:"轉小寫",params:[{key:"data",name:"源字符串",type:"str"}],description:'【功能】：將源字符串轉換為小寫\n【data】：源字符串\n【返回值類型】：字符串(System.String)\n【示例】：ToLower("ABC")\n【返回值】："abc"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringIndexOf",name:"首個匹配字符索引"},{key:"IndexOf",name:"首個匹配字符索引",params:[{key:"data",name:"源字符串",type:"str"},{key:"target",name:"目標字符串",type:"str"}],description:'【功能】：在字符串中檢索目標字符串，找到首個匹配的字符串並返回索引位置(從0開始)。如果未找到則返回-1，如果目標字符串為空則返回0，如果原字符串為null則返回-1\n【返回值類型】：數值(Int32)\n【示例】：首個匹配字符索引("12001234012","01")【返回值】：3\n【示例】：首個匹配字符索引("12002323","34")【返回值】：-1\n【示例】：首個匹配字符索引("120011","")【返回值】：0',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringLastIndexOf",name:"最後匹配字符索引"},{key:"LastIndexOf",name:"最後匹配字符索引",params:[{key:"data",name:"源字符串",type:"str"},{key:"target",name:"目標字符串",type:"str"}],description:'【功能】：在字符串中檢索目標字符串，找到最後一個匹配的字符串後返回索引位置(從0開始)。如果未找到則返回-1，如果目標字符串為空串則返回原字符串長度，如果原字符串為null則返回-1\n【返回值類型】：數值(Int32)\n【示例】：最後匹配字符索引("12001234012","01")【返回值】：8\n【示例】：最後匹配字符索引("12002323","34")【返回值】：-1\n【示例】：最後匹配字符索引("120011","")【返回值】：6',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringTrimStart",name:"刪除頭部空格"},{key:"TrimStart",name:"刪除頭部空格",params:[{key:"data",name:"源字符串",type:"str"}],description:'【功能】：刪除字符串的頭部空格並返回\n【返回值類型】：字符串(String)\n【示例】：刪除頭部空格("    ABC")【返回值】："ABC"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringTrimEnd",name:"刪除尾部空格"},{key:"TrimEnd",name:"刪除尾部空格",params:[{key:"data",name:"源字符串",type:"str"}],description:'【功能】：刪除字符串的尾部空格並返回\n【返回值類型】：字符串(String)\n【示例】：刪除尾部空格("ABC    ")【返回值】："ABC"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringTrim",name:"刪除頭尾部空格"},{key:"Trim",name:"刪除頭尾部空格",params:[{key:"data",name:"源字符串",type:"str"}],description:'【功能】：刪除字符串的頭尾部空格並返回\n【返回值類型】：字符串(String)\n【示例】：刪除頭尾部空格("    ABC    ")【返回值】："ABC"',type:"String",keyFront:"DefaultFunction",className:""},{key:"CreateGuid",name:"唯一標識符",params:[],description:'【功能】：獲取唯一標識符Guid\n【返回值類型】：字符串(String)\n【示例】：唯一標識符()【返回值】："7722A793-14DF-49CD-B7E7-DF4987YYD2"',type:"String",keyFront:"DefaultFunction",className:""},{key:"StringAdd",name:"字符串相加"},{key:"Add",name:"字符串相加",params:[{key:"str1",name:"第一個字符串",type:"str"},{key:"str2",name:"第二個字符串",type:"str"}],description:'【功能】：將若干字符串拼接成一個新字符串，最多支持10個字符串拼接，最少2個；編輯器中默認插入兩個，多個字符串可手動添加\n【返回值類型】：字符串(String)\n【示例】：字符串相加("Hello","World")【返回值】："HelloWord"',type:"String",keyFront:"DefaultFunction",className:""}],Le=[{key:"ToStringX",name:"轉字符串",params:[{key:"obj",name:"轉換對象",type:"object"}],description:'【功能】：將轉換值轉換為字符串\n【返回值類型】：字符串(String)\n【示例】：轉字符串(123)【返回值】："123"',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToDateTime",name:"轉日期時間",params:[{key:"obj",name:"轉換對象",type:"object"}],description:'【功能】：將轉換值轉換成日期時間\n【返回值類型】：日期時間(OffsetDateTime)\n【示例】：轉日期時間("2019-01-30T10:00:00+08:00")【返回值】: 2019-01-30T10:00+08:00',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToBoolean",name:"轉布爾值",params:[{key:"obj",name:"轉換對象",type:"object"}],description:'【功能】：將轉換值轉換成等效的布爾值\n【返回值類型】：布爾值(Boolean)\n【示例】：轉布爾值("True")【返回值】：true',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToDecimal",name:"轉數值"},{key:"ToBigDecimal",name:"轉數值",params:[{key:"obj",name:"轉換對象",type:"object"}],description:'【功能】：將轉換值轉換成十進制數值\n【返回值類型】：十進制數值(BigDecimal)\n【示例】：轉數值("40.23")【返回值】：40.23',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToCustomBigDecimal",name:"轉自定義精度數值",params:[{key:"obj",name:"轉換對象",type:"object"},{key:"number",name:"小數位數",type:"int"}],description:'【功能】：將轉換值轉換成指定精度的十進制數值\n【返回值類型】：十進制數值(BigDecimal)\n【示例】：轉自定義精度數值("40.2,2")【返回值】：40.20',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToDouble",name:"轉雙精度浮點數",params:[{key:"obj",name:"轉換對象",type:"object"}],description:'【功能】：將轉換值轉換成雙精度浮點數\n【返回值類型】：雙精度浮點數(Double)\n【示例】：轉雙精度浮點數("40.23")【返回值】：40.23',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToSingle",name:"轉單精度浮點數"},{key:"ToFloat",name:"轉單精度浮點數",params:[{key:"obj",name:"轉換對象",type:"object"}],description:'【功能】：將轉換值轉換成單精度浮點數\n【返回值類型】：單精度浮點數(Float)\n【示例】：轉單精度浮點數("40.23")【返回值】：40.23',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToByte",name:"轉8位無符號整數",params:[{key:"obj",name:"轉換對象",type:"object"}],description:'【功能】：將轉換值轉換成8位無符號整數\n【返回值類型】：8位無符號整數(Byte)\n【示例】：轉8位無符號整數("10")【返回值】：10',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToInt16",name:"轉16位有符號整數",params:[{key:"obj",name:"轉換對象",type:"object"}],description:'【功能】：將轉換值轉換成16位有符號整數\n【返回值類型】：16位有符號整數(Int16)\n【示例】：轉16位有符號整數("10")【返回值】：10',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToInt32",name:"轉32位有符號整數",params:[{key:"obj",name:"轉換對象",type:"object"}],description:'【功能】：將轉換值轉換成32位有符號整數\n【返回值類型】：32位有符號整數(Int32)\n【示例】：轉32位有符號整數("10")【返回值】：10',type:"Translate",keyFront:"DefaultFunction",className:""},{key:"ToChineseMoney",name:"轉中文大寫金額",params:[{key:"obj",name:"轉換對象",type:"object"}],description:'【功能】：將轉換值轉換成中文大寫金額\n【返回值類型】：字符串(String)\n【示例】：轉中文大寫金額(40.23)【返回值】："肆拾元零貳角叁分"',type:"Translate",keyFront:"DefaultFunction",className:""}],Be=(je.prototype.get=function(e){return this.allFunctions.get(e)},je);function je(){this.allFunctions=new Map,this.allFunctions.clear();var e=[],e=(e=(e=(e=(e=(e=(e=e.concat(be)).concat(ve)).concat(Ee)).concat(xe)).concat(De)).concat(Se),this.allFunctions.set("zh-CHS",e),[]),e=(e=(e=(e=(e=(e=(e=e.concat(Ne)).concat(Fe)).concat(Te)).concat(we)).concat(Ce)).concat(Ie),this.allFunctions.set("en",e),[]);e=(e=(e=(e=(e=(e=e.concat(Me)).concat(Oe)).concat(Ae)).concat(Re)).concat(Pe)).concat(Le),this.allFunctions.set("zh-CHT",e)}var _e=function(){this.entitySets=[],this.entityTypes=[],this.associations=[]},Ve=function(){},We=function(){this.properties=[],this.keys=[],this.navigationProperties=[]},He=function(){},Ge=function(){},ze=function(){},i={String:"String",Byte:"Byte",Boolean:"Boolean",Date:"Date",DateTime:"DateTime",Decimal:"Decimal",Integer:"Integer"},d={EntitySet:"EntitySet",EntityType:"EntityType",EntityEnum:"EntityEnum"},Ye=function(){this.closeable=!1},qe=function(){this.expr=null,this.sexpr="",this.sessionEntities=[],this.contextEntities=[],this.functionEntities=[],this.schemaMap=new Map,this.newSchemaMap=new Map,this.injectedEntities=[],this.smartHelpEntities=[]},Ue=(Je.from=function(e){return null!=e&&(null==e.Function_ShowExtend&&(e.Function_ShowExtend=!0),null==e.Function_ShowExtendItems&&(e.Function_ShowExtendItems=null),null==e.DataModel_ShowChildSymbol&&(e.DataModel_ShowChildSymbol=!0),null==e.DataArea_DefaultSelect&&(e.DataArea_DefaultSelect=Ke.DataModel),null==e.DataArea_Variable_Items&&(e.DataArea_Variable_Items=null),null==e.DataArea_Variable_Context&&(e.DataArea_Variable_Context=null),null==e.DataArea_Variable_Session)&&(e.DataArea_Variable_Session=null),e},Je);function Je(){this.Function_ShowExtend=!0,this.Function_ShowExtendItems=null,this.DataModel_ShowChildSymbol=!0,this.DataArea_DefaultSelect=Ke.DataModel,this.DataArea_Variable_Items=null,this.DataArea_Variable_Context=null,this.DataArea_Variable_Session=null}var $e=function(){this.properties=[],this.contextVariables=[],this.sessionVariables=[]},Ke={DataModel:"DataModel",Variable:"Variable",Help:"Help"},Qe=function(){},p={Conditional:0,Advanced:1},Ze=(p[p.Conditional]="Conditional",p[p.Advanced]="Advanced",function(){}),m={EntitySet:0,EntityType:1,EntityEnum:2,EntityType_ChildTable:3},Xe=(m[m.EntitySet]="EntitySet",m[m.EntityType]="EntityType",m[m.EntityEnum]="EntityEnum",m[m.EntityType_ChildTable]="EntityType_ChildTable",function(){}),et=function(){},tt=function(){},T={Advanced:"Advanced",Analytical:"Analytical",DateTime:"DateTime",Math:"Math",String:"String",Translate:"Translate",Extend:"Extend"},nt=function(){},at=function(){this.params=[],this.className=""},it=function(){this.params=[],this.isLatestExtendFunc=null},r=(s.analyMemberExpression=function(e){var t,n,a,i="";return"MemberExpression"==e.type&&(t=e.object,n=e.property,"MemberExpression"==t.type?(a=this.analyMemberExpression(t),i=""==i?a:a+"."+i):"Identifier"==t.type&&(i=""==i?t.name:i+"."+t.name),"Identifier"==n.type?i=1==e.computed?""==i?n.name:i+"["+n.name+"]":""==i?n.name:i+"."+n.name:"Literal"==n.type&&(i=1==e.computed?""==i?n.raw:i+"["+n.raw+"]":""==i?n.raw:i+"."+n.raw)),i},s.analyVariableDeclaration=function(e){var t=[];if("VariableDeclaration"==e.type&&null!=e.declarations&&0!=e.declarations.length)for(var n=0;n<e.declarations.length;n++){var a,i=e.declarations[n];"VariableDeclarator"==i.type&&(a={symbol:i.id.name,type:null,value:null},null!=(i=i.init)&&("Literal"==i.type?(a.type="Literal",a.value=i.raw):"Identifier"==i.type?(a.type="Identifier",a.value=i.name):"MemberExpression"==i.type?a.value=this.analyMemberExpression(i):"ConditionalExpression"==i.type&&this.cycleAnalyConditionalExpression(i,t)),t.push(a))}return t},s.analyReturnStatement=function(e){var t,n,a=[];return"ReturnStatement"==e.type&&("Literal"==(e=e.argument).type?(t={symbol:e.raw,type:e.type},a.push(t)):"Identifier"==e.type?(t={symbol:e.name,type:e.type},a.push(t)):"BinaryExpression"==e.type?this.cycleAnalyReturn(e,a):"MemberExpression"==e.type?(t={symbol:this.analyMemberExpression(e),type:"Identifier"},a.push(t)):"ConditionalExpression"==e.type?this.cycleAnalyConditionalExpression(e,a):"UnaryExpression"==e.type?(n=this.analyUnaryExpression(e),a=a.concat(n)):"LogicalExpression"==e.type?(n=this.analyLogicalExpression(e),a=a.concat(n)):"CallExpression"==e.type&&(n=this.analyCallExpression(e),a=a.concat(n))),a},s.cycleAnalyReturn=function(e,t){var n,a;"BinaryExpression"==e.type&&(n=e.left,e=e.right,"BinaryExpression"==n.type?this.cycleAnalyReturn(n,t):"Identifier"==n.type?(a={symbol:n.name,type:n.type},t.push(a)):"Literal"==n.type?(a={symbol:n.raw,type:n.type},t.push(a)):"MemberExpression"==n.type&&(a={symbol:this.analyMemberExpression(n),type:"Identifier"},t.push(a)),"Identifier"==e.type?(a={symbol:e.name,type:e.type},t.push(a)):"Literal"==e.type?(a={symbol:e.raw,type:e.type},t.push(a)):"MemberExpression"==e.type?(a={symbol:this.analyMemberExpression(e),type:"Identifier"},t.push(a)):"ConditionalExpression"==e.type&&this.cycleAnalyConditionalExpression(e,t))},s.analyAssignmentExpression=function(e){var t,n=[];return"AssignmentExpression"==e.type&&(t=void 0,"Identifier"==(t=e.left).type?this.addIdentifier(t,n):"Literal"==t.type?this.addLiteral(t,n):"ConditionalExpression"==t.type?this.cycleAnalyConditionalExpression(t,n):"CallExpression"==t.type&&this.cycleAnalyCallExpression(t,n),"Identifier"==(t=e.right).type?this.addIdentifier(t,n):"Literal"==t.type?this.addLiteral(t,n):"ConditionalExpression"==t.type?this.cycleAnalyConditionalExpression(t,n):"CallExpression"==t.type&&this.cycleAnalyCallExpression(t,n)),n},s.analyCallExpression=function(e){var t=[];return this.cycleAnalyCallExpression(e,t),t},s.cycleAnalyCallExpression=function(e,t){if("CallExpression"==e.type){"MemberExpression"==e.callee.type?(a=this.analyMemberExpression(e.callee),t.push({symbol:a,type:null})):"Identifier"==e.callee.type&&this.addIdentifier(e.callee,t);for(var n=0;n<e.arguments.length;n++){var a,i=e.arguments[n];"MemberExpression"==i.type?(a=this.analyMemberExpression(i),t.push({symbol:a,type:null})):"CallExpression"==i.type?this.cycleAnalyCallExpression(i,t):"BinaryExpression"==i.type?this.cycleAnalyBinaryExpression(i,t):"Identifier"==i.type?this.addIdentifier(i,t):"Literal"==i.type&&this.addLiteral(i,t)}}},s.analyBinaryExpression=function(e){var t,n,a,i=[];return"BinaryExpression"==e.type&&(a=void 0,"BinaryExpression"==(a=e.left).type?this.cycleAnalyBinaryExpression(a,i):"Identifier"==a.type?this.addIdentifier(a,i):"Literal"==a.type?this.addLiteral(a,i):"MemberExpression"==a.type?(t=this.analyMemberExpression(a),i.push({symbol:t,type:null})):"CallExpression"==a.type?this.cycleAnalyCallExpression(a,i):"UnaryExpression"==a.type&&(n=this.analyUnaryExpression(a),i=i.concat(n)),"BinaryExpression"==(a=e.right).type?this.cycleAnalyBinaryExpression(a,i):"Identifier"==a.type?this.addIdentifier(a,i):"Literal"==a.type?this.addLiteral(a,i):"MemberExpression"==a.type?(t=this.analyMemberExpression(a),i.push({symbol:t,type:null})):"CallExpression"==a.type?this.cycleAnalyCallExpression(a,i):"UnaryExpression"==a.type&&(n=this.analyUnaryExpression(a),i=i.concat(n))),i},s.cycleAnalyBinaryExpression=function(e,t){var n,a,i;"BinaryExpression"==e.type&&(i=void 0,"BinaryExpression"==(i=e.left).type?this.cycleAnalyBinaryExpression(i,t):"Identifier"==i.type?this.addIdentifier(i,t):"Literal"==i.type?this.addLiteral(i,t):"MemberExpression"==i.type?(n=this.analyMemberExpression(i),t.push({symbol:n,type:null})):"CallExpression"==i.type?this.cycleAnalyCallExpression(i,t):"UnaryExpression"==i.type&&(a=this.analyUnaryExpression(i),t=t.concat(a)),"BinaryExpression"==(i=e.right).type?this.cycleAnalyBinaryExpression(i,t):"Identifier"==i.type?this.addIdentifier(i,t):"Literal"==i.type?this.addLiteral(i,t):"MemberExpression"==i.type?(n=this.analyMemberExpression(i),t.push({symbol:n,type:null})):"CallExpression"==i.type?this.cycleAnalyCallExpression(i,t):"UnaryExpression"==i.type&&(a=this.analyUnaryExpression(i),t.concat(a)))},s.analyIfStatement=function(e){var t=[],n=(e.type="IfStatement",e.test),a=e.consequent,i=e.alternate;if("BinaryExpression"==n.type?this.cycleAnalyBinaryExpression(n,t):"LogicalExpression"==n.type?(l=this.analyLogicalExpression(n),t=t.concat(l)):"CallExpression"==n.type&&this.cycleAnalyCallExpression(n,t),null!=a&&null!=a.body&&0<a.body.length)for(var r=0;r<a.body.length;r++)"BinaryExpression"==(s=a.body[r]).type?this.cycleAnalyBinaryExpression(s,t):"Identifier"==s.type?this.addIdentifier(s,t):"Literal"==s.type?this.addLiteral(s,t):"MemberExpression"==s.type?(o=this.analyMemberExpression(s),t.push({symbol:o,type:null})):"IfStatement"==s.type?(l=this.analyIfStatement(s),t=t.concat(l)):"ReturnStatement"==s.type&&(l=this.analyReturnStatement(s),t=t.concat(l));if(null!=i)if("IfStatement"==i.type)this.cycleAnalyIfStatement(i,t);else if("BlockStatement"==i.type&&null!=i&&null!=i.body&&0<i.body.length)for(var s,o,l,r=0;r<i.body.length;r++)"BinaryExpression"==(s=i.body[r]).type?this.cycleAnalyBinaryExpression(s,t):"Identifier"==s.type?this.addIdentifier(s,t):"Literal"==s.type?this.addLiteral(s,t):"MemberExpression"==s.type?(o=this.analyMemberExpression(s),t.push({symbol:o,type:null})):"IfStatement"==s.type?(l=this.analyIfStatement(s),t=t.concat(l)):"ReturnStatement"==s.type&&(l=this.analyReturnStatement(s),t=t.concat(l));return t},s.cycleAnalyIfStatement=function(e,t){e.type="IfStatement";var n=e.test,a=e.consequent,i=e.alternate;if("BinaryExpression"==n.type?this.cycleAnalyBinaryExpression(n,t):"LogicalExpression"==n.type?(l=this.analyLogicalExpression(n),t=t.concat(l)):"CallExpression"==n.type&&this.cycleAnalyCallExpression(n,t),null!=a&&null!=a.body&&0<a.body.length)for(var r=0;r<a.body.length;r++)"BinaryExpression"==(s=a.body[r]).type?this.cycleAnalyBinaryExpression(s,t):"Identifier"==s.type?this.addIdentifier(s,t):"Literal"==s.type?this.addLiteral(s,t):"MemberExpression"==s.type?(o=this.analyMemberExpression(s),t.push({symbol:o,type:null})):"IfStatement"==s.type?(l=this.analyIfStatement(s),t=t.concat(l)):"ReturnStatement"==s.type&&(l=this.analyReturnStatement(s),t=t.concat(l));if(null!=i)if("IfStatement"==i.type)this.cycleAnalyIfStatement(i,t);else if("BlockStatement"==i.type&&null!=i&&null!=i.body&&0<i.body.length)for(var s,o,l,r=0;r<i.body.length;r++)"BinaryExpression"==(s=i.body[r]).type?this.cycleAnalyBinaryExpression(s,t):"Identifier"==s.type?this.addIdentifier(s,t):"Literal"==s.type?this.addLiteral(s,t):"MemberExpression"==s.type?(o=this.analyMemberExpression(s),t.push({symbol:o,type:null})):"IfStatement"==s.type?(l=this.analyIfStatement(s),t=t.concat(l)):"ReturnStatement"==s.type&&(l=this.analyReturnStatement(s),t=t.concat(l))},s.analyLogicalExpression=function(e){var t,n,a=[];return"LogicalExpression"==e.type&&(n=void 0,"LogicalExpression"==(n=e.left).type?this.cycleAnalyLogicalExpression(n,a):"BinaryExpression"==n.type?this.cycleAnalyBinaryExpression(n,a):"Identifier"==n.type?this.addIdentifier(n,a):"Literal"==n.type?this.addLiteral(n,a):"MemberExpression"==n.type?(t=this.analyMemberExpression(n),a.push({symbol:t,type:null})):"CallExpression"==n.type&&this.cycleAnalyCallExpression(n,a),"LogicalExpression"==(n=e.right).type?this.cycleAnalyLogicalExpression(n,a):"BinaryExpression"==n.type?this.cycleAnalyBinaryExpression(n,a):"Identifier"==n.type?this.addIdentifier(n,a):"Literal"==n.type?this.addLiteral(n,a):"MemberExpression"==n.type?(t=this.analyMemberExpression(n),a.push({symbol:t,type:null})):"CallExpression"==n.type&&this.cycleAnalyCallExpression(n,a)),a},s.cycleAnalyLogicalExpression=function(e,t){var n,a;"LogicalExpression"==e.type&&(a=void 0,"LogicalExpression"==(a=e.left).type?this.cycleAnalyLogicalExpression(a,t):"BinaryExpression"==a.type?this.cycleAnalyBinaryExpression(a,t):"Identifier"==a.type?this.addIdentifier(a,t):"Literal"==a.type?this.addLiteral(a,t):"MemberExpression"==a.type?(n=this.analyMemberExpression(a),t.push({symbol:n,type:null})):"CallExpression"==a.type&&this.cycleAnalyCallExpression(a,t),"LogicalExpression"==(a=e.right).type?this.cycleAnalyLogicalExpression(a,t):"BinaryExpression"==a.type?this.cycleAnalyBinaryExpression(a,t):"Identifier"==a.type?this.addIdentifier(a,t):"Literal"==a.type?this.addLiteral(a,t):"MemberExpression"==a.type?(n=this.analyMemberExpression(a),t.push({symbol:n,type:null})):"CallExpression"==a.type&&this.cycleAnalyCallExpression(a,t))},s.analyConditionalExpression=function(e){var t,n,a=[];return"ConditionalExpression"==e.type&&(n=e.test,t=e.consequent,e=e.alternate,"BinaryExpression"==n.type?this.cycleAnalyBinaryExpression(n,a):"LogicalExpression"==n.type&&(n=this.analyLogicalExpression(n),a=a.concat(n)),null!=t&&("ConditionalExpression"==t.type?this.cycleAnalyConditionalExpression(t,a):"Identifier"==t.type?this.addIdentifier(t,a):"Literal"==t.type?this.addLiteral(t,a):"CallExpression"==t.type&&this.cycleAnalyCallExpression(t,a)),null!=e)&&("ConditionalExpression"==e.type?this.cycleAnalyConditionalExpression(e,a):"Identifier"==e.type?this.addIdentifier(e,a):"Literal"==e.type?this.addLiteral(e,a):"CallExpression"==e.type&&this.cycleAnalyCallExpression(e,a)),a},s.cycleAnalyConditionalExpression=function(e,t){var n,a;"ConditionalExpression"==e.type&&(a=e.test,n=e.consequent,e=e.alternate,"BinaryExpression"==a.type?this.cycleAnalyBinaryExpression(a,t):"LogicalExpression"==a.type&&(a=this.analyLogicalExpression(a),t=t.concat(a)),null!=n&&("ConditionalExpression"==n.type?this.cycleAnalyConditionalExpression(n,t):"Identifier"==n.type?this.addIdentifier(n,t):"Literal"==n.type?this.addLiteral(n,t):"CallExpression"==n.type&&this.cycleAnalyCallExpression(n,t)),null!=e)&&("ConditionalExpression"==e.type?this.cycleAnalyConditionalExpression(e,t):"Identifier"==e.type?this.addIdentifier(e,t):"Literal"==e.type?this.addLiteral(e,t):"CallExpression"==e.type&&this.cycleAnalyCallExpression(e,t))},s.analyUnaryExpression=function(e){var t=[];return"UnaryExpression"==e.type&&("Identifier"==(e=e.argument).type?this.addIdentifier(e,t):"Literal"==e.type?this.addLiteral(e,t):"LogicalExpression"==e.type&&(e=this.analyLogicalExpression(e),t=t.concat(e))),t},s.analyForStatement=function(e){var t=[];if("ForStatement"==e.type){var n=e.test,a=e.body;if("BinaryExpression"==n.type&&(e=this.analyBinaryExpression(n),t=t.concat(e)),"BlockStatement"==a.type)for(var i=0;i<a.body.length;i++){var r,s,o=a.body[i];"Identifier"==o.type?this.addIdentifier(o,t):"Literal"==o.type?this.addLiteral(o,t):"VariableDeclaration"==o.type?(s=this.analyVariableDeclaration(o),t=t.concat(s)):"ReturnStatement"==o.type?(s=this.analyReturnStatement(o),t=t.concat(s)):"AssignmentExpression"==o.type?(s=this.analyAssignmentExpression(o),t=t.concat(s)):"UnaryExpression"==o.type?(s=this.analyUnaryExpression(o),t=t.concat(s)):"BinaryExpression"==o.type?this.cycleAnalyBinaryExpression(o,t):"MemberExpression"==o.type?(r=this.analyMemberExpression(o),t.push({symbol:r,type:null})):"ConditionalExpression"==o.type?(s=this.analyConditionalExpression(o),t=t.concat(s)):"CallExpression"==o.type?(s=this.analyCallExpression(o),t=t.concat(s)):"LogicalExpression"==o.type?(s=this.analyLogicalExpression(o),t=t.concat(s)):"IfStatement"==o.type?(s=this.analyIfStatement(o),t=t.concat(s)):"ForStatement"==o.type&&(s=this.analyForStatement(o),t=t.concat(s))}}return t},s.addIdentifier=function(e,t){"Identifier"==e.type&&(e={symbol:e.name,type:e.type},t.push(e))},s.addLiteral=function(e,t){"Literal"==e.type&&(e={symbol:e.raw,type:e.type},t.push(e))},s.analyIdentifier=function(e){var t=[];return"Identifier"==e.type&&this.addIdentifier(e,t),t},s.analyLiteral=function(e){var t=[];return"Literal"==e.type&&this.addLiteral(e,t),t},s);function s(){}var rt=function(){this.entitySets=[],this.entityTypes=[]},st=function(){this.properties=[],this.navigationProperties=[]},ot=function(){},lt=function(){},ct=function(){},h={EntitySet:0,EntityType:1,EntityEnum:2},pt=(h[h.EntitySet]="EntitySet",h[h.EntityType]="EntityType",h[h.EntityEnum]="EntityEnum",o.prototype.ngOnInit=function(){this.cols=[{field:"code",title:this.localePipe.transform("EntityCode"),width:"5"},{field:"name",title:this.localePipe.transform("EntityName"),width:"5"},{field:"type.description",title:this.localePipe.transform("EntityType"),width:"2"},{title:this.localePipe.transform("InsertType"),width:"3",align:"center",halign:"center",template:this.operCell}],this.searchFields=[{label:this.localePipe.transform("EntityCode"),value:"code"},{label:this.localePipe.transform("EntityName"),value:"name"}],this.allColumnsTitle=this.localePipe.transform("EntityAllColumn")},o.prototype.selectRowChange=function(e){this.currentNode=new et,this.currentNode.id=e.node.data.id,this.currentNode.code=e.node.data.code,this.currentNode.name=e.node.data.name,this.currentNode.nodeType=e.node.data.nodeType,this.currentParent=this.selectParentString(e.node),this.selectentitychange.emit(this.currentNode)},o.prototype.ngOnChanges=function(){this.newSchemaMap&&0<this.newSchemaMap.size?this.treedata=ht.onInitNewSchema(this.newSchemaMap,this.injectedEntities,this.i18nTypes):this.schema&&0<this.schema.size&&(this.treedata=ht.OnInitSchema(this.schema,this.injectedEntities,this.i18nTypes)),this.treedata=C(this.treedata)},o.prototype.selectParentString=function(e){return e.parent?this.selectParentString(e.parent)?this.strContain(e.parent.data.type.code)&&this.showChildSymbol?this.selectParentString(e.parent)+"."+e.parent.data.code+"[0]":this.selectParentString(e.parent)+"."+e.parent.data.code:this.strContain(e.parent.data.type.code)&&this.showChildSymbol?e.parent.data.code+"[0]":e.parent.data.code:""},o.prototype.dblClick=function(e){this.insertByStructure(e)},o.prototype.insertByStructure=function(e){this.currentParent=this.selectParentString(e),this.currentParent&&""!=this.currentParent?this.submit(this.currentParent+"."+e.data.code):this.submit(e.data.code)},o.prototype.insertByProperty=function(e){this.submit(e.data.code)},o.prototype.insertByEnum=function(e,t){this.currentParent=this.selectParentString(e);var n,a=[];for(t?a[0]=this.currentParent+"."+e.data.code:(a[0]=this.currentParent,n=e.data.type.code==f.EntityEnum_String?'"'+e.data.name+'"':e.data.name),a[1]="Enum$"+a[0];a[1].includes(".");)a[1]=a[1].replace(".","$");this.submit(e,"ParseEnum",a,!t,n)},o.prototype.submit=function(e,t,n,a,i){if(void 0===t&&(t=null),void 0===a&&(a=null),void 0===i&&(i=null),null!=(n=void 0===n?null:n)&&0<n.length)for(var r="",s=0;s<n.length;s++)0==s?r+=n[s]:r=(r+=",")+n[s];this.dbclickInsert.emit({data:e,func:t,params:r,judge:a,judgeValue:i})},o.prototype.strContain=function(e){return e==f.EntitySet},o.prototype.filter=function(e){this.tt.searchHandle.search(e.field,e.value,"client")},o.decorators=[{type:y.Component,args:[{selector:"app-expression-entity-grid",template:'<farris-treetable #tt [data]="treedata" [fit]="true" [fitColumns]="true" [fixedHeader]="true" [columns]="cols"\r\n  [idField]="\'id\'" [height]="268" [striped]="true" [showFilterBar]="true" [resizableColumns]="false"\r\n  [allColumnsTitle]="this.allColumnsTitle" [searchFields]="this.searchFields" [showHeader]="true"\r\n  [enableFindText]="true" [virtualized]="false" (cellClick)="selectRowChange($event)" (search)="filter($event)"\r\n  (dblClick)="dblClick($event)">\r\n</farris-treetable>\r\n\x3c!-- 定义操作 --\x3e\r\n<ng-template #operCell let-ctx>\r\n\r\n  <div\r\n    *ngIf="(ctx.node.data.type.code != \'EntityEnum\') && (ctx.node.data.type.code != \'EntityEnum_Int\') && (ctx.node.data.type.code != \'EntityEnum_String\')">\r\n    <a href="javascript: void(0);" (click)="insertByStructure(ctx.node)">{{ \'InsertByStruct\' | locale }}</a>\r\n    &nbsp;&nbsp;\r\n    <a href="javascript: void(0);" (click)="insertByProperty(ctx.node)">{{ \'InsertByAttr\' | locale }}</a>\r\n  </div>\r\n\r\n  <div *ngIf="ctx.node.data.type.code == \'EntityEnum\'">\r\n    <a href="javascript: void(0);" (click)="insertByEnum(ctx.node,true)">{{ \'GetEnum\' | locale }}</a>\r\n  </div>\r\n\r\n  <div *ngIf="(ctx.node.data.type.code == \'EntityEnum_Int\') || (ctx.node.data.type.code == \'EntityEnum_String\')">\r\n    <a href="javascript: void(0);" (click)="insertByEnum(ctx.node,false)">{{ \'EnumJudge\' | locale }}</a>\r\n  </div>\r\n\r\n</ng-template>',styles:[""]}]}],o.ctorParameters=function(){return[]},o.propDecorators={schema:[{type:y.Input}],newSchemaMap:[{type:y.Input}],injectedEntities:[{type:y.Input}],showChildSymbol:[{type:y.Input}],selectentitychange:[{type:y.Output}],dbclickInsert:[{type:y.Output}],operCell:[{type:y.ViewChild,args:["operCell"]}],tt:[{type:y.ViewChild,args:["tt"]}]},o);function o(){this.currentNode=new et,this.entities=[],this.currentSchemaName="",this.currentNewSchemaName="",this.currentParent="",this.schema=new Map,this.newSchemaMap=new Map,this.showChildSymbol=!0,this.selectentitychange=new y.EventEmitter,this.dbclickInsert=new y.EventEmitter,this.cols=[],this.allColumnsTitle="",this.searchFields=[],this.treedata=[],this.i18nTypes=new Map,this.localeId=localStorage.getItem("languageCode")||"zh-CHS",this.localePipe=new u(this.localeId),this.i18nTypes.clear(),this.i18nTypes.set("String",this.localePipe.transform("NewDataTypeString")),this.i18nTypes.set("Byte",this.localePipe.transform("NewDataTypeByte")),this.i18nTypes.set("Boolean",this.localePipe.transform("NewDataTypeBoolean")),this.i18nTypes.set("Date",this.localePipe.transform("NewDataTypeDate")),this.i18nTypes.set("DateTime",this.localePipe.transform("NewDataTypeDateTime")),this.i18nTypes.set("Decimal",this.localePipe.transform("NewDataTypeDecimal")),this.i18nTypes.set("Integer",this.localePipe.transform("NewDataTypeInteger")),this.i18nTypes.set("Enum",this.localePipe.transform("NewDataTypeEnum")),this.i18nTypes.set("EntityType_Main",this.localePipe.transform("EntityType_Main")),this.i18nTypes.set("EntityType_ChildTable",this.localePipe.transform("EntityType_ChildTable")),this.i18nTypes.set("EntityType_Other",this.localePipe.transform("EntityType_Other")),this.i18nTypes.set("EntitySet",this.localePipe.transform("EntitySet")),this.i18nTypes.set("EntityEnum",this.localePipe.transform("EntityEnum")),this.i18nTypes.set("EntityEnum_Int",this.localePipe.transform("EntityEnum_Int")),this.i18nTypes.set("EntityEnum_String",this.localePipe.transform("EntityEnum_String"))}var f={Boolean:"Boolean",Byte:"Byte",Integer:"Integer",Decimal:"Decimal",Date:"Date",DateTime:"DateTime",String:"String",EntityType_Main:"EntityType_Main",EntityType_ChildTable:"EntityType_ChildTable",EntityType_Other:"EntityType_Other",EntitySet:"EntitySet",EntityEnum:"EntityEnum",EntityEnum_Int:"EntityEnum_Int",EntityEnum_String:"EntityEnum_String"},yt=function(){this.properties=[]};function ut(t,e,n){ht.onInitNewSchema(e,n).forEach(function(e){mt(e,t.entityStructs)})}function dt(t,e,n){ht.OnInitSchema(e,n).forEach(function(e){mt(e,t.entityStructs)})}function mt(e,n){var a;0!=e.children.length&&(a=new yt,e.data.type.code==f.EntityType_Main||e.data.type.code==f.EntityType_Other||e.data.type.code==f.EntityType_ChildTable?(a.tableName=e.data.code,a.name=e.data.name):e.data.type.code==f.EntitySet&&(a.properties.push({code:"length",name:"大小",type:"Integer"}),a.tableName=e.data.code,a.name=e.data.name),null!=e.parent&&(a.parent=e.parent.data.code),e.children.forEach(function(e){e.data.type.code!=f.EntityType_Main&&e.data.type.code!=f.EntityType_Other&&e.data.type.code!=f.EntitySet&&e.data.type.code!=f.EntityType_ChildTable||mt(e,n);var t={code:e.data.code,name:e.data.name,type:e.data.type.code};e.data.type.code==f.EntitySet?t.type="Set":e.data.type.code!=f.EntityType_Main&&e.data.type.code!=f.EntityType_Other&&e.data.type.code!=f.EntityType_ChildTable||(t.type="Type"),a.properties.push(t)}),n.push(a))}l.onInitNewSchema=function(r,e,s){var o,l=this,c=(void 0===s&&(s=null),this.newNumber=999,[]);return e&&0<e.length&&(o=new Map,e.forEach(function(t){var e=r.get(t.schemaName);if(null!=e){var n={data:{},children:[]},a=t.schemaName;switch(t.injectedType){case m.EntitySet:var i=e.entitySets.find(function(e){return e.code==t.injectedName}),n=l.convertNewEntitySet(i,e,o,a,s);break;case m.EntityType_ChildTable:case m.EntityType:i=e.entityTypes.find(function(e){return e.code==t.injectedName});n=l.convertNewEntityType(i,e,o,a,s)}null!=n&&(n.data.code=t.name,n.data.type.code=t.injectedType==m.EntityType_ChildTable?f.EntityType_ChildTable:f.EntityType_Main,n.data.type.description=l.getTypeDescription(n.data.type.code,s),c.push(n))}})),c},l.convertNewEntityType=function(e,r,s,o,l){var c,p=this;return e?(c={data:{id:this.newNumber++,code:e.code,name:e.name,type:{code:f.EntityType_Other,description:this.getTypeDescription(f.EntityType_Other,l)},schema:o},children:[]},s.set(e.name+e.code,m.EntityType),null!=e.properties&&0<e.properties.length&&e.properties.forEach(function(e){e={data:{id:p.newNumber++,code:e.code,name:e.name,type:{code:p.toType(e.dataType),description:p.getTypeDescription(p.toType(e.dataType),l)},schema:o},children:[]};(e.parent=c).children.push(e)}),null!=e.navigationProperties&&0<e.navigationProperties.length&&e.navigationProperties.forEach(function(t){var e,n,a,i;s.get(t.navigationName+t.code)?t.navigationType==d.EntityType?(e=r.entityTypes.find(function(e){return e.code==t.navigationName}),((i=p.convertNewEntityType(e,r,s,o,l)).parent=c).children.push(i)):t.navigationType==d.EntitySet?(n=r.entitySets.find(function(e){return e.code==t.navigationName}),((i=p.convertNewEntitySet(n,r,s,o,l)).parent=c).children.push(i)):t.navigationType==d.EntityEnum&&(a=r.entityTypes.find(function(e){return e.code==t.navigationName}),((i=p.convertNewEntityEnum(a,r,s,o,l)).parent=c).children.push(i)):t.navigationType==d.EntityType?(e=r.entityTypes.find(function(e){return e.code==t.navigationName}),((i=p.convertNewEntityType(e,r,s,o,l)).parent=c).children.push(i)):t.navigationType==d.EntitySet?(n=r.entitySets.find(function(e){return e.code==t.navigationName}),((i=p.convertNewEntitySet(n,r,s,o,l)).parent=c).children.push(i)):t.navigationType==d.EntityEnum&&(a=r.entityTypes.find(function(e){return e.code==t.navigationName}),((i=p.convertNewEntityEnum(a,r,s,o,l)).parent=c).children.push(i))}),c):null},l.convertNewEntitySet=function(t,e,n,a,i){var r,s;return t?(r={data:{id:this.newNumber++,code:t.code,name:t.name,type:{code:f.EntitySet,description:this.getTypeDescription(f.EntitySet,i)},schema:a},children:[]},n.set(t.name,m.EntitySet),s=e.entityTypes.find(function(e){return e.code==t.entityType}),this.convertNewEntityType(s,e,n,a,i).children.forEach(function(e){r.children.push(e)}),r):null},l.convertNewEntityEnum=function(e,t,n,a,i){var r,s=this;return e?(r={data:{id:this.newNumber++,code:e.code,name:e.name,type:{code:f.EntityEnum,description:this.getTypeDescription(f.EntityEnum,i)},schema:a},children:[]},n.set(e.name+e.code,m.EntityEnum),null!=e.properties&&0<e.properties.length&&e.properties.forEach(function(e){var t={data:{id:s.newNumber++,code:e.code,name:e.name,type:{code:"",description:""},schema:a},children:[]},e=e.dataType.toLowerCase();"string"==e?(t.data.type.code=f.EntityEnum_String,t.data.type.description=s.getTypeDescription(f.EntityEnum_String,i)):"int"!=e&&"integer"!=e&&"byte"!=e&&"decimal"!=e||(t.data.type.code=f.EntityEnum_Int,t.data.type.description=s.getTypeDescription(f.EntityEnum_Int,i)),(t.parent=r).children.push(t)}),r):null},l.getTypeDescription=function(e,t){if(null!=t){if(null!=e)switch(e){case f.Boolean:return t.get(f.Boolean);case f.Byte:return t.get(f.Byte);case f.Integer:return t.get(f.Integer);case f.Decimal:return t.get(f.Decimal);case f.Date:return t.get(f.Date);case f.DateTime:return t.get(f.DateTime);case f.String:return t.get(f.String);case f.EntityType_Main:return t.get(f.EntityType_Main);case f.EntityType_ChildTable:return t.get(f.EntityType_ChildTable);case f.EntityType_Other:return t.get(f.EntityType_Other);case f.EntitySet:return t.get(f.EntitySet);case f.EntityEnum:return t.get(f.EntityEnum);case f.EntityEnum_Int:return t.get(f.EntityEnum_Int);case f.EntityEnum_String:return t.get(f.EntityEnum_String);default:return e}}else if(null!=e)switch(e){case f.Boolean:return f.Boolean;case f.Byte:return f.Byte;case f.Integer:return f.Integer;case f.Decimal:return f.Decimal;case f.Date:return f.Date;case f.DateTime:return f.DateTime;case f.String:return f.String;case f.EntityType_Main:return f.EntityType_Main;case f.EntityType_ChildTable:return f.EntityType_ChildTable;case f.EntityType_Other:return f.EntityType_Other;case f.EntitySet:return f.EntitySet;case f.EntityEnum:return f.EntityEnum;case f.EntityEnum_Int:return f.EntityEnum_Int;case f.EntityEnum_String:return f.EntityEnum_String;default:return e}},l.toType=function(e){if(null!=e)switch(e){case i.Boolean:return f.Boolean;case i.Byte:return f.Byte;case i.Integer:return f.Integer;case i.Decimal:return f.Decimal;case i.Date:return f.Date;case i.DateTime:return f.DateTime;case i.String:return f.String;case"Binary":return f.Byte;case"Text":return f.String;default:return e}},l.OnInitSchema=function(i,e,r){var s,o=this,l=(void 0===r&&(r=null),this.oldNumber=99999,[]);return e&&0<e.length&&(s=new Map,e.forEach(function(t){var e=i.get(t.schemaName);if(null!=e){var n={data:{},children:[]};switch(t.injectedType){case m.EntitySet:var a=e.entitySets.find(function(e){return e.name==t.injectedName}),n=o.ConvertEntitySet(a,e,s,t.schemaName,r);break;case m.EntityType_ChildTable:case m.EntityType:a=e.entityTypes.find(function(e){return e.name==t.injectedName});n=o.ConvertEntityType(a,e,s,t.schemaName,r)}null!=n&&(n.data.code=t.name,n.data.type.code=t.injectedType==m.EntityType_ChildTable?f.EntityType_ChildTable:f.EntityType_Main,n.data.type.description=o.getTypeDescription(n.data.type.code,r),l.push(n))}})),l},l.ConvertEntityType=function(e,r,s,o,l){var c,p=this;return e?(c={data:{id:this.oldNumber++,code:e.name,name:e.description,type:{code:f.EntityType_Other,description:this.getTypeDescription(f.EntityType_Other,l)},schema:o},children:[]},s.set(e.name+e.id,m.EntityType),null!=e.properties&&0<e.properties.length&&e.properties.forEach(function(e){e={data:{id:p.oldNumber++,code:e.name,name:e.description,type:{code:p.toType(e.type),description:p.getTypeDescription(p.toType(e.type),l)},schema:o},children:[]};(e.parent=c).children.push(e)}),null!=e.navigationProperties&&0<e.navigationProperties.length&&e.navigationProperties.forEach(function(t){var e,n,a,i;s.get(t.name+t.navigationId)?t.type==h.EntitySet?(e=r.entitySets.find(function(e){return e.name==t.name}),((i=p.ConvertEntitySet(e,r,s,o,l)).parent=c).children.push(i)):t.type==h.EntityType?(n=r.entityTypes.find(function(e){return e.id==t.navigationId&&e.name==t.name}),((i=p.ConvertEntityType(n,r,s,o,l)).parent=c).children.push(i)):t.type==h.EntityEnum&&(a=r.entityTypes.find(function(e){return e.id==t.navigationId&&e.name==t.name}),((i=p.ConvertEntityEnum(a,r,s,o,l)).parent=c).children.push(i)):t.type==h.EntitySet?(e=r.entitySets.find(function(e){return e.name==t.name}),((i=p.ConvertEntitySet(e,r,s,o,l)).parent=c).children.push(i)):t.type==h.EntityType?(n=r.entityTypes.find(function(e){return e.id==t.navigationId&&e.name==t.name}),((i=p.ConvertEntityType(n,r,s,o,l)).parent=c).children.push(i)):t.type==h.EntityEnum&&(a=r.entityTypes.find(function(e){return e.id==t.navigationId&&e.name==t.name}),((i=p.ConvertEntityEnum(a,r,s,o,l)).parent=c).children.push(i))}),c):null},l.ConvertEntitySet=function(t,e,n,a,i){var r,s;return t?(r={data:{id:this.oldNumber++,code:t.name,name:t.description,type:{code:f.EntitySet,description:this.getTypeDescription(f.EntitySet,i)},schema:a},children:[]},n.set(t.name,m.EntitySet),s=e.entityTypes.find(function(e){return e.name==t.entityType}),this.ConvertEntityType(s,e,n,a,i).children.forEach(function(e){r.children.push(e)}),r):null},l.ConvertEntityEnum=function(e,t,n,a,i){var r,s=this;return e?(r={data:{id:this.oldNumber++,code:e.name,name:e.description,type:{code:f.EntityEnum,description:this.getTypeDescription(f.EntityEnum,i)},schema:a},children:[]},n.set(e.name+e.id,m.EntityType),null!=e.properties&&0<e.properties.length&&e.properties.forEach(function(e){var t={data:{id:s.oldNumber++,code:e.name,name:e.description,type:{code:"",description:""},schema:a},children:[]},e=e.type.toLowerCase();"string"==e?(t.data.type.code=f.EntityEnum_String,t.data.type.description=s.getTypeDescription(f.EntityEnum_String,i)):"int"!=e&&"integer"!=e&&"byte"!=e&&"decimal"!=e||(t.data.type.code=f.EntityEnum_Int,t.data.type.description=s.getTypeDescription(f.EntityEnum_Int,i)),(t.parent=r).children.push(t)}),r):null},l.oldNumber=99999,l.newNumber=999;var ht=l;function l(){}w.init=function(){var e;null==window.esprima&&null!=(e=w.loadEsprima())&&(e.onload=function(){w.esprima=window.esprima})},w.getTokens=function(e){var t=[];if(null==this.esprima)return t;for(var n=this.esprima.tokenize(e),a=0;a<n.length;a++)t.push(n[a].value);for(var i=[],a=0;a<t.length;a++){var r=e.indexOf(t[a]);i.push(-1!=r?e.substring(0,r):""),e=e.slice(r+t[a].length),a==t.length-1&&i.push(e)}for(var s=[],o=t.length,a=0;a<o;a++)""!=i[a]&&s.push(i[a]),""!=t[a]&&s.push(t[a]),a==o-1&&""!=i[a+1]&&s.push(i[a+1]);return s},w.getIdentifierAndVariable=function(n,a,i){var t;return null==n&&0==n.length?new Promise(function(e){e(null)}):null==w.esprima?new Promise(function(t){var e=w.loadEsprima();null!=e&&(e.onload=function(){w.esprima=window.esprima;var e=w.doGetIdentifierAndVariable(n,a,i);t(e)})}):(t=w.doGetIdentifierAndVariable(n,a,i),new Promise(function(e){e(t)}))},w.doGetIdentifierAndVariable=function(e,t,n){var a,i,r,s,o=new Map;try{for(var l=F(e),c=l.next();!c.done;c=l.next()){var p=c.value,y=void 0,u=JSON.parse(p).expr,d=w.getTokens(u);if(!o.has(u)){var y=new $e,m=Et(d,w.getVariableMap(t.contextEntities,null,"Key2Name"));y.contextVariables=y.contextVariables.concat(m);var h=Et(d,w.getVariableMap(null,t.sessionEntities,"Key2Name")),f=(y.sessionVariables=y.sessionVariables.concat(h),[]),g=new ft(n);try{for(var k=F(t.injectedEntities),b=k.next();!b.done;b=k.next()){var v=b.value,E=[],x=(E.push(v),new ft(n));0!=t.newSchemaMap.size&&0!=t.injectedEntities.length?ut(x,t.newSchemaMap,E):0!=t.schemaMap.size&&0!=t.injectedEntities.length&&dt(x,t.schemaMap,E),f=(f=f.concat(function(t,n){var a=[],i=n.entityStructs,r=i[i.length-1];{var s;null!=r&&(s=[],t.forEach(function(e,t){e==r.tableName&&s.push(t)}),s.forEach(function(e){!function h(t,e,n,a,i,r,s,o){var l=A(t,i);var c=t[i];if(r)if("["==t[i+1]){for(var p,y=i+1;y<t.length;y++)if("]"==t[y]){i=y;break}"."==t[i+1]&&(1==(u=n.properties.filter(function(e){return e.code==t[i+2]})).length?"Set"==(p=u[0]).type?(m=a.filter(function(e){return e.tableName==p.code&&(e.parent==c||e.parent+"s"==c)})[0],h(t,e,m,a,i+2,!0,s,o+"."+m.tableName)):"Type"==p.type?(m=a.filter(function(e){return e.tableName==p.code&&(e.parent==c||e.parent+"s"==c)})[0],h(t,e,m,a,i+2,!1,s,o+"."+m.tableName)):"."==t[i+3]?e.errors.push(N.format(e.local.check("SimpleNoProperty"),[l,p.code])):s.push(o+"."+p.code):e.errors.push(N.format(e.local.check("ChildNoProperty"),[l,n.tableName,t[i+2]])))}else"."==t[i+1]&&"length"!=t[i+2]&&e.errors.push(N.format(e.local.check("ChildNoProperty"),[l,n.tableName,t[i+2]]));else{var u,d,m;"."==t[i+1]&&(1==(u=n.properties.filter(function(e){return e.code==t[i+2]})).length?"Set"==(d=u[0]).type?(m=a.filter(function(e){return e.tableName==d.code&&(e.parent==c||e.parent+"s"==c)})[0],h(t,e,m,a,i+2,!0,s,o+"."+m.tableName)):"Type"==d.type?(m=a.filter(function(e){return e.tableName==d.code&&(e.parent==c||e.parent+"s"==c)})[0],h(t,e,m,a,i+2,!1,s,o+"."+m.tableName)):"."==t[i+3]?e.errors.push(N.format(e.local.check("SimpleNoProperty"),[l,d.code])):s.push(o+"."+d.code):e.errors.push(N.format(e.local.check("PropertyNoProperty"),[l,n.tableName,t[i+2]])))}}(t,n,r,i,e,!1,a,r.tableName)}))}return a}(d,x))).concat(function(d,m){for(var h=[],f=["ExistData","CountOfChild","GetInjectedEntity","GetChainedPropertyValue"],g=["SortChildData","CountByProp","SumByProp","AvgByProp","MaxByProp","MinByProp","IsExistRecord","IsContainMatch","ListGreaterThan","ListLessThan","ListStartWith","ListEndWith","GetComputeJsonData"],k=["MultiplyChildNumber","MinValueOfPeriod","MaxValueOfPeriod","AvgValueOfPeriod"],b=[[],[],[]],e=1,t=0,n=[],a=0;a<d.length;a++)b[0][a]=d[a],b[1][a]=0,b[2][a]=0,"("==d[a]&&(b[1][a]=e,b[2][a]=e,t<e&&(t=e),e++),")"==d[a]&&(e--,b[1][a]=e,1==(b[2][a]=e))&&(n.push(t),t=0);return n.forEach(function(e){for(var t=e;1<=t;t--){for(var n=-1,a=-1,i=0;i<b[0].length;i++)if(b[1][i]==t){if(-1!=n){a=i;break}n=i}b[1].splice(n,a-n+1);for(var r=b[0][n-1],s=0,i=0;i<b[2].length;i++)if(b[2][i]==t){s=i;break}var o=A(d,s);if(","==b[0][a-1])m.errors.push(N.format(m.local.check("ParamIllegal"),[o,r]));else{for(var l=[],i=n;i<=a;i++)l.push(b[0][i]);for(var c,p,y=[],i=0;i<l.length;i++){var u=l[i];"("!=u&&")"!=u&&","!=u&&""!=u.trim()&&y.push(u)}f.includes(r)?(c=y[0].slice(1,y[0].length-1),h.push(c)):g.includes(r)?(c=y[0].slice(1,y[0].length-1),p=y[1].slice(1,y[1].length-1),h.push(c+"[i]."+p)):k.includes(r)&&(c=y[0].slice(1,y[0].length-1),p=y[1].slice(1,y[1].length-1),o=y[2].slice(1,y[2].length-1),h.push(c+"[i]."+p),h.push(c+"[i]."+o))}b[0].splice(n,a-n+1),b[2][n]=0,b[2][a]=0,1!=t&&M(b[1],1,1)<M(b[1],t,1)&&M(b[1],t,1)<M(b[1],1,2)&&t++}}),h}(d,x)),g.entityStructs=g.entityStructs.concat(x.entityStructs)}}catch(D){r={error:D}}finally{try{b&&!b.done&&(s=k["return"])&&s.call(k)}finally{if(r)throw r.error}}f=w.removeDuplicateList(f),y.properties=w.analyProperty(f,g.entityStructs),y.properties=w.removeDuplicate(y.properties,"code"),o.set(p,y)}}}catch(S){a={error:S}}finally{try{c&&!c.done&&(i=l["return"])&&i.call(l)}finally{if(a)throw a.error}}return console.log(o),o},w.analyProperty=function(e,t){for(var n,a,i=[],r=0;r<e.length;r++){var s,o,l=e[r];l.includes("[")?(s=l.indexOf("["),o=l.indexOf("]"),i[r]=l.substring(0,s)+l.substring(o+1,l.length)):i[r]=l}var c=[],p=t.filter(function(e){return null==e.parent});try{for(var y=F(p),u=y.next();!u.done;u=y.next()){var d=u.value;w.cycleGetProperty(d,t,c,d.tableName)}}catch(h){n={error:h}}finally{try{u&&!u.done&&(a=y["return"])&&a.call(y)}finally{if(n)throw n.error}}for(var m=[],r=0;r<i.length;r++)!function(t){var e=c.filter(function(e){return e.code==i[t]});0<e.length&&(e=e[0],m.push({code:i[t],name:e.name,type:e.type}))}(r);return m},w.cycleGetProperty=function(n,a,i,r){var e,t,s=this;try{for(var o=F(n.properties),l=o.next();!l.done;l=o.next())!function(t){var e;"Type"==t.type?(e=a.filter(function(e){return(e.parent==n.tableName||e.parent+"s"==n.tableName)&&e.tableName==t.code})[0],s.cycleGetProperty(e,a,i,r+"."+e.tableName),i.push({code:r+"."+e.tableName,name:n.name,type:"Type"})):"Set"==t.type?(e=a.filter(function(e){return(e.parent==n.tableName||e.parent+"s"==n.tableName)&&e.tableName==t.code})[0],s.cycleGetProperty(e,a,i,r+"."+e.tableName),i.push({code:r+"."+e.tableName,name:n.name,type:"Set"})):i.push({code:r+"."+t.code,name:t.name,type:t.type})}(l.value)}catch(c){e={error:c}}finally{try{l&&!l.done&&(t=o["return"])&&t.call(o)}finally{if(e)throw e.error}}},w.getIdentifierFromJS=function(e){if(null==this.esprima)return null;var t=null,n=[];try{t=this.esprima.parse(e)}catch(r){e="function test() { TEXT }".replace("TEXT",e);null!=(t=this.esprima.parse(e)).body&&1==t.body.length&&"FunctionDeclaration"==t.body[0].type&&"test"==t.body[0].id.name&&(t=t.body[0].body)}if(console.log(t),null!=t&&null!=t.body)for(var a=0;a<t.body.length;a++){var i=t.body[a];this.analyExpressionStatement(i,n)}return n=n.filter(function(e){return!e.symbol.startsWith("DefaultFunction.")&&!e.symbol.startsWith("DefaultExtendFunctionProxy.")}),console.log("全部变量"),console.log(n),n},w.analyExpressionStatement=function(e,t){var n,a;"ExpressionStatement"==e.type?this.analyExpressionStatement(e.expression,t):"IfStatement"==e.type?(a=r.analyIfStatement(e),(a=this.filterAndRemoveDuplicate(a)).forEach(function(e){return t.push(e)})):"MemberExpression"==e.type?(n=r.analyMemberExpression(e),t.push({symbol:n,type:"Identifier"})):"VariableDeclaration"==e.type?(a=r.analyVariableDeclaration(e),(a=this.filterAndRemoveDuplicate(a)).forEach(function(e){return t.push(e)})):"ReturnStatement"==e.type?(a=r.analyReturnStatement(e),(a=this.filterAndRemoveDuplicate(a)).forEach(function(e){return t.push(e)})):"AssignmentExpression"==e.type?(a=r.analyAssignmentExpression(e),(a=this.filterAndRemoveDuplicate(a)).forEach(function(e){return t.push(e)})):"Identifier"==e.type?(a=r.analyIdentifier(e),(a=this.filterAndRemoveDuplicate(a)).forEach(function(e){return t.push(e)})):"Literal"==e.type?(a=r.analyLiteral(e),(a=this.filterAndRemoveDuplicate(a)).forEach(function(e){return t.push(e)})):"ConditionalExpression"==e.type?(a=r.analyConditionalExpression(e),(a=this.filterAndRemoveDuplicate(a)).forEach(function(e){return t.push(e)})):"BinaryExpression"==e.type?(a=r.analyBinaryExpression(e),(a=this.filterAndRemoveDuplicate(a)).forEach(function(e){return t.push(e)})):"CallExpression"==e.type?(a=r.analyCallExpression(e),(a=this.filterAndRemoveDuplicate(a)).forEach(function(e){return t.push(e)})):"UnaryExpression"==e.type?(a=r.analyUnaryExpression(e),(a=this.filterAndRemoveDuplicate(a)).forEach(function(e){return t.push(e)})):"LogicalExpression"==e.type?(a=r.analyLogicalExpression(e),(a=this.filterAndRemoveDuplicate(a)).forEach(function(e){return t.push(e)})):"ForStatement"==e.type&&(a=r.analyForStatement(e),(a=this.filterAndRemoveDuplicate(a)).forEach(function(e){return t.push(e)}))},w.filterAndRemoveDuplicate=function(e){return e=this.filterNotLiteral(e),this.removeDuplicate(e,"symbol")},w.filterNotLiteral=function(e){var t,n,a=[];try{for(var i=F(e),r=i.next();!r.done;r=i.next()){var s=r.value;"Literal"!=s.type&&a.push(s)}}catch(o){t={error:o}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(t)throw t.error}}return a},w.removeDuplicate=function(e,n){var t,a,i=[];try{for(var r=F(e),s=r.next();!s.done;s=r.next())!function(t){i.findIndex(function(e){return e[n]==t[n]})<0&&i.push(t)}(s.value)}catch(o){t={error:o}}finally{try{s&&!s.done&&(a=r["return"])&&a.call(r)}finally{if(t)throw t.error}}return i},w.removeDuplicateList=function(e){var t,n,a=[];try{for(var i=F(e),r=i.next();!r.done;r=i.next()){var s=r.value;a.includes(s)||a.push(s)}}catch(o){t={error:o}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(t)throw t.error}}return a},w.getVariableMap=function(e,t,n){var a=[],i=(null!=e&&e.forEach(function(e){a.push(e)}),null!=t&&t.forEach(function(e){a.push(e)}),new Map);if(null!=a&&0<a.length)for(var r=a;0<r.length;){var s=r.filter(function(e){return e.name==r[0].name});1<s.length?r.filter(function(e){return e.name==r[0].name}).forEach(function(e){"Key2Name"==n?i.set(e.key,e.key+"_"+e.name):"Name2Key"==n&&i.set(e.key+"_"+e.name,e.key)}):"Key2Name"==n?i.set(s[0].key,s[0].name):"Name2Key"==n&&i.set(s[0].name,s[0].key),r=r.filter(function(e){return e.name!=r[0].name})}return i},w.toSemantic=function(e,t,n,a){var i,r,s="",o=[];try{for(var l=F(t),c=l.next();!c.done;c=l.next()){var p=c.value;"Math"==p.keyFront&&o.push(p.key)}}catch(h){i={error:h}}finally{try{c&&!c.done&&(r=l["return"])&&r.call(l)}finally{if(i)throw i.error}}for(var y=0;y<e.length;y++)if("Math"!=e[y]||"."!=e[y+1]||o.includes(e[y+2]))if(a.includes(e[y])&&"."==e[y+1])y+=1;else{var u,d=0;if(0==d&&2<e[y].length&&'"'==e[y][0]&&'"'==e[y][e[y].length-1]&&(u=e[y].substring(1,e[y].length-1),n.has(u))&&"("==e[y-1]&&")"==e[y+1]&&this.variableFuncKeys.includes(e[y-2])&&(s=s+'"'+n.get(u)+'"',d=1),0==d)for(var m=0;m<t.length;m++)if(e[y]==t[m].key&&"Advanced"!=t[m].type){s+=t[m].name,d=1;break}0==d&&(s+=e[y])}else s=s+e[y]+e[y+1]+e[y+2],y+=2;return s},w.formatExtend=function(e){var t,n,a,i,r,s,o,l,c=[];if(e&&e.rpcFunctions&&0<e.rpcFunctions.length)try{for(var p=F(e.rpcFunctions),y=p.next();!y.done;y=p.next())if((k=y.value).display){var u={token:k.token,key:k.token,name:null!=k.name?k.name:k.token,type:T.Extend,description:k.description,params:[],keyFront:null,className:null,isLatestExtendFunc:!0};if(k.params&&0<k.params.length)try{for(var d=F(k.params),m=d.next();!m.done;m=d.next()){var h={key:(E=m.value).paramName,name:null!=E.paramDesc&&0<E.paramDesc.length?E.paramDesc:E.paramName,type:"obj"};u.params.push(h)}}catch(x){a={error:x}}finally{try{m&&!m.done&&(i=d["return"])&&i.call(d)}finally{if(a)throw a.error}}c.push(u)}}catch(D){t={error:D}}finally{try{y&&!y.done&&(n=p["return"])&&n.call(p)}finally{if(t)throw t.error}}if(e&&e.originFunctions&&0<e.originFunctions.length)try{for(var f=F(e.originFunctions),g=f.next();!g.done;g=f.next()){var k,u={token:(k=g.value).name,key:k.name,name:k.semanticName,type:T.Extend,description:k.description,params:[],keyFront:k.instanceName,className:k.className,isLatestExtendFunc:!1};if(k.funParameterList&&0<k.funParameterList.length)try{for(var b=F(k.funParameterList),v=b.next();!v.done;v=b.next()){var E,h={key:(E=v.value).name,name:E.description,type:E.type};u.params.push(h)}}catch(S){o={error:S}}finally{try{v&&!v.done&&(l=b["return"])&&l.call(b)}finally{if(o)throw o.error}}c.push(u)}}catch(N){r={error:N}}finally{try{g&&!g.done&&(s=f["return"])&&s.call(f)}finally{if(r)throw r.error}}return c},w.format=function(e,t){if(0!=t.length)for(var n=0;n<t.length;n++)e=e.replace(new RegExp("\\{"+n+"\\}","g"),t[n]);return e},w.convertPath=function(e){return re.BasePathService.convertPath(e)},w.loadEsprima=function(){var e,t;if(null==window.esprima)return e=document.getElementsByTagName("body")[0],(t=document.createElement("script")).type=this.ScriptType,t.src=this.EsprimaScriptSrc+Date.now(),e.appendChild(t),t},w.variableFuncKeys=["GetContextParameter","GetSessionValue"],w.esprima=null,w.ScriptType="text/javascript",w.EsprimaScriptSrc=w.convertPath("/platform/common/web/@gsp-svc/esprima/dist/esprima.js?");var N=w;function w(){}var ft=function(e){this.localVariable=[],this.contextVariables=[],this.sessionVariables=[],this.entityStructs=[],this.errors=[],this.local=e};function gt(h,f,g){for(var k=["Today","Yesterday","Tomorrow","ThisYear","LastYear","NextYear","ThisMonth","LastMonth","NextMonth","ThisWeek","LastWeek","NextWeek","DayOfWeek","FirstDayOfWeek","LastDayOfWeek","FirstDayOfLastWeek","LastDayOfLastWeek","FirstDayOfNextWeek","LastDayOfNextWeek","FirstDayOfMonth","LastDayOfMonth","FirstDayOfLastMonth","LastDayOfLastMonth","FirstDayOfNextMonth","LastDayOfNextMonth","FirstDayOfYear","LastDayOfYear","FirstDayOfLastYear","LastDayOfLastYear","FirstDayOfNextYear","LastDayOfNextYear","GetDate"],b=[[],[],[]],e=1,t=0,n=[],a=0;a<h.length;a++)b[0][a]=h[a],b[1][a]=0,b[2][a]=0,"("==h[a]&&(b[1][a]=e,t<(b[2][a]=e)&&(t=e),e++),")"==h[a]&&(b[1][a]=--e,1==(b[2][a]=e))&&(n.push(t),t=0);n.forEach(function(e){for(var m,t=e;1<=t;t--)!function(e){for(var t=-1,n=-1,a=0;a<b[0].length;a++)if(b[1][a]==e){if(-1!=t){n=a;break}t=a}for(var i=[],r=t;r<=n;r++)i.push(0);(o=b[1]).splice.apply(o,C([t,n-t+1],i));for(var s=b[0][t-1],o=g.find(function(e){return e.name==s}),l=0,a=0;a<b[2].length;a++)if(b[2][a]==e){l=a;break}var c=A(h,l);if(","==b[0][n-1])f.errors.push(N.format(f.local.check("ParamIllegal"),[c,s]));else if(null!=o){for(var p=[],y=0,a=t;a<=n;a++)p.push(b[0][a]);if(-1==p.indexOf("[")&&-1==p.indexOf("]"))2==p.length||3==p.length&&""==p[1].trim()?y=0:(p.forEach(function(e){","==e&&y++}),y++),y!=o.params.length&&"Invoke"!=o.key&&("Add"==o.key?10<y&&f.errors.push(N.format(f.local.check("AddTwoManyParameters"),[c,s,o.params.length,y])):k.includes(o.key)&&2<=y?f.errors.push(N.format(f.local.check("ParamNumberWithZero"),[c,s,o.params.length,y])):k.includes(o.key)||f.errors.push(N.format(f.local.check("ParamNumber"),[c,s,o.params.length,y])));else if(-1!=p.indexOf("[")&&-1!=p.indexOf("]")&&p.indexOf("[")<p.indexOf("]")){do{var u=p.indexOf("["),d=p.indexOf("]")}while(p.splice(u,d-u+1,"$"),-1!=p.indexOf("[")&&-1!=p.indexOf("]")&&p.indexOf("[")<p.indexOf("]"));2==p.length||3==p.length&&""==p[1].trim()?y=0:(p.forEach(function(e){","==e&&y++}),y++),y!=o.params.length&&"Invoke"!=o.key&&("Add"==o.key?10<y&&f.errors.push(N.format(f.local.check("AddTwoManyParameters"),[c,s,o.params.length,y])):k.includes(o.key)&&2<=y?f.errors.push(N.format(f.local.check("ParamNumberWithZero"),[c,s,o.params.length,y])):k.includes(o.key)||f.errors.push(N.format(f.local.check("ParamNumber"),[c,s,o.params.length,y])))}else f.errors.push(N.format(f.local.check("ParamArrayIllegal"),[c,s]))}(o=b[0]).splice.apply(o,C([t,n-t+1],i)),b[2][t]=0,b[2][n]=0,1!=e&&M(b[1],1,1)<M(b[1],e,1)&&M(b[1],e,1)<M(b[1],1,2)&&e++,m=e}(t),t=m})}function kt(N,F,T){for(var w=[[],[],[]],e=1,t=0,n=[],a=0;a<N.length;a++)w[0][a]=N[a],w[1][a]=0,w[2][a]=0,"("==N[a]&&(w[1][a]=e,t<(w[2][a]=e)&&(t=e),e++),")"==N[a]&&(w[1][a]=--e,1==(w[2][a]=e))&&(n.push(t),t=0);n.forEach(function(e){for(var S,t=e;1<=t;t--)!function(e){for(var t=-1,n=-1,a=0;a<w[0].length;a++)if(w[1][a]==e){if(-1!=t){n=a;break}t=a}for(var i=[],r=t;r<=n;r++)i.push(0);(o=w[1]).splice.apply(o,C([t,n-t+1],i));for(var s=w[0][t-1],o=T.find(function(e){return e.name==s}),l=0,a=0;a<w[2].length;a++)if(w[2][a]==e){l=a;break}var c=A(N,l);if(null!=o)if("ExistData"==o.key||"CountOfChild"==o.key){for(var p=[],y="",a=t;a<=n&&1!=p.length;a++)"("!=(g=w[0][a])&&")"!=g?","==g?(p.push(y),y=""):y+=g:")"==g&&""!=y.trim()&&(p.push(y),y="");var u=[],d=F.errors.length;bt(p,s,c,F),d==F.errors.length&&(u=p[0].slice(1,-1).split("."),null!=(b=(k=F.entityStructs).filter(function(e){return e.tableName==u[0]}))&&0<b.length?null!=(v=b[0])&&O(E=I(u,"."),F,v,k,0,!1,c):F.errors.push("在第 "+c+" 行, 函数【"+s+"】的第 1 个参数使用的字段【"+u[0]+"】不存在!"))}else if("SortChildData"==o.key||"CountByProp"==o.key||"SumByProp"==o.key||"AvgByProp"==o.key||"MaxByProp"==o.key||"MinByProp"==o.key){for(p=[],y="",a=t;a<=n&&2!=p.length;a++)"("!=(g=w[0][a])&&")"!=g?","==g?(p.push(y),y=""):y+=g:")"==g&&""!=y.trim()&&(p.push(y),y="");var m=[],d=F.errors.length;bt(p,s,c,F),d==F.errors.length&&(m=p[0].slice(1,-1).split("."),null!=(b=(k=F.entityStructs).filter(function(e){return e.tableName==m[0]}))&&0<b.length?null!=(v=b[0])&&((E=I(m,".")).push("["),E.push("i"),E.push("]"),E.push("."),E.push.apply(E,C(vt(p[1]))),O(E,F,v,k,0,!1,c)):F.errors.push("在第 "+c+" 行, 函数【"+s+"】的第 1 个参数使用的字段【"+m[0]+"】不存在!"))}else if("IncludedInList"!=o.key)if("IsExistRecord"==o.key||"IsContainMatch"==o.key||"ListGreaterThan"==o.key||"ListLessThan"==o.key||"ListStartWith"==o.key||"ListEndWith"==o.key||"GetComputeJsonData"==o.key){for(p=[],y="",a=t;a<=n&&2!=p.length;a++)"("!=(g=w[0][a])&&")"!=g?","==g?(p.push(y),y=""):y+=g:")"==g&&""!=y.trim()&&(p.push(y),y="");var h=[],d=F.errors.length;bt(p,s,c,F),d==F.errors.length&&(h=p[0].slice(1,-1).split("."),null!=(b=(k=F.entityStructs).filter(function(e){return e.tableName==h[0]}))&&0<b.length?null!=(v=b[0])&&((E=I(h,".")).push("["),E.push("i"),E.push("]"),E.push("."),E.push.apply(E,C(vt(p[1]))),O(E,F,v,k,0,!1,c)):F.errors.push("在第 "+c+" 行, 函数【"+s+"】的第 1 个参数使用的字段【"+h[0]+"】不存在!"))}else if("MultiplyChildNumber"==o.key){for(p=[],y="",a=t;a<=n&&3!=p.length;a++)"("!=(g=w[0][a])&&")"!=g?","==g?(p.push(y),y=""):y+=g:")"==g&&""!=y.trim()&&(p.push(y),y="");var f=[],d=F.errors.length;bt(p,s,c,F),d==F.errors.length&&(f=p[0].slice(1,-1).split("."),null!=(b=(k=F.entityStructs).filter(function(e){return e.tableName==f[0]}))&&0<b.length?null!=(v=b[0])&&((E=I(f,".")).push("["),E.push("i"),E.push("]"),E.push("."),E.push.apply(E,C(vt(p[1]))),O(E,F,v,k,0,!1,c),(x=I(f,".")).push("["),x.push("i"),x.push("]"),x.push("."),x.push.apply(x,C(vt(p[2]))),O(x,F,v,k,0,!1,c)):F.errors.push("在第 "+c+" 行, 函数【"+s+"】的第 1 个参数使用的字段【"+f[0]+"】不存在!"))}else if("MinValueOfPeriod"==o.key||"MaxValueOfPeriod"==o.key||"AvgValueOfPeriod"==o.key){for(var g,p=[],y="",a=t;a<=n&&3!=p.length;a++)"("!=(g=w[0][a])&&")"!=g?","==g?(p.push(y),y=""):y+=g:")"==g&&""!=y.trim()&&(p.push(y),y="");var k,b,v,E,x,D=[],d=F.errors.length;bt(p,s,c,F),d==F.errors.length&&(D=p[0].slice(1,-1).split("."),null!=(b=(k=F.entityStructs).filter(function(e){return e.tableName==D[0]}))&&0<b.length?null!=(v=b[0])&&((E=I(D,".")).push("["),E.push("i"),E.push("]"),E.push("."),E.push.apply(E,C(vt(p[1]))),O(E,F,v,k,0,!1,c),(x=I(D,".")).push("["),x.push("i"),x.push("]"),x.push("."),x.push.apply(x,C(vt(p[2]))),O(x,F,v,k,0,!1,c),(d=I(D,".")).push("["),d.push("i"),d.push("]"),d.push("."),d.push.apply(d,C(vt(p[3]))),O(d,F,v,k,0,!1,c)):F.errors.push("在第 "+c+" 行, 函数【"+s+"】的第 1 个参数使用的字段【"+D[0]+"】不存在!"))}else"GetInjectedEntity"!=o.key&&o.key;(b=w[0]).splice.apply(b,C([t,n-t+1],i)),w[2][t]=0,w[2][n]=0,1!=e&&M(w[1],1,1)<M(w[1],e,1)&&M(w[1],e,1)<M(w[1],1,2)&&e++,S=e}(t),t=S})}function I(e,t){for(var n=[],a=0;a<e.length;a++)n.push(e[a]),a<e.length-1&&n.push(t);return n}function bt(e,t,n,a){for(var i=0;i<e.length;i++){var r=e[i];r.startsWith("'")&&r.endsWith("'")||r.startsWith('"')&&r.endsWith('"')||a.errors.push("在第 "+n+" 行, 函数【"+t+"】的第 "+(i+1)+' 个参数没有使用""包起来, 请参考函数说明检查调整!')}}function M(e,t,n){var a,i=0;for(a in e)if(e[a]==t&&++i==n)return Number(a);return Number(-1)}function O(t,e,n,a,i,r,s){var o,l,c=1,c=-1!=(s=void 0===s?-1:s)?s:A(t,i),p=t[i];if(r)if("["==t[i+1]){for(var y,u,d,m=i+1;m<t.length;m++)if("]"==t[m]){i=m;break}"."==t[i+1]&&(1==(y=n.properties.filter(function(e){return e.code==t[i+2]})).length?"Set"==(u=y[0]).type?(d=a.filter(function(e){return e.tableName==u.code&&(e.parent==p||e.parent+"s"==p)})[0],O(t,e,d,a,i+2,!0,s)):"Type"==u.type?(d=a.filter(function(e){return e.tableName==u.code&&(e.parent==p||e.parent+"s"==p)})[0],O(t,e,d,a,i+2,!1,s)):"."==t[i+3]&&e.errors.push(N.format(e.local.check("SimpleNoProperty"),[c,u.code])):e.errors.push(N.format(e.local.check("ChildNoProperty"),[c,n.tableName,t[i+2]])))}else"."==t[i+1]&&(1==(y=n.properties.filter(function(e){return e.code==t[i+2]})).length?"Set"==(l=y[0]).type?(d=a.filter(function(e){return e.tableName==l.code&&(e.parent==p||e.parent+"s"==p)})[0],O(t,e,d,a,i+2,!0,s)):"Type"==l.type?(d=a.filter(function(e){return e.tableName==l.code&&(e.parent==p||e.parent+"s"==p)})[0],O(t,e,d,a,i+2,!1,s)):"."==t[i+3]&&e.errors.push(N.format(e.local.check("SimpleNoProperty"),[c,l.code])):e.errors.push(N.format(e.local.check("ChildNoProperty"),[c,n.tableName,t[i+2]])));else"."==t[i+1]&&(1==(y=n.properties.filter(function(e){return e.code==t[i+2]})).length?"Set"==(o=y[0]).type?(d=a.filter(function(e){return e.tableName==o.code&&(e.parent==p||e.parent+"s"==p)})[0],O(t,e,d,a,i+2,!0,s)):"Type"==o.type?(d=a.filter(function(e){return e.tableName==o.code&&(e.parent==p||e.parent+"s"==p)})[0],O(t,e,d,a,i+2,!1,s)):"."==t[i+3]&&e.errors.push(N.format(e.local.check("SimpleNoProperty"),[c,o.code])):e.errors.push(N.format(e.local.check("PropertyNoProperty"),[c,n.tableName,t[i+2]])))}function vt(e){var n=(e=e.slice(1,-1)).split(".");return n=n.flatMap(function(e,t){return t<n.length-1?[e,"."]:[e]})}function A(e,t){for(var n=1,a=0;a<t;a++)if(null!=e[a]&&e[a].includes("\n"))for(var i=e[a];i.includes("\n");)n++,i=i.replace("\n","#");return n}function Et(e,t){for(var n,a=e,i=t,r="GetContextParameter",s=[],o=0;o<a.length;o++)r==a[o]&&"("==a[o+1]&&")"==a[o+3]&&(a[o+2].startsWith('"')||a[o+2].startsWith("'"))&&null!=(n=a[o+2])&&(n=n.slice(1,n.length-1),i.has(n)?s.push({code:n,name:i.get(n)}):n.length);return s}var xt="Unexpected token",Dt="Unexpected token ILLEGAL",St="Unexpected end of input",Nt=["StringSubstring","StringLength","StringReplace","StringToUpper","StringToLower","StringIndexOf","StringLastIndexOf","StringTrimStart","StringTrimEnd","StringTrim","StringAdd","Round","BankerRound","getComputeJsonData","ToDecimal","ToSingle"],Ft={"zh-CHS":[{key:"CurrentSysOrgName",name:"当前组织Name",description:"当前组织Name"},{key:"CurrentSysOrgCode",name:"当前组织Code",description:"当前组织Code"},{key:"CurrentSysOrgId",name:"当前组织Id",description:"当前组织Id"},{key:"CurrentUserName",name:"当前用户Name",description:"当前用户Name"},{key:"CurrentUserCode",name:"当前用户Code",description:"当前用户Code"},{key:"CurrentUserId",name:"当前用户Id",description:"当前用户Id"},{key:"CurrentLanguage",name:"当前语言编号",description:"当前登录的语言编号，例如简体中文返回'zh-CHS'，英文返回'en'，繁体中文'zh-CHT'"}],en:[{key:"CurrentSysOrgName",name:"Current Organization Name",description:"Current Organization Name"},{key:"CurrentSysOrgCode",name:"Current Organization Code",description:"Current Organization Code"},{key:"CurrentSysOrgId",name:"Current Organization Id",description:"Current Organization Id"},{key:"CurrentUserName",name:"Current User Name",description:"Current User Name"},{key:"CurrentUserCode",name:"Current User Code",description:"Current User Code"},{key:"CurrentUserId",name:"Current User Id",description:"Current User Id"},{key:"CurrentLanguage",name:"Current Language",description:"The current login language code, for example, Simplified Chinese returns 'zh-CHS', English returns 'en', Traditional Chinese returns 'zh-CHT'"}],"zh-CHT":[{key:"CurrentSysOrgName",name:"當前組織Name",description:"當前組織Name"},{key:"CurrentSysOrgCode",name:"當前組織Code",description:"當前組織Code"},{key:"CurrentSysOrgId",name:"當前組織Id",description:"當前組織Id"},{key:"CurrentUserName",name:"當前用戶Name",description:"當前用戶Name"},{key:"CurrentUserCode",name:"當前用戶Code",description:"當前用戶Code"},{key:"CurrentUserId",name:"當前用戶Id",description:"當前用戶Id"},{key:"CurrentLanguage",name:"當前語言編號",description:"當前登入的語言編號，例如簡體中文返回'zh-CHS'，英文返回'en'，繁體中文'zh-CHT'"}]},Tt=(c.prototype.convertCDT=function(e){var t={id:e.Code,name:e.Code,key:null,description:e.Name,properties:[],navigationProperties:[]};return e.ContainElements.forEach(function(e){e={name:e.Code,type:e.MDataType,description:e.Name};t.properties.push(e)}),t},c.prototype.convertCO=function(e){var t=[];return t.push(this.adaptCO(e,t)),t},c.prototype.adaptCO=function(e,n){var a=this,i={name:e.Code,key:null,id:e.Code,description:e.Name,properties:[],navigationProperties:[]};return 0!=e.ContainElements.length&&e.ContainElements.forEach(function(e){e={name:e.Code,type:e.MDataType,description:e.Name};i.properties.push(e)}),0!=e.ContainChildObjects.length&&e.ContainChildObjects.forEach(function(e){var t={name:e.Code+"s",type:h.EntitySet,navigationId:e.Code+"s",description:e.Name};i.navigationProperties.push(t),n.push(a.adaptCO(e,n))}),i},c.prototype.convertCDTOfNewSchema=function(e){var t=this,n={code:e.Code,name:e.Name,master:!1,properties:[],keys:[],navigationProperties:[]};return e.ContainElements.forEach(function(e){e={code:e.Code,name:e.Name,dataType:t.convertMDataType(e.MDataType),nullable:!1,defaultValue:null};n.properties.push(e)}),n},c.prototype.convertCOOfNewSchema=function(e){var t=[];return t.push(this.adaptCOOfNewSchema(e,t)),t},c.prototype.adaptCOOfNewSchema=function(e,n){var a=this,i={code:e.Code,name:e.Name,master:!1,properties:[],keys:[],navigationProperties:[]};return 0!=e.ContainElements.length&&e.ContainElements.forEach(function(e){e={code:e.Code,name:e.Name,dataType:a.convertMDataType(e.MDataType),nullable:!1,defaultValue:null};i.properties.push(e)}),0!=e.ContainChildObjects.length&&e.ContainChildObjects.forEach(function(e){var t={code:e.Code+"s",name:e.Name,navigationName:e.Code,navigationType:d.EntitySet,relationShip:""};i.navigationProperties.push(t),n.push(a.adaptCOOfNewSchema(e,n))}),i},c.prototype.convertMDataType=function(e){switch(e){case t.GSPElementDataType.String:return i.String;case t.GSPElementDataType.Integer:return i.Integer;case t.GSPElementDataType.Binary:return i.Byte;case t.GSPElementDataType.Boolean:return i.Boolean;case t.GSPElementDataType.Date:return i.Date;case t.GSPElementDataType.DateTime:return i.DateTime;case t.GSPElementDataType.Decimal:return i.Decimal;default:t.GSPElementDataType.Text;return i.String}},c);function c(){}var v={frmName:"智能表达式",frmType:"智能表达式",checkedText:""},wt=(g.prototype.ExpressionHandler=function(e){e=e.data,e=JSON.parse(e),e=JSON.parse(e.params);null==this.expressioninfo||""==this.expressioninfo?this.eventService.insertExpression("// 以下为智能助手生成的表达式, 仅供参考: \n"+e):this.eventService.insertExpression("\n// 以下为智能助手生成的表达式, 仅供参考: \n"+e+"\n")},g.prototype.ngOnInit=function(){var t=this;this.options.readOnly=this.readOnly,this.isPanel?this.OninitPanel():this.OninitWindows(),this.getExtendFunc().subscribe(function(e){t.funcExtend=N.formatExtend(e),t.funcExtend=C(t.funcExtend),0<t.funcExtend.length&&t.funcExtend.forEach(function(e){t.standardFunctions.includes(e)||e.isLatestExtendFunc||t.standardFunctions.push(e),t.allFunctions.includes(e)||e.isLatestExtendFunc||t.allFunctions.push(e),t.functionSuffixs.includes(e.keyFront)||e.isLatestExtendFunc||t.functionSuffixs.push(e.keyFront)})},function(e){t.funcExtend=[]})},g.prototype.ngOnDestroy=function(){window.removeEventListener("message",this.ExpressionHandler),v.checkedText="",sessionStorage.setItem("webIdeParams",JSON.stringify(v))},g.prototype.ngOnChanges=function(){var t=this;null!=this.textWithMultiLanguage&&null!=this.language&&(null!=this.lastLanguage&&this.textWithMultiLanguage.set(this.lastLanguage,this.getExpr()),this.lastLanguage=this.language,null!=this.textWithMultiLanguage.get(this.language)?this.text=this.textWithMultiLanguage.get(this.language):this.switchWithDefaultLanguage?this.text=this.textWithMultiLanguage.get(this.locale):this.text=null),this.options.readOnly=this.readOnly,this.getExtendFunc().subscribe(function(e){t.funcExtend=N.formatExtend(e),t.funcExtend=C(t.funcExtend),0<t.funcExtend.length&&t.funcExtend.forEach(function(e){t.standardFunctions.includes(e)||e.isLatestExtendFunc||t.standardFunctions.push(e),t.allFunctions.includes(e)||e.isLatestExtendFunc||t.allFunctions.push(e),t.functionSuffixs.includes(e.keyFront)||e.isLatestExtendFunc||t.functionSuffixs.push(e.keyFront)}),t.isPanel&&t.OninitPanel()},function(e){t.funcExtend=[],t.isPanel&&t.OninitPanel()})},g.prototype.OninitWindows=function(){var t=this;this.expressionEntity&&this.expressionEntity.expr&&0<this.expressionEntity.expr.length?this.code=this.expressionEntity.expr:this.code=null,this.expressionEntity.contextEntities.forEach(function(e){t.contextEntities.push(e)}),this.expressionEntity.sessionEntities.forEach(function(e){t.sessionEntities.push(e)}),this.schema=this.expressionEntity.schemaMap,this.newSchemaMap=this.expressionEntity.newSchemaMap,this.injectedEntities=this.expressionEntity.injectedEntities,this.smartHelp=this.expressionEntity.smartHelpEntities,this.applySetting()},g.prototype.OninitPanel=function(){var n=this;if(this.customNewSchemaName&&this.customNewSchema||this.customNewSchemaMap&&0<this.customNewSchemaMap.size){for(var a,i,e=this.customNewSchemaMap.keys(),t=null;null!=(t=e.next().value);)this.newSchemaMap.set(t,this.customNewSchemaMap.get(t));this.customNewSchemaName&&this.customNewSchema&&this.newSchemaMap.set(this.customNewSchemaName,this.customNewSchema),this.injectName&&this.injectNameInSchema&&this.injectSchemaName&&(this.injectedEntities=this.injectedEntities.filter(function(e){return e.schemaName!==n.injectSchemaName}),(o=new Ze).name=this.injectName||this.injectNameInSchema,o.schemaName=this.injectSchemaName,o.injectedName=this.injectNameInSchema,o.injectedType=this.injectedType,this.injectedEntities.push(o)),this.gspCDTs&&0<this.gspCDTs.length&&(a=new _e,this.newSchemaMap.get("CDT")&&(a=this.newSchemaMap.get("CDT")),this.gspCDTs.forEach(function(e){var t=n.adapter.convertCDTOfNewSchema(e);a.entityTypes=a.entityTypes.filter(function(e){return e.code!==t.code}),a.entityTypes.push(t)}),this.newSchemaMap.set("CDT",a)),this.commonObjects&&0<this.commonObjects.length&&(i=new _e,this.newSchemaMap.get("CommonObject")&&(i=this.newSchemaMap.get("CommonObject")),this.commonObjects.forEach(function(e){n.adapter.convertCOOfNewSchema(e).forEach(function(t){i.entityTypes=i.entityTypes.filter(function(e){return e.code!==t.code}),i.entityTypes.push(t);var n=new Ve;n.code=t.code+"s",n.name=t.name,n.entityType=t.code,i.entitySets=i.entitySets.filter(function(e){return e.code!==n.code}),i.entitySets.push(n)})}),this.newSchemaMap.set("CommonObject",i))}else if(this.customSchemaName&&this.customSchema||this.customSchemaMap&&0<this.customSchemaMap.size){for(var r,s,e=this.customSchemaMap.keys(),t=null;null!=(t=e.next().value);)this.schema.set(t,this.customSchemaMap.get(t));this.customSchemaName&&this.customSchema&&this.schema.set(this.customSchemaName,this.customSchema),this.injectName&&this.injectNameInSchema&&this.injectSchemaName&&(this.injectedEntities=this.injectedEntities.filter(function(e){return e.injectedName!==n.injectName}),(o=new Ze).name=this.injectName||this.injectNameInSchema,o.schemaName=this.injectSchemaName,o.injectedName=this.injectNameInSchema,o.injectedType=this.injectedType,this.injectedEntities.push(o)),this.gspCDTs&&0<this.gspCDTs.length&&(r=new rt,this.schema.get("CDT")&&(r=this.schema.get("CDT")),this.gspCDTs.forEach(function(e){var t=n.adapter.convertCDT(e);r.entityTypes=r.entityTypes.filter(function(e){return e.id!==t.id}),r.entityTypes.push(t)}),this.schema.set("CDT",r)),this.commonObjects&&0<this.commonObjects.length&&(s=new rt,this.schema.get("CommonObject")&&(s=this.schema.get("CommonObject")),this.commonObjects.forEach(function(e){n.adapter.convertCO(e).forEach(function(t){s.entityTypes=s.entityTypes.filter(function(e){return e.id!==t.id}),s.entityTypes.push(t);var n=new ot;n.name=t.name+"s",n.entityType=t.name,n.description=t.description,s.entitySets=s.entitySets.filter(function(e){return e.name!==n.name}),s.entitySets.push(n)})}),this.schema.set("CommonObject",s))}var o=Ft[this.locale];if(null!=o){var l=this;try{for(var c=F(o),p=c.next();!p.done;p=c.next())!function(t){l.contextEntities=l.contextEntities.filter(function(e){return e.key!=t.key}),l.contextEntities.splice(0,0,t)}(p.value)}catch(h){d={error:h}}finally{try{p&&!p.done&&(u=c["return"])&&u.call(c)}finally{if(d)throw d.error}}}var y,u,d,m=JSON.parse(this.text||null);m&&m.expr?null==N.esprima?null!=(o=N.loadEsprima())&&(y=this,o.onload=function(){console.log("CommonUtils Loading Esprima over"),N.esprima=window.esprima;var e=N.getTokens(m.expr),t=N.getVariableMap(y.contextEntities,y.sessionEntities,"Key2Name");y.code=N.toSemantic(e,y.allFunctions,t,y.functionSuffixs)}):(u=N.getTokens(m.expr),d=N.getVariableMap(this.contextEntities,this.sessionEntities,"Key2Name"),this.code=N.toSemantic(u,this.allFunctions,d,this.functionSuffixs)):this.code=null,null!=this.textWithMultiLanguage&&null!=this.language&&(this.eventService.pushclearExpression(),this.eventService.insertExpression(this.code)),this.applySetting()},g.prototype.funcTabChange=function(e){this.currentFuncTabType=e.nextId,this.eventService.subClearFuncSelect().subscribe(),this.selectnewfunc=!1},g.prototype.selectFuncRowChange=function(e){this.descriptinfo=this.FunctionDescription+"\n"+e.description,this.eventService.clearVarSelect(),this.selectnewfunc=!0},g.prototype.dbclickInsert=function(e){var t="";if(e.data.isLatestExtendFunc){for(n=0;n<this.standardFunctions.length;n++)if("Invoke"==this.standardFunctions[n].key){t=this.standardFunctions[n].name;break}t=(t=t+"("+'"')+e.data.key+'"',0<e.data.params.length&&(t=(t+=",")+this.getParamText(e.data.params)),t+=")"}else{for(var t=e.data.key,n=0;n<this.standardFunctions.length;n++)if(t==this.standardFunctions[n].key){t=this.standardFunctions[n].name;break}"Advanced"!=e.data.type&&(t=(t+="(")+this.getParamText(e.data.params)+")")}this.eventService.insertExpression(t)},g.prototype.getParamText=function(e){for(var t="",n=0;n<=e.length-1;n++)1==e.length?"string"==e[0].type?t+='"'+e[0].name+'"':"list"==e[0].type?t+="["+e[0].name+"]":t+=e[0].name:n!=e.length-1?"string"==e[n].type?t+='"'+e[n].name+'",':"list"==e[n].type?t+="["+e[n].name+"],":t+=e[n].name+",":"string"==e[n].type?t+='"'+e[n].name+'"':"list"==e[n].type?t+="["+e[n].name+"]":t+=e[n].name;return t},g.prototype.selectentitychange=function(e){e.nodeType,this.selectedResource=!1,this.descriptinfo=this.CurrentProp+e.code+"--\x3e"+e.name},g.prototype.dbclickEntityInsert=function(e){if(e)if(null==e.func)this.eventService.insertExpression(e.data);else{for(var t="",n=0;n<this.standardFunctions.length;n++)if(e.func==this.standardFunctions[n].key){t=this.standardFunctions[n].name;break}t+="(",null!=e.params&&(t+=e.params),t+=")",e.judge&&(t+=" == "+e.judgeValue),this.eventService.insertExpression(t)}},g.prototype.selectVarRowChange=function(e){this.currentVarType=e.id},g.prototype.selectVarInfoRowChange=function(e){this.descriptinfo=this.VarDescription+e.description,this.eventService.clearFuncSelect(),this.selectnewfunc=!0},g.prototype.dbclickVarInsert=function(e){if(e){var t=N.getVariableMap(this.contextEntities,this.sessionEntities,"Key2Name");switch(this.currentVarType){case ye:for(var n=0;n<this.standardFunctions.length;n++)if("GetContextParameter"==this.standardFunctions[n].key){this.eventService.insertExpression(this.standardFunctions[n].name+'("'+t.get(e.data.key)+'")');break}break;case pe:for(n=0;n<this.standardFunctions.length;n++)if("GetSessionValue"==this.standardFunctions[n].key){this.eventService.insertExpression(this.standardFunctions[n].name+'("'+t.get(e.data.key)+'")');break}}}},g.prototype.selectHelpInfoRowChange=function(e){this.descriptinfo=e.description,this.eventService.clearFuncSelect(),this.selectnewfunc=!0},g.prototype.insertHelpValue=function(e){e&&this.eventService.insertExpression(e)},g.prototype.reset=function(){this.expressioninfo=null,this.code=null,this.eventService.pushclearExpression()},g.prototype.check=function(a){void 0===a&&(a=!0);var i=new ft(this.localePipe);if(null==window.esprima){var r=this;N.loadEsprima().onload=function(){var e=window.esprima;try{var t=N.getTokens(r.expressioninfo);if(r.checkSyntax(r,e,i,t),0!=i.errors.length)return r.showErrorIfNecessary(a,r.buildErrors(i.errors));a&&r.notifyService[r.notifies[3].type]({msg:r.notifies[3].msg})}catch(n){return r.handleEsprimaError(i.errors,n),r.showErrorIfNecessary(a,r.buildErrors(i.errors))}}}else{var e=window.esprima;try{var t=N.getTokens(this.expressioninfo);if(this.checkSyntax(this,e,i,t),0!=i.errors.length)return this.showErrorIfNecessary(a,this.buildErrors(i.errors));a&&this.notifyService[this.notifies[3].type]({msg:this.notifies[3].msg})}catch(n){return this.handleEsprimaError(i.errors,n),this.showErrorIfNecessary(a,this.buildErrors(i.errors))}}},g.prototype.showErrorIfNecessary=function(e,t){if(!(e=void 0===e?!0:e))return t;this.messageService.error(t.get("ErrorTitle"),t.get("ErrorContent"))},g.prototype.checkSyntax=function(e,t,n,a){e.isReturnSyntax=e.judgeReturnSyntax(a),e.isReturnSyntax?t.parse("function test(){%s} \n test();".replace("%s",e.expressioninfo)):t.parse(e.expressioninfo),i=n,t=e.sessionEntities,e.contextEntities.forEach(function(e){i.contextVariables.push(e.key)}),t.forEach(function(e){i.sessionVariables.push(e.key)}),0!=e.newSchemaMap.size&&0!=e.injectedEntities.length?ut(n,e.newSchemaMap,e.injectedEntities):0!=e.schema.size&&0!=e.injectedEntities.length&&dt(n,e.schema,e.injectedEntities),gt(a,n,e.standardFunctions),kt(a,n,e.standardFunctions),r=a,l=(s=n).entityStructs,null!=(c=l[l.length-1])&&(o=[],r.forEach(function(e,t){e==c.tableName&&o.push(t)}),o.forEach(function(e){O(r,s,c,l,e,!1)}));for(var i,r,s,o,l,c,p=[],y=(N.getVariableMap(e.contextEntities,e.sessionEntities,"Key2Name").forEach(function(e,t){p.push(e),p.push(t)}),a),u=n,d=e.standardFunctions,m=p,h=[],f=0;f<d.length&&2!=d.length;f++)"GetContextParameter"==d[f].key&&(h[0]=d[f].name),"GetSessionValue"==d[f].key&&(h[1]=d[f].name);for(var g,f=0;f<y.length;f++)h.includes(y[f])&&"("==y[f+1]&&")"==y[f+3]&&(y[f+2].startsWith('"')||y[f+2].startsWith("'"))&&null!=(g=y[f+2])&&(g=g.slice(1,g.length-1),m.includes(g)||(0==g.length?0==h.indexOf(y[f])?u.errors.push(N.format(u.local.check("ContextNotSet"),[A(y,f)])):1==h.indexOf(y[f])&&u.errors.push(N.format(u.local.check("SessionNotSet"),[A(y,f)])):0==h.indexOf(y[f])?u.errors.push(N.format(u.local.check("ContextNotExist"),[A(y,f),g])):1==h.indexOf(y[f])&&u.errors.push(N.format(u.local.check("SessionNotExist"),[A(y,f),g]))))},g.prototype.handleEsprimaError=function(e,t){t.description==Dt?t.description=t.description+this.localePipe.check("EsprimaSplit")+this.localePipe.check("ILLEGAL"):t.description.startsWith(xt)?t.description=t.description+this.localePipe.check("EsprimaSplit")+this.localePipe.check("Token"):t.description==St&&(t.description=t.description+this.localePipe.check("EsprimaSplit")+this.localePipe.check("EndOfInpur"));t=N.format(this.localePipe.check("ErrorText"),[t.lineNumber,t.column,t.description]);e.push(t)},g.prototype.buildErrors=function(n){var a=this,e=new Map,t=N.format(this.localePipe.check("ErrorDetail"),[n.length]),i="";return n.forEach(function(e,t){i=t==n.length?i+a.localePipe.check("Error")+(t+1)+"："+e:i+a.localePipe.check("Error")+(t+1)+"："+e+"</br>"}),e.set("ErrorTitle",t),e.set("ErrorContent",i),e},g.prototype.judgeReturnSyntax=function(e){for(var t=0;t<e.length;t++)if("return"==e[t])return!0;return!1},g.prototype.getExprs=function(){this.result.emit(this.getExpr())},g.prototype.getExprWithMultiLanguage=function(){return this.textWithMultiLanguage.set(this.language,this.getExpr()),this.textWithMultiLanguage},g.prototype.getExpr=function(){if(null==this.expressioninfo||""==this.expressioninfo)return null;for(var e={expr:this.expressioninfo,sexpr:this.expressionEntity.sexpr},t=N.getTokens(e.expr),n=N.getVariableMap(this.contextEntities,this.sessionEntities,"Name2Key"),a=0;a<t.length;a++){var i,r=0;if(0==r&&2<t[a].length&&'"'==t[a][0]&&'"'==t[a][t[a].length-1]&&(i=t[a].substring(1,t[a].length-1),n.has(i))&&"("==t[a-1]&&")"==t[a+1]&&this.variableFuncNames.includes(t[a-2])&&(t[a]='"'+n.get(i)+'"',r=1),0==r)for(var s=0;s<this.standardFunctions.length;s++)if(t[a]==this.standardFunctions[s].name){t[a]=this.standardFunctions[s].keyFront+"."+this.standardFunctions[s].key,r=1;break}}for(var o="",a=0;a<t.length;a++)o+=t[a];return e.expr=o,JSON.stringify(e)},g.prototype.getExprWithCheck=function(){var a=this;return new Promise(function(t){var e,n={closeable:!0,expression:null,semantic:a.semantic?a.expressioninfo:null};return null==a.expressioninfo||""==a.expressioninfo?t(n):null==(e=a.check(!1))?(n.closeable=!0,n.expression=a.getExpr(),t(n)):void a.messageService.confirm(a.localePipe.check("ConfirmWhenError"),e.get("ErrorContent"),!0).subscribe(function(e){return n.closeable=e,n.expression=a.getExpr(),t(n)})})},g.prototype.checkExpression=function(){var n=this;return new Promise(function(e){var t=n.check(!1);e(null!=t?t.get("ErrorContent"):null)})},g.prototype.hide=function(){this.selectnewfunc=!1},g.prototype.openButtonArea=function(){if(0==this.showMoreButton){this.showMoreButton=!0;for(var e=0;e<document.getElementsByClassName("expressupleft").length;e++)document.getElementsByClassName("expressupleft")[e].style.width="71%";for(e=0;e<document.getElementsByClassName("expressupmiddle").length;e++)document.getElementsByClassName("expressupmiddle")[e].style.width="18%";for(e=0;e<document.getElementsByClassName("expressextendText").length;e++)document.getElementsByClassName("expressextendText")[e].innerHTML=">"}else{this.showMoreButton=!1;for(e=0;e<document.getElementsByClassName("expressupleft").length;e++)document.getElementsByClassName("expressupleft")[e].style.width="88%";for(e=0;e<document.getElementsByClassName("expressupmiddle").length;e++)document.getElementsByClassName("expressupmiddle")[e].style.width="1%";for(e=0;e<document.getElementsByClassName("expressextendText").length;e++)document.getElementsByClassName("expressextendText")[e].innerHTML="<"}},g.prototype.tabChange=function(e){this.eventService.subClearVarSelect().subscribe()},g.prototype.onInitHandler=function(e){},g.prototype.onChangeHandler=function(e){this.expressioninfo=e.data},g.prototype.onTouchedHandler=function(e){},g.prototype.onPlus=function(){this.eventService.insertExpression(" + ")},g.prototype.onMinus=function(){this.eventService.insertExpression(" - ")},g.prototype.onMultiple=function(){this.eventService.insertExpression("*")},g.prototype.onDivision=function(){this.eventService.insertExpression("/")},g.prototype.onPercent=function(){this.eventService.insertExpression("%")},g.prototype.onDoubleQuotation=function(){this.eventService.insertExpression('""')},g.prototype.onEqual=function(){this.eventService.insertExpression(" == ")},g.prototype.onUnequal=function(){this.eventService.insertExpression(" != ")},g.prototype.onBrace=function(){this.eventService.insertExpression("[]")},g.prototype.onSparen=function(){this.eventService.insertExpression("()")},g.prototype.onOr=function(){this.eventService.insertExpression(" || ")},g.prototype.onAnd=function(){this.eventService.insertExpression(" && ")},g.prototype.onMoreequal=function(){this.eventService.insertExpression(" >= ")},g.prototype.onLessequal=function(){this.eventService.insertExpression(" <= ")},g.prototype.onLess=function(){this.eventService.insertExpression(" < ")},g.prototype.onMore=function(){this.eventService.insertExpression(" > ")},g.prototype.changeText=function(e){e=JSON.parse(e||null);e&&e.expr?this.code=e.expr:this.code=null},g.prototype.changeInjectEntity=function(e,t,n,a){var i;void 0===t&&(t="CommonObject"),void 0===a&&(a=m.EntityType),e&&n&&t&&((i=new Ze).name=e||n,i.schemaName=t,i.injectedName=n,i.injectedType=a,this.expressionEntity.injectedEntities.push(i)),this.injectedEntities=this.expressionEntity.injectedEntities},g.prototype.changeCO=function(e){var n,t=this;e&&0<e.length&&(n=this.expressionEntity.schemaMap.get("CommonObject")?this.expressionEntity.schemaMap.get("CommonObject"):new rt,e.forEach(function(e){t.adapter.convertCO(e).forEach(function(e){n.entityTypes.push(e);var t=new ot;t.name=e.name+"s",t.entityType=e.name,t.description=e.description,n.entitySets.push(t)})}),this.schema.set("CommonObject",n))},g.prototype.changeContextVar=function(e){var t=this;e.forEach(function(e){t.contextEntities=t.contextEntities.filter(function(e){return e.key!=e.key}),t.contextEntities.push(e)})},g.prototype.applySetting=function(){var t=this;if(this.setting=Ue.from(this.setting),null!=this.setting.DataArea_DefaultSelect)switch(this.setting.DataArea_DefaultSelect){case Ke.DataModel:this.DataArea_DefaultSelectString="Entity";break;case Ke.Variable:this.DataArea_DefaultSelectString="Variable";break;case Ke.Help:this.DataArea_DefaultSelectString="Help";break;default:this.DataArea_DefaultSelectString="Entity"}null!=this.setting.DataArea_Variable_Items&&1==this.setting.DataArea_Variable_Items.length&&"Session"==this.setting.DataArea_Variable_Items[0]&&(this.currentVarType=pe),null!=this.setting.DataArea_Variable_Context&&(0<this.setting.DataArea_Variable_Context.length?this.contextEntities=this.contextEntities.filter(function(e){return t.setting.DataArea_Variable_Context.includes(e.key)}):this.contextEntities=[]),null!=this.setting.DataArea_Variable_Session&&(0<this.setting.DataArea_Variable_Session.length?this.sessionEntities=this.sessionEntities.filter(function(e){return t.setting.DataArea_Variable_Session.includes(e.key)}):this.sessionEntities=[])},g.prototype.getExtendFunc=function(){return this.http.get(N.convertPath("/api/runtime/sys/v1.0/express/globalFuncs"))},g.prototype.showAiAssistant=function(){var e,t,n,a,i,r,s=[];if(v.checkedText="",this.newSchemaMap&&0<this.newSchemaMap.size?s=ht.onInitNewSchema(this.newSchemaMap,this.injectedEntities,null):this.schema&&0<this.schema.size&&(s=ht.OnInitSchema(this.schema,this.injectedEntities,null)),0<s.length)try{for(var o=F(s),l=o.next();!l.done;l=o.next()){var c=l.value,p=this.cycle(c),y=(p=(p=p.substring(2+this.injectedEntities[0].name.length)).substring(0,p.length-1),"我有javascript变量"+c.data.code+", 这个变量也可以称之为数据模型、表单或者主表, 它包含如下属性, 其中, 值为[]的属性, 也可以称为子表, 具体结果如下: var "+c.data.code+" = "+p+", 禁止使用不存在的变量或属性。");v.checkedText=v.checkedText+y}}catch(g){e={error:g}}finally{try{l&&!l.done&&(t=o["return"])&&t.call(o)}finally{if(e)throw e.error}}if(null!=this.contextEntities&&0<this.contextEntities.length){var u="我有"+this.contextEntities.length+"个上下文变量, 信息如下: ";try{for(var d=F(this.contextEntities),m=d.next();!m.done;m=d.next())u=u+"编号: "+(c=m.value).key+", 名称: "+c.name+"; "}catch(k){n={error:k}}finally{try{m&&!m.done&&(a=d["return"])&&a.call(d)}finally{if(n)throw n.error}}v.checkedText=v.checkedText+(u+="这些上下文变量可以被函数 获取上下文变量 使用, 你必须通过该函数使用上下文变量, 并且需要使用名称作为参数; ")}if(null!=this.sessionEntities&&0<this.sessionEntities.length){u="我有"+this.sessionEntities.length+"个会话变量, 信息如下: ";try{for(var h=F(this.sessionEntities),f=h.next();!f.done;f=h.next())u=u+"编号: "+(c=f.value).key+", 名称: "+c.name+"; "}catch(b){i={error:b}}finally{try{f&&!f.done&&(r=h["return"])&&r.call(h)}finally{if(i)throw i.error}}v.checkedText=v.checkedText+(u+="这些会话变量可以被函数 获取会话变量 使用, 你必须通过该函数使用会话变量, 并且需要使用名称作为参数; ")}sessionStorage.setItem("webIdeParams",JSON.stringify(v)),this.aiAssistant.isOpen=!0},g.prototype.cycle=function(e){var t="";if(0<e.children.length){for(var n=0;n<e.children.length;n++){var a=e.children[n];t+=this.cycle(a)}t="EntitySet"==e.data.type.code?e.data.code+" : [ { "+t+" } ] ":e.data.code+" : { "+t+" } "}else t=t+e.data.code+" : "+e.data.name+" , ";return t},g.decorators=[{type:y.Component,args:[{selector:"app-expressioneditor",template:'<div class="h-100 f-utils-flex-column">\r\n  <div id="main" style="width:100%;height:26%;margin-bottom: 1%;" ngResizable [rzMinHeight]="90" [rzMaxHeight]="300"\r\n    [rzHandles]="\'s\'" rzAspectRatio="true">\r\n    \x3c!-- 编辑框区域 --\x3e\r\n    <div class="expressupleft"\r\n      style="width:88%;height:100%;float:left;border:0 solid #E4E7EF;border-radius: 4px;padding-left: 1.5%;padding-right: 0.6%;">\r\n      <div style="width:100%;height:100%;" class="position-relative">\r\n        <app-my-monaco-editor style="z-index: 125;" [options]="options" [(ngModel)]="code"\r\n          (onInit)="onInitHandler($event)" (onTouched)="onTouchedHandler($event)" (onChange)="onChangeHandler($event)"\r\n          class="f-utils-absolute-all"> </app-my-monaco-editor>\r\n      </div>\r\n    </div>\r\n    \x3c!-- 小按钮区域 --\x3e\r\n    <div class="f-utils-fill expressupmiddle" style="width: 1%;height:100%;float: left;">\r\n      <div id=\'extendArea\'\r\n        style="cursor:pointer;float:left;width: 12px;height: 60px;border: 1px rgb(168, 168, 168);background-color: #E4E7EF;border-radius: 4px 0px 0px 4px;margin-top: 32px;"\r\n        (click)="openButtonArea()">\r\n        <div class="expressextendText" style="transform: scale(0.9); margin-top: 18px;"> &lt; </div>\r\n      </div>\r\n      <div *ngIf="this.showMoreButton" class="f-utils-fill f-utils-fill-auto"\r\n        style="height: 100%;background-color: #F7F8FB;text-align: center;">\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onPlus()">+</button>\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onMinus()">-</button>\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onMultiple()">*</button>\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onDivision()">/</button>\r\n\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onPercent()">%</button>\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onDoubleQuotation()">&quot;&quot;</button>\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onEqual()">==</button>\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onUnequal()">!=</button>\r\n\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onBrace()">[&nbsp;]</button>\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onSparen()">(&nbsp;)</button>\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onOr()">||</button>\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onAnd()">&&</button>\r\n\r\n        \x3c!-- &lt;小于号；&gt;大于号 --\x3e\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onMoreequal()">&gt;=</button>\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onLessequal()">&lt;=</button>\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onLess()"> &lt;</button>\r\n        <button type="button" class="btn cbtn btn-secondary" (click)="onMore()">&gt;</button>\r\n      </div>\r\n    </div>\r\n    \x3c!-- 功能按钮 --\x3e\r\n    <div id="upright"\r\n      style="width:11%;height:100%;float:left;text-align: center;padding-right: 20.5px;padding-left: 8px;">\r\n      <button class="btn f-btn-mr btn-primary rightButton" type="button" (click)=check()>\r\n        {{ \'CheckFront\' | locale }}\r\n      </button>\r\n      <button class="btn f-btn-mr btn-secondary rightButton" type="button" [disabled]="this.readOnly" (click)=reset()>\r\n        {{ \'ResetFront\' | locale }}\r\n      </button>\r\n      <button *ngIf="showAssistant" class="btn f-btn-mr btn-secondary rightButton"\r\n        style=\'background-image: linear-gradient(97deg, #DDF8F6 5%, #EFEFFE 96%);border-radius: 6px;padding: 3px 3px;border: none;\'\r\n        type="button" (click)=showAiAssistant()><img style="height:14px"\r\n          src="/platform/common/web/@gsp-svc/aiexpression.png">\r\n        &nbsp; <span>{{\'AiAssistant\' | locale}}</span>\r\n      </button>\r\n      <button farrisPopover class="btn f-btn-mr btn-secondary rightButton" type="button" [container]="\'body\'"\r\n        [triggers]="\'hover\'" [placement]="\'down\'" [popover]="poptmpl" [popoverContext]=this.HelpButtonDesc>\r\n        {{ \'HelpFront\' | locale }}\r\n      </button>\r\n      <ng-template #poptmpl let-infos>\r\n        <div style="padding:0px 5px 5px 5px;font-size: 12px;color: black;width: 260px;">\r\n          <p style="margin:auto;font-weight: 600;font-size: 15px;color: saddlebrown;">{{infos.syntax}}</p>\r\n          <p style="margin: 0 0 3px;">{{infos.desc}}</p>\r\n          <p style="margin:auto;font-weight: 600;font-size: 15px;color: saddlebrown;">{{infos.buttonDesc}}</p>\r\n          <p style="margin: 0 0 3px;">\r\n            {{infos.checkButtonDesc}}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{infos.resetButtonDesc}}</p>\r\n          <p style="margin:auto;font-weight: 600;font-size: 15px;color: saddlebrown;">{{infos.functionDesc}}</p>\r\n          <p style="margin: 0 0 3px;">{{infos.clickFunctionDesc}}</p>\r\n          <p style="margin: 0 0 3px;">{{infos.dbclickFunctionDesc}}</p>\r\n          <p style="margin:auto;font-weight: 600;font-size: 15px;color: saddlebrown;">{{infos.entityDesc}}</p>\r\n          <p style="margin: 0 0 3px;">{{infos.insertByStructureDesc}}</p>\r\n          <p style="margin: 0 0 3px;">{{infos.insertByPropertyDesc}}</p>\r\n          <p style="margin:auto;font-weight: 600;font-size: 15px;color: saddlebrown;">{{infos.otherDesc}}</p>\r\n          <p style="margin: 0 0 3px;">{{infos.chainedStrucDesc}}</p>\r\n          <p style="margin: 0 0 3px;">{{infos.areaChangeDesc}}</p>\r\n        </div>\r\n      </ng-template>\r\n    </div>\r\n  </div>\r\n\r\n  \x3c!-- 函数和变量部分 --\x3e\r\n  <div id="select" class="f-utils-fill d-flex">\r\n    <div style="width: 43%; height: 100%;margin-right: 0.5%;" ngResizable [rzMinWidth]="300" [rzMaxWidth]="640"\r\n      [rzHandles]="\'e\'" rzAspectRatio="true">\r\n      \x3c!-- 函数部分 --\x3e\r\n      <div id="left" style="width:100%;height:100%;padding-left: 20px;margin-right: 1%;">\r\n        <div style="height:100%;border: 0.5px solid #E4E7EF;border-radius: 2px;">\r\n          <farris-tabs style="font-size: 13px;height:100%;background-color: #F7F8FB;" [value]="\'String\'"\r\n            [contentFill]="true" (tabChange)="funcTabChange($event)">\r\n            <farris-tab [title]="this.Advanced" [id]="\'Advanced\'" style="font-size: 13px;margin-top: -6px;">\r\n              <ng-template #content>\r\n                <div style=" height:100%">\r\n                  <app-expr-func-grid [currentFuncTabType]="\'Advanced\'" (selectFuncRow)="selectFuncRowChange($event)"\r\n                    (dbclickInsert)="dbclickInsert($event)"></app-expr-func-grid>\r\n                </div>\r\n              </ng-template>\r\n            </farris-tab>\r\n            <farris-tab [title]="this.String" [id]="\'String\'" style="font-size: 13px;margin-top: -6px;">\r\n              <ng-template #content>\r\n                <div style="height:100%">\r\n                  <app-expr-func-grid [currentFuncTabType]="\'String\'" (selectFuncRow)="selectFuncRowChange($event)"\r\n                    (dbclickInsert)="dbclickInsert($event)"></app-expr-func-grid>\r\n                </div>\r\n              </ng-template>\r\n            </farris-tab>\r\n            \x3c!-- 判断函数归于解析中，解析更名为"数据" --\x3e\r\n            <farris-tab [title]="this.Analytical" [id]="\'Analytical\'" style="font-size: 13px;margin-top: -6px;">\r\n              <ng-template #content>\r\n                <div style="height:100%">\r\n                  <app-expr-func-grid [currentFuncTabType]="\'Analytical\'" (selectFuncRow)="selectFuncRowChange($event)"\r\n                    (dbclickInsert)="dbclickInsert($event)">\r\n                  </app-expr-func-grid>\r\n                </div>\r\n              </ng-template>\r\n            </farris-tab>\r\n            <farris-tab [title]="this.Translate" [id]="\'Translate\'" style="font-size: 13px;margin-top: -6px;">\r\n              <ng-template #content>\r\n                <div style="height:100%">\r\n                  <app-expr-func-grid [currentFuncTabType]="\'Translate\'" (selectFuncRow)="selectFuncRowChange($event)"\r\n                    (dbclickInsert)="dbclickInsert($event)"></app-expr-func-grid>\r\n                </div>\r\n              </ng-template>\r\n            </farris-tab>\r\n            <farris-tab [title]="this.Math" [id]="\'Math\'" style="font-size: 13px;margin-top: -6px;">\r\n              <ng-template #content>\r\n                <div style="height:100%">\r\n                  <app-expr-func-grid [currentFuncTabType]="\'Math\'" (selectFuncRow)="selectFuncRowChange($event)"\r\n                    (dbclickInsert)="dbclickInsert($event)"></app-expr-func-grid>\r\n                </div>\r\n              </ng-template>\r\n            </farris-tab>\r\n            <farris-tab [title]="this.DateTime" [id]="\'DateTime\'" style="font-size: 13px;margin-top: -6px;">\r\n              <ng-template #content>\r\n                <div style="height:100%">\r\n                  <app-expr-func-grid [currentFuncTabType]="\'DateTime\'" (selectFuncRow)="selectFuncRowChange($event)"\r\n                    (dbclickInsert)="dbclickInsert($event)"></app-expr-func-grid>\r\n                </div>\r\n              </ng-template>\r\n            </farris-tab>\r\n            <farris-tab *ngIf="this.setting.Function_ShowExtend" [title]="this.Extend" [id]="\'Extend\'"\r\n              style="font-size: 13px;margin-top: -6px;">\r\n              <ng-template #content>\r\n                <div style="height:100%">\r\n                  <app-expr-func-grid [funcExtend]="funcExtend" [currentFuncTabType]="\'Extend\'"\r\n                    [showFuncExtendItems]="this.setting.Function_ShowExtendItems"\r\n                    (selectFuncRow)="selectFuncRowChange($event)" (dbclickInsert)="dbclickInsert($event)">\r\n                  </app-expr-func-grid>\r\n                </div>\r\n              </ng-template>\r\n            </farris-tab>\r\n          </farris-tabs>\r\n        </div>\r\n      </div>\r\n    </div>\r\n    <div style="height: 100%; flex: 1 1 auto;margin-right: 20px;">\r\n      \x3c!-- 数据模型&&变量&&帮助 --\x3e\r\n      <div id="middle" class="position-relative"\r\n        style="width:100%;height:100%;float:left;padding-left: 7px;border: 0.5px solid #E4E7EF;border-radius: 2px;margin-right: 1%;">\r\n        <farris-tabs [value]="this.DataArea_DefaultSelectString" [contentFill]="true" class="f-utils-absolute-all"\r\n          (tabChange)="tabChange($event)" style="background-color: #F7F8FB;font-size: 13px;">\r\n          <farris-tab [title]="this.Entity" [id]="\'Entity\'" style="background-color: #ffffff;">\r\n            <ng-template #content>\r\n              <div class="f-utils-absolute-all f-utils-flex-row">\r\n                <div class="f-utils-fill-flex-column" style="width:100%;" ngResizable [rzMinWidth]="40"\r\n                  [rzMaxWidth]="800" [rzHandles]="\'e\'" rzAspectRatio="true">\r\n                  <app-expression-entity-grid class="f-utils-fill-flex-column" [schema]="schema"\r\n                    [newSchemaMap]="newSchemaMap" [injectedEntities]="injectedEntities"\r\n                    [showChildSymbol]="this.setting.DataModel_ShowChildSymbol"\r\n                    (dbclickInsert)="dbclickEntityInsert($event)" (selectentitychange)="selectentitychange($event)">\r\n                  </app-expression-entity-grid>\r\n                </div>\r\n              </div>\r\n            </ng-template>\r\n          </farris-tab>\r\n          <farris-tab [title]="this.Variable" [id]="\'Variable\'" class="f-utils-overflow-hidden"\r\n            style="background-color: #ffffff;height: 100%;">\r\n            <ng-template #content>\r\n              <div style="width: 100%;height: 100%; display: flex;">\r\n                <div class="f-utils-flex-column position-relative" style="width: 30%;height: 100%;" ngResizable\r\n                  [rzMinWidth]="40" [rzMaxWidth]="400" [rzHandles]="\'e\'" rzAspectRatio="true">\r\n                  <app-expression-var-grid [elements]="this.setting.DataArea_Variable_Items"\r\n                    (selectVarRow)="selectVarRowChange($event)" class="f-utils-fill">\r\n                  </app-expression-var-grid>\r\n                </div>\r\n                <div class="f-utils-flex-column position-relative"\r\n                  style="width: 70%;height: 100%;flex: 1 1 auto; border-left: 1px solid #ddd;">\r\n                  <app-expression-var-info-grid class="f-utils-fill" [currentVarType]="currentVarType"\r\n                    [elements]="this.setting.DataArea_Variable_Items" [contextEntities]="contextEntities"\r\n                    [sessionEntities]="sessionEntities" (selectVarInfoRow)="selectVarInfoRowChange($event)"\r\n                    (dbclickInsert)="dbclickVarInsert($event)">\r\n                  </app-expression-var-info-grid>\r\n                </div>\r\n              </div>\r\n            </ng-template>\r\n          </farris-tab>\r\n          <farris-tab [title]="this.Help" [id]="\'Help\'" class="f-utils-overflow-hidden"\r\n            style="background-color: #ffffff;height: 100%;">\r\n            <ng-template #content>\r\n              <div class="f-utils-flex-column position-relative" style="width: 100%;height: 100%;">\r\n                <app-expression-smart-help-grid class="f-utils-fill" [smartHelp]="smartHelp"\r\n                  (insertValue)="insertHelpValue($event)" (selectHelpRow)="selectHelpInfoRowChange($event)">\r\n                </app-expression-smart-help-grid>\r\n              </div>\r\n            </ng-template>\r\n          </farris-tab>\r\n        </farris-tabs>\r\n      </div>\r\n    </div>\r\n  </div>\r\n\r\n  \x3c!-- 描述 --\x3e\r\n  <div *ngIf=selectnewfunc\r\n    style="padding-left: 20px;position: absolute;bottom: 0;left: 0;right: 0;border-top: 1px solid #ddd;z-index: 100;background: white;white-space:break-spaces;margin-left: 28%;">\r\n    <span\r\n      style="position: absolute;top: -18px;left: 50%;border-radius: 4px;width: 40px;height: 18px;cursor: pointer;background: #fff;text-align: center;border: 1px solid #efecec;color: #59a1ff;border-bottom: none;"><i\r\n        class="f-icon f-icon-arrow-seek-down" (click)="hide()"></i></span>\r\n    <span>\r\n      <i class="f-icon f-icon-info"></i>\r\n    </span>\r\n    {{descriptinfo}}\r\n  </div>\r\n</div>\r\n\r\n<farris-sidebar [showPos]="\'right\'" [title]="\'智能表达式机器人\'" #aiAssistant [resizeable]="true" [mainCls]="\'main-tsCls\'"\r\n  [showHeader]="false" [showFooter]="false" [maskable]="true" [maskClosable]="true" [width]="\'50%\'" [showEntry]="false"\r\n  [parentCls]="\'sss\'">\r\n  <ng-template farrisSidebarContent>\r\n    <iframe\r\n      src="/platform/runtime/ai/haiyue-chat/index.html?assignRobotId=45644204-4a33-47cf-bafa-0c78affc2c77&canClose=false"\r\n      [width]="\'100%\'" [height]="\'100%\'" title="My Iframe"></iframe>\r\n  </ng-template>\r\n</farris-sidebar>',styles:[".cbtn{height:19%;background:#fdfdfd;border:1px solid #d0d0d0;border-radius:3px;margin:3px 4px;text-align:center;font-size:12px;color:#6b6b6b;width:20%;min-height:30px;min-width:45px}.rightButton{width:100%;height:22%;margin-bottom:4%;display:flex;align-items:center;justify-content:center}.mcbtn{width:14.6%;height:19%;background:#fdfdfd;border:1px solid #d0d0d0;border-radius:3px;margin:1px 5px;text-align:center;font-size:12px;color:#388fff}#descriptionOfDiv{padding-left:20px;position:absolute;bottom:0;left:0;right:0;border-top:1px solid #ddd;z-index:100;background:#fff;white-space:pre}#descriptionOfSpan{position:absolute;top:-18px;left:50%;border-radius:4px;width:40px;height:18px;cursor:pointer;background:#fff;text-align:center;border:1px solid #efecec;color:#59a1ff;border-bottom:none}"]}]}],g.ctorParameters=function(){return[{type:n},{type:y.Injector,decorators:[{type:y.Optional}]},{type:X.HttpClient}]},g.propDecorators={aiAssistant:[{type:y.ViewChild,args:["aiAssistant"]}],readOnly:[{type:y.Input}],semantic:[{type:y.Input}],funcExtend:[{type:y.Input}],expressionEntity:[{type:y.Input}],contextEntities:[{type:y.Input}],sessionEntities:[{type:y.Input}],injectedEntities:[{type:y.Input}],smartHelp:[{type:y.Input}],text:[{type:y.Input}],isPanel:[{type:y.Input}],funcEntities:[{type:y.Input}],extendFuncEntities:[{type:y.Input}],gspCDTs:[{type:y.Input}],commonObjects:[{type:y.Input}],customSchemaName:[{type:y.Input}],customSchema:[{type:y.Input}],customSchemaMap:[{type:y.Input}],injectName:[{type:y.Input}],injectSchemaName:[{type:y.Input}],injectNameInSchema:[{type:y.Input}],injectedType:[{type:y.Input}],customNewSchemaName:[{type:y.Input}],customNewSchema:[{type:y.Input}],customNewSchemaMap:[{type:y.Input}],windowWidth:[{type:y.Input}],setting:[{type:y.Input}],language:[{type:y.Input}],textWithMultiLanguage:[{type:y.Input}],result:[{type:y.Output}],resultWithMultiLangauge:[{type:y.Output}],closeModalEmitter:[{type:y.Output}]},g);function g(e,t,n){var a,i,r=this;this.eventService=e,this.injector=t,this.http=n,this.functions=new Be,this.notifies={},this.functionSuffixs=["DefaultFunction","Math","DefaultExtendFunctionProxy"],this.options={language:"javascript",automaticLayout:!0,minimap:{enabled:!1},readOnly:!1,fontSize:"14px"},this.readOnly=!1,this.semantic=!1,this.funcExtend=[],this.expressionEntity=new qe,this.contextEntities=[],this.sessionEntities=[],this.injectedEntities=[],this.smartHelp=[],this.isPanel=!1,this.funcEntities=[],this.extendFuncEntities=[],this.gspCDTs=[],this.commonObjects=[],this.customSchemaMap=new Map,this.injectSchemaName="CommonObject",this.injectedType=m.EntityType,this.customNewSchemaMap=new Map,this.windowWidth=1e3,this.setting=new Ue,this.result=new y.EventEmitter,this.resultWithMultiLangauge=new y.EventEmitter,this.closeModalEmitter=new y.EventEmitter,this.switchWithDefaultLanguage=!1,this.isReturnSyntax=!1,this.selectnewfunc=!1,this.selectedResource=!1,this.currentFuncTabType="String",this.currentVarType=ye,this.descriptinfo="",this.standardFunctions=[],this.allFunctions=[],this.variableFuncNames=[],this.schema=new Map,this.newSchemaMap=new Map,this.adapter=new Tt,this.showAssistant=!1,this.showMoreButton=!1,this.injector&&(this.notifyService=this.injector.get(ne.NotifyService),this.messageService=this.injector.get(te.MessagerService),this.http=this.injector.get(X.HttpClient)),this.locale=localStorage.getItem("languageCode")||"zh-CHS",this.localePipe=new u(this.locale),this.notifies={1:{type:"success",msg:"表达式生成！"},2:{type:"warning",msg:"请确保必填项填写完整！"},3:{type:"success",msg:this.localePipe.check("CheckSuccess")},4:{type:"warning",msg:""}},this.allFunctions=this.functions.get(this.locale);for(var s=0;s<this.allFunctions.length;s++)Nt.includes(this.allFunctions[s].key)||this.standardFunctions.push(this.allFunctions[s]);this.variableFuncNames=[];try{for(var o=F(this.allFunctions),l=o.next();!l.done;l=o.next()){var c=l.value;if(N.variableFuncKeys.includes(c.key)&&(this.variableFuncNames.push(c.keyFront+"."+c.key),2==this.variableFuncNames.length))break}}catch(p){a={error:p}}finally{try{l&&!l.done&&(i=o["return"])&&i.call(o)}finally{if(a)throw a.error}}this.Advanced=this.localePipe.transform("Advanced"),this.String=this.localePipe.transform("String"),this.Analytical=this.localePipe.transform("Analytical"),this.Translate=this.localePipe.transform("Translate"),this.Math=this.localePipe.transform("Math"),this.DateTime=this.localePipe.transform("DateTime"),this.Extend=this.localePipe.transform("Extend"),this.Variable=this.localePipe.transform("Variable"),this.Entity=this.localePipe.transform("Entity"),this.Help=this.localePipe.transform("Help"),this.FunctionDescription=this.localePipe.transform("FunctionDescription"),this.VarDescription=this.localePipe.transform("VarDescription"),this.CurrentProp=this.localePipe.transform("CurrentProp"),this.CurrentChosedProp=this.localePipe.transform("CurrentChosedProp"),this.PopverTitleDesc=this.localePipe.transform("PopverTitleDesc"),this.HelpButtonDesc=this.localePipe.transform("HelpButtonDesc"),N.init(),this.http.get(N.convertPath("/platform/runtime/ai/haiyue-chat/index.html"),{responseType:"text"}).toPromise().then(function(e){r.showAssistant=!0,r.ExpressionHandler=r.ExpressionHandler.bind(r),window.addEventListener("message",r.ExpressionHandler)})["catch"](function(e){r.showAssistant=!1;for(var t=0;t<document.getElementsByClassName("rightButton").length;t++)document.getElementsByClassName("rightButton")[t].style.height="30%"})}var Ct,It,Mt=[{lang:"zh-CHS",resource:[{label:"大于",value:">"},{label:"大于等于",value:">="},{label:"等于",value:"=="},{label:"不等于",value:"!="},{label:"小于",value:"<"},{label:"小于等于",value:"<="},{label:"等于(字符串)",value:"equal"},{label:"不等于(字符串)",value:"notequal"},{label:"为空",value:"==null"},{label:"不为空",value:"!=null"},{label:"包含",value:"Contains"},{label:"不包含",value:"NotContains"},{label:"开头是",value:"StartsWith"},{label:"开头不是",value:"NotStartsWith"},{label:"结尾是",value:"EndsWith"},{label:"结尾不是",value:"NotEndsWith"},{label:"组织从属",value:"OrgAffiliation"}]},{lang:"en",resource:[{label:"GreaterThan",value:">"},{label:"GreaterOrEqual",value:">="},{label:"Equal",value:"=="},{label:"NotEqual",value:"!="},{label:"LessThan",value:"<"},{label:"LessOrEqual",value:"<="},{label:"Equal(String)",value:"equal"},{label:"NotEqual(String)",value:"notequal"},{label:"IsNull",value:"==null"},{label:"NotNull",value:"!=null"},{label:"Contains",value:"Contains"},{label:"NotContains",value:"NotContains"},{label:"StartsWith",value:"StartsWith"},{label:"NotStartsWith",value:"NotStartsWith"},{label:"EndsWith",value:"EndsWith"},{label:"NotEndsWith",value:"NotEndsWith"},{label:"OrgAffiliation",value:"OrgAffiliation"}]},{lang:"zh-CHT",resource:[{label:"大於",value:">"},{label:"大於等於",value:">="},{label:"等於",value:"=="},{label:"不等於",value:"!="},{label:"小於",value:"<"},{label:"小於等於",value:"<="},{label:"等於（字符）",value:"equal"},{label:"不等於（字符）",value:"notequal"},{label:"為空",value:"==null"},{label:"不為空",value:"!=null"},{label:"包含",value:"Contains"},{label:"不包含",value:"NotContains"},{label:"開頭是",value:"StartsWith"},{label:"開頭不是",value:"NotStartsWith"},{label:"結尾是",value:"EndsWith"},{label:"結不尾是",value:"NotEndsWith"},{label:"組織從屬",value:"OrgAffiliation"}]}],Ot=[{lang:"zh-CHS",resource:[{label:"等于(字符串)",value:"equal"},{label:"不等于(字符串)",value:"notequal"},{label:"为空",value:"==null"},{label:"不为空",value:"!=null"},{label:"包含",value:"Contains"},{label:"不包含",value:"NotContains"},{label:"开头是",value:"StartsWith"},{label:"开头不是",value:"NotStartsWith"},{label:"结尾是",value:"EndsWith"},{label:"结尾不是",value:"NotEndsWith"},{label:"组织从属",value:"OrgAffiliation"}]},{lang:"en",resource:[{label:"Equal(String)",value:"equal"},{label:"NotEqual(String)",value:"notequal"},{label:"IsNull",value:"==null"},{label:"NotNull",value:"!=null"},{label:"Contains",value:"Contains"},{label:"NotContains",value:"NotContains"},{label:"StartsWith",value:"StartsWith"},{label:"NotStartsWith",value:"NotStartsWith"},{label:"EndsWith",value:"EndsWith"},{label:"NotEndsWith",value:"NotEndsWith"},{label:"OrgAffiliation",value:"OrgAffiliation"}]},{lang:"zh-CHT",resource:[{label:"等於（字符）",value:"equal"},{label:"不等於（字符）",value:"notequal"},{label:"為空",value:"==null"},{label:"不為空",value:"!=null"},{label:"包含",value:"Contains"},{label:"不包含",value:"NotContains"},{label:"開頭是",value:"StartsWith"},{label:"開頭不是",value:"NotStartsWith"},{label:"結尾是",value:"EndsWith"},{label:"結尾不是",value:"NotEndsWith"},{label:"組織從屬",value:"OrgAffiliation"}]}],At=[{lang:"zh-CHS",resource:[{label:"大于",value:">"},{label:"大于等于",value:">="},{label:"等于",value:"=="},{label:"不等于",value:"!="},{label:"小于",value:"<"},{label:"小于等于",value:"<="},{label:"为空",value:"==null"},{label:"不为空",value:"!=null"},{label:"包含",value:"Contains"},{label:"不包含",value:"NotContains"},{label:"开头是",value:"StartsWith"},{label:"开头不是",value:"NotStartsWith"},{label:"结尾是",value:"EndsWith"},{label:"结尾不是",value:"NotEndsWith"},{label:"组织从属",value:"OrgAffiliation"}]},{lang:"en",resource:[{label:"GreaterThan",value:">"},{label:"GreaterOrEqual",value:">="},{label:"Equal",value:"=="},{label:"NotEqual",value:"!="},{label:"LessThan",value:"<"},{label:"LessOrEqual",value:"<="},{label:"IsNull",value:"==null"},{label:"NotNull",value:"!=null"},{label:"Contains",value:"Contains"},{label:"NotContains",value:"NotContains"},{label:"StartsWith",value:"StartsWith"},{label:"NotStartsWith",value:"NotStartsWith"},{label:"EndsWith",value:"EndsWith"},{label:"NotEndsWith",value:"NotEndsWith"},{label:"OrgAffiliation",value:"OrgAffiliation"}]},{lang:"zh-CHT",resource:[{label:"大於",value:">"},{label:"大於等於",value:">="},{label:"等於",value:"=="},{label:"不等於",value:"!="},{label:"小於",value:"<"},{label:"小於等於",value:"<="},{label:"為空",value:"==null"},{label:"不為空",value:"!=null"},{label:"包含",value:"Contains"},{label:"不包含",value:"NotContains"},{label:"開頭是",value:"StartsWith"},{label:"開頭不是",value:"NotStartsWith"},{label:"結尾是",value:"EndsWith"},{label:"結不尾是",value:"NotEndsWith"},{label:"組織從屬",value:"OrgAffiliation"}]}],Rt=[{lang:"zh-CHS",resource:[{label:"并且",value:"&&"},{label:"或者",value:"||"}]},{lang:"en",resource:[{label:"And",value:"&&"},{label:"Or",value:"||"}]},{lang:"zh-CHT",resource:[{label:"並且",value:"&&"},{label:"或者",value:"||"}]}],Pt=["(","((","(((","(((("],Lt=[")","))",")))","))))"],Bt=[60,240,80,90,60,60,50];se(It=_t,Wt=Ct=function(){}),It.prototype=null===Wt?Object.create(Wt):(jt.prototype=Wt.prototype,new jt);function jt(){this.constructor=It}function _t(){var e=null!==Ct&&Ct.apply(this,arguments)||this;return e.sysorgData=null,e}var k=function(){this.treeInfo=new Vt},Vt=function(){},Wt=function(){},b=(Ht.getPath=function(e){return e<10?"000"+e:10<=e&&e<100?"00"+e:100<=e&&e<1e3?"0"+e:e+""},Ht.getOperator=function(e){return"String"==e||"Date"==e||"DateTime"==e?Ot:"Decimal"==e||"Integer"==e||"Byte"==e||"Binary"==e?At:Mt},Ht.convertExpr=function(e){var t,n,a="";return e&&(t=0,n=e.length,e.forEach(function(e){if(++t<n)if("=="==e.operator||"!="==e.operator||">"==e.operator||">="==e.operator||"<"==e.operator||"<="==e.operator)a=a+e.lbracket+e.computeField+e.operator+e.value+e.rbracket+e.relation;else switch(e.operator){case"equal":a=a+e.lbracket+e.computeField+'=="'+e.value+'"'+e.rbracket+e.relation;break;case"notequal":a=a+e.lbracket+e.computeField+'!="'+e.value+'"'+e.rbracket+e.relation;break;case"==null":a=a+e.lbracket+e.computeField+"==null"+e.rbracket+e.relation;break;case"!=null":a=a+e.lbracket+e.computeField+"!=null"+e.rbracket+e.relation;break;case"Contains":a=a+e.lbracket+"DefaultFunction.Contains("+e.computeField+',"'+e.value+'")'+e.rbracket+e.relation;break;case"NotContains":a=a+e.lbracket+"DefaultFunction.NotContains("+e.computeField+',"'+e.value+'")'+e.rbracket+e.relation;break;case"StartsWith":a=a+e.lbracket+"DefaultFunction.StartsWith("+e.computeField+',"'+e.value+'")'+e.rbracket+e.relation;break;case"NotStartsWith":a=a+e.lbracket+"DefaultFunction.NotStartsWith("+e.computeField+',"'+e.value+'")'+e.rbracket+e.relation;break;case"EndsWith":a=a+e.lbracket+"DefaultFunction.EndsWith("+e.computeField+',"'+e.value+'")'+e.rbracket+e.relation;break;case"NotEndsWith":a=a+e.lbracket+"DefaultFunction.NotEndsWith("+e.computeField+',"'+e.value+'")'+e.rbracket+e.relation;break;case"OrgAffiliation":a=a+e.lbracket+"DefaultExtendFunction.OrgAffiliation("+e.computeField+',"'+e.value+'")'+e.rbracket+e.relation}else if("=="==e.operator||"!="==e.operator||">"==e.operator||">="==e.operator||"<"==e.operator||"<="==e.operator)a=a+e.lbracket+e.computeField+e.operator+e.value+e.rbracket;else switch(e.operator){case"equal":a=a+e.lbracket+e.computeField+'=="'+e.value+'"'+e.rbracket;break;case"notequal":a=a+e.lbracket+e.computeField+'!="'+e.value+'"'+e.rbracket;break;case"==null":a=a+e.lbracket+e.computeField+"==null"+e.rbracket;break;case"!=null":a=a+e.lbracket+e.computeField+"!=null"+e.rbracket;break;case"Contains":a=a+e.lbracket+"DefaultFunction.Contains("+e.computeField+',"'+e.value+'")'+e.rbracket;break;case"NotContains":a=a+e.lbracket+"DefaultFunction.NotContains("+e.computeField+',"'+e.value+'")'+e.rbracket;break;case"StartsWith":a=a+e.lbracket+"DefaultFunction.StartsWith("+e.computeField+',"'+e.value+'")'+e.rbracket;break;case"NotStartsWith":a=a+e.lbracket+"DefaultFunction.NotStartsWith("+e.computeField+',"'+e.value+'")'+e.rbracket;break;case"EndsWith":a=a+e.lbracket+"DefaultFunction.EndsWith("+e.computeField+',"'+e.value+'")'+e.rbracket;break;case"NotEndsWith":a=a+e.lbracket+"DefaultFunction.NotEndsWith("+e.computeField+',"'+e.value+'")'+e.rbracket;break;case"OrgAffiliation":a=a+e.lbracket+"DefaultExtendFunction.OrgAffiliation("+e.computeField+',"'+e.value+'")'+e.rbracket}})),a},Ht);function Ht(){}var Gt={Header_LeftBracket:"左括号",Headrt_Data:"数据",Headrt_Operator:"操作符",Headrt_Value:"值",Headrt_RightBracket:"右括号",Headrt_Relation:"关系",Data_Code:"编号",Data_Name:"名称",Relation_And:"并且",Relation_Or:"或者",Notice_Success:"表达式生成！",Notice_NotComplate:"请确保必填项填写完整！",Notice_SuccessClear:"条件已清空！",Notice_PleaseSelectRow:"请先选中一行条件！",Notice_NotAllowSelectRoot:"禁止选择根节点！",Error_Data_Oper:"条件第 %s 行 数据、操作符 未设置！",Error_Data:"条件第 %s 行 数据 未设置！",Error_Oper:"条件第 %s 行 操作符 未设置！",Error_ValueNotSet:"条件第 %s 行 值 未设置！",Error_Bracket:"条件括号闭合异常, 请检查！",Button_Advaned:"高级表达式",Button_Save:"确定",Button_Reset:"重置",Button_Cancel:"取消",HeadButton_Up:"上移",HeadButton_Down:"下移",HeadButton_Top:"置顶",HeadButton_Bottom:"置底",ComputeExpression:"条件表达式",AdvancedExpression:"高级表达式",Advanced_Save:"保存",Advanced_Cancel:"取消",DeleteConfirmLeft:"确认删除第 ",DeleteConfirmRight:" 行数据?"},zt={Header_LeftBracket:"LBracket",Headrt_Data:"Data",Headrt_Operator:"Operator",Headrt_Value:"Value",Headrt_RightBracket:"RBracket",Headrt_Relation:"Relation",Data_Code:"Code",Data_Name:"Name",Relation_And:"And",Relation_Or:"Or",Notice_Success:"Expression generation!",Notice_NotComplate:"Please ensure that the required items are completed!",Notice_SuccessClear:"Clear successfully!",Notice_PleaseSelectRow:"Please select a line of conditions first!",Notice_NotAllowSelectRoot:"Root node selection is not allowed!",Error_Data_Oper:"The data and operator in line %s are not set!",Error_Data:"The data in line %s is not set!",Error_Oper:"The operator in line %s is not set!",Error_ValueNotSet:"The value in line %s is not set!",Error_Bracket:"Conditional bracket closure exception, please check!",Button_Advaned:"Advanced",Button_Save:"Save",Button_Reset:"Reset",Button_Cancel:"Cancel",HeadButton_Up:"Up",HeadButton_Down:"Down",HeadButton_Top:"Top",HeadButton_Bottom:"Bottom",ComputeExpression:"Conditional Expression",AdvancedExpression:"Advanced Expression",Advanced_Save:"Save",Advanced_Cancel:"Cancel",DeleteConfirmLeft:"Delete row ",DeleteConfirmRight:"?"},Yt={Header_LeftBracket:"左括弧",Headrt_Data:"數據",Headrt_Operator:"操作符",Headrt_Value:"值",Headrt_RightBracket:"右括弧",Headrt_Relation:"關係",Data_Code:"編號",Data_Name:"名稱",Relation_And:"並且",Relation_Or:"或者",Notice_Success:"運算式生成！",Notice_NotComplate:"請確保必填項填寫完整！",Notice_SuccessClear:"條件已清空！",Notice_PleaseSelectRow:"請先選中一行條件！",Notice_NotAllowSelectRoot:"禁止選擇根節點！",Error_Data_Oper:"條件第 %s 行 數據、操作符 未設定！",Error_Data:"條件第 %s 行 數據 未設定！",Error_Oper:"條件第 %s 行 操作符 未設定！",Error_ValueNotSet:"條件第 %s 行 值 未設定！",Error_Bracket:"條件括弧閉合异常，請檢查！",Button_Advaned:"高級運算式",Button_Save:"確定",Button_Reset:"重置",Button_Cancel:"取消",HeadButton_Up:"上移",HeadButton_Down:"下移",HeadButton_Top:"上移",HeadButton_Bottom:"置底",ComputeExpression:"條件運算式",AdvancedExpression:"高級運算式",Advanced_Save:"保存",Advanced_Cancel:"取消",DeleteConfirmLeft:"確認删除第 ",DeleteConfirmRight:" 行數據?"},qt=(Ut.prototype.transform=function(e){return this.resource[e]||e},Ut);function Ut(e){e=localStorage.getItem("languageCode")||"zh-CHS",this.languageCode=e||"zh-CHS","en"==this.languageCode?this.resource=zt:"zh-CHT"==this.languageCode?this.resource=Yt:this.resource=Gt}E.prototype.ngOnChanges=function(){var t=this;this.allOpers=this.allOpers.filter(function(e){return!t.ignoredOperators.includes(e.value)}),this.strOpers=this.strOpers.filter(function(e){return!t.ignoredOperators.includes(e.value)}),this.numOpers=this.numOpers.filter(function(e){return!t.ignoredOperators.includes(e.value)})},E.prototype.ngOnInit=function(){var e,t;null!=this.Function&&null==this.http&&(this.http=this.Function.getHttp());try{this.contextEntity.sexpr&&(this.conditions=JSON.parse(this.contextEntity.sexpr),0==this.conditions.length)&&(this.conditions=[{computeField:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:""}])}catch(s){this.conditions=[{computeField:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:""}]}if(null!=this.contextEntity.newSchemaMap&&0<this.contextEntity.newSchemaMap.size?this.initNewSchema(this.contextEntity.injectedEntities,this.contextEntity.newSchemaMap):this.contextEntity.injectedEntities&&0<this.contextEntity.injectedEntities.length&&this.initSchema(this.contextEntity.injectedEntities,this.contextEntity.schemaMap),this.conditionViews=this.toView(this.conditions),0<this.entities.length)for(var n in this.conditions){this.operators[n]=this.allOpers;try{for(var a=F(this.entities),i=a.next();!i.done;i=a.next()){var r=i.value;if(r.chainCode==this.conditions[n].computeField){"String"==r.type||"Date"==r.type||"DateTime"==r.type?this.operators[n]=this.strOpers:"Decimal"==r.type||"Integer"==r.type||"Byte"==r.type||"Binary"==r.type?this.operators[n]=this.numOpers:this.operators[n]=this.allOpers;break}}}catch(o){e={error:o}}finally{try{i&&!i.done&&(t=a["return"])&&t.call(a)}finally{if(e)throw e.error}}}this.operators=C(this.operators),this.propertyList={columns:[{field:"code",title:this.local.transform("Data_Code"),width:130,hAlign:"left",align:"left",formatter:null},{field:"name",title:this.local.transform("Data_Name"),width:130,hAlign:"left",align:"left",formatter:null}],items:this.entities,treeInfo:{loadDataType:"all",layerType:"pathcode",dataField:"treeInfo",pathField:"path",layerField:"layer",isDetailField:"isDetail",onlySelectLeaf:!1,parentField:"parentElement",treeDataIsInit:!1},displayType:"TreeList"},this.hideExpressButton?this.hideExpress={display:"none"}:this.hideExpress={display:"block"}},E.prototype.insert=function(e){this.conditionViews.splice(e+1,0,{computeField:"",fieldName:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:"",sysorgData:{showText:"",bindingData:{id:"",name:""}}}),this.operators.splice(e+1,0,this.allOpers),this.operators=C(this.operators)},E.prototype.remove=function(t){var n=this,e=t+1;this.msgSer.confirm(this.local.transform("DeleteConfirmLeft")+e+this.local.transform("DeleteConfirmRight")).subscribe(function(e){e&&(0!=t||1<n.conditionViews.length?(n.conditionViews.splice(t,1),n.operators.splice(t,1)):(n.conditionViews=[{computeField:"",fieldName:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:"",sysorgData:{showText:"",bindingData:{id:"",name:""}}}],n.conditions=[{computeField:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:""}],n.operators=[],n.operators.push(n.allOpers),n.operators=C(n.operators),n.notifyService[n.notifies[3].type]({msg:n.notifies[3].msg})),n.currentView)&&t===n.currentView.index&&(n.currentView=null)})},E.prototype.selected=function(e){this.currentView=e},E.prototype.isSelected=function(e){return null!=this.currentView&&this.currentView.index===e},E.prototype.selectChange=function(e){var t,n=e.index,a=this.conditionViews[n].operator;this.allowSelectRoot||String(e.data.data.chainCode).includes(".")?(this.conditionViews[n].computeField=e.data.data.chainCode,"String"==e.data.data.type||"Date"==e.data.data.type||"DateTime"==e.data.data.type?(this.operators[n]=this.strOpers,0<this.operators[n].filter(function(e){return e.value==a}).length?this.conditionViews[n].operator=a:this.conditionViews[n].operator=this.strOpers[0].value):"Decimal"==e.data.data.type||"Integer"==e.data.data.type||"Byte"==e.data.data.type||"Binary"==e.data.data.type?(this.operators[n]=this.numOpers,0<this.operators[n].filter(function(e){return e.value==a}).length?this.conditionViews[n].operator=a:this.conditionViews[n].operator=this.numOpers[0].value):(this.operators[n]=this.allOpers,0<this.operators[n].filter(function(e){return e.value==a}).length?this.conditionViews[n].operator=a:this.conditionViews[n].operator=this.allOpers[0].value),this.operators=C(this.operators)):(this.notifyService[this.notifies[5].type]({msg:this.notifies[5].msg}),t=this,setTimeout(function(){t.conditionViews[n].computeField="",t.conditionViews[n].fieldName=""},300))},E.prototype.selectRemove=function(e){this.conditionViews[e.index].computeField=""},E.prototype.toTop=function(){this.isSelectRow()&&(this.conditionViews.unshift(this.currentView.condition),this.conditionViews.splice(this.currentView.index+1,1),this.operators.unshift(this.operators[this.currentView.index]),this.operators.splice(this.currentView.index+1,1),this.currentView.index=0,this.operators=C(this.operators))},E.prototype.toUp=function(){var e,t,n,a;this.isSelectRow()&&0!=this.currentView.index&&this.currentView&&(t=this.currentView.index,n=this.conditionViews.splice(t,1),a=this.operators.splice(t,1),(e=this.conditionViews).splice.apply(e,C([t-1,0],n)),(e=this.operators).splice.apply(e,C([t-1,0],a)),this.currentView.index=t-1,this.operators=C(this.operators))},E.prototype.toDown=function(){var e,t,n,a;!this.isSelectRow()||this.currentView.index>=this.conditionViews.length-1||this.currentView&&(t=this.currentView.index,n=this.conditionViews.splice(t,1),a=this.operators.splice(t,1),(e=this.conditionViews).splice.apply(e,C([t+1,0],n)),(e=this.operators).splice.apply(e,C([t+1,0],a)),this.currentView.index=t+1,this.operators=C(this.operators))},E.prototype.toBottom=function(){this.isSelectRow()&&(this.conditionViews.push(this.currentView.condition),this.conditionViews.splice(this.currentView.index,1),this.operators.push(this.operators[this.currentView.index]),this.operators.splice(this.currentView.index,1),this.currentView.index=this.conditionViews.length-1,this.operators=C(this.operators))},E.prototype.isSelectRow=function(){return null!=this.currentView||(this.notifyService[this.notifies[4].type]({msg:this.notifies[4].msg}),!1)},E.prototype.confirm=function(){var e=new Qe,t=this.toData(this.conditionViews);e.expr=b.convertExpr(t),""==e.expr&&this.result.emit(null),e.sexpr=JSON.stringify(t),this.result.emit(JSON.stringify(e)),this.closeModalEmitter.emit("close")},E.prototype.reset=function(){this.conditionViews=[{computeField:"",fieldName:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:"",sysorgData:{showText:"",bindingData:{id:"",name:""}}}]},E.prototype.cancle=function(){this.closeModalEmitter.emit("close")},E.prototype.openAdvancedExpression=function(){var t=this;this.openAdvancedExpr().then(function(e){t.result.emit(e)}),this.closeModalEmitter.emit("close")},E.prototype.openAdvancedExpr=function(){var e=this;return new Promise(function(t){var n=e.compFactRes.resolveComponentFactory(wt).create(e.injector),a=(n.instance.expressionEntity=e.contextEntity,n.instance.setting=e.advencedSetting,n.instance.expressionEntity.expr=b.convertExpr(e.conditionViews),n.instance.expressionEntity.sexpr="",e.modalService.show(n,{title:e.local.transform("AdvancedExpression"),width:1325.5,height:728,buttons:[{text:e.local.transform("Advanced_Cancel"),cls:"btn btn-secondary",handle:function(){a.close()}},{text:e.local.transform("Advanced_Save"),cls:"btn btn-primary",handle:function(){n.instance.getExprWithCheck().then(function(e){e.closeable&&(n.instance.result.emit(e.expression),a.close())})}}],showButtons:!0}));n.instance.result.subscribe(function(e){return t(e)})})},E.prototype.initSchema=function(e,a){var i,r,s=this;e&&0<e.length&&(this.entities=[],i=new Map,r=1,e.forEach(function(t){var e=a.get(t.schemaName);switch(t.injectedType){case m.EntitySet:break;case m.EntityType:var n=e.entityTypes.find(function(e){return e.name==t.injectedName});s.initEntityType(n,null,e,i,r)}r++}))},E.prototype.initEntityType=function(e,t,n,a,i){var r=this;if(!e)return null;var s=new k,o=(s.id=this.oldId++,s.code=e.name,s.name=e.description,s.chainCode=e.name,s.chainName=e.description,s.type="Type",t?(s.parentId=t.id,s.chainCode=t.chainCode+"."+e.name,s.chainName=t.chainName+"."+e.description,s.treeInfo.layer=t.treeInfo.layer+1,s.treeInfo.path=t.treeInfo.path+b.getPath(i)):(s.parentId=null,s.treeInfo.layer=1,s.treeInfo.path=b.getPath(1)),s.data={chainName:""},this.entities.push(s),a.set(e.name+e.id,m.EntityType),1);e.properties.forEach(function(e){var t=new k;t.id=r.oldId++,t.code=e.name,t.name=e.description,t.chainCode=s.chainCode+"."+e.name,t.chainName=s.chainName+"."+e.description,t.type=e.type,t.treeInfo.layer=s.treeInfo.layer+1,t.treeInfo.path=s.treeInfo.path+b.getPath(o),o++,t.parentId=s.id,t.data={chainName:""},r.entities.push(t)}),e.navigationProperties.forEach(function(t){var e;a.get(t.name+t.navigationId)?((e=new k).id=r.oldId++,e.code=t.name,e.name=t.description,e.chainCode=s.chainCode+"."+t.name,e.chainName=s.chainName+"."+t.description,e.type=t.type.toString(),e.treeInfo.layer=s.treeInfo.layer+1,e.treeInfo.path=s.treeInfo.path+b.getPath(o),e.parentId=s.id,e.data={chainName:""},r.entities.push(e)):t.type!=h.EntitySet&&t.type==h.EntityType&&(e=n.entityTypes.find(function(e){return e.id==t.navigationId&&e.name==t.name}),r.initEntityType(e,s,n,a,o+1)),o++})},E.prototype.initNewSchema=function(e,a){var i,r,s=this;e&&0<e.length&&(this.entities=[],i=new Map,r=1,e.forEach(function(t){var e=a.get(t.schemaName);switch(t.injectedType){case m.EntitySet:break;case m.EntityType:var n=e.entityTypes.find(function(e){return e.code==t.injectedName});s.initNewEntityType(n,null,e,i,r)}r++}))},E.prototype.initNewEntityType=function(e,t,n,a,i){var r=this;if(!e)return null;var s=new k,o=(s.id=this.newId++,s.code=e.code,s.name=e.name,s.chainCode=e.code,s.chainName=e.name,s.type="Type",t?(s.parentId=t.id,s.chainCode=t.chainCode+"."+e.code,s.chainName=t.chainName+"."+e.name,s.treeInfo.layer=t.treeInfo.layer+1,s.treeInfo.path=t.treeInfo.path+b.getPath(i)):(s.parentId=null,s.treeInfo.layer=1,s.treeInfo.path=b.getPath(1)),s.data={chainName:""},this.entities.push(s),a.set(e.code+e.name,m.EntityType),1);e.properties.forEach(function(e){var t=new k;t.id=r.newId++,t.code=e.code,t.name=e.name,t.chainCode=s.chainCode+"."+e.code,t.chainName=s.chainName+"."+e.name,t.type=e.dataType,t.treeInfo.layer=s.treeInfo.layer+1,t.treeInfo.path=s.treeInfo.path+b.getPath(o),o++,t.parentId=s.id,t.data={chainName:""},r.entities.push(t)}),e.navigationProperties.forEach(function(t){var e;a.get(t.code+t.navigationName)?((e=new k).id=r.newId++,e.code=t.code,e.name=t.name,e.chainCode=s.chainCode+"."+t.code,e.chainName=s.chainName+"."+t.name,e.type=t.navigationType,e.treeInfo.layer=s.treeInfo.layer+1,e.treeInfo.path=s.treeInfo.path+b.getPath(o),e.parentId=s.id,e.data={chainName:""},r.entities.push(e)):t.navigationType!=d.EntitySet&&t.navigationType==d.EntityType&&(e=n.entityTypes.find(function(e){return e.code==t.navigationName}),r.initNewEntityType(e,s,n,a,o+1)),o++})},E.prototype.afterSelectSysorg=function(e){var t,n,a=e.index;if(this.conditionViews[a].value="",0<e.orgs.length)try{for(var i=F(e.orgs),r=i.next();!r.done;r=i.next()){var s=r.value;this.conditionViews[a].value=""==this.conditionViews[a].value?s.id:this.conditionViews[a].value+","+s.id}}catch(o){t={error:o}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(t)throw t.error}}},E.prototype.toView=function(l){var c=[];if(null!=l&&0<l.length){var e,t=function(a){var e,t,i;if(c[a]={computeField:l[a].computeField,fieldName:l[a].computeField,value:l[a].value,sysorgData:{showText:l[a].value,bindingData:{id:"",name:""}},operator:l[a].operator,lbracket:l[a].lbracket,rbracket:l[a].rbracket,relation:l[a].relation},p.entities&&0<p.entities.length)try{for(var n=F(p.entities),r=n.next();!r.done;r=n.next()){var s=r.value;if(c[a].computeField==s.chainCode){c[a].fieldName=s.chainName;break}}}catch(o){e={error:o}}finally{try{r&&!r.done&&(t=n["return"])&&t.call(n)}finally{if(e)throw e.error}}"OrgAffiliation"==c[a].operator&&(i=c[a].value.split(","),p.http.post(N.convertPath("/api/runtime/sys/v1.0/expressextend/orgNames"),i).toPromise().then(function(e){c[a].sysorgData.showText=e.names;var t,n=e.names.split(",");for(t in i)c[a].sysorgData.bindingData.id=""==c[a].sysorgData.bindingData.id?i[t]:c[a].sysorgData.bindingData.id+","+i[t],c[a].sysorgData.bindingData.name=""==c[a].sysorgData.bindingData.name?n[a]:c[a].sysorgData.bindingData.name+","+n[a]})["catch"](function(){}))},p=this;for(e in l)t(e)}return c},E.prototype.toData=function(e){var t=[];if(null!=e&&0<e.length)for(var n in e)t[n]={computeField:e[n].computeField,value:"==null"==e[n].operator||"!=null"==e[n].operator?null:e[n].value,operator:e[n].operator,lbracket:e[n].lbracket,rbracket:e[n].rbracket,relation:e[n].relation};return t},E.decorators=[{type:y.Component,args:[{selector:"svc-compute-rule",template:'<div style="background: #f0ffffe0;width: 100%;">\r\n  <button type="button" class="k-button k-button-icon k-flat" (click)="toUp()"><span\r\n      class="k-icon k-i-arrow-up"></span></button>\r\n  <button type="button" class="k-button k-button-icon k-flat" (click)="toDown()"><span\r\n      class="k-icon k-i-arrow-down"></span></button>\r\n  <button type="button" class="k-button k-button-icon k-flat" (click)="toTop()"><span\r\n      class="k-icon k-i-arrow-end-up"></span></button>\r\n  <button type="button" class="k-button k-button-icon k-flat" (click)="toBottom()"><span\r\n      class="k-icon k-i-arrow-end-down"></span></button>\r\n</div>\r\n<div class="table-header">\r\n  <table class="table table-bordered" style="margin-bottom: 0">\r\n    <colgroup>\r\n      <col *ngFor="let s of ColumnSize" [style.width]=" s + \'px\'">\r\n    </colgroup>\r\n    <thead>\r\n      <tr>\r\n        <th align="center"><b>&nbsp;{{this.headers[0]}}</b></th>\r\n        <th align="center"><b>&nbsp;{{this.headers[1]}}</b></th>\r\n        <th align="center"><b>&nbsp;{{this.headers[2]}}</b></th>\r\n        <th align="center"><b>&nbsp;{{this.headers[3]}}</b></th>\r\n        <th align="center"><b>&nbsp;{{this.headers[4]}}</b></th>\r\n        <th align="center"><b>&nbsp;{{this.headers[5]}}</b></th>\r\n        <th></th>\r\n      </tr>\r\n    </thead>\r\n  </table>\r\n</div>\r\n<div class="table-body flex-fill" style="overflow: auto;height:70%" #tablebodybox>\r\n  <perfect-scrollbar [config]="{}">\r\n    <table class="table table-bordered">\r\n      <colgroup>\r\n        <col *ngFor="let s of ColumnSize" [style.width]=" s + \'px\'">\r\n      </colgroup>\r\n      <tbody>\r\n        <tr *ngFor="let view of conditionViews; let index=index;" (click)="selected({\'index\':index, \'condition\': view})"\r\n          [class.selected]="isSelected(index)">\r\n          <td>\r\n            <select class="form-control filter-select" [(ngModel)]="view.lbracket" name="lbracket">\r\n              <option *ngFor="let item of LeftBracket" [value]="item">{{ item }}</option>\r\n            </select>\r\n          </td>\r\n          <td>\r\n            <farris-combo-lookup [(ngModel)]="view.fieldName" [idField]="\'chainName\'" [textField]="\'chainName\'"\r\n              [valueField]="\'chainName\'" [displayType]="\'LOOKUPTREELIST\'" [data]="propertyList" [nosearch]="false"\r\n              [enableFilterRow]="true" (selectChange)="selectChange({\'index\':index, \'data\': $event})"\r\n              (clear)="selectRemove({\'index\':index})"></farris-combo-lookup>\r\n          </td>\r\n          <td>\r\n            <select class="form-control filter-select" [(ngModel)]="view.operator" name="operator">\r\n              <option *ngFor="let item of operators[index]" [value]="item.value">{{item.label}}</option>\r\n            </select>\r\n          </td>\r\n          <td>\r\n            <input *ngIf="view.operator!=\'OrgAffiliation\'" type="text" style="width:100%" [(ngModel)]="view.value"\r\n              name="value" class="k-textbox">\r\n            <sys-farris-tree-help *ngIf="view.operator==\'OrgAffiliation\'" [displayTxt]="view.sysorgData.showText"\r\n              [singleSelect]="false" [sourceType]="\'org\'" [async]="true" [bindingData]="view.sysorgData.bindingData"\r\n              (afterConfirm)="afterSelectSysorg({\'index\':index, \'orgs\': $event})"></sys-farris-tree-help>\r\n          </td>\r\n          <td>\r\n            <select class="form-control filter-select" [(ngModel)]="view.rbracket" name="rbracket">\r\n              <option *ngFor="let item of RightBracket" [value]="item">{{ item }}</option>\r\n            </select>\r\n          </td>\r\n          <td>\r\n            <select class="form-control filter-select" [(ngModel)]="view.relation" name="relation">\r\n              <option *ngFor="let item of relaOpers" [value]="item.value">{{ item.label }}</option>\r\n            </select>\r\n          </td>\r\n          <td>\r\n            <div>\r\n              <button type="button" (click)="insert(index)" class="k-button k-button-icon k-flat">\r\n                <span class="k-icon k-i-plus"></span>\r\n              </button>\r\n              <button type="button" (click)="remove(index)" class="k-button k-button-icon k-flat">\r\n                <span class="k-icon k-i-delete"></span>\r\n              </button>\r\n            </div>\r\n          </td>\r\n        </tr>\r\n      </tbody>\r\n    </table>\r\n  </perfect-scrollbar>\r\n</div>\r\n<div class="modal-footer footer">\r\n  <a [ngStyle]="hideExpress" href="javascript: void(0);" (click)="openAdvancedExpression()"> {{this.buttons[0]}} ＞</a>\r\n  <div class="f-utils-fill" style="text-align: right;">\r\n    <button type="button" class="btn f-btn-mr btn-secondary" (click)="cancle()">{{this.buttons[3]}}</button>\r\n    <button type="button" class="btn f-btn-mr btn-secondary" (click)="reset()">{{this.buttons[2]}}</button>\r\n    <button type="button" class="btn f-btn-mr btn-primary" (click)="confirm()">{{this.buttons[1]}}</button>\r\n  </div>\r\n</div>\r\n\r\n\x3c!-- 当前组件无法使用HttpClient，通过此组件间接使用（围魏救赵） --\x3e\r\n<div style="width: 0px;height: 0px;display: none;">\r\n  <app-expr-func-grid #Function></app-expr-func-grid>\r\n</div>',styles:[".filter-select{width:100%;padding-left:0;padding-right:0;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.selected{background:#c2e4ff}.footer{position:absolute;bottom:0;left:0;right:0;justify-content:flex-start}"]}]}],E.ctorParameters=function(){return[{type:te.MessagerService},{type:ne.NotifyService},{type:y.Injector},{type:ee.BsModalService},{type:y.ComponentFactoryResolver}]},E.propDecorators={Function:[{type:y.ViewChild,args:["Function"]}],result:[{type:y.Output}],closeModalEmitter:[{type:y.Output}],contextEntity:[{type:y.Input}],conditions:[{type:y.Input}],hideExpressButton:[{type:y.Input}],advencedSetting:[{type:y.Input}],ignoredOperators:[{type:y.Input}],allowSelectRoot:[{type:y.Input}]};var Jt=E;function E(e,t,n,a,i){var r=this;this.msgSer=e,this.notifyService=t,this.injector=n,this.modalService=a,this.compFactRes=i,this.result=new y.EventEmitter,this.closeModalEmitter=new y.EventEmitter,this.contextEntity=new qe,this.conditions=[{computeField:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:""}],this.hideExpressButton=!1,this.advencedSetting={},this.ignoredOperators=[],this.allowSelectRoot=!0,this.oldId=10001,this.newId=20001,this.ColumnSize=Bt,this.LeftBracket=Pt,this.RightBracket=Lt,this.relaOpers=[],this.allOpers=[],this.strOpers=[],this.numOpers=[],this.notifies={},this.headers=[],this.buttons=[],this.headButtons=[],this.entities=[],this.operators=[],this.currentView=null,this.conditionViews=[],this.localeId=localStorage.getItem("languageCode")||"zh-CHS",this.local=new qt(this.localeId),this.notifies={1:{type:"success",msg:this.local.transform("Notice_Success")},2:{type:"error",msg:this.local.transform("Notice_NotComplate")},3:{type:"success",msg:this.local.transform("Notice_SuccessClear")},4:{type:"warning",msg:this.local.transform("Notice_PleaseSelectRow")},5:{type:"error",msg:this.local.transform("Notice_NotAllowSelectRoot")}},Rt.forEach(function(e){e.lang==r.localeId&&(r.relaOpers=e.resource)}),Mt.forEach(function(e){e.lang==r.localeId&&(r.allOpers=e.resource)}),this.allOpers=this.allOpers.filter(function(e){return!r.ignoredOperators.includes(e.value)}),Ot.forEach(function(e){e.lang==r.localeId&&(r.strOpers=e.resource)}),this.strOpers=this.strOpers.filter(function(e){return!r.ignoredOperators.includes(e.value)}),At.forEach(function(e){e.lang==r.localeId&&(r.numOpers=e.resource)}),this.numOpers=this.numOpers.filter(function(e){return!r.ignoredOperators.includes(e.value)}),this.headers[0]=this.local.transform("Header_LeftBracket"),this.headers[1]=this.local.transform("Headrt_Data"),this.headers[2]=this.local.transform("Headrt_Operator"),this.headers[3]=this.local.transform("Headrt_Value"),this.headers[4]=this.local.transform("Headrt_RightBracket"),this.headers[5]=this.local.transform("Headrt_Relation"),this.buttons[0]=this.local.transform("Button_Advaned"),this.buttons[1]=this.local.transform("Button_Save"),this.buttons[2]=this.local.transform("Button_Reset"),this.buttons[3]=this.local.transform("Button_Cancel"),this.headButtons[0]=this.local.transform("HeadButton_Up"),this.headButtons[1]=this.local.transform("HeadButton_Down"),this.headButtons[2]=this.local.transform("HeadButton_Top"),this.headButtons[3]=this.local.transform("HeadButton_Bottom"),N.init()}var $t=new y.InjectionToken("MY_MONACO_EDITOR_CONFIG"),Kt={onInit:"onInit",onChange:"onChange",onTouched:"onTouched"},Qt=(Zt.prototype.addEvent=function(e){z.assign(this._events,e)},Zt.prototype.fireEvent=function(e){this._events[e.eventName].emit(e)},Zt.decorators=[{type:y.Injectable}],Zt);function Zt(){this.eventNames=Object.keys(Kt),this._events={}}var Xt,en=!1,tn={provide:G.NG_VALUE_ACCESSOR,useExisting:y.forwardRef(function(){return an}),multi:!0},nn={baseUrl:"assets",defaultOptions:{scrollBeyondLastLine:!1}},an=(Object.defineProperty(x.prototype,"options",{get:function(){return this._options},set:function(e){this._options=Object.assign({},this.config.defaultOptions,e),this._editor&&(this._editor.dispose(),this.initMonaco(e))},enumerable:!0,configurable:!0}),x.prototype.insertWord=function(e){var t,n,a;e&&e!=undefined&&""!=e&&(t={lineNumber:1,column:1},a=n=void 0,this._editor&&(n=this._editor.getSelection(),t=this._editor.getPosition()),a=null!=n?new monaco.Range(n.startLineNumber,n.startColumn,n.endLineNumber,n.endColumn):new monaco.Range(t.lineNumber,t.column,t.lineNumber,t.column),this._editor.executeEdits("my-source",[{identifier:{major:1,minor:1},range:a,text:e,forceMoveMarkers:!0}]))},x.prototype.ngOnInit=function(){var i=this,t=(en?Xt.then(function(){i.initMonaco(i.options)}):(en=!0,Xt=new Promise(function(e){var t,n=N.convertPath("/platform/common/web/caf"),a=function(){window.require.config({paths:{vs:n+"/monaco/vs"}}),window.require(["vs/editor/editor.main"],function(){i.onMonacoLoad(),i.initMonaco(i.options),e()})};window.require?a():((t=document.createElement("script")).type="text/javascript",t.src=n+"/monaco/vs/loader.js",t.onload=a,document.body.appendChild(t))})),this);this.eventService.currentExpression().subscribe(function(e){t._editor!=undefined&&t.insertWord(e)}),this.eventService.clearExpression().subscribe(function(){t._editor!=undefined&&t._editor.setValue("")})},x.prototype.onMonacoLoad=function(){var e="foo.json";monaco.languages.json.jsonDefaults.setDiagnosticsOptions({validate:!0,schemas:[{uri:"http://myserver/foo-schema.json",fileMatch:[e],schema:{type:"object",properties:{p1:{"enum":["v1","v2"]},p2:{$ref:"http://myserver/bar-schema.json"}}}},{uri:"http://myserver/bar-schema.json",fileMatch:[e],schema:{type:"object",properties:{q1:{"enum":["x1","x2"]}}}}]})},x.prototype.ngOnDestroy=function(){this._editor&&(this._editor.dispose(),this._editor=undefined)},x.prototype.initMonaco=function(e){var t=this;monaco.editor.defineTheme("BlackTheme",{base:"vs",inherit:!0,rules:[{background:"3E414A"}],colors:{"editor.background":"#F7F8FB","editor.lineHighlightBackground":"#F7F8FB"}}),monaco.editor.setTheme("BlackTheme"),this._editor=monaco.editor.create(this._editorComponent.nativeElement,e),this._editor.setValue(this._value),this._editor.onDidChangeModelContent(function(){return t.onChangeModelContentHandler()}),this._editor.onDidBlurEditorText(function(){return t.onBlurEditorTextHandler()}),this.codeEditorEventService.fireEvent({eventName:Kt.onInit,target:this,editor:this._editor})},x.prototype.onChangeModelContentHandler=function(){var e=this,t=this._editor.getValue();this.zone.run(function(){return e.value=t})},x.prototype.onBlurEditorTextHandler=function(){this.onTouchedHandler()},Object.defineProperty(x.prototype,"value",{get:function(){return this._value},set:function(e){e!==this.value&&(this._value=e),this.onChangeHandler(this.value)},enumerable:!0,configurable:!0}),x.prototype.localEditor=function(){this.writeValue("test")},x.prototype.writeValue=function(e){var t=this;this.value=e||"",setTimeout(function(){t._editor&&t._editor.setValue(t._value)})},x.prototype.registerOnChange=function(e){this.onChangeHandler(this)},x.prototype.registerOnTouched=function(e){this.onTouchedHandler()},x.decorators=[{type:y.Component,args:[{selector:"app-my-monaco-editor",template:'<div class="editor h-100" #codeEditor></div>',providers:[tn,Qt,{provide:$t,useValue:nn}],styles:[":host{display:block;height:100%}.editor{background-color:#f7f8fb}"]}]}],x.ctorParameters=function(){return[{type:y.NgZone},{type:undefined,decorators:[{type:y.Inject,args:[$t]}]},{type:Qt},{type:n}]},x.propDecorators={_editorComponent:[{type:y.ViewChild,args:["codeEditor"]}],onInit:[{type:y.Output}],onChange:[{type:y.Output}],onTouched:[{type:y.Output}],options:[{type:y.Input,args:["options"]}]},x);function x(e,t,n,a){var i=this,r=(this.zone=e,this.config=t,this.codeEditorEventService=n,this.eventService=a,this.change=0,this._value="",this.onChangeHandler=function(e){i.codeEditorEventService.fireEvent({eventName:Kt.onChange,target:i,data:e})},this.onTouchedHandler=function(){i.codeEditorEventService.fireEvent({eventName:Kt.onTouched,target:i})},this);n.eventNames.forEach(function(e){r[e]=new y.EventEmitter;e=z.pick(r,e);n.addEvent(e)})}rn.forRoot=function(e){return{ngModule:rn,providers:[{provide:$t,useValue:e=void 0===e?{}:e}]}},rn.decorators=[{type:y.NgModule,args:[{imports:[H.CommonModule],exports:[an],entryComponents:[an],declarations:[an],providers:[Qt]}]}];nn=rn;function rn(){}D.prototype.ngOnInit=function(){var t=this;this.eventService.subClearFuncSelect().subscribe(function(){}),this.columns=[{field:"name",title:this.localePipe.transform("FunctionSemanticName"),width:3},{field:"key",title:this.localePipe.transform("FunctionName"),width:2},{field:"param",title:this.localePipe.transform("FunctionParameter"),width:3}],this.currentFuncTabType!=T.Extend?this.findFunctionByTabType(this.currentFuncTabType):this.getExtendFunc().subscribe(function(e){t.funcExtend=N.formatExtend(e),null!=t.showFuncExtendItems&&(t.funcExtend=t.funcExtend.filter(function(e){return t.showFuncExtendItems.includes(e.key)})),t.funcExtend=C(t.funcExtend),t.findFunctionByTabType(t.currentFuncTabType)},function(){t.funcExtend=[],t.findFunctionByTabType(t.currentFuncTabType)})},D.prototype.findFunctionByTabType=function(e){switch(e){case T.Advanced:this.findFunctionByType(T.Advanced);break;case T.Analytical:this.findFunctionByType(T.Analytical);break;case T.DateTime:this.findFunctionByType(T.DateTime);break;case T.Math:this.findFunctionByType(T.Math);break;case T.String:this.findFunctionByType(T.String);break;case T.Translate:this.findFunctionByType(T.Translate);break;case T.Extend:this.findFunctionByType(T.Extend)}},D.prototype.findFunctionByType=function(t){var n=this;this.items=[],t==T.Extend?this.funcExtend.forEach(function(e){e={key:e.key,name:e.name,type:e.type,className:e.className,description:e.description,param:n.getParamStr(e.params),params:e.params,isLatestExtendFunc:e.isLatestExtendFunc};n.items.push(e)}):this.standardFunctions.forEach(function(e){e.type==t&&(e={key:e.key,name:e.type==T.Advanced?e.key:e.name,type:e.type,className:e.className,description:e.description,param:n.getParamStr(e.params),params:e.params,isLatestExtendFunc:e.isLatestExtendFunc},n.items.push(e))}),this.items=C(this.items)},D.prototype.getParamStr=function(e){for(var t="(",n=0;n<e.length-1;n++)t=t+e[n].key+",";return 0!=e.length?t=t+e[e.length-1].key+")":t+=")",t},D.prototype.ngOnChanges=function(){},D.prototype.ondblclickRow=function(e){this.dbclickInsert.emit(e.rowData)},D.prototype.selectRowChange=function(e){this.selectFuncRow.emit(e.data)},D.prototype.getExtendFunc=function(){return this.http.get(N.convertPath("/api/runtime/sys/v1.0/express/globalFuncs"))},D.prototype.getHttp=function(){return this.http},D.decorators=[{type:y.Component,args:[{selector:"app-expr-func-grid",template:'<div style="height: 100%;width: 100%;">\r\n  <farris-datagrid #dg [idField]="\'key\'" [columns]="columns" [data]="items" [fit]="true" [fitColumns]="true"\r\n    [striped]="true" [keepSelect]="false" [multiSelect]="false" [showHeader]="true" [headerHeight]="30"\r\n    [pagination]="false" (dblclickRow)="ondblclickRow($event)" (selectChanged)="selectRowChange($event)">\r\n  </farris-datagrid>\r\n</div>',styles:[""]}]}],D.ctorParameters=function(){return[{type:n},{type:y.Injector},{type:X.HttpClient}]},D.propDecorators={dg:[{type:y.ViewChild,args:["dg"]}],currentFuncTabType:[{type:y.Input}],funcExtend:[{type:y.Input}],showFuncExtendItems:[{type:y.Input}],selectFuncRow:[{type:y.Output}],dbclickInsert:[{type:y.Output}]};var sn=D;function D(e,t,n){this.eventService=e,this.injector=t,this.http=n,this.currentFuncTabType="String",this.funcExtend=[],this.showFuncExtendItems=null,this.selectFuncRow=new y.EventEmitter,this.dbclickInsert=new y.EventEmitter,this.columns=[],this.datas=[],this.standardFunctions=[],this.allFunctions=[],this.items=[],this.functions=new Be,this.localeId=localStorage.getItem("languageCode")||"zh-CHS",this.localePipe=new u(this.localeId),this.allFunctions=this.functions.get(this.localeId)||this.functions.get("zh-CHS");for(var a=0;a<this.allFunctions.length;a++)Nt.includes(this.allFunctions[a].key)||this.standardFunctions.push(this.allFunctions[a])}ln.prototype.ngOnInit=function(){this.eventService.subClearVarSelect().subscribe()},ln.prototype.ngOnChanges=function(){null==this.elements?this.items=[{name:this.localePipe.transform("VariableContextParameter"),id:ye},{name:this.localePipe.transform("VariableSessionValue"),id:pe}]:(this.elements.includes("Context")&&this.items.push({name:this.localePipe.transform("VariableContextParameter"),id:ye}),this.elements.includes("Session")&&this.items.push({name:this.localePipe.transform("VariableSessionValue"),id:pe})),this.items=C(this.items)},ln.prototype.selectRowChange=function(e){this.eventService.subClearVarSelect().subscribe(),this.dg.clearCheckeds(),this.selectVarRow.emit(e.data)},ln.decorators=[{type:y.Component,args:[{selector:"app-expression-var-grid",template:'<farris-datagrid #dg\r\n[idField]="\'id\'"\r\n[height]="268"\r\n[columns]="columns" \r\n[data]="items"\r\n[fit]="true"\r\n[fitColumns]="true"\r\n[striped]="false"\r\n[showHeader]="false"\r\n[headerHeight]="30"\r\n[pagination]="false"\r\n(selectChanged)="selectRowChange($event)"\r\n>\r\n</farris-datagrid>\r\n',styles:[""]}]}],ln.ctorParameters=function(){return[{type:n}]},ln.propDecorators={elements:[{type:y.Input}],dg:[{type:y.ViewChild,args:["dg"]}],selectVarRow:[{type:y.Output}]};var on=ln;function ln(e){this.eventService=e,this.selectVarRow=new y.EventEmitter,this.columns=[{field:"name",title:"名称"}],this.items=[],this.localeId=localStorage.getItem("languageCode")||"zh-CHS",this.localePipe=new u(this.localeId)}S.prototype.ngOnInit=function(){this.eventService.subClearVarSelect().subscribe()},S.prototype.ngOnChanges=function(){if(this.eventService.subClearVarSelect().subscribe(),null!=this.elements&&0==this.elements.length)this.items=[];else switch(this.currentVarType){case ye:this.items=this.contextEntities;break;case pe:this.items=this.sessionEntities}},S.prototype.ondblclickRow=function(e){this.dbclickInsert.emit(e.rowData)},S.prototype.selectRowChange=function(e){this.selectVarInfoRow.emit(e.data)},S.decorators=[{type:y.Component,args:[{selector:"app-expression-var-info-grid",template:'<farris-datagrid #dg [idField]="\'key\'" [height]="268" [width]="430" [columns]="columns" [data]="items" [fit]="true"\r\n  [fitColumns]="true" [striped]="false" [showHeader]="true" [enableFilterRow]="true" [pagination]="false"\r\n  [resizeColumn]="false" (dblclickRow)="ondblclickRow($event)" (selectChanged)="selectRowChange($event)">\r\n</farris-datagrid>',styles:[""]}]}],S.ctorParameters=function(){return[{type:n}]},S.propDecorators={dg:[{type:y.ViewChild,args:["dg"]}],currentVarType:[{type:y.Input}],elements:[{type:y.Input}],contextEntities:[{type:y.Input}],sessionEntities:[{type:y.Input}],selectVarInfoRow:[{type:y.Output}],dbclickInsert:[{type:y.Output}]};var cn=S;function S(e){this.eventService=e,this.currentVarType=pe,this.contextEntities=[],this.sessionEntities=[],this.selectVarInfoRow=new y.EventEmitter,this.dbclickInsert=new y.EventEmitter,this.items=[],this.columns=[],this.localeId=localStorage.getItem("languageCode")||"zh-CHS",this.localePipe=new u(this.localeId),this.columns=[{field:"key",title:this.localePipe.transform("VariableName"),width:"20%",filter:!0},{field:"name",title:this.localePipe.transform("VariableSemanticNameValue"),width:"30%",filter:!0}]}yn.prototype.ngOnInit=function(){this.columns=[{field:"code",width:100,title:this.localePipe.transform("HelpCode"),filter:!0},{field:"name",width:100,title:this.localePipe.transform("HelpName"),filter:!0},{field:"description",width:60,title:this.localePipe.transform("HelpDesc"),template:this.help}],this.items=this.smartHelp},yn.prototype.openHelp=function(t){var n=this;this.smartHelp.find(function(e){return e.code==t.code}).instance.show().then(function(e){n.insertValue.emit(e)})},yn.prototype.selectRowChange=function(e){this.selectHelpRow.emit(e.data)},yn.decorators=[{type:y.Component,args:[{selector:"app-expression-smart-help-grid",template:'<farris-datagrid [idField]="\'code\'" [height]="268" [width]="650" [columns]="columns" [data]="items" [fit]="true"\r\n  [fitColumns]="true" [striped]="true" [showHeader]="true" [pagination]="false" [resizeColumn]="false"\r\n  (selectChanged)="selectRowChange($event)">\r\n</farris-datagrid>\r\n\r\n<ng-template #help let-ctx>\r\n  <div class="input-group" style="margin-top: 2px;margin-bottom: 2px;position: relative;height: 80%;">\r\n    <button class="btn btn-outline-secondary"\r\n      style="border: none;margin-left: 80%;position: absolute;right: 0;top:0;height: 100%;" type="button"\r\n      (click)="openHelp(ctx.rowData)"><span class="f-icon f-icon-windows"></span></button>\r\n  </div>\r\n</ng-template>',styles:[""]}]}],yn.ctorParameters=function(){return[]},yn.propDecorators={help:[{type:y.ViewChild,args:["help"]}],smartHelp:[{type:y.Input}],selectHelpRow:[{type:y.Output}],insertValue:[{type:y.Output}]};var pn=yn;function yn(){this.smartHelp=[],this.selectHelpRow=new y.EventEmitter,this.insertValue=new y.EventEmitter,this.items=[],this.columns=[],this.localeId=localStorage.getItem("languageCode")||"zh-CHS",this.localePipe=new u(this.localeId)}R.prototype.setEditPattern=function(e){this.exprEditMode=e},R.prototype.buildExpression=function(s,o,l){void 0===s&&(s=!1),void 0===o&&(o=!1),void 0===l&&(l=!1);var c=this;return new Promise(function(t){var n,a,e,i,r=this;c.exprEditMode==p.Conditional&&null!=c.exprEntity.expr&&""!=c.exprEntity.expr&&(null==c.exprEntity.sexpr||""==c.exprEntity.sexpr)||c.exprEditMode==p.Advanced?((n=c.compFactRes.resolveComponentFactory(wt).create(c.injector)).instance.expressionEntity=c.exprEntity,n.instance.setting=c.setting,n.instance.readOnly=s,n.instance.semantic=l,a=c.modalService.show(n,{title:c.ExpressionTitle,width:1325.5,height:728,buttons:[{text:c.ExpressionCancel,cls:"btn btn-secondary",handle:function(){a.close()}},{text:c.ExpressionSave,cls:"btn btn-primary",handle:function(){return oe(r,void 0,void 0,function(){return le(this,function(e){return n.instance.getExprWithCheck().then(function(e){e.closeable&&(l?n.instance.result.emit(JSON.stringify({expression:e.expression,semantic:e.semantic})):n.instance.result.emit(e.expression),a.close())}),[2]})})}}],showButtons:!0}),n.instance.result.subscribe(function(e){return t(e)})):((e=c.compFactRes.resolveComponentFactory(Jt).create(c.injector)).instance.contextEntity=c.exprEntity,e.instance.hideExpressButton=o,e.instance.advencedSetting=c.setting,i=c.modalService.show(e,c.computeEditorSetting),e.instance.closeModalEmitter.subscribe(function(e){return i.close()}),e.instance.result.subscribe(function(e){return t(e)}))})},R.prototype.setComputeSize=function(e,t){void 0===t&&(t=450),this.computeEditorSetting.width=e=void 0===e?990:e,this.computeEditorSetting.height=t},R.prototype.addExpressionText=function(e){try{var t,n,a=JSON.parse(e);a?(a.expr?(t=N.getTokens(a.expr),n=N.getVariableMap(this.exprEntity.contextEntities,this.exprEntity.sessionEntities,"Key2Name"),this.exprEntity.expr=N.toSemantic(t,this.exprEntity.functionEntities,n,this.functionSuffixs)):(this.GetUnCamelParse(a),this.exprEntity.expr=a.expr),null!=a.sexpr?this.exprEntity.sexpr=a.sexpr:this.exprEntity.sexpr=""):(this.exprEntity.expr=e,this.exprEntity.sexpr="[]")}catch(i){this.exprEntity.expr=e,this.exprEntity.sexpr="[]"}},R.prototype.addContext=function(t){this.exprEntity.contextEntities=this.exprEntity.contextEntities.filter(function(e){return e.key!==t.key}),this.exprEntity.contextEntities.push(t)},R.prototype.addSession=function(t){this.exprEntity.sessionEntities=this.exprEntity.sessionEntities.filter(function(e){return e.key!==t.key}),this.exprEntity.sessionEntities.push(t)},R.prototype.addFunction=function(t){this.exprEntity.functionEntities=this.exprEntity.functionEntities.filter(function(e){return e.key!==t.key}),this.functionSuffixs.includes(t.keyFront)||this.functionSuffixs.push(t.keyFront),this.exprEntity.functionEntities.push(t)},R.prototype.addFunctions=function(e){var t=this;JSON.parse(e).forEach(function(e){t.addFunction(e)})},R.prototype.addExtendFunction=function(t){null!=t&&(t.key=t.token,t.isLatestExtendFunc=!0,t.type=T.Extend,this.exprEntity.functionEntities=this.exprEntity.functionEntities.filter(function(e){return e.key!==t.token}),this.exprEntity.functionEntities.push(t))},R.prototype.addInjectedEntity=function(e,t,n,a){var i={name:e||n,schemaName:t=void 0===t?"CommonObject":t,injectedName:n,injectedType:a=void 0===a?m.EntityType:a};this.exprEntity.injectedEntities=this.exprEntity.injectedEntities.filter(function(e){return e.name!==i.name}),this.exprEntity.injectedEntities.push(i)},R.prototype.addNewSchema=function(e,t){e?this.exprEntity.newSchemaMap.set(e,t):alert("Please Input NewSchema Name!")},R.prototype.addCommonObjectOfNewSchema=function(e){var t=this.exprEntity.newSchemaMap.get("CommonObject")||new _e;this.adapter.convertCOOfNewSchema(e).forEach(function(e){t.entityTypes.push(e);e={code:e.name+"s",name:"",entityType:e.code};t.entitySets.push(e)}),this.addNewSchema("CommonObject",t)},R.prototype.addCDTOfNewSchema=function(e){var t=this,n=this.exprEntity.newSchemaMap.get("CDT")||new _e;e.forEach(function(e){n.entityTypes.push(t.adapter.convertCDTOfNewSchema(e))}),this.addNewSchema("CDT",n)},R.prototype.clearInjectedEntity=function(){this.exprEntity.injectedEntities=[]},R.prototype.clearNewSchema=function(){this.exprEntity.newSchemaMap.clear()},R.prototype.clearContext=function(){this.exprEntity.contextEntities=[]},R.prototype.clearSession=function(){this.exprEntity.sessionEntities=[]},R.prototype.getInjector=function(){return this.injector},R.prototype.toSemantic=function(e,t,n,a,i,r,s){var o,l;void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===a&&(a=[]),void 0===i&&(i=[]),void 0===r&&(r=new Map),void 0===s&&(s=new Map);try{var c=JSON.parse(e);if(!c)return e;if(c.expr){var p=N.getTokens(c.expr),y=this.exprEntity.functionEntities,u=["DefaultFunction","Math","DefaultExtendFunctionProxy"],d=(a&&a.forEach(function(t){(y=y.filter(function(e){return e.key!==t.key})).push(t),u.includes(t.keyFront)||u.push(t.keyFront)}),t);if(null!=d)try{for(var m=F(Ft[this.localeId]),h=m.next();!h.done;h=m.next())!function(t){(d=d.filter(function(e){return e.key!=t.key})).splice(0,0,t)}(h.value)}catch(g){o={error:g}}finally{try{h&&!h.done&&(l=m["return"])&&l.call(m)}finally{if(o)throw o.error}}var f=N.getVariableMap(d,n,"Key2Name");return N.toSemantic(p,y,f,u)}}catch(k){return e}},R.prototype.getDataPropertyAndVariables=function(e){return N.getIdentifierAndVariable(e,this.exprEntity,this.localePipe)},R.prototype.addSmartHelpEntity=function(t){this.exprEntity.smartHelpEntities=this.exprEntity.smartHelpEntities.filter(function(e){return e.code!==t.code}),this.exprEntity.smartHelpEntities.push(t)},R.prototype.addSchema=function(e,t){e?this.exprEntity.schemaMap.set(e,t):alert("Please Input Schema Name!")},R.prototype.addCommonObject=function(e){var t=this.exprEntity.schemaMap.get("CommonObject")||new rt;this.adapter.convertCO(e).forEach(function(e){t.entityTypes.push(e);e={name:e.name+"s",entityType:e.name,description:e.description};t.entitySets.push(e)}),this.addSchema("CommonObject",t)},R.prototype.addCDT=function(e){var t=this,n=this.exprEntity.schemaMap.get("CDT")||new rt;e.forEach(function(e){n.entityTypes.push(t.adapter.convertCDT(e))}),this.addSchema("CDT",n)},R.prototype.addWindowWidth=function(e){},R.prototype.showChildTableSymbol=function(e){null!=(e=void 0===e?!0:e)&&(this.setting.DataModel_ShowChildSymbol=e)},R.prototype.selectDataArea=function(e){null!=(e=void 0===e?Ke.DataModel:e)&&(this.setting.DataArea_DefaultSelect=e)},R.prototype.setSetting=function(e){null!=(e=void 0===e?{}:e)&&(null!=e.Function_ShowExtend&&(this.setting.Function_ShowExtend=e.Function_ShowExtend),this.setting.DataArea_Variable_Context=e.DataArea_Variable_Context,this.setting.DataArea_Variable_Session=e.DataArea_Variable_Session)},R.prototype.GetUnCamelParse=function(e){for(var t in e){"object"==typeof e[t]&&this.GetUnCamelParse(e[t]);var n=e[t];delete e[t],e[this.ConvertToUncamel(t)]=n}},R.prototype.ConvertToUncamel=function(e){if(0<e.length){for(var t=e.length,n="",a=0;a<t;a++)n+=0==a?e[a].toLowerCase():e[a];return n}},R.decorators=[{type:y.Injectable}],R.ctorParameters=function(){return[{type:y.Injector},{type:y.ApplicationRef},{type:y.ComponentFactoryResolver},{type:X.HttpClient}]};var un=R;function R(e,t,n,a){this.injector=e,this.applicationRef=t,this.compFactRes=n,this.http=a,this.functionSuffixs=["DefaultFunction","Math","DefaultExtendFunctionProxy"],this.exprEditMode=p.Advanced,this.exprEntity=new qe,this.setting=new Ue,this.adapter=new Tt,this.functions=new Be,this.computeEditorSetting={title:"条件表达式",width:990,height:450,showButtons:!1},N.init(),this.modalService=e.get(ee.BsModalService),this.localeId=localStorage.getItem("languageCode")||"zh-CHS",this.localePipe=new u(this.localeId),this.computePipe=new qt(this.localeId),this.computeEditorSetting.title=this.computePipe.transform("ComputeExpression"),this.exprEntity.functionEntities=this.functions.get(this.localeId)||this.functions.get("zh-CHS"),this.ExpressionTitle=this.localePipe.transform("ExpressionTitle"),this.ExpressionSave=this.localePipe.transform("ExpressionSave"),this.ExpressionCancel=this.localePipe.transform("ExpressionCancel");var i,r,t=Ft[this.localeId];if(null!=t){var s=this;try{for(var o=F(t),l=o.next();!l.done;l=o.next())!function(t){s.exprEntity.contextEntities=s.exprEntity.contextEntities.filter(function(e){return e.key!=t.key}),s.exprEntity.contextEntities.splice(0,0,t)}(l.value)}catch(c){i={error:c}}finally{try{l&&!l.done&&(r=o["return"])&&r.call(o)}finally{if(i)throw i.error}}}}P.prototype.ngOnInit=function(){this.change()},P.prototype.ngOnChanges=function(){var t=this;this.allOpers=this.allOpers.filter(function(e){return!t.ignoredOperators.includes(e.value)}),this.strOpers=this.strOpers.filter(function(e){return!t.ignoredOperators.includes(e.value)}),this.numOpers=this.numOpers.filter(function(e){return!t.ignoredOperators.includes(e.value)}),null!=this.Function&&null==this.http&&(this.http=this.Function.getHttp()),this.change()},P.prototype.change=function(){if(null==this.type){try{this.expressionEntity=JSON.parse(this.text)}catch(t){this.expressionEntity.expr="",this.expressionEntity.sexpr=JSON.stringify([{computeField:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:""}])}if(null==this.expressionEntity.sexpr||""==this.expressionEntity.sexpr)this.type=p.Advanced,this.initAdvancedExpress();else{this.type=p.Conditional;try{this.conditions=JSON.parse(this.expressionEntity.sexpr),0==this.conditions.length&&(this.conditions=[{computeField:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:""}])}catch(n){this.conditions=[{computeField:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:""}]}this.initComputeExpress(),this.conditionViews=this.toView(this.conditions),this.conditionViews=C(this.conditionViews)}}else if(this.type==p.Conditional){if(null==this.conditionStr)try{this.expressionEntity=JSON.parse(this.text);try{var e=JSON.parse(this.expressionEntity.sexpr);0!=e.length&&(this.conditions=e)}catch(a){this.conditions=[{computeField:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:""}]}}catch(i){this.expressionEntity={expr:"",sexpr:JSON.stringify([{computeField:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:""}])}}else this.expressionEntity=JSON.parse(this.conditionStr),this.conditions=JSON.parse(this.expressionEntity.sexpr);this.initComputeExpress(),this.conditionViews=this.toView(this.conditions),this.conditionViews=C(this.conditionViews)}else if(this.type==p.Advanced){if(null==this.expressionStr)if(null!=this.conditionStr)try{this.expressionEntity=JSON.parse(this.conditionStr),this.expressionEntity.sexpr=""}catch(r){this.expressionEntity={expr:"",sexpr:""}}else try{this.expressionEntity=JSON.parse(this.text),this.expressionEntity.sexpr=""}catch(i){this.expressionEntity={expr:"",sexpr:""}}else this.expressionEntity=JSON.parse(this.expressionStr);this.initAdvancedExpress()}},P.prototype.initAdvancedExpress=function(){this.expressionText=JSON.stringify(this.expressionEntity),this.ContextVariables=this.advancedContexts,this.SessionVariables=this.advancedSessions,this.ExtendFunctions=this.advancedFunctions,null!=this.injectSchemaName&&null!=this.injectNameInSchema&&(this.InjectName=this.injectName||this.injectNameInSchema,this.InjectSchemaName=this.injectSchemaName,this.InjectNameInSchema=this.injectNameInSchema,this.InjectedType=this.injectedType,null!=this.newSchema&&null!=this.newSchemaName?(this.isNewSchema=!0,this.NewSchemaName=this.newSchemaName,this.NewSchema=this.newSchema):null!=this.schema&&null!=this.schemaName&&(this.isNewSchema=!1,this.SchemaName=this.schemaName,this.Schema=this.schema))},P.prototype.initComputeExpress=function(){var e,t,n,a,i;if(null!=this.injectSchemaName&&null!=this.injectNameInSchema&&((n=new Ze).name=this.injectName||this.injectNameInSchema,n.schemaName=this.injectSchemaName,n.injectedName=this.injectNameInSchema,n.injectedType=this.injectedType,null!=this.newSchema&&null!=this.newSchemaName?((a=new Map).set(this.newSchemaName,this.newSchema),(i=[]).push(n),this.initNewSchema(i,a)):null!=this.schema&&null!=this.schemaName&&((a=new Map).set(this.schemaName,this.schema),(i=[]).push(n),this.initSchema(i,a))),0<this.entities.length)for(var r in this.conditionViews){this.operators[r]=this.allOpers;try{for(var s=F(this.entities),o=s.next();!o.done;o=s.next()){var l=o.value;if(l.chainCode==this.conditionViews[r].computeField){"String"==l.type||"Date"==l.type||"DateTime"==l.type?this.operators[r]=this.strOpers:"Decimal"==l.type||"Integer"==l.type||"Byte"==l.type||"Binary"==l.type?this.operators[r]=this.numOpers:this.operators[r]=this.allOpers;break}}}catch(c){e={error:c}}finally{try{o&&!o.done&&(t=s["return"])&&t.call(s)}finally{if(e)throw e.error}}}this.operators=C(this.operators),this.propertyList={columns:[{field:"code",title:this.local.transform("Data_Code"),width:130,hAlign:"left",align:"left",formatter:null},{field:"name",title:this.local.transform("Data_Name"),width:130,hAlign:"left",align:"left",formatter:null}],items:this.entities,treeInfo:{loadDataType:"all",layerType:"pathcode",dataField:"treeInfo",pathField:"path",layerField:"layer",isDetailField:"isDetail",onlySelectLeaf:!1,parentField:"parentElement",treeDataIsInit:!1},displayType:"TreeList"}},P.prototype.changeType=function(){this.type==p.Conditional?(this.conditionStr=this.getExprOfConditional().text,this.type=p.Advanced):this.type==p.Advanced&&(this.expressionStr=this.getExprOfAdvanced().text,this.type=p.Conditional),this.change()},P.prototype.getExpr=function(){return this.conditionStr=null,this.expressionStr=null,this.type==p.Conditional?this.getExprOfConditional():this.type==p.Advanced?this.getExprOfAdvanced():void 0},P.prototype.getExprOfAdvanced=function(){return{type:this.type,text:this.Advanced.getExpr()}},P.prototype.getExprOfConditional=function(){var e,n,t=new Qe,a=this.toData(this.conditionViews);return t.expr=b.convertExpr(a),""==t.expr?{type:this.type,text:null}:(0<(e=this.checkCondition(this.conditionViews)).length&&(n="",e.forEach(function(e,t){n=0==t?e:n+"<br>"+e}),this.notifyService.error({msg:n,timeout:5e3})),t.sexpr=JSON.stringify(a),{type:this.type,text:JSON.stringify(t)})},P.prototype.checkCondition=function(e){var t,n,a=[];if(0<e.length)for(var i in e)null==e[i].fieldName||""==e[i].fieldName?null==e[i].operator||""==e[i].operator?a.push(this.local.transform("Error_Data_Oper").replace("%s",String(Number(i)+1))):a.push(this.local.transform("Error_Data").replace("%s",String(Number(i)+1))):null!=e[i].operator&&""!=e[i].operator||a.push(this.local.transform("Error_Oper").replace("%s",String(Number(i)+1)));if(0<e.length){var r=0;try{for(var s=F(e),o=s.next();!o.done;o=s.next())var l=o.value,r=r+l.lbracket.length-l.rbracket.length}catch(p){t={error:p}}finally{try{o&&!o.done&&(n=s["return"])&&n.call(s)}finally{if(t)throw t.error}}0!=r&&a.push(this.local.transform("Error_Bracket"))}if(0<e.length)for(var i in e){var c=e[i].operator;null!=e[i].value&&""!=e[i].value||">"!=c&&">="!=c&&"<"!=c&&"<="!=c&&"Contains"!=c&&"NotContains"!=c&&"StartsWith"!=c&&"NotStartsWith"!=c&&"EndsWith"!=c&&"NotEndsWith"!=c||a.push(this.local.transform("Error_ValueNotSet").replace("%s",String(Number(i)+1)))}return a},P.prototype.checkAdvanced=function(){return this.type==p.Advanced?this.Advanced.checkExpression():new Promise(function(e){e(null)})},P.prototype.getAdvancedCheckResult=function(){var e;return this.type==p.Advanced?(e=this,new Promise(function(t){e.Advanced.getExprWithCheck().then(function(e){return t(e.closeable)})})):new Promise(function(e){e(!0)})},P.prototype.insert=function(e){this.conditionViews.splice(e+1,0,{computeField:"",fieldName:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:"",sysorgData:{showText:"",bindingData:{id:"",name:""}}}),this.operators.splice(e+1,0,this.allOpers),this.operators=C(this.operators)},P.prototype.remove=function(t){var n=this,e=t+1;this.msgSer.confirm(this.local.transform("DeleteConfirmLeft")+e+this.local.transform("DeleteConfirmRight")).subscribe(function(e){e&&(0!=t||1<n.conditionViews.length?(n.conditionViews.splice(t,1),n.operators.splice(t,1)):(n.conditionViews=[{computeField:"",fieldName:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:"",sysorgData:{showText:"",bindingData:{id:"",name:""}}}],n.conditions=[{computeField:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:""}],n.operators=[],n.operators.push(n.allOpers),n.operators=C(n.operators),n.notifyService[n.notifies[3].type]({msg:n.notifies[3].msg})),n.currentView)&&t===n.currentView.index&&(n.currentView=null)})},P.prototype.selected=function(e){this.currentView=e},P.prototype.isSelected=function(e){return null!=this.currentView&&this.currentView.index===e},P.prototype.selectChange=function(e){var t,n=e.index,a=this.conditionViews[n].operator;this.allowSelectRoot||String(e.data.data.chainCode).includes(".")?(this.conditionViews[n].computeField=e.data.data.chainCode,"String"==e.data.data.type||"Date"==e.data.data.type||"DateTime"==e.data.data.type?(this.operators[n]=this.strOpers,0<this.operators[n].filter(function(e){return e.value==a}).length?this.conditionViews[n].operator=a:this.conditionViews[n].operator=this.strOpers[0].value):"Decimal"==e.data.data.type||"Integer"==e.data.data.type||"Byte"==e.data.data.type||"Binary"==e.data.data.type?(this.operators[n]=this.numOpers,0<this.operators[n].filter(function(e){return e.value==a}).length?this.conditionViews[n].operator=a:this.conditionViews[n].operator=this.numOpers[0].value):(this.operators[n]=this.allOpers,0<this.operators[n].filter(function(e){return e.value==a}).length?this.conditionViews[n].operator=a:this.conditionViews[n].operator=this.allOpers[0].value),this.operators=C(this.operators)):(this.notifyService[this.notifies[5].type]({msg:this.notifies[5].msg}),t=this,setTimeout(function(){t.conditionViews[n].computeField="",t.conditionViews[n].fieldName=""},300))},P.prototype.selectRemove=function(e){this.conditionViews[e.index].computeField=""},P.prototype.afterSelectSysorg=function(e){var t,n,a=e.index;if(this.conditionViews[a].value="",0<e.orgs.length)try{for(var i=F(e.orgs),r=i.next();!r.done;r=i.next()){var s=r.value;this.conditionViews[a].value=""==this.conditionViews[a].value?s.id:this.conditionViews[a].value+","+s.id}}catch(o){t={error:o}}finally{try{r&&!r.done&&(n=i["return"])&&n.call(i)}finally{if(t)throw t.error}}},P.prototype.toView=function(l){var c=[];if(null!=l&&0<l.length){var e,t=function(a){var e,t,i;if(c[a]={computeField:l[a].computeField,fieldName:l[a].computeField,value:l[a].value,sysorgData:{showText:l[a].value,bindingData:{id:"",name:""}},operator:l[a].operator,lbracket:l[a].lbracket,rbracket:l[a].rbracket,relation:l[a].relation},p.entities&&0<p.entities.length)try{for(var n=F(p.entities),r=n.next();!r.done;r=n.next()){var s=r.value;if(c[a].computeField==s.chainCode){c[a].fieldName=s.chainName;break}}}catch(o){e={error:o}}finally{try{r&&!r.done&&(t=n["return"])&&t.call(n)}finally{if(e)throw e.error}}"OrgAffiliation"==c[a].operator&&(i=c[a].value.split(","),p.http.post(N.convertPath("/api/runtime/sys/v1.0/expressextend/orgNames"),i).toPromise().then(function(e){c[a].sysorgData.showText=e.names;var t,n=e.names.split(",");for(t in i)c[a].sysorgData.bindingData.id=""==c[a].sysorgData.bindingData.id?i[t]:c[a].sysorgData.bindingData.id+","+i[t],c[a].sysorgData.bindingData.name=""==c[a].sysorgData.bindingData.name?n[a]:c[a].sysorgData.bindingData.name+","+n[a]})["catch"](function(){}))},p=this;for(e in l)t(e)}return c},P.prototype.toData=function(e){var t=[];if(null!=e&&0<e.length)for(var n in e)t[n]={computeField:e[n].computeField,value:"==null"==e[n].operator||"!=null"==e[n].operator?null:e[n].value,operator:e[n].operator,lbracket:e[n].lbracket,rbracket:e[n].rbracket,relation:e[n].relation};return t},P.prototype.toTop=function(){this.isSelectRow()&&(this.conditionViews.unshift(this.currentView.condition),this.conditionViews.splice(this.currentView.index+1,1),this.operators.unshift(this.operators[this.currentView.index]),this.operators.splice(this.currentView.index+1,1),this.currentView.index=0,this.operators=C(this.operators))},P.prototype.toUp=function(){var e,t,n,a;this.isSelectRow()&&0!=this.currentView.index&&this.currentView&&(t=this.currentView.index,n=this.conditionViews.splice(t,1),a=this.operators.splice(t,1),(e=this.conditionViews).splice.apply(e,C([t-1,0],n)),(e=this.operators).splice.apply(e,C([t-1,0],a)),this.currentView.index=t-1,this.operators=C(this.operators))},P.prototype.toDown=function(){var e,t,n,a;!this.isSelectRow()||this.currentView.index>=this.conditionViews.length-1||this.currentView&&(t=this.currentView.index,n=this.conditionViews.splice(t,1),a=this.operators.splice(t,1),(e=this.conditionViews).splice.apply(e,C([t+1,0],n)),(e=this.operators).splice.apply(e,C([t+1,0],a)),this.currentView.index=t+1,this.operators=C(this.operators))},P.prototype.toBottom=function(){this.isSelectRow()&&(this.conditionViews.push(this.currentView.condition),this.conditionViews.splice(this.currentView.index,1),this.operators.push(this.operators[this.currentView.index]),this.operators.splice(this.currentView.index,1),this.currentView.index=this.conditionViews.length-1,this.operators=C(this.operators))},P.prototype.isSelectRow=function(){return null!=this.currentView||(this.notifyService[this.notifies[4].type]({msg:this.notifies[4].msg}),!1)},P.prototype.initSchema=function(e,a){var i,r,s=this;e&&0<e.length&&(this.entities=[],i=new Map,r=1,e.forEach(function(t){var e=a.get(t.schemaName);if(null!=e){switch(t.injectedType){case m.EntitySet:break;case m.EntityType:var n=e.entityTypes.find(function(e){return e.name==t.injectedName});s.initEntityType(n,null,e,i,r)}r++}}))},P.prototype.initEntityType=function(e,t,n,a,i){var r=this;if(!e)return null;var s=new k,o=(s.id=this.oldId++,s.code=e.name,s.name=e.description,s.chainCode=e.name,s.chainName=e.description,s.type="Type",t?(s.parentId=t.id,s.chainCode=t.chainCode+"."+e.name,s.chainName=t.chainName+"."+e.description,s.treeInfo.layer=t.treeInfo.layer+1,s.treeInfo.path=t.treeInfo.path+b.getPath(i)):(s.parentId=null,s.treeInfo.layer=1,s.treeInfo.path=b.getPath(1),null!=this.injectName&&0!=this.injectName.length&&(s.chainCode=this.injectName,s.code=this.injectName)),s.data={chainName:""},this.entities.push(s),a.set(e.name+e.id,m.EntityType),1);e.properties.forEach(function(e){var t=new k;t.id=r.oldId++,t.code=e.name,t.name=e.description,t.chainCode=s.chainCode+"."+e.name,t.chainName=s.chainName+"."+e.description,t.type=e.type,t.treeInfo.layer=s.treeInfo.layer+1,t.treeInfo.path=s.treeInfo.path+b.getPath(o),o++,t.parentId=s.id,t.data={chainName:""},r.entities.push(t)}),e.navigationProperties.forEach(function(t){var e;a.get(t.name+t.navigationId)?((e=new k).id=r.oldId++,e.code=t.name,e.name=t.description,e.chainCode=s.chainCode+"."+t.name,e.chainName=s.chainName+"."+t.description,e.type=t.type.toString(),e.treeInfo.layer=s.treeInfo.layer+1,e.treeInfo.path=s.treeInfo.path+b.getPath(o),e.parentId=s.id,e.data={chainName:""},r.entities.push(e)):t.type!=h.EntitySet&&t.type==h.EntityType&&(e=n.entityTypes.find(function(e){return e.id==t.navigationId&&e.name==t.name}),r.initEntityType(e,s,n,a,o+1)),o++})},P.prototype.initNewSchema=function(e,a){var i,r,s=this;e&&0<e.length&&(this.entities=[],i=new Map,r=1,e.forEach(function(t){var e=a.get(t.schemaName);if(null!=e){switch(t.injectedType){case m.EntitySet:break;case m.EntityType:var n=e.entityTypes.find(function(e){return e.code==t.injectedName});s.initNewEntityType(n,null,e,i,r)}r++}}))},P.prototype.initNewEntityType=function(e,t,n,a,i){var r=this;if(!e)return null;var s=new k,o=(s.id=this.newId++,s.code=e.code,s.name=e.name,s.chainCode=e.code,s.chainName=e.name,s.type="Type",t?(s.parentId=t.id,s.chainCode=t.chainCode+"."+e.code,s.chainName=t.chainName+"."+e.name,s.treeInfo.layer=t.treeInfo.layer+1,s.treeInfo.path=t.treeInfo.path+b.getPath(i)):(s.parentId=null,s.treeInfo.layer=1,s.treeInfo.path=b.getPath(1),null!=this.injectName&&0!=this.injectName.length&&(s.chainCode=this.injectName,s.code=this.injectName)),s.data={chainName:""},this.entities.push(s),a.set(e.code+e.name,m.EntityType),1);e.properties.forEach(function(e){var t=new k;t.id=r.newId++,t.code=e.code,t.name=e.name,t.chainCode=s.chainCode+"."+e.code,t.chainName=s.chainName+"."+e.name,t.type=e.dataType,t.treeInfo.layer=s.treeInfo.layer+1,t.treeInfo.path=s.treeInfo.path+b.getPath(o),o++,t.parentId=s.id,t.data={chainName:""},r.entities.push(t)}),e.navigationProperties.forEach(function(t){var e;a.get(t.code+t.navigationName)?((e=new k).id=r.newId++,e.code=t.code,e.name=t.name,e.chainCode=s.chainCode+"."+t.code,e.chainName=s.chainName+"."+t.name,e.type=t.navigationType,e.treeInfo.layer=s.treeInfo.layer+1,e.treeInfo.path=s.treeInfo.path+b.getPath(o),e.parentId=s.id,e.data={chainName:""},r.entities.push(e)):t.navigationType!=d.EntitySet&&t.navigationType==d.EntityType&&(e=n.entityTypes.find(function(e){return e.code==t.navigationName}),r.initNewEntityType(e,s,n,a,o+1)),o++})},P.decorators=[{type:y.Component,args:[{selector:"app-compute-rule-editor",template:'<div class="h-100 f-utils-flex-column">\r\n  \x3c!-- 简易表达式 --\x3e\r\n  <div *ngIf="this.type==0" style="height: 100%;overflow: auto">\r\n    <div style="background: #f0ffffe0;width: 100%;">\r\n      <button type="button" class="k-button k-button-icon k-flat" (click)="toUp()"><span\r\n          class="k-icon k-i-arrow-up"></span></button>\r\n      <button type="button" class="k-button k-button-icon k-flat" (click)="toDown()"><span\r\n          class="k-icon k-i-arrow-down"></span></button>\r\n      <button type="button" class="k-button k-button-icon k-flat" (click)="toTop()"><span\r\n          class="k-icon k-i-arrow-end-up"></span></button>\r\n      <button type="button" class="k-button k-button-icon k-flat" (click)="toBottom()"><span\r\n          class="k-icon k-i-arrow-end-down"></span></button>\r\n    </div>\r\n    <div class="table-header ">\r\n      <table class="table table-bordered" style="margin-bottom: 0">\r\n        <colgroup>\r\n          <col *ngFor="let s of ColumnSize" [style.width]=" s + \'px\'">\r\n        </colgroup>\r\n        <thead>\r\n          <tr>\r\n            <th align="center"><b>&nbsp;{{this.headers[0]}}</b></th>\r\n            <th align="center"><b>&nbsp;{{this.headers[1]}}</b></th>\r\n            <th align="center"><b>&nbsp;{{this.headers[2]}}</b></th>\r\n            <th align="center"><b>&nbsp;{{this.headers[3]}}</b></th>\r\n            <th align="center"><b>&nbsp;{{this.headers[4]}}</b></th>\r\n            <th align="center"><b>&nbsp;{{this.headers[5]}}</b></th>\r\n            <th></th>\r\n          </tr>\r\n        </thead>\r\n      </table>\r\n    </div>\r\n    <div class="table-body flex-fill" style="overflow: auto" #tablebodybox>\r\n      <perfect-scrollbar [config]="{}">\r\n        <table class="table table-bordered">\r\n          <colgroup>\r\n            <col *ngFor="let s of ColumnSize" [style.width]=" s + \'px\'">\r\n          </colgroup>\r\n          <tbody>\r\n            <tr *ngFor="let view of conditionViews; let index=index;"\r\n              (click)="selected({\'index\':index, \'condition\': view})" [class.selected]="isSelected(index)">\r\n              <td>\r\n                <select class="form-control filter-select" [(ngModel)]="view.lbracket" name="lbracket">\r\n                  <option *ngFor="let item of LeftBracket" [value]="item">{{ item }}</option>\r\n                </select>\r\n              </td>\r\n              <td>\r\n                <farris-combo-lookup [(ngModel)]="view.fieldName" [idField]="\'chainName\'" [textField]="\'chainName\'"\r\n                  [valueField]="\'chainName\'" [displayType]="\'LOOKUPTREELIST\'" [data]="propertyList" [nosearch]="false"\r\n                  [enableFilterRow]="true" (selectChange)="selectChange({\'index\':index, \'data\': $event})"\r\n                  (clear)="selectRemove({\'index\':index})">\r\n                </farris-combo-lookup>\r\n              </td>\r\n              <td>\r\n                <select class="form-control filter-select" [(ngModel)]="view.operator" name="operator">\r\n                  <option *ngFor="let item of operators[index]" [value]="item.value">{{item.label}}</option>\r\n                </select>\r\n              </td>\r\n              <td>\r\n                <input *ngIf="![\'OrgAffiliation\',\'==null\',\'!=null\'].includes(view.operator)" type="text"\r\n                  style="width:100%" [(ngModel)]="view.value" name="value" class="k-textbox">\r\n                <sys-farris-tree-help *ngIf="view.operator==\'OrgAffiliation\'" [displayTxt]="view.sysorgData.showText"\r\n                  [singleSelect]="false" [sourceType]="\'org\'" [async]="true" [bindingData]="view.sysorgData.bindingData"\r\n                  (afterConfirm)="afterSelectSysorg({\'index\':index, \'orgs\': $event})"></sys-farris-tree-help>\r\n              </td>\r\n              <td>\r\n                <select class="form-control filter-select" [(ngModel)]="view.rbracket" name="rbracket">\r\n                  <option *ngFor="let item of RightBracket" [value]="item">{{ item }}</option>\r\n                </select>\r\n              </td>\r\n              <td>\r\n                <select class="form-control filter-select" [(ngModel)]="view.relation" name="relation">\r\n                  <option *ngFor="let item of relaOpers" [value]="item.value">{{ item.label }}</option>\r\n                </select>\r\n              </td>\r\n              <td>\r\n                <div>\r\n                  <button type="button" (click)="insert(index)" class="k-button k-button-icon k-flat">\r\n                    <span class="k-icon k-i-plus"></span>\r\n                  </button>\r\n                  <button type="button" (click)="remove(index)" class="k-button k-button-icon k-flat">\r\n                    <span class="k-icon k-i-delete"></span>\r\n                  </button>\r\n                </div>\r\n              </td>\r\n            </tr>\r\n          </tbody>\r\n        </table>\r\n      </perfect-scrollbar>\r\n    </div>\r\n  </div>\r\n  \x3c!-- 高级表达式 --\x3e\r\n  <div *ngIf="this.type==1" style="height: 100%;">\r\n    <div *ngIf="!isNewSchema" style="height: 100%;">\r\n      <app-expressioneditor #Advanced [text]="expressionText" [isPanel]="isPanel" [readOnly]="readOnly"\r\n        [contextEntities]="ContextVariables" [sessionEntities]="SessionVariables" [funcEntities]="ExtendFunctions"\r\n        [commonObjects]="" [injectName]="InjectName" [injectSchemaName]="InjectSchemaName"\r\n        [injectNameInSchema]="InjectNameInSchema" [injectedType]="InjectedType" [customSchema]="Schema"\r\n        [customSchemaName]="SchemaName" [setting]="advencedSetting">\r\n      </app-expressioneditor>\r\n    </div>\r\n    <div *ngIf="isNewSchema" style="height: 100%;">\r\n      <app-expressioneditor #Advanced [text]="expressionText" [isPanel]="isPanel" [readOnly]="readOnly"\r\n        [contextEntities]="ContextVariables" [sessionEntities]="SessionVariables" [funcEntities]="ExtendFunctions"\r\n        [commonObjects]="" [injectName]="InjectName" [injectSchemaName]="InjectSchemaName"\r\n        [injectNameInSchema]="InjectNameInSchema" [injectedType]="InjectedType" [customNewSchema]="NewSchema"\r\n        [customNewSchemaName]="NewSchemaName" [setting]="advencedSetting">\r\n      </app-expressioneditor>\r\n    </div>\r\n  </div>\r\n</div>\r\n\r\n\x3c!-- 当前组件无法使用HttpClient，通过此组件间接使用（围魏救赵） --\x3e\r\n<div style="width: 0px;height: 0px;display: none;">\r\n  <app-expr-func-grid #Function></app-expr-func-grid>\r\n</div>',styles:[".filter-select{width:100%;padding-left:0;padding-right:0;-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}.selected{background:#c2e4ff}.footer{position:absolute;bottom:0;left:0;right:0;justify-content:flex-start}"]}]}],P.ctorParameters=function(){return[{type:te.MessagerService},{type:ne.NotifyService}]},P.propDecorators={Advanced:[{type:y.ViewChild,args:["Advanced"]}],Function:[{type:y.ViewChild,args:["Function"]}],type:[{type:y.Input}],text:[{type:y.Input}],injectName:[{type:y.Input}],injectSchemaName:[{type:y.Input}],injectNameInSchema:[{type:y.Input}],injectedType:[{type:y.Input}],ignoredOperators:[{type:y.Input}],allowSelectRoot:[{type:y.Input}],newSchema:[{type:y.Input}],newSchemaName:[{type:y.Input}],schema:[{type:y.Input}],schemaName:[{type:y.Input}],advancedSessions:[{type:y.Input}],advancedContexts:[{type:y.Input}],advancedFunctions:[{type:y.Input}],advancedSmartHelps:[{type:y.Input}],advencedSetting:[{type:y.Input}]};var dn=P;function P(e,t){var n=this;this.msgSer=e,this.notifyService=t,this.injectedType=m.EntityType,this.ignoredOperators=[],this.allowSelectRoot=!0,this.advancedSessions=[],this.advancedContexts=[],this.advancedFunctions=[],this.advancedSmartHelps=[],this.advencedSetting={},this.expressionEntity={expr:"",sexpr:""},this.oldId=10001,this.newId=20001,this.ColumnSize=Bt,this.LeftBracket=Pt,this.RightBracket=Lt,this.relaOpers=[],this.allOpers=[],this.strOpers=[],this.numOpers=[],this.notifies={},this.headers=[],this.headButtons=[],this.entities=[],this.operators=[],this.conditions=[],this.currentView=null,this.conditionViews=[{computeField:"",fieldName:"",value:"",lbracket:"(",rbracket:")",relation:"&&",operator:"",sysorgData:{showText:"",bindingData:{id:"",name:""}}}],this.isPanel=!0,this.readOnly=!1,this.InjectedType=m.EntityType,this.conditionStr=null,this.expressionStr=null,this.localeId=localStorage.getItem("languageCode")||"zh-CHS",this.local=new qt(this.localeId),this.notifies={1:{type:"success",msg:this.local.transform("Notice_Success")},2:{type:"error",msg:this.local.transform("Notice_NotComplate")},3:{type:"success",msg:this.local.transform("Notice_SuccessClear")},4:{type:"warning",msg:this.local.transform("Notice_PleaseSelectRow")},5:{type:"error",msg:this.local.transform("Notice_NotAllowSelectRoot")}},Rt.forEach(function(e){e.lang==n.localeId&&(n.relaOpers=e.resource)}),Mt.forEach(function(e){e.lang==n.localeId&&(n.allOpers=e.resource)}),this.allOpers=this.allOpers.filter(function(e){return!n.ignoredOperators.includes(e.value)}),Ot.forEach(function(e){e.lang==n.localeId&&(n.strOpers=e.resource)}),this.strOpers=this.strOpers.filter(function(e){return!n.ignoredOperators.includes(e.value)}),At.forEach(function(e){e.lang==n.localeId&&(n.numOpers=e.resource)}),this.numOpers=this.numOpers.filter(function(e){return!n.ignoredOperators.includes(e.value)}),this.headers[0]=this.local.transform("Header_LeftBracket"),this.headers[1]=this.local.transform("Headrt_Data"),this.headers[2]=this.local.transform("Headrt_Operator"),this.headers[3]=this.local.transform("Headrt_Value"),this.headers[4]=this.local.transform("Headrt_RightBracket"),this.headers[5]=this.local.transform("Headrt_Relation"),this.headButtons[0]=this.local.transform("HeadButton_Up"),this.headButtons[1]=this.local.transform("HeadButton_Down"),this.headButtons[2]=this.local.transform("HeadButton_Top"),this.headButtons[3]=this.local.transform("HeadButton_Bottom"),N.init()}hn.prototype.ngOnInit=function(){},hn.decorators=[{type:y.Component,args:[{selector:"app-expression-schema-grid",template:""}]}],hn.ctorParameters=function(){return[]};var mn=hn;function hn(){}gn.prototype.ngOnInit=function(){},gn.decorators=[{type:y.Component,args:[{selector:"app-expression-schema-info-grid",template:""}]}],gn.ctorParameters=function(){return[]};var fn=gn;function gn(){}bn.prototype.ngOnInit=function(){},bn.decorators=[{type:y.Component,args:[{selector:"app-expression-entity-info-grid",template:""}]}],bn.ctorParameters=function(){return[]};var kn=bn;function bn(){}vn.decorators=[{type:y.NgModule,args:[{declarations:[dn,Jt,wt,sn,on,cn,mn,fn,pt,kn,pn,u],imports:[U.PopoverModule,H.CommonModule,nn.forRoot({baseUrl:"assets",defaultOptions:{scrollBeyondLastLine:!1}}),G.FormsModule,G.ReactiveFormsModule,Q.TreeTableModule,j.ComboLookupModule,_.DataTableModule,V.FarrisDialogModule,B.PerfectScrollbarModule,X.HttpClientModule,te.MessagerModule.forRoot(),ee.ModalModule.forRoot(),ne.NotifyModule,Y.SplitterModule,q.FarrisTabsModule,Z.DatagridFilterRowModule.forRoot(),J.DatagridModule,K.AngularDraggableModule,ae.SysManagerUIModule,$.FarrisSidebarModule],entryComponents:[Jt,wt,dn],exports:[Jt,wt,dn],providers:[W.ComboService,ee.BsModalService,n,un,X.HttpClient,ie.HttpService,re.BasePathService]}]}];U=vn;function vn(){}e.ExpressionModule=U,e.ExpressioneditorComponent=wt,e.ComputeRuleEditorComponent=dn,e.ExpressionService=un,e.ExpressionEventService=n,e.ExpressionContextEntity=qe,e.AdvancedCheckResult=Ye,e.ExpressionEntity=Qe,e.InjectedEntity=Ze,e.ExprEditMode=p,e.InjectedType=m,e.SmartHelpInfo=tt,e.VarEntity=Xe,e.FuncEntity=at,e.FuncType=T,e.Parameter=nt,e.CustomizedSetting=Ue,e.DataArea=Ke,e.ExtendFunction=it,e.ExpressionModelDetail=$e,e.ExpressionEditorLocalePipe=u,e.Schema=rt,e.EntityType=st,e.EntitySet=ot,e.Property=lt,e.NavigationProperty=ct,e.NavigationType=h,e.NewSchema=_e,e.NewEntityType=We,e.NewEntitySet=Ve,e.NewAssociation=He,e.NewProperty=Ge,e.NewNavigationProperty=ze,e.NewDataType=i,e.NewNavigationType=d,e.ExpressionResult=Wt,e.CommonUtils=N,e.ɵa=Jt,e.ɵh=kn,e.ɵe=mn,e.ɵf=fn,e.ɵb=sn,e.ɵg=pt,e.ɵi=pn,e.ɵc=on,e.ɵd=cn,e.ɵn=$t,e.ɵm=Qt,e.ɵk=tn,e.ɵl=an,e.ɵj=nn,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=gsp-svc-expression.umd.min.js.map