@byteluck-fe/model-driven-engine 2.1.0-beta.1 → 2.1.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
var wD=Object.defineProperty,bD=Object.defineProperties;var BD=Object.getOwnPropertyDescriptors;var wa=Object.getOwnPropertySymbols,_D=Object.getPrototypeOf,SD=Object.prototype.hasOwnProperty,MD=Object.prototype.propertyIsEnumerable,ID=Reflect.get;var yr=Math.pow,ba=(J,oe,le)=>oe in J?wD(J,oe,{enumerable:!0,configurable:!0,writable:!0,value:le}):J[oe]=le,ge=(J,oe)=>{for(var le in oe||(oe={}))SD.call(oe,le)&&ba(J,le,oe[le]);if(wa)for(var le of wa(oe))MD.call(oe,le)&&ba(J,le,oe[le]);return J},fi=(J,oe)=>bD(J,BD(oe));var Ba=(J,oe,le)=>ID(_D(J),le,oe);var it=(J,oe,le)=>new Promise((Er,bn)=>{var Ar=ot=>{try{tn(le.next(ot))}catch(nn){bn(nn)}},Cr=ot=>{try{tn(le.throw(ot))}catch(nn){bn(nn)}},tn=ot=>ot.done?Er(ot.value):Promise.resolve(ot.value).then(Ar,Cr);tn((le=le.apply(J,oe)).next())});(function(J,oe){typeof exports=="object"&&typeof module!="undefined"?oe(exports,require("crypto")):typeof define=="function"&&define.amd?define(["exports","crypto"],oe):(J=typeof globalThis!="undefined"?globalThis:J||self,oe(J.modelDrivenEngine={},J.require$$0))})(this,function(J,oe){"use strict";function le(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var Er=le(oe),bn="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u5B57",Ar="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5B57\u7B26\u4E32",Cr="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5BF9\u8C61",tn="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u7EC4",ot="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5E03\u5C14",nn="{caption}\u5FC5\u586B",_a="\u8BF7\u8F93\u5165\u6807\u9898",Sa="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",Ma="\u8BF7\u8F93\u5165\u63D0\u793A\u6587\u5B57",Ia="\u8BF7\u7ED1\u5B9A\u6570\u636E\u9879",Na="\u8BF7\u7ED1\u5B9A\u8868\u5355",xa="\u8BF7\u7ED1\u5B9A\u5217\u8868",Oa="\u8BF7\u7ED1\u5B9A\u6D41\u7A0B",Ra="\u8BF7\u8F93\u5165\u663E\u793A\u503C",Ta="\u8BF7\u8F93\u5165\u5B58\u50A8\u503C",Pa="\u5355\u636E\u7F16\u53F7\u672A\u7ED1\u5B9A\u6570\u636E\u9879",$a="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5\uFF01",ja="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",La="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u7684\u6570\u503C",qa="\u8BF7\u8F93\u5165\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",ka="\u6570\u503C\u8303\u56F4\u8BBE\u7F6E\u6709\u8BEF",Va="\u8BF7\u8F93\u5165\u957F\u5EA6\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u503C",Ua="\u9644\u4EF6\u5927\u5C0F\u5FC5\u987B\u57280MB\u81F31000MB\u4E4B\u95F4",Ha="\u8BF7\u586B\u5199\u603B\u5206\u8BBE\u7F6E",za="\u603B\u5206\u4E0D\u80FD\u5C0F\u4E8E1",Wa="\u9ED8\u8BA4\u503C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",Za="\u9644\u4EF6\u4E0A\u4F20\u7684\u6570\u91CF\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",Ga="\u8BF7\u91CD\u65B0\u9009\u62E9\u53EF\u9009\u6570\u91CF",Xa="\u8BE5\u63A7\u4EF6\u6700\u5927\u957F\u5EA6\u9700\u5927\u4E8E\u6700\u5C0F\u957F\u5EA6",Ka="\u8BE5\u63A7\u4EF6\u6700\u5C0F\u957F\u5EA6\u9700\u5C0F\u4E8E\u6700\u5927\u957F\u5EA6",Ja="\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u9009\u9879\u8BBE\u7F6E",Qa="\u9009\u9879ID\u4E0D\u80FD\u91CD\u590D",Ya="\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u6761\u9009\u9879",es="\u8BF7\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",ts="\u8BF7\u7ED1\u5B9A\u5B58\u50A8\u503C",ns="\u8BF7\u7ED1\u5B9A\u670D\u52A1",rs="\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",us="\u8BF7\u9009\u62E9\u7701",is="\u8BF7\u9009\u62E9\u5E02",os="\u8BF7\u9009\u62E9\u533A",as="\u6700\u5C11\u586B\u5199\u884C\u6570\u4E0D\u80FD\u5C0F\u4E8E0",ss="\u884C\u6570\u91CF\u4E0D\u80FD\u5C0F\u4E8E{min}\u884C",cs="\u8BF7\u8F93\u5165\u5217\u5BBD",fs="\u8BF7\u8BBE\u7F6E\u6240\u6709\u89C4\u5219\u6761\u4EF6\u7684\u903B\u8F91\u5173\u7CFB",ls="\u8BF7\u5C06\u6240\u6709\u89C4\u5219\u6761\u4EF6\u586B\u5199\u5B8C\u6574",hs="\u8BF7\u9009\u62E9\u63A7\u4EF6",ds="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5",ps="\u8BF7\u9009\u62E9\u56DE\u586B\u8BBE\u7F6E",Ds="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",gs="\u8BF7\u9009\u62E9\u6839\u8282\u70B9",vs="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",ms="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",ys="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Es="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",As="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Cs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Fs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",ws="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",bs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Bs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",_s="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Ss="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Ms="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Is="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Ns="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",xs="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Os="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Rs={isNotNumber:bn,isNotString:Ar,isNotObject:Cr,isNotArray:tn,isNotBoolean:ot,runtimeRequired:nn,pleaseEnterCaption:_a,pleaseEnterCaptionTip:Sa,pleaseEnterPlaceholder:Ma,pleaseEnterFieldCode:Ia,pleaseEnterForm:Na,pleaseEnterList:xa,pleaseEnterProcess:Oa,pleaseEnterLabel:Ra,pleaseEnterValue:Ta,bizKeyNotBindFiled:Pa,pleaseSelectOneField:$a,pleaseEnterNumberRange:ja,pleaseEnterAValueGreaterThanMin:La,pleaseEnterAValueLessThanMax:qa,numberRangeSetError:ka,stringRangeError:Va,attachmentMaxSize:Ua,pleaseEnterTotalScoreSetting:Ha,theTotalScoreMustNotBeLessThan1:za,scoreDefaultValueRange:Wa,attachmentLimitError:Za,PleaseReselectTheOptionalQuantity:Ga,TheMaximumLengthIsGreaterThanTheMinimumLength:Xa,TheMinimumLengthIsGreaterThanTheMaximumLength:Ka,PleaseSelectTheCorrectOptionSettings:Ja,optionIdIsRepeat:Qa,optionIsRequired:Ya,pleaseEnterDataCode:es,pleaseEnterValueFieldCode:ts,pleaseEnterSvcCode:ns,pleaseBindAtLeastOneDisplayValue:rs,pleaseSelectProvince:us,pleaseSelectCity:is,pleaseSelectDistrict:os,limitRowsCannotBeLessThan0:as,TheNumberOfRowsCannotBeLessThanMinRows:ss,pleaseEnterColumnWidth:cs,pleaseSetTheLogicalRelationshipOfAllRuleConditions:fs,pleaseCompleteAllRulesAndConditions:ls,pleaseSelectControl:hs,pleaseSelectAtLeastOneColumn:ds,pleaseSelectFillBackMode:ps,pleaseSelectDashboard:Ds,rootNodeIsRequired:gs,theViewNameCannotBeEmpty:vs,pleaseSelectOcrType:ms,pleaseSelectAtLeastOneFieldToFillIn:ys,pleaseChooseAtLeastOne:Es,pleaseEnterButtonContent:As,pleaseEnterDataCodeInDataSetting:Cs,pleaseEnterValueFieldCodeInDataSetting:Fs,pleaseEnterSvcCodeInDataSetting:ws,pleaseBindAtLeastOneDisplayValueInDataSetting:bs,rootNodeIsRequiredInDataSetting:Bs,pleaseEnterMaxHeight:_s,pleaseEnter:Ss,pleaseEnterWatermark:Ms,pleaseEnterFileName:Is,pleaseUploadAtLeastOnePrintTemplate:Ns,pleaseAssignBusiness:xs,pleaseAssignExternal:Os},Ts="Please enter a number",Ps="Please enter a string",$s="Please enter an object",js="Please enter an array",Ls="Please enter a boolean",qs="{caption} Required",ks="Please enter the title",Vs="Please enter the bubble prompt",Us="Please enter the prompt text",Hs="Please bind data items",zs="Please bind the form",Ws="Please bind the list",Zs="Please bind the process",Gs="Please enter the displayed value",Xs="Please enter the stored value",Ks="The document number is not bound to the data item",Js="Please select at least one display field",Qs="Please enter a value greater than or equal to {min} and less than or equal to {max}",Ys="Please enter a value greater than or equal to {min}",ec="Please enter a value less than or equal to {max}",tc="The value range is set incorrectly",nc="Please enter a value with a length greater than or equal to {min} and less than or equal to {max}",rc="The attachment size must be between 0MB and 1000MB",uc="Please fill in the total score setting",ic="The total score cannot be less than 1",oc="The default value must be between {min} and {max}",ac="The number of attachments uploaded must be between {min} and {max}",sc="Please re-select the optional quantity",cc="The maximum length of the control must be greater than the minimum length",fc="The minimum length of the control must be less than the maximum length",lc="Please select the correct option setting",hc="Option ID cannot be repeated",dc="Please enter at least one option",pc="Please bind the data source",Dc="Please bind the stored value",gc="Please bind the service",vc="At least one display value must be bound",mc="Please select a province",yc="Please select a city",Ec="Please select a district",Ac="The minimum number of lines to fill in cannot be less than 0",Cc="The number of rows cannot be less than {min} rows",Fc="Please enter the column width",wc="Please set the logical relationship of all rule conditions",bc="Please complete all rules and conditions",Bc="please select control",_c="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Sc="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Mc="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Ic="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Nc="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",xc="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Oc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Rc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Tc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Pc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",$c="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",jc="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Lc="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",qc="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",kc="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Vc="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Uc="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Hc="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",zc={isNotNumber:Ts,isNotString:Ps,isNotObject:$s,isNotArray:js,isNotBoolean:Ls,runtimeRequired:qs,pleaseEnterCaption:ks,pleaseEnterCaptionTip:Vs,pleaseEnterPlaceholder:Us,pleaseEnterFieldCode:Hs,pleaseEnterForm:zs,pleaseEnterList:Ws,pleaseEnterProcess:Zs,pleaseEnterLabel:Gs,pleaseEnterValue:Xs,bizKeyNotBindFiled:Ks,pleaseSelectOneField:Js,pleaseEnterNumberRange:Qs,pleaseEnterAValueGreaterThanMin:Ys,pleaseEnterAValueLessThanMax:ec,numberRangeSetError:tc,stringRangeError:nc,attachmentMaxSize:rc,pleaseEnterTotalScoreSetting:uc,theTotalScoreMustNotBeLessThan1:ic,scoreDefaultValueRange:oc,attachmentLimitError:ac,PleaseReselectTheOptionalQuantity:sc,TheMaximumLengthIsGreaterThanTheMinimumLength:cc,TheMinimumLengthIsGreaterThanTheMaximumLength:fc,PleaseSelectTheCorrectOptionSettings:lc,optionIdIsRepeat:hc,optionIsRequired:dc,pleaseEnterDataCode:pc,pleaseEnterValueFieldCode:Dc,pleaseEnterSvcCode:gc,pleaseBindAtLeastOneDisplayValue:vc,pleaseSelectProvince:mc,pleaseSelectCity:yc,pleaseSelectDistrict:Ec,limitRowsCannotBeLessThan0:Ac,TheNumberOfRowsCannotBeLessThanMinRows:Cc,pleaseEnterColumnWidth:Fc,pleaseSetTheLogicalRelationshipOfAllRuleConditions:wc,pleaseCompleteAllRulesAndConditions:bc,pleaseSelectControl:Bc,pleaseSelectDashboard:_c,theViewNameCannotBeEmpty:Sc,pleaseSelectOcrType:Mc,pleaseSelectAtLeastOneFieldToFillIn:Ic,pleaseChooseAtLeastOne:Nc,pleaseEnterButtonContent:xc,pleaseEnterDataCodeInDataSetting:Oc,pleaseEnterValueFieldCodeInDataSetting:Rc,pleaseEnterSvcCodeInDataSetting:Tc,pleaseBindAtLeastOneDisplayValueInDataSetting:Pc,rootNodeIsRequiredInDataSetting:$c,pleaseEnterMaxHeight:jc,pleaseEnter:Lc,pleaseEnterWatermark:qc,pleaseEnterFileName:kc,pleaseUploadAtLeastOnePrintTemplate:Vc,pleaseAssignBusiness:Uc,pleaseAssignExternal:Hc},Wc="\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Zc="\u6587\u5B57\u5217\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Gc="\u5BFE\u8C61\u7269\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Xc="\u6570\u5B57\u7D44\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Kc="\u30D6\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Jc="{caption}\u5FC5\u9808",Qc="\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Yc="\u6C17\u6CE1\u306E\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",ef="\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",tf="\u30C7\u30FC\u30BF\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",nf="\u30B7\u30FC\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",rf="\u30EA\u30B9\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",uf="\u30D5\u30ED\u30FC\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",of="\u8868\u793A\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",af="\u4FDD\u5B58\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",sf="\u30B7\u30FC\u30C8\u756A\u53F7\u304C\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",cf="\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u8868\u793A\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",ff="{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",lf="{min}\u4EE5\u4E0A\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",hf="{max}\u672A\u6E80\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",df="\u6570\u5024\u7BC4\u56F2\u8A2D\u5B9A\u30A8\u30E9\u30FC",pf="\u9577\u3055\u304C{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Df="\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306F0MB\u304B\u30891000MB\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",gf="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",vf="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u306F\uFF11\u4EE5\u4E0A\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",mf="\u57FA\u672C\u8A2D\u5B9A\u5024\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",yf="\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4EF6\u6570\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059",Ef="\u6570\u91CF\u3092\u518D\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Af="\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",Cf="\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",Ff="\u6B63\u78BA\u306A\u8A2D\u5B9A\u5024\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",wf="ID\u306F\u91CD\u8907\u3057\u306A\u3044\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",bf="\u6700\u4F4E\uFF11\u70B9\u3092\u9078\u3076\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",Bf="\u5143\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",_f="\u4FDD\u5B58\u5024\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Sf="\u30B5\u30FC\u30D3\u30B9\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Mf="\u8868\u793A\u5024\u3092\u30EA\u30F3\u30AF\u3057\u76F4\u3057\u3057\u3066\u4E0B\u3055\u3044",If="\u7701\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Nf="\u5E02\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",xf="\u533A\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Of="\u6700\u5C0F\u5024\u306F\uFF10\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Rf="\u6700\u4F4E\u884C\u6570\u306F{min}\u884C\u3067\u304A\u9858\u3044\u3057\u307E\u3059",Tf="\u5217\u5E45\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Pf="\u5168\u3066\u306E\u6761\u4EF6\u306E\u30ED\u30B8\u30C3\u30AF\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",$f="\u5168\u3066\u306E\u6761\u4EF6\u3092\u5B8C\u6210\u3055\u305B\u3066\u4E0B\u3055\u3044",jf="please select control",Lf="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",qf="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",kf="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Vf="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Uf="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Hf="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",zf="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Wf="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Zf="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Gf="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Xf="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Kf="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Jf="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Qf="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Yf="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",el="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",tl="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",nl="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",rl={isNotNumber:Wc,isNotString:Zc,isNotObject:Gc,isNotArray:Xc,isNotBoolean:Kc,runtimeRequired:Jc,pleaseEnterCaption:Qc,pleaseEnterCaptionTip:Yc,pleaseEnterPlaceholder:ef,pleaseEnterFieldCode:tf,pleaseEnterForm:nf,pleaseEnterList:rf,pleaseEnterProcess:uf,pleaseEnterLabel:of,pleaseEnterValue:af,bizKeyNotBindFiled:sf,pleaseSelectOneField:cf,pleaseEnterNumberRange:ff,pleaseEnterAValueGreaterThanMin:lf,pleaseEnterAValueLessThanMax:hf,numberRangeSetError:df,stringRangeError:pf,attachmentMaxSize:Df,pleaseEnterTotalScoreSetting:gf,theTotalScoreMustNotBeLessThan1:vf,scoreDefaultValueRange:mf,attachmentLimitError:yf,PleaseReselectTheOptionalQuantity:Ef,TheMaximumLengthIsGreaterThanTheMinimumLength:Af,TheMinimumLengthIsGreaterThanTheMaximumLength:Cf,PleaseSelectTheCorrectOptionSettings:Ff,optionIdIsRepeat:wf,optionIsRequired:bf,pleaseEnterDataCode:Bf,pleaseEnterValueFieldCode:_f,pleaseEnterSvcCode:Sf,pleaseBindAtLeastOneDisplayValue:Mf,pleaseSelectProvince:If,pleaseSelectCity:Nf,pleaseSelectDistrict:xf,limitRowsCannotBeLessThan0:Of,TheNumberOfRowsCannotBeLessThanMinRows:Rf,pleaseEnterColumnWidth:Tf,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Pf,pleaseCompleteAllRulesAndConditions:$f,pleaseSelectControl:jf,pleaseSelectDashboard:Lf,theViewNameCannotBeEmpty:qf,pleaseSelectOcrType:kf,pleaseSelectAtLeastOneFieldToFillIn:Vf,pleaseChooseAtLeastOne:Uf,pleaseEnterButtonContent:Hf,pleaseEnterDataCodeInDataSetting:zf,pleaseEnterValueFieldCodeInDataSetting:Wf,pleaseEnterSvcCodeInDataSetting:Zf,pleaseBindAtLeastOneDisplayValueInDataSetting:Gf,rootNodeIsRequiredInDataSetting:Xf,pleaseEnterMaxHeight:Kf,pleaseEnter:Jf,pleaseEnterWatermark:Qf,pleaseEnterFileName:Yf,pleaseUploadAtLeastOnePrintTemplate:el,pleaseAssignBusiness:tl,pleaseAssignExternal:nl},ul={zhCN:Rs,enUS:zc,jaJP:rl},Ve;(function(e){e.Number="Number",e.Operator="Operator",e.VariableInMainTable="VariableInMainTable",e.VariableInCurrentSubTable="VariableInCurrentSubTable",e.VariableInOtherSubTable="VariableInOtherSubTable",e.UndefinedVariable="UndefinedVariable"})(Ve||(Ve={}));var Tt;(function(e){e.SUM="SUM",e.AVG="AVG",e.MAX="MAX",e.MIN="MIN"})(Tt||(Tt={}));var li="zh-CN";function Re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ke;(function(e){e.BASE="base",e.FORM="form",e.LAYOUT="layout",e.WRAP="wrap",e.COLUMN="column",e.LIST="list",e.SEARCH="search"})(Ke||(Ke={}));var Q;(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"})(Q||(Q={}));var K;(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"})(K||(K={}));var _e;_e={},Re(_e,K.ARRAY,Q.ARRAY_COLUMN),Re(_e,K.AUTO_NUMBER,Q.AUTO_NUMBER_COLUMN),Re(_e,K.DECIMAL,Q.DECIMAL_COLUMN),Re(_e,K.DEPARTMENTS,Q.DEPARTMENT_COLUMN),Re(_e,K.FILE,Q.FILE_COLUMN),Re(_e,K.IMAGE,Q.IMAGE_COLUMN),Re(_e,K.ADDRESS,Q.LOCATION_COLUMN),Re(_e,K.EMPLOYEES,Q.EMPLOYEE_COLUMN),Re(_e,K.TEXT,Q.TEXT_COLUMN),Re(_e,K.TIMESCOPE,Q.TIMESCOPE_COLUMN),Re(_e,K.TIMESTAMP,Q.TIMESTAMP_COLUMN),Re(_e,K.VARCHAR,Q.VARCHAR_COLUMN),Re(_e,K.RELATION,Q.VARCHAR_COLUMN);var hi;(function(e){e.YEAR="year",e.MONTH="month",e.DATE="date",e.DATETIME="datetime"})(hi||(hi={}));var di="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",il=di+"0123456789";function Fr(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:15,t="",n=0;n<e;n++){var r=n===0?di:il,u=Math.random()*r.length;t+=r[parseInt(String(u),10)]}return t}function wr(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 ol(e){if(Array.isArray(e))return wr(e)}function al(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function sl(){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 Bn(e,t,n){return sl()?Bn=Reflect.construct:Bn=function(u,i,o){var c=[null];c.push.apply(c,i);var s=Function.bind.apply(u,c),l=new s;return o&&un(l,o.prototype),l},Bn.apply(null,arguments)}function rn(e){return rn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},rn(e)}function Di(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&&un(e,t)}function cl(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function fl(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}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 hl(e,t){return t&&(dl(t)==="object"||typeof t=="function")?t:al(e)}function un(e,t){return un=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},un(e,t)}function gi(e){return ol(e)||fl(e)||pl(e)||ll()}var dl=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function pl(e,t){if(!!e){if(typeof e=="string")return wr(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 wr(e,t)}}function br(e){var t=typeof Map=="function"?new Map:void 0;return br=function(r){if(r===null||!cl(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 Bn(r,arguments,rn(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),un(u,r)},br(e)}function Dl(){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 vi(e){var t=Dl();return function(){var r=rn(e),u;if(t){var i=rn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return hl(this,u)}}var Br=console;function dt(){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=Br).warn.apply(r,["\u{1F9D0} Driven Warning:"+t[0]].concat(gi(u)))}function _r(){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=Br).log.apply(r,["\u{1F680} Driven Log:"+t[0]].concat(gi(u)))}function gl(e){return e+" \u{1F41B}\u{1F41B}\u{1F41B}"}var Sr=function(e){Di(n,e);var t=vi(n);function n(r){pi(this,n);var u;return u=t.call(this,r),u.name="\u{1F4A5} Driven Error",u.message=r?gl(r):"An unknown error occurred in the Driven, please contact the person in charge \u{1F691}\u{1F691}\u{1F691}",u}return n}(br(Error)),vl=function(e){Di(n,e);var t=vi(n);function n(r){pi(this,n);var u;return u=t.call(this,r),u.name="\u{1F6A8} Driven Reference Error",u}return n}(Sr);function at(e){throw new Sr(e)}function mi(e){throw new vl(e)}function _n(e){Br.error(new Sr(e))}function _t(e,t){Array.isArray(e)&&e.map(function(n){switch(n.controlType){case"layout":_t(n==null?void 0:n.children,t);break;case"search":_t(n==null?void 0:n.children,t);break;case"form":t(n)}})}var ml=Object.prototype.toString;function yi(e,t){return ml.call(e)==="[object "+t+"]"}function yl(e){return yi(e,"String")}function El(e){return yi(e,"Promise")}var Al=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();El(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,o,c){if(u!==void 0){var s=u[i];if(!(o===c.length-1&&!yl(s)))return s}},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 Cl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ue=function(){function e(){Cl(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]:li;return new Al({locale:n,messages:ul})},e.setLocale=function(n){return this.$i18n.setLocale(n)},e}();Ue.$i18n=Ue.resetI18n();function Ei(e,t,n){var r=t.replace(/\[(\d)]/g,function(i,o){return"."+o}).split("."),u=!1;return r.reduce(function(i,o,c,s){var l=i;if(!!i){if(!Object.prototype.hasOwnProperty.call(i,o)){dt("Can not set ".concat(t,"'s ").concat(o," property in current %o, Because there is no ").concat(o," property on the %o"),i,i);return}return c===s.length-1&&!Object.is(l[o],n)&&(l[o]=n,u=!0),l[o]}},e),u}var je=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ai(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Mr={exports:{}};(function(e){(function(t){var n=function(g,A,M){if(!l(A)||a(A)||h(A)||d(A)||s(A))return A;var w,x=0,P=0;if(f(A))for(w=[],P=A.length;x<P;x++)w.push(n(g,A[x],M));else{w={};for(var L in A)Object.prototype.hasOwnProperty.call(A,L)&&(w[g(L,M)]=n(g,A[L],M))}return w},r=function(g,A){A=A||{};var M=A.separator||"_",w=A.split||/(?=[A-Z])/;return g.split(w).join(M)},u=function(g){return p(g)?g:(g=g.replace(/[\-_\s]+(.)?/g,function(A,M){return M?M.toUpperCase():""}),g.substr(0,1).toLowerCase()+g.substr(1))},i=function(g){var A=u(g);return A.substr(0,1).toUpperCase()+A.substr(1)},o=function(g,A){return r(g,A).toLowerCase()},c=Object.prototype.toString,s=function(g){return typeof g=="function"},l=function(g){return g===Object(g)},f=function(g){return c.call(g)=="[object Array]"},a=function(g){return c.call(g)=="[object Date]"},h=function(g){return c.call(g)=="[object RegExp]"},d=function(g){return c.call(g)=="[object Boolean]"},p=function(g){return g=g-0,g===g},D=function(g,A){var M=A&&"process"in A?A.process:A;return typeof M!="function"?g:function(w,x){return M(w,g,x)}},m={camelize:u,decamelize:o,pascalize:i,depascalize:o,camelizeKeys:function(g,A){return n(D(u,A),g)},decamelizeKeys:function(g,A){return n(D(o,A),g,A)},pascalizeKeys:function(g,A){return n(D(i,A),g)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=m:t.humps=m})(je)})(Mr);function he(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 Fl(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1}function Pt(e){return Array.isArray(e)}function Te(e){return typeof e=="string"}function Sn(e){return typeof e=="number"}function Ci(e){return typeof e=="function"}function wl(e){return Pt(e)&&e.every(function(t){return Te(t)})}function bl(e){return Pt(e)&&e.every(function(t){return Sn(t)||t===""})}function Fi(e){return/^\[.*?]$/.test(e)}function Mn(e){return/^{.*?}$/.test(e)}function Ir(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 Bl(e){if(Array.isArray(e))return Ir(e)}function wi(e,t,n,r,u,i,o){try{var c=e[i](o),s=c.value}catch(l){n(l);return}c.done?t(s):Promise.resolve(s).then(r,u)}function _l(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(s){wi(i,r,u,o,c,"next",s)}function c(s){wi(i,r,u,o,c,"throw",s)}o(void 0)})}}function Sl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ml(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function Il(){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 Bl(e)||Ml(e)||Nl(e)||Il()}function Nl(e,t){if(!!e){if(typeof e=="string")return Ir(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 Ir(e,t)}}var xl=function(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(f){return s([l,f])}}function s(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)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 o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}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}}},bi=function(){function e(){Sl(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),o=1;o<u;o++)i[o-1]=arguments[o];var c=this;return _l(function(){var s,l,f,a,h,d,p,D,m,g,A,M;return xl(this,function(w){switch(w.label){case 0:if(s=c._events.get(r),l=[],!s)return[3,10];f=s.slice(),a=!0,h=!1,d=void 0,w.label=1;case 1:w.trys.push([1,8,9,10]),p=f[Symbol.iterator](),w.label=2;case 2:if(a=(D=p.next()).done)return[3,7];if(m=D.value,!s.includes(m))return[3,6];w.label=3;case 3:return w.trys.push([3,5,,6]),c.debug&&_r.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(m.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+m.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"\u3002")].concat(Nr(i))),[4,m.apply(null,Nr(i))];case 4:return g=w.sent(),c.debug&&_r.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(m.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+m.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"; \u51FD\u6570\u7684\u8FD4\u56DE\u7ED3\u679C\u4E3A%o")].concat(Nr(i),[g])),l.push(g),g===!1?[3,7]:[3,6];case 5:return A=w.sent(),_n(String(A)),[3,6];case 6:return a=!0,[3,2];case 7:return[3,10];case 8:return M=w.sent(),h=!0,d=M,[3,10];case 9:try{!a&&p.return!=null&&p.return()}finally{if(h)throw d}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),o=i==null?void 0:i.indexOf(u);i==null||i.splice(o,1)}},t.delete=function(r){this._events.has(r)&&this._events.delete(r)},t.clear=function(){this._events=new Map},e}();function Ol(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Rl=[{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_render_operation",name:"\u64CD\u4F5C\u5217\u6E32\u67D3\u65F6",code:"list-render-operation"},{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"}],Bi=function(){function e(){Ol(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}();Bi.events=Rl;function Tl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _i=[],In=function(){function e(n){Tl(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__||at("".concat(r.name," is not a Control"));var u=this._controls.findIndex(function(i){return i.controlType===r.controlType});return u>-1&&(dt("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===Ke.LAYOUT},t.isFormControl=function(r){return r.controlType===Ke.FORM},t.isListControl=function(r){return r.controlType===Ke.LIST},t.isColumnControl=function(r){return r.controlType===Ke.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 o=this.getControlFormType(r.type);if(o){var c=r;if(typeof u=="function"){var s=u(c);s&&(c=s)}var l=new o(c);return l}else at("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__)&&at("".concat(r," is can't register as a Control"));var o=this.staticControls.findIndex(function(c){return c.Designer.controlType===u.controlType});return o>-1&&(dt("The ".concat(u.controlType," is repeat register, So it overwrites the one that was registered before.")),this.staticControls.splice(o,1)),this.staticRegisteredTypes.add(u.controlType),this.staticControls.push(r),this},e}();In.staticControls=_i,In.staticRegisteredTypes=new Set(_i.map(function(e){return e.Designer.controlType})),In.staticRegisteredConfigs=new Map;function St(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var on=function e(t){St(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:""},pt=function e(){St(this,e)},Nn=function e(t){St(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:xr.CNY},xn=function e(t){St(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){St(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 o;this.province=(o=t==null?void 0:t.province)!==null&&o!==void 0?o:"";var c;this.provinceDisplay=(c=t==null?void 0:t.provinceDisplay)!==null&&c!==void 0?c:""},Rn=function e(t){St(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:""},xr;(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"})(xr||(xr={}));var Si;(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"})(Si||(Si={}));var Or;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.READONLY=1]="READONLY",e[e.EDITABLE=2]="EDITABLE",e[e.PRINT=5]="PRINT"})(Or||(Or={}));var Pl=function e(t){St(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 $l(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jl(){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 Tn(e,t,n){return jl()?Tn=Reflect.construct:Tn=function(u,i,o){var c=[null];c.push.apply(c,i);var s=Function.bind.apply(u,c),l=new s;return o&&sn(l,o.prototype),l},Tn.apply(null,arguments)}function an(e){return an=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},an(e)}function Ll(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&&sn(e,t)}function ql(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function kl(e,t){return t&&(Vl(t)==="object"||typeof t=="function")?t:$l(e)}function sn(e,t){return sn=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},sn(e,t)}var Vl=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Tr(e){var t=typeof Map=="function"?new Map:void 0;return Tr=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 Tn(r,arguments,an(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),sn(u,r)},Tr(e)}function Ul(){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 Hl(e){var t=Ul();return function(){var r=an(e),u;if(t){var i=an(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return kl(this,u)}}var Mi=function e(t){Rr(this,e),this.isHide={type:"boolean"}},Ii=function(e){Ll(n,e);var t=Hl(n);function n(r){return Rr(this,n),t.call(this)}return n}(Tr(Array)),Mt=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";Rr(this,e);var r;this.isHide=(r=t==null?void 0:t.isHide)!==null&&r!==void 0?r:!1,this.style=new Pl(t==null?void 0:t.style);var u;this.caption=(u=t==null?void 0:t.caption)!==null&&u!==void 0?u:n};Mt.Rules=Mi,Mt.RuntimeRules=Ii;function Qe(){return Qe=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},Qe.apply(this,arguments)}function zl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Pr(e){return Pr=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Pr(e)}function Pn(e,t){return Pn=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Pn(e,t)}function Wl(){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 $n(e,t,n){return Wl()?$n=Reflect.construct:$n=function(u,i,o){var c=[null];c.push.apply(c,i);var s=Function.bind.apply(u,c),l=new s;return o&&Pn(l,o.prototype),l},$n.apply(null,arguments)}function Zl(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function $r(e){var t=typeof Map=="function"?new Map:void 0;return $r=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 $n(r,arguments,Pr(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),Pn(u,r)},$r(e)}var Gl=/%[sdj%]/g,Ni=function(){};typeof process!="undefined"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window!="undefined"&&typeof document!="undefined"&&(Ni=function(t,n){typeof console!="undefined"&&console.warn&&n.every(function(r){return typeof r=="string"})&&console.warn(t,n)});function jr(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 Pe(){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 o=String(u).replace(Gl,function(c){if(c==="%%")return"%";if(r>=i)return c;switch(c){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(s){return"[Circular]"}break;default:return c}});return o}return u}function Xl(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function de(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Xl(t)&&typeof e=="string"&&!e)}function Kl(e,t,n){var r=[],u=0,i=e.length;function o(c){r.push.apply(r,c),u++,u===i&&n(r)}e.forEach(function(c){t(c,o)})}function xi(e,t,n){var r=0,u=e.length;function i(o){if(o&&o.length){n(o);return}var c=r;r=r+1,c<u?t(e[c],i):n([])}i([])}function Jl(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n])}),t}var Oi=function(e){zl(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}($r(Error));function Ql(e,t,n,r){if(t.first){var u=new Promise(function(a,h){var d=function(m){return r(m),m.length?h(new Oi(m,jr(m))):a()},p=Jl(e);xi(p,n,d)});return u.catch(function(a){return a}),u}var i=t.firstFields||[];i===!0&&(i=Object.keys(e));var o=Object.keys(e),c=o.length,s=0,l=[],f=new Promise(function(a,h){var d=function(D){if(l.push.apply(l,D),s++,s===c)return r(l),l.length?h(new Oi(l,jr(l))):a()};o.length||(r(l),a()),o.forEach(function(p){var D=e[p];i.indexOf(p)!==-1?xi(D,n,d):Kl(D,n,d)})});return f.catch(function(a){return a}),f}function Ri(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 Ti(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]=Qe(Qe({},e[n]),r):e[n]=r}}return e}function Pi(e,t,n,r,u,i){e.required&&(!n.hasOwnProperty(e.field)||de(t,i||e.type))&&r.push(Pe(u.messages.required,e.fullField))}function Yl(e,t,n,r,u){(/^\s+$/.test(t)||t==="")&&r.push(Pe(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},cn={integer:function(t){return cn.number(t)&&parseInt(t,10)===t},float:function(t){return cn.number(t)&&!cn.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"&&!cn.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 e0(e,t,n,r,u){if(e.required&&t===void 0){Pi(e,t,n,r,u);return}var i=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=e.type;i.indexOf(o)>-1?cn[o](t)||r.push(Pe(u.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&r.push(Pe(u.messages.types[o],e.fullField,e.type))}function t0(e,t,n,r,u){var i=typeof e.len=="number",o=typeof e.min=="number",c=typeof e.max=="number",s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=t,f=null,a=typeof t=="number",h=typeof t=="string",d=Array.isArray(t);if(a?f="number":h?f="string":d&&(f="array"),!f)return!1;d&&(l=t.length),h&&(l=t.replace(s,"_").length),i?l!==e.len&&r.push(Pe(u.messages[f].len,e.fullField,e.len)):o&&!c&&l<e.min?r.push(Pe(u.messages[f].min,e.fullField,e.min)):c&&!o&&l>e.max?r.push(Pe(u.messages[f].max,e.fullField,e.max)):o&&c&&(l<e.min||l>e.max)&&r.push(Pe(u.messages[f].range,e.fullField,e.min,e.max))}var $t="enum";function n0(e,t,n,r,u){e[$t]=Array.isArray(e[$t])?e[$t]:[],e[$t].indexOf(t)===-1&&r.push(Pe(u.messages[$t],e.fullField,e[$t].join(", ")))}function r0(e,t,n,r,u){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(Pe(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(Pe(u.messages.pattern.mismatch,e.fullField,t,e.pattern))}}}var Z={required:Pi,whitespace:Yl,type:e0,range:t0,enum:n0,pattern:r0};function u0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t,"string")&&!e.required)return n();Z.required(e,t,r,i,u,"string"),de(t,"string")||(Z.type(e,t,r,i,u),Z.range(e,t,r,i,u),Z.pattern(e,t,r,i,u),e.whitespace===!0&&Z.whitespace(e,t,r,i,u))}n(i)}function i0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&Z.type(e,t,r,i,u)}n(i)}function o0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(t===""&&(t=void 0),de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&(Z.type(e,t,r,i,u),Z.range(e,t,r,i,u))}n(i)}function a0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&Z.type(e,t,r,i,u)}n(i)}function s0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),de(t)||Z.type(e,t,r,i,u)}n(i)}function c0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&(Z.type(e,t,r,i,u),Z.range(e,t,r,i,u))}n(i)}function f0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&(Z.type(e,t,r,i,u),Z.range(e,t,r,i,u))}n(i)}function l0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(t==null&&!e.required)return n();Z.required(e,t,r,i,u,"array"),t!=null&&(Z.type(e,t,r,i,u),Z.range(e,t,r,i,u))}n(i)}function h0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&Z.type(e,t,r,i,u)}n(i)}var d0="enum";function p0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&Z[d0](e,t,r,i,u)}n(i)}function D0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t,"string")&&!e.required)return n();Z.required(e,t,r,i,u),de(t,"string")||Z.pattern(e,t,r,i,u)}n(i)}function g0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t,"date")&&!e.required)return n();if(Z.required(e,t,r,i,u),!de(t,"date")){var c;t instanceof Date?c=t:c=new Date(t),Z.type(e,c,r,i,u),c&&Z.range(e,c.getTime(),r,i,u)}}n(i)}function v0(e,t,n,r,u){var i=[],o=Array.isArray(t)?"array":typeof t;Z.required(e,t,r,i,u,o),n(i)}function qr(e,t,n,r,u){var i=e.type,o=[],c=e.required||!e.required&&r.hasOwnProperty(e.field);if(c){if(de(t,i)&&!e.required)return n();Z.required(e,t,r,o,u,i),de(t,i)||Z.type(e,t,r,o,u)}n(o)}function m0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u)}n(i)}var fn={string:u0,method:i0,number:o0,boolean:a0,regexp:s0,integer:c0,float:f0,array:l0,object:h0,enum:p0,pattern:D0,date:g0,url:qr,hex:qr,email:qr,required:v0,any:m0};function kr(){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 Vr=kr();function Dt(e){this.rules=null,this._messages=Vr,this.define(e)}Dt.prototype={messages:function(t){return t&&(this._messages=Ti(kr(),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,o=n,c=r;if(typeof o=="function"&&(c=o,o={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(),Promise.resolve();function s(D){var m,g=[],A={};function M(w){if(Array.isArray(w)){var x;g=(x=g).concat.apply(x,w)}else g.push(w)}for(m=0;m<D.length;m++)M(D[m]);g.length?A=jr(g):(g=null,A=null),c(g,A)}if(o.messages){var l=this.messages();l===Vr&&(l=kr()),Ti(l,o.messages),o.messages=l}else o.messages=this.messages();var f,a,h={},d=o.keys||Object.keys(this.rules);d.forEach(function(D){f=u.rules[D],a=i[D],f.forEach(function(m){var g=m;typeof g.transform=="function"&&(i===t&&(i=Qe({},i)),a=i[D]=g.transform(a)),typeof g=="function"?g={validator:g}:g=Qe({},g),g.validator=u.getValidationMethod(g),g.field=D,g.fullField=g.fullField||D,g.type=u.getType(g),g.validator&&(h[D]=h[D]||[],h[D].push({rule:g,value:a,source:i,field:D}))})});var p={};return Ql(h,o,function(D,m){var g=D.rule,A=(g.type==="object"||g.type==="array")&&(typeof g.fields=="object"||typeof g.defaultField=="object");A=A&&(g.required||!g.required&&D.value),g.field=D.field;function M(P,L){return Qe(Qe({},L),{},{fullField:g.fullField+"."+P})}function w(P){P===void 0&&(P=[]);var L=P;if(Array.isArray(L)||(L=[L]),!o.suppressWarning&&L.length&&Dt.warning("async-validator:",L),L.length&&g.message!==void 0&&(L=[].concat(g.message)),L=L.map(Ri(g)),o.first&&L.length)return p[g.field]=1,m(L);if(!A)m(L);else{if(g.required&&!D.value)return g.message!==void 0?L=[].concat(g.message).map(Ri(g)):o.error&&(L=[o.error(g,Pe(o.messages.required,g.field))]),m(L);var I={};if(g.defaultField)for(var j in D.value)D.value.hasOwnProperty(j)&&(I[j]=g.defaultField);I=Qe(Qe({},I),D.rule.fields);for(var G in I)if(I.hasOwnProperty(G)){var z=Array.isArray(I[G])?I[G]:[I[G]];I[G]=z.map(M.bind(null,G))}var ee=new Dt(I);ee.messages(o.messages),D.rule.options&&(D.rule.options.messages=o.messages,D.rule.options.error=o.error),ee.validate(D.value,D.rule.options||o,function(Y){var ue=[];L&&L.length&&ue.push.apply(ue,L),Y&&Y.length&&ue.push.apply(ue,Y),m(ue.length?ue:null)})}}var x;g.asyncValidator?x=g.asyncValidator(g,D.value,w,D.source,o):g.validator&&(x=g.validator(g,D.value,w,D.source,o),x===!0?w():x===!1?w(g.message||g.field+" fails"):x instanceof Array?w(x):x instanceof Error&&w(x.message)),x&&x.then&&x.then(function(){return w()},function(P){return w(P)})},function(D){s(D)})},getType:function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!fn.hasOwnProperty(t.type))throw new Error(Pe("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"?fn.required:fn[this.getType(t)]||!1}},Dt.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");fn[t]=n},Dt.warning=Ni,Dt.messages=Vr,Dt.validators=fn;var y0={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 E0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new Dt(e);return n.messages(Object.assign(y0,t)),n}var A0=new bi;function Ur(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 C0(e){if(Array.isArray(e))return e}function F0(e){if(Array.isArray(e))return Ur(e)}function $i(e,t,n,r,u,i,o){try{var c=e[i](o),s=c.value}catch(l){n(l);return}c.done?t(s):Promise.resolve(s).then(r,u)}function ji(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(s){$i(i,r,u,o,c,"next",s)}function c(s){$i(i,r,u,o,c,"throw",s)}o(void 0)})}}function w0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Li(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 b0(e,t,n){return t&&Li(e.prototype,t),n&&Li(e,n),e}function B0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qi(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function ki(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _0(){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 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 Vi(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){B0(e,u,n[u])})}return e}function M0(e){return C0(e)||ki(e)||Ui(e)||_0()}function Hr(e){return F0(e)||ki(e)||Ui(e)||S0()}function Ui(e,t){if(!!e){if(typeof e=="string")return Ur(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 Ur(e,t)}}var Hi=function(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(f){return s([l,f])}}function s(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)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 o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}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}}},Ye=function(){function t(r){var u=this;w0(this,t),this.setting=[],this.eventKeys=[],this.customEvents=[],this.parent=null,this.updateSetting=Wi,this.removeSetting=zi,this._callControlHooks("preInstance",r);var i=qi(this,t)?this.constructor:void 0,o=i.controlName,c=i.controlIcon,s=i.controlType,l=i.controlFieldType,f=i.controlEventKeys,a=i.controlCustomEvents,h=i.name,d=i.setting;o&&c&&s||mi("The ".concat(h," controlName,controlIcon,controlType is not define"));var p;this.id=(p=r==null?void 0:r.id)!==null&&p!==void 0?p:Fr(10),this.name=o,this.icon=c;var D;this.type=(D=r==null?void 0:r.type)!==null&&D!==void 0?D:s,this.props=new Mt(r==null?void 0:r.props,(qi(this,t)?this.constructor:void 0).controlName);var m;this.controlType=(m=r==null?void 0:r.controlType)!==null&&m!==void 0?m:"base",this.setting=he(d);var g;this.fieldType=(g=r==null?void 0:r.fieldType)!==null&&g!==void 0?g:l,this.eventKeys=he(f),this.customEvents=he(a),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),o=0;o<u;o++)i[o]=arguments[o];var c,s=M0(i),l=s[0],f=s.slice(1);return(c=A0).emit.apply(c,[l,this].concat(Hr(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),Ei(this.props,u,i),this.postUpdate(u,i)},n.preValidate=function(){var u=this;return ji(function(){var i,o,c;return Hi(this,function(s){switch(s.label){case 0:return i=Vi({},u.rules),[4,u._callControlHooks("preValidate",i)];case 1:return o=s.sent(),c=o[o.length-1],[2,c===!1?void 0:c]}})})()},n.validate=function(u,i){var o=this;return ji(function(){var c,s,l,f;return Hi(this,function(a){switch(a.label){case 0:return[4,o.preValidate()];case 1:c=a.sent(),s=c!==void 0?c:Vi({},o.rules),Array.isArray(i)&&i.forEach(function(h){s.hasOwnProperty(h)&&delete s[h]}),l=E0(s,u),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,l.validate(o.props)];case 3:return a.sent(),[2,!0];case 4:throw f=a.sent(),f.control||(f.control=o),f;case 5:return[2]}})})()},n.toDataBindModel=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this.fieldType,o=this.id,c=this.type,s=this.props,l=s.dataBind,f=s.datasourceBind,a=s.optionConfig,h=s.caption,d=s.required,p=s.maxLength,D=s.options,m=s.encrypted,g=s.encryptedMode;if(!(!i&&!l&&!f)){var A={parentId:u,fieldType:i,controlId:o,caption:h,type:c,props:{}};switch(l&&(A.dataBind=l),a){case"datasource":case void 0:f&&(A.datasourceBind=f);break;case"custom":A.props.options=D;break}return d!==void 0&&(A.required=d),p!==void 0&&(A.maxLength=p),m!==void 0&&(A.encrypted=m),g!==void 0&&(A.encryptedMode=g),A}},n.preToSchema=function(){this._callControlHooks("preToSchema",this)},n.toSchema=function(){return this.preToSchema(),{id:this.id,type:this.type,props:he(this.props),fieldType:this.fieldType,controlType:this.controlType}},t.updateBasicControl=function(u,i){if(u==="setting"){if(i.add){var o;(o=this.setting).push.apply(o,Hr(i.add))}i.remove&&this.removeSettingItem(i.remove),i.update}},b0(t,[{key:"rules",get:function(){var u=this.props.constructor.Rules;return u?new u(this.props):{}}}]),t}();Ye.controlName="\u63A7\u4EF6",Ye.controlIcon="icon",Ye.controlType="control",Ye.controlEventKeys=[],Ye.controlCustomEvents=[],Ye.setting=[],Ye.__is_control__=!0,Ye.removeSettingItem=zi,Ye.updateSettingItem=Wi;function zi(e){var t=this,n=Array.isArray(e)?e:[e];n.forEach(function(r){var u=typeof r!="string",i=t.setting.findIndex(function(s){return s.key===(u?r.key:r)});if(i!==-1){var o,c;u?t.setting[i].showItems=(o=t.setting[i].showItems)===null||o===void 0?void 0:o.filter(function(s){return!r.hideItems.includes(s)}):t.setting.splice(i,1),u&&!(!((c=t.setting[i].showItems)===null||c===void 0)&&c.length)&&t.setting.splice(i,1)}})}function Wi(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 o,c=(o=t.type)!==null&&o!==void 0?o:"replace";if(c==="replace")i.showItems=t.showItems;else{var s;(s=i.showItems).push.apply(s,Hr(t.showItems))}}}})}function I0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zi(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 N0(e,t,n){return t&&Zi(e.prototype,t),n&&Zi(e,n),e}function x0(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var ln=function(){function t(n){I0(this,t),this.customEvents=[],this.parent=null;var r=x0(this,t)?this.constructor:void 0,u=r.controlType,i=r.controlFieldType,o=r.name,c=r.controlCustomEvents;u||mi("The ".concat(o," controlType is not define"));var s;this.id=(s=n==null?void 0:n.id)!==null&&s!==void 0?s:Fr(10);var l;this.type=(l=n==null?void 0:n.type)!==null&&l!==void 0?l:u,this.props=new Mt(n==null?void 0:n.props),this.customEvents=c;var f;this.controlType=(f=n==null?void 0:n.controlType)!==null&&f!==void 0?f:"base";var a;this.fieldType=(a=n==null?void 0:n.fieldType)!==null&&a!==void 0?a:i;var h;this.pageStatus=(h=n==null?void 0:n.pageStatus)!==null&&h!==void 0?h:Or.UNKNOWN}return N0(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}();ln.controlType="control",ln.__is_control__=!0,ln.controlCustomEvents=[];function O0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jn(e){return jn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},jn(e)}function Wr(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&&Zr(e,t)}function R0(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function T0(e,t){return t&&(P0(t)==="object"||typeof t=="function")?t:O0(e)}function Zr(e,t){return Zr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Zr(e,t)}var P0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function $0(){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 Gr(e){var t=$0();return function(){var r=jn(e),u;if(t){var i=jn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return T0(this,u)}}var j0=function(e){Wr(n,e);var t=Gr(n);function n(r){zr(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(R0(r.dataBind,on))u.dataBind={type:"object",required:!0,fields:he(i),message:Ue.getMessage("pleaseEnterFieldCode")};else{var o={type:"object",required:!0,fields:{},message:Ue.getMessage("pleaseEnterFieldCode")};Object.keys(r.dataBind).forEach(function(c){o.fields[c]={type:"object",required:!0,fields:he(i),message:Ue.getMessage("pleaseEnterFieldCode")}}),u.dataBind=o}return r.isShowCaptionTip&&(u.captionTip.required=!0),u}return n}(Mi),L0=function(e){Wr(n,e);var t=Gr(n);function n(r){zr(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}(Ii),Xr=function(e){Wr(n,e);var t=Gr(n);function n(r){zr(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 o;u.isHideCaption=(o=r==null?void 0:r.isHideCaption)!==null&&o!==void 0?o:!1;var c;u.isShowCaptionTip=(c=r==null?void 0:r.isShowCaptionTip)!==null&&c!==void 0?c:!1;var s;u.captionTip=(s=r==null?void 0:r.captionTip)!==null&&s!==void 0?s:"";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 a;u.placeholder=(a=r==null?void 0:r.placeholder)!==null&&a!==void 0?a:"";var h;u.required=(h=r==null?void 0:r.required)!==null&&h!==void 0?h:!1;var d;u.requiredMessage=(d=r==null?void 0:r.requiredMessage)!==null&&d!==void 0?d:"",u.dataBind=new on(r==null?void 0:r.dataBind);var p;return u.defaultValue=(p=r==null?void 0:r.defaultValue)!==null&&p!==void 0?p:"",u}return n}(Mt);Xr.Rules=j0,Xr.RuntimeRules=L0;function q0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function k0(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 V0(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&&Kr(e,t)}function U0(e,t){return t&&(H0(t)==="object"||typeof t=="function")?t:q0(e)}function Kr(e,t){return Kr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Kr(e,t)}var H0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function z0(){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 W0(e){var t=z0();return function(){var r=Ln(e),u;if(t){var i=Ln(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return U0(this,u)}}var et=function(e){V0(n,e);var t=W0(n);function n(r){k0(this,n);var u;return u=t.call(this,r),u.controlType="form",u.props=new Xr(r==null?void 0:r.props),u}return n}(ln);function Z0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function G0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qn(e){return qn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qn(e)}function X0(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&&Jr(e,t)}function K0(e,t){return t&&(J0(t)==="object"||typeof t=="function")?t:Z0(e)}function Jr(e,t){return Jr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Jr(e,t)}var J0=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 Y0(e){var t=Q0();return function(){var r=qn(e),u;if(t){var i=qn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return K0(this,u)}}var eh=function(e){X0(n,e);var t=Y0(n);function n(r){return G0(this,n),t.call(this,r)}return n}(Mt);function Qr(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 th(e){if(Array.isArray(e))return Qr(e)}function nh(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function rh(){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 Gi(e){return th(e)||nh(e)||uh(e)||rh()}function uh(e,t){if(!!e){if(typeof e=="string")return Qr(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 Qr(e,t)}}function ih(e,t){var n;!((n=Object.getOwnPropertyDescriptors(e)[t])===null||n===void 0)&&n.enumerable&&Object.defineProperty(e,t,{enumerable:!1})}function Xi(e,t){e.parent=t,ih(e,"parent")}function oh(e,t){e.forEach(function(n){Xi(n,t)})}var Ki=Symbol("targetKey");function Ji(e){var t;return(t=e[Ki])!==null&&t!==void 0?t:e}function Qi(e,t){return oh(e,t),new Proxy(e,{get:function(r,u){for(var i=arguments.length,o=new Array(i>2?i-2:0),c=2;c<i;c++)o[c-2]=arguments[c];var s;return u===Ki?r:(s=Reflect).get.apply(s,[r,u].concat(Gi(o)))},set:function(r,u,i){for(var o=arguments.length,c=new Array(o>3?o-3:0),s=3;s<o;s++)c[s-3]=arguments[s];var l;if(Pt(e)&&u==="length"&&i===e.length)return!0;var f=(l=Reflect).set.apply(l,[r,u,i].concat(Gi(c)));return Je(i)&&Xi(i,t),f}})}function Yr(e,t,n,r){var u=r!=null?r:e,i=Qi(Ji(n!=null?n:[]),u);Object.defineProperty(e,t,{get:function(){return i},set:function(c){i=Qi(Ji(c),u)},enumerable:!0})}function eu(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 ah(e){if(Array.isArray(e))return eu(e)}function Yi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eo(e,t,n,r,u,i,o){try{var c=e[i](o),s=c.value}catch(l){n(l);return}c.done?t(s):Promise.resolve(s).then(r,u)}function sh(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(s){eo(i,r,u,o,c,"next",s)}function c(s){eo(i,r,u,o,c,"throw",s)}o(void 0)})}}function ch(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jt(e,t,n){return typeof Reflect!="undefined"&&Reflect.get?jt=Reflect.get:jt=function(u,i,o){var c=yh(u,i);if(!!c){var s=Object.getOwnPropertyDescriptor(c,i);return s.get?s.get.call(o):s.value}},jt(e,t,n||e)}function gt(e){return gt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},gt(e)}function lh(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&&tu(e,t)}function hh(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function dh(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ph(){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 Dh(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){fh(e,u,n[u])})}return e}function gh(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 vh(e,t){return t=t!=null?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):gh(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function mh(e,t){return t&&(Eh(t)==="object"||typeof t=="function")?t:Yi(e)}function tu(e,t){return tu=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},tu(e,t)}function yh(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=gt(e),e!==null););return e}function to(e){return ah(e)||dh(e)||Ah(e)||ph()}var Eh=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Ah(e,t){if(!!e){if(typeof e=="string")return eu(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 eu(e,t)}}function Ch(){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 Fh(e){var t=Ch();return function(){var r=gt(e),u;if(t){var i=gt(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return mh(this,u)}}var wh=function(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(f){return s([l,f])}}function s(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)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 o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}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}}},bh=1e4,no=function(t){lh(r,t);var n=Fh(r);function r(i){ch(this,r);var o;o=n.call(this,i),o.controlType="layout";var c=hh(this,r)?this.constructor:void 0,s=c.excludes,l=c.childrenMaxLength;return o.props=new eh(i==null?void 0:i.props),Yr(Yi(o),"children",i==null?void 0:i.children),o.excludes=he(s),o.childrenMaxLength=l,o}var u=r.prototype;return u.judgeExcludesChildren=function(o){return this.excludes===!1||Array.isArray(this.excludes)&&!this.excludes.includes(o)},u.judgeJoinChildren=function(o){var c=this.judgeExcludesChildren(o);return c&&this.childrenMaxLength>this.children.length},u.validate=function(o,c){var s=this,l=this,f=function(){return jt(gt(r.prototype),"validate",s)};return sh(function(){return wh(this,function(a){switch(a.label){case 0:return[4,f().call(l,o,c)];case 1:return a.sent(),[4,Promise.all(l.children.map(function(h){return h.validate(o,c)}))];case 2:return a.sent(),[2,!0]}})})()},u.toDataBindModel=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,c=jt(gt(r.prototype),"toDataBindModel",this).call(this),s=c?[c]:[];return this.children.reduce(function(l,f){var a=f.toDataBindModel(o);if(Array.isArray(a)){var h=a.filter(function(d){return!!d});return to(l).concat(to(h))}return a&&l.push(a),l},s)},u.toSchema=function(){var o=jt(gt(r.prototype),"toSchema",this).call(this),c=this.children.map(function(s){var l=s.toSchema();return l});return vh(Dh({},o),{children:c})},r}(Ye);no.excludes=!1,no.childrenMaxLength=bh;function ro(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Bh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kn(e){return kn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},kn(e)}function _h(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&&nu(e,t)}function Sh(e,t){return t&&(Mh(t)==="object"||typeof t=="function")?t:ro(e)}function nu(e,t){return nu=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},nu(e,t)}var Mh=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Ih(){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 Nh(e){var t=Ih();return function(){var r=kn(e),u;if(t){var i=kn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Sh(this,u)}}var xh=function(e){_h(n,e);var t=Nh(n);function n(r,u){Bh(this,n);var i;return i=t.call(this,u),Yr(ro(i),"headers",u==null?void 0:u.headers,r),i}return n}(Mt);K.LIST;function ru(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Oh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uo(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 Rh(e,t,n){return t&&uo(e.prototype,t),n&&uo(e,n),e}function Vn(e){return Vn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Vn(e)}function Th(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&&uu(e,t)}function Ph(e,t){return t&&($h(t)==="object"||typeof t=="function")?t:ru(e)}function uu(e,t){return uu=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},uu(e,t)}var $h=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function jh(){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 Lh(e){var t=jh();return function(){var r=Vn(e),u;if(t){var i=Vn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Ph(this,u)}}var Un=function(e){Th(n,e);var t=Lh(n);function n(u){Oh(this,n);var i;return i=t.call(this,u),i.controlType="list",i.rowProps={},i.props=new xh(ru(i),u==null?void 0:u.props),Yr(ru(i),"children",u==null?void 0:u.children),i}var r=n.prototype;return r.setRowProps=function(i){this.rowProps=i},Rh(n,[{key:"length",get:function(){return this.children.length}}]),n}(ln);console.log(1);function Hn(e){return e.controlType===Ke.LAYOUT||e.controlType===Ke.WRAP||e.controlType===Ke.LIST||e.controlType===Ke.SEARCH}function hn(e,t){Array.isArray(e)&&e.map(n=>{if(n.type===Q.SUBTABLE){const r=n.getChildrenFormControl();t(n,r)}else Hn(n)?hn(n==null?void 0:n.children,t):n instanceof et&&t(n)})}function dn(e,t){Array.isArray(e)&&e.map(n=>{n.type===Q.DATA_VIEW||n.type===Q.SIMPLE_SEARCH?t(n):Hn(n)&&dn(n==null?void 0:n.children,t)})}class iu extends In{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 io(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 dn(this._instance,n=>{t[n.id]=n.rules[0],hn(n.children,r=>{(r instanceof et||r instanceof Un)&&qh(t[n.id].fields,r)})}),t}get antdRules(){let t={};return dn(this._instance,n=>{t[n.id]=n.rules[0],hn(n.children,r=>{(r instanceof et||r instanceof Un)&&kh(t[n.id].fields,r)})}),t}}function io(e,t){Array.isArray(e)?e.map(n=>{t(n),Hn(n)&&io(n.children,t)}):t(e)}function ou(e){return e.props.isHide?!0:e.parent===null?!1:ou(e.parent)}function qh(e,t){if(!ou(t)){if(t instanceof et)e[t.id]=t.rules;else if(t.type===Q.SUBTABLE){e[t.id]=t.rules;const n={type:"array",fields:{}};t.children.forEach((r,u)=>{_t(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 kh(e,t){ou(t)||(t instanceof et?e[t.id]=t.rules:t.type===Q.SUBTABLE&&t.children.length&&(e[t.id]=[],t.children.forEach(n=>{let r={};_t(n.children,u=>{r[u.id]=u.rules}),e[t.id].push(r)})))}class Vh{constructor(t){const{state:n,emptyState:r,databindMapping:u,controlidMapping:i}=Uh(t.instance);this.emptyState=r,this.state=n,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 o=this.controlIdMapping[i].dataView,c=this.controlIdMapping[i].children;c!==void 0&&Object.keys(c).map(s=>{s===t&&(this.state[o][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(o=>{const c=this.controlIdMapping[o].dataView,s=this.controlIdMapping[o].children;s!==void 0&&Object.keys(s).map(l=>{var f;l===t&&(i=(f=this.state[c][o][n])==null?void 0:f[t])})}),i}else{let i=[];return Object.keys(this.controlIdMapping).map(o=>{const c=this.controlIdMapping[o].dataView,s=this.controlIdMapping[o].children;s!==void 0&&Object.keys(s).map(l=>{l===t&&this.state[c][o].map(f=>{i.push(f[t])})})}),i}}}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 o=this.controlIdMapping[i].dataView,c=this.controlIdMapping[i].children;c!==void 0&&Object.keys(c).map(s=>{s===t&&(u=this.emptyState[o][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 Uh(e){let t={},n={},r={},u={};return dn(e,i=>{const o=i.id,c={},s={};hn([i],(l,f)=>{Hh(c,s,l),zh(r,o,l),Wh(u,o,l)}),t[o]=c,n[o]=s}),{state:t,emptyState:n,databindMapping:r,controlidMapping:u}}function Hh(e,t,n){var r;if(n instanceof et)e[n.id]=he(n.props.defaultValue),t[n.id]=he(n.props.defaultValue);else{const u={};_t(n.props.headers,i=>{u[i.id]=he(i.props.defaultValue)}),e[n.id]=new Array((r=n.props.defaultRows)!=null?r:1).fill(0).map(()=>he(u)),t[n.id]=u}}function zh(e,t,n){if(n instanceof et)n.props.dataBind instanceof pt?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===""){dt(`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;_t(n.props.headers,u=>{u.props.dataBind instanceof pt?Object.keys(u.props.dataBind).map(i=>{const o=u.props.dataBind,c=o[i].dataCode;e[c].fields.push({fieldCode:o[i].fieldCode,controlId:u.id,dataBind:o,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 Wh(e,t,n){n instanceof et?e[n.id]={dataBind:n.props.dataBind,options:[],dataView:t}:n.type===Q.SUBTABLE&&(e[n.id]={dataBind:new on({dataCode:n.props.datasourceBind.dataCode,fieldCode:""}),dataView:t,children:{},options:[]},_t(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 oo=["splice","push","shift","pop","unshift","reverse"],au=Symbol("__engineProxy__"),su=Symbol("__engineTarget__"),ao=Symbol("__engineArrayBeforeSetCallbackFlag__"),so=Symbol("__engineProxyThisKey__"),He={type:"",args:[],callback:co};function co(){}Jh();function Zh(e,t,n,r,u){if(He.type){He.callback=u.bind(null,e,r);return}const i=Number(t);if(i>e.length){at(`Wrong array operations may cause unknown errors. It is recommended to use APIs such as ${oo.join(",")} for array operations`);return}if(!(Number.isNaN(i)&&t!=="length"))if(t==="length"){const c=n,s=e.length;if(c>e.length){at("Do not directly modify the length of the array data, please add new rows");return}return c===e.length?void 0:()=>u.call(null,e,r,"splice",[c,s-c])}else return i===e.length?()=>u.call(null,e,r,"push",[n]):()=>u.call(null,e,r,"splice",[i,1,n])}function Gh(e,t,n){return{__engineProxy__:!0,get(r,u,i){return u===au?!0:u===su?r:Array.isArray(r)&&u===ao?n:u===so?e:Reflect.get(r,u,i)},set(r,u,i,o){var h;let c=i;const s=r[u],l=e===""?u:e+"."+u;function f(d){if(typeof d=="object"&&d!==null)return d[au]!==!0?zn(d,t,n,l):zn(d[su],t,n,l)}c=(h=f(i))!=null?h:c;let a;if(Array.isArray(r)){const d=Zh(r,u,i,e,t);a=Reflect.set(r,u,c,o),d&&d()}else{try{let d=c;if(c=n.call(null,r,l,c,s),d!==c){const p=f(c);p!==void 0&&(c=p)}}catch(d){return _n(`${l} set error ${d}`),!0}a=Reflect.set(r,u,c,o),t.call(null,r,l,i,s)}return a}}}function zn(e,t,n,r=""){if(Object.isFrozen(e))return e;for(let u in e){const i=r===""?u:r+"."+u,o=e[u];typeof o=="object"&&o!==null&&(e[u]=zn(o,t,n,i))}return new Proxy(e,Gh(r,t,n))}function fo(e){const t=[];return e.forEach(n=>{t.push(n),n.controlType==="layout"&&t.push(...fo(n.children))}),t}function cu(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(o=>o.id===r);return u.length===0?i:u.reduce((o,c)=>{var f,a;const s=Number(c);if(Number.isNaN(s)){const h=o!=null&&o.children?fo(o.children):void 0,d=h==null?void 0:h.find(p=>p.id===c);return d||(o instanceof et?o:void 0)}else return(a=(f=o==null?void 0:o.children)==null?void 0:f[s])!=null?a:o},i)}function Xh(e,t){return["push","unshift"].includes(e)?t:e==="splice"?t.slice(2):[]}function Kh(e,t,n){if(["push","unshift"].includes(e))return n;if(e==="splice")return t.slice(0,2).concat(n)}function Jh(){oo.forEach(e=>{const t=Array.prototype[e];Array.prototype[e]=function(...n){var r;if(this[au]){let u;const i=Xh(e,n);if(i.length){const o=(r=this[ao])==null?void 0:r.call(this,this[su],this[so],i),c=Kh(e,n,o);He.type=e,He.args=c,u=t.apply(this,c)}else He.type=e,He.args=n,u=t.apply(this,n);return typeof He.callback=="function"&&He.callback(e,n,u),He.type="",He.args=[],He.callback=co,u}else return t.apply(this,n)}})}class Qh{constructor(){this.actionMap=new Map,this.buildinActions={},this.actionUtils={},this.sources={}}execAction(t,n,...r){return it(this,null,function*(){const u=this.actionMap.get(t);if(!!u)try{return yield u.func.call(null,n,...r)}catch(i){_n(`${u.id} Exception during calling action: ${i}`)}})}addAction(t,n){this.actionMap.has(t)&&at("duplicated action key");const r=new Yh(t,n);this.actionMap.set(t,r)}}class Yh{constructor(t,n){this.id="",this.id=t,this.func=n}}class ed{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 he(n)}remove(t){this._dataStore.delete(t)}getRemoteData(t){return it(this,null,function*(){return this.executer===void 0?(_n("\u672A\u521D\u59CB\u5316executer"),[]):this.executer(t)})}}class vt{}class pn extends vt{validate(t){return Te(t)}transform(t){if(t==null)return"";if(!Je(t)&&!Ci(t))return String(t);if(Fl(t))return JSON.stringify(t);throw`${t} is not a string`}}class fu extends vt{validate(t){return Sn(t)||t===""}transform(t){if(t==null)return"";const n=!Je(t)&&!Ci(t)?Number(t):void 0;if(!Number.isNaN(n)&&n!==void 0)return n;throw`${t} is not a number`}}class td extends vt{validate(t){return wl(t)}transform(t){if(t==null)return[];function n(r){return r.map(u=>u?String(u):"")}if(Pt(t))return n(t);if(Te(t)&&Fi(t))try{const r=JSON.parse(t);if(Array.isArray(r))return n(r)}catch(r){}return[String(t)]}}class nd extends vt{validate(t){return bl(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(Pt(t))return n(t);if(Te(t)&&Fi(t))try{const u=JSON.parse(t);if(Pt(u))return n(u)}catch(u){}const r=Number(t);if(Number.isNaN(r))throw`${t} is not a number array`;return[r]}}class rd extends vt{validate(t){return t instanceof Nn||Je(t)&&"amount"in t&&Sn(t.amount)&&"currency"in t&&Te(t.currency)}transform(t,n){if(t==null||t==="")return new Nn({currency:n==null?void 0:n.currency});let r;if(Je(t)&&(r=new Nn(ge(ge({},n),t))),Te(t)&&Mn(t))try{const u=JSON.parse(t);r=new Nn(ge(ge({},n),u))}catch(u){}if(r){const u=new fu,i=new pn;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 ud extends vt{validate(t){return t instanceof xn||Je(t)&&"min"in t&&Te(t.min)&&"max"in t&&Te(t.max)}transform(t,n){if(t==null||t==="")return new xn;let r;if(Je(t)&&(r=new xn(ge(ge({},n),t))),Te(t)&&Mn(t))try{const u=JSON.parse(t);r=new xn(ge(ge({},n),u))}catch(u){}if(r){const u=new pn;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 id extends vt{validate(t){return t instanceof Rn||Je(t)&&"result"in t&&Sn(t.result)&&"unit"in t&&Te(t.unit)}transform(t,n){if(t==null||t==="")return new Rn({unit:n==null?void 0:n.unit});let r;if(Je(t)&&(r=new Rn(ge(ge({},n),t))),Te(t)&&Mn(t))try{const u=JSON.parse(t);r=new Rn(ge(ge({},n),u))}catch(u){}if(r){const u=new fu,i=new pn;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 od extends vt{validate(t){return t instanceof On}transform(t,n){if(t==null||t==="")return new On;let r;if(Je(t)&&(r=new On(ge(ge({},n),Mr.exports.camelizeKeys(t)))),Te(t)&&Mn(t))try{const u=JSON.parse(t);r=new On(ge(ge({},n),Mr.exports.camelizeKeys(u)))}catch(u){}if(r){const u=new pn;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 ad{static getValueChecker(t){let n;switch(t){case K.VARCHAR:case K.TIMESTAMP:case K.TEXT:case K.RELATION:case K.AUTO_NUMBER:n=new pn;break;case K.DECIMAL:n=new fu;break;case K.EMPLOYEES:case K.DEPARTMENTS:case K.IMAGE:case K.FILE:case K.ARRAY:n=new td;break;case K.MONEY:n=new rd;break;case K.TIMESCOPE:n=new ud;break;case K.CALC:n=new id;break;case K.DECIMAL_RANGE:n=new nd;break;case K.ADDRESS:n=new od;break}return n}}function sd(e){if(["min","max","currency","unit"].includes(e))return K.VARCHAR;if(["result","amount"].includes(e))return K.DECIMAL}function lo(e,t,n,r){var o;let u=(o=sd(t))!=null?o:e,i=ad.getValueChecker(u);if(!i||i.validate(n))return n;try{const c=i.transform(n,r);return c!==void 0?c:n}catch(c){throw`${t} ${c}`}}function cd(e,t,n){return Object.entries(e).reduce((r,[u,i])=>{const o=t[u];return r[u]=lo(i,u,o,n[u]),r},Object.assign({},t))}var lu={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",u=9007199254740991,i="[object Arguments]",o="[object Array]",c="[object Boolean]",s="[object Date]",l="[object Error]",f="[object Function]",a="[object GeneratorFunction]",h="[object Map]",d="[object Number]",p="[object Object]",D="[object Promise]",m="[object RegExp]",g="[object Set]",A="[object String]",M="[object Symbol]",w="[object WeakMap]",x="[object ArrayBuffer]",P="[object DataView]",L="[object Float32Array]",I="[object Float64Array]",j="[object Int8Array]",G="[object Int16Array]",z="[object Int32Array]",ee="[object Uint8Array]",Y="[object Uint8ClampedArray]",ue="[object Uint16Array]",re="[object Uint32Array]",X=/[\\^$.*+?()[\]{}|]/g,Nu=/\w*$/,xu=/^\[object .+?Constructor\]$/,Ou=/^(?:0|[1-9]\d*)$/,te={};te[i]=te[o]=te[x]=te[P]=te[c]=te[s]=te[L]=te[I]=te[j]=te[G]=te[z]=te[h]=te[d]=te[p]=te[m]=te[g]=te[A]=te[M]=te[ee]=te[Y]=te[ue]=te[re]=!0,te[l]=te[f]=te[w]=!1;var Ru=typeof je=="object"&&je&&je.Object===Object&&je,Tu=typeof self=="object"&&self&&self.Object===Object&&self,Ge=Ru||Tu||Function("return this")(),ir=t&&!t.nodeType&&t,or=ir&&!0&&e&&!e.nodeType&&e,Pu=or&&or.exports===ir;function ar(v,C){return v.set(C[0],C[1]),v}function sr(v,C){return v.add(C),v}function Ft(v,C){for(var b=-1,q=v?v.length:0;++b<q&&C(v[b],b,v)!==!1;);return v}function yn(v,C){for(var b=-1,q=C.length,ye=v.length;++b<q;)v[ye+b]=C[b];return v}function cr(v,C,b,q){var ye=-1,Ie=v?v.length:0;for(q&&Ie&&(b=v[++ye]);++ye<Ie;)b=C(b,v[ye],ye,v);return b}function $u(v,C){for(var b=-1,q=Array(v);++b<v;)q[b]=C(b);return q}function ju(v,C){return v==null?void 0:v[C]}function En(v){var C=!1;if(v!=null&&typeof v.toString!="function")try{C=!!(v+"")}catch(b){}return C}function An(v){var C=-1,b=Array(v.size);return v.forEach(function(q,ye){b[++C]=[ye,q]}),b}function Gt(v,C){return function(b){return v(C(b))}}function Cn(v){var C=-1,b=Array(v.size);return v.forEach(function(q){b[++C]=q}),b}var fr=Array.prototype,Lu=Function.prototype,Xt=Object.prototype,Fn=Ge["__core-js_shared__"],wn=function(){var v=/[^.]+$/.exec(Fn&&Fn.keys&&Fn.keys.IE_PROTO||"");return v?"Symbol(src)_1."+v:""}(),y=Lu.toString,E=Xt.hasOwnProperty,F=Xt.toString,B=RegExp("^"+y.call(E).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=Pu?Ge.Buffer:void 0,O=Ge.Symbol,T=Ge.Uint8Array,_=Gt(Object.getPrototypeOf,Object),R=Object.create,V=Xt.propertyIsEnumerable,W=fr.splice,$=Object.getOwnPropertySymbols,Ce=N?N.isBuffer:void 0,De=Gt(Object.keys,Object),fe=Yt(Ge,"DataView"),ie=Yt(Ge,"Map"),me=Yt(Ge,"Promise"),ae=Yt(Ge,"Set"),be=Yt(Ge,"WeakMap"),se=Yt(Object,"create"),Fe=Rt(fe),ft=Rt(ie),Be=Rt(me),lt=Rt(ae),Kt=Rt(be),wt=O?O.prototype:void 0,lr=wt?wt.valueOf:void 0;function ht(v){var C=-1,b=v?v.length:0;for(this.clear();++C<b;){var q=v[C];this.set(q[0],q[1])}}function qu(){this.__data__=se?se(null):{}}function ku(v){return this.has(v)&&delete this.__data__[v]}function Vu(v){var C=this.__data__;if(se){var b=C[v];return b===r?void 0:b}return E.call(C,v)?C[v]:void 0}function Uu(v){var C=this.__data__;return se?C[v]!==void 0:E.call(C,v)}function Hu(v,C){var b=this.__data__;return b[v]=se&&C===void 0?r:C,this}ht.prototype.clear=qu,ht.prototype.delete=ku,ht.prototype.get=Vu,ht.prototype.has=Uu,ht.prototype.set=Hu;function Xe(v){var C=-1,b=v?v.length:0;for(this.clear();++C<b;){var q=v[C];this.set(q[0],q[1])}}function zu(){this.__data__=[]}function xt(v){var C=this.__data__,b=rt(C,v);if(b<0)return!1;var q=C.length-1;return b==q?C.pop():W.call(C,b,1),!0}function Wu(v){var C=this.__data__,b=rt(C,v);return b<0?void 0:C[b][1]}function Zu(v){return rt(this.__data__,v)>-1}function Gu(v,C){var b=this.__data__,q=rt(b,v);return q<0?b.push([v,C]):b[q][1]=C,this}Xe.prototype.clear=zu,Xe.prototype.delete=xt,Xe.prototype.get=Wu,Xe.prototype.has=Zu,Xe.prototype.set=Gu;function bt(v){var C=-1,b=v?v.length:0;for(this.clear();++C<b;){var q=v[C];this.set(q[0],q[1])}}function Xu(){this.__data__={hash:new ht,map:new(ie||Xe),string:new ht}}function Ku(v){return gr(this,v).delete(v)}function Ju(v){return gr(this,v).get(v)}function Qu(v){return gr(this,v).has(v)}function Yu(v,C){return gr(this,v).set(v,C),this}bt.prototype.clear=Xu,bt.prototype.delete=Ku,bt.prototype.get=Ju,bt.prototype.has=Qu,bt.prototype.set=Yu;function Bt(v){this.__data__=new Xe(v)}function ei(){this.__data__=new Xe}function ti(v){return this.__data__.delete(v)}function ni(v){return this.__data__.get(v)}function ri(v){return this.__data__.has(v)}function ui(v,C){var b=this.__data__;if(b instanceof Xe){var q=b.__data__;if(!ie||q.length<n-1)return q.push([v,C]),this;b=this.__data__=new bt(q)}return b.set(v,C),this}Bt.prototype.clear=ei,Bt.prototype.delete=ti,Bt.prototype.get=ni,Bt.prototype.has=ri,Bt.prototype.set=ui;function ii(v,C){var b=ai(v)||vD(v)?$u(v.length,String):[],q=b.length,ye=!!q;for(var Ie in v)(C||E.call(v,Ie))&&!(ye&&(Ie=="length"||dD(Ie,q)))&&b.push(Ie);return b}function hr(v,C,b){var q=v[C];(!(E.call(v,C)&&va(q,b))||b===void 0&&!(C in v))&&(v[C]=b)}function rt(v,C){for(var b=v.length;b--;)if(va(v[b][0],C))return b;return-1}function Me(v,C){return v&&pa(C,si(C),v)}function ce(v,C,b,q,ye,Ie,ke){var Oe;if(q&&(Oe=Ie?q(v,ye,Ie,ke):q(v)),Oe!==void 0)return Oe;if(!vr(v))return v;var Ea=ai(v);if(Ea){if(Oe=fD(v),!C)return aD(v,Oe)}else{var en=Ot(v),Aa=en==f||en==a;if(yD(v))return Dr(v,C);if(en==p||en==i||Aa&&!Ie){if(En(v))return Ie?v:{};if(Oe=lD(Aa?{}:v),!C)return sD(v,Me(Oe,v))}else{if(!te[en])return Ie?v:{};Oe=hD(v,en,ce,C)}}ke||(ke=new Bt);var Ca=ke.get(v);if(Ca)return Ca;if(ke.set(v,Oe),!Ea)var Fa=b?cD(v):si(v);return Ft(Fa||v,function(ci,mr){Fa&&(mr=ci,ci=v[mr]),hr(Oe,mr,ce(ci,C,b,q,mr,v,ke))}),Oe}function dr(v){return vr(v)?R(v):{}}function oi(v,C,b){var q=C(v);return ai(v)?q:yn(q,b(v))}function Jt(v){return F.call(v)}function Qt(v){if(!vr(v)||DD(v))return!1;var C=ya(v)||En(v)?B:xu;return C.test(Rt(v))}function pr(v){if(!ga(v))return De(v);var C=[];for(var b in Object(v))E.call(v,b)&&b!="constructor"&&C.push(b);return C}function Dr(v,C){if(C)return v.slice();var b=new v.constructor(v.length);return v.copy(b),b}function ut(v){var C=new v.constructor(v.byteLength);return new T(C).set(new T(v)),C}function tD(v,C){var b=C?ut(v.buffer):v.buffer;return new v.constructor(b,v.byteOffset,v.byteLength)}function nD(v,C,b){var q=C?b(An(v),!0):An(v);return cr(q,ar,new v.constructor)}function rD(v){var C=new v.constructor(v.source,Nu.exec(v));return C.lastIndex=v.lastIndex,C}function uD(v,C,b){var q=C?b(Cn(v),!0):Cn(v);return cr(q,sr,new v.constructor)}function iD(v){return lr?Object(lr.call(v)):{}}function oD(v,C){var b=C?ut(v.buffer):v.buffer;return new v.constructor(b,v.byteOffset,v.length)}function aD(v,C){var b=-1,q=v.length;for(C||(C=Array(q));++b<q;)C[b]=v[b];return C}function pa(v,C,b,q){b||(b={});for(var ye=-1,Ie=C.length;++ye<Ie;){var ke=C[ye],Oe=q?q(b[ke],v[ke],ke,b,v):void 0;hr(b,ke,Oe===void 0?v[ke]:Oe)}return b}function sD(v,C){return pa(v,Da(v),C)}function cD(v){return oi(v,si,Da)}function gr(v,C){var b=v.__data__;return pD(C)?b[typeof C=="string"?"string":"hash"]:b.map}function Yt(v,C){var b=ju(v,C);return Qt(b)?b:void 0}var Da=$?Gt($,Object):CD,Ot=Jt;(fe&&Ot(new fe(new ArrayBuffer(1)))!=P||ie&&Ot(new ie)!=h||me&&Ot(me.resolve())!=D||ae&&Ot(new ae)!=g||be&&Ot(new be)!=w)&&(Ot=function(v){var C=F.call(v),b=C==p?v.constructor:void 0,q=b?Rt(b):void 0;if(q)switch(q){case Fe:return P;case ft:return h;case Be:return D;case lt:return g;case Kt:return w}return C});function fD(v){var C=v.length,b=v.constructor(C);return C&&typeof v[0]=="string"&&E.call(v,"index")&&(b.index=v.index,b.input=v.input),b}function lD(v){return typeof v.constructor=="function"&&!ga(v)?dr(_(v)):{}}function hD(v,C,b,q){var ye=v.constructor;switch(C){case x:return ut(v);case c:case s:return new ye(+v);case P:return tD(v,q);case L:case I:case j:case G:case z:case ee:case Y:case ue:case re:return oD(v,q);case h:return nD(v,q,b);case d:case A:return new ye(v);case m:return rD(v);case g:return uD(v,q,b);case M:return iD(v)}}function dD(v,C){return C=C==null?u:C,!!C&&(typeof v=="number"||Ou.test(v))&&v>-1&&v%1==0&&v<C}function pD(v){var C=typeof v;return C=="string"||C=="number"||C=="symbol"||C=="boolean"?v!=="__proto__":v===null}function DD(v){return!!wn&&wn in v}function ga(v){var C=v&&v.constructor,b=typeof C=="function"&&C.prototype||Xt;return v===b}function Rt(v){if(v!=null){try{return y.call(v)}catch(C){}try{return v+""}catch(C){}}return""}function gD(v){return ce(v,!0,!0)}function va(v,C){return v===C||v!==v&&C!==C}function vD(v){return mD(v)&&E.call(v,"callee")&&(!V.call(v,"callee")||F.call(v)==i)}var ai=Array.isArray;function ma(v){return v!=null&&ED(v.length)&&!ya(v)}function mD(v){return AD(v)&&ma(v)}var yD=Ce||FD;function ya(v){var C=vr(v)?F.call(v):"";return C==f||C==a}function ED(v){return typeof v=="number"&&v>-1&&v%1==0&&v<=u}function vr(v){var C=typeof v;return!!v&&(C=="object"||C=="function")}function AD(v){return!!v&&typeof v=="object"}function si(v){return ma(v)?ii(v):pr(v)}function CD(){return[]}function FD(){return!1}e.exports=gD})(lu,lu.exports);var fd=lu.exports;function ho(e){return e.reduce((n,r)=>{const{children:u}=r;return u.forEach(i=>{n[i.id]=ld(i)}),n},{})}function ld(e){return fd(e.props)}typeof window!="undefined"&&(window.engines={});let Lt=null,Dn="";class hu extends bi{constructor(t){super(),this.isMounted=!1,this.id=Fr(8),this.__pluginsApplied=!1,this.actionManager=new Qh,this._jobTasks=[],this.createControlInstance=this.createInstance,this.$options=Object.freeze(t);const{autoMount:n=!0,schema:r,beforeCreateInstance:u,externalParams:i,language:o=li,debug:c=!1}=this.$options;Ue.setLocale(o),this.debug=c,this.runtime=new iu({schema:r,beforeCreateInstance:u}),this.externalParams=i,this.store=new Vh({instance:this.runtime.instance}),this.debugLog("engine is Instantiation complete"),n&&this.mount()}debugLog(...t){this.debug&&_r(...t)}use(t){return this.__pluginsApplied||this.__plugins.push(t),this}registerControl(...t){return this.runtime.register(...t),this}static register(...t){return iu.register(...t)}static judgeControlIsRegistered(t){return iu.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=zn(this.store.state,this._proxyStateCallback.bind(this),this._proxyStateBeforeSetCallback.bind(this))}_proxyStateBeforeSetCallback(t,n,r,u){const i=cu(this.runtime.flatInstances,n);if(!i)return r;if(this.assertInstance(i,Q.SUBTABLE)){if(r===null)return[];const s=i.props.headers.reduce((f,a)=>{const h=a.children[0];return h&&h instanceof et&&(f[h.id]=h.fieldType),f},{}),l=this.getEmptyState(i.id);return r.map(f=>cd(s,f,l))}const o=n.split("."),c=o[o.length-1];try{return lo(i.fieldType,c,r,u)}catch(s){throw dt(`the id=${i.id}'s instance setState error, %o ${s}.`,r),s}}_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 o=cu(this.runtime.flatInstances,n);if(!(o instanceof Un))return;const c=h=>[],s=Lt;let l=[],f=[],a=[];if(r&&u){switch(r){case"push":case"unshift":u.length,l=c(),f=u,o.children[r](...l),this.runtime.getFlatInstances();break;case"splice":if(u.length>2){u.length-2;const h=u.slice(2);l=c(),f=h;const d=u[0],p=u[1];o.children[r](d,p,...l),this.runtime.getFlatInstances()}else o.children[r](...u),this.runtime.getFlatInstances();break;default:o.children[r](...u),this.runtime.getFlatInstances();break}r==="splice"?a=i:["pop","shift"].includes(r)&&(a=[i]),this.emit("list-change",{instance:o,value:this.getState(o.id),options:Object.assign({},s,{changed:l,data:f,deleted:a!=null?a:[]})}),Lt=null}}_handlerObjectUpdate(t,n,r,u){const i=cu(this.runtime.flatInstances,n);if(!i)return;const o=this.getInstanceRowIndex(i),c=Lt||{};if(i instanceof Un){i.children.length=0;const s=r;let l=[];this.emit("list-change",{instance:i,value:r,options:fi(ge({},c),{changed:l,data:s,deleted:u!=null?u:[]})})}else this.emit("change",{instance:i,value:this.getState(i.id,o),rowIndex:o,options:fi(ge({},c),{oldValue:u})})}applyPlugins(){this.__pluginsApplied||(this.__plugins.forEach(t=>{var n;try{Dn=(n=t.pluginName)!=null?n:t.constructor.name,t.apply(this)}catch(r){at(`${Dn} Plugin apply Error
|
|
2
|
-
${r}`)}finally{Dn=""}}),this.__pluginsApplied=!0)}listControlCreateRow(t,n){throw new Error("\u8BE5api\u5DF2\u5E9F\u5F03")}listControlAddRow(t,n="subtable-row"){throw new Error("\u8BE5api\u5DF2\u5E9F\u5F03")}emit(t,n){return it(this,null,function*(){if(t==="engine-mounted"){if(this.isMounted)return dt("The engine-mounted life cycle can only be triggered once"),Promise.resolve([]);if(this._jobTasks.length){console.time("engine-mounted need wait");const o=[...this._jobTasks];yield Promise.all(o),console.timeEnd("engine-mounted need wait")}this.isMounted=!0}let r,u;this.isMounted||(u=new Promise(o=>{r=o}),this._jobTasks.push(u));const i=yield Ba(hu.prototype,this,"emit").call(this,t,n);return r&&u&&(r(),this._jobTasks.splice(this._jobTasks.indexOf(u),1)),i})}on(t,n){return Dn&&(n.applyingPluginName=Dn),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)}getEmptyState(t){return he(t===void 0?this.store.emptyState:this.store.getEmptyState(t))}setPayloadOptions(t){Lt=t}setState(t,n,r,u){Lt=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),Lt=null}setStates(t,n,r){let u=t;Object.keys(u).forEach(i=>{Object.entries(this.store.controlIdMapping).forEach(([o,c])=>{if(c.dataView===i){const s=u[i][o];s!==void 0&&this.setState(o,s,n,r)}else(o===i||c.children&&c.children[i])&&u[i]!==void 0&&this.setState(i,u[i],n,r)})})}getField(t,n,r){if(!n){const s=this.getDataBindMapping(t);if(s){const{controlId:l}=s;return this.getState(l)}return}const u=this.getDataBindMapping(t,n);if(!u)return;const{dataBind:i,controlId:o}=u,c=this.getState(o,r);return i instanceof pt?Object.entries(i).reduce((s,[l,f])=>f.fieldCode===n?s[l]:s,c):c}getData(t){var u,i,o,c,s,l,f,a;if(!t)return;let n=this.getDataBindMapping(t),r=this.getControlIdMapping();if(n){const{controlId:h}=n,d=this.getField(t);if(Array.isArray(d))return d.map(D=>{var g,A,M,w,x,P,L;let m={};for(let I in D)if((M=(A=(g=r[h])==null?void 0:g.children[I])==null?void 0:A.dataBind)!=null&&M.fieldCode)m[(w=r[h].children[I])==null?void 0:w.dataBind.fieldCode]=D[I];else if((x=r[h])!=null&&x.children[I])for(let j in D[I])m[(L=(P=r[h])==null?void 0:P.children[I])==null?void 0:L.dataBind[j].fieldCode]=D[I][j];return m});{let p={};for(let D in d)if((i=(u=r[D])==null?void 0:u.dataBind)!=null&&i.fieldCode)p[(o=r[D])==null?void 0:o.dataBind.fieldCode]=d[D];else if((s=(c=r[D])==null?void 0:c.dataBind)!=null&&s.dataCode)p[(l=r[D])==null?void 0:l.dataBind.dataCode]=d[D].map(m=>{var A,M,w;let g={};for(let x in m)if((A=r[D].children[x])!=null&&A.dataBind.fieldCode)g[(M=r[D].children[x])==null?void 0:M.dataBind.fieldCode]=m[x];else for(let P in m[x])g[(w=r[D].children[x])==null?void 0:w.dataBind[P].fieldCode]=m[x][P];return g});else if(r[D])for(let m in d[D])p[(a=(f=r[D])==null?void 0:f.dataBind[m])==null?void 0:a.fieldCode]=d[D][m];return p}}}setField(t,n,r,u,i){var l;const o=this.getDataBindMapping(t,n);if(!o)return;const{dataBind:c,controlId:s}=o;if(c instanceof pt){const f=(l=he(this.getState(s,u)))!=null?l:this.getEmptyState(s),a=Object.entries(c).reduce((h,[d,p])=>(p.fieldCode===n&&(h[d]=r),h),f);this.setState(s,a,u,i)}else this.setState(s,r,u,i)}setFields(t,n,r,u){const i=this.getDataBindMapping(t);if(!i)return;let o=[];i.fields.forEach(c=>{var a;const{dataBind:s,controlId:l,fieldCode:f}=c;if(!o.includes(f)&&!!Object.hasOwnProperty.call(n,f))if(s instanceof pt){const h=(a=he(this.getState(l,r)))!=null?a:this.getEmptyState(l),d=Object.entries(s).reduce((p,[D,m])=>{o.push(m.fieldCode);const g=n[m.fieldCode];return g!==void 0&&(p[D]=g),p},h);this.setState(c.controlId,d,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(o=>{const{dataBind:c,controlId:s,fieldCode:l}=o;if(!u.includes(l)&&!!Object.hasOwnProperty.call(n,l))if(c instanceof pt){const f=this.getEmptyState(s);i[o.controlId]=Object.entries(c).reduce((a,[h,d])=>{u.push(d.fieldCode);const p=n[d.fieldCode];return p!==void 0&&(a[h]=p),a},f)}else i[s]=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(o=>{const c=this.getDataBindMapping(u);if(!c)return;let s=he(this.store.emptyState[c.dataViewId][c.controlId]),l=[];Object.keys(o).map(f=>{var h,d,p;if(l.includes(f))return;const a=(d=(h=this.store.dataBindMapping[u])==null?void 0:h.fields)==null?void 0:d.find(D=>D.fieldCode===f);if(a){if(a.dataBind instanceof on&&o[f]!==void 0)s[a.controlId]=o[f];else if(a.dataBind instanceof pt){let D=he((p=this.getEmptyState(a.controlId))!=null?p:{});Object.keys(a.dataBind).map(m=>{const g=a.dataBind[m];o[g.fieldCode]!==void 0&&(D[m]=o[g.fieldCode]),l.push(g.fieldCode)}),s[a.controlId]=D}}}),r[c.dataViewId]||(r[c.dataViewId]={}),r[c.dataViewId][c.controlId]||(r[c.dataViewId][c.controlId]=[]),r[c.dataViewId][c.controlId].push(s)});else if(i){let o=[];Object.keys(i).map(c=>{var l;if(o.includes(c))return;const s=this.getDataBindMapping(u,c);if(s){if(r[s.dataViewId[0]]||(r[s.dataViewId[0]]={}),s.dataBind instanceof on&&i[c]!==void 0)r[s.dataViewId[0]][s.controlId]=i[c];else if(s.dataBind instanceof pt){let f=he((l=this.getEmptyState(s.controlId))!=null?l:{});Object.keys(s.dataBind).map(a=>{const h=s.dataBind[a];i[h.fieldCode]!==void 0&&(f[a]=i[h.fieldCode]),o.push(h.fieldCode)}),r[s.dataViewId[0]][s.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 o=this.getInstanceInSubtableHeader(i);o&&r.unshift(o)}}else{const i=this.getControlIdMapping(),[o]=(u=Object.entries(i).find(([c,s])=>s.children&&t in s.children))!=null?u:[];if(o){const s=this.getInstance(o).props.headers.find(l=>l.children.find(f=>f.id===t));if(s){const l=s.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),Ei(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){dt(`No corresponding dataCode=${t} was found`);return}if(!n)return r;const u=r.fields.find(i=>i.fieldCode===n);if(!u){dt(`No corresponding fieldCode=${n} was found`);return}return u}getAction(){return this.actionManager}initDataManager(t){this.dataManager=new ed(t)}getDataManager(){return this.dataManager}assertInstance(t,n){return Te(n)?t.type===n:n.includes(t.type)}getInstanceRowIndex(t){if(!t.parent)return;let n;if(this.assertInstance(t.parent,Q.SUBTABLE))if(this.assertInstance(t,Q.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,Q.SUBTABLE_COLUMN)?t:this.getInstanceParentControl(t,Q.SUBTABLE_COLUMN);if(!r)return;const i=this.getInstanceParentControl(t,Q.SUBTABLE).props.headers.find(o=>o.id===r.id);if(!!i)return i.children.find(o=>o.id===t.id)}setControlConfig(...t){return this.runtime.registerControlConfig(...t)}getControlConfig(t){return this.runtime.getControlConfig(t)}initSubTableRowPropsFromInstanceHeaders(t){const n=console,r=Date.now(),u="\u{1F42E} initSubTableRowPropsFromInstanceHeaders "+r;n.time(u),Object.assign(t.rowProps,ho(t.props.headers)),n.timeEnd(u)}initSubTableRowPropsFromProxySetNewValue(t,n){const r=console,u=Date.now(),i="\u{1F437} initSubTableRowPropsFromProxySetNewValue "+u;r.time(i),n.forEach(o=>{Object.assign(t.rowProps,{now:ho(t.props.headers)})}),r.timeEnd(i)}}class hd{}class dd{constructor(t,n){this.config=t,this.env=n}apply(t){this.engine=t;const n=this.config;if(!n)return;const r=po(n,t,this.env);if(!r)return;const u=t.getAction();for(let[i,o]of Object.entries(r.funcMap))u.addAction(i,o)}}function po(e,t,n){if(!e.module||!e.module.compiled)return;const r=e.module.compiled,u={exports:{ctx:t,utils:t.getAction().actionUtils,env:n}};try{new Function("module","exports",r).call(u,u,u.exports)}catch(c){at(c.message+". fail to parse the module"),process.env.NODE_ENV!=="production"&&at("fail to parse the module")}const i={},o={};for(const[c,s]of Object.entries(u.exports))typeof s=="function"?i[c]=s:o[c]=s;return{funcMap:i,variables:o}}const pd={"engine-mounted":"did_mount","engine-submit":"will_submit","engine-submit-params":"do_submit","engine-submitted":"did_submit"};class Dd{constructor(t){this.config=t}apply(t){this.engine=t,Object.entries(pd).forEach(([n,r])=>{t.on(n,u=>it(this,null,function*(){const i=yield this.callLifecycleEvent(r,u);return i.includes(!1)?!1:i}))})}callLifecycleEvent(t,n){return it(this,null,function*(){const r=this.config;return!r||!Array.isArray(r[t])?[]:yield Promise.all(r[t].map(i=>it(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})))})}}class gd{constructor(t){this.config=t}apply(t){this.engine=t,Bi.events.forEach(n=>{n.code&&n.key&&this.engineAddEventListener(n.code,n.key)})}engineAddEventListener(t,n){this.engine.on(t,r=>it(this,null,function*(){if(!(t==="change"&&!this.engine.isMounted)&&r.instance!==void 0)return yield this.callControlEvent(n,r)}))}callControlEvent(t,n){return it(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=>it(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})));return u.includes(!1)?!1:u})}}function du(){return du=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},du.apply(this,arguments)}var Do={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function Se(e){return typeof e=="number"}function mt(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 go(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function vo(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function mo(e){return e&&e.constructor.prototype.isUnit===!0||!1}function Wn(e){return typeof e=="string"}var $e=Array.isArray;function gn(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function pu(e){return Array.isArray(e)||gn(e)}function vd(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function md(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function yd(e){return e&&e.constructor.prototype.isRange===!0||!1}function yo(e){return e&&e.constructor.prototype.isIndex===!0||!1}function Ed(e){return typeof e=="boolean"}function Ad(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function Cd(e){return e&&e.constructor.prototype.isHelp===!0||!1}function Fd(e){return typeof e=="function"}function wd(e){return e instanceof Date}function bd(e){return e instanceof RegExp}function Bd(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!go(e)&&!vo(e))}function _d(e){return e===null}function Sd(e){return e===void 0}function Md(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Id(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function Nd(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function xd(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function Od(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Rd(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function Td(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function Pd(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function $d(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function jd(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ld(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function qd(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function kd(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function Vd(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ud(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Hd(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function zd(e){return e&&e.constructor.prototype.isChain===!0||!1}function Du(e){var t=typeof e;return t==="object"?e===null?"null":mt(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function It(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 It(n)});if(e instanceof Date)return new Date(e.valueOf());if(mt(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return Wd(e,It)}function Wd(e,t){var n={};for(var r in e)Zn(e,r)&&(n[r]=t(e[r]));return n}function gu(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(!gu(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)||!gu(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}else return e===t}}function Zn(e,t){return e&&Object.hasOwnProperty.call(e,t)}function Zd(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 Gd=["Matrix","Array"],Xd=["number","BigNumber","Fraction"],Eo=function(t){if(t)throw new Error(`The global config is readonly.
|
|
1
|
+
var SD=Object.defineProperty,ID=Object.defineProperties;var MD=Object.getOwnPropertyDescriptors;var Ba=Object.getOwnPropertySymbols,ND=Object.getPrototypeOf,xD=Object.prototype.hasOwnProperty,OD=Object.prototype.propertyIsEnumerable,RD=Reflect.get;var Er=Math.pow,_a=(J,oe,le)=>oe in J?SD(J,oe,{enumerable:!0,configurable:!0,writable:!0,value:le}):J[oe]=le,ge=(J,oe)=>{for(var le in oe||(oe={}))xD.call(oe,le)&&_a(J,le,oe[le]);if(Ba)for(var le of Ba(oe))OD.call(oe,le)&&_a(J,le,oe[le]);return J},fi=(J,oe)=>ID(J,MD(oe));var Sa=(J,oe,le)=>RD(ND(J),le,oe);var ot=(J,oe,le)=>new Promise((Ar,Bn)=>{var Cr=at=>{try{tn(le.next(at))}catch(nn){Bn(nn)}},Fr=at=>{try{tn(le.throw(at))}catch(nn){Bn(nn)}},tn=at=>at.done?Ar(at.value):Promise.resolve(at.value).then(Cr,Fr);tn((le=le.apply(J,oe)).next())});(function(J,oe){typeof exports=="object"&&typeof module!="undefined"?oe(exports,require("crypto")):typeof define=="function"&&define.amd?define(["exports","crypto"],oe):(J=typeof globalThis!="undefined"?globalThis:J||self,oe(J.modelDrivenEngine={},J.require$$0))})(this,function(J,oe){"use strict";function le(e){return e&&typeof e=="object"&&"default"in e?e:{default:e}}var Ar=le(oe),Bn="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u5B57",Cr="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5B57\u7B26\u4E32",Fr="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5BF9\u8C61",tn="\u8BF7\u8F93\u5165\u4E00\u4E2A\u6570\u7EC4",at="\u8BF7\u8F93\u5165\u4E00\u4E2A\u5E03\u5C14",nn="{caption}\u5FC5\u586B",Ia="\u8BF7\u8F93\u5165\u6807\u9898",Ma="\u8BF7\u8F93\u5165\u6C14\u6CE1\u63D0\u793A\u8BED",Na="\u8BF7\u8F93\u5165\u63D0\u793A\u6587\u5B57",xa="\u8BF7\u7ED1\u5B9A\u6570\u636E\u9879",Oa="\u8BF7\u7ED1\u5B9A\u8868\u5355",Ra="\u8BF7\u7ED1\u5B9A\u5217\u8868",Ta="\u8BF7\u7ED1\u5B9A\u6D41\u7A0B",Pa="\u8BF7\u8F93\u5165\u663E\u793A\u503C",$a="\u8BF7\u8F93\u5165\u5B58\u50A8\u503C",ja="\u5355\u636E\u7F16\u53F7\u672A\u7ED1\u5B9A\u6570\u636E\u9879",La="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5\uFF01",qa="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",ka="\u8BF7\u8F93\u5165\u5927\u4E8E\u7B49\u4E8E{min}\u7684\u6570\u503C",Va="\u8BF7\u8F93\u5165\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u6570\u503C",Ua="\u6570\u503C\u8303\u56F4\u8BBE\u7F6E\u6709\u8BEF",Ha="\u8BF7\u8F93\u5165\u957F\u5EA6\u5927\u4E8E\u7B49\u4E8E{min}\u4E14\u5C0F\u4E8E\u7B49\u4E8E{max}\u7684\u503C",za="\u9644\u4EF6\u5927\u5C0F\u5FC5\u987B\u57280MB\u81F31000MB\u4E4B\u95F4",Wa="\u8BF7\u586B\u5199\u603B\u5206\u8BBE\u7F6E",Za="\u603B\u5206\u4E0D\u80FD\u5C0F\u4E8E1",Ga="\u9ED8\u8BA4\u503C\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",Xa="\u9644\u4EF6\u4E0A\u4F20\u7684\u6570\u91CF\u5FC5\u987B\u5728{min}\u548C{max}\u4E4B\u95F4",Ka="\u8BF7\u91CD\u65B0\u9009\u62E9\u53EF\u9009\u6570\u91CF",Ja="\u8BE5\u63A7\u4EF6\u6700\u5927\u957F\u5EA6\u9700\u5927\u4E8E\u6700\u5C0F\u957F\u5EA6",Qa="\u8BE5\u63A7\u4EF6\u6700\u5C0F\u957F\u5EA6\u9700\u5C0F\u4E8E\u6700\u5927\u957F\u5EA6",Ya="\u8BF7\u9009\u62E9\u6B63\u786E\u7684\u9009\u9879\u8BBE\u7F6E",es="\u9009\u9879ID\u4E0D\u80FD\u91CD\u590D",ts="\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u6761\u9009\u9879",ns="\u8BF7\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",rs="\u8BF7\u7ED1\u5B9A\u5B58\u50A8\u503C",us="\u8BF7\u7ED1\u5B9A\u670D\u52A1",is="\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",os="\u8BF7\u9009\u62E9\u7701",as="\u8BF7\u9009\u62E9\u5E02",ss="\u8BF7\u9009\u62E9\u533A",cs="\u6700\u5C11\u586B\u5199\u884C\u6570\u4E0D\u80FD\u5C0F\u4E8E0",fs="\u884C\u6570\u91CF\u4E0D\u80FD\u5C0F\u4E8E{min}\u884C",ls="\u8BF7\u8F93\u5165\u5217\u5BBD",hs="\u8BF7\u8BBE\u7F6E\u6240\u6709\u89C4\u5219\u6761\u4EF6\u7684\u903B\u8F91\u5173\u7CFB",ds="\u8BF7\u5C06\u6240\u6709\u89C4\u5219\u6761\u4EF6\u586B\u5199\u5B8C\u6574",ps="\u8BF7\u9009\u62E9\u63A7\u4EF6",Ds="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u663E\u793A\u5B57\u6BB5",gs="\u8BF7\u9009\u62E9\u56DE\u586B\u8BBE\u7F6E",vs="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",ms="\u8BF7\u9009\u62E9\u6839\u8282\u70B9",ys="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Es="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",As="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Cs="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Fs="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",ws="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",bs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Bs="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",_s="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Ss="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Is="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Ms="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Ns="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",xs="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Os="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",Rs="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Ts="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Ps={isNotNumber:Bn,isNotString:Cr,isNotObject:Fr,isNotArray:tn,isNotBoolean:at,runtimeRequired:nn,pleaseEnterCaption:Ia,pleaseEnterCaptionTip:Ma,pleaseEnterPlaceholder:Na,pleaseEnterFieldCode:xa,pleaseEnterForm:Oa,pleaseEnterList:Ra,pleaseEnterProcess:Ta,pleaseEnterLabel:Pa,pleaseEnterValue:$a,bizKeyNotBindFiled:ja,pleaseSelectOneField:La,pleaseEnterNumberRange:qa,pleaseEnterAValueGreaterThanMin:ka,pleaseEnterAValueLessThanMax:Va,numberRangeSetError:Ua,stringRangeError:Ha,attachmentMaxSize:za,pleaseEnterTotalScoreSetting:Wa,theTotalScoreMustNotBeLessThan1:Za,scoreDefaultValueRange:Ga,attachmentLimitError:Xa,PleaseReselectTheOptionalQuantity:Ka,TheMaximumLengthIsGreaterThanTheMinimumLength:Ja,TheMinimumLengthIsGreaterThanTheMaximumLength:Qa,PleaseSelectTheCorrectOptionSettings:Ya,optionIdIsRepeat:es,optionIsRequired:ts,pleaseEnterDataCode:ns,pleaseEnterValueFieldCode:rs,pleaseEnterSvcCode:us,pleaseBindAtLeastOneDisplayValue:is,pleaseSelectProvince:os,pleaseSelectCity:as,pleaseSelectDistrict:ss,limitRowsCannotBeLessThan0:cs,TheNumberOfRowsCannotBeLessThanMinRows:fs,pleaseEnterColumnWidth:ls,pleaseSetTheLogicalRelationshipOfAllRuleConditions:hs,pleaseCompleteAllRulesAndConditions:ds,pleaseSelectControl:ps,pleaseSelectAtLeastOneColumn:Ds,pleaseSelectFillBackMode:gs,pleaseSelectDashboard:vs,rootNodeIsRequired:ms,theViewNameCannotBeEmpty:ys,pleaseSelectOcrType:Es,pleaseSelectAtLeastOneFieldToFillIn:As,pleaseChooseAtLeastOne:Cs,pleaseEnterButtonContent:Fs,pleaseEnterDataCodeInDataSetting:ws,pleaseEnterValueFieldCodeInDataSetting:bs,pleaseEnterSvcCodeInDataSetting:Bs,pleaseBindAtLeastOneDisplayValueInDataSetting:_s,rootNodeIsRequiredInDataSetting:Ss,pleaseEnterMaxHeight:Is,pleaseEnter:Ms,pleaseEnterWatermark:Ns,pleaseEnterFileName:xs,pleaseUploadAtLeastOnePrintTemplate:Os,pleaseAssignBusiness:Rs,pleaseAssignExternal:Ts},$s="Please enter a number",js="Please enter a string",Ls="Please enter an object",qs="Please enter an array",ks="Please enter a boolean",Vs="{caption} Required",Us="Please enter the title",Hs="Please enter the bubble prompt",zs="Please enter the prompt text",Ws="Please bind data items",Zs="Please bind the form",Gs="Please bind the list",Xs="Please bind the process",Ks="Please enter the displayed value",Js="Please enter the stored value",Qs="The document number is not bound to the data item",Ys="Please select at least one display field",ec="Please enter a value greater than or equal to {min} and less than or equal to {max}",tc="Please enter a value greater than or equal to {min}",nc="Please enter a value less than or equal to {max}",rc="The value range is set incorrectly",uc="Please enter a value with a length greater than or equal to {min} and less than or equal to {max}",ic="The attachment size must be between 0MB and 1000MB",oc="Please fill in the total score setting",ac="The total score cannot be less than 1",sc="The default value must be between {min} and {max}",cc="The number of attachments uploaded must be between {min} and {max}",fc="Please re-select the optional quantity",lc="The maximum length of the control must be greater than the minimum length",hc="The minimum length of the control must be less than the maximum length",dc="Please select the correct option setting",pc="Option ID cannot be repeated",Dc="Please enter at least one option",gc="Please bind the data source",vc="Please bind the stored value",mc="Please bind the service",yc="At least one display value must be bound",Ec="Please select a province",Ac="Please select a city",Cc="Please select a district",Fc="The minimum number of lines to fill in cannot be less than 0",wc="The number of rows cannot be less than {min} rows",bc="Please enter the column width",Bc="Please set the logical relationship of all rule conditions",_c="Please complete all rules and conditions",Sc="please select control",Ic="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Mc="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Nc="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",xc="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",Oc="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Rc="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Tc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Pc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",$c="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",jc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Lc="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",qc="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",kc="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",Vc="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",Uc="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Hc="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",zc="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",Wc="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",Zc={isNotNumber:$s,isNotString:js,isNotObject:Ls,isNotArray:qs,isNotBoolean:ks,runtimeRequired:Vs,pleaseEnterCaption:Us,pleaseEnterCaptionTip:Hs,pleaseEnterPlaceholder:zs,pleaseEnterFieldCode:Ws,pleaseEnterForm:Zs,pleaseEnterList:Gs,pleaseEnterProcess:Xs,pleaseEnterLabel:Ks,pleaseEnterValue:Js,bizKeyNotBindFiled:Qs,pleaseSelectOneField:Ys,pleaseEnterNumberRange:ec,pleaseEnterAValueGreaterThanMin:tc,pleaseEnterAValueLessThanMax:nc,numberRangeSetError:rc,stringRangeError:uc,attachmentMaxSize:ic,pleaseEnterTotalScoreSetting:oc,theTotalScoreMustNotBeLessThan1:ac,scoreDefaultValueRange:sc,attachmentLimitError:cc,PleaseReselectTheOptionalQuantity:fc,TheMaximumLengthIsGreaterThanTheMinimumLength:lc,TheMinimumLengthIsGreaterThanTheMaximumLength:hc,PleaseSelectTheCorrectOptionSettings:dc,optionIdIsRepeat:pc,optionIsRequired:Dc,pleaseEnterDataCode:gc,pleaseEnterValueFieldCode:vc,pleaseEnterSvcCode:mc,pleaseBindAtLeastOneDisplayValue:yc,pleaseSelectProvince:Ec,pleaseSelectCity:Ac,pleaseSelectDistrict:Cc,limitRowsCannotBeLessThan0:Fc,TheNumberOfRowsCannotBeLessThanMinRows:wc,pleaseEnterColumnWidth:bc,pleaseSetTheLogicalRelationshipOfAllRuleConditions:Bc,pleaseCompleteAllRulesAndConditions:_c,pleaseSelectControl:Sc,pleaseSelectDashboard:Ic,theViewNameCannotBeEmpty:Mc,pleaseSelectOcrType:Nc,pleaseSelectAtLeastOneFieldToFillIn:xc,pleaseChooseAtLeastOne:Oc,pleaseEnterButtonContent:Rc,pleaseEnterDataCodeInDataSetting:Tc,pleaseEnterValueFieldCodeInDataSetting:Pc,pleaseEnterSvcCodeInDataSetting:$c,pleaseBindAtLeastOneDisplayValueInDataSetting:jc,rootNodeIsRequiredInDataSetting:Lc,pleaseEnterMaxHeight:qc,pleaseEnter:kc,pleaseEnterWatermark:Vc,pleaseEnterFileName:Uc,pleaseUploadAtLeastOnePrintTemplate:Hc,pleaseAssignBusiness:zc,pleaseAssignExternal:Wc},Gc="\u6570\u5B57\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Xc="\u6587\u5B57\u5217\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Kc="\u5BFE\u8C61\u7269\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Jc="\u6570\u5B57\u7D44\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Qc="\u30D6\u30FC\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",Yc="{caption}\u5FC5\u9808",ef="\u30BF\u30A4\u30C8\u30EB\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",tf="\u6C17\u6CE1\u306E\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",nf="\u30D2\u30F3\u30C8\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",rf="\u30C7\u30FC\u30BF\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",uf="\u30B7\u30FC\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",of="\u30EA\u30B9\u30C8\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",af="\u30D5\u30ED\u30FC\u3092\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",sf="\u8868\u793A\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",cf="\u4FDD\u5B58\u5024\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",ff="\u30B7\u30FC\u30C8\u756A\u53F7\u304C\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002",lf="\u5C11\u306A\u304F\u3068\u30821\u3064\u306E\u8868\u793A\u30D5\u30A3\u30FC\u30EB\u30C9\u3092\u9078\u629E\u3057\u3066\u304F\u3060\u3055\u3044",hf="{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",df="{min}\u4EE5\u4E0A\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",pf="{max}\u672A\u6E80\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",Df="\u6570\u5024\u7BC4\u56F2\u8A2D\u5B9A\u30A8\u30E9\u30FC",gf="\u9577\u3055\u304C{min}\u4EE5\u4E0A{max}\u4EE5\u4E0B\u306E\u5024\u3092\u5165\u529B\u3057\u3066\u304F\u3060\u3055\u3044",vf="\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB\u306F0MB\u304B\u30891000MB\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",mf="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",yf="\u30C8\u30FC\u30BF\u30EB\u70B9\u6570\u306F\uFF11\u4EE5\u4E0A\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Ef="\u57FA\u672C\u8A2D\u5B9A\u5024\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059\u3002",Af="\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u4EF6\u6570\u306F{min}\u304B\u3089{max}\u306E\u9593\u3067\u304A\u9858\u3044\u3057\u307E\u3059",Cf="\u6570\u91CF\u3092\u518D\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Ff="\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",wf="\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",bf="\u6B63\u78BA\u306A\u8A2D\u5B9A\u5024\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Bf="ID\u306F\u91CD\u8907\u3057\u306A\u3044\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",_f="\u6700\u4F4E\uFF11\u70B9\u3092\u9078\u3076\u3088\u3046\u306B\u304A\u9858\u3044\u3057\u307E\u3059",Sf="\u5143\u30C7\u30FC\u30BF\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",If="\u4FDD\u5B58\u5024\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Mf="\u30B5\u30FC\u30D3\u30B9\u306B\u30EA\u30F3\u30AF\u3057\u3066\u4E0B\u3055\u3044",Nf="\u8868\u793A\u5024\u3092\u30EA\u30F3\u30AF\u3057\u76F4\u3057\u3057\u3066\u4E0B\u3055\u3044",xf="\u7701\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Of="\u5E02\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Rf="\u533A\u3092\u9078\u629E\u3057\u3066\u4E0B\u3055\u3044",Tf="\u6700\u5C0F\u5024\u306F\uFF10\u3088\u308A\u5927\u304D\u304F\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Pf="\u6700\u4F4E\u884C\u6570\u306F{min}\u884C\u3067\u304A\u9858\u3044\u3057\u307E\u3059",$f="\u5217\u5E45\u3092\u5165\u529B\u3057\u3066\u4E0B\u3055\u3044",jf="\u5168\u3066\u306E\u6761\u4EF6\u306E\u30ED\u30B8\u30C3\u30AF\u3092\u8A2D\u5B9A\u3057\u3066\u4E0B\u3055\u3044",Lf="\u5168\u3066\u306E\u6761\u4EF6\u3092\u5B8C\u6210\u3055\u305B\u3066\u4E0B\u3055\u3044",qf="please select control",kf="\u8BF7\u9009\u62E9\u4EEA\u8868\u76D8",Vf="\u89C6\u56FE\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",Uf="\u8BF7\u9009\u62E9\u8BC6\u522B\u7C7B\u578B",Hf="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u5B57\u6BB5\u8FDB\u884C\u586B\u5145",zf="\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A",Wf="\u8BF7\u8F93\u5165\u6309\u94AE\u6807\u9898",Zf="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u4E1A\u52A1\u6A21\u578B",Gf="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u5B58\u50A8\u503C",Xf="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u7ED1\u5B9A\u670D\u52A1",Kf="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u81F3\u5C11\u7ED1\u5B9A\u4E00\u4E2A\u663E\u793A\u503C",Jf="\u8BF7\u5728\u6570\u636E\u8BBE\u7F6E\u4E2D\u9009\u62E9\u6839\u8282\u70B9",Qf="\u8BF7\u8F93\u5165\u6700\u5927\u9AD8\u5EA6",Yf="\u8F93\u5165\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A",el="\u6C34\u5370\u4E0D\u80FD\u4E3A\u7A7A",tl="\u6587\u4EF6\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A",nl="\u8BF7\u81F3\u5C11\u4E0A\u4F20\u4E00\u4E2A\u6253\u5370\u6A21\u7248\uFF01",rl="\u8BF7\u9009\u62E9\u6307\u5B9A\u4E1A\u52A1\u90E8\u95E8",ul="\u8BF7\u9009\u62E9\u6307\u5B9A\u5916\u90E8\u7EC4\u7EC7",il={isNotNumber:Gc,isNotString:Xc,isNotObject:Kc,isNotArray:Jc,isNotBoolean:Qc,runtimeRequired:Yc,pleaseEnterCaption:ef,pleaseEnterCaptionTip:tf,pleaseEnterPlaceholder:nf,pleaseEnterFieldCode:rf,pleaseEnterForm:uf,pleaseEnterList:of,pleaseEnterProcess:af,pleaseEnterLabel:sf,pleaseEnterValue:cf,bizKeyNotBindFiled:ff,pleaseSelectOneField:lf,pleaseEnterNumberRange:hf,pleaseEnterAValueGreaterThanMin:df,pleaseEnterAValueLessThanMax:pf,numberRangeSetError:Df,stringRangeError:gf,attachmentMaxSize:vf,pleaseEnterTotalScoreSetting:mf,theTotalScoreMustNotBeLessThan1:yf,scoreDefaultValueRange:Ef,attachmentLimitError:Af,PleaseReselectTheOptionalQuantity:Cf,TheMaximumLengthIsGreaterThanTheMinimumLength:Ff,TheMinimumLengthIsGreaterThanTheMaximumLength:wf,PleaseSelectTheCorrectOptionSettings:bf,optionIdIsRepeat:Bf,optionIsRequired:_f,pleaseEnterDataCode:Sf,pleaseEnterValueFieldCode:If,pleaseEnterSvcCode:Mf,pleaseBindAtLeastOneDisplayValue:Nf,pleaseSelectProvince:xf,pleaseSelectCity:Of,pleaseSelectDistrict:Rf,limitRowsCannotBeLessThan0:Tf,TheNumberOfRowsCannotBeLessThanMinRows:Pf,pleaseEnterColumnWidth:$f,pleaseSetTheLogicalRelationshipOfAllRuleConditions:jf,pleaseCompleteAllRulesAndConditions:Lf,pleaseSelectControl:qf,pleaseSelectDashboard:kf,theViewNameCannotBeEmpty:Vf,pleaseSelectOcrType:Uf,pleaseSelectAtLeastOneFieldToFillIn:Hf,pleaseChooseAtLeastOne:zf,pleaseEnterButtonContent:Wf,pleaseEnterDataCodeInDataSetting:Zf,pleaseEnterValueFieldCodeInDataSetting:Gf,pleaseEnterSvcCodeInDataSetting:Xf,pleaseBindAtLeastOneDisplayValueInDataSetting:Kf,rootNodeIsRequiredInDataSetting:Jf,pleaseEnterMaxHeight:Qf,pleaseEnter:Yf,pleaseEnterWatermark:el,pleaseEnterFileName:tl,pleaseUploadAtLeastOnePrintTemplate:nl,pleaseAssignBusiness:rl,pleaseAssignExternal:ul},ol={zhCN:Ps,enUS:Zc,jaJP:il},Ve;(function(e){e.Number="Number",e.Operator="Operator",e.VariableInMainTable="VariableInMainTable",e.VariableInCurrentSubTable="VariableInCurrentSubTable",e.VariableInOtherSubTable="VariableInOtherSubTable",e.UndefinedVariable="UndefinedVariable"})(Ve||(Ve={}));var Tt;(function(e){e.SUM="SUM",e.AVG="AVG",e.MAX="MAX",e.MIN="MIN"})(Tt||(Tt={}));var li="zh-CN";function Re(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ke;(function(e){e.BASE="base",e.FORM="form",e.LAYOUT="layout",e.WRAP="wrap",e.COLUMN="column",e.LIST="list",e.SEARCH="search"})(Ke||(Ke={}));var Q;(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"})(Q||(Q={}));var K;(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"})(K||(K={}));var _e;_e={},Re(_e,K.ARRAY,Q.ARRAY_COLUMN),Re(_e,K.AUTO_NUMBER,Q.AUTO_NUMBER_COLUMN),Re(_e,K.DECIMAL,Q.DECIMAL_COLUMN),Re(_e,K.DEPARTMENTS,Q.DEPARTMENT_COLUMN),Re(_e,K.FILE,Q.FILE_COLUMN),Re(_e,K.IMAGE,Q.IMAGE_COLUMN),Re(_e,K.ADDRESS,Q.LOCATION_COLUMN),Re(_e,K.EMPLOYEES,Q.EMPLOYEE_COLUMN),Re(_e,K.TEXT,Q.TEXT_COLUMN),Re(_e,K.TIMESCOPE,Q.TIMESCOPE_COLUMN),Re(_e,K.TIMESTAMP,Q.TIMESTAMP_COLUMN),Re(_e,K.VARCHAR,Q.VARCHAR_COLUMN),Re(_e,K.RELATION,Q.VARCHAR_COLUMN);var hi;(function(e){e.YEAR="year",e.MONTH="month",e.DATE="date",e.DATETIME="datetime"})(hi||(hi={}));var di="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",al=di+"0123456789";function wr(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:15,t="",n=0;n<e;n++){var r=n===0?di:al,u=Math.random()*r.length;t+=r[parseInt(String(u),10)]}return t}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 sl(e){if(Array.isArray(e))return br(e)}function cl(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function pi(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function fl(){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 _n(e,t,n){return fl()?_n=Reflect.construct:_n=function(u,i,o){var c=[null];c.push.apply(c,i);var s=Function.bind.apply(u,c),l=new s;return o&&un(l,o.prototype),l},_n.apply(null,arguments)}function rn(e){return rn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},rn(e)}function Di(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&&un(e,t)}function ll(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function hl(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function dl(){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 pl(e,t){return t&&(Dl(t)==="object"||typeof t=="function")?t:cl(e)}function un(e,t){return un=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},un(e,t)}function gi(e){return sl(e)||hl(e)||gl(e)||dl()}var Dl=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function gl(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 Br(e){var t=typeof Map=="function"?new Map:void 0;return Br=function(r){if(r===null||!ll(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 _n(r,arguments,rn(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),un(u,r)},Br(e)}function vl(){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 vi(e){var t=vl();return function(){var r=rn(e),u;if(t){var i=rn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return pl(this,u)}}var _r=console;function Je(){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(gi(u)))}function Sn(){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(gi(u)))}function ml(e){return e+" \u{1F41B}\u{1F41B}\u{1F41B}"}var Sr=function(e){Di(n,e);var t=vi(n);function n(r){pi(this,n);var u;return u=t.call(this,r),u.name="\u{1F4A5} Driven Error",u.message=r?ml(r):"An unknown error occurred in the Driven, please contact the person in charge \u{1F691}\u{1F691}\u{1F691}",u}return n}(Br(Error)),yl=function(e){Di(n,e);var t=vi(n);function n(r){pi(this,n);var u;return u=t.call(this,r),u.name="\u{1F6A8} Driven Reference Error",u}return n}(Sr);function st(e){throw new Sr(e)}function mi(e){throw new yl(e)}function In(e){_r.error(new Sr(e))}function _t(e,t){Array.isArray(e)&&e.map(function(n){switch(n.controlType){case"layout":_t(n==null?void 0:n.children,t);break;case"search":_t(n==null?void 0:n.children,t);break;case"form":t(n)}})}var El=Object.prototype.toString;function yi(e,t){return El.call(e)==="[object "+t+"]"}function Al(e){return yi(e,"String")}function Cl(e){return yi(e,"Promise")}var Fl=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();Cl(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,o,c){if(u!==void 0){var s=u[i];if(!(o===c.length-1&&!Al(s)))return s}},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 wl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Ue=function(){function e(){wl(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]:li;return new Fl({locale:n,messages:ol})},e.setLocale=function(n){return this.$i18n.setLocale(n)},e}();Ue.$i18n=Ue.resetI18n();function Ei(e,t,n){var r=t.replace(/\[(\d)]/g,function(i,o){return"."+o}).split("."),u=!1;return r.reduce(function(i,o,c,s){var l=i;if(!!i){if(!Object.prototype.hasOwnProperty.call(i,o)){Je("Can not set ".concat(t,"'s ").concat(o," property in current %o, Because there is no ").concat(o," property on the %o"),i,i);return}return c===s.length-1&&!Object.is(l[o],n)&&(l[o]=n,u=!0),l[o]}},e),u}var je=typeof globalThis!="undefined"?globalThis:typeof window!="undefined"?window:typeof global!="undefined"?global:typeof self!="undefined"?self:{};function Ai(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ir={exports:{}};(function(e){(function(t){var n=function(g,A,I){if(!l(A)||a(A)||h(A)||d(A)||s(A))return A;var w,x=0,P=0;if(f(A))for(w=[],P=A.length;x<P;x++)w.push(n(g,A[x],I));else{w={};for(var L in A)Object.prototype.hasOwnProperty.call(A,L)&&(w[g(L,I)]=n(g,A[L],I))}return w},r=function(g,A){A=A||{};var I=A.separator||"_",w=A.split||/(?=[A-Z])/;return g.split(w).join(I)},u=function(g){return p(g)?g:(g=g.replace(/[\-_\s]+(.)?/g,function(A,I){return I?I.toUpperCase():""}),g.substr(0,1).toLowerCase()+g.substr(1))},i=function(g){var A=u(g);return A.substr(0,1).toUpperCase()+A.substr(1)},o=function(g,A){return r(g,A).toLowerCase()},c=Object.prototype.toString,s=function(g){return typeof g=="function"},l=function(g){return g===Object(g)},f=function(g){return c.call(g)=="[object Array]"},a=function(g){return c.call(g)=="[object Date]"},h=function(g){return c.call(g)=="[object RegExp]"},d=function(g){return c.call(g)=="[object Boolean]"},p=function(g){return g=g-0,g===g},D=function(g,A){var I=A&&"process"in A?A.process:A;return typeof I!="function"?g:function(w,x){return I(w,g,x)}},m={camelize:u,decamelize:o,pascalize:i,depascalize:o,camelizeKeys:function(g,A){return n(D(u,A),g)},decamelizeKeys:function(g,A){return n(D(o,A),g,A)},pascalizeKeys:function(g,A){return n(D(i,A),g)},depascalizeKeys:function(){return this.decamelizeKeys.apply(this,arguments)}};e.exports?e.exports=m:t.humps=m})(je)})(Ir);function he(e){if(e!==void 0)return typeof e=="object"?JSON.parse(JSON.stringify(e)):e}function Qe(e){return Object.prototype.toString.call(e)==="[object Object]"}function bl(e){return e!=null&&typeof e=="object"&&Array.isArray(e)===!1}function Pt(e){return Array.isArray(e)}function Te(e){return typeof e=="string"}function Mn(e){return typeof e=="number"}function Ci(e){return typeof e=="function"}function Bl(e){return Pt(e)&&e.every(function(t){return Te(t)})}function _l(e){return Pt(e)&&e.every(function(t){return Mn(t)||t===""})}function Fi(e){return/^\[.*?]$/.test(e)}function Nn(e){return/^{.*?}$/.test(e)}function Mr(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 Sl(e){if(Array.isArray(e))return Mr(e)}function wi(e,t,n,r,u,i,o){try{var c=e[i](o),s=c.value}catch(l){n(l);return}c.done?t(s):Promise.resolve(s).then(r,u)}function Il(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(s){wi(i,r,u,o,c,"next",s)}function c(s){wi(i,r,u,o,c,"throw",s)}o(void 0)})}}function Ml(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nl(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function xl(){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 Sl(e)||Nl(e)||Ol(e)||xl()}function Ol(e,t){if(!!e){if(typeof e=="string")return Mr(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 Mr(e,t)}}var Rl=function(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(f){return s([l,f])}}function s(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)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 o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}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}}},bi=function(){function e(){Ml(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),o=1;o<u;o++)i[o-1]=arguments[o];var c=this;return Il(function(){var s,l,f,a,h,d,p,D,m,g,A,I;return Rl(this,function(w){switch(w.label){case 0:if(s=c._events.get(r),l=[],!s)return[3,10];f=s.slice(),a=!0,h=!1,d=void 0,w.label=1;case 1:w.trys.push([1,8,9,10]),p=f[Symbol.iterator](),w.label=2;case 2:if(a=(D=p.next()).done)return[3,7];if(m=D.value,!s.includes(m))return[3,6];w.label=3;case 3:return w.trys.push([3,5,,6]),c.debug&&Sn.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(m.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+m.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"\u3002")].concat(Nr(i))),[4,m.apply(null,Nr(i))];case 4:return g=w.sent(),c.debug&&Sn.apply(void 0,["\u6B63\u5728\u6267\u884C ".concat(r," \u4E8B\u4EF6: ").concat(m.applyingPluginName?"\u5F53\u524D\u6267\u884C\u7684\u63D2\u4EF6\u4E3A:"+m.applyingPluginName:"",", \u5F53\u524D\u6267\u884C\u51FD\u6570\u7684\u53C2\u6570\u4E3A").concat(i.map(function(){return"%o"}).join(","),"; \u51FD\u6570\u7684\u8FD4\u56DE\u7ED3\u679C\u4E3A%o")].concat(Nr(i),[g])),l.push(g),g===!1?[3,7]:[3,6];case 5:return A=w.sent(),In(String(A)),[3,6];case 6:return a=!0,[3,2];case 7:return[3,10];case 8:return I=w.sent(),h=!0,d=I,[3,10];case 9:try{!a&&p.return!=null&&p.return()}finally{if(h)throw d}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),o=i==null?void 0:i.indexOf(u);i==null||i.splice(o,1)}},t.delete=function(r){this._events.has(r)&&this._events.delete(r)},t.clear=function(){this._events=new Map},e}();function Tl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var Pl=[{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_render_operation",name:"\u64CD\u4F5C\u5217\u6E32\u67D3\u65F6",code:"list-render-operation"},{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"}],Bi=function(){function e(){Tl(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}();Bi.events=Pl;function $l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var _i=[],xn=function(){function e(n){$l(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__||st("".concat(r.name," is not a Control"));var u=this._controls.findIndex(function(i){return i.controlType===r.controlType});return u>-1&&(Je("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===Ke.LAYOUT},t.isFormControl=function(r){return r.controlType===Ke.FORM},t.isListControl=function(r){return r.controlType===Ke.LIST},t.isColumnControl=function(r){return r.controlType===Ke.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 o=this.getControlFormType(r.type);if(o){var c=r;if(typeof u=="function"){var s=u(c);s&&(c=s)}var l=new o(c);return l}else st("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__)&&st("".concat(r," is can't register as a Control"));var o=this.staticControls.findIndex(function(c){return c.Designer.controlType===u.controlType});return o>-1&&(Je("The ".concat(u.controlType," is repeat register, So it overwrites the one that was registered before.")),this.staticControls.splice(o,1)),this.staticRegisteredTypes.add(u.controlType),this.staticControls.push(r),this},e}();xn.staticControls=_i,xn.staticRegisteredTypes=new Set(_i.map(function(e){return e.Designer.controlType})),xn.staticRegisteredConfigs=new Map;function St(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var on=function e(t){St(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:""},pt=function e(){St(this,e)},On=function e(t){St(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:xr.CNY},Rn=function e(t){St(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:""},Tn=function e(t){St(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 o;this.province=(o=t==null?void 0:t.province)!==null&&o!==void 0?o:"";var c;this.provinceDisplay=(c=t==null?void 0:t.provinceDisplay)!==null&&c!==void 0?c:""},Pn=function e(t){St(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:""},xr;(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"})(xr||(xr={}));var Si;(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"})(Si||(Si={}));var Or;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.READONLY=1]="READONLY",e[e.EDITABLE=2]="EDITABLE",e[e.PRINT=5]="PRINT"})(Or||(Or={}));var jl=function e(t){St(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 Ll(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Rr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ql(){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 $n(e,t,n){return ql()?$n=Reflect.construct:$n=function(u,i,o){var c=[null];c.push.apply(c,i);var s=Function.bind.apply(u,c),l=new s;return o&&sn(l,o.prototype),l},$n.apply(null,arguments)}function an(e){return an=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},an(e)}function kl(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&&sn(e,t)}function Vl(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function Ul(e,t){return t&&(Hl(t)==="object"||typeof t=="function")?t:Ll(e)}function sn(e,t){return sn=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},sn(e,t)}var Hl=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Tr(e){var t=typeof Map=="function"?new Map:void 0;return Tr=function(r){if(r===null||!Vl(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 $n(r,arguments,an(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),sn(u,r)},Tr(e)}function zl(){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 Wl(e){var t=zl();return function(){var r=an(e),u;if(t){var i=an(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Ul(this,u)}}var Ii=function e(t){Rr(this,e),this.isHide={type:"boolean"}},Mi=function(e){kl(n,e);var t=Wl(n);function n(r){return Rr(this,n),t.call(this)}return n}(Tr(Array)),It=function e(t){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";Rr(this,e);var r;this.isHide=(r=t==null?void 0:t.isHide)!==null&&r!==void 0?r:!1,this.style=new jl(t==null?void 0:t.style);var u;this.caption=(u=t==null?void 0:t.caption)!==null&&u!==void 0?u:n};It.Rules=Ii,It.RuntimeRules=Mi;function Ye(){return Ye=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},Ye.apply(this,arguments)}function Zl(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function Pr(e){return Pr=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Pr(e)}function jn(e,t){return jn=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},jn(e,t)}function Gl(){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 Ln(e,t,n){return Gl()?Ln=Reflect.construct:Ln=function(u,i,o){var c=[null];c.push.apply(c,i);var s=Function.bind.apply(u,c),l=new s;return o&&jn(l,o.prototype),l},Ln.apply(null,arguments)}function Xl(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function $r(e){var t=typeof Map=="function"?new Map:void 0;return $r=function(r){if(r===null||!Xl(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 Ln(r,arguments,Pr(this).constructor)}return u.prototype=Object.create(r.prototype,{constructor:{value:u,enumerable:!1,writable:!0,configurable:!0}}),jn(u,r)},$r(e)}var Kl=/%[sdj%]/g,Ni=function(){};typeof process!="undefined"&&process.env&&process.env.NODE_ENV!=="production"&&typeof window!="undefined"&&typeof document!="undefined"&&(Ni=function(t,n){typeof console!="undefined"&&console.warn&&n.every(function(r){return typeof r=="string"})&&console.warn(t,n)});function jr(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 Pe(){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 o=String(u).replace(Kl,function(c){if(c==="%%")return"%";if(r>=i)return c;switch(c){case"%s":return String(t[r++]);case"%d":return Number(t[r++]);case"%j":try{return JSON.stringify(t[r++])}catch(s){return"[Circular]"}break;default:return c}});return o}return u}function Jl(e){return e==="string"||e==="url"||e==="hex"||e==="email"||e==="date"||e==="pattern"}function de(e,t){return!!(e==null||t==="array"&&Array.isArray(e)&&!e.length||Jl(t)&&typeof e=="string"&&!e)}function Ql(e,t,n){var r=[],u=0,i=e.length;function o(c){r.push.apply(r,c),u++,u===i&&n(r)}e.forEach(function(c){t(c,o)})}function xi(e,t,n){var r=0,u=e.length;function i(o){if(o&&o.length){n(o);return}var c=r;r=r+1,c<u?t(e[c],i):n([])}i([])}function Yl(e){var t=[];return Object.keys(e).forEach(function(n){t.push.apply(t,e[n])}),t}var Oi=function(e){Zl(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}($r(Error));function e0(e,t,n,r){if(t.first){var u=new Promise(function(a,h){var d=function(m){return r(m),m.length?h(new Oi(m,jr(m))):a()},p=Yl(e);xi(p,n,d)});return u.catch(function(a){return a}),u}var i=t.firstFields||[];i===!0&&(i=Object.keys(e));var o=Object.keys(e),c=o.length,s=0,l=[],f=new Promise(function(a,h){var d=function(D){if(l.push.apply(l,D),s++,s===c)return r(l),l.length?h(new Oi(l,jr(l))):a()};o.length||(r(l),a()),o.forEach(function(p){var D=e[p];i.indexOf(p)!==-1?xi(D,n,d):Ql(D,n,d)})});return f.catch(function(a){return a}),f}function Ri(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 Ti(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]=Ye(Ye({},e[n]),r):e[n]=r}}return e}function Pi(e,t,n,r,u,i){e.required&&(!n.hasOwnProperty(e.field)||de(t,i||e.type))&&r.push(Pe(u.messages.required,e.fullField))}function t0(e,t,n,r,u){(/^\s+$/.test(t)||t==="")&&r.push(Pe(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},cn={integer:function(t){return cn.number(t)&&parseInt(t,10)===t},float:function(t){return cn.number(t)&&!cn.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"&&!cn.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 n0(e,t,n,r,u){if(e.required&&t===void 0){Pi(e,t,n,r,u);return}var i=["integer","float","array","regexp","object","method","email","number","date","url","hex"],o=e.type;i.indexOf(o)>-1?cn[o](t)||r.push(Pe(u.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&r.push(Pe(u.messages.types[o],e.fullField,e.type))}function r0(e,t,n,r,u){var i=typeof e.len=="number",o=typeof e.min=="number",c=typeof e.max=="number",s=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=t,f=null,a=typeof t=="number",h=typeof t=="string",d=Array.isArray(t);if(a?f="number":h?f="string":d&&(f="array"),!f)return!1;d&&(l=t.length),h&&(l=t.replace(s,"_").length),i?l!==e.len&&r.push(Pe(u.messages[f].len,e.fullField,e.len)):o&&!c&&l<e.min?r.push(Pe(u.messages[f].min,e.fullField,e.min)):c&&!o&&l>e.max?r.push(Pe(u.messages[f].max,e.fullField,e.max)):o&&c&&(l<e.min||l>e.max)&&r.push(Pe(u.messages[f].range,e.fullField,e.min,e.max))}var $t="enum";function u0(e,t,n,r,u){e[$t]=Array.isArray(e[$t])?e[$t]:[],e[$t].indexOf(t)===-1&&r.push(Pe(u.messages[$t],e.fullField,e[$t].join(", ")))}function i0(e,t,n,r,u){if(e.pattern){if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(Pe(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(Pe(u.messages.pattern.mismatch,e.fullField,t,e.pattern))}}}var Z={required:Pi,whitespace:t0,type:n0,range:r0,enum:u0,pattern:i0};function o0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t,"string")&&!e.required)return n();Z.required(e,t,r,i,u,"string"),de(t,"string")||(Z.type(e,t,r,i,u),Z.range(e,t,r,i,u),Z.pattern(e,t,r,i,u),e.whitespace===!0&&Z.whitespace(e,t,r,i,u))}n(i)}function a0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&Z.type(e,t,r,i,u)}n(i)}function s0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(t===""&&(t=void 0),de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&(Z.type(e,t,r,i,u),Z.range(e,t,r,i,u))}n(i)}function c0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&Z.type(e,t,r,i,u)}n(i)}function f0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),de(t)||Z.type(e,t,r,i,u)}n(i)}function l0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&(Z.type(e,t,r,i,u),Z.range(e,t,r,i,u))}n(i)}function h0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&(Z.type(e,t,r,i,u),Z.range(e,t,r,i,u))}n(i)}function d0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(t==null&&!e.required)return n();Z.required(e,t,r,i,u,"array"),t!=null&&(Z.type(e,t,r,i,u),Z.range(e,t,r,i,u))}n(i)}function p0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&Z.type(e,t,r,i,u)}n(i)}var D0="enum";function g0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u),t!==void 0&&Z[D0](e,t,r,i,u)}n(i)}function v0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t,"string")&&!e.required)return n();Z.required(e,t,r,i,u),de(t,"string")||Z.pattern(e,t,r,i,u)}n(i)}function m0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t,"date")&&!e.required)return n();if(Z.required(e,t,r,i,u),!de(t,"date")){var c;t instanceof Date?c=t:c=new Date(t),Z.type(e,c,r,i,u),c&&Z.range(e,c.getTime(),r,i,u)}}n(i)}function y0(e,t,n,r,u){var i=[],o=Array.isArray(t)?"array":typeof t;Z.required(e,t,r,i,u,o),n(i)}function qr(e,t,n,r,u){var i=e.type,o=[],c=e.required||!e.required&&r.hasOwnProperty(e.field);if(c){if(de(t,i)&&!e.required)return n();Z.required(e,t,r,o,u,i),de(t,i)||Z.type(e,t,r,o,u)}n(o)}function E0(e,t,n,r,u){var i=[],o=e.required||!e.required&&r.hasOwnProperty(e.field);if(o){if(de(t)&&!e.required)return n();Z.required(e,t,r,i,u)}n(i)}var fn={string:o0,method:a0,number:s0,boolean:c0,regexp:f0,integer:l0,float:h0,array:d0,object:p0,enum:g0,pattern:v0,date:m0,url:qr,hex:qr,email:qr,required:y0,any:E0};function kr(){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 Vr=kr();function Dt(e){this.rules=null,this._messages=Vr,this.define(e)}Dt.prototype={messages:function(t){return t&&(this._messages=Ti(kr(),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,o=n,c=r;if(typeof o=="function"&&(c=o,o={}),!this.rules||Object.keys(this.rules).length===0)return c&&c(),Promise.resolve();function s(D){var m,g=[],A={};function I(w){if(Array.isArray(w)){var x;g=(x=g).concat.apply(x,w)}else g.push(w)}for(m=0;m<D.length;m++)I(D[m]);g.length?A=jr(g):(g=null,A=null),c(g,A)}if(o.messages){var l=this.messages();l===Vr&&(l=kr()),Ti(l,o.messages),o.messages=l}else o.messages=this.messages();var f,a,h={},d=o.keys||Object.keys(this.rules);d.forEach(function(D){f=u.rules[D],a=i[D],f.forEach(function(m){var g=m;typeof g.transform=="function"&&(i===t&&(i=Ye({},i)),a=i[D]=g.transform(a)),typeof g=="function"?g={validator:g}:g=Ye({},g),g.validator=u.getValidationMethod(g),g.field=D,g.fullField=g.fullField||D,g.type=u.getType(g),g.validator&&(h[D]=h[D]||[],h[D].push({rule:g,value:a,source:i,field:D}))})});var p={};return e0(h,o,function(D,m){var g=D.rule,A=(g.type==="object"||g.type==="array")&&(typeof g.fields=="object"||typeof g.defaultField=="object");A=A&&(g.required||!g.required&&D.value),g.field=D.field;function I(P,L){return Ye(Ye({},L),{},{fullField:g.fullField+"."+P})}function w(P){P===void 0&&(P=[]);var L=P;if(Array.isArray(L)||(L=[L]),!o.suppressWarning&&L.length&&Dt.warning("async-validator:",L),L.length&&g.message!==void 0&&(L=[].concat(g.message)),L=L.map(Ri(g)),o.first&&L.length)return p[g.field]=1,m(L);if(!A)m(L);else{if(g.required&&!D.value)return g.message!==void 0?L=[].concat(g.message).map(Ri(g)):o.error&&(L=[o.error(g,Pe(o.messages.required,g.field))]),m(L);var M={};if(g.defaultField)for(var j in D.value)D.value.hasOwnProperty(j)&&(M[j]=g.defaultField);M=Ye(Ye({},M),D.rule.fields);for(var G in M)if(M.hasOwnProperty(G)){var z=Array.isArray(M[G])?M[G]:[M[G]];M[G]=z.map(I.bind(null,G))}var ee=new Dt(M);ee.messages(o.messages),D.rule.options&&(D.rule.options.messages=o.messages,D.rule.options.error=o.error),ee.validate(D.value,D.rule.options||o,function(Y){var ue=[];L&&L.length&&ue.push.apply(ue,L),Y&&Y.length&&ue.push.apply(ue,Y),m(ue.length?ue:null)})}}var x;g.asyncValidator?x=g.asyncValidator(g,D.value,w,D.source,o):g.validator&&(x=g.validator(g,D.value,w,D.source,o),x===!0?w():x===!1?w(g.message||g.field+" fails"):x instanceof Array?w(x):x instanceof Error&&w(x.message)),x&&x.then&&x.then(function(){return w()},function(P){return w(P)})},function(D){s(D)})},getType:function(t){if(t.type===void 0&&t.pattern instanceof RegExp&&(t.type="pattern"),typeof t.validator!="function"&&t.type&&!fn.hasOwnProperty(t.type))throw new Error(Pe("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"?fn.required:fn[this.getType(t)]||!1}},Dt.register=function(t,n){if(typeof n!="function")throw new Error("Cannot register a validator by type, validator is not a function");fn[t]=n},Dt.warning=Ni,Dt.messages=Vr,Dt.validators=fn;var A0={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 C0(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=new Dt(e);return n.messages(Object.assign(A0,t)),n}var F0=new bi;function Ur(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 w0(e){if(Array.isArray(e))return e}function b0(e){if(Array.isArray(e))return Ur(e)}function $i(e,t,n,r,u,i,o){try{var c=e[i](o),s=c.value}catch(l){n(l);return}c.done?t(s):Promise.resolve(s).then(r,u)}function ji(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(s){$i(i,r,u,o,c,"next",s)}function c(s){$i(i,r,u,o,c,"throw",s)}o(void 0)})}}function B0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Li(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 _0(e,t,n){return t&&Li(e.prototype,t),n&&Li(e,n),e}function S0(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function qi(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function ki(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function I0(){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 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 Vi(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){S0(e,u,n[u])})}return e}function N0(e){return w0(e)||ki(e)||Ui(e)||I0()}function Hr(e){return b0(e)||ki(e)||Ui(e)||M0()}function Ui(e,t){if(!!e){if(typeof e=="string")return Ur(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 Ur(e,t)}}var Hi=function(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(f){return s([l,f])}}function s(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)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 o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}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}}},et=function(){function t(r){var u=this;B0(this,t),this.setting=[],this.eventKeys=[],this.customEvents=[],this.parent=null,this.updateSetting=Wi,this.removeSetting=zi,this._callControlHooks("preInstance",r);var i=qi(this,t)?this.constructor:void 0,o=i.controlName,c=i.controlIcon,s=i.controlType,l=i.controlFieldType,f=i.controlEventKeys,a=i.controlCustomEvents,h=i.name,d=i.setting;o&&c&&s||mi("The ".concat(h," controlName,controlIcon,controlType is not define"));var p;this.id=(p=r==null?void 0:r.id)!==null&&p!==void 0?p:wr(10),this.name=o,this.icon=c;var D;this.type=(D=r==null?void 0:r.type)!==null&&D!==void 0?D:s,this.props=new It(r==null?void 0:r.props,(qi(this,t)?this.constructor:void 0).controlName);var m;this.controlType=(m=r==null?void 0:r.controlType)!==null&&m!==void 0?m:"base",this.setting=he(d);var g;this.fieldType=(g=r==null?void 0:r.fieldType)!==null&&g!==void 0?g:l,this.eventKeys=he(f),this.customEvents=he(a),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),o=0;o<u;o++)i[o]=arguments[o];var c,s=N0(i),l=s[0],f=s.slice(1);return(c=F0).emit.apply(c,[l,this].concat(Hr(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),Ei(this.props,u,i),this.postUpdate(u,i)},n.preValidate=function(){var u=this;return ji(function(){var i,o,c;return Hi(this,function(s){switch(s.label){case 0:return i=Vi({},u.rules),[4,u._callControlHooks("preValidate",i)];case 1:return o=s.sent(),c=o[o.length-1],[2,c===!1?void 0:c]}})})()},n.validate=function(u,i){var o=this;return ji(function(){var c,s,l,f;return Hi(this,function(a){switch(a.label){case 0:return[4,o.preValidate()];case 1:c=a.sent(),s=c!==void 0?c:Vi({},o.rules),Array.isArray(i)&&i.forEach(function(h){s.hasOwnProperty(h)&&delete s[h]}),l=C0(s,u),a.label=2;case 2:return a.trys.push([2,4,,5]),[4,l.validate(o.props)];case 3:return a.sent(),[2,!0];case 4:throw f=a.sent(),f.control||(f.control=o),f;case 5:return[2]}})})()},n.toDataBindModel=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,i=this.fieldType,o=this.id,c=this.type,s=this.props,l=s.dataBind,f=s.datasourceBind,a=s.optionConfig,h=s.caption,d=s.required,p=s.maxLength,D=s.options,m=s.encrypted,g=s.encryptedMode;if(!(!i&&!l&&!f)){var A={parentId:u,fieldType:i,controlId:o,caption:h,type:c,props:{}};switch(l&&(A.dataBind=l),a){case"datasource":case void 0:f&&(A.datasourceBind=f);break;case"custom":A.props.options=D;break}return d!==void 0&&(A.required=d),p!==void 0&&(A.maxLength=p),m!==void 0&&(A.encrypted=m),g!==void 0&&(A.encryptedMode=g),A}},n.preToSchema=function(){this._callControlHooks("preToSchema",this)},n.toSchema=function(){return this.preToSchema(),{id:this.id,type:this.type,props:he(this.props),fieldType:this.fieldType,controlType:this.controlType}},t.updateBasicControl=function(u,i){if(u==="setting"){if(i.add){var o;(o=this.setting).push.apply(o,Hr(i.add))}i.remove&&this.removeSettingItem(i.remove),i.update}},_0(t,[{key:"rules",get:function(){var u=this.props.constructor.Rules;return u?new u(this.props):{}}}]),t}();et.controlName="\u63A7\u4EF6",et.controlIcon="icon",et.controlType="control",et.controlEventKeys=[],et.controlCustomEvents=[],et.setting=[],et.__is_control__=!0,et.removeSettingItem=zi,et.updateSettingItem=Wi;function zi(e){var t=this,n=Array.isArray(e)?e:[e];n.forEach(function(r){var u=typeof r!="string",i=t.setting.findIndex(function(s){return s.key===(u?r.key:r)});if(i!==-1){var o,c;u?t.setting[i].showItems=(o=t.setting[i].showItems)===null||o===void 0?void 0:o.filter(function(s){return!r.hideItems.includes(s)}):t.setting.splice(i,1),u&&!(!((c=t.setting[i].showItems)===null||c===void 0)&&c.length)&&t.setting.splice(i,1)}})}function Wi(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 o,c=(o=t.type)!==null&&o!==void 0?o:"replace";if(c==="replace")i.showItems=t.showItems;else{var s;(s=i.showItems).push.apply(s,Hr(t.showItems))}}}})}function x0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Zi(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 O0(e,t,n){return t&&Zi(e.prototype,t),n&&Zi(e,n),e}function R0(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}var ln=function(){function t(n){x0(this,t),this.customEvents=[],this.parent=null;var r=R0(this,t)?this.constructor:void 0,u=r.controlType,i=r.controlFieldType,o=r.name,c=r.controlCustomEvents;u||mi("The ".concat(o," controlType is not define"));var s;this.id=(s=n==null?void 0:n.id)!==null&&s!==void 0?s:wr(10);var l;this.type=(l=n==null?void 0:n.type)!==null&&l!==void 0?l:u,this.props=new It(n==null?void 0:n.props),this.customEvents=c;var f;this.controlType=(f=n==null?void 0:n.controlType)!==null&&f!==void 0?f:"base";var a;this.fieldType=(a=n==null?void 0:n.fieldType)!==null&&a!==void 0?a:i;var h;this.pageStatus=(h=n==null?void 0:n.pageStatus)!==null&&h!==void 0?h:Or.UNKNOWN}return O0(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}();ln.controlType="control",ln.__is_control__=!0,ln.controlCustomEvents=[];function T0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function zr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qn(e){return qn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},qn(e)}function Wr(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&&Zr(e,t)}function P0(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function $0(e,t){return t&&(j0(t)==="object"||typeof t=="function")?t:T0(e)}function Zr(e,t){return Zr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Zr(e,t)}var j0=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 Gr(e){var t=L0();return function(){var r=qn(e),u;if(t){var i=qn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return $0(this,u)}}var q0=function(e){Wr(n,e);var t=Gr(n);function n(r){zr(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(P0(r.dataBind,on))u.dataBind={type:"object",required:!0,fields:he(i),message:Ue.getMessage("pleaseEnterFieldCode")};else{var o={type:"object",required:!0,fields:{},message:Ue.getMessage("pleaseEnterFieldCode")};Object.keys(r.dataBind).forEach(function(c){o.fields[c]={type:"object",required:!0,fields:he(i),message:Ue.getMessage("pleaseEnterFieldCode")}}),u.dataBind=o}return r.isShowCaptionTip&&(u.captionTip.required=!0),u}return n}(Ii),k0=function(e){Wr(n,e);var t=Gr(n);function n(r){zr(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}(Mi),Xr=function(e){Wr(n,e);var t=Gr(n);function n(r){zr(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 o;u.isHideCaption=(o=r==null?void 0:r.isHideCaption)!==null&&o!==void 0?o:!1;var c;u.isShowCaptionTip=(c=r==null?void 0:r.isShowCaptionTip)!==null&&c!==void 0?c:!1;var s;u.captionTip=(s=r==null?void 0:r.captionTip)!==null&&s!==void 0?s:"";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 a;u.placeholder=(a=r==null?void 0:r.placeholder)!==null&&a!==void 0?a:"";var h;u.required=(h=r==null?void 0:r.required)!==null&&h!==void 0?h:!1;var d;u.requiredMessage=(d=r==null?void 0:r.requiredMessage)!==null&&d!==void 0?d:"",u.dataBind=new on(r==null?void 0:r.dataBind);var p;return u.defaultValue=(p=r==null?void 0:r.defaultValue)!==null&&p!==void 0?p:"",u}return n}(It);Xr.Rules=q0,Xr.RuntimeRules=k0;function V0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function U0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kn(e){return kn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},kn(e)}function H0(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&&Kr(e,t)}function z0(e,t){return t&&(W0(t)==="object"||typeof t=="function")?t:V0(e)}function Kr(e,t){return Kr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Kr(e,t)}var W0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Z0(){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 G0(e){var t=Z0();return function(){var r=kn(e),u;if(t){var i=kn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return z0(this,u)}}var tt=function(e){H0(n,e);var t=G0(n);function n(r){U0(this,n);var u;return u=t.call(this,r),u.controlType="form",u.props=new Xr(r==null?void 0:r.props),u}return n}(ln);function X0(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function K0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Vn(e){return Vn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Vn(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&&Jr(e,t)}function Q0(e,t){return t&&(Y0(t)==="object"||typeof t=="function")?t:X0(e)}function Jr(e,t){return Jr=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},Jr(e,t)}var Y0=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function eh(){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 th(e){var t=eh();return function(){var r=Vn(e),u;if(t){var i=Vn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Q0(this,u)}}var nh=function(e){J0(n,e);var t=th(n);function n(r){return K0(this,n),t.call(this,r)}return n}(It);function Qr(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 rh(e){if(Array.isArray(e))return Qr(e)}function uh(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ih(){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 Gi(e){return rh(e)||uh(e)||oh(e)||ih()}function oh(e,t){if(!!e){if(typeof e=="string")return Qr(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 Qr(e,t)}}function ah(e,t){var n;!((n=Object.getOwnPropertyDescriptors(e)[t])===null||n===void 0)&&n.enumerable&&Object.defineProperty(e,t,{enumerable:!1})}function Xi(e,t){e.parent=t,ah(e,"parent")}function sh(e,t){e.forEach(function(n){Xi(n,t)})}var Ki=Symbol("targetKey");function Ji(e){var t;return(t=e[Ki])!==null&&t!==void 0?t:e}function Qi(e,t){return sh(e,t),new Proxy(e,{get:function(r,u){for(var i=arguments.length,o=new Array(i>2?i-2:0),c=2;c<i;c++)o[c-2]=arguments[c];var s;return u===Ki?r:(s=Reflect).get.apply(s,[r,u].concat(Gi(o)))},set:function(r,u,i){for(var o=arguments.length,c=new Array(o>3?o-3:0),s=3;s<o;s++)c[s-3]=arguments[s];var l;if(Pt(e)&&u==="length"&&i===e.length)return!0;var f=(l=Reflect).set.apply(l,[r,u,i].concat(Gi(c)));return Qe(i)&&Xi(i,t),f}})}function Yr(e,t,n,r){var u=r!=null?r:e,i=Qi(Ji(n!=null?n:[]),u);Object.defineProperty(e,t,{get:function(){return i},set:function(c){i=Qi(Ji(c),u)},enumerable:!0})}function eu(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 ch(e){if(Array.isArray(e))return eu(e)}function Yi(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function eo(e,t,n,r,u,i,o){try{var c=e[i](o),s=c.value}catch(l){n(l);return}c.done?t(s):Promise.resolve(s).then(r,u)}function fh(e){return function(){var t=this,n=arguments;return new Promise(function(r,u){var i=e.apply(t,n);function o(s){eo(i,r,u,o,c,"next",s)}function c(s){eo(i,r,u,o,c,"throw",s)}o(void 0)})}}function lh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function hh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function jt(e,t,n){return typeof Reflect!="undefined"&&Reflect.get?jt=Reflect.get:jt=function(u,i,o){var c=Ah(u,i);if(!!c){var s=Object.getOwnPropertyDescriptor(c,i);return s.get?s.get.call(o):s.value}},jt(e,t,n||e)}function gt(e){return gt=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},gt(e)}function dh(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&&tu(e,t)}function ph(e,t){return t!=null&&typeof Symbol!="undefined"&&t[Symbol.hasInstance]?!!t[Symbol.hasInstance](e):e instanceof t}function Dh(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function gh(){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 vh(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){hh(e,u,n[u])})}return e}function mh(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 yh(e,t){return t=t!=null?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):mh(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function Eh(e,t){return t&&(Ch(t)==="object"||typeof t=="function")?t:Yi(e)}function tu(e,t){return tu=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},tu(e,t)}function Ah(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&(e=gt(e),e!==null););return e}function to(e){return ch(e)||Dh(e)||Fh(e)||gh()}var Ch=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function Fh(e,t){if(!!e){if(typeof e=="string")return eu(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 eu(e,t)}}function wh(){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 bh(e){var t=wh();return function(){var r=gt(e),u;if(t){var i=gt(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Eh(this,u)}}var Bh=function(e,t){var n,r,u,i,o={label:0,sent:function(){if(u[0]&1)throw u[1];return u[1]},trys:[],ops:[]};return i={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function c(l){return function(f){return s([l,f])}}function s(l){if(n)throw new TypeError("Generator is already executing.");for(;o;)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 o.label++,{value:l[1],done:!1};case 5:o.label++,r=l[1],l=[0];continue;case 7:l=o.ops.pop(),o.trys.pop();continue;default:if(u=o.trys,!(u=u.length>0&&u[u.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!u||l[1]>u[0]&&l[1]<u[3])){o.label=l[1];break}if(l[0]===6&&o.label<u[1]){o.label=u[1],u=l;break}if(u&&o.label<u[2]){o.label=u[2],o.ops.push(l);break}u[2]&&o.ops.pop(),o.trys.pop();continue}l=t.call(e,o)}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}}},_h=1e4,no=function(t){dh(r,t);var n=bh(r);function r(i){lh(this,r);var o;o=n.call(this,i),o.controlType="layout";var c=ph(this,r)?this.constructor:void 0,s=c.excludes,l=c.childrenMaxLength;return o.props=new nh(i==null?void 0:i.props),Yr(Yi(o),"children",i==null?void 0:i.children),o.excludes=he(s),o.childrenMaxLength=l,o}var u=r.prototype;return u.judgeExcludesChildren=function(o){return this.excludes===!1||Array.isArray(this.excludes)&&!this.excludes.includes(o)},u.judgeJoinChildren=function(o){var c=this.judgeExcludesChildren(o);return c&&this.childrenMaxLength>this.children.length},u.validate=function(o,c){var s=this,l=this,f=function(){return jt(gt(r.prototype),"validate",s)};return fh(function(){return Bh(this,function(a){switch(a.label){case 0:return[4,f().call(l,o,c)];case 1:return a.sent(),[4,Promise.all(l.children.map(function(h){return h.validate(o,c)}))];case 2:return a.sent(),[2,!0]}})})()},u.toDataBindModel=function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,c=jt(gt(r.prototype),"toDataBindModel",this).call(this),s=c?[c]:[];return this.children.reduce(function(l,f){var a=f.toDataBindModel(o);if(Array.isArray(a)){var h=a.filter(function(d){return!!d});return to(l).concat(to(h))}return a&&l.push(a),l},s)},u.toSchema=function(){var o=jt(gt(r.prototype),"toSchema",this).call(this),c=this.children.map(function(s){var l=s.toSchema();return l});return yh(vh({},o),{children:c})},r}(et);no.excludes=!1,no.childrenMaxLength=_h;function ro(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Sh(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Un(e){return Un=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Un(e)}function Ih(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&&nu(e,t)}function Mh(e,t){return t&&(Nh(t)==="object"||typeof t=="function")?t:ro(e)}function nu(e,t){return nu=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},nu(e,t)}var Nh=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function xh(){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 Oh(e){var t=xh();return function(){var r=Un(e),u;if(t){var i=Un(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return Mh(this,u)}}var Rh=function(e){Ih(n,e);var t=Oh(n);function n(r,u){Sh(this,n);var i;return i=t.call(this,u),Yr(ro(i),"headers",u==null?void 0:u.headers,r),i}return n}(It);K.LIST;function ru(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function Th(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function uo(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 Ph(e,t,n){return t&&uo(e.prototype,t),n&&uo(e,n),e}function Hn(e){return Hn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)},Hn(e)}function $h(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&&uu(e,t)}function jh(e,t){return t&&(Lh(t)==="object"||typeof t=="function")?t:ru(e)}function uu(e,t){return uu=Object.setPrototypeOf||function(r,u){return r.__proto__=u,r},uu(e,t)}var Lh=function(e){return e&&typeof Symbol!="undefined"&&e.constructor===Symbol?"symbol":typeof e};function qh(){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 kh(e){var t=qh();return function(){var r=Hn(e),u;if(t){var i=Hn(this).constructor;u=Reflect.construct(r,arguments,i)}else u=r.apply(this,arguments);return jh(this,u)}}var hn=function(e){$h(n,e);var t=kh(n);function n(u){Th(this,n);var i;return i=t.call(this,u),i.controlType="list",i.rowProps={},i.props=new Rh(ru(i),u==null?void 0:u.props),Yr(ru(i),"children",u==null?void 0:u.children),i}var r=n.prototype;return r.setRowProps=function(i){this.rowProps=i},Ph(n,[{key:"length",get:function(){return this.children.length}}]),n}(ln);console.log(1);function zn(e){return e.controlType===Ke.LAYOUT||e.controlType===Ke.WRAP||e.controlType===Ke.LIST||e.controlType===Ke.SEARCH}function dn(e,t){Array.isArray(e)&&e.map(n=>{if(n.type===Q.SUBTABLE){const r=n.getChildrenFormControl();t(n,r)}else zn(n)?dn(n==null?void 0:n.children,t):n instanceof tt&&t(n)})}function pn(e,t){Array.isArray(e)&&e.map(n=>{n.type===Q.DATA_VIEW||n.type===Q.SIMPLE_SEARCH?t(n):zn(n)&&pn(n==null?void 0:n.children,t)})}class iu extends xn{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 io(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 pn(this._instance,n=>{t[n.id]=n.rules[0],dn(n.children,r=>{(r instanceof tt||r instanceof hn)&&Vh(t[n.id].fields,r)})}),t}get antdRules(){let t={};return pn(this._instance,n=>{t[n.id]=n.rules[0],dn(n.children,r=>{(r instanceof tt||r instanceof hn)&&Uh(t[n.id].fields,r)})}),t}}function io(e,t){Array.isArray(e)?e.map(n=>{t(n),zn(n)&&io(n.children,t)}):t(e)}function ou(e){return e.props.isHide?!0:e.parent===null?!1:ou(e.parent)}function Vh(e,t){if(!ou(t)){if(t instanceof tt)e[t.id]=t.rules;else if(t.type===Q.SUBTABLE){e[t.id]=t.rules;const n={type:"array",fields:{}};t.children.forEach((r,u)=>{_t(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 Uh(e,t){ou(t)||(t instanceof tt?e[t.id]=t.rules:t.type===Q.SUBTABLE&&t.children.length&&(e[t.id]=[],t.children.forEach(n=>{let r={};_t(n.children,u=>{r[u.id]=u.rules}),e[t.id].push(r)})))}class Hh{constructor(t){const{state:n,emptyState:r,databindMapping:u,controlidMapping:i}=zh(t.instance);this.emptyState=r,this.state=n,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 o=this.controlIdMapping[i].dataView,c=this.controlIdMapping[i].children;c!==void 0&&Object.keys(c).map(s=>{s===t&&(this.state[o][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(o=>{const c=this.controlIdMapping[o].dataView,s=this.controlIdMapping[o].children;s!==void 0&&Object.keys(s).map(l=>{var f;l===t&&(i=(f=this.state[c][o][n])==null?void 0:f[t])})}),i}else{let i=[];return Object.keys(this.controlIdMapping).map(o=>{const c=this.controlIdMapping[o].dataView,s=this.controlIdMapping[o].children;s!==void 0&&Object.keys(s).map(l=>{l===t&&this.state[c][o].map(f=>{i.push(f[t])})})}),i}}}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 o=this.controlIdMapping[i].dataView,c=this.controlIdMapping[i].children;c!==void 0&&Object.keys(c).map(s=>{s===t&&(u=this.emptyState[o][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 zh(e){let t={},n={},r={},u={};return pn(e,i=>{const o=i.id,c={},s={};dn([i],(l,f)=>{Wh(c,s,l),Zh(r,o,l),Gh(u,o,l)}),t[o]=c,n[o]=s}),{state:t,emptyState:n,databindMapping:r,controlidMapping:u}}function Wh(e,t,n){var r;if(n instanceof tt)e[n.id]=he(n.props.defaultValue),t[n.id]=he(n.props.defaultValue);else{const u={};_t(n.props.headers,i=>{u[i.id]=he(i.props.defaultValue)}),e[n.id]=new Array((r=n.props.defaultRows)!=null?r:1).fill(0).map(()=>he(u)),t[n.id]=u}}function Zh(e,t,n){if(n instanceof tt)n.props.dataBind instanceof pt?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===""){Je(`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;_t(n.props.headers,u=>{u.props.dataBind instanceof pt?Object.keys(u.props.dataBind).map(i=>{const o=u.props.dataBind,c=o[i].dataCode;e[c].fields.push({fieldCode:o[i].fieldCode,controlId:u.id,dataBind:o,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 Gh(e,t,n){n instanceof tt?e[n.id]={dataBind:n.props.dataBind,options:[],dataView:t}:n.type===Q.SUBTABLE&&(e[n.id]={dataBind:new on({dataCode:n.props.datasourceBind.dataCode,fieldCode:""}),dataView:t,children:{},options:[]},_t(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}})}))}var au={exports:{}};(function(e,t){var n=200,r="__lodash_hash_undefined__",u=9007199254740991,i="[object Arguments]",o="[object Array]",c="[object Boolean]",s="[object Date]",l="[object Error]",f="[object Function]",a="[object GeneratorFunction]",h="[object Map]",d="[object Number]",p="[object Object]",D="[object Promise]",m="[object RegExp]",g="[object Set]",A="[object String]",I="[object Symbol]",w="[object WeakMap]",x="[object ArrayBuffer]",P="[object DataView]",L="[object Float32Array]",M="[object Float64Array]",j="[object Int8Array]",G="[object Int16Array]",z="[object Int32Array]",ee="[object Uint8Array]",Y="[object Uint8ClampedArray]",ue="[object Uint16Array]",re="[object Uint32Array]",X=/[\\^$.*+?()[\]{}|]/g,Nu=/\w*$/,xu=/^\[object .+?Constructor\]$/,Ou=/^(?:0|[1-9]\d*)$/,te={};te[i]=te[o]=te[x]=te[P]=te[c]=te[s]=te[L]=te[M]=te[j]=te[G]=te[z]=te[h]=te[d]=te[p]=te[m]=te[g]=te[A]=te[I]=te[ee]=te[Y]=te[ue]=te[re]=!0,te[l]=te[f]=te[w]=!1;var Ru=typeof je=="object"&&je&&je.Object===Object&&je,Tu=typeof self=="object"&&self&&self.Object===Object&&self,Ge=Ru||Tu||Function("return this")(),or=t&&!t.nodeType&&t,ar=or&&!0&&e&&!e.nodeType&&e,Pu=ar&&ar.exports===or;function sr(v,C){return v.set(C[0],C[1]),v}function cr(v,C){return v.add(C),v}function Ft(v,C){for(var b=-1,q=v?v.length:0;++b<q&&C(v[b],b,v)!==!1;);return v}function En(v,C){for(var b=-1,q=C.length,ye=v.length;++b<q;)v[ye+b]=C[b];return v}function fr(v,C,b,q){var ye=-1,Me=v?v.length:0;for(q&&Me&&(b=v[++ye]);++ye<Me;)b=C(b,v[ye],ye,v);return b}function $u(v,C){for(var b=-1,q=Array(v);++b<v;)q[b]=C(b);return q}function ju(v,C){return v==null?void 0:v[C]}function An(v){var C=!1;if(v!=null&&typeof v.toString!="function")try{C=!!(v+"")}catch(b){}return C}function Cn(v){var C=-1,b=Array(v.size);return v.forEach(function(q,ye){b[++C]=[ye,q]}),b}function Gt(v,C){return function(b){return v(C(b))}}function Fn(v){var C=-1,b=Array(v.size);return v.forEach(function(q){b[++C]=q}),b}var lr=Array.prototype,Lu=Function.prototype,Xt=Object.prototype,wn=Ge["__core-js_shared__"],bn=function(){var v=/[^.]+$/.exec(wn&&wn.keys&&wn.keys.IE_PROTO||"");return v?"Symbol(src)_1."+v:""}(),y=Lu.toString,E=Xt.hasOwnProperty,F=Xt.toString,B=RegExp("^"+y.call(E).replace(X,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),N=Pu?Ge.Buffer:void 0,O=Ge.Symbol,T=Ge.Uint8Array,_=Gt(Object.getPrototypeOf,Object),R=Object.create,V=Xt.propertyIsEnumerable,W=lr.splice,$=Object.getOwnPropertySymbols,Ce=N?N.isBuffer:void 0,De=Gt(Object.keys,Object),fe=Yt(Ge,"DataView"),ie=Yt(Ge,"Map"),me=Yt(Ge,"Promise"),ae=Yt(Ge,"Set"),be=Yt(Ge,"WeakMap"),se=Yt(Object,"create"),Fe=Rt(fe),lt=Rt(ie),Be=Rt(me),ht=Rt(ae),Kt=Rt(be),wt=O?O.prototype:void 0,hr=wt?wt.valueOf:void 0;function dt(v){var C=-1,b=v?v.length:0;for(this.clear();++C<b;){var q=v[C];this.set(q[0],q[1])}}function qu(){this.__data__=se?se(null):{}}function ku(v){return this.has(v)&&delete this.__data__[v]}function Vu(v){var C=this.__data__;if(se){var b=C[v];return b===r?void 0:b}return E.call(C,v)?C[v]:void 0}function Uu(v){var C=this.__data__;return se?C[v]!==void 0:E.call(C,v)}function Hu(v,C){var b=this.__data__;return b[v]=se&&C===void 0?r:C,this}dt.prototype.clear=qu,dt.prototype.delete=ku,dt.prototype.get=Vu,dt.prototype.has=Uu,dt.prototype.set=Hu;function Xe(v){var C=-1,b=v?v.length:0;for(this.clear();++C<b;){var q=v[C];this.set(q[0],q[1])}}function zu(){this.__data__=[]}function xt(v){var C=this.__data__,b=ut(C,v);if(b<0)return!1;var q=C.length-1;return b==q?C.pop():W.call(C,b,1),!0}function Wu(v){var C=this.__data__,b=ut(C,v);return b<0?void 0:C[b][1]}function Zu(v){return ut(this.__data__,v)>-1}function Gu(v,C){var b=this.__data__,q=ut(b,v);return q<0?b.push([v,C]):b[q][1]=C,this}Xe.prototype.clear=zu,Xe.prototype.delete=xt,Xe.prototype.get=Wu,Xe.prototype.has=Zu,Xe.prototype.set=Gu;function bt(v){var C=-1,b=v?v.length:0;for(this.clear();++C<b;){var q=v[C];this.set(q[0],q[1])}}function Xu(){this.__data__={hash:new dt,map:new(ie||Xe),string:new dt}}function Ku(v){return vr(this,v).delete(v)}function Ju(v){return vr(this,v).get(v)}function Qu(v){return vr(this,v).has(v)}function Yu(v,C){return vr(this,v).set(v,C),this}bt.prototype.clear=Xu,bt.prototype.delete=Ku,bt.prototype.get=Ju,bt.prototype.has=Qu,bt.prototype.set=Yu;function Bt(v){this.__data__=new Xe(v)}function ei(){this.__data__=new Xe}function ti(v){return this.__data__.delete(v)}function ni(v){return this.__data__.get(v)}function ri(v){return this.__data__.has(v)}function ui(v,C){var b=this.__data__;if(b instanceof Xe){var q=b.__data__;if(!ie||q.length<n-1)return q.push([v,C]),this;b=this.__data__=new bt(q)}return b.set(v,C),this}Bt.prototype.clear=ei,Bt.prototype.delete=ti,Bt.prototype.get=ni,Bt.prototype.has=ri,Bt.prototype.set=ui;function ii(v,C){var b=ai(v)||AD(v)?$u(v.length,String):[],q=b.length,ye=!!q;for(var Me in v)(C||E.call(v,Me))&&!(ye&&(Me=="length"||vD(Me,q)))&&b.push(Me);return b}function dr(v,C,b){var q=v[C];(!(E.call(v,C)&&ya(q,b))||b===void 0&&!(C in v))&&(v[C]=b)}function ut(v,C){for(var b=v.length;b--;)if(ya(v[b][0],C))return b;return-1}function Ie(v,C){return v&&ga(C,si(C),v)}function ce(v,C,b,q,ye,Me,ke){var Oe;if(q&&(Oe=Me?q(v,ye,Me,ke):q(v)),Oe!==void 0)return Oe;if(!mr(v))return v;var Ca=ai(v);if(Ca){if(Oe=pD(v),!C)return lD(v,Oe)}else{var en=Ot(v),Fa=en==f||en==a;if(FD(v))return gr(v,C);if(en==p||en==i||Fa&&!Me){if(An(v))return Me?v:{};if(Oe=DD(Fa?{}:v),!C)return hD(v,Ie(Oe,v))}else{if(!te[en])return Me?v:{};Oe=gD(v,en,ce,C)}}ke||(ke=new Bt);var wa=ke.get(v);if(wa)return wa;if(ke.set(v,Oe),!Ca)var ba=b?dD(v):si(v);return Ft(ba||v,function(ci,yr){ba&&(yr=ci,ci=v[yr]),dr(Oe,yr,ce(ci,C,b,q,yr,v,ke))}),Oe}function pr(v){return mr(v)?R(v):{}}function oi(v,C,b){var q=C(v);return ai(v)?q:En(q,b(v))}function Jt(v){return F.call(v)}function Qt(v){if(!mr(v)||yD(v))return!1;var C=Aa(v)||An(v)?B:xu;return C.test(Rt(v))}function Dr(v){if(!ma(v))return De(v);var C=[];for(var b in Object(v))E.call(v,b)&&b!="constructor"&&C.push(b);return C}function gr(v,C){if(C)return v.slice();var b=new v.constructor(v.length);return v.copy(b),b}function it(v){var C=new v.constructor(v.byteLength);return new T(C).set(new T(v)),C}function iD(v,C){var b=C?it(v.buffer):v.buffer;return new v.constructor(b,v.byteOffset,v.byteLength)}function oD(v,C,b){var q=C?b(Cn(v),!0):Cn(v);return fr(q,sr,new v.constructor)}function aD(v){var C=new v.constructor(v.source,Nu.exec(v));return C.lastIndex=v.lastIndex,C}function sD(v,C,b){var q=C?b(Fn(v),!0):Fn(v);return fr(q,cr,new v.constructor)}function cD(v){return hr?Object(hr.call(v)):{}}function fD(v,C){var b=C?it(v.buffer):v.buffer;return new v.constructor(b,v.byteOffset,v.length)}function lD(v,C){var b=-1,q=v.length;for(C||(C=Array(q));++b<q;)C[b]=v[b];return C}function ga(v,C,b,q){b||(b={});for(var ye=-1,Me=C.length;++ye<Me;){var ke=C[ye],Oe=q?q(b[ke],v[ke],ke,b,v):void 0;dr(b,ke,Oe===void 0?v[ke]:Oe)}return b}function hD(v,C){return ga(v,va(v),C)}function dD(v){return oi(v,si,va)}function vr(v,C){var b=v.__data__;return mD(C)?b[typeof C=="string"?"string":"hash"]:b.map}function Yt(v,C){var b=ju(v,C);return Qt(b)?b:void 0}var va=$?Gt($,Object):BD,Ot=Jt;(fe&&Ot(new fe(new ArrayBuffer(1)))!=P||ie&&Ot(new ie)!=h||me&&Ot(me.resolve())!=D||ae&&Ot(new ae)!=g||be&&Ot(new be)!=w)&&(Ot=function(v){var C=F.call(v),b=C==p?v.constructor:void 0,q=b?Rt(b):void 0;if(q)switch(q){case Fe:return P;case lt:return h;case Be:return D;case ht:return g;case Kt:return w}return C});function pD(v){var C=v.length,b=v.constructor(C);return C&&typeof v[0]=="string"&&E.call(v,"index")&&(b.index=v.index,b.input=v.input),b}function DD(v){return typeof v.constructor=="function"&&!ma(v)?pr(_(v)):{}}function gD(v,C,b,q){var ye=v.constructor;switch(C){case x:return it(v);case c:case s:return new ye(+v);case P:return iD(v,q);case L:case M:case j:case G:case z:case ee:case Y:case ue:case re:return fD(v,q);case h:return oD(v,q,b);case d:case A:return new ye(v);case m:return aD(v);case g:return sD(v,q,b);case I:return cD(v)}}function vD(v,C){return C=C==null?u:C,!!C&&(typeof v=="number"||Ou.test(v))&&v>-1&&v%1==0&&v<C}function mD(v){var C=typeof v;return C=="string"||C=="number"||C=="symbol"||C=="boolean"?v!=="__proto__":v===null}function yD(v){return!!bn&&bn in v}function ma(v){var C=v&&v.constructor,b=typeof C=="function"&&C.prototype||Xt;return v===b}function Rt(v){if(v!=null){try{return y.call(v)}catch(C){}try{return v+""}catch(C){}}return""}function ED(v){return ce(v,!0,!0)}function ya(v,C){return v===C||v!==v&&C!==C}function AD(v){return CD(v)&&E.call(v,"callee")&&(!V.call(v,"callee")||F.call(v)==i)}var ai=Array.isArray;function Ea(v){return v!=null&&wD(v.length)&&!Aa(v)}function CD(v){return bD(v)&&Ea(v)}var FD=Ce||_D;function Aa(v){var C=mr(v)?F.call(v):"";return C==f||C==a}function wD(v){return typeof v=="number"&&v>-1&&v%1==0&&v<=u}function mr(v){var C=typeof v;return!!v&&(C=="object"||C=="function")}function bD(v){return!!v&&typeof v=="object"}function si(v){return Ea(v)?ii(v):Dr(v)}function BD(){return[]}function _D(){return!1}e.exports=ED})(au,au.exports);var Xh=au.exports;function oo(e){return e.reduce((n,r)=>{const{children:u}=r;return u.forEach(i=>{n[i.id]=ao(i)}),n},{})}function ao(e){return Xh(e.props)}const so=["splice","push","shift","pop","unshift","reverse"],su=Symbol("__engineProxy__"),cu=Symbol("__engineTarget__"),co=Symbol("__engineArrayBeforeSetCallbackFlag__"),fo=Symbol("__engineProxyThisKey__"),He={type:"",args:[],callback:lo};function lo(){}rd();function Kh(e,t,n,r,u){if(He.type){He.callback=u.bind(null,e,r);return}const i=Number(t);if(i>e.length){st(`Wrong array operations may cause unknown errors. It is recommended to use APIs such as ${so.join(",")} for array operations`);return}if(!(Number.isNaN(i)&&t!=="length"))if(t==="length"){const c=n,s=e.length;if(c>e.length){st("Do not directly modify the length of the array data, please add new rows");return}return c===e.length?void 0:()=>u.call(null,e,r,"splice",[c,s-c])}else return i===e.length?()=>u.call(null,e,r,"push",[n]):()=>u.call(null,e,r,"splice",[i,1,n])}function Jh(e,t,n){return{__engineProxy__:!0,get(r,u,i){return u===su?!0:u===cu?r:Array.isArray(r)&&u===co?n:u===fo?e:Reflect.get(r,u,i)},set(r,u,i,o){var h;let c=i;const s=r[u],l=e===""?u:e+"."+u;function f(d){if(typeof d=="object"&&d!==null)return d[su]!==!0?Wn(d,t,n,l):Wn(d[cu],t,n,l)}c=(h=f(i))!=null?h:c;let a;if(Array.isArray(r)){const d=Kh(r,u,i,e,t);a=Reflect.set(r,u,c,o),d&&d()}else{try{let d=c;if(c=n.call(null,r,l,c,s),d!==c){const p=f(c);p!==void 0&&(c=p)}}catch(d){return In(`${l} set error ${d}`),!0}a=Reflect.set(r,u,c,o),t.call(null,r,l,i,s)}return a}}}function Wn(e,t,n,r=""){if(Object.isFrozen(e))return e;for(let u in e){const i=r===""?u:r+"."+u,o=e[u];typeof o=="object"&&o!==null&&(e[u]=Wn(o,t,n,i))}return new Proxy(e,Jh(r,t,n))}function ho(e){const t=[];return e.forEach(n=>{t.push(n),n.controlType==="layout"&&t.push(...ho(n.children))}),t}const Qh=e=>e.find(po),po=e=>e===String(Number(e)),Yh=e=>e.some(po),ed=(e,t)=>{if(t.length<2){Je("\u672A\u627E\u5230 \u660E\u7EC6\u5B50\u8868\u63A7\u4EF6",t);return}for(const n of e)if(t.includes(n.id)&&n instanceof hn)return n;Je("\u672A\u627E\u5230 \u660E\u7EC6\u5B50\u8868\u63A7\u4EF6",t)};function fu(e,t,n,r){if(t==="")return;const u=t.split(".");if(u.length===0)return;if(Yh(u)){console.log("findItem isInSubtable");const s=ed(e,u);if(!s)return;const l=n.getState(s.id);if(!l)return;const f=Number(Qh(u));if(!Number.isInteger(f))return;const h=l[f].uid;if(!s.rowProps[h]){const d=s.props.headers.map(g=>g.children[0]),p=u[u.length-1],D=d.find(g=>g.id===p);return D?(Sn("\u{1F31F} copy rowProps",s.id,h,p),s.rowProps[h]=ao(D),r.createControlInstance(D.type)):void 0}}const i=u[0],o=u.slice(1),c=e.find(s=>s.id===i);return o.length===0?c:o.reduce((s,l)=>{var h,d;const f=Number(l);if(Number.isNaN(f)){const p=s!=null&&s.children?ho(s.children):void 0,D=p==null?void 0:p.find(m=>m.id===l);return D||(s instanceof tt?s:void 0)}else return(d=(h=s==null?void 0:s.children)==null?void 0:h[f])!=null?d:s},c)}function td(e,t){return["push","unshift"].includes(e)?t:e==="splice"?t.slice(2):[]}function nd(e,t,n){if(["push","unshift"].includes(e))return n;if(e==="splice")return t.slice(0,2).concat(n)}function rd(){so.forEach(e=>{const t=Array.prototype[e];Array.prototype[e]=function(...n){var r;if(this[su]){let u;const i=td(e,n);if(i.length){const o=(r=this[co])==null?void 0:r.call(this,this[cu],this[fo],i),c=nd(e,n,o);He.type=e,He.args=c,u=t.apply(this,c)}else He.type=e,He.args=n,u=t.apply(this,n);return typeof He.callback=="function"&&He.callback(e,n,u),He.type="",He.args=[],He.callback=lo,u}else return t.apply(this,n)}})}class ud{constructor(){this.actionMap=new Map,this.buildinActions={},this.actionUtils={},this.sources={}}execAction(t,n,...r){return ot(this,null,function*(){const u=this.actionMap.get(t);if(!!u)try{return yield u.func.call(null,n,...r)}catch(i){In(`${u.id} Exception during calling action: ${i}`)}})}addAction(t,n){this.actionMap.has(t)&&st("duplicated action key");const r=new id(t,n);this.actionMap.set(t,r)}}class id{constructor(t,n){this.id="",this.id=t,this.func=n}}class od{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 he(n)}remove(t){this._dataStore.delete(t)}getRemoteData(t){return ot(this,null,function*(){return this.executer===void 0?(In("\u672A\u521D\u59CB\u5316executer"),[]):this.executer(t)})}}class vt{}class Dn extends vt{validate(t){return Te(t)}transform(t){if(t==null)return"";if(!Qe(t)&&!Ci(t))return String(t);if(bl(t))return JSON.stringify(t);throw`${t} is not a string`}}class lu extends vt{validate(t){return Mn(t)||t===""}transform(t){if(t==null)return"";const n=!Qe(t)&&!Ci(t)?Number(t):void 0;if(!Number.isNaN(n)&&n!==void 0)return n;throw`${t} is not a number`}}class ad extends vt{validate(t){return Bl(t)}transform(t){if(t==null)return[];function n(r){return r.map(u=>u?String(u):"")}if(Pt(t))return n(t);if(Te(t)&&Fi(t))try{const r=JSON.parse(t);if(Array.isArray(r))return n(r)}catch(r){}return[String(t)]}}class sd extends vt{validate(t){return _l(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(Pt(t))return n(t);if(Te(t)&&Fi(t))try{const u=JSON.parse(t);if(Pt(u))return n(u)}catch(u){}const r=Number(t);if(Number.isNaN(r))throw`${t} is not a number array`;return[r]}}class cd extends vt{validate(t){return t instanceof On||Qe(t)&&"amount"in t&&Mn(t.amount)&&"currency"in t&&Te(t.currency)}transform(t,n){if(t==null||t==="")return new On({currency:n==null?void 0:n.currency});let r;if(Qe(t)&&(r=new On(ge(ge({},n),t))),Te(t)&&Nn(t))try{const u=JSON.parse(t);r=new On(ge(ge({},n),u))}catch(u){}if(r){const u=new lu,i=new Dn;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 fd extends vt{validate(t){return t instanceof Rn||Qe(t)&&"min"in t&&Te(t.min)&&"max"in t&&Te(t.max)}transform(t,n){if(t==null||t==="")return new Rn;let r;if(Qe(t)&&(r=new Rn(ge(ge({},n),t))),Te(t)&&Nn(t))try{const u=JSON.parse(t);r=new Rn(ge(ge({},n),u))}catch(u){}if(r){const u=new Dn;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 ld extends vt{validate(t){return t instanceof Pn||Qe(t)&&"result"in t&&Mn(t.result)&&"unit"in t&&Te(t.unit)}transform(t,n){if(t==null||t==="")return new Pn({unit:n==null?void 0:n.unit});let r;if(Qe(t)&&(r=new Pn(ge(ge({},n),t))),Te(t)&&Nn(t))try{const u=JSON.parse(t);r=new Pn(ge(ge({},n),u))}catch(u){}if(r){const u=new lu,i=new Dn;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 hd extends vt{validate(t){return t instanceof Tn}transform(t,n){if(t==null||t==="")return new Tn;let r;if(Qe(t)&&(r=new Tn(ge(ge({},n),Ir.exports.camelizeKeys(t)))),Te(t)&&Nn(t))try{const u=JSON.parse(t);r=new Tn(ge(ge({},n),Ir.exports.camelizeKeys(u)))}catch(u){}if(r){const u=new Dn;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 dd{static getValueChecker(t){let n;switch(t){case K.VARCHAR:case K.TIMESTAMP:case K.TEXT:case K.RELATION:case K.AUTO_NUMBER:n=new Dn;break;case K.DECIMAL:n=new lu;break;case K.EMPLOYEES:case K.DEPARTMENTS:case K.IMAGE:case K.FILE:case K.ARRAY:n=new ad;break;case K.MONEY:n=new cd;break;case K.TIMESCOPE:n=new fd;break;case K.CALC:n=new ld;break;case K.DECIMAL_RANGE:n=new sd;break;case K.ADDRESS:n=new hd;break}return n}}function pd(e){if(["min","max","currency","unit"].includes(e))return K.VARCHAR;if(["result","amount"].includes(e))return K.DECIMAL}function Do(e,t,n,r){var o;let u=(o=pd(t))!=null?o:e,i=dd.getValueChecker(u);if(!i||i.validate(n))return n;try{const c=i.transform(n,r);return c!==void 0?c:n}catch(c){throw`${t} ${c}`}}function Dd(e,t,n){return Object.entries(e).reduce((r,[u,i])=>{const o=t[u];return r[u]=Do(i,u,o,n[u]),r},Object.assign({},t))}typeof window!="undefined"&&(window.engines={});let Lt=null,gn="";class hu extends bi{constructor(t){super(),this.isMounted=!1,this.id=wr(8),this.__pluginsApplied=!1,this.actionManager=new ud,this._jobTasks=[],this.createControlInstance=this.createInstance,this.$options=Object.freeze(t);const{autoMount:n=!0,schema:r,beforeCreateInstance:u,externalParams:i,language:o=li,debug:c=!1}=this.$options;Ue.setLocale(o),this.debug=c,this.runtime=new iu({schema:r,beforeCreateInstance:u}),this.externalParams=i,this.store=new Hh({instance:this.runtime.instance}),this.debugLog("engine is Instantiation complete"),n&&this.mount()}debugLog(...t){this.debug&&Sn(...t)}use(t){return this.__pluginsApplied||this.__plugins.push(t),this}registerControl(...t){return this.runtime.register(...t),this}static register(...t){return iu.register(...t)}static judgeControlIsRegistered(t){return iu.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=Wn(this.store.state,this._proxyStateCallback.bind(this),this._proxyStateBeforeSetCallback.bind(this))}_proxyStateBeforeSetCallback(t,n,r,u){const i=fu(this.runtime.flatInstances,n,this.store,this.runtime);if(!i)return r;if(this.assertInstance(i,Q.SUBTABLE)){if(r===null)return[];const s=i.props.headers.reduce((f,a)=>{const h=a.children[0];return h&&h instanceof tt&&(f[h.id]=h.fieldType),f},{}),l=this.getEmptyState(i.id);return r.map(f=>Dd(s,f,l))}const o=n.split("."),c=o[o.length-1];try{return Do(i.fieldType,c,r,u)}catch(s){throw Je(`the id=${i.id}'s instance setState error, %o ${s}.`,r),s}}_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 o=fu(this.runtime.flatInstances,n,this.store,this.runtime);if(!(o instanceof hn))return;const c=h=>[],s=Lt;let l=[],f=[],a=[];if(r&&u){switch(r){case"push":case"unshift":u.length,l=c(),f=u,o.children[r](...l),this.runtime.getFlatInstances();break;case"splice":if(u.length>2){u.length-2;const h=u.slice(2);l=c(),f=h;const d=u[0],p=u[1];o.children[r](d,p,...l),this.runtime.getFlatInstances()}else o.children[r](...u),this.runtime.getFlatInstances();break;default:o.children[r](...u),this.runtime.getFlatInstances();break}r==="splice"?a=i:["pop","shift"].includes(r)&&(a=[i]),this.emit("list-change",{instance:o,value:this.getState(o.id),options:Object.assign({},s,{changed:l,data:f,deleted:a!=null?a:[]})}),Lt=null}}_handlerObjectUpdate(t,n,r,u){const i=fu(this.runtime.flatInstances,n,this.store,this.runtime);if(!i)return;const o=this.getInstanceRowIndex(i),c=Lt||{};if(i instanceof hn){i.children.length=0;const s=r;let l=[];this.emit("list-change",{instance:i,value:r,options:fi(ge({},c),{changed:l,data:s,deleted:u!=null?u:[]})})}else this.emit("change",{instance:i,value:this.getState(i.id,o),rowIndex:o,options:fi(ge({},c),{oldValue:u})})}applyPlugins(){this.__pluginsApplied||(this.__plugins.forEach(t=>{var n;try{gn=(n=t.pluginName)!=null?n:t.constructor.name,t.apply(this)}catch(r){st(`${gn} Plugin apply Error
|
|
2
|
+
${r}`)}finally{gn=""}}),this.__pluginsApplied=!0)}listControlCreateRow(t,n){throw new Error("\u8BE5api\u5DF2\u5E9F\u5F03")}listControlAddRow(t,n="subtable-row"){throw new Error("\u8BE5api\u5DF2\u5E9F\u5F03")}emit(t,n){return ot(this,null,function*(){if(t==="engine-mounted"){if(this.isMounted)return Je("The engine-mounted life cycle can only be triggered once"),Promise.resolve([]);if(this._jobTasks.length){console.time("engine-mounted need wait");const o=[...this._jobTasks];yield Promise.all(o),console.timeEnd("engine-mounted need wait")}this.isMounted=!0}let r,u;this.isMounted||(u=new Promise(o=>{r=o}),this._jobTasks.push(u));const i=yield Sa(hu.prototype,this,"emit").call(this,t,n);return r&&u&&(r(),this._jobTasks.splice(this._jobTasks.indexOf(u),1)),i})}on(t,n){return gn&&(n.applyingPluginName=gn),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)}getEmptyState(t){return he(t===void 0?this.store.emptyState:this.store.getEmptyState(t))}setPayloadOptions(t){Lt=t}setState(t,n,r,u){Lt=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),Lt=null}setStates(t,n,r){let u=t;Object.keys(u).forEach(i=>{Object.entries(this.store.controlIdMapping).forEach(([o,c])=>{if(c.dataView===i){const s=u[i][o];s!==void 0&&this.setState(o,s,n,r)}else(o===i||c.children&&c.children[i])&&u[i]!==void 0&&this.setState(i,u[i],n,r)})})}getField(t,n,r){if(!n){const s=this.getDataBindMapping(t);if(s){const{controlId:l}=s;return this.getState(l)}return}const u=this.getDataBindMapping(t,n);if(!u)return;const{dataBind:i,controlId:o}=u,c=this.getState(o,r);return i instanceof pt?Object.entries(i).reduce((s,[l,f])=>f.fieldCode===n?s[l]:s,c):c}getData(t){var u,i,o,c,s,l,f,a;if(!t)return;let n=this.getDataBindMapping(t),r=this.getControlIdMapping();if(n){const{controlId:h}=n,d=this.getField(t);if(Array.isArray(d))return d.map(D=>{var g,A,I,w,x,P,L;let m={};for(let M in D)if((I=(A=(g=r[h])==null?void 0:g.children[M])==null?void 0:A.dataBind)!=null&&I.fieldCode)m[(w=r[h].children[M])==null?void 0:w.dataBind.fieldCode]=D[M];else if((x=r[h])!=null&&x.children[M])for(let j in D[M])m[(L=(P=r[h])==null?void 0:P.children[M])==null?void 0:L.dataBind[j].fieldCode]=D[M][j];return m});{let p={};for(let D in d)if((i=(u=r[D])==null?void 0:u.dataBind)!=null&&i.fieldCode)p[(o=r[D])==null?void 0:o.dataBind.fieldCode]=d[D];else if((s=(c=r[D])==null?void 0:c.dataBind)!=null&&s.dataCode)p[(l=r[D])==null?void 0:l.dataBind.dataCode]=d[D].map(m=>{var A,I,w;let g={};for(let x in m)if((A=r[D].children[x])!=null&&A.dataBind.fieldCode)g[(I=r[D].children[x])==null?void 0:I.dataBind.fieldCode]=m[x];else for(let P in m[x])g[(w=r[D].children[x])==null?void 0:w.dataBind[P].fieldCode]=m[x][P];return g});else if(r[D])for(let m in d[D])p[(a=(f=r[D])==null?void 0:f.dataBind[m])==null?void 0:a.fieldCode]=d[D][m];return p}}}setField(t,n,r,u,i){var l;const o=this.getDataBindMapping(t,n);if(!o)return;const{dataBind:c,controlId:s}=o;if(c instanceof pt){const f=(l=he(this.getState(s,u)))!=null?l:this.getEmptyState(s),a=Object.entries(c).reduce((h,[d,p])=>(p.fieldCode===n&&(h[d]=r),h),f);this.setState(s,a,u,i)}else this.setState(s,r,u,i)}setFields(t,n,r,u){const i=this.getDataBindMapping(t);if(!i)return;let o=[];i.fields.forEach(c=>{var a;const{dataBind:s,controlId:l,fieldCode:f}=c;if(!o.includes(f)&&!!Object.hasOwnProperty.call(n,f))if(s instanceof pt){const h=(a=he(this.getState(l,r)))!=null?a:this.getEmptyState(l),d=Object.entries(s).reduce((p,[D,m])=>{o.push(m.fieldCode);const g=n[m.fieldCode];return g!==void 0&&(p[D]=g),p},h);this.setState(c.controlId,d,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(o=>{const{dataBind:c,controlId:s,fieldCode:l}=o;if(!u.includes(l)&&!!Object.hasOwnProperty.call(n,l))if(c instanceof pt){const f=this.getEmptyState(s);i[o.controlId]=Object.entries(c).reduce((a,[h,d])=>{u.push(d.fieldCode);const p=n[d.fieldCode];return p!==void 0&&(a[h]=p),a},f)}else i[s]=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(o=>{const c=this.getDataBindMapping(u);if(!c)return;let s=he(this.store.emptyState[c.dataViewId][c.controlId]),l=[];Object.keys(o).map(f=>{var h,d,p;if(l.includes(f))return;const a=(d=(h=this.store.dataBindMapping[u])==null?void 0:h.fields)==null?void 0:d.find(D=>D.fieldCode===f);if(a){if(a.dataBind instanceof on&&o[f]!==void 0)s[a.controlId]=o[f];else if(a.dataBind instanceof pt){let D=he((p=this.getEmptyState(a.controlId))!=null?p:{});Object.keys(a.dataBind).map(m=>{const g=a.dataBind[m];o[g.fieldCode]!==void 0&&(D[m]=o[g.fieldCode]),l.push(g.fieldCode)}),s[a.controlId]=D}}}),r[c.dataViewId]||(r[c.dataViewId]={}),r[c.dataViewId][c.controlId]||(r[c.dataViewId][c.controlId]=[]),r[c.dataViewId][c.controlId].push(s)});else if(i){let o=[];Object.keys(i).map(c=>{var l;if(o.includes(c))return;const s=this.getDataBindMapping(u,c);if(s){if(r[s.dataViewId[0]]||(r[s.dataViewId[0]]={}),s.dataBind instanceof on&&i[c]!==void 0)r[s.dataViewId[0]][s.controlId]=i[c];else if(s.dataBind instanceof pt){let f=he((l=this.getEmptyState(s.controlId))!=null?l:{});Object.keys(s.dataBind).map(a=>{const h=s.dataBind[a];i[h.fieldCode]!==void 0&&(f[a]=i[h.fieldCode]),o.push(h.fieldCode)}),r[s.dataViewId[0]][s.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 o=this.getInstanceInSubtableHeader(i);o&&r.unshift(o)}}else{const i=this.getControlIdMapping(),[o]=(u=Object.entries(i).find(([c,s])=>s.children&&t in s.children))!=null?u:[];if(o){const s=this.getInstance(o).props.headers.find(l=>l.children.find(f=>f.id===t));if(s){const l=s.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),Ei(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){Je(`No corresponding dataCode=${t} was found`);return}if(!n)return r;const u=r.fields.find(i=>i.fieldCode===n);if(!u){Je(`No corresponding fieldCode=${n} was found`);return}return u}getAction(){return this.actionManager}initDataManager(t){this.dataManager=new od(t)}getDataManager(){return this.dataManager}assertInstance(t,n){return Te(n)?t.type===n:n.includes(t.type)}getInstanceRowIndex(t){if(!t.parent)return;let n;if(this.assertInstance(t.parent,Q.SUBTABLE))if(this.assertInstance(t,Q.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,Q.SUBTABLE_COLUMN)?t:this.getInstanceParentControl(t,Q.SUBTABLE_COLUMN);if(!r)return;const i=this.getInstanceParentControl(t,Q.SUBTABLE).props.headers.find(o=>o.id===r.id);if(!!i)return i.children.find(o=>o.id===t.id)}setControlConfig(...t){return this.runtime.registerControlConfig(...t)}getControlConfig(t){return this.runtime.getControlConfig(t)}initSubTableRowPropsFromInstanceHeaders(t){const n=console,r=Date.now(),u="\u{1F42E} initSubTableRowPropsFromInstanceHeaders "+r;n.time(u),Object.assign(t.rowProps,oo(t.props.headers)),n.timeEnd(u)}initSubTableRowPropsFromProxySetNewValue(t,n){const r=console,u=Date.now(),i="\u{1F437} initSubTableRowPropsFromProxySetNewValue "+u;r.time(i),n.forEach(o=>{Object.assign(t.rowProps,{now:oo(t.props.headers)})}),r.timeEnd(i)}}class gd{}class vd{constructor(t,n){this.config=t,this.env=n}apply(t){this.engine=t;const n=this.config;if(!n)return;const r=go(n,t,this.env);if(!r)return;const u=t.getAction();for(let[i,o]of Object.entries(r.funcMap))u.addAction(i,o)}}function go(e,t,n){if(!e.module||!e.module.compiled)return;const r=e.module.compiled,u={exports:{ctx:t,utils:t.getAction().actionUtils,env:n}};try{new Function("module","exports",r).call(u,u,u.exports)}catch(c){st(c.message+". fail to parse the module"),process.env.NODE_ENV!=="production"&&st("fail to parse the module")}const i={},o={};for(const[c,s]of Object.entries(u.exports))typeof s=="function"?i[c]=s:o[c]=s;return{funcMap:i,variables:o}}const md={"engine-mounted":"did_mount","engine-submit":"will_submit","engine-submit-params":"do_submit","engine-submitted":"did_submit"};class yd{constructor(t){this.config=t}apply(t){this.engine=t,Object.entries(md).forEach(([n,r])=>{t.on(n,u=>ot(this,null,function*(){const i=yield this.callLifecycleEvent(r,u);return i.includes(!1)?!1:i}))})}callLifecycleEvent(t,n){return ot(this,null,function*(){const r=this.config;return!r||!Array.isArray(r[t])?[]:yield Promise.all(r[t].map(i=>ot(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})))})}}class Ed{constructor(t){this.config=t}apply(t){this.engine=t,Bi.events.forEach(n=>{n.code&&n.key&&this.engineAddEventListener(n.code,n.key)})}engineAddEventListener(t,n){this.engine.on(t,r=>ot(this,null,function*(){if(!(t==="change"&&!this.engine.isMounted)&&r.instance!==void 0)return yield this.callControlEvent(n,r)}))}callControlEvent(t,n){return ot(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=>ot(this,null,function*(){return yield this.engine.getAction().execAction(i,n)})));return u.includes(!1)?!1:u})}}function du(){return du=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},du.apply(this,arguments)}var vo={epsilon:1e-12,matrix:"Matrix",number:"number",precision:64,predictable:!1,randomSeed:null};function Se(e){return typeof e=="number"}function mt(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 mo(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isComplex===!0||!1}function yo(e){return e&&typeof e=="object"&&Object.getPrototypeOf(e).isFraction===!0||!1}function Eo(e){return e&&e.constructor.prototype.isUnit===!0||!1}function Zn(e){return typeof e=="string"}var $e=Array.isArray;function vn(e){return e&&e.constructor.prototype.isMatrix===!0||!1}function pu(e){return Array.isArray(e)||vn(e)}function Ad(e){return e&&e.isDenseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function Cd(e){return e&&e.isSparseMatrix&&e.constructor.prototype.isMatrix===!0||!1}function Fd(e){return e&&e.constructor.prototype.isRange===!0||!1}function Ao(e){return e&&e.constructor.prototype.isIndex===!0||!1}function wd(e){return typeof e=="boolean"}function bd(e){return e&&e.constructor.prototype.isResultSet===!0||!1}function Bd(e){return e&&e.constructor.prototype.isHelp===!0||!1}function _d(e){return typeof e=="function"}function Sd(e){return e instanceof Date}function Id(e){return e instanceof RegExp}function Md(e){return!!(e&&typeof e=="object"&&e.constructor===Object&&!mo(e)&&!yo(e))}function Nd(e){return e===null}function xd(e){return e===void 0}function Od(e){return e&&e.isAccessorNode===!0&&e.constructor.prototype.isNode===!0||!1}function Rd(e){return e&&e.isArrayNode===!0&&e.constructor.prototype.isNode===!0||!1}function Td(e){return e&&e.isAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function Pd(e){return e&&e.isBlockNode===!0&&e.constructor.prototype.isNode===!0||!1}function $d(e){return e&&e.isConditionalNode===!0&&e.constructor.prototype.isNode===!0||!1}function jd(e){return e&&e.isConstantNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ld(e){return e&&e.isFunctionAssignmentNode===!0&&e.constructor.prototype.isNode===!0||!1}function qd(e){return e&&e.isFunctionNode===!0&&e.constructor.prototype.isNode===!0||!1}function kd(e){return e&&e.isIndexNode===!0&&e.constructor.prototype.isNode===!0||!1}function Vd(e){return e&&e.isNode===!0&&e.constructor.prototype.isNode===!0||!1}function Ud(e){return e&&e.isObjectNode===!0&&e.constructor.prototype.isNode===!0||!1}function Hd(e){return e&&e.isOperatorNode===!0&&e.constructor.prototype.isNode===!0||!1}function zd(e){return e&&e.isParenthesisNode===!0&&e.constructor.prototype.isNode===!0||!1}function Wd(e){return e&&e.isRangeNode===!0&&e.constructor.prototype.isNode===!0||!1}function Zd(e){return e&&e.isRelationalNode===!0&&e.constructor.prototype.isNode===!0||!1}function Gd(e){return e&&e.isSymbolNode===!0&&e.constructor.prototype.isNode===!0||!1}function Xd(e){return e&&e.constructor.prototype.isChain===!0||!1}function Du(e){var t=typeof e;return t==="object"?e===null?"null":mt(e)?"BigNumber":e.constructor&&e.constructor.name?e.constructor.name:"Object":t}function Mt(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 Mt(n)});if(e instanceof Date)return new Date(e.valueOf());if(mt(e))return e;if(e instanceof RegExp)throw new TypeError("Cannot clone "+e);return Kd(e,Mt)}function Kd(e,t){var n={};for(var r in e)Gn(e,r)&&(n[r]=t(e[r]));return n}function gu(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(!gu(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)||!gu(e[n],t[n]))return!1;for(n in t)if(!(n in e))return!1;return!0}else return e===t}}function Gn(e,t){return e&&Object.hasOwnProperty.call(e,t)}function Jd(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 Qd=["Matrix","Array"],Yd=["number","BigNumber","Fraction"],Co=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 i=!0,o=!1,c;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){o=!0,c=l},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw c}}}}function Kd(e,t){if(!!e){if(typeof e=="string")return Ao(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 Ao(e,t)}}function Ao(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 qt(e){return qt=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},qt(e)}function Co(){return!0}function Le(){return!1}function kt(){}var Fo="Argument is not a typed-function.";function wo(){function e(y){return qt(y)==="object"&&y!==null&&y.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:Co,isAny:!0},r,u,i=0,o={createCount:0};function c(y){var E=r.get(y);if(E)return E;var F='Unknown type "'+y+'"',B=y.toLowerCase(),N,O=ze(u),T;try{for(O.s();!(T=O.n()).done;)if(N=T.value,N.toLowerCase()===B){F+='. Did you mean "'+N+'" ?';break}}catch(_){O.e(_)}finally{O.f()}throw new TypeError(F)}function s(y){for(var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any",F=E?c(E).index:u.length,B=[],N=0;N<y.length;++N){if(!y[N]||typeof y[N].name!="string"||typeof y[N].test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");var O=y[N].name;if(r.has(O))throw new TypeError('Duplicate type name "'+O+'"');B.push(O),r.set(O,{name:O,test:y[N].test,isAny:y[N].isAny,index:F+N,conversionsTo:[]})}var T=u.slice(F);u=u.slice(0,F).concat(B).concat(T);for(var _=F+B.length;_<u.length;++_)r.get(u[_]).index=_}function l(){r=new Map,u=[],i=0,s([n],!1)}l(),s(t);function f(){var y,E=ze(u),F;try{for(E.s();!(F=E.n()).done;)y=F.value,r.get(y).conversionsTo=[]}catch(B){E.e(B)}finally{E.f()}i=0}function a(y){var E=u.filter(function(F){var B=r.get(F);return!B.isAny&&B.test(y)});return E.length?E:["any"]}function h(y){return y&&typeof y=="function"&&"_typedFunctionData"in y}function d(y,E,F){if(!h(y))throw new TypeError(Fo);var B=F&&F.exact,N=Array.isArray(E)?E.join(","):E,O=w(N),T=m(O);if(!B||T in y.signatures){var _=y._typedFunctionData.signatureMap.get(T);if(_)return _}var R=O.length,V;if(B){V=[];var W;for(W in y.signatures)V.push(y._typedFunctionData.signatureMap.get(W))}else V=y._typedFunctionData.signatures;for(var $=0;$<R;++$){var Ce=O[$],De=[],fe=void 0,ie=ze(V),me;try{for(ie.s();!(me=ie.n()).done;){fe=me.value;var ae=I(fe.params,$);if(!(!ae||Ce.restParam&&!ae.restParam)){if(!ae.hasAny){var be=function(){var Be=M(ae);if(Ce.types.some(function(lt){return!Be.has(lt.name)}))return"continue"}();if(be==="continue")continue}De.push(fe)}}}catch(Be){ie.e(Be)}finally{ie.f()}if(V=De,V.length===0)break}var se,Fe=ze(V),ft;try{for(Fe.s();!(ft=Fe.n()).done;)if(se=ft.value,se.params.length<=R)return se}catch(Be){Fe.e(Be)}finally{Fe.f()}throw new TypeError("Signature not found (signature: "+(y.name||"unnamed")+"("+m(O,", ")+"))")}function p(y,E,F){return d(y,E,F).implementation}function D(y,E){var F=c(E);if(F.test(y))return y;var B=F.conversionsTo;if(B.length===0)throw new Error("There are no conversions to "+E+" defined.");for(var N=0;N<B.length;N++){var O=c(B[N].from);if(O.test(y))return B[N].convert(y)}throw new Error("Cannot convert "+y+" to "+E)}function m(y){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:",";return y.map(function(F){return F.name}).join(E)}function g(y){var E=y.indexOf("...")===0,F=E?y.length>3?y.slice(3):"any":y,B=F.split("|").map(function(_){return c(_.trim())}),N=!1,O=E?"...":"",T=B.map(function(_){return N=_.isAny||N,O+=_.name+"|",{name:_.name,typeIndex:_.index,test:_.test,isAny:_.isAny,conversion:null,conversionIndex:-1}});return{types:T,name:O.slice(0,-1),hasAny:N,hasConversion:!1,restParam:E}}function A(y){var E=y.types.map(function(T){return T.name}),F=Nu(E),B=y.hasAny,N=y.name,O=F.map(function(T){var _=c(T.from);return B=_.isAny||B,N+="|"+T.from,{name:T.from,typeIndex:_.index,test:_.test,isAny:_.isAny,conversion:T,conversionIndex:T.index}});return{types:y.types.concat(O),name:N,hasAny:B,hasConversion:O.length>0,restParam:y.restParam}}function M(y){return y.typeSet||(y.typeSet=new Set,y.types.forEach(function(E){return y.typeSet.add(E.name)})),y.typeSet}function w(y){var E=[];if(typeof y!="string")throw new TypeError("Signatures must be strings");var F=y.trim();if(F==="")return E;for(var B=F.split(","),N=0;N<B.length;++N){var O=g(B[N].trim());if(O.restParam&&N!==B.length-1)throw new SyntaxError('Unexpected rest parameter "'+B[N]+'": only allowed for the last parameter');if(O.types.length===0)return null;E.push(O)}return E}function x(y){var E=Ft(y);return E?E.restParam:!1}function P(y){if(!y||y.types.length===0)return Co;if(y.types.length===1)return c(y.types[0].name).test;if(y.types.length===2){var E=c(y.types[0].name).test,F=c(y.types[1].name).test;return function(O){return E(O)||F(O)}}else{var B=y.types.map(function(N){return c(N.name).test});return function(O){for(var T=0;T<B.length;T++)if(B[T](O))return!0;return!1}}}function L(y){var E,F,B;if(x(y)){E=sr(y).map(P);var N=E.length,O=P(Ft(y)),T=function(R){for(var V=N;V<R.length;V++)if(!O(R[V]))return!1;return!0};return function(R){for(var V=0;V<E.length;V++)if(!E[V](R[V]))return!1;return T(R)&&R.length>=N+1}}else return y.length===0?function(R){return R.length===0}:y.length===1?(F=P(y[0]),function(R){return F(R[0])&&R.length===1}):y.length===2?(F=P(y[0]),B=P(y[1]),function(R){return F(R[0])&&B(R[1])&&R.length===2}):(E=y.map(P),function(R){for(var V=0;V<E.length;V++)if(!E[V](R[V]))return!1;return R.length===E.length})}function I(y,E){return E<y.length?y[E]:x(y)?Ft(y):null}function j(y,E){var F=I(y,E);return F?M(F):new Set}function G(y){return y.conversion===null||y.conversion===void 0}function z(y,E){var F=new Set;return y.forEach(function(B){var N=j(B.params,E),O,T=ze(N),_;try{for(T.s();!(_=T.n()).done;)O=_.value,F.add(O)}catch(R){T.e(R)}finally{T.f()}}),F.has("any")?["any"]:Array.from(F)}function ee(y,E,F){var B,N,O=y||"unnamed",T=F,_,R=function(){var ie=[];if(T.forEach(function(ae){var be=I(ae.params,_),se=P(be);(_<ae.params.length||x(ae.params))&&se(E[_])&&ie.push(ae)}),ie.length===0){if(N=z(T,_),N.length>0){var me=a(E[_]);return B=new TypeError("Unexpected type of argument in function "+O+" (expected: "+N.join(" or ")+", actual: "+me.join(" | ")+", index: "+_+")"),B.data={category:"wrongType",fn:O,index:_,actual:me,expected:N},{v:B}}}else T=ie};for(_=0;_<E.length;_++){var V=R();if(qt(V)==="object")return V.v}var W=T.map(function(fe){return x(fe.params)?1/0:fe.params.length});if(E.length<Math.min.apply(null,W))return N=z(T,_),B=new TypeError("Too few arguments in function "+O+" (expected: "+N.join(" or ")+", index: "+E.length+")"),B.data={category:"tooFewArgs",fn:O,index:E.length,expected:N},B;var $=Math.max.apply(null,W);if(E.length>$)return B=new TypeError("Too many arguments in function "+O+" (expected: "+$+", actual: "+E.length+")"),B.data={category:"tooManyArgs",fn:O,index:E.length,expectedLength:$},B;for(var Ce=[],De=0;De<E.length;++De)Ce.push(a(E[De]).join("|"));return B=new TypeError('Arguments of type "'+Ce.join(", ")+'" do not match any of the defined signatures of function '+O+"."),B.data={category:"mismatch",actual:Ce},B}function Y(y){for(var E=u.length+1,F=0;F<y.types.length;F++)G(y.types[F])&&(E=Math.min(E,y.types[F].typeIndex));return E}function ue(y){for(var E=i+1,F=0;F<y.types.length;F++)G(y.types[F])||(E=Math.min(E,y.types[F].conversionIndex));return E}function re(y,E){if(y.hasAny){if(!E.hasAny)return 1}else if(E.hasAny)return-1;if(y.restParam){if(!E.restParam)return 1}else if(E.restParam)return-1;if(y.hasConversion){if(!E.hasConversion)return 1}else if(E.hasConversion)return-1;var F=Y(y)-Y(E);if(F<0)return-1;if(F>0)return 1;var B=ue(y)-ue(E);return B<0?-1:B>0?1:0}function X(y,E){var F=y.params,B=E.params,N=Ft(F),O=Ft(B),T=x(F),_=x(B);if(T&&N.hasAny){if(!_||!O.hasAny)return 1}else if(_&&O.hasAny)return-1;var R=0,V=0,W,$=ze(F),Ce;try{for($.s();!(Ce=$.n()).done;)W=Ce.value,W.hasAny&&++R,W.hasConversion&&++V}catch(wt){$.e(wt)}finally{$.f()}var De=0,fe=0,ie=ze(B),me;try{for(ie.s();!(me=ie.n()).done;)W=me.value,W.hasAny&&++De,W.hasConversion&&++fe}catch(wt){ie.e(wt)}finally{ie.f()}if(R!==De)return R-De;if(T&&N.hasConversion){if(!_||!O.hasConversion)return 1}else if(_&&O.hasConversion)return-1;if(V!==fe)return V-fe;if(T){if(!_)return 1}else if(_)return-1;var ae=(F.length-B.length)*(T?-1:1);if(ae!==0)return ae;for(var be=[],se=0,Fe=0;Fe<F.length;++Fe){var ft=re(F[Fe],B[Fe]);be.push(ft),se+=ft}if(se!==0)return se;for(var Be,lt=0,Kt=be;lt<Kt.length;lt++)if(Be=Kt[lt],Be!==0)return Be;return 0}function Nu(y){if(y.length===0)return[];var E=y.map(c);y.length>1&&E.sort(function(R,V){return R.index-V.index});var F=E[0].conversionsTo;if(y.length===1)return F;F=F.concat([]);for(var B=new Set(y),N=1;N<E.length;++N){var O=void 0,T=ze(E[N].conversionsTo),_;try{for(T.s();!(_=T.n()).done;)O=_.value,B.has(O.from)||(F.push(O),B.add(O.from))}catch(R){T.e(R)}finally{T.f()}}return F}function xu(y,E){var F=E;if(y.some(function(_){return _.hasConversion})){var B=x(y),N=y.map(Ou);F=function(){for(var R=[],V=B?arguments.length-1:arguments.length,W=0;W<V;W++)R[W]=N[W](arguments[W]);return B&&(R[V]=arguments[V].map(N[V])),E.apply(this,R)}}var O=F;if(x(y)){var T=y.length-1;O=function(){return F.apply(this,yn(arguments,0,T).concat([yn(arguments,T)]))}}return O}function Ou(y){var E,F,B,N,O=[],T=[];switch(y.types.forEach(function(_){_.conversion&&(O.push(c(_.conversion.from).test),T.push(_.conversion.convert))}),T.length){case 0:return function(R){return R};case 1:return E=O[0],B=T[0],function(R){return E(R)?B(R):R};case 2:return E=O[0],F=O[1],B=T[0],N=T[1],function(R){return E(R)?B(R):F(R)?N(R):R};default:return function(R){for(var V=0;V<T.length;V++)if(O[V](R))return T[V](R);return R}}}function te(y){function E(F,B,N){if(B<F.length){var O=F[B],T=[];if(O.restParam){var _=O.types.filter(G);_.length<O.types.length&&T.push({types:_,name:"..."+_.map(function(R){return R.name}).join("|"),hasAny:_.some(function(R){return R.isAny}),hasConversion:!1,restParam:!0}),T.push(O)}else T=O.types.map(function(R){return{types:[R],name:R.name,hasAny:R.isAny,hasConversion:R.conversion,restParam:!1}});return $u(T,function(R){return E(F,B+1,N.concat([R]))})}else return[N]}return E(y,0,[])}function Ru(y,E){for(var F=Math.max(y.length,E.length),B=0;B<F;B++){var N=j(y,B),O=j(E,B),T=!1,_=void 0,R=ze(O),V;try{for(R.s();!(V=R.n()).done;)if(_=V.value,N.has(_)){T=!0;break}}catch(fe){R.e(fe)}finally{R.f()}if(!T)return!1}var W=y.length,$=E.length,Ce=x(y),De=x(E);return Ce?De?W===$:$>=W:De?W>=$:W===$}function Tu(y){return y.map(function(E){return Cn(E)?An(E.referToSelf.callback):Gt(E)?En(E.referTo.references,E.referTo.callback):E})}function Ge(y,E,F){var B=[],N,O=ze(y),T;try{for(O.s();!(T=O.n()).done;){N=T.value;var _=F[N];if(typeof _!="number")throw new TypeError('No definition for referenced signature "'+N+'"');if(_=E[_],typeof _!="function")return!1;B.push(_)}}catch(R){O.e(R)}finally{O.f()}return B}function ir(y,E,F){for(var B=Tu(y),N=new Array(B.length).fill(!1),O=!0;O;){O=!1;for(var T=!0,_=0;_<B.length;++_)if(!N[_]){var R=B[_];if(Cn(R))B[_]=R.referToSelf.callback(F),B[_].referToSelf=R.referToSelf,N[_]=!0,T=!1;else if(Gt(R)){var V=Ge(R.referTo.references,B,E);V?(B[_]=R.referTo.callback.apply(this,V),B[_].referTo=R.referTo,N[_]=!0,T=!1):O=!0}}if(T&&O)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return B}function or(y){var E=/\bthis(\(|\.signatures\b)/;Object.keys(y).forEach(function(F){var B=y[F];if(E.test(B.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 Pu(y,E){if(o.createCount++,Object.keys(E).length===0)throw new SyntaxError("No signatures provided");o.warnAgainstDeprecatedThis&&or(E);var F=[],B=[],N={},O=[],T,_=function(){if(!Object.prototype.hasOwnProperty.call(E,T))return"continue";var ce=w(T);if(!ce)return"continue";F.forEach(function(ut){if(Ru(ut,ce))throw new TypeError('Conflicting signatures "'+m(ut)+'" and "'+m(ce)+'".')}),F.push(ce);var dr=B.length;B.push(E[T]);var oi=ce.map(A),Jt=void 0,Qt=ze(te(oi)),pr;try{for(Qt.s();!(pr=Qt.n()).done;){Jt=pr.value;var Dr=m(Jt);O.push({params:Jt,name:Dr,fn:dr}),Jt.every(function(ut){return!ut.hasConversion})&&(N[Dr]=dr)}}catch(ut){Qt.e(ut)}finally{Qt.f()}};for(T in E)var R=_();O.sort(X);var V=ir(B,N,rt),W;for(W in N)Object.prototype.hasOwnProperty.call(N,W)&&(N[W]=V[N[W]]);for(var $=[],Ce=new Map,De=0,fe=O;De<fe.length;De++)W=fe[De],Ce.has(W.name)||(W.fn=V[W.fn],$.push(W),Ce.set(W.name,W));for(var ie=$[0]&&$[0].params.length<=2&&!x($[0].params),me=$[1]&&$[1].params.length<=2&&!x($[1].params),ae=$[2]&&$[2].params.length<=2&&!x($[2].params),be=$[3]&&$[3].params.length<=2&&!x($[3].params),se=$[4]&&$[4].params.length<=2&&!x($[4].params),Fe=$[5]&&$[5].params.length<=2&&!x($[5].params),ft=ie&&me&&ae&&be&&se&&Fe,Be=0;Be<$.length;++Be)$[Be].test=L($[Be].params);for(var lt=ie?P($[0].params[0]):Le,Kt=me?P($[1].params[0]):Le,wt=ae?P($[2].params[0]):Le,lr=be?P($[3].params[0]):Le,ht=se?P($[4].params[0]):Le,qu=Fe?P($[5].params[0]):Le,ku=ie?P($[0].params[1]):Le,Vu=me?P($[1].params[1]):Le,Uu=ae?P($[2].params[1]):Le,Hu=be?P($[3].params[1]):Le,Xe=se?P($[4].params[1]):Le,zu=Fe?P($[5].params[1]):Le,xt=0;xt<$.length;++xt)$[xt].implementation=xu($[xt].params,$[xt].fn);var Wu=ie?$[0].implementation:kt,Zu=me?$[1].implementation:kt,Gu=ae?$[2].implementation:kt,bt=be?$[3].implementation:kt,Xu=se?$[4].implementation:kt,Ku=Fe?$[5].implementation:kt,Ju=ie?$[0].params.length:-1,Qu=me?$[1].params.length:-1,Yu=ae?$[2].params.length:-1,Bt=be?$[3].params.length:-1,ei=se?$[4].params.length:-1,ti=Fe?$[5].params.length:-1,ni=ft?6:0,ri=$.length,ui=$.map(function(Me){return Me.test}),ii=$.map(function(Me){return Me.implementation}),hr=function(){for(var ce=ni;ce<ri;ce++)if(ui[ce](arguments))return ii[ce].apply(this,arguments);return o.onMismatch(y,arguments,$)};function rt(Me,ce){return arguments.length===Ju&<(Me)&&ku(ce)?Wu.apply(this,arguments):arguments.length===Qu&&Kt(Me)&&Vu(ce)?Zu.apply(this,arguments):arguments.length===Yu&&wt(Me)&&Uu(ce)?Gu.apply(this,arguments):arguments.length===Bt&&lr(Me)&&Hu(ce)?bt.apply(this,arguments):arguments.length===ei&&ht(Me)&&Xe(ce)?Xu.apply(this,arguments):arguments.length===ti&&qu(Me)&&zu(ce)?Ku.apply(this,arguments):hr.apply(this,arguments)}try{Object.defineProperty(rt,"name",{value:y})}catch(Me){}return rt.signatures=N,rt._typedFunctionData={signatures:$,signatureMap:Ce},rt}function ar(y,E,F){throw ee(y,E,F)}function sr(y){return yn(y,0,y.length-1)}function Ft(y){return y[y.length-1]}function yn(y,E,F){return Array.prototype.slice.call(y,E,F)}function cr(y,E){for(var F=0;F<y.length;F++)if(E(y[F]))return y[F]}function $u(y,E){return Array.prototype.concat.apply([],y.map(E))}function ju(){var y=sr(arguments).map(function(F){return m(w(F))}),E=Ft(arguments);if(typeof E!="function")throw new TypeError("Callback function expected as last argument");return En(y,E)}function En(y,E){return{referTo:{references:y,callback:E}}}function An(y){if(typeof y!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:y}}}function Gt(y){return y&&qt(y.referTo)==="object"&&Array.isArray(y.referTo.references)&&typeof y.referTo.callback=="function"}function Cn(y){return y&&qt(y.referToSelf)==="object"&&typeof y.referToSelf.callback=="function"}function fr(y,E){if(!y)return E;if(E&&E!==y){var F=new Error("Function names do not match (expected: "+y+", actual: "+E+")");throw F.data={actual:E,expected:y},F}return y}function Lu(y){var E;for(var F in y)Object.prototype.hasOwnProperty.call(y,F)&&(h(y[F])||typeof y[F].signature=="string")&&(E=fr(E,y[F].name));return E}function Xt(y,E){var F;for(F in E)if(Object.prototype.hasOwnProperty.call(E,F)){if(F in y&&E[F]!==y[F]){var B=new Error('Signature "'+F+'" is defined twice');throw B.data={signature:F,sourceFunction:E[F],destFunction:y[F]},B}y[F]=E[F]}}var Fn=o;o=function(E){for(var F=typeof E=="string",B=F?1:0,N=F?E:"",O={},T=B;T<arguments.length;++T){var _=arguments[T],R={},V=void 0;if(typeof _=="function"?(V=_.name,typeof _.signature=="string"?R[_.signature]=_:h(_)&&(R=_.signatures)):e(_)&&(R=_,F||(V=Lu(_))),Object.keys(R).length===0){var W=new TypeError("Argument to 'typed' at index "+T+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw W.data={index:T,argument:_},W}F||(N=fr(N,V)),Xt(O,R)}return Pu(N||"",O)},o.create=wo,o.createCount=Fn.createCount,o.onMismatch=ar,o.throwMismatchError=ar,o.createError=ee,o.clear=l,o.clearConversions=f,o.addTypes=s,o._findType=c,o.referTo=ju,o.referToSelf=An,o.convert=D,o.findSignature=d,o.find=p,o.isTypedFunction=h,o.warnAgainstDeprecatedThis=!0,o.addType=function(y,E){var F="any";E!==!1&&r.has("Object")&&(F="Object"),o.addTypes([y],F)};function wn(y){if(!y||typeof y.from!="string"||typeof y.to!="string"||typeof y.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");if(y.to===y.from)throw new SyntaxError('Illegal to define conversion from "'+y.from+'" to itself.')}return o.addConversion=function(y){wn(y);var E=c(y.to);if(E.conversionsTo.every(function(F){return F.from!==y.from}))E.conversionsTo.push({from:y.from,convert:y.convert,index:i++});else throw new Error('There is already a conversion from "'+y.from+'" to "'+E.name+'"')},o.addConversions=function(y){y.forEach(o.addConversion)},o.removeConversion=function(y){wn(y);var E=c(y.to),F=cr(E.conversionsTo,function(N){return N.from===y.from});if(!F)throw new Error("Attempt to remove nonexistent conversion from "+y.from+" to "+y.to);if(F.convert!==y.convert)throw new Error("Conversion to remove does not match existing conversion");var B=E.conversionsTo.indexOf(F);E.conversionsTo.splice(B,1)},o.resolve=function(y,E){if(!h(y))throw new TypeError(Fo);for(var F=y._typedFunctionData.signatures,B=0;B<F.length;++B)if(F[B].test(E))return F[B];return null},o}var bo=wo();function tt(e){return typeof e=="boolean"?!0:isFinite(e)?e===Math.round(e):!1}function vu(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(!tt(n))throw new Error("size must be an integer");if(e>yr(2,n-1)-1||e<-yr(2,n-1))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!tt(e))throw new Error("Value must be an integer");e<0&&(e=e+yr(2,n)),i="i".concat(n)}var o="";return e<0&&(e=-e,o="-"),"".concat(o).concat(u).concat(e.toString(t)).concat(i)}function mu(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),Se(t)?r=t:Se(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 Qd(e,r);case"exponential":return Bo(e,r);case"engineering":return Jd(e,r);case"bin":return vu(e,2,u);case"oct":return vu(e,8,u);case"hex":return vu(e,16,u);case"auto":return Yd(e,r,t&&t).replace(/((\.\d*?)(0+))($|e)/,function(){var i=arguments[2],o=arguments[4];return i!=="."?i+o:o});default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Gn(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 o=r.replace(".","").replace(/^0*/,function(c){return u-=c.length,""}).replace(/0*$/,"").split("").map(function(c){return parseInt(c)});return o.length===0&&(o.push(0),u++),{sign:n,coefficients:o,exponent:u}}function Jd(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=Gn(e),r=Xn(n,t),u=r.exponent,i=r.coefficients,o=u%3===0?u:u<0?u-3-u%3:u-u%3;if(Se(t))for(;t>i.length||u-o+1>i.length;)i.push(0);else for(var c=Math.abs(u-o)-(i.length-1),s=0;s<c;s++)i.push(0);for(var l=Math.abs(u-o),f=1;l>0;)f++,l--;var a=i.slice(f).join(""),h=Se(t)&&a.length||a.match(/[1-9]/)?"."+a:"",d=i.slice(0,f).join("")+h+"e"+(u>=0?"+":"")+o.toString();return r.sign+d}function Qd(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=Gn(e),r=typeof t=="number"?Xn(n,n.exponent+1+t):n,u=r.coefficients,i=r.exponent+1,o=i+(t||0);return u.length<o&&(u=u.concat(Vt(o-u.length))),i<0&&(u=Vt(-i+1).concat(u),i=1),i<u.length&&u.splice(i,0,i===0?"0.":"."),r.sign+u.join("")}function Bo(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=Gn(e),r=t?Xn(n,t):n,u=r.coefficients,i=r.exponent;u.length<t&&(u=u.concat(Vt(t-u.length)));var o=u.shift();return r.sign+o+(u.length>0?"."+u.join(""):"")+"e"+(i>=0?"+":"")+i}function Yd(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=Gn(e),o=t?Xn(i,t):i;if(o.exponent<r||o.exponent>=u)return Bo(e,t);var c=o.coefficients,s=o.exponent;c.length<t&&(c=c.concat(Vt(t-c.length))),c=c.concat(Vt(s-c.length+1+(c.length<t?t-c.length:0))),c=Vt(-s).concat(c);var l=s>0?s:0;return l<c.length-1&&c.splice(l+1,0,"."),o.sign+c.join("")}function Xn(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 Vt(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function ep(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}var tp=Number.EPSILON||2220446049250313e-31;function np(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<tp?!0:r<=Math.max(Math.abs(e),Math.abs(t))*n}return!1}function yu(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(!tt(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 rp(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 ip(e,r);case"exponential":return _o(e,r);case"engineering":return up(e,r);case"bin":return yu(e,2,u);case"oct":return yu(e,8,u);case"hex":return yu(e,16,u);case"auto":{var i=t&&t.lowerExp!==void 0?t.lowerExp:-3,o=t&&t.upperExp!==void 0?t.upperExp:5;if(e.isZero())return"0";var c,s=e.toSignificantDigits(r),l=s.e;return l>=i&&l<o?c=s.toFixed():c=_o(e,r),c.replace(/((\.\d*?)(0+))($|e)/,function(){var f=arguments[2],a=arguments[4];return f!=="."?f+a:a})}default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function up(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 _o(e,t){return t!==void 0?e.toExponential(t-1):e.toExponential()}function ip(e,t){return e.toFixed(t)}function Nt(e,t){var n=op(e,t);return t&&typeof t=="object"&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function op(e,t){if(typeof e=="number")return mu(e,t);if(mt(e))return rp(e,t);if(ap(e))return!t||t.fraction!=="decimal"?e.s*e.n+"/"+e.d:e.toString();if(Array.isArray(e))return So(e,t);if(Wn(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+'": '+Nt(e[r],t));return"{"+n.join(", ")+"}"}return String(e)}function So(e,t){if(Array.isArray(e)){for(var n="[",r=e.length,u=0;u<r;u++)u!==0&&(n+=", "),n+=So(e[u],t);return n+="]",n}else return Nt(e,t)}function ap(e){return e&&typeof e=="object"&&typeof e.s=="number"&&typeof e.n=="number"&&typeof e.d=="number"||!1}function ve(e,t,n){if(!(this instanceof ve))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}ve.prototype=new RangeError,ve.prototype.constructor=RangeError,ve.prototype.name="DimensionError",ve.prototype.isDimensionError=!0;function Ut(e,t,n){if(!(this instanceof Ut))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}Ut.prototype=new RangeError,Ut.prototype.constructor=RangeError,Ut.prototype.name="IndexError",Ut.prototype.isIndexError=!0;function Eu(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function Mo(e,t,n){var r,u=e.length;if(u!==t[n])throw new ve(u,t[n]);if(n<t.length-1){var i=n+1;for(r=0;r<u;r++){var o=e[r];if(!Array.isArray(o))throw new ve(t.length-1,t.length,"<");Mo(e[r],t,i)}}else for(r=0;r<u;r++)if(Array.isArray(e[r]))throw new ve(t.length+1,t.length,">")}function Io(e,t){var n=t.length===0;if(n){if(Array.isArray(e))throw new ve(e.length,0)}else Mo(e,t,0)}function qe(e,t){if(!Se(e)||!tt(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof t=="number"&&e>=t)throw new Ut(e,t)}function No(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(!Se(u)||!tt(u)||u<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Nt(t)+")")});var r=n!==void 0?n:0;return Au(e,t,0,r),e}function Au(e,t,n,r){var u,i,o=e.length,c=t[n],s=Math.min(o,c);if(e.length=c,n<t.length-1){var l=n+1;for(u=0;u<s;u++)i=e[u],Array.isArray(i)||(i=[i],e[u]=i),Au(i,t,l,r);for(u=s;u<c;u++)i=[],e[u]=i,Au(i,t,l,r)}else{for(u=0;u<s;u++)for(;Array.isArray(e[u]);)e[u]=e[u][0];for(u=s;u<c;u++)e[u]=r}}function sp(e,t){var n=lp(e),r=n.length;if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new ve(0,r,"!=");t=xo(t,r);var u=Oo(t);if(r!==u)throw new ve(u,r,"!=");try{return cp(n,t)}catch(i){throw i instanceof ve?new ve(u,r,"!="):i}}function xo(e,t){var n=Oo(e),r=e.slice(),u=-1,i=e.indexOf(u),o=e.indexOf(u,i+1)>=0;if(o)throw new Error("More than one wildcard in sizes");var c=i>=0,s=t%n===0;if(c)if(s)r[i]=-t/n;else throw new Error("Could not replace wildcard, since "+t+" is no multiple of "+-n);return r}function Oo(e){return e.reduce((t,n)=>t*n,1)}function cp(e,t){for(var n=e,r,u=t.length-1;u>0;u--){var i=t[u];r=[];for(var o=n.length/i,c=0;c<o;c++)r.push(n.slice(c*i,(c+1)*i));n=r}return n}function fp(e,t,n,r){var u=r||Eu(e);if(n)for(var i=0;i<n;i++)e=[e],u.unshift(1);for(e=Ro(e,t,0);u.length<t;)u.push(1);return e}function Ro(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]=Ro(e[r],t,i)}else for(var o=n;o<t;o++)e=[e];return e}function lp(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 Cu(e,t){for(var n,r=0,u=0;u<e.length;u++){var i=e[u],o=Array.isArray(i);if(u===0&&o&&(r=i.length),o&&i.length!==r)return;var c=o?Cu(i,t):t(i);if(n===void 0)n=c;else if(n!==c)return"mixed"}return n}function Ne(e,t,n,r){function u(i){var o=Zd(i,t.map(pp));return hp(e,t,i),n(o)}return u.isFactory=!0,u.fn=e,u.dependencies=t.slice().sort(),r&&(u.meta=r),u}function hp(e,t,n){var r=t.filter(i=>!dp(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 dp(e){return e&&e[0]==="?"}function pp(e){return e&&e[0]==="?"?e.slice(1):e}function Dp(e,t){if(Po(e)&&To(e,t))return e[t];throw typeof e[t]=="function"&&mp(e,t)?new Error('Cannot access method "'+t+'" as a property'):new Error('No access to property "'+t+'"')}function gp(e,t,n){if(Po(e)&&To(e,t))return e[t]=n,n;throw new Error('No access to property "'+t+'"')}function vp(e,t){return t in e}function To(e,t){return!e||typeof e!="object"?!1:Zn(yp,t)?!0:!(t in Object.prototype||t in Function.prototype)}function mp(e,t){return e==null||typeof e[t]!="function"||Zn(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e)?!1:Zn(Ep,t)?!0:!(t in Object.prototype||t in Function.prototype)}function Po(e){return typeof e=="object"&&e&&e.constructor===Object}var yp={length:!0,name:!0},Ep={toString:!0,valueOf:!0,toLocaleString:!0};class Ap{constructor(t){this.wrappedObject=t}keys(){return Object.keys(this.wrappedObject)}get(t){return Dp(this.wrappedObject,t)}set(t,n){return gp(this.wrappedObject,t,n),this}has(t){return vp(this.wrappedObject,t)}}function Cp(e){return e?e instanceof Map||e instanceof Ap||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}var $o=function(){return $o=bo.create,bo},Fp=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],wp=Ne("typed",Fp,function(t){var{BigNumber:n,Complex:r,DenseMatrix:u,Fraction:i}=t,o=$o();return o.clear(),o.addTypes([{name:"number",test:Se},{name:"Complex",test:go},{name:"BigNumber",test:mt},{name:"Fraction",test:vo},{name:"Unit",test:mo},{name:"identifier",test:c=>Wn&&/^(?:[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(c)},{name:"string",test:Wn},{name:"Chain",test:zd},{name:"Array",test:$e},{name:"Matrix",test:gn},{name:"DenseMatrix",test:vd},{name:"SparseMatrix",test:md},{name:"Range",test:yd},{name:"Index",test:yo},{name:"boolean",test:Ed},{name:"ResultSet",test:Ad},{name:"Help",test:Cd},{name:"function",test:Fd},{name:"Date",test:wd},{name:"RegExp",test:bd},{name:"null",test:_d},{name:"undefined",test:Sd},{name:"AccessorNode",test:Md},{name:"ArrayNode",test:Id},{name:"AssignmentNode",test:Nd},{name:"BlockNode",test:xd},{name:"ConditionalNode",test:Od},{name:"ConstantNode",test:Rd},{name:"FunctionNode",test:Pd},{name:"FunctionAssignmentNode",test:Td},{name:"IndexNode",test:$d},{name:"Node",test:jd},{name:"ObjectNode",test:Ld},{name:"OperatorNode",test:qd},{name:"ParenthesisNode",test:kd},{name:"RangeNode",test:Vd},{name:"RelationalNode",test:Ud},{name:"SymbolNode",test:Hd},{name:"Map",test:Cp},{name:"Object",test:Bd}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(s){if(n||Fu(s),ep(s)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+s+"). Use function bignumber(x) to convert to BigNumber.");return new n(s)}},{from:"number",to:"Complex",convert:function(s){return r||Kn(s),new r(s,0)}},{from:"BigNumber",to:"Complex",convert:function(s){return r||Kn(s),new r(s.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(s){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(s){return r||Kn(s),new r(s.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(s){i||wu(s);var l=new i(s);if(l.valueOf()!==s)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+s+"). Use function fraction(x) to convert to Fraction.");return l}},{from:"string",to:"number",convert:function(s){var l=Number(s);if(isNaN(l))throw new Error('Cannot convert "'+s+'" to a number');return l}},{from:"string",to:"BigNumber",convert:function(s){n||Fu(s);try{return new n(s)}catch(l){throw new Error('Cannot convert "'+s+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(s){i||wu(s);try{return new i(s)}catch(l){throw new Error('Cannot convert "'+s+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(s){r||Kn(s);try{return new r(s)}catch(l){throw new Error('Cannot convert "'+s+'" to Complex')}}},{from:"boolean",to:"number",convert:function(s){return+s}},{from:"boolean",to:"BigNumber",convert:function(s){return n||Fu(s),new n(+s)}},{from:"boolean",to:"Fraction",convert:function(s){return i||wu(s),new i(+s)}},{from:"boolean",to:"string",convert:function(s){return String(s)}},{from:"Array",to:"Matrix",convert:function(s){return u||bp(),new u(s)}},{from:"Matrix",to:"Array",convert:function(s){return s.valueOf()}}]),o.onMismatch=(c,s,l)=>{var f=o.createError(c,s,l);if(["wrongType","mismatch"].includes(f.data.category)&&s.length===1&&pu(s[0])&&l.some(h=>!h.params.includes(","))){var a=new TypeError("Function '".concat(c,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(c,")'."));throw a.data=f.data,a}throw f},o.onMismatch=(c,s,l)=>{var f=o.createError(c,s,l);if(["wrongType","mismatch"].includes(f.data.category)&&s.length===1&&pu(s[0])&&l.some(h=>!h.params.includes(","))){var a=new TypeError("Function '".concat(c,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(c,")'."));throw a.data=f.data,a}throw f},o});function Fu(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function Kn(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function bp(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function wu(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}/*!
|
|
9
|
+
`);return Object.freeze(vo)};du(Co,vo,{MATRIX_OPTIONS:Qd,NUMBER_OPTIONS:Yd});function ze(e,t){var n=typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ep(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,o=!1,c;return{s:function(){n=n.call(e)},n:function(){var l=n.next();return i=l.done,l},e:function(l){o=!0,c=l},f:function(){try{!i&&n.return!=null&&n.return()}finally{if(o)throw c}}}}function ep(e,t){if(!!e){if(typeof e=="string")return Fo(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 Fo(e,t)}}function Fo(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 qt(e){return qt=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},qt(e)}function wo(){return!0}function Le(){return!1}function kt(){}var bo="Argument is not a typed-function.";function Bo(){function e(y){return qt(y)==="object"&&y!==null&&y.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:wo,isAny:!0},r,u,i=0,o={createCount:0};function c(y){var E=r.get(y);if(E)return E;var F='Unknown type "'+y+'"',B=y.toLowerCase(),N,O=ze(u),T;try{for(O.s();!(T=O.n()).done;)if(N=T.value,N.toLowerCase()===B){F+='. Did you mean "'+N+'" ?';break}}catch(_){O.e(_)}finally{O.f()}throw new TypeError(F)}function s(y){for(var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"any",F=E?c(E).index:u.length,B=[],N=0;N<y.length;++N){if(!y[N]||typeof y[N].name!="string"||typeof y[N].test!="function")throw new TypeError("Object with properties {name: string, test: function} expected");var O=y[N].name;if(r.has(O))throw new TypeError('Duplicate type name "'+O+'"');B.push(O),r.set(O,{name:O,test:y[N].test,isAny:y[N].isAny,index:F+N,conversionsTo:[]})}var T=u.slice(F);u=u.slice(0,F).concat(B).concat(T);for(var _=F+B.length;_<u.length;++_)r.get(u[_]).index=_}function l(){r=new Map,u=[],i=0,s([n],!1)}l(),s(t);function f(){var y,E=ze(u),F;try{for(E.s();!(F=E.n()).done;)y=F.value,r.get(y).conversionsTo=[]}catch(B){E.e(B)}finally{E.f()}i=0}function a(y){var E=u.filter(function(F){var B=r.get(F);return!B.isAny&&B.test(y)});return E.length?E:["any"]}function h(y){return y&&typeof y=="function"&&"_typedFunctionData"in y}function d(y,E,F){if(!h(y))throw new TypeError(bo);var B=F&&F.exact,N=Array.isArray(E)?E.join(","):E,O=w(N),T=m(O);if(!B||T in y.signatures){var _=y._typedFunctionData.signatureMap.get(T);if(_)return _}var R=O.length,V;if(B){V=[];var W;for(W in y.signatures)V.push(y._typedFunctionData.signatureMap.get(W))}else V=y._typedFunctionData.signatures;for(var $=0;$<R;++$){var Ce=O[$],De=[],fe=void 0,ie=ze(V),me;try{for(ie.s();!(me=ie.n()).done;){fe=me.value;var ae=M(fe.params,$);if(!(!ae||Ce.restParam&&!ae.restParam)){if(!ae.hasAny){var be=function(){var Be=I(ae);if(Ce.types.some(function(ht){return!Be.has(ht.name)}))return"continue"}();if(be==="continue")continue}De.push(fe)}}}catch(Be){ie.e(Be)}finally{ie.f()}if(V=De,V.length===0)break}var se,Fe=ze(V),lt;try{for(Fe.s();!(lt=Fe.n()).done;)if(se=lt.value,se.params.length<=R)return se}catch(Be){Fe.e(Be)}finally{Fe.f()}throw new TypeError("Signature not found (signature: "+(y.name||"unnamed")+"("+m(O,", ")+"))")}function p(y,E,F){return d(y,E,F).implementation}function D(y,E){var F=c(E);if(F.test(y))return y;var B=F.conversionsTo;if(B.length===0)throw new Error("There are no conversions to "+E+" defined.");for(var N=0;N<B.length;N++){var O=c(B[N].from);if(O.test(y))return B[N].convert(y)}throw new Error("Cannot convert "+y+" to "+E)}function m(y){var E=arguments.length>1&&arguments[1]!==void 0?arguments[1]:",";return y.map(function(F){return F.name}).join(E)}function g(y){var E=y.indexOf("...")===0,F=E?y.length>3?y.slice(3):"any":y,B=F.split("|").map(function(_){return c(_.trim())}),N=!1,O=E?"...":"",T=B.map(function(_){return N=_.isAny||N,O+=_.name+"|",{name:_.name,typeIndex:_.index,test:_.test,isAny:_.isAny,conversion:null,conversionIndex:-1}});return{types:T,name:O.slice(0,-1),hasAny:N,hasConversion:!1,restParam:E}}function A(y){var E=y.types.map(function(T){return T.name}),F=Nu(E),B=y.hasAny,N=y.name,O=F.map(function(T){var _=c(T.from);return B=_.isAny||B,N+="|"+T.from,{name:T.from,typeIndex:_.index,test:_.test,isAny:_.isAny,conversion:T,conversionIndex:T.index}});return{types:y.types.concat(O),name:N,hasAny:B,hasConversion:O.length>0,restParam:y.restParam}}function I(y){return y.typeSet||(y.typeSet=new Set,y.types.forEach(function(E){return y.typeSet.add(E.name)})),y.typeSet}function w(y){var E=[];if(typeof y!="string")throw new TypeError("Signatures must be strings");var F=y.trim();if(F==="")return E;for(var B=F.split(","),N=0;N<B.length;++N){var O=g(B[N].trim());if(O.restParam&&N!==B.length-1)throw new SyntaxError('Unexpected rest parameter "'+B[N]+'": only allowed for the last parameter');if(O.types.length===0)return null;E.push(O)}return E}function x(y){var E=Ft(y);return E?E.restParam:!1}function P(y){if(!y||y.types.length===0)return wo;if(y.types.length===1)return c(y.types[0].name).test;if(y.types.length===2){var E=c(y.types[0].name).test,F=c(y.types[1].name).test;return function(O){return E(O)||F(O)}}else{var B=y.types.map(function(N){return c(N.name).test});return function(O){for(var T=0;T<B.length;T++)if(B[T](O))return!0;return!1}}}function L(y){var E,F,B;if(x(y)){E=cr(y).map(P);var N=E.length,O=P(Ft(y)),T=function(R){for(var V=N;V<R.length;V++)if(!O(R[V]))return!1;return!0};return function(R){for(var V=0;V<E.length;V++)if(!E[V](R[V]))return!1;return T(R)&&R.length>=N+1}}else return y.length===0?function(R){return R.length===0}:y.length===1?(F=P(y[0]),function(R){return F(R[0])&&R.length===1}):y.length===2?(F=P(y[0]),B=P(y[1]),function(R){return F(R[0])&&B(R[1])&&R.length===2}):(E=y.map(P),function(R){for(var V=0;V<E.length;V++)if(!E[V](R[V]))return!1;return R.length===E.length})}function M(y,E){return E<y.length?y[E]:x(y)?Ft(y):null}function j(y,E){var F=M(y,E);return F?I(F):new Set}function G(y){return y.conversion===null||y.conversion===void 0}function z(y,E){var F=new Set;return y.forEach(function(B){var N=j(B.params,E),O,T=ze(N),_;try{for(T.s();!(_=T.n()).done;)O=_.value,F.add(O)}catch(R){T.e(R)}finally{T.f()}}),F.has("any")?["any"]:Array.from(F)}function ee(y,E,F){var B,N,O=y||"unnamed",T=F,_,R=function(){var ie=[];if(T.forEach(function(ae){var be=M(ae.params,_),se=P(be);(_<ae.params.length||x(ae.params))&&se(E[_])&&ie.push(ae)}),ie.length===0){if(N=z(T,_),N.length>0){var me=a(E[_]);return B=new TypeError("Unexpected type of argument in function "+O+" (expected: "+N.join(" or ")+", actual: "+me.join(" | ")+", index: "+_+")"),B.data={category:"wrongType",fn:O,index:_,actual:me,expected:N},{v:B}}}else T=ie};for(_=0;_<E.length;_++){var V=R();if(qt(V)==="object")return V.v}var W=T.map(function(fe){return x(fe.params)?1/0:fe.params.length});if(E.length<Math.min.apply(null,W))return N=z(T,_),B=new TypeError("Too few arguments in function "+O+" (expected: "+N.join(" or ")+", index: "+E.length+")"),B.data={category:"tooFewArgs",fn:O,index:E.length,expected:N},B;var $=Math.max.apply(null,W);if(E.length>$)return B=new TypeError("Too many arguments in function "+O+" (expected: "+$+", actual: "+E.length+")"),B.data={category:"tooManyArgs",fn:O,index:E.length,expectedLength:$},B;for(var Ce=[],De=0;De<E.length;++De)Ce.push(a(E[De]).join("|"));return B=new TypeError('Arguments of type "'+Ce.join(", ")+'" do not match any of the defined signatures of function '+O+"."),B.data={category:"mismatch",actual:Ce},B}function Y(y){for(var E=u.length+1,F=0;F<y.types.length;F++)G(y.types[F])&&(E=Math.min(E,y.types[F].typeIndex));return E}function ue(y){for(var E=i+1,F=0;F<y.types.length;F++)G(y.types[F])||(E=Math.min(E,y.types[F].conversionIndex));return E}function re(y,E){if(y.hasAny){if(!E.hasAny)return 1}else if(E.hasAny)return-1;if(y.restParam){if(!E.restParam)return 1}else if(E.restParam)return-1;if(y.hasConversion){if(!E.hasConversion)return 1}else if(E.hasConversion)return-1;var F=Y(y)-Y(E);if(F<0)return-1;if(F>0)return 1;var B=ue(y)-ue(E);return B<0?-1:B>0?1:0}function X(y,E){var F=y.params,B=E.params,N=Ft(F),O=Ft(B),T=x(F),_=x(B);if(T&&N.hasAny){if(!_||!O.hasAny)return 1}else if(_&&O.hasAny)return-1;var R=0,V=0,W,$=ze(F),Ce;try{for($.s();!(Ce=$.n()).done;)W=Ce.value,W.hasAny&&++R,W.hasConversion&&++V}catch(wt){$.e(wt)}finally{$.f()}var De=0,fe=0,ie=ze(B),me;try{for(ie.s();!(me=ie.n()).done;)W=me.value,W.hasAny&&++De,W.hasConversion&&++fe}catch(wt){ie.e(wt)}finally{ie.f()}if(R!==De)return R-De;if(T&&N.hasConversion){if(!_||!O.hasConversion)return 1}else if(_&&O.hasConversion)return-1;if(V!==fe)return V-fe;if(T){if(!_)return 1}else if(_)return-1;var ae=(F.length-B.length)*(T?-1:1);if(ae!==0)return ae;for(var be=[],se=0,Fe=0;Fe<F.length;++Fe){var lt=re(F[Fe],B[Fe]);be.push(lt),se+=lt}if(se!==0)return se;for(var Be,ht=0,Kt=be;ht<Kt.length;ht++)if(Be=Kt[ht],Be!==0)return Be;return 0}function Nu(y){if(y.length===0)return[];var E=y.map(c);y.length>1&&E.sort(function(R,V){return R.index-V.index});var F=E[0].conversionsTo;if(y.length===1)return F;F=F.concat([]);for(var B=new Set(y),N=1;N<E.length;++N){var O=void 0,T=ze(E[N].conversionsTo),_;try{for(T.s();!(_=T.n()).done;)O=_.value,B.has(O.from)||(F.push(O),B.add(O.from))}catch(R){T.e(R)}finally{T.f()}}return F}function xu(y,E){var F=E;if(y.some(function(_){return _.hasConversion})){var B=x(y),N=y.map(Ou);F=function(){for(var R=[],V=B?arguments.length-1:arguments.length,W=0;W<V;W++)R[W]=N[W](arguments[W]);return B&&(R[V]=arguments[V].map(N[V])),E.apply(this,R)}}var O=F;if(x(y)){var T=y.length-1;O=function(){return F.apply(this,En(arguments,0,T).concat([En(arguments,T)]))}}return O}function Ou(y){var E,F,B,N,O=[],T=[];switch(y.types.forEach(function(_){_.conversion&&(O.push(c(_.conversion.from).test),T.push(_.conversion.convert))}),T.length){case 0:return function(R){return R};case 1:return E=O[0],B=T[0],function(R){return E(R)?B(R):R};case 2:return E=O[0],F=O[1],B=T[0],N=T[1],function(R){return E(R)?B(R):F(R)?N(R):R};default:return function(R){for(var V=0;V<T.length;V++)if(O[V](R))return T[V](R);return R}}}function te(y){function E(F,B,N){if(B<F.length){var O=F[B],T=[];if(O.restParam){var _=O.types.filter(G);_.length<O.types.length&&T.push({types:_,name:"..."+_.map(function(R){return R.name}).join("|"),hasAny:_.some(function(R){return R.isAny}),hasConversion:!1,restParam:!0}),T.push(O)}else T=O.types.map(function(R){return{types:[R],name:R.name,hasAny:R.isAny,hasConversion:R.conversion,restParam:!1}});return $u(T,function(R){return E(F,B+1,N.concat([R]))})}else return[N]}return E(y,0,[])}function Ru(y,E){for(var F=Math.max(y.length,E.length),B=0;B<F;B++){var N=j(y,B),O=j(E,B),T=!1,_=void 0,R=ze(O),V;try{for(R.s();!(V=R.n()).done;)if(_=V.value,N.has(_)){T=!0;break}}catch(fe){R.e(fe)}finally{R.f()}if(!T)return!1}var W=y.length,$=E.length,Ce=x(y),De=x(E);return Ce?De?W===$:$>=W:De?W>=$:W===$}function Tu(y){return y.map(function(E){return Fn(E)?Cn(E.referToSelf.callback):Gt(E)?An(E.referTo.references,E.referTo.callback):E})}function Ge(y,E,F){var B=[],N,O=ze(y),T;try{for(O.s();!(T=O.n()).done;){N=T.value;var _=F[N];if(typeof _!="number")throw new TypeError('No definition for referenced signature "'+N+'"');if(_=E[_],typeof _!="function")return!1;B.push(_)}}catch(R){O.e(R)}finally{O.f()}return B}function or(y,E,F){for(var B=Tu(y),N=new Array(B.length).fill(!1),O=!0;O;){O=!1;for(var T=!0,_=0;_<B.length;++_)if(!N[_]){var R=B[_];if(Fn(R))B[_]=R.referToSelf.callback(F),B[_].referToSelf=R.referToSelf,N[_]=!0,T=!1;else if(Gt(R)){var V=Ge(R.referTo.references,B,E);V?(B[_]=R.referTo.callback.apply(this,V),B[_].referTo=R.referTo,N[_]=!0,T=!1):O=!0}}if(T&&O)throw new SyntaxError("Circular reference detected in resolving typed.referTo")}return B}function ar(y){var E=/\bthis(\(|\.signatures\b)/;Object.keys(y).forEach(function(F){var B=y[F];if(E.test(B.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 Pu(y,E){if(o.createCount++,Object.keys(E).length===0)throw new SyntaxError("No signatures provided");o.warnAgainstDeprecatedThis&&ar(E);var F=[],B=[],N={},O=[],T,_=function(){if(!Object.prototype.hasOwnProperty.call(E,T))return"continue";var ce=w(T);if(!ce)return"continue";F.forEach(function(it){if(Ru(it,ce))throw new TypeError('Conflicting signatures "'+m(it)+'" and "'+m(ce)+'".')}),F.push(ce);var pr=B.length;B.push(E[T]);var oi=ce.map(A),Jt=void 0,Qt=ze(te(oi)),Dr;try{for(Qt.s();!(Dr=Qt.n()).done;){Jt=Dr.value;var gr=m(Jt);O.push({params:Jt,name:gr,fn:pr}),Jt.every(function(it){return!it.hasConversion})&&(N[gr]=pr)}}catch(it){Qt.e(it)}finally{Qt.f()}};for(T in E)var R=_();O.sort(X);var V=or(B,N,ut),W;for(W in N)Object.prototype.hasOwnProperty.call(N,W)&&(N[W]=V[N[W]]);for(var $=[],Ce=new Map,De=0,fe=O;De<fe.length;De++)W=fe[De],Ce.has(W.name)||(W.fn=V[W.fn],$.push(W),Ce.set(W.name,W));for(var ie=$[0]&&$[0].params.length<=2&&!x($[0].params),me=$[1]&&$[1].params.length<=2&&!x($[1].params),ae=$[2]&&$[2].params.length<=2&&!x($[2].params),be=$[3]&&$[3].params.length<=2&&!x($[3].params),se=$[4]&&$[4].params.length<=2&&!x($[4].params),Fe=$[5]&&$[5].params.length<=2&&!x($[5].params),lt=ie&&me&&ae&&be&&se&&Fe,Be=0;Be<$.length;++Be)$[Be].test=L($[Be].params);for(var ht=ie?P($[0].params[0]):Le,Kt=me?P($[1].params[0]):Le,wt=ae?P($[2].params[0]):Le,hr=be?P($[3].params[0]):Le,dt=se?P($[4].params[0]):Le,qu=Fe?P($[5].params[0]):Le,ku=ie?P($[0].params[1]):Le,Vu=me?P($[1].params[1]):Le,Uu=ae?P($[2].params[1]):Le,Hu=be?P($[3].params[1]):Le,Xe=se?P($[4].params[1]):Le,zu=Fe?P($[5].params[1]):Le,xt=0;xt<$.length;++xt)$[xt].implementation=xu($[xt].params,$[xt].fn);var Wu=ie?$[0].implementation:kt,Zu=me?$[1].implementation:kt,Gu=ae?$[2].implementation:kt,bt=be?$[3].implementation:kt,Xu=se?$[4].implementation:kt,Ku=Fe?$[5].implementation:kt,Ju=ie?$[0].params.length:-1,Qu=me?$[1].params.length:-1,Yu=ae?$[2].params.length:-1,Bt=be?$[3].params.length:-1,ei=se?$[4].params.length:-1,ti=Fe?$[5].params.length:-1,ni=lt?6:0,ri=$.length,ui=$.map(function(Ie){return Ie.test}),ii=$.map(function(Ie){return Ie.implementation}),dr=function(){for(var ce=ni;ce<ri;ce++)if(ui[ce](arguments))return ii[ce].apply(this,arguments);return o.onMismatch(y,arguments,$)};function ut(Ie,ce){return arguments.length===Ju&&ht(Ie)&&ku(ce)?Wu.apply(this,arguments):arguments.length===Qu&&Kt(Ie)&&Vu(ce)?Zu.apply(this,arguments):arguments.length===Yu&&wt(Ie)&&Uu(ce)?Gu.apply(this,arguments):arguments.length===Bt&&hr(Ie)&&Hu(ce)?bt.apply(this,arguments):arguments.length===ei&&dt(Ie)&&Xe(ce)?Xu.apply(this,arguments):arguments.length===ti&&qu(Ie)&&zu(ce)?Ku.apply(this,arguments):dr.apply(this,arguments)}try{Object.defineProperty(ut,"name",{value:y})}catch(Ie){}return ut.signatures=N,ut._typedFunctionData={signatures:$,signatureMap:Ce},ut}function sr(y,E,F){throw ee(y,E,F)}function cr(y){return En(y,0,y.length-1)}function Ft(y){return y[y.length-1]}function En(y,E,F){return Array.prototype.slice.call(y,E,F)}function fr(y,E){for(var F=0;F<y.length;F++)if(E(y[F]))return y[F]}function $u(y,E){return Array.prototype.concat.apply([],y.map(E))}function ju(){var y=cr(arguments).map(function(F){return m(w(F))}),E=Ft(arguments);if(typeof E!="function")throw new TypeError("Callback function expected as last argument");return An(y,E)}function An(y,E){return{referTo:{references:y,callback:E}}}function Cn(y){if(typeof y!="function")throw new TypeError("Callback function expected as first argument");return{referToSelf:{callback:y}}}function Gt(y){return y&&qt(y.referTo)==="object"&&Array.isArray(y.referTo.references)&&typeof y.referTo.callback=="function"}function Fn(y){return y&&qt(y.referToSelf)==="object"&&typeof y.referToSelf.callback=="function"}function lr(y,E){if(!y)return E;if(E&&E!==y){var F=new Error("Function names do not match (expected: "+y+", actual: "+E+")");throw F.data={actual:E,expected:y},F}return y}function Lu(y){var E;for(var F in y)Object.prototype.hasOwnProperty.call(y,F)&&(h(y[F])||typeof y[F].signature=="string")&&(E=lr(E,y[F].name));return E}function Xt(y,E){var F;for(F in E)if(Object.prototype.hasOwnProperty.call(E,F)){if(F in y&&E[F]!==y[F]){var B=new Error('Signature "'+F+'" is defined twice');throw B.data={signature:F,sourceFunction:E[F],destFunction:y[F]},B}y[F]=E[F]}}var wn=o;o=function(E){for(var F=typeof E=="string",B=F?1:0,N=F?E:"",O={},T=B;T<arguments.length;++T){var _=arguments[T],R={},V=void 0;if(typeof _=="function"?(V=_.name,typeof _.signature=="string"?R[_.signature]=_:h(_)&&(R=_.signatures)):e(_)&&(R=_,F||(V=Lu(_))),Object.keys(R).length===0){var W=new TypeError("Argument to 'typed' at index "+T+" is not a (typed) function, nor an object with signatures as keys and functions as values.");throw W.data={index:T,argument:_},W}F||(N=lr(N,V)),Xt(O,R)}return Pu(N||"",O)},o.create=Bo,o.createCount=wn.createCount,o.onMismatch=sr,o.throwMismatchError=sr,o.createError=ee,o.clear=l,o.clearConversions=f,o.addTypes=s,o._findType=c,o.referTo=ju,o.referToSelf=Cn,o.convert=D,o.findSignature=d,o.find=p,o.isTypedFunction=h,o.warnAgainstDeprecatedThis=!0,o.addType=function(y,E){var F="any";E!==!1&&r.has("Object")&&(F="Object"),o.addTypes([y],F)};function bn(y){if(!y||typeof y.from!="string"||typeof y.to!="string"||typeof y.convert!="function")throw new TypeError("Object with properties {from: string, to: string, convert: function} expected");if(y.to===y.from)throw new SyntaxError('Illegal to define conversion from "'+y.from+'" to itself.')}return o.addConversion=function(y){bn(y);var E=c(y.to);if(E.conversionsTo.every(function(F){return F.from!==y.from}))E.conversionsTo.push({from:y.from,convert:y.convert,index:i++});else throw new Error('There is already a conversion from "'+y.from+'" to "'+E.name+'"')},o.addConversions=function(y){y.forEach(o.addConversion)},o.removeConversion=function(y){bn(y);var E=c(y.to),F=fr(E.conversionsTo,function(N){return N.from===y.from});if(!F)throw new Error("Attempt to remove nonexistent conversion from "+y.from+" to "+y.to);if(F.convert!==y.convert)throw new Error("Conversion to remove does not match existing conversion");var B=E.conversionsTo.indexOf(F);E.conversionsTo.splice(B,1)},o.resolve=function(y,E){if(!h(y))throw new TypeError(bo);for(var F=y._typedFunctionData.signatures,B=0;B<F.length;++B)if(F[B].test(E))return F[B];return null},o}var _o=Bo();function nt(e){return typeof e=="boolean"?!0:isFinite(e)?e===Math.round(e):!1}function vu(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(!nt(n))throw new Error("size must be an integer");if(e>Er(2,n-1)-1||e<-Er(2,n-1))throw new Error("Value must be in range [-2^".concat(n-1,", 2^").concat(n-1,"-1]"));if(!nt(e))throw new Error("Value must be an integer");e<0&&(e=e+Er(2,n)),i="i".concat(n)}var o="";return e<0&&(e=-e,o="-"),"".concat(o).concat(u).concat(e.toString(t)).concat(i)}function mu(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),Se(t)?r=t:Se(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 np(e,r);case"exponential":return So(e,r);case"engineering":return tp(e,r);case"bin":return vu(e,2,u);case"oct":return vu(e,8,u);case"hex":return vu(e,16,u);case"auto":return rp(e,r,t&&t).replace(/((\.\d*?)(0+))($|e)/,function(){var i=arguments[2],o=arguments[4];return i!=="."?i+o:o});default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function Xn(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 o=r.replace(".","").replace(/^0*/,function(c){return u-=c.length,""}).replace(/0*$/,"").split("").map(function(c){return parseInt(c)});return o.length===0&&(o.push(0),u++),{sign:n,coefficients:o,exponent:u}}function tp(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=Xn(e),r=Kn(n,t),u=r.exponent,i=r.coefficients,o=u%3===0?u:u<0?u-3-u%3:u-u%3;if(Se(t))for(;t>i.length||u-o+1>i.length;)i.push(0);else for(var c=Math.abs(u-o)-(i.length-1),s=0;s<c;s++)i.push(0);for(var l=Math.abs(u-o),f=1;l>0;)f++,l--;var a=i.slice(f).join(""),h=Se(t)&&a.length||a.match(/[1-9]/)?"."+a:"",d=i.slice(0,f).join("")+h+"e"+(u>=0?"+":"")+o.toString();return r.sign+d}function np(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=Xn(e),r=typeof t=="number"?Kn(n,n.exponent+1+t):n,u=r.coefficients,i=r.exponent+1,o=i+(t||0);return u.length<o&&(u=u.concat(Vt(o-u.length))),i<0&&(u=Vt(-i+1).concat(u),i=1),i<u.length&&u.splice(i,0,i===0?"0.":"."),r.sign+u.join("")}function So(e,t){if(isNaN(e)||!isFinite(e))return String(e);var n=Xn(e),r=t?Kn(n,t):n,u=r.coefficients,i=r.exponent;u.length<t&&(u=u.concat(Vt(t-u.length)));var o=u.shift();return r.sign+o+(u.length>0?"."+u.join(""):"")+"e"+(i>=0?"+":"")+i}function rp(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=Xn(e),o=t?Kn(i,t):i;if(o.exponent<r||o.exponent>=u)return So(e,t);var c=o.coefficients,s=o.exponent;c.length<t&&(c=c.concat(Vt(t-c.length))),c=c.concat(Vt(s-c.length+1+(c.length<t?t-c.length:0))),c=Vt(-s).concat(c);var l=s>0?s:0;return l<c.length-1&&c.splice(l+1,0,"."),o.sign+c.join("")}function Kn(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 Vt(e){for(var t=[],n=0;n<e;n++)t.push(0);return t}function up(e){return e.toExponential().replace(/e.*$/,"").replace(/^0\.?0*|\./,"").length}var ip=Number.EPSILON||2220446049250313e-31;function op(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<ip?!0:r<=Math.max(Math.abs(e),Math.abs(t))*n}return!1}function yu(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(!nt(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 ap(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 cp(e,r);case"exponential":return Io(e,r);case"engineering":return sp(e,r);case"bin":return yu(e,2,u);case"oct":return yu(e,8,u);case"hex":return yu(e,16,u);case"auto":{var i=t&&t.lowerExp!==void 0?t.lowerExp:-3,o=t&&t.upperExp!==void 0?t.upperExp:5;if(e.isZero())return"0";var c,s=e.toSignificantDigits(r),l=s.e;return l>=i&&l<o?c=s.toFixed():c=Io(e,r),c.replace(/((\.\d*?)(0+))($|e)/,function(){var f=arguments[2],a=arguments[4];return f!=="."?f+a:a})}default:throw new Error('Unknown notation "'+n+'". Choose "auto", "exponential", "fixed", "bin", "oct", or "hex.')}}function sp(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 Io(e,t){return t!==void 0?e.toExponential(t-1):e.toExponential()}function cp(e,t){return e.toFixed(t)}function Nt(e,t){var n=fp(e,t);return t&&typeof t=="object"&&"truncate"in t&&n.length>t.truncate?n.substring(0,t.truncate-3)+"...":n}function fp(e,t){if(typeof e=="number")return mu(e,t);if(mt(e))return ap(e,t);if(lp(e))return!t||t.fraction!=="decimal"?e.s*e.n+"/"+e.d:e.toString();if(Array.isArray(e))return Mo(e,t);if(Zn(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+'": '+Nt(e[r],t));return"{"+n.join(", ")+"}"}return String(e)}function Mo(e,t){if(Array.isArray(e)){for(var n="[",r=e.length,u=0;u<r;u++)u!==0&&(n+=", "),n+=Mo(e[u],t);return n+="]",n}else return Nt(e,t)}function lp(e){return e&&typeof e=="object"&&typeof e.s=="number"&&typeof e.n=="number"&&typeof e.d=="number"||!1}function ve(e,t,n){if(!(this instanceof ve))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}ve.prototype=new RangeError,ve.prototype.constructor=RangeError,ve.prototype.name="DimensionError",ve.prototype.isDimensionError=!0;function Ut(e,t,n){if(!(this instanceof Ut))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}Ut.prototype=new RangeError,Ut.prototype.constructor=RangeError,Ut.prototype.name="IndexError",Ut.prototype.isIndexError=!0;function Eu(e){for(var t=[];Array.isArray(e);)t.push(e.length),e=e[0];return t}function No(e,t,n){var r,u=e.length;if(u!==t[n])throw new ve(u,t[n]);if(n<t.length-1){var i=n+1;for(r=0;r<u;r++){var o=e[r];if(!Array.isArray(o))throw new ve(t.length-1,t.length,"<");No(e[r],t,i)}}else for(r=0;r<u;r++)if(Array.isArray(e[r]))throw new ve(t.length+1,t.length,">")}function xo(e,t){var n=t.length===0;if(n){if(Array.isArray(e))throw new ve(e.length,0)}else No(e,t,0)}function qe(e,t){if(!Se(e)||!nt(e))throw new TypeError("Index must be an integer (value: "+e+")");if(e<0||typeof t=="number"&&e>=t)throw new Ut(e,t)}function Oo(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(!Se(u)||!nt(u)||u<0)throw new TypeError("Invalid size, must contain positive integers (size: "+Nt(t)+")")});var r=n!==void 0?n:0;return Au(e,t,0,r),e}function Au(e,t,n,r){var u,i,o=e.length,c=t[n],s=Math.min(o,c);if(e.length=c,n<t.length-1){var l=n+1;for(u=0;u<s;u++)i=e[u],Array.isArray(i)||(i=[i],e[u]=i),Au(i,t,l,r);for(u=s;u<c;u++)i=[],e[u]=i,Au(i,t,l,r)}else{for(u=0;u<s;u++)for(;Array.isArray(e[u]);)e[u]=e[u][0];for(u=s;u<c;u++)e[u]=r}}function hp(e,t){var n=Dp(e),r=n.length;if(!Array.isArray(e)||!Array.isArray(t))throw new TypeError("Array expected");if(t.length===0)throw new ve(0,r,"!=");t=Ro(t,r);var u=To(t);if(r!==u)throw new ve(u,r,"!=");try{return dp(n,t)}catch(i){throw i instanceof ve?new ve(u,r,"!="):i}}function Ro(e,t){var n=To(e),r=e.slice(),u=-1,i=e.indexOf(u),o=e.indexOf(u,i+1)>=0;if(o)throw new Error("More than one wildcard in sizes");var c=i>=0,s=t%n===0;if(c)if(s)r[i]=-t/n;else throw new Error("Could not replace wildcard, since "+t+" is no multiple of "+-n);return r}function To(e){return e.reduce((t,n)=>t*n,1)}function dp(e,t){for(var n=e,r,u=t.length-1;u>0;u--){var i=t[u];r=[];for(var o=n.length/i,c=0;c<o;c++)r.push(n.slice(c*i,(c+1)*i));n=r}return n}function pp(e,t,n,r){var u=r||Eu(e);if(n)for(var i=0;i<n;i++)e=[e],u.unshift(1);for(e=Po(e,t,0);u.length<t;)u.push(1);return e}function Po(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]=Po(e[r],t,i)}else for(var o=n;o<t;o++)e=[e];return e}function Dp(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 Cu(e,t){for(var n,r=0,u=0;u<e.length;u++){var i=e[u],o=Array.isArray(i);if(u===0&&o&&(r=i.length),o&&i.length!==r)return;var c=o?Cu(i,t):t(i);if(n===void 0)n=c;else if(n!==c)return"mixed"}return n}function Ne(e,t,n,r){function u(i){var o=Jd(i,t.map(mp));return gp(e,t,i),n(o)}return u.isFactory=!0,u.fn=e,u.dependencies=t.slice().sort(),r&&(u.meta=r),u}function gp(e,t,n){var r=t.filter(i=>!vp(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 vp(e){return e&&e[0]==="?"}function mp(e){return e&&e[0]==="?"?e.slice(1):e}function yp(e,t){if(jo(e)&&$o(e,t))return e[t];throw typeof e[t]=="function"&&Cp(e,t)?new Error('Cannot access method "'+t+'" as a property'):new Error('No access to property "'+t+'"')}function Ep(e,t,n){if(jo(e)&&$o(e,t))return e[t]=n,n;throw new Error('No access to property "'+t+'"')}function Ap(e,t){return t in e}function $o(e,t){return!e||typeof e!="object"?!1:Gn(Fp,t)?!0:!(t in Object.prototype||t in Function.prototype)}function Cp(e,t){return e==null||typeof e[t]!="function"||Gn(e,t)&&Object.getPrototypeOf&&t in Object.getPrototypeOf(e)?!1:Gn(wp,t)?!0:!(t in Object.prototype||t in Function.prototype)}function jo(e){return typeof e=="object"&&e&&e.constructor===Object}var Fp={length:!0,name:!0},wp={toString:!0,valueOf:!0,toLocaleString:!0};class bp{constructor(t){this.wrappedObject=t}keys(){return Object.keys(this.wrappedObject)}get(t){return yp(this.wrappedObject,t)}set(t,n){return Ep(this.wrappedObject,t,n),this}has(t){return Ap(this.wrappedObject,t)}}function Bp(e){return e?e instanceof Map||e instanceof bp||typeof e.set=="function"&&typeof e.get=="function"&&typeof e.keys=="function"&&typeof e.has=="function":!1}var Lo=function(){return Lo=_o.create,_o},_p=["?BigNumber","?Complex","?DenseMatrix","?Fraction"],Sp=Ne("typed",_p,function(t){var{BigNumber:n,Complex:r,DenseMatrix:u,Fraction:i}=t,o=Lo();return o.clear(),o.addTypes([{name:"number",test:Se},{name:"Complex",test:mo},{name:"BigNumber",test:mt},{name:"Fraction",test:yo},{name:"Unit",test:Eo},{name:"identifier",test:c=>Zn&&/^(?:[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(c)},{name:"string",test:Zn},{name:"Chain",test:Xd},{name:"Array",test:$e},{name:"Matrix",test:vn},{name:"DenseMatrix",test:Ad},{name:"SparseMatrix",test:Cd},{name:"Range",test:Fd},{name:"Index",test:Ao},{name:"boolean",test:wd},{name:"ResultSet",test:bd},{name:"Help",test:Bd},{name:"function",test:_d},{name:"Date",test:Sd},{name:"RegExp",test:Id},{name:"null",test:Nd},{name:"undefined",test:xd},{name:"AccessorNode",test:Od},{name:"ArrayNode",test:Rd},{name:"AssignmentNode",test:Td},{name:"BlockNode",test:Pd},{name:"ConditionalNode",test:$d},{name:"ConstantNode",test:jd},{name:"FunctionNode",test:qd},{name:"FunctionAssignmentNode",test:Ld},{name:"IndexNode",test:kd},{name:"Node",test:Vd},{name:"ObjectNode",test:Ud},{name:"OperatorNode",test:Hd},{name:"ParenthesisNode",test:zd},{name:"RangeNode",test:Wd},{name:"RelationalNode",test:Zd},{name:"SymbolNode",test:Gd},{name:"Map",test:Bp},{name:"Object",test:Md}]),o.addConversions([{from:"number",to:"BigNumber",convert:function(s){if(n||Fu(s),up(s)>15)throw new TypeError("Cannot implicitly convert a number with >15 significant digits to BigNumber (value: "+s+"). Use function bignumber(x) to convert to BigNumber.");return new n(s)}},{from:"number",to:"Complex",convert:function(s){return r||Jn(s),new r(s,0)}},{from:"BigNumber",to:"Complex",convert:function(s){return r||Jn(s),new r(s.toNumber(),0)}},{from:"Fraction",to:"BigNumber",convert:function(s){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(s){return r||Jn(s),new r(s.valueOf(),0)}},{from:"number",to:"Fraction",convert:function(s){i||wu(s);var l=new i(s);if(l.valueOf()!==s)throw new TypeError("Cannot implicitly convert a number to a Fraction when there will be a loss of precision (value: "+s+"). Use function fraction(x) to convert to Fraction.");return l}},{from:"string",to:"number",convert:function(s){var l=Number(s);if(isNaN(l))throw new Error('Cannot convert "'+s+'" to a number');return l}},{from:"string",to:"BigNumber",convert:function(s){n||Fu(s);try{return new n(s)}catch(l){throw new Error('Cannot convert "'+s+'" to BigNumber')}}},{from:"string",to:"Fraction",convert:function(s){i||wu(s);try{return new i(s)}catch(l){throw new Error('Cannot convert "'+s+'" to Fraction')}}},{from:"string",to:"Complex",convert:function(s){r||Jn(s);try{return new r(s)}catch(l){throw new Error('Cannot convert "'+s+'" to Complex')}}},{from:"boolean",to:"number",convert:function(s){return+s}},{from:"boolean",to:"BigNumber",convert:function(s){return n||Fu(s),new n(+s)}},{from:"boolean",to:"Fraction",convert:function(s){return i||wu(s),new i(+s)}},{from:"boolean",to:"string",convert:function(s){return String(s)}},{from:"Array",to:"Matrix",convert:function(s){return u||Ip(),new u(s)}},{from:"Matrix",to:"Array",convert:function(s){return s.valueOf()}}]),o.onMismatch=(c,s,l)=>{var f=o.createError(c,s,l);if(["wrongType","mismatch"].includes(f.data.category)&&s.length===1&&pu(s[0])&&l.some(h=>!h.params.includes(","))){var a=new TypeError("Function '".concat(c,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(c,")'."));throw a.data=f.data,a}throw f},o.onMismatch=(c,s,l)=>{var f=o.createError(c,s,l);if(["wrongType","mismatch"].includes(f.data.category)&&s.length===1&&pu(s[0])&&l.some(h=>!h.params.includes(","))){var a=new TypeError("Function '".concat(c,"' doesn't apply to matrices. To call it ")+"elementwise on a matrix 'M', try 'map(M, ".concat(c,")'."));throw a.data=f.data,a}throw f},o});function Fu(e){throw new Error("Cannot convert value ".concat(e," into a BigNumber: no class 'BigNumber' provided"))}function Jn(e){throw new Error("Cannot convert value ".concat(e," into a Complex number: no class 'Complex' provided"))}function Ip(){throw new Error("Cannot convert array into a Matrix: no class 'DenseMatrix' provided")}function wu(e){throw new Error("Cannot convert value ".concat(e," into a Fraction, no class 'Fraction' provided."))}/*!
|
|
11
11
|
* decimal.js v10.4.3
|
|
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 Ht=9e15,yt=1e9,bu="0123456789abcdef",Jn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Qn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Bu={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Ht,maxE:Ht,crypto:!1},jo,st,H=!0,Yn="[DecimalError] ",Et=Yn+"Invalid argument: ",Lo=Yn+"Precision limit exceeded",qo=Yn+"crypto unavailable",ko="[object Decimal]",we=Math.floor,pe=Math.pow,Bp=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,_p=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Sp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Vo=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,We=1e7,U=7,Mp=9007199254740991,Ip=Jn.length-1,_u=Qn.length-1,S={toStringTag:ko};S.absoluteValue=S.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)},S.ceil=function(){return k(new this.constructor(this),this.e+1,2)},S.clampedTo=S.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(Et+t);return n=r.cmp(e),n<0?e:r.cmp(t)>0?t:new u(r)},S.comparedTo=S.cmp=function(e){var t,n,r,u,i=this,o=i.d,c=(e=new i.constructor(e)).d,s=i.s,l=e.s;if(!o||!c)return!s||!l?NaN:s!==l?s:o===c?0:!o^s<0?1:-1;if(!o[0]||!c[0])return o[0]?s:c[0]?-l:0;if(s!==l)return s;if(i.e!==e.e)return i.e>e.e^s<0?1:-1;for(r=o.length,u=c.length,t=0,n=r<u?r:u;t<n;++t)if(o[t]!==c[t])return o[t]>c[t]^s<0?1:-1;return r===u?0:r>u^s<0?1:-1},S.cosine=S.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())+U,r.rounding=1,n=Np(r,Go(r,n)),r.precision=e,r.rounding=t,k(st==2||st==3?n.neg():n,e,t,!0)):new r(1):new r(NaN)},S.cubeRoot=S.cbrt=function(){var e,t,n,r,u,i,o,c,s,l,f=this,a=f.constructor;if(!f.isFinite()||f.isZero())return new a(f);for(H=!1,i=f.s*pe(f.s*f,1/3),!i||Math.abs(i)==1/0?(n=Ee(f.d),e=f.e,(i=(e-n.length+1)%3)&&(n+=i==1||i==-2?"0":"00"),i=pe(n,1/3),e=we((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 a(n),r.s=f.s):r=new a(i.toString()),o=(e=a.precision)+3;;)if(c=r,s=c.times(c).times(c),l=s.plus(f),r=ne(l.plus(f).times(c),l.plus(s),o+2,1),Ee(c.d).slice(0,o)===(n=Ee(r.d)).slice(0,o))if(n=n.slice(o-3,o+1),n=="9999"||!u&&n=="4999"){if(!u&&(k(c,e+1,0),c.times(c).times(c).eq(f))){r=c;break}o+=4,u=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(k(r,e+1,1),t=!r.times(r).times(r).eq(f));break}return H=!0,k(r,e,a.rounding,t)},S.decimalPlaces=S.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-we(this.e/U))*U,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},S.dividedBy=S.div=function(e){return ne(this,new this.constructor(e))},S.dividedToIntegerBy=S.divToInt=function(e){var t=this,n=t.constructor;return k(ne(t,new n(e),0,1,1),n.precision,n.rounding)},S.equals=S.eq=function(e){return this.cmp(e)===0},S.floor=function(){return k(new this.constructor(this),this.e+1,3)},S.greaterThan=S.gt=function(e){return this.cmp(e)>0},S.greaterThanOrEqualTo=S.gte=function(e){var t=this.cmp(e);return t==1||t===0},S.hyperbolicCosine=S.cosh=function(){var e,t,n,r,u,i=this,o=i.constructor,c=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return c;n=o.precision,r=o.rounding,o.precision=n+Math.max(i.e,i.sd())+4,o.rounding=1,u=i.d.length,u<32?(e=Math.ceil(u/3),t=(1/rr(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=zt(o,1,i.times(t),new o(1),!0);for(var s,l=e,f=new o(8);l--;)s=i.times(i),i=c.minus(s.times(f.minus(s.times(f))));return k(i,o.precision=n,o.rounding=r,!0)},S.hyperbolicSine=S.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=zt(i,2,u,u,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,u=u.times(1/rr(5,e)),u=zt(i,2,u,u,!0);for(var o,c=new i(5),s=new i(16),l=new i(20);e--;)o=u.times(u),u=u.times(c.plus(o.times(s.times(o).plus(l))))}return i.precision=t,i.rounding=n,k(u,t,n,!0)},S.hyperbolicTangent=S.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,ne(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},S.inverseCosine=S.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()?Ze(n,u,i):new n(0):new n(NaN):t.isZero()?Ze(n,u+4,i).times(.5):(n.precision=u+6,n.rounding=1,t=t.asin(),e=Ze(n,u+4,i).times(.5),n.precision=u,n.rounding=i,e.minus(t))},S.inverseHyperbolicCosine=S.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,H=!1,n=n.times(n).minus(1).sqrt().plus(n),H=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},S.inverseHyperbolicSine=S.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,H=!1,n=n.times(n).plus(1).sqrt().plus(n),H=!0,r.precision=e,r.rounding=t,n.ln())},S.inverseHyperbolicTangent=S.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?k(new i(u),e,t,!0):(i.precision=n=r-u.e,u=ne(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)},S.inverseSine=S.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=Ze(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)))},S.inverseTangent=S.atan=function(){var e,t,n,r,u,i,o,c,s,l=this,f=l.constructor,a=f.precision,h=f.rounding;if(l.isFinite()){if(l.isZero())return new f(l);if(l.abs().eq(1)&&a+4<=_u)return o=Ze(f,a+4,h).times(.25),o.s=l.s,o}else{if(!l.s)return new f(NaN);if(a+4<=_u)return o=Ze(f,a+4,h).times(.5),o.s=l.s,o}for(f.precision=c=a+10,f.rounding=1,n=Math.min(28,c/U+2|0),e=n;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(H=!1,t=Math.ceil(c/U),r=1,s=l.times(l),o=new f(l),u=l;e!==-1;)if(u=u.times(s),i=o.minus(u.div(r+=2)),u=u.times(s),o=i.plus(u.div(r+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===i.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),H=!0,k(o,f.precision=a,f.rounding=h,!0)},S.isFinite=function(){return!!this.d},S.isInteger=S.isInt=function(){return!!this.d&&we(this.e/U)>this.d.length-2},S.isNaN=function(){return!this.s},S.isNegative=S.isNeg=function(){return this.s<0},S.isPositive=S.isPos=function(){return this.s>0},S.isZero=function(){return!!this.d&&this.d[0]===0},S.lessThan=S.lt=function(e){return this.cmp(e)<0},S.lessThanOrEqualTo=S.lte=function(e){return this.cmp(e)<1},S.logarithm=S.log=function(e){var t,n,r,u,i,o,c,s,l=this,f=l.constructor,a=f.precision,h=f.rounding,d=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(H=!1,c=a+d,o=Ct(l,c),r=t?nr(f,c+10):Ct(e,c),s=ne(o,r,c,1),vn(s.d,u=a,h))do if(c+=10,o=Ct(l,c),r=t?nr(f,c+10):Ct(e,c),s=ne(o,r,c,1),!i){+Ee(s.d).slice(u+1,u+15)+1==1e14&&(s=k(s,a+1,0));break}while(vn(s.d,u+=10,h));return H=!0,k(s,a,h)},S.minus=S.sub=function(e){var t,n,r,u,i,o,c,s,l,f,a,h,d=this,p=d.constructor;if(e=new p(e),!d.d||!e.d)return!d.s||!e.s?e=new p(NaN):d.d?e.s=-e.s:e=new p(e.d||d.s!==e.s?d:NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(l=d.d,h=e.d,c=p.precision,s=p.rounding,!l[0]||!h[0]){if(h[0])e.s=-e.s;else if(l[0])e=new p(d);else return new p(s===3?-0:0);return H?k(e,c,s):e}if(n=we(e.e/U),f=we(d.e/U),l=l.slice(),i=f-n,i){for(a=i<0,a?(t=l,i=-i,o=h.length):(t=h,n=f,o=l.length),r=Math.max(Math.ceil(c/U),o)+2,i>r&&(i=r,t.length=1),t.reverse(),r=i;r--;)t.push(0);t.reverse()}else{for(r=l.length,o=h.length,a=r<o,a&&(o=r),r=0;r<o;r++)if(l[r]!=h[r]){a=l[r]<h[r];break}i=0}for(a&&(t=l,l=h,h=t,e.s=-e.s),o=l.length,r=h.length-o;r>0;--r)l[o++]=0;for(r=h.length;r>i;){if(l[--r]<h[r]){for(u=r;u&&l[--u]===0;)l[u]=We-1;--l[u],l[r]+=We}l[r]-=h[r]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(e.d=l,e.e=tr(l,n),H?k(e,c,s):e):new p(s===3?-0:0)},S.modulo=S.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]?k(new r(n),r.precision,r.rounding):(H=!1,r.modulo==9?(t=ne(n,e.abs(),0,3,1),t.s*=e.s):t=ne(n,e,0,r.modulo,1),t=t.times(e),H=!0,n.minus(t))},S.naturalExponential=S.exp=function(){return Su(this)},S.naturalLogarithm=S.ln=function(){return Ct(this)},S.negated=S.neg=function(){var e=new this.constructor(this);return e.s=-e.s,k(e)},S.plus=S.add=function(e){var t,n,r,u,i,o,c,s,l,f,a=this,h=a.constructor;if(e=new h(e),!a.d||!e.d)return!a.s||!e.s?e=new h(NaN):a.d||(e=new h(e.d||a.s===e.s?a:NaN)),e;if(a.s!=e.s)return e.s=-e.s,a.minus(e);if(l=a.d,f=e.d,c=h.precision,s=h.rounding,!l[0]||!f[0])return f[0]||(e=new h(a)),H?k(e,c,s):e;if(i=we(a.e/U),r=we(e.e/U),l=l.slice(),u=i-r,u){for(u<0?(n=l,u=-u,o=f.length):(n=f,r=i,o=l.length),i=Math.ceil(c/U),o=i>o?i+1:o+1,u>o&&(u=o,n.length=1),n.reverse();u--;)n.push(0);n.reverse()}for(o=l.length,u=f.length,o-u<0&&(u=o,n=f,f=l,l=n),t=0;u;)t=(l[--u]=l[u]+f[u]+t)/We|0,l[u]%=We;for(t&&(l.unshift(t),++r),o=l.length;l[--o]==0;)l.pop();return e.d=l,e.e=tr(l,r),H?k(e,c,s):e},S.precision=S.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Et+e);return n.d?(t=Uo(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},S.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)},S.sine=S.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())+U,r.rounding=1,n=Op(r,Go(r,n)),r.precision=e,r.rounding=t,k(st>2?n.neg():n,e,t,!0)):new r(NaN)},S.squareRoot=S.sqrt=function(){var e,t,n,r,u,i,o=this,c=o.d,s=o.e,l=o.s,f=o.constructor;if(l!==1||!c||!c[0])return new f(!l||l<0&&(!c||c[0])?NaN:c?o:1/0);for(H=!1,l=Math.sqrt(+o),l==0||l==1/0?(t=Ee(c),(t.length+s)%2==0&&(t+="0"),l=Math.sqrt(t),s=we((s+1)/2)-(s<0||s%2),l==1/0?t="5e"+s:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+s),r=new f(t)):r=new f(l.toString()),n=(s=f.precision)+3;;)if(i=r,r=i.plus(ne(o,i,n+2,1)).times(.5),Ee(i.d).slice(0,n)===(t=Ee(r.d)).slice(0,n))if(t=t.slice(n-3,n+1),t=="9999"||!u&&t=="4999"){if(!u&&(k(i,s+1,0),i.times(i).eq(o))){r=i;break}n+=4,u=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(k(r,s+1,1),e=!r.times(r).eq(o));break}return H=!0,k(r,s,f.rounding,e)},S.tangent=S.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=ne(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,k(st==2||st==4?n.neg():n,e,t,!0)):new r(NaN)},S.times=S.mul=function(e){var t,n,r,u,i,o,c,s,l,f=this,a=f.constructor,h=f.d,d=(e=new a(e)).d;if(e.s*=f.s,!h||!h[0]||!d||!d[0])return new a(!e.s||h&&!h[0]&&!d||d&&!d[0]&&!h?NaN:!h||!d?e.s/0:e.s*0);for(n=we(f.e/U)+we(e.e/U),s=h.length,l=d.length,s<l&&(i=h,h=d,d=i,o=s,s=l,l=o),i=[],o=s+l,r=o;r--;)i.push(0);for(r=l;--r>=0;){for(t=0,u=s+r;u>r;)c=i[u]+d[r]*h[u-r-1]+t,i[u--]=c%We|0,t=c/We|0;i[u]=(i[u]+t)%We|0}for(;!i[--o];)i.pop();return t?++n:i.shift(),e.d=i,e.e=tr(i,n),H?k(e,a.precision,a.rounding):e},S.toBinary=function(e,t){return Iu(this,2,e,t)},S.toDecimalPlaces=S.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(xe(e,0,yt),t===void 0?t=r.rounding:xe(t,0,8),k(n,e+n.e+1,t))},S.toExponential=function(e,t){var n,r=this,u=r.constructor;return e===void 0?n=nt(r,!0):(xe(e,0,yt),t===void 0?t=u.rounding:xe(t,0,8),r=k(new u(r),e+1,t),n=nt(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},S.toFixed=function(e,t){var n,r,u=this,i=u.constructor;return e===void 0?n=nt(u):(xe(e,0,yt),t===void 0?t=i.rounding:xe(t,0,8),r=k(new i(u),e+u.e+1,t),n=nt(r,!1,e+r.e+1)),u.isNeg()&&!u.isZero()?"-"+n:n},S.toFraction=function(e){var t,n,r,u,i,o,c,s,l,f,a,h,d=this,p=d.d,D=d.constructor;if(!p)return new D(d);if(l=n=new D(1),r=s=new D(0),t=new D(r),i=t.e=Uo(p)-d.e-1,o=i%U,t.d[0]=pe(10,o<0?U+o:o),e==null)e=i>0?t:l;else{if(c=new D(e),!c.isInt()||c.lt(l))throw Error(Et+c);e=c.gt(t)?i>0?t:l:c}for(H=!1,c=new D(Ee(p)),f=D.precision,D.precision=i=p.length*U*2;a=ne(c,t,0,1,1),u=n.plus(a.times(r)),u.cmp(e)!=1;)n=r,r=u,u=l,l=s.plus(a.times(u)),s=u,u=t,t=c.minus(a.times(u)),c=u;return u=ne(e.minus(n),r,0,1,1),s=s.plus(u.times(l)),n=n.plus(u.times(r)),s.s=l.s=d.s,h=ne(l,r,i,1).minus(d).abs().cmp(ne(s,n,i,1).minus(d).abs())<1?[l,r]:[s,n],D.precision=f,H=!0,h},S.toHexadecimal=S.toHex=function(e,t){return Iu(this,16,e,t)},S.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:xe(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]?(H=!1,n=ne(n,e,0,t,1).times(e),H=!0,k(n)):(e.s=n.s,n=e),n},S.toNumber=function(){return+this},S.toOctal=function(e,t){return Iu(this,8,e,t)},S.toPower=S.pow=function(e){var t,n,r,u,i,o,c=this,s=c.constructor,l=+(e=new s(e));if(!c.d||!e.d||!c.d[0]||!e.d[0])return new s(pe(+c,l));if(c=new s(c),c.eq(1))return c;if(r=s.precision,i=s.rounding,e.eq(1))return k(c,r,i);if(t=we(e.e/U),t>=e.d.length-1&&(n=l<0?-l:l)<=Mp)return u=Ho(s,c,n,r),e.s<0?new s(1).div(u):k(u,r,i);if(o=c.s,o<0){if(t<e.d.length-1)return new s(NaN);if((e.d[t]&1)==0&&(o=1),c.e==0&&c.d[0]==1&&c.d.length==1)return c.s=o,c}return n=pe(+c,l),t=n==0||!isFinite(n)?we(l*(Math.log("0."+Ee(c.d))/Math.LN10+c.e+1)):new s(n+"").e,t>s.maxE+1||t<s.minE-1?new s(t>0?o/0:0):(H=!1,s.rounding=c.s=1,n=Math.min(12,(t+"").length),u=Su(e.times(Ct(c,r+n)),r),u.d&&(u=k(u,r+5,1),vn(u.d,r,i)&&(t=r+10,u=k(Su(e.times(Ct(c,t+n)),t),t+5,1),+Ee(u.d).slice(r+1,r+15)+1==1e14&&(u=k(u,r+1,0)))),u.s=o,H=!0,s.rounding=i,k(u,r,i))},S.toPrecision=function(e,t){var n,r=this,u=r.constructor;return e===void 0?n=nt(r,r.e<=u.toExpNeg||r.e>=u.toExpPos):(xe(e,1,yt),t===void 0?t=u.rounding:xe(t,0,8),r=k(new u(r),e,t),n=nt(r,e<=r.e||r.e<=u.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},S.toSignificantDigits=S.toSD=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(xe(e,1,yt),t===void 0?t=r.rounding:xe(t,0,8)),k(new r(n),e,t)},S.toString=function(){var e=this,t=e.constructor,n=nt(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},S.truncated=S.trunc=function(){return k(new this.constructor(this),this.e+1,1)},S.valueOf=S.toJSON=function(){var e=this,t=e.constructor,n=nt(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};function Ee(e){var t,n,r,u=e.length-1,i="",o=e[0];if(u>0){for(i+=o,t=1;t<u;t++)r=e[t]+"",n=U-r.length,n&&(i+=At(n)),i+=r;o=e[t],r=o+"",n=U-r.length,n&&(i+=At(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}function xe(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Et+e)}function vn(e,t,n,r){var u,i,o,c;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=U,u=0):(u=Math.ceil((t+1)/U),t%=U),i=pe(10,U-t),c=e[u]%i|0,r==null?t<3?(t==0?c=c/100|0:t==1&&(c=c/10|0),o=n<4&&c==99999||n>3&&c==49999||c==5e4||c==0):o=(n<4&&c+1==i||n>3&&c+1==i/2)&&(e[u+1]/i/100|0)==pe(10,t-2)-1||(c==i/2||c==0)&&(e[u+1]/i/100|0)==0:t<4?(t==0?c=c/1e3|0:t==1?c=c/100|0:t==2&&(c=c/10|0),o=(r||n<4)&&c==9999||!r&&n>3&&c==4999):o=((r||n<4)&&c+1==i||!r&&n>3&&c+1==i/2)&&(e[u+1]/i/1e3|0)==pe(10,t-3)-1,o}function er(e,t,n){for(var r,u=[0],i,o=0,c=e.length;o<c;){for(i=u.length;i--;)u[i]*=t;for(u[0]+=bu.indexOf(e.charAt(o++)),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 Np(e,t){var n,r,u;if(t.isZero())return t;r=t.d.length,r<32?(n=Math.ceil(r/3),u=(1/rr(4,n)).toString()):(n=16,u="2.3283064365386962890625e-10"),e.precision+=n,t=zt(e,1,t.times(u),new e(1));for(var i=n;i--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}var ne=function(){function e(r,u,i){var o,c=0,s=r.length;for(r=r.slice();s--;)o=r[s]*u+c,r[s]=o%i|0,c=o/i|0;return c&&r.unshift(c),r}function t(r,u,i,o){var c,s;if(i!=o)s=i>o?1:-1;else for(c=s=0;c<i;c++)if(r[c]!=u[c]){s=r[c]>u[c]?1:-1;break}return s}function n(r,u,i,o){for(var c=0;i--;)r[i]-=c,c=r[i]<u[i]?1:0,r[i]=c*o+r[i]-u[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,u,i,o,c,s){var l,f,a,h,d,p,D,m,g,A,M,w,x,P,L,I,j,G,z,ee,Y=r.constructor,ue=r.s==u.s?1:-1,re=r.d,X=u.d;if(!re||!re[0]||!X||!X[0])return new Y(!r.s||!u.s||(re?X&&re[0]==X[0]:!X)?NaN:re&&re[0]==0||!X?ue*0:ue/0);for(s?(d=1,f=r.e-u.e):(s=We,d=U,f=we(r.e/d)-we(u.e/d)),z=X.length,j=re.length,g=new Y(ue),A=g.d=[],a=0;X[a]==(re[a]||0);a++);if(X[a]>(re[a]||0)&&f--,i==null?(P=i=Y.precision,o=Y.rounding):c?P=i+(r.e-u.e)+1:P=i,P<0)A.push(1),p=!0;else{if(P=P/d+2|0,a=0,z==1){for(h=0,X=X[0],P++;(a<j||h)&&P--;a++)L=h*s+(re[a]||0),A[a]=L/X|0,h=L%X|0;p=h||a<j}else{for(h=s/(X[0]+1)|0,h>1&&(X=e(X,h,s),re=e(re,h,s),z=X.length,j=re.length),I=z,M=re.slice(0,z),w=M.length;w<z;)M[w++]=0;ee=X.slice(),ee.unshift(0),G=X[0],X[1]>=s/2&&++G;do h=0,l=t(X,M,z,w),l<0?(x=M[0],z!=w&&(x=x*s+(M[1]||0)),h=x/G|0,h>1?(h>=s&&(h=s-1),D=e(X,h,s),m=D.length,w=M.length,l=t(D,M,m,w),l==1&&(h--,n(D,z<m?ee:X,m,s))):(h==0&&(l=h=1),D=X.slice()),m=D.length,m<w&&D.unshift(0),n(M,D,w,s),l==-1&&(w=M.length,l=t(X,M,z,w),l<1&&(h++,n(M,z<w?ee:X,w,s))),w=M.length):l===0&&(h++,M=[0]),A[a++]=h,l&&M[0]?M[w++]=re[I]||0:(M=[re[I]],w=1);while((I++<j||M[0]!==void 0)&&P--);p=M[0]!==void 0}A[0]||A.shift()}if(d==1)g.e=f,jo=p;else{for(a=1,h=A[0];h>=10;h/=10)a++;g.e=a+f*d-1,k(g,c?i+g.e+1:i,o,p)}return g}}();function k(e,t,n,r){var u,i,o,c,s,l,f,a,h,d=e.constructor;e:if(t!=null){if(a=e.d,!a)return e;for(u=1,c=a[0];c>=10;c/=10)u++;if(i=t-u,i<0)i+=U,o=t,f=a[h=0],s=f/pe(10,u-o-1)%10|0;else if(h=Math.ceil((i+1)/U),c=a.length,h>=c)if(r){for(;c++<=h;)a.push(0);f=s=0,u=1,i%=U,o=i-U+1}else break e;else{for(f=c=a[h],u=1;c>=10;c/=10)u++;i%=U,o=i-U+u,s=o<0?0:f/pe(10,u-o-1)%10|0}if(r=r||t<0||a[h+1]!==void 0||(o<0?f:f%pe(10,u-o-1)),l=n<4?(s||r)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||r||n==6&&(i>0?o>0?f/pe(10,u-o):0:a[h-1])%10&1||n==(e.s<0?8:7)),t<1||!a[0])return a.length=0,l?(t-=e.e+1,a[0]=pe(10,(U-t%U)%U),e.e=-t||0):a[0]=e.e=0,e;if(i==0?(a.length=h,c=1,h--):(a.length=h+1,c=pe(10,U-i),a[h]=o>0?(f/pe(10,u-o)%pe(10,o)|0)*c:0),l)for(;;)if(h==0){for(i=1,o=a[0];o>=10;o/=10)i++;for(o=a[0]+=c,c=1;o>=10;o/=10)c++;i!=c&&(e.e++,a[0]==We&&(a[0]=1));break}else{if(a[h]+=c,a[h]!=We)break;a[h--]=0,c=1}for(i=a.length;a[--i]===0;)a.pop()}return H&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function nt(e,t,n){if(!e.isFinite())return Zo(e);var r,u=e.e,i=Ee(e.d),o=i.length;return t?(n&&(r=n-o)>0?i=i.charAt(0)+"."+i.slice(1)+At(r):o>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-o)>0&&(i+=At(r))):u>=o?(i+=At(u+1-o),n&&(r=n-u-1)>0&&(i=i+"."+At(r))):((r=u+1)<o&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-o)>0&&(u+1===o&&(i+="."),i+=At(r))),i}function tr(e,t){var n=e[0];for(t*=U;n>=10;n/=10)t++;return t}function nr(e,t,n){if(t>Ip)throw H=!0,n&&(e.precision=n),Error(Lo);return k(new e(Jn),t,1,!0)}function Ze(e,t,n){if(t>_u)throw Error(Lo);return k(new e(Qn),t,n,!0)}function Uo(e){var t=e.length-1,n=t*U+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 Ho(e,t,n,r){var u,i=new e(1),o=Math.ceil(r/U+4);for(H=!1;;){if(n%2&&(i=i.times(t),Xo(i.d,o)&&(u=!0)),n=we(n/2),n===0){n=i.d.length-1,u&&i.d[n]===0&&++i.d[n];break}t=t.times(t),Xo(t.d,o)}return H=!0,i}function zo(e){return e.d[e.d.length-1]&1}function Wo(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 Su(e,t){var n,r,u,i,o,c,s,l=0,f=0,a=0,h=e.constructor,d=h.rounding,p=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?(H=!1,s=p):s=t,c=new h(.03125);e.e>-2;)e=e.times(c),a+=5;for(r=Math.log(pe(2,a))/Math.LN10*2+5|0,s+=r,n=i=o=new h(1),h.precision=s;;){if(i=k(i.times(e),s,1),n=n.times(++f),c=o.plus(ne(i,n,s,1)),Ee(c.d).slice(0,s)===Ee(o.d).slice(0,s)){for(u=a;u--;)o=k(o.times(o),s,1);if(t==null)if(l<3&&vn(o.d,s-r,d,l))h.precision=s+=10,n=i=c=new h(1),f=0,l++;else return k(o,h.precision=p,d,H=!0);else return h.precision=p,o}o=c}}function Ct(e,t){var n,r,u,i,o,c,s,l,f,a,h,d=1,p=10,D=e,m=D.d,g=D.constructor,A=g.rounding,M=g.precision;if(D.s<0||!m||!m[0]||!D.e&&m[0]==1&&m.length==1)return new g(m&&!m[0]?-1/0:D.s!=1?NaN:m?0:D);if(t==null?(H=!1,f=M):f=t,g.precision=f+=p,n=Ee(m),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=Ee(D.d),r=n.charAt(0),d++;i=D.e,r>1?(D=new g("0."+n),i++):D=new g(r+"."+n.slice(1))}else return l=nr(g,f+2,M).times(i+""),D=Ct(new g(r+"."+n.slice(1)),f-p).plus(l),g.precision=M,t==null?k(D,M,A,H=!0):D;for(a=D,s=o=D=ne(D.minus(1),D.plus(1),f,1),h=k(D.times(D),f,1),u=3;;){if(o=k(o.times(h),f,1),l=s.plus(ne(o,new g(u),f,1)),Ee(l.d).slice(0,f)===Ee(s.d).slice(0,f))if(s=s.times(2),i!==0&&(s=s.plus(nr(g,f+2,M).times(i+""))),s=ne(s,new g(d),f,1),t==null)if(vn(s.d,f-p,A,c))g.precision=f+=p,l=o=D=ne(a.minus(1),a.plus(1),f,1),h=k(D.times(D),f,1),u=c=1;else return k(s,g.precision=M,A,H=!0);else return g.precision=M,s;s=l,u+=2}}function Zo(e){return String(e.s*e.s/0)}function Mu(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)%U,n<0&&(r+=U),r<u){for(r&&e.d.push(+t.slice(0,r)),u-=U;r<u;)e.d.push(+t.slice(r,r+=U));t=t.slice(r),r=U-t.length}else r-=u;for(;r--;)t+="0";e.d.push(+t),H&&(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 xp(e,t){var n,r,u,i,o,c,s,l,f;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Vo.test(t))return Mu(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(_p.test(t))n=16,t=t.toLowerCase();else if(Bp.test(t))n=2;else if(Sp.test(t))n=8;else throw Error(Et+t);for(i=t.search(/p/i),i>0?(s=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),o=i>=0,r=e.constructor,o&&(t=t.replace(".",""),c=t.length,i=c-i,u=Ho(r,new r(n),i,i*2)),l=er(t,n,We),f=l.length-1,i=f;l[i]===0;--i)l.pop();return i<0?new r(e.s*0):(e.e=tr(l,f),e.d=l,H=!1,o&&(e=ne(e,u,c*4)),s&&(e=e.times(Math.abs(s)<54?pe(2,s):Wt.pow(2,s))),H=!0,e)}function Op(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:zt(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:n|0,t=t.times(1/rr(5,n)),t=zt(e,2,t,t);for(var u,i=new e(5),o=new e(16),c=new e(20);n--;)u=t.times(t),t=t.times(i.plus(u.times(o.times(u).minus(c))));return t}function zt(e,t,n,r,u){var i,o,c,s,l=e.precision,f=Math.ceil(l/U);for(H=!1,s=n.times(n),c=new e(r);;){if(o=ne(c.times(s),new e(t++*t++),l,1),c=u?r.plus(o):r.minus(o),r=ne(o.times(s),new e(t++*t++),l,1),o=c.plus(r),o.d[f]!==void 0){for(i=f;o.d[i]===c.d[i]&&i--;);if(i==-1)break}i=c,c=r,r=o,o=i}return H=!0,o.d.length=f+1,o}function rr(e,t){for(var n=e;--t;)n*=e;return n}function Go(e,t){var n,r=t.s<0,u=Ze(e,e.precision,1),i=u.times(.5);if(t=t.abs(),t.lte(i))return st=r?4:1,t;if(n=t.divToInt(u),n.isZero())st=r?3:2;else{if(t=t.minus(n.times(u)),t.lte(i))return st=zo(n)?r?2:3:r?4:1,t;st=zo(n)?r?1:4:r?3:2}return t.minus(u).abs()}function Iu(e,t,n,r){var u,i,o,c,s,l,f,a,h,d=e.constructor,p=n!==void 0;if(p?(xe(n,1,yt),r===void 0?r=d.rounding:xe(r,0,8)):(n=d.precision,r=d.rounding),!e.isFinite())f=Zo(e);else{for(f=nt(e),o=f.indexOf("."),p?(u=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):u=t,o>=0&&(f=f.replace(".",""),h=new d(1),h.e=f.length-o,h.d=er(nt(h),10,u),h.e=h.d.length),a=er(f,10,u),i=s=a.length;a[--s]==0;)a.pop();if(!a[0])f=p?"0p+0":"0";else{if(o<0?i--:(e=new d(e),e.d=a,e.e=i,e=ne(e,h,n,r,0,u),a=e.d,i=e.e,l=jo),o=a[n],c=u/2,l=l||a[n+1]!==void 0,l=r<4?(o!==void 0||l)&&(r===0||r===(e.s<0?3:2)):o>c||o===c&&(r===4||l||r===6&&a[n-1]&1||r===(e.s<0?8:7)),a.length=n,l)for(;++a[--n]>u-1;)a[n]=0,n||(++i,a.unshift(1));for(s=a.length;!a[s-1];--s);for(o=0,f="";o<s;o++)f+=bu.charAt(a[o]);if(p){if(s>1)if(t==16||t==8){for(o=t==16?4:3,--s;s%o;s++)f+="0";for(a=er(f,u,t),s=a.length;!a[s-1];--s);for(o=1,f="1.";o<s;o++)f+=bu.charAt(a[o])}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>s)for(i-=s;i--;)f+="0";else i<s&&(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 Xo(e,t){if(e.length>t)return e.length=t,!0}function Rp(e){return new this(e).abs()}function Tp(e){return new this(e).acos()}function Pp(e){return new this(e).acosh()}function $p(e,t){return new this(e).plus(t)}function jp(e){return new this(e).asin()}function Lp(e){return new this(e).asinh()}function qp(e){return new this(e).atan()}function kp(e){return new this(e).atanh()}function Vp(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=Ze(this,i,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?Ze(this,r,u):new this(0),n.s=e.s):!e.d||t.isZero()?(n=Ze(this,i,1).times(.5),n.s=e.s):t.s<0?(this.precision=i,this.rounding=1,n=this.atan(ne(e,t,i,1)),t=Ze(this,i,1),this.precision=r,this.rounding=u,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(ne(e,t,i,1)),n}function Up(e){return new this(e).cbrt()}function Hp(e){return k(e=new this(e),e.e+1,2)}function zp(e,t,n){return new this(e).clamp(t,n)}function Wp(e){if(!e||typeof e!="object")throw Error(Yn+"Object expected");var t,n,r,u=e.defaults===!0,i=["precision",1,yt,"rounding",0,8,"toExpNeg",-Ht,0,"toExpPos",0,Ht,"maxE",0,Ht,"minE",-Ht,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(n=i[t],u&&(this[n]=Bu[n]),(r=e[n])!==void 0)if(we(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Et+n+": "+r);if(n="crypto",u&&(this[n]=Bu[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(qo);else this[n]=!1;else throw Error(Et+n+": "+r);return this}function Zp(e){return new this(e).cos()}function Gp(e){return new this(e).cosh()}function Ko(e){var t,n,r;function u(i){var o,c,s,l=this;if(!(l instanceof u))return new u(i);if(l.constructor=u,Jo(i)){l.s=i.s,H?!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(s=typeof i,s==="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(o=0,c=i;c>=10;c/=10)o++;H?o>u.maxE?(l.e=NaN,l.d=null):o<u.minE?(l.e=0,l.d=[0]):(l.e=o,l.d=[i]):(l.e=o,l.d=[i]);return}else if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return Mu(l,i.toString())}else if(s!=="string")throw Error(Et+i);return(c=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(c===43&&(i=i.slice(1)),l.s=1),Vo.test(i)?Mu(l,i):xp(l,i)}if(u.prototype=S,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=Wp,u.clone=Ko,u.isDecimal=Jo,u.abs=Rp,u.acos=Tp,u.acosh=Pp,u.add=$p,u.asin=jp,u.asinh=Lp,u.atan=qp,u.atanh=kp,u.atan2=Vp,u.cbrt=Up,u.ceil=Hp,u.clamp=zp,u.cos=Zp,u.cosh=Gp,u.div=Xp,u.exp=Kp,u.floor=Jp,u.hypot=Qp,u.ln=Yp,u.log=e1,u.log10=n1,u.log2=t1,u.max=r1,u.min=u1,u.mod=i1,u.mul=o1,u.pow=a1,u.random=s1,u.round=c1,u.sign=f1,u.sin=l1,u.sinh=h1,u.sqrt=d1,u.sub=p1,u.sum=D1,u.tan=g1,u.tanh=v1,u.trunc=m1,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 Xp(e,t){return new this(e).div(t)}function Kp(e){return new this(e).exp()}function Jp(e){return k(e=new this(e),e.e+1,3)}function Qp(){var e,t,n=new this(0);for(H=!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 H=!0,new this(1/0);n=t}return H=!0,n.sqrt()}function Jo(e){return e instanceof Wt||e&&e.toStringTag===ko||!1}function Yp(e){return new this(e).ln()}function e1(e,t){return new this(e).log(t)}function t1(e){return new this(e).log(2)}function n1(e){return new this(e).log(10)}function r1(){return Wo(this,arguments,"lt")}function u1(){return Wo(this,arguments,"gt")}function i1(e,t){return new this(e).mod(t)}function o1(e,t){return new this(e).mul(t)}function a1(e,t){return new this(e).pow(t)}function s1(e){var t,n,r,u,i=0,o=new this(1),c=[];if(e===void 0?e=this.precision:xe(e,1,yt),r=Math.ceil(e/U),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]:c[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):(c.push(u%1e7),i+=4);i=r/4}else throw Error(qo);else for(;i<r;)c[i++]=Math.random()*1e7|0;for(r=c[--i],e%=U,r&&e&&(u=pe(10,U-e),c[i]=(r/u|0)*u);c[i]===0;i--)c.pop();if(i<0)n=0,c=[0];else{for(n=-1;c[0]===0;n-=U)c.shift();for(r=1,u=c[0];u>=10;u/=10)r++;r<U&&(n-=U-r)}return o.e=n,o.d=c,o}function c1(e){return k(e=new this(e),e.e+1,this.rounding)}function f1(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function l1(e){return new this(e).sin()}function h1(e){return new this(e).sinh()}function d1(e){return new this(e).sqrt()}function p1(e,t){return new this(e).sub(t)}function D1(){var e=0,t=arguments,n=new this(t[e]);for(H=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return H=!0,k(n,this.precision,this.rounding)}function g1(e){return new this(e).tan()}function v1(e){return new this(e).tanh()}function m1(e){return k(e=new this(e),e.e+1,1)}S[Symbol.for("nodejs.util.inspect.custom")]=S.toString,S[Symbol.toStringTag]="Decimal";var Wt=S.constructor=Ko(Bu);Jn=new Wt(Jn),Qn=new Wt(Qn);var y1="BigNumber",E1=["?on","config"],A1=Ne(y1,E1,e=>{var{on:t,config:n}=e,r=Wt.clone({precision:n.precision,modulo:Wt.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}),Qo={exports:{}};/**
|
|
16
|
+
*/var Ht=9e15,yt=1e9,bu="0123456789abcdef",Qn="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Yn="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Bu={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Ht,maxE:Ht,crypto:!1},qo,ct,H=!0,er="[DecimalError] ",Et=er+"Invalid argument: ",ko=er+"Precision limit exceeded",Vo=er+"crypto unavailable",Uo="[object Decimal]",we=Math.floor,pe=Math.pow,Mp=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Np=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,xp=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,Ho=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,We=1e7,U=7,Op=9007199254740991,Rp=Qn.length-1,_u=Yn.length-1,S={toStringTag:Uo};S.absoluteValue=S.abs=function(){var e=new this.constructor(this);return e.s<0&&(e.s=1),k(e)},S.ceil=function(){return k(new this.constructor(this),this.e+1,2)},S.clampedTo=S.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(Et+t);return n=r.cmp(e),n<0?e:r.cmp(t)>0?t:new u(r)},S.comparedTo=S.cmp=function(e){var t,n,r,u,i=this,o=i.d,c=(e=new i.constructor(e)).d,s=i.s,l=e.s;if(!o||!c)return!s||!l?NaN:s!==l?s:o===c?0:!o^s<0?1:-1;if(!o[0]||!c[0])return o[0]?s:c[0]?-l:0;if(s!==l)return s;if(i.e!==e.e)return i.e>e.e^s<0?1:-1;for(r=o.length,u=c.length,t=0,n=r<u?r:u;t<n;++t)if(o[t]!==c[t])return o[t]>c[t]^s<0?1:-1;return r===u?0:r>u^s<0?1:-1},S.cosine=S.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())+U,r.rounding=1,n=Tp(r,Ko(r,n)),r.precision=e,r.rounding=t,k(ct==2||ct==3?n.neg():n,e,t,!0)):new r(1):new r(NaN)},S.cubeRoot=S.cbrt=function(){var e,t,n,r,u,i,o,c,s,l,f=this,a=f.constructor;if(!f.isFinite()||f.isZero())return new a(f);for(H=!1,i=f.s*pe(f.s*f,1/3),!i||Math.abs(i)==1/0?(n=Ee(f.d),e=f.e,(i=(e-n.length+1)%3)&&(n+=i==1||i==-2?"0":"00"),i=pe(n,1/3),e=we((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 a(n),r.s=f.s):r=new a(i.toString()),o=(e=a.precision)+3;;)if(c=r,s=c.times(c).times(c),l=s.plus(f),r=ne(l.plus(f).times(c),l.plus(s),o+2,1),Ee(c.d).slice(0,o)===(n=Ee(r.d)).slice(0,o))if(n=n.slice(o-3,o+1),n=="9999"||!u&&n=="4999"){if(!u&&(k(c,e+1,0),c.times(c).times(c).eq(f))){r=c;break}o+=4,u=1}else{(!+n||!+n.slice(1)&&n.charAt(0)=="5")&&(k(r,e+1,1),t=!r.times(r).times(r).eq(f));break}return H=!0,k(r,e,a.rounding,t)},S.decimalPlaces=S.dp=function(){var e,t=this.d,n=NaN;if(t){if(e=t.length-1,n=(e-we(this.e/U))*U,e=t[e],e)for(;e%10==0;e/=10)n--;n<0&&(n=0)}return n},S.dividedBy=S.div=function(e){return ne(this,new this.constructor(e))},S.dividedToIntegerBy=S.divToInt=function(e){var t=this,n=t.constructor;return k(ne(t,new n(e),0,1,1),n.precision,n.rounding)},S.equals=S.eq=function(e){return this.cmp(e)===0},S.floor=function(){return k(new this.constructor(this),this.e+1,3)},S.greaterThan=S.gt=function(e){return this.cmp(e)>0},S.greaterThanOrEqualTo=S.gte=function(e){var t=this.cmp(e);return t==1||t===0},S.hyperbolicCosine=S.cosh=function(){var e,t,n,r,u,i=this,o=i.constructor,c=new o(1);if(!i.isFinite())return new o(i.s?1/0:NaN);if(i.isZero())return c;n=o.precision,r=o.rounding,o.precision=n+Math.max(i.e,i.sd())+4,o.rounding=1,u=i.d.length,u<32?(e=Math.ceil(u/3),t=(1/ur(4,e)).toString()):(e=16,t="2.3283064365386962890625e-10"),i=zt(o,1,i.times(t),new o(1),!0);for(var s,l=e,f=new o(8);l--;)s=i.times(i),i=c.minus(s.times(f.minus(s.times(f))));return k(i,o.precision=n,o.rounding=r,!0)},S.hyperbolicSine=S.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=zt(i,2,u,u,!0);else{e=1.4*Math.sqrt(r),e=e>16?16:e|0,u=u.times(1/ur(5,e)),u=zt(i,2,u,u,!0);for(var o,c=new i(5),s=new i(16),l=new i(20);e--;)o=u.times(u),u=u.times(c.plus(o.times(s.times(o).plus(l))))}return i.precision=t,i.rounding=n,k(u,t,n,!0)},S.hyperbolicTangent=S.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,ne(n.sinh(),n.cosh(),r.precision=e,r.rounding=t)):new r(n.s)},S.inverseCosine=S.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()?Ze(n,u,i):new n(0):new n(NaN):t.isZero()?Ze(n,u+4,i).times(.5):(n.precision=u+6,n.rounding=1,t=t.asin(),e=Ze(n,u+4,i).times(.5),n.precision=u,n.rounding=i,e.minus(t))},S.inverseHyperbolicCosine=S.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,H=!1,n=n.times(n).minus(1).sqrt().plus(n),H=!0,r.precision=e,r.rounding=t,n.ln()):new r(n)},S.inverseHyperbolicSine=S.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,H=!1,n=n.times(n).plus(1).sqrt().plus(n),H=!0,r.precision=e,r.rounding=t,n.ln())},S.inverseHyperbolicTangent=S.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?k(new i(u),e,t,!0):(i.precision=n=r-u.e,u=ne(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)},S.inverseSine=S.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=Ze(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)))},S.inverseTangent=S.atan=function(){var e,t,n,r,u,i,o,c,s,l=this,f=l.constructor,a=f.precision,h=f.rounding;if(l.isFinite()){if(l.isZero())return new f(l);if(l.abs().eq(1)&&a+4<=_u)return o=Ze(f,a+4,h).times(.25),o.s=l.s,o}else{if(!l.s)return new f(NaN);if(a+4<=_u)return o=Ze(f,a+4,h).times(.5),o.s=l.s,o}for(f.precision=c=a+10,f.rounding=1,n=Math.min(28,c/U+2|0),e=n;e;--e)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(H=!1,t=Math.ceil(c/U),r=1,s=l.times(l),o=new f(l),u=l;e!==-1;)if(u=u.times(s),i=o.minus(u.div(r+=2)),u=u.times(s),o=i.plus(u.div(r+=2)),o.d[t]!==void 0)for(e=t;o.d[e]===i.d[e]&&e--;);return n&&(o=o.times(2<<n-1)),H=!0,k(o,f.precision=a,f.rounding=h,!0)},S.isFinite=function(){return!!this.d},S.isInteger=S.isInt=function(){return!!this.d&&we(this.e/U)>this.d.length-2},S.isNaN=function(){return!this.s},S.isNegative=S.isNeg=function(){return this.s<0},S.isPositive=S.isPos=function(){return this.s>0},S.isZero=function(){return!!this.d&&this.d[0]===0},S.lessThan=S.lt=function(e){return this.cmp(e)<0},S.lessThanOrEqualTo=S.lte=function(e){return this.cmp(e)<1},S.logarithm=S.log=function(e){var t,n,r,u,i,o,c,s,l=this,f=l.constructor,a=f.precision,h=f.rounding,d=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(H=!1,c=a+d,o=Ct(l,c),r=t?rr(f,c+10):Ct(e,c),s=ne(o,r,c,1),mn(s.d,u=a,h))do if(c+=10,o=Ct(l,c),r=t?rr(f,c+10):Ct(e,c),s=ne(o,r,c,1),!i){+Ee(s.d).slice(u+1,u+15)+1==1e14&&(s=k(s,a+1,0));break}while(mn(s.d,u+=10,h));return H=!0,k(s,a,h)},S.minus=S.sub=function(e){var t,n,r,u,i,o,c,s,l,f,a,h,d=this,p=d.constructor;if(e=new p(e),!d.d||!e.d)return!d.s||!e.s?e=new p(NaN):d.d?e.s=-e.s:e=new p(e.d||d.s!==e.s?d:NaN),e;if(d.s!=e.s)return e.s=-e.s,d.plus(e);if(l=d.d,h=e.d,c=p.precision,s=p.rounding,!l[0]||!h[0]){if(h[0])e.s=-e.s;else if(l[0])e=new p(d);else return new p(s===3?-0:0);return H?k(e,c,s):e}if(n=we(e.e/U),f=we(d.e/U),l=l.slice(),i=f-n,i){for(a=i<0,a?(t=l,i=-i,o=h.length):(t=h,n=f,o=l.length),r=Math.max(Math.ceil(c/U),o)+2,i>r&&(i=r,t.length=1),t.reverse(),r=i;r--;)t.push(0);t.reverse()}else{for(r=l.length,o=h.length,a=r<o,a&&(o=r),r=0;r<o;r++)if(l[r]!=h[r]){a=l[r]<h[r];break}i=0}for(a&&(t=l,l=h,h=t,e.s=-e.s),o=l.length,r=h.length-o;r>0;--r)l[o++]=0;for(r=h.length;r>i;){if(l[--r]<h[r]){for(u=r;u&&l[--u]===0;)l[u]=We-1;--l[u],l[r]+=We}l[r]-=h[r]}for(;l[--o]===0;)l.pop();for(;l[0]===0;l.shift())--n;return l[0]?(e.d=l,e.e=nr(l,n),H?k(e,c,s):e):new p(s===3?-0:0)},S.modulo=S.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]?k(new r(n),r.precision,r.rounding):(H=!1,r.modulo==9?(t=ne(n,e.abs(),0,3,1),t.s*=e.s):t=ne(n,e,0,r.modulo,1),t=t.times(e),H=!0,n.minus(t))},S.naturalExponential=S.exp=function(){return Su(this)},S.naturalLogarithm=S.ln=function(){return Ct(this)},S.negated=S.neg=function(){var e=new this.constructor(this);return e.s=-e.s,k(e)},S.plus=S.add=function(e){var t,n,r,u,i,o,c,s,l,f,a=this,h=a.constructor;if(e=new h(e),!a.d||!e.d)return!a.s||!e.s?e=new h(NaN):a.d||(e=new h(e.d||a.s===e.s?a:NaN)),e;if(a.s!=e.s)return e.s=-e.s,a.minus(e);if(l=a.d,f=e.d,c=h.precision,s=h.rounding,!l[0]||!f[0])return f[0]||(e=new h(a)),H?k(e,c,s):e;if(i=we(a.e/U),r=we(e.e/U),l=l.slice(),u=i-r,u){for(u<0?(n=l,u=-u,o=f.length):(n=f,r=i,o=l.length),i=Math.ceil(c/U),o=i>o?i+1:o+1,u>o&&(u=o,n.length=1),n.reverse();u--;)n.push(0);n.reverse()}for(o=l.length,u=f.length,o-u<0&&(u=o,n=f,f=l,l=n),t=0;u;)t=(l[--u]=l[u]+f[u]+t)/We|0,l[u]%=We;for(t&&(l.unshift(t),++r),o=l.length;l[--o]==0;)l.pop();return e.d=l,e.e=nr(l,r),H?k(e,c,s):e},S.precision=S.sd=function(e){var t,n=this;if(e!==void 0&&e!==!!e&&e!==1&&e!==0)throw Error(Et+e);return n.d?(t=zo(n.d),e&&n.e+1>t&&(t=n.e+1)):t=NaN,t},S.round=function(){var e=this,t=e.constructor;return k(new t(e),e.e+1,t.rounding)},S.sine=S.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())+U,r.rounding=1,n=$p(r,Ko(r,n)),r.precision=e,r.rounding=t,k(ct>2?n.neg():n,e,t,!0)):new r(NaN)},S.squareRoot=S.sqrt=function(){var e,t,n,r,u,i,o=this,c=o.d,s=o.e,l=o.s,f=o.constructor;if(l!==1||!c||!c[0])return new f(!l||l<0&&(!c||c[0])?NaN:c?o:1/0);for(H=!1,l=Math.sqrt(+o),l==0||l==1/0?(t=Ee(c),(t.length+s)%2==0&&(t+="0"),l=Math.sqrt(t),s=we((s+1)/2)-(s<0||s%2),l==1/0?t="5e"+s:(t=l.toExponential(),t=t.slice(0,t.indexOf("e")+1)+s),r=new f(t)):r=new f(l.toString()),n=(s=f.precision)+3;;)if(i=r,r=i.plus(ne(o,i,n+2,1)).times(.5),Ee(i.d).slice(0,n)===(t=Ee(r.d)).slice(0,n))if(t=t.slice(n-3,n+1),t=="9999"||!u&&t=="4999"){if(!u&&(k(i,s+1,0),i.times(i).eq(o))){r=i;break}n+=4,u=1}else{(!+t||!+t.slice(1)&&t.charAt(0)=="5")&&(k(r,s+1,1),e=!r.times(r).eq(o));break}return H=!0,k(r,s,f.rounding,e)},S.tangent=S.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=ne(n,new r(1).minus(n.times(n)).sqrt(),e+10,0),r.precision=e,r.rounding=t,k(ct==2||ct==4?n.neg():n,e,t,!0)):new r(NaN)},S.times=S.mul=function(e){var t,n,r,u,i,o,c,s,l,f=this,a=f.constructor,h=f.d,d=(e=new a(e)).d;if(e.s*=f.s,!h||!h[0]||!d||!d[0])return new a(!e.s||h&&!h[0]&&!d||d&&!d[0]&&!h?NaN:!h||!d?e.s/0:e.s*0);for(n=we(f.e/U)+we(e.e/U),s=h.length,l=d.length,s<l&&(i=h,h=d,d=i,o=s,s=l,l=o),i=[],o=s+l,r=o;r--;)i.push(0);for(r=l;--r>=0;){for(t=0,u=s+r;u>r;)c=i[u]+d[r]*h[u-r-1]+t,i[u--]=c%We|0,t=c/We|0;i[u]=(i[u]+t)%We|0}for(;!i[--o];)i.pop();return t?++n:i.shift(),e.d=i,e.e=nr(i,n),H?k(e,a.precision,a.rounding):e},S.toBinary=function(e,t){return Mu(this,2,e,t)},S.toDecimalPlaces=S.toDP=function(e,t){var n=this,r=n.constructor;return n=new r(n),e===void 0?n:(xe(e,0,yt),t===void 0?t=r.rounding:xe(t,0,8),k(n,e+n.e+1,t))},S.toExponential=function(e,t){var n,r=this,u=r.constructor;return e===void 0?n=rt(r,!0):(xe(e,0,yt),t===void 0?t=u.rounding:xe(t,0,8),r=k(new u(r),e+1,t),n=rt(r,!0,e+1)),r.isNeg()&&!r.isZero()?"-"+n:n},S.toFixed=function(e,t){var n,r,u=this,i=u.constructor;return e===void 0?n=rt(u):(xe(e,0,yt),t===void 0?t=i.rounding:xe(t,0,8),r=k(new i(u),e+u.e+1,t),n=rt(r,!1,e+r.e+1)),u.isNeg()&&!u.isZero()?"-"+n:n},S.toFraction=function(e){var t,n,r,u,i,o,c,s,l,f,a,h,d=this,p=d.d,D=d.constructor;if(!p)return new D(d);if(l=n=new D(1),r=s=new D(0),t=new D(r),i=t.e=zo(p)-d.e-1,o=i%U,t.d[0]=pe(10,o<0?U+o:o),e==null)e=i>0?t:l;else{if(c=new D(e),!c.isInt()||c.lt(l))throw Error(Et+c);e=c.gt(t)?i>0?t:l:c}for(H=!1,c=new D(Ee(p)),f=D.precision,D.precision=i=p.length*U*2;a=ne(c,t,0,1,1),u=n.plus(a.times(r)),u.cmp(e)!=1;)n=r,r=u,u=l,l=s.plus(a.times(u)),s=u,u=t,t=c.minus(a.times(u)),c=u;return u=ne(e.minus(n),r,0,1,1),s=s.plus(u.times(l)),n=n.plus(u.times(r)),s.s=l.s=d.s,h=ne(l,r,i,1).minus(d).abs().cmp(ne(s,n,i,1).minus(d).abs())<1?[l,r]:[s,n],D.precision=f,H=!0,h},S.toHexadecimal=S.toHex=function(e,t){return Mu(this,16,e,t)},S.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:xe(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]?(H=!1,n=ne(n,e,0,t,1).times(e),H=!0,k(n)):(e.s=n.s,n=e),n},S.toNumber=function(){return+this},S.toOctal=function(e,t){return Mu(this,8,e,t)},S.toPower=S.pow=function(e){var t,n,r,u,i,o,c=this,s=c.constructor,l=+(e=new s(e));if(!c.d||!e.d||!c.d[0]||!e.d[0])return new s(pe(+c,l));if(c=new s(c),c.eq(1))return c;if(r=s.precision,i=s.rounding,e.eq(1))return k(c,r,i);if(t=we(e.e/U),t>=e.d.length-1&&(n=l<0?-l:l)<=Op)return u=Wo(s,c,n,r),e.s<0?new s(1).div(u):k(u,r,i);if(o=c.s,o<0){if(t<e.d.length-1)return new s(NaN);if((e.d[t]&1)==0&&(o=1),c.e==0&&c.d[0]==1&&c.d.length==1)return c.s=o,c}return n=pe(+c,l),t=n==0||!isFinite(n)?we(l*(Math.log("0."+Ee(c.d))/Math.LN10+c.e+1)):new s(n+"").e,t>s.maxE+1||t<s.minE-1?new s(t>0?o/0:0):(H=!1,s.rounding=c.s=1,n=Math.min(12,(t+"").length),u=Su(e.times(Ct(c,r+n)),r),u.d&&(u=k(u,r+5,1),mn(u.d,r,i)&&(t=r+10,u=k(Su(e.times(Ct(c,t+n)),t),t+5,1),+Ee(u.d).slice(r+1,r+15)+1==1e14&&(u=k(u,r+1,0)))),u.s=o,H=!0,s.rounding=i,k(u,r,i))},S.toPrecision=function(e,t){var n,r=this,u=r.constructor;return e===void 0?n=rt(r,r.e<=u.toExpNeg||r.e>=u.toExpPos):(xe(e,1,yt),t===void 0?t=u.rounding:xe(t,0,8),r=k(new u(r),e,t),n=rt(r,e<=r.e||r.e<=u.toExpNeg,e)),r.isNeg()&&!r.isZero()?"-"+n:n},S.toSignificantDigits=S.toSD=function(e,t){var n=this,r=n.constructor;return e===void 0?(e=r.precision,t=r.rounding):(xe(e,1,yt),t===void 0?t=r.rounding:xe(t,0,8)),k(new r(n),e,t)},S.toString=function(){var e=this,t=e.constructor,n=rt(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()&&!e.isZero()?"-"+n:n},S.truncated=S.trunc=function(){return k(new this.constructor(this),this.e+1,1)},S.valueOf=S.toJSON=function(){var e=this,t=e.constructor,n=rt(e,e.e<=t.toExpNeg||e.e>=t.toExpPos);return e.isNeg()?"-"+n:n};function Ee(e){var t,n,r,u=e.length-1,i="",o=e[0];if(u>0){for(i+=o,t=1;t<u;t++)r=e[t]+"",n=U-r.length,n&&(i+=At(n)),i+=r;o=e[t],r=o+"",n=U-r.length,n&&(i+=At(n))}else if(o===0)return"0";for(;o%10===0;)o/=10;return i+o}function xe(e,t,n){if(e!==~~e||e<t||e>n)throw Error(Et+e)}function mn(e,t,n,r){var u,i,o,c;for(i=e[0];i>=10;i/=10)--t;return--t<0?(t+=U,u=0):(u=Math.ceil((t+1)/U),t%=U),i=pe(10,U-t),c=e[u]%i|0,r==null?t<3?(t==0?c=c/100|0:t==1&&(c=c/10|0),o=n<4&&c==99999||n>3&&c==49999||c==5e4||c==0):o=(n<4&&c+1==i||n>3&&c+1==i/2)&&(e[u+1]/i/100|0)==pe(10,t-2)-1||(c==i/2||c==0)&&(e[u+1]/i/100|0)==0:t<4?(t==0?c=c/1e3|0:t==1?c=c/100|0:t==2&&(c=c/10|0),o=(r||n<4)&&c==9999||!r&&n>3&&c==4999):o=((r||n<4)&&c+1==i||!r&&n>3&&c+1==i/2)&&(e[u+1]/i/1e3|0)==pe(10,t-3)-1,o}function tr(e,t,n){for(var r,u=[0],i,o=0,c=e.length;o<c;){for(i=u.length;i--;)u[i]*=t;for(u[0]+=bu.indexOf(e.charAt(o++)),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 Tp(e,t){var n,r,u;if(t.isZero())return t;r=t.d.length,r<32?(n=Math.ceil(r/3),u=(1/ur(4,n)).toString()):(n=16,u="2.3283064365386962890625e-10"),e.precision+=n,t=zt(e,1,t.times(u),new e(1));for(var i=n;i--;){var o=t.times(t);t=o.times(o).minus(o).times(8).plus(1)}return e.precision-=n,t}var ne=function(){function e(r,u,i){var o,c=0,s=r.length;for(r=r.slice();s--;)o=r[s]*u+c,r[s]=o%i|0,c=o/i|0;return c&&r.unshift(c),r}function t(r,u,i,o){var c,s;if(i!=o)s=i>o?1:-1;else for(c=s=0;c<i;c++)if(r[c]!=u[c]){s=r[c]>u[c]?1:-1;break}return s}function n(r,u,i,o){for(var c=0;i--;)r[i]-=c,c=r[i]<u[i]?1:0,r[i]=c*o+r[i]-u[i];for(;!r[0]&&r.length>1;)r.shift()}return function(r,u,i,o,c,s){var l,f,a,h,d,p,D,m,g,A,I,w,x,P,L,M,j,G,z,ee,Y=r.constructor,ue=r.s==u.s?1:-1,re=r.d,X=u.d;if(!re||!re[0]||!X||!X[0])return new Y(!r.s||!u.s||(re?X&&re[0]==X[0]:!X)?NaN:re&&re[0]==0||!X?ue*0:ue/0);for(s?(d=1,f=r.e-u.e):(s=We,d=U,f=we(r.e/d)-we(u.e/d)),z=X.length,j=re.length,g=new Y(ue),A=g.d=[],a=0;X[a]==(re[a]||0);a++);if(X[a]>(re[a]||0)&&f--,i==null?(P=i=Y.precision,o=Y.rounding):c?P=i+(r.e-u.e)+1:P=i,P<0)A.push(1),p=!0;else{if(P=P/d+2|0,a=0,z==1){for(h=0,X=X[0],P++;(a<j||h)&&P--;a++)L=h*s+(re[a]||0),A[a]=L/X|0,h=L%X|0;p=h||a<j}else{for(h=s/(X[0]+1)|0,h>1&&(X=e(X,h,s),re=e(re,h,s),z=X.length,j=re.length),M=z,I=re.slice(0,z),w=I.length;w<z;)I[w++]=0;ee=X.slice(),ee.unshift(0),G=X[0],X[1]>=s/2&&++G;do h=0,l=t(X,I,z,w),l<0?(x=I[0],z!=w&&(x=x*s+(I[1]||0)),h=x/G|0,h>1?(h>=s&&(h=s-1),D=e(X,h,s),m=D.length,w=I.length,l=t(D,I,m,w),l==1&&(h--,n(D,z<m?ee:X,m,s))):(h==0&&(l=h=1),D=X.slice()),m=D.length,m<w&&D.unshift(0),n(I,D,w,s),l==-1&&(w=I.length,l=t(X,I,z,w),l<1&&(h++,n(I,z<w?ee:X,w,s))),w=I.length):l===0&&(h++,I=[0]),A[a++]=h,l&&I[0]?I[w++]=re[M]||0:(I=[re[M]],w=1);while((M++<j||I[0]!==void 0)&&P--);p=I[0]!==void 0}A[0]||A.shift()}if(d==1)g.e=f,qo=p;else{for(a=1,h=A[0];h>=10;h/=10)a++;g.e=a+f*d-1,k(g,c?i+g.e+1:i,o,p)}return g}}();function k(e,t,n,r){var u,i,o,c,s,l,f,a,h,d=e.constructor;e:if(t!=null){if(a=e.d,!a)return e;for(u=1,c=a[0];c>=10;c/=10)u++;if(i=t-u,i<0)i+=U,o=t,f=a[h=0],s=f/pe(10,u-o-1)%10|0;else if(h=Math.ceil((i+1)/U),c=a.length,h>=c)if(r){for(;c++<=h;)a.push(0);f=s=0,u=1,i%=U,o=i-U+1}else break e;else{for(f=c=a[h],u=1;c>=10;c/=10)u++;i%=U,o=i-U+u,s=o<0?0:f/pe(10,u-o-1)%10|0}if(r=r||t<0||a[h+1]!==void 0||(o<0?f:f%pe(10,u-o-1)),l=n<4?(s||r)&&(n==0||n==(e.s<0?3:2)):s>5||s==5&&(n==4||r||n==6&&(i>0?o>0?f/pe(10,u-o):0:a[h-1])%10&1||n==(e.s<0?8:7)),t<1||!a[0])return a.length=0,l?(t-=e.e+1,a[0]=pe(10,(U-t%U)%U),e.e=-t||0):a[0]=e.e=0,e;if(i==0?(a.length=h,c=1,h--):(a.length=h+1,c=pe(10,U-i),a[h]=o>0?(f/pe(10,u-o)%pe(10,o)|0)*c:0),l)for(;;)if(h==0){for(i=1,o=a[0];o>=10;o/=10)i++;for(o=a[0]+=c,c=1;o>=10;o/=10)c++;i!=c&&(e.e++,a[0]==We&&(a[0]=1));break}else{if(a[h]+=c,a[h]!=We)break;a[h--]=0,c=1}for(i=a.length;a[--i]===0;)a.pop()}return H&&(e.e>d.maxE?(e.d=null,e.e=NaN):e.e<d.minE&&(e.e=0,e.d=[0])),e}function rt(e,t,n){if(!e.isFinite())return Xo(e);var r,u=e.e,i=Ee(e.d),o=i.length;return t?(n&&(r=n-o)>0?i=i.charAt(0)+"."+i.slice(1)+At(r):o>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-o)>0&&(i+=At(r))):u>=o?(i+=At(u+1-o),n&&(r=n-u-1)>0&&(i=i+"."+At(r))):((r=u+1)<o&&(i=i.slice(0,r)+"."+i.slice(r)),n&&(r=n-o)>0&&(u+1===o&&(i+="."),i+=At(r))),i}function nr(e,t){var n=e[0];for(t*=U;n>=10;n/=10)t++;return t}function rr(e,t,n){if(t>Rp)throw H=!0,n&&(e.precision=n),Error(ko);return k(new e(Qn),t,1,!0)}function Ze(e,t,n){if(t>_u)throw Error(ko);return k(new e(Yn),t,n,!0)}function zo(e){var t=e.length-1,n=t*U+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 Wo(e,t,n,r){var u,i=new e(1),o=Math.ceil(r/U+4);for(H=!1;;){if(n%2&&(i=i.times(t),Jo(i.d,o)&&(u=!0)),n=we(n/2),n===0){n=i.d.length-1,u&&i.d[n]===0&&++i.d[n];break}t=t.times(t),Jo(t.d,o)}return H=!0,i}function Zo(e){return e.d[e.d.length-1]&1}function Go(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 Su(e,t){var n,r,u,i,o,c,s,l=0,f=0,a=0,h=e.constructor,d=h.rounding,p=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?(H=!1,s=p):s=t,c=new h(.03125);e.e>-2;)e=e.times(c),a+=5;for(r=Math.log(pe(2,a))/Math.LN10*2+5|0,s+=r,n=i=o=new h(1),h.precision=s;;){if(i=k(i.times(e),s,1),n=n.times(++f),c=o.plus(ne(i,n,s,1)),Ee(c.d).slice(0,s)===Ee(o.d).slice(0,s)){for(u=a;u--;)o=k(o.times(o),s,1);if(t==null)if(l<3&&mn(o.d,s-r,d,l))h.precision=s+=10,n=i=c=new h(1),f=0,l++;else return k(o,h.precision=p,d,H=!0);else return h.precision=p,o}o=c}}function Ct(e,t){var n,r,u,i,o,c,s,l,f,a,h,d=1,p=10,D=e,m=D.d,g=D.constructor,A=g.rounding,I=g.precision;if(D.s<0||!m||!m[0]||!D.e&&m[0]==1&&m.length==1)return new g(m&&!m[0]?-1/0:D.s!=1?NaN:m?0:D);if(t==null?(H=!1,f=I):f=t,g.precision=f+=p,n=Ee(m),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=Ee(D.d),r=n.charAt(0),d++;i=D.e,r>1?(D=new g("0."+n),i++):D=new g(r+"."+n.slice(1))}else return l=rr(g,f+2,I).times(i+""),D=Ct(new g(r+"."+n.slice(1)),f-p).plus(l),g.precision=I,t==null?k(D,I,A,H=!0):D;for(a=D,s=o=D=ne(D.minus(1),D.plus(1),f,1),h=k(D.times(D),f,1),u=3;;){if(o=k(o.times(h),f,1),l=s.plus(ne(o,new g(u),f,1)),Ee(l.d).slice(0,f)===Ee(s.d).slice(0,f))if(s=s.times(2),i!==0&&(s=s.plus(rr(g,f+2,I).times(i+""))),s=ne(s,new g(d),f,1),t==null)if(mn(s.d,f-p,A,c))g.precision=f+=p,l=o=D=ne(a.minus(1),a.plus(1),f,1),h=k(D.times(D),f,1),u=c=1;else return k(s,g.precision=I,A,H=!0);else return g.precision=I,s;s=l,u+=2}}function Xo(e){return String(e.s*e.s/0)}function Iu(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)%U,n<0&&(r+=U),r<u){for(r&&e.d.push(+t.slice(0,r)),u-=U;r<u;)e.d.push(+t.slice(r,r+=U));t=t.slice(r),r=U-t.length}else r-=u;for(;r--;)t+="0";e.d.push(+t),H&&(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 Pp(e,t){var n,r,u,i,o,c,s,l,f;if(t.indexOf("_")>-1){if(t=t.replace(/(\d)_(?=\d)/g,"$1"),Ho.test(t))return Iu(e,t)}else if(t==="Infinity"||t==="NaN")return+t||(e.s=NaN),e.e=NaN,e.d=null,e;if(Np.test(t))n=16,t=t.toLowerCase();else if(Mp.test(t))n=2;else if(xp.test(t))n=8;else throw Error(Et+t);for(i=t.search(/p/i),i>0?(s=+t.slice(i+1),t=t.substring(2,i)):t=t.slice(2),i=t.indexOf("."),o=i>=0,r=e.constructor,o&&(t=t.replace(".",""),c=t.length,i=c-i,u=Wo(r,new r(n),i,i*2)),l=tr(t,n,We),f=l.length-1,i=f;l[i]===0;--i)l.pop();return i<0?new r(e.s*0):(e.e=nr(l,f),e.d=l,H=!1,o&&(e=ne(e,u,c*4)),s&&(e=e.times(Math.abs(s)<54?pe(2,s):Wt.pow(2,s))),H=!0,e)}function $p(e,t){var n,r=t.d.length;if(r<3)return t.isZero()?t:zt(e,2,t,t);n=1.4*Math.sqrt(r),n=n>16?16:n|0,t=t.times(1/ur(5,n)),t=zt(e,2,t,t);for(var u,i=new e(5),o=new e(16),c=new e(20);n--;)u=t.times(t),t=t.times(i.plus(u.times(o.times(u).minus(c))));return t}function zt(e,t,n,r,u){var i,o,c,s,l=e.precision,f=Math.ceil(l/U);for(H=!1,s=n.times(n),c=new e(r);;){if(o=ne(c.times(s),new e(t++*t++),l,1),c=u?r.plus(o):r.minus(o),r=ne(o.times(s),new e(t++*t++),l,1),o=c.plus(r),o.d[f]!==void 0){for(i=f;o.d[i]===c.d[i]&&i--;);if(i==-1)break}i=c,c=r,r=o,o=i}return H=!0,o.d.length=f+1,o}function ur(e,t){for(var n=e;--t;)n*=e;return n}function Ko(e,t){var n,r=t.s<0,u=Ze(e,e.precision,1),i=u.times(.5);if(t=t.abs(),t.lte(i))return ct=r?4:1,t;if(n=t.divToInt(u),n.isZero())ct=r?3:2;else{if(t=t.minus(n.times(u)),t.lte(i))return ct=Zo(n)?r?2:3:r?4:1,t;ct=Zo(n)?r?1:4:r?3:2}return t.minus(u).abs()}function Mu(e,t,n,r){var u,i,o,c,s,l,f,a,h,d=e.constructor,p=n!==void 0;if(p?(xe(n,1,yt),r===void 0?r=d.rounding:xe(r,0,8)):(n=d.precision,r=d.rounding),!e.isFinite())f=Xo(e);else{for(f=rt(e),o=f.indexOf("."),p?(u=2,t==16?n=n*4-3:t==8&&(n=n*3-2)):u=t,o>=0&&(f=f.replace(".",""),h=new d(1),h.e=f.length-o,h.d=tr(rt(h),10,u),h.e=h.d.length),a=tr(f,10,u),i=s=a.length;a[--s]==0;)a.pop();if(!a[0])f=p?"0p+0":"0";else{if(o<0?i--:(e=new d(e),e.d=a,e.e=i,e=ne(e,h,n,r,0,u),a=e.d,i=e.e,l=qo),o=a[n],c=u/2,l=l||a[n+1]!==void 0,l=r<4?(o!==void 0||l)&&(r===0||r===(e.s<0?3:2)):o>c||o===c&&(r===4||l||r===6&&a[n-1]&1||r===(e.s<0?8:7)),a.length=n,l)for(;++a[--n]>u-1;)a[n]=0,n||(++i,a.unshift(1));for(s=a.length;!a[s-1];--s);for(o=0,f="";o<s;o++)f+=bu.charAt(a[o]);if(p){if(s>1)if(t==16||t==8){for(o=t==16?4:3,--s;s%o;s++)f+="0";for(a=tr(f,u,t),s=a.length;!a[s-1];--s);for(o=1,f="1.";o<s;o++)f+=bu.charAt(a[o])}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>s)for(i-=s;i--;)f+="0";else i<s&&(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 Jo(e,t){if(e.length>t)return e.length=t,!0}function jp(e){return new this(e).abs()}function Lp(e){return new this(e).acos()}function qp(e){return new this(e).acosh()}function kp(e,t){return new this(e).plus(t)}function Vp(e){return new this(e).asin()}function Up(e){return new this(e).asinh()}function Hp(e){return new this(e).atan()}function zp(e){return new this(e).atanh()}function Wp(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=Ze(this,i,1).times(t.s>0?.25:.75),n.s=e.s):!t.d||e.isZero()?(n=t.s<0?Ze(this,r,u):new this(0),n.s=e.s):!e.d||t.isZero()?(n=Ze(this,i,1).times(.5),n.s=e.s):t.s<0?(this.precision=i,this.rounding=1,n=this.atan(ne(e,t,i,1)),t=Ze(this,i,1),this.precision=r,this.rounding=u,n=e.s<0?n.minus(t):n.plus(t)):n=this.atan(ne(e,t,i,1)),n}function Zp(e){return new this(e).cbrt()}function Gp(e){return k(e=new this(e),e.e+1,2)}function Xp(e,t,n){return new this(e).clamp(t,n)}function Kp(e){if(!e||typeof e!="object")throw Error(er+"Object expected");var t,n,r,u=e.defaults===!0,i=["precision",1,yt,"rounding",0,8,"toExpNeg",-Ht,0,"toExpPos",0,Ht,"maxE",0,Ht,"minE",-Ht,0,"modulo",0,9];for(t=0;t<i.length;t+=3)if(n=i[t],u&&(this[n]=Bu[n]),(r=e[n])!==void 0)if(we(r)===r&&r>=i[t+1]&&r<=i[t+2])this[n]=r;else throw Error(Et+n+": "+r);if(n="crypto",u&&(this[n]=Bu[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(Vo);else this[n]=!1;else throw Error(Et+n+": "+r);return this}function Jp(e){return new this(e).cos()}function Qp(e){return new this(e).cosh()}function Qo(e){var t,n,r;function u(i){var o,c,s,l=this;if(!(l instanceof u))return new u(i);if(l.constructor=u,Yo(i)){l.s=i.s,H?!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(s=typeof i,s==="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(o=0,c=i;c>=10;c/=10)o++;H?o>u.maxE?(l.e=NaN,l.d=null):o<u.minE?(l.e=0,l.d=[0]):(l.e=o,l.d=[i]):(l.e=o,l.d=[i]);return}else if(i*0!==0){i||(l.s=NaN),l.e=NaN,l.d=null;return}return Iu(l,i.toString())}else if(s!=="string")throw Error(Et+i);return(c=i.charCodeAt(0))===45?(i=i.slice(1),l.s=-1):(c===43&&(i=i.slice(1)),l.s=1),Ho.test(i)?Iu(l,i):Pp(l,i)}if(u.prototype=S,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=Kp,u.clone=Qo,u.isDecimal=Yo,u.abs=jp,u.acos=Lp,u.acosh=qp,u.add=kp,u.asin=Vp,u.asinh=Up,u.atan=Hp,u.atanh=zp,u.atan2=Wp,u.cbrt=Zp,u.ceil=Gp,u.clamp=Xp,u.cos=Jp,u.cosh=Qp,u.div=Yp,u.exp=e1,u.floor=t1,u.hypot=n1,u.ln=r1,u.log=u1,u.log10=o1,u.log2=i1,u.max=a1,u.min=s1,u.mod=c1,u.mul=f1,u.pow=l1,u.random=h1,u.round=d1,u.sign=p1,u.sin=D1,u.sinh=g1,u.sqrt=v1,u.sub=m1,u.sum=y1,u.tan=E1,u.tanh=A1,u.trunc=C1,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 Yp(e,t){return new this(e).div(t)}function e1(e){return new this(e).exp()}function t1(e){return k(e=new this(e),e.e+1,3)}function n1(){var e,t,n=new this(0);for(H=!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 H=!0,new this(1/0);n=t}return H=!0,n.sqrt()}function Yo(e){return e instanceof Wt||e&&e.toStringTag===Uo||!1}function r1(e){return new this(e).ln()}function u1(e,t){return new this(e).log(t)}function i1(e){return new this(e).log(2)}function o1(e){return new this(e).log(10)}function a1(){return Go(this,arguments,"lt")}function s1(){return Go(this,arguments,"gt")}function c1(e,t){return new this(e).mod(t)}function f1(e,t){return new this(e).mul(t)}function l1(e,t){return new this(e).pow(t)}function h1(e){var t,n,r,u,i=0,o=new this(1),c=[];if(e===void 0?e=this.precision:xe(e,1,yt),r=Math.ceil(e/U),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]:c[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):(c.push(u%1e7),i+=4);i=r/4}else throw Error(Vo);else for(;i<r;)c[i++]=Math.random()*1e7|0;for(r=c[--i],e%=U,r&&e&&(u=pe(10,U-e),c[i]=(r/u|0)*u);c[i]===0;i--)c.pop();if(i<0)n=0,c=[0];else{for(n=-1;c[0]===0;n-=U)c.shift();for(r=1,u=c[0];u>=10;u/=10)r++;r<U&&(n-=U-r)}return o.e=n,o.d=c,o}function d1(e){return k(e=new this(e),e.e+1,this.rounding)}function p1(e){return e=new this(e),e.d?e.d[0]?e.s:0*e.s:e.s||NaN}function D1(e){return new this(e).sin()}function g1(e){return new this(e).sinh()}function v1(e){return new this(e).sqrt()}function m1(e,t){return new this(e).sub(t)}function y1(){var e=0,t=arguments,n=new this(t[e]);for(H=!1;n.s&&++e<t.length;)n=n.plus(t[e]);return H=!0,k(n,this.precision,this.rounding)}function E1(e){return new this(e).tan()}function A1(e){return new this(e).tanh()}function C1(e){return k(e=new this(e),e.e+1,1)}S[Symbol.for("nodejs.util.inspect.custom")]=S.toString,S[Symbol.toStringTag]="Decimal";var Wt=S.constructor=Qo(Bu);Qn=new Wt(Qn),Yn=new Wt(Yn);var F1="BigNumber",w1=["?on","config"],b1=Ne(F1,w1,e=>{var{on:t,config:n}=e,r=Wt.clone({precision:n.precision,modulo:Wt.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}),ea={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
21
|
**/(function(e,t){(function(n){var r=Math.cosh||function(a){return Math.abs(a)<1e-9?1-a:(Math.exp(a)+Math.exp(-a))*.5},u=Math.sinh||function(a){return Math.abs(a)<1e-9?a:(Math.exp(a)-Math.exp(-a))*.5},i=function(a){var h=Math.PI/4;if(-h>a||a>h)return Math.cos(a)-1;var d=a*a;return d*(d*(d*(d*(d*(d*(d*(d/20922789888e3-1/87178291200)+1/479001600)-1/3628800)+1/40320)-1/720)+1/24)-1/2)},o=function(a,h){var d=Math.abs(a),p=Math.abs(h);return d<3e3&&p<3e3?Math.sqrt(d*d+p*p):(d<p?(d=p,p=a/h):p=h/a,d*Math.sqrt(1+p*p))},c=function(){throw SyntaxError("Invalid Param")};function s(a,h){var d=Math.abs(a),p=Math.abs(h);return a===0?Math.log(p):h===0?Math.log(d):d<3e3&&p<3e3?Math.log(a*a+h*h)*.5:(a=a/2,h=h/2,.5*Math.log(a*a+h*h)+Math.LN2)}var l=function(a,h){var d={re:0,im:0};if(a==null)d.re=d.im=0;else if(h!==void 0)d.re=a,d.im=h;else switch(typeof a){case"object":if("im"in a&&"re"in a)d.re=a.re,d.im=a.im;else if("abs"in a&&"arg"in a){if(!Number.isFinite(a.abs)&&Number.isFinite(a.arg))return f.INFINITY;d.re=a.abs*Math.cos(a.arg),d.im=a.abs*Math.sin(a.arg)}else if("r"in a&&"phi"in a){if(!Number.isFinite(a.r)&&Number.isFinite(a.phi))return f.INFINITY;d.re=a.r*Math.cos(a.phi),d.im=a.r*Math.sin(a.phi)}else a.length===2?(d.re=a[0],d.im=a[1]):c();break;case"string":d.im=d.re=0;var p=a.match(/\d+\.?\d*e[+-]?\d+|\d+\.?\d*|\.\d+|./g),D=1,m=0;p===null&&c();for(var g=0;g<p.length;g++){var A=p[g];A===" "||A===" "||A===`
|
|
22
|
-
`||(A==="+"?D++:A==="-"?m++:A==="i"||A==="I"?(D+m===0&&c(),p[g+1]!==" "&&!isNaN(p[g+1])?(d.im+=parseFloat((m%2?"-":"")+p[g+1]),g++):d.im+=parseFloat((m%2?"-":"")+"1"),D=m=0):((D+m===0||isNaN(A))&&c(),p[g+1]==="i"||p[g+1]==="I"?(d.im+=parseFloat((m%2?"-":"")+A),g++):d.re+=parseFloat((m%2?"-":"")+A),D=m=0))}D+m>0&&c();break;case"number":d.im=0,d.re=a;break;default:c()}return isNaN(d.re)||isNaN(d.im),d};function f(a,h){if(!(this instanceof f))return new f(a,h);var d=l(a,h);this.re=d.re,this.im=d.im}f.prototype={re:0,im:0,sign:function(){var a=this.abs();return new f(this.re/a,this.im/a)},add:function(a,h){var d=new f(a,h);return this.isInfinite()&&d.isInfinite()?f.NAN:this.isInfinite()||d.isInfinite()?f.INFINITY:new f(this.re+d.re,this.im+d.im)},sub:function(a,h){var d=new f(a,h);return this.isInfinite()&&d.isInfinite()?f.NAN:this.isInfinite()||d.isInfinite()?f.INFINITY:new f(this.re-d.re,this.im-d.im)},mul:function(a,h){var d=new f(a,h);return this.isInfinite()&&d.isZero()||this.isZero()&&d.isInfinite()?f.NAN:this.isInfinite()||d.isInfinite()?f.INFINITY:d.im===0&&this.im===0?new f(this.re*d.re,0):new f(this.re*d.re-this.im*d.im,this.re*d.im+this.im*d.re)},div:function(a,h){var d=new f(a,h);if(this.isZero()&&d.isZero()||this.isInfinite()&&d.isInfinite())return f.NAN;if(this.isInfinite()||d.isZero())return f.INFINITY;if(this.isZero()||d.isInfinite())return f.ZERO;a=this.re,h=this.im;var p=d.re,D=d.im,m,g;return D===0?new f(a/p,h/p):Math.abs(p)<Math.abs(D)?(g=p/D,m=p*g+D,new f((a*g+h)/m,(h*g-a)/m)):(g=D/p,m=D*g+p,new f((a+h*g)/m,(h-a*g)/m))},pow:function(a,h){var d=new f(a,h);if(a=this.re,h=this.im,d.isZero())return f.ONE;if(d.im===0){if(h===0&&a>0)return new f(Math.pow(a,d.re),0);if(a===0)switch((d.re%4+4)%4){case 0:return new f(Math.pow(h,d.re),0);case 1:return new f(0,Math.pow(h,d.re));case 2:return new f(-Math.pow(h,d.re),0);case 3:return new f(0,-Math.pow(h,d.re))}}if(a===0&&h===0&&d.re>0&&d.im>=0)return f.ZERO;var p=Math.atan2(h,a),D=s(a,h);return a=Math.exp(d.re*D-d.im*p),h=d.im*D+d.re*p,new f(a*Math.cos(h),a*Math.sin(h))},sqrt:function(){var a=this.re,h=this.im,d=this.abs(),p,D;if(a>=0){if(h===0)return new f(Math.sqrt(a),0);p=.5*Math.sqrt(2*(d+a))}else p=Math.abs(h)/Math.sqrt(2*(d-a));return a<=0?D=.5*Math.sqrt(2*(d-a)):D=Math.abs(h)/Math.sqrt(2*(d+a)),new f(p,h<0?-D:D)},exp:function(){var a=Math.exp(this.re);return this.im,new f(a*Math.cos(this.im),a*Math.sin(this.im))},expm1:function(){var a=this.re,h=this.im;return new f(Math.expm1(a)*Math.cos(h)+i(h),Math.exp(a)*Math.sin(h))},log:function(){var a=this.re,h=this.im;return new f(s(a,h),Math.atan2(h,a))},abs:function(){return o(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var a=this.re,h=this.im;return new f(Math.sin(a)*r(h),Math.cos(a)*u(h))},cos:function(){var a=this.re,h=this.im;return new f(Math.cos(a)*r(h),-Math.sin(a)*u(h))},tan:function(){var a=2*this.re,h=2*this.im,d=Math.cos(a)+r(h);return new f(Math.sin(a)/d,u(h)/d)},cot:function(){var a=2*this.re,h=2*this.im,d=Math.cos(a)-r(h);return new f(-Math.sin(a)/d,u(h)/d)},sec:function(){var a=this.re,h=this.im,d=.5*r(2*h)+.5*Math.cos(2*a);return new f(Math.cos(a)*r(h)/d,Math.sin(a)*u(h)/d)},csc:function(){var a=this.re,h=this.im,d=.5*r(2*h)-.5*Math.cos(2*a);return new f(Math.sin(a)*r(h)/d,-Math.cos(a)*u(h)/d)},asin:function(){var a=this.re,h=this.im,d=new f(h*h-a*a+1,-2*a*h).sqrt(),p=new f(d.re-h,d.im+a).log();return new f(p.im,-p.re)},acos:function(){var a=this.re,h=this.im,d=new f(h*h-a*a+1,-2*a*h).sqrt(),p=new f(d.re-h,d.im+a).log();return new f(Math.PI/2-p.im,p.re)},atan:function(){var a=this.re,h=this.im;if(a===0){if(h===1)return new f(0,1/0);if(h===-1)return new f(0,-1/0)}var d=a*a+(1-h)*(1-h),p=new f((1-h*h-a*a)/d,-2*a/d).log();return new f(-.5*p.im,.5*p.re)},acot:function(){var a=this.re,h=this.im;if(h===0)return new f(Math.atan2(1,a),0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).atan():new f(a!==0?a/0:0,h!==0?-h/0:0).atan()},asec:function(){var a=this.re,h=this.im;if(a===0&&h===0)return new f(0,1/0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).acos():new f(a!==0?a/0:0,h!==0?-h/0:0).acos()},acsc:function(){var a=this.re,h=this.im;if(a===0&&h===0)return new f(Math.PI/2,1/0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).asin():new f(a!==0?a/0:0,h!==0?-h/0:0).asin()},sinh:function(){var a=this.re,h=this.im;return new f(u(a)*Math.cos(h),r(a)*Math.sin(h))},cosh:function(){var a=this.re,h=this.im;return new f(r(a)*Math.cos(h),u(a)*Math.sin(h))},tanh:function(){var a=2*this.re,h=2*this.im,d=r(a)+Math.cos(h);return new f(u(a)/d,Math.sin(h)/d)},coth:function(){var a=2*this.re,h=2*this.im,d=r(a)-Math.cos(h);return new f(u(a)/d,-Math.sin(h)/d)},csch:function(){var a=this.re,h=this.im,d=Math.cos(2*h)-r(2*a);return new f(-2*u(a)*Math.cos(h)/d,2*r(a)*Math.sin(h)/d)},sech:function(){var a=this.re,h=this.im,d=Math.cos(2*h)+r(2*a);return new f(2*r(a)*Math.cos(h)/d,-2*u(a)*Math.sin(h)/d)},asinh:function(){var a=this.im;this.im=-this.re,this.re=a;var h=this.asin();return this.re=-this.im,this.im=a,a=h.re,h.re=-h.im,h.im=a,h},acosh:function(){var a=this.acos();if(a.im<=0){var h=a.re;a.re=-a.im,a.im=h}else{var h=a.im;a.im=-a.re,a.re=h}return a},atanh:function(){var a=this.re,h=this.im,d=a>1&&h===0,p=1-a,D=1+a,m=p*p+h*h,g=m!==0?new f((D*p-h*h)/m,(h*p+D*h)/m):new f(a!==-1?a/0:0,h!==0?h/0:0),A=g.re;return g.re=s(g.re,g.im)/2,g.im=Math.atan2(g.im,A)/2,d&&(g.im=-g.im),g},acoth:function(){var a=this.re,h=this.im;if(a===0&&h===0)return new f(0,Math.PI/2);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).atanh():new f(a!==0?a/0:0,h!==0?-h/0:0).atanh()},acsch:function(){var a=this.re,h=this.im;if(h===0)return new f(a!==0?Math.log(a+Math.sqrt(a*a+1)):1/0,0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).asinh():new f(a!==0?a/0:0,h!==0?-h/0:0).asinh()},asech:function(){var a=this.re,h=this.im;if(this.isZero())return f.INFINITY;var d=a*a+h*h;return d!==0?new f(a/d,-h/d).acosh():new f(a!==0?a/0:0,h!==0?-h/0:0).acosh()},inverse:function(){if(this.isZero())return f.INFINITY;if(this.isInfinite())return f.ZERO;var a=this.re,h=this.im,d=a*a+h*h;return new f(a/d,-h/d)},conjugate:function(){return new f(this.re,-this.im)},neg:function(){return new f(-this.re,-this.im)},ceil:function(a){return a=Math.pow(10,a||0),new f(Math.ceil(this.re*a)/a,Math.ceil(this.im*a)/a)},floor:function(a){return a=Math.pow(10,a||0),new f(Math.floor(this.re*a)/a,Math.floor(this.im*a)/a)},round:function(a){return a=Math.pow(10,a||0),new f(Math.round(this.re*a)/a,Math.round(this.im*a)/a)},equals:function(a,h){var d=new f(a,h);return Math.abs(d.re-this.re)<=f.EPSILON&&Math.abs(d.im-this.im)<=f.EPSILON},clone:function(){return new f(this.re,this.im)},toString:function(){var a=this.re,h=this.im,d="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(a)<f.EPSILON&&(a=0),Math.abs(h)<f.EPSILON&&(h=0),h===0?d+a:(a!==0?(d+=a,d+=" ",h<0?(h=-h,d+="-"):d+="+",d+=" "):h<0&&(h=-h,d+="-"),h!==1&&(d+=h),d+"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})()})(
|
|
22
|
+
`||(A==="+"?D++:A==="-"?m++:A==="i"||A==="I"?(D+m===0&&c(),p[g+1]!==" "&&!isNaN(p[g+1])?(d.im+=parseFloat((m%2?"-":"")+p[g+1]),g++):d.im+=parseFloat((m%2?"-":"")+"1"),D=m=0):((D+m===0||isNaN(A))&&c(),p[g+1]==="i"||p[g+1]==="I"?(d.im+=parseFloat((m%2?"-":"")+A),g++):d.re+=parseFloat((m%2?"-":"")+A),D=m=0))}D+m>0&&c();break;case"number":d.im=0,d.re=a;break;default:c()}return isNaN(d.re)||isNaN(d.im),d};function f(a,h){if(!(this instanceof f))return new f(a,h);var d=l(a,h);this.re=d.re,this.im=d.im}f.prototype={re:0,im:0,sign:function(){var a=this.abs();return new f(this.re/a,this.im/a)},add:function(a,h){var d=new f(a,h);return this.isInfinite()&&d.isInfinite()?f.NAN:this.isInfinite()||d.isInfinite()?f.INFINITY:new f(this.re+d.re,this.im+d.im)},sub:function(a,h){var d=new f(a,h);return this.isInfinite()&&d.isInfinite()?f.NAN:this.isInfinite()||d.isInfinite()?f.INFINITY:new f(this.re-d.re,this.im-d.im)},mul:function(a,h){var d=new f(a,h);return this.isInfinite()&&d.isZero()||this.isZero()&&d.isInfinite()?f.NAN:this.isInfinite()||d.isInfinite()?f.INFINITY:d.im===0&&this.im===0?new f(this.re*d.re,0):new f(this.re*d.re-this.im*d.im,this.re*d.im+this.im*d.re)},div:function(a,h){var d=new f(a,h);if(this.isZero()&&d.isZero()||this.isInfinite()&&d.isInfinite())return f.NAN;if(this.isInfinite()||d.isZero())return f.INFINITY;if(this.isZero()||d.isInfinite())return f.ZERO;a=this.re,h=this.im;var p=d.re,D=d.im,m,g;return D===0?new f(a/p,h/p):Math.abs(p)<Math.abs(D)?(g=p/D,m=p*g+D,new f((a*g+h)/m,(h*g-a)/m)):(g=D/p,m=D*g+p,new f((a+h*g)/m,(h-a*g)/m))},pow:function(a,h){var d=new f(a,h);if(a=this.re,h=this.im,d.isZero())return f.ONE;if(d.im===0){if(h===0&&a>0)return new f(Math.pow(a,d.re),0);if(a===0)switch((d.re%4+4)%4){case 0:return new f(Math.pow(h,d.re),0);case 1:return new f(0,Math.pow(h,d.re));case 2:return new f(-Math.pow(h,d.re),0);case 3:return new f(0,-Math.pow(h,d.re))}}if(a===0&&h===0&&d.re>0&&d.im>=0)return f.ZERO;var p=Math.atan2(h,a),D=s(a,h);return a=Math.exp(d.re*D-d.im*p),h=d.im*D+d.re*p,new f(a*Math.cos(h),a*Math.sin(h))},sqrt:function(){var a=this.re,h=this.im,d=this.abs(),p,D;if(a>=0){if(h===0)return new f(Math.sqrt(a),0);p=.5*Math.sqrt(2*(d+a))}else p=Math.abs(h)/Math.sqrt(2*(d-a));return a<=0?D=.5*Math.sqrt(2*(d-a)):D=Math.abs(h)/Math.sqrt(2*(d+a)),new f(p,h<0?-D:D)},exp:function(){var a=Math.exp(this.re);return this.im,new f(a*Math.cos(this.im),a*Math.sin(this.im))},expm1:function(){var a=this.re,h=this.im;return new f(Math.expm1(a)*Math.cos(h)+i(h),Math.exp(a)*Math.sin(h))},log:function(){var a=this.re,h=this.im;return new f(s(a,h),Math.atan2(h,a))},abs:function(){return o(this.re,this.im)},arg:function(){return Math.atan2(this.im,this.re)},sin:function(){var a=this.re,h=this.im;return new f(Math.sin(a)*r(h),Math.cos(a)*u(h))},cos:function(){var a=this.re,h=this.im;return new f(Math.cos(a)*r(h),-Math.sin(a)*u(h))},tan:function(){var a=2*this.re,h=2*this.im,d=Math.cos(a)+r(h);return new f(Math.sin(a)/d,u(h)/d)},cot:function(){var a=2*this.re,h=2*this.im,d=Math.cos(a)-r(h);return new f(-Math.sin(a)/d,u(h)/d)},sec:function(){var a=this.re,h=this.im,d=.5*r(2*h)+.5*Math.cos(2*a);return new f(Math.cos(a)*r(h)/d,Math.sin(a)*u(h)/d)},csc:function(){var a=this.re,h=this.im,d=.5*r(2*h)-.5*Math.cos(2*a);return new f(Math.sin(a)*r(h)/d,-Math.cos(a)*u(h)/d)},asin:function(){var a=this.re,h=this.im,d=new f(h*h-a*a+1,-2*a*h).sqrt(),p=new f(d.re-h,d.im+a).log();return new f(p.im,-p.re)},acos:function(){var a=this.re,h=this.im,d=new f(h*h-a*a+1,-2*a*h).sqrt(),p=new f(d.re-h,d.im+a).log();return new f(Math.PI/2-p.im,p.re)},atan:function(){var a=this.re,h=this.im;if(a===0){if(h===1)return new f(0,1/0);if(h===-1)return new f(0,-1/0)}var d=a*a+(1-h)*(1-h),p=new f((1-h*h-a*a)/d,-2*a/d).log();return new f(-.5*p.im,.5*p.re)},acot:function(){var a=this.re,h=this.im;if(h===0)return new f(Math.atan2(1,a),0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).atan():new f(a!==0?a/0:0,h!==0?-h/0:0).atan()},asec:function(){var a=this.re,h=this.im;if(a===0&&h===0)return new f(0,1/0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).acos():new f(a!==0?a/0:0,h!==0?-h/0:0).acos()},acsc:function(){var a=this.re,h=this.im;if(a===0&&h===0)return new f(Math.PI/2,1/0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).asin():new f(a!==0?a/0:0,h!==0?-h/0:0).asin()},sinh:function(){var a=this.re,h=this.im;return new f(u(a)*Math.cos(h),r(a)*Math.sin(h))},cosh:function(){var a=this.re,h=this.im;return new f(r(a)*Math.cos(h),u(a)*Math.sin(h))},tanh:function(){var a=2*this.re,h=2*this.im,d=r(a)+Math.cos(h);return new f(u(a)/d,Math.sin(h)/d)},coth:function(){var a=2*this.re,h=2*this.im,d=r(a)-Math.cos(h);return new f(u(a)/d,-Math.sin(h)/d)},csch:function(){var a=this.re,h=this.im,d=Math.cos(2*h)-r(2*a);return new f(-2*u(a)*Math.cos(h)/d,2*r(a)*Math.sin(h)/d)},sech:function(){var a=this.re,h=this.im,d=Math.cos(2*h)+r(2*a);return new f(2*r(a)*Math.cos(h)/d,-2*u(a)*Math.sin(h)/d)},asinh:function(){var a=this.im;this.im=-this.re,this.re=a;var h=this.asin();return this.re=-this.im,this.im=a,a=h.re,h.re=-h.im,h.im=a,h},acosh:function(){var a=this.acos();if(a.im<=0){var h=a.re;a.re=-a.im,a.im=h}else{var h=a.im;a.im=-a.re,a.re=h}return a},atanh:function(){var a=this.re,h=this.im,d=a>1&&h===0,p=1-a,D=1+a,m=p*p+h*h,g=m!==0?new f((D*p-h*h)/m,(h*p+D*h)/m):new f(a!==-1?a/0:0,h!==0?h/0:0),A=g.re;return g.re=s(g.re,g.im)/2,g.im=Math.atan2(g.im,A)/2,d&&(g.im=-g.im),g},acoth:function(){var a=this.re,h=this.im;if(a===0&&h===0)return new f(0,Math.PI/2);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).atanh():new f(a!==0?a/0:0,h!==0?-h/0:0).atanh()},acsch:function(){var a=this.re,h=this.im;if(h===0)return new f(a!==0?Math.log(a+Math.sqrt(a*a+1)):1/0,0);var d=a*a+h*h;return d!==0?new f(a/d,-h/d).asinh():new f(a!==0?a/0:0,h!==0?-h/0:0).asinh()},asech:function(){var a=this.re,h=this.im;if(this.isZero())return f.INFINITY;var d=a*a+h*h;return d!==0?new f(a/d,-h/d).acosh():new f(a!==0?a/0:0,h!==0?-h/0:0).acosh()},inverse:function(){if(this.isZero())return f.INFINITY;if(this.isInfinite())return f.ZERO;var a=this.re,h=this.im,d=a*a+h*h;return new f(a/d,-h/d)},conjugate:function(){return new f(this.re,-this.im)},neg:function(){return new f(-this.re,-this.im)},ceil:function(a){return a=Math.pow(10,a||0),new f(Math.ceil(this.re*a)/a,Math.ceil(this.im*a)/a)},floor:function(a){return a=Math.pow(10,a||0),new f(Math.floor(this.re*a)/a,Math.floor(this.im*a)/a)},round:function(a){return a=Math.pow(10,a||0),new f(Math.round(this.re*a)/a,Math.round(this.im*a)/a)},equals:function(a,h){var d=new f(a,h);return Math.abs(d.re-this.re)<=f.EPSILON&&Math.abs(d.im-this.im)<=f.EPSILON},clone:function(){return new f(this.re,this.im)},toString:function(){var a=this.re,h=this.im,d="";return this.isNaN()?"NaN":this.isInfinite()?"Infinity":(Math.abs(a)<f.EPSILON&&(a=0),Math.abs(h)<f.EPSILON&&(h=0),h===0?d+a:(a!==0?(d+=a,d+=" ",h<0?(h=-h,d+="-"):d+="+",d+=" "):h<0&&(h=-h,d+="-"),h!==1&&(d+=h),d+"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})()})(ea);var Ae=Ai(ea.exports),B1="Complex",_1=[],S1=Ne(B1,_1,()=>(Object.defineProperty(Ae,"name",{value:"Complex"}),Ae.prototype.constructor=Ae,Ae.prototype.type="Complex",Ae.prototype.isComplex=!0,Ae.prototype.toJSON=function(){return{mathjs:"Complex",re:this.re,im:this.im}},Ae.prototype.toPolar=function(){return{r:this.abs(),phi:this.arg()}},Ae.prototype.format=function(e){var t="",n=this.im,r=this.re,u=mu(this.re,e),i=mu(this.im,e),o=Se(e)?e:e?e.precision:null;if(o!==null){var c=Math.pow(10,-o);Math.abs(r/n)<c&&(r=0),Math.abs(n/r)<c&&(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},Ae.fromPolar=function(e){switch(arguments.length){case 1:{var t=arguments[0];if(typeof t=="object")return Ae(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(Se(n)){if(Eo(r)&&r.hasBase("ANGLE")&&(r=r.toNumber("rad")),Se(r))return new Ae({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")}},Ae.prototype.valueOf=Ae.prototype.toString,Ae.fromJSON=function(e){return new Ae(e)},Ae.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},Ae),{isClass:!0}),ta={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 i(p,D){if(isNaN(p=parseInt(p,10)))throw d.InvalidParameter;return p*D}function o(p,D){if(D===0)throw d.DivisionByZero;var m=Object.create(d.prototype);m.s=p<0?-1:1,p=p<0?-p:p;var g=h(p,D);return m.n=p/g,m.d=D/g,m}function c(p){for(var D={},m=p,g=2,A=4;A<=m;){for(;m%g===0;)m/=g,D[g]=(D[g]||0)+1;A+=1+2*g++}return m!==p?m>1&&(D[m]=(D[m]||0)+1):D[p]=(D[p]||0)+1,D}var s=function(p,D){var m=0,g=1,A=1,M=0,w=0,x=0,P=1,L=1,I=0,j=1,G=1,z=1,ee=1e7,Y;if(p!=null)if(D!==void 0){if(m=p,g=D,A=m*g,m%1!==0||g%1!==0)throw d.NonIntegerParameter}else switch(typeof p){case"object":{if("d"in p&&"n"in p)m=p.n,g=p.d,"s"in p&&(m*=p.s);else if(0 in p)m=p[0],1 in p&&(g=p[1]);else throw d.InvalidParameter;A=m*g;break}case"number":{if(p<0&&(A=p,p=-p),p%1===0)m=p;else if(p>0){for(p>=1&&(L=Math.pow(10,Math.floor(1+Math.log(p)/Math.LN10)),p/=L);j<=ee&&z<=ee;)if(Y=(I+G)/(j+z),p===Y){j+z<=ee?(m=I+G,g=j+z):z>j?(m=G,g=z):(m=I,g=j);break}else p>Y?(I+=G,j+=z):(G+=I,z+=j),j>ee?(m=G,g=z):(m=I,g=j);m*=L}else(isNaN(p)||isNaN(D))&&(g=m=NaN);break}case"string":{if(j=p.match(/\d+|./g),j===null)throw d.InvalidParameter;if(j[I]==="-"?(A=-1,I++):j[I]==="+"&&I++,j.length===I+1?w=i(j[I++],A):j[I+1]==="."||j[I]==="."?(j[I]!=="."&&(M=i(j[I++],A)),I++,(I+1===j.length||j[I+1]==="("&&j[I+3]===")"||j[I+1]==="'"&&j[I+3]==="'")&&(w=i(j[I],A),P=Math.pow(10,j[I].length),I++),(j[I]==="("&&j[I+2]===")"||j[I]==="'"&&j[I+2]==="'")&&(x=i(j[I+1],A),L=Math.pow(10,j[I+1].length)-1,I+=3)):j[I+1]==="/"||j[I+1]===":"?(w=i(j[I],A),P=i(j[I+2],1),I+=3):j[I+3]==="/"&&j[I+1]===" "&&(M=i(j[I],A),w=i(j[I+2],A),P=i(j[I+4],1),I+=5),j.length<=I){g=P*L,A=m=x+g*M+L*w;break}}default:throw d.InvalidParameter}if(g===0)throw d.DivisionByZero;u.s=A<0?-1:1,u.n=Math.abs(m),u.d=Math.abs(g)};function l(p,D,m){for(var g=1;D>0;p=p*p%m,D>>=1)D&1&&(g=g*p%m);return g}function f(p,D){for(;D%2===0;D/=2);for(;D%5===0;D/=5);if(D===1)return 0;for(var m=10%D,g=1;m!==1;g++)if(m=m*10%D,g>r)return 0;return g}function a(p,D,m){for(var g=1,A=l(10,m,D),M=0;M<300;M++){if(g===A)return M;g=g*10%D,A=A*10%D}return 0}function h(p,D){if(!p)return D;if(!D)return p;for(;;){if(p%=D,!p)return D;if(D%=p,!D)return p}}function d(p,D){if(s(p,D),this instanceof d)p=h(u.d,u.n),this.s=u.s,this.n=u.n/p,this.d=u.d/p;else return o(u.s*u.n,u.d)}d.DivisionByZero=new Error("Division by Zero"),d.InvalidParameter=new Error("Invalid argument"),d.NonIntegerParameter=new Error("Parameters must be integer"),d.prototype={s:1,n:0,d:1,abs:function(){return o(this.n,this.d)},neg:function(){return o(-this.s*this.n,this.d)},add:function(p,D){return s(p,D),o(this.s*this.n*u.d+u.s*this.d*u.n,this.d*u.d)},sub:function(p,D){return s(p,D),o(this.s*this.n*u.d-u.s*this.d*u.n,this.d*u.d)},mul:function(p,D){return s(p,D),o(this.s*u.s*this.n*u.n,this.d*u.d)},div:function(p,D){return s(p,D),o(this.s*u.s*this.n*u.d,this.d*u.n)},clone:function(){return o(this.s*this.n,this.d)},mod:function(p,D){if(isNaN(this.n)||isNaN(this.d))return new d(NaN);if(p===void 0)return o(this.s*this.n%this.d,1);if(s(p,D),u.n===0&&this.d===0)throw d.DivisionByZero;return o(this.s*(u.d*this.n)%(u.n*this.d),u.d*this.d)},gcd:function(p,D){return s(p,D),o(h(u.n,this.n)*h(u.d,this.d),u.d*this.d)},lcm:function(p,D){return s(p,D),u.n===0&&this.n===0?o(0,1):o(u.n*this.n,h(u.n,this.n)*h(u.d,this.d))},ceil:function(p){return p=Math.pow(10,p||0),isNaN(this.n)||isNaN(this.d)?new d(NaN):o(Math.ceil(p*this.s*this.n/this.d),p)},floor:function(p){return p=Math.pow(10,p||0),isNaN(this.n)||isNaN(this.d)?new d(NaN):o(Math.floor(p*this.s*this.n/this.d),p)},round:function(p){return p=Math.pow(10,p||0),isNaN(this.n)||isNaN(this.d)?new d(NaN):o(Math.round(p*this.s*this.n/this.d),p)},inverse:function(){return o(this.s*this.d,this.n)},pow:function(p,D){if(s(p,D),u.d===1)return u.s<0?o(Math.pow(this.s*this.d,u.n),Math.pow(this.n,u.n)):o(Math.pow(this.s*this.n,u.n),Math.pow(this.d,u.n));if(this.s<0)return null;var m=c(this.n),g=c(this.d),A=1,M=1;for(var w in m)if(w!=="1"){if(w==="0"){A=0;break}if(m[w]*=u.n,m[w]%u.d===0)m[w]/=u.d;else return null;A*=Math.pow(w,m[w])}for(var w in g)if(w!=="1"){if(g[w]*=u.n,g[w]%u.d===0)g[w]/=u.d;else return null;M*=Math.pow(w,g[w])}return u.s<0?o(M,A):o(A,M)},equals:function(p,D){return s(p,D),this.s*this.n*u.d===u.s*u.n*this.d},compare:function(p,D){s(p,D);var m=this.s*this.n*u.d-u.s*u.n*this.d;return(0<m)-(m<0)},simplify:function(p){if(isNaN(this.n)||isNaN(this.d))return this;p=p||.001;for(var D=this.abs(),m=D.toContinued(),g=1;g<m.length;g++){for(var A=o(m[g-1],1),M=g-2;M>=0;M--)A=A.inverse().add(m[M]);if(A.sub(D).abs().valueOf()<p)return A.mul(this.s)}return this},divisible:function(p,D){return s(p,D),!(!(u.n*this.d)||this.n*u.d%(u.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(p){var D,m="",g=this.n,A=this.d;return this.s<0&&(m+="-"),A===1?m+=g:(p&&(D=Math.floor(g/A))>0&&(m+=D,m+=" ",g%=A),m+=g,m+="/",m+=A),m},toLatex:function(p){var D,m="",g=this.n,A=this.d;return this.s<0&&(m+="-"),A===1?m+=g:(p&&(D=Math.floor(g/A))>0&&(m+=D,g%=A),m+="\\frac{",m+=g,m+="}{",m+=A,m+="}"),m},toContinued:function(){var p,D=this.n,m=this.d,g=[];if(isNaN(D)||isNaN(m))return g;do g.push(Math.floor(D/m)),p=D%m,D=m,m=p;while(D!==1);return g},toString:function(p){var D=this.n,m=this.d;if(isNaN(D)||isNaN(m))return"NaN";p=p||15;var g=f(D,m),A=a(D,m,g),M=this.s<0?"-":"";if(M+=D/m|0,D%=m,D*=10,D&&(M+="."),g){for(var w=A;w--;)M+=D/m|0,D%=m,D*=10;M+="(";for(var w=g;w--;)M+=D/m|0,D%=m,D*=10;M+=")"}else for(var w=p;D&&w--;)M+=D/m|0,D%=m,D*=10;return M}},Object.defineProperty(d,"__esModule",{value:!0}),d.default=d,d.Fraction=d,e.exports=d})()})(Yo);var ct=Ai(Yo.exports),b1="Fraction",B1=[],_1=Ne(b1,B1,()=>(Object.defineProperty(ct,"name",{value:"Fraction"}),ct.prototype.constructor=ct,ct.prototype.type="Fraction",ct.prototype.isFraction=!0,ct.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},ct.fromJSON=function(e){return new ct(e)},ct),{isClass:!0}),S1="Matrix",M1=[],I1=Ne(S1,M1,()=>{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 N1(e){return Object.keys(e.signatures||{}).reduce(function(t,n){var r=(n.match(/,/g)||[]).length+1;return Math.max(t,r)},-1)}var x1="DenseMatrix",O1=["Matrix"],R1=Ne(x1,O1,e=>{var{Matrix:t}=e;function n(f,a){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(a&&!Wn(a))throw new Error("Invalid datatype: "+a);if(gn(f))f.type==="DenseMatrix"?(this._data=It(f._data),this._size=It(f._size),this._datatype=a||f._datatype):(this._data=f.toArray(),this._size=f.size(),this._datatype=a||f._datatype);else if(f&&$e(f.data)&&$e(f.size))this._data=f.data,this._size=f.size,Io(this._data,this._size),this._datatype=a||f.datatype;else if($e(f))this._data=l(f),this._size=Eu(this._data),Io(this._data,this._size),this._datatype=a;else{if(f)throw new TypeError("Unsupported type of data ("+Du(f)+")");this._data=[],this._size=[0],this._datatype=a}}n.prototype=new t,n.prototype.createDenseMatrix=function(f,a){return new n(f,a)},Object.defineProperty(n,"name",{value:"DenseMatrix"}),n.prototype.constructor=n,n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return Cu(this._data,Du)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(f,a){return new n(f,a)},n.prototype.subset=function(f,a,h){switch(arguments.length){case 1:return r(this,f);case 2:case 3:return i(this,f,a,h);default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.get=function(f){if(!$e(f))throw new TypeError("Array expected");if(f.length!==this._size.length)throw new ve(f.length,this._size.length);for(var a=0;a<f.length;a++)qe(f[a],this._size[a]);for(var h=this._data,d=0,p=f.length;d<p;d++){var D=f[d];qe(D,h.length),h=h[D]}return h},n.prototype.set=function(f,a,h){if(!$e(f))throw new TypeError("Array expected");if(f.length<this._size.length)throw new ve(f.length,this._size.length,"<");var d,p,D,m=f.map(function(A){return A+1});s(this,m,h);var g=this._data;for(d=0,p=f.length-1;d<p;d++)D=f[d],qe(D,g.length),g=g[D];return D=f[f.length-1],qe(D,g.length),g[D]=a,this};function r(f,a){if(!yo(a))throw new TypeError("Invalid index");var h=a.isScalar();if(h)return f.get(a.min());var d=a.size();if(d.length!==f._size.length)throw new ve(d.length,f._size.length);for(var p=a.min(),D=a.max(),m=0,g=f._size.length;m<g;m++)qe(p[m],f._size[m]),qe(D[m],f._size[m]);return new n(u(f._data,a,d.length,0),f._datatype)}function u(f,a,h,d){var p=d===h-1,D=a.dimension(d);return p?D.map(function(m){return qe(m,f.length),f[m]}).valueOf():D.map(function(m){qe(m,f.length);var g=f[m];return u(g,a,h,d+1)}).valueOf()}function i(f,a,h,d){if(!a||a.isIndex!==!0)throw new TypeError("Invalid index");var p=a.size(),D=a.isScalar(),m;if(gn(h)?(m=h.size(),h=h.valueOf()):m=Eu(h),D){if(m.length!==0)throw new TypeError("Scalar expected");f.set(a.min(),h,d)}else{if(p.length<f._size.length)throw new ve(p.length,f._size.length,"<");if(m.length<p.length){for(var g=0,A=0;p[g]===1&&m[g]===1;)g++;for(;p[g]===1;)A++,g++;h=fp(h,p.length,A,m)}if(!gu(p,m))throw new ve(p,m,">");var M=a.max().map(function(P){return P+1});s(f,M,d);var w=p.length,x=0;o(f._data,a,h,w,x)}return f}function o(f,a,h,d,p){var D=p===d-1,m=a.dimension(p);D?m.forEach(function(g,A){qe(g),f[g]=h[A[0]]}):m.forEach(function(g,A){qe(g),o(f[g],a,h[A[0]],d,p+1)})}n.prototype.resize=function(f,a,h){if(!pu(f))throw new TypeError("Array or Matrix expected");var d=f.valueOf().map(D=>Array.isArray(D)&&D.length===1?D[0]:D),p=h?this.clone():this;return c(p,d,a)};function c(f,a,h){if(a.length===0){for(var d=f._data;$e(d);)d=d[0];return d}return f._size=a.slice(0),f._data=No(f._data,f._size,h),f}n.prototype.reshape=function(f,a){var h=a?this.clone():this;h._data=sp(h._data,f);var d=h._size.reduce((p,D)=>p*D);return h._size=xo(f,d),h};function s(f,a,h){for(var d=f._size.slice(0),p=!1;d.length<a.length;)d.push(0),p=!0;for(var D=0,m=a.length;D<m;D++)a[D]>d[D]&&(d[D]=a[D],p=!0);p&&c(f,d,h)}n.prototype.clone=function(){var f=new n({data:It(this._data),size:It(this._size),datatype:this._datatype});return f},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(f){var a=this,h=N1(f),d=function m(g,A){return $e(g)?g.map(function(M,w){return m(M,A.concat(w))}):h===1?f(g):h===2?f(g,A):f(g,A,a)},p=d(this._data,[]),D=this._datatype!==void 0?Cu(p,Du):void 0;return new n(p,D)},n.prototype.forEach=function(f){var a=this,h=function d(p,D){$e(p)?p.forEach(function(m,g){d(m,D.concat(g))}):f(p,D,a)};h(this._data,[])},n.prototype[Symbol.iterator]=function*(){var f=function*a(h,d){if($e(h))for(var p=0;p<h.length;p++)yield*a(h[p],d.concat(p));else yield{value:h,index:d}};yield*f(this._data,[])},n.prototype.rows=function(){var f=[],a=this.size();if(a.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");var h=this._data;for(var d of h)f.push(new n([d],this._datatype));return f},n.prototype.columns=function(){var f=this,a=[],h=this.size();if(h.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var d=this._data,p=function(g){var A=d.map(M=>[M[g]]);a.push(new n(A,f._datatype))},D=0;D<h[1];D++)p(D);return a},n.prototype.toArray=function(){return It(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(f){return Nt(this._data,f)},n.prototype.toString=function(){return Nt(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(mt(f)&&(f=f.toNumber()),!Se(f)||!tt(f))throw new TypeError("The parameter k must be an integer number")}else f=0;for(var a=f>0?f:0,h=f<0?-f:0,d=this._size[0],p=this._size[1],D=Math.min(d-h,p-a),m=[],g=0;g<D;g++)m[g]=this._data[g+h][g+a];return new n({data:m,size:[D],datatype:this._datatype})},n.diagonal=function(f,a,h,d){if(!$e(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(L){if(mt(L)&&(L=L.toNumber()),!Se(L)||!tt(L)||L<1)throw new Error("Size values must be positive integers");return L}),h){if(mt(h)&&(h=h.toNumber()),!Se(h)||!tt(h))throw new TypeError("The parameter k must be an integer number")}else h=0;var p=h>0?h:0,D=h<0?-h:0,m=f[0],g=f[1],A=Math.min(m-D,g-p),M;if($e(a)){if(a.length!==A)throw new Error("Invalid value array length");M=function(I){return a[I]}}else if(gn(a)){var w=a.size();if(w.length!==1||w[0]!==A)throw new Error("Invalid matrix length");M=function(I){return a.get([I])}}else M=function(){return a};d||(d=mt(M(0))?M(0).mul(0):0);var x=[];if(f.length>0){x=No(x,f,d);for(var P=0;P<A;P++)x[P+D][P+p]=M(P)}return new n({data:x,size:[m,g]})},n.fromJSON=function(f){return new n(f)},n.prototype.swapRows=function(f,a){if(!Se(f)||!tt(f)||!Se(a)||!tt(a))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return qe(f,this._size[0]),qe(a,this._size[0]),n._swapRows(f,a,this._data),this},n._swapRows=function(f,a,h){var d=h[f];h[f]=h[a],h[a]=d};function l(f){for(var a=0,h=f.length;a<h;a++){var d=f[a];$e(d)?f[a]=l(d):d&&d.isMatrix===!0&&(f[a]=l(d.valueOf()))}return f}return n},{isClass:!0}),ea="equalScalar";Ne(ea,["typed","config"],e=>{var{typed:t,config:n}=e;return t(ea,{"number, number":function(u,i){return np(u,i,n.epsilon)}})});function mn(e,t,n,r){if(!(this instanceof mn))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}mn.prototype=new Error,mn.prototype.constructor=Error,mn.prototype.name="ArgumentsError",mn.prototype.isArgumentsError=!0;var ta="format",T1=["typed"],P1=Ne(ta,T1,e=>{var{typed:t}=e;return t(ta,{any:Nt,"any, Object | function | number":Nt})}),na="bin",$1=["typed","format"];Ne(na,$1,e=>{var{typed:t,format:n}=e;return t(na,{"number | BigNumber":function(u){return n(u,{notation:"bin"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"bin",wordSize:i})}})});var ra="oct",j1=["typed","format"];Ne(ra,j1,e=>{var{typed:t,format:n}=e;return t(ra,{"number | BigNumber":function(u){return n(u,{notation:"oct"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"oct",wordSize:i})}})});var ua="hex",L1=["typed","format"];Ne(ua,L1,e=>{var{typed:t,format:n}=e;return t(ua,{"number | BigNumber":function(u){return n(u,{notation:"hex"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"hex",wordSize:i})}})});var ia="equal";Ne(ia,["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return t(ia,{"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 oa="unequal";Ne(oa,["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return t(oa,{"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 aa={exports:{}};(function(e){(function(t,n,r){function u(s){var l=this,f=c();l.next=function(){var a=2091639*l.s0+l.c*23283064365386963e-26;return l.s0=l.s1,l.s1=l.s2,l.s2=a-(l.c=a|0)},l.c=1,l.s0=f(" "),l.s1=f(" "),l.s2=f(" "),l.s0-=f(s),l.s0<0&&(l.s0+=1),l.s1-=f(s),l.s1<0&&(l.s1+=1),l.s2-=f(s),l.s2<0&&(l.s2+=1),f=null}function i(s,l){return l.c=s.c,l.s0=s.s0,l.s1=s.s1,l.s2=s.s2,l}function o(s,l){var f=new u(s),a=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,a&&(typeof a=="object"&&i(a,f),h.state=function(){return i(f,{})}),h}function c(){var s=4022871197,l=function(f){f=String(f);for(var a=0;a<f.length;a++){s+=f.charCodeAt(a);var h=.02519603282416938*s;s=h>>>0,h-=s,h*=s,s=h>>>0,h-=s,s+=h*4294967296}return(s>>>0)*23283064365386963e-26};return l}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.alea=o})(je,e,!1)})(aa);var sa={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this,l="";s.x=0,s.y=0,s.z=0,s.w=0,s.next=function(){var a=s.x^s.x<<11;return s.x=s.y,s.y=s.z,s.z=s.w,s.w^=s.w>>>19^a^a>>>8},c===(c|0)?s.x=c:l+=c;for(var f=0;f<l.length+64;f++)s.x^=l.charCodeAt(f)|0,s.next()}function i(c,s){return s.x=c.x,s.y=c.y,s.z=c.z,s.w=c.w,s}function o(c,s){var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(typeof f=="object"&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xor128=o})(je,e,!1)})(sa);var ca={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this,l="";s.next=function(){var a=s.x^s.x>>>2;return s.x=s.y,s.y=s.z,s.z=s.w,s.w=s.v,(s.d=s.d+362437|0)+(s.v=s.v^s.v<<4^(a^a<<1))|0},s.x=0,s.y=0,s.z=0,s.w=0,s.v=0,c===(c|0)?s.x=c:l+=c;for(var f=0;f<l.length+64;f++)s.x^=l.charCodeAt(f)|0,f==l.length&&(s.d=s.x<<10^s.x>>>4),s.next()}function i(c,s){return s.x=c.x,s.y=c.y,s.z=c.z,s.w=c.w,s.v=c.v,s.d=c.d,s}function o(c,s){var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(typeof f=="object"&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xorwow=o})(je,e,!1)})(ca);var fa={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this;s.next=function(){var f=s.x,a=s.i,h,d;return h=f[a],h^=h>>>7,d=h^h<<24,h=f[a+1&7],d^=h^h>>>10,h=f[a+3&7],d^=h^h>>>3,h=f[a+4&7],d^=h^h<<7,h=f[a+7&7],h=h^h<<13,d^=h^h<<9,f[a]=d,s.i=a+1&7,d};function l(f,a){var h,d=[];if(a===(a|0))d[0]=a;else for(a=""+a,h=0;h<a.length;++h)d[h&7]=d[h&7]<<15^a.charCodeAt(h)+d[h+1&7]<<13;for(;d.length<8;)d.push(0);for(h=0;h<8&&d[h]===0;++h);for(h==8?d[7]=-1:d[h],f.x=d,f.i=0,h=256;h>0;--h)f.next()}l(s,c)}function i(c,s){return s.x=c.x.slice(),s.i=c.i,s}function o(c,s){c==null&&(c=+new Date);var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(f.x&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xorshift7=o})(je,e,!1)})(fa);var la={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this;s.next=function(){var f=s.w,a=s.X,h=s.i,d,p;return s.w=f=f+1640531527|0,p=a[h+34&127],d=a[h=h+1&127],p^=p<<13,d^=d<<17,p^=p>>>15,d^=d>>>12,p=a[h]=p^d,s.i=h,p+(f^f>>>16)|0};function l(f,a){var h,d,p,D,m,g=[],A=128;for(a===(a|0)?(d=a,a=null):(a=a+"\0",d=0,A=Math.max(A,a.length)),p=0,D=-32;D<A;++D)a&&(d^=a.charCodeAt((D+32)%a.length)),D===0&&(m=d),d^=d<<10,d^=d>>>15,d^=d<<4,d^=d>>>13,D>=0&&(m=m+1640531527|0,h=g[D&127]^=d+m,p=h==0?p+1:0);for(p>=128&&(g[(a&&a.length||0)&127]=-1),p=127,D=4*128;D>0;--D)d=g[p+34&127],h=g[p=p+1&127],d^=d<<13,h^=h<<17,d^=d>>>15,h^=h>>>12,g[p]=d^h;f.w=m,f.X=g,f.i=p}l(s,c)}function i(c,s){return s.i=c.i,s.w=c.w,s.X=c.X.slice(),s}function o(c,s){c==null&&(c=+new Date);var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(f.X&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xor4096=o})(je,e,!1)})(la);var ha={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this,l="";s.next=function(){var a=s.b,h=s.c,d=s.d,p=s.a;return a=a<<25^a>>>7^h,h=h-d|0,d=d<<24^d>>>8^p,p=p-a|0,s.b=a=a<<20^a>>>12^h,s.c=h=h-d|0,s.d=d<<16^h>>>16^p,s.a=p-a|0},s.a=0,s.b=0,s.c=-1640531527,s.d=1367130551,c===Math.floor(c)?(s.a=c/4294967296|0,s.b=c|0):l+=c;for(var f=0;f<l.length+20;f++)s.b^=l.charCodeAt(f)|0,s.next()}function i(c,s){return s.a=c.a,s.b=c.b,s.c=c.c,s.d=c.d,s}function o(c,s){var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(typeof f=="object"&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.tychei=o})(je,e,!1)})(ha);var da={exports:{}};(function(e){(function(t,n,r){var u=256,i=6,o=52,c="random",s=r.pow(u,i),l=r.pow(2,o),f=l*2,a=u-1,h;function d(w,x,P){var L=[];x=x==!0?{entropy:!0}:x||{};var I=g(m(x.entropy?[w,M(n)]:w==null?A():w,3),L),j=new p(L),G=function(){for(var z=j.g(i),ee=s,Y=0;z<l;)z=(z+Y)*u,ee*=u,Y=j.g(1);for(;z>=f;)z/=2,ee/=2,Y>>>=1;return(z+Y)/ee};return G.int32=function(){return j.g(4)|0},G.quick=function(){return j.g(4)/4294967296},G.double=G,g(M(j.S),n),(x.pass||P||function(z,ee,Y,ue){return ue&&(ue.S&&D(ue,j),z.state=function(){return D(j,{})}),Y?(r[c]=z,ee):z})(G,I,"global"in x?x.global:this==r,x.state)}function p(w){var x,P=w.length,L=this,I=0,j=L.i=L.j=0,G=L.S=[];for(P||(w=[P++]);I<u;)G[I]=I++;for(I=0;I<u;I++)G[I]=G[j=a&j+w[I%P]+(x=G[I])],G[j]=x;(L.g=function(z){for(var ee,Y=0,ue=L.i,re=L.j,X=L.S;z--;)ee=X[ue=a&ue+1],Y=Y*u+X[a&(X[ue]=X[re=a&re+ee])+(X[re]=ee)];return L.i=ue,L.j=re,Y})(u)}function D(w,x){return x.i=w.i,x.j=w.j,x.S=w.S.slice(),x}function m(w,x){var P=[],L=typeof w,I;if(x&&L=="object")for(I in w)try{P.push(m(w[I],x-1))}catch(j){}return P.length?P:L=="string"?w:w+"\0"}function g(w,x){for(var P=w+"",L,I=0;I<P.length;)x[a&I]=a&(L^=x[a&I]*19)+P.charCodeAt(I++);return M(x)}function A(){try{var w;return h&&(w=h.randomBytes)?w=w(u):(w=new Uint8Array(u),(t.crypto||t.msCrypto).getRandomValues(w)),M(w)}catch(L){var x=t.navigator,P=x&&x.plugins;return[+new Date,t,P,t.screen,M(n)]}}function M(w){return String.fromCharCode.apply(0,w)}if(g(r.random(),n),e.exports){e.exports=d;try{h=Er.default}catch(w){}}else r["seed"+c]=d})(typeof self!="undefined"?self:je,[],Math)})(da);var q1=aa.exports,k1=sa.exports,V1=ca.exports,U1=fa.exports,H1=la.exports,z1=ha.exports,Zt=da.exports;Zt.alea=q1,Zt.xor128=k1,Zt.xorwow=V1,Zt.xorshift7=U1,Zt.xor4096=H1,Zt.tychei=z1,ur("fineStructure",.0072973525693),ur("weakMixingAngle",.2229),ur("efimovFactor",22.7),ur("sackurTetrode",-1.16487052358);function ur(e,t){var n=["config","BigNumber"];return Ne(e,n,r=>{var{config:u,BigNumber:i}=r;return u.number==="BigNumber"?new i(t):t})}var W1=A1({config:Eo}),Z1=w1({}),G1=_1({}),X1=I1({}),K1=R1({Matrix:X1}),J1=wp({BigNumber:W1,Complex:Z1,DenseMatrix:K1,Fraction:G1}),Q1=P1({typed:J1});class Y1{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===Q.CALC)}getCalcDependencies(){this.calcControls.forEach(t=>{const{scriptEcho:n}=t.props;n.forEach(r=>{(r.type===Ve.VariableInMainTable||r.type===Ve.VariableInCurrentSubTable||r.type===Ve.VariableInOtherSubTable)&&this.setDependenciesTriggerMapItem(r.id,t),r.type===Ve.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,Q.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,o,c;this.resetDependencies();const n=(o=(i=t.options)==null?void 0:i.changed)!=null?o:[];this.getCalcControlsFromSubtableRows(n).forEach(s=>{this.computedCalcValue(s)}),((c=this.dependenciesTriggerMap.get(t.instance.id))!=null?c:[]).forEach(s=>{this.computedCalcValue(s)})})}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)===Q.SUBTABLE_COLUMN}computedCalcValue(t){var s;const n=t.props.scriptEcho;if(!n||n.length===0)return;const r=n.reduce((l,f)=>{if(f.type===Ve.Operator||f.type===Ve.Number)return l+f.name;let a=0,h;switch(f.type){case Ve.VariableInMainTable:{const d=this.getNumberValue(this.engine.getState(f.id));h=this.engine.getInstance(f.id),a=Number(d);break}case Ve.VariableInCurrentSubTable:{const d=this.engine.getInstanceRowIndex(t);h=this.engine.getInstance(f.id,d);const p=this.engine.getState(f.id,d),D=this.getNumberValue(p);a=Number(D);break}case Ve.VariableInOtherSubTable:{const d=this.engine.getState(f.id),p=Array.isArray(d)?d.map(m=>this.getNumberValue(m)):[],D=this.getAggregateTypeValue(p,f.aggregateType);h=this.engine.getInstance(f.subTableId),a=Number(D);break}}return!Number.isNaN(a)&&this.controlNeedComputedValue(h)?l+=`(${a})`:l+=0,l},"");let u;this.cacheComputedResult[r]!==void 0?u=this.cacheComputedResult[r]:(u=Number(Q1(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 o=this.engine.getState(t.id,i),c=!u||u===1/0||u===-1/0?0:t.props.precision===""?u:Number(u.toFixed(t.props.precision));c!==(o==null?void 0:o.result)&&this.engine.setState(t.id,{result:c,unit:(s=o==null?void 0:o.unit)!=null?s:""},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 Tt.MAX:return Math.max(...t);case Tt.MIN:return Math.min(...t);case Tt.SUM:return t.reduce((r,u)=>r+u);case Tt.AVG:return t.reduce((r,u)=>r+u)/t.length}}}class eD{constructor(t){this.config=t}apply(t){var i,o;this.engine=t;const n=(o=(i=this.config)==null?void 0:i.source)!=null?o:"";let r=document.createElement("style");r.className="edit-css",r.type="text/css",r.innerHTML=n,document.querySelector("head").appendChild(r)}}J.CalcPlugin=Y1,J.ControlsEventPlugin=gd,J.ES6ModulePlugin=dd,J.Engine=hu,J.LifecycleEventPlugin=Dd,J.Plugin=hd,J.StylePlugin=eD,J.hasChildrenControl=Hn,J.loopDataViewControl=dn,J.loopFormControl=hn,J.parseModule=po,Object.defineProperty(J,"__esModule",{value:!0})});
|
|
28
|
+
**/(function(e,t){(function(n){var r=2e3,u={s:1,n:0,d:1};function i(p,D){if(isNaN(p=parseInt(p,10)))throw d.InvalidParameter;return p*D}function o(p,D){if(D===0)throw d.DivisionByZero;var m=Object.create(d.prototype);m.s=p<0?-1:1,p=p<0?-p:p;var g=h(p,D);return m.n=p/g,m.d=D/g,m}function c(p){for(var D={},m=p,g=2,A=4;A<=m;){for(;m%g===0;)m/=g,D[g]=(D[g]||0)+1;A+=1+2*g++}return m!==p?m>1&&(D[m]=(D[m]||0)+1):D[p]=(D[p]||0)+1,D}var s=function(p,D){var m=0,g=1,A=1,I=0,w=0,x=0,P=1,L=1,M=0,j=1,G=1,z=1,ee=1e7,Y;if(p!=null)if(D!==void 0){if(m=p,g=D,A=m*g,m%1!==0||g%1!==0)throw d.NonIntegerParameter}else switch(typeof p){case"object":{if("d"in p&&"n"in p)m=p.n,g=p.d,"s"in p&&(m*=p.s);else if(0 in p)m=p[0],1 in p&&(g=p[1]);else throw d.InvalidParameter;A=m*g;break}case"number":{if(p<0&&(A=p,p=-p),p%1===0)m=p;else if(p>0){for(p>=1&&(L=Math.pow(10,Math.floor(1+Math.log(p)/Math.LN10)),p/=L);j<=ee&&z<=ee;)if(Y=(M+G)/(j+z),p===Y){j+z<=ee?(m=M+G,g=j+z):z>j?(m=G,g=z):(m=M,g=j);break}else p>Y?(M+=G,j+=z):(G+=M,z+=j),j>ee?(m=G,g=z):(m=M,g=j);m*=L}else(isNaN(p)||isNaN(D))&&(g=m=NaN);break}case"string":{if(j=p.match(/\d+|./g),j===null)throw d.InvalidParameter;if(j[M]==="-"?(A=-1,M++):j[M]==="+"&&M++,j.length===M+1?w=i(j[M++],A):j[M+1]==="."||j[M]==="."?(j[M]!=="."&&(I=i(j[M++],A)),M++,(M+1===j.length||j[M+1]==="("&&j[M+3]===")"||j[M+1]==="'"&&j[M+3]==="'")&&(w=i(j[M],A),P=Math.pow(10,j[M].length),M++),(j[M]==="("&&j[M+2]===")"||j[M]==="'"&&j[M+2]==="'")&&(x=i(j[M+1],A),L=Math.pow(10,j[M+1].length)-1,M+=3)):j[M+1]==="/"||j[M+1]===":"?(w=i(j[M],A),P=i(j[M+2],1),M+=3):j[M+3]==="/"&&j[M+1]===" "&&(I=i(j[M],A),w=i(j[M+2],A),P=i(j[M+4],1),M+=5),j.length<=M){g=P*L,A=m=x+g*I+L*w;break}}default:throw d.InvalidParameter}if(g===0)throw d.DivisionByZero;u.s=A<0?-1:1,u.n=Math.abs(m),u.d=Math.abs(g)};function l(p,D,m){for(var g=1;D>0;p=p*p%m,D>>=1)D&1&&(g=g*p%m);return g}function f(p,D){for(;D%2===0;D/=2);for(;D%5===0;D/=5);if(D===1)return 0;for(var m=10%D,g=1;m!==1;g++)if(m=m*10%D,g>r)return 0;return g}function a(p,D,m){for(var g=1,A=l(10,m,D),I=0;I<300;I++){if(g===A)return I;g=g*10%D,A=A*10%D}return 0}function h(p,D){if(!p)return D;if(!D)return p;for(;;){if(p%=D,!p)return D;if(D%=p,!D)return p}}function d(p,D){if(s(p,D),this instanceof d)p=h(u.d,u.n),this.s=u.s,this.n=u.n/p,this.d=u.d/p;else return o(u.s*u.n,u.d)}d.DivisionByZero=new Error("Division by Zero"),d.InvalidParameter=new Error("Invalid argument"),d.NonIntegerParameter=new Error("Parameters must be integer"),d.prototype={s:1,n:0,d:1,abs:function(){return o(this.n,this.d)},neg:function(){return o(-this.s*this.n,this.d)},add:function(p,D){return s(p,D),o(this.s*this.n*u.d+u.s*this.d*u.n,this.d*u.d)},sub:function(p,D){return s(p,D),o(this.s*this.n*u.d-u.s*this.d*u.n,this.d*u.d)},mul:function(p,D){return s(p,D),o(this.s*u.s*this.n*u.n,this.d*u.d)},div:function(p,D){return s(p,D),o(this.s*u.s*this.n*u.d,this.d*u.n)},clone:function(){return o(this.s*this.n,this.d)},mod:function(p,D){if(isNaN(this.n)||isNaN(this.d))return new d(NaN);if(p===void 0)return o(this.s*this.n%this.d,1);if(s(p,D),u.n===0&&this.d===0)throw d.DivisionByZero;return o(this.s*(u.d*this.n)%(u.n*this.d),u.d*this.d)},gcd:function(p,D){return s(p,D),o(h(u.n,this.n)*h(u.d,this.d),u.d*this.d)},lcm:function(p,D){return s(p,D),u.n===0&&this.n===0?o(0,1):o(u.n*this.n,h(u.n,this.n)*h(u.d,this.d))},ceil:function(p){return p=Math.pow(10,p||0),isNaN(this.n)||isNaN(this.d)?new d(NaN):o(Math.ceil(p*this.s*this.n/this.d),p)},floor:function(p){return p=Math.pow(10,p||0),isNaN(this.n)||isNaN(this.d)?new d(NaN):o(Math.floor(p*this.s*this.n/this.d),p)},round:function(p){return p=Math.pow(10,p||0),isNaN(this.n)||isNaN(this.d)?new d(NaN):o(Math.round(p*this.s*this.n/this.d),p)},inverse:function(){return o(this.s*this.d,this.n)},pow:function(p,D){if(s(p,D),u.d===1)return u.s<0?o(Math.pow(this.s*this.d,u.n),Math.pow(this.n,u.n)):o(Math.pow(this.s*this.n,u.n),Math.pow(this.d,u.n));if(this.s<0)return null;var m=c(this.n),g=c(this.d),A=1,I=1;for(var w in m)if(w!=="1"){if(w==="0"){A=0;break}if(m[w]*=u.n,m[w]%u.d===0)m[w]/=u.d;else return null;A*=Math.pow(w,m[w])}for(var w in g)if(w!=="1"){if(g[w]*=u.n,g[w]%u.d===0)g[w]/=u.d;else return null;I*=Math.pow(w,g[w])}return u.s<0?o(I,A):o(A,I)},equals:function(p,D){return s(p,D),this.s*this.n*u.d===u.s*u.n*this.d},compare:function(p,D){s(p,D);var m=this.s*this.n*u.d-u.s*u.n*this.d;return(0<m)-(m<0)},simplify:function(p){if(isNaN(this.n)||isNaN(this.d))return this;p=p||.001;for(var D=this.abs(),m=D.toContinued(),g=1;g<m.length;g++){for(var A=o(m[g-1],1),I=g-2;I>=0;I--)A=A.inverse().add(m[I]);if(A.sub(D).abs().valueOf()<p)return A.mul(this.s)}return this},divisible:function(p,D){return s(p,D),!(!(u.n*this.d)||this.n*u.d%(u.n*this.d))},valueOf:function(){return this.s*this.n/this.d},toFraction:function(p){var D,m="",g=this.n,A=this.d;return this.s<0&&(m+="-"),A===1?m+=g:(p&&(D=Math.floor(g/A))>0&&(m+=D,m+=" ",g%=A),m+=g,m+="/",m+=A),m},toLatex:function(p){var D,m="",g=this.n,A=this.d;return this.s<0&&(m+="-"),A===1?m+=g:(p&&(D=Math.floor(g/A))>0&&(m+=D,g%=A),m+="\\frac{",m+=g,m+="}{",m+=A,m+="}"),m},toContinued:function(){var p,D=this.n,m=this.d,g=[];if(isNaN(D)||isNaN(m))return g;do g.push(Math.floor(D/m)),p=D%m,D=m,m=p;while(D!==1);return g},toString:function(p){var D=this.n,m=this.d;if(isNaN(D)||isNaN(m))return"NaN";p=p||15;var g=f(D,m),A=a(D,m,g),I=this.s<0?"-":"";if(I+=D/m|0,D%=m,D*=10,D&&(I+="."),g){for(var w=A;w--;)I+=D/m|0,D%=m,D*=10;I+="(";for(var w=g;w--;)I+=D/m|0,D%=m,D*=10;I+=")"}else for(var w=p;D&&w--;)I+=D/m|0,D%=m,D*=10;return I}},Object.defineProperty(d,"__esModule",{value:!0}),d.default=d,d.Fraction=d,e.exports=d})()})(ta);var ft=Ai(ta.exports),I1="Fraction",M1=[],N1=Ne(I1,M1,()=>(Object.defineProperty(ft,"name",{value:"Fraction"}),ft.prototype.constructor=ft,ft.prototype.type="Fraction",ft.prototype.isFraction=!0,ft.prototype.toJSON=function(){return{mathjs:"Fraction",n:this.s*this.n,d:this.d}},ft.fromJSON=function(e){return new ft(e)},ft),{isClass:!0}),x1="Matrix",O1=[],R1=Ne(x1,O1,()=>{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 T1(e){return Object.keys(e.signatures||{}).reduce(function(t,n){var r=(n.match(/,/g)||[]).length+1;return Math.max(t,r)},-1)}var P1="DenseMatrix",$1=["Matrix"],j1=Ne(P1,$1,e=>{var{Matrix:t}=e;function n(f,a){if(!(this instanceof n))throw new SyntaxError("Constructor must be called with the new operator");if(a&&!Zn(a))throw new Error("Invalid datatype: "+a);if(vn(f))f.type==="DenseMatrix"?(this._data=Mt(f._data),this._size=Mt(f._size),this._datatype=a||f._datatype):(this._data=f.toArray(),this._size=f.size(),this._datatype=a||f._datatype);else if(f&&$e(f.data)&&$e(f.size))this._data=f.data,this._size=f.size,xo(this._data,this._size),this._datatype=a||f.datatype;else if($e(f))this._data=l(f),this._size=Eu(this._data),xo(this._data,this._size),this._datatype=a;else{if(f)throw new TypeError("Unsupported type of data ("+Du(f)+")");this._data=[],this._size=[0],this._datatype=a}}n.prototype=new t,n.prototype.createDenseMatrix=function(f,a){return new n(f,a)},Object.defineProperty(n,"name",{value:"DenseMatrix"}),n.prototype.constructor=n,n.prototype.type="DenseMatrix",n.prototype.isDenseMatrix=!0,n.prototype.getDataType=function(){return Cu(this._data,Du)},n.prototype.storage=function(){return"dense"},n.prototype.datatype=function(){return this._datatype},n.prototype.create=function(f,a){return new n(f,a)},n.prototype.subset=function(f,a,h){switch(arguments.length){case 1:return r(this,f);case 2:case 3:return i(this,f,a,h);default:throw new SyntaxError("Wrong number of arguments")}},n.prototype.get=function(f){if(!$e(f))throw new TypeError("Array expected");if(f.length!==this._size.length)throw new ve(f.length,this._size.length);for(var a=0;a<f.length;a++)qe(f[a],this._size[a]);for(var h=this._data,d=0,p=f.length;d<p;d++){var D=f[d];qe(D,h.length),h=h[D]}return h},n.prototype.set=function(f,a,h){if(!$e(f))throw new TypeError("Array expected");if(f.length<this._size.length)throw new ve(f.length,this._size.length,"<");var d,p,D,m=f.map(function(A){return A+1});s(this,m,h);var g=this._data;for(d=0,p=f.length-1;d<p;d++)D=f[d],qe(D,g.length),g=g[D];return D=f[f.length-1],qe(D,g.length),g[D]=a,this};function r(f,a){if(!Ao(a))throw new TypeError("Invalid index");var h=a.isScalar();if(h)return f.get(a.min());var d=a.size();if(d.length!==f._size.length)throw new ve(d.length,f._size.length);for(var p=a.min(),D=a.max(),m=0,g=f._size.length;m<g;m++)qe(p[m],f._size[m]),qe(D[m],f._size[m]);return new n(u(f._data,a,d.length,0),f._datatype)}function u(f,a,h,d){var p=d===h-1,D=a.dimension(d);return p?D.map(function(m){return qe(m,f.length),f[m]}).valueOf():D.map(function(m){qe(m,f.length);var g=f[m];return u(g,a,h,d+1)}).valueOf()}function i(f,a,h,d){if(!a||a.isIndex!==!0)throw new TypeError("Invalid index");var p=a.size(),D=a.isScalar(),m;if(vn(h)?(m=h.size(),h=h.valueOf()):m=Eu(h),D){if(m.length!==0)throw new TypeError("Scalar expected");f.set(a.min(),h,d)}else{if(p.length<f._size.length)throw new ve(p.length,f._size.length,"<");if(m.length<p.length){for(var g=0,A=0;p[g]===1&&m[g]===1;)g++;for(;p[g]===1;)A++,g++;h=pp(h,p.length,A,m)}if(!gu(p,m))throw new ve(p,m,">");var I=a.max().map(function(P){return P+1});s(f,I,d);var w=p.length,x=0;o(f._data,a,h,w,x)}return f}function o(f,a,h,d,p){var D=p===d-1,m=a.dimension(p);D?m.forEach(function(g,A){qe(g),f[g]=h[A[0]]}):m.forEach(function(g,A){qe(g),o(f[g],a,h[A[0]],d,p+1)})}n.prototype.resize=function(f,a,h){if(!pu(f))throw new TypeError("Array or Matrix expected");var d=f.valueOf().map(D=>Array.isArray(D)&&D.length===1?D[0]:D),p=h?this.clone():this;return c(p,d,a)};function c(f,a,h){if(a.length===0){for(var d=f._data;$e(d);)d=d[0];return d}return f._size=a.slice(0),f._data=Oo(f._data,f._size,h),f}n.prototype.reshape=function(f,a){var h=a?this.clone():this;h._data=hp(h._data,f);var d=h._size.reduce((p,D)=>p*D);return h._size=Ro(f,d),h};function s(f,a,h){for(var d=f._size.slice(0),p=!1;d.length<a.length;)d.push(0),p=!0;for(var D=0,m=a.length;D<m;D++)a[D]>d[D]&&(d[D]=a[D],p=!0);p&&c(f,d,h)}n.prototype.clone=function(){var f=new n({data:Mt(this._data),size:Mt(this._size),datatype:this._datatype});return f},n.prototype.size=function(){return this._size.slice(0)},n.prototype.map=function(f){var a=this,h=T1(f),d=function m(g,A){return $e(g)?g.map(function(I,w){return m(I,A.concat(w))}):h===1?f(g):h===2?f(g,A):f(g,A,a)},p=d(this._data,[]),D=this._datatype!==void 0?Cu(p,Du):void 0;return new n(p,D)},n.prototype.forEach=function(f){var a=this,h=function d(p,D){$e(p)?p.forEach(function(m,g){d(m,D.concat(g))}):f(p,D,a)};h(this._data,[])},n.prototype[Symbol.iterator]=function*(){var f=function*a(h,d){if($e(h))for(var p=0;p<h.length;p++)yield*a(h[p],d.concat(p));else yield{value:h,index:d}};yield*f(this._data,[])},n.prototype.rows=function(){var f=[],a=this.size();if(a.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");var h=this._data;for(var d of h)f.push(new n([d],this._datatype));return f},n.prototype.columns=function(){var f=this,a=[],h=this.size();if(h.length!==2)throw new TypeError("Rows can only be returned for a 2D matrix.");for(var d=this._data,p=function(g){var A=d.map(I=>[I[g]]);a.push(new n(A,f._datatype))},D=0;D<h[1];D++)p(D);return a},n.prototype.toArray=function(){return Mt(this._data)},n.prototype.valueOf=function(){return this._data},n.prototype.format=function(f){return Nt(this._data,f)},n.prototype.toString=function(){return Nt(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(mt(f)&&(f=f.toNumber()),!Se(f)||!nt(f))throw new TypeError("The parameter k must be an integer number")}else f=0;for(var a=f>0?f:0,h=f<0?-f:0,d=this._size[0],p=this._size[1],D=Math.min(d-h,p-a),m=[],g=0;g<D;g++)m[g]=this._data[g+h][g+a];return new n({data:m,size:[D],datatype:this._datatype})},n.diagonal=function(f,a,h,d){if(!$e(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(L){if(mt(L)&&(L=L.toNumber()),!Se(L)||!nt(L)||L<1)throw new Error("Size values must be positive integers");return L}),h){if(mt(h)&&(h=h.toNumber()),!Se(h)||!nt(h))throw new TypeError("The parameter k must be an integer number")}else h=0;var p=h>0?h:0,D=h<0?-h:0,m=f[0],g=f[1],A=Math.min(m-D,g-p),I;if($e(a)){if(a.length!==A)throw new Error("Invalid value array length");I=function(M){return a[M]}}else if(vn(a)){var w=a.size();if(w.length!==1||w[0]!==A)throw new Error("Invalid matrix length");I=function(M){return a.get([M])}}else I=function(){return a};d||(d=mt(I(0))?I(0).mul(0):0);var x=[];if(f.length>0){x=Oo(x,f,d);for(var P=0;P<A;P++)x[P+D][P+p]=I(P)}return new n({data:x,size:[m,g]})},n.fromJSON=function(f){return new n(f)},n.prototype.swapRows=function(f,a){if(!Se(f)||!nt(f)||!Se(a)||!nt(a))throw new Error("Row index must be positive integers");if(this._size.length!==2)throw new Error("Only two dimensional matrix is supported");return qe(f,this._size[0]),qe(a,this._size[0]),n._swapRows(f,a,this._data),this},n._swapRows=function(f,a,h){var d=h[f];h[f]=h[a],h[a]=d};function l(f){for(var a=0,h=f.length;a<h;a++){var d=f[a];$e(d)?f[a]=l(d):d&&d.isMatrix===!0&&(f[a]=l(d.valueOf()))}return f}return n},{isClass:!0}),na="equalScalar";Ne(na,["typed","config"],e=>{var{typed:t,config:n}=e;return t(na,{"number, number":function(u,i){return op(u,i,n.epsilon)}})});function yn(e,t,n,r){if(!(this instanceof yn))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}yn.prototype=new Error,yn.prototype.constructor=Error,yn.prototype.name="ArgumentsError",yn.prototype.isArgumentsError=!0;var ra="format",L1=["typed"],q1=Ne(ra,L1,e=>{var{typed:t}=e;return t(ra,{any:Nt,"any, Object | function | number":Nt})}),ua="bin",k1=["typed","format"];Ne(ua,k1,e=>{var{typed:t,format:n}=e;return t(ua,{"number | BigNumber":function(u){return n(u,{notation:"bin"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"bin",wordSize:i})}})});var ia="oct",V1=["typed","format"];Ne(ia,V1,e=>{var{typed:t,format:n}=e;return t(ia,{"number | BigNumber":function(u){return n(u,{notation:"oct"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"oct",wordSize:i})}})});var oa="hex",U1=["typed","format"];Ne(oa,U1,e=>{var{typed:t,format:n}=e;return t(oa,{"number | BigNumber":function(u){return n(u,{notation:"hex"})},"number | BigNumber, number":function(u,i){return n(u,{notation:"hex",wordSize:i})}})});var aa="equal";Ne(aa,["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return t(aa,{"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 sa="unequal";Ne(sa,["typed","equalScalar"],e=>{var{typed:t,equalScalar:n}=e;return t(sa,{"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 ca={exports:{}};(function(e){(function(t,n,r){function u(s){var l=this,f=c();l.next=function(){var a=2091639*l.s0+l.c*23283064365386963e-26;return l.s0=l.s1,l.s1=l.s2,l.s2=a-(l.c=a|0)},l.c=1,l.s0=f(" "),l.s1=f(" "),l.s2=f(" "),l.s0-=f(s),l.s0<0&&(l.s0+=1),l.s1-=f(s),l.s1<0&&(l.s1+=1),l.s2-=f(s),l.s2<0&&(l.s2+=1),f=null}function i(s,l){return l.c=s.c,l.s0=s.s0,l.s1=s.s1,l.s2=s.s2,l}function o(s,l){var f=new u(s),a=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,a&&(typeof a=="object"&&i(a,f),h.state=function(){return i(f,{})}),h}function c(){var s=4022871197,l=function(f){f=String(f);for(var a=0;a<f.length;a++){s+=f.charCodeAt(a);var h=.02519603282416938*s;s=h>>>0,h-=s,h*=s,s=h>>>0,h-=s,s+=h*4294967296}return(s>>>0)*23283064365386963e-26};return l}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.alea=o})(je,e,!1)})(ca);var fa={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this,l="";s.x=0,s.y=0,s.z=0,s.w=0,s.next=function(){var a=s.x^s.x<<11;return s.x=s.y,s.y=s.z,s.z=s.w,s.w^=s.w>>>19^a^a>>>8},c===(c|0)?s.x=c:l+=c;for(var f=0;f<l.length+64;f++)s.x^=l.charCodeAt(f)|0,s.next()}function i(c,s){return s.x=c.x,s.y=c.y,s.z=c.z,s.w=c.w,s}function o(c,s){var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(typeof f=="object"&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xor128=o})(je,e,!1)})(fa);var la={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this,l="";s.next=function(){var a=s.x^s.x>>>2;return s.x=s.y,s.y=s.z,s.z=s.w,s.w=s.v,(s.d=s.d+362437|0)+(s.v=s.v^s.v<<4^(a^a<<1))|0},s.x=0,s.y=0,s.z=0,s.w=0,s.v=0,c===(c|0)?s.x=c:l+=c;for(var f=0;f<l.length+64;f++)s.x^=l.charCodeAt(f)|0,f==l.length&&(s.d=s.x<<10^s.x>>>4),s.next()}function i(c,s){return s.x=c.x,s.y=c.y,s.z=c.z,s.w=c.w,s.v=c.v,s.d=c.d,s}function o(c,s){var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(typeof f=="object"&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xorwow=o})(je,e,!1)})(la);var ha={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this;s.next=function(){var f=s.x,a=s.i,h,d;return h=f[a],h^=h>>>7,d=h^h<<24,h=f[a+1&7],d^=h^h>>>10,h=f[a+3&7],d^=h^h>>>3,h=f[a+4&7],d^=h^h<<7,h=f[a+7&7],h=h^h<<13,d^=h^h<<9,f[a]=d,s.i=a+1&7,d};function l(f,a){var h,d=[];if(a===(a|0))d[0]=a;else for(a=""+a,h=0;h<a.length;++h)d[h&7]=d[h&7]<<15^a.charCodeAt(h)+d[h+1&7]<<13;for(;d.length<8;)d.push(0);for(h=0;h<8&&d[h]===0;++h);for(h==8?d[7]=-1:d[h],f.x=d,f.i=0,h=256;h>0;--h)f.next()}l(s,c)}function i(c,s){return s.x=c.x.slice(),s.i=c.i,s}function o(c,s){c==null&&(c=+new Date);var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(f.x&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xorshift7=o})(je,e,!1)})(ha);var da={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this;s.next=function(){var f=s.w,a=s.X,h=s.i,d,p;return s.w=f=f+1640531527|0,p=a[h+34&127],d=a[h=h+1&127],p^=p<<13,d^=d<<17,p^=p>>>15,d^=d>>>12,p=a[h]=p^d,s.i=h,p+(f^f>>>16)|0};function l(f,a){var h,d,p,D,m,g=[],A=128;for(a===(a|0)?(d=a,a=null):(a=a+"\0",d=0,A=Math.max(A,a.length)),p=0,D=-32;D<A;++D)a&&(d^=a.charCodeAt((D+32)%a.length)),D===0&&(m=d),d^=d<<10,d^=d>>>15,d^=d<<4,d^=d>>>13,D>=0&&(m=m+1640531527|0,h=g[D&127]^=d+m,p=h==0?p+1:0);for(p>=128&&(g[(a&&a.length||0)&127]=-1),p=127,D=4*128;D>0;--D)d=g[p+34&127],h=g[p=p+1&127],d^=d<<13,h^=h<<17,d^=d>>>15,h^=h>>>12,g[p]=d^h;f.w=m,f.X=g,f.i=p}l(s,c)}function i(c,s){return s.i=c.i,s.w=c.w,s.X=c.X.slice(),s}function o(c,s){c==null&&(c=+new Date);var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(f.X&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.xor4096=o})(je,e,!1)})(da);var pa={exports:{}};(function(e){(function(t,n,r){function u(c){var s=this,l="";s.next=function(){var a=s.b,h=s.c,d=s.d,p=s.a;return a=a<<25^a>>>7^h,h=h-d|0,d=d<<24^d>>>8^p,p=p-a|0,s.b=a=a<<20^a>>>12^h,s.c=h=h-d|0,s.d=d<<16^h>>>16^p,s.a=p-a|0},s.a=0,s.b=0,s.c=-1640531527,s.d=1367130551,c===Math.floor(c)?(s.a=c/4294967296|0,s.b=c|0):l+=c;for(var f=0;f<l.length+20;f++)s.b^=l.charCodeAt(f)|0,s.next()}function i(c,s){return s.a=c.a,s.b=c.b,s.c=c.c,s.d=c.d,s}function o(c,s){var l=new u(c),f=s&&s.state,a=function(){return(l.next()>>>0)/4294967296};return a.double=function(){do var h=l.next()>>>11,d=(l.next()>>>0)/4294967296,p=(h+d)/(1<<21);while(p===0);return p},a.int32=l.next,a.quick=a,f&&(typeof f=="object"&&i(f,l),a.state=function(){return i(l,{})}),a}n&&n.exports?n.exports=o:r&&r.amd?r(function(){return o}):this.tychei=o})(je,e,!1)})(pa);var Da={exports:{}};(function(e){(function(t,n,r){var u=256,i=6,o=52,c="random",s=r.pow(u,i),l=r.pow(2,o),f=l*2,a=u-1,h;function d(w,x,P){var L=[];x=x==!0?{entropy:!0}:x||{};var M=g(m(x.entropy?[w,I(n)]:w==null?A():w,3),L),j=new p(L),G=function(){for(var z=j.g(i),ee=s,Y=0;z<l;)z=(z+Y)*u,ee*=u,Y=j.g(1);for(;z>=f;)z/=2,ee/=2,Y>>>=1;return(z+Y)/ee};return G.int32=function(){return j.g(4)|0},G.quick=function(){return j.g(4)/4294967296},G.double=G,g(I(j.S),n),(x.pass||P||function(z,ee,Y,ue){return ue&&(ue.S&&D(ue,j),z.state=function(){return D(j,{})}),Y?(r[c]=z,ee):z})(G,M,"global"in x?x.global:this==r,x.state)}function p(w){var x,P=w.length,L=this,M=0,j=L.i=L.j=0,G=L.S=[];for(P||(w=[P++]);M<u;)G[M]=M++;for(M=0;M<u;M++)G[M]=G[j=a&j+w[M%P]+(x=G[M])],G[j]=x;(L.g=function(z){for(var ee,Y=0,ue=L.i,re=L.j,X=L.S;z--;)ee=X[ue=a&ue+1],Y=Y*u+X[a&(X[ue]=X[re=a&re+ee])+(X[re]=ee)];return L.i=ue,L.j=re,Y})(u)}function D(w,x){return x.i=w.i,x.j=w.j,x.S=w.S.slice(),x}function m(w,x){var P=[],L=typeof w,M;if(x&&L=="object")for(M in w)try{P.push(m(w[M],x-1))}catch(j){}return P.length?P:L=="string"?w:w+"\0"}function g(w,x){for(var P=w+"",L,M=0;M<P.length;)x[a&M]=a&(L^=x[a&M]*19)+P.charCodeAt(M++);return I(x)}function A(){try{var w;return h&&(w=h.randomBytes)?w=w(u):(w=new Uint8Array(u),(t.crypto||t.msCrypto).getRandomValues(w)),I(w)}catch(L){var x=t.navigator,P=x&&x.plugins;return[+new Date,t,P,t.screen,I(n)]}}function I(w){return String.fromCharCode.apply(0,w)}if(g(r.random(),n),e.exports){e.exports=d;try{h=Ar.default}catch(w){}}else r["seed"+c]=d})(typeof self!="undefined"?self:je,[],Math)})(Da);var H1=ca.exports,z1=fa.exports,W1=la.exports,Z1=ha.exports,G1=da.exports,X1=pa.exports,Zt=Da.exports;Zt.alea=H1,Zt.xor128=z1,Zt.xorwow=W1,Zt.xorshift7=Z1,Zt.xor4096=G1,Zt.tychei=X1,ir("fineStructure",.0072973525693),ir("weakMixingAngle",.2229),ir("efimovFactor",22.7),ir("sackurTetrode",-1.16487052358);function ir(e,t){var n=["config","BigNumber"];return Ne(e,n,r=>{var{config:u,BigNumber:i}=r;return u.number==="BigNumber"?new i(t):t})}var K1=b1({config:Co}),J1=S1({}),Q1=N1({}),Y1=R1({}),eD=j1({Matrix:Y1}),tD=Sp({BigNumber:K1,Complex:J1,DenseMatrix:eD,Fraction:Q1}),nD=q1({typed:tD});class rD{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===Q.CALC)}getCalcDependencies(){this.calcControls.forEach(t=>{const{scriptEcho:n}=t.props;n.forEach(r=>{(r.type===Ve.VariableInMainTable||r.type===Ve.VariableInCurrentSubTable||r.type===Ve.VariableInOtherSubTable)&&this.setDependenciesTriggerMapItem(r.id,t),r.type===Ve.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,Q.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,o,c;this.resetDependencies();const n=(o=(i=t.options)==null?void 0:i.changed)!=null?o:[];this.getCalcControlsFromSubtableRows(n).forEach(s=>{this.computedCalcValue(s)}),((c=this.dependenciesTriggerMap.get(t.instance.id))!=null?c:[]).forEach(s=>{this.computedCalcValue(s)})})}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)===Q.SUBTABLE_COLUMN}computedCalcValue(t){var s;const n=t.props.scriptEcho;if(!n||n.length===0)return;const r=n.reduce((l,f)=>{if(f.type===Ve.Operator||f.type===Ve.Number)return l+f.name;let a=0,h;switch(f.type){case Ve.VariableInMainTable:{const d=this.getNumberValue(this.engine.getState(f.id));h=this.engine.getInstance(f.id),a=Number(d);break}case Ve.VariableInCurrentSubTable:{const d=this.engine.getInstanceRowIndex(t);h=this.engine.getInstance(f.id,d);const p=this.engine.getState(f.id,d),D=this.getNumberValue(p);a=Number(D);break}case Ve.VariableInOtherSubTable:{const d=this.engine.getState(f.id),p=Array.isArray(d)?d.map(m=>this.getNumberValue(m)):[],D=this.getAggregateTypeValue(p,f.aggregateType);h=this.engine.getInstance(f.subTableId),a=Number(D);break}}return!Number.isNaN(a)&&this.controlNeedComputedValue(h)?l+=`(${a})`:l+=0,l},"");let u;this.cacheComputedResult[r]!==void 0?u=this.cacheComputedResult[r]:(u=Number(nD(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 o=this.engine.getState(t.id,i),c=!u||u===1/0||u===-1/0?0:t.props.precision===""?u:Number(u.toFixed(t.props.precision));c!==(o==null?void 0:o.result)&&this.engine.setState(t.id,{result:c,unit:(s=o==null?void 0:o.unit)!=null?s:""},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 Tt.MAX:return Math.max(...t);case Tt.MIN:return Math.min(...t);case Tt.SUM:return t.reduce((r,u)=>r+u);case Tt.AVG:return t.reduce((r,u)=>r+u)/t.length}}}class uD{constructor(t){this.config=t}apply(t){var i,o;this.engine=t;const n=(o=(i=this.config)==null?void 0:i.source)!=null?o:"";let r=document.createElement("style");r.className="edit-css",r.type="text/css",r.innerHTML=n,document.querySelector("head").appendChild(r)}}J.CalcPlugin=rD,J.ControlsEventPlugin=Ed,J.ES6ModulePlugin=vd,J.Engine=hu,J.LifecycleEventPlugin=yd,J.Plugin=gd,J.StylePlugin=uD,J.hasChildrenControl=zn,J.loopDataViewControl=pn,J.loopFormControl=dn,J.parseModule=go,Object.defineProperty(J,"__esModule",{value:!0})});
|