@rebilly/instruments 8.50.0 → 8.51.0

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/index.js CHANGED
@@ -5996,7 +5996,7 @@ function cloneArrayDeep(val, instanceClone) {
5996
5996
  return res;
5997
5997
  }
5998
5998
  var cloneDeep_1 = cloneDeep;
5999
- const version = "55.22.0";
5999
+ const version = "55.23.1";
6000
6000
  let urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
6001
6001
  let nanoid = (size2 = 21) => {
6002
6002
  let id2 = "";
@@ -6382,9 +6382,9 @@ function AmlChecksResource({ apiHandler }) {
6382
6382
  offset = null,
6383
6383
  sort = null,
6384
6384
  filter: filter2 = null,
6385
- q = null
6385
+ q: q2 = null
6386
6386
  } = {}) {
6387
- const params = { limit, offset, sort, filter: filter2, q };
6387
+ const params = { limit, offset, sort, filter: filter2, q: q2 };
6388
6388
  return apiHandler.getAll(`aml-checks`, params);
6389
6389
  },
6390
6390
  get({ id: id2 }) {
@@ -6461,12 +6461,12 @@ function ApplicationsResource({ apiHandler }) {
6461
6461
  limit = null,
6462
6462
  offset = null,
6463
6463
  filter: filter2 = null,
6464
- q = null,
6464
+ q: q2 = null,
6465
6465
  expand = null,
6466
6466
  fields = null,
6467
6467
  sort = null
6468
6468
  } = {}) {
6469
- const params = { limit, offset, filter: filter2, q, expand, fields, sort };
6469
+ const params = { limit, offset, filter: filter2, q: q2, expand, fields, sort };
6470
6470
  return apiHandler.getAll(`applications`, params);
6471
6471
  },
6472
6472
  create({ data }) {
@@ -6502,9 +6502,9 @@ function BillingPortalsResource$1({ apiHandler }) {
6502
6502
  offset = null,
6503
6503
  sort = null,
6504
6504
  filter: filter2 = null,
6505
- q = null
6505
+ q: q2 = null
6506
6506
  } = {}) {
6507
- const params = { limit, offset, sort, filter: filter2, q };
6507
+ const params = { limit, offset, sort, filter: filter2, q: q2 };
6508
6508
  return apiHandler.getAll(`billing-portals`, params);
6509
6509
  },
6510
6510
  create({ id: id2 = "", data }) {
@@ -6528,9 +6528,9 @@ function BlocklistsResource({ apiHandler }) {
6528
6528
  offset = null,
6529
6529
  sort = null,
6530
6530
  filter: filter2 = null,
6531
- q = null
6531
+ q: q2 = null
6532
6532
  } = {}) {
6533
- const params = { limit, offset, sort, filter: filter2, q };
6533
+ const params = { limit, offset, sort, filter: filter2, q: q2 };
6534
6534
  return apiHandler.getAll(`blocklists`, params);
6535
6535
  },
6536
6536
  create({ id: id2 = "", data }) {
@@ -6571,9 +6571,9 @@ function CheckoutFormsResource$1({ apiHandler }) {
6571
6571
  offset = null,
6572
6572
  sort = null,
6573
6573
  filter: filter2 = null,
6574
- q = null
6574
+ q: q2 = null
6575
6575
  } = {}) {
6576
- const params = { limit, offset, sort, filter: filter2, q };
6576
+ const params = { limit, offset, sort, filter: filter2, q: q2 };
6577
6577
  return apiHandler.getAll(`checkout-forms`, params);
6578
6578
  },
6579
6579
  create({ id: id2 = "", data }) {
@@ -6596,10 +6596,10 @@ function CouponsResource({ apiHandler }) {
6596
6596
  limit = null,
6597
6597
  offset = null,
6598
6598
  filter: filter2 = null,
6599
- q = null,
6599
+ q: q2 = null,
6600
6600
  sort = null
6601
6601
  } = {}) {
6602
- const params = { limit, offset, filter: filter2, q, sort };
6602
+ const params = { limit, offset, filter: filter2, q: q2, sort };
6603
6603
  return apiHandler.getAll(`coupons-redemptions`, params);
6604
6604
  },
6605
6605
  redeem({ data }) {
@@ -6615,10 +6615,10 @@ function CouponsResource({ apiHandler }) {
6615
6615
  limit = null,
6616
6616
  offset = null,
6617
6617
  filter: filter2 = null,
6618
- q = null,
6618
+ q: q2 = null,
6619
6619
  sort = null
6620
6620
  } = {}) {
6621
- const params = { limit, offset, filter: filter2, q, sort };
6621
+ const params = { limit, offset, filter: filter2, q: q2, sort };
6622
6622
  return apiHandler.getAll(`coupons`, params);
6623
6623
  },
6624
6624
  create({ id: id2 = "", data }) {
@@ -6642,9 +6642,9 @@ function CreditMemosResource({ apiHandler }) {
6642
6642
  sort = null,
6643
6643
  limit = null,
6644
6644
  offset = null,
6645
- q = null
6645
+ q: q2 = null
6646
6646
  } = {}) {
6647
- const params = { filter: filter2, sort, limit, offset, q };
6647
+ const params = { filter: filter2, sort, limit, offset, q: q2 };
6648
6648
  return apiHandler.getAll(`credit-memos`, params);
6649
6649
  },
6650
6650
  create({ id: id2 = "", data }) {
@@ -6668,9 +6668,9 @@ function CreditMemosResource({ apiHandler }) {
6668
6668
  offset = null,
6669
6669
  filter: filter2 = null,
6670
6670
  sort = null,
6671
- q = null
6671
+ q: q2 = null
6672
6672
  }) {
6673
- const params = { limit, offset, filter: filter2, sort, q };
6673
+ const params = { limit, offset, filter: filter2, sort, q: q2 };
6674
6674
  return apiHandler.getAll(`credit-memos/${id2}/timeline`, params);
6675
6675
  },
6676
6676
  createTimelineComment({ id: id2, data }) {
@@ -6691,9 +6691,9 @@ function CustomDomainsResource({ apiHandler }) {
6691
6691
  offset = null,
6692
6692
  sort = null,
6693
6693
  filter: filter2 = null,
6694
- q = null
6694
+ q: q2 = null
6695
6695
  } = {}) {
6696
- const params = { limit, offset, sort, filter: filter2, q };
6696
+ const params = { limit, offset, sort, filter: filter2, q: q2 };
6697
6697
  return apiHandler.getAll(`custom-domains`, params);
6698
6698
  },
6699
6699
  create({ data }) {
@@ -6785,12 +6785,12 @@ function CustomersResource$1({ apiHandler }) {
6785
6785
  limit = null,
6786
6786
  offset = null,
6787
6787
  filter: filter2 = null,
6788
- q = null,
6788
+ q: q2 = null,
6789
6789
  expand = null,
6790
6790
  fields = null,
6791
6791
  sort = null
6792
6792
  } = {}) {
6793
- const params = { limit, offset, filter: filter2, q, expand, fields, sort };
6793
+ const params = { limit, offset, filter: filter2, q: q2, expand, fields, sort };
6794
6794
  return apiHandler.getAll(`customers`, params);
6795
6795
  },
6796
6796
  create({ id: id2 = "", data, expand = null }) {
@@ -6828,9 +6828,9 @@ function CustomersResource$1({ apiHandler }) {
6828
6828
  offset = null,
6829
6829
  filter: filter2 = null,
6830
6830
  sort = null,
6831
- q = null
6831
+ q: q2 = null
6832
6832
  }) {
6833
- const params = { limit, offset, filter: filter2, sort, q };
6833
+ const params = { limit, offset, filter: filter2, sort, q: q2 };
6834
6834
  return apiHandler.getAll(`customers/${id2}/timeline`, params);
6835
6835
  },
6836
6836
  createTimelineComment({ id: id2, data }) {
@@ -6854,9 +6854,9 @@ function CustomersResource$1({ apiHandler }) {
6854
6854
  offset = null,
6855
6855
  filter: filter2 = null,
6856
6856
  sort = null,
6857
- q = null
6857
+ q: q2 = null
6858
6858
  }) {
6859
- const params = { limit, offset, filter: filter2, sort, q };
6859
+ const params = { limit, offset, filter: filter2, sort, q: q2 };
6860
6860
  return apiHandler.getAll(`customers/${id2}/edd-timeline`, params);
6861
6861
  },
6862
6862
  createEddTimelineComment({ id: id2, data }) {
@@ -6951,10 +6951,10 @@ function DisputesResource({ apiHandler }) {
6951
6951
  sort = null,
6952
6952
  limit = null,
6953
6953
  offset = null,
6954
- q = null,
6954
+ q: q2 = null,
6955
6955
  expand = null
6956
6956
  } = {}) {
6957
- const params = { filter: filter2, sort, limit, offset, q, expand };
6957
+ const params = { filter: filter2, sort, limit, offset, q: q2, expand };
6958
6958
  return apiHandler.getAll(`disputes`, params);
6959
6959
  },
6960
6960
  create({ id: id2 = "", data, expand = null }) {
@@ -6980,9 +6980,9 @@ function EmailDeliverySettingsResource({ apiHandler }) {
6980
6980
  offset = null,
6981
6981
  filter: filter2 = null,
6982
6982
  sort = null,
6983
- q = null
6983
+ q: q2 = null
6984
6984
  } = {}) {
6985
- const params = { limit, offset, filter: filter2, sort, q };
6985
+ const params = { limit, offset, filter: filter2, sort, q: q2 };
6986
6986
  return apiHandler.getAll(`email-delivery-settings`, params);
6987
6987
  },
6988
6988
  create({ data }) {
@@ -7009,11 +7009,11 @@ function EmailMessagesResource({ apiHandler }) {
7009
7009
  getAll({
7010
7010
  limit = null,
7011
7011
  offset = null,
7012
- q = null,
7012
+ q: q2 = null,
7013
7013
  sort = null,
7014
7014
  filter: filter2 = null
7015
7015
  } = {}) {
7016
- const params = { limit, offset, q, sort, filter: filter2 };
7016
+ const params = { limit, offset, q: q2, sort, filter: filter2 };
7017
7017
  return apiHandler.getAll(`email-messages`, params);
7018
7018
  },
7019
7019
  create({ data }) {
@@ -7061,9 +7061,9 @@ function EventsResource({ apiHandler }) {
7061
7061
  offset = null,
7062
7062
  filter: filter2 = null,
7063
7063
  sort = null,
7064
- q = null
7064
+ q: q2 = null
7065
7065
  }) {
7066
- const params = { limit, offset, filter: filter2, sort, q };
7066
+ const params = { limit, offset, filter: filter2, sort, q: q2 };
7067
7067
  return apiHandler.getAll(`events/${eventType}/timeline`, params);
7068
7068
  },
7069
7069
  createTimelineComment({ eventType, data }) {
@@ -7080,11 +7080,11 @@ function EventsResource({ apiHandler }) {
7080
7080
  limit = null,
7081
7081
  offset = null,
7082
7082
  filter: filter2 = null,
7083
- q = null,
7083
+ q: q2 = null,
7084
7084
  sort = null,
7085
7085
  fields = null
7086
7086
  }) {
7087
- const params = { limit, offset, filter: filter2, q, sort, fields };
7087
+ const params = { limit, offset, filter: filter2, q: q2, sort, fields };
7088
7088
  return apiHandler.getAll(`events/${eventType}/rules/history`, params);
7089
7089
  },
7090
7090
  getRulesVersionNumber({ eventType, version: version2, fields = null }) {
@@ -7106,11 +7106,11 @@ function EventsResource({ apiHandler }) {
7106
7106
  limit = null,
7107
7107
  offset = null,
7108
7108
  filter: filter2 = null,
7109
- q = null,
7109
+ q: q2 = null,
7110
7110
  sort = null,
7111
7111
  fields = null
7112
7112
  }) {
7113
- const params = { limit, offset, filter: filter2, q, sort, fields };
7113
+ const params = { limit, offset, filter: filter2, q: q2, sort, fields };
7114
7114
  return apiHandler.getAll(`events/${eventType}/rules/drafts`, params);
7115
7115
  },
7116
7116
  createDraftRuleset({ eventType, data }) {
@@ -7192,12 +7192,12 @@ function FilesResource({ apiHandler }) {
7192
7192
  limit = null,
7193
7193
  offset = null,
7194
7194
  filter: filter2 = null,
7195
- q = null,
7195
+ q: q2 = null,
7196
7196
  expand = null,
7197
7197
  fields = null,
7198
7198
  sort = null
7199
7199
  } = {}) {
7200
- const params = { limit, offset, filter: filter2, q, expand, fields, sort };
7200
+ const params = { limit, offset, filter: filter2, q: q2, expand, fields, sort };
7201
7201
  return apiHandler.getAll(`attachments`, params);
7202
7202
  },
7203
7203
  attach({ id: id2 = "", data, expand = null }) {
@@ -7218,11 +7218,11 @@ function FilesResource({ apiHandler }) {
7218
7218
  limit = null,
7219
7219
  offset = null,
7220
7220
  filter: filter2 = null,
7221
- q = null,
7221
+ q: q2 = null,
7222
7222
  fields = null,
7223
7223
  sort = null
7224
7224
  } = {}) {
7225
- const params = { limit, offset, filter: filter2, q, fields, sort };
7225
+ const params = { limit, offset, filter: filter2, q: q2, fields, sort };
7226
7226
  return apiHandler.getAll(`files`, params);
7227
7227
  },
7228
7228
  upload({ fileObject }) {
@@ -7299,10 +7299,10 @@ function GatewayAccountsResource({ apiHandler }) {
7299
7299
  offset = null,
7300
7300
  sort = null,
7301
7301
  filter: filter2 = null,
7302
- q = null,
7302
+ q: q2 = null,
7303
7303
  fields = null
7304
7304
  } = {}) {
7305
- const params = { limit, offset, sort, filter: filter2, q, fields };
7305
+ const params = { limit, offset, sort, filter: filter2, q: q2, fields };
7306
7306
  return apiHandler.getAll(`gateway-accounts`, params);
7307
7307
  },
7308
7308
  create({ id: id2 = "", data }) {
@@ -7376,9 +7376,9 @@ function GatewayAccountsResource({ apiHandler }) {
7376
7376
  offset = null,
7377
7377
  filter: filter2 = null,
7378
7378
  sort = null,
7379
- q = null
7379
+ q: q2 = null
7380
7380
  }) {
7381
- const params = { limit, offset, filter: filter2, sort, q };
7381
+ const params = { limit, offset, filter: filter2, sort, q: q2 };
7382
7382
  return apiHandler.getAll(`gateway-accounts/${id2}/timeline`, params);
7383
7383
  },
7384
7384
  createTimelineComment({ id: id2, data }) {
@@ -7420,10 +7420,10 @@ function InvoicesResource$1({ apiHandler }) {
7420
7420
  sort = null,
7421
7421
  limit = null,
7422
7422
  offset = null,
7423
- q = null,
7423
+ q: q2 = null,
7424
7424
  expand = null
7425
7425
  } = {}) {
7426
- const params = { filter: filter2, sort, limit, offset, q, expand };
7426
+ const params = { filter: filter2, sort, limit, offset, q: q2, expand };
7427
7427
  return apiHandler.getAll(`invoices`, params);
7428
7428
  },
7429
7429
  create({ id: id2 = "", data }) {
@@ -7483,9 +7483,9 @@ function InvoicesResource$1({ apiHandler }) {
7483
7483
  offset = null,
7484
7484
  filter: filter2 = null,
7485
7485
  sort = null,
7486
- q = null
7486
+ q: q2 = null
7487
7487
  }) {
7488
- const params = { limit, offset, filter: filter2, sort, q };
7488
+ const params = { limit, offset, filter: filter2, sort, q: q2 };
7489
7489
  return apiHandler.getAll(`invoices/${id2}/timeline`, params);
7490
7490
  },
7491
7491
  createTimelineComment({ id: id2, data }) {
@@ -7657,9 +7657,9 @@ function ListsResource({ apiHandler }) {
7657
7657
  filter: filter2 = null,
7658
7658
  sort = null,
7659
7659
  fields = null,
7660
- q = null
7660
+ q: q2 = null
7661
7661
  } = {}) {
7662
- const params = { limit, offset, filter: filter2, sort, fields, q };
7662
+ const params = { limit, offset, filter: filter2, sort, fields, q: q2 };
7663
7663
  return apiHandler.getAll(`lists`, params);
7664
7664
  },
7665
7665
  create({ id: id2 = "", data }) {
@@ -7702,10 +7702,10 @@ function OrganizationExportsResource({ apiHandler }) {
7702
7702
  limit = null,
7703
7703
  offset = null,
7704
7704
  filter: filter2 = null,
7705
- q = null,
7705
+ q: q2 = null,
7706
7706
  sort = null
7707
7707
  } = {}) {
7708
- const params = { limit, offset, filter: filter2, q, sort };
7708
+ const params = { limit, offset, filter: filter2, q: q2, sort };
7709
7709
  return apiHandler.getAll(`organization-exports`, params);
7710
7710
  },
7711
7711
  create({ data }) {
@@ -7723,9 +7723,9 @@ function OrganizationsResource({ apiHandler }) {
7723
7723
  offset = null,
7724
7724
  filter: filter2 = null,
7725
7725
  sort = null,
7726
- q = null
7726
+ q: q2 = null
7727
7727
  } = {}) {
7728
- const params = { limit, offset, filter: filter2, sort, q };
7728
+ const params = { limit, offset, filter: filter2, sort, q: q2 };
7729
7729
  return apiHandler.getAll(`organizations`, params);
7730
7730
  },
7731
7731
  create({ data }) {
@@ -7741,8 +7741,8 @@ function OrganizationsResource({ apiHandler }) {
7741
7741
  }
7742
7742
  function PaymentCardsBankNamesResource({ apiHandler }) {
7743
7743
  return {
7744
- getAll({ limit = null, q = null } = {}) {
7745
- const params = { limit, q };
7744
+ getAll({ limit = null, q: q2 = null } = {}) {
7745
+ const params = { limit, q: q2 };
7746
7746
  return apiHandler.getAll(`payment-cards-bank-names`, params);
7747
7747
  }
7748
7748
  };
@@ -7754,10 +7754,10 @@ function PaymentInstrumentsResource$1({ apiHandler }) {
7754
7754
  sort = null,
7755
7755
  limit = null,
7756
7756
  offset = null,
7757
- q = null,
7757
+ q: q2 = null,
7758
7758
  expand = null
7759
7759
  } = {}) {
7760
- const params = { filter: filter2, sort, limit, offset, q, expand };
7760
+ const params = { filter: filter2, sort, limit, offset, q: q2, expand };
7761
7761
  return apiHandler.getAll(`payment-instruments`, params);
7762
7762
  },
7763
7763
  create({ data }) {
@@ -7814,6 +7814,9 @@ function PayoutRequestsResource$1({ apiHandler }) {
7814
7814
  update({ id: id2, data }) {
7815
7815
  return apiHandler.put(`payout-requests/${id2}`, data);
7816
7816
  },
7817
+ cancel({ id: id2, data }) {
7818
+ return apiHandler.post(`payout-requests/${id2}/cancel`, data);
7819
+ },
7817
7820
  getPaymentInstruments({ id: id2 }) {
7818
7821
  return apiHandler.get(`payout-requests/${id2}/payment-instruments`);
7819
7822
  }
@@ -7833,9 +7836,9 @@ function PlansResource$1({ apiHandler }) {
7833
7836
  sort = null,
7834
7837
  limit = null,
7835
7838
  offset = null,
7836
- q = null
7839
+ q: q2 = null
7837
7840
  } = {}) {
7838
- const params = { filter: filter2, sort, limit, offset, q };
7841
+ const params = { filter: filter2, sort, limit, offset, q: q2 };
7839
7842
  return apiHandler.getAll(`plans`, params);
7840
7843
  },
7841
7844
  create({ id: id2 = "", data }) {
@@ -7872,9 +7875,9 @@ function ProductsResource$1({ apiHandler }) {
7872
7875
  sort = null,
7873
7876
  limit = null,
7874
7877
  offset = null,
7875
- q = null
7878
+ q: q2 = null
7876
7879
  } = {}) {
7877
- const params = { filter: filter2, sort, limit, offset, q };
7880
+ const params = { filter: filter2, sort, limit, offset, q: q2 };
7878
7881
  return apiHandler.getAll(`products`, params);
7879
7882
  },
7880
7883
  create({ id: id2 = "", data }) {
@@ -7969,9 +7972,9 @@ function QuotesResource$1({ apiHandler }) {
7969
7972
  offset = null,
7970
7973
  filter: filter2 = null,
7971
7974
  sort = null,
7972
- q = null
7975
+ q: q2 = null
7973
7976
  }) {
7974
- const params = { limit, offset, filter: filter2, sort, q };
7977
+ const params = { limit, offset, filter: filter2, sort, q: q2 };
7975
7978
  return apiHandler.getAll(`quotes/${id2}/timeline`, params);
7976
7979
  },
7977
7980
  createTimelineComment({ id: id2, data }) {
@@ -8017,29 +8020,6 @@ function ResourceResource({ apiHandler }) {
8017
8020
  }
8018
8021
  };
8019
8022
  }
8020
- function RichBillingPortalsResource$1({ apiHandler }) {
8021
- return {
8022
- getAll({
8023
- filter: filter2 = null,
8024
- sort = null,
8025
- limit = null,
8026
- offset = null,
8027
- q = null
8028
- } = {}) {
8029
- const params = { filter: filter2, sort, limit, offset, q };
8030
- return apiHandler.getAll(`rich-billing-portals`, params);
8031
- },
8032
- create({ id: id2 = "", data }) {
8033
- return apiHandler.create(`rich-billing-portals/${id2}`, id2, data);
8034
- },
8035
- get({ id: id2 }) {
8036
- return apiHandler.get(`rich-billing-portals/${id2}`);
8037
- },
8038
- update({ id: id2, data }) {
8039
- return apiHandler.put(`rich-billing-portals/${id2}`, data);
8040
- }
8041
- };
8042
- }
8043
8023
  function RiskScoreRulesResource({ apiHandler }) {
8044
8024
  return {
8045
8025
  getAll() {
@@ -8063,10 +8043,10 @@ function RolesResource({ apiHandler }) {
8063
8043
  offset = null,
8064
8044
  filter: filter2 = null,
8065
8045
  sort = null,
8066
- q = null,
8046
+ q: q2 = null,
8067
8047
  expand = null
8068
8048
  } = {}) {
8069
- const params = { limit, offset, filter: filter2, sort, q, expand };
8049
+ const params = { limit, offset, filter: filter2, sort, q: q2, expand };
8070
8050
  return apiHandler.getAll(`roles`, params);
8071
8051
  },
8072
8052
  create({ id: id2 = "", data }) {
@@ -8086,8 +8066,8 @@ function RolesResource({ apiHandler }) {
8086
8066
  }
8087
8067
  function SearchResource({ apiHandler }) {
8088
8068
  return {
8089
- get({ sort = null, limit = null, offset = null, q = null }) {
8090
- const params = { sort, limit, offset, q };
8069
+ get({ sort = null, limit = null, offset = null, q: q2 = null }) {
8070
+ const params = { sort, limit, offset, q: q2 };
8091
8071
  return apiHandler.get(`search`, params);
8092
8072
  }
8093
8073
  };
@@ -8099,9 +8079,9 @@ function SegmentsResource({ apiHandler }) {
8099
8079
  offset = null,
8100
8080
  sort = null,
8101
8081
  filter: filter2 = null,
8102
- q = null
8082
+ q: q2 = null
8103
8083
  } = {}) {
8104
- const params = { limit, offset, sort, filter: filter2, q };
8084
+ const params = { limit, offset, sort, filter: filter2, q: q2 };
8105
8085
  return apiHandler.getAll(`grid-segments`, params);
8106
8086
  },
8107
8087
  create({ id: id2 = "", data }) {
@@ -8133,9 +8113,9 @@ function ServiceCredentialsResource({ apiHandler }) {
8133
8113
  limit = null,
8134
8114
  offset = null,
8135
8115
  sort = null,
8136
- q = null
8116
+ q: q2 = null
8137
8117
  }) {
8138
- const params = { filter: filter2, limit, offset, sort, q };
8118
+ const params = { filter: filter2, limit, offset, sort, q: q2 };
8139
8119
  return apiHandler.getAll(`service-credentials/${type2}`, params);
8140
8120
  },
8141
8121
  create({ type: type2, data }) {
@@ -8153,11 +8133,11 @@ function ServiceCredentialsResource({ apiHandler }) {
8153
8133
  limit = null,
8154
8134
  offset = null,
8155
8135
  filter: filter2 = null,
8156
- q = null,
8136
+ q: q2 = null,
8157
8137
  fields = null,
8158
8138
  sort = null
8159
8139
  }) {
8160
- const params = { limit, offset, filter: filter2, q, fields, sort };
8140
+ const params = { limit, offset, filter: filter2, q: q2, fields, sort };
8161
8141
  return apiHandler.getAll(
8162
8142
  `service-credentials/${type2}/${id2}/items`,
8163
8143
  params
@@ -8172,9 +8152,9 @@ function ShippingRatesResource({ apiHandler }) {
8172
8152
  offset = null,
8173
8153
  filter: filter2 = null,
8174
8154
  sort = null,
8175
- q = null
8155
+ q: q2 = null
8176
8156
  } = {}) {
8177
- const params = { limit, offset, filter: filter2, sort, q };
8157
+ const params = { limit, offset, filter: filter2, sort, q: q2 };
8178
8158
  return apiHandler.getAll(`shipping-rates`, params);
8179
8159
  },
8180
8160
  create({ id: id2 = "", data }) {
@@ -8259,10 +8239,10 @@ function SubscriptionsResource$2({ apiHandler }) {
8259
8239
  sort = null,
8260
8240
  limit = null,
8261
8241
  offset = null,
8262
- q = null,
8242
+ q: q2 = null,
8263
8243
  expand = null
8264
8244
  } = {}) {
8265
- const params = { filter: filter2, sort, limit, offset, q, expand };
8245
+ const params = { filter: filter2, sort, limit, offset, q: q2, expand };
8266
8246
  return apiHandler.getAll(`subscriptions`, params);
8267
8247
  },
8268
8248
  create({ id: id2 = "", data, expand = null }) {
@@ -8283,8 +8263,9 @@ function SubscriptionsResource$2({ apiHandler }) {
8283
8263
  void({ id: id2 }) {
8284
8264
  return apiHandler.post(`subscriptions/${id2}/void`);
8285
8265
  },
8286
- changeItems({ id: id2, data }) {
8287
- return apiHandler.post(`subscriptions/${id2}/change-items`, data);
8266
+ changeItems({ id: id2, data, expand = null }) {
8267
+ const params = { expand };
8268
+ return apiHandler.post(`subscriptions/${id2}/change-items`, data, params);
8288
8269
  },
8289
8270
  updateItem({ id: id2, itemId, data }) {
8290
8271
  return apiHandler.patch(`subscriptions/${id2}/items/${itemId}`, data);
@@ -8318,9 +8299,9 @@ function SubscriptionsResource$2({ apiHandler }) {
8318
8299
  offset = null,
8319
8300
  filter: filter2 = null,
8320
8301
  sort = null,
8321
- q = null
8302
+ q: q2 = null
8322
8303
  }) {
8323
- const params = { limit, offset, filter: filter2, sort, q };
8304
+ const params = { limit, offset, filter: filter2, sort, q: q2 };
8324
8305
  return apiHandler.getAll(`subscriptions/${id2}/timeline`, params);
8325
8306
  },
8326
8307
  createTimelineComment({ id: id2, data }) {
@@ -8340,10 +8321,10 @@ function TagsResource({ apiHandler }) {
8340
8321
  limit = null,
8341
8322
  offset = null,
8342
8323
  filter: filter2 = null,
8343
- q = null,
8324
+ q: q2 = null,
8344
8325
  sort = null
8345
8326
  } = {}) {
8346
- const params = { limit, offset, filter: filter2, q, sort };
8327
+ const params = { limit, offset, filter: filter2, q: q2, sort };
8347
8328
  return apiHandler.getAll(`tags`, params);
8348
8329
  },
8349
8330
  create({ data }) {
@@ -8403,9 +8384,9 @@ function TagsRulesResource({ apiHandler }) {
8403
8384
  offset = null,
8404
8385
  sort = null,
8405
8386
  filter: filter2 = null,
8406
- q = null
8387
+ q: q2 = null
8407
8388
  } = {}) {
8408
- const params = { limit, offset, sort, filter: filter2, q };
8389
+ const params = { limit, offset, sort, filter: filter2, q: q2 };
8409
8390
  return apiHandler.getAll(`tags-rules`, params);
8410
8391
  },
8411
8392
  createTagsRule({ id: id2 = "", data }) {
@@ -8429,10 +8410,10 @@ function TrackingResource({ apiHandler }) {
8429
8410
  offset = null,
8430
8411
  sort = null,
8431
8412
  filter: filter2 = null,
8432
- q = null,
8413
+ q: q2 = null,
8433
8414
  expand = null
8434
8415
  } = {}) {
8435
- const params = { limit, offset, sort, filter: filter2, q, expand };
8416
+ const params = { limit, offset, sort, filter: filter2, q: q2, expand };
8436
8417
  return apiHandler.getAll(`tracking/api`, params);
8437
8418
  },
8438
8419
  getApiLog({ id: id2 }) {
@@ -8443,9 +8424,9 @@ function TrackingResource({ apiHandler }) {
8443
8424
  offset = null,
8444
8425
  sort = null,
8445
8426
  filter: filter2 = null,
8446
- q = null
8427
+ q: q2 = null
8447
8428
  } = {}) {
8448
- const params = { limit, offset, sort, filter: filter2, q };
8429
+ const params = { limit, offset, sort, filter: filter2, q: q2 };
8449
8430
  return apiHandler.getAll(`tracking/taxes`, params);
8450
8431
  },
8451
8432
  getTaxTrackingLog({ id: id2 }) {
@@ -8456,9 +8437,9 @@ function TrackingResource({ apiHandler }) {
8456
8437
  offset = null,
8457
8438
  sort = null,
8458
8439
  filter: filter2 = null,
8459
- q = null
8440
+ q: q2 = null
8460
8441
  } = {}) {
8461
- const params = { limit, offset, sort, filter: filter2, q };
8442
+ const params = { limit, offset, sort, filter: filter2, q: q2 };
8462
8443
  return apiHandler.getAll(`tracking/lists`, params);
8463
8444
  },
8464
8445
  getAllWebhookTrackingLogs({
@@ -8466,9 +8447,9 @@ function TrackingResource({ apiHandler }) {
8466
8447
  offset = null,
8467
8448
  sort = null,
8468
8449
  filter: filter2 = null,
8469
- q = null
8450
+ q: q2 = null
8470
8451
  } = {}) {
8471
- const params = { limit, offset, sort, filter: filter2, q };
8452
+ const params = { limit, offset, sort, filter: filter2, q: q2 };
8472
8453
  return apiHandler.getAll(`tracking/webhooks`, params);
8473
8454
  },
8474
8455
  getWebhookTrackingLog({ id: id2 }) {
@@ -8485,11 +8466,11 @@ function TransactionsResource$1({ apiHandler }) {
8485
8466
  limit = null,
8486
8467
  offset = null,
8487
8468
  filter: filter2 = null,
8488
- q = null,
8469
+ q: q2 = null,
8489
8470
  sort = null,
8490
8471
  expand = null
8491
8472
  } = {}) {
8492
- const params = { limit, offset, filter: filter2, q, sort, expand };
8473
+ const params = { limit, offset, filter: filter2, q: q2, sort, expand };
8493
8474
  return apiHandler.getAll(`transactions`, params);
8494
8475
  },
8495
8476
  create({ data, expand = null }) {
@@ -8518,9 +8499,9 @@ function TransactionsResource$1({ apiHandler }) {
8518
8499
  offset = null,
8519
8500
  filter: filter2 = null,
8520
8501
  sort = null,
8521
- q = null
8502
+ q: q2 = null
8522
8503
  }) {
8523
- const params = { limit, offset, filter: filter2, sort, q };
8504
+ const params = { limit, offset, filter: filter2, sort, q: q2 };
8524
8505
  return apiHandler.getAll(`transactions/${id2}/timeline`, params);
8525
8506
  },
8526
8507
  createTimelineComment({ id: id2, data }) {
@@ -8541,9 +8522,9 @@ function UsagesResource({ apiHandler }) {
8541
8522
  sort = null,
8542
8523
  limit = null,
8543
8524
  offset = null,
8544
- q = null
8525
+ q: q2 = null
8545
8526
  } = {}) {
8546
- const params = { filter: filter2, sort, limit, offset, q };
8527
+ const params = { filter: filter2, sort, limit, offset, q: q2 };
8547
8528
  return apiHandler.getAll(`usages`, params);
8548
8529
  },
8549
8530
  create({ id: id2 = "", data }) {
@@ -8567,9 +8548,9 @@ function UsersResource({ apiHandler }) {
8567
8548
  offset = null,
8568
8549
  sort = null,
8569
8550
  filter: filter2 = null,
8570
- q = null
8551
+ q: q2 = null
8571
8552
  } = {}) {
8572
- const params = { limit, offset, sort, filter: filter2, q };
8553
+ const params = { limit, offset, sort, filter: filter2, q: q2 };
8573
8554
  return apiHandler.getAll(`users`, params);
8574
8555
  },
8575
8556
  create({ id: id2 = "", data }) {
@@ -8608,11 +8589,11 @@ function WebsitesResource$1({ apiHandler }) {
8608
8589
  getAll({
8609
8590
  limit = null,
8610
8591
  offset = null,
8611
- q = null,
8592
+ q: q2 = null,
8612
8593
  filter: filter2 = null,
8613
8594
  sort = null
8614
8595
  } = {}) {
8615
- const params = { limit, offset, q, filter: filter2, sort };
8596
+ const params = { limit, offset, q: q2, filter: filter2, sort };
8616
8597
  return apiHandler.getAll(`websites`, params);
8617
8598
  },
8618
8599
  create({ id: id2 = "", data }) {
@@ -8691,7 +8672,6 @@ class ApiInstance {
8691
8672
  this.purchase = PurchaseResource$1({ apiHandler });
8692
8673
  this.quotes = QuotesResource$1({ apiHandler });
8693
8674
  this.resource = ResourceResource({ apiHandler });
8694
- this.richBillingPortals = RichBillingPortalsResource$1({ apiHandler });
8695
8675
  this.riskScoreRules = RiskScoreRulesResource({ apiHandler });
8696
8676
  this.roles = RolesResource({ apiHandler });
8697
8677
  this.search = SearchResource({ apiHandler });
@@ -8744,10 +8724,10 @@ function DataExportsResource({ apiHandler }) {
8744
8724
  sort = null,
8745
8725
  expand = null,
8746
8726
  filter: filter2 = null,
8747
- q = null,
8727
+ q: q2 = null,
8748
8728
  criteria = null
8749
8729
  } = {}) {
8750
- const params = { limit, offset, sort, expand, filter: filter2, q, criteria };
8730
+ const params = { limit, offset, sort, expand, filter: filter2, q: q2, criteria };
8751
8731
  return apiHandler.getAll(`data-exports`, params);
8752
8732
  },
8753
8733
  queue({ id: id2 = "", data, expand = null }) {
@@ -9251,6 +9231,13 @@ function DepositStrategiesResource({ apiHandler }) {
9251
9231
  }
9252
9232
  };
9253
9233
  }
9234
+ function ExperimentalResource({ apiHandler }) {
9235
+ return {
9236
+ get({ slug }) {
9237
+ return apiHandler.get(`experimental/billing-portals/${slug}`);
9238
+ }
9239
+ };
9240
+ }
9254
9241
  function InvoicesResource({ apiHandler }) {
9255
9242
  return {
9256
9243
  getAll({
@@ -9258,10 +9245,10 @@ function InvoicesResource({ apiHandler }) {
9258
9245
  sort = null,
9259
9246
  limit = null,
9260
9247
  offset = null,
9261
- q = null,
9248
+ q: q2 = null,
9262
9249
  expand = null
9263
9250
  } = {}) {
9264
- const params = { filter: filter2, sort, limit, offset, q, expand };
9251
+ const params = { filter: filter2, sort, limit, offset, q: q2, expand };
9265
9252
  return apiHandler.getAll(`invoices`, params);
9266
9253
  },
9267
9254
  get({ id: id2 }) {
@@ -9324,10 +9311,10 @@ function OrdersResource({ apiHandler }) {
9324
9311
  sort = null,
9325
9312
  limit = null,
9326
9313
  offset = null,
9327
- q = null,
9314
+ q: q2 = null,
9328
9315
  expand = null
9329
9316
  } = {}) {
9330
- const params = { filter: filter2, sort, limit, offset, q, expand };
9317
+ const params = { filter: filter2, sort, limit, offset, q: q2, expand };
9331
9318
  return apiHandler.getAll(`orders`, params);
9332
9319
  },
9333
9320
  get({ id: id2, expand = null }) {
@@ -9352,9 +9339,9 @@ function PaymentInstrumentsResource({ apiHandler }) {
9352
9339
  sort = null,
9353
9340
  limit = null,
9354
9341
  offset = null,
9355
- q = null
9342
+ q: q2 = null
9356
9343
  } = {}) {
9357
- const params = { filter: filter2, sort, limit, offset, q };
9344
+ const params = { filter: filter2, sort, limit, offset, q: q2 };
9358
9345
  return apiHandler.getAll(`payment-instruments`, params);
9359
9346
  },
9360
9347
  create({ data }) {
@@ -9385,9 +9372,9 @@ function PayoutRequestsResource({ apiHandler }) {
9385
9372
  sort = null,
9386
9373
  limit = null,
9387
9374
  offset = null,
9388
- q = null
9375
+ q: q2 = null
9389
9376
  } = {}) {
9390
- const params = { filter: filter2, sort, limit, offset, q };
9377
+ const params = { filter: filter2, sort, limit, offset, q: q2 };
9391
9378
  return apiHandler.getAll(`payout-requests`, params);
9392
9379
  },
9393
9380
  get({ id: id2 }) {
@@ -9405,10 +9392,10 @@ function PlansResource({ apiHandler }) {
9405
9392
  sort = null,
9406
9393
  limit = null,
9407
9394
  offset = null,
9408
- q = null,
9395
+ q: q2 = null,
9409
9396
  expand = null
9410
9397
  } = {}) {
9411
- const params = { filter: filter2, sort, limit, offset, q, expand };
9398
+ const params = { filter: filter2, sort, limit, offset, q: q2, expand };
9412
9399
  return apiHandler.getAll(`plans`, params);
9413
9400
  },
9414
9401
  get({ id: id2, expand = null }) {
@@ -9424,9 +9411,9 @@ function ProductsResource({ apiHandler }) {
9424
9411
  sort = null,
9425
9412
  limit = null,
9426
9413
  offset = null,
9427
- q = null
9414
+ q: q2 = null
9428
9415
  } = {}) {
9429
- const params = { filter: filter2, sort, limit, offset, q };
9416
+ const params = { filter: filter2, sort, limit, offset, q: q2 };
9430
9417
  return apiHandler.getAll(`products`, params);
9431
9418
  },
9432
9419
  get({ id: id2 }) {
@@ -9478,14 +9465,6 @@ function ReadyToPayoutResource({ apiHandler }) {
9478
9465
  }
9479
9466
  };
9480
9467
  }
9481
- function RichBillingPortalsResource({ apiHandler }) {
9482
- return {
9483
- get({ id: id2, expand = null }) {
9484
- const params = { expand };
9485
- return apiHandler.get(`rich-billing-portals/${id2}`, params);
9486
- }
9487
- };
9488
- }
9489
9468
  function SubscriptionsResource({ apiHandler }) {
9490
9469
  return {
9491
9470
  changeItems({ id: id2, data }) {
@@ -9502,10 +9481,10 @@ function TransactionsResource({ apiHandler }) {
9502
9481
  limit = null,
9503
9482
  offset = null,
9504
9483
  filter: filter2 = null,
9505
- q = null,
9484
+ q: q2 = null,
9506
9485
  sort = null
9507
9486
  } = {}) {
9508
- const params = { limit, offset, filter: filter2, q, sort };
9487
+ const params = { limit, offset, filter: filter2, q: q2, sort };
9509
9488
  return apiHandler.getAll(`transactions`, params);
9510
9489
  },
9511
9490
  get({ id: id2 }) {
@@ -9539,6 +9518,7 @@ class StorefrontApiInstance {
9539
9518
  this.depositRequests = DepositRequestsResource({ apiHandler });
9540
9519
  this.deposit = DepositResource({ apiHandler });
9541
9520
  this.depositStrategies = DepositStrategiesResource({ apiHandler });
9521
+ this.experimental = ExperimentalResource({ apiHandler });
9542
9522
  this.invoices = InvoicesResource({ apiHandler });
9543
9523
  this.kycDocuments = KycDocumentsResource({ apiHandler });
9544
9524
  this.kycLivenessSessions = KycLivenessSessionsResource({ apiHandler });
@@ -9551,7 +9531,6 @@ class StorefrontApiInstance {
9551
9531
  this.purchase = PurchaseResource({ apiHandler });
9552
9532
  this.quotes = QuotesResource({ apiHandler });
9553
9533
  this.readyToPayout = ReadyToPayoutResource({ apiHandler });
9554
- this.richBillingPortals = RichBillingPortalsResource({ apiHandler });
9555
9534
  this.subscriptions = SubscriptionsResource({ apiHandler });
9556
9535
  this.transactions = TransactionsResource({ apiHandler });
9557
9536
  this.websites = WebsitesResource({ apiHandler });
@@ -9928,190 +9907,190 @@ async function updateSummary({ instrument } = {}) {
9928
9907
  await fetchSummary({ data: instrument });
9929
9908
  state.updateModel();
9930
9909
  }
9931
- function t$1(t2, e2, r2, n2, o2, i2, a2) {
9910
+ function t$1(t2, e2, n2, r2, o2, i2, a2) {
9932
9911
  try {
9933
- var u2 = t2[i2](a2), c2 = u2.value;
9912
+ var c2 = t2[i2](a2), s2 = c2.value;
9934
9913
  } catch (t3) {
9935
- return void r2(t3);
9914
+ return void n2(t3);
9936
9915
  }
9937
- u2.done ? e2(c2) : Promise.resolve(c2).then(n2, o2);
9916
+ c2.done ? e2(s2) : Promise.resolve(s2).then(r2, o2);
9938
9917
  }
9939
9918
  function e$1(e2) {
9940
9919
  return function() {
9941
- var r2 = this, n2 = arguments;
9920
+ var n2 = this, r2 = arguments;
9942
9921
  return new Promise(function(o2, i2) {
9943
- var a2 = e2.apply(r2, n2);
9944
- function u2(e3) {
9945
- t$1(a2, o2, i2, u2, c2, "next", e3);
9946
- }
9922
+ var a2 = e2.apply(n2, r2);
9947
9923
  function c2(e3) {
9948
- t$1(a2, o2, i2, u2, c2, "throw", e3);
9924
+ t$1(a2, o2, i2, c2, s2, "next", e3);
9949
9925
  }
9950
- u2(void 0);
9926
+ function s2(e3) {
9927
+ t$1(a2, o2, i2, c2, s2, "throw", e3);
9928
+ }
9929
+ c2(void 0);
9951
9930
  });
9952
9931
  };
9953
9932
  }
9954
- function r$1(t2, e2, r2) {
9955
- return t2(r2 = { path: e2, exports: {}, require: function(t3, e3) {
9933
+ function n$1(t2, e2, n2) {
9934
+ return t2(n2 = { path: e2, exports: {}, require: function(t3, e3) {
9956
9935
  return function() {
9957
9936
  throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs");
9958
- }(null == e3 && r2.path);
9959
- } }, r2.exports), r2.exports;
9937
+ }(null == e3 && n2.path);
9938
+ } }, n2.exports), n2.exports;
9960
9939
  }
9961
- var n$1 = r$1(function(t2) {
9962
- function e2(r2) {
9940
+ var r$1 = n$1(function(t2) {
9941
+ function e2(n2) {
9963
9942
  return t2.exports = e2 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t3) {
9964
9943
  return typeof t3;
9965
9944
  } : function(t3) {
9966
9945
  return t3 && "function" == typeof Symbol && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3;
9967
- }, t2.exports.__esModule = true, t2.exports.default = t2.exports, e2(r2);
9946
+ }, t2.exports.__esModule = true, t2.exports.default = t2.exports, e2(n2);
9968
9947
  }
9969
9948
  t2.exports = e2, t2.exports.__esModule = true, t2.exports.default = t2.exports;
9970
- }), o$1 = r$1(function(t2) {
9971
- var e2 = n$1.default;
9972
- function r2() {
9949
+ }), o$1 = n$1(function(t2) {
9950
+ var e2 = r$1.default;
9951
+ function n2() {
9973
9952
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
9974
- t2.exports = r2 = function() {
9953
+ t2.exports = n2 = function() {
9975
9954
  return o2;
9976
9955
  }, t2.exports.__esModule = true, t2.exports.default = t2.exports;
9977
- var n2, o2 = {}, i2 = Object.prototype, a2 = i2.hasOwnProperty, u2 = Object.defineProperty || function(t3, e3, r3) {
9978
- t3[e3] = r3.value;
9979
- }, c2 = "function" == typeof Symbol ? Symbol : {}, s2 = c2.iterator || "@@iterator", l2 = c2.asyncIterator || "@@asyncIterator", f2 = c2.toStringTag || "@@toStringTag";
9980
- function p2(t3, e3, r3) {
9981
- return Object.defineProperty(t3, e3, { value: r3, enumerable: true, configurable: true, writable: true }), t3[e3];
9956
+ var r2, o2 = {}, i2 = Object.prototype, a2 = i2.hasOwnProperty, c2 = Object.defineProperty || function(t3, e3, n3) {
9957
+ t3[e3] = n3.value;
9958
+ }, s2 = "function" == typeof Symbol ? Symbol : {}, u2 = s2.iterator || "@@iterator", l2 = s2.asyncIterator || "@@asyncIterator", h2 = s2.toStringTag || "@@toStringTag";
9959
+ function f2(t3, e3, n3) {
9960
+ return Object.defineProperty(t3, e3, { value: n3, enumerable: true, configurable: true, writable: true }), t3[e3];
9982
9961
  }
9983
9962
  try {
9984
- p2({}, "");
9985
- } catch (n3) {
9986
- p2 = function(t3, e3, r3) {
9987
- return t3[e3] = r3;
9963
+ f2({}, "");
9964
+ } catch (r3) {
9965
+ f2 = function(t3, e3, n3) {
9966
+ return t3[e3] = n3;
9988
9967
  };
9989
9968
  }
9990
- function h2(t3, e3, r3, n3) {
9991
- var o3 = e3 && e3.prototype instanceof g2 ? e3 : g2, i3 = Object.create(o3.prototype), a3 = new P2(n3 || []);
9992
- return u2(i3, "_invoke", { value: N2(t3, r3, a3) }), i3;
9969
+ function p2(t3, e3, n3, r3) {
9970
+ var o3 = e3 && e3.prototype instanceof m2 ? e3 : m2, i3 = Object.create(o3.prototype), a3 = new k2(r3 || []);
9971
+ return c2(i3, "_invoke", { value: T2(t3, n3, a3) }), i3;
9993
9972
  }
9994
- function d2(t3, e3, r3) {
9973
+ function d2(t3, e3, n3) {
9995
9974
  try {
9996
- return { type: "normal", arg: t3.call(e3, r3) };
9975
+ return { type: "normal", arg: t3.call(e3, n3) };
9997
9976
  } catch (t4) {
9998
9977
  return { type: "throw", arg: t4 };
9999
9978
  }
10000
9979
  }
10001
- o2.wrap = h2;
10002
- var v2 = "suspendedStart", y2 = "suspendedYield", m2 = "executing", R2 = "completed", E2 = {};
10003
- function g2() {
9980
+ o2.wrap = p2;
9981
+ var v2 = "suspendedStart", R2 = "suspendedYield", y2 = "executing", E2 = "completed", g2 = {};
9982
+ function m2() {
10004
9983
  }
10005
- function w2() {
9984
+ function O2() {
10006
9985
  }
10007
- function b2() {
9986
+ function w2() {
10008
9987
  }
10009
- var O2 = {};
10010
- p2(O2, s2, function() {
9988
+ var _2 = {};
9989
+ f2(_2, u2, function() {
10011
9990
  return this;
10012
9991
  });
10013
- var _2 = Object.getPrototypeOf, I2 = _2 && _2(_2(j2([])));
10014
- I2 && I2 !== i2 && a2.call(I2, s2) && (O2 = I2);
10015
- var x2 = b2.prototype = g2.prototype = Object.create(O2);
10016
- function S2(t3) {
9992
+ var I2 = Object.getPrototypeOf, b2 = I2 && I2(I2(D2([])));
9993
+ b2 && b2 !== i2 && a2.call(b2, u2) && (_2 = b2);
9994
+ var S2 = w2.prototype = m2.prototype = Object.create(_2);
9995
+ function N2(t3) {
10017
9996
  ["next", "throw", "return"].forEach(function(e3) {
10018
- p2(t3, e3, function(t4) {
9997
+ f2(t3, e3, function(t4) {
10019
9998
  return this._invoke(e3, t4);
10020
9999
  });
10021
10000
  });
10022
10001
  }
10023
- function k2(t3, r3) {
10024
- function n3(o4, i3, u3, c3) {
10025
- var s3 = d2(t3[o4], t3, i3);
10026
- if ("throw" !== s3.type) {
10027
- var l3 = s3.arg, f3 = l3.value;
10028
- return f3 && "object" == e2(f3) && a2.call(f3, "__await") ? r3.resolve(f3.__await).then(function(t4) {
10029
- n3("next", t4, u3, c3);
10002
+ function x2(t3, n3) {
10003
+ function r3(o4, i3, c3, s3) {
10004
+ var u3 = d2(t3[o4], t3, i3);
10005
+ if ("throw" !== u3.type) {
10006
+ var l3 = u3.arg, h3 = l3.value;
10007
+ return h3 && "object" == e2(h3) && a2.call(h3, "__await") ? n3.resolve(h3.__await).then(function(t4) {
10008
+ r3("next", t4, c3, s3);
10030
10009
  }, function(t4) {
10031
- n3("throw", t4, u3, c3);
10032
- }) : r3.resolve(f3).then(function(t4) {
10033
- l3.value = t4, u3(l3);
10010
+ r3("throw", t4, c3, s3);
10011
+ }) : n3.resolve(h3).then(function(t4) {
10012
+ l3.value = t4, c3(l3);
10034
10013
  }, function(t4) {
10035
- return n3("throw", t4, u3, c3);
10014
+ return r3("throw", t4, c3, s3);
10036
10015
  });
10037
10016
  }
10038
- c3(s3.arg);
10017
+ s3(u3.arg);
10039
10018
  }
10040
10019
  var o3;
10041
- u2(this, "_invoke", { value: function(t4, e3) {
10020
+ c2(this, "_invoke", { value: function(t4, e3) {
10042
10021
  function i3() {
10043
- return new r3(function(r4, o4) {
10044
- n3(t4, e3, r4, o4);
10022
+ return new n3(function(n4, o4) {
10023
+ r3(t4, e3, n4, o4);
10045
10024
  });
10046
10025
  }
10047
10026
  return o3 = o3 ? o3.then(i3, i3) : i3();
10048
10027
  } });
10049
10028
  }
10050
- function N2(t3, e3, r3) {
10029
+ function T2(t3, e3, n3) {
10051
10030
  var o3 = v2;
10052
10031
  return function(i3, a3) {
10053
- if (o3 === m2)
10032
+ if (o3 === y2)
10054
10033
  throw new Error("Generator is already running");
10055
- if (o3 === R2) {
10034
+ if (o3 === E2) {
10056
10035
  if ("throw" === i3)
10057
10036
  throw a3;
10058
- return { value: n2, done: true };
10037
+ return { value: r2, done: true };
10059
10038
  }
10060
- for (r3.method = i3, r3.arg = a3; ; ) {
10061
- var u3 = r3.delegate;
10062
- if (u3) {
10063
- var c3 = L2(u3, r3);
10064
- if (c3) {
10065
- if (c3 === E2)
10039
+ for (n3.method = i3, n3.arg = a3; ; ) {
10040
+ var c3 = n3.delegate;
10041
+ if (c3) {
10042
+ var s3 = L2(c3, n3);
10043
+ if (s3) {
10044
+ if (s3 === g2)
10066
10045
  continue;
10067
- return c3;
10046
+ return s3;
10068
10047
  }
10069
10048
  }
10070
- if ("next" === r3.method)
10071
- r3.sent = r3._sent = r3.arg;
10072
- else if ("throw" === r3.method) {
10049
+ if ("next" === n3.method)
10050
+ n3.sent = n3._sent = n3.arg;
10051
+ else if ("throw" === n3.method) {
10073
10052
  if (o3 === v2)
10074
- throw o3 = R2, r3.arg;
10075
- r3.dispatchException(r3.arg);
10053
+ throw o3 = E2, n3.arg;
10054
+ n3.dispatchException(n3.arg);
10076
10055
  } else
10077
- "return" === r3.method && r3.abrupt("return", r3.arg);
10078
- o3 = m2;
10079
- var s3 = d2(t3, e3, r3);
10080
- if ("normal" === s3.type) {
10081
- if (o3 = r3.done ? R2 : y2, s3.arg === E2)
10056
+ "return" === n3.method && n3.abrupt("return", n3.arg);
10057
+ o3 = y2;
10058
+ var u3 = d2(t3, e3, n3);
10059
+ if ("normal" === u3.type) {
10060
+ if (o3 = n3.done ? E2 : R2, u3.arg === g2)
10082
10061
  continue;
10083
- return { value: s3.arg, done: r3.done };
10062
+ return { value: u3.arg, done: n3.done };
10084
10063
  }
10085
- "throw" === s3.type && (o3 = R2, r3.method = "throw", r3.arg = s3.arg);
10064
+ "throw" === u3.type && (o3 = E2, n3.method = "throw", n3.arg = u3.arg);
10086
10065
  }
10087
10066
  };
10088
10067
  }
10089
10068
  function L2(t3, e3) {
10090
- var r3 = e3.method, o3 = t3.iterator[r3];
10091
- if (o3 === n2)
10092
- return e3.delegate = null, "throw" === r3 && t3.iterator.return && (e3.method = "return", e3.arg = n2, L2(t3, e3), "throw" === e3.method) || "return" !== r3 && (e3.method = "throw", e3.arg = new TypeError("The iterator does not provide a '" + r3 + "' method")), E2;
10069
+ var n3 = e3.method, o3 = t3.iterator[n3];
10070
+ if (o3 === r2)
10071
+ return e3.delegate = null, "throw" === n3 && t3.iterator.return && (e3.method = "return", e3.arg = r2, L2(t3, e3), "throw" === e3.method) || "return" !== n3 && (e3.method = "throw", e3.arg = new TypeError("The iterator does not provide a '" + n3 + "' method")), g2;
10093
10072
  var i3 = d2(o3, t3.iterator, e3.arg);
10094
10073
  if ("throw" === i3.type)
10095
- return e3.method = "throw", e3.arg = i3.arg, e3.delegate = null, E2;
10074
+ return e3.method = "throw", e3.arg = i3.arg, e3.delegate = null, g2;
10096
10075
  var a3 = i3.arg;
10097
- return a3 ? a3.done ? (e3[t3.resultName] = a3.value, e3.next = t3.nextLoc, "return" !== e3.method && (e3.method = "next", e3.arg = n2), e3.delegate = null, E2) : a3 : (e3.method = "throw", e3.arg = new TypeError("iterator result is not an object"), e3.delegate = null, E2);
10076
+ return a3 ? a3.done ? (e3[t3.resultName] = a3.value, e3.next = t3.nextLoc, "return" !== e3.method && (e3.method = "next", e3.arg = r2), e3.delegate = null, g2) : a3 : (e3.method = "throw", e3.arg = new TypeError("iterator result is not an object"), e3.delegate = null, g2);
10098
10077
  }
10099
- function T2(t3) {
10078
+ function A2(t3) {
10100
10079
  var e3 = { tryLoc: t3[0] };
10101
10080
  1 in t3 && (e3.catchLoc = t3[1]), 2 in t3 && (e3.finallyLoc = t3[2], e3.afterLoc = t3[3]), this.tryEntries.push(e3);
10102
10081
  }
10103
- function A2(t3) {
10082
+ function P2(t3) {
10104
10083
  var e3 = t3.completion || {};
10105
10084
  e3.type = "normal", delete e3.arg, t3.completion = e3;
10106
10085
  }
10107
- function P2(t3) {
10108
- this.tryEntries = [{ tryLoc: "root" }], t3.forEach(T2, this), this.reset(true);
10086
+ function k2(t3) {
10087
+ this.tryEntries = [{ tryLoc: "root" }], t3.forEach(A2, this), this.reset(true);
10109
10088
  }
10110
- function j2(t3) {
10089
+ function D2(t3) {
10111
10090
  if (t3 || "" === t3) {
10112
- var r3 = t3[s2];
10113
- if (r3)
10114
- return r3.call(t3);
10091
+ var n3 = t3[u2];
10092
+ if (n3)
10093
+ return n3.call(t3);
10115
10094
  if ("function" == typeof t3.next)
10116
10095
  return t3;
10117
10096
  if (!isNaN(t3.length)) {
@@ -10119,48 +10098,48 @@ var n$1 = r$1(function(t2) {
10119
10098
  for (; ++o3 < t3.length; )
10120
10099
  if (a2.call(t3, o3))
10121
10100
  return e3.value = t3[o3], e3.done = false, e3;
10122
- return e3.value = n2, e3.done = true, e3;
10101
+ return e3.value = r2, e3.done = true, e3;
10123
10102
  };
10124
10103
  return i3.next = i3;
10125
10104
  }
10126
10105
  }
10127
10106
  throw new TypeError(e2(t3) + " is not iterable");
10128
10107
  }
10129
- return w2.prototype = b2, u2(x2, "constructor", { value: b2, configurable: true }), u2(b2, "constructor", { value: w2, configurable: true }), w2.displayName = p2(b2, f2, "GeneratorFunction"), o2.isGeneratorFunction = function(t3) {
10108
+ return O2.prototype = w2, c2(S2, "constructor", { value: w2, configurable: true }), c2(w2, "constructor", { value: O2, configurable: true }), O2.displayName = f2(w2, h2, "GeneratorFunction"), o2.isGeneratorFunction = function(t3) {
10130
10109
  var e3 = "function" == typeof t3 && t3.constructor;
10131
- return !!e3 && (e3 === w2 || "GeneratorFunction" === (e3.displayName || e3.name));
10110
+ return !!e3 && (e3 === O2 || "GeneratorFunction" === (e3.displayName || e3.name));
10132
10111
  }, o2.mark = function(t3) {
10133
- return Object.setPrototypeOf ? Object.setPrototypeOf(t3, b2) : (t3.__proto__ = b2, p2(t3, f2, "GeneratorFunction")), t3.prototype = Object.create(x2), t3;
10112
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t3, w2) : (t3.__proto__ = w2, f2(t3, h2, "GeneratorFunction")), t3.prototype = Object.create(S2), t3;
10134
10113
  }, o2.awrap = function(t3) {
10135
10114
  return { __await: t3 };
10136
- }, S2(k2.prototype), p2(k2.prototype, l2, function() {
10115
+ }, N2(x2.prototype), f2(x2.prototype, l2, function() {
10137
10116
  return this;
10138
- }), o2.AsyncIterator = k2, o2.async = function(t3, e3, r3, n3, i3) {
10117
+ }), o2.AsyncIterator = x2, o2.async = function(t3, e3, n3, r3, i3) {
10139
10118
  void 0 === i3 && (i3 = Promise);
10140
- var a3 = new k2(h2(t3, e3, r3, n3), i3);
10119
+ var a3 = new x2(p2(t3, e3, n3, r3), i3);
10141
10120
  return o2.isGeneratorFunction(e3) ? a3 : a3.next().then(function(t4) {
10142
10121
  return t4.done ? t4.value : a3.next();
10143
10122
  });
10144
- }, S2(x2), p2(x2, f2, "Generator"), p2(x2, s2, function() {
10123
+ }, N2(S2), f2(S2, h2, "Generator"), f2(S2, u2, function() {
10145
10124
  return this;
10146
- }), p2(x2, "toString", function() {
10125
+ }), f2(S2, "toString", function() {
10147
10126
  return "[object Generator]";
10148
10127
  }), o2.keys = function(t3) {
10149
- var e3 = Object(t3), r3 = [];
10150
- for (var n3 in e3)
10151
- r3.push(n3);
10152
- return r3.reverse(), function t4() {
10153
- for (; r3.length; ) {
10154
- var n4 = r3.pop();
10155
- if (n4 in e3)
10156
- return t4.value = n4, t4.done = false, t4;
10128
+ var e3 = Object(t3), n3 = [];
10129
+ for (var r3 in e3)
10130
+ n3.push(r3);
10131
+ return n3.reverse(), function t4() {
10132
+ for (; n3.length; ) {
10133
+ var r4 = n3.pop();
10134
+ if (r4 in e3)
10135
+ return t4.value = r4, t4.done = false, t4;
10157
10136
  }
10158
10137
  return t4.done = true, t4;
10159
10138
  };
10160
- }, o2.values = j2, P2.prototype = { constructor: P2, reset: function(t3) {
10161
- if (this.prev = 0, this.next = 0, this.sent = this._sent = n2, this.done = false, this.delegate = null, this.method = "next", this.arg = n2, this.tryEntries.forEach(A2), !t3)
10139
+ }, o2.values = D2, k2.prototype = { constructor: k2, reset: function(t3) {
10140
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = r2, this.done = false, this.delegate = null, this.method = "next", this.arg = r2, this.tryEntries.forEach(P2), !t3)
10162
10141
  for (var e3 in this)
10163
- "t" === e3.charAt(0) && a2.call(this, e3) && !isNaN(+e3.slice(1)) && (this[e3] = n2);
10142
+ "t" === e3.charAt(0) && a2.call(this, e3) && !isNaN(+e3.slice(1)) && (this[e3] = r2);
10164
10143
  }, stop: function() {
10165
10144
  this.done = true;
10166
10145
  var t3 = this.tryEntries[0].completion;
@@ -10171,271 +10150,539 @@ var n$1 = r$1(function(t2) {
10171
10150
  if (this.done)
10172
10151
  throw t3;
10173
10152
  var e3 = this;
10174
- function r3(r4, o4) {
10175
- return u3.type = "throw", u3.arg = t3, e3.next = r4, o4 && (e3.method = "next", e3.arg = n2), !!o4;
10153
+ function n3(n4, o4) {
10154
+ return c3.type = "throw", c3.arg = t3, e3.next = n4, o4 && (e3.method = "next", e3.arg = r2), !!o4;
10176
10155
  }
10177
10156
  for (var o3 = this.tryEntries.length - 1; o3 >= 0; --o3) {
10178
- var i3 = this.tryEntries[o3], u3 = i3.completion;
10157
+ var i3 = this.tryEntries[o3], c3 = i3.completion;
10179
10158
  if ("root" === i3.tryLoc)
10180
- return r3("end");
10159
+ return n3("end");
10181
10160
  if (i3.tryLoc <= this.prev) {
10182
- var c3 = a2.call(i3, "catchLoc"), s3 = a2.call(i3, "finallyLoc");
10183
- if (c3 && s3) {
10161
+ var s3 = a2.call(i3, "catchLoc"), u3 = a2.call(i3, "finallyLoc");
10162
+ if (s3 && u3) {
10184
10163
  if (this.prev < i3.catchLoc)
10185
- return r3(i3.catchLoc, true);
10164
+ return n3(i3.catchLoc, true);
10186
10165
  if (this.prev < i3.finallyLoc)
10187
- return r3(i3.finallyLoc);
10188
- } else if (c3) {
10166
+ return n3(i3.finallyLoc);
10167
+ } else if (s3) {
10189
10168
  if (this.prev < i3.catchLoc)
10190
- return r3(i3.catchLoc, true);
10169
+ return n3(i3.catchLoc, true);
10191
10170
  } else {
10192
- if (!s3)
10171
+ if (!u3)
10193
10172
  throw new Error("try statement without catch or finally");
10194
10173
  if (this.prev < i3.finallyLoc)
10195
- return r3(i3.finallyLoc);
10174
+ return n3(i3.finallyLoc);
10196
10175
  }
10197
10176
  }
10198
10177
  }
10199
10178
  }, abrupt: function(t3, e3) {
10200
- for (var r3 = this.tryEntries.length - 1; r3 >= 0; --r3) {
10201
- var n3 = this.tryEntries[r3];
10202
- if (n3.tryLoc <= this.prev && a2.call(n3, "finallyLoc") && this.prev < n3.finallyLoc) {
10203
- var o3 = n3;
10179
+ for (var n3 = this.tryEntries.length - 1; n3 >= 0; --n3) {
10180
+ var r3 = this.tryEntries[n3];
10181
+ if (r3.tryLoc <= this.prev && a2.call(r3, "finallyLoc") && this.prev < r3.finallyLoc) {
10182
+ var o3 = r3;
10204
10183
  break;
10205
10184
  }
10206
10185
  }
10207
10186
  o3 && ("break" === t3 || "continue" === t3) && o3.tryLoc <= e3 && e3 <= o3.finallyLoc && (o3 = null);
10208
10187
  var i3 = o3 ? o3.completion : {};
10209
- return i3.type = t3, i3.arg = e3, o3 ? (this.method = "next", this.next = o3.finallyLoc, E2) : this.complete(i3);
10188
+ return i3.type = t3, i3.arg = e3, o3 ? (this.method = "next", this.next = o3.finallyLoc, g2) : this.complete(i3);
10210
10189
  }, complete: function(t3, e3) {
10211
10190
  if ("throw" === t3.type)
10212
10191
  throw t3.arg;
10213
- return "break" === t3.type || "continue" === t3.type ? this.next = t3.arg : "return" === t3.type ? (this.rval = this.arg = t3.arg, this.method = "return", this.next = "end") : "normal" === t3.type && e3 && (this.next = e3), E2;
10192
+ return "break" === t3.type || "continue" === t3.type ? this.next = t3.arg : "return" === t3.type ? (this.rval = this.arg = t3.arg, this.method = "return", this.next = "end") : "normal" === t3.type && e3 && (this.next = e3), g2;
10214
10193
  }, finish: function(t3) {
10215
10194
  for (var e3 = this.tryEntries.length - 1; e3 >= 0; --e3) {
10216
- var r3 = this.tryEntries[e3];
10217
- if (r3.finallyLoc === t3)
10218
- return this.complete(r3.completion, r3.afterLoc), A2(r3), E2;
10195
+ var n3 = this.tryEntries[e3];
10196
+ if (n3.finallyLoc === t3)
10197
+ return this.complete(n3.completion, n3.afterLoc), P2(n3), g2;
10219
10198
  }
10220
10199
  }, catch: function(t3) {
10221
10200
  for (var e3 = this.tryEntries.length - 1; e3 >= 0; --e3) {
10222
- var r3 = this.tryEntries[e3];
10223
- if (r3.tryLoc === t3) {
10224
- var n3 = r3.completion;
10225
- if ("throw" === n3.type) {
10226
- var o3 = n3.arg;
10227
- A2(r3);
10201
+ var n3 = this.tryEntries[e3];
10202
+ if (n3.tryLoc === t3) {
10203
+ var r3 = n3.completion;
10204
+ if ("throw" === r3.type) {
10205
+ var o3 = r3.arg;
10206
+ P2(n3);
10228
10207
  }
10229
10208
  return o3;
10230
10209
  }
10231
10210
  }
10232
10211
  throw new Error("illegal catch attempt");
10233
- }, delegateYield: function(t3, e3, r3) {
10234
- return this.delegate = { iterator: j2(t3), resultName: e3, nextLoc: r3 }, "next" === this.method && (this.arg = n2), E2;
10212
+ }, delegateYield: function(t3, e3, n3) {
10213
+ return this.delegate = { iterator: D2(t3), resultName: e3, nextLoc: n3 }, "next" === this.method && (this.arg = r2), g2;
10235
10214
  } }, o2;
10236
10215
  }
10237
- t2.exports = r2, t2.exports.__esModule = true, t2.exports.default = t2.exports;
10216
+ t2.exports = n2, t2.exports.__esModule = true, t2.exports.default = t2.exports;
10238
10217
  }), i = o$1(), a = i;
10239
10218
  try {
10240
10219
  regeneratorRuntime = i;
10241
10220
  } catch (t2) {
10242
10221
  "object" == typeof globalThis ? globalThis.regeneratorRuntime = i : Function("r", "regeneratorRuntime = r")(i);
10243
10222
  }
10244
- function u(t2) {
10245
- return u = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t3) {
10223
+ function c(t2) {
10224
+ return c = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(t3) {
10246
10225
  return typeof t3;
10247
10226
  } : function(t3) {
10248
10227
  return t3 && "function" == typeof Symbol && t3.constructor === Symbol && t3 !== Symbol.prototype ? "symbol" : typeof t3;
10249
- }, u(t2);
10228
+ }, c(t2);
10250
10229
  }
10251
- var c = function() {
10252
- return c = Object.assign || function(t2) {
10253
- for (var e2, r2 = 1, n2 = arguments.length; r2 < n2; r2++)
10254
- for (var o2 in e2 = arguments[r2])
10230
+ var s = function() {
10231
+ return s = Object.assign || function(t2) {
10232
+ for (var e2, n2 = 1, r2 = arguments.length; n2 < r2; n2++)
10233
+ for (var o2 in e2 = arguments[n2])
10255
10234
  Object.prototype.hasOwnProperty.call(e2, o2) && (t2[o2] = e2[o2]);
10256
10235
  return t2;
10257
- }, c.apply(this, arguments);
10236
+ }, s.apply(this, arguments);
10258
10237
  };
10259
- function s(t2) {
10260
- for (var e2 = "", r2 = 0; r2 < t2.length; ++r2)
10261
- if (r2 > 0) {
10262
- var n2 = t2[r2].toLowerCase();
10263
- n2 !== t2[r2] ? e2 += " ".concat(n2) : e2 += t2[r2];
10238
+ function u(t2, e2, n2, r2) {
10239
+ return new (n2 || (n2 = Promise))(function(o2, i2) {
10240
+ function a2(t3) {
10241
+ try {
10242
+ s2(r2.next(t3));
10243
+ } catch (t4) {
10244
+ i2(t4);
10245
+ }
10246
+ }
10247
+ function c2(t3) {
10248
+ try {
10249
+ s2(r2.throw(t3));
10250
+ } catch (t4) {
10251
+ i2(t4);
10252
+ }
10253
+ }
10254
+ function s2(t3) {
10255
+ var e3;
10256
+ t3.done ? o2(t3.value) : (e3 = t3.value, e3 instanceof n2 ? e3 : new n2(function(t4) {
10257
+ t4(e3);
10258
+ })).then(a2, c2);
10259
+ }
10260
+ s2((r2 = r2.apply(t2, e2 || [])).next());
10261
+ });
10262
+ }
10263
+ "function" == typeof SuppressedError && SuppressedError;
10264
+ var l = { default: "endpoint" }, h = { default: "tlsEndpoint" };
10265
+ function f(t2) {
10266
+ for (var e2 = "", n2 = 0; n2 < t2.length; ++n2)
10267
+ if (n2 > 0) {
10268
+ var r2 = t2[n2].toLowerCase();
10269
+ r2 !== t2[n2] ? e2 += " ".concat(r2) : e2 += t2[n2];
10264
10270
  } else
10265
- e2 += t2[r2].toUpperCase();
10271
+ e2 += t2[n2].toUpperCase();
10266
10272
  return e2;
10267
10273
  }
10268
- "function" == typeof SuppressedError && SuppressedError;
10269
- var l = "Blocked by CSP", f = s("WrongRegion"), p = s("SubscriptionNotActive"), h = s("UnsupportedVersion"), d = s("InstallationMethodRestricted"), v = "API key required", y = "API key not found", m = "API key expired", R = "9319";
10270
- function E(t2, e2) {
10271
- var r2 = [];
10272
- return function(t3, e3) {
10273
- var r3, n2, o2 = (n2 = function(t4, e4, r4) {
10274
- if (r4 || 2 === arguments.length)
10275
- for (var n3, o3 = 0, i3 = e4.length; o3 < i3; o3++)
10276
- !n3 && o3 in e4 || (n3 || (n3 = Array.prototype.slice.call(e4, 0, o3)), n3[o3] = e4[o3]);
10277
- return t4.concat(n3 || Array.prototype.slice.call(e4));
10278
- }([], t3, true), { current: function() {
10279
- return n2[0];
10274
+ var p = "Client timeout", d = "Network connection error", v = "Network request aborted", R = "Response cannot be parsed", y = "Blocked by CSP", E = "The endpoint parameter is not a valid URL", g = f("WrongRegion"), m = f("SubscriptionNotActive"), O = f("UnsupportedVersion"), w = f("InstallationMethodRestricted"), _ = f("HostnameRestricted"), I = f("IntegrationFailed"), b = "API key required", S = "API key not found", N = "API key expired", x = "Request cannot be parsed", T = "Request failed", L = "Request failed to process", A = "Too many requests, rate limit exceeded", P = "Not available for this origin", k = "Not available with restricted header", D = b, C = S, j = N, F = "Failed to load the JS script of the agent", K = "9319";
10275
+ function M(t2, e2) {
10276
+ var n2, r2, o2, i2, a2 = [], c2 = (n2 = function(t3) {
10277
+ var e3 = function(t4, e4, n3) {
10278
+ if (n3 || 2 === arguments.length)
10279
+ for (var r3, o3 = 0, i3 = e4.length; o3 < i3; o3++)
10280
+ !r3 && o3 in e4 || (r3 || (r3 = Array.prototype.slice.call(e4, 0, o3)), r3[o3] = e4[o3]);
10281
+ return t4.concat(r3 || Array.prototype.slice.call(e4));
10282
+ }([], t3, true);
10283
+ return { current: function() {
10284
+ return e3[0];
10280
10285
  }, postpone: function() {
10281
- var t4 = n2.shift();
10282
- void 0 !== t4 && n2.push(t4);
10286
+ var t4 = e3.shift();
10287
+ void 0 !== t4 && e3.push(t4);
10283
10288
  }, exclude: function() {
10284
- n2.shift();
10285
- } }), i2 = (r3 = 0, function() {
10286
- return Math.random() * Math.min(3e3, 100 * Math.pow(2, r3++));
10287
- }), a2 = o2.current();
10288
- if (void 0 === a2)
10289
- return Promise.reject(new TypeError("The list of script URL patterns is empty"));
10290
- var u2 = function(t4, r4) {
10291
- return e3(t4).catch(function(t5) {
10292
- if (r4 + 1 >= 5)
10293
- throw t5;
10294
- !function(t6) {
10295
- if (!(t6 instanceof Error))
10296
- return false;
10297
- var e5 = t6.message;
10298
- return e5 === l || e5 === R;
10299
- }(t5) ? o2.postpone() : o2.exclude();
10300
- var e4, n3 = o2.current();
10301
- if (void 0 === n3)
10302
- throw t5;
10303
- return (e4 = i2(), new Promise(function(t6) {
10304
- return setTimeout(t6, e4);
10305
- })).then(function() {
10306
- return u2(n3, r4 + 1);
10307
- });
10308
- });
10309
- };
10310
- return u2(a2, 0);
10311
- }(t2, function(t3) {
10312
- var n2 = /* @__PURE__ */ new Date(), o2 = function(e3) {
10313
- return r2.push({ url: t3, startedAt: n2, finishedAt: /* @__PURE__ */ new Date(), error: e3 });
10314
- }, i2 = e2(t3);
10315
- return i2.then(function() {
10316
- return o2();
10317
- }, o2), i2;
10318
- }).then(function(t3) {
10319
- return [t3, r2];
10320
- });
10321
- }
10322
- var g = "https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js", w = "Failed to load the JS script of the agent";
10323
- function b(t2) {
10324
- return function(t3, e2, r2, n2) {
10325
- var o2, i2 = document, a2 = "securitypolicyviolation", u2 = function(e3) {
10326
- var r3 = new URL(t3, location.href), n3 = e3.blockedURI;
10327
- n3 !== r3.href && n3 !== r3.protocol.slice(0, -1) && n3 !== r3.origin || (o2 = e3, c2());
10328
- };
10329
- i2.addEventListener(a2, u2);
10330
- var c2 = function() {
10331
- return i2.removeEventListener(a2, u2);
10332
- };
10333
- return Promise.resolve().then(e2).then(function(t4) {
10334
- return c2(), t4;
10335
- }, function(t4) {
10336
- return new Promise(function(t5) {
10337
- return setTimeout(t5);
10338
- }).then(function() {
10339
- if (c2(), o2)
10340
- return function() {
10341
- throw new Error(l);
10342
- }();
10289
+ e3.shift();
10290
+ } };
10291
+ }(t2), i2 = 0, r2 = function() {
10292
+ return Math.random() * Math.min(3e3, 100 * Math.pow(2, i2++));
10293
+ }, o2 = /* @__PURE__ */ new Set(), [n2.current(), function(t3, e3) {
10294
+ var i3, a3 = e3 instanceof Error ? e3.message : "";
10295
+ if (a3 === y || a3 === E)
10296
+ n2.exclude(), i3 = 0;
10297
+ else if (a3 === K)
10298
+ n2.exclude();
10299
+ else if (a3 === F) {
10300
+ var c3 = Date.now() - t3.getTime() < 50, s3 = n2.current();
10301
+ s3 && c3 && !o2.has(s3) && (o2.add(s3), i3 = 0), n2.postpone();
10302
+ } else
10303
+ n2.postpone();
10304
+ var u3 = n2.current();
10305
+ return void 0 === u3 ? void 0 : [u3, null != i3 ? i3 : t3.getTime() + r2() - Date.now()];
10306
+ }]), s2 = c2[0], u2 = c2[1];
10307
+ if (void 0 === s2)
10308
+ return Promise.reject(new TypeError("The list of script URL patterns is empty"));
10309
+ var l2 = function(t3) {
10310
+ var n3 = /* @__PURE__ */ new Date(), r3 = function(e3) {
10311
+ return a2.push({ url: t3, startedAt: n3, finishedAt: /* @__PURE__ */ new Date(), error: e3 });
10312
+ }, o3 = e2(t3);
10313
+ return o3.then(function() {
10314
+ return r3();
10315
+ }, r3), o3.catch(function(t4) {
10316
+ if (a2.length >= 5)
10317
+ throw t4;
10318
+ var e3 = u2(n3, t4);
10319
+ if (!e3)
10343
10320
  throw t4;
10321
+ var r4, o4 = e3[0], i3 = e3[1];
10322
+ return (r4 = i3, new Promise(function(t5) {
10323
+ return setTimeout(t5, r4);
10324
+ })).then(function() {
10325
+ return l2(o4);
10344
10326
  });
10345
10327
  });
10346
- }(t2, function() {
10347
- return function(t3) {
10348
- return new Promise(function(e2, r2) {
10349
- var n2 = document.createElement("script"), o2 = function() {
10350
- var t4;
10351
- return null === (t4 = n2.parentNode) || void 0 === t4 ? void 0 : t4.removeChild(n2);
10352
- }, i2 = document.head || document.getElementsByTagName("head")[0];
10353
- n2.onload = function() {
10354
- o2(), e2();
10355
- }, n2.onerror = function() {
10356
- o2(), r2(new Error(w));
10357
- }, n2.async = true, n2.src = t3, i2.appendChild(n2);
10358
- });
10359
- }(t2);
10360
- }).then(O);
10361
- }
10362
- function O() {
10363
- var t2 = window, e2 = "__fpjs_p_l_b", r2 = t2[e2];
10364
- if (function(t3, e3) {
10365
- var r3, n2 = null === (r3 = Object.getOwnPropertyDescriptor) || void 0 === r3 ? void 0 : r3.call(Object, t3, e3);
10366
- (null == n2 ? void 0 : n2.configurable) ? delete t3[e3] : n2 && !n2.writable || (t3[e3] = void 0);
10367
- }(t2, e2), "function" != typeof (null == r2 ? void 0 : r2.load))
10368
- throw new Error(R);
10369
- return r2;
10328
+ };
10329
+ return l2(s2).then(function(t3) {
10330
+ return [t3, a2];
10331
+ });
10370
10332
  }
10371
- var _ = { load: function(t2) {
10333
+ var U = "https://fpnpmcdn.net/v<version>/<apiKey>/loader_v<loaderVersion>.js", V = U;
10334
+ function G(t2) {
10372
10335
  var e2;
10373
10336
  t2.scriptUrlPattern;
10374
- var r2 = t2.token, n2 = t2.apiKey, o2 = void 0 === n2 ? r2 : n2, i2 = function(t3, e3) {
10375
- var r3 = {};
10376
- for (var n3 in t3)
10377
- Object.prototype.hasOwnProperty.call(t3, n3) && e3.indexOf(n3) < 0 && (r3[n3] = t3[n3]);
10337
+ var n2 = t2.token, r2 = t2.apiKey, o2 = void 0 === r2 ? n2 : r2, i2 = function(t3, e3) {
10338
+ var n3 = {};
10339
+ for (var r3 in t3)
10340
+ Object.prototype.hasOwnProperty.call(t3, r3) && e3.indexOf(r3) < 0 && (n3[r3] = t3[r3]);
10378
10341
  if (null != t3 && "function" == typeof Object.getOwnPropertySymbols) {
10379
10342
  var o3 = 0;
10380
- for (n3 = Object.getOwnPropertySymbols(t3); o3 < n3.length; o3++)
10381
- e3.indexOf(n3[o3]) < 0 && Object.prototype.propertyIsEnumerable.call(t3, n3[o3]) && (r3[n3[o3]] = t3[n3[o3]]);
10343
+ for (r3 = Object.getOwnPropertySymbols(t3); o3 < r3.length; o3++)
10344
+ e3.indexOf(r3[o3]) < 0 && Object.prototype.propertyIsEnumerable.call(t3, r3[o3]) && (n3[r3[o3]] = t3[r3[o3]]);
10382
10345
  }
10383
- return r3;
10346
+ return n3;
10384
10347
  }(t2, ["scriptUrlPattern", "token", "apiKey"]), a2 = null !== (e2 = function(t3, e3) {
10385
10348
  return function(t4, e4) {
10386
10349
  return Object.prototype.hasOwnProperty.call(t4, e4);
10387
10350
  }(t3, e3) ? t3[e3] : void 0;
10388
- }(t2, "scriptUrlPattern")) && void 0 !== e2 ? e2 : g, u2 = function() {
10351
+ }(t2, "scriptUrlPattern")) && void 0 !== e2 ? e2 : U, c2 = function() {
10389
10352
  var t3 = [], e3 = function() {
10390
10353
  t3.push({ time: /* @__PURE__ */ new Date(), state: document.visibilityState });
10391
- }, r3 = function(t4, e4, r4, n3) {
10392
- return t4.addEventListener(e4, r4, n3), function() {
10393
- return t4.removeEventListener(e4, r4, n3);
10354
+ }, n3 = function(t4, e4, n4, r3) {
10355
+ return t4.addEventListener(e4, n4, r3), function() {
10356
+ return t4.removeEventListener(e4, n4, r3);
10394
10357
  };
10395
10358
  }(document, "visibilitychange", e3);
10396
- return e3(), [t3, r3];
10397
- }(), s2 = u2[0], l2 = u2[1];
10359
+ return e3(), [t3, n3];
10360
+ }(), u2 = c2[0], l2 = c2[1];
10398
10361
  return Promise.resolve().then(function() {
10399
10362
  if (!o2 || "string" != typeof o2)
10400
- throw new Error(v);
10401
- return E(function(t3, e3) {
10363
+ throw new Error(b);
10364
+ return M(function(t3, e3) {
10402
10365
  return (Array.isArray(t3) ? t3 : [t3]).map(function(t4) {
10403
10366
  return function(t5, e4) {
10404
- var r3 = encodeURIComponent;
10367
+ var n3 = encodeURIComponent;
10405
10368
  return t5.replace(/<[^<>]+>/g, function(t6) {
10406
- return "<version>" === t6 ? "3" : "<apiKey>" === t6 ? r3(e4) : "<loaderVersion>" === t6 ? r3("3.8.6") : t6;
10369
+ return "<version>" === t6 ? "3" : "<apiKey>" === t6 ? n3(e4) : "<loaderVersion>" === t6 ? n3("3.9.0") : t6;
10407
10370
  });
10408
10371
  }(String(t4), e3);
10409
10372
  });
10410
- }(a2, o2), b);
10373
+ }(a2, o2), B);
10411
10374
  }).catch(function(t3) {
10412
10375
  throw l2(), function(t4) {
10413
- return t4 instanceof Error && t4.message === R ? new Error(w) : t4;
10376
+ return t4 instanceof Error && t4.message === K ? new Error(F) : t4;
10414
10377
  }(t3);
10415
10378
  }).then(function(t3) {
10416
- var e3 = t3[0], r3 = t3[1];
10417
- return l2(), e3.load(c(c({}, i2), { ldi: { attempts: r3, visibilityStates: s2 } }));
10379
+ var e3 = t3[0], n3 = t3[1];
10380
+ return l2(), e3.load(s(s({}, i2), { ldi: { attempts: n3, visibilityStates: u2 } }));
10418
10381
  });
10419
- }, defaultScriptUrlPattern: g, ERROR_SCRIPT_LOAD_FAIL: w, ERROR_API_KEY_EXPIRED: m, ERROR_API_KEY_INVALID: y, ERROR_API_KEY_MISSING: v, ERROR_BAD_REQUEST_FORMAT: "Request cannot be parsed", ERROR_BAD_RESPONSE_FORMAT: "Response cannot be parsed", ERROR_CLIENT_TIMEOUT: "Client timeout", ERROR_CSP_BLOCK: l, ERROR_FORBIDDEN_ENDPOINT: s("HostnameRestricted"), ERROR_FORBIDDEN_HEADER: "Not available with restricted header", ERROR_FORBIDDEN_ORIGIN: "Not available for this origin", ERROR_GENERAL_SERVER_FAILURE: "Request failed", ERROR_INSTALLATION_METHOD_RESTRICTED: d, ERROR_INTEGRATION_FAILURE: s("IntegrationFailed"), ERROR_INVALID_ENDPOINT: "The endpoint parameter is not a valid URL", ERROR_NETWORK_ABORT: "Network request aborted", ERROR_NETWORK_CONNECTION: "Network connection error", ERROR_RATE_LIMIT: "Too many requests, rate limit exceeded", ERROR_SERVER_TIMEOUT: "Request failed to process", ERROR_SUBSCRIPTION_NOT_ACTIVE: p, ERROR_TOKEN_EXPIRED: m, ERROR_TOKEN_INVALID: y, ERROR_TOKEN_MISSING: v, ERROR_UNSUPPORTED_VERSION: h, ERROR_WRONG_REGION: f, defaultEndpoint: { default: "endpoint" }, defaultTlsEndpoint: { default: "tlsEndpoint" } };
10420
- function I() {
10421
- return x.apply(this, arguments);
10422
10382
  }
10423
- function x() {
10424
- return (x = e$1(a.mark(function t2() {
10425
- var e2, r2, n2, o2;
10383
+ function B(t2) {
10384
+ return function(t3, e2, n2, r2) {
10385
+ var o2, i2 = document, a2 = "securitypolicyviolation", c2 = function(e3) {
10386
+ var n3 = new URL(t3, location.href), r3 = e3.blockedURI;
10387
+ r3 !== n3.href && r3 !== n3.protocol.slice(0, -1) && r3 !== n3.origin || (o2 = e3, s2());
10388
+ };
10389
+ i2.addEventListener(a2, c2);
10390
+ var s2 = function() {
10391
+ return i2.removeEventListener(a2, c2);
10392
+ };
10393
+ return Promise.resolve().then(e2).then(function(t4) {
10394
+ return s2(), t4;
10395
+ }, function(t4) {
10396
+ return new Promise(function(t5) {
10397
+ return setTimeout(t5);
10398
+ }).then(function() {
10399
+ if (s2(), o2)
10400
+ return function() {
10401
+ throw new Error(y);
10402
+ }();
10403
+ throw t4;
10404
+ });
10405
+ });
10406
+ }(t2, function() {
10407
+ return function(t3) {
10408
+ return new Promise(function(e2, n2) {
10409
+ if (function(t4) {
10410
+ if (URL.prototype)
10411
+ try {
10412
+ return new URL(t4, location.href), false;
10413
+ } catch (t5) {
10414
+ if (t5 instanceof Error && "TypeError" === t5.name)
10415
+ return true;
10416
+ throw t5;
10417
+ }
10418
+ }(t3))
10419
+ throw new Error(E);
10420
+ var r2 = document.createElement("script"), o2 = function() {
10421
+ var t4;
10422
+ return null === (t4 = r2.parentNode) || void 0 === t4 ? void 0 : t4.removeChild(r2);
10423
+ }, i2 = document.head || document.getElementsByTagName("head")[0];
10424
+ r2.onload = function() {
10425
+ o2(), e2();
10426
+ }, r2.onerror = function() {
10427
+ o2(), n2(new Error(F));
10428
+ }, r2.async = true, r2.src = t3, i2.appendChild(r2);
10429
+ });
10430
+ }(t2);
10431
+ }).then(q);
10432
+ }
10433
+ function q() {
10434
+ var t2 = window, e2 = "__fpjs_p_l_b", n2 = t2[e2];
10435
+ if (function(t3, e3) {
10436
+ var n3, r2 = null === (n3 = Object.getOwnPropertyDescriptor) || void 0 === n3 ? void 0 : n3.call(Object, t3, e3);
10437
+ (null == r2 ? void 0 : r2.configurable) ? delete t3[e3] : r2 && !r2.writable || (t3[e3] = void 0);
10438
+ }(t2, e2), "function" != typeof (null == n2 ? void 0 : n2.load))
10439
+ throw new Error(K);
10440
+ return n2;
10441
+ }
10442
+ var W = { load: G, defaultScriptUrlPattern: V, ERROR_SCRIPT_LOAD_FAIL: F, ERROR_API_KEY_EXPIRED: N, ERROR_API_KEY_INVALID: S, ERROR_API_KEY_MISSING: b, ERROR_BAD_REQUEST_FORMAT: x, ERROR_BAD_RESPONSE_FORMAT: R, ERROR_CLIENT_TIMEOUT: p, ERROR_CSP_BLOCK: y, ERROR_FORBIDDEN_ENDPOINT: _, ERROR_FORBIDDEN_HEADER: k, ERROR_FORBIDDEN_ORIGIN: P, ERROR_GENERAL_SERVER_FAILURE: T, ERROR_INSTALLATION_METHOD_RESTRICTED: w, ERROR_INTEGRATION_FAILURE: I, ERROR_INVALID_ENDPOINT: E, ERROR_NETWORK_ABORT: v, ERROR_NETWORK_CONNECTION: d, ERROR_RATE_LIMIT: A, ERROR_SERVER_TIMEOUT: L, ERROR_SUBSCRIPTION_NOT_ACTIVE: m, ERROR_TOKEN_EXPIRED: j, ERROR_TOKEN_INVALID: C, ERROR_TOKEN_MISSING: D, ERROR_UNSUPPORTED_VERSION: O, ERROR_WRONG_REGION: g, defaultEndpoint: l, defaultTlsEndpoint: h }, J = Object.freeze({ __proto__: null, ERROR_API_KEY_EXPIRED: N, ERROR_API_KEY_INVALID: S, ERROR_API_KEY_MISSING: b, ERROR_BAD_REQUEST_FORMAT: x, ERROR_BAD_RESPONSE_FORMAT: R, ERROR_CLIENT_TIMEOUT: p, ERROR_CSP_BLOCK: y, ERROR_FORBIDDEN_ENDPOINT: _, ERROR_FORBIDDEN_HEADER: k, ERROR_FORBIDDEN_ORIGIN: P, ERROR_GENERAL_SERVER_FAILURE: T, ERROR_INSTALLATION_METHOD_RESTRICTED: w, ERROR_INTEGRATION_FAILURE: I, ERROR_INVALID_ENDPOINT: E, ERROR_NETWORK_ABORT: v, ERROR_NETWORK_CONNECTION: d, ERROR_RATE_LIMIT: A, ERROR_SCRIPT_LOAD_FAIL: F, ERROR_SERVER_TIMEOUT: L, ERROR_SUBSCRIPTION_NOT_ACTIVE: m, ERROR_TOKEN_EXPIRED: j, ERROR_TOKEN_INVALID: C, ERROR_TOKEN_MISSING: D, ERROR_UNSUPPORTED_VERSION: O, ERROR_WRONG_REGION: g, default: W, defaultEndpoint: l, defaultScriptUrlPattern: V, defaultTlsEndpoint: h, load: G });
10443
+ const H = "@fpjs@client@", Y = () => Date.now();
10444
+ class $ {
10445
+ constructor(t2) {
10446
+ var e2;
10447
+ this.tag = t2.tag || null, this.linkedId = t2.linkedId || null, this.extendedResult = null !== (e2 = t2.extendedResult) && void 0 !== e2 && e2;
10448
+ }
10449
+ toKey() {
10450
+ return `${JSON.stringify(this.tag)}__${JSON.stringify(this.linkedId)}__${this.extendedResult}`;
10451
+ }
10452
+ }
10453
+ function X(t2, e2) {
10454
+ return `${e2}__${t2}`;
10455
+ }
10456
+ function z(t2, e2) {
10457
+ return t2.replace(`${e2}__`, "");
10458
+ }
10459
+ class Q {
10460
+ constructor(t2 = H) {
10461
+ this.prefix = t2;
10462
+ }
10463
+ set(t2, e2) {
10464
+ window.localStorage.setItem(X(t2, this.prefix), JSON.stringify(e2));
10465
+ }
10466
+ get(t2) {
10467
+ const e2 = window.localStorage.getItem(X(t2, this.prefix));
10468
+ if (e2)
10469
+ try {
10470
+ return JSON.parse(e2);
10471
+ } catch (t3) {
10472
+ return;
10473
+ }
10474
+ }
10475
+ remove(t2) {
10476
+ window.localStorage.removeItem(X(t2, this.prefix));
10477
+ }
10478
+ allKeys() {
10479
+ return Object.keys(window.localStorage).filter((t2) => t2.startsWith(this.prefix)).map((t2) => z(t2, this.prefix));
10480
+ }
10481
+ }
10482
+ class Z {
10483
+ constructor(t2 = H) {
10484
+ this.prefix = t2;
10485
+ }
10486
+ set(t2, e2) {
10487
+ window.sessionStorage.setItem(X(t2, this.prefix), JSON.stringify(e2));
10488
+ }
10489
+ get(t2) {
10490
+ const e2 = window.sessionStorage.getItem(X(t2, this.prefix));
10491
+ if (e2)
10492
+ try {
10493
+ return JSON.parse(e2);
10494
+ } catch (t3) {
10495
+ return;
10496
+ }
10497
+ }
10498
+ remove(t2) {
10499
+ window.sessionStorage.removeItem(X(t2, this.prefix));
10500
+ }
10501
+ allKeys() {
10502
+ return Object.keys(window.sessionStorage).filter((t2) => t2.startsWith(this.prefix)).map((t2) => z(t2, this.prefix));
10503
+ }
10504
+ }
10505
+ class tt {
10506
+ constructor(t2, e2 = 3600, n2) {
10507
+ this.cache = t2, this.cacheTime = e2, this.nowProvider = n2 || Y;
10508
+ }
10509
+ get(t2) {
10510
+ return u(this, void 0, void 0, function* () {
10511
+ const e2 = yield this.cache.get(t2.toKey());
10512
+ if (!e2)
10513
+ return;
10514
+ const n2 = yield this.nowProvider(), r2 = Math.floor(n2 / 1e3);
10515
+ if (!(e2.expiresAt < r2))
10516
+ return e2.body;
10517
+ yield this.cache.remove(t2.toKey());
10518
+ });
10519
+ }
10520
+ set(t2, e2) {
10521
+ return u(this, void 0, void 0, function* () {
10522
+ const n2 = yield this.wrapCacheEntry(e2);
10523
+ yield this.cache.set(t2.toKey(), n2);
10524
+ });
10525
+ }
10526
+ clearCache() {
10527
+ return u(this, void 0, void 0, function* () {
10528
+ const t2 = yield this.cache.allKeys();
10529
+ yield Promise.all(t2.map((t3) => this.cache.remove(t3)));
10530
+ });
10531
+ }
10532
+ wrapCacheEntry(t2) {
10533
+ return u(this, void 0, void 0, function* () {
10534
+ const e2 = yield this.nowProvider(), n2 = Math.floor(e2 / 1e3) + this.cacheTime;
10535
+ return { body: t2, expiresAt: n2 };
10536
+ });
10537
+ }
10538
+ }
10539
+ class et {
10540
+ constructor() {
10541
+ this.enclosedCache = function() {
10542
+ const t2 = {};
10543
+ return { set(e2, n2) {
10544
+ t2[e2] = n2;
10545
+ }, get(e2) {
10546
+ const n2 = t2[e2];
10547
+ if (n2)
10548
+ return n2;
10549
+ }, remove(e2) {
10550
+ delete t2[e2];
10551
+ }, allKeys: () => Object.keys(t2) };
10552
+ }();
10553
+ }
10554
+ }
10555
+ class nt {
10556
+ set() {
10557
+ }
10558
+ get() {
10559
+ }
10560
+ remove() {
10561
+ }
10562
+ allKeys() {
10563
+ return [];
10564
+ }
10565
+ }
10566
+ var rt;
10567
+ !function(t2) {
10568
+ t2.Memory = "memory", t2.LocalStorage = "localstorage", t2.SessionStorage = "sessionstorage", t2.NoCache = "nocache";
10569
+ }(rt || (rt = {}));
10570
+ const ot = { [rt.Memory]: () => new et().enclosedCache, [rt.LocalStorage]: (t2) => new Q(t2), [rt.SessionStorage]: (t2) => new Z(t2), [rt.NoCache]: () => new nt() }, it = (t2) => ot[t2];
10571
+ class at {
10572
+ constructor(t2) {
10573
+ var e2;
10574
+ let n2;
10575
+ if (this.inFlightRequests = /* @__PURE__ */ new Map(), this.agentPromise = null, this.customAgent = null == t2 ? void 0 : t2.customAgent, this.agent = { get: () => {
10576
+ throw new Error("FPJSAgent hasn't loaded yet. Make sure to call the init() method first.");
10577
+ } }, this.loadOptions = null == t2 ? void 0 : t2.loadOptions, (null == t2 ? void 0 : t2.cache) && (null == t2 ? void 0 : t2.cacheLocation) && console.warn("Both `cache` and `cacheLocation` options have been specified in the FpjsClient configuration; ignoring `cacheLocation` and using `cache`."), null == t2 ? void 0 : t2.cache)
10578
+ n2 = t2.cache;
10579
+ else {
10580
+ if (this.cacheLocation = (null == t2 ? void 0 : t2.cacheLocation) || rt.SessionStorage, !it(this.cacheLocation))
10581
+ throw new Error(`Invalid cache location "${this.cacheLocation}"`);
10582
+ ((t3) => {
10583
+ switch (t3) {
10584
+ case rt.SessionStorage:
10585
+ try {
10586
+ window.sessionStorage.getItem("item");
10587
+ } catch (t4) {
10588
+ return false;
10589
+ }
10590
+ return true;
10591
+ case rt.LocalStorage:
10592
+ try {
10593
+ window.localStorage.getItem("item");
10594
+ } catch (t4) {
10595
+ return false;
10596
+ }
10597
+ return true;
10598
+ default:
10599
+ return true;
10600
+ }
10601
+ })(this.cacheLocation) || (this.cacheLocation = rt.Memory), n2 = it(this.cacheLocation)(null == t2 ? void 0 : t2.cachePrefix);
10602
+ }
10603
+ if ((null == t2 ? void 0 : t2.cacheTimeInSeconds) && t2.cacheTimeInSeconds > 86400)
10604
+ throw new Error("Cache time cannot exceed 86400 seconds (24 hours)");
10605
+ const r2 = null !== (e2 = null == t2 ? void 0 : t2.cacheTimeInSeconds) && void 0 !== e2 ? e2 : 3600;
10606
+ this.cacheManager = new tt(n2, r2);
10607
+ }
10608
+ init(t2) {
10609
+ var e2, n2;
10610
+ return u(this, void 0, void 0, function* () {
10611
+ if (!this.loadOptions && !t2)
10612
+ throw new TypeError("No load options provided");
10613
+ const r2 = Object.assign(Object.assign(Object.assign({}, this.loadOptions), t2), { integrationInfo: [...(null === (e2 = this.loadOptions) || void 0 === e2 ? void 0 : e2.integrationInfo) || [], ...(null == t2 ? void 0 : t2.integrationInfo) || [], "fingerprintjs-pro-spa/1.3.0"] });
10614
+ if (!this.agentPromise) {
10615
+ const t3 = null !== (n2 = this.customAgent) && void 0 !== n2 ? n2 : J;
10616
+ this.agentPromise = t3.load(r2).then((t4) => (this.agent = t4, t4)).catch((t4) => {
10617
+ throw this.agentPromise = null, t4;
10618
+ });
10619
+ }
10620
+ return this.agentPromise;
10621
+ });
10622
+ }
10623
+ getVisitorData(t2 = {}, e2 = false) {
10624
+ return u(this, void 0, void 0, function* () {
10625
+ const n2 = at.makeCacheKey(t2).toKey();
10626
+ if (!this.inFlightRequests.has(n2)) {
10627
+ const r2 = this._identify(t2, e2).finally(() => {
10628
+ this.inFlightRequests.delete(n2);
10629
+ });
10630
+ this.inFlightRequests.set(n2, r2);
10631
+ }
10632
+ return yield this.inFlightRequests.get(n2);
10633
+ });
10634
+ }
10635
+ getVisitorDataFromCache(t2 = {}) {
10636
+ return u(this, void 0, void 0, function* () {
10637
+ const e2 = at.makeCacheKey(t2), n2 = yield this.cacheManager.get(e2);
10638
+ return n2 ? Object.assign(Object.assign({}, n2), { cacheHit: true }) : void 0;
10639
+ });
10640
+ }
10641
+ isInCache(t2 = {}) {
10642
+ return u(this, void 0, void 0, function* () {
10643
+ return Boolean(yield this.getVisitorDataFromCache(t2));
10644
+ });
10645
+ }
10646
+ clearCache() {
10647
+ return u(this, void 0, void 0, function* () {
10648
+ yield this.cacheManager.clearCache();
10649
+ });
10650
+ }
10651
+ static makeCacheKey(t2) {
10652
+ return new $(t2);
10653
+ }
10654
+ _identify(t2, e2 = false) {
10655
+ return u(this, void 0, void 0, function* () {
10656
+ const n2 = at.makeCacheKey(t2);
10657
+ if (!e2) {
10658
+ const t3 = yield this.cacheManager.get(n2);
10659
+ if (t3)
10660
+ return Object.assign(Object.assign({}, t3), { cacheHit: true });
10661
+ }
10662
+ const r2 = yield this.agent.get(t2);
10663
+ return yield this.cacheManager.set(n2, r2), Object.assign(Object.assign({}, r2), { cacheHit: false });
10664
+ });
10665
+ }
10666
+ }
10667
+ function ct() {
10668
+ return st.apply(this, arguments);
10669
+ }
10670
+ function st() {
10671
+ return (st = e$1(a.mark(function t2() {
10672
+ var e2, n2, r2, o2;
10426
10673
  return a.wrap(function(t3) {
10427
10674
  for (; ; )
10428
10675
  switch (t3.prev = t3.next) {
10429
10676
  case 0:
10430
- if (t3.prev = 0, e2 = "object" === ("undefined" == typeof Cypress ? "undefined" : u(Cypress)), r2 = "object" === ("undefined" == typeof process ? "undefined" : u(process)) && "test" === { "NODE_ENV": "production" }.NODE_ENV, !e2 && !r2) {
10677
+ if (t3.prev = 0, e2 = "object" === ("undefined" == typeof Cypress ? "undefined" : c(Cypress)), n2 = "object" === ("undefined" == typeof process ? "undefined" : c(process)) && "test" === { "NODE_ENV": "production" }.NODE_ENV, !e2 && !n2) {
10431
10678
  t3.next = 5;
10432
10679
  break;
10433
10680
  }
10434
10681
  return t3.abrupt("return", "a-mock-visitor-id");
10435
10682
  case 5:
10436
- return t3.next = 7, _.load({ apiKey: "hpFVJecm7Ni7AjSfvBIW" });
10437
- case 7:
10438
- return n2 = t3.sent, t3.next = 10, n2.get();
10683
+ return r2 = new at({ loadOptions: { apiKey: "hpFVJecm7Ni7AjSfvBIW" } }), t3.next = 8, r2.init();
10684
+ case 8:
10685
+ return t3.next = 10, r2.getVisitorData();
10439
10686
  case 10:
10440
10687
  return o2 = t3.sent, t3.abrupt("return", o2.visitorId);
10441
10688
  case 14:
@@ -10447,39 +10694,39 @@ function x() {
10447
10694
  }, t2, null, [[0, 14]]);
10448
10695
  }))).apply(this, arguments);
10449
10696
  }
10450
- function S() {
10451
- return k.apply(this, arguments);
10697
+ function ut() {
10698
+ return lt.apply(this, arguments);
10452
10699
  }
10453
- function k() {
10454
- return (k = e$1(a.mark(function t2() {
10700
+ function lt() {
10701
+ return (lt = e$1(a.mark(function t2() {
10455
10702
  return a.wrap(function(t3) {
10456
10703
  for (; ; )
10457
10704
  switch (t3.prev = t3.next) {
10458
10705
  case 0:
10459
10706
  return t3.abrupt("return", new Promise(function(t4) {
10460
10707
  window.requestIdleCallback ? requestIdleCallback(e$1(a.mark(function e2() {
10461
- var r2;
10708
+ var n2;
10462
10709
  return a.wrap(function(e3) {
10463
10710
  for (; ; )
10464
10711
  switch (e3.prev = e3.next) {
10465
10712
  case 0:
10466
- return e3.next = 2, I();
10713
+ return e3.next = 2, ct();
10467
10714
  case 2:
10468
- r2 = e3.sent, t4(r2);
10715
+ n2 = e3.sent, t4(n2);
10469
10716
  case 4:
10470
10717
  case "end":
10471
10718
  return e3.stop();
10472
10719
  }
10473
10720
  }, e2);
10474
10721
  }))) : setTimeout(e$1(a.mark(function e2() {
10475
- var r2;
10722
+ var n2;
10476
10723
  return a.wrap(function(e3) {
10477
10724
  for (; ; )
10478
10725
  switch (e3.prev = e3.next) {
10479
10726
  case 0:
10480
- return e3.next = 2, I();
10727
+ return e3.next = 2, ct();
10481
10728
  case 2:
10482
- r2 = e3.sent, t4(r2);
10729
+ n2 = e3.sent, t4(n2);
10483
10730
  case 4:
10484
10731
  case "end":
10485
10732
  return e3.stop();
@@ -10494,31 +10741,31 @@ function k() {
10494
10741
  }, t2);
10495
10742
  }))).apply(this, arguments);
10496
10743
  }
10497
- var N = function(t2) {
10498
- var e2 = t2.env, r2 = t2.kountAccountId, n2 = t2.kountSessionId, o2 = function(t3) {
10744
+ var ht = function(t2) {
10745
+ var e2 = t2.env, n2 = t2.kountAccountId, r2 = t2.kountSessionId, o2 = function(t3) {
10499
10746
  return "production" === t3;
10500
10747
  }(e2) ? "https://ssl.kaptcha.com" : "https://tst.kaptcha.com", i2 = new URL("".concat(o2, "/collect/sdk"));
10501
- i2.searchParams.append("m", r2), n2 && i2.searchParams.append("m", n2);
10748
+ i2.searchParams.append("m", n2), r2 && i2.searchParams.append("m", r2);
10502
10749
  var a2 = document.createElement("script");
10503
10750
  return a2.setAttribute("class", "kaxsdc"), a2.setAttribute("data-event", "load"), a2.setAttribute("type", "text/javascript"), a2.setAttribute("src", i2.href), document.body.append(a2), a2;
10504
10751
  };
10505
- function L(t2) {
10506
- return T.apply(this, arguments);
10752
+ function ft(t2) {
10753
+ return pt.apply(this, arguments);
10507
10754
  }
10508
- function T() {
10509
- return (T = e$1(a.mark(function t2(e2) {
10510
- var r2, n2, o2;
10755
+ function pt() {
10756
+ return (pt = e$1(a.mark(function t2(e2) {
10757
+ var n2, r2, o2;
10511
10758
  return a.wrap(function(t3) {
10512
10759
  for (; ; )
10513
10760
  switch (t3.prev = t3.next) {
10514
10761
  case 0:
10515
- return r2 = e2.env, n2 = e2.kountAccountId, o2 = e2.kountSessionId, t3.abrupt("return", new Promise(function(t4, e3) {
10516
- var i2 = N({ env: r2, kountAccountId: n2, kountSessionId: o2 });
10762
+ return n2 = e2.env, r2 = e2.kountAccountId, o2 = e2.kountSessionId, t3.abrupt("return", new Promise(function(t4, e3) {
10763
+ var i2 = ht({ env: n2, kountAccountId: r2, kountSessionId: o2 });
10517
10764
  i2.onload = function() {
10518
10765
  var e4 = new ka.ClientSDK();
10519
10766
  e4.setupCallback({ "collect-begin": function(e5) {
10520
- var r3 = e5.MercSessId;
10521
- t4(r3);
10767
+ var n3 = e5.MercSessId;
10768
+ t4(n3);
10522
10769
  } }), e4.autoLoadEvents();
10523
10770
  }, i2.onerror = function() {
10524
10771
  e3(new Error("Error attempting to mount Kount script"));
@@ -10531,56 +10778,56 @@ function T() {
10531
10778
  }, t2);
10532
10779
  }))).apply(this, arguments);
10533
10780
  }
10534
- function A(t2) {
10535
- return P.apply(this, arguments);
10781
+ function dt(t2) {
10782
+ return vt.apply(this, arguments);
10536
10783
  }
10537
- function P() {
10538
- return P = e$1(a.mark(function t2(e2) {
10539
- var r2, n2, o2, i2, u2, c2, s2, l2, f2, p2, h2, d2, v2, y2, m2, R2, E2, g2, w2, b2;
10784
+ function vt() {
10785
+ return vt = e$1(a.mark(function t2(e2) {
10786
+ var n2, r2, o2, i2, c2, s2, u2, l2, h2, f2, p2, d2, v2, R2, y2, E2, g2, m2, O2, w2;
10540
10787
  return a.wrap(function(t3) {
10541
10788
  for (; ; )
10542
10789
  switch (t3.prev = t3.next) {
10543
10790
  case 0:
10544
- return r2 = e2.env, n2 = void 0 === r2 ? null : r2, o2 = e2.screen, i2 = e2.navigator, u2 = e2.kountAccountId, c2 = void 0 === u2 ? null : u2, s2 = e2.kountSessionId, l2 = void 0 === s2 ? null : s2, f2 = e2.getFingerprint, p2 = e2.getFraudSessionId, d2 = (h2 = o2 || {}).colorDepth, v2 = h2.height, y2 = h2.width, R2 = (m2 = i2 || {}).javaEnabled, E2 = m2.language, t3.prev = 3, t3.next = 6, f2();
10791
+ return n2 = e2.env, r2 = void 0 === n2 ? null : n2, o2 = e2.screen, i2 = e2.navigator, c2 = e2.kountAccountId, s2 = void 0 === c2 ? null : c2, u2 = e2.kountSessionId, l2 = void 0 === u2 ? null : u2, h2 = e2.getFingerprint, f2 = e2.getFraudSessionId, d2 = (p2 = o2 || {}).colorDepth, v2 = p2.height, R2 = p2.width, E2 = (y2 = i2 || {}).javaEnabled, g2 = y2.language, t3.prev = 3, t3.next = 6, h2();
10545
10792
  case 6:
10546
- if (g2 = t3.sent, !c2) {
10793
+ if (m2 = t3.sent, !s2) {
10547
10794
  t3.next = 11;
10548
10795
  break;
10549
10796
  }
10550
- return t3.next = 10, p2({ env: n2, kountAccountId: c2, kountSessionId: l2 });
10797
+ return t3.next = 10, f2({ env: r2, kountAccountId: s2, kountSessionId: l2 });
10551
10798
  case 10:
10552
- w2 = t3.sent;
10799
+ O2 = t3.sent;
10553
10800
  case 11:
10554
10801
  t3.next = 16;
10555
10802
  break;
10556
10803
  case 13:
10557
10804
  t3.prev = 13, t3.t0 = t3.catch(3), console.error(t3.t0);
10558
10805
  case 16:
10559
- return b2 = { riskMetadata: { fingerprint: g2 || null, extraData: { kountFraudSessionId: w2 || null }, browserData: { colorDepth: d2 || null, isJavaEnabled: R2 ? R2.call(i2) : null, language: E2 || null, screenHeight: v2 || null, screenWidth: y2 || null, timeZoneOffset: (/* @__PURE__ */ new Date()).getTimezoneOffset() } } }, t3.abrupt("return", b2);
10806
+ return w2 = { riskMetadata: { fingerprint: m2 || null, extraData: { kountFraudSessionId: O2 || null }, browserData: { colorDepth: d2 || null, isJavaEnabled: E2 ? E2.call(i2) : null, language: g2 || null, screenHeight: v2 || null, screenWidth: R2 || null, timeZoneOffset: (/* @__PURE__ */ new Date()).getTimezoneOffset() } } }, t3.abrupt("return", w2);
10560
10807
  case 18:
10561
10808
  case "end":
10562
10809
  return t3.stop();
10563
10810
  }
10564
10811
  }, t2, null, [[3, 13]]);
10565
- })), P.apply(this, arguments);
10812
+ })), vt.apply(this, arguments);
10566
10813
  }
10567
- function j() {
10568
- return D.apply(this, arguments);
10814
+ function Rt() {
10815
+ return yt.apply(this, arguments);
10569
10816
  }
10570
- function D() {
10571
- return D = e$1(a.mark(function t2() {
10572
- var e2, r2, n2, o2, i2, u2, c2, s2 = arguments;
10817
+ function yt() {
10818
+ return yt = e$1(a.mark(function t2() {
10819
+ var e2, n2, r2, o2, i2, c2, s2, u2 = arguments;
10573
10820
  return a.wrap(function(t3) {
10574
10821
  for (; ; )
10575
10822
  switch (t3.prev = t3.next) {
10576
10823
  case 0:
10577
- return r2 = (e2 = s2.length > 0 && void 0 !== s2[0] ? s2[0] : {}).env, n2 = void 0 === r2 ? null : r2, o2 = e2.kountAccountId, i2 = void 0 === o2 ? null : o2, u2 = e2.kountSessionId, c2 = void 0 === u2 ? null : u2, t3.abrupt("return", A({ env: n2, screen, navigator, kountAccountId: i2, kountSessionId: c2, getFingerprint: S, getFraudSessionId: L }));
10824
+ return n2 = (e2 = u2.length > 0 && void 0 !== u2[0] ? u2[0] : {}).env, r2 = void 0 === n2 ? null : n2, o2 = e2.kountAccountId, i2 = void 0 === o2 ? null : o2, c2 = e2.kountSessionId, s2 = void 0 === c2 ? null : c2, t3.abrupt("return", dt({ env: r2, screen, navigator, kountAccountId: i2, kountSessionId: s2, getFingerprint: ut, getFraudSessionId: ft }));
10578
10825
  case 2:
10579
10826
  case "end":
10580
10827
  return t3.stop();
10581
10828
  }
10582
10829
  }, t2);
10583
- })), D.apply(this, arguments);
10830
+ })), yt.apply(this, arguments);
10584
10831
  }
10585
10832
  function getPaymentMethods() {
10586
10833
  var _a;
@@ -14110,7 +14357,7 @@ async function fetchReadyToPay() {
14110
14357
  return Endpoint(async () => {
14111
14358
  var _a, _b, _c, _d, _e, _f, _g;
14112
14359
  if (!state.data.riskMetadata) {
14113
- const { riskMetadata: data2 } = await j();
14360
+ const { riskMetadata: data2 } = await Rt();
14114
14361
  state.data.riskMetadata = data2;
14115
14362
  }
14116
14363
  const data = {
@@ -14178,7 +14425,7 @@ async function fetchReadyToPayout() {
14178
14425
  validateData(state.data);
14179
14426
  validateStorefront(state.storefront);
14180
14427
  if (!((_a = state == null ? void 0 : state.data) == null ? void 0 : _a.riskMetadata)) {
14181
- const { riskMetadata: data2 } = await j();
14428
+ const { riskMetadata: data2 } = await Rt();
14182
14429
  state.data.riskMetadata = data2;
14183
14430
  }
14184
14431
  const data = {
@@ -14638,7 +14885,7 @@ async function fetchData({
14638
14885
  state.storefront.setSessionToken(state.options.jwt);
14639
14886
  }
14640
14887
  if (!riskMetadata) {
14641
- const { riskMetadata: data } = await j();
14888
+ const { riskMetadata: data } = await Rt();
14642
14889
  state.data.riskMetadata = data;
14643
14890
  } else {
14644
14891
  state.data.riskMetadata = riskMetadata;
@@ -16491,17 +16738,17 @@ var util = {};
16491
16738
  return hash;
16492
16739
  }
16493
16740
  exports.toHash = toHash;
16494
- function alwaysValidSchema(it, schema2) {
16741
+ function alwaysValidSchema(it2, schema2) {
16495
16742
  if (typeof schema2 == "boolean")
16496
16743
  return schema2;
16497
16744
  if (Object.keys(schema2).length === 0)
16498
16745
  return true;
16499
- checkUnknownRules(it, schema2);
16500
- return !schemaHasRules(schema2, it.self.RULES.all);
16746
+ checkUnknownRules(it2, schema2);
16747
+ return !schemaHasRules(schema2, it2.self.RULES.all);
16501
16748
  }
16502
16749
  exports.alwaysValidSchema = alwaysValidSchema;
16503
- function checkUnknownRules(it, schema2 = it.schema) {
16504
- const { opts, self: self2 } = it;
16750
+ function checkUnknownRules(it2, schema2 = it2.schema) {
16751
+ const { opts, self: self2 } = it2;
16505
16752
  if (!opts.strictSchema)
16506
16753
  return;
16507
16754
  if (typeof schema2 === "boolean")
@@ -16509,7 +16756,7 @@ var util = {};
16509
16756
  const rules2 = self2.RULES.keywords;
16510
16757
  for (const key in schema2) {
16511
16758
  if (!rules2[key])
16512
- checkStrictMode(it, `unknown keyword: "${key}"`);
16759
+ checkStrictMode(it2, `unknown keyword: "${key}"`);
16513
16760
  }
16514
16761
  }
16515
16762
  exports.checkUnknownRules = checkUnknownRules;
@@ -16631,13 +16878,13 @@ var util = {};
16631
16878
  return jsPropertySyntax ? (0, codegen_12.getProperty)(dataProp).toString() : "/" + escapeJsonPointer(dataProp);
16632
16879
  }
16633
16880
  exports.getErrorPath = getErrorPath;
16634
- function checkStrictMode(it, msg, mode = it.opts.strictSchema) {
16881
+ function checkStrictMode(it2, msg, mode = it2.opts.strictSchema) {
16635
16882
  if (!mode)
16636
16883
  return;
16637
16884
  msg = `strict mode: ${msg}`;
16638
16885
  if (mode === true)
16639
16886
  throw new Error(msg);
16640
- it.self.logger.warn(msg);
16887
+ it2.self.logger.warn(msg);
16641
16888
  }
16642
16889
  exports.checkStrictMode = checkStrictMode;
16643
16890
  })(util);
@@ -16681,23 +16928,23 @@ names$1.default = names;
16681
16928
  message: ({ keyword: keyword2, schemaType }) => schemaType ? (0, codegen_12.str)`"${keyword2}" keyword must be ${schemaType} ($data)` : (0, codegen_12.str)`"${keyword2}" keyword is invalid ($data)`
16682
16929
  };
16683
16930
  function reportError(cxt, error2 = exports.keywordError, errorPaths, overrideAllErrors) {
16684
- const { it } = cxt;
16685
- const { gen, compositeRule, allErrors } = it;
16931
+ const { it: it2 } = cxt;
16932
+ const { gen, compositeRule, allErrors } = it2;
16686
16933
  const errObj = errorObjectCode(cxt, error2, errorPaths);
16687
16934
  if (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) {
16688
16935
  addError(gen, errObj);
16689
16936
  } else {
16690
- returnErrors(it, (0, codegen_12._)`[${errObj}]`);
16937
+ returnErrors(it2, (0, codegen_12._)`[${errObj}]`);
16691
16938
  }
16692
16939
  }
16693
16940
  exports.reportError = reportError;
16694
16941
  function reportExtraError(cxt, error2 = exports.keywordError, errorPaths) {
16695
- const { it } = cxt;
16696
- const { gen, compositeRule, allErrors } = it;
16942
+ const { it: it2 } = cxt;
16943
+ const { gen, compositeRule, allErrors } = it2;
16697
16944
  const errObj = errorObjectCode(cxt, error2, errorPaths);
16698
16945
  addError(gen, errObj);
16699
16946
  if (!(compositeRule || allErrors)) {
16700
- returnErrors(it, names_12.default.vErrors);
16947
+ returnErrors(it2, names_12.default.vErrors);
16701
16948
  }
16702
16949
  }
16703
16950
  exports.reportExtraError = reportExtraError;
@@ -16706,15 +16953,15 @@ names$1.default = names;
16706
16953
  gen.if((0, codegen_12._)`${names_12.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_12._)`${names_12.default.vErrors}.length`, errsCount), () => gen.assign(names_12.default.vErrors, null)));
16707
16954
  }
16708
16955
  exports.resetErrorsCount = resetErrorsCount;
16709
- function extendErrors({ gen, keyword: keyword2, schemaValue, data, errsCount, it }) {
16956
+ function extendErrors({ gen, keyword: keyword2, schemaValue, data, errsCount, it: it2 }) {
16710
16957
  if (errsCount === void 0)
16711
16958
  throw new Error("ajv implementation error");
16712
16959
  const err = gen.name("err");
16713
16960
  gen.forRange("i", errsCount, names_12.default.errors, (i2) => {
16714
16961
  gen.const(err, (0, codegen_12._)`${names_12.default.vErrors}[${i2}]`);
16715
- gen.if((0, codegen_12._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_12._)`${err}.instancePath`, (0, codegen_12.strConcat)(names_12.default.instancePath, it.errorPath)));
16716
- gen.assign((0, codegen_12._)`${err}.schemaPath`, (0, codegen_12.str)`${it.errSchemaPath}/${keyword2}`);
16717
- if (it.opts.verbose) {
16962
+ gen.if((0, codegen_12._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_12._)`${err}.instancePath`, (0, codegen_12.strConcat)(names_12.default.instancePath, it2.errorPath)));
16963
+ gen.assign((0, codegen_12._)`${err}.schemaPath`, (0, codegen_12.str)`${it2.errSchemaPath}/${keyword2}`);
16964
+ if (it2.opts.verbose) {
16718
16965
  gen.assign((0, codegen_12._)`${err}.schema`, schemaValue);
16719
16966
  gen.assign((0, codegen_12._)`${err}.data`, data);
16720
16967
  }
@@ -16726,10 +16973,10 @@ names$1.default = names;
16726
16973
  gen.if((0, codegen_12._)`${names_12.default.vErrors} === null`, () => gen.assign(names_12.default.vErrors, (0, codegen_12._)`[${err}]`), (0, codegen_12._)`${names_12.default.vErrors}.push(${err})`);
16727
16974
  gen.code((0, codegen_12._)`${names_12.default.errors}++`);
16728
16975
  }
16729
- function returnErrors(it, errs) {
16730
- const { gen, validateName, schemaEnv } = it;
16976
+ function returnErrors(it2, errs) {
16977
+ const { gen, validateName, schemaEnv } = it2;
16731
16978
  if (schemaEnv.$async) {
16732
- gen.throw((0, codegen_12._)`new ${it.ValidationError}(${errs})`);
16979
+ gen.throw((0, codegen_12._)`new ${it2.ValidationError}(${errs})`);
16733
16980
  } else {
16734
16981
  gen.assign((0, codegen_12._)`${validateName}.errors`, errs);
16735
16982
  gen.return(false);
@@ -16751,9 +16998,9 @@ names$1.default = names;
16751
16998
  return errorObject(cxt, error2, errorPaths);
16752
16999
  }
16753
17000
  function errorObject(cxt, error2, errorPaths = {}) {
16754
- const { gen, it } = cxt;
17001
+ const { gen, it: it2 } = cxt;
16755
17002
  const keyValues = [
16756
- errorInstancePath(it, errorPaths),
17003
+ errorInstancePath(it2, errorPaths),
16757
17004
  errorSchemaPath(cxt, errorPaths)
16758
17005
  ];
16759
17006
  extraErrorProps(cxt, error2, keyValues);
@@ -16771,8 +17018,8 @@ names$1.default = names;
16771
17018
  return [E2.schemaPath, schPath];
16772
17019
  }
16773
17020
  function extraErrorProps(cxt, { params, message }, keyValues) {
16774
- const { keyword: keyword2, data, schemaValue, it } = cxt;
16775
- const { opts, propertyName, topSchemaRef, schemaPath } = it;
17021
+ const { keyword: keyword2, data, schemaValue, it: it2 } = cxt;
17022
+ const { opts, propertyName, topSchemaRef, schemaPath } = it2;
16776
17023
  keyValues.push([E2.keyword, keyword2], [E2.params, typeof params == "function" ? params(cxt) : params || (0, codegen_12._)`{}`]);
16777
17024
  if (opts.messages) {
16778
17025
  keyValues.push([E2.message, typeof message == "function" ? message(cxt) : message]);
@@ -16792,10 +17039,10 @@ const names_1$9 = names$1;
16792
17039
  const boolError = {
16793
17040
  message: "boolean schema is false"
16794
17041
  };
16795
- function topBoolOrEmptySchema(it) {
16796
- const { gen, schema: schema2, validateName } = it;
17042
+ function topBoolOrEmptySchema(it2) {
17043
+ const { gen, schema: schema2, validateName } = it2;
16797
17044
  if (schema2 === false) {
16798
- falseSchemaError(it, false);
17045
+ falseSchemaError(it2, false);
16799
17046
  } else if (typeof schema2 == "object" && schema2.$async === true) {
16800
17047
  gen.return(names_1$9.default.data);
16801
17048
  } else {
@@ -16804,18 +17051,18 @@ function topBoolOrEmptySchema(it) {
16804
17051
  }
16805
17052
  }
16806
17053
  boolSchema.topBoolOrEmptySchema = topBoolOrEmptySchema;
16807
- function boolOrEmptySchema(it, valid) {
16808
- const { gen, schema: schema2 } = it;
17054
+ function boolOrEmptySchema(it2, valid) {
17055
+ const { gen, schema: schema2 } = it2;
16809
17056
  if (schema2 === false) {
16810
17057
  gen.var(valid, false);
16811
- falseSchemaError(it);
17058
+ falseSchemaError(it2);
16812
17059
  } else {
16813
17060
  gen.var(valid, true);
16814
17061
  }
16815
17062
  }
16816
17063
  boolSchema.boolOrEmptySchema = boolOrEmptySchema;
16817
- function falseSchemaError(it, overrideAllErrors) {
16818
- const { gen, data } = it;
17064
+ function falseSchemaError(it2, overrideAllErrors) {
17065
+ const { gen, data } = it2;
16819
17066
  const cxt = {
16820
17067
  gen,
16821
17068
  keyword: "false schema",
@@ -16824,7 +17071,7 @@ function falseSchemaError(it, overrideAllErrors) {
16824
17071
  schemaCode: false,
16825
17072
  schemaValue: false,
16826
17073
  params: {},
16827
- it
17074
+ it: it2
16828
17075
  };
16829
17076
  (0, errors_1$2.reportError)(cxt, boolError, void 0, overrideAllErrors);
16830
17077
  }
@@ -16907,17 +17154,17 @@ applicability.shouldUseRule = shouldUseRule;
16907
17154
  throw new Error("type must be JSONType or JSONType[]: " + types2.join(","));
16908
17155
  }
16909
17156
  exports.getJSONTypes = getJSONTypes;
16910
- function coerceAndCheckDataType(it, types2) {
16911
- const { gen, data, opts } = it;
17157
+ function coerceAndCheckDataType(it2, types2) {
17158
+ const { gen, data, opts } = it2;
16912
17159
  const coerceTo = coerceToTypes(types2, opts.coerceTypes);
16913
- const checkTypes = types2.length > 0 && !(coerceTo.length === 0 && types2.length === 1 && (0, applicability_12.schemaHasRulesForType)(it, types2[0]));
17160
+ const checkTypes = types2.length > 0 && !(coerceTo.length === 0 && types2.length === 1 && (0, applicability_12.schemaHasRulesForType)(it2, types2[0]));
16914
17161
  if (checkTypes) {
16915
17162
  const wrongType = checkDataTypes(types2, data, opts.strictNumbers, DataType.Wrong);
16916
17163
  gen.if(wrongType, () => {
16917
17164
  if (coerceTo.length)
16918
- coerceData(it, types2, coerceTo);
17165
+ coerceData(it2, types2, coerceTo);
16919
17166
  else
16920
- reportTypeError(it);
17167
+ reportTypeError(it2);
16921
17168
  });
16922
17169
  }
16923
17170
  return checkTypes;
@@ -16927,8 +17174,8 @@ applicability.shouldUseRule = shouldUseRule;
16927
17174
  function coerceToTypes(types2, coerceTypes) {
16928
17175
  return coerceTypes ? types2.filter((t2) => COERCIBLE.has(t2) || coerceTypes === "array" && t2 === "array") : [];
16929
17176
  }
16930
- function coerceData(it, types2, coerceTo) {
16931
- const { gen, data, opts } = it;
17177
+ function coerceData(it2, types2, coerceTo) {
17178
+ const { gen, data, opts } = it2;
16932
17179
  const dataType2 = gen.let("dataType", (0, codegen_12._)`typeof ${data}`);
16933
17180
  const coerced = gen.let("coerced", (0, codegen_12._)`undefined`);
16934
17181
  if (opts.coerceTypes === "array") {
@@ -16941,11 +17188,11 @@ applicability.shouldUseRule = shouldUseRule;
16941
17188
  }
16942
17189
  }
16943
17190
  gen.else();
16944
- reportTypeError(it);
17191
+ reportTypeError(it2);
16945
17192
  gen.endIf();
16946
17193
  gen.if((0, codegen_12._)`${coerced} !== undefined`, () => {
16947
17194
  gen.assign(data, coerced);
16948
- assignParentData(it, coerced);
17195
+ assignParentData(it2, coerced);
16949
17196
  });
16950
17197
  function coerceSpecificType(t2) {
16951
17198
  switch (t2) {
@@ -17029,14 +17276,14 @@ applicability.shouldUseRule = shouldUseRule;
17029
17276
  message: ({ schema: schema2 }) => `must be ${schema2}`,
17030
17277
  params: ({ schema: schema2, schemaValue }) => typeof schema2 == "string" ? (0, codegen_12._)`{type: ${schema2}}` : (0, codegen_12._)`{type: ${schemaValue}}`
17031
17278
  };
17032
- function reportTypeError(it) {
17033
- const cxt = getTypeErrorContext(it);
17279
+ function reportTypeError(it2) {
17280
+ const cxt = getTypeErrorContext(it2);
17034
17281
  (0, errors_12.reportError)(cxt, typeError);
17035
17282
  }
17036
17283
  exports.reportTypeError = reportTypeError;
17037
- function getTypeErrorContext(it) {
17038
- const { gen, data, schema: schema2 } = it;
17039
- const schemaCode = (0, util_12.schemaRefOrVal)(it, schema2, "type");
17284
+ function getTypeErrorContext(it2) {
17285
+ const { gen, data, schema: schema2 } = it2;
17286
+ const schemaCode = (0, util_12.schemaRefOrVal)(it2, schema2, "type");
17040
17287
  return {
17041
17288
  gen,
17042
17289
  keyword: "type",
@@ -17046,7 +17293,7 @@ applicability.shouldUseRule = shouldUseRule;
17046
17293
  schemaValue: schemaCode,
17047
17294
  parentSchema: schema2,
17048
17295
  params: {},
17049
- it
17296
+ it: it2
17050
17297
  };
17051
17298
  }
17052
17299
  })(dataType);
@@ -17055,24 +17302,24 @@ Object.defineProperty(defaults, "__esModule", { value: true });
17055
17302
  defaults.assignDefaults = void 0;
17056
17303
  const codegen_1$v = codegen;
17057
17304
  const util_1$t = util;
17058
- function assignDefaults(it, ty) {
17059
- const { properties: properties2, items: items2 } = it.schema;
17305
+ function assignDefaults(it2, ty) {
17306
+ const { properties: properties2, items: items2 } = it2.schema;
17060
17307
  if (ty === "object" && properties2) {
17061
17308
  for (const key in properties2) {
17062
- assignDefault(it, key, properties2[key].default);
17309
+ assignDefault(it2, key, properties2[key].default);
17063
17310
  }
17064
17311
  } else if (ty === "array" && Array.isArray(items2)) {
17065
- items2.forEach((sch, i2) => assignDefault(it, i2, sch.default));
17312
+ items2.forEach((sch, i2) => assignDefault(it2, i2, sch.default));
17066
17313
  }
17067
17314
  }
17068
17315
  defaults.assignDefaults = assignDefaults;
17069
- function assignDefault(it, prop, defaultValue) {
17070
- const { gen, compositeRule, data, opts } = it;
17316
+ function assignDefault(it2, prop, defaultValue) {
17317
+ const { gen, compositeRule, data, opts } = it2;
17071
17318
  if (defaultValue === void 0)
17072
17319
  return;
17073
17320
  const childData = (0, codegen_1$v._)`${data}${(0, codegen_1$v.getProperty)(prop)}`;
17074
17321
  if (compositeRule) {
17075
- (0, util_1$t.checkStrictMode)(it, `default is ignored for: ${childData}`);
17322
+ (0, util_1$t.checkStrictMode)(it2, `default is ignored for: ${childData}`);
17076
17323
  return;
17077
17324
  }
17078
17325
  let condition = (0, codegen_1$v._)`${childData} === undefined`;
@@ -17090,8 +17337,8 @@ const util_1$s = util;
17090
17337
  const names_1$8 = names$1;
17091
17338
  const util_2$1 = util;
17092
17339
  function checkReportMissingProp(cxt, prop) {
17093
- const { gen, data, it } = cxt;
17094
- gen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {
17340
+ const { gen, data, it: it2 } = cxt;
17341
+ gen.if(noPropertyInData(gen, data, prop, it2.opts.ownProperties), () => {
17095
17342
  cxt.setParams({ missingProperty: (0, codegen_1$u._)`${prop}` }, true);
17096
17343
  cxt.error();
17097
17344
  });
@@ -17132,19 +17379,19 @@ function allSchemaProperties(schemaMap) {
17132
17379
  return schemaMap ? Object.keys(schemaMap).filter((p2) => p2 !== "__proto__") : [];
17133
17380
  }
17134
17381
  code.allSchemaProperties = allSchemaProperties;
17135
- function schemaProperties(it, schemaMap) {
17136
- return allSchemaProperties(schemaMap).filter((p2) => !(0, util_1$s.alwaysValidSchema)(it, schemaMap[p2]));
17382
+ function schemaProperties(it2, schemaMap) {
17383
+ return allSchemaProperties(schemaMap).filter((p2) => !(0, util_1$s.alwaysValidSchema)(it2, schemaMap[p2]));
17137
17384
  }
17138
17385
  code.schemaProperties = schemaProperties;
17139
- function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {
17386
+ function callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it: it2 }, func, context, passSchema) {
17140
17387
  const dataAndSchema = passSchema ? (0, codegen_1$u._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;
17141
17388
  const valCxt = [
17142
17389
  [names_1$8.default.instancePath, (0, codegen_1$u.strConcat)(names_1$8.default.instancePath, errorPath)],
17143
- [names_1$8.default.parentData, it.parentData],
17144
- [names_1$8.default.parentDataProperty, it.parentDataProperty],
17390
+ [names_1$8.default.parentData, it2.parentData],
17391
+ [names_1$8.default.parentDataProperty, it2.parentDataProperty],
17145
17392
  [names_1$8.default.rootData, names_1$8.default.rootData]
17146
17393
  ];
17147
- if (it.opts.dynamicRef)
17394
+ if (it2.opts.dynamicRef)
17148
17395
  valCxt.push([names_1$8.default.dynamicAnchors, names_1$8.default.dynamicAnchors]);
17149
17396
  const args = (0, codegen_1$u._)`${dataAndSchema}, ${gen.object(...valCxt)}`;
17150
17397
  return context !== codegen_1$u.nil ? (0, codegen_1$u._)`${func}.call(${context}, ${args})` : (0, codegen_1$u._)`${func}(${args})`;
@@ -17163,9 +17410,9 @@ function usePattern({ gen, it: { opts } }, pattern2) {
17163
17410
  }
17164
17411
  code.usePattern = usePattern;
17165
17412
  function validateArray(cxt) {
17166
- const { gen, data, keyword: keyword2, it } = cxt;
17413
+ const { gen, data, keyword: keyword2, it: it2 } = cxt;
17167
17414
  const valid = gen.name("valid");
17168
- if (it.allErrors) {
17415
+ if (it2.allErrors) {
17169
17416
  const validArr = gen.let("valid", true);
17170
17417
  validateItems(() => gen.assign(validArr, false));
17171
17418
  return validArr;
@@ -17187,11 +17434,11 @@ function validateArray(cxt) {
17187
17434
  }
17188
17435
  code.validateArray = validateArray;
17189
17436
  function validateUnion(cxt) {
17190
- const { gen, schema: schema2, keyword: keyword2, it } = cxt;
17437
+ const { gen, schema: schema2, keyword: keyword2, it: it2 } = cxt;
17191
17438
  if (!Array.isArray(schema2))
17192
17439
  throw new Error("ajv implementation error");
17193
- const alwaysValid = schema2.some((sch) => (0, util_1$s.alwaysValidSchema)(it, sch));
17194
- if (alwaysValid && !it.opts.unevaluated)
17440
+ const alwaysValid = schema2.some((sch) => (0, util_1$s.alwaysValidSchema)(it2, sch));
17441
+ if (alwaysValid && !it2.opts.unevaluated)
17195
17442
  return;
17196
17443
  const valid = gen.let("valid", false);
17197
17444
  const schValid = gen.name("_valid");
@@ -17216,16 +17463,16 @@ const names_1$7 = names$1;
17216
17463
  const code_1$9 = code;
17217
17464
  const errors_1$1 = errors;
17218
17465
  function macroKeywordCode(cxt, def2) {
17219
- const { gen, keyword: keyword2, schema: schema2, parentSchema, it } = cxt;
17220
- const macroSchema = def2.macro.call(it.self, schema2, parentSchema, it);
17466
+ const { gen, keyword: keyword2, schema: schema2, parentSchema, it: it2 } = cxt;
17467
+ const macroSchema = def2.macro.call(it2.self, schema2, parentSchema, it2);
17221
17468
  const schemaRef = useKeyword(gen, keyword2, macroSchema);
17222
- if (it.opts.validateSchema !== false)
17223
- it.self.validateSchema(macroSchema, true);
17469
+ if (it2.opts.validateSchema !== false)
17470
+ it2.self.validateSchema(macroSchema, true);
17224
17471
  const valid = gen.name("valid");
17225
17472
  cxt.subschema({
17226
17473
  schema: macroSchema,
17227
17474
  schemaPath: codegen_1$t.nil,
17228
- errSchemaPath: `${it.errSchemaPath}/${keyword2}`,
17475
+ errSchemaPath: `${it2.errSchemaPath}/${keyword2}`,
17229
17476
  topSchemaRef: schemaRef,
17230
17477
  compositeRule: true
17231
17478
  }, valid);
@@ -17234,9 +17481,9 @@ function macroKeywordCode(cxt, def2) {
17234
17481
  keyword.macroKeywordCode = macroKeywordCode;
17235
17482
  function funcKeywordCode(cxt, def2) {
17236
17483
  var _a;
17237
- const { gen, keyword: keyword2, schema: schema2, parentSchema, $data, it } = cxt;
17238
- checkAsyncKeyword(it, def2);
17239
- const validate2 = !$data && def2.compile ? def2.compile.call(it.self, schema2, parentSchema, it) : def2.validate;
17484
+ const { gen, keyword: keyword2, schema: schema2, parentSchema, $data, it: it2 } = cxt;
17485
+ checkAsyncKeyword(it2, def2);
17486
+ const validate2 = !$data && def2.compile ? def2.compile.call(it2.self, schema2, parentSchema, it2) : def2.validate;
17240
17487
  const validateRef = useKeyword(gen, keyword2, validate2);
17241
17488
  const valid = gen.let("valid");
17242
17489
  cxt.block$data(valid, validateKeyword);
@@ -17256,7 +17503,7 @@ function funcKeywordCode(cxt, def2) {
17256
17503
  }
17257
17504
  function validateAsync() {
17258
17505
  const ruleErrs = gen.let("ruleErrs", null);
17259
- gen.try(() => assignValid((0, codegen_1$t._)`await `), (e2) => gen.assign(valid, false).if((0, codegen_1$t._)`${e2} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1$t._)`${e2}.errors`), () => gen.throw(e2)));
17506
+ gen.try(() => assignValid((0, codegen_1$t._)`await `), (e2) => gen.assign(valid, false).if((0, codegen_1$t._)`${e2} instanceof ${it2.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1$t._)`${e2}.errors`), () => gen.throw(e2)));
17260
17507
  return ruleErrs;
17261
17508
  }
17262
17509
  function validateSync() {
@@ -17266,7 +17513,7 @@ function funcKeywordCode(cxt, def2) {
17266
17513
  return validateErrs;
17267
17514
  }
17268
17515
  function assignValid(_await = def2.async ? (0, codegen_1$t._)`await ` : codegen_1$t.nil) {
17269
- const passCxt = it.opts.passContext ? names_1$7.default.this : names_1$7.default.self;
17516
+ const passCxt = it2.opts.passContext ? names_1$7.default.this : names_1$7.default.self;
17270
17517
  const passSchema = !("compile" in def2 && !$data || def2.schema === false);
17271
17518
  gen.assign(valid, (0, codegen_1$t._)`${_await}${(0, code_1$9.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def2.modifying);
17272
17519
  }
@@ -17277,8 +17524,8 @@ function funcKeywordCode(cxt, def2) {
17277
17524
  }
17278
17525
  keyword.funcKeywordCode = funcKeywordCode;
17279
17526
  function modifyData(cxt) {
17280
- const { gen, data, it } = cxt;
17281
- gen.if(it.parentData, () => gen.assign(data, (0, codegen_1$t._)`${it.parentData}[${it.parentDataProperty}]`));
17527
+ const { gen, data, it: it2 } = cxt;
17528
+ gen.if(it2.parentData, () => gen.assign(data, (0, codegen_1$t._)`${it2.parentData}[${it2.parentDataProperty}]`));
17282
17529
  }
17283
17530
  function addErrs(cxt, errs) {
17284
17531
  const { gen } = cxt;
@@ -17297,7 +17544,7 @@ function useKeyword(gen, keyword2, result) {
17297
17544
  return gen.scopeValue("keyword", typeof result == "function" ? { ref: result } : { ref: result, code: (0, codegen_1$t.stringify)(result) });
17298
17545
  }
17299
17546
  function validSchemaType(schema2, schemaType, allowUndefined = false) {
17300
- return !schemaType.length || schemaType.some((st) => st === "array" ? Array.isArray(schema2) : st === "object" ? schema2 && typeof schema2 == "object" && !Array.isArray(schema2) : typeof schema2 == st || allowUndefined && typeof schema2 == "undefined");
17547
+ return !schemaType.length || schemaType.some((st2) => st2 === "array" ? Array.isArray(schema2) : st2 === "object" ? schema2 && typeof schema2 == "object" && !Array.isArray(schema2) : typeof schema2 == st2 || allowUndefined && typeof schema2 == "undefined");
17301
17548
  }
17302
17549
  keyword.validSchemaType = validSchemaType;
17303
17550
  function validateKeywordUsage({ schema: schema2, opts, self: self2, errSchemaPath }, def2, keyword2) {
@@ -17325,20 +17572,20 @@ Object.defineProperty(subschema, "__esModule", { value: true });
17325
17572
  subschema.extendSubschemaMode = subschema.extendSubschemaData = subschema.getSubschema = void 0;
17326
17573
  const codegen_1$s = codegen;
17327
17574
  const util_1$r = util;
17328
- function getSubschema(it, { keyword: keyword2, schemaProp, schema: schema2, schemaPath, errSchemaPath, topSchemaRef }) {
17575
+ function getSubschema(it2, { keyword: keyword2, schemaProp, schema: schema2, schemaPath, errSchemaPath, topSchemaRef }) {
17329
17576
  if (keyword2 !== void 0 && schema2 !== void 0) {
17330
17577
  throw new Error('both "keyword" and "schema" passed, only one allowed');
17331
17578
  }
17332
17579
  if (keyword2 !== void 0) {
17333
- const sch = it.schema[keyword2];
17580
+ const sch = it2.schema[keyword2];
17334
17581
  return schemaProp === void 0 ? {
17335
17582
  schema: sch,
17336
- schemaPath: (0, codegen_1$s._)`${it.schemaPath}${(0, codegen_1$s.getProperty)(keyword2)}`,
17337
- errSchemaPath: `${it.errSchemaPath}/${keyword2}`
17583
+ schemaPath: (0, codegen_1$s._)`${it2.schemaPath}${(0, codegen_1$s.getProperty)(keyword2)}`,
17584
+ errSchemaPath: `${it2.errSchemaPath}/${keyword2}`
17338
17585
  } : {
17339
17586
  schema: sch[schemaProp],
17340
- schemaPath: (0, codegen_1$s._)`${it.schemaPath}${(0, codegen_1$s.getProperty)(keyword2)}${(0, codegen_1$s.getProperty)(schemaProp)}`,
17341
- errSchemaPath: `${it.errSchemaPath}/${keyword2}/${(0, util_1$r.escapeFragment)(schemaProp)}`
17587
+ schemaPath: (0, codegen_1$s._)`${it2.schemaPath}${(0, codegen_1$s.getProperty)(keyword2)}${(0, codegen_1$s.getProperty)(schemaProp)}`,
17588
+ errSchemaPath: `${it2.errSchemaPath}/${keyword2}/${(0, util_1$r.escapeFragment)(schemaProp)}`
17342
17589
  };
17343
17590
  }
17344
17591
  if (schema2 !== void 0) {
@@ -17355,14 +17602,14 @@ function getSubschema(it, { keyword: keyword2, schemaProp, schema: schema2, sche
17355
17602
  throw new Error('either "keyword" or "schema" must be passed');
17356
17603
  }
17357
17604
  subschema.getSubschema = getSubschema;
17358
- function extendSubschemaData(subschema2, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {
17605
+ function extendSubschemaData(subschema2, it2, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {
17359
17606
  if (data !== void 0 && dataProp !== void 0) {
17360
17607
  throw new Error('both "data" and "dataProp" passed, only one allowed');
17361
17608
  }
17362
- const { gen } = it;
17609
+ const { gen } = it2;
17363
17610
  if (dataProp !== void 0) {
17364
- const { errorPath, dataPathArr, opts } = it;
17365
- const nextData = gen.let("data", (0, codegen_1$s._)`${it.data}${(0, codegen_1$s.getProperty)(dataProp)}`, true);
17611
+ const { errorPath, dataPathArr, opts } = it2;
17612
+ const nextData = gen.let("data", (0, codegen_1$s._)`${it2.data}${(0, codegen_1$s.getProperty)(dataProp)}`, true);
17366
17613
  dataContextProps(nextData);
17367
17614
  subschema2.errorPath = (0, codegen_1$s.str)`${errorPath}${(0, util_1$r.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;
17368
17615
  subschema2.parentDataProperty = (0, codegen_1$s._)`${dataProp}`;
@@ -17378,11 +17625,11 @@ function extendSubschemaData(subschema2, it, { dataProp, dataPropType: dpType, d
17378
17625
  subschema2.dataTypes = dataTypes;
17379
17626
  function dataContextProps(_nextData) {
17380
17627
  subschema2.data = _nextData;
17381
- subschema2.dataLevel = it.dataLevel + 1;
17628
+ subschema2.dataLevel = it2.dataLevel + 1;
17382
17629
  subschema2.dataTypes = [];
17383
- it.definedProperties = /* @__PURE__ */ new Set();
17384
- subschema2.parentData = it.data;
17385
- subschema2.dataNames = [...it.dataNames, _nextData];
17630
+ it2.definedProperties = /* @__PURE__ */ new Set();
17631
+ subschema2.parentData = it2.data;
17632
+ subschema2.dataNames = [...it2.dataNames, _nextData];
17386
17633
  }
17387
17634
  }
17388
17635
  subschema.extendSubschemaData = extendSubschemaData;
@@ -17682,15 +17929,15 @@ const names_1$6 = names$1;
17682
17929
  const resolve_1$2 = resolve$1;
17683
17930
  const util_1$p = util;
17684
17931
  const errors_1 = errors;
17685
- function validateFunctionCode(it) {
17686
- if (isSchemaObj(it)) {
17687
- checkKeywords(it);
17688
- if (schemaCxtHasRules(it)) {
17689
- topSchemaObjCode(it);
17932
+ function validateFunctionCode(it2) {
17933
+ if (isSchemaObj(it2)) {
17934
+ checkKeywords(it2);
17935
+ if (schemaCxtHasRules(it2)) {
17936
+ topSchemaObjCode(it2);
17690
17937
  return;
17691
17938
  }
17692
17939
  }
17693
- validateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));
17940
+ validateFunction(it2, () => (0, boolSchema_1.topBoolOrEmptySchema)(it2));
17694
17941
  }
17695
17942
  validate$1.validateFunctionCode = validateFunctionCode;
17696
17943
  function validateFunction({ gen, validateName, schema: schema2, schemaEnv, opts }, body) {
@@ -17724,40 +17971,40 @@ function destructureValCxtES5(gen, opts) {
17724
17971
  gen.var(names_1$6.default.dynamicAnchors, (0, codegen_1$r._)`{}`);
17725
17972
  });
17726
17973
  }
17727
- function topSchemaObjCode(it) {
17728
- const { schema: schema2, opts, gen } = it;
17729
- validateFunction(it, () => {
17974
+ function topSchemaObjCode(it2) {
17975
+ const { schema: schema2, opts, gen } = it2;
17976
+ validateFunction(it2, () => {
17730
17977
  if (opts.$comment && schema2.$comment)
17731
- commentKeyword(it);
17732
- checkNoDefault(it);
17978
+ commentKeyword(it2);
17979
+ checkNoDefault(it2);
17733
17980
  gen.let(names_1$6.default.vErrors, null);
17734
17981
  gen.let(names_1$6.default.errors, 0);
17735
17982
  if (opts.unevaluated)
17736
- resetEvaluated(it);
17737
- typeAndKeywords(it);
17738
- returnResults(it);
17983
+ resetEvaluated(it2);
17984
+ typeAndKeywords(it2);
17985
+ returnResults(it2);
17739
17986
  });
17740
17987
  return;
17741
17988
  }
17742
- function resetEvaluated(it) {
17743
- const { gen, validateName } = it;
17744
- it.evaluated = gen.const("evaluated", (0, codegen_1$r._)`${validateName}.evaluated`);
17745
- gen.if((0, codegen_1$r._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1$r._)`${it.evaluated}.props`, (0, codegen_1$r._)`undefined`));
17746
- gen.if((0, codegen_1$r._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1$r._)`${it.evaluated}.items`, (0, codegen_1$r._)`undefined`));
17989
+ function resetEvaluated(it2) {
17990
+ const { gen, validateName } = it2;
17991
+ it2.evaluated = gen.const("evaluated", (0, codegen_1$r._)`${validateName}.evaluated`);
17992
+ gen.if((0, codegen_1$r._)`${it2.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1$r._)`${it2.evaluated}.props`, (0, codegen_1$r._)`undefined`));
17993
+ gen.if((0, codegen_1$r._)`${it2.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1$r._)`${it2.evaluated}.items`, (0, codegen_1$r._)`undefined`));
17747
17994
  }
17748
17995
  function funcSourceUrl(schema2, opts) {
17749
17996
  const schId = typeof schema2 == "object" && schema2[opts.schemaId];
17750
17997
  return schId && (opts.code.source || opts.code.process) ? (0, codegen_1$r._)`/*# sourceURL=${schId} */` : codegen_1$r.nil;
17751
17998
  }
17752
- function subschemaCode(it, valid) {
17753
- if (isSchemaObj(it)) {
17754
- checkKeywords(it);
17755
- if (schemaCxtHasRules(it)) {
17756
- subSchemaObjCode(it, valid);
17999
+ function subschemaCode(it2, valid) {
18000
+ if (isSchemaObj(it2)) {
18001
+ checkKeywords(it2);
18002
+ if (schemaCxtHasRules(it2)) {
18003
+ subSchemaObjCode(it2, valid);
17757
18004
  return;
17758
18005
  }
17759
18006
  }
17760
- (0, boolSchema_1.boolOrEmptySchema)(it, valid);
18007
+ (0, boolSchema_1.boolOrEmptySchema)(it2, valid);
17761
18008
  }
17762
18009
  function schemaCxtHasRules({ schema: schema2, self: self2 }) {
17763
18010
  if (typeof schema2 == "boolean")
@@ -17767,49 +18014,49 @@ function schemaCxtHasRules({ schema: schema2, self: self2 }) {
17767
18014
  return true;
17768
18015
  return false;
17769
18016
  }
17770
- function isSchemaObj(it) {
17771
- return typeof it.schema != "boolean";
18017
+ function isSchemaObj(it2) {
18018
+ return typeof it2.schema != "boolean";
17772
18019
  }
17773
- function subSchemaObjCode(it, valid) {
17774
- const { schema: schema2, gen, opts } = it;
18020
+ function subSchemaObjCode(it2, valid) {
18021
+ const { schema: schema2, gen, opts } = it2;
17775
18022
  if (opts.$comment && schema2.$comment)
17776
- commentKeyword(it);
17777
- updateContext(it);
17778
- checkAsyncSchema(it);
18023
+ commentKeyword(it2);
18024
+ updateContext(it2);
18025
+ checkAsyncSchema(it2);
17779
18026
  const errsCount = gen.const("_errs", names_1$6.default.errors);
17780
- typeAndKeywords(it, errsCount);
18027
+ typeAndKeywords(it2, errsCount);
17781
18028
  gen.var(valid, (0, codegen_1$r._)`${errsCount} === ${names_1$6.default.errors}`);
17782
18029
  }
17783
- function checkKeywords(it) {
17784
- (0, util_1$p.checkUnknownRules)(it);
17785
- checkRefsAndKeywords(it);
18030
+ function checkKeywords(it2) {
18031
+ (0, util_1$p.checkUnknownRules)(it2);
18032
+ checkRefsAndKeywords(it2);
17786
18033
  }
17787
- function typeAndKeywords(it, errsCount) {
17788
- if (it.opts.jtd)
17789
- return schemaKeywords(it, [], false, errsCount);
17790
- const types2 = (0, dataType_1$1.getSchemaTypes)(it.schema);
17791
- const checkedTypes = (0, dataType_1$1.coerceAndCheckDataType)(it, types2);
17792
- schemaKeywords(it, types2, !checkedTypes, errsCount);
18034
+ function typeAndKeywords(it2, errsCount) {
18035
+ if (it2.opts.jtd)
18036
+ return schemaKeywords(it2, [], false, errsCount);
18037
+ const types2 = (0, dataType_1$1.getSchemaTypes)(it2.schema);
18038
+ const checkedTypes = (0, dataType_1$1.coerceAndCheckDataType)(it2, types2);
18039
+ schemaKeywords(it2, types2, !checkedTypes, errsCount);
17793
18040
  }
17794
- function checkRefsAndKeywords(it) {
17795
- const { schema: schema2, errSchemaPath, opts, self: self2 } = it;
18041
+ function checkRefsAndKeywords(it2) {
18042
+ const { schema: schema2, errSchemaPath, opts, self: self2 } = it2;
17796
18043
  if (schema2.$ref && opts.ignoreKeywordsWithRef && (0, util_1$p.schemaHasRulesButRef)(schema2, self2.RULES)) {
17797
18044
  self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`);
17798
18045
  }
17799
18046
  }
17800
- function checkNoDefault(it) {
17801
- const { schema: schema2, opts } = it;
18047
+ function checkNoDefault(it2) {
18048
+ const { schema: schema2, opts } = it2;
17802
18049
  if (schema2.default !== void 0 && opts.useDefaults && opts.strictSchema) {
17803
- (0, util_1$p.checkStrictMode)(it, "default is ignored in the schema root");
18050
+ (0, util_1$p.checkStrictMode)(it2, "default is ignored in the schema root");
17804
18051
  }
17805
18052
  }
17806
- function updateContext(it) {
17807
- const schId = it.schema[it.opts.schemaId];
18053
+ function updateContext(it2) {
18054
+ const schId = it2.schema[it2.opts.schemaId];
17808
18055
  if (schId)
17809
- it.baseId = (0, resolve_1$2.resolveUrl)(it.opts.uriResolver, it.baseId, schId);
18056
+ it2.baseId = (0, resolve_1$2.resolveUrl)(it2.opts.uriResolver, it2.baseId, schId);
17810
18057
  }
17811
- function checkAsyncSchema(it) {
17812
- if (it.schema.$async && !it.schemaEnv.$async)
18058
+ function checkAsyncSchema(it2) {
18059
+ if (it2.schema.$async && !it2.schemaEnv.$async)
17813
18060
  throw new Error("async schema in sync schema");
17814
18061
  }
17815
18062
  function commentKeyword({ gen, schemaEnv, schema: schema2, errSchemaPath, opts }) {
@@ -17822,14 +18069,14 @@ function commentKeyword({ gen, schemaEnv, schema: schema2, errSchemaPath, opts }
17822
18069
  gen.code((0, codegen_1$r._)`${names_1$6.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);
17823
18070
  }
17824
18071
  }
17825
- function returnResults(it) {
17826
- const { gen, schemaEnv, validateName, ValidationError: ValidationError2, opts } = it;
18072
+ function returnResults(it2) {
18073
+ const { gen, schemaEnv, validateName, ValidationError: ValidationError2, opts } = it2;
17827
18074
  if (schemaEnv.$async) {
17828
18075
  gen.if((0, codegen_1$r._)`${names_1$6.default.errors} === 0`, () => gen.return(names_1$6.default.data), () => gen.throw((0, codegen_1$r._)`new ${ValidationError2}(${names_1$6.default.vErrors})`));
17829
18076
  } else {
17830
18077
  gen.assign((0, codegen_1$r._)`${validateName}.errors`, names_1$6.default.vErrors);
17831
18078
  if (opts.unevaluated)
17832
- assignEvaluated(it);
18079
+ assignEvaluated(it2);
17833
18080
  gen.return((0, codegen_1$r._)`${names_1$6.default.errors} === 0`);
17834
18081
  }
17835
18082
  }
@@ -17839,15 +18086,15 @@ function assignEvaluated({ gen, evaluated, props, items: items2 }) {
17839
18086
  if (items2 instanceof codegen_1$r.Name)
17840
18087
  gen.assign((0, codegen_1$r._)`${evaluated}.items`, items2);
17841
18088
  }
17842
- function schemaKeywords(it, types2, typeErrors, errsCount) {
17843
- const { gen, schema: schema2, data, allErrors, opts, self: self2 } = it;
18089
+ function schemaKeywords(it2, types2, typeErrors, errsCount) {
18090
+ const { gen, schema: schema2, data, allErrors, opts, self: self2 } = it2;
17844
18091
  const { RULES } = self2;
17845
18092
  if (schema2.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1$p.schemaHasRulesButRef)(schema2, RULES))) {
17846
- gen.block(() => keywordCode(it, "$ref", RULES.all.$ref.definition));
18093
+ gen.block(() => keywordCode(it2, "$ref", RULES.all.$ref.definition));
17847
18094
  return;
17848
18095
  }
17849
18096
  if (!opts.jtd)
17850
- checkStrictTypes(it, types2);
18097
+ checkStrictTypes(it2, types2);
17851
18098
  gen.block(() => {
17852
18099
  for (const group of RULES.rules)
17853
18100
  groupKeywords(group);
@@ -17858,66 +18105,66 @@ function schemaKeywords(it, types2, typeErrors, errsCount) {
17858
18105
  return;
17859
18106
  if (group.type) {
17860
18107
  gen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));
17861
- iterateKeywords(it, group);
18108
+ iterateKeywords(it2, group);
17862
18109
  if (types2.length === 1 && types2[0] === group.type && typeErrors) {
17863
18110
  gen.else();
17864
- (0, dataType_2.reportTypeError)(it);
18111
+ (0, dataType_2.reportTypeError)(it2);
17865
18112
  }
17866
18113
  gen.endIf();
17867
18114
  } else {
17868
- iterateKeywords(it, group);
18115
+ iterateKeywords(it2, group);
17869
18116
  }
17870
18117
  if (!allErrors)
17871
18118
  gen.if((0, codegen_1$r._)`${names_1$6.default.errors} === ${errsCount || 0}`);
17872
18119
  }
17873
18120
  }
17874
- function iterateKeywords(it, group) {
17875
- const { gen, schema: schema2, opts: { useDefaults } } = it;
18121
+ function iterateKeywords(it2, group) {
18122
+ const { gen, schema: schema2, opts: { useDefaults } } = it2;
17876
18123
  if (useDefaults)
17877
- (0, defaults_1.assignDefaults)(it, group.type);
18124
+ (0, defaults_1.assignDefaults)(it2, group.type);
17878
18125
  gen.block(() => {
17879
18126
  for (const rule of group.rules) {
17880
18127
  if ((0, applicability_1.shouldUseRule)(schema2, rule)) {
17881
- keywordCode(it, rule.keyword, rule.definition, group.type);
18128
+ keywordCode(it2, rule.keyword, rule.definition, group.type);
17882
18129
  }
17883
18130
  }
17884
18131
  });
17885
18132
  }
17886
- function checkStrictTypes(it, types2) {
17887
- if (it.schemaEnv.meta || !it.opts.strictTypes)
18133
+ function checkStrictTypes(it2, types2) {
18134
+ if (it2.schemaEnv.meta || !it2.opts.strictTypes)
17888
18135
  return;
17889
- checkContextTypes(it, types2);
17890
- if (!it.opts.allowUnionTypes)
17891
- checkMultipleTypes(it, types2);
17892
- checkKeywordTypes(it, it.dataTypes);
18136
+ checkContextTypes(it2, types2);
18137
+ if (!it2.opts.allowUnionTypes)
18138
+ checkMultipleTypes(it2, types2);
18139
+ checkKeywordTypes(it2, it2.dataTypes);
17893
18140
  }
17894
- function checkContextTypes(it, types2) {
18141
+ function checkContextTypes(it2, types2) {
17895
18142
  if (!types2.length)
17896
18143
  return;
17897
- if (!it.dataTypes.length) {
17898
- it.dataTypes = types2;
18144
+ if (!it2.dataTypes.length) {
18145
+ it2.dataTypes = types2;
17899
18146
  return;
17900
18147
  }
17901
18148
  types2.forEach((t2) => {
17902
- if (!includesType(it.dataTypes, t2)) {
17903
- strictTypesError(it, `type "${t2}" not allowed by context "${it.dataTypes.join(",")}"`);
18149
+ if (!includesType(it2.dataTypes, t2)) {
18150
+ strictTypesError(it2, `type "${t2}" not allowed by context "${it2.dataTypes.join(",")}"`);
17904
18151
  }
17905
18152
  });
17906
- narrowSchemaTypes(it, types2);
18153
+ narrowSchemaTypes(it2, types2);
17907
18154
  }
17908
- function checkMultipleTypes(it, ts) {
18155
+ function checkMultipleTypes(it2, ts) {
17909
18156
  if (ts.length > 1 && !(ts.length === 2 && ts.includes("null"))) {
17910
- strictTypesError(it, "use allowUnionTypes to allow union type keyword");
18157
+ strictTypesError(it2, "use allowUnionTypes to allow union type keyword");
17911
18158
  }
17912
18159
  }
17913
- function checkKeywordTypes(it, ts) {
17914
- const rules2 = it.self.RULES.all;
18160
+ function checkKeywordTypes(it2, ts) {
18161
+ const rules2 = it2.self.RULES.all;
17915
18162
  for (const keyword2 in rules2) {
17916
18163
  const rule = rules2[keyword2];
17917
- if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {
18164
+ if (typeof rule == "object" && (0, applicability_1.shouldUseRule)(it2.schema, rule)) {
17918
18165
  const { type: type2 } = rule.definition;
17919
18166
  if (type2.length && !type2.some((t2) => hasApplicableType(ts, t2))) {
17920
- strictTypesError(it, `missing type "${type2.join(",")}" for keyword "${keyword2}"`);
18167
+ strictTypesError(it2, `missing type "${type2.join(",")}" for keyword "${keyword2}"`);
17921
18168
  }
17922
18169
  }
17923
18170
  }
@@ -17928,38 +18175,38 @@ function hasApplicableType(schTs, kwdT) {
17928
18175
  function includesType(ts, t2) {
17929
18176
  return ts.includes(t2) || t2 === "integer" && ts.includes("number");
17930
18177
  }
17931
- function narrowSchemaTypes(it, withTypes) {
18178
+ function narrowSchemaTypes(it2, withTypes) {
17932
18179
  const ts = [];
17933
- for (const t2 of it.dataTypes) {
18180
+ for (const t2 of it2.dataTypes) {
17934
18181
  if (includesType(withTypes, t2))
17935
18182
  ts.push(t2);
17936
18183
  else if (withTypes.includes("integer") && t2 === "number")
17937
18184
  ts.push("integer");
17938
18185
  }
17939
- it.dataTypes = ts;
18186
+ it2.dataTypes = ts;
17940
18187
  }
17941
- function strictTypesError(it, msg) {
17942
- const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
18188
+ function strictTypesError(it2, msg) {
18189
+ const schemaPath = it2.schemaEnv.baseId + it2.errSchemaPath;
17943
18190
  msg += ` at "${schemaPath}" (strictTypes)`;
17944
- (0, util_1$p.checkStrictMode)(it, msg, it.opts.strictTypes);
18191
+ (0, util_1$p.checkStrictMode)(it2, msg, it2.opts.strictTypes);
17945
18192
  }
17946
18193
  class KeywordCxt {
17947
- constructor(it, def2, keyword2) {
17948
- (0, keyword_1.validateKeywordUsage)(it, def2, keyword2);
17949
- this.gen = it.gen;
17950
- this.allErrors = it.allErrors;
18194
+ constructor(it2, def2, keyword2) {
18195
+ (0, keyword_1.validateKeywordUsage)(it2, def2, keyword2);
18196
+ this.gen = it2.gen;
18197
+ this.allErrors = it2.allErrors;
17951
18198
  this.keyword = keyword2;
17952
- this.data = it.data;
17953
- this.schema = it.schema[keyword2];
17954
- this.$data = def2.$data && it.opts.$data && this.schema && this.schema.$data;
17955
- this.schemaValue = (0, util_1$p.schemaRefOrVal)(it, this.schema, keyword2, this.$data);
18199
+ this.data = it2.data;
18200
+ this.schema = it2.schema[keyword2];
18201
+ this.$data = def2.$data && it2.opts.$data && this.schema && this.schema.$data;
18202
+ this.schemaValue = (0, util_1$p.schemaRefOrVal)(it2, this.schema, keyword2, this.$data);
17956
18203
  this.schemaType = def2.schemaType;
17957
- this.parentSchema = it.schema;
18204
+ this.parentSchema = it2.schema;
17958
18205
  this.params = {};
17959
- this.it = it;
18206
+ this.it = it2;
17960
18207
  this.def = def2;
17961
18208
  if (this.$data) {
17962
- this.schemaCode = it.gen.const("vSchema", getData(this.$data, it));
18209
+ this.schemaCode = it2.gen.const("vSchema", getData(this.$data, it2));
17963
18210
  } else {
17964
18211
  this.schemaCode = this.schemaValue;
17965
18212
  if (!(0, keyword_1.validSchemaType)(this.schema, def2.schemaType, def2.allowUndefined)) {
@@ -17967,7 +18214,7 @@ class KeywordCxt {
17967
18214
  }
17968
18215
  }
17969
18216
  if ("code" in def2 ? def2.trackErrors : def2.errors !== false) {
17970
- this.errsCount = it.gen.const("_errs", names_1$6.default.errors);
18217
+ this.errsCount = it2.gen.const("_errs", names_1$6.default.errors);
17971
18218
  }
17972
18219
  }
17973
18220
  result(condition, successAction, failAction) {
@@ -18066,14 +18313,14 @@ class KeywordCxt {
18066
18313
  gen.else();
18067
18314
  }
18068
18315
  invalid$data() {
18069
- const { gen, schemaCode, schemaType, def: def2, it } = this;
18316
+ const { gen, schemaCode, schemaType, def: def2, it: it2 } = this;
18070
18317
  return (0, codegen_1$r.or)(wrong$DataType(), invalid$DataSchema());
18071
18318
  function wrong$DataType() {
18072
18319
  if (schemaType.length) {
18073
18320
  if (!(schemaCode instanceof codegen_1$r.Name))
18074
18321
  throw new Error("ajv implementation error");
18075
- const st = Array.isArray(schemaType) ? schemaType : [schemaType];
18076
- return (0, codegen_1$r._)`${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;
18322
+ const st2 = Array.isArray(schemaType) ? schemaType : [schemaType];
18323
+ return (0, codegen_1$r._)`${(0, dataType_2.checkDataTypes)(st2, schemaCode, it2.opts.strictNumbers, dataType_2.DataType.Wrong)}`;
18077
18324
  }
18078
18325
  return codegen_1$r.nil;
18079
18326
  }
@@ -18094,27 +18341,27 @@ class KeywordCxt {
18094
18341
  return nextContext;
18095
18342
  }
18096
18343
  mergeEvaluated(schemaCxt, toName) {
18097
- const { it, gen } = this;
18098
- if (!it.opts.unevaluated)
18344
+ const { it: it2, gen } = this;
18345
+ if (!it2.opts.unevaluated)
18099
18346
  return;
18100
- if (it.props !== true && schemaCxt.props !== void 0) {
18101
- it.props = util_1$p.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);
18347
+ if (it2.props !== true && schemaCxt.props !== void 0) {
18348
+ it2.props = util_1$p.mergeEvaluated.props(gen, schemaCxt.props, it2.props, toName);
18102
18349
  }
18103
- if (it.items !== true && schemaCxt.items !== void 0) {
18104
- it.items = util_1$p.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);
18350
+ if (it2.items !== true && schemaCxt.items !== void 0) {
18351
+ it2.items = util_1$p.mergeEvaluated.items(gen, schemaCxt.items, it2.items, toName);
18105
18352
  }
18106
18353
  }
18107
18354
  mergeValidEvaluated(schemaCxt, valid) {
18108
- const { it, gen } = this;
18109
- if (it.opts.unevaluated && (it.props !== true || it.items !== true)) {
18355
+ const { it: it2, gen } = this;
18356
+ if (it2.opts.unevaluated && (it2.props !== true || it2.items !== true)) {
18110
18357
  gen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1$r.Name));
18111
18358
  return true;
18112
18359
  }
18113
18360
  }
18114
18361
  }
18115
18362
  validate$1.KeywordCxt = KeywordCxt;
18116
- function keywordCode(it, keyword2, def2, ruleType) {
18117
- const cxt = new KeywordCxt(it, def2, keyword2);
18363
+ function keywordCode(it2, keyword2, def2, ruleType) {
18364
+ const cxt = new KeywordCxt(it2, def2, keyword2);
18118
18365
  if ("code" in def2) {
18119
18366
  def2.code(cxt, ruleType);
18120
18367
  } else if (cxt.$data && def2.validate) {
@@ -18778,7 +19025,7 @@ var uri_all = { exports: {} };
18778
19025
  error$12("overflow");
18779
19026
  }
18780
19027
  if (_currentValue == n2) {
18781
- var q = delta;
19028
+ var q2 = delta;
18782
19029
  for (
18783
19030
  var k2 = base;
18784
19031
  ;
@@ -18786,15 +19033,15 @@ var uri_all = { exports: {} };
18786
19033
  k2 += base
18787
19034
  ) {
18788
19035
  var t2 = k2 <= bias ? tMin : k2 >= bias + tMax ? tMax : k2 - bias;
18789
- if (q < t2) {
19036
+ if (q2 < t2) {
18790
19037
  break;
18791
19038
  }
18792
- var qMinusT = q - t2;
19039
+ var qMinusT = q2 - t2;
18793
19040
  var baseMinusT = base - t2;
18794
19041
  output.push(stringFromCharCode(digitToBasic(t2 + qMinusT % baseMinusT, 0)));
18795
- q = floor(qMinusT / baseMinusT);
19042
+ q2 = floor(qMinusT / baseMinusT);
18796
19043
  }
18797
- output.push(stringFromCharCode(digitToBasic(q, 0)));
19044
+ output.push(stringFromCharCode(digitToBasic(q2, 0)));
18798
19045
  bias = adapt(delta, handledCPCountPlusOne, handledCPCount == basicLength);
18799
19046
  delta = 0;
18800
19047
  ++handledCPCount;
@@ -20111,14 +20358,14 @@ const def$A = {
20111
20358
  keyword: "$ref",
20112
20359
  schemaType: "string",
20113
20360
  code(cxt) {
20114
- const { gen, schema: $ref, it } = cxt;
20115
- const { baseId, schemaEnv: env, validateName, opts, self: self2 } = it;
20361
+ const { gen, schema: $ref, it: it2 } = cxt;
20362
+ const { baseId, schemaEnv: env, validateName, opts, self: self2 } = it2;
20116
20363
  const { root: root2 } = env;
20117
20364
  if (($ref === "#" || $ref === "#/") && baseId === root2.baseId)
20118
20365
  return callRootRef();
20119
20366
  const schOrEnv = compile_1$2.resolveRef.call(self2, root2, baseId, $ref);
20120
20367
  if (schOrEnv === void 0)
20121
- throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);
20368
+ throw new ref_error_1.default(it2.opts.uriResolver, baseId, $ref);
20122
20369
  if (schOrEnv instanceof compile_1$2.SchemaEnv)
20123
20370
  return callValidate(schOrEnv);
20124
20371
  return inlineRefSchema(schOrEnv);
@@ -20153,8 +20400,8 @@ function getValidate(cxt, sch) {
20153
20400
  }
20154
20401
  ref.getValidate = getValidate;
20155
20402
  function callRef(cxt, v2, sch, $async) {
20156
- const { gen, it } = cxt;
20157
- const { allErrors, schemaEnv: env, opts } = it;
20403
+ const { gen, it: it2 } = cxt;
20404
+ const { allErrors, schemaEnv: env, opts } = it2;
20158
20405
  const passCxt = opts.passContext ? names_1$4.default.this : codegen_1$p.nil;
20159
20406
  if ($async)
20160
20407
  callAsyncRef();
@@ -20170,7 +20417,7 @@ function callRef(cxt, v2, sch, $async) {
20170
20417
  if (!allErrors)
20171
20418
  gen.assign(valid, true);
20172
20419
  }, (e2) => {
20173
- gen.if((0, codegen_1$p._)`!(${e2} instanceof ${it.ValidationError})`, () => gen.throw(e2));
20420
+ gen.if((0, codegen_1$p._)`!(${e2} instanceof ${it2.ValidationError})`, () => gen.throw(e2));
20174
20421
  addErrorsFrom(e2);
20175
20422
  if (!allErrors)
20176
20423
  gen.assign(valid, false);
@@ -20187,27 +20434,27 @@ function callRef(cxt, v2, sch, $async) {
20187
20434
  }
20188
20435
  function addEvaluatedFrom(source) {
20189
20436
  var _a;
20190
- if (!it.opts.unevaluated)
20437
+ if (!it2.opts.unevaluated)
20191
20438
  return;
20192
20439
  const schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;
20193
- if (it.props !== true) {
20440
+ if (it2.props !== true) {
20194
20441
  if (schEvaluated && !schEvaluated.dynamicProps) {
20195
20442
  if (schEvaluated.props !== void 0) {
20196
- it.props = util_1$n.mergeEvaluated.props(gen, schEvaluated.props, it.props);
20443
+ it2.props = util_1$n.mergeEvaluated.props(gen, schEvaluated.props, it2.props);
20197
20444
  }
20198
20445
  } else {
20199
20446
  const props = gen.var("props", (0, codegen_1$p._)`${source}.evaluated.props`);
20200
- it.props = util_1$n.mergeEvaluated.props(gen, props, it.props, codegen_1$p.Name);
20447
+ it2.props = util_1$n.mergeEvaluated.props(gen, props, it2.props, codegen_1$p.Name);
20201
20448
  }
20202
20449
  }
20203
- if (it.items !== true) {
20450
+ if (it2.items !== true) {
20204
20451
  if (schEvaluated && !schEvaluated.dynamicItems) {
20205
20452
  if (schEvaluated.items !== void 0) {
20206
- it.items = util_1$n.mergeEvaluated.items(gen, schEvaluated.items, it.items);
20453
+ it2.items = util_1$n.mergeEvaluated.items(gen, schEvaluated.items, it2.items);
20207
20454
  }
20208
20455
  } else {
20209
20456
  const items2 = gen.var("items", (0, codegen_1$p._)`${source}.evaluated.items`);
20210
- it.items = util_1$n.mergeEvaluated.items(gen, items2, it.items, codegen_1$p.Name);
20457
+ it2.items = util_1$n.mergeEvaluated.items(gen, items2, it2.items, codegen_1$p.Name);
20211
20458
  }
20212
20459
  }
20213
20460
  }
@@ -20269,8 +20516,8 @@ const def$y = {
20269
20516
  $data: true,
20270
20517
  error: error$j,
20271
20518
  code(cxt) {
20272
- const { gen, data, schemaCode, it } = cxt;
20273
- const prec = it.opts.multipleOfPrecision;
20519
+ const { gen, data, schemaCode, it: it2 } = cxt;
20520
+ const prec = it2.opts.multipleOfPrecision;
20274
20521
  const res = gen.let("res");
20275
20522
  const invalid = prec ? (0, codegen_1$n._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1$n._)`${res} !== parseInt(${res})`;
20276
20523
  cxt.fail$data((0, codegen_1$n._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);
@@ -20316,9 +20563,9 @@ const def$x = {
20316
20563
  $data: true,
20317
20564
  error: error$i,
20318
20565
  code(cxt) {
20319
- const { keyword: keyword2, data, schemaCode, it } = cxt;
20566
+ const { keyword: keyword2, data, schemaCode, it: it2 } = cxt;
20320
20567
  const op = keyword2 === "maxLength" ? codegen_1$m.operators.GT : codegen_1$m.operators.LT;
20321
- const len = it.opts.unicode === false ? (0, codegen_1$m._)`${data}.length` : (0, codegen_1$m._)`${(0, util_1$m.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;
20568
+ const len = it2.opts.unicode === false ? (0, codegen_1$m._)`${data}.length` : (0, codegen_1$m._)`${(0, util_1$m.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;
20322
20569
  cxt.fail$data((0, codegen_1$m._)`${len} ${op} ${schemaCode}`);
20323
20570
  }
20324
20571
  };
@@ -20338,8 +20585,8 @@ const def$w = {
20338
20585
  $data: true,
20339
20586
  error: error$h,
20340
20587
  code(cxt) {
20341
- const { data, $data, schema: schema2, schemaCode, it } = cxt;
20342
- const u2 = it.opts.unicodeRegExp ? "u" : "";
20588
+ const { data, $data, schema: schema2, schemaCode, it: it2 } = cxt;
20589
+ const u2 = it2.opts.unicodeRegExp ? "u" : "";
20343
20590
  const regExp = $data ? (0, codegen_1$l._)`(new RegExp(${schemaCode}, ${u2}))` : (0, code_1$7.usePattern)(cxt, schema2);
20344
20591
  cxt.fail$data((0, codegen_1$l._)`!${regExp}.test(${data})`);
20345
20592
  }
@@ -20384,12 +20631,12 @@ const def$u = {
20384
20631
  $data: true,
20385
20632
  error: error$f,
20386
20633
  code(cxt) {
20387
- const { gen, schema: schema2, schemaCode, data, $data, it } = cxt;
20388
- const { opts } = it;
20634
+ const { gen, schema: schema2, schemaCode, data, $data, it: it2 } = cxt;
20635
+ const { opts } = it2;
20389
20636
  if (!$data && schema2.length === 0)
20390
20637
  return;
20391
20638
  const useLoop = schema2.length >= opts.loopRequired;
20392
- if (it.allErrors)
20639
+ if (it2.allErrors)
20393
20640
  allErrorsMode();
20394
20641
  else
20395
20642
  exitOnErrorMode();
@@ -20398,9 +20645,9 @@ const def$u = {
20398
20645
  const { definedProperties } = cxt.it;
20399
20646
  for (const requiredKey of schema2) {
20400
20647
  if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) {
20401
- const schemaPath = it.schemaEnv.baseId + it.errSchemaPath;
20648
+ const schemaPath = it2.schemaEnv.baseId + it2.errSchemaPath;
20402
20649
  const msg = `required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`;
20403
- (0, util_1$l.checkStrictMode)(it, msg, it.opts.strictRequired);
20650
+ (0, util_1$l.checkStrictMode)(it2, msg, it2.opts.strictRequired);
20404
20651
  }
20405
20652
  }
20406
20653
  }
@@ -20489,7 +20736,7 @@ const def$s = {
20489
20736
  $data: true,
20490
20737
  error: error$d,
20491
20738
  code(cxt) {
20492
- const { gen, data, $data, schema: schema2, parentSchema, schemaCode, it } = cxt;
20739
+ const { gen, data, $data, schema: schema2, parentSchema, schemaCode, it: it2 } = cxt;
20493
20740
  if (!$data && !schema2)
20494
20741
  return;
20495
20742
  const valid = gen.let("valid");
@@ -20508,7 +20755,7 @@ const def$s = {
20508
20755
  }
20509
20756
  function loopN(i2, j2) {
20510
20757
  const item = gen.name("item");
20511
- const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);
20758
+ const wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it2.opts.strictNumbers, dataType_1.DataType.Wrong);
20512
20759
  const indices = gen.const("indices", (0, codegen_1$h._)`{}`);
20513
20760
  gen.for((0, codegen_1$h._)`;${i2}--;`, () => {
20514
20761
  gen.let(item, (0, codegen_1$h._)`${data}[${i2}]`);
@@ -20571,10 +20818,10 @@ const def$q = {
20571
20818
  $data: true,
20572
20819
  error: error$b,
20573
20820
  code(cxt) {
20574
- const { gen, data, $data, schema: schema2, schemaCode, it } = cxt;
20821
+ const { gen, data, $data, schema: schema2, schemaCode, it: it2 } = cxt;
20575
20822
  if (!$data && schema2.length === 0)
20576
20823
  throw new Error("enum must have non-empty array");
20577
- const useLoop = schema2.length >= it.opts.loopEnum;
20824
+ const useLoop = schema2.length >= it2.opts.loopEnum;
20578
20825
  let eql;
20579
20826
  const getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1$i.useFunc)(gen, equal_1.default);
20580
20827
  let valid;
@@ -20647,23 +20894,23 @@ const def$p = {
20647
20894
  before: "uniqueItems",
20648
20895
  error: error$a,
20649
20896
  code(cxt) {
20650
- const { parentSchema, it } = cxt;
20897
+ const { parentSchema, it: it2 } = cxt;
20651
20898
  const { items: items2 } = parentSchema;
20652
20899
  if (!Array.isArray(items2)) {
20653
- (0, util_1$h.checkStrictMode)(it, '"additionalItems" is ignored when "items" is not an array of schemas');
20900
+ (0, util_1$h.checkStrictMode)(it2, '"additionalItems" is ignored when "items" is not an array of schemas');
20654
20901
  return;
20655
20902
  }
20656
20903
  validateAdditionalItems(cxt, items2);
20657
20904
  }
20658
20905
  };
20659
20906
  function validateAdditionalItems(cxt, items2) {
20660
- const { gen, schema: schema2, data, keyword: keyword2, it } = cxt;
20661
- it.items = true;
20907
+ const { gen, schema: schema2, data, keyword: keyword2, it: it2 } = cxt;
20908
+ it2.items = true;
20662
20909
  const len = gen.const("len", (0, codegen_1$e._)`${data}.length`);
20663
20910
  if (schema2 === false) {
20664
20911
  cxt.setParams({ len: items2.length });
20665
20912
  cxt.pass((0, codegen_1$e._)`${len} <= ${items2.length}`);
20666
- } else if (typeof schema2 == "object" && !(0, util_1$h.alwaysValidSchema)(it, schema2)) {
20913
+ } else if (typeof schema2 == "object" && !(0, util_1$h.alwaysValidSchema)(it2, schema2)) {
20667
20914
  const valid = gen.var("valid", (0, codegen_1$e._)`${len} <= ${items2.length}`);
20668
20915
  gen.if((0, codegen_1$e.not)(valid), () => validateItems(valid));
20669
20916
  cxt.ok(valid);
@@ -20671,7 +20918,7 @@ function validateAdditionalItems(cxt, items2) {
20671
20918
  function validateItems(valid) {
20672
20919
  gen.forRange("i", items2.length, len, (i2) => {
20673
20920
  cxt.subschema({ keyword: keyword2, dataProp: i2, dataPropType: util_1$h.Type.Num }, valid);
20674
- if (!it.allErrors)
20921
+ if (!it2.allErrors)
20675
20922
  gen.if((0, codegen_1$e.not)(valid), () => gen.break());
20676
20923
  });
20677
20924
  }
@@ -20691,25 +20938,25 @@ const def$o = {
20691
20938
  schemaType: ["object", "array", "boolean"],
20692
20939
  before: "uniqueItems",
20693
20940
  code(cxt) {
20694
- const { schema: schema2, it } = cxt;
20941
+ const { schema: schema2, it: it2 } = cxt;
20695
20942
  if (Array.isArray(schema2))
20696
20943
  return validateTuple(cxt, "additionalItems", schema2);
20697
- it.items = true;
20698
- if ((0, util_1$g.alwaysValidSchema)(it, schema2))
20944
+ it2.items = true;
20945
+ if ((0, util_1$g.alwaysValidSchema)(it2, schema2))
20699
20946
  return;
20700
20947
  cxt.ok((0, code_1$5.validateArray)(cxt));
20701
20948
  }
20702
20949
  };
20703
20950
  function validateTuple(cxt, extraItems, schArr = cxt.schema) {
20704
- const { gen, parentSchema, data, keyword: keyword2, it } = cxt;
20951
+ const { gen, parentSchema, data, keyword: keyword2, it: it2 } = cxt;
20705
20952
  checkStrictTuple(parentSchema);
20706
- if (it.opts.unevaluated && schArr.length && it.items !== true) {
20707
- it.items = util_1$g.mergeEvaluated.items(gen, schArr.length, it.items);
20953
+ if (it2.opts.unevaluated && schArr.length && it2.items !== true) {
20954
+ it2.items = util_1$g.mergeEvaluated.items(gen, schArr.length, it2.items);
20708
20955
  }
20709
20956
  const valid = gen.name("valid");
20710
20957
  const len = gen.const("len", (0, codegen_1$d._)`${data}.length`);
20711
20958
  schArr.forEach((sch, i2) => {
20712
- if ((0, util_1$g.alwaysValidSchema)(it, sch))
20959
+ if ((0, util_1$g.alwaysValidSchema)(it2, sch))
20713
20960
  return;
20714
20961
  gen.if((0, codegen_1$d._)`${len} > ${i2}`, () => cxt.subschema({
20715
20962
  keyword: keyword2,
@@ -20719,12 +20966,12 @@ function validateTuple(cxt, extraItems, schArr = cxt.schema) {
20719
20966
  cxt.ok(valid);
20720
20967
  });
20721
20968
  function checkStrictTuple(sch) {
20722
- const { opts, errSchemaPath } = it;
20969
+ const { opts, errSchemaPath } = it2;
20723
20970
  const l2 = schArr.length;
20724
20971
  const fullTuple = l2 === sch.minItems && (l2 === sch.maxItems || sch[extraItems] === false);
20725
20972
  if (opts.strictTuples && !fullTuple) {
20726
20973
  const msg = `"${keyword2}" is ${l2}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`;
20727
- (0, util_1$g.checkStrictMode)(it, msg, opts.strictTuples);
20974
+ (0, util_1$g.checkStrictMode)(it2, msg, opts.strictTuples);
20728
20975
  }
20729
20976
  }
20730
20977
  }
@@ -20757,10 +21004,10 @@ const def$m = {
20757
21004
  before: "uniqueItems",
20758
21005
  error: error$9,
20759
21006
  code(cxt) {
20760
- const { schema: schema2, parentSchema, it } = cxt;
21007
+ const { schema: schema2, parentSchema, it: it2 } = cxt;
20761
21008
  const { prefixItems: prefixItems2 } = parentSchema;
20762
- it.items = true;
20763
- if ((0, util_1$f.alwaysValidSchema)(it, schema2))
21009
+ it2.items = true;
21010
+ if ((0, util_1$f.alwaysValidSchema)(it2, schema2))
20764
21011
  return;
20765
21012
  if (prefixItems2)
20766
21013
  (0, additionalItems_1$1.validateAdditionalItems)(cxt, prefixItems2);
@@ -20785,11 +21032,11 @@ const def$l = {
20785
21032
  trackErrors: true,
20786
21033
  error: error$8,
20787
21034
  code(cxt) {
20788
- const { gen, schema: schema2, parentSchema, data, it } = cxt;
21035
+ const { gen, schema: schema2, parentSchema, data, it: it2 } = cxt;
20789
21036
  let min;
20790
21037
  let max;
20791
21038
  const { minContains, maxContains } = parentSchema;
20792
- if (it.opts.next) {
21039
+ if (it2.opts.next) {
20793
21040
  min = minContains === void 0 ? 1 : minContains;
20794
21041
  max = maxContains;
20795
21042
  } else {
@@ -20798,22 +21045,22 @@ const def$l = {
20798
21045
  const len = gen.const("len", (0, codegen_1$b._)`${data}.length`);
20799
21046
  cxt.setParams({ min, max });
20800
21047
  if (max === void 0 && min === 0) {
20801
- (0, util_1$e.checkStrictMode)(it, `"minContains" == 0 without "maxContains": "contains" keyword ignored`);
21048
+ (0, util_1$e.checkStrictMode)(it2, `"minContains" == 0 without "maxContains": "contains" keyword ignored`);
20802
21049
  return;
20803
21050
  }
20804
21051
  if (max !== void 0 && min > max) {
20805
- (0, util_1$e.checkStrictMode)(it, `"minContains" > "maxContains" is always invalid`);
21052
+ (0, util_1$e.checkStrictMode)(it2, `"minContains" > "maxContains" is always invalid`);
20806
21053
  cxt.fail();
20807
21054
  return;
20808
21055
  }
20809
- if ((0, util_1$e.alwaysValidSchema)(it, schema2)) {
21056
+ if ((0, util_1$e.alwaysValidSchema)(it2, schema2)) {
20810
21057
  let cond = (0, codegen_1$b._)`${len} >= ${min}`;
20811
21058
  if (max !== void 0)
20812
21059
  cond = (0, codegen_1$b._)`${cond} && ${len} <= ${max}`;
20813
21060
  cxt.pass(cond);
20814
21061
  return;
20815
21062
  }
20816
- it.items = true;
21063
+ it2.items = true;
20817
21064
  const valid = gen.name("valid");
20818
21065
  if (max === void 0 && min === 1) {
20819
21066
  validateItems(valid, () => gen.if(valid, () => gen.break()));
@@ -20898,7 +21145,7 @@ var dependencies = {};
20898
21145
  return [propertyDeps, schemaDeps];
20899
21146
  }
20900
21147
  function validatePropertyDeps(cxt, propertyDeps = cxt.schema) {
20901
- const { gen, data, it } = cxt;
21148
+ const { gen, data, it: it2 } = cxt;
20902
21149
  if (Object.keys(propertyDeps).length === 0)
20903
21150
  return;
20904
21151
  const missing = gen.let("missing");
@@ -20906,13 +21153,13 @@ var dependencies = {};
20906
21153
  const deps = propertyDeps[prop];
20907
21154
  if (deps.length === 0)
20908
21155
  continue;
20909
- const hasProperty = (0, code_12.propertyInData)(gen, data, prop, it.opts.ownProperties);
21156
+ const hasProperty = (0, code_12.propertyInData)(gen, data, prop, it2.opts.ownProperties);
20910
21157
  cxt.setParams({
20911
21158
  property: prop,
20912
21159
  depsCount: deps.length,
20913
21160
  deps: deps.join(", ")
20914
21161
  });
20915
- if (it.allErrors) {
21162
+ if (it2.allErrors) {
20916
21163
  gen.if(hasProperty, () => {
20917
21164
  for (const depProp of deps) {
20918
21165
  (0, code_12.checkReportMissingProp)(cxt, depProp);
@@ -20927,13 +21174,13 @@ var dependencies = {};
20927
21174
  }
20928
21175
  exports.validatePropertyDeps = validatePropertyDeps;
20929
21176
  function validateSchemaDeps(cxt, schemaDeps = cxt.schema) {
20930
- const { gen, data, keyword: keyword2, it } = cxt;
21177
+ const { gen, data, keyword: keyword2, it: it2 } = cxt;
20931
21178
  const valid = gen.name("valid");
20932
21179
  for (const prop in schemaDeps) {
20933
- if ((0, util_12.alwaysValidSchema)(it, schemaDeps[prop]))
21180
+ if ((0, util_12.alwaysValidSchema)(it2, schemaDeps[prop]))
20934
21181
  continue;
20935
21182
  gen.if(
20936
- (0, code_12.propertyInData)(gen, data, prop, it.opts.ownProperties),
21183
+ (0, code_12.propertyInData)(gen, data, prop, it2.opts.ownProperties),
20937
21184
  () => {
20938
21185
  const schCxt = cxt.subschema({ keyword: keyword2, schemaProp: prop }, valid);
20939
21186
  cxt.mergeValidEvaluated(schCxt, valid);
@@ -20961,8 +21208,8 @@ const def$k = {
20961
21208
  schemaType: ["object", "boolean"],
20962
21209
  error: error$7,
20963
21210
  code(cxt) {
20964
- const { gen, schema: schema2, data, it } = cxt;
20965
- if ((0, util_1$d.alwaysValidSchema)(it, schema2))
21211
+ const { gen, schema: schema2, data, it: it2 } = cxt;
21212
+ if ((0, util_1$d.alwaysValidSchema)(it2, schema2))
20966
21213
  return;
20967
21214
  const valid = gen.name("valid");
20968
21215
  gen.forIn("key", data, (key) => {
@@ -20976,7 +21223,7 @@ const def$k = {
20976
21223
  }, valid);
20977
21224
  gen.if((0, codegen_1$a.not)(valid), () => {
20978
21225
  cxt.error(true);
20979
- if (!it.allErrors)
21226
+ if (!it2.allErrors)
20980
21227
  gen.break();
20981
21228
  });
20982
21229
  });
@@ -21002,12 +21249,12 @@ const def$j = {
21002
21249
  trackErrors: true,
21003
21250
  error: error$6,
21004
21251
  code(cxt) {
21005
- const { gen, schema: schema2, parentSchema, data, errsCount, it } = cxt;
21252
+ const { gen, schema: schema2, parentSchema, data, errsCount, it: it2 } = cxt;
21006
21253
  if (!errsCount)
21007
21254
  throw new Error("ajv implementation error");
21008
- const { allErrors, opts } = it;
21009
- it.props = true;
21010
- if (opts.removeAdditional !== "all" && (0, util_1$c.alwaysValidSchema)(it, schema2))
21255
+ const { allErrors, opts } = it2;
21256
+ it2.props = true;
21257
+ if (opts.removeAdditional !== "all" && (0, util_1$c.alwaysValidSchema)(it2, schema2))
21011
21258
  return;
21012
21259
  const props = (0, code_1$3.allSchemaProperties)(parentSchema.properties);
21013
21260
  const patProps = (0, code_1$3.allSchemaProperties)(parentSchema.patternProperties);
@@ -21024,7 +21271,7 @@ const def$j = {
21024
21271
  function isAdditional(key) {
21025
21272
  let definedProp;
21026
21273
  if (props.length > 8) {
21027
- const propsSchema = (0, util_1$c.schemaRefOrVal)(it, parentSchema.properties, "properties");
21274
+ const propsSchema = (0, util_1$c.schemaRefOrVal)(it2, parentSchema.properties, "properties");
21028
21275
  definedProp = (0, code_1$3.isOwnProperty)(gen, propsSchema, key);
21029
21276
  } else if (props.length) {
21030
21277
  definedProp = (0, codegen_1$9.or)(...props.map((p2) => (0, codegen_1$9._)`${key} === ${p2}`));
@@ -21051,7 +21298,7 @@ const def$j = {
21051
21298
  gen.break();
21052
21299
  return;
21053
21300
  }
21054
- if (typeof schema2 == "object" && !(0, util_1$c.alwaysValidSchema)(it, schema2)) {
21301
+ if (typeof schema2 == "object" && !(0, util_1$c.alwaysValidSchema)(it2, schema2)) {
21055
21302
  const valid = gen.name("valid");
21056
21303
  if (opts.removeAdditional === "failing") {
21057
21304
  applyAdditionalSchema(key, valid, false);
@@ -21095,18 +21342,18 @@ const def$i = {
21095
21342
  type: "object",
21096
21343
  schemaType: "object",
21097
21344
  code(cxt) {
21098
- const { gen, schema: schema2, parentSchema, data, it } = cxt;
21099
- if (it.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) {
21100
- additionalProperties_1$1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1$1.default, "additionalProperties"));
21345
+ const { gen, schema: schema2, parentSchema, data, it: it2 } = cxt;
21346
+ if (it2.opts.removeAdditional === "all" && parentSchema.additionalProperties === void 0) {
21347
+ additionalProperties_1$1.default.code(new validate_1.KeywordCxt(it2, additionalProperties_1$1.default, "additionalProperties"));
21101
21348
  }
21102
21349
  const allProps = (0, code_1$2.allSchemaProperties)(schema2);
21103
21350
  for (const prop of allProps) {
21104
- it.definedProperties.add(prop);
21351
+ it2.definedProperties.add(prop);
21105
21352
  }
21106
- if (it.opts.unevaluated && allProps.length && it.props !== true) {
21107
- it.props = util_1$b.mergeEvaluated.props(gen, (0, util_1$b.toHash)(allProps), it.props);
21353
+ if (it2.opts.unevaluated && allProps.length && it2.props !== true) {
21354
+ it2.props = util_1$b.mergeEvaluated.props(gen, (0, util_1$b.toHash)(allProps), it2.props);
21108
21355
  }
21109
- const properties2 = allProps.filter((p2) => !(0, util_1$b.alwaysValidSchema)(it, schema2[p2]));
21356
+ const properties2 = allProps.filter((p2) => !(0, util_1$b.alwaysValidSchema)(it2, schema2[p2]));
21110
21357
  if (properties2.length === 0)
21111
21358
  return;
21112
21359
  const valid = gen.name("valid");
@@ -21114,9 +21361,9 @@ const def$i = {
21114
21361
  if (hasDefault(prop)) {
21115
21362
  applyPropertySchema(prop);
21116
21363
  } else {
21117
- gen.if((0, code_1$2.propertyInData)(gen, data, prop, it.opts.ownProperties));
21364
+ gen.if((0, code_1$2.propertyInData)(gen, data, prop, it2.opts.ownProperties));
21118
21365
  applyPropertySchema(prop);
21119
- if (!it.allErrors)
21366
+ if (!it2.allErrors)
21120
21367
  gen.else().var(valid, true);
21121
21368
  gen.endIf();
21122
21369
  }
@@ -21124,7 +21371,7 @@ const def$i = {
21124
21371
  cxt.ok(valid);
21125
21372
  }
21126
21373
  function hasDefault(prop) {
21127
- return it.opts.useDefaults && !it.compositeRule && schema2[prop].default !== void 0;
21374
+ return it2.opts.useDefaults && !it2.compositeRule && schema2[prop].default !== void 0;
21128
21375
  }
21129
21376
  function applyPropertySchema(prop) {
21130
21377
  cxt.subschema({
@@ -21147,25 +21394,25 @@ const def$h = {
21147
21394
  type: "object",
21148
21395
  schemaType: "object",
21149
21396
  code(cxt) {
21150
- const { gen, schema: schema2, data, parentSchema, it } = cxt;
21151
- const { opts } = it;
21397
+ const { gen, schema: schema2, data, parentSchema, it: it2 } = cxt;
21398
+ const { opts } = it2;
21152
21399
  const patterns = (0, code_1$1.allSchemaProperties)(schema2);
21153
- const alwaysValidPatterns = patterns.filter((p2) => (0, util_1$a.alwaysValidSchema)(it, schema2[p2]));
21154
- if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) {
21400
+ const alwaysValidPatterns = patterns.filter((p2) => (0, util_1$a.alwaysValidSchema)(it2, schema2[p2]));
21401
+ if (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it2.opts.unevaluated || it2.props === true)) {
21155
21402
  return;
21156
21403
  }
21157
21404
  const checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;
21158
21405
  const valid = gen.name("valid");
21159
- if (it.props !== true && !(it.props instanceof codegen_1$8.Name)) {
21160
- it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);
21406
+ if (it2.props !== true && !(it2.props instanceof codegen_1$8.Name)) {
21407
+ it2.props = (0, util_2.evaluatedPropsToName)(gen, it2.props);
21161
21408
  }
21162
- const { props } = it;
21409
+ const { props } = it2;
21163
21410
  validatePatternProperties();
21164
21411
  function validatePatternProperties() {
21165
21412
  for (const pat of patterns) {
21166
21413
  if (checkProperties)
21167
21414
  checkMatchingProperties(pat);
21168
- if (it.allErrors) {
21415
+ if (it2.allErrors) {
21169
21416
  validateProperties(pat);
21170
21417
  } else {
21171
21418
  gen.var(valid, true);
@@ -21177,7 +21424,7 @@ const def$h = {
21177
21424
  function checkMatchingProperties(pat) {
21178
21425
  for (const prop in checkProperties) {
21179
21426
  if (new RegExp(pat).test(prop)) {
21180
- (0, util_1$a.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);
21427
+ (0, util_1$a.checkStrictMode)(it2, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);
21181
21428
  }
21182
21429
  }
21183
21430
  }
@@ -21193,9 +21440,9 @@ const def$h = {
21193
21440
  dataPropType: util_2.Type.Str
21194
21441
  }, valid);
21195
21442
  }
21196
- if (it.opts.unevaluated && props !== true) {
21443
+ if (it2.opts.unevaluated && props !== true) {
21197
21444
  gen.assign((0, codegen_1$8._)`${props}[${key}]`, true);
21198
- } else if (!alwaysValid && !it.allErrors) {
21445
+ } else if (!alwaysValid && !it2.allErrors) {
21199
21446
  gen.if((0, codegen_1$8.not)(valid), () => gen.break());
21200
21447
  }
21201
21448
  });
@@ -21212,8 +21459,8 @@ const def$g = {
21212
21459
  schemaType: ["object", "boolean"],
21213
21460
  trackErrors: true,
21214
21461
  code(cxt) {
21215
- const { gen, schema: schema2, it } = cxt;
21216
- if ((0, util_1$9.alwaysValidSchema)(it, schema2)) {
21462
+ const { gen, schema: schema2, it: it2 } = cxt;
21463
+ if ((0, util_1$9.alwaysValidSchema)(it2, schema2)) {
21217
21464
  cxt.fail();
21218
21465
  return;
21219
21466
  }
@@ -21254,10 +21501,10 @@ const def$e = {
21254
21501
  trackErrors: true,
21255
21502
  error: error$5,
21256
21503
  code(cxt) {
21257
- const { gen, schema: schema2, parentSchema, it } = cxt;
21504
+ const { gen, schema: schema2, parentSchema, it: it2 } = cxt;
21258
21505
  if (!Array.isArray(schema2))
21259
21506
  throw new Error("ajv implementation error");
21260
- if (it.opts.discriminator && parentSchema.discriminator)
21507
+ if (it2.opts.discriminator && parentSchema.discriminator)
21261
21508
  return;
21262
21509
  const schArr = schema2;
21263
21510
  const valid = gen.let("valid", false);
@@ -21269,7 +21516,7 @@ const def$e = {
21269
21516
  function validateOneOf() {
21270
21517
  schArr.forEach((sch, i2) => {
21271
21518
  let schCxt;
21272
- if ((0, util_1$8.alwaysValidSchema)(it, sch)) {
21519
+ if ((0, util_1$8.alwaysValidSchema)(it2, sch)) {
21273
21520
  gen.var(schValid, true);
21274
21521
  } else {
21275
21522
  schCxt = cxt.subschema({
@@ -21299,12 +21546,12 @@ const def$d = {
21299
21546
  keyword: "allOf",
21300
21547
  schemaType: "array",
21301
21548
  code(cxt) {
21302
- const { gen, schema: schema2, it } = cxt;
21549
+ const { gen, schema: schema2, it: it2 } = cxt;
21303
21550
  if (!Array.isArray(schema2))
21304
21551
  throw new Error("ajv implementation error");
21305
21552
  const valid = gen.name("valid");
21306
21553
  schema2.forEach((sch, i2) => {
21307
- if ((0, util_1$7.alwaysValidSchema)(it, sch))
21554
+ if ((0, util_1$7.alwaysValidSchema)(it2, sch))
21308
21555
  return;
21309
21556
  const schCxt = cxt.subschema({ keyword: "allOf", schemaProp: i2 }, valid);
21310
21557
  cxt.ok(valid);
@@ -21327,12 +21574,12 @@ const def$c = {
21327
21574
  trackErrors: true,
21328
21575
  error: error$4,
21329
21576
  code(cxt) {
21330
- const { gen, parentSchema, it } = cxt;
21577
+ const { gen, parentSchema, it: it2 } = cxt;
21331
21578
  if (parentSchema.then === void 0 && parentSchema.else === void 0) {
21332
- (0, util_1$6.checkStrictMode)(it, '"if" without "then" and "else" is ignored');
21579
+ (0, util_1$6.checkStrictMode)(it2, '"if" without "then" and "else" is ignored');
21333
21580
  }
21334
- const hasThen = hasSchema(it, "then");
21335
- const hasElse = hasSchema(it, "else");
21581
+ const hasThen = hasSchema(it2, "then");
21582
+ const hasElse = hasSchema(it2, "else");
21336
21583
  if (!hasThen && !hasElse)
21337
21584
  return;
21338
21585
  const valid = gen.let("valid", true);
@@ -21371,9 +21618,9 @@ const def$c = {
21371
21618
  }
21372
21619
  }
21373
21620
  };
21374
- function hasSchema(it, keyword2) {
21375
- const schema2 = it.schema[keyword2];
21376
- return schema2 !== void 0 && !(0, util_1$6.alwaysValidSchema)(it, schema2);
21621
+ function hasSchema(it2, keyword2) {
21622
+ const schema2 = it2.schema[keyword2];
21623
+ return schema2 !== void 0 && !(0, util_1$6.alwaysValidSchema)(it2, schema2);
21377
21624
  }
21378
21625
  _if.default = def$c;
21379
21626
  var thenElse = {};
@@ -21382,9 +21629,9 @@ const util_1$5 = util;
21382
21629
  const def$b = {
21383
21630
  keyword: ["then", "else"],
21384
21631
  schemaType: ["object", "boolean"],
21385
- code({ keyword: keyword2, parentSchema, it }) {
21632
+ code({ keyword: keyword2, parentSchema, it: it2 }) {
21386
21633
  if (parentSchema.if === void 0)
21387
- (0, util_1$5.checkStrictMode)(it, `"${keyword2}" without "if" is ignored`);
21634
+ (0, util_1$5.checkStrictMode)(it2, `"${keyword2}" without "if" is ignored`);
21388
21635
  }
21389
21636
  };
21390
21637
  thenElse.default = def$b;
@@ -21444,8 +21691,8 @@ const def$a = {
21444
21691
  $data: true,
21445
21692
  error: error$3,
21446
21693
  code(cxt, ruleType) {
21447
- const { gen, data, $data, schema: schema2, schemaCode, it } = cxt;
21448
- const { opts, errSchemaPath, schemaEnv, self: self2 } = it;
21694
+ const { gen, data, $data, schema: schema2, schemaCode, it: it2 } = cxt;
21695
+ const { opts, errSchemaPath, schemaEnv, self: self2 } = it2;
21449
21696
  if (!opts.validateFormats)
21450
21697
  return;
21451
21698
  if ($data)
@@ -21564,10 +21811,10 @@ const def$9 = {
21564
21811
  code: (cxt) => dynamicAnchor(cxt, cxt.schema)
21565
21812
  };
21566
21813
  function dynamicAnchor(cxt, anchor) {
21567
- const { gen, it } = cxt;
21568
- it.schemaEnv.root.dynamicAnchors[anchor] = true;
21814
+ const { gen, it: it2 } = cxt;
21815
+ it2.schemaEnv.root.dynamicAnchors[anchor] = true;
21569
21816
  const v2 = (0, codegen_1$4._)`${names_1$2.default.dynamicAnchors}${(0, codegen_1$4.getProperty)(anchor)}`;
21570
- const validate2 = it.errSchemaPath === "#" ? it.validateName : _getValidate(cxt);
21817
+ const validate2 = it2.errSchemaPath === "#" ? it2.validateName : _getValidate(cxt);
21571
21818
  gen.if((0, codegen_1$4._)`!${v2}`, () => gen.assign(v2, validate2));
21572
21819
  }
21573
21820
  dynamicAnchor$1.dynamicAnchor = dynamicAnchor;
@@ -21592,11 +21839,11 @@ const def$8 = {
21592
21839
  code: (cxt) => dynamicRef(cxt, cxt.schema)
21593
21840
  };
21594
21841
  function dynamicRef(cxt, ref2) {
21595
- const { gen, keyword: keyword2, it } = cxt;
21842
+ const { gen, keyword: keyword2, it: it2 } = cxt;
21596
21843
  if (ref2[0] !== "#")
21597
21844
  throw new Error(`"${keyword2}" only supports hash fragment reference`);
21598
21845
  const anchor = ref2.slice(1);
21599
- if (it.allErrors) {
21846
+ if (it2.allErrors) {
21600
21847
  _dynamicRef();
21601
21848
  } else {
21602
21849
  const valid = gen.let("valid", false);
@@ -21604,11 +21851,11 @@ function dynamicRef(cxt, ref2) {
21604
21851
  cxt.ok(valid);
21605
21852
  }
21606
21853
  function _dynamicRef(valid) {
21607
- if (it.schemaEnv.root.dynamicAnchors[anchor]) {
21854
+ if (it2.schemaEnv.root.dynamicAnchors[anchor]) {
21608
21855
  const v2 = gen.let("_v", (0, codegen_1$3._)`${names_1$1.default.dynamicAnchors}${(0, codegen_1$3.getProperty)(anchor)}`);
21609
- gen.if(v2, _callRef(v2, valid), _callRef(it.validateName, valid));
21856
+ gen.if(v2, _callRef(v2, valid), _callRef(it2.validateName, valid));
21610
21857
  } else {
21611
- _callRef(it.validateName, valid)();
21858
+ _callRef(it2.validateName, valid)();
21612
21859
  }
21613
21860
  }
21614
21861
  function _callRef(validate2, valid) {
@@ -21680,9 +21927,9 @@ const def$3 = {
21680
21927
  keyword: ["maxContains", "minContains"],
21681
21928
  type: "array",
21682
21929
  schemaType: "number",
21683
- code({ keyword: keyword2, parentSchema, it }) {
21930
+ code({ keyword: keyword2, parentSchema, it: it2 }) {
21684
21931
  if (parentSchema.contains === void 0) {
21685
- (0, util_1$3.checkStrictMode)(it, `"${keyword2}" without "contains" is ignored`);
21932
+ (0, util_1$3.checkStrictMode)(it2, `"${keyword2}" without "contains" is ignored`);
21686
21933
  }
21687
21934
  }
21688
21935
  };
@@ -21710,16 +21957,16 @@ const def$2 = {
21710
21957
  trackErrors: true,
21711
21958
  error: error$2,
21712
21959
  code(cxt) {
21713
- const { gen, schema: schema2, data, errsCount, it } = cxt;
21960
+ const { gen, schema: schema2, data, errsCount, it: it2 } = cxt;
21714
21961
  if (!errsCount)
21715
21962
  throw new Error("ajv implementation error");
21716
- const { allErrors, props } = it;
21963
+ const { allErrors, props } = it2;
21717
21964
  if (props instanceof codegen_1$2.Name) {
21718
21965
  gen.if((0, codegen_1$2._)`${props} !== true`, () => gen.forIn("key", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));
21719
21966
  } else if (props !== true) {
21720
21967
  gen.forIn("key", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));
21721
21968
  }
21722
- it.props = true;
21969
+ it2.props = true;
21723
21970
  cxt.ok((0, codegen_1$2._)`${errsCount} === ${names_1.default.errors}`);
21724
21971
  function unevaluatedPropCode(key) {
21725
21972
  if (schema2 === false) {
@@ -21729,7 +21976,7 @@ const def$2 = {
21729
21976
  gen.break();
21730
21977
  return;
21731
21978
  }
21732
- if (!(0, util_1$2.alwaysValidSchema)(it, schema2)) {
21979
+ if (!(0, util_1$2.alwaysValidSchema)(it2, schema2)) {
21733
21980
  const valid = gen.name("valid");
21734
21981
  cxt.subschema({
21735
21982
  keyword: "unevaluatedProperties",
@@ -21768,24 +22015,24 @@ const def$1 = {
21768
22015
  schemaType: ["boolean", "object"],
21769
22016
  error: error$1,
21770
22017
  code(cxt) {
21771
- const { gen, schema: schema2, data, it } = cxt;
21772
- const items2 = it.items || 0;
22018
+ const { gen, schema: schema2, data, it: it2 } = cxt;
22019
+ const items2 = it2.items || 0;
21773
22020
  if (items2 === true)
21774
22021
  return;
21775
22022
  const len = gen.const("len", (0, codegen_1$1._)`${data}.length`);
21776
22023
  if (schema2 === false) {
21777
22024
  cxt.setParams({ len: items2 });
21778
22025
  cxt.fail((0, codegen_1$1._)`${len} > ${items2}`);
21779
- } else if (typeof schema2 == "object" && !(0, util_1$1.alwaysValidSchema)(it, schema2)) {
22026
+ } else if (typeof schema2 == "object" && !(0, util_1$1.alwaysValidSchema)(it2, schema2)) {
21780
22027
  const valid = gen.var("valid", (0, codegen_1$1._)`${len} <= ${items2}`);
21781
22028
  gen.if((0, codegen_1$1.not)(valid), () => validateItems(valid, items2));
21782
22029
  cxt.ok(valid);
21783
22030
  }
21784
- it.items = true;
22031
+ it2.items = true;
21785
22032
  function validateItems(valid, from) {
21786
22033
  gen.forRange("i", from, len, (i2) => {
21787
22034
  cxt.subschema({ keyword: "unevaluatedItems", dataProp: i2, dataPropType: util_1$1.Type.Num }, valid);
21788
- if (!it.allErrors)
22035
+ if (!it2.allErrors)
21789
22036
  gen.if((0, codegen_1$1.not)(valid), () => gen.break());
21790
22037
  });
21791
22038
  }
@@ -21822,9 +22069,9 @@ const def = {
21822
22069
  schemaType: "object",
21823
22070
  error,
21824
22071
  code(cxt) {
21825
- const { gen, data, schema: schema2, parentSchema, it } = cxt;
22072
+ const { gen, data, schema: schema2, parentSchema, it: it2 } = cxt;
21826
22073
  const { oneOf: oneOf2 } = parentSchema;
21827
- if (!it.opts.discriminator) {
22074
+ if (!it2.opts.discriminator) {
21828
22075
  throw new Error("discriminator: requires discriminator option");
21829
22076
  }
21830
22077
  const tagName = schema2.propertyName;
@@ -21862,8 +22109,8 @@ const def = {
21862
22109
  let tagRequired = true;
21863
22110
  for (let i2 = 0; i2 < oneOf2.length; i2++) {
21864
22111
  let sch = oneOf2[i2];
21865
- if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {
21866
- sch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, sch === null || sch === void 0 ? void 0 : sch.$ref);
22112
+ if ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it2.self.RULES)) {
22113
+ sch = compile_1.resolveRef.call(it2.self, it2.schemaEnv.root, it2.baseId, sch === null || sch === void 0 ? void 0 : sch.$ref);
21867
22114
  if (sch instanceof compile_1.SchemaEnv)
21868
22115
  sch = sch.schema;
21869
22116
  }
@@ -23459,7 +23706,7 @@ function handleComputedProperty(options) {
23459
23706
  var _a;
23460
23707
  return Object.assign({}, options, {
23461
23708
  _computed: {
23462
- version: "8.49.1",
23709
+ version: "8.50.1",
23463
23710
  paymentMethodsUrl: ((_a = options._dev) == null ? void 0 : _a.paymentMethodsUrl) ?? "https://forms.secure-payments.app"
23464
23711
  }
23465
23712
  });
@@ -26799,7 +27046,7 @@ class RebillyInstrumentsInstance {
26799
27046
  await show({ componentName, payload });
26800
27047
  }
26801
27048
  get version() {
26802
- return `RebillyInstruments Ver.${"8.49.1"}`;
27049
+ return `RebillyInstruments Ver.${"8.50.1"}`;
26803
27050
  }
26804
27051
  on(eventName, callback) {
26805
27052
  on({ eventName, callback });