@evergis/api 4.0.22 → 4.0.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- "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,o=require("@microsoft/signalr"),s=require("query-string"),i=require("nanoid");function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(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 l(e,t,n){return t&&a(e.prototype,t),n&&a(e,n),e}function c(){return(c=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,o={},s=Object.keys(e);for(r=0;r<s.length;r++)t.indexOf(n=s[r])>=0||(o[n]=e[n]);return o}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 o=h(this).constructor;n=Reflect.construct(r,arguments,o)}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 o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}let g=function(){function e(t){var n;void 0===t&&(t={}),u(this,e),this.ky=r.extend(t),this.prefixUrl=(null==(n=t.prefixUrl)?void 0:n.toString())||""}return l(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:x(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?"?"+x(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:x(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 x(e){return void 0===e&&(e={}),s.stringify(e,{arrayFormat:"comma"})}function b(e){return e instanceof FormData?e:Object.keys(e).reduce((t,n)=>(t.append(n,e[n]),t),new FormData)}let S=l((function e(t){u(this,e),this.http=t})),T=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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 u(this,n),t.apply(this,arguments)}return l(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 u(this,n),t.apply(this,arguments)}return l(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 u(this,n),t.apply(this,arguments)}return l(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",b(e)).json()}},{key:"createFile1",value:function(e){return this.http.post("/resources/file",b(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 u(this,n),t.apply(this,arguments)}return l(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",b(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",b(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",b(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(c({},t,e)))}else localStorage.removeItem("@evergis/user-info")};let F=function(e){p(n,C);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"login",value:async function(e,t,r){if(void 0===t&&(t={}),void 0===r&&(r=!1),e){const o=await k(h(n.prototype),"authenticate",this).call(this,t,e);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 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,c({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}(),U=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getPreview",value:function(){return this.http.createUrl("/account/user/preview")}},{key:"uploadPreview",value:function(e){return this.http.post("/account/user/preview",b(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,b(t)).json()}},{key:"deletePreview1",value:function(e){return this.http.delete("/account/user/preview/"+e,null).then(()=>{})}}]),n}(),A=function(e){p(n,U);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),D=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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 u(this,n),t.apply(this,arguments)}return l(n)}(),O=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),M=function(e){p(n,O);var t=d(n);function n(){var e;return u(this,n),(e=t.apply(this,arguments)).settings={modules:[],connection:{url:""}},e}return l(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}(),B=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),q=function(e){p(n,B);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),W=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"increaseResourcesLimit",value:function(e){return this.http.post("/feedback/limits",null,e).json()}},{key:"moreSymbols",value:function(e){return this.http.post("/feedback/symbol",null,e).json()}},{key:"feedback",value:function(e,t){return this.http.post("/feedback",b(t),e).json()}}]),n}(),_=function(e){p(n,W);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"postFeedback",value:function(e,t){return this.feedback(e,t)}}]),n}(),H=function(e){p(n,R);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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 u(this,n),t.apply(this,arguments)}return l(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}(),G=function(e){p(n,z);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const V=["providerName"],Q=["providerName"],J=["providerName"];let K=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"geocode",value:function(e){let{providerName:t}=e,n=y(e,V);return this.http.get("/geocode/"+t,n).json()}},{key:"geocodeByPoint",value:function(e){let{providerName:t}=e,n=y(e,Q);return this.http.get("/geocode/"+t+"/geocodeByPoint",n).json()}},{key:"suggest",value:function(e){let{providerName:t}=e,n=y(e,J);return this.http.get("/geocode/"+t+"/suggest",n).json()}}]),n}(),X=function(e){p(n,K);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"geocode2Gis",value:function(e){return this.geocode(c({providerName:"geocode2gis"},e))}},{key:"suggest2Gis",value:function(e){return this.suggest(c({providerName:"geocode2gis"},e))}}]),n}(),Y=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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).then(()=>{})}},{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}(),Z=function(e){p(n,Y);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const $=["name"],ee=["name"],te=["name","id"],ne=["name","x","y","z"],re=["name","x","y","z","format"],oe=["name","x","y","z","dpi","format"],se=["name"],ie=["name"],ue=["name"],ae=["name"],le=["name"],ce=["name"],pe=["name"],he=["layerName"],ye=["name","id"];let fe=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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,$);return this.http.get("/layers/"+t+"/features",n).json()}},{key:"deleteFeature",value:function(e){let{name:t}=e,n=y(e,ee);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,te);return this.http.get("/layers/"+t+"/features/"+n,r).json()}},{key:"getTilesLayerImage",value:function(e){let{name:t,x:n,y:r,z:o}=e,s=y(e,ne);return this.http.createUrl("/layers/"+t+"/tile/"+o+"/"+n+"/"+r,s)}},{key:"getTilesLayerImage1",value:function(e){let{name:t,x:n,y:r,z:o,format:s}=e,i=y(e,re);return this.http.createUrl("/layers/"+t+"/tile/"+o+"/"+n+"/"+r+"."+s,i)}},{key:"getTilesLayerImageWithFormatAndDpi",value:function(e){let{name:t,x:n,y:r,z:o,dpi:s,format:i}=e,u=y(e,oe);return this.http.createUrl("/layers/"+t+"/tile/"+o+"/"+n+"/"+r+"@"+s+"x."+i,u)}},{key:"getLayerExtent",value:function(e){let{name:t}=e,n=y(e,se);return this.http.get("/layers/"+t+"/extent",n).json()}},{key:"deleteFeatures",value:function(e){let{name:t}=e,n=y(e,ie);return this.http.delete("/layers/"+t+"/features/deleteByIds",null,n).json()}},{key:"deleteByCondition",value:function(e){let{name:t}=e,n=y(e,ue);return this.http.delete("/layers/"+t+"/features/deleteByCondition",null,n).json()}},{key:"classify",value:function(e){let{name:t}=e,n=y(e,ae);return this.http.get("/layers/"+t+"/classify",n).json()}},{key:"distincts",value:function(e){let{name:t}=e,n=y(e,le);return this.http.get("/layers/"+t+"/distincts",n).json()}},{key:"aggregateAttribute",value:function(e){let{name:t}=e,n=y(e,ce);return this.http.get("/layers/"+t+"/aggregate-values",n).json()}},{key:"getFilteredFeaturesCount1",value:function(e){let{name:t}=e,n=y(e,pe);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,he);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,ye);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 ve(e){return(await Promise.all(e.map(e=>e.catch(e=>de(e)?e:new Error(e))))).filter(ke)}function de(e){return e instanceof Error}function ke(e){return!de(e)}let ge=function(e){p(n,fe);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getLayerInfos",value:function(e){return ve(e.map(e=>this.getLayerInfo(e)))}},{key:"getLayersDeps",value:function(e){return ve(e.map(e=>this.getResourceDependencies(e)))}},{key:"getBasemaps",value:function(e){return this.getLayersList(c({},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 me;(me=exports.ErrorReason||(exports.ErrorReason={})).HTTP_OTHER="other",me.HTTP_CLIENT="client",me.HTTP_SERVER="server",me.UNKNOWN="unknown";const xe=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),be=e=>e&&e.type&&e.reason;function Se(e){return"string"==typeof e}const Te=e=>e===exports.UrlPath.Presentation?exports.UrlPath.Base:e;function je(e,t,n){return n.indexOf(e)===t}const we=i.customAlphabet("abcdefghijklmnopqrstuvwxyz0123456789",12);(exports.ResourceSeparator||(exports.ResourceSeparator={})).Server=".";let Pe=function(){function e(t){let{account:n}=t;u(this,e),this.account=n}return l(e,[{key:"createId",value:function(){return we()}},{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(c({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}(),Re=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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 Ie;(Ie=exports.ConnectionStatus||(exports.ConnectionStatus={})).Initialized="Initialized",Ie.Connected="Connected",Ie.Break="Break",Ie.Lost="Lost",Ie.SessionClosed="SessionClosed";let Ce=function(e){p(r,Re);var n=d(r);function r(e,o,s){var i;return void 0===s&&(s=!1),u(this,r),(i=n.call(this,e)).api=o,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 Ee(n))}},i.emitter=new t.EventEmitter,i.keepAlive=s,i}return l(r,[{key:"connectStatus",get:function(){return this._connectStatus},set:function(e){this.emitter.emit("ConnectionStatus",new Ee(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}(),Ee=l((function e(t){u(this,e),this.data=t})),Le=function(e){p(n,O);var t=d(n);function n(){var e;return u(this,n),(e=t.apply(this,arguments)).config=null,e}return l(n,[{key:"fetchPortalSettings",value:async function(e){return this.config=JSON.parse(await this.getConfiguration(e)),this.config}}]),n}();const Fe=["name"];let Ue=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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,Fe);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,o){return this.http.createUrl("/projects/"+e+"/tile/"+r+"/"+t+"/"+n+"."+o)}},{key:"getTilesLayerImageWithFormatAndDpi",value:function(e,t,n,r,o,s){return this.http.createUrl("/projects/"+e+"/tile/"+r+"/"+t+"/"+n+"@"+o+"x."+s)}},{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}(),Ae=function(e){p(n,Ue);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getProjectInfos",value:function(e){return ve(e.map(e=>this.getProjectInfo(e)))}},{key:"getProjectsDeps",value:function(e){return ve(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 De=["id"],Ne=["id"];let Oe=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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,De);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,Ne);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}(),Me=function(e){p(n,Oe);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();var Be;(Be=exports.DependencyType||(exports.DependencyType={})).Layer="Layer",Be.Table="Table",Be.Project="Project";let qe=function(){function e(t,n,r){u(this,e),this.projects=t,this.layers=n,this.tables=r}return l(e,[{key:"getProjectInfosWithDeps",value:async function(e){const t=await this.projects.getProjectInfos(e),n=await this.projects.getProjectsDeps(e),{layers:r,tables:o}=await this.getDependencies(n,!0,!0);return{projects:t,deps:{layers:r,tables:o}}}},{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:o}=e.reduce((e,r)=>{const o=r.dependencies||[];if(t){const t=this.getDependentNames(o,exports.DependencyType.Layer);e.layers.push(...t)}if(n){const t=this.getDependentNames(o,exports.DependencyType.Table);e.tables.push(...t)}return e},{tables:[],layers:[]});return{tables:await this.tables.getTableInfos(r.filter(je)),layers:await this.layers.getLayerInfos(o.filter(je))}}},{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(Se)}}]),e}(),We=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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}(),_e=function(e){p(n,We);var t=d(n);function n(e,r){var o;let{username:s,roles:i}=r;return u(this,n),(o=t.call(this,e)).ownerName="",o.ownerRoles=[],o.ownerName=s,o.ownerRoles=i,o}return l(n,[{key:"reset",value:function(){this.ownerName="",this.ownerRoles=[]}}]),n}(),He=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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,He);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getStatistic",value:function(e){return this.statisticsDb(e)}},{key:"getClassify",value:function(e){return this.classify(e)}}]),n}();const Ge=["name"],Ve=["name"],Qe=["name"];let Je=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(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,Ge);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,Ve);return this.http.patch("/tables/"+n+"/data",t,r).then(()=>{})}},{key:"deleteTableData",value:function(e){let{name:t}=e,n=y(e,Qe);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}(),Ke=function(e){p(n,Je);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getTableInfos",value:function(e){return ve(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}(),Xe=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}(),Ye=function(e){p(n,Xe);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n)}();const Ze=["name","z","x","y"];let $e=function(e){p(n,S);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getVectorTile",value:function(e){let{name:t,z:n,x:r,y:o}=e,s=y(e,Ze);return this.http.get("/vt/"+t+"/"+n+"/"+r+"/"+o+".pbf",s).then(()=>{})}}]),n}(),et=function(e){p(n,$e);var t=d(n);function n(){return u(this,n),t.apply(this,arguments)}return l(n,[{key:"getVt",value:function(e,t,n,r){return this.getVectorTile({name:e,z:t,x:n,y:r})}}]),n}();var tt;(tt=exports.UrlPath||(exports.UrlPath={})).Base="/map",tt.Shared="/shared",tt.Presentation="/presentation",tt.Portal="/portal";const nt={401:exports.ApiEvent.Unauthorized},rt=Object.values(exports.UrlPath),ot=rt[0];let st=function(e){p(s,t.EventEmitter);var r=d(s);function s(e){var t,i;let{url:a,wsUrl:l,wsKeepAlive:p,snappingHubUrl:h,http:y,urlPath:v,httpOptions:d}=e;u(this,s),i=r.call(this);const{hooks:k}=d||{};return i.http=y||new g(c({prefixUrl:a,timeout:!1,retry:{methods:["get","post","delete"],limit:5,statusCodes:[401]}},d||{},{hooks:c({},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:o}=e;if(r instanceof n.HTTPError&&401===r.response.status&&1===o)try{const e=window.localStorage.getItem("evergis-refresh-token");if(e){var s;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==(s=t.headers)||s.set("Authorization","Bearer "+(n.token||""))}}catch(r){throw new Error("Failed to refresh token")}}],afterResponse:[(e,t,r)=>{const o=nt[null==r?void 0:r.status];return o&&i.emit(o,xe(new n.HTTPError(r,e,t))),r},...(null==k?void 0:k.afterResponse)||[]]})})),i.url=a,i.wsUrl=l||a,i.urlPath=v||i.defineUrlPath(),i.layers=new ge(i.http),i.tables=new Ke(i.http),i.projects=new Ae(i.http),i.resources=new qe(i.projects,i.layers,i.tables),i.account=new F(i.http),i.accountPreview=new A(i.http),i.bulk=new N(i.http),i.security=new _e(i.http,i.account),i.notification=new Ce(i.http,f(i),p),i.file=new H(i.http),i.filters=new G(i.http),i.import=new Z(i.http),i.geocode=new X(i.http),i.tools=new Ye(i.http),i.clientSettings=new M(i.http),i.portalSettings=new Le(i.http),i.statistic=new ze(i.http),i.feedback=new _(i.http),i.vectorTiles=new et(i.http),i.spatialReference=new P(i.http),i.eql=new q(i.http),i.catalog=new R(i.http),i.queryToken=new w(i.http),i.dataSource=new T(i.http),i.remoteTaskManager=new Me(i.http),i.names=new Pe({account:i.account}),i.snappingHub=h?(new o.HubConnectionBuilder).withUrl(h,{withCredentials:!0,skipNegotiation:!0,transport:o.HttpTransportType.WebSockets}).withAutomaticReconnect().build():null,i}return l(s,[{key:"init",value:async function(e){let{authParams:t,authQueryParams:n,connectWs:r,fetchSettings:o,fetchUser:s,useJwt:i}=e;try{await this.account.login(t,n,i),s&&await this.account.fetchCurrentUser(),r&&await this.connectWs(),o&&await this.clientSettings.fetchClientSettings({urlPath:Te(this.urlPath)}),await this.notification.subscribe("service_update")}catch(e){throw xe(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 xe(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!==o.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&&rt.includes(t)?t:ot}},{key:"isShared",get:function(){return this.urlPath===exports.UrlPath.Shared}},{key:"isPresentation",get:function(){return this.urlPath===exports.UrlPath.Presentation||"8082"===window.location.port}}]),s}();var it,ut,at,lt,ct,pt,ht,yt,ft,vt,dt,kt,gt,mt,xt,bt,St,Tt,jt,wt,Pt,Rt,It,Ct,Et,Lt,Ft,Ut,At,Dt,Nt,Ot,Mt,Bt,qt,Wt;(it=exports.AggregationFunction||(exports.AggregationFunction={})).None="None",it.Array="Array",it.Min="Min",it.Max="Max",it.Avg="Avg",it.Sum="Sum",it.Extent="Extent",it.H3="H3",it.Count="Count",it.TotalCount="TotalCount",it.DistinctCount="DistinctCount",it.First="First",it.Last="Last",it.Median="Median",it.Mod="Mod",it.StdDeviation="StdDeviation",it.SumOfProduct="SumOfProduct",it.OnlyValue="OnlyValue",it.WeightedAvg="WeightedAvg",it.DensityIndicators="DensityIndicators",it.DividedSum="DividedSum",(ut=exports.AttributeIconType||(exports.AttributeIconType={})).Unknown="Unknown",ut.Icon="Icon",ut.PNG="PNG",ut.SVG="SVG",(at=exports.AttributeSelectorType||(exports.AttributeSelectorType={})).None="None",at.SelectFromHandBook="SelectFromHandBook",at.SelectFromRange="SelectFromRange",at.ViewHandBook="ViewHandBook",(lt=exports.AttributeType||(exports.AttributeType={})).Unknown="Unknown",lt.String="String",lt.Int32="Int32",lt.Int64="Int64",lt.Double="Double",lt.DateTime="DateTime",lt.Boolean="Boolean",lt.Point="Point",lt.Polyline="Polyline",lt.MultiPolygon="MultiPolygon",lt.Multipoint="Multipoint",lt.H3Index="H3Index",lt.Json="Json",(ct=exports.AuthorizationGrant||(exports.AuthorizationGrant={})).AuthorizationCode="authorization_code",ct.RefreshToken="refresh_token",(pt=exports.CatalogResourceType||(exports.CatalogResourceType={})).Directory="Directory",pt.Map="Map",pt.Layer="Layer",pt.Table="Table",pt.File="File",pt.TaskPrototype="TaskPrototype",pt.DataSource="DataSource",(ht=exports.ClassificationType||(exports.ClassificationType={})).None="none",ht.NaturalBreaks="naturalBreaks",ht.EqualInterval="equalInterval",ht.Quantile="quantile",ht.Unique="unique",ht.Step="step",(yt=exports.ClassifyAttributeType||(exports.ClassifyAttributeType={})).Decimal="decimal",yt.DateTime="dateTime",yt.Text="text",(ft=exports.ConfigurationErrorEnum||(exports.ConfigurationErrorEnum={})).Unknown="Unknown",ft.SerializeError="SerializeError",ft.InvalidDataService="InvalidDataService",ft.InvalidConfiguration="InvalidConfiguration",ft.InvalidDataServiceName="InvalidDataServiceName",ft.InvalidTableName="InvalidTableName",ft.InvalidLayerName="InvalidLayerName",ft.ResourceNotFound="ResourceNotFound",ft.InvalidCondition="InvalidCondition",ft.InvalidAttributes="InvalidAttributes",ft.InvalidIdAttribute="InvalidIdAttribute",ft.InvalidGeometryAttribute="InvalidGeometryAttribute",ft.InvalidGeometryAttributeType="InvalidGeometryAttributeType",ft.InvalidColumnName="InvalidColumnName",ft.InvalidIdColumnSettings="InvalidIdColumnSettings",ft.ColumnNotExistsInTable="ColumnNotExistsInTable",ft.InvalidStyle="InvalidStyle",ft.InvalidLayerType="InvalidLayerType",ft.ColumnLoadingError="ColumnLoadingError",ft.InvalidAttributeFormat="InvalidAttributeFormat",ft.DataSourceNotFound="DataSourceNotFound",ft.DuplicateColumns="DuplicateColumns",ft.DuplicateAttributes="DuplicateAttributes",ft.TableWithoutColumns="TableWithoutColumns",ft.InvalidTableReferenceConfiguration="InvalidTableReferenceConfiguration",(vt=exports.DataSourceType||(exports.DataSourceType={})).Postgres="Postgres",vt.Trino="Trino",vt.S3="S3",vt.GisServer="GisServer",(dt=exports.ErrorDetailsType||(exports.ErrorDetailsType={})).ResourceLimitExceeded="ResourceLimitExceeded",dt.ResourceNotFound="ResourceNotFound",dt.InternalError="InternalError",dt.BadRequest="BadRequest",dt.DuplicateContent="DuplicateContent",(kt=exports.ErrorType||(exports.ErrorType={})).NotSpecified="NotSpecified",kt.LimitError="LimitError",kt.ValidationError="ValidationError",kt.JwtExpired="JwtExpired",kt.TokenInvalid="TokenInvalid",kt.RefreshTokenExpired="RefreshTokenExpired",kt.RefreshTokenInvalid="RefreshTokenInvalid",kt.CreateUserFailed="CreateUserFailed",kt.SetUserPasswordFailed="SetUserPasswordFailed",kt.SetUserRoleFailed="SetUserRoleFailed",kt.UpdateUserFailed="UpdateUserFailed",kt.RemoveUserFailed="RemoveUserFailed",kt.CreateRoleFailed="CreateRoleFailed",kt.UpdateRoleFailed="UpdateRoleFailed",kt.RemoveUserRoleFailed="RemoveUserRoleFailed",kt.ChangeActiveStateFailed="ChangeActiveStateFailed",kt.RemoveRoleFailed="RemoveRoleFailed",kt.UserNotFound="UserNotFound",kt.RoleNotFound="RoleNotFound",kt.EmailNotConfirmed="EmailNotConfirmed",kt.DuplicateEmailError="DuplicateEmailError",kt.InvalidPassword="InvalidPassword",kt.RoleExists="RoleExists",kt.UserExists="UserExists",kt.UserLockedError="UserLockedError",kt.InvalidEmail="InvalidEmail",kt.InvalidUsername="InvalidUsername",kt.Unauthorized="Unauthorized",kt.EmailNotChanged="EmailNotChanged",kt.EmailNotSet="EmailNotSet",(gt=exports.FontStyle||(exports.FontStyle={})).Normal="normal",gt.Oblique="oblique",gt.Italic="italic",(mt=exports.FontWeight||(exports.FontWeight={})).Thin="Thin",mt.ExtraLight="ExtraLight",mt.Light="Light",mt.SemiLight="SemiLight",mt.Normal="Normal",mt.Medium="Medium",mt.DemiBold="DemiBold",mt.Bold="Bold",mt.ExtraBold="ExtraBold",mt.Black="Black",mt.ExtraBlack="ExtraBlack",(xt=exports.GeometryType||(exports.GeometryType={})).Unknown="unknown",xt.Point="point",xt.Polyline="polyline",xt.Polygon="multipolygon",xt.Envelope="envelope",xt.Multipoint="multipoint",(bt=exports.Group||(exports.Group={})).My="my",bt.Role="role",bt.Public="public",bt.All="all",(St=exports.LineCapStyle||(exports.LineCapStyle={})).Flat="Flat",St.Square="Square",St.Round="Round",St.Triangle="Triangle",(Tt=exports.LineEndingType||(exports.LineEndingType={})).None="none",Tt.Arrow="arrow",Tt.FilledArrow="filledArrow",Tt.Square="square",Tt.FilledSquare="filledSquare",Tt.Circle="circle",Tt.FilledCircle="filledCircle",Tt.Diamond="diamond",Tt.FilledDiamond="filledDiamond",Tt.RoundSquare="roundSquare",Tt.FilledRoundSquare="filledRoundSquare",Tt.Svg="svg",(jt=exports.LineJoinType||(exports.LineJoinType={})).Miter="Miter",jt.Bevel="Bevel",jt.Round="Round",(wt=exports.OwnerFilter||(exports.OwnerFilter={})).My="My",wt.Shared="Shared",wt.Public="Public",(Pt=exports.PbfSchema||(exports.PbfSchema={})).XYZ="xyz",Pt.TMS="tms",(Rt=exports.Permissions||(exports.Permissions={})).None="none",Rt.Configure="configure",Rt.Write="write",Rt.Read="read",Rt.ReadConfigure="read,configure",Rt.ReadWrite="read,write",Rt.All="read,write,configure",(It=exports.PolicyType||(exports.PolicyType={})).Unknown="Unknown",It.CreateTable="CreateTable",It.CreateLayer="CreateLayer",It.CreateProject="CreateProject",It.MaxFeaturesInOneTable="MaxFeaturesInOneTable",It.MaxObjectsToExport="MaxObjectsToExport",It.MaxUploadContentSize="MaxUploadContentSize",It.MaxEqlQueryParametersValues="MaxEqlQueryParametersValues",(Ct=exports.RemoteTaskStatus||(exports.RemoteTaskStatus={})).Init="Init",Ct.Process="Process",Ct.Completed="Completed",Ct.Interrupted="Interrupted",Ct.Error="Error",Ct.Timeout="Timeout",Ct.Waiting="Waiting",Ct.InQueue="InQueue",Ct.Unknown="Unknown",(Et=exports.ResourceSubTypeFilter||(exports.ResourceSubTypeFilter={})).RemoteTileService="RemoteTileService",Et.ProxyService="ProxyService",Et.PostgresLayerService="PostgresLayerService",Et.QueryLayerService="QueryLayerService",Et.TileCatalogTable="TileCatalogTable",(Lt=exports.ResourceType||(exports.ResourceType={})).Unknown="Unknown",Lt.Table="table",Lt.Layer="layer",Lt.Project="project",Lt.File="file",Lt.Feature="feature",Lt.Tag="tag",Lt.DataSource="datasource",(Ft=exports.ResourceTypeFilter||(exports.ResourceTypeFilter={})).Map="Map",Ft.Layer="Layer",Ft.Table="Table",Ft.RasterCatalog="RasterCatalog",Ft.ProxyService="ProxyService",Ft.RemoteTileService="RemoteTileService",Ft.File="File",Ft.DataSource="DataSource",Ft.TaskPrototype="TaskPrototype",(Ut=exports.ResourceTypeLink||(exports.ResourceTypeLink={})).Table="tables",Ut.Layer="layers",Ut.Project="projects",(At=exports.ResponseType||(exports.ResponseType={})).Code="code",At.Token="token",(Dt=exports.SimplifyType||(exports.SimplifyType={})).Basic="Basic",Dt.PreserveTopology="PreserveTopology",Dt.VW="VW",(Nt=exports.StringSubType||(exports.StringSubType={})).None="None",Nt.Image="Image",Nt.PkkCode="PkkCode",Nt.Attachments="Attachments",(Ot=exports.TaskResourceSubType||(exports.TaskResourceSubType={})).SpTask="SpTask",Ot.PythonTask="PythonTask",(Mt=exports.TextAlignment||(exports.TextAlignment={})).Right="right",Mt.Left="left",Mt.Center="center",Mt.Justified="justified",(Bt=exports.TextVerticalAlignment||(exports.TextVerticalAlignment={})).Top="top",Bt.Bottom="bottom",Bt.Middle="middle",(qt=exports.WorkerMethodType||(exports.WorkerMethodType={})).Task="Task",qt.Rest="Rest",qt.Both="Both",(Wt=exports.WorkerSettingsFieldType||(exports.WorkerSettingsFieldType={})).Int32="Int32",Wt.Int64="Int64",Wt.Double="Double",Wt.String="String",Wt.Boolean="Boolean",Wt.DateTime="DateTime",Wt.Point="Point",Wt.Geometry="Geometry",Wt.Polyline="Polyline",Wt.MultiPolygon="MultiPolygon",Wt.Polygon="Polygon",Wt.Multipoint="Multipoint",Wt.IntergerArray="IntergerArray",Wt.DoubleArray="DoubleArray",Wt.StringArray="StringArray",Wt.SourceEql="SourceEql",Wt.Layer="Layer",Wt.Table="Table",Wt.Folder="Folder",Wt.Json="Json",Wt.Attribute="Attribute",Wt.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=F,exports.AccountPreview=A,exports.Api=st,exports.BulkOperations=N,exports.ClientSettings=M,exports.Eql=q,exports.Feedback=_,exports.FileUpload=H,exports.Filters=G,exports.GEOCODE_PROVIDER="geocode2gis",exports.Geocode=X,exports.HttpClient=g,exports.Import=Z,exports.Layers=ge,exports.Names=Pe,exports.Notification=Ce,exports.NotificationEvent=Ee,exports.PortalSettings=Le,exports.Projects=Ae,exports.RemoteTaskManager=Me,exports.Resources=qe,exports.STORAGE_REFRESH_TOKEN_KEY="evergis-refresh-token",exports.STORAGE_TOKEN_KEY="evergis-jwt-token",exports.Security=_e,exports.Statistic=ze,exports.Tables=Ke,exports.Tools=Ye,exports.VectorTiles=et,exports.addSubDomainToLocation=e=>window.location.protocol+"//"+e+"."+window.location.host,exports.errorHandler=xe,exports.formDataFromFile=function(e){const t=new FormData;return t.append("file",e),t},exports.generateId=we,exports.getFetchingUrlPath=Te,exports.isHTTPError=e=>be(e)&&"http"===e.type,exports.isHandledError=be,exports.isProjectContentItems=function(e){return null!=e},exports.isString=Se,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=ve,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=b,exports.unique=je;
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,o=require("@microsoft/signalr"),s=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 l(e,t,n){return t&&u(e.prototype,t),n&&u(e,n),e}function c(){return(c=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,o={},s=Object.keys(e);for(r=0;r<s.length;r++)t.indexOf(n=s[r])>=0||(o[n]=e[n]);return o}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 o=h(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return v(this,n)}}function g(e,t,n){return(g="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 o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(n):o.value}})(e,t,n||e)}let k=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 l(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:x(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?"?"+x(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:x(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 x(e){return void 0===e&&(e={}),s.stringify(e,{arrayFormat:"comma"})}function b(e){return e instanceof FormData?e:Object.keys(e).reduce((t,n)=>(t.append(n,e[n]),t),new FormData)}let S=l((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 l(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 l(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 l(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 l(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",b(e)).json()}},{key:"createFile1",value:function(e){return this.http.post("/resources/file",b(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 l(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",b(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",b(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",b(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(c({},t,e)))}else localStorage.removeItem("@evergis/user-info")};let F=function(e){p(n,C);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(n,[{key:"login",value:async function(e,t,r){if(void 0===t&&(t={}),void 0===r&&(r=!1),e){const o=await g(h(n.prototype),"authenticate",this).call(this,t,e);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 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 g(h(n.prototype),"updateUser",this).call(this,c({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}(),U=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(n,[{key:"getPreview",value:function(){return this.http.createUrl("/account/user/preview")}},{key:"uploadPreview",value:function(e){return this.http.post("/account/user/preview",b(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,b(t)).json()}},{key:"deletePreview1",value:function(e){return this.http.delete("/account/user/preview/"+e,null).then(()=>{})}}]),n}(),A=function(e){p(n,U);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(n)}(),D=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(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 l(n)}();const O=["cameraId"],M=["cameraId"],B=["cameraId"],q=["cameraId"],W=["cameraId"],_=["cameraId"];let H=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(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,B);return this.http.get("/cameras/"+t+"/archiveCalendar",n).json()}},{key:"getArchiveSnapshot",value:function(e){let{cameraId:t}=e,n=y(e,q);return this.http.get("/cameras/"+t+"/archiveSnapshot",n).blob()}},{key:"getLiveFeed",value:function(e){let{cameraId:t}=e,n=y(e,W);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,_);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 l(n)}(),z=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(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}(),V=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 l(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}(),Q=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(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,Q);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(n)}(),K=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(n,[{key:"increaseResourcesLimit",value:function(e){return this.http.post("/feedback/limits",null,e).json()}},{key:"moreSymbols",value:function(e){return this.http.post("/feedback/symbol",null,e).json()}},{key:"feedback",value:function(e,t){return this.http.post("/feedback",b(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 l(n)}(),Y=function(e){p(n,R);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(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 l(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 l(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 l(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}(),oe=function(e){p(n,re);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(n,[{key:"geocode2Gis",value:function(e){return this.geocode(c({providerName:"geocode2gis"},e))}},{key:"suggest2Gis",value:function(e){return this.suggest(c({providerName:"geocode2gis"},e))}}]),n}(),se=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(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).then(()=>{})}},{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,se);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(n)}();const ae=["name"],ue=["name"],le=["name","id"],ce=["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"],ge=["name"],ke=["name"],me=["name"],xe=["layerName"],be=["name","id"];let Se=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(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,le);return this.http.get("/layers/"+t+"/features/"+n,r).json()}},{key:"getTilesLayerImage",value:function(e){let{name:t,x:n,y:r,z:o}=e,s=y(e,ce);return this.http.createUrl("/layers/"+t+"/tile/"+o+"/"+n+"/"+r,s)}},{key:"getTilesLayerImage1",value:function(e){let{name:t,x:n,y:r,z:o,format:s}=e,i=y(e,pe);return this.http.createUrl("/layers/"+t+"/tile/"+o+"/"+n+"/"+r+"."+s,i)}},{key:"getTilesLayerImageWithFormatAndDpi",value:function(e){let{name:t,x:n,y:r,z:o,dpi:s,format:i}=e,a=y(e,he);return this.http.createUrl("/layers/"+t+"/tile/"+o+"/"+n+"/"+r+"@"+s+"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,ge);return this.http.get("/layers/"+t+"/distincts",n).json()}},{key:"aggregateAttribute",value:function(e){let{name:t}=e,n=y(e,ke);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,xe);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,be);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 l(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(c({},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 Fe(e,t,n){return n.indexOf(e)===t}const Ue=i.customAlphabet("abcdefghijklmnopqrstuvwxyz0123456789",12);(exports.ResourceSeparator||(exports.ResourceSeparator={})).Server=".";let Ae=function(){function e(t){let{account:n}=t;a(this,e),this.account=n}return l(e,[{key:"createId",value:function(){return Ue()}},{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(c({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 l(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,o,s){var i;return void 0===s&&(s=!1),a(this,r),(i=n.call(this,e)).api=o,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=s,i}return l(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=l((function e(t){a(this,e),this.data=t})),Be=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 l(n,[{key:"fetchPortalSettings",value:async function(e){return this.config=JSON.parse(await this.getConfiguration(e)),this.config}}]),n}();const qe=["name"];let We=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(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,qe);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,o){return this.http.createUrl("/projects/"+e+"/tile/"+r+"/"+t+"/"+n+"."+o)}},{key:"getTilesLayerImageWithFormatAndDpi",value:function(e,t,n,r,o,s){return this.http.createUrl("/projects/"+e+"/tile/"+r+"/"+t+"/"+n+"@"+o+"x."+s)}},{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}(),_e=function(e){p(n,We);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(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 l(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}(),Ve=function(e){p(n,ze);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(n)}();var Qe;(Qe=exports.DependencyType||(exports.DependencyType={})).Layer="Layer",Qe.Table="Table",Qe.Project="Project";let Je=function(){function e(t,n,r){a(this,e),this.projects=t,this.layers=n,this.tables=r}return l(e,[{key:"getProjectInfosWithDeps",value:async function(e){const t=await this.projects.getProjectInfos(e),n=await this.projects.getProjectsDeps(e),{layers:r,tables:o}=await this.getDependencies(n,!0,!0);return{projects:t,deps:{layers:r,tables:o}}}},{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:o}=e.reduce((e,r)=>{const o=r.dependencies||[];if(t){const t=this.getDependentNames(o,exports.DependencyType.Layer);e.layers.push(...t)}if(n){const t=this.getDependentNames(o,exports.DependencyType.Table);e.tables.push(...t)}return e},{tables:[],layers:[]});return{tables:await this.tables.getTableInfos(r.filter(Fe)),layers:await this.layers.getLayerInfos(o.filter(Fe))}}},{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 l(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 o;let{username:s,roles:i}=r;return a(this,n),(o=t.call(this,e)).ownerName="",o.ownerRoles=[],o.ownerName=s,o.ownerRoles=i,o}return l(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 l(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 l(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 l(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 l(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}(),ot=function(e){p(n,S);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(n)}(),st=function(e){p(n,ot);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(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 l(n,[{key:"getVectorTile",value:function(e){let{name:t,z:n,x:r,y:o}=e,s=y(e,it);return this.http.get("/vt/"+t+"/"+n+"/"+r+"/"+o+".pbf",s).then(()=>{})}}]),n}(),ut=function(e){p(n,at);var t=d(n);function n(){return a(this,n),t.apply(this,arguments)}return l(n)}();var lt;(lt=exports.UrlPath||(exports.UrlPath={})).Base="/map",lt.Shared="/shared",lt.Presentation="/presentation",lt.Portal="/portal";const ct={401:exports.ApiEvent.Unauthorized},pt=Object.values(exports.UrlPath),ht=pt[0];let yt=function(e){p(s,t.EventEmitter);var r=d(s);function s(e){var t,i;let{url:u,wsUrl:l,wsKeepAlive:p,snappingHubUrl:h,http:y,urlPath:v,httpOptions:d}=e;a(this,s),i=r.call(this);const{hooks:g}=d||{};return i.http=y||new k(c({prefixUrl:u,timeout:!1,retry:{methods:["get","post","delete"],limit:5,statusCodes:[401]}},d||{},{hooks:c({},g||{},{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==g?void 0:g.beforeRequest)?t:[]],beforeRetry:[async e=>{let{request:t,error:r,retryCount:o}=e;if(r instanceof n.HTTPError&&401===r.response.status&&1===o)try{const e=window.localStorage.getItem("evergis-refresh-token");if(e){var s;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==(s=t.headers)||s.set("Authorization","Bearer "+(n.token||""))}}catch(r){throw new Error("Failed to refresh token")}}],afterResponse:[(e,t,r)=>{const o=ct[null==r?void 0:r.status];return o&&i.emit(o,Ie(new n.HTTPError(r,e,t))),r},...(null==g?void 0:g.afterResponse)||[]]})})),i.url=u,i.wsUrl=l||u,i.urlPath=v||i.defineUrlPath(),i.layers=new Pe(i.http),i.tables=new rt(i.http),i.projects=new _e(i.http),i.resources=new Je(i.projects,i.layers,i.tables),i.account=new F(i.http),i.accountPreview=new A(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 oe(i.http),i.tools=new st(i.http),i.clientSettings=new V(i.http),i.portalSettings=new Be(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 Ve(i.http),i.cameras=new G(i.http),i.names=new Ae({account:i.account}),i.snappingHub=h?(new o.HubConnectionBuilder).withUrl(h,{withCredentials:!0,skipNegotiation:!0,transport:o.HttpTransportType.WebSockets}).withAutomaticReconnect().build():null,i}return l(s,[{key:"init",value:async function(e){let{authParams:t,authQueryParams:n,connectWs:r,fetchSettings:o,fetchUser:s,useJwt:i}=e;try{await this.account.login(t,n,i),s&&await this.account.fetchCurrentUser(),r&&await this.connectWs(),o&&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!==o.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}}]),s}();var ft,vt,dt,gt,kt,mt,xt,bt,St,Tt,jt,wt,Pt,Rt,It,Ct,Et,Lt,Ft,Ut,At,Dt,Nt,Ot,Mt,Bt,qt,Wt,_t,Ht,Gt,zt,Vt,Qt,Jt,Kt,Xt;(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",(gt=exports.AttributeType||(exports.AttributeType={})).Unknown="Unknown",gt.String="String",gt.Int32="Int32",gt.Int64="Int64",gt.Double="Double",gt.DateTime="DateTime",gt.Boolean="Boolean",gt.Point="Point",gt.Polyline="Polyline",gt.MultiPolygon="MultiPolygon",gt.Multipoint="Multipoint",gt.H3Index="H3Index",gt.Json="Json",(kt=exports.AuthorizationGrant||(exports.AuthorizationGrant={})).AuthorizationCode="authorization_code",kt.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",(xt=exports.ClassificationType||(exports.ClassificationType={})).None="none",xt.NaturalBreaks="naturalBreaks",xt.EqualInterval="equalInterval",xt.Quantile="quantile",xt.Unique="unique",xt.Step="step",(bt=exports.ClassifyAttributeType||(exports.ClassifyAttributeType={})).Decimal="decimal",bt.DateTime="dateTime",bt.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.FontStyle||(exports.FontStyle={})).Normal="normal",Pt.Oblique="oblique",Pt.Italic="italic",(Rt=exports.FontWeight||(exports.FontWeight={})).Thin="Thin",Rt.ExtraLight="ExtraLight",Rt.Light="Light",Rt.SemiLight="SemiLight",Rt.Normal="Normal",Rt.Medium="Medium",Rt.DemiBold="DemiBold",Rt.Bold="Bold",Rt.ExtraBold="ExtraBold",Rt.Black="Black",Rt.ExtraBlack="ExtraBlack",(It=exports.GeometryType||(exports.GeometryType={})).Unknown="unknown",It.Point="point",It.Polyline="polyline",It.Polygon="multipolygon",It.Envelope="envelope",It.Multipoint="multipoint",(Ct=exports.Group||(exports.Group={})).My="my",Ct.Role="role",Ct.Public="public",Ct.All="all",(Et=exports.LineCapStyle||(exports.LineCapStyle={})).Flat="Flat",Et.Square="Square",Et.Round="Round",Et.Triangle="Triangle",(Lt=exports.LineEndingType||(exports.LineEndingType={})).None="none",Lt.Arrow="arrow",Lt.FilledArrow="filledArrow",Lt.Square="square",Lt.FilledSquare="filledSquare",Lt.Circle="circle",Lt.FilledCircle="filledCircle",Lt.Diamond="diamond",Lt.FilledDiamond="filledDiamond",Lt.RoundSquare="roundSquare",Lt.FilledRoundSquare="filledRoundSquare",Lt.Svg="svg",(Ft=exports.LineJoinType||(exports.LineJoinType={})).Miter="Miter",Ft.Bevel="Bevel",Ft.Round="Round",(Ut=exports.OwnerFilter||(exports.OwnerFilter={})).My="My",Ut.Shared="Shared",Ut.Public="Public",(At=exports.PbfSchema||(exports.PbfSchema={})).XYZ="xyz",At.TMS="tms",(Dt=exports.Permissions||(exports.Permissions={})).None="none",Dt.Configure="configure",Dt.Write="write",Dt.Read="read",Dt.ReadConfigure="read,configure",Dt.ReadWrite="read,write",Dt.All="read,write,configure",(Nt=exports.PolicyType||(exports.PolicyType={})).Unknown="Unknown",Nt.CreateTable="CreateTable",Nt.CreateLayer="CreateLayer",Nt.CreateProject="CreateProject",Nt.MaxFeaturesInOneTable="MaxFeaturesInOneTable",Nt.MaxObjectsToExport="MaxObjectsToExport",Nt.MaxUploadContentSize="MaxUploadContentSize",Nt.MaxEqlQueryParametersValues="MaxEqlQueryParametersValues",(Ot=exports.Quality||(exports.Quality={})).Low="Low",Ot.Medium="Medium",Ot.High="High",(Mt=exports.RemoteTaskStatus||(exports.RemoteTaskStatus={})).Init="Init",Mt.Process="Process",Mt.Completed="Completed",Mt.Interrupted="Interrupted",Mt.Error="Error",Mt.Timeout="Timeout",Mt.Waiting="Waiting",Mt.InQueue="InQueue",Mt.Unknown="Unknown",(Bt=exports.ResourceSubTypeFilter||(exports.ResourceSubTypeFilter={})).RemoteTileService="RemoteTileService",Bt.ProxyService="ProxyService",Bt.PostgresLayerService="PostgresLayerService",Bt.QueryLayerService="QueryLayerService",Bt.TileCatalogTable="TileCatalogTable",(qt=exports.ResourceType||(exports.ResourceType={})).Unknown="Unknown",qt.Table="table",qt.Layer="layer",qt.Project="project",qt.File="file",qt.Feature="feature",qt.Tag="tag",qt.DataSource="datasource",(Wt=exports.ResourceTypeFilter||(exports.ResourceTypeFilter={})).Map="Map",Wt.Layer="Layer",Wt.Table="Table",Wt.RasterCatalog="RasterCatalog",Wt.ProxyService="ProxyService",Wt.RemoteTileService="RemoteTileService",Wt.File="File",Wt.DataSource="DataSource",Wt.TaskPrototype="TaskPrototype",(_t=exports.ResourceTypeLink||(exports.ResourceTypeLink={})).Table="tables",_t.Layer="layers",_t.Project="projects",(Ht=exports.ResponseType||(exports.ResponseType={})).Code="code",Ht.Token="token",(Gt=exports.SimplifyType||(exports.SimplifyType={})).Basic="Basic",Gt.PreserveTopology="PreserveTopology",Gt.VW="VW",(zt=exports.StringSubType||(exports.StringSubType={})).None="None",zt.Image="Image",zt.PkkCode="PkkCode",zt.Attachments="Attachments",(Vt=exports.TaskResourceSubType||(exports.TaskResourceSubType={})).SpTask="SpTask",Vt.PythonTask="PythonTask",(Qt=exports.TextAlignment||(exports.TextAlignment={})).Right="right",Qt.Left="left",Qt.Center="center",Qt.Justified="justified",(Jt=exports.TextVerticalAlignment||(exports.TextVerticalAlignment={})).Top="top",Jt.Bottom="bottom",Jt.Middle="middle",(Kt=exports.WorkerMethodType||(exports.WorkerMethodType={})).Task="Task",Kt.Rest="Rest",Kt.Both="Both",(Xt=exports.WorkerSettingsFieldType||(exports.WorkerSettingsFieldType={})).Int32="Int32",Xt.Int64="Int64",Xt.Double="Double",Xt.String="String",Xt.Boolean="Boolean",Xt.DateTime="DateTime",Xt.Point="Point",Xt.Geometry="Geometry",Xt.Polyline="Polyline",Xt.MultiPolygon="MultiPolygon",Xt.Polygon="Polygon",Xt.Multipoint="Multipoint",Xt.IntergerArray="IntergerArray",Xt.DoubleArray="DoubleArray",Xt.StringArray="StringArray",Xt.SourceEql="SourceEql",Xt.Layer="Layer",Xt.Table="Table",Xt.Folder="Folder",Xt.Json="Json",Xt.Attribute="Attribute",Xt.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=F,exports.AccountPreview=A,exports.Api=yt,exports.BulkOperations=N,exports.Cameras=G,exports.ClientSettings=V,exports.Eql=J,exports.Feedback=X,exports.FileUpload=Y,exports.Filters=$,exports.GEOCODE_PROVIDER="geocode2gis",exports.Geocode=oe,exports.HttpClient=k,exports.Import=ie,exports.Layers=Pe,exports.Names=Ae,exports.Notification=Oe,exports.NotificationEvent=Me,exports.PortalSettings=Be,exports.Projects=_e,exports.RemoteTaskManager=Ve,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=st,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=Ue,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=b,exports.unique=Fe;
2
2
  //# sourceMappingURL=api.cjs.production.min.js.map