@hpcc-js/comms 3.15.6 → 3.15.7

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.
@@ -1,2 +1,2 @@
1
- var e=Object.defineProperty,t=(t,n)=>e(t,"name",{value:n,configurable:!0});import{scopedLogger as n,join as s,root as r,promiseTimeout as i,utf8ToBase64 as o,exists as c,deepMixin as a,xml2json as u,StateObject as h,Cache as l,Edge as p,Graph as d,Subgraph as g,Vertex as m,SAXStackParser as S,Stack as f,espTime2Seconds as _,deepMixinT as U,XMLNode as y,debounce as C,Dispatch as R,Message as D}from"@hpcc-js/util";const b="@hpcc-js/comms",F="3.15.6",W="3.21.7",v=n("comms/connection.ts");function T(e){return"baseUrl"in e}t(T,"instanceOfIOptions");const A={type:"post",baseUrl:"",userID:"",password:"",rejectUnauthorized:!0,timeoutSecs:60};function w(e){return"function"==typeof e.opts&&"function"==typeof e.send&&"function"==typeof e.clone}function P(e,t){return void 0===t||!0===t?encodeURIComponent(e):""+e}function x(e,t=!0,n=""){if(n&&(n+="."),"object"!=typeof e)return P(e,t);const s=[];for(const r in e)if(e.hasOwnProperty(r))if(e[r]instanceof Array){let i=!1;e[r].forEach((e,o)=>{"object"==typeof e?(i=!0,s.push(x(e,t,n+P(`${r}.${o}`,t)))):s.push(n+P(`${r}_i${o}`,t)+"="+x(e,t))}),i&&s.push(n+P(`${r}.itemcount`,t)+"="+e[r].length)}else"object"==typeof e[r]?e[r]&&e[r].Item instanceof Array?(s.push(x(e[r].Item,t,n+P(r,t))),s.push(n+P(`${r}.itemcount`,t)+"="+e[r].Item.length)):s.push(x(e[r],t,n+P(r,t))):void 0!==e[r]?s.push(n+P(r,t)+"="+P(e[r],t)):s.push(n+P(r,t));return s.join("&")}function L(e){return JSON.parse(e)}function E(e,n,r={},i="json",o){return o&&console.warn("Header attributes ignored for JSONP connections"),new Promise((o,c)=>{let a=1e3*e.timeoutSecs;const u="jsonp_callback_"+Math.round(999999*Math.random());window[u]=function(e){a=0,d(),o("json"===i&&"string"==typeof e?L(e):e)};const h=document.createElement("script");let l=s(e.baseUrl,n);l+=l.indexOf("?")>=0?"&":"?",h.src=l+"jsonp="+u+"&"+x(r,e.encodeRequest),document.body.appendChild(h);const p=setInterval(function(){a<=0?clearInterval(p):(a-=5e3,a<=0?(clearInterval(p),v.error("Request timeout: "+h.src),d(),c(Error("Request timeout: "+h.src))):v.debug("Request pending ("+a/1e3+" sec): "+h.src))},5e3);function d(){delete window[u],document.body.removeChild(h)}t(d,"doCallback")})}function M(e){return e.userID?{Authorization:`Basic ${o(`${e.userID}:${e.password}`)}`}:{}}t(w,"instanceOfIConnection"),t(P,"encode"),t(x,"serializeRequest"),t(L,"deserializeResponse"),t(E,"jsonp"),t(M,"authHeader");const N={};function I(e,n,o,c,a){function u(e){if(e.ok)return"json"===a?e.json():e.text();throw new Error(e.statusText)}c={...M(e),...c},o={credentials:N[e.baseUrl]?"omit":"include",...o,headers:c},0===e.baseUrl.indexOf("https:")&&(!1===e.rejectUnauthorized&&r.__hpcc_rejectUnauthorizedAgent?o.dispatcher=r.__hpcc_rejectUnauthorizedAgent:r.__hpcc_trustwaveAgent&&(o.agent=r.__hpcc_trustwaveAgent)),t(u,"handleResponse");const h=r.__hpcc_undiciFetch??fetch;return i(1e3*e.timeoutSecs,h(s(e.baseUrl,n),o).then(u).catch(t=>(o.credentials=N[e.baseUrl]?"include":"omit",h(s(e.baseUrl,n),o).then(u).then(t=>(N[e.baseUrl]=!N[e.baseUrl],t)))))}function j(e,t,n,s="json",r){let i;return n.upload_&&(delete n.upload_,t+="?upload_"),n.abortSignal_&&(i=n.abortSignal_,delete n.abortSignal_),I(e,t,{method:"post",body:x(n,e.encodeRequest),signal:i},{"Content-Type":"application/x-www-form-urlencoded",...r},s)}function k(e,t,n,s="json",r){let i;return n.abortSignal_&&(i=n.abortSignal_,delete n.abortSignal_),I(e,`${t}?${x(n,e.encodeRequest)}`,{method:"get",signal:i},{...r},s)}function G(e,t,n,s="json",r){let i;switch(e.type){case"jsonp":i=E(e,t,n,s,r);break;case"get":i=k(e,t,n,s,r);break;default:i=j(e,t,n,s,r)}return i}t(I,"doFetch"),t(j,"post"),t(k,"get"),t(G,"send");let V=G;function Q(e){const t=V;return e&&(V=e),t}t(Q,"hookSend");const B=class _Connection{_opts;get baseUrl(){return this._opts.baseUrl}constructor(e){this.opts(e)}opts(e){return 0===arguments.length?this._opts:(this._opts={...A,...e},this)}send(e,t,n="json",s){return this._opts.hookSend?this._opts.hookSend(this._opts,e,t,n,V,s):V(this._opts,e,t,n,s)}clone(){return new _Connection(this.opts())}};t(B,"Connection");let O=B,X=/* @__PURE__ */t(function(e){return new O(e)},"createConnection");function H(e){const t=X;return X=e,t}function $(e){return"[object Array]"===Object.prototype.toString.call(e)}t(H,"setTransportFactory"),t($,"isArray");const J=class _ESPExceptions extends Error{isESPExceptions=!0;action;request;Source;Exception;constructor(e,t,n){super("ESPException: "+n.Source),this.action=e,this.request=t,this.Source=n.Source,this.Exception=n.Exception,n.Exception.length?this.message=`${n.Exception[0].Code}: ${n.Exception[0].Message}`:this.message=""}};t(J,"ESPExceptions");let q=J;function Y(e){return e instanceof q||e.isESPExceptions&&Array.isArray(e.Exception)}function z(e){return void 0!==e.send}t(Y,"isExceptions"),t(z,"isConnection");const Z=class _ESPConnection{_connection;get baseUrl(){return this._connection.opts().baseUrl}_service;_version;constructor(e,t,n){this._connection=z(e)?e:X(e),this._service=t,this._version=n}service(e){return void 0===e?this._service:(this._service=e,this)}version(e){return void 0===e?this._version:(this._version=e,this)}toESPStringArray(e,t){if($(e[t])){for(let n=0;n<e[t].length;++n)e[t+"_i"+n]=e[t][n];delete e[t]}return e}opts(e){return void 0===e?this._connection.opts():(this._connection.opts(e),this)}send(e,t={},n="json",r=!1,i,o){const c={...t,ver_:this._version};let a;r&&(c.upload_=!0),i&&(c.abortSignal_=i);let u="json";switch(n){case"text":a=s(this._service,e),u="text";break;case"xsd":a=s(this._service,e+".xsd"),u="text";break;case"json2":a=s(this._service,e+"/json"),n="json";const t=e.split("/");e=t.pop();break;default:a=s(this._service,e+".json")}return this._connection.send(a,c,u).then(t=>{if("json"===n){let n;if(t&&t.Exceptions)throw new q(e,c,t.Exceptions);if(t&&(n=t[o||e+"Response"]),!n)throw new q(e,c,{Source:"ESPConnection.send",Exception:[{Code:0,Message:"Missing Response"}]});return n}return t})}clone(){return new _ESPConnection(this._connection.clone(),this._service,this._version)}};t(Z,"ESPConnection");let K=Z;const ee=class _Service{_connection;get baseUrl(){return this._connection.opts().baseUrl}constructor(e,t,n){this._connection=new K(e,t,n)}opts(){return this._connection.opts()}connection(){return this._connection.clone()}};t(ee,"Service");let te=ee;var ne,se,re;se=ne||(ne={}),(re=se.DFUWUActions||(se.DFUWUActions={})).Delete="Delete",re.Protect="Protect",re.Unprotect="Unprotect",re.Restore="Restore",re.SetToFailed="SetToFailed",re.Archive="Archive";const ie=class _FileSprayServiceBase extends te{constructor(e){super(e,"FileSpray","1.27")}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")}};t(ie,"FileSprayServiceBase");let oe=ie;var ce=/* @__PURE__ */(e=>(e[e.unknown=0]="unknown",e[e.scheduled=1]="scheduled",e[e.queued=2]="queued",e[e.started=3]="started",e[e.aborted=4]="aborted",e[e.failed=5]="failed",e[e.finished=6]="finished",e[e.monitoring=7]="monitoring",e[e.aborting=8]="aborting",e[e.notfound=999]="notfound",e))(ce||{}),ae=/* @__PURE__ */(e=>(e.Copy="copy",e.Remove="remove",e.Move="move",e.Rename="rename",e.Replicate="replicate",e.Import="import",e.Export="export",e.Monitor="monitor",e.Copymerge="copymerge",e.Supercopy="supercopy",e.Publish="publish",e))(ae||{});const ue=class _FileSprayService extends oe{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")}};t(ue,"FileSprayService");let he=ue;var le,pe,de,ge,me,Se,fe;pe=le||(le={}),(de=pe.ViewMemberType||(pe.ViewMemberType={})).User="User",de.Group="Group",(ge=pe.UserSortBy||(pe.UserSortBy={})).username="username",ge.fullname="fullname",ge.passwordexpiration="passwordexpiration",ge.employeeID="employeeID",ge.employeeNumber="employeeNumber",(me=pe.GroupSortBy||(pe.GroupSortBy={})).Name="Name",me.ManagedBy="ManagedBy",(Se=pe.AccountTypeReq||(pe.AccountTypeReq={})).Any="Any",Se.User="User",Se.Group="Group",(fe=pe.ResourcePermissionSortBy||(pe.ResourcePermissionSortBy={})).Name="Name",fe.Type="Type",(pe.ResourceSortBy||(pe.ResourceSortBy={})).Name="Name";const _e=class _AccessServiceBase extends te{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")}};t(_e,"AccessServiceBase");let Ue=_e;const ye=class _AccessService extends Ue{};t(ye,"AccessService");let Ce=ye;const Re=class _AccountServiceBase extends te{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")}};t(Re,"AccountServiceBase");let De=Re;const be=class _AccountService extends De{VerifyUser(e){return this._connection.send("VerifyUser",e).catch(e=>{if(e.isESPExceptions&&e.Exception.some(e=>20043===e.Code))return{retcode:20043,Exceptions:{Source:"wsAccount",Exception:e.Exception}};throw e})}};t(be,"AccountService");let Fe=be;const We=class _CloudServiceBase extends te{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")}};t(We,"CloudServiceBase");let ve=We;const Te=n("@hpcc-js/comms/services/wsCloud.ts");function Ae(e){return void 0!==e?.Pods}function we(e){return e.spec?.containers?.reduce((e,t)=>(t.ports?.forEach(t=>{e.push({ContainerPort:t.containerPort,Name:t.name,Protocol:t.protocol})}),e),[])??[]}function Pe(e){return e.filter(e=>{const t=e?.metadata?.labels??{};return t.hasOwnProperty("app.kubernetes.io/part-of")&&"HPCC-Platform"===t["app.kubernetes.io/part-of"]}).map(e=>{const t=new Date(e.metadata?.creationTimestamp);return{Name:e.metadata.name,Status:e.status?.phase,CreationTimestamp:t.toISOString(),ContainerName:e.status?.containerStatuses?.reduce((e,t)=>(t.name&&e.push(t.name),e),[]).join(", ")??"",ContainerCount:e.spec?.containers?.length??0,ContainerReadyCount:e.status?.containerStatuses?.reduce((e,t)=>e+(t.ready?1:0),0),ContainerRestartCount:e.status?.containerStatuses?.reduce((e,t)=>e+t.restartCount,0),Ports:{Port:we(e)}}})}t(Ae,"isGetPODsResponse_v1_02"),t(we,"mapPorts"),t(Pe,"mapPods");const xe=class _CloudService extends ve{getPODs(){return super.GetPODs({}).then(e=>{if(Ae(e))return e.Pods?.Pod??[];try{const t="string"==typeof e.Result?JSON.parse(e.Result):e.Result;return Pe(t?.items??[])}catch(t){return Te.error(`Error parsing V1Pods json '${t instanceof Error?t.message:String(t)}'`),[]}})}};t(xe,"CloudService");let Le=xe;var Ee,Me;((Me=Ee||(Ee={})).SigningMethodType||(Me.SigningMethodType={})).gpg="gpg";const Ne=class _CodesignServiceBase extends te{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")}};t(Ne,"CodesignServiceBase");let Ie=Ne;const je=class _CodesignService extends Ie{ListUserIDsEx(e){return super.ListUserIDs(e).then(e=>e.UserIDs.Item).catch(e=>[])}Sign(e){return super.Sign({SigningMethod:Ee.SigningMethodType.gpg,...e})}};t(je,"CodesignService");let ke=je;const Ge=class _DaliServiceBase extends te{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")}};t(Ge,"DaliServiceBase");let Ve=Ge;const Qe=class _DaliService extends Ve{};t(Qe,"DaliService");let Be=Qe;var Oe,Xe,He,$e,Je,qe,Ye,ze,Ze;Xe=Oe||(Oe={}),(He=Xe.DFUArrayActions||(Xe.DFUArrayActions={})).Delete="Delete",He.AddToSuperfile="Add To Superfile",He.ChangeProtection="Change Protection",He.ChangeRestriction="Change Restriction",($e=Xe.DFUChangeProtection||(Xe.DFUChangeProtection={}))[$e.NoChange=0]="NoChange",$e[$e.Protect=1]="Protect",$e[$e.Unprotect=2]="Unprotect",$e[$e.UnprotectAll=3]="UnprotectAll",(Je=Xe.DFUChangeRestriction||(Xe.DFUChangeRestriction={}))[Je.NoChange=0]="NoChange",Je[Je.Restrict=1]="Restrict",Je[Je.Unrestricted=2]="Unrestricted",(qe=Xe.DFUDefFileFormat||(Xe.DFUDefFileFormat={})).xml="xml",qe.def="def",(Ye=Xe.FileAccessRole||(Xe.FileAccessRole={})).Token="Token",Ye.Engine="Engine",Ye.External="External",(ze=Xe.SecAccessType||(Xe.SecAccessType={})).None="None",ze.Access="Access",ze.Read="Read",ze.Write="Write",ze.Full="Full",(Ze=Xe.DFUFileType||(Xe.DFUFileType={})).Flat="Flat",Ze.Index="Index",Ze.Xml="Xml",Ze.Csv="Csv",Ze.Json="Json",Ze.IndexLocal="IndexLocal",Ze.IndexPartitioned="IndexPartitioned",Ze.Unset="Unset";const Ke=class _DfuServiceBase extends te{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")}};t(Ke,"DfuServiceBase");let et=Ke;const tt=Oe.DFUArrayActions,nt=Oe.DFUDefFileFormat,st=Oe.DFUChangeProtection,rt=Oe.DFUChangeRestriction,it=class _DFUService extends et{DFUFile(e){return this._connection.send("DFUDefFile",e,"text")}async recursiveFetchLogicalFiles(e){const t=[],n=[];return await Promise.all(e.map(e=>this.DFUInfo({Cluster:e.NodeGroup,Name:e.Name,IncludeJsonTypeInfo:!1,IncludeBinTypeInfo:!1,ForceIndexInfo:!1}).then(e=>{for(const n of e?.FileDetail?.Superfiles?.DFULogicalFile??[])t.push(n);for(const t of e?.FileDetail?.subfiles?.Item??[])n.push(t)}))),n.concat(t.length?await this.recursiveFetchLogicalFiles(t):[])}};t(it,"DFUService");let ot=it;const ct=class _DFUXRefServiceBase extends te{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")}};t(ct,"DFUXRefServiceBase");let at=ct;const ut=class _DFUXRefService extends at{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")}};t(ut,"DFUXRefService");let ht=ut;function lt(e,t){const n=typeof t;switch(n){case"boolean":case"number":case"string":return{id:e,type:n};case"object":if(t.Row instanceof Array&&(t=t.Row),t instanceof Array)return{id:e,type:"dataset",children:pt(t[0])};if(t instanceof Object){if(t.Item&&t.Item instanceof Array&&1===t.Item.length){const n=typeof t.Item[0];if("string"===n||"number"===n)return{id:e,type:"set",fieldType:n};throw new Error("Unknown field type")}return{id:e,type:"object",fields:dt(t)}}default:throw new Error("Unknown field type")}}function pt(e){e.Row&&e.Row instanceof Array&&(e=e.Row[0]);const t=[];for(const n in e)t.push(lt(n,e[n]));return t}function dt(e){const t={};for(const n in e)t[n]=lt(n,e[n]);return t}t(lt,"jsonToIField"),t(pt,"jsonToIFieldArr"),t(dt,"jsonToIFieldObj");const gt=class _EclService extends te{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(e=>{const t=JSON.parse(e);for(const n in t)return t[n];return{}}).then(pt)}responseJson(e,t){return this._connection.send(`example/response/query/${e}/${t}/json`,{},"text").then(e=>{const t=JSON.parse(e);for(const n in t)return t[n].Results;return{}}).then(e=>{const t={};for(const n in e)t[n]=pt(e[n]);return t})}submit(e,t,n){const s=`submit/query/${e}/${t}`;return this._connection.send(s,n,"json2").then(e=>{if(e.Results&&e.Results.Exception)throw new q(s,n,{Source:"wsEcl.submit",Exception:e.Results.Exception});return e.Results})}};t(gt,"EclService");let mt=gt;const St=class _ElkServiceBase extends te{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")}};t(St,"ElkServiceBase");let ft=St;const _t=class _ElkService extends ft{};t(_t,"ElkService");let Ut=_t;var yt,Ct,Rt,Dt,bt,Ft,Wt,vt,Tt,At;Ct=yt||(yt={}),(Rt=Ct.LogColumnType||(Ct.LogColumnType={})).global="global",Rt.workunits="workunits",Rt.components="components",Rt.audience="audience",Rt.class="class",Rt.instance="instance",Rt.node="node",Rt.message="message",Rt.logid="logid",Rt.processid="processid",Rt.threadid="threadid",Rt.timestamp="timestamp",Rt.pod="pod",Rt.traceid="traceid",Rt.spanid="spanid",(Dt=Ct.LogColumnValueType||(Ct.LogColumnValueType={})).string="string",Dt.numeric="numeric",Dt.datetime="datetime",Dt.enum="enum",Dt.epoch="epoch",(bt=Ct.LogAccessType||(Ct.LogAccessType={}))[bt.All=0]="All",bt[bt.ByJobID=1]="ByJobID",bt[bt.ByComponent=2]="ByComponent",bt[bt.ByLogType=3]="ByLogType",bt[bt.ByTargetAudience=4]="ByTargetAudience",bt[bt.BySourceInstance=5]="BySourceInstance",bt[bt.BySourceNode=6]="BySourceNode",bt[bt.ByFieldName=7]="ByFieldName",bt[bt.ByPod=8]="ByPod",bt[bt.ByTraceID=9]="ByTraceID",bt[bt.BySpanID=10]="BySpanID",(Ft=Ct.LogAccessStatusCode||(Ct.LogAccessStatusCode={}))[Ft.Success=0]="Success",Ft[Ft.Warning=1]="Warning",Ft[Ft.Fail=2]="Fail",(Wt=Ct.LogAccessFilterOperator||(Ct.LogAccessFilterOperator={}))[Wt.NONE=0]="NONE",Wt[Wt.AND=1]="AND",Wt[Wt.OR=2]="OR",(vt=Ct.LogSelectColumnMode||(Ct.LogSelectColumnMode={}))[vt.MIN=0]="MIN",vt[vt.DEFAULT=1]="DEFAULT",vt[vt.ALL=2]="ALL",vt[vt.CUSTOM=3]="CUSTOM",(Tt=Ct.SortColumType||(Ct.SortColumType={}))[Tt.ByDate=0]="ByDate",Tt[Tt.ByJobID=1]="ByJobID",Tt[Tt.ByComponent=2]="ByComponent",Tt[Tt.ByLogType=3]="ByLogType",Tt[Tt.ByTargetAudience=4]="ByTargetAudience",Tt[Tt.BySourceInstance=5]="BySourceInstance",Tt[Tt.BySourceNode=6]="BySourceNode",Tt[Tt.ByFieldName=7]="ByFieldName",Tt[Tt.ByPod=8]="ByPod",Tt[Tt.ByTraceID=9]="ByTraceID",Tt[Tt.BySpanID=10]="BySpanID",(At=Ct.SortDirection||(Ct.SortDirection={}))[At.ASC=0]="ASC",At[At.DSC=1]="DSC";const wt=class _LogaccessServiceBase extends te{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")}};t(wt,"LogaccessServiceBase");let Pt=wt;const xt=n("@hpcc-js/comms/services/wsLogaccess.ts");var Lt=/* @__PURE__ */(e=>(e.Disaster="DIS",e.Error="ERR",e.Warning="WRN",e.Information="INF",e.Progress="PRO",e.Metric="MET",e))(Lt||{}),Et=/* @__PURE__ */(e=>(e.Operator="OPR",e.User="USR",e.Programmer="PRO",e.Audit="ADT",e))(Et||{});const Mt=/* @__PURE__ */new Set(["azureloganalyticscurl","elasticstack","grafanacurl"]),Nt=new Set(Object.values(yt.LogColumnType));function It(e){switch(e){case yt.LogColumnType.workunits:case"hpcc.log.jobid":return yt.LogAccessType.ByJobID;case yt.LogColumnType.audience:case"hpcc.log.audience":return yt.LogAccessType.ByTargetAudience;case yt.LogColumnType.class:case"hpcc.log.class":return yt.LogAccessType.ByLogType;case yt.LogColumnType.components:case"kubernetes.container.name":return yt.LogAccessType.ByComponent;default:return yt.LogAccessType.ByFieldName}}t(It,"getLogCategory");const jt=["audience","class","workunits","message","processid","logid","threadid","timestamp","components","instance"];function kt(e,t){const n=[];for(const s of jt){const r=e[s];if(null==r||""===r||Array.isArray(r)&&0===r.length)continue;if(!(s in t))continue;let i=Nt.has(s)?s:t[s];const o=It(i);o===yt.LogAccessType.ByFieldName&&(i=t[s]);const c=o===yt.LogAccessType.ByComponent,a=Array.isArray(r)?r:[r];for(const e of a)n.push({LogCategory:o,SearchField:i,SearchByValue:c?e+"*":e})}return n}function Gt(e){const t={leftFilter:e[0]};let n=t;for(let s=1;s<e.length;s++)n.Operator=yt.LogAccessFilterOperator.OR,s===e.length-1?n.rightFilter=e[s]:(n.rightBinaryFilter={BinaryLogFilter:[{leftFilter:e[s]}]},n=n.rightBinaryFilter.BinaryLogFilter[0]);return t}function Vt(e){const[t,...n]=e,s={};if(1===t.length?s.leftFilter=t[0]:s.leftBinaryFilter={BinaryLogFilter:[Gt(t)]},0===n.length)return s;if(s.Operator=yt.LogAccessFilterOperator.AND,1===n.length){const[e]=n;1===e.length?s.rightFilter=e[0]:s.rightBinaryFilter={BinaryLogFilter:[Gt(e)]}}else s.rightBinaryFilter={BinaryLogFilter:[Vt(n)]};return s}function Qt(e){const t=/* @__PURE__ */new Map;for(const o of e){const e=t.get(o.SearchField);e?e.push(o):t.set(o.SearchField,[o])}const n=[...t.values()];if(0===n.length)return{leftFilter:{LogCategory:yt.LogAccessType.All}};const[s,...r]=n,i={};if(1===s.length?i.leftFilter=s[0]:i.leftBinaryFilter={BinaryLogFilter:[Gt(s)]},0===r.length)return i;if(i.Operator=yt.LogAccessFilterOperator.AND,1===r.length){const[e]=r;1===e.length?i.rightFilter=e[0]:i.rightBinaryFilter={BinaryLogFilter:[Gt(e)]}}else i.rightBinaryFilter={BinaryLogFilter:[Vt(r)]};return i}t(kt,"buildFilters"),t(Gt,"buildOrGroup"),t(Vt,"buildAndChain"),t(Qt,"buildFilterTree");const Bt=class _LogaccessService extends Pt{_logAccessInfo;GetLogAccessInfo(e={}){return this._logAccessInfo||(this._logAccessInfo=super.GetLogAccessInfo(e)),this._logAccessInfo}GetLogs(e){return super.GetLogs(e)}convertLogLine(e,t){const n={},s=t?.fields?Object.assign({},...t.fields):null;for(const r in e)n[r]=s?s[e[r]]??"":"";return n}async GetLogsEx(e){const t=await this.GetLogAccessInfo(),n={};t.Columns.Column.forEach(e=>n[e.LogType]=e.Name);const s=kt(e,n),r={StartDate:e.StartDate instanceof Date?e.StartDate.toISOString():/* @__PURE__ */new Date(0).toISOString()};e.EndDate instanceof Date&&(r.EndDate=e.EndDate.toISOString());const i={Filter:Qt(s),Range:r,LogLineStartFrom:e.LogLineStartFrom??0,LogLineLimit:e.LogLineLimit??100,SelectColumnMode:yt.LogSelectColumnMode.DEFAULT,Format:"JSON",SortBy:{SortCondition:[{BySortType:yt.SortColumType.ByDate,ColumnName:"",Direction:0}]}};return this.GetLogs(i).then(e=>{try{const s=JSON.parse(e.LogLines);return{lines:Mt.has(t.RemoteLogManagerType)?s.lines?.map(e=>this.convertLogLine(n,e))??[]:(xt.warning(`Unknown RemoteLogManagerType: ${t.RemoteLogManagerType}`),[]),total:e.TotalLogLinesAvailable??1e4}}catch(s){xt.error(s.message??s)}return{lines:[],total:0}})}};t(Bt,"LogaccessService");let Ot=Bt;function Xt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ht(e){return 1===e.length&&(e=$t(e)),{left:/* @__PURE__ */t(function(t,n,s,r){for(null==s&&(s=0),null==r&&(r=t.length);s<r;){var i=s+r>>>1;e(t[i],n)<0?s=i+1:r=i}return s},"left"),right:/* @__PURE__ */t(function(t,n,s,r){for(null==s&&(s=0),null==r&&(r=t.length);s<r;){var i=s+r>>>1;e(t[i],n)>0?r=i:s=i+1}return s},"right")}}function $t(e){return function(t,n){return Xt(e(t),n)}}function Jt(e){return null===e?NaN:+e}function qt(e,t){var n,s,r=e.length,i=-1;if(null==t){for(;++i<r;)if(null!=(n=e[i])&&n>=n)for(s=n;++i<r;)null!=(n=e[i])&&n>s&&(s=n)}else for(;++i<r;)if(null!=(n=t(e[i],i,e))&&n>=n)for(s=n;++i<r;)null!=(n=t(e[i],i,e))&&n>s&&(s=n);return s}function Yt(e,t){var n,s=e.length,r=s,i=-1,o=0;if(null==t)for(;++i<s;)isNaN(n=Jt(e[i]))?--r:o+=n;else for(;++i<s;)isNaN(n=Jt(t(e[i],i,e)))?--r:o+=n;if(r)return o/r}var zt,Zt,Kt,en;t(Xt,"ascending"),t(Ht,"bisector"),t($t,"ascendingComparator"),Ht(Xt),t(Jt,"number"),t(qt,"d3Max"),t(Yt,"d3Mean"),Zt=zt||(zt={}),(Kt=Zt.ThresholdType||(Zt.ThresholdType={}))[Kt.THRESHOLD_PERCENTAGE=0]="THRESHOLD_PERCENTAGE",Kt[Kt.THRESHOLD_MB=1]="THRESHOLD_MB",(en=Zt.TpMachineType||(Zt.TpMachineType={})).ALLNODES="ALLNODES",en.THORMACHINES="THORMACHINES",en.HOLEMACHINES="HOLEMACHINES",en.ROXIEMACHINES="ROXIEMACHINES",en.MACHINES="MACHINES",en.AVAILABLEMACHINES="AVAILABLEMACHINES",en.DROPZONE="DROPZONE",en.STANDBYNNODE="STANDBYNNODE",en.THORSPARENODES="THORSPARENODES",en.HOLESTANDBYNODES="HOLESTANDBYNODES";const tn=class _MachineServiceBase extends te{constructor(e){super(e,"ws_machine","1.19")}GetComponentStatus(e){return this._connection.send("GetComponentStatus",e,"json",!1,void 0,"GetComponentStatusResponse")}GetComponentUsage(e){return this._connection.send("GetComponentUsage",e,"json",!1,void 0,"GetComponentUsageResponse")}GetMachineInfo(e){return this._connection.send("GetMachineInfo",e,"json",!1,void 0,"GetMachineInfoResponse")}GetMachineInfoEx(e){return this._connection.send("GetMachineInfoEx",e,"json",!1,void 0,"GetMachineInfoResponseEx")}GetMetrics(e){return this._connection.send("GetMetrics",e,"json",!1,void 0,"MetricsResponse")}GetNodeGroupUsage(e){return this._connection.send("GetNodeGroupUsage",e,"json",!1,void 0,"GetNodeGroupUsageResponse")}GetTargetClusterInfo(e){return this._connection.send("GetTargetClusterInfo",e,"json",!1,void 0,"GetTargetClusterInfoResponse")}GetTargetClusterUsage(e){return this._connection.send("GetTargetClusterUsage",e,"json",!1,void 0,"GetTargetClusterUsageResponse")}Ping(e){return this._connection.send("Ping",e,"json",!1,void 0,"ws_machinePingResponse")}UpdateComponentStatus(e){return this._connection.send("UpdateComponentStatus",e,"json",!1,void 0,"UpdateComponentStatusResponse")}};t(tn,"MachineServiceBase");let nn=tn;const sn=class _MachineService extends nn{GetTargetClusterUsageEx(e,t=!1){return this._connection.send("GetTargetClusterUsage",{TargetClusters:e?{Item:e}:{},BypassCachedResult:t}).then(e=>c("TargetClusterUsages.TargetClusterUsage",e)?e.TargetClusterUsages.TargetClusterUsage:[]).then(e=>e.filter(e=>!!e.ComponentUsages).map(e=>{const t=e.ComponentUsages.ComponentUsage.map(e=>{const t=(e.MachineUsages&&e.MachineUsages.MachineUsage?e.MachineUsages.MachineUsage:[]).map(e=>{const t=e.DiskUsages&&e.DiskUsages.DiskUsage?e.DiskUsages.DiskUsage.map(e=>({...e,InUse:1024*e.InUse,Total:1024*(e.InUse+e.Available),PercentUsed:100-e.PercentAvailable})):[];return{Name:e.Name,NetAddress:e.NetAddress,Description:e.Description,DiskUsages:t,mean:Yt(t.filter(e=>!isNaN(e.PercentUsed)),e=>e.PercentUsed),max:qt(t.filter(e=>!isNaN(e.PercentUsed)),e=>e.PercentUsed)}});return{Type:e.Type,Name:e.Name,Description:e.Description,MachineUsages:t,MachineUsagesDescription:t.reduce((e,t)=>e+(t.Description||""),""),mean:Yt(t.filter(e=>!isNaN(e.mean)),e=>e.mean),max:qt(t.filter(e=>!isNaN(e.max)),e=>e.max)}});return{Name:e.Name,Description:e.Description,ComponentUsages:t,ComponentUsagesDescription:t.reduce((e,t)=>e+(t.MachineUsagesDescription||""),""),mean:Yt(t.filter(e=>!isNaN(e.mean)),e=>e.mean),max:qt(t.filter(e=>!isNaN(e.max)),e=>e.max)}}))}};t(sn,"MachineService");let rn=sn;const on=class _PackageProcessServiceBase extends te{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")}};t(on,"PackageProcessServiceBase");let cn=on;const an=class _PackageProcessService extends cn{};t(an,"PackageProcessService");let un=an;const hn=class _ResourcesServiceBase extends te{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)}};t(hn,"ResourcesServiceBase");let ln=hn;const pn=class _ResourcesService extends ln{};t(pn,"ResourcesService");let dn=pn;var gn,mn,Sn;mn=gn||(gn={}),(Sn=mn.WUTypes||(mn.WUTypes={})).ECL="ECL",Sn.DFU="DFU";const fn=class _SashaServiceBase extends te{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")}};t(fn,"SashaServiceBase");let _n=fn;const Un=class _SashaService extends _n{};t(Un,"SashaService");let yn=Un;var Cn=/* @__PURE__ */new Date,Rn=/* @__PURE__ */new Date;function Dn(e,n,s,r){function i(t){return e(t=0===arguments.length?/* @__PURE__ */new Date:/* @__PURE__ */new Date(+t)),t}return t(i,"interval"),i.floor=function(t){return e(t=/* @__PURE__ */new Date(+t)),t},i.ceil=function(t){return e(t=new Date(t-1)),n(t,1),e(t),t},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,t){return n(e=/* @__PURE__ */new Date(+e),null==t?1:Math.floor(t)),e},i.range=function(t,s,r){var o,c=[];if(t=i.ceil(t),r=null==r?1:Math.floor(r),!(t<s&&r>0))return c;do{c.push(o=/* @__PURE__ */new Date(+t)),n(t,r),e(t)}while(o<t&&t<s);return c},i.filter=function(t){return Dn(function(n){if(n>=n)for(;e(n),!t(n);)n.setTime(n-1)},function(e,s){if(e>=e)if(s<0)for(;++s<=0;)for(;n(e,-1),!t(e););else for(;--s>=0;)for(;n(e,1),!t(e););})},s&&(i.count=function(t,n){return Cn.setTime(+t),Rn.setTime(+n),e(Cn),e(Rn),Math.floor(s(Cn,Rn))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}t(Dn,"newInterval");var bn=864e5,Fn=6048e5,Wn=Dn(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/bn},function(e){return e.getDate()-1});function vn(e){return Dn(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/Fn})}Wn.range,t(vn,"weekday");var Tn=vn(0),An=vn(1),wn=vn(2),Pn=vn(3),xn=vn(4),Ln=vn(5),En=vn(6);Tn.range,An.range,wn.range,Pn.range,xn.range,Ln.range,En.range;var Mn=Dn(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});Mn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Dn(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null},Mn.range;var Nn=Dn(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/bn},function(e){return e.getUTCDate()-1});function In(e){return Dn(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/Fn})}Nn.range,t(In,"utcWeekday");var jn=In(0),kn=In(1),Gn=In(2),Vn=In(3),Qn=In(4),Bn=In(5),On=In(6);jn.range,kn.range,Gn.range,Vn.range,Qn.range,Bn.range,On.range;var Xn=Dn(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});function Hn(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function $n(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Jn(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function qn(e){var n=e.dateTime,s=e.date,r=e.time,i=e.periods,o=e.days,c=e.shortDays,a=e.months,u=e.shortMonths,h=hs(i),l=ls(i),p=hs(o),d=ls(o),g=hs(c),m=ls(c),S=hs(a),f=ls(a),_=hs(u),U=ls(u),y={a:E,A:M,b:N,B:I,c:null,d:xs,e:xs,f:Is,g:Js,G:Ys,H:Ls,I:Es,j:Ms,L:Ns,m:js,M:ks,p:j,q:k,Q:Ur,s:yr,S:Gs,u:Vs,U:Qs,V:Os,w:Xs,W:Hs,x:null,X:null,y:$s,Y:qs,Z:zs,"%":_r},C={a:G,A:V,b:Q,B:B,c:null,d:Zs,e:Zs,f:sr,g:gr,G:Sr,H:Ks,I:er,j:tr,L:nr,m:rr,M:ir,p:O,q:X,Q:Ur,s:yr,S:or,u:cr,U:ar,V:hr,w:lr,W:pr,x:null,X:null,y:dr,Y:mr,Z:fr,"%":_r},R={a:v,A:T,b:A,B:w,c:P,d:Rs,e:Rs,f:Ts,g:_s,G:fs,H:bs,I:bs,j:Ds,L:vs,m:Cs,M:Fs,p:W,q:ys,Q:ws,s:Ps,S:Ws,u:ds,U:gs,V:ms,w:ps,W:Ss,x:x,X:L,y:_s,Y:fs,Z:Us,"%":As};function D(e,t){return function(n){var s,r,i,o=[],c=-1,a=0,u=e.length;for(n instanceof Date||(n=/* @__PURE__ */new Date(+n));++c<u;)37===e.charCodeAt(c)&&(o.push(e.slice(a,c)),null!=(r=rs[s=e.charAt(++c)])?s=e.charAt(++c):r="e"===s?" ":"0",(i=t[s])&&(s=i(n,r)),o.push(s),a=c+1);return o.push(e.slice(a,c)),o.join("")}}function b(e,t){return function(n){var s,r,i=Jn(1900,void 0,1);if(F(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(r=(s=$n(Jn(i.y,0,1))).getUTCDay(),s=r>4||0===r?kn.ceil(s):kn(s),s=Nn.offset(s,7*(i.V-1)),i.y=s.getUTCFullYear(),i.m=s.getUTCMonth(),i.d=s.getUTCDate()+(i.w+6)%7):(r=(s=Hn(Jn(i.y,0,1))).getDay(),s=r>4||0===r?An.ceil(s):An(s),s=Wn.offset(s,7*(i.V-1)),i.y=s.getFullYear(),i.m=s.getMonth(),i.d=s.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),r="Z"in i?$n(Jn(i.y,0,1)).getUTCDay():Hn(Jn(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(r+5)%7:i.w+7*i.U-(r+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,$n(i)):Hn(i)}}function F(e,t,n,s){for(var r,i,o=0,c=t.length,a=n.length;o<c;){if(s>=a)return-1;if(37===(r=t.charCodeAt(o++))){if(r=t.charAt(o++),!(i=R[r in rs?t.charAt(o++):r])||(s=i(e,n,s))<0)return-1}else if(r!=n.charCodeAt(s++))return-1}return s}function W(e,t,n){var s=h.exec(t.slice(n));return s?(e.p=l[s[0].toLowerCase()],n+s[0].length):-1}function v(e,t,n){var s=g.exec(t.slice(n));return s?(e.w=m[s[0].toLowerCase()],n+s[0].length):-1}function T(e,t,n){var s=p.exec(t.slice(n));return s?(e.w=d[s[0].toLowerCase()],n+s[0].length):-1}function A(e,t,n){var s=_.exec(t.slice(n));return s?(e.m=U[s[0].toLowerCase()],n+s[0].length):-1}function w(e,t,n){var s=S.exec(t.slice(n));return s?(e.m=f[s[0].toLowerCase()],n+s[0].length):-1}function P(e,t,s){return F(e,n,t,s)}function x(e,t,n){return F(e,s,t,n)}function L(e,t,n){return F(e,r,t,n)}function E(e){return c[e.getDay()]}function M(e){return o[e.getDay()]}function N(e){return u[e.getMonth()]}function I(e){return a[e.getMonth()]}function j(e){return i[+(e.getHours()>=12)]}function k(e){return 1+~~(e.getMonth()/3)}function G(e){return c[e.getUTCDay()]}function V(e){return o[e.getUTCDay()]}function Q(e){return u[e.getUTCMonth()]}function B(e){return a[e.getUTCMonth()]}function O(e){return i[+(e.getUTCHours()>=12)]}function X(e){return 1+~~(e.getUTCMonth()/3)}return y.x=D(s,y),y.X=D(r,y),y.c=D(n,y),C.x=D(s,C),C.X=D(r,C),C.c=D(n,C),t(D,"newFormat"),t(b,"newParse"),t(F,"parseSpecifier"),t(W,"parsePeriod"),t(v,"parseShortWeekday"),t(T,"parseWeekday"),t(A,"parseShortMonth"),t(w,"parseMonth"),t(P,"parseLocaleDateTime"),t(x,"parseLocaleDate"),t(L,"parseLocaleTime"),t(E,"formatShortWeekday"),t(M,"formatWeekday"),t(N,"formatShortMonth"),t(I,"formatMonth"),t(j,"formatPeriod"),t(k,"formatQuarter"),t(G,"formatUTCShortWeekday"),t(V,"formatUTCWeekday"),t(Q,"formatUTCShortMonth"),t(B,"formatUTCMonth"),t(O,"formatUTCPeriod"),t(X,"formatUTCQuarter"),{format:/* @__PURE__ */t(function(e){var t=D(e+="",y);return t.toString=function(){return e},t},"format"),parse:/* @__PURE__ */t(function(e){var t=b(e+="",!1);return t.toString=function(){return e},t},"parse"),utcFormat:/* @__PURE__ */t(function(e){var t=D(e+="",C);return t.toString=function(){return e},t},"utcFormat"),utcParse:/* @__PURE__ */t(function(e){var t=b(e+="",!0);return t.toString=function(){return e},t},"utcParse")}}Xn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Dn(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null},Xn.range,t(Hn,"localDate"),t($n,"utcDate"),t(Jn,"newDate"),t(qn,"formatLocale$1");var Yn,zn,Zn,Kn,es,ts,ns,ss,rs={"-":"",_:" ",0:"0"},is=/^\s*\d+/,os=/^%/,cs=/[\\^$*+?|[\]().{}]/g;function as(e,t,n){var s=e<0?"-":"",r=(s?-e:e)+"",i=r.length;return s+(i<n?new Array(n-i+1).join(t)+r:r)}function us(e){return e.replace(cs,"\\$&")}function hs(e){return new RegExp("^(?:"+e.map(us).join("|")+")","i")}function ls(e){for(var t={},n=-1,s=e.length;++n<s;)t[e[n].toLowerCase()]=n;return t}function ps(e,t,n){var s=is.exec(t.slice(n,n+1));return s?(e.w=+s[0],n+s[0].length):-1}function ds(e,t,n){var s=is.exec(t.slice(n,n+1));return s?(e.u=+s[0],n+s[0].length):-1}function gs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.U=+s[0],n+s[0].length):-1}function ms(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.V=+s[0],n+s[0].length):-1}function Ss(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.W=+s[0],n+s[0].length):-1}function fs(e,t,n){var s=is.exec(t.slice(n,n+4));return s?(e.y=+s[0],n+s[0].length):-1}function _s(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.y=+s[0]+(+s[0]>68?1900:2e3),n+s[0].length):-1}function Us(e,t,n){var s=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return s?(e.Z=s[1]?0:-(s[2]+(s[3]||"00")),n+s[0].length):-1}function ys(e,t,n){var s=is.exec(t.slice(n,n+1));return s?(e.q=3*s[0]-3,n+s[0].length):-1}function Cs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.m=s[0]-1,n+s[0].length):-1}function Rs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.d=+s[0],n+s[0].length):-1}function Ds(e,t,n){var s=is.exec(t.slice(n,n+3));return s?(e.m=0,e.d=+s[0],n+s[0].length):-1}function bs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.H=+s[0],n+s[0].length):-1}function Fs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.M=+s[0],n+s[0].length):-1}function Ws(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.S=+s[0],n+s[0].length):-1}function vs(e,t,n){var s=is.exec(t.slice(n,n+3));return s?(e.L=+s[0],n+s[0].length):-1}function Ts(e,t,n){var s=is.exec(t.slice(n,n+6));return s?(e.L=Math.floor(s[0]/1e3),n+s[0].length):-1}function As(e,t,n){var s=os.exec(t.slice(n,n+1));return s?n+s[0].length:-1}function ws(e,t,n){var s=is.exec(t.slice(n));return s?(e.Q=+s[0],n+s[0].length):-1}function Ps(e,t,n){var s=is.exec(t.slice(n));return s?(e.s=+s[0],n+s[0].length):-1}function xs(e,t){return as(e.getDate(),t,2)}function Ls(e,t){return as(e.getHours(),t,2)}function Es(e,t){return as(e.getHours()%12||12,t,2)}function Ms(e,t){return as(1+Wn.count(Mn(e),e),t,3)}function Ns(e,t){return as(e.getMilliseconds(),t,3)}function Is(e,t){return Ns(e,t)+"000"}function js(e,t){return as(e.getMonth()+1,t,2)}function ks(e,t){return as(e.getMinutes(),t,2)}function Gs(e,t){return as(e.getSeconds(),t,2)}function Vs(e){var t=e.getDay();return 0===t?7:t}function Qs(e,t){return as(Tn.count(Mn(e)-1,e),t,2)}function Bs(e){var t=e.getDay();return t>=4||0===t?xn(e):xn.ceil(e)}function Os(e,t){return e=Bs(e),as(xn.count(Mn(e),e)+(4===Mn(e).getDay()),t,2)}function Xs(e){return e.getDay()}function Hs(e,t){return as(An.count(Mn(e)-1,e),t,2)}function $s(e,t){return as(e.getFullYear()%100,t,2)}function Js(e,t){return as((e=Bs(e)).getFullYear()%100,t,2)}function qs(e,t){return as(e.getFullYear()%1e4,t,4)}function Ys(e,t){var n=e.getDay();return as((e=n>=4||0===n?xn(e):xn.ceil(e)).getFullYear()%1e4,t,4)}function zs(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+as(t/60|0,"0",2)+as(t%60,"0",2)}function Zs(e,t){return as(e.getUTCDate(),t,2)}function Ks(e,t){return as(e.getUTCHours(),t,2)}function er(e,t){return as(e.getUTCHours()%12||12,t,2)}function tr(e,t){return as(1+Nn.count(Xn(e),e),t,3)}function nr(e,t){return as(e.getUTCMilliseconds(),t,3)}function sr(e,t){return nr(e,t)+"000"}function rr(e,t){return as(e.getUTCMonth()+1,t,2)}function ir(e,t){return as(e.getUTCMinutes(),t,2)}function or(e,t){return as(e.getUTCSeconds(),t,2)}function cr(e){var t=e.getUTCDay();return 0===t?7:t}function ar(e,t){return as(jn.count(Xn(e)-1,e),t,2)}function ur(e){var t=e.getUTCDay();return t>=4||0===t?Qn(e):Qn.ceil(e)}function hr(e,t){return e=ur(e),as(Qn.count(Xn(e),e)+(4===Xn(e).getUTCDay()),t,2)}function lr(e){return e.getUTCDay()}function pr(e,t){return as(kn.count(Xn(e)-1,e),t,2)}function dr(e,t){return as(e.getUTCFullYear()%100,t,2)}function gr(e,t){return as((e=ur(e)).getUTCFullYear()%100,t,2)}function mr(e,t){return as(e.getUTCFullYear()%1e4,t,4)}function Sr(e,t){var n=e.getUTCDay();return as((e=n>=4||0===n?Qn(e):Qn.ceil(e)).getUTCFullYear()%1e4,t,4)}function fr(){return"+0000"}function _r(){return"%"}function Ur(e){return+e}function yr(e){return Math.floor(+e/1e3)}function Cr(e){return(Yn=qn(e)).format,zn=Yn.parse,Zn=Yn.utcFormat,Kn=Yn.utcParse,Yn}t(as,"pad"),t(us,"requote"),t(hs,"formatRe"),t(ls,"formatLookup"),t(ps,"parseWeekdayNumberSunday"),t(ds,"parseWeekdayNumberMonday"),t(gs,"parseWeekNumberSunday"),t(ms,"parseWeekNumberISO"),t(Ss,"parseWeekNumberMonday"),t(fs,"parseFullYear"),t(_s,"parseYear"),t(Us,"parseZone"),t(ys,"parseQuarter"),t(Cs,"parseMonthNumber"),t(Rs,"parseDayOfMonth"),t(Ds,"parseDayOfYear"),t(bs,"parseHour24"),t(Fs,"parseMinutes"),t(Ws,"parseSeconds"),t(vs,"parseMilliseconds"),t(Ts,"parseMicroseconds"),t(As,"parseLiteralPercent"),t(ws,"parseUnixTimestamp"),t(Ps,"parseUnixTimestampSeconds"),t(xs,"formatDayOfMonth"),t(Ls,"formatHour24"),t(Es,"formatHour12"),t(Ms,"formatDayOfYear"),t(Ns,"formatMilliseconds"),t(Is,"formatMicroseconds"),t(js,"formatMonthNumber"),t(ks,"formatMinutes"),t(Gs,"formatSeconds"),t(Vs,"formatWeekdayNumberMonday"),t(Qs,"formatWeekNumberSunday"),t(Bs,"dISO"),t(Os,"formatWeekNumberISO"),t(Xs,"formatWeekdayNumberSunday"),t(Hs,"formatWeekNumberMonday"),t($s,"formatYear"),t(Js,"formatYearISO"),t(qs,"formatFullYear"),t(Ys,"formatFullYearISO"),t(zs,"formatZone"),t(Zs,"formatUTCDayOfMonth"),t(Ks,"formatUTCHour24"),t(er,"formatUTCHour12"),t(tr,"formatUTCDayOfYear"),t(nr,"formatUTCMilliseconds"),t(sr,"formatUTCMicroseconds"),t(rr,"formatUTCMonthNumber"),t(ir,"formatUTCMinutes"),t(or,"formatUTCSeconds"),t(cr,"formatUTCWeekdayNumberMonday"),t(ar,"formatUTCWeekNumberSunday"),t(ur,"UTCdISO"),t(hr,"formatUTCWeekNumberISO"),t(lr,"formatUTCWeekdayNumberSunday"),t(pr,"formatUTCWeekNumberMonday"),t(dr,"formatUTCYear"),t(gr,"formatUTCYearISO"),t(mr,"formatUTCFullYear"),t(Sr,"formatUTCFullYearISO"),t(fr,"formatUTCZone"),t(_r,"formatLiteralPercent"),t(Ur,"formatUnixTimestamp"),t(yr,"formatUnixTimestampSeconds"),Cr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),t(Cr,"defaultLocale$1"),ts=es||(es={}),(ns=ts.LockModes||(ts.LockModes={})).ALL="ALL",ns.READ="READ",ns.WRITE="WRITE",ns.HOLD="HOLD",ns.SUB="SUB",(ss=ts.RoxieControlCmdType||(ts.RoxieControlCmdType={})).Attach="Attach",ss.Detach="Detach",ss.State="State",ss.Reload="Reload",ss.ReloadRetry="ReloadRetry",ss.MemLock="MemLock",ss.MemUnlock="MemUnlock",ss.GetMemLocked="GetMemLocked";const Rr=class _SMCServiceBase extends te{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")}};t(Rr,"SMCServiceBase");let Dr=Rr;const br=zn("%Y%m%d%H");function Fr(e){return"number"==typeof e||"string"==typeof e&&""!==e.trim()&&!isNaN(+e)}t(Fr,"isNumeric");const Wr=class _SMCService extends Dr{connectionOptions(){return this._connection.opts()}Activity(e){return super.Activity(e).then(e=>({Running:{ActiveWorkunit:[]},...e}))}parseGlobalMetric(e,t){return e.startsWith("Cost")?+t/1e6:e.startsWith("Date")?br(t):e.startsWith("Num")?+t:e.startsWith("Time")?+t/1e9:e.startsWith("When")?new Date(+t/1e3).toISOString():Fr(t)?+t:t}GetNormalisedGlobalMetrics(e){return super.GetGlobalMetrics(e).then(e=>{const t=[];for(const n of e?.GlobalMetrics?.GlobalMetric||[]){const e={Category:n.Category,Start:this.parseGlobalMetric("Date",n.DateTimeRange?.Start),End:this.parseGlobalMetric("Date",n.DateTimeRange?.End),dimensions:{},stats:{}};for(const t of n.Dimensions?.Dimension||[])e.dimensions[t.Name]=t.Value;for(const t of n.Stats?.Stat||[])e.stats[t.Name]=this.parseGlobalMetric(t.Name,t.Value);t.push(e)}return t})}};t(Wr,"SMCService");let vr=Wr;const Tr=class _storeServiceBase extends te{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")}};t(Tr,"storeServiceBase");let Ar=Tr;const wr=class _StoreService extends Ar{Delete(e){return super.Delete(e).catch(e=>{if(e.isESPExceptions&&e.Exception.some(e=>-1===e.Code))return{Exceptions:void 0,Success:!0};throw e})}Fetch(e){return super.Fetch(e).catch(e=>{if(e.isESPExceptions&&e.Exception.some(e=>-1===e.Code))return{Exceptions:void 0,Value:void 0};throw e})}};t(wr,"StoreService");let Pr=wr;var xr,Lr,Er,Mr;Lr=xr||(xr={}),(Er=Lr.TpConfigResponseFormat||(Lr.TpConfigResponseFormat={})).XML="XML",Er.YAML="YAML",(Mr=Lr.RoxieQueueFilter||(Lr.RoxieQueueFilter={})).All="All",Mr.QueriesOnly="QueriesOnly",Mr.WorkunitsOnly="WorkunitsOnly",(e=>{e.ALLNODES="ALLNODES",e.THORMACHINES="THORMACHINES",e.HOLEMACHINES="HOLEMACHINES",e.ROXIEMACHINES="ROXIEMACHINES",e.MACHINES="MACHINES",e.AVAILABLEMACHINES="AVAILABLEMACHINES",e.DROPZONE="DROPZONE",e.STANDBYNNODE="STANDBYNNODE",e.THORSPARENODES="THORSPARENODES",e.HOLESTANDBYNODES="HOLESTANDBYNODES"})(Lr.TpMachineType||(Lr.TpMachineType={}));const Nr=class _TopologyServiceBase extends te{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")}};t(Nr,"TopologyServiceBase");let Ir=Nr;const jr=class _TopologyService extends Ir{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(e=>{if(e.default)return e.default;let t,n;return e.TpLogicalClusters.TpLogicalCluster.some((e,s)=>(0===s&&(n=e),"hthor"===e.Type&&(t=e,!0))),t||n})}};t(jr,"TopologyService");let kr=jr;var Gr,Vr,Qr,Br,Or,Xr,Hr,$r,Jr,qr,Yr,zr,Zr,Kr,ei;Vr=Gr||(Gr={}),(Qr=Vr.ECLWUActions||(Vr.ECLWUActions={})).Abort="Abort",Qr.Delete="Delete",Qr.Deschedule="Deschedule",Qr.Reschedule="Reschedule",Qr.Pause="Pause",Qr.PauseNow="PauseNow",Qr.Protect="Protect",Qr.Unprotect="Unprotect",Qr.Restore="Restore",Qr.Resume="Resume",Qr.SetToFailed="SetToFailed",Qr.Archive="Archive",(e=>{e[e.MIN=0]="MIN",e[e.DEFAULT=1]="DEFAULT",e[e.ALL=2]="ALL",e[e.CUSTOM=3]="CUSTOM"})(Vr.LogSelectColumnMode||(Vr.LogSelectColumnMode={})),(e=>{e[e.ASC=0]="ASC",e[e.DSC=1]="DSC"})(Vr.SortDirection||(Vr.SortDirection={})),(Br=Vr.LogEventClass||(Vr.LogEventClass={})).ALL="ALL",Br.DIS="DIS",Br.ERR="ERR",Br.WRN="WRN",Br.INF="INF",Br.PRO="PRO",Br.MET="MET",Br.EVT="EVT",(Or=Vr.WUDetailsAttrValueType||(Vr.WUDetailsAttrValueType={})).Single="Single",Or.List="List",Or.Multi="Multi",(Xr=Vr.EclDefinitionActions||(Vr.EclDefinitionActions={})).SyntaxCheck="SyntaxCheck",Xr.Deploy="Deploy",Xr.Publish="Publish",(Hr=Vr.ErrorMessageFormat||(Vr.ErrorMessageFormat={})).xml="xml",Hr.json="json",Hr.text="text",($r=Vr.LogAccessLogFormat||(Vr.LogAccessLogFormat={}))[$r.XML=0]="XML",$r[$r.JSON=1]="JSON",$r[$r.CSV=2]="CSV",(Jr=Vr.WUExceptionSeverity||(Vr.WUExceptionSeverity={})).info="info",Jr.warning="warning",Jr.error="error",Jr.alert="alert",(qr=Vr.WUQueryFilterSuspendedType||(Vr.WUQueryFilterSuspendedType={})).Allqueries="All queries",qr.Notsuspended="Not suspended",qr.Suspended="Suspended",qr.Suspendedbyuser="Suspended by user",qr.Suspendedbyfirstnode="Suspended by first node",qr.Suspendedbyanynode="Suspended by any node",(Yr=Vr.WUQuerySetFilterType||(Vr.WUQuerySetFilterType={})).All="All",Yr.Id="Id",Yr.Name="Name",Yr.Alias="Alias",Yr.Status="Status",(zr=Vr.WUProtectFilter||(Vr.WUProtectFilter={})).All="All",zr.Protected="Protected",zr.NotProtected="NotProtected",(Vr.QuerySetAliasActionTypes||(Vr.QuerySetAliasActionTypes={})).Deactivate="Deactivate",(Zr=Vr.QuerysetImportActivation||(Vr.QuerysetImportActivation={})).None="None",Zr.ActivateImportedActive="ActivateImportedActive",(Kr=Vr.QuerySetQueryActionTypes||(Vr.QuerySetQueryActionTypes={})).Suspend="Suspend",Kr.Unsuspend="Unsuspend",Kr.ToggleSuspend="ToggleSuspend",Kr.Activate="Activate",Kr.Delete="Delete",Kr.DeleteQueriesAndWUs="DeleteQueriesAndWUs",Kr.RemoveAllAliases="RemoveAllAliases",Kr.ResetQueryStats="ResetQueryStats",(ei=Vr.WUQueryActivationMode||(Vr.WUQueryActivationMode={}))[ei.DoNotActivateQuery=0]="DoNotActivateQuery",ei[ei.ActivateQuery=1]="ActivateQuery",ei[ei.ActivateQuerySuspendPrevious=2]="ActivateQuerySuspendPrevious",ei[ei.ActivateQueryDeletePrevious=3]="ActivateQueryDeletePrevious";const ti=class _WorkunitsServiceBase extends te{constructor(e){super(e,"WsWorkunits","2.05")}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")}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")}};t(ti,"WorkunitsServiceBase");let ni=ti;var si,ri,ii,oi=/* @__PURE__ */(e=>(e[e.Unknown=0]="Unknown",e[e.Compiled=1]="Compiled",e[e.Running=2]="Running",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed",e[e.Archived=5]="Archived",e[e.Aborting=6]="Aborting",e[e.Aborted=7]="Aborted",e[e.Blocked=8]="Blocked",e[e.Submitted=9]="Submitted",e[e.Scheduled=10]="Scheduled",e[e.Compiling=11]="Compiling",e[e.Wait=12]="Wait",e[e.UploadingFiled=13]="UploadingFiled",e[e.DebugPaused=14]="DebugPaused",e[e.DebugRunning=15]="DebugRunning",e[e.Paused=16]="Paused",e[e.LAST=17]="LAST",e[e.NotFound=999]="NotFound",e))(oi||{});function ci(e){return"string"==typeof e.Name}function ai(e){return void 0!==e.TotalClusterTime}function ui(e){return void 0!==e.StateEx}ri=si||(si={}),(ii=ri.Action||(ri.Action={}))[ii.Unknown=0]="Unknown",ii[ii.Compile=1]="Compile",ii[ii.Check=2]="Check",ii[ii.Run=3]="Run",ii[ii.ExecuteExisting=4]="ExecuteExisting",ii[ii.Pause=5]="Pause",ii[ii.PauseNow=6]="PauseNow",ii[ii.Resume=7]="Resume",ii[ii.Debug=8]="Debug",ii[ii.__size=9]="__size",t(ci,"isECLResult"),t(ai,"isWUQueryECLWorkunit"),t(ui,"isWUInfoWorkunit");const hi=class _WorkunitsService extends ni{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(e=>a({Workunits:{ECLWorkunit:[]}},e))}WUInfo(e){const 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(e=>{const t=u(e.Result).children();return t.length?t[0]:null})}};t(hi,"WorkunitsService");let li=hi;const pi=class _WorkunitsServiceEx extends ni{WUPublishWorkunitEx(e){return this._connection.send("WUPublishWorkunit",e)}};t(pi,"WorkunitsServiceEx");let di=pi;function gi(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function mi(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,s=e.slice(0,n);return[s.length>1?s[0]+s.slice(2):s,+e.slice(n+1)]}function Si(e){return(e=mi(Math.abs(e)))?e[1]:NaN}function fi(e,t){return function(n,s){for(var r=n.length,i=[],o=0,c=e[0],a=0;r>0&&c>0&&(a+c+1>s&&(c=Math.max(1,s-a)),i.push(n.substring(r-=c,r+c)),!((a+=c+1)>s));)c=e[o=(o+1)%e.length];return i.reverse().join(t)}}function _i(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}t(gi,"formatDecimal"),t(mi,"formatDecimalParts"),t(Si,"exponent"),t(fi,"formatGroup"),t(_i,"formatNumerals");var Ui,yi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ci(e){if(!(t=yi.exec(e)))throw new Error("invalid format: "+e);var t;return new Ri({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Ri(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Di(e){e:for(var t,n=e.length,s=1,r=-1;s<n;++s)switch(e[s]){case".":r=t=s;break;case"0":0===r&&(r=s),t=s;break;default:if(!+e[s])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(t+1):e}function bi(e,t){var n=mi(e,t);if(!n)return e+"";var s=n[0],r=n[1],i=r-(Ui=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=s.length;return i===o?s:i>o?s+new Array(i-o+1).join("0"):i>0?s.slice(0,i)+"."+s.slice(i):"0."+new Array(1-i).join("0")+mi(e,Math.max(0,t+i-1))[0]}function Fi(e,t){var n=mi(e,t);if(!n)return e+"";var s=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+s:s.length>r+1?s.slice(0,r+1)+"."+s.slice(r+1):s+new Array(r-s.length+2).join("0")}t(Ci,"formatSpecifier"),Ci.prototype=Ri.prototype,t(Ri,"FormatSpecifier"),Ri.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},t(Di,"formatTrim"),t(bi,"formatPrefixAuto"),t(Fi,"formatRounded");const Wi={"%":/* @__PURE__ */t(function(e,t){return(100*e).toFixed(t)},"%"),b:/* @__PURE__ */t(function(e){return Math.round(e).toString(2)},"b"),c:/* @__PURE__ */t(function(e){return e+""},"c"),d:gi,e:/* @__PURE__ */t(function(e,t){return e.toExponential(t)},"e"),f:/* @__PURE__ */t(function(e,t){return e.toFixed(t)},"f"),g:/* @__PURE__ */t(function(e,t){return e.toPrecision(t)},"g"),o:/* @__PURE__ */t(function(e){return Math.round(e).toString(8)},"o"),p:/* @__PURE__ */t(function(e,t){return Fi(100*e,t)},"p"),r:Fi,s:bi,X:/* @__PURE__ */t(function(e){return Math.round(e).toString(16).toUpperCase()},"X"),x:/* @__PURE__ */t(function(e){return Math.round(e).toString(16)},"x")};function vi(e){return e}t(vi,"identity");var Ti,Ai,wi=Array.prototype.map,Pi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function xi(e){var n=void 0===e.grouping||void 0===e.thousands?vi:fi(wi.call(e.grouping,Number),e.thousands+""),s=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=e.decimal+"",o=void 0===e.numerals?vi:_i(wi.call(e.numerals,String)),c=void 0===e.percent?"%":e.percent+"",a=e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var h=(e=Ci(e)).fill,l=e.align,p=e.sign,d=e.symbol,g=e.zero,m=e.width,S=e.comma,f=e.precision,_=e.trim,U=e.type;"n"===U?(S=!0,U="g"):Wi[U]||(void 0===f&&(f=12),_=!0,U="g"),(g||"0"===h&&"="===l)&&(g=!0,h="0",l="=");var y="$"===d?s:"#"===d&&/[boxX]/.test(U)?"0"+U.toLowerCase():"",C="$"===d?r:/[%p]/.test(U)?c:"",R=Wi[U],D=/[defgprs%]/.test(U);function b(e){var t,s,r,c=y,d=C;if("c"===U)d=R(e)+d,e="";else{var b=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:R(Math.abs(e),f),_&&(e=Di(e)),b&&0===+e&&"+"!==p&&(b=!1),c=(b?"("===p?p:a:"-"===p||"("===p?"":p)+c,d=("s"===U?Pi[8+Ui/3]:"")+d+(b&&"("===p?")":""),D)for(t=-1,s=e.length;++t<s;)if(48>(r=e.charCodeAt(t))||r>57){d=(46===r?i+e.slice(t+1):e.slice(t))+d,e=e.slice(0,t);break}}S&&!g&&(e=n(e,1/0));var F=c.length+e.length+d.length,W=F<m?new Array(m-F+1).join(h):"";switch(S&&g&&(e=n(W+e,W.length?m-d.length:1/0),W=""),l){case"<":e=c+e+d+W;break;case"=":e=c+W+e+d;break;case"^":e=W.slice(0,F=W.length>>1)+c+e+d+W.slice(F);break;default:e=W+c+e+d}return o(e)}return f=void 0===f?6:/[gprs]/.test(U)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),t(b,"format"),b.toString=function(){return e+""},b}function l(e,t){var n=h(((e=Ci(e)).type="f",e)),s=3*Math.max(-8,Math.min(8,Math.floor(Si(t)/3))),r=Math.pow(10,-s),i=Pi[8+s/3];return function(e){return n(r*e)+i}}return t(h,"newFormat"),t(l,"formatPrefix"),{format:h,formatPrefix:l}}function Li(e){return Ti=xi(e),Ai=Ti.format,Ti.formatPrefix,Ti}t(xi,"formatLocale"),Li({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),t(Li,"defaultLocale");const Ei=class _ECLGraph extends h{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,n){super(),this.wu=e;let s=0;for(const r of n)if(r.GraphName===t.Name&&!r.HasSubGraphId){s=Math.round(1e3*r.Seconds)/1e3;break}this.set({Time:s,...t})}fetchScopeGraph(e){return e?this.wu.fetchGraphDetails([e],["subgraph"]).then(e=>so(e)):this.wu.fetchGraphDetails([this.Name],["graph"]).then(e=>so(e))}};t(Ei,"ECLGraph");let Mi=Ei;const Ni=class _GraphCache extends l{constructor(){super(e=>l.hash([e.Name]))}};t(Ni,"GraphCache");let Ii=Ni;function ji(e,t,n){(n=n||[]).push(e),t(e.name,e.$,e.children(),n),e.children().forEach(e=>{ji(e,t,n)}),n.pop()}function ki(e){const t={};return e.forEach(e=>{"att"===e.name&&(t[e.$.name]=e.$.value)}),t}t(ji,"walkXmlJson"),t(ki,"flattenAtt");const Gi=class _XGMMLGraph extends d{};t(Gi,"XGMMLGraph");let Vi=Gi;const Qi=class _XGMMLSubgraph extends g{};t(Qi,"XGMMLSubgraph");let Bi=Qi;const Oi=class _XGMMLVertex extends m{};t(Oi,"XGMMLVertex");let Xi=Oi;const Hi=class _XGMMLEdge extends p{};t(Hi,"XGMMLEdge");let $i=Hi;function Ji(e,t){const n={},s={},r={},i=new Vi(e=>e._.id),o=[i.root];return ji(t,(e,t,i,c)=>{const a=o[o.length-1];switch(e){case"graph":break;case"node":if(i.length&&i[0].children().length&&"graph"===i[0].children()[0].name){const e=a.createSubgraph(ki(i));o.push(e),n[t.id]=e}const e=a.createVertex(ki(i));s[t.id]=e;break;case"edge":const c=a.createEdge(s[t.source],s[t.target],ki(i));r[t.id]=c}}),i}t(Ji,"createXGMMLGraph");const qi=class _ScopeGraph extends d{};t(qi,"ScopeGraph");let Yi=qi;const zi=class _ScopeSubgraph extends g{};t(zi,"ScopeSubgraph");let Zi=zi;const Ki=class _ScopeVertex extends m{};t(Ki,"ScopeVertex");let eo=Ki;const to=class _ScopeEdge extends p{};t(to,"ScopeEdge");let no=to;function so(e){const t={},n={},s={};let r;for(const o of e)switch(o.ScopeType){case"graph":r=new Yi(e=>e._.Id,o),t[o.ScopeName]=r.root;break;case"subgraph":r||(r=new Yi(e=>e._.Id,o),t[o.ScopeName]=r.root);const e=o.parentScope().split(":");let i=t[o.parentScope()];for(;e.length&&!i;)i=t[e.join(":")],e.pop();if(i){const e=i;t[o.ScopeName]=e.createSubgraph(o)}else console.warn(`Missing SG:Parent (${o.Id}): ${o.parentScope()}`);break;case"activity":const c=t[o.parentScope()];c?s[o.ScopeName]=c.createVertex(o):console.warn(`Missing A:Parent (${o.Id}): ${o.parentScope()}`);break;case"edge":n[o.ScopeName]=o;break;case"function":const a=s[o.parentScope()];a?a._.children().push(o):console.warn(`Missing F:Parent (${o.Id}): ${o.parentScope()}`)}for(const o in n){const e=n[o],s=t[e.parentScope()];if(s){const t=s;try{const n=r.vertex(e.attr("IdSource").RawValue),s=r.vertex(e.attr("IdTarget").RawValue);t.createEdge(n,s,e)}catch(i){console.warn(`Invalid Edge: ${o}`)}}else console.warn(`Missing E:Parent (${e.Id}): ${e.parentScope()}`)}return r}t(so,"createGraph");const ro=class _Resource extends h{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;const n=t.split("\\").join("/"),s=n.split("/"),r="res/"+this.wu.Wuid+"/";let i="",o="";0===n.indexOf(r)&&(i=n.substr(r.length),o=s[s.length-1]),this.set({URL:t,DisplayName:o,DisplayPath:i})}};t(ro,"Resource");let io=ro;const oo=class _XSDNode{e;constructor(e){this.e=e}fix(){delete this.e}};t(oo,"XSDNode");let co=oo;const ao=class _XSDXMLNode extends co{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){const e=this._children[t];"Row"===e.name&&void 0===e.type&&(this._children.push(...e._children),this._children.splice(t,1))}const e=this.setOfType();e&&(this.type=e,this.isSet=!0,this._children=[])}children(){return this._children}isAll(e){return"All"===e.name&&void 0===e.type}setOfType(){const e=this.children();if(void 0===this.type&&2===e.length){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":case"xs:nonNegativeInteger":case"xs:double":e=8;break;case"xs:string":e=32;break;default:const t="0123456789",n=this.type.lastIndexOf("_"),s=n>0?n:this.type.length;let r=s-1;for(;r>=0&&-1!==t.indexOf(this.type.charAt(r));--r);r+1<s&&(e=parseInt(this.type.substring(r+1,s),10)),0===this.type.indexOf("data")&&(e*=2)}return e<this.name.length&&(e=this.name.length),e}};t(ao,"XSDXMLNode");let uo=ao;const ho=class _XSDSimpleType extends co{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}}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()}};t(ho,"XSDSimpleType");let lo=ho;const po=class _XSDSchema{root;simpleTypes={};fields(){return this.root.children()}};t(po,"XSDSchema");let go=po;const mo=class _XSDParser extends S{schema=new go;simpleType;simpleTypes={};xsdStack=new f;startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xs:element":const t=new uo(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 lo(e)}}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":const t=this.xsdStack.top();for(const n in e.$)t.attrs[n]=e.$[n];break;default:this.simpleType&&this.simpleType.append(e)}super.endXMLNode(e)}};t(mo,"XSDParser");let So=mo;function fo(e){const t=new So;return t.parse(e),t.schema}t(fo,"parseXSD");const _o=class _XSDParser2 extends So{_rootName;schema=new go;simpleTypes={};xsdStack=new f;constructor(e){super(),this._rootName=e}startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xsd:element":const t=new uo(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 lo(e)}}endXMLNode(e){if("xsd:element"===e.name){this.xsdStack.pop().fix()}super.endXMLNode(e)}};t(_o,"XSDParser2");let Uo=_o;function yo(e,t){const n=new Uo(t);return n.parse(e),n.schema}t(yo,"parseXSD2");const Co=class _GlobalResultCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}-${e.ResultName}`)}};t(Co,"GlobalResultCache");let Ro=Co;const Do=new Ro,bo=class _Result extends h{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,n,s){let r;return Array.isArray(s)?(r=Do.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n.Name},()=>new _Result(e,t,n,s)),r.set(n)):void 0===s&&("number"==typeof n?r=Do.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:"Sequence_"+n},()=>new _Result(e,t,n)):"string"==typeof n&&(r=Do.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n},()=>new _Result(e,t,n)))),r}static attachLogicalFile(e,t,n){return Do.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n},()=>new _Result(e,t,n,!0))}constructor(e,t,n,s){super(),this.connection=e instanceof li?e:new li(e),"boolean"==typeof s&&!0===s?this.set({NodeGroup:t,LogicalFileName:n}):ci(n)&&Array.isArray(s)?this.set({...n,Wuid:t,ResultName:n.Name,ResultViews:s}):void 0===s?"number"==typeof n?this.set({Wuid:t,ResultSequence:n}):"string"==typeof n?this.set({Wuid:t,ResultName:n}):console.warn("Unknown Result.attach (1)"):console.warn("Unknown Result.attach (2)")}isComplete(){return-1!==this.Total}bypassCache(e){return void 0===e?this._bypassCache:(this._bypassCache=e,this)}_fetchXMLSchemaPromise;fetchXMLSchema(e=!1){return this._fetchXMLSchemaPromise&&!e||(this._fetchXMLSchemaPromise=this.WUResult().then(e=>e.Result?.XmlSchema?.xml?(this.xsdSchema=fo(e.Result.XmlSchema.xml),this.xsdSchema):null)),this._fetchXMLSchemaPromise}async refresh(){return await this.fetchRows(0,1,!0),this}fetchRows(e=0,t=-1,n=!1,s={},r,i){const o=i??this._bypassCache;return this.WUResult(e,t,!n,s,r,o).then(e=>{const t=e.Result;return delete e.Result,this.set({...e}),c("XmlSchema.xml",t)&&(this.xsdSchema=fo(t.XmlSchema.xml)),c("Row",t)?t.Row:this.ResultName&&c(this.ResultName,t)?t[this.ResultName].Row:[]})}rootField(){return this.xsdSchema?this.xsdSchema.root:null}fields(){return this.xsdSchema?this.xsdSchema.root.children():[]}WUResult(e=0,t=1,n=!1,s={},r,i=!1){const o={NamedValue:{itemcount:0}};for(const a in s)o.NamedValue[o.NamedValue.itemcount++]={Name:a,Value:s[a]};const c={FilterBy:o};return this.Wuid&&void 0!==this.ResultName?(c.Wuid=this.Wuid,c.ResultName=this.ResultName):this.Wuid&&void 0!==this.ResultSequence?(c.Wuid=this.Wuid,c.Sequence=this.ResultSequence):this.LogicalFileName&&this.NodeGroup?(c.LogicalName=this.LogicalFileName,c.Cluster=this.NodeGroup):this.LogicalFileName&&(c.LogicalName=this.LogicalFileName),c.Start=e,c.Count=t,c.SuppressXmlSchema=n,c.BypassCachedResult=i,this.connection.WUResult(c,r).then(e=>e)}};t(bo,"Result");let Fo=bo;const Wo=class _ResultCache extends l{constructor(){super(e=>l.hash([e.Sequence,e.Name,e.Value,e.FileName]))}};t(Wo,"ResultCache");let vo=Wo;const To=class _Attribute extends h{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)}};t(To,"Attribute");let Ao=To;const wo=class _BaseScope extends h{_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(){const e=[],t={start:null,end:null};return this.Properties.Property.forEach(n=>{"ts"===n.Measure&&n.Name.indexOf("Started")>=0?t.start=n:this.ScopeName&&"ts"===n.Measure&&n.Name.indexOf("Finished")>=0?t.end=n:e.push(new Ao(this,n))}),t.start&&t.end?(t.start.FormattedEnd=t.end.Formatted,e.push(new Ao(this,t.start))):t.start?e.push(new Ao(this,t.start)):t.end&&e.push(new Ao(this,t.end)),e}constructor(e){super(),this.update(e)}update(e){this.set(e),this.CAttributes.forEach(e=>{this._attributeMap[e.Name]=e}),this.Properties.Property=[];for(const t in this._attributeMap)this._attributeMap.hasOwnProperty(t)&&this.Properties.Property.push(this._attributeMap[t].properties)}parentScope(){const 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(const t of this.children())if(t.walk(e))return!0;return e.end(this)}formattedAttrs(){const e={};for(const t in this._attributeMap)e[t]=this._attributeMap[t].Formatted||this._attributeMap[t].RawValue;return e}rawAttrs(){const e={};for(const t in this._attributeMap)e[t]=this._attributeMap[t].RawValue;return e}hasAttr(e){return void 0!==this._attributeMap[e]}attr(e){return this._attributeMap[e]||new Ao(this,{Creator:"",CreatorType:"",Formatted:"",Measure:"",Name:"",RawValue:""})}attrMeasure(e){return this._attributeMap[e].Measure}calcTooltip(e){let t="";const n=[];t=this.Id,n.push(`<tr><td class="key">ID:</td><td class="value">${this.Id}</td></tr>`),e&&n.push(`<tr><td class="key">Parent ID:</td><td class="value">${e.Id}</td></tr>`),n.push(`<tr><td class="key">Scope:</td><td class="value">${this.ScopeName}</td></tr>`);const s=this.formattedAttrs();for(const r in s)"Label"===r?t=s[r]:n.push(`<tr><td class="key">${r}</td><td class="value">${s[r]}</td></tr>`);return`<div class="eclwatch_WUGraph_Tooltip" style="max-width:480px">\n <h4 align="center">${t}</h4>\n <table>\n ${n.join("")}\n </table>\n </div>`}};t(wo,"BaseScope");let Po=wo;const xo=class _Scope extends Po{wu;constructor(e,t){super(t),this.wu=e}};t(xo,"Scope");let Lo=xo;const Eo=class _SourceFile extends h{connection;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get FileCluster(){return this.get("FileCluster")}get Name(){return this.get("Name")}get IsSuperFile(){return this.get("IsSuperFile")}get Subs(){return this.get("Subs")}get Count(){return this.get("Count")}get ECLSourceFiles(){return this.get("ECLSourceFiles")}constructor(e,t,n){super(),this.connection=e instanceof li?e:new li(e),this.set({Wuid:t,...n})}};t(Eo,"SourceFile");let Mo=Eo;const No=class _Timer extends h{connection;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get Name(){return this.get("Name")}get Value(){return this.get("Value")}get Seconds(){return this.get("Seconds")}get GraphName(){return this.get("GraphName")}get SubGraphId(){return this.get("SubGraphId")}get HasSubGraphId(){return this.get("HasSubGraphId")}get count(){return this.get("count")}get Timestamp(){return this.get("Timestamp")}get When(){return this.get("When")}constructor(e,t,n){super(),this.connection=e instanceof li?e:new li(e);const s=_(n.Value);this.set({Wuid:t,Seconds:Math.round(1e3*s)/1e3,HasSubGraphId:void 0!==n.SubGraphId,...n})}};t(No,"Timer");let Io=No;const jo=Zn("%Y-%m-%dT%H:%M:%S.%LZ"),ko=Kn("%Y-%m-%dT%H:%M:%S.%LZ"),Go=Ai(",");function Vo(e){return e&&!isNaN(+e)?Go(+e):e}t(Vo,"formatNum");const Qo="DefinitionList",Bo=/([a-zA-Z]:)?(.*[\\\/])(.*)(\((\d+),(\d+)\))/,Oo=["Avg","Min","Max","Delta","StdDev"],Xo=["SkewMin","SkewMax","NodeMin","NodeMax"],Ho=/[A-Z][a-z]*/g;function $o(e){for(const n of Xo){const t=e.indexOf(n);if(0===t){return{measure:"",ext:n,label:e.slice(t+n.length)}}}const t=e.match(Ho);if(t?.length){const e=t.shift();let n=t.join("");for(const t of Oo){const s=n.indexOf(t);if(0===s)return n=n.slice(s+t.length),{measure:e,ext:t,label:n}}return{measure:e,ext:"",label:n}}return{measure:"",ext:"",label:e}}t($o,"_splitMetric");const Jo={};function qo(e){let t=Jo[e];return t||(t=$o(e),Jo[e]=t),t}function Yo(e,t){return e.__formattedProps?.[t]??e[t]}function zo(e){if(void 0===e)return;const t=parseFloat(e);return isNaN(t)?void 0:t}function Zo(e,t,n){const s=qo(t);if(!n[s.measure]){n[s.label]=!0;const t=zo(e[`${s.measure}Avg${s.label}`]),r=zo(e[`${s.measure}Min${s.label}`]),i=zo(e[`${s.measure}Max${s.label}`]),o=zo(e[`${s.measure}StdDev${s.label}`]),c=Math.max((t-r)/o,(i-t)/o);return{Key:`${s.measure}${s.label}`,Value:Yo(e,`${s.measure}${s.label}`),Avg:Yo(e,`${s.measure}Avg${s.label}`),Min:Yo(e,`${s.measure}Min${s.label}`),Max:Yo(e,`${s.measure}Max${s.label}`),Delta:Yo(e,`${s.measure}Delta${s.label}`),StdDev:Yo(e,`${s.measure}StdDev${s.label}`),StdDevs:isNaN(c)?void 0:c,SkewMin:Yo(e,`SkewMin${s.label}`),SkewMax:Yo(e,`SkewMax${s.label}`),NodeMin:Yo(e,`NodeMin${s.label}`),NodeMax:Yo(e,`NodeMax${s.label}`)}}return null}t(qo,"splitMetric"),t(Yo,"formatValue"),t(zo,"safeParseFloat"),t(Zo,"formatValues");const Ko=n("workunit.ts"),ec=class _WorkunitCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}`)}};t(ec,"WorkunitCache");let tc=ec;const nc=new tc,sc=class _Workunit extends h{connection;topologyConnection;get BaseUrl(){return this.connection.baseUrl}_debugMode=!1;_debugAllGraph;_submitAction;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get Owner(){return this.get("Owner","")}get Cluster(){return this.get("Cluster","")}get Jobname(){return this.get("Jobname","")}get Description(){return this.get("Description","")}get ActionEx(){return this.get("ActionEx","")}get StateID(){return this.get("StateID",oi.Unknown)}get State(){return this.get("State")||oi[this.StateID]}get Protected(){return this.get("Protected",!1)}get Exceptions(){return this.get("Exceptions",{ECLException:[]})}get ResultViews(){return this.get("ResultViews",{View:[]})}_resultCache=new vo;get ResultCount(){return this.get("ResultCount",0)}get Results(){return this.get("Results",{ECLResult:[]})}get CResults(){return this.Results.ECLResult.map(e=>this._resultCache.get(e,()=>Fo.attach(this.connection,this.Wuid,e,this.ResultViews.View)))}get SequenceResults(){const e={};return this.CResults.forEach(t=>{e[t.Sequence]=t}),e}get Timers(){return this.get("Timers",{ECLTimer:[]})}get CTimers(){return this.Timers.ECLTimer.map(e=>new Io(this.connection,this.Wuid,e))}_graphCache=new Ii;get GraphCount(){return this.get("GraphCount",0)}get Graphs(){return this.get("Graphs",{ECLGraph:[]})}get CGraphs(){return this.Graphs.ECLGraph.map(e=>this._graphCache.get(e,()=>new Mi(this,e,this.CTimers)))}get ThorLogList(){return this.get("ThorLogList")}get ResourceURLCount(){return this.get("ResourceURLCount",0)}get ResourceURLs(){return this.get("ResourceURLs",{URL:[]})}get CResourceURLs(){return this.ResourceURLs.URL.map(e=>new io(this,e))}get TotalClusterTime(){return this.get("TotalClusterTime","")}get DateTimeScheduled(){return this.get("DateTimeScheduled")}get IsPausing(){return this.get("IsPausing")}get ThorLCR(){return this.get("ThorLCR")}get ApplicationValues(){return this.get("ApplicationValues",{ApplicationValue:[]})}get HasArchiveQuery(){return this.get("HasArchiveQuery")}get StateEx(){return this.get("StateEx")}get PriorityClass(){return this.get("PriorityClass")}get PriorityLevel(){return this.get("PriorityLevel")}get Snapshot(){return this.get("Snapshot")}get ResultLimit(){return this.get("ResultLimit")}get EventSchedule(){return this.get("EventSchedule")}get Query(){return this.get("Query")}get HelpersCount(){return this.get("HelpersCount",0)}get Helpers(){return this.get("Helpers",{ECLHelpFile:[]})}get DebugValues(){return this.get("DebugValues")}get AllowedClusters(){return this.get("AllowedClusters")}get ErrorCount(){return this.get("ErrorCount",0)}get WarningCount(){return this.get("WarningCount",0)}get InfoCount(){return this.get("InfoCount",0)}get AlertCount(){return this.get("AlertCount",0)}get SourceFileCount(){return this.get("SourceFileCount",0)}get SourceFiles(){return this.get("SourceFiles",{ECLSourceFile:[]})}get CSourceFiles(){return this.SourceFiles.ECLSourceFile.map(e=>new Mo(this.connection,this.Wuid,e))}get VariableCount(){return this.get("VariableCount",0)}get Variables(){return this.get("Variables",{ECLResult:[]})}get TimerCount(){return this.get("TimerCount",0)}get HasDebugValue(){return this.get("HasDebugValue")}get ApplicationValueCount(){return this.get("ApplicationValueCount",0)}get XmlParams(){return this.get("XmlParams")}get AccessFlag(){return this.get("AccessFlag")}get ClusterFlag(){return this.get("ClusterFlag")}get ResultViewCount(){return this.get("ResultViewCount",0)}get DebugValueCount(){return this.get("DebugValueCount",0)}get WorkflowCount(){return this.get("WorkflowCount",0)}get Archived(){return this.get("Archived")}get RoxieCluster(){return this.get("RoxieCluster")}get DebugState(){return this.get("DebugState",{})}get Queue(){return this.get("Queue")}get Active(){return this.get("Active")}get Action(){return this.get("Action")}get Scope(){return this.get("Scope")}get AbortBy(){return this.get("AbortBy")}get AbortTime(){return this.get("AbortTime")}get Workflows(){return this.get("Workflows")}get TimingData(){return this.get("TimingData")}get HelpersDesc(){return this.get("HelpersDesc")}get GraphsDesc(){return this.get("GraphsDesc")}get SourceFilesDesc(){return this.get("SourceFilesDesc")}get ResultsDesc(){return this.get("ResultsDesc")}get VariablesDesc(){return this.get("VariablesDesc")}get TimersDesc(){return this.get("TimersDesc")}get DebugValuesDesc(){return this.get("DebugValuesDesc")}get ApplicationValuesDesc(){return this.get("ApplicationValuesDesc")}get WorkflowsDesc(){return this.get("WorkflowsDesc")}get ServiceNames(){return this.get("ServiceNames")}get CompileCost(){return this.get("CompileCost")}get ExecuteCost(){return this.get("ExecuteCost")}get FileAccessCost(){return this.get("FileAccessCost")}get NoAccess(){return this.get("NoAccess")}get ECLWUProcessList(){return this.get("ECLWUProcessList")}get CostSavingPotential(){return this.get("CostSavingPotential")}static create(e){const t=new _Workunit(e);return t.connection.WUCreate().then(e=>(nc.set(t),t.set(e.Workunit),t))}static attach(e,t,n){const s=nc.get({BaseUrl:e.baseUrl,Wuid:t},()=>new _Workunit(e,t));return n&&s.set(n),s}static existsLocal(e,t){return nc.has({BaseUrl:e,Wuid:t})}static submit(e,t,n,s=!1){return _Workunit.create(e).then(e=>e.update({QueryText:n})).then(e=>s?e.submit(t,si.Action.Compile):e.submit(t))}static compile(e,t,n){return _Workunit.submit(e,t,n,!0)}static query(e,t){return new li(e).WUQuery(t).then(t=>t.Workunits.ECLWorkunit.map(function(t){return _Workunit.attach(e,t.Wuid,t)}))}constructor(e,t){super(),this.connection=new li(e),this.topologyConnection=new kr(e),this.clearState(t)}clearState(e){this.clear({Wuid:e,StateID:oi.Unknown})}update(e){return this.connection.WUUpdate({...e,Wuid:this.Wuid,StateOrig:this.StateID,JobnameOrig:this.Jobname,DescriptionOrig:this.Description,ProtectedOrig:this.Protected,ClusterOrig:this.Cluster}).then(e=>(this.set(e.Workunit),this))}submit(e,t=si.Action.Run,n){let s;return s=void 0!==e?Promise.resolve(e):this.topologyConnection.DefaultTpLogicalClusterQuery().then(e=>e.Name),this._debugMode=!1,t===si.Action.Debug&&(t=si.Action.Run,this._debugMode=!0),s.then(e=>this.connection.WUUpdate({Wuid:this.Wuid,Action:t,ResultLimit:n,DebugValues:{DebugValue:[{Name:"Debug",Value:this._debugMode?"1":""}]}}).then(n=>(this.set(n.Workunit),this._submitAction=t,this.connection.WUSubmit({Wuid:this.Wuid,Cluster:e})))).then(()=>this)}isComplete(){switch(this.StateID){case oi.Compiled:return"compile"===this.ActionEx||this._submitAction===si.Action.Compile;case oi.Completed:case oi.Failed:case oi.Aborted:case oi.NotFound:return!0}return!1}isFailed(){switch(this.StateID){case oi.Aborted:case oi.Failed:return!0}return!1}isDeleted(){return this.StateID===oi.NotFound}isDebugging(){switch(this.StateID){case oi.DebugPaused:case oi.DebugRunning:return!0}return this._debugMode}isRunning(){switch(this.StateID){case oi.Compiled:case oi.Running:case oi.Aborting:case oi.Blocked:case oi.DebugPaused:case oi.DebugRunning:return!0}return!1}setToFailed(){return this.WUAction(Gr.ECLWUActions.SetToFailed)}pause(){return this.WUAction(Gr.ECLWUActions.Pause)}pauseNow(){return this.WUAction(Gr.ECLWUActions.PauseNow)}resume(){return this.WUAction(Gr.ECLWUActions.Resume)}abort(){return this.WUAction(Gr.ECLWUActions.Abort)}protect(){return this.WUAction(Gr.ECLWUActions.Protect)}unprotect(){return this.WUAction(Gr.ECLWUActions.Unprotect)}delete(){return this.WUAction(Gr.ECLWUActions.Delete)}restore(){return this.WUAction(Gr.ECLWUActions.Restore)}deschedule(){return this.WUAction(Gr.ECLWUActions.Deschedule)}reschedule(){return this.WUAction(Gr.ECLWUActions.Reschedule)}resubmit(){return this.WUResubmit({CloneWorkunit:!1,ResetWorkflow:!1}).then(()=>(this.clearState(this.Wuid),this.refresh().then(()=>(this._monitor(),this))))}clone(){return this.WUResubmit({CloneWorkunit:!0,ResetWorkflow:!1}).then(e=>_Workunit.attach(this.connection.opts(),e.WUs.WU[0].WUID).refresh())}async refreshState(){return await this.WUQuery(),this.StateID!==oi.Compiled||this.ActionEx||this._submitAction||await this.refreshInfo(),this}async refreshInfo(e){return await this.WUInfo(e),this}async refreshDebug(){return await this.debugStatus(),this}async refresh(e=!1,t){return e?await Promise.all([this.refreshInfo(t),this.refreshDebug()]):await this.refreshState(),this}eclExceptions(){return this.Exceptions.ECLException}fetchArchive(){return this.connection.WUFileEx({Wuid:this.Wuid,Type:"ArchiveQuery"})}fetchECLExceptions(){return this.WUInfo({IncludeExceptions:!0}).then(()=>this.eclExceptions())}fetchResults(){return this.WUInfo({IncludeResults:!0}).then(()=>this.CResults)}fetchGraphs(){return this.WUInfo({IncludeGraphs:!0}).then(()=>this.CGraphs)}fetchQuery(){return this.WUInfo({IncludeECL:!0,TruncateEclTo64k:!1}).then(()=>this.Query)}fetchHelpers(){return this.WUInfo({IncludeHelpers:!0}).then(()=>this.Helpers?.ECLHelpFile||[])}fetchAllowedClusters(){return this.WUInfo({IncludeAllowedClusters:!0}).then(()=>this.AllowedClusters?.AllowedCluster||[])}fetchTotalClusterTime(){return this.WUInfo({IncludeTotalClusterTime:!0}).then(()=>this.TotalClusterTime)}fetchServiceNames(){return this.WUInfo({IncludeServiceNames:!0}).then(()=>this.ServiceNames?.Item)}fetchDetailsMeta(e={}){return this.WUDetailsMeta(e)}fetchDetailsRaw(e={}){return this.WUDetails(e).then(e=>e.Scopes.Scope)}normalizeDetails(e,t){const n={id:{Measure:"label"},name:{Measure:"label"},type:{Measure:"label"}},s=/* @__PURE__ */new Map;for(const o of e.Activities?.Activity??[])s.set(o.Kind,o.Name);const r=new Array(t.length);for(let o=0;o<t.length;o++){const e=t[o],c={},a={};if(e.Properties?.Property)for(const t of e.Properties.Property){const e=t.Measure,r=t.Name,i=t.RawValue;if("ns"===e&&(t.Measure="s"),"Kind"===r){const e=parseInt(i,10);t.Formatted=s.get(e)??i}switch(n[r]={Name:t.Name,Measure:t.Measure,Creator:t.Creator,CreatorType:t.CreatorType},t.Measure){case"bool":c[r]=!!+i;break;case"sz":case"ns":case"cnt":case"node":case"skw":c[r]=+i;break;case"s":c[r]=+i/1e9;break;case"ts":c[r]=new Date(+i/1e3).toISOString();break;case"cost":c[r]=+i/1e6;break;default:c[r]=i}a[r]=Vo(t.Formatted??c[r])}const u={id:e.Id,name:e.ScopeName,type:e.ScopeType,Kind:e.Kind,Label:e.Label,__formattedProps:a,__groupedProps:{},__groupedRawProps:{},__StdDevs:0,__StdDevsSource:"",...c},h=u[Qo];if(h)try{const e=JSON.parse(h.split("\\").join("\\\\")),t=[];for(let n=0;n<e.length;n++){const s=e[n].match(Bo);s&&t.push({filePath:(s[1]??"")+s[2]+s[3],line:parseInt(s[5],10),col:parseInt(s[6],10)})}u[Qo]=t}catch(i){Ko.error(`Unexpected "DefinitionList": ${h}`)}const l={};let p=0,d="";for(const t in u)if(!t.startsWith("__")){const e=Zo(u,t,l);e&&(u.__groupedProps[e.Key]=e,!isNaN(e.StdDevs)&&e.StdDevs>p&&(p=e.StdDevs,d=e.Key))}u.__StdDevs=p,u.__StdDevsSource=d,r[o]=u}return{meta:e,columns:n,data:r}}fetchDetailsNormalized(e={}){return Promise.all([this.fetchDetailsMeta(),this.fetchDetailsRaw(e)]).then(e=>this.normalizeDetails(e[0],e[1]))}fetchInfo(e={}){return this.WUInfo(e)}fetchDetails(e={}){return this.WUDetails(e).then(e=>e.Scopes.Scope.map(e=>new Lo(this,e)))}fetchDetailsHierarchy(e={}){return this.WUDetails(e).then(e=>{const t=[],n={};e.Scopes.Scope.forEach(e=>{if(n[e.ScopeName])return n[e.ScopeName].update(e),null;{const t=new Lo(this,e);return n[t.ScopeName]=t,t}});for(const s in n)if(n.hasOwnProperty(s)){const e=n[s],r=e.parentScope();r&&n[r]?n[r].children().push(e):t.push(e)}return t})}fetchGraphDetails(e=[],t){return this.fetchDetails({ScopeFilter:{MaxDepth:999999,Ids:e,ScopeTypes:t},NestedFilter:{Depth:999999,ScopeTypes:["graph","subgraph","activity","edge","function"]},PropertiesToReturn:{AllStatistics:!0,AllAttributes:!0,AllHints:!0,AllProperties:!0,AllScopes:!0},ScopeOptions:{IncludeId:!0,IncludeScope:!0,IncludeScopeType:!0},PropertyOptions:{IncludeName:!0,IncludeRawValue:!0,IncludeFormatted:!0,IncludeMeasure:!0,IncludeCreator:!1,IncludeCreatorType:!1}})}fetchScopeGraphs(e=[]){return this.fetchGraphDetails(e,["graph"]).then(e=>so(e))}fetchTimeElapsed(){return this.fetchDetails({ScopeFilter:{PropertyFilters:{PropertyFilter:[{Name:"TimeElapsed"}]}}}).then(e=>{const t={};e.forEach(e=>{t[e.ScopeName]=t[e.ScopeName]||{scope:e.ScopeName,start:null,elapsed:null,finish:null},e.CAttributes.forEach(n=>{"TimeElapsed"===n.Name?t[e.ScopeName].elapsed=+n.RawValue:"ts"===n.Measure&&n.Name.indexOf("Started")>=0&&(t[e.ScopeName].start=n.Formatted)})});const n=[];for(const s in t){const e=t[s];if(e.start&&e.elapsed){const t=ko(e.start);t.setMilliseconds(t.getMilliseconds()+e.elapsed/1e6),e.finish=jo(t),n.push(e)}}return n.sort((e,t)=>e.start<t.start?-1:e.start>t.start?1:0),n})}_monitor(){this.isComplete()?this._monitorTickCount=0:super._monitor()}_monitorTimeoutDuration(){const e=super._monitorTimeoutDuration();return this._monitorTickCount<=1?1e3:this._monitorTickCount<=3?3e3:this._monitorTickCount<=5?5e3:this._monitorTickCount<=7?1e4:e}on(e,t,n){if(this.isCallback(t))switch(e){case"completed":super.on("propChanged","StateID",e=>{this.isComplete()&&t([e])});break;case"changed":super.on(e,t)}else if("changed"===e)super.on(e,t,n);return this._monitor(),this}watchUntilComplete(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),this.isComplete()&&(s.release(),t(this))})})}watchUntilRunning(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),(this.isComplete()||this.isRunning())&&(s.release(),t(this))})})}WUQuery(e={}){return this.connection.WUQuery({...e,Wuid:this.Wuid}).then(e=>(0===e.Workunits.ECLWorkunit.length?(this.clearState(this.Wuid),this.set("StateID",oi.NotFound)):this.set(e.Workunits.ECLWorkunit[0]),e)).catch(e=>{if(!e.Exception.some(e=>20081===e.Code&&(this.clearState(this.Wuid),this.set("StateID",oi.NotFound),!0)))throw Ko.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}WUCreate(){return this.connection.WUCreate().then(e=>(this.set(e.Workunit),nc.set(this),e))}WUInfo(e={}){const t=e.IncludeResults||e.IncludeResultsViewNames;return this.connection.WUInfo({...e,Wuid:this.Wuid,IncludeResults:t,IncludeResultsViewNames:t,SuppressResultSchemas:!1}).then(e=>(this.set(e.Workunit),t&&this.set({ResultViews:e.ResultViews}),e)).catch(e=>{if(!e.Exception.some(e=>20080===e.Code&&(this.clearState(this.Wuid),this.set("StateID",oi.NotFound),!0)))throw Ko.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}WUResubmit(e){return this.connection.WUResubmit(U({},e,{Wuids:{Item:[this.Wuid]}}))}WUDetailsMeta(e){return this.connection.WUDetailsMeta(e)}WUDetails(e){return this.connection.WUDetails(U({ScopeFilter:{MaxDepth:9999},ScopeOptions:{IncludeMatchedScopesInResults:!0,IncludeScope:!0,IncludeId:!1,IncludeScopeType:!1},PropertyOptions:{IncludeName:!0,IncludeRawValue:!1,IncludeFormatted:!0,IncludeMeasure:!0,IncludeCreator:!1,IncludeCreatorType:!1}},e,{WUID:this.Wuid})).then(e=>U({Scopes:{Scope:[]}},e))}WUAction(e){return this.connection.WUAction({Wuids:{Item:[this.Wuid]},WUActionType:e}).then(e=>this.refresh().then(()=>(this._monitor(),e)))}publish(e){return this.connection.WUPublishWorkunit({Wuid:this.Wuid,Cluster:this.Cluster,JobName:e||this.Jobname,AllowForeignFiles:!0,Activate:Gr.WUQueryActivationMode.ActivateQuery,Wait:5e3})}publishEx(e){const t=new di({baseUrl:""}),n={Wuid:this.Wuid,Cluster:this.Cluster,JobName:this.Jobname,AllowForeignFiles:!0,Activate:1,Wait:5e3,...e};return t.WUPublishWorkunitEx(n)}WUCDebug(e,t={}){let n="";for(const s in t)t.hasOwnProperty(s)&&(n+=` ${s}='${t[s]}'`);return this.connection.WUCDebugEx({Wuid:this.Wuid,Command:`<debug:${e} uid='${this.Wuid}'${n}/>`}).then(e=>e)}debug(e,t){return this.isDebugging()?this.WUCDebug(e,t).then(t=>{const n=t.children(e);return n.length?n[0]:new y(e)}).catch(t=>(Ko.error(t),Promise.resolve(new y(e)))):Promise.resolve(new y(e))}debugStatus(){return this.isDebugging()?this.debug("status").then(e=>{const t={...this.DebugState,...e.$};return this.set({DebugState:t}),e}):Promise.resolve({DebugState:{state:"unknown"}})}debugContinue(e=""){return this.debug("continue",{mode:e})}debugStep(e){return this.debug("step",{mode:e})}debugPause(){return this.debug("interrupt")}debugQuit(){return this.debug("quit")}debugDeleteAllBreakpoints(){return this.debug("delete",{idx:0})}debugBreakpointResponseParser(e){return e.children().map(e=>{if("break"===e.name)return e.$})}debugBreakpointAdd(e,t,n){return this.debug("breakpoint",{id:e,mode:t,action:n}).then(e=>this.debugBreakpointResponseParser(e))}debugBreakpointList(){return this.debug("list").then(e=>this.debugBreakpointResponseParser(e))}debugGraph(){return this._debugAllGraph&&this.DebugState._prevGraphSequenceNum===this.DebugState.graphSequenceNum?Promise.resolve(this._debugAllGraph):this.debug("graph",{name:"all"}).then(e=>(this.DebugState._prevGraphSequenceNum=this.DebugState.graphSequenceNum,this._debugAllGraph=Ji(this.Wuid,e),this._debugAllGraph))}debugBreakpointValid(e){return this.debugGraph().then(t=>ac(t,e))}debugPrint(e,t=0,n=10){return this.debug("print",{edgeID:e,startRow:t,numRows:n}).then(e=>e.children().map(e=>{const t={};return e.children().forEach(e=>{t[e.name]=e.content}),t}))}};t(sc,"Workunit");let rc=sc;const ic="definition";function oc(e){return void 0!==e._[ic]}function cc(e){const t=/([a-z]:\\(?:[-\w\.\d]+\\)*(?:[-\w\.\d]+)?|(?:\/[\w\.\-]+)+)\((\d*),(\d*)\)/.exec(e._[ic]);if(t){const[,n,s,r]=t;return n.replace(/\/\.\//g,"/"),{id:e._.id,file:n,line:+s,column:+r}}throw new Error(`Bad definition: ${e._[ic]}`)}function ac(e,t){const n=[];for(const s of e.vertices)if(oc(s)){const e=cc(s);(e&&!t||t===e.file)&&n.push(e)}return n.sort((e,t)=>e.line-t.line)}let uc;t(oc,"hasECLDefinition"),t(cc,"getECLDefinition"),t(ac,"breakpointLocations");const hc=class _Activity extends h{connection;get properties(){return this.get()}get Exceptions(){return this.get("Exceptions")}get Build(){return this.get("Build")}get ThorClusterList(){return this.get("ThorClusterList")}get RoxieClusterList(){return this.get("RoxieClusterList")}get HThorClusterList(){return this.get("HThorClusterList")}get DFUJobs(){return this.get("DFUJobs")}get Running(){return this.get("Running",{ActiveWorkunit:[]})}get BannerContent(){return this.get("BannerContent")}get BannerColor(){return this.get("BannerColor")}get BannerSize(){return this.get("BannerSize")}get BannerScroll(){return this.get("BannerScroll")}get ChatURL(){return this.get("ChatURL")}get ShowBanner(){return this.get("ShowBanner")}get ShowChatURL(){return this.get("ShowChatURL")}get SortBy(){return this.get("SortBy")}get Descending(){return this.get("Descending")}get SuperUser(){return this.get("SuperUser")}get AccessRight(){return this.get("AccessRight")}get ServerJobQueues(){return this.get("ServerJobQueues")}get ActivityTime(){return this.get("ActivityTime")}get DaliDetached(){return this.get("DaliDetached")}static attach(e,t){return uc||(uc=new _Activity(e)),t&&uc.set(t),uc}constructor(e){super(),this.connection=e instanceof vr?e:new vr(e),this.clear({})}runningWorkunits(e=""){return this.Running.ActiveWorkunit.filter(t=>""===e||t.ClusterName===e).map(e=>rc.attach(this.connection.connectionOptions(),e.Wuid,e))}setBanner(e){return this.connection.SetBanner({...e}).then(e=>(this.set(e),this))}lazyRefresh=C(async()=>{const e=await this.connection.Activity({});return this.set(e),this});async refresh(){return this.lazyRefresh()}};t(hc,"Activity");let lc=hc;const pc=n("logicalFile.ts"),dc=class _LogicalFileCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Cluster}-${e.Name}`)}};t(dc,"LogicalFileCache");let gc=dc;const mc=new gc,Sc=class _LogicalFile extends h{connection;get BaseUrl(){return this.connection.baseUrl}get Cluster(){return this.get("Cluster")}get Name(){return this.get("Name")}get Filename(){return this.get("Filename")}get Prefix(){return this.get("Prefix")}get NodeGroup(){return this.get("NodeGroup")}get NumParts(){return this.get("NumParts")}get Description(){return this.get("Description")}get Dir(){return this.get("Dir")}get PathMask(){return this.get("PathMask")}get Filesize(){return this.get("Filesize")}get FileSizeInt64(){return this.get("FileSizeInt64")}get RecordSize(){return this.get("RecordSize")}get RecordCount(){return this.get("RecordCount")}get RecordSizeInt64(){return this.get("RecordSizeInt64")}get RecordCountInt64(){return this.get("RecordCountInt64")}get Wuid(){return this.get("Wuid")}get Owner(){return this.get("Owner")}get JobName(){return this.get("JobName")}get Persistent(){return this.get("Persistent")}get Format(){return this.get("Format")}get MaxRecordSize(){return this.get("MaxRecordSize")}get CsvSeparate(){return this.get("CsvSeparate")}get CsvQuote(){return this.get("CsvQuote")}get CsvTerminate(){return this.get("CsvTerminate")}get CsvEscape(){return this.get("CsvEscape")}get Modified(){return this.get("Modified")}get Ecl(){return this.get("Ecl")}get Stat(){return this.get("Stat")}get DFUFilePartsOnClusters(){return this.get("DFUFilePartsOnClusters")}get isSuperfile(){return this.get("isSuperfile")}get ShowFileContent(){return this.get("ShowFileContent")}get subfiles(){return this.get("subfiles")}get Superfiles(){return this.get("Superfiles")}get ProtectList(){return this.get("ProtectList")}get FromRoxieCluster(){return this.get("FromRoxieCluster")}get Graphs(){return this.get("Graphs")}get UserPermission(){return this.get("UserPermission")}get ContentType(){return this.get("ContentType")}get CompressedFileSize(){return this.get("CompressedFileSize")}get PercentCompressed(){return this.get("PercentCompressed")}get IsCompressed(){return this.get("IsCompressed")}get BrowseData(){return this.get("BrowseData")}get jsonInfo(){return this.get("jsonInfo")}get binInfo(){return this.get("binInfo")}get PackageID(){return this.get("PackageID")}get Partition(){return this.get("Partition")}get Blooms(){return this.get("Blooms")}get ExpireDays(){return this.get("ExpireDays")}get KeyType(){return this.get("KeyType")}get IsRestricted(){return this.get("IsRestricted")}get AtRestCost(){return this.get("AtRestCost")}get AccessCost(){return this.get("AccessCost")}get StateID(){return this.get("StateID")}get ExpirationDate(){return this.get("ExpirationDate")}get ExtendedIndexInfo(){return this.get("ExtendedIndexInfo")}get CompressionType(){return this.get("CompressionType")}get properties(){return this.get()}static attach(e,t,n,s){const r=mc.get({BaseUrl:e.baseUrl,Cluster:t,Name:n},()=>new _LogicalFile(e,t,n));return s&&r.set(s),r}constructor(e,t,n){super(),this.connection=e instanceof ot?e:new ot(e),this.clear({Cluster:t,Name:n})}filePartsOnCluster(){return[...this.DFUFilePartsOnClusters?.DFUFilePartsOnCluster||[]]}fileParts(){const e=[];for(const t of this.DFUFilePartsOnClusters?.DFUFilePartsOnCluster||[])for(const n of t?.DFUFileParts?.DFUPart||[]){const s={...t,...n};delete s.DFUFileParts,e.push(s)}return e}update(e){return this.connection.DFUInfo({...e,Cluster:this.Cluster,Name:this.Name}).then(e=>(this.set({Cluster:this.Cluster,...e.FileDetail}),e))}fetchInfo(){return this.connection.DFUInfo({Cluster:this.Cluster,Name:this.Name}).then(e=>(this.set({Cluster:this.Cluster,...e.FileDetail,ProtectList:e?.FileDetail?.ProtectList??{DFUFileProtect:[]}}),e.FileDetail)).catch(e=>{if(!e.Exception.some(e=>20038===e.Code&&(this.set("Name",this.Name+" (Deleted)"),this.set("StateID",999),!0)))throw pc.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}fetchDefFile(e){return this.connection.DFUFile({Name:this.Name,Format:e})}fetchAllLogicalFiles(){return this.connection.recursiveFetchLogicalFiles([this])}fetchListHistory(){return this.connection.ListHistory({Name:this.Name}).then(e=>e?.History?.Origin||[])}eraseHistory(){return this.connection.EraseHistory({Name:this.Name}).then(e=>e?.History?.Origin||[])}};t(Sc,"LogicalFile");let fc=Sc;const _c=class _MachineCache extends l{constructor(){super(e=>e.Address)}};t(_c,"MachineCache");let Uc=_c;const yc=new Uc,Cc=class _Machine extends h{connection;get Address(){return this.get("Address")}get ConfigAddress(){return this.get("ConfigAddress")}get Name(){return this.get("Name")}get ProcessType(){return this.get("ProcessType")}get DisplayType(){return this.get("DisplayType")}get Description(){return this.get("Description")}get AgentVersion(){return this.get("AgentVersion")}get Contact(){return this.get("Contact")}get Location(){return this.get("Location")}get UpTime(){return this.get("UpTime")}get ComponentName(){return this.get("ComponentName")}get ComponentPath(){return this.get("ComponentPath")}get RoxieState(){return this.get("RoxieState")}get RoxieStateDetails(){return this.get("RoxieStateDetails")}get OS(){return this.get("OS")}get ProcessNumber(){return this.get("ProcessNumber")}get Channels(){return this.get("Channels")}get Processors(){return this.get("Processors")}get Storage(){return this.get("Storage")}get Running(){return this.get("Running")}get PhysicalMemory(){return this.get("PhysicalMemory")}get VirtualMemory(){return this.get("VirtualMemory")}get ComponentInfo(){return this.get("ComponentInfo")}get Exception(){return this.get("Exception")}static attach(e,t,n){const s=yc.get({Address:t},()=>new _Machine(e));return n&&s.set(n),s}constructor(e){super(),this.connection=e instanceof rn?e:new rn(e)}};t(Cc,"Machine");let Rc=Cc;const Dc=class _TargetClusterCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Name}`)}};t(Dc,"TargetClusterCache");let bc=Dc;const Fc=new bc,Wc=class _TargetCluster extends h{connection;machineConnection;get BaseUrl(){return this.connection.baseUrl}get Name(){return this.get("Name")}get Prefix(){return this.get("Prefix")}get Type(){return this.get("Type")}get IsDefault(){return this.get("IsDefault")}get TpClusters(){return this.get("TpClusters")}get TpEclCCServers(){return this.get("TpEclCCServers")}get TpEclServers(){return this.get("TpEclServers")}get TpEclAgents(){return this.get("TpEclAgents")}get TpEclSchedulers(){return this.get("TpEclSchedulers")}get MachineInfoEx(){return this.get("MachineInfoEx",[])}get CMachineInfoEx(){return this.MachineInfoEx.map(e=>Rc.attach(this.machineConnection,e.Address,e))}static attach(e,t,n){const s=Fc.get({BaseUrl:e.baseUrl,Name:t},()=>new _TargetCluster(e,t));return n&&s.set(n),s}constructor(e,t){super(),e instanceof kr?(this.connection=e,this.machineConnection=new rn(e.connectionOptions())):(this.connection=new kr(e),this.machineConnection=new rn(e)),this.clear({Name:t})}fetchMachines(e={}){return this.machineConnection.GetTargetClusterInfo({TargetClusters:{Item:[`${this.Type}:${this.Name}`]},...e}).then(e=>{const t=[];for(const n of e.TargetClusterInfoList.TargetClusterInfo)for(const e of n.Processes.MachineInfoEx)t.push(e);return this.set("MachineInfoEx",t),this.CMachineInfoEx})}machineStats(){let e=0,t=0,n=0;for(const s of this.CMachineInfoEx)for(const r of s.Storage.StorageInfo){t+=r.Available,n+=r.Total;const s=1-r.Available/r.Total;s>e&&(e=s)}return{maxDisk:e,meanDisk:1-(n?t/n:1)}}fetchUsage(){return this.machineConnection.GetTargetClusterUsageEx([this.Name])}};t(Wc,"TargetCluster");let vc=Wc;function Tc(e){let t;return t=e instanceof kr?e:new kr(e),t.TpListTargetClusters({}).then(t=>t.TargetClusters.TpClusterNameType.map(t=>vc.attach(e,t.Name,t)))}t(Tc,"targetClusters");const Ac={};function wc(e){if(!Ac[e.baseUrl]){let t;t=e instanceof kr?e:new kr(e),Ac[e.baseUrl]=t.TpListTargetClusters({}).then(t=>{let n,s,r;t.TargetClusters.TpClusterNameType.forEach(e=>{n||(n=e),s||!0!==e.IsDefault||(s=e),r||"hthor"!==e.Type||(r=e)});const i=s||r||n;return vc.attach(e,i.Name,i)})}return Ac[e.baseUrl]}t(wc,"defaultTargetCluster");const Pc=class _TopologyCache extends l{constructor(){super(e=>e.BaseUrl)}};t(Pc,"TopologyCache");let xc=Pc;const Lc=new xc,Ec=class _Topology extends h{connection;get BaseUrl(){return this.connection.baseUrl}get properties(){return this.get()}get TargetClusters(){return this.get("TargetClusters")}get CTargetClusters(){return this.TargetClusters.map(e=>vc.attach(this.connection,e.Name,e))}get LogicalClusters(){return this.get("LogicalClusters")}get Services(){return this.get("Services")}static attach(e,t){const n=Lc.get({BaseUrl:e.baseUrl},()=>new _Topology(e));return t&&n.set(t),n}constructor(e){super(),this.connection=e instanceof kr?e:new kr(e)}GetESPServiceBaseURL(e=""){return this.connection.TpServiceQuery({}).then(t=>{const n=this.connection.protocol(),s=this.connection.ip();let r="https:"===n?"18002":"8002";if(c("ServiceList.TpEspServers.TpEspServer",t))for(const i of t.ServiceList.TpEspServers.TpEspServer)if(c("TpBindings.TpBinding",i))for(const t of i.TpBindings.TpBinding)t.Service===e&&t.Protocol+":"===n&&(r=t.Port);return`${n}//${s}:${r}/`})}fetchTargetClusters(){return this.connection.TpTargetClusterQuery({Type:"ROOT"}).then(e=>(this.set({TargetClusters:e.TpTargetClusters?.TpTargetCluster??[]}),this.CTargetClusters))}fetchLogicalClusters(e={}){return this.connection.TpLogicalClusterQuery(e).then(e=>(this.set({LogicalClusters:e.TpLogicalClusters.TpLogicalCluster}),this.LogicalClusters))}fetchServices(e={}){return this.connection.TpServiceQuery(e).then(e=>(this.set({Services:e.ServiceList}),this.Services))}_prevRefresh;refresh(e=!1){return this._prevRefresh&&!e||(this._prevRefresh=Promise.all([this.fetchTargetClusters(),this.fetchLogicalClusters(),this.fetchServices()]).then(()=>this)),this._prevRefresh}on(e,t,n){if(this.isCallback(t)){if("changed"===e)super.on(e,t)}else if("changed"===e)super.on(e,t,n);return this._monitor(),this}};t(Ec,"Topology");let Mc=Ec;function Nc(e,t,n){"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&(e[t]=n)}function Ic(e){return(e=""+e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"&#10;").replace(/\r/g,"&#13;")}function jc(e){if(!e)return 0;if(!isNaN(+e))return parseFloat(e);const t=/(?:(?:(\d+).days.)?(?:(\d+)h)?(?:(\d+)m)?(?:(\d+\.\d+|\d+)s))|(?:(\d+\.\d+|\d+)ms|(\d+\.\d+|\d+)us|(\d+\.\d+|\d+)ns)/.exec(e);if(!t)return 0;return 24*(+t[1]||0)*60*60+60*(+t[2]||0)*60+60*(+t[3]||0)+(+t[4]||0)+(+t[5]||0)/1e3+(+t[6]||0)/1e6+(+t[7]||0)/1e9}function kc(e,t){const n=e.indexOf(t);return-1!==n?parseFloat(e.substring(0,n)):-1}function Gc(e){if(!e)return 0;if(!isNaN(+e))return parseFloat(e);let t=kc(e,"Kb");return t>=0?1024*t:(t=kc(e,"Mb"),t>=0?t*Math.pow(1024,2):(t=kc(e,"Gb"),t>=0?t*Math.pow(1024,3):(t=kc(e,"Tb"),t>=0?t*Math.pow(1024,4):(t=kc(e,"Pb"),t>=0?t*Math.pow(1024,5):(t=kc(e,"Eb"),t>=0?t*Math.pow(1024,6):(t=kc(e,"Zb"),t>=0?t*Math.pow(1024,7):(t=kc(e,"b"),t>=0?t:0)))))))}function Vc(e){return e?parseFloat(e):0}t(Nc,"safeAssign"),t(Ic,"xmlEncode"),t(jc,"espTime2Seconds"),t(kc,"unitTest"),t(Gc,"espSize2Bytes"),t(Vc,"espSkew2Number");const Qc=class _LocalisedXGMMLWriter{graph;m_xgmml;m_visibleSubgraphs;m_visibleVertices;m_semiVisibleVertices;m_visibleEdges;noSpills;constructor(e){this.graph=e,this.m_xgmml="",this.m_visibleSubgraphs={},this.m_visibleVertices={},this.m_semiVisibleVertices={},this.m_visibleEdges={}}calcVisibility(e,t,n,s){this.noSpills=s,e.forEach(e=>{this.graph.isVertex(e)?(this.calcInVertexVisibility(e,n),this.calcOutVertexVisibility(e,n)):this.graph.isEdge(e)?(this.calcInVertexVisibility(e.getSource(),n-1),this.calcOutVertexVisibility(e.getTarget(),n-1)):this.graph.isSubgraph(e)&&(this.m_visibleSubgraphs[e.__hpcc_id]=e,this.calcSubgraphVisibility(e,t-1))}),this.calcVisibility2()}calcInVertexVisibility(e,t){this.noSpills&&e.isSpill()&&t++,this.m_visibleVertices[e.__hpcc_id]=e,t>0&&e.getInEdges().forEach(e=>{this.calcInVertexVisibility(e.getSource(),t-1)})}calcOutVertexVisibility(e,t){this.noSpills&&e.isSpill()&&t++,this.m_visibleVertices[e.__hpcc_id]=e,t>0&&e.getOutEdges().forEach(e=>{this.calcOutVertexVisibility(e.getTarget(),t-1)})}calcSubgraphVisibility(e,t){if(t<0)return;t>0&&e.__hpcc_subgraphs.forEach((e,n)=>{this.calcSubgraphVisibility(e,t-1)}),e.__hpcc_subgraphs.forEach((e,t)=>{this.m_visibleSubgraphs[e.__hpcc_id]=e}),e.__hpcc_vertices.forEach((e,t)=>{this.m_visibleVertices[e.__hpcc_id]=e});const n={};this.graph.edges.forEach((t,s)=>{t.getSource().__hpcc_parent!==t.getTarget().__hpcc_parent&&e===this.getCommonAncestor(t)&&(n[t.getSource().__hpcc_parent.__hpcc_id+"::"+t.getTarget().__hpcc_parent.__hpcc_id]||(n[t.getSource().__hpcc_parent.__hpcc_id+"::"+t.getTarget().__hpcc_parent.__hpcc_id]=!0,this.m_visibleEdges[t.__hpcc_id]=t))})}buildVertexString(e,t){let n="",s="";const r=e.getProperties();for(const i in r)t&&i.indexOf("_kind")>=0?s+='<att name="_kind" value="point"/>':"id"===i||"label"===i?n+=" "+i+'="'+Ic(r[i])+'"':s+='<att name="'+i+'" value="'+Ic(r[i])+'"/>';return"<node"+n+">"+s+"</node>"}buildEdgeString(e){let t="",n="";const s=e.getProperties();for(const r in s)"id"===r.toLowerCase()||"label"===r.toLowerCase()||"source"===r.toLowerCase()||"target"===r.toLowerCase()?t+=" "+r+'="'+Ic(s[r])+'"':n+='<att name="'+r+'" value="'+Ic(s[r])+'"/>';return"<edge"+t+">"+n+"</edge>"}getAncestors(e,t){let n=e.__hpcc_parent;for(;n;)t.push(n),n=n.__hpcc_parent}getCommonAncestorV(e,t){const n=[],s=[];this.getAncestors(e,n),this.getAncestors(t,s);let r=n.length-1,i=s.length-1,o=null;for(;r>=0&&i>=0&&n[r]===s[i];)o=n[r],--r,--i;return o}getCommonAncestor(e){return this.getCommonAncestorV(e.getSource(),e.getTarget())}calcAncestorVisibility(e){const t=[];this.getAncestors(e,t),t.forEach((e,t)=>{this.m_visibleSubgraphs[e.__hpcc_id]=e})}calcVisibility2(){for(const e in this.m_visibleVertices){const t=this.m_visibleVertices[e];t.getInEdges().forEach((e,t)=>{this.m_visibleEdges[e.__hpcc_id]=e}),t.getOutEdges().forEach((e,t)=>{this.m_visibleEdges[e.__hpcc_id]=e}),this.calcAncestorVisibility(t)}this.calcSemiVisibleVertices()}addSemiVisibleEdge(e){e&&!this.m_visibleEdges[e.__hpcc_id]&&(this.m_visibleEdges[e.__hpcc_id]=e)}addSemiVisibleVertex(e){this.m_visibleVertices[e.__hpcc_id]||(this.m_semiVisibleVertices[e.__hpcc_id]=e,this.calcAncestorVisibility(e))}calcSemiVisibleVertices(){for(const e in this.m_visibleEdges){const t=this.m_visibleEdges[e];let n=t.getSource();for(this.addSemiVisibleVertex(n);this.noSpills&&n.isSpill();){const e=n.getInEdges();if(!e.length)break;this.addSemiVisibleEdge(e[0]),n=e[0].getSource(),this.addSemiVisibleVertex(n)}let s=t.getTarget();for(this.addSemiVisibleVertex(s);this.noSpills&&s.isSpill();){const e=s.getOutEdges();if(!e.length)break;this.addSemiVisibleEdge(e[0]),s=e[0].getTarget(),this.addSemiVisibleVertex(s)}}}writeXgmml(){this.subgraphVisited(this.graph.subgraphs[0],!0),this.graph.edges.forEach((e,t)=>{this.edgeVisited(e)})}subgraphVisited(e,t=!1){if(this.m_visibleSubgraphs[e.__hpcc_id]){let n="";this.m_xgmml+=t?"":'<node id="'+e.__hpcc_id+'"><att><graph>';const s=this.m_xgmml.length;if(e.walkSubgraphs(this),e.walkVertices(this),s===this.m_xgmml.length){const t=e.__hpcc_vertices[0];t&&(this.m_xgmml+=this.buildVertexString(t,!0))}const r=e.getProperties();for(const e in r)n+='<att name="'+e+'" value="'+Ic(r[e])+'"/>';this.m_xgmml+=t?"":"</graph></att>"+n+"</node>"}return!1}vertexVisited(e){this.m_visibleVertices[e.__hpcc_id]?this.m_xgmml+=this.buildVertexString(e,!1):this.m_semiVisibleVertices[e.__hpcc_id]&&(this.m_xgmml+=this.buildVertexString(e,!0))}edgeVisited(e){this.m_visibleEdges[e.__hpcc_id]&&(this.m_xgmml+=this.buildEdgeString(e))}};t(Qc,"LocalisedXGMMLWriter");let Bc=Qc;const Oc=class _GraphItem{__hpcc_graph;__hpcc_parent;__widget;__hpcc_id;_globalID;constructor(e,t){this.__hpcc_graph=e,this.__hpcc_id=t,this._globalID=t}getProperties(){const e={};for(const t in this)0!==t.indexOf("__")&&this.hasOwnProperty(t)&&(e[t]=this[t]);return e}};t(Oc,"GraphItem");let Xc=Oc;const Hc=class _Subgraph extends Xc{_globalType;__hpcc_subgraphs;__hpcc_vertices;__hpcc_edges;id;constructor(e,t){super(e,t),this._globalType="0"===t?"Graph":"Cluster",this.__hpcc_subgraphs=[],this.__hpcc_vertices=[],this.__hpcc_edges=[],this.id=t}addSubgraph(e){e.__hpcc_parent=this,this.__hpcc_subgraphs.some(t=>e===t)||this.__hpcc_subgraphs.push(e)}addVertex(e){e.__hpcc_parent=this,this.__hpcc_vertices.some(t=>e===t)||this.__hpcc_vertices.push(e)}removeVertex(e){this.__hpcc_vertices=this.__hpcc_vertices.filter(t=>e!==t)}addEdge(e){e.__hpcc_parent=this,this.__hpcc_edges.some(t=>e===t)||this.__hpcc_edges.push(e)}removeEdge(e){this.__hpcc_edges=this.__hpcc_edges.filter(t=>e!==t)}remove(){this.__hpcc_subgraphs.forEach(e=>e.__hpcc_parent=this.__hpcc_parent),this.__hpcc_vertices.forEach(e=>e.__hpcc_parent=this.__hpcc_parent),this.__hpcc_edges.forEach(e=>e.__hpcc_parent=this.__hpcc_parent),delete this.__hpcc_parent,this.__hpcc_graph.removeItem(this)}walkSubgraphs(e){this.__hpcc_subgraphs.forEach((t,n)=>{e.subgraphVisited(t)&&t.walkSubgraphs(e)})}walkVertices(e){this.__hpcc_vertices.forEach((t,n)=>{e.vertexVisited(t)})}};t(Hc,"Subgraph");let $c=Hc;const Jc=class _Vertex extends Xc{_globalType="Vertex";_isSpill;constructor(e,t){super(e,t)}isSpill(){return this._isSpill}remove(){const e=this.getInVertices();e.length<=1&&console.warn(this.__hpcc_id+": remove only supports single or zero inputs activities..."),this.getInEdges().forEach(e=>{e.remove()}),this.getOutEdges().forEach(t=>{t.setSource(e[0])}),this.__hpcc_parent?.removeVertex(this),this.__hpcc_graph.removeItem(this)}getInVertices(){return this.getInEdges().map(e=>e.getSource())}getInEdges(){return this.__hpcc_graph.edges.filter(e=>e.getTarget()===this)}getOutVertices(){return this.getOutEdges().map(e=>e.getTarget())}getOutEdges(){return this.__hpcc_graph.edges.filter(e=>e.getSource()===this)}};t(Jc,"Vertex");let qc=Jc;const Yc=class _Edge extends Xc{_globalType="Edge";_sourceActivity;source;_targetActivity;target;constructor(e,t){super(e,t),this._globalType="Edge"}remove(){this.__hpcc_graph.subgraphs.forEach(e=>{e.removeEdge(this)}),this.__hpcc_graph.removeItem(this)}getSource(){return this.__hpcc_graph.idx[this._sourceActivity||this.source]}setSource(e){this._sourceActivity?this._sourceActivity=e.__hpcc_id:this.source&&(this.source=e.__hpcc_id),this.__widget&&this.__widget.setSource(this.getSource().__widget)}getTarget(){return this.__hpcc_graph.idx[this._targetActivity||this.target]}};t(Yc,"Edge");let zc=Yc;const Zc=class _QueryGraph{idx={};subgraphs=[];vertices=[];edges=[];xgmml="";constructor(){this.clear()}clear(){this.xgmml="",this.idx={},this.subgraphs=[],this.vertices=[],this.edges=[]}load(e){this.clear(),this.merge(e)}merge(e){this.xgmml=e;const t=(new DOMParser).parseFromString(e,"text/xml");this.walkDocument(t.documentElement,"0")}isSubgraph(e){return e instanceof $c}isVertex(e){return e instanceof qc}isEdge(e){return e instanceof zc}getGlobalType(e){return e instanceof qc?3:e instanceof zc?4:e instanceof $c?2:e instanceof _QueryGraph?1:0}getGlobalTypeString(e){return e instanceof qc?"Vertex":e instanceof zc?"Edge":e instanceof $c?"Cluster":e instanceof _QueryGraph?"Graph":"Unknown"}getItem(e,t){if(!this.idx[t])switch(e.tagName){case"graph":const e=new $c(this,t);this.subgraphs.push(e),this.idx[t]=e;break;case"node":const n=new qc(this,t);this.vertices.push(n),this.idx[t]=n;break;case"edge":const s=new zc(this,t);this.edges.push(s),this.idx[t]=s;break;default:console.warn("Graph.getItem - Unknown Node Type!")}const n=this.idx[t];return Array.from(e.attributes).forEach(e=>{Nc(n,e.name,e.value)}),n}removeItem(e){delete this.idx[e.__hpcc_id],e instanceof $c?this.subgraphs=this.subgraphs.filter(t=>e!==t):e instanceof qc?this.vertices=this.vertices.filter(t=>e!==t):e instanceof zc&&(this.edges=this.edges.filter(t=>e!==t))}getChildByTagName(e,t){let n=null;return Array.from(e.childNodes).some(e=>{if(e.tagName===t)return n=e,!0}),n}walkDocument(e,t){const n=this.getItem(e,t);return e.childNodes.forEach(e=>{if(1===e.nodeType)switch(e.tagName){case"graph":break;case"node":let t=!1;const s=this.getChildByTagName(e,"att");if(s){const r=this.getChildByTagName(s,"graph");if(r){t=!0;const s=this.walkDocument(r,e.getAttribute("id"));n.addSubgraph(s)}}if(!t){const t=this.walkDocument(e,e.getAttribute("id"));n.addVertex(t)}break;case"att":const r=e.getAttribute("name"),i="_"+r,o=e.getAttribute("value");0===r.indexOf("Time")?(Nc(n,i,o),Nc(n,r,""+jc(o))):0===r.indexOf("Size")?(Nc(n,i,o),Nc(n,r,""+Gc(o))):0===r.indexOf("Skew")?(Nc(n,i,o),Nc(n,r,""+Vc(o))):Nc(n,r,o);break;case"edge":const c=this.walkDocument(e,e.getAttribute("id"));if(void 0!==c.NumRowsProcessed?c._eclwatchCount=c.NumRowsProcessed.replace(/\B(?=(\d{3})+(?!\d))/g,","):void 0!==c.Count?c._eclwatchCount=c.Count.replace(/\B(?=(\d{3})+(?!\d))/g,","):void 0!==c.count&&(c._eclwatchCount=c.count.replace(/\B(?=(\d{3})+(?!\d))/g,",")),c.inputProgress&&(c._eclwatchInputProgress="["+c.inputProgress.replace(/\B(?=(\d{3})+(?!\d))/g,",")+"]"),c.SkewMaxRowsProcessed&&c.SkewMinRowsProcessed&&(c._eclwatchSkew="+"+c.SkewMaxRowsProcessed+", "+c.SkewMinRowsProcessed),c._dependsOn);else if(c._childGraph);else if(c._sourceActivity||c._targetActivity){c._isSpill=!0;const e=c.getSource();e&&(e._isSpill=!0);const t=c.getTarget();t&&(t._isSpill=!0)}n.addEdge(c)}}),n}removeSubgraphs(){[...this.subgraphs].forEach(e=>{e.__hpcc_parent instanceof $c&&e.remove()})}removeSpillVertices(){[...this.vertices].forEach(e=>{e.isSpill()&&e.remove()})}getLocalisedXGMML(e,t,n,s){const r=new Bc(this);return r.calcVisibility(e,t,n,s),r.writeXgmml(),"<graph>"+r.m_xgmml+"</graph>"}};t(Zc,"QueryGraph");let Kc=Zc;const ea=n("@hpcc-js/comms/ecl/query.ts"),ta=Ai("~s");function na(e){return!isNaN(parseFloat(e))&&!isNaN(e-0)}t(na,"isNumber");const sa=class _QueryCache extends l{constructor(){super(e=>l.hash([e.QueryId,e.QuerySet]))}};t(sa,"QueryCache");const ra=new sa,ia=class _Query extends h{wsWorkunitsService;get BaseUrl(){return this.wsWorkunitsService.baseUrl}topology;_requestSchema;_responseSchema;get properties(){return this.get()}get Exceptions(){return this.get("Exceptions")}get QueryId(){return this.get("QueryId")}get QuerySet(){return this.get("QuerySet")}get QueryName(){return this.get("QueryName")}get Wuid(){return this.get("Wuid")}get Dll(){return this.get("Dll")}get Suspended(){return this.get("Suspended")}get Activated(){return this.get("Activated")}get SuspendedBy(){return this.get("SuspendedBy")}get Clusters(){return this.get("Clusters")}get PublishedBy(){return this.get("PublishedBy")}get Comment(){return this.get("Comment")}get LogicalFiles(){return this.get("LogicalFiles")}get SuperFiles(){return this.get("SuperFiles")}get IsLibrary(){return this.get("IsLibrary")}get Priority(){return this.get("Priority")}get WUSnapShot(){return this.get("WUSnapShot")}get CompileTime(){return this.get("CompileTime")}get LibrariesUsed(){return this.get("LibrariesUsed")}get CountGraphs(){return this.get("CountGraphs")}get ResourceURLCount(){return this.get("ResourceURLCount")}get WsEclAddresses(){return this.get("WsEclAddresses")}get WUGraphs(){return this.get("WUGraphs")}get WUTimers(){return this.get("WUTimers")}get PriorityID(){return this.get("PriorityID")}constructor(e,t,n,s){super(),this.wsWorkunitsService=e instanceof li?e:new li(e),this.topology=Mc.attach(this.wsWorkunitsService.opts()),this.set({QuerySet:t,QueryId:n,...s})}static attach(e,t,n,s){const r=ra.get({BaseUrl:e.baseUrl,QuerySet:t,QueryId:n},()=>new _Query(e,t,n));return s&&r.set(s),r}_eclService;async wsEclService(){return this._eclService||(this._eclService=this.topology.fetchServices({}).then(e=>{for(const t of e?.TpEspServers?.TpEspServer??[])for(const e of t?.TpBindings?.TpBinding??[])if("ws_ecl"===e?.Service){const t=`${e.Protocol}://${globalThis.location.hostname}:${e.Port}`;return new mt({baseUrl:t})}})),this._eclService}async fetchDetails(){const e=await this.wsWorkunitsService.WUQueryDetails({QuerySet:this.QuerySet,QueryId:this.QueryId,IncludeStateOnClusters:!0,IncludeSuperFiles:!0,IncludeWsEclAddresses:!0,CheckAllNodes:!1});this.set({...e})}async fetchRequestSchema(){const e=await this.wsEclService();try{this._requestSchema=await(e?.requestJson(this.QuerySet,this.QueryId))??[]}catch(t){ea.debug(t.message??t),this._requestSchema=[]}}async fetchResponseSchema(){const e=await this.wsEclService();try{this._responseSchema=await(e?.responseJson(this.QuerySet,this.QueryId))??{}}catch(t){ea.debug(t.message??t),this._responseSchema={}}}async fetchSchema(){await Promise.all([this.fetchRequestSchema(),this.fetchResponseSchema()])}fetchSummaryStats(){return this.wsWorkunitsService.WUQueryGetSummaryStats({Target:this.QuerySet,QueryId:this.QueryId})}fetchGraph(e="",t=""){return this.wsWorkunitsService.WUQueryGetGraph({Target:this.QuerySet,QueryId:this.QueryId,GraphName:e,SubGraphId:t}).then(e=>{const t=new Kc;let n=!0;for(const s of e?.Graphs?.ECLGraphEx||[])n?(t.load(s.Graph),n=!1):t.merge(s.Graph);return t})}fetchDetailsNormalized(e={}){const t=rc.attach(this.wsWorkunitsService,this.Wuid);return t?Promise.all([this.fetchGraph(),t.fetchDetailsMeta(),t.fetchDetailsRaw(e)]).then(e=>{const n=e[0],s=e[1],r=e[2].map(e=>{const t=e.Id[0];if("a"===t||"e"===t){const t=n.idx[e.Id.substring(1)];if(!t)return ea.debug(`Missing graph data for metric ID: ${e.Id}`),e;const s=new Set(e.Properties.Property.map(e=>e.Name)),r=[];for(const e in t){const n=e.charAt(0);if("_"!==n&&n===n.toUpperCase()&&!s.has(e)){const n=t[e],s=typeof n;if("string"===s||"number"===s||"boolean"===s){let t=na(n)?parseFloat(n):n,s=n;e.indexOf("Time")>=0&&(t/=1e9,s=ta(t)+"s"),r.push({Name:e,RawValue:t,Formatted:s})}}}r.length>0&&e.Properties.Property.push(...r)}return e});return t.normalizeDetails(s,r)}):Promise.resolve({meta:void 0,columns:void 0,data:void 0})}async submit(e){const t=await this.wsEclService();try{return t?.submit(this.QuerySet,this.QueryId,e).then(e=>{for(const t in e)e[t]=e[t].Row;return e})??[]}catch(n){return ea.debug(n.message??n),[]}}async refresh(){return await Promise.all([this.fetchDetails(),this.fetchSchema()]),this}requestFields(){return this._requestSchema?this._requestSchema:[]}responseFields(){return this._responseSchema?this._responseSchema:{}}resultNames(){const e=[];for(const t in this.responseFields())e.push(t);return e}resultFields(e){return this._responseSchema[e]?this._responseSchema[e]:[]}};t(ia,"Query");let oa=ia;const ca=class _StoreCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Name}:${e.UserSpecific}-${e.Namespace}`)}};t(ca,"StoreCache");let aa=ca;const ua=new aa,ha=class _ValueChangedMessage extends D{constructor(e,t,n){super(),this.key=e,this.value=t,this.oldValue=n}key;value;oldValue;get canConflate(){return!0}conflate(e){return this.key===e.key&&(this.value=e.value,!0)}void(){return this.value===this.oldValue}};t(ha,"ValueChangedMessage");let la=ha;const pa=class _Store{connection;get BaseUrl(){return this.connection.baseUrl}Name;UserSpecific;Namespace;_dispatch=new R;static attach(e,t="HPCCApps",n,s=!0){return ua.get({BaseUrl:e.baseUrl,Name:t,UserSpecific:s,Namespace:n},()=>new _Store(e,t,n,s))}constructor(e,t,n,s){this.connection=e instanceof Pr?e:new Pr(e),this.Name=t,this.UserSpecific=s,this.Namespace=n}_knownValues={};create(){this.connection.CreateStore({Name:this.Name,Type:"",Description:""})}set(e,t,n=!0){return this.connection.Set({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e,Value:t}).then(s=>{const r=this._knownValues[e];this._knownValues[e]=t,n&&this._dispatch.post(new la(e,t,r))}).catch(n=>{console.error(`Store.set("${e}", "${t}") failed:`,n)})}get(e,t=!0){return this.connection.Fetch({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e}).then(n=>{const s=this._knownValues[e];return this._knownValues[e]=n.Value,t&&this._dispatch.post(new la(e,n.Value,s)),n.Value}).catch(t=>{console.error(`Store.get(${e}) failed:`,t)})}getAll(e=!0){return this.connection.FetchAll({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace}).then(t=>{const n={},s=this._knownValues;if(this._knownValues={},t.Pairs.Pair.forEach(t=>{const r=this._knownValues[t.Key];this._knownValues[t.Key]=t.Value,delete s[t.Key],n[t.Key]=t.Value,e&&this._dispatch.post(new la(t.Key,t.Value,r))}),e)for(const e in s)this._dispatch.post(new la(e,void 0,s[e]));return n}).catch(e=>(console.error("Store.getAll failed:",e),{}))}delete(e,t=!0){return this.connection.Delete({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e}).then(n=>{const s=this._knownValues[e];delete this._knownValues[e],t&&this._dispatch.post(new la(e,void 0,s))}).catch(t=>{console.error(`Store.delete(${e}) failed:`,t)})}monitor(e){return this._dispatch.attach(e)}};t(pa,"Store");let da=pa;const ga=n("@hpcc-js/comms/dfuWorkunit.ts"),ma=class _DFUWorkunitCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.ID}`)}};t(ma,"DFUWorkunitCache");let Sa=ma;const fa=new Sa,_a=class _DFUWorkunit extends h{connection;topologyConnection;get BaseUrl(){return this.connection.baseUrl}get properties(){return this.get()}get ID(){return this.get("ID")}get DFUServerName(){return this.get("DFUServerName")}get ClusterName(){return this.get("ClusterName")}get JobName(){return this.get("JobName")}get Queue(){return this.get("Queue")}get User(){return this.get("User")}get isProtected(){return this.get("isProtected")}get Command(){return this.get("Command")}get CommandMessage(){return this.get("CommandMessage")}get PercentDone(){return this.get("PercentDone")}get SecsLeft(){return this.get("SecsLeft")}get ProgressMessage(){return this.get("ProgressMessage")}get SummaryMessage(){return this.get("SummaryMessage")}get State(){return this.get("State",0)}get SourceLogicalName(){return this.get("SourceLogicalName")}get SourceIP(){return this.get("SourceIP")}get SourceFilePath(){return this.get("SourceFilePath")}get SourceDali(){return this.get("SourceDali")}get SourceRecordSize(){return this.get("SourceRecordSize")}get SourceFormat(){return this.get("SourceFormat")}get RowTag(){return this.get("RowTag")}get SourceNumParts(){return this.get("SourceNumParts")}get SourceDirectory(){return this.get("SourceDirectory")}get DestLogicalName(){return this.get("DestLogicalName")}get DestGroupName(){return this.get("DestGroupName")}get DestDirectory(){return this.get("DestDirectory")}get DestIP(){return this.get("DestIP")}get DestFilePath(){return this.get("DestFilePath")}get DestFormat(){return this.get("DestFormat")}get DestNumParts(){return this.get("DestNumParts")}get DestRecordSize(){return this.get("DestRecordSize")}get Replicate(){return this.get("Replicate")}get Overwrite(){return this.get("Overwrite")}get Compress(){return this.get("Compress")}get SourceCsvSeparate(){return this.get("SourceCsvSeparate")}get SourceCsvQuote(){return this.get("SourceCsvQuote")}get SourceCsvTerminate(){return this.get("SourceCsvTerminate")}get SourceCsvEscape(){return this.get("SourceCsvEscape")}get TimeStarted(){return this.get("TimeStarted")}get TimeStopped(){return this.get("TimeStopped")}get StateMessage(){return this.get("StateMessage")}get MonitorEventName(){return this.get("MonitorEventName")}get MonitorSub(){return this.get("MonitorSub")}get MonitorShotLimit(){return this.get("MonitorShotLimit")}get SourceDiffKeyName(){return this.get("SourceDiffKeyName")}get DestDiffKeyName(){return this.get("DestDiffKeyName")}get Archived(){return this.get("Archived")}get encrypt(){return this.get("encrypt")}get decrypt(){return this.get("decrypt")}get failIfNoSourceFile(){return this.get("failIfNoSourceFile")}get recordStructurePresent(){return this.get("recordStructurePresent")}get quotedTerminator(){return this.get("quotedTerminator")}get preserveCompression(){return this.get("preserveCompression")}get expireDays(){return this.get("expireDays")}get PreserveFileParts(){return this.get("PreserveFileParts")}get FileAccessCost(){return this.get("FileAccessCost")}get KbPerSecAve(){return this.get("KbPerSecAve")}get KbPerSec(){return this.get("KbPerSec")}static create(e,t){const n=new _DFUWorkunit(e);return n.connection.CreateDFUWorkunit({DFUServerQueue:t}).then(e=>(fa.set(n),n.set(e.result),n))}static attach(e,t,n){const s=fa.get({BaseUrl:e.baseUrl,ID:t},()=>new _DFUWorkunit(e,t));return n&&s.set(n),s}static sprayFixed(e,t){const n=new he(e);return n.SprayFixedEx({...t}).then(t=>{const s=t.wuid;return n.GetDFUWorkunit({wuid:s}).then(t=>_DFUWorkunit.attach(e,s,t.result))})}static sprayVariable(e,t){const n=new he(e);return n.SprayVariableEx({...t}).then(t=>{const s=t.wuid;return n.GetDFUWorkunit({wuid:s}).then(t=>_DFUWorkunit.attach(e,s,t.result))})}static despray(e,t){const n=new he(e);return n.DesprayEx({...t}).then(t=>{const s=t.wuid;return n.GetDFUWorkunit({wuid:s}).then(t=>_DFUWorkunit.attach(e,s,t.result))})}update(e){return this.connection.UpdateDFUWorkunitEx({wu:{JobName:e?.wu?.JobName??this.JobName,isProtected:e?.wu?.isProtected??this.isProtected,ID:this.ID,State:this.State},ClusterOrig:this.ClusterName,JobNameOrig:this.JobName,isProtectedOrig:this.isProtected,StateOrig:this.State})}isComplete(){switch(this.State){case 6:case 5:case 4:case 999:return!0}return!1}isFailed(){return!(!this.isComplete()||6===this.State)}isDeleted(){return 999===this.State}isRunning(){return!this.isComplete()}abort(){return this.connection.AbortDFUWorkunit({wuid:this.ID})}delete(){return this.DFUWUAction(ne.DFUWUActions.Delete).then(e=>this.refresh().then(()=>(this._monitor(),e)))}async refresh(e=!1){return await this.GetDFUWorkunit(),this}fetchXML(e){return this.DFUWUFile()}_monitor(){this.isComplete()?this._monitorTickCount=0:super._monitor()}_monitorTimeoutDuration(){const e=super._monitorTimeoutDuration();return this._monitorTickCount<=1?3e3:this._monitorTickCount<=5?6e3:this._monitorTickCount<=7?12e3:e}DFUWUFile(e={}){return this.connection.DFUWUFileEx({...e,Wuid:this.ID}).then(e=>e).catch(e=>"")}DFUWUAction(e){return this.connection.DFUWorkunitsAction({wuids:{Item:[this.ID]},Type:e}).then(t=>e===ne.DFUWUActions.Delete?t:this.refresh().then(()=>(this._monitor(),t)))}on(e,t,n){if(this.isCallback(t))switch(e){case"finished":super.on("propChanged","State",e=>{this.isComplete()&&t([e])});break;case"changed":super.on(e,t)}else if("changed"===e)super.on(e,t,n);return this._monitor(),this}watchUntilComplete(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),this.isComplete()&&(s.release(),t(this))})})}watchUntilRunning(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),(this.isComplete()||this.isRunning())&&(s.release(),t(this))})})}constructor(e,t){super(),this.connection=new he(e),this.topologyConnection=new kr(e),this.clearState(t)}clearState(e){this.clear({ID:e,State:0})}GetDFUWorkunit(e={}){return this.connection.GetDFUWorkunit({...e,wuid:this.ID}).then(e=>(this.set(e.result),e)).catch(e=>{if(!e.Exception.some(e=>(20080===e.Code||20081===e.Code)&&(this.clearState(this.ID),this.set("State",999),!0)))throw ga.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}};t(_a,"DFUWorkunit");let Ua=_a;export{Ce as AccessService,Fe as AccountService,lc as Activity,Ao as Attribute,W as BUILD_VERSION,Po as BaseScope,Le as CloudService,ke as CodesignService,O as Connection,tt as DFUArrayActions,st as DFUChangeProtection,rt as DFUChangeRestriction,nt as DFUDefFileFormat,ot as DFUService,ae as DFUWUTypes,Ua as DFUWorkunit,Sa as DFUWorkunitCache,ht as DFUXRefService,Be as DaliService,Mi as ECLGraph,K as ESPConnection,q as ESPExceptions,mt as EclService,Ut as ElkService,ne as FileSpray,he as FileSprayService,ce as FileSprayStates,Ro as GlobalResultCache,Ii as GraphCache,Lt as LogType,Ot as LogaccessService,fc as LogicalFile,gc as LogicalFileCache,Rc as Machine,Uc as MachineCache,rn as MachineService,b as PKG_NAME,F as PKG_VERSION,un as PackageProcessService,Oo as PropertyType,oa as Query,Kc as QueryGraph,Xo as RelatedProperty,io as Resource,dn as ResourcesService,Fo as Result,vo as ResultCache,vr as SMCService,yn as SashaService,Lo as Scope,no as ScopeEdge,Yi as ScopeGraph,Zi as ScopeSubgraph,eo as ScopeVertex,te as Service,Mo as SourceFile,da as Store,aa as StoreCache,Pr as StoreService,Et as TargetAudience,vc as TargetCluster,bc as TargetClusterCache,Io as Timer,Mc as Topology,xc as TopologyCache,kr as TopologyService,la as ValueChangedMessage,oi as WUStateID,si as WUUpdate,rc as Workunit,tc as WorkunitCache,li as WorkunitsService,di as WorkunitsServiceEx,le as WsAccess,Ee as WsCodesign,Oe as WsDfu,yt as WsLogaccess,es as WsSMC,gn as WsSasha,xr as WsTopology,Gr as WsWorkunits,$i as XGMMLEdge,Vi as XGMMLGraph,Bi as XGMMLSubgraph,Xi as XGMMLVertex,co as XSDNode,go as XSDSchema,lo as XSDSimpleType,uo as XSDXMLNode,X as createConnection,so as createGraph,Ji as createXGMMLGraph,wc as defaultTargetCluster,L as deserializeResponse,k as get,Q as hookSend,w as instanceOfIConnection,T as instanceOfIOptions,$ as isArray,ci as isECLResult,Y as isExceptions,ui as isWUInfoWorkunit,ai as isWUQueryECLWorkunit,E as jsonp,fo as parseXSD,yo as parseXSD2,j as post,G as send,x as serializeRequest,H as setTransportFactory,qo as splitMetric,Tc as targetClusters};
1
+ var e=Object.defineProperty,t=(t,n)=>e(t,"name",{value:n,configurable:!0});import{scopedLogger as n,join as s,root as r,promiseTimeout as i,utf8ToBase64 as o,exists as c,deepMixin as a,xml2json as u,StateObject as h,Cache as l,Edge as p,Graph as d,Subgraph as g,Vertex as m,SAXStackParser as S,Stack as f,espTime2Seconds as _,deepMixinT as U,XMLNode as y,debounce as C,Dispatch as D,Message as R}from"@hpcc-js/util";const b="@hpcc-js/comms",F="3.15.7",W="3.22.1",v=n("comms/connection.ts");function T(e){return"baseUrl"in e}t(T,"instanceOfIOptions");const A={type:"post",baseUrl:"",userID:"",password:"",rejectUnauthorized:!0,timeoutSecs:60};function w(e){return"function"==typeof e.opts&&"function"==typeof e.send&&"function"==typeof e.clone}function P(e,t){return void 0===t||!0===t?encodeURIComponent(e):""+e}function x(e,t=!0,n=""){if(n&&(n+="."),"object"!=typeof e)return P(e,t);const s=[];for(const r in e)if(e.hasOwnProperty(r))if(e[r]instanceof Array){let i=!1;e[r].forEach((e,o)=>{"object"==typeof e?(i=!0,s.push(x(e,t,n+P(`${r}.${o}`,t)))):s.push(n+P(`${r}_i${o}`,t)+"="+x(e,t))}),i&&s.push(n+P(`${r}.itemcount`,t)+"="+e[r].length)}else"object"==typeof e[r]?e[r]&&e[r].Item instanceof Array?(s.push(x(e[r].Item,t,n+P(r,t))),s.push(n+P(`${r}.itemcount`,t)+"="+e[r].Item.length)):s.push(x(e[r],t,n+P(r,t))):void 0!==e[r]?s.push(n+P(r,t)+"="+P(e[r],t)):s.push(n+P(r,t));return s.join("&")}function L(e){return JSON.parse(e)}function E(e,n,r={},i="json",o){return o&&console.warn("Header attributes ignored for JSONP connections"),new Promise((o,c)=>{let a=1e3*e.timeoutSecs;const u="jsonp_callback_"+Math.round(999999*Math.random());window[u]=function(e){a=0,d(),o("json"===i&&"string"==typeof e?L(e):e)};const h=document.createElement("script");let l=s(e.baseUrl,n);l+=l.indexOf("?")>=0?"&":"?",h.src=l+"jsonp="+u+"&"+x(r,e.encodeRequest),document.body.appendChild(h);const p=setInterval(function(){a<=0?clearInterval(p):(a-=5e3,a<=0?(clearInterval(p),v.error("Request timeout: "+h.src),d(),c(Error("Request timeout: "+h.src))):v.debug("Request pending ("+a/1e3+" sec): "+h.src))},5e3);function d(){delete window[u],document.body.removeChild(h)}t(d,"doCallback")})}function M(e){return e.userID?{Authorization:`Basic ${o(`${e.userID}:${e.password}`)}`}:{}}t(w,"instanceOfIConnection"),t(P,"encode"),t(x,"serializeRequest"),t(L,"deserializeResponse"),t(E,"jsonp"),t(M,"authHeader");const N={};function I(e,n,o,c,a){function u(e){if(e.ok)return"json"===a?e.json():e.text();throw new Error(e.statusText)}c={...M(e),...c},o={credentials:N[e.baseUrl]?"omit":"include",...o,headers:c},0===e.baseUrl.indexOf("https:")&&(!1===e.rejectUnauthorized&&r.__hpcc_rejectUnauthorizedAgent?o.dispatcher=r.__hpcc_rejectUnauthorizedAgent:r.__hpcc_trustwaveAgent&&(o.agent=r.__hpcc_trustwaveAgent)),t(u,"handleResponse");const h=r.__hpcc_undiciFetch??fetch;return i(1e3*e.timeoutSecs,h(s(e.baseUrl,n),o).then(u).catch(t=>(o.credentials=N[e.baseUrl]?"include":"omit",h(s(e.baseUrl,n),o).then(u).then(t=>(N[e.baseUrl]=!N[e.baseUrl],t)))))}function j(e,t,n,s="json",r){let i;return n.upload_&&(delete n.upload_,t+="?upload_"),n.abortSignal_&&(i=n.abortSignal_,delete n.abortSignal_),I(e,t,{method:"post",body:x(n,e.encodeRequest),signal:i},{"Content-Type":"application/x-www-form-urlencoded",...r},s)}function k(e,t,n,s="json",r){let i;return n.abortSignal_&&(i=n.abortSignal_,delete n.abortSignal_),I(e,`${t}?${x(n,e.encodeRequest)}`,{method:"get",signal:i},{...r},s)}function G(e,t,n,s="json",r){let i;switch(e.type){case"jsonp":i=E(e,t,n,s,r);break;case"get":i=k(e,t,n,s,r);break;default:i=j(e,t,n,s,r)}return i}t(I,"doFetch"),t(j,"post"),t(k,"get"),t(G,"send");let V=G;function Q(e){const t=V;return e&&(V=e),t}t(Q,"hookSend");const B=class _Connection{_opts;get baseUrl(){return this._opts.baseUrl}constructor(e){this.opts(e)}opts(e){return 0===arguments.length?this._opts:(this._opts={...A,...e},this)}send(e,t,n="json",s){return this._opts.hookSend?this._opts.hookSend(this._opts,e,t,n,V,s):V(this._opts,e,t,n,s)}clone(){return new _Connection(this.opts())}};t(B,"Connection");let O=B,X=/* @__PURE__ */t(function(e){return new O(e)},"createConnection");function H(e){const t=X;return X=e,t}function $(e){return"[object Array]"===Object.prototype.toString.call(e)}t(H,"setTransportFactory"),t($,"isArray");const J=class _ESPExceptions extends Error{isESPExceptions=!0;action;request;Source;Exception;constructor(e,t,n){super("ESPException: "+n.Source),this.action=e,this.request=t,this.Source=n.Source,this.Exception=n.Exception,n.Exception.length?this.message=`${n.Exception[0].Code}: ${n.Exception[0].Message}`:this.message=""}};t(J,"ESPExceptions");let q=J;function Y(e){return e instanceof q||e.isESPExceptions&&Array.isArray(e.Exception)}function z(e){return void 0!==e.send}t(Y,"isExceptions"),t(z,"isConnection");const Z=class _ESPConnection{_connection;get baseUrl(){return this._connection.opts().baseUrl}_service;_version;constructor(e,t,n){this._connection=z(e)?e:X(e),this._service=t,this._version=n}service(e){return void 0===e?this._service:(this._service=e,this)}version(e){return void 0===e?this._version:(this._version=e,this)}toESPStringArray(e,t){if($(e[t])){for(let n=0;n<e[t].length;++n)e[t+"_i"+n]=e[t][n];delete e[t]}return e}opts(e){return void 0===e?this._connection.opts():(this._connection.opts(e),this)}send(e,t={},n="json",r=!1,i,o){const c={...t,ver_:this._version};let a;r&&(c.upload_=!0),i&&(c.abortSignal_=i);let u="json";switch(n){case"text":a=s(this._service,e),u="text";break;case"xsd":a=s(this._service,e+".xsd"),u="text";break;case"json2":a=s(this._service,e+"/json"),n="json";const t=e.split("/");e=t.pop();break;default:a=s(this._service,e+".json")}return this._connection.send(a,c,u).then(t=>{if("json"===n){let n;if(t&&t.Exceptions)throw new q(e,c,t.Exceptions);if(t&&(n=t[o||e+"Response"]),!n)throw new q(e,c,{Source:"ESPConnection.send",Exception:[{Code:0,Message:"Missing Response"}]});return n}return t})}clone(){return new _ESPConnection(this._connection.clone(),this._service,this._version)}};t(Z,"ESPConnection");let K=Z;const ee=class _Service{_connection;get baseUrl(){return this._connection.opts().baseUrl}constructor(e,t,n){this._connection=new K(e,t,n)}opts(){return this._connection.opts()}connection(){return this._connection.clone()}};t(ee,"Service");let te=ee;var ne,se,re,ie;se=ne||(ne={}),(re=se.DFUWUActions||(se.DFUWUActions={})).Delete="Delete",re.Protect="Protect",re.Unprotect="Unprotect",re.Restore="Restore",re.SetToFailed="SetToFailed",re.Archive="Archive",(ie=se.DFUCommand||(se.DFUCommand={})).copy="copy",ie.remove="remove",ie.move="move",ie.rename="rename",ie.replicate="replicate",ie.import="import",ie.export="export",ie.monitor="monitor",ie.copymerge="copymerge",ie.supercopy="supercopy",ie.publish="publish";const oe=class _FileSprayServiceBase extends te{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")}};t(oe,"FileSprayServiceBase");let ce=oe;var ae=/* @__PURE__ */(e=>(e[e.unknown=0]="unknown",e[e.scheduled=1]="scheduled",e[e.queued=2]="queued",e[e.started=3]="started",e[e.aborted=4]="aborted",e[e.failed=5]="failed",e[e.finished=6]="finished",e[e.monitoring=7]="monitoring",e[e.aborting=8]="aborting",e[e.notfound=999]="notfound",e))(ae||{});const ue=class _FileSprayService extends ce{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")}};t(ue,"FileSprayService");let he=ue;var le,pe,de,ge,me,Se,fe;pe=le||(le={}),(de=pe.ViewMemberType||(pe.ViewMemberType={})).User="User",de.Group="Group",(ge=pe.UserSortBy||(pe.UserSortBy={})).username="username",ge.fullname="fullname",ge.passwordexpiration="passwordexpiration",ge.employeeID="employeeID",ge.employeeNumber="employeeNumber",(me=pe.GroupSortBy||(pe.GroupSortBy={})).Name="Name",me.ManagedBy="ManagedBy",(Se=pe.AccountTypeReq||(pe.AccountTypeReq={})).Any="Any",Se.User="User",Se.Group="Group",(fe=pe.ResourcePermissionSortBy||(pe.ResourcePermissionSortBy={})).Name="Name",fe.Type="Type",(pe.ResourceSortBy||(pe.ResourceSortBy={})).Name="Name";const _e=class _AccessServiceBase extends te{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")}};t(_e,"AccessServiceBase");let Ue=_e;const ye=class _AccessService extends Ue{};t(ye,"AccessService");let Ce=ye;const De=class _AccountServiceBase extends te{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")}};t(De,"AccountServiceBase");let Re=De;const be=class _AccountService extends Re{VerifyUser(e){return this._connection.send("VerifyUser",e).catch(e=>{if(e.isESPExceptions&&e.Exception.some(e=>20043===e.Code))return{retcode:20043,Exceptions:{Source:"wsAccount",Exception:e.Exception}};throw e})}};t(be,"AccountService");let Fe=be;const We=class _CloudServiceBase extends te{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")}};t(We,"CloudServiceBase");let ve=We;const Te=n("@hpcc-js/comms/services/wsCloud.ts");function Ae(e){return void 0!==e?.Pods}function we(e){return e.spec?.containers?.reduce((e,t)=>(t.ports?.forEach(t=>{e.push({ContainerPort:t.containerPort,Name:t.name,Protocol:t.protocol})}),e),[])??[]}function Pe(e){return e.filter(e=>{const t=e?.metadata?.labels??{};return t.hasOwnProperty("app.kubernetes.io/part-of")&&"HPCC-Platform"===t["app.kubernetes.io/part-of"]}).map(e=>{const t=new Date(e.metadata?.creationTimestamp);return{Name:e.metadata.name,Status:e.status?.phase,CreationTimestamp:t.toISOString(),ContainerName:e.status?.containerStatuses?.reduce((e,t)=>(t.name&&e.push(t.name),e),[]).join(", ")??"",ContainerCount:e.spec?.containers?.length??0,ContainerReadyCount:e.status?.containerStatuses?.reduce((e,t)=>e+(t.ready?1:0),0),ContainerRestartCount:e.status?.containerStatuses?.reduce((e,t)=>e+t.restartCount,0),Ports:{Port:we(e)}}})}t(Ae,"isGetPODsResponse_v1_02"),t(we,"mapPorts"),t(Pe,"mapPods");const xe=class _CloudService extends ve{getPODs(){return super.GetPODs({}).then(e=>{if(Ae(e))return e.Pods?.Pod??[];try{const t="string"==typeof e.Result?JSON.parse(e.Result):e.Result;return Pe(t?.items??[])}catch(t){return Te.error(`Error parsing V1Pods json '${t instanceof Error?t.message:String(t)}'`),[]}})}};t(xe,"CloudService");let Le=xe;var Ee,Me;((Me=Ee||(Ee={})).SigningMethodType||(Me.SigningMethodType={})).gpg="gpg";const Ne=class _CodesignServiceBase extends te{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")}};t(Ne,"CodesignServiceBase");let Ie=Ne;const je=class _CodesignService extends Ie{ListUserIDsEx(e){return super.ListUserIDs(e).then(e=>e.UserIDs.Item).catch(e=>[])}Sign(e){return super.Sign({SigningMethod:Ee.SigningMethodType.gpg,...e})}};t(je,"CodesignService");let ke=je;const Ge=class _DaliServiceBase extends te{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")}};t(Ge,"DaliServiceBase");let Ve=Ge;const Qe=class _DaliService extends Ve{};t(Qe,"DaliService");let Be=Qe;var Oe,Xe,He,$e,Je,qe,Ye,ze,Ze;Xe=Oe||(Oe={}),(He=Xe.DFUArrayActions||(Xe.DFUArrayActions={})).Delete="Delete",He.AddToSuperfile="Add To Superfile",He.ChangeProtection="Change Protection",He.ChangeRestriction="Change Restriction",($e=Xe.DFUChangeProtection||(Xe.DFUChangeProtection={}))[$e.NoChange=0]="NoChange",$e[$e.Protect=1]="Protect",$e[$e.Unprotect=2]="Unprotect",$e[$e.UnprotectAll=3]="UnprotectAll",(Je=Xe.DFUChangeRestriction||(Xe.DFUChangeRestriction={}))[Je.NoChange=0]="NoChange",Je[Je.Restrict=1]="Restrict",Je[Je.Unrestricted=2]="Unrestricted",(qe=Xe.DFUDefFileFormat||(Xe.DFUDefFileFormat={})).xml="xml",qe.def="def",(Ye=Xe.FileAccessRole||(Xe.FileAccessRole={})).Token="Token",Ye.Engine="Engine",Ye.External="External",(ze=Xe.SecAccessType||(Xe.SecAccessType={})).None="None",ze.Access="Access",ze.Read="Read",ze.Write="Write",ze.Full="Full",(Ze=Xe.DFUFileType||(Xe.DFUFileType={})).Flat="Flat",Ze.Index="Index",Ze.Xml="Xml",Ze.Csv="Csv",Ze.Json="Json",Ze.IndexLocal="IndexLocal",Ze.IndexPartitioned="IndexPartitioned",Ze.Unset="Unset";const Ke=class _DfuServiceBase extends te{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")}};t(Ke,"DfuServiceBase");let et=Ke;const tt=Oe.DFUArrayActions,nt=Oe.DFUDefFileFormat,st=Oe.DFUChangeProtection,rt=Oe.DFUChangeRestriction,it=class _DFUService extends et{DFUFile(e){return this._connection.send("DFUDefFile",e,"text")}async recursiveFetchLogicalFiles(e){const t=[],n=[];return await Promise.all(e.map(e=>this.DFUInfo({Cluster:e.NodeGroup,Name:e.Name,IncludeJsonTypeInfo:!1,IncludeBinTypeInfo:!1,ForceIndexInfo:!1}).then(e=>{for(const n of e?.FileDetail?.Superfiles?.DFULogicalFile??[])t.push(n);for(const t of e?.FileDetail?.subfiles?.Item??[])n.push(t)}))),n.concat(t.length?await this.recursiveFetchLogicalFiles(t):[])}};t(it,"DFUService");let ot=it;const ct=class _DFUXRefServiceBase extends te{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")}};t(ct,"DFUXRefServiceBase");let at=ct;const ut=class _DFUXRefService extends at{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")}};t(ut,"DFUXRefService");let ht=ut;function lt(e,t){const n=typeof t;switch(n){case"boolean":case"number":case"string":return{id:e,type:n};case"object":if(t.Row instanceof Array&&(t=t.Row),t instanceof Array)return{id:e,type:"dataset",children:pt(t[0])};if(t instanceof Object){if(t.Item&&t.Item instanceof Array&&1===t.Item.length){const n=typeof t.Item[0];if("string"===n||"number"===n)return{id:e,type:"set",fieldType:n};throw new Error("Unknown field type")}return{id:e,type:"object",fields:dt(t)}}default:throw new Error("Unknown field type")}}function pt(e){e.Row&&e.Row instanceof Array&&(e=e.Row[0]);const t=[];for(const n in e)t.push(lt(n,e[n]));return t}function dt(e){const t={};for(const n in e)t[n]=lt(n,e[n]);return t}t(lt,"jsonToIField"),t(pt,"jsonToIFieldArr"),t(dt,"jsonToIFieldObj");const gt=class _EclService extends te{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(e=>{const t=JSON.parse(e);for(const n in t)return t[n];return{}}).then(pt)}responseJson(e,t){return this._connection.send(`example/response/query/${e}/${t}/json`,{},"text").then(e=>{const t=JSON.parse(e);for(const n in t)return t[n].Results;return{}}).then(e=>{const t={};for(const n in e)t[n]=pt(e[n]);return t})}submit(e,t,n){const s=`submit/query/${e}/${t}`;return this._connection.send(s,n,"json2").then(e=>{if(e.Results&&e.Results.Exception)throw new q(s,n,{Source:"wsEcl.submit",Exception:e.Results.Exception});return e.Results})}};t(gt,"EclService");let mt=gt;const St=class _ElkServiceBase extends te{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")}};t(St,"ElkServiceBase");let ft=St;const _t=class _ElkService extends ft{};t(_t,"ElkService");let Ut=_t;var yt,Ct,Dt,Rt,bt,Ft,Wt,vt,Tt,At;Ct=yt||(yt={}),(Dt=Ct.LogColumnType||(Ct.LogColumnType={})).global="global",Dt.workunits="workunits",Dt.components="components",Dt.audience="audience",Dt.class="class",Dt.instance="instance",Dt.node="node",Dt.message="message",Dt.logid="logid",Dt.processid="processid",Dt.threadid="threadid",Dt.timestamp="timestamp",Dt.pod="pod",Dt.traceid="traceid",Dt.spanid="spanid",(Rt=Ct.LogColumnValueType||(Ct.LogColumnValueType={})).string="string",Rt.numeric="numeric",Rt.datetime="datetime",Rt.enum="enum",Rt.epoch="epoch",(bt=Ct.LogAccessType||(Ct.LogAccessType={}))[bt.All=0]="All",bt[bt.ByJobID=1]="ByJobID",bt[bt.ByComponent=2]="ByComponent",bt[bt.ByLogType=3]="ByLogType",bt[bt.ByTargetAudience=4]="ByTargetAudience",bt[bt.BySourceInstance=5]="BySourceInstance",bt[bt.BySourceNode=6]="BySourceNode",bt[bt.ByFieldName=7]="ByFieldName",bt[bt.ByPod=8]="ByPod",bt[bt.ByTraceID=9]="ByTraceID",bt[bt.BySpanID=10]="BySpanID",(Ft=Ct.LogAccessStatusCode||(Ct.LogAccessStatusCode={}))[Ft.Success=0]="Success",Ft[Ft.Warning=1]="Warning",Ft[Ft.Fail=2]="Fail",(Wt=Ct.LogAccessFilterOperator||(Ct.LogAccessFilterOperator={}))[Wt.NONE=0]="NONE",Wt[Wt.AND=1]="AND",Wt[Wt.OR=2]="OR",(vt=Ct.LogSelectColumnMode||(Ct.LogSelectColumnMode={}))[vt.MIN=0]="MIN",vt[vt.DEFAULT=1]="DEFAULT",vt[vt.ALL=2]="ALL",vt[vt.CUSTOM=3]="CUSTOM",(Tt=Ct.SortColumType||(Ct.SortColumType={}))[Tt.ByDate=0]="ByDate",Tt[Tt.ByJobID=1]="ByJobID",Tt[Tt.ByComponent=2]="ByComponent",Tt[Tt.ByLogType=3]="ByLogType",Tt[Tt.ByTargetAudience=4]="ByTargetAudience",Tt[Tt.BySourceInstance=5]="BySourceInstance",Tt[Tt.BySourceNode=6]="BySourceNode",Tt[Tt.ByFieldName=7]="ByFieldName",Tt[Tt.ByPod=8]="ByPod",Tt[Tt.ByTraceID=9]="ByTraceID",Tt[Tt.BySpanID=10]="BySpanID",(At=Ct.SortDirection||(Ct.SortDirection={}))[At.ASC=0]="ASC",At[At.DSC=1]="DSC";const wt=class _LogaccessServiceBase extends te{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")}};t(wt,"LogaccessServiceBase");let Pt=wt;const xt=n("@hpcc-js/comms/services/wsLogaccess.ts");var Lt=/* @__PURE__ */(e=>(e.Disaster="DIS",e.Error="ERR",e.Warning="WRN",e.Information="INF",e.Progress="PRO",e.Metric="MET",e))(Lt||{}),Et=/* @__PURE__ */(e=>(e.Operator="OPR",e.User="USR",e.Programmer="PRO",e.Audit="ADT",e))(Et||{});const Mt=/* @__PURE__ */new Set(["azureloganalyticscurl","elasticstack","grafanacurl"]),Nt=new Set(Object.values(yt.LogColumnType));function It(e){switch(e){case yt.LogColumnType.workunits:case"hpcc.log.jobid":return yt.LogAccessType.ByJobID;case yt.LogColumnType.audience:case"hpcc.log.audience":return yt.LogAccessType.ByTargetAudience;case yt.LogColumnType.class:case"hpcc.log.class":return yt.LogAccessType.ByLogType;case yt.LogColumnType.components:case"kubernetes.container.name":return yt.LogAccessType.ByComponent;default:return yt.LogAccessType.ByFieldName}}t(It,"getLogCategory");const jt=["audience","class","workunits","message","processid","logid","threadid","timestamp","components","instance"];function kt(e,t){const n=[];for(const s of jt){const r=e[s];if(null==r||""===r||Array.isArray(r)&&0===r.length)continue;if(!(s in t))continue;let i=Nt.has(s)?s:t[s];const o=It(i);o===yt.LogAccessType.ByFieldName&&(i=t[s]);const c=o===yt.LogAccessType.ByComponent,a=Array.isArray(r)?r:[r];for(const e of a)n.push({LogCategory:o,SearchField:i,SearchByValue:c?e+"*":e})}return n}function Gt(e){const t={leftFilter:e[0]};let n=t;for(let s=1;s<e.length;s++)n.Operator=yt.LogAccessFilterOperator.OR,s===e.length-1?n.rightFilter=e[s]:(n.rightBinaryFilter={BinaryLogFilter:[{leftFilter:e[s]}]},n=n.rightBinaryFilter.BinaryLogFilter[0]);return t}function Vt(e){const[t,...n]=e,s={};if(1===t.length?s.leftFilter=t[0]:s.leftBinaryFilter={BinaryLogFilter:[Gt(t)]},0===n.length)return s;if(s.Operator=yt.LogAccessFilterOperator.AND,1===n.length){const[e]=n;1===e.length?s.rightFilter=e[0]:s.rightBinaryFilter={BinaryLogFilter:[Gt(e)]}}else s.rightBinaryFilter={BinaryLogFilter:[Vt(n)]};return s}function Qt(e){const t=/* @__PURE__ */new Map;for(const o of e){const e=t.get(o.SearchField);e?e.push(o):t.set(o.SearchField,[o])}const n=[...t.values()];if(0===n.length)return{leftFilter:{LogCategory:yt.LogAccessType.All}};const[s,...r]=n,i={};if(1===s.length?i.leftFilter=s[0]:i.leftBinaryFilter={BinaryLogFilter:[Gt(s)]},0===r.length)return i;if(i.Operator=yt.LogAccessFilterOperator.AND,1===r.length){const[e]=r;1===e.length?i.rightFilter=e[0]:i.rightBinaryFilter={BinaryLogFilter:[Gt(e)]}}else i.rightBinaryFilter={BinaryLogFilter:[Vt(r)]};return i}t(kt,"buildFilters"),t(Gt,"buildOrGroup"),t(Vt,"buildAndChain"),t(Qt,"buildFilterTree");const Bt=class _LogaccessService extends Pt{_logAccessInfo;GetLogAccessInfo(e={}){return this._logAccessInfo||(this._logAccessInfo=super.GetLogAccessInfo(e)),this._logAccessInfo}GetLogs(e){return super.GetLogs(e)}convertLogLine(e,t){const n={},s=t?.fields?Object.assign({},...t.fields):null;for(const r in e)n[r]=s?s[e[r]]??"":"";return n}async GetLogsEx(e){const t=await this.GetLogAccessInfo(),n={};t.Columns.Column.forEach(e=>n[e.LogType]=e.Name);const s=kt(e,n),r={StartDate:e.StartDate instanceof Date?e.StartDate.toISOString():/* @__PURE__ */new Date(0).toISOString()};e.EndDate instanceof Date&&(r.EndDate=e.EndDate.toISOString());const i={Filter:Qt(s),Range:r,LogLineStartFrom:e.LogLineStartFrom??0,LogLineLimit:e.LogLineLimit??100,SelectColumnMode:yt.LogSelectColumnMode.DEFAULT,Format:"JSON",SortBy:{SortCondition:[{BySortType:yt.SortColumType.ByDate,ColumnName:"",Direction:0}]}};return this.GetLogs(i).then(e=>{try{const s=JSON.parse(e.LogLines);return{lines:Mt.has(t.RemoteLogManagerType)?s.lines?.map(e=>this.convertLogLine(n,e))??[]:(xt.warning(`Unknown RemoteLogManagerType: ${t.RemoteLogManagerType}`),[]),total:e.TotalLogLinesAvailable??1e4}}catch(s){xt.error(s.message??s)}return{lines:[],total:0}})}};t(Bt,"LogaccessService");let Ot=Bt;function Xt(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Ht(e){return 1===e.length&&(e=$t(e)),{left:/* @__PURE__ */t(function(t,n,s,r){for(null==s&&(s=0),null==r&&(r=t.length);s<r;){var i=s+r>>>1;e(t[i],n)<0?s=i+1:r=i}return s},"left"),right:/* @__PURE__ */t(function(t,n,s,r){for(null==s&&(s=0),null==r&&(r=t.length);s<r;){var i=s+r>>>1;e(t[i],n)>0?r=i:s=i+1}return s},"right")}}function $t(e){return function(t,n){return Xt(e(t),n)}}function Jt(e){return null===e?NaN:+e}function qt(e,t){var n,s,r=e.length,i=-1;if(null==t){for(;++i<r;)if(null!=(n=e[i])&&n>=n)for(s=n;++i<r;)null!=(n=e[i])&&n>s&&(s=n)}else for(;++i<r;)if(null!=(n=t(e[i],i,e))&&n>=n)for(s=n;++i<r;)null!=(n=t(e[i],i,e))&&n>s&&(s=n);return s}function Yt(e,t){var n,s=e.length,r=s,i=-1,o=0;if(null==t)for(;++i<s;)isNaN(n=Jt(e[i]))?--r:o+=n;else for(;++i<s;)isNaN(n=Jt(t(e[i],i,e)))?--r:o+=n;if(r)return o/r}var zt,Zt,Kt,en;t(Xt,"ascending"),t(Ht,"bisector"),t($t,"ascendingComparator"),Ht(Xt),t(Jt,"number"),t(qt,"d3Max"),t(Yt,"d3Mean"),Zt=zt||(zt={}),(Kt=Zt.ThresholdType||(Zt.ThresholdType={}))[Kt.THRESHOLD_PERCENTAGE=0]="THRESHOLD_PERCENTAGE",Kt[Kt.THRESHOLD_MB=1]="THRESHOLD_MB",(en=Zt.TpMachineType||(Zt.TpMachineType={})).ALLNODES="ALLNODES",en.THORMACHINES="THORMACHINES",en.HOLEMACHINES="HOLEMACHINES",en.ROXIEMACHINES="ROXIEMACHINES",en.MACHINES="MACHINES",en.AVAILABLEMACHINES="AVAILABLEMACHINES",en.DROPZONE="DROPZONE",en.STANDBYNNODE="STANDBYNNODE",en.THORSPARENODES="THORSPARENODES",en.HOLESTANDBYNODES="HOLESTANDBYNODES";const tn=class _MachineServiceBase extends te{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")}};t(tn,"MachineServiceBase");let nn=tn;const sn=class _MachineService extends nn{GetTargetClusterUsageEx(e,t=!1){return this._connection.send("GetTargetClusterUsage",{TargetClusters:e?{Item:e}:{},BypassCachedResult:t}).then(e=>c("TargetClusterUsages.TargetClusterUsage",e)?e.TargetClusterUsages.TargetClusterUsage:[]).then(e=>e.filter(e=>!!e.ComponentUsages).map(e=>{const t=e.ComponentUsages.ComponentUsage.map(e=>{const t=(e.MachineUsages&&e.MachineUsages.MachineUsage?e.MachineUsages.MachineUsage:[]).map(e=>{const t=e.DiskUsages&&e.DiskUsages.DiskUsage?e.DiskUsages.DiskUsage.map(e=>({...e,InUse:1024*e.InUse,Total:1024*(e.InUse+e.Available),PercentUsed:100-e.PercentAvailable})):[];return{Name:e.Name,NetAddress:e.NetAddress,Description:e.Description,DiskUsages:t,mean:Yt(t.filter(e=>!isNaN(e.PercentUsed)),e=>e.PercentUsed),max:qt(t.filter(e=>!isNaN(e.PercentUsed)),e=>e.PercentUsed)}});return{Type:e.Type,Name:e.Name,Description:e.Description,MachineUsages:t,MachineUsagesDescription:t.reduce((e,t)=>e+(t.Description||""),""),mean:Yt(t.filter(e=>!isNaN(e.mean)),e=>e.mean),max:qt(t.filter(e=>!isNaN(e.max)),e=>e.max)}});return{Name:e.Name,Description:e.Description,ComponentUsages:t,ComponentUsagesDescription:t.reduce((e,t)=>e+(t.MachineUsagesDescription||""),""),mean:Yt(t.filter(e=>!isNaN(e.mean)),e=>e.mean),max:qt(t.filter(e=>!isNaN(e.max)),e=>e.max)}}))}};t(sn,"MachineService");let rn=sn;const on=class _PackageProcessServiceBase extends te{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")}};t(on,"PackageProcessServiceBase");let cn=on;const an=class _PackageProcessService extends cn{};t(an,"PackageProcessService");let un=an;const hn=class _ResourcesServiceBase extends te{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)}};t(hn,"ResourcesServiceBase");let ln=hn;const pn=class _ResourcesService extends ln{};t(pn,"ResourcesService");let dn=pn;var gn,mn,Sn;mn=gn||(gn={}),(Sn=mn.WUTypes||(mn.WUTypes={})).ECL="ECL",Sn.DFU="DFU";const fn=class _SashaServiceBase extends te{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")}};t(fn,"SashaServiceBase");let _n=fn;const Un=class _SashaService extends _n{};t(Un,"SashaService");let yn=Un;var Cn=/* @__PURE__ */new Date,Dn=/* @__PURE__ */new Date;function Rn(e,n,s,r){function i(t){return e(t=0===arguments.length?/* @__PURE__ */new Date:/* @__PURE__ */new Date(+t)),t}return t(i,"interval"),i.floor=function(t){return e(t=/* @__PURE__ */new Date(+t)),t},i.ceil=function(t){return e(t=new Date(t-1)),n(t,1),e(t),t},i.round=function(e){var t=i(e),n=i.ceil(e);return e-t<n-e?t:n},i.offset=function(e,t){return n(e=/* @__PURE__ */new Date(+e),null==t?1:Math.floor(t)),e},i.range=function(t,s,r){var o,c=[];if(t=i.ceil(t),r=null==r?1:Math.floor(r),!(t<s&&r>0))return c;do{c.push(o=/* @__PURE__ */new Date(+t)),n(t,r),e(t)}while(o<t&&t<s);return c},i.filter=function(t){return Rn(function(n){if(n>=n)for(;e(n),!t(n);)n.setTime(n-1)},function(e,s){if(e>=e)if(s<0)for(;++s<=0;)for(;n(e,-1),!t(e););else for(;--s>=0;)for(;n(e,1),!t(e););})},s&&(i.count=function(t,n){return Cn.setTime(+t),Dn.setTime(+n),e(Cn),e(Dn),Math.floor(s(Cn,Dn))},i.every=function(e){return e=Math.floor(e),isFinite(e)&&e>0?e>1?i.filter(r?function(t){return r(t)%e===0}:function(t){return i.count(0,t)%e===0}):i:null}),i}t(Rn,"newInterval");var bn=864e5,Fn=6048e5,Wn=Rn(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/bn},function(e){return e.getDate()-1});function vn(e){return Rn(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-6e4*(t.getTimezoneOffset()-e.getTimezoneOffset()))/Fn})}Wn.range,t(vn,"weekday");var Tn=vn(0),An=vn(1),wn=vn(2),Pn=vn(3),xn=vn(4),Ln=vn(5),En=vn(6);Tn.range,An.range,wn.range,Pn.range,xn.range,Ln.range,En.range;var Mn=Rn(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});Mn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Rn(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,n){t.setFullYear(t.getFullYear()+n*e)}):null},Mn.range;var Nn=Rn(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/bn},function(e){return e.getUTCDate()-1});function In(e){return Rn(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/Fn})}Nn.range,t(In,"utcWeekday");var jn=In(0),kn=In(1),Gn=In(2),Vn=In(3),Qn=In(4),Bn=In(5),On=In(6);jn.range,kn.range,Gn.range,Vn.range,Qn.range,Bn.range,On.range;var Xn=Rn(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});function Hn(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function $n(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function Jn(e,t,n){return{y:e,m:t,d:n,H:0,M:0,S:0,L:0}}function qn(e){var n=e.dateTime,s=e.date,r=e.time,i=e.periods,o=e.days,c=e.shortDays,a=e.months,u=e.shortMonths,h=hs(i),l=ls(i),p=hs(o),d=ls(o),g=hs(c),m=ls(c),S=hs(a),f=ls(a),_=hs(u),U=ls(u),y={a:E,A:M,b:N,B:I,c:null,d:xs,e:xs,f:Is,g:Js,G:Ys,H:Ls,I:Es,j:Ms,L:Ns,m:js,M:ks,p:j,q:k,Q:Ur,s:yr,S:Gs,u:Vs,U:Qs,V:Os,w:Xs,W:Hs,x:null,X:null,y:$s,Y:qs,Z:zs,"%":_r},C={a:G,A:V,b:Q,B:B,c:null,d:Zs,e:Zs,f:sr,g:gr,G:Sr,H:Ks,I:er,j:tr,L:nr,m:rr,M:ir,p:O,q:X,Q:Ur,s:yr,S:or,u:cr,U:ar,V:hr,w:lr,W:pr,x:null,X:null,y:dr,Y:mr,Z:fr,"%":_r},D={a:v,A:T,b:A,B:w,c:P,d:Ds,e:Ds,f:Ts,g:_s,G:fs,H:bs,I:bs,j:Rs,L:vs,m:Cs,M:Fs,p:W,q:ys,Q:ws,s:Ps,S:Ws,u:ds,U:gs,V:ms,w:ps,W:Ss,x:x,X:L,y:_s,Y:fs,Z:Us,"%":As};function R(e,t){return function(n){var s,r,i,o=[],c=-1,a=0,u=e.length;for(n instanceof Date||(n=/* @__PURE__ */new Date(+n));++c<u;)37===e.charCodeAt(c)&&(o.push(e.slice(a,c)),null!=(r=rs[s=e.charAt(++c)])?s=e.charAt(++c):r="e"===s?" ":"0",(i=t[s])&&(s=i(n,r)),o.push(s),a=c+1);return o.push(e.slice(a,c)),o.join("")}}function b(e,t){return function(n){var s,r,i=Jn(1900,void 0,1);if(F(i,e,n+="",0)!=n.length)return null;if("Q"in i)return new Date(i.Q);if("s"in i)return new Date(1e3*i.s+("L"in i?i.L:0));if(t&&!("Z"in i)&&(i.Z=0),"p"in i&&(i.H=i.H%12+12*i.p),void 0===i.m&&(i.m="q"in i?i.q:0),"V"in i){if(i.V<1||i.V>53)return null;"w"in i||(i.w=1),"Z"in i?(r=(s=$n(Jn(i.y,0,1))).getUTCDay(),s=r>4||0===r?kn.ceil(s):kn(s),s=Nn.offset(s,7*(i.V-1)),i.y=s.getUTCFullYear(),i.m=s.getUTCMonth(),i.d=s.getUTCDate()+(i.w+6)%7):(r=(s=Hn(Jn(i.y,0,1))).getDay(),s=r>4||0===r?An.ceil(s):An(s),s=Wn.offset(s,7*(i.V-1)),i.y=s.getFullYear(),i.m=s.getMonth(),i.d=s.getDate()+(i.w+6)%7)}else("W"in i||"U"in i)&&("w"in i||(i.w="u"in i?i.u%7:"W"in i?1:0),r="Z"in i?$n(Jn(i.y,0,1)).getUTCDay():Hn(Jn(i.y,0,1)).getDay(),i.m=0,i.d="W"in i?(i.w+6)%7+7*i.W-(r+5)%7:i.w+7*i.U-(r+6)%7);return"Z"in i?(i.H+=i.Z/100|0,i.M+=i.Z%100,$n(i)):Hn(i)}}function F(e,t,n,s){for(var r,i,o=0,c=t.length,a=n.length;o<c;){if(s>=a)return-1;if(37===(r=t.charCodeAt(o++))){if(r=t.charAt(o++),!(i=D[r in rs?t.charAt(o++):r])||(s=i(e,n,s))<0)return-1}else if(r!=n.charCodeAt(s++))return-1}return s}function W(e,t,n){var s=h.exec(t.slice(n));return s?(e.p=l[s[0].toLowerCase()],n+s[0].length):-1}function v(e,t,n){var s=g.exec(t.slice(n));return s?(e.w=m[s[0].toLowerCase()],n+s[0].length):-1}function T(e,t,n){var s=p.exec(t.slice(n));return s?(e.w=d[s[0].toLowerCase()],n+s[0].length):-1}function A(e,t,n){var s=_.exec(t.slice(n));return s?(e.m=U[s[0].toLowerCase()],n+s[0].length):-1}function w(e,t,n){var s=S.exec(t.slice(n));return s?(e.m=f[s[0].toLowerCase()],n+s[0].length):-1}function P(e,t,s){return F(e,n,t,s)}function x(e,t,n){return F(e,s,t,n)}function L(e,t,n){return F(e,r,t,n)}function E(e){return c[e.getDay()]}function M(e){return o[e.getDay()]}function N(e){return u[e.getMonth()]}function I(e){return a[e.getMonth()]}function j(e){return i[+(e.getHours()>=12)]}function k(e){return 1+~~(e.getMonth()/3)}function G(e){return c[e.getUTCDay()]}function V(e){return o[e.getUTCDay()]}function Q(e){return u[e.getUTCMonth()]}function B(e){return a[e.getUTCMonth()]}function O(e){return i[+(e.getUTCHours()>=12)]}function X(e){return 1+~~(e.getUTCMonth()/3)}return y.x=R(s,y),y.X=R(r,y),y.c=R(n,y),C.x=R(s,C),C.X=R(r,C),C.c=R(n,C),t(R,"newFormat"),t(b,"newParse"),t(F,"parseSpecifier"),t(W,"parsePeriod"),t(v,"parseShortWeekday"),t(T,"parseWeekday"),t(A,"parseShortMonth"),t(w,"parseMonth"),t(P,"parseLocaleDateTime"),t(x,"parseLocaleDate"),t(L,"parseLocaleTime"),t(E,"formatShortWeekday"),t(M,"formatWeekday"),t(N,"formatShortMonth"),t(I,"formatMonth"),t(j,"formatPeriod"),t(k,"formatQuarter"),t(G,"formatUTCShortWeekday"),t(V,"formatUTCWeekday"),t(Q,"formatUTCShortMonth"),t(B,"formatUTCMonth"),t(O,"formatUTCPeriod"),t(X,"formatUTCQuarter"),{format:/* @__PURE__ */t(function(e){var t=R(e+="",y);return t.toString=function(){return e},t},"format"),parse:/* @__PURE__ */t(function(e){var t=b(e+="",!1);return t.toString=function(){return e},t},"parse"),utcFormat:/* @__PURE__ */t(function(e){var t=R(e+="",C);return t.toString=function(){return e},t},"utcFormat"),utcParse:/* @__PURE__ */t(function(e){var t=b(e+="",!0);return t.toString=function(){return e},t},"utcParse")}}Xn.every=function(e){return isFinite(e=Math.floor(e))&&e>0?Rn(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,n){t.setUTCFullYear(t.getUTCFullYear()+n*e)}):null},Xn.range,t(Hn,"localDate"),t($n,"utcDate"),t(Jn,"newDate"),t(qn,"formatLocale$1");var Yn,zn,Zn,Kn,es,ts,ns,ss,rs={"-":"",_:" ",0:"0"},is=/^\s*\d+/,os=/^%/,cs=/[\\^$*+?|[\]().{}]/g;function as(e,t,n){var s=e<0?"-":"",r=(s?-e:e)+"",i=r.length;return s+(i<n?new Array(n-i+1).join(t)+r:r)}function us(e){return e.replace(cs,"\\$&")}function hs(e){return new RegExp("^(?:"+e.map(us).join("|")+")","i")}function ls(e){for(var t={},n=-1,s=e.length;++n<s;)t[e[n].toLowerCase()]=n;return t}function ps(e,t,n){var s=is.exec(t.slice(n,n+1));return s?(e.w=+s[0],n+s[0].length):-1}function ds(e,t,n){var s=is.exec(t.slice(n,n+1));return s?(e.u=+s[0],n+s[0].length):-1}function gs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.U=+s[0],n+s[0].length):-1}function ms(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.V=+s[0],n+s[0].length):-1}function Ss(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.W=+s[0],n+s[0].length):-1}function fs(e,t,n){var s=is.exec(t.slice(n,n+4));return s?(e.y=+s[0],n+s[0].length):-1}function _s(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.y=+s[0]+(+s[0]>68?1900:2e3),n+s[0].length):-1}function Us(e,t,n){var s=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(n,n+6));return s?(e.Z=s[1]?0:-(s[2]+(s[3]||"00")),n+s[0].length):-1}function ys(e,t,n){var s=is.exec(t.slice(n,n+1));return s?(e.q=3*s[0]-3,n+s[0].length):-1}function Cs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.m=s[0]-1,n+s[0].length):-1}function Ds(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.d=+s[0],n+s[0].length):-1}function Rs(e,t,n){var s=is.exec(t.slice(n,n+3));return s?(e.m=0,e.d=+s[0],n+s[0].length):-1}function bs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.H=+s[0],n+s[0].length):-1}function Fs(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.M=+s[0],n+s[0].length):-1}function Ws(e,t,n){var s=is.exec(t.slice(n,n+2));return s?(e.S=+s[0],n+s[0].length):-1}function vs(e,t,n){var s=is.exec(t.slice(n,n+3));return s?(e.L=+s[0],n+s[0].length):-1}function Ts(e,t,n){var s=is.exec(t.slice(n,n+6));return s?(e.L=Math.floor(s[0]/1e3),n+s[0].length):-1}function As(e,t,n){var s=os.exec(t.slice(n,n+1));return s?n+s[0].length:-1}function ws(e,t,n){var s=is.exec(t.slice(n));return s?(e.Q=+s[0],n+s[0].length):-1}function Ps(e,t,n){var s=is.exec(t.slice(n));return s?(e.s=+s[0],n+s[0].length):-1}function xs(e,t){return as(e.getDate(),t,2)}function Ls(e,t){return as(e.getHours(),t,2)}function Es(e,t){return as(e.getHours()%12||12,t,2)}function Ms(e,t){return as(1+Wn.count(Mn(e),e),t,3)}function Ns(e,t){return as(e.getMilliseconds(),t,3)}function Is(e,t){return Ns(e,t)+"000"}function js(e,t){return as(e.getMonth()+1,t,2)}function ks(e,t){return as(e.getMinutes(),t,2)}function Gs(e,t){return as(e.getSeconds(),t,2)}function Vs(e){var t=e.getDay();return 0===t?7:t}function Qs(e,t){return as(Tn.count(Mn(e)-1,e),t,2)}function Bs(e){var t=e.getDay();return t>=4||0===t?xn(e):xn.ceil(e)}function Os(e,t){return e=Bs(e),as(xn.count(Mn(e),e)+(4===Mn(e).getDay()),t,2)}function Xs(e){return e.getDay()}function Hs(e,t){return as(An.count(Mn(e)-1,e),t,2)}function $s(e,t){return as(e.getFullYear()%100,t,2)}function Js(e,t){return as((e=Bs(e)).getFullYear()%100,t,2)}function qs(e,t){return as(e.getFullYear()%1e4,t,4)}function Ys(e,t){var n=e.getDay();return as((e=n>=4||0===n?xn(e):xn.ceil(e)).getFullYear()%1e4,t,4)}function zs(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+as(t/60|0,"0",2)+as(t%60,"0",2)}function Zs(e,t){return as(e.getUTCDate(),t,2)}function Ks(e,t){return as(e.getUTCHours(),t,2)}function er(e,t){return as(e.getUTCHours()%12||12,t,2)}function tr(e,t){return as(1+Nn.count(Xn(e),e),t,3)}function nr(e,t){return as(e.getUTCMilliseconds(),t,3)}function sr(e,t){return nr(e,t)+"000"}function rr(e,t){return as(e.getUTCMonth()+1,t,2)}function ir(e,t){return as(e.getUTCMinutes(),t,2)}function or(e,t){return as(e.getUTCSeconds(),t,2)}function cr(e){var t=e.getUTCDay();return 0===t?7:t}function ar(e,t){return as(jn.count(Xn(e)-1,e),t,2)}function ur(e){var t=e.getUTCDay();return t>=4||0===t?Qn(e):Qn.ceil(e)}function hr(e,t){return e=ur(e),as(Qn.count(Xn(e),e)+(4===Xn(e).getUTCDay()),t,2)}function lr(e){return e.getUTCDay()}function pr(e,t){return as(kn.count(Xn(e)-1,e),t,2)}function dr(e,t){return as(e.getUTCFullYear()%100,t,2)}function gr(e,t){return as((e=ur(e)).getUTCFullYear()%100,t,2)}function mr(e,t){return as(e.getUTCFullYear()%1e4,t,4)}function Sr(e,t){var n=e.getUTCDay();return as((e=n>=4||0===n?Qn(e):Qn.ceil(e)).getUTCFullYear()%1e4,t,4)}function fr(){return"+0000"}function _r(){return"%"}function Ur(e){return+e}function yr(e){return Math.floor(+e/1e3)}function Cr(e){return(Yn=qn(e)).format,zn=Yn.parse,Zn=Yn.utcFormat,Kn=Yn.utcParse,Yn}t(as,"pad"),t(us,"requote"),t(hs,"formatRe"),t(ls,"formatLookup"),t(ps,"parseWeekdayNumberSunday"),t(ds,"parseWeekdayNumberMonday"),t(gs,"parseWeekNumberSunday"),t(ms,"parseWeekNumberISO"),t(Ss,"parseWeekNumberMonday"),t(fs,"parseFullYear"),t(_s,"parseYear"),t(Us,"parseZone"),t(ys,"parseQuarter"),t(Cs,"parseMonthNumber"),t(Ds,"parseDayOfMonth"),t(Rs,"parseDayOfYear"),t(bs,"parseHour24"),t(Fs,"parseMinutes"),t(Ws,"parseSeconds"),t(vs,"parseMilliseconds"),t(Ts,"parseMicroseconds"),t(As,"parseLiteralPercent"),t(ws,"parseUnixTimestamp"),t(Ps,"parseUnixTimestampSeconds"),t(xs,"formatDayOfMonth"),t(Ls,"formatHour24"),t(Es,"formatHour12"),t(Ms,"formatDayOfYear"),t(Ns,"formatMilliseconds"),t(Is,"formatMicroseconds"),t(js,"formatMonthNumber"),t(ks,"formatMinutes"),t(Gs,"formatSeconds"),t(Vs,"formatWeekdayNumberMonday"),t(Qs,"formatWeekNumberSunday"),t(Bs,"dISO"),t(Os,"formatWeekNumberISO"),t(Xs,"formatWeekdayNumberSunday"),t(Hs,"formatWeekNumberMonday"),t($s,"formatYear"),t(Js,"formatYearISO"),t(qs,"formatFullYear"),t(Ys,"formatFullYearISO"),t(zs,"formatZone"),t(Zs,"formatUTCDayOfMonth"),t(Ks,"formatUTCHour24"),t(er,"formatUTCHour12"),t(tr,"formatUTCDayOfYear"),t(nr,"formatUTCMilliseconds"),t(sr,"formatUTCMicroseconds"),t(rr,"formatUTCMonthNumber"),t(ir,"formatUTCMinutes"),t(or,"formatUTCSeconds"),t(cr,"formatUTCWeekdayNumberMonday"),t(ar,"formatUTCWeekNumberSunday"),t(ur,"UTCdISO"),t(hr,"formatUTCWeekNumberISO"),t(lr,"formatUTCWeekdayNumberSunday"),t(pr,"formatUTCWeekNumberMonday"),t(dr,"formatUTCYear"),t(gr,"formatUTCYearISO"),t(mr,"formatUTCFullYear"),t(Sr,"formatUTCFullYearISO"),t(fr,"formatUTCZone"),t(_r,"formatLiteralPercent"),t(Ur,"formatUnixTimestamp"),t(yr,"formatUnixTimestampSeconds"),Cr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]}),t(Cr,"defaultLocale$1"),ts=es||(es={}),(ns=ts.LockModes||(ts.LockModes={})).ALL="ALL",ns.READ="READ",ns.WRITE="WRITE",ns.HOLD="HOLD",ns.SUB="SUB",(ss=ts.RoxieControlCmdType||(ts.RoxieControlCmdType={})).Attach="Attach",ss.Detach="Detach",ss.State="State",ss.Reload="Reload",ss.ReloadRetry="ReloadRetry",ss.MemLock="MemLock",ss.MemUnlock="MemUnlock",ss.GetMemLocked="GetMemLocked";const Dr=class _SMCServiceBase extends te{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")}};t(Dr,"SMCServiceBase");let Rr=Dr;const br=zn("%Y%m%d%H");function Fr(e){return"number"==typeof e||"string"==typeof e&&""!==e.trim()&&!isNaN(+e)}t(Fr,"isNumeric");const Wr=class _SMCService extends Rr{connectionOptions(){return this._connection.opts()}Activity(e){return super.Activity(e).then(e=>({Running:{ActiveWorkunit:[]},...e}))}parseGlobalMetric(e,t){return e.startsWith("Cost")?+t/1e6:e.startsWith("Date")?br(t):e.startsWith("Num")?+t:e.startsWith("Time")?+t/1e9:e.startsWith("When")?new Date(+t/1e3).toISOString():Fr(t)?+t:t}GetNormalisedGlobalMetrics(e){return super.GetGlobalMetrics(e).then(e=>{const t=[];for(const n of e?.GlobalMetrics?.GlobalMetric||[]){const e={Category:n.Category,Start:this.parseGlobalMetric("Date",n.DateTimeRange?.Start),End:this.parseGlobalMetric("Date",n.DateTimeRange?.End),dimensions:{},stats:{}};for(const t of n.Dimensions?.Dimension||[])e.dimensions[t.Name]=t.Value;for(const t of n.Stats?.Stat||[])e.stats[t.Name]=this.parseGlobalMetric(t.Name,t.Value);t.push(e)}return t})}};t(Wr,"SMCService");let vr=Wr;const Tr=class _storeServiceBase extends te{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")}};t(Tr,"storeServiceBase");let Ar=Tr;const wr=class _StoreService extends Ar{Delete(e){return super.Delete(e).catch(e=>{if(e.isESPExceptions&&e.Exception.some(e=>-1===e.Code))return{Exceptions:void 0,Success:!0};throw e})}Fetch(e){return super.Fetch(e).catch(e=>{if(e.isESPExceptions&&e.Exception.some(e=>-1===e.Code))return{Exceptions:void 0,Value:void 0};throw e})}};t(wr,"StoreService");let Pr=wr;var xr,Lr,Er,Mr;Lr=xr||(xr={}),(Er=Lr.TpConfigResponseFormat||(Lr.TpConfigResponseFormat={})).XML="XML",Er.YAML="YAML",(Mr=Lr.RoxieQueueFilter||(Lr.RoxieQueueFilter={})).All="All",Mr.QueriesOnly="QueriesOnly",Mr.WorkunitsOnly="WorkunitsOnly",(e=>{e.ALLNODES="ALLNODES",e.THORMACHINES="THORMACHINES",e.HOLEMACHINES="HOLEMACHINES",e.ROXIEMACHINES="ROXIEMACHINES",e.MACHINES="MACHINES",e.AVAILABLEMACHINES="AVAILABLEMACHINES",e.DROPZONE="DROPZONE",e.STANDBYNNODE="STANDBYNNODE",e.THORSPARENODES="THORSPARENODES",e.HOLESTANDBYNODES="HOLESTANDBYNODES"})(Lr.TpMachineType||(Lr.TpMachineType={}));const Nr=class _TopologyServiceBase extends te{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")}};t(Nr,"TopologyServiceBase");let Ir=Nr;const jr=class _TopologyService extends Ir{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(e=>{if(e.default)return e.default;let t,n;return e.TpLogicalClusters.TpLogicalCluster.some((e,s)=>(0===s&&(n=e),"hthor"===e.Type&&(t=e,!0))),t||n})}};t(jr,"TopologyService");let kr=jr;var Gr,Vr,Qr,Br,Or,Xr,Hr,$r,Jr,qr,Yr,zr,Zr,Kr,ei;Vr=Gr||(Gr={}),(Qr=Vr.ECLWUActions||(Vr.ECLWUActions={})).Abort="Abort",Qr.Delete="Delete",Qr.Deschedule="Deschedule",Qr.Reschedule="Reschedule",Qr.Pause="Pause",Qr.PauseNow="PauseNow",Qr.Protect="Protect",Qr.Unprotect="Unprotect",Qr.Restore="Restore",Qr.Resume="Resume",Qr.SetToFailed="SetToFailed",Qr.Archive="Archive",(e=>{e[e.MIN=0]="MIN",e[e.DEFAULT=1]="DEFAULT",e[e.ALL=2]="ALL",e[e.CUSTOM=3]="CUSTOM"})(Vr.LogSelectColumnMode||(Vr.LogSelectColumnMode={})),(e=>{e[e.ASC=0]="ASC",e[e.DSC=1]="DSC"})(Vr.SortDirection||(Vr.SortDirection={})),(Br=Vr.LogEventClass||(Vr.LogEventClass={})).ALL="ALL",Br.DIS="DIS",Br.ERR="ERR",Br.WRN="WRN",Br.INF="INF",Br.PRO="PRO",Br.MET="MET",Br.EVT="EVT",(Or=Vr.WUDetailsAttrValueType||(Vr.WUDetailsAttrValueType={})).Single="Single",Or.List="List",Or.Multi="Multi",(Xr=Vr.EclDefinitionActions||(Vr.EclDefinitionActions={})).SyntaxCheck="SyntaxCheck",Xr.Deploy="Deploy",Xr.Publish="Publish",(Hr=Vr.ErrorMessageFormat||(Vr.ErrorMessageFormat={})).xml="xml",Hr.json="json",Hr.text="text",($r=Vr.LogAccessLogFormat||(Vr.LogAccessLogFormat={}))[$r.XML=0]="XML",$r[$r.JSON=1]="JSON",$r[$r.CSV=2]="CSV",(Jr=Vr.WUExceptionSeverity||(Vr.WUExceptionSeverity={})).info="info",Jr.warning="warning",Jr.error="error",Jr.alert="alert",(qr=Vr.WUQueryFilterSuspendedType||(Vr.WUQueryFilterSuspendedType={})).Allqueries="All queries",qr.Notsuspended="Not suspended",qr.Suspended="Suspended",qr.Suspendedbyuser="Suspended by user",qr.Suspendedbyfirstnode="Suspended by first node",qr.Suspendedbyanynode="Suspended by any node",(Yr=Vr.WUQuerySetFilterType||(Vr.WUQuerySetFilterType={})).All="All",Yr.Id="Id",Yr.Name="Name",Yr.Alias="Alias",Yr.Status="Status",(zr=Vr.WUProtectFilter||(Vr.WUProtectFilter={})).All="All",zr.Protected="Protected",zr.NotProtected="NotProtected",(Vr.QuerySetAliasActionTypes||(Vr.QuerySetAliasActionTypes={})).Deactivate="Deactivate",(Zr=Vr.QuerysetImportActivation||(Vr.QuerysetImportActivation={})).None="None",Zr.ActivateImportedActive="ActivateImportedActive",(Kr=Vr.QuerySetQueryActionTypes||(Vr.QuerySetQueryActionTypes={})).Suspend="Suspend",Kr.Unsuspend="Unsuspend",Kr.ToggleSuspend="ToggleSuspend",Kr.Activate="Activate",Kr.Delete="Delete",Kr.DeleteQueriesAndWUs="DeleteQueriesAndWUs",Kr.RemoveAllAliases="RemoveAllAliases",Kr.ResetQueryStats="ResetQueryStats",(ei=Vr.WUQueryActivationMode||(Vr.WUQueryActivationMode={}))[ei.DoNotActivateQuery=0]="DoNotActivateQuery",ei[ei.ActivateQuery=1]="ActivateQuery",ei[ei.ActivateQuerySuspendPrevious=2]="ActivateQuerySuspendPrevious",ei[ei.ActivateQueryDeletePrevious=3]="ActivateQueryDeletePrevious";const ti=class _WorkunitsServiceBase extends te{constructor(e){super(e,"WsWorkunits","2.08")}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")}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")}};t(ti,"WorkunitsServiceBase");let ni=ti;var si,ri,ii,oi=/* @__PURE__ */(e=>(e[e.Unknown=0]="Unknown",e[e.Compiled=1]="Compiled",e[e.Running=2]="Running",e[e.Completed=3]="Completed",e[e.Failed=4]="Failed",e[e.Archived=5]="Archived",e[e.Aborting=6]="Aborting",e[e.Aborted=7]="Aborted",e[e.Blocked=8]="Blocked",e[e.Submitted=9]="Submitted",e[e.Scheduled=10]="Scheduled",e[e.Compiling=11]="Compiling",e[e.Wait=12]="Wait",e[e.UploadingFiled=13]="UploadingFiled",e[e.DebugPaused=14]="DebugPaused",e[e.DebugRunning=15]="DebugRunning",e[e.Paused=16]="Paused",e[e.LAST=17]="LAST",e[e.NotFound=999]="NotFound",e))(oi||{});function ci(e){return"string"==typeof e.Name}function ai(e){return void 0!==e.TotalClusterTime}function ui(e){return void 0!==e.StateEx}ri=si||(si={}),(ii=ri.Action||(ri.Action={}))[ii.Unknown=0]="Unknown",ii[ii.Compile=1]="Compile",ii[ii.Check=2]="Check",ii[ii.Run=3]="Run",ii[ii.ExecuteExisting=4]="ExecuteExisting",ii[ii.Pause=5]="Pause",ii[ii.PauseNow=6]="PauseNow",ii[ii.Resume=7]="Resume",ii[ii.Debug=8]="Debug",ii[ii.__size=9]="__size",t(ci,"isECLResult"),t(ai,"isWUQueryECLWorkunit"),t(ui,"isWUInfoWorkunit");const hi=class _WorkunitsService extends ni{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(e=>a({Workunits:{ECLWorkunit:[]}},e))}WUInfo(e){const 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(e=>{const t=u(e.Result).children();return t.length?t[0]:null})}};t(hi,"WorkunitsService");let li=hi;const pi=class _WorkunitsServiceEx extends ni{WUPublishWorkunitEx(e){return this._connection.send("WUPublishWorkunit",e)}};t(pi,"WorkunitsServiceEx");let di=pi;function gi(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function mi(e,t){if((n=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var n,s=e.slice(0,n);return[s.length>1?s[0]+s.slice(2):s,+e.slice(n+1)]}function Si(e){return(e=mi(Math.abs(e)))?e[1]:NaN}function fi(e,t){return function(n,s){for(var r=n.length,i=[],o=0,c=e[0],a=0;r>0&&c>0&&(a+c+1>s&&(c=Math.max(1,s-a)),i.push(n.substring(r-=c,r+c)),!((a+=c+1)>s));)c=e[o=(o+1)%e.length];return i.reverse().join(t)}}function _i(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}t(gi,"formatDecimal"),t(mi,"formatDecimalParts"),t(Si,"exponent"),t(fi,"formatGroup"),t(_i,"formatNumerals");var Ui,yi=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Ci(e){if(!(t=yi.exec(e)))throw new Error("invalid format: "+e);var t;return new Di({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function Di(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function Ri(e){e:for(var t,n=e.length,s=1,r=-1;s<n;++s)switch(e[s]){case".":r=t=s;break;case"0":0===r&&(r=s),t=s;break;default:if(!+e[s])break e;r>0&&(r=0)}return r>0?e.slice(0,r)+e.slice(t+1):e}function bi(e,t){var n=mi(e,t);if(!n)return e+"";var s=n[0],r=n[1],i=r-(Ui=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,o=s.length;return i===o?s:i>o?s+new Array(i-o+1).join("0"):i>0?s.slice(0,i)+"."+s.slice(i):"0."+new Array(1-i).join("0")+mi(e,Math.max(0,t+i-1))[0]}function Fi(e,t){var n=mi(e,t);if(!n)return e+"";var s=n[0],r=n[1];return r<0?"0."+new Array(-r).join("0")+s:s.length>r+1?s.slice(0,r+1)+"."+s.slice(r+1):s+new Array(r-s.length+2).join("0")}t(Ci,"formatSpecifier"),Ci.prototype=Di.prototype,t(Di,"FormatSpecifier"),Di.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type},t(Ri,"formatTrim"),t(bi,"formatPrefixAuto"),t(Fi,"formatRounded");const Wi={"%":/* @__PURE__ */t(function(e,t){return(100*e).toFixed(t)},"%"),b:/* @__PURE__ */t(function(e){return Math.round(e).toString(2)},"b"),c:/* @__PURE__ */t(function(e){return e+""},"c"),d:gi,e:/* @__PURE__ */t(function(e,t){return e.toExponential(t)},"e"),f:/* @__PURE__ */t(function(e,t){return e.toFixed(t)},"f"),g:/* @__PURE__ */t(function(e,t){return e.toPrecision(t)},"g"),o:/* @__PURE__ */t(function(e){return Math.round(e).toString(8)},"o"),p:/* @__PURE__ */t(function(e,t){return Fi(100*e,t)},"p"),r:Fi,s:bi,X:/* @__PURE__ */t(function(e){return Math.round(e).toString(16).toUpperCase()},"X"),x:/* @__PURE__ */t(function(e){return Math.round(e).toString(16)},"x")};function vi(e){return e}t(vi,"identity");var Ti,Ai,wi=Array.prototype.map,Pi=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function xi(e){var n=void 0===e.grouping||void 0===e.thousands?vi:fi(wi.call(e.grouping,Number),e.thousands+""),s=void 0===e.currency?"":e.currency[0]+"",r=void 0===e.currency?"":e.currency[1]+"",i=e.decimal+"",o=void 0===e.numerals?vi:_i(wi.call(e.numerals,String)),c=void 0===e.percent?"%":e.percent+"",a=e.minus+"",u=void 0===e.nan?"NaN":e.nan+"";function h(e){var h=(e=Ci(e)).fill,l=e.align,p=e.sign,d=e.symbol,g=e.zero,m=e.width,S=e.comma,f=e.precision,_=e.trim,U=e.type;"n"===U?(S=!0,U="g"):Wi[U]||(void 0===f&&(f=12),_=!0,U="g"),(g||"0"===h&&"="===l)&&(g=!0,h="0",l="=");var y="$"===d?s:"#"===d&&/[boxX]/.test(U)?"0"+U.toLowerCase():"",C="$"===d?r:/[%p]/.test(U)?c:"",D=Wi[U],R=/[defgprs%]/.test(U);function b(e){var t,s,r,c=y,d=C;if("c"===U)d=D(e)+d,e="";else{var b=(e=+e)<0||1/e<0;if(e=isNaN(e)?u:D(Math.abs(e),f),_&&(e=Ri(e)),b&&0===+e&&"+"!==p&&(b=!1),c=(b?"("===p?p:a:"-"===p||"("===p?"":p)+c,d=("s"===U?Pi[8+Ui/3]:"")+d+(b&&"("===p?")":""),R)for(t=-1,s=e.length;++t<s;)if(48>(r=e.charCodeAt(t))||r>57){d=(46===r?i+e.slice(t+1):e.slice(t))+d,e=e.slice(0,t);break}}S&&!g&&(e=n(e,1/0));var F=c.length+e.length+d.length,W=F<m?new Array(m-F+1).join(h):"";switch(S&&g&&(e=n(W+e,W.length?m-d.length:1/0),W=""),l){case"<":e=c+e+d+W;break;case"=":e=c+W+e+d;break;case"^":e=W.slice(0,F=W.length>>1)+c+e+d+W.slice(F);break;default:e=W+c+e+d}return o(e)}return f=void 0===f?6:/[gprs]/.test(U)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),t(b,"format"),b.toString=function(){return e+""},b}function l(e,t){var n=h(((e=Ci(e)).type="f",e)),s=3*Math.max(-8,Math.min(8,Math.floor(Si(t)/3))),r=Math.pow(10,-s),i=Pi[8+s/3];return function(e){return n(r*e)+i}}return t(h,"newFormat"),t(l,"formatPrefix"),{format:h,formatPrefix:l}}function Li(e){return Ti=xi(e),Ai=Ti.format,Ti.formatPrefix,Ti}t(xi,"formatLocale"),Li({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),t(Li,"defaultLocale");const Ei=class _ECLGraph extends h{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,n){super(),this.wu=e;let s=0;for(const r of n)if(r.GraphName===t.Name&&!r.HasSubGraphId){s=Math.round(1e3*r.Seconds)/1e3;break}this.set({Time:s,...t})}fetchScopeGraph(e){return e?this.wu.fetchGraphDetails([e],["subgraph"]).then(e=>so(e)):this.wu.fetchGraphDetails([this.Name],["graph"]).then(e=>so(e))}};t(Ei,"ECLGraph");let Mi=Ei;const Ni=class _GraphCache extends l{constructor(){super(e=>l.hash([e.Name]))}};t(Ni,"GraphCache");let Ii=Ni;function ji(e,t,n){(n=n||[]).push(e),t(e.name,e.$,e.children(),n),e.children().forEach(e=>{ji(e,t,n)}),n.pop()}function ki(e){const t={};return e.forEach(e=>{"att"===e.name&&(t[e.$.name]=e.$.value)}),t}t(ji,"walkXmlJson"),t(ki,"flattenAtt");const Gi=class _XGMMLGraph extends d{};t(Gi,"XGMMLGraph");let Vi=Gi;const Qi=class _XGMMLSubgraph extends g{};t(Qi,"XGMMLSubgraph");let Bi=Qi;const Oi=class _XGMMLVertex extends m{};t(Oi,"XGMMLVertex");let Xi=Oi;const Hi=class _XGMMLEdge extends p{};t(Hi,"XGMMLEdge");let $i=Hi;function Ji(e,t){const n={},s={},r={},i=new Vi(e=>e._.id),o=[i.root];return ji(t,(e,t,i,c)=>{const a=o[o.length-1];switch(e){case"graph":break;case"node":if(i.length&&i[0].children().length&&"graph"===i[0].children()[0].name){const e=a.createSubgraph(ki(i));o.push(e),n[t.id]=e}const e=a.createVertex(ki(i));s[t.id]=e;break;case"edge":const c=a.createEdge(s[t.source],s[t.target],ki(i));r[t.id]=c}}),i}t(Ji,"createXGMMLGraph");const qi=class _ScopeGraph extends d{};t(qi,"ScopeGraph");let Yi=qi;const zi=class _ScopeSubgraph extends g{};t(zi,"ScopeSubgraph");let Zi=zi;const Ki=class _ScopeVertex extends m{};t(Ki,"ScopeVertex");let eo=Ki;const to=class _ScopeEdge extends p{};t(to,"ScopeEdge");let no=to;function so(e){const t={},n={},s={};let r;for(const o of e)switch(o.ScopeType){case"graph":r=new Yi(e=>e._.Id,o),t[o.ScopeName]=r.root;break;case"subgraph":r||(r=new Yi(e=>e._.Id,o),t[o.ScopeName]=r.root);const e=o.parentScope().split(":");let i=t[o.parentScope()];for(;e.length&&!i;)i=t[e.join(":")],e.pop();if(i){const e=i;t[o.ScopeName]=e.createSubgraph(o)}else console.warn(`Missing SG:Parent (${o.Id}): ${o.parentScope()}`);break;case"activity":const c=t[o.parentScope()];c?s[o.ScopeName]=c.createVertex(o):console.warn(`Missing A:Parent (${o.Id}): ${o.parentScope()}`);break;case"edge":n[o.ScopeName]=o;break;case"function":const a=s[o.parentScope()];a?a._.children().push(o):console.warn(`Missing F:Parent (${o.Id}): ${o.parentScope()}`)}for(const o in n){const e=n[o],s=t[e.parentScope()];if(s){const t=s;try{const n=r.vertex(e.attr("IdSource").RawValue),s=r.vertex(e.attr("IdTarget").RawValue);t.createEdge(n,s,e)}catch(i){console.warn(`Invalid Edge: ${o}`)}}else console.warn(`Missing E:Parent (${e.Id}): ${e.parentScope()}`)}return r}t(so,"createGraph");const ro=class _Resource extends h{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;const n=t.split("\\").join("/"),s=n.split("/"),r="res/"+this.wu.Wuid+"/";let i="",o="";0===n.indexOf(r)&&(i=n.substr(r.length),o=s[s.length-1]),this.set({URL:t,DisplayName:o,DisplayPath:i})}};t(ro,"Resource");let io=ro;const oo=class _XSDNode{e;constructor(e){this.e=e}fix(){delete this.e}};t(oo,"XSDNode");let co=oo;const ao=class _XSDXMLNode extends co{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){const e=this._children[t];"Row"===e.name&&void 0===e.type&&(this._children.push(...e._children),this._children.splice(t,1))}const e=this.setOfType();e&&(this.type=e,this.isSet=!0,this._children=[])}children(){return this._children}isAll(e){return"All"===e.name&&void 0===e.type}setOfType(){const e=this.children();if(void 0===this.type&&2===e.length){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":case"xs:nonNegativeInteger":case"xs:double":e=8;break;case"xs:string":e=32;break;default:const t="0123456789",n=this.type.lastIndexOf("_"),s=n>0?n:this.type.length;let r=s-1;for(;r>=0&&-1!==t.indexOf(this.type.charAt(r));--r);r+1<s&&(e=parseInt(this.type.substring(r+1,s),10)),0===this.type.indexOf("data")&&(e*=2)}return e<this.name.length&&(e=this.name.length),e}};t(ao,"XSDXMLNode");let uo=ao;const ho=class _XSDSimpleType extends co{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}}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()}};t(ho,"XSDSimpleType");let lo=ho;const po=class _XSDSchema{root;simpleTypes={};fields(){return this.root.children()}};t(po,"XSDSchema");let go=po;const mo=class _XSDParser extends S{schema=new go;simpleType;simpleTypes={};xsdStack=new f;startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xs:element":const t=new uo(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 lo(e)}}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":const t=this.xsdStack.top();for(const n in e.$)t.attrs[n]=e.$[n];break;default:this.simpleType&&this.simpleType.append(e)}super.endXMLNode(e)}};t(mo,"XSDParser");let So=mo;function fo(e){const t=new So;return t.parse(e),t.schema}t(fo,"parseXSD");const _o=class _XSDParser2 extends So{_rootName;schema=new go;simpleTypes={};xsdStack=new f;constructor(e){super(),this._rootName=e}startXMLNode(e){switch(super.startXMLNode(e),e.name){case"xsd:element":const t=new uo(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 lo(e)}}endXMLNode(e){if("xsd:element"===e.name){this.xsdStack.pop().fix()}super.endXMLNode(e)}};t(_o,"XSDParser2");let Uo=_o;function yo(e,t){const n=new Uo(t);return n.parse(e),n.schema}t(yo,"parseXSD2");const Co=class _GlobalResultCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}-${e.ResultName}`)}};t(Co,"GlobalResultCache");let Do=Co;const Ro=new Do,bo=class _Result extends h{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,n,s){let r;return Array.isArray(s)?(r=Ro.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n.Name},()=>new _Result(e,t,n,s)),r.set(n)):void 0===s&&("number"==typeof n?r=Ro.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:"Sequence_"+n},()=>new _Result(e,t,n)):"string"==typeof n&&(r=Ro.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n},()=>new _Result(e,t,n)))),r}static attachLogicalFile(e,t,n){return Ro.get({BaseUrl:e.baseUrl,Wuid:t,ResultName:n},()=>new _Result(e,t,n,!0))}constructor(e,t,n,s){super(),this.connection=e instanceof li?e:new li(e),"boolean"==typeof s&&!0===s?this.set({NodeGroup:t,LogicalFileName:n}):ci(n)&&Array.isArray(s)?this.set({...n,Wuid:t,ResultName:n.Name,ResultViews:s}):void 0===s?"number"==typeof n?this.set({Wuid:t,ResultSequence:n}):"string"==typeof n?this.set({Wuid:t,ResultName:n}):console.warn("Unknown Result.attach (1)"):console.warn("Unknown Result.attach (2)")}isComplete(){return-1!==this.Total}bypassCache(e){return void 0===e?this._bypassCache:(this._bypassCache=e,this)}_fetchXMLSchemaPromise;fetchXMLSchema(e=!1){return this._fetchXMLSchemaPromise&&!e||(this._fetchXMLSchemaPromise=this.WUResult().then(e=>e.Result?.XmlSchema?.xml?(this.xsdSchema=fo(e.Result.XmlSchema.xml),this.xsdSchema):null)),this._fetchXMLSchemaPromise}async refresh(){return await this.fetchRows(0,1,!0),this}fetchRows(e=0,t=-1,n=!1,s={},r,i){const o=i??this._bypassCache;return this.WUResult(e,t,!n,s,r,o).then(e=>{const t=e.Result;return delete e.Result,this.set({...e}),c("XmlSchema.xml",t)&&(this.xsdSchema=fo(t.XmlSchema.xml)),c("Row",t)?t.Row:this.ResultName&&c(this.ResultName,t)?t[this.ResultName].Row:[]})}rootField(){return this.xsdSchema?this.xsdSchema.root:null}fields(){return this.xsdSchema?this.xsdSchema.root.children():[]}WUResult(e=0,t=1,n=!1,s={},r,i=!1){const o={NamedValue:{itemcount:0}};for(const a in s)o.NamedValue[o.NamedValue.itemcount++]={Name:a,Value:s[a]};const c={FilterBy:o};return this.Wuid&&void 0!==this.ResultName?(c.Wuid=this.Wuid,c.ResultName=this.ResultName):this.Wuid&&void 0!==this.ResultSequence?(c.Wuid=this.Wuid,c.Sequence=this.ResultSequence):this.LogicalFileName&&this.NodeGroup?(c.LogicalName=this.LogicalFileName,c.Cluster=this.NodeGroup):this.LogicalFileName&&(c.LogicalName=this.LogicalFileName),c.Start=e,c.Count=t,c.SuppressXmlSchema=n,c.BypassCachedResult=i,this.connection.WUResult(c,r).then(e=>e)}};t(bo,"Result");let Fo=bo;const Wo=class _ResultCache extends l{constructor(){super(e=>l.hash([e.Sequence,e.Name,e.Value,e.FileName]))}};t(Wo,"ResultCache");let vo=Wo;const To=class _Attribute extends h{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)}};t(To,"Attribute");let Ao=To;const wo=class _BaseScope extends h{_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(){const e=[],t={start:null,end:null};return this.Properties.Property.forEach(n=>{"ts"===n.Measure&&n.Name.indexOf("Started")>=0?t.start=n:this.ScopeName&&"ts"===n.Measure&&n.Name.indexOf("Finished")>=0?t.end=n:e.push(new Ao(this,n))}),t.start&&t.end?(t.start.FormattedEnd=t.end.Formatted,e.push(new Ao(this,t.start))):t.start?e.push(new Ao(this,t.start)):t.end&&e.push(new Ao(this,t.end)),e}constructor(e){super(),this.update(e)}update(e){this.set(e),this.CAttributes.forEach(e=>{this._attributeMap[e.Name]=e}),this.Properties.Property=[];for(const t in this._attributeMap)this._attributeMap.hasOwnProperty(t)&&this.Properties.Property.push(this._attributeMap[t].properties)}parentScope(){const 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(const t of this.children())if(t.walk(e))return!0;return e.end(this)}formattedAttrs(){const e={};for(const t in this._attributeMap)e[t]=this._attributeMap[t].Formatted||this._attributeMap[t].RawValue;return e}rawAttrs(){const e={};for(const t in this._attributeMap)e[t]=this._attributeMap[t].RawValue;return e}hasAttr(e){return void 0!==this._attributeMap[e]}attr(e){return this._attributeMap[e]||new Ao(this,{Creator:"",CreatorType:"",Formatted:"",Measure:"",Name:"",RawValue:""})}attrMeasure(e){return this._attributeMap[e].Measure}calcTooltip(e){let t=this.Id;const n=[];n.push(`<tr><td class="key">ID:</td><td class="value">${this.Id}</td></tr>`),e&&n.push(`<tr><td class="key">Parent ID:</td><td class="value">${e.Id}</td></tr>`),n.push(`<tr><td class="key">Scope:</td><td class="value">${this.ScopeName}</td></tr>`);const s=this.formattedAttrs();for(const r in s)"Label"===r?t=s[r]:n.push(`<tr><td class="key">${r}</td><td class="value">${s[r]}</td></tr>`);return`<div class="eclwatch_WUGraph_Tooltip" style="max-width:480px">\n <h4 align="center">${t}</h4>\n <table>\n ${n.join("")}\n </table>\n </div>`}};t(wo,"BaseScope");let Po=wo;const xo=class _Scope extends Po{wu;constructor(e,t){super(t),this.wu=e}};t(xo,"Scope");let Lo=xo;const Eo=class _SourceFile extends h{connection;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get FileCluster(){return this.get("FileCluster")}get Name(){return this.get("Name")}get IsSuperFile(){return this.get("IsSuperFile")}get Subs(){return this.get("Subs")}get Count(){return this.get("Count")}get ECLSourceFiles(){return this.get("ECLSourceFiles")}constructor(e,t,n){super(),this.connection=e instanceof li?e:new li(e),this.set({Wuid:t,...n})}};t(Eo,"SourceFile");let Mo=Eo;const No=class _Timer extends h{connection;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get Name(){return this.get("Name")}get Value(){return this.get("Value")}get Seconds(){return this.get("Seconds")}get GraphName(){return this.get("GraphName")}get SubGraphId(){return this.get("SubGraphId")}get HasSubGraphId(){return this.get("HasSubGraphId")}get count(){return this.get("count")}get Timestamp(){return this.get("Timestamp")}get When(){return this.get("When")}constructor(e,t,n){super(),this.connection=e instanceof li?e:new li(e);const s=_(n.Value);this.set({Wuid:t,Seconds:Math.round(1e3*s)/1e3,HasSubGraphId:void 0!==n.SubGraphId,...n})}};t(No,"Timer");let Io=No;const jo=Zn("%Y-%m-%dT%H:%M:%S.%LZ"),ko=Kn("%Y-%m-%dT%H:%M:%S.%LZ"),Go=Ai(",");function Vo(e){return e&&!isNaN(+e)?Go(+e):e}t(Vo,"formatNum");const Qo="DefinitionList",Bo=/([a-zA-Z]:)?(.*[\\\/])(.*)(\((\d+),(\d+)\))/,Oo=["Avg","Min","Max","Delta","StdDev"],Xo=["SkewMin","SkewMax","NodeMin","NodeMax"],Ho=/[A-Z][a-z]*/g;function $o(e){for(const n of Xo){const t=e.indexOf(n);if(0===t){return{measure:"",ext:n,label:e.slice(t+n.length)}}}const t=e.match(Ho);if(t?.length){const e=t.shift();let n=t.join("");for(const t of Oo){const s=n.indexOf(t);if(0===s)return n=n.slice(s+t.length),{measure:e,ext:t,label:n}}return{measure:e,ext:"",label:n}}return{measure:"",ext:"",label:e}}t($o,"_splitMetric");const Jo={};function qo(e){let t=Jo[e];return t||(t=$o(e),Jo[e]=t),t}function Yo(e,t){return e.__formattedProps?.[t]??e[t]}function zo(e){if(void 0===e)return;const t=parseFloat(e);return isNaN(t)?void 0:t}function Zo(e,t,n){const s=qo(t);if(!n[s.measure]){n[s.label]=!0;const t=zo(e[`${s.measure}Avg${s.label}`]),r=zo(e[`${s.measure}Min${s.label}`]),i=zo(e[`${s.measure}Max${s.label}`]),o=zo(e[`${s.measure}StdDev${s.label}`]),c=Math.max((t-r)/o,(i-t)/o);return{Key:`${s.measure}${s.label}`,Value:Yo(e,`${s.measure}${s.label}`),Avg:Yo(e,`${s.measure}Avg${s.label}`),Min:Yo(e,`${s.measure}Min${s.label}`),Max:Yo(e,`${s.measure}Max${s.label}`),Delta:Yo(e,`${s.measure}Delta${s.label}`),StdDev:Yo(e,`${s.measure}StdDev${s.label}`),StdDevs:isNaN(c)?void 0:c,SkewMin:Yo(e,`SkewMin${s.label}`),SkewMax:Yo(e,`SkewMax${s.label}`),NodeMin:Yo(e,`NodeMin${s.label}`),NodeMax:Yo(e,`NodeMax${s.label}`)}}return null}t(qo,"splitMetric"),t(Yo,"formatValue"),t(zo,"safeParseFloat"),t(Zo,"formatValues");const Ko=n("workunit.ts"),ec=class _WorkunitCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Wuid}`)}};t(ec,"WorkunitCache");let tc=ec;const nc=new tc,sc=class _Workunit extends h{connection;topologyConnection;get BaseUrl(){return this.connection.baseUrl}_debugMode=!1;_debugAllGraph;_submitAction;get properties(){return this.get()}get Wuid(){return this.get("Wuid")}get Owner(){return this.get("Owner","")}get Cluster(){return this.get("Cluster","")}get Jobname(){return this.get("Jobname","")}get Description(){return this.get("Description","")}get ActionEx(){return this.get("ActionEx","")}get StateID(){return this.get("StateID",oi.Unknown)}get State(){return this.get("State")||oi[this.StateID]}get Protected(){return this.get("Protected",!1)}get Exceptions(){return this.get("Exceptions",{ECLException:[]})}get ResultViews(){return this.get("ResultViews",{View:[]})}_resultCache=new vo;get ResultCount(){return this.get("ResultCount",0)}get Results(){return this.get("Results",{ECLResult:[]})}get CResults(){return this.Results.ECLResult.map(e=>this._resultCache.get(e,()=>Fo.attach(this.connection,this.Wuid,e,this.ResultViews.View)))}get SequenceResults(){const e={};return this.CResults.forEach(t=>{e[t.Sequence]=t}),e}get Timers(){return this.get("Timers",{ECLTimer:[]})}get CTimers(){return this.Timers.ECLTimer.map(e=>new Io(this.connection,this.Wuid,e))}_graphCache=new Ii;get GraphCount(){return this.get("GraphCount",0)}get Graphs(){return this.get("Graphs",{ECLGraph:[]})}get CGraphs(){return this.Graphs.ECLGraph.map(e=>this._graphCache.get(e,()=>new Mi(this,e,this.CTimers)))}get ThorLogList(){return this.get("ThorLogList")}get ResourceURLCount(){return this.get("ResourceURLCount",0)}get ResourceURLs(){return this.get("ResourceURLs",{URL:[]})}get CResourceURLs(){return this.ResourceURLs.URL.map(e=>new io(this,e))}get TotalClusterTime(){return this.get("TotalClusterTime","")}get DateTimeScheduled(){return this.get("DateTimeScheduled")}get IsPausing(){return this.get("IsPausing")}get ThorLCR(){return this.get("ThorLCR")}get ApplicationValues(){return this.get("ApplicationValues",{ApplicationValue:[]})}get HasArchiveQuery(){return this.get("HasArchiveQuery")}get StateEx(){return this.get("StateEx")}get PriorityClass(){return this.get("PriorityClass")}get PriorityLevel(){return this.get("PriorityLevel")}get Snapshot(){return this.get("Snapshot")}get ResultLimit(){return this.get("ResultLimit")}get EventSchedule(){return this.get("EventSchedule")}get Query(){return this.get("Query")}get HelpersCount(){return this.get("HelpersCount",0)}get Helpers(){return this.get("Helpers",{ECLHelpFile:[]})}get DebugValues(){return this.get("DebugValues")}get AllowedClusters(){return this.get("AllowedClusters")}get ErrorCount(){return this.get("ErrorCount",0)}get WarningCount(){return this.get("WarningCount",0)}get InfoCount(){return this.get("InfoCount",0)}get AlertCount(){return this.get("AlertCount",0)}get SourceFileCount(){return this.get("SourceFileCount",0)}get SourceFiles(){return this.get("SourceFiles",{ECLSourceFile:[]})}get CSourceFiles(){return this.SourceFiles.ECLSourceFile.map(e=>new Mo(this.connection,this.Wuid,e))}get VariableCount(){return this.get("VariableCount",0)}get Variables(){return this.get("Variables",{ECLResult:[]})}get TimerCount(){return this.get("TimerCount",0)}get HasDebugValue(){return this.get("HasDebugValue")}get ApplicationValueCount(){return this.get("ApplicationValueCount",0)}get XmlParams(){return this.get("XmlParams")}get AccessFlag(){return this.get("AccessFlag")}get ClusterFlag(){return this.get("ClusterFlag")}get ResultViewCount(){return this.get("ResultViewCount",0)}get DebugValueCount(){return this.get("DebugValueCount",0)}get WorkflowCount(){return this.get("WorkflowCount",0)}get Archived(){return this.get("Archived")}get RoxieCluster(){return this.get("RoxieCluster")}get DebugState(){return this.get("DebugState",{})}get Queue(){return this.get("Queue")}get Active(){return this.get("Active")}get Action(){return this.get("Action")}get Scope(){return this.get("Scope")}get AbortBy(){return this.get("AbortBy")}get AbortTime(){return this.get("AbortTime")}get Workflows(){return this.get("Workflows")}get TimingData(){return this.get("TimingData")}get HelpersDesc(){return this.get("HelpersDesc")}get GraphsDesc(){return this.get("GraphsDesc")}get SourceFilesDesc(){return this.get("SourceFilesDesc")}get ResultsDesc(){return this.get("ResultsDesc")}get VariablesDesc(){return this.get("VariablesDesc")}get TimersDesc(){return this.get("TimersDesc")}get DebugValuesDesc(){return this.get("DebugValuesDesc")}get ApplicationValuesDesc(){return this.get("ApplicationValuesDesc")}get WorkflowsDesc(){return this.get("WorkflowsDesc")}get ServiceNames(){return this.get("ServiceNames")}get CompileCost(){return this.get("CompileCost")}get ExecuteCost(){return this.get("ExecuteCost")}get FileAccessCost(){return this.get("FileAccessCost")}get NoAccess(){return this.get("NoAccess")}get ECLWUProcessList(){return this.get("ECLWUProcessList")}get CostSavingPotential(){return this.get("CostSavingPotential")}get FailureDesc(){return this.get("FailureDesc")}static create(e){const t=new _Workunit(e);return t.connection.WUCreate().then(e=>(nc.set(t),t.set(e.Workunit),t))}static attach(e,t,n){const s=nc.get({BaseUrl:e.baseUrl,Wuid:t},()=>new _Workunit(e,t));return n&&s.set(n),s}static existsLocal(e,t){return nc.has({BaseUrl:e,Wuid:t})}static submit(e,t,n,s=!1){return _Workunit.create(e).then(e=>e.update({QueryText:n})).then(e=>s?e.submit(t,si.Action.Compile):e.submit(t))}static compile(e,t,n){return _Workunit.submit(e,t,n,!0)}static query(e,t){return new li(e).WUQuery(t).then(t=>t.Workunits.ECLWorkunit.map(function(t){return _Workunit.attach(e,t.Wuid,t)}))}constructor(e,t){super(),this.connection=new li(e),this.topologyConnection=new kr(e),this.clearState(t)}clearState(e){this.clear({Wuid:e,StateID:oi.Unknown})}update(e){return this.connection.WUUpdate({...e,Wuid:this.Wuid,StateOrig:this.StateID,JobnameOrig:this.Jobname,DescriptionOrig:this.Description,ProtectedOrig:this.Protected,ClusterOrig:this.Cluster}).then(e=>(this.set(e.Workunit),this))}submit(e,t=si.Action.Run,n){let s;return s=void 0!==e?Promise.resolve(e):this.topologyConnection.DefaultTpLogicalClusterQuery().then(e=>e.Name),this._debugMode=!1,t===si.Action.Debug&&(t=si.Action.Run,this._debugMode=!0),s.then(e=>this.connection.WUUpdate({Wuid:this.Wuid,Action:t,ResultLimit:n,DebugValues:{DebugValue:[{Name:"Debug",Value:this._debugMode?"1":""}]}}).then(n=>(this.set(n.Workunit),this._submitAction=t,this.connection.WUSubmit({Wuid:this.Wuid,Cluster:e})))).then(()=>this)}isComplete(){switch(this.StateID){case oi.Compiled:return"compile"===this.ActionEx||this._submitAction===si.Action.Compile;case oi.Completed:case oi.Failed:case oi.Aborted:case oi.NotFound:return!0}return!1}isFailed(){switch(this.StateID){case oi.Aborted:case oi.Failed:return!0}return!1}isDeleted(){return this.StateID===oi.NotFound}isDebugging(){switch(this.StateID){case oi.DebugPaused:case oi.DebugRunning:return!0}return this._debugMode}isRunning(){switch(this.StateID){case oi.Compiled:case oi.Running:case oi.Aborting:case oi.Blocked:case oi.DebugPaused:case oi.DebugRunning:return!0}return!1}setToFailed(){return this.WUAction(Gr.ECLWUActions.SetToFailed)}pause(){return this.WUAction(Gr.ECLWUActions.Pause)}pauseNow(){return this.WUAction(Gr.ECLWUActions.PauseNow)}resume(){return this.WUAction(Gr.ECLWUActions.Resume)}abort(){return this.WUAction(Gr.ECLWUActions.Abort)}protect(){return this.WUAction(Gr.ECLWUActions.Protect)}unprotect(){return this.WUAction(Gr.ECLWUActions.Unprotect)}delete(){return this.WUAction(Gr.ECLWUActions.Delete)}restore(){return this.WUAction(Gr.ECLWUActions.Restore)}deschedule(){return this.WUAction(Gr.ECLWUActions.Deschedule)}reschedule(){return this.WUAction(Gr.ECLWUActions.Reschedule)}resubmit(){return this.WUResubmit({CloneWorkunit:!1,ResetWorkflow:!1}).then(()=>(this.clearState(this.Wuid),this.refresh().then(()=>(this._monitor(),this))))}clone(){return this.WUResubmit({CloneWorkunit:!0,ResetWorkflow:!1}).then(e=>_Workunit.attach(this.connection.opts(),e.WUs.WU[0].WUID).refresh())}async refreshState(){return await this.WUQuery(),this.StateID!==oi.Compiled||this.ActionEx||this._submitAction||await this.refreshInfo(),this}async refreshInfo(e){return await this.WUInfo(e),this}async refreshDebug(){return await this.debugStatus(),this}async refresh(e=!1,t){return e?await Promise.all([this.refreshInfo(t),this.refreshDebug()]):await this.refreshState(),this}eclExceptions(){return this.Exceptions.ECLException}fetchArchive(){return this.connection.WUFileEx({Wuid:this.Wuid,Type:"ArchiveQuery"})}fetchECLExceptions(){return this.WUInfo({IncludeExceptions:!0}).then(()=>this.eclExceptions())}fetchResults(){return this.WUInfo({IncludeResults:!0}).then(()=>this.CResults)}fetchGraphs(){return this.WUInfo({IncludeGraphs:!0}).then(()=>this.CGraphs)}fetchQuery(){return this.WUInfo({IncludeECL:!0,TruncateEclTo64k:!1}).then(()=>this.Query)}fetchHelpers(){return this.WUInfo({IncludeHelpers:!0}).then(()=>this.Helpers?.ECLHelpFile||[])}fetchAllowedClusters(){return this.WUInfo({IncludeAllowedClusters:!0}).then(()=>this.AllowedClusters?.AllowedCluster||[])}fetchTotalClusterTime(){return this.WUInfo({IncludeTotalClusterTime:!0}).then(()=>this.TotalClusterTime)}fetchServiceNames(){return this.WUInfo({IncludeServiceNames:!0}).then(()=>this.ServiceNames?.Item)}fetchDetailsMeta(e={}){return this.WUDetailsMeta(e)}fetchDetailsRaw(e={}){return this.WUDetails(e).then(e=>e.Scopes.Scope)}normalizeDetails(e,t){const n={id:{Measure:"label"},name:{Measure:"label"},type:{Measure:"label"}},s=/* @__PURE__ */new Map;for(const o of e.Activities?.Activity??[])s.set(o.Kind,o.Name);const r=new Array(t.length);for(let o=0;o<t.length;o++){const e=t[o],c={},a={};if(e.Properties?.Property)for(const t of e.Properties.Property){const e=t.Measure,r=t.Name,i=t.RawValue;if("ns"===e&&(t.Measure="s"),"Kind"===r){const e=parseInt(i,10);t.Formatted=s.get(e)??i}switch(n[r]={Name:t.Name,Measure:t.Measure,Creator:t.Creator,CreatorType:t.CreatorType},t.Measure){case"bool":c[r]=!!+i;break;case"sz":case"ns":case"cnt":case"node":case"skw":c[r]=+i;break;case"s":c[r]=+i/1e9;break;case"ts":c[r]=new Date(+i/1e3).toISOString();break;case"cost":c[r]=+i/1e6;break;default:c[r]=i}a[r]=Vo(t.Formatted??c[r])}const u={id:e.Id,name:e.ScopeName,type:e.ScopeType,Kind:e.Kind,Label:e.Label,__formattedProps:a,__groupedProps:{},__groupedRawProps:{},__StdDevs:0,__StdDevsSource:"",...c},h=u[Qo];if(h)try{const e=JSON.parse(h.split("\\").join("\\\\")),t=[];for(let n=0;n<e.length;n++){const s=e[n].match(Bo);s&&t.push({filePath:(s[1]??"")+s[2]+s[3],line:parseInt(s[5],10),col:parseInt(s[6],10)})}u[Qo]=t}catch(i){Ko.error(`Unexpected "DefinitionList": ${h}`)}const l={};let p=0,d="";for(const t in u)if(!t.startsWith("__")){const e=Zo(u,t,l);e&&(u.__groupedProps[e.Key]=e,!isNaN(e.StdDevs)&&e.StdDevs>p&&(p=e.StdDevs,d=e.Key))}u.__StdDevs=p,u.__StdDevsSource=d,r[o]=u}return{meta:e,columns:n,data:r}}fetchDetailsNormalized(e={}){return Promise.all([this.fetchDetailsMeta(),this.fetchDetailsRaw(e)]).then(e=>this.normalizeDetails(e[0],e[1]))}fetchInfo(e={}){return this.WUInfo(e)}fetchDetails(e={}){return this.WUDetails(e).then(e=>e.Scopes.Scope.map(e=>new Lo(this,e)))}fetchDetailsHierarchy(e={}){return this.WUDetails(e).then(e=>{const t=[],n={};e.Scopes.Scope.forEach(e=>{if(n[e.ScopeName])return n[e.ScopeName].update(e),null;{const t=new Lo(this,e);return n[t.ScopeName]=t,t}});for(const s in n)if(n.hasOwnProperty(s)){const e=n[s],r=e.parentScope();r&&n[r]?n[r].children().push(e):t.push(e)}return t})}fetchGraphDetails(e=[],t){return this.fetchDetails({ScopeFilter:{MaxDepth:999999,Ids:e,ScopeTypes:t},NestedFilter:{Depth:999999,ScopeTypes:["graph","subgraph","activity","edge","function"]},PropertiesToReturn:{AllStatistics:!0,AllAttributes:!0,AllHints:!0,AllProperties:!0,AllScopes:!0},ScopeOptions:{IncludeId:!0,IncludeScope:!0,IncludeScopeType:!0},PropertyOptions:{IncludeName:!0,IncludeRawValue:!0,IncludeFormatted:!0,IncludeMeasure:!0,IncludeCreator:!1,IncludeCreatorType:!1}})}fetchScopeGraphs(e=[]){return this.fetchGraphDetails(e,["graph"]).then(e=>so(e))}fetchTimeElapsed(){return this.fetchDetails({ScopeFilter:{PropertyFilters:{PropertyFilter:[{Name:"TimeElapsed"}]}}}).then(e=>{const t={};e.forEach(e=>{t[e.ScopeName]=t[e.ScopeName]||{scope:e.ScopeName,start:null,elapsed:null,finish:null},e.CAttributes.forEach(n=>{"TimeElapsed"===n.Name?t[e.ScopeName].elapsed=+n.RawValue:"ts"===n.Measure&&n.Name.indexOf("Started")>=0&&(t[e.ScopeName].start=n.Formatted)})});const n=[];for(const s in t){const e=t[s];if(e.start&&e.elapsed){const t=ko(e.start);t.setMilliseconds(t.getMilliseconds()+e.elapsed/1e6),e.finish=jo(t),n.push(e)}}return n.sort((e,t)=>e.start<t.start?-1:e.start>t.start?1:0),n})}_monitor(){this.isComplete()?this._monitorTickCount=0:super._monitor()}_monitorTimeoutDuration(){const e=super._monitorTimeoutDuration();return this._monitorTickCount<=1?1e3:this._monitorTickCount<=3?3e3:this._monitorTickCount<=5?5e3:this._monitorTickCount<=7?1e4:e}on(e,t,n){if(this.isCallback(t))switch(e){case"completed":super.on("propChanged","StateID",e=>{this.isComplete()&&t([e])});break;case"changed":super.on(e,t)}else if("changed"===e)super.on(e,t,n);return this._monitor(),this}watchUntilComplete(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),this.isComplete()&&(s.release(),t(this))})})}watchUntilRunning(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),(this.isComplete()||this.isRunning())&&(s.release(),t(this))})})}WUQuery(e={}){return this.connection.WUQuery({...e,Wuid:this.Wuid}).then(e=>(0===e.Workunits.ECLWorkunit.length?(this.clearState(this.Wuid),this.set("StateID",oi.NotFound)):this.set(e.Workunits.ECLWorkunit[0]),e)).catch(e=>{if(!e.Exception.some(e=>20081===e.Code&&(this.clearState(this.Wuid),this.set("StateID",oi.NotFound),!0)))throw Ko.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}WUCreate(){return this.connection.WUCreate().then(e=>(this.set(e.Workunit),nc.set(this),e))}WUInfo(e={}){const t=e.IncludeResults||e.IncludeResultsViewNames;return this.connection.WUInfo({...e,Wuid:this.Wuid,IncludeResults:t,IncludeResultsViewNames:t,SuppressResultSchemas:!1}).then(e=>(this.set(e.Workunit),t&&this.set({ResultViews:e.ResultViews}),e)).catch(e=>{if(!e.Exception.some(e=>20080===e.Code&&(this.clearState(this.Wuid),this.set("StateID",oi.NotFound),!0)))throw Ko.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}WUResubmit(e){return this.connection.WUResubmit(U({},e,{Wuids:{Item:[this.Wuid]}}))}WUDetailsMeta(e){return this.connection.WUDetailsMeta(e)}WUDetails(e){return this.connection.WUDetails(U({ScopeFilter:{MaxDepth:9999},ScopeOptions:{IncludeMatchedScopesInResults:!0,IncludeScope:!0,IncludeId:!1,IncludeScopeType:!1},PropertyOptions:{IncludeName:!0,IncludeRawValue:!1,IncludeFormatted:!0,IncludeMeasure:!0,IncludeCreator:!1,IncludeCreatorType:!1}},e,{WUID:this.Wuid})).then(e=>U({Scopes:{Scope:[]}},e))}WUAction(e){return this.connection.WUAction({Wuids:{Item:[this.Wuid]},WUActionType:e}).then(e=>this.refresh().then(()=>(this._monitor(),e)))}publish(e){return this.connection.WUPublishWorkunit({Wuid:this.Wuid,Cluster:this.Cluster,JobName:e||this.Jobname,AllowForeignFiles:!0,Activate:Gr.WUQueryActivationMode.ActivateQuery,Wait:5e3})}publishEx(e){const t=new di({baseUrl:""}),n={Wuid:this.Wuid,Cluster:this.Cluster,JobName:this.Jobname,AllowForeignFiles:!0,Activate:1,Wait:5e3,...e};return t.WUPublishWorkunitEx(n)}WUCDebug(e,t={}){let n="";for(const s in t)t.hasOwnProperty(s)&&(n+=` ${s}='${t[s]}'`);return this.connection.WUCDebugEx({Wuid:this.Wuid,Command:`<debug:${e} uid='${this.Wuid}'${n}/>`}).then(e=>e)}debug(e,t){return this.isDebugging()?this.WUCDebug(e,t).then(t=>{const n=t.children(e);return n.length?n[0]:new y(e)}).catch(t=>(Ko.error(t),Promise.resolve(new y(e)))):Promise.resolve(new y(e))}debugStatus(){return this.isDebugging()?this.debug("status").then(e=>{const t={...this.DebugState,...e.$};return this.set({DebugState:t}),e}):Promise.resolve({DebugState:{state:"unknown"}})}debugContinue(e=""){return this.debug("continue",{mode:e})}debugStep(e){return this.debug("step",{mode:e})}debugPause(){return this.debug("interrupt")}debugQuit(){return this.debug("quit")}debugDeleteAllBreakpoints(){return this.debug("delete",{idx:0})}debugBreakpointResponseParser(e){return e.children().map(e=>{if("break"===e.name)return e.$})}debugBreakpointAdd(e,t,n){return this.debug("breakpoint",{id:e,mode:t,action:n}).then(e=>this.debugBreakpointResponseParser(e))}debugBreakpointList(){return this.debug("list").then(e=>this.debugBreakpointResponseParser(e))}debugGraph(){return this._debugAllGraph&&this.DebugState._prevGraphSequenceNum===this.DebugState.graphSequenceNum?Promise.resolve(this._debugAllGraph):this.debug("graph",{name:"all"}).then(e=>(this.DebugState._prevGraphSequenceNum=this.DebugState.graphSequenceNum,this._debugAllGraph=Ji(this.Wuid,e),this._debugAllGraph))}debugBreakpointValid(e){return this.debugGraph().then(t=>ac(t,e))}debugPrint(e,t=0,n=10){return this.debug("print",{edgeID:e,startRow:t,numRows:n}).then(e=>e.children().map(e=>{const t={};return e.children().forEach(e=>{t[e.name]=e.content}),t}))}};t(sc,"Workunit");let rc=sc;const ic="definition";function oc(e){return void 0!==e._[ic]}function cc(e){const t=/([a-z]:\\(?:[-\w\.\d]+\\)*(?:[-\w\.\d]+)?|(?:\/[\w\.\-]+)+)\((\d*),(\d*)\)/.exec(e._[ic]);if(t){const[,n,s,r]=t;return n.replace(/\/\.\//g,"/"),{id:e._.id,file:n,line:+s,column:+r}}throw new Error(`Bad definition: ${e._[ic]}`)}function ac(e,t){const n=[];for(const s of e.vertices)if(oc(s)){const e=cc(s);(e&&!t||t===e.file)&&n.push(e)}return n.sort((e,t)=>e.line-t.line)}let uc;t(oc,"hasECLDefinition"),t(cc,"getECLDefinition"),t(ac,"breakpointLocations");const hc=class _Activity extends h{connection;get properties(){return this.get()}get Exceptions(){return this.get("Exceptions")}get Build(){return this.get("Build")}get ThorClusterList(){return this.get("ThorClusterList")}get RoxieClusterList(){return this.get("RoxieClusterList")}get HThorClusterList(){return this.get("HThorClusterList")}get DFUJobs(){return this.get("DFUJobs")}get Running(){return this.get("Running",{ActiveWorkunit:[]})}get BannerContent(){return this.get("BannerContent")}get BannerColor(){return this.get("BannerColor")}get BannerSize(){return this.get("BannerSize")}get BannerScroll(){return this.get("BannerScroll")}get ChatURL(){return this.get("ChatURL")}get ShowBanner(){return this.get("ShowBanner")}get ShowChatURL(){return this.get("ShowChatURL")}get SortBy(){return this.get("SortBy")}get Descending(){return this.get("Descending")}get SuperUser(){return this.get("SuperUser")}get AccessRight(){return this.get("AccessRight")}get ServerJobQueues(){return this.get("ServerJobQueues")}get ActivityTime(){return this.get("ActivityTime")}get DaliDetached(){return this.get("DaliDetached")}static attach(e,t){return uc||(uc=new _Activity(e)),t&&uc.set(t),uc}constructor(e){super(),this.connection=e instanceof vr?e:new vr(e),this.clear({})}runningWorkunits(e=""){return this.Running.ActiveWorkunit.filter(t=>""===e||t.ClusterName===e).map(e=>rc.attach(this.connection.connectionOptions(),e.Wuid,e))}setBanner(e){return this.connection.SetBanner({...e}).then(e=>(this.set(e),this))}lazyRefresh=C(async()=>{const e=await this.connection.Activity({});return this.set(e),this});async refresh(){return this.lazyRefresh()}};t(hc,"Activity");let lc=hc;const pc=n("logicalFile.ts"),dc=class _LogicalFileCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Cluster}-${e.Name}`)}};t(dc,"LogicalFileCache");let gc=dc;const mc=new gc,Sc=class _LogicalFile extends h{connection;get BaseUrl(){return this.connection.baseUrl}get Cluster(){return this.get("Cluster")}get Name(){return this.get("Name")}get Filename(){return this.get("Filename")}get Prefix(){return this.get("Prefix")}get NodeGroup(){return this.get("NodeGroup")}get NumParts(){return this.get("NumParts")}get Description(){return this.get("Description")}get Dir(){return this.get("Dir")}get PathMask(){return this.get("PathMask")}get Filesize(){return this.get("Filesize")}get FileSizeInt64(){return this.get("FileSizeInt64")}get RecordSize(){return this.get("RecordSize")}get RecordCount(){return this.get("RecordCount")}get RecordSizeInt64(){return this.get("RecordSizeInt64")}get RecordCountInt64(){return this.get("RecordCountInt64")}get Wuid(){return this.get("Wuid")}get Owner(){return this.get("Owner")}get JobName(){return this.get("JobName")}get Persistent(){return this.get("Persistent")}get Format(){return this.get("Format")}get MaxRecordSize(){return this.get("MaxRecordSize")}get CsvSeparate(){return this.get("CsvSeparate")}get CsvQuote(){return this.get("CsvQuote")}get CsvTerminate(){return this.get("CsvTerminate")}get CsvEscape(){return this.get("CsvEscape")}get Modified(){return this.get("Modified")}get Ecl(){return this.get("Ecl")}get Stat(){return this.get("Stat")}get DFUFilePartsOnClusters(){return this.get("DFUFilePartsOnClusters")}get isSuperfile(){return this.get("isSuperfile")}get ShowFileContent(){return this.get("ShowFileContent")}get subfiles(){return this.get("subfiles")}get Superfiles(){return this.get("Superfiles")}get ProtectList(){return this.get("ProtectList")}get FromRoxieCluster(){return this.get("FromRoxieCluster")}get Graphs(){return this.get("Graphs")}get UserPermission(){return this.get("UserPermission")}get ContentType(){return this.get("ContentType")}get CompressedFileSize(){return this.get("CompressedFileSize")}get PercentCompressed(){return this.get("PercentCompressed")}get IsCompressed(){return this.get("IsCompressed")}get BrowseData(){return this.get("BrowseData")}get jsonInfo(){return this.get("jsonInfo")}get binInfo(){return this.get("binInfo")}get PackageID(){return this.get("PackageID")}get Partition(){return this.get("Partition")}get Blooms(){return this.get("Blooms")}get ExpireDays(){return this.get("ExpireDays")}get KeyType(){return this.get("KeyType")}get IsRestricted(){return this.get("IsRestricted")}get AtRestCost(){return this.get("AtRestCost")}get AccessCost(){return this.get("AccessCost")}get StateID(){return this.get("StateID")}get ExpirationDate(){return this.get("ExpirationDate")}get ExtendedIndexInfo(){return this.get("ExtendedIndexInfo")}get CompressionType(){return this.get("CompressionType")}get properties(){return this.get()}static attach(e,t,n,s){const r=mc.get({BaseUrl:e.baseUrl,Cluster:t,Name:n},()=>new _LogicalFile(e,t,n));return s&&r.set(s),r}constructor(e,t,n){super(),this.connection=e instanceof ot?e:new ot(e),this.clear({Cluster:t,Name:n})}filePartsOnCluster(){return[...this.DFUFilePartsOnClusters?.DFUFilePartsOnCluster||[]]}fileParts(){const e=[];for(const t of this.DFUFilePartsOnClusters?.DFUFilePartsOnCluster||[])for(const n of t?.DFUFileParts?.DFUPart||[]){const s={...t,...n};delete s.DFUFileParts,e.push(s)}return e}update(e){return this.connection.DFUInfo({...e,Cluster:this.Cluster,Name:this.Name}).then(e=>(this.set({Cluster:this.Cluster,...e.FileDetail}),e))}fetchInfo(){return this.connection.DFUInfo({Cluster:this.Cluster,Name:this.Name}).then(e=>(this.set({Cluster:this.Cluster,...e.FileDetail,ProtectList:e?.FileDetail?.ProtectList??{DFUFileProtect:[]}}),e.FileDetail)).catch(e=>{if(!e.Exception.some(e=>20038===e.Code&&(this.set("Name",this.Name+" (Deleted)"),this.set("StateID",999),!0)))throw pc.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}fetchDefFile(e){return this.connection.DFUFile({Name:this.Name,Format:e})}fetchAllLogicalFiles(){return this.connection.recursiveFetchLogicalFiles([this])}fetchListHistory(){return this.connection.ListHistory({Name:this.Name}).then(e=>e?.History?.Origin||[])}eraseHistory(){return this.connection.EraseHistory({Name:this.Name}).then(e=>e?.History?.Origin||[])}};t(Sc,"LogicalFile");let fc=Sc;const _c=class _MachineCache extends l{constructor(){super(e=>e.Address)}};t(_c,"MachineCache");let Uc=_c;const yc=new Uc,Cc=class _Machine extends h{connection;get Address(){return this.get("Address")}get ConfigAddress(){return this.get("ConfigAddress")}get Name(){return this.get("Name")}get ProcessType(){return this.get("ProcessType")}get DisplayType(){return this.get("DisplayType")}get Description(){return this.get("Description")}get AgentVersion(){return this.get("AgentVersion")}get Contact(){return this.get("Contact")}get Location(){return this.get("Location")}get UpTime(){return this.get("UpTime")}get ComponentName(){return this.get("ComponentName")}get ComponentPath(){return this.get("ComponentPath")}get RoxieState(){return this.get("RoxieState")}get RoxieStateDetails(){return this.get("RoxieStateDetails")}get OS(){return this.get("OS")}get ProcessNumber(){return this.get("ProcessNumber")}get Channels(){return this.get("Channels")}get Processors(){return this.get("Processors")}get Storage(){return this.get("Storage")}get Running(){return this.get("Running")}get PhysicalMemory(){return this.get("PhysicalMemory")}get VirtualMemory(){return this.get("VirtualMemory")}get ComponentInfo(){return this.get("ComponentInfo")}get Exception(){return this.get("Exception")}static attach(e,t,n){const s=yc.get({Address:t},()=>new _Machine(e));return n&&s.set(n),s}constructor(e){super(),this.connection=e instanceof rn?e:new rn(e)}};t(Cc,"Machine");let Dc=Cc;const Rc=class _TargetClusterCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Name}`)}};t(Rc,"TargetClusterCache");let bc=Rc;const Fc=new bc,Wc=class _TargetCluster extends h{connection;machineConnection;get BaseUrl(){return this.connection.baseUrl}get Name(){return this.get("Name")}get Prefix(){return this.get("Prefix")}get Type(){return this.get("Type")}get IsDefault(){return this.get("IsDefault")}get TpClusters(){return this.get("TpClusters")}get TpEclCCServers(){return this.get("TpEclCCServers")}get TpEclServers(){return this.get("TpEclServers")}get TpEclAgents(){return this.get("TpEclAgents")}get TpEclSchedulers(){return this.get("TpEclSchedulers")}get MachineInfoEx(){return this.get("MachineInfoEx",[])}get CMachineInfoEx(){return this.MachineInfoEx.map(e=>Dc.attach(this.machineConnection,e.Address,e))}static attach(e,t,n){const s=Fc.get({BaseUrl:e.baseUrl,Name:t},()=>new _TargetCluster(e,t));return n&&s.set(n),s}constructor(e,t){super(),e instanceof kr?(this.connection=e,this.machineConnection=new rn(e.connectionOptions())):(this.connection=new kr(e),this.machineConnection=new rn(e)),this.clear({Name:t})}fetchMachines(e={}){return this.machineConnection.GetTargetClusterInfo({TargetClusters:{Item:[`${this.Type}:${this.Name}`]},...e}).then(e=>{const t=[];for(const n of e.TargetClusterInfoList.TargetClusterInfo)for(const e of n.Processes.MachineInfoEx)t.push(e);return this.set("MachineInfoEx",t),this.CMachineInfoEx})}machineStats(){let e=0,t=0,n=0;for(const s of this.CMachineInfoEx)for(const r of s.Storage.StorageInfo){t+=r.Available,n+=r.Total;const s=1-r.Available/r.Total;s>e&&(e=s)}return{maxDisk:e,meanDisk:1-(n?t/n:1)}}fetchUsage(){return this.machineConnection.GetTargetClusterUsageEx([this.Name])}};t(Wc,"TargetCluster");let vc=Wc;function Tc(e){let t;return t=e instanceof kr?e:new kr(e),t.TpListTargetClusters({}).then(t=>t.TargetClusters.TpClusterNameType.map(t=>vc.attach(e,t.Name,t)))}t(Tc,"targetClusters");const Ac={};function wc(e){if(!Ac[e.baseUrl]){let t;t=e instanceof kr?e:new kr(e),Ac[e.baseUrl]=t.TpListTargetClusters({}).then(t=>{let n,s,r;t.TargetClusters.TpClusterNameType.forEach(e=>{n||(n=e),s||!0!==e.IsDefault||(s=e),r||"hthor"!==e.Type||(r=e)});const i=s||r||n;return vc.attach(e,i.Name,i)})}return Ac[e.baseUrl]}t(wc,"defaultTargetCluster");const Pc=class _TopologyCache extends l{constructor(){super(e=>e.BaseUrl)}};t(Pc,"TopologyCache");let xc=Pc;const Lc=new xc,Ec=class _Topology extends h{connection;get BaseUrl(){return this.connection.baseUrl}get properties(){return this.get()}get TargetClusters(){return this.get("TargetClusters")}get CTargetClusters(){return this.TargetClusters.map(e=>vc.attach(this.connection,e.Name,e))}get LogicalClusters(){return this.get("LogicalClusters")}get Services(){return this.get("Services")}static attach(e,t){const n=Lc.get({BaseUrl:e.baseUrl},()=>new _Topology(e));return t&&n.set(t),n}constructor(e){super(),this.connection=e instanceof kr?e:new kr(e)}GetESPServiceBaseURL(e=""){return this.connection.TpServiceQuery({}).then(t=>{const n=this.connection.protocol(),s=this.connection.ip();let r="https:"===n?"18002":"8002";if(c("ServiceList.TpEspServers.TpEspServer",t))for(const i of t.ServiceList.TpEspServers.TpEspServer)if(c("TpBindings.TpBinding",i))for(const t of i.TpBindings.TpBinding)t.Service===e&&t.Protocol+":"===n&&(r=t.Port);return`${n}//${s}:${r}/`})}fetchTargetClusters(){return this.connection.TpTargetClusterQuery({Type:"ROOT"}).then(e=>(this.set({TargetClusters:e.TpTargetClusters?.TpTargetCluster??[]}),this.CTargetClusters))}fetchLogicalClusters(e={}){return this.connection.TpLogicalClusterQuery(e).then(e=>(this.set({LogicalClusters:e.TpLogicalClusters.TpLogicalCluster}),this.LogicalClusters))}fetchServices(e={}){return this.connection.TpServiceQuery(e).then(e=>(this.set({Services:e.ServiceList}),this.Services))}_prevRefresh;refresh(e=!1){return this._prevRefresh&&!e||(this._prevRefresh=Promise.all([this.fetchTargetClusters(),this.fetchLogicalClusters(),this.fetchServices()]).then(()=>this)),this._prevRefresh}on(e,t,n){if(this.isCallback(t)){if("changed"===e)super.on(e,t)}else if("changed"===e)super.on(e,t,n);return this._monitor(),this}};t(Ec,"Topology");let Mc=Ec;function Nc(e,t,n){"__proto__"!==t&&"constructor"!==t&&"prototype"!==t&&(e[t]=n)}function Ic(e){return(e=""+e).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&apos;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"&#10;").replace(/\r/g,"&#13;")}function jc(e){if(!e)return 0;if(!isNaN(+e))return parseFloat(e);const t=/(?:(?:(\d+).days.)?(?:(\d+)h)?(?:(\d+)m)?(?:(\d+\.\d+|\d+)s))|(?:(\d+\.\d+|\d+)ms|(\d+\.\d+|\d+)us|(\d+\.\d+|\d+)ns)/.exec(e);if(!t)return 0;return 24*(+t[1]||0)*60*60+60*(+t[2]||0)*60+60*(+t[3]||0)+(+t[4]||0)+(+t[5]||0)/1e3+(+t[6]||0)/1e6+(+t[7]||0)/1e9}function kc(e,t){const n=e.indexOf(t);return-1!==n?parseFloat(e.substring(0,n)):-1}function Gc(e){if(!e)return 0;if(!isNaN(+e))return parseFloat(e);let t=kc(e,"Kb");return t>=0?1024*t:(t=kc(e,"Mb"),t>=0?t*Math.pow(1024,2):(t=kc(e,"Gb"),t>=0?t*Math.pow(1024,3):(t=kc(e,"Tb"),t>=0?t*Math.pow(1024,4):(t=kc(e,"Pb"),t>=0?t*Math.pow(1024,5):(t=kc(e,"Eb"),t>=0?t*Math.pow(1024,6):(t=kc(e,"Zb"),t>=0?t*Math.pow(1024,7):(t=kc(e,"b"),t>=0?t:0)))))))}function Vc(e){return e?parseFloat(e):0}t(Nc,"safeAssign"),t(Ic,"xmlEncode"),t(jc,"espTime2Seconds"),t(kc,"unitTest"),t(Gc,"espSize2Bytes"),t(Vc,"espSkew2Number");const Qc=class _LocalisedXGMMLWriter{graph;m_xgmml;m_visibleSubgraphs;m_visibleVertices;m_semiVisibleVertices;m_visibleEdges;noSpills;constructor(e){this.graph=e,this.m_xgmml="",this.m_visibleSubgraphs={},this.m_visibleVertices={},this.m_semiVisibleVertices={},this.m_visibleEdges={}}calcVisibility(e,t,n,s){this.noSpills=s,e.forEach(e=>{this.graph.isVertex(e)?(this.calcInVertexVisibility(e,n),this.calcOutVertexVisibility(e,n)):this.graph.isEdge(e)?(this.calcInVertexVisibility(e.getSource(),n-1),this.calcOutVertexVisibility(e.getTarget(),n-1)):this.graph.isSubgraph(e)&&(this.m_visibleSubgraphs[e.__hpcc_id]=e,this.calcSubgraphVisibility(e,t-1))}),this.calcVisibility2()}calcInVertexVisibility(e,t){this.noSpills&&e.isSpill()&&t++,this.m_visibleVertices[e.__hpcc_id]=e,t>0&&e.getInEdges().forEach(e=>{this.calcInVertexVisibility(e.getSource(),t-1)})}calcOutVertexVisibility(e,t){this.noSpills&&e.isSpill()&&t++,this.m_visibleVertices[e.__hpcc_id]=e,t>0&&e.getOutEdges().forEach(e=>{this.calcOutVertexVisibility(e.getTarget(),t-1)})}calcSubgraphVisibility(e,t){if(t<0)return;t>0&&e.__hpcc_subgraphs.forEach((e,n)=>{this.calcSubgraphVisibility(e,t-1)}),e.__hpcc_subgraphs.forEach((e,t)=>{this.m_visibleSubgraphs[e.__hpcc_id]=e}),e.__hpcc_vertices.forEach((e,t)=>{this.m_visibleVertices[e.__hpcc_id]=e});const n={};this.graph.edges.forEach((t,s)=>{t.getSource().__hpcc_parent!==t.getTarget().__hpcc_parent&&e===this.getCommonAncestor(t)&&(n[t.getSource().__hpcc_parent.__hpcc_id+"::"+t.getTarget().__hpcc_parent.__hpcc_id]||(n[t.getSource().__hpcc_parent.__hpcc_id+"::"+t.getTarget().__hpcc_parent.__hpcc_id]=!0,this.m_visibleEdges[t.__hpcc_id]=t))})}buildVertexString(e,t){let n="",s="";const r=e.getProperties();for(const i in r)t&&i.indexOf("_kind")>=0?s+='<att name="_kind" value="point"/>':"id"===i||"label"===i?n+=" "+i+'="'+Ic(r[i])+'"':s+='<att name="'+i+'" value="'+Ic(r[i])+'"/>';return"<node"+n+">"+s+"</node>"}buildEdgeString(e){let t="",n="";const s=e.getProperties();for(const r in s)"id"===r.toLowerCase()||"label"===r.toLowerCase()||"source"===r.toLowerCase()||"target"===r.toLowerCase()?t+=" "+r+'="'+Ic(s[r])+'"':n+='<att name="'+r+'" value="'+Ic(s[r])+'"/>';return"<edge"+t+">"+n+"</edge>"}getAncestors(e,t){let n=e.__hpcc_parent;for(;n;)t.push(n),n=n.__hpcc_parent}getCommonAncestorV(e,t){const n=[],s=[];this.getAncestors(e,n),this.getAncestors(t,s);let r=n.length-1,i=s.length-1,o=null;for(;r>=0&&i>=0&&n[r]===s[i];)o=n[r],--r,--i;return o}getCommonAncestor(e){return this.getCommonAncestorV(e.getSource(),e.getTarget())}calcAncestorVisibility(e){const t=[];this.getAncestors(e,t),t.forEach((e,t)=>{this.m_visibleSubgraphs[e.__hpcc_id]=e})}calcVisibility2(){for(const e in this.m_visibleVertices){const t=this.m_visibleVertices[e];t.getInEdges().forEach((e,t)=>{this.m_visibleEdges[e.__hpcc_id]=e}),t.getOutEdges().forEach((e,t)=>{this.m_visibleEdges[e.__hpcc_id]=e}),this.calcAncestorVisibility(t)}this.calcSemiVisibleVertices()}addSemiVisibleEdge(e){e&&!this.m_visibleEdges[e.__hpcc_id]&&(this.m_visibleEdges[e.__hpcc_id]=e)}addSemiVisibleVertex(e){this.m_visibleVertices[e.__hpcc_id]||(this.m_semiVisibleVertices[e.__hpcc_id]=e,this.calcAncestorVisibility(e))}calcSemiVisibleVertices(){for(const e in this.m_visibleEdges){const t=this.m_visibleEdges[e];let n=t.getSource();for(this.addSemiVisibleVertex(n);this.noSpills&&n.isSpill();){const e=n.getInEdges();if(!e.length)break;this.addSemiVisibleEdge(e[0]),n=e[0].getSource(),this.addSemiVisibleVertex(n)}let s=t.getTarget();for(this.addSemiVisibleVertex(s);this.noSpills&&s.isSpill();){const e=s.getOutEdges();if(!e.length)break;this.addSemiVisibleEdge(e[0]),s=e[0].getTarget(),this.addSemiVisibleVertex(s)}}}writeXgmml(){this.subgraphVisited(this.graph.subgraphs[0],!0),this.graph.edges.forEach((e,t)=>{this.edgeVisited(e)})}subgraphVisited(e,t=!1){if(this.m_visibleSubgraphs[e.__hpcc_id]){let n="";this.m_xgmml+=t?"":'<node id="'+e.__hpcc_id+'"><att><graph>';const s=this.m_xgmml.length;if(e.walkSubgraphs(this),e.walkVertices(this),s===this.m_xgmml.length){const t=e.__hpcc_vertices[0];t&&(this.m_xgmml+=this.buildVertexString(t,!0))}const r=e.getProperties();for(const e in r)n+='<att name="'+e+'" value="'+Ic(r[e])+'"/>';this.m_xgmml+=t?"":"</graph></att>"+n+"</node>"}return!1}vertexVisited(e){this.m_visibleVertices[e.__hpcc_id]?this.m_xgmml+=this.buildVertexString(e,!1):this.m_semiVisibleVertices[e.__hpcc_id]&&(this.m_xgmml+=this.buildVertexString(e,!0))}edgeVisited(e){this.m_visibleEdges[e.__hpcc_id]&&(this.m_xgmml+=this.buildEdgeString(e))}};t(Qc,"LocalisedXGMMLWriter");let Bc=Qc;const Oc=class _GraphItem{__hpcc_graph;__hpcc_parent;__widget;__hpcc_id;_globalID;constructor(e,t){this.__hpcc_graph=e,this.__hpcc_id=t,this._globalID=t}getProperties(){const e={};for(const t in this)0!==t.indexOf("__")&&this.hasOwnProperty(t)&&(e[t]=this[t]);return e}};t(Oc,"GraphItem");let Xc=Oc;const Hc=class _Subgraph extends Xc{_globalType;__hpcc_subgraphs;__hpcc_vertices;__hpcc_edges;id;constructor(e,t){super(e,t),this._globalType="0"===t?"Graph":"Cluster",this.__hpcc_subgraphs=[],this.__hpcc_vertices=[],this.__hpcc_edges=[],this.id=t}addSubgraph(e){e.__hpcc_parent=this,this.__hpcc_subgraphs.some(t=>e===t)||this.__hpcc_subgraphs.push(e)}addVertex(e){e.__hpcc_parent=this,this.__hpcc_vertices.some(t=>e===t)||this.__hpcc_vertices.push(e)}removeVertex(e){this.__hpcc_vertices=this.__hpcc_vertices.filter(t=>e!==t)}addEdge(e){e.__hpcc_parent=this,this.__hpcc_edges.some(t=>e===t)||this.__hpcc_edges.push(e)}removeEdge(e){this.__hpcc_edges=this.__hpcc_edges.filter(t=>e!==t)}remove(){this.__hpcc_subgraphs.forEach(e=>e.__hpcc_parent=this.__hpcc_parent),this.__hpcc_vertices.forEach(e=>e.__hpcc_parent=this.__hpcc_parent),this.__hpcc_edges.forEach(e=>e.__hpcc_parent=this.__hpcc_parent),delete this.__hpcc_parent,this.__hpcc_graph.removeItem(this)}walkSubgraphs(e){this.__hpcc_subgraphs.forEach((t,n)=>{e.subgraphVisited(t)&&t.walkSubgraphs(e)})}walkVertices(e){this.__hpcc_vertices.forEach((t,n)=>{e.vertexVisited(t)})}};t(Hc,"Subgraph");let $c=Hc;const Jc=class _Vertex extends Xc{_globalType="Vertex";_isSpill;constructor(e,t){super(e,t)}isSpill(){return this._isSpill}remove(){const e=this.getInVertices();e.length<=1&&console.warn(this.__hpcc_id+": remove only supports single or zero inputs activities..."),this.getInEdges().forEach(e=>{e.remove()}),this.getOutEdges().forEach(t=>{t.setSource(e[0])}),this.__hpcc_parent?.removeVertex(this),this.__hpcc_graph.removeItem(this)}getInVertices(){return this.getInEdges().map(e=>e.getSource())}getInEdges(){return this.__hpcc_graph.edges.filter(e=>e.getTarget()===this)}getOutVertices(){return this.getOutEdges().map(e=>e.getTarget())}getOutEdges(){return this.__hpcc_graph.edges.filter(e=>e.getSource()===this)}};t(Jc,"Vertex");let qc=Jc;const Yc=class _Edge extends Xc{_globalType="Edge";_sourceActivity;source;_targetActivity;target;constructor(e,t){super(e,t),this._globalType="Edge"}remove(){this.__hpcc_graph.subgraphs.forEach(e=>{e.removeEdge(this)}),this.__hpcc_graph.removeItem(this)}getSource(){return this.__hpcc_graph.idx[this._sourceActivity||this.source]}setSource(e){this._sourceActivity?this._sourceActivity=e.__hpcc_id:this.source&&(this.source=e.__hpcc_id),this.__widget&&this.__widget.setSource(this.getSource().__widget)}getTarget(){return this.__hpcc_graph.idx[this._targetActivity||this.target]}};t(Yc,"Edge");let zc=Yc;const Zc=class _QueryGraph{idx={};subgraphs=[];vertices=[];edges=[];xgmml="";constructor(){this.clear()}clear(){this.xgmml="",this.idx={},this.subgraphs=[],this.vertices=[],this.edges=[]}load(e){this.clear(),this.merge(e)}merge(e){this.xgmml=e;const t=(new DOMParser).parseFromString(e,"text/xml");this.walkDocument(t.documentElement,"0")}isSubgraph(e){return e instanceof $c}isVertex(e){return e instanceof qc}isEdge(e){return e instanceof zc}getGlobalType(e){return e instanceof qc?3:e instanceof zc?4:e instanceof $c?2:e instanceof _QueryGraph?1:0}getGlobalTypeString(e){return e instanceof qc?"Vertex":e instanceof zc?"Edge":e instanceof $c?"Cluster":e instanceof _QueryGraph?"Graph":"Unknown"}getItem(e,t){if(!this.idx[t])switch(e.tagName){case"graph":const e=new $c(this,t);this.subgraphs.push(e),this.idx[t]=e;break;case"node":const n=new qc(this,t);this.vertices.push(n),this.idx[t]=n;break;case"edge":const s=new zc(this,t);this.edges.push(s),this.idx[t]=s;break;default:console.warn("Graph.getItem - Unknown Node Type!")}const n=this.idx[t];return Array.from(e.attributes).forEach(e=>{Nc(n,e.name,e.value)}),n}removeItem(e){delete this.idx[e.__hpcc_id],e instanceof $c?this.subgraphs=this.subgraphs.filter(t=>e!==t):e instanceof qc?this.vertices=this.vertices.filter(t=>e!==t):e instanceof zc&&(this.edges=this.edges.filter(t=>e!==t))}getChildByTagName(e,t){let n=null;return Array.from(e.childNodes).some(e=>{if(e.tagName===t)return n=e,!0}),n}walkDocument(e,t){const n=this.getItem(e,t);return e.childNodes.forEach(e=>{if(1===e.nodeType)switch(e.tagName){case"graph":break;case"node":let t=!1;const s=this.getChildByTagName(e,"att");if(s){const r=this.getChildByTagName(s,"graph");if(r){t=!0;const s=this.walkDocument(r,e.getAttribute("id"));n.addSubgraph(s)}}if(!t){const t=this.walkDocument(e,e.getAttribute("id"));n.addVertex(t)}break;case"att":const r=e.getAttribute("name"),i="_"+r,o=e.getAttribute("value");0===r.indexOf("Time")?(Nc(n,i,o),Nc(n,r,""+jc(o))):0===r.indexOf("Size")?(Nc(n,i,o),Nc(n,r,""+Gc(o))):0===r.indexOf("Skew")?(Nc(n,i,o),Nc(n,r,""+Vc(o))):Nc(n,r,o);break;case"edge":const c=this.walkDocument(e,e.getAttribute("id"));if(void 0!==c.NumRowsProcessed?c._eclwatchCount=c.NumRowsProcessed.replace(/\B(?=(\d{3})+(?!\d))/g,","):void 0!==c.Count?c._eclwatchCount=c.Count.replace(/\B(?=(\d{3})+(?!\d))/g,","):void 0!==c.count&&(c._eclwatchCount=c.count.replace(/\B(?=(\d{3})+(?!\d))/g,",")),c.inputProgress&&(c._eclwatchInputProgress="["+c.inputProgress.replace(/\B(?=(\d{3})+(?!\d))/g,",")+"]"),c.SkewMaxRowsProcessed&&c.SkewMinRowsProcessed&&(c._eclwatchSkew="+"+c.SkewMaxRowsProcessed+", "+c.SkewMinRowsProcessed),c._dependsOn);else if(c._childGraph);else if(c._sourceActivity||c._targetActivity){c._isSpill=!0;const e=c.getSource();e&&(e._isSpill=!0);const t=c.getTarget();t&&(t._isSpill=!0)}n.addEdge(c)}}),n}removeSubgraphs(){[...this.subgraphs].forEach(e=>{e.__hpcc_parent instanceof $c&&e.remove()})}removeSpillVertices(){[...this.vertices].forEach(e=>{e.isSpill()&&e.remove()})}getLocalisedXGMML(e,t,n,s){const r=new Bc(this);return r.calcVisibility(e,t,n,s),r.writeXgmml(),"<graph>"+r.m_xgmml+"</graph>"}};t(Zc,"QueryGraph");let Kc=Zc;const ea=n("@hpcc-js/comms/ecl/query.ts"),ta=Ai("~s");function na(e){return!isNaN(parseFloat(e))&&!isNaN(e-0)}t(na,"isNumber");const sa=class _QueryCache extends l{constructor(){super(e=>l.hash([e.QueryId,e.QuerySet]))}};t(sa,"QueryCache");const ra=new sa,ia=class _Query extends h{wsWorkunitsService;get BaseUrl(){return this.wsWorkunitsService.baseUrl}topology;_requestSchema;_responseSchema;get properties(){return this.get()}get Exceptions(){return this.get("Exceptions")}get QueryId(){return this.get("QueryId")}get QuerySet(){return this.get("QuerySet")}get QueryName(){return this.get("QueryName")}get Wuid(){return this.get("Wuid")}get Dll(){return this.get("Dll")}get Suspended(){return this.get("Suspended")}get Activated(){return this.get("Activated")}get SuspendedBy(){return this.get("SuspendedBy")}get Clusters(){return this.get("Clusters")}get PublishedBy(){return this.get("PublishedBy")}get Comment(){return this.get("Comment")}get LogicalFiles(){return this.get("LogicalFiles")}get SuperFiles(){return this.get("SuperFiles")}get IsLibrary(){return this.get("IsLibrary")}get Priority(){return this.get("Priority")}get WUSnapShot(){return this.get("WUSnapShot")}get CompileTime(){return this.get("CompileTime")}get LibrariesUsed(){return this.get("LibrariesUsed")}get CountGraphs(){return this.get("CountGraphs")}get ResourceURLCount(){return this.get("ResourceURLCount")}get WsEclAddresses(){return this.get("WsEclAddresses")}get WUGraphs(){return this.get("WUGraphs")}get WUTimers(){return this.get("WUTimers")}get PriorityID(){return this.get("PriorityID")}constructor(e,t,n,s){super(),this.wsWorkunitsService=e instanceof li?e:new li(e),this.topology=Mc.attach(this.wsWorkunitsService.opts()),this.set({QuerySet:t,QueryId:n,...s})}static attach(e,t,n,s){const r=ra.get({BaseUrl:e.baseUrl,QuerySet:t,QueryId:n},()=>new _Query(e,t,n));return s&&r.set(s),r}_eclService;async wsEclService(){return this._eclService||(this._eclService=this.topology.fetchServices({}).then(e=>{for(const t of e?.TpEspServers?.TpEspServer??[])for(const e of t?.TpBindings?.TpBinding??[])if("ws_ecl"===e?.Service){const t=`${e.Protocol}://${globalThis.location.hostname}:${e.Port}`;return new mt({baseUrl:t})}})),this._eclService}async fetchDetails(){const e=await this.wsWorkunitsService.WUQueryDetails({QuerySet:this.QuerySet,QueryId:this.QueryId,IncludeStateOnClusters:!0,IncludeSuperFiles:!0,IncludeWsEclAddresses:!0,CheckAllNodes:!1});this.set({...e})}async fetchRequestSchema(){const e=await this.wsEclService();try{this._requestSchema=await(e?.requestJson(this.QuerySet,this.QueryId))??[]}catch(t){ea.debug(t.message??t),this._requestSchema=[]}}async fetchResponseSchema(){const e=await this.wsEclService();try{this._responseSchema=await(e?.responseJson(this.QuerySet,this.QueryId))??{}}catch(t){ea.debug(t.message??t),this._responseSchema={}}}async fetchSchema(){await Promise.all([this.fetchRequestSchema(),this.fetchResponseSchema()])}fetchSummaryStats(){return this.wsWorkunitsService.WUQueryGetSummaryStats({Target:this.QuerySet,QueryId:this.QueryId})}fetchGraph(e="",t=""){return this.wsWorkunitsService.WUQueryGetGraph({Target:this.QuerySet,QueryId:this.QueryId,GraphName:e,SubGraphId:t}).then(e=>{const t=new Kc;let n=!0;for(const s of e?.Graphs?.ECLGraphEx||[])n?(t.load(s.Graph),n=!1):t.merge(s.Graph);return t})}fetchDetailsNormalized(e={}){const t=rc.attach(this.wsWorkunitsService,this.Wuid);return t?Promise.all([this.fetchGraph(),t.fetchDetailsMeta(),t.fetchDetailsRaw(e)]).then(e=>{const n=e[0],s=e[1],r=e[2].map(e=>{const t=e.Id[0];if("a"===t||"e"===t){const t=n.idx[e.Id.substring(1)];if(!t)return ea.debug(`Missing graph data for metric ID: ${e.Id}`),e;const s=new Set(e.Properties.Property.map(e=>e.Name)),r=[];for(const e in t){const n=e.charAt(0);if("_"!==n&&n===n.toUpperCase()&&!s.has(e)){const n=t[e],s=typeof n;if("string"===s||"number"===s||"boolean"===s){let t=na(n)?parseFloat(n):n,s=n;e.indexOf("Time")>=0&&(t/=1e9,s=ta(t)+"s"),r.push({Name:e,RawValue:t,Formatted:s})}}}r.length>0&&e.Properties.Property.push(...r)}return e});return t.normalizeDetails(s,r)}):Promise.resolve({meta:void 0,columns:void 0,data:void 0})}async submit(e){const t=await this.wsEclService();try{return t?.submit(this.QuerySet,this.QueryId,e).then(e=>{for(const t in e)e[t]=e[t].Row;return e})??[]}catch(n){return ea.debug(n.message??n),[]}}async refresh(){return await Promise.all([this.fetchDetails(),this.fetchSchema()]),this}requestFields(){return this._requestSchema?this._requestSchema:[]}responseFields(){return this._responseSchema?this._responseSchema:{}}resultNames(){const e=[];for(const t in this.responseFields())e.push(t);return e}resultFields(e){return this._responseSchema[e]?this._responseSchema[e]:[]}};t(ia,"Query");let oa=ia;const ca=class _StoreCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.Name}:${e.UserSpecific}-${e.Namespace}`)}};t(ca,"StoreCache");let aa=ca;const ua=new aa,ha=class _ValueChangedMessage extends R{constructor(e,t,n){super(),this.key=e,this.value=t,this.oldValue=n}key;value;oldValue;get canConflate(){return!0}conflate(e){return this.key===e.key&&(this.value=e.value,!0)}void(){return this.value===this.oldValue}};t(ha,"ValueChangedMessage");let la=ha;const pa=class _Store{connection;get BaseUrl(){return this.connection.baseUrl}Name;UserSpecific;Namespace;_dispatch=new D;static attach(e,t="HPCCApps",n,s=!0){return ua.get({BaseUrl:e.baseUrl,Name:t,UserSpecific:s,Namespace:n},()=>new _Store(e,t,n,s))}constructor(e,t,n,s){this.connection=e instanceof Pr?e:new Pr(e),this.Name=t,this.UserSpecific=s,this.Namespace=n}_knownValues={};create(){this.connection.CreateStore({Name:this.Name,Type:"",Description:""})}set(e,t,n=!0){return this.connection.Set({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e,Value:t}).then(s=>{const r=this._knownValues[e];this._knownValues[e]=t,n&&this._dispatch.post(new la(e,t,r))}).catch(n=>{console.error(`Store.set("${e}", "${t}") failed:`,n)})}get(e,t=!0){return this.connection.Fetch({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e}).then(n=>{const s=this._knownValues[e];return this._knownValues[e]=n.Value,t&&this._dispatch.post(new la(e,n.Value,s)),n.Value}).catch(t=>{console.error(`Store.get(${e}) failed:`,t)})}getAll(e=!0){return this.connection.FetchAll({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace}).then(t=>{const n={},s=this._knownValues;if(this._knownValues={},t.Pairs.Pair.forEach(t=>{const r=this._knownValues[t.Key];this._knownValues[t.Key]=t.Value,delete s[t.Key],n[t.Key]=t.Value,e&&this._dispatch.post(new la(t.Key,t.Value,r))}),e)for(const e in s)this._dispatch.post(new la(e,void 0,s[e]));return n}).catch(e=>(console.error("Store.getAll failed:",e),{}))}delete(e,t=!0){return this.connection.Delete({StoreName:this.Name,UserSpecific:this.UserSpecific,Namespace:this.Namespace,Key:e}).then(n=>{const s=this._knownValues[e];delete this._knownValues[e],t&&this._dispatch.post(new la(e,void 0,s))}).catch(t=>{console.error(`Store.delete(${e}) failed:`,t)})}monitor(e){return this._dispatch.attach(e)}};t(pa,"Store");let da=pa;const ga=n("@hpcc-js/comms/dfuWorkunit.ts"),ma=class _DFUWorkunitCache extends l{constructor(){super(e=>`${e.BaseUrl}-${e.ID}`)}};t(ma,"DFUWorkunitCache");let Sa=ma;const fa=new Sa,_a=class _DFUWorkunit extends h{connection;topologyConnection;get BaseUrl(){return this.connection.baseUrl}get properties(){return this.get()}get ID(){return this.get("ID")}get DFUServerName(){return this.get("DFUServerName")}get ClusterName(){return this.get("ClusterName")}get JobName(){return this.get("JobName")}get Queue(){return this.get("Queue")}get User(){return this.get("User")}get isProtected(){return this.get("isProtected")}get Command(){return this.get("Command")}get CommandMessage(){return this.get("CommandMessage")}get PercentDone(){return this.get("PercentDone")}get SecsLeft(){return this.get("SecsLeft")}get ProgressMessage(){return this.get("ProgressMessage")}get SummaryMessage(){return this.get("SummaryMessage")}get State(){return this.get("State",0)}get SourceLogicalName(){return this.get("SourceLogicalName")}get SourceIP(){return this.get("SourceIP")}get SourceFilePath(){return this.get("SourceFilePath")}get SourceDali(){return this.get("SourceDali")}get SourceRecordSize(){return this.get("SourceRecordSize")}get SourceFormat(){return this.get("SourceFormat")}get RowTag(){return this.get("RowTag")}get SourceNumParts(){return this.get("SourceNumParts")}get SourceDirectory(){return this.get("SourceDirectory")}get DestLogicalName(){return this.get("DestLogicalName")}get DestGroupName(){return this.get("DestGroupName")}get DestDirectory(){return this.get("DestDirectory")}get DestIP(){return this.get("DestIP")}get DestFilePath(){return this.get("DestFilePath")}get DestFormat(){return this.get("DestFormat")}get DestNumParts(){return this.get("DestNumParts")}get DestRecordSize(){return this.get("DestRecordSize")}get Replicate(){return this.get("Replicate")}get Overwrite(){return this.get("Overwrite")}get Compress(){return this.get("Compress")}get SourceCsvSeparate(){return this.get("SourceCsvSeparate")}get SourceCsvQuote(){return this.get("SourceCsvQuote")}get SourceCsvTerminate(){return this.get("SourceCsvTerminate")}get SourceCsvEscape(){return this.get("SourceCsvEscape")}get TimeStarted(){return this.get("TimeStarted")}get TimeStopped(){return this.get("TimeStopped")}get StateMessage(){return this.get("StateMessage")}get MonitorEventName(){return this.get("MonitorEventName")}get MonitorSub(){return this.get("MonitorSub")}get MonitorShotLimit(){return this.get("MonitorShotLimit")}get SourceDiffKeyName(){return this.get("SourceDiffKeyName")}get DestDiffKeyName(){return this.get("DestDiffKeyName")}get Archived(){return this.get("Archived")}get encrypt(){return this.get("encrypt")}get decrypt(){return this.get("decrypt")}get failIfNoSourceFile(){return this.get("failIfNoSourceFile")}get recordStructurePresent(){return this.get("recordStructurePresent")}get quotedTerminator(){return this.get("quotedTerminator")}get preserveCompression(){return this.get("preserveCompression")}get expireDays(){return this.get("expireDays")}get PreserveFileParts(){return this.get("PreserveFileParts")}get FileAccessCost(){return this.get("FileAccessCost")}get KbPerSecAve(){return this.get("KbPerSecAve")}get KbPerSec(){return this.get("KbPerSec")}static create(e,t){const n=new _DFUWorkunit(e);return n.connection.CreateDFUWorkunit({DFUServerQueue:t}).then(e=>(fa.set(n),n.set(e.result),n))}static attach(e,t,n){const s=fa.get({BaseUrl:e.baseUrl,ID:t},()=>new _DFUWorkunit(e,t));return n&&s.set(n),s}static sprayFixed(e,t){const n=new he(e);return n.SprayFixedEx({...t}).then(t=>{const s=t.wuid;return n.GetDFUWorkunit({wuid:s}).then(t=>_DFUWorkunit.attach(e,s,t.result))})}static sprayVariable(e,t){const n=new he(e);return n.SprayVariableEx({...t}).then(t=>{const s=t.wuid;return n.GetDFUWorkunit({wuid:s}).then(t=>_DFUWorkunit.attach(e,s,t.result))})}static despray(e,t){const n=new he(e);return n.DesprayEx({...t}).then(t=>{const s=t.wuid;return n.GetDFUWorkunit({wuid:s}).then(t=>_DFUWorkunit.attach(e,s,t.result))})}update(e){return this.connection.UpdateDFUWorkunitEx({wu:{JobName:e?.wu?.JobName??this.JobName,isProtected:e?.wu?.isProtected??this.isProtected,ID:this.ID,State:this.State},ClusterOrig:this.ClusterName,JobNameOrig:this.JobName,isProtectedOrig:this.isProtected,StateOrig:this.State})}isComplete(){switch(this.State){case 6:case 5:case 4:case 999:return!0}return!1}isFailed(){return!(!this.isComplete()||6===this.State)}isDeleted(){return 999===this.State}isRunning(){return!this.isComplete()}abort(){return this.connection.AbortDFUWorkunit({wuid:this.ID})}delete(){return this.DFUWUAction(ne.DFUWUActions.Delete).then(e=>this.refresh().then(()=>(this._monitor(),e)))}async refresh(e=!1){return await this.GetDFUWorkunit(),this}fetchXML(e){return this.DFUWUFile()}_monitor(){this.isComplete()?this._monitorTickCount=0:super._monitor()}_monitorTimeoutDuration(){const e=super._monitorTimeoutDuration();return this._monitorTickCount<=1?3e3:this._monitorTickCount<=5?6e3:this._monitorTickCount<=7?12e3:e}DFUWUFile(e={}){return this.connection.DFUWUFileEx({...e,Wuid:this.ID}).then(e=>e).catch(e=>"")}DFUWUAction(e){return this.connection.DFUWorkunitsAction({wuids:{Item:[this.ID]},Type:e}).then(t=>e===ne.DFUWUActions.Delete?t:this.refresh().then(()=>(this._monitor(),t)))}on(e,t,n){if(this.isCallback(t))switch(e){case"finished":super.on("propChanged","State",e=>{this.isComplete()&&t([e])});break;case"changed":super.on(e,t)}else if("changed"===e)super.on(e,t,n);return this._monitor(),this}watchUntilComplete(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),this.isComplete()&&(s.release(),t(this))})})}watchUntilRunning(e){return new Promise((t,n)=>{const s=this.watch(n=>{e&&e(n),(this.isComplete()||this.isRunning())&&(s.release(),t(this))})})}constructor(e,t){super(),this.connection=new he(e),this.topologyConnection=new kr(e),this.clearState(t)}clearState(e){this.clear({ID:e,State:0})}GetDFUWorkunit(e={}){return this.connection.GetDFUWorkunit({...e,wuid:this.ID}).then(e=>(this.set(e.result),e)).catch(e=>{if(!e.Exception.some(e=>(20080===e.Code||20081===e.Code)&&(this.clearState(this.ID),this.set("State",999),!0)))throw ga.warning(`Unexpected ESP exception: ${e.message}`),e;return{}})}};t(_a,"DFUWorkunit");let Ua=_a;export{Ce as AccessService,Fe as AccountService,lc as Activity,Ao as Attribute,W as BUILD_VERSION,Po as BaseScope,Le as CloudService,ke as CodesignService,O as Connection,tt as DFUArrayActions,st as DFUChangeProtection,rt as DFUChangeRestriction,nt as DFUDefFileFormat,ot as DFUService,Ua as DFUWorkunit,Sa as DFUWorkunitCache,ht as DFUXRefService,Be as DaliService,Mi as ECLGraph,K as ESPConnection,q as ESPExceptions,mt as EclService,Ut as ElkService,ne as FileSpray,he as FileSprayService,ae as FileSprayStates,Do as GlobalResultCache,Ii as GraphCache,Lt as LogType,Ot as LogaccessService,fc as LogicalFile,gc as LogicalFileCache,Dc as Machine,Uc as MachineCache,rn as MachineService,b as PKG_NAME,F as PKG_VERSION,un as PackageProcessService,Oo as PropertyType,oa as Query,Kc as QueryGraph,Xo as RelatedProperty,io as Resource,dn as ResourcesService,Fo as Result,vo as ResultCache,vr as SMCService,yn as SashaService,Lo as Scope,no as ScopeEdge,Yi as ScopeGraph,Zi as ScopeSubgraph,eo as ScopeVertex,te as Service,Mo as SourceFile,da as Store,aa as StoreCache,Pr as StoreService,Et as TargetAudience,vc as TargetCluster,bc as TargetClusterCache,Io as Timer,Mc as Topology,xc as TopologyCache,kr as TopologyService,la as ValueChangedMessage,oi as WUStateID,si as WUUpdate,rc as Workunit,tc as WorkunitCache,li as WorkunitsService,di as WorkunitsServiceEx,le as WsAccess,Ee as WsCodesign,Oe as WsDfu,yt as WsLogaccess,es as WsSMC,gn as WsSasha,xr as WsTopology,Gr as WsWorkunits,$i as XGMMLEdge,Vi as XGMMLGraph,Bi as XGMMLSubgraph,Xi as XGMMLVertex,co as XSDNode,go as XSDSchema,lo as XSDSimpleType,uo as XSDXMLNode,X as createConnection,so as createGraph,Ji as createXGMMLGraph,wc as defaultTargetCluster,L as deserializeResponse,k as get,Q as hookSend,w as instanceOfIConnection,T as instanceOfIOptions,$ as isArray,ci as isECLResult,Y as isExceptions,ui as isWUInfoWorkunit,ai as isWUQueryECLWorkunit,E as jsonp,fo as parseXSD,yo as parseXSD2,j as post,G as send,x as serializeRequest,H as setTransportFactory,qo as splitMetric,Tc as targetClusters};
2
2
  //# sourceMappingURL=index.js.map