@hpcc-js/comms 3.17.7 → 3.17.8
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/browser/index.js +80 -73
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.umd.cjs +1 -1
- package/dist/browser/index.umd.cjs.map +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.cjs.map +4 -4
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +4 -4
- package/package.json +5 -5
- package/src/ecl/logicalFile.ts +2 -2
- package/src/services/wsDFU.ts +2 -2
- package/types/services/wsDFU.d.ts +3 -3
- package/types/services/wsdl/WsDfu/v1.68/WsDfu.d.ts +1050 -0
- package/types/services/wsdl/WsDfu/v1.67/WsDfu.d.ts +0 -1026
package/dist/node/index.js
CHANGED
|
@@ -907,7 +907,7 @@ AZKXRRJ+oPM+rRk6ct30UJMDEr5E0k9BpIycnR+j9sKS50gU/k6bpZFXrsY3crsC
|
|
|
907
907
|
MGclCrEMXu6pY5Jv5ZAL/mYiykf9ijH3g/56vxC+GCsej/YpHpRZ744hN8tRmKVu
|
|
908
908
|
Sw==
|
|
909
909
|
-----END CERTIFICATE-----
|
|
910
|
-
`;var Va="__PACKAGE_NAME__",Ha="__PACKAGE_VERSION__",ja="__BUILD_VERSION__";import{join as Gt}from"@hpcc-js/util";import{join as ks,promiseTimeout as vi,root as ht,scopedLogger as Vi,utf8ToBase64 as Hi}from"@hpcc-js/util";var Ln=Vi("comms/connection.ts");function Ya(n){return"baseUrl"in n}var ji={type:"post",baseUrl:"",userID:"",password:"",rejectUnauthorized:!0,timeoutSecs:60};function Xa(n){return typeof n.opts=="function"&&typeof n.send=="function"&&typeof n.clone=="function"}function Pe(n,e){return e===void 0||e===!0?encodeURIComponent(n):""+n}function qe(n,e=!0,t=""){if(t&&(t+="."),typeof n!="object")return Pe(n,e);let s=[];for(let r in n)if(n.hasOwnProperty(r))if(n[r]instanceof Array){let i=!1;n[r].forEach((o,c)=>{typeof o=="object"?(i=!0,s.push(qe(o,e,t+Pe(`${r}.${c}`,e)))):s.push(t+Pe(`${r}_i${c}`,e)+"="+qe(o,e))}),i&&s.push(t+Pe(`${r}.itemcount`,e)+"="+n[r].length)}else typeof n[r]=="object"?n[r]&&n[r].Item instanceof Array?(s.push(qe(n[r].Item,e,t+Pe(r,e))),s.push(t+Pe(`${r}.itemcount`,e)+"="+n[r].Item.length)):s.push(qe(n[r],e,t+Pe(r,e))):n[r]!==void 0?s.push(t+Pe(r,e)+"="+Pe(n[r],e)):s.push(t+Pe(r,e));return s.join("&")}function Oi(n){return JSON.parse(n)}function _i(n,e,t={},s="json",r){return r&&console.warn("Header attributes ignored for JSONP connections"),new Promise((i,o)=>{let c=n.timeoutSecs*1e3,d=5e3,x="jsonp_callback_"+Math.round(Math.random()*999999);window[x]=function(N){c=0,I(),i(s==="json"&&typeof N=="string"?Oi(N):N)};let l=document.createElement("script"),E=ks(n.baseUrl,e);E+=E.indexOf("?")>=0?"&":"?",l.src=E+"jsonp="+x+"&"+qe(t,n.encodeRequest),document.body.appendChild(l);let R=setInterval(function(){c<=0?clearInterval(R):(c-=d,c<=0?(clearInterval(R),Ln.error("Request timeout: "+l.src),I(),o(Error("Request timeout: "+l.src))):Ln.debug("Request pending ("+c/1e3+" sec): "+l.src))},d);function I(){delete window[x],document.body.removeChild(l)}})}function Yi(n){return n.userID?{Authorization:`Basic ${Hi(`${n.userID}:${n.password}`)}`}:{}}var Bt={};function Gn(n,e,t,s,r){s={...Yi(n),...s},t={credentials:Bt[n.baseUrl]?"omit":"include",...t,headers:s},n.baseUrl.indexOf("https:")===0&&(n.rejectUnauthorized===!1&&ht.__hpcc_rejectUnauthorizedAgent?t.dispatcher=ht.__hpcc_rejectUnauthorizedAgent:ht.__hpcc_trustwaveAgent&&(t.agent=ht.__hpcc_trustwaveAgent));function i(c){if(c.ok)return r==="json"?c.json():c.text();throw new Error(c.statusText)}let o=ht.__hpcc_undiciFetch??fetch;return vi(n.timeoutSecs*1e3,o(ks(n.baseUrl,e),t).then(i).catch(c=>(t.credentials=Bt[n.baseUrl]?"include":"omit",o(ks(n.baseUrl,e),t).then(i).then(d=>(Bt[n.baseUrl]=!Bt[n.baseUrl],d)))))}function Xi(n,e,t,s="json",r){t.upload_&&(delete t.upload_,e+="?upload_");let i;return t.abortSignal_&&(i=t.abortSignal_,delete t.abortSignal_),Gn(n,e,{method:"post",body:qe(t,n.encodeRequest),signal:i},{"Content-Type":"application/x-www-form-urlencoded",...r},s)}function qi(n,e,t,s="json",r){let i;return t.abortSignal_&&(i=t.abortSignal_,delete t.abortSignal_),Gn(n,`${e}?${qe(t,n.encodeRequest)}`,{method:"get",signal:i},{...r},s)}function zi(n,e,t,s="json",r){let i;switch(n.type){case"jsonp":i=_i(n,e,t,s,r);break;case"get":i=qi(n,e,t,s,r);break;default:i=Xi(n,e,t,s,r);break}return i}var Qt=zi;function qa(n){let e=Qt;return n&&(Qt=n),e}var vs=class n{_opts;get baseUrl(){return this._opts.baseUrl}constructor(e){this.opts(e)}opts(e){return arguments.length===0?this._opts:(this._opts={...ji,...e},this)}send(e,t,s="json",r){return this._opts.hookSend?this._opts.hookSend(this._opts,e,t,s,Qt,r):Qt(this._opts,e,t,s,r)}clone(){return new n(this.opts())}},Lt=function(n){return new vs(n)};function za(n){let e=Lt;return Lt=n,e}function Ji(n){return Object.prototype.toString.call(n)==="[object Array]"}var ze=class extends Error{isESPExceptions=!0;action;request;Source;Exception;constructor(e,t,s){super("ESPException: "+s.Source),this.action=e,this.request=t,this.Source=s.Source,this.Exception=s.Exception,s.Exception.length?this.message=`${s.Exception[0].Code}: ${s.Exception[0].Message}`:this.message=""}};function sc(n){return n instanceof ze||n.isESPExceptions&&Array.isArray(n.Exception)}function Ki(n){return n.send!==void 0}var Vs=class n{_connection;get baseUrl(){return this._connection.opts().baseUrl}_service;_version;constructor(e,t,s){this._connection=Ki(e)?e:Lt(e),this._service=t,this._version=s}service(e){return e===void 0?this._service:(this._service=e,this)}version(e){return e===void 0?this._version:(this._version=e,this)}toESPStringArray(e,t){if(Ji(e[t])){for(let s=0;s<e[t].length;++s)e[t+"_i"+s]=e[t][s];delete e[t]}return e}opts(e){return e===void 0?this._connection.opts():(this._connection.opts(e),this)}send(e,t={},s="json",r=!1,i,o){let c={...t,ver_:this._version};r&&(c.upload_=!0),i&&(c.abortSignal_=i);let d,x="json";switch(s){case"text":d=Gt(this._service,e),x="text";break;case"xsd":d=Gt(this._service,e+".xsd"),x="text";break;case"json2":d=Gt(this._service,e+"/json"),s="json",e=e.split("/").pop();break;default:d=Gt(this._service,e+".json")}return this._connection.send(d,c,x).then(l=>{if(s==="json"){let E;if(l&&l.Exceptions)throw new ze(e,c,l.Exceptions);if(l&&(E=l[o||e+"Response"]),!E)throw new ze(e,c,{Source:"ESPConnection.send",Exception:[{Code:0,Message:"Missing Response"}]});return E}return l})}clone(){return new n(this._connection.clone(),this._service,this._version)}},v=class{_connection;get baseUrl(){return this._connection.opts().baseUrl}constructor(e,t,s){this._connection=new Vs(e,t,s)}opts(){return this._connection.opts()}connection(){return this._connection.clone()}};var ft;(t=>{let n;(x=>(x.Delete="Delete",x.Protect="Protect",x.Unprotect="Unprotect",x.Restore="Restore",x.SetToFailed="SetToFailed",x.Archive="Archive"))(n=t.DFUWUActions||={});let e;(N=>(N.copy="copy",N.remove="remove",N.move="move",N.rename="rename",N.replicate="replicate",N.import="import",N.export="export",N.monitor="monitor",N.copymerge="copymerge",N.supercopy="supercopy",N.publish="publish"))(e=t.DFUCommand||={})})(ft||={});var kt=class extends v{constructor(e){super(e,"FileSpray","1.29")}AbortDFUWorkunit(e,t){return this._connection.send("AbortDFUWorkunit",e,"json",!1,t,"AbortDFUWorkunitResponse")}Copy(e,t){return this._connection.send("Copy",e,"json",!1,t,"CopyResponse")}CreateDFUPublisherWorkunit(e,t){return this._connection.send("CreateDFUPublisherWorkunit",e,"json",!1,t,"CreateDFUPublisherWorkunitResponse")}CreateDFUWorkunit(e,t){return this._connection.send("CreateDFUWorkunit",e,"json",!1,t,"CreateDFUWorkunitResponse")}DFUWUFile(e,t){return this._connection.send("DFUWUFile",e,"json",!1,t,"DFUWUFileResponse")}DFUWUSearch(e,t){return this._connection.send("DFUWUSearch",e,"json",!1,t,"DFUWUSearchResponse")}DFUWorkunitsAction(e,t){return this._connection.send("DFUWorkunitsAction",e,"json",!1,t,"DFUWorkunitsActionResponse")}DeleteDFUWorkunit(e,t){return this._connection.send("DeleteDFUWorkunit",e,"json",!1,t,"DeleteDFUWorkunitResponse")}DeleteDFUWorkunits(e,t){return this._connection.send("DeleteDFUWorkunits",e,"json",!1,t,"DeleteDFUWorkunitsResponse")}DeleteDropZoneFiles(e,t){return this._connection.send("DeleteDropZoneFiles",e,"json",!1,t,"DFUWorkunitsActionResponse")}Despray(e,t){return this._connection.send("Despray",e,"json",!1,t,"DesprayResponse")}DfuMonitor(e,t){return this._connection.send("DfuMonitor",e,"json",!1,t,"DfuMonitorResponse")}DropZoneFileSearch(e,t){return this._connection.send("DropZoneFileSearch",e,"json",!1,t,"DropZoneFileSearchResponse")}DropZoneFiles(e,t){return this._connection.send("DropZoneFiles",e,"json",!1,t,"DropZoneFilesResponse")}EchoDateTime(e,t){return this._connection.send("EchoDateTime",e,"json",!1,t,"EchoDateTimeResponse")}FileList(e,t){return this._connection.send("FileList",e,"json",!1,t,"FileListResponse")}GetDFUExceptions(e,t){return this._connection.send("GetDFUExceptions",e,"json",!1,t,"GetDFUExceptionsResponse")}GetDFUProgress(e,t){return this._connection.send("GetDFUProgress",e,"json",!1,t,"ProgressResponse")}GetDFUServerQueues(e,t){return this._connection.send("GetDFUServerQueues",e,"json",!1,t,"GetDFUServerQueuesResponse")}GetDFUWorkunit(e,t){return this._connection.send("GetDFUWorkunit",e,"json",!1,t,"GetDFUWorkunitResponse")}GetDFUWorkunits(e,t){return this._connection.send("GetDFUWorkunits",e,"json",!1,t,"GetDFUWorkunitsResponse")}GetRemoteTargets(e,t){return this._connection.send("GetRemoteTargets",e,"json",!1,t,"GetRemoteTargetsResponse")}GetSprayTargets(e,t){return this._connection.send("GetSprayTargets",e,"json",!1,t,"GetSprayTargetsResponse")}OpenSave(e,t){return this._connection.send("OpenSave",e,"json",!1,t,"OpenSaveResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"FileSprayPingResponse")}Rename(e,t){return this._connection.send("Rename",e,"json",!1,t,"RenameResponse")}Replicate(e,t){return this._connection.send("Replicate",e,"json",!1,t,"ReplicateResponse")}ShowResult(e,t){return this._connection.send("ShowResult",e,"json",!1,t,"ShowResultResponse")}SprayFixed(e,t){return this._connection.send("SprayFixed",e,"json",!1,t,"SprayFixedResponse")}SprayVariable(e,t){return this._connection.send("SprayVariable",e,"json",!1,t,"SprayResponse")}SubmitDFUWorkunit(e,t){return this._connection.send("SubmitDFUWorkunit",e,"json",!1,t,"SubmitDFUWorkunitResponse")}UpdateDFUWorkunit(e,t){return this._connection.send("UpdateDFUWorkunit",e,"json",!1,t,"UpdateDFUWorkunitResponse")}};var Zi=(l=>(l[l.unknown=0]="unknown",l[l.scheduled=1]="scheduled",l[l.queued=2]="queued",l[l.started=3]="started",l[l.aborted=4]="aborted",l[l.failed=5]="failed",l[l.finished=6]="finished",l[l.monitoring=7]="monitoring",l[l.aborting=8]="aborting",l[l.notfound=999]="notfound",l))(Zi||{}),Je=class extends kt{DFUWUFileEx(e){return this._connection.send("DFUWUFile",e,"text")}SprayFixedEx(e){return this._connection.send("SprayFixed",e)}SprayVariableEx(e){return this._connection.send("SprayVariable",e,"json",!1,null,"SprayResponse")}DesprayEx(e){return this._connection.send("Despray",e)}UpdateDFUWorkunitEx(e){return this._connection.send("UpdateDFUWorkunit",e,"json",!1,void 0,"UpdateDFUWorkunitResponse")}};var kn;(o=>{let n;(x=>(x.User="User",x.Group="Group"))(n=o.ViewMemberType||={});let e;(R=>(R.username="username",R.fullname="fullname",R.passwordexpiration="passwordexpiration",R.employeeID="employeeID",R.employeeNumber="employeeNumber"))(e=o.UserSortBy||={});let t;(x=>(x.Name="Name",x.ManagedBy="ManagedBy"))(t=o.GroupSortBy||={});let s;(l=>(l.Any="Any",l.User="User",l.Group="Group"))(s=o.AccountTypeReq||={});let r;(x=>(x.Name="Name",x.Type="Type"))(r=o.ResourcePermissionSortBy||={});let i;(d=>d.Name="Name")(i=o.ResourceSortBy||={})})(kn||={});var vt=class extends v{constructor(e){super(e,"ws_access","1.17")}AccountPermissions(e,t){return this._connection.send("AccountPermissions",e,"json",!1,t,"AccountPermissionsResponse")}AccountPermissionsV2(e,t){return this._connection.send("AccountPermissionsV2",e,"json",!1,t,"AccountPermissionsV2Response")}AddUser(e,t){return this._connection.send("AddUser",e,"json",!1,t,"AddUserResponse")}AddView(e,t){return this._connection.send("AddView",e,"json",!1,t,"AddViewResponse")}AddViewColumn(e,t){return this._connection.send("AddViewColumn",e,"json",!1,t,"AddViewColumnResponse")}AddViewMember(e,t){return this._connection.send("AddViewMember",e,"json",!1,t,"AddViewMemberResponse")}ClearPermissionsCache(e,t){return this._connection.send("ClearPermissionsCache",e,"json",!1,t,"ClearPermissionsCacheResponse")}DeleteView(e,t){return this._connection.send("DeleteView",e,"json",!1,t,"DeleteViewResponse")}DeleteViewColumn(e,t){return this._connection.send("DeleteViewColumn",e,"json",!1,t,"DeleteViewColumnResponse")}DeleteViewMember(e,t){return this._connection.send("DeleteViewMember",e,"json",!1,t,"DeleteViewMemberResponse")}DisableScopeScans(e,t){return this._connection.send("DisableScopeScans",e,"json",!1,t,"DisableScopeScansResponse")}EnableScopeScans(e,t){return this._connection.send("EnableScopeScans",e,"json",!1,t,"EnableScopeScansResponse")}FilePermission(e,t){return this._connection.send("FilePermission",e,"json",!1,t,"FilePermissionResponse")}GroupAction(e,t){return this._connection.send("GroupAction",e,"json",!1,t,"GroupActionResponse")}GroupAdd(e,t){return this._connection.send("GroupAdd",e,"json",!1,t,"GroupAddResponse")}GroupEdit(e,t){return this._connection.send("GroupEdit",e,"json",!1,t,"GroupEditResponse")}GroupMemberEdit(e,t){return this._connection.send("GroupMemberEdit",e,"json",!1,t,"GroupMemberEditResponse")}GroupMemberEditInput(e,t){return this._connection.send("GroupMemberEditInput",e,"json",!1,t,"GroupMemberEditInputResponse")}GroupMemberQuery(e,t){return this._connection.send("GroupMemberQuery",e,"json",!1,t,"GroupMemberQueryResponse")}GroupQuery(e,t){return this._connection.send("GroupQuery",e,"json",!1,t,"GroupQueryResponse")}Groups(e,t){return this._connection.send("Groups",e,"json",!1,t,"GroupResponse")}PermissionAction(e,t){return this._connection.send("PermissionAction",e,"json",!1,t,"PermissionActionResponse")}Permissions(e,t){return this._connection.send("Permissions",e,"json",!1,t,"BasednsResponse")}PermissionsReset(e,t){return this._connection.send("PermissionsReset",e,"json",!1,t,"PermissionsResetResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"ws_accessPingResponse")}QueryScopeScansEnabled(e,t){return this._connection.send("QueryScopeScansEnabled",e,"json",!1,t,"QueryScopeScansEnabledResponse")}QueryUserViewColumns(e,t){return this._connection.send("QueryUserViewColumns",e,"json",!1,t,"QueryUserViewColumnsResponse")}QueryViewColumns(e,t){return this._connection.send("QueryViewColumns",e,"json",!1,t,"QueryViewColumnsResponse")}QueryViewMembers(e,t){return this._connection.send("QueryViewMembers",e,"json",!1,t,"QueryViewMembersResponse")}QueryViews(e,t){return this._connection.send("QueryViews",e,"json",!1,t,"QueryViewsResponse")}ResourceAdd(e,t){return this._connection.send("ResourceAdd",e,"json",!1,t,"ResourceAddResponse")}ResourceDelete(e,t){return this._connection.send("ResourceDelete",e,"json",!1,t,"ResourceDeleteResponse")}ResourcePermissionQuery(e,t){return this._connection.send("ResourcePermissionQuery",e,"json",!1,t,"ResourcePermissionQueryResponse")}ResourcePermissions(e,t){return this._connection.send("ResourcePermissions",e,"json",!1,t,"ResourcePermissionsResponse")}ResourceQuery(e,t){return this._connection.send("ResourceQuery",e,"json",!1,t,"ResourceQueryResponse")}Resources(e,t){return this._connection.send("Resources",e,"json",!1,t,"ResourcesResponse")}UserAccountExport(e,t){return this._connection.send("UserAccountExport",e,"json",!1,t,"UserAccountExportResponse")}UserAction(e,t){return this._connection.send("UserAction",e,"json",!1,t,"UserActionResponse")}UserEdit(e,t){return this._connection.send("UserEdit",e,"json",!1,t,"UserEditResponse")}UserGroupEdit(e,t){return this._connection.send("UserGroupEdit",e,"json",!1,t,"UserGroupEditResponse")}UserGroupEditInput(e,t){return this._connection.send("UserGroupEditInput",e,"json",!1,t,"UserGroupEditInputResponse")}UserInfoEdit(e,t){return this._connection.send("UserInfoEdit",e,"json",!1,t,"UserInfoEditResponse")}UserInfoEditInput(e,t){return this._connection.send("UserInfoEditInput",e,"json",!1,t,"UserInfoEditInputResponse")}UserPosix(e,t){return this._connection.send("UserPosix",e,"json",!1,t,"UserPosixResponse")}UserPosixInput(e,t){return this._connection.send("UserPosixInput",e,"json",!1,t,"UserPosixInputResponse")}UserQuery(e,t){return this._connection.send("UserQuery",e,"json",!1,t,"UserQueryResponse")}UserResetPass(e,t){return this._connection.send("UserResetPass",e,"json",!1,t,"UserResetPassResponse")}UserResetPassInput(e,t){return this._connection.send("UserResetPassInput",e,"json",!1,t,"UserResetPassInputResponse")}UserSudoers(e,t){return this._connection.send("UserSudoers",e,"json",!1,t,"UserSudoersResponse")}UserSudoersInput(e,t){return this._connection.send("UserSudoersInput",e,"json",!1,t,"UserSudoersInputResponse")}Users(e,t){return this._connection.send("Users",e,"json",!1,t,"UserResponse")}};var vn=class extends vt{};var Vt=class extends v{constructor(e){super(e,"ws_account","1.07")}MyAccount(e,t){return this._connection.send("MyAccount",e,"json",!1,t,"MyAccountResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"ws_accountPingResponse")}UpdateUser(e,t){return this._connection.send("UpdateUser",e,"json",!1,t,"UpdateUserResponse")}UpdateUserInput(e,t){return this._connection.send("UpdateUserInput",e,"json",!1,t,"UpdateUserInputResponse")}VerifyUser(e,t){return this._connection.send("VerifyUser",e,"json",!1,t,"VerifyUserResponse")}};var Vn=class extends Vt{VerifyUser(e){return this._connection.send("VerifyUser",e).catch(t=>{if(t.isESPExceptions&&t.Exception.some(s=>s.Code===20043))return{retcode:20043,Exceptions:{Source:"wsAccount",Exception:t.Exception}};throw t})}};import{scopedLogger as $i}from"@hpcc-js/util";var Ht=class extends v{constructor(e){super(e,"WsCloud","1.02")}GetPODs(e,t){return this._connection.send("GetPODs",e,"json",!1,t,"GetPODsResponse")}GetServices(e,t){return this._connection.send("GetServices",e,"json",!1,t,"GetServicesResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WsCloudPingResponse")}};var eo=$i("@hpcc-js/comms/services/wsCloud.ts");function to(n){return n?.Pods!==void 0}function so(n){return n.spec?.containers?.reduce((e,t)=>(t.ports?.forEach(s=>{e.push({ContainerPort:s.containerPort,Name:s.name,Protocol:s.protocol})}),e),[])??[]}function no(n){return n.filter(e=>{let t=e?.metadata?.labels??{};return t.hasOwnProperty("app.kubernetes.io/part-of")&&t["app.kubernetes.io/part-of"]==="HPCC-Platform"}).map(e=>{let t=new Date(e.metadata?.creationTimestamp);return{Name:e.metadata.name,Status:e.status?.phase,CreationTimestamp:t.toISOString(),ContainerName:e.status?.containerStatuses?.reduce((s,r)=>(r.name&&s.push(r.name),s),[]).join(", ")??"",ContainerCount:e.spec?.containers?.length??0,ContainerReadyCount:e.status?.containerStatuses?.reduce((s,r)=>s+(r.ready?1:0),0),ContainerRestartCount:e.status?.containerStatuses?.reduce((s,r)=>s+r.restartCount,0),Ports:{Port:so(e)}}})}var Hn=class extends Ht{getPODs(){return super.GetPODs({}).then(e=>{if(to(e))return e.Pods?.Pod??[];try{let t=typeof e.Result=="string"?JSON.parse(e.Result):e.Result;return no(t?.items??[])}catch(t){return eo.error(`Error parsing V1Pods json '${t instanceof Error?t.message:String(t)}'`),[]}})}};var Hs;(e=>{let n;(s=>s.gpg="gpg")(n=e.SigningMethodType||={})})(Hs||={});var jt=class extends v{constructor(e){super(e,"ws_codesign","1.1")}ListUserIDs(e,t){return this._connection.send("ListUserIDs",e,"json",!1,t,"ListUserIDsResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"ws_codesignPingResponse")}Sign(e,t){return this._connection.send("Sign",e,"json",!1,t,"SignResponse")}Verify(e,t){return this._connection.send("Verify",e,"json",!1,t,"VerifyResponse")}};var jn=class extends jt{ListUserIDsEx(e){return super.ListUserIDs(e).then(t=>t.UserIDs.Item).catch(t=>[])}Sign(e){return super.Sign({SigningMethod:Hs.SigningMethodType.gpg,...e})}};var Ot=class extends v{constructor(e){super(e,"WSDali","1.07")}Add(e,t){return this._connection.send("Add",e,"json",!1,t,"ResultResponse")}ClearTraceTransactions(e,t){return this._connection.send("ClearTraceTransactions",e,"json",!1,t,"ResultResponse")}Count(e,t){return this._connection.send("Count",e,"json",!1,t,"CountResponse")}DFSCheck(e,t){return this._connection.send("DFSCheck",e,"json",!1,t,"ResultResponse")}DFSExists(e,t){return this._connection.send("DFSExists",e,"json",!1,t,"BooleanResponse")}DFSLS(e,t){return this._connection.send("DFSLS",e,"json",!1,t,"ResultResponse")}Delete(e,t){return this._connection.send("Delete",e,"json",!1,t,"ResultResponse")}DisconnectClientConnection(e,t){return this._connection.send("DisconnectClientConnection",e,"json",!1,t,"ResultResponse")}GetClients(e,t){return this._connection.send("GetClients",e,"json",!1,t,"ResultResponse")}GetConnections(e,t){return this._connection.send("GetConnections",e,"json",!1,t,"ResultResponse")}GetDFSCSV(e,t){return this._connection.send("GetDFSCSV",e,"json",!1,t,"ResultResponse")}GetDFSMap(e,t){return this._connection.send("GetDFSMap",e,"json",!1,t,"ResultResponse")}GetDFSParents(e,t){return this._connection.send("GetDFSParents",e,"json",!1,t,"ResultResponse")}GetLogicalFile(e,t){return this._connection.send("GetLogicalFile",e,"json",!1,t,"ResultResponse")}GetLogicalFilePart(e,t){return this._connection.send("GetLogicalFilePart",e,"json",!1,t,"ResultResponse")}GetProtectedList(e,t){return this._connection.send("GetProtectedList",e,"json",!1,t,"ResultResponse")}GetSDSStats(e,t){return this._connection.send("GetSDSStats",e,"json",!1,t,"ResultResponse")}GetSDSSubscribers(e,t){return this._connection.send("GetSDSSubscribers",e,"json",!1,t,"ResultResponse")}GetValue(e,t){return this._connection.send("GetValue",e,"json",!1,t,"ResultResponse")}Import(e,t){return this._connection.send("Import",e,"json",!1,t,"ResultResponse")}ListSDSLocks(e,t){return this._connection.send("ListSDSLocks",e,"json",!1,t,"ResultResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WSDaliPingResponse")}SaveSDSStore(e,t){return this._connection.send("SaveSDSStore",e,"json",!1,t,"ResultResponse")}SetLogicalFilePartAttr(e,t){return this._connection.send("SetLogicalFilePartAttr",e,"json",!1,t,"ResultResponse")}SetProtected(e,t){return this._connection.send("SetProtected",e,"json",!1,t,"ResultResponse")}SetTraceSlowTransactions(e,t){return this._connection.send("SetTraceSlowTransactions",e,"json",!1,t,"ResultResponse")}SetTraceTransactions(e,t){return this._connection.send("SetTraceTransactions",e,"json",!1,t,"ResultResponse")}SetUnprotected(e,t){return this._connection.send("SetUnprotected",e,"json",!1,t,"ResultResponse")}SetValue(e,t){return this._connection.send("SetValue",e,"json",!1,t,"ResultResponse")}UnlockSDSLock(e,t){return this._connection.send("UnlockSDSLock",e,"json",!1,t,"ResultResponse")}};var On=class extends Ot{};var it;(c=>{let n;(R=>(R.Delete="Delete",R.AddToSuperfile="Add To Superfile",R.ChangeProtection="Change Protection",R.ChangeRestriction="Change Restriction"))(n=c.DFUArrayActions||={});let e;(R=>(R[R.NoChange=0]="NoChange",R[R.Protect=1]="Protect",R[R.Unprotect=2]="Unprotect",R[R.UnprotectAll=3]="UnprotectAll"))(e=c.DFUChangeProtection||={});let t;(E=>(E[E.NoChange=0]="NoChange",E[E.Restrict=1]="Restrict",E[E.Unrestricted=2]="Unrestricted"))(t=c.DFUChangeRestriction||={});let s;(l=>(l.xml="xml",l.def="def"))(s=c.DFUDefFileFormat||={});let r;(E=>(E.Token="Token",E.Engine="Engine",E.External="External"))(r=c.FileAccessRole||={});let i;(I=>(I.None="None",I.Access="Access",I.Read="Read",I.Write="Write",I.Full="Full"))(i=c.SecAccessType||={});let o;(j=>(j.Flat="Flat",j.Index="Index",j.Xml="Xml",j.Csv="Csv",j.Json="Json",j.IndexLocal="IndexLocal",j.IndexPartitioned="IndexPartitioned",j.Unset="Unset"))(o=c.DFUFileType||={})})(it||={});var _t=class extends v{constructor(e){super(e,"WsDfu","1.67")}Add(e){return this._connection.send("Add",e,"json",!1,void 0,"AddResponse")}AddRemote(e){return this._connection.send("AddRemote",e,"json",!1,void 0,"AddRemoteResponse")}AddtoSuperfile(e){return this._connection.send("AddtoSuperfile",e,"json",!1,void 0,"AddtoSuperfileResponse")}DFUArrayAction(e){return this._connection.send("DFUArrayAction",e,"json",!1,void 0,"DFUArrayActionResponse")}DFUBrowseData(e){return this._connection.send("DFUBrowseData",e,"json",!1,void 0,"DFUBrowseDataResponse")}DFUDefFile(e){return this._connection.send("DFUDefFile",e,"json",!1,void 0,"DFUDefFileResponse")}DFUFileAccess(e){return this._connection.send("DFUFileAccess",e,"json",!1,void 0,"DFUFileAccessResponse")}DFUFileAccessV2(e){return this._connection.send("DFUFileAccessV2",e,"json",!1,void 0,"DFUFileAccessResponse")}DFUFileCreate(e){return this._connection.send("DFUFileCreate",e,"json",!1,void 0,"DFUFileCreateResponse")}DFUFileCreateV2(e){return this._connection.send("DFUFileCreateV2",e,"json",!1,void 0,"DFUFileCreateResponse")}DFUFilePublish(e){return this._connection.send("DFUFilePublish",e,"json",!1,void 0,"DFUFilePublishResponse")}DFUFileView(e){return this._connection.send("DFUFileView",e,"json",!1,void 0,"DFUFileViewResponse")}DFUGetDataColumns(e){return this._connection.send("DFUGetDataColumns",e,"json",!1,void 0,"DFUGetDataColumnsResponse")}DFUGetFileMetaData(e){return this._connection.send("DFUGetFileMetaData",e,"json",!1,void 0,"DFUGetFileMetaDataResponse")}DFUGetMetaInquiry(e){return this._connection.send("DFUGetMetaInquiry",e,"json",!1,void 0,"DFUMetaInquiryResponse")}DFUInfo(e){return this._connection.send("DFUInfo",e,"json",!1,void 0,"DFUInfoResponse")}DFUQuery(e){return this._connection.send("DFUQuery",e,"json",!1,void 0,"DFUQueryResponse")}DFURecordTypeInfo(e){return this._connection.send("DFURecordTypeInfo",e,"json",!1,void 0,"DFURecordTypeInfoResponse")}DFUSearch(e){return this._connection.send("DFUSearch",e,"json",!1,void 0,"DFUSearchResponse")}DFUSearchData(e){return this._connection.send("DFUSearchData",e,"json",!1,void 0,"DFUSearchDataResponse")}DFUSpace(e){return this._connection.send("DFUSpace",e,"json",!1,void 0,"DFUSpaceResponse")}EclRecordTypeInfo(e){return this._connection.send("EclRecordTypeInfo",e,"json",!1,void 0,"EclRecordTypeInfoResponse")}EraseHistory(e){return this._connection.send("EraseHistory",e,"json",!1,void 0,"EraseHistoryResponse")}ListHistory(e){return this._connection.send("ListHistory",e,"json",!1,void 0,"ListHistoryResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsDfuPingResponse")}Savexml(e){return this._connection.send("Savexml",e,"json",!1,void 0,"SavexmlResponse")}SuperfileAction(e){return this._connection.send("SuperfileAction",e,"json",!1,void 0,"SuperfileActionResponse")}SuperfileList(e){return this._connection.send("SuperfileList",e,"json",!1,void 0,"SuperfileListResponse")}};var Bc=it.DFUArrayActions,Qc=it.DFUDefFileFormat,Lc=it.DFUChangeProtection,Gc=it.DFUChangeRestriction,St=class extends _t{DFUFile(e){return this._connection.send("DFUDefFile",e,"text")}async recursiveFetchLogicalFiles(e){let t=[],s=[];return await Promise.all(e.map(r=>this.DFUInfo({Cluster:r.NodeGroup,Name:r.Name,IncludeJsonTypeInfo:!1,IncludeBinTypeInfo:!1,ForceIndexInfo:!1}).then(i=>{for(let o of i?.FileDetail?.Superfiles?.DFULogicalFile??[])t.push(o);for(let o of i?.FileDetail?.subfiles?.Item??[])s.push(o)}))),s.concat(t.length?await this.recursiveFetchLogicalFiles(t):[])}};var Yt=class extends v{constructor(e){super(e,"WsDFUXRef","1.04")}DFUXRefArrayAction(e,t){return this._connection.send("DFUXRefArrayAction",e,"json",!1,t,"DFUXRefArrayActionResponse")}DFUXRefBuild(e,t){return this._connection.send("DFUXRefBuild",e,"json",!1,t,"DFUXRefBuildResponse")}DFUXRefBuildCancel(e,t){return this._connection.send("DFUXRefBuildCancel",e,"json",!1,t,"DFUXRefBuildCancelResponse")}DFUXRefCleanDirectories(e,t){return this._connection.send("DFUXRefCleanDirectories",e,"json",!1,t,"DFUXRefCleanDirectoriesResponse")}DFUXRefDirectories(e,t){return this._connection.send("DFUXRefDirectories",e,"json",!1,t,"DFUXRefDirectoriesQueryResponse")}DFUXRefFoundFiles(e,t){return this._connection.send("DFUXRefFoundFiles",e,"json",!1,t,"DFUXRefFoundFilesQueryResponse")}DFUXRefList(e,t){return this._connection.send("DFUXRefList",e,"json",!1,t,"DFUXRefListResponse")}DFUXRefLostFiles(e,t){return this._connection.send("DFUXRefLostFiles",e,"json",!1,t,"DFUXRefLostFilesQueryResponse")}DFUXRefMessages(e,t){return this._connection.send("DFUXRefMessages",e,"json",!1,t,"DFUXRefMessagesQueryResponse")}DFUXRefOrphanFiles(e,t){return this._connection.send("DFUXRefOrphanFiles",e,"json",!1,t,"DFUXRefOrphanFilesQueryResponse")}DFUXRefUnusedFiles(e,t){return this._connection.send("DFUXRefUnusedFiles",e,"json",!1,t,"DFUXRefUnusedFilesResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WsDFUXRefPingResponse")}};var _n=class extends Yt{DFUXRefDirectoriesEx(e){return this._connection.send("DFUXRefDirectories",e,"json",!1,void 0,"DFUXRefDirectoriesQueryResponse")}DFUXRefListEx(e){return this._connection.send("DFUXRefList",e,"json",!1,void 0,"DFUXRefListResponse")}};function Yn(n,e){let t=typeof e;switch(t){case"boolean":case"number":case"string":return{id:n,type:t};case"object":if(e.Row instanceof Array&&(e=e.Row),e instanceof Array)return{id:n,type:"dataset",children:js(e[0])};if(e instanceof Object){if(e.Item&&e.Item instanceof Array&&e.Item.length===1){let s=typeof e.Item[0];if(s==="string"||s==="number")return{id:n,type:"set",fieldType:s};throw new Error("Unknown field type")}return{id:n,type:"object",fields:ro(e)}}default:throw new Error("Unknown field type")}}function js(n){n.Row&&n.Row instanceof Array&&(n=n.Row[0]);let e=[];for(let t in n)e.push(Yn(t,n[t]));return e}function ro(n){let e={};for(let t in n)e[t]=Yn(t,n[t]);return e}var Xt=class extends v{constructor(e){super(e,"WsEcl","0")}opts(){return this._connection.opts()}requestJson(e,t){return this._connection.send(`example/request/query/${e}/${t}/json`,{},"text").then(s=>{let r=JSON.parse(s);for(let i in r)return r[i];return{}}).then(js)}responseJson(e,t){return this._connection.send(`example/response/query/${e}/${t}/json`,{},"text").then(s=>{let r=JSON.parse(s);for(let i in r)return r[i].Results;return{}}).then(s=>{let r={};for(let i in s)r[i]=js(s[i]);return r})}submit(e,t,s){let r=`submit/query/${e}/${t}`;return this._connection.send(r,s,"json2").then(i=>{if(i.Results&&i.Results.Exception)throw new ze(r,s,{Source:"wsEcl.submit",Exception:i.Results.Exception});return i.Results})}};var qt=class extends v{constructor(e){super(e,"ws_elk","1")}GetConfigDetails(e,t){return this._connection.send("GetConfigDetails",e,"json",!1,t,"GetConfigDetailsResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"ws_elkPingResponse")}};var Xn=class extends qt{};import{scopedLogger as io}from"@hpcc-js/util";var te;(d=>{let n;(F=>(F.global="global",F.workunits="workunits",F.components="components",F.audience="audience",F.class="class",F.instance="instance",F.node="node",F.message="message",F.logid="logid",F.processid="processid",F.threadid="threadid",F.timestamp="timestamp",F.pod="pod",F.traceid="traceid",F.spanid="spanid"))(n=d.LogColumnType||={});let e;(N=>(N.string="string",N.numeric="numeric",N.datetime="datetime",N.enum="enum",N.epoch="epoch"))(e=d.LogColumnValueType||={});let t;(T=>(T[T.All=0]="All",T[T.ByJobID=1]="ByJobID",T[T.ByComponent=2]="ByComponent",T[T.ByLogType=3]="ByLogType",T[T.ByTargetAudience=4]="ByTargetAudience",T[T.BySourceInstance=5]="BySourceInstance",T[T.BySourceNode=6]="BySourceNode",T[T.ByFieldName=7]="ByFieldName",T[T.ByPod=8]="ByPod",T[T.ByTraceID=9]="ByTraceID",T[T.BySpanID=10]="BySpanID"))(t=d.LogAccessType||={});let s;(R=>(R[R.Success=0]="Success",R[R.Warning=1]="Warning",R[R.Fail=2]="Fail"))(s=d.LogAccessStatusCode||={});let r;(R=>(R[R.NONE=0]="NONE",R[R.AND=1]="AND",R[R.OR=2]="OR"))(r=d.LogAccessFilterOperator||={});let i;(I=>(I[I.MIN=0]="MIN",I[I.DEFAULT=1]="DEFAULT",I[I.ALL=2]="ALL",I[I.CUSTOM=3]="CUSTOM"))(i=d.LogSelectColumnMode||={});let o;(T=>(T[T.ByDate=0]="ByDate",T[T.ByJobID=1]="ByJobID",T[T.ByComponent=2]="ByComponent",T[T.ByLogType=3]="ByLogType",T[T.ByTargetAudience=4]="ByTargetAudience",T[T.BySourceInstance=5]="BySourceInstance",T[T.BySourceNode=6]="BySourceNode",T[T.ByFieldName=7]="ByFieldName",T[T.ByPod=8]="ByPod",T[T.ByTraceID=9]="ByTraceID",T[T.BySpanID=10]="BySpanID"))(o=d.SortColumType||={});let c;(E=>(E[E.ASC=0]="ASC",E[E.DSC=1]="DSC"))(c=d.SortDirection||={})})(te||={});var zt=class extends v{constructor(e){super(e,"ws_logaccess","1.08")}GetHealthReport(e){return this._connection.send("GetHealthReport",e,"json",!1,void 0,"GetHealthReportResponse")}GetLogAccessInfo(e){return this._connection.send("GetLogAccessInfo",e,"json",!1,void 0,"GetLogAccessInfoResponse")}GetLogs(e){return this._connection.send("GetLogs",e,"json",!1,void 0,"GetLogsResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_logaccessPingResponse")}};var qn=io("@hpcc-js/comms/services/wsLogaccess.ts");var oo=(o=>(o.Disaster="DIS",o.Error="ERR",o.Warning="WRN",o.Information="INF",o.Progress="PRO",o.Metric="MET",o))(oo||{}),ao=(r=>(r.Operator="OPR",r.User="USR",r.Programmer="PRO",r.Audit="ADT",r))(ao||{}),co=new Set(["azureloganalyticscurl","elasticstack","grafanacurl"]),uo=new Set(Object.values(te.LogColumnType));function lo(n){switch(n){case te.LogColumnType.workunits:case"hpcc.log.jobid":return te.LogAccessType.ByJobID;case te.LogColumnType.audience:case"hpcc.log.audience":return te.LogAccessType.ByTargetAudience;case te.LogColumnType.class:case"hpcc.log.class":return te.LogAccessType.ByLogType;case te.LogColumnType.components:case"kubernetes.container.name":return te.LogAccessType.ByComponent;default:return te.LogAccessType.ByFieldName}}var go=["audience","class","workunits","message","processid","logid","threadid","timestamp","components","instance"];function po(n,e){let t=[];for(let s of go){let r=n[s];if(r==null||r===""||Array.isArray(r)&&r.length===0||!(s in e))continue;let o=uo.has(s)?s:e[s],c=lo(o);c===te.LogAccessType.ByFieldName&&(o=e[s]);let d=c===te.LogAccessType.ByComponent,x=Array.isArray(r)?r:[r];for(let l of x)t.push({LogCategory:c,SearchField:o,SearchByValue:d?l+"*":l})}return t}function Jt(n){let e={leftFilter:n[0]},t=e;for(let s=1;s<n.length;s++)t.Operator=te.LogAccessFilterOperator.OR,s===n.length-1?t.rightFilter=n[s]:(t.rightBinaryFilter={BinaryLogFilter:[{leftFilter:n[s]}]},t=t.rightBinaryFilter.BinaryLogFilter[0]);return e}function Jn(n){let[e,...t]=n,s={};if(e.length===1?s.leftFilter=e[0]:s.leftBinaryFilter={BinaryLogFilter:[Jt(e)]},t.length===0)return s;if(s.Operator=te.LogAccessFilterOperator.AND,t.length===1){let[r]=t;r.length===1?s.rightFilter=r[0]:s.rightBinaryFilter={BinaryLogFilter:[Jt(r)]}}else s.rightBinaryFilter={BinaryLogFilter:[Jn(t)]};return s}function mo(n){let e=new Map;for(let o of n){let c=e.get(o.SearchField);c?c.push(o):e.set(o.SearchField,[o])}let t=[...e.values()];if(t.length===0)return{leftFilter:{LogCategory:te.LogAccessType.All}};let[s,...r]=t,i={};if(s.length===1?i.leftFilter=s[0]:i.leftBinaryFilter={BinaryLogFilter:[Jt(s)]},r.length===0)return i;if(i.Operator=te.LogAccessFilterOperator.AND,r.length===1){let[o]=r;o.length===1?i.rightFilter=o[0]:i.rightBinaryFilter={BinaryLogFilter:[Jt(o)]}}else i.rightBinaryFilter={BinaryLogFilter:[Jn(r)]};return i}var zn=class extends zt{_logAccessInfo;GetLogAccessInfo(e={}){return this._logAccessInfo||(this._logAccessInfo=super.GetLogAccessInfo(e)),this._logAccessInfo}GetLogs(e){return super.GetLogs(e)}convertLogLine(e,t){let s={},r=t?.fields?Object.assign({},...t.fields):null;for(let i in e)s[i]=r?r[e[i]]??"":"";return s}async GetLogsEx(e){let t=await this.GetLogAccessInfo(),s={};t.Columns.Column.forEach(c=>s[c.LogType]=c.Name);let r=po(e,s),i={StartDate:e.StartDate instanceof Date?e.StartDate.toISOString():new Date(0).toISOString()};e.EndDate instanceof Date&&(i.EndDate=e.EndDate.toISOString());let o={Filter:mo(r),Range:i,LogLineStartFrom:e.LogLineStartFrom??0,LogLineLimit:e.LogLineLimit??100,SelectColumnMode:te.LogSelectColumnMode.DEFAULT,Format:"JSON",SortBy:{SortCondition:[{BySortType:te.SortColumType.ByDate,ColumnName:"",Direction:0}]}};return this.GetLogs(o).then(c=>{try{let d=JSON.parse(c.LogLines);return{lines:co.has(t.RemoteLogManagerType)?d.lines?.map(l=>this.convertLogLine(s,l))??[]:(qn.warning(`Unknown RemoteLogManagerType: ${t.RemoteLogManagerType}`),[]),total:c.TotalLogLinesAvailable??1e4}}catch(d){qn.error(d.message??d)}return{lines:[],total:0}})}};var Ge=mt(Zn(),1);import{exists as fo}from"@hpcc-js/util";var ho;(t=>{let n;(i=>(i[i.THRESHOLD_PERCENTAGE=0]="THRESHOLD_PERCENTAGE",i[i.THRESHOLD_MB=1]="THRESHOLD_MB"))(n=t.ThresholdType||={});let e;(I=>(I.ALLNODES="ALLNODES",I.THORMACHINES="THORMACHINES",I.HOLEMACHINES="HOLEMACHINES",I.ROXIEMACHINES="ROXIEMACHINES",I.MACHINES="MACHINES",I.AVAILABLEMACHINES="AVAILABLEMACHINES",I.DROPZONE="DROPZONE",I.STANDBYNNODE="STANDBYNNODE",I.THORSPARENODES="THORSPARENODES",I.HOLESTANDBYNODES="HOLESTANDBYNODES"))(e=t.TpMachineType||={})})(ho||={});var Zt=class extends v{constructor(e){super(e,"ws_machine","1.19")}GetComponentStatus(e,t){return this._connection.send("GetComponentStatus",e,"json",!1,t,"GetComponentStatusResponse")}GetComponentUsage(e,t){return this._connection.send("GetComponentUsage",e,"json",!1,t,"GetComponentUsageResponse")}GetMachineInfo(e,t){return this._connection.send("GetMachineInfo",e,"json",!1,t,"GetMachineInfoResponse")}GetMachineInfoEx(e,t){return this._connection.send("GetMachineInfoEx",e,"json",!1,t,"GetMachineInfoResponseEx")}GetMetrics(e,t){return this._connection.send("GetMetrics",e,"json",!1,t,"MetricsResponse")}GetNodeGroupUsage(e,t){return this._connection.send("GetNodeGroupUsage",e,"json",!1,t,"GetNodeGroupUsageResponse")}GetTargetClusterInfo(e,t){return this._connection.send("GetTargetClusterInfo",e,"json",!1,t,"GetTargetClusterInfoResponse")}GetTargetClusterUsage(e,t){return this._connection.send("GetTargetClusterUsage",e,"json",!1,t,"GetTargetClusterUsageResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"ws_machinePingResponse")}UpdateComponentStatus(e,t){return this._connection.send("UpdateComponentStatus",e,"json",!1,t,"UpdateComponentStatusResponse")}};var ke=class extends Zt{GetTargetClusterUsageEx(e,t=!1){return this._connection.send("GetTargetClusterUsage",{TargetClusters:e?{Item:e}:{},BypassCachedResult:t}).then(s=>fo("TargetClusterUsages.TargetClusterUsage",s)?s.TargetClusterUsages.TargetClusterUsage:[]).then(s=>s.filter(r=>!!r.ComponentUsages).map(r=>{let i=r.ComponentUsages.ComponentUsage.map(o=>{let c=(o.MachineUsages&&o.MachineUsages.MachineUsage?o.MachineUsages.MachineUsage:[]).map(d=>{let x=d.DiskUsages&&d.DiskUsages.DiskUsage?d.DiskUsages.DiskUsage.map(l=>({...l,InUse:l.InUse*1024,Total:(l.InUse+l.Available)*1024,PercentUsed:100-l.PercentAvailable})):[];return{Name:d.Name,NetAddress:d.NetAddress,Description:d.Description,DiskUsages:x,mean:(0,Ge.mean)(x.filter(l=>!isNaN(l.PercentUsed)),l=>l.PercentUsed),max:(0,Ge.max)(x.filter(l=>!isNaN(l.PercentUsed)),l=>l.PercentUsed)}});return{Type:o.Type,Name:o.Name,Description:o.Description,MachineUsages:c,MachineUsagesDescription:c.reduce((d,x)=>d+(x.Description||""),""),mean:(0,Ge.mean)(c.filter(d=>!isNaN(d.mean)),d=>d.mean),max:(0,Ge.max)(c.filter(d=>!isNaN(d.max)),d=>d.max)}});return{Name:r.Name,Description:r.Description,ComponentUsages:i,ComponentUsagesDescription:i.reduce((o,c)=>o+(c.MachineUsagesDescription||""),""),mean:(0,Ge.mean)(i.filter(o=>!isNaN(o.mean)),o=>o.mean),max:(0,Ge.max)(i.filter(o=>!isNaN(o.max)),o=>o.max)}}))}};var $t=class extends v{constructor(e){super(e,"WsPackageProcess","1.08")}ActivatePackage(e,t){return this._connection.send("ActivatePackage",e,"json",!1,t,"ActivatePackageResponse")}AddPackage(e,t){return this._connection.send("AddPackage",e,"json",!1,t,"AddPackageResponse")}AddPartToPackageMap(e,t){return this._connection.send("AddPartToPackageMap",e,"json",!1,t,"AddPartToPackageMapResponse")}CopyPackageMap(e,t){return this._connection.send("CopyPackageMap",e,"json",!1,t,"CopyPackageMapResponse")}DeActivatePackage(e,t){return this._connection.send("DeActivatePackage",e,"json",!1,t,"DeActivatePackageResponse")}DeletePackage(e,t){return this._connection.send("DeletePackage",e,"json",!1,t,"DeletePackageResponse")}Echo(e,t){return this._connection.send("Echo",e,"json",!1,t,"EchoResponse")}GetPackage(e,t){return this._connection.send("GetPackage",e,"json",!1,t,"GetPackageResponse")}GetPackageMapById(e,t){return this._connection.send("GetPackageMapById",e,"json",!1,t,"GetPackageMapByIdResponse")}GetPackageMapSelectOptions(e,t){return this._connection.send("GetPackageMapSelectOptions",e,"json",!1,t,"GetPackageMapSelectOptionsResponse")}GetPartFromPackageMap(e,t){return this._connection.send("GetPartFromPackageMap",e,"json",!1,t,"GetPartFromPackageMapResponse")}GetQueryFileMapping(e,t){return this._connection.send("GetQueryFileMapping",e,"json",!1,t,"GetQueryFileMappingResponse")}ListPackage(e,t){return this._connection.send("ListPackage",e,"json",!1,t,"ListPackageResponse")}ListPackages(e,t){return this._connection.send("ListPackages",e,"json",!1,t,"ListPackagesResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WsPackageProcessPingResponse")}RemovePartFromPackageMap(e,t){return this._connection.send("RemovePartFromPackageMap",e,"json",!1,t,"RemovePartFromPackageMapResponse")}ValidatePackage(e,t){return this._connection.send("ValidatePackage",e,"json",!1,t,"ValidatePackageResponse")}};var $n=class extends $t{};var es=class extends v{constructor(e){super(e,"WsResources","1.01")}Ping(e){return this._connection.send("Ping",e)}ServiceQuery(e){return this._connection.send("ServiceQuery",e)}WebLinksQuery(e){return this._connection.send("WebLinksQuery",e)}};var er=class extends es{};var tr;(e=>{let n;(r=>(r.ECL="ECL",r.DFU="DFU"))(n=e.WUTypes||={})})(tr||={});var ts=class extends v{constructor(e){super(e,"WSSasha","1.01")}ArchiveWU(e,t){return this._connection.send("ArchiveWU",e,"json",!1,t,"ResultResponse")}GetVersion(e,t){return this._connection.send("GetVersion",e,"json",!1,t,"ResultResponse")}ListWU(e,t){return this._connection.send("ListWU",e,"json",!1,t,"ResultResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WSSashaPingResponse")}RestoreWU(e,t){return this._connection.send("RestoreWU",e,"json",!1,t,"ResultResponse")}};var sr=class extends ts{};var ar=mt(Os(),1);var or;(t=>{let n;(d=>(d.ALL="ALL",d.READ="READ",d.WRITE="WRITE",d.HOLD="HOLD",d.SUB="SUB"))(n=t.LockModes||={});let e;(E=>(E.Attach="Attach",E.Detach="Detach",E.State="State",E.Reload="Reload",E.ReloadRetry="ReloadRetry",E.MemLock="MemLock",E.MemUnlock="MemUnlock",E.GetMemLocked="GetMemLocked"))(e=t.RoxieControlCmdType||={})})(or||={});var rs=class extends v{constructor(e){super(e,"WsSMC","1.29")}Activity(e){return this._connection.send("Activity",e,"json",!1,void 0,"ActivityResponse")}BrowseResources(e){return this._connection.send("BrowseResources",e,"json",!1,void 0,"BrowseResourcesResponse")}ClearQueue(e){return this._connection.send("ClearQueue",e,"json",!1,void 0,"SMCQueueResponse")}GetBuildInfo(e){return this._connection.send("GetBuildInfo",e,"json",!1,void 0,"GetBuildInfoResponse")}GetGlobalMetrics(e){return this._connection.send("GetGlobalMetrics",e,"json",!1,void 0,"GetGlobalMetricsResponse")}GetStatusServerInfo(e){return this._connection.send("GetStatusServerInfo",e,"json",!1,void 0,"GetStatusServerInfoResponse")}GetThorQueueAvailability(e){return this._connection.send("GetThorQueueAvailability",e,"json",!1,void 0,"GetThorQueueAvailabilityResponse")}Index(e){return this._connection.send("Index",e,"json",!1,void 0,"SMCIndexResponse")}LockQuery(e){return this._connection.send("LockQuery",e,"json",!1,void 0,"LockQueryResponse")}MoveJobBack(e){return this._connection.send("MoveJobBack",e,"json",!1,void 0,"SMCJobResponse")}MoveJobDown(e){return this._connection.send("MoveJobDown",e,"json",!1,void 0,"SMCJobResponse")}MoveJobFront(e){return this._connection.send("MoveJobFront",e,"json",!1,void 0,"SMCJobResponse")}MoveJobUp(e){return this._connection.send("MoveJobUp",e,"json",!1,void 0,"SMCJobResponse")}NotInCommunityEdition(e){return this._connection.send("NotInCommunityEdition",e,"json",!1,void 0,"NotInCommunityEditionResponse")}PauseQueue(e){return this._connection.send("PauseQueue",e,"json",!1,void 0,"SMCQueueResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsSMCPingResponse")}RecordGlobalMetrics(e){return this._connection.send("RecordGlobalMetrics",e,"json",!1,void 0,"RecordGlobalMetricsResponse")}RemoveJob(e){return this._connection.send("RemoveJob",e,"json",!1,void 0,"SMCJobResponse")}ResumeQueue(e){return this._connection.send("ResumeQueue",e,"json",!1,void 0,"SMCQueueResponse")}RoxieControlCmd(e){return this._connection.send("RoxieControlCmd",e,"json",!1,void 0,"RoxieControlCmdResponse")}RoxieXrefCmd(e){return this._connection.send("RoxieXrefCmd",e,"json",!1,void 0,"RoxieXrefCmdResponse")}SetBanner(e){return this._connection.send("SetBanner",e,"json",!1,void 0,"SetBannerResponse")}SetJobPriority(e){return this._connection.send("SetJobPriority",e,"json",!1,void 0,"SMCPriorityResponse")}StopQueue(e){return this._connection.send("StopQueue",e,"json",!1,void 0,"SMCQueueResponse")}};var So=(0,ar.timeParse)("%Y%m%d%H");function Do(n){return typeof n=="number"||typeof n=="string"&&n.trim()!==""&&!isNaN(+n)}var Dt=class extends rs{connectionOptions(){return this._connection.opts()}Activity(e){return super.Activity(e).then(t=>({Running:{ActiveWorkunit:[]},...t}))}parseGlobalMetric(e,t){return e.startsWith("Cost")?+t/1e6:e.startsWith("Date")?So(t):e.startsWith("Num")?+t:e.startsWith("Time")?+t/1e9:e.startsWith("When")?new Date(+t/1e3).toISOString():Do(t)?+t:t}GetNormalisedGlobalMetrics(e){return super.GetGlobalMetrics(e).then(t=>{let s=[];for(let r of t?.GlobalMetrics?.GlobalMetric||[]){let i={Category:r.Category,Start:this.parseGlobalMetric("Date",r.DateTimeRange?.Start),End:this.parseGlobalMetric("Date",r.DateTimeRange?.End),dimensions:{},stats:{}};for(let o of r.Dimensions?.Dimension||[])i.dimensions[o.Name]=o.Value;for(let o of r.Stats?.Stat||[])i.stats[o.Name]=this.parseGlobalMetric(o.Name,o.Value);s.push(i)}return s})}};var is=class extends v{constructor(e){super(e,"wsstore","1.02")}CreateStore(e,t){return this._connection.send("CreateStore",e,"json",!1,t,"CreateStoreResponse")}Delete(e,t){return this._connection.send("Delete",e,"json",!1,t,"DeleteResponse")}DeleteNamespace(e,t){return this._connection.send("DeleteNamespace",e,"json",!1,t,"DeleteNamespaceResponse")}Fetch(e,t){return this._connection.send("Fetch",e,"json",!1,t,"FetchResponse")}FetchAll(e,t){return this._connection.send("FetchAll",e,"json",!1,t,"FetchAllResponse")}FetchKeyMetadata(e,t){return this._connection.send("FetchKeyMetadata",e,"json",!1,t,"FetchKeyMDResponse")}ListKeys(e,t){return this._connection.send("ListKeys",e,"json",!1,t,"ListKeysResponse")}ListNamespaces(e,t){return this._connection.send("ListNamespaces",e,"json",!1,t,"ListNamespacesResponse")}ListStores(e,t){return this._connection.send("ListStores",e,"json",!1,t,"ListStoresResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"wsstorePingResponse")}Set(e,t){return this._connection.send("Set",e,"json",!1,t,"SetResponse")}};var Ct=class extends is{Delete(e){return super.Delete(e).catch(t=>{if(t.isESPExceptions&&t.Exception.some(s=>s.Code===-1))return{Exceptions:void 0,Success:!0};throw t})}Fetch(e){return super.Fetch(e).catch(t=>{if(t.isESPExceptions&&t.Exception.some(s=>s.Code===-1))return{Exceptions:void 0,Value:void 0};throw t})}};var cr;(s=>{let n;(o=>(o.XML="XML",o.YAML="YAML"))(n=s.TpConfigResponseFormat||={});let e;(c=>(c.All="All",c.QueriesOnly="QueriesOnly",c.WorkunitsOnly="WorkunitsOnly"))(e=s.RoxieQueueFilter||={});let t;(N=>(N.ALLNODES="ALLNODES",N.THORMACHINES="THORMACHINES",N.HOLEMACHINES="HOLEMACHINES",N.ROXIEMACHINES="ROXIEMACHINES",N.MACHINES="MACHINES",N.AVAILABLEMACHINES="AVAILABLEMACHINES",N.DROPZONE="DROPZONE",N.STANDBYNNODE="STANDBYNNODE",N.THORSPARENODES="THORSPARENODES",N.HOLESTANDBYNODES="HOLESTANDBYNODES"))(t=s.TpMachineType||={})})(cr||={});var os=class extends v{constructor(e){super(e,"WsTopology","1.33")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WsTopologyPingResponse")}SystemLog(e,t){return this._connection.send("SystemLog",e,"json",!1,t,"SystemLogResponse")}TpClusterInfo(e,t){return this._connection.send("TpClusterInfo",e,"json",!1,t,"TpClusterInfoResponse")}TpClusterQuery(e,t){return this._connection.send("TpClusterQuery",e,"json",!1,t,"TpClusterQueryResponse")}TpComponentConfiguration(e,t){return this._connection.send("TpComponentConfiguration",e,"json",!1,t,"TpComponentConfigurationResponse")}TpConfiguredComponents(e,t){return this._connection.send("TpConfiguredComponents",e,"json",!1,t,"TpConfiguredComponentsResponse")}TpDropZoneQuery(e,t){return this._connection.send("TpDropZoneQuery",e,"json",!1,t,"TpDropZoneQueryResponse")}TpGetComponentFile(e,t){return this._connection.send("TpGetComponentFile",e,"json",!1,t,"TpGetComponentFileResponse")}TpGetServicePlugins(e,t){return this._connection.send("TpGetServicePlugins",e,"json",!1,t,"TpGetServicePluginsResponse")}TpGroupQuery(e,t){return this._connection.send("TpGroupQuery",e,"json",!1,t,"TpGroupQueryResponse")}TpListLogFiles(e,t){return this._connection.send("TpListLogFiles",e,"json",!1,t,"TpListLogFilesResponse")}TpListTargetClusters(e,t){return this._connection.send("TpListTargetClusters",e,"json",!1,t,"TpListTargetClustersResponse")}TpLogFile(e,t){return this._connection.send("TpLogFile",e,"json",!1,t,"TpLogFileResponse")}TpLogFileDisplay(e,t){return this._connection.send("TpLogFileDisplay",e,"json",!1,t,"TpLogFileResponse")}TpLogicalClusterQuery(e,t){return this._connection.send("TpLogicalClusterQuery",e,"json",!1,t,"TpLogicalClusterQueryResponse")}TpMachineInfo(e,t){return this._connection.send("TpMachineInfo",e,"json",!1,t,"TpMachineInfoResponse")}TpMachineQuery(e,t){return this._connection.send("TpMachineQuery",e,"json",!1,t,"TpMachineQueryResponse")}TpServiceQuery(e,t){return this._connection.send("TpServiceQuery",e,"json",!1,t,"TpServiceQueryResponse")}TpSetMachineStatus(e,t){return this._connection.send("TpSetMachineStatus",e,"json",!1,t,"TpSetMachineStatusResponse")}TpSwapNode(e,t){return this._connection.send("TpSwapNode",e,"json",!1,t,"TpSwapNodeResponse")}TpTargetClusterQuery(e,t){return this._connection.send("TpTargetClusterQuery",e,"json",!1,t,"TpTargetClusterQueryResponse")}TpThorStatus(e,t){return this._connection.send("TpThorStatus",e,"json",!1,t,"TpThorStatusResponse")}TpXMLFile(e,t){return this._connection.send("TpXMLFile",e,"json",!1,t,"TpXMLFileResponse")}};var ge=class extends os{connectionOptions(){return this._connection.opts()}protocol(){return this._connection.opts().baseUrl.split("//")[0]}ip(){return this._connection.opts().baseUrl.split("//")[1].split(":")[0]}DefaultTpLogicalClusterQuery(e={}){return this.TpLogicalClusterQuery(e).then(t=>{if(t.default)return t.default;let s,r;return t.TpLogicalClusters.TpLogicalCluster.some((i,o)=>(o===0&&(r=i),i.Type==="hthor"?(s=i,!0):!1)),s||r})}};import{deepMixin as Co,xml2json as Ro}from"@hpcc-js/util";var he;(w=>{let n;(H=>(H.Abort="Abort",H.Delete="Delete",H.Deschedule="Deschedule",H.Reschedule="Reschedule",H.Pause="Pause",H.PauseNow="PauseNow",H.Protect="Protect",H.Unprotect="Unprotect",H.Restore="Restore",H.Resume="Resume",H.SetToFailed="SetToFailed",H.Archive="Archive"))(n=w.ECLWUActions||={});let e;(m=>(m[m.MIN=0]="MIN",m[m.DEFAULT=1]="DEFAULT",m[m.ALL=2]="ALL",m[m.CUSTOM=3]="CUSTOM"))(e=w.LogSelectColumnMode||={});let t;(ne=>(ne[ne.ASC=0]="ASC",ne[ne.DSC=1]="DSC"))(t=w.SortDirection||={});let s;(Q=>(Q.ALL="ALL",Q.DIS="DIS",Q.ERR="ERR",Q.WRN="WRN",Q.INF="INF",Q.PRO="PRO",Q.MET="MET",Q.EVT="EVT"))(s=w.LogEventClass||={});let r;(_=>(_.Single="Single",_.List="List",_.Multi="Multi"))(r=w.WUDetailsAttrValueType||={});let i;(_=>(_.SyntaxCheck="SyntaxCheck",_.Deploy="Deploy",_.Publish="Publish"))(i=w.EclDefinitionActions||={});let o;(_=>(_.xml="xml",_.json="json",_.text="text"))(o=w.ErrorMessageFormat||={});let c;(_=>(_[_.XML=0]="XML",_[_.JSON=1]="JSON",_[_.CSV=2]="CSV"))(c=w.LogAccessLogFormat||={});let d;(m=>(m.info="info",m.warning="warning",m.error="error",m.alert="alert"))(d=w.WUExceptionSeverity||={});let x;(m=>(m[m.OriginalText=0]="OriginalText",m[m.Attachment=1]="Attachment",m[m.ZIP=2]="ZIP",m[m.GZIP=3]="GZIP"))(x=w.WUFileDownloadOption||={});let l;(H=>(H.XML="XML",H.cpp="cpp",H.dll="dll",H.res="res",H.log="log",H.WUECL="WUECL",H.ThorLog="ThorLog",H.ThorSlaveLog="ThorSlaveLog",H.EclAgentLog="EclAgentLog",H.ArchiveQuery="ArchiveQuery",H.ComponentLog="ComponentLog",H.PostMortem="PostMortem"))(l=w.WUFileType||={});let E;(L=>(L.Allqueries="All queries",L.Notsuspended="Not suspended",L.Suspended="Suspended",L.Suspendedbyuser="Suspended by user",L.Suspendedbyfirstnode="Suspended by first node",L.Suspendedbyanynode="Suspended by any node"))(E=w.WUQueryFilterSuspendedType||={});let R;(F=>(F.All="All",F.Id="Id",F.Name="Name",F.Alias="Alias",F.Status="Status"))(R=w.WUQuerySetFilterType||={});let I;(_=>(_.All="All",_.Protected="Protected",_.NotProtected="NotProtected"))(I=w.WUProtectFilter||={});let N;(T=>T.Deactivate="Deactivate")(N=w.QuerySetAliasActionTypes||={});let V;(ne=>(ne.None="None",ne.ActivateImportedActive="ActivateImportedActive"))(V=w.QuerysetImportActivation||={});let j;(Q=>(Q.Suspend="Suspend",Q.Unsuspend="Unsuspend",Q.ToggleSuspend="ToggleSuspend",Q.Activate="Activate",Q.Delete="Delete",Q.DeleteQueriesAndWUs="DeleteQueriesAndWUs",Q.RemoveAllAliases="RemoveAllAliases",Q.ResetQueryStats="ResetQueryStats"))(j=w.QuerySetQueryActionTypes||={});let X;(m=>(m[m.DoNotActivateQuery=0]="DoNotActivateQuery",m[m.ActivateQuery=1]="ActivateQuery",m[m.ActivateQuerySuspendPrevious=2]="ActivateQuerySuspendPrevious",m[m.ActivateQueryDeletePrevious=3]="ActivateQueryDeletePrevious"))(X=w.WUQueryActivationMode||={})})(he||={});var Rt=class extends v{constructor(e){super(e,"WsWorkunits","2.10")}GVCAjaxGraph(e,t){return this._connection.send("GVCAjaxGraph",e,"json",!1,t,"GVCAjaxGraphResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WsWorkunitsPingResponse")}WUAbort(e,t){return this._connection.send("WUAbort",e,"json",!1,t,"WUAbortResponse")}WUAction(e,t){return this._connection.send("WUAction",e,"json",!1,t,"WUActionResponse")}WUAddLocalFileToWorkunit(e,t){return this._connection.send("WUAddLocalFileToWorkunit",e,"json",!1,t,"WUAddLocalFileToWorkunitResponse")}WUAnalyseHotspot(e,t){return this._connection.send("WUAnalyseHotspot",e,"json",!1,t,"WUAnalyseHotspotResponse")}WUCDebug(e,t){return this._connection.send("WUCDebug",e,"json",!1,t,"WUDebugResponse")}WUCheckFeatures(e,t){return this._connection.send("WUCheckFeatures",e,"json",!1,t,"WUCheckFeaturesResponse")}WUClusterJobQueueLOG(e,t){return this._connection.send("WUClusterJobQueueLOG",e,"json",!1,t,"WUClusterJobQueueLOGResponse")}WUClusterJobQueueXLS(e,t){return this._connection.send("WUClusterJobQueueXLS",e,"json",!1,t,"WUClusterJobQueueXLSResponse")}WUClusterJobSummaryXLS(e,t){return this._connection.send("WUClusterJobSummaryXLS",e,"json",!1,t,"WUClusterJobSummaryXLSResponse")}WUClusterJobXLS(e,t){return this._connection.send("WUClusterJobXLS",e,"json",!1,t,"WUClusterJobXLSResponse")}WUCompileECL(e,t){return this._connection.send("WUCompileECL",e,"json",!1,t,"WUCompileECLResponse")}WUCopyLogicalFiles(e,t){return this._connection.send("WUCopyLogicalFiles",e,"json",!1,t,"WUCopyLogicalFilesResponse")}WUCopyQuerySet(e,t){return this._connection.send("WUCopyQuerySet",e,"json",!1,t,"WUCopyQuerySetResponse")}WUCreate(e,t){return this._connection.send("WUCreate",e,"json",!1,t,"WUCreateResponse")}WUCreateAndUpdate(e,t){return this._connection.send("WUCreateAndUpdate",e,"json",!1,t,"WUUpdateResponse")}WUCreateZAPInfo(e,t){return this._connection.send("WUCreateZAPInfo",e,"json",!1,t,"WUCreateZAPInfoResponse")}WUDelete(e,t){return this._connection.send("WUDelete",e,"json",!1,t,"WUDeleteResponse")}WUDeployWorkunit(e,t){return this._connection.send("WUDeployWorkunit",e,"json",!1,t,"WUDeployWorkunitResponse")}WUDetails(e,t){return this._connection.send("WUDetails",e,"json",!1,t,"WUDetailsResponse")}WUDetailsMeta(e,t){return this._connection.send("WUDetailsMeta",e,"json",!1,t,"WUDetailsMetaResponse")}WUEclDefinitionAction(e,t){return this._connection.send("WUEclDefinitionAction",e,"json",!1,t,"WUEclDefinitionActionResponse")}WUExport(e,t){return this._connection.send("WUExport",e,"json",!1,t,"WUExportResponse")}WUFile(e,t){return this._connection.send("WUFile",e,"json",!1,t,"WULogFileResponse")}WUFullResult(e,t){return this._connection.send("WUFullResult",e,"json",!1,t,"WUFullResultResponse")}WUGVCGraphInfo(e,t){return this._connection.send("WUGVCGraphInfo",e,"json",!1,t,"WUGVCGraphInfoResponse")}WUGetArchiveFile(e,t){return this._connection.send("WUGetArchiveFile",e,"json",!1,t,"WUGetArchiveFileResponse")}WUGetDependancyTrees(e,t){return this._connection.send("WUGetDependancyTrees",e,"json",!1,t,"WUGetDependancyTreesResponse")}WUGetGraph(e,t){return this._connection.send("WUGetGraph",e,"json",!1,t,"WUGetGraphResponse")}WUGetGraphNameAndTypes(e,t){return this._connection.send("WUGetGraphNameAndTypes",e,"json",!1,t,"WUGetGraphNameAndTypesResponse")}WUGetNumFileToCopy(e,t){return this._connection.send("WUGetNumFileToCopy",e,"json",!1,t,"WUGetNumFileToCopyResponse")}WUGetPlugins(e,t){return this._connection.send("WUGetPlugins",e,"json",!1,t,"WUGetPluginsResponse")}WUGetStats(e,t){return this._connection.send("WUGetStats",e,"json",!1,t,"WUGetStatsResponse")}WUGetThorJobList(e,t){return this._connection.send("WUGetThorJobList",e,"json",!1,t,"WUGetThorJobListResponse")}WUGetThorJobQueue(e,t){return this._connection.send("WUGetThorJobQueue",e,"json",!1,t,"WUGetThorJobQueueResponse")}WUGetZAPInfo(e,t){return this._connection.send("WUGetZAPInfo",e,"json",!1,t,"WUGetZAPInfoResponse")}WUGraphInfo(e,t){return this._connection.send("WUGraphInfo",e,"json",!1,t,"WUGraphInfoResponse")}WUGraphTiming(e,t){return this._connection.send("WUGraphTiming",e,"json",!1,t,"WUGraphTimingResponse")}WUHelperFileArchive(e,t){return this._connection.send("WUHelperFileArchive",e,"json",!1,t,"WUHelperFileArchiveResponse")}WUInfo(e,t){return this._connection.send("WUInfo",e,"json",!1,t,"WUInfoResponse")}WUInfoDetails(e,t){return this._connection.send("WUInfoDetails",e,"json",!1,t,"WUInfoResponse")}WUJobList(e,t){return this._connection.send("WUJobList",e,"json",!1,t,"WUJobListResponse")}WULightWeightQuery(e,t){return this._connection.send("WULightWeightQuery",e,"json",!1,t,"WULightWeightQueryResponse")}WUListArchiveFiles(e,t){return this._connection.send("WUListArchiveFiles",e,"json",!1,t,"WUListArchiveFilesResponse")}WUListLocalFileRequired(e,t){return this._connection.send("WUListLocalFileRequired",e,"json",!1,t,"WUListLocalFileRequiredResponse")}WUListQueries(e,t){return this._connection.send("WUListQueries",e,"json",!1,t,"WUListQueriesResponse")}WUListQueriesUsingFile(e,t){return this._connection.send("WUListQueriesUsingFile",e,"json",!1,t,"WUListQueriesUsingFileResponse")}WUMultiQuerysetDetails(e,t){return this._connection.send("WUMultiQuerysetDetails",e,"json",!1,t,"WUMultiQuerySetDetailsResponse")}WUProcessGraph(e,t){return this._connection.send("WUProcessGraph",e,"json",!1,t,"WUProcessGraphResponse")}WUProtect(e,t){return this._connection.send("WUProtect",e,"json",!1,t,"WUProtectResponse")}WUPublishWorkunit(e,t){return this._connection.send("WUPublishWorkunit",e,"json",!1,t,"WUPublishWorkunitResponse")}WUPushEvent(e,t){return this._connection.send("WUPushEvent",e,"json",!1,t,"WUPushEventResponse")}WUQuery(e,t){return this._connection.send("WUQuery",e,"json",!1,t,"WUQueryResponse")}WUQueryConfig(e,t){return this._connection.send("WUQueryConfig",e,"json",!1,t,"WUQueryConfigResponse")}WUQueryDetails(e,t){return this._connection.send("WUQueryDetails",e,"json",!1,t,"WUQueryDetailsResponse")}WUQueryDetailsLightWeight(e,t){return this._connection.send("WUQueryDetailsLightWeight",e,"json",!1,t,"WUQueryDetailsResponse")}WUQueryFiles(e,t){return this._connection.send("WUQueryFiles",e,"json",!1,t,"WUQueryFilesResponse")}WUQueryGetGraph(e,t){return this._connection.send("WUQueryGetGraph",e,"json",!1,t,"WUQueryGetGraphResponse")}WUQueryGetSummaryStats(e,t){return this._connection.send("WUQueryGetSummaryStats",e,"json",!1,t,"WUQueryGetSummaryStatsResponse")}WUQuerysetAliasAction(e,t){return this._connection.send("WUQuerysetAliasAction",e,"json",!1,t,"WUQuerySetAliasActionResponse")}WUQuerysetCopyQuery(e,t){return this._connection.send("WUQuerysetCopyQuery",e,"json",!1,t,"WUQuerySetCopyQueryResponse")}WUQuerysetDetails(e,t){return this._connection.send("WUQuerysetDetails",e,"json",!1,t,"WUQuerySetDetailsResponse")}WUQuerysetExport(e,t){return this._connection.send("WUQuerysetExport",e,"json",!1,t,"WUQuerysetExportResponse")}WUQuerysetImport(e,t){return this._connection.send("WUQuerysetImport",e,"json",!1,t,"WUQuerysetImportResponse")}WUQuerysetQueryAction(e,t){return this._connection.send("WUQuerysetQueryAction",e,"json",!1,t,"WUQuerySetQueryActionResponse")}WUQuerysets(e,t){return this._connection.send("WUQuerysets",e,"json",!1,t,"WUQuerysetsResponse")}WURecreateQuery(e,t){return this._connection.send("WURecreateQuery",e,"json",!1,t,"WURecreateQueryResponse")}WUResubmit(e,t){return this._connection.send("WUResubmit",e,"json",!1,t,"WUResubmitResponse")}WUResult(e,t){return this._connection.send("WUResult",e,"json",!1,t,"WUResultResponse")}WUResultBin(e,t){return this._connection.send("WUResultBin",e,"json",!1,t,"WUResultBinResponse")}WUResultSummary(e,t){return this._connection.send("WUResultSummary",e,"json",!1,t,"WUResultSummaryResponse")}WUResultView(e,t){return this._connection.send("WUResultView",e,"json",!1,t,"WUResultViewResponse")}WURun(e,t){return this._connection.send("WURun",e,"json",!1,t,"WURunResponse")}WUSchedule(e,t){return this._connection.send("WUSchedule",e,"json",!1,t,"WUScheduleResponse")}WUShowScheduled(e,t){return this._connection.send("WUShowScheduled",e,"json",!1,t,"WUShowScheduledResponse")}WUSubmit(e,t){return this._connection.send("WUSubmit",e,"json",!1,t,"WUSubmitResponse")}WUSyntaxCheckECL(e,t){return this._connection.send("WUSyntaxCheckECL",e,"json",!1,t,"WUSyntaxCheckResponse")}WUUpdate(e,t){return this._connection.send("WUUpdate",e,"json",!1,t,"WUUpdateResponse")}WUUpdateQueryEntry(e,t){return this._connection.send("WUUpdateQueryEntry",e,"json",!1,t,"WUUpdateQueryEntryResponse")}WUWaitCompiled(e,t){return this._connection.send("WUWaitCompiled",e,"json",!1,t,"WUWaitResponse")}WUWaitComplete(e,t){return this._connection.send("WUWaitComplete",e,"json",!1,t,"WUWaitResponse")}};var _s=(M=>(M[M.Unknown=0]="Unknown",M[M.Compiled=1]="Compiled",M[M.Running=2]="Running",M[M.Completed=3]="Completed",M[M.Failed=4]="Failed",M[M.Archived=5]="Archived",M[M.Aborting=6]="Aborting",M[M.Aborted=7]="Aborted",M[M.Blocked=8]="Blocked",M[M.Submitted=9]="Submitted",M[M.Scheduled=10]="Scheduled",M[M.Compiling=11]="Compiling",M[M.Wait=12]="Wait",M[M.UploadingFiled=13]="UploadingFiled",M[M.DebugPaused=14]="DebugPaused",M[M.DebugRunning=15]="DebugRunning",M[M.Paused=16]="Paused",M[M.LAST=17]="LAST",M[M.NotFound=999]="NotFound",M))(_s||{}),Ke;(e=>{let n;(R=>(R[R.Unknown=0]="Unknown",R[R.Compile=1]="Compile",R[R.Check=2]="Check",R[R.Run=3]="Run",R[R.ExecuteExisting=4]="ExecuteExisting",R[R.Pause=5]="Pause",R[R.PauseNow=6]="PauseNow",R[R.Resume=7]="Resume",R[R.Debug=8]="Debug",R[R.__size=9]="__size"))(n=e.Action||={})})(Ke||={});function lr(n){return typeof n.Name=="string"}function ku(n){return n.TotalClusterTime!==void 0}function vu(n){return n.StateEx!==void 0}var ae=class extends Rt{constructor(e){super(e)}Ping(){return this._connection.send("Ping",{},"json",!1,void 0,"WsWorkunitsPingResponse").then(()=>({result:!0}))}WUQuery(e={},t){return this._connection.send("WUQuery",e,"json",!1,t).then(s=>Co({Workunits:{ECLWorkunit:[]}},s))}WUInfo(e){let t={Wuid:"",TruncateEclTo64k:!0,IncludeExceptions:!1,IncludeGraphs:!1,IncludeSourceFiles:!1,IncludeResults:!1,IncludeResultsViewNames:!1,IncludeVariables:!1,IncludeTimers:!1,IncludeDebugValues:!1,IncludeApplicationValues:!1,IncludeWorkflows:!1,IncludeXmlSchemas:!1,IncludeResourceURLs:!1,IncludeECL:!1,IncludeHelpers:!1,IncludeAllowedClusters:!1,IncludeTotalClusterTime:!1,IncludeServiceNames:!1,SuppressResultSchemas:!0,...e};return super.WUInfo(t)}WUCreate(){return super.WUCreate({})}WUUpdate(e){return this._connection.send("WUUpdate",e,"json",!0)}WUResubmit(e){return this._connection.toESPStringArray(e,"Wuids"),super.WUResubmit(e)}WUAction(e){return e.ActionType=e.WUActionType,super.WUAction(e)}WUResult(e,t){return this._connection.send("WUResult",e,"json",!1,t)}WUFileEx(e){return this._connection.send("WUFile",e,"text")}_WUDetailsMetaPromise;WUDetailsMeta(e){return this._WUDetailsMetaPromise||(this._WUDetailsMetaPromise=super.WUDetailsMeta(e)),this._WUDetailsMetaPromise}WUCDebugEx(e){return this._connection.send("WUCDebug",e,void 0,void 0,void 0,"WUDebug").then(t=>{let r=Ro(t.Result).children();return r.length?r[0]:null})}},as=class extends Rt{WUPublishWorkunitEx(e){return this._connection.send("WUPublishWorkunit",e)}};import{debounce as _o,StateObject as Yo}from"@hpcc-js/util";var Ir=mt(Ys(),1),Es=mt(Os(),1);import{Cache as Fo,deepMixinT as tn,scopedLogger as Io,StateObject as Po,XMLNode as sn}from"@hpcc-js/util";import{Cache as pr,Edge as Cr,Graph as Rr,StateObject as Ao,Subgraph as Ar,Vertex as xr}from"@hpcc-js/util";var us=class extends Ao{wu;get properties(){return this.get()}get Name(){return this.get("Name")}get Label(){return this.get("Label")}get Type(){return this.get("Type")}get Complete(){return this.get("Complete")}get WhenStarted(){return this.get("WhenStarted")}get WhenFinished(){return this.get("WhenFinished")}get Time(){return this.get("Time")}get Running(){return this.get("Running")}get RunningId(){return this.get("RunningId")}get Failed(){return this.get("Failed")}constructor(e,t,s){super(),this.wu=e;let r=0;for(let i of s)if(i.GraphName===t.Name&&!i.HasSubGraphId){r=Math.round(i.Seconds*1e3)/1e3;break}this.set({Time:r,...t})}fetchScopeGraph(e){return e?this.wu.fetchGraphDetails([e],["subgraph"]).then(t=>ps(t)):this.wu.fetchGraphDetails([this.Name],["graph"]).then(t=>ps(t))}},ls=class extends pr{constructor(){super(e=>pr.hash([e.Name]))}};function yr(n,e,t){t=t||[],t.push(n),e(n.name,n.$,n.children(),t),n.children().forEach(s=>{yr(s,e,t)}),t.pop()}function Xs(n){let e={};return n.forEach(t=>{t.name==="att"&&(e[t.$.name]=t.$.value)}),e}var qs=class extends Rr{},dr=class extends Ar{},mr=class extends xr{},hr=class extends Cr{};function Wr(n,e){let t={},s={},r={},i=new qs(c=>c._.id),o=[i.root];return yr(e,(c,d,x,l)=>{let E=o[o.length-1];switch(c){case"graph":break;case"node":if(x.length&&x[0].children().length&&x[0].children()[0].name==="graph"){let N=E.createSubgraph(Xs(x));o.push(N),t[d.id]=N}let R=E.createVertex(Xs(x));s[d.id]=R;break;case"edge":let I=E.createEdge(s[d.source],s[d.target],Xs(x));r[d.id]=I;break;default:}}),i}var gs=class extends Rr{},fr=class extends Ar{},Sr=class extends xr{},Dr=class extends Cr{};function ps(n){let e={},t={},s={},r;for(let i of n)switch(i.ScopeType){case"graph":r=new gs(l=>l._.Id,i),e[i.ScopeName]=r.root;break;case"subgraph":r||(r=new gs(l=>l._.Id,i),e[i.ScopeName]=r.root);let o=i.parentScope().split(":"),c=e[i.parentScope()];for(;o.length&&!c;)c=e[o.join(":")],o.pop();if(!c)console.warn(`Missing SG:Parent (${i.Id}): ${i.parentScope()}`);else{let l=c;e[i.ScopeName]=l.createSubgraph(i)}break;case"activity":let d=e[i.parentScope()];d?s[i.ScopeName]=d.createVertex(i):console.warn(`Missing A:Parent (${i.Id}): ${i.parentScope()}`);break;case"edge":t[i.ScopeName]=i;break;case"function":let x=s[i.parentScope()];x?x._.children().push(i):console.warn(`Missing F:Parent (${i.Id}): ${i.parentScope()}`);break}for(let i in t){let o=t[i],c=e[o.parentScope()];if(!c)console.warn(`Missing E:Parent (${o.Id}): ${o.parentScope()}`);else{let d=c;try{let x=r.vertex(o.attr("IdSource").RawValue),l=r.vertex(o.attr("IdTarget").RawValue);d.createEdge(x,l,o)}catch{console.warn(`Invalid Edge: ${i}`)}}}return r}import{StateObject as xo}from"@hpcc-js/util";var ds=class extends xo{wu;get properties(){return this.get()}get URL(){return this.get("URL")}get DisplayName(){return this.get("DisplayName")}get DisplayPath(){return this.get("DisplayPath")}constructor(e,t){super(),this.wu=e;let s=t.split("\\").join("/"),r=s.split("/"),i="res/"+this.wu.Wuid+"/",o="",c="";s.indexOf(i)===0&&(o=s.substr(i.length),c=r[r.length-1]),this.set({URL:t,DisplayName:c,DisplayPath:o})}};import{Cache as Zs,exists as Ks,StateObject as Wo}from"@hpcc-js/util";import{SAXStackParser as yo,Stack as br}from"@hpcc-js/util";var ms=class{e;constructor(e){this.e=e}fix(){delete this.e}},hs=class extends ms{name;type;isSet=!1;attrs={};_children=[];constructor(e){super(e)}append(e){this._children.push(e),this.type||(this.type="hpcc:childDataset")}fix(){this.name=this.e.$.name,this.type=this.e.$.type;for(let t=this._children.length-1;t>=0;--t){let s=this._children[t];s.name==="Row"&&s.type===void 0&&(this._children.push(...s._children),this._children.splice(t,1))}let e=this.setOfType();e&&(this.type=e,this.isSet=!0,this._children=[])}children(){return this._children}isAll(e){return e.name==="All"&&e.type===void 0}setOfType(){let e=this.children();if(this.type===void 0&&e.length===2){if(this.isAll(e[0]))return e[1].type;if(this.isAll(e[1]))return e[0].type}}charWidth(){let e=-1;switch(this.type){case"xs:boolean":e=5;break;case"xs:integer":e=8;break;case"xs:nonNegativeInteger":e=8;break;case"xs:double":e=8;break;case"xs:string":e=32;break;default:let t="0123456789",s=this.type.lastIndexOf("_"),r=s>0?s:this.type.length,i=r-1;for(;i>=0&&t.indexOf(this.type.charAt(i))!==-1;--i);i+1<r&&(e=parseInt(this.type.substring(i+1,r),10)),this.type.indexOf("data")===0&&(e*=2);break}return e<this.name.length&&(e=this.name.length),e}},fs=class extends ms{name;type;maxLength;_restricition;_maxLength;constructor(e){super(e)}append(e){switch(e.name){case"xs:restriction":this._restricition=e;break;case"xs:maxLength":this._maxLength=e;break;default:}}fix(){this.name=this.e.$.name,this.type=this._restricition.$.base,this.maxLength=this._maxLength?+this._maxLength.$.value:void 0,delete this._restricition,delete this._maxLength,super.fix()}},Ss=class{root;simpleTypes={};fields(){return this.root.children()}},Ds=class extends yo{schema=new Ss;simpleType;simpleTypes={};xsdStack=new br;startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xs:element":let t=new hs(e);this.schema.root?this.xsdStack.depth()&&this.xsdStack.top().append(t):this.schema.root=t,this.xsdStack.push(t);break;case"xs:simpleType":this.simpleType=new fs(e);break;default:break}}endXMLNode(e){switch(e.name){case"xs:element":this.xsdStack.pop().fix();break;case"xs:simpleType":this.simpleType.fix(),this.simpleTypes[this.simpleType.name]=this.simpleType,delete this.simpleType;break;case"xs:appinfo":let s=this.xsdStack.top();for(let r in e.$)s.attrs[r]=e.$[r];break;default:this.simpleType&&this.simpleType.append(e)}super.endXMLNode(e)}};function Js(n){let e=new Ds;return e.parse(n),e.schema}var zs=class extends Ds{_rootName;schema=new Ss;simpleTypes={};xsdStack=new br;constructor(e){super(),this._rootName=e}startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xsd:element":let t=new hs(e);!this.schema.root&&this._rootName===e.$.name&&(this.schema.root=t),this.xsdStack.depth()&&this.xsdStack.top().append(t),this.xsdStack.push(t);break;case"xsd:simpleType":this.simpleType=new fs(e);break;default:break}}endXMLNode(e){switch(e.name){case"xsd:element":this.xsdStack.pop().fix();break;case"xsd:simpleType":break;default:break}super.endXMLNode(e)}};function Ju(n,e){let t=new zs(e);return t.parse(n),t.schema}var $s=class extends Zs{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}-${e.ResultName}`)}},Cs=new $s,Rs=class n extends Wo{connection;_bypassCache=!1;get BaseUrl(){return this.connection.baseUrl}xsdSchema;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get ResultName(){return this.get("ResultName")}get ResultSequence(){return this.get("ResultSequence")}get LogicalFileName(){return this.get("LogicalFileName")}get Name(){return this.get("Name")}get Sequence(){return this.get("Sequence")}get Value(){return this.get("Value")}get Link(){return this.get("Link")}get FileName(){return this.get("FileName")}get IsSupplied(){return this.get("IsSupplied")}get ShowFileContent(){return this.get("ShowFileContent")}get Total(){return this.get("Total")}get ECLSchemas(){return this.get("ECLSchemas")}get NodeGroup(){return this.get("NodeGroup")}get ResultViews(){return this.get("ResultViews")}get XmlSchema(){return this.get("XmlSchema")}static attach(e,t,s,r){let i;return Array.isArray(r)?(i=Cs.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:s.Name},()=>new n(e,t,s,r)),i.set(s)):typeof r>"u"&&(typeof s=="number"?i=Cs.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:"Sequence_"+s},()=>new n(e,t,s)):typeof s=="string"&&(i=Cs.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:s},()=>new n(e,t,s)))),i}static attachLogicalFile(e,t,s){return Cs.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:s},()=>new n(e,t,s,!0))}constructor(e,t,s,r){super(),e instanceof ae?this.connection=e:this.connection=new ae(e),typeof r=="boolean"&&r===!0?this.set({NodeGroup:t,LogicalFileName:s}):lr(s)&&Array.isArray(r)?this.set({...s,Wuid:t,ResultName:s.Name,ResultViews:r}):typeof r>"u"?typeof s=="number"?this.set({Wuid:t,ResultSequence:s}):typeof s=="string"?this.set({Wuid:t,ResultName:s}):console.warn("Unknown Result.attach (1)"):console.warn("Unknown Result.attach (2)")}isComplete(){return this.Total!==-1}bypassCache(e){return e===void 0?this._bypassCache:(this._bypassCache=e,this)}_fetchXMLSchemaPromise;fetchXMLSchema(e=!1){return(!this._fetchXMLSchemaPromise||e)&&(this._fetchXMLSchemaPromise=this.WUResult().then(t=>t.Result?.XmlSchema?.xml?(this.xsdSchema=Js(t.Result.XmlSchema.xml),this.xsdSchema):null)),this._fetchXMLSchemaPromise}async refresh(){return await this.fetchRows(0,1,!0),this}fetchRows(e=0,t=-1,s=!1,r={},i,o){let c=o??this._bypassCache;return this.WUResult(e,t,!s,r,i,c).then(d=>{let x=d.Result;return delete d.Result,this.set({...d}),Ks("XmlSchema.xml",x)&&(this.xsdSchema=Js(x.XmlSchema.xml)),Ks("Row",x)?x.Row:this.ResultName&&Ks(this.ResultName,x)?x[this.ResultName].Row:[]})}rootField(){return this.xsdSchema?this.xsdSchema.root:null}fields(){return this.xsdSchema?this.xsdSchema.root.children():[]}WUResult(e=0,t=1,s=!1,r={},i,o=!1){let c={NamedValue:{itemcount:0}};for(let x in r)c.NamedValue[c.NamedValue.itemcount++]={Name:x,Value:r[x]};let d={FilterBy:c};return this.Wuid&&this.ResultName!==void 0?(d.Wuid=this.Wuid,d.ResultName=this.ResultName):this.Wuid&&this.ResultSequence!==void 0?(d.Wuid=this.Wuid,d.Sequence=this.ResultSequence):this.LogicalFileName&&this.NodeGroup?(d.LogicalName=this.LogicalFileName,d.Cluster=this.NodeGroup):this.LogicalFileName&&(d.LogicalName=this.LogicalFileName),d.Start=e,d.Count=t,d.SuppressXmlSchema=s,d.BypassCachedResult=o,this.connection.WUResult(d,i).then(x=>x)}},As=class extends Zs{constructor(){super(e=>Zs.hash([e.Sequence,e.Name,e.Value,e.FileName]))}};import{StateObject as Ur}from"@hpcc-js/util";var Ze=class extends Ur{scope;get properties(){return this.get()}get Name(){return this.get("Name")}get RawValue(){return this.get("RawValue")}get Formatted(){return this.get("Formatted")}get FormattedEnd(){return this.get("FormattedEnd")}get Measure(){return this.get("Measure")}get Creator(){return this.get("Creator")}get CreatorType(){return this.get("CreatorType")}constructor(e,t){super(),this.scope=e,this.set(t)}},en=class extends Ur{_attributeMap={};_children=[];get properties(){return this.get()}get ScopeName(){return this.get("ScopeName")}get Id(){return this.get("Id")}get ScopeType(){return this.get("ScopeType")}get Properties(){return this.get("Properties",{Property:[]})}get Notes(){return this.get("Notes",{Note:[]})}get SinkActivity(){return this.get("SinkActivity")}get CAttributes(){let e=[],t={start:null,end:null};return this.Properties.Property.forEach(s=>{s.Measure==="ts"&&s.Name.indexOf("Started")>=0?t.start=s:this.ScopeName&&s.Measure==="ts"&&s.Name.indexOf("Finished")>=0?t.end=s:e.push(new Ze(this,s))}),t.start&&t.end?(t.start.FormattedEnd=t.end.Formatted,e.push(new Ze(this,t.start))):t.start?e.push(new Ze(this,t.start)):t.end&&e.push(new Ze(this,t.end)),e}constructor(e){super(),this.update(e)}update(e){this.set(e),this.CAttributes.forEach(t=>{this._attributeMap[t.Name]=t}),this.Properties.Property=[];for(let t in this._attributeMap)this._attributeMap.hasOwnProperty(t)&&this.Properties.Property.push(this._attributeMap[t].properties)}parentScope(){let e=this.ScopeName.split(":");return e.pop(),e.join(":")}children(e){return arguments.length?(this._children=e,this):this._children}walk(e){if(e.start(this))return!0;for(let t of this.children())if(t.walk(e))return!0;return e.end(this)}formattedAttrs(){let e={};for(let t in this._attributeMap)e[t]=this._attributeMap[t].Formatted||this._attributeMap[t].RawValue;return e}rawAttrs(){let e={};for(let t in this._attributeMap)e[t]=this._attributeMap[t].RawValue;return e}hasAttr(e){return this._attributeMap[e]!==void 0}attr(e){return this._attributeMap[e]||new Ze(this,{Creator:"",CreatorType:"",Formatted:"",Measure:"",Name:"",RawValue:""})}attrMeasure(e){return this._attributeMap[e].Measure}calcTooltip(e){let t=this.Id,s=[];s.push(`<tr><td class="key">ID:</td><td class="value">${this.Id}</td></tr>`),e&&s.push(`<tr><td class="key">Parent ID:</td><td class="value">${e.Id}</td></tr>`),s.push(`<tr><td class="key">Scope:</td><td class="value">${this.ScopeName}</td></tr>`);let r=this.formattedAttrs();for(let i in r)i==="Label"?t=r[i]:s.push(`<tr><td class="key">${i}</td><td class="value">${r[i]}</td></tr>`);return`<div class="eclwatch_WUGraph_Tooltip" style="max-width:480px">
|
|
910
|
+
`;var Va="__PACKAGE_NAME__",Ha="__PACKAGE_VERSION__",ja="__BUILD_VERSION__";import{join as Gt}from"@hpcc-js/util";import{join as ks,promiseTimeout as vi,root as ht,scopedLogger as Vi,utf8ToBase64 as Hi}from"@hpcc-js/util";var Ln=Vi("comms/connection.ts");function Ya(n){return"baseUrl"in n}var ji={type:"post",baseUrl:"",userID:"",password:"",rejectUnauthorized:!0,timeoutSecs:60};function Xa(n){return typeof n.opts=="function"&&typeof n.send=="function"&&typeof n.clone=="function"}function Pe(n,e){return e===void 0||e===!0?encodeURIComponent(n):""+n}function qe(n,e=!0,t=""){if(t&&(t+="."),typeof n!="object")return Pe(n,e);let s=[];for(let r in n)if(n.hasOwnProperty(r))if(n[r]instanceof Array){let i=!1;n[r].forEach((o,c)=>{typeof o=="object"?(i=!0,s.push(qe(o,e,t+Pe(`${r}.${c}`,e)))):s.push(t+Pe(`${r}_i${c}`,e)+"="+qe(o,e))}),i&&s.push(t+Pe(`${r}.itemcount`,e)+"="+n[r].length)}else typeof n[r]=="object"?n[r]&&n[r].Item instanceof Array?(s.push(qe(n[r].Item,e,t+Pe(r,e))),s.push(t+Pe(`${r}.itemcount`,e)+"="+n[r].Item.length)):s.push(qe(n[r],e,t+Pe(r,e))):n[r]!==void 0?s.push(t+Pe(r,e)+"="+Pe(n[r],e)):s.push(t+Pe(r,e));return s.join("&")}function Oi(n){return JSON.parse(n)}function _i(n,e,t={},s="json",r){return r&&console.warn("Header attributes ignored for JSONP connections"),new Promise((i,o)=>{let c=n.timeoutSecs*1e3,d=5e3,x="jsonp_callback_"+Math.round(Math.random()*999999);window[x]=function(N){c=0,I(),i(s==="json"&&typeof N=="string"?Oi(N):N)};let l=document.createElement("script"),E=ks(n.baseUrl,e);E+=E.indexOf("?")>=0?"&":"?",l.src=E+"jsonp="+x+"&"+qe(t,n.encodeRequest),document.body.appendChild(l);let R=setInterval(function(){c<=0?clearInterval(R):(c-=d,c<=0?(clearInterval(R),Ln.error("Request timeout: "+l.src),I(),o(Error("Request timeout: "+l.src))):Ln.debug("Request pending ("+c/1e3+" sec): "+l.src))},d);function I(){delete window[x],document.body.removeChild(l)}})}function Yi(n){return n.userID?{Authorization:`Basic ${Hi(`${n.userID}:${n.password}`)}`}:{}}var Bt={};function Gn(n,e,t,s,r){s={...Yi(n),...s},t={credentials:Bt[n.baseUrl]?"omit":"include",...t,headers:s},n.baseUrl.indexOf("https:")===0&&(n.rejectUnauthorized===!1&&ht.__hpcc_rejectUnauthorizedAgent?t.dispatcher=ht.__hpcc_rejectUnauthorizedAgent:ht.__hpcc_trustwaveAgent&&(t.agent=ht.__hpcc_trustwaveAgent));function i(c){if(c.ok)return r==="json"?c.json():c.text();throw new Error(c.statusText)}let o=ht.__hpcc_undiciFetch??fetch;return vi(n.timeoutSecs*1e3,o(ks(n.baseUrl,e),t).then(i).catch(c=>(t.credentials=Bt[n.baseUrl]?"include":"omit",o(ks(n.baseUrl,e),t).then(i).then(d=>(Bt[n.baseUrl]=!Bt[n.baseUrl],d)))))}function Xi(n,e,t,s="json",r){t.upload_&&(delete t.upload_,e+="?upload_");let i;return t.abortSignal_&&(i=t.abortSignal_,delete t.abortSignal_),Gn(n,e,{method:"post",body:qe(t,n.encodeRequest),signal:i},{"Content-Type":"application/x-www-form-urlencoded",...r},s)}function qi(n,e,t,s="json",r){let i;return t.abortSignal_&&(i=t.abortSignal_,delete t.abortSignal_),Gn(n,`${e}?${qe(t,n.encodeRequest)}`,{method:"get",signal:i},{...r},s)}function zi(n,e,t,s="json",r){let i;switch(n.type){case"jsonp":i=_i(n,e,t,s,r);break;case"get":i=qi(n,e,t,s,r);break;default:i=Xi(n,e,t,s,r);break}return i}var Qt=zi;function qa(n){let e=Qt;return n&&(Qt=n),e}var vs=class n{_opts;get baseUrl(){return this._opts.baseUrl}constructor(e){this.opts(e)}opts(e){return arguments.length===0?this._opts:(this._opts={...ji,...e},this)}send(e,t,s="json",r){return this._opts.hookSend?this._opts.hookSend(this._opts,e,t,s,Qt,r):Qt(this._opts,e,t,s,r)}clone(){return new n(this.opts())}},Lt=function(n){return new vs(n)};function za(n){let e=Lt;return Lt=n,e}function Ji(n){return Object.prototype.toString.call(n)==="[object Array]"}var ze=class extends Error{isESPExceptions=!0;action;request;Source;Exception;constructor(e,t,s){super("ESPException: "+s.Source),this.action=e,this.request=t,this.Source=s.Source,this.Exception=s.Exception,s.Exception.length?this.message=`${s.Exception[0].Code}: ${s.Exception[0].Message}`:this.message=""}};function sc(n){return n instanceof ze||n.isESPExceptions&&Array.isArray(n.Exception)}function Ki(n){return n.send!==void 0}var Vs=class n{_connection;get baseUrl(){return this._connection.opts().baseUrl}_service;_version;constructor(e,t,s){this._connection=Ki(e)?e:Lt(e),this._service=t,this._version=s}service(e){return e===void 0?this._service:(this._service=e,this)}version(e){return e===void 0?this._version:(this._version=e,this)}toESPStringArray(e,t){if(Ji(e[t])){for(let s=0;s<e[t].length;++s)e[t+"_i"+s]=e[t][s];delete e[t]}return e}opts(e){return e===void 0?this._connection.opts():(this._connection.opts(e),this)}send(e,t={},s="json",r=!1,i,o){let c={...t,ver_:this._version};r&&(c.upload_=!0),i&&(c.abortSignal_=i);let d,x="json";switch(s){case"text":d=Gt(this._service,e),x="text";break;case"xsd":d=Gt(this._service,e+".xsd"),x="text";break;case"json2":d=Gt(this._service,e+"/json"),s="json",e=e.split("/").pop();break;default:d=Gt(this._service,e+".json")}return this._connection.send(d,c,x).then(l=>{if(s==="json"){let E;if(l&&l.Exceptions)throw new ze(e,c,l.Exceptions);if(l&&(E=l[o||e+"Response"]),!E)throw new ze(e,c,{Source:"ESPConnection.send",Exception:[{Code:0,Message:"Missing Response"}]});return E}return l})}clone(){return new n(this._connection.clone(),this._service,this._version)}},v=class{_connection;get baseUrl(){return this._connection.opts().baseUrl}constructor(e,t,s){this._connection=new Vs(e,t,s)}opts(){return this._connection.opts()}connection(){return this._connection.clone()}};var ft;(t=>{let n;(x=>(x.Delete="Delete",x.Protect="Protect",x.Unprotect="Unprotect",x.Restore="Restore",x.SetToFailed="SetToFailed",x.Archive="Archive"))(n=t.DFUWUActions||={});let e;(N=>(N.copy="copy",N.remove="remove",N.move="move",N.rename="rename",N.replicate="replicate",N.import="import",N.export="export",N.monitor="monitor",N.copymerge="copymerge",N.supercopy="supercopy",N.publish="publish"))(e=t.DFUCommand||={})})(ft||={});var kt=class extends v{constructor(e){super(e,"FileSpray","1.29")}AbortDFUWorkunit(e,t){return this._connection.send("AbortDFUWorkunit",e,"json",!1,t,"AbortDFUWorkunitResponse")}Copy(e,t){return this._connection.send("Copy",e,"json",!1,t,"CopyResponse")}CreateDFUPublisherWorkunit(e,t){return this._connection.send("CreateDFUPublisherWorkunit",e,"json",!1,t,"CreateDFUPublisherWorkunitResponse")}CreateDFUWorkunit(e,t){return this._connection.send("CreateDFUWorkunit",e,"json",!1,t,"CreateDFUWorkunitResponse")}DFUWUFile(e,t){return this._connection.send("DFUWUFile",e,"json",!1,t,"DFUWUFileResponse")}DFUWUSearch(e,t){return this._connection.send("DFUWUSearch",e,"json",!1,t,"DFUWUSearchResponse")}DFUWorkunitsAction(e,t){return this._connection.send("DFUWorkunitsAction",e,"json",!1,t,"DFUWorkunitsActionResponse")}DeleteDFUWorkunit(e,t){return this._connection.send("DeleteDFUWorkunit",e,"json",!1,t,"DeleteDFUWorkunitResponse")}DeleteDFUWorkunits(e,t){return this._connection.send("DeleteDFUWorkunits",e,"json",!1,t,"DeleteDFUWorkunitsResponse")}DeleteDropZoneFiles(e,t){return this._connection.send("DeleteDropZoneFiles",e,"json",!1,t,"DFUWorkunitsActionResponse")}Despray(e,t){return this._connection.send("Despray",e,"json",!1,t,"DesprayResponse")}DfuMonitor(e,t){return this._connection.send("DfuMonitor",e,"json",!1,t,"DfuMonitorResponse")}DropZoneFileSearch(e,t){return this._connection.send("DropZoneFileSearch",e,"json",!1,t,"DropZoneFileSearchResponse")}DropZoneFiles(e,t){return this._connection.send("DropZoneFiles",e,"json",!1,t,"DropZoneFilesResponse")}EchoDateTime(e,t){return this._connection.send("EchoDateTime",e,"json",!1,t,"EchoDateTimeResponse")}FileList(e,t){return this._connection.send("FileList",e,"json",!1,t,"FileListResponse")}GetDFUExceptions(e,t){return this._connection.send("GetDFUExceptions",e,"json",!1,t,"GetDFUExceptionsResponse")}GetDFUProgress(e,t){return this._connection.send("GetDFUProgress",e,"json",!1,t,"ProgressResponse")}GetDFUServerQueues(e,t){return this._connection.send("GetDFUServerQueues",e,"json",!1,t,"GetDFUServerQueuesResponse")}GetDFUWorkunit(e,t){return this._connection.send("GetDFUWorkunit",e,"json",!1,t,"GetDFUWorkunitResponse")}GetDFUWorkunits(e,t){return this._connection.send("GetDFUWorkunits",e,"json",!1,t,"GetDFUWorkunitsResponse")}GetRemoteTargets(e,t){return this._connection.send("GetRemoteTargets",e,"json",!1,t,"GetRemoteTargetsResponse")}GetSprayTargets(e,t){return this._connection.send("GetSprayTargets",e,"json",!1,t,"GetSprayTargetsResponse")}OpenSave(e,t){return this._connection.send("OpenSave",e,"json",!1,t,"OpenSaveResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"FileSprayPingResponse")}Rename(e,t){return this._connection.send("Rename",e,"json",!1,t,"RenameResponse")}Replicate(e,t){return this._connection.send("Replicate",e,"json",!1,t,"ReplicateResponse")}ShowResult(e,t){return this._connection.send("ShowResult",e,"json",!1,t,"ShowResultResponse")}SprayFixed(e,t){return this._connection.send("SprayFixed",e,"json",!1,t,"SprayFixedResponse")}SprayVariable(e,t){return this._connection.send("SprayVariable",e,"json",!1,t,"SprayResponse")}SubmitDFUWorkunit(e,t){return this._connection.send("SubmitDFUWorkunit",e,"json",!1,t,"SubmitDFUWorkunitResponse")}UpdateDFUWorkunit(e,t){return this._connection.send("UpdateDFUWorkunit",e,"json",!1,t,"UpdateDFUWorkunitResponse")}};var Zi=(l=>(l[l.unknown=0]="unknown",l[l.scheduled=1]="scheduled",l[l.queued=2]="queued",l[l.started=3]="started",l[l.aborted=4]="aborted",l[l.failed=5]="failed",l[l.finished=6]="finished",l[l.monitoring=7]="monitoring",l[l.aborting=8]="aborting",l[l.notfound=999]="notfound",l))(Zi||{}),Je=class extends kt{DFUWUFileEx(e){return this._connection.send("DFUWUFile",e,"text")}SprayFixedEx(e){return this._connection.send("SprayFixed",e)}SprayVariableEx(e){return this._connection.send("SprayVariable",e,"json",!1,null,"SprayResponse")}DesprayEx(e){return this._connection.send("Despray",e)}UpdateDFUWorkunitEx(e){return this._connection.send("UpdateDFUWorkunit",e,"json",!1,void 0,"UpdateDFUWorkunitResponse")}};var kn;(o=>{let n;(x=>(x.User="User",x.Group="Group"))(n=o.ViewMemberType||={});let e;(R=>(R.username="username",R.fullname="fullname",R.passwordexpiration="passwordexpiration",R.employeeID="employeeID",R.employeeNumber="employeeNumber"))(e=o.UserSortBy||={});let t;(x=>(x.Name="Name",x.ManagedBy="ManagedBy"))(t=o.GroupSortBy||={});let s;(l=>(l.Any="Any",l.User="User",l.Group="Group"))(s=o.AccountTypeReq||={});let r;(x=>(x.Name="Name",x.Type="Type"))(r=o.ResourcePermissionSortBy||={});let i;(d=>d.Name="Name")(i=o.ResourceSortBy||={})})(kn||={});var vt=class extends v{constructor(e){super(e,"ws_access","1.17")}AccountPermissions(e,t){return this._connection.send("AccountPermissions",e,"json",!1,t,"AccountPermissionsResponse")}AccountPermissionsV2(e,t){return this._connection.send("AccountPermissionsV2",e,"json",!1,t,"AccountPermissionsV2Response")}AddUser(e,t){return this._connection.send("AddUser",e,"json",!1,t,"AddUserResponse")}AddView(e,t){return this._connection.send("AddView",e,"json",!1,t,"AddViewResponse")}AddViewColumn(e,t){return this._connection.send("AddViewColumn",e,"json",!1,t,"AddViewColumnResponse")}AddViewMember(e,t){return this._connection.send("AddViewMember",e,"json",!1,t,"AddViewMemberResponse")}ClearPermissionsCache(e,t){return this._connection.send("ClearPermissionsCache",e,"json",!1,t,"ClearPermissionsCacheResponse")}DeleteView(e,t){return this._connection.send("DeleteView",e,"json",!1,t,"DeleteViewResponse")}DeleteViewColumn(e,t){return this._connection.send("DeleteViewColumn",e,"json",!1,t,"DeleteViewColumnResponse")}DeleteViewMember(e,t){return this._connection.send("DeleteViewMember",e,"json",!1,t,"DeleteViewMemberResponse")}DisableScopeScans(e,t){return this._connection.send("DisableScopeScans",e,"json",!1,t,"DisableScopeScansResponse")}EnableScopeScans(e,t){return this._connection.send("EnableScopeScans",e,"json",!1,t,"EnableScopeScansResponse")}FilePermission(e,t){return this._connection.send("FilePermission",e,"json",!1,t,"FilePermissionResponse")}GroupAction(e,t){return this._connection.send("GroupAction",e,"json",!1,t,"GroupActionResponse")}GroupAdd(e,t){return this._connection.send("GroupAdd",e,"json",!1,t,"GroupAddResponse")}GroupEdit(e,t){return this._connection.send("GroupEdit",e,"json",!1,t,"GroupEditResponse")}GroupMemberEdit(e,t){return this._connection.send("GroupMemberEdit",e,"json",!1,t,"GroupMemberEditResponse")}GroupMemberEditInput(e,t){return this._connection.send("GroupMemberEditInput",e,"json",!1,t,"GroupMemberEditInputResponse")}GroupMemberQuery(e,t){return this._connection.send("GroupMemberQuery",e,"json",!1,t,"GroupMemberQueryResponse")}GroupQuery(e,t){return this._connection.send("GroupQuery",e,"json",!1,t,"GroupQueryResponse")}Groups(e,t){return this._connection.send("Groups",e,"json",!1,t,"GroupResponse")}PermissionAction(e,t){return this._connection.send("PermissionAction",e,"json",!1,t,"PermissionActionResponse")}Permissions(e,t){return this._connection.send("Permissions",e,"json",!1,t,"BasednsResponse")}PermissionsReset(e,t){return this._connection.send("PermissionsReset",e,"json",!1,t,"PermissionsResetResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"ws_accessPingResponse")}QueryScopeScansEnabled(e,t){return this._connection.send("QueryScopeScansEnabled",e,"json",!1,t,"QueryScopeScansEnabledResponse")}QueryUserViewColumns(e,t){return this._connection.send("QueryUserViewColumns",e,"json",!1,t,"QueryUserViewColumnsResponse")}QueryViewColumns(e,t){return this._connection.send("QueryViewColumns",e,"json",!1,t,"QueryViewColumnsResponse")}QueryViewMembers(e,t){return this._connection.send("QueryViewMembers",e,"json",!1,t,"QueryViewMembersResponse")}QueryViews(e,t){return this._connection.send("QueryViews",e,"json",!1,t,"QueryViewsResponse")}ResourceAdd(e,t){return this._connection.send("ResourceAdd",e,"json",!1,t,"ResourceAddResponse")}ResourceDelete(e,t){return this._connection.send("ResourceDelete",e,"json",!1,t,"ResourceDeleteResponse")}ResourcePermissionQuery(e,t){return this._connection.send("ResourcePermissionQuery",e,"json",!1,t,"ResourcePermissionQueryResponse")}ResourcePermissions(e,t){return this._connection.send("ResourcePermissions",e,"json",!1,t,"ResourcePermissionsResponse")}ResourceQuery(e,t){return this._connection.send("ResourceQuery",e,"json",!1,t,"ResourceQueryResponse")}Resources(e,t){return this._connection.send("Resources",e,"json",!1,t,"ResourcesResponse")}UserAccountExport(e,t){return this._connection.send("UserAccountExport",e,"json",!1,t,"UserAccountExportResponse")}UserAction(e,t){return this._connection.send("UserAction",e,"json",!1,t,"UserActionResponse")}UserEdit(e,t){return this._connection.send("UserEdit",e,"json",!1,t,"UserEditResponse")}UserGroupEdit(e,t){return this._connection.send("UserGroupEdit",e,"json",!1,t,"UserGroupEditResponse")}UserGroupEditInput(e,t){return this._connection.send("UserGroupEditInput",e,"json",!1,t,"UserGroupEditInputResponse")}UserInfoEdit(e,t){return this._connection.send("UserInfoEdit",e,"json",!1,t,"UserInfoEditResponse")}UserInfoEditInput(e,t){return this._connection.send("UserInfoEditInput",e,"json",!1,t,"UserInfoEditInputResponse")}UserPosix(e,t){return this._connection.send("UserPosix",e,"json",!1,t,"UserPosixResponse")}UserPosixInput(e,t){return this._connection.send("UserPosixInput",e,"json",!1,t,"UserPosixInputResponse")}UserQuery(e,t){return this._connection.send("UserQuery",e,"json",!1,t,"UserQueryResponse")}UserResetPass(e,t){return this._connection.send("UserResetPass",e,"json",!1,t,"UserResetPassResponse")}UserResetPassInput(e,t){return this._connection.send("UserResetPassInput",e,"json",!1,t,"UserResetPassInputResponse")}UserSudoers(e,t){return this._connection.send("UserSudoers",e,"json",!1,t,"UserSudoersResponse")}UserSudoersInput(e,t){return this._connection.send("UserSudoersInput",e,"json",!1,t,"UserSudoersInputResponse")}Users(e,t){return this._connection.send("Users",e,"json",!1,t,"UserResponse")}};var vn=class extends vt{};var Vt=class extends v{constructor(e){super(e,"ws_account","1.07")}MyAccount(e,t){return this._connection.send("MyAccount",e,"json",!1,t,"MyAccountResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"ws_accountPingResponse")}UpdateUser(e,t){return this._connection.send("UpdateUser",e,"json",!1,t,"UpdateUserResponse")}UpdateUserInput(e,t){return this._connection.send("UpdateUserInput",e,"json",!1,t,"UpdateUserInputResponse")}VerifyUser(e,t){return this._connection.send("VerifyUser",e,"json",!1,t,"VerifyUserResponse")}};var Vn=class extends Vt{VerifyUser(e){return this._connection.send("VerifyUser",e).catch(t=>{if(t.isESPExceptions&&t.Exception.some(s=>s.Code===20043))return{retcode:20043,Exceptions:{Source:"wsAccount",Exception:t.Exception}};throw t})}};import{scopedLogger as $i}from"@hpcc-js/util";var Ht=class extends v{constructor(e){super(e,"WsCloud","1.02")}GetPODs(e,t){return this._connection.send("GetPODs",e,"json",!1,t,"GetPODsResponse")}GetServices(e,t){return this._connection.send("GetServices",e,"json",!1,t,"GetServicesResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WsCloudPingResponse")}};var eo=$i("@hpcc-js/comms/services/wsCloud.ts");function to(n){return n?.Pods!==void 0}function so(n){return n.spec?.containers?.reduce((e,t)=>(t.ports?.forEach(s=>{e.push({ContainerPort:s.containerPort,Name:s.name,Protocol:s.protocol})}),e),[])??[]}function no(n){return n.filter(e=>{let t=e?.metadata?.labels??{};return t.hasOwnProperty("app.kubernetes.io/part-of")&&t["app.kubernetes.io/part-of"]==="HPCC-Platform"}).map(e=>{let t=new Date(e.metadata?.creationTimestamp);return{Name:e.metadata.name,Status:e.status?.phase,CreationTimestamp:t.toISOString(),ContainerName:e.status?.containerStatuses?.reduce((s,r)=>(r.name&&s.push(r.name),s),[]).join(", ")??"",ContainerCount:e.spec?.containers?.length??0,ContainerReadyCount:e.status?.containerStatuses?.reduce((s,r)=>s+(r.ready?1:0),0),ContainerRestartCount:e.status?.containerStatuses?.reduce((s,r)=>s+r.restartCount,0),Ports:{Port:so(e)}}})}var Hn=class extends Ht{getPODs(){return super.GetPODs({}).then(e=>{if(to(e))return e.Pods?.Pod??[];try{let t=typeof e.Result=="string"?JSON.parse(e.Result):e.Result;return no(t?.items??[])}catch(t){return eo.error(`Error parsing V1Pods json '${t instanceof Error?t.message:String(t)}'`),[]}})}};var Hs;(e=>{let n;(s=>s.gpg="gpg")(n=e.SigningMethodType||={})})(Hs||={});var jt=class extends v{constructor(e){super(e,"ws_codesign","1.1")}ListUserIDs(e,t){return this._connection.send("ListUserIDs",e,"json",!1,t,"ListUserIDsResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"ws_codesignPingResponse")}Sign(e,t){return this._connection.send("Sign",e,"json",!1,t,"SignResponse")}Verify(e,t){return this._connection.send("Verify",e,"json",!1,t,"VerifyResponse")}};var jn=class extends jt{ListUserIDsEx(e){return super.ListUserIDs(e).then(t=>t.UserIDs.Item).catch(t=>[])}Sign(e){return super.Sign({SigningMethod:Hs.SigningMethodType.gpg,...e})}};var Ot=class extends v{constructor(e){super(e,"WSDali","1.07")}Add(e,t){return this._connection.send("Add",e,"json",!1,t,"ResultResponse")}ClearTraceTransactions(e,t){return this._connection.send("ClearTraceTransactions",e,"json",!1,t,"ResultResponse")}Count(e,t){return this._connection.send("Count",e,"json",!1,t,"CountResponse")}DFSCheck(e,t){return this._connection.send("DFSCheck",e,"json",!1,t,"ResultResponse")}DFSExists(e,t){return this._connection.send("DFSExists",e,"json",!1,t,"BooleanResponse")}DFSLS(e,t){return this._connection.send("DFSLS",e,"json",!1,t,"ResultResponse")}Delete(e,t){return this._connection.send("Delete",e,"json",!1,t,"ResultResponse")}DisconnectClientConnection(e,t){return this._connection.send("DisconnectClientConnection",e,"json",!1,t,"ResultResponse")}GetClients(e,t){return this._connection.send("GetClients",e,"json",!1,t,"ResultResponse")}GetConnections(e,t){return this._connection.send("GetConnections",e,"json",!1,t,"ResultResponse")}GetDFSCSV(e,t){return this._connection.send("GetDFSCSV",e,"json",!1,t,"ResultResponse")}GetDFSMap(e,t){return this._connection.send("GetDFSMap",e,"json",!1,t,"ResultResponse")}GetDFSParents(e,t){return this._connection.send("GetDFSParents",e,"json",!1,t,"ResultResponse")}GetLogicalFile(e,t){return this._connection.send("GetLogicalFile",e,"json",!1,t,"ResultResponse")}GetLogicalFilePart(e,t){return this._connection.send("GetLogicalFilePart",e,"json",!1,t,"ResultResponse")}GetProtectedList(e,t){return this._connection.send("GetProtectedList",e,"json",!1,t,"ResultResponse")}GetSDSStats(e,t){return this._connection.send("GetSDSStats",e,"json",!1,t,"ResultResponse")}GetSDSSubscribers(e,t){return this._connection.send("GetSDSSubscribers",e,"json",!1,t,"ResultResponse")}GetValue(e,t){return this._connection.send("GetValue",e,"json",!1,t,"ResultResponse")}Import(e,t){return this._connection.send("Import",e,"json",!1,t,"ResultResponse")}ListSDSLocks(e,t){return this._connection.send("ListSDSLocks",e,"json",!1,t,"ResultResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WSDaliPingResponse")}SaveSDSStore(e,t){return this._connection.send("SaveSDSStore",e,"json",!1,t,"ResultResponse")}SetLogicalFilePartAttr(e,t){return this._connection.send("SetLogicalFilePartAttr",e,"json",!1,t,"ResultResponse")}SetProtected(e,t){return this._connection.send("SetProtected",e,"json",!1,t,"ResultResponse")}SetTraceSlowTransactions(e,t){return this._connection.send("SetTraceSlowTransactions",e,"json",!1,t,"ResultResponse")}SetTraceTransactions(e,t){return this._connection.send("SetTraceTransactions",e,"json",!1,t,"ResultResponse")}SetUnprotected(e,t){return this._connection.send("SetUnprotected",e,"json",!1,t,"ResultResponse")}SetValue(e,t){return this._connection.send("SetValue",e,"json",!1,t,"ResultResponse")}UnlockSDSLock(e,t){return this._connection.send("UnlockSDSLock",e,"json",!1,t,"ResultResponse")}};var On=class extends Ot{};var it;(c=>{let n;(R=>(R.Delete="Delete",R.AddToSuperfile="Add To Superfile",R.ChangeProtection="Change Protection",R.ChangeRestriction="Change Restriction"))(n=c.DFUArrayActions||={});let e;(R=>(R[R.NoChange=0]="NoChange",R[R.Protect=1]="Protect",R[R.Unprotect=2]="Unprotect",R[R.UnprotectAll=3]="UnprotectAll"))(e=c.DFUChangeProtection||={});let t;(E=>(E[E.NoChange=0]="NoChange",E[E.Restrict=1]="Restrict",E[E.Unrestricted=2]="Unrestricted"))(t=c.DFUChangeRestriction||={});let s;(l=>(l.xml="xml",l.def="def"))(s=c.DFUDefFileFormat||={});let r;(E=>(E.Token="Token",E.Engine="Engine",E.External="External"))(r=c.FileAccessRole||={});let i;(I=>(I.None="None",I.Access="Access",I.Read="Read",I.Write="Write",I.Full="Full"))(i=c.SecAccessType||={});let o;(j=>(j.Flat="Flat",j.Index="Index",j.Xml="Xml",j.Csv="Csv",j.Json="Json",j.IndexLocal="IndexLocal",j.IndexPartitioned="IndexPartitioned",j.Unset="Unset"))(o=c.DFUFileType||={})})(it||={});var _t=class extends v{constructor(e){super(e,"WsDfu","1.68")}Add(e,t){return this._connection.send("Add",e,"json",!1,t,"AddResponse")}AddRemote(e,t){return this._connection.send("AddRemote",e,"json",!1,t,"AddRemoteResponse")}AddtoSuperfile(e,t){return this._connection.send("AddtoSuperfile",e,"json",!1,t,"AddtoSuperfileResponse")}DFUArrayAction(e,t){return this._connection.send("DFUArrayAction",e,"json",!1,t,"DFUArrayActionResponse")}DFUBrowseData(e,t){return this._connection.send("DFUBrowseData",e,"json",!1,t,"DFUBrowseDataResponse")}DFUDefFile(e,t){return this._connection.send("DFUDefFile",e,"json",!1,t,"DFUDefFileResponse")}DFUFileAccess(e,t){return this._connection.send("DFUFileAccess",e,"json",!1,t,"DFUFileAccessResponse")}DFUFileAccessV2(e,t){return this._connection.send("DFUFileAccessV2",e,"json",!1,t,"DFUFileAccessResponse")}DFUFileCreate(e,t){return this._connection.send("DFUFileCreate",e,"json",!1,t,"DFUFileCreateResponse")}DFUFileCreateV2(e,t){return this._connection.send("DFUFileCreateV2",e,"json",!1,t,"DFUFileCreateResponse")}DFUFilePublish(e,t){return this._connection.send("DFUFilePublish",e,"json",!1,t,"DFUFilePublishResponse")}DFUFileRename(e,t){return this._connection.send("DFUFileRename",e,"json",!1,t,"DFUFileRenameResponse")}DFUFileView(e,t){return this._connection.send("DFUFileView",e,"json",!1,t,"DFUFileViewResponse")}DFUGetDataColumns(e,t){return this._connection.send("DFUGetDataColumns",e,"json",!1,t,"DFUGetDataColumnsResponse")}DFUGetFileMetaData(e,t){return this._connection.send("DFUGetFileMetaData",e,"json",!1,t,"DFUGetFileMetaDataResponse")}DFUGetMetaInquiry(e,t){return this._connection.send("DFUGetMetaInquiry",e,"json",!1,t,"DFUMetaInquiryResponse")}DFUInfo(e,t){return this._connection.send("DFUInfo",e,"json",!1,t,"DFUInfoResponse")}DFUQuery(e,t){return this._connection.send("DFUQuery",e,"json",!1,t,"DFUQueryResponse")}DFURecordTypeInfo(e,t){return this._connection.send("DFURecordTypeInfo",e,"json",!1,t,"DFURecordTypeInfoResponse")}DFUSearch(e,t){return this._connection.send("DFUSearch",e,"json",!1,t,"DFUSearchResponse")}DFUSearchData(e,t){return this._connection.send("DFUSearchData",e,"json",!1,t,"DFUSearchDataResponse")}DFUSpace(e,t){return this._connection.send("DFUSpace",e,"json",!1,t,"DFUSpaceResponse")}EclRecordTypeInfo(e,t){return this._connection.send("EclRecordTypeInfo",e,"json",!1,t,"EclRecordTypeInfoResponse")}EraseHistory(e,t){return this._connection.send("EraseHistory",e,"json",!1,t,"EraseHistoryResponse")}ListHistory(e,t){return this._connection.send("ListHistory",e,"json",!1,t,"ListHistoryResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WsDfuPingResponse")}Savexml(e,t){return this._connection.send("Savexml",e,"json",!1,t,"SavexmlResponse")}SuperfileAction(e,t){return this._connection.send("SuperfileAction",e,"json",!1,t,"SuperfileActionResponse")}SuperfileList(e,t){return this._connection.send("SuperfileList",e,"json",!1,t,"SuperfileListResponse")}};var Bc=it.DFUArrayActions,Qc=it.DFUDefFileFormat,Lc=it.DFUChangeProtection,Gc=it.DFUChangeRestriction,St=class extends _t{DFUFile(e){return this._connection.send("DFUDefFile",e,"text")}async recursiveFetchLogicalFiles(e){let t=[],s=[];return await Promise.all(e.map(r=>this.DFUInfo({Cluster:r.NodeGroup,Name:r.Name,IncludeJsonTypeInfo:!1,IncludeBinTypeInfo:!1,ForceIndexInfo:!1}).then(i=>{for(let o of i?.FileDetail?.Superfiles?.DFULogicalFile??[])t.push(o);for(let o of i?.FileDetail?.subfiles?.Item??[])s.push(o)}))),s.concat(t.length?await this.recursiveFetchLogicalFiles(t):[])}};var Yt=class extends v{constructor(e){super(e,"WsDFUXRef","1.04")}DFUXRefArrayAction(e,t){return this._connection.send("DFUXRefArrayAction",e,"json",!1,t,"DFUXRefArrayActionResponse")}DFUXRefBuild(e,t){return this._connection.send("DFUXRefBuild",e,"json",!1,t,"DFUXRefBuildResponse")}DFUXRefBuildCancel(e,t){return this._connection.send("DFUXRefBuildCancel",e,"json",!1,t,"DFUXRefBuildCancelResponse")}DFUXRefCleanDirectories(e,t){return this._connection.send("DFUXRefCleanDirectories",e,"json",!1,t,"DFUXRefCleanDirectoriesResponse")}DFUXRefDirectories(e,t){return this._connection.send("DFUXRefDirectories",e,"json",!1,t,"DFUXRefDirectoriesQueryResponse")}DFUXRefFoundFiles(e,t){return this._connection.send("DFUXRefFoundFiles",e,"json",!1,t,"DFUXRefFoundFilesQueryResponse")}DFUXRefList(e,t){return this._connection.send("DFUXRefList",e,"json",!1,t,"DFUXRefListResponse")}DFUXRefLostFiles(e,t){return this._connection.send("DFUXRefLostFiles",e,"json",!1,t,"DFUXRefLostFilesQueryResponse")}DFUXRefMessages(e,t){return this._connection.send("DFUXRefMessages",e,"json",!1,t,"DFUXRefMessagesQueryResponse")}DFUXRefOrphanFiles(e,t){return this._connection.send("DFUXRefOrphanFiles",e,"json",!1,t,"DFUXRefOrphanFilesQueryResponse")}DFUXRefUnusedFiles(e,t){return this._connection.send("DFUXRefUnusedFiles",e,"json",!1,t,"DFUXRefUnusedFilesResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WsDFUXRefPingResponse")}};var _n=class extends Yt{DFUXRefDirectoriesEx(e){return this._connection.send("DFUXRefDirectories",e,"json",!1,void 0,"DFUXRefDirectoriesQueryResponse")}DFUXRefListEx(e){return this._connection.send("DFUXRefList",e,"json",!1,void 0,"DFUXRefListResponse")}};function Yn(n,e){let t=typeof e;switch(t){case"boolean":case"number":case"string":return{id:n,type:t};case"object":if(e.Row instanceof Array&&(e=e.Row),e instanceof Array)return{id:n,type:"dataset",children:js(e[0])};if(e instanceof Object){if(e.Item&&e.Item instanceof Array&&e.Item.length===1){let s=typeof e.Item[0];if(s==="string"||s==="number")return{id:n,type:"set",fieldType:s};throw new Error("Unknown field type")}return{id:n,type:"object",fields:ro(e)}}default:throw new Error("Unknown field type")}}function js(n){n.Row&&n.Row instanceof Array&&(n=n.Row[0]);let e=[];for(let t in n)e.push(Yn(t,n[t]));return e}function ro(n){let e={};for(let t in n)e[t]=Yn(t,n[t]);return e}var Xt=class extends v{constructor(e){super(e,"WsEcl","0")}opts(){return this._connection.opts()}requestJson(e,t){return this._connection.send(`example/request/query/${e}/${t}/json`,{},"text").then(s=>{let r=JSON.parse(s);for(let i in r)return r[i];return{}}).then(js)}responseJson(e,t){return this._connection.send(`example/response/query/${e}/${t}/json`,{},"text").then(s=>{let r=JSON.parse(s);for(let i in r)return r[i].Results;return{}}).then(s=>{let r={};for(let i in s)r[i]=js(s[i]);return r})}submit(e,t,s){let r=`submit/query/${e}/${t}`;return this._connection.send(r,s,"json2").then(i=>{if(i.Results&&i.Results.Exception)throw new ze(r,s,{Source:"wsEcl.submit",Exception:i.Results.Exception});return i.Results})}};var qt=class extends v{constructor(e){super(e,"ws_elk","1")}GetConfigDetails(e,t){return this._connection.send("GetConfigDetails",e,"json",!1,t,"GetConfigDetailsResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"ws_elkPingResponse")}};var Xn=class extends qt{};import{scopedLogger as io}from"@hpcc-js/util";var te;(d=>{let n;(F=>(F.global="global",F.workunits="workunits",F.components="components",F.audience="audience",F.class="class",F.instance="instance",F.node="node",F.message="message",F.logid="logid",F.processid="processid",F.threadid="threadid",F.timestamp="timestamp",F.pod="pod",F.traceid="traceid",F.spanid="spanid"))(n=d.LogColumnType||={});let e;(N=>(N.string="string",N.numeric="numeric",N.datetime="datetime",N.enum="enum",N.epoch="epoch"))(e=d.LogColumnValueType||={});let t;(T=>(T[T.All=0]="All",T[T.ByJobID=1]="ByJobID",T[T.ByComponent=2]="ByComponent",T[T.ByLogType=3]="ByLogType",T[T.ByTargetAudience=4]="ByTargetAudience",T[T.BySourceInstance=5]="BySourceInstance",T[T.BySourceNode=6]="BySourceNode",T[T.ByFieldName=7]="ByFieldName",T[T.ByPod=8]="ByPod",T[T.ByTraceID=9]="ByTraceID",T[T.BySpanID=10]="BySpanID"))(t=d.LogAccessType||={});let s;(R=>(R[R.Success=0]="Success",R[R.Warning=1]="Warning",R[R.Fail=2]="Fail"))(s=d.LogAccessStatusCode||={});let r;(R=>(R[R.NONE=0]="NONE",R[R.AND=1]="AND",R[R.OR=2]="OR"))(r=d.LogAccessFilterOperator||={});let i;(I=>(I[I.MIN=0]="MIN",I[I.DEFAULT=1]="DEFAULT",I[I.ALL=2]="ALL",I[I.CUSTOM=3]="CUSTOM"))(i=d.LogSelectColumnMode||={});let o;(T=>(T[T.ByDate=0]="ByDate",T[T.ByJobID=1]="ByJobID",T[T.ByComponent=2]="ByComponent",T[T.ByLogType=3]="ByLogType",T[T.ByTargetAudience=4]="ByTargetAudience",T[T.BySourceInstance=5]="BySourceInstance",T[T.BySourceNode=6]="BySourceNode",T[T.ByFieldName=7]="ByFieldName",T[T.ByPod=8]="ByPod",T[T.ByTraceID=9]="ByTraceID",T[T.BySpanID=10]="BySpanID"))(o=d.SortColumType||={});let c;(E=>(E[E.ASC=0]="ASC",E[E.DSC=1]="DSC"))(c=d.SortDirection||={})})(te||={});var zt=class extends v{constructor(e){super(e,"ws_logaccess","1.08")}GetHealthReport(e){return this._connection.send("GetHealthReport",e,"json",!1,void 0,"GetHealthReportResponse")}GetLogAccessInfo(e){return this._connection.send("GetLogAccessInfo",e,"json",!1,void 0,"GetLogAccessInfoResponse")}GetLogs(e){return this._connection.send("GetLogs",e,"json",!1,void 0,"GetLogsResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_logaccessPingResponse")}};var qn=io("@hpcc-js/comms/services/wsLogaccess.ts");var oo=(o=>(o.Disaster="DIS",o.Error="ERR",o.Warning="WRN",o.Information="INF",o.Progress="PRO",o.Metric="MET",o))(oo||{}),ao=(r=>(r.Operator="OPR",r.User="USR",r.Programmer="PRO",r.Audit="ADT",r))(ao||{}),co=new Set(["azureloganalyticscurl","elasticstack","grafanacurl"]),uo=new Set(Object.values(te.LogColumnType));function lo(n){switch(n){case te.LogColumnType.workunits:case"hpcc.log.jobid":return te.LogAccessType.ByJobID;case te.LogColumnType.audience:case"hpcc.log.audience":return te.LogAccessType.ByTargetAudience;case te.LogColumnType.class:case"hpcc.log.class":return te.LogAccessType.ByLogType;case te.LogColumnType.components:case"kubernetes.container.name":return te.LogAccessType.ByComponent;default:return te.LogAccessType.ByFieldName}}var go=["audience","class","workunits","message","processid","logid","threadid","timestamp","components","instance"];function po(n,e){let t=[];for(let s of go){let r=n[s];if(r==null||r===""||Array.isArray(r)&&r.length===0||!(s in e))continue;let o=uo.has(s)?s:e[s],c=lo(o);c===te.LogAccessType.ByFieldName&&(o=e[s]);let d=c===te.LogAccessType.ByComponent,x=Array.isArray(r)?r:[r];for(let l of x)t.push({LogCategory:c,SearchField:o,SearchByValue:d?l+"*":l})}return t}function Jt(n){let e={leftFilter:n[0]},t=e;for(let s=1;s<n.length;s++)t.Operator=te.LogAccessFilterOperator.OR,s===n.length-1?t.rightFilter=n[s]:(t.rightBinaryFilter={BinaryLogFilter:[{leftFilter:n[s]}]},t=t.rightBinaryFilter.BinaryLogFilter[0]);return e}function Jn(n){let[e,...t]=n,s={};if(e.length===1?s.leftFilter=e[0]:s.leftBinaryFilter={BinaryLogFilter:[Jt(e)]},t.length===0)return s;if(s.Operator=te.LogAccessFilterOperator.AND,t.length===1){let[r]=t;r.length===1?s.rightFilter=r[0]:s.rightBinaryFilter={BinaryLogFilter:[Jt(r)]}}else s.rightBinaryFilter={BinaryLogFilter:[Jn(t)]};return s}function mo(n){let e=new Map;for(let o of n){let c=e.get(o.SearchField);c?c.push(o):e.set(o.SearchField,[o])}let t=[...e.values()];if(t.length===0)return{leftFilter:{LogCategory:te.LogAccessType.All}};let[s,...r]=t,i={};if(s.length===1?i.leftFilter=s[0]:i.leftBinaryFilter={BinaryLogFilter:[Jt(s)]},r.length===0)return i;if(i.Operator=te.LogAccessFilterOperator.AND,r.length===1){let[o]=r;o.length===1?i.rightFilter=o[0]:i.rightBinaryFilter={BinaryLogFilter:[Jt(o)]}}else i.rightBinaryFilter={BinaryLogFilter:[Jn(r)]};return i}var zn=class extends zt{_logAccessInfo;GetLogAccessInfo(e={}){return this._logAccessInfo||(this._logAccessInfo=super.GetLogAccessInfo(e)),this._logAccessInfo}GetLogs(e){return super.GetLogs(e)}convertLogLine(e,t){let s={},r=t?.fields?Object.assign({},...t.fields):null;for(let i in e)s[i]=r?r[e[i]]??"":"";return s}async GetLogsEx(e){let t=await this.GetLogAccessInfo(),s={};t.Columns.Column.forEach(c=>s[c.LogType]=c.Name);let r=po(e,s),i={StartDate:e.StartDate instanceof Date?e.StartDate.toISOString():new Date(0).toISOString()};e.EndDate instanceof Date&&(i.EndDate=e.EndDate.toISOString());let o={Filter:mo(r),Range:i,LogLineStartFrom:e.LogLineStartFrom??0,LogLineLimit:e.LogLineLimit??100,SelectColumnMode:te.LogSelectColumnMode.DEFAULT,Format:"JSON",SortBy:{SortCondition:[{BySortType:te.SortColumType.ByDate,ColumnName:"",Direction:0}]}};return this.GetLogs(o).then(c=>{try{let d=JSON.parse(c.LogLines);return{lines:co.has(t.RemoteLogManagerType)?d.lines?.map(l=>this.convertLogLine(s,l))??[]:(qn.warning(`Unknown RemoteLogManagerType: ${t.RemoteLogManagerType}`),[]),total:c.TotalLogLinesAvailable??1e4}}catch(d){qn.error(d.message??d)}return{lines:[],total:0}})}};var Ge=mt(Zn(),1);import{exists as fo}from"@hpcc-js/util";var ho;(t=>{let n;(i=>(i[i.THRESHOLD_PERCENTAGE=0]="THRESHOLD_PERCENTAGE",i[i.THRESHOLD_MB=1]="THRESHOLD_MB"))(n=t.ThresholdType||={});let e;(I=>(I.ALLNODES="ALLNODES",I.THORMACHINES="THORMACHINES",I.HOLEMACHINES="HOLEMACHINES",I.ROXIEMACHINES="ROXIEMACHINES",I.MACHINES="MACHINES",I.AVAILABLEMACHINES="AVAILABLEMACHINES",I.DROPZONE="DROPZONE",I.STANDBYNNODE="STANDBYNNODE",I.THORSPARENODES="THORSPARENODES",I.HOLESTANDBYNODES="HOLESTANDBYNODES"))(e=t.TpMachineType||={})})(ho||={});var Zt=class extends v{constructor(e){super(e,"ws_machine","1.19")}GetComponentStatus(e,t){return this._connection.send("GetComponentStatus",e,"json",!1,t,"GetComponentStatusResponse")}GetComponentUsage(e,t){return this._connection.send("GetComponentUsage",e,"json",!1,t,"GetComponentUsageResponse")}GetMachineInfo(e,t){return this._connection.send("GetMachineInfo",e,"json",!1,t,"GetMachineInfoResponse")}GetMachineInfoEx(e,t){return this._connection.send("GetMachineInfoEx",e,"json",!1,t,"GetMachineInfoResponseEx")}GetMetrics(e,t){return this._connection.send("GetMetrics",e,"json",!1,t,"MetricsResponse")}GetNodeGroupUsage(e,t){return this._connection.send("GetNodeGroupUsage",e,"json",!1,t,"GetNodeGroupUsageResponse")}GetTargetClusterInfo(e,t){return this._connection.send("GetTargetClusterInfo",e,"json",!1,t,"GetTargetClusterInfoResponse")}GetTargetClusterUsage(e,t){return this._connection.send("GetTargetClusterUsage",e,"json",!1,t,"GetTargetClusterUsageResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"ws_machinePingResponse")}UpdateComponentStatus(e,t){return this._connection.send("UpdateComponentStatus",e,"json",!1,t,"UpdateComponentStatusResponse")}};var ke=class extends Zt{GetTargetClusterUsageEx(e,t=!1){return this._connection.send("GetTargetClusterUsage",{TargetClusters:e?{Item:e}:{},BypassCachedResult:t}).then(s=>fo("TargetClusterUsages.TargetClusterUsage",s)?s.TargetClusterUsages.TargetClusterUsage:[]).then(s=>s.filter(r=>!!r.ComponentUsages).map(r=>{let i=r.ComponentUsages.ComponentUsage.map(o=>{let c=(o.MachineUsages&&o.MachineUsages.MachineUsage?o.MachineUsages.MachineUsage:[]).map(d=>{let x=d.DiskUsages&&d.DiskUsages.DiskUsage?d.DiskUsages.DiskUsage.map(l=>({...l,InUse:l.InUse*1024,Total:(l.InUse+l.Available)*1024,PercentUsed:100-l.PercentAvailable})):[];return{Name:d.Name,NetAddress:d.NetAddress,Description:d.Description,DiskUsages:x,mean:(0,Ge.mean)(x.filter(l=>!isNaN(l.PercentUsed)),l=>l.PercentUsed),max:(0,Ge.max)(x.filter(l=>!isNaN(l.PercentUsed)),l=>l.PercentUsed)}});return{Type:o.Type,Name:o.Name,Description:o.Description,MachineUsages:c,MachineUsagesDescription:c.reduce((d,x)=>d+(x.Description||""),""),mean:(0,Ge.mean)(c.filter(d=>!isNaN(d.mean)),d=>d.mean),max:(0,Ge.max)(c.filter(d=>!isNaN(d.max)),d=>d.max)}});return{Name:r.Name,Description:r.Description,ComponentUsages:i,ComponentUsagesDescription:i.reduce((o,c)=>o+(c.MachineUsagesDescription||""),""),mean:(0,Ge.mean)(i.filter(o=>!isNaN(o.mean)),o=>o.mean),max:(0,Ge.max)(i.filter(o=>!isNaN(o.max)),o=>o.max)}}))}};var $t=class extends v{constructor(e){super(e,"WsPackageProcess","1.08")}ActivatePackage(e,t){return this._connection.send("ActivatePackage",e,"json",!1,t,"ActivatePackageResponse")}AddPackage(e,t){return this._connection.send("AddPackage",e,"json",!1,t,"AddPackageResponse")}AddPartToPackageMap(e,t){return this._connection.send("AddPartToPackageMap",e,"json",!1,t,"AddPartToPackageMapResponse")}CopyPackageMap(e,t){return this._connection.send("CopyPackageMap",e,"json",!1,t,"CopyPackageMapResponse")}DeActivatePackage(e,t){return this._connection.send("DeActivatePackage",e,"json",!1,t,"DeActivatePackageResponse")}DeletePackage(e,t){return this._connection.send("DeletePackage",e,"json",!1,t,"DeletePackageResponse")}Echo(e,t){return this._connection.send("Echo",e,"json",!1,t,"EchoResponse")}GetPackage(e,t){return this._connection.send("GetPackage",e,"json",!1,t,"GetPackageResponse")}GetPackageMapById(e,t){return this._connection.send("GetPackageMapById",e,"json",!1,t,"GetPackageMapByIdResponse")}GetPackageMapSelectOptions(e,t){return this._connection.send("GetPackageMapSelectOptions",e,"json",!1,t,"GetPackageMapSelectOptionsResponse")}GetPartFromPackageMap(e,t){return this._connection.send("GetPartFromPackageMap",e,"json",!1,t,"GetPartFromPackageMapResponse")}GetQueryFileMapping(e,t){return this._connection.send("GetQueryFileMapping",e,"json",!1,t,"GetQueryFileMappingResponse")}ListPackage(e,t){return this._connection.send("ListPackage",e,"json",!1,t,"ListPackageResponse")}ListPackages(e,t){return this._connection.send("ListPackages",e,"json",!1,t,"ListPackagesResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WsPackageProcessPingResponse")}RemovePartFromPackageMap(e,t){return this._connection.send("RemovePartFromPackageMap",e,"json",!1,t,"RemovePartFromPackageMapResponse")}ValidatePackage(e,t){return this._connection.send("ValidatePackage",e,"json",!1,t,"ValidatePackageResponse")}};var $n=class extends $t{};var es=class extends v{constructor(e){super(e,"WsResources","1.01")}Ping(e){return this._connection.send("Ping",e)}ServiceQuery(e){return this._connection.send("ServiceQuery",e)}WebLinksQuery(e){return this._connection.send("WebLinksQuery",e)}};var er=class extends es{};var tr;(e=>{let n;(r=>(r.ECL="ECL",r.DFU="DFU"))(n=e.WUTypes||={})})(tr||={});var ts=class extends v{constructor(e){super(e,"WSSasha","1.01")}ArchiveWU(e,t){return this._connection.send("ArchiveWU",e,"json",!1,t,"ResultResponse")}GetVersion(e,t){return this._connection.send("GetVersion",e,"json",!1,t,"ResultResponse")}ListWU(e,t){return this._connection.send("ListWU",e,"json",!1,t,"ResultResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WSSashaPingResponse")}RestoreWU(e,t){return this._connection.send("RestoreWU",e,"json",!1,t,"ResultResponse")}};var sr=class extends ts{};var ar=mt(Os(),1);var or;(t=>{let n;(d=>(d.ALL="ALL",d.READ="READ",d.WRITE="WRITE",d.HOLD="HOLD",d.SUB="SUB"))(n=t.LockModes||={});let e;(E=>(E.Attach="Attach",E.Detach="Detach",E.State="State",E.Reload="Reload",E.ReloadRetry="ReloadRetry",E.MemLock="MemLock",E.MemUnlock="MemUnlock",E.GetMemLocked="GetMemLocked"))(e=t.RoxieControlCmdType||={})})(or||={});var rs=class extends v{constructor(e){super(e,"WsSMC","1.29")}Activity(e){return this._connection.send("Activity",e,"json",!1,void 0,"ActivityResponse")}BrowseResources(e){return this._connection.send("BrowseResources",e,"json",!1,void 0,"BrowseResourcesResponse")}ClearQueue(e){return this._connection.send("ClearQueue",e,"json",!1,void 0,"SMCQueueResponse")}GetBuildInfo(e){return this._connection.send("GetBuildInfo",e,"json",!1,void 0,"GetBuildInfoResponse")}GetGlobalMetrics(e){return this._connection.send("GetGlobalMetrics",e,"json",!1,void 0,"GetGlobalMetricsResponse")}GetStatusServerInfo(e){return this._connection.send("GetStatusServerInfo",e,"json",!1,void 0,"GetStatusServerInfoResponse")}GetThorQueueAvailability(e){return this._connection.send("GetThorQueueAvailability",e,"json",!1,void 0,"GetThorQueueAvailabilityResponse")}Index(e){return this._connection.send("Index",e,"json",!1,void 0,"SMCIndexResponse")}LockQuery(e){return this._connection.send("LockQuery",e,"json",!1,void 0,"LockQueryResponse")}MoveJobBack(e){return this._connection.send("MoveJobBack",e,"json",!1,void 0,"SMCJobResponse")}MoveJobDown(e){return this._connection.send("MoveJobDown",e,"json",!1,void 0,"SMCJobResponse")}MoveJobFront(e){return this._connection.send("MoveJobFront",e,"json",!1,void 0,"SMCJobResponse")}MoveJobUp(e){return this._connection.send("MoveJobUp",e,"json",!1,void 0,"SMCJobResponse")}NotInCommunityEdition(e){return this._connection.send("NotInCommunityEdition",e,"json",!1,void 0,"NotInCommunityEditionResponse")}PauseQueue(e){return this._connection.send("PauseQueue",e,"json",!1,void 0,"SMCQueueResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"WsSMCPingResponse")}RecordGlobalMetrics(e){return this._connection.send("RecordGlobalMetrics",e,"json",!1,void 0,"RecordGlobalMetricsResponse")}RemoveJob(e){return this._connection.send("RemoveJob",e,"json",!1,void 0,"SMCJobResponse")}ResumeQueue(e){return this._connection.send("ResumeQueue",e,"json",!1,void 0,"SMCQueueResponse")}RoxieControlCmd(e){return this._connection.send("RoxieControlCmd",e,"json",!1,void 0,"RoxieControlCmdResponse")}RoxieXrefCmd(e){return this._connection.send("RoxieXrefCmd",e,"json",!1,void 0,"RoxieXrefCmdResponse")}SetBanner(e){return this._connection.send("SetBanner",e,"json",!1,void 0,"SetBannerResponse")}SetJobPriority(e){return this._connection.send("SetJobPriority",e,"json",!1,void 0,"SMCPriorityResponse")}StopQueue(e){return this._connection.send("StopQueue",e,"json",!1,void 0,"SMCQueueResponse")}};var So=(0,ar.timeParse)("%Y%m%d%H");function Do(n){return typeof n=="number"||typeof n=="string"&&n.trim()!==""&&!isNaN(+n)}var Dt=class extends rs{connectionOptions(){return this._connection.opts()}Activity(e){return super.Activity(e).then(t=>({Running:{ActiveWorkunit:[]},...t}))}parseGlobalMetric(e,t){return e.startsWith("Cost")?+t/1e6:e.startsWith("Date")?So(t):e.startsWith("Num")?+t:e.startsWith("Time")?+t/1e9:e.startsWith("When")?new Date(+t/1e3).toISOString():Do(t)?+t:t}GetNormalisedGlobalMetrics(e){return super.GetGlobalMetrics(e).then(t=>{let s=[];for(let r of t?.GlobalMetrics?.GlobalMetric||[]){let i={Category:r.Category,Start:this.parseGlobalMetric("Date",r.DateTimeRange?.Start),End:this.parseGlobalMetric("Date",r.DateTimeRange?.End),dimensions:{},stats:{}};for(let o of r.Dimensions?.Dimension||[])i.dimensions[o.Name]=o.Value;for(let o of r.Stats?.Stat||[])i.stats[o.Name]=this.parseGlobalMetric(o.Name,o.Value);s.push(i)}return s})}};var is=class extends v{constructor(e){super(e,"wsstore","1.02")}CreateStore(e,t){return this._connection.send("CreateStore",e,"json",!1,t,"CreateStoreResponse")}Delete(e,t){return this._connection.send("Delete",e,"json",!1,t,"DeleteResponse")}DeleteNamespace(e,t){return this._connection.send("DeleteNamespace",e,"json",!1,t,"DeleteNamespaceResponse")}Fetch(e,t){return this._connection.send("Fetch",e,"json",!1,t,"FetchResponse")}FetchAll(e,t){return this._connection.send("FetchAll",e,"json",!1,t,"FetchAllResponse")}FetchKeyMetadata(e,t){return this._connection.send("FetchKeyMetadata",e,"json",!1,t,"FetchKeyMDResponse")}ListKeys(e,t){return this._connection.send("ListKeys",e,"json",!1,t,"ListKeysResponse")}ListNamespaces(e,t){return this._connection.send("ListNamespaces",e,"json",!1,t,"ListNamespacesResponse")}ListStores(e,t){return this._connection.send("ListStores",e,"json",!1,t,"ListStoresResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"wsstorePingResponse")}Set(e,t){return this._connection.send("Set",e,"json",!1,t,"SetResponse")}};var Ct=class extends is{Delete(e){return super.Delete(e).catch(t=>{if(t.isESPExceptions&&t.Exception.some(s=>s.Code===-1))return{Exceptions:void 0,Success:!0};throw t})}Fetch(e){return super.Fetch(e).catch(t=>{if(t.isESPExceptions&&t.Exception.some(s=>s.Code===-1))return{Exceptions:void 0,Value:void 0};throw t})}};var cr;(s=>{let n;(o=>(o.XML="XML",o.YAML="YAML"))(n=s.TpConfigResponseFormat||={});let e;(c=>(c.All="All",c.QueriesOnly="QueriesOnly",c.WorkunitsOnly="WorkunitsOnly"))(e=s.RoxieQueueFilter||={});let t;(N=>(N.ALLNODES="ALLNODES",N.THORMACHINES="THORMACHINES",N.HOLEMACHINES="HOLEMACHINES",N.ROXIEMACHINES="ROXIEMACHINES",N.MACHINES="MACHINES",N.AVAILABLEMACHINES="AVAILABLEMACHINES",N.DROPZONE="DROPZONE",N.STANDBYNNODE="STANDBYNNODE",N.THORSPARENODES="THORSPARENODES",N.HOLESTANDBYNODES="HOLESTANDBYNODES"))(t=s.TpMachineType||={})})(cr||={});var os=class extends v{constructor(e){super(e,"WsTopology","1.33")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WsTopologyPingResponse")}SystemLog(e,t){return this._connection.send("SystemLog",e,"json",!1,t,"SystemLogResponse")}TpClusterInfo(e,t){return this._connection.send("TpClusterInfo",e,"json",!1,t,"TpClusterInfoResponse")}TpClusterQuery(e,t){return this._connection.send("TpClusterQuery",e,"json",!1,t,"TpClusterQueryResponse")}TpComponentConfiguration(e,t){return this._connection.send("TpComponentConfiguration",e,"json",!1,t,"TpComponentConfigurationResponse")}TpConfiguredComponents(e,t){return this._connection.send("TpConfiguredComponents",e,"json",!1,t,"TpConfiguredComponentsResponse")}TpDropZoneQuery(e,t){return this._connection.send("TpDropZoneQuery",e,"json",!1,t,"TpDropZoneQueryResponse")}TpGetComponentFile(e,t){return this._connection.send("TpGetComponentFile",e,"json",!1,t,"TpGetComponentFileResponse")}TpGetServicePlugins(e,t){return this._connection.send("TpGetServicePlugins",e,"json",!1,t,"TpGetServicePluginsResponse")}TpGroupQuery(e,t){return this._connection.send("TpGroupQuery",e,"json",!1,t,"TpGroupQueryResponse")}TpListLogFiles(e,t){return this._connection.send("TpListLogFiles",e,"json",!1,t,"TpListLogFilesResponse")}TpListTargetClusters(e,t){return this._connection.send("TpListTargetClusters",e,"json",!1,t,"TpListTargetClustersResponse")}TpLogFile(e,t){return this._connection.send("TpLogFile",e,"json",!1,t,"TpLogFileResponse")}TpLogFileDisplay(e,t){return this._connection.send("TpLogFileDisplay",e,"json",!1,t,"TpLogFileResponse")}TpLogicalClusterQuery(e,t){return this._connection.send("TpLogicalClusterQuery",e,"json",!1,t,"TpLogicalClusterQueryResponse")}TpMachineInfo(e,t){return this._connection.send("TpMachineInfo",e,"json",!1,t,"TpMachineInfoResponse")}TpMachineQuery(e,t){return this._connection.send("TpMachineQuery",e,"json",!1,t,"TpMachineQueryResponse")}TpServiceQuery(e,t){return this._connection.send("TpServiceQuery",e,"json",!1,t,"TpServiceQueryResponse")}TpSetMachineStatus(e,t){return this._connection.send("TpSetMachineStatus",e,"json",!1,t,"TpSetMachineStatusResponse")}TpSwapNode(e,t){return this._connection.send("TpSwapNode",e,"json",!1,t,"TpSwapNodeResponse")}TpTargetClusterQuery(e,t){return this._connection.send("TpTargetClusterQuery",e,"json",!1,t,"TpTargetClusterQueryResponse")}TpThorStatus(e,t){return this._connection.send("TpThorStatus",e,"json",!1,t,"TpThorStatusResponse")}TpXMLFile(e,t){return this._connection.send("TpXMLFile",e,"json",!1,t,"TpXMLFileResponse")}};var ge=class extends os{connectionOptions(){return this._connection.opts()}protocol(){return this._connection.opts().baseUrl.split("//")[0]}ip(){return this._connection.opts().baseUrl.split("//")[1].split(":")[0]}DefaultTpLogicalClusterQuery(e={}){return this.TpLogicalClusterQuery(e).then(t=>{if(t.default)return t.default;let s,r;return t.TpLogicalClusters.TpLogicalCluster.some((i,o)=>(o===0&&(r=i),i.Type==="hthor"?(s=i,!0):!1)),s||r})}};import{deepMixin as Co,xml2json as Ro}from"@hpcc-js/util";var he;(w=>{let n;(H=>(H.Abort="Abort",H.Delete="Delete",H.Deschedule="Deschedule",H.Reschedule="Reschedule",H.Pause="Pause",H.PauseNow="PauseNow",H.Protect="Protect",H.Unprotect="Unprotect",H.Restore="Restore",H.Resume="Resume",H.SetToFailed="SetToFailed",H.Archive="Archive"))(n=w.ECLWUActions||={});let e;(m=>(m[m.MIN=0]="MIN",m[m.DEFAULT=1]="DEFAULT",m[m.ALL=2]="ALL",m[m.CUSTOM=3]="CUSTOM"))(e=w.LogSelectColumnMode||={});let t;(ne=>(ne[ne.ASC=0]="ASC",ne[ne.DSC=1]="DSC"))(t=w.SortDirection||={});let s;(Q=>(Q.ALL="ALL",Q.DIS="DIS",Q.ERR="ERR",Q.WRN="WRN",Q.INF="INF",Q.PRO="PRO",Q.MET="MET",Q.EVT="EVT"))(s=w.LogEventClass||={});let r;(_=>(_.Single="Single",_.List="List",_.Multi="Multi"))(r=w.WUDetailsAttrValueType||={});let i;(_=>(_.SyntaxCheck="SyntaxCheck",_.Deploy="Deploy",_.Publish="Publish"))(i=w.EclDefinitionActions||={});let o;(_=>(_.xml="xml",_.json="json",_.text="text"))(o=w.ErrorMessageFormat||={});let c;(_=>(_[_.XML=0]="XML",_[_.JSON=1]="JSON",_[_.CSV=2]="CSV"))(c=w.LogAccessLogFormat||={});let d;(m=>(m.info="info",m.warning="warning",m.error="error",m.alert="alert"))(d=w.WUExceptionSeverity||={});let x;(m=>(m[m.OriginalText=0]="OriginalText",m[m.Attachment=1]="Attachment",m[m.ZIP=2]="ZIP",m[m.GZIP=3]="GZIP"))(x=w.WUFileDownloadOption||={});let l;(H=>(H.XML="XML",H.cpp="cpp",H.dll="dll",H.res="res",H.log="log",H.WUECL="WUECL",H.ThorLog="ThorLog",H.ThorSlaveLog="ThorSlaveLog",H.EclAgentLog="EclAgentLog",H.ArchiveQuery="ArchiveQuery",H.ComponentLog="ComponentLog",H.PostMortem="PostMortem"))(l=w.WUFileType||={});let E;(L=>(L.Allqueries="All queries",L.Notsuspended="Not suspended",L.Suspended="Suspended",L.Suspendedbyuser="Suspended by user",L.Suspendedbyfirstnode="Suspended by first node",L.Suspendedbyanynode="Suspended by any node"))(E=w.WUQueryFilterSuspendedType||={});let R;(F=>(F.All="All",F.Id="Id",F.Name="Name",F.Alias="Alias",F.Status="Status"))(R=w.WUQuerySetFilterType||={});let I;(_=>(_.All="All",_.Protected="Protected",_.NotProtected="NotProtected"))(I=w.WUProtectFilter||={});let N;(T=>T.Deactivate="Deactivate")(N=w.QuerySetAliasActionTypes||={});let V;(ne=>(ne.None="None",ne.ActivateImportedActive="ActivateImportedActive"))(V=w.QuerysetImportActivation||={});let j;(Q=>(Q.Suspend="Suspend",Q.Unsuspend="Unsuspend",Q.ToggleSuspend="ToggleSuspend",Q.Activate="Activate",Q.Delete="Delete",Q.DeleteQueriesAndWUs="DeleteQueriesAndWUs",Q.RemoveAllAliases="RemoveAllAliases",Q.ResetQueryStats="ResetQueryStats"))(j=w.QuerySetQueryActionTypes||={});let X;(m=>(m[m.DoNotActivateQuery=0]="DoNotActivateQuery",m[m.ActivateQuery=1]="ActivateQuery",m[m.ActivateQuerySuspendPrevious=2]="ActivateQuerySuspendPrevious",m[m.ActivateQueryDeletePrevious=3]="ActivateQueryDeletePrevious"))(X=w.WUQueryActivationMode||={})})(he||={});var Rt=class extends v{constructor(e){super(e,"WsWorkunits","2.10")}GVCAjaxGraph(e,t){return this._connection.send("GVCAjaxGraph",e,"json",!1,t,"GVCAjaxGraphResponse")}Ping(e,t){return this._connection.send("Ping",e,"json",!1,t,"WsWorkunitsPingResponse")}WUAbort(e,t){return this._connection.send("WUAbort",e,"json",!1,t,"WUAbortResponse")}WUAction(e,t){return this._connection.send("WUAction",e,"json",!1,t,"WUActionResponse")}WUAddLocalFileToWorkunit(e,t){return this._connection.send("WUAddLocalFileToWorkunit",e,"json",!1,t,"WUAddLocalFileToWorkunitResponse")}WUAnalyseHotspot(e,t){return this._connection.send("WUAnalyseHotspot",e,"json",!1,t,"WUAnalyseHotspotResponse")}WUCDebug(e,t){return this._connection.send("WUCDebug",e,"json",!1,t,"WUDebugResponse")}WUCheckFeatures(e,t){return this._connection.send("WUCheckFeatures",e,"json",!1,t,"WUCheckFeaturesResponse")}WUClusterJobQueueLOG(e,t){return this._connection.send("WUClusterJobQueueLOG",e,"json",!1,t,"WUClusterJobQueueLOGResponse")}WUClusterJobQueueXLS(e,t){return this._connection.send("WUClusterJobQueueXLS",e,"json",!1,t,"WUClusterJobQueueXLSResponse")}WUClusterJobSummaryXLS(e,t){return this._connection.send("WUClusterJobSummaryXLS",e,"json",!1,t,"WUClusterJobSummaryXLSResponse")}WUClusterJobXLS(e,t){return this._connection.send("WUClusterJobXLS",e,"json",!1,t,"WUClusterJobXLSResponse")}WUCompileECL(e,t){return this._connection.send("WUCompileECL",e,"json",!1,t,"WUCompileECLResponse")}WUCopyLogicalFiles(e,t){return this._connection.send("WUCopyLogicalFiles",e,"json",!1,t,"WUCopyLogicalFilesResponse")}WUCopyQuerySet(e,t){return this._connection.send("WUCopyQuerySet",e,"json",!1,t,"WUCopyQuerySetResponse")}WUCreate(e,t){return this._connection.send("WUCreate",e,"json",!1,t,"WUCreateResponse")}WUCreateAndUpdate(e,t){return this._connection.send("WUCreateAndUpdate",e,"json",!1,t,"WUUpdateResponse")}WUCreateZAPInfo(e,t){return this._connection.send("WUCreateZAPInfo",e,"json",!1,t,"WUCreateZAPInfoResponse")}WUDelete(e,t){return this._connection.send("WUDelete",e,"json",!1,t,"WUDeleteResponse")}WUDeployWorkunit(e,t){return this._connection.send("WUDeployWorkunit",e,"json",!1,t,"WUDeployWorkunitResponse")}WUDetails(e,t){return this._connection.send("WUDetails",e,"json",!1,t,"WUDetailsResponse")}WUDetailsMeta(e,t){return this._connection.send("WUDetailsMeta",e,"json",!1,t,"WUDetailsMetaResponse")}WUEclDefinitionAction(e,t){return this._connection.send("WUEclDefinitionAction",e,"json",!1,t,"WUEclDefinitionActionResponse")}WUExport(e,t){return this._connection.send("WUExport",e,"json",!1,t,"WUExportResponse")}WUFile(e,t){return this._connection.send("WUFile",e,"json",!1,t,"WULogFileResponse")}WUFullResult(e,t){return this._connection.send("WUFullResult",e,"json",!1,t,"WUFullResultResponse")}WUGVCGraphInfo(e,t){return this._connection.send("WUGVCGraphInfo",e,"json",!1,t,"WUGVCGraphInfoResponse")}WUGetArchiveFile(e,t){return this._connection.send("WUGetArchiveFile",e,"json",!1,t,"WUGetArchiveFileResponse")}WUGetDependancyTrees(e,t){return this._connection.send("WUGetDependancyTrees",e,"json",!1,t,"WUGetDependancyTreesResponse")}WUGetGraph(e,t){return this._connection.send("WUGetGraph",e,"json",!1,t,"WUGetGraphResponse")}WUGetGraphNameAndTypes(e,t){return this._connection.send("WUGetGraphNameAndTypes",e,"json",!1,t,"WUGetGraphNameAndTypesResponse")}WUGetNumFileToCopy(e,t){return this._connection.send("WUGetNumFileToCopy",e,"json",!1,t,"WUGetNumFileToCopyResponse")}WUGetPlugins(e,t){return this._connection.send("WUGetPlugins",e,"json",!1,t,"WUGetPluginsResponse")}WUGetStats(e,t){return this._connection.send("WUGetStats",e,"json",!1,t,"WUGetStatsResponse")}WUGetThorJobList(e,t){return this._connection.send("WUGetThorJobList",e,"json",!1,t,"WUGetThorJobListResponse")}WUGetThorJobQueue(e,t){return this._connection.send("WUGetThorJobQueue",e,"json",!1,t,"WUGetThorJobQueueResponse")}WUGetZAPInfo(e,t){return this._connection.send("WUGetZAPInfo",e,"json",!1,t,"WUGetZAPInfoResponse")}WUGraphInfo(e,t){return this._connection.send("WUGraphInfo",e,"json",!1,t,"WUGraphInfoResponse")}WUGraphTiming(e,t){return this._connection.send("WUGraphTiming",e,"json",!1,t,"WUGraphTimingResponse")}WUHelperFileArchive(e,t){return this._connection.send("WUHelperFileArchive",e,"json",!1,t,"WUHelperFileArchiveResponse")}WUInfo(e,t){return this._connection.send("WUInfo",e,"json",!1,t,"WUInfoResponse")}WUInfoDetails(e,t){return this._connection.send("WUInfoDetails",e,"json",!1,t,"WUInfoResponse")}WUJobList(e,t){return this._connection.send("WUJobList",e,"json",!1,t,"WUJobListResponse")}WULightWeightQuery(e,t){return this._connection.send("WULightWeightQuery",e,"json",!1,t,"WULightWeightQueryResponse")}WUListArchiveFiles(e,t){return this._connection.send("WUListArchiveFiles",e,"json",!1,t,"WUListArchiveFilesResponse")}WUListLocalFileRequired(e,t){return this._connection.send("WUListLocalFileRequired",e,"json",!1,t,"WUListLocalFileRequiredResponse")}WUListQueries(e,t){return this._connection.send("WUListQueries",e,"json",!1,t,"WUListQueriesResponse")}WUListQueriesUsingFile(e,t){return this._connection.send("WUListQueriesUsingFile",e,"json",!1,t,"WUListQueriesUsingFileResponse")}WUMultiQuerysetDetails(e,t){return this._connection.send("WUMultiQuerysetDetails",e,"json",!1,t,"WUMultiQuerySetDetailsResponse")}WUProcessGraph(e,t){return this._connection.send("WUProcessGraph",e,"json",!1,t,"WUProcessGraphResponse")}WUProtect(e,t){return this._connection.send("WUProtect",e,"json",!1,t,"WUProtectResponse")}WUPublishWorkunit(e,t){return this._connection.send("WUPublishWorkunit",e,"json",!1,t,"WUPublishWorkunitResponse")}WUPushEvent(e,t){return this._connection.send("WUPushEvent",e,"json",!1,t,"WUPushEventResponse")}WUQuery(e,t){return this._connection.send("WUQuery",e,"json",!1,t,"WUQueryResponse")}WUQueryConfig(e,t){return this._connection.send("WUQueryConfig",e,"json",!1,t,"WUQueryConfigResponse")}WUQueryDetails(e,t){return this._connection.send("WUQueryDetails",e,"json",!1,t,"WUQueryDetailsResponse")}WUQueryDetailsLightWeight(e,t){return this._connection.send("WUQueryDetailsLightWeight",e,"json",!1,t,"WUQueryDetailsResponse")}WUQueryFiles(e,t){return this._connection.send("WUQueryFiles",e,"json",!1,t,"WUQueryFilesResponse")}WUQueryGetGraph(e,t){return this._connection.send("WUQueryGetGraph",e,"json",!1,t,"WUQueryGetGraphResponse")}WUQueryGetSummaryStats(e,t){return this._connection.send("WUQueryGetSummaryStats",e,"json",!1,t,"WUQueryGetSummaryStatsResponse")}WUQuerysetAliasAction(e,t){return this._connection.send("WUQuerysetAliasAction",e,"json",!1,t,"WUQuerySetAliasActionResponse")}WUQuerysetCopyQuery(e,t){return this._connection.send("WUQuerysetCopyQuery",e,"json",!1,t,"WUQuerySetCopyQueryResponse")}WUQuerysetDetails(e,t){return this._connection.send("WUQuerysetDetails",e,"json",!1,t,"WUQuerySetDetailsResponse")}WUQuerysetExport(e,t){return this._connection.send("WUQuerysetExport",e,"json",!1,t,"WUQuerysetExportResponse")}WUQuerysetImport(e,t){return this._connection.send("WUQuerysetImport",e,"json",!1,t,"WUQuerysetImportResponse")}WUQuerysetQueryAction(e,t){return this._connection.send("WUQuerysetQueryAction",e,"json",!1,t,"WUQuerySetQueryActionResponse")}WUQuerysets(e,t){return this._connection.send("WUQuerysets",e,"json",!1,t,"WUQuerysetsResponse")}WURecreateQuery(e,t){return this._connection.send("WURecreateQuery",e,"json",!1,t,"WURecreateQueryResponse")}WUResubmit(e,t){return this._connection.send("WUResubmit",e,"json",!1,t,"WUResubmitResponse")}WUResult(e,t){return this._connection.send("WUResult",e,"json",!1,t,"WUResultResponse")}WUResultBin(e,t){return this._connection.send("WUResultBin",e,"json",!1,t,"WUResultBinResponse")}WUResultSummary(e,t){return this._connection.send("WUResultSummary",e,"json",!1,t,"WUResultSummaryResponse")}WUResultView(e,t){return this._connection.send("WUResultView",e,"json",!1,t,"WUResultViewResponse")}WURun(e,t){return this._connection.send("WURun",e,"json",!1,t,"WURunResponse")}WUSchedule(e,t){return this._connection.send("WUSchedule",e,"json",!1,t,"WUScheduleResponse")}WUShowScheduled(e,t){return this._connection.send("WUShowScheduled",e,"json",!1,t,"WUShowScheduledResponse")}WUSubmit(e,t){return this._connection.send("WUSubmit",e,"json",!1,t,"WUSubmitResponse")}WUSyntaxCheckECL(e,t){return this._connection.send("WUSyntaxCheckECL",e,"json",!1,t,"WUSyntaxCheckResponse")}WUUpdate(e,t){return this._connection.send("WUUpdate",e,"json",!1,t,"WUUpdateResponse")}WUUpdateQueryEntry(e,t){return this._connection.send("WUUpdateQueryEntry",e,"json",!1,t,"WUUpdateQueryEntryResponse")}WUWaitCompiled(e,t){return this._connection.send("WUWaitCompiled",e,"json",!1,t,"WUWaitResponse")}WUWaitComplete(e,t){return this._connection.send("WUWaitComplete",e,"json",!1,t,"WUWaitResponse")}};var _s=(M=>(M[M.Unknown=0]="Unknown",M[M.Compiled=1]="Compiled",M[M.Running=2]="Running",M[M.Completed=3]="Completed",M[M.Failed=4]="Failed",M[M.Archived=5]="Archived",M[M.Aborting=6]="Aborting",M[M.Aborted=7]="Aborted",M[M.Blocked=8]="Blocked",M[M.Submitted=9]="Submitted",M[M.Scheduled=10]="Scheduled",M[M.Compiling=11]="Compiling",M[M.Wait=12]="Wait",M[M.UploadingFiled=13]="UploadingFiled",M[M.DebugPaused=14]="DebugPaused",M[M.DebugRunning=15]="DebugRunning",M[M.Paused=16]="Paused",M[M.LAST=17]="LAST",M[M.NotFound=999]="NotFound",M))(_s||{}),Ke;(e=>{let n;(R=>(R[R.Unknown=0]="Unknown",R[R.Compile=1]="Compile",R[R.Check=2]="Check",R[R.Run=3]="Run",R[R.ExecuteExisting=4]="ExecuteExisting",R[R.Pause=5]="Pause",R[R.PauseNow=6]="PauseNow",R[R.Resume=7]="Resume",R[R.Debug=8]="Debug",R[R.__size=9]="__size"))(n=e.Action||={})})(Ke||={});function lr(n){return typeof n.Name=="string"}function ku(n){return n.TotalClusterTime!==void 0}function vu(n){return n.StateEx!==void 0}var ae=class extends Rt{constructor(e){super(e)}Ping(){return this._connection.send("Ping",{},"json",!1,void 0,"WsWorkunitsPingResponse").then(()=>({result:!0}))}WUQuery(e={},t){return this._connection.send("WUQuery",e,"json",!1,t).then(s=>Co({Workunits:{ECLWorkunit:[]}},s))}WUInfo(e){let t={Wuid:"",TruncateEclTo64k:!0,IncludeExceptions:!1,IncludeGraphs:!1,IncludeSourceFiles:!1,IncludeResults:!1,IncludeResultsViewNames:!1,IncludeVariables:!1,IncludeTimers:!1,IncludeDebugValues:!1,IncludeApplicationValues:!1,IncludeWorkflows:!1,IncludeXmlSchemas:!1,IncludeResourceURLs:!1,IncludeECL:!1,IncludeHelpers:!1,IncludeAllowedClusters:!1,IncludeTotalClusterTime:!1,IncludeServiceNames:!1,SuppressResultSchemas:!0,...e};return super.WUInfo(t)}WUCreate(){return super.WUCreate({})}WUUpdate(e){return this._connection.send("WUUpdate",e,"json",!0)}WUResubmit(e){return this._connection.toESPStringArray(e,"Wuids"),super.WUResubmit(e)}WUAction(e){return e.ActionType=e.WUActionType,super.WUAction(e)}WUResult(e,t){return this._connection.send("WUResult",e,"json",!1,t)}WUFileEx(e){return this._connection.send("WUFile",e,"text")}_WUDetailsMetaPromise;WUDetailsMeta(e){return this._WUDetailsMetaPromise||(this._WUDetailsMetaPromise=super.WUDetailsMeta(e)),this._WUDetailsMetaPromise}WUCDebugEx(e){return this._connection.send("WUCDebug",e,void 0,void 0,void 0,"WUDebug").then(t=>{let r=Ro(t.Result).children();return r.length?r[0]:null})}},as=class extends Rt{WUPublishWorkunitEx(e){return this._connection.send("WUPublishWorkunit",e)}};import{debounce as _o,StateObject as Yo}from"@hpcc-js/util";var Ir=mt(Ys(),1),Es=mt(Os(),1);import{Cache as Fo,deepMixinT as tn,scopedLogger as Io,StateObject as Po,XMLNode as sn}from"@hpcc-js/util";import{Cache as pr,Edge as Cr,Graph as Rr,StateObject as Ao,Subgraph as Ar,Vertex as xr}from"@hpcc-js/util";var us=class extends Ao{wu;get properties(){return this.get()}get Name(){return this.get("Name")}get Label(){return this.get("Label")}get Type(){return this.get("Type")}get Complete(){return this.get("Complete")}get WhenStarted(){return this.get("WhenStarted")}get WhenFinished(){return this.get("WhenFinished")}get Time(){return this.get("Time")}get Running(){return this.get("Running")}get RunningId(){return this.get("RunningId")}get Failed(){return this.get("Failed")}constructor(e,t,s){super(),this.wu=e;let r=0;for(let i of s)if(i.GraphName===t.Name&&!i.HasSubGraphId){r=Math.round(i.Seconds*1e3)/1e3;break}this.set({Time:r,...t})}fetchScopeGraph(e){return e?this.wu.fetchGraphDetails([e],["subgraph"]).then(t=>ps(t)):this.wu.fetchGraphDetails([this.Name],["graph"]).then(t=>ps(t))}},ls=class extends pr{constructor(){super(e=>pr.hash([e.Name]))}};function yr(n,e,t){t=t||[],t.push(n),e(n.name,n.$,n.children(),t),n.children().forEach(s=>{yr(s,e,t)}),t.pop()}function Xs(n){let e={};return n.forEach(t=>{t.name==="att"&&(e[t.$.name]=t.$.value)}),e}var qs=class extends Rr{},dr=class extends Ar{},mr=class extends xr{},hr=class extends Cr{};function Wr(n,e){let t={},s={},r={},i=new qs(c=>c._.id),o=[i.root];return yr(e,(c,d,x,l)=>{let E=o[o.length-1];switch(c){case"graph":break;case"node":if(x.length&&x[0].children().length&&x[0].children()[0].name==="graph"){let N=E.createSubgraph(Xs(x));o.push(N),t[d.id]=N}let R=E.createVertex(Xs(x));s[d.id]=R;break;case"edge":let I=E.createEdge(s[d.source],s[d.target],Xs(x));r[d.id]=I;break;default:}}),i}var gs=class extends Rr{},fr=class extends Ar{},Sr=class extends xr{},Dr=class extends Cr{};function ps(n){let e={},t={},s={},r;for(let i of n)switch(i.ScopeType){case"graph":r=new gs(l=>l._.Id,i),e[i.ScopeName]=r.root;break;case"subgraph":r||(r=new gs(l=>l._.Id,i),e[i.ScopeName]=r.root);let o=i.parentScope().split(":"),c=e[i.parentScope()];for(;o.length&&!c;)c=e[o.join(":")],o.pop();if(!c)console.warn(`Missing SG:Parent (${i.Id}): ${i.parentScope()}`);else{let l=c;e[i.ScopeName]=l.createSubgraph(i)}break;case"activity":let d=e[i.parentScope()];d?s[i.ScopeName]=d.createVertex(i):console.warn(`Missing A:Parent (${i.Id}): ${i.parentScope()}`);break;case"edge":t[i.ScopeName]=i;break;case"function":let x=s[i.parentScope()];x?x._.children().push(i):console.warn(`Missing F:Parent (${i.Id}): ${i.parentScope()}`);break}for(let i in t){let o=t[i],c=e[o.parentScope()];if(!c)console.warn(`Missing E:Parent (${o.Id}): ${o.parentScope()}`);else{let d=c;try{let x=r.vertex(o.attr("IdSource").RawValue),l=r.vertex(o.attr("IdTarget").RawValue);d.createEdge(x,l,o)}catch{console.warn(`Invalid Edge: ${i}`)}}}return r}import{StateObject as xo}from"@hpcc-js/util";var ds=class extends xo{wu;get properties(){return this.get()}get URL(){return this.get("URL")}get DisplayName(){return this.get("DisplayName")}get DisplayPath(){return this.get("DisplayPath")}constructor(e,t){super(),this.wu=e;let s=t.split("\\").join("/"),r=s.split("/"),i="res/"+this.wu.Wuid+"/",o="",c="";s.indexOf(i)===0&&(o=s.substr(i.length),c=r[r.length-1]),this.set({URL:t,DisplayName:c,DisplayPath:o})}};import{Cache as Zs,exists as Ks,StateObject as Wo}from"@hpcc-js/util";import{SAXStackParser as yo,Stack as br}from"@hpcc-js/util";var ms=class{e;constructor(e){this.e=e}fix(){delete this.e}},hs=class extends ms{name;type;isSet=!1;attrs={};_children=[];constructor(e){super(e)}append(e){this._children.push(e),this.type||(this.type="hpcc:childDataset")}fix(){this.name=this.e.$.name,this.type=this.e.$.type;for(let t=this._children.length-1;t>=0;--t){let s=this._children[t];s.name==="Row"&&s.type===void 0&&(this._children.push(...s._children),this._children.splice(t,1))}let e=this.setOfType();e&&(this.type=e,this.isSet=!0,this._children=[])}children(){return this._children}isAll(e){return e.name==="All"&&e.type===void 0}setOfType(){let e=this.children();if(this.type===void 0&&e.length===2){if(this.isAll(e[0]))return e[1].type;if(this.isAll(e[1]))return e[0].type}}charWidth(){let e=-1;switch(this.type){case"xs:boolean":e=5;break;case"xs:integer":e=8;break;case"xs:nonNegativeInteger":e=8;break;case"xs:double":e=8;break;case"xs:string":e=32;break;default:let t="0123456789",s=this.type.lastIndexOf("_"),r=s>0?s:this.type.length,i=r-1;for(;i>=0&&t.indexOf(this.type.charAt(i))!==-1;--i);i+1<r&&(e=parseInt(this.type.substring(i+1,r),10)),this.type.indexOf("data")===0&&(e*=2);break}return e<this.name.length&&(e=this.name.length),e}},fs=class extends ms{name;type;maxLength;_restricition;_maxLength;constructor(e){super(e)}append(e){switch(e.name){case"xs:restriction":this._restricition=e;break;case"xs:maxLength":this._maxLength=e;break;default:}}fix(){this.name=this.e.$.name,this.type=this._restricition.$.base,this.maxLength=this._maxLength?+this._maxLength.$.value:void 0,delete this._restricition,delete this._maxLength,super.fix()}},Ss=class{root;simpleTypes={};fields(){return this.root.children()}},Ds=class extends yo{schema=new Ss;simpleType;simpleTypes={};xsdStack=new br;startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xs:element":let t=new hs(e);this.schema.root?this.xsdStack.depth()&&this.xsdStack.top().append(t):this.schema.root=t,this.xsdStack.push(t);break;case"xs:simpleType":this.simpleType=new fs(e);break;default:break}}endXMLNode(e){switch(e.name){case"xs:element":this.xsdStack.pop().fix();break;case"xs:simpleType":this.simpleType.fix(),this.simpleTypes[this.simpleType.name]=this.simpleType,delete this.simpleType;break;case"xs:appinfo":let s=this.xsdStack.top();for(let r in e.$)s.attrs[r]=e.$[r];break;default:this.simpleType&&this.simpleType.append(e)}super.endXMLNode(e)}};function Js(n){let e=new Ds;return e.parse(n),e.schema}var zs=class extends Ds{_rootName;schema=new Ss;simpleTypes={};xsdStack=new br;constructor(e){super(),this._rootName=e}startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xsd:element":let t=new hs(e);!this.schema.root&&this._rootName===e.$.name&&(this.schema.root=t),this.xsdStack.depth()&&this.xsdStack.top().append(t),this.xsdStack.push(t);break;case"xsd:simpleType":this.simpleType=new fs(e);break;default:break}}endXMLNode(e){switch(e.name){case"xsd:element":this.xsdStack.pop().fix();break;case"xsd:simpleType":break;default:break}super.endXMLNode(e)}};function Ju(n,e){let t=new zs(e);return t.parse(n),t.schema}var $s=class extends Zs{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}-${e.ResultName}`)}},Cs=new $s,Rs=class n extends Wo{connection;_bypassCache=!1;get BaseUrl(){return this.connection.baseUrl}xsdSchema;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get ResultName(){return this.get("ResultName")}get ResultSequence(){return this.get("ResultSequence")}get LogicalFileName(){return this.get("LogicalFileName")}get Name(){return this.get("Name")}get Sequence(){return this.get("Sequence")}get Value(){return this.get("Value")}get Link(){return this.get("Link")}get FileName(){return this.get("FileName")}get IsSupplied(){return this.get("IsSupplied")}get ShowFileContent(){return this.get("ShowFileContent")}get Total(){return this.get("Total")}get ECLSchemas(){return this.get("ECLSchemas")}get NodeGroup(){return this.get("NodeGroup")}get ResultViews(){return this.get("ResultViews")}get XmlSchema(){return this.get("XmlSchema")}static attach(e,t,s,r){let i;return Array.isArray(r)?(i=Cs.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:s.Name},()=>new n(e,t,s,r)),i.set(s)):typeof r>"u"&&(typeof s=="number"?i=Cs.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:"Sequence_"+s},()=>new n(e,t,s)):typeof s=="string"&&(i=Cs.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:s},()=>new n(e,t,s)))),i}static attachLogicalFile(e,t,s){return Cs.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:s},()=>new n(e,t,s,!0))}constructor(e,t,s,r){super(),e instanceof ae?this.connection=e:this.connection=new ae(e),typeof r=="boolean"&&r===!0?this.set({NodeGroup:t,LogicalFileName:s}):lr(s)&&Array.isArray(r)?this.set({...s,Wuid:t,ResultName:s.Name,ResultViews:r}):typeof r>"u"?typeof s=="number"?this.set({Wuid:t,ResultSequence:s}):typeof s=="string"?this.set({Wuid:t,ResultName:s}):console.warn("Unknown Result.attach (1)"):console.warn("Unknown Result.attach (2)")}isComplete(){return this.Total!==-1}bypassCache(e){return e===void 0?this._bypassCache:(this._bypassCache=e,this)}_fetchXMLSchemaPromise;fetchXMLSchema(e=!1){return(!this._fetchXMLSchemaPromise||e)&&(this._fetchXMLSchemaPromise=this.WUResult().then(t=>t.Result?.XmlSchema?.xml?(this.xsdSchema=Js(t.Result.XmlSchema.xml),this.xsdSchema):null)),this._fetchXMLSchemaPromise}async refresh(){return await this.fetchRows(0,1,!0),this}fetchRows(e=0,t=-1,s=!1,r={},i,o){let c=o??this._bypassCache;return this.WUResult(e,t,!s,r,i,c).then(d=>{let x=d.Result;return delete d.Result,this.set({...d}),Ks("XmlSchema.xml",x)&&(this.xsdSchema=Js(x.XmlSchema.xml)),Ks("Row",x)?x.Row:this.ResultName&&Ks(this.ResultName,x)?x[this.ResultName].Row:[]})}rootField(){return this.xsdSchema?this.xsdSchema.root:null}fields(){return this.xsdSchema?this.xsdSchema.root.children():[]}WUResult(e=0,t=1,s=!1,r={},i,o=!1){let c={NamedValue:{itemcount:0}};for(let x in r)c.NamedValue[c.NamedValue.itemcount++]={Name:x,Value:r[x]};let d={FilterBy:c};return this.Wuid&&this.ResultName!==void 0?(d.Wuid=this.Wuid,d.ResultName=this.ResultName):this.Wuid&&this.ResultSequence!==void 0?(d.Wuid=this.Wuid,d.Sequence=this.ResultSequence):this.LogicalFileName&&this.NodeGroup?(d.LogicalName=this.LogicalFileName,d.Cluster=this.NodeGroup):this.LogicalFileName&&(d.LogicalName=this.LogicalFileName),d.Start=e,d.Count=t,d.SuppressXmlSchema=s,d.BypassCachedResult=o,this.connection.WUResult(d,i).then(x=>x)}},As=class extends Zs{constructor(){super(e=>Zs.hash([e.Sequence,e.Name,e.Value,e.FileName]))}};import{StateObject as Ur}from"@hpcc-js/util";var Ze=class extends Ur{scope;get properties(){return this.get()}get Name(){return this.get("Name")}get RawValue(){return this.get("RawValue")}get Formatted(){return this.get("Formatted")}get FormattedEnd(){return this.get("FormattedEnd")}get Measure(){return this.get("Measure")}get Creator(){return this.get("Creator")}get CreatorType(){return this.get("CreatorType")}constructor(e,t){super(),this.scope=e,this.set(t)}},en=class extends Ur{_attributeMap={};_children=[];get properties(){return this.get()}get ScopeName(){return this.get("ScopeName")}get Id(){return this.get("Id")}get ScopeType(){return this.get("ScopeType")}get Properties(){return this.get("Properties",{Property:[]})}get Notes(){return this.get("Notes",{Note:[]})}get SinkActivity(){return this.get("SinkActivity")}get CAttributes(){let e=[],t={start:null,end:null};return this.Properties.Property.forEach(s=>{s.Measure==="ts"&&s.Name.indexOf("Started")>=0?t.start=s:this.ScopeName&&s.Measure==="ts"&&s.Name.indexOf("Finished")>=0?t.end=s:e.push(new Ze(this,s))}),t.start&&t.end?(t.start.FormattedEnd=t.end.Formatted,e.push(new Ze(this,t.start))):t.start?e.push(new Ze(this,t.start)):t.end&&e.push(new Ze(this,t.end)),e}constructor(e){super(),this.update(e)}update(e){this.set(e),this.CAttributes.forEach(t=>{this._attributeMap[t.Name]=t}),this.Properties.Property=[];for(let t in this._attributeMap)this._attributeMap.hasOwnProperty(t)&&this.Properties.Property.push(this._attributeMap[t].properties)}parentScope(){let e=this.ScopeName.split(":");return e.pop(),e.join(":")}children(e){return arguments.length?(this._children=e,this):this._children}walk(e){if(e.start(this))return!0;for(let t of this.children())if(t.walk(e))return!0;return e.end(this)}formattedAttrs(){let e={};for(let t in this._attributeMap)e[t]=this._attributeMap[t].Formatted||this._attributeMap[t].RawValue;return e}rawAttrs(){let e={};for(let t in this._attributeMap)e[t]=this._attributeMap[t].RawValue;return e}hasAttr(e){return this._attributeMap[e]!==void 0}attr(e){return this._attributeMap[e]||new Ze(this,{Creator:"",CreatorType:"",Formatted:"",Measure:"",Name:"",RawValue:""})}attrMeasure(e){return this._attributeMap[e].Measure}calcTooltip(e){let t=this.Id,s=[];s.push(`<tr><td class="key">ID:</td><td class="value">${this.Id}</td></tr>`),e&&s.push(`<tr><td class="key">Parent ID:</td><td class="value">${e.Id}</td></tr>`),s.push(`<tr><td class="key">Scope:</td><td class="value">${this.ScopeName}</td></tr>`);let r=this.formattedAttrs();for(let i in r)i==="Label"?t=r[i]:s.push(`<tr><td class="key">${i}</td><td class="value">${r[i]}</td></tr>`);return`<div class="eclwatch_WUGraph_Tooltip" style="max-width:480px">
|
|
911
911
|
<h4 align="center">${t}</h4>
|
|
912
912
|
<table>
|
|
913
913
|
${s.join("")}
|