scordi-extension 1.15.1 → 1.15.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sdk/index.js CHANGED
@@ -162,8 +162,8 @@ class at extends Error {
162
162
  else {
163
163
  let f = a, b = 0;
164
164
  for (; b < c.path.length; ) {
165
- const _ = c.path[b];
166
- b === c.path.length - 1 ? (f[_] = f[_] || { _errors: [] }, f[_]._errors.push(t(c))) : f[_] = f[_] || { _errors: [] }, f = f[_], b++;
165
+ const k = c.path[b];
166
+ b === c.path.length - 1 ? (f[k] = f[k] || { _errors: [] }, f[k]._errors.push(t(c))) : f[k] = f[k] || { _errors: [] }, f = f[k], b++;
167
167
  }
168
168
  }
169
169
  };
@@ -272,9 +272,9 @@ const _r = (r) => {
272
272
  message: s.message
273
273
  };
274
274
  let f = "";
275
- const b = a.filter((_) => !!_).slice().reverse();
276
- for (const _ of b)
277
- f = _(c, { data: e, defaultError: f }).message;
275
+ const b = a.filter((k) => !!k).slice().reverse();
276
+ for (const k of b)
277
+ f = k(c, { data: e, defaultError: f }).message;
278
278
  return {
279
279
  ...s,
280
280
  path: i,
@@ -1631,47 +1631,47 @@ class Re extends ce {
1631
1631
  }
1632
1632
  _parse(e) {
1633
1633
  if (this._getType(e) !== z.object) {
1634
- const _ = this._getOrReturnCtx(e);
1635
- return U(_, {
1634
+ const k = this._getOrReturnCtx(e);
1635
+ return U(k, {
1636
1636
  code: O.invalid_type,
1637
1637
  expected: z.object,
1638
- received: _.parsedType
1638
+ received: k.parsedType
1639
1639
  }), ee;
1640
1640
  }
1641
1641
  const { status: a, ctx: s } = this._processInputParams(e), { shape: i, keys: c } = this._getCached(), f = [];
1642
1642
  if (!(this._def.catchall instanceof Et && this._def.unknownKeys === "strip"))
1643
- for (const _ in s.data)
1644
- c.includes(_) || f.push(_);
1643
+ for (const k in s.data)
1644
+ c.includes(k) || f.push(k);
1645
1645
  const b = [];
1646
- for (const _ of c) {
1647
- const I = i[_], S = s.data[_];
1646
+ for (const k of c) {
1647
+ const I = i[k], S = s.data[k];
1648
1648
  b.push({
1649
- key: { status: "valid", value: _ },
1650
- value: I._parse(new gt(s, S, s.path, _)),
1651
- alwaysSet: _ in s.data
1649
+ key: { status: "valid", value: k },
1650
+ value: I._parse(new gt(s, S, s.path, k)),
1651
+ alwaysSet: k in s.data
1652
1652
  });
1653
1653
  }
1654
1654
  if (this._def.catchall instanceof Et) {
1655
- const _ = this._def.unknownKeys;
1656
- if (_ === "passthrough")
1655
+ const k = this._def.unknownKeys;
1656
+ if (k === "passthrough")
1657
1657
  for (const I of f)
1658
1658
  b.push({
1659
1659
  key: { status: "valid", value: I },
1660
1660
  value: { status: "valid", value: s.data[I] }
1661
1661
  });
1662
- else if (_ === "strict")
1662
+ else if (k === "strict")
1663
1663
  f.length > 0 && (U(s, {
1664
1664
  code: O.unrecognized_keys,
1665
1665
  keys: f
1666
1666
  }), a.dirty());
1667
- else if (_ !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
1667
+ else if (k !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
1668
1668
  } else {
1669
- const _ = this._def.catchall;
1669
+ const k = this._def.catchall;
1670
1670
  for (const I of f) {
1671
1671
  const S = s.data[I];
1672
1672
  b.push({
1673
1673
  key: { status: "valid", value: I },
1674
- value: _._parse(
1674
+ value: k._parse(
1675
1675
  new gt(s, S, s.path, I)
1676
1676
  //, ctx.child(key), value, getParsedType(value)
1677
1677
  ),
@@ -1680,17 +1680,17 @@ class Re extends ce {
1680
1680
  }
1681
1681
  }
1682
1682
  return s.common.async ? Promise.resolve().then(async () => {
1683
- const _ = [];
1683
+ const k = [];
1684
1684
  for (const I of b) {
1685
- const S = await I.key, k = await I.value;
1686
- _.push({
1685
+ const S = await I.key, x = await I.value;
1686
+ k.push({
1687
1687
  key: S,
1688
- value: k,
1688
+ value: x,
1689
1689
  alwaysSet: I.alwaysSet
1690
1690
  });
1691
1691
  }
1692
- return _;
1693
- }).then((_) => Ke.mergeObjectSync(a, _)) : Ke.mergeObjectSync(a, b);
1692
+ return k;
1693
+ }).then((k) => Ke.mergeObjectSync(a, k)) : Ke.mergeObjectSync(a, b);
1694
1694
  }
1695
1695
  get shape() {
1696
1696
  return this._def.shape();
@@ -1946,7 +1946,7 @@ class sr extends ce {
1946
1946
  let i;
1947
1947
  const c = [];
1948
1948
  for (const b of a) {
1949
- const _ = {
1949
+ const k = {
1950
1950
  ...t,
1951
1951
  common: {
1952
1952
  ...t.common,
@@ -1956,11 +1956,11 @@ class sr extends ce {
1956
1956
  }, I = b._parseSync({
1957
1957
  data: t.data,
1958
1958
  path: t.path,
1959
- parent: _
1959
+ parent: k
1960
1960
  });
1961
1961
  if (I.status === "valid")
1962
1962
  return I;
1963
- I.status === "dirty" && !i && (i = { result: I, ctx: _ }), _.common.issues.length && c.push(_.common.issues);
1963
+ I.status === "dirty" && !i && (i = { result: I, ctx: k }), k.common.issues.length && c.push(k.common.issues);
1964
1964
  }
1965
1965
  if (i)
1966
1966
  return t.common.issues.push(...i.ctx.common.issues), i.result;
@@ -2213,28 +2213,28 @@ class Ar extends ce {
2213
2213
  expected: z.map,
2214
2214
  received: a.parsedType
2215
2215
  }), ee;
2216
- const s = this._def.keyType, i = this._def.valueType, c = [...a.data.entries()].map(([f, b], _) => ({
2217
- key: s._parse(new gt(a, f, a.path, [_, "key"])),
2218
- value: i._parse(new gt(a, b, a.path, [_, "value"]))
2216
+ const s = this._def.keyType, i = this._def.valueType, c = [...a.data.entries()].map(([f, b], k) => ({
2217
+ key: s._parse(new gt(a, f, a.path, [k, "key"])),
2218
+ value: i._parse(new gt(a, b, a.path, [k, "value"]))
2219
2219
  }));
2220
2220
  if (a.common.async) {
2221
2221
  const f = /* @__PURE__ */ new Map();
2222
2222
  return Promise.resolve().then(async () => {
2223
2223
  for (const b of c) {
2224
- const _ = await b.key, I = await b.value;
2225
- if (_.status === "aborted" || I.status === "aborted")
2224
+ const k = await b.key, I = await b.value;
2225
+ if (k.status === "aborted" || I.status === "aborted")
2226
2226
  return ee;
2227
- (_.status === "dirty" || I.status === "dirty") && t.dirty(), f.set(_.value, I.value);
2227
+ (k.status === "dirty" || I.status === "dirty") && t.dirty(), f.set(k.value, I.value);
2228
2228
  }
2229
2229
  return { status: t.value, value: f };
2230
2230
  });
2231
2231
  } else {
2232
2232
  const f = /* @__PURE__ */ new Map();
2233
2233
  for (const b of c) {
2234
- const _ = b.key, I = b.value;
2235
- if (_.status === "aborted" || I.status === "aborted")
2234
+ const k = b.key, I = b.value;
2235
+ if (k.status === "aborted" || I.status === "aborted")
2236
2236
  return ee;
2237
- (_.status === "dirty" || I.status === "dirty") && t.dirty(), f.set(_.value, I.value);
2237
+ (k.status === "dirty" || I.status === "dirty") && t.dirty(), f.set(k.value, I.value);
2238
2238
  }
2239
2239
  return { status: t.value, value: f };
2240
2240
  }
@@ -2273,15 +2273,15 @@ class $t extends ce {
2273
2273
  }), t.dirty());
2274
2274
  const i = this._def.valueType;
2275
2275
  function c(b) {
2276
- const _ = /* @__PURE__ */ new Set();
2276
+ const k = /* @__PURE__ */ new Set();
2277
2277
  for (const I of b) {
2278
2278
  if (I.status === "aborted")
2279
2279
  return ee;
2280
- I.status === "dirty" && t.dirty(), _.add(I.value);
2280
+ I.status === "dirty" && t.dirty(), k.add(I.value);
2281
2281
  }
2282
- return { status: t.value, value: _ };
2282
+ return { status: t.value, value: k };
2283
2283
  }
2284
- const f = [...a.data.values()].map((b, _) => i._parse(new gt(a, b, a.path, _)));
2284
+ const f = [...a.data.values()].map((b, k) => i._parse(new gt(a, b, a.path, k)));
2285
2285
  return a.common.async ? Promise.all(f).then((b) => c(b)) : c(f);
2286
2286
  }
2287
2287
  min(e, t) {
@@ -2326,7 +2326,7 @@ class qt extends ce {
2326
2326
  return _r({
2327
2327
  data: f,
2328
2328
  path: t.path,
2329
- errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, xr(), Ht].filter((_) => !!_),
2329
+ errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, xr(), Ht].filter((k) => !!k),
2330
2330
  issueData: {
2331
2331
  code: O.invalid_arguments,
2332
2332
  argumentsError: b
@@ -2337,7 +2337,7 @@ class qt extends ce {
2337
2337
  return _r({
2338
2338
  data: f,
2339
2339
  path: t.path,
2340
- errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, xr(), Ht].filter((_) => !!_),
2340
+ errorMaps: [t.common.contextualErrorMap, t.schemaErrorMap, xr(), Ht].filter((k) => !!k),
2341
2341
  issueData: {
2342
2342
  code: O.invalid_return_type,
2343
2343
  returnTypeError: b
@@ -2348,20 +2348,20 @@ class qt extends ce {
2348
2348
  if (this._def.returns instanceof Yt) {
2349
2349
  const f = this;
2350
2350
  return Je(async function(...b) {
2351
- const _ = new at([]), I = await f._def.args.parseAsync(b, i).catch((E) => {
2352
- throw _.addIssue(a(b, E)), _;
2351
+ const k = new at([]), I = await f._def.args.parseAsync(b, i).catch((E) => {
2352
+ throw k.addIssue(a(b, E)), k;
2353
2353
  }), S = await Reflect.apply(c, this, I);
2354
2354
  return await f._def.returns._def.type.parseAsync(S, i).catch((E) => {
2355
- throw _.addIssue(s(S, E)), _;
2355
+ throw k.addIssue(s(S, E)), k;
2356
2356
  });
2357
2357
  });
2358
2358
  } else {
2359
2359
  const f = this;
2360
2360
  return Je(function(...b) {
2361
- const _ = f._def.args.safeParse(b, i);
2362
- if (!_.success)
2363
- throw new at([a(b, _.error)]);
2364
- const I = Reflect.apply(c, this, _.data), S = f._def.returns.safeParse(I, i);
2361
+ const k = f._def.args.safeParse(b, i);
2362
+ if (!k.success)
2363
+ throw new at([a(b, k.error)]);
2364
+ const I = Reflect.apply(c, this, k.data), S = f._def.returns.safeParse(I, i);
2365
2365
  if (!S.success)
2366
2366
  throw new at([s(I, S.error)]);
2367
2367
  return S.data;
@@ -2972,16 +2972,24 @@ const ra = (r, e = {
2972
2972
  },
2973
2973
  void: da
2974
2974
  }, Symbol.toStringTag, { value: "Module" })), Ia = Nt({
2975
+ // 워크스페이스 이름
2975
2976
  name: Ue(),
2977
+ // 워크스페이스를 구분할 수 있는 구분자, ex) slug 같은 것들 01republic
2976
2978
  key: Ue(),
2979
+ // 워크스페이스의 프로필 이미지
2977
2980
  image: Ue()
2978
2981
  });
2979
2982
  var nn = /* @__PURE__ */ ((r) => (r.monthly = "MONTHLY", r.yearly = "YEARLY", r))(nn || {});
2980
2983
  const $r = Nt({
2984
+ // 실제 표시되는 통화 표시
2981
2985
  text: Ue(),
2986
+ // 통화 코드
2982
2987
  code: Ue(),
2988
+ // 통화 기호
2983
2989
  symbol: Ue(),
2990
+ // 통화 표시 형식
2984
2991
  format: Ue(),
2992
+ // 통화 금액
2985
2993
  amount: Kt()
2986
2994
  });
2987
2995
  var Ra = /* @__PURE__ */ ((r) => (r.USD = "USD", r.KRW = "KRW", r))(Ra || {});
@@ -2989,27 +2997,47 @@ const Hs = {
2989
2997
  en: { code: "USD", symbol: "$" },
2990
2998
  ko: { code: "KRW", symbol: "₩" }
2991
2999
  }, ja = Nt({
3000
+ // 플랜 이름
2992
3001
  planName: Ue(),
3002
+ // 현재 주기 결제 금액
2993
3003
  currentCycleBillAmount: $r,
3004
+ // 다음 결제 예정일
2994
3005
  nextPaymentDue: Ue(),
3006
+ // 주기 단위
2995
3007
  cycleTerm: rn(nn).nullable(),
3008
+ // 무료 티어 여부
2996
3009
  isFreeTier: Ut(),
3010
+ // 플랜 단위 여부
2997
3011
  isPerUser: Ut(),
3012
+ // 결제 멤버 수
2998
3013
  paidMemberCount: Kt(),
3014
+ // 사용 멤버 수
2999
3015
  usedMemberCount: Kt(),
3016
+ // 단위 가격
3000
3017
  unitPrice: $r.nullable()
3001
3018
  }), Fa = Nt({
3019
+ // 결제 이력 고유 아이디
3002
3020
  uid: Ue(),
3021
+ // 결제 일자
3003
3022
  issuedDate: Fr.date(),
3023
+ // 결제 완료 일자
3004
3024
  paidDate: Fr.date().nullable().optional(),
3025
+ // 결제 방법
3005
3026
  paymentMethod: Ue(),
3027
+ // 결제 금액
3006
3028
  amount: $r,
3029
+ // 결제 성공 여부
3007
3030
  isSuccessfulPaid: Ut(),
3031
+ // 결제 영수증 링크
3008
3032
  receiptUrl: Ue()
3009
3033
  }), $a = Nt({
3034
+ // 멤버 이름
3010
3035
  name: Ue(),
3036
+ // 멤버 이메일
3011
3037
  email: Ue().email(),
3038
+ // 멤버 프로필 이미지 링크
3012
3039
  profileImageUrl: Ue(),
3040
+ // 멤버 역할
3013
3041
  role: Ue()
3014
3042
  });
3015
3043
  class Gs {
@@ -3036,10 +3064,10 @@ class Gs {
3036
3064
  const s = `8g_wf_${Date.now()}_${Math.random()}`, i = e.timeoutMs ?? 6e5, c = setTimeout(() => {
3037
3065
  a(lt.requestTimeout(i));
3038
3066
  }, i), f = (b) => {
3039
- var _, I, S, k;
3040
- if (((_ = b.data) == null ? void 0 : _.type) === "8G_COLLECT_RESPONSE" && b.data.requestId === s) {
3067
+ var k, I, S, x;
3068
+ if (((k = b.data) == null ? void 0 : k.type) === "8G_COLLECT_RESPONSE" && b.data.requestId === s) {
3041
3069
  clearTimeout(c), window.removeEventListener("message", f);
3042
- const E = b.data, R = ((I = E == null ? void 0 : E.result) == null ? void 0 : I.steps) ?? ((k = (S = E == null ? void 0 : E.result) == null ? void 0 : S.result) == null ? void 0 : k.steps) ?? [];
3070
+ const E = b.data, R = ((I = E == null ? void 0 : E.result) == null ? void 0 : I.steps) ?? ((x = (S = E == null ? void 0 : E.result) == null ? void 0 : S.result) == null ? void 0 : x.steps) ?? [];
3043
3071
  t({
3044
3072
  success: E.success,
3045
3073
  steps: R,
@@ -3067,6 +3095,7 @@ class Gs {
3067
3095
  const a = (c = (i = t.steps[t.steps.length - 1]) == null ? void 0 : i.result) == null ? void 0 : c.data;
3068
3096
  if (!a || !Array.isArray(a))
3069
3097
  return {
3098
+ ...t,
3070
3099
  data: [],
3071
3100
  isSuccess: !1
3072
3101
  };
@@ -3076,53 +3105,70 @@ class Gs {
3076
3105
  b.success ? s.push(b.data) : console.warn("Invalid workspace data:", f, b.error);
3077
3106
  }
3078
3107
  return {
3108
+ ...t,
3079
3109
  data: s,
3080
3110
  isSuccess: !0
3081
3111
  };
3082
3112
  }
3083
3113
  // 플랜, 결제주기
3084
- async getWorkspacePlanAndCycle(e) {
3085
- var i, c;
3086
- const t = await this.collectWorkflow(e);
3087
- if (!t.success)
3114
+ async getWorkspacePlanAndCycle(e, t) {
3115
+ var c, f;
3116
+ t.workflow.vars = {
3117
+ ...t.workflow.vars,
3118
+ workspaceKey: e
3119
+ };
3120
+ const a = await this.collectWorkflow(t);
3121
+ if (!a.success)
3088
3122
  throw new lt("Failed to get workspace plan and cycle", "GET_WORKSPACE_PLAN_AND_CYCLE_FAILED");
3089
- const a = (c = (i = t.steps[t.steps.length - 1]) == null ? void 0 : i.result) == null ? void 0 : c.data;
3090
- if (!a)
3091
- return null;
3092
- const s = ja.safeParse(a);
3093
- return s.success ? s.data : (console.warn("Invalid workspace billing data:", a, s.error), null);
3123
+ const s = (f = (c = a.steps[a.steps.length - 1]) == null ? void 0 : c.result) == null ? void 0 : f.data;
3124
+ if (!s)
3125
+ return { ...a };
3126
+ const i = ja.safeParse(s);
3127
+ if (i.success) {
3128
+ const b = i.data;
3129
+ return { ...a, ...b };
3130
+ } else
3131
+ return console.warn("Invalid workspace billing data:", s, i.error), { ...a };
3094
3132
  }
3095
3133
  // 결제내역
3096
- async getWorkspaceBillingHistories(e) {
3097
- var i, c;
3098
- const t = await this.collectWorkflow(e);
3099
- if (!t.success)
3134
+ async getWorkspaceBillingHistories(e, t) {
3135
+ var c, f;
3136
+ t.workflow.vars = {
3137
+ ...t.workflow.vars,
3138
+ workspaceKey: e
3139
+ };
3140
+ const a = await this.collectWorkflow(t);
3141
+ if (!a.success)
3100
3142
  throw new lt("Failed to get workspace billing histories", "GET_WORKSPACE_BILLING_HISTORIES_FAILED");
3101
- const a = (c = (i = t.steps[t.steps.length - 1]) == null ? void 0 : i.result) == null ? void 0 : c.data;
3102
- if (!a || !Array.isArray(a))
3103
- return [];
3104
- const s = [];
3105
- for (const f of a) {
3106
- const b = Fa.safeParse(f);
3107
- b.success ? s.push(b.data) : console.warn("Invalid workspace billing history data:", f, b.error);
3143
+ const s = (f = (c = a.steps[a.steps.length - 1]) == null ? void 0 : c.result) == null ? void 0 : f.data;
3144
+ if (!s || !Array.isArray(s))
3145
+ return { ...a, data: [] };
3146
+ const i = [];
3147
+ for (const b of s) {
3148
+ const k = Fa.safeParse(b);
3149
+ k.success ? i.push(k.data) : console.warn("Invalid workspace billing history data:", b, k.error);
3108
3150
  }
3109
- return s;
3151
+ return { ...a, data: i };
3110
3152
  }
3111
3153
  // 구성원
3112
- async getWorkspaceMembers(e) {
3113
- var i, c;
3114
- const t = await this.collectWorkflow(e);
3115
- if (!t.success)
3154
+ async getWorkspaceMembers(e, t) {
3155
+ var c, f;
3156
+ t.workflow.vars = {
3157
+ ...t.workflow.vars,
3158
+ workspaceKey: e
3159
+ };
3160
+ const a = await this.collectWorkflow(t);
3161
+ if (!a.success)
3116
3162
  throw new lt("Failed to get workspace members", "GET_WORKSPACE_MEMBERS_FAILED");
3117
- const a = (c = (i = t.steps[t.steps.length - 1]) == null ? void 0 : i.result) == null ? void 0 : c.data;
3118
- if (!a || !Array.isArray(a))
3119
- return [];
3120
- const s = [];
3121
- for (const f of a) {
3122
- const b = $a.safeParse(f);
3123
- b.success ? s.push(b.data) : console.warn("Invalid workspace member data:", f, b.error);
3163
+ const s = (f = (c = a.steps[a.steps.length - 1]) == null ? void 0 : c.result) == null ? void 0 : f.data;
3164
+ if (!s || !Array.isArray(s))
3165
+ return { ...a, data: [] };
3166
+ const i = [];
3167
+ for (const b of s) {
3168
+ const k = $a.safeParse(b);
3169
+ k.success ? i.push(k.data) : console.warn("Invalid workspace member data:", b, k.error);
3124
3170
  }
3125
- return s;
3171
+ return { ...a, data: i };
3126
3172
  }
3127
3173
  }
3128
3174
  const bt = Nt({
@@ -3273,8 +3319,8 @@ class Wa extends Dr {
3273
3319
  if (s) {
3274
3320
  a.setAttribute("data-contains", s);
3275
3321
  const f = Array.from(a.childNodes).filter((b) => b.nodeType === Node.TEXT_NODE).map((b) => {
3276
- var _;
3277
- return ((_ = b.textContent) == null ? void 0 : _.trim()) || "";
3322
+ var k;
3323
+ return ((k = b.textContent) == null ? void 0 : k.trim()) || "";
3278
3324
  }).join(" ").trim();
3279
3325
  (f && f === s || a.children.length === 0 && s) && a.setAttribute("data-equal", s);
3280
3326
  }
@@ -3286,19 +3332,19 @@ class Va extends Dr {
3286
3332
  const { selector: a, option: s } = e, { multiple: i = !1 } = s || {};
3287
3333
  if (!a || a.trim() === "")
3288
3334
  return null;
3289
- const c = a.split("|>").map((_) => _.trim());
3335
+ const c = a.split("|>").map((k) => k.trim());
3290
3336
  if (c.length !== 2)
3291
3337
  return null;
3292
3338
  const f = c[0], b = c[1];
3293
3339
  if (!f || !b)
3294
3340
  return null;
3295
3341
  try {
3296
- const _ = t.querySelector(f);
3297
- if (!_ || !_.contentDocument) return null;
3298
- const I = _.contentDocument;
3342
+ const k = t.querySelector(f);
3343
+ if (!k || !k.contentDocument) return null;
3344
+ const I = k.contentDocument;
3299
3345
  return i ? Array.from(I.querySelectorAll(b)) : I.querySelector(b);
3300
- } catch (_) {
3301
- return console.error("Iframe Selector error:", _), null;
3346
+ } catch (k) {
3347
+ return console.error("Iframe Selector error:", k), null;
3302
3348
  }
3303
3349
  }
3304
3350
  }
@@ -3311,12 +3357,12 @@ class qa extends Dr {
3311
3357
  let f = t;
3312
3358
  try {
3313
3359
  for (let b = 0; b < c.length; b++) {
3314
- const _ = c[b], I = b === c.length - 1;
3315
- if (!_)
3360
+ const k = c[b], I = b === c.length - 1;
3361
+ if (!k)
3316
3362
  return null;
3317
3363
  if (I && i)
3318
- return Array.from(f.querySelectorAll(_));
3319
- const S = f.querySelector(_);
3364
+ return Array.from(f.querySelectorAll(k));
3365
+ const S = f.querySelector(k);
3320
3366
  if (!S) return null;
3321
3367
  if (I)
3322
3368
  return S;
@@ -3345,8 +3391,8 @@ class Ha extends Dr {
3345
3391
  if (i) {
3346
3392
  const f = [];
3347
3393
  for (let b = 0; b < c.snapshotLength; b++) {
3348
- const _ = c.snapshotItem(b);
3349
- _ && _.nodeType === Node.ELEMENT_NODE && f.push(_);
3394
+ const k = c.snapshotItem(b);
3395
+ k && k.nodeType === Node.ELEMENT_NODE && f.push(k);
3350
3396
  }
3351
3397
  return Promise.resolve(f.length > 0 ? f : null);
3352
3398
  } else {
@@ -3454,10 +3500,10 @@ async function Ja(r) {
3454
3500
  suffixText: c = "",
3455
3501
  findBy: f = "cssSelector",
3456
3502
  option: b,
3457
- filterEmpty: _ = !0,
3503
+ filterEmpty: k = !0,
3458
3504
  scrollToCollect: I = !1,
3459
3505
  scrollDistance: S = 500,
3460
- scrollWaitMs: k = 300,
3506
+ scrollWaitMs: x = 300,
3461
3507
  maxScrollAttempts: E = 100
3462
3508
  } = r;
3463
3509
  if (!e)
@@ -3472,9 +3518,9 @@ async function Ja(r) {
3472
3518
  regex: s,
3473
3519
  prefixText: i,
3474
3520
  suffixText: c,
3475
- filterEmpty: _,
3521
+ filterEmpty: k,
3476
3522
  scrollDistance: S,
3477
- scrollWaitMs: k,
3523
+ scrollWaitMs: x,
3478
3524
  maxScrollAttempts: E
3479
3525
  });
3480
3526
  const R = await pt({ selector: e, findBy: f, option: b });
@@ -3489,7 +3535,7 @@ async function Ja(r) {
3489
3535
  );
3490
3536
  if (Array.isArray(R)) {
3491
3537
  const me = R.map(se);
3492
- return { data: _ ? me.filter((H) => H.trim() !== "") : me };
3538
+ return { data: k ? me.filter((H) => H.trim() !== "") : me };
3493
3539
  } else
3494
3540
  return { data: se(R) };
3495
3541
  } catch (e) {
@@ -3510,20 +3556,20 @@ async function Xa(r) {
3510
3556
  regex: c,
3511
3557
  prefixText: f,
3512
3558
  suffixText: b,
3513
- filterEmpty: _,
3559
+ filterEmpty: k,
3514
3560
  scrollDistance: I,
3515
3561
  scrollWaitMs: S,
3516
- maxScrollAttempts: k
3562
+ maxScrollAttempts: x
3517
3563
  } = r, E = on(s, i, c, f, b), R = /* @__PURE__ */ new Set();
3518
3564
  let se = 0, me = 0;
3519
3565
  const ge = 5;
3520
- for (; se < k; ) {
3566
+ for (; se < x; ) {
3521
3567
  const H = await pt({ selector: e, findBy: t, option: a });
3522
3568
  if (H && Array.isArray(H)) {
3523
3569
  const B = R.size;
3524
3570
  if (H.forEach((L) => {
3525
3571
  const W = E(L);
3526
- (!_ || W.trim() !== "") && R.add(W);
3572
+ (!k || W.trim() !== "") && R.add(W);
3527
3573
  }), R.size === B) {
3528
3574
  if (me++, me >= ge)
3529
3575
  break;
@@ -3967,16 +4013,16 @@ async function _s(r) {
3967
4013
  } = r;
3968
4014
  console.log("[WaitForCondition] Starting wait with conditions:", e), console.log("[WaitForCondition] Mode:", t, "Timeout:", s);
3969
4015
  const c = !!(e.urlPattern || e.elementExists || e.cookieExists || e.storageKey), f = e.userConfirmation === !0;
3970
- let b = null, _ = null;
4016
+ let b = null, k = null;
3971
4017
  (t === "manual" || t === "auto-or-manual") && f && (b = new Promise((S) => {
3972
- _ = S;
4018
+ k = S;
3973
4019
  }), window.dispatchEvent(
3974
4020
  new CustomEvent("8g-show-confirmation-ui", {
3975
4021
  detail: {
3976
4022
  message: e.message || "작업을 완료하셨나요?",
3977
4023
  buttonText: e.buttonText || "완료",
3978
4024
  position: i,
3979
- onConfirm: _
4025
+ onConfirm: k
3980
4026
  }
3981
4027
  })
3982
4028
  ));
@@ -3993,9 +4039,9 @@ async function _s(r) {
3993
4039
  console.warn("[WaitForCondition] Invalid URL pattern:", S);
3994
4040
  }
3995
4041
  if (e.elementExists) {
3996
- const { selector: S, findBy: k } = e.elementExists;
4042
+ const { selector: S, findBy: x } = e.elementExists;
3997
4043
  let E = null;
3998
- if (k === "cssSelector" ? E = document.querySelector(S) : k === "xpath" && (E = document.evaluate(
4044
+ if (x === "cssSelector" ? E = document.querySelector(S) : x === "xpath" && (E = document.evaluate(
3999
4045
  S,
4000
4046
  document,
4001
4047
  null,
@@ -4018,20 +4064,20 @@ async function _s(r) {
4018
4064
  message: `Cookie found: ${e.cookieExists}`
4019
4065
  };
4020
4066
  if (e.storageKey) {
4021
- const { type: S, key: k } = e.storageKey;
4022
- if ((S === "localStorage" ? window.localStorage : window.sessionStorage).getItem(k) !== null)
4067
+ const { type: S, key: x } = e.storageKey;
4068
+ if ((S === "localStorage" ? window.localStorage : window.sessionStorage).getItem(x) !== null)
4023
4069
  return {
4024
4070
  success: !0,
4025
4071
  reason: "storageKey",
4026
- message: `Storage key found: ${S}.${k}`
4072
+ message: `Storage key found: ${S}.${x}`
4027
4073
  };
4028
4074
  }
4029
4075
  return null;
4030
4076
  };
4031
4077
  return new Promise((S) => {
4032
- let k = null, E = !1;
4078
+ let x = null, E = !1;
4033
4079
  const R = () => {
4034
- k && (clearInterval(k), k = null), window.dispatchEvent(new CustomEvent("8g-hide-confirmation-ui"));
4080
+ x && (clearInterval(x), x = null), window.dispatchEvent(new CustomEvent("8g-hide-confirmation-ui"));
4035
4081
  }, se = (ge) => {
4036
4082
  E || (E = !0, R(), console.log("[WaitForCondition] Resolved with:", ge), S({ data: ge }));
4037
4083
  }, me = setTimeout(() => {
@@ -4041,7 +4087,7 @@ async function _s(r) {
4041
4087
  message: `Timeout after ${s}ms`
4042
4088
  });
4043
4089
  }, s);
4044
- (t === "auto" || t === "auto-or-manual") && c && (k = setInterval(async () => {
4090
+ (t === "auto" || t === "auto-or-manual") && c && (x = setInterval(async () => {
4045
4091
  const ge = await I();
4046
4092
  ge && (clearTimeout(me), se(ge));
4047
4093
  }, a)), (t === "manual" || t === "auto-or-manual") && b && b.then(() => {
@@ -4196,16 +4242,16 @@ async function Os(r) {
4196
4242
  prefixText: c = "",
4197
4243
  suffixText: f = "",
4198
4244
  attributes: b = [],
4199
- includeSelector: _ = !1,
4245
+ includeSelector: k = !1,
4200
4246
  includeXPath: I = !1,
4201
4247
  findBy: S = "cssSelector",
4202
- option: k
4248
+ option: x
4203
4249
  } = r;
4204
4250
  if (!e)
4205
4251
  throw new Error("Selector is required for get-element-data block");
4206
4252
  if (!t && b.length === 0)
4207
4253
  throw new Error("Either includeText must be true or attributes must be provided");
4208
- const E = await pt({ selector: e, findBy: S, option: k });
4254
+ const E = await pt({ selector: e, findBy: S, option: x });
4209
4255
  if (!E)
4210
4256
  return { data: Array.isArray(E) ? [] : {} };
4211
4257
  const R = Ps(
@@ -4216,7 +4262,7 @@ async function Os(r) {
4216
4262
  c,
4217
4263
  f,
4218
4264
  b,
4219
- _,
4265
+ k,
4220
4266
  I
4221
4267
  );
4222
4268
  return Array.isArray(E) ? { data: E.map(R) } : { data: R(E) };
@@ -4229,24 +4275,24 @@ async function Os(r) {
4229
4275
  }
4230
4276
  }
4231
4277
  function Ps(r, e, t, a, s = "", i = "", c = [], f = !1, b = !1) {
4232
- return (_) => {
4278
+ return (k) => {
4233
4279
  const I = {};
4234
4280
  if (r) {
4235
4281
  let S = "";
4236
- if (e ? S = _.innerHTML : S = t ? _.textContent || "" : _.innerText || "", a) {
4237
- const k = new RegExp(a, "g"), E = S.match(k);
4282
+ if (e ? S = k.innerHTML : S = t ? k.textContent || "" : k.innerText || "", a) {
4283
+ const x = new RegExp(a, "g"), E = S.match(x);
4238
4284
  S = E ? E.join(" ") : "";
4239
4285
  }
4240
4286
  S.trim() && (S = s + S.trim() + i), I.text = S;
4241
4287
  }
4242
4288
  return c.length > 0 && (I.attributes = {}, c.forEach((S) => {
4243
- let k = _.getAttribute(S);
4244
- if (k === null) {
4245
- const E = _.querySelector(`[${S}]`);
4246
- E && (k = E.getAttribute(S));
4289
+ let x = k.getAttribute(S);
4290
+ if (x === null) {
4291
+ const E = k.querySelector(`[${S}]`);
4292
+ E && (x = E.getAttribute(S));
4247
4293
  }
4248
- I.attributes[S] = k;
4249
- })), f && (I.selector = Ga.generate(_)), b && (I.xpath = Cs.generate(_)), I;
4294
+ I.attributes[S] = x;
4295
+ })), f && (I.selector = Ga.generate(k)), b && (I.xpath = Cs.generate(k)), I;
4250
4296
  };
4251
4297
  }
4252
4298
  const wn = bt.extend({
@@ -4330,7 +4376,7 @@ async function Fs(r, e, t, a) {
4330
4376
  top: e,
4331
4377
  behavior: t
4332
4378
  // Use provided behavior
4333
- }), await new Promise((_) => setTimeout(_, a));
4379
+ }), await new Promise((k) => setTimeout(k, a));
4334
4380
  const c = document.body.scrollHeight, f = window.pageYOffset || document.documentElement.scrollTop, b = window.innerHeight;
4335
4381
  if (f + b >= c - 10 && c === i)
4336
4382
  break;
@@ -4397,22 +4443,22 @@ function Bs() {
4397
4443
  })(function() {
4398
4444
  return (/* @__PURE__ */ (function() {
4399
4445
  function t(a, s, i) {
4400
- function c(_, I) {
4401
- if (!s[_]) {
4402
- if (!a[_]) {
4446
+ function c(k, I) {
4447
+ if (!s[k]) {
4448
+ if (!a[k]) {
4403
4449
  var S = typeof kr == "function" && kr;
4404
- if (!I && S) return S(_, !0);
4405
- if (f) return f(_, !0);
4406
- var k = new Error("Cannot find module '" + _ + "'");
4407
- throw k.code = "MODULE_NOT_FOUND", k;
4450
+ if (!I && S) return S(k, !0);
4451
+ if (f) return f(k, !0);
4452
+ var x = new Error("Cannot find module '" + k + "'");
4453
+ throw x.code = "MODULE_NOT_FOUND", x;
4408
4454
  }
4409
- var E = s[_] = { exports: {} };
4410
- a[_][0].call(E.exports, function(R) {
4411
- var se = a[_][1][R];
4455
+ var E = s[k] = { exports: {} };
4456
+ a[k][0].call(E.exports, function(R) {
4457
+ var se = a[k][1][R];
4412
4458
  return c(se || R);
4413
4459
  }, E, E.exports, t, a, s, i);
4414
4460
  }
4415
- return s[_].exports;
4461
+ return s[k].exports;
4416
4462
  }
4417
4463
  for (var f = typeof kr == "function" && kr, b = 0; b < i.length; b++) c(i[b]);
4418
4464
  return c;
@@ -4441,7 +4487,7 @@ function Bs() {
4441
4487
  "Seventeen",
4442
4488
  "Eighteen",
4443
4489
  "Nineteen"
4444
- ], _ = [
4490
+ ], k = [
4445
4491
  "Zeroth",
4446
4492
  "First",
4447
4493
  "Second",
@@ -4463,11 +4509,11 @@ function Bs() {
4463
4509
  "Eighteenth",
4464
4510
  "Nineteenth"
4465
4511
  ], I = ["Twenty", "Thirty", "Forty", "Fifty", "Sixty", "Seventy", "Eighty", "Ninety", "Hundred"], S = ["Thousand", "Million", "Billion", "Trillion"];
4466
- function k(v, A) {
4512
+ function x(v, A) {
4467
4513
  var w = function($, j, C) {
4468
4514
  var F = "";
4469
4515
  if ($ <= 19)
4470
- F = (j ? " and " : "") + (C ? _[$] : b[$]);
4516
+ F = (j ? " and " : "") + (C ? k[$] : b[$]);
4471
4517
  else if ($ < 100) {
4472
4518
  const ye = Math.floor($ / 10), we = $ % 10;
4473
4519
  F = (j ? " and " : "") + I[ye - 2], we > 0 ? F += "-" + w(we, !1, C) : C && (F = F.substring(0, F.length - 1) + "ieth");
@@ -4487,7 +4533,7 @@ function Bs() {
4487
4533
  const E = {};
4488
4534
  b.forEach(function(v, A) {
4489
4535
  E[v.toLowerCase()] = A;
4490
- }), _.forEach(function(v, A) {
4536
+ }), k.forEach(function(v, A) {
4491
4537
  E[v.toLowerCase()] = A;
4492
4538
  }), I.forEach(function(v, A) {
4493
4539
  const w = v.toLowerCase();
@@ -4576,7 +4622,7 @@ function Bs() {
4576
4622
  w = ge(v), A.case === L.UPPER && (w = w.toUpperCase());
4577
4623
  break;
4578
4624
  case T.WORDS:
4579
- w = k(v, A.ordinal), A.case === L.UPPER ? w = w.toUpperCase() : A.case === L.LOWER && (w = w.toLowerCase());
4625
+ w = x(v, A.ordinal), A.case === L.UPPER ? w = w.toUpperCase() : A.case === L.LOWER && (w = w.toLowerCase());
4580
4626
  break;
4581
4627
  case T.DECIMAL:
4582
4628
  w = "" + v;
@@ -5106,7 +5152,7 @@ function Bs() {
5106
5152
  (function() {
5107
5153
  var c = t("./utils");
5108
5154
  const f = (() => {
5109
- var b = c.isNumeric, _ = c.isArrayOfStrings, I = c.isArrayOfNumbers, S = c.createSequence, k = c.isSequence, E = c.isFunction, R = c.isLambda, se = c.isPromise, me = c.getFunctionArity, ge = c.isDeepEqual, H = c.stringToArray;
5155
+ var b = c.isNumeric, k = c.isArrayOfStrings, I = c.isArrayOfNumbers, S = c.createSequence, x = c.isSequence, E = c.isFunction, R = c.isLambda, se = c.isPromise, me = c.getFunctionArity, ge = c.isDeepEqual, H = c.stringToArray;
5110
5156
  function N(n) {
5111
5157
  if (!(typeof n > "u")) {
5112
5158
  var o = 0;
@@ -5149,8 +5195,8 @@ function Bs() {
5149
5195
  stack: new Error().stack
5150
5196
  };
5151
5197
  var g = o ? 2 : 0;
5152
- Array.isArray(n) && n.outerWrapper && (n = n[0]), l = JSON.stringify(n, function(p, x) {
5153
- return typeof x < "u" && x !== null && x.toPrecision && b(x) ? Number(x.toPrecision(15)) : x && E(x) ? "" : x;
5198
+ Array.isArray(n) && n.outerWrapper && (n = n[0]), l = JSON.stringify(n, function(p, _) {
5199
+ return typeof _ < "u" && _ !== null && _.toPrecision && b(_) ? Number(_.toPrecision(15)) : _ && E(_) ? "" : _;
5154
5200
  }, g);
5155
5201
  }
5156
5202
  return l;
@@ -5162,8 +5208,8 @@ function Bs() {
5162
5208
  if (p + o < 0 && (o = 0), typeof l < "u") {
5163
5209
  if (l <= 0)
5164
5210
  return "";
5165
- var x = o >= 0 ? o + l : p + o + l;
5166
- return g.slice(o, x).join("");
5211
+ var _ = o >= 0 ? o + l : p + o + l;
5212
+ return g.slice(o, _).join("");
5167
5213
  }
5168
5214
  return g.slice(o).join("");
5169
5215
  }
@@ -5205,8 +5251,8 @@ function Bs() {
5205
5251
  o = Math.trunc(o);
5206
5252
  var p = Math.abs(o) - Me(n);
5207
5253
  if (p > 0) {
5208
- var x = new Array(p + 1).join(l);
5209
- l.length > 1 && (x = de(x, 0, p)), o > 0 ? g = n + x : g = x + n;
5254
+ var _ = new Array(p + 1).join(l);
5255
+ l.length > 1 && (_ = de(_, 0, p)), o > 0 ? g = n + _ : g = _ + n;
5210
5256
  } else
5211
5257
  g = n;
5212
5258
  return g;
@@ -5244,14 +5290,14 @@ function Bs() {
5244
5290
  };
5245
5291
  var g = S();
5246
5292
  if (typeof l > "u" || l > 0) {
5247
- var p = 0, x = await ue(o, n);
5248
- if (typeof x < "u")
5249
- for (; typeof x < "u" && (typeof l > "u" || p < l); )
5293
+ var p = 0, _ = await ue(o, n);
5294
+ if (typeof _ < "u")
5295
+ for (; typeof _ < "u" && (typeof l > "u" || p < l); )
5250
5296
  g.push({
5251
- match: x.match,
5252
- index: x.start,
5253
- groups: x.groups
5254
- }), x = await ue(x.next), p++;
5297
+ match: _.match,
5298
+ index: _.start,
5299
+ groups: _.groups
5300
+ }), _ = await ue(_.next), p++;
5255
5301
  }
5256
5302
  return g;
5257
5303
  }
@@ -5273,8 +5319,8 @@ function Bs() {
5273
5319
  value: g,
5274
5320
  index: 4
5275
5321
  };
5276
- var x;
5277
- typeof l == "string" ? x = function(Se) {
5322
+ var _;
5323
+ typeof l == "string" ? _ = function(Se) {
5278
5324
  for (var ze = "", ke = 0, je = l.indexOf("$", ke); je !== -1 && ke < l.length; ) {
5279
5325
  ze += l.substring(ke, je), ke = je + 1;
5280
5326
  var ot = l.charAt(ke);
@@ -5297,7 +5343,7 @@ function Bs() {
5297
5343
  je = l.indexOf("$", ke);
5298
5344
  }
5299
5345
  return ze += l.substring(ke), ze;
5300
- } : x = l;
5346
+ } : _ = l;
5301
5347
  var M = "", q = 0;
5302
5348
  if (typeof g > "u" || g > 0) {
5303
5349
  var X = 0;
@@ -5310,7 +5356,7 @@ function Bs() {
5310
5356
  if (typeof pe < "u") {
5311
5357
  for (; typeof pe < "u" && (typeof g > "u" || X < g); ) {
5312
5358
  M += n.substring(q, pe.start);
5313
- var Pe = x.apply(p, [pe]);
5359
+ var Pe = _.apply(p, [pe]);
5314
5360
  if (se(Pe) && (Pe = await Pe), typeof Pe == "string")
5315
5361
  M += Pe;
5316
5362
  else
@@ -5430,10 +5476,10 @@ function Bs() {
5430
5476
  if (typeof o == "string")
5431
5477
  g = n.split(o, l);
5432
5478
  else {
5433
- var p = 0, x = await ue(o, n);
5434
- if (typeof x < "u") {
5435
- for (var M = 0; typeof x < "u" && (typeof l > "u" || p < l); )
5436
- g.push(n.substring(M, x.start)), M = x.end, x = await ue(x.next), p++;
5479
+ var p = 0, _ = await ue(o, n);
5480
+ if (typeof _ < "u") {
5481
+ for (var M = 0; typeof _ < "u" && (typeof l > "u" || p < l); )
5482
+ g.push(n.substring(M, _.start)), M = _.end, _ = await ue(_.next), p++;
5437
5483
  (typeof l > "u" || p < l) && g.push(n.substring(M));
5438
5484
  } else
5439
5485
  g.push(n);
@@ -5463,9 +5509,9 @@ function Bs() {
5463
5509
  typeof l < "u" && Object.keys(l).forEach(function(te) {
5464
5510
  p[te] = l[te];
5465
5511
  });
5466
- for (var x = [], M = p["zero-digit"].charCodeAt(0), q = M; q < M + 10; q++)
5467
- x.push(String.fromCharCode(q));
5468
- var X = x.concat([p["decimal-separator"], p["exponent-separator"], p["grouping-separator"], p.digit, p["pattern-separator"]]), De = o.split(p["pattern-separator"]);
5512
+ for (var _ = [], M = p["zero-digit"].charCodeAt(0), q = M; q < M + 10; q++)
5513
+ _.push(String.fromCharCode(q));
5514
+ var X = _.concat([p["decimal-separator"], p["exponent-separator"], p["grouping-separator"], p.digit, p["pattern-separator"]]), De = o.split(p["pattern-separator"]);
5469
5515
  if (De.length > 2)
5470
5516
  throw {
5471
5517
  code: "D3080",
@@ -5499,7 +5545,7 @@ function Bs() {
5499
5545
  var St = !1;
5500
5546
  for (Ye = 0; Ye < te.mantissaPart.length; Ye++) {
5501
5547
  var Qe = te.mantissaPart.charAt(Ye);
5502
- if (x.indexOf(Qe) !== -1 || Qe === p.digit) {
5548
+ if (_.indexOf(Qe) !== -1 || Qe === p.digit) {
5503
5549
  St = !0;
5504
5550
  break;
5505
5551
  }
@@ -5511,13 +5557,13 @@ function Bs() {
5511
5557
  It.indexOf("p") !== -1 && (Ie = "D3086"), Xe !== -1 ? (Ne.charAt(Xe - 1) === p["grouping-separator"] || Ne.charAt(Xe + 1) === p["grouping-separator"]) && (Ie = "D3087") : te.integerPart.charAt(te.integerPart.length - 1) === p["grouping-separator"] && (Ie = "D3088"), Ne.indexOf(p["grouping-separator"] + p["grouping-separator"]) !== -1 && (Ie = "D3089");
5512
5558
  var rt = te.integerPart.indexOf(p.digit);
5513
5559
  rt !== -1 && te.integerPart.substring(0, rt).split("").filter(function(Be) {
5514
- return x.indexOf(Be) > -1;
5560
+ return _.indexOf(Be) > -1;
5515
5561
  }).length > 0 && (Ie = "D3090"), rt = te.fractionalPart.lastIndexOf(p.digit), rt !== -1 && te.fractionalPart.substring(rt).split("").filter(function(Be) {
5516
- return x.indexOf(Be) > -1;
5562
+ return _.indexOf(Be) > -1;
5517
5563
  }).length > 0 && (Ie = "D3091");
5518
5564
  var ut = typeof te.exponentPart == "string";
5519
5565
  if (ut && te.exponentPart.length > 0 && (Ne.indexOf(p.percent) !== -1 || Ne.indexOf(p["per-mille"]) !== -1) && (Ie = "D3092"), ut && (te.exponentPart.length === 0 || te.exponentPart.split("").filter(function(Be) {
5520
- return x.indexOf(Be) === -1;
5566
+ return _.indexOf(Be) === -1;
5521
5567
  }).length > 0) && (Ie = "D3093"), Ie)
5522
5568
  throw {
5523
5569
  code: Ie,
@@ -5527,7 +5573,7 @@ function Bs() {
5527
5573
  var Ie = function(Ve, br) {
5528
5574
  for (var er = [], kt = Ve.indexOf(p["grouping-separator"]); kt !== -1; ) {
5529
5575
  var wr = (br ? Ve.substring(0, kt) : Ve.substring(kt)).split("").filter(function(zt) {
5530
- return x.indexOf(zt) !== -1 || zt === p.digit;
5576
+ return _.indexOf(zt) !== -1 || zt === p.digit;
5531
5577
  }).length;
5532
5578
  er.push(wr), kt = te.integerPart.indexOf(p["grouping-separator"], kt + 1);
5533
5579
  }
@@ -5542,16 +5588,16 @@ function Bs() {
5542
5588
  return 0;
5543
5589
  return er;
5544
5590
  }, Xe = Ne(Ye), St = Ie(te.fractionalPart, !0), Qe = te.integerPart.split("").filter(function(Ve) {
5545
- return x.indexOf(Ve) !== -1;
5591
+ return _.indexOf(Ve) !== -1;
5546
5592
  }).length, It = Qe, rt = te.fractionalPart.split(""), ut = rt.filter(function(Ve) {
5547
- return x.indexOf(Ve) !== -1;
5593
+ return _.indexOf(Ve) !== -1;
5548
5594
  }).length, Be = rt.filter(function(Ve) {
5549
- return x.indexOf(Ve) !== -1 || Ve === p.digit;
5595
+ return _.indexOf(Ve) !== -1 || Ve === p.digit;
5550
5596
  }).length, nt = typeof te.exponentPart == "string";
5551
5597
  Qe === 0 && Be === 0 && (nt ? (ut = 1, Be = 1) : Qe = 1), nt && Qe === 0 && te.integerPart.indexOf(p.digit) !== -1 && (Qe = 1), Qe === 0 && ut === 0 && (ut = 1);
5552
5598
  var Zr = 0;
5553
5599
  return nt && (Zr = te.exponentPart.split("").filter(function(Ve) {
5554
- return x.indexOf(Ve) !== -1;
5600
+ return _.indexOf(Ve) !== -1;
5555
5601
  }).length), {
5556
5602
  integerPartGroupingPositions: Ye,
5557
5603
  regularGrouping: Xe,
@@ -5586,7 +5632,7 @@ function Bs() {
5586
5632
  var Tn = F(Mt, $e.maximumFactionalPartSize), Lr = function(te, Ie) {
5587
5633
  var Ye = Math.abs(te).toFixed(Ie);
5588
5634
  return ot !== "0" && (Ye = Ye.split("").map(function(Ne) {
5589
- return Ne >= "0" && Ne <= "9" ? x[Ne.charCodeAt(0) - 48] : Ne;
5635
+ return Ne >= "0" && Ne <= "9" ? _[Ne.charCodeAt(0) - 48] : Ne;
5590
5636
  }).join("")), Ye;
5591
5637
  }, oe = Lr(Tn, $e.maximumFactionalPartSize), Ge = oe.indexOf(".");
5592
5638
  for (Ge === -1 ? oe = oe + We : oe = oe.replace(".", We); oe.charAt(0) === ot; )
@@ -5724,14 +5770,14 @@ function Bs() {
5724
5770
  return !K(n);
5725
5771
  }
5726
5772
  function he(n, o, l, g) {
5727
- var p = [o], x = me(n);
5728
- return x >= 2 && p.push(l), x >= 3 && p.push(g), p;
5773
+ var p = [o], _ = me(n);
5774
+ return _ >= 2 && p.push(l), _ >= 3 && p.push(g), p;
5729
5775
  }
5730
5776
  async function G(n, o) {
5731
5777
  if (!(typeof n > "u")) {
5732
5778
  for (var l = S(), g = 0; g < n.length; g++) {
5733
- var p = he(o, n[g], g, n), x = await o.apply(this, p);
5734
- typeof x < "u" && l.push(x);
5779
+ var p = he(o, n[g], g, n), _ = await o.apply(this, p);
5780
+ typeof _ < "u" && l.push(_);
5735
5781
  }
5736
5782
  return l;
5737
5783
  }
@@ -5739,7 +5785,7 @@ function Bs() {
5739
5785
  async function Ze(n, o) {
5740
5786
  if (!(typeof n > "u")) {
5741
5787
  for (var l = S(), g = 0; g < n.length; g++) {
5742
- var p = n[g], x = he(o, p, g, n), M = await o.apply(this, x);
5788
+ var p = n[g], _ = he(o, p, g, n), M = await o.apply(this, _);
5743
5789
  K(M) && l.push(p);
5744
5790
  }
5745
5791
  return l;
@@ -5748,14 +5794,14 @@ function Bs() {
5748
5794
  async function it(n, o) {
5749
5795
  if (!(typeof n > "u")) {
5750
5796
  for (var l = !1, g, p = 0; p < n.length; p++) {
5751
- var x = n[p], M = !0;
5797
+ var _ = n[p], M = !0;
5752
5798
  if (typeof o < "u") {
5753
- var q = he(o, x, p, n), X = await o.apply(this, q);
5799
+ var q = he(o, _, p, n), X = await o.apply(this, q);
5754
5800
  M = K(X);
5755
5801
  }
5756
5802
  if (M)
5757
5803
  if (!l)
5758
- g = x, l = !0;
5804
+ g = _, l = !0;
5759
5805
  else
5760
5806
  throw {
5761
5807
  stack: new Error().stack,
@@ -5772,10 +5818,10 @@ function Bs() {
5772
5818
  }
5773
5819
  }
5774
5820
  function qe() {
5775
- for (var n = [], o = Array.prototype.slice.call(arguments), l = Math.min.apply(Math, o.map(function(x) {
5776
- return Array.isArray(x) ? x.length : 0;
5821
+ for (var n = [], o = Array.prototype.slice.call(arguments), l = Math.min.apply(Math, o.map(function(_) {
5822
+ return Array.isArray(_) ? _.length : 0;
5777
5823
  })), g = 0; g < l; g++) {
5778
- var p = o.map((x) => x[g]);
5824
+ var p = o.map((_) => _[g]);
5779
5825
  n.push(p);
5780
5826
  }
5781
5827
  return n;
@@ -5789,10 +5835,10 @@ function Bs() {
5789
5835
  code: "D3050",
5790
5836
  index: 1
5791
5837
  };
5792
- var x;
5793
- for (typeof l > "u" && n.length > 0 ? (g = n[0], x = 1) : (g = l, x = 0); x < n.length; ) {
5794
- var M = [g, n[x]];
5795
- p >= 3 && M.push(x), p >= 4 && M.push(n), g = await o.apply(this, M), x++;
5838
+ var _;
5839
+ for (typeof l > "u" && n.length > 0 ? (g = n[0], _ = 1) : (g = l, _ = 0); _ < n.length; ) {
5840
+ var M = [g, n[_]];
5841
+ p >= 3 && M.push(_), p >= 4 && M.push(n), g = await o.apply(this, M), _++;
5796
5842
  }
5797
5843
  return g;
5798
5844
  }
@@ -5803,8 +5849,8 @@ function Bs() {
5803
5849
  var l = {};
5804
5850
  n.forEach(function(g) {
5805
5851
  var p = He(g);
5806
- p.forEach(function(x) {
5807
- l[x] = !0;
5852
+ p.forEach(function(_) {
5853
+ l[_] = !0;
5808
5854
  });
5809
5855
  }), o = He(l);
5810
5856
  } else n !== null && typeof n == "object" && !E(n) && Object.keys(n).forEach((g) => o.push(g));
@@ -5816,7 +5862,7 @@ function Bs() {
5816
5862
  l = S();
5817
5863
  for (var g = 0; g < n.length; g++) {
5818
5864
  var p = wt(n[g], o);
5819
- typeof p < "u" && (Array.isArray(p) ? p.forEach((x) => l.push(x)) : l.push(p));
5865
+ typeof p < "u" && (Array.isArray(p) ? p.forEach((_) => l.push(_)) : l.push(p));
5820
5866
  }
5821
5867
  } else n !== null && typeof n == "object" && !E(n) && (l = n[o]);
5822
5868
  return l;
@@ -5863,8 +5909,8 @@ function Bs() {
5863
5909
  async function Jt(n, o) {
5864
5910
  var l = S();
5865
5911
  for (var g in n) {
5866
- var p = he(o, n[g], g, n), x = await o.apply(this, p);
5867
- typeof x < "u" && l.push(x);
5912
+ var p = he(o, n[g], g, n), _ = await o.apply(this, p);
5913
+ typeof _ < "u" && l.push(_);
5868
5914
  }
5869
5915
  return l;
5870
5916
  }
@@ -5893,7 +5939,7 @@ function Bs() {
5893
5939
  return n;
5894
5940
  var l;
5895
5941
  if (typeof o > "u") {
5896
- if (!I(n) && !_(n))
5942
+ if (!I(n) && !k(n))
5897
5943
  throw {
5898
5944
  stack: new Error().stack,
5899
5945
  code: "D3070",
@@ -5914,8 +5960,8 @@ function Bs() {
5914
5960
  return M;
5915
5961
  var q = Math.floor(M.length / 2), X = M.slice(0, q), De = M.slice(q);
5916
5962
  return X = await p(X), De = await p(De), await g(X, De);
5917
- }, x = await p(n);
5918
- return x;
5963
+ }, _ = await p(n);
5964
+ return _;
5919
5965
  }
5920
5966
  }
5921
5967
  function u(n) {
@@ -5933,9 +5979,9 @@ function Bs() {
5933
5979
  if (!(typeof n > "u")) {
5934
5980
  if (!Array.isArray(n) || n.length <= 1)
5935
5981
  return n;
5936
- for (var o = k(n) ? S() : [], l = 0; l < n.length; l++) {
5937
- for (var g = n[l], p = !1, x = 0; x < o.length; x++)
5938
- if (ge(g, o[x])) {
5982
+ for (var o = x(n) ? S() : [], l = 0; l < n.length; l++) {
5983
+ for (var g = n[l], p = !1, _ = 0; _ < o.length; _++)
5984
+ if (ge(g, o[_])) {
5939
5985
  p = !0;
5940
5986
  break;
5941
5987
  }
@@ -5947,7 +5993,7 @@ function Bs() {
5947
5993
  async function y(n, o) {
5948
5994
  var l = {};
5949
5995
  for (var g in n) {
5950
- var p = n[g], x = he(o, p, g, n), M = await o.apply(this, x);
5996
+ var p = n[g], _ = he(o, p, g, n), M = await o.apply(this, _);
5951
5997
  K(M) && (l[g] = p);
5952
5998
  }
5953
5999
  return Object.keys(l).length === 0 && (l = void 0), l;
@@ -6016,8 +6062,8 @@ function Bs() {
6016
6062
  }).call(this);
6017
6063
  }).call(this, typeof Hr < "u" ? Hr : typeof self < "u" ? self : typeof window < "u" ? window : {});
6018
6064
  }, { "./utils": 6 }], 3: [function(t, a, s) {
6019
- var i = t("./datetime"), c = t("./functions"), f = t("./utils"), b = t("./parser"), _ = t("./signature"), I = (function() {
6020
- var S = f.isNumeric, k = f.isArrayOfStrings, E = f.isArrayOfNumbers, R = f.createSequence, se = f.isSequence, me = f.isFunction, ge = f.isLambda, H = f.isIterable, N = f.isPromise, ne = f.getFunctionArity, B = f.isDeepEqual, T = ct(null);
6065
+ var i = t("./datetime"), c = t("./functions"), f = t("./utils"), b = t("./parser"), k = t("./signature"), I = (function() {
6066
+ var S = f.isNumeric, x = f.isArrayOfStrings, E = f.isArrayOfNumbers, R = f.createSequence, se = f.isSequence, me = f.isFunction, ge = f.isLambda, H = f.isIterable, N = f.isPromise, ne = f.getFunctionArity, B = f.isDeepEqual, T = ct(null);
6021
6067
  async function L(u, h, y) {
6022
6068
  var n, o = y.lookup(Symbol.for("jsonata.__evaluate_entry"));
6023
6069
  switch (o && await o(u, h, y), u.type) {
@@ -6089,10 +6135,10 @@ function Bs() {
6089
6135
  var n;
6090
6136
  Array.isArray(h) && u.steps[0].type !== "variable" ? n = h : n = R(h);
6091
6137
  for (var o, l = !1, g = void 0, p = 0; p < u.steps.length; p++) {
6092
- var x = u.steps[p];
6093
- if (x.tuple && (l = !0), p === 0 && x.consarray ? o = await L(x, n, y) : l ? g = await Ae(x, n, g, y) : o = await xe(x, n, y, p === u.steps.length - 1), !l && (typeof o > "u" || o.length === 0))
6138
+ var _ = u.steps[p];
6139
+ if (_.tuple && (l = !0), p === 0 && _.consarray ? o = await L(_, n, y) : l ? g = await Ae(_, n, g, y) : o = await xe(_, n, y, p === u.steps.length - 1), !l && (typeof o > "u" || o.length === 0))
6094
6140
  break;
6095
- typeof x.focus > "u" && (n = o);
6141
+ typeof _.focus > "u" && (n = o);
6096
6142
  }
6097
6143
  if (l)
6098
6144
  if (u.tuple)
@@ -6120,10 +6166,10 @@ function Bs() {
6120
6166
  g = await ve(u.stages[p].expr, g, y);
6121
6167
  typeof g < "u" && o.push(g);
6122
6168
  }
6123
- var x = R();
6124
- return n && o.length === 1 && Array.isArray(o[0]) && !se(o[0]) ? x = o[0] : o.forEach(function(M) {
6125
- !Array.isArray(M) || M.cons ? x.push(M) : M.forEach((q) => x.push(q));
6126
- }), x;
6169
+ var _ = R();
6170
+ return n && o.length === 1 && Array.isArray(o[0]) && !se(o[0]) ? _ = o[0] : o.forEach(function(M) {
6171
+ !Array.isArray(M) || M.cons ? _.push(M) : M.forEach((q) => _.push(q));
6172
+ }), _;
6127
6173
  }
6128
6174
  async function Te(u, h, y) {
6129
6175
  for (var n = h, o = 0; o < u.length; o++) {
@@ -6158,11 +6204,11 @@ function Bs() {
6158
6204
  return u.stages && (o = await Te(u.stages, o, n)), o;
6159
6205
  }
6160
6206
  o = R(), o.tupleStream = !0;
6161
- var x = n;
6207
+ var _ = n;
6162
6208
  y === void 0 && (y = h.map((De) => ({ "@": De })));
6163
6209
  for (var M = 0; M < y.length; M++) {
6164
- x = de(n, y[M]);
6165
- var q = await L(u, y[M]["@"], x);
6210
+ _ = de(n, y[M]);
6211
+ var q = await L(u, y[M]["@"], _);
6166
6212
  if (typeof q < "u") {
6167
6213
  Array.isArray(q) || (q = [q]);
6168
6214
  for (var X = 0; X < q.length; X++)
@@ -6182,11 +6228,11 @@ function Bs() {
6182
6228
  for (o = 0; o < h.length; o++) {
6183
6229
  var l = h[o], g = l, p = y;
6184
6230
  h.tupleStream && (g = l["@"], p = de(y, l));
6185
- var x = await L(u, g, p);
6186
- S(x) && (x = [x]), E(x) ? x.forEach(function(q) {
6231
+ var _ = await L(u, g, p);
6232
+ S(_) && (_ = [_]), E(_) ? _.forEach(function(q) {
6187
6233
  var X = Math.floor(q);
6188
6234
  X < 0 && (X = h.length + X), X === o && n.push(l);
6189
- }) : c.boolean(x) && n.push(l);
6235
+ }) : c.boolean(_) && n.push(l);
6190
6236
  }
6191
6237
  return n;
6192
6238
  }
@@ -6195,8 +6241,8 @@ function Bs() {
6195
6241
  if (l === "and" || l === "or")
6196
6242
  try {
6197
6243
  return await Oe(o, g, l);
6198
- } catch (x) {
6199
- throw x.position = u.position, x.token = l, x;
6244
+ } catch (_) {
6245
+ throw _.position = u.position, _.token = l, _;
6200
6246
  }
6201
6247
  var p = await g();
6202
6248
  try {
@@ -6228,8 +6274,8 @@ function Bs() {
6228
6274
  n = le(o, p);
6229
6275
  break;
6230
6276
  }
6231
- } catch (x) {
6232
- throw x.position = u.position, x.token = l, x;
6277
+ } catch (_) {
6278
+ throw _.position = u.position, _.token = l, _;
6233
6279
  }
6234
6280
  return n;
6235
6281
  }
@@ -6252,7 +6298,7 @@ function Bs() {
6252
6298
  break;
6253
6299
  case "[":
6254
6300
  n = [];
6255
- let g = await Promise.all(u.expressions.map(async (p, x) => (y.isParallelCall = x > 0, [p, await L(p, h, y)])));
6301
+ let g = await Promise.all(u.expressions.map(async (p, _) => (y.isParallelCall = _ > 0, [p, await L(p, h, y)])));
6256
6302
  for (let p of g) {
6257
6303
  var [o, l] = p;
6258
6304
  typeof l < "u" && (o.value === "[" ? n.push(l) : n = c.append(n, l));
@@ -6416,8 +6462,8 @@ function Bs() {
6416
6462
  var n = {}, o = {}, l = !!(h && h.tupleStream);
6417
6463
  Array.isArray(h) || (h = R(h)), h.length === 0 && h.push(void 0);
6418
6464
  for (var g = 0; g < h.length; g++)
6419
- for (var p = h[g], x = l ? de(y, p) : y, M = 0; M < u.lhs.length; M++) {
6420
- var q = u.lhs[M], X = await L(q[0], l ? p["@"] : p, x);
6465
+ for (var p = h[g], _ = l ? de(y, p) : y, M = 0; M < u.lhs.length; M++) {
6466
+ var q = u.lhs[M], X = await L(q[0], l ? p["@"] : p, _);
6421
6467
  if (typeof X != "string" && X !== void 0)
6422
6468
  throw {
6423
6469
  code: "T1003",
@@ -6522,15 +6568,15 @@ function Bs() {
6522
6568
  l.groups.push(g[p]);
6523
6569
  l.next = function() {
6524
6570
  if (!(h.lastIndex >= n.length)) {
6525
- var x = y(n, h.lastIndex);
6526
- if (x && x.match === "")
6571
+ var _ = y(n, h.lastIndex);
6572
+ if (_ && _.match === "")
6527
6573
  throw {
6528
6574
  code: "D1004",
6529
6575
  stack: new Error().stack,
6530
6576
  position: u.position,
6531
6577
  value: u.value.source
6532
6578
  };
6533
- return x;
6579
+ return _;
6534
6580
  }
6535
6581
  };
6536
6582
  }
@@ -6543,10 +6589,10 @@ function Bs() {
6543
6589
  return u.value === "" ? n = h && h.outerWrapper ? h[0] : h : n = y.lookup(u.value), n;
6544
6590
  }
6545
6591
  async function ye(u, h, y) {
6546
- var n, o = h, l = !!h.tupleStream, g = async function(x, M) {
6592
+ var n, o = h, l = !!h.tupleStream, g = async function(_, M) {
6547
6593
  for (var q = 0, X = 0; q === 0 && X < u.terms.length; X++) {
6548
- var De = u.terms[X], pe = x, Pe = y;
6549
- l && (pe = x["@"], Pe = de(y, x));
6594
+ var De = u.terms[X], pe = _, Pe = y;
6595
+ l && (pe = _["@"], Pe = de(y, _));
6550
6596
  var Se = await L(De.expression, pe, Pe);
6551
6597
  pe = M, Pe = y, l && (pe = M["@"], Pe = de(y, M));
6552
6598
  var ze = await L(De.expression, pe, Pe), ke = typeof Se, je = typeof ze;
@@ -6595,8 +6641,8 @@ function Bs() {
6595
6641
  var g = await G(l, [o], null, y), p = await L(u.pattern, g, y);
6596
6642
  if (typeof p < "u") {
6597
6643
  Array.isArray(p) || (p = [p]);
6598
- for (var x = 0; x < p.length; x++) {
6599
- var M = p[x];
6644
+ for (var _ = 0; _ < p.length; _++) {
6645
+ var M = p[_];
6600
6646
  if (M && (M.isPrototypeOf(g) || M instanceof Object.constructor))
6601
6647
  throw {
6602
6648
  code: "D1010",
@@ -6619,7 +6665,7 @@ function Bs() {
6619
6665
  var pe = await L(u.delete, M, y);
6620
6666
  if (typeof pe < "u") {
6621
6667
  var Pe = pe;
6622
- if (Array.isArray(pe) || (pe = [pe]), !k(pe))
6668
+ if (Array.isArray(pe) || (pe = [pe]), !x(pe))
6623
6669
  throw {
6624
6670
  code: "T2012",
6625
6671
  stack: new Error().stack,
@@ -6680,11 +6726,11 @@ function Bs() {
6680
6726
  } else
6681
6727
  g.push(M);
6682
6728
  }
6683
- var x = u.procedure.type === "path" ? u.procedure.steps[0].value : u.procedure.value;
6729
+ var _ = u.procedure.type === "path" ? u.procedure.steps[0].value : u.procedure.value;
6684
6730
  try {
6685
- typeof l == "object" && (l.token = x, l.position = u.position), o = await G(l, g, h, y);
6731
+ typeof l == "object" && (l.token = _, l.position = u.position), o = await G(l, g, h, y);
6686
6732
  } catch (M) {
6687
- throw M.position || (M.position = u.position), M.token || (M.token = x), M;
6733
+ throw M.position || (M.position = u.position), M.token || (M.token = _), M;
6688
6734
  }
6689
6735
  return o;
6690
6736
  }
@@ -6818,7 +6864,7 @@ function Bs() {
6818
6864
  _jsonata_function: !0,
6819
6865
  implementation: u
6820
6866
  };
6821
- return typeof h < "u" && (y.signature = _(h)), y;
6867
+ return typeof h < "u" && (y.signature = k(h)), y;
6822
6868
  }
6823
6869
  async function yr(u, h) {
6824
6870
  if (!(typeof u > "u")) {
@@ -7000,7 +7046,7 @@ function Bs() {
7000
7046
  }, "<s?s?:s>")), o.bind("millis", Z(function() {
7001
7047
  return l.getTime();
7002
7048
  }, "<:n>")), h && h.RegexEngine ? Ce.RegexEngine = h.RegexEngine : Ce.RegexEngine = RegExp, {
7003
- evaluate: async function(g, p, x) {
7049
+ evaluate: async function(g, p, _) {
7004
7050
  if (typeof n < "u") {
7005
7051
  var M = {
7006
7052
  code: "S0500",
@@ -7018,7 +7064,7 @@ function Bs() {
7018
7064
  q.bind("$", g), l = /* @__PURE__ */ new Date(), q.timestamp = l, Array.isArray(g) && !se(g) && (g = R(g), g.outerWrapper = !0);
7019
7065
  var De;
7020
7066
  try {
7021
- return De = await L(y, g, q), typeof x == "function" && x(null, De), De;
7067
+ return De = await L(y, g, q), typeof _ == "function" && _(null, De), De;
7022
7068
  } catch (pe) {
7023
7069
  throw mt(pe), pe;
7024
7070
  }
@@ -7026,8 +7072,8 @@ function Bs() {
7026
7072
  assign: function(g, p) {
7027
7073
  o.bind(g, p);
7028
7074
  },
7029
- registerFunction: function(g, p, x) {
7030
- var M = Z(p, x);
7075
+ registerFunction: function(g, p, _) {
7076
+ var M = Z(p, _);
7031
7077
  o.bind(g, M);
7032
7078
  },
7033
7079
  ast: function() {
@@ -7096,12 +7142,12 @@ function Bs() {
7096
7142
  `,
7097
7143
  r: "\r",
7098
7144
  t: " "
7099
- }, _ = function(S) {
7100
- var k = 0, E = S.length, R = function(ge, H) {
7101
- var N = { type: ge, value: H, position: k };
7145
+ }, k = function(S) {
7146
+ var x = 0, E = S.length, R = function(ge, H) {
7147
+ var N = { type: ge, value: H, position: x };
7102
7148
  return N;
7103
7149
  }, se = function() {
7104
- for (var ge = k, H = 0, N, ne, B = function(L) {
7150
+ for (var ge = x, H = 0, N, ne, B = function(L) {
7105
7151
  if (S.charAt(L) === "/" && H === 0) {
7106
7152
  for (var W = 0; S.charAt(L - (W + 1)) === "\\"; )
7107
7153
  W++;
@@ -7109,132 +7155,132 @@ function Bs() {
7109
7155
  return !0;
7110
7156
  }
7111
7157
  return !1;
7112
- }; k < E; ) {
7113
- var T = S.charAt(k);
7114
- if (B(k)) {
7115
- if (N = S.substring(ge, k), N === "")
7158
+ }; x < E; ) {
7159
+ var T = S.charAt(x);
7160
+ if (B(x)) {
7161
+ if (N = S.substring(ge, x), N === "")
7116
7162
  throw {
7117
7163
  code: "S0301",
7118
7164
  stack: new Error().stack,
7119
- position: k
7165
+ position: x
7120
7166
  };
7121
- for (k++, T = S.charAt(k), ge = k; T === "i" || T === "m"; )
7122
- k++, T = S.charAt(k);
7123
- return ne = S.substring(ge, k) + "g", new RegExp(N, ne);
7167
+ for (x++, T = S.charAt(x), ge = x; T === "i" || T === "m"; )
7168
+ x++, T = S.charAt(x);
7169
+ return ne = S.substring(ge, x) + "g", new RegExp(N, ne);
7124
7170
  }
7125
- (T === "(" || T === "[" || T === "{") && S.charAt(k - 1) !== "\\" && H++, (T === ")" || T === "]" || T === "}") && S.charAt(k - 1) !== "\\" && H--, k++;
7171
+ (T === "(" || T === "[" || T === "{") && S.charAt(x - 1) !== "\\" && H++, (T === ")" || T === "]" || T === "}") && S.charAt(x - 1) !== "\\" && H--, x++;
7126
7172
  }
7127
7173
  throw {
7128
7174
  code: "S0302",
7129
7175
  stack: new Error().stack,
7130
- position: k
7176
+ position: x
7131
7177
  };
7132
7178
  }, me = function(ge) {
7133
- if (k >= E) return null;
7134
- for (var H = S.charAt(k); k < E && `
7179
+ if (x >= E) return null;
7180
+ for (var H = S.charAt(x); x < E && `
7135
7181
  \r\v`.indexOf(H) > -1; )
7136
- k++, H = S.charAt(k);
7137
- if (H === "/" && S.charAt(k + 1) === "*") {
7138
- var N = k;
7139
- for (k += 2, H = S.charAt(k); !(H === "*" && S.charAt(k + 1) === "/"); )
7140
- if (H = S.charAt(++k), k >= E)
7182
+ x++, H = S.charAt(x);
7183
+ if (H === "/" && S.charAt(x + 1) === "*") {
7184
+ var N = x;
7185
+ for (x += 2, H = S.charAt(x); !(H === "*" && S.charAt(x + 1) === "/"); )
7186
+ if (H = S.charAt(++x), x >= E)
7141
7187
  throw {
7142
7188
  code: "S0106",
7143
7189
  stack: new Error().stack,
7144
7190
  position: N
7145
7191
  };
7146
- return k += 2, H = S.charAt(k), me(ge);
7192
+ return x += 2, H = S.charAt(x), me(ge);
7147
7193
  }
7148
7194
  if (ge !== !0 && H === "/")
7149
- return k++, R("regex", se());
7150
- if (H === "." && S.charAt(k + 1) === ".")
7151
- return k += 2, R("operator", "..");
7152
- if (H === ":" && S.charAt(k + 1) === "=")
7153
- return k += 2, R("operator", ":=");
7154
- if (H === "!" && S.charAt(k + 1) === "=")
7155
- return k += 2, R("operator", "!=");
7156
- if (H === ">" && S.charAt(k + 1) === "=")
7157
- return k += 2, R("operator", ">=");
7158
- if (H === "<" && S.charAt(k + 1) === "=")
7159
- return k += 2, R("operator", "<=");
7160
- if (H === "*" && S.charAt(k + 1) === "*")
7161
- return k += 2, R("operator", "**");
7162
- if (H === "~" && S.charAt(k + 1) === ">")
7163
- return k += 2, R("operator", "~>");
7164
- if (H === "?" && S.charAt(k + 1) === ":")
7165
- return k += 2, R("operator", "?:");
7166
- if (H === "?" && S.charAt(k + 1) === "?")
7167
- return k += 2, R("operator", "??");
7195
+ return x++, R("regex", se());
7196
+ if (H === "." && S.charAt(x + 1) === ".")
7197
+ return x += 2, R("operator", "..");
7198
+ if (H === ":" && S.charAt(x + 1) === "=")
7199
+ return x += 2, R("operator", ":=");
7200
+ if (H === "!" && S.charAt(x + 1) === "=")
7201
+ return x += 2, R("operator", "!=");
7202
+ if (H === ">" && S.charAt(x + 1) === "=")
7203
+ return x += 2, R("operator", ">=");
7204
+ if (H === "<" && S.charAt(x + 1) === "=")
7205
+ return x += 2, R("operator", "<=");
7206
+ if (H === "*" && S.charAt(x + 1) === "*")
7207
+ return x += 2, R("operator", "**");
7208
+ if (H === "~" && S.charAt(x + 1) === ">")
7209
+ return x += 2, R("operator", "~>");
7210
+ if (H === "?" && S.charAt(x + 1) === ":")
7211
+ return x += 2, R("operator", "?:");
7212
+ if (H === "?" && S.charAt(x + 1) === "?")
7213
+ return x += 2, R("operator", "??");
7168
7214
  if (Object.prototype.hasOwnProperty.call(f, H))
7169
- return k++, R("operator", H);
7215
+ return x++, R("operator", H);
7170
7216
  if (H === '"' || H === "'") {
7171
7217
  var ne = H;
7172
- k++;
7173
- for (var B = ""; k < E; ) {
7174
- if (H = S.charAt(k), H === "\\")
7175
- if (k++, H = S.charAt(k), Object.prototype.hasOwnProperty.call(b, H))
7218
+ x++;
7219
+ for (var B = ""; x < E; ) {
7220
+ if (H = S.charAt(x), H === "\\")
7221
+ if (x++, H = S.charAt(x), Object.prototype.hasOwnProperty.call(b, H))
7176
7222
  B += b[H];
7177
7223
  else if (H === "u") {
7178
- var T = S.substr(k + 1, 4);
7224
+ var T = S.substr(x + 1, 4);
7179
7225
  if (/^[0-9a-fA-F]+$/.test(T)) {
7180
7226
  var L = parseInt(T, 16);
7181
- B += String.fromCharCode(L), k += 4;
7227
+ B += String.fromCharCode(L), x += 4;
7182
7228
  } else
7183
7229
  throw {
7184
7230
  code: "S0104",
7185
7231
  stack: new Error().stack,
7186
- position: k
7232
+ position: x
7187
7233
  };
7188
7234
  } else
7189
7235
  throw {
7190
7236
  code: "S0103",
7191
7237
  stack: new Error().stack,
7192
- position: k,
7238
+ position: x,
7193
7239
  token: H
7194
7240
  };
7195
7241
  else {
7196
7242
  if (H === ne)
7197
- return k++, R("string", B);
7243
+ return x++, R("string", B);
7198
7244
  B += H;
7199
7245
  }
7200
- k++;
7246
+ x++;
7201
7247
  }
7202
7248
  throw {
7203
7249
  code: "S0101",
7204
7250
  stack: new Error().stack,
7205
- position: k
7251
+ position: x
7206
7252
  };
7207
7253
  }
7208
- var W = /^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/, de = W.exec(S.substring(k));
7254
+ var W = /^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/, de = W.exec(S.substring(x));
7209
7255
  if (de !== null) {
7210
7256
  var xe = parseFloat(de[0]);
7211
7257
  if (!isNaN(xe) && isFinite(xe))
7212
- return k += de[0].length, R("number", xe);
7258
+ return x += de[0].length, R("number", xe);
7213
7259
  throw {
7214
7260
  code: "S0102",
7215
7261
  stack: new Error().stack,
7216
- position: k,
7262
+ position: x,
7217
7263
  token: de[0]
7218
7264
  };
7219
7265
  }
7220
7266
  var Te;
7221
7267
  if (H === "`") {
7222
- k++;
7223
- var Ae = S.indexOf("`", k);
7268
+ x++;
7269
+ var Ae = S.indexOf("`", x);
7224
7270
  if (Ae !== -1)
7225
- return Te = S.substring(k, Ae), k = Ae + 1, R("name", Te);
7226
- throw k = E, {
7271
+ return Te = S.substring(x, Ae), x = Ae + 1, R("name", Te);
7272
+ throw x = E, {
7227
7273
  code: "S0105",
7228
7274
  stack: new Error().stack,
7229
- position: k
7275
+ position: x
7230
7276
  };
7231
7277
  }
7232
- for (var ve = k, Me; ; )
7278
+ for (var ve = x, Me; ; )
7233
7279
  if (Me = S.charAt(ve), ve === E || `
7234
7280
  \r\v`.indexOf(Me) > -1 || Object.prototype.hasOwnProperty.call(f, Me)) {
7235
- if (S.charAt(k) === "$")
7236
- return Te = S.substring(k + 1, ve), k = ve, R("variable", Te);
7237
- switch (Te = S.substring(k, ve), k = ve, Te) {
7281
+ if (S.charAt(x) === "$")
7282
+ return Te = S.substring(x + 1, ve), x = ve, R("variable", Te);
7283
+ switch (Te = S.substring(x, ve), x = ve, Te) {
7238
7284
  case "or":
7239
7285
  case "in":
7240
7286
  case "and":
@@ -7246,13 +7292,13 @@ function Bs() {
7246
7292
  case "null":
7247
7293
  return R("value", null);
7248
7294
  default:
7249
- return k === E && Te === "" ? null : R("name", Te);
7295
+ return x === E && Te === "" ? null : R("name", Te);
7250
7296
  }
7251
7297
  } else
7252
7298
  ve++;
7253
7299
  };
7254
7300
  return me;
7255
- }, I = function(S, k) {
7301
+ }, I = function(S, x) {
7256
7302
  var E, R, se = {}, me = [], ge = function() {
7257
7303
  var d = [];
7258
7304
  E.id !== "(end)" && d.push({ type: E.type, value: E.value, position: E.position });
@@ -7266,7 +7312,7 @@ function Bs() {
7266
7312
  token: this.value,
7267
7313
  position: this.position
7268
7314
  };
7269
- if (k)
7315
+ if (x)
7270
7316
  return d.remaining = ge(), d.type = "error", me.push(d), d;
7271
7317
  throw d.stack = new Error().stack, d;
7272
7318
  }
@@ -7274,7 +7320,7 @@ function Bs() {
7274
7320
  var V = se[d];
7275
7321
  return m = m || 0, V ? m >= V.lbp && (V.lbp = m) : (V = Object.create(H), V.id = V.value = d, V.lbp = m, se[d] = V), V;
7276
7322
  }, ne = function(d) {
7277
- if (k) {
7323
+ if (x) {
7278
7324
  d.remaining = ge(), me.push(d);
7279
7325
  var m = se["(error)"];
7280
7326
  return E = Object.create(m), E.error = d, E.type = "(error)", E;
@@ -7708,13 +7754,13 @@ function Bs() {
7708
7754
  position: d.position,
7709
7755
  token: d.value
7710
7756
  };
7711
- if (k)
7757
+ if (x)
7712
7758
  return me.push(C), { type: "error", error: C };
7713
7759
  throw C.stack = new Error().stack, C;
7714
7760
  }
7715
7761
  return d.keepArray && (m.keepArray = !0), m;
7716
7762
  };
7717
- R = _(S), B();
7763
+ R = k(S), B();
7718
7764
  var Fe = T(0);
7719
7765
  if (E.id !== "(end)") {
7720
7766
  var st = {
@@ -7746,13 +7792,13 @@ function Bs() {
7746
7792
  o: "objects",
7747
7793
  s: "strings"
7748
7794
  };
7749
- function b(_) {
7750
- for (var I = 1, S = [], k = {}, E = k; I < _.length; ) {
7751
- var R = _.charAt(I);
7795
+ function b(k) {
7796
+ for (var I = 1, S = [], x = {}, E = x; I < k.length; ) {
7797
+ var R = k.charAt(I);
7752
7798
  if (R === ":")
7753
7799
  break;
7754
7800
  var se = function() {
7755
- S.push(k), E = k, k = {};
7801
+ S.push(x), E = x, x = {};
7756
7802
  }, me = function(W, de, xe, Te) {
7757
7803
  for (var Ae = 1, ve = de; ve < W.length; )
7758
7804
  if (ve++, R = W.charAt(ve), R === Te) {
@@ -7771,19 +7817,19 @@ function Bs() {
7771
7817
  case "l":
7772
7818
  // not so sure about expecting null?
7773
7819
  case "o":
7774
- k.regex = "[" + R + "m]", k.type = R, se();
7820
+ x.regex = "[" + R + "m]", x.type = R, se();
7775
7821
  break;
7776
7822
  case "a":
7777
- k.regex = "[asnblfom]", k.type = R, k.array = !0, se();
7823
+ x.regex = "[asnblfom]", x.type = R, x.array = !0, se();
7778
7824
  break;
7779
7825
  case "f":
7780
- k.regex = "f", k.type = R, se();
7826
+ x.regex = "f", x.type = R, se();
7781
7827
  break;
7782
7828
  case "j":
7783
- k.regex = "[asnblom]", k.type = R, se();
7829
+ x.regex = "[asnblom]", x.type = R, se();
7784
7830
  break;
7785
7831
  case "x":
7786
- k.regex = "[asnblfom]", k.type = R, se();
7832
+ x.regex = "[asnblfom]", x.type = R, se();
7787
7833
  break;
7788
7834
  case "-":
7789
7835
  E.context = !0, E.contextRegex = new RegExp(E.regex), E.regex += "?";
@@ -7794,9 +7840,9 @@ function Bs() {
7794
7840
  E.regex += R;
7795
7841
  break;
7796
7842
  case "(":
7797
- var ge = me(_, I, "(", ")"), H = _.substring(I + 1, ge);
7843
+ var ge = me(k, I, "(", ")"), H = k.substring(I + 1, ge);
7798
7844
  if (H.indexOf("<") === -1)
7799
- k.regex = "[" + H + "m]";
7845
+ x.regex = "[" + H + "m]";
7800
7846
  else
7801
7847
  throw {
7802
7848
  code: "S0402",
@@ -7804,12 +7850,12 @@ function Bs() {
7804
7850
  value: H,
7805
7851
  offset: I
7806
7852
  };
7807
- k.type = "(" + H + ")", I = ge, se();
7853
+ x.type = "(" + H + ")", I = ge, se();
7808
7854
  break;
7809
7855
  case "<":
7810
7856
  if (E.type === "a" || E.type === "f") {
7811
- var N = me(_, I, "<", ">");
7812
- E.subtype = _.substring(I + 1, N), I = N;
7857
+ var N = me(k, I, "<", ">");
7858
+ E.subtype = k.substring(I + 1, N), I = N;
7813
7859
  } else
7814
7860
  throw {
7815
7861
  code: "S0401",
@@ -7869,7 +7915,7 @@ function Bs() {
7869
7915
  };
7870
7916
  };
7871
7917
  return {
7872
- definition: _,
7918
+ definition: k,
7873
7919
  validate: function(W, de) {
7874
7920
  var xe = "";
7875
7921
  W.forEach(function(Me) {
@@ -7964,7 +8010,7 @@ function Bs() {
7964
8010
  return !c(B);
7965
8011
  }).length === 0), ne;
7966
8012
  }
7967
- function _() {
8013
+ function k() {
7968
8014
  var N = [];
7969
8015
  return N.sequence = !0, arguments.length === 1 && N.push(arguments[0]), N;
7970
8016
  }
@@ -7974,7 +8020,7 @@ function Bs() {
7974
8020
  function S(N) {
7975
8021
  return N && (N._jsonata_function === !0 || N._jsonata_lambda === !0) || typeof N == "function";
7976
8022
  }
7977
- function k(N) {
8023
+ function x(N) {
7978
8024
  var ne = typeof N.arity == "number" ? N.arity : typeof N.implementation == "function" ? N.implementation.length : typeof N.length == "number" ? N.length : N.arguments.length;
7979
8025
  return ne;
7980
8026
  }
@@ -8025,12 +8071,12 @@ function Bs() {
8025
8071
  isNumeric: c,
8026
8072
  isArrayOfStrings: f,
8027
8073
  isArrayOfNumbers: b,
8028
- createSequence: _,
8074
+ createSequence: k,
8029
8075
  isSequence: I,
8030
8076
  isFunction: S,
8031
8077
  isLambda: E,
8032
8078
  isIterable: se,
8033
- getFunctionArity: k,
8079
+ getFunctionArity: x,
8034
8080
  isDeepEqual: me,
8035
8081
  stringToArray: H,
8036
8082
  isPromise: ge