123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102 |
- import {
- e as e2,
- n as n2
- } from "./chunk-YASLQAXE.js";
- import {
- a,
- v
- } from "./chunk-2Z6LERTI.js";
- import "./chunk-OWVBLVP3.js";
- import {
- B
- } from "./chunk-4NKD334K.js";
- import "./chunk-65K7LC56.js";
- import "./chunk-ATPLLI5W.js";
- import "./chunk-XH7RUGVZ.js";
- import "./chunk-TBBTRX4O.js";
- import "./chunk-YBSUITLL.js";
- import {
- U
- } from "./chunk-VNFRAYHO.js";
- import "./chunk-R5IG2D6H.js";
- import "./chunk-VBRY5KJM.js";
- import "./chunk-PDKDCAAD.js";
- import "./chunk-ECW2QABR.js";
- import "./chunk-GCDJLKH4.js";
- import "./chunk-MRJEICT6.js";
- import {
- d,
- e,
- l3 as l,
- n2 as n
- } from "./chunk-Y3WMVFTW.js";
- import "./chunk-SAS7RONY.js";
- import "./chunk-WSRBH7BF.js";
- import {
- b
- } from "./chunk-IHXECKQQ.js";
- import "./chunk-ULGDPLM2.js";
- import {
- r,
- s3 as s
- } from "./chunk-EMJ4ZSM2.js";
- import "./chunk-IKP3YN53.js";
- import "./chunk-GZT4BVFP.js";
- import "./chunk-A5ICIBVI.js";
- // node_modules/@arcgis/core/rest/geometryService/utils.js
- function o(e3, r2, o2) {
- const n5 = a(r2);
- return e3.map((e4) => {
- const t = n5.fromJSON(e4);
- return t.spatialReference = o2, t;
- });
- }
- // node_modules/@arcgis/core/rest/support/ProjectParameters.js
- var i = class extends l {
- constructor(r2) {
- super(r2), this.geometries = null, this.outSpatialReference = null, this.transformation = null, this.transformForward = null;
- }
- toJSON() {
- const r2 = this.geometries.map((r3) => r3.toJSON()), t = this.geometries[0], o2 = {};
- return o2.outSR = this.outSpatialReference.wkid || JSON.stringify(this.outSpatialReference.toJSON()), o2.inSR = t.spatialReference.wkid || JSON.stringify(t.spatialReference.toJSON()), o2.geometries = JSON.stringify({ geometryType: v(t), geometries: r2 }), this.transformation && (o2.transformation = this.transformation.wkid || JSON.stringify(this.transformation)), this.transformForward != null && (o2.transformForward = this.transformForward), o2;
- }
- };
- e([d()], i.prototype, "geometries", void 0), e([d({ json: { read: { source: "outSR" } } })], i.prototype, "outSpatialReference", void 0), e([d()], i.prototype, "transformation", void 0), e([d()], i.prototype, "transformForward", void 0), i = e([n("esri.rest.support.ProjectParameters")], i);
- var a2 = i;
- // node_modules/@arcgis/core/rest/geometryService/project.js
- var i2 = b(a2);
- async function n3(o2, m, n5) {
- m = i2(m);
- const u = n2(o2), c = { ...u.query, f: "json", ...m.toJSON() }, j = m.outSpatialReference, a4 = v(m.geometries[0]), f = e2(c, n5);
- return U(u.path + "/project", f).then(({ data: { geometries: r2 } }) => o(r2, a4, j));
- }
- // node_modules/@arcgis/core/portal/support/geometryServiceUtils.js
- async function n4(o2 = null, i3) {
- if (r.geometryServiceUrl)
- return r.geometryServiceUrl;
- if (!o2)
- throw new s("internal:geometry-service-url-not-configured");
- let n5;
- n5 = "portal" in o2 ? o2.portal || B.getDefault() : o2, await n5.load({ signal: i3 });
- const a4 = n5.helperServices?.geometry?.url;
- if (!a4)
- throw new s("internal:geometry-service-url-not-configured");
- return a4;
- }
- async function a3(r2, t, a4 = null, l2) {
- const c = await n4(a4, l2), s2 = new a2();
- s2.geometries = [r2], s2.outSpatialReference = t;
- const m = await n3(c, s2, { signal: l2 });
- if (m && Array.isArray(m) && m.length === 1)
- return m[0];
- throw new s("internal:geometry-service-projection-failed");
- }
- export {
- n4 as getGeometryServiceURL,
- a3 as projectGeometry
- };
- //# sourceMappingURL=geometryServiceUtils-ZH623NJZ.js.map
|