@byteluck-fe/model-driven-engine 1.7.0 → 1.7.2
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 +174 -75
- package/dist/esm/common/OkWorker.js +5 -5
- package/dist/esm/common/Store.js +10 -10
- package/dist/esm/common/checkerValue.js +2 -2
- package/dist/esm/common/proxyState.js +9 -9
- package/dist/esm/plugins/CalcPlugin.js +17 -17
- package/dist/esm/plugins/ControlsEventPlugin.js +175 -67
- package/dist/esm/plugins/ES6ModulePlugin.js +2 -2
- package/dist/esm/plugins/LifecycleEventPlugin.js +165 -61
- package/dist/esm/plugins/StylePlugin.js +3 -3
- package/dist/esm/utils/runtimeUtils.js +2 -4
- package/dist/index.umd.js +8 -8
- package/dist/types/common/Engine.d.ts +7 -7
- package/dist/types/common/Runtime.d.ts +1 -1
- package/dist/types/common/Store.d.ts +6 -6
- package/dist/types/common/proxyState.d.ts +3 -3
- package/dist/types/plugins/ControlsEventPlugin.d.ts +1 -1
- package/dist/types/plugins/ES6ModulePlugin.d.ts +4 -4
- package/dist/types/plugins/LifecycleEventPlugin.d.ts +1 -1
- package/dist/types/plugins/StylePlugin.d.ts +1 -1
- package/package.json +4 -4
package/dist/index.umd.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var _D=Object.defineProperty,ID=Object.defineProperties;var OD=Object.getOwnPropertyDescriptors;var so=Object.getOwnPropertySymbols,RD=Object.getPrototypeOf,xD=Object.prototype.hasOwnProperty,$D=Object.prototype.propertyIsEnumerable,PD=Reflect.get;var Tn=Math.pow,co=(X,te,re)=>te in X?_D(X,te,{enumerable:!0,configurable:!0,writable:!0,value:re}):X[te]=re,ae=(X,te)=>{for(var re in te||(te={}))xD.call(te,re)&&co(X,re,te[re]);if(so)for(var re of so(te))$D.call(te,re)&&co(X,re,te[re]);return X},Xr=(X,te)=>ID(X,OD(te));var fo=(X,te,re)=>PD(RD(X),re,te);var Xe=(X,te,re)=>new Promise((Kt,Re)=>{var Ln=Je=>{try{Ot(re.next(Je))}catch(Rt){Re(Rt)}},jn=Je=>{try{Ot(re.throw(Je))}catch(Rt){Re(Rt)}},Ot=Je=>Je.done?Kt(Je.value):Promise.resolve(Je.value).then(Ln,jn);Ot((re=re.apply(X,te)).next())});(function(X,te){typeof exports=="object"&&typeof module!="undefined"?te(exports,require("regenerator-runtime"),require("crypto")):typeof define=="function"&&define.amd?define(["exports","regenerator-runtime","crypto"],te):(X=typeof globalThis!="undefined"?globalThis:X||self,te(X.modelDrivenEngine={},X.regeneratorRuntime,X.require$$0))})(this,function(X,te,re){"use strict";function Kt(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var Re=Kt(te),Ln=Kt(re),jn="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u5B57",Ot="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5B57\u7B26\u4E32",Je="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5BF9\u8C61",Rt="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u7EC4",lo="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5E03\u5C14",ho="{caption}\u5FC5\u586B",po="\u8BF7\u8F93\u5165\u6807\u9898",Do="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",go="\u8BF7\u8F93\u5165\u63D0\u793A\u6587\u5B57",vo="\u8BF7\u7ED1\u5B9A\u6570\u636E\u9879",mo="\u8BF7\u7ED1\u5B9A\u8868\u5355",yo="\u8BF7\u7ED1\u5B9A\u5217\u8868",Eo="\u8BF7\u7ED1\u5B9A\u6D41\u7A0B",Ao="\u8BF7\u8F93\u5165\u663E\u793A\u503C",Co="\u8BF7\u8F93\u5165\u5B58\u50A8\u503C",Fo="\u5355\u636E\u7F16\u53F7\u672A\u7ED1\u5B9A\u6570\u636E\u9879",wo="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",Bo="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u7684\u6570\u503C",bo="\u8BF7\u8F93\u5165\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",So="\u6570\u503C\u8303\u56F4\u8BBE\u7F6E\u6709\u8BEF",Mo="\u8BF7\u8F93\u5165\u957F\u5EA6\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u503C",No="\u9644\u4EF6\u5927\u5C0F\u5FC5\u987B\u57280MB\u81F31000MB\u4E4B\u95F4",_o="\u8BF7\u586B\u5199\u603B\u5206\u8BBE\u7F6E",Io="\u603B\u5206\u4E0D\u80FD\u5C0F\u4E8E1",Oo="\u9ED8\u8BA4\u503C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",Ro="\u9644\u4EF6\u4E0A\u4F20\u7684\u6570\u91CF\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",xo="\u8BF7\u91CD\u65B0\u9009\u62E9\u53EF\u9009\u6570\u91CF",$o="\u8BE5\u63A7\u4EF6\u6700\u5927\u957F\u5EA6\u9700\u5927\u4E8E\u6700\u5C0F\u957F\u5EA6",Po="\u8BE5\u63A7\u4EF6\u6700\u5C0F\u957F\u5EA6\u9700\u5C0F\u4E8E\u6700\u5927\u957F\u5EA6",To="\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u9009\u9879\u8BBE\u7F6E",Lo="\u9009\u9879ID\u4E0D\u80FD\u91CD\u590D",jo="\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u6761\u9009\u9879",qo="\u8BF7\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",ko="\u8BF7\u7ED1\u5B9A\u5B58\u50A8\u503C",Vo="\u8BF7\u7ED1\u5B9A\u670D\u52A1",Uo="\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Ho="\u8BF7\u9009\u62E9\u7701",zo="\u8BF7\u9009\u62E9\u5E02",Wo="\u8BF7\u9009\u62E9\u533A",Zo="\u6700\u5C11\u586B\u5199\u884C\u6570\u4E0D\u80FD\u5C0F\u4E8E0",Xo="\u884C\u6570\u91CF\u4E0D\u80FD\u5C0F\u4E8E{min}\u884C",Jo="\u8BF7\u8F93\u5165\u5217\u5BBD",Go="\u8BF7\u8BBE\u7F6E\u6240\u6709\u89C4\u5219\u6761\u4EF6\u7684\u903B\u8F91\u5173\u7CFB",Ko="\u8BF7\u5C06\u6240\u6709\u89C4\u5219\u6761\u4EF6\u586B\u5199\u5B8C\u6574",Qo="\u8BF7\u9009\u62E9\u63A7\u4EF6",Yo="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5",ea="\u8BF7\u9009\u62E9\u56DE\u586B\u8BBE\u7F6E",ta="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",na="\u8BF7\u9009\u62E9\u6839\u8282\u70B9",ra="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",ua="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",ia="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",oa="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",aa="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",sa="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",ca="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",fa="\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",ha="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",da="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",pa="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Da="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",ga="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",va="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",ma="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",ya="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Ea={isNotNumber:jn,isNotString:Ot,isNotObject:Je,isNotArray:Rt,isNotBoolean:lo,runtimeRequired:ho,pleaseEnterCaption:po,pleaseEnterCaptionTip:Do,pleaseEnterPlaceholder:go,pleaseEnterFieldCode:vo,pleaseEnterForm:mo,pleaseEnterList:yo,pleaseEnterProcess:Eo,pleaseEnterLabel:Ao,pleaseEnterValue:Co,bizKeyNotBindFiled:Fo,pleaseEnterNumberRange:wo,pleaseEnterAValueGreaterThanMin:Bo,pleaseEnterAValueLessThanMax:bo,numberRangeSetError:So,stringRangeError:Mo,attachmentMaxSize:No,pleaseEnterTotalScoreSetting:_o,theTotalScoreMustNotBeLessThan1:Io,scoreDefaultValueRange:Oo,attachmentLimitError:Ro,PleaseReselectTheOptionalQuantity:xo,TheMaximumLengthIsGreaterThanTheMinimumLength:$o,TheMinimumLengthIsGreaterThanTheMaximumLength:Po,PleaseSelectTheCorrectOptionSettings:To,optionIdIsRepeat:Lo,optionIsRequired:jo,pleaseEnterDataCode:qo,pleaseEnterValueFieldCode:ko,pleaseEnterSvcCode:Vo,pleaseBindAtLeastOneDisplayValue:Uo,pleaseSelectProvince:Ho,pleaseSelectCity:zo,pleaseSelectDistrict:Wo,limitRowsCannotBeLessThan0:Zo,TheNumberOfRowsCannotBeLessThanMinRows:Xo,pleaseEnterColumnWidth:Jo,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Go,pleaseCompleteAllRulesAndConditions:Ko,pleaseSelectControl:Qo,pleaseSelectAtLeastOneColumn:Yo,pleaseSelectFillBackMode:ea,pleaseSelectDashboard:ta,rootNodeIsRequired:na,theViewNameCannotBeEmpty:ra,pleaseSelectOcrType:ua,pleaseSelectAtLeastOneFieldToFillIn:ia,pleaseChooseAtLeastOne:oa,pleaseEnterButtonContent:aa,pleaseEnterDataCodeInDataSetting:sa,pleaseEnterValueFieldCodeInDataSetting:ca,pleaseEnterSvcCodeInDataSetting:fa,pleaseBindAtLeastOneDisplayValueInDataSetting:la,rootNodeIsRequiredInDataSetting:ha,pleaseEnterMaxHeight:da,pleaseEnter:pa,pleaseEnterWatermark:Da,pleaseEnterFileName:ga,pleaseUploadAtLeastOnePrintTemplate:va,pleaseAssignBusiness:ma,pleaseAssignExternal:ya},Aa="Please enter a number",Ca="Please enter a string",Fa="Please enter an object",wa="Please enter an array",Ba="Please enter a boolean",ba="{caption} Required",Sa="Please enter the title",Ma="Please enter the bubble prompt",Na="Please enter the prompt text",_a="Please bind data items",Ia="Please bind the form",Oa="Please bind the list",Ra="Please bind the process",xa="Please enter the displayed value",$a="Please enter the stored value",Pa="The document number is not bound to the data item",Ta="Please enter a value greater than or equal to {min} and less than or equal to {max}",La="Please enter a value greater than or equal to {min}",ja="Please enter a value less than or equal to {max}",qa="The value range is set incorrectly",ka="Please enter a value with a length greater than or equal to {min} and less than or equal to {max}",Va="The attachment size must be between 0MB and 1000MB",Ua="Please fill in the total score setting",Ha="The total score cannot be less than 1",za="The default value must be between {min} and {max}",Wa="The number of attachments uploaded must be between {min} and {max}",Za="Please re-select the optional quantity",Xa="The maximum length of the control must be greater than the minimum length",Ja="The minimum length of the control must be less than the maximum length",Ga="Please select the correct option setting",Ka="Option ID cannot be repeated",Qa="Please enter at least one option",Ya="Please bind the data source",es="Please bind the stored value",ts="Please bind the service",ns="At least one display value must be bound",rs="Please select a province",us="Please select a city",is="Please select a district",os="The minimum number of lines to fill in cannot be less than 0",as="The number of rows cannot be less than {min} rows",ss="Please enter the column width",cs="Please set the logical relationship of all rule conditions",fs="Please complete all rules and conditions",ls="please select control",hs="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",ds="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",ps="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Ds="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",gs="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",vs="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",ms="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",ys="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Es="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",As="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Cs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Fs="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",ws="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Bs="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",bs="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Ss="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Ms="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Ns="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",_s={isNotNumber:Aa,isNotString:Ca,isNotObject:Fa,isNotArray:wa,isNotBoolean:Ba,runtimeRequired:ba,pleaseEnterCaption:Sa,pleaseEnterCaptionTip:Ma,pleaseEnterPlaceholder:Na,pleaseEnterFieldCode:_a,pleaseEnterForm:Ia,pleaseEnterList:Oa,pleaseEnterProcess:Ra,pleaseEnterLabel:xa,pleaseEnterValue:$a,bizKeyNotBindFiled:Pa,pleaseEnterNumberRange:Ta,pleaseEnterAValueGreaterThanMin:La,pleaseEnterAValueLessThanMax:ja,numberRangeSetError:qa,stringRangeError:ka,attachmentMaxSize:Va,pleaseEnterTotalScoreSetting:Ua,theTotalScoreMustNotBeLessThan1:Ha,scoreDefaultValueRange:za,attachmentLimitError:Wa,PleaseReselectTheOptionalQuantity:Za,TheMaximumLengthIsGreaterThanTheMinimumLength:Xa,TheMinimumLengthIsGreaterThanTheMaximumLength:Ja,PleaseSelectTheCorrectOptionSettings:Ga,optionIdIsRepeat:Ka,optionIsRequired:Qa,pleaseEnterDataCode:Ya,pleaseEnterValueFieldCode:es,pleaseEnterSvcCode:ts,pleaseBindAtLeastOneDisplayValue:ns,pleaseSelectProvince:rs,pleaseSelectCity:us,pleaseSelectDistrict:is,limitRowsCannotBeLessThan0:os,TheNumberOfRowsCannotBeLessThanMinRows:as,pleaseEnterColumnWidth:ss,pleaseSetTheLogicalRelationshipOfAllRuleConditions:cs,pleaseCompleteAllRulesAndConditions:fs,pleaseSelectControl:ls,pleaseSelectDashboard:hs,theViewNameCannotBeEmpty:ds,pleaseSelectOcrType:ps,pleaseSelectAtLeastOneFieldToFillIn:Ds,pleaseChooseAtLeastOne:gs,pleaseEnterButtonContent:vs,pleaseEnterDataCodeInDataSetting:ms,pleaseEnterValueFieldCodeInDataSetting:ys,pleaseEnterSvcCodeInDataSetting:Es,pleaseBindAtLeastOneDisplayValueInDataSetting:As,rootNodeIsRequiredInDataSetting:Cs,pleaseEnterMaxHeight:Fs,pleaseEnter:ws,pleaseEnterWatermark:Bs,pleaseEnterFileName:bs,pleaseUploadAtLeastOnePrintTemplate:Ss,pleaseAssignBusiness:Ms,pleaseAssignExternal:Ns},Is="\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Os="\u6587\u5B57\u5217\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Rs="\u5BFE\u8C61\u7269\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",xs="\u6570\u5B57\u7D44\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",$s="\u30D6\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Ps="{caption}\u5FC5\u9808",Ts="\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Ls="\u6C17\u6CE1\u306E\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",js="\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",qs="\u30C7\u30FC\u30BF\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",ks="\u30B7\u30FC\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Vs="\u30EA\u30B9\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Us="\u30D5\u30ED\u30FC\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Hs="\u8868\u793A\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",zs="\u4FDD\u5B58\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Ws="\u30B7\u30FC\u30C8\u756A\u53F7\u304C\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",Zs="{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Xs="{min}\u4EE5\u4E0A\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Js="{max}\u672A\u6E80\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Gs="\u6570\u5024\u7BC4\u56F2\u8A2D\u5B9A\u30A8\u30E9\u30FC",Ks="\u9577\u3055\u304C{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Qs="\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306F0MB\u304B\u30891000MB\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Ys="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",ec="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u306F\uFF11\u4EE5\u4E0A\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",tc="\u57FA\u672C\u8A2D\u5B9A\u5024\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",nc="\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4EF6\u6570\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059",rc="\u6570\u91CF\u3092\u518D\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",uc="\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",ic="\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",oc="\u6B63\u78BA\u306A\u8A2D\u5B9A\u5024\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",ac="ID\u306F\u91CD\u8907\u3057\u306A\u3044\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",sc="\u6700\u4F4E\uFF11\u70B9\u3092\u9078\u3076\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",cc="\u5143\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",fc="\u4FDD\u5B58\u5024\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",lc="\u30B5\u30FC\u30D3\u30B9\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",hc="\u8868\u793A\u5024\u3092\u30EA\u30F3\u30AF\u3057\u76F4\u3057\u3057\u3066\u4E0B\u3055\u3044",dc="\u7701\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",pc="\u5E02\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Dc="\u533A\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",gc="\u6700\u5C0F\u5024\u306F\uFF10\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",vc="\u6700\u4F4E\u884C\u6570\u306F{min}\u884C\u3067\u304A\u9858\u3044\u3057\u307E\u3059",mc="\u5217\u5E45\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",yc="\u5168\u3066\u306E\u6761\u4EF6\u306E\u30ED\u30B8\u30C3\u30AF\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Ec="\u5168\u3066\u306E\u6761\u4EF6\u3092\u5B8C\u6210\u3055\u305B\u3066\u4E0B\u3055\u3044",Ac="please select control",Cc="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Fc="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",wc="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Bc="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",bc="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Sc="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Mc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Nc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",_c="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Ic="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Oc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Rc="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",xc="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",$c="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Pc="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Tc="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Lc="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",jc="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",qc={isNotNumber:Is,isNotString:Os,isNotObject:Rs,isNotArray:xs,isNotBoolean:$s,runtimeRequired:Ps,pleaseEnterCaption:Ts,pleaseEnterCaptionTip:Ls,pleaseEnterPlaceholder:js,pleaseEnterFieldCode:qs,pleaseEnterForm:ks,pleaseEnterList:Vs,pleaseEnterProcess:Us,pleaseEnterLabel:Hs,pleaseEnterValue:zs,bizKeyNotBindFiled:Ws,pleaseEnterNumberRange:Zs,pleaseEnterAValueGreaterThanMin:Xs,pleaseEnterAValueLessThanMax:Js,numberRangeSetError:Gs,stringRangeError:Ks,attachmentMaxSize:Qs,pleaseEnterTotalScoreSetting:Ys,theTotalScoreMustNotBeLessThan1:ec,scoreDefaultValueRange:tc,attachmentLimitError:nc,PleaseReselectTheOptionalQuantity:rc,TheMaximumLengthIsGreaterThanTheMinimumLength:uc,TheMinimumLengthIsGreaterThanTheMaximumLength:ic,PleaseSelectTheCorrectOptionSettings:oc,optionIdIsRepeat:ac,optionIsRequired:sc,pleaseEnterDataCode:cc,pleaseEnterValueFieldCode:fc,pleaseEnterSvcCode:lc,pleaseBindAtLeastOneDisplayValue:hc,pleaseSelectProvince:dc,pleaseSelectCity:pc,pleaseSelectDistrict:Dc,limitRowsCannotBeLessThan0:gc,TheNumberOfRowsCannotBeLessThanMinRows:vc,pleaseEnterColumnWidth:mc,pleaseSetTheLogicalRelationshipOfAllRuleConditions:yc,pleaseCompleteAllRulesAndConditions:Ec,pleaseSelectControl:Ac,pleaseSelectDashboard:Cc,theViewNameCannotBeEmpty:Fc,pleaseSelectOcrType:wc,pleaseSelectAtLeastOneFieldToFillIn:Bc,pleaseChooseAtLeastOne:bc,pleaseEnterButtonContent:Sc,pleaseEnterDataCodeInDataSetting:Mc,pleaseEnterValueFieldCodeInDataSetting:Nc,pleaseEnterSvcCodeInDataSetting:_c,pleaseBindAtLeastOneDisplayValueInDataSetting:Ic,rootNodeIsRequiredInDataSetting:Oc,pleaseEnterMaxHeight:Rc,pleaseEnter:xc,pleaseEnterWatermark:$c,pleaseEnterFileName:Pc,pleaseUploadAtLeastOnePrintTemplate:Tc,pleaseAssignBusiness:Lc,pleaseAssignExternal:jc},kc={zhCN:Ea,enUS:_s,jaJP:qc},xe;(function(e){e.Number="Number",e.Operator="Operator",e.VariableInMainTable="VariableInMainTable",e.VariableInCurrentSubTable="VariableInCurrentSubTable",e.VariableInOtherSubTable="VariableInOtherSubTable",e.UndefinedVariable="UndefinedVariable"})(xe||(xe={}));var gt;(function(e){e.SUM="SUM",e.AVG="AVG",e.MAX="MAX",e.MIN="MIN"})(gt||(gt={}));var Jr="zh-CN";function Be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var qe;(function(e){e.BASE="base",e.FORM="form",e.LAYOUT="layout",e.WRAP="wrap",e.COLUMN="column",e.LIST="list",e.SEARCH="search"})(qe||(qe={}));var J;(function(e){e.TITLE="title",e.LINK="link",e.BUTTON="button",e.DIVIDER="divider",e.TEXT="text",e.CREATE_FORM_LIST_BUTTON="list-page-btn-create-form",e.BATCH_SUBMISSION_LIST_BUTTON="list-page-btn-batch-submission",e.SUBMISSION_RECORD_LIST_BUTTON="list-page-btn-submission-record",e.IMPORT_RECORD_LIST_BUTTON="list-page-btn-import-record",e.EXPORT_RECORD_LIST_BUTTON="list-page-btn-export-record",e.EXPORT_LIST_BUTTON="list-page-btn-export-list",e.LIST_SELECT_BUTTON="list-select-button",e.FORM_SELECT_BUTTON="form-select-button",e.LIST_VIEW_SELECT="list-view-select",e.TEXT_OCR_BUTTON="text-ocr-button",e.INVOICE_CHECK_BUTTON="invoice-check-button",e.LIST_PAGE_BTN_BATCH_PRINT="list-page-btn-batch-print",e.LIST_PAGE_BTN_BATCH_PRINT_RECORD="list-page-btn-batch-print-record",e.VARCHAR_COLUMN="varchar-column",e.TEXT_COLUMN="text-column",e.DECIMAL_COLUMN="decimal-column",e.TIMESCOPE_COLUMN="timescope-column",e.TIMESTAMP_COLUMN="timestamp-column",e.ARRAY_COLUMN="array-column",e.DEPARTMENT_COLUMN="department-column",e.AUTO_NUMBER_COLUMN="auto-number-column",e.FILE_COLUMN="file-column",e.IMAGE_COLUMN="image-column",e.PEOPLE_COLUMN="people-column",e.LOCATION_COLUMN="location-column",e.CUSTOM_COLUMN="custom-column",e.ORDER_COLUMN="order-column",e.OPERATION_COLUMN="operation-column",e.EMPLOYEE_COLUMN="employee-column",e.ADDRESS="address",e.AMOUNT="amount",e.ATTACHMENT="attachment",e.AUTO_NUMBER="auto-number",e.CALC="calc",e.CHECKBOX="checkbox",e.DATE_PICKER="date-picker",e.DATE_RANGE="date-range",e.DEPARTMENT="department",e.EMPLOYEE="employee",e.IMAGE="image",e.INPUT="input",e.NUMBER="number",e.RADIO="radio",e.RICH_TEXT="rich-text",e.SCORE="score",e.SEARCH_DATE_RANGE="search-date-range",e.SEARCH_NUMBER_RANGE="search-number-range",e.SEARCH_INPUT="search-input",e.SELECT="select",e.SELECT_MULTIPLE="select-multiple",e.SELECT_RELATION="select-relation",e.VUE_FORM_ITEM="vue-form-item",e.TEXTAREA="textarea",e.EMAIL="email",e.FOOTER="footer",e.HEADER="header",e.ID_CARD="id-card",e.MOBILE="mobile",e.PHONE="phone",e.RADIO_IMAGE="radio-image",e.ELECTRONIC_SIGNATURE="electronic-signature",e.WPS="wps",e.CARD_GROUP="card-group",e.COL="col",e.GRID="grid",e.GRID_ROW="grid-row",e.GRID_TABLE_COLUMN="grid-table-column",e.ROW="row",e.TWO_COLUMNS="two-columns",e.SUBTABLE_COLUMN="subtable-column",e.SUBTABLE_ROW="subtable-row",e.TAB="tab",e.TAB_PANE="tab-pane",e.TOOLBOX="toolbox",e.DATA_VIEW="data-view",e.LIST_VIEW="list-view",e.SUBTABLE="subtable",e.GRID_TABLE="grid-table",e.SIMPLE_SEARCH="simple-search",e.PAGINATION="pagination",e.CHECKBOX_IMAGE="checkbox-image",e.DASHBOARD="dashboard",e.TREE="tree",e.EMPLOYEE2="employee2",e.DEPARTMENT2="department2"})(J||(J={}));var z;(function(e){e.VARCHAR="varchar",e.TEXT="text",e.ARRAY="array",e.ADDRESS="location",e.DECIMAL="decimal",e.DECIMAL_RANGE="decimal_range",e.TIMESTAMP="timestamp",e.EMPLOYEES="people",e.DEPARTMENTS="department",e.MONEY="money",e.TIMESCOPE="timescope",e.FILE="file",e.IMAGE="image",e.AUTO_NUMBER="auto_number",e.CALC="calc",e.RELATION="relation",e.LIST="list",e.RELATION_FIELD="relation-field",e.REFERENCE_FIELD="reference-field",e.CALC_FIELD="calc",e.JSON="json",e.BIGINT="bigint",e.ANY="ANY",e.ENCRYPTED_FIELD="encrypted_field"})(z||(z={}));var ge;ge={},Be(ge,z.ARRAY,J.ARRAY_COLUMN),Be(ge,z.AUTO_NUMBER,J.AUTO_NUMBER_COLUMN),Be(ge,z.DECIMAL,J.DECIMAL_COLUMN),Be(ge,z.DEPARTMENTS,J.DEPARTMENT_COLUMN),Be(ge,z.FILE,J.FILE_COLUMN),Be(ge,z.IMAGE,J.IMAGE_COLUMN),Be(ge,z.ADDRESS,J.LOCATION_COLUMN),Be(ge,z.EMPLOYEES,J.EMPLOYEE_COLUMN),Be(ge,z.TEXT,J.TEXT_COLUMN),Be(ge,z.TIMESCOPE,J.TIMESCOPE_COLUMN),Be(ge,z.TIMESTAMP,J.TIMESTAMP_COLUMN),Be(ge,z.VARCHAR,J.VARCHAR_COLUMN),Be(ge,z.RELATION,J.VARCHAR_COLUMN);var Gr;(function(e){e.YEAR="year",e.MONTH="month",e.DATE="date",e.DATETIME="datetime"})(Gr||(Gr={}));var Kr="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",Vc=Kr+"0123456789";function qn(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:15,t="",n=0;n<e;n++){var r=n===0?Kr:Vc,u=Math.random()*r.length;t+=r[parseInt(String(u),10)]}return t}function kn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Uc(e){if(Array.isArray(e))return kn(e)}function Hc(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Qr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zc(){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(e){return!1}}function Qt(e,t,n){return zc()?Qt=Reflect.construct:Qt=function(u,o,a){var l=[null];l.push.apply(l,o);var c=Function.bind.apply(u,l),d=new c;return a&&$t(d,a.prototype),d},Qt.apply(null,arguments)}function xt(e){return xt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},xt(e)}function Yr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&$t(e,t)}function Wc(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Zc(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Xc(){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 Jc(e,t){return t&&(Gc(t)==="object"||typeof t=="function")?t:Hc(e)}function $t(e,t){return $t=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},$t(e,t)}function eu(e){return Uc(e)||Zc(e)||Kc(e)||Xc()}var Gc=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Kc(e,t){if(!!e){if(typeof e=="string")return kn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return kn(e,t)}}function Vn(e){var t=typeof Map=="function"?new Map:void 0;return Vn=function(r){if(r===null||!Wc(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return Qt(r,arguments,xt(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),$t(u,r)},Vn(e)}function Qc(){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(e){return!1}}function tu(e){var t=Qc();return function(){var r=xt(e),u;if(t){var o=xt(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return Jc(this,u)}}var Un=console;function Ye(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=Un).warn.apply(r,["\u{1F9D0} Driven Warning:"+t[0]].concat(eu(u)))}function Hn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=Un).log.apply(r,["\u{1F680} Driven Log:"+t[0]].concat(eu(u)))}function Yc(e){return e+" \u{1F41B}\u{1F41B}\u{1F41B}"}var zn=function(e){Yr(n,e);var t=tu(n);function n(r){Qr(this,n);var u;return u=t.call(this,r),u.name="\u{1F4A5} Driven Error",u.message=r?Yc(r):"An unknown error occurred in the Driven, please contact the person in charge \u{1F691}\u{1F691}\u{1F691}",u}return n}(Vn(Error)),ef=function(e){Yr(n,e);var t=tu(n);function n(r){Qr(this,n);var u;return u=t.call(this,r),u.name="\u{1F6A8} Driven Reference Error",u}return n}(zn);function Ge(e){throw new zn(e)}function nu(e){throw new ef(e)}function Yt(e){Un.error(new zn(e))}function ct(e,t){Array.isArray(e)&&e.map(function(n){switch(n.controlType){case"layout":ct(n==null?void 0:n.children,t);break;case"search":ct(n==null?void 0:n.children,t);break;case"form":t(n)}})}var tf=Object.prototype.toString;function ru(e,t){return tf.call(e)==="[object "+t+"]"}function nf(e){return ru(e,"String")}function rf(e){return ru(e,"Promise")}var uf=function(){function e(t){var n,r;this._messageCache=new Map,this.messages={},this.variableRegExp=/\{([0-9a-zA-Z_]+)\}/g,this._messages=Object.freeze((r=(n=t.messages)!==null&&n!==void 0?n:this.getPreImport(t.locale))!==null&&r!==void 0?r:{}),t.variableRegExp&&(this.variableRegExp=t.variableRegExp),this.setLocale(t.locale)}return e.prototype.setLocale=function(t){var n=this;this.locale=t,this._messageCache.clear();var r=this.getMessageData();rf(r)?r.then(function(u){n._messageCache.clear(),n.messages[n.localeInMessageKey]=u}):this.messages[this.localeInMessageKey]=r},e.prototype.getMessageData=function(){var t=this._messages[this.localeInMessageKey];return typeof t=="function"?t():t},e.prototype.translate=function(t,n,r){var u=this.getMessage(t);return u?this.formatMessage(u,r):this.formatMessage(n,r)},e.prototype.getMessage=function(t){if(this._messageCache.has(t))return this._messageCache.get(t);var n=this.getPathArray(t),r=n.reduce(function(u,o,a,l){if(u!==void 0){var c=u[o];if(!(a===l.length-1&&!nf(c)))return c}},this.message);return this._messageCache.set(t,r),r},e.prototype.formatMessage=function(t,n){return n?t.replace(this.variableRegExp,function(r,u){var o=n[u];return o!==void 0?String(o):r}):t},e.prototype.getPreImport=function(t){var n;if(window.okI18nPreImport){var r=this.getLocaleInMessageKey(t);return window.okI18nPreImport.hasOwnProperty(r)?window.okI18nPreImport:(n={},n[r]=window.okI18nPreImport,n)}},e.prototype.getPathArray=function(t){return t.split(".")},e.prototype.getLocaleInMessageKey=function(t){return t.replace(/-/g,"")},Object.defineProperty(e.prototype,"$t",{get:function(){return this.translate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localeInMessageKey",{get:function(){return this.getLocaleInMessageKey(this.locale)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){var t;return(t=this.messages[this.localeInMessageKey])!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e}();function of(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var $e=function(){function e(){of(this,e)}return e.getMessage=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$i18n.$t(n,"",r)},e.resetI18n=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Jr;return new uf({locale:n,messages:kc})},e.setLocale=function(n){return this.$i18n.setLocale(n)},e}();$e.$i18n=$e.resetI18n();function uu(e,t,n){var r=t.replace(/\[(\d)]/g,function(o,a){return"."+a}).split("."),u=!1;return r.reduce(function(o,a,l,c){var d=o;if(!!o){if(!Object.prototype.hasOwnProperty.call(o,a)){Ye("Can not set ".concat(t,"'s ").concat(a," property in current %o, Because there is no ").concat(a," property on the %o"),o,o);return}return l===c.length-1&&!Object.is(d[a],n)&&(d[a]=n,u=!0),d[a]}},e),u}var et=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function iu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Wn={exports:{}};(function(e){(function(t){var n=function(v,A,S){if(!d(A)||s(A)||h(A)||p(A)||c(A))return A;var F,R=0,P=0;if(f(A))for(F=[],P=A.length;R<P;R++)F.push(n(v,A[R],S));else{F={};for(var T in A)Object.prototype.hasOwnProperty.call(A,T)&&(F[v(T,S)]=n(v,A[T],S))}return F},r=function(v,A){A=A||{};var S=A.separator||"_",F=A.split||/(?=[A-Z])/;return v.split(F).join(S)},u=function(v){return D(v)?v:(v=v.replace(/[\-_\s]+(.)?/g,function(A,S){return S?S.toUpperCase():""}),v.substr(0,1).toLowerCase()+v.substr(1))},o=function(v){var A=u(v);return A.substr(0,1).toUpperCase()+A.substr(1)},a=function(v,A){return r(v,A).toLowerCase()},l=Object.prototype.toString,c=function(v){return typeof v=="function"},d=function(v){return v===Object(v)},f=function(v){return l.call(v)=="[object Array]"},s=function(v){return l.call(v)=="[object Date]"},h=function(v){return l.call(v)=="[object RegExp]"},p=function(v){return l.call(v)=="[object Boolean]"},D=function(v){return v=v-0,v===v},g=function(v,A){var S=A&&"process"in A?A.process:A;return typeof S!="function"?v:function(F,R){return S(F,v,R)}},y={camelize:u,decamelize:a,pascalize:o,depascalize:a,camelizeKeys:function(v,A){return n(g(u,A),v)},decamelizeKeys:function(v,A){return n(g(a,A),v,A)},pascalizeKeys:function(v,A){return n(g(o,A),v)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=y:t.humps=y})(et)})(Wn);function G(e){if(e!==void 0)return typeof e=="object"?JSON.parse(JSON.stringify(e)):e}function ke(e){return Object.prototype.toString.call(e)==="[object Object]"}function af(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1}function vt(e){return Array.isArray(e)}function be(e){return typeof e=="string"}function en(e){return typeof e=="number"}function ou(e){return typeof e=="function"}function sf(e){return vt(e)&&e.every(function(t){return be(t)})}function cf(e){return vt(e)&&e.every(function(t){return en(t)||t===""})}function au(e){return/^\[.*?]$/.test(e)}function tn(e){return/^{.*?}$/.test(e)}function Zn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ff(e){if(Array.isArray(e))return Zn(e)}function su(e,t,n,r,u,o,a){try{var l=e[o](a),c=l.value}catch(d){n(d);return}l.done?t(c):Promise.resolve(c).then(r,u)}function lf(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var o=e.apply(t,n);function a(c){su(o,r,u,a,l,"next",c)}function l(c){su(o,r,u,a,l,"throw",c)}a(void 0)})}}function hf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function df(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function pf(){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 Xn(e){return ff(e)||df(e)||Df(e)||pf()}function Df(e,t){if(!!e){if(typeof e=="string")return Zn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zn(e,t)}}var cu=function(){function e(){hf(this,e),this._events=new Map,this.debug=!1}var t=e.prototype;return t.emit=function(r){for(var u=arguments.length,o=new Array(u>1?u-1:0),a=1;a<u;a++)o[a-1]=arguments[a];var l=this;return lf(Re.default.mark(function c(){var d,f,s,h,p,D,g,y,v,A;return Re.default.wrap(function(F){for(;;)switch(F.prev=F.next){case 0:if(d=l._events.get(r),f=[],!d){F.next=42;break}s=d.slice(),h=!0,p=!1,D=void 0,F.prev=5,g=s[Symbol.iterator]();case 7:if(h=(y=g.next()).done){F.next=28;break}if(v=y.value,d.includes(v)){F.next=11;break}return F.abrupt("continue",25);case 11:return F.prev=11,l.debug&&Hn.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(v.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+v.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(o.map(function(){return"%o"}).join(","),"\u3002")].concat(Xn(o))),F.next=15,v.apply(null,Xn(o));case 15:if(A=F.sent,l.debug&&Hn.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(v.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+v.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(o.map(function(){return"%o"}).join(","),"; \u51FD\u6570\u7684\u8FD4\u56DE\u7ED3\u679C\u4E3A%o")].concat(Xn(o),[A])),f.push(A),A!==!1){F.next=20;break}return F.abrupt("break",28);case 20:F.next=25;break;case 22:F.prev=22,F.t0=F.catch(11),Yt(String(F.t0));case 25:h=!0,F.next=7;break;case 28:F.next=34;break;case 30:F.prev=30,F.t1=F.catch(5),p=!0,D=F.t1;case 34:F.prev=34,F.prev=35,!h&&g.return!=null&&g.return();case 37:if(F.prev=37,!p){F.next=40;break}throw D;case 40:return F.finish(37);case 41:return F.finish(34);case 42:return F.abrupt("return",f);case 43:case"end":return F.stop()}},c,null,[[5,30,34,42],[11,22],[35,,37,41]])}))()},t.on=function(r,u){if(this._events.has(r)){var o;(o=this._events.get(r))===null||o===void 0||o.push(u)}else this._events.set(r,[u])},t.off=function(r,u){if(this._events.has(r)){var o=this._events.get(r),a=o==null?void 0:o.indexOf(u);o==null||o.splice(a,1)}},t.delete=function(r){this._events.has(r)&&this._events.delete(r)},t.clear=function(){this._events=new Map},e}();function gf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var vf=[{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-rows-checked"}],fu=function(){function e(){gf(this,e)}var t=e.prototype;return t.getEventsFromKeys=function(r){var u=typeof r=="string"?[r]:r;return e.events.filter(function(o){return u.includes(o.key)})},e}();fu.events=vf;function mf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var lu=[],nn=function(){function e(n){mf(this,e),this.registeredControlTypes=new Set,this.controlConfigMap=new Map,this._controls=[],this._type=n,this._initControls(n)}var t=e.prototype;return t.registerControlConfig=function(r,u){return this.controlConfigMap.set(r,u),this},t.getControlConfig=function(r){return this.controlConfigMap.get(r)},t.getControls=function(){return this._controls},t.register=function(r){r.__is_control__||Ge("".concat(r.name," is not a Control"));var u=this._controls.findIndex(function(o){return o.controlType===r.controlType});return u>-1&&(Ye("The ".concat(r.controlType," is repeat register, So it overwrites the one that was registered before.")),this._controls.splice(u,1)),this.registeredControlTypes.add(r.controlType),this._controls.push(r),this},t.isLayoutControl=function(r){return r.controlType===qe.LAYOUT},t.isFormControl=function(r){return r.controlType===qe.FORM},t.isListControl=function(r){return r.controlType===qe.LIST},t.isColumnControl=function(r){return r.controlType===qe.COLUMN},t.createControl=function(r,u){var o=this;if(Array.isArray(r))return r.map(function(f){return o.createControl(f,u)});r.children&&(r.children=r.children.map(function(f){return o.createControl(f,u)})),this.isListControl(r)&&r.props.headers&&(r.props.headers=r.props.headers.map(function(f){return o.createControl(f,u)}));var a=this.getControlFormType(r.type);if(a){var l=r;if(typeof u=="function"){var c=u(l);c&&(l=c)}var d=new a(l);return d}else Ge("The constructor of ".concat(r.type," could not be found, please confirm that the constructor has been registered"))},t.createControlInstance=function(r,u){var o=this.getControlFormType(r);if(o)return new o(u)},t.getControlFormType=function(r){return this._controls.find(function(u){return u.controlType===r})},t._initControls=function(r){var u=this;this.constructor.staticControls.forEach(function(o){u.register(o[r])})},e.register=function(r){var u=r.Designer,o=r.Runtime;(!u||!o||!u.__is_control__||!o.__is_control__)&&Ge("".concat(r," is can't register as a Control"));var a=this.staticControls.findIndex(function(l){return l.Designer.controlType===u.controlType});return a>-1&&(Ye("The ".concat(u.controlType," is repeat register, So it overwrites the one that was registered before.")),this.staticControls.splice(a,1)),this.staticRegisteredTypes.add(u.controlType),this.staticControls.push(r),this},e}();nn.staticControls=lu,nn.staticRegisteredTypes=new Set(lu.map(function(e){return e.Designer.controlType})),nn.staticRegisteredConfigs=new Map;function ft(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Pt=function e(t){ft(this,e);var n;this.dataCode=(n=t==null?void 0:t.dataCode)!==null&&n!==void 0?n:"";var r;this.fieldCode=(r=t==null?void 0:t.fieldCode)!==null&&r!==void 0?r:"";var u;this.fieldType=(u=t==null?void 0:t.fieldType)!==null&&u!==void 0?u:""},Ve=function e(){ft(this,e)},rn=function e(t){ft(this,e);var n;this.amount=(n=t==null?void 0:t.amount)!==null&&n!==void 0?n:"";var r;this.currency=(r=t==null?void 0:t.currency)!==null&&r!==void 0?r:Jn.CNY},un=function e(t){ft(this,e);var n;this.min=(n=t==null?void 0:t.min)!==null&&n!==void 0?n:"";var r;this.max=(r=t==null?void 0:t.max)!==null&&r!==void 0?r:""},on=function e(t){ft(this,e);var n;this.city=(n=t==null?void 0:t.city)!==null&&n!==void 0?n:"";var r;this.cityDisplay=(r=t==null?void 0:t.cityDisplay)!==null&&r!==void 0?r:"";var u;this.district=(u=t==null?void 0:t.district)!==null&&u!==void 0?u:"";var o;this.districtDisplay=(o=t==null?void 0:t.districtDisplay)!==null&&o!==void 0?o:"";var a;this.province=(a=t==null?void 0:t.province)!==null&&a!==void 0?a:"";var l;this.provinceDisplay=(l=t==null?void 0:t.provinceDisplay)!==null&&l!==void 0?l:""},an=function e(t){ft(this,e);var n;this.result=(n=t==null?void 0:t.result)!==null&&n!==void 0?n:0;var r;this.unit=(r=t==null?void 0:t.unit)!==null&&r!==void 0?r:""},Jn;(function(e){e.CNY="CNY",e.USD="USD",e.JPY="JPY",e.EUR="EUR",e.INR="INR",e.IDR="IDR",e.BRL="BRL",e.AED="AED",e.AUD="AUD",e.CAD="CAD",e.EGP="EGP",e.GBP="GBP",e.ZAR="ZAR",e.KRW="KRW",e.MAD="MAD",e.MXN="MXN",e.MYR="MYR",e.PHP="PHP",e.PLN="PLN",e.RUB="RUB",e.SGD="SGD",e.THB="THB",e.TRY="TRY",e.TWD="TWD",e.VND="VND",e.HKD="HKD",e.IEP="IEP"})(Jn||(Jn={}));var hu;(function(e){e.REQUIRED="required",e.IS_HIDE="isHide",e.IS_SHOW_UNIT="isShowUnit",e.IMD_SEARCH="immediatelySearch",e.MULTIPLE="multiple",e.SUBMIT_SELECT_CURRENCY="submitSelectCurrency",e.CAPTION="caption",e.IS_HIDE_CAPTION="isHideCaption",e.DEFAULT_SHOW_OPTIONS="defaultShowOptions",e.CAN_SEARCH="canSearch",e.CAN_CHECK="canCheck",e.CAN_EDIT="canEdit",e.CAN_DELETE="canDelete",e.SHOW_UPPER_CASE="showUpperCase",e.MICROMETER="micrometer",e.PRECISION="precision",e.PERCENTAGE="percentage",e.OPTIONAL_LEVEL="optionalLevel",e.CONTAINS_SUB_NODE="containsSubNode",e.DEFAULT_COLLAPSE="defaultCollapse",e.CAN_VIEW_FORM="canViewForm",e.SERVER_PAGINATION="serverPagination",e.IS_SHOW_CAPTION_TIP="isShowCaptionTip",e.ENCRYPTED="encrypted",e.IS_INLINE_EDIT="isInlineEdit",e.REVISIONS_MODE="revisionsMode",e.ALLOW_COPY_OPTIONS="allowCopyOptions"})(hu||(hu={}));var Gn;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.READONLY=1]="READONLY",e[e.EDITABLE=2]="EDITABLE",e[e.PRINT=5]="PRINT"})(Gn||(Gn={}));var yf=function e(t){ft(this,e);var n;this.width=(n=t==null?void 0:t.width)!==null&&n!==void 0?n:"";var r;this.height=(r=t==null?void 0:t.height)!==null&&r!==void 0?r:"";var u;this.widthConfig=(u=t==null?void 0:t.widthConfig)!==null&&u!==void 0?u:"fill";var o;this.heightConfig=(o=t==null?void 0:t.heightConfig)!==null&&o!==void 0?o:"fill"};function Ef(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Kn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Af(){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(e){return!1}}function sn(e,t,n){return Af()?sn=Reflect.construct:sn=function(u,o,a){var l=[null];l.push.apply(l,o);var c=Function.bind.apply(u,l),d=new c;return a&&Lt(d,a.prototype),d},sn.apply(null,arguments)}function Tt(e){return Tt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Tt(e)}function Cf(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Lt(e,t)}function Ff(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function wf(e,t){return t&&(Bf(t)==="object"||typeof t=="function")?t:Ef(e)}function Lt(e,t){return Lt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Lt(e,t)}var Bf=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Qn(e){var t=typeof Map=="function"?new Map:void 0;return Qn=function(r){if(r===null||!Ff(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return sn(r,arguments,Tt(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Lt(u,r)},Qn(e)}function bf(){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(e){return!1}}function Sf(e){var t=bf();return function(){var r=Tt(e),u;if(t){var o=Tt(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return wf(this,u)}}var du=function e(t){Kn(this,e),this.isHide={type:"boolean"}},pu=function(e){Cf(n,e);var t=Sf(n);function n(r){return Kn(this,n),t.call(this)}return n}(Qn(Array)),lt=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";Kn(this,e);var r;this.isHide=(r=t==null?void 0:t.isHide)!==null&&r!==void 0?r:!1,this.style=new yf(t==null?void 0:t.style);var u;this.caption=(u=t==null?void 0:t.caption)!==null&&u!==void 0?u:n};lt.Rules=du,lt.RuntimeRules=pu;function Ue(){return Ue=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Ue.apply(this,arguments)}function Mf(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Yn(e){return Yn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Yn(e)}function cn(e,t){return cn=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},cn(e,t)}function Nf(){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(e){return!1}}function fn(e,t,n){return Nf()?fn=Reflect.construct:fn=function(u,o,a){var l=[null];l.push.apply(l,o);var c=Function.bind.apply(u,l),d=new c;return a&&cn(d,a.prototype),d},fn.apply(null,arguments)}function _f(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function er(e){var t=typeof Map=="function"?new Map:void 0;return er=function(r){if(r===null||!_f(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return fn(r,arguments,Yn(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),cn(u,r)},er(e)}var If=/%[sdj%]/g,Du=function(){};typeof process!="undefined"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window!="undefined"&&typeof document!="undefined"&&(Du=function(t,n){typeof console!="undefined"&&console.warn&&n.every(function(r){return typeof r=="string"})&&console.warn(t,n)});function tr(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function Se(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=1,u=t[0],o=t.length;if(typeof u=="function")return u.apply(null,t.slice(1));if(typeof u=="string"){var a=String(u).replace(If,function(l){if(l==="%%")return"%";if(r>=o)return l;switch(l){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(c){return"[Circular]"}break;default:return l}});return a}return u}function Of(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function ue(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Of(t)&&typeof e=="string"&&!e)}function Rf(e,t,n){var r=[],u=0,o=e.length;function a(l){r.push.apply(r,l),u++,u===o&&n(r)}e.forEach(function(l){t(l,a)})}function gu(e,t,n){var r=0,u=e.length;function o(a){if(a&&a.length){n(a);return}var l=r;r=r+1,l<u?t(e[l],o):n([])}o([])}function xf(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n])}),t}var vu=function(e){Mf(t,e);function t(n,r){var u;return u=e.call(this,"Async Validation Error")||this,u.errors=n,u.fields=r,u}return t}(er(Error));function $f(e,t,n,r){if(t.first){var u=new Promise(function(s,h){var p=function(y){return r(y),y.length?h(new vu(y,tr(y))):s()},D=xf(e);gu(D,n,p)});return u.catch(function(s){return s}),u}var o=t.firstFields||[];o===!0&&(o=Object.keys(e));var a=Object.keys(e),l=a.length,c=0,d=[],f=new Promise(function(s,h){var p=function(g){if(d.push.apply(d,g),c++,c===l)return r(d),d.length?h(new vu(d,tr(d))):s()};a.length||(r(d),s()),a.forEach(function(D){var g=e[D];o.indexOf(D)!==-1?gu(g,n,p):Rf(g,n,p)})});return f.catch(function(s){return s}),f}function mu(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:typeof t=="function"?t():t,field:t.field||e.fullField}}}function yu(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]=Ue(Ue({},e[n]),r):e[n]=r}}return e}function Eu(e,t,n,r,u,o){e.required&&(!n.hasOwnProperty(e.field)||ue(t,o||e.type))&&r.push(Se(u.messages.required,e.fullField))}function Pf(e,t,n,r,u){(/^\s+$/.test(t)||t==="")&&r.push(Se(u.messages.whitespace,e.fullField))}var nr={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},jt={integer:function(t){return jt.number(t)&&parseInt(t,10)===t},float:function(t){return jt.number(t)&&!jt.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch(n){return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!jt.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&!!t.match(nr.email)&&t.length<255},url:function(t){return typeof t=="string"&&!!t.match(nr.url)},hex:function(t){return typeof t=="string"&&!!t.match(nr.hex)}};function Tf(e,t,n,r,u){if(e.required&&t===void 0){Eu(e,t,n,r,u);return}var o=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;o.indexOf(a)>-1?jt[a](t)||r.push(Se(u.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&r.push(Se(u.messages.types[a],e.fullField,e.type))}function Lf(e,t,n,r,u){var o=typeof e.len=="number",a=typeof e.min=="number",l=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,d=t,f=null,s=typeof t=="number",h=typeof t=="string",p=Array.isArray(t);if(s?f="number":h?f="string":p&&(f="array"),!f)return!1;p&&(d=t.length),h&&(d=t.replace(c,"_").length),o?d!==e.len&&r.push(Se(u.messages[f].len,e.fullField,e.len)):a&&!l&&d<e.min?r.push(Se(u.messages[f].min,e.fullField,e.min)):l&&!a&&d>e.max?r.push(Se(u.messages[f].max,e.fullField,e.max)):a&&l&&(d<e.min||d>e.max)&&r.push(Se(u.messages[f].range,e.fullField,e.min,e.max))}var mt="enum";function jf(e,t,n,r,u){e[mt]=Array.isArray(e[mt])?e[mt]:[],e[mt].indexOf(t)===-1&&r.push(Se(u.messages[mt],e.fullField,e[mt].join(", ")))}function qf(e,t,n,r,u){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(Se(u.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var o=new RegExp(e.pattern);o.test(t)||r.push(Se(u.messages.pattern.mismatch,e.fullField,t,e.pattern))}}}var H={required:Eu,whitespace:Pf,type:Tf,range:Lf,enum:jf,pattern:qf};function kf(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(ue(t,"string")&&!e.required)return n();H.required(e,t,r,o,u,"string"),ue(t,"string")||(H.type(e,t,r,o,u),H.range(e,t,r,o,u),H.pattern(e,t,r,o,u),e.whitespace===!0&&H.whitespace(e,t,r,o,u))}n(o)}function Vf(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(ue(t)&&!e.required)return n();H.required(e,t,r,o,u),t!==void 0&&H.type(e,t,r,o,u)}n(o)}function Uf(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(t===""&&(t=void 0),ue(t)&&!e.required)return n();H.required(e,t,r,o,u),t!==void 0&&(H.type(e,t,r,o,u),H.range(e,t,r,o,u))}n(o)}function Hf(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(ue(t)&&!e.required)return n();H.required(e,t,r,o,u),t!==void 0&&H.type(e,t,r,o,u)}n(o)}function zf(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(ue(t)&&!e.required)return n();H.required(e,t,r,o,u),ue(t)||H.type(e,t,r,o,u)}n(o)}function Wf(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(ue(t)&&!e.required)return n();H.required(e,t,r,o,u),t!==void 0&&(H.type(e,t,r,o,u),H.range(e,t,r,o,u))}n(o)}function Zf(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(ue(t)&&!e.required)return n();H.required(e,t,r,o,u),t!==void 0&&(H.type(e,t,r,o,u),H.range(e,t,r,o,u))}n(o)}function Xf(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(t==null&&!e.required)return n();H.required(e,t,r,o,u,"array"),t!=null&&(H.type(e,t,r,o,u),H.range(e,t,r,o,u))}n(o)}function Jf(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(ue(t)&&!e.required)return n();H.required(e,t,r,o,u),t!==void 0&&H.type(e,t,r,o,u)}n(o)}var Gf="enum";function Kf(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(ue(t)&&!e.required)return n();H.required(e,t,r,o,u),t!==void 0&&H[Gf](e,t,r,o,u)}n(o)}function Qf(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(ue(t,"string")&&!e.required)return n();H.required(e,t,r,o,u),ue(t,"string")||H.pattern(e,t,r,o,u)}n(o)}function Yf(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(ue(t,"date")&&!e.required)return n();if(H.required(e,t,r,o,u),!ue(t,"date")){var l;t instanceof Date?l=t:l=new Date(t),H.type(e,l,r,o,u),l&&H.range(e,l.getTime(),r,o,u)}}n(o)}function el(e,t,n,r,u){var o=[],a=Array.isArray(t)?"array":typeof t;H.required(e,t,r,o,u,a),n(o)}function rr(e,t,n,r,u){var o=e.type,a=[],l=e.required||!e.required&&r.hasOwnProperty(e.field);if(l){if(ue(t,o)&&!e.required)return n();H.required(e,t,r,a,u,o),ue(t,o)||H.type(e,t,r,a,u)}n(a)}function tl(e,t,n,r,u){var o=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(ue(t)&&!e.required)return n();H.required(e,t,r,o,u)}n(o)}var qt={string:kf,method:Vf,number:Uf,boolean:Hf,regexp:zf,integer:Wf,float:Zf,array:Xf,object:Jf,enum:Kf,pattern:Qf,date:Yf,url:rr,hex:rr,email:rr,required:el,any:tl};function ur(){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 t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var ir=ur();function tt(e){this.rules=null,this._messages=ir,this.define(e)}tt.prototype={messages:function(t){return t&&(this._messages=yu(ur(),t)),this._messages},define:function(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={};var n,r;for(n in t)t.hasOwnProperty(n)&&(r=t[n],this.rules[n]=Array.isArray(r)?r:[r])},validate:function(t,n,r){var u=this;n===void 0&&(n={}),r===void 0&&(r=function(){});var o=t,a=n,l=r;if(typeof a=="function"&&(l=a,a={}),!this.rules||Object.keys(this.rules).length===0)return l&&l(),Promise.resolve();function c(g){var y,v=[],A={};function S(F){if(Array.isArray(F)){var R;v=(R=v).concat.apply(R,F)}else v.push(F)}for(y=0;y<g.length;y++)S(g[y]);v.length?A=tr(v):(v=null,A=null),l(v,A)}if(a.messages){var d=this.messages();d===ir&&(d=ur()),yu(d,a.messages),a.messages=d}else a.messages=this.messages();var f,s,h={},p=a.keys||Object.keys(this.rules);p.forEach(function(g){f=u.rules[g],s=o[g],f.forEach(function(y){var v=y;typeof v.transform=="function"&&(o===t&&(o=Ue({},o)),s=o[g]=v.transform(s)),typeof v=="function"?v={validator:v}:v=Ue({},v),v.validator=u.getValidationMethod(v),v.field=g,v.fullField=v.fullField||g,v.type=u.getType(v),v.validator&&(h[g]=h[g]||[],h[g].push({rule:v,value:s,source:o,field:g}))})});var D={};return $f(h,a,function(g,y){var v=g.rule,A=(v.type==="object"||v.type==="array")&&(typeof v.fields=="object"||typeof v.defaultField=="object");A=A&&(v.required||!v.required&&g.value),v.field=g.field;function S(P,T){return Ue(Ue({},T),{},{fullField:v.fullField+"."+P})}function F(P){P===void 0&&(P=[]);var T=P;if(Array.isArray(T)||(T=[T]),!a.suppressWarning&&T.length&&tt.warning("async-validator:",T),T.length&&v.message!==void 0&&(T=[].concat(v.message)),T=T.map(mu(v)),a.first&&T.length)return D[v.field]=1,y(T);if(!A)y(T);else{if(v.required&&!g.value)return v.message!==void 0?T=[].concat(v.message).map(mu(v)):a.error&&(T=[a.error(v,Se(a.messages.required,v.field))]),y(T);var _={};if(v.defaultField)for(var $ in g.value)g.value.hasOwnProperty($)&&(_[$]=v.defaultField);_=Ue(Ue({},_),g.rule.fields);for(var Z in _)if(_.hasOwnProperty(Z)){var V=Array.isArray(_[Z])?_[Z]:[_[Z]];_[Z]=V.map(S.bind(null,Z))}var Y=new tt(_);Y.messages(a.messages),g.rule.options&&(g.rule.options.messages=a.messages,g.rule.options.error=a.error),Y.validate(g.value,g.rule.options||a,function(Q){var ne=[];T&&T.length&&ne.push.apply(ne,T),Q&&Q.length&&ne.push.apply(ne,Q),y(ne.length?ne:null)})}}var R;v.asyncValidator?R=v.asyncValidator(v,g.value,F,g.source,a):v.validator&&(R=v.validator(v,g.value,F,g.source,a),R===!0?F():R===!1?F(v.message||v.field+" fails"):R instanceof Array?F(R):R instanceof Error&&F(R.message)),R&&R.then&&R.then(function(){return F()},function(P){return F(P)})},function(g){c(g)})},getType:function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!qt.hasOwnProperty(t.type))throw new Error(Se("Unknown rule type %s",t.type));return t.type||"string"},getValidationMethod:function(t){if(typeof t.validator=="function")return t.validator;var n=Object.keys(t),r=n.indexOf("message");return r!==-1&&n.splice(r,1),n.length===1&&n[0]==="required"?qt.required:qt[this.getType(t)]||!1}},tt.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");qt[t]=n},tt.warning=Du,tt.messages=ir,tt.validators=qt;var nl={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 rl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new tt(e);return n.messages(Object.assign(nl,t)),n}var ul=new cu;function or(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function il(e){if(Array.isArray(e))return e}function ol(e){if(Array.isArray(e))return or(e)}function Au(e,t,n,r,u,o,a){try{var l=e[o](a),c=l.value}catch(d){n(d);return}l.done?t(c):Promise.resolve(c).then(r,u)}function Cu(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var o=e.apply(t,n);function a(c){Au(o,r,u,a,l,"next",c)}function l(c){Au(o,r,u,a,l,"throw",c)}a(void 0)})}}function al(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Fu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function sl(e,t,n){return t&&Fu(e.prototype,t),n&&Fu(e,n),e}function cl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wu(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Bu(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function fl(){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 ll(){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 bu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable}))),r.forEach(function(u){cl(e,u,n[u])})}return e}function hl(e){return il(e)||Bu(e)||Su(e,i)||fl()}function ar(e){return ol(e)||Bu(e)||Su(e)||ll()}function Su(e,t){if(!!e){if(typeof e=="string")return or(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return or(e,t)}}var He=function(){function t(r){var u=this;al(this,t),this.setting=[],this.eventKeys=[],this.customEvents=[],this.parent=null,this.updateSetting=Nu,this.removeSetting=Mu,this._callControlHooks("preInstance",r);var o=wu(this,t)?this.constructor:void 0,a=o.controlName,l=o.controlIcon,c=o.controlType,d=o.controlFieldType,f=o.controlEventKeys,s=o.controlCustomEvents,h=o.name,p=o.setting;a&&l&&c||nu("The ".concat(h," controlName,controlIcon,controlType is not define"));var D;this.id=(D=r==null?void 0:r.id)!==null&&D!==void 0?D:qn(10),this.name=a,this.icon=l;var g;this.type=(g=r==null?void 0:r.type)!==null&&g!==void 0?g:c,this.props=new lt(r==null?void 0:r.props,(wu(this,t)?this.constructor:void 0).controlName);var y;this.controlType=(y=r==null?void 0:r.controlType)!==null&&y!==void 0?y:"base",this.setting=G(p);var v;this.fieldType=(v=r==null?void 0:r.fieldType)!==null&&v!==void 0?v:d,this.eventKeys=G(f),this.customEvents=G(s),Promise.resolve().then(function(){u._callControlHooks("postInstance",r)})}var n=t.prototype;return n._callControlHooks=function(){for(var u=arguments.length,o=new Array(u),a=0;a<u;a++)o[a]=arguments[a];var l,c=hl(o),d=c[0],f=c.slice(1);return(l=ul).emit.apply(l,[d,this].concat(ar(f)))},n.preUpdate=function(u,o){this._callControlHooks("preUpdateProps",u,o)},n.postUpdate=function(u,o){this._callControlHooks("postUpdateProps",u,o)},n.updateProps=function(u,o){this.preUpdate(u,o),uu(this.props,u,o),this.postUpdate(u,o)},n.preValidate=function(){var u=this;return Cu(Re.default.mark(function o(){var a,l,c;return Re.default.wrap(function(f){for(;;)switch(f.prev=f.next){case 0:return a=bu({},u.rules),f.next=3,u._callControlHooks("preValidate",a);case 3:return l=f.sent,c=l[l.length-1],f.abrupt("return",c===!1?void 0:c);case 6:case"end":return f.stop()}},o)}))()},n.validate=function(u,o){var a=this;return Cu(Re.default.mark(function l(){var c,d,f;return Re.default.wrap(function(h){for(;;)switch(h.prev=h.next){case 0:return h.next=2,a.preValidate();case 2:return c=h.sent,d=c!==void 0?c:bu({},a.rules),Array.isArray(o)&&o.forEach(function(p){d.hasOwnProperty(p)&&delete d[p]}),f=rl(d,u),h.prev=6,h.next=9,f.validate(a.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=a),h.t0;case 16:case"end":return h.stop()}},l,null,[[6,12]])}))()},n.toDataBindModel=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,o=this.fieldType,a=this.id,l=this.type,c=this.props,d=c.dataBind,f=c.datasourceBind,s=c.optionConfig,h=c.caption,p=c.required,D=c.maxLength,g=c.options,y=c.encrypted,v=c.encryptedMode;if(!(!o&&!d&&!f)){var A={parentId:u,fieldType:o,controlId:a,caption:h,type:l,props:{}};switch(d&&(A.dataBind=d),s){case"datasource":case void 0:f&&(A.datasourceBind=f);break;case"custom":A.props.options=g;break}return p!==void 0&&(A.required=p),D!==void 0&&(A.maxLength=D),y!==void 0&&(A.encrypted=y),v!==void 0&&(A.encryptedMode=v),A}},n.preToSchema=function(){this._callControlHooks("preToSchema",this)},n.toSchema=function(){return this.preToSchema(),{id:this.id,type:this.type,props:G(this.props),fieldType:this.fieldType,controlType:this.controlType}},t.updateBasicControl=function(u,o){if(u==="setting"){if(o.add){var a;(a=this.setting).push.apply(a,ar(o.add))}o.remove&&this.removeSettingItem(o.remove),o.update}},sl(t,[{key:"rules",get:function(){var u=this.props.constructor.Rules;return u?new u(this.props):{}}}]),t}();He.controlName="\u63A7\u4EF6",He.controlIcon="icon",He.controlType="control",He.controlEventKeys=[],He.controlCustomEvents=[],He.setting=[],He.__is_control__=!0,He.removeSettingItem=Mu,He.updateSettingItem=Nu;function Mu(e){var t=this,n=Array.isArray(e)?e:[e];n.forEach(function(r){var u=typeof r!="string",o=t.setting.findIndex(function(c){return c.key===(u?r.key:r)});if(o!==-1){var a,l;u?t.setting[o].showItems=(a=t.setting[o].showItems)===null||a===void 0?void 0:a.filter(function(c){return!r.hideItems.includes(c)}):t.setting.splice(o,1),u&&!(!((l=t.setting[o].showItems)===null||l===void 0)&&l.length)&&t.setting.splice(o,1)}})}function Nu(e,t){var n=this,r=typeof e=="string"?[e]:e;r.forEach(function(u){var o=n.setting.find(function(d){return d.key===u});if(o){if(typeof t=="boolean")o.visible=t;else if(typeof t=="object"){var a,l=(a=t.type)!==null&&a!==void 0?a:"replace";if(l==="replace")o.showItems=t.showItems;else{var c;(c=o.showItems).push.apply(c,ar(t.showItems))}}}})}function dl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function pl(e,t,n){return t&&_u(e.prototype,t),n&&_u(e,n),e}function Dl(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var yt=function(){function t(n){dl(this,t),this.customEvents=[],this.parent=null;var r=Dl(this,t)?this.constructor:void 0,u=r.controlType,o=r.controlFieldType,a=r.name,l=r.controlCustomEvents;u||nu("The ".concat(a," controlType is not define"));var c;this.id=(c=n==null?void 0:n.id)!==null&&c!==void 0?c:qn(10);var d;this.type=(d=n==null?void 0:n.type)!==null&&d!==void 0?d:u,this.props=new lt(n==null?void 0:n.props),this.customEvents=l;var f;this.controlType=(f=n==null?void 0:n.controlType)!==null&&f!==void 0?f:"base";var s;this.fieldType=(s=n==null?void 0:n.fieldType)!==null&&s!==void 0?s:o;var h;this.pageStatus=(h=n==null?void 0:n.pageStatus)!==null&&h!==void 0?h:Gn.UNKNOWN}return pl(t,[{key:"rules",get:function(){var r=this.props.constructor.RuntimeRules;if(r){var u=new r(this.props);return Array.from(u)}return[]}}]),t}();yt.controlType="control",yt.__is_control__=!0,yt.controlCustomEvents=[];function gl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function sr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ln(e){return ln=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},ln(e)}function cr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&fr(e,t)}function vl(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function ml(e,t){return t&&(yl(t)==="object"||typeof t=="function")?t:gl(e)}function fr(e,t){return fr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},fr(e,t)}var yl=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function El(){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(e){return!1}}function lr(e){var t=El();return function(){var r=ln(e),u;if(t){var o=ln(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return ml(this,u)}}var Al=function(e){cr(n,e);var t=lr(n);function n(r){sr(this,n);var u;u=t.call(this,r),u.dataBind={},u.caption={type:"string",required:!0,message:$e.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:$e.getMessage("pleaseEnterCaptionTip")};var o={fieldCode:{type:"string",required:!0,message:$e.getMessage("pleaseEnterFieldCode")},dataCode:{type:"string",required:!0,message:$e.getMessage("pleaseEnterFieldCode")}};if(vl(r.dataBind,Pt))u.dataBind={type:"object",required:!0,fields:G(o),message:$e.getMessage("pleaseEnterFieldCode")};else{var a={type:"object",required:!0,fields:{},message:$e.getMessage("pleaseEnterFieldCode")};Object.keys(r.dataBind).forEach(function(l){a.fields[l]={type:"object",required:!0,fields:G(o),message:$e.getMessage("pleaseEnterFieldCode")}}),u.dataBind=a}return r.isShowCaptionTip&&(u.captionTip.required=!0),u}return n}(du),Cl=function(e){cr(n,e);var t=lr(n);function n(r){sr(this,n);var u;return u=t.call(this,r),u.push({type:"string",required:r.isHide?!1:r.required,message:r.requiredMessage!==""?r.requiredMessage:$e.getMessage("runtimeRequired",{caption:r.caption})}),u}return n}(pu),hr=function(e){cr(n,e);var t=lr(n);function n(r){sr(this,n);var u;u=t.call(this,r);var o;u.caption=(o=r==null?void 0:r.caption)!==null&&o!==void 0?o:"";var a;u.isHideCaption=(a=r==null?void 0:r.isHideCaption)!==null&&a!==void 0?a:!1;var l;u.isShowCaptionTip=(l=r==null?void 0:r.isShowCaptionTip)!==null&&l!==void 0?l:!1;var c;u.captionTip=(c=r==null?void 0:r.captionTip)!==null&&c!==void 0?c:"";var d;u.defaultState=(d=r==null?void 0:r.defaultState)!==null&&d!==void 0?d:"default";var f;u.labelPosition=(f=r==null?void 0:r.labelPosition)!==null&&f!==void 0?f:"top";var s;u.placeholder=(s=r==null?void 0:r.placeholder)!==null&&s!==void 0?s:"";var h;u.required=(h=r==null?void 0:r.required)!==null&&h!==void 0?h:!1;var p;u.requiredMessage=(p=r==null?void 0:r.requiredMessage)!==null&&p!==void 0?p:"",u.dataBind=new Pt(r==null?void 0:r.dataBind);var D;return u.defaultValue=(D=r==null?void 0:r.defaultValue)!==null&&D!==void 0?D:"",u}return n}(lt);hr.Rules=Al,hr.RuntimeRules=Cl;function Fl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function wl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hn(e){return hn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},hn(e)}function Bl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&dr(e,t)}function bl(e,t){return t&&(Sl(t)==="object"||typeof t=="function")?t:Fl(e)}function dr(e,t){return dr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},dr(e,t)}var Sl=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Ml(){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(e){return!1}}function Nl(e){var t=Ml();return function(){var r=hn(e),u;if(t){var o=hn(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return bl(this,u)}}var ze=function(e){Bl(n,e);var t=Nl(n);function n(r){wl(this,n);var u;return u=t.call(this,r),u.controlType="form",u.props=new hr(r==null?void 0:r.props),u}return n}(yt);function _l(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Il(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dn(e){return dn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},dn(e)}function Ol(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&pr(e,t)}function Rl(e,t){return t&&(xl(t)==="object"||typeof t=="function")?t:_l(e)}function pr(e,t){return pr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},pr(e,t)}var xl=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function $l(){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(e){return!1}}function Pl(e){var t=$l();return function(){var r=dn(e),u;if(t){var o=dn(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return Rl(this,u)}}var Iu=function(e){Ol(n,e);var t=Pl(n);function n(r){return Il(this,n),t.call(this,r)}return n}(lt);function Dr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Tl(e){if(Array.isArray(e))return Dr(e)}function Ll(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function jl(){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 Ou(e){return Tl(e)||Ll(e)||ql(e)||jl()}function ql(e,t){if(!!e){if(typeof e=="string")return Dr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Dr(e,t)}}function kl(e,t){var n;!((n=Object.getOwnPropertyDescriptors(e)[t])===null||n===void 0)&&n.enumerable&&Object.defineProperty(e,t,{enumerable:!1})}function Ru(e,t){e.parent=t,kl(e,"parent")}function Vl(e,t){e.forEach(function(n){Ru(n,t)})}var xu=Symbol("targetKey");function $u(e){var t;return(t=e[xu])!==null&&t!==void 0?t:e}function Pu(e,t){return Vl(e,t),new Proxy(e,{get:function(r,u){for(var o=arguments.length,a=new Array(o>2?o-2:0),l=2;l<o;l++)a[l-2]=arguments[l];var c;return u===xu?r:(c=Reflect).get.apply(c,[r,u].concat(Ou(a)))},set:function(r,u,o){for(var a=arguments.length,l=new Array(a>3?a-3:0),c=3;c<a;c++)l[c-3]=arguments[c];var d;if(vt(e)&&u==="length"&&o===e.length)return!0;var f=(d=Reflect).set.apply(d,[r,u,o].concat(Ou(l)));return ke(o)&&Ru(o,t),f}})}function pn(e,t,n,r){var u=r!=null?r:e,o=Pu($u(n!=null?n:[]),u);Object.defineProperty(e,t,{get:function(){return o},set:function(l){o=Pu($u(l),u)},enumerable:!0})}function gr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ul(e){if(Array.isArray(e))return gr(e)}function Tu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Lu(e,t,n,r,u,o,a){try{var l=e[o](a),c=l.value}catch(d){n(d);return}l.done?t(c):Promise.resolve(c).then(r,u)}function Hl(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var o=e.apply(t,n);function a(c){Lu(o,r,u,a,l,"next",c)}function l(c){Lu(o,r,u,a,l,"throw",c)}a(void 0)})}}function zl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Wl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Et(e,t,n){return typeof Reflect!="undefined"&&Reflect.get?Et=Reflect.get:Et=function(u,o,a){var l=t0(u,o);if(!!l){var c=Object.getOwnPropertyDescriptor(l,o);return c.get?c.get.call(a):c.value}},Et(e,t,n||e)}function nt(e){return nt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},nt(e)}function Zl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&vr(e,t)}function Xl(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Jl(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Gl(){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 Kl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable}))),r.forEach(function(u){Wl(e,u,n[u])})}return e}function Ql(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function Yl(e,t){return t=t!=null?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):Ql(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function e0(e,t){return t&&(n0(t)==="object"||typeof t=="function")?t:Tu(e)}function vr(e,t){return vr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},vr(e,t)}function t0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=nt(e),e!==null););return e}function ju(e){return Ul(e)||Jl(e)||r0(e)||Gl()}var n0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function r0(e,t){if(!!e){if(typeof e=="string")return gr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gr(e,t)}}function u0(){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(e){return!1}}function i0(e){var t=u0();return function(){var r=nt(e),u;if(t){var o=nt(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return e0(this,u)}}var o0=1e4,qu=function(t){Zl(r,t);var n=i0(r);function r(o){zl(this,r);var a;a=n.call(this,o),a.controlType="layout";var l=Xl(this,r)?this.constructor:void 0,c=l.excludes,d=l.childrenMaxLength;return a.props=new Iu(o==null?void 0:o.props),pn(Tu(a),"children",o==null?void 0:o.children),a.excludes=G(c),a.childrenMaxLength=d,a}var u=r.prototype;return u.judgeExcludesChildren=function(a){return this.excludes===!1||Array.isArray(this.excludes)&&!this.excludes.includes(a)},u.judgeJoinChildren=function(a){var l=this.judgeExcludesChildren(a);return l&&this.childrenMaxLength>this.children.length},u.validate=function(a,l){var c=this,d=this,f=function(){return Et(nt(r.prototype),"validate",c)};return Hl(Re.default.mark(function s(){return Re.default.wrap(function(p){for(;;)switch(p.prev=p.next){case 0:return p.next=2,f().call(d,a,l);case 2:return p.next=4,Promise.all(d.children.map(function(D){return D.validate(a,l)}));case 4:return p.abrupt("return",!0);case 5:case"end":return p.stop()}},s)}))()},u.toDataBindModel=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,l=Et(nt(r.prototype),"toDataBindModel",this).call(this),c=l?[l]:[];return this.children.reduce(function(d,f){var s=f.toDataBindModel(a);if(Array.isArray(s)){var h=s.filter(function(p){return!!p});return ju(d).concat(ju(h))}return s&&d.push(s),d},c)},u.toSchema=function(){var a=Et(nt(r.prototype),"toSchema",this).call(this),l=this.children.map(function(c){var d=c.toSchema();return d});return Yl(Kl({},a),{children:l})},r}(He);qu.excludes=!1,qu.childrenMaxLength=o0;function ku(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dn(e){return Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Dn(e)}function s0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&mr(e,t)}function c0(e,t){return t&&(f0(t)==="object"||typeof t=="function")?t:ku(e)}function mr(e,t){return mr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},mr(e,t)}var f0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function l0(){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(e){return!1}}function h0(e){var t=l0();return function(){var r=Dn(e),u;if(t){var o=Dn(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return c0(this,u)}}var d0=function(e){s0(n,e);var t=h0(n);function n(r){a0(this,n);var u;return u=t.call(this,r),u.controlType="layout",u.props=new Iu(r==null?void 0:r.props),pn(ku(u),"children",r==null?void 0:r.children),u}return n}(yt);function Vu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gn(e){return gn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},gn(e)}function D0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&yr(e,t)}function g0(e,t){return t&&(v0(t)==="object"||typeof t=="function")?t:Vu(e)}function yr(e,t){return yr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},yr(e,t)}var v0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function m0(){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(e){return!1}}function y0(e){var t=m0();return function(){var r=gn(e),u;if(t){var o=gn(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return g0(this,u)}}var E0=function(e){D0(n,e);var t=y0(n);function n(r,u){p0(this,n);var o;return o=t.call(this,u),pn(Vu(o),"headers",u==null?void 0:u.headers,r),o}return n}(lt);z.LIST;function Er(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function A0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Uu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function C0(e,t,n){return t&&Uu(e.prototype,t),n&&Uu(e,n),e}function vn(e){return vn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},vn(e)}function F0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ar(e,t)}function w0(e,t){return t&&(B0(t)==="object"||typeof t=="function")?t:Er(e)}function Ar(e,t){return Ar=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Ar(e,t)}var B0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function b0(){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(e){return!1}}function S0(e){var t=b0();return function(){var r=vn(e),u;if(t){var o=vn(this).constructor;u=Reflect.construct(r,arguments,o)}else u=r.apply(this,arguments);return w0(this,u)}}var mn=function(e){F0(n,e);var t=S0(n);function n(r){A0(this,n);var u;return u=t.call(this,r),u.controlType="list",u.props=new E0(Er(u),r==null?void 0:r.props),pn(Er(u),"children",r==null?void 0:r.children),u}return C0(n,[{key:"length",get:function(){return this.children.length}}]),n}(yt);function yn(e){return e.controlType===qe.LAYOUT||e.controlType===qe.WRAP||e.controlType===qe.LIST||e.controlType===qe.SEARCH}function kt(e,t){Array.isArray(e)&&e.map(n=>{if(n.type===J.SUBTABLE){const r=n.getChildrenFormControl();t(n,r)}else yn(n)?kt(n==null?void 0:n.children,t):n instanceof ze&&t(n)})}function Vt(e,t){Array.isArray(e)&&e.map(n=>{n.type===J.DATA_VIEW||n.type===J.SIMPLE_SEARCH?t(n):yn(n)&&Vt(n==null?void 0:n.children,t)})}class Cr extends nn{constructor(t){super("Runtime"),this._flatInstances=[],this._instanceMap={};const{schema:n}=t;this._schema=n,this._instance=this.createControl(n,t.beforeCreateInstance),this.getFlatInstances()}getFlatInstances(){const t=[],n={};return Hu(this._instance,r=>{t.push(r),n[r.id]||(n[r.id]=[]),n[r.id].push(r)}),this._flatInstances=t,this._instanceMap=n,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 t={};return Vt(this._instance,n=>{t[n.id]=n.rules[0],kt(n.children,r=>{(r instanceof ze||r instanceof mn)&&M0(t[n.id].fields,r)})}),t}get antdRules(){let t={};return Vt(this._instance,n=>{t[n.id]=n.rules[0],kt(n.children,r=>{(r instanceof ze||r instanceof mn)&&N0(t[n.id].fields,r)})}),t}}function Hu(e,t){Array.isArray(e)?e.map(n=>{t(n),yn(n)&&Hu(n.children,t)}):t(e)}function Fr(e){return e.props.isHide?!0:e.parent===null?!1:Fr(e.parent)}function M0(e,t){if(!Fr(t)){if(t instanceof ze)e[t.id]=t.rules;else if(t.type===J.SUBTABLE){e[t.id]=t.rules;const n={type:"array",fields:{}};t.children.forEach((r,u)=>{ct(r.children,o=>{n.fields&&(n.fields[u]||(n.fields[u]={type:"object",required:!0,fields:{}}),n.fields[u].fields[o.id]=o.rules)})}),e[t.id].push(n)}}}function N0(e,t){Fr(t)||(t instanceof ze?e[t.id]=t.rules:t.type===J.SUBTABLE&&t.children.length&&(e[t.id]=[],t.children.forEach(n=>{let r={};ct(n.children,u=>{r[u.id]=u.rules}),e[t.id].push(r)})))}class _0{constructor(t){const{state:n,emptyState:r,databindMapping:u,controlidMapping:o,fieldCodeState:a}=I0(t.instance);this.emptyState=r,this.state=n,this.fieldCodeState=a,this.dataBindMapping=u,this.controlIdMapping=o}setState(t,n,r){const u=this.controlIdMapping[t];u!==void 0?this.state[u.dataView][t]=n:r!==void 0?Object.keys(this.controlIdMapping).map(o=>{const a=this.controlIdMapping[o].dataView,l=this.controlIdMapping[o].children;l!==void 0&&Object.keys(l).map(c=>{c===t&&(this.state[a][o][r][t]=n)})}):this.state[t]=n}getState(t,n){if(this.state[t]!==void 0)return this.state[t];{const u=this.controlIdMapping[t];if(u!==void 0)return this.state[u.dataView][t];if(n!==void 0){let o;return Object.keys(this.controlIdMapping).map(a=>{const l=this.controlIdMapping[a].dataView,c=this.controlIdMapping[a].children;c!==void 0&&Object.keys(c).map(d=>{var f;d===t&&(o=(f=this.state[l][a][n])==null?void 0:f[t])})}),o}else{let o=[];return Object.keys(this.controlIdMapping).map(a=>{const l=this.controlIdMapping[a].dataView,c=this.controlIdMapping[a].children;c!==void 0&&Object.keys(c).map(d=>{d===t&&this.state[l][a].map(f=>{o.push(f[t])})})}),o}}}getFieldCodeState(t){if(this.fieldCodeState[t]!==void 0)return this.fieldCodeState[t];{const r=this.controlIdMapping[t];if(r.dataBind.dataCode,r!==void 0){if(r.dataView===t)return this.fieldCodeState[t];{const u=r.dataBind.dataCode;return this.fieldCodeState[r.dataView][u]||this.fieldCodeState[r.dataView]}}}}getEmptyState(t){if(this.emptyState[t]!==void 0)return this.emptyState[t];{const r=this.controlIdMapping[t];if(r!==void 0)return this.emptyState[r.dataView][t];{let u;return Object.keys(this.controlIdMapping).map(o=>{const a=this.controlIdMapping[o].dataView,l=this.controlIdMapping[o].children;l!==void 0&&Object.keys(l).map(c=>{c===t&&(u=this.emptyState[a][o][t])})}),u}}}getDataBind(t){let n=this.controlIdMapping[t];if(n)return n.dataBind;e:for(let r in this.controlIdMapping){const u=this.controlIdMapping[r];if(u.children){for(let o in u.children)if(o===t){n=u.children[o];break e}}}return n==null?void 0:n.dataBind}}function I0(e){let t={},n={},r={},u={},o={},a={};return Vt(e,l=>{const c=l.id,d={},f={},s={},h={};kt([l],(p,D)=>{O0(d,f,s,h,p),R0(o,c,p),x0(a,c,p)}),t[c]=d,n[c]=f,r[c]=s,u[c]=h}),{state:t,emptyState:n,databindMapping:o,controlidMapping:a,fieldCodeState:r,fieldCodeEmptyState:u}}function O0(e,t,n,r,u){var o,a;if(u instanceof ze)if(e[u.id]=G(u.props.defaultValue),t[u.id]=G(u.props.defaultValue),u.props.dataBind instanceof Ve)Object.keys(u.props.dataBind).forEach(function(l){const c=u.props.dataBind,d=u.props.defaultValue;let f=c[l].fieldCode;n[f]=G(d[l]),r[f]=G(d[l])});else{let l=u.props.dataBind.fieldCode;n[l]=G(u.props.defaultValue),r[l]=G(u.props.defaultValue)}else{const l={},c={};ct(u.props.headers,f=>{l[f.id]=G(f.props.defaultValue);const s=f.props.dataBind.fieldCode;f.props.dataBind instanceof Ve?Object.keys(f.props.dataBind).forEach(function(h){c[f.props.dataBind[h].fieldCode]=G(f.props.defaultValue[h])}):c[s]=G(f.props.defaultValue)}),e[u.id]=new Array((o=u.props.defaultRows)!=null?o:1).fill(0).map(()=>G(l)),t[u.id]=l;const d=u.props.datasourceBind.dataCode;n[d]=new Array((a=u.props.defaultRows)!=null?a:1).fill(0).map(()=>G(c)),r[d]=c}}function R0(e,t,n){if(n instanceof ze)n.props.dataBind instanceof Ve?Object.keys(n.props.dataBind).map(r=>{const u=n.props.dataBind,o=u[r].dataCode;o!==void 0&&(e[o]===void 0&&(e[o]={controlId:n.id,fields:[],dataViewId:t}),e[o].fields.push({fieldCode:u[r].fieldCode,controlId:n.id,dataBind:u,dataViewId:[t]}))}):(e[n.props.dataBind.dataCode]===void 0&&(e[n.props.dataBind.dataCode]={controlId:t,fields:[],dataViewId:t}),e[n.props.dataBind.dataCode].fields.push({fieldCode:n.props.dataBind.fieldCode,controlId:n.id,dataBind:n.props.dataBind,dataViewId:[t]}));else{if(n.props.datasourceBind.dataCode===""){Ye(`datasourceBind.dataCode is empty! maybe in preview mode, control:${n.id} type:${n.type}`);return}e[n.props.datasourceBind.dataCode]={controlId:n.id,fields:[],dataViewId:t};const r=n.id;ct(n.props.headers,u=>{u.props.dataBind instanceof Ve?Object.keys(u.props.dataBind).map(o=>{const a=u.props.dataBind,l=a[o].dataCode;e[l].fields.push({fieldCode:a[o].fieldCode,controlId:u.id,dataBind:a,dataViewId:[t,r]})}):e[u.props.dataBind.dataCode].fields.push({fieldCode:u.props.dataBind.fieldCode,controlId:u.id,dataBind:u.props.dataBind,dataViewId:[t,r]})})}}function x0(e,t,n){n instanceof ze?e[n.id]={dataBind:n.props.dataBind,options:[],dataView:t}:n.type===J.SUBTABLE&&(e[n.id]={dataBind:new Pt({dataCode:n.props.datasourceBind.dataCode,fieldCode:""}),dataView:t,children:{},options:[]},ct(n.props.headers,r=>{var u,o;Object.assign((o=(u=e[n.id])==null?void 0:u.children)!=null?o:{},{[r.id]:{dataBind:r.props.dataBind}})}))}const zu=["splice","push","shift","pop","unshift","reverse"],wr=Symbol("__engineProxy__"),Br=Symbol("__engineTarget__"),Wu=Symbol("__engineArrayBeforeSetCallbackFlag__"),Zu=Symbol("__engineProxyThisKey__"),Pe={type:"",args:[],callback:Xu};function Xu(){}j0();function $0(e,t,n,r,u){if(Pe.type){Pe.callback=u.bind(null,e,r);return}const o=Number(t);if(o>e.length){Ge(`Wrong array operations may cause unknown errors. It is recommended to use APIs such as ${zu.join(",")} for array operations`);return}if(!(Number.isNaN(o)&&t!=="length"))if(t==="length"){const l=n,c=e.length;if(l>e.length){Ge("Do not directly modify the length of the array data, please add new rows");return}return l===e.length?void 0:()=>u.call(null,e,r,"splice",[l,c-l])}else return o===e.length?()=>u.call(null,e,r,"push",[n]):()=>u.call(null,e,r,"splice",[o,1,n])}function P0(e,t,n){return{__engineProxy__:!0,get(r,u,o){return u===wr?!0:u===Br?r:Array.isArray(r)&&u===Wu?n:u===Zu?e:Reflect.get(r,u,o)},set(r,u,o,a){var h;let l=o;const c=r[u],d=e===""?u:e+"."+u;function f(p){if(typeof p=="object"&&p!==null)return p[wr]!==!0?En(p,t,n,d):En(p[Br],t,n,d)}l=(h=f(o))!=null?h:l;let s;if(Array.isArray(r)){const p=$0(r,u,o,e,t);s=Reflect.set(r,u,l,a),p&&p()}else{try{let p=l;if(l=n.call(null,r,d,l,c),p!==l){const D=f(l);D!==void 0&&(l=D)}}catch(p){return Yt(`${d} set error ${p}`),!0}s=Reflect.set(r,u,l,a),t.call(null,r,d,o,c)}return s}}}function En(e,t,n,r=""){if(Object.isFrozen(e))return e;for(let u in e){const o=r===""?u:r+"."+u,a=e[u];typeof a=="object"&&a!==null&&(e[u]=En(a,t,n,o))}return new Proxy(e,P0(r,t,n))}function Ju(e){const t=[];return e.forEach(n=>{t.push(n),n.controlType==="layout"&&t.push(...Ju(n.children))}),t}function br(e,t){if(t==="")return;const n=t.split(".");if(n.length===0)return;const r=n[0],u=n.slice(1),o=e.find(a=>a.id===r);return u.length===0?o:u.reduce((a,l)=>{var f,s;const c=Number(l);if(Number.isNaN(c)){const h=a!=null&&a.children?Ju(a.children):void 0,p=h==null?void 0:h.find(D=>D.id===l);return p||(a instanceof ze?a:void 0)}else return(s=(f=a==null?void 0:a.children)==null?void 0:f[c])!=null?s:a},o)}function T0(e,t){return["push","unshift"].includes(e)?t:e==="splice"?t.slice(2):[]}function L0(e,t,n){if(["push","unshift"].includes(e))return n;if(e==="splice")return t.slice(0,2).concat(n)}function j0(){zu.forEach(e=>{const t=Array.prototype[e];Array.prototype[e]=function(...n){var r;if(this[wr]){let u;const o=T0(e,n);if(o.length){const a=(r=this[Wu])==null?void 0:r.call(this,this[Br],this[Zu],o),l=L0(e,n,a);Pe.type=e,Pe.args=l,u=t.apply(this,l)}else Pe.type=e,Pe.args=n,u=t.apply(this,n);return typeof Pe.callback=="function"&&Pe.callback(e,n,u),Pe.type="",Pe.args=[],Pe.callback=Xu,u}else return t.apply(this,n)}})}class q0{constructor(){this.actionMap=new Map,this.buildinActions={},this.actionUtils={},this.sources={}}execAction(t,n,...r){return Xe(this,null,function*(){const u=this.actionMap.get(t);if(!!u)try{return yield u.func.call(null,n,...r)}catch(o){Yt(`${u.id} Exception during calling action: ${o}`)}})}addAction(t,n){this.actionMap.has(t)&&Ge("duplicated action key");const r=new k0(t,n);this.actionMap.set(t,r)}}class k0{constructor(t,n){this.id="",this.id=t,this.func=n}}class V0{constructor(t){this._dataStore=new Map,this.executer=t}add(t,n){this._dataStore.set(t,n)}get(t){let n=this._dataStore.get(t);return G(n)}remove(t){this._dataStore.delete(t)}getRemoteData(t){return Xe(this,null,function*(){return this.executer===void 0?(Yt("\u672A\u521D\u59CB\u5316executer"),[]):this.executer(t)})}}class rt{}class Ut extends rt{validate(t){return be(t)}transform(t){if(t==null)return"";if(!ke(t)&&!ou(t))return String(t);if(af(t))return JSON.stringify(t);throw`${t} is not a string`}}class Sr extends rt{validate(t){return en(t)||t===""}transform(t){if(t==null)return"";const n=!ke(t)&&!ou(t)?Number(t):void 0;if(!Number.isNaN(n)&&n!==void 0)return n;throw`${t} is not a number`}}class U0 extends rt{validate(t){return sf(t)}transform(t){if(t==null)return[];function n(r){return r.map(u=>u?String(u):"")}if(vt(t))return n(t);if(be(t)&&au(t))try{const r=JSON.parse(t);if(Array.isArray(r))return n(r)}catch(r){}return[String(t)]}}class H0 extends rt{validate(t){return cf(t)}transform(t){if(t==null)return[];function n(u){return u.map(o=>!o&&o!==0?"":Number(o)).filter(o=>o===""||!Number.isNaN(o))}if(vt(t))return n(t);if(be(t)&&au(t))try{const u=JSON.parse(t);if(vt(u))return n(u)}catch(u){}const r=Number(t);if(Number.isNaN(r))throw`${t} is not a number array`;return[r]}}class z0 extends rt{validate(t){return t instanceof rn||ke(t)&&"amount"in t&&en(t.amount)&&"currency"in t&&be(t.currency)}transform(t,n){if(t==null||t==="")return new rn({currency:n==null?void 0:n.currency});let r;if(ke(t)&&(r=new rn(ae(ae({},n),t))),be(t)&&tn(t))try{const u=JSON.parse(t);r=new rn(ae(ae({},n),u))}catch(u){}if(r){const u=new Sr,o=new Ut;return u.validate(r.amount)||(r.amount=u.transform(r.amount)),o.validate(r.currency)||(r.currency=o.transform(r.currency)),r}throw`${t} is not a { amount: number, currency: string } object`}}class W0 extends rt{validate(t){return t instanceof un||ke(t)&&"min"in t&&be(t.min)&&"max"in t&&be(t.max)}transform(t,n){if(t==null||t==="")return new un;let r;if(ke(t)&&(r=new un(ae(ae({},n),t))),be(t)&&tn(t))try{const u=JSON.parse(t);r=new un(ae(ae({},n),u))}catch(u){}if(r){const u=new Ut;return u.validate(r.min)||(r.min=u.transform(r.min)),u.validate(r.max)||(r.max=u.transform(r.max)),r}throw`${t} is not a { min: string, max: string } object`}}class Z0 extends rt{validate(t){return t instanceof an||ke(t)&&"result"in t&&en(t.result)&&"unit"in t&&be(t.unit)}transform(t,n){if(t==null||t==="")return new an({unit:n==null?void 0:n.unit});let r;if(ke(t)&&(r=new an(ae(ae({},n),t))),be(t)&&tn(t))try{const u=JSON.parse(t);r=new an(ae(ae({},n),u))}catch(u){}if(r){const u=new Sr,o=new Ut;return u.validate(r.result)||(r.result=u.transform(r.result)),o.validate(r.unit)||(r.unit=o.transform(r.unit)),r}throw`${t} is not a { result: string, unit: string } object`}}class X0 extends rt{validate(t){return t instanceof on}transform(t,n){if(t==null||t==="")return new on;let r;if(ke(t)&&(r=new on(ae(ae({},n),Wn.exports.camelizeKeys(t)))),be(t)&&tn(t))try{const u=JSON.parse(t);r=new on(ae(ae({},n),Wn.exports.camelizeKeys(u)))}catch(u){}if(r){const u=new Ut;return u.validate(r.city)||(r.city=u.transform(r.city)),u.validate(r.district)||(r.district=u.transform(r.district)),u.validate(r.province)||(r.province=u.transform(r.province)),r}throw`${t} is not a { city: string, district: string, province: string } object`}}class J0{static getValueChecker(t){let n;switch(t){case z.VARCHAR:case z.TIMESTAMP:case z.TEXT:case z.RELATION:case z.AUTO_NUMBER:n=new Ut;break;case z.DECIMAL:n=new Sr;break;case z.EMPLOYEES:case z.DEPARTMENTS:case z.IMAGE:case z.FILE:case z.ARRAY:n=new U0;break;case z.MONEY:n=new z0;break;case z.TIMESCOPE:n=new W0;break;case z.CALC:n=new Z0;break;case z.DECIMAL_RANGE:n=new H0;break;case z.ADDRESS:n=new X0;break}return n}}function G0(e){if(["min","max","currency","unit"].includes(e))return z.VARCHAR;if(["result","amount"].includes(e))return z.DECIMAL}function Gu(e,t,n,r){var a;let u=(a=G0(t))!=null?a:e,o=J0.getValueChecker(u);if(!o||o.validate(n))return n;try{const l=o.transform(n,r);return l!==void 0?l:n}catch(l){throw`${t} ${l}`}}function K0(e,t,n){return Object.entries(e).reduce((r,[u,o])=>{const a=t[u];return r[u]=Gu(o,u,a,n[u]),r},Object.assign({},t))}typeof window!="undefined"&&(window.engines={});let At=null,Ht="";class Mr extends cu{constructor(t){super(),this.isMounted=!1,this.id=qn(8),this.__pluginsApplied=!1,this.actionManager=new q0,this._jobTasks=[],this.createControlInstance=this.createInstance,this.$options=Object.freeze(t);const{autoMount:n=!0,schema:r,beforeCreateInstance:u,externalParams:o,language:a=Jr,debug:l=!1}=this.$options;$e.setLocale(a),this.debug=l,this.runtime=new Cr({schema:r,beforeCreateInstance:u}),this.externalParams=o,this.store=new _0({instance:this.runtime.instance}),this.debugLog("engine is Instantiation complete"),n&&this.mount()}debugLog(...t){this.debug&&Hn(...t)}use(t){return this.__pluginsApplied||this.__plugins.push(t),this}registerControl(...t){return this.runtime.register(...t),this}static register(...t){return Cr.register(...t)}static judgeControlIsRegistered(t){return Cr.staticRegisteredTypes.has(t.Runtime.controlType)}mount(){this.debugLog("engine\u7684mount\u65B9\u6CD5\u5F00\u59CB\u8C03\u7528");const{plugins:t=[]}=this.$options;this._handlerProxyState(),this.__plugins=t,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=En(this.store.state,this._proxyStateCallback.bind(this),this._proxyStateBeforeSetCallback.bind(this))}_proxyStateBeforeSetCallback(t,n,r,u){const o=br(this.runtime.flatInstances,n);if(!o)return r;if(this.assertInstance(o,J.SUBTABLE)){const c=o.props.headers.reduce((d,f)=>{const s=f.children[0];return s&&s instanceof ze&&(d[s.id]=s.fieldType),d},{});return r===null?[]:r.map(d=>K0(c,d,this.getEmptyState(o.id)))}const a=n.split("."),l=a[a.length-1];try{return Gu(o.fieldType,l,r,u)}catch(c){throw Ye(`the id=${o.id}'s instance setState error, %o ${c}.`,r),c}}_proxyStateCallback(t,n,r,u,o){Array.isArray(t)?this._handlerArrayUpdate(t,n,r,u,o):this._handlerObjectUpdate(t,n,r,u)}_handlerArrayUpdate(t,n,r,u,o){const a=br(this.runtime.flatInstances,n);if(!(a instanceof mn))return;const l=h=>{const p=[];for(let D=0;D<h;D++){const g=this.listControlCreateRow(a,"subtable-row");g&&p.push(g)}return p},c=At;let d=[],f=[],s=[];if(r&&u){switch(r){case"push":case"unshift":const h=u.length;d=l(h),f=u,a.children[r](...d),this.runtime.getFlatInstances();break;case"splice":if(u.length>2){const p=u.length-2,D=u.slice(2);d=l(p),f=D;const g=u[0],y=u[1];a.children[r](g,y,...d),this.runtime.getFlatInstances()}else a.children[r](...u),this.runtime.getFlatInstances();break;default:a.children[r](...u),this.runtime.getFlatInstances();break}r==="splice"?s=o:["pop","shift"].includes(r)&&(s=[o]),this.emit("list-change",{instance:a,value:this.getState(a.id),options:Object.assign({},c,{changed:d,data:f,deleted:s!=null?s:[]})}),At=null}}_handlerObjectUpdate(t,n,r,u){const o=br(this.runtime.flatInstances,n);if(!o)return;const a=this.getInstanceRowIndex(o),l=At||{};if(o instanceof mn){o.children.length=0;const c=r;let d=[];for(let f=0;f<c.length;f++){const s=this.listControlCreateRow(o,"subtable-row");s&&d.push(s)}o.children.push(...d),this.runtime.getFlatInstances(),this.emit("list-change",{instance:o,value:r,options:Xr(ae({},l),{changed:d,data:c,deleted:u!=null?u:[]})})}else this.emit("change",{instance:o,value:this.getState(o.id,a),rowIndex:a,options:Xr(ae({},l),{oldValue:u})})}applyPlugins(){this.__pluginsApplied||(this.__plugins.forEach(t=>{var n;try{Ht=(n=t.pluginName)!=null?n:t.constructor.name,t.apply(this)}catch(r){Ge(`${Ht} Plugin apply Error
|
|
2
|
-
${r}`)}finally{Ht=""}}),this.__pluginsApplied=!0)}listControlCreateRow(t,n){const r=this.runtime.createControlInstance(n);if(!!r){if(r instanceof d0){const u=G(t.props.headers),o=this.createControl(u);r.children.push(...o)}return r}}listControlAddRow(t,n="subtable-row"){const r=this.listControlCreateRow(t,n);!r||t.children.push(r)}emit(t,n){return Xe(this,null,function*(){if(t==="engine-mounted"){if(this.isMounted)return Ye("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 r,u;this.isMounted||(u=new Promise(a=>{r=a}),this._jobTasks.push(u));const o=yield fo(Mr.prototype,this,"emit").call(this,t,n);return r&&u&&(r(),this._jobTasks.splice(this._jobTasks.indexOf(u),1)),o})}on(t,n){return Ht&&(n.applyingPluginName=Ht),super.on(t,n)}createControl(...t){return this.runtime.createControl(...t)}createInstance(t,n){return this.runtime.createControlInstance(t,n)}schemaEvent(t,n){this.emit(t,n)}updateInstanceProps(t,n,r,u){return this.setInstance(t,n,r,u)}getRules(t){var n;return t===void 0?this.runtime.rules:(n=this.runtime.rules[t])==null?void 0:n.fields}getAntdRules(t){var n;return t===void 0?this.runtime.antdRules:(n=this.runtime.antdRules[t])==null?void 0:n.fields}getState(t,n){return t===void 0?this.store.state:this.store.getState(t,n)}getFieldCodeState(t){return t===void 0?this.store.fieldCodeState:this.store.getFieldCodeState(t)}getEmptyState(t){return G(t===void 0?this.store.emptyState:this.store.getEmptyState(t))}setPayloadOptions(t){At=t}setState(t,n,r,u){At=u,this.debugLog("[%o]: \u89E6\u53D1setState, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o, options=%o",t,n,r,u),this.store.setState(t,n,r),this.debugLog("[%o]: setState\u5B8C\u6210, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o",t,n,r),At=null}setStates(t,n,r){let u=t;Object.keys(u).forEach(o=>{Object.entries(this.store.controlIdMapping).forEach(([a,l])=>{if(l.dataView===o){const c=u[o][a];c!==void 0&&this.setState(a,c,n,r)}else(a===o||l.children&&l.children[o])&&u[o]!==void 0&&this.setState(o,u[o],n,r)})})}getField(t,n,r){if(!n){const c=this.getDataBindMapping(t);if(c){const{controlId:d}=c;return this.getState(d)}return}const u=this.getDataBindMapping(t,n);if(!u)return;const{dataBind:o,controlId:a}=u,l=this.getState(a,r);return o instanceof Ve?Object.entries(o).reduce((c,[d,f])=>f.fieldCode===n?c[d]:c,l):l}getData(t){if(t){const n=this.getDataBindMapping(t);if(n){const{controlId:r}=n;return this.getFieldCodeState(r)}}}setField(t,n,r,u,o){var d;const a=this.getDataBindMapping(t,n);if(!a)return;const{dataBind:l,controlId:c}=a;if(l instanceof Ve){const f=(d=G(this.getState(c,u)))!=null?d:this.getEmptyState(c),s=Object.entries(l).reduce((h,[p,D])=>(D.fieldCode===n&&(h[p]=r),h),f);this.setState(c,s,u,o)}else this.setState(c,r,u,o)}setFields(t,n,r,u){const o=this.getDataBindMapping(t);if(!o)return;let a=[];o.fields.forEach(l=>{var s;const{dataBind:c,controlId:d,fieldCode:f}=l;if(!a.includes(f)&&!!Object.hasOwnProperty.call(n,f))if(c instanceof Ve){const h=(s=G(this.getState(d,r)))!=null?s:this.getEmptyState(d),p=Object.entries(c).reduce((D,[g,y])=>{a.push(y.fieldCode);const v=n[y.fieldCode];return v!==void 0&&(D[g]=v),D},h);this.setState(l.controlId,p,r,u)}else this.setState(d,n[f],r,u)})}buildFields(t,n){const r=this.getDataBindMapping(t);if(!r)return;let u=[];const o={};return r.fields.forEach(a=>{const{dataBind:l,controlId:c,fieldCode:d}=a;if(!u.includes(d)&&!!Object.hasOwnProperty.call(n,d))if(l instanceof Ve){const f=this.getEmptyState(c);o[a.controlId]=Object.entries(l).reduce((s,[h,p])=>{u.push(p.fieldCode);const D=n[p.fieldCode];return D!==void 0&&(s[h]=D),s},f)}else o[c]=n[d]}),o}setData(t,n){this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\uFF0C\u53C2\u6570\u4E3A%o\uFF0C%o\u3002",t,n);let r={};Object.keys(t).map(u=>{const o=t[u];if(Array.isArray(o))o.map(a=>{const l=this.getDataBindMapping(u);if(!l)return;let c=G(this.store.emptyState[l.dataViewId][l.controlId]),d=[];Object.keys(a).map(f=>{var h,p,D;if(d.includes(f))return;const s=(p=(h=this.store.dataBindMapping[u])==null?void 0:h.fields)==null?void 0:p.find(g=>g.fieldCode===f);if(s){if(s.dataBind instanceof Pt&&a[f]!==void 0)c[s.controlId]=a[f];else if(s.dataBind instanceof Ve){let g=G((D=this.getEmptyState(s.controlId))!=null?D:{});Object.keys(s.dataBind).map(y=>{const v=s.dataBind[y];a[v.fieldCode]!==void 0&&(g[y]=a[v.fieldCode]),d.push(v.fieldCode)}),c[s.controlId]=g}}}),r[l.dataViewId]||(r[l.dataViewId]={}),r[l.dataViewId][l.controlId]||(r[l.dataViewId][l.controlId]=[]),r[l.dataViewId][l.controlId].push(c)});else if(o){let a=[];Object.keys(o).map(l=>{var d;if(a.includes(l))return;const c=this.getDataBindMapping(u,l);if(c){if(r[c.dataViewId[0]]||(r[c.dataViewId[0]]={}),c.dataBind instanceof Pt&&o[l]!==void 0)r[c.dataViewId[0]][c.controlId]=o[l];else if(c.dataBind instanceof Ve){let f=G((d=this.getEmptyState(c.controlId))!=null?d:{});Object.keys(c.dataBind).map(s=>{const h=c.dataBind[s];o[h.fieldCode]!==void 0&&(f[s]=o[h.fieldCode]),a.push(h.fieldCode)}),r[c.dataViewId[0]][c.controlId]=f}}})}}),this.debugLog("engine setData\u65B9\u6CD5\u6570\u636E\u7EC4\u5408\u5B8C\u6210\uFF0C\u53C2\u6570\u4E3A%o\u3002",r),this.setStates(r,void 0,n),this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\u5B8C\u6210\u3002")}getDataBind(t){return this.store.getDataBind(t)}getInstance(t,n){const r=this.getInstances(t,n===-1);if(r.length>0)return n!==void 0?n===-1?r[0]:r[n]:r[0]}getInstances(t,n=!1){var u;if(t===void 0)return this.runtime.flatInstances;const r=this.runtime.flatInstances.filter(o=>o.id===t);if(n)if(r.length){const o=r[0];if(this.getInstanceRowIndex(o)!==void 0){const a=this.getInstanceInSubtableHeader(o);a&&r.unshift(a)}}else{const o=this.getControlIdMapping(),[a]=(u=Object.entries(o).find(([l,c])=>c.children&&t in c.children))!=null?u:[];if(a){const c=this.getInstance(a).props.headers.find(d=>d.children.find(f=>f.id===t));if(c){const d=c.children.find(f=>f.id===t);d&&r.unshift(d)}}}return r}setInstance(t,n,r,u){try{let o;if(typeof t=="string"?o=this.getInstance(t,u):o=t,!o)return;this.debugLog("[%o]: \u4FEE\u6539instance: %o\u7684%o\u5C5E\u6027\uFF0C\u4FEE\u6539\u7684\u503C\u4E3A%o\u3002",o.id,o,n,r),uu(o.props,n,r),this.schemaEvent("schema-change",{instance:o,props:n,value:r})}catch(o){throw o}}getControlIdMapping(){return this.store.controlIdMapping}getDataBindMapping(t,n){if(!t&&!n)return this.store.dataBindMapping;const r=this.store.dataBindMapping[t];if(!r){Ye(`No corresponding dataCode=${t} was found`);return}if(!n)return r;const u=r.fields.find(o=>o.fieldCode===n);if(!u){Ye(`No corresponding fieldCode=${n} was found`);return}return u}getAction(){return this.actionManager}initDataManager(t){this.dataManager=new V0(t)}getDataManager(){return this.dataManager}assertInstance(t,n){return be(n)?t.type===n:n.includes(t.type)}getInstanceRowIndex(t){if(!t.parent)return;let n;if(this.assertInstance(t.parent,J.SUBTABLE))if(this.assertInstance(t,J.SUBTABLE_COLUMN))n=-1;else{const r=t.parent.children.findIndex(u=>u===t);r>-1&&(n=r)}else n=this.getInstanceRowIndex(t.parent);return n}getInstanceParentControl(t,n){if(!!t.parent)return this.assertInstance(t.parent,n)?t.parent:this.getInstanceParentControl(t.parent,n)}getInstanceInSubtableHeader(t){const n=this.getInstanceRowIndex(t);if(n===void 0)return;if(n===-1)return t;const r=this.assertInstance(t,J.SUBTABLE_COLUMN)?t:this.getInstanceParentControl(t,J.SUBTABLE_COLUMN);if(!r)return;const o=this.getInstanceParentControl(t,J.SUBTABLE).props.headers.find(a=>a.id===r.id);if(!!o)return o.children.find(a=>a.id===t.id)}setControlConfig(...t){return this.runtime.registerControlConfig(...t)}getControlConfig(t){return this.runtime.getControlConfig(t)}}class Q0{}class Y0{constructor(t){this.config=t}apply(t){this.engine=t;const n=this.config;if(!n)return;const r=Ku(n,t);if(!r)return;const u=t.getAction();for(let[o,a]of Object.entries(r.funcMap))u.addAction(o,a)}}function Ku(e,t){if(!e.module||!e.module.compiled)return;const n=e.module.compiled,r={exports:{ctx:t,utils:t.getAction().actionUtils}};try{new Function("module","exports",n).call(r,r,r.exports)}catch(a){Ge(a.message+". fail to parse the module"),process.env.NODE_ENV!=="production"&&Ge("fail to parse the module")}const u={},o={};for(const[a,l]of Object.entries(r.exports))typeof l=="function"?u[a]=l:o[a]=l;return{funcMap:u,variables:o}}const eh={"engine-mounted":"did_mount","engine-submit":"will_submit","engine-submit-params":"do_submit","engine-submitted":"did_submit"};class th{constructor(t){this.config=t}apply(t){this.engine=t,Object.entries(eh).forEach(([n,r])=>{t.on(n,u=>Xe(this,null,function*(){const o=yield this.callLifecycleEvent(r,u);return o.includes(!1)?!1:o}))})}callLifecycleEvent(t,n){return Xe(this,null,function*(){const r=this.config;return!r||!Array.isArray(r[t])?[]:yield Promise.all(r[t].map(o=>Xe(this,null,function*(){return yield this.engine.getAction().execAction(o,n)})))})}}class nh{constructor(t){this.config=t}apply(t){this.engine=t,fu.events.forEach(n=>{n.code&&n.key&&this.engineAddEventListener(n.code,n.key)})}engineAddEventListener(t,n){this.engine.on(t,r=>Xe(this,null,function*(){if(!(t==="change"&&!this.engine.isMounted)&&r.instance!==void 0)return yield this.callControlEvent(n,r)}))}callControlEvent(t,n){return Xe(this,null,function*(){const r=this.config[n.instance.id];if(!r||!Array.isArray(r[t]))return[];const u=yield Promise.all(r[t].map(o=>Xe(this,null,function*(){return yield this.engine.getAction().execAction(o,n)})));return u.includes(!1)?!1:u})}}function Nr(){return Nr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Nr.apply(this,arguments)}var Qu={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function ve(e){return typeof e=="number"}function ut(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function Yu(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function ei(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function ti(e){return e&&e.constructor.prototype.isUnit===!0||!1}function An(e){return typeof e=="string"}var Me=Array.isArray;function zt(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function _r(e){return Array.isArray(e)||zt(e)}function rh(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function uh(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function ih(e){return e&&e.constructor.prototype.isRange===!0||!1}function ni(e){return e&&e.constructor.prototype.isIndex===!0||!1}function oh(e){return typeof e=="boolean"}function ah(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function sh(e){return e&&e.constructor.prototype.isHelp===!0||!1}function ch(e){return typeof e=="function"}function fh(e){return e instanceof Date}function lh(e){return e instanceof RegExp}function hh(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!Yu(e)&&!ei(e))}function dh(e){return e===null}function ph(e){return e===void 0}function Dh(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function gh(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function vh(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function mh(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function yh(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Eh(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ah(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ch(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function Fh(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function wh(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function Bh(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function bh(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Sh(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function Mh(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function Nh(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function _h(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ih(e){return e&&e.constructor.prototype.isChain===!0||!1}function Ir(e){var t=typeof e;return t==="object"?e===null?"null":ut(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function ht(e){var t=typeof e;if(t==="number"||t==="string"||t==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(n){return ht(n)});if(e instanceof Date)return new Date(e.valueOf());if(ut(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return Oh(e,ht)}function Oh(e,t){var n={};for(var r in e)Cn(e,r)&&(n[r]=t(e[r]));return n}function Or(e,t){var n,r,u;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(r=0,u=e.length;r<u;r++)if(!Or(e[r],t[r]))return!1;return!0}else{if(typeof e=="function")return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!Or(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}else return e===t}}function Cn(e,t){return e&&Object.hasOwnProperty.call(e,t)}function Rh(e,t){for(var n={},r=0;r<t.length;r++){var u=t[r],o=e[u];o!==void 0&&(n[u]=o)}return n}var xh=["Matrix","Array"],$h=["number","BigNumber","Fraction"],ri=function(t){if(t)throw new Error(`The global config is readonly.
|
|
1
|
+
var fm=Object.defineProperty,hm=Object.defineProperties;var pm=Object.getOwnPropertyDescriptors;var $a=Object.getOwnPropertySymbols,dm=Object.getPrototypeOf,Dm=Object.prototype.hasOwnProperty,Em=Object.prototype.propertyIsEnumerable,vm=Reflect.get;var Hn=Math.pow,Ra=(G,Y,ne)=>Y in G?fm(G,Y,{enumerable:!0,configurable:!0,writable:!0,value:ne}):G[Y]=ne,ae=(G,Y)=>{for(var ne in Y||(Y={}))Dm.call(Y,ne)&&Ra(G,ne,Y[ne]);if($a)for(var ne of $a(Y))Em.call(Y,ne)&&Ra(G,ne,Y[ne]);return G},cu=(G,Y)=>hm(G,pm(Y));var xa=(G,Y,ne)=>vm(dm(G),ne,Y);var Xe=(G,Y,ne)=>new Promise((zn,rn)=>{var Wn=Ze=>{try{Ot(ne.next(Ze))}catch(Tt){rn(Tt)}},Gn=Ze=>{try{Ot(ne.throw(Ze))}catch(Tt){rn(Tt)}},Ot=Ze=>Ze.done?zn(Ze.value):Promise.resolve(Ze.value).then(Wn,Gn);Ot((ne=ne.apply(G,Y)).next())});(function(G,Y){typeof exports=="object"&&typeof module!="undefined"?Y(exports,require("crypto")):typeof define=="function"&&define.amd?define(["exports","crypto"],Y):(G=typeof globalThis!="undefined"?globalThis:G||self,Y(G.modelDrivenEngine={},G.require$$0))})(this,function(G,Y){"use strict";function ne(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var zn=ne(Y),rn="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u5B57",Wn="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5B57\u7B26\u4E32",Gn="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5BF9\u8C61",Ot="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u7EC4",Ze="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5E03\u5C14",Tt="{caption}\u5FC5\u586B",Oa="\u8BF7\u8F93\u5165\u6807\u9898",Ta="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",Pa="\u8BF7\u8F93\u5165\u63D0\u793A\u6587\u5B57",La="\u8BF7\u7ED1\u5B9A\u6570\u636E\u9879",ja="\u8BF7\u7ED1\u5B9A\u8868\u5355",Va="\u8BF7\u7ED1\u5B9A\u5217\u8868",Ua="\u8BF7\u7ED1\u5B9A\u6D41\u7A0B",qa="\u8BF7\u8F93\u5165\u663E\u793A\u503C",ka="\u8BF7\u8F93\u5165\u5B58\u50A8\u503C",Ha="\u5355\u636E\u7F16\u53F7\u672A\u7ED1\u5B9A\u6570\u636E\u9879",za="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",Wa="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u7684\u6570\u503C",Ga="\u8BF7\u8F93\u5165\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",Xa="\u6570\u503C\u8303\u56F4\u8BBE\u7F6E\u6709\u8BEF",Za="\u8BF7\u8F93\u5165\u957F\u5EA6\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u503C",Ja="\u9644\u4EF6\u5927\u5C0F\u5FC5\u987B\u57280MB\u81F31000MB\u4E4B\u95F4",Ka="\u8BF7\u586B\u5199\u603B\u5206\u8BBE\u7F6E",Qa="\u603B\u5206\u4E0D\u80FD\u5C0F\u4E8E1",Ya="\u9ED8\u8BA4\u503C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",eo="\u9644\u4EF6\u4E0A\u4F20\u7684\u6570\u91CF\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",to="\u8BF7\u91CD\u65B0\u9009\u62E9\u53EF\u9009\u6570\u91CF",no="\u8BE5\u63A7\u4EF6\u6700\u5927\u957F\u5EA6\u9700\u5927\u4E8E\u6700\u5C0F\u957F\u5EA6",ro="\u8BE5\u63A7\u4EF6\u6700\u5C0F\u957F\u5EA6\u9700\u5C0F\u4E8E\u6700\u5927\u957F\u5EA6",uo="\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u9009\u9879\u8BBE\u7F6E",io="\u9009\u9879ID\u4E0D\u80FD\u91CD\u590D",ao="\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u6761\u9009\u9879",oo="\u8BF7\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",so="\u8BF7\u7ED1\u5B9A\u5B58\u50A8\u503C",co="\u8BF7\u7ED1\u5B9A\u670D\u52A1",lo="\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",fo="\u8BF7\u9009\u62E9\u7701",ho="\u8BF7\u9009\u62E9\u5E02",po="\u8BF7\u9009\u62E9\u533A",Do="\u6700\u5C11\u586B\u5199\u884C\u6570\u4E0D\u80FD\u5C0F\u4E8E0",Eo="\u884C\u6570\u91CF\u4E0D\u80FD\u5C0F\u4E8E{min}\u884C",vo="\u8BF7\u8F93\u5165\u5217\u5BBD",go="\u8BF7\u8BBE\u7F6E\u6240\u6709\u89C4\u5219\u6761\u4EF6\u7684\u903B\u8F91\u5173\u7CFB",mo="\u8BF7\u5C06\u6240\u6709\u89C4\u5219\u6761\u4EF6\u586B\u5199\u5B8C\u6574",yo="\u8BF7\u9009\u62E9\u63A7\u4EF6",Ao="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5",Fo="\u8BF7\u9009\u62E9\u56DE\u586B\u8BBE\u7F6E",Co="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Bo="\u8BF7\u9009\u62E9\u6839\u8282\u70B9",wo="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",bo="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",So="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Mo="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Io="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",_o="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",No="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",$o="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Ro="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",xo="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Oo="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",To="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Po="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Lo="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",jo="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Vo="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Uo="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",qo={isNotNumber:rn,isNotString:Wn,isNotObject:Gn,isNotArray:Ot,isNotBoolean:Ze,runtimeRequired:Tt,pleaseEnterCaption:Oa,pleaseEnterCaptionTip:Ta,pleaseEnterPlaceholder:Pa,pleaseEnterFieldCode:La,pleaseEnterForm:ja,pleaseEnterList:Va,pleaseEnterProcess:Ua,pleaseEnterLabel:qa,pleaseEnterValue:ka,bizKeyNotBindFiled:Ha,pleaseEnterNumberRange:za,pleaseEnterAValueGreaterThanMin:Wa,pleaseEnterAValueLessThanMax:Ga,numberRangeSetError:Xa,stringRangeError:Za,attachmentMaxSize:Ja,pleaseEnterTotalScoreSetting:Ka,theTotalScoreMustNotBeLessThan1:Qa,scoreDefaultValueRange:Ya,attachmentLimitError:eo,PleaseReselectTheOptionalQuantity:to,TheMaximumLengthIsGreaterThanTheMinimumLength:no,TheMinimumLengthIsGreaterThanTheMaximumLength:ro,PleaseSelectTheCorrectOptionSettings:uo,optionIdIsRepeat:io,optionIsRequired:ao,pleaseEnterDataCode:oo,pleaseEnterValueFieldCode:so,pleaseEnterSvcCode:co,pleaseBindAtLeastOneDisplayValue:lo,pleaseSelectProvince:fo,pleaseSelectCity:ho,pleaseSelectDistrict:po,limitRowsCannotBeLessThan0:Do,TheNumberOfRowsCannotBeLessThanMinRows:Eo,pleaseEnterColumnWidth:vo,pleaseSetTheLogicalRelationshipOfAllRuleConditions:go,pleaseCompleteAllRulesAndConditions:mo,pleaseSelectControl:yo,pleaseSelectAtLeastOneColumn:Ao,pleaseSelectFillBackMode:Fo,pleaseSelectDashboard:Co,rootNodeIsRequired:Bo,theViewNameCannotBeEmpty:wo,pleaseSelectOcrType:bo,pleaseSelectAtLeastOneFieldToFillIn:So,pleaseChooseAtLeastOne:Mo,pleaseEnterButtonContent:Io,pleaseEnterDataCodeInDataSetting:_o,pleaseEnterValueFieldCodeInDataSetting:No,pleaseEnterSvcCodeInDataSetting:$o,pleaseBindAtLeastOneDisplayValueInDataSetting:Ro,rootNodeIsRequiredInDataSetting:xo,pleaseEnterMaxHeight:Oo,pleaseEnter:To,pleaseEnterWatermark:Po,pleaseEnterFileName:Lo,pleaseUploadAtLeastOnePrintTemplate:jo,pleaseAssignBusiness:Vo,pleaseAssignExternal:Uo},ko="Please enter a number",Ho="Please enter a string",zo="Please enter an object",Wo="Please enter an array",Go="Please enter a boolean",Xo="{caption} Required",Zo="Please enter the title",Jo="Please enter the bubble prompt",Ko="Please enter the prompt text",Qo="Please bind data items",Yo="Please bind the form",es="Please bind the list",ts="Please bind the process",ns="Please enter the displayed value",rs="Please enter the stored value",us="The document number is not bound to the data item",is="Please enter a value greater than or equal to {min} and less than or equal to {max}",as="Please enter a value greater than or equal to {min}",os="Please enter a value less than or equal to {max}",ss="The value range is set incorrectly",cs="Please enter a value with a length greater than or equal to {min} and less than or equal to {max}",ls="The attachment size must be between 0MB and 1000MB",fs="Please fill in the total score setting",hs="The total score cannot be less than 1",ps="The default value must be between {min} and {max}",ds="The number of attachments uploaded must be between {min} and {max}",Ds="Please re-select the optional quantity",Es="The maximum length of the control must be greater than the minimum length",vs="The minimum length of the control must be less than the maximum length",gs="Please select the correct option setting",ms="Option ID cannot be repeated",ys="Please enter at least one option",As="Please bind the data source",Fs="Please bind the stored value",Cs="Please bind the service",Bs="At least one display value must be bound",ws="Please select a province",bs="Please select a city",Ss="Please select a district",Ms="The minimum number of lines to fill in cannot be less than 0",Is="The number of rows cannot be less than {min} rows",_s="Please enter the column width",Ns="Please set the logical relationship of all rule conditions",$s="Please complete all rules and conditions",Rs="please select control",xs="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Os="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Ts="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Ps="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Ls="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",js="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Vs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Us="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",qs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",ks="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Hs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",zs="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Ws="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Gs="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Xs="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Zs="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Js="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Ks="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Qs={isNotNumber:ko,isNotString:Ho,isNotObject:zo,isNotArray:Wo,isNotBoolean:Go,runtimeRequired:Xo,pleaseEnterCaption:Zo,pleaseEnterCaptionTip:Jo,pleaseEnterPlaceholder:Ko,pleaseEnterFieldCode:Qo,pleaseEnterForm:Yo,pleaseEnterList:es,pleaseEnterProcess:ts,pleaseEnterLabel:ns,pleaseEnterValue:rs,bizKeyNotBindFiled:us,pleaseEnterNumberRange:is,pleaseEnterAValueGreaterThanMin:as,pleaseEnterAValueLessThanMax:os,numberRangeSetError:ss,stringRangeError:cs,attachmentMaxSize:ls,pleaseEnterTotalScoreSetting:fs,theTotalScoreMustNotBeLessThan1:hs,scoreDefaultValueRange:ps,attachmentLimitError:ds,PleaseReselectTheOptionalQuantity:Ds,TheMaximumLengthIsGreaterThanTheMinimumLength:Es,TheMinimumLengthIsGreaterThanTheMaximumLength:vs,PleaseSelectTheCorrectOptionSettings:gs,optionIdIsRepeat:ms,optionIsRequired:ys,pleaseEnterDataCode:As,pleaseEnterValueFieldCode:Fs,pleaseEnterSvcCode:Cs,pleaseBindAtLeastOneDisplayValue:Bs,pleaseSelectProvince:ws,pleaseSelectCity:bs,pleaseSelectDistrict:Ss,limitRowsCannotBeLessThan0:Ms,TheNumberOfRowsCannotBeLessThanMinRows:Is,pleaseEnterColumnWidth:_s,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Ns,pleaseCompleteAllRulesAndConditions:$s,pleaseSelectControl:Rs,pleaseSelectDashboard:xs,theViewNameCannotBeEmpty:Os,pleaseSelectOcrType:Ts,pleaseSelectAtLeastOneFieldToFillIn:Ps,pleaseChooseAtLeastOne:Ls,pleaseEnterButtonContent:js,pleaseEnterDataCodeInDataSetting:Vs,pleaseEnterValueFieldCodeInDataSetting:Us,pleaseEnterSvcCodeInDataSetting:qs,pleaseBindAtLeastOneDisplayValueInDataSetting:ks,rootNodeIsRequiredInDataSetting:Hs,pleaseEnterMaxHeight:zs,pleaseEnter:Ws,pleaseEnterWatermark:Gs,pleaseEnterFileName:Xs,pleaseUploadAtLeastOnePrintTemplate:Zs,pleaseAssignBusiness:Js,pleaseAssignExternal:Ks},Ys="\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ec="\u6587\u5B57\u5217\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",tc="\u5BFE\u8C61\u7269\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",nc="\u6570\u5B57\u7D44\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",rc="\u30D6\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",uc="{caption}\u5FC5\u9808",ic="\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ac="\u6C17\u6CE1\u306E\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",oc="\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",sc="\u30C7\u30FC\u30BF\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",cc="\u30B7\u30FC\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",lc="\u30EA\u30B9\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",fc="\u30D5\u30ED\u30FC\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",hc="\u8868\u793A\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",pc="\u4FDD\u5B58\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",dc="\u30B7\u30FC\u30C8\u756A\u53F7\u304C\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",Dc="{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Ec="{min}\u4EE5\u4E0A\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",vc="{max}\u672A\u6E80\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",gc="\u6570\u5024\u7BC4\u56F2\u8A2D\u5B9A\u30A8\u30E9\u30FC",mc="\u9577\u3055\u304C{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",yc="\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306F0MB\u304B\u30891000MB\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Ac="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Fc="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u306F\uFF11\u4EE5\u4E0A\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Cc="\u57FA\u672C\u8A2D\u5B9A\u5024\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Bc="\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4EF6\u6570\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059",wc="\u6570\u91CF\u3092\u518D\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",bc="\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",Sc="\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",Mc="\u6B63\u78BA\u306A\u8A2D\u5B9A\u5024\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Ic="ID\u306F\u91CD\u8907\u3057\u306A\u3044\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",_c="\u6700\u4F4E\uFF11\u70B9\u3092\u9078\u3076\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",Nc="\u5143\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",$c="\u4FDD\u5B58\u5024\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Rc="\u30B5\u30FC\u30D3\u30B9\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",xc="\u8868\u793A\u5024\u3092\u30EA\u30F3\u30AF\u3057\u76F4\u3057\u3057\u3066\u4E0B\u3055\u3044",Oc="\u7701\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Tc="\u5E02\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Pc="\u533A\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Lc="\u6700\u5C0F\u5024\u306F\uFF10\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",jc="\u6700\u4F4E\u884C\u6570\u306F{min}\u884C\u3067\u304A\u9858\u3044\u3057\u307E\u3059",Vc="\u5217\u5E45\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Uc="\u5168\u3066\u306E\u6761\u4EF6\u306E\u30ED\u30B8\u30C3\u30AF\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",qc="\u5168\u3066\u306E\u6761\u4EF6\u3092\u5B8C\u6210\u3055\u305B\u3066\u4E0B\u3055\u3044",kc="please select control",Hc="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",zc="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Wc="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Gc="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Xc="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Zc="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Jc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Kc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Qc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Yc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",el="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",tl="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",nl="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",rl="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",ul="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",il="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",al="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",ol="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",sl={isNotNumber:Ys,isNotString:ec,isNotObject:tc,isNotArray:nc,isNotBoolean:rc,runtimeRequired:uc,pleaseEnterCaption:ic,pleaseEnterCaptionTip:ac,pleaseEnterPlaceholder:oc,pleaseEnterFieldCode:sc,pleaseEnterForm:cc,pleaseEnterList:lc,pleaseEnterProcess:fc,pleaseEnterLabel:hc,pleaseEnterValue:pc,bizKeyNotBindFiled:dc,pleaseEnterNumberRange:Dc,pleaseEnterAValueGreaterThanMin:Ec,pleaseEnterAValueLessThanMax:vc,numberRangeSetError:gc,stringRangeError:mc,attachmentMaxSize:yc,pleaseEnterTotalScoreSetting:Ac,theTotalScoreMustNotBeLessThan1:Fc,scoreDefaultValueRange:Cc,attachmentLimitError:Bc,PleaseReselectTheOptionalQuantity:wc,TheMaximumLengthIsGreaterThanTheMinimumLength:bc,TheMinimumLengthIsGreaterThanTheMaximumLength:Sc,PleaseSelectTheCorrectOptionSettings:Mc,optionIdIsRepeat:Ic,optionIsRequired:_c,pleaseEnterDataCode:Nc,pleaseEnterValueFieldCode:$c,pleaseEnterSvcCode:Rc,pleaseBindAtLeastOneDisplayValue:xc,pleaseSelectProvince:Oc,pleaseSelectCity:Tc,pleaseSelectDistrict:Pc,limitRowsCannotBeLessThan0:Lc,TheNumberOfRowsCannotBeLessThanMinRows:jc,pleaseEnterColumnWidth:Vc,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Uc,pleaseCompleteAllRulesAndConditions:qc,pleaseSelectControl:kc,pleaseSelectDashboard:Hc,theViewNameCannotBeEmpty:zc,pleaseSelectOcrType:Wc,pleaseSelectAtLeastOneFieldToFillIn:Gc,pleaseChooseAtLeastOne:Xc,pleaseEnterButtonContent:Zc,pleaseEnterDataCodeInDataSetting:Jc,pleaseEnterValueFieldCodeInDataSetting:Kc,pleaseEnterSvcCodeInDataSetting:Qc,pleaseBindAtLeastOneDisplayValueInDataSetting:Yc,rootNodeIsRequiredInDataSetting:el,pleaseEnterMaxHeight:tl,pleaseEnter:nl,pleaseEnterWatermark:rl,pleaseEnterFileName:ul,pleaseUploadAtLeastOnePrintTemplate:il,pleaseAssignBusiness:al,pleaseAssignExternal:ol},cl={zhCN:qo,enUS:Qs,jaJP:sl},lu;(function(e){e.Number="Number",e.Operator="Operator",e.VariableInMainTable="VariableInMainTable",e.VariableInCurrentSubTable="VariableInCurrentSubTable",e.VariableInOtherSubTable="VariableInOtherSubTable",e.UndefinedVariable="UndefinedVariable"})(lu||(lu={}));var fu;(function(e){e.SUM="SUM",e.AVG="AVG",e.MAX="MAX",e.MIN="MIN"})(fu||(fu={}));var ll="zh-CN";function Se(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Et;(function(e){e.BASE="base",e.FORM="form",e.LAYOUT="layout",e.WRAP="wrap",e.COLUMN="column",e.LIST="list",e.SEARCH="search"})(Et||(Et={}));var Ee;(function(e){e.TITLE="title",e.LINK="link",e.BUTTON="button",e.DIVIDER="divider",e.TEXT="text",e.CREATE_FORM_LIST_BUTTON="list-page-btn-create-form",e.BATCH_SUBMISSION_LIST_BUTTON="list-page-btn-batch-submission",e.SUBMISSION_RECORD_LIST_BUTTON="list-page-btn-submission-record",e.IMPORT_RECORD_LIST_BUTTON="list-page-btn-import-record",e.EXPORT_RECORD_LIST_BUTTON="list-page-btn-export-record",e.EXPORT_LIST_BUTTON="list-page-btn-export-list",e.LIST_SELECT_BUTTON="list-select-button",e.FORM_SELECT_BUTTON="form-select-button",e.LIST_VIEW_SELECT="list-view-select",e.TEXT_OCR_BUTTON="text-ocr-button",e.INVOICE_CHECK_BUTTON="invoice-check-button",e.LIST_PAGE_BTN_BATCH_PRINT="list-page-btn-batch-print",e.LIST_PAGE_BTN_BATCH_PRINT_RECORD="list-page-btn-batch-print-record",e.VARCHAR_COLUMN="varchar-column",e.TEXT_COLUMN="text-column",e.DECIMAL_COLUMN="decimal-column",e.TIMESCOPE_COLUMN="timescope-column",e.TIMESTAMP_COLUMN="timestamp-column",e.ARRAY_COLUMN="array-column",e.DEPARTMENT_COLUMN="department-column",e.AUTO_NUMBER_COLUMN="auto-number-column",e.FILE_COLUMN="file-column",e.IMAGE_COLUMN="image-column",e.PEOPLE_COLUMN="people-column",e.LOCATION_COLUMN="location-column",e.CUSTOM_COLUMN="custom-column",e.ORDER_COLUMN="order-column",e.OPERATION_COLUMN="operation-column",e.EMPLOYEE_COLUMN="employee-column",e.ADDRESS="address",e.AMOUNT="amount",e.ATTACHMENT="attachment",e.AUTO_NUMBER="auto-number",e.CALC="calc",e.CHECKBOX="checkbox",e.DATE_PICKER="date-picker",e.DATE_RANGE="date-range",e.DEPARTMENT="department",e.EMPLOYEE="employee",e.IMAGE="image",e.INPUT="input",e.NUMBER="number",e.RADIO="radio",e.RICH_TEXT="rich-text",e.SCORE="score",e.SEARCH_DATE_RANGE="search-date-range",e.SEARCH_NUMBER_RANGE="search-number-range",e.SEARCH_INPUT="search-input",e.SELECT="select",e.SELECT_MULTIPLE="select-multiple",e.SELECT_RELATION="select-relation",e.VUE_FORM_ITEM="vue-form-item",e.TEXTAREA="textarea",e.EMAIL="email",e.FOOTER="footer",e.HEADER="header",e.ID_CARD="id-card",e.MOBILE="mobile",e.PHONE="phone",e.RADIO_IMAGE="radio-image",e.ELECTRONIC_SIGNATURE="electronic-signature",e.WPS="wps",e.CARD_GROUP="card-group",e.COL="col",e.GRID="grid",e.GRID_ROW="grid-row",e.GRID_TABLE_COLUMN="grid-table-column",e.ROW="row",e.TWO_COLUMNS="two-columns",e.SUBTABLE_COLUMN="subtable-column",e.SUBTABLE_ROW="subtable-row",e.TAB="tab",e.TAB_PANE="tab-pane",e.TOOLBOX="toolbox",e.DATA_VIEW="data-view",e.LIST_VIEW="list-view",e.SUBTABLE="subtable",e.GRID_TABLE="grid-table",e.SIMPLE_SEARCH="simple-search",e.PAGINATION="pagination",e.CHECKBOX_IMAGE="checkbox-image",e.DASHBOARD="dashboard",e.TREE="tree",e.EMPLOYEE2="employee2",e.DEPARTMENT2="department2"})(Ee||(Ee={}));var pe;(function(e){e.VARCHAR="varchar",e.TEXT="text",e.ARRAY="array",e.ADDRESS="location",e.DECIMAL="decimal",e.DECIMAL_RANGE="decimal_range",e.TIMESTAMP="timestamp",e.EMPLOYEES="people",e.DEPARTMENTS="department",e.MONEY="money",e.TIMESCOPE="timescope",e.FILE="file",e.IMAGE="image",e.AUTO_NUMBER="auto_number",e.CALC="calc",e.RELATION="relation",e.LIST="list",e.RELATION_FIELD="relation-field",e.REFERENCE_FIELD="reference-field",e.CALC_FIELD="calc",e.JSON="json",e.BIGINT="bigint",e.ANY="ANY",e.ENCRYPTED_FIELD="encrypted_field"})(pe||(pe={}));var ve;ve={},Se(ve,pe.ARRAY,Ee.ARRAY_COLUMN),Se(ve,pe.AUTO_NUMBER,Ee.AUTO_NUMBER_COLUMN),Se(ve,pe.DECIMAL,Ee.DECIMAL_COLUMN),Se(ve,pe.DEPARTMENTS,Ee.DEPARTMENT_COLUMN),Se(ve,pe.FILE,Ee.FILE_COLUMN),Se(ve,pe.IMAGE,Ee.IMAGE_COLUMN),Se(ve,pe.ADDRESS,Ee.LOCATION_COLUMN),Se(ve,pe.EMPLOYEES,Ee.EMPLOYEE_COLUMN),Se(ve,pe.TEXT,Ee.TEXT_COLUMN),Se(ve,pe.TIMESCOPE,Ee.TIMESCOPE_COLUMN),Se(ve,pe.TIMESTAMP,Ee.TIMESTAMP_COLUMN),Se(ve,pe.VARCHAR,Ee.VARCHAR_COLUMN),Se(ve,pe.RELATION,Ee.VARCHAR_COLUMN);var hu;(function(e){e.YEAR="year",e.MONTH="month",e.DATE="date",e.DATETIME="datetime"})(hu||(hu={}));var pu="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",fl=pu+"0123456789";function du(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:15,t="",n=0;n<e;n++){var r=n===0?pu:fl,u=Math.random()*r.length;t+=r[parseInt(String(u),10)]}return t}function Xn(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function hl(e){if(Array.isArray(e))return Xn(e)}function pl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Du(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dl(){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(e){return!1}}function un(e,t,n){return dl()?un=Reflect.construct:un=function(u,i,a){var s=[null];s.push.apply(s,i);var c=Function.bind.apply(u,s),l=new c;return a&&Lt(l,a.prototype),l},un.apply(null,arguments)}function Pt(e){return Pt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Pt(e)}function Eu(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Lt(e,t)}function Dl(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function El(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function vl(){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 gl(e,t){return t&&(ml(t)==="object"||typeof t=="function")?t:pl(e)}function Lt(e,t){return Lt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Lt(e,t)}function vu(e){return hl(e)||El(e)||yl(e)||vl()}var ml=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function yl(e,t){if(!!e){if(typeof e=="string")return Xn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Xn(e,t)}}function Zn(e){var t=typeof Map=="function"?new Map:void 0;return Zn=function(r){if(r===null||!Dl(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return un(r,arguments,Pt(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Lt(u,r)},Zn(e)}function Al(){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(e){return!1}}function gu(e){var t=Al();return function(){var r=Pt(e),u;if(t){var i=Pt(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return gl(this,u)}}var Jn=console;function Kn(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=Jn).warn.apply(r,["\u{1F9D0} Driven Warning:"+t[0]].concat(vu(u)))}function mu(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=Jn).log.apply(r,["\u{1F680} Driven Log:"+t[0]].concat(vu(u)))}function Fl(e){return e+" \u{1F41B}\u{1F41B}\u{1F41B}"}var Qn=function(e){Eu(n,e);var t=gu(n);function n(r){Du(this,n);var u;return u=t.call(this,r),u.name="\u{1F4A5} Driven Error",u.message=r?Fl(r):"An unknown error occurred in the Driven, please contact the person in charge \u{1F691}\u{1F691}\u{1F691}",u}return n}(Zn(Error)),Cl=function(e){Eu(n,e);var t=gu(n);function n(r){Du(this,n);var u;return u=t.call(this,r),u.name="\u{1F6A8} Driven Reference Error",u}return n}(Qn);function Yn(e){throw new Qn(e)}function yu(e){throw new Cl(e)}function Bl(e){Jn.error(new Qn(e))}var wl=Object.prototype.toString;function Au(e,t){return wl.call(e)==="[object "+t+"]"}function bl(e){return Au(e,"String")}function Sl(e){return Au(e,"Promise")}var Fu=function(){function e(t){var n,r;this._messageCache=new Map,this.messages={},this.variableRegExp=/\{([0-9a-zA-Z_]+)\}/g,this._messages=Object.freeze((r=(n=t.messages)!==null&&n!==void 0?n:this.getPreImport(t.locale))!==null&&r!==void 0?r:{}),t.variableRegExp&&(this.variableRegExp=t.variableRegExp),this.setLocale(t.locale)}return e.prototype.setLocale=function(t){var n=this;this.locale=t,this._messageCache.clear();var r=this.getMessageData();Sl(r)?r.then(function(u){n._messageCache.clear(),n.messages[n.localeInMessageKey]=u}):this.messages[this.localeInMessageKey]=r},e.prototype.getMessageData=function(){var t=this._messages[this.localeInMessageKey];return typeof t=="function"?t():t},e.prototype.translate=function(t,n,r){var u=this.getMessage(t);return u?this.formatMessage(u,r):this.formatMessage(n,r)},e.prototype.getMessage=function(t){if(this._messageCache.has(t))return this._messageCache.get(t);var n=this.getPathArray(t),r=n.reduce(function(u,i,a,s){if(u!==void 0){var c=u[i];if(!(a===s.length-1&&!bl(c)))return c}},this.message);return this._messageCache.set(t,r),r},e.prototype.formatMessage=function(t,n){return n?t.replace(this.variableRegExp,function(r,u){var i=n[u];return i!==void 0?String(i):r}):t},e.prototype.getPreImport=function(t){var n;if(window.okI18nPreImport){var r=this.getLocaleInMessageKey(t);return window.okI18nPreImport.hasOwnProperty(r)?window.okI18nPreImport:(n={},n[r]=window.okI18nPreImport,n)}},e.prototype.getPathArray=function(t){return t.split(".")},e.prototype.getLocaleInMessageKey=function(t){return t.replace(/-/g,"")},Object.defineProperty(e.prototype,"$t",{get:function(){return this.translate},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localeInMessageKey",{get:function(){return this.getLocaleInMessageKey(this.locale)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"message",{get:function(){var t;return(t=this.messages[this.localeInMessageKey])!==null&&t!==void 0?t:{}},enumerable:!1,configurable:!0}),e}();function Ml(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ue=function(){function e(){Ml(this,e)}return e.getMessage=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$i18n.$t(n,"",r)},e.resetI18n=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ll;return new Fu({locale:n,messages:cl})},e.setLocale=function(n){return this.$i18n.setLocale(n)},e}();Ue.$i18n=Ue.resetI18n();function Il(e,t,n){var r=t.replace(/\[(\d)]/g,function(i,a){return"."+a}).split("."),u=!1;return r.reduce(function(i,a,s,c){var l=i;if(!!i){if(!Object.prototype.hasOwnProperty.call(i,a)){Kn("Can not set ".concat(t,"'s ").concat(a," property in current %o, Because there is no ").concat(a," property on the %o"),i,i);return}return s===c.length-1&&!Object.is(l[a],n)&&(l[a]=n,u=!0),l[a]}},e),u}var Ye=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Cu(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var er={exports:{}};(function(e){(function(t){var n=function(E,y,b){if(!l(y)||o(y)||h(y)||p(y)||c(y))return y;var F,$=0,O=0;if(f(y))for(F=[],O=y.length;$<O;$++)F.push(n(E,y[$],b));else{F={};for(var T in y)Object.prototype.hasOwnProperty.call(y,T)&&(F[E(T,b)]=n(E,y[T],b))}return F},r=function(E,y){y=y||{};var b=y.separator||"_",F=y.split||/(?=[A-Z])/;return E.split(F).join(b)},u=function(E){return d(E)?E:(E=E.replace(/[\-_\s]+(.)?/g,function(y,b){return b?b.toUpperCase():""}),E.substr(0,1).toLowerCase()+E.substr(1))},i=function(E){var y=u(E);return y.substr(0,1).toUpperCase()+y.substr(1)},a=function(E,y){return r(E,y).toLowerCase()},s=Object.prototype.toString,c=function(E){return typeof E=="function"},l=function(E){return E===Object(E)},f=function(E){return s.call(E)=="[object Array]"},o=function(E){return s.call(E)=="[object Date]"},h=function(E){return s.call(E)=="[object RegExp]"},p=function(E){return s.call(E)=="[object Boolean]"},d=function(E){return E=E-0,E===E},D=function(E,y){var b=y&&"process"in y?y.process:y;return typeof b!="function"?E:function(F,$){return b(F,E,$)}},v={camelize:u,decamelize:a,pascalize:i,depascalize:a,camelizeKeys:function(E,y){return n(D(u,y),E)},decamelizeKeys:function(E,y){return n(D(a,y),E,y)},pascalizeKeys:function(E,y){return n(D(i,y),E)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=v:t.humps=v})(Ye)})(er);function st(e){if(e!==void 0)return typeof e=="object"?JSON.parse(JSON.stringify(e)):e}function _l(e){return Object.prototype.toString.call(e)==="[object Object]"}function Nl(e){return Array.isArray(e)}function tr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function $l(e){if(Array.isArray(e))return tr(e)}function Bu(e,t,n,r,u,i,a){try{var s=e[i](a),c=s.value}catch(l){n(l);return}s.done?t(c):Promise.resolve(c).then(r,u)}function Rl(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function a(c){Bu(i,r,u,a,s,"next",c)}function s(c){Bu(i,r,u,a,s,"throw",c)}a(void 0)})}}function xl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ol(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Tl(){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 nr(e){return $l(e)||Ol(e)||Pl(e)||Tl()}function Pl(e,t){if(!!e){if(typeof e=="string")return tr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return tr(e,t)}}var Ll=function(e,t){var n,r,u,i,a={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(l){return function(f){return c([l,f])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(u=a.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){a.label=l[1];break}if(l[0]===6&&a.label<u[1]){a.label=u[1],u=l;break}if(u&&a.label<u[2]){a.label=u[2],a.ops.push(l);break}u[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(f){l=[6,f],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},jl=function(){function e(){xl(this,e),this._events=new Map,this.debug=!1}var t=e.prototype;return t.emit=function(r){for(var u=arguments.length,i=new Array(u>1?u-1:0),a=1;a<u;a++)i[a-1]=arguments[a];var s=this;return Rl(function(){var c,l,f,o,h,p,d,D,v,E,y,b;return Ll(this,function(F){switch(F.label){case 0:if(c=s._events.get(r),l=[],!c)return[3,10];f=c.slice(),o=!0,h=!1,p=void 0,F.label=1;case 1:F.trys.push([1,8,9,10]),d=f[Symbol.iterator](),F.label=2;case 2:if(o=(D=d.next()).done)return[3,7];if(v=D.value,!c.includes(v))return[3,6];F.label=3;case 3:return F.trys.push([3,5,,6]),s.debug&&mu.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(v.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+v.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"\u3002")].concat(nr(i))),[4,v.apply(null,nr(i))];case 4:return E=F.sent(),s.debug&&mu.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(v.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+v.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"; \u51FD\u6570\u7684\u8FD4\u56DE\u7ED3\u679C\u4E3A%o")].concat(nr(i),[E])),l.push(E),E===!1?[3,7]:[3,6];case 5:return y=F.sent(),Bl(String(y)),[3,6];case 6:return o=!0,[3,2];case 7:return[3,10];case 8:return b=F.sent(),h=!0,p=b,[3,10];case 9:try{!o&&d.return!=null&&d.return()}finally{if(h)throw p}return[7];case 10:return[2,l]}})})()},t.on=function(r,u){if(this._events.has(r)){var i;(i=this._events.get(r))===null||i===void 0||i.push(u)}else this._events.set(r,[u])},t.off=function(r,u){if(this._events.has(r)){var i=this._events.get(r),a=i==null?void 0:i.indexOf(u);i==null||i.splice(a,1)}},t.delete=function(r){this._events.has(r)&&this._events.delete(r)},t.clear=function(){this._events=new Map},e}();function Vl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var wu=[],an=function(){function e(n){Vl(this,e),this.registeredControlTypes=new Set,this.controlConfigMap=new Map,this._controls=[],this._type=n,this._initControls(n)}var t=e.prototype;return t.registerControlConfig=function(r,u){return this.controlConfigMap.set(r,u),this},t.getControlConfig=function(r){return this.controlConfigMap.get(r)},t.getControls=function(){return this._controls},t.register=function(r){r.__is_control__||Yn("".concat(r.name," is not a Control"));var u=this._controls.findIndex(function(i){return i.controlType===r.controlType});return u>-1&&(Kn("The ".concat(r.controlType," is repeat register, So it overwrites the one that was registered before.")),this._controls.splice(u,1)),this.registeredControlTypes.add(r.controlType),this._controls.push(r),this},t.isLayoutControl=function(r){return r.controlType===Et.LAYOUT},t.isFormControl=function(r){return r.controlType===Et.FORM},t.isListControl=function(r){return r.controlType===Et.LIST},t.isColumnControl=function(r){return r.controlType===Et.COLUMN},t.createControl=function(r,u){var i=this;if(Array.isArray(r))return r.map(function(f){return i.createControl(f,u)});r.children&&(r.children=r.children.map(function(f){return i.createControl(f,u)})),this.isListControl(r)&&r.props.headers&&(r.props.headers=r.props.headers.map(function(f){return i.createControl(f,u)}));var a=this.getControlFormType(r.type);if(a){var s=r;if(typeof u=="function"){var c=u(s);c&&(s=c)}var l=new a(s);return l}else Yn("The constructor of ".concat(r.type," could not be found, please confirm that the constructor has been registered"))},t.createControlInstance=function(r,u){var i=this.getControlFormType(r);if(i)return new i(u)},t.getControlFormType=function(r){return this._controls.find(function(u){return u.controlType===r})},t._initControls=function(r){var u=this;this.constructor.staticControls.forEach(function(i){u.register(i[r])})},e.register=function(r){var u=r.Designer,i=r.Runtime;(!u||!i||!u.__is_control__||!i.__is_control__)&&Yn("".concat(r," is can't register as a Control"));var a=this.staticControls.findIndex(function(s){return s.Designer.controlType===u.controlType});return a>-1&&(Kn("The ".concat(u.controlType," is repeat register, So it overwrites the one that was registered before.")),this.staticControls.splice(a,1)),this.staticRegisteredTypes.add(u.controlType),this.staticControls.push(r),this},e}();an.staticControls=wu,an.staticRegisteredTypes=new Set(wu.map(function(e){return e.Designer.controlType})),an.staticRegisteredConfigs=new Map;function ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var jt=function e(t){ct(this,e);var n;this.dataCode=(n=t==null?void 0:t.dataCode)!==null&&n!==void 0?n:"";var r;this.fieldCode=(r=t==null?void 0:t.fieldCode)!==null&&r!==void 0?r:"";var u;this.fieldType=(u=t==null?void 0:t.fieldType)!==null&&u!==void 0?u:""},qe=function e(){ct(this,e)},on=function e(t){ct(this,e);var n;this.amount=(n=t==null?void 0:t.amount)!==null&&n!==void 0?n:"";var r;this.currency=(r=t==null?void 0:t.currency)!==null&&r!==void 0?r:rr.CNY},sn=function e(t){ct(this,e);var n;this.min=(n=t==null?void 0:t.min)!==null&&n!==void 0?n:"";var r;this.max=(r=t==null?void 0:t.max)!==null&&r!==void 0?r:""},cn=function e(t){ct(this,e);var n;this.city=(n=t==null?void 0:t.city)!==null&&n!==void 0?n:"";var r;this.cityDisplay=(r=t==null?void 0:t.cityDisplay)!==null&&r!==void 0?r:"";var u;this.district=(u=t==null?void 0:t.district)!==null&&u!==void 0?u:"";var i;this.districtDisplay=(i=t==null?void 0:t.districtDisplay)!==null&&i!==void 0?i:"";var a;this.province=(a=t==null?void 0:t.province)!==null&&a!==void 0?a:"";var s;this.provinceDisplay=(s=t==null?void 0:t.provinceDisplay)!==null&&s!==void 0?s:""},ln=function e(t){ct(this,e);var n;this.result=(n=t==null?void 0:t.result)!==null&&n!==void 0?n:0;var r;this.unit=(r=t==null?void 0:t.unit)!==null&&r!==void 0?r:""},rr;(function(e){e.CNY="CNY",e.USD="USD",e.JPY="JPY",e.EUR="EUR",e.INR="INR",e.IDR="IDR",e.BRL="BRL",e.AED="AED",e.AUD="AUD",e.CAD="CAD",e.EGP="EGP",e.GBP="GBP",e.ZAR="ZAR",e.KRW="KRW",e.MAD="MAD",e.MXN="MXN",e.MYR="MYR",e.PHP="PHP",e.PLN="PLN",e.RUB="RUB",e.SGD="SGD",e.THB="THB",e.TRY="TRY",e.TWD="TWD",e.VND="VND",e.HKD="HKD",e.IEP="IEP"})(rr||(rr={}));var bu;(function(e){e.REQUIRED="required",e.IS_HIDE="isHide",e.IS_SHOW_UNIT="isShowUnit",e.IMD_SEARCH="immediatelySearch",e.MULTIPLE="multiple",e.SUBMIT_SELECT_CURRENCY="submitSelectCurrency",e.CAPTION="caption",e.IS_HIDE_CAPTION="isHideCaption",e.DEFAULT_SHOW_OPTIONS="defaultShowOptions",e.CAN_SEARCH="canSearch",e.CAN_CHECK="canCheck",e.CAN_EDIT="canEdit",e.CAN_DELETE="canDelete",e.SHOW_UPPER_CASE="showUpperCase",e.MICROMETER="micrometer",e.PRECISION="precision",e.PERCENTAGE="percentage",e.OPTIONAL_LEVEL="optionalLevel",e.CONTAINS_SUB_NODE="containsSubNode",e.DEFAULT_COLLAPSE="defaultCollapse",e.CAN_VIEW_FORM="canViewForm",e.SERVER_PAGINATION="serverPagination",e.IS_SHOW_CAPTION_TIP="isShowCaptionTip",e.ENCRYPTED="encrypted",e.IS_INLINE_EDIT="isInlineEdit",e.REVISIONS_MODE="revisionsMode",e.ALLOW_COPY_OPTIONS="allowCopyOptions"})(bu||(bu={}));var ur;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.READONLY=1]="READONLY",e[e.EDITABLE=2]="EDITABLE",e[e.PRINT=5]="PRINT"})(ur||(ur={}));var Ul=function e(t){ct(this,e);var n;this.width=(n=t==null?void 0:t.width)!==null&&n!==void 0?n:"";var r;this.height=(r=t==null?void 0:t.height)!==null&&r!==void 0?r:"";var u;this.widthConfig=(u=t==null?void 0:t.widthConfig)!==null&&u!==void 0?u:"fill";var i;this.heightConfig=(i=t==null?void 0:t.heightConfig)!==null&&i!==void 0?i:"fill"};function ql(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ir(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kl(){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(e){return!1}}function fn(e,t,n){return kl()?fn=Reflect.construct:fn=function(u,i,a){var s=[null];s.push.apply(s,i);var c=Function.bind.apply(u,s),l=new c;return a&&Ut(l,a.prototype),l},fn.apply(null,arguments)}function Vt(e){return Vt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Vt(e)}function Hl(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ut(e,t)}function zl(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Wl(e,t){return t&&(Gl(t)==="object"||typeof t=="function")?t:ql(e)}function Ut(e,t){return Ut=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Ut(e,t)}var Gl=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function ar(e){var t=typeof Map=="function"?new Map:void 0;return ar=function(r){if(r===null||!zl(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return fn(r,arguments,Vt(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Ut(u,r)},ar(e)}function Xl(){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(e){return!1}}function Zl(e){var t=Xl();return function(){var r=Vt(e),u;if(t){var i=Vt(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Wl(this,u)}}var Su=function e(t){ir(this,e),this.isHide={type:"boolean"}},Mu=function(e){Hl(n,e);var t=Zl(n);function n(r){return ir(this,n),t.call(this)}return n}(ar(Array)),lt=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";ir(this,e);var r;this.isHide=(r=t==null?void 0:t.isHide)!==null&&r!==void 0?r:!1,this.style=new Ul(t==null?void 0:t.style);var u;this.caption=(u=t==null?void 0:t.caption)!==null&&u!==void 0?u:n};lt.Rules=Su,lt.RuntimeRules=Mu;function ke(){return ke=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ke.apply(this,arguments)}function Jl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function or(e){return or=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},or(e)}function hn(e,t){return hn=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},hn(e,t)}function Kl(){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(e){return!1}}function pn(e,t,n){return Kl()?pn=Reflect.construct:pn=function(u,i,a){var s=[null];s.push.apply(s,i);var c=Function.bind.apply(u,s),l=new c;return a&&hn(l,a.prototype),l},pn.apply(null,arguments)}function Ql(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function sr(e){var t=typeof Map=="function"?new Map:void 0;return sr=function(r){if(r===null||!Ql(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return pn(r,arguments,or(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),hn(u,r)},sr(e)}var Yl=/%[sdj%]/g,Iu=function(){};typeof process!="undefined"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window!="undefined"&&typeof document!="undefined"&&(Iu=function(t,n){typeof console!="undefined"&&console.warn&&n.every(function(r){return typeof r=="string"})&&console.warn(t,n)});function cr(e){if(!e||!e.length)return null;var t={};return e.forEach(function(n){var r=n.field;t[r]=t[r]||[],t[r].push(n)}),t}function Me(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=1,u=t[0],i=t.length;if(typeof u=="function")return u.apply(null,t.slice(1));if(typeof u=="string"){var a=String(u).replace(Yl,function(s){if(s==="%%")return"%";if(r>=i)return s;switch(s){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(c){return"[Circular]"}break;default:return s}});return a}return u}function ef(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function re(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||ef(t)&&typeof e=="string"&&!e)}function tf(e,t,n){var r=[],u=0,i=e.length;function a(s){r.push.apply(r,s),u++,u===i&&n(r)}e.forEach(function(s){t(s,a)})}function _u(e,t,n){var r=0,u=e.length;function i(a){if(a&&a.length){n(a);return}var s=r;r=r+1,s<u?t(e[s],i):n([])}i([])}function nf(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n])}),t}var Nu=function(e){Jl(t,e);function t(n,r){var u;return u=e.call(this,"Async Validation Error")||this,u.errors=n,u.fields=r,u}return t}(sr(Error));function rf(e,t,n,r){if(t.first){var u=new Promise(function(o,h){var p=function(v){return r(v),v.length?h(new Nu(v,cr(v))):o()},d=nf(e);_u(d,n,p)});return u.catch(function(o){return o}),u}var i=t.firstFields||[];i===!0&&(i=Object.keys(e));var a=Object.keys(e),s=a.length,c=0,l=[],f=new Promise(function(o,h){var p=function(D){if(l.push.apply(l,D),c++,c===s)return r(l),l.length?h(new Nu(l,cr(l))):o()};a.length||(r(l),o()),a.forEach(function(d){var D=e[d];i.indexOf(d)!==-1?_u(D,n,p):tf(D,n,p)})});return f.catch(function(o){return o}),f}function $u(e){return function(t){return t&&t.message?(t.field=t.field||e.fullField,t):{message:typeof t=="function"?t():t,field:t.field||e.fullField}}}function Ru(e,t){if(t){for(var n in t)if(t.hasOwnProperty(n)){var r=t[n];typeof r=="object"&&typeof e[n]=="object"?e[n]=ke(ke({},e[n]),r):e[n]=r}}return e}function xu(e,t,n,r,u,i){e.required&&(!n.hasOwnProperty(e.field)||re(t,i||e.type))&&r.push(Me(u.messages.required,e.fullField))}function uf(e,t,n,r,u){(/^\s+$/.test(t)||t==="")&&r.push(Me(u.messages.whitespace,e.fullField))}var lr={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},qt={integer:function(t){return qt.number(t)&&parseInt(t,10)===t},float:function(t){return qt.number(t)&&!qt.integer(t)},array:function(t){return Array.isArray(t)},regexp:function(t){if(t instanceof RegExp)return!0;try{return!!new RegExp(t)}catch(n){return!1}},date:function(t){return typeof t.getTime=="function"&&typeof t.getMonth=="function"&&typeof t.getYear=="function"&&!isNaN(t.getTime())},number:function(t){return isNaN(t)?!1:typeof t=="number"},object:function(t){return typeof t=="object"&&!qt.array(t)},method:function(t){return typeof t=="function"},email:function(t){return typeof t=="string"&&!!t.match(lr.email)&&t.length<255},url:function(t){return typeof t=="string"&&!!t.match(lr.url)},hex:function(t){return typeof t=="string"&&!!t.match(lr.hex)}};function af(e,t,n,r,u){if(e.required&&t===void 0){xu(e,t,n,r,u);return}var i=["integer","float","array","regexp","object","method","email","number","date","url","hex"],a=e.type;i.indexOf(a)>-1?qt[a](t)||r.push(Me(u.messages.types[a],e.fullField,e.type)):a&&typeof t!==e.type&&r.push(Me(u.messages.types[a],e.fullField,e.type))}function of(e,t,n,r,u){var i=typeof e.len=="number",a=typeof e.min=="number",s=typeof e.max=="number",c=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=t,f=null,o=typeof t=="number",h=typeof t=="string",p=Array.isArray(t);if(o?f="number":h?f="string":p&&(f="array"),!f)return!1;p&&(l=t.length),h&&(l=t.replace(c,"_").length),i?l!==e.len&&r.push(Me(u.messages[f].len,e.fullField,e.len)):a&&!s&&l<e.min?r.push(Me(u.messages[f].min,e.fullField,e.min)):s&&!a&&l>e.max?r.push(Me(u.messages[f].max,e.fullField,e.max)):a&&s&&(l<e.min||l>e.max)&&r.push(Me(u.messages[f].range,e.fullField,e.min,e.max))}var vt="enum";function sf(e,t,n,r,u){e[vt]=Array.isArray(e[vt])?e[vt]:[],e[vt].indexOf(t)===-1&&r.push(Me(u.messages[vt],e.fullField,e[vt].join(", ")))}function cf(e,t,n,r,u){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(Me(u.messages.pattern.mismatch,e.fullField,t,e.pattern));else if(typeof e.pattern=="string"){var i=new RegExp(e.pattern);i.test(t)||r.push(Me(u.messages.pattern.mismatch,e.fullField,t,e.pattern))}}}var k={required:xu,whitespace:uf,type:af,range:of,enum:sf,pattern:cf};function lf(e,t,n,r,u){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(re(t,"string")&&!e.required)return n();k.required(e,t,r,i,u,"string"),re(t,"string")||(k.type(e,t,r,i,u),k.range(e,t,r,i,u),k.pattern(e,t,r,i,u),e.whitespace===!0&&k.whitespace(e,t,r,i,u))}n(i)}function ff(e,t,n,r,u){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(re(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&k.type(e,t,r,i,u)}n(i)}function hf(e,t,n,r,u){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(t===""&&(t=void 0),re(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&(k.type(e,t,r,i,u),k.range(e,t,r,i,u))}n(i)}function pf(e,t,n,r,u){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(re(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&k.type(e,t,r,i,u)}n(i)}function df(e,t,n,r,u){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(re(t)&&!e.required)return n();k.required(e,t,r,i,u),re(t)||k.type(e,t,r,i,u)}n(i)}function Df(e,t,n,r,u){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(re(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&(k.type(e,t,r,i,u),k.range(e,t,r,i,u))}n(i)}function Ef(e,t,n,r,u){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(re(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&(k.type(e,t,r,i,u),k.range(e,t,r,i,u))}n(i)}function vf(e,t,n,r,u){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(t==null&&!e.required)return n();k.required(e,t,r,i,u,"array"),t!=null&&(k.type(e,t,r,i,u),k.range(e,t,r,i,u))}n(i)}function gf(e,t,n,r,u){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(re(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&k.type(e,t,r,i,u)}n(i)}var mf="enum";function yf(e,t,n,r,u){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(re(t)&&!e.required)return n();k.required(e,t,r,i,u),t!==void 0&&k[mf](e,t,r,i,u)}n(i)}function Af(e,t,n,r,u){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(re(t,"string")&&!e.required)return n();k.required(e,t,r,i,u),re(t,"string")||k.pattern(e,t,r,i,u)}n(i)}function Ff(e,t,n,r,u){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(re(t,"date")&&!e.required)return n();if(k.required(e,t,r,i,u),!re(t,"date")){var s;t instanceof Date?s=t:s=new Date(t),k.type(e,s,r,i,u),s&&k.range(e,s.getTime(),r,i,u)}}n(i)}function Cf(e,t,n,r,u){var i=[],a=Array.isArray(t)?"array":typeof t;k.required(e,t,r,i,u,a),n(i)}function fr(e,t,n,r,u){var i=e.type,a=[],s=e.required||!e.required&&r.hasOwnProperty(e.field);if(s){if(re(t,i)&&!e.required)return n();k.required(e,t,r,a,u,i),re(t,i)||k.type(e,t,r,a,u)}n(a)}function Bf(e,t,n,r,u){var i=[],a=e.required||!e.required&&r.hasOwnProperty(e.field);if(a){if(re(t)&&!e.required)return n();k.required(e,t,r,i,u)}n(i)}var kt={string:lf,method:ff,number:hf,boolean:pf,regexp:df,integer:Df,float:Ef,array:vf,object:gf,enum:yf,pattern:Af,date:Ff,url:fr,hex:fr,email:fr,required:Cf,any:Bf};function hr(){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 t=JSON.parse(JSON.stringify(this));return t.clone=this.clone,t}}}var pr=hr();function et(e){this.rules=null,this._messages=pr,this.define(e)}et.prototype={messages:function(t){return t&&(this._messages=Ru(hr(),t)),this._messages},define:function(t){if(!t)throw new Error("Cannot configure a schema with no rules");if(typeof t!="object"||Array.isArray(t))throw new Error("Rules must be an object");this.rules={};var n,r;for(n in t)t.hasOwnProperty(n)&&(r=t[n],this.rules[n]=Array.isArray(r)?r:[r])},validate:function(t,n,r){var u=this;n===void 0&&(n={}),r===void 0&&(r=function(){});var i=t,a=n,s=r;if(typeof a=="function"&&(s=a,a={}),!this.rules||Object.keys(this.rules).length===0)return s&&s(),Promise.resolve();function c(D){var v,E=[],y={};function b(F){if(Array.isArray(F)){var $;E=($=E).concat.apply($,F)}else E.push(F)}for(v=0;v<D.length;v++)b(D[v]);E.length?y=cr(E):(E=null,y=null),s(E,y)}if(a.messages){var l=this.messages();l===pr&&(l=hr()),Ru(l,a.messages),a.messages=l}else a.messages=this.messages();var f,o,h={},p=a.keys||Object.keys(this.rules);p.forEach(function(D){f=u.rules[D],o=i[D],f.forEach(function(v){var E=v;typeof E.transform=="function"&&(i===t&&(i=ke({},i)),o=i[D]=E.transform(o)),typeof E=="function"?E={validator:E}:E=ke({},E),E.validator=u.getValidationMethod(E),E.field=D,E.fullField=E.fullField||D,E.type=u.getType(E),E.validator&&(h[D]=h[D]||[],h[D].push({rule:E,value:o,source:i,field:D}))})});var d={};return rf(h,a,function(D,v){var E=D.rule,y=(E.type==="object"||E.type==="array")&&(typeof E.fields=="object"||typeof E.defaultField=="object");y=y&&(E.required||!E.required&&D.value),E.field=D.field;function b(O,T){return ke(ke({},T),{},{fullField:E.fullField+"."+O})}function F(O){O===void 0&&(O=[]);var T=O;if(Array.isArray(T)||(T=[T]),!a.suppressWarning&&T.length&&et.warning("async-validator:",T),T.length&&E.message!==void 0&&(T=[].concat(E.message)),T=T.map($u(E)),a.first&&T.length)return d[E.field]=1,v(T);if(!y)v(T);else{if(E.required&&!D.value)return E.message!==void 0?T=[].concat(E.message).map($u(E)):a.error&&(T=[a.error(E,Me(a.messages.required,E.field))]),v(T);var I={};if(E.defaultField)for(var x in D.value)D.value.hasOwnProperty(x)&&(I[x]=E.defaultField);I=ke(ke({},I),D.rule.fields);for(var W in I)if(I.hasOwnProperty(W)){var U=Array.isArray(I[W])?I[W]:[I[W]];I[W]=U.map(b.bind(null,W))}var K=new et(I);K.messages(a.messages),D.rule.options&&(D.rule.options.messages=a.messages,D.rule.options.error=a.error),K.validate(D.value,D.rule.options||a,function(J){var ee=[];T&&T.length&&ee.push.apply(ee,T),J&&J.length&&ee.push.apply(ee,J),v(ee.length?ee:null)})}}var $;E.asyncValidator?$=E.asyncValidator(E,D.value,F,D.source,a):E.validator&&($=E.validator(E,D.value,F,D.source,a),$===!0?F():$===!1?F(E.message||E.field+" fails"):$ instanceof Array?F($):$ instanceof Error&&F($.message)),$&&$.then&&$.then(function(){return F()},function(O){return F(O)})},function(D){c(D)})},getType:function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!kt.hasOwnProperty(t.type))throw new Error(Me("Unknown rule type %s",t.type));return t.type||"string"},getValidationMethod:function(t){if(typeof t.validator=="function")return t.validator;var n=Object.keys(t),r=n.indexOf("message");return r!==-1&&n.splice(r,1),n.length===1&&n[0]==="required"?kt.required:kt[this.getType(t)]||!1}},et.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");kt[t]=n},et.warning=Iu,et.messages=pr,et.validators=kt;var wf={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 bf(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new et(e);return n.messages(Object.assign(wf,t)),n}var Sf=new jl;function dr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Mf(e){if(Array.isArray(e))return e}function If(e){if(Array.isArray(e))return dr(e)}function Ou(e,t,n,r,u,i,a){try{var s=e[i](a),c=s.value}catch(l){n(l);return}s.done?t(c):Promise.resolve(c).then(r,u)}function Tu(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function a(c){Ou(i,r,u,a,s,"next",c)}function s(c){Ou(i,r,u,a,s,"throw",c)}a(void 0)})}}function _f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Nf(e,t,n){return t&&Pu(e.prototype,t),n&&Pu(e,n),e}function $f(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Lu(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function ju(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Rf(){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 xf(){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 Vu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable}))),r.forEach(function(u){$f(e,u,n[u])})}return e}function Of(e){return Mf(e)||ju(e)||Uu(e)||Rf()}function Dr(e){return If(e)||ju(e)||Uu(e)||xf()}function Uu(e,t){if(!!e){if(typeof e=="string")return dr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return dr(e,t)}}var qu=function(e,t){var n,r,u,i,a={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(l){return function(f){return c([l,f])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(u=a.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){a.label=l[1];break}if(l[0]===6&&a.label<u[1]){a.label=u[1],u=l;break}if(u&&a.label<u[2]){a.label=u[2],a.ops.push(l);break}u[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(f){l=[6,f],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},He=function(){function t(r){var u=this;_f(this,t),this.setting=[],this.eventKeys=[],this.customEvents=[],this.parent=null,this.updateSetting=Hu,this.removeSetting=ku,this._callControlHooks("preInstance",r);var i=Lu(this,t)?this.constructor:void 0,a=i.controlName,s=i.controlIcon,c=i.controlType,l=i.controlFieldType,f=i.controlEventKeys,o=i.controlCustomEvents,h=i.name,p=i.setting;a&&s&&c||yu("The ".concat(h," controlName,controlIcon,controlType is not define"));var d;this.id=(d=r==null?void 0:r.id)!==null&&d!==void 0?d:du(10),this.name=a,this.icon=s;var D;this.type=(D=r==null?void 0:r.type)!==null&&D!==void 0?D:c,this.props=new lt(r==null?void 0:r.props,(Lu(this,t)?this.constructor:void 0).controlName);var v;this.controlType=(v=r==null?void 0:r.controlType)!==null&&v!==void 0?v:"base",this.setting=st(p);var E;this.fieldType=(E=r==null?void 0:r.fieldType)!==null&&E!==void 0?E:l,this.eventKeys=st(f),this.customEvents=st(o),Promise.resolve().then(function(){u._callControlHooks("postInstance",r)})}var n=t.prototype;return n._callControlHooks=function(){for(var u=arguments.length,i=new Array(u),a=0;a<u;a++)i[a]=arguments[a];var s,c=Of(i),l=c[0],f=c.slice(1);return(s=Sf).emit.apply(s,[l,this].concat(Dr(f)))},n.preUpdate=function(u,i){this._callControlHooks("preUpdateProps",u,i)},n.postUpdate=function(u,i){this._callControlHooks("postUpdateProps",u,i)},n.updateProps=function(u,i){this.preUpdate(u,i),Il(this.props,u,i),this.postUpdate(u,i)},n.preValidate=function(){var u=this;return Tu(function(){var i,a,s;return qu(this,function(c){switch(c.label){case 0:return i=Vu({},u.rules),[4,u._callControlHooks("preValidate",i)];case 1:return a=c.sent(),s=a[a.length-1],[2,s===!1?void 0:s]}})})()},n.validate=function(u,i){var a=this;return Tu(function(){var s,c,l,f;return qu(this,function(o){switch(o.label){case 0:return[4,a.preValidate()];case 1:s=o.sent(),c=s!==void 0?s:Vu({},a.rules),Array.isArray(i)&&i.forEach(function(h){c.hasOwnProperty(h)&&delete c[h]}),l=bf(c,u),o.label=2;case 2:return o.trys.push([2,4,,5]),[4,l.validate(a.props)];case 3:return o.sent(),[2,!0];case 4:throw f=o.sent(),f.control||(f.control=a),f;case 5:return[2]}})})()},n.toDataBindModel=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this.fieldType,a=this.id,s=this.type,c=this.props,l=c.dataBind,f=c.datasourceBind,o=c.optionConfig,h=c.caption,p=c.required,d=c.maxLength,D=c.options,v=c.encrypted,E=c.encryptedMode;if(!(!i&&!l&&!f)){var y={parentId:u,fieldType:i,controlId:a,caption:h,type:s,props:{}};switch(l&&(y.dataBind=l),o){case"datasource":case void 0:f&&(y.datasourceBind=f);break;case"custom":y.props.options=D;break}return p!==void 0&&(y.required=p),d!==void 0&&(y.maxLength=d),v!==void 0&&(y.encrypted=v),E!==void 0&&(y.encryptedMode=E),y}},n.preToSchema=function(){this._callControlHooks("preToSchema",this)},n.toSchema=function(){return this.preToSchema(),{id:this.id,type:this.type,props:st(this.props),fieldType:this.fieldType,controlType:this.controlType}},t.updateBasicControl=function(u,i){if(u==="setting"){if(i.add){var a;(a=this.setting).push.apply(a,Dr(i.add))}i.remove&&this.removeSettingItem(i.remove),i.update}},Nf(t,[{key:"rules",get:function(){var u=this.props.constructor.Rules;return u?new u(this.props):{}}}]),t}();He.controlName="\u63A7\u4EF6",He.controlIcon="icon",He.controlType="control",He.controlEventKeys=[],He.controlCustomEvents=[],He.setting=[],He.__is_control__=!0,He.removeSettingItem=ku,He.updateSettingItem=Hu;function ku(e){var t=this,n=Array.isArray(e)?e:[e];n.forEach(function(r){var u=typeof r!="string",i=t.setting.findIndex(function(c){return c.key===(u?r.key:r)});if(i!==-1){var a,s;u?t.setting[i].showItems=(a=t.setting[i].showItems)===null||a===void 0?void 0:a.filter(function(c){return!r.hideItems.includes(c)}):t.setting.splice(i,1),u&&!(!((s=t.setting[i].showItems)===null||s===void 0)&&s.length)&&t.setting.splice(i,1)}})}function Hu(e,t){var n=this,r=typeof e=="string"?[e]:e;r.forEach(function(u){var i=n.setting.find(function(l){return l.key===u});if(i){if(typeof t=="boolean")i.visible=t;else if(typeof t=="object"){var a,s=(a=t.type)!==null&&a!==void 0?a:"replace";if(s==="replace")i.showItems=t.showItems;else{var c;(c=i.showItems).push.apply(c,Dr(t.showItems))}}}})}function Tf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function zu(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Pf(e,t,n){return t&&zu(e.prototype,t),n&&zu(e,n),e}function Lf(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var gt=function(){function t(n){Tf(this,t),this.customEvents=[],this.parent=null;var r=Lf(this,t)?this.constructor:void 0,u=r.controlType,i=r.controlFieldType,a=r.name,s=r.controlCustomEvents;u||yu("The ".concat(a," controlType is not define"));var c;this.id=(c=n==null?void 0:n.id)!==null&&c!==void 0?c:du(10);var l;this.type=(l=n==null?void 0:n.type)!==null&&l!==void 0?l:u,this.props=new lt(n==null?void 0:n.props),this.customEvents=s;var f;this.controlType=(f=n==null?void 0:n.controlType)!==null&&f!==void 0?f:"base";var o;this.fieldType=(o=n==null?void 0:n.fieldType)!==null&&o!==void 0?o:i;var h;this.pageStatus=(h=n==null?void 0:n.pageStatus)!==null&&h!==void 0?h:ur.UNKNOWN}return Pf(t,[{key:"rules",get:function(){var r=this.props.constructor.RuntimeRules;if(r){var u=new r(this.props);return Array.from(u)}return[]}}]),t}();gt.controlType="control",gt.__is_control__=!0,gt.controlCustomEvents=[];function jf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Er(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function dn(e){return dn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},dn(e)}function vr(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&gr(e,t)}function Vf(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Uf(e,t){return t&&(qf(t)==="object"||typeof t=="function")?t:jf(e)}function gr(e,t){return gr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},gr(e,t)}var qf=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function kf(){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(e){return!1}}function mr(e){var t=kf();return function(){var r=dn(e),u;if(t){var i=dn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Uf(this,u)}}var Hf=function(e){vr(n,e);var t=mr(n);function n(r){Er(this,n);var u;u=t.call(this,r),u.dataBind={},u.caption={type:"string",required:!0,message:Ue.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:Ue.getMessage("pleaseEnterCaptionTip")};var i={fieldCode:{type:"string",required:!0,message:Ue.getMessage("pleaseEnterFieldCode")},dataCode:{type:"string",required:!0,message:Ue.getMessage("pleaseEnterFieldCode")}};if(Vf(r.dataBind,jt))u.dataBind={type:"object",required:!0,fields:st(i),message:Ue.getMessage("pleaseEnterFieldCode")};else{var a={type:"object",required:!0,fields:{},message:Ue.getMessage("pleaseEnterFieldCode")};Object.keys(r.dataBind).forEach(function(s){a.fields[s]={type:"object",required:!0,fields:st(i),message:Ue.getMessage("pleaseEnterFieldCode")}}),u.dataBind=a}return r.isShowCaptionTip&&(u.captionTip.required=!0),u}return n}(Su),zf=function(e){vr(n,e);var t=mr(n);function n(r){Er(this,n);var u;return u=t.call(this,r),u.push({type:"string",required:r.isHide?!1:r.required,message:r.requiredMessage!==""?r.requiredMessage:Ue.getMessage("runtimeRequired",{caption:r.caption})}),u}return n}(Mu),yr=function(e){vr(n,e);var t=mr(n);function n(r){Er(this,n);var u;u=t.call(this,r);var i;u.caption=(i=r==null?void 0:r.caption)!==null&&i!==void 0?i:"";var a;u.isHideCaption=(a=r==null?void 0:r.isHideCaption)!==null&&a!==void 0?a:!1;var s;u.isShowCaptionTip=(s=r==null?void 0:r.isShowCaptionTip)!==null&&s!==void 0?s:!1;var c;u.captionTip=(c=r==null?void 0:r.captionTip)!==null&&c!==void 0?c:"";var l;u.defaultState=(l=r==null?void 0:r.defaultState)!==null&&l!==void 0?l:"default";var f;u.labelPosition=(f=r==null?void 0:r.labelPosition)!==null&&f!==void 0?f:"top";var o;u.placeholder=(o=r==null?void 0:r.placeholder)!==null&&o!==void 0?o:"";var h;u.required=(h=r==null?void 0:r.required)!==null&&h!==void 0?h:!1;var p;u.requiredMessage=(p=r==null?void 0:r.requiredMessage)!==null&&p!==void 0?p:"",u.dataBind=new jt(r==null?void 0:r.dataBind);var d;return u.defaultValue=(d=r==null?void 0:r.defaultValue)!==null&&d!==void 0?d:"",u}return n}(lt);yr.Rules=Hf,yr.RuntimeRules=zf;function Wf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Gf(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Dn(e){return Dn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Dn(e)}function Xf(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ar(e,t)}function Zf(e,t){return t&&(Jf(t)==="object"||typeof t=="function")?t:Wf(e)}function Ar(e,t){return Ar=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Ar(e,t)}var Jf=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Kf(){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(e){return!1}}function Qf(e){var t=Kf();return function(){var r=Dn(e),u;if(t){var i=Dn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Zf(this,u)}}var ze=function(e){Xf(n,e);var t=Qf(n);function n(r){Gf(this,n);var u;return u=t.call(this,r),u.controlType="form",u.props=new yr(r==null?void 0:r.props),u}return n}(gt);function Yf(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function e0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function En(e){return En=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},En(e)}function t0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Fr(e,t)}function n0(e,t){return t&&(r0(t)==="object"||typeof t=="function")?t:Yf(e)}function Fr(e,t){return Fr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Fr(e,t)}var r0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function u0(){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(e){return!1}}function i0(e){var t=u0();return function(){var r=En(e),u;if(t){var i=En(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return n0(this,u)}}var Wu=function(e){t0(n,e);var t=i0(n);function n(r){return e0(this,n),t.call(this,r)}return n}(lt);function Cr(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function a0(e){if(Array.isArray(e))return Cr(e)}function o0(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function s0(){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 Gu(e){return a0(e)||o0(e)||c0(e)||s0()}function c0(e,t){if(!!e){if(typeof e=="string")return Cr(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Cr(e,t)}}function l0(e,t){var n;!((n=Object.getOwnPropertyDescriptors(e)[t])===null||n===void 0)&&n.enumerable&&Object.defineProperty(e,t,{enumerable:!1})}function Xu(e,t){e.parent=t,l0(e,"parent")}function f0(e,t){e.forEach(function(n){Xu(n,t)})}var Zu=Symbol("targetKey");function Ju(e){var t;return(t=e[Zu])!==null&&t!==void 0?t:e}function Ku(e,t){return f0(e,t),new Proxy(e,{get:function(r,u){for(var i=arguments.length,a=new Array(i>2?i-2:0),s=2;s<i;s++)a[s-2]=arguments[s];var c;return u===Zu?r:(c=Reflect).get.apply(c,[r,u].concat(Gu(a)))},set:function(r,u,i){for(var a=arguments.length,s=new Array(a>3?a-3:0),c=3;c<a;c++)s[c-3]=arguments[c];var l;if(Nl(e)&&u==="length"&&i===e.length)return!0;var f=(l=Reflect).set.apply(l,[r,u,i].concat(Gu(s)));return _l(i)&&Xu(i,t),f}})}function vn(e,t,n,r){var u=r!=null?r:e,i=Ku(Ju(n!=null?n:[]),u);Object.defineProperty(e,t,{get:function(){return i},set:function(s){i=Ku(Ju(s),u)},enumerable:!0})}function Br(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function h0(e){if(Array.isArray(e))return Br(e)}function Qu(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Yu(e,t,n,r,u,i,a){try{var s=e[i](a),c=s.value}catch(l){n(l);return}s.done?t(c):Promise.resolve(c).then(r,u)}function p0(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function a(c){Yu(i,r,u,a,s,"next",c)}function s(c){Yu(i,r,u,a,s,"throw",c)}a(void 0)})}}function d0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function D0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function mt(e,t,n){return typeof Reflect!="undefined"&&Reflect.get?mt=Reflect.get:mt=function(u,i,a){var s=B0(u,i);if(!!s){var c=Object.getOwnPropertyDescriptor(s,i);return c.get?c.get.call(a):c.value}},mt(e,t,n||e)}function tt(e){return tt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},tt(e)}function E0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&wr(e,t)}function v0(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function g0(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function m0(){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 y0(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{},r=Object.keys(n);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(n).filter(function(u){return Object.getOwnPropertyDescriptor(n,u).enumerable}))),r.forEach(function(u){D0(e,u,n[u])})}return e}function A0(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),n.push.apply(n,r)}return n}function F0(e,t){return t=t!=null?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):A0(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function C0(e,t){return t&&(w0(t)==="object"||typeof t=="function")?t:Qu(e)}function wr(e,t){return wr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},wr(e,t)}function B0(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=tt(e),e!==null););return e}function ei(e){return h0(e)||g0(e)||b0(e)||m0()}var w0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function b0(e,t){if(!!e){if(typeof e=="string")return Br(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Br(e,t)}}function S0(){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(e){return!1}}function M0(e){var t=S0();return function(){var r=tt(e),u;if(t){var i=tt(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return C0(this,u)}}var I0=function(e,t){var n,r,u,i,a={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(l){return function(f){return c([l,f])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(u=a.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){a.label=l[1];break}if(l[0]===6&&a.label<u[1]){a.label=u[1],u=l;break}if(u&&a.label<u[2]){a.label=u[2],a.ops.push(l);break}u[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(f){l=[6,f],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},_0=1e4,ti=function(t){E0(r,t);var n=M0(r);function r(i){d0(this,r);var a;a=n.call(this,i),a.controlType="layout";var s=v0(this,r)?this.constructor:void 0,c=s.excludes,l=s.childrenMaxLength;return a.props=new Wu(i==null?void 0:i.props),vn(Qu(a),"children",i==null?void 0:i.children),a.excludes=st(c),a.childrenMaxLength=l,a}var u=r.prototype;return u.judgeExcludesChildren=function(a){return this.excludes===!1||Array.isArray(this.excludes)&&!this.excludes.includes(a)},u.judgeJoinChildren=function(a){var s=this.judgeExcludesChildren(a);return s&&this.childrenMaxLength>this.children.length},u.validate=function(a,s){var c=this,l=this,f=function(){return mt(tt(r.prototype),"validate",c)};return p0(function(){return I0(this,function(o){switch(o.label){case 0:return[4,f().call(l,a,s)];case 1:return o.sent(),[4,Promise.all(l.children.map(function(h){return h.validate(a,s)}))];case 2:return o.sent(),[2,!0]}})})()},u.toDataBindModel=function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,s=mt(tt(r.prototype),"toDataBindModel",this).call(this),c=s?[s]:[];return this.children.reduce(function(l,f){var o=f.toDataBindModel(a);if(Array.isArray(o)){var h=o.filter(function(p){return!!p});return ei(l).concat(ei(h))}return o&&l.push(o),l},c)},u.toSchema=function(){var a=mt(tt(r.prototype),"toSchema",this).call(this),s=this.children.map(function(c){var l=c.toSchema();return l});return F0(y0({},a),{children:s})},r}(He);ti.excludes=!1,ti.childrenMaxLength=_0;function ni(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function N0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gn(e){return gn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},gn(e)}function $0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&br(e,t)}function R0(e,t){return t&&(x0(t)==="object"||typeof t=="function")?t:ni(e)}function br(e,t){return br=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},br(e,t)}var x0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function O0(){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(e){return!1}}function T0(e){var t=O0();return function(){var r=gn(e),u;if(t){var i=gn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return R0(this,u)}}var P0=function(e){$0(n,e);var t=T0(n);function n(r){N0(this,n);var u;return u=t.call(this,r),u.controlType="layout",u.props=new Wu(r==null?void 0:r.props),vn(ni(u),"children",r==null?void 0:r.children),u}return n}(gt);function ri(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function L0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function mn(e){return mn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},mn(e)}function j0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Sr(e,t)}function V0(e,t){return t&&(U0(t)==="object"||typeof t=="function")?t:ri(e)}function Sr(e,t){return Sr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Sr(e,t)}var U0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function q0(){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(e){return!1}}function k0(e){var t=q0();return function(){var r=mn(e),u;if(t){var i=mn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return V0(this,u)}}var H0=function(e){j0(n,e);var t=k0(n);function n(r,u){L0(this,n);var i;return i=t.call(this,u),vn(ri(i),"headers",u==null?void 0:u.headers,r),i}return n}(lt);pe.LIST;function Mr(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function z0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ui(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function W0(e,t,n){return t&&ui(e.prototype,t),n&&ui(e,n),e}function yn(e){return yn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},yn(e)}function G0(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ir(e,t)}function X0(e,t){return t&&(Z0(t)==="object"||typeof t=="function")?t:Mr(e)}function Ir(e,t){return Ir=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Ir(e,t)}var Z0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function J0(){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(e){return!1}}function K0(e){var t=J0();return function(){var r=yn(e),u;if(t){var i=yn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return X0(this,u)}}var An=function(e){G0(n,e);var t=K0(n);function n(r){z0(this,n);var u;return u=t.call(this,r),u.controlType="list",u.props=new H0(Mr(u),r==null?void 0:r.props),vn(Mr(u),"children",r==null?void 0:r.children),u}return W0(n,[{key:"length",get:function(){return this.children.length}}]),n}(gt),Q0="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u5B57",Y0="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5B57\u7B26\u4E32",eh="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5BF9\u8C61",th="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u7EC4",nh="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5E03\u5C14",rh="{caption}\u5FC5\u586B",uh="\u8BF7\u8F93\u5165\u6807\u9898",ih="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",ah="\u8BF7\u8F93\u5165\u63D0\u793A\u6587\u5B57",oh="\u8BF7\u7ED1\u5B9A\u6570\u636E\u9879",sh="\u8BF7\u7ED1\u5B9A\u8868\u5355",ch="\u8BF7\u7ED1\u5B9A\u5217\u8868",lh="\u8BF7\u7ED1\u5B9A\u6D41\u7A0B",fh="\u8BF7\u8F93\u5165\u663E\u793A\u503C",hh="\u8BF7\u8F93\u5165\u5B58\u50A8\u503C",ph="\u5355\u636E\u7F16\u53F7\u672A\u7ED1\u5B9A\u6570\u636E\u9879",dh="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",Dh="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u7684\u6570\u503C",Eh="\u8BF7\u8F93\u5165\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",vh="\u6570\u503C\u8303\u56F4\u8BBE\u7F6E\u6709\u8BEF",gh="\u8BF7\u8F93\u5165\u957F\u5EA6\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u503C",mh="\u9644\u4EF6\u5927\u5C0F\u5FC5\u987B\u57280MB\u81F31000MB\u4E4B\u95F4",yh="\u8BF7\u586B\u5199\u603B\u5206\u8BBE\u7F6E",Ah="\u603B\u5206\u4E0D\u80FD\u5C0F\u4E8E1",Fh="\u9ED8\u8BA4\u503C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",Ch="\u9644\u4EF6\u4E0A\u4F20\u7684\u6570\u91CF\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",Bh="\u8BF7\u91CD\u65B0\u9009\u62E9\u53EF\u9009\u6570\u91CF",wh="\u8BE5\u63A7\u4EF6\u6700\u5927\u957F\u5EA6\u9700\u5927\u4E8E\u6700\u5C0F\u957F\u5EA6",bh="\u8BE5\u63A7\u4EF6\u6700\u5C0F\u957F\u5EA6\u9700\u5C0F\u4E8E\u6700\u5927\u957F\u5EA6",Sh="\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u9009\u9879\u8BBE\u7F6E",Mh="\u9009\u9879ID\u4E0D\u80FD\u91CD\u590D",Ih="\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u6761\u9009\u9879",_h="\u8BF7\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Nh="\u8BF7\u7ED1\u5B9A\u5B58\u50A8\u503C",$h="\u8BF7\u7ED1\u5B9A\u670D\u52A1",Rh="\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",xh="\u8BF7\u9009\u62E9\u7701",Oh="\u8BF7\u9009\u62E9\u5E02",Th="\u8BF7\u9009\u62E9\u533A",Ph="\u6700\u5C11\u586B\u5199\u884C\u6570\u4E0D\u80FD\u5C0F\u4E8E0",Lh="\u884C\u6570\u91CF\u4E0D\u80FD\u5C0F\u4E8E{min}\u884C",jh="\u8BF7\u8F93\u5165\u5217\u5BBD",Vh="\u8BF7\u8BBE\u7F6E\u6240\u6709\u89C4\u5219\u6761\u4EF6\u7684\u903B\u8F91\u5173\u7CFB",Uh="\u8BF7\u5C06\u6240\u6709\u89C4\u5219\u6761\u4EF6\u586B\u5199\u5B8C\u6574",qh="\u8BF7\u9009\u62E9\u63A7\u4EF6",kh="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5",Hh="\u8BF7\u9009\u62E9\u56DE\u586B\u8BBE\u7F6E",zh="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Wh="\u8BF7\u9009\u62E9\u6839\u8282\u70B9",Gh="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Xh="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Zh="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Jh="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Kh="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Qh="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Yh="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",ep="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",tp="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",np="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",rp="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",up="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",ip="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",ap="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",op="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",sp="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",cp="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",lp={isNotNumber:Q0,isNotString:Y0,isNotObject:eh,isNotArray:th,isNotBoolean:nh,runtimeRequired:rh,pleaseEnterCaption:uh,pleaseEnterCaptionTip:ih,pleaseEnterPlaceholder:ah,pleaseEnterFieldCode:oh,pleaseEnterForm:sh,pleaseEnterList:ch,pleaseEnterProcess:lh,pleaseEnterLabel:fh,pleaseEnterValue:hh,bizKeyNotBindFiled:ph,pleaseEnterNumberRange:dh,pleaseEnterAValueGreaterThanMin:Dh,pleaseEnterAValueLessThanMax:Eh,numberRangeSetError:vh,stringRangeError:gh,attachmentMaxSize:mh,pleaseEnterTotalScoreSetting:yh,theTotalScoreMustNotBeLessThan1:Ah,scoreDefaultValueRange:Fh,attachmentLimitError:Ch,PleaseReselectTheOptionalQuantity:Bh,TheMaximumLengthIsGreaterThanTheMinimumLength:wh,TheMinimumLengthIsGreaterThanTheMaximumLength:bh,PleaseSelectTheCorrectOptionSettings:Sh,optionIdIsRepeat:Mh,optionIsRequired:Ih,pleaseEnterDataCode:_h,pleaseEnterValueFieldCode:Nh,pleaseEnterSvcCode:$h,pleaseBindAtLeastOneDisplayValue:Rh,pleaseSelectProvince:xh,pleaseSelectCity:Oh,pleaseSelectDistrict:Th,limitRowsCannotBeLessThan0:Ph,TheNumberOfRowsCannotBeLessThanMinRows:Lh,pleaseEnterColumnWidth:jh,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Vh,pleaseCompleteAllRulesAndConditions:Uh,pleaseSelectControl:qh,pleaseSelectAtLeastOneColumn:kh,pleaseSelectFillBackMode:Hh,pleaseSelectDashboard:zh,rootNodeIsRequired:Wh,theViewNameCannotBeEmpty:Gh,pleaseSelectOcrType:Xh,pleaseSelectAtLeastOneFieldToFillIn:Zh,pleaseChooseAtLeastOne:Jh,pleaseEnterButtonContent:Kh,pleaseEnterDataCodeInDataSetting:Qh,pleaseEnterValueFieldCodeInDataSetting:Yh,pleaseEnterSvcCodeInDataSetting:ep,pleaseBindAtLeastOneDisplayValueInDataSetting:tp,rootNodeIsRequiredInDataSetting:np,pleaseEnterMaxHeight:rp,pleaseEnter:up,pleaseEnterWatermark:ip,pleaseEnterFileName:ap,pleaseUploadAtLeastOnePrintTemplate:op,pleaseAssignBusiness:sp,pleaseAssignExternal:cp},fp="Please enter a number",hp="Please enter a string",pp="Please enter an object",dp="Please enter an array",Dp="Please enter a boolean",Ep="{caption} Required",vp="Please enter the title",gp="Please enter the bubble prompt",mp="Please enter the prompt text",yp="Please bind data items",Ap="Please bind the form",Fp="Please bind the list",Cp="Please bind the process",Bp="Please enter the displayed value",wp="Please enter the stored value",bp="The document number is not bound to the data item",Sp="Please enter a value greater than or equal to {min} and less than or equal to {max}",Mp="Please enter a value greater than or equal to {min}",Ip="Please enter a value less than or equal to {max}",_p="The value range is set incorrectly",Np="Please enter a value with a length greater than or equal to {min} and less than or equal to {max}",$p="The attachment size must be between 0MB and 1000MB",Rp="Please fill in the total score setting",xp="The total score cannot be less than 1",Op="The default value must be between {min} and {max}",Tp="The number of attachments uploaded must be between {min} and {max}",Pp="Please re-select the optional quantity",Lp="The maximum length of the control must be greater than the minimum length",jp="The minimum length of the control must be less than the maximum length",Vp="Please select the correct option setting",Up="Option ID cannot be repeated",qp="Please enter at least one option",kp="Please bind the data source",Hp="Please bind the stored value",zp="Please bind the service",Wp="At least one display value must be bound",Gp="Please select a province",Xp="Please select a city",Zp="Please select a district",Jp="The minimum number of lines to fill in cannot be less than 0",Kp="The number of rows cannot be less than {min} rows",Qp="Please enter the column width",Yp="Please set the logical relationship of all rule conditions",ed="Please complete all rules and conditions",td="please select control",nd="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",rd="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",ud="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",id="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",ad="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",od="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",sd="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",cd="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",ld="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",fd="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",hd="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",pd="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",dd="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Dd="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Ed="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",vd="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",gd="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",md="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",yd={isNotNumber:fp,isNotString:hp,isNotObject:pp,isNotArray:dp,isNotBoolean:Dp,runtimeRequired:Ep,pleaseEnterCaption:vp,pleaseEnterCaptionTip:gp,pleaseEnterPlaceholder:mp,pleaseEnterFieldCode:yp,pleaseEnterForm:Ap,pleaseEnterList:Fp,pleaseEnterProcess:Cp,pleaseEnterLabel:Bp,pleaseEnterValue:wp,bizKeyNotBindFiled:bp,pleaseEnterNumberRange:Sp,pleaseEnterAValueGreaterThanMin:Mp,pleaseEnterAValueLessThanMax:Ip,numberRangeSetError:_p,stringRangeError:Np,attachmentMaxSize:$p,pleaseEnterTotalScoreSetting:Rp,theTotalScoreMustNotBeLessThan1:xp,scoreDefaultValueRange:Op,attachmentLimitError:Tp,PleaseReselectTheOptionalQuantity:Pp,TheMaximumLengthIsGreaterThanTheMinimumLength:Lp,TheMinimumLengthIsGreaterThanTheMaximumLength:jp,PleaseSelectTheCorrectOptionSettings:Vp,optionIdIsRepeat:Up,optionIsRequired:qp,pleaseEnterDataCode:kp,pleaseEnterValueFieldCode:Hp,pleaseEnterSvcCode:zp,pleaseBindAtLeastOneDisplayValue:Wp,pleaseSelectProvince:Gp,pleaseSelectCity:Xp,pleaseSelectDistrict:Zp,limitRowsCannotBeLessThan0:Jp,TheNumberOfRowsCannotBeLessThanMinRows:Kp,pleaseEnterColumnWidth:Qp,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Yp,pleaseCompleteAllRulesAndConditions:ed,pleaseSelectControl:td,pleaseSelectDashboard:nd,theViewNameCannotBeEmpty:rd,pleaseSelectOcrType:ud,pleaseSelectAtLeastOneFieldToFillIn:id,pleaseChooseAtLeastOne:ad,pleaseEnterButtonContent:od,pleaseEnterDataCodeInDataSetting:sd,pleaseEnterValueFieldCodeInDataSetting:cd,pleaseEnterSvcCodeInDataSetting:ld,pleaseBindAtLeastOneDisplayValueInDataSetting:fd,rootNodeIsRequiredInDataSetting:hd,pleaseEnterMaxHeight:pd,pleaseEnter:dd,pleaseEnterWatermark:Dd,pleaseEnterFileName:Ed,pleaseUploadAtLeastOnePrintTemplate:vd,pleaseAssignBusiness:gd,pleaseAssignExternal:md},Ad="\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Fd="\u6587\u5B57\u5217\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Cd="\u5BFE\u8C61\u7269\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Bd="\u6570\u5B57\u7D44\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",wd="\u30D6\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",bd="{caption}\u5FC5\u9808",Sd="\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Md="\u6C17\u6CE1\u306E\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Id="\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",_d="\u30C7\u30FC\u30BF\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Nd="\u30B7\u30FC\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",$d="\u30EA\u30B9\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Rd="\u30D5\u30ED\u30FC\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",xd="\u8868\u793A\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Od="\u4FDD\u5B58\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Td="\u30B7\u30FC\u30C8\u756A\u53F7\u304C\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",Pd="{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Ld="{min}\u4EE5\u4E0A\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",jd="{max}\u672A\u6E80\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Vd="\u6570\u5024\u7BC4\u56F2\u8A2D\u5B9A\u30A8\u30E9\u30FC",Ud="\u9577\u3055\u304C{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",qd="\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306F0MB\u304B\u30891000MB\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",kd="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Hd="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u306F\uFF11\u4EE5\u4E0A\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",zd="\u57FA\u672C\u8A2D\u5B9A\u5024\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Wd="\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4EF6\u6570\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059",Gd="\u6570\u91CF\u3092\u518D\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Xd="\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",Zd="\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",Jd="\u6B63\u78BA\u306A\u8A2D\u5B9A\u5024\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Kd="ID\u306F\u91CD\u8907\u3057\u306A\u3044\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",Qd="\u6700\u4F4E\uFF11\u70B9\u3092\u9078\u3076\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",Yd="\u5143\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",e1="\u4FDD\u5B58\u5024\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",t1="\u30B5\u30FC\u30D3\u30B9\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",n1="\u8868\u793A\u5024\u3092\u30EA\u30F3\u30AF\u3057\u76F4\u3057\u3057\u3066\u4E0B\u3055\u3044",r1="\u7701\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",u1="\u5E02\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",i1="\u533A\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",a1="\u6700\u5C0F\u5024\u306F\uFF10\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",o1="\u6700\u4F4E\u884C\u6570\u306F{min}\u884C\u3067\u304A\u9858\u3044\u3057\u307E\u3059",s1="\u5217\u5E45\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",c1="\u5168\u3066\u306E\u6761\u4EF6\u306E\u30ED\u30B8\u30C3\u30AF\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",l1="\u5168\u3066\u306E\u6761\u4EF6\u3092\u5B8C\u6210\u3055\u305B\u3066\u4E0B\u3055\u3044",f1="please select control",h1="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",p1="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",d1="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",D1="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",E1="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",v1="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",g1="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",m1="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",y1="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",A1="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",F1="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",C1="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",B1="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",w1="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",b1="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",S1="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",M1="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",I1="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",_1={isNotNumber:Ad,isNotString:Fd,isNotObject:Cd,isNotArray:Bd,isNotBoolean:wd,runtimeRequired:bd,pleaseEnterCaption:Sd,pleaseEnterCaptionTip:Md,pleaseEnterPlaceholder:Id,pleaseEnterFieldCode:_d,pleaseEnterForm:Nd,pleaseEnterList:$d,pleaseEnterProcess:Rd,pleaseEnterLabel:xd,pleaseEnterValue:Od,bizKeyNotBindFiled:Td,pleaseEnterNumberRange:Pd,pleaseEnterAValueGreaterThanMin:Ld,pleaseEnterAValueLessThanMax:jd,numberRangeSetError:Vd,stringRangeError:Ud,attachmentMaxSize:qd,pleaseEnterTotalScoreSetting:kd,theTotalScoreMustNotBeLessThan1:Hd,scoreDefaultValueRange:zd,attachmentLimitError:Wd,PleaseReselectTheOptionalQuantity:Gd,TheMaximumLengthIsGreaterThanTheMinimumLength:Xd,TheMinimumLengthIsGreaterThanTheMaximumLength:Zd,PleaseSelectTheCorrectOptionSettings:Jd,optionIdIsRepeat:Kd,optionIsRequired:Qd,pleaseEnterDataCode:Yd,pleaseEnterValueFieldCode:e1,pleaseEnterSvcCode:t1,pleaseBindAtLeastOneDisplayValue:n1,pleaseSelectProvince:r1,pleaseSelectCity:u1,pleaseSelectDistrict:i1,limitRowsCannotBeLessThan0:a1,TheNumberOfRowsCannotBeLessThanMinRows:o1,pleaseEnterColumnWidth:s1,pleaseSetTheLogicalRelationshipOfAllRuleConditions:c1,pleaseCompleteAllRulesAndConditions:l1,pleaseSelectControl:f1,pleaseSelectDashboard:h1,theViewNameCannotBeEmpty:p1,pleaseSelectOcrType:d1,pleaseSelectAtLeastOneFieldToFillIn:D1,pleaseChooseAtLeastOne:E1,pleaseEnterButtonContent:v1,pleaseEnterDataCodeInDataSetting:g1,pleaseEnterValueFieldCodeInDataSetting:m1,pleaseEnterSvcCodeInDataSetting:y1,pleaseBindAtLeastOneDisplayValueInDataSetting:A1,rootNodeIsRequiredInDataSetting:F1,pleaseEnterMaxHeight:C1,pleaseEnter:B1,pleaseEnterWatermark:w1,pleaseEnterFileName:b1,pleaseUploadAtLeastOnePrintTemplate:S1,pleaseAssignBusiness:M1,pleaseAssignExternal:I1},N1={zhCN:lp,enUS:yd,jaJP:_1},Te;(function(e){e.Number="Number",e.Operator="Operator",e.VariableInMainTable="VariableInMainTable",e.VariableInCurrentSubTable="VariableInCurrentSubTable",e.VariableInOtherSubTable="VariableInOtherSubTable",e.UndefinedVariable="UndefinedVariable"})(Te||(Te={}));var yt;(function(e){e.SUM="SUM",e.AVG="AVG",e.MAX="MAX",e.MIN="MIN"})(yt||(yt={}));var ii="zh-CN";function Ie(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var At;(function(e){e.BASE="base",e.FORM="form",e.LAYOUT="layout",e.WRAP="wrap",e.COLUMN="column",e.LIST="list",e.SEARCH="search"})(At||(At={}));var X;(function(e){e.TITLE="title",e.LINK="link",e.BUTTON="button",e.DIVIDER="divider",e.TEXT="text",e.CREATE_FORM_LIST_BUTTON="list-page-btn-create-form",e.BATCH_SUBMISSION_LIST_BUTTON="list-page-btn-batch-submission",e.SUBMISSION_RECORD_LIST_BUTTON="list-page-btn-submission-record",e.IMPORT_RECORD_LIST_BUTTON="list-page-btn-import-record",e.EXPORT_RECORD_LIST_BUTTON="list-page-btn-export-record",e.EXPORT_LIST_BUTTON="list-page-btn-export-list",e.LIST_SELECT_BUTTON="list-select-button",e.FORM_SELECT_BUTTON="form-select-button",e.LIST_VIEW_SELECT="list-view-select",e.TEXT_OCR_BUTTON="text-ocr-button",e.INVOICE_CHECK_BUTTON="invoice-check-button",e.LIST_PAGE_BTN_BATCH_PRINT="list-page-btn-batch-print",e.LIST_PAGE_BTN_BATCH_PRINT_RECORD="list-page-btn-batch-print-record",e.VARCHAR_COLUMN="varchar-column",e.TEXT_COLUMN="text-column",e.DECIMAL_COLUMN="decimal-column",e.TIMESCOPE_COLUMN="timescope-column",e.TIMESTAMP_COLUMN="timestamp-column",e.ARRAY_COLUMN="array-column",e.DEPARTMENT_COLUMN="department-column",e.AUTO_NUMBER_COLUMN="auto-number-column",e.FILE_COLUMN="file-column",e.IMAGE_COLUMN="image-column",e.PEOPLE_COLUMN="people-column",e.LOCATION_COLUMN="location-column",e.CUSTOM_COLUMN="custom-column",e.ORDER_COLUMN="order-column",e.OPERATION_COLUMN="operation-column",e.EMPLOYEE_COLUMN="employee-column",e.ADDRESS="address",e.AMOUNT="amount",e.ATTACHMENT="attachment",e.AUTO_NUMBER="auto-number",e.CALC="calc",e.CHECKBOX="checkbox",e.DATE_PICKER="date-picker",e.DATE_RANGE="date-range",e.DEPARTMENT="department",e.EMPLOYEE="employee",e.IMAGE="image",e.INPUT="input",e.NUMBER="number",e.RADIO="radio",e.RICH_TEXT="rich-text",e.SCORE="score",e.SEARCH_DATE_RANGE="search-date-range",e.SEARCH_NUMBER_RANGE="search-number-range",e.SEARCH_INPUT="search-input",e.SELECT="select",e.SELECT_MULTIPLE="select-multiple",e.SELECT_RELATION="select-relation",e.VUE_FORM_ITEM="vue-form-item",e.TEXTAREA="textarea",e.EMAIL="email",e.FOOTER="footer",e.HEADER="header",e.ID_CARD="id-card",e.MOBILE="mobile",e.PHONE="phone",e.RADIO_IMAGE="radio-image",e.ELECTRONIC_SIGNATURE="electronic-signature",e.WPS="wps",e.CARD_GROUP="card-group",e.COL="col",e.GRID="grid",e.GRID_ROW="grid-row",e.GRID_TABLE_COLUMN="grid-table-column",e.ROW="row",e.TWO_COLUMNS="two-columns",e.SUBTABLE_COLUMN="subtable-column",e.SUBTABLE_ROW="subtable-row",e.TAB="tab",e.TAB_PANE="tab-pane",e.TOOLBOX="toolbox",e.DATA_VIEW="data-view",e.LIST_VIEW="list-view",e.SUBTABLE="subtable",e.GRID_TABLE="grid-table",e.SIMPLE_SEARCH="simple-search",e.PAGINATION="pagination",e.CHECKBOX_IMAGE="checkbox-image",e.DASHBOARD="dashboard",e.TREE="tree",e.EMPLOYEE2="employee2",e.DEPARTMENT2="department2"})(X||(X={}));var z;(function(e){e.VARCHAR="varchar",e.TEXT="text",e.ARRAY="array",e.ADDRESS="location",e.DECIMAL="decimal",e.DECIMAL_RANGE="decimal_range",e.TIMESTAMP="timestamp",e.EMPLOYEES="people",e.DEPARTMENTS="department",e.MONEY="money",e.TIMESCOPE="timescope",e.FILE="file",e.IMAGE="image",e.AUTO_NUMBER="auto_number",e.CALC="calc",e.RELATION="relation",e.LIST="list",e.RELATION_FIELD="relation-field",e.REFERENCE_FIELD="reference-field",e.CALC_FIELD="calc",e.JSON="json",e.BIGINT="bigint",e.ANY="ANY",e.ENCRYPTED_FIELD="encrypted_field"})(z||(z={}));var ge;ge={},Ie(ge,z.ARRAY,X.ARRAY_COLUMN),Ie(ge,z.AUTO_NUMBER,X.AUTO_NUMBER_COLUMN),Ie(ge,z.DECIMAL,X.DECIMAL_COLUMN),Ie(ge,z.DEPARTMENTS,X.DEPARTMENT_COLUMN),Ie(ge,z.FILE,X.FILE_COLUMN),Ie(ge,z.IMAGE,X.IMAGE_COLUMN),Ie(ge,z.ADDRESS,X.LOCATION_COLUMN),Ie(ge,z.EMPLOYEES,X.EMPLOYEE_COLUMN),Ie(ge,z.TEXT,X.TEXT_COLUMN),Ie(ge,z.TIMESCOPE,X.TIMESCOPE_COLUMN),Ie(ge,z.TIMESTAMP,X.TIMESTAMP_COLUMN),Ie(ge,z.VARCHAR,X.VARCHAR_COLUMN),Ie(ge,z.RELATION,X.VARCHAR_COLUMN);var ai;(function(e){e.YEAR="year",e.MONTH="month",e.DATE="date",e.DATETIME="datetime"})(ai||(ai={}));var oi="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",$1=oi+"0123456789";function R1(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:15,t="",n=0;n<e;n++){var r=n===0?oi:$1,u=Math.random()*r.length;t+=r[parseInt(String(u),10)]}return t}function _r(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x1(e){if(Array.isArray(e))return _r(e)}function O1(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function T1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function P1(){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(e){return!1}}function Fn(e,t,n){return P1()?Fn=Reflect.construct:Fn=function(u,i,a){var s=[null];s.push.apply(s,i);var c=Function.bind.apply(u,s),l=new c;return a&&zt(l,a.prototype),l},Fn.apply(null,arguments)}function Ht(e){return Ht=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Ht(e)}function L1(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&zt(e,t)}function j1(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function V1(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function U1(){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 q1(e,t){return t&&(k1(t)==="object"||typeof t=="function")?t:O1(e)}function zt(e,t){return zt=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},zt(e,t)}function si(e){return x1(e)||V1(e)||H1(e)||U1()}var k1=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function H1(e,t){if(!!e){if(typeof e=="string")return _r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _r(e,t)}}function Nr(e){var t=typeof Map=="function"?new Map:void 0;return Nr=function(r){if(r===null||!j1(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t!="undefined"){if(t.has(r))return t.get(r);t.set(r,u)}function u(){return Fn(r,arguments,Ht(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),zt(u,r)},Nr(e)}function z1(){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(e){return!1}}function W1(e){var t=z1();return function(){var r=Ht(e),u;if(t){var i=Ht(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return q1(this,u)}}var $r=console;function Ft(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=$r).warn.apply(r,["\u{1F9D0} Driven Warning:"+t[0]].concat(si(u)))}function Rr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r,u=t.slice(1);(r=$r).log.apply(r,["\u{1F680} Driven Log:"+t[0]].concat(si(u)))}function G1(e){return e+" \u{1F41B}\u{1F41B}\u{1F41B}"}var ci=function(e){L1(n,e);var t=W1(n);function n(r){T1(this,n);var u;return u=t.call(this,r),u.name="\u{1F4A5} Driven Error",u.message=r?G1(r):"An unknown error occurred in the Driven, please contact the person in charge \u{1F691}\u{1F691}\u{1F691}",u}return n}(Nr(Error));function Ct(e){throw new ci(e)}function Cn(e){$r.error(new ci(e))}function ft(e,t){Array.isArray(e)&&e.map(function(n){switch(n.controlType){case"layout":ft(n==null?void 0:n.children,t);break;case"search":ft(n==null?void 0:n.children,t);break;case"form":t(n)}})}function X1(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var xr=function(){function e(){X1(this,e)}return e.getMessage=function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return this.$i18n.$t(n,"",r)},e.resetI18n=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ii;return new Fu({locale:n,messages:N1})},e.setLocale=function(n){return this.$i18n.setLocale(n)},e}();xr.$i18n=xr.resetI18n();function Z1(e,t,n){var r=t.replace(/\[(\d)]/g,function(i,a){return"."+a}).split("."),u=!1;return r.reduce(function(i,a,s,c){var l=i;if(!!i){if(!Object.prototype.hasOwnProperty.call(i,a)){Ft("Can not set ".concat(t,"'s ").concat(a," property in current %o, Because there is no ").concat(a," property on the %o"),i,i);return}return s===c.length-1&&!Object.is(l[a],n)&&(l[a]=n,u=!0),l[a]}},e),u}function te(e){if(e!==void 0)return typeof e=="object"?JSON.parse(JSON.stringify(e)):e}function Je(e){return Object.prototype.toString.call(e)==="[object Object]"}function J1(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1}function Wt(e){return Array.isArray(e)}function _e(e){return typeof e=="string"}function Bn(e){return typeof e=="number"}function li(e){return typeof e=="function"}function K1(e){return Wt(e)&&e.every(function(t){return _e(t)})}function Q1(e){return Wt(e)&&e.every(function(t){return Bn(t)||t===""})}function fi(e){return/^\[.*?]$/.test(e)}function wn(e){return/^{.*?}$/.test(e)}function Or(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Y1(e){if(Array.isArray(e))return Or(e)}function hi(e,t,n,r,u,i,a){try{var s=e[i](a),c=s.value}catch(l){n(l);return}s.done?t(c):Promise.resolve(c).then(r,u)}function eD(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function a(c){hi(i,r,u,a,s,"next",c)}function s(c){hi(i,r,u,a,s,"throw",c)}a(void 0)})}}function tD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function nD(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rD(){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 Tr(e){return Y1(e)||nD(e)||uD(e)||rD()}function uD(e,t){if(!!e){if(typeof e=="string")return Or(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(n);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Or(e,t)}}var iD=function(e,t){var n,r,u,i,a={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(l){return function(f){return c([l,f])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(u=l[0]&2?r.return:l[0]?r.throw||((u=r.return)&&u.call(r),0):r.next)&&!(u=u.call(r,l[1])).done)return u;switch(r=0,u&&(l=[l[0]&2,u.value]),l[0]){case 0:case 1:u=l;break;case 4:return a.label++,{value:l[1],done:!1};case 5:a.label++,r=l[1],l=[0];continue;case 7:l=a.ops.pop(),a.trys.pop();continue;default:if(u=a.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){a=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){a.label=l[1];break}if(l[0]===6&&a.label<u[1]){a.label=u[1],u=l;break}if(u&&a.label<u[2]){a.label=u[2],a.ops.push(l);break}u[2]&&a.ops.pop(),a.trys.pop();continue}l=t.call(e,a)}catch(f){l=[6,f],r=0}finally{n=u=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},aD=function(){function e(){tD(this,e),this._events=new Map,this.debug=!1}var t=e.prototype;return t.emit=function(r){for(var u=arguments.length,i=new Array(u>1?u-1:0),a=1;a<u;a++)i[a-1]=arguments[a];var s=this;return eD(function(){var c,l,f,o,h,p,d,D,v,E,y,b;return iD(this,function(F){switch(F.label){case 0:if(c=s._events.get(r),l=[],!c)return[3,10];f=c.slice(),o=!0,h=!1,p=void 0,F.label=1;case 1:F.trys.push([1,8,9,10]),d=f[Symbol.iterator](),F.label=2;case 2:if(o=(D=d.next()).done)return[3,7];if(v=D.value,!c.includes(v))return[3,6];F.label=3;case 3:return F.trys.push([3,5,,6]),s.debug&&Rr.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(v.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+v.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"\u3002")].concat(Tr(i))),[4,v.apply(null,Tr(i))];case 4:return E=F.sent(),s.debug&&Rr.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(v.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+v.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"; \u51FD\u6570\u7684\u8FD4\u56DE\u7ED3\u679C\u4E3A%o")].concat(Tr(i),[E])),l.push(E),E===!1?[3,7]:[3,6];case 5:return y=F.sent(),Cn(String(y)),[3,6];case 6:return o=!0,[3,2];case 7:return[3,10];case 8:return b=F.sent(),h=!0,p=b,[3,10];case 9:try{!o&&d.return!=null&&d.return()}finally{if(h)throw p}return[7];case 10:return[2,l]}})})()},t.on=function(r,u){if(this._events.has(r)){var i;(i=this._events.get(r))===null||i===void 0||i.push(u)}else this._events.set(r,[u])},t.off=function(r,u){if(this._events.has(r)){var i=this._events.get(r),a=i==null?void 0:i.indexOf(u);i==null||i.splice(a,1)}},t.delete=function(r){this._events.has(r)&&this._events.delete(r)},t.clear=function(){this._events=new Map},e}();function oD(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var sD=[{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-rows-checked"}],pi=function(){function e(){oD(this,e)}var t=e.prototype;return t.getEventsFromKeys=function(r){var u=typeof r=="string"?[r]:r;return e.events.filter(function(i){return u.includes(i.key)})},e}();pi.events=sD;function bn(e){return e.controlType===At.LAYOUT||e.controlType===At.WRAP||e.controlType===At.LIST||e.controlType===At.SEARCH}function Gt(e,t){Array.isArray(e)&&e.map(n=>{if(n.type===X.SUBTABLE){const r=n.getChildrenFormControl();t(n,r)}else bn(n)?Gt(n==null?void 0:n.children,t):n instanceof ze&&t(n)})}function Xt(e,t){Array.isArray(e)&&e.map(n=>{n.type===X.DATA_VIEW||n.type===X.SIMPLE_SEARCH?t(n):bn(n)&&Xt(n==null?void 0:n.children,t)})}class Pr extends an{constructor(t){super("Runtime"),this._flatInstances=[],this._instanceMap={};const{schema:n}=t;this._schema=n,this._instance=this.createControl(n,t.beforeCreateInstance),this.getFlatInstances()}getFlatInstances(){const t=[],n={};return di(this._instance,r=>{t.push(r),n[r.id]||(n[r.id]=[]),n[r.id].push(r)}),this._flatInstances=t,this._instanceMap=n,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 t={};return Xt(this._instance,n=>{t[n.id]=n.rules[0],Gt(n.children,r=>{(r instanceof ze||r instanceof An)&&cD(t[n.id].fields,r)})}),t}get antdRules(){let t={};return Xt(this._instance,n=>{t[n.id]=n.rules[0],Gt(n.children,r=>{(r instanceof ze||r instanceof An)&&lD(t[n.id].fields,r)})}),t}}function di(e,t){Array.isArray(e)?e.map(n=>{t(n),bn(n)&&di(n.children,t)}):t(e)}function Lr(e){return e.props.isHide?!0:e.parent===null?!1:Lr(e.parent)}function cD(e,t){if(!Lr(t)){if(t instanceof ze)e[t.id]=t.rules;else if(t.type===X.SUBTABLE){e[t.id]=t.rules;const n={type:"array",fields:{}};t.children.forEach((r,u)=>{ft(r.children,i=>{n.fields&&(n.fields[u]||(n.fields[u]={type:"object",required:!0,fields:{}}),n.fields[u].fields[i.id]=i.rules)})}),e[t.id].push(n)}}}function lD(e,t){Lr(t)||(t instanceof ze?e[t.id]=t.rules:t.type===X.SUBTABLE&&t.children.length&&(e[t.id]=[],t.children.forEach(n=>{let r={};ft(n.children,u=>{r[u.id]=u.rules}),e[t.id].push(r)})))}class fD{constructor(t){const{state:n,emptyState:r,databindMapping:u,controlidMapping:i,fieldCodeState:a}=hD(t.instance);this.emptyState=r,this.state=n,this.fieldCodeState=a,this.dataBindMapping=u,this.controlIdMapping=i}setState(t,n,r){const u=this.controlIdMapping[t];u!==void 0?this.state[u.dataView][t]=n:r!==void 0?Object.keys(this.controlIdMapping).map(i=>{const a=this.controlIdMapping[i].dataView,s=this.controlIdMapping[i].children;s!==void 0&&Object.keys(s).map(c=>{c===t&&(this.state[a][i][r][t]=n)})}):this.state[t]=n}getState(t,n){if(this.state[t]!==void 0)return this.state[t];{const u=this.controlIdMapping[t];if(u!==void 0)return this.state[u.dataView][t];if(n!==void 0){let i;return Object.keys(this.controlIdMapping).map(a=>{const s=this.controlIdMapping[a].dataView,c=this.controlIdMapping[a].children;c!==void 0&&Object.keys(c).map(l=>{var f;l===t&&(i=(f=this.state[s][a][n])==null?void 0:f[t])})}),i}else{let i=[];return Object.keys(this.controlIdMapping).map(a=>{const s=this.controlIdMapping[a].dataView,c=this.controlIdMapping[a].children;c!==void 0&&Object.keys(c).map(l=>{l===t&&this.state[s][a].map(f=>{i.push(f[t])})})}),i}}}getFieldCodeState(t){if(this.fieldCodeState[t]!==void 0)return this.fieldCodeState[t];{const r=this.controlIdMapping[t];if(r.dataBind.dataCode,r!==void 0){if(r.dataView===t)return this.fieldCodeState[t];{const u=r.dataBind.dataCode;return this.fieldCodeState[r.dataView][u]||this.fieldCodeState[r.dataView]}}}}getEmptyState(t){if(this.emptyState[t]!==void 0)return this.emptyState[t];{const r=this.controlIdMapping[t];if(r!==void 0)return this.emptyState[r.dataView][t];{let u;return Object.keys(this.controlIdMapping).map(i=>{const a=this.controlIdMapping[i].dataView,s=this.controlIdMapping[i].children;s!==void 0&&Object.keys(s).map(c=>{c===t&&(u=this.emptyState[a][i][t])})}),u}}}getDataBind(t){let n=this.controlIdMapping[t];if(n)return n.dataBind;e:for(let r in this.controlIdMapping){const u=this.controlIdMapping[r];if(u.children){for(let i in u.children)if(i===t){n=u.children[i];break e}}}return n==null?void 0:n.dataBind}}function hD(e){let t={},n={},r={},u={},i={},a={};return Xt(e,s=>{const c=s.id,l={},f={},o={},h={};Gt([s],(p,d)=>{pD(l,f,o,h,p),dD(i,c,p),DD(a,c,p)}),t[c]=l,n[c]=f,r[c]=o,u[c]=h}),{state:t,emptyState:n,databindMapping:i,controlidMapping:a,fieldCodeState:r,fieldCodeEmptyState:u}}function pD(e,t,n,r,u){var i,a;if(u instanceof ze)if(e[u.id]=te(u.props.defaultValue),t[u.id]=te(u.props.defaultValue),u.props.dataBind instanceof qe)Object.keys(u.props.dataBind).forEach(function(s){const c=u.props.dataBind,l=u.props.defaultValue;let f=c[s].fieldCode;n[f]=te(l[s]),r[f]=te(l[s])});else{let s=u.props.dataBind.fieldCode;n[s]=te(u.props.defaultValue),r[s]=te(u.props.defaultValue)}else{const s={},c={};ft(u.props.headers,f=>{s[f.id]=te(f.props.defaultValue);const o=f.props.dataBind.fieldCode;f.props.dataBind instanceof qe?Object.keys(f.props.dataBind).forEach(function(h){c[f.props.dataBind[h].fieldCode]=te(f.props.defaultValue[h])}):c[o]=te(f.props.defaultValue)}),e[u.id]=new Array((i=u.props.defaultRows)!=null?i:1).fill(0).map(()=>te(s)),t[u.id]=s;const l=u.props.datasourceBind.dataCode;n[l]=new Array((a=u.props.defaultRows)!=null?a:1).fill(0).map(()=>te(c)),r[l]=c}}function dD(e,t,n){if(n instanceof ze)n.props.dataBind instanceof qe?Object.keys(n.props.dataBind).map(r=>{const u=n.props.dataBind,i=u[r].dataCode;i!==void 0&&(e[i]===void 0&&(e[i]={controlId:n.id,fields:[],dataViewId:t}),e[i].fields.push({fieldCode:u[r].fieldCode,controlId:n.id,dataBind:u,dataViewId:[t]}))}):(e[n.props.dataBind.dataCode]===void 0&&(e[n.props.dataBind.dataCode]={controlId:t,fields:[],dataViewId:t}),e[n.props.dataBind.dataCode].fields.push({fieldCode:n.props.dataBind.fieldCode,controlId:n.id,dataBind:n.props.dataBind,dataViewId:[t]}));else{if(n.props.datasourceBind.dataCode===""){Ft(`datasourceBind.dataCode is empty! maybe in preview mode, control:${n.id} type:${n.type}`);return}e[n.props.datasourceBind.dataCode]={controlId:n.id,fields:[],dataViewId:t};const r=n.id;ft(n.props.headers,u=>{u.props.dataBind instanceof qe?Object.keys(u.props.dataBind).map(i=>{const a=u.props.dataBind,s=a[i].dataCode;e[s].fields.push({fieldCode:a[i].fieldCode,controlId:u.id,dataBind:a,dataViewId:[t,r]})}):e[u.props.dataBind.dataCode].fields.push({fieldCode:u.props.dataBind.fieldCode,controlId:u.id,dataBind:u.props.dataBind,dataViewId:[t,r]})})}}function DD(e,t,n){n instanceof ze?e[n.id]={dataBind:n.props.dataBind,options:[],dataView:t}:n.type===X.SUBTABLE&&(e[n.id]={dataBind:new jt({dataCode:n.props.datasourceBind.dataCode,fieldCode:""}),dataView:t,children:{},options:[]},ft(n.props.headers,r=>{var u,i;Object.assign((i=(u=e[n.id])==null?void 0:u.children)!=null?i:{},{[r.id]:{dataBind:r.props.dataBind}})}))}const Di=["splice","push","shift","pop","unshift","reverse"],jr=Symbol("__engineProxy__"),Vr=Symbol("__engineTarget__"),Ei=Symbol("__engineArrayBeforeSetCallbackFlag__"),vi=Symbol("__engineProxyThisKey__"),Pe={type:"",args:[],callback:gi};function gi(){}yD();function ED(e,t,n,r,u){if(Pe.type){Pe.callback=u.bind(null,e,r);return}const i=Number(t);if(i>e.length){Ct(`Wrong array operations may cause unknown errors. It is recommended to use APIs such as ${Di.join(",")} for array operations`);return}if(!(Number.isNaN(i)&&t!=="length"))if(t==="length"){const s=n,c=e.length;if(s>e.length){Ct("Do not directly modify the length of the array data, please add new rows");return}return s===e.length?void 0:()=>u.call(null,e,r,"splice",[s,c-s])}else return i===e.length?()=>u.call(null,e,r,"push",[n]):()=>u.call(null,e,r,"splice",[i,1,n])}function vD(e,t,n){return{__engineProxy__:!0,get(r,u,i){return u===jr?!0:u===Vr?r:Array.isArray(r)&&u===Ei?n:u===vi?e:Reflect.get(r,u,i)},set(r,u,i,a){var h;let s=i;const c=r[u],l=e===""?u:e+"."+u;function f(p){if(typeof p=="object"&&p!==null)return p[jr]!==!0?Sn(p,t,n,l):Sn(p[Vr],t,n,l)}s=(h=f(i))!=null?h:s;let o;if(Array.isArray(r)){const p=ED(r,u,i,e,t);o=Reflect.set(r,u,s,a),p&&p()}else{try{let p=s;if(s=n.call(null,r,l,s,c),p!==s){const d=f(s);d!==void 0&&(s=d)}}catch(p){return Cn(`${l} set error ${p}`),!0}o=Reflect.set(r,u,s,a),t.call(null,r,l,i,c)}return o}}}function Sn(e,t,n,r=""){if(Object.isFrozen(e))return e;for(let u in e){const i=r===""?u:r+"."+u,a=e[u];typeof a=="object"&&a!==null&&(e[u]=Sn(a,t,n,i))}return new Proxy(e,vD(r,t,n))}function mi(e){const t=[];return e.forEach(n=>{t.push(n),n.controlType==="layout"&&t.push(...mi(n.children))}),t}function Ur(e,t){if(t==="")return;const n=t.split(".");if(n.length===0)return;const r=n[0],u=n.slice(1),i=e.find(a=>a.id===r);return u.length===0?i:u.reduce((a,s)=>{var f,o;const c=Number(s);if(Number.isNaN(c)){const h=a!=null&&a.children?mi(a.children):void 0,p=h==null?void 0:h.find(d=>d.id===s);return p||(a instanceof ze?a:void 0)}else return(o=(f=a==null?void 0:a.children)==null?void 0:f[c])!=null?o:a},i)}function gD(e,t){return["push","unshift"].includes(e)?t:e==="splice"?t.slice(2):[]}function mD(e,t,n){if(["push","unshift"].includes(e))return n;if(e==="splice")return t.slice(0,2).concat(n)}function yD(){Di.forEach(e=>{const t=Array.prototype[e];Array.prototype[e]=function(...n){var r;if(this[jr]){let u;const i=gD(e,n);if(i.length){const a=(r=this[Ei])==null?void 0:r.call(this,this[Vr],this[vi],i),s=mD(e,n,a);Pe.type=e,Pe.args=s,u=t.apply(this,s)}else Pe.type=e,Pe.args=n,u=t.apply(this,n);return typeof Pe.callback=="function"&&Pe.callback(e,n,u),Pe.type="",Pe.args=[],Pe.callback=gi,u}else return t.apply(this,n)}})}class AD{constructor(){this.actionMap=new Map,this.buildinActions={},this.actionUtils={},this.sources={}}execAction(t,n,...r){return Xe(this,null,function*(){const u=this.actionMap.get(t);if(!!u)try{return yield u.func.call(null,n,...r)}catch(i){Cn(`${u.id} Exception during calling action: ${i}`)}})}addAction(t,n){this.actionMap.has(t)&&Ct("duplicated action key");const r=new FD(t,n);this.actionMap.set(t,r)}}class FD{constructor(t,n){this.id="",this.id=t,this.func=n}}class CD{constructor(t){this._dataStore=new Map,this.executer=t}add(t,n){this._dataStore.set(t,n)}get(t){let n=this._dataStore.get(t);return te(n)}remove(t){this._dataStore.delete(t)}getRemoteData(t){return Xe(this,null,function*(){return this.executer===void 0?(Cn("\u672A\u521D\u59CB\u5316executer"),[]):this.executer(t)})}}class nt{}class Zt extends nt{validate(t){return _e(t)}transform(t){if(t==null)return"";if(!Je(t)&&!li(t))return String(t);if(J1(t))return JSON.stringify(t);throw`${t} is not a string`}}class qr extends nt{validate(t){return Bn(t)||t===""}transform(t){if(t==null)return"";const n=!Je(t)&&!li(t)?Number(t):void 0;if(!Number.isNaN(n)&&n!==void 0)return n;throw`${t} is not a number`}}class BD extends nt{validate(t){return K1(t)}transform(t){if(t==null)return[];function n(r){return r.map(u=>u?String(u):"")}if(Wt(t))return n(t);if(_e(t)&&fi(t))try{const r=JSON.parse(t);if(Array.isArray(r))return n(r)}catch(r){}return[String(t)]}}class wD extends nt{validate(t){return Q1(t)}transform(t){if(t==null)return[];function n(u){return u.map(i=>!i&&i!==0?"":Number(i)).filter(i=>i===""||!Number.isNaN(i))}if(Wt(t))return n(t);if(_e(t)&&fi(t))try{const u=JSON.parse(t);if(Wt(u))return n(u)}catch(u){}const r=Number(t);if(Number.isNaN(r))throw`${t} is not a number array`;return[r]}}class bD extends nt{validate(t){return t instanceof on||Je(t)&&"amount"in t&&Bn(t.amount)&&"currency"in t&&_e(t.currency)}transform(t,n){if(t==null||t==="")return new on({currency:n==null?void 0:n.currency});let r;if(Je(t)&&(r=new on(ae(ae({},n),t))),_e(t)&&wn(t))try{const u=JSON.parse(t);r=new on(ae(ae({},n),u))}catch(u){}if(r){const u=new qr,i=new Zt;return u.validate(r.amount)||(r.amount=u.transform(r.amount)),i.validate(r.currency)||(r.currency=i.transform(r.currency)),r}throw`${t} is not a { amount: number, currency: string } object`}}class SD extends nt{validate(t){return t instanceof sn||Je(t)&&"min"in t&&_e(t.min)&&"max"in t&&_e(t.max)}transform(t,n){if(t==null||t==="")return new sn;let r;if(Je(t)&&(r=new sn(ae(ae({},n),t))),_e(t)&&wn(t))try{const u=JSON.parse(t);r=new sn(ae(ae({},n),u))}catch(u){}if(r){const u=new Zt;return u.validate(r.min)||(r.min=u.transform(r.min)),u.validate(r.max)||(r.max=u.transform(r.max)),r}throw`${t} is not a { min: string, max: string } object`}}class MD extends nt{validate(t){return t instanceof ln||Je(t)&&"result"in t&&Bn(t.result)&&"unit"in t&&_e(t.unit)}transform(t,n){if(t==null||t==="")return new ln({unit:n==null?void 0:n.unit});let r;if(Je(t)&&(r=new ln(ae(ae({},n),t))),_e(t)&&wn(t))try{const u=JSON.parse(t);r=new ln(ae(ae({},n),u))}catch(u){}if(r){const u=new qr,i=new Zt;return u.validate(r.result)||(r.result=u.transform(r.result)),i.validate(r.unit)||(r.unit=i.transform(r.unit)),r}throw`${t} is not a { result: string, unit: string } object`}}class ID extends nt{validate(t){return t instanceof cn}transform(t,n){if(t==null||t==="")return new cn;let r;if(Je(t)&&(r=new cn(ae(ae({},n),er.exports.camelizeKeys(t)))),_e(t)&&wn(t))try{const u=JSON.parse(t);r=new cn(ae(ae({},n),er.exports.camelizeKeys(u)))}catch(u){}if(r){const u=new Zt;return u.validate(r.city)||(r.city=u.transform(r.city)),u.validate(r.district)||(r.district=u.transform(r.district)),u.validate(r.province)||(r.province=u.transform(r.province)),r}throw`${t} is not a { city: string, district: string, province: string } object`}}class _D{static getValueChecker(t){let n;switch(t){case z.VARCHAR:case z.TIMESTAMP:case z.TEXT:case z.RELATION:case z.AUTO_NUMBER:n=new Zt;break;case z.DECIMAL:n=new qr;break;case z.EMPLOYEES:case z.DEPARTMENTS:case z.IMAGE:case z.FILE:case z.ARRAY:n=new BD;break;case z.MONEY:n=new bD;break;case z.TIMESCOPE:n=new SD;break;case z.CALC:n=new MD;break;case z.DECIMAL_RANGE:n=new wD;break;case z.ADDRESS:n=new ID;break}return n}}function ND(e){if(["min","max","currency","unit"].includes(e))return z.VARCHAR;if(["result","amount"].includes(e))return z.DECIMAL}function yi(e,t,n,r){var a;let u=(a=ND(t))!=null?a:e,i=_D.getValueChecker(u);if(!i||i.validate(n))return n;try{const s=i.transform(n,r);return s!==void 0?s:n}catch(s){throw`${t} ${s}`}}function $D(e,t,n){return Object.entries(e).reduce((r,[u,i])=>{const a=t[u];return r[u]=yi(i,u,a,n[u]),r},Object.assign({},t))}typeof window!="undefined"&&(window.engines={});let Bt=null,Jt="";class kr extends aD{constructor(t){super(),this.isMounted=!1,this.id=R1(8),this.__pluginsApplied=!1,this.actionManager=new AD,this._jobTasks=[],this.createControlInstance=this.createInstance,this.$options=Object.freeze(t);const{autoMount:n=!0,schema:r,beforeCreateInstance:u,externalParams:i,language:a=ii,debug:s=!1}=this.$options;xr.setLocale(a),this.debug=s,this.runtime=new Pr({schema:r,beforeCreateInstance:u}),this.externalParams=i,this.store=new fD({instance:this.runtime.instance}),this.debugLog("engine is Instantiation complete"),n&&this.mount()}debugLog(...t){this.debug&&Rr(...t)}use(t){return this.__pluginsApplied||this.__plugins.push(t),this}registerControl(...t){return this.runtime.register(...t),this}static register(...t){return Pr.register(...t)}static judgeControlIsRegistered(t){return Pr.staticRegisteredTypes.has(t.Runtime.controlType)}mount(){this.debugLog("engine\u7684mount\u65B9\u6CD5\u5F00\u59CB\u8C03\u7528");const{plugins:t=[]}=this.$options;this._handlerProxyState(),this.__plugins=t,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=Sn(this.store.state,this._proxyStateCallback.bind(this),this._proxyStateBeforeSetCallback.bind(this))}_proxyStateBeforeSetCallback(t,n,r,u){const i=Ur(this.runtime.flatInstances,n);if(!i)return r;if(this.assertInstance(i,X.SUBTABLE)){const c=i.props.headers.reduce((l,f)=>{const o=f.children[0];return o&&o instanceof ze&&(l[o.id]=o.fieldType),l},{});return r===null?[]:r.map(l=>$D(c,l,this.getEmptyState(i.id)))}const a=n.split("."),s=a[a.length-1];try{return yi(i.fieldType,s,r,u)}catch(c){throw Ft(`the id=${i.id}'s instance setState error, %o ${c}.`,r),c}}_proxyStateCallback(t,n,r,u,i){Array.isArray(t)?this._handlerArrayUpdate(t,n,r,u,i):this._handlerObjectUpdate(t,n,r,u)}_handlerArrayUpdate(t,n,r,u,i){const a=Ur(this.runtime.flatInstances,n);if(!(a instanceof An))return;const s=h=>{const p=[];for(let d=0;d<h;d++){const D=this.listControlCreateRow(a,"subtable-row");D&&p.push(D)}return p},c=Bt;let l=[],f=[],o=[];if(r&&u){switch(r){case"push":case"unshift":const h=u.length;l=s(h),f=u,a.children[r](...l),this.runtime.getFlatInstances();break;case"splice":if(u.length>2){const p=u.length-2,d=u.slice(2);l=s(p),f=d;const D=u[0],v=u[1];a.children[r](D,v,...l),this.runtime.getFlatInstances()}else a.children[r](...u),this.runtime.getFlatInstances();break;default:a.children[r](...u),this.runtime.getFlatInstances();break}r==="splice"?o=i:["pop","shift"].includes(r)&&(o=[i]),this.emit("list-change",{instance:a,value:this.getState(a.id),options:Object.assign({},c,{changed:l,data:f,deleted:o!=null?o:[]})}),Bt=null}}_handlerObjectUpdate(t,n,r,u){const i=Ur(this.runtime.flatInstances,n);if(!i)return;const a=this.getInstanceRowIndex(i),s=Bt||{};if(i instanceof An){i.children.length=0;const c=r;let l=[];for(let f=0;f<c.length;f++){const o=this.listControlCreateRow(i,"subtable-row");o&&l.push(o)}i.children.push(...l),this.runtime.getFlatInstances(),this.emit("list-change",{instance:i,value:r,options:cu(ae({},s),{changed:l,data:c,deleted:u!=null?u:[]})})}else this.emit("change",{instance:i,value:this.getState(i.id,a),rowIndex:a,options:cu(ae({},s),{oldValue:u})})}applyPlugins(){this.__pluginsApplied||(this.__plugins.forEach(t=>{var n;try{Jt=(n=t.pluginName)!=null?n:t.constructor.name,t.apply(this)}catch(r){Ct(`${Jt} Plugin apply Error
|
|
2
|
+
${r}`)}finally{Jt=""}}),this.__pluginsApplied=!0)}listControlCreateRow(t,n){const r=this.runtime.createControlInstance(n);if(!!r){if(r instanceof P0){const u=te(t.props.headers),i=this.createControl(u);r.children.push(...i)}return r}}listControlAddRow(t,n="subtable-row"){const r=this.listControlCreateRow(t,n);!r||t.children.push(r)}emit(t,n){return Xe(this,null,function*(){if(t==="engine-mounted"){if(this.isMounted)return Ft("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 r,u;this.isMounted||(u=new Promise(a=>{r=a}),this._jobTasks.push(u));const i=yield xa(kr.prototype,this,"emit").call(this,t,n);return r&&u&&(r(),this._jobTasks.splice(this._jobTasks.indexOf(u),1)),i})}on(t,n){return Jt&&(n.applyingPluginName=Jt),super.on(t,n)}createControl(...t){return this.runtime.createControl(...t)}createInstance(t,n){return this.runtime.createControlInstance(t,n)}schemaEvent(t,n){this.emit(t,n)}updateInstanceProps(t,n,r,u){return this.setInstance(t,n,r,u)}getRules(t){var n;return t===void 0?this.runtime.rules:(n=this.runtime.rules[t])==null?void 0:n.fields}getAntdRules(t){var n;return t===void 0?this.runtime.antdRules:(n=this.runtime.antdRules[t])==null?void 0:n.fields}getState(t,n){return t===void 0?this.store.state:this.store.getState(t,n)}getFieldCodeState(t){return t===void 0?this.store.fieldCodeState:this.store.getFieldCodeState(t)}getEmptyState(t){return te(t===void 0?this.store.emptyState:this.store.getEmptyState(t))}setPayloadOptions(t){Bt=t}setState(t,n,r,u){Bt=u,this.debugLog("[%o]: \u89E6\u53D1setState, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o, options=%o",t,n,r,u),this.store.setState(t,n,r),this.debugLog("[%o]: setState\u5B8C\u6210, \u4FEE\u6539\u7684\u503C\u4E3A%o, rowIndex=%o",t,n,r),Bt=null}setStates(t,n,r){let u=t;Object.keys(u).forEach(i=>{Object.entries(this.store.controlIdMapping).forEach(([a,s])=>{if(s.dataView===i){const c=u[i][a];c!==void 0&&this.setState(a,c,n,r)}else(a===i||s.children&&s.children[i])&&u[i]!==void 0&&this.setState(i,u[i],n,r)})})}getField(t,n,r){if(!n){const c=this.getDataBindMapping(t);if(c){const{controlId:l}=c;return this.getState(l)}return}const u=this.getDataBindMapping(t,n);if(!u)return;const{dataBind:i,controlId:a}=u,s=this.getState(a,r);return i instanceof qe?Object.entries(i).reduce((c,[l,f])=>f.fieldCode===n?c[l]:c,s):s}getData(t){if(t){const n=this.getDataBindMapping(t);if(n){const{controlId:r}=n;return this.getFieldCodeState(r)}}}setField(t,n,r,u,i){var l;const a=this.getDataBindMapping(t,n);if(!a)return;const{dataBind:s,controlId:c}=a;if(s instanceof qe){const f=(l=te(this.getState(c,u)))!=null?l:this.getEmptyState(c),o=Object.entries(s).reduce((h,[p,d])=>(d.fieldCode===n&&(h[p]=r),h),f);this.setState(c,o,u,i)}else this.setState(c,r,u,i)}setFields(t,n,r,u){const i=this.getDataBindMapping(t);if(!i)return;let a=[];i.fields.forEach(s=>{var o;const{dataBind:c,controlId:l,fieldCode:f}=s;if(!a.includes(f)&&!!Object.hasOwnProperty.call(n,f))if(c instanceof qe){const h=(o=te(this.getState(l,r)))!=null?o:this.getEmptyState(l),p=Object.entries(c).reduce((d,[D,v])=>{a.push(v.fieldCode);const E=n[v.fieldCode];return E!==void 0&&(d[D]=E),d},h);this.setState(s.controlId,p,r,u)}else this.setState(l,n[f],r,u)})}buildFields(t,n){const r=this.getDataBindMapping(t);if(!r)return;let u=[];const i={};return r.fields.forEach(a=>{const{dataBind:s,controlId:c,fieldCode:l}=a;if(!u.includes(l)&&!!Object.hasOwnProperty.call(n,l))if(s instanceof qe){const f=this.getEmptyState(c);i[a.controlId]=Object.entries(s).reduce((o,[h,p])=>{u.push(p.fieldCode);const d=n[p.fieldCode];return d!==void 0&&(o[h]=d),o},f)}else i[c]=n[l]}),i}setData(t,n){this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\uFF0C\u53C2\u6570\u4E3A%o\uFF0C%o\u3002",t,n);let r={};Object.keys(t).map(u=>{const i=t[u];if(Array.isArray(i))i.map(a=>{const s=this.getDataBindMapping(u);if(!s)return;let c=te(this.store.emptyState[s.dataViewId][s.controlId]),l=[];Object.keys(a).map(f=>{var h,p,d;if(l.includes(f))return;const o=(p=(h=this.store.dataBindMapping[u])==null?void 0:h.fields)==null?void 0:p.find(D=>D.fieldCode===f);if(o){if(o.dataBind instanceof jt&&a[f]!==void 0)c[o.controlId]=a[f];else if(o.dataBind instanceof qe){let D=te((d=this.getEmptyState(o.controlId))!=null?d:{});Object.keys(o.dataBind).map(v=>{const E=o.dataBind[v];a[E.fieldCode]!==void 0&&(D[v]=a[E.fieldCode]),l.push(E.fieldCode)}),c[o.controlId]=D}}}),r[s.dataViewId]||(r[s.dataViewId]={}),r[s.dataViewId][s.controlId]||(r[s.dataViewId][s.controlId]=[]),r[s.dataViewId][s.controlId].push(c)});else if(i){let a=[];Object.keys(i).map(s=>{var l;if(a.includes(s))return;const c=this.getDataBindMapping(u,s);if(c){if(r[c.dataViewId[0]]||(r[c.dataViewId[0]]={}),c.dataBind instanceof jt&&i[s]!==void 0)r[c.dataViewId[0]][c.controlId]=i[s];else if(c.dataBind instanceof qe){let f=te((l=this.getEmptyState(c.controlId))!=null?l:{});Object.keys(c.dataBind).map(o=>{const h=c.dataBind[o];i[h.fieldCode]!==void 0&&(f[o]=i[h.fieldCode]),a.push(h.fieldCode)}),r[c.dataViewId[0]][c.controlId]=f}}})}}),this.debugLog("engine setData\u65B9\u6CD5\u6570\u636E\u7EC4\u5408\u5B8C\u6210\uFF0C\u53C2\u6570\u4E3A%o\u3002",r),this.setStates(r,void 0,n),this.debugLog("engine setData\u65B9\u6CD5\u6267\u884C\u5B8C\u6210\u3002")}getDataBind(t){return this.store.getDataBind(t)}getInstance(t,n){const r=this.getInstances(t,n===-1);if(r.length>0)return n!==void 0?n===-1?r[0]:r[n]:r[0]}getInstances(t,n=!1){var u;if(t===void 0)return this.runtime.flatInstances;const r=this.runtime.flatInstances.filter(i=>i.id===t);if(n)if(r.length){const i=r[0];if(this.getInstanceRowIndex(i)!==void 0){const a=this.getInstanceInSubtableHeader(i);a&&r.unshift(a)}}else{const i=this.getControlIdMapping(),[a]=(u=Object.entries(i).find(([s,c])=>c.children&&t in c.children))!=null?u:[];if(a){const c=this.getInstance(a).props.headers.find(l=>l.children.find(f=>f.id===t));if(c){const l=c.children.find(f=>f.id===t);l&&r.unshift(l)}}}return r}setInstance(t,n,r,u){try{let i;if(typeof t=="string"?i=this.getInstance(t,u):i=t,!i)return;this.debugLog("[%o]: \u4FEE\u6539instance: %o\u7684%o\u5C5E\u6027\uFF0C\u4FEE\u6539\u7684\u503C\u4E3A%o\u3002",i.id,i,n,r),Z1(i.props,n,r),this.schemaEvent("schema-change",{instance:i,props:n,value:r})}catch(i){throw i}}getControlIdMapping(){return this.store.controlIdMapping}getDataBindMapping(t,n){if(!t&&!n)return this.store.dataBindMapping;const r=this.store.dataBindMapping[t];if(!r){Ft(`No corresponding dataCode=${t} was found`);return}if(!n)return r;const u=r.fields.find(i=>i.fieldCode===n);if(!u){Ft(`No corresponding fieldCode=${n} was found`);return}return u}getAction(){return this.actionManager}initDataManager(t){this.dataManager=new CD(t)}getDataManager(){return this.dataManager}assertInstance(t,n){return _e(n)?t.type===n:n.includes(t.type)}getInstanceRowIndex(t){if(!t.parent)return;let n;if(this.assertInstance(t.parent,X.SUBTABLE))if(this.assertInstance(t,X.SUBTABLE_COLUMN))n=-1;else{const r=t.parent.children.findIndex(u=>u===t);r>-1&&(n=r)}else n=this.getInstanceRowIndex(t.parent);return n}getInstanceParentControl(t,n){if(!!t.parent)return this.assertInstance(t.parent,n)?t.parent:this.getInstanceParentControl(t.parent,n)}getInstanceInSubtableHeader(t){const n=this.getInstanceRowIndex(t);if(n===void 0)return;if(n===-1)return t;const r=this.assertInstance(t,X.SUBTABLE_COLUMN)?t:this.getInstanceParentControl(t,X.SUBTABLE_COLUMN);if(!r)return;const i=this.getInstanceParentControl(t,X.SUBTABLE).props.headers.find(a=>a.id===r.id);if(!!i)return i.children.find(a=>a.id===t.id)}setControlConfig(...t){return this.runtime.registerControlConfig(...t)}getControlConfig(t){return this.runtime.getControlConfig(t)}}class RD{}class xD{constructor(t){this.config=t}apply(t){this.engine=t;const n=this.config;if(!n)return;const r=Ai(n,t);if(!r)return;const u=t.getAction();for(let[i,a]of Object.entries(r.funcMap))u.addAction(i,a)}}function Ai(e,t){if(!e.module||!e.module.compiled)return;const n=e.module.compiled,r={exports:{ctx:t,utils:t.getAction().actionUtils}};try{new Function("module","exports",n).call(r,r,r.exports)}catch(a){Ct(a.message+". fail to parse the module"),process.env.NODE_ENV!=="production"&&Ct("fail to parse the module")}const u={},i={};for(const[a,s]of Object.entries(r.exports))typeof s=="function"?u[a]=s:i[a]=s;return{funcMap:u,variables:i}}const OD={"engine-mounted":"did_mount","engine-submit":"will_submit","engine-submit-params":"do_submit","engine-submitted":"did_submit"};class TD{constructor(t){this.config=t}apply(t){this.engine=t,Object.entries(OD).forEach(([n,r])=>{t.on(n,u=>Xe(this,null,function*(){const i=yield this.callLifecycleEvent(r,u);return i.includes(!1)?!1:i}))})}callLifecycleEvent(t,n){return Xe(this,null,function*(){const r=this.config;return!r||!Array.isArray(r[t])?[]:yield Promise.all(r[t].map(i=>Xe(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})))})}}class PD{constructor(t){this.config=t}apply(t){this.engine=t,pi.events.forEach(n=>{n.code&&n.key&&this.engineAddEventListener(n.code,n.key)})}engineAddEventListener(t,n){this.engine.on(t,r=>Xe(this,null,function*(){if(!(t==="change"&&!this.engine.isMounted)&&r.instance!==void 0)return yield this.callControlEvent(n,r)}))}callControlEvent(t,n){return Xe(this,null,function*(){const r=this.config[n.instance.id];if(!r||!Array.isArray(r[t]))return[];const u=yield Promise.all(r[t].map(i=>Xe(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})));return u.includes(!1)?!1:u})}}function Hr(){return Hr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Hr.apply(this,arguments)}var Fi={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function me(e){return typeof e=="number"}function rt(e){return!e||typeof e!="object"||typeof e.constructor!="function"?!1:e.isBigNumber===!0&&typeof e.constructor.prototype=="object"&&e.constructor.prototype.isBigNumber===!0||typeof e.constructor.isDecimal=="function"&&e.constructor.isDecimal(e)===!0}function Ci(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function Bi(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function wi(e){return e&&e.constructor.prototype.isUnit===!0||!1}function Mn(e){return typeof e=="string"}var Ne=Array.isArray;function Kt(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function zr(e){return Array.isArray(e)||Kt(e)}function LD(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function jD(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function VD(e){return e&&e.constructor.prototype.isRange===!0||!1}function bi(e){return e&&e.constructor.prototype.isIndex===!0||!1}function UD(e){return typeof e=="boolean"}function qD(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function kD(e){return e&&e.constructor.prototype.isHelp===!0||!1}function HD(e){return typeof e=="function"}function zD(e){return e instanceof Date}function WD(e){return e instanceof RegExp}function GD(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!Ci(e)&&!Bi(e))}function XD(e){return e===null}function ZD(e){return e===void 0}function JD(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function KD(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function QD(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function YD(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function eE(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function tE(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function nE(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function rE(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function uE(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function iE(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function aE(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function oE(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function sE(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function cE(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function lE(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function fE(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function hE(e){return e&&e.constructor.prototype.isChain===!0||!1}function Wr(e){var t=typeof e;return t==="object"?e===null?"null":rt(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function ht(e){var t=typeof e;if(t==="number"||t==="string"||t==="boolean"||e===null||e===void 0)return e;if(typeof e.clone=="function")return e.clone();if(Array.isArray(e))return e.map(function(n){return ht(n)});if(e instanceof Date)return new Date(e.valueOf());if(rt(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return pE(e,ht)}function pE(e,t){var n={};for(var r in e)In(e,r)&&(n[r]=t(e[r]));return n}function Gr(e,t){var n,r,u;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(r=0,u=e.length;r<u;r++)if(!Gr(e[r],t[r]))return!1;return!0}else{if(typeof e=="function")return e===t;if(e instanceof Object){if(Array.isArray(t)||!(t instanceof Object))return!1;for(n in e)if(!(n in t)||!Gr(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}else return e===t}}function In(e,t){return e&&Object.hasOwnProperty.call(e,t)}function dE(e,t){for(var n={},r=0;r<t.length;r++){var u=t[r],i=e[u];i!==void 0&&(n[u]=i)}return n}var DE=["Matrix","Array"],EE=["number","BigNumber","Fraction"],Si=function(t){if(t)throw new Error(`The global config is readonly.
|
|
3
3
|
Please create a mathjs instance if you want to change the default configuration.
|
|
4
4
|
Example:
|
|
5
5
|
|
|
6
6
|
import { create, all } from 'mathjs';
|
|
7
7
|
const mathjs = create(all);
|
|
8
8
|
mathjs.config({ number: 'BigNumber' });
|
|
9
|
-
`);return Object.freeze(
|
|
10
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var o=!0,a=!1,l;return{s:function(){n=n.call(e)},n:function(){var d=n.next();return o=d.done,d},e:function(d){a=!0,l=d},f:function(){try{!o&&n.return!=null&&n.return()}finally{if(a)throw l}}}}function Ph(e,t){if(!!e){if(typeof e=="string")return ui(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ui(e,t)}}function ui(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ct(e){return Ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ct(e)}function ii(){return!0}function _e(){return!1}function Ft(){}var oi="Argument is not a typed-function.";function ai(){function e(m){return Ct(m)==="object"&&m!==null&&m.constructor===Object}var t=[{name:"number",test:function(E){return typeof E=="number"}},{name:"string",test:function(E){return typeof E=="string"}},{name:"boolean",test:function(E){return typeof E=="boolean"}},{name:"Function",test:function(E){return typeof E=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(E){return E instanceof Date}},{name:"RegExp",test:function(E){return E instanceof RegExp}},{name:"Object",test:e},{name:"null",test:function(E){return E===null}},{name:"undefined",test:function(E){return E===void 0}}],n={name:"any",test:ii,isAny:!0},r,u,o=0,a={createCount:0};function l(m){var E=r.get(m);if(E)return E;var C='Unknown type "'+m+'"',w=m.toLowerCase(),M,N=Te(u),O;try{for(N.s();!(O=N.n()).done;)if(M=O.value,M.toLowerCase()===w){C+='. Did you mean "'+M+'" ?';break}}catch(b){N.e(b)}finally{N.f()}throw new TypeError(C)}function c(m){for(var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any",C=E?l(E).index:u.length,w=[],M=0;M<m.length;++M){if(!m[M]||typeof m[M].name!="string"||typeof m[M].test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");var N=m[M].name;if(r.has(N))throw new TypeError('Duplicate type name "'+N+'"');w.push(N),r.set(N,{name:N,test:m[M].test,isAny:m[M].isAny,index:C+M,conversionsTo:[]})}var O=u.slice(C);u=u.slice(0,C).concat(w).concat(O);for(var b=C+w.length;b<u.length;++b)r.get(u[b]).index=b}function d(){r=new Map,u=[],o=0,c([n],!1)}d(),c(t);function f(){var m,E=Te(u),C;try{for(E.s();!(C=E.n()).done;)m=C.value,r.get(m).conversionsTo=[]}catch(w){E.e(w)}finally{E.f()}o=0}function s(m){var E=u.filter(function(C){var w=r.get(C);return!w.isAny&&w.test(m)});return E.length?E:["any"]}function h(m){return m&&typeof m=="function"&&"_typedFunctionData"in m}function p(m,E,C){if(!h(m))throw new TypeError(oi);var w=C&&C.exact,M=Array.isArray(E)?E.join(","):E,N=F(M),O=y(N);if(!w||O in m.signatures){var b=m._typedFunctionData.signatureMap.get(O);if(b)return b}var I=N.length,j;if(w){j=[];var U;for(U in m.signatures)j.push(m._typedFunctionData.signatureMap.get(U))}else j=m._typedFunctionData.signatures;for(var x=0;x<I;++x){var me=N[x],he=[],De=void 0,oe=Te(j),Fe;try{for(oe.s();!(Fe=oe.n()).done;){De=Fe.value;var ce=_(De.params,x);if(!(!ce||me.restParam&&!ce.restParam)){if(!ce.hasAny){var Oe=function(){var we=S(ce);if(me.types.some(function(Dt){return!we.has(Dt.name)}))return"continue"}();if(Oe==="continue")continue}he.push(De)}}}catch(we){oe.e(we)}finally{oe.f()}if(j=he,j.length===0)break}var ye,Ee=Te(j),pt;try{for(Ee.s();!(pt=Ee.n()).done;)if(ye=pt.value,ye.params.length<=I)return ye}catch(we){Ee.e(we)}finally{Ee.f()}throw new TypeError("Signature not found (signature: "+(m.name||"unnamed")+"("+y(N,", ")+"))")}function D(m,E,C){return p(m,E,C).implementation}function g(m,E){var C=l(E);if(C.test(m))return m;var w=C.conversionsTo;if(w.length===0)throw new Error("There are no conversions to "+E+" defined.");for(var M=0;M<w.length;M++){var N=l(w[M].from);if(N.test(m))return w[M].convert(m)}throw new Error("Cannot convert "+m+" to "+E)}function y(m){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:",";return m.map(function(C){return C.name}).join(E)}function v(m){var E=m.indexOf("...")===0,C=E?m.length>3?m.slice(3):"any":m,w=C.split("|").map(function(b){return l(b.trim())}),M=!1,N=E?"...":"",O=w.map(function(b){return M=b.isAny||M,N+=b.name+"|",{name:b.name,typeIndex:b.index,test:b.test,isAny:b.isAny,conversion:null,conversionIndex:-1}});return{types:O,name:N.slice(0,-1),hasAny:M,hasConversion:!1,restParam:E}}function A(m){var E=m.types.map(function(O){return O.name}),C=kp(E),w=m.hasAny,M=m.name,N=C.map(function(O){var b=l(O.from);return w=b.isAny||w,M+="|"+O.from,{name:O.from,typeIndex:b.index,test:b.test,isAny:b.isAny,conversion:O,conversionIndex:O.index}});return{types:m.types.concat(N),name:M,hasAny:w,hasConversion:N.length>0,restParam:m.restParam}}function S(m){return m.typeSet||(m.typeSet=new Set,m.types.forEach(function(E){return m.typeSet.add(E.name)})),m.typeSet}function F(m){var E=[];if(typeof m!="string")throw new TypeError("Signatures must be strings");var C=m.trim();if(C==="")return E;for(var w=C.split(","),M=0;M<w.length;++M){var N=v(w[M].trim());if(N.restParam&&M!==w.length-1)throw new SyntaxError('Unexpected rest parameter "'+w[M]+'": only allowed for the last parameter');if(N.types.length===0)return null;E.push(N)}return E}function R(m){var E=_t(m);return E?E.restParam:!1}function P(m){if(!m||m.types.length===0)return ii;if(m.types.length===1)return l(m.types[0].name).test;if(m.types.length===2){var E=l(m.types[0].name).test,C=l(m.types[1].name).test;return function(N){return E(N)||C(N)}}else{var w=m.types.map(function(M){return l(M.name).test});return function(N){for(var O=0;O<w.length;O++)if(w[O](N))return!0;return!1}}}function T(m){var E,C,w;if(R(m)){E=Qi(m).map(P);var M=E.length,N=P(_t(m)),O=function(I){for(var j=M;j<I.length;j++)if(!N(I[j]))return!1;return!0};return function(I){for(var j=0;j<E.length;j++)if(!E[j](I[j]))return!1;return O(I)&&I.length>=M+1}}else return m.length===0?function(I){return I.length===0}:m.length===1?(C=P(m[0]),function(I){return C(I[0])&&I.length===1}):m.length===2?(C=P(m[0]),w=P(m[1]),function(I){return C(I[0])&&w(I[1])&&I.length===2}):(E=m.map(P),function(I){for(var j=0;j<E.length;j++)if(!E[j](I[j]))return!1;return I.length===E.length})}function _(m,E){return E<m.length?m[E]:R(m)?_t(m):null}function $(m,E){var C=_(m,E);return C?S(C):new Set}function Z(m){return m.conversion===null||m.conversion===void 0}function V(m,E){var C=new Set;return m.forEach(function(w){var M=$(w.params,E),N,O=Te(M),b;try{for(O.s();!(b=O.n()).done;)N=b.value,C.add(N)}catch(I){O.e(I)}finally{O.f()}}),C.has("any")?["any"]:Array.from(C)}function Y(m,E,C){var w,M,N=m||"unnamed",O=C,b,I=function(){var oe=[];if(O.forEach(function(ce){var Oe=_(ce.params,b),ye=P(Oe);(b<ce.params.length||R(ce.params))&&ye(E[b])&&oe.push(ce)}),oe.length===0){if(M=V(O,b),M.length>0){var Fe=s(E[b]);return w=new TypeError("Unexpected type of argument in function "+N+" (expected: "+M.join(" or ")+", actual: "+Fe.join(" | ")+", index: "+b+")"),w.data={category:"wrongType",fn:N,index:b,actual:Fe,expected:M},{v:w}}}else O=oe};for(b=0;b<E.length;b++){var j=I();if(Ct(j)==="object")return j.v}var U=O.map(function(De){return R(De.params)?1/0:De.params.length});if(E.length<Math.min.apply(null,U))return M=V(O,b),w=new TypeError("Too few arguments in function "+N+" (expected: "+M.join(" or ")+", index: "+E.length+")"),w.data={category:"tooFewArgs",fn:N,index:E.length,expected:M},w;var x=Math.max.apply(null,U);if(E.length>x)return w=new TypeError("Too many arguments in function "+N+" (expected: "+x+", actual: "+E.length+")"),w.data={category:"tooManyArgs",fn:N,index:E.length,expectedLength:x},w;for(var me=[],he=0;he<E.length;++he)me.push(s(E[he]).join("|"));return w=new TypeError('Arguments of type "'+me.join(", ")+'" do not match any of the defined signatures of function '+N+"."),w.data={category:"mismatch",actual:me},w}function Q(m){for(var E=u.length+1,C=0;C<m.types.length;C++)Z(m.types[C])&&(E=Math.min(E,m.types[C].typeIndex));return E}function ne(m){for(var E=o+1,C=0;C<m.types.length;C++)Z(m.types[C])||(E=Math.min(E,m.types[C].conversionIndex));return E}function ee(m,E){if(m.hasAny){if(!E.hasAny)return 1}else if(E.hasAny)return-1;if(m.restParam){if(!E.restParam)return 1}else if(E.restParam)return-1;if(m.hasConversion){if(!E.hasConversion)return 1}else if(E.hasConversion)return-1;var C=Q(m)-Q(E);if(C<0)return-1;if(C>0)return 1;var w=ne(m)-ne(E);return w<0?-1:w>0?1:0}function W(m,E){var C=m.params,w=E.params,M=_t(C),N=_t(w),O=R(C),b=R(w);if(O&&M.hasAny){if(!b||!N.hasAny)return 1}else if(b&&N.hasAny)return-1;var I=0,j=0,U,x=Te(C),me;try{for(x.s();!(me=x.n()).done;)U=me.value,U.hasAny&&++I,U.hasConversion&&++j}catch(Xt){x.e(Xt)}finally{x.f()}var he=0,De=0,oe=Te(w),Fe;try{for(oe.s();!(Fe=oe.n()).done;)U=Fe.value,U.hasAny&&++he,U.hasConversion&&++De}catch(Xt){oe.e(Xt)}finally{oe.f()}if(I!==he)return I-he;if(O&&M.hasConversion){if(!b||!N.hasConversion)return 1}else if(b&&N.hasConversion)return-1;if(j!==De)return j-De;if(O){if(!b)return 1}else if(b)return-1;var ce=(C.length-w.length)*(O?-1:1);if(ce!==0)return ce;for(var Oe=[],ye=0,Ee=0;Ee<C.length;++Ee){var pt=ee(C[Ee],w[Ee]);Oe.push(pt),ye+=pt}if(ye!==0)return ye;for(var we,Dt=0,xn=Oe;Dt<xn.length;Dt++)if(we=xn[Dt],we!==0)return we;return 0}function kp(m){if(m.length===0)return[];var E=m.map(l);m.length>1&&E.sort(function(I,j){return I.index-j.index});var C=E[0].conversionsTo;if(m.length===1)return C;C=C.concat([]);for(var w=new Set(m),M=1;M<E.length;++M){var N=void 0,O=Te(E[M].conversionsTo),b;try{for(O.s();!(b=O.n()).done;)N=b.value,w.has(N.from)||(C.push(N),w.add(N.from))}catch(I){O.e(I)}finally{O.f()}}return C}function Vp(m,E){var C=E;if(m.some(function(b){return b.hasConversion})){var w=R(m),M=m.map(Up);C=function(){for(var I=[],j=w?arguments.length-1:arguments.length,U=0;U<j;U++)I[U]=M[U](arguments[U]);return w&&(I[j]=arguments[j].map(M[j])),E.apply(this,I)}}var N=C;if(R(m)){var O=m.length-1;N=function(){return C.apply(this,Zr(arguments,0,O).concat([Zr(arguments,O)]))}}return N}function Up(m){var E,C,w,M,N=[],O=[];switch(m.types.forEach(function(b){b.conversion&&(N.push(l(b.conversion.from).test),O.push(b.conversion.convert))}),O.length){case 0:return function(I){return I};case 1:return E=N[0],w=O[0],function(I){return E(I)?w(I):I};case 2:return E=N[0],C=N[1],w=O[0],M=O[1],function(I){return E(I)?w(I):C(I)?M(I):I};default:return function(I){for(var j=0;j<O.length;j++)if(N[j](I))return O[j](I);return I}}}function Hp(m){function E(C,w,M){if(w<C.length){var N=C[w],O=[];if(N.restParam){var b=N.types.filter(Z);b.length<N.types.length&&O.push({types:b,name:"..."+b.map(function(I){return I.name}).join("|"),hasAny:b.some(function(I){return I.isAny}),hasConversion:!1,restParam:!0}),O.push(N)}else O=N.types.map(function(I){return{types:[I],name:I.name,hasAny:I.isAny,hasConversion:I.conversion,restParam:!1}});return Qp(O,function(I){return E(C,w+1,M.concat([I]))})}else return[M]}return E(m,0,[])}function zp(m,E){for(var C=Math.max(m.length,E.length),w=0;w<C;w++){var M=$(m,w),N=$(E,w),O=!1,b=void 0,I=Te(N),j;try{for(I.s();!(j=I.n()).done;)if(b=j.value,M.has(b)){O=!0;break}}catch(De){I.e(De)}finally{I.f()}if(!O)return!1}var U=m.length,x=E.length,me=R(m),he=R(E);return me?he?U===x:x>=U:he?U>=x:U===x}function Wp(m){return m.map(function(E){return no(E)?eo(E.referToSelf.callback):to(E)?Yi(E.referTo.references,E.referTo.callback):E})}function Zp(m,E,C){var w=[],M,N=Te(m),O;try{for(N.s();!(O=N.n()).done;){M=O.value;var b=C[M];if(typeof b!="number")throw new TypeError('No definition for referenced signature "'+M+'"');if(b=E[b],typeof b!="function")return!1;w.push(b)}}catch(I){N.e(I)}finally{N.f()}return w}function Xp(m,E,C){for(var w=Wp(m),M=new Array(w.length).fill(!1),N=!0;N;){N=!1;for(var O=!0,b=0;b<w.length;++b)if(!M[b]){var I=w[b];if(no(I))w[b]=I.referToSelf.callback(C),w[b].referToSelf=I.referToSelf,M[b]=!0,O=!1;else if(to(I)){var j=Zp(I.referTo.references,w,E);j?(w[b]=I.referTo.callback.apply(this,j),w[b].referTo=I.referTo,M[b]=!0,O=!1):N=!0}}if(O&&N)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return w}function Jp(m){var E=/\bthis(\(|\.signatures\b)/;Object.keys(m).forEach(function(C){var w=m[C];if(E.test(w.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function Gp(m,E){if(a.createCount++,Object.keys(E).length===0)throw new SyntaxError("No signatures provided");a.warnAgainstDeprecatedThis&&Jp(E);var C=[],w=[],M={},N=[],O,b=function(){if(!Object.prototype.hasOwnProperty.call(E,O))return"continue";var de=F(O);if(!de)return"continue";C.forEach(function(It){if(zp(It,de))throw new TypeError('Conflicting signatures "'+y(It)+'" and "'+y(de)+'".')}),C.push(de);var io=w.length;w.push(E[O]);var ND=de.map(A),$n=void 0,Pn=Te(Hp(ND)),oo;try{for(Pn.s();!(oo=Pn.n()).done;){$n=oo.value;var ao=y($n);N.push({params:$n,name:ao,fn:io}),$n.every(function(It){return!It.hasConversion})&&(M[ao]=io)}}catch(It){Pn.e(It)}finally{Pn.f()}};for(O in E)var I=b();N.sort(W);var j=Xp(w,M,Gt),U;for(U in M)Object.prototype.hasOwnProperty.call(M,U)&&(M[U]=j[M[U]]);for(var x=[],me=new Map,he=0,De=N;he<De.length;he++)U=De[he],me.has(U.name)||(U.fn=j[U.fn],x.push(U),me.set(U.name,U));for(var oe=x[0]&&x[0].params.length<=2&&!R(x[0].params),Fe=x[1]&&x[1].params.length<=2&&!R(x[1].params),ce=x[2]&&x[2].params.length<=2&&!R(x[2].params),Oe=x[3]&&x[3].params.length<=2&&!R(x[3].params),ye=x[4]&&x[4].params.length<=2&&!R(x[4].params),Ee=x[5]&&x[5].params.length<=2&&!R(x[5].params),pt=oe&&Fe&&ce&&Oe&&ye&&Ee,we=0;we<x.length;++we)x[we].test=T(x[we].params);for(var Dt=oe?P(x[0].params[0]):_e,xn=Fe?P(x[1].params[0]):_e,Xt=ce?P(x[2].params[0]):_e,rD=Oe?P(x[3].params[0]):_e,uD=ye?P(x[4].params[0]):_e,iD=Ee?P(x[5].params[0]):_e,oD=oe?P(x[0].params[1]):_e,aD=Fe?P(x[1].params[1]):_e,sD=ce?P(x[2].params[1]):_e,cD=Oe?P(x[3].params[1]):_e,fD=ye?P(x[4].params[1]):_e,lD=Ee?P(x[5].params[1]):_e,Jt=0;Jt<x.length;++Jt)x[Jt].implementation=Vp(x[Jt].params,x[Jt].fn);var hD=oe?x[0].implementation:Ft,dD=Fe?x[1].implementation:Ft,pD=ce?x[2].implementation:Ft,DD=Oe?x[3].implementation:Ft,gD=ye?x[4].implementation:Ft,vD=Ee?x[5].implementation:Ft,mD=oe?x[0].params.length:-1,yD=Fe?x[1].params.length:-1,ED=ce?x[2].params.length:-1,AD=Oe?x[3].params.length:-1,CD=ye?x[4].params.length:-1,FD=Ee?x[5].params.length:-1,wD=pt?6:0,BD=x.length,bD=x.map(function(Ne){return Ne.test}),SD=x.map(function(Ne){return Ne.implementation}),MD=function(){for(var de=wD;de<BD;de++)if(bD[de](arguments))return SD[de].apply(this,arguments);return a.onMismatch(m,arguments,x)};function Gt(Ne,de){return arguments.length===mD&&Dt(Ne)&&oD(de)?hD.apply(this,arguments):arguments.length===yD&&xn(Ne)&&aD(de)?dD.apply(this,arguments):arguments.length===ED&&Xt(Ne)&&sD(de)?pD.apply(this,arguments):arguments.length===AD&&rD(Ne)&&cD(de)?DD.apply(this,arguments):arguments.length===CD&&uD(Ne)&&fD(de)?gD.apply(this,arguments):arguments.length===FD&&iD(Ne)&&lD(de)?vD.apply(this,arguments):MD.apply(this,arguments)}try{Object.defineProperty(Gt,"name",{value:m})}catch(Ne){}return Gt.signatures=M,Gt._typedFunctionData={signatures:x,signatureMap:me},Gt}function Ki(m,E,C){throw Y(m,E,C)}function Qi(m){return Zr(m,0,m.length-1)}function _t(m){return m[m.length-1]}function Zr(m,E,C){return Array.prototype.slice.call(m,E,C)}function Kp(m,E){for(var C=0;C<m.length;C++)if(E(m[C]))return m[C]}function Qp(m,E){return Array.prototype.concat.apply([],m.map(E))}function Yp(){var m=Qi(arguments).map(function(C){return y(F(C))}),E=_t(arguments);if(typeof E!="function")throw new TypeError("Callback function expected as last argument");return Yi(m,E)}function Yi(m,E){return{referTo:{references:m,callback:E}}}function eo(m){if(typeof m!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:m}}}function to(m){return m&&Ct(m.referTo)==="object"&&Array.isArray(m.referTo.references)&&typeof m.referTo.callback=="function"}function no(m){return m&&Ct(m.referToSelf)==="object"&&typeof m.referToSelf.callback=="function"}function ro(m,E){if(!m)return E;if(E&&E!==m){var C=new Error("Function names do not match (expected: "+m+", actual: "+E+")");throw C.data={actual:E,expected:m},C}return m}function eD(m){var E;for(var C in m)Object.prototype.hasOwnProperty.call(m,C)&&(h(m[C])||typeof m[C].signature=="string")&&(E=ro(E,m[C].name));return E}function tD(m,E){var C;for(C in E)if(Object.prototype.hasOwnProperty.call(E,C)){if(C in m&&E[C]!==m[C]){var w=new Error('Signature "'+C+'" is defined twice');throw w.data={signature:C,sourceFunction:E[C],destFunction:m[C]},w}m[C]=E[C]}}var nD=a;a=function(E){for(var C=typeof E=="string",w=C?1:0,M=C?E:"",N={},O=w;O<arguments.length;++O){var b=arguments[O],I={},j=void 0;if(typeof b=="function"?(j=b.name,typeof b.signature=="string"?I[b.signature]=b:h(b)&&(I=b.signatures)):e(b)&&(I=b,C||(j=eD(b))),Object.keys(I).length===0){var U=new TypeError("Argument to 'typed' at index "+O+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw U.data={index:O,argument:b},U}C||(M=ro(M,j)),tD(N,I)}return Gp(M||"",N)},a.create=ai,a.createCount=nD.createCount,a.onMismatch=Ki,a.throwMismatchError=Ki,a.createError=Y,a.clear=d,a.clearConversions=f,a.addTypes=c,a._findType=l,a.referTo=Yp,a.referToSelf=eo,a.convert=g,a.findSignature=p,a.find=D,a.isTypedFunction=h,a.warnAgainstDeprecatedThis=!0,a.addType=function(m,E){var C="any";E!==!1&&r.has("Object")&&(C="Object"),a.addTypes([m],C)};function uo(m){if(!m||typeof m.from!="string"||typeof m.to!="string"||typeof m.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");if(m.to===m.from)throw new SyntaxError('Illegal to define conversion from "'+m.from+'" to itself.')}return a.addConversion=function(m){uo(m);var E=l(m.to);if(E.conversionsTo.every(function(C){return C.from!==m.from}))E.conversionsTo.push({from:m.from,convert:m.convert,index:o++});else throw new Error('There is already a conversion from "'+m.from+'" to "'+E.name+'"')},a.addConversions=function(m){m.forEach(a.addConversion)},a.removeConversion=function(m){uo(m);var E=l(m.to),C=Kp(E.conversionsTo,function(M){return M.from===m.from});if(!C)throw new Error("Attempt to remove nonexistent conversion from "+m.from+" to "+m.to);if(C.convert!==m.convert)throw new Error("Conversion to remove does not match existing conversion");var w=E.conversionsTo.indexOf(C);E.conversionsTo.splice(w,1)},a.resolve=function(m,E){if(!h(m))throw new TypeError(oi);for(var C=m._typedFunctionData.signatures,w=0;w<C.length;++w)if(C[w].test(E))return C[w];return null},a}var si=ai();function We(e){return typeof e=="boolean"?!0:isFinite(e)?e===Math.round(e):!1}function Rr(e,t,n){var r={2:"0b",8:"0o",16:"0x"},u=r[t],o="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!We(n))throw new Error("size must be an integer");if(e>Tn(2,n-1)-1||e<-Tn(2,n-1))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!We(e))throw new Error("Value must be an integer");e<0&&(e=e+Tn(2,n)),o="i".concat(n)}var a="";return e<0&&(e=-e,a="-"),"".concat(a).concat(u).concat(e.toString(t)).concat(o)}function xr(e,t){if(typeof t=="function")return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var n="auto",r,u;if(t&&(t.notation&&(n=t.notation),ve(t)?r=t:ve(t.precision)&&(r=t.precision),t.wordSize&&(u=t.wordSize,typeof u!="number")))throw new Error('Option "wordSize" must be a number');switch(n){case"fixed":return Lh(e,r);case"exponential":return ci(e,r);case"engineering":return Th(e,r);case"bin":return Rr(e,2,u);case"oct":return Rr(e,8,u);case"hex":return Rr(e,16,u);case"auto":return jh(e,r,t&&t).replace(/((\.\d*?)(0+))($|e)/,function(){var o=arguments[2],a=arguments[4];return o!=="."?o+a:a});default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Fn(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var n=t[1],r=t[2],u=parseFloat(t[4]||"0"),o=r.indexOf(".");u+=o!==-1?o-1:r.length-1;var a=r.replace(".","").replace(/^0*/,function(l){return u-=l.length,""}).replace(/0*$/,"").split("").map(function(l){return parseInt(l)});return a.length===0&&(a.push(0),u++),{sign:n,coefficients:a,exponent:u}}function Th(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=Fn(e),r=wn(n,t),u=r.exponent,o=r.coefficients,a=u%3===0?u:u<0?u-3-u%3:u-u%3;if(ve(t))for(;t>o.length||u-a+1>o.length;)o.push(0);else for(var l=Math.abs(u-a)-(o.length-1),c=0;c<l;c++)o.push(0);for(var d=Math.abs(u-a),f=1;d>0;)f++,d--;var s=o.slice(f).join(""),h=ve(t)&&s.length||s.match(/[1-9]/)?"."+s:"",p=o.slice(0,f).join("")+h+"e"+(u>=0?"+":"")+a.toString();return r.sign+p}function Lh(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=Fn(e),r=typeof t=="number"?wn(n,n.exponent+1+t):n,u=r.coefficients,o=r.exponent+1,a=o+(t||0);return u.length<a&&(u=u.concat(wt(a-u.length))),o<0&&(u=wt(-o+1).concat(u),o=1),o<u.length&&u.splice(o,0,o===0?"0.":"."),r.sign+u.join("")}function ci(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=Fn(e),r=t?wn(n,t):n,u=r.coefficients,o=r.exponent;u.length<t&&(u=u.concat(wt(t-u.length)));var a=u.shift();return r.sign+a+(u.length>0?"."+u.join(""):"")+"e"+(o>=0?"+":"")+o}function jh(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&n.lowerExp!==void 0?n.lowerExp:-3,u=n&&n.upperExp!==void 0?n.upperExp:5,o=Fn(e),a=t?wn(o,t):o;if(a.exponent<r||a.exponent>=u)return ci(e,t);var l=a.coefficients,c=a.exponent;l.length<t&&(l=l.concat(wt(t-l.length))),l=l.concat(wt(c-l.length+1+(l.length<t?t-l.length:0))),l=wt(-c).concat(l);var d=c>0?c:0;return d<l.length-1&&l.splice(d+1,0,"."),a.sign+l.join("")}function wn(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t){var u=r.splice(t,r.length-t);if(u[0]>=5){var o=t-1;for(r[o]++;r[o]===10;)r.pop(),o===0&&(r.unshift(0),n.exponent++,o++),o--,r[o]++}}return n}function wt(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function qh(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}var kh=Number.EPSILON||2220446049250313e-31;function Vh(e,t,n){if(n==null)return e===t;if(e===t)return!0;if(isNaN(e)||isNaN(t))return!1;if(isFinite(e)&&isFinite(t)){var r=Math.abs(e-t);return r<kh?!0:r<=Math.max(Math.abs(e),Math.abs(t))*n}return!1}function $r(e,t,n){var r=e.constructor,u=new r(2),o="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!We(n))throw new Error("size must be an integer");if(e.greaterThan(u.pow(n-1).sub(1))||e.lessThan(u.pow(n-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(u.pow(n))),o="i".concat(n)}switch(t){case 2:return"".concat(e.toBinary()).concat(o);case 8:return"".concat(e.toOctal()).concat(o);case 16:return"".concat(e.toHexadecimal()).concat(o);default:throw new Error("Base ".concat(t," not supported "))}}function Uh(e,t){if(typeof t=="function")return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n="auto",r,u;if(t!==void 0&&(t.notation&&(n=t.notation),typeof t=="number"?r=t:t.precision&&(r=t.precision),t.wordSize&&(u=t.wordSize,typeof u!="number")))throw new Error('Option "wordSize" must be a number');switch(n){case"fixed":return zh(e,r);case"exponential":return fi(e,r);case"engineering":return Hh(e,r);case"bin":return $r(e,2,u);case"oct":return $r(e,8,u);case"hex":return $r(e,16,u);case"auto":{var o=t&&t.lowerExp!==void 0?t.lowerExp:-3,a=t&&t.upperExp!==void 0?t.upperExp:5;if(e.isZero())return"0";var l,c=e.toSignificantDigits(r),d=c.e;return d>=o&&d<a?l=c.toFixed():l=fi(e,r),l.replace(/((\.\d*?)(0+))($|e)/,function(){var f=arguments[2],s=arguments[4];return f!=="."?f+s:s})}default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Hh(e,t){var n=e.e,r=n%3===0?n:n<0?n-3-n%3:n-n%3,u=e.mul(Math.pow(10,-r)),o=u.toPrecision(t);return o.indexOf("e")!==-1&&(o=u.toString()),o+"e"+(n>=0?"+":"")+r.toString()}function fi(e,t){return t!==void 0?e.toExponential(t-1):e.toExponential()}function zh(e,t){return e.toFixed(t)}function dt(e,t){var n=Wh(e,t);return t&&typeof t=="object"&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function Wh(e,t){if(typeof e=="number")return xr(e,t);if(ut(e))return Uh(e,t);if(Zh(e))return!t||t.fraction!=="decimal"?e.s*e.n+"/"+e.d:e.toString();if(Array.isArray(e))return li(e,t);if(An(e))return'"'+e+'"';if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var n=Object.keys(e).map(r=>'"'+r+'": '+dt(e[r],t));return"{"+n.join(", ")+"}"}return String(e)}function li(e,t){if(Array.isArray(e)){for(var n="[",r=e.length,u=0;u<r;u++)u!==0&&(n+=", "),n+=li(e[u],t);return n+="]",n}else return dt(e,t)}function Zh(e){return e&&typeof e=="object"&&typeof e.s=="number"&&typeof e.n=="number"&&typeof e.d=="number"||!1}function se(e,t,n){if(!(this instanceof se))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=new Error().stack}se.prototype=new RangeError,se.prototype.constructor=RangeError,se.prototype.name="DimensionError",se.prototype.isDimensionError=!0;function Bt(e,t,n){if(!(this instanceof Bt))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),this.min!==void 0&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":this.max!==void 0&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}Bt.prototype=new RangeError,Bt.prototype.constructor=RangeError,Bt.prototype.name="IndexError",Bt.prototype.isIndexError=!0;function Pr(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function hi(e,t,n){var r,u=e.length;if(u!==t[n])throw new se(u,t[n]);if(n<t.length-1){var o=n+1;for(r=0;r<u;r++){var a=e[r];if(!Array.isArray(a))throw new se(t.length-1,t.length,"<");hi(e[r],t,o)}}else for(r=0;r<u;r++)if(Array.isArray(e[r]))throw new se(t.length+1,t.length,">")}function di(e,t){var n=t.length===0;if(n){if(Array.isArray(e))throw new se(e.length,0)}else hi(e,t,0)}function Ie(e,t){if(!ve(e)||!We(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof t=="number"&&e>=t)throw new Bt(e,t)}function pi(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new Error("Resizing to scalar is not supported");t.forEach(function(u){if(!ve(u)||!We(u)||u<0)throw new TypeError("Invalid size, must contain positive integers (size: "+dt(t)+")")});var r=n!==void 0?n:0;return Tr(e,t,0,r),e}function Tr(e,t,n,r){var u,o,a=e.length,l=t[n],c=Math.min(a,l);if(e.length=l,n<t.length-1){var d=n+1;for(u=0;u<c;u++)o=e[u],Array.isArray(o)||(o=[o],e[u]=o),Tr(o,t,d,r);for(u=c;u<l;u++)o=[],e[u]=o,Tr(o,t,d,r)}else{for(u=0;u<c;u++)for(;Array.isArray(e[u]);)e[u]=e[u][0];for(u=c;u<l;u++)e[u]=r}}function Xh(e,t){var n=Kh(e),r=n.length;if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new se(0,r,"!=");t=Di(t,r);var u=gi(t);if(r!==u)throw new se(u,r,"!=");try{return Jh(n,t)}catch(o){throw o instanceof se?new se(u,r,"!="):o}}function Di(e,t){var n=gi(e),r=e.slice(),u=-1,o=e.indexOf(u),a=e.indexOf(u,o+1)>=0;if(a)throw new Error("More than one wildcard in sizes");var l=o>=0,c=t%n===0;if(l)if(c)r[o]=-t/n;else throw new Error("Could not replace wildcard, since "+t+" is no multiple of "+-n);return r}function gi(e){return e.reduce((t,n)=>t*n,1)}function Jh(e,t){for(var n=e,r,u=t.length-1;u>0;u--){var o=t[u];r=[];for(var a=n.length/o,l=0;l<a;l++)r.push(n.slice(l*o,(l+1)*o));n=r}return n}function Gh(e,t,n,r){var u=r||Pr(e);if(n)for(var o=0;o<n;o++)e=[e],u.unshift(1);for(e=vi(e,t,0);u.length<t;)u.push(1);return e}function vi(e,t,n){var r,u;if(Array.isArray(e)){var o=n+1;for(r=0,u=e.length;r<u;r++)e[r]=vi(e[r],t,o)}else for(var a=n;a<t;a++)e=[e];return e}function Kh(e){if(!Array.isArray(e))return e;var t=[];return e.forEach(function n(r){Array.isArray(r)?r.forEach(n):t.push(r)}),t}function Lr(e,t){for(var n,r=0,u=0;u<e.length;u++){var o=e[u],a=Array.isArray(o);if(u===0&&a&&(r=o.length),a&&o.length!==r)return;var l=a?Lr(o,t):t(o);if(n===void 0)n=l;else if(n!==l)return"mixed"}return n}function Ae(e,t,n,r){function u(o){var a=Rh(o,t.map(ed));return Qh(e,t,o),n(a)}return u.isFactory=!0,u.fn=e,u.dependencies=t.slice().sort(),r&&(u.meta=r),u}function Qh(e,t,n){var r=t.filter(o=>!Yh(o)).every(o=>n[o]!==void 0);if(!r){var u=t.filter(o=>n[o]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(u.map(o=>'"'.concat(o,'"')).join(", "),"."))}}function Yh(e){return e&&e[0]==="?"}function ed(e){return e&&e[0]==="?"?e.slice(1):e}function td(e,t){if(yi(e)&&mi(e,t))return e[t];throw typeof e[t]=="function"&&ud(e,t)?new Error('Cannot access method "'+t+'" as a property'):new Error('No access to property "'+t+'"')}function nd(e,t,n){if(yi(e)&&mi(e,t))return e[t]=n,n;throw new Error('No access to property "'+t+'"')}function rd(e,t){return t in e}function mi(e,t){return!e||typeof e!="object"?!1:Cn(id,t)?!0:!(t in Object.prototype||t in Function.prototype)}function ud(e,t){return e==null||typeof e[t]!="function"||Cn(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e)?!1:Cn(od,t)?!0:!(t in Object.prototype||t in Function.prototype)}function yi(e){return typeof e=="object"&&e&&e.constructor===Object}var id={length:!0,name:!0},od={toString:!0,valueOf:!0,toLocaleString:!0};class ad{constructor(t){this.wrappedObject=t}keys(){return Object.keys(this.wrappedObject)}get(t){return td(this.wrappedObject,t)}set(t,n){return nd(this.wrappedObject,t,n),this}has(t){return rd(this.wrappedObject,t)}}function sd(e){return e?e instanceof Map||e instanceof ad||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}var Ei=function(){return Ei=si.create,si},cd=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],fd=Ae("typed",cd,function(t){var{BigNumber:n,Complex:r,DenseMatrix:u,Fraction:o}=t,a=Ei();return a.clear(),a.addTypes([{name:"number",test:ve},{name:"Complex",test:Yu},{name:"BigNumber",test:ut},{name:"Fraction",test:ei},{name:"Unit",test:ti},{name:"identifier",test:l=>An&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])*$/.test(l)},{name:"string",test:An},{name:"Chain",test:Ih},{name:"Array",test:Me},{name:"Matrix",test:zt},{name:"DenseMatrix",test:rh},{name:"SparseMatrix",test:uh},{name:"Range",test:ih},{name:"Index",test:ni},{name:"boolean",test:oh},{name:"ResultSet",test:ah},{name:"Help",test:sh},{name:"function",test:ch},{name:"Date",test:fh},{name:"RegExp",test:lh},{name:"null",test:dh},{name:"undefined",test:ph},{name:"AccessorNode",test:Dh},{name:"ArrayNode",test:gh},{name:"AssignmentNode",test:vh},{name:"BlockNode",test:mh},{name:"ConditionalNode",test:yh},{name:"ConstantNode",test:Eh},{name:"FunctionNode",test:Ch},{name:"FunctionAssignmentNode",test:Ah},{name:"IndexNode",test:Fh},{name:"Node",test:wh},{name:"ObjectNode",test:Bh},{name:"OperatorNode",test:bh},{name:"ParenthesisNode",test:Sh},{name:"RangeNode",test:Mh},{name:"RelationalNode",test:Nh},{name:"SymbolNode",test:_h},{name:"Map",test:sd},{name:"Object",test:hh}]),a.addConversions([{from:"number",to:"BigNumber",convert:function(c){if(n||jr(c),qh(c)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+c+"). Use function bignumber(x) to convert to BigNumber.");return new n(c)}},{from:"number",to:"Complex",convert:function(c){return r||Bn(c),new r(c,0)}},{from:"BigNumber",to:"Complex",convert:function(c){return r||Bn(c),new r(c.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(c){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(c){return r||Bn(c),new r(c.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(c){o||qr(c);var d=new o(c);if(d.valueOf()!==c)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+c+"). Use function fraction(x) to convert to Fraction.");return d}},{from:"string",to:"number",convert:function(c){var d=Number(c);if(isNaN(d))throw new Error('Cannot convert "'+c+'" to a number');return d}},{from:"string",to:"BigNumber",convert:function(c){n||jr(c);try{return new n(c)}catch(d){throw new Error('Cannot convert "'+c+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(c){o||qr(c);try{return new o(c)}catch(d){throw new Error('Cannot convert "'+c+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(c){r||Bn(c);try{return new r(c)}catch(d){throw new Error('Cannot convert "'+c+'" to Complex')}}},{from:"boolean",to:"number",convert:function(c){return+c}},{from:"boolean",to:"BigNumber",convert:function(c){return n||jr(c),new n(+c)}},{from:"boolean",to:"Fraction",convert:function(c){return o||qr(c),new o(+c)}},{from:"boolean",to:"string",convert:function(c){return String(c)}},{from:"Array",to:"Matrix",convert:function(c){return u||ld(),new u(c)}},{from:"Matrix",to:"Array",convert:function(c){return c.valueOf()}}]),a.onMismatch=(l,c,d)=>{var f=a.createError(l,c,d);if(["wrongType","mismatch"].includes(f.data.category)&&c.length===1&&_r(c[0])&&d.some(h=>!h.params.includes(","))){var s=new TypeError("Function '".concat(l,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(l,")'."));throw s.data=f.data,s}throw f},a.onMismatch=(l,c,d)=>{var f=a.createError(l,c,d);if(["wrongType","mismatch"].includes(f.data.category)&&c.length===1&&_r(c[0])&&d.some(h=>!h.params.includes(","))){var s=new TypeError("Function '".concat(l,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(l,")'."));throw s.data=f.data,s}throw f},a});function jr(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function Bn(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function ld(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function qr(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}/*!
|
|
9
|
+
`);return Object.freeze(Fi)};Hr(Si,Fi,{MATRIX_OPTIONS:DE,NUMBER_OPTIONS:EE});function Le(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=vE(e))||t&&e&&typeof e.length=="number"){n&&(e=n);var r=0,u=function(){};return{s:u,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(l){throw l},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
10
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=!0,a=!1,s;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){a=!0,s=l},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(a)throw s}}}}function vE(e,t){if(!!e){if(typeof e=="string")return Mi(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Mi(e,t)}}function Mi(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function wt(e){return wt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt(e)}function Ii(){return!0}function Re(){return!1}function bt(){}var _i="Argument is not a typed-function.";function Ni(){function e(g){return wt(g)==="object"&&g!==null&&g.constructor===Object}var t=[{name:"number",test:function(m){return typeof m=="number"}},{name:"string",test:function(m){return typeof m=="string"}},{name:"boolean",test:function(m){return typeof m=="boolean"}},{name:"Function",test:function(m){return typeof m=="function"}},{name:"Array",test:Array.isArray},{name:"Date",test:function(m){return m instanceof Date}},{name:"RegExp",test:function(m){return m instanceof RegExp}},{name:"Object",test:e},{name:"null",test:function(m){return m===null}},{name:"undefined",test:function(m){return m===void 0}}],n={name:"any",test:Ii,isAny:!0},r,u,i=0,a={createCount:0};function s(g){var m=r.get(g);if(m)return m;var A='Unknown type "'+g+'"',C=g.toLowerCase(),S,M=Le(u),N;try{for(M.s();!(N=M.n()).done;)if(S=N.value,S.toLowerCase()===C){A+='. Did you mean "'+S+'" ?';break}}catch(w){M.e(w)}finally{M.f()}throw new TypeError(A)}function c(g){for(var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any",A=m?s(m).index:u.length,C=[],S=0;S<g.length;++S){if(!g[S]||typeof g[S].name!="string"||typeof g[S].test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");var M=g[S].name;if(r.has(M))throw new TypeError('Duplicate type name "'+M+'"');C.push(M),r.set(M,{name:M,test:g[S].test,isAny:g[S].isAny,index:A+S,conversionsTo:[]})}var N=u.slice(A);u=u.slice(0,A).concat(C).concat(N);for(var w=A+C.length;w<u.length;++w)r.get(u[w]).index=w}function l(){r=new Map,u=[],i=0,c([n],!1)}l(),c(t);function f(){var g,m=Le(u),A;try{for(m.s();!(A=m.n()).done;)g=A.value,r.get(g).conversionsTo=[]}catch(C){m.e(C)}finally{m.f()}i=0}function o(g){var m=u.filter(function(A){var C=r.get(A);return!C.isAny&&C.test(g)});return m.length?m:["any"]}function h(g){return g&&typeof g=="function"&&"_typedFunctionData"in g}function p(g,m,A){if(!h(g))throw new TypeError(_i);var C=A&&A.exact,S=Array.isArray(m)?m.join(","):m,M=F(S),N=v(M);if(!C||N in g.signatures){var w=g._typedFunctionData.signatureMap.get(N);if(w)return w}var _=M.length,L;if(C){L=[];var q;for(q in g.signatures)L.push(g._typedFunctionData.signatureMap.get(q))}else L=g._typedFunctionData.signatures;for(var R=0;R<_;++R){var ye=M[R],fe=[],De=void 0,ie=Le(L),we;try{for(ie.s();!(we=ie.n()).done;){De=we.value;var se=I(De.params,R);if(!(!se||ye.restParam&&!se.restParam)){if(!se.hasAny){var Oe=function(){var be=b(se);if(ye.types.some(function(Dt){return!be.has(Dt.name)}))return"continue"}();if(Oe==="continue")continue}fe.push(De)}}}catch(be){ie.e(be)}finally{ie.f()}if(L=fe,L.length===0)break}var Ae,Fe=Le(L),dt;try{for(Fe.s();!(dt=Fe.n()).done;)if(Ae=dt.value,Ae.params.length<=_)return Ae}catch(be){Fe.e(be)}finally{Fe.f()}throw new TypeError("Signature not found (signature: "+(g.name||"unnamed")+"("+v(M,", ")+"))")}function d(g,m,A){return p(g,m,A).implementation}function D(g,m){var A=s(m);if(A.test(g))return g;var C=A.conversionsTo;if(C.length===0)throw new Error("There are no conversions to "+m+" defined.");for(var S=0;S<C.length;S++){var M=s(C[S].from);if(M.test(g))return C[S].convert(g)}throw new Error("Cannot convert "+g+" to "+m)}function v(g){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:",";return g.map(function(A){return A.name}).join(m)}function E(g){var m=g.indexOf("...")===0,A=m?g.length>3?g.slice(3):"any":g,C=A.split("|").map(function(w){return s(w.trim())}),S=!1,M=m?"...":"",N=C.map(function(w){return S=w.isAny||S,M+=w.name+"|",{name:w.name,typeIndex:w.index,test:w.test,isAny:w.isAny,conversion:null,conversionIndex:-1}});return{types:N,name:M.slice(0,-1),hasAny:S,hasConversion:!1,restParam:m}}function y(g){var m=g.types.map(function(N){return N.name}),A=Fg(m),C=g.hasAny,S=g.name,M=A.map(function(N){var w=s(N.from);return C=w.isAny||C,S+="|"+N.from,{name:N.from,typeIndex:w.index,test:w.test,isAny:w.isAny,conversion:N,conversionIndex:N.index}});return{types:g.types.concat(M),name:S,hasAny:C,hasConversion:M.length>0,restParam:g.restParam}}function b(g){return g.typeSet||(g.typeSet=new Set,g.types.forEach(function(m){return g.typeSet.add(m.name)})),g.typeSet}function F(g){var m=[];if(typeof g!="string")throw new TypeError("Signatures must be strings");var A=g.trim();if(A==="")return m;for(var C=A.split(","),S=0;S<C.length;++S){var M=E(C[S].trim());if(M.restParam&&S!==C.length-1)throw new SyntaxError('Unexpected rest parameter "'+C[S]+'": only allowed for the last parameter');if(M.types.length===0)return null;m.push(M)}return m}function $(g){var m=Rt(g);return m?m.restParam:!1}function O(g){if(!g||g.types.length===0)return Ii;if(g.types.length===1)return s(g.types[0].name).test;if(g.types.length===2){var m=s(g.types[0].name).test,A=s(g.types[1].name).test;return function(M){return m(M)||A(M)}}else{var C=g.types.map(function(S){return s(S.name).test});return function(M){for(var N=0;N<C.length;N++)if(C[N](M))return!0;return!1}}}function T(g){var m,A,C;if($(g)){m=Fa(g).map(O);var S=m.length,M=O(Rt(g)),N=function(_){for(var L=S;L<_.length;L++)if(!M(_[L]))return!1;return!0};return function(_){for(var L=0;L<m.length;L++)if(!m[L](_[L]))return!1;return N(_)&&_.length>=S+1}}else return g.length===0?function(_){return _.length===0}:g.length===1?(A=O(g[0]),function(_){return A(_[0])&&_.length===1}):g.length===2?(A=O(g[0]),C=O(g[1]),function(_){return A(_[0])&&C(_[1])&&_.length===2}):(m=g.map(O),function(_){for(var L=0;L<m.length;L++)if(!m[L](_[L]))return!1;return _.length===m.length})}function I(g,m){return m<g.length?g[m]:$(g)?Rt(g):null}function x(g,m){var A=I(g,m);return A?b(A):new Set}function W(g){return g.conversion===null||g.conversion===void 0}function U(g,m){var A=new Set;return g.forEach(function(C){var S=x(C.params,m),M,N=Le(S),w;try{for(N.s();!(w=N.n()).done;)M=w.value,A.add(M)}catch(_){N.e(_)}finally{N.f()}}),A.has("any")?["any"]:Array.from(A)}function K(g,m,A){var C,S,M=g||"unnamed",N=A,w,_=function(){var ie=[];if(N.forEach(function(se){var Oe=I(se.params,w),Ae=O(Oe);(w<se.params.length||$(se.params))&&Ae(m[w])&&ie.push(se)}),ie.length===0){if(S=U(N,w),S.length>0){var we=o(m[w]);return C=new TypeError("Unexpected type of argument in function "+M+" (expected: "+S.join(" or ")+", actual: "+we.join(" | ")+", index: "+w+")"),C.data={category:"wrongType",fn:M,index:w,actual:we,expected:S},{v:C}}}else N=ie};for(w=0;w<m.length;w++){var L=_();if(wt(L)==="object")return L.v}var q=N.map(function(De){return $(De.params)?1/0:De.params.length});if(m.length<Math.min.apply(null,q))return S=U(N,w),C=new TypeError("Too few arguments in function "+M+" (expected: "+S.join(" or ")+", index: "+m.length+")"),C.data={category:"tooFewArgs",fn:M,index:m.length,expected:S},C;var R=Math.max.apply(null,q);if(m.length>R)return C=new TypeError("Too many arguments in function "+M+" (expected: "+R+", actual: "+m.length+")"),C.data={category:"tooManyArgs",fn:M,index:m.length,expectedLength:R},C;for(var ye=[],fe=0;fe<m.length;++fe)ye.push(o(m[fe]).join("|"));return C=new TypeError('Arguments of type "'+ye.join(", ")+'" do not match any of the defined signatures of function '+M+"."),C.data={category:"mismatch",actual:ye},C}function J(g){for(var m=u.length+1,A=0;A<g.types.length;A++)W(g.types[A])&&(m=Math.min(m,g.types[A].typeIndex));return m}function ee(g){for(var m=i+1,A=0;A<g.types.length;A++)W(g.types[A])||(m=Math.min(m,g.types[A].conversionIndex));return m}function Q(g,m){if(g.hasAny){if(!m.hasAny)return 1}else if(m.hasAny)return-1;if(g.restParam){if(!m.restParam)return 1}else if(m.restParam)return-1;if(g.hasConversion){if(!m.hasConversion)return 1}else if(m.hasConversion)return-1;var A=J(g)-J(m);if(A<0)return-1;if(A>0)return 1;var C=ee(g)-ee(m);return C<0?-1:C>0?1:0}function H(g,m){var A=g.params,C=m.params,S=Rt(A),M=Rt(C),N=$(A),w=$(C);if(N&&S.hasAny){if(!w||!M.hasAny)return 1}else if(w&&M.hasAny)return-1;var _=0,L=0,q,R=Le(A),ye;try{for(R.s();!(ye=R.n()).done;)q=ye.value,q.hasAny&&++_,q.hasConversion&&++L}catch(en){R.e(en)}finally{R.f()}var fe=0,De=0,ie=Le(C),we;try{for(ie.s();!(we=ie.n()).done;)q=we.value,q.hasAny&&++fe,q.hasConversion&&++De}catch(en){ie.e(en)}finally{ie.f()}if(_!==fe)return _-fe;if(N&&S.hasConversion){if(!w||!M.hasConversion)return 1}else if(w&&M.hasConversion)return-1;if(L!==De)return L-De;if(N){if(!w)return 1}else if(w)return-1;var se=(A.length-C.length)*(N?-1:1);if(se!==0)return se;for(var Oe=[],Ae=0,Fe=0;Fe<A.length;++Fe){var dt=Q(A[Fe],C[Fe]);Oe.push(dt),Ae+=dt}if(Ae!==0)return Ae;for(var be,Dt=0,Un=Oe;Dt<Un.length;Dt++)if(be=Un[Dt],be!==0)return be;return 0}function Fg(g){if(g.length===0)return[];var m=g.map(s);g.length>1&&m.sort(function(_,L){return _.index-L.index});var A=m[0].conversionsTo;if(g.length===1)return A;A=A.concat([]);for(var C=new Set(g),S=1;S<m.length;++S){var M=void 0,N=Le(m[S].conversionsTo),w;try{for(N.s();!(w=N.n()).done;)M=w.value,C.has(M.from)||(A.push(M),C.add(M.from))}catch(_){N.e(_)}finally{N.f()}}return A}function Cg(g,m){var A=m;if(g.some(function(w){return w.hasConversion})){var C=$(g),S=g.map(Bg);A=function(){for(var _=[],L=C?arguments.length-1:arguments.length,q=0;q<L;q++)_[q]=S[q](arguments[q]);return C&&(_[L]=arguments[L].map(S[L])),m.apply(this,_)}}var M=A;if($(g)){var N=g.length-1;M=function(){return A.apply(this,su(arguments,0,N).concat([su(arguments,N)]))}}return M}function Bg(g){var m,A,C,S,M=[],N=[];switch(g.types.forEach(function(w){w.conversion&&(M.push(s(w.conversion.from).test),N.push(w.conversion.convert))}),N.length){case 0:return function(_){return _};case 1:return m=M[0],C=N[0],function(_){return m(_)?C(_):_};case 2:return m=M[0],A=M[1],C=N[0],S=N[1],function(_){return m(_)?C(_):A(_)?S(_):_};default:return function(_){for(var L=0;L<N.length;L++)if(M[L](_))return N[L](_);return _}}}function wg(g){function m(A,C,S){if(C<A.length){var M=A[C],N=[];if(M.restParam){var w=M.types.filter(W);w.length<M.types.length&&N.push({types:w,name:"..."+w.map(function(_){return _.name}).join("|"),hasAny:w.some(function(_){return _.isAny}),hasConversion:!1,restParam:!0}),N.push(M)}else N=M.types.map(function(_){return{types:[_],name:_.name,hasAny:_.isAny,hasConversion:_.conversion,restParam:!1}});return Rg(N,function(_){return m(A,C+1,S.concat([_]))})}else return[S]}return m(g,0,[])}function bg(g,m){for(var A=Math.max(g.length,m.length),C=0;C<A;C++){var S=x(g,C),M=x(m,C),N=!1,w=void 0,_=Le(M),L;try{for(_.s();!(L=_.n()).done;)if(w=L.value,S.has(w)){N=!0;break}}catch(De){_.e(De)}finally{_.f()}if(!N)return!1}var q=g.length,R=m.length,ye=$(g),fe=$(m);return ye?fe?q===R:R>=q:fe?q>=R:q===R}function Sg(g){return g.map(function(m){return ba(m)?Ba(m.referToSelf.callback):wa(m)?Ca(m.referTo.references,m.referTo.callback):m})}function Mg(g,m,A){var C=[],S,M=Le(g),N;try{for(M.s();!(N=M.n()).done;){S=N.value;var w=A[S];if(typeof w!="number")throw new TypeError('No definition for referenced signature "'+S+'"');if(w=m[w],typeof w!="function")return!1;C.push(w)}}catch(_){M.e(_)}finally{M.f()}return C}function Ig(g,m,A){for(var C=Sg(g),S=new Array(C.length).fill(!1),M=!0;M;){M=!1;for(var N=!0,w=0;w<C.length;++w)if(!S[w]){var _=C[w];if(ba(_))C[w]=_.referToSelf.callback(A),C[w].referToSelf=_.referToSelf,S[w]=!0,N=!1;else if(wa(_)){var L=Mg(_.referTo.references,C,m);L?(C[w]=_.referTo.callback.apply(this,L),C[w].referTo=_.referTo,S[w]=!0,N=!1):M=!0}}if(N&&M)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return C}function _g(g){var m=/\bthis(\(|\.signatures\b)/;Object.keys(g).forEach(function(A){var C=g[A];if(m.test(C.toString()))throw new SyntaxError("Using `this` to self-reference a function is deprecated since typed-function@3. Use typed.referTo and typed.referToSelf instead.")})}function Ng(g,m){if(a.createCount++,Object.keys(m).length===0)throw new SyntaxError("No signatures provided");a.warnAgainstDeprecatedThis&&_g(m);var A=[],C=[],S={},M=[],N,w=function(){if(!Object.prototype.hasOwnProperty.call(m,N))return"continue";var he=F(N);if(!he)return"continue";A.forEach(function(xt){if(bg(xt,he))throw new TypeError('Conflicting signatures "'+v(xt)+'" and "'+v(he)+'".')}),A.push(he);var Ia=C.length;C.push(m[N]);var lm=he.map(y),qn=void 0,kn=Le(wg(lm)),_a;try{for(kn.s();!(_a=kn.n()).done;){qn=_a.value;var Na=v(qn);M.push({params:qn,name:Na,fn:Ia}),qn.every(function(xt){return!xt.hasConversion})&&(S[Na]=Ia)}}catch(xt){kn.e(xt)}finally{kn.f()}};for(N in m)var _=w();M.sort(H);var L=Ig(C,S,nn),q;for(q in S)Object.prototype.hasOwnProperty.call(S,q)&&(S[q]=L[S[q]]);for(var R=[],ye=new Map,fe=0,De=M;fe<De.length;fe++)q=De[fe],ye.has(q.name)||(q.fn=L[q.fn],R.push(q),ye.set(q.name,q));for(var ie=R[0]&&R[0].params.length<=2&&!$(R[0].params),we=R[1]&&R[1].params.length<=2&&!$(R[1].params),se=R[2]&&R[2].params.length<=2&&!$(R[2].params),Oe=R[3]&&R[3].params.length<=2&&!$(R[3].params),Ae=R[4]&&R[4].params.length<=2&&!$(R[4].params),Fe=R[5]&&R[5].params.length<=2&&!$(R[5].params),dt=ie&&we&&se&&Oe&&Ae&&Fe,be=0;be<R.length;++be)R[be].test=T(R[be].params);for(var Dt=ie?O(R[0].params[0]):Re,Un=we?O(R[1].params[0]):Re,en=se?O(R[2].params[0]):Re,Lg=Oe?O(R[3].params[0]):Re,jg=Ae?O(R[4].params[0]):Re,Vg=Fe?O(R[5].params[0]):Re,Ug=ie?O(R[0].params[1]):Re,qg=we?O(R[1].params[1]):Re,kg=se?O(R[2].params[1]):Re,Hg=Oe?O(R[3].params[1]):Re,zg=Ae?O(R[4].params[1]):Re,Wg=Fe?O(R[5].params[1]):Re,tn=0;tn<R.length;++tn)R[tn].implementation=Cg(R[tn].params,R[tn].fn);var Gg=ie?R[0].implementation:bt,Xg=we?R[1].implementation:bt,Zg=se?R[2].implementation:bt,Jg=Oe?R[3].implementation:bt,Kg=Ae?R[4].implementation:bt,Qg=Fe?R[5].implementation:bt,Yg=ie?R[0].params.length:-1,em=we?R[1].params.length:-1,tm=se?R[2].params.length:-1,nm=Oe?R[3].params.length:-1,rm=Ae?R[4].params.length:-1,um=Fe?R[5].params.length:-1,im=dt?6:0,am=R.length,om=R.map(function($e){return $e.test}),sm=R.map(function($e){return $e.implementation}),cm=function(){for(var he=im;he<am;he++)if(om[he](arguments))return sm[he].apply(this,arguments);return a.onMismatch(g,arguments,R)};function nn($e,he){return arguments.length===Yg&&Dt($e)&&Ug(he)?Gg.apply(this,arguments):arguments.length===em&&Un($e)&&qg(he)?Xg.apply(this,arguments):arguments.length===tm&&en($e)&&kg(he)?Zg.apply(this,arguments):arguments.length===nm&&Lg($e)&&Hg(he)?Jg.apply(this,arguments):arguments.length===rm&&jg($e)&&zg(he)?Kg.apply(this,arguments):arguments.length===um&&Vg($e)&&Wg(he)?Qg.apply(this,arguments):cm.apply(this,arguments)}try{Object.defineProperty(nn,"name",{value:g})}catch($e){}return nn.signatures=S,nn._typedFunctionData={signatures:R,signatureMap:ye},nn}function Aa(g,m,A){throw K(g,m,A)}function Fa(g){return su(g,0,g.length-1)}function Rt(g){return g[g.length-1]}function su(g,m,A){return Array.prototype.slice.call(g,m,A)}function $g(g,m){for(var A=0;A<g.length;A++)if(m(g[A]))return g[A]}function Rg(g,m){return Array.prototype.concat.apply([],g.map(m))}function xg(){var g=Fa(arguments).map(function(A){return v(F(A))}),m=Rt(arguments);if(typeof m!="function")throw new TypeError("Callback function expected as last argument");return Ca(g,m)}function Ca(g,m){return{referTo:{references:g,callback:m}}}function Ba(g){if(typeof g!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:g}}}function wa(g){return g&&wt(g.referTo)==="object"&&Array.isArray(g.referTo.references)&&typeof g.referTo.callback=="function"}function ba(g){return g&&wt(g.referToSelf)==="object"&&typeof g.referToSelf.callback=="function"}function Sa(g,m){if(!g)return m;if(m&&m!==g){var A=new Error("Function names do not match (expected: "+g+", actual: "+m+")");throw A.data={actual:m,expected:g},A}return g}function Og(g){var m;for(var A in g)Object.prototype.hasOwnProperty.call(g,A)&&(h(g[A])||typeof g[A].signature=="string")&&(m=Sa(m,g[A].name));return m}function Tg(g,m){var A;for(A in m)if(Object.prototype.hasOwnProperty.call(m,A)){if(A in g&&m[A]!==g[A]){var C=new Error('Signature "'+A+'" is defined twice');throw C.data={signature:A,sourceFunction:m[A],destFunction:g[A]},C}g[A]=m[A]}}var Pg=a;a=function(m){for(var A=typeof m=="string",C=A?1:0,S=A?m:"",M={},N=C;N<arguments.length;++N){var w=arguments[N],_={},L=void 0;if(typeof w=="function"?(L=w.name,typeof w.signature=="string"?_[w.signature]=w:h(w)&&(_=w.signatures)):e(w)&&(_=w,A||(L=Og(w))),Object.keys(_).length===0){var q=new TypeError("Argument to 'typed' at index "+N+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw q.data={index:N,argument:w},q}A||(S=Sa(S,L)),Tg(M,_)}return Ng(S||"",M)},a.create=Ni,a.createCount=Pg.createCount,a.onMismatch=Aa,a.throwMismatchError=Aa,a.createError=K,a.clear=l,a.clearConversions=f,a.addTypes=c,a._findType=s,a.referTo=xg,a.referToSelf=Ba,a.convert=D,a.findSignature=p,a.find=d,a.isTypedFunction=h,a.warnAgainstDeprecatedThis=!0,a.addType=function(g,m){var A="any";m!==!1&&r.has("Object")&&(A="Object"),a.addTypes([g],A)};function Ma(g){if(!g||typeof g.from!="string"||typeof g.to!="string"||typeof g.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");if(g.to===g.from)throw new SyntaxError('Illegal to define conversion from "'+g.from+'" to itself.')}return a.addConversion=function(g){Ma(g);var m=s(g.to);if(m.conversionsTo.every(function(A){return A.from!==g.from}))m.conversionsTo.push({from:g.from,convert:g.convert,index:i++});else throw new Error('There is already a conversion from "'+g.from+'" to "'+m.name+'"')},a.addConversions=function(g){g.forEach(a.addConversion)},a.removeConversion=function(g){Ma(g);var m=s(g.to),A=$g(m.conversionsTo,function(S){return S.from===g.from});if(!A)throw new Error("Attempt to remove nonexistent conversion from "+g.from+" to "+g.to);if(A.convert!==g.convert)throw new Error("Conversion to remove does not match existing conversion");var C=m.conversionsTo.indexOf(A);m.conversionsTo.splice(C,1)},a.resolve=function(g,m){if(!h(g))throw new TypeError(_i);for(var A=g._typedFunctionData.signatures,C=0;C<A.length;++C)if(A[C].test(m))return A[C];return null},a}var $i=Ni();function We(e){return typeof e=="boolean"?!0:isFinite(e)?e===Math.round(e):!1}function Xr(e,t,n){var r={2:"0b",8:"0o",16:"0x"},u=r[t],i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!We(n))throw new Error("size must be an integer");if(e>Hn(2,n-1)-1||e<-Hn(2,n-1))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!We(e))throw new Error("Value must be an integer");e<0&&(e=e+Hn(2,n)),i="i".concat(n)}var a="";return e<0&&(e=-e,a="-"),"".concat(a).concat(u).concat(e.toString(t)).concat(i)}function Zr(e,t){if(typeof t=="function")return t(e);if(e===1/0)return"Infinity";if(e===-1/0)return"-Infinity";if(isNaN(e))return"NaN";var n="auto",r,u;if(t&&(t.notation&&(n=t.notation),me(t)?r=t:me(t.precision)&&(r=t.precision),t.wordSize&&(u=t.wordSize,typeof u!="number")))throw new Error('Option "wordSize" must be a number');switch(n){case"fixed":return mE(e,r);case"exponential":return Ri(e,r);case"engineering":return gE(e,r);case"bin":return Xr(e,2,u);case"oct":return Xr(e,8,u);case"hex":return Xr(e,16,u);case"auto":return yE(e,r,t&&t).replace(/((\.\d*?)(0+))($|e)/,function(){var i=arguments[2],a=arguments[4];return i!=="."?i+a:a});default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function _n(e){var t=String(e).toLowerCase().match(/^(-?)(\d+\.?\d*)(e([+-]?\d+))?$/);if(!t)throw new SyntaxError("Invalid number "+e);var n=t[1],r=t[2],u=parseFloat(t[4]||"0"),i=r.indexOf(".");u+=i!==-1?i-1:r.length-1;var a=r.replace(".","").replace(/^0*/,function(s){return u-=s.length,""}).replace(/0*$/,"").split("").map(function(s){return parseInt(s)});return a.length===0&&(a.push(0),u++),{sign:n,coefficients:a,exponent:u}}function gE(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=_n(e),r=Nn(n,t),u=r.exponent,i=r.coefficients,a=u%3===0?u:u<0?u-3-u%3:u-u%3;if(me(t))for(;t>i.length||u-a+1>i.length;)i.push(0);else for(var s=Math.abs(u-a)-(i.length-1),c=0;c<s;c++)i.push(0);for(var l=Math.abs(u-a),f=1;l>0;)f++,l--;var o=i.slice(f).join(""),h=me(t)&&o.length||o.match(/[1-9]/)?"."+o:"",p=i.slice(0,f).join("")+h+"e"+(u>=0?"+":"")+a.toString();return r.sign+p}function mE(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=_n(e),r=typeof t=="number"?Nn(n,n.exponent+1+t):n,u=r.coefficients,i=r.exponent+1,a=i+(t||0);return u.length<a&&(u=u.concat(St(a-u.length))),i<0&&(u=St(-i+1).concat(u),i=1),i<u.length&&u.splice(i,0,i===0?"0.":"."),r.sign+u.join("")}function Ri(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=_n(e),r=t?Nn(n,t):n,u=r.coefficients,i=r.exponent;u.length<t&&(u=u.concat(St(t-u.length)));var a=u.shift();return r.sign+a+(u.length>0?"."+u.join(""):"")+"e"+(i>=0?"+":"")+i}function yE(e,t,n){if(isNaN(e)||!isFinite(e))return String(e);var r=n&&n.lowerExp!==void 0?n.lowerExp:-3,u=n&&n.upperExp!==void 0?n.upperExp:5,i=_n(e),a=t?Nn(i,t):i;if(a.exponent<r||a.exponent>=u)return Ri(e,t);var s=a.coefficients,c=a.exponent;s.length<t&&(s=s.concat(St(t-s.length))),s=s.concat(St(c-s.length+1+(s.length<t?t-s.length:0))),s=St(-c).concat(s);var l=c>0?c:0;return l<s.length-1&&s.splice(l+1,0,"."),a.sign+s.join("")}function Nn(e,t){for(var n={sign:e.sign,coefficients:e.coefficients,exponent:e.exponent},r=n.coefficients;t<=0;)r.unshift(0),n.exponent++,t++;if(r.length>t){var u=r.splice(t,r.length-t);if(u[0]>=5){var i=t-1;for(r[i]++;r[i]===10;)r.pop(),i===0&&(r.unshift(0),n.exponent++,i++),i--,r[i]++}}return n}function St(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function AE(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}var FE=Number.EPSILON||2220446049250313e-31;function CE(e,t,n){if(n==null)return e===t;if(e===t)return!0;if(isNaN(e)||isNaN(t))return!1;if(isFinite(e)&&isFinite(t)){var r=Math.abs(e-t);return r<FE?!0:r<=Math.max(Math.abs(e),Math.abs(t))*n}return!1}function Jr(e,t,n){var r=e.constructor,u=new r(2),i="";if(n){if(n<1)throw new Error("size must be in greater than 0");if(!We(n))throw new Error("size must be an integer");if(e.greaterThan(u.pow(n-1).sub(1))||e.lessThan(u.pow(n-1).mul(-1)))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!e.isInteger())throw new Error("Value must be an integer");e.lessThan(0)&&(e=e.add(u.pow(n))),i="i".concat(n)}switch(t){case 2:return"".concat(e.toBinary()).concat(i);case 8:return"".concat(e.toOctal()).concat(i);case 16:return"".concat(e.toHexadecimal()).concat(i);default:throw new Error("Base ".concat(t," not supported "))}}function BE(e,t){if(typeof t=="function")return t(e);if(!e.isFinite())return e.isNaN()?"NaN":e.gt(0)?"Infinity":"-Infinity";var n="auto",r,u;if(t!==void 0&&(t.notation&&(n=t.notation),typeof t=="number"?r=t:t.precision&&(r=t.precision),t.wordSize&&(u=t.wordSize,typeof u!="number")))throw new Error('Option "wordSize" must be a number');switch(n){case"fixed":return bE(e,r);case"exponential":return xi(e,r);case"engineering":return wE(e,r);case"bin":return Jr(e,2,u);case"oct":return Jr(e,8,u);case"hex":return Jr(e,16,u);case"auto":{var i=t&&t.lowerExp!==void 0?t.lowerExp:-3,a=t&&t.upperExp!==void 0?t.upperExp:5;if(e.isZero())return"0";var s,c=e.toSignificantDigits(r),l=c.e;return l>=i&&l<a?s=c.toFixed():s=xi(e,r),s.replace(/((\.\d*?)(0+))($|e)/,function(){var f=arguments[2],o=arguments[4];return f!=="."?f+o:o})}default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function wE(e,t){var n=e.e,r=n%3===0?n:n<0?n-3-n%3:n-n%3,u=e.mul(Math.pow(10,-r)),i=u.toPrecision(t);return i.indexOf("e")!==-1&&(i=u.toString()),i+"e"+(n>=0?"+":"")+r.toString()}function xi(e,t){return t!==void 0?e.toExponential(t-1):e.toExponential()}function bE(e,t){return e.toFixed(t)}function pt(e,t){var n=SE(e,t);return t&&typeof t=="object"&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function SE(e,t){if(typeof e=="number")return Zr(e,t);if(rt(e))return BE(e,t);if(ME(e))return!t||t.fraction!=="decimal"?e.s*e.n+"/"+e.d:e.toString();if(Array.isArray(e))return Oi(e,t);if(Mn(e))return'"'+e+'"';if(typeof e=="function")return e.syntax?String(e.syntax):"function";if(e&&typeof e=="object"){if(typeof e.format=="function")return e.format(t);if(e&&e.toString(t)!=={}.toString())return e.toString(t);var n=Object.keys(e).map(r=>'"'+r+'": '+pt(e[r],t));return"{"+n.join(", ")+"}"}return String(e)}function Oi(e,t){if(Array.isArray(e)){for(var n="[",r=e.length,u=0;u<r;u++)u!==0&&(n+=", "),n+=Oi(e[u],t);return n+="]",n}else return pt(e,t)}function ME(e){return e&&typeof e=="object"&&typeof e.s=="number"&&typeof e.n=="number"&&typeof e.d=="number"||!1}function oe(e,t,n){if(!(this instanceof oe))throw new SyntaxError("Constructor must be called with the new operator");this.actual=e,this.expected=t,this.relation=n,this.message="Dimension mismatch ("+(Array.isArray(e)?"["+e.join(", ")+"]":e)+" "+(this.relation||"!=")+" "+(Array.isArray(t)?"["+t.join(", ")+"]":t)+")",this.stack=new Error().stack}oe.prototype=new RangeError,oe.prototype.constructor=RangeError,oe.prototype.name="DimensionError",oe.prototype.isDimensionError=!0;function Mt(e,t,n){if(!(this instanceof Mt))throw new SyntaxError("Constructor must be called with the new operator");this.index=e,arguments.length<3?(this.min=0,this.max=t):(this.min=t,this.max=n),this.min!==void 0&&this.index<this.min?this.message="Index out of range ("+this.index+" < "+this.min+")":this.max!==void 0&&this.index>=this.max?this.message="Index out of range ("+this.index+" > "+(this.max-1)+")":this.message="Index out of range ("+this.index+")",this.stack=new Error().stack}Mt.prototype=new RangeError,Mt.prototype.constructor=RangeError,Mt.prototype.name="IndexError",Mt.prototype.isIndexError=!0;function Kr(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function Ti(e,t,n){var r,u=e.length;if(u!==t[n])throw new oe(u,t[n]);if(n<t.length-1){var i=n+1;for(r=0;r<u;r++){var a=e[r];if(!Array.isArray(a))throw new oe(t.length-1,t.length,"<");Ti(e[r],t,i)}}else for(r=0;r<u;r++)if(Array.isArray(e[r]))throw new oe(t.length+1,t.length,">")}function Pi(e,t){var n=t.length===0;if(n){if(Array.isArray(e))throw new oe(e.length,0)}else Ti(e,t,0)}function xe(e,t){if(!me(e)||!We(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof t=="number"&&e>=t)throw new Mt(e,t)}function Li(e,t,n){if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new Error("Resizing to scalar is not supported");t.forEach(function(u){if(!me(u)||!We(u)||u<0)throw new TypeError("Invalid size, must contain positive integers (size: "+pt(t)+")")});var r=n!==void 0?n:0;return Qr(e,t,0,r),e}function Qr(e,t,n,r){var u,i,a=e.length,s=t[n],c=Math.min(a,s);if(e.length=s,n<t.length-1){var l=n+1;for(u=0;u<c;u++)i=e[u],Array.isArray(i)||(i=[i],e[u]=i),Qr(i,t,l,r);for(u=c;u<s;u++)i=[],e[u]=i,Qr(i,t,l,r)}else{for(u=0;u<c;u++)for(;Array.isArray(e[u]);)e[u]=e[u][0];for(u=c;u<s;u++)e[u]=r}}function IE(e,t){var n=$E(e),r=n.length;if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new oe(0,r,"!=");t=ji(t,r);var u=Vi(t);if(r!==u)throw new oe(u,r,"!=");try{return _E(n,t)}catch(i){throw i instanceof oe?new oe(u,r,"!="):i}}function ji(e,t){var n=Vi(e),r=e.slice(),u=-1,i=e.indexOf(u),a=e.indexOf(u,i+1)>=0;if(a)throw new Error("More than one wildcard in sizes");var s=i>=0,c=t%n===0;if(s)if(c)r[i]=-t/n;else throw new Error("Could not replace wildcard, since "+t+" is no multiple of "+-n);return r}function Vi(e){return e.reduce((t,n)=>t*n,1)}function _E(e,t){for(var n=e,r,u=t.length-1;u>0;u--){var i=t[u];r=[];for(var a=n.length/i,s=0;s<a;s++)r.push(n.slice(s*i,(s+1)*i));n=r}return n}function NE(e,t,n,r){var u=r||Kr(e);if(n)for(var i=0;i<n;i++)e=[e],u.unshift(1);for(e=Ui(e,t,0);u.length<t;)u.push(1);return e}function Ui(e,t,n){var r,u;if(Array.isArray(e)){var i=n+1;for(r=0,u=e.length;r<u;r++)e[r]=Ui(e[r],t,i)}else for(var a=n;a<t;a++)e=[e];return e}function $E(e){if(!Array.isArray(e))return e;var t=[];return e.forEach(function n(r){Array.isArray(r)?r.forEach(n):t.push(r)}),t}function Yr(e,t){for(var n,r=0,u=0;u<e.length;u++){var i=e[u],a=Array.isArray(i);if(u===0&&a&&(r=i.length),a&&i.length!==r)return;var s=a?Yr(i,t):t(i);if(n===void 0)n=s;else if(n!==s)return"mixed"}return n}function Ce(e,t,n,r){function u(i){var a=dE(i,t.map(OE));return RE(e,t,i),n(a)}return u.isFactory=!0,u.fn=e,u.dependencies=t.slice().sort(),r&&(u.meta=r),u}function RE(e,t,n){var r=t.filter(i=>!xE(i)).every(i=>n[i]!==void 0);if(!r){var u=t.filter(i=>n[i]===void 0);throw new Error('Cannot create function "'.concat(e,'", ')+"some dependencies are missing: ".concat(u.map(i=>'"'.concat(i,'"')).join(", "),"."))}}function xE(e){return e&&e[0]==="?"}function OE(e){return e&&e[0]==="?"?e.slice(1):e}function TE(e,t){if(ki(e)&&qi(e,t))return e[t];throw typeof e[t]=="function"&&jE(e,t)?new Error('Cannot access method "'+t+'" as a property'):new Error('No access to property "'+t+'"')}function PE(e,t,n){if(ki(e)&&qi(e,t))return e[t]=n,n;throw new Error('No access to property "'+t+'"')}function LE(e,t){return t in e}function qi(e,t){return!e||typeof e!="object"?!1:In(VE,t)?!0:!(t in Object.prototype||t in Function.prototype)}function jE(e,t){return e==null||typeof e[t]!="function"||In(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e)?!1:In(UE,t)?!0:!(t in Object.prototype||t in Function.prototype)}function ki(e){return typeof e=="object"&&e&&e.constructor===Object}var VE={length:!0,name:!0},UE={toString:!0,valueOf:!0,toLocaleString:!0};class qE{constructor(t){this.wrappedObject=t}keys(){return Object.keys(this.wrappedObject)}get(t){return TE(this.wrappedObject,t)}set(t,n){return PE(this.wrappedObject,t,n),this}has(t){return LE(this.wrappedObject,t)}}function kE(e){return e?e instanceof Map||e instanceof qE||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}var Hi=function(){return Hi=$i.create,$i},HE=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],zE=Ce("typed",HE,function(t){var{BigNumber:n,Complex:r,DenseMatrix:u,Fraction:i}=t,a=Hi();return a.clear(),a.addTypes([{name:"number",test:me},{name:"Complex",test:Ci},{name:"BigNumber",test:rt},{name:"Fraction",test:Bi},{name:"Unit",test:wi},{name:"identifier",test:s=>Mn&&/^(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])(?:[0-9A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])*$/.test(s)},{name:"string",test:Mn},{name:"Chain",test:hE},{name:"Array",test:Ne},{name:"Matrix",test:Kt},{name:"DenseMatrix",test:LD},{name:"SparseMatrix",test:jD},{name:"Range",test:VD},{name:"Index",test:bi},{name:"boolean",test:UD},{name:"ResultSet",test:qD},{name:"Help",test:kD},{name:"function",test:HD},{name:"Date",test:zD},{name:"RegExp",test:WD},{name:"null",test:XD},{name:"undefined",test:ZD},{name:"AccessorNode",test:JD},{name:"ArrayNode",test:KD},{name:"AssignmentNode",test:QD},{name:"BlockNode",test:YD},{name:"ConditionalNode",test:eE},{name:"ConstantNode",test:tE},{name:"FunctionNode",test:rE},{name:"FunctionAssignmentNode",test:nE},{name:"IndexNode",test:uE},{name:"Node",test:iE},{name:"ObjectNode",test:aE},{name:"OperatorNode",test:oE},{name:"ParenthesisNode",test:sE},{name:"RangeNode",test:cE},{name:"RelationalNode",test:lE},{name:"SymbolNode",test:fE},{name:"Map",test:kE},{name:"Object",test:GD}]),a.addConversions([{from:"number",to:"BigNumber",convert:function(c){if(n||eu(c),AE(c)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+c+"). Use function bignumber(x) to convert to BigNumber.");return new n(c)}},{from:"number",to:"Complex",convert:function(c){return r||$n(c),new r(c,0)}},{from:"BigNumber",to:"Complex",convert:function(c){return r||$n(c),new r(c.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(c){throw new TypeError("Cannot implicitly convert a Fraction to BigNumber or vice versa. Use function bignumber(x) to convert to BigNumber or fraction(x) to convert to Fraction.")}},{from:"Fraction",to:"Complex",convert:function(c){return r||$n(c),new r(c.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(c){i||tu(c);var l=new i(c);if(l.valueOf()!==c)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+c+"). Use function fraction(x) to convert to Fraction.");return l}},{from:"string",to:"number",convert:function(c){var l=Number(c);if(isNaN(l))throw new Error('Cannot convert "'+c+'" to a number');return l}},{from:"string",to:"BigNumber",convert:function(c){n||eu(c);try{return new n(c)}catch(l){throw new Error('Cannot convert "'+c+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(c){i||tu(c);try{return new i(c)}catch(l){throw new Error('Cannot convert "'+c+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(c){r||$n(c);try{return new r(c)}catch(l){throw new Error('Cannot convert "'+c+'" to Complex')}}},{from:"boolean",to:"number",convert:function(c){return+c}},{from:"boolean",to:"BigNumber",convert:function(c){return n||eu(c),new n(+c)}},{from:"boolean",to:"Fraction",convert:function(c){return i||tu(c),new i(+c)}},{from:"boolean",to:"string",convert:function(c){return String(c)}},{from:"Array",to:"Matrix",convert:function(c){return u||WE(),new u(c)}},{from:"Matrix",to:"Array",convert:function(c){return c.valueOf()}}]),a.onMismatch=(s,c,l)=>{var f=a.createError(s,c,l);if(["wrongType","mismatch"].includes(f.data.category)&&c.length===1&&zr(c[0])&&l.some(h=>!h.params.includes(","))){var o=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw o.data=f.data,o}throw f},a.onMismatch=(s,c,l)=>{var f=a.createError(s,c,l);if(["wrongType","mismatch"].includes(f.data.category)&&c.length===1&&zr(c[0])&&l.some(h=>!h.params.includes(","))){var o=new TypeError("Function '".concat(s,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(s,")'."));throw o.data=f.data,o}throw f},a});function eu(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function $n(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function WE(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function tu(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}/*!
|
|
11
11
|
* decimal.js v10.4.2
|
|
12
12
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
13
13
|
* https://github.com/MikeMcl/decimal.js
|
|
14
14
|
* Copyright (c) 2022 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
15
15
|
* MIT Licence
|
|
16
|
-
*/var bt=9e15,it=1e9,kr="0123456789abcdef",bn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Sn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Vr={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-bt,maxE:bt,crypto:!1},Ai,Ke,k=!0,Mn="[DecimalError] ",ot=Mn+"Invalid argument: ",Ci=Mn+"Precision limit exceeded",Fi=Mn+"crypto unavailable",wi="[object Decimal]",pe=Math.floor,ie=Math.pow,hd=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,dd=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,pd=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Bi=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Le=1e7,q=7,Dd=9007199254740991,gd=bn.length-1,Ur=Sn.length-1,B={toStringTag:wi};B.absoluteValue=B.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),L(e)},B.ceil=function(){return L(new this.constructor(this),this.e+1,2)},B.clampedTo=B.clamp=function(e,t){var n,r=this,u=r.constructor;if(e=new u(e),t=new u(t),!e.s||!t.s)return new u(NaN);if(e.gt(t))throw Error(ot+t);return n=r.cmp(e),n<0?e:r.cmp(t)>0?t:new u(r)},B.comparedTo=B.cmp=function(e){var t,n,r,u,o=this,a=o.d,l=(e=new o.constructor(e)).d,c=o.s,d=e.s;if(!a||!l)return!c||!d?NaN:c!==d?c:a===l?0:!a^c<0?1:-1;if(!a[0]||!l[0])return a[0]?c:l[0]?-d:0;if(c!==d)return c;if(o.e!==e.e)return o.e>e.e^c<0?1:-1;for(r=a.length,u=l.length,t=0,n=r<u?r:u;t<n;++t)if(a[t]!==l[t])return a[t]>l[t]^c<0?1:-1;return r===u?0:r>u^c<0?1:-1},B.cosine=B.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+q,r.rounding=1,n=vd(r,Ii(r,n)),r.precision=e,r.rounding=t,L(Ke==2||Ke==3?n.neg():n,e,t,!0)):new r(1):new r(NaN)},B.cubeRoot=B.cbrt=function(){var e,t,n,r,u,o,a,l,c,d,f=this,s=f.constructor;if(!f.isFinite()||f.isZero())return new s(f);for(k=!1,o=f.s*ie(f.s*f,1/3),!o||Math.abs(o)==1/0?(n=fe(f.d),e=f.e,(o=(e-n.length+1)%3)&&(n+=o==1||o==-2?"0":"00"),o=ie(n,1/3),e=pe((e+1)/3)-(e%3==(e<0?-1:2)),o==1/0?n="5e"+e:(n=o.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),r=new s(n),r.s=f.s):r=new s(o.toString()),a=(e=s.precision)+3;;)if(l=r,c=l.times(l).times(l),d=c.plus(f),r=K(d.plus(f).times(l),d.plus(c),a+2,1),fe(l.d).slice(0,a)===(n=fe(r.d)).slice(0,a))if(n=n.slice(a-3,a+1),n=="9999"||!u&&n=="4999"){if(!u&&(L(l,e+1,0),l.times(l).times(l).eq(f))){r=l;break}a+=4,u=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(L(r,e+1,1),t=!r.times(r).times(r).eq(f));break}return k=!0,L(r,e,s.rounding,t)},B.decimalPlaces=B.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-pe(this.e/q))*q,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},B.dividedBy=B.div=function(e){return K(this,new this.constructor(e))},B.dividedToIntegerBy=B.divToInt=function(e){var t=this,n=t.constructor;return L(K(t,new n(e),0,1,1),n.precision,n.rounding)},B.equals=B.eq=function(e){return this.cmp(e)===0},B.floor=function(){return L(new this.constructor(this),this.e+1,3)},B.greaterThan=B.gt=function(e){return this.cmp(e)>0},B.greaterThanOrEqualTo=B.gte=function(e){var t=this.cmp(e);return t==1||t===0},B.hyperbolicCosine=B.cosh=function(){var e,t,n,r,u,o=this,a=o.constructor,l=new a(1);if(!o.isFinite())return new a(o.s?1/0:NaN);if(o.isZero())return l;n=a.precision,r=a.rounding,a.precision=n+Math.max(o.e,o.sd())+4,a.rounding=1,u=o.d.length,u<32?(e=Math.ceil(u/3),t=(1/On(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),o=St(a,1,o.times(t),new a(1),!0);for(var c,d=e,f=new a(8);d--;)c=o.times(o),o=l.minus(c.times(f.minus(c.times(f))));return L(o,a.precision=n,a.rounding=r,!0)},B.hyperbolicSine=B.sinh=function(){var e,t,n,r,u=this,o=u.constructor;if(!u.isFinite()||u.isZero())return new o(u);if(t=o.precision,n=o.rounding,o.precision=t+Math.max(u.e,u.sd())+4,o.rounding=1,r=u.d.length,r<3)u=St(o,2,u,u,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,u=u.times(1/On(5,e)),u=St(o,2,u,u,!0);for(var a,l=new o(5),c=new o(16),d=new o(20);e--;)a=u.times(u),u=u.times(l.plus(a.times(c.times(a).plus(d))))}return o.precision=t,o.rounding=n,L(u,t,n,!0)},B.hyperbolicTangent=B.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,K(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},B.inverseCosine=B.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),u=n.precision,o=n.rounding;return r!==-1?r===0?t.isNeg()?je(n,u,o):new n(0):new n(NaN):t.isZero()?je(n,u+4,o).times(.5):(n.precision=u+6,n.rounding=1,t=t.asin(),e=je(n,u+4,o).times(.5),n.precision=u,n.rounding=o,e.minus(t))},B.inverseHyperbolicCosine=B.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,k=!1,n=n.times(n).minus(1).sqrt().plus(n),k=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},B.inverseHyperbolicSine=B.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,k=!1,n=n.times(n).plus(1).sqrt().plus(n),k=!0,r.precision=e,r.rounding=t,n.ln())},B.inverseHyperbolicTangent=B.atanh=function(){var e,t,n,r,u=this,o=u.constructor;return u.isFinite()?u.e>=0?new o(u.abs().eq(1)?u.s/0:u.isZero()?u:NaN):(e=o.precision,t=o.rounding,r=u.sd(),Math.max(r,e)<2*-u.e-1?L(new o(u),e,t,!0):(o.precision=n=r-u.e,u=K(u.plus(1),new o(1).minus(u),n+e,1),o.precision=e+4,o.rounding=1,u=u.ln(),o.precision=e,o.rounding=t,u.times(.5))):new o(NaN)},B.inverseSine=B.asin=function(){var e,t,n,r,u=this,o=u.constructor;return u.isZero()?new o(u):(t=u.abs().cmp(1),n=o.precision,r=o.rounding,t!==-1?t===0?(e=je(o,n+4,r).times(.5),e.s=u.s,e):new o(NaN):(o.precision=n+6,o.rounding=1,u=u.div(new o(1).minus(u.times(u)).sqrt().plus(1)).atan(),o.precision=n,o.rounding=r,u.times(2)))},B.inverseTangent=B.atan=function(){var e,t,n,r,u,o,a,l,c,d=this,f=d.constructor,s=f.precision,h=f.rounding;if(d.isFinite()){if(d.isZero())return new f(d);if(d.abs().eq(1)&&s+4<=Ur)return a=je(f,s+4,h).times(.25),a.s=d.s,a}else{if(!d.s)return new f(NaN);if(s+4<=Ur)return a=je(f,s+4,h).times(.5),a.s=d.s,a}for(f.precision=l=s+10,f.rounding=1,n=Math.min(28,l/q+2|0),e=n;e;--e)d=d.div(d.times(d).plus(1).sqrt().plus(1));for(k=!1,t=Math.ceil(l/q),r=1,c=d.times(d),a=new f(d),u=d;e!==-1;)if(u=u.times(c),o=a.minus(u.div(r+=2)),u=u.times(c),a=o.plus(u.div(r+=2)),a.d[t]!==void 0)for(e=t;a.d[e]===o.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),k=!0,L(a,f.precision=s,f.rounding=h,!0)},B.isFinite=function(){return!!this.d},B.isInteger=B.isInt=function(){return!!this.d&&pe(this.e/q)>this.d.length-2},B.isNaN=function(){return!this.s},B.isNegative=B.isNeg=function(){return this.s<0},B.isPositive=B.isPos=function(){return this.s>0},B.isZero=function(){return!!this.d&&this.d[0]===0},B.lessThan=B.lt=function(e){return this.cmp(e)<0},B.lessThanOrEqualTo=B.lte=function(e){return this.cmp(e)<1},B.logarithm=B.log=function(e){var t,n,r,u,o,a,l,c,d=this,f=d.constructor,s=f.precision,h=f.rounding,p=5;if(e==null)e=new f(10),t=!0;else{if(e=new f(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new f(NaN);t=e.eq(10)}if(n=d.d,d.s<0||!n||!n[0]||d.eq(1))return new f(n&&!n[0]?-1/0:d.s!=1?NaN:n?0:1/0);if(t)if(n.length>1)o=!0;else{for(u=n[0];u%10===0;)u/=10;o=u!==1}if(k=!1,l=s+p,a=st(d,l),r=t?In(f,l+10):st(e,l),c=K(a,r,l,1),Wt(c.d,u=s,h))do if(l+=10,a=st(d,l),r=t?In(f,l+10):st(e,l),c=K(a,r,l,1),!o){+fe(c.d).slice(u+1,u+15)+1==1e14&&(c=L(c,s+1,0));break}while(Wt(c.d,u+=10,h));return k=!0,L(c,s,h)},B.minus=B.sub=function(e){var t,n,r,u,o,a,l,c,d,f,s,h,p=this,D=p.constructor;if(e=new D(e),!p.d||!e.d)return!p.s||!e.s?e=new D(NaN):p.d?e.s=-e.s:e=new D(e.d||p.s!==e.s?p:NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(d=p.d,h=e.d,l=D.precision,c=D.rounding,!d[0]||!h[0]){if(h[0])e.s=-e.s;else if(d[0])e=new D(p);else return new D(c===3?-0:0);return k?L(e,l,c):e}if(n=pe(e.e/q),f=pe(p.e/q),d=d.slice(),o=f-n,o){for(s=o<0,s?(t=d,o=-o,a=h.length):(t=h,n=f,a=d.length),r=Math.max(Math.ceil(l/q),a)+2,o>r&&(o=r,t.length=1),t.reverse(),r=o;r--;)t.push(0);t.reverse()}else{for(r=d.length,a=h.length,s=r<a,s&&(a=r),r=0;r<a;r++)if(d[r]!=h[r]){s=d[r]<h[r];break}o=0}for(s&&(t=d,d=h,h=t,e.s=-e.s),a=d.length,r=h.length-a;r>0;--r)d[a++]=0;for(r=h.length;r>o;){if(d[--r]<h[r]){for(u=r;u&&d[--u]===0;)d[u]=Le-1;--d[u],d[r]+=Le}d[r]-=h[r]}for(;d[--a]===0;)d.pop();for(;d[0]===0;d.shift())--n;return d[0]?(e.d=d,e.e=_n(d,n),k?L(e,l,c):e):new D(c===3?-0:0)},B.modulo=B.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?L(new r(n),r.precision,r.rounding):(k=!1,r.modulo==9?(t=K(n,e.abs(),0,3,1),t.s*=e.s):t=K(n,e,0,r.modulo,1),t=t.times(e),k=!0,n.minus(t))},B.naturalExponential=B.exp=function(){return Hr(this)},B.naturalLogarithm=B.ln=function(){return st(this)},B.negated=B.neg=function(){var e=new this.constructor(this);return e.s=-e.s,L(e)},B.plus=B.add=function(e){var t,n,r,u,o,a,l,c,d,f,s=this,h=s.constructor;if(e=new h(e),!s.d||!e.d)return!s.s||!e.s?e=new h(NaN):s.d||(e=new h(e.d||s.s===e.s?s:NaN)),e;if(s.s!=e.s)return e.s=-e.s,s.minus(e);if(d=s.d,f=e.d,l=h.precision,c=h.rounding,!d[0]||!f[0])return f[0]||(e=new h(s)),k?L(e,l,c):e;if(o=pe(s.e/q),r=pe(e.e/q),d=d.slice(),u=o-r,u){for(u<0?(n=d,u=-u,a=f.length):(n=f,r=o,a=d.length),o=Math.ceil(l/q),a=o>a?o+1:a+1,u>a&&(u=a,n.length=1),n.reverse();u--;)n.push(0);n.reverse()}for(a=d.length,u=f.length,a-u<0&&(u=a,n=f,f=d,d=n),t=0;u;)t=(d[--u]=d[u]+f[u]+t)/Le|0,d[u]%=Le;for(t&&(d.unshift(t),++r),a=d.length;d[--a]==0;)d.pop();return e.d=d,e.e=_n(d,r),k?L(e,l,c):e},B.precision=B.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(ot+e);return n.d?(t=bi(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},B.round=function(){var e=this,t=e.constructor;return L(new t(e),e.e+1,t.rounding)},B.sine=B.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+q,r.rounding=1,n=yd(r,Ii(r,n)),r.precision=e,r.rounding=t,L(Ke>2?n.neg():n,e,t,!0)):new r(NaN)},B.squareRoot=B.sqrt=function(){var e,t,n,r,u,o,a=this,l=a.d,c=a.e,d=a.s,f=a.constructor;if(d!==1||!l||!l[0])return new f(!d||d<0&&(!l||l[0])?NaN:l?a:1/0);for(k=!1,d=Math.sqrt(+a),d==0||d==1/0?(t=fe(l),(t.length+c)%2==0&&(t+="0"),d=Math.sqrt(t),c=pe((c+1)/2)-(c<0||c%2),d==1/0?t="5e"+c:(t=d.toExponential(),t=t.slice(0,t.indexOf("e")+1)+c),r=new f(t)):r=new f(d.toString()),n=(c=f.precision)+3;;)if(o=r,r=o.plus(K(a,o,n+2,1)).times(.5),fe(o.d).slice(0,n)===(t=fe(r.d)).slice(0,n))if(t=t.slice(n-3,n+1),t=="9999"||!u&&t=="4999"){if(!u&&(L(o,c+1,0),o.times(o).eq(a))){r=o;break}n+=4,u=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(L(r,c+1,1),e=!r.times(r).eq(a));break}return k=!0,L(r,c,f.rounding,e)},B.tangent=B.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,n=n.sin(),n.s=1,n=K(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,L(Ke==2||Ke==4?n.neg():n,e,t,!0)):new r(NaN)},B.times=B.mul=function(e){var t,n,r,u,o,a,l,c,d,f=this,s=f.constructor,h=f.d,p=(e=new s(e)).d;if(e.s*=f.s,!h||!h[0]||!p||!p[0])return new s(!e.s||h&&!h[0]&&!p||p&&!p[0]&&!h?NaN:!h||!p?e.s/0:e.s*0);for(n=pe(f.e/q)+pe(e.e/q),c=h.length,d=p.length,c<d&&(o=h,h=p,p=o,a=c,c=d,d=a),o=[],a=c+d,r=a;r--;)o.push(0);for(r=d;--r>=0;){for(t=0,u=c+r;u>r;)l=o[u]+p[r]*h[u-r-1]+t,o[u--]=l%Le|0,t=l/Le|0;o[u]=(o[u]+t)%Le|0}for(;!o[--a];)o.pop();return t?++n:o.shift(),e.d=o,e.e=_n(o,n),k?L(e,s.precision,s.rounding):e},B.toBinary=function(e,t){return Wr(this,2,e,t)},B.toDecimalPlaces=B.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Ce(e,0,it),t===void 0?t=r.rounding:Ce(t,0,8),L(n,e+n.e+1,t))},B.toExponential=function(e,t){var n,r=this,u=r.constructor;return e===void 0?n=Ze(r,!0):(Ce(e,0,it),t===void 0?t=u.rounding:Ce(t,0,8),r=L(new u(r),e+1,t),n=Ze(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},B.toFixed=function(e,t){var n,r,u=this,o=u.constructor;return e===void 0?n=Ze(u):(Ce(e,0,it),t===void 0?t=o.rounding:Ce(t,0,8),r=L(new o(u),e+u.e+1,t),n=Ze(r,!1,e+r.e+1)),u.isNeg()&&!u.isZero()?"-"+n:n},B.toFraction=function(e){var t,n,r,u,o,a,l,c,d,f,s,h,p=this,D=p.d,g=p.constructor;if(!D)return new g(p);if(d=n=new g(1),r=c=new g(0),t=new g(r),o=t.e=bi(D)-p.e-1,a=o%q,t.d[0]=ie(10,a<0?q+a:a),e==null)e=o>0?t:d;else{if(l=new g(e),!l.isInt()||l.lt(d))throw Error(ot+l);e=l.gt(t)?o>0?t:d:l}for(k=!1,l=new g(fe(D)),f=g.precision,g.precision=o=D.length*q*2;s=K(l,t,0,1,1),u=n.plus(s.times(r)),u.cmp(e)!=1;)n=r,r=u,u=d,d=c.plus(s.times(u)),c=u,u=t,t=l.minus(s.times(u)),l=u;return u=K(e.minus(n),r,0,1,1),c=c.plus(u.times(d)),n=n.plus(u.times(r)),c.s=d.s=p.s,h=K(d,r,o,1).minus(p).abs().cmp(K(c,n,o,1).minus(p).abs())<1?[d,r]:[c,n],g.precision=f,k=!0,h},B.toHexadecimal=B.toHex=function(e,t){return Wr(this,16,e,t)},B.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),e==null){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),t===void 0?t=r.rounding:Ce(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(k=!1,n=K(n,e,0,t,1).times(e),k=!0,L(n)):(e.s=n.s,n=e),n},B.toNumber=function(){return+this},B.toOctal=function(e,t){return Wr(this,8,e,t)},B.toPower=B.pow=function(e){var t,n,r,u,o,a,l=this,c=l.constructor,d=+(e=new c(e));if(!l.d||!e.d||!l.d[0]||!e.d[0])return new c(ie(+l,d));if(l=new c(l),l.eq(1))return l;if(r=c.precision,o=c.rounding,e.eq(1))return L(l,r,o);if(t=pe(e.e/q),t>=e.d.length-1&&(n=d<0?-d:d)<=Dd)return u=Si(c,l,n,r),e.s<0?new c(1).div(u):L(u,r,o);if(a=l.s,a<0){if(t<e.d.length-1)return new c(NaN);if((e.d[t]&1)==0&&(a=1),l.e==0&&l.d[0]==1&&l.d.length==1)return l.s=a,l}return n=ie(+l,d),t=n==0||!isFinite(n)?pe(d*(Math.log("0."+fe(l.d))/Math.LN10+l.e+1)):new c(n+"").e,t>c.maxE+1||t<c.minE-1?new c(t>0?a/0:0):(k=!1,c.rounding=l.s=1,n=Math.min(12,(t+"").length),u=Hr(e.times(st(l,r+n)),r),u.d&&(u=L(u,r+5,1),Wt(u.d,r,o)&&(t=r+10,u=L(Hr(e.times(st(l,t+n)),t),t+5,1),+fe(u.d).slice(r+1,r+15)+1==1e14&&(u=L(u,r+1,0)))),u.s=a,k=!0,c.rounding=o,L(u,r,o))},B.toPrecision=function(e,t){var n,r=this,u=r.constructor;return e===void 0?n=Ze(r,r.e<=u.toExpNeg||r.e>=u.toExpPos):(Ce(e,1,it),t===void 0?t=u.rounding:Ce(t,0,8),r=L(new u(r),e,t),n=Ze(r,e<=r.e||r.e<=u.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},B.toSignificantDigits=B.toSD=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Ce(e,1,it),t===void 0?t=r.rounding:Ce(t,0,8)),L(new r(n),e,t)},B.toString=function(){var e=this,t=e.constructor,n=Ze(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},B.truncated=B.trunc=function(){return L(new this.constructor(this),this.e+1,1)},B.valueOf=B.toJSON=function(){var e=this,t=e.constructor,n=Ze(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};function fe(e){var t,n,r,u=e.length-1,o="",a=e[0];if(u>0){for(o+=a,t=1;t<u;t++)r=e[t]+"",n=q-r.length,n&&(o+=at(n)),o+=r;a=e[t],r=a+"",n=q-r.length,n&&(o+=at(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return o+a}function Ce(e,t,n){if(e!==~~e||e<t||e>n)throw Error(ot+e)}function Wt(e,t,n,r){var u,o,a,l;for(o=e[0];o>=10;o/=10)--t;return--t<0?(t+=q,u=0):(u=Math.ceil((t+1)/q),t%=q),o=ie(10,q-t),l=e[u]%o|0,r==null?t<3?(t==0?l=l/100|0:t==1&&(l=l/10|0),a=n<4&&l==99999||n>3&&l==49999||l==5e4||l==0):a=(n<4&&l+1==o||n>3&&l+1==o/2)&&(e[u+1]/o/100|0)==ie(10,t-2)-1||(l==o/2||l==0)&&(e[u+1]/o/100|0)==0:t<4?(t==0?l=l/1e3|0:t==1?l=l/100|0:t==2&&(l=l/10|0),a=(r||n<4)&&l==9999||!r&&n>3&&l==4999):a=((r||n<4)&&l+1==o||!r&&n>3&&l+1==o/2)&&(e[u+1]/o/1e3|0)==ie(10,t-3)-1,a}function Nn(e,t,n){for(var r,u=[0],o,a=0,l=e.length;a<l;){for(o=u.length;o--;)u[o]*=t;for(u[0]+=kr.indexOf(e.charAt(a++)),r=0;r<u.length;r++)u[r]>n-1&&(u[r+1]===void 0&&(u[r+1]=0),u[r+1]+=u[r]/n|0,u[r]%=n)}return u.reverse()}function vd(e,t){var n,r,u;if(t.isZero())return t;r=t.d.length,r<32?(n=Math.ceil(r/3),u=(1/On(4,n)).toString()):(n=16,u="2.3283064365386962890625e-10"),e.precision+=n,t=St(e,1,t.times(u),new e(1));for(var o=n;o--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}var K=function(){function e(r,u,o){var a,l=0,c=r.length;for(r=r.slice();c--;)a=r[c]*u+l,r[c]=a%o|0,l=a/o|0;return l&&r.unshift(l),r}function t(r,u,o,a){var l,c;if(o!=a)c=o>a?1:-1;else for(l=c=0;l<o;l++)if(r[l]!=u[l]){c=r[l]>u[l]?1:-1;break}return c}function n(r,u,o,a){for(var l=0;o--;)r[o]-=l,l=r[o]<u[o]?1:0,r[o]=l*a+r[o]-u[o];for(;!r[0]&&r.length>1;)r.shift()}return function(r,u,o,a,l,c){var d,f,s,h,p,D,g,y,v,A,S,F,R,P,T,_,$,Z,V,Y,Q=r.constructor,ne=r.s==u.s?1:-1,ee=r.d,W=u.d;if(!ee||!ee[0]||!W||!W[0])return new Q(!r.s||!u.s||(ee?W&&ee[0]==W[0]:!W)?NaN:ee&&ee[0]==0||!W?ne*0:ne/0);for(c?(p=1,f=r.e-u.e):(c=Le,p=q,f=pe(r.e/p)-pe(u.e/p)),V=W.length,$=ee.length,v=new Q(ne),A=v.d=[],s=0;W[s]==(ee[s]||0);s++);if(W[s]>(ee[s]||0)&&f--,o==null?(P=o=Q.precision,a=Q.rounding):l?P=o+(r.e-u.e)+1:P=o,P<0)A.push(1),D=!0;else{if(P=P/p+2|0,s=0,V==1){for(h=0,W=W[0],P++;(s<$||h)&&P--;s++)T=h*c+(ee[s]||0),A[s]=T/W|0,h=T%W|0;D=h||s<$}else{for(h=c/(W[0]+1)|0,h>1&&(W=e(W,h,c),ee=e(ee,h,c),V=W.length,$=ee.length),_=V,S=ee.slice(0,V),F=S.length;F<V;)S[F++]=0;Y=W.slice(),Y.unshift(0),Z=W[0],W[1]>=c/2&&++Z;do h=0,d=t(W,S,V,F),d<0?(R=S[0],V!=F&&(R=R*c+(S[1]||0)),h=R/Z|0,h>1?(h>=c&&(h=c-1),g=e(W,h,c),y=g.length,F=S.length,d=t(g,S,y,F),d==1&&(h--,n(g,V<y?Y:W,y,c))):(h==0&&(d=h=1),g=W.slice()),y=g.length,y<F&&g.unshift(0),n(S,g,F,c),d==-1&&(F=S.length,d=t(W,S,V,F),d<1&&(h++,n(S,V<F?Y:W,F,c))),F=S.length):d===0&&(h++,S=[0]),A[s++]=h,d&&S[0]?S[F++]=ee[_]||0:(S=[ee[_]],F=1);while((_++<$||S[0]!==void 0)&&P--);D=S[0]!==void 0}A[0]||A.shift()}if(p==1)v.e=f,Ai=D;else{for(s=1,h=A[0];h>=10;h/=10)s++;v.e=s+f*p-1,L(v,l?o+v.e+1:o,a,D)}return v}}();function L(e,t,n,r){var u,o,a,l,c,d,f,s,h,p=e.constructor;e:if(t!=null){if(s=e.d,!s)return e;for(u=1,l=s[0];l>=10;l/=10)u++;if(o=t-u,o<0)o+=q,a=t,f=s[h=0],c=f/ie(10,u-a-1)%10|0;else if(h=Math.ceil((o+1)/q),l=s.length,h>=l)if(r){for(;l++<=h;)s.push(0);f=c=0,u=1,o%=q,a=o-q+1}else break e;else{for(f=l=s[h],u=1;l>=10;l/=10)u++;o%=q,a=o-q+u,c=a<0?0:f/ie(10,u-a-1)%10|0}if(r=r||t<0||s[h+1]!==void 0||(a<0?f:f%ie(10,u-a-1)),d=n<4?(c||r)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||r||n==6&&(o>0?a>0?f/ie(10,u-a):0:s[h-1])%10&1||n==(e.s<0?8:7)),t<1||!s[0])return s.length=0,d?(t-=e.e+1,s[0]=ie(10,(q-t%q)%q),e.e=-t||0):s[0]=e.e=0,e;if(o==0?(s.length=h,l=1,h--):(s.length=h+1,l=ie(10,q-o),s[h]=a>0?(f/ie(10,u-a)%ie(10,a)|0)*l:0),d)for(;;)if(h==0){for(o=1,a=s[0];a>=10;a/=10)o++;for(a=s[0]+=l,l=1;a>=10;a/=10)l++;o!=l&&(e.e++,s[0]==Le&&(s[0]=1));break}else{if(s[h]+=l,s[h]!=Le)break;s[h--]=0,l=1}for(o=s.length;s[--o]===0;)s.pop()}return k&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function Ze(e,t,n){if(!e.isFinite())return _i(e);var r,u=e.e,o=fe(e.d),a=o.length;return t?(n&&(r=n-a)>0?o=o.charAt(0)+"."+o.slice(1)+at(r):a>1&&(o=o.charAt(0)+"."+o.slice(1)),o=o+(e.e<0?"e":"e+")+e.e):u<0?(o="0."+at(-u-1)+o,n&&(r=n-a)>0&&(o+=at(r))):u>=a?(o+=at(u+1-a),n&&(r=n-u-1)>0&&(o=o+"."+at(r))):((r=u+1)<a&&(o=o.slice(0,r)+"."+o.slice(r)),n&&(r=n-a)>0&&(u+1===a&&(o+="."),o+=at(r))),o}function _n(e,t){var n=e[0];for(t*=q;n>=10;n/=10)t++;return t}function In(e,t,n){if(t>gd)throw k=!0,n&&(e.precision=n),Error(Ci);return L(new e(bn),t,1,!0)}function je(e,t,n){if(t>Ur)throw Error(Ci);return L(new e(Sn),t,n,!0)}function bi(e){var t=e.length-1,n=t*q+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function at(e){for(var t="";e--;)t+="0";return t}function Si(e,t,n,r){var u,o=new e(1),a=Math.ceil(r/q+4);for(k=!1;;){if(n%2&&(o=o.times(t),Oi(o.d,a)&&(u=!0)),n=pe(n/2),n===0){n=o.d.length-1,u&&o.d[n]===0&&++o.d[n];break}t=t.times(t),Oi(t.d,a)}return k=!0,o}function Mi(e){return e.d[e.d.length-1]&1}function Ni(e,t,n){for(var r,u=new e(t[0]),o=0;++o<t.length;)if(r=new e(t[o]),r.s)u[n](r)&&(u=r);else{u=r;break}return u}function Hr(e,t){var n,r,u,o,a,l,c,d=0,f=0,s=0,h=e.constructor,p=h.rounding,D=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(t==null?(k=!1,c=D):c=t,l=new h(.03125);e.e>-2;)e=e.times(l),s+=5;for(r=Math.log(ie(2,s))/Math.LN10*2+5|0,c+=r,n=o=a=new h(1),h.precision=c;;){if(o=L(o.times(e),c,1),n=n.times(++f),l=a.plus(K(o,n,c,1)),fe(l.d).slice(0,c)===fe(a.d).slice(0,c)){for(u=s;u--;)a=L(a.times(a),c,1);if(t==null)if(d<3&&Wt(a.d,c-r,p,d))h.precision=c+=10,n=o=l=new h(1),f=0,d++;else return L(a,h.precision=D,p,k=!0);else return h.precision=D,a}a=l}}function st(e,t){var n,r,u,o,a,l,c,d,f,s,h,p=1,D=10,g=e,y=g.d,v=g.constructor,A=v.rounding,S=v.precision;if(g.s<0||!y||!y[0]||!g.e&&y[0]==1&&y.length==1)return new v(y&&!y[0]?-1/0:g.s!=1?NaN:y?0:g);if(t==null?(k=!1,f=S):f=t,v.precision=f+=D,n=fe(y),r=n.charAt(0),Math.abs(o=g.e)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)g=g.times(e),n=fe(g.d),r=n.charAt(0),p++;o=g.e,r>1?(g=new v("0."+n),o++):g=new v(r+"."+n.slice(1))}else return d=In(v,f+2,S).times(o+""),g=st(new v(r+"."+n.slice(1)),f-D).plus(d),v.precision=S,t==null?L(g,S,A,k=!0):g;for(s=g,c=a=g=K(g.minus(1),g.plus(1),f,1),h=L(g.times(g),f,1),u=3;;){if(a=L(a.times(h),f,1),d=c.plus(K(a,new v(u),f,1)),fe(d.d).slice(0,f)===fe(c.d).slice(0,f))if(c=c.times(2),o!==0&&(c=c.plus(In(v,f+2,S).times(o+""))),c=K(c,new v(p),f,1),t==null)if(Wt(c.d,f-D,A,l))v.precision=f+=D,d=a=g=K(s.minus(1),s.plus(1),f,1),h=L(g.times(g),f,1),u=l=1;else return L(c,v.precision=S,A,k=!0);else return v.precision=S,c;c=d,u+=2}}function _i(e){return String(e.s*e.s/0)}function zr(e,t){var n,r,u;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;r++);for(u=t.length;t.charCodeAt(u-1)===48;--u);if(t=t.slice(r,u),t){if(u-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%q,n<0&&(r+=q),r<u){for(r&&e.d.push(+t.slice(0,r)),u-=q;r<u;)e.d.push(+t.slice(r,r+=q));t=t.slice(r),r=q-t.length}else r-=u;for(;r--;)t+="0";e.d.push(+t),k&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function md(e,t){var n,r,u,o,a,l,c,d,f;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Bi.test(t))return zr(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(dd.test(t))n=16,t=t.toLowerCase();else if(hd.test(t))n=2;else if(pd.test(t))n=8;else throw Error(ot+t);for(o=t.search(/p/i),o>0?(c=+t.slice(o+1),t=t.substring(2,o)):t=t.slice(2),o=t.indexOf("."),a=o>=0,r=e.constructor,a&&(t=t.replace(".",""),l=t.length,o=l-o,u=Si(r,new r(n),o,o*2)),d=Nn(t,n,Le),f=d.length-1,o=f;d[o]===0;--o)d.pop();return o<0?new r(e.s*0):(e.e=_n(d,f),e.d=d,k=!1,a&&(e=K(e,u,l*4)),c&&(e=e.times(Math.abs(c)<54?ie(2,c):Mt.pow(2,c))),k=!0,e)}function yd(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:St(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:n|0,t=t.times(1/On(5,n)),t=St(e,2,t,t);for(var u,o=new e(5),a=new e(16),l=new e(20);n--;)u=t.times(t),t=t.times(o.plus(u.times(a.times(u).minus(l))));return t}function St(e,t,n,r,u){var o,a,l,c,d=e.precision,f=Math.ceil(d/q);for(k=!1,c=n.times(n),l=new e(r);;){if(a=K(l.times(c),new e(t++*t++),d,1),l=u?r.plus(a):r.minus(a),r=K(a.times(c),new e(t++*t++),d,1),a=l.plus(r),a.d[f]!==void 0){for(o=f;a.d[o]===l.d[o]&&o--;);if(o==-1)break}o=l,l=r,r=a,a=o}return k=!0,a.d.length=f+1,a}function On(e,t){for(var n=e;--t;)n*=e;return n}function Ii(e,t){var n,r=t.s<0,u=je(e,e.precision,1),o=u.times(.5);if(t=t.abs(),t.lte(o))return Ke=r?4:1,t;if(n=t.divToInt(u),n.isZero())Ke=r?3:2;else{if(t=t.minus(n.times(u)),t.lte(o))return Ke=Mi(n)?r?2:3:r?4:1,t;Ke=Mi(n)?r?1:4:r?3:2}return t.minus(u).abs()}function Wr(e,t,n,r){var u,o,a,l,c,d,f,s,h,p=e.constructor,D=n!==void 0;if(D?(Ce(n,1,it),r===void 0?r=p.rounding:Ce(r,0,8)):(n=p.precision,r=p.rounding),!e.isFinite())f=_i(e);else{for(f=Ze(e),a=f.indexOf("."),D?(u=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):u=t,a>=0&&(f=f.replace(".",""),h=new p(1),h.e=f.length-a,h.d=Nn(Ze(h),10,u),h.e=h.d.length),s=Nn(f,10,u),o=c=s.length;s[--c]==0;)s.pop();if(!s[0])f=D?"0p+0":"0";else{if(a<0?o--:(e=new p(e),e.d=s,e.e=o,e=K(e,h,n,r,0,u),s=e.d,o=e.e,d=Ai),a=s[n],l=u/2,d=d||s[n+1]!==void 0,d=r<4?(a!==void 0||d)&&(r===0||r===(e.s<0?3:2)):a>l||a===l&&(r===4||d||r===6&&s[n-1]&1||r===(e.s<0?8:7)),s.length=n,d)for(;++s[--n]>u-1;)s[n]=0,n||(++o,s.unshift(1));for(c=s.length;!s[c-1];--c);for(a=0,f="";a<c;a++)f+=kr.charAt(s[a]);if(D){if(c>1)if(t==16||t==8){for(a=t==16?4:3,--c;c%a;c++)f+="0";for(s=Nn(f,u,t),c=s.length;!s[c-1];--c);for(a=1,f="1.";a<c;a++)f+=kr.charAt(s[a])}else f=f.charAt(0)+"."+f.slice(1);f=f+(o<0?"p":"p+")+o}else if(o<0){for(;++o;)f="0"+f;f="0."+f}else if(++o>c)for(o-=c;o--;)f+="0";else o<c&&(f=f.slice(0,o)+"."+f.slice(o))}f=(t==16?"0x":t==2?"0b":t==8?"0o":"")+f}return e.s<0?"-"+f:f}function Oi(e,t){if(e.length>t)return e.length=t,!0}function Ed(e){return new this(e).abs()}function Ad(e){return new this(e).acos()}function Cd(e){return new this(e).acosh()}function Fd(e,t){return new this(e).plus(t)}function wd(e){return new this(e).asin()}function Bd(e){return new this(e).asinh()}function bd(e){return new this(e).atan()}function Sd(e){return new this(e).atanh()}function Md(e,t){e=new this(e),t=new this(t);var n,r=this.precision,u=this.rounding,o=r+4;return!e.s||!t.s?n=new this(NaN):!e.d&&!t.d?(n=je(this,o,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?je(this,r,u):new this(0),n.s=e.s):!e.d||t.isZero()?(n=je(this,o,1).times(.5),n.s=e.s):t.s<0?(this.precision=o,this.rounding=1,n=this.atan(K(e,t,o,1)),t=je(this,o,1),this.precision=r,this.rounding=u,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(K(e,t,o,1)),n}function Nd(e){return new this(e).cbrt()}function _d(e){return L(e=new this(e),e.e+1,2)}function Id(e,t,n){return new this(e).clamp(t,n)}function Od(e){if(!e||typeof e!="object")throw Error(Mn+"Object expected");var t,n,r,u=e.defaults===!0,o=["precision",1,it,"rounding",0,8,"toExpNeg",-bt,0,"toExpPos",0,bt,"maxE",0,bt,"minE",-bt,0,"modulo",0,9];for(t=0;t<o.length;t+=3)if(n=o[t],u&&(this[n]=Vr[n]),(r=e[n])!==void 0)if(pe(r)===r&&r>=o[t+1]&&r<=o[t+2])this[n]=r;else throw Error(ot+n+": "+r);if(n="crypto",u&&(this[n]=Vr[n]),(r=e[n])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(Fi);else this[n]=!1;else throw Error(ot+n+": "+r);return this}function Rd(e){return new this(e).cos()}function xd(e){return new this(e).cosh()}function Ri(e){var t,n,r;function u(o){var a,l,c,d=this;if(!(d instanceof u))return new u(o);if(d.constructor=u,xi(o)){d.s=o.s,k?!o.d||o.e>u.maxE?(d.e=NaN,d.d=null):o.e<u.minE?(d.e=0,d.d=[0]):(d.e=o.e,d.d=o.d.slice()):(d.e=o.e,d.d=o.d?o.d.slice():o.d);return}if(c=typeof o,c==="number"){if(o===0){d.s=1/o<0?-1:1,d.e=0,d.d=[0];return}if(o<0?(o=-o,d.s=-1):d.s=1,o===~~o&&o<1e7){for(a=0,l=o;l>=10;l/=10)a++;k?a>u.maxE?(d.e=NaN,d.d=null):a<u.minE?(d.e=0,d.d=[0]):(d.e=a,d.d=[o]):(d.e=a,d.d=[o]);return}else if(o*0!==0){o||(d.s=NaN),d.e=NaN,d.d=null;return}return zr(d,o.toString())}else if(c!=="string")throw Error(ot+o);return(l=o.charCodeAt(0))===45?(o=o.slice(1),d.s=-1):(l===43&&(o=o.slice(1)),d.s=1),Bi.test(o)?zr(d,o):md(d,o)}if(u.prototype=B,u.ROUND_UP=0,u.ROUND_DOWN=1,u.ROUND_CEIL=2,u.ROUND_FLOOR=3,u.ROUND_HALF_UP=4,u.ROUND_HALF_DOWN=5,u.ROUND_HALF_EVEN=6,u.ROUND_HALF_CEIL=7,u.ROUND_HALF_FLOOR=8,u.EUCLID=9,u.config=u.set=Od,u.clone=Ri,u.isDecimal=xi,u.abs=Ed,u.acos=Ad,u.acosh=Cd,u.add=Fd,u.asin=wd,u.asinh=Bd,u.atan=bd,u.atanh=Sd,u.atan2=Md,u.cbrt=Nd,u.ceil=_d,u.clamp=Id,u.cos=Rd,u.cosh=xd,u.div=$d,u.exp=Pd,u.floor=Td,u.hypot=Ld,u.ln=jd,u.log=qd,u.log10=Vd,u.log2=kd,u.max=Ud,u.min=Hd,u.mod=zd,u.mul=Wd,u.pow=Zd,u.random=Xd,u.round=Jd,u.sign=Gd,u.sin=Kd,u.sinh=Qd,u.sqrt=Yd,u.sub=ep,u.sum=tp,u.tan=np,u.tanh=rp,u.trunc=up,e===void 0&&(e={}),e&&e.defaults!==!0)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return u.config(e),u}function $d(e,t){return new this(e).div(t)}function Pd(e){return new this(e).exp()}function Td(e){return L(e=new this(e),e.e+1,3)}function Ld(){var e,t,n=new this(0);for(k=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return k=!0,new this(1/0);n=t}return k=!0,n.sqrt()}function xi(e){return e instanceof Mt||e&&e.toStringTag===wi||!1}function jd(e){return new this(e).ln()}function qd(e,t){return new this(e).log(t)}function kd(e){return new this(e).log(2)}function Vd(e){return new this(e).log(10)}function Ud(){return Ni(this,arguments,"lt")}function Hd(){return Ni(this,arguments,"gt")}function zd(e,t){return new this(e).mod(t)}function Wd(e,t){return new this(e).mul(t)}function Zd(e,t){return new this(e).pow(t)}function Xd(e){var t,n,r,u,o=0,a=new this(1),l=[];if(e===void 0?e=this.precision:Ce(e,1,it),r=Math.ceil(e/q),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));o<r;)u=t[o],u>=429e7?t[o]=crypto.getRandomValues(new Uint32Array(1))[0]:l[o++]=u%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);o<r;)u=t[o]+(t[o+1]<<8)+(t[o+2]<<16)+((t[o+3]&127)<<24),u>=214e7?crypto.randomBytes(4).copy(t,o):(l.push(u%1e7),o+=4);o=r/4}else throw Error(Fi);else for(;o<r;)l[o++]=Math.random()*1e7|0;for(r=l[--o],e%=q,r&&e&&(u=ie(10,q-e),l[o]=(r/u|0)*u);l[o]===0;o--)l.pop();if(o<0)n=0,l=[0];else{for(n=-1;l[0]===0;n-=q)l.shift();for(r=1,u=l[0];u>=10;u/=10)r++;r<q&&(n-=q-r)}return a.e=n,a.d=l,a}function Jd(e){return L(e=new this(e),e.e+1,this.rounding)}function Gd(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function Kd(e){return new this(e).sin()}function Qd(e){return new this(e).sinh()}function Yd(e){return new this(e).sqrt()}function ep(e,t){return new this(e).sub(t)}function tp(){var e=0,t=arguments,n=new this(t[e]);for(k=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return k=!0,L(n,this.precision,this.rounding)}function np(e){return new this(e).tan()}function rp(e){return new this(e).tanh()}function up(e){return L(e=new this(e),e.e+1,1)}B[Symbol.for("nodejs.util.inspect.custom")]=B.toString,B[Symbol.toStringTag]="Decimal";var Mt=B.constructor=Ri(Vr);bn=new Mt(bn),Sn=new Mt(Sn);var ip="BigNumber",op=["?on","config"],ap=Ae(ip,op,e=>{var{on:t,config:n}=e,r=Mt.clone({precision:n.precision,modulo:Mt.EUCLID});return r.prototype=Object.create(r.prototype),r.prototype.type="BigNumber",r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},r.fromJSON=function(u){return new r(u.value)},t&&t("config",function(u,o){u.precision!==o.precision&&r.config({precision:u.precision})}),r},{isClass:!0}),$i={exports:{}};/**
|
|
16
|
+
*/var It=9e15,ut=1e9,nu="0123456789abcdef",Rn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",xn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",ru={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-It,maxE:It,crypto:!1},zi,Ke,V=!0,On="[DecimalError] ",it=On+"Invalid argument: ",Wi=On+"Precision limit exceeded",Gi=On+"crypto unavailable",Xi="[object Decimal]",de=Math.floor,ue=Math.pow,GE=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,XE=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,ZE=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Zi=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,je=1e7,j=7,JE=9007199254740991,KE=Rn.length-1,uu=xn.length-1,B={toStringTag:Xi};B.absoluteValue=B.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),P(e)},B.ceil=function(){return P(new this.constructor(this),this.e+1,2)},B.clampedTo=B.clamp=function(e,t){var n,r=this,u=r.constructor;if(e=new u(e),t=new u(t),!e.s||!t.s)return new u(NaN);if(e.gt(t))throw Error(it+t);return n=r.cmp(e),n<0?e:r.cmp(t)>0?t:new u(r)},B.comparedTo=B.cmp=function(e){var t,n,r,u,i=this,a=i.d,s=(e=new i.constructor(e)).d,c=i.s,l=e.s;if(!a||!s)return!c||!l?NaN:c!==l?c:a===s?0:!a^c<0?1:-1;if(!a[0]||!s[0])return a[0]?c:s[0]?-l:0;if(c!==l)return c;if(i.e!==e.e)return i.e>e.e^c<0?1:-1;for(r=a.length,u=s.length,t=0,n=r<u?r:u;t<n;++t)if(a[t]!==s[t])return a[t]>s[t]^c<0?1:-1;return r===u?0:r>u^c<0?1:-1},B.cosine=B.cos=function(){var e,t,n=this,r=n.constructor;return n.d?n.d[0]?(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+j,r.rounding=1,n=QE(r,ta(r,n)),r.precision=e,r.rounding=t,P(Ke==2||Ke==3?n.neg():n,e,t,!0)):new r(1):new r(NaN)},B.cubeRoot=B.cbrt=function(){var e,t,n,r,u,i,a,s,c,l,f=this,o=f.constructor;if(!f.isFinite()||f.isZero())return new o(f);for(V=!1,i=f.s*ue(f.s*f,1/3),!i||Math.abs(i)==1/0?(n=ce(f.d),e=f.e,(i=(e-n.length+1)%3)&&(n+=i==1||i==-2?"0":"00"),i=ue(n,1/3),e=de((e+1)/3)-(e%3==(e<0?-1:2)),i==1/0?n="5e"+e:(n=i.toExponential(),n=n.slice(0,n.indexOf("e")+1)+e),r=new o(n),r.s=f.s):r=new o(i.toString()),a=(e=o.precision)+3;;)if(s=r,c=s.times(s).times(s),l=c.plus(f),r=Z(l.plus(f).times(s),l.plus(c),a+2,1),ce(s.d).slice(0,a)===(n=ce(r.d)).slice(0,a))if(n=n.slice(a-3,a+1),n=="9999"||!u&&n=="4999"){if(!u&&(P(s,e+1,0),s.times(s).times(s).eq(f))){r=s;break}a+=4,u=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(P(r,e+1,1),t=!r.times(r).times(r).eq(f));break}return V=!0,P(r,e,o.rounding,t)},B.decimalPlaces=B.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-de(this.e/j))*j,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},B.dividedBy=B.div=function(e){return Z(this,new this.constructor(e))},B.dividedToIntegerBy=B.divToInt=function(e){var t=this,n=t.constructor;return P(Z(t,new n(e),0,1,1),n.precision,n.rounding)},B.equals=B.eq=function(e){return this.cmp(e)===0},B.floor=function(){return P(new this.constructor(this),this.e+1,3)},B.greaterThan=B.gt=function(e){return this.cmp(e)>0},B.greaterThanOrEqualTo=B.gte=function(e){var t=this.cmp(e);return t==1||t===0},B.hyperbolicCosine=B.cosh=function(){var e,t,n,r,u,i=this,a=i.constructor,s=new a(1);if(!i.isFinite())return new a(i.s?1/0:NaN);if(i.isZero())return s;n=a.precision,r=a.rounding,a.precision=n+Math.max(i.e,i.sd())+4,a.rounding=1,u=i.d.length,u<32?(e=Math.ceil(u/3),t=(1/jn(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=_t(a,1,i.times(t),new a(1),!0);for(var c,l=e,f=new a(8);l--;)c=i.times(i),i=s.minus(c.times(f.minus(c.times(f))));return P(i,a.precision=n,a.rounding=r,!0)},B.hyperbolicSine=B.sinh=function(){var e,t,n,r,u=this,i=u.constructor;if(!u.isFinite()||u.isZero())return new i(u);if(t=i.precision,n=i.rounding,i.precision=t+Math.max(u.e,u.sd())+4,i.rounding=1,r=u.d.length,r<3)u=_t(i,2,u,u,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,u=u.times(1/jn(5,e)),u=_t(i,2,u,u,!0);for(var a,s=new i(5),c=new i(16),l=new i(20);e--;)a=u.times(u),u=u.times(s.plus(a.times(c.times(a).plus(l))))}return i.precision=t,i.rounding=n,P(u,t,n,!0)},B.hyperbolicTangent=B.tanh=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+7,r.rounding=1,Z(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},B.inverseCosine=B.acos=function(){var e,t=this,n=t.constructor,r=t.abs().cmp(1),u=n.precision,i=n.rounding;return r!==-1?r===0?t.isNeg()?Ve(n,u,i):new n(0):new n(NaN):t.isZero()?Ve(n,u+4,i).times(.5):(n.precision=u+6,n.rounding=1,t=t.asin(),e=Ve(n,u+4,i).times(.5),n.precision=u,n.rounding=i,e.minus(t))},B.inverseHyperbolicCosine=B.acosh=function(){var e,t,n=this,r=n.constructor;return n.lte(1)?new r(n.eq(1)?0:NaN):n.isFinite()?(e=r.precision,t=r.rounding,r.precision=e+Math.max(Math.abs(n.e),n.sd())+4,r.rounding=1,V=!1,n=n.times(n).minus(1).sqrt().plus(n),V=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},B.inverseHyperbolicSine=B.asinh=function(){var e,t,n=this,r=n.constructor;return!n.isFinite()||n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+2*Math.max(Math.abs(n.e),n.sd())+6,r.rounding=1,V=!1,n=n.times(n).plus(1).sqrt().plus(n),V=!0,r.precision=e,r.rounding=t,n.ln())},B.inverseHyperbolicTangent=B.atanh=function(){var e,t,n,r,u=this,i=u.constructor;return u.isFinite()?u.e>=0?new i(u.abs().eq(1)?u.s/0:u.isZero()?u:NaN):(e=i.precision,t=i.rounding,r=u.sd(),Math.max(r,e)<2*-u.e-1?P(new i(u),e,t,!0):(i.precision=n=r-u.e,u=Z(u.plus(1),new i(1).minus(u),n+e,1),i.precision=e+4,i.rounding=1,u=u.ln(),i.precision=e,i.rounding=t,u.times(.5))):new i(NaN)},B.inverseSine=B.asin=function(){var e,t,n,r,u=this,i=u.constructor;return u.isZero()?new i(u):(t=u.abs().cmp(1),n=i.precision,r=i.rounding,t!==-1?t===0?(e=Ve(i,n+4,r).times(.5),e.s=u.s,e):new i(NaN):(i.precision=n+6,i.rounding=1,u=u.div(new i(1).minus(u.times(u)).sqrt().plus(1)).atan(),i.precision=n,i.rounding=r,u.times(2)))},B.inverseTangent=B.atan=function(){var e,t,n,r,u,i,a,s,c,l=this,f=l.constructor,o=f.precision,h=f.rounding;if(l.isFinite()){if(l.isZero())return new f(l);if(l.abs().eq(1)&&o+4<=uu)return a=Ve(f,o+4,h).times(.25),a.s=l.s,a}else{if(!l.s)return new f(NaN);if(o+4<=uu)return a=Ve(f,o+4,h).times(.5),a.s=l.s,a}for(f.precision=s=o+10,f.rounding=1,n=Math.min(28,s/j+2|0),e=n;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(V=!1,t=Math.ceil(s/j),r=1,c=l.times(l),a=new f(l),u=l;e!==-1;)if(u=u.times(c),i=a.minus(u.div(r+=2)),u=u.times(c),a=i.plus(u.div(r+=2)),a.d[t]!==void 0)for(e=t;a.d[e]===i.d[e]&&e--;);return n&&(a=a.times(2<<n-1)),V=!0,P(a,f.precision=o,f.rounding=h,!0)},B.isFinite=function(){return!!this.d},B.isInteger=B.isInt=function(){return!!this.d&&de(this.e/j)>this.d.length-2},B.isNaN=function(){return!this.s},B.isNegative=B.isNeg=function(){return this.s<0},B.isPositive=B.isPos=function(){return this.s>0},B.isZero=function(){return!!this.d&&this.d[0]===0},B.lessThan=B.lt=function(e){return this.cmp(e)<0},B.lessThanOrEqualTo=B.lte=function(e){return this.cmp(e)<1},B.logarithm=B.log=function(e){var t,n,r,u,i,a,s,c,l=this,f=l.constructor,o=f.precision,h=f.rounding,p=5;if(e==null)e=new f(10),t=!0;else{if(e=new f(e),n=e.d,e.s<0||!n||!n[0]||e.eq(1))return new f(NaN);t=e.eq(10)}if(n=l.d,l.s<0||!n||!n[0]||l.eq(1))return new f(n&&!n[0]?-1/0:l.s!=1?NaN:n?0:1/0);if(t)if(n.length>1)i=!0;else{for(u=n[0];u%10===0;)u/=10;i=u!==1}if(V=!1,s=o+p,a=ot(l,s),r=t?Ln(f,s+10):ot(e,s),c=Z(a,r,s,1),Qt(c.d,u=o,h))do if(s+=10,a=ot(l,s),r=t?Ln(f,s+10):ot(e,s),c=Z(a,r,s,1),!i){+ce(c.d).slice(u+1,u+15)+1==1e14&&(c=P(c,o+1,0));break}while(Qt(c.d,u+=10,h));return V=!0,P(c,o,h)},B.minus=B.sub=function(e){var t,n,r,u,i,a,s,c,l,f,o,h,p=this,d=p.constructor;if(e=new d(e),!p.d||!e.d)return!p.s||!e.s?e=new d(NaN):p.d?e.s=-e.s:e=new d(e.d||p.s!==e.s?p:NaN),e;if(p.s!=e.s)return e.s=-e.s,p.plus(e);if(l=p.d,h=e.d,s=d.precision,c=d.rounding,!l[0]||!h[0]){if(h[0])e.s=-e.s;else if(l[0])e=new d(p);else return new d(c===3?-0:0);return V?P(e,s,c):e}if(n=de(e.e/j),f=de(p.e/j),l=l.slice(),i=f-n,i){for(o=i<0,o?(t=l,i=-i,a=h.length):(t=h,n=f,a=l.length),r=Math.max(Math.ceil(s/j),a)+2,i>r&&(i=r,t.length=1),t.reverse(),r=i;r--;)t.push(0);t.reverse()}else{for(r=l.length,a=h.length,o=r<a,o&&(a=r),r=0;r<a;r++)if(l[r]!=h[r]){o=l[r]<h[r];break}i=0}for(o&&(t=l,l=h,h=t,e.s=-e.s),a=l.length,r=h.length-a;r>0;--r)l[a++]=0;for(r=h.length;r>i;){if(l[--r]<h[r]){for(u=r;u&&l[--u]===0;)l[u]=je-1;--l[u],l[r]+=je}l[r]-=h[r]}for(;l[--a]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(e.d=l,e.e=Pn(l,n),V?P(e,s,c):e):new d(c===3?-0:0)},B.modulo=B.mod=function(e){var t,n=this,r=n.constructor;return e=new r(e),!n.d||!e.s||e.d&&!e.d[0]?new r(NaN):!e.d||n.d&&!n.d[0]?P(new r(n),r.precision,r.rounding):(V=!1,r.modulo==9?(t=Z(n,e.abs(),0,3,1),t.s*=e.s):t=Z(n,e,0,r.modulo,1),t=t.times(e),V=!0,n.minus(t))},B.naturalExponential=B.exp=function(){return iu(this)},B.naturalLogarithm=B.ln=function(){return ot(this)},B.negated=B.neg=function(){var e=new this.constructor(this);return e.s=-e.s,P(e)},B.plus=B.add=function(e){var t,n,r,u,i,a,s,c,l,f,o=this,h=o.constructor;if(e=new h(e),!o.d||!e.d)return!o.s||!e.s?e=new h(NaN):o.d||(e=new h(e.d||o.s===e.s?o:NaN)),e;if(o.s!=e.s)return e.s=-e.s,o.minus(e);if(l=o.d,f=e.d,s=h.precision,c=h.rounding,!l[0]||!f[0])return f[0]||(e=new h(o)),V?P(e,s,c):e;if(i=de(o.e/j),r=de(e.e/j),l=l.slice(),u=i-r,u){for(u<0?(n=l,u=-u,a=f.length):(n=f,r=i,a=l.length),i=Math.ceil(s/j),a=i>a?i+1:a+1,u>a&&(u=a,n.length=1),n.reverse();u--;)n.push(0);n.reverse()}for(a=l.length,u=f.length,a-u<0&&(u=a,n=f,f=l,l=n),t=0;u;)t=(l[--u]=l[u]+f[u]+t)/je|0,l[u]%=je;for(t&&(l.unshift(t),++r),a=l.length;l[--a]==0;)l.pop();return e.d=l,e.e=Pn(l,r),V?P(e,s,c):e},B.precision=B.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(it+e);return n.d?(t=Ji(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},B.round=function(){var e=this,t=e.constructor;return P(new t(e),e.e+1,t.rounding)},B.sine=B.sin=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+Math.max(n.e,n.sd())+j,r.rounding=1,n=ev(r,ta(r,n)),r.precision=e,r.rounding=t,P(Ke>2?n.neg():n,e,t,!0)):new r(NaN)},B.squareRoot=B.sqrt=function(){var e,t,n,r,u,i,a=this,s=a.d,c=a.e,l=a.s,f=a.constructor;if(l!==1||!s||!s[0])return new f(!l||l<0&&(!s||s[0])?NaN:s?a:1/0);for(V=!1,l=Math.sqrt(+a),l==0||l==1/0?(t=ce(s),(t.length+c)%2==0&&(t+="0"),l=Math.sqrt(t),c=de((c+1)/2)-(c<0||c%2),l==1/0?t="5e"+c:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+c),r=new f(t)):r=new f(l.toString()),n=(c=f.precision)+3;;)if(i=r,r=i.plus(Z(a,i,n+2,1)).times(.5),ce(i.d).slice(0,n)===(t=ce(r.d)).slice(0,n))if(t=t.slice(n-3,n+1),t=="9999"||!u&&t=="4999"){if(!u&&(P(i,c+1,0),i.times(i).eq(a))){r=i;break}n+=4,u=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(P(r,c+1,1),e=!r.times(r).eq(a));break}return V=!0,P(r,c,f.rounding,e)},B.tangent=B.tan=function(){var e,t,n=this,r=n.constructor;return n.isFinite()?n.isZero()?new r(n):(e=r.precision,t=r.rounding,r.precision=e+10,r.rounding=1,n=n.sin(),n.s=1,n=Z(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,P(Ke==2||Ke==4?n.neg():n,e,t,!0)):new r(NaN)},B.times=B.mul=function(e){var t,n,r,u,i,a,s,c,l,f=this,o=f.constructor,h=f.d,p=(e=new o(e)).d;if(e.s*=f.s,!h||!h[0]||!p||!p[0])return new o(!e.s||h&&!h[0]&&!p||p&&!p[0]&&!h?NaN:!h||!p?e.s/0:e.s*0);for(n=de(f.e/j)+de(e.e/j),c=h.length,l=p.length,c<l&&(i=h,h=p,p=i,a=c,c=l,l=a),i=[],a=c+l,r=a;r--;)i.push(0);for(r=l;--r>=0;){for(t=0,u=c+r;u>r;)s=i[u]+p[r]*h[u-r-1]+t,i[u--]=s%je|0,t=s/je|0;i[u]=(i[u]+t)%je|0}for(;!i[--a];)i.pop();return t?++n:i.shift(),e.d=i,e.e=Pn(i,n),V?P(e,o.precision,o.rounding):e},B.toBinary=function(e,t){return ou(this,2,e,t)},B.toDecimalPlaces=B.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(Be(e,0,ut),t===void 0?t=r.rounding:Be(t,0,8),P(n,e+n.e+1,t))},B.toExponential=function(e,t){var n,r=this,u=r.constructor;return e===void 0?n=Ge(r,!0):(Be(e,0,ut),t===void 0?t=u.rounding:Be(t,0,8),r=P(new u(r),e+1,t),n=Ge(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},B.toFixed=function(e,t){var n,r,u=this,i=u.constructor;return e===void 0?n=Ge(u):(Be(e,0,ut),t===void 0?t=i.rounding:Be(t,0,8),r=P(new i(u),e+u.e+1,t),n=Ge(r,!1,e+r.e+1)),u.isNeg()&&!u.isZero()?"-"+n:n},B.toFraction=function(e){var t,n,r,u,i,a,s,c,l,f,o,h,p=this,d=p.d,D=p.constructor;if(!d)return new D(p);if(l=n=new D(1),r=c=new D(0),t=new D(r),i=t.e=Ji(d)-p.e-1,a=i%j,t.d[0]=ue(10,a<0?j+a:a),e==null)e=i>0?t:l;else{if(s=new D(e),!s.isInt()||s.lt(l))throw Error(it+s);e=s.gt(t)?i>0?t:l:s}for(V=!1,s=new D(ce(d)),f=D.precision,D.precision=i=d.length*j*2;o=Z(s,t,0,1,1),u=n.plus(o.times(r)),u.cmp(e)!=1;)n=r,r=u,u=l,l=c.plus(o.times(u)),c=u,u=t,t=s.minus(o.times(u)),s=u;return u=Z(e.minus(n),r,0,1,1),c=c.plus(u.times(l)),n=n.plus(u.times(r)),c.s=l.s=p.s,h=Z(l,r,i,1).minus(p).abs().cmp(Z(c,n,i,1).minus(p).abs())<1?[l,r]:[c,n],D.precision=f,V=!0,h},B.toHexadecimal=B.toHex=function(e,t){return ou(this,16,e,t)},B.toNearest=function(e,t){var n=this,r=n.constructor;if(n=new r(n),e==null){if(!n.d)return n;e=new r(1),t=r.rounding}else{if(e=new r(e),t===void 0?t=r.rounding:Be(t,0,8),!n.d)return e.s?n:e;if(!e.d)return e.s&&(e.s=n.s),e}return e.d[0]?(V=!1,n=Z(n,e,0,t,1).times(e),V=!0,P(n)):(e.s=n.s,n=e),n},B.toNumber=function(){return+this},B.toOctal=function(e,t){return ou(this,8,e,t)},B.toPower=B.pow=function(e){var t,n,r,u,i,a,s=this,c=s.constructor,l=+(e=new c(e));if(!s.d||!e.d||!s.d[0]||!e.d[0])return new c(ue(+s,l));if(s=new c(s),s.eq(1))return s;if(r=c.precision,i=c.rounding,e.eq(1))return P(s,r,i);if(t=de(e.e/j),t>=e.d.length-1&&(n=l<0?-l:l)<=JE)return u=Ki(c,s,n,r),e.s<0?new c(1).div(u):P(u,r,i);if(a=s.s,a<0){if(t<e.d.length-1)return new c(NaN);if((e.d[t]&1)==0&&(a=1),s.e==0&&s.d[0]==1&&s.d.length==1)return s.s=a,s}return n=ue(+s,l),t=n==0||!isFinite(n)?de(l*(Math.log("0."+ce(s.d))/Math.LN10+s.e+1)):new c(n+"").e,t>c.maxE+1||t<c.minE-1?new c(t>0?a/0:0):(V=!1,c.rounding=s.s=1,n=Math.min(12,(t+"").length),u=iu(e.times(ot(s,r+n)),r),u.d&&(u=P(u,r+5,1),Qt(u.d,r,i)&&(t=r+10,u=P(iu(e.times(ot(s,t+n)),t),t+5,1),+ce(u.d).slice(r+1,r+15)+1==1e14&&(u=P(u,r+1,0)))),u.s=a,V=!0,c.rounding=i,P(u,r,i))},B.toPrecision=function(e,t){var n,r=this,u=r.constructor;return e===void 0?n=Ge(r,r.e<=u.toExpNeg||r.e>=u.toExpPos):(Be(e,1,ut),t===void 0?t=u.rounding:Be(t,0,8),r=P(new u(r),e,t),n=Ge(r,e<=r.e||r.e<=u.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},B.toSignificantDigits=B.toSD=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(Be(e,1,ut),t===void 0?t=r.rounding:Be(t,0,8)),P(new r(n),e,t)},B.toString=function(){var e=this,t=e.constructor,n=Ge(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},B.truncated=B.trunc=function(){return P(new this.constructor(this),this.e+1,1)},B.valueOf=B.toJSON=function(){var e=this,t=e.constructor,n=Ge(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};function ce(e){var t,n,r,u=e.length-1,i="",a=e[0];if(u>0){for(i+=a,t=1;t<u;t++)r=e[t]+"",n=j-r.length,n&&(i+=at(n)),i+=r;a=e[t],r=a+"",n=j-r.length,n&&(i+=at(n))}else if(a===0)return"0";for(;a%10===0;)a/=10;return i+a}function Be(e,t,n){if(e!==~~e||e<t||e>n)throw Error(it+e)}function Qt(e,t,n,r){var u,i,a,s;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=j,u=0):(u=Math.ceil((t+1)/j),t%=j),i=ue(10,j-t),s=e[u]%i|0,r==null?t<3?(t==0?s=s/100|0:t==1&&(s=s/10|0),a=n<4&&s==99999||n>3&&s==49999||s==5e4||s==0):a=(n<4&&s+1==i||n>3&&s+1==i/2)&&(e[u+1]/i/100|0)==ue(10,t-2)-1||(s==i/2||s==0)&&(e[u+1]/i/100|0)==0:t<4?(t==0?s=s/1e3|0:t==1?s=s/100|0:t==2&&(s=s/10|0),a=(r||n<4)&&s==9999||!r&&n>3&&s==4999):a=((r||n<4)&&s+1==i||!r&&n>3&&s+1==i/2)&&(e[u+1]/i/1e3|0)==ue(10,t-3)-1,a}function Tn(e,t,n){for(var r,u=[0],i,a=0,s=e.length;a<s;){for(i=u.length;i--;)u[i]*=t;for(u[0]+=nu.indexOf(e.charAt(a++)),r=0;r<u.length;r++)u[r]>n-1&&(u[r+1]===void 0&&(u[r+1]=0),u[r+1]+=u[r]/n|0,u[r]%=n)}return u.reverse()}function QE(e,t){var n,r,u;if(t.isZero())return t;r=t.d.length,r<32?(n=Math.ceil(r/3),u=(1/jn(4,n)).toString()):(n=16,u="2.3283064365386962890625e-10"),e.precision+=n,t=_t(e,1,t.times(u),new e(1));for(var i=n;i--;){var a=t.times(t);t=a.times(a).minus(a).times(8).plus(1)}return e.precision-=n,t}var Z=function(){function e(r,u,i){var a,s=0,c=r.length;for(r=r.slice();c--;)a=r[c]*u+s,r[c]=a%i|0,s=a/i|0;return s&&r.unshift(s),r}function t(r,u,i,a){var s,c;if(i!=a)c=i>a?1:-1;else for(s=c=0;s<i;s++)if(r[s]!=u[s]){c=r[s]>u[s]?1:-1;break}return c}function n(r,u,i,a){for(var s=0;i--;)r[i]-=s,s=r[i]<u[i]?1:0,r[i]=s*a+r[i]-u[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,u,i,a,s,c){var l,f,o,h,p,d,D,v,E,y,b,F,$,O,T,I,x,W,U,K,J=r.constructor,ee=r.s==u.s?1:-1,Q=r.d,H=u.d;if(!Q||!Q[0]||!H||!H[0])return new J(!r.s||!u.s||(Q?H&&Q[0]==H[0]:!H)?NaN:Q&&Q[0]==0||!H?ee*0:ee/0);for(c?(p=1,f=r.e-u.e):(c=je,p=j,f=de(r.e/p)-de(u.e/p)),U=H.length,x=Q.length,E=new J(ee),y=E.d=[],o=0;H[o]==(Q[o]||0);o++);if(H[o]>(Q[o]||0)&&f--,i==null?(O=i=J.precision,a=J.rounding):s?O=i+(r.e-u.e)+1:O=i,O<0)y.push(1),d=!0;else{if(O=O/p+2|0,o=0,U==1){for(h=0,H=H[0],O++;(o<x||h)&&O--;o++)T=h*c+(Q[o]||0),y[o]=T/H|0,h=T%H|0;d=h||o<x}else{for(h=c/(H[0]+1)|0,h>1&&(H=e(H,h,c),Q=e(Q,h,c),U=H.length,x=Q.length),I=U,b=Q.slice(0,U),F=b.length;F<U;)b[F++]=0;K=H.slice(),K.unshift(0),W=H[0],H[1]>=c/2&&++W;do h=0,l=t(H,b,U,F),l<0?($=b[0],U!=F&&($=$*c+(b[1]||0)),h=$/W|0,h>1?(h>=c&&(h=c-1),D=e(H,h,c),v=D.length,F=b.length,l=t(D,b,v,F),l==1&&(h--,n(D,U<v?K:H,v,c))):(h==0&&(l=h=1),D=H.slice()),v=D.length,v<F&&D.unshift(0),n(b,D,F,c),l==-1&&(F=b.length,l=t(H,b,U,F),l<1&&(h++,n(b,U<F?K:H,F,c))),F=b.length):l===0&&(h++,b=[0]),y[o++]=h,l&&b[0]?b[F++]=Q[I]||0:(b=[Q[I]],F=1);while((I++<x||b[0]!==void 0)&&O--);d=b[0]!==void 0}y[0]||y.shift()}if(p==1)E.e=f,zi=d;else{for(o=1,h=y[0];h>=10;h/=10)o++;E.e=o+f*p-1,P(E,s?i+E.e+1:i,a,d)}return E}}();function P(e,t,n,r){var u,i,a,s,c,l,f,o,h,p=e.constructor;e:if(t!=null){if(o=e.d,!o)return e;for(u=1,s=o[0];s>=10;s/=10)u++;if(i=t-u,i<0)i+=j,a=t,f=o[h=0],c=f/ue(10,u-a-1)%10|0;else if(h=Math.ceil((i+1)/j),s=o.length,h>=s)if(r){for(;s++<=h;)o.push(0);f=c=0,u=1,i%=j,a=i-j+1}else break e;else{for(f=s=o[h],u=1;s>=10;s/=10)u++;i%=j,a=i-j+u,c=a<0?0:f/ue(10,u-a-1)%10|0}if(r=r||t<0||o[h+1]!==void 0||(a<0?f:f%ue(10,u-a-1)),l=n<4?(c||r)&&(n==0||n==(e.s<0?3:2)):c>5||c==5&&(n==4||r||n==6&&(i>0?a>0?f/ue(10,u-a):0:o[h-1])%10&1||n==(e.s<0?8:7)),t<1||!o[0])return o.length=0,l?(t-=e.e+1,o[0]=ue(10,(j-t%j)%j),e.e=-t||0):o[0]=e.e=0,e;if(i==0?(o.length=h,s=1,h--):(o.length=h+1,s=ue(10,j-i),o[h]=a>0?(f/ue(10,u-a)%ue(10,a)|0)*s:0),l)for(;;)if(h==0){for(i=1,a=o[0];a>=10;a/=10)i++;for(a=o[0]+=s,s=1;a>=10;a/=10)s++;i!=s&&(e.e++,o[0]==je&&(o[0]=1));break}else{if(o[h]+=s,o[h]!=je)break;o[h--]=0,s=1}for(i=o.length;o[--i]===0;)o.pop()}return V&&(e.e>p.maxE?(e.d=null,e.e=NaN):e.e<p.minE&&(e.e=0,e.d=[0])),e}function Ge(e,t,n){if(!e.isFinite())return ea(e);var r,u=e.e,i=ce(e.d),a=i.length;return t?(n&&(r=n-a)>0?i=i.charAt(0)+"."+i.slice(1)+at(r):a>1&&(i=i.charAt(0)+"."+i.slice(1)),i=i+(e.e<0?"e":"e+")+e.e):u<0?(i="0."+at(-u-1)+i,n&&(r=n-a)>0&&(i+=at(r))):u>=a?(i+=at(u+1-a),n&&(r=n-u-1)>0&&(i=i+"."+at(r))):((r=u+1)<a&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-a)>0&&(u+1===a&&(i+="."),i+=at(r))),i}function Pn(e,t){var n=e[0];for(t*=j;n>=10;n/=10)t++;return t}function Ln(e,t,n){if(t>KE)throw V=!0,n&&(e.precision=n),Error(Wi);return P(new e(Rn),t,1,!0)}function Ve(e,t,n){if(t>uu)throw Error(Wi);return P(new e(xn),t,n,!0)}function Ji(e){var t=e.length-1,n=t*j+1;if(t=e[t],t){for(;t%10==0;t/=10)n--;for(t=e[0];t>=10;t/=10)n++}return n}function at(e){for(var t="";e--;)t+="0";return t}function Ki(e,t,n,r){var u,i=new e(1),a=Math.ceil(r/j+4);for(V=!1;;){if(n%2&&(i=i.times(t),na(i.d,a)&&(u=!0)),n=de(n/2),n===0){n=i.d.length-1,u&&i.d[n]===0&&++i.d[n];break}t=t.times(t),na(t.d,a)}return V=!0,i}function Qi(e){return e.d[e.d.length-1]&1}function Yi(e,t,n){for(var r,u=new e(t[0]),i=0;++i<t.length;)if(r=new e(t[i]),r.s)u[n](r)&&(u=r);else{u=r;break}return u}function iu(e,t){var n,r,u,i,a,s,c,l=0,f=0,o=0,h=e.constructor,p=h.rounding,d=h.precision;if(!e.d||!e.d[0]||e.e>17)return new h(e.d?e.d[0]?e.s<0?0:1/0:1:e.s?e.s<0?0:e:0/0);for(t==null?(V=!1,c=d):c=t,s=new h(.03125);e.e>-2;)e=e.times(s),o+=5;for(r=Math.log(ue(2,o))/Math.LN10*2+5|0,c+=r,n=i=a=new h(1),h.precision=c;;){if(i=P(i.times(e),c,1),n=n.times(++f),s=a.plus(Z(i,n,c,1)),ce(s.d).slice(0,c)===ce(a.d).slice(0,c)){for(u=o;u--;)a=P(a.times(a),c,1);if(t==null)if(l<3&&Qt(a.d,c-r,p,l))h.precision=c+=10,n=i=s=new h(1),f=0,l++;else return P(a,h.precision=d,p,V=!0);else return h.precision=d,a}a=s}}function ot(e,t){var n,r,u,i,a,s,c,l,f,o,h,p=1,d=10,D=e,v=D.d,E=D.constructor,y=E.rounding,b=E.precision;if(D.s<0||!v||!v[0]||!D.e&&v[0]==1&&v.length==1)return new E(v&&!v[0]?-1/0:D.s!=1?NaN:v?0:D);if(t==null?(V=!1,f=b):f=t,E.precision=f+=d,n=ce(v),r=n.charAt(0),Math.abs(i=D.e)<15e14){for(;r<7&&r!=1||r==1&&n.charAt(1)>3;)D=D.times(e),n=ce(D.d),r=n.charAt(0),p++;i=D.e,r>1?(D=new E("0."+n),i++):D=new E(r+"."+n.slice(1))}else return l=Ln(E,f+2,b).times(i+""),D=ot(new E(r+"."+n.slice(1)),f-d).plus(l),E.precision=b,t==null?P(D,b,y,V=!0):D;for(o=D,c=a=D=Z(D.minus(1),D.plus(1),f,1),h=P(D.times(D),f,1),u=3;;){if(a=P(a.times(h),f,1),l=c.plus(Z(a,new E(u),f,1)),ce(l.d).slice(0,f)===ce(c.d).slice(0,f))if(c=c.times(2),i!==0&&(c=c.plus(Ln(E,f+2,b).times(i+""))),c=Z(c,new E(p),f,1),t==null)if(Qt(c.d,f-d,y,s))E.precision=f+=d,l=a=D=Z(o.minus(1),o.plus(1),f,1),h=P(D.times(D),f,1),u=s=1;else return P(c,E.precision=b,y,V=!0);else return E.precision=b,c;c=l,u+=2}}function ea(e){return String(e.s*e.s/0)}function au(e,t){var n,r,u;for((n=t.indexOf("."))>-1&&(t=t.replace(".","")),(r=t.search(/e/i))>0?(n<0&&(n=r),n+=+t.slice(r+1),t=t.substring(0,r)):n<0&&(n=t.length),r=0;t.charCodeAt(r)===48;r++);for(u=t.length;t.charCodeAt(u-1)===48;--u);if(t=t.slice(r,u),t){if(u-=r,e.e=n=n-r-1,e.d=[],r=(n+1)%j,n<0&&(r+=j),r<u){for(r&&e.d.push(+t.slice(0,r)),u-=j;r<u;)e.d.push(+t.slice(r,r+=j));t=t.slice(r),r=j-t.length}else r-=u;for(;r--;)t+="0";e.d.push(+t),V&&(e.e>e.constructor.maxE?(e.d=null,e.e=NaN):e.e<e.constructor.minE&&(e.e=0,e.d=[0]))}else e.e=0,e.d=[0];return e}function YE(e,t){var n,r,u,i,a,s,c,l,f;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Zi.test(t))return au(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(XE.test(t))n=16,t=t.toLowerCase();else if(GE.test(t))n=2;else if(ZE.test(t))n=8;else throw Error(it+t);for(i=t.search(/p/i),i>0?(c=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),a=i>=0,r=e.constructor,a&&(t=t.replace(".",""),s=t.length,i=s-i,u=Ki(r,new r(n),i,i*2)),l=Tn(t,n,je),f=l.length-1,i=f;l[i]===0;--i)l.pop();return i<0?new r(e.s*0):(e.e=Pn(l,f),e.d=l,V=!1,a&&(e=Z(e,u,s*4)),c&&(e=e.times(Math.abs(c)<54?ue(2,c):Nt.pow(2,c))),V=!0,e)}function ev(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:_t(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:n|0,t=t.times(1/jn(5,n)),t=_t(e,2,t,t);for(var u,i=new e(5),a=new e(16),s=new e(20);n--;)u=t.times(t),t=t.times(i.plus(u.times(a.times(u).minus(s))));return t}function _t(e,t,n,r,u){var i,a,s,c,l=e.precision,f=Math.ceil(l/j);for(V=!1,c=n.times(n),s=new e(r);;){if(a=Z(s.times(c),new e(t++*t++),l,1),s=u?r.plus(a):r.minus(a),r=Z(a.times(c),new e(t++*t++),l,1),a=s.plus(r),a.d[f]!==void 0){for(i=f;a.d[i]===s.d[i]&&i--;);if(i==-1)break}i=s,s=r,r=a,a=i}return V=!0,a.d.length=f+1,a}function jn(e,t){for(var n=e;--t;)n*=e;return n}function ta(e,t){var n,r=t.s<0,u=Ve(e,e.precision,1),i=u.times(.5);if(t=t.abs(),t.lte(i))return Ke=r?4:1,t;if(n=t.divToInt(u),n.isZero())Ke=r?3:2;else{if(t=t.minus(n.times(u)),t.lte(i))return Ke=Qi(n)?r?2:3:r?4:1,t;Ke=Qi(n)?r?1:4:r?3:2}return t.minus(u).abs()}function ou(e,t,n,r){var u,i,a,s,c,l,f,o,h,p=e.constructor,d=n!==void 0;if(d?(Be(n,1,ut),r===void 0?r=p.rounding:Be(r,0,8)):(n=p.precision,r=p.rounding),!e.isFinite())f=ea(e);else{for(f=Ge(e),a=f.indexOf("."),d?(u=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):u=t,a>=0&&(f=f.replace(".",""),h=new p(1),h.e=f.length-a,h.d=Tn(Ge(h),10,u),h.e=h.d.length),o=Tn(f,10,u),i=c=o.length;o[--c]==0;)o.pop();if(!o[0])f=d?"0p+0":"0";else{if(a<0?i--:(e=new p(e),e.d=o,e.e=i,e=Z(e,h,n,r,0,u),o=e.d,i=e.e,l=zi),a=o[n],s=u/2,l=l||o[n+1]!==void 0,l=r<4?(a!==void 0||l)&&(r===0||r===(e.s<0?3:2)):a>s||a===s&&(r===4||l||r===6&&o[n-1]&1||r===(e.s<0?8:7)),o.length=n,l)for(;++o[--n]>u-1;)o[n]=0,n||(++i,o.unshift(1));for(c=o.length;!o[c-1];--c);for(a=0,f="";a<c;a++)f+=nu.charAt(o[a]);if(d){if(c>1)if(t==16||t==8){for(a=t==16?4:3,--c;c%a;c++)f+="0";for(o=Tn(f,u,t),c=o.length;!o[c-1];--c);for(a=1,f="1.";a<c;a++)f+=nu.charAt(o[a])}else f=f.charAt(0)+"."+f.slice(1);f=f+(i<0?"p":"p+")+i}else if(i<0){for(;++i;)f="0"+f;f="0."+f}else if(++i>c)for(i-=c;i--;)f+="0";else i<c&&(f=f.slice(0,i)+"."+f.slice(i))}f=(t==16?"0x":t==2?"0b":t==8?"0o":"")+f}return e.s<0?"-"+f:f}function na(e,t){if(e.length>t)return e.length=t,!0}function tv(e){return new this(e).abs()}function nv(e){return new this(e).acos()}function rv(e){return new this(e).acosh()}function uv(e,t){return new this(e).plus(t)}function iv(e){return new this(e).asin()}function av(e){return new this(e).asinh()}function ov(e){return new this(e).atan()}function sv(e){return new this(e).atanh()}function cv(e,t){e=new this(e),t=new this(t);var n,r=this.precision,u=this.rounding,i=r+4;return!e.s||!t.s?n=new this(NaN):!e.d&&!t.d?(n=Ve(this,i,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?Ve(this,r,u):new this(0),n.s=e.s):!e.d||t.isZero()?(n=Ve(this,i,1).times(.5),n.s=e.s):t.s<0?(this.precision=i,this.rounding=1,n=this.atan(Z(e,t,i,1)),t=Ve(this,i,1),this.precision=r,this.rounding=u,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(Z(e,t,i,1)),n}function lv(e){return new this(e).cbrt()}function fv(e){return P(e=new this(e),e.e+1,2)}function hv(e,t,n){return new this(e).clamp(t,n)}function pv(e){if(!e||typeof e!="object")throw Error(On+"Object expected");var t,n,r,u=e.defaults===!0,i=["precision",1,ut,"rounding",0,8,"toExpNeg",-It,0,"toExpPos",0,It,"maxE",0,It,"minE",-It,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(n=i[t],u&&(this[n]=ru[n]),(r=e[n])!==void 0)if(de(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(it+n+": "+r);if(n="crypto",u&&(this[n]=ru[n]),(r=e[n])!==void 0)if(r===!0||r===!1||r===0||r===1)if(r)if(typeof crypto!="undefined"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[n]=!0;else throw Error(Gi);else this[n]=!1;else throw Error(it+n+": "+r);return this}function dv(e){return new this(e).cos()}function Dv(e){return new this(e).cosh()}function ra(e){var t,n,r;function u(i){var a,s,c,l=this;if(!(l instanceof u))return new u(i);if(l.constructor=u,ua(i)){l.s=i.s,V?!i.d||i.e>u.maxE?(l.e=NaN,l.d=null):i.e<u.minE?(l.e=0,l.d=[0]):(l.e=i.e,l.d=i.d.slice()):(l.e=i.e,l.d=i.d?i.d.slice():i.d);return}if(c=typeof i,c==="number"){if(i===0){l.s=1/i<0?-1:1,l.e=0,l.d=[0];return}if(i<0?(i=-i,l.s=-1):l.s=1,i===~~i&&i<1e7){for(a=0,s=i;s>=10;s/=10)a++;V?a>u.maxE?(l.e=NaN,l.d=null):a<u.minE?(l.e=0,l.d=[0]):(l.e=a,l.d=[i]):(l.e=a,l.d=[i]);return}else if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return au(l,i.toString())}else if(c!=="string")throw Error(it+i);return(s=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(s===43&&(i=i.slice(1)),l.s=1),Zi.test(i)?au(l,i):YE(l,i)}if(u.prototype=B,u.ROUND_UP=0,u.ROUND_DOWN=1,u.ROUND_CEIL=2,u.ROUND_FLOOR=3,u.ROUND_HALF_UP=4,u.ROUND_HALF_DOWN=5,u.ROUND_HALF_EVEN=6,u.ROUND_HALF_CEIL=7,u.ROUND_HALF_FLOOR=8,u.EUCLID=9,u.config=u.set=pv,u.clone=ra,u.isDecimal=ua,u.abs=tv,u.acos=nv,u.acosh=rv,u.add=uv,u.asin=iv,u.asinh=av,u.atan=ov,u.atanh=sv,u.atan2=cv,u.cbrt=lv,u.ceil=fv,u.clamp=hv,u.cos=dv,u.cosh=Dv,u.div=Ev,u.exp=vv,u.floor=gv,u.hypot=mv,u.ln=yv,u.log=Av,u.log10=Cv,u.log2=Fv,u.max=Bv,u.min=wv,u.mod=bv,u.mul=Sv,u.pow=Mv,u.random=Iv,u.round=_v,u.sign=Nv,u.sin=$v,u.sinh=Rv,u.sqrt=xv,u.sub=Ov,u.sum=Tv,u.tan=Pv,u.tanh=Lv,u.trunc=jv,e===void 0&&(e={}),e&&e.defaults!==!0)for(r=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],t=0;t<r.length;)e.hasOwnProperty(n=r[t++])||(e[n]=this[n]);return u.config(e),u}function Ev(e,t){return new this(e).div(t)}function vv(e){return new this(e).exp()}function gv(e){return P(e=new this(e),e.e+1,3)}function mv(){var e,t,n=new this(0);for(V=!1,e=0;e<arguments.length;)if(t=new this(arguments[e++]),t.d)n.d&&(n=n.plus(t.times(t)));else{if(t.s)return V=!0,new this(1/0);n=t}return V=!0,n.sqrt()}function ua(e){return e instanceof Nt||e&&e.toStringTag===Xi||!1}function yv(e){return new this(e).ln()}function Av(e,t){return new this(e).log(t)}function Fv(e){return new this(e).log(2)}function Cv(e){return new this(e).log(10)}function Bv(){return Yi(this,arguments,"lt")}function wv(){return Yi(this,arguments,"gt")}function bv(e,t){return new this(e).mod(t)}function Sv(e,t){return new this(e).mul(t)}function Mv(e,t){return new this(e).pow(t)}function Iv(e){var t,n,r,u,i=0,a=new this(1),s=[];if(e===void 0?e=this.precision:Be(e,1,ut),r=Math.ceil(e/j),this.crypto)if(crypto.getRandomValues)for(t=crypto.getRandomValues(new Uint32Array(r));i<r;)u=t[i],u>=429e7?t[i]=crypto.getRandomValues(new Uint32Array(1))[0]:s[i++]=u%1e7;else if(crypto.randomBytes){for(t=crypto.randomBytes(r*=4);i<r;)u=t[i]+(t[i+1]<<8)+(t[i+2]<<16)+((t[i+3]&127)<<24),u>=214e7?crypto.randomBytes(4).copy(t,i):(s.push(u%1e7),i+=4);i=r/4}else throw Error(Gi);else for(;i<r;)s[i++]=Math.random()*1e7|0;for(r=s[--i],e%=j,r&&e&&(u=ue(10,j-e),s[i]=(r/u|0)*u);s[i]===0;i--)s.pop();if(i<0)n=0,s=[0];else{for(n=-1;s[0]===0;n-=j)s.shift();for(r=1,u=s[0];u>=10;u/=10)r++;r<j&&(n-=j-r)}return a.e=n,a.d=s,a}function _v(e){return P(e=new this(e),e.e+1,this.rounding)}function Nv(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function $v(e){return new this(e).sin()}function Rv(e){return new this(e).sinh()}function xv(e){return new this(e).sqrt()}function Ov(e,t){return new this(e).sub(t)}function Tv(){var e=0,t=arguments,n=new this(t[e]);for(V=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return V=!0,P(n,this.precision,this.rounding)}function Pv(e){return new this(e).tan()}function Lv(e){return new this(e).tanh()}function jv(e){return P(e=new this(e),e.e+1,1)}B[Symbol.for("nodejs.util.inspect.custom")]=B.toString,B[Symbol.toStringTag]="Decimal";var Nt=B.constructor=ra(ru);Rn=new Nt(Rn),xn=new Nt(xn);var Vv="BigNumber",Uv=["?on","config"],qv=Ce(Vv,Uv,e=>{var{on:t,config:n}=e,r=Nt.clone({precision:n.precision,modulo:Nt.EUCLID});return r.prototype=Object.create(r.prototype),r.prototype.type="BigNumber",r.prototype.isBigNumber=!0,r.prototype.toJSON=function(){return{mathjs:"BigNumber",value:this.toString()}},r.fromJSON=function(u){return new r(u.value)},t&&t("config",function(u,i){u.precision!==i.precision&&r.config({precision:u.precision})}),r},{isClass:!0}),ia={exports:{}};/**
|
|
17
17
|
* @license Complex.js v2.1.1 12/05/2020
|
|
18
18
|
*
|
|
19
19
|
* Copyright (c) 2020, Robert Eisele (robert@xarg.org)
|
|
20
20
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
21
|
-
**/(function(e,t){(function(n){var r=Math.cosh||function(
|
|
22
|
-
`||(
|
|
21
|
+
**/(function(e,t){(function(n){var r=Math.cosh||function(o){return Math.abs(o)<1e-9?1-o:(Math.exp(o)+Math.exp(-o))*.5},u=Math.sinh||function(o){return Math.abs(o)<1e-9?o:(Math.exp(o)-Math.exp(-o))*.5},i=function(o){var h=Math.PI/4;if(-h>o||o>h)return Math.cos(o)-1;var p=o*o;return p*(p*(p*(p*(p*(p*(p*(p/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},a=function(o,h){var p=Math.abs(o),d=Math.abs(h);return p<3e3&&d<3e3?Math.sqrt(p*p+d*d):(p<d?(p=d,d=o/h):d=h/o,p*Math.sqrt(1+d*d))},s=function(){throw SyntaxError("Invalid Param")};function c(o,h){var p=Math.abs(o),d=Math.abs(h);return o===0?Math.log(d):h===0?Math.log(p):p<3e3&&d<3e3?Math.log(o*o+h*h)*.5:(o=o/2,h=h/2,.5*Math.log(o*o+h*h)+Math.LN2)}var l=function(o,h){var p={re:0,im:0};if(o==null)p.re=p.im=0;else if(h!==void 0)p.re=o,p.im=h;else switch(typeof o){case"object":if("im"in o&&"re"in o)p.re=o.re,p.im=o.im;else if("abs"in o&&"arg"in o){if(!Number.isFinite(o.abs)&&Number.isFinite(o.arg))return f.INFINITY;p.re=o.abs*Math.cos(o.arg),p.im=o.abs*Math.sin(o.arg)}else if("r"in o&&"phi"in o){if(!Number.isFinite(o.r)&&Number.isFinite(o.phi))return f.INFINITY;p.re=o.r*Math.cos(o.phi),p.im=o.r*Math.sin(o.phi)}else o.length===2?(p.re=o[0],p.im=o[1]):s();break;case"string":p.im=p.re=0;var d=o.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),D=1,v=0;d===null&&s();for(var E=0;E<d.length;E++){var y=d[E];y===" "||y===" "||y===`
|
|
22
|
+
`||(y==="+"?D++:y==="-"?v++:y==="i"||y==="I"?(D+v===0&&s(),d[E+1]!==" "&&!isNaN(d[E+1])?(p.im+=parseFloat((v%2?"-":"")+d[E+1]),E++):p.im+=parseFloat((v%2?"-":"")+"1"),D=v=0):((D+v===0||isNaN(y))&&s(),d[E+1]==="i"||d[E+1]==="I"?(p.im+=parseFloat((v%2?"-":"")+y),E++):p.re+=parseFloat((v%2?"-":"")+y),D=v=0))}D+v>0&&s();break;case"number":p.im=0,p.re=o;break;default:s()}return isNaN(p.re)||isNaN(p.im),p};function f(o,h){if(!(this instanceof f))return new f(o,h);var p=l(o,h);this.re=p.re,this.im=p.im}f.prototype={re:0,im:0,sign:function(){var o=this.abs();return new f(this.re/o,this.im/o)},add:function(o,h){var p=new f(o,h);return this.isInfinite()&&p.isInfinite()?f.NAN:this.isInfinite()||p.isInfinite()?f.INFINITY:new f(this.re+p.re,this.im+p.im)},sub:function(o,h){var p=new f(o,h);return this.isInfinite()&&p.isInfinite()?f.NAN:this.isInfinite()||p.isInfinite()?f.INFINITY:new f(this.re-p.re,this.im-p.im)},mul:function(o,h){var p=new f(o,h);return this.isInfinite()&&p.isZero()||this.isZero()&&p.isInfinite()?f.NAN:this.isInfinite()||p.isInfinite()?f.INFINITY:p.im===0&&this.im===0?new f(this.re*p.re,0):new f(this.re*p.re-this.im*p.im,this.re*p.im+this.im*p.re)},div:function(o,h){var p=new f(o,h);if(this.isZero()&&p.isZero()||this.isInfinite()&&p.isInfinite())return f.NAN;if(this.isInfinite()||p.isZero())return f.INFINITY;if(this.isZero()||p.isInfinite())return f.ZERO;o=this.re,h=this.im;var d=p.re,D=p.im,v,E;return D===0?new f(o/d,h/d):Math.abs(d)<Math.abs(D)?(E=d/D,v=d*E+D,new f((o*E+h)/v,(h*E-o)/v)):(E=D/d,v=D*E+d,new f((o+h*E)/v,(h-o*E)/v))},pow:function(o,h){var p=new f(o,h);if(o=this.re,h=this.im,p.isZero())return f.ONE;if(p.im===0){if(h===0&&o>0)return new f(Math.pow(o,p.re),0);if(o===0)switch((p.re%4+4)%4){case 0:return new f(Math.pow(h,p.re),0);case 1:return new f(0,Math.pow(h,p.re));case 2:return new f(-Math.pow(h,p.re),0);case 3:return new f(0,-Math.pow(h,p.re))}}if(o===0&&h===0&&p.re>0&&p.im>=0)return f.ZERO;var d=Math.atan2(h,o),D=c(o,h);return o=Math.exp(p.re*D-p.im*d),h=p.im*D+p.re*d,new f(o*Math.cos(h),o*Math.sin(h))},sqrt:function(){var o=this.re,h=this.im,p=this.abs(),d,D;if(o>=0){if(h===0)return new f(Math.sqrt(o),0);d=.5*Math.sqrt(2*(p+o))}else d=Math.abs(h)/Math.sqrt(2*(p-o));return o<=0?D=.5*Math.sqrt(2*(p-o)):D=Math.abs(h)/Math.sqrt(2*(p+o)),new f(d,h<0?-D:D)},exp:function(){var o=Math.exp(this.re);return this.im,new f(o*Math.cos(this.im),o*Math.sin(this.im))},expm1:function(){var o=this.re,h=this.im;return new f(Math.expm1(o)*Math.cos(h)+i(h),Math.exp(o)*Math.sin(h))},log:function(){var o=this.re,h=this.im;return new f(c(o,h),Math.atan2(h,o))},abs:function(){return a(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var o=this.re,h=this.im;return new f(Math.sin(o)*r(h),Math.cos(o)*u(h))},cos:function(){var o=this.re,h=this.im;return new f(Math.cos(o)*r(h),-Math.sin(o)*u(h))},tan:function(){var o=2*this.re,h=2*this.im,p=Math.cos(o)+r(h);return new f(Math.sin(o)/p,u(h)/p)},cot:function(){var o=2*this.re,h=2*this.im,p=Math.cos(o)-r(h);return new f(-Math.sin(o)/p,u(h)/p)},sec:function(){var o=this.re,h=this.im,p=.5*r(2*h)+.5*Math.cos(2*o);return new f(Math.cos(o)*r(h)/p,Math.sin(o)*u(h)/p)},csc:function(){var o=this.re,h=this.im,p=.5*r(2*h)-.5*Math.cos(2*o);return new f(Math.sin(o)*r(h)/p,-Math.cos(o)*u(h)/p)},asin:function(){var o=this.re,h=this.im,p=new f(h*h-o*o+1,-2*o*h).sqrt(),d=new f(p.re-h,p.im+o).log();return new f(d.im,-d.re)},acos:function(){var o=this.re,h=this.im,p=new f(h*h-o*o+1,-2*o*h).sqrt(),d=new f(p.re-h,p.im+o).log();return new f(Math.PI/2-d.im,d.re)},atan:function(){var o=this.re,h=this.im;if(o===0){if(h===1)return new f(0,1/0);if(h===-1)return new f(0,-1/0)}var p=o*o+(1-h)*(1-h),d=new f((1-h*h-o*o)/p,-2*o/p).log();return new f(-.5*d.im,.5*d.re)},acot:function(){var o=this.re,h=this.im;if(h===0)return new f(Math.atan2(1,o),0);var p=o*o+h*h;return p!==0?new f(o/p,-h/p).atan():new f(o!==0?o/0:0,h!==0?-h/0:0).atan()},asec:function(){var o=this.re,h=this.im;if(o===0&&h===0)return new f(0,1/0);var p=o*o+h*h;return p!==0?new f(o/p,-h/p).acos():new f(o!==0?o/0:0,h!==0?-h/0:0).acos()},acsc:function(){var o=this.re,h=this.im;if(o===0&&h===0)return new f(Math.PI/2,1/0);var p=o*o+h*h;return p!==0?new f(o/p,-h/p).asin():new f(o!==0?o/0:0,h!==0?-h/0:0).asin()},sinh:function(){var o=this.re,h=this.im;return new f(u(o)*Math.cos(h),r(o)*Math.sin(h))},cosh:function(){var o=this.re,h=this.im;return new f(r(o)*Math.cos(h),u(o)*Math.sin(h))},tanh:function(){var o=2*this.re,h=2*this.im,p=r(o)+Math.cos(h);return new f(u(o)/p,Math.sin(h)/p)},coth:function(){var o=2*this.re,h=2*this.im,p=r(o)-Math.cos(h);return new f(u(o)/p,-Math.sin(h)/p)},csch:function(){var o=this.re,h=this.im,p=Math.cos(2*h)-r(2*o);return new f(-2*u(o)*Math.cos(h)/p,2*r(o)*Math.sin(h)/p)},sech:function(){var o=this.re,h=this.im,p=Math.cos(2*h)+r(2*o);return new f(2*r(o)*Math.cos(h)/p,-2*u(o)*Math.sin(h)/p)},asinh:function(){var o=this.im;this.im=-this.re,this.re=o;var h=this.asin();return this.re=-this.im,this.im=o,o=h.re,h.re=-h.im,h.im=o,h},acosh:function(){var o=this.acos();if(o.im<=0){var h=o.re;o.re=-o.im,o.im=h}else{var h=o.im;o.im=-o.re,o.re=h}return o},atanh:function(){var o=this.re,h=this.im,p=o>1&&h===0,d=1-o,D=1+o,v=d*d+h*h,E=v!==0?new f((D*d-h*h)/v,(h*d+D*h)/v):new f(o!==-1?o/0:0,h!==0?h/0:0),y=E.re;return E.re=c(E.re,E.im)/2,E.im=Math.atan2(E.im,y)/2,p&&(E.im=-E.im),E},acoth:function(){var o=this.re,h=this.im;if(o===0&&h===0)return new f(0,Math.PI/2);var p=o*o+h*h;return p!==0?new f(o/p,-h/p).atanh():new f(o!==0?o/0:0,h!==0?-h/0:0).atanh()},acsch:function(){var o=this.re,h=this.im;if(h===0)return new f(o!==0?Math.log(o+Math.sqrt(o*o+1)):1/0,0);var p=o*o+h*h;return p!==0?new f(o/p,-h/p).asinh():new f(o!==0?o/0:0,h!==0?-h/0:0).asinh()},asech:function(){var o=this.re,h=this.im;if(this.isZero())return f.INFINITY;var p=o*o+h*h;return p!==0?new f(o/p,-h/p).acosh():new f(o!==0?o/0:0,h!==0?-h/0:0).acosh()},inverse:function(){if(this.isZero())return f.INFINITY;if(this.isInfinite())return f.ZERO;var o=this.re,h=this.im,p=o*o+h*h;return new f(o/p,-h/p)},conjugate:function(){return new f(this.re,-this.im)},neg:function(){return new f(-this.re,-this.im)},ceil:function(o){return o=Math.pow(10,o||0),new f(Math.ceil(this.re*o)/o,Math.ceil(this.im*o)/o)},floor:function(o){return o=Math.pow(10,o||0),new f(Math.floor(this.re*o)/o,Math.floor(this.im*o)/o)},round:function(o){return o=Math.pow(10,o||0),new f(Math.round(this.re*o)/o,Math.round(this.im*o)/o)},equals:function(o,h){var p=new f(o,h);return Math.abs(p.re-this.re)<=f.EPSILON&&Math.abs(p.im-this.im)<=f.EPSILON},clone:function(){return new f(this.re,this.im)},toString:function(){var o=this.re,h=this.im,p="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(o)<f.EPSILON&&(o=0),Math.abs(h)<f.EPSILON&&(h=0),h===0?p+o:(o!==0?(p+=o,p+=" ",h<0?(h=-h,p+="-"):p+="+",p+=" "):h<0&&(h=-h,p+="-"),h!==1&&(p+=h),p+"i"))},toVector:function(){return[this.re,this.im]},valueOf:function(){return this.im===0?this.re:null},isNaN:function(){return isNaN(this.re)||isNaN(this.im)},isZero:function(){return this.im===0&&this.re===0},isFinite:function(){return isFinite(this.re)&&isFinite(this.im)},isInfinite:function(){return!(this.isNaN()||this.isFinite())}},f.ZERO=new f(0,0),f.ONE=new f(1,0),f.I=new f(0,1),f.PI=new f(Math.PI,0),f.E=new f(Math.E,0),f.INFINITY=new f(1/0,1/0),f.NAN=new f(NaN,NaN),f.EPSILON=1e-15,Object.defineProperty(f,"__esModule",{value:!0}),f.default=f,f.Complex=f,e.exports=f})()})(ia);var le=Cu(ia.exports),kv="Complex",Hv=[],zv=Ce(kv,Hv,()=>(Object.defineProperty(le,"name",{value:"Complex"}),le.prototype.constructor=le,le.prototype.type="Complex",le.prototype.isComplex=!0,le.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},le.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},le.prototype.format=function(e){var t="",n=this.im,r=this.re,u=Zr(this.re,e),i=Zr(this.im,e),a=me(e)?e:e?e.precision:null;if(a!==null){var s=Math.pow(10,-a);Math.abs(r/n)<s&&(r=0),Math.abs(n/r)<s&&(n=0)}return n===0?t=u:r===0?n===1?t="i":n===-1?t="-i":t=i+"i":n<0?n===-1?t=u+" - i":t=u+" - "+i.substring(1)+"i":n===1?t=u+" + i":t=u+" + "+i+"i",t},le.fromPolar=function(e){switch(arguments.length){case 1:{var t=arguments[0];if(typeof t=="object")return le(t);throw new TypeError("Input has to be an object with r and phi keys.")}case 2:{var n=arguments[0],r=arguments[1];if(me(n)){if(wi(r)&&r.hasBase("ANGLE")&&(r=r.toNumber("rad")),me(r))return new le({r:n,phi:r});throw new TypeError("Phi is not a number nor an angle unit.")}else throw new TypeError("Radius r is not a number.")}default:throw new SyntaxError("Wrong number of arguments in function fromPolar")}},le.prototype.valueOf=le.prototype.toString,le.fromJSON=function(e){return new le(e)},le.compare=function(e,t){return e.re>t.re?1:e.re<t.re?-1:e.im>t.im?1:e.im<t.im?-1:0},le),{isClass:!0}),aa={exports:{}};/**
|
|
23
23
|
* @license Fraction.js v4.2.0 05/03/2022
|
|
24
24
|
* https://www.xarg.org/2014/03/rational-numbers-in-javascript/
|
|
25
25
|
*
|
|
26
26
|
* Copyright (c) 2021, Robert Eisele (robert@xarg.org)
|
|
27
27
|
* Dual licensed under the MIT or GPL Version 2 licenses.
|
|
28
|
-
**/(function(e,t){(function(n){var r=2e3,u={s:1,n:0,d:1};function o(D,g){if(isNaN(D=parseInt(D,10)))throw p.InvalidParameter;return D*g}function a(D,g){if(g===0)throw p.DivisionByZero;var y=Object.create(p.prototype);y.s=D<0?-1:1,D=D<0?-D:D;var v=h(D,g);return y.n=D/v,y.d=g/v,y}function l(D){for(var g={},y=D,v=2,A=4;A<=y;){for(;y%v===0;)y/=v,g[v]=(g[v]||0)+1;A+=1+2*v++}return y!==D?y>1&&(g[y]=(g[y]||0)+1):g[D]=(g[D]||0)+1,g}var c=function(D,g){var y=0,v=1,A=1,S=0,F=0,R=0,P=1,T=1,_=0,$=1,Z=1,V=1,Y=1e7,Q;if(D!=null)if(g!==void 0){if(y=D,v=g,A=y*v,y%1!==0||v%1!==0)throw p.NonIntegerParameter}else switch(typeof D){case"object":{if("d"in D&&"n"in D)y=D.n,v=D.d,"s"in D&&(y*=D.s);else if(0 in D)y=D[0],1 in D&&(v=D[1]);else throw p.InvalidParameter;A=y*v;break}case"number":{if(D<0&&(A=D,D=-D),D%1===0)y=D;else if(D>0){for(D>=1&&(T=Math.pow(10,Math.floor(1+Math.log(D)/Math.LN10)),D/=T);$<=Y&&V<=Y;)if(Q=(_+Z)/($+V),D===Q){$+V<=Y?(y=_+Z,v=$+V):V>$?(y=Z,v=V):(y=_,v=$);break}else D>Q?(_+=Z,$+=V):(Z+=_,V+=$),$>Y?(y=Z,v=V):(y=_,v=$);y*=T}else(isNaN(D)||isNaN(g))&&(v=y=NaN);break}case"string":{if($=D.match(/\d+|./g),$===null)throw p.InvalidParameter;if($[_]==="-"?(A=-1,_++):$[_]==="+"&&_++,$.length===_+1?F=o($[_++],A):$[_+1]==="."||$[_]==="."?($[_]!=="."&&(S=o($[_++],A)),_++,(_+1===$.length||$[_+1]==="("&&$[_+3]===")"||$[_+1]==="'"&&$[_+3]==="'")&&(F=o($[_],A),P=Math.pow(10,$[_].length),_++),($[_]==="("&&$[_+2]===")"||$[_]==="'"&&$[_+2]==="'")&&(R=o($[_+1],A),T=Math.pow(10,$[_+1].length)-1,_+=3)):$[_+1]==="/"||$[_+1]===":"?(F=o($[_],A),P=o($[_+2],1),_+=3):$[_+3]==="/"&&$[_+1]===" "&&(S=o($[_],A),F=o($[_+2],A),P=o($[_+4],1),_+=5),$.length<=_){v=P*T,A=y=R+v*S+T*F;break}}default:throw p.InvalidParameter}if(v===0)throw p.DivisionByZero;u.s=A<0?-1:1,u.n=Math.abs(y),u.d=Math.abs(v)};function d(D,g,y){for(var v=1;g>0;D=D*D%y,g>>=1)g&1&&(v=v*D%y);return v}function f(D,g){for(;g%2===0;g/=2);for(;g%5===0;g/=5);if(g===1)return 0;for(var y=10%g,v=1;y!==1;v++)if(y=y*10%g,v>r)return 0;return v}function s(D,g,y){for(var v=1,A=d(10,y,g),S=0;S<300;S++){if(v===A)return S;v=v*10%g,A=A*10%g}return 0}function h(D,g){if(!D)return g;if(!g)return D;for(;;){if(D%=g,!D)return g;if(g%=D,!g)return D}}function p(D,g){if(c(D,g),this instanceof p)D=h(u.d,u.n),this.s=u.s,this.n=u.n/D,this.d=u.d/D;else return a(u.s*u.n,u.d)}p.DivisionByZero=new Error("Division by Zero"),p.InvalidParameter=new Error("Invalid argument"),p.NonIntegerParameter=new Error("Parameters must be integer"),p.prototype={s:1,n:0,d:1,abs:function(){return a(this.n,this.d)},neg:function(){return a(-this.s*this.n,this.d)},add:function(D,g){return c(D,g),a(this.s*this.n*u.d+u.s*this.d*u.n,this.d*u.d)},sub:function(D,g){return c(D,g),a(this.s*this.n*u.d-u.s*this.d*u.n,this.d*u.d)},mul:function(D,g){return c(D,g),a(this.s*u.s*this.n*u.n,this.d*u.d)},div:function(D,g){return c(D,g),a(this.s*u.s*this.n*u.d,this.d*u.n)},clone:function(){return a(this.s*this.n,this.d)},mod:function(D,g){if(isNaN(this.n)||isNaN(this.d))return new p(NaN);if(D===void 0)return a(this.s*this.n%this.d,1);if(c(D,g),u.n===0&&this.d===0)throw p.DivisionByZero;return a(this.s*(u.d*this.n)%(u.n*this.d),u.d*this.d)},gcd:function(D,g){return c(D,g),a(h(u.n,this.n)*h(u.d,this.d),u.d*this.d)},lcm:function(D,g){return c(D,g),u.n===0&&this.n===0?a(0,1):a(u.n*this.n,h(u.n,this.n)*h(u.d,this.d))},ceil:function(D){return D=Math.pow(10,D||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.ceil(D*this.s*this.n/this.d),D)},floor:function(D){return D=Math.pow(10,D||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.floor(D*this.s*this.n/this.d),D)},round:function(D){return D=Math.pow(10,D||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.round(D*this.s*this.n/this.d),D)},inverse:function(){return a(this.s*this.d,this.n)},pow:function(D,g){if(c(D,g),u.d===1)return u.s<0?a(Math.pow(this.s*this.d,u.n),Math.pow(this.n,u.n)):a(Math.pow(this.s*this.n,u.n),Math.pow(this.d,u.n));if(this.s<0)return null;var y=l(this.n),v=l(this.d),A=1,S=1;for(var F in y)if(F!=="1"){if(F==="0"){A=0;break}if(y[F]*=u.n,y[F]%u.d===0)y[F]/=u.d;else return null;A*=Math.pow(F,y[F])}for(var F in v)if(F!=="1"){if(v[F]*=u.n,v[F]%u.d===0)v[F]/=u.d;else return null;S*=Math.pow(F,v[F])}return u.s<0?a(S,A):a(A,S)},equals:function(D,g){return c(D,g),this.s*this.n*u.d===u.s*u.n*this.d},compare:function(D,g){c(D,g);var y=this.s*this.n*u.d-u.s*u.n*this.d;return(0<y)-(y<0)},simplify:function(D){if(isNaN(this.n)||isNaN(this.d))return this;D=D||.001;for(var g=this.abs(),y=g.toContinued(),v=1;v<y.length;v++){for(var A=a(y[v-1],1),S=v-2;S>=0;S--)A=A.inverse().add(y[S]);if(A.sub(g).abs().valueOf()<D)return A.mul(this.s)}return this},divisible:function(D,g){return c(D,g),!(!(u.n*this.d)||this.n*u.d%(u.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(D){var g,y="",v=this.n,A=this.d;return this.s<0&&(y+="-"),A===1?y+=v:(D&&(g=Math.floor(v/A))>0&&(y+=g,y+=" ",v%=A),y+=v,y+="/",y+=A),y},toLatex:function(D){var g,y="",v=this.n,A=this.d;return this.s<0&&(y+="-"),A===1?y+=v:(D&&(g=Math.floor(v/A))>0&&(y+=g,v%=A),y+="\\frac{",y+=v,y+="}{",y+=A,y+="}"),y},toContinued:function(){var D,g=this.n,y=this.d,v=[];if(isNaN(g)||isNaN(y))return v;do v.push(Math.floor(g/y)),D=g%y,g=y,y=D;while(g!==1);return v},toString:function(D){var g=this.n,y=this.d;if(isNaN(g)||isNaN(y))return"NaN";D=D||15;var v=f(g,y),A=s(g,y,v),S=this.s<0?"-":"";if(S+=g/y|0,g%=y,g*=10,g&&(S+="."),v){for(var F=A;F--;)S+=g/y|0,g%=y,g*=10;S+="(";for(var F=v;F--;)S+=g/y|0,g%=y,g*=10;S+=")"}else for(var F=D;g&&F--;)S+=g/y|0,g%=y,g*=10;return S}},Object.defineProperty(p,"__esModule",{value:!0}),p.default=p,p.Fraction=p,e.exports=p})()})(Pi);var Qe=iu(Pi.exports),lp="Fraction",hp=[],dp=Ae(lp,hp,()=>(Object.defineProperty(Qe,"name",{value:"Fraction"}),Qe.prototype.constructor=Qe,Qe.prototype.type="Fraction",Qe.prototype.isFraction=!0,Qe.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},Qe.fromJSON=function(e){return new Qe(e)},Qe),{isClass:!0}),pp="Matrix",Dp=[],gp=Ae(pp,Dp,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(t,n){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(t,n,r){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(t){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(t,n,r){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(t,n){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(t,n){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(t,n){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(t){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(t){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});function vp(e){return Object.keys(e.signatures||{}).reduce(function(t,n){var r=(n.match(/,/g)||[]).length+1;return Math.max(t,r)},-1)}var mp="DenseMatrix",yp=["Matrix"],Ep=Ae(mp,yp,e=>{var{Matrix:t}=e;function n(f,s){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(s&&!An(s))throw new Error("Invalid datatype: "+s);if(zt(f))f.type==="DenseMatrix"?(this._data=ht(f._data),this._size=ht(f._size),this._datatype=s||f._datatype):(this._data=f.toArray(),this._size=f.size(),this._datatype=s||f._datatype);else if(f&&Me(f.data)&&Me(f.size))this._data=f.data,this._size=f.size,di(this._data,this._size),this._datatype=s||f.datatype;else if(Me(f))this._data=d(f),this._size=Pr(this._data),di(this._data,this._size),this._datatype=s;else{if(f)throw new TypeError("Unsupported type of data ("+Ir(f)+")");this._data=[],this._size=[0],this._datatype=s}}n.prototype=new t,n.prototype.createDenseMatrix=function(f,s){return new n(f,s)},Object.defineProperty(n,"name",{value:"DenseMatrix"}),n.prototype.constructor=n,n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return Lr(this._data,Ir)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(f,s){return new n(f,s)},n.prototype.subset=function(f,s,h){switch(arguments.length){case 1:return r(this,f);case 2:case 3:return o(this,f,s,h);default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.get=function(f){if(!Me(f))throw new TypeError("Array expected");if(f.length!==this._size.length)throw new se(f.length,this._size.length);for(var s=0;s<f.length;s++)Ie(f[s],this._size[s]);for(var h=this._data,p=0,D=f.length;p<D;p++){var g=f[p];Ie(g,h.length),h=h[g]}return h},n.prototype.set=function(f,s,h){if(!Me(f))throw new TypeError("Array expected");if(f.length<this._size.length)throw new se(f.length,this._size.length,"<");var p,D,g,y=f.map(function(A){return A+1});c(this,y,h);var v=this._data;for(p=0,D=f.length-1;p<D;p++)g=f[p],Ie(g,v.length),v=v[g];return g=f[f.length-1],Ie(g,v.length),v[g]=s,this};function r(f,s){if(!ni(s))throw new TypeError("Invalid index");var h=s.isScalar();if(h)return f.get(s.min());var p=s.size();if(p.length!==f._size.length)throw new se(p.length,f._size.length);for(var D=s.min(),g=s.max(),y=0,v=f._size.length;y<v;y++)Ie(D[y],f._size[y]),Ie(g[y],f._size[y]);return new n(u(f._data,s,p.length,0),f._datatype)}function u(f,s,h,p){var D=p===h-1,g=s.dimension(p);return D?g.map(function(y){return Ie(y,f.length),f[y]}).valueOf():g.map(function(y){Ie(y,f.length);var v=f[y];return u(v,s,h,p+1)}).valueOf()}function o(f,s,h,p){if(!s||s.isIndex!==!0)throw new TypeError("Invalid index");var D=s.size(),g=s.isScalar(),y;if(zt(h)?(y=h.size(),h=h.valueOf()):y=Pr(h),g){if(y.length!==0)throw new TypeError("Scalar expected");f.set(s.min(),h,p)}else{if(D.length<f._size.length)throw new se(D.length,f._size.length,"<");if(y.length<D.length){for(var v=0,A=0;D[v]===1&&y[v]===1;)v++;for(;D[v]===1;)A++,v++;h=Gh(h,D.length,A,y)}if(!Or(D,y))throw new se(D,y,">");var S=s.max().map(function(P){return P+1});c(f,S,p);var F=D.length,R=0;a(f._data,s,h,F,R)}return f}function a(f,s,h,p,D){var g=D===p-1,y=s.dimension(D);g?y.forEach(function(v,A){Ie(v),f[v]=h[A[0]]}):y.forEach(function(v,A){Ie(v),a(f[v],s,h[A[0]],p,D+1)})}n.prototype.resize=function(f,s,h){if(!_r(f))throw new TypeError("Array or Matrix expected");var p=f.valueOf().map(g=>Array.isArray(g)&&g.length===1?g[0]:g),D=h?this.clone():this;return l(D,p,s)};function l(f,s,h){if(s.length===0){for(var p=f._data;Me(p);)p=p[0];return p}return f._size=s.slice(0),f._data=pi(f._data,f._size,h),f}n.prototype.reshape=function(f,s){var h=s?this.clone():this;h._data=Xh(h._data,f);var p=h._size.reduce((D,g)=>D*g);return h._size=Di(f,p),h};function c(f,s,h){for(var p=f._size.slice(0),D=!1;p.length<s.length;)p.push(0),D=!0;for(var g=0,y=s.length;g<y;g++)s[g]>p[g]&&(p[g]=s[g],D=!0);D&&l(f,p,h)}n.prototype.clone=function(){var f=new n({data:ht(this._data),size:ht(this._size),datatype:this._datatype});return f},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(f){var s=this,h=vp(f),p=function y(v,A){return Me(v)?v.map(function(S,F){return y(S,A.concat(F))}):h===1?f(v):h===2?f(v,A):f(v,A,s)},D=p(this._data,[]),g=this._datatype!==void 0?Lr(D,Ir):void 0;return new n(D,g)},n.prototype.forEach=function(f){var s=this,h=function p(D,g){Me(D)?D.forEach(function(y,v){p(y,g.concat(v))}):f(D,g,s)};h(this._data,[])},n.prototype[Symbol.iterator]=function*(){var f=function*s(h,p){if(Me(h))for(var D=0;D<h.length;D++)yield*s(h[D],p.concat(D));else yield{value:h,index:p}};yield*f(this._data,[])},n.prototype.rows=function(){var f=[],s=this.size();if(s.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");var h=this._data;for(var p of h)f.push(new n([p],this._datatype));return f},n.prototype.columns=function(){var f=this,s=[],h=this.size();if(h.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var p=this._data,D=function(v){var A=p.map(S=>[S[v]]);s.push(new n(A,f._datatype))},g=0;g<h[1];g++)D(g);return s},n.prototype.toArray=function(){return ht(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(f){return dt(this._data,f)},n.prototype.toString=function(){return dt(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(f){if(f){if(ut(f)&&(f=f.toNumber()),!ve(f)||!We(f))throw new TypeError("The parameter k must be an integer number")}else f=0;for(var s=f>0?f:0,h=f<0?-f:0,p=this._size[0],D=this._size[1],g=Math.min(p-h,D-s),y=[],v=0;v<g;v++)y[v]=this._data[v+h][v+s];return new n({data:y,size:[g],datatype:this._datatype})},n.diagonal=function(f,s,h,p){if(!Me(f))throw new TypeError("Array expected, size parameter");if(f.length!==2)throw new Error("Only two dimensions matrix are supported");if(f=f.map(function(T){if(ut(T)&&(T=T.toNumber()),!ve(T)||!We(T)||T<1)throw new Error("Size values must be positive integers");return T}),h){if(ut(h)&&(h=h.toNumber()),!ve(h)||!We(h))throw new TypeError("The parameter k must be an integer number")}else h=0;var D=h>0?h:0,g=h<0?-h:0,y=f[0],v=f[1],A=Math.min(y-g,v-D),S;if(Me(s)){if(s.length!==A)throw new Error("Invalid value array length");S=function(_){return s[_]}}else if(zt(s)){var F=s.size();if(F.length!==1||F[0]!==A)throw new Error("Invalid matrix length");S=function(_){return s.get([_])}}else S=function(){return s};p||(p=ut(S(0))?S(0).mul(0):0);var R=[];if(f.length>0){R=pi(R,f,p);for(var P=0;P<A;P++)R[P+g][P+D]=S(P)}return new n({data:R,size:[y,v]})},n.fromJSON=function(f){return new n(f)},n.prototype.swapRows=function(f,s){if(!ve(f)||!We(f)||!ve(s)||!We(s))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return Ie(f,this._size[0]),Ie(s,this._size[0]),n._swapRows(f,s,this._data),this},n._swapRows=function(f,s,h){var p=h[f];h[f]=h[s],h[s]=p};function d(f){for(var s=0,h=f.length;s<h;s++){var p=f[s];Me(p)?f[s]=d(p):p&&p.isMatrix===!0&&(f[s]=d(p.valueOf()))}return f}return n},{isClass:!0}),Ti="equalScalar";Ae(Ti,["typed","config"],e=>{var{typed:t,config:n}=e;return t(Ti,{"number, number":function(u,o){return Vh(u,o,n.epsilon)}})});function Zt(e,t,n,r){if(!(this instanceof Zt))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=r,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(r!=null?"-"+r:"")+" expected)",this.stack=new Error().stack}Zt.prototype=new Error,Zt.prototype.constructor=Error,Zt.prototype.name="ArgumentsError",Zt.prototype.isArgumentsError=!0;var Li="format",Ap=["typed"],Cp=Ae(Li,Ap,e=>{var{typed:t}=e;return t(Li,{any:dt,"any, Object | function | number":dt})}),ji="bin",Fp=["typed","format"];Ae(ji,Fp,e=>{var{typed:t,format:n}=e;return t(ji,{"number | BigNumber":function(u){return n(u,{notation:"bin"})},"number | BigNumber, number":function(u,o){return n(u,{notation:"bin",wordSize:o})}})});var qi="oct",wp=["typed","format"];Ae(qi,wp,e=>{var{typed:t,format:n}=e;return t(qi,{"number | BigNumber":function(u){return n(u,{notation:"oct"})},"number | BigNumber, number":function(u,o){return n(u,{notation:"oct",wordSize:o})}})});var ki="hex",Bp=["typed","format"];Ae(ki,Bp,e=>{var{typed:t,format:n}=e;return t(ki,{"number | BigNumber":function(u){return n(u,{notation:"hex"})},"number | BigNumber, number":function(u,o){return n(u,{notation:"hex",wordSize:o})}})});var Vi="equal";Ae(Vi,["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return t(Vi,{"any, any":function(u,o){return u===null?o===null:o===null?u===null:u===void 0?o===void 0:o===void 0?u===void 0:n(u,o)}})});var Ui="unequal";Ae(Ui,["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return t(Ui,{"any, any":function(u,o){return u===null?o!==null:o===null?u!==null:u===void 0?o!==void 0:o===void 0?u!==void 0:!n(u,o)}})});var Hi={exports:{}};(function(e){(function(t,n,r){function u(c){var d=this,f=l();d.next=function(){var s=2091639*d.s0+d.c*23283064365386963e-26;return d.s0=d.s1,d.s1=d.s2,d.s2=s-(d.c=s|0)},d.c=1,d.s0=f(" "),d.s1=f(" "),d.s2=f(" "),d.s0-=f(c),d.s0<0&&(d.s0+=1),d.s1-=f(c),d.s1<0&&(d.s1+=1),d.s2-=f(c),d.s2<0&&(d.s2+=1),f=null}function o(c,d){return d.c=c.c,d.s0=c.s0,d.s1=c.s1,d.s2=c.s2,d}function a(c,d){var f=new u(c),s=d&&d.state,h=f.next;return h.int32=function(){return f.next()*4294967296|0},h.double=function(){return h()+(h()*2097152|0)*11102230246251565e-32},h.quick=h,s&&(typeof s=="object"&&o(s,f),h.state=function(){return o(f,{})}),h}function l(){var c=4022871197,d=function(f){f=String(f);for(var s=0;s<f.length;s++){c+=f.charCodeAt(s);var h=.02519603282416938*c;c=h>>>0,h-=c,h*=c,c=h>>>0,h-=c,c+=h*4294967296}return(c>>>0)*23283064365386963e-26};return d}n&&n.exports?n.exports=a:r&&r.amd?r(function(){return a}):this.alea=a})(et,e,!1)})(Hi);var zi={exports:{}};(function(e){(function(t,n,r){function u(l){var c=this,d="";c.x=0,c.y=0,c.z=0,c.w=0,c.next=function(){var s=c.x^c.x<<11;return c.x=c.y,c.y=c.z,c.z=c.w,c.w^=c.w>>>19^s^s>>>8},l===(l|0)?c.x=l:d+=l;for(var f=0;f<d.length+64;f++)c.x^=d.charCodeAt(f)|0,c.next()}function o(l,c){return c.x=l.x,c.y=l.y,c.z=l.z,c.w=l.w,c}function a(l,c){var d=new u(l),f=c&&c.state,s=function(){return(d.next()>>>0)/4294967296};return s.double=function(){do var h=d.next()>>>11,p=(d.next()>>>0)/4294967296,D=(h+p)/(1<<21);while(D===0);return D},s.int32=d.next,s.quick=s,f&&(typeof f=="object"&&o(f,d),s.state=function(){return o(d,{})}),s}n&&n.exports?n.exports=a:r&&r.amd?r(function(){return a}):this.xor128=a})(et,e,!1)})(zi);var Wi={exports:{}};(function(e){(function(t,n,r){function u(l){var c=this,d="";c.next=function(){var s=c.x^c.x>>>2;return c.x=c.y,c.y=c.z,c.z=c.w,c.w=c.v,(c.d=c.d+362437|0)+(c.v=c.v^c.v<<4^(s^s<<1))|0},c.x=0,c.y=0,c.z=0,c.w=0,c.v=0,l===(l|0)?c.x=l:d+=l;for(var f=0;f<d.length+64;f++)c.x^=d.charCodeAt(f)|0,f==d.length&&(c.d=c.x<<10^c.x>>>4),c.next()}function o(l,c){return c.x=l.x,c.y=l.y,c.z=l.z,c.w=l.w,c.v=l.v,c.d=l.d,c}function a(l,c){var d=new u(l),f=c&&c.state,s=function(){return(d.next()>>>0)/4294967296};return s.double=function(){do var h=d.next()>>>11,p=(d.next()>>>0)/4294967296,D=(h+p)/(1<<21);while(D===0);return D},s.int32=d.next,s.quick=s,f&&(typeof f=="object"&&o(f,d),s.state=function(){return o(d,{})}),s}n&&n.exports?n.exports=a:r&&r.amd?r(function(){return a}):this.xorwow=a})(et,e,!1)})(Wi);var Zi={exports:{}};(function(e){(function(t,n,r){function u(l){var c=this;c.next=function(){var f=c.x,s=c.i,h,p;return h=f[s],h^=h>>>7,p=h^h<<24,h=f[s+1&7],p^=h^h>>>10,h=f[s+3&7],p^=h^h>>>3,h=f[s+4&7],p^=h^h<<7,h=f[s+7&7],h=h^h<<13,p^=h^h<<9,f[s]=p,c.i=s+1&7,p};function d(f,s){var h,p=[];if(s===(s|0))p[0]=s;else for(s=""+s,h=0;h<s.length;++h)p[h&7]=p[h&7]<<15^s.charCodeAt(h)+p[h+1&7]<<13;for(;p.length<8;)p.push(0);for(h=0;h<8&&p[h]===0;++h);for(h==8?p[7]=-1:p[h],f.x=p,f.i=0,h=256;h>0;--h)f.next()}d(c,l)}function o(l,c){return c.x=l.x.slice(),c.i=l.i,c}function a(l,c){l==null&&(l=+new Date);var d=new u(l),f=c&&c.state,s=function(){return(d.next()>>>0)/4294967296};return s.double=function(){do var h=d.next()>>>11,p=(d.next()>>>0)/4294967296,D=(h+p)/(1<<21);while(D===0);return D},s.int32=d.next,s.quick=s,f&&(f.x&&o(f,d),s.state=function(){return o(d,{})}),s}n&&n.exports?n.exports=a:r&&r.amd?r(function(){return a}):this.xorshift7=a})(et,e,!1)})(Zi);var Xi={exports:{}};(function(e){(function(t,n,r){function u(l){var c=this;c.next=function(){var f=c.w,s=c.X,h=c.i,p,D;return c.w=f=f+1640531527|0,D=s[h+34&127],p=s[h=h+1&127],D^=D<<13,p^=p<<17,D^=D>>>15,p^=p>>>12,D=s[h]=D^p,c.i=h,D+(f^f>>>16)|0};function d(f,s){var h,p,D,g,y,v=[],A=128;for(s===(s|0)?(p=s,s=null):(s=s+"\0",p=0,A=Math.max(A,s.length)),D=0,g=-32;g<A;++g)s&&(p^=s.charCodeAt((g+32)%s.length)),g===0&&(y=p),p^=p<<10,p^=p>>>15,p^=p<<4,p^=p>>>13,g>=0&&(y=y+1640531527|0,h=v[g&127]^=p+y,D=h==0?D+1:0);for(D>=128&&(v[(s&&s.length||0)&127]=-1),D=127,g=4*128;g>0;--g)p=v[D+34&127],h=v[D=D+1&127],p^=p<<13,h^=h<<17,p^=p>>>15,h^=h>>>12,v[D]=p^h;f.w=y,f.X=v,f.i=D}d(c,l)}function o(l,c){return c.i=l.i,c.w=l.w,c.X=l.X.slice(),c}function a(l,c){l==null&&(l=+new Date);var d=new u(l),f=c&&c.state,s=function(){return(d.next()>>>0)/4294967296};return s.double=function(){do var h=d.next()>>>11,p=(d.next()>>>0)/4294967296,D=(h+p)/(1<<21);while(D===0);return D},s.int32=d.next,s.quick=s,f&&(f.X&&o(f,d),s.state=function(){return o(d,{})}),s}n&&n.exports?n.exports=a:r&&r.amd?r(function(){return a}):this.xor4096=a})(et,e,!1)})(Xi);var Ji={exports:{}};(function(e){(function(t,n,r){function u(l){var c=this,d="";c.next=function(){var s=c.b,h=c.c,p=c.d,D=c.a;return s=s<<25^s>>>7^h,h=h-p|0,p=p<<24^p>>>8^D,D=D-s|0,c.b=s=s<<20^s>>>12^h,c.c=h=h-p|0,c.d=p<<16^h>>>16^D,c.a=D-s|0},c.a=0,c.b=0,c.c=-1640531527,c.d=1367130551,l===Math.floor(l)?(c.a=l/4294967296|0,c.b=l|0):d+=l;for(var f=0;f<d.length+20;f++)c.b^=d.charCodeAt(f)|0,c.next()}function o(l,c){return c.a=l.a,c.b=l.b,c.c=l.c,c.d=l.d,c}function a(l,c){var d=new u(l),f=c&&c.state,s=function(){return(d.next()>>>0)/4294967296};return s.double=function(){do var h=d.next()>>>11,p=(d.next()>>>0)/4294967296,D=(h+p)/(1<<21);while(D===0);return D},s.int32=d.next,s.quick=s,f&&(typeof f=="object"&&o(f,d),s.state=function(){return o(d,{})}),s}n&&n.exports?n.exports=a:r&&r.amd?r(function(){return a}):this.tychei=a})(et,e,!1)})(Ji);var Gi={exports:{}};(function(e){(function(t,n,r){var u=256,o=6,a=52,l="random",c=r.pow(u,o),d=r.pow(2,a),f=d*2,s=u-1,h;function p(F,R,P){var T=[];R=R==!0?{entropy:!0}:R||{};var _=v(y(R.entropy?[F,S(n)]:F==null?A():F,3),T),$=new D(T),Z=function(){for(var V=$.g(o),Y=c,Q=0;V<d;)V=(V+Q)*u,Y*=u,Q=$.g(1);for(;V>=f;)V/=2,Y/=2,Q>>>=1;return(V+Q)/Y};return Z.int32=function(){return $.g(4)|0},Z.quick=function(){return $.g(4)/4294967296},Z.double=Z,v(S($.S),n),(R.pass||P||function(V,Y,Q,ne){return ne&&(ne.S&&g(ne,$),V.state=function(){return g($,{})}),Q?(r[l]=V,Y):V})(Z,_,"global"in R?R.global:this==r,R.state)}function D(F){var R,P=F.length,T=this,_=0,$=T.i=T.j=0,Z=T.S=[];for(P||(F=[P++]);_<u;)Z[_]=_++;for(_=0;_<u;_++)Z[_]=Z[$=s&$+F[_%P]+(R=Z[_])],Z[$]=R;(T.g=function(V){for(var Y,Q=0,ne=T.i,ee=T.j,W=T.S;V--;)Y=W[ne=s&ne+1],Q=Q*u+W[s&(W[ne]=W[ee=s&ee+Y])+(W[ee]=Y)];return T.i=ne,T.j=ee,Q})(u)}function g(F,R){return R.i=F.i,R.j=F.j,R.S=F.S.slice(),R}function y(F,R){var P=[],T=typeof F,_;if(R&&T=="object")for(_ in F)try{P.push(y(F[_],R-1))}catch($){}return P.length?P:T=="string"?F:F+"\0"}function v(F,R){for(var P=F+"",T,_=0;_<P.length;)R[s&_]=s&(T^=R[s&_]*19)+P.charCodeAt(_++);return S(R)}function A(){try{var F;return h&&(F=h.randomBytes)?F=F(u):(F=new Uint8Array(u),(t.crypto||t.msCrypto).getRandomValues(F)),S(F)}catch(T){var R=t.navigator,P=R&&R.plugins;return[+new Date,t,P,t.screen,S(n)]}}function S(F){return String.fromCharCode.apply(0,F)}if(v(r.random(),n),e.exports){e.exports=p;try{h=Ln.default}catch(F){}}else r["seed"+l]=p})(typeof self!="undefined"?self:et,[],Math)})(Gi);var bp=Hi.exports,Sp=zi.exports,Mp=Wi.exports,Np=Zi.exports,_p=Xi.exports,Ip=Ji.exports,Nt=Gi.exports;Nt.alea=bp,Nt.xor128=Sp,Nt.xorwow=Mp,Nt.xorshift7=Np,Nt.xor4096=_p,Nt.tychei=Ip,Rn("fineStructure",.0072973525693),Rn("weakMixingAngle",.2229),Rn("efimovFactor",22.7),Rn("sackurTetrode",-1.16487052358);function Rn(e,t){var n=["config","BigNumber"];return Ae(e,n,r=>{var{config:u,BigNumber:o}=r;return u.number==="BigNumber"?new o(t):t})}var Op=ap({config:ri}),Rp=fp({}),xp=dp({}),$p=gp({}),Pp=Ep({Matrix:$p}),Tp=fd({BigNumber:Op,Complex:Rp,DenseMatrix:Pp,Fraction:xp}),Lp=Cp({typed:Tp});class jp{constructor(t){this.calcControls=[],this.dependenciesTriggerMap=new Map,this.hideNotRememberControlIds=[],this.dontHasPermissionControlIds=[],this.cacheComputedResult={},this.options=t,this.getDontHasPermissionControlIds(),this.getNeedHideRememberControlIds()}getNeedHideRememberControlIds(){var t;!((t=this.options)!=null&&t.displayBoList)||(this.hideNotRememberControlIds=this.options.displayBoList.reduce((n,r)=>(r.is_remember||n.push(...r.hide_controls),n),[]))}getDontHasPermissionControlIds(){var t;!((t=this.options)!=null&&t.behavior)||(this.dontHasPermissionControlIds=this.options.behavior.reduce((n,r)=>(r.ctrlBehavior===1&&n.push(r.ctrlId),n),[]))}controlNeedComputedValue(t){if(!t)return!1;const n=this.getControlIsHide(t);return!(this.dontHasPermissionControlIds.includes(t.id)&&n||this.hideNotRememberControlIds.includes(t.id)&&n)}getControlIsHide(t){return t.props.isHide?!0:t.parent===null?!1:this.getControlIsHide(t.parent)}apply(t){this.engine=t,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(t=>this.computedCalcValue(t))}getAllCalcControl(){this.calcControls=this.engine.runtime.flatInstances.filter(t=>t.type===J.CALC)}getCalcDependencies(){this.calcControls.forEach(t=>{const{scriptEcho:n}=t.props;n.forEach(r=>{(r.type===xe.VariableInMainTable||r.type===xe.VariableInCurrentSubTable||r.type===xe.VariableInOtherSubTable)&&this.setDependenciesTriggerMapItem(r.id,t),r.type===xe.VariableInOtherSubTable&&r.subTableId&&this.setDependenciesTriggerMapItem(r.subTableId,t)})})}setDependenciesTriggerMapItem(t,n){this.dependenciesTriggerMap.has(t)||this.dependenciesTriggerMap.set(t,[]);const r=this.dependenciesTriggerMap.get(t);r.includes(n)||r.push(n)}getCalcControlsFromSubtableRows(t){return t.reduce((n,r)=>(r.children.forEach(u=>{const o=u.children[0];o&&this.engine.assertInstance(o,J.CALC)&&n.push(o)}),n),[])}watchSchemaHideChange(){this.engine.on("schema-change",t=>{var n;t.props==="isHide"&&((n=this.dependenciesTriggerMap.get(t.instance.id))!=null?n:[]).forEach(u=>{this.computedCalcValue(u)})})}watchSubtableChange(){this.engine.on("list-change",t=>{var o,a,l;this.resetDependencies();const n=(a=(o=t.options)==null?void 0:o.changed)!=null?a:[];this.getCalcControlsFromSubtableRows(n).forEach(c=>{this.computedCalcValue(c)}),((l=this.dependenciesTriggerMap.get(t.instance.id))!=null?l:[]).forEach(c=>{this.computedCalcValue(c)})})}watchControlChange(){this.engine.on("change",t=>{var u;const{instance:n}=t;if(!this.dependenciesTriggerMap.has(n.id))return;const r=(u=this.dependenciesTriggerMap.get(n.id))!=null?u:[];t.rowIndex!==void 0&&t.rowIndex>-1?r.forEach(o=>{this.controlInSubtable(o)&&this.engine.getInstanceRowIndex(o)!==t.rowIndex||this.computedCalcValue(o)}):r.forEach(o=>{this.computedCalcValue(o)})})}controlInSubtable(t){var n;return((n=t.parent)==null?void 0:n.type)===J.SUBTABLE_COLUMN}computedCalcValue(t){var c;const n=t.props.scriptEcho;if(!n||n.length===0)return;const r=n.reduce((d,f)=>{if(f.type===xe.Operator||f.type===xe.Number)return d+f.name;let s=0,h;switch(f.type){case xe.VariableInMainTable:{const p=this.getNumberValue(this.engine.getState(f.id));h=this.engine.getInstance(f.id),s=Number(p);break}case xe.VariableInCurrentSubTable:{const p=this.engine.getInstanceRowIndex(t);h=this.engine.getInstance(f.id,p);const D=this.engine.getState(f.id,p),g=this.getNumberValue(D);s=Number(g);break}case xe.VariableInOtherSubTable:{const p=this.engine.getState(f.id),D=Array.isArray(p)?p.map(y=>this.getNumberValue(y)):[],g=this.getAggregateTypeValue(D,f.aggregateType);h=this.engine.getInstance(f.subTableId),s=Number(g);break}}return!Number.isNaN(s)&&this.controlNeedComputedValue(h)?d+=`(${s})`:d+=0,d},"");let u;this.cacheComputedResult[r]!==void 0?u=this.cacheComputedResult[r]:(u=Number(Lp(new Function(`return ${r}`)(),{precision:16})),this.cacheComputedResult[r]=u);let o;if(this.controlInSubtable(t)&&(o=this.engine.getInstanceRowIndex(t),o===void 0))return;const a=this.engine.getState(t.id,o),l=!u||u===1/0||u===-1/0?0:t.props.precision===""?u:Number(u.toFixed(t.props.precision));l!==(a==null?void 0:a.result)&&this.engine.setState(t.id,{result:l,unit:(c=a==null?void 0:a.unit)!=null?c:""},o)}getNumberValue(t){if(typeof t=="object"&&t){if("result"in t)return t.result;if("amount"in t)return t.amount}return typeof t=="number"?t:0}getAggregateTypeValue(t,n){if(!n||!t||!t.length)return 0;switch(n){case gt.MAX:return Math.max(...t);case gt.MIN:return Math.min(...t);case gt.SUM:return t.reduce((r,u)=>r+u);case gt.AVG:return t.reduce((r,u)=>r+u)/t.length}}}class qp{constructor(t){this.config=t}apply(t){var o,a;this.engine=t;const n=(a=(o=this.config)==null?void 0:o.source)!=null?a:"";let r=document.createElement("style");r.className="edit-css",r.type="text/css",r.innerHTML=n,document.querySelector("head").appendChild(r)}}X.CalcPlugin=jp,X.ControlsEventPlugin=nh,X.ES6ModulePlugin=Y0,X.Engine=Mr,X.LifecycleEventPlugin=th,X.Plugin=Q0,X.StylePlugin=qp,X.hasChildrenControl=yn,X.loopDataViewControl=Vt,X.loopFormControl=kt,X.parseModule=Ku,Object.defineProperty(X,"__esModule",{value:!0})});
|
|
28
|
+
**/(function(e,t){(function(n){var r=2e3,u={s:1,n:0,d:1};function i(d,D){if(isNaN(d=parseInt(d,10)))throw p.InvalidParameter;return d*D}function a(d,D){if(D===0)throw p.DivisionByZero;var v=Object.create(p.prototype);v.s=d<0?-1:1,d=d<0?-d:d;var E=h(d,D);return v.n=d/E,v.d=D/E,v}function s(d){for(var D={},v=d,E=2,y=4;y<=v;){for(;v%E===0;)v/=E,D[E]=(D[E]||0)+1;y+=1+2*E++}return v!==d?v>1&&(D[v]=(D[v]||0)+1):D[d]=(D[d]||0)+1,D}var c=function(d,D){var v=0,E=1,y=1,b=0,F=0,$=0,O=1,T=1,I=0,x=1,W=1,U=1,K=1e7,J;if(d!=null)if(D!==void 0){if(v=d,E=D,y=v*E,v%1!==0||E%1!==0)throw p.NonIntegerParameter}else switch(typeof d){case"object":{if("d"in d&&"n"in d)v=d.n,E=d.d,"s"in d&&(v*=d.s);else if(0 in d)v=d[0],1 in d&&(E=d[1]);else throw p.InvalidParameter;y=v*E;break}case"number":{if(d<0&&(y=d,d=-d),d%1===0)v=d;else if(d>0){for(d>=1&&(T=Math.pow(10,Math.floor(1+Math.log(d)/Math.LN10)),d/=T);x<=K&&U<=K;)if(J=(I+W)/(x+U),d===J){x+U<=K?(v=I+W,E=x+U):U>x?(v=W,E=U):(v=I,E=x);break}else d>J?(I+=W,x+=U):(W+=I,U+=x),x>K?(v=W,E=U):(v=I,E=x);v*=T}else(isNaN(d)||isNaN(D))&&(E=v=NaN);break}case"string":{if(x=d.match(/\d+|./g),x===null)throw p.InvalidParameter;if(x[I]==="-"?(y=-1,I++):x[I]==="+"&&I++,x.length===I+1?F=i(x[I++],y):x[I+1]==="."||x[I]==="."?(x[I]!=="."&&(b=i(x[I++],y)),I++,(I+1===x.length||x[I+1]==="("&&x[I+3]===")"||x[I+1]==="'"&&x[I+3]==="'")&&(F=i(x[I],y),O=Math.pow(10,x[I].length),I++),(x[I]==="("&&x[I+2]===")"||x[I]==="'"&&x[I+2]==="'")&&($=i(x[I+1],y),T=Math.pow(10,x[I+1].length)-1,I+=3)):x[I+1]==="/"||x[I+1]===":"?(F=i(x[I],y),O=i(x[I+2],1),I+=3):x[I+3]==="/"&&x[I+1]===" "&&(b=i(x[I],y),F=i(x[I+2],y),O=i(x[I+4],1),I+=5),x.length<=I){E=O*T,y=v=$+E*b+T*F;break}}default:throw p.InvalidParameter}if(E===0)throw p.DivisionByZero;u.s=y<0?-1:1,u.n=Math.abs(v),u.d=Math.abs(E)};function l(d,D,v){for(var E=1;D>0;d=d*d%v,D>>=1)D&1&&(E=E*d%v);return E}function f(d,D){for(;D%2===0;D/=2);for(;D%5===0;D/=5);if(D===1)return 0;for(var v=10%D,E=1;v!==1;E++)if(v=v*10%D,E>r)return 0;return E}function o(d,D,v){for(var E=1,y=l(10,v,D),b=0;b<300;b++){if(E===y)return b;E=E*10%D,y=y*10%D}return 0}function h(d,D){if(!d)return D;if(!D)return d;for(;;){if(d%=D,!d)return D;if(D%=d,!D)return d}}function p(d,D){if(c(d,D),this instanceof p)d=h(u.d,u.n),this.s=u.s,this.n=u.n/d,this.d=u.d/d;else return a(u.s*u.n,u.d)}p.DivisionByZero=new Error("Division by Zero"),p.InvalidParameter=new Error("Invalid argument"),p.NonIntegerParameter=new Error("Parameters must be integer"),p.prototype={s:1,n:0,d:1,abs:function(){return a(this.n,this.d)},neg:function(){return a(-this.s*this.n,this.d)},add:function(d,D){return c(d,D),a(this.s*this.n*u.d+u.s*this.d*u.n,this.d*u.d)},sub:function(d,D){return c(d,D),a(this.s*this.n*u.d-u.s*this.d*u.n,this.d*u.d)},mul:function(d,D){return c(d,D),a(this.s*u.s*this.n*u.n,this.d*u.d)},div:function(d,D){return c(d,D),a(this.s*u.s*this.n*u.d,this.d*u.n)},clone:function(){return a(this.s*this.n,this.d)},mod:function(d,D){if(isNaN(this.n)||isNaN(this.d))return new p(NaN);if(d===void 0)return a(this.s*this.n%this.d,1);if(c(d,D),u.n===0&&this.d===0)throw p.DivisionByZero;return a(this.s*(u.d*this.n)%(u.n*this.d),u.d*this.d)},gcd:function(d,D){return c(d,D),a(h(u.n,this.n)*h(u.d,this.d),u.d*this.d)},lcm:function(d,D){return c(d,D),u.n===0&&this.n===0?a(0,1):a(u.n*this.n,h(u.n,this.n)*h(u.d,this.d))},ceil:function(d){return d=Math.pow(10,d||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.ceil(d*this.s*this.n/this.d),d)},floor:function(d){return d=Math.pow(10,d||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.floor(d*this.s*this.n/this.d),d)},round:function(d){return d=Math.pow(10,d||0),isNaN(this.n)||isNaN(this.d)?new p(NaN):a(Math.round(d*this.s*this.n/this.d),d)},inverse:function(){return a(this.s*this.d,this.n)},pow:function(d,D){if(c(d,D),u.d===1)return u.s<0?a(Math.pow(this.s*this.d,u.n),Math.pow(this.n,u.n)):a(Math.pow(this.s*this.n,u.n),Math.pow(this.d,u.n));if(this.s<0)return null;var v=s(this.n),E=s(this.d),y=1,b=1;for(var F in v)if(F!=="1"){if(F==="0"){y=0;break}if(v[F]*=u.n,v[F]%u.d===0)v[F]/=u.d;else return null;y*=Math.pow(F,v[F])}for(var F in E)if(F!=="1"){if(E[F]*=u.n,E[F]%u.d===0)E[F]/=u.d;else return null;b*=Math.pow(F,E[F])}return u.s<0?a(b,y):a(y,b)},equals:function(d,D){return c(d,D),this.s*this.n*u.d===u.s*u.n*this.d},compare:function(d,D){c(d,D);var v=this.s*this.n*u.d-u.s*u.n*this.d;return(0<v)-(v<0)},simplify:function(d){if(isNaN(this.n)||isNaN(this.d))return this;d=d||.001;for(var D=this.abs(),v=D.toContinued(),E=1;E<v.length;E++){for(var y=a(v[E-1],1),b=E-2;b>=0;b--)y=y.inverse().add(v[b]);if(y.sub(D).abs().valueOf()<d)return y.mul(this.s)}return this},divisible:function(d,D){return c(d,D),!(!(u.n*this.d)||this.n*u.d%(u.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(d){var D,v="",E=this.n,y=this.d;return this.s<0&&(v+="-"),y===1?v+=E:(d&&(D=Math.floor(E/y))>0&&(v+=D,v+=" ",E%=y),v+=E,v+="/",v+=y),v},toLatex:function(d){var D,v="",E=this.n,y=this.d;return this.s<0&&(v+="-"),y===1?v+=E:(d&&(D=Math.floor(E/y))>0&&(v+=D,E%=y),v+="\\frac{",v+=E,v+="}{",v+=y,v+="}"),v},toContinued:function(){var d,D=this.n,v=this.d,E=[];if(isNaN(D)||isNaN(v))return E;do E.push(Math.floor(D/v)),d=D%v,D=v,v=d;while(D!==1);return E},toString:function(d){var D=this.n,v=this.d;if(isNaN(D)||isNaN(v))return"NaN";d=d||15;var E=f(D,v),y=o(D,v,E),b=this.s<0?"-":"";if(b+=D/v|0,D%=v,D*=10,D&&(b+="."),E){for(var F=y;F--;)b+=D/v|0,D%=v,D*=10;b+="(";for(var F=E;F--;)b+=D/v|0,D%=v,D*=10;b+=")"}else for(var F=d;D&&F--;)b+=D/v|0,D%=v,D*=10;return b}},Object.defineProperty(p,"__esModule",{value:!0}),p.default=p,p.Fraction=p,e.exports=p})()})(aa);var Qe=Cu(aa.exports),Wv="Fraction",Gv=[],Xv=Ce(Wv,Gv,()=>(Object.defineProperty(Qe,"name",{value:"Fraction"}),Qe.prototype.constructor=Qe,Qe.prototype.type="Fraction",Qe.prototype.isFraction=!0,Qe.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},Qe.fromJSON=function(e){return new Qe(e)},Qe),{isClass:!0}),Zv="Matrix",Jv=[],Kv=Ce(Zv,Jv,()=>{function e(){if(!(this instanceof e))throw new SyntaxError("Constructor must be called with the new operator")}return e.prototype.type="Matrix",e.prototype.isMatrix=!0,e.prototype.storage=function(){throw new Error("Cannot invoke storage on a Matrix interface")},e.prototype.datatype=function(){throw new Error("Cannot invoke datatype on a Matrix interface")},e.prototype.create=function(t,n){throw new Error("Cannot invoke create on a Matrix interface")},e.prototype.subset=function(t,n,r){throw new Error("Cannot invoke subset on a Matrix interface")},e.prototype.get=function(t){throw new Error("Cannot invoke get on a Matrix interface")},e.prototype.set=function(t,n,r){throw new Error("Cannot invoke set on a Matrix interface")},e.prototype.resize=function(t,n){throw new Error("Cannot invoke resize on a Matrix interface")},e.prototype.reshape=function(t,n){throw new Error("Cannot invoke reshape on a Matrix interface")},e.prototype.clone=function(){throw new Error("Cannot invoke clone on a Matrix interface")},e.prototype.size=function(){throw new Error("Cannot invoke size on a Matrix interface")},e.prototype.map=function(t,n){throw new Error("Cannot invoke map on a Matrix interface")},e.prototype.forEach=function(t){throw new Error("Cannot invoke forEach on a Matrix interface")},e.prototype[Symbol.iterator]=function(){throw new Error("Cannot iterate a Matrix interface")},e.prototype.toArray=function(){throw new Error("Cannot invoke toArray on a Matrix interface")},e.prototype.valueOf=function(){throw new Error("Cannot invoke valueOf on a Matrix interface")},e.prototype.format=function(t){throw new Error("Cannot invoke format on a Matrix interface")},e.prototype.toString=function(){throw new Error("Cannot invoke toString on a Matrix interface")},e},{isClass:!0});function Qv(e){return Object.keys(e.signatures||{}).reduce(function(t,n){var r=(n.match(/,/g)||[]).length+1;return Math.max(t,r)},-1)}var Yv="DenseMatrix",eg=["Matrix"],tg=Ce(Yv,eg,e=>{var{Matrix:t}=e;function n(f,o){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(o&&!Mn(o))throw new Error("Invalid datatype: "+o);if(Kt(f))f.type==="DenseMatrix"?(this._data=ht(f._data),this._size=ht(f._size),this._datatype=o||f._datatype):(this._data=f.toArray(),this._size=f.size(),this._datatype=o||f._datatype);else if(f&&Ne(f.data)&&Ne(f.size))this._data=f.data,this._size=f.size,Pi(this._data,this._size),this._datatype=o||f.datatype;else if(Ne(f))this._data=l(f),this._size=Kr(this._data),Pi(this._data,this._size),this._datatype=o;else{if(f)throw new TypeError("Unsupported type of data ("+Wr(f)+")");this._data=[],this._size=[0],this._datatype=o}}n.prototype=new t,n.prototype.createDenseMatrix=function(f,o){return new n(f,o)},Object.defineProperty(n,"name",{value:"DenseMatrix"}),n.prototype.constructor=n,n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return Yr(this._data,Wr)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(f,o){return new n(f,o)},n.prototype.subset=function(f,o,h){switch(arguments.length){case 1:return r(this,f);case 2:case 3:return i(this,f,o,h);default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.get=function(f){if(!Ne(f))throw new TypeError("Array expected");if(f.length!==this._size.length)throw new oe(f.length,this._size.length);for(var o=0;o<f.length;o++)xe(f[o],this._size[o]);for(var h=this._data,p=0,d=f.length;p<d;p++){var D=f[p];xe(D,h.length),h=h[D]}return h},n.prototype.set=function(f,o,h){if(!Ne(f))throw new TypeError("Array expected");if(f.length<this._size.length)throw new oe(f.length,this._size.length,"<");var p,d,D,v=f.map(function(y){return y+1});c(this,v,h);var E=this._data;for(p=0,d=f.length-1;p<d;p++)D=f[p],xe(D,E.length),E=E[D];return D=f[f.length-1],xe(D,E.length),E[D]=o,this};function r(f,o){if(!bi(o))throw new TypeError("Invalid index");var h=o.isScalar();if(h)return f.get(o.min());var p=o.size();if(p.length!==f._size.length)throw new oe(p.length,f._size.length);for(var d=o.min(),D=o.max(),v=0,E=f._size.length;v<E;v++)xe(d[v],f._size[v]),xe(D[v],f._size[v]);return new n(u(f._data,o,p.length,0),f._datatype)}function u(f,o,h,p){var d=p===h-1,D=o.dimension(p);return d?D.map(function(v){return xe(v,f.length),f[v]}).valueOf():D.map(function(v){xe(v,f.length);var E=f[v];return u(E,o,h,p+1)}).valueOf()}function i(f,o,h,p){if(!o||o.isIndex!==!0)throw new TypeError("Invalid index");var d=o.size(),D=o.isScalar(),v;if(Kt(h)?(v=h.size(),h=h.valueOf()):v=Kr(h),D){if(v.length!==0)throw new TypeError("Scalar expected");f.set(o.min(),h,p)}else{if(d.length<f._size.length)throw new oe(d.length,f._size.length,"<");if(v.length<d.length){for(var E=0,y=0;d[E]===1&&v[E]===1;)E++;for(;d[E]===1;)y++,E++;h=NE(h,d.length,y,v)}if(!Gr(d,v))throw new oe(d,v,">");var b=o.max().map(function(O){return O+1});c(f,b,p);var F=d.length,$=0;a(f._data,o,h,F,$)}return f}function a(f,o,h,p,d){var D=d===p-1,v=o.dimension(d);D?v.forEach(function(E,y){xe(E),f[E]=h[y[0]]}):v.forEach(function(E,y){xe(E),a(f[E],o,h[y[0]],p,d+1)})}n.prototype.resize=function(f,o,h){if(!zr(f))throw new TypeError("Array or Matrix expected");var p=f.valueOf().map(D=>Array.isArray(D)&&D.length===1?D[0]:D),d=h?this.clone():this;return s(d,p,o)};function s(f,o,h){if(o.length===0){for(var p=f._data;Ne(p);)p=p[0];return p}return f._size=o.slice(0),f._data=Li(f._data,f._size,h),f}n.prototype.reshape=function(f,o){var h=o?this.clone():this;h._data=IE(h._data,f);var p=h._size.reduce((d,D)=>d*D);return h._size=ji(f,p),h};function c(f,o,h){for(var p=f._size.slice(0),d=!1;p.length<o.length;)p.push(0),d=!0;for(var D=0,v=o.length;D<v;D++)o[D]>p[D]&&(p[D]=o[D],d=!0);d&&s(f,p,h)}n.prototype.clone=function(){var f=new n({data:ht(this._data),size:ht(this._size),datatype:this._datatype});return f},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(f){var o=this,h=Qv(f),p=function v(E,y){return Ne(E)?E.map(function(b,F){return v(b,y.concat(F))}):h===1?f(E):h===2?f(E,y):f(E,y,o)},d=p(this._data,[]),D=this._datatype!==void 0?Yr(d,Wr):void 0;return new n(d,D)},n.prototype.forEach=function(f){var o=this,h=function p(d,D){Ne(d)?d.forEach(function(v,E){p(v,D.concat(E))}):f(d,D,o)};h(this._data,[])},n.prototype[Symbol.iterator]=function*(){var f=function*o(h,p){if(Ne(h))for(var d=0;d<h.length;d++)yield*o(h[d],p.concat(d));else yield{value:h,index:p}};yield*f(this._data,[])},n.prototype.rows=function(){var f=[],o=this.size();if(o.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");var h=this._data;for(var p of h)f.push(new n([p],this._datatype));return f},n.prototype.columns=function(){var f=this,o=[],h=this.size();if(h.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var p=this._data,d=function(E){var y=p.map(b=>[b[E]]);o.push(new n(y,f._datatype))},D=0;D<h[1];D++)d(D);return o},n.prototype.toArray=function(){return ht(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(f){return pt(this._data,f)},n.prototype.toString=function(){return pt(this._data)},n.prototype.toJSON=function(){return{mathjs:"DenseMatrix",data:this._data,size:this._size,datatype:this._datatype}},n.prototype.diagonal=function(f){if(f){if(rt(f)&&(f=f.toNumber()),!me(f)||!We(f))throw new TypeError("The parameter k must be an integer number")}else f=0;for(var o=f>0?f:0,h=f<0?-f:0,p=this._size[0],d=this._size[1],D=Math.min(p-h,d-o),v=[],E=0;E<D;E++)v[E]=this._data[E+h][E+o];return new n({data:v,size:[D],datatype:this._datatype})},n.diagonal=function(f,o,h,p){if(!Ne(f))throw new TypeError("Array expected, size parameter");if(f.length!==2)throw new Error("Only two dimensions matrix are supported");if(f=f.map(function(T){if(rt(T)&&(T=T.toNumber()),!me(T)||!We(T)||T<1)throw new Error("Size values must be positive integers");return T}),h){if(rt(h)&&(h=h.toNumber()),!me(h)||!We(h))throw new TypeError("The parameter k must be an integer number")}else h=0;var d=h>0?h:0,D=h<0?-h:0,v=f[0],E=f[1],y=Math.min(v-D,E-d),b;if(Ne(o)){if(o.length!==y)throw new Error("Invalid value array length");b=function(I){return o[I]}}else if(Kt(o)){var F=o.size();if(F.length!==1||F[0]!==y)throw new Error("Invalid matrix length");b=function(I){return o.get([I])}}else b=function(){return o};p||(p=rt(b(0))?b(0).mul(0):0);var $=[];if(f.length>0){$=Li($,f,p);for(var O=0;O<y;O++)$[O+D][O+d]=b(O)}return new n({data:$,size:[v,E]})},n.fromJSON=function(f){return new n(f)},n.prototype.swapRows=function(f,o){if(!me(f)||!We(f)||!me(o)||!We(o))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return xe(f,this._size[0]),xe(o,this._size[0]),n._swapRows(f,o,this._data),this},n._swapRows=function(f,o,h){var p=h[f];h[f]=h[o],h[o]=p};function l(f){for(var o=0,h=f.length;o<h;o++){var p=f[o];Ne(p)?f[o]=l(p):p&&p.isMatrix===!0&&(f[o]=l(p.valueOf()))}return f}return n},{isClass:!0}),oa="equalScalar";Ce(oa,["typed","config"],e=>{var{typed:t,config:n}=e;return t(oa,{"number, number":function(u,i){return CE(u,i,n.epsilon)}})});function Yt(e,t,n,r){if(!(this instanceof Yt))throw new SyntaxError("Constructor must be called with the new operator");this.fn=e,this.count=t,this.min=n,this.max=r,this.message="Wrong number of arguments in function "+e+" ("+t+" provided, "+n+(r!=null?"-"+r:"")+" expected)",this.stack=new Error().stack}Yt.prototype=new Error,Yt.prototype.constructor=Error,Yt.prototype.name="ArgumentsError",Yt.prototype.isArgumentsError=!0;var sa="format",ng=["typed"],rg=Ce(sa,ng,e=>{var{typed:t}=e;return t(sa,{any:pt,"any, Object | function | number":pt})}),ca="bin",ug=["typed","format"];Ce(ca,ug,e=>{var{typed:t,format:n}=e;return t(ca,{"number | BigNumber":function(u){return n(u,{notation:"bin"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"bin",wordSize:i})}})});var la="oct",ig=["typed","format"];Ce(la,ig,e=>{var{typed:t,format:n}=e;return t(la,{"number | BigNumber":function(u){return n(u,{notation:"oct"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"oct",wordSize:i})}})});var fa="hex",ag=["typed","format"];Ce(fa,ag,e=>{var{typed:t,format:n}=e;return t(fa,{"number | BigNumber":function(u){return n(u,{notation:"hex"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"hex",wordSize:i})}})});var ha="equal";Ce(ha,["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return t(ha,{"any, any":function(u,i){return u===null?i===null:i===null?u===null:u===void 0?i===void 0:i===void 0?u===void 0:n(u,i)}})});var pa="unequal";Ce(pa,["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return t(pa,{"any, any":function(u,i){return u===null?i!==null:i===null?u!==null:u===void 0?i!==void 0:i===void 0?u!==void 0:!n(u,i)}})});var da={exports:{}};(function(e){(function(t,n,r){function u(c){var l=this,f=s();l.next=function(){var o=2091639*l.s0+l.c*23283064365386963e-26;return l.s0=l.s1,l.s1=l.s2,l.s2=o-(l.c=o|0)},l.c=1,l.s0=f(" "),l.s1=f(" "),l.s2=f(" "),l.s0-=f(c),l.s0<0&&(l.s0+=1),l.s1-=f(c),l.s1<0&&(l.s1+=1),l.s2-=f(c),l.s2<0&&(l.s2+=1),f=null}function i(c,l){return l.c=c.c,l.s0=c.s0,l.s1=c.s1,l.s2=c.s2,l}function a(c,l){var f=new u(c),o=l&&l.state,h=f.next;return h.int32=function(){return f.next()*4294967296|0},h.double=function(){return h()+(h()*2097152|0)*11102230246251565e-32},h.quick=h,o&&(typeof o=="object"&&i(o,f),h.state=function(){return i(f,{})}),h}function s(){var c=4022871197,l=function(f){f=String(f);for(var o=0;o<f.length;o++){c+=f.charCodeAt(o);var h=.02519603282416938*c;c=h>>>0,h-=c,h*=c,c=h>>>0,h-=c,c+=h*4294967296}return(c>>>0)*23283064365386963e-26};return l}n&&n.exports?n.exports=a:r&&r.amd?r(function(){return a}):this.alea=a})(Ye,e,!1)})(da);var Da={exports:{}};(function(e){(function(t,n,r){function u(s){var c=this,l="";c.x=0,c.y=0,c.z=0,c.w=0,c.next=function(){var o=c.x^c.x<<11;return c.x=c.y,c.y=c.z,c.z=c.w,c.w^=c.w>>>19^o^o>>>8},s===(s|0)?c.x=s:l+=s;for(var f=0;f<l.length+64;f++)c.x^=l.charCodeAt(f)|0,c.next()}function i(s,c){return c.x=s.x,c.y=s.y,c.z=s.z,c.w=s.w,c}function a(s,c){var l=new u(s),f=c&&c.state,o=function(){return(l.next()>>>0)/4294967296};return o.double=function(){do var h=l.next()>>>11,p=(l.next()>>>0)/4294967296,d=(h+p)/(1<<21);while(d===0);return d},o.int32=l.next,o.quick=o,f&&(typeof f=="object"&&i(f,l),o.state=function(){return i(l,{})}),o}n&&n.exports?n.exports=a:r&&r.amd?r(function(){return a}):this.xor128=a})(Ye,e,!1)})(Da);var Ea={exports:{}};(function(e){(function(t,n,r){function u(s){var c=this,l="";c.next=function(){var o=c.x^c.x>>>2;return c.x=c.y,c.y=c.z,c.z=c.w,c.w=c.v,(c.d=c.d+362437|0)+(c.v=c.v^c.v<<4^(o^o<<1))|0},c.x=0,c.y=0,c.z=0,c.w=0,c.v=0,s===(s|0)?c.x=s:l+=s;for(var f=0;f<l.length+64;f++)c.x^=l.charCodeAt(f)|0,f==l.length&&(c.d=c.x<<10^c.x>>>4),c.next()}function i(s,c){return c.x=s.x,c.y=s.y,c.z=s.z,c.w=s.w,c.v=s.v,c.d=s.d,c}function a(s,c){var l=new u(s),f=c&&c.state,o=function(){return(l.next()>>>0)/4294967296};return o.double=function(){do var h=l.next()>>>11,p=(l.next()>>>0)/4294967296,d=(h+p)/(1<<21);while(d===0);return d},o.int32=l.next,o.quick=o,f&&(typeof f=="object"&&i(f,l),o.state=function(){return i(l,{})}),o}n&&n.exports?n.exports=a:r&&r.amd?r(function(){return a}):this.xorwow=a})(Ye,e,!1)})(Ea);var va={exports:{}};(function(e){(function(t,n,r){function u(s){var c=this;c.next=function(){var f=c.x,o=c.i,h,p;return h=f[o],h^=h>>>7,p=h^h<<24,h=f[o+1&7],p^=h^h>>>10,h=f[o+3&7],p^=h^h>>>3,h=f[o+4&7],p^=h^h<<7,h=f[o+7&7],h=h^h<<13,p^=h^h<<9,f[o]=p,c.i=o+1&7,p};function l(f,o){var h,p=[];if(o===(o|0))p[0]=o;else for(o=""+o,h=0;h<o.length;++h)p[h&7]=p[h&7]<<15^o.charCodeAt(h)+p[h+1&7]<<13;for(;p.length<8;)p.push(0);for(h=0;h<8&&p[h]===0;++h);for(h==8?p[7]=-1:p[h],f.x=p,f.i=0,h=256;h>0;--h)f.next()}l(c,s)}function i(s,c){return c.x=s.x.slice(),c.i=s.i,c}function a(s,c){s==null&&(s=+new Date);var l=new u(s),f=c&&c.state,o=function(){return(l.next()>>>0)/4294967296};return o.double=function(){do var h=l.next()>>>11,p=(l.next()>>>0)/4294967296,d=(h+p)/(1<<21);while(d===0);return d},o.int32=l.next,o.quick=o,f&&(f.x&&i(f,l),o.state=function(){return i(l,{})}),o}n&&n.exports?n.exports=a:r&&r.amd?r(function(){return a}):this.xorshift7=a})(Ye,e,!1)})(va);var ga={exports:{}};(function(e){(function(t,n,r){function u(s){var c=this;c.next=function(){var f=c.w,o=c.X,h=c.i,p,d;return c.w=f=f+1640531527|0,d=o[h+34&127],p=o[h=h+1&127],d^=d<<13,p^=p<<17,d^=d>>>15,p^=p>>>12,d=o[h]=d^p,c.i=h,d+(f^f>>>16)|0};function l(f,o){var h,p,d,D,v,E=[],y=128;for(o===(o|0)?(p=o,o=null):(o=o+"\0",p=0,y=Math.max(y,o.length)),d=0,D=-32;D<y;++D)o&&(p^=o.charCodeAt((D+32)%o.length)),D===0&&(v=p),p^=p<<10,p^=p>>>15,p^=p<<4,p^=p>>>13,D>=0&&(v=v+1640531527|0,h=E[D&127]^=p+v,d=h==0?d+1:0);for(d>=128&&(E[(o&&o.length||0)&127]=-1),d=127,D=4*128;D>0;--D)p=E[d+34&127],h=E[d=d+1&127],p^=p<<13,h^=h<<17,p^=p>>>15,h^=h>>>12,E[d]=p^h;f.w=v,f.X=E,f.i=d}l(c,s)}function i(s,c){return c.i=s.i,c.w=s.w,c.X=s.X.slice(),c}function a(s,c){s==null&&(s=+new Date);var l=new u(s),f=c&&c.state,o=function(){return(l.next()>>>0)/4294967296};return o.double=function(){do var h=l.next()>>>11,p=(l.next()>>>0)/4294967296,d=(h+p)/(1<<21);while(d===0);return d},o.int32=l.next,o.quick=o,f&&(f.X&&i(f,l),o.state=function(){return i(l,{})}),o}n&&n.exports?n.exports=a:r&&r.amd?r(function(){return a}):this.xor4096=a})(Ye,e,!1)})(ga);var ma={exports:{}};(function(e){(function(t,n,r){function u(s){var c=this,l="";c.next=function(){var o=c.b,h=c.c,p=c.d,d=c.a;return o=o<<25^o>>>7^h,h=h-p|0,p=p<<24^p>>>8^d,d=d-o|0,c.b=o=o<<20^o>>>12^h,c.c=h=h-p|0,c.d=p<<16^h>>>16^d,c.a=d-o|0},c.a=0,c.b=0,c.c=-1640531527,c.d=1367130551,s===Math.floor(s)?(c.a=s/4294967296|0,c.b=s|0):l+=s;for(var f=0;f<l.length+20;f++)c.b^=l.charCodeAt(f)|0,c.next()}function i(s,c){return c.a=s.a,c.b=s.b,c.c=s.c,c.d=s.d,c}function a(s,c){var l=new u(s),f=c&&c.state,o=function(){return(l.next()>>>0)/4294967296};return o.double=function(){do var h=l.next()>>>11,p=(l.next()>>>0)/4294967296,d=(h+p)/(1<<21);while(d===0);return d},o.int32=l.next,o.quick=o,f&&(typeof f=="object"&&i(f,l),o.state=function(){return i(l,{})}),o}n&&n.exports?n.exports=a:r&&r.amd?r(function(){return a}):this.tychei=a})(Ye,e,!1)})(ma);var ya={exports:{}};(function(e){(function(t,n,r){var u=256,i=6,a=52,s="random",c=r.pow(u,i),l=r.pow(2,a),f=l*2,o=u-1,h;function p(F,$,O){var T=[];$=$==!0?{entropy:!0}:$||{};var I=E(v($.entropy?[F,b(n)]:F==null?y():F,3),T),x=new d(T),W=function(){for(var U=x.g(i),K=c,J=0;U<l;)U=(U+J)*u,K*=u,J=x.g(1);for(;U>=f;)U/=2,K/=2,J>>>=1;return(U+J)/K};return W.int32=function(){return x.g(4)|0},W.quick=function(){return x.g(4)/4294967296},W.double=W,E(b(x.S),n),($.pass||O||function(U,K,J,ee){return ee&&(ee.S&&D(ee,x),U.state=function(){return D(x,{})}),J?(r[s]=U,K):U})(W,I,"global"in $?$.global:this==r,$.state)}function d(F){var $,O=F.length,T=this,I=0,x=T.i=T.j=0,W=T.S=[];for(O||(F=[O++]);I<u;)W[I]=I++;for(I=0;I<u;I++)W[I]=W[x=o&x+F[I%O]+($=W[I])],W[x]=$;(T.g=function(U){for(var K,J=0,ee=T.i,Q=T.j,H=T.S;U--;)K=H[ee=o&ee+1],J=J*u+H[o&(H[ee]=H[Q=o&Q+K])+(H[Q]=K)];return T.i=ee,T.j=Q,J})(u)}function D(F,$){return $.i=F.i,$.j=F.j,$.S=F.S.slice(),$}function v(F,$){var O=[],T=typeof F,I;if($&&T=="object")for(I in F)try{O.push(v(F[I],$-1))}catch(x){}return O.length?O:T=="string"?F:F+"\0"}function E(F,$){for(var O=F+"",T,I=0;I<O.length;)$[o&I]=o&(T^=$[o&I]*19)+O.charCodeAt(I++);return b($)}function y(){try{var F;return h&&(F=h.randomBytes)?F=F(u):(F=new Uint8Array(u),(t.crypto||t.msCrypto).getRandomValues(F)),b(F)}catch(T){var $=t.navigator,O=$&&$.plugins;return[+new Date,t,O,t.screen,b(n)]}}function b(F){return String.fromCharCode.apply(0,F)}if(E(r.random(),n),e.exports){e.exports=p;try{h=zn.default}catch(F){}}else r["seed"+s]=p})(typeof self!="undefined"?self:Ye,[],Math)})(ya);var og=da.exports,sg=Da.exports,cg=Ea.exports,lg=va.exports,fg=ga.exports,hg=ma.exports,$t=ya.exports;$t.alea=og,$t.xor128=sg,$t.xorwow=cg,$t.xorshift7=lg,$t.xor4096=fg,$t.tychei=hg,Vn("fineStructure",.0072973525693),Vn("weakMixingAngle",.2229),Vn("efimovFactor",22.7),Vn("sackurTetrode",-1.16487052358);function Vn(e,t){var n=["config","BigNumber"];return Ce(e,n,r=>{var{config:u,BigNumber:i}=r;return u.number==="BigNumber"?new i(t):t})}var pg=qv({config:Si}),dg=zv({}),Dg=Xv({}),Eg=Kv({}),vg=tg({Matrix:Eg}),gg=zE({BigNumber:pg,Complex:dg,DenseMatrix:vg,Fraction:Dg}),mg=rg({typed:gg});class yg{constructor(t){this.calcControls=[],this.dependenciesTriggerMap=new Map,this.hideNotRememberControlIds=[],this.dontHasPermissionControlIds=[],this.cacheComputedResult={},this.options=t,this.getDontHasPermissionControlIds(),this.getNeedHideRememberControlIds()}getNeedHideRememberControlIds(){var t;!((t=this.options)!=null&&t.displayBoList)||(this.hideNotRememberControlIds=this.options.displayBoList.reduce((n,r)=>(r.is_remember||n.push(...r.hide_controls),n),[]))}getDontHasPermissionControlIds(){var t;!((t=this.options)!=null&&t.behavior)||(this.dontHasPermissionControlIds=this.options.behavior.reduce((n,r)=>(r.ctrlBehavior===1&&n.push(r.ctrlId),n),[]))}controlNeedComputedValue(t){if(!t)return!1;const n=this.getControlIsHide(t);return!(this.dontHasPermissionControlIds.includes(t.id)&&n||this.hideNotRememberControlIds.includes(t.id)&&n)}getControlIsHide(t){return t.props.isHide?!0:t.parent===null?!1:this.getControlIsHide(t.parent)}apply(t){this.engine=t,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(t=>this.computedCalcValue(t))}getAllCalcControl(){this.calcControls=this.engine.runtime.flatInstances.filter(t=>t.type===X.CALC)}getCalcDependencies(){this.calcControls.forEach(t=>{const{scriptEcho:n}=t.props;n.forEach(r=>{(r.type===Te.VariableInMainTable||r.type===Te.VariableInCurrentSubTable||r.type===Te.VariableInOtherSubTable)&&this.setDependenciesTriggerMapItem(r.id,t),r.type===Te.VariableInOtherSubTable&&r.subTableId&&this.setDependenciesTriggerMapItem(r.subTableId,t)})})}setDependenciesTriggerMapItem(t,n){this.dependenciesTriggerMap.has(t)||this.dependenciesTriggerMap.set(t,[]);const r=this.dependenciesTriggerMap.get(t);r.includes(n)||r.push(n)}getCalcControlsFromSubtableRows(t){return t.reduce((n,r)=>(r.children.forEach(u=>{const i=u.children[0];i&&this.engine.assertInstance(i,X.CALC)&&n.push(i)}),n),[])}watchSchemaHideChange(){this.engine.on("schema-change",t=>{var n;t.props==="isHide"&&((n=this.dependenciesTriggerMap.get(t.instance.id))!=null?n:[]).forEach(u=>{this.computedCalcValue(u)})})}watchSubtableChange(){this.engine.on("list-change",t=>{var i,a,s;this.resetDependencies();const n=(a=(i=t.options)==null?void 0:i.changed)!=null?a:[];this.getCalcControlsFromSubtableRows(n).forEach(c=>{this.computedCalcValue(c)}),((s=this.dependenciesTriggerMap.get(t.instance.id))!=null?s:[]).forEach(c=>{this.computedCalcValue(c)})})}watchControlChange(){this.engine.on("change",t=>{var u;const{instance:n}=t;if(!this.dependenciesTriggerMap.has(n.id))return;const r=(u=this.dependenciesTriggerMap.get(n.id))!=null?u:[];t.rowIndex!==void 0&&t.rowIndex>-1?r.forEach(i=>{this.controlInSubtable(i)&&this.engine.getInstanceRowIndex(i)!==t.rowIndex||this.computedCalcValue(i)}):r.forEach(i=>{this.computedCalcValue(i)})})}controlInSubtable(t){var n;return((n=t.parent)==null?void 0:n.type)===X.SUBTABLE_COLUMN}computedCalcValue(t){var c;const n=t.props.scriptEcho;if(!n||n.length===0)return;const r=n.reduce((l,f)=>{if(f.type===Te.Operator||f.type===Te.Number)return l+f.name;let o=0,h;switch(f.type){case Te.VariableInMainTable:{const p=this.getNumberValue(this.engine.getState(f.id));h=this.engine.getInstance(f.id),o=Number(p);break}case Te.VariableInCurrentSubTable:{const p=this.engine.getInstanceRowIndex(t);h=this.engine.getInstance(f.id,p);const d=this.engine.getState(f.id,p),D=this.getNumberValue(d);o=Number(D);break}case Te.VariableInOtherSubTable:{const p=this.engine.getState(f.id),d=Array.isArray(p)?p.map(v=>this.getNumberValue(v)):[],D=this.getAggregateTypeValue(d,f.aggregateType);h=this.engine.getInstance(f.subTableId),o=Number(D);break}}return!Number.isNaN(o)&&this.controlNeedComputedValue(h)?l+=`(${o})`:l+=0,l},"");let u;this.cacheComputedResult[r]!==void 0?u=this.cacheComputedResult[r]:(u=Number(mg(new Function(`return ${r}`)(),{precision:16})),this.cacheComputedResult[r]=u);let i;if(this.controlInSubtable(t)&&(i=this.engine.getInstanceRowIndex(t),i===void 0))return;const a=this.engine.getState(t.id,i),s=!u||u===1/0||u===-1/0?0:t.props.precision===""?u:Number(u.toFixed(t.props.precision));s!==(a==null?void 0:a.result)&&this.engine.setState(t.id,{result:s,unit:(c=a==null?void 0:a.unit)!=null?c:""},i)}getNumberValue(t){if(typeof t=="object"&&t){if("result"in t)return t.result;if("amount"in t)return t.amount}return typeof t=="number"?t:0}getAggregateTypeValue(t,n){if(!n||!t||!t.length)return 0;switch(n){case yt.MAX:return Math.max(...t);case yt.MIN:return Math.min(...t);case yt.SUM:return t.reduce((r,u)=>r+u);case yt.AVG:return t.reduce((r,u)=>r+u)/t.length}}}class Ag{constructor(t){this.config=t}apply(t){var i,a;this.engine=t;const n=(a=(i=this.config)==null?void 0:i.source)!=null?a:"";let r=document.createElement("style");r.className="edit-css",r.type="text/css",r.innerHTML=n,document.querySelector("head").appendChild(r)}}G.CalcPlugin=yg,G.ControlsEventPlugin=PD,G.ES6ModulePlugin=xD,G.Engine=kr,G.LifecycleEventPlugin=TD,G.Plugin=RD,G.StylePlugin=Ag,G.hasChildrenControl=bn,G.loopDataViewControl=Xt,G.loopFormControl=Gt,G.parseModule=Ai,Object.defineProperty(G,"__esModule",{value:!0})});
|