@byteluck-fe/model-driven-engine 1.5.0-beta.10 → 1.5.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/common/ActionManager.js +136 -33
- package/dist/esm/common/DataManager.js +113 -18
- package/dist/esm/common/Engine.js +134 -35
- package/dist/esm/common/proxyState.js +2 -2
- package/dist/esm/plugins/ControlsEventPlugin.js +175 -67
- package/dist/esm/plugins/LifecycleEventPlugin.js +165 -61
- package/dist/esm/utils/runtimeUtils.js +2 -4
- package/dist/index.umd.js +2 -2
- package/dist/types/common/Engine.d.ts +3 -3
- package/dist/types/common/Store.d.ts +1 -1
- package/package.json +4 -4
package/dist/index.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var kc=Object.defineProperty,Hc=Object.defineProperties;var Wc=Object.getOwnPropertyDescriptors;var Kn=Object.getOwnPropertySymbols,zc=Object.getPrototypeOf,Kc=Object.prototype.hasOwnProperty,Jc=Object.prototype.propertyIsEnumerable,Gc=Reflect.get;var Jn=(C,_,I)=>_ in C?kc(C,_,{enumerable:!0,configurable:!0,writable:!0,value:I}):C[_]=I,$=(C,_)=>{for(var I in _||(_={}))Kc.call(_,I)&&Jn(C,I,_[I]);if(Kn)for(var I of Kn(_))Jc.call(_,I)&&Jn(C,I,_[I]);return C},qt=(C,_)=>Hc(C,Wc(_));var Gn=(C,_,I)=>Gc(zc(C),I,_);var G=(C,_,I)=>new Promise((V,Fe)=>{var Ge=X=>{try{pe(I.next(X))}catch(he){Fe(he)}},Xe=X=>{try{pe(I.throw(X))}catch(he){Fe(he)}},pe=X=>X.done?V(X.value):Promise.resolve(X.value).then(Ge,Xe);pe((I=I.apply(C,_)).next())});(function(C,_){typeof exports=="object"&&typeof module!="undefined"?_(exports,require("regenerator-runtime")):typeof define=="function"&&define.amd?define(["exports","regenerator-runtime"],_):(C=typeof globalThis!="undefined"?globalThis:C||self,_(C.modelDrivenEngine={},C.regeneratorRuntime))})(this,function(C,_){"use strict";function I(t){return t&&typeof t=="object"&&"default"in t?t:{default:t}}var V=I(_),Fe="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u5B57",Ge="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5B57\u7B26\u4E32",Xe="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5BF9\u8C61",pe="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u7EC4",X="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5E03\u5C14",he="{caption}\u5FC5\u586B",Xn="\u8BF7\u8F93\u5165\u6807\u9898",Qn="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",Zn="\u8BF7\u8F93\u5165\u63D0\u793A\u6587\u5B57",Yn="\u8BF7\u7ED1\u5B9A\u6570\u636E\u9879",er="\u8BF7\u7ED1\u5B9A\u8868\u5355",tr="\u8BF7\u7ED1\u5B9A\u5217\u8868",nr="\u8BF7\u7ED1\u5B9A\u6D41\u7A0B",rr="\u8BF7\u8F93\u5165\u663E\u793A\u503C",ir="\u8BF7\u8F93\u5165\u5B58\u50A8\u503C",ur="\u5355\u636E\u7F16\u53F7\u672A\u7ED1\u5B9A\u6570\u636E\u9879",ar="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",or="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u7684\u6570\u503C",sr="\u8BF7\u8F93\u5165\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",cr="\u6570\u503C\u8303\u56F4\u8BBE\u7F6E\u6709\u8BEF",lr="\u8BF7\u8F93\u5165\u957F\u5EA6\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u503C",fr="\u9644\u4EF6\u5927\u5C0F\u5FC5\u987B\u57280MB\u81F31000MB\u4E4B\u95F4",dr="\u8BF7\u586B\u5199\u603B\u5206\u8BBE\u7F6E",pr="\u603B\u5206\u4E0D\u80FD\u5C0F\u4E8E1",hr="\u9ED8\u8BA4\u503C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",gr="\u9644\u4EF6\u4E0A\u4F20\u7684\u6570\u91CF\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",yr="\u8BF7\u91CD\u65B0\u9009\u62E9\u53EF\u9009\u6570\u91CF",mr="\u8BE5\u63A7\u4EF6\u6700\u5927\u957F\u5EA6\u9700\u5927\u4E8E\u6700\u5C0F\u957F\u5EA6",vr="\u8BE5\u63A7\u4EF6\u6700\u5C0F\u957F\u5EA6\u9700\u5C0F\u4E8E\u6700\u5927\u957F\u5EA6",Er="\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u9009\u9879\u8BBE\u7F6E",br="\u9009\u9879ID\u4E0D\u80FD\u91CD\u590D",Ar="\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u6761\u9009\u9879",Br="\u8BF7\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Cr="\u8BF7\u7ED1\u5B9A\u5B58\u50A8\u503C",wr="\u8BF7\u7ED1\u5B9A\u670D\u52A1",Sr="\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Fr="\u8BF7\u9009\u62E9\u7701",_r="\u8BF7\u9009\u62E9\u5E02",Dr="\u8BF7\u9009\u62E9\u533A",Ir="\u6700\u5C11\u586B\u5199\u884C\u6570\u4E0D\u80FD\u5C0F\u4E8E0",Rr="\u884C\u6570\u91CF\u4E0D\u80FD\u5C0F\u4E8E{min}\u884C",$r="\u8BF7\u8F93\u5165\u5217\u5BBD",Mr="\u8BF7\u8BBE\u7F6E\u6240\u6709\u89C4\u5219\u6761\u4EF6\u7684\u903B\u8F91\u5173\u7CFB",Or="\u8BF7\u5C06\u6240\u6709\u89C4\u5219\u6761\u4EF6\u586B\u5199\u5B8C\u6574",Pr="\u8BF7\u9009\u62E9\u63A7\u4EF6",Lr="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5",xr="\u8BF7\u9009\u62E9\u56DE\u586B\u8BBE\u7F6E",jr="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Nr="\u8BF7\u9009\u62E9\u6839\u8282\u70B9",Tr="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Vr="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",qr="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Ur="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",kr="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Hr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Wr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",zr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Kr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Jr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Gr="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Xr="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Qr="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Zr="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Yr="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",ei="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",ti="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",ni={isNotNumber:Fe,isNotString:Ge,isNotObject:Xe,isNotArray:pe,isNotBoolean:X,runtimeRequired:he,pleaseEnterCaption:Xn,pleaseEnterCaptionTip:Qn,pleaseEnterPlaceholder:Zn,pleaseEnterFieldCode:Yn,pleaseEnterForm:er,pleaseEnterList:tr,pleaseEnterProcess:nr,pleaseEnterLabel:rr,pleaseEnterValue:ir,bizKeyNotBindFiled:ur,pleaseEnterNumberRange:ar,pleaseEnterAValueGreaterThanMin:or,pleaseEnterAValueLessThanMax:sr,numberRangeSetError:cr,stringRangeError:lr,attachmentMaxSize:fr,pleaseEnterTotalScoreSetting:dr,theTotalScoreMustNotBeLessThan1:pr,scoreDefaultValueRange:hr,attachmentLimitError:gr,PleaseReselectTheOptionalQuantity:yr,TheMaximumLengthIsGreaterThanTheMinimumLength:mr,TheMinimumLengthIsGreaterThanTheMaximumLength:vr,PleaseSelectTheCorrectOptionSettings:Er,optionIdIsRepeat:br,optionIsRequired:Ar,pleaseEnterDataCode:Br,pleaseEnterValueFieldCode:Cr,pleaseEnterSvcCode:wr,pleaseBindAtLeastOneDisplayValue:Sr,pleaseSelectProvince:Fr,pleaseSelectCity:_r,pleaseSelectDistrict:Dr,limitRowsCannotBeLessThan0:Ir,TheNumberOfRowsCannotBeLessThanMinRows:Rr,pleaseEnterColumnWidth:$r,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Mr,pleaseCompleteAllRulesAndConditions:Or,pleaseSelectControl:Pr,pleaseSelectAtLeastOneColumn:Lr,pleaseSelectFillBackMode:xr,pleaseSelectDashboard:jr,rootNodeIsRequired:Nr,theViewNameCannotBeEmpty:Tr,pleaseSelectOcrType:Vr,pleaseSelectAtLeastOneFieldToFillIn:qr,pleaseChooseAtLeastOne:Ur,pleaseEnterButtonContent:kr,pleaseEnterDataCodeInDataSetting:Hr,pleaseEnterValueFieldCodeInDataSetting:Wr,pleaseEnterSvcCodeInDataSetting:zr,pleaseBindAtLeastOneDisplayValueInDataSetting:Kr,rootNodeIsRequiredInDataSetting:Jr,pleaseEnterMaxHeight:Gr,pleaseEnter:Xr,pleaseEnterWatermark:Qr,pleaseEnterFileName:Zr,pleaseUploadAtLeastOnePrintTemplate:Yr,pleaseAssignBusiness:ei,pleaseAssignExternal:ti},ri="Please enter a number",ii="Please enter a string",ui="Please enter an object",ai="Please enter an array",oi="Please enter a boolean",si="{caption} Required",ci="Please enter the title",li="Please enter the bubble prompt",fi="Please enter the prompt text",di="Please bind data items",pi="Please bind the form",hi="Please bind the list",gi="Please bind the process",yi="Please enter the displayed value",mi="Please enter the stored value",vi="The document number is not bound to the data item",Ei="Please enter a value greater than or equal to {min} and less than or equal to {max}",bi="Please enter a value greater than or equal to {min}",Ai="Please enter a value less than or equal to {max}",Bi="The value range is set incorrectly",Ci="Please enter a value with a length greater than or equal to {min} and less than or equal to {max}",wi="The attachment size must be between 0MB and 1000MB",Si="Please fill in the total score setting",Fi="The total score cannot be less than 1",_i="The default value must be between {min} and {max}",Di="The number of attachments uploaded must be between {min} and {max}",Ii="Please re-select the optional quantity",Ri="The maximum length of the control must be greater than the minimum length",$i="The minimum length of the control must be less than the maximum length",Mi="Please select the correct option setting",Oi="Option ID cannot be repeated",Pi="Please enter at least one option",Li="Please bind the data source",xi="Please bind the stored value",ji="Please bind the service",Ni="At least one display value must be bound",Ti="Please select a province",Vi="Please select a city",qi="Please select a district",Ui="The minimum number of lines to fill in cannot be less than 0",ki="The number of rows cannot be less than {min} rows",Hi="Please enter the column width",Wi="Please set the logical relationship of all rule conditions",zi="Please complete all rules and conditions",Ki="please select control",Ji="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Gi="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Xi="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Qi="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Zi="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Yi="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",eu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",tu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",nu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",ru="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",iu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",uu="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",au="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",ou="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",su="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",cu="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",lu="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",fu="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",du={isNotNumber:ri,isNotString:ii,isNotObject:ui,isNotArray:ai,isNotBoolean:oi,runtimeRequired:si,pleaseEnterCaption:ci,pleaseEnterCaptionTip:li,pleaseEnterPlaceholder:fi,pleaseEnterFieldCode:di,pleaseEnterForm:pi,pleaseEnterList:hi,pleaseEnterProcess:gi,pleaseEnterLabel:yi,pleaseEnterValue:mi,bizKeyNotBindFiled:vi,pleaseEnterNumberRange:Ei,pleaseEnterAValueGreaterThanMin:bi,pleaseEnterAValueLessThanMax:Ai,numberRangeSetError:Bi,stringRangeError:Ci,attachmentMaxSize:wi,pleaseEnterTotalScoreSetting:Si,theTotalScoreMustNotBeLessThan1:Fi,scoreDefaultValueRange:_i,attachmentLimitError:Di,PleaseReselectTheOptionalQuantity:Ii,TheMaximumLengthIsGreaterThanTheMinimumLength:Ri,TheMinimumLengthIsGreaterThanTheMaximumLength:$i,PleaseSelectTheCorrectOptionSettings:Mi,optionIdIsRepeat:Oi,optionIsRequired:Pi,pleaseEnterDataCode:Li,pleaseEnterValueFieldCode:xi,pleaseEnterSvcCode:ji,pleaseBindAtLeastOneDisplayValue:Ni,pleaseSelectProvince:Ti,pleaseSelectCity:Vi,pleaseSelectDistrict:qi,limitRowsCannotBeLessThan0:Ui,TheNumberOfRowsCannotBeLessThanMinRows:ki,pleaseEnterColumnWidth:Hi,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Wi,pleaseCompleteAllRulesAndConditions:zi,pleaseSelectControl:Ki,pleaseSelectDashboard:Ji,theViewNameCannotBeEmpty:Gi,pleaseSelectOcrType:Xi,pleaseSelectAtLeastOneFieldToFillIn:Qi,pleaseChooseAtLeastOne:Zi,pleaseEnterButtonContent:Yi,pleaseEnterDataCodeInDataSetting:eu,pleaseEnterValueFieldCodeInDataSetting:tu,pleaseEnterSvcCodeInDataSetting:nu,pleaseBindAtLeastOneDisplayValueInDataSetting:ru,rootNodeIsRequiredInDataSetting:iu,pleaseEnterMaxHeight:uu,pleaseEnter:au,pleaseEnterWatermark:ou,pleaseEnterFileName:su,pleaseUploadAtLeastOnePrintTemplate:cu,pleaseAssignBusiness:lu,pleaseAssignExternal:fu},pu="\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",hu="\u6587\u5B57\u5217\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",gu="\u5BFE\u8C61\u7269\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",yu="\u6570\u5B57\u7D44\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",mu="\u30D6\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",vu="{caption}\u5FC5\u9808",Eu="\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",bu="\u6C17\u6CE1\u306E\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Au="\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Bu="\u30C7\u30FC\u30BF\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Cu="\u30B7\u30FC\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",wu="\u30EA\u30B9\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Su="\u30D5\u30ED\u30FC\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Fu="\u8868\u793A\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",_u="\u4FDD\u5B58\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Du="\u30B7\u30FC\u30C8\u756A\u53F7\u304C\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",Iu="{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Ru="{min}\u4EE5\u4E0A\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",$u="{max}\u672A\u6E80\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Mu="\u6570\u5024\u7BC4\u56F2\u8A2D\u5B9A\u30A8\u30E9\u30FC",Ou="\u9577\u3055\u304C{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Pu="\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306F0MB\u304B\u30891000MB\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Lu="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",xu="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u306F\uFF11\u4EE5\u4E0A\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",ju="\u57FA\u672C\u8A2D\u5B9A\u5024\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Nu="\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4EF6\u6570\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059",Tu="\u6570\u91CF\u3092\u518D\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Vu="\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5927\u5024\u306F\u6700\u5C0F\u5024\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",qu="\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5C0F\u5024\u306F\u6700\u5927\u5024\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Uu="\u6B63\u78BA\u306A\u8A2D\u5B9A\u5024\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",ku="ID\u306F\u91CD\u8907\u3057\u306A\u3044\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",Hu="\u6700\u4F4E\uFF11\u70B9\u3092\u9078\u3076\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",Wu="\u5143\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",zu="\u4FDD\u5B58\u5024\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Ku="\u30B5\u30FC\u30D3\u30B9\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Ju="\u8868\u793A\u5024\u3092\u30EA\u30F3\u30AF\u3057\u76F4\u3057\u3057\u3066\u4E0B\u3055\u3044",Gu="\u7701\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Xu="\u5E02\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Qu="\u533A\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Zu="\u6700\u5C0F\u5024\u306F\uFF10\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Yu="\u6700\u4F4E\u884C\u6570\u306F{min}\u884C\u3067\u304A\u9858\u3044\u3057\u307E\u3059",ea="\u5217\u5E45\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ta="\u5168\u3066\u306E\u6761\u4EF6\u306E\u30ED\u30B8\u30C3\u30AF\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",na="\u5168\u3066\u306E\u6761\u4EF6\u3092\u5B8C\u6210\u3055\u305B\u3066\u4E0B\u3055\u3044",ra="please select control",ia="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",ua="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",aa="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",oa="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",sa="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",ca="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",la="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",fa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",da="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",pa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",ha="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",ga="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",ya="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",ma="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",va="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Ea="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",ba="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Aa="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Ba={isNotNumber:pu,isNotString:hu,isNotObject:gu,isNotArray:yu,isNotBoolean:mu,runtimeRequired:vu,pleaseEnterCaption:Eu,pleaseEnterCaptionTip:bu,pleaseEnterPlaceholder:Au,pleaseEnterFieldCode:Bu,pleaseEnterForm:Cu,pleaseEnterList:wu,pleaseEnterProcess:Su,pleaseEnterLabel:Fu,pleaseEnterValue:_u,bizKeyNotBindFiled:Du,pleaseEnterNumberRange:Iu,pleaseEnterAValueGreaterThanMin:Ru,pleaseEnterAValueLessThanMax:$u,numberRangeSetError:Mu,stringRangeError:Ou,attachmentMaxSize:Pu,pleaseEnterTotalScoreSetting:Lu,theTotalScoreMustNotBeLessThan1:xu,scoreDefaultValueRange:ju,attachmentLimitError:Nu,PleaseReselectTheOptionalQuantity:Tu,TheMaximumLengthIsGreaterThanTheMinimumLength:Vu,TheMinimumLengthIsGreaterThanTheMaximumLength:qu,PleaseSelectTheCorrectOptionSettings:Uu,optionIdIsRepeat:ku,optionIsRequired:Hu,pleaseEnterDataCode:Wu,pleaseEnterValueFieldCode:zu,pleaseEnterSvcCode:Ku,pleaseBindAtLeastOneDisplayValue:Ju,pleaseSelectProvince:Gu,pleaseSelectCity:Xu,pleaseSelectDistrict:Qu,limitRowsCannotBeLessThan0:Zu,TheNumberOfRowsCannotBeLessThanMinRows:Yu,pleaseEnterColumnWidth:ea,pleaseSetTheLogicalRelationshipOfAllRuleConditions:ta,pleaseCompleteAllRulesAndConditions:na,pleaseSelectControl:ra,pleaseSelectDashboard:ia,theViewNameCannotBeEmpty:ua,pleaseSelectOcrType:aa,pleaseSelectAtLeastOneFieldToFillIn:oa,pleaseChooseAtLeastOne:sa,pleaseEnterButtonContent:ca,pleaseEnterDataCodeInDataSetting:la,pleaseEnterValueFieldCodeInDataSetting:fa,pleaseEnterSvcCodeInDataSetting:da,pleaseBindAtLeastOneDisplayValueInDataSetting:pa,rootNodeIsRequiredInDataSetting:ha,pleaseEnterMaxHeight:ga,pleaseEnter:ya,pleaseEnterWatermark:ma,pleaseEnterFileName:va,pleaseUploadAtLeastOnePrintTemplate:Ea,pleaseAssignBusiness:ba,pleaseAssignExternal:Aa},Ca={zhCN:ni,enUS:du,jaJP:Ba},j;(function(t){t.Number="Number",t.Operator="Operator",t.VariableInMainTable="VariableInMainTable",t.VariableInCurrentSubTable="VariableInCurrentSubTable",t.VariableInOtherSubTable="VariableInOtherSubTable",t.UndefinedVariable="UndefinedVariable"})(j||(j={}));var ue;(function(t){t.SUM="SUM",t.AVG="AVG",t.MAX="MAX",t.MIN="MIN"})(ue||(ue={}));var Ut="zh-CN";function P(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var q;(function(t){t.BASE="base",t.FORM="form",t.LAYOUT="layout",t.WRAP="wrap",t.COLUMN="column",t.LIST="list",t.SEARCH="search"})(q||(q={}));var w;(function(t){t.TITLE="title",t.LINK="link",t.BUTTON="button",t.DIVIDER="divider",t.TEXT="text",t.CREATE_FORM_LIST_BUTTON="list-page-btn-create-form",t.BATCH_SUBMISSION_LIST_BUTTON="list-page-btn-batch-submission",t.SUBMISSION_RECORD_LIST_BUTTON="list-page-btn-submission-record",t.IMPORT_RECORD_LIST_BUTTON="list-page-btn-import-record",t.EXPORT_RECORD_LIST_BUTTON="list-page-btn-export-record",t.EXPORT_LIST_BUTTON="list-page-btn-export-list",t.LIST_SELECT_BUTTON="list-select-button",t.FORM_SELECT_BUTTON="form-select-button",t.LIST_VIEW_SELECT="list-view-select",t.TEXT_OCR_BUTTON="text-ocr-button",t.INVOICE_CHECK_BUTTON="invoice-check-button",t.LIST_PAGE_BTN_BATCH_PRINT="list-page-btn-batch-print",t.LIST_PAGE_BTN_BATCH_PRINT_RECORD="list-page-btn-batch-print-record",t.VARCHAR_COLUMN="varchar-column",t.TEXT_COLUMN="text-column",t.DECIMAL_COLUMN="decimal-column",t.TIMESCOPE_COLUMN="timescope-column",t.TIMESTAMP_COLUMN="timestamp-column",t.ARRAY_COLUMN="array-column",t.DEPARTMENT_COLUMN="department-column",t.AUTO_NUMBER_COLUMN="auto-number-column",t.FILE_COLUMN="file-column",t.IMAGE_COLUMN="image-column",t.PEOPLE_COLUMN="people-column",t.LOCATION_COLUMN="location-column",t.CUSTOM_COLUMN="custom-column",t.ORDER_COLUMN="order-column",t.OPERATION_COLUMN="operation-column",t.EMPLOYEE_COLUMN="employee-column",t.ADDRESS="address",t.AMOUNT="amount",t.ATTACHMENT="attachment",t.AUTO_NUMBER="auto-number",t.CALC="calc",t.CHECKBOX="checkbox",t.DATE_PICKER="date-picker",t.DATE_RANGE="date-range",t.DEPARTMENT="department",t.EMPLOYEE="employee",t.IMAGE="image",t.INPUT="input",t.NUMBER="number",t.RADIO="radio",t.RICH_TEXT="rich-text",t.SCORE="score",t.SEARCH_DATE_RANGE="search-date-range",t.SEARCH_NUMBER_RANGE="search-number-range",t.SEARCH_INPUT="search-input",t.SELECT="select",t.SELECT_MULTIPLE="select-multiple",t.SELECT_RELATION="select-relation",t.VUE_FORM_ITEM="vue-form-item",t.TEXTAREA="textarea",t.EMAIL="email",t.FOOTER="footer",t.HEADER="header",t.ID_CARD="id-card",t.MOBILE="mobile",t.PHONE="phone",t.RADIO_IMAGE="radio-image",t.ELECTRONIC_SIGNATURE="electronic-signature",t.WPS="wps",t.CARD_GROUP="card-group",t.COL="col",t.GRID="grid",t.GRID_ROW="grid-row",t.GRID_TABLE_COLUMN="grid-table-column",t.ROW="row",t.TWO_COLUMNS="two-columns",t.SUBTABLE_COLUMN="subtable-column",t.SUBTABLE_ROW="subtable-row",t.TAB="tab",t.TAB_PANE="tab-pane",t.TOOLBOX="toolbox",t.DATA_VIEW="data-view",t.LIST_VIEW="list-view",t.SUBTABLE="subtable",t.GRID_TABLE="grid-table",t.SIMPLE_SEARCH="simple-search",t.PAGINATION="pagination",t.CHECKBOX_IMAGE="checkbox-image",t.DASHBOARD="dashboard",t.TREE="tree",t.EMPLOYEE2="employee2",t.DEPARTMENT2="department2"})(w||(w={}));var B;(function(t){t.VARCHAR="varchar",t.TEXT="text",t.ARRAY="array",t.ADDRESS="location",t.DECIMAL="decimal",t.DECIMAL_RANGE="decimal_range",t.TIMESTAMP="timestamp",t.EMPLOYEES="people",t.DEPARTMENTS="department",t.MONEY="money",t.TIMESCOPE="timescope",t.FILE="file",t.IMAGE="image",t.AUTO_NUMBER="auto_number",t.CALC="calc",t.RELATION="relation",t.LIST="list",t.RELATION_FIELD="relation-field",t.REFERENCE_FIELD="reference-field",t.CALC_FIELD="calc",t.JSON="json",t.BIGINT="bigint",t.ANY="ANY",t.ENCRYPTED_FIELD="encrypted_field"})(B||(B={}));var O;O={},P(O,B.ARRAY,w.ARRAY_COLUMN),P(O,B.AUTO_NUMBER,w.AUTO_NUMBER_COLUMN),P(O,B.DECIMAL,w.DECIMAL_COLUMN),P(O,B.DEPARTMENTS,w.DEPARTMENT_COLUMN),P(O,B.FILE,w.FILE_COLUMN),P(O,B.IMAGE,w.IMAGE_COLUMN),P(O,B.ADDRESS,w.LOCATION_COLUMN),P(O,B.EMPLOYEES,w.EMPLOYEE_COLUMN),P(O,B.TEXT,w.TEXT_COLUMN),P(O,B.TIMESCOPE,w.TIMESCOPE_COLUMN),P(O,B.TIMESTAMP,w.TIMESTAMP_COLUMN),P(O,B.VARCHAR,w.VARCHAR_COLUMN),P(O,B.RELATION,w.VARCHAR_COLUMN);var kt;(function(t){t.YEAR="year",t.MONTH="month",t.DATE="date",t.DATETIME="datetime"})(kt||(kt={}));var Ht="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",wa=Ht+"0123456789";function Qe(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:15,e="",r=0;r<t;r++){var n=r===0?Ht:wa,u=Math.random()*n.length;e+=n[parseInt(String(u),10)]}return e}function Ze(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Sa(t){if(Array.isArray(t))return Ze(t)}function Fa(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Wt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _a(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function _e(t,e,r){return _a()?_e=Reflect.construct:_e=function(u,a,o){var s=[null];s.push.apply(s,a);var c=Function.bind.apply(u,s),l=new c;return o&&ye(l,o.prototype),l},_e.apply(null,arguments)}function ge(t){return ge=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ge(t)}function zt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ye(t,e)}function Da(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function Ia(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ra(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function $a(t,e){return e&&(Ma(e)==="object"||typeof e=="function")?e:Fa(t)}function ye(t,e){return ye=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},ye(t,e)}function Kt(t){return Sa(t)||Ia(t)||Oa(t)||Ra()}var Ma=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function Oa(t,e){if(!!t){if(typeof t=="string")return Ze(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ze(t,e)}}function Ye(t){var e=typeof Map=="function"?new Map:void 0;return Ye=function(n){if(n===null||!Da(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(n))return e.get(n);e.set(n,u)}function u(){return _e(n,arguments,ge(this).constructor)}return u.prototype=Object.create(n.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),ye(u,n)},Ye(t)}function Pa(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Jt(t){var e=Pa();return function(){var n=ge(t),u;if(e){var a=ge(this).constructor;u=Reflect.construct(n,arguments,a)}else u=n.apply(this,arguments);return $a(this,u)}}var et=console;function Z(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,u=e.slice(1);(n=et).warn.apply(n,["\u{1F9D0} Driven Warning:"+e[0]].concat(Kt(u)))}function tt(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,u=e.slice(1);(n=et).log.apply(n,["\u{1F680} Driven Log:"+e[0]].concat(Kt(u)))}function La(t){return t+" \u{1F41B}\u{1F41B}\u{1F41B}"}var nt=function(t){zt(r,t);var e=Jt(r);function r(n){Wt(this,r);var u;return u=e.call(this,n),u.name="\u{1F4A5} Driven Error",u.message=n?La(n):"An unknown error occurred in the Driven, please contact the person in charge \u{1F691}\u{1F691}\u{1F691}",u}return r}(Ye(Error)),xa=function(t){zt(r,t);var e=Jt(r);function r(n){Wt(this,r);var u;return u=e.call(this,n),u.name="\u{1F6A8} Driven Reference Error",u}return r}(nt);function Q(t){throw new nt(t)}function Gt(t){throw new xa(t)}function De(t){et.error(new nt(t))}function ne(t,e){Array.isArray(t)&&t.map(function(r){switch(r.controlType){case"layout":ne(r==null?void 0:r.children,e);break;case"search":ne(r==null?void 0:r.children,e);break;case"form":e(r)}})}var ja=Object.prototype.toString;function Xt(t,e){return ja.call(t)==="[object "+e+"]"}function Na(t){return Xt(t,"String")}function Ta(t){return Xt(t,"Promise")}var Va=function(){function t(e){var r,n;this._messageCache=new Map,this.messages={},this.variableRegExp=/\{([0-9a-zA-Z_]+)\}/g,this._messages=Object.freeze((n=(r=e.messages)!==null&&r!==void 0?r:this.getPreImport(e.locale))!==null&&n!==void 0?n:{}),e.variableRegExp&&(this.variableRegExp=e.variableRegExp),this.setLocale(e.locale)}return t.prototype.setLocale=function(e){var r=this;this.locale=e,this._messageCache.clear();var n=this.getMessageData();Ta(n)?n.then(function(u){r._messageCache.clear(),r.messages[r.localeInMessageKey]=u}):this.messages[this.localeInMessageKey]=n},t.prototype.getMessageData=function(){var e=this._messages[this.localeInMessageKey];return typeof e=="function"?e():e},t.prototype.translate=function(e,r,n){var u=this.getMessage(e);return u?this.formatMessage(u,n):this.formatMessage(r,n)},t.prototype.getMessage=function(e){if(this._messageCache.has(e))return this._messageCache.get(e);var r=this.getPathArray(e),n=r.reduce(function(u,a,o,s){if(u!==void 0){var c=u[a];if(!(o===s.length-1&&!Na(c)))return c}},this.message);return this._messageCache.set(e,n),n},t.prototype.formatMessage=function(e,r){return r?e.replace(this.variableRegExp,function(n,u){var a=r[u];return a!==void 0?String(a):n}):e},t.prototype.getPreImport=function(e){var r;if(window.okI18nPreImport){var n=this.getLocaleInMessageKey(e);return window.okI18nPreImport.hasOwnProperty(n)?window.okI18nPreImport:(r={},r[n]=window.okI18nPreImport,r)}},t.prototype.getPathArray=function(e){return e.split(".")},t.prototype.getLocaleInMessageKey=function(e){return e.replace(/-/g,"")},Object.defineProperty(t.prototype,"$t",{get:function(){return this.translate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localeInMessageKey",{get:function(){return this.getLocaleInMessageKey(this.locale)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){var e;return(e=this.messages[this.localeInMessageKey])!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t}();function qa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var N=function(){function t(){qa(this,t)}return t.getMessage=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$i18n.$t(r,"",n)},t.resetI18n=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Ut;return new Va({locale:r,messages:Ca})},t.setLocale=function(r){return this.$i18n.setLocale(r)},t}();N.$i18n=N.resetI18n();function Qt(t,e,r){var n=e.replace(/\[(\d)]/g,function(a,o){return"."+o}).split("."),u=!1;return n.reduce(function(a,o,s,c){var l=a;if(!!a){if(!Object.prototype.hasOwnProperty.call(a,o)){Z("Can not set ".concat(e,"'s ").concat(o," property in current %o, Because there is no ").concat(o," property on the %o"),a,a);return}return s===c.length-1&&!Object.is(l[o],r)&&(l[o]=r,u=!0),l[o]}},t),u}var Ua=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},rt={exports:{}};(function(t){(function(e){var r=function(d,m,M){if(!l(m)||p(m)||h(m)||g(m)||c(m))return m;var v,D=0,K=0;if(f(m))for(v=[],K=m.length;D<K;D++)v.push(r(d,m[D],M));else{v={};for(var F in m)Object.prototype.hasOwnProperty.call(m,F)&&(v[d(F,M)]=r(d,m[F],M))}return v},n=function(d,m){m=m||{};var M=m.separator||"_",v=m.split||/(?=[A-Z])/;return d.split(v).join(M)},u=function(d){return E(d)?d:(d=d.replace(/[\-_\s]+(.)?/g,function(m,M){return M?M.toUpperCase():""}),d.substr(0,1).toLowerCase()+d.substr(1))},a=function(d){var m=u(d);return m.substr(0,1).toUpperCase()+m.substr(1)},o=function(d,m){return n(d,m).toLowerCase()},s=Object.prototype.toString,c=function(d){return typeof d=="function"},l=function(d){return d===Object(d)},f=function(d){return s.call(d)=="[object Array]"},p=function(d){return s.call(d)=="[object Date]"},h=function(d){return s.call(d)=="[object RegExp]"},g=function(d){return s.call(d)=="[object Boolean]"},E=function(d){return d=d-0,d===d},y=function(d,m){var M=m&&"process"in m?m.process:m;return typeof M!="function"?d:function(v,D){return M(v,d,D)}},b={camelize:u,decamelize:o,pascalize:a,depascalize:o,camelizeKeys:function(d,m){return r(y(u,m),d)},decamelizeKeys:function(d,m){return r(y(o,m),d,m)},pascalizeKeys:function(d,m){return r(y(a,m),d)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};t.exports?t.exports=b:e.humps=b})(Ua)})(rt);function S(t){if(t!==void 0)return typeof t=="object"?JSON.parse(JSON.stringify(t)):t}function U(t){return Object.prototype.toString.call(t)==="[object Object]"}function ka(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1}function ae(t){return Array.isArray(t)}function L(t){return typeof t=="string"}function Ie(t){return typeof t=="number"}function Zt(t){return typeof t=="function"}function Ha(t){return ae(t)&&t.every(function(e){return L(e)})}function Wa(t){return ae(t)&&t.every(function(e){return Ie(e)||e===""})}function Yt(t){return/^\[.*?]$/.test(t)}function Re(t){return/^{.*?}$/.test(t)}function it(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function za(t){if(Array.isArray(t))return it(t)}function en(t,e,r,n,u,a,o){try{var s=t[a](o),c=s.value}catch(l){r(l);return}s.done?e(c):Promise.resolve(c).then(n,u)}function Ka(t){return function(){var e=this,r=arguments;return new Promise(function(n,u){var a=t.apply(e,r);function o(c){en(a,n,u,o,s,"next",c)}function s(c){en(a,n,u,o,s,"throw",c)}o(void 0)})}}function Ja(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ga(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Xa(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ut(t){return za(t)||Ga(t)||Qa(t)||Xa()}function Qa(t,e){if(!!t){if(typeof t=="string")return it(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return it(t,e)}}var tn=function(){function t(){Ja(this,t),this._events=new Map,this.debug=!1}var e=t.prototype;return e.emit=function(n){for(var u=arguments.length,a=new Array(u>1?u-1:0),o=1;o<u;o++)a[o-1]=arguments[o];var s=this;return Ka(V.default.mark(function c(){var l,f,p,h,g,E,y,b,d,m;return V.default.wrap(function(v){for(;;)switch(v.prev=v.next){case 0:if(l=s._events.get(n),f=[],!l){v.next=42;break}p=l.slice(),h=!0,g=!1,E=void 0,v.prev=5,y=p[Symbol.iterator]();case 7:if(h=(b=y.next()).done){v.next=28;break}if(d=b.value,l.includes(d)){v.next=11;break}return v.abrupt("continue",25);case 11:return v.prev=11,s.debug&&tt.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(n," \u4E8B\u4EF6: ").concat(d.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+d.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(a.map(function(){return"%o"}).join(","),"\u3002")].concat(ut(a))),v.next=15,d.apply(null,ut(a));case 15:if(m=v.sent,s.debug&&tt.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(n," \u4E8B\u4EF6: ").concat(d.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+d.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(a.map(function(){return"%o"}).join(","),"; \u51FD\u6570\u7684\u8FD4\u56DE\u7ED3\u679C\u4E3A%o")].concat(ut(a),[m])),f.push(m),m!==!1){v.next=20;break}return v.abrupt("break",28);case 20:v.next=25;break;case 22:v.prev=22,v.t0=v.catch(11),De(String(v.t0));case 25:h=!0,v.next=7;break;case 28:v.next=34;break;case 30:v.prev=30,v.t1=v.catch(5),g=!0,E=v.t1;case 34:v.prev=34,v.prev=35,!h&&y.return!=null&&y.return();case 37:if(v.prev=37,!g){v.next=40;break}throw E;case 40:return v.finish(37);case 41:return v.finish(34);case 42:return v.abrupt("return",f);case 43:case"end":return v.stop()}},c,null,[[5,30,34,42],[11,22],[35,,37,41]])}))()},e.on=function(n,u){if(this._events.has(n)){var a;(a=this._events.get(n))===null||a===void 0||a.push(u)}else this._events.set(n,[u])},e.off=function(n,u){if(this._events.has(n)){var a=this._events.get(n),o=a==null?void 0:a.indexOf(u);a==null||a.splice(o,1)}},e.delete=function(n){this._events.has(n)&&this._events.delete(n)},e.clear=function(){this._events=new Map},t}();function Za(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Ya=[{key:"on_click",name:"\u70B9\u51FB\u65F6",code:"click"},{key:"on_click_finish",name:"\u6267\u884C\u5B8C\u6210\u65F6",code:"click-finish"},{key:"on_change",name:"\u503C\u53D1\u751F\u53D8\u5316\u65F6",code:"change"},{key:"on_search",name:"\u641C\u7D22\u65F6",code:"search"},{key:"on_list_change",name:"\u5217\u8868\u6570\u636E\u53D8\u5316\u65F6",code:"list-change"},{key:"on_list_search",name:"\u5217\u8868\u6570\u636E\u67E5\u8BE2\u6784\u5EFA\u65F6",code:"list-search"},{key:"on_list_mounted",name:"\u5217\u8868\u6570\u636E\u8FD4\u56DE\u65F6",code:"list-mounted"},{key:"on_list_delete",name:"\u5217\u8868\u6570\u636E\u5220\u9664\u65F6",code:"list-delete"},{key:"on_input",name:"\u7528\u6237\u8F93\u5165\u65F6",code:"input"},{key:"on_blur",name:"\u5931\u53BB\u7126\u70B9\u65F6",code:"blur"},{key:"on_focus",name:"\u83B7\u53D6\u7126\u70B9\u65F6",code:"focus"},{key:"on_wps_open",name:"\u6253\u5F00\u6587\u4EF6\u65F6",code:"wps-open"},{key:"on_wps_save",name:"\u4FDD\u5B58\u6587\u4EF6\u65F6",code:"wps-save"},{key:"on_wps_rename",name:"\u91CD\u547D\u540D\u65F6",code:"wps-rename"},{key:"on_list_actions",name:"\u70B9\u51FB\u64CD\u4F5C\u6309\u94AE\u65F6",code:"list-actions"},{key:"on_list_rowclick",name:"\u884C\u70B9\u51FB\u65F6",code:"list-rowclick"},{key:"on_list_before_rowdelete",name:"\u884C\u5220\u9664\u524D",code:"list-before-rowdelete"},{key:"on_list_before_import",name:"\u5217\u8868\u6570\u636E\u5BFC\u5165\u524D",code:"list-before-import"}],nn=function(){function t(){Za(this,t)}var e=t.prototype;return e.getEventsFromKeys=function(n){var u=typeof n=="string"?[n]:n;return t.events.filter(function(a){return u.includes(a.key)})},t}();nn.events=Ya;function eo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var rn=[],$e=function(){function t(r){eo(this,t),this.registeredControlTypes=new Set,this.controlConfigMap=new Map,this._controls=[],this._type=r,this._initControls(r)}var e=t.prototype;return e.registerControlConfig=function(n,u){return this.controlConfigMap.set(n,u),this},e.getControlConfig=function(n){return this.controlConfigMap.get(n)},e.getControls=function(){return this._controls},e.register=function(n){n.__is_control__||Q("".concat(n.name," is not a Control"));var u=this._controls.findIndex(function(a){return a.controlType===n.controlType});return u>-1&&(Z("The ".concat(n.controlType," is repeat register, So it overwrites the one that was registered before.")),this._controls.splice(u,1)),this.registeredControlTypes.add(n.controlType),this._controls.push(n),this},e.isLayoutControl=function(n){return n.controlType===q.LAYOUT},e.isFormControl=function(n){return n.controlType===q.FORM},e.isListControl=function(n){return n.controlType===q.LIST},e.isColumnControl=function(n){return n.controlType===q.COLUMN},e.createControl=function(n,u){var a=this;if(Array.isArray(n))return n.map(function(f){return a.createControl(f,u)});n.children&&(n.children=n.children.map(function(f){return a.createControl(f,u)})),this.isListControl(n)&&n.props.headers&&(n.props.headers=n.props.headers.map(function(f){return a.createControl(f,u)}));var o=this.getControlFormType(n.type);if(o){var s=n;if(typeof u=="function"){var c=u(s);c&&(s=c)}var l=new o(s);return l}else Q("The constructor of ".concat(n.type," could not be found, please confirm that the constructor has been registered"))},e.createControlInstance=function(n,u){var a=this.getControlFormType(n);if(a)return new a(u)},e.getControlFormType=function(n){return this._controls.find(function(u){return u.controlType===n})},e._initControls=function(n){var u=this;this.constructor.staticControls.forEach(function(a){u.register(a[n])})},t.register=function(n){var u=n.Designer,a=n.Runtime;(!u||!a||!u.__is_control__||!a.__is_control__)&&Q("".concat(n," is can't register as a Control"));var o=this.staticControls.findIndex(function(s){return s.Designer.controlType===u.controlType});return o>-1&&(Z("The ".concat(u.controlType," is repeat register, So it overwrites the one that was registered before.")),this.staticControls.splice(o,1)),this.staticRegisteredTypes.add(u.controlType),this.staticControls.push(n),this},t}();$e.staticControls=rn,$e.staticRegisteredTypes=new Set(rn.map(function(t){return t.Designer.controlType})),$e.staticRegisteredConfigs=new Map;function re(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var me=function t(e){re(this,t);var r;this.dataCode=(r=e==null?void 0:e.dataCode)!==null&&r!==void 0?r:"";var n;this.fieldCode=(n=e==null?void 0:e.fieldCode)!==null&&n!==void 0?n:"";var u;this.fieldType=(u=e==null?void 0:e.fieldType)!==null&&u!==void 0?u:""},k=function t(){re(this,t)},Me=function t(e){re(this,t);var r;this.amount=(r=e==null?void 0:e.amount)!==null&&r!==void 0?r:"";var n;this.currency=(n=e==null?void 0:e.currency)!==null&&n!==void 0?n:at.CNY},Oe=function t(e){re(this,t);var r;this.min=(r=e==null?void 0:e.min)!==null&&r!==void 0?r:"";var n;this.max=(n=e==null?void 0:e.max)!==null&&n!==void 0?n:""},Pe=function t(e){re(this,t);var r;this.city=(r=e==null?void 0:e.city)!==null&&r!==void 0?r:"";var n;this.cityDisplay=(n=e==null?void 0:e.cityDisplay)!==null&&n!==void 0?n:"";var u;this.district=(u=e==null?void 0:e.district)!==null&&u!==void 0?u:"";var a;this.districtDisplay=(a=e==null?void 0:e.districtDisplay)!==null&&a!==void 0?a:"";var o;this.province=(o=e==null?void 0:e.province)!==null&&o!==void 0?o:"";var s;this.provinceDisplay=(s=e==null?void 0:e.provinceDisplay)!==null&&s!==void 0?s:""},Le=function t(e){re(this,t);var r;this.result=(r=e==null?void 0:e.result)!==null&&r!==void 0?r:0;var n;this.unit=(n=e==null?void 0:e.unit)!==null&&n!==void 0?n:""},at;(function(t){t.CNY="CNY",t.USD="USD",t.JPY="JPY",t.EUR="EUR",t.INR="INR",t.IDR="IDR",t.BRL="BRL",t.AED="AED",t.AUD="AUD",t.CAD="CAD",t.EGP="EGP",t.GBP="GBP",t.ZAR="ZAR",t.KRW="KRW",t.MAD="MAD",t.MXN="MXN",t.MYR="MYR",t.PHP="PHP",t.PLN="PLN",t.RUB="RUB",t.SGD="SGD",t.THB="THB",t.TRY="TRY",t.TWD="TWD",t.VND="VND",t.HKD="HKD",t.IEP="IEP"})(at||(at={}));var un;(function(t){t.REQUIRED="required",t.IS_HIDE="isHide",t.IS_SHOW_UNIT="isShowUnit",t.IMD_SEARCH="immediatelySearch",t.MULTIPLE="multiple",t.SUBMIT_SELECT_CURRENCY="submitSelectCurrency",t.CAPTION="caption",t.IS_HIDE_CAPTION="isHideCaption",t.DEFAULT_SHOW_OPTIONS="defaultShowOptions",t.CAN_SEARCH="canSearch",t.CAN_CHECK="canCheck",t.CAN_EDIT="canEdit",t.CAN_DELETE="canDelete",t.SHOW_UPPER_CASE="showUpperCase",t.MICROMETER="micrometer",t.PRECISION="precision",t.PERCENTAGE="percentage",t.OPTIONAL_LEVEL="optionalLevel",t.CONTAINS_SUB_NODE="containsSubNode",t.DEFAULT_COLLAPSE="defaultCollapse",t.CAN_VIEW_FORM="canViewForm",t.SERVER_PAGINATION="serverPagination",t.IS_SHOW_CAPTION_TIP="isShowCaptionTip",t.ENCRYPTED="encrypted",t.IS_INLINE_EDIT="isInlineEdit",t.REVISIONS_MODE="revisionsMode"})(un||(un={}));var ot;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.READONLY=1]="READONLY",t[t.EDITABLE=2]="EDITABLE",t[t.PRINT=5]="PRINT"})(ot||(ot={}));var to=function t(e){re(this,t);var r;this.width=(r=e==null?void 0:e.width)!==null&&r!==void 0?r:"";var n;this.height=(n=e==null?void 0:e.height)!==null&&n!==void 0?n:"";var u;this.widthConfig=(u=e==null?void 0:e.widthConfig)!==null&&u!==void 0?u:"fill";var a;this.heightConfig=(a=e==null?void 0:e.heightConfig)!==null&&a!==void 0?a:"fill"};function no(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function st(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ro(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function xe(t,e,r){return ro()?xe=Reflect.construct:xe=function(u,a,o){var s=[null];s.push.apply(s,a);var c=Function.bind.apply(u,s),l=new c;return o&&Ee(l,o.prototype),l},xe.apply(null,arguments)}function ve(t){return ve=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ve(t)}function io(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ee(t,e)}function uo(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function ao(t,e){return e&&(oo(e)==="object"||typeof e=="function")?e:no(t)}function Ee(t,e){return Ee=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},Ee(t,e)}var oo=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function ct(t){var e=typeof Map=="function"?new Map:void 0;return ct=function(n){if(n===null||!uo(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(n))return e.get(n);e.set(n,u)}function u(){return xe(n,arguments,ve(this).constructor)}return u.prototype=Object.create(n.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Ee(u,n)},ct(t)}function so(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function co(t){var e=so();return function(){var n=ve(t),u;if(e){var a=ve(this).constructor;u=Reflect.construct(n,arguments,a)}else u=n.apply(this,arguments);return ao(this,u)}}var an=function t(e){st(this,t),this.isHide={type:"boolean"}},on=function(t){io(r,t);var e=co(r);function r(n){return st(this,r),e.call(this)}return r}(ct(Array)),ie=function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";st(this,t);var n;this.isHide=(n=e==null?void 0:e.isHide)!==null&&n!==void 0?n:!1,this.style=new to(e==null?void 0:e.style);var u;this.caption=(u=e==null?void 0:e.caption)!==null&&u!==void 0?u:r};ie.Rules=an,ie.RuntimeRules=on;function H(){return H=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},H.apply(this,arguments)}function lo(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function lt(t){return lt=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},lt(t)}function je(t,e){return je=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},je(t,e)}function fo(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function Ne(t,e,r){return fo()?Ne=Reflect.construct:Ne=function(u,a,o){var s=[null];s.push.apply(s,a);var c=Function.bind.apply(u,s),l=new c;return o&&je(l,o.prototype),l},Ne.apply(null,arguments)}function po(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function ft(t){var e=typeof Map=="function"?new Map:void 0;return ft=function(n){if(n===null||!po(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(n))return e.get(n);e.set(n,u)}function u(){return Ne(n,arguments,lt(this).constructor)}return u.prototype=Object.create(n.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),je(u,n)},ft(t)}var ho=/%[sdj%]/g,sn=function(){};typeof process!="undefined"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window!="undefined"&&typeof document!="undefined"&&(sn=function(e,r){typeof console!="undefined"&&console.warn&&r.every(function(n){return typeof n=="string"})&&console.warn(e,r)});function dt(t){if(!t||!t.length)return null;var e={};return t.forEach(function(r){var n=r.field;e[n]=e[n]||[],e[n].push(r)}),e}function x(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=1,u=e[0],a=e.length;if(typeof u=="function")return u.apply(null,e.slice(1));if(typeof u=="string"){var o=String(u).replace(ho,function(s){if(s==="%%")return"%";if(n>=a)return s;switch(s){case"%s":return String(e[n++]);case"%d":return Number(e[n++]);case"%j":try{return JSON.stringify(e[n++])}catch(c){return"[Circular]"}break;default:return s}});return o}return u}function go(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function R(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||go(e)&&typeof t=="string"&&!t)}function yo(t,e,r){var n=[],u=0,a=t.length;function o(s){n.push.apply(n,s),u++,u===a&&r(n)}t.forEach(function(s){e(s,o)})}function cn(t,e,r){var n=0,u=t.length;function a(o){if(o&&o.length){r(o);return}var s=n;n=n+1,s<u?e(t[s],a):r([])}a([])}function mo(t){var e=[];return Object.keys(t).forEach(function(r){e.push.apply(e,t[r])}),e}var ln=function(t){lo(e,t);function e(r,n){var u;return u=t.call(this,"Async Validation Error")||this,u.errors=r,u.fields=n,u}return e}(ft(Error));function vo(t,e,r,n){if(e.first){var u=new Promise(function(p,h){var g=function(b){return n(b),b.length?h(new ln(b,dt(b))):p()},E=mo(t);cn(E,r,g)});return u.catch(function(p){return p}),u}var a=e.firstFields||[];a===!0&&(a=Object.keys(t));var o=Object.keys(t),s=o.length,c=0,l=[],f=new Promise(function(p,h){var g=function(y){if(l.push.apply(l,y),c++,c===s)return n(l),l.length?h(new ln(l,dt(l))):p()};o.length||(n(l),p()),o.forEach(function(E){var y=t[E];a.indexOf(E)!==-1?cn(y,r,g):yo(y,r,g)})});return f.catch(function(p){return p}),f}function fn(t){return function(e){return e&&e.message?(e.field=e.field||t.fullField,e):{message:typeof e=="function"?e():e,field:e.field||t.fullField}}}function dn(t,e){if(e){for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];typeof n=="object"&&typeof t[r]=="object"?t[r]=H(H({},t[r]),n):t[r]=n}}return t}function pn(t,e,r,n,u,a){t.required&&(!r.hasOwnProperty(t.field)||R(e,a||t.type))&&n.push(x(u.messages.required,t.fullField))}function Eo(t,e,r,n,u){(/^\s+$/.test(e)||e==="")&&n.push(x(u.messages.whitespace,t.fullField))}var pt={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},be={integer:function(e){return be.number(e)&&parseInt(e,10)===e},float:function(e){return be.number(e)&&!be.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(r){return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!be.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&!!e.match(pt.email)&&e.length<255},url:function(e){return typeof e=="string"&&!!e.match(pt.url)},hex:function(e){return typeof e=="string"&&!!e.match(pt.hex)}};function bo(t,e,r,n,u){if(t.required&&e===void 0){pn(t,e,r,n,u);return}var a=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=t.type;a.indexOf(o)>-1?be[o](e)||n.push(x(u.messages.types[o],t.fullField,t.type)):o&&typeof e!==t.type&&n.push(x(u.messages.types[o],t.fullField,t.type))}function Ao(t,e,r,n,u){var a=typeof t.len=="number",o=typeof t.min=="number",s=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=e,f=null,p=typeof e=="number",h=typeof e=="string",g=Array.isArray(e);if(p?f="number":h?f="string":g&&(f="array"),!f)return!1;g&&(l=e.length),h&&(l=e.replace(c,"_").length),a?l!==t.len&&n.push(x(u.messages[f].len,t.fullField,t.len)):o&&!s&&l<t.min?n.push(x(u.messages[f].min,t.fullField,t.min)):s&&!o&&l>t.max?n.push(x(u.messages[f].max,t.fullField,t.max)):o&&s&&(l<t.min||l>t.max)&&n.push(x(u.messages[f].range,t.fullField,t.min,t.max))}var oe="enum";function Bo(t,e,r,n,u){t[oe]=Array.isArray(t[oe])?t[oe]:[],t[oe].indexOf(e)===-1&&n.push(x(u.messages[oe],t.fullField,t[oe].join(", ")))}function Co(t,e,r,n,u){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(e)||n.push(x(u.messages.pattern.mismatch,t.fullField,e,t.pattern));else if(typeof t.pattern=="string"){var a=new RegExp(t.pattern);a.test(e)||n.push(x(u.messages.pattern.mismatch,t.fullField,e,t.pattern))}}}var A={required:pn,whitespace:Eo,type:bo,range:Ao,enum:Bo,pattern:Co};function wo(t,e,r,n,u){var a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(R(e,"string")&&!t.required)return r();A.required(t,e,n,a,u,"string"),R(e,"string")||(A.type(t,e,n,a,u),A.range(t,e,n,a,u),A.pattern(t,e,n,a,u),t.whitespace===!0&&A.whitespace(t,e,n,a,u))}r(a)}function So(t,e,r,n,u){var a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(R(e)&&!t.required)return r();A.required(t,e,n,a,u),e!==void 0&&A.type(t,e,n,a,u)}r(a)}function Fo(t,e,r,n,u){var a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(e===""&&(e=void 0),R(e)&&!t.required)return r();A.required(t,e,n,a,u),e!==void 0&&(A.type(t,e,n,a,u),A.range(t,e,n,a,u))}r(a)}function _o(t,e,r,n,u){var a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(R(e)&&!t.required)return r();A.required(t,e,n,a,u),e!==void 0&&A.type(t,e,n,a,u)}r(a)}function Do(t,e,r,n,u){var a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(R(e)&&!t.required)return r();A.required(t,e,n,a,u),R(e)||A.type(t,e,n,a,u)}r(a)}function Io(t,e,r,n,u){var a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(R(e)&&!t.required)return r();A.required(t,e,n,a,u),e!==void 0&&(A.type(t,e,n,a,u),A.range(t,e,n,a,u))}r(a)}function Ro(t,e,r,n,u){var a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(R(e)&&!t.required)return r();A.required(t,e,n,a,u),e!==void 0&&(A.type(t,e,n,a,u),A.range(t,e,n,a,u))}r(a)}function $o(t,e,r,n,u){var a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(e==null&&!t.required)return r();A.required(t,e,n,a,u,"array"),e!=null&&(A.type(t,e,n,a,u),A.range(t,e,n,a,u))}r(a)}function Mo(t,e,r,n,u){var a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(R(e)&&!t.required)return r();A.required(t,e,n,a,u),e!==void 0&&A.type(t,e,n,a,u)}r(a)}var Oo="enum";function Po(t,e,r,n,u){var a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(R(e)&&!t.required)return r();A.required(t,e,n,a,u),e!==void 0&&A[Oo](t,e,n,a,u)}r(a)}function Lo(t,e,r,n,u){var a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(R(e,"string")&&!t.required)return r();A.required(t,e,n,a,u),R(e,"string")||A.pattern(t,e,n,a,u)}r(a)}function xo(t,e,r,n,u){var a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(R(e,"date")&&!t.required)return r();if(A.required(t,e,n,a,u),!R(e,"date")){var s;e instanceof Date?s=e:s=new Date(e),A.type(t,s,n,a,u),s&&A.range(t,s.getTime(),n,a,u)}}r(a)}function jo(t,e,r,n,u){var a=[],o=Array.isArray(e)?"array":typeof e;A.required(t,e,n,a,u,o),r(a)}function ht(t,e,r,n,u){var a=t.type,o=[],s=t.required||!t.required&&n.hasOwnProperty(t.field);if(s){if(R(e,a)&&!t.required)return r();A.required(t,e,n,o,u,a),R(e,a)||A.type(t,e,n,o,u)}r(o)}function No(t,e,r,n,u){var a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(R(e)&&!t.required)return r();A.required(t,e,n,a,u)}r(a)}var Ae={string:wo,method:So,number:Fo,boolean:_o,regexp:Do,integer:Io,float:Ro,array:$o,object:Mo,enum:Po,pattern:Lo,date:xo,url:ht,hex:ht,email:ht,required:jo,any:No};function gt(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var yt=gt();function Y(t){this.rules=null,this._messages=yt,this.define(t)}Y.prototype={messages:function(e){return e&&(this._messages=dn(gt(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if(typeof e!="object"||Array.isArray(e))throw new Error("Rules must be an object");this.rules={};var r,n;for(r in e)e.hasOwnProperty(r)&&(n=e[r],this.rules[r]=Array.isArray(n)?n:[n])},validate:function(e,r,n){var u=this;r===void 0&&(r={}),n===void 0&&(n=function(){});var a=e,o=r,s=n;if(typeof o=="function"&&(s=o,o={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(),Promise.resolve();function c(y){var b,d=[],m={};function M(v){if(Array.isArray(v)){var D;d=(D=d).concat.apply(D,v)}else d.push(v)}for(b=0;b<y.length;b++)M(y[b]);d.length?m=dt(d):(d=null,m=null),s(d,m)}if(o.messages){var l=this.messages();l===yt&&(l=gt()),dn(l,o.messages),o.messages=l}else o.messages=this.messages();var f,p,h={},g=o.keys||Object.keys(this.rules);g.forEach(function(y){f=u.rules[y],p=a[y],f.forEach(function(b){var d=b;typeof d.transform=="function"&&(a===e&&(a=H({},a)),p=a[y]=d.transform(p)),typeof d=="function"?d={validator:d}:d=H({},d),d.validator=u.getValidationMethod(d),d.field=y,d.fullField=d.fullField||y,d.type=u.getType(d),d.validator&&(h[y]=h[y]||[],h[y].push({rule:d,value:p,source:a,field:y}))})});var E={};return vo(h,o,function(y,b){var d=y.rule,m=(d.type==="object"||d.type==="array")&&(typeof d.fields=="object"||typeof d.defaultField=="object");m=m&&(d.required||!d.required&&y.value),d.field=y.field;function M(K,F){return H(H({},F),{},{fullField:d.fullField+"."+K})}function v(K){K===void 0&&(K=[]);var F=K;if(Array.isArray(F)||(F=[F]),!o.suppressWarning&&F.length&&Y.warning("async-validator:",F),F.length&&d.message!==void 0&&(F=[].concat(d.message)),F=F.map(fn(d)),o.first&&F.length)return E[d.field]=1,b(F);if(!m)b(F);else{if(d.required&&!y.value)return d.message!==void 0?F=[].concat(d.message).map(fn(d)):o.error&&(F=[o.error(d,x(o.messages.required,d.field))]),b(F);var J={};if(d.defaultField)for(var Wn in y.value)y.value.hasOwnProperty(Wn)&&(J[Wn]=d.defaultField);J=H(H({},J),y.rule.fields);for(var fe in J)if(J.hasOwnProperty(fe)){var Uc=Array.isArray(J[fe])?J[fe]:[J[fe]];J[fe]=Uc.map(M.bind(null,fe))}var zn=new Y(J);zn.messages(o.messages),y.rule.options&&(y.rule.options.messages=o.messages,y.rule.options.error=o.error),zn.validate(y.value,y.rule.options||o,function(Vt){var de=[];F&&F.length&&de.push.apply(de,F),Vt&&Vt.length&&de.push.apply(de,Vt),b(de.length?de:null)})}}var D;d.asyncValidator?D=d.asyncValidator(d,y.value,v,y.source,o):d.validator&&(D=d.validator(d,y.value,v,y.source,o),D===!0?v():D===!1?v(d.message||d.field+" fails"):D instanceof Array?v(D):D instanceof Error&&v(D.message)),D&&D.then&&D.then(function(){return v()},function(K){return v(K)})},function(y){c(y)})},getType:function(e){if(e.type===void 0&&e.pattern instanceof RegExp&&(e.type="pattern"),typeof e.validator!="function"&&e.type&&!Ae.hasOwnProperty(e.type))throw new Error(x("Unknown rule type %s",e.type));return e.type||"string"},getValidationMethod:function(e){if(typeof e.validator=="function")return e.validator;var r=Object.keys(e),n=r.indexOf("message");return n!==-1&&r.splice(n,1),r.length===1&&r[0]==="required"?Ae.required:Ae[this.getType(e)]||!1}},Y.register=function(e,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");Ae[e]=r},Y.warning=sn,Y.messages=yt,Y.validators=Ae;var To={required:"%s \u5FC5\u586B",maxLength:"%s \u8D85\u51FA\u6700\u5927\u957F\u5EA6\u9650\u5236",minLength:"%s \u5C0F\u4E8E\u6700\u5C0F\u957F\u5EA6\u9650\u5236",string:{range:"%s \u4E0D\u5728\u6307\u5B9A\u957F\u5EA6\u5185"}};function Vo(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=new Y(t);return r.messages(Object.assign(To,e)),r}var qo=new tn;function mt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Uo(t){if(Array.isArray(t))return t}function ko(t){if(Array.isArray(t))return mt(t)}function hn(t,e,r,n,u,a,o){try{var s=t[a](o),c=s.value}catch(l){r(l);return}s.done?e(c):Promise.resolve(c).then(n,u)}function gn(t){return function(){var e=this,r=arguments;return new Promise(function(n,u){var a=t.apply(e,r);function o(c){hn(a,n,u,o,s,"next",c)}function s(c){hn(a,n,u,o,s,"throw",c)}o(void 0)})}}function Ho(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Wo(t,e,r){return e&&yn(t.prototype,e),r&&yn(t,r),t}function zo(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mn(t,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function vn(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ko(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Jo(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function En(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable}))),n.forEach(function(u){zo(t,u,r[u])})}return t}function Go(t){return Uo(t)||vn(t)||bn(t,i)||Ko()}function vt(t){return ko(t)||vn(t)||bn(t)||Jo()}function bn(t,e){if(!!t){if(typeof t=="string")return mt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mt(t,e)}}var W=function(){function e(n){var u=this;Ho(this,e),this.setting=[],this.eventKeys=[],this.customEvents=[],this.parent=null,this.updateSetting=Bn,this.removeSetting=An,this._callControlHooks("preInstance",n);var a=mn(this,e)?this.constructor:void 0,o=a.controlName,s=a.controlIcon,c=a.controlType,l=a.controlFieldType,f=a.controlEventKeys,p=a.controlCustomEvents,h=a.name,g=a.setting;o&&s&&c||Gt("The ".concat(h," controlName,controlIcon,controlType is not define"));var E;this.id=(E=n==null?void 0:n.id)!==null&&E!==void 0?E:Qe(10),this.name=o,this.icon=s;var y;this.type=(y=n==null?void 0:n.type)!==null&&y!==void 0?y:c,this.props=new ie(n==null?void 0:n.props,(mn(this,e)?this.constructor:void 0).controlName);var b;this.controlType=(b=n==null?void 0:n.controlType)!==null&&b!==void 0?b:"base",this.setting=S(g);var d;this.fieldType=(d=n==null?void 0:n.fieldType)!==null&&d!==void 0?d:l,this.eventKeys=S(f),this.customEvents=S(p),Promise.resolve().then(function(){u._callControlHooks("postInstance",n)})}var r=e.prototype;return r._callControlHooks=function(){for(var u=arguments.length,a=new Array(u),o=0;o<u;o++)a[o]=arguments[o];var s,c=Go(a),l=c[0],f=c.slice(1);return(s=qo).emit.apply(s,[l,this].concat(vt(f)))},r.preUpdate=function(u,a){this._callControlHooks("preUpdateProps",u,a)},r.postUpdate=function(u,a){this._callControlHooks("postUpdateProps",u,a)},r.updateProps=function(u,a){this.preUpdate(u,a),Qt(this.props,u,a),this.postUpdate(u,a)},r.preValidate=function(){var u=this;return gn(V.default.mark(function a(){var o,s,c;return V.default.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return o=En({},u.rules),f.next=3,u._callControlHooks("preValidate",o);case 3:return s=f.sent,c=s[s.length-1],f.abrupt("return",c===!1?void 0:c);case 6:case"end":return f.stop()}},a)}))()},r.validate=function(u,a){var o=this;return gn(V.default.mark(function s(){var c,l,f;return V.default.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,o.preValidate();case 2:return c=h.sent,l=c!==void 0?c:En({},o.rules),Array.isArray(a)&&a.forEach(function(g){l.hasOwnProperty(g)&&delete l[g]}),f=Vo(l,u),h.prev=6,h.next=9,f.validate(o.props);case 9:return h.abrupt("return",!0);case 12:throw h.prev=12,h.t0=h.catch(6),h.t0.control||(h.t0.control=o),h.t0;case 16:case"end":return h.stop()}},s,null,[[6,12]])}))()},r.toDataBindModel=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,a=this.fieldType,o=this.id,s=this.type,c=this.props,l=c.dataBind,f=c.datasourceBind,p=c.optionConfig,h=c.caption,g=c.required,E=c.maxLength,y=c.options,b=c.encrypted,d=c.encryptedMode;if(!(!a&&!l&&!f)){var m={parentId:u,fieldType:a,controlId:o,caption:h,type:s,props:{}};switch(l&&(m.dataBind=l),p){case"datasource":case void 0:f&&(m.datasourceBind=f);break;case"custom":m.props.options=y;break}return g!==void 0&&(m.required=g),E!==void 0&&(m.maxLength=E),b!==void 0&&(m.encrypted=b),d!==void 0&&(m.encryptedMode=d),m}},r.preToSchema=function(){this._callControlHooks("preToSchema",this)},r.toSchema=function(){return this.preToSchema(),{id:this.id,type:this.type,props:S(this.props),fieldType:this.fieldType,controlType:this.controlType}},e.updateBasicControl=function(u,a){if(u==="setting"){if(a.add){var o;(o=this.setting).push.apply(o,vt(a.add))}a.remove&&this.removeSettingItem(a.remove),a.update}},Wo(e,[{key:"rules",get:function(){var u=this.props.constructor.Rules;return u?new u(this.props):{}}}]),e}();W.controlName="\u63A7\u4EF6",W.controlIcon="icon",W.controlType="control",W.controlEventKeys=[],W.controlCustomEvents=[],W.setting=[],W.__is_control__=!0,W.removeSettingItem=An,W.updateSettingItem=Bn;function An(t){var e=this,r=Array.isArray(t)?t:[t];r.forEach(function(n){var u=typeof n!="string",a=e.setting.findIndex(function(c){return c.key===(u?n.key:n)});if(a!==-1){var o,s;u?e.setting[a].showItems=(o=e.setting[a].showItems)===null||o===void 0?void 0:o.filter(function(c){return!n.hideItems.includes(c)}):e.setting.splice(a,1),u&&!(!((s=e.setting[a].showItems)===null||s===void 0)&&s.length)&&e.setting.splice(a,1)}})}function Bn(t,e){var r=this,n=typeof t=="string"?[t]:t;n.forEach(function(u){var a=r.setting.find(function(l){return l.key===u});if(a){if(typeof e=="boolean")a.visible=e;else if(typeof e=="object"){var o,s=(o=e.type)!==null&&o!==void 0?o:"replace";if(s==="replace")a.showItems=e.showItems;else{var c;(c=a.showItems).push.apply(c,vt(e.showItems))}}}})}function Xo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Qo(t,e,r){return e&&Cn(t.prototype,e),r&&Cn(t,r),t}function Zo(t,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var se=function(){function e(r){Xo(this,e),this.customEvents=[],this.parent=null;var n=Zo(this,e)?this.constructor:void 0,u=n.controlType,a=n.controlFieldType,o=n.name,s=n.controlCustomEvents;u||Gt("The ".concat(o," controlType is not define"));var c;this.id=(c=r==null?void 0:r.id)!==null&&c!==void 0?c:Qe(10);var l;this.type=(l=r==null?void 0:r.type)!==null&&l!==void 0?l:u,this.props=new ie(r==null?void 0:r.props),this.customEvents=s;var f;this.controlType=(f=r==null?void 0:r.controlType)!==null&&f!==void 0?f:"base";var p;this.fieldType=(p=r==null?void 0:r.fieldType)!==null&&p!==void 0?p:a;var h;this.pageStatus=(h=r==null?void 0:r.pageStatus)!==null&&h!==void 0?h:ot.UNKNOWN}return Qo(e,[{key:"rules",get:function(){var n=this.props.constructor.RuntimeRules;if(n){var u=new n(this.props);return Array.from(u)}return[]}}]),e}();se.controlType="control",se.__is_control__=!0,se.controlCustomEvents=[];function Yo(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Et(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Te(t){return Te=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Te(t)}function bt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&At(t,e)}function es(t,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function ts(t,e){return e&&(ns(e)==="object"||typeof e=="function")?e:Yo(t)}function At(t,e){return At=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},At(t,e)}var ns=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function rs(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Bt(t){var e=rs();return function(){var n=Te(t),u;if(e){var a=Te(this).constructor;u=Reflect.construct(n,arguments,a)}else u=n.apply(this,arguments);return ts(this,u)}}var is=function(t){bt(r,t);var e=Bt(r);function r(n){Et(this,r);var u;u=e.call(this,n),u.dataBind={},u.caption={type:"string",required:!0,message:N.getMessage("pleaseEnterCaption")},u.isHideCaption={type:"boolean"},u.labelPosition={type:"enum",enum:["top","left"]},u.defaultState={type:"enum",enum:["default","readonly"]},u.required={type:"boolean"},u.captionTip={type:"string",required:!1,message:N.getMessage("pleaseEnterCaptionTip")};var a={fieldCode:{type:"string",required:!0,message:N.getMessage("pleaseEnterFieldCode")},dataCode:{type:"string",required:!0,message:N.getMessage("pleaseEnterFieldCode")}};if(es(n.dataBind,me))u.dataBind={type:"object",required:!0,fields:S(a),message:N.getMessage("pleaseEnterFieldCode")};else{var o={type:"object",required:!0,fields:{},message:N.getMessage("pleaseEnterFieldCode")};Object.keys(n.dataBind).forEach(function(s){o.fields[s]={type:"object",required:!0,fields:S(a),message:N.getMessage("pleaseEnterFieldCode")}}),u.dataBind=o}return n.isShowCaptionTip&&(u.captionTip.required=!0),u}return r}(an),us=function(t){bt(r,t);var e=Bt(r);function r(n){Et(this,r);var u;return u=e.call(this,n),u.push({type:"string",required:n.isHide?!1:n.required,message:n.requiredMessage!==""?n.requiredMessage:N.getMessage("runtimeRequired",{caption:n.caption})}),u}return r}(on),Ct=function(t){bt(r,t);var e=Bt(r);function r(n){Et(this,r);var u;u=e.call(this,n);var a;u.caption=(a=n==null?void 0:n.caption)!==null&&a!==void 0?a:"";var o;u.isHideCaption=(o=n==null?void 0:n.isHideCaption)!==null&&o!==void 0?o:!1;var s;u.isShowCaptionTip=(s=n==null?void 0:n.isShowCaptionTip)!==null&&s!==void 0?s:!1;var c;u.captionTip=(c=n==null?void 0:n.captionTip)!==null&&c!==void 0?c:"";var l;u.defaultState=(l=n==null?void 0:n.defaultState)!==null&&l!==void 0?l:"default";var f;u.labelPosition=(f=n==null?void 0:n.labelPosition)!==null&&f!==void 0?f:"top";var p;u.placeholder=(p=n==null?void 0:n.placeholder)!==null&&p!==void 0?p:"";var h;u.required=(h=n==null?void 0:n.required)!==null&&h!==void 0?h:!1;var g;u.requiredMessage=(g=n==null?void 0:n.requiredMessage)!==null&&g!==void 0?g:"",u.dataBind=new me(n==null?void 0:n.dataBind);var E;return u.defaultValue=(E=n==null?void 0:n.defaultValue)!==null&&E!==void 0?E:"",u}return r}(ie);Ct.Rules=is,Ct.RuntimeRules=us;function as(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function os(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ve(t){return Ve=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ve(t)}function ss(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&wt(t,e)}function cs(t,e){return e&&(ls(e)==="object"||typeof e=="function")?e:as(t)}function wt(t,e){return wt=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},wt(t,e)}var ls=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function fs(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function ds(t){var e=fs();return function(){var n=Ve(t),u;if(e){var a=Ve(this).constructor;u=Reflect.construct(n,arguments,a)}else u=n.apply(this,arguments);return cs(this,u)}}var z=function(t){ss(r,t);var e=ds(r);function r(n){os(this,r);var u;return u=e.call(this,n),u.controlType="form",u.props=new Ct(n==null?void 0:n.props),u}return r}(se);function ps(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qe(t){return qe=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},qe(t)}function gs(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&St(t,e)}function ys(t,e){return e&&(ms(e)==="object"||typeof e=="function")?e:ps(t)}function St(t,e){return St=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},St(t,e)}var ms=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function vs(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Es(t){var e=vs();return function(){var n=qe(t),u;if(e){var a=qe(this).constructor;u=Reflect.construct(n,arguments,a)}else u=n.apply(this,arguments);return ys(this,u)}}var wn=function(t){gs(r,t);var e=Es(r);function r(n){return hs(this,r),e.call(this,n)}return r}(ie);function Ft(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function bs(t){if(Array.isArray(t))return Ft(t)}function As(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Bs(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Sn(t){return bs(t)||As(t)||Cs(t)||Bs()}function Cs(t,e){if(!!t){if(typeof t=="string")return Ft(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Ft(t,e)}}function ws(t,e){var r;!((r=Object.getOwnPropertyDescriptors(t)[e])===null||r===void 0)&&r.enumerable&&Object.defineProperty(t,e,{enumerable:!1})}function Fn(t,e){t.parent=e,ws(t,"parent")}function Ss(t,e){t.forEach(function(r){Fn(r,e)})}var _n=Symbol("targetKey");function Dn(t){var e;return(e=t[_n])!==null&&e!==void 0?e:t}function In(t,e){return Ss(t,e),new Proxy(t,{get:function(n,u){for(var a=arguments.length,o=new Array(a>2?a-2:0),s=2;s<a;s++)o[s-2]=arguments[s];var c;return u===_n?n:(c=Reflect).get.apply(c,[n,u].concat(Sn(o)))},set:function(n,u,a){for(var o=arguments.length,s=new Array(o>3?o-3:0),c=3;c<o;c++)s[c-3]=arguments[c];var l;if(ae(t)&&u==="length"&&a===t.length)return!0;var f=(l=Reflect).set.apply(l,[n,u,a].concat(Sn(s)));return U(a)&&Fn(a,e),f}})}function Ue(t,e,r,n){var u=n!=null?n:t,a=In(Dn(r!=null?r:[]),u);Object.defineProperty(t,e,{get:function(){return a},set:function(s){a=In(Dn(s),u)},enumerable:!0})}function _t(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Fs(t){if(Array.isArray(t))return _t(t)}function Rn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $n(t,e,r,n,u,a,o){try{var s=t[a](o),c=s.value}catch(l){r(l);return}s.done?e(c):Promise.resolve(c).then(n,u)}function _s(t){return function(){var e=this,r=arguments;return new Promise(function(n,u){var a=t.apply(e,r);function o(c){$n(a,n,u,o,s,"next",c)}function s(c){$n(a,n,u,o,s,"throw",c)}o(void 0)})}}function Ds(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Is(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ce(t,e,r){return typeof Reflect!="undefined"&&Reflect.get?ce=Reflect.get:ce=function(u,a,o){var s=Ns(u,a);if(!!s){var c=Object.getOwnPropertyDescriptor(s,a);return c.get?c.get.call(o):c.value}},ce(t,e,r||t)}function ee(t){return ee=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ee(t)}function Rs(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Dt(t,e)}function $s(t,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function Ms(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Os(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ps(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(u){return Object.getOwnPropertyDescriptor(r,u).enumerable}))),n.forEach(function(u){Is(t,u,r[u])})}return t}function Ls(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(t,u).enumerable})),r.push.apply(r,n)}return r}function xs(t,e){return e=e!=null?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Ls(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}function js(t,e){return e&&(Ts(e)==="object"||typeof e=="function")?e:Rn(t)}function Dt(t,e){return Dt=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},Dt(t,e)}function Ns(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=ee(t),t!==null););return t}function Mn(t){return Fs(t)||Ms(t)||Vs(t)||Os()}var Ts=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function Vs(t,e){if(!!t){if(typeof t=="string")return _t(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _t(t,e)}}function qs(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Us(t){var e=qs();return function(){var n=ee(t),u;if(e){var a=ee(this).constructor;u=Reflect.construct(n,arguments,a)}else u=n.apply(this,arguments);return js(this,u)}}var ks=1e4,On=function(e){Rs(n,e);var r=Us(n);function n(a){Ds(this,n);var o;o=r.call(this,a),o.controlType="layout";var s=$s(this,n)?this.constructor:void 0,c=s.excludes,l=s.childrenMaxLength;return o.props=new wn(a==null?void 0:a.props),Ue(Rn(o),"children",a==null?void 0:a.children),o.excludes=S(c),o.childrenMaxLength=l,o}var u=n.prototype;return u.judgeExcludesChildren=function(o){return this.excludes===!1||Array.isArray(this.excludes)&&!this.excludes.includes(o)},u.judgeJoinChildren=function(o){var s=this.judgeExcludesChildren(o);return s&&this.childrenMaxLength>this.children.length},u.validate=function(o,s){var c=this,l=this,f=function(){return ce(ee(n.prototype),"validate",c)};return _s(V.default.mark(function p(){return V.default.wrap(function(g){for(;;)switch(g.prev=g.next){case 0:return g.next=2,f().call(l,o,s);case 2:return g.next=4,Promise.all(l.children.map(function(E){return E.validate(o,s)}));case 4:return g.abrupt("return",!0);case 5:case"end":return g.stop()}},p)}))()},u.toDataBindModel=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,s=ce(ee(n.prototype),"toDataBindModel",this).call(this),c=s?[s]:[];return this.children.reduce(function(l,f){var p=f.toDataBindModel(o);if(Array.isArray(p)){var h=p.filter(function(g){return!!g});return Mn(l).concat(Mn(h))}return p&&l.push(p),l},c)},u.toSchema=function(){var o=ce(ee(n.prototype),"toSchema",this).call(this),s=this.children.map(function(c){var l=c.toSchema();return l});return xs(Ps({},o),{children:s})},n}(W);On.excludes=!1,On.childrenMaxLength=ks;function Pn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Hs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function ke(t){return ke=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ke(t)}function Ws(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&It(t,e)}function zs(t,e){return e&&(Ks(e)==="object"||typeof e=="function")?e:Pn(t)}function It(t,e){return It=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},It(t,e)}var Ks=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function Js(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Gs(t){var e=Js();return function(){var n=ke(t),u;if(e){var a=ke(this).constructor;u=Reflect.construct(n,arguments,a)}else u=n.apply(this,arguments);return zs(this,u)}}var Xs=function(t){Ws(r,t);var e=Gs(r);function r(n){Hs(this,r);var u;return u=e.call(this,n),u.controlType="layout",u.props=new wn(n==null?void 0:n.props),Ue(Pn(u),"children",n==null?void 0:n.children),u}return r}(se);function Ln(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function He(t){return He=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},He(t)}function Zs(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Rt(t,e)}function Ys(t,e){return e&&(ec(e)==="object"||typeof e=="function")?e:Ln(t)}function Rt(t,e){return Rt=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},Rt(t,e)}var ec=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function tc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function nc(t){var e=tc();return function(){var n=He(t),u;if(e){var a=He(this).constructor;u=Reflect.construct(n,arguments,a)}else u=n.apply(this,arguments);return Ys(this,u)}}var rc=function(t){Zs(r,t);var e=nc(r);function r(n,u){Qs(this,r);var a;return a=e.call(this,u),Ue(Ln(a),"headers",u==null?void 0:u.headers,n),a}return r}(ie);B.LIST;function $t(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ic(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function uc(t,e,r){return e&&xn(t.prototype,e),r&&xn(t,r),t}function We(t){return We=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},We(t)}function ac(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Mt(t,e)}function oc(t,e){return e&&(sc(e)==="object"||typeof e=="function")?e:$t(t)}function Mt(t,e){return Mt=Object.setPrototypeOf||function(n,u){return n.__proto__=u,n},Mt(t,e)}var sc=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function cc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function lc(t){var e=cc();return function(){var n=We(t),u;if(e){var a=We(this).constructor;u=Reflect.construct(n,arguments,a)}else u=n.apply(this,arguments);return oc(this,u)}}var ze=function(t){ac(r,t);var e=lc(r);function r(n){ic(this,r);var u;return u=e.call(this,n),u.controlType="list",u.props=new rc($t(u),n==null?void 0:n.props),Ue($t(u),"children",n==null?void 0:n.children),u}return uc(r,[{key:"length",get:function(){return this.children.length}}]),r}(se);function Ke(t){return t.controlType===q.LAYOUT||t.controlType===q.WRAP||t.controlType===q.LIST||t.controlType===q.SEARCH}function Be(t,e){Array.isArray(t)&&t.map(r=>{if(r.type===w.SUBTABLE){const n=r.getChildrenFormControl();e(r,n)}else Ke(r)?Be(r==null?void 0:r.children,e):r instanceof z&&e(r)})}function Ce(t,e){Array.isArray(t)&&t.map(r=>{r.type===w.DATA_VIEW||r.type===w.SIMPLE_SEARCH?e(r):Ke(r)&&Ce(r==null?void 0:r.children,e)})}class Ot extends $e{constructor(e){super("Runtime"),this._flatInstances=[],this._instanceMap={};const{schema:r}=e;this._schema=r,this._instance=this.createControl(r,e.beforeCreateInstance),this.getFlatInstances()}getFlatInstances(){const e=[],r={};return jn(this._instance,n=>{e.push(n),r[n.id]||(r[n.id]=[]),r[n.id].push(n)}),this._flatInstances=e,this._instanceMap=r,this._flatInstances}get schema(){return this._schema}get instance(){return this._instance}get flatInstances(){return this._flatInstances}get instanceMap(){return this._instanceMap}get rules(){let e={};return Ce(this._instance,r=>{e[r.id]=r.rules[0],Be(r.children,n=>{(n instanceof z||n instanceof ze)&&fc(e[r.id].fields,n)})}),e}get antdRules(){let e={};return Ce(this._instance,r=>{e[r.id]=r.rules[0],Be(r.children,n=>{(n instanceof z||n instanceof ze)&&dc(e[r.id].fields,n)})}),e}}function jn(t,e){Array.isArray(t)?t.map(r=>{e(r),Ke(r)&&jn(r.children,e)}):e(t)}function Pt(t){return t.props.isHide?!0:t.parent===null?!1:Pt(t.parent)}function fc(t,e){if(!Pt(e)){if(e instanceof z)t[e.id]=e.rules;else if(e.type===w.SUBTABLE){t[e.id]=e.rules;const r={type:"array",fields:{}};e.children.forEach((n,u)=>{ne(n.children,a=>{r.fields&&(r.fields[u]||(r.fields[u]={type:"object",required:!0,fields:{}}),r.fields[u].fields[a.id]=a.rules)})}),t[e.id].push(r)}}}function dc(t,e){Pt(e)||(e instanceof z?t[e.id]=e.rules:e.type===w.SUBTABLE&&e.children.length&&(t[e.id]=[],e.children.forEach(r=>{let n={};ne(r.children,u=>{n[u.id]=u.rules}),t[e.id].push(n)})))}class pc{constructor(e){const{state:r,emptyState:n,databindMapping:u,controlidMapping:a,fieldCodeState:o}=hc(e.instance);this.emptyState=n,this.state=r,this.fieldCodeState=o,this.dataBindMapping=u,this.controlIdMapping=a}setState(e,r,n){const u=this.controlIdMapping[e];u!==void 0?this.state[u.dataView][e]=r:n!==void 0?Object.keys(this.controlIdMapping).map(a=>{const o=this.controlIdMapping[a].dataView,s=this.controlIdMapping[a].children;s!==void 0&&Object.keys(s).map(c=>{c===e&&(this.state[o][a][n][e]=r)})}):this.state[e]=r}getState(e,r){if(this.state[e]!==void 0)return this.state[e];{const u=this.controlIdMapping[e];if(u!==void 0)return this.state[u.dataView][e];if(r!==void 0){let a;return Object.keys(this.controlIdMapping).map(o=>{const s=this.controlIdMapping[o].dataView,c=this.controlIdMapping[o].children;c!==void 0&&Object.keys(c).map(l=>{var f;l===e&&(a=(f=this.state[s][o][r])==null?void 0:f[e])})}),a}else{let a=[];return Object.keys(this.controlIdMapping).map(o=>{const s=this.controlIdMapping[o].dataView,c=this.controlIdMapping[o].children;c!==void 0&&Object.keys(c).map(l=>{l===e&&this.state[s][o].map(f=>{a.push(f[e])})})}),a}}}getFieldCodeState(e){if(this.fieldCodeState[e]!==void 0)return this.fieldCodeState[e];{const n=this.controlIdMapping[e];if(n.dataBind.dataCode,n!==void 0){if(n.dataView===e)return this.fieldCodeState[e];{const u=n.dataBind.dataCode;return this.fieldCodeState[n.dataView][u]||this.fieldCodeState[n.dataView]}}}}getEmptyState(e){if(this.emptyState[e]!==void 0)return this.emptyState[e];{const n=this.controlIdMapping[e];if(n!==void 0)return this.emptyState[n.dataView][e];{let u;return Object.keys(this.controlIdMapping).map(a=>{const o=this.controlIdMapping[a].dataView,s=this.controlIdMapping[a].children;s!==void 0&&Object.keys(s).map(c=>{c===e&&(u=this.emptyState[o][a][e])})}),u}}}getDataBind(e){let r=this.controlIdMapping[e];if(r)return r.dataBind;e:for(let n in this.controlIdMapping){const u=this.controlIdMapping[n];if(u.children){for(let a in u.children)if(a===e){r=u.children[a];break e}}}return r==null?void 0:r.dataBind}}function hc(t){let e={},r={},n={},u={},a={},o={};return Ce(t,s=>{const c=s.id,l={},f={},p={},h={};Be([s],(g,E)=>{gc(l,f,p,h,g),yc(a,c,g),mc(o,c,g)}),e[c]=l,r[c]=f,n[c]=p,u[c]=h}),{state:e,emptyState:r,databindMapping:a,controlidMapping:o,fieldCodeState:n,fieldCodeEmptyState:u}}function gc(t,e,r,n,u){var a,o;if(u instanceof z)if(t[u.id]=S(u.props.defaultValue),e[u.id]=S(u.props.defaultValue),u.props.dataBind instanceof k)Object.keys(u.props.dataBind).forEach(function(s){const c=u.props.dataBind,l=u.props.defaultValue;let f=c[s].fieldCode;r[f]=S(l[s]),n[f]=S(l[s])});else{let s=u.props.dataBind.fieldCode;r[s]=S(u.props.defaultValue),n[s]=S(u.props.defaultValue)}else{const s={},c={};ne(u.props.headers,f=>{s[f.id]=S(f.props.defaultValue);const p=f.props.dataBind.fieldCode;f.props.dataBind instanceof k?Object.keys(f.props.dataBind).forEach(function(h){c[f.props.dataBind[h].fieldCode]=S(f.props.defaultValue[h])}):c[p]=S(f.props.defaultValue)}),t[u.id]=new Array((a=u.props.defaultRows)!=null?a:1).fill(0).map(()=>S(s)),e[u.id]=s;const l=u.props.datasourceBind.dataCode;r[l]=new Array((o=u.props.defaultRows)!=null?o:1).fill(0).map(()=>S(c)),n[l]=c}}function yc(t,e,r){if(r instanceof z)r.props.dataBind instanceof k?Object.keys(r.props.dataBind).map(n=>{const u=r.props.dataBind,a=u[n].dataCode;a!==void 0&&(t[a]===void 0&&(t[a]={controlId:r.id,fields:[],dataViewId:e}),t[a].fields.push({fieldCode:u[n].fieldCode,controlId:r.id,dataBind:u,dataViewId:[e]}))}):(t[r.props.dataBind.dataCode]===void 0&&(t[r.props.dataBind.dataCode]={controlId:e,fields:[],dataViewId:e}),t[r.props.dataBind.dataCode].fields.push({fieldCode:r.props.dataBind.fieldCode,controlId:r.id,dataBind:r.props.dataBind,dataViewId:[e]}));else{if(r.props.datasourceBind.dataCode===""){Z(`datasourceBind.dataCode is empty! maybe in preview mode, control:${r.id} type:${r.type}`);return}t[r.props.datasourceBind.dataCode]={controlId:r.id,fields:[],dataViewId:e};const n=r.id;ne(r.props.headers,u=>{u.props.dataBind instanceof k?Object.keys(u.props.dataBind).map(a=>{const o=u.props.dataBind,s=o[a].dataCode;t[s].fields.push({fieldCode:o[a].fieldCode,controlId:u.id,dataBind:o,dataViewId:[e,n]})}):t[u.props.dataBind.dataCode].fields.push({fieldCode:u.props.dataBind.fieldCode,controlId:u.id,dataBind:u.props.dataBind,dataViewId:[e,n]})})}}function mc(t,e,r){r instanceof z?t[r.id]={dataBind:r.props.dataBind,options:[],dataView:e}:r.type===w.SUBTABLE&&(t[r.id]={dataBind:new me({dataCode:r.props.datasourceBind.dataCode,fieldCode:""}),dataView:e,children:{},options:[]},ne(r.props.headers,n=>{var u,a;Object.assign((a=(u=t[r.id])==null?void 0:u.children)!=null?a:{},{[n.id]:{dataBind:n.props.dataBind}})}))}const Nn=["splice","push","shift","pop","unshift","reverse"],Lt=Symbol("__engineProxy__"),xt=Symbol("__engineTarget__"),Tn=Symbol("__engineArrayBeforeSetCallbackFlag__"),Vn=Symbol("__engineProxyThisKey__"),T={type:"",args:[],callback:qn};function qn(){}Bc();function vc(t,e,r,n,u){if(T.type){T.callback=u.bind(null,t,n);return}const a=Number(e);if(a>t.length){Q(`Wrong array operations may cause unknown errors. It is recommended to use APIs such as ${Nn.join(",")} for array operations`);return}if(!(Number.isNaN(a)&&e!=="length"))if(e==="length"){const s=r,c=t.length;if(s>t.length){Q("Do not directly modify the length of the array data, please add new rows");return}return s===t.length?void 0:()=>u.call(null,t,n,"splice",[s,c-s])}else return a===t.length?()=>u.call(null,t,n,"push",[r]):()=>u.call(null,t,n,"splice",[a,1,r])}function Ec(t,e,r){return{__engineProxy__:!0,get(n,u,a){return u===Lt?!0:u===xt?n:Array.isArray(n)&&u===Tn?r:u===Vn?t:Reflect.get(n,u,a)},set(n,u,a,o){var h;let s=a;const c=n[u],l=t===""?u:t+"."+u;function f(g){if(typeof g=="object"&&g!==null)return g[Lt]!==!0?Je(g,e,r,l):Je(g[xt],e,r,l)}s=(h=f(a))!=null?h:s;let p;if(Array.isArray(n)){const g=vc(n,u,a,t,e);p=Reflect.set(n,u,s,o),g&&g()}else{try{let g=s;if(s=r.call(null,n,l,s,c),g!==s){const E=f(s);E!==void 0&&(s=E)}}catch(g){return De(`${l} set error ${g}`),!0}p=Reflect.set(n,u,s,o),e.call(null,n,l,a,c)}return p}}}function Je(t,e,r,n=""){if(Object.isFrozen(t))return t;for(let u in t){const a=n===""?u:n+"."+u,o=t[u];typeof o=="object"&&o!==null&&(t[u]=Je(o,e,r,a))}return new Proxy(t,Ec(n,e,r))}function Un(t){const e=[];return t.forEach(r=>{e.push(r),r.controlType==="layout"&&e.push(...Un(r.children))}),e}function jt(t,e){if(e==="")return;const r=e.split(".");if(r.length===0)return;const n=r[0],u=r.slice(1),a=t.find(o=>o.id===n);return u.length===0?a:u.reduce((o,s)=>{var f,p;const c=Number(s);if(Number.isNaN(c)){const h=o!=null&&o.children?Un(o.children):void 0,g=h==null?void 0:h.find(E=>E.id===s);return g||(o instanceof z?o:void 0)}else return(p=(f=o==null?void 0:o.children)==null?void 0:f[c])!=null?p:o},a)}function bc(t,e){return["push","unshift"].includes(t)?e:t==="splice"?e.slice(2):[]}function Ac(t,e,r){if(["push","unshift"].includes(t))return r;if(t==="splice")return e.slice(0,2).concat(r)}function Bc(){Nn.forEach(t=>{const e=Array.prototype[t];Array.prototype[t]=function(...r){var n;if(this[Lt]){let u;const a=bc(t,r);if(a.length){const o=(n=this[Tn])==null?void 0:n.call(this,this[xt],this[Vn],a),s=Ac(t,r,o);T.type=t,T.args=s,u=e.apply(this,s)}else T.type=t,T.args=r,u=e.apply(this,r);return typeof T.callback=="function"&&T.callback(t,r,u),T.type="",T.args=[],T.callback=qn,u}else return e.apply(this,r)}})}class Cc{constructor(){this.actionMap=new Map,this.buildinActions={},this.actionUtils={},this.sources={}}execAction(e,r,...n){return G(this,null,function*(){const u=this.actionMap.get(e);if(!!u)try{return yield u.func.call(null,r,...n)}catch(a){De(`${u.id} Exception during calling action: ${a}`)}})}addAction(e,r){this.actionMap.has(e)&&Q("duplicated action key");const n=new wc(e,r);this.actionMap.set(e,n)}}class wc{constructor(e,r){this.id="",this.id=e,this.func=r}}class Sc{constructor(e){this._dataStore=new Map,this.executer=e}add(e,r){this._dataStore.set(e,r)}get(e){let r=this._dataStore.get(e);return S(r)}remove(e){this._dataStore.delete(e)}getRemoteData(e){return G(this,null,function*(){return this.executer===void 0?(De("\u672A\u521D\u59CB\u5316executer"),[]):this.executer(e)})}}class te{}class we extends te{validate(e){return L(e)}transform(e){if(e==null)return"";if(!U(e)&&!Zt(e))return String(e);if(ka(e))return JSON.stringify(e);throw`${e} is not a string`}}class Nt extends te{validate(e){return Ie(e)||e===""}transform(e){if(e==null)return"";const r=!U(e)&&!Zt(e)?Number(e):void 0;if(!Number.isNaN(r)&&r!==void 0)return r;throw`${e} is not a number`}}class Fc extends te{validate(e){return Ha(e)}transform(e){if(e==null)return[];function r(n){return n.map(u=>u?String(u):"")}if(ae(e))return r(e);if(L(e)&&Yt(e))try{const n=JSON.parse(e);if(Array.isArray(n))return r(n)}catch(n){}return[String(e)]}}class _c extends te{validate(e){return Wa(e)}transform(e){if(e==null)return[];function r(u){return u.map(a=>!a&&a!==0?"":Number(a)).filter(a=>a===""||!Number.isNaN(a))}if(ae(e))return r(e);if(L(e)&&Yt(e))try{const u=JSON.parse(e);if(ae(u))return r(u)}catch(u){}const n=Number(e);if(Number.isNaN(n))throw`${e} is not a number array`;return[n]}}class Dc extends te{validate(e){return e instanceof Me||U(e)&&"amount"in e&&Ie(e.amount)&&"currency"in e&&L(e.currency)}transform(e,r){if(e==null||e==="")return new Me({currency:r==null?void 0:r.currency});let n;if(U(e)&&(n=new Me($($({},r),e))),L(e)&&Re(e))try{const u=JSON.parse(e);n=new Me($($({},r),u))}catch(u){}if(n){const u=new Nt,a=new we;return u.validate(n.amount)||(n.amount=u.transform(n.amount)),a.validate(n.currency)||(n.currency=a.transform(n.currency)),n}throw`${e} is not a { amount: number, currency: string } object`}}class Ic extends te{validate(e){return e instanceof Oe||U(e)&&"min"in e&&L(e.min)&&"max"in e&&L(e.max)}transform(e,r){if(e==null||e==="")return new Oe;let n;if(U(e)&&(n=new Oe($($({},r),e))),L(e)&&Re(e))try{const u=JSON.parse(e);n=new Oe($($({},r),u))}catch(u){}if(n){const u=new we;return u.validate(n.min)||(n.min=u.transform(n.min)),u.validate(n.max)||(n.max=u.transform(n.max)),n}throw`${e} is not a { min: string, max: string } object`}}class Rc extends te{validate(e){return e instanceof Le||U(e)&&"result"in e&&Ie(e.result)&&"unit"in e&&L(e.unit)}transform(e,r){if(e==null||e==="")return new Le({unit:r==null?void 0:r.unit});let n;if(U(e)&&(n=new Le($($({},r),e))),L(e)&&Re(e))try{const u=JSON.parse(e);n=new Le($($({},r),u))}catch(u){}if(n){const u=new Nt,a=new we;return u.validate(n.result)||(n.result=u.transform(n.result)),a.validate(n.unit)||(n.unit=a.transform(n.unit)),n}throw`${e} is not a { result: string, unit: string } object`}}class $c extends te{validate(e){return e instanceof Pe}transform(e,r){if(e==null||e==="")return new Pe;let n;if(U(e)&&(n=new Pe($($({},r),rt.exports.camelizeKeys(e)))),L(e)&&Re(e))try{const u=JSON.parse(e);n=new Pe($($({},r),rt.exports.camelizeKeys(u)))}catch(u){}if(n){const u=new we;return u.validate(n.city)||(n.city=u.transform(n.city)),u.validate(n.district)||(n.district=u.transform(n.district)),u.validate(n.province)||(n.province=u.transform(n.province)),n}throw`${e} is not a { city: string, district: string, province: string } object`}}class Mc{static getValueChecker(e){let r;switch(e){case B.VARCHAR:case B.TIMESTAMP:case B.TEXT:case B.RELATION:case B.AUTO_NUMBER:r=new we;break;case B.DECIMAL:r=new Nt;break;case B.EMPLOYEES:case B.DEPARTMENTS:case B.IMAGE:case B.FILE:case B.ARRAY:r=new Fc;break;case B.MONEY:r=new Dc;break;case B.TIMESCOPE:r=new Ic;break;case B.CALC:r=new Rc;break;case B.DECIMAL_RANGE:r=new _c;break;case B.ADDRESS:r=new $c;break}return r}}function Oc(t){if(["min","max","currency","unit"].includes(t))return B.VARCHAR;if(["result","amount"].includes(t))return B.DECIMAL}function kn(t,e,r,n){var o;let u=(o=Oc(e))!=null?o:t,a=Mc.getValueChecker(u);if(!a||a.validate(r))return r;try{const s=a.transform(r,n);return s!==void 0?s:r}catch(s){throw`${e} ${s}`}}function Pc(t,e,r){return Object.entries(t).reduce((n,[u,a])=>{const o=e[u];return n[u]=kn(a,u,o,r[u]),n},Object.assign({},e))}typeof window!="undefined"&&(window.engines={});let le=null,Se="";class Tt extends tn{constructor(e){super(),this.isMounted=!1,this.id=Qe(8),this.__pluginsApplied=!1,this.actionManager=new Cc,this._jobTasks=[],this.createControlInstance=this.createInstance,this.$options=Object.freeze(e);const{autoMount:r=!0,schema:n,beforeCreateInstance:u,externalParams:a,language:o=Ut,debug:s=!1}=this.$options;N.setLocale(o),this.debug=s,this.runtime=new Ot({schema:n,beforeCreateInstance:u}),this.externalParams=a,this.store=new pc({instance:this.runtime.instance}),this.debugLog("engine is Instantiation complete"),r&&this.mount()}debugLog(...e){this.debug&&tt(...e)}use(e){return this.__pluginsApplied||this.__plugins.push(e),this}registerControl(...e){return this.runtime.register(...e),this}static register(...e){return Ot.register(...e)}static judgeControlIsRegistered(e){return Ot.staticRegisteredTypes.has(e.Runtime.controlType)}mount(){this.debugLog("engine\u7684mount\u65B9\u6CD5\u5F00\u59CB\u8C03\u7528");const{plugins:e=[]}=this.$options;this._handlerProxyState(),this.__plugins=e,this.applyPlugins(),this.setStates(this.getState()),this.debugLog("engine\u7684mount\u65B9\u6CD5\u8C03\u7528\u7ED3\u675F"),this.debug&&typeof window!="undefined"&&(window.engines[this.id]=this)}destroy(){this.debug&&typeof window!="undefined"&&delete window.engines[this.id]}_handlerProxyState(){this.store.state=Je(this.store.state,this._proxyStateCallback.bind(this),this._proxyStateBeforeSetCallback.bind(this))}_proxyStateBeforeSetCallback(e,r,n,u){const a=jt(this.runtime.flatInstances,r);if(!a)return n;if(this.assertInstance(a,w.SUBTABLE)){const c=a.props.headers.reduce((l,f)=>{const p=f.children[0];return p&&p instanceof z&&(l[p.id]=p.fieldType),l},{});return n===null?[]:n.map(l=>Pc(c,l,this.getEmptyState(a.id)))}const o=r.split("."),s=o[o.length-1];try{return kn(a.fieldType,s,n,u)}catch(c){throw Z(`the id=${a.id}'s instance setState error, %o ${c}.`,n),c}}_proxyStateCallback(e,r,n,u,a){Array.isArray(e)?this._handlerArrayUpdate(e,r,n,u,a):this._handlerObjectUpdate(e,r,n,u)}_handlerArrayUpdate(e,r,n,u,a){const o=jt(this.runtime.flatInstances,r);if(!(o instanceof ze))return;const s=h=>{const g=[];for(let E=0;E<h;E++){const y=this.listControlCreateRow(o,"subtable-row");y&&g.push(y)}return g},c=le;let l=[],f=[],p=[];if(n&&u){switch(n){case"push":case"unshift":const h=u.length;l=s(h),f=u,o.children[n](...l),this.runtime.getFlatInstances();break;case"splice":if(u.length>2){const g=u.length-2,E=u.slice(2);l=s(g),f=E;const y=u[0],b=u[1];o.children[n](y,b,...l),this.runtime.getFlatInstances()}else o.children[n](...u),this.runtime.getFlatInstances();break;default:o.children[n](...u),this.runtime.getFlatInstances();break}n==="splice"?p=a:["pop","shift"].includes(n)&&(p=[a]),this.emit("list-change",{instance:o,value:this.getState(o.id),options:Object.assign({},c,{changed:l,data:f,deleted:p!=null?p:[]})}),le=null}}_handlerObjectUpdate(e,r,n,u){const a=jt(this.runtime.flatInstances,r);if(!a)return;const o=this.getInstanceRowIndex(a),s=le||{};if(a instanceof ze){a.children.length=0;const c=n;let l=[];for(let f=0;f<c.length;f++){const p=this.listControlCreateRow(a,"subtable-row");p&&l.push(p)}a.children.push(...l),this.runtime.getFlatInstances(),this.emit("list-change",{instance:a,value:n,options:qt($({},s),{changed:l,data:c,deleted:u!=null?u:[]})})}else this.emit("change",{instance:a,value:this.getState(a.id,o),rowIndex:o,options:qt($({},s),{oldValue:u})})}applyPlugins(){this.__pluginsApplied||(this.__plugins.forEach(e=>{var r;try{Se=(r=e.pluginName)!=null?r:e.constructor.name,e.apply(this)}catch(n){Q(`${Se} Plugin apply Error
|
|
2
|
-
${n}`)}finally{Se=""}}),this.__pluginsApplied=!0)}listControlCreateRow(e,r){const n=this.runtime.createControlInstance(r);if(!!n){if(n instanceof Xs){const u=S(e.props.headers),a=this.createControl(u);n.children.push(...a)}return n}}listControlAddRow(e,r="subtable-row"){const n=this.listControlCreateRow(e,r);!n||e.children.push(n)}emit(e,r){return G(this,null,function*(){if(e==="engine-mounted"){if(this.isMounted)return Z("The engine-mounted life cycle can only be triggered once"),Promise.resolve([]);if(this._jobTasks.length){console.time("engine-mounted need wait");const o=[...this._jobTasks];yield Promise.all(o),console.timeEnd("engine-mounted need wait")}this.isMounted=!0}let n,u;this.isMounted||(u=new Promise(o=>{n=o}),this._jobTasks.push(u));const a=yield Gn(Tt.prototype,this,"emit").call(this,e,r);return n&&u&&(n(),this._jobTasks.splice(this._jobTasks.indexOf(u),1)),a})}on(e,r){return Se&&(r.applyingPluginName=Se),super.on(e,r)}createControl(...e){return this.runtime.createControl(...e)}createInstance(e,r){return this.runtime.createControlInstance(e,r)}schemaEvent(e,r){this.emit(e,r)}updateInstanceProps(e,r,n,u){return this.setInstance(e,r,n,u)}getRules(e){var r;return e===void 0?this.runtime.rules:(r=this.runtime.rules[e])==null?void 0:r.fields}getAntdRules(e){var r;return e===void 0?this.runtime.antdRules:(r=this.runtime.antdRules[e])==null?void 0:r.fields}getState(e,r){return e===void 0?this.store.state:this.store.getState(e,r)}getFieldCodeState(e){return e===void 0?this.store.fieldCodeState:this.store.getFieldCodeState(e)}getEmptyState(e){return S(e===void 0?this.store.emptyState:this.store.getEmptyState(e))}setPayloadOptions(e){le=e}setState(e,r,n,u){le=u,this.debugLog("[%o]: \u89E6\u53D1setState, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o, options=%o",e,r,n,u),this.store.setState(e,r,n),this.debugLog("[%o]: setState\u5B8C\u6210, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o",e,r,n),le=null}setStates(e,r,n){let u=e;Object.keys(u).forEach(a=>{Object.entries(this.store.controlIdMapping).forEach(([o,s])=>{if(s.dataView===a){const c=u[a][o];c!==void 0&&this.setState(o,c,r,n)}else(o===a||s.children&&s.children[a])&&u[a]!==void 0&&this.setState(a,u[a],r,n)})})}getField(e,r,n){if(!r){const c=this.getDataBindMapping(e);if(c){const{controlId:l}=c;return this.getState(l)}return}const u=this.getDataBindMapping(e,r);if(!u)return;const{dataBind:a,controlId:o}=u,s=this.getState(o,n);return a instanceof k?Object.entries(a).reduce((c,[l,f])=>f.fieldCode===r?c[l]:c,s):s}getData(e){if(e){const r=this.getDataBindMapping(e);if(r){const{controlId:n}=r;return this.getFieldCodeState(n)}}}setField(e,r,n,u,a){var l;const o=this.getDataBindMapping(e,r);if(!o)return;const{dataBind:s,controlId:c}=o;if(s instanceof k){const f=(l=S(this.getState(c,u)))!=null?l:this.getEmptyState(c),p=Object.entries(s).reduce((h,[g,E])=>(E.fieldCode===r&&(h[g]=n),h),f);this.setState(c,p,u,a)}else this.setState(c,n,u,a)}setFields(e,r,n,u){const a=this.getDataBindMapping(e);if(!a)return;let o=[];a.fields.forEach(s=>{var p;const{dataBind:c,controlId:l,fieldCode:f}=s;if(!o.includes(f)&&!!Object.hasOwnProperty.call(r,f))if(c instanceof k){const h=(p=S(this.getState(l,n)))!=null?p:this.getEmptyState(l),g=Object.entries(c).reduce((E,[y,b])=>{o.push(b.fieldCode);const d=r[b.fieldCode];return d!==void 0&&(E[y]=d),E},h);this.setState(s.controlId,g,n,u)}else this.setState(l,r[f],n,u)})}buildFields(e,r){const n=this.getDataBindMapping(e);if(!n)return;let u=[];const a={};return n.fields.forEach(o=>{const{dataBind:s,controlId:c,fieldCode:l}=o;if(!u.includes(l)&&!!Object.hasOwnProperty.call(r,l))if(s instanceof k){const f=this.getEmptyState(c);a[o.controlId]=Object.entries(s).reduce((p,[h,g])=>{u.push(g.fieldCode);const E=r[g.fieldCode];return E!==void 0&&(p[h]=E),p},f)}else a[c]=r[l]}),a}setData(e,r){this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\uFF0C\u53C2\u6570\u4E3A%o\uFF0C%o\u3002",e,r);let n={};Object.keys(e).map(u=>{const a=e[u];if(Array.isArray(a))a.map(o=>{const s=this.getDataBindMapping(u);if(!s)return;let c=S(this.store.emptyState[s.dataViewId][s.controlId]),l=[];Object.keys(o).map(f=>{var h,g,E;if(l.includes(f))return;const p=(g=(h=this.store.dataBindMapping[u])==null?void 0:h.fields)==null?void 0:g.find(y=>y.fieldCode===f);if(p){if(p.dataBind instanceof me&&o[f]!==void 0)c[p.controlId]=o[f];else if(p.dataBind instanceof k){let y=S((E=this.getEmptyState(p.controlId))!=null?E:{});Object.keys(p.dataBind).map(b=>{const d=p.dataBind[b];o[d.fieldCode]!==void 0&&(y[b]=o[d.fieldCode]),l.push(d.fieldCode)}),c[p.controlId]=y}}}),n[s.dataViewId]||(n[s.dataViewId]={}),n[s.dataViewId][s.controlId]||(n[s.dataViewId][s.controlId]=[]),n[s.dataViewId][s.controlId].push(c)});else if(a){let o=[];Object.keys(a).map(s=>{var l;if(o.includes(s))return;const c=this.getDataBindMapping(u,s);if(c){if(n[c.dataViewId[0]]||(n[c.dataViewId[0]]={}),c.dataBind instanceof me&&a[s]!==void 0)n[c.dataViewId[0]][c.controlId]=a[s];else if(c.dataBind instanceof k){let f=S((l=this.getEmptyState(c.controlId))!=null?l:{});Object.keys(c.dataBind).map(p=>{const h=c.dataBind[p];a[h.fieldCode]!==void 0&&(f[p]=a[h.fieldCode]),o.push(h.fieldCode)}),n[c.dataViewId[0]][c.controlId]=f}}})}}),this.debugLog("engine setData\u65B9\u6CD5\u6570\u636E\u7EC4\u5408\u5B8C\u6210\uFF0C\u53C2\u6570\u4E3A%o\u3002",n),this.setStates(n,void 0,r),this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\u5B8C\u6210\u3002")}getDataBind(e){return this.store.getDataBind(e)}getInstance(e,r){const n=this.getInstances(e,r===-1);if(n.length>0)return r!==void 0?r===-1?n[0]:n[r]:n[0]}getInstances(e,r=!1){var u;if(e===void 0)return this.runtime.flatInstances;const n=this.runtime.flatInstances.filter(a=>a.id===e);if(r)if(n.length){const a=n[0];if(this.getInstanceRowIndex(a)!==void 0){const o=this.getInstanceInSubtableHeader(a);o&&n.unshift(o)}}else{const a=this.getControlIdMapping(),[o]=(u=Object.entries(a).find(([s,c])=>c.children&&e in c.children))!=null?u:[];if(o){const c=this.getInstance(o).props.headers.find(l=>l.children.find(f=>f.id===e));if(c){const l=c.children.find(f=>f.id===e);l&&n.unshift(l)}}}return n}setInstance(e,r,n,u){try{let a;if(typeof e=="string"?a=this.getInstance(e,u):a=e,!a)return;this.debugLog("[%o]: \u4FEE\u6539instance: %o\u7684%o\u5C5E\u6027\uFF0C\u4FEE\u6539\u7684\u503C\u4E3A%o\u3002",a.id,a,r,n),Qt(a.props,r,n),this.schemaEvent("schema-change",{instance:a,props:r,value:n})}catch(a){throw a}}getControlIdMapping(){return this.store.controlIdMapping}getDataBindMapping(e,r){if(!e&&!r)return this.store.dataBindMapping;const n=this.store.dataBindMapping[e];if(!n){Z(`No corresponding dataCode=${e} was found`);return}if(!r)return n;const u=n.fields.find(a=>a.fieldCode===r);if(!u){Z(`No corresponding fieldCode=${r} was found`);return}return u}getAction(){return this.actionManager}initDataManager(e){this.dataManager=new Sc(e)}getDataManager(){return this.dataManager}assertInstance(e,r){return L(r)?e.type===r:r.includes(e.type)}getInstanceRowIndex(e){if(!e.parent)return;let r;if(this.assertInstance(e.parent,w.SUBTABLE))if(this.assertInstance(e,w.SUBTABLE_COLUMN))r=-1;else{const n=e.parent.children.findIndex(u=>u===e);n>-1&&(r=n)}else r=this.getInstanceRowIndex(e.parent);return r}getInstanceParentControl(e,r){if(!!e.parent)return this.assertInstance(e.parent,r)?e.parent:this.getInstanceParentControl(e.parent,r)}getInstanceInSubtableHeader(e){const r=this.getInstanceRowIndex(e);if(r===void 0)return;if(r===-1)return e;const n=this.assertInstance(e,w.SUBTABLE_COLUMN)?e:this.getInstanceParentControl(e,w.SUBTABLE_COLUMN);if(!n)return;const a=this.getInstanceParentControl(e,w.SUBTABLE).props.headers.find(o=>o.id===n.id);if(!!a)return a.children.find(o=>o.id===e.id)}setControlConfig(...e){return this.runtime.registerControlConfig(...e)}getControlConfig(e){return this.runtime.getControlConfig(e)}}class Lc{}class xc{constructor(e){this.config=e}apply(e){this.engine=e;const r=this.config;if(!r)return;const n=Hn(r,e);if(!n)return;const u=e.getAction();for(let[a,o]of Object.entries(n.funcMap))u.addAction(a,o)}}function Hn(t,e){if(!t.module||!t.module.compiled)return;const r=t.module.compiled,n={exports:{ctx:e,utils:e.getAction().actionUtils}};try{new Function("module","exports",r).call(n,n,n.exports)}catch(o){Q(o.message+". fail to parse the module"),process.env.NODE_ENV!=="production"&&Q("fail to parse the module")}const u={},a={};for(const[o,s]of Object.entries(n.exports))typeof s=="function"?u[o]=s:a[o]=s;return{funcMap:u,variables:a}}const jc={"engine-mounted":"did_mount","engine-submit":"will_submit","engine-submit-params":"do_submit","engine-submitted":"did_submit"};class Nc{constructor(e){this.config=e}apply(e){this.engine=e,Object.entries(jc).forEach(([r,n])=>{e.on(r,u=>G(this,null,function*(){const a=yield this.callLifecycleEvent(n,u);return a.includes(!1)?!1:a}))})}callLifecycleEvent(e,r){return G(this,null,function*(){const n=this.config;return!n||!Array.isArray(n[e])?[]:yield Promise.all(n[e].map(a=>G(this,null,function*(){return yield this.engine.getAction().execAction(a,r)})))})}}class Tc{constructor(e){this.config=e}apply(e){this.engine=e,nn.events.forEach(r=>{r.code&&r.key&&this.engineAddEventListener(r.code,r.key)})}engineAddEventListener(e,r){this.engine.on(e,n=>G(this,null,function*(){if(!(e==="change"&&!this.engine.isMounted)&&n.instance!==void 0)return yield this.callControlEvent(r,n)}))}callControlEvent(e,r){return G(this,null,function*(){const n=this.config[r.instance.id];if(!n||!Array.isArray(n[e]))return[];const u=yield Promise.all(n[e].map(a=>G(this,null,function*(){return yield this.engine.getAction().execAction(a,r)})));return u.includes(!1)?!1:u})}}class Vc{constructor(e){this.calcControls=[],this.dependenciesTriggerMap=new Map,this.hideNotRememberControlIds=[],this.dontHasPermissionControlIds=[],this.cacheComputedResult={},this.options=e,this.getDontHasPermissionControlIds(),this.getNeedHideRememberControlIds()}getNeedHideRememberControlIds(){var e;!((e=this.options)!=null&&e.displayBoList)||(this.hideNotRememberControlIds=this.options.displayBoList.reduce((r,n)=>(n.is_remember||r.push(...n.hide_controls),r),[]))}getDontHasPermissionControlIds(){var e;!((e=this.options)!=null&&e.behavior)||(this.dontHasPermissionControlIds=this.options.behavior.reduce((r,n)=>(n.ctrlBehavior===1&&r.push(n.ctrlId),r),[]))}controlNeedComputedValue(e){if(!e)return!1;const r=this.getControlIsHide(e);return!(this.dontHasPermissionControlIds.includes(e.id)&&r||this.hideNotRememberControlIds.includes(e.id)&&r)}getControlIsHide(e){return e.props.isHide?!0:e.parent===null?!1:this.getControlIsHide(e.parent)}apply(e){this.engine=e,this.resetDependencies(),this.watchControlChange(),this.watchSubtableChange(),this.watchSchemaHideChange(),this.engine.on("engine-mounted",()=>{this.allCalcControlComputed()})}resetDependencies(){this.calcControls=[],this.dependenciesTriggerMap.clear(),this.getAllCalcControl(),this.getCalcDependencies()}allCalcControlComputed(){this.calcControls.forEach(e=>this.computedCalcValue(e))}getAllCalcControl(){this.calcControls=this.engine.runtime.flatInstances.filter(e=>e.type===w.CALC)}getCalcDependencies(){this.calcControls.forEach(e=>{const{scriptEcho:r}=e.props;r.forEach(n=>{(n.type===j.VariableInMainTable||n.type===j.VariableInCurrentSubTable||n.type===j.VariableInOtherSubTable)&&this.setDependenciesTriggerMapItem(n.id,e),n.type===j.VariableInOtherSubTable&&n.subTableId&&this.setDependenciesTriggerMapItem(n.subTableId,e)})})}setDependenciesTriggerMapItem(e,r){this.dependenciesTriggerMap.has(e)||this.dependenciesTriggerMap.set(e,[]);const n=this.dependenciesTriggerMap.get(e);n.includes(r)||n.push(r)}getCalcControlsFromSubtableRows(e){return e.reduce((r,n)=>(n.children.forEach(u=>{const a=u.children[0];a&&this.engine.assertInstance(a,w.CALC)&&r.push(a)}),r),[])}watchSchemaHideChange(){this.engine.on("schema-change",e=>{var r;e.props==="isHide"&&((r=this.dependenciesTriggerMap.get(e.instance.id))!=null?r:[]).forEach(u=>{this.computedCalcValue(u)})})}watchSubtableChange(){this.engine.on("list-change",e=>{var a,o,s;this.resetDependencies();const r=(o=(a=e.options)==null?void 0:a.changed)!=null?o:[];this.getCalcControlsFromSubtableRows(r).forEach(c=>{this.computedCalcValue(c)}),((s=this.dependenciesTriggerMap.get(e.instance.id))!=null?s:[]).forEach(c=>{this.computedCalcValue(c)})})}watchControlChange(){this.engine.on("change",e=>{var u;const{instance:r}=e;if(!this.dependenciesTriggerMap.has(r.id))return;const n=(u=this.dependenciesTriggerMap.get(r.id))!=null?u:[];e.rowIndex!==void 0&&e.rowIndex>-1?n.forEach(a=>{this.controlInSubtable(a)&&this.engine.getInstanceRowIndex(a)!==e.rowIndex||this.computedCalcValue(a)}):n.forEach(a=>{this.computedCalcValue(a)})})}controlInSubtable(e){var r;return((r=e.parent)==null?void 0:r.type)===w.SUBTABLE_COLUMN}computedCalcValue(e){var c;const r=e.props.scriptEcho;if(!r||r.length===0)return;const n=r.reduce((l,f)=>{if(f.type===j.Operator||f.type===j.Number)return l+f.name;let p=0,h;switch(f.type){case j.VariableInMainTable:{const g=this.getNumberValue(this.engine.getState(f.id));h=this.engine.getInstance(f.id),p=Number(g);break}case j.VariableInCurrentSubTable:{const g=this.engine.getInstanceRowIndex(e);h=this.engine.getInstance(f.id,g);const E=this.engine.getState(f.id,g),y=this.getNumberValue(E);p=Number(y);break}case j.VariableInOtherSubTable:{const g=this.engine.getState(f.id),E=Array.isArray(g)?g.map(b=>this.getNumberValue(b)):[],y=this.getAggregateTypeValue(E,f.aggregateType);h=this.engine.getInstance(f.subTableId),p=Number(y);break}}return!Number.isNaN(p)&&this.controlNeedComputedValue(h)?l+=`(${p})`:l+=0,l},"");let u;this.cacheComputedResult[n]!==void 0?u=this.cacheComputedResult[n]:(u=new Function(`return ${n}`)(),this.cacheComputedResult[n]=u);let a;if(this.controlInSubtable(e)&&(a=this.engine.getInstanceRowIndex(e),a===void 0))return;const o=this.engine.getState(e.id,a),s=!u||u===1/0||u===-1/0?0:e.props.precision===""?u:Number(u.toFixed(e.props.precision));s!==(o==null?void 0:o.result)&&this.engine.setState(e.id,{result:s,unit:(c=o==null?void 0:o.unit)!=null?c:""},a)}getNumberValue(e){if(typeof e=="object"&&e){if("result"in e)return e.result;if("amount"in e)return e.amount}return typeof e=="number"?e:0}getAggregateTypeValue(e,r){if(!r||!e||!e.length)return 0;switch(r){case ue.MAX:return Math.max(...e);case ue.MIN:return Math.min(...e);case ue.SUM:return e.reduce((n,u)=>n+u);case ue.AVG:return e.reduce((n,u)=>n+u)/e.length}}}class qc{constructor(e){this.config=e}apply(e){var a,o;this.engine=e;const r=(o=(a=this.config)==null?void 0:a.source)!=null?o:"";let n=document.createElement("style");n.className="edit-css",n.type="text/css",n.innerHTML=r,document.querySelector("head").appendChild(n)}}C.CalcPlugin=Vc,C.ControlsEventPlugin=Tc,C.ES6ModulePlugin=xc,C.Engine=Tt,C.LifecycleEventPlugin=Nc,C.Plugin=Lc,C.StylePlugin=qc,C.hasChildrenControl=Ke,C.loopDataViewControl=Ce,C.loopFormControl=Be,C.parseModule=Hn,Object.defineProperty(C,"__esModule",{value:!0})});
|
|
1
|
+
var Uc=Object.defineProperty,kc=Object.defineProperties;var Hc=Object.getOwnPropertyDescriptors;var Kn=Object.getOwnPropertySymbols,Wc=Object.getPrototypeOf,zc=Object.prototype.hasOwnProperty,Kc=Object.prototype.propertyIsEnumerable,Gc=Reflect.get;var Gn=(B,_,D)=>_ in B?Uc(B,_,{enumerable:!0,configurable:!0,writable:!0,value:D}):B[_]=D,R=(B,_)=>{for(var D in _||(_={}))zc.call(_,D)&&Gn(B,D,_[D]);if(Kn)for(var D of Kn(_))Kc.call(_,D)&&Gn(B,D,_[D]);return B},Vt=(B,_)=>kc(B,Hc(_));var Jn=(B,_,D)=>Gc(Wc(B),D,_);var K=(B,_,D)=>new Promise((Ke,we)=>{var Ge=G=>{try{fe(D.next(G))}catch(de){we(de)}},Je=G=>{try{fe(D.throw(G))}catch(de){we(de)}},fe=G=>G.done?Ke(G.value):Promise.resolve(G.value).then(Ge,Je);fe((D=D.apply(B,_)).next())});(function(B,_){typeof exports=="object"&&typeof module!="undefined"?_(exports):typeof define=="function"&&define.amd?define(["exports"],_):(B=typeof globalThis!="undefined"?globalThis:B||self,_(B.modelDrivenEngine={}))})(this,function(B){"use strict";var _="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u5B57",D="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5B57\u7B26\u4E32",Ke="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5BF9\u8C61",we="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u7EC4",Ge="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5E03\u5C14",Je="{caption}\u5FC5\u586B",fe="\u8BF7\u8F93\u5165\u6807\u9898",G="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",de="\u8BF7\u8F93\u5165\u63D0\u793A\u6587\u5B57",Xn="\u8BF7\u7ED1\u5B9A\u6570\u636E\u9879",Qn="\u8BF7\u7ED1\u5B9A\u8868\u5355",Zn="\u8BF7\u7ED1\u5B9A\u5217\u8868",Yn="\u8BF7\u7ED1\u5B9A\u6D41\u7A0B",er="\u8BF7\u8F93\u5165\u663E\u793A\u503C",tr="\u8BF7\u8F93\u5165\u5B58\u50A8\u503C",nr="\u5355\u636E\u7F16\u53F7\u672A\u7ED1\u5B9A\u6570\u636E\u9879",rr="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",ir="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u7684\u6570\u503C",ur="\u8BF7\u8F93\u5165\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",ar="\u6570\u503C\u8303\u56F4\u8BBE\u7F6E\u6709\u8BEF",or="\u8BF7\u8F93\u5165\u957F\u5EA6\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u503C",sr="\u9644\u4EF6\u5927\u5C0F\u5FC5\u987B\u57280MB\u81F31000MB\u4E4B\u95F4",cr="\u8BF7\u586B\u5199\u603B\u5206\u8BBE\u7F6E",lr="\u603B\u5206\u4E0D\u80FD\u5C0F\u4E8E1",fr="\u9ED8\u8BA4\u503C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",dr="\u9644\u4EF6\u4E0A\u4F20\u7684\u6570\u91CF\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",hr="\u8BF7\u91CD\u65B0\u9009\u62E9\u53EF\u9009\u6570\u91CF",pr="\u8BE5\u63A7\u4EF6\u6700\u5927\u957F\u5EA6\u9700\u5927\u4E8E\u6700\u5C0F\u957F\u5EA6",gr="\u8BE5\u63A7\u4EF6\u6700\u5C0F\u957F\u5EA6\u9700\u5C0F\u4E8E\u6700\u5927\u957F\u5EA6",yr="\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u9009\u9879\u8BBE\u7F6E",vr="\u9009\u9879ID\u4E0D\u80FD\u91CD\u590D",mr="\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u6761\u9009\u9879",Er="\u8BF7\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",br="\u8BF7\u7ED1\u5B9A\u5B58\u50A8\u503C",Ar="\u8BF7\u7ED1\u5B9A\u670D\u52A1",Br="\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Cr="\u8BF7\u9009\u62E9\u7701",wr="\u8BF7\u9009\u62E9\u5E02",Sr="\u8BF7\u9009\u62E9\u533A",_r="\u6700\u5C11\u586B\u5199\u884C\u6570\u4E0D\u80FD\u5C0F\u4E8E0",Fr="\u884C\u6570\u91CF\u4E0D\u80FD\u5C0F\u4E8E{min}\u884C",Dr="\u8BF7\u8F93\u5165\u5217\u5BBD",Ir="\u8BF7\u8BBE\u7F6E\u6240\u6709\u89C4\u5219\u6761\u4EF6\u7684\u903B\u8F91\u5173\u7CFB",Rr="\u8BF7\u5C06\u6240\u6709\u89C4\u5219\u6761\u4EF6\u586B\u5199\u5B8C\u6574",$r="\u8BF7\u9009\u62E9\u63A7\u4EF6",Mr="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5",Or="\u8BF7\u9009\u62E9\u56DE\u586B\u8BBE\u7F6E",xr="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Pr="\u8BF7\u9009\u62E9\u6839\u8282\u70B9",Lr="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",jr="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Nr="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Tr="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Vr="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",qr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Ur="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",kr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Hr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Wr="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",zr="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Kr="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Gr="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Jr="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Xr="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Qr="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Zr="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Yr={isNotNumber:_,isNotString:D,isNotObject:Ke,isNotArray:we,isNotBoolean:Ge,runtimeRequired:Je,pleaseEnterCaption:fe,pleaseEnterCaptionTip:G,pleaseEnterPlaceholder:de,pleaseEnterFieldCode:Xn,pleaseEnterForm:Qn,pleaseEnterList:Zn,pleaseEnterProcess:Yn,pleaseEnterLabel:er,pleaseEnterValue:tr,bizKeyNotBindFiled:nr,pleaseEnterNumberRange:rr,pleaseEnterAValueGreaterThanMin:ir,pleaseEnterAValueLessThanMax:ur,numberRangeSetError:ar,stringRangeError:or,attachmentMaxSize:sr,pleaseEnterTotalScoreSetting:cr,theTotalScoreMustNotBeLessThan1:lr,scoreDefaultValueRange:fr,attachmentLimitError:dr,PleaseReselectTheOptionalQuantity:hr,TheMaximumLengthIsGreaterThanTheMinimumLength:pr,TheMinimumLengthIsGreaterThanTheMaximumLength:gr,PleaseSelectTheCorrectOptionSettings:yr,optionIdIsRepeat:vr,optionIsRequired:mr,pleaseEnterDataCode:Er,pleaseEnterValueFieldCode:br,pleaseEnterSvcCode:Ar,pleaseBindAtLeastOneDisplayValue:Br,pleaseSelectProvince:Cr,pleaseSelectCity:wr,pleaseSelectDistrict:Sr,limitRowsCannotBeLessThan0:_r,TheNumberOfRowsCannotBeLessThanMinRows:Fr,pleaseEnterColumnWidth:Dr,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Ir,pleaseCompleteAllRulesAndConditions:Rr,pleaseSelectControl:$r,pleaseSelectAtLeastOneColumn:Mr,pleaseSelectFillBackMode:Or,pleaseSelectDashboard:xr,rootNodeIsRequired:Pr,theViewNameCannotBeEmpty:Lr,pleaseSelectOcrType:jr,pleaseSelectAtLeastOneFieldToFillIn:Nr,pleaseChooseAtLeastOne:Tr,pleaseEnterButtonContent:Vr,pleaseEnterDataCodeInDataSetting:qr,pleaseEnterValueFieldCodeInDataSetting:Ur,pleaseEnterSvcCodeInDataSetting:kr,pleaseBindAtLeastOneDisplayValueInDataSetting:Hr,rootNodeIsRequiredInDataSetting:Wr,pleaseEnterMaxHeight:zr,pleaseEnter:Kr,pleaseEnterWatermark:Gr,pleaseEnterFileName:Jr,pleaseUploadAtLeastOnePrintTemplate:Xr,pleaseAssignBusiness:Qr,pleaseAssignExternal:Zr},ei="Please enter a number",ti="Please enter a string",ni="Please enter an object",ri="Please enter an array",ii="Please enter a boolean",ui="{caption} Required",ai="Please enter the title",oi="Please enter the bubble prompt",si="Please enter the prompt text",ci="Please bind data items",li="Please bind the form",fi="Please bind the list",di="Please bind the process",hi="Please enter the displayed value",pi="Please enter the stored value",gi="The document number is not bound to the data item",yi="Please enter a value greater than or equal to {min} and less than or equal to {max}",vi="Please enter a value greater than or equal to {min}",mi="Please enter a value less than or equal to {max}",Ei="The value range is set incorrectly",bi="Please enter a value with a length greater than or equal to {min} and less than or equal to {max}",Ai="The attachment size must be between 0MB and 1000MB",Bi="Please fill in the total score setting",Ci="The total score cannot be less than 1",wi="The default value must be between {min} and {max}",Si="The number of attachments uploaded must be between {min} and {max}",_i="Please re-select the optional quantity",Fi="The maximum length of the control must be greater than the minimum length",Di="The minimum length of the control must be less than the maximum length",Ii="Please select the correct option setting",Ri="Option ID cannot be repeated",$i="Please enter at least one option",Mi="Please bind the data source",Oi="Please bind the stored value",xi="Please bind the service",Pi="At least one display value must be bound",Li="Please select a province",ji="Please select a city",Ni="Please select a district",Ti="The minimum number of lines to fill in cannot be less than 0",Vi="The number of rows cannot be less than {min} rows",qi="Please enter the column width",Ui="Please set the logical relationship of all rule conditions",ki="Please complete all rules and conditions",Hi="please select control",Wi="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",zi="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Ki="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Gi="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Ji="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Xi="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Qi="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Zi="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Yi="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",eu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",tu="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",nu="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",ru="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",iu="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",uu="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",au="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",ou="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",su="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",cu={isNotNumber:ei,isNotString:ti,isNotObject:ni,isNotArray:ri,isNotBoolean:ii,runtimeRequired:ui,pleaseEnterCaption:ai,pleaseEnterCaptionTip:oi,pleaseEnterPlaceholder:si,pleaseEnterFieldCode:ci,pleaseEnterForm:li,pleaseEnterList:fi,pleaseEnterProcess:di,pleaseEnterLabel:hi,pleaseEnterValue:pi,bizKeyNotBindFiled:gi,pleaseEnterNumberRange:yi,pleaseEnterAValueGreaterThanMin:vi,pleaseEnterAValueLessThanMax:mi,numberRangeSetError:Ei,stringRangeError:bi,attachmentMaxSize:Ai,pleaseEnterTotalScoreSetting:Bi,theTotalScoreMustNotBeLessThan1:Ci,scoreDefaultValueRange:wi,attachmentLimitError:Si,PleaseReselectTheOptionalQuantity:_i,TheMaximumLengthIsGreaterThanTheMinimumLength:Fi,TheMinimumLengthIsGreaterThanTheMaximumLength:Di,PleaseSelectTheCorrectOptionSettings:Ii,optionIdIsRepeat:Ri,optionIsRequired:$i,pleaseEnterDataCode:Mi,pleaseEnterValueFieldCode:Oi,pleaseEnterSvcCode:xi,pleaseBindAtLeastOneDisplayValue:Pi,pleaseSelectProvince:Li,pleaseSelectCity:ji,pleaseSelectDistrict:Ni,limitRowsCannotBeLessThan0:Ti,TheNumberOfRowsCannotBeLessThanMinRows:Vi,pleaseEnterColumnWidth:qi,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Ui,pleaseCompleteAllRulesAndConditions:ki,pleaseSelectControl:Hi,pleaseSelectDashboard:Wi,theViewNameCannotBeEmpty:zi,pleaseSelectOcrType:Ki,pleaseSelectAtLeastOneFieldToFillIn:Gi,pleaseChooseAtLeastOne:Ji,pleaseEnterButtonContent:Xi,pleaseEnterDataCodeInDataSetting:Qi,pleaseEnterValueFieldCodeInDataSetting:Zi,pleaseEnterSvcCodeInDataSetting:Yi,pleaseBindAtLeastOneDisplayValueInDataSetting:eu,rootNodeIsRequiredInDataSetting:tu,pleaseEnterMaxHeight:nu,pleaseEnter:ru,pleaseEnterWatermark:iu,pleaseEnterFileName:uu,pleaseUploadAtLeastOnePrintTemplate:au,pleaseAssignBusiness:ou,pleaseAssignExternal:su},lu="\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",fu="\u6587\u5B57\u5217\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",du="\u5BFE\u8C61\u7269\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",hu="\u6570\u5B57\u7D44\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",pu="\u30D6\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",gu="{caption}\u5FC5\u9808",yu="\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",vu="\u6C17\u6CE1\u306E\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",mu="\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Eu="\u30C7\u30FC\u30BF\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",bu="\u30B7\u30FC\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Au="\u30EA\u30B9\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Bu="\u30D5\u30ED\u30FC\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Cu="\u8868\u793A\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",wu="\u4FDD\u5B58\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Su="\u30B7\u30FC\u30C8\u756A\u53F7\u304C\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",_u="{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Fu="{min}\u4EE5\u4E0A\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Du="{max}\u672A\u6E80\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Iu="\u6570\u5024\u7BC4\u56F2\u8A2D\u5B9A\u30A8\u30E9\u30FC",Ru="\u9577\u3055\u304C{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",$u="\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306F0MB\u304B\u30891000MB\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Mu="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Ou="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u306F\uFF11\u4EE5\u4E0A\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",xu="\u57FA\u672C\u8A2D\u5B9A\u5024\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Pu="\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4EF6\u6570\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059",Lu="\u6570\u91CF\u3092\u518D\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",ju="\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5927\u5024\u306F\u6700\u5C0F\u5024\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Nu="\u30B3\u30F3\u30DD\u30FC\u30CD\u30F3\u30C8\u306E\u6700\u5C0F\u5024\u306F\u6700\u5927\u5024\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Tu="\u6B63\u78BA\u306A\u8A2D\u5B9A\u5024\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Vu="ID\u306F\u91CD\u8907\u3057\u306A\u3044\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",qu="\u6700\u4F4E\uFF11\u70B9\u3092\u9078\u3076\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",Uu="\u5143\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",ku="\u4FDD\u5B58\u5024\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Hu="\u30B5\u30FC\u30D3\u30B9\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Wu="\u8868\u793A\u5024\u3092\u30EA\u30F3\u30AF\u3057\u76F4\u3057\u3057\u3066\u4E0B\u3055\u3044",zu="\u7701\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Ku="\u5E02\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Gu="\u533A\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Ju="\u6700\u5C0F\u5024\u306F\uFF10\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Xu="\u6700\u4F4E\u884C\u6570\u306F{min}\u884C\u3067\u304A\u9858\u3044\u3057\u307E\u3059",Qu="\u5217\u5E45\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Zu="\u5168\u3066\u306E\u6761\u4EF6\u306E\u30ED\u30B8\u30C3\u30AF\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Yu="\u5168\u3066\u306E\u6761\u4EF6\u3092\u5B8C\u6210\u3055\u305B\u3066\u4E0B\u3055\u3044",ea="please select control",ta="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",na="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",ra="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",ia="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",ua="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",aa="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",oa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",sa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",ca="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",la="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",fa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",da="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",ha="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",pa="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",ga="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",ya="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",va="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",ma="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Ea={isNotNumber:lu,isNotString:fu,isNotObject:du,isNotArray:hu,isNotBoolean:pu,runtimeRequired:gu,pleaseEnterCaption:yu,pleaseEnterCaptionTip:vu,pleaseEnterPlaceholder:mu,pleaseEnterFieldCode:Eu,pleaseEnterForm:bu,pleaseEnterList:Au,pleaseEnterProcess:Bu,pleaseEnterLabel:Cu,pleaseEnterValue:wu,bizKeyNotBindFiled:Su,pleaseEnterNumberRange:_u,pleaseEnterAValueGreaterThanMin:Fu,pleaseEnterAValueLessThanMax:Du,numberRangeSetError:Iu,stringRangeError:Ru,attachmentMaxSize:$u,pleaseEnterTotalScoreSetting:Mu,theTotalScoreMustNotBeLessThan1:Ou,scoreDefaultValueRange:xu,attachmentLimitError:Pu,PleaseReselectTheOptionalQuantity:Lu,TheMaximumLengthIsGreaterThanTheMinimumLength:ju,TheMinimumLengthIsGreaterThanTheMaximumLength:Nu,PleaseSelectTheCorrectOptionSettings:Tu,optionIdIsRepeat:Vu,optionIsRequired:qu,pleaseEnterDataCode:Uu,pleaseEnterValueFieldCode:ku,pleaseEnterSvcCode:Hu,pleaseBindAtLeastOneDisplayValue:Wu,pleaseSelectProvince:zu,pleaseSelectCity:Ku,pleaseSelectDistrict:Gu,limitRowsCannotBeLessThan0:Ju,TheNumberOfRowsCannotBeLessThanMinRows:Xu,pleaseEnterColumnWidth:Qu,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Zu,pleaseCompleteAllRulesAndConditions:Yu,pleaseSelectControl:ea,pleaseSelectDashboard:ta,theViewNameCannotBeEmpty:na,pleaseSelectOcrType:ra,pleaseSelectAtLeastOneFieldToFillIn:ia,pleaseChooseAtLeastOne:ua,pleaseEnterButtonContent:aa,pleaseEnterDataCodeInDataSetting:oa,pleaseEnterValueFieldCodeInDataSetting:sa,pleaseEnterSvcCodeInDataSetting:ca,pleaseBindAtLeastOneDisplayValueInDataSetting:la,rootNodeIsRequiredInDataSetting:fa,pleaseEnterMaxHeight:da,pleaseEnter:ha,pleaseEnterWatermark:pa,pleaseEnterFileName:ga,pleaseUploadAtLeastOnePrintTemplate:ya,pleaseAssignBusiness:va,pleaseAssignExternal:ma},ba={zhCN:Yr,enUS:cu,jaJP:Ea},L;(function(t){t.Number="Number",t.Operator="Operator",t.VariableInMainTable="VariableInMainTable",t.VariableInCurrentSubTable="VariableInCurrentSubTable",t.VariableInOtherSubTable="VariableInOtherSubTable",t.UndefinedVariable="UndefinedVariable"})(L||(L={}));var re;(function(t){t.SUM="SUM",t.AVG="AVG",t.MAX="MAX",t.MIN="MIN"})(re||(re={}));var qt="zh-CN";function O(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var T;(function(t){t.BASE="base",t.FORM="form",t.LAYOUT="layout",t.WRAP="wrap",t.COLUMN="column",t.LIST="list",t.SEARCH="search"})(T||(T={}));var C;(function(t){t.TITLE="title",t.LINK="link",t.BUTTON="button",t.DIVIDER="divider",t.TEXT="text",t.CREATE_FORM_LIST_BUTTON="list-page-btn-create-form",t.BATCH_SUBMISSION_LIST_BUTTON="list-page-btn-batch-submission",t.SUBMISSION_RECORD_LIST_BUTTON="list-page-btn-submission-record",t.IMPORT_RECORD_LIST_BUTTON="list-page-btn-import-record",t.EXPORT_RECORD_LIST_BUTTON="list-page-btn-export-record",t.EXPORT_LIST_BUTTON="list-page-btn-export-list",t.LIST_SELECT_BUTTON="list-select-button",t.FORM_SELECT_BUTTON="form-select-button",t.LIST_VIEW_SELECT="list-view-select",t.TEXT_OCR_BUTTON="text-ocr-button",t.INVOICE_CHECK_BUTTON="invoice-check-button",t.LIST_PAGE_BTN_BATCH_PRINT="list-page-btn-batch-print",t.LIST_PAGE_BTN_BATCH_PRINT_RECORD="list-page-btn-batch-print-record",t.VARCHAR_COLUMN="varchar-column",t.TEXT_COLUMN="text-column",t.DECIMAL_COLUMN="decimal-column",t.TIMESCOPE_COLUMN="timescope-column",t.TIMESTAMP_COLUMN="timestamp-column",t.ARRAY_COLUMN="array-column",t.DEPARTMENT_COLUMN="department-column",t.AUTO_NUMBER_COLUMN="auto-number-column",t.FILE_COLUMN="file-column",t.IMAGE_COLUMN="image-column",t.PEOPLE_COLUMN="people-column",t.LOCATION_COLUMN="location-column",t.CUSTOM_COLUMN="custom-column",t.ORDER_COLUMN="order-column",t.OPERATION_COLUMN="operation-column",t.EMPLOYEE_COLUMN="employee-column",t.ADDRESS="address",t.AMOUNT="amount",t.ATTACHMENT="attachment",t.AUTO_NUMBER="auto-number",t.CALC="calc",t.CHECKBOX="checkbox",t.DATE_PICKER="date-picker",t.DATE_RANGE="date-range",t.DEPARTMENT="department",t.EMPLOYEE="employee",t.IMAGE="image",t.INPUT="input",t.NUMBER="number",t.RADIO="radio",t.RICH_TEXT="rich-text",t.SCORE="score",t.SEARCH_DATE_RANGE="search-date-range",t.SEARCH_NUMBER_RANGE="search-number-range",t.SEARCH_INPUT="search-input",t.SELECT="select",t.SELECT_MULTIPLE="select-multiple",t.SELECT_RELATION="select-relation",t.VUE_FORM_ITEM="vue-form-item",t.TEXTAREA="textarea",t.EMAIL="email",t.FOOTER="footer",t.HEADER="header",t.ID_CARD="id-card",t.MOBILE="mobile",t.PHONE="phone",t.RADIO_IMAGE="radio-image",t.ELECTRONIC_SIGNATURE="electronic-signature",t.WPS="wps",t.CARD_GROUP="card-group",t.COL="col",t.GRID="grid",t.GRID_ROW="grid-row",t.GRID_TABLE_COLUMN="grid-table-column",t.ROW="row",t.TWO_COLUMNS="two-columns",t.SUBTABLE_COLUMN="subtable-column",t.SUBTABLE_ROW="subtable-row",t.TAB="tab",t.TAB_PANE="tab-pane",t.TOOLBOX="toolbox",t.DATA_VIEW="data-view",t.LIST_VIEW="list-view",t.SUBTABLE="subtable",t.GRID_TABLE="grid-table",t.SIMPLE_SEARCH="simple-search",t.PAGINATION="pagination",t.CHECKBOX_IMAGE="checkbox-image",t.DASHBOARD="dashboard",t.TREE="tree",t.EMPLOYEE2="employee2",t.DEPARTMENT2="department2"})(C||(C={}));var b;(function(t){t.VARCHAR="varchar",t.TEXT="text",t.ARRAY="array",t.ADDRESS="location",t.DECIMAL="decimal",t.DECIMAL_RANGE="decimal_range",t.TIMESTAMP="timestamp",t.EMPLOYEES="people",t.DEPARTMENTS="department",t.MONEY="money",t.TIMESCOPE="timescope",t.FILE="file",t.IMAGE="image",t.AUTO_NUMBER="auto_number",t.CALC="calc",t.RELATION="relation",t.LIST="list",t.RELATION_FIELD="relation-field",t.REFERENCE_FIELD="reference-field",t.CALC_FIELD="calc",t.JSON="json",t.BIGINT="bigint",t.ANY="ANY",t.ENCRYPTED_FIELD="encrypted_field"})(b||(b={}));var M;M={},O(M,b.ARRAY,C.ARRAY_COLUMN),O(M,b.AUTO_NUMBER,C.AUTO_NUMBER_COLUMN),O(M,b.DECIMAL,C.DECIMAL_COLUMN),O(M,b.DEPARTMENTS,C.DEPARTMENT_COLUMN),O(M,b.FILE,C.FILE_COLUMN),O(M,b.IMAGE,C.IMAGE_COLUMN),O(M,b.ADDRESS,C.LOCATION_COLUMN),O(M,b.EMPLOYEES,C.EMPLOYEE_COLUMN),O(M,b.TEXT,C.TEXT_COLUMN),O(M,b.TIMESCOPE,C.TIMESCOPE_COLUMN),O(M,b.TIMESTAMP,C.TIMESTAMP_COLUMN),O(M,b.VARCHAR,C.VARCHAR_COLUMN),O(M,b.RELATION,C.VARCHAR_COLUMN);var Ut;(function(t){t.YEAR="year",t.MONTH="month",t.DATE="date",t.DATETIME="datetime"})(Ut||(Ut={}));var kt="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",Aa=kt+"0123456789";function Xe(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:15,e="",r=0;r<t;r++){var n=r===0?kt:Aa,i=Math.random()*n.length;e+=n[parseInt(String(i),10)]}return e}function Qe(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Ba(t){if(Array.isArray(t))return Qe(t)}function Ca(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ht(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wa(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function Se(t,e,r){return wa()?Se=Reflect.construct:Se=function(i,u,a){var o=[null];o.push.apply(o,u);var c=Function.bind.apply(i,o),s=new c;return a&&pe(s,a.prototype),s},Se.apply(null,arguments)}function he(t){return he=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},he(t)}function Wt(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&pe(t,e)}function Sa(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function _a(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Fa(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Da(t,e){return e&&(Ia(e)==="object"||typeof e=="function")?e:Ca(t)}function pe(t,e){return pe=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},pe(t,e)}function zt(t){return Ba(t)||_a(t)||Ra(t)||Fa()}var Ia=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function Ra(t,e){if(!!t){if(typeof t=="string")return Qe(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qe(t,e)}}function Ze(t){var e=typeof Map=="function"?new Map:void 0;return Ze=function(n){if(n===null||!Sa(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return Se(n,arguments,he(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),pe(i,n)},Ze(t)}function $a(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Kt(t){var e=$a();return function(){var n=he(t),i;if(e){var u=he(this).constructor;i=Reflect.construct(n,arguments,u)}else i=n.apply(this,arguments);return Da(this,i)}}var Ye=console;function X(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=e.slice(1);(n=Ye).warn.apply(n,["\u{1F9D0} Driven Warning:"+e[0]].concat(zt(i)))}function et(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n,i=e.slice(1);(n=Ye).log.apply(n,["\u{1F680} Driven Log:"+e[0]].concat(zt(i)))}function Ma(t){return t+" \u{1F41B}\u{1F41B}\u{1F41B}"}var tt=function(t){Wt(r,t);var e=Kt(r);function r(n){Ht(this,r);var i;return i=e.call(this,n),i.name="\u{1F4A5} Driven Error",i.message=n?Ma(n):"An unknown error occurred in the Driven, please contact the person in charge \u{1F691}\u{1F691}\u{1F691}",i}return r}(Ze(Error)),Oa=function(t){Wt(r,t);var e=Kt(r);function r(n){Ht(this,r);var i;return i=e.call(this,n),i.name="\u{1F6A8} Driven Reference Error",i}return r}(tt);function J(t){throw new tt(t)}function Gt(t){throw new Oa(t)}function _e(t){Ye.error(new tt(t))}function ee(t,e){Array.isArray(t)&&t.map(function(r){switch(r.controlType){case"layout":ee(r==null?void 0:r.children,e);break;case"search":ee(r==null?void 0:r.children,e);break;case"form":e(r)}})}var xa=Object.prototype.toString;function Jt(t,e){return xa.call(t)==="[object "+e+"]"}function Pa(t){return Jt(t,"String")}function La(t){return Jt(t,"Promise")}var ja=function(){function t(e){var r,n;this._messageCache=new Map,this.messages={},this.variableRegExp=/\{([0-9a-zA-Z_]+)\}/g,this._messages=Object.freeze((n=(r=e.messages)!==null&&r!==void 0?r:this.getPreImport(e.locale))!==null&&n!==void 0?n:{}),e.variableRegExp&&(this.variableRegExp=e.variableRegExp),this.setLocale(e.locale)}return t.prototype.setLocale=function(e){var r=this;this.locale=e,this._messageCache.clear();var n=this.getMessageData();La(n)?n.then(function(i){r._messageCache.clear(),r.messages[r.localeInMessageKey]=i}):this.messages[this.localeInMessageKey]=n},t.prototype.getMessageData=function(){var e=this._messages[this.localeInMessageKey];return typeof e=="function"?e():e},t.prototype.translate=function(e,r,n){var i=this.getMessage(e);return i?this.formatMessage(i,n):this.formatMessage(r,n)},t.prototype.getMessage=function(e){if(this._messageCache.has(e))return this._messageCache.get(e);var r=this.getPathArray(e),n=r.reduce(function(i,u,a,o){if(i!==void 0){var c=i[u];if(!(a===o.length-1&&!Pa(c)))return c}},this.message);return this._messageCache.set(e,n),n},t.prototype.formatMessage=function(e,r){return r?e.replace(this.variableRegExp,function(n,i){var u=r[i];return u!==void 0?String(u):n}):e},t.prototype.getPreImport=function(e){var r;if(window.okI18nPreImport){var n=this.getLocaleInMessageKey(e);return window.okI18nPreImport.hasOwnProperty(n)?window.okI18nPreImport:(r={},r[n]=window.okI18nPreImport,r)}},t.prototype.getPathArray=function(e){return e.split(".")},t.prototype.getLocaleInMessageKey=function(e){return e.replace(/-/g,"")},Object.defineProperty(t.prototype,"$t",{get:function(){return this.translate},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"localeInMessageKey",{get:function(){return this.getLocaleInMessageKey(this.locale)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"message",{get:function(){var e;return(e=this.messages[this.localeInMessageKey])!==null&&e!==void 0?e:{}},enumerable:!1,configurable:!0}),t}();function Na(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var j=function(){function t(){Na(this,t)}return t.getMessage=function(r){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$i18n.$t(r,"",n)},t.resetI18n=function(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:qt;return new ja({locale:r,messages:ba})},t.setLocale=function(r){return this.$i18n.setLocale(r)},t}();j.$i18n=j.resetI18n();function Xt(t,e,r){var n=e.replace(/\[(\d)]/g,function(u,a){return"."+a}).split("."),i=!1;return n.reduce(function(u,a,o,c){var s=u;if(!!u){if(!Object.prototype.hasOwnProperty.call(u,a)){X("Can not set ".concat(e,"'s ").concat(a," property in current %o, Because there is no ").concat(a," property on the %o"),u,u);return}return o===c.length-1&&!Object.is(s[a],r)&&(s[a]=r,i=!0),s[a]}},t),i}var Ta=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{},nt={exports:{}};(function(t){(function(e){var r=function(f,y,$){if(!s(y)||d(y)||h(y)||p(y)||c(y))return y;var A,F=0,W=0;if(l(y))for(A=[],W=y.length;F<W;F++)A.push(r(f,y[F],$));else{A={};for(var S in y)Object.prototype.hasOwnProperty.call(y,S)&&(A[f(S,$)]=r(f,y[S],$))}return A},n=function(f,y){y=y||{};var $=y.separator||"_",A=y.split||/(?=[A-Z])/;return f.split(A).join($)},i=function(f){return v(f)?f:(f=f.replace(/[\-_\s]+(.)?/g,function(y,$){return $?$.toUpperCase():""}),f.substr(0,1).toLowerCase()+f.substr(1))},u=function(f){var y=i(f);return y.substr(0,1).toUpperCase()+y.substr(1)},a=function(f,y){return n(f,y).toLowerCase()},o=Object.prototype.toString,c=function(f){return typeof f=="function"},s=function(f){return f===Object(f)},l=function(f){return o.call(f)=="[object Array]"},d=function(f){return o.call(f)=="[object Date]"},h=function(f){return o.call(f)=="[object RegExp]"},p=function(f){return o.call(f)=="[object Boolean]"},v=function(f){return f=f-0,f===f},g=function(f,y){var $=y&&"process"in y?y.process:y;return typeof $!="function"?f:function(A,F){return $(A,f,F)}},m={camelize:i,decamelize:a,pascalize:u,depascalize:a,camelizeKeys:function(f,y){return r(g(i,y),f)},decamelizeKeys:function(f,y){return r(g(a,y),f,y)},pascalizeKeys:function(f,y){return r(g(u,y),f)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};t.exports?t.exports=m:e.humps=m})(Ta)})(nt);function w(t){if(t!==void 0)return typeof t=="object"?JSON.parse(JSON.stringify(t)):t}function V(t){return Object.prototype.toString.call(t)==="[object Object]"}function Va(t){return t!=null&&typeof t=="object"&&Array.isArray(t)===!1}function ie(t){return Array.isArray(t)}function x(t){return typeof t=="string"}function Fe(t){return typeof t=="number"}function Qt(t){return typeof t=="function"}function qa(t){return ie(t)&&t.every(function(e){return x(e)})}function Ua(t){return ie(t)&&t.every(function(e){return Fe(e)||e===""})}function Zt(t){return/^\[.*?]$/.test(t)}function De(t){return/^{.*?}$/.test(t)}function rt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ka(t){if(Array.isArray(t))return rt(t)}function Yt(t,e,r,n,i,u,a){try{var o=t[u](a),c=o.value}catch(s){r(s);return}o.done?e(c):Promise.resolve(c).then(n,i)}function Ha(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var u=t.apply(e,r);function a(c){Yt(u,n,i,a,o,"next",c)}function o(c){Yt(u,n,i,a,o,"throw",c)}a(void 0)})}}function Wa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function za(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ka(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function it(t){return ka(t)||za(t)||Ga(t)||Ka()}function Ga(t,e){if(!!t){if(typeof t=="string")return rt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return rt(t,e)}}var Ja=function(t,e){var r,n,i,u,a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};return u={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function o(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=s[0]&2?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(l){s=[6,l],n=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},en=function(){function t(){Wa(this,t),this._events=new Map,this.debug=!1}var e=t.prototype;return e.emit=function(n){for(var i=arguments.length,u=new Array(i>1?i-1:0),a=1;a<i;a++)u[a-1]=arguments[a];var o=this;return Ha(function(){var c,s,l,d,h,p,v,g,m,f,y,$;return Ja(this,function(A){switch(A.label){case 0:if(c=o._events.get(n),s=[],!c)return[3,10];l=c.slice(),d=!0,h=!1,p=void 0,A.label=1;case 1:A.trys.push([1,8,9,10]),v=l[Symbol.iterator](),A.label=2;case 2:if(d=(g=v.next()).done)return[3,7];if(m=g.value,!c.includes(m))return[3,6];A.label=3;case 3:return A.trys.push([3,5,,6]),o.debug&&et.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(n," \u4E8B\u4EF6: ").concat(m.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+m.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(u.map(function(){return"%o"}).join(","),"\u3002")].concat(it(u))),[4,m.apply(null,it(u))];case 4:return f=A.sent(),o.debug&&et.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(n," \u4E8B\u4EF6: ").concat(m.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+m.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(u.map(function(){return"%o"}).join(","),"; \u51FD\u6570\u7684\u8FD4\u56DE\u7ED3\u679C\u4E3A%o")].concat(it(u),[f])),s.push(f),f===!1?[3,7]:[3,6];case 5:return y=A.sent(),_e(String(y)),[3,6];case 6:return d=!0,[3,2];case 7:return[3,10];case 8:return $=A.sent(),h=!0,p=$,[3,10];case 9:try{!d&&v.return!=null&&v.return()}finally{if(h)throw p}return[7];case 10:return[2,s]}})})()},e.on=function(n,i){if(this._events.has(n)){var u;(u=this._events.get(n))===null||u===void 0||u.push(i)}else this._events.set(n,[i])},e.off=function(n,i){if(this._events.has(n)){var u=this._events.get(n),a=u==null?void 0:u.indexOf(i);u==null||u.splice(a,1)}},e.delete=function(n){this._events.has(n)&&this._events.delete(n)},e.clear=function(){this._events=new Map},t}();function Xa(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var Qa=[{key:"on_click",name:"\u70B9\u51FB\u65F6",code:"click"},{key:"on_click_finish",name:"\u6267\u884C\u5B8C\u6210\u65F6",code:"click-finish"},{key:"on_change",name:"\u503C\u53D1\u751F\u53D8\u5316\u65F6",code:"change"},{key:"on_search",name:"\u641C\u7D22\u65F6",code:"search"},{key:"on_list_change",name:"\u5217\u8868\u6570\u636E\u53D8\u5316\u65F6",code:"list-change"},{key:"on_list_search",name:"\u5217\u8868\u6570\u636E\u67E5\u8BE2\u6784\u5EFA\u65F6",code:"list-search"},{key:"on_list_mounted",name:"\u5217\u8868\u6570\u636E\u8FD4\u56DE\u65F6",code:"list-mounted"},{key:"on_list_delete",name:"\u5217\u8868\u6570\u636E\u5220\u9664\u65F6",code:"list-delete"},{key:"on_input",name:"\u7528\u6237\u8F93\u5165\u65F6",code:"input"},{key:"on_blur",name:"\u5931\u53BB\u7126\u70B9\u65F6",code:"blur"},{key:"on_focus",name:"\u83B7\u53D6\u7126\u70B9\u65F6",code:"focus"},{key:"on_wps_open",name:"\u6253\u5F00\u6587\u4EF6\u65F6",code:"wps-open"},{key:"on_wps_save",name:"\u4FDD\u5B58\u6587\u4EF6\u65F6",code:"wps-save"},{key:"on_wps_rename",name:"\u91CD\u547D\u540D\u65F6",code:"wps-rename"},{key:"on_list_actions",name:"\u70B9\u51FB\u64CD\u4F5C\u6309\u94AE\u65F6",code:"list-actions"},{key:"on_list_rowclick",name:"\u884C\u70B9\u51FB\u65F6",code:"list-rowclick"},{key:"on_list_before_rowdelete",name:"\u884C\u5220\u9664\u524D",code:"list-before-rowdelete"},{key:"on_list_before_import",name:"\u5217\u8868\u6570\u636E\u5BFC\u5165\u524D",code:"list-before-import"},{key:"on_list_rows_checked",name:"\u884C\u9009\u4E2D\u65F6",code:"list-rowsChecked"}],tn=function(){function t(){Xa(this,t)}var e=t.prototype;return e.getEventsFromKeys=function(n){var i=typeof n=="string"?[n]:n;return t.events.filter(function(u){return i.includes(u.key)})},t}();tn.events=Qa;function Za(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var nn=[],Ie=function(){function t(r){Za(this,t),this.registeredControlTypes=new Set,this.controlConfigMap=new Map,this._controls=[],this._type=r,this._initControls(r)}var e=t.prototype;return e.registerControlConfig=function(n,i){return this.controlConfigMap.set(n,i),this},e.getControlConfig=function(n){return this.controlConfigMap.get(n)},e.getControls=function(){return this._controls},e.register=function(n){n.__is_control__||J("".concat(n.name," is not a Control"));var i=this._controls.findIndex(function(u){return u.controlType===n.controlType});return i>-1&&(X("The ".concat(n.controlType," is repeat register, So it overwrites the one that was registered before.")),this._controls.splice(i,1)),this.registeredControlTypes.add(n.controlType),this._controls.push(n),this},e.isLayoutControl=function(n){return n.controlType===T.LAYOUT},e.isFormControl=function(n){return n.controlType===T.FORM},e.isListControl=function(n){return n.controlType===T.LIST},e.isColumnControl=function(n){return n.controlType===T.COLUMN},e.createControl=function(n,i){var u=this;if(Array.isArray(n))return n.map(function(l){return u.createControl(l,i)});n.children&&(n.children=n.children.map(function(l){return u.createControl(l,i)})),this.isListControl(n)&&n.props.headers&&(n.props.headers=n.props.headers.map(function(l){return u.createControl(l,i)}));var a=this.getControlFormType(n.type);if(a){var o=n;if(typeof i=="function"){var c=i(o);c&&(o=c)}var s=new a(o);return s}else J("The constructor of ".concat(n.type," could not be found, please confirm that the constructor has been registered"))},e.createControlInstance=function(n,i){var u=this.getControlFormType(n);if(u)return new u(i)},e.getControlFormType=function(n){return this._controls.find(function(i){return i.controlType===n})},e._initControls=function(n){var i=this;this.constructor.staticControls.forEach(function(u){i.register(u[n])})},t.register=function(n){var i=n.Designer,u=n.Runtime;(!i||!u||!i.__is_control__||!u.__is_control__)&&J("".concat(n," is can't register as a Control"));var a=this.staticControls.findIndex(function(o){return o.Designer.controlType===i.controlType});return a>-1&&(X("The ".concat(i.controlType," is repeat register, So it overwrites the one that was registered before.")),this.staticControls.splice(a,1)),this.staticRegisteredTypes.add(i.controlType),this.staticControls.push(n),this},t}();Ie.staticControls=nn,Ie.staticRegisteredTypes=new Set(nn.map(function(t){return t.Designer.controlType})),Ie.staticRegisteredConfigs=new Map;function te(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}var ge=function t(e){te(this,t);var r;this.dataCode=(r=e==null?void 0:e.dataCode)!==null&&r!==void 0?r:"";var n;this.fieldCode=(n=e==null?void 0:e.fieldCode)!==null&&n!==void 0?n:"";var i;this.fieldType=(i=e==null?void 0:e.fieldType)!==null&&i!==void 0?i:""},q=function t(){te(this,t)},Re=function t(e){te(this,t);var r;this.amount=(r=e==null?void 0:e.amount)!==null&&r!==void 0?r:"";var n;this.currency=(n=e==null?void 0:e.currency)!==null&&n!==void 0?n:ut.CNY},$e=function t(e){te(this,t);var r;this.min=(r=e==null?void 0:e.min)!==null&&r!==void 0?r:"";var n;this.max=(n=e==null?void 0:e.max)!==null&&n!==void 0?n:""},Me=function t(e){te(this,t);var r;this.city=(r=e==null?void 0:e.city)!==null&&r!==void 0?r:"";var n;this.cityDisplay=(n=e==null?void 0:e.cityDisplay)!==null&&n!==void 0?n:"";var i;this.district=(i=e==null?void 0:e.district)!==null&&i!==void 0?i:"";var u;this.districtDisplay=(u=e==null?void 0:e.districtDisplay)!==null&&u!==void 0?u:"";var a;this.province=(a=e==null?void 0:e.province)!==null&&a!==void 0?a:"";var o;this.provinceDisplay=(o=e==null?void 0:e.provinceDisplay)!==null&&o!==void 0?o:""},Oe=function t(e){te(this,t);var r;this.result=(r=e==null?void 0:e.result)!==null&&r!==void 0?r:0;var n;this.unit=(n=e==null?void 0:e.unit)!==null&&n!==void 0?n:""},ut;(function(t){t.CNY="CNY",t.USD="USD",t.JPY="JPY",t.EUR="EUR",t.INR="INR",t.IDR="IDR",t.BRL="BRL",t.AED="AED",t.AUD="AUD",t.CAD="CAD",t.EGP="EGP",t.GBP="GBP",t.ZAR="ZAR",t.KRW="KRW",t.MAD="MAD",t.MXN="MXN",t.MYR="MYR",t.PHP="PHP",t.PLN="PLN",t.RUB="RUB",t.SGD="SGD",t.THB="THB",t.TRY="TRY",t.TWD="TWD",t.VND="VND",t.HKD="HKD",t.IEP="IEP"})(ut||(ut={}));var rn;(function(t){t.REQUIRED="required",t.IS_HIDE="isHide",t.IS_SHOW_UNIT="isShowUnit",t.IMD_SEARCH="immediatelySearch",t.MULTIPLE="multiple",t.SUBMIT_SELECT_CURRENCY="submitSelectCurrency",t.CAPTION="caption",t.IS_HIDE_CAPTION="isHideCaption",t.DEFAULT_SHOW_OPTIONS="defaultShowOptions",t.CAN_SEARCH="canSearch",t.CAN_CHECK="canCheck",t.CAN_EDIT="canEdit",t.CAN_DELETE="canDelete",t.SHOW_UPPER_CASE="showUpperCase",t.MICROMETER="micrometer",t.PRECISION="precision",t.PERCENTAGE="percentage",t.OPTIONAL_LEVEL="optionalLevel",t.CONTAINS_SUB_NODE="containsSubNode",t.DEFAULT_COLLAPSE="defaultCollapse",t.CAN_VIEW_FORM="canViewForm",t.SERVER_PAGINATION="serverPagination",t.IS_SHOW_CAPTION_TIP="isShowCaptionTip",t.ENCRYPTED="encrypted",t.IS_INLINE_EDIT="isInlineEdit",t.REVISIONS_MODE="revisionsMode",t.ALLOW_COPY_OPTIONS="allowCopyOptions"})(rn||(rn={}));var at;(function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.READONLY=1]="READONLY",t[t.EDITABLE=2]="EDITABLE",t[t.PRINT=5]="PRINT"})(at||(at={}));var Ya=function t(e){te(this,t);var r;this.width=(r=e==null?void 0:e.width)!==null&&r!==void 0?r:"";var n;this.height=(n=e==null?void 0:e.height)!==null&&n!==void 0?n:"";var i;this.widthConfig=(i=e==null?void 0:e.widthConfig)!==null&&i!==void 0?i:"fill";var u;this.heightConfig=(u=e==null?void 0:e.heightConfig)!==null&&u!==void 0?u:"fill"};function eo(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ot(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function to(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function xe(t,e,r){return to()?xe=Reflect.construct:xe=function(i,u,a){var o=[null];o.push.apply(o,u);var c=Function.bind.apply(i,o),s=new c;return a&&ve(s,a.prototype),s},xe.apply(null,arguments)}function ye(t){return ye=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ye(t)}function no(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&ve(t,e)}function ro(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function io(t,e){return e&&(uo(e)==="object"||typeof e=="function")?e:eo(t)}function ve(t,e){return ve=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},ve(t,e)}var uo=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function st(t){var e=typeof Map=="function"?new Map:void 0;return st=function(n){if(n===null||!ro(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return xe(n,arguments,ye(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),ve(i,n)},st(t)}function ao(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function oo(t){var e=ao();return function(){var n=ye(t),i;if(e){var u=ye(this).constructor;i=Reflect.construct(n,arguments,u)}else i=n.apply(this,arguments);return io(this,i)}}var un=function t(e){ot(this,t),this.isHide={type:"boolean"}},an=function(t){no(r,t);var e=oo(r);function r(n){return ot(this,r),e.call(this)}return r}(st(Array)),ne=function t(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";ot(this,t);var n;this.isHide=(n=e==null?void 0:e.isHide)!==null&&n!==void 0?n:!1,this.style=new Ya(e==null?void 0:e.style);var i;this.caption=(i=e==null?void 0:e.caption)!==null&&i!==void 0?i:r};ne.Rules=un,ne.RuntimeRules=an;function U(){return U=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(t[n]=r[n])}return t},U.apply(this,arguments)}function so(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function ct(t){return ct=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ct(t)}function Pe(t,e){return Pe=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Pe(t,e)}function co(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}function Le(t,e,r){return co()?Le=Reflect.construct:Le=function(i,u,a){var o=[null];o.push.apply(o,u);var c=Function.bind.apply(i,o),s=new c;return a&&Pe(s,a.prototype),s},Le.apply(null,arguments)}function lo(t){return Function.toString.call(t).indexOf("[native code]")!==-1}function lt(t){var e=typeof Map=="function"?new Map:void 0;return lt=function(n){if(n===null||!lo(n))return n;if(typeof n!="function")throw new TypeError("Super expression must either be null or a function");if(typeof e!="undefined"){if(e.has(n))return e.get(n);e.set(n,i)}function i(){return Le(n,arguments,ct(this).constructor)}return i.prototype=Object.create(n.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),Pe(i,n)},lt(t)}var fo=/%[sdj%]/g,on=function(){};typeof process!="undefined"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window!="undefined"&&typeof document!="undefined"&&(on=function(e,r){typeof console!="undefined"&&console.warn&&r.every(function(n){return typeof n=="string"})&&console.warn(e,r)});function ft(t){if(!t||!t.length)return null;var e={};return t.forEach(function(r){var n=r.field;e[n]=e[n]||[],e[n].push(r)}),e}function P(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var n=1,i=e[0],u=e.length;if(typeof i=="function")return i.apply(null,e.slice(1));if(typeof i=="string"){var a=String(i).replace(fo,function(o){if(o==="%%")return"%";if(n>=u)return o;switch(o){case"%s":return String(e[n++]);case"%d":return Number(e[n++]);case"%j":try{return JSON.stringify(e[n++])}catch(c){return"[Circular]"}break;default:return o}});return a}return i}function ho(t){return t==="string"||t==="url"||t==="hex"||t==="email"||t==="date"||t==="pattern"}function I(t,e){return!!(t==null||e==="array"&&Array.isArray(t)&&!t.length||ho(e)&&typeof t=="string"&&!t)}function po(t,e,r){var n=[],i=0,u=t.length;function a(o){n.push.apply(n,o),i++,i===u&&r(n)}t.forEach(function(o){e(o,a)})}function sn(t,e,r){var n=0,i=t.length;function u(a){if(a&&a.length){r(a);return}var o=n;n=n+1,o<i?e(t[o],u):r([])}u([])}function go(t){var e=[];return Object.keys(t).forEach(function(r){e.push.apply(e,t[r])}),e}var cn=function(t){so(e,t);function e(r,n){var i;return i=t.call(this,"Async Validation Error")||this,i.errors=r,i.fields=n,i}return e}(lt(Error));function yo(t,e,r,n){if(e.first){var i=new Promise(function(d,h){var p=function(m){return n(m),m.length?h(new cn(m,ft(m))):d()},v=go(t);sn(v,r,p)});return i.catch(function(d){return d}),i}var u=e.firstFields||[];u===!0&&(u=Object.keys(t));var a=Object.keys(t),o=a.length,c=0,s=[],l=new Promise(function(d,h){var p=function(g){if(s.push.apply(s,g),c++,c===o)return n(s),s.length?h(new cn(s,ft(s))):d()};a.length||(n(s),d()),a.forEach(function(v){var g=t[v];u.indexOf(v)!==-1?sn(g,r,p):po(g,r,p)})});return l.catch(function(d){return d}),l}function ln(t){return function(e){return e&&e.message?(e.field=e.field||t.fullField,e):{message:typeof e=="function"?e():e,field:e.field||t.fullField}}}function fn(t,e){if(e){for(var r in e)if(e.hasOwnProperty(r)){var n=e[r];typeof n=="object"&&typeof t[r]=="object"?t[r]=U(U({},t[r]),n):t[r]=n}}return t}function dn(t,e,r,n,i,u){t.required&&(!r.hasOwnProperty(t.field)||I(e,u||t.type))&&n.push(P(i.messages.required,t.fullField))}function vo(t,e,r,n,i){(/^\s+$/.test(e)||e==="")&&n.push(P(i.messages.whitespace,t.fullField))}var dt={email:/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,url:new RegExp("^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$","i"),hex:/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i},me={integer:function(e){return me.number(e)&&parseInt(e,10)===e},float:function(e){return me.number(e)&&!me.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(r){return!1}},date:function(e){return typeof e.getTime=="function"&&typeof e.getMonth=="function"&&typeof e.getYear=="function"&&!isNaN(e.getTime())},number:function(e){return isNaN(e)?!1:typeof e=="number"},object:function(e){return typeof e=="object"&&!me.array(e)},method:function(e){return typeof e=="function"},email:function(e){return typeof e=="string"&&!!e.match(dt.email)&&e.length<255},url:function(e){return typeof e=="string"&&!!e.match(dt.url)},hex:function(e){return typeof e=="string"&&!!e.match(dt.hex)}};function mo(t,e,r,n,i){if(t.required&&e===void 0){dn(t,e,r,n,i);return}var u=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=t.type;u.indexOf(a)>-1?me[a](e)||n.push(P(i.messages.types[a],t.fullField,t.type)):a&&typeof e!==t.type&&n.push(P(i.messages.types[a],t.fullField,t.type))}function Eo(t,e,r,n,i){var u=typeof t.len=="number",a=typeof t.min=="number",o=typeof t.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,s=e,l=null,d=typeof e=="number",h=typeof e=="string",p=Array.isArray(e);if(d?l="number":h?l="string":p&&(l="array"),!l)return!1;p&&(s=e.length),h&&(s=e.replace(c,"_").length),u?s!==t.len&&n.push(P(i.messages[l].len,t.fullField,t.len)):a&&!o&&s<t.min?n.push(P(i.messages[l].min,t.fullField,t.min)):o&&!a&&s>t.max?n.push(P(i.messages[l].max,t.fullField,t.max)):a&&o&&(s<t.min||s>t.max)&&n.push(P(i.messages[l].range,t.fullField,t.min,t.max))}var ue="enum";function bo(t,e,r,n,i){t[ue]=Array.isArray(t[ue])?t[ue]:[],t[ue].indexOf(e)===-1&&n.push(P(i.messages[ue],t.fullField,t[ue].join(", ")))}function Ao(t,e,r,n,i){if(t.pattern){if(t.pattern instanceof RegExp)t.pattern.lastIndex=0,t.pattern.test(e)||n.push(P(i.messages.pattern.mismatch,t.fullField,e,t.pattern));else if(typeof t.pattern=="string"){var u=new RegExp(t.pattern);u.test(e)||n.push(P(i.messages.pattern.mismatch,t.fullField,e,t.pattern))}}}var E={required:dn,whitespace:vo,type:mo,range:Eo,enum:bo,pattern:Ao};function Bo(t,e,r,n,i){var u=[],a=t.required||!t.required&&n.hasOwnProperty(t.field);if(a){if(I(e,"string")&&!t.required)return r();E.required(t,e,n,u,i,"string"),I(e,"string")||(E.type(t,e,n,u,i),E.range(t,e,n,u,i),E.pattern(t,e,n,u,i),t.whitespace===!0&&E.whitespace(t,e,n,u,i))}r(u)}function Co(t,e,r,n,i){var u=[],a=t.required||!t.required&&n.hasOwnProperty(t.field);if(a){if(I(e)&&!t.required)return r();E.required(t,e,n,u,i),e!==void 0&&E.type(t,e,n,u,i)}r(u)}function wo(t,e,r,n,i){var u=[],a=t.required||!t.required&&n.hasOwnProperty(t.field);if(a){if(e===""&&(e=void 0),I(e)&&!t.required)return r();E.required(t,e,n,u,i),e!==void 0&&(E.type(t,e,n,u,i),E.range(t,e,n,u,i))}r(u)}function So(t,e,r,n,i){var u=[],a=t.required||!t.required&&n.hasOwnProperty(t.field);if(a){if(I(e)&&!t.required)return r();E.required(t,e,n,u,i),e!==void 0&&E.type(t,e,n,u,i)}r(u)}function _o(t,e,r,n,i){var u=[],a=t.required||!t.required&&n.hasOwnProperty(t.field);if(a){if(I(e)&&!t.required)return r();E.required(t,e,n,u,i),I(e)||E.type(t,e,n,u,i)}r(u)}function Fo(t,e,r,n,i){var u=[],a=t.required||!t.required&&n.hasOwnProperty(t.field);if(a){if(I(e)&&!t.required)return r();E.required(t,e,n,u,i),e!==void 0&&(E.type(t,e,n,u,i),E.range(t,e,n,u,i))}r(u)}function Do(t,e,r,n,i){var u=[],a=t.required||!t.required&&n.hasOwnProperty(t.field);if(a){if(I(e)&&!t.required)return r();E.required(t,e,n,u,i),e!==void 0&&(E.type(t,e,n,u,i),E.range(t,e,n,u,i))}r(u)}function Io(t,e,r,n,i){var u=[],a=t.required||!t.required&&n.hasOwnProperty(t.field);if(a){if(e==null&&!t.required)return r();E.required(t,e,n,u,i,"array"),e!=null&&(E.type(t,e,n,u,i),E.range(t,e,n,u,i))}r(u)}function Ro(t,e,r,n,i){var u=[],a=t.required||!t.required&&n.hasOwnProperty(t.field);if(a){if(I(e)&&!t.required)return r();E.required(t,e,n,u,i),e!==void 0&&E.type(t,e,n,u,i)}r(u)}var $o="enum";function Mo(t,e,r,n,i){var u=[],a=t.required||!t.required&&n.hasOwnProperty(t.field);if(a){if(I(e)&&!t.required)return r();E.required(t,e,n,u,i),e!==void 0&&E[$o](t,e,n,u,i)}r(u)}function Oo(t,e,r,n,i){var u=[],a=t.required||!t.required&&n.hasOwnProperty(t.field);if(a){if(I(e,"string")&&!t.required)return r();E.required(t,e,n,u,i),I(e,"string")||E.pattern(t,e,n,u,i)}r(u)}function xo(t,e,r,n,i){var u=[],a=t.required||!t.required&&n.hasOwnProperty(t.field);if(a){if(I(e,"date")&&!t.required)return r();if(E.required(t,e,n,u,i),!I(e,"date")){var o;e instanceof Date?o=e:o=new Date(e),E.type(t,o,n,u,i),o&&E.range(t,o.getTime(),n,u,i)}}r(u)}function Po(t,e,r,n,i){var u=[],a=Array.isArray(e)?"array":typeof e;E.required(t,e,n,u,i,a),r(u)}function ht(t,e,r,n,i){var u=t.type,a=[],o=t.required||!t.required&&n.hasOwnProperty(t.field);if(o){if(I(e,u)&&!t.required)return r();E.required(t,e,n,a,i,u),I(e,u)||E.type(t,e,n,a,i)}r(a)}function Lo(t,e,r,n,i){var u=[],a=t.required||!t.required&&n.hasOwnProperty(t.field);if(a){if(I(e)&&!t.required)return r();E.required(t,e,n,u,i)}r(u)}var Ee={string:Bo,method:Co,number:wo,boolean:So,regexp:_o,integer:Fo,float:Do,array:Io,object:Ro,enum:Mo,pattern:Oo,date:xo,url:ht,hex:ht,email:ht,required:Po,any:Lo};function pt(){return{default:"Validation error on field %s",required:"%s is required",enum:"%s must be one of %s",whitespace:"%s cannot be empty",date:{format:"%s date %s is invalid for format %s",parse:"%s date could not be parsed, %s is invalid ",invalid:"%s date %s is invalid"},types:{string:"%s is not a %s",method:"%s is not a %s (function)",array:"%s is not an %s",object:"%s is not an %s",number:"%s is not a %s",date:"%s is not a %s",boolean:"%s is not a %s",integer:"%s is not an %s",float:"%s is not a %s",regexp:"%s is not a valid %s",email:"%s is not a valid %s",url:"%s is not a valid %s",hex:"%s is not a valid %s"},string:{len:"%s must be exactly %s characters",min:"%s must be at least %s characters",max:"%s cannot be longer than %s characters",range:"%s must be between %s and %s characters"},number:{len:"%s must equal %s",min:"%s cannot be less than %s",max:"%s cannot be greater than %s",range:"%s must be between %s and %s"},array:{len:"%s must be exactly %s in length",min:"%s cannot be less than %s in length",max:"%s cannot be greater than %s in length",range:"%s must be between %s and %s in length"},pattern:{mismatch:"%s value %s does not match pattern %s"},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var gt=pt();function Q(t){this.rules=null,this._messages=gt,this.define(t)}Q.prototype={messages:function(e){return e&&(this._messages=fn(pt(),e)),this._messages},define:function(e){if(!e)throw new Error("Cannot configure a schema with no rules");if(typeof e!="object"||Array.isArray(e))throw new Error("Rules must be an object");this.rules={};var r,n;for(r in e)e.hasOwnProperty(r)&&(n=e[r],this.rules[r]=Array.isArray(n)?n:[n])},validate:function(e,r,n){var i=this;r===void 0&&(r={}),n===void 0&&(n=function(){});var u=e,a=r,o=n;if(typeof a=="function"&&(o=a,a={}),!this.rules||Object.keys(this.rules).length===0)return o&&o(),Promise.resolve();function c(g){var m,f=[],y={};function $(A){if(Array.isArray(A)){var F;f=(F=f).concat.apply(F,A)}else f.push(A)}for(m=0;m<g.length;m++)$(g[m]);f.length?y=ft(f):(f=null,y=null),o(f,y)}if(a.messages){var s=this.messages();s===gt&&(s=pt()),fn(s,a.messages),a.messages=s}else a.messages=this.messages();var l,d,h={},p=a.keys||Object.keys(this.rules);p.forEach(function(g){l=i.rules[g],d=u[g],l.forEach(function(m){var f=m;typeof f.transform=="function"&&(u===e&&(u=U({},u)),d=u[g]=f.transform(d)),typeof f=="function"?f={validator:f}:f=U({},f),f.validator=i.getValidationMethod(f),f.field=g,f.fullField=f.fullField||g,f.type=i.getType(f),f.validator&&(h[g]=h[g]||[],h[g].push({rule:f,value:d,source:u,field:g}))})});var v={};return yo(h,a,function(g,m){var f=g.rule,y=(f.type==="object"||f.type==="array")&&(typeof f.fields=="object"||typeof f.defaultField=="object");y=y&&(f.required||!f.required&&g.value),f.field=g.field;function $(W,S){return U(U({},S),{},{fullField:f.fullField+"."+W})}function A(W){W===void 0&&(W=[]);var S=W;if(Array.isArray(S)||(S=[S]),!a.suppressWarning&&S.length&&Q.warning("async-validator:",S),S.length&&f.message!==void 0&&(S=[].concat(f.message)),S=S.map(ln(f)),a.first&&S.length)return v[f.field]=1,m(S);if(!y)m(S);else{if(f.required&&!g.value)return f.message!==void 0?S=[].concat(f.message).map(ln(f)):a.error&&(S=[a.error(f,P(a.messages.required,f.field))]),m(S);var z={};if(f.defaultField)for(var Wn in g.value)g.value.hasOwnProperty(Wn)&&(z[Wn]=f.defaultField);z=U(U({},z),g.rule.fields);for(var ce in z)if(z.hasOwnProperty(ce)){var qc=Array.isArray(z[ce])?z[ce]:[z[ce]];z[ce]=qc.map($.bind(null,ce))}var zn=new Q(z);zn.messages(a.messages),g.rule.options&&(g.rule.options.messages=a.messages,g.rule.options.error=a.error),zn.validate(g.value,g.rule.options||a,function(Tt){var le=[];S&&S.length&&le.push.apply(le,S),Tt&&Tt.length&&le.push.apply(le,Tt),m(le.length?le:null)})}}var F;f.asyncValidator?F=f.asyncValidator(f,g.value,A,g.source,a):f.validator&&(F=f.validator(f,g.value,A,g.source,a),F===!0?A():F===!1?A(f.message||f.field+" fails"):F instanceof Array?A(F):F instanceof Error&&A(F.message)),F&&F.then&&F.then(function(){return A()},function(W){return A(W)})},function(g){c(g)})},getType:function(e){if(e.type===void 0&&e.pattern instanceof RegExp&&(e.type="pattern"),typeof e.validator!="function"&&e.type&&!Ee.hasOwnProperty(e.type))throw new Error(P("Unknown rule type %s",e.type));return e.type||"string"},getValidationMethod:function(e){if(typeof e.validator=="function")return e.validator;var r=Object.keys(e),n=r.indexOf("message");return n!==-1&&r.splice(n,1),r.length===1&&r[0]==="required"?Ee.required:Ee[this.getType(e)]||!1}},Q.register=function(e,r){if(typeof r!="function")throw new Error("Cannot register a validator by type, validator is not a function");Ee[e]=r},Q.warning=on,Q.messages=gt,Q.validators=Ee;var jo={required:"%s \u5FC5\u586B",maxLength:"%s \u8D85\u51FA\u6700\u5927\u957F\u5EA6\u9650\u5236",minLength:"%s \u5C0F\u4E8E\u6700\u5C0F\u957F\u5EA6\u9650\u5236",string:{range:"%s \u4E0D\u5728\u6307\u5B9A\u957F\u5EA6\u5185"}};function No(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=new Q(t);return r.messages(Object.assign(jo,e)),r}var To=new en;function yt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function Vo(t){if(Array.isArray(t))return t}function qo(t){if(Array.isArray(t))return yt(t)}function hn(t,e,r,n,i,u,a){try{var o=t[u](a),c=o.value}catch(s){r(s);return}o.done?e(c):Promise.resolve(c).then(n,i)}function pn(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var u=t.apply(e,r);function a(c){hn(u,n,i,a,o,"next",c)}function o(c){hn(u,n,i,a,o,"throw",c)}a(void 0)})}}function Uo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function gn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ko(t,e,r){return e&&gn(t.prototype,e),r&&gn(t,r),t}function Ho(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yn(t,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function vn(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Wo(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function zo(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ho(t,i,r[i])})}return t}function Ko(t){return Vo(t)||vn(t)||En(t)||Wo()}function vt(t){return qo(t)||vn(t)||En(t)||zo()}function En(t,e){if(!!t){if(typeof t=="string")return yt(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yt(t,e)}}var bn=function(t,e){var r,n,i,u,a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};return u={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function o(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=s[0]&2?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(l){s=[6,l],n=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},k=function(){function e(n){var i=this;Uo(this,e),this.setting=[],this.eventKeys=[],this.customEvents=[],this.parent=null,this.updateSetting=Bn,this.removeSetting=An,this._callControlHooks("preInstance",n);var u=yn(this,e)?this.constructor:void 0,a=u.controlName,o=u.controlIcon,c=u.controlType,s=u.controlFieldType,l=u.controlEventKeys,d=u.controlCustomEvents,h=u.name,p=u.setting;a&&o&&c||Gt("The ".concat(h," controlName,controlIcon,controlType is not define"));var v;this.id=(v=n==null?void 0:n.id)!==null&&v!==void 0?v:Xe(10),this.name=a,this.icon=o;var g;this.type=(g=n==null?void 0:n.type)!==null&&g!==void 0?g:c,this.props=new ne(n==null?void 0:n.props,(yn(this,e)?this.constructor:void 0).controlName);var m;this.controlType=(m=n==null?void 0:n.controlType)!==null&&m!==void 0?m:"base",this.setting=w(p);var f;this.fieldType=(f=n==null?void 0:n.fieldType)!==null&&f!==void 0?f:s,this.eventKeys=w(l),this.customEvents=w(d),Promise.resolve().then(function(){i._callControlHooks("postInstance",n)})}var r=e.prototype;return r._callControlHooks=function(){for(var i=arguments.length,u=new Array(i),a=0;a<i;a++)u[a]=arguments[a];var o,c=Ko(u),s=c[0],l=c.slice(1);return(o=To).emit.apply(o,[s,this].concat(vt(l)))},r.preUpdate=function(i,u){this._callControlHooks("preUpdateProps",i,u)},r.postUpdate=function(i,u){this._callControlHooks("postUpdateProps",i,u)},r.updateProps=function(i,u){this.preUpdate(i,u),Xt(this.props,i,u),this.postUpdate(i,u)},r.preValidate=function(){var i=this;return pn(function(){var u,a,o;return bn(this,function(c){switch(c.label){case 0:return u=mn({},i.rules),[4,i._callControlHooks("preValidate",u)];case 1:return a=c.sent(),o=a[a.length-1],[2,o===!1?void 0:o]}})})()},r.validate=function(i,u){var a=this;return pn(function(){var o,c,s,l;return bn(this,function(d){switch(d.label){case 0:return[4,a.preValidate()];case 1:o=d.sent(),c=o!==void 0?o:mn({},a.rules),Array.isArray(u)&&u.forEach(function(h){c.hasOwnProperty(h)&&delete c[h]}),s=No(c,i),d.label=2;case 2:return d.trys.push([2,4,,5]),[4,s.validate(a.props)];case 3:return d.sent(),[2,!0];case 4:throw l=d.sent(),l.control||(l.control=a),l;case 5:return[2]}})})()},r.toDataBindModel=function(){var i=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,u=this.fieldType,a=this.id,o=this.type,c=this.props,s=c.dataBind,l=c.datasourceBind,d=c.optionConfig,h=c.caption,p=c.required,v=c.maxLength,g=c.options,m=c.encrypted,f=c.encryptedMode;if(!(!u&&!s&&!l)){var y={parentId:i,fieldType:u,controlId:a,caption:h,type:o,props:{}};switch(s&&(y.dataBind=s),d){case"datasource":case void 0:l&&(y.datasourceBind=l);break;case"custom":y.props.options=g;break}return p!==void 0&&(y.required=p),v!==void 0&&(y.maxLength=v),m!==void 0&&(y.encrypted=m),f!==void 0&&(y.encryptedMode=f),y}},r.preToSchema=function(){this._callControlHooks("preToSchema",this)},r.toSchema=function(){return this.preToSchema(),{id:this.id,type:this.type,props:w(this.props),fieldType:this.fieldType,controlType:this.controlType}},e.updateBasicControl=function(i,u){if(i==="setting"){if(u.add){var a;(a=this.setting).push.apply(a,vt(u.add))}u.remove&&this.removeSettingItem(u.remove),u.update}},ko(e,[{key:"rules",get:function(){var i=this.props.constructor.Rules;return i?new i(this.props):{}}}]),e}();k.controlName="\u63A7\u4EF6",k.controlIcon="icon",k.controlType="control",k.controlEventKeys=[],k.controlCustomEvents=[],k.setting=[],k.__is_control__=!0,k.removeSettingItem=An,k.updateSettingItem=Bn;function An(t){var e=this,r=Array.isArray(t)?t:[t];r.forEach(function(n){var i=typeof n!="string",u=e.setting.findIndex(function(c){return c.key===(i?n.key:n)});if(u!==-1){var a,o;i?e.setting[u].showItems=(a=e.setting[u].showItems)===null||a===void 0?void 0:a.filter(function(c){return!n.hideItems.includes(c)}):e.setting.splice(u,1),i&&!(!((o=e.setting[u].showItems)===null||o===void 0)&&o.length)&&e.setting.splice(u,1)}})}function Bn(t,e){var r=this,n=typeof t=="string"?[t]:t;n.forEach(function(i){var u=r.setting.find(function(s){return s.key===i});if(u){if(typeof e=="boolean")u.visible=e;else if(typeof e=="object"){var a,o=(a=e.type)!==null&&a!==void 0?a:"replace";if(o==="replace")u.showItems=e.showItems;else{var c;(c=u.showItems).push.apply(c,vt(e.showItems))}}}})}function Go(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Cn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function Jo(t,e,r){return e&&Cn(t.prototype,e),r&&Cn(t,r),t}function Xo(t,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}var ae=function(){function e(r){Go(this,e),this.customEvents=[],this.parent=null;var n=Xo(this,e)?this.constructor:void 0,i=n.controlType,u=n.controlFieldType,a=n.name,o=n.controlCustomEvents;i||Gt("The ".concat(a," controlType is not define"));var c;this.id=(c=r==null?void 0:r.id)!==null&&c!==void 0?c:Xe(10);var s;this.type=(s=r==null?void 0:r.type)!==null&&s!==void 0?s:i,this.props=new ne(r==null?void 0:r.props),this.customEvents=o;var l;this.controlType=(l=r==null?void 0:r.controlType)!==null&&l!==void 0?l:"base";var d;this.fieldType=(d=r==null?void 0:r.fieldType)!==null&&d!==void 0?d:u;var h;this.pageStatus=(h=r==null?void 0:r.pageStatus)!==null&&h!==void 0?h:at.UNKNOWN}return Jo(e,[{key:"rules",get:function(){var n=this.props.constructor.RuntimeRules;if(n){var i=new n(this.props);return Array.from(i)}return[]}}]),e}();ae.controlType="control",ae.__is_control__=!0,ae.controlCustomEvents=[];function Qo(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function je(t){return je=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},je(t)}function Et(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&bt(t,e)}function Zo(t,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function Yo(t,e){return e&&(es(e)==="object"||typeof e=="function")?e:Qo(t)}function bt(t,e){return bt=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},bt(t,e)}var es=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function ts(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function At(t){var e=ts();return function(){var n=je(t),i;if(e){var u=je(this).constructor;i=Reflect.construct(n,arguments,u)}else i=n.apply(this,arguments);return Yo(this,i)}}var ns=function(t){Et(r,t);var e=At(r);function r(n){mt(this,r);var i;i=e.call(this,n),i.dataBind={},i.caption={type:"string",required:!0,message:j.getMessage("pleaseEnterCaption")},i.isHideCaption={type:"boolean"},i.labelPosition={type:"enum",enum:["top","left"]},i.defaultState={type:"enum",enum:["default","readonly"]},i.required={type:"boolean"},i.captionTip={type:"string",required:!1,message:j.getMessage("pleaseEnterCaptionTip")};var u={fieldCode:{type:"string",required:!0,message:j.getMessage("pleaseEnterFieldCode")},dataCode:{type:"string",required:!0,message:j.getMessage("pleaseEnterFieldCode")}};if(Zo(n.dataBind,ge))i.dataBind={type:"object",required:!0,fields:w(u),message:j.getMessage("pleaseEnterFieldCode")};else{var a={type:"object",required:!0,fields:{},message:j.getMessage("pleaseEnterFieldCode")};Object.keys(n.dataBind).forEach(function(o){a.fields[o]={type:"object",required:!0,fields:w(u),message:j.getMessage("pleaseEnterFieldCode")}}),i.dataBind=a}return n.isShowCaptionTip&&(i.captionTip.required=!0),i}return r}(un),rs=function(t){Et(r,t);var e=At(r);function r(n){mt(this,r);var i;return i=e.call(this,n),i.push({type:"string",required:n.isHide?!1:n.required,message:n.requiredMessage!==""?n.requiredMessage:j.getMessage("runtimeRequired",{caption:n.caption})}),i}return r}(an),Bt=function(t){Et(r,t);var e=At(r);function r(n){mt(this,r);var i;i=e.call(this,n);var u;i.caption=(u=n==null?void 0:n.caption)!==null&&u!==void 0?u:"";var a;i.isHideCaption=(a=n==null?void 0:n.isHideCaption)!==null&&a!==void 0?a:!1;var o;i.isShowCaptionTip=(o=n==null?void 0:n.isShowCaptionTip)!==null&&o!==void 0?o:!1;var c;i.captionTip=(c=n==null?void 0:n.captionTip)!==null&&c!==void 0?c:"";var s;i.defaultState=(s=n==null?void 0:n.defaultState)!==null&&s!==void 0?s:"default";var l;i.labelPosition=(l=n==null?void 0:n.labelPosition)!==null&&l!==void 0?l:"top";var d;i.placeholder=(d=n==null?void 0:n.placeholder)!==null&&d!==void 0?d:"";var h;i.required=(h=n==null?void 0:n.required)!==null&&h!==void 0?h:!1;var p;i.requiredMessage=(p=n==null?void 0:n.requiredMessage)!==null&&p!==void 0?p:"",i.dataBind=new ge(n==null?void 0:n.dataBind);var v;return i.defaultValue=(v=n==null?void 0:n.defaultValue)!==null&&v!==void 0?v:"",i}return r}(ne);Bt.Rules=ns,Bt.RuntimeRules=rs;function is(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function us(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ne(t){return Ne=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ne(t)}function as(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ct(t,e)}function os(t,e){return e&&(ss(e)==="object"||typeof e=="function")?e:is(t)}function Ct(t,e){return Ct=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ct(t,e)}var ss=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function cs(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function ls(t){var e=cs();return function(){var n=Ne(t),i;if(e){var u=Ne(this).constructor;i=Reflect.construct(n,arguments,u)}else i=n.apply(this,arguments);return os(this,i)}}var H=function(t){as(r,t);var e=ls(r);function r(n){us(this,r);var i;return i=e.call(this,n),i.controlType="form",i.props=new Bt(n==null?void 0:n.props),i}return r}(ae);function fs(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ds(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Te(t){return Te=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Te(t)}function hs(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&wt(t,e)}function ps(t,e){return e&&(gs(e)==="object"||typeof e=="function")?e:fs(t)}function wt(t,e){return wt=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},wt(t,e)}var gs=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function ys(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function vs(t){var e=ys();return function(){var n=Te(t),i;if(e){var u=Te(this).constructor;i=Reflect.construct(n,arguments,u)}else i=n.apply(this,arguments);return ps(this,i)}}var wn=function(t){hs(r,t);var e=vs(r);function r(n){return ds(this,r),e.call(this,n)}return r}(ne);function St(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ms(t){if(Array.isArray(t))return St(t)}function Es(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function bs(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Sn(t){return ms(t)||Es(t)||As(t)||bs()}function As(t,e){if(!!t){if(typeof t=="string")return St(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return St(t,e)}}function Bs(t,e){var r;!((r=Object.getOwnPropertyDescriptors(t)[e])===null||r===void 0)&&r.enumerable&&Object.defineProperty(t,e,{enumerable:!1})}function _n(t,e){t.parent=e,Bs(t,"parent")}function Cs(t,e){t.forEach(function(r){_n(r,e)})}var Fn=Symbol("targetKey");function Dn(t){var e;return(e=t[Fn])!==null&&e!==void 0?e:t}function In(t,e){return Cs(t,e),new Proxy(t,{get:function(n,i){for(var u=arguments.length,a=new Array(u>2?u-2:0),o=2;o<u;o++)a[o-2]=arguments[o];var c;return i===Fn?n:(c=Reflect).get.apply(c,[n,i].concat(Sn(a)))},set:function(n,i,u){for(var a=arguments.length,o=new Array(a>3?a-3:0),c=3;c<a;c++)o[c-3]=arguments[c];var s;if(ie(t)&&i==="length"&&u===t.length)return!0;var l=(s=Reflect).set.apply(s,[n,i,u].concat(Sn(o)));return V(u)&&_n(u,e),l}})}function Ve(t,e,r,n){var i=n!=null?n:t,u=In(Dn(r!=null?r:[]),i);Object.defineProperty(t,e,{get:function(){return u},set:function(o){u=In(Dn(o),i)},enumerable:!0})}function _t(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function ws(t){if(Array.isArray(t))return _t(t)}function Rn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function $n(t,e,r,n,i,u,a){try{var o=t[u](a),c=o.value}catch(s){r(s);return}o.done?e(c):Promise.resolve(c).then(n,i)}function Ss(t){return function(){var e=this,r=arguments;return new Promise(function(n,i){var u=t.apply(e,r);function a(c){$n(u,n,i,a,o,"next",c)}function o(c){$n(u,n,i,a,o,"throw",c)}a(void 0)})}}function _s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fs(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function oe(t,e,r){return typeof Reflect!="undefined"&&Reflect.get?oe=Reflect.get:oe=function(i,u,a){var o=Ls(i,u);if(!!o){var c=Object.getOwnPropertyDescriptor(o,u);return c.get?c.get.call(a):c.value}},oe(t,e,r||t)}function Z(t){return Z=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Z(t)}function Ds(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Ft(t,e)}function Is(t,e){return e!=null&&typeof Symbol!="undefined"&&e[Symbol.hasInstance]?!!e[Symbol.hasInstance](t):t instanceof e}function Rs(t){if(typeof Symbol!="undefined"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function $s(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ms(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Fs(t,i,r[i])})}return t}function Os(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function xs(t,e){return e=e!=null?e:{},Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):Os(Object(e)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(e,r))}),t}function Ps(t,e){return e&&(js(e)==="object"||typeof e=="function")?e:Rn(t)}function Ft(t,e){return Ft=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Ft(t,e)}function Ls(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&(t=Z(t),t!==null););return t}function Mn(t){return ws(t)||Rs(t)||Ns(t)||$s()}var js=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function Ns(t,e){if(!!t){if(typeof t=="string")return _t(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(r);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return _t(t,e)}}function Ts(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Vs(t){var e=Ts();return function(){var n=Z(t),i;if(e){var u=Z(this).constructor;i=Reflect.construct(n,arguments,u)}else i=n.apply(this,arguments);return Ps(this,i)}}var qs=function(t,e){var r,n,i,u,a={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]};return u={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function o(s){return function(l){return c([s,l])}}function c(s){if(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(i=s[0]&2?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[s[0]&2,i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(i=a.trys,!(i=i.length>0&&i[i.length-1])&&(s[0]===6||s[0]===2)){a=0;continue}if(s[0]===3&&(!i||s[1]>i[0]&&s[1]<i[3])){a.label=s[1];break}if(s[0]===6&&a.label<i[1]){a.label=i[1],i=s;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(s);break}i[2]&&a.ops.pop(),a.trys.pop();continue}s=e.call(t,a)}catch(l){s=[6,l],n=0}finally{r=i=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}},Us=1e4,On=function(e){Ds(n,e);var r=Vs(n);function n(u){_s(this,n);var a;a=r.call(this,u),a.controlType="layout";var o=Is(this,n)?this.constructor:void 0,c=o.excludes,s=o.childrenMaxLength;return a.props=new wn(u==null?void 0:u.props),Ve(Rn(a),"children",u==null?void 0:u.children),a.excludes=w(c),a.childrenMaxLength=s,a}var i=n.prototype;return i.judgeExcludesChildren=function(a){return this.excludes===!1||Array.isArray(this.excludes)&&!this.excludes.includes(a)},i.judgeJoinChildren=function(a){var o=this.judgeExcludesChildren(a);return o&&this.childrenMaxLength>this.children.length},i.validate=function(a,o){var c=this,s=this,l=function(){return oe(Z(n.prototype),"validate",c)};return Ss(function(){return qs(this,function(d){switch(d.label){case 0:return[4,l().call(s,a,o)];case 1:return d.sent(),[4,Promise.all(s.children.map(function(h){return h.validate(a,o)}))];case 2:return d.sent(),[2,!0]}})})()},i.toDataBindModel=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,o=oe(Z(n.prototype),"toDataBindModel",this).call(this),c=o?[o]:[];return this.children.reduce(function(s,l){var d=l.toDataBindModel(a);if(Array.isArray(d)){var h=d.filter(function(p){return!!p});return Mn(s).concat(Mn(h))}return d&&s.push(d),s},c)},i.toSchema=function(){var a=oe(Z(n.prototype),"toSchema",this).call(this),o=this.children.map(function(c){var s=c.toSchema();return s});return xs(Ms({},a),{children:o})},n}(k);On.excludes=!1,On.childrenMaxLength=Us;function xn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ks(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qe(t){return qe=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},qe(t)}function Hs(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&Dt(t,e)}function Ws(t,e){return e&&(zs(e)==="object"||typeof e=="function")?e:xn(t)}function Dt(t,e){return Dt=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},Dt(t,e)}var zs=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function Ks(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function Gs(t){var e=Ks();return function(){var n=qe(t),i;if(e){var u=qe(this).constructor;i=Reflect.construct(n,arguments,u)}else i=n.apply(this,arguments);return Ws(this,i)}}var Js=function(t){Hs(r,t);var e=Gs(r);function r(n){ks(this,r);var i;return i=e.call(this,n),i.controlType="layout",i.props=new wn(n==null?void 0:n.props),Ve(xn(i),"children",n==null?void 0:n.children),i}return r}(ae);function Pn(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ue(t){return Ue=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},Ue(t)}function Qs(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&It(t,e)}function Zs(t,e){return e&&(Ys(e)==="object"||typeof e=="function")?e:Pn(t)}function It(t,e){return It=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},It(t,e)}var Ys=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function ec(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function tc(t){var e=ec();return function(){var n=Ue(t),i;if(e){var u=Ue(this).constructor;i=Reflect.construct(n,arguments,u)}else i=n.apply(this,arguments);return Zs(this,i)}}var nc=function(t){Qs(r,t);var e=tc(r);function r(n,i){Xs(this,r);var u;return u=e.call(this,i),Ve(Pn(u),"headers",i==null?void 0:i.headers,n),u}return r}(ne);b.LIST;function Rt(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function rc(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ln(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function ic(t,e,r){return e&&Ln(t.prototype,e),r&&Ln(t,r),t}function ke(t){return ke=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)},ke(t)}function uc(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&$t(t,e)}function ac(t,e){return e&&(oc(e)==="object"||typeof e=="function")?e:Rt(t)}function $t(t,e){return $t=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},$t(t,e)}var oc=function(t){return t&&typeof Symbol!="undefined"&&t.constructor===Symbol?"symbol":typeof t};function sc(){if(typeof Reflect=="undefined"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(t){return!1}}function cc(t){var e=sc();return function(){var n=ke(t),i;if(e){var u=ke(this).constructor;i=Reflect.construct(n,arguments,u)}else i=n.apply(this,arguments);return ac(this,i)}}var He=function(t){uc(r,t);var e=cc(r);function r(n){rc(this,r);var i;return i=e.call(this,n),i.controlType="list",i.props=new nc(Rt(i),n==null?void 0:n.props),Ve(Rt(i),"children",n==null?void 0:n.children),i}return ic(r,[{key:"length",get:function(){return this.children.length}}]),r}(ae);function We(t){return t.controlType===T.LAYOUT||t.controlType===T.WRAP||t.controlType===T.LIST||t.controlType===T.SEARCH}function be(t,e){Array.isArray(t)&&t.map(r=>{if(r.type===C.SUBTABLE){const n=r.getChildrenFormControl();e(r,n)}else We(r)?be(r==null?void 0:r.children,e):r instanceof H&&e(r)})}function Ae(t,e){Array.isArray(t)&&t.map(r=>{r.type===C.DATA_VIEW||r.type===C.SIMPLE_SEARCH?e(r):We(r)&&Ae(r==null?void 0:r.children,e)})}class Mt extends Ie{constructor(e){super("Runtime"),this._flatInstances=[],this._instanceMap={};const{schema:r}=e;this._schema=r,this._instance=this.createControl(r,e.beforeCreateInstance),this.getFlatInstances()}getFlatInstances(){const e=[],r={};return jn(this._instance,n=>{e.push(n),r[n.id]||(r[n.id]=[]),r[n.id].push(n)}),this._flatInstances=e,this._instanceMap=r,this._flatInstances}get schema(){return this._schema}get instance(){return this._instance}get flatInstances(){return this._flatInstances}get instanceMap(){return this._instanceMap}get rules(){let e={};return Ae(this._instance,r=>{e[r.id]=r.rules[0],be(r.children,n=>{(n instanceof H||n instanceof He)&&lc(e[r.id].fields,n)})}),e}get antdRules(){let e={};return Ae(this._instance,r=>{e[r.id]=r.rules[0],be(r.children,n=>{(n instanceof H||n instanceof He)&&fc(e[r.id].fields,n)})}),e}}function jn(t,e){Array.isArray(t)?t.map(r=>{e(r),We(r)&&jn(r.children,e)}):e(t)}function Ot(t){return t.props.isHide?!0:t.parent===null?!1:Ot(t.parent)}function lc(t,e){if(!Ot(e)){if(e instanceof H)t[e.id]=e.rules;else if(e.type===C.SUBTABLE){t[e.id]=e.rules;const r={type:"array",fields:{}};e.children.forEach((n,i)=>{ee(n.children,u=>{r.fields&&(r.fields[i]||(r.fields[i]={type:"object",required:!0,fields:{}}),r.fields[i].fields[u.id]=u.rules)})}),t[e.id].push(r)}}}function fc(t,e){Ot(e)||(e instanceof H?t[e.id]=e.rules:e.type===C.SUBTABLE&&e.children.length&&(t[e.id]=[],e.children.forEach(r=>{let n={};ee(r.children,i=>{n[i.id]=i.rules}),t[e.id].push(n)})))}class dc{constructor(e){const{state:r,emptyState:n,databindMapping:i,controlidMapping:u,fieldCodeState:a}=hc(e.instance);this.emptyState=n,this.state=r,this.fieldCodeState=a,this.dataBindMapping=i,this.controlIdMapping=u}setState(e,r,n){const i=this.controlIdMapping[e];i!==void 0?this.state[i.dataView][e]=r:n!==void 0?Object.keys(this.controlIdMapping).map(u=>{const a=this.controlIdMapping[u].dataView,o=this.controlIdMapping[u].children;o!==void 0&&Object.keys(o).map(c=>{c===e&&(this.state[a][u][n][e]=r)})}):this.state[e]=r}getState(e,r){if(this.state[e]!==void 0)return this.state[e];{const i=this.controlIdMapping[e];if(i!==void 0)return this.state[i.dataView][e];if(r!==void 0){let u;return Object.keys(this.controlIdMapping).map(a=>{const o=this.controlIdMapping[a].dataView,c=this.controlIdMapping[a].children;c!==void 0&&Object.keys(c).map(s=>{var l;s===e&&(u=(l=this.state[o][a][r])==null?void 0:l[e])})}),u}else{let u=[];return Object.keys(this.controlIdMapping).map(a=>{const o=this.controlIdMapping[a].dataView,c=this.controlIdMapping[a].children;c!==void 0&&Object.keys(c).map(s=>{s===e&&this.state[o][a].map(l=>{u.push(l[e])})})}),u}}}getFieldCodeState(e){if(this.fieldCodeState[e]!==void 0)return this.fieldCodeState[e];{const n=this.controlIdMapping[e];if(n.dataBind.dataCode,n!==void 0){if(n.dataView===e)return this.fieldCodeState[e];{const i=n.dataBind.dataCode;return this.fieldCodeState[n.dataView][i]||this.fieldCodeState[n.dataView]}}}}getEmptyState(e){if(this.emptyState[e]!==void 0)return this.emptyState[e];{const n=this.controlIdMapping[e];if(n!==void 0)return this.emptyState[n.dataView][e];{let i;return Object.keys(this.controlIdMapping).map(u=>{const a=this.controlIdMapping[u].dataView,o=this.controlIdMapping[u].children;o!==void 0&&Object.keys(o).map(c=>{c===e&&(i=this.emptyState[a][u][e])})}),i}}}getDataBind(e){let r=this.controlIdMapping[e];if(r)return r.dataBind;e:for(let n in this.controlIdMapping){const i=this.controlIdMapping[n];if(i.children){for(let u in i.children)if(u===e){r=i.children[u];break e}}}return r==null?void 0:r.dataBind}}function hc(t){let e={},r={},n={},i={},u={},a={};return Ae(t,o=>{const c=o.id,s={},l={},d={},h={};be([o],(p,v)=>{pc(s,l,d,h,p),gc(u,c,p),yc(a,c,p)}),e[c]=s,r[c]=l,n[c]=d,i[c]=h}),{state:e,emptyState:r,databindMapping:u,controlidMapping:a,fieldCodeState:n,fieldCodeEmptyState:i}}function pc(t,e,r,n,i){var u,a;if(i instanceof H)if(t[i.id]=w(i.props.defaultValue),e[i.id]=w(i.props.defaultValue),i.props.dataBind instanceof q)Object.keys(i.props.dataBind).forEach(function(o){const c=i.props.dataBind,s=i.props.defaultValue;let l=c[o].fieldCode;r[l]=w(s[o]),n[l]=w(s[o])});else{let o=i.props.dataBind.fieldCode;r[o]=w(i.props.defaultValue),n[o]=w(i.props.defaultValue)}else{const o={},c={};ee(i.props.headers,l=>{o[l.id]=w(l.props.defaultValue);const d=l.props.dataBind.fieldCode;l.props.dataBind instanceof q?Object.keys(l.props.dataBind).forEach(function(h){c[l.props.dataBind[h].fieldCode]=w(l.props.defaultValue[h])}):c[d]=w(l.props.defaultValue)}),t[i.id]=new Array((u=i.props.defaultRows)!=null?u:1).fill(0).map(()=>w(o)),e[i.id]=o;const s=i.props.datasourceBind.dataCode;r[s]=new Array((a=i.props.defaultRows)!=null?a:1).fill(0).map(()=>w(c)),n[s]=c}}function gc(t,e,r){if(r instanceof H)r.props.dataBind instanceof q?Object.keys(r.props.dataBind).map(n=>{const i=r.props.dataBind,u=i[n].dataCode;u!==void 0&&(t[u]===void 0&&(t[u]={controlId:r.id,fields:[],dataViewId:e}),t[u].fields.push({fieldCode:i[n].fieldCode,controlId:r.id,dataBind:i,dataViewId:[e]}))}):(t[r.props.dataBind.dataCode]===void 0&&(t[r.props.dataBind.dataCode]={controlId:e,fields:[],dataViewId:e}),t[r.props.dataBind.dataCode].fields.push({fieldCode:r.props.dataBind.fieldCode,controlId:r.id,dataBind:r.props.dataBind,dataViewId:[e]}));else{if(r.props.datasourceBind.dataCode===""){X(`datasourceBind.dataCode is empty! maybe in preview mode, control:${r.id} type:${r.type}`);return}t[r.props.datasourceBind.dataCode]={controlId:r.id,fields:[],dataViewId:e};const n=r.id;ee(r.props.headers,i=>{i.props.dataBind instanceof q?Object.keys(i.props.dataBind).map(u=>{const a=i.props.dataBind,o=a[u].dataCode;t[o].fields.push({fieldCode:a[u].fieldCode,controlId:i.id,dataBind:a,dataViewId:[e,n]})}):t[i.props.dataBind.dataCode].fields.push({fieldCode:i.props.dataBind.fieldCode,controlId:i.id,dataBind:i.props.dataBind,dataViewId:[e,n]})})}}function yc(t,e,r){r instanceof H?t[r.id]={dataBind:r.props.dataBind,options:[],dataView:e}:r.type===C.SUBTABLE&&(t[r.id]={dataBind:new ge({dataCode:r.props.datasourceBind.dataCode,fieldCode:""}),dataView:e,children:{},options:[]},ee(r.props.headers,n=>{var i,u;Object.assign((u=(i=t[r.id])==null?void 0:i.children)!=null?u:{},{[n.id]:{dataBind:n.props.dataBind}})}))}const Nn=["splice","push","shift","pop","unshift","reverse"],xt=Symbol("__engineProxy__"),Pt=Symbol("__engineTarget__"),Tn=Symbol("__engineArrayBeforeSetCallbackFlag__"),Vn=Symbol("__engineProxyThisKey__"),N={type:"",args:[],callback:qn};function qn(){}Ac();function vc(t,e,r,n,i){if(N.type){N.callback=i.bind(null,t,n);return}const u=Number(e);if(u>t.length){J(`Wrong array operations may cause unknown errors. It is recommended to use APIs such as ${Nn.join(",")} for array operations`);return}if(!(Number.isNaN(u)&&e!=="length"))if(e==="length"){const o=r,c=t.length;if(o>t.length){J("Do not directly modify the length of the array data, please add new rows");return}return o===t.length?void 0:()=>i.call(null,t,n,"splice",[o,c-o])}else return u===t.length?()=>i.call(null,t,n,"push",[r]):()=>i.call(null,t,n,"splice",[u,1,r])}function mc(t,e,r){return{__engineProxy__:!0,get(n,i,u){return i===xt?!0:i===Pt?n:Array.isArray(n)&&i===Tn?r:i===Vn?t:Reflect.get(n,i,u)},set(n,i,u,a){var h;let o=u;const c=n[i],s=t===""?i:t+"."+i;function l(p){if(typeof p=="object"&&p!==null)return p[xt]!==!0?ze(p,e,r,s):ze(p[Pt],e,r,s)}o=(h=l(u))!=null?h:o;let d;if(Array.isArray(n)){const p=vc(n,i,u,t,e);d=Reflect.set(n,i,o,a),p&&p()}else{try{let p=o;if(o=r.call(null,n,s,o,c),p!==o){const v=l(o);v!==void 0&&(o=v)}}catch(p){return _e(`${s} set error ${p}`),!0}d=Reflect.set(n,i,o,a),e.call(null,n,s,u,c)}return d}}}function ze(t,e,r,n=""){if(Object.isFrozen(t))return t;for(let i in t){const u=n===""?i:n+"."+i,a=t[i];typeof a=="object"&&a!==null&&(t[i]=ze(a,e,r,u))}return new Proxy(t,mc(n,e,r))}function Un(t){const e=[];return t.forEach(r=>{e.push(r),r.controlType==="layout"&&e.push(...Un(r.children))}),e}function Lt(t,e){if(e==="")return;const r=e.split(".");if(r.length===0)return;const n=r[0],i=r.slice(1),u=t.find(a=>a.id===n);return i.length===0?u:i.reduce((a,o)=>{var l,d;const c=Number(o);if(Number.isNaN(c)){const h=a!=null&&a.children?Un(a.children):void 0,p=h==null?void 0:h.find(v=>v.id===o);return p||(a instanceof H?a:void 0)}else return(d=(l=a==null?void 0:a.children)==null?void 0:l[c])!=null?d:a},u)}function Ec(t,e){return["push","unshift"].includes(t)?e:t==="splice"?e.slice(2):[]}function bc(t,e,r){if(["push","unshift"].includes(t))return r;if(t==="splice")return e.slice(0,2).concat(r)}function Ac(){Nn.forEach(t=>{const e=Array.prototype[t];Array.prototype[t]=function(...r){var n;if(this[xt]){let i;const u=Ec(t,r);if(u.length){const a=(n=this[Tn])==null?void 0:n.call(this,this[Pt],this[Vn],u),o=bc(t,r,a);N.type=t,N.args=o,i=e.apply(this,o)}else N.type=t,N.args=r,i=e.apply(this,r);return typeof N.callback=="function"&&N.callback(t,r,i),N.type="",N.args=[],N.callback=qn,i}else return e.apply(this,r)}})}class Bc{constructor(){this.actionMap=new Map,this.buildinActions={},this.actionUtils={},this.sources={}}execAction(e,r,...n){return K(this,null,function*(){const i=this.actionMap.get(e);if(!!i)try{return yield i.func.call(null,r,...n)}catch(u){_e(`${i.id} Exception during calling action: ${u}`)}})}addAction(e,r){this.actionMap.has(e)&&J("duplicated action key");const n=new Cc(e,r);this.actionMap.set(e,n)}}class Cc{constructor(e,r){this.id="",this.id=e,this.func=r}}class wc{constructor(e){this._dataStore=new Map,this.executer=e}add(e,r){this._dataStore.set(e,r)}get(e){let r=this._dataStore.get(e);return w(r)}remove(e){this._dataStore.delete(e)}getRemoteData(e){return K(this,null,function*(){return this.executer===void 0?(_e("\u672A\u521D\u59CB\u5316executer"),[]):this.executer(e)})}}class Y{}class Be extends Y{validate(e){return x(e)}transform(e){if(e==null)return"";if(!V(e)&&!Qt(e))return String(e);if(Va(e))return JSON.stringify(e);throw`${e} is not a string`}}class jt extends Y{validate(e){return Fe(e)||e===""}transform(e){if(e==null)return"";const r=!V(e)&&!Qt(e)?Number(e):void 0;if(!Number.isNaN(r)&&r!==void 0)return r;throw`${e} is not a number`}}class Sc extends Y{validate(e){return qa(e)}transform(e){if(e==null)return[];function r(n){return n.map(i=>i?String(i):"")}if(ie(e))return r(e);if(x(e)&&Zt(e))try{const n=JSON.parse(e);if(Array.isArray(n))return r(n)}catch(n){}return[String(e)]}}class _c extends Y{validate(e){return Ua(e)}transform(e){if(e==null)return[];function r(i){return i.map(u=>!u&&u!==0?"":Number(u)).filter(u=>u===""||!Number.isNaN(u))}if(ie(e))return r(e);if(x(e)&&Zt(e))try{const i=JSON.parse(e);if(ie(i))return r(i)}catch(i){}const n=Number(e);if(Number.isNaN(n))throw`${e} is not a number array`;return[n]}}class Fc extends Y{validate(e){return e instanceof Re||V(e)&&"amount"in e&&Fe(e.amount)&&"currency"in e&&x(e.currency)}transform(e,r){if(e==null||e==="")return new Re({currency:r==null?void 0:r.currency});let n;if(V(e)&&(n=new Re(R(R({},r),e))),x(e)&&De(e))try{const i=JSON.parse(e);n=new Re(R(R({},r),i))}catch(i){}if(n){const i=new jt,u=new Be;return i.validate(n.amount)||(n.amount=i.transform(n.amount)),u.validate(n.currency)||(n.currency=u.transform(n.currency)),n}throw`${e} is not a { amount: number, currency: string } object`}}class Dc extends Y{validate(e){return e instanceof $e||V(e)&&"min"in e&&x(e.min)&&"max"in e&&x(e.max)}transform(e,r){if(e==null||e==="")return new $e;let n;if(V(e)&&(n=new $e(R(R({},r),e))),x(e)&&De(e))try{const i=JSON.parse(e);n=new $e(R(R({},r),i))}catch(i){}if(n){const i=new Be;return i.validate(n.min)||(n.min=i.transform(n.min)),i.validate(n.max)||(n.max=i.transform(n.max)),n}throw`${e} is not a { min: string, max: string } object`}}class Ic extends Y{validate(e){return e instanceof Oe||V(e)&&"result"in e&&Fe(e.result)&&"unit"in e&&x(e.unit)}transform(e,r){if(e==null||e==="")return new Oe({unit:r==null?void 0:r.unit});let n;if(V(e)&&(n=new Oe(R(R({},r),e))),x(e)&&De(e))try{const i=JSON.parse(e);n=new Oe(R(R({},r),i))}catch(i){}if(n){const i=new jt,u=new Be;return i.validate(n.result)||(n.result=i.transform(n.result)),u.validate(n.unit)||(n.unit=u.transform(n.unit)),n}throw`${e} is not a { result: string, unit: string } object`}}class Rc extends Y{validate(e){return e instanceof Me}transform(e,r){if(e==null||e==="")return new Me;let n;if(V(e)&&(n=new Me(R(R({},r),nt.exports.camelizeKeys(e)))),x(e)&&De(e))try{const i=JSON.parse(e);n=new Me(R(R({},r),nt.exports.camelizeKeys(i)))}catch(i){}if(n){const i=new Be;return i.validate(n.city)||(n.city=i.transform(n.city)),i.validate(n.district)||(n.district=i.transform(n.district)),i.validate(n.province)||(n.province=i.transform(n.province)),n}throw`${e} is not a { city: string, district: string, province: string } object`}}class $c{static getValueChecker(e){let r;switch(e){case b.VARCHAR:case b.TIMESTAMP:case b.TEXT:case b.RELATION:case b.AUTO_NUMBER:r=new Be;break;case b.DECIMAL:r=new jt;break;case b.EMPLOYEES:case b.DEPARTMENTS:case b.IMAGE:case b.FILE:case b.ARRAY:r=new Sc;break;case b.MONEY:r=new Fc;break;case b.TIMESCOPE:r=new Dc;break;case b.CALC:r=new Ic;break;case b.DECIMAL_RANGE:r=new _c;break;case b.ADDRESS:r=new Rc;break}return r}}function Mc(t){if(["min","max","currency","unit"].includes(t))return b.VARCHAR;if(["result","amount"].includes(t))return b.DECIMAL}function kn(t,e,r,n){var a;let i=(a=Mc(e))!=null?a:t,u=$c.getValueChecker(i);if(!u||u.validate(r))return r;try{const o=u.transform(r,n);return o!==void 0?o:r}catch(o){throw`${e} ${o}`}}function Oc(t,e,r){return Object.entries(t).reduce((n,[i,u])=>{const a=e[i];return n[i]=kn(u,i,a,r[i]),n},Object.assign({},e))}typeof window!="undefined"&&(window.engines={});let se=null,Ce="";class Nt extends en{constructor(e){super(),this.isMounted=!1,this.id=Xe(8),this.__pluginsApplied=!1,this.actionManager=new Bc,this._jobTasks=[],this.createControlInstance=this.createInstance,this.$options=Object.freeze(e);const{autoMount:r=!0,schema:n,beforeCreateInstance:i,externalParams:u,language:a=qt,debug:o=!1}=this.$options;j.setLocale(a),this.debug=o,this.runtime=new Mt({schema:n,beforeCreateInstance:i}),this.externalParams=u,this.store=new dc({instance:this.runtime.instance}),this.debugLog("engine is Instantiation complete"),r&&this.mount()}debugLog(...e){this.debug&&et(...e)}use(e){return this.__pluginsApplied||this.__plugins.push(e),this}registerControl(...e){return this.runtime.register(...e),this}static register(...e){return Mt.register(...e)}static judgeControlIsRegistered(e){return Mt.staticRegisteredTypes.has(e.Runtime.controlType)}mount(){this.debugLog("engine\u7684mount\u65B9\u6CD5\u5F00\u59CB\u8C03\u7528");const{plugins:e=[]}=this.$options;this._handlerProxyState(),this.__plugins=e,this.applyPlugins(),this.setStates(this.getState()),this.debugLog("engine\u7684mount\u65B9\u6CD5\u8C03\u7528\u7ED3\u675F"),this.debug&&typeof window!="undefined"&&(window.engines[this.id]=this)}destroy(){this.debug&&typeof window!="undefined"&&delete window.engines[this.id]}_handlerProxyState(){this.store.state=ze(this.store.state,this._proxyStateCallback.bind(this),this._proxyStateBeforeSetCallback.bind(this))}_proxyStateBeforeSetCallback(e,r,n,i){const u=Lt(this.runtime.flatInstances,r);if(!u)return n;if(this.assertInstance(u,C.SUBTABLE)){const c=u.props.headers.reduce((s,l)=>{const d=l.children[0];return d&&d instanceof H&&(s[d.id]=d.fieldType),s},{});return n===null?[]:n.map(s=>Oc(c,s,this.getEmptyState(u.id)))}const a=r.split("."),o=a[a.length-1];try{return kn(u.fieldType,o,n,i)}catch(c){throw X(`the id=${u.id}'s instance setState error, %o ${c}.`,n),c}}_proxyStateCallback(e,r,n,i,u){Array.isArray(e)?this._handlerArrayUpdate(e,r,n,i,u):this._handlerObjectUpdate(e,r,n,i)}_handlerArrayUpdate(e,r,n,i,u){const a=Lt(this.runtime.flatInstances,r);if(!(a instanceof He))return;const o=h=>{const p=[];for(let v=0;v<h;v++){const g=this.listControlCreateRow(a,"subtable-row");g&&p.push(g)}return p},c=se;let s=[],l=[],d=[];if(n&&i){switch(n){case"push":case"unshift":const h=i.length;s=o(h),l=i,a.children[n](...s),this.runtime.getFlatInstances();break;case"splice":if(i.length>2){const p=i.length-2,v=i.slice(2);s=o(p),l=v;const g=i[0],m=i[1];a.children[n](g,m,...s),this.runtime.getFlatInstances()}else a.children[n](...i),this.runtime.getFlatInstances();break;default:a.children[n](...i),this.runtime.getFlatInstances();break}n==="splice"?d=u:["pop","shift"].includes(n)&&(d=[u]),this.emit("list-change",{instance:a,value:this.getState(a.id),options:Object.assign({},c,{changed:s,data:l,deleted:d!=null?d:[]})}),se=null}}_handlerObjectUpdate(e,r,n,i){const u=Lt(this.runtime.flatInstances,r);if(!u)return;const a=this.getInstanceRowIndex(u),o=se||{};if(u instanceof He){u.children.length=0;const c=n;let s=[];for(let l=0;l<c.length;l++){const d=this.listControlCreateRow(u,"subtable-row");d&&s.push(d)}u.children.push(...s),this.runtime.getFlatInstances(),this.emit("list-change",{instance:u,value:n,options:Vt(R({},o),{changed:s,data:c,deleted:i!=null?i:[]})})}else this.emit("change",{instance:u,value:this.getState(u.id,a),rowIndex:a,options:Vt(R({},o),{oldValue:i})})}applyPlugins(){this.__pluginsApplied||(this.__plugins.forEach(e=>{var r;try{Ce=(r=e.pluginName)!=null?r:e.constructor.name,e.apply(this)}catch(n){J(`${Ce} Plugin apply Error
|
|
2
|
+
${n}`)}finally{Ce=""}}),this.__pluginsApplied=!0)}listControlCreateRow(e,r){const n=this.runtime.createControlInstance(r);if(!!n){if(n instanceof Js){const i=w(e.props.headers),u=this.createControl(i);n.children.push(...u)}return n}}listControlAddRow(e,r="subtable-row"){const n=this.listControlCreateRow(e,r);!n||e.children.push(n)}emit(e,r){return K(this,null,function*(){if(e==="engine-mounted"){if(this.isMounted)return X("The engine-mounted life cycle can only be triggered once"),Promise.resolve([]);if(this._jobTasks.length){console.time("engine-mounted need wait");const a=[...this._jobTasks];yield Promise.all(a),console.timeEnd("engine-mounted need wait")}this.isMounted=!0}let n,i;this.isMounted||(i=new Promise(a=>{n=a}),this._jobTasks.push(i));const u=yield Jn(Nt.prototype,this,"emit").call(this,e,r);return n&&i&&(n(),this._jobTasks.splice(this._jobTasks.indexOf(i),1)),u})}on(e,r){return Ce&&(r.applyingPluginName=Ce),super.on(e,r)}createControl(...e){return this.runtime.createControl(...e)}createInstance(e,r){return this.runtime.createControlInstance(e,r)}schemaEvent(e,r){this.emit(e,r)}updateInstanceProps(e,r,n,i){return this.setInstance(e,r,n,i)}getRules(e){var r;return e===void 0?this.runtime.rules:(r=this.runtime.rules[e])==null?void 0:r.fields}getAntdRules(e){var r;return e===void 0?this.runtime.antdRules:(r=this.runtime.antdRules[e])==null?void 0:r.fields}getState(e,r){return e===void 0?this.store.state:this.store.getState(e,r)}getFieldCodeState(e){return e===void 0?this.store.fieldCodeState:this.store.getFieldCodeState(e)}getEmptyState(e){return w(e===void 0?this.store.emptyState:this.store.getEmptyState(e))}setPayloadOptions(e){se=e}setState(e,r,n,i){se=i,this.debugLog("[%o]: \u89E6\u53D1setState, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o, options=%o",e,r,n,i),this.store.setState(e,r,n),this.debugLog("[%o]: setState\u5B8C\u6210, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o",e,r,n),se=null}setStates(e,r,n){let i=e;Object.keys(i).forEach(u=>{Object.entries(this.store.controlIdMapping).forEach(([a,o])=>{if(o.dataView===u){const c=i[u][a];c!==void 0&&this.setState(a,c,r,n)}else(a===u||o.children&&o.children[u])&&i[u]!==void 0&&this.setState(u,i[u],r,n)})})}getField(e,r,n){if(!r){const c=this.getDataBindMapping(e);if(c){const{controlId:s}=c;return this.getState(s)}return}const i=this.getDataBindMapping(e,r);if(!i)return;const{dataBind:u,controlId:a}=i,o=this.getState(a,n);return u instanceof q?Object.entries(u).reduce((c,[s,l])=>l.fieldCode===r?c[s]:c,o):o}getData(e){if(e){const r=this.getDataBindMapping(e);if(r){const{controlId:n}=r;return this.getFieldCodeState(n)}}}setField(e,r,n,i,u){var s;const a=this.getDataBindMapping(e,r);if(!a)return;const{dataBind:o,controlId:c}=a;if(o instanceof q){const l=(s=w(this.getState(c,i)))!=null?s:this.getEmptyState(c),d=Object.entries(o).reduce((h,[p,v])=>(v.fieldCode===r&&(h[p]=n),h),l);this.setState(c,d,i,u)}else this.setState(c,n,i,u)}setFields(e,r,n,i){const u=this.getDataBindMapping(e);if(!u)return;let a=[];u.fields.forEach(o=>{var d;const{dataBind:c,controlId:s,fieldCode:l}=o;if(!a.includes(l)&&!!Object.hasOwnProperty.call(r,l))if(c instanceof q){const h=(d=w(this.getState(s,n)))!=null?d:this.getEmptyState(s),p=Object.entries(c).reduce((v,[g,m])=>{a.push(m.fieldCode);const f=r[m.fieldCode];return f!==void 0&&(v[g]=f),v},h);this.setState(o.controlId,p,n,i)}else this.setState(s,r[l],n,i)})}buildFields(e,r){const n=this.getDataBindMapping(e);if(!n)return;let i=[];const u={};return n.fields.forEach(a=>{const{dataBind:o,controlId:c,fieldCode:s}=a;if(!i.includes(s)&&!!Object.hasOwnProperty.call(r,s))if(o instanceof q){const l=this.getEmptyState(c);u[a.controlId]=Object.entries(o).reduce((d,[h,p])=>{i.push(p.fieldCode);const v=r[p.fieldCode];return v!==void 0&&(d[h]=v),d},l)}else u[c]=r[s]}),u}setData(e,r){this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\uFF0C\u53C2\u6570\u4E3A%o\uFF0C%o\u3002",e,r);let n={};Object.keys(e).map(i=>{const u=e[i];if(Array.isArray(u))u.map(a=>{const o=this.getDataBindMapping(i);if(!o)return;let c=w(this.store.emptyState[o.dataViewId][o.controlId]),s=[];Object.keys(a).map(l=>{var h,p,v;if(s.includes(l))return;const d=(p=(h=this.store.dataBindMapping[i])==null?void 0:h.fields)==null?void 0:p.find(g=>g.fieldCode===l);if(d){if(d.dataBind instanceof ge&&a[l]!==void 0)c[d.controlId]=a[l];else if(d.dataBind instanceof q){let g=w((v=this.getEmptyState(d.controlId))!=null?v:{});Object.keys(d.dataBind).map(m=>{const f=d.dataBind[m];a[f.fieldCode]!==void 0&&(g[m]=a[f.fieldCode]),s.push(f.fieldCode)}),c[d.controlId]=g}}}),n[o.dataViewId]||(n[o.dataViewId]={}),n[o.dataViewId][o.controlId]||(n[o.dataViewId][o.controlId]=[]),n[o.dataViewId][o.controlId].push(c)});else if(u){let a=[];Object.keys(u).map(o=>{var s;if(a.includes(o))return;const c=this.getDataBindMapping(i,o);if(c){if(n[c.dataViewId[0]]||(n[c.dataViewId[0]]={}),c.dataBind instanceof ge&&u[o]!==void 0)n[c.dataViewId[0]][c.controlId]=u[o];else if(c.dataBind instanceof q){let l=w((s=this.getEmptyState(c.controlId))!=null?s:{});Object.keys(c.dataBind).map(d=>{const h=c.dataBind[d];u[h.fieldCode]!==void 0&&(l[d]=u[h.fieldCode]),a.push(h.fieldCode)}),n[c.dataViewId[0]][c.controlId]=l}}})}}),this.debugLog("engine setData\u65B9\u6CD5\u6570\u636E\u7EC4\u5408\u5B8C\u6210\uFF0C\u53C2\u6570\u4E3A%o\u3002",n),this.setStates(n,void 0,r),this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\u5B8C\u6210\u3002")}getDataBind(e){return this.store.getDataBind(e)}getInstance(e,r){const n=this.getInstances(e,r===-1);if(n.length>0)return r!==void 0?r===-1?n[0]:n[r]:n[0]}getInstances(e,r=!1){var i;if(e===void 0)return this.runtime.flatInstances;const n=this.runtime.flatInstances.filter(u=>u.id===e);if(r)if(n.length){const u=n[0];if(this.getInstanceRowIndex(u)!==void 0){const a=this.getInstanceInSubtableHeader(u);a&&n.unshift(a)}}else{const u=this.getControlIdMapping(),[a]=(i=Object.entries(u).find(([o,c])=>c.children&&e in c.children))!=null?i:[];if(a){const c=this.getInstance(a).props.headers.find(s=>s.children.find(l=>l.id===e));if(c){const s=c.children.find(l=>l.id===e);s&&n.unshift(s)}}}return n}setInstance(e,r,n,i){try{let u;if(typeof e=="string"?u=this.getInstance(e,i):u=e,!u)return;this.debugLog("[%o]: \u4FEE\u6539instance: %o\u7684%o\u5C5E\u6027\uFF0C\u4FEE\u6539\u7684\u503C\u4E3A%o\u3002",u.id,u,r,n),Xt(u.props,r,n),this.schemaEvent("schema-change",{instance:u,props:r,value:n})}catch(u){throw u}}getControlIdMapping(){return this.store.controlIdMapping}getDataBindMapping(e,r){if(!e&&!r)return this.store.dataBindMapping;const n=this.store.dataBindMapping[e];if(!n){X(`No corresponding dataCode=${e} was found`);return}if(!r)return n;const i=n.fields.find(u=>u.fieldCode===r);if(!i){X(`No corresponding fieldCode=${r} was found`);return}return i}getAction(){return this.actionManager}initDataManager(e){this.dataManager=new wc(e)}getDataManager(){return this.dataManager}assertInstance(e,r){return x(r)?e.type===r:r.includes(e.type)}getInstanceRowIndex(e){if(!e.parent)return;let r;if(this.assertInstance(e.parent,C.SUBTABLE))if(this.assertInstance(e,C.SUBTABLE_COLUMN))r=-1;else{const n=e.parent.children.findIndex(i=>i===e);n>-1&&(r=n)}else r=this.getInstanceRowIndex(e.parent);return r}getInstanceParentControl(e,r){if(!!e.parent)return this.assertInstance(e.parent,r)?e.parent:this.getInstanceParentControl(e.parent,r)}getInstanceInSubtableHeader(e){const r=this.getInstanceRowIndex(e);if(r===void 0)return;if(r===-1)return e;const n=this.assertInstance(e,C.SUBTABLE_COLUMN)?e:this.getInstanceParentControl(e,C.SUBTABLE_COLUMN);if(!n)return;const u=this.getInstanceParentControl(e,C.SUBTABLE).props.headers.find(a=>a.id===n.id);if(!!u)return u.children.find(a=>a.id===e.id)}setControlConfig(...e){return this.runtime.registerControlConfig(...e)}getControlConfig(e){return this.runtime.getControlConfig(e)}}class xc{}class Pc{constructor(e){this.config=e}apply(e){this.engine=e;const r=this.config;if(!r)return;const n=Hn(r,e);if(!n)return;const i=e.getAction();for(let[u,a]of Object.entries(n.funcMap))i.addAction(u,a)}}function Hn(t,e){if(!t.module||!t.module.compiled)return;const r=t.module.compiled,n={exports:{ctx:e,utils:e.getAction().actionUtils}};try{new Function("module","exports",r).call(n,n,n.exports)}catch(a){J(a.message+". fail to parse the module"),process.env.NODE_ENV!=="production"&&J("fail to parse the module")}const i={},u={};for(const[a,o]of Object.entries(n.exports))typeof o=="function"?i[a]=o:u[a]=o;return{funcMap:i,variables:u}}const Lc={"engine-mounted":"did_mount","engine-submit":"will_submit","engine-submit-params":"do_submit","engine-submitted":"did_submit"};class jc{constructor(e){this.config=e}apply(e){this.engine=e,Object.entries(Lc).forEach(([r,n])=>{e.on(r,i=>K(this,null,function*(){const u=yield this.callLifecycleEvent(n,i);return u.includes(!1)?!1:u}))})}callLifecycleEvent(e,r){return K(this,null,function*(){const n=this.config;return!n||!Array.isArray(n[e])?[]:yield Promise.all(n[e].map(u=>K(this,null,function*(){return yield this.engine.getAction().execAction(u,r)})))})}}class Nc{constructor(e){this.config=e}apply(e){this.engine=e,tn.events.forEach(r=>{r.code&&r.key&&this.engineAddEventListener(r.code,r.key)})}engineAddEventListener(e,r){this.engine.on(e,n=>K(this,null,function*(){if(!(e==="change"&&!this.engine.isMounted)&&n.instance!==void 0)return yield this.callControlEvent(r,n)}))}callControlEvent(e,r){return K(this,null,function*(){const n=this.config[r.instance.id];if(!n||!Array.isArray(n[e]))return[];const i=yield Promise.all(n[e].map(u=>K(this,null,function*(){return yield this.engine.getAction().execAction(u,r)})));return i.includes(!1)?!1:i})}}class Tc{constructor(e){this.calcControls=[],this.dependenciesTriggerMap=new Map,this.hideNotRememberControlIds=[],this.dontHasPermissionControlIds=[],this.cacheComputedResult={},this.options=e,this.getDontHasPermissionControlIds(),this.getNeedHideRememberControlIds()}getNeedHideRememberControlIds(){var e;!((e=this.options)!=null&&e.displayBoList)||(this.hideNotRememberControlIds=this.options.displayBoList.reduce((r,n)=>(n.is_remember||r.push(...n.hide_controls),r),[]))}getDontHasPermissionControlIds(){var e;!((e=this.options)!=null&&e.behavior)||(this.dontHasPermissionControlIds=this.options.behavior.reduce((r,n)=>(n.ctrlBehavior===1&&r.push(n.ctrlId),r),[]))}controlNeedComputedValue(e){if(!e)return!1;const r=this.getControlIsHide(e);return!(this.dontHasPermissionControlIds.includes(e.id)&&r||this.hideNotRememberControlIds.includes(e.id)&&r)}getControlIsHide(e){return e.props.isHide?!0:e.parent===null?!1:this.getControlIsHide(e.parent)}apply(e){this.engine=e,this.resetDependencies(),this.watchControlChange(),this.watchSubtableChange(),this.watchSchemaHideChange(),this.engine.on("engine-mounted",()=>{this.allCalcControlComputed()})}resetDependencies(){this.calcControls=[],this.dependenciesTriggerMap.clear(),this.getAllCalcControl(),this.getCalcDependencies()}allCalcControlComputed(){this.calcControls.forEach(e=>this.computedCalcValue(e))}getAllCalcControl(){this.calcControls=this.engine.runtime.flatInstances.filter(e=>e.type===C.CALC)}getCalcDependencies(){this.calcControls.forEach(e=>{const{scriptEcho:r}=e.props;r.forEach(n=>{(n.type===L.VariableInMainTable||n.type===L.VariableInCurrentSubTable||n.type===L.VariableInOtherSubTable)&&this.setDependenciesTriggerMapItem(n.id,e),n.type===L.VariableInOtherSubTable&&n.subTableId&&this.setDependenciesTriggerMapItem(n.subTableId,e)})})}setDependenciesTriggerMapItem(e,r){this.dependenciesTriggerMap.has(e)||this.dependenciesTriggerMap.set(e,[]);const n=this.dependenciesTriggerMap.get(e);n.includes(r)||n.push(r)}getCalcControlsFromSubtableRows(e){return e.reduce((r,n)=>(n.children.forEach(i=>{const u=i.children[0];u&&this.engine.assertInstance(u,C.CALC)&&r.push(u)}),r),[])}watchSchemaHideChange(){this.engine.on("schema-change",e=>{var r;e.props==="isHide"&&((r=this.dependenciesTriggerMap.get(e.instance.id))!=null?r:[]).forEach(i=>{this.computedCalcValue(i)})})}watchSubtableChange(){this.engine.on("list-change",e=>{var u,a,o;this.resetDependencies();const r=(a=(u=e.options)==null?void 0:u.changed)!=null?a:[];this.getCalcControlsFromSubtableRows(r).forEach(c=>{this.computedCalcValue(c)}),((o=this.dependenciesTriggerMap.get(e.instance.id))!=null?o:[]).forEach(c=>{this.computedCalcValue(c)})})}watchControlChange(){this.engine.on("change",e=>{var i;const{instance:r}=e;if(!this.dependenciesTriggerMap.has(r.id))return;const n=(i=this.dependenciesTriggerMap.get(r.id))!=null?i:[];e.rowIndex!==void 0&&e.rowIndex>-1?n.forEach(u=>{this.controlInSubtable(u)&&this.engine.getInstanceRowIndex(u)!==e.rowIndex||this.computedCalcValue(u)}):n.forEach(u=>{this.computedCalcValue(u)})})}controlInSubtable(e){var r;return((r=e.parent)==null?void 0:r.type)===C.SUBTABLE_COLUMN}computedCalcValue(e){var c;const r=e.props.scriptEcho;if(!r||r.length===0)return;const n=r.reduce((s,l)=>{if(l.type===L.Operator||l.type===L.Number)return s+l.name;let d=0,h;switch(l.type){case L.VariableInMainTable:{const p=this.getNumberValue(this.engine.getState(l.id));h=this.engine.getInstance(l.id),d=Number(p);break}case L.VariableInCurrentSubTable:{const p=this.engine.getInstanceRowIndex(e);h=this.engine.getInstance(l.id,p);const v=this.engine.getState(l.id,p),g=this.getNumberValue(v);d=Number(g);break}case L.VariableInOtherSubTable:{const p=this.engine.getState(l.id),v=Array.isArray(p)?p.map(m=>this.getNumberValue(m)):[],g=this.getAggregateTypeValue(v,l.aggregateType);h=this.engine.getInstance(l.subTableId),d=Number(g);break}}return!Number.isNaN(d)&&this.controlNeedComputedValue(h)?s+=`(${d})`:s+=0,s},"");let i;this.cacheComputedResult[n]!==void 0?i=this.cacheComputedResult[n]:(i=new Function(`return ${n}`)(),this.cacheComputedResult[n]=i);let u;if(this.controlInSubtable(e)&&(u=this.engine.getInstanceRowIndex(e),u===void 0))return;const a=this.engine.getState(e.id,u),o=!i||i===1/0||i===-1/0?0:e.props.precision===""?i:Number(i.toFixed(e.props.precision));o!==(a==null?void 0:a.result)&&this.engine.setState(e.id,{result:o,unit:(c=a==null?void 0:a.unit)!=null?c:""},u)}getNumberValue(e){if(typeof e=="object"&&e){if("result"in e)return e.result;if("amount"in e)return e.amount}return typeof e=="number"?e:0}getAggregateTypeValue(e,r){if(!r||!e||!e.length)return 0;switch(r){case re.MAX:return Math.max(...e);case re.MIN:return Math.min(...e);case re.SUM:return e.reduce((n,i)=>n+i);case re.AVG:return e.reduce((n,i)=>n+i)/e.length}}}class Vc{constructor(e){this.config=e}apply(e){var u,a;this.engine=e;const r=(a=(u=this.config)==null?void 0:u.source)!=null?a:"";let n=document.createElement("style");n.className="edit-css",n.type="text/css",n.innerHTML=r,document.querySelector("head").appendChild(n)}}B.CalcPlugin=Tc,B.ControlsEventPlugin=Nc,B.ES6ModulePlugin=Pc,B.Engine=Nt,B.LifecycleEventPlugin=jc,B.Plugin=xc,B.StylePlugin=Vc,B.hasChildrenControl=We,B.loopDataViewControl=Ae,B.loopFormControl=be,B.parseModule=Hn,Object.defineProperty(B,"__esModule",{value:!0})});
|