@evergis/api 4.1.0 → 4.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Api.d.ts +11 -11
- package/dist/EventEmitter.d.ts +11 -0
- package/dist/__generated__/AccountService.d.ts +12 -0
- package/dist/__generated__/DataSourceService.d.ts +30 -6
- package/dist/__generated__/EqlService.d.ts +1 -13
- package/dist/__generated__/LayersService.d.ts +2 -2
- package/dist/__generated__/ProjectsService.d.ts +50 -2
- package/dist/__generated__/TablesService.d.ts +2 -2
- package/dist/__generated__/data-contracts.d.ts +124 -257
- package/dist/api.cjs.development.js +1157 -469
- package/dist/api.cjs.development.js.map +1 -1
- package/dist/api.cjs.production.min.js +1 -1
- package/dist/api.cjs.production.min.js.map +1 -1
- package/dist/api.esm.js +1178 -480
- package/dist/api.esm.js.map +1 -1
- package/dist/services/Notification.d.ts +3 -3
- package/dist/services/Projects.d.ts +1 -1
- package/package.json +2 -3
- package/dist/__generated__/WmsServerService.d.ts +0 -69
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("@evergis/event-emitter"),n=require("ky"),r=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,s=require("@microsoft/signalr"),o=require("query-string"),i=require("nanoid");function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function l(){return(l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function y(e,t){if(null==e)return{};var n,r,s={},o=Object.keys(e);for(r=0;r<o.length;r++)t.indexOf(n=o[r])>=0||(s[n]=e[n]);return s}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?f(e):t}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=h(e);if(t){var s=h(this).constructor;n=Reflect.construct(r,arguments,s)}else n=r.apply(this,arguments);return v(this,n)}}function k(e,t,n){return(k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(r){var s=Object.getOwnPropertyDescriptor(r,t);return s.get?s.get.call(n):s.value}})(e,t,n||e)}let g=function(){function e(t){var n;void 0===t&&(t={}),a(this,e),this.ky=r.extend(t),this.prefixUrl=(null==(n=t.prefixUrl)?void 0:n.toString())||""}return c(e,[{key:"extend",value:function(e){var t;this.ky=r.extend(e),this.prefixUrl=(null==(t=e.prefixUrl)?void 0:t.toString())||""}},{key:"get",value:function(e,t){return this.ky.get(this.stripSlashes(e),{searchParams:b(t)})}},{key:"post",value:function(e,t,n){const r=m(n,t);return this.ky.post(this.stripSlashes(e),r)}},{key:"put",value:function(e,t,n){const r=m(n,t);return this.ky.put(this.stripSlashes(e),r)}},{key:"patch",value:function(e,t,n){const r=m(n,t);return this.ky.patch(this.stripSlashes(e),r)}},{key:"delete",value:function(e,t,n){const r=m(n,t);return this.ky.delete(this.stripSlashes(e),r)}},{key:"createUrl",value:function(e,t){const n=t?"?"+b(t):"";return this.prefixUrl+this.stripSlashes(e)+n}},{key:"stripSlashes",value:function(e){return this.prefixUrl?e.replace(/^\//g,""):e}}]),e}();function m(e,t){const n={searchParams:b(e)};var r;return void 0!==(r=t)&&"object"==typeof r&&null!==r&&r.constructor===Object||Array.isArray(t)?n.json=t:n.body=t,n}function b(e){return void 0===e&&(e={}),o.stringify(e,{arrayFormat:"comma"})}function x(e){return e instanceof FormData?e:Object.keys(e).reduce((t,n)=>(t.append(n,e[n]),t),new FormData)}let S=c((function e(t){a(this,e),this.http=t})),T=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"createArcGisDataSource",value:function(e){return this.http.post("/ds/arcgis",e).then(()=>{})}},{key:"updateArcGisDataSource",value:function(e){return this.http.patch("/ds/arcgis",e).then(()=>{})}},{key:"getDataSourcesList",value:function(e){return this.http.get("/ds",e).json()}},{key:"createDataSource",value:function(e){return this.http.post("/ds",e).then(()=>{})}},{key:"updateDataSource",value:function(e){return this.http.patch("/ds",e).then(()=>{})}},{key:"getDataSource",value:function(e){return this.http.get("/ds/"+e).json()}},{key:"removeDataSource",value:function(e){return this.http.delete("/ds/"+e,null).then(()=>{})}},{key:"testConnection",value:function(e){return this.http.post("/ds/testConnection",e).json()}},{key:"createMosRuDataSource",value:function(e){return this.http.post("/ds/dataMosRu",e).then(()=>{})}},{key:"updateMosRuDataSource",value:function(e){return this.http.patch("/ds/dataMosRu",e).then(()=>{})}},{key:"createS3DataSource",value:function(e){return this.http.post("/ds/s3",e).then(()=>{})}},{key:"updateS3DataSource",value:function(e){return this.http.patch("/ds/s3",e).then(()=>{})}},{key:"createArcGisDataSource1",value:function(e){return this.http.post("/ds/wms",e).then(()=>{})}},{key:"updateArcGisDataSource1",value:function(e){return this.http.patch("/ds/wms",e).then(()=>{})}}]),n}();const j=["username"];let w=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getTokensList",value:function(e){let{username:t}=e,n=y(e,j);return this.http.get("/accessToken/list/"+t,n).json()}},{key:"createToken",value:function(e){return this.http.put("/accessToken/"+e,null).text()}},{key:"disableToken",value:function(e){return this.http.post("/accessToken/"+e+"/disable",null).then(()=>{})}},{key:"enableToken",value:function(e){return this.http.post("/accessToken/"+e+"/enable",null).then(()=>{})}},{key:"revokeToken",value:function(e){return this.http.delete("/accessToken/"+e,null).then(()=>{})}}]),n}(),P=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getAvailiableCs",value:function(){return this.http.get("/srs/list").json()}},{key:"getProj4Representation",value:function(e){return this.http.get("/srs/"+e+"/proj4").text()}},{key:"getWktRepresentation",value:function(e){return this.http.get("/srs/"+e+"/wkt").text()}}]),n}(),R=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getParents",value:function(e){return this.http.get("/resources/"+e+"/parents").json()}},{key:"getTags",value:function(e){return this.http.get("/resources/tags",e).json()}},{key:"putTags",value:function(e,t){return this.http.put("/resources/"+e+"/tags",t).json()}},{key:"postGetAll",value:function(e,t){return this.http.post("/resources",t,e).json()}},{key:"getResource",value:function(e){return this.http.get("/resources/"+e).json()}},{key:"patchResource",value:function(e,t){return this.http.patch("/resources/"+e,t).json()}},{key:"deleteResource",value:function(e){return this.http.delete("/resources/"+e,null).then(()=>{})}},{key:"moveResource",value:function(e,t){return this.http.post("/resources/"+e+"/move",t).json()}},{key:"createDirectory",value:function(e){return this.http.post("/resources/directory",e).json()}},{key:"createFile",value:function(e){return this.http.patch("/resources/file",x(e)).json()}},{key:"createFile1",value:function(e){return this.http.post("/resources/file",x(e)).json()}},{key:"getPermissions",value:function(e){return this.http.get("/resources/"+e+"/permissions").json()}},{key:"setPermissions1",value:function(e,t){return this.http.put("/resources/"+e+"/permissions",t).then(()=>{})}},{key:"setPermissions",value:function(e){return this.http.put("/resources/permissions",e).then(()=>{})}},{key:"getFile",value:function(e){return this.http.get("/resources/file/"+e).blob()}},{key:"cleanResources",value:function(){return this.http.post("/resources/clean",null).then(()=>{})}},{key:"copyResources",value:function(e){return this.http.post("/resources/copy",e).json()}}]),n}();var I;(I=exports.ApiEvent||(exports.ApiEvent={})).ConnectionLost="ConnectionLost",I.Unauthorized="Unauthorized",I.SessionClosed="SessionClosed";let C=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getUsers",value:function(e){return this.http.get("/account/user/list",e).json()}},{key:"getExtendedUsers",value:function(e){return this.http.get("/account/user/extendedlist",e).json()}},{key:"getUserInfo",value:function(){return this.http.get("/account").json()}},{key:"getUserInfo1",value:function(e){return this.http.get("/account/"+e).json()}},{key:"getExtendedUserInfo",value:function(){return this.http.get("/account/extended").json()}},{key:"getExtendedUserInfo1",value:function(e){return this.http.get("/account/extended/"+e).json()}},{key:"isUsernameExists",value:function(e){return this.http.get("/account/user/exists",e).json()}},{key:"isEmailExists",value:function(e){return this.http.get("/account/user/email/exists",e).json()}},{key:"registerUser",value:function(e){return this.http.post("/account/register",e).text()}},{key:"createUser",value:function(e,t){return this.http.post("/account/user",t,e).then(()=>{})}},{key:"updateUser",value:function(e){return this.http.patch("/account/user",e).then(()=>{})}},{key:"confirmEmail",value:function(e){return this.http.post("/account/user/"+e+"/email/confirm",null).then(()=>{})}},{key:"verifyEmail",value:function(e){return this.http.post("/account/user/"+e+"/email/verify",null).then(()=>{})}},{key:"setEmail",value:function(e){return this.http.post("/account/setEmail",x(e)).then(()=>{})}},{key:"confirmEmail1",value:function(e){return this.http.post("/account/user/email/confirm",null,e).then(()=>{})}},{key:"changeEmail",value:function(e){return this.http.post("/account/user/email/change",null,e).then(()=>{})}},{key:"confirmChangeEmail",value:function(e){return this.http.post("/account/user/email/change/confirm",null,e).then(()=>{})}},{key:"setUserPassword",value:function(e){return this.http.patch("/account/password/set",e).then(()=>{})}},{key:"changePassword",value:function(e){return this.http.patch("/account/password/change",x(e)).then(()=>{})}},{key:"resetPassword",value:function(e){return this.http.post("/account/password/reset",null,e).then(()=>{})}},{key:"resetPasswordCallback",value:function(e){return this.http.post("/account/password/reset/confirm",x(e)).then(()=>{})}},{key:"removeUser",value:function(e){return this.http.delete("/account/user/"+e,null).then(()=>{})}},{key:"createNamespace",value:function(e){return this.http.post("/account/namespace",null,e).json()}},{key:"activateUser",value:function(e){return this.http.post("/account/user/"+e+"/activate",null).then(()=>{})}},{key:"deactivateUser",value:function(e){return this.http.post("/account/user/"+e+"/deactivate",null).then(()=>{})}},{key:"authenticate",value:function(e,t){return this.http.post("/account/login",t,e).json()}},{key:"refreshToken",value:function(e){return this.http.post("/account/refresh-token",e).json()}},{key:"revokeToken",value:function(){return this.http.delete("/account/revoke-token",null).then(()=>{})}},{key:"ldapLogin",value:function(e){return this.http.post("/account/external/login/ldap",e).json()}},{key:"registerClient",value:function(e){return this.http.post("/account/oauth2/client",e).json()}},{key:"unbindClient",value:function(e){return this.http.delete("/account/oauth2/client/"+e,null).then(()=>{})}},{key:"token",value:function(e){return this.http.post("/account/oauth2/token",e).json()}},{key:"getRoles",value:function(e){return this.http.get("/account/role/list",e).json()}},{key:"createRole",value:function(e){return this.http.post("/account/role",e).then(()=>{})}},{key:"updateRole",value:function(e){return this.http.patch("/account/role",e).then(()=>{})}},{key:"removeRole",value:function(e){return this.http.delete("/account/role/"+e,null).then(()=>{})}},{key:"addToRole",value:function(e,t){return this.http.post("/account/user/"+e+"/role/"+t,null).then(()=>{})}},{key:"removeFromRole",value:function(e,t){return this.http.delete("/account/user/"+e+"/role/"+t,null).then(()=>{})}},{key:"postUsedProjects",value:function(e){return this.http.post("/account/latest_projects",e).json()}},{key:"getUsedProjects",value:function(){return this.http.get("/account/latest_projects").json()}},{key:"truncateUsedProjects",value:function(){return this.http.delete("/account/latest_projects",null).then(()=>{})}}]),n}();const E=()=>JSON.parse(localStorage.getItem("@evergis/user-info")||"null")||void 0,L=e=>{if(e){const t=E();localStorage.setItem("@evergis/user-info",JSON.stringify(l({},t,e)))}else localStorage.removeItem("@evergis/user-info")};let U=function(e){p(n,C);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"login",value:async function(e,t,r){if(void 0===t&&(t={}),void 0===r&&(r=!1),e){const s=await k(h(n.prototype),"authenticate",this).call(this,t,e);s&&r&&(window.localStorage.setItem("evergis-jwt-token",s.token),window.localStorage.setItem("evergis-refresh-token",s.refreshToken))}}},{key:"fetchCurrentUser",value:async function(){return this.userInfo=await this.getUserInfo(),this.userInfo}},{key:"username",get:function(){var e;return(null==(e=this.userInfo)?void 0:e.username)||""}},{key:"logout",value:async function(){window.localStorage.getItem("evergis-jwt-token")&&(window.localStorage.removeItem("evergis-jwt-token"),window.localStorage.removeItem("evergis-refresh-token")),await this.revokeToken(),L(void 0),this.userInfo={}}},{key:"updateCurrentUser",value:async function(e){await k(h(n.prototype),"updateUser",this).call(this,l({username:this.username},e)),L(e)}},{key:"setPassword",value:function(e){return this.setUserPassword({username:this.username,password:e})}},{key:"isAuth",get:function(){var e;return!(null==(e=this.userInfo)||!e.username)&&"public"!==this.userInfo.username}},{key:"user",get:function(){if(this.userInfo)return this.userInfo;const e=E();return e&&(this.userInfo=e),e}}]),n}(),A=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getPreview",value:function(){return this.http.createUrl("/account/user/preview")}},{key:"uploadPreview",value:function(e){return this.http.post("/account/user/preview",x(e)).json()}},{key:"deletePreview",value:function(){return this.http.delete("/account/user/preview",null).then(()=>{})}},{key:"getPreview1",value:function(e){return this.http.createUrl("/account/user/preview/"+e)}},{key:"uploadPreview1",value:function(e,t){return this.http.post("/account/user/preview/"+e,x(t)).json()}},{key:"deletePreview1",value:function(e){return this.http.delete("/account/user/preview/"+e,null).then(()=>{})}}]),n}(),F=function(e){p(n,A);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n)}(),D=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"batchResourcesPermissionsSet",value:function(e){return this.http.put("/bulk/resources/permissions",e).json()}}]),n}(),N=function(e){p(n,D);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n)}();const O=["cameraId"],M=["cameraId"],W=["cameraId"],B=["cameraId"],_=["cameraId"],q=["cameraId"];let H=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getCameras",value:function(e){return this.http.get("/cameras",e).json()}},{key:"getArchiveFeed",value:function(e){let{cameraId:t}=e,n=y(e,O);return this.http.get("/cameras/"+t+"/archiveFeed",n).blob()}},{key:"getArchiveTimeline",value:function(e){let{cameraId:t}=e,n=y(e,M);return this.http.get("/cameras/"+t+"/archiveTimeline",n).json()}},{key:"getArchiveCalendar",value:function(e){let{cameraId:t}=e,n=y(e,W);return this.http.get("/cameras/"+t+"/archiveCalendar",n).json()}},{key:"getArchiveSnapshot",value:function(e){let{cameraId:t}=e,n=y(e,B);return this.http.get("/cameras/"+t+"/archiveSnapshot",n).blob()}},{key:"getLiveFeed",value:function(e){let{cameraId:t}=e,n=y(e,_);return this.http.get("/cameras/"+t+"/liveFeed",n).blob()}},{key:"getLiveSnapshot",value:function(e){return this.http.get("/cameras/"+e+"/liveSnapshot").blob()}},{key:"getLivePreviewStream",value:function(e){let{cameraId:t}=e,n=y(e,q);return this.http.get("/cameras/"+t+"/getLivePreviewsStream",n).json()}}]),n}(),G=function(e){p(n,H);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n)}(),z=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getConfigurationsList",value:function(e){return this.http.get("/settings/config",e).json()}},{key:"getConfiguration",value:function(e){return this.http.get("/settings",e).text()}},{key:"setConfiguration",value:function(e,t){return this.http.post("/settings",t,e).then(()=>{})}},{key:"removeConfiguration",value:function(e){return this.http.delete("/settings",null,e).then(()=>{})}}]),n}(),Q=function(e){p(n,z);var t=d(n);function n(){var e;return a(this,n),(e=t.apply(this,arguments)).settings={modules:[],connection:{url:""}},e}return c(n,[{key:"fetchClientSettings",value:async function(e){const t=JSON.parse(await this.getConfiguration(e));return this.updateClientSettings(t),t}},{key:"updateClientSettings",value:function(e){Object.assign(this.settings,e)}}]),n}(),V=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getFunctionsList",value:function(){return this.http.get("/eql/functions").json()}},{key:"getPagedQueryResult",value:function(e){return this.http.post("/eql/query",e).json()}},{key:"getQueryDescription",value:function(e){return this.http.post("/eql/description",e).json()}},{key:"setLayerParameterValue",value:function(e){return this.http.post("/eql/setParam",null,e).then(()=>{})}},{key:"setLayerParameters",value:function(e,t){return this.http.post("/eql/setParams",t,e).then(()=>{})}},{key:"getLayerParameters",value:function(e){return this.http.get("/eql/getParam",e).text()}},{key:"getLayerParameters1",value:function(e){return this.http.get("/eql/getParams",e).json()}},{key:"removeLayerParameterValue",value:function(e){return this.http.delete("/eql/removeParam",null,e).then(()=>{})}},{key:"getAvailiableLayerParameters",value:function(e){return this.http.get("/eql/getAvailiableParams",e).json()}}]),n}(),J=function(e){p(n,V);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n)}(),K=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"increaseResourcesLimit",value:function(e){return this.http.post("/feedback/limits",null,e).json()}},{key:"feedback",value:function(e,t){return this.http.post("/feedback",x(t),e).json()}}]),n}(),X=function(e){p(n,K);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n)}(),Y=function(e){p(n,R);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"upload",value:function(e,t){return this.createFile1({file:e,rewrite:!!t})}},{key:"replaceFile",value:function(e){return this.createFile(e)}}]),n}(),Z=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"get",value:function(e){return this.http.get("/filters/"+e).json()}},{key:"update",value:function(e,t){return this.http.post("/filters/"+e,t).json()}},{key:"create",value:function(e){return this.http.post("/filters",e).json()}}]),n}(),$=function(e){p(n,Z);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n)}();const ee=["providerName"],te=["providerName"],ne=["providerName"];let re=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"geocode",value:function(e){let{providerName:t}=e,n=y(e,ee);return this.http.get("/geocode/"+t,n).json()}},{key:"geocodeByPoint",value:function(e){let{providerName:t}=e,n=y(e,te);return this.http.get("/geocode/"+t+"/geocodeByPoint",n).json()}},{key:"suggest",value:function(e){let{providerName:t}=e,n=y(e,ne);return this.http.get("/geocode/"+t+"/suggest",n).json()}}]),n}(),se=function(e){p(n,re);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"geocode2Gis",value:function(e){return this.geocode(l({providerName:"geocode2gis"},e))}},{key:"suggest2Gis",value:function(e){return this.suggest(l({providerName:"geocode2gis"},e))}}]),n}(),oe=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getDataSchema",value:function(e){return this.http.get("/import/dataSchema",e).json()}},{key:"getFeaturesCount",value:function(e){return this.http.post("/import/count",e).json()}},{key:"readPart",value:function(e){return this.http.get("/import/read",e).json()}},{key:"getExternalWmsLayers",value:function(e){return this.http.get("/import/wms",e).json()}},{key:"getExternalPbfLayers",value:function(e){return this.http.get("/import/pbf",e).json()}},{key:"getExternalPbfFeatures",value:function(e){return this.http.get("/import/pbf/features",e).json()}},{key:"getExternalArcgisFsLayers",value:function(e){return this.http.get("/import/arcgisfeatureservice",e).json()}},{key:"getExternalArcGisLayers",value:function(e){return this.http.get("/import/arcgismapservice",e).json()}},{key:"getRasterAttributes",value:function(e){return this.http.get("/import/rasterAttributes",e).json()}},{key:"getRasterMeta",value:function(e){return this.http.get("/import/rasterMeta",e).json()}}]),n}(),ie=function(e){p(n,oe);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n)}();const ae=["name"],ue=["name"],ce=["name","id"],le=["name","x","y","z"],pe=["name","x","y","z","format"],he=["name","x","y","z","dpi","format"],ye=["name"],fe=["name"],ve=["name"],de=["name"],ke=["name"],ge=["name"],me=["name"],be=["layerName"],xe=["name","id"];let Se=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getBulkFeatures",value:function(e){return this.http.post("/bulk/layers/features/query",e).json()}},{key:"getBulkExtents",value:function(e,t){return this.http.post("/bulk/layers/extent",t,e).json()}},{key:"getFilteredFeaturesCount",value:function(e){return this.http.post("/bulk/layers/features/count",e).json()}},{key:"getLayersList",value:function(e){return this.http.get("/layers",e).json()}},{key:"deleteResources",value:function(e){return this.http.delete("/layers",null,e).json()}},{key:"getLayerInfo",value:function(e){return this.http.get("/layers/"+e).json()}},{key:"deleteResource",value:function(e){return this.http.delete("/layers/"+e,null).then(()=>{})}},{key:"getLayersInfo",value:function(e){return this.http.get("/layers/batchInfo",e).json()}},{key:"publishMapboxService",value:function(e){return this.http.post("/layers",e,{type:"Mapbox"}).json()}},{key:"publishProxyService",value:function(e){return this.http.post("/layers",e,{type:"ProxyService"}).json()}},{key:"publishRouteService",value:function(e){return this.http.post("/layers",e,{type:"RouteService"}).then(()=>{})}},{key:"publishLinearService",value:function(e){return this.http.post("/layers",e,{type:"LinearService"}).then(()=>{})}},{key:"publishRemoteTileService",value:function(e){return this.http.post("/layers",e,{type:"RemoteTileService"}).json()}},{key:"publishQueryLayerService",value:function(e){return this.http.post("/layers",e,{type:"QueryLayerService"}).json()}},{key:"publishPostgresTileCatalogService",value:function(e){return this.http.post("/layers",e,{type:"PostgresTileLayerService"}).json()}},{key:"publishPythonService",value:function(e){return this.http.post("/layers",e,{type:"Python"}).json()}},{key:"updateMapboxService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"Mapbox"}).json()}},{key:"updatePythonService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"Python"}).json()}},{key:"updateProxyService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"ProxyService"}).json()}},{key:"updateTileCatalogService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"PostgresTileLayerService"}).json()}},{key:"updateRemoteTileService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"RemoteTileService"}).json()}},{key:"updateQueryLayerService",value:function(e,t){return this.http.patch("/layers/"+e,t,{type:"QueryLayerService"}).json()}},{key:"reloadService",value:function(e){return this.http.get("/layers/"+e+"/reload").json()}},{key:"getFeatures",value:function(e,t){return this.http.post("/layers/"+e+"/features/query",t).json()}},{key:"getFeatures1",value:function(e){let{name:t}=e,n=y(e,ae);return this.http.get("/layers/"+t+"/features",n).json()}},{key:"deleteFeature",value:function(e){let{name:t}=e,n=y(e,ue);return this.http.delete("/layers/"+t+"/features",null,n).json()}},{key:"createFeatures",value:function(e,t){return this.http.post("/layers/"+e+"/features",t).json()}},{key:"updateFeature",value:function(e,t){return this.http.patch("/layers/"+e+"/features",t).json()}},{key:"getById",value:function(e){let{name:t,id:n}=e,r=y(e,ce);return this.http.get("/layers/"+t+"/features/"+n,r).json()}},{key:"getTilesLayerImage",value:function(e){let{name:t,x:n,y:r,z:s}=e,o=y(e,le);return this.http.createUrl("/layers/"+t+"/tile/"+s+"/"+n+"/"+r,o)}},{key:"getTilesLayerImage1",value:function(e){let{name:t,x:n,y:r,z:s,format:o}=e,i=y(e,pe);return this.http.createUrl("/layers/"+t+"/tile/"+s+"/"+n+"/"+r+"."+o,i)}},{key:"getTilesLayerImageWithFormatAndDpi",value:function(e){let{name:t,x:n,y:r,z:s,dpi:o,format:i}=e,a=y(e,he);return this.http.createUrl("/layers/"+t+"/tile/"+s+"/"+n+"/"+r+"@"+o+"x."+i,a)}},{key:"getLayerExtent",value:function(e){let{name:t}=e,n=y(e,ye);return this.http.get("/layers/"+t+"/extent",n).json()}},{key:"deleteFeatures",value:function(e){let{name:t}=e,n=y(e,fe);return this.http.delete("/layers/"+t+"/features/deleteByIds",null,n).json()}},{key:"deleteByCondition",value:function(e){let{name:t}=e,n=y(e,ve);return this.http.delete("/layers/"+t+"/features/deleteByCondition",null,n).json()}},{key:"classify",value:function(e){let{name:t}=e,n=y(e,de);return this.http.get("/layers/"+t+"/classify",n).json()}},{key:"distincts",value:function(e){let{name:t}=e,n=y(e,ke);return this.http.get("/layers/"+t+"/distincts",n).json()}},{key:"aggregateAttribute",value:function(e){let{name:t}=e,n=y(e,ge);return this.http.get("/layers/"+t+"/aggregate-values",n).json()}},{key:"getFilteredFeaturesCount1",value:function(e){let{name:t}=e,n=y(e,me);return this.http.get("/layers/"+t+"/features/count",n).json()}},{key:"getFilteredFeaturesCount2",value:function(e,t){return this.http.post("/layers/"+e+"/features/count",t).json()}},{key:"editAttributes",value:function(e,t){return this.http.post("/layers/"+e+"/features/edit-attributes",t).json()}},{key:"validateExpression",value:function(e){let{layerName:t}=e,n=y(e,be);return this.http.get("/layers/"+t+"/validateExpression",n).json()}},{key:"flipCoordinates",value:function(e){return this.http.post("/layers/"+e+"/flip-coordinates",null).json()}},{key:"getRasterMeta",value:function(e){let{name:t,id:n}=e,r=y(e,xe);return this.http.get("/layers/"+t+"/"+n+"/metadata",r).json()}},{key:"isExists",value:function(e){return this.http.get("/layers/"+e+"/exists").then(()=>{})}},{key:"getResourceDependencies",value:function(e){return this.http.get("/layers/"+e+"/dependencies").json()}},{key:"getResourceReferences",value:function(e){return this.http.get("/layers/"+e+"/references").json()}}]),n}();async function Te(e){return(await Promise.all(e.map(e=>e.catch(e=>je(e)?e:new Error(e))))).filter(we)}function je(e){return e instanceof Error}function we(e){return!je(e)}let Pe=function(e){p(n,Se);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getLayerInfos",value:function(e){return Te(e.map(e=>this.getLayerInfo(e)))}},{key:"getLayersDeps",value:function(e){return Te(e.map(e=>this.getResourceDependencies(e)))}},{key:"getBasemaps",value:function(e){return this.getLayersList(l({},e,{types:["LocalTileService","RemoteTileService"]}))}},{key:"findOne",value:function(e){return this.getLayerInfo(e)}},{key:"findMany",value:function(e,t){return this.getLayersInfo({layerNames:e,projectNames:t})}},{key:"findAll",value:function(e){return this.getLayersList(e)}},{key:"createQueryLayer",value:function(e){return this.publishQueryLayerService(e)}},{key:"updateQueryLayer",value:function(e){return this.updateQueryLayerService(e.name,e)}},{key:"createProxyLayer",value:function(e){return this.publishProxyService(e)}},{key:"updateProxyLayer",value:function(e){return this.updateProxyService(e.name,e)}},{key:"remove",value:async function(e){return await this.deleteResource(e),e}}]),n}();var Re;(Re=exports.ErrorReason||(exports.ErrorReason={})).HTTP_OTHER="other",Re.HTTP_CLIENT="client",Re.HTTP_SERVER="server",Re.UNKNOWN="unknown";const Ie=e=>e instanceof n.HTTPError?(e=>{const t=e.response.status;let n=exports.ErrorReason.HTTP_OTHER;return t>=400&&t<500&&(n=exports.ErrorReason.HTTP_CLIENT),t>=500&&(n=exports.ErrorReason.HTTP_SERVER),{type:"http",reason:n,status:t,origin:e}})(e):(e=>({type:"base",reason:exports.ErrorReason.UNKNOWN,origin:e}))(e),Ce=e=>e&&e.type&&e.reason;function Ee(e){return"string"==typeof e}const Le=e=>e===exports.UrlPath.Presentation?exports.UrlPath.Base:e;function Ue(e,t,n){return n.indexOf(e)===t}const Ae=i.customAlphabet("abcdefghijklmnopqrstuvwxyz0123456789",12);(exports.ResourceSeparator||(exports.ResourceSeparator={})).Server=".";let Fe=function(){function e(t){let{account:n}=t;a(this,e),this.account=n}return c(e,[{key:"createId",value:function(){return Ae()}},{key:"createResourceName",value:function(e){void 0===e&&(e={});const t=e.workspace||this.account.user&&this.account.user.namespace||"",n=e.name||this.createId(),r=e.separator||exports.ResourceSeparator.Server;return t||console.warn("Resource should have workspace. Check account api"),""+t+r+n}},{key:"createTempResourceName",value:function(e){return void 0===e&&(e={}),this.createResourceName(l({workspace:"temp"},e))}},{key:"extractResource",value:function(e){if(e&&e.includes(exports.ResourceSeparator.Server)){const t=e.split(exports.ResourceSeparator.Server),n=t.pop();return{workspace:t.join(exports.ResourceSeparator.Server),name:n}}return{name:"",workspace:""}}},{key:"extractResourceName",value:function(e){return this.extractResource(e).name||e||""}},{key:"extractResourceWorkspace",value:function(e){return this.extractResource(e).workspace||""}}]),e}(),De=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getSubscriptionList",value:function(){return this.http.get("/notifications/subscribes").json()}},{key:"subscribeOperation",value:function(e){return this.http.post("/notifications/subscribes",null,e).then(()=>{})}},{key:"unsubscribeOperation",value:function(e){return this.http.delete("/notifications/subscribes",null,e).then(()=>{})}},{key:"subscribeListOperation",value:function(e){return this.http.post("/notifications/subscribe-list",e).then(()=>{})}},{key:"unsubscribeListOperation",value:function(e){return this.http.post("/notifications/unsubscribe-list",e).then(()=>{})}}]),n}();var Ne;(Ne=exports.ConnectionStatus||(exports.ConnectionStatus={})).Initialized="Initialized",Ne.Connected="Connected",Ne.Break="Break",Ne.Lost="Lost",Ne.SessionClosed="SessionClosed";let Oe=function(e){p(r,De);var n=d(r);function r(e,s,o){var i;return void 0===o&&(o=!1),a(this,r),(i=n.call(this,e)).api=s,i.MAX_WS_RECONNECT_TRIES=10,i.keepAlive=!1,i.reconnectTries=0,i.subscriptions=[],i._connectStatus=exports.ConnectionStatus.Initialized,i.onWsConnected=()=>{i.connectStatus=exports.ConnectionStatus.Connected,i.keepAlive&&(i.keepAliveTimeout=setInterval(()=>{i.ws&&i.ws.send(JSON.stringify({keepAlive:!0}))},5e3))},i.onWsClosed=e=>{4001===e.code||4002===e.code?i.connectStatus=exports.ConnectionStatus.SessionClosed:i.reconnectTries<i.MAX_WS_RECONNECT_TRIES?(i.connectStatus=exports.ConnectionStatus.Break,i.reconnectTries++,i.ws&&(i.ws.onopen=null,i.ws.onclose=null,i.ws.onmessage=null,i.ws=void 0),i.keepAliveTimeout&&clearInterval(i.keepAliveTimeout),setTimeout(()=>{i.connect()},0)):i.connectStatus=exports.ConnectionStatus.Lost},i.onWsMessage=e=>{let t={};try{t=JSON.parse(e.data)}catch(e){console.debug("Failed to parse ws message from sp.")}if("notification"===t.type&&t.data){const{tag:e,data:n}=t.data;e&&i.emitter.emit(e,new Me(n))}},i.emitter=new t.EventEmitter,i.keepAlive=o,i}return c(r,[{key:"connectStatus",get:function(){return this._connectStatus},set:function(e){this.emitter.emit("ConnectionStatus",new Me(e)),this._connectStatus=e}},{key:"currentWs",get:function(){return this.ws}},{key:"on",value:function(e,t){this.emitter.on(e,t)}},{key:"off",value:function(e,t){this.emitter.off(e,t)}},{key:"subscribe",value:async function(e){this.subscriptions.push(e),setTimeout(()=>{this.api.isShared||this.api.isPresentation||!this.subscriptions.length||this.subscribeListOperation(this.subscriptions),this.subscriptions=[]},500)}},{key:"unsubscribe",value:async function(e){if((await this.getSubscriptionList()).includes(e))return this.unsubscribeOperation({tag:e})}},{key:"connectWs",value:function(e){const t=e.replace("http://","ws://").replace("https://","wss://");this.wsUrl=t,this.connect()}},{key:"connect",value:function(){this.wsUrl?(this.ws=new WebSocket(this.wsUrl),this.ws.onopen=this.onWsConnected,this.ws.onclose=this.onWsClosed,this.ws.onmessage=this.onWsMessage):console.warn("Connection to WebSocket not allowed. wsUrl not provided")}}]),r}(),Me=c((function e(t){a(this,e),this.data=t})),We=function(e){p(n,z);var t=d(n);function n(){var e;return a(this,n),(e=t.apply(this,arguments)).config=null,e}return c(n,[{key:"fetchPortalSettings",value:async function(e){return this.config=JSON.parse(await this.getConfiguration(e)),this.config}}]),n}();const Be=["name"];let _e=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getProjectsList",value:function(e){return this.http.get("/projects",e).json()}},{key:"createProject",value:function(e){return this.http.post("/projects",e).json()}},{key:"deleteResources",value:function(e){return this.http.delete("/projects",null,e).json()}},{key:"updateProject",value:function(e,t){return this.http.patch("/projects/"+e,t).json()}},{key:"getProjectInfo",value:function(e){return this.http.get("/projects/"+e).json()}},{key:"deleteResource",value:function(e){return this.http.delete("/projects/"+e,null).then(()=>{})}},{key:"updateProjectV2",value:function(e,t){return this.http.patch("/projects/"+e+"/v2",t).json()}},{key:"getProjectsInfo",value:function(e){return this.http.get("/projects/batchInfo",e).json()}},{key:"getProjectEnvelope",value:function(e){let{name:t}=e,n=y(e,Be);return this.http.get("/projects/"+t+"/extent",n).json()}},{key:"getProjectLayersExtendedInfo",value:function(e){return this.http.get("/projects/"+e+"/extended-info").json()}},{key:"getTilesLayerImage",value:function(e,t,n,r){return this.http.createUrl("/projects/"+e+"/tile/"+r+"/"+t+"/"+n)}},{key:"getTilesLayerImageWithFormat",value:function(e,t,n,r,s){return this.http.createUrl("/projects/"+e+"/tile/"+r+"/"+t+"/"+n+"."+s)}},{key:"getTilesLayerImageWithFormatAndDpi",value:function(e,t,n,r,s,o){return this.http.createUrl("/projects/"+e+"/tile/"+r+"/"+t+"/"+n+"@"+s+"x."+o)}},{key:"isExists",value:function(e){return this.http.get("/projects/"+e+"/exists").then(()=>{})}},{key:"getResourceDependencies",value:function(e){return this.http.get("/projects/"+e+"/dependencies").json()}},{key:"getResourceReferences",value:function(e){return this.http.get("/projects/"+e+"/references").json()}}]),n}(),qe=function(e){p(n,_e);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getProjectInfos",value:function(e){return Te(e.map(e=>this.getProjectInfo(e)))}},{key:"getProjectsDeps",value:function(e){return Te(e.map(e=>this.getResourceDependencies(e)))}},{key:"findOne",value:function(e){return this.getProjectInfo(e)}},{key:"findAll",value:function(e){return this.getProjectsList(e)}},{key:"create",value:function(e){return this.createProject(e)}},{key:"update",value:function(e){return this.updateProject(e.name,e)}},{key:"remove",value:async function(e){return await this.deleteResource(e),e}}]),n}();const He=["id"],Ge=["id"];let ze=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"get",value:function(e){return this.http.get("/scheduler/task/"+e+"/subtasks").json()}},{key:"stop",value:function(e){return this.http.post("/scheduler/task/"+e+"/stop",null).text()}},{key:"createTaskPrototype",value:function(e){return this.http.post("/scheduler",e).text()}},{key:"getTaskPrototypes",value:function(e){return this.http.get("/scheduler",e).json()}},{key:"updateTaskPrototype",value:function(e,t){return this.http.put("/scheduler/"+e,t).text()}},{key:"delete",value:function(e){return this.http.delete("/scheduler/"+e,null).text()}},{key:"setEnable",value:function(e,t){return this.http.post("/scheduler/"+e+"/enable/"+t,null).text()}},{key:"getTasksForPrototype",value:function(e){let{id:t}=e,n=y(e,He);return this.http.get("/scheduler/"+t+"/tasks",n).json()}},{key:"startTask",value:function(e,t){return this.http.post("/scheduler/"+e+"/start/"+t,null).json()}},{key:"startTask1",value:function(e){return this.http.post("/scheduler/"+e+"/start",null).json()}},{key:"getTaskResource",value:function(e){let{id:t}=e,n=y(e,Ge);return this.http.get("/scheduler/taskresource/"+t,n).json()}},{key:"createTaskResource",value:function(e){return this.http.post("/scheduler/taskresource",e).text()}},{key:"updatePythonTaskResource",value:function(e,t){return this.http.patch("/scheduler/taskresource/"+e,t,{type:"PythonTask"}).then(()=>{})}},{key:"updateSpTaskResource",value:function(e,t){return this.http.patch("/scheduler/taskresource/"+e,t,{type:"SpTask"}).then(()=>{})}},{key:"get1",value:function(){return this.http.get("/scheduler/worker").json()}},{key:"post",value:function(e){return this.http.post("/scheduler/worker",e).json()}},{key:"getWorker",value:function(e){return this.http.get("/scheduler/worker/"+e).json()}}]),n}(),Qe=function(e){p(n,ze);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n)}();var Ve;(Ve=exports.DependencyType||(exports.DependencyType={})).Layer="Layer",Ve.Table="Table",Ve.Project="Project";let Je=function(){function e(t,n,r){a(this,e),this.projects=t,this.layers=n,this.tables=r}return c(e,[{key:"getProjectInfosWithDeps",value:async function(e){const t=await this.projects.getProjectInfos(e),n=await this.projects.getProjectsDeps(e),{layers:r,tables:s}=await this.getDependencies(n,!0,!0);return{projects:t,deps:{layers:r,tables:s}}}},{key:"getLayerInfosWithDeps",value:async function(e){const t=await this.layers.getLayerInfos(e),n=await this.layers.getLayersDeps(e),{tables:r}=await this.getDependencies(n,!1,!0);return{layers:t,deps:{tables:r}}}},{key:"getDependencies",value:async function(e,t,n){const{tables:r,layers:s}=e.reduce((e,r)=>{const s=r.dependencies||[];if(t){const t=this.getDependentNames(s,exports.DependencyType.Layer);e.layers.push(...t)}if(n){const t=this.getDependentNames(s,exports.DependencyType.Table);e.tables.push(...t)}return e},{tables:[],layers:[]});return{tables:await this.tables.getTableInfos(r.filter(Ue)),layers:await this.layers.getLayerInfos(s.filter(Ue))}}},{key:"getDependentNames",value:function(e,t){return e.filter(e=>{let{type:n}=e;return n===t}).map(e=>{let{name:t}=e;return t}).filter(Ee)}}]),e}(),Ke=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"setPolicies",value:function(e){return this.http.post("/bulk/security/policies",e).then(()=>{})}},{key:"findUserByNameByRoles",value:function(e){return this.http.get("/security/findUsersWithRoles",e).json()}},{key:"getUsersAndRoles",value:function(e){return this.http.get("/security/usersandroles",e).json()}},{key:"findUserByName",value:function(e){return this.http.get("/security/users",e).json()}},{key:"getPolicyList",value:function(e){return this.http.get("/security/policies",e).json()}},{key:"removePolicy",value:function(e){return this.http.delete("/security/policies",null,e).then(()=>{})}},{key:"setPolicy",value:function(e){return this.http.post("/security/policies",e).then(()=>{})}},{key:"oldCheckLimits",value:function(){return this.http.get("/resources/checkLimits").json()}},{key:"oldCheckLimits1",value:function(e){return this.http.get("/resources/checkLimits/"+e).json()}},{key:"checkLimitsForUser",value:function(){return this.http.get("/security/limits/user").json()}},{key:"checkLimitsForUser1",value:function(e){return this.http.get("/security/limits/user/"+e).json()}},{key:"checkLimitsForRole",value:function(e){return this.http.get("/security/limits/role/"+e).json()}},{key:"getDefaultLimits",value:function(){return this.http.get("/security/limits/default").json()}}]),n}(),Xe=function(e){p(n,Ke);var t=d(n);function n(e,r){var s;let{username:o,roles:i}=r;return a(this,n),(s=t.call(this,e)).ownerName="",s.ownerRoles=[],s.ownerName=o,s.ownerRoles=i,s}return c(n,[{key:"reset",value:function(){this.ownerName="",this.ownerRoles=[]}}]),n}(),Ye=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"statisticsDb",value:function(e){return this.http.post("/statistics",e).json()}},{key:"classify",value:function(e){return this.http.post("/statistics/classify",e).json()}},{key:"sumOfProduct",value:function(e){return this.http.post("/statistics/sumOfProduct",e).json()}}]),n}(),Ze=function(e){p(n,Ye);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n)}();const $e=["name"],et=["name"],tt=["name"];let nt=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getTableList",value:function(e){return this.http.get("/tables",e).json()}},{key:"createTable",value:function(e){return this.http.post("/tables",e).json()}},{key:"deleteResources",value:function(e){return this.http.delete("/tables",null,e).json()}},{key:"updateTable",value:function(e,t){return this.http.patch("/tables/"+e,t).json()}},{key:"putTable",value:function(e,t){return this.http.put("/tables/"+e,t).json()}},{key:"getTableInfo",value:function(e){return this.http.get("/tables/"+e).json()}},{key:"deleteResource",value:function(e){return this.http.delete("/tables/"+e,null).then(()=>{})}},{key:"getTablesInfo",value:function(e){return this.http.get("/tables/batchInfo",e).json()}},{key:"getTableData",value:function(e){let{name:t}=e,n=y(e,$e);return this.http.get("/tables/"+t+"/data",n).json()}},{key:"writeTableData",value:function(e,t){return this.http.post("/tables/"+e+"/data",t).then(()=>{})}},{key:"updateTableData",value:function(e,t){let{name:n}=e,r=y(e,et);return this.http.patch("/tables/"+n+"/data",t,r).then(()=>{})}},{key:"deleteTableData",value:function(e){let{name:t}=e,n=y(e,tt);return this.http.delete("/tables/"+t+"/data",null,n).then(()=>{})}},{key:"mapTable",value:function(e,t){return this.http.post("/tables/map-table",t,e).json()}},{key:"unmapTable",value:function(e){return this.http.delete("/tables/map-table/"+e,null).then(()=>{})}},{key:"createViewFromQueryLayer",value:function(e){return this.http.post("/tables/fromLayer",e).json()}},{key:"createViewFromQuery",value:function(e){return this.http.post("/tables/fromQuery",e).json()}},{key:"isExists",value:function(e){return this.http.get("/tables/"+e+"/exists").then(()=>{})}},{key:"getResourceDependencies",value:function(e){return this.http.get("/tables/"+e+"/dependencies").json()}},{key:"getResourceReferences",value:function(e){return this.http.get("/tables/"+e+"/references").json()}}]),n}(),rt=function(e){p(n,nt);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getTableInfos",value:function(e){return Te(e.map(e=>this.getTableInfo(e)))}},{key:"findOne",value:function(e){return this.getTableInfo(e)}},{key:"findAll",value:function(e){return this.getTableList(e)}},{key:"create",value:function(e){return this.createTable(e)}},{key:"update",value:function(e){return this.updateTable(e.name,e)}},{key:"remove",value:async function(e){return await this.deleteResource(e),e}}]),n}(),st=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n)}(),ot=function(e){p(n,st);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n)}();const it=["name","z","x","y"];let at=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n,[{key:"getVectorTile",value:function(e){let{name:t,z:n,x:r,y:s}=e,o=y(e,it);return this.http.get("/vt/"+t+"/"+n+"/"+r+"/"+s+".pbf",o).then(()=>{})}}]),n}(),ut=function(e){p(n,at);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return c(n)}();var ct;(ct=exports.UrlPath||(exports.UrlPath={})).Base="/map",ct.Shared="/shared",ct.Presentation="/presentation",ct.Portal="/portal";const lt={401:exports.ApiEvent.Unauthorized},pt=Object.values(exports.UrlPath),ht=pt[0];let yt=function(e){p(o,t.EventEmitter);var r=d(o);function o(e){var t,i;let{url:u,wsUrl:c,wsKeepAlive:p,snappingHubUrl:h,http:y,urlPath:v,httpOptions:d}=e;a(this,o),i=r.call(this);const{hooks:k}=d||{};return i.http=y||new g(l({prefixUrl:u,timeout:!1,retry:{methods:["get","post","delete"],limit:5,statusCodes:[401]}},d||{},{hooks:l({},k||{},{beforeRequest:[e=>{const t=window.localStorage.getItem("evergis-jwt-token");var n;t&&(null==(n=e.headers)||n.set("Authorization","Bearer "+(t||"")))},...null!=(t=null==k?void 0:k.beforeRequest)?t:[]],beforeRetry:[async e=>{let{request:t,error:r,retryCount:s}=e;if(r instanceof n.HTTPError&&401===r.response.status&&1===s)try{const e=window.localStorage.getItem("evergis-refresh-token");if(e){var o;const n=await i.account.refreshToken({refreshToken:e});n&&(window.localStorage.setItem("evergis-jwt-token",n.token),window.localStorage.setItem("evergis-refresh-token",n.refreshToken)),null==(o=t.headers)||o.set("Authorization","Bearer "+(n.token||""))}}catch(r){throw new Error("Failed to refresh token")}}],afterResponse:[(e,t,r)=>{const s=lt[null==r?void 0:r.status];return s&&i.emit(s,Ie(new n.HTTPError(r,e,t))),r},...(null==k?void 0:k.afterResponse)||[]]})})),i.url=u,i.wsUrl=c||u,i.urlPath=v||i.defineUrlPath(),i.layers=new Pe(i.http),i.tables=new rt(i.http),i.projects=new qe(i.http),i.resources=new Je(i.projects,i.layers,i.tables),i.account=new U(i.http),i.accountPreview=new F(i.http),i.bulk=new N(i.http),i.security=new Xe(i.http,i.account),i.notification=new Oe(i.http,f(i),p),i.file=new Y(i.http),i.filters=new $(i.http),i.import=new ie(i.http),i.geocode=new se(i.http),i.tools=new ot(i.http),i.clientSettings=new Q(i.http),i.portalSettings=new We(i.http),i.statistic=new Ze(i.http),i.feedback=new X(i.http),i.vectorTiles=new ut(i.http),i.spatialReference=new P(i.http),i.eql=new J(i.http),i.catalog=new R(i.http),i.queryToken=new w(i.http),i.dataSource=new T(i.http),i.remoteTaskManager=new Qe(i.http),i.cameras=new G(i.http),i.names=new Fe({account:i.account}),i.snappingHub=h?(new s.HubConnectionBuilder).withUrl(h,{withCredentials:!0,skipNegotiation:!0,transport:s.HttpTransportType.WebSockets}).withAutomaticReconnect().build():null,i}return c(o,[{key:"init",value:async function(e){let{authParams:t,authQueryParams:n,connectWs:r,fetchSettings:s,fetchUser:o,useJwt:i}=e;try{await this.account.login(t,n,i),o&&await this.account.fetchCurrentUser(),r&&await this.connectWs(),s&&await this.clientSettings.fetchClientSettings({urlPath:Le(this.urlPath)}),await this.notification.subscribe("service_update")}catch(e){throw Ie(e)}}},{key:"isAcceptedNetwork",value:function(e){return["vk","google","facebook"].includes(e)}},{key:"socAuthLogin",value:async function(e){if(this.isAcceptedNetwork(e))try{await this.clientSettings.fetchClientSettings({urlPath:exports.UrlPath.Base})}catch(e){throw Ie(e)}}},{key:"connectWs",value:async function(){this.account.isAuth&&(this.notification.connectWs(this.wsUrl),this.notification.on("ConnectionStatus",e=>{e.data===exports.ConnectionStatus.Lost?this.emit(exports.ApiEvent.ConnectionLost,e.data):e.data===exports.ConnectionStatus.SessionClosed&&this.emit(exports.ApiEvent.SessionClosed,e.data)}))}},{key:"connectSignalR",value:async function(){this.account.isAuth&&this.snappingHub&&this.snappingHub.state!==s.HubConnectionState.Connected&&await this.snappingHub.start()}},{key:"logout",value:async function(){await this.account.logout(),await this.security.reset(),this.emit(exports.ApiEvent.Unauthorized,null)}},{key:"defineUrlPath",value:function(){const e=(window.location.href.split(window.location.hostname)[1]||"").split("/").filter(Boolean)[0],t=e?"/"+e:void 0;return t&&pt.includes(t)?t:ht}},{key:"isShared",get:function(){return this.urlPath===exports.UrlPath.Shared}},{key:"isPresentation",get:function(){return this.urlPath===exports.UrlPath.Presentation||"8082"===window.location.port}}]),o}();var ft,vt,dt,kt,gt,mt,bt,xt,St,Tt,jt,wt,Pt,Rt,It,Ct,Et,Lt,Ut,At,Ft,Dt,Nt,Ot,Mt,Wt,Bt,_t,qt,Ht;(ft=exports.AggregationFunction||(exports.AggregationFunction={})).None="None",ft.Array="Array",ft.Min="Min",ft.Max="Max",ft.Avg="Avg",ft.Sum="Sum",ft.Extent="Extent",ft.H3="H3",ft.Count="Count",ft.TotalCount="TotalCount",ft.DistinctCount="DistinctCount",ft.First="First",ft.Last="Last",ft.Median="Median",ft.Mod="Mod",ft.StdDeviation="StdDeviation",ft.SumOfProduct="SumOfProduct",ft.OnlyValue="OnlyValue",ft.WeightedAvg="WeightedAvg",ft.DensityIndicators="DensityIndicators",ft.DividedSum="DividedSum",(vt=exports.AttributeIconType||(exports.AttributeIconType={})).Unknown="Unknown",vt.Icon="Icon",vt.PNG="PNG",vt.SVG="SVG",(dt=exports.AttributeSelectorType||(exports.AttributeSelectorType={})).None="None",dt.SelectFromHandBook="SelectFromHandBook",dt.SelectFromRange="SelectFromRange",dt.ViewHandBook="ViewHandBook",(kt=exports.AttributeType||(exports.AttributeType={})).Unknown="Unknown",kt.String="String",kt.Int32="Int32",kt.Int64="Int64",kt.Double="Double",kt.DateTime="DateTime",kt.Boolean="Boolean",kt.Point="Point",kt.Polyline="Polyline",kt.MultiPolygon="MultiPolygon",kt.Multipoint="Multipoint",kt.H3Index="H3Index",kt.Json="Json",(gt=exports.AuthorizationGrant||(exports.AuthorizationGrant={})).AuthorizationCode="authorization_code",gt.RefreshToken="refresh_token",(mt=exports.CatalogResourceType||(exports.CatalogResourceType={})).Directory="Directory",mt.Map="Map",mt.Layer="Layer",mt.Table="Table",mt.File="File",mt.TaskPrototype="TaskPrototype",mt.DataSource="DataSource",(bt=exports.ClassificationType||(exports.ClassificationType={})).None="none",bt.NaturalBreaks="naturalBreaks",bt.EqualInterval="equalInterval",bt.Quantile="quantile",bt.Unique="unique",bt.Step="step",(xt=exports.ClassifyAttributeType||(exports.ClassifyAttributeType={})).Decimal="decimal",xt.DateTime="dateTime",xt.Text="text",(St=exports.ConfigurationErrorEnum||(exports.ConfigurationErrorEnum={})).Unknown="Unknown",St.SerializeError="SerializeError",St.InvalidDataService="InvalidDataService",St.InvalidConfiguration="InvalidConfiguration",St.InvalidDataServiceName="InvalidDataServiceName",St.InvalidTableName="InvalidTableName",St.InvalidLayerName="InvalidLayerName",St.ResourceNotFound="ResourceNotFound",St.InvalidCondition="InvalidCondition",St.InvalidAttributes="InvalidAttributes",St.InvalidIdAttribute="InvalidIdAttribute",St.InvalidGeometryAttribute="InvalidGeometryAttribute",St.InvalidGeometryAttributeType="InvalidGeometryAttributeType",St.InvalidColumnName="InvalidColumnName",St.InvalidIdColumnSettings="InvalidIdColumnSettings",St.ColumnNotExistsInTable="ColumnNotExistsInTable",St.InvalidStyle="InvalidStyle",St.InvalidLayerType="InvalidLayerType",St.ColumnLoadingError="ColumnLoadingError",St.InvalidAttributeFormat="InvalidAttributeFormat",St.DataSourceNotFound="DataSourceNotFound",St.DuplicateColumns="DuplicateColumns",St.DuplicateAttributes="DuplicateAttributes",St.TableWithoutColumns="TableWithoutColumns",St.InvalidTableReferenceConfiguration="InvalidTableReferenceConfiguration",(Tt=exports.DataSourceType||(exports.DataSourceType={})).Postgres="Postgres",Tt.Trino="Trino",Tt.S3="S3",Tt.GisServer="GisServer",(jt=exports.ErrorDetailsType||(exports.ErrorDetailsType={})).ResourceLimitExceeded="ResourceLimitExceeded",jt.ResourceNotFound="ResourceNotFound",jt.InternalError="InternalError",jt.BadRequest="BadRequest",jt.DuplicateContent="DuplicateContent",(wt=exports.ErrorType||(exports.ErrorType={})).NotSpecified="NotSpecified",wt.LimitError="LimitError",wt.ValidationError="ValidationError",wt.JwtExpired="JwtExpired",wt.TokenInvalid="TokenInvalid",wt.RefreshTokenExpired="RefreshTokenExpired",wt.RefreshTokenInvalid="RefreshTokenInvalid",wt.CreateUserFailed="CreateUserFailed",wt.SetUserPasswordFailed="SetUserPasswordFailed",wt.SetUserRoleFailed="SetUserRoleFailed",wt.UpdateUserFailed="UpdateUserFailed",wt.RemoveUserFailed="RemoveUserFailed",wt.CreateRoleFailed="CreateRoleFailed",wt.UpdateRoleFailed="UpdateRoleFailed",wt.RemoveUserRoleFailed="RemoveUserRoleFailed",wt.ChangeActiveStateFailed="ChangeActiveStateFailed",wt.RemoveRoleFailed="RemoveRoleFailed",wt.UserNotFound="UserNotFound",wt.RoleNotFound="RoleNotFound",wt.EmailNotConfirmed="EmailNotConfirmed",wt.DuplicateEmailError="DuplicateEmailError",wt.InvalidPassword="InvalidPassword",wt.RoleExists="RoleExists",wt.UserExists="UserExists",wt.UserLockedError="UserLockedError",wt.InvalidEmail="InvalidEmail",wt.InvalidUsername="InvalidUsername",wt.Unauthorized="Unauthorized",wt.EmailNotChanged="EmailNotChanged",wt.EmailNotSet="EmailNotSet",(Pt=exports.GeometryType||(exports.GeometryType={})).Unknown="unknown",Pt.Point="point",Pt.Polyline="polyline",Pt.Polygon="multipolygon",Pt.Envelope="envelope",Pt.Multipoint="multipoint",(Rt=exports.Group||(exports.Group={})).My="my",Rt.Role="role",Rt.Public="public",Rt.All="all",(It=exports.OwnerFilter||(exports.OwnerFilter={})).My="My",It.Shared="Shared",It.Public="Public",(Ct=exports.PbfSchema||(exports.PbfSchema={})).XYZ="xyz",Ct.TMS="tms",(Et=exports.Permissions||(exports.Permissions={})).None="none",Et.Configure="configure",Et.Write="write",Et.Read="read",Et.ReadConfigure="read,configure",Et.ReadWrite="read,write",Et.All="read,write,configure",(Lt=exports.PolicyType||(exports.PolicyType={})).Unknown="Unknown",Lt.CreateTable="CreateTable",Lt.CreateLayer="CreateLayer",Lt.CreateProject="CreateProject",Lt.MaxFeaturesInOneTable="MaxFeaturesInOneTable",Lt.MaxObjectsToExport="MaxObjectsToExport",Lt.MaxUploadContentSize="MaxUploadContentSize",Lt.MaxEqlQueryParametersValues="MaxEqlQueryParametersValues",(Ut=exports.Quality||(exports.Quality={})).Low="Low",Ut.Medium="Medium",Ut.High="High",(At=exports.RemoteTaskStatus||(exports.RemoteTaskStatus={})).Init="Init",At.Process="Process",At.Completed="Completed",At.Interrupted="Interrupted",At.Error="Error",At.Timeout="Timeout",At.Waiting="Waiting",At.InQueue="InQueue",At.Unknown="Unknown",(Ft=exports.ResourceSubTypeFilter||(exports.ResourceSubTypeFilter={})).RemoteTileService="RemoteTileService",Ft.ProxyService="ProxyService",Ft.QueryLayerService="QueryLayerService",Ft.TileCatalogTable="TileCatalogTable",(Dt=exports.ResourceType||(exports.ResourceType={})).Unknown="Unknown",Dt.Table="table",Dt.Layer="layer",Dt.Project="project",Dt.File="file",Dt.Feature="feature",Dt.Tag="tag",Dt.DataSource="datasource",(Nt=exports.ResourceTypeFilter||(exports.ResourceTypeFilter={})).Map="Map",Nt.Layer="Layer",Nt.Table="Table",Nt.RasterCatalog="RasterCatalog",Nt.ProxyService="ProxyService",Nt.RemoteTileService="RemoteTileService",Nt.File="File",Nt.DataSource="DataSource",Nt.TaskPrototype="TaskPrototype",(Ot=exports.ResourceTypeLink||(exports.ResourceTypeLink={})).Table="tables",Ot.Layer="layers",Ot.Project="projects",(Mt=exports.ResponseType||(exports.ResponseType={})).Code="code",Mt.Token="token",(Wt=exports.SimplifyType||(exports.SimplifyType={})).Basic="Basic",Wt.PreserveTopology="PreserveTopology",Wt.VW="VW",(Bt=exports.StringSubType||(exports.StringSubType={})).None="None",Bt.Image="Image",Bt.PkkCode="PkkCode",Bt.Attachments="Attachments",(_t=exports.TaskResourceSubType||(exports.TaskResourceSubType={})).SpTask="SpTask",_t.PythonTask="PythonTask",(qt=exports.WorkerMethodType||(exports.WorkerMethodType={})).Task="Task",qt.Rest="Rest",qt.Both="Both",(Ht=exports.WorkerSettingsFieldType||(exports.WorkerSettingsFieldType={})).Int32="Int32",Ht.Int64="Int64",Ht.Double="Double",Ht.String="String",Ht.Boolean="Boolean",Ht.DateTime="DateTime",Ht.Point="Point",Ht.Geometry="Geometry",Ht.Polyline="Polyline",Ht.MultiPolygon="MultiPolygon",Ht.Polygon="Polygon",Ht.Multipoint="Multipoint",Ht.IntergerArray="IntergerArray",Ht.DoubleArray="DoubleArray",Ht.StringArray="StringArray",Ht.SourceEql="SourceEql",Ht.Layer="Layer",Ht.Table="Table",Ht.Folder="Folder",Ht.Json="Json",Ht.Attribute="Attribute",Ht.AttributeArray="AttributeArray",Object.defineProperty(exports,"HTTPError",{enumerable:!0,get:function(){return n.HTTPError}}),Object.defineProperty(exports,"TimeoutError",{enumerable:!0,get:function(){return n.TimeoutError}}),exports.Account=U,exports.AccountPreview=F,exports.Api=yt,exports.BulkOperations=N,exports.Cameras=G,exports.ClientSettings=Q,exports.Eql=J,exports.Feedback=X,exports.FileUpload=Y,exports.Filters=$,exports.GEOCODE_PROVIDER="geocode2gis",exports.Geocode=se,exports.HttpClient=g,exports.Import=ie,exports.Layers=Pe,exports.Names=Fe,exports.Notification=Oe,exports.NotificationEvent=Me,exports.PortalSettings=We,exports.Projects=qe,exports.RemoteTaskManager=Qe,exports.Resources=Je,exports.STORAGE_REFRESH_TOKEN_KEY="evergis-refresh-token",exports.STORAGE_TOKEN_KEY="evergis-jwt-token",exports.Security=Xe,exports.Statistic=Ze,exports.Tables=rt,exports.Tools=ot,exports.VectorTiles=ut,exports.addSubDomainToLocation=e=>window.location.protocol+"//"+e+"."+window.location.host,exports.errorHandler=Ie,exports.formDataFromFile=function(e){const t=new FormData;return t.append("file",e),t},exports.generateId=Ae,exports.getFetchingUrlPath=Le,exports.isHTTPError=e=>Ce(e)&&"http"===e.type,exports.isHandledError=Ce,exports.isProjectContentItems=function(e){return null!=e},exports.isString=Ee,exports.isTileLayerService=function(e){return e.type&&/TileService/.test(e.type)},exports.parseJwt=e=>{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(t).split("").map(e=>"%"+"00".concat(e.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(n)},exports.promiseAllIgnoreErrors=Te,exports.stripUselessSlashes=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.join("/").split("/").filter(Boolean).join("/")},exports.toFormData=x,exports.unique=Ue;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e=require("ky"),n=(t=e)&&"object"==typeof t&&"default"in t?t.default:t,r=require("@microsoft/signalr"),o=require("query-string"),u=require("nanoid");function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}function c(t,e,n){return e&&i(t.prototype,e),n&&i(t,n),t}function a(){return(a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function f(t){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function p(t,e){if(null==t)return{};var n,r,o={},u=Object.keys(t);for(r=0;r<u.length;r++)e.indexOf(n=u[r])>=0||(o[n]=t[n]);return o}function h(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function y(t,e,n){return(y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(n):o.value}})(t,e,n||t)}let d=function(){return c((function t(e){var r;void 0===e&&(e={}),s(this,t),this.ky=n.extend(e),this.prefixUrl=(null==(r=e.prefixUrl)?void 0:r.toString())||""}),[{key:"extend",value:function(t){var e;this.ky=n.extend(t),this.prefixUrl=(null==(e=t.prefixUrl)?void 0:e.toString())||""}},{key:"get",value:function(t,e){return this.ky.get(this.stripSlashes(t),{searchParams:k(e)})}},{key:"post",value:function(t,e,n){const r=v(n,e);return this.ky.post(this.stripSlashes(t),r)}},{key:"put",value:function(t,e,n){const r=v(n,e);return this.ky.put(this.stripSlashes(t),r)}},{key:"patch",value:function(t,e,n){const r=v(n,e);return this.ky.patch(this.stripSlashes(t),r)}},{key:"delete",value:function(t,e,n){const r=v(n,e);return this.ky.delete(this.stripSlashes(t),r)}},{key:"createUrl",value:function(t,e){const n=e?"?"+k(e):"";return this.prefixUrl+this.stripSlashes(t)+n}},{key:"stripSlashes",value:function(t){return this.prefixUrl?t.replace(/^\//g,""):t}}])}();function v(t,e){const n={searchParams:k(t)};var r;return void 0!==(r=e)&&"object"==typeof r&&null!==r&&r.constructor===Object||Array.isArray(e)?n.json=e:n.body=e,n}function k(t){return void 0===t&&(t={}),o.stringify(t,{arrayFormat:"comma"})}function g(t){return t instanceof FormData?t:Object.keys(t).reduce((e,n)=>(e.append(n,t[n]),e),new FormData)}let m=c((function t(e){s(this,t),this.http=e}));function R(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let x=function(t){function e(){return s(this,e),R(this,e,arguments)}return l(e,m),c(e,[{key:"createArcGisDataSource",value:function(t){return this.http.post("/ds/arcgis",t).then(()=>{})}},{key:"updateArcGisDataSource",value:function(t){return this.http.patch("/ds/arcgis",t).then(()=>{})}},{key:"getDataSourcesList",value:function(t){return this.http.get("/ds",t).json()}},{key:"createDataSource",value:function(t){return this.http.post("/ds",t).then(()=>{})}},{key:"updateDataSource",value:function(t){return this.http.patch("/ds",t).then(()=>{})}},{key:"getDataSource",value:function(t){return this.http.get("/ds/"+t).json()}},{key:"removeDataSource",value:function(t){return this.http.delete("/ds/"+t,null).then(()=>{})}},{key:"testConnection",value:function(t){return this.http.post("/ds/testConnection",t).json()}},{key:"createMosRuDataSource",value:function(t){return this.http.post("/ds/dataMosRu",t).then(()=>{})}},{key:"updateMosRuDataSource",value:function(t){return this.http.patch("/ds/dataMosRu",t).then(()=>{})}},{key:"createS3DataSource",value:function(t){return this.http.post("/ds/s3",t).then(()=>{})}},{key:"updateS3DataSource",value:function(t){return this.http.patch("/ds/s3",t).then(()=>{})}},{key:"createSparkDataSource",value:function(t){return this.http.post("/ds/spark",t).then(()=>{})}},{key:"updateSparkDataSource",value:function(t){return this.http.patch("/ds/spark",t).then(()=>{})}},{key:"createArcGisDataSource1",value:function(t){return this.http.post("/ds/wms",t).then(()=>{})}},{key:"updateArcGisDataSource1",value:function(t){return this.http.patch("/ds/wms",t).then(()=>{})}}])}();const b=["username"];function S(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let j=function(t){function e(){return s(this,e),S(this,e,arguments)}return l(e,m),c(e,[{key:"getTokensList",value:function(t){let{username:e}=t,n=p(t,b);return this.http.get("/accessToken/list/"+e,n).json()}},{key:"createToken",value:function(t){return this.http.put("/accessToken/"+t,null).text()}},{key:"disableToken",value:function(t){return this.http.post("/accessToken/"+t+"/disable",null).then(()=>{})}},{key:"enableToken",value:function(t){return this.http.post("/accessToken/"+t+"/enable",null).then(()=>{})}},{key:"revokeToken",value:function(t){return this.http.delete("/accessToken/"+t,null).then(()=>{})}}])}();function T(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let P=function(t){function e(){return s(this,e),T(this,e,arguments)}return l(e,m),c(e,[{key:"getAvailiableCs",value:function(){return this.http.get("/srs/list").json()}},{key:"getProj4Representation",value:function(t){return this.http.get("/srs/"+t+"/proj4").text()}},{key:"getWktRepresentation",value:function(t){return this.http.get("/srs/"+t+"/wkt").text()}}])}();function w(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let I=function(t){function e(){return s(this,e),w(this,e,arguments)}return l(e,m),c(e,[{key:"getParents",value:function(t){return this.http.get("/resources/"+t+"/parents").json()}},{key:"getTags",value:function(t){return this.http.get("/resources/tags",t).json()}},{key:"putTags",value:function(t,e){return this.http.put("/resources/"+t+"/tags",e).json()}},{key:"postGetAll",value:function(t,e){return this.http.post("/resources",e,t).json()}},{key:"getResource",value:function(t){return this.http.get("/resources/"+t).json()}},{key:"patchResource",value:function(t,e){return this.http.patch("/resources/"+t,e).json()}},{key:"deleteResource",value:function(t){return this.http.delete("/resources/"+t,null).then(()=>{})}},{key:"moveResource",value:function(t,e){return this.http.post("/resources/"+t+"/move",e).json()}},{key:"createDirectory",value:function(t){return this.http.post("/resources/directory",t).json()}},{key:"createFile",value:function(t){return this.http.patch("/resources/file",g(t)).json()}},{key:"createFile1",value:function(t){return this.http.post("/resources/file",g(t)).json()}},{key:"getPermissions",value:function(t){return this.http.get("/resources/"+t+"/permissions").json()}},{key:"setPermissions1",value:function(t,e){return this.http.put("/resources/"+t+"/permissions",e).then(()=>{})}},{key:"setPermissions",value:function(t){return this.http.put("/resources/permissions",t).then(()=>{})}},{key:"getFile",value:function(t){return this.http.get("/resources/file/"+t).blob()}},{key:"cleanResources",value:function(){return this.http.post("/resources/clean",null).then(()=>{})}},{key:"copyResources",value:function(t){return this.http.post("/resources/copy",t).json()}}])}();var C;(C=exports.ApiEvent||(exports.ApiEvent={})).ConnectionLost="ConnectionLost",C.Unauthorized="Unauthorized",C.SessionClosed="SessionClosed";let E=function(){return c((function t(){s(this,t),this.handlers={"*":[]}}),[{key:"on",value:function(t,e){this.handlers[t]||(this.handlers[t]=[]),this.handlers[t].push(e)}},{key:"off",value:function(t,e){if(!this.handlers[t])return;const n=this.handlers[t].indexOf(e);-1!==n&&this.handlers[t].splice(n,1)}},{key:"emit",value:function(t,e){this.handlers[t]&&this.handlers[t].map(t=>t(e)),this.handlers["*"].map(n=>n(t,e))}},{key:"once",value:function(t,e){const n=r=>{this.off(t,n),e(r)};this.on(t,n)}}])}();function B(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let L=function(t){function e(){return s(this,e),B(this,e,arguments)}return l(e,m),c(e,[{key:"getUsers",value:function(t){return this.http.get("/account/user/list",t).json()}},{key:"getExtendedUsers",value:function(t){return this.http.get("/account/user/extendedlist",t).json()}},{key:"getUserInfo",value:function(){return this.http.get("/account").json()}},{key:"getUserInfo1",value:function(t){return this.http.get("/account/"+t).json()}},{key:"getExtendedUserInfo",value:function(){return this.http.get("/account/extended").json()}},{key:"getExtendedUserInfo1",value:function(t){return this.http.get("/account/extended/"+t).json()}},{key:"isUsernameExists",value:function(t){return this.http.get("/account/user/exists",t).json()}},{key:"isEmailExists",value:function(t){return this.http.get("/account/user/email/exists",t).json()}},{key:"registerUser",value:function(t){return this.http.post("/account/register",t).text()}},{key:"createUser",value:function(t,e){return this.http.post("/account/user",e,t).then(()=>{})}},{key:"updateUser",value:function(t){return this.http.patch("/account/user",t).then(()=>{})}},{key:"confirmEmail",value:function(t){return this.http.post("/account/user/"+t+"/email/confirm",null).then(()=>{})}},{key:"verifyEmail",value:function(t){return this.http.post("/account/user/"+t+"/email/verify",null).then(()=>{})}},{key:"setEmail",value:function(t){return this.http.post("/account/setEmail",g(t)).then(()=>{})}},{key:"confirmEmail1",value:function(t){return this.http.post("/account/user/email/confirm",null,t).then(()=>{})}},{key:"changeEmail",value:function(t){return this.http.post("/account/user/email/change",null,t).then(()=>{})}},{key:"confirmChangeEmail",value:function(t){return this.http.post("/account/user/email/change/confirm",null,t).then(()=>{})}},{key:"setUserPassword",value:function(t){return this.http.patch("/account/password/set",t).then(()=>{})}},{key:"changePassword",value:function(t){return this.http.patch("/account/password/change",g(t)).then(()=>{})}},{key:"resetPassword",value:function(t){return this.http.post("/account/password/reset",null,t).then(()=>{})}},{key:"resetPasswordCallback",value:function(t){return this.http.post("/account/password/reset/confirm",g(t)).then(()=>{})}},{key:"removeUser",value:function(t){return this.http.delete("/account/user/"+t,null).then(()=>{})}},{key:"createNamespace",value:function(t){return this.http.post("/account/namespace",null,t).json()}},{key:"removeNamespace",value:function(t){return this.http.delete("/account/"+t,null).then(()=>{})}},{key:"activateUser",value:function(t){return this.http.post("/account/user/"+t+"/activate",null).then(()=>{})}},{key:"deactivateUser",value:function(t){return this.http.post("/account/user/"+t+"/deactivate",null).then(()=>{})}},{key:"authenticate",value:function(t,e){return this.http.post("/account/login",e,t).json()}},{key:"refreshToken",value:function(t){return this.http.post("/account/refresh-token",t).json()}},{key:"revokeToken",value:function(){return this.http.delete("/account/revoke-token",null).then(()=>{})}},{key:"ldapLogin",value:function(t){return this.http.post("/account/external/login/ldap",t).json()}},{key:"registerClient",value:function(t){return this.http.post("/account/oauth2/client",t).json()}},{key:"unbindClient",value:function(t){return this.http.delete("/account/oauth2/client/"+t,null).then(()=>{})}},{key:"token",value:function(t){return this.http.post("/account/oauth2/token",t).json()}},{key:"getRoles",value:function(t){return this.http.get("/account/role/list",t).json()}},{key:"createRole",value:function(t){return this.http.post("/account/role",t).then(()=>{})}},{key:"updateRole",value:function(t){return this.http.patch("/account/role",t).then(()=>{})}},{key:"removeRole",value:function(t){return this.http.delete("/account/role/"+t,null).then(()=>{})}},{key:"addToRole",value:function(t,e){return this.http.post("/account/user/"+t+"/role/"+e,null).then(()=>{})}},{key:"removeFromRole",value:function(t,e){return this.http.delete("/account/user/"+t+"/role/"+e,null).then(()=>{})}},{key:"postUsedProjects",value:function(t){return this.http.post("/account/latest_projects",t).json()}},{key:"getUsedProjects",value:function(){return this.http.get("/account/latest_projects").json()}},{key:"truncateUsedProjects",value:function(){return this.http.delete("/account/latest_projects",null).then(()=>{})}}])}();const U=()=>JSON.parse(localStorage.getItem("@evergis/user-info")||"null")||void 0,O=t=>{if(t){const e=U();localStorage.setItem("@evergis/user-info",JSON.stringify(a({},e,t)))}else localStorage.removeItem("@evergis/user-info")};function A(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let F=function(t){function e(){return s(this,e),A(this,e,arguments)}return l(e,L),c(e,[{key:"login",value:async function(t,n,r){if(void 0===n&&(n={}),void 0===r&&(r=!1),t){const o=await y(f(e.prototype),"authenticate",this).call(this,n,t);o&&r&&(window.localStorage.setItem("evergis-jwt-token",o.token),window.localStorage.setItem("evergis-refresh-token",o.refreshToken))}}},{key:"fetchCurrentUser",value:async function(){return this.userInfo=await this.getUserInfo(),this.userInfo}},{key:"username",get:function(){var t;return(null==(t=this.userInfo)?void 0:t.username)||""}},{key:"logout",value:async function(){window.localStorage.getItem("evergis-jwt-token")&&(window.localStorage.removeItem("evergis-jwt-token"),window.localStorage.removeItem("evergis-refresh-token")),await this.revokeToken(),O(void 0),this.userInfo={}}},{key:"updateCurrentUser",value:async function(t){await y(f(e.prototype),"updateUser",this).call(this,a({username:this.username},t)),O(t)}},{key:"setPassword",value:function(t){return this.setUserPassword({username:this.username,password:t})}},{key:"isAuth",get:function(){var t;return!(null==(t=this.userInfo)||!t.username)&&"public"!==this.userInfo.username}},{key:"user",get:function(){if(this.userInfo)return this.userInfo;const t=U();return t&&(this.userInfo=t),t}}])}();function D(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let N=function(t){function e(){return s(this,e),D(this,e,arguments)}return l(e,m),c(e,[{key:"getPreview",value:function(){return this.http.createUrl("/account/user/preview")}},{key:"uploadPreview",value:function(t){return this.http.post("/account/user/preview",g(t)).json()}},{key:"deletePreview",value:function(){return this.http.delete("/account/user/preview",null).then(()=>{})}},{key:"getPreview1",value:function(t){return this.http.createUrl("/account/user/preview/"+t)}},{key:"uploadPreview1",value:function(t,e){return this.http.post("/account/user/preview/"+t,g(e)).json()}},{key:"deletePreview1",value:function(t){return this.http.delete("/account/user/preview/"+t,null).then(()=>{})}}])}();function M(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let W=function(t){function e(){return s(this,e),M(this,e,arguments)}return l(e,N),c(e)}();function _(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let H=function(t){function e(){return s(this,e),_(this,e,arguments)}return l(e,m),c(e,[{key:"batchResourcesPermissionsSet",value:function(t){return this.http.put("/bulk/resources/permissions",t).json()}}])}();function q(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let G=function(t){function e(){return s(this,e),q(this,e,arguments)}return l(e,H),c(e)}();const z=["cameraId"],Q=["cameraId"],V=["cameraId"],J=["cameraId"],K=["cameraId"],X=["cameraId"];function Y(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let Z=function(t){function e(){return s(this,e),Y(this,e,arguments)}return l(e,m),c(e,[{key:"getCameras",value:function(t){return this.http.get("/cameras",t).json()}},{key:"getArchiveFeed",value:function(t){let{cameraId:e}=t,n=p(t,z);return this.http.get("/cameras/"+e+"/archiveFeed",n).blob()}},{key:"getArchiveTimeline",value:function(t){let{cameraId:e}=t,n=p(t,Q);return this.http.get("/cameras/"+e+"/archiveTimeline",n).json()}},{key:"getArchiveCalendar",value:function(t){let{cameraId:e}=t,n=p(t,V);return this.http.get("/cameras/"+e+"/archiveCalendar",n).json()}},{key:"getArchiveSnapshot",value:function(t){let{cameraId:e}=t,n=p(t,J);return this.http.get("/cameras/"+e+"/archiveSnapshot",n).blob()}},{key:"getLiveFeed",value:function(t){let{cameraId:e}=t,n=p(t,K);return this.http.get("/cameras/"+e+"/liveFeed",n).blob()}},{key:"getLiveSnapshot",value:function(t){return this.http.get("/cameras/"+t+"/liveSnapshot").blob()}},{key:"getLivePreviewStream",value:function(t){let{cameraId:e}=t,n=p(t,X);return this.http.get("/cameras/"+e+"/getLivePreviewsStream",n).json()}}])}();function $(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let tt=function(t){function e(){return s(this,e),$(this,e,arguments)}return l(e,Z),c(e)}();function et(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let nt=function(t){function e(){return s(this,e),et(this,e,arguments)}return l(e,m),c(e,[{key:"getConfigurationsList",value:function(t){return this.http.get("/settings/config",t).json()}},{key:"getConfiguration",value:function(t){return this.http.get("/settings",t).text()}},{key:"setConfiguration",value:function(t,e){return this.http.post("/settings",e,t).then(()=>{})}},{key:"removeConfiguration",value:function(t){return this.http.delete("/settings",null,t).then(()=>{})}}])}();function rt(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let ot=function(t){function e(){var t;return s(this,e),(t=rt(this,e,arguments)).settings={modules:[],connection:{url:""}},t}return l(e,nt),c(e,[{key:"fetchClientSettings",value:async function(t){const e=JSON.parse(await this.getConfiguration(t));return this.updateClientSettings(e),e}},{key:"updateClientSettings",value:function(t){Object.assign(this.settings,t)}}])}();function ut(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let st=function(t){function e(){return s(this,e),ut(this,e,arguments)}return l(e,m),c(e,[{key:"getPagedQueryResult",value:function(t){return this.http.post("/eql/query",t).json()}},{key:"getQueryDescription",value:function(t){return this.http.post("/eql/description",t).json()}},{key:"setLayerParameterValue",value:function(t){return this.http.post("/eql/setParam",null,t).then(()=>{})}},{key:"setLayerParameters",value:function(t,e){return this.http.post("/eql/setParams",e,t).then(()=>{})}},{key:"getLayerParameters",value:function(t){return this.http.get("/eql/getParam",t).text()}},{key:"getLayerParameters1",value:function(t){return this.http.get("/eql/getParams",t).json()}},{key:"removeLayerParameterValue",value:function(t){return this.http.delete("/eql/removeParam",null,t).then(()=>{})}},{key:"getAvailiableLayerParameters",value:function(t){return this.http.get("/eql/getAvailiableParams",t).json()}}])}();function it(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let ct=function(t){function e(){return s(this,e),it(this,e,arguments)}return l(e,st),c(e)}();function at(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let lt=function(t){function e(){return s(this,e),at(this,e,arguments)}return l(e,m),c(e,[{key:"increaseResourcesLimit",value:function(t){return this.http.post("/feedback/limits",null,t).json()}},{key:"feedback",value:function(t,e){return this.http.post("/feedback",g(e),t).json()}}])}();function ft(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let pt=function(t){function e(){return s(this,e),ft(this,e,arguments)}return l(e,lt),c(e)}();function ht(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let yt=function(t){function e(){return s(this,e),ht(this,e,arguments)}return l(e,I),c(e,[{key:"upload",value:function(t,e){return this.createFile1({file:t,rewrite:!!e})}},{key:"replaceFile",value:function(t){return this.createFile(t)}}])}();function dt(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let vt=function(t){function e(){return s(this,e),dt(this,e,arguments)}return l(e,m),c(e,[{key:"get",value:function(t){return this.http.get("/filters/"+t).json()}},{key:"update",value:function(t,e){return this.http.post("/filters/"+t,e).json()}},{key:"create",value:function(t){return this.http.post("/filters",t).json()}}])}();function kt(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let gt=function(t){function e(){return s(this,e),kt(this,e,arguments)}return l(e,vt),c(e)}();const mt=["providerName"],Rt=["providerName"],xt=["providerName"];function bt(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let St=function(t){function e(){return s(this,e),bt(this,e,arguments)}return l(e,m),c(e,[{key:"geocode",value:function(t){let{providerName:e}=t,n=p(t,mt);return this.http.get("/geocode/"+e,n).json()}},{key:"geocodeByPoint",value:function(t){let{providerName:e}=t,n=p(t,Rt);return this.http.get("/geocode/"+e+"/geocodeByPoint",n).json()}},{key:"suggest",value:function(t){let{providerName:e}=t,n=p(t,xt);return this.http.get("/geocode/"+e+"/suggest",n).json()}}])}();function jt(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let Tt=function(t){function e(){return s(this,e),jt(this,e,arguments)}return l(e,St),c(e,[{key:"geocode2Gis",value:function(t){return this.geocode(a({providerName:"geocode2gis"},t))}},{key:"suggest2Gis",value:function(t){return this.suggest(a({providerName:"geocode2gis"},t))}}])}();function Pt(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let wt=function(t){function e(){return s(this,e),Pt(this,e,arguments)}return l(e,m),c(e,[{key:"getDataSchema",value:function(t){return this.http.get("/import/dataSchema",t).json()}},{key:"getFeaturesCount",value:function(t){return this.http.post("/import/count",t).json()}},{key:"readPart",value:function(t){return this.http.get("/import/read",t).json()}},{key:"getExternalWmsLayers",value:function(t){return this.http.get("/import/wms",t).json()}},{key:"getExternalPbfLayers",value:function(t){return this.http.get("/import/pbf",t).json()}},{key:"getExternalPbfFeatures",value:function(t){return this.http.get("/import/pbf/features",t).json()}},{key:"getExternalArcgisFsLayers",value:function(t){return this.http.get("/import/arcgisfeatureservice",t).json()}},{key:"getExternalArcGisLayers",value:function(t){return this.http.get("/import/arcgismapservice",t).json()}},{key:"getRasterAttributes",value:function(t){return this.http.get("/import/rasterAttributes",t).json()}},{key:"getRasterMeta",value:function(t){return this.http.get("/import/rasterMeta",t).json()}}])}();function It(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let Ct=function(t){function e(){return s(this,e),It(this,e,arguments)}return l(e,wt),c(e)}();const Et=["name"],Bt=["name"],Lt=["name","id"],Ut=["name","x","y","z"],Ot=["name","x","y","z","format"],At=["name","x","y","z","dpi","format"],Ft=["name"],Dt=["name"],Nt=["name"],Mt=["name"],Wt=["name"],_t=["name"],Ht=["name"],qt=["layerName"],Gt=["name","id"];function zt(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let Qt=function(t){function e(){return s(this,e),zt(this,e,arguments)}return l(e,m),c(e,[{key:"getBulkFeatures",value:function(t){return this.http.post("/bulk/layers/features/query",t).json()}},{key:"getBulkExtents",value:function(t,e){return this.http.post("/bulk/layers/extent",e,t).json()}},{key:"getFilteredFeaturesCount",value:function(t){return this.http.post("/bulk/layers/features/count",t).json()}},{key:"getLayersList",value:function(t){return this.http.get("/layers",t).json()}},{key:"deleteResources",value:function(t){return this.http.delete("/layers",null,t).json()}},{key:"getLayerInfo",value:function(t){return this.http.get("/layers/"+t).json()}},{key:"deleteResource",value:function(t){return this.http.delete("/layers/"+t,null).then(()=>{})}},{key:"getLayersInfo",value:function(t){return this.http.get("/layers/batchInfo",t).json()}},{key:"publishMapboxService",value:function(t){return this.http.post("/layers",t,{type:"Mapbox"}).json()}},{key:"publishProxyService",value:function(t){return this.http.post("/layers",t,{type:"ProxyService"}).json()}},{key:"publishRouteService",value:function(t){return this.http.post("/layers",t,{type:"RouteService"}).then(()=>{})}},{key:"publishLinearService",value:function(t){return this.http.post("/layers",t,{type:"LinearService"}).then(()=>{})}},{key:"publishRemoteTileService",value:function(t){return this.http.post("/layers",t,{type:"RemoteTileService"}).json()}},{key:"publishQueryLayerService",value:function(t){return this.http.post("/layers",t,{type:"QueryLayerService"}).json()}},{key:"publishPostgresTileCatalogService",value:function(t){return this.http.post("/layers",t,{type:"PostgresTileLayerService"}).json()}},{key:"publishPythonService",value:function(t){return this.http.post("/layers",t,{type:"Python"}).json()}},{key:"updateMapboxService",value:function(t,e){return this.http.patch("/layers/"+t,e,{type:"Mapbox"}).json()}},{key:"updatePythonService",value:function(t,e){return this.http.patch("/layers/"+t,e,{type:"Python"}).json()}},{key:"updateProxyService",value:function(t,e){return this.http.patch("/layers/"+t,e,{type:"ProxyService"}).json()}},{key:"updateTileCatalogService",value:function(t,e){return this.http.patch("/layers/"+t,e,{type:"PostgresTileLayerService"}).json()}},{key:"updateRemoteTileService",value:function(t,e){return this.http.patch("/layers/"+t,e,{type:"RemoteTileService"}).json()}},{key:"updateQueryLayerService",value:function(t,e){return this.http.patch("/layers/"+t,e,{type:"QueryLayerService"}).json()}},{key:"reloadService",value:function(t){return this.http.get("/layers/"+t+"/reload").json()}},{key:"getFeatures",value:function(t,e){return this.http.post("/layers/"+t+"/features/query",e).json()}},{key:"getFeatures1",value:function(t){let{name:e}=t,n=p(t,Et);return this.http.get("/layers/"+e+"/features",n).json()}},{key:"deleteFeature",value:function(t){let{name:e}=t,n=p(t,Bt);return this.http.delete("/layers/"+e+"/features",null,n).json()}},{key:"createFeatures",value:function(t,e){return this.http.post("/layers/"+t+"/features",e).json()}},{key:"updateFeature",value:function(t,e){return this.http.patch("/layers/"+t+"/features",e).json()}},{key:"getById",value:function(t){let{name:e,id:n}=t,r=p(t,Lt);return this.http.get("/layers/"+e+"/features/"+n,r).json()}},{key:"getTilesLayerImage",value:function(t){let{name:e,x:n,y:r,z:o}=t,u=p(t,Ut);return this.http.createUrl("/layers/"+e+"/tile/"+o+"/"+n+"/"+r,u)}},{key:"getTilesLayerImage1",value:function(t){let{name:e,x:n,y:r,z:o,format:u}=t,s=p(t,Ot);return this.http.createUrl("/layers/"+e+"/tile/"+o+"/"+n+"/"+r+"."+u,s)}},{key:"getTilesLayerImageWithFormatAndDpi",value:function(t){let{name:e,x:n,y:r,z:o,dpi:u,format:s}=t,i=p(t,At);return this.http.createUrl("/layers/"+e+"/tile/"+o+"/"+n+"/"+r+"@"+u+"x."+s,i)}},{key:"getLayerExtent",value:function(t){let{name:e}=t,n=p(t,Ft);return this.http.get("/layers/"+e+"/extent",n).json()}},{key:"deleteFeatures",value:function(t){let{name:e}=t,n=p(t,Dt);return this.http.delete("/layers/"+e+"/features/deleteByIds",null,n).json()}},{key:"deleteByCondition",value:function(t){let{name:e}=t,n=p(t,Nt);return this.http.delete("/layers/"+e+"/features/deleteByCondition",null,n).json()}},{key:"classify",value:function(t){let{name:e}=t,n=p(t,Mt);return this.http.get("/layers/"+e+"/classify",n).json()}},{key:"distincts",value:function(t){let{name:e}=t,n=p(t,Wt);return this.http.get("/layers/"+e+"/distincts",n).json()}},{key:"aggregateAttribute",value:function(t){let{name:e}=t,n=p(t,_t);return this.http.get("/layers/"+e+"/aggregate-values",n).json()}},{key:"getFilteredFeaturesCount1",value:function(t){let{name:e}=t,n=p(t,Ht);return this.http.get("/layers/"+e+"/features/count",n).json()}},{key:"getFilteredFeaturesCount2",value:function(t,e){return this.http.post("/layers/"+t+"/features/count",e).json()}},{key:"editAttributes",value:function(t,e){return this.http.post("/layers/"+t+"/features/edit-attributes",e).json()}},{key:"validateExpression",value:function(t){let{layerName:e}=t,n=p(t,qt);return this.http.get("/layers/"+e+"/validateExpression",n).json()}},{key:"flipCoordinates",value:function(t){return this.http.post("/layers/"+t+"/flip-coordinates",null).json()}},{key:"getRasterMeta",value:function(t){let{name:e,id:n}=t,r=p(t,Gt);return this.http.get("/layers/"+e+"/"+n+"/metadata",r).json()}},{key:"isExists",value:function(t){return this.http.get("/layers/"+t+"/exists").then(()=>{})}},{key:"getResourceDependencies",value:function(t){return this.http.get("/layers/"+t+"/dependencies").json()}},{key:"getResourceReferences",value:function(t){return this.http.get("/layers/"+t+"/references").json()}}])}();async function Vt(t){return(await Promise.all(t.map(t=>t.catch(t=>Jt(t)?t:new Error(t))))).filter(Kt)}function Jt(t){return t instanceof Error}function Kt(t){return!Jt(t)}function Xt(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let Yt=function(t){function e(){return s(this,e),Xt(this,e,arguments)}return l(e,Qt),c(e,[{key:"getLayerInfos",value:function(t){return Vt(t.map(t=>this.getLayerInfo(t)))}},{key:"getLayersDeps",value:function(t){return Vt(t.map(t=>this.getResourceDependencies(t)))}},{key:"getBasemaps",value:function(t){return this.getLayersList(a({},t,{types:["LocalTileService","RemoteTileService"]}))}},{key:"findOne",value:function(t){return this.getLayerInfo(t)}},{key:"findMany",value:function(t,e){return this.getLayersInfo({layerNames:t,projectNames:e})}},{key:"findAll",value:function(t){return this.getLayersList(t)}},{key:"createQueryLayer",value:function(t){return this.publishQueryLayerService(t)}},{key:"updateQueryLayer",value:function(t){return this.updateQueryLayerService(t.name,t)}},{key:"createProxyLayer",value:function(t){return this.publishProxyService(t)}},{key:"updateProxyLayer",value:function(t){return this.updateProxyService(t.name,t)}},{key:"remove",value:async function(t){return await this.deleteResource(t),t}}])}();var Zt;(Zt=exports.ErrorReason||(exports.ErrorReason={})).HTTP_OTHER="other",Zt.HTTP_CLIENT="client",Zt.HTTP_SERVER="server",Zt.UNKNOWN="unknown";const $t=t=>t instanceof e.HTTPError?(t=>{const e=t.response.status;let n=exports.ErrorReason.HTTP_OTHER;return e>=400&&e<500&&(n=exports.ErrorReason.HTTP_CLIENT),e>=500&&(n=exports.ErrorReason.HTTP_SERVER),{type:"http",reason:n,status:e,origin:t}})(t):(t=>({type:"base",reason:exports.ErrorReason.UNKNOWN,origin:t}))(t),te=t=>t&&t.type&&t.reason;function ee(t){return"string"==typeof t}const ne=t=>t===exports.UrlPath.Presentation?exports.UrlPath.Base:t;function re(t,e,n){return n.indexOf(t)===e}const oe=u.customAlphabet("abcdefghijklmnopqrstuvwxyz0123456789",12);(exports.ResourceSeparator||(exports.ResourceSeparator={})).Server=".";let ue=function(){return c((function t(e){let{account:n}=e;s(this,t),this.account=n}),[{key:"createId",value:function(){return oe()}},{key:"createResourceName",value:function(t){void 0===t&&(t={});const e=t.workspace||this.account.user&&this.account.user.namespace||"",n=t.name||this.createId(),r=t.separator||exports.ResourceSeparator.Server;return e||console.warn("Resource should have workspace. Check account api"),""+e+r+n}},{key:"createTempResourceName",value:function(t){return void 0===t&&(t={}),this.createResourceName(a({workspace:"temp"},t))}},{key:"extractResource",value:function(t){if(t&&t.includes(exports.ResourceSeparator.Server)){const e=t.split(exports.ResourceSeparator.Server),n=e.pop();return{workspace:e.join(exports.ResourceSeparator.Server),name:n}}return{name:"",workspace:""}}},{key:"extractResourceName",value:function(t){return this.extractResource(t).name||t||""}},{key:"extractResourceWorkspace",value:function(t){return this.extractResource(t).workspace||""}}])}();function se(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let ie=function(t){function e(){return s(this,e),se(this,e,arguments)}return l(e,m),c(e,[{key:"getSubscriptionList",value:function(){return this.http.get("/notifications/subscribes").json()}},{key:"subscribeOperation",value:function(t){return this.http.post("/notifications/subscribes",null,t).then(()=>{})}},{key:"unsubscribeOperation",value:function(t){return this.http.delete("/notifications/subscribes",null,t).then(()=>{})}},{key:"subscribeListOperation",value:function(t){return this.http.post("/notifications/subscribe-list",t).then(()=>{})}},{key:"unsubscribeListOperation",value:function(t){return this.http.post("/notifications/unsubscribe-list",t).then(()=>{})}}])}();var ce;(ce=exports.ConnectionStatus||(exports.ConnectionStatus={})).Initialized="Initialized",ce.Connected="Connected",ce.Break="Break",ce.Lost="Lost",ce.SessionClosed="SessionClosed";let ae=function(t){function e(t,n,r){var o,u,i;return void 0===r&&(r=!1),s(this,e),i=[t],u=f(u=e),(o=h(this,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(u,i||[],f(this).constructor):u.apply(this,i))).api=n,o.MAX_WS_RECONNECT_TRIES=10,o.keepAlive=!1,o.reconnectTries=0,o.subscriptions=[],o._connectStatus=exports.ConnectionStatus.Initialized,o.onWsConnected=()=>{o.connectStatus=exports.ConnectionStatus.Connected,o.keepAlive&&(o.keepAliveTimeout=setInterval(()=>{o.ws&&o.ws.send(JSON.stringify({keepAlive:!0}))},5e3))},o.onWsClosed=t=>{4001===t.code||4002===t.code?o.connectStatus=exports.ConnectionStatus.SessionClosed:o.reconnectTries<o.MAX_WS_RECONNECT_TRIES?(o.connectStatus=exports.ConnectionStatus.Break,o.reconnectTries++,o.ws&&(o.ws.onopen=null,o.ws.onclose=null,o.ws.onmessage=null,o.ws=void 0),o.keepAliveTimeout&&clearInterval(o.keepAliveTimeout),setTimeout(()=>{o.connect()},0)):o.connectStatus=exports.ConnectionStatus.Lost},o.onWsMessage=t=>{let e={};try{e=JSON.parse(t.data)}catch(t){console.debug("Failed to parse ws message from sp.")}if("notification"===e.type&&e.data){const{tag:t,data:n}=e.data;t&&o.emitter.emit(t,new le(n))}},o.emitter=new E,o.keepAlive=r,o}return l(e,ie),c(e,[{key:"connectStatus",get:function(){return this._connectStatus},set:function(t){this.emitter.emit("ConnectionStatus",new le(t)),this._connectStatus=t}},{key:"currentWs",get:function(){return this.ws}},{key:"on",value:function(t,e){this.emitter.on(t,e)}},{key:"off",value:function(t,e){this.emitter.off(t,e)}},{key:"subscribe",value:async function(t){this.subscriptions.push(t),setTimeout(()=>{this.api.isShared||this.api.isPresentation||!this.subscriptions.length||this.subscribeListOperation(this.subscriptions),this.subscriptions=[]},500)}},{key:"unsubscribe",value:async function(t){if((await this.getSubscriptionList()).includes(t))return this.unsubscribeOperation({tag:t})}},{key:"connectWs",value:function(t){const e=t.replace("http://","ws://").replace("https://","wss://");this.wsUrl=e,this.connect()}},{key:"connect",value:function(){this.wsUrl?(this.ws=new WebSocket(this.wsUrl),this.ws.onopen=this.onWsConnected,this.ws.onclose=this.onWsClosed,this.ws.onmessage=this.onWsMessage):console.warn("Connection to WebSocket not allowed. wsUrl not provided")}}])}(),le=c((function t(e){s(this,t),this.data=e}));function fe(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let pe=function(t){function e(){var t;return s(this,e),(t=fe(this,e,arguments)).config=null,t}return l(e,nt),c(e,[{key:"fetchPortalSettings",value:async function(t){return this.config=JSON.parse(await this.getConfiguration(t)),this.config}}])}();const he=["name"];function ye(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let de=function(t){function e(){return s(this,e),ye(this,e,arguments)}return l(e,m),c(e,[{key:"getProjectsList",value:function(t){return this.http.get("/projects",t).json()}},{key:"createProject",value:function(t){return this.http.post("/projects",t).json()}},{key:"deleteResources",value:function(t){return this.http.delete("/projects",null,t).json()}},{key:"updateProject",value:function(t,e){return this.http.patch("/projects/"+t,e).json()}},{key:"getProjectInfo",value:function(t){return this.http.get("/projects/"+t).json()}},{key:"deleteResource",value:function(t){return this.http.delete("/projects/"+t,null).then(()=>{})}},{key:"updateProjectV2",value:function(t,e){return this.http.patch("/projects/"+t+"/v2",e).json()}},{key:"getProjectsInfo",value:function(t){return this.http.get("/projects/batchInfo",t).json()}},{key:"getProjectEnvelope",value:function(t){let{name:e}=t,n=p(t,he);return this.http.get("/projects/"+e+"/extent",n).json()}},{key:"getProjectLayersExtendedInfo",value:function(t){return this.http.get("/projects/"+t+"/extended-info").json()}},{key:"patchProjectConfiguration",value:function(t,e,n){return this.http.patch("/projects/"+t+"/configuration/"+e,n).json()}},{key:"putProjectConfiguration",value:function(t,e,n){return this.http.put("/projects/"+t+"/configuration/"+e,n).json()}},{key:"getProjectConfiguration",value:function(t,e){return this.http.get("/projects/"+t+"/configuration/"+e).json()}},{key:"deleteProjectConfiguration",value:function(t,e){return this.http.delete("/projects/"+t+"/configuration/"+e,null).json()}},{key:"getTilesLayerImage",value:function(t,e,n,r){return this.http.createUrl("/projects/"+t+"/tile/"+r+"/"+e+"/"+n)}},{key:"getTilesLayerImageWithFormat",value:function(t,e,n,r,o){return this.http.createUrl("/projects/"+t+"/tile/"+r+"/"+e+"/"+n+"."+o)}},{key:"getTilesLayerImageWithFormatAndDpi",value:function(t,e,n,r,o,u){return this.http.createUrl("/projects/"+t+"/tile/"+r+"/"+e+"/"+n+"@"+o+"x."+u)}},{key:"isExists",value:function(t){return this.http.get("/projects/"+t+"/exists").then(()=>{})}},{key:"getResourceDependencies",value:function(t){return this.http.get("/projects/"+t+"/dependencies").json()}},{key:"getResourceReferences",value:function(t){return this.http.get("/projects/"+t+"/references").json()}}])}();function ve(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let ke=function(t){function e(){return s(this,e),ve(this,e,arguments)}return l(e,de),c(e,[{key:"getProjectInfos",value:function(t){return Vt(t.map(t=>this.getProjectInfo(t)))}},{key:"getProjectsDeps",value:function(t){return Vt(t.map(t=>this.getResourceDependencies(t)))}},{key:"findOne",value:function(t){return this.getProjectInfo(t)}},{key:"findAll",value:function(t){return this.getProjectsList(t)}},{key:"create",value:function(t){return this.createProject(t)}},{key:"update",value:function(t){return this.updateProject(t.name,t)}},{key:"remove",value:async function(t){return await this.deleteResource(t),t}}])}();const ge=["id"],me=["id"];function Re(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let xe=function(t){function e(){return s(this,e),Re(this,e,arguments)}return l(e,m),c(e,[{key:"get",value:function(t){return this.http.get("/scheduler/task/"+t+"/subtasks").json()}},{key:"stop",value:function(t){return this.http.post("/scheduler/task/"+t+"/stop",null).text()}},{key:"createTaskPrototype",value:function(t){return this.http.post("/scheduler",t).text()}},{key:"getTaskPrototypes",value:function(t){return this.http.get("/scheduler",t).json()}},{key:"updateTaskPrototype",value:function(t,e){return this.http.put("/scheduler/"+t,e).text()}},{key:"delete",value:function(t){return this.http.delete("/scheduler/"+t,null).text()}},{key:"setEnable",value:function(t,e){return this.http.post("/scheduler/"+t+"/enable/"+e,null).text()}},{key:"getTasksForPrototype",value:function(t){let{id:e}=t,n=p(t,ge);return this.http.get("/scheduler/"+e+"/tasks",n).json()}},{key:"startTask",value:function(t,e){return this.http.post("/scheduler/"+t+"/start/"+e,null).json()}},{key:"startTask1",value:function(t){return this.http.post("/scheduler/"+t+"/start",null).json()}},{key:"getTaskResource",value:function(t){let{id:e}=t,n=p(t,me);return this.http.get("/scheduler/taskresource/"+e,n).json()}},{key:"createTaskResource",value:function(t){return this.http.post("/scheduler/taskresource",t).text()}},{key:"updatePythonTaskResource",value:function(t,e){return this.http.patch("/scheduler/taskresource/"+t,e,{type:"PythonTask"}).then(()=>{})}},{key:"updateSpTaskResource",value:function(t,e){return this.http.patch("/scheduler/taskresource/"+t,e,{type:"SpTask"}).then(()=>{})}},{key:"get1",value:function(){return this.http.get("/scheduler/worker").json()}},{key:"post",value:function(t){return this.http.post("/scheduler/worker",t).json()}},{key:"getWorker",value:function(t){return this.http.get("/scheduler/worker/"+t).json()}}])}();function be(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let Se=function(t){function e(){return s(this,e),be(this,e,arguments)}return l(e,xe),c(e)}();var je;(je=exports.DependencyType||(exports.DependencyType={})).Layer="Layer",je.Table="Table",je.Project="Project";let Te=function(){return c((function t(e,n,r){s(this,t),this.projects=e,this.layers=n,this.tables=r}),[{key:"getProjectInfosWithDeps",value:async function(t){const e=await this.projects.getProjectInfos(t),n=await this.projects.getProjectsDeps(t),{layers:r,tables:o}=await this.getDependencies(n,!0,!0);return{projects:e,deps:{layers:r,tables:o}}}},{key:"getLayerInfosWithDeps",value:async function(t){const e=await this.layers.getLayerInfos(t),n=await this.layers.getLayersDeps(t),{tables:r}=await this.getDependencies(n,!1,!0);return{layers:e,deps:{tables:r}}}},{key:"getDependencies",value:async function(t,e,n){const{tables:r,layers:o}=t.reduce((t,r)=>{const o=r.dependencies||[];if(e){const e=this.getDependentNames(o,exports.DependencyType.Layer);t.layers.push(...e)}if(n){const e=this.getDependentNames(o,exports.DependencyType.Table);t.tables.push(...e)}return t},{tables:[],layers:[]});return{tables:await this.tables.getTableInfos(r.filter(re)),layers:await this.layers.getLayerInfos(o.filter(re))}}},{key:"getDependentNames",value:function(t,e){return t.filter(t=>{let{type:n}=t;return n===e}).map(t=>{let{name:e}=t;return e}).filter(ee)}}])}();function Pe(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let we=function(t){function e(){return s(this,e),Pe(this,e,arguments)}return l(e,m),c(e,[{key:"setPolicies",value:function(t){return this.http.post("/bulk/security/policies",t).then(()=>{})}},{key:"findUserByNameByRoles",value:function(t){return this.http.get("/security/findUsersWithRoles",t).json()}},{key:"getUsersAndRoles",value:function(t){return this.http.get("/security/usersandroles",t).json()}},{key:"findUserByName",value:function(t){return this.http.get("/security/users",t).json()}},{key:"getPolicyList",value:function(t){return this.http.get("/security/policies",t).json()}},{key:"removePolicy",value:function(t){return this.http.delete("/security/policies",null,t).then(()=>{})}},{key:"setPolicy",value:function(t){return this.http.post("/security/policies",t).then(()=>{})}},{key:"oldCheckLimits",value:function(){return this.http.get("/resources/checkLimits").json()}},{key:"oldCheckLimits1",value:function(t){return this.http.get("/resources/checkLimits/"+t).json()}},{key:"checkLimitsForUser",value:function(){return this.http.get("/security/limits/user").json()}},{key:"checkLimitsForUser1",value:function(t){return this.http.get("/security/limits/user/"+t).json()}},{key:"checkLimitsForRole",value:function(t){return this.http.get("/security/limits/role/"+t).json()}},{key:"getDefaultLimits",value:function(){return this.http.get("/security/limits/default").json()}}])}(),Ie=function(t){function e(t,n){var r;let{username:o,roles:u}=n;var i,c;return s(this,e),c=[t],i=f(i=e),(r=h(this,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(i,c||[],f(this).constructor):i.apply(this,c))).ownerName="",r.ownerRoles=[],r.ownerName=o,r.ownerRoles=u,r}return l(e,we),c(e,[{key:"reset",value:function(){this.ownerName="",this.ownerRoles=[]}}])}();function Ce(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let Ee=function(t){function e(){return s(this,e),Ce(this,e,arguments)}return l(e,m),c(e,[{key:"statisticsDb",value:function(t){return this.http.post("/statistics",t).json()}},{key:"classify",value:function(t){return this.http.post("/statistics/classify",t).json()}},{key:"sumOfProduct",value:function(t){return this.http.post("/statistics/sumOfProduct",t).json()}}])}();function Be(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let Le=function(t){function e(){return s(this,e),Be(this,e,arguments)}return l(e,Ee),c(e)}();const Ue=["name"],Oe=["name"],Ae=["name"];function Fe(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let De=function(t){function e(){return s(this,e),Fe(this,e,arguments)}return l(e,m),c(e,[{key:"getTableList",value:function(t){return this.http.get("/tables",t).json()}},{key:"createTable",value:function(t){return this.http.post("/tables",t).json()}},{key:"deleteResources",value:function(t){return this.http.delete("/tables",null,t).json()}},{key:"updateTable",value:function(t,e){return this.http.patch("/tables/"+t,e).json()}},{key:"putTable",value:function(t,e){return this.http.put("/tables/"+t,e).json()}},{key:"getTableInfo",value:function(t){return this.http.get("/tables/"+t).json()}},{key:"deleteResource",value:function(t){return this.http.delete("/tables/"+t,null).then(()=>{})}},{key:"getTablesInfo",value:function(t){return this.http.get("/tables/batchInfo",t).json()}},{key:"getTableData",value:function(t){let{name:e}=t,n=p(t,Ue);return this.http.get("/tables/"+e+"/data",n).json()}},{key:"writeTableData",value:function(t,e){return this.http.post("/tables/"+t+"/data",e).then(()=>{})}},{key:"updateTableData",value:function(t,e){let{name:n}=t,r=p(t,Oe);return this.http.patch("/tables/"+n+"/data",e,r).then(()=>{})}},{key:"deleteTableData",value:function(t){let{name:e}=t,n=p(t,Ae);return this.http.delete("/tables/"+e+"/data",null,n).then(()=>{})}},{key:"mapTable",value:function(t,e){return this.http.post("/tables/map-table",e,t).json()}},{key:"unmapTable",value:function(t){return this.http.delete("/tables/map-table/"+t,null).then(()=>{})}},{key:"createViewFromQueryLayer",value:function(t){return this.http.post("/tables/fromLayer",t).json()}},{key:"createViewFromQuery",value:function(t){return this.http.post("/tables/fromQuery",t).json()}},{key:"isExists",value:function(t){return this.http.get("/tables/"+t+"/exists").then(()=>{})}},{key:"getResourceDependencies",value:function(t){return this.http.get("/tables/"+t+"/dependencies").json()}},{key:"getResourceReferences",value:function(t){return this.http.get("/tables/"+t+"/references").json()}}])}();function Ne(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let Me=function(t){function e(){return s(this,e),Ne(this,e,arguments)}return l(e,De),c(e,[{key:"getTableInfos",value:function(t){return Vt(t.map(t=>this.getTableInfo(t)))}},{key:"findOne",value:function(t){return this.getTableInfo(t)}},{key:"findAll",value:function(t){return this.getTableList(t)}},{key:"create",value:function(t){return this.createTable(t)}},{key:"update",value:function(t){return this.updateTable(t.name,t)}},{key:"remove",value:async function(t){return await this.deleteResource(t),t}}])}();function We(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let _e=function(t){function e(){return s(this,e),We(this,e,arguments)}return l(e,m),c(e)}();function He(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let qe=function(t){function e(){return s(this,e),He(this,e,arguments)}return l(e,_e),c(e)}();const Ge=["name","z","x","y"];function ze(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let Qe=function(t){function e(){return s(this,e),ze(this,e,arguments)}return l(e,m),c(e,[{key:"getVectorTile",value:function(t){let{name:e,z:n,x:r,y:o}=t,u=p(t,Ge);return this.http.get("/vt/"+e+"/"+n+"/"+r+"/"+o+".pbf",u).then(()=>{})}}])}();function Ve(t,e,n){return e=f(e),h(t,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(e,n||[],f(t).constructor):e.apply(t,n))}let Je=function(t){function e(){return s(this,e),Ve(this,e,arguments)}return l(e,Qe),c(e)}();var Ke;(Ke=exports.UrlPath||(exports.UrlPath={})).Base="/map",Ke.Shared="/shared",Ke.Presentation="/presentation",Ke.Portal="/portal";const Xe={401:exports.ApiEvent.Unauthorized},Ye=Object.values(exports.UrlPath),Ze=Ye[0];let $e=function(t){function n(t){var o,u;let{url:i,wsUrl:c,wsKeepAlive:l,snappingHubUrl:p,http:y,urlPath:v,httpOptions:k}=t;var g;s(this,n),g=f(g=n),u=h(this,function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){return!1}}()?Reflect.construct(g,[],f(this).constructor):g.apply(this,void 0));const{hooks:m}=k||{};return u.http=y||new d(a({prefixUrl:i,timeout:!1,retry:{methods:["get","post","delete"],limit:5,statusCodes:[401]}},k||{},{hooks:a({},m||{},{beforeRequest:[t=>{const e=window.localStorage.getItem("evergis-jwt-token");var n;e&&(null==(n=t.headers)||n.set("Authorization","Bearer "+(e||"")))},...null!=(o=null==m?void 0:m.beforeRequest)?o:[]],beforeRetry:[async t=>{let{request:n,error:r,retryCount:o}=t;if(r instanceof e.HTTPError&&401===r.response.status&&1===o)try{const t=window.localStorage.getItem("evergis-refresh-token");if(t){var s;const e=await u.account.refreshToken({refreshToken:t});e&&(window.localStorage.setItem("evergis-jwt-token",e.token),window.localStorage.setItem("evergis-refresh-token",e.refreshToken)),null==(s=n.headers)||s.set("Authorization","Bearer "+(e.token||""))}}catch(r){throw new Error("Failed to refresh token")}}],afterResponse:[(t,n,r)=>{const o=Xe[null==r?void 0:r.status];return o&&u.emit(o,$t(new e.HTTPError(r,t,n))),r},...(null==m?void 0:m.afterResponse)||[]]})})),u.url=i,u.wsUrl=c||i,u.urlPath=v||u.defineUrlPath(),u.layers=new Yt(u.http),u.tables=new Me(u.http),u.projects=new ke(u.http),u.resources=new Te(u.projects,u.layers,u.tables),u.account=new F(u.http),u.accountPreview=new W(u.http),u.bulk=new G(u.http),u.security=new Ie(u.http,u.account),u.notification=new ae(u.http,u,l),u.file=new yt(u.http),u.filters=new gt(u.http),u.import=new Ct(u.http),u.geocode=new Tt(u.http),u.tools=new qe(u.http),u.clientSettings=new ot(u.http),u.portalSettings=new pe(u.http),u.statistic=new Le(u.http),u.feedback=new pt(u.http),u.vectorTiles=new Je(u.http),u.spatialReference=new P(u.http),u.eql=new ct(u.http),u.catalog=new I(u.http),u.queryToken=new j(u.http),u.dataSource=new x(u.http),u.remoteTaskManager=new Se(u.http),u.cameras=new tt(u.http),u.names=new ue({account:u.account}),u.snappingHub=p?(new r.HubConnectionBuilder).withUrl(p,{withCredentials:!0,skipNegotiation:!0,transport:r.HttpTransportType.WebSockets}).withAutomaticReconnect().build():null,u}return l(n,E),c(n,[{key:"init",value:async function(t){let{authParams:e,authQueryParams:n,connectWs:r,fetchSettings:o,fetchUser:u,useJwt:s}=t;try{await this.account.login(e,n,s),u&&await this.account.fetchCurrentUser(),r&&await this.connectWs(),o&&await this.clientSettings.fetchClientSettings({urlPath:ne(this.urlPath)}),await this.notification.subscribe("service_update")}catch(t){throw $t(t)}}},{key:"isAcceptedNetwork",value:function(t){return["vk","google","facebook"].includes(t)}},{key:"socAuthLogin",value:async function(t){if(this.isAcceptedNetwork(t))try{await this.clientSettings.fetchClientSettings({urlPath:exports.UrlPath.Base})}catch(t){throw $t(t)}}},{key:"connectWs",value:async function(){this.account.isAuth&&(this.notification.connectWs(this.wsUrl),this.notification.on("ConnectionStatus",t=>{t.data===exports.ConnectionStatus.Lost?this.emit(exports.ApiEvent.ConnectionLost,t.data):t.data===exports.ConnectionStatus.SessionClosed&&this.emit(exports.ApiEvent.SessionClosed,t.data)}))}},{key:"connectSignalR",value:async function(){this.account.isAuth&&this.snappingHub&&this.snappingHub.state!==r.HubConnectionState.Connected&&await this.snappingHub.start()}},{key:"logout",value:async function(){await this.account.logout(),await this.security.reset(),this.emit(exports.ApiEvent.Unauthorized,null)}},{key:"defineUrlPath",value:function(){const t=(window.location.href.split(window.location.hostname)[1]||"").split("/").filter(Boolean)[0],e=t?"/"+t:void 0;return e&&Ye.includes(e)?e:Ze}},{key:"isShared",get:function(){return this.urlPath===exports.UrlPath.Shared}},{key:"isPresentation",get:function(){return this.urlPath===exports.UrlPath.Presentation||"8082"===window.location.port}}])}();var tn,en,nn,rn,on,un,sn,cn,an,ln,fn,pn,hn,yn,dn,vn,kn,gn,mn,Rn,xn,bn,Sn,jn,Tn,Pn,wn,In,Cn,En,Bn;(tn=exports.AccessMode||(exports.AccessMode={})).Shared="Shared",tn.Public="Public",tn.My="My",(en=exports.AggregationFunction||(exports.AggregationFunction={})).None="None",en.Array="Array",en.Min="Min",en.Max="Max",en.Avg="Avg",en.Sum="Sum",en.Extent="Extent",en.H3="H3",en.Count="Count",en.TotalCount="TotalCount",en.DistinctCount="DistinctCount",en.First="First",en.Last="Last",en.Median="Median",en.Mod="Mod",en.StdDeviation="StdDeviation",en.SumOfProduct="SumOfProduct",en.OnlyValue="OnlyValue",en.WeightedAvg="WeightedAvg",en.DensityIndicators="DensityIndicators",en.DividedSum="DividedSum",(nn=exports.AttributeIconType||(exports.AttributeIconType={})).Unknown="Unknown",nn.Icon="Icon",nn.PNG="PNG",nn.SVG="SVG",(rn=exports.AttributeSelectorType||(exports.AttributeSelectorType={})).None="None",rn.SelectFromHandBook="SelectFromHandBook",rn.SelectFromRange="SelectFromRange",rn.ViewHandBook="ViewHandBook",(on=exports.AttributeType||(exports.AttributeType={})).Unknown="Unknown",on.String="String",on.Int32="Int32",on.Int64="Int64",on.Double="Double",on.DateTime="DateTime",on.Boolean="Boolean",on.Point="Point",on.Polyline="Polyline",on.MultiPolygon="MultiPolygon",on.Multipoint="Multipoint",on.H3Index="H3Index",on.Json="Json",(un=exports.AuthorizationGrant||(exports.AuthorizationGrant={})).AuthorizationCode="authorization_code",un.RefreshToken="refresh_token",(sn=exports.CatalogResourceType||(exports.CatalogResourceType={})).Directory="Directory",sn.Map="Map",sn.Layer="Layer",sn.Table="Table",sn.File="File",sn.TaskPrototype="TaskPrototype",sn.DataSource="DataSource",(cn=exports.ClassificationType||(exports.ClassificationType={})).None="none",cn.NaturalBreaks="naturalBreaks",cn.EqualInterval="equalInterval",cn.Quantile="quantile",cn.Unique="unique",cn.Step="step",(an=exports.ClassifyAttributeType||(exports.ClassifyAttributeType={})).Decimal="decimal",an.DateTime="dateTime",an.Text="text",(ln=exports.ConfigurationErrorEnum||(exports.ConfigurationErrorEnum={})).Unknown="Unknown",ln.SerializeError="SerializeError",ln.InvalidDataService="InvalidDataService",ln.InvalidConfiguration="InvalidConfiguration",ln.InvalidDataServiceName="InvalidDataServiceName",ln.InvalidTableName="InvalidTableName",ln.InvalidLayerName="InvalidLayerName",ln.ResourceNotFound="ResourceNotFound",ln.InvalidCondition="InvalidCondition",ln.InvalidAttributes="InvalidAttributes",ln.InvalidIdAttribute="InvalidIdAttribute",ln.InvalidGeometryAttribute="InvalidGeometryAttribute",ln.InvalidGeometryAttributeType="InvalidGeometryAttributeType",ln.InvalidColumnName="InvalidColumnName",ln.InvalidIdColumnSettings="InvalidIdColumnSettings",ln.ColumnNotExistsInTable="ColumnNotExistsInTable",ln.InvalidStyle="InvalidStyle",ln.InvalidLayerType="InvalidLayerType",ln.ColumnLoadingError="ColumnLoadingError",ln.InvalidAttributeFormat="InvalidAttributeFormat",ln.DataSourceNotFound="DataSourceNotFound",ln.DuplicateColumns="DuplicateColumns",ln.DuplicateAttributes="DuplicateAttributes",ln.TableWithoutColumns="TableWithoutColumns",ln.InvalidTableReferenceConfiguration="InvalidTableReferenceConfiguration",(fn=exports.ConfigurationType||(exports.ConfigurationType={})).Default="Default",fn.DevConfiguration="DevConfiguration",(pn=exports.DataSourceType||(exports.DataSourceType={})).Postgres="Postgres",pn.Trino="Trino",pn.S3="S3",pn.GisServer="GisServer",pn.Spark="Spark",(hn=exports.ErrorDetailsType||(exports.ErrorDetailsType={})).ResourceLimitExceeded="ResourceLimitExceeded",hn.ResourceNotFound="ResourceNotFound",hn.InternalError="InternalError",hn.BadRequest="BadRequest",hn.DuplicateContent="DuplicateContent",(yn=exports.ErrorType||(exports.ErrorType={})).NotSpecified="NotSpecified",yn.LimitError="LimitError",yn.ValidationError="ValidationError",yn.JwtExpired="JwtExpired",yn.TokenInvalid="TokenInvalid",yn.RefreshTokenExpired="RefreshTokenExpired",yn.RefreshTokenInvalid="RefreshTokenInvalid",yn.CreateUserFailed="CreateUserFailed",yn.SetUserPasswordFailed="SetUserPasswordFailed",yn.SetUserRoleFailed="SetUserRoleFailed",yn.UpdateUserFailed="UpdateUserFailed",yn.RemoveUserFailed="RemoveUserFailed",yn.CreateRoleFailed="CreateRoleFailed",yn.UpdateRoleFailed="UpdateRoleFailed",yn.RemoveUserRoleFailed="RemoveUserRoleFailed",yn.ChangeActiveStateFailed="ChangeActiveStateFailed",yn.RemoveRoleFailed="RemoveRoleFailed",yn.UserNotFound="UserNotFound",yn.RoleNotFound="RoleNotFound",yn.EmailNotConfirmed="EmailNotConfirmed",yn.DuplicateEmailError="DuplicateEmailError",yn.InvalidPassword="InvalidPassword",yn.RoleExists="RoleExists",yn.UserExists="UserExists",yn.UserLockedError="UserLockedError",yn.InvalidEmail="InvalidEmail",yn.InvalidUsername="InvalidUsername",yn.Unauthorized="Unauthorized",yn.EmailNotChanged="EmailNotChanged",yn.EmailNotSet="EmailNotSet",(dn=exports.GeometryType||(exports.GeometryType={})).Unknown="unknown",dn.Point="point",dn.Polyline="polyline",dn.Polygon="multipolygon",dn.Envelope="envelope",dn.Multipoint="multipoint",(vn=exports.Group||(exports.Group={})).My="my",vn.Role="role",vn.Public="public",vn.All="all",(kn=exports.PbfSchema||(exports.PbfSchema={})).XYZ="xyz",kn.TMS="tms",(gn=exports.Permissions||(exports.Permissions={})).None="none",gn.Configure="configure",gn.Write="write",gn.Read="read",gn.ReadConfigure="read,configure",gn.ReadWrite="read,write",gn.All="read,write,configure",(mn=exports.PolicyType||(exports.PolicyType={})).Unknown="Unknown",mn.CreateTable="CreateTable",mn.CreateLayer="CreateLayer",mn.CreateProject="CreateProject",mn.MaxFeaturesInOneTable="MaxFeaturesInOneTable",mn.MaxObjectsToExport="MaxObjectsToExport",mn.MaxUploadContentSize="MaxUploadContentSize",mn.MaxEqlQueryParametersValues="MaxEqlQueryParametersValues",(Rn=exports.Quality||(exports.Quality={})).Low="Low",Rn.Medium="Medium",Rn.High="High",(xn=exports.RemoteTaskStatus||(exports.RemoteTaskStatus={})).Init="Init",xn.Process="Process",xn.Completed="Completed",xn.Interrupted="Interrupted",xn.Error="Error",xn.Timeout="Timeout",xn.Waiting="Waiting",xn.InQueue="InQueue",xn.Unknown="Unknown",(bn=exports.ResourceSubTypeFilter||(exports.ResourceSubTypeFilter={})).RemoteTileService="RemoteTileService",bn.ProxyService="ProxyService",bn.QueryLayerService="QueryLayerService",bn.TileCatalogTable="TileCatalogTable",(Sn=exports.ResourceType||(exports.ResourceType={})).Unknown="Unknown",Sn.Table="table",Sn.Layer="layer",Sn.Project="project",Sn.File="file",Sn.Feature="feature",Sn.Tag="tag",Sn.DataSource="datasource",(jn=exports.ResourceTypeFilter||(exports.ResourceTypeFilter={})).Map="Map",jn.Layer="Layer",jn.Table="Table",jn.RasterCatalog="RasterCatalog",jn.ProxyService="ProxyService",jn.RemoteTileService="RemoteTileService",jn.File="File",jn.DataSource="DataSource",jn.TaskPrototype="TaskPrototype",(Tn=exports.ResourceTypeLink||(exports.ResourceTypeLink={})).Table="tables",Tn.Layer="layers",Tn.Project="projects",(Pn=exports.ResponseType||(exports.ResponseType={})).Code="code",Pn.Token="token",(wn=exports.SimplifyType||(exports.SimplifyType={})).Basic="Basic",wn.PreserveTopology="PreserveTopology",wn.VW="VW",(In=exports.StringSubType||(exports.StringSubType={})).None="None",In.Image="Image",In.PkkCode="PkkCode",In.Attachments="Attachments",(Cn=exports.TaskResourceSubType||(exports.TaskResourceSubType={})).SpTask="SpTask",Cn.PythonTask="PythonTask",(En=exports.WorkerMethodType||(exports.WorkerMethodType={})).Task="Task",En.Rest="Rest",En.Both="Both",(Bn=exports.WorkerSettingsFieldType||(exports.WorkerSettingsFieldType={})).Int32="Int32",Bn.Int64="Int64",Bn.Double="Double",Bn.String="String",Bn.Boolean="Boolean",Bn.DateTime="DateTime",Bn.Point="Point",Bn.Geometry="Geometry",Bn.Polyline="Polyline",Bn.MultiPolygon="MultiPolygon",Bn.Polygon="Polygon",Bn.Multipoint="Multipoint",Bn.IntergerArray="IntergerArray",Bn.DoubleArray="DoubleArray",Bn.StringArray="StringArray",Bn.SourceEql="SourceEql",Bn.Layer="Layer",Bn.Table="Table",Bn.Folder="Folder",Bn.Json="Json",Bn.Attribute="Attribute",Bn.AttributeArray="AttributeArray",Object.defineProperty(exports,"HTTPError",{enumerable:!0,get:function(){return e.HTTPError}}),Object.defineProperty(exports,"TimeoutError",{enumerable:!0,get:function(){return e.TimeoutError}}),exports.Account=F,exports.AccountPreview=W,exports.Api=$e,exports.BulkOperations=G,exports.Cameras=tt,exports.ClientSettings=ot,exports.Eql=ct,exports.Feedback=pt,exports.FileUpload=yt,exports.Filters=gt,exports.GEOCODE_PROVIDER="geocode2gis",exports.Geocode=Tt,exports.HttpClient=d,exports.Import=Ct,exports.Layers=Yt,exports.Names=ue,exports.Notification=ae,exports.NotificationEvent=le,exports.PortalSettings=pe,exports.Projects=ke,exports.RemoteTaskManager=Se,exports.Resources=Te,exports.STORAGE_REFRESH_TOKEN_KEY="evergis-refresh-token",exports.STORAGE_TOKEN_KEY="evergis-jwt-token",exports.Security=Ie,exports.Statistic=Le,exports.Tables=Me,exports.Tools=qe,exports.VectorTiles=Je,exports.addSubDomainToLocation=t=>window.location.protocol+"//"+t+"."+window.location.host,exports.errorHandler=$t,exports.formDataFromFile=function(t){const e=new FormData;return e.append("file",t),e},exports.generateId=oe,exports.getFetchingUrlPath=ne,exports.isHTTPError=t=>te(t)&&"http"===t.type,exports.isHandledError=te,exports.isProjectContentItems=function(t){return null!=t},exports.isString=ee,exports.isTileLayerService=function(t){return t.type&&/TileService/.test(t.type)},exports.parseJwt=t=>{const e=t.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=decodeURIComponent(atob(e).split("").map(t=>"%"+"00".concat(t.charCodeAt(0).toString(16)).slice(-2)).join(""));return JSON.parse(n)},exports.promiseAllIgnoreErrors=Vt,exports.stripUselessSlashes=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return e.join("/").split("/").filter(Boolean).join("/")},exports.toFormData=g,exports.unique=re;
|
|
2
2
|
//# sourceMappingURL=api.cjs.production.min.js.map
|