@trakit/objects 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +18 -2
- package/index.js +1 -0
- package/package.json +1 -1
- package/trakit-objects.min.js +1 -1
package/index.d.ts
CHANGED
|
@@ -42,9 +42,25 @@ import { Radial } from "./API/Geometry/Radial";
|
|
|
42
42
|
import { Rectangle } from "./API/Geometry/Rectangle";
|
|
43
43
|
import { Size } from "./API/Geometry/Size";
|
|
44
44
|
import { GUID } from "./API/Guid";
|
|
45
|
+
import { IAmCompany } from "./API/Interfaces/IAmCompany";
|
|
46
|
+
import { IBelongAsset } from "./API/Interfaces/IBelongAsset";
|
|
47
|
+
import { IBelongBillingProfile } from "./API/Interfaces/IBelongBillingProfile";
|
|
48
|
+
import { IBelongCompany } from "./API/Interfaces/IBelongCompany";
|
|
45
49
|
import { IDeserializable } from "./API/Interfaces/IDeserializable";
|
|
50
|
+
import { IEnabled } from "./API/Interfaces/IEnabled";
|
|
51
|
+
import { IFileSize } from "./API/Interfaces/IFileSize";
|
|
52
|
+
import { IGlobal } from "./API/Interfaces/IGlobal";
|
|
53
|
+
import { IHavePermissions } from "./API/Interfaces/IHavePermissions";
|
|
54
|
+
import { IHavePreferences } from "./API/Interfaces/IHavePreferences";
|
|
55
|
+
import { IIconic } from "./API/Interfaces/IIconic";
|
|
56
|
+
import { IIdUlong } from "./API/Interfaces/IIdUlong";
|
|
57
|
+
import { ILabelled } from "./API/Interfaces/ILabelled";
|
|
58
|
+
import { INamed } from "./API/Interfaces/INamed";
|
|
59
|
+
import { IPictured } from "./API/Interfaces/IPictured";
|
|
46
60
|
import { IRequestable } from "./API/Interfaces/IRequestable";
|
|
47
61
|
import { ISerializable } from "./API/Interfaces/ISerializable";
|
|
62
|
+
import { ISuspendable } from "./API/Interfaces/ISuspendable";
|
|
63
|
+
import { IVisual } from "./API/Interfaces/IVisual";
|
|
48
64
|
import { SearchPattern } from "./API/SearchPattern";
|
|
49
65
|
import { TIMESPAN_PARSE, TIMESPAN_STRINGIFY, TimeSpan } from "./API/TimeSpan";
|
|
50
66
|
import { Timezone } from "./API/Timezone";
|
|
@@ -188,7 +204,7 @@ import { ReportType } from "./Reports/ReportType";
|
|
|
188
204
|
/**
|
|
189
205
|
* Version number for this release.
|
|
190
206
|
*/
|
|
191
|
-
export declare const version = "0.0.
|
|
207
|
+
export declare const version = "0.0.12";
|
|
192
208
|
/**
|
|
193
209
|
* The names of all main object types in the Trak-iT Object Model.
|
|
194
210
|
*/
|
|
@@ -212,7 +228,7 @@ export declare const storage: {
|
|
|
212
228
|
* Common types used throughout the application.
|
|
213
229
|
* These are simply numbers or strings of a specific format.
|
|
214
230
|
*/
|
|
215
|
-
export type { JsonArray, JsonObject, JsonValue, byte, double, int, long, phone, sbyte, short, single, uint, ulong, ushort, codified, colour, datetime, datetimetemplate, email, expression, guid, ipv4, nothing, polyline, timespan, url,
|
|
231
|
+
export type { JsonArray, JsonObject, JsonValue, byte, double, int, long, phone, sbyte, short, single, uint, ulong, ushort, codified, colour, datetime, datetimetemplate, email, expression, guid, ipv4, nothing, polyline, timespan, url, IAmCompany, IBelongBillingProfile, IBelongCompany, IBelongAsset, IDeserializable, IEnabled, IFileSize, IGlobal, IHavePermissions, IHavePreferences, IIconic, IIdUlong, ILabelled, INamed, IPictured, IRequestable, ISerializable, ISuspendable, IVisual, };
|
|
216
232
|
/**
|
|
217
233
|
* A group of utility functions for common tasks like dealing with strings.
|
|
218
234
|
*/
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './trakit-objects.min.js';
|
package/package.json
CHANGED
package/trakit-objects.min.js
CHANGED
|
@@ -5,4 +5,4 @@ function t(t){const s=[];for(let e=0,i=t.length;e<i;e++)s.indexOf(t[e])<0&&s.pus
|
|
|
5
5
|
* All of the Trak-iT APIs use the same object definitions. Use this package in your TypeScript or JavaScript project.
|
|
6
6
|
* Last updated on Friday December 19, 2025
|
|
7
7
|
* @copyright Trak-iT Wireless Inc. 2025
|
|
8
|
-
*/const hh="0.0.11",ah={Company:kn,CompanyGeneral:wn,CompanyStyle:Jn,CompanyDirectory:Nn,CompanyPolicy:vn,CompanyReseller:On,Contact:ae,Machine:Ne,Session:xe,User:He,UserGeneral:je,UserAdvanced:Ie,UserGroup:qe,Asset:Xi,AssetGeneral:Zi,AssetAdvanced:_i,AssetDispatch:$i,AssetAlert:vr,AssetMessage:Tr,Behaviour:tn,BehaviourScript:en,BehaviourLog:sn,BillableHostingLicense:on,BillableHostingRule:un,BillingProfile:rn,BillingReport:gn,DispatchJob:In,DispatchTask:Mn,Document:An,FormResult:_n,FormTemplate:Yn,Dashcam:Zn,Icon:sr,Picture:er,MaintenanceSchedule:rr,MaintenanceJob:nr,Place:br,Provider:Hr,ProviderGeneral:jr,ProviderAdvanced:Rr,ProviderControl:Lr,ProviderScript:xr,ProviderConfig:Or,ProviderConfigurationType:Mr,ProviderConfiguration:Ur,ProviderRegistration:Cr,ReportTemplate:rh,ReportSchedule:ih,ReportResult:sh},oh={Company:Ss,CompanyGeneral:Ss,CompanyStyle:Ss,CompanyDirectory:Ss,CompanyPolicy:Ss,CompanyReseller:Ss,Contact:vs,Machine:Ts,Session:Cs,User:bs,UserGeneral:bs,UserAdvanced:bs,UserGroup:Os,Asset:Js,AssetGeneral:Js,AssetAdvanced:Js,AssetDispatch:Js,AssetAlert:ks,AssetMessage:ks,Behaviour:xs,BehaviourScript:Us,BehaviourLog:Is,BillingProfile:Ms,BillingReport:As,BillableHostingRule:Ds,BillableHostingLicense:Ps,DispatchTask:Es,DispatchJob:zs,Document:Ks,FormTemplate:Rs,FormResult:Bs,Dashcam:Hs,Icon:js,Picture:Ls,MaintenanceSchedule:qs,MaintenanceJob:Gs,Place:Vs,Provider:Fs,ProviderGeneral:Fs,ProviderAdvanced:Fs,ProviderControl:Fs,ProviderScript:Ws,ProviderConfig:_s,ProviderConfigurationType:Ys,ProviderConfiguration:$s,ProviderRegistration:Zs,ReportTemplate:Xs,ReportSchedule:Qs,ReportResult:te},uh={capitalize:function(t,s=!0){return t?.length?t[0][s?"toUpperCase":"toLowerCase"]()+t.slice(1):""},codify:J,date:m,douglasPeucker:function(t,s,e){if(!Array.isArray(t))throw new TypeError("source is not an Array.");if(!("function"==typeof(i=s)||i instanceof Function))throw new TypeError("triangleHeight is not an Function.");var i;if(!u(e)||e<0)throw new TypeError("tolerance is not an Number or less than zero.");return t.length<3?[...t]:t.filter(n,p(t,s,e))},fileSize:function(t,s=0,e="MB",i=3,n=",",r=n,h="."){let a=0;if(t){const s=oi.includes(e)?oi.indexOf(e):ui;for(;a<s&&t>=1024;)t/=1024,a++}return ot(c(t,s),i,n,r,h)+" "+oi[a]},findTimeZoneById:U,guid:function(){const t=(new Date).valueOf().toString(16).substring(1).split("").reduce(Bt,[...Ti]);for(let s=0;s<36;s++)if(" "===t[s]){let e=16*Zt.random()|0;t[s]=(19!==s?e:3&e|8).toString(16)}return t.join("")},highlight:function(t,s,[e,i]=["<b>","</b>"]){if(!t||!s?.length)return t;let n,r="",h=0;const a=new RegExp(s.map((t=>J(t).split("-").map((t=>t.split("").map((t=>ys+t)).join("")+ys)).join("[^a-z0-9]+"))).join("|"),"gim");for(;n=a.exec(t);)r+=t.slice(h,n.index)+e+n[0]+i,h=n.index+n[0].length;return r+t.slice(h)},id:d,isNothing:h,isntNaN:u,numberGroups:ot,roundTo:c,parseTime:function(t){return new Be(t).totalSeconds},phoneNumber:g,pluralize:function(t){return t.endsWith("y")?t.slice(0,-1)+"ies":t.endsWith("ch")?t+"es":t+"s"},singularize:function(t){return t.endsWith("ies")?t.slice(0,-3)+"y":t.endsWith("ches")?t.slice(0,-2):t.endsWith("s")?t.slice(0,-1):t},stringifyTime:function(t){return new Be(t*Pe).toString()}},ch=ai,lh={toPassword:function(t){return encodeURIComponent([...h(t)?"":String(t)].reduce((function(t,s){return t+String.fromCharCode(111^s.charCodeAt(0))}),""))},fromPassword:function(t){return[...decodeURIComponent(h(t)?"":String(t))].reduce((function(t,s){return t+String.fromCharCode(111^s.charCodeAt(0))}),"")}},dh={fromMap:N,fromMapPredicate:w,toMap:S,toMapPredicate:y},mh={pathLength:function(t){let s=0,e=0,i=t.length-1,n=t[e],r=n;for(;e<i;e++)n=t[e],r=t[e+1],s+=l(r.x-n.x,r.y-n.y);return s},pathOrthogonal:At,pathReduce:function(t,s=0){return t.length<3?t.slice():(s>0||(s=0),t.filter(n,p(t,Dt,s)))},pointAngle:xt,pointDistance:Ut,pointPythagora:l,pointVector:Mt,polyArea:Pt,polyContains:function(t,s){let e=t.slice(),i=0,n=e.length,r=n-1,h=!1;if(e[i].x===e[r].x&&e[i].y===e[r].y&&(e.pop(),n=e.length,r=n-1),zt(Et(e),s))for(;i<n;r=i++){const t=e[i],n=e[r];t.y>s.y!=n.y>s.y&&s.x<(n.x-t.x)*(s.y-t.y)/(n.y-t.y)+t.x&&(h=!h)}return h},polyReduce:function(t,s=0){let e=[...t],i=t.length;if(i<3)return e;{let t=0,r=0;s>0||(s=0);for(let s=0;s<i;s++){const n=e[s];for(let h=s+1;h<i;h++){const i=Ut(n,e[h]);i>t&&(r=s,t=i)}}return e=e.splice(r,i).concat(e),Ut(e[0],e[i-1])>0&&(i=e.push(e[0])),e=e.filter(n,p(e,Dt,s)),i=e.length,Ut(e[0],e[i-1])<=0&&e.pop(),e}},polyWrapper:function(t){let s=t.slice().sort(It),e=s[0],i=[e];for(;s.length>1;){let t=0,n=0,r=360;for(let i=0,h=s.length;i<h;i++){const a=s[i],o=xt(e,a),u=Ut(e,a);a!==e&&(u?(o<r||o===r&&u>n)&&(o===r&&(s.splice(t,1),i--,h--),r=o,n=u,t=i):(s.splice(i--,1),h--))}if(0===t)break;i.push(e=s.splice(t,1)[0])}return i},radialCircumference:function(t){return 2*Xt*t},radialArea:function(t){return Xt*(t*t)},radialSmallest:function(t,s){let e=t[0],i=0;switch(t.length){case 1:return{x:e.x,y:e.y,r:i};case 2:return function(t){const s=function(t){return{x:t.left+(t.right-t.left)/2,y:t.top+(t.bottom-t.top)/2}}(t);t.right,t.left,t.bottom,t.top;return{x:s.x,y:s.y,r:Ut(s,{x:t.left,y:t.top})}}(Et(t))}s||(s=1e4);for(let n=0;n<s;n++){let s=t[0],r=0;for(let i=0;i<t.length;i++){const n=t[i],h=Ut(e,n);h>r&&(s=n,r=h)}e={x:e.x+1/(n+1)*(s.x-e.x),y:e.y+1/(n+1)*(s.y-e.y)},i=r}return{x:e.x,y:e.y,r:i}},radialOverlapsRectangle:function(t,s){const e=kt(s),i=kt(s);return e.top-=t.r,e.bottom+=t.r,i.left-=t.r,i.right+=t.r,zt(e,t)||zt(i,t)||Ut(t,{x:s.left,y:s.top})<=t.r||Ut(t,{x:s.right,y:s.top})<=t.r||Ut(t,{x:s.left,y:s.bottom})<=t.r||Ut(t,{x:s.right,y:s.bottom})<=t.r}},ph={earthRadius:ci,clampLat:ct,clampLng:lt,pathLength:function(t){const s=[...t],e=s.length-1;for(let t=0,i=0;t<e;t++)i+=mt(s[t],s[t+1]);return length},pathReduce:function(t,s){return t.length<3?[...t]:(s>0||(s=0),t.filter(n,p(t,Nt,s)))},pathEncode:yt,pathDecode:St,pointAngle:dt,pointDistance:mt,pointMiddle:ft,pointOrthogonal:pt,pointTranslate:gt,pointVincenty:function(t,s){const e=ct(t.lat),i=ct(s.lat),n=lt(t.lng,e),r=(lt(s.lng,i)-n)*ms,h=ss((1-li)*ls(e*ms)),a=ss((1-li)*ls(e*ms)),o=us(h),c=is(h),l=us(a),d=is(a);let m,p,g,f,N,w,y,S,v,T,b=r,O=100;do{if(p=us(b),g=is(b),f=cs(d*p*(d*p)+(c*l-o*d*g)*(c*l-o*d*g)),0===f)return 0;N=o*l+c*d*g,w=es(f,N),y=c*d*p/f,S=1-y*y,v=N-2*o*l/S,T=li/16*S*(4+li*(4-3*S)),u(v)||(v=0),m=b,b=r+(1-T)*li*y*(w+T*f*(v+T*N*(2*v*v-1)))}while(Qt(b-m)>1e-12&&--O>0);if(!O)return 0;const C=272331606107.5547*S/40408299984661.445,J=C/1024*(256+C*(C*(74-47*C)-128));return di*(1+C/16384*(4096+C*(C*(320-175*C)-768)))*(w-J*f*(v+J/4*(N*(2*v*v-1)-J/6*v*(4*f*f-3)*(4*v*v-3))))},polyArea:function(t){const s=[...t];let e,i=0,n=0,r=s.length-1,h=s[n],a=s[r];if(h&&a&&mt(h,a)<=mi&&(s.pop(),r--),r<1)throw new Error("Not enough coordinates");if(r>1)for(n=1;n<r;n++)e=s[n],a=s[n+1],i+=Tt(h,e,a)*bt(h,e,a);return Qt(40680631590769*i)},polyContains:function(t,s){throw"not implemented"},polyReduce:function(t,s=1e-9){let e=[...t],i=t.length;if(i>2){const[t,r,h]=vt(e);s>0||(s=mi),e=e.splice(r,i).concat(e),mt(e[0],e[i-1])>s&&(i=e.push(e[0])),e=e.filter(n,p(e,Nt,s)),i=e.length,mt(e[0],e[i-1])<=s&&e.pop()}return e},polyWidest:vt},gh={computeAll:j,compute:H,computeAllSimple:function(t,s,e){return j(t,(s||[]).filter(R),(e||[]).filter(R))},computeSimple:q,computeSimpleLevels:function(t,s,e,i){const n=new Map;return q(t,s,e,i).forEach((function(t){n.set(t.kind,t.level)})),n},getSimpleLevel:function(t,s,e,i,n){return V(t,q(t,s,e,i),n)},hasSimple:function(t,s,e,i,n,r){return G(t,q(t,s,e,i),n,r)},findSimple:G,findSimpleLevel:V,computeAllComplex:function(t,s,e){const i=new Map;return j(t,(s||[]).filter(K),(e||[]).filter(K)).forEach((function(t,s){for(let s,e=0;s=t[e];e++)K(s)||t.splice(e--,1);t.length>0&&i.set(s,t)})),i},computeComplex:F,getComplexLevel:function(t,s,e,i,n,r,h){return _(t,F(t,s,e,i),n,r,h)},findComplexLevel:_,hasComplex:function(t,s,e,i,n,r,h,a){return W(t,F(t,s,e,i),n,r,h,a)},findComplex:W,hasAnyComplex:function(t,s,e,i,n,r){return Y(t,F(t,s,e,i),n,r)},findAnyComplex:Y,findAllEscalations:function(t,s,e,i){const n=new Map;return e.forEach((function(e,r){if(s.has(r)){const h=$(t,s.get(r),e,i&&i.get(r));h.length&&n.set(r,h)}else n.set(r,e.map((function(t){return new ye(ge.vertical,t.companyId,t.kind,t.level,t.labels)})))})),n},findEscalations:$,findAllLabelEscalations:function(t,s,e,i,n,r){const h=[];return(e||[]).length>0&&e.forEach((function(e){const a=Z(t,s,e,i,n,r);a&&h.push(a)})),h},findLabelEscalation:Z,implied:$t(ve),simple:$t(s(Yt(de),Te)),complex:$t(Te)};export{hr as AlertPriority,Xi as Asset,_i as AssetAdvanced,vr as AssetAlert,xi as AssetAttribute,$i as AssetDispatch,Zi as AssetGeneral,Tr as AssetMessage,Wi as AssetPlaceStatus,Ui as AssetPlaceStatusType,Ii as AssetType,Gt as Base,Vt as BaseComponent,Ue as BaseCompound,tn as Behaviour,sn as BehaviourLog,Ai as BehaviourLogType,Qi as BehaviourParameter,Mi as BehaviourParameterType,en as BehaviourScript,on as BillableHostingLicense,Ei as BillableHostingLicenseType,un as BillableHostingRule,zi as BillableHostingType,Di as BillingCurrency,Pi as BillingCycle,rn as BillingProfile,gn as BillingReport,dn as BillingReportBreakdown,mn as BillingReportHostingSummary,cn as BillingReportLicenseBreakdown,ln as BillingReportServiceBreakdown,Ri as BillingReportStatus,pn as BillingReportSummary,fn as ColourStyle,kn as Company,Nn as CompanyDirectory,wn as CompanyGeneral,vn as CompanyPolicy,On as CompanyReseller,Jn as CompanyStyle,ae as Contact,Zn as Dashcam,$n as DashcamBase,Xn as DashcamLive,Ln as DashcamMediaType,Yi as DispatchDirection,In as DispatchJob,qi as DispatchJobPriority,Un as DispatchStep,xn as DispatchStepState,Gi as DispatchStepStatus,Mn as DispatchTask,Vi as DispatchTaskStatus,An as Document,Pn as FormFieldAttachments,Dn as FormFieldBase,En as FormFieldBoolean,Kn as FormFieldChoice,Rn as FormFieldDate,qn as FormFieldNumeric,Bn as FormFieldNumericSize,Gn as FormFieldSignature,Vn as FormFieldText,Fn as FormFieldTime,Wn as FormFieldTimezone,Fi as FormFieldType,_n as FormResult,Yn as FormTemplate,sr as Icon,Qn as IconGlyph,tr as IconLabel,jn as IconLayer,Cn as LabelStyle,yi as LatLng,wi as LatLngBounds,Ne as Machine,ir as MaintenanceInterval,nr as MaintenanceJob,Hn as MaintenanceJobStatus,rr as MaintenanceSchedule,ur as MessageFolder,ar as MessageStatus,or as MessageType,pe as NotificationMethod,Tn as NotificationServerEmail,bn as NotificationServerSms,Bi as PasswordExpiryMode,yn as PasswordPolicy,fe as Permission,ye as PermissionEscalation,we as PermissionEscalationState,ge as PermissionEscalationType,ce as PermissionLevel,le as PermissionMethod,de as PermissionType,er as Picture,br as Place,cr as PlaceType,Ni as Point,vi as Position,Hr as Provider,Rr as ProviderAdvanced,Br as ProviderCommand,dr as ProviderCommandStatus,mr as ProviderCommandType,Or as ProviderConfig,Ur as ProviderConfiguration,Ir as ProviderConfigurationNode,Mr as ProviderConfigurationType,Lr as ProviderControl,Kr as ProviderData,jr as ProviderGeneral,Ar as ProviderGeofenceBase,Dr as ProviderGeofenceCircular,Pr as ProviderGeofencePoint,Er as ProviderGeofencePolygon,zr as ProviderGeofenceRectangle,Cr as ProviderRegistration,xr as ProviderScript,Jr as ProviderScriptBlock,kr as ProviderScriptParameter,lr as ProviderScriptParameterType,Ki as ProviderType,fi as Radial,gi as Rectangle,qr as ReportBreakdown,Gr as ReportBreakdownJob,Vr as ReportBreakdownMessage,Fr as ReportBreakdownTask,pr as ReportFilterMode,Wr as ReportNotifications,Zr as ReportOptions,_r as ReportParameter,gr as ReportParameterType,Xr as ReportRecurrence,fr as ReportRecurrenceType,sh as ReportResult,eh as ReportResultData,ih as ReportSchedule,Qr as ReportScorecard,Yr as ReportScorecardParameter,$r as ReportScorecardRules,Nr as ReportStatus,nh as ReportSummary,yr as ReportSummaryReason,rh as ReportTemplate,th as ReportTotal,wr as ReportType,ki as SearchPattern,xe as Session,Li as SessionMultiUser,Sn as SessionPolicy,Ce as SessionStatus,pi as Size,Si as StreetAddress,me as SystemsOfUnits,Be as TimeSpan,oe as Timezone,He as User,Ie as UserAdvanced,je as UserGeneral,qe as UserGroup,Le as UserNotifications,gh as authorizer,ah as classes,ch as convert,lh as encoding,ph as geography,mh as geometry,dh as serialization,oh as storage,uh as utility,hh as version};
|
|
8
|
+
*/const hh="0.0.12",ah={Company:kn,CompanyGeneral:wn,CompanyStyle:Jn,CompanyDirectory:Nn,CompanyPolicy:vn,CompanyReseller:On,Contact:ae,Machine:Ne,Session:xe,User:He,UserGeneral:je,UserAdvanced:Ie,UserGroup:qe,Asset:Xi,AssetGeneral:Zi,AssetAdvanced:_i,AssetDispatch:$i,AssetAlert:vr,AssetMessage:Tr,Behaviour:tn,BehaviourScript:en,BehaviourLog:sn,BillableHostingLicense:on,BillableHostingRule:un,BillingProfile:rn,BillingReport:gn,DispatchJob:In,DispatchTask:Mn,Document:An,FormResult:_n,FormTemplate:Yn,Dashcam:Zn,Icon:sr,Picture:er,MaintenanceSchedule:rr,MaintenanceJob:nr,Place:br,Provider:Hr,ProviderGeneral:jr,ProviderAdvanced:Rr,ProviderControl:Lr,ProviderScript:xr,ProviderConfig:Or,ProviderConfigurationType:Mr,ProviderConfiguration:Ur,ProviderRegistration:Cr,ReportTemplate:rh,ReportSchedule:ih,ReportResult:sh},oh={Company:Ss,CompanyGeneral:Ss,CompanyStyle:Ss,CompanyDirectory:Ss,CompanyPolicy:Ss,CompanyReseller:Ss,Contact:vs,Machine:Ts,Session:Cs,User:bs,UserGeneral:bs,UserAdvanced:bs,UserGroup:Os,Asset:Js,AssetGeneral:Js,AssetAdvanced:Js,AssetDispatch:Js,AssetAlert:ks,AssetMessage:ks,Behaviour:xs,BehaviourScript:Us,BehaviourLog:Is,BillingProfile:Ms,BillingReport:As,BillableHostingRule:Ds,BillableHostingLicense:Ps,DispatchTask:Es,DispatchJob:zs,Document:Ks,FormTemplate:Rs,FormResult:Bs,Dashcam:Hs,Icon:js,Picture:Ls,MaintenanceSchedule:qs,MaintenanceJob:Gs,Place:Vs,Provider:Fs,ProviderGeneral:Fs,ProviderAdvanced:Fs,ProviderControl:Fs,ProviderScript:Ws,ProviderConfig:_s,ProviderConfigurationType:Ys,ProviderConfiguration:$s,ProviderRegistration:Zs,ReportTemplate:Xs,ReportSchedule:Qs,ReportResult:te},uh={capitalize:function(t,s=!0){return t?.length?t[0][s?"toUpperCase":"toLowerCase"]()+t.slice(1):""},codify:J,date:m,douglasPeucker:function(t,s,e){if(!Array.isArray(t))throw new TypeError("source is not an Array.");if(!("function"==typeof(i=s)||i instanceof Function))throw new TypeError("triangleHeight is not an Function.");var i;if(!u(e)||e<0)throw new TypeError("tolerance is not an Number or less than zero.");return t.length<3?[...t]:t.filter(n,p(t,s,e))},fileSize:function(t,s=0,e="MB",i=3,n=",",r=n,h="."){let a=0;if(t){const s=oi.includes(e)?oi.indexOf(e):ui;for(;a<s&&t>=1024;)t/=1024,a++}return ot(c(t,s),i,n,r,h)+" "+oi[a]},findTimeZoneById:U,guid:function(){const t=(new Date).valueOf().toString(16).substring(1).split("").reduce(Bt,[...Ti]);for(let s=0;s<36;s++)if(" "===t[s]){let e=16*Zt.random()|0;t[s]=(19!==s?e:3&e|8).toString(16)}return t.join("")},highlight:function(t,s,[e,i]=["<b>","</b>"]){if(!t||!s?.length)return t;let n,r="",h=0;const a=new RegExp(s.map((t=>J(t).split("-").map((t=>t.split("").map((t=>ys+t)).join("")+ys)).join("[^a-z0-9]+"))).join("|"),"gim");for(;n=a.exec(t);)r+=t.slice(h,n.index)+e+n[0]+i,h=n.index+n[0].length;return r+t.slice(h)},id:d,isNothing:h,isntNaN:u,numberGroups:ot,roundTo:c,parseTime:function(t){return new Be(t).totalSeconds},phoneNumber:g,pluralize:function(t){return t.endsWith("y")?t.slice(0,-1)+"ies":t.endsWith("ch")?t+"es":t+"s"},singularize:function(t){return t.endsWith("ies")?t.slice(0,-3)+"y":t.endsWith("ches")?t.slice(0,-2):t.endsWith("s")?t.slice(0,-1):t},stringifyTime:function(t){return new Be(t*Pe).toString()}},ch=ai,lh={toPassword:function(t){return encodeURIComponent([...h(t)?"":String(t)].reduce((function(t,s){return t+String.fromCharCode(111^s.charCodeAt(0))}),""))},fromPassword:function(t){return[...decodeURIComponent(h(t)?"":String(t))].reduce((function(t,s){return t+String.fromCharCode(111^s.charCodeAt(0))}),"")}},dh={fromMap:N,fromMapPredicate:w,toMap:S,toMapPredicate:y},mh={pathLength:function(t){let s=0,e=0,i=t.length-1,n=t[e],r=n;for(;e<i;e++)n=t[e],r=t[e+1],s+=l(r.x-n.x,r.y-n.y);return s},pathOrthogonal:At,pathReduce:function(t,s=0){return t.length<3?t.slice():(s>0||(s=0),t.filter(n,p(t,Dt,s)))},pointAngle:xt,pointDistance:Ut,pointPythagora:l,pointVector:Mt,polyArea:Pt,polyContains:function(t,s){let e=t.slice(),i=0,n=e.length,r=n-1,h=!1;if(e[i].x===e[r].x&&e[i].y===e[r].y&&(e.pop(),n=e.length,r=n-1),zt(Et(e),s))for(;i<n;r=i++){const t=e[i],n=e[r];t.y>s.y!=n.y>s.y&&s.x<(n.x-t.x)*(s.y-t.y)/(n.y-t.y)+t.x&&(h=!h)}return h},polyReduce:function(t,s=0){let e=[...t],i=t.length;if(i<3)return e;{let t=0,r=0;s>0||(s=0);for(let s=0;s<i;s++){const n=e[s];for(let h=s+1;h<i;h++){const i=Ut(n,e[h]);i>t&&(r=s,t=i)}}return e=e.splice(r,i).concat(e),Ut(e[0],e[i-1])>0&&(i=e.push(e[0])),e=e.filter(n,p(e,Dt,s)),i=e.length,Ut(e[0],e[i-1])<=0&&e.pop(),e}},polyWrapper:function(t){let s=t.slice().sort(It),e=s[0],i=[e];for(;s.length>1;){let t=0,n=0,r=360;for(let i=0,h=s.length;i<h;i++){const a=s[i],o=xt(e,a),u=Ut(e,a);a!==e&&(u?(o<r||o===r&&u>n)&&(o===r&&(s.splice(t,1),i--,h--),r=o,n=u,t=i):(s.splice(i--,1),h--))}if(0===t)break;i.push(e=s.splice(t,1)[0])}return i},radialCircumference:function(t){return 2*Xt*t},radialArea:function(t){return Xt*(t*t)},radialSmallest:function(t,s){let e=t[0],i=0;switch(t.length){case 1:return{x:e.x,y:e.y,r:i};case 2:return function(t){const s=function(t){return{x:t.left+(t.right-t.left)/2,y:t.top+(t.bottom-t.top)/2}}(t);t.right,t.left,t.bottom,t.top;return{x:s.x,y:s.y,r:Ut(s,{x:t.left,y:t.top})}}(Et(t))}s||(s=1e4);for(let n=0;n<s;n++){let s=t[0],r=0;for(let i=0;i<t.length;i++){const n=t[i],h=Ut(e,n);h>r&&(s=n,r=h)}e={x:e.x+1/(n+1)*(s.x-e.x),y:e.y+1/(n+1)*(s.y-e.y)},i=r}return{x:e.x,y:e.y,r:i}},radialOverlapsRectangle:function(t,s){const e=kt(s),i=kt(s);return e.top-=t.r,e.bottom+=t.r,i.left-=t.r,i.right+=t.r,zt(e,t)||zt(i,t)||Ut(t,{x:s.left,y:s.top})<=t.r||Ut(t,{x:s.right,y:s.top})<=t.r||Ut(t,{x:s.left,y:s.bottom})<=t.r||Ut(t,{x:s.right,y:s.bottom})<=t.r}},ph={earthRadius:ci,clampLat:ct,clampLng:lt,pathLength:function(t){const s=[...t],e=s.length-1;for(let t=0,i=0;t<e;t++)i+=mt(s[t],s[t+1]);return length},pathReduce:function(t,s){return t.length<3?[...t]:(s>0||(s=0),t.filter(n,p(t,Nt,s)))},pathEncode:yt,pathDecode:St,pointAngle:dt,pointDistance:mt,pointMiddle:ft,pointOrthogonal:pt,pointTranslate:gt,pointVincenty:function(t,s){const e=ct(t.lat),i=ct(s.lat),n=lt(t.lng,e),r=(lt(s.lng,i)-n)*ms,h=ss((1-li)*ls(e*ms)),a=ss((1-li)*ls(e*ms)),o=us(h),c=is(h),l=us(a),d=is(a);let m,p,g,f,N,w,y,S,v,T,b=r,O=100;do{if(p=us(b),g=is(b),f=cs(d*p*(d*p)+(c*l-o*d*g)*(c*l-o*d*g)),0===f)return 0;N=o*l+c*d*g,w=es(f,N),y=c*d*p/f,S=1-y*y,v=N-2*o*l/S,T=li/16*S*(4+li*(4-3*S)),u(v)||(v=0),m=b,b=r+(1-T)*li*y*(w+T*f*(v+T*N*(2*v*v-1)))}while(Qt(b-m)>1e-12&&--O>0);if(!O)return 0;const C=272331606107.5547*S/40408299984661.445,J=C/1024*(256+C*(C*(74-47*C)-128));return di*(1+C/16384*(4096+C*(C*(320-175*C)-768)))*(w-J*f*(v+J/4*(N*(2*v*v-1)-J/6*v*(4*f*f-3)*(4*v*v-3))))},polyArea:function(t){const s=[...t];let e,i=0,n=0,r=s.length-1,h=s[n],a=s[r];if(h&&a&&mt(h,a)<=mi&&(s.pop(),r--),r<1)throw new Error("Not enough coordinates");if(r>1)for(n=1;n<r;n++)e=s[n],a=s[n+1],i+=Tt(h,e,a)*bt(h,e,a);return Qt(40680631590769*i)},polyContains:function(t,s){throw"not implemented"},polyReduce:function(t,s=1e-9){let e=[...t],i=t.length;if(i>2){const[t,r,h]=vt(e);s>0||(s=mi),e=e.splice(r,i).concat(e),mt(e[0],e[i-1])>s&&(i=e.push(e[0])),e=e.filter(n,p(e,Nt,s)),i=e.length,mt(e[0],e[i-1])<=s&&e.pop()}return e},polyWidest:vt},gh={computeAll:j,compute:H,computeAllSimple:function(t,s,e){return j(t,(s||[]).filter(R),(e||[]).filter(R))},computeSimple:q,computeSimpleLevels:function(t,s,e,i){const n=new Map;return q(t,s,e,i).forEach((function(t){n.set(t.kind,t.level)})),n},getSimpleLevel:function(t,s,e,i,n){return V(t,q(t,s,e,i),n)},hasSimple:function(t,s,e,i,n,r){return G(t,q(t,s,e,i),n,r)},findSimple:G,findSimpleLevel:V,computeAllComplex:function(t,s,e){const i=new Map;return j(t,(s||[]).filter(K),(e||[]).filter(K)).forEach((function(t,s){for(let s,e=0;s=t[e];e++)K(s)||t.splice(e--,1);t.length>0&&i.set(s,t)})),i},computeComplex:F,getComplexLevel:function(t,s,e,i,n,r,h){return _(t,F(t,s,e,i),n,r,h)},findComplexLevel:_,hasComplex:function(t,s,e,i,n,r,h,a){return W(t,F(t,s,e,i),n,r,h,a)},findComplex:W,hasAnyComplex:function(t,s,e,i,n,r){return Y(t,F(t,s,e,i),n,r)},findAnyComplex:Y,findAllEscalations:function(t,s,e,i){const n=new Map;return e.forEach((function(e,r){if(s.has(r)){const h=$(t,s.get(r),e,i&&i.get(r));h.length&&n.set(r,h)}else n.set(r,e.map((function(t){return new ye(ge.vertical,t.companyId,t.kind,t.level,t.labels)})))})),n},findEscalations:$,findAllLabelEscalations:function(t,s,e,i,n,r){const h=[];return(e||[]).length>0&&e.forEach((function(e){const a=Z(t,s,e,i,n,r);a&&h.push(a)})),h},findLabelEscalation:Z,implied:$t(ve),simple:$t(s(Yt(de),Te)),complex:$t(Te)};export{hr as AlertPriority,Xi as Asset,_i as AssetAdvanced,vr as AssetAlert,xi as AssetAttribute,$i as AssetDispatch,Zi as AssetGeneral,Tr as AssetMessage,Wi as AssetPlaceStatus,Ui as AssetPlaceStatusType,Ii as AssetType,Gt as Base,Vt as BaseComponent,Ue as BaseCompound,tn as Behaviour,sn as BehaviourLog,Ai as BehaviourLogType,Qi as BehaviourParameter,Mi as BehaviourParameterType,en as BehaviourScript,on as BillableHostingLicense,Ei as BillableHostingLicenseType,un as BillableHostingRule,zi as BillableHostingType,Di as BillingCurrency,Pi as BillingCycle,rn as BillingProfile,gn as BillingReport,dn as BillingReportBreakdown,mn as BillingReportHostingSummary,cn as BillingReportLicenseBreakdown,ln as BillingReportServiceBreakdown,Ri as BillingReportStatus,pn as BillingReportSummary,fn as ColourStyle,kn as Company,Nn as CompanyDirectory,wn as CompanyGeneral,vn as CompanyPolicy,On as CompanyReseller,Jn as CompanyStyle,ae as Contact,Zn as Dashcam,$n as DashcamBase,Xn as DashcamLive,Ln as DashcamMediaType,Yi as DispatchDirection,In as DispatchJob,qi as DispatchJobPriority,Un as DispatchStep,xn as DispatchStepState,Gi as DispatchStepStatus,Mn as DispatchTask,Vi as DispatchTaskStatus,An as Document,Pn as FormFieldAttachments,Dn as FormFieldBase,En as FormFieldBoolean,Kn as FormFieldChoice,Rn as FormFieldDate,qn as FormFieldNumeric,Bn as FormFieldNumericSize,Gn as FormFieldSignature,Vn as FormFieldText,Fn as FormFieldTime,Wn as FormFieldTimezone,Fi as FormFieldType,_n as FormResult,Yn as FormTemplate,sr as Icon,Qn as IconGlyph,tr as IconLabel,jn as IconLayer,Cn as LabelStyle,yi as LatLng,wi as LatLngBounds,Ne as Machine,ir as MaintenanceInterval,nr as MaintenanceJob,Hn as MaintenanceJobStatus,rr as MaintenanceSchedule,ur as MessageFolder,ar as MessageStatus,or as MessageType,pe as NotificationMethod,Tn as NotificationServerEmail,bn as NotificationServerSms,Bi as PasswordExpiryMode,yn as PasswordPolicy,fe as Permission,ye as PermissionEscalation,we as PermissionEscalationState,ge as PermissionEscalationType,ce as PermissionLevel,le as PermissionMethod,de as PermissionType,er as Picture,br as Place,cr as PlaceType,Ni as Point,vi as Position,Hr as Provider,Rr as ProviderAdvanced,Br as ProviderCommand,dr as ProviderCommandStatus,mr as ProviderCommandType,Or as ProviderConfig,Ur as ProviderConfiguration,Ir as ProviderConfigurationNode,Mr as ProviderConfigurationType,Lr as ProviderControl,Kr as ProviderData,jr as ProviderGeneral,Ar as ProviderGeofenceBase,Dr as ProviderGeofenceCircular,Pr as ProviderGeofencePoint,Er as ProviderGeofencePolygon,zr as ProviderGeofenceRectangle,Cr as ProviderRegistration,xr as ProviderScript,Jr as ProviderScriptBlock,kr as ProviderScriptParameter,lr as ProviderScriptParameterType,Ki as ProviderType,fi as Radial,gi as Rectangle,qr as ReportBreakdown,Gr as ReportBreakdownJob,Vr as ReportBreakdownMessage,Fr as ReportBreakdownTask,pr as ReportFilterMode,Wr as ReportNotifications,Zr as ReportOptions,_r as ReportParameter,gr as ReportParameterType,Xr as ReportRecurrence,fr as ReportRecurrenceType,sh as ReportResult,eh as ReportResultData,ih as ReportSchedule,Qr as ReportScorecard,Yr as ReportScorecardParameter,$r as ReportScorecardRules,Nr as ReportStatus,nh as ReportSummary,yr as ReportSummaryReason,rh as ReportTemplate,th as ReportTotal,wr as ReportType,ki as SearchPattern,xe as Session,Li as SessionMultiUser,Sn as SessionPolicy,Ce as SessionStatus,pi as Size,Si as StreetAddress,me as SystemsOfUnits,Be as TimeSpan,oe as Timezone,He as User,Ie as UserAdvanced,je as UserGeneral,qe as UserGroup,Le as UserNotifications,gh as authorizer,ah as classes,ch as convert,lh as encoding,ph as geography,mh as geometry,dh as serialization,oh as storage,uh as utility,hh as version};
|