123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134 |
- import {
- J as J2
- } from "./chunk-PLCWBBQ4.js";
- import {
- Ae,
- Ce,
- Fe,
- Ie,
- J,
- K,
- P,
- P2,
- Re,
- V,
- ce,
- e,
- fe,
- me,
- re,
- t,
- te,
- v2 as v
- } from "./chunk-FT2BCPUP.js";
- import "./chunk-5JZ72JAQ.js";
- import "./chunk-JGBXYDGB.js";
- import "./chunk-QEWF7QPH.js";
- import "./chunk-5N7JLUJJ.js";
- import "./chunk-5UVJ64RB.js";
- import "./chunk-VCH45Q2I.js";
- import "./chunk-HZRKBTHJ.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 "./chunk-E5O6P5I2.js";
- import "./chunk-SPWQ3AWG.js";
- import "./chunk-2TIUKVZN.js";
- import "./chunk-YXWMMD76.js";
- import "./chunk-S5KM4IGW.js";
- // node_modules/@arcgis/core/arcade/functions/featuresetstring.js
- function h(e2) {
- return e2 && e2.domain ? "coded-value" === e2.domain.type || "codedValue" === e2.domain.type ? J2.convertObjectToArcadeDictionary({ type: "codedValue", name: e2.domain.name, dataType: P[e2.field.type], codedValues: e2.domain.codedValues.map((n) => ({ name: n.name, code: n.code })) }) : J2.convertObjectToArcadeDictionary({ type: "range", name: e2.domain.name, dataType: P[e2.field.type], min: e2.domain.min, max: e2.domain.max }) : null;
- }
- function A(T) {
- "async" === T.mode && (T.functions.domain = function(n, u) {
- return T.standardFunctionAsync(n, u, async (m, f, l) => {
- if (V(l, 2, 3, n, u), J(l[0])) {
- return h(Ae(l[0], K(l[1]), void 0 === l[2] ? void 0 : re(l[2])));
- }
- if (P2(l[0])) {
- await l[0]._ensureLoaded();
- return h(me(K(l[1]), l[0], null, void 0 === l[2] ? void 0 : re(l[2])));
- }
- throw new t(n, e.InvalidParameter, u);
- });
- }, T.functions.subtypes = function(o, i) {
- return T.standardFunctionAsync(o, i, async (c, d, m) => {
- if (V(m, 1, 1, o, i), J(m[0])) {
- const e2 = Re(m[0]);
- return e2 ? J2.convertObjectToArcadeDictionary(e2) : null;
- }
- if (P2(m[0])) {
- await m[0]._ensureLoaded();
- const e2 = m[0].subtypes();
- return e2 ? J2.convertObjectToArcadeDictionary(e2) : null;
- }
- throw new t(o, e.InvalidParameter, i);
- });
- }, T.functions.domainname = function(n, o) {
- return T.standardFunctionAsync(n, o, async (u, l, y) => {
- if (V(y, 2, 4, n, o), J(y[0]))
- return Fe(y[0], K(y[1]), y[2], void 0 === y[3] ? void 0 : re(y[3]));
- if (P2(y[0])) {
- await y[0]._ensureLoaded();
- const n2 = me(K(y[1]), y[0], null, void 0 === y[3] ? void 0 : re(y[3]));
- return fe(n2, y[2]);
- }
- throw new t(n, e.InvalidParameter, o);
- });
- }, T.signatures.push({ name: "domainname", min: 2, max: 4 }), T.functions.domaincode = function(n, o) {
- return T.standardFunctionAsync(n, o, async (u, m, f) => {
- if (V(f, 2, 4, n, o), J(f[0]))
- return Ce(f[0], K(f[1]), f[2], void 0 === f[3] ? void 0 : re(f[3]));
- if (P2(f[0])) {
- await f[0]._ensureLoaded();
- const n2 = me(K(f[1]), f[0], null, void 0 === f[3] ? void 0 : re(f[3]));
- return ce(n2, f[2]);
- }
- throw new t(n, e.InvalidParameter, o);
- });
- }, T.signatures.push({ name: "domaincode", min: 2, max: 4 })), T.functions.text = function(n, e2) {
- return T.standardFunctionAsync(n, e2, (a, r, o) => {
- if (V(o, 1, 2, n, e2), !P2(o[0]))
- return te(o[0], o[1]);
- {
- const n2 = v(o[1], "");
- if ("" === n2)
- return o[0].castToText();
- if ("schema" === n2.toLowerCase())
- return o[0].convertToText("schema", a.abortSignal);
- if ("featureset" === n2.toLowerCase())
- return o[0].convertToText("featureset", a.abortSignal);
- }
- });
- }, T.functions.gdbversion = function(n, o) {
- return T.standardFunctionAsync(n, o, async (i, c, d) => {
- if (V(d, 1, 1, n, o), J(d[0]))
- return d[0].gdbVersion();
- if (P2(d[0])) {
- return (await d[0].load()).gdbVersion;
- }
- throw new t(n, e.InvalidParameter, o);
- });
- }, T.functions.schema = function(o, i) {
- return T.standardFunctionAsync(o, i, async (c, d, u) => {
- if (V(u, 1, 1, o, i), P2(u[0]))
- return await u[0].load(), J2.convertObjectToArcadeDictionary(u[0].schema());
- if (J(u[0])) {
- const e2 = Ie(u[0]);
- return e2 ? J2.convertObjectToArcadeDictionary(e2) : null;
- }
- throw new t(o, e.InvalidParameter, i);
- });
- };
- }
- export {
- A as registerFunctions
- };
- //# sourceMappingURL=featuresetstring-6A7U67BI.js.map
|