123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- import {
- e
- } from "./chunk-OKUFE7TO.js";
- import {
- c,
- t
- } from "./chunk-LTZ5XXDV.js";
- import {
- F,
- a
- } from "./chunk-ECY35CJI.js";
- import "./chunk-PT62335L.js";
- import "./chunk-2H5MD622.js";
- import "./chunk-RYY6632W.js";
- import "./chunk-DW42UVIT.js";
- import "./chunk-YAEIHDJH.js";
- import "./chunk-TJNOJH33.js";
- import "./chunk-OSHI574D.js";
- import {
- U
- } from "./chunk-DVUG3KID.js";
- import "./chunk-FWSQEIAR.js";
- import "./chunk-VEGAOVMY.js";
- import "./chunk-6T6G6LCQ.js";
- import "./chunk-YEJL5NEF.js";
- import "./chunk-PQFTYGF5.js";
- import "./chunk-2Z2TG5CU.js";
- import "./chunk-6KZ2LTDA.js";
- import "./chunk-U2XHEJM7.js";
- import "./chunk-SQOPWYIT.js";
- import "./chunk-V6P2MAQQ.js";
- import {
- s3 as s
- } from "./chunk-E5O6P5I2.js";
- import "./chunk-SPWQ3AWG.js";
- import "./chunk-2TIUKVZN.js";
- import {
- f,
- r
- } from "./chunk-YXWMMD76.js";
- import "./chunk-S5KM4IGW.js";
- // node_modules/@arcgis/core/symbols/support/symbolLayerUtils.js
- var a2 = m();
- function m() {
- return new e(50);
- }
- function y() {
- a2 = m();
- }
- function f2(e2, o) {
- if ("icon" === e2.type)
- return p(e2, o);
- if ("object" === e2.type)
- return d(e2, o);
- throw new s("symbol3d:unsupported-symbol-layer", "computeLayerSize only works with symbol layers of type Icon and Object");
- }
- async function l(e2, o) {
- if ("icon" === e2.type)
- return h(e2, o);
- if ("object" === e2.type)
- return w(e2, o);
- throw new s("symbol3d:unsupported-symbol-layer", "computeLayerSize only works with symbol layers of type Icon and Object");
- }
- async function p(e2, o) {
- var _a, _b;
- if ((_a = e2.resource) == null ? void 0 : _a.href)
- return b(e2.resource.href).then((e3) => [e3.width, e3.height]);
- if ((_b = e2.resource) == null ? void 0 : _b.primitive)
- return r(o) ? [o, o] : [256, 256];
- throw new s("symbol3d:invalid-symbol-layer", "symbol layers of type Icon must have either an href or a primitive resource");
- }
- function h(e2, r2) {
- return p(e2, r2).then((r3) => {
- if (null == e2.size)
- return r3;
- const o = r3[0] / r3[1];
- return o > 1 ? [e2.size, e2.size / o] : [e2.size * o, e2.size];
- });
- }
- function b(r2) {
- return U(r2, { responseType: "image" }).then((e2) => e2.data);
- }
- function d(e2, r2) {
- return j(e2, r2).then((e3) => F(e3));
- }
- async function w(e2, r2) {
- const o = await d(e2, r2);
- return t(o, e2);
- }
- async function j(e2, o) {
- var _a;
- if (!e2.isPrimitive) {
- const r2 = f((_a = e2.resource) == null ? void 0 : _a.href), o2 = a2.get(r2);
- if (void 0 !== o2)
- return o2;
- const t2 = await import("./objectResourceUtils-XPGL7LTG.js"), i2 = await t2.fetch(r2, { disableTextures: true });
- return a2.put(r2, i2.referenceBoundingBox), i2.referenceBoundingBox;
- }
- let i = null;
- if (e2.resource && e2.resource.primitive && (i = a(c(e2.resource.primitive)), r(o)))
- for (let r2 = 0; r2 < i.length; r2++)
- i[r2] *= o;
- return i ? Promise.resolve(i) : Promise.reject(new s("symbol:invalid-resource", "The symbol does not have a valid resource"));
- }
- export {
- y as clearBoundingBoxCache,
- p as computeIconLayerResourceSize,
- f2 as computeLayerResourceSize,
- l as computeLayerSize,
- d as computeObjectLayerResourceSize
- };
- //# sourceMappingURL=symbolLayerUtils-JPLC7RBG.js.map
|