@feathery/react 2.11.2 → 2.12.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.
Files changed (115) hide show
  1. package/dist/cjs/{fthry_FormControl.D6cl6D9S.js → fthry_FormControl.CD7ZX9HS.js} +1 -1
  2. package/dist/cjs/{fthry_InlineTooltip.BznYePC8.js → fthry_InlineTooltip.CoBn0AOC.js} +2 -2
  3. package/dist/cjs/{fthry_Overlay.Y_J8ccm6.js → fthry_Overlay.CshBlW3v.js} +1 -1
  4. package/dist/cjs/{fthry_PaymentMethodField.D0YALHBL.js → fthry_PaymentMethodField.ClmgrMDW.js} +4 -4
  5. package/dist/cjs/{fthry_Placeholder.DLJqaPGW.js → fthry_Placeholder.CL_PBAhS.js} +1 -1
  6. package/dist/cjs/{fthry_ShowEyeIcon.DzvNCry-.js → fthry_ShowEyeIcon.DQYOkuGq.js} +1 -1
  7. package/dist/cjs/{fthry_index.Biaf9DMR.js → fthry_index.B8m8NcYS.js} +1 -1
  8. package/dist/cjs/{fthry_index.EMYHk8IT.js → fthry_index.BMq3dBRB.js} +598 -457
  9. package/dist/cjs/{fthry_index.CVdIUnnS.js → fthry_index.BpPVWOqt.js} +4 -4
  10. package/dist/cjs/{fthry_index._0ok1zlZ.js → fthry_index.BrzbrcQa.js} +6 -6
  11. package/dist/cjs/{fthry_index.nvFgoNpW.js → fthry_index.C8jtezTq.js} +2 -2
  12. package/dist/cjs/{fthry_index.5Pl_oKxb.js → fthry_index.CRJbToBF.js} +3 -3
  13. package/dist/cjs/{fthry_index.lBGOIoJv.js → fthry_index.CVGTkuBu.js} +5 -5
  14. package/dist/cjs/{fthry_index.CaFboSVZ.js → fthry_index.CX0W0jE1.js} +2 -2
  15. package/dist/cjs/{fthry_index.uPlANshe.js → fthry_index.CcgrLEuS.js} +5 -5
  16. package/dist/cjs/{fthry_index.ObOAUNgg.js → fthry_index.CdGAa2gf.js} +4 -4
  17. package/dist/cjs/{fthry_index.hetQ4hFA.js → fthry_index.Ce9wiHSK.js} +5 -5
  18. package/dist/cjs/{fthry_index.DhP_ifSD.js → fthry_index.CmHODiIC.js} +3 -3
  19. package/dist/cjs/{fthry_index.BIDjlZK9.js → fthry_index.CpHzsH9n.js} +1 -1
  20. package/dist/cjs/{fthry_index.BVctbQwI.js → fthry_index.CpIBnF75.js} +1 -1
  21. package/dist/cjs/{fthry_index.DfjbwYs8.js → fthry_index.CuICsq3u.js} +5 -5
  22. package/dist/cjs/{fthry_index.C-CXGg0X.js → fthry_index.CxZygKnY.js} +6 -6
  23. package/dist/cjs/{fthry_index.6K3SolcM.js → fthry_index.D94gkYbC.js} +8 -8
  24. package/dist/cjs/{fthry_index.XwO_Rbt1.js → fthry_index.DBr9A2ZJ.js} +1 -1
  25. package/dist/cjs/{fthry_index.Dg3FFh_g.js → fthry_index.DM58Cupo.js} +1 -1
  26. package/dist/cjs/{fthry_index.DmHwjSeG.js → fthry_index.R9WKq_P8.js} +1 -1
  27. package/dist/cjs/{fthry_index.Cl0pC-iC.js → fthry_index.e1NDYANz.js} +6 -6
  28. package/dist/cjs/{fthry_index.DKwYIEay.js → fthry_index.iaUi_vwz.js} +4 -4
  29. package/dist/cjs/{fthry_index.DPJLojch.js → fthry_index.x3WPDwFM.js} +1 -1
  30. package/dist/cjs/{fthry_input.zxl6q_39.js → fthry_input.xxDrXTUh.js} +1 -1
  31. package/dist/cjs/{fthry_script.BR1PC2YO.js → fthry_script.rT4Hk6hO.js} +1 -1
  32. package/dist/cjs/{fthry_styles.8kKnpgke.js → fthry_styles.CBznbkq1.js} +1 -1
  33. package/dist/cjs/{fthry_useElementSize.d2r6U5ah.js → fthry_useElementSize.BtewtYuf.js} +1 -1
  34. package/dist/cjs/{fthry_useSalesforceSync.BhgCgOph.js → fthry_useSalesforceSync.CuD01OZB.js} +1 -1
  35. package/dist/cjs/{fthry_webfontloader.BxRwLQqw.js → fthry_webfontloader.BpYY6eaS.js} +1 -1
  36. package/dist/cjs/index.d.ts +2 -2
  37. package/dist/cjs/index.js +1 -1
  38. package/dist/cjs/utils/error.d.ts +0 -5
  39. package/dist/cjs/utils/error.d.ts.map +1 -1
  40. package/dist/cjs/utils/featheryClient/index.d.ts +12 -20
  41. package/dist/cjs/utils/featheryClient/index.d.ts.map +1 -1
  42. package/dist/cjs/utils/featheryClient/integrationClient.d.ts +2 -8
  43. package/dist/cjs/utils/featheryClient/integrationClient.d.ts.map +1 -1
  44. package/dist/cjs/utils/featheryClient/utils.d.ts.map +1 -1
  45. package/dist/cjs/utils/formContext.d.ts +2 -1
  46. package/dist/cjs/utils/formContext.d.ts.map +1 -1
  47. package/dist/cjs/utils/formHelperFunctions.d.ts.map +1 -1
  48. package/dist/cjs/utils/internalState.d.ts +1 -12
  49. package/dist/cjs/utils/internalState.d.ts.map +1 -1
  50. package/dist/esm/{fthry_FormControl.Dw6vin7t.js → fthry_FormControl.CJgP5gkl.js} +1 -1
  51. package/dist/esm/{fthry_InlineTooltip.BefepzqB.js → fthry_InlineTooltip.C6FcOG7t.js} +2 -2
  52. package/dist/esm/{fthry_Overlay.KSPvV_5I.js → fthry_Overlay.OaYtZbBy.js} +1 -1
  53. package/dist/esm/{fthry_PaymentMethodField.BUfFS7UV.js → fthry_PaymentMethodField.w3gN7Laz.js} +4 -4
  54. package/dist/esm/{fthry_Placeholder.BW8tIivs.js → fthry_Placeholder.B8o3b6LD.js} +1 -1
  55. package/dist/esm/{fthry_ShowEyeIcon.BKxMDQ6E.js → fthry_ShowEyeIcon.CTL96Xla.js} +1 -1
  56. package/dist/esm/{fthry_index.WbUsG08Q.js → fthry_index.B3p8f_0T.js} +3 -3
  57. package/dist/esm/{fthry_index.zq2HD0Fd.js → fthry_index.BG0CKa54.js} +1 -1
  58. package/dist/esm/{fthry_index.BnK1bTAO.js → fthry_index.BJfTO9uE.js} +5 -5
  59. package/dist/esm/{fthry_index.B792Q-9f.js → fthry_index.BmTsB6Yu.js} +4 -4
  60. package/dist/esm/{fthry_index.Cwlyf022.js → fthry_index.BrukVpyc.js} +1 -1
  61. package/dist/esm/{fthry_index.Dwn_Hlhv.js → fthry_index.Bwx-PVUc.js} +1 -1
  62. package/dist/esm/{fthry_index.ClAqMRNE.js → fthry_index.CX_yIpjx.js} +5 -5
  63. package/dist/esm/{fthry_index.CI9m6hZF.js → fthry_index.D2sLtI7z.js} +598 -457
  64. package/dist/esm/{fthry_index.C8W18PjB.js → fthry_index.D5EZxrPq.js} +6 -6
  65. package/dist/esm/{fthry_index.DySdw1qz.js → fthry_index.DVcP5-xw.js} +3 -3
  66. package/dist/esm/{fthry_index.B47QNn0m.js → fthry_index.DfQXHyGI.js} +5 -5
  67. package/dist/esm/{fthry_index.bwiHR1sL.js → fthry_index.Dh6l3Gzh.js} +1 -1
  68. package/dist/esm/{fthry_index.iCgN6lqQ.js → fthry_index.DhAebwSP.js} +1 -1
  69. package/dist/esm/{fthry_index.o9Sz1ZZ7.js → fthry_index.DjBNWso3.js} +4 -4
  70. package/dist/esm/{fthry_index.DrkBLnxc.js → fthry_index.W81Z3_36.js} +2 -2
  71. package/dist/esm/{fthry_index.DNGxrq0x.js → fthry_index._VpRor3C.js} +4 -4
  72. package/dist/esm/{fthry_index.BLXBhPia.js → fthry_index._Vy4-Wu1.js} +1 -1
  73. package/dist/esm/{fthry_index.B6wWZFeh.js → fthry_index.f0EL1oG0.js} +6 -6
  74. package/dist/esm/{fthry_index.BroPvTJq.js → fthry_index.q1Cc80ox.js} +2 -2
  75. package/dist/esm/{fthry_index.D9_3XAGw.js → fthry_index.rA0-tPwD.js} +8 -8
  76. package/dist/esm/{fthry_index.CJ32ytSR.js → fthry_index.xPB4gauQ.js} +1 -1
  77. package/dist/esm/{fthry_index.CquWPUWD.js → fthry_index.xmk6gHHa.js} +5 -5
  78. package/dist/esm/{fthry_index.56gEPYOD.js → fthry_index.yOjuSCdP.js} +6 -6
  79. package/dist/esm/{fthry_input.sAUJXmRh.js → fthry_input.IXRyP1Bj.js} +1 -1
  80. package/dist/esm/{fthry_script.Ddc0lRD_.js → fthry_script.BM2vGrj6.js} +1 -1
  81. package/dist/esm/{fthry_styles.3ifXNVk6.js → fthry_styles.DfbJMfa4.js} +1 -1
  82. package/dist/esm/{fthry_useElementSize.MYGhO3UW.js → fthry_useElementSize.9TQixaBM.js} +1 -1
  83. package/dist/esm/{fthry_useSalesforceSync.CLzWAPAF.js → fthry_useSalesforceSync.kfFiE0MN.js} +1 -1
  84. package/dist/esm/{fthry_webfontloader.DbHsRpPk.js → fthry_webfontloader.Bg-Ggiji.js} +1 -1
  85. package/dist/esm/index.d.ts +2 -2
  86. package/dist/esm/index.js +1 -1
  87. package/dist/esm/utils/error.d.ts +0 -5
  88. package/dist/esm/utils/error.d.ts.map +1 -1
  89. package/dist/esm/utils/featheryClient/index.d.ts +12 -20
  90. package/dist/esm/utils/featheryClient/index.d.ts.map +1 -1
  91. package/dist/esm/utils/featheryClient/integrationClient.d.ts +2 -8
  92. package/dist/esm/utils/featheryClient/integrationClient.d.ts.map +1 -1
  93. package/dist/esm/utils/featheryClient/utils.d.ts.map +1 -1
  94. package/dist/esm/utils/formContext.d.ts +2 -1
  95. package/dist/esm/utils/formContext.d.ts.map +1 -1
  96. package/dist/esm/utils/formHelperFunctions.d.ts.map +1 -1
  97. package/dist/esm/utils/internalState.d.ts +1 -12
  98. package/dist/esm/utils/internalState.d.ts.map +1 -1
  99. package/dist/index.d.ts +2 -2
  100. package/dist/utils/error.d.ts +0 -5
  101. package/dist/utils/error.d.ts.map +1 -1
  102. package/dist/utils/featheryClient/index.d.ts +12 -20
  103. package/dist/utils/featheryClient/index.d.ts.map +1 -1
  104. package/dist/utils/featheryClient/integrationClient.d.ts +2 -8
  105. package/dist/utils/featheryClient/integrationClient.d.ts.map +1 -1
  106. package/dist/utils/featheryClient/utils.d.ts.map +1 -1
  107. package/dist/utils/formContext.d.ts +2 -1
  108. package/dist/utils/formContext.d.ts.map +1 -1
  109. package/dist/utils/formHelperFunctions.d.ts.map +1 -1
  110. package/dist/utils/internalState.d.ts +1 -12
  111. package/dist/utils/internalState.d.ts.map +1 -1
  112. package/package.json +2 -1
  113. package/umd/{509.4236d4d76d2fa2ccd971.js → 509.f9d0245d6c94d15722a0.js} +2 -2
  114. package/umd/index.js +1 -1
  115. /package/umd/{509.4236d4d76d2fa2ccd971.js.LICENSE.txt → 509.f9d0245d6c94d15722a0.js.LICENSE.txt} +0 -0
@@ -5780,66 +5780,6 @@ function v4$1(options, buf, offset) {
5780
5780
  return stringify$1(rnds);
5781
5781
  }
5782
5782
 
5783
- var SDKKeyError = /** @class */ (function (_super) {
5784
- __extends(SDKKeyError, _super);
5785
- function SDKKeyError(message) {
5786
- if (message === void 0) { message = 'Invalid SDK Key'; }
5787
- var _this = _super.call(this, message) || this;
5788
- _this.name = 'SDKKeyError';
5789
- return _this;
5790
- }
5791
- return SDKKeyError;
5792
- }(Error));
5793
- var UserIdError = /** @class */ (function (_super) {
5794
- __extends(UserIdError, _super);
5795
- function UserIdError() {
5796
- var _this = _super.call(this, 'Invalid User ID') || this;
5797
- _this.name = 'UserIdError';
5798
- return _this;
5799
- }
5800
- return UserIdError;
5801
- }(Error));
5802
- var FetchError = /** @class */ (function (_super) {
5803
- __extends(FetchError, _super);
5804
- function FetchError(message, payload) {
5805
- if (payload === void 0) { payload = null; }
5806
- var _this = _super.call(this, message) || this;
5807
- _this.name = 'FetchError';
5808
- _this.payload = payload;
5809
- return _this;
5810
- }
5811
- return FetchError;
5812
- }(Error));
5813
- function parseError(err) {
5814
- if (Array.isArray(err) && err.length) {
5815
- var payloadError = err[0];
5816
- if (typeof payloadError === 'object' && 'message' in payloadError) {
5817
- return payloadError.message;
5818
- }
5819
- else
5820
- return 'Invalid';
5821
- }
5822
- else if (err.message || err.error)
5823
- return err.message || err.error;
5824
- else
5825
- return err.toString();
5826
- }
5827
- var handleCustomScriptError = function (e) {
5828
- var _a, _b;
5829
- var errorReason = (_a = e.reason) !== null && _a !== void 0 ? _a : e.error;
5830
- // If stack is at 'eval', it is a logic rule error.
5831
- // Note this only works for unhandledrejection events, not error events.
5832
- console.warn('Error caught in custom HTML. Error Message: ', (_b = errorReason.message) !== null && _b !== void 0 ? _b : '');
5833
- e.stopPropagation();
5834
- e.preventDefault(); // Prevent the error in the log
5835
- };
5836
- var setCustomErrorHandler = function () {
5837
- featheryWindow().addEventListener('error', handleCustomScriptError);
5838
- };
5839
- var removeCustomErrorHandler = function () {
5840
- featheryWindow().removeEventListener('error', handleCustomScriptError);
5841
- };
5842
-
5843
5783
  function encodeGetParams(params) {
5844
5784
  return (Object.entries(params)
5845
5785
  // @ts-expect-error TS(2345): Argument of type '(uriComponent: string | number |... Remove this comment to see the full error message
@@ -5900,6 +5840,507 @@ function numMatchingItems(arr1, arr2) {
5900
5840
  return i;
5901
5841
  }
5902
5842
 
5843
+ var dist$2 = {};
5844
+
5845
+ var api$1 = {};
5846
+
5847
+ var utils = {};
5848
+
5849
+ var error = {};
5850
+
5851
+ var hasRequiredError;
5852
+
5853
+ function requireError () {
5854
+ if (hasRequiredError) return error;
5855
+ hasRequiredError = 1;
5856
+ Object.defineProperty(error, "__esModule", { value: true });
5857
+ error.ValidationError = error.FetchError = void 0;
5858
+ error.parseAPIError = parseAPIError;
5859
+ class FetchError extends Error {
5860
+ constructor(message, payload = null) {
5861
+ super(message);
5862
+ this.name = 'FetchError';
5863
+ this.payload = payload;
5864
+ }
5865
+ }
5866
+ error.FetchError = FetchError;
5867
+ class ValidationError extends Error {
5868
+ constructor(message) {
5869
+ super(message);
5870
+ this.name = 'ValidationError';
5871
+ }
5872
+ }
5873
+ error.ValidationError = ValidationError;
5874
+ function parseAPIError(err) {
5875
+ if (Array.isArray(err) && err.length) {
5876
+ const payloadError = err[0];
5877
+ if (typeof payloadError === 'object' && 'message' in payloadError) {
5878
+ return payloadError.message;
5879
+ }
5880
+ else
5881
+ return 'Invalid';
5882
+ }
5883
+ else if (err.message || err.error)
5884
+ return err.message || err.error;
5885
+ else
5886
+ return err.toString();
5887
+ }
5888
+ return error;
5889
+ }
5890
+
5891
+ var setup = {};
5892
+
5893
+ var hasRequiredSetup;
5894
+
5895
+ function requireSetup () {
5896
+ if (hasRequiredSetup) return setup;
5897
+ hasRequiredSetup = 1;
5898
+ Object.defineProperty(setup, "__esModule", { value: true });
5899
+ setup.S3_URL_OPTIONS = setup.CDN_URL_OPTIONS = setup.STATIC_URL_OPTIONS = setup.API_URL_OPTIONS = void 0;
5900
+ setup.getEnvironment = getEnvironment;
5901
+ setup.setEnvironment = setEnvironment;
5902
+ setup.API_URL_OPTIONS = {
5903
+ local: 'http://localhost:8006/api/',
5904
+ docker: 'http://host.docker.internal:8006/api/',
5905
+ staging: 'https://staging.feathery.io/api/',
5906
+ production: 'https://api.feathery.io/api/',
5907
+ productionAU: 'https://api-au.feathery.io/api/',
5908
+ productionEU: 'https://api-eu.feathery.io/api/',
5909
+ productionCA: 'https://api-ca.feathery.io/api/',
5910
+ };
5911
+ setup.STATIC_URL_OPTIONS = {
5912
+ local: 'http://localhost:8006/api/',
5913
+ docker: 'http://host.docker.internal:8006/api/',
5914
+ staging: 'https://staging.feathery.io/api/',
5915
+ production: 'https://api-static-2.feathery.io/api/',
5916
+ productionAU: 'https://api-au.feathery.io/api/',
5917
+ productionEU: 'https://api-eu.feathery.io/api/',
5918
+ productionCA: 'https://api-ca.feathery.io/api/',
5919
+ };
5920
+ setup.CDN_URL_OPTIONS = {
5921
+ local: 'http://localhost:8006/api/',
5922
+ docker: 'http://host.docker.internal:8006/api/',
5923
+ staging: 'https://staging.feathery.io/api/',
5924
+ production: 'https://cdn.feathery.io/api/',
5925
+ productionAU: 'https://cdn-au.feathery.io/api/',
5926
+ productionEU: 'https://cdn-eu.feathery.io/api/',
5927
+ productionCA: 'https://cdn-ca.feathery.io/api/',
5928
+ };
5929
+ setup.S3_URL_OPTIONS = {
5930
+ local: 'http://localhost:8006',
5931
+ docker: 'http://host.docker.internal:8006',
5932
+ staging: 's3.us-west-1.amazonaws.com',
5933
+ production: 's3.us-west-1.amazonaws.com',
5934
+ productionAU: 's3.ap-southeast-2.amazonaws.com',
5935
+ productionEU: 's3.eu-west-1.amazonaws.com',
5936
+ productionCA: 's3.ca-central-1.amazonaws.com',
5937
+ };
5938
+ let configuredEnvironment;
5939
+ let isClientSide = true;
5940
+ let internalSecretKey = null;
5941
+ function getEnvironment() {
5942
+ if (!configuredEnvironment)
5943
+ throw new Error('Environment not set');
5944
+ return { configuredEnvironment, isClientSide, internalSecretKey };
5945
+ }
5946
+ /**
5947
+ * Set the environment for the SDK.
5948
+ * @param environment - The environment to set (local, staging, production, etc.).
5949
+ * @param clientSide - Whether the SDK is running in the browser or server side.
5950
+ * @param secretKey - The secret key to use for the SDK.
5951
+ */
5952
+ function setEnvironment(environment, clientSide = true, secretKey = null) {
5953
+ configuredEnvironment = environment;
5954
+ isClientSide = clientSide;
5955
+ internalSecretKey = secretKey;
5956
+ }
5957
+ return setup;
5958
+ }
5959
+
5960
+ var hasRequiredUtils;
5961
+
5962
+ function requireUtils () {
5963
+ if (hasRequiredUtils) return utils;
5964
+ hasRequiredUtils = 1;
5965
+ Object.defineProperty(utils, "__esModule", { value: true });
5966
+ utils.getApiUrl = getApiUrl;
5967
+ utils.getStaticUrl = getStaticUrl;
5968
+ utils.getCdnUrl = getCdnUrl;
5969
+ utils.getS3Url = getS3Url;
5970
+ utils.checkResponseSuccess = checkResponseSuccess;
5971
+ utils.apiFetch = apiFetch;
5972
+ utils.createHttpHelpers = createHttpHelpers;
5973
+ const api_1 = requireApi();
5974
+ const error_1 = requireError();
5975
+ const setup_1 = requireSetup();
5976
+ function getApiUrl() {
5977
+ const { configuredEnvironment, isClientSide } = (0, setup_1.getEnvironment)();
5978
+ if (configuredEnvironment === 'local' && !isClientSide)
5979
+ return setup_1.API_URL_OPTIONS.docker;
5980
+ return setup_1.API_URL_OPTIONS[configuredEnvironment];
5981
+ }
5982
+ function getStaticUrl() {
5983
+ const { configuredEnvironment, isClientSide } = (0, setup_1.getEnvironment)();
5984
+ if (configuredEnvironment === 'local' && !isClientSide)
5985
+ return setup_1.STATIC_URL_OPTIONS.docker;
5986
+ return setup_1.STATIC_URL_OPTIONS[configuredEnvironment];
5987
+ }
5988
+ function getCdnUrl() {
5989
+ const { configuredEnvironment, isClientSide } = (0, setup_1.getEnvironment)();
5990
+ if (configuredEnvironment === 'local' && !isClientSide)
5991
+ return setup_1.CDN_URL_OPTIONS.docker;
5992
+ return setup_1.CDN_URL_OPTIONS[configuredEnvironment];
5993
+ }
5994
+ function getS3Url() {
5995
+ const { configuredEnvironment, isClientSide } = (0, setup_1.getEnvironment)();
5996
+ if (configuredEnvironment === 'local' && !isClientSide)
5997
+ return setup_1.S3_URL_OPTIONS.docker;
5998
+ return setup_1.S3_URL_OPTIONS[configuredEnvironment];
5999
+ }
6000
+ async function checkResponseSuccess(response) {
6001
+ let payload;
6002
+ switch (response.status) {
6003
+ case 200:
6004
+ case 201:
6005
+ case 202:
6006
+ return;
6007
+ case 400:
6008
+ payload = JSON.stringify(await response.clone().text());
6009
+ throw new error_1.FetchError(payload.toString());
6010
+ case 404:
6011
+ throw new error_1.FetchError("Can't find object");
6012
+ case 500:
6013
+ throw new error_1.FetchError('Internal server error');
6014
+ default:
6015
+ throw new error_1.FetchError('Unknown error');
6016
+ }
6017
+ }
6018
+ async function apiFetch(sdkKey, url, options, parseResponse = true) {
6019
+ options = options ?? {};
6020
+ const { headers, ...otherOptions } = options;
6021
+ options = {
6022
+ cache: 'no-store',
6023
+ // write requests must succeed so data is tracked
6024
+ keepalive: ['POST', 'PATCH', 'PUT'].includes(options.method),
6025
+ headers: {
6026
+ Authorization: 'Token ' + sdkKey,
6027
+ ...headers,
6028
+ },
6029
+ ...otherOptions,
6030
+ };
6031
+ const { internalSecretKey } = (0, setup_1.getEnvironment)();
6032
+ if (internalSecretKey)
6033
+ options.headers['X-Lambda-Secret'] = internalSecretKey;
6034
+ return fetch(url, options).then(async (response) => {
6035
+ if (parseResponse)
6036
+ await checkResponseSuccess(response);
6037
+ return response;
6038
+ });
6039
+ }
6040
+ function createHttpHelpers(sdkKey, formId, userId, fieldValues, updateFieldData, offlineHandler) {
6041
+ const helpers = {};
6042
+ ['get', 'patch', 'post', 'put', 'delete'].forEach((method) => (helpers[method] = async (url, data, headers) => {
6043
+ if (!url)
6044
+ return {};
6045
+ const response = await (0, api_1.runCustomRequest)(sdkKey, formId, { method: method.toUpperCase(), url, data, headers }, userId, fieldValues, offlineHandler);
6046
+ if (!response)
6047
+ return {};
6048
+ if (response.field_values && updateFieldData) {
6049
+ updateFieldData(response.field_values);
6050
+ }
6051
+ return {
6052
+ data: response.data,
6053
+ statusCode: response.status_code,
6054
+ // status_code for backwards compatibility
6055
+ status_code: response.statusCode,
6056
+ };
6057
+ }));
6058
+ helpers.connect = async (name, data, headers) => {
6059
+ if (!name)
6060
+ return {};
6061
+ const response = await (0, api_1.runCustomRequest)(sdkKey, formId, { name, data, headers }, userId, fieldValues, offlineHandler);
6062
+ if (!response)
6063
+ return {};
6064
+ if (response.field_values && updateFieldData) {
6065
+ updateFieldData(response.field_values);
6066
+ }
6067
+ return {
6068
+ data: response.data,
6069
+ statusCode: response.status_code,
6070
+ };
6071
+ };
6072
+ return helpers;
6073
+ }
6074
+ return utils;
6075
+ }
6076
+
6077
+ var hasRequiredApi;
6078
+
6079
+ function requireApi () {
6080
+ if (hasRequiredApi) return api$1;
6081
+ hasRequiredApi = 1;
6082
+ Object.defineProperty(api$1, "__esModule", { value: true });
6083
+ api$1.customRolloutAction = customRolloutAction;
6084
+ api$1.extractAIDocument = extractAIDocument;
6085
+ api$1.pollForCompletion = pollForCompletion;
6086
+ api$1.inviteFormCollaborator = inviteFormCollaborator;
6087
+ api$1.sendEmail = sendEmail;
6088
+ api$1.forwardInboxEmail = forwardInboxEmail;
6089
+ api$1.runCustomRequest = runCustomRequest;
6090
+ const utils_1 = requireUtils();
6091
+ const error_1 = requireError();
6092
+ async function customRolloutAction(sdkKey, automationIds, formId, fieldData, options, userId) {
6093
+ const url = `${(0, utils_1.getApiUrl)()}rollout/custom-trigger/`;
6094
+ if (typeof automationIds === 'string')
6095
+ automationIds = [automationIds];
6096
+ const reqOptions = {
6097
+ headers: { 'Content-Type': 'application/json' },
6098
+ method: 'POST',
6099
+ body: JSON.stringify({
6100
+ automation_ids: automationIds,
6101
+ sync: options.waitForCompletion ?? true,
6102
+ multiple: options.multiple ?? false,
6103
+ payload: fieldData,
6104
+ form_key: formId,
6105
+ fuser_key: userId,
6106
+ }),
6107
+ };
6108
+ const res = await (0, utils_1.apiFetch)(sdkKey, url, reqOptions, false);
6109
+ if (res && res.status === 200)
6110
+ return { ok: true, payload: await res.json() };
6111
+ else
6112
+ return { ok: false, error: (await res?.text()) ?? '' };
6113
+ }
6114
+ async function extractAIDocument(sdkKey, extractionId, options, userId, pages, triggerExtractionRunId, collaboratorId, onMeetingInfo, onStatusUpdate) {
6115
+ let runAsync;
6116
+ let variantId;
6117
+ let meetingUrl;
6118
+ if (typeof options === 'object') {
6119
+ runAsync = !options.waitForCompletion;
6120
+ pages = options.pages;
6121
+ variantId = options.variantId;
6122
+ meetingUrl = options.meetingUrl;
6123
+ }
6124
+ else {
6125
+ // deprecated usage, options is runAsync
6126
+ runAsync = options;
6127
+ }
6128
+ const data = {
6129
+ fuser_key: userId,
6130
+ extraction_id: extractionId,
6131
+ extraction_variant_id: variantId,
6132
+ trigger_extraction_run_id: triggerExtractionRunId,
6133
+ pages,
6134
+ meeting_url: meetingUrl,
6135
+ collaborator_user: collaboratorId,
6136
+ };
6137
+ const res = await (0, utils_1.apiFetch)(sdkKey, `${(0, utils_1.getStaticUrl)()}ai/vision/`, {
6138
+ headers: { 'Content-Type': 'application/json' },
6139
+ method: 'POST',
6140
+ body: JSON.stringify(data),
6141
+ });
6142
+ if (runAsync)
6143
+ return {};
6144
+ const response = await res?.json();
6145
+ if (response?.meeting_info) {
6146
+ onMeetingInfo?.();
6147
+ return {};
6148
+ }
6149
+ const pollUrl = `${(0, utils_1.getStaticUrl)()}ai/vision/completion/?fid=${userId}&eid=${extractionId}&evid=${variantId ?? ''}`;
6150
+ const CHECK_INTERVAL = 2000;
6151
+ const MAX_TIME = 3 * 60 * 1000;
6152
+ return await pollForCompletion(sdkKey, pollUrl, CHECK_INTERVAL, MAX_TIME, 'Extraction', onStatusUpdate);
6153
+ }
6154
+ async function pollForCompletion(sdkKey, pollUrl, checkInterval, maxTime, operationName = 'Operation', onStatusUpdate) {
6155
+ return new Promise((resolve) => {
6156
+ let attempts = 0;
6157
+ const maxAttempts = maxTime / checkInterval;
6158
+ const checkCompletion = async () => {
6159
+ const response = await (0, utils_1.apiFetch)(sdkKey, pollUrl, { method: 'GET' }, false);
6160
+ if (!response)
6161
+ return;
6162
+ const data = await response.json();
6163
+ if (onStatusUpdate) {
6164
+ onStatusUpdate(data);
6165
+ }
6166
+ if (response.ok) {
6167
+ if (data.status === 'complete') {
6168
+ return resolve(data);
6169
+ }
6170
+ else {
6171
+ attempts += 1;
6172
+ if (attempts < maxAttempts) {
6173
+ setTimeout(checkCompletion, checkInterval);
6174
+ }
6175
+ else {
6176
+ const message = `${operationName} took too long...`;
6177
+ console.error(message);
6178
+ return resolve({ status: 'error', message });
6179
+ }
6180
+ }
6181
+ }
6182
+ else {
6183
+ const message = (0, error_1.parseAPIError)(data);
6184
+ console.error(message);
6185
+ if (onStatusUpdate) {
6186
+ onStatusUpdate({ error: message });
6187
+ }
6188
+ return resolve({ status: 'error', message });
6189
+ }
6190
+ };
6191
+ // check every few seconds for a response
6192
+ setTimeout(checkCompletion, checkInterval);
6193
+ });
6194
+ }
6195
+ async function inviteFormCollaborator(sdkKey, formId, templateId, usersGroups, userId, collaboratorId) {
6196
+ const data = {
6197
+ form_key: formId,
6198
+ fuser_key: userId,
6199
+ users_groups: usersGroups,
6200
+ template_id: templateId,
6201
+ collaborator_user: collaboratorId,
6202
+ };
6203
+ return (0, utils_1.apiFetch)(sdkKey, `${(0, utils_1.getApiUrl)()}collaborator/invite/`, {
6204
+ headers: { 'Content-Type': 'application/json' },
6205
+ method: 'POST',
6206
+ body: JSON.stringify(data),
6207
+ }, false).then(async (response) => {
6208
+ if (response) {
6209
+ if (response && response.status === 201)
6210
+ return { ok: true, payload: await response.json() };
6211
+ else
6212
+ return { ok: false, error: (await response?.text()) ?? '' };
6213
+ }
6214
+ });
6215
+ }
6216
+ async function sendEmail(sdkKey, userId, formId, templateId, skipPfd = false) {
6217
+ const url = `${(0, utils_1.getApiUrl)()}email/logic-rule/`;
6218
+ const options = {
6219
+ headers: { 'Content-Type': 'application/json' },
6220
+ method: 'POST',
6221
+ body: JSON.stringify({
6222
+ template_id: templateId,
6223
+ form_key: formId,
6224
+ fuser_key: userId,
6225
+ skip_pfd: skipPfd,
6226
+ }),
6227
+ };
6228
+ return await (0, utils_1.apiFetch)(sdkKey, url, options, false);
6229
+ }
6230
+ async function forwardInboxEmail(sdkKey, userId, emailGroup, extractionRunId, emailMessageId, allGroups) {
6231
+ const recipients = allGroups?.find((group) => group.name === emailGroup)?.emails ?? [];
6232
+ const url = `${(0, utils_1.getApiUrl)()}email/forward/`;
6233
+ if (recipients.length === 0) {
6234
+ throw new error_1.ValidationError(`No recipients found for email group: ${emailGroup}`);
6235
+ }
6236
+ const options = {
6237
+ headers: { 'Content-Type': 'application/json' },
6238
+ method: 'POST',
6239
+ body: JSON.stringify({
6240
+ email_message_id: emailMessageId,
6241
+ recipients,
6242
+ extraction_run_id: extractionRunId,
6243
+ user_id: userId,
6244
+ email_group: emailGroup,
6245
+ }),
6246
+ };
6247
+ await (0, utils_1.apiFetch)(sdkKey, url, options);
6248
+ }
6249
+ function runCustomRequest(sdkKey, formId, payload, userId, fieldValues, offlineHandler) {
6250
+ const data = {
6251
+ fuser_key: userId,
6252
+ form_key: formId,
6253
+ name: payload.name,
6254
+ method: payload.method,
6255
+ url: payload.url,
6256
+ user_data: payload.data,
6257
+ headers: payload.headers,
6258
+ field_values: fieldValues,
6259
+ };
6260
+ const url = `${(0, utils_1.getStaticUrl)()}custom_request/`;
6261
+ const options = {
6262
+ headers: { 'Content-Type': 'application/json' },
6263
+ method: 'POST',
6264
+ body: JSON.stringify(data),
6265
+ keepalive: false,
6266
+ };
6267
+ const run = () => (0, utils_1.apiFetch)(sdkKey, url, options).then((response) => (response ? response.json() : Promise.resolve()));
6268
+ if (payload.method === 'GET' || !offlineHandler)
6269
+ return run();
6270
+ return offlineHandler(run, url, options, 'customRequest');
6271
+ }
6272
+ return api$1;
6273
+ }
6274
+
6275
+ var hasRequiredDist$2;
6276
+
6277
+ function requireDist$2 () {
6278
+ if (hasRequiredDist$2) return dist$2;
6279
+ hasRequiredDist$2 = 1;
6280
+ (function (exports$1) {
6281
+ Object.defineProperty(exports$1, "__esModule", { value: true });
6282
+ exports$1.setEnvironment = exports$1.parseAPIError = exports$1.FetchError = exports$1.getS3Url = exports$1.getCdnUrl = exports$1.getStaticUrl = exports$1.getApiUrl = exports$1.createHttpHelpers = exports$1.checkResponseSuccess = exports$1.apiFetch = exports$1.sendEmail = exports$1.pollForCompletion = exports$1.inviteFormCollaborator = exports$1.forwardInboxEmail = exports$1.extractAIDocument = exports$1.customRolloutAction = void 0;
6283
+ var api_1 = requireApi();
6284
+ Object.defineProperty(exports$1, "customRolloutAction", { enumerable: true, get: function () { return api_1.customRolloutAction; } });
6285
+ Object.defineProperty(exports$1, "extractAIDocument", { enumerable: true, get: function () { return api_1.extractAIDocument; } });
6286
+ Object.defineProperty(exports$1, "forwardInboxEmail", { enumerable: true, get: function () { return api_1.forwardInboxEmail; } });
6287
+ Object.defineProperty(exports$1, "inviteFormCollaborator", { enumerable: true, get: function () { return api_1.inviteFormCollaborator; } });
6288
+ Object.defineProperty(exports$1, "pollForCompletion", { enumerable: true, get: function () { return api_1.pollForCompletion; } });
6289
+ Object.defineProperty(exports$1, "sendEmail", { enumerable: true, get: function () { return api_1.sendEmail; } });
6290
+ var utils_1 = requireUtils();
6291
+ Object.defineProperty(exports$1, "apiFetch", { enumerable: true, get: function () { return utils_1.apiFetch; } });
6292
+ Object.defineProperty(exports$1, "checkResponseSuccess", { enumerable: true, get: function () { return utils_1.checkResponseSuccess; } });
6293
+ Object.defineProperty(exports$1, "createHttpHelpers", { enumerable: true, get: function () { return utils_1.createHttpHelpers; } });
6294
+ Object.defineProperty(exports$1, "getApiUrl", { enumerable: true, get: function () { return utils_1.getApiUrl; } });
6295
+ Object.defineProperty(exports$1, "getStaticUrl", { enumerable: true, get: function () { return utils_1.getStaticUrl; } });
6296
+ Object.defineProperty(exports$1, "getCdnUrl", { enumerable: true, get: function () { return utils_1.getCdnUrl; } });
6297
+ Object.defineProperty(exports$1, "getS3Url", { enumerable: true, get: function () { return utils_1.getS3Url; } });
6298
+ var error_1 = requireError();
6299
+ Object.defineProperty(exports$1, "FetchError", { enumerable: true, get: function () { return error_1.FetchError; } });
6300
+ Object.defineProperty(exports$1, "parseAPIError", { enumerable: true, get: function () { return error_1.parseAPIError; } });
6301
+ var setup_1 = requireSetup();
6302
+ Object.defineProperty(exports$1, "setEnvironment", { enumerable: true, get: function () { return setup_1.setEnvironment; } });
6303
+ } (dist$2));
6304
+ return dist$2;
6305
+ }
6306
+
6307
+ var distExports$2 = requireDist$2();
6308
+
6309
+ var SDKKeyError = /** @class */ (function (_super) {
6310
+ __extends(SDKKeyError, _super);
6311
+ function SDKKeyError(message) {
6312
+ if (message === void 0) { message = 'Invalid SDK Key'; }
6313
+ var _this = _super.call(this, message) || this;
6314
+ _this.name = 'SDKKeyError';
6315
+ return _this;
6316
+ }
6317
+ return SDKKeyError;
6318
+ }(Error));
6319
+ var UserIdError = /** @class */ (function (_super) {
6320
+ __extends(UserIdError, _super);
6321
+ function UserIdError() {
6322
+ var _this = _super.call(this, 'Invalid User ID') || this;
6323
+ _this.name = 'UserIdError';
6324
+ return _this;
6325
+ }
6326
+ return UserIdError;
6327
+ }(Error));
6328
+ var handleCustomScriptError = function (e) {
6329
+ var _a, _b;
6330
+ var errorReason = (_a = e.reason) !== null && _a !== void 0 ? _a : e.error;
6331
+ // If stack is at 'eval', it is a logic rule error.
6332
+ // Note this only works for unhandledrejection events, not error events.
6333
+ console.warn('Error caught in custom HTML. Error Message: ', (_b = errorReason.message) !== null && _b !== void 0 ? _b : '');
6334
+ e.stopPropagation();
6335
+ e.preventDefault(); // Prevent the error in the log
6336
+ };
6337
+ var setCustomErrorHandler = function () {
6338
+ featheryWindow().addEventListener('error', handleCustomScriptError);
6339
+ };
6340
+ var removeCustomErrorHandler = function () {
6341
+ featheryWindow().removeEventListener('error', handleCustomScriptError);
6342
+ };
6343
+
5903
6344
  var conflictAlertShown = false;
5904
6345
  function checkResponseSuccess(response) {
5905
6346
  return __awaiter$2(this, void 0, void 0, function () {
@@ -5928,7 +6369,7 @@ function checkResponseSuccess(response) {
5928
6369
  console.error(payload.toString());
5929
6370
  return [2 /*return*/];
5930
6371
  case 4: throw new SDKKeyError();
5931
- case 5: throw new FetchError("Can't find object");
6372
+ case 5: throw new distExports$2.FetchError("Can't find object");
5932
6373
  case 6:
5933
6374
  // prevent multiple 409s from displaying multiple alerts
5934
6375
  if (conflictAlertShown)
@@ -5939,8 +6380,8 @@ function checkResponseSuccess(response) {
5939
6380
  featheryWindow().alert('This form has been updated. Please fill it out again.');
5940
6381
  location.reload();
5941
6382
  return [2 /*return*/];
5942
- case 7: throw new FetchError('Internal server error');
5943
- case 8: throw new FetchError('Unknown error');
6383
+ case 7: throw new distExports$2.FetchError('Internal server error');
6384
+ case 8: throw new distExports$2.FetchError('Unknown error');
5944
6385
  }
5945
6386
  });
5946
6387
  });
@@ -6891,26 +7332,7 @@ var IntegrationClient = /** @class */ (function () {
6891
7332
  if (parseResponse === void 0) { parseResponse = true; }
6892
7333
  if (propagateNetworkErrors === void 0) { propagateNetworkErrors = false; }
6893
7334
  var sdkKey = initInfo().sdkKey;
6894
- options = options !== null && options !== void 0 ? options : {};
6895
- var headers = options.headers, otherOptions = __rest$1(options, ["headers"]);
6896
- options = exports.__assign({ cache: 'no-store',
6897
- // Write requests must succeed so data is tracked
6898
- keepalive: ['POST', 'PATCH', 'PUT'].includes(options.method), headers: exports.__assign({ Authorization: 'Token ' + sdkKey }, headers) }, otherOptions);
6899
- return fetch(url, options)
6900
- .then(function (response) { return __awaiter$2(_this, void 0, void 0, function () {
6901
- return __generator(this, function (_a) {
6902
- switch (_a.label) {
6903
- case 0:
6904
- if (!parseResponse) return [3 /*break*/, 2];
6905
- return [4 /*yield*/, checkResponseSuccess(response)];
6906
- case 1:
6907
- _a.sent();
6908
- _a.label = 2;
6909
- case 2: return [2 /*return*/, response];
6910
- }
6911
- });
6912
- }); })
6913
- .catch(function (e) {
7335
+ return distExports$2.apiFetch(sdkKey, url, options, parseResponse).catch(function (e) {
6914
7336
  var _a;
6915
7337
  // Ignore TypeErrors if form has redirected because `fetch` in
6916
7338
  // Safari will error after redirect
@@ -6941,7 +7363,7 @@ var IntegrationClient = /** @class */ (function () {
6941
7363
  payload = _a.sent();
6942
7364
  if ((res === null || res === void 0 ? void 0 : res.status) === 200)
6943
7365
  return [2 /*return*/, { token: payload.link_token }];
6944
- return [2 /*return*/, { err: parseError(payload) || 'Ran into an error' }];
7366
+ return [2 /*return*/, { err: distExports$2.parseAPIError(payload) || 'Ran into an error' }];
6945
7367
  }
6946
7368
  });
6947
7369
  });
@@ -7215,7 +7637,7 @@ var IntegrationClient = /** @class */ (function () {
7215
7637
  case 1: return [2 /*return*/, _c.sent()];
7216
7638
  case 2:
7217
7639
  _a = Error;
7218
- _b = parseError;
7640
+ _b = distExports$2.parseAPIError;
7219
7641
  return [4 /*yield*/, response.json()];
7220
7642
  case 3: throw _a.apply(void 0, [_b.apply(void 0, [_c.sent()])]);
7221
7643
  case 4: return [2 /*return*/];
@@ -7254,7 +7676,7 @@ var IntegrationClient = /** @class */ (function () {
7254
7676
  case 1: return [2 /*return*/, _c.sent()];
7255
7677
  case 2:
7256
7678
  _a = Error;
7257
- _b = parseError;
7679
+ _b = distExports$2.parseAPIError;
7258
7680
  return [4 /*yield*/, response.json()];
7259
7681
  case 3: throw _a.apply(void 0, [_b.apply(void 0, [_c.sent()])]);
7260
7682
  case 4: return [2 /*return*/];
@@ -7292,7 +7714,7 @@ var IntegrationClient = /** @class */ (function () {
7292
7714
  case 1: return [2 /*return*/, _c.sent()];
7293
7715
  case 2:
7294
7716
  _a = Error;
7295
- _b = parseError;
7717
+ _b = distExports$2.parseAPIError;
7296
7718
  return [4 /*yield*/, response.json()];
7297
7719
  case 3: throw _a.apply(void 0, [_b.apply(void 0, [_c.sent()])]);
7298
7720
  case 4: return [2 /*return*/];
@@ -7302,66 +7724,10 @@ var IntegrationClient = /** @class */ (function () {
7302
7724
  });
7303
7725
  });
7304
7726
  };
7305
- IntegrationClient.prototype.pollForCompletion = function (_a) {
7306
- var pollUrl = _a.pollUrl, checkInterval = _a.checkInterval, maxTime = _a.maxTime, onStatusUpdate = _a.onStatusUpdate, _b = _a.operationName, operationName = _b === void 0 ? 'Operation' : _b;
7307
- return __awaiter$2(this, void 0, void 0, function () {
7308
- var _this = this;
7309
- return __generator(this, function (_c) {
7310
- return [2 /*return*/, new Promise(function (resolve) {
7311
- var attempts = 0;
7312
- var maxAttempts = maxTime / checkInterval;
7313
- var checkCompletion = function () { return __awaiter$2(_this, void 0, void 0, function () {
7314
- var response, data, message, message;
7315
- return __generator(this, function (_a) {
7316
- switch (_a.label) {
7317
- case 0: return [4 /*yield*/, this._fetch(pollUrl, {}, false)];
7318
- case 1:
7319
- response = _a.sent();
7320
- if (!response)
7321
- return [2 /*return*/];
7322
- return [4 /*yield*/, response.json()];
7323
- case 2:
7324
- data = _a.sent();
7325
- if (onStatusUpdate) {
7326
- onStatusUpdate(data);
7327
- }
7328
- if (response.ok) {
7329
- if (data.status === 'complete') {
7330
- return [2 /*return*/, resolve(data)];
7331
- }
7332
- else {
7333
- attempts += 1;
7334
- if (attempts < maxAttempts) {
7335
- setTimeout(checkCompletion, checkInterval);
7336
- }
7337
- else {
7338
- message = "".concat(operationName, " took too long...");
7339
- console.error(message);
7340
- return [2 /*return*/, resolve({ status: 'error', message: message })];
7341
- }
7342
- }
7343
- }
7344
- else {
7345
- message = parseError(data);
7346
- console.error(message);
7347
- if (onStatusUpdate) {
7348
- onStatusUpdate({ error: message });
7349
- }
7350
- return [2 /*return*/, resolve({ status: 'error', message: message })];
7351
- }
7352
- return [2 /*return*/];
7353
- }
7354
- });
7355
- }); };
7356
- setTimeout(checkCompletion, checkInterval);
7357
- })];
7358
- });
7359
- });
7360
- };
7361
7727
  IntegrationClient.prototype.generateEnvelopes = function (action) {
7362
7728
  var _this = this;
7363
7729
  var _a, _b, _c;
7364
- var userId = initInfo().userId;
7730
+ var _d = initInfo(), userId = _d.userId, sdkKey = _d.sdkKey;
7365
7731
  var signer = exports.fieldValues[action.envelope_signer_field_key];
7366
7732
  var runAsync = (_a = action.run_async) !== null && _a !== void 0 ? _a : true;
7367
7733
  var documents = (_b = action.documents) !== null && _b !== void 0 ? _b : [];
@@ -7392,14 +7758,9 @@ var IntegrationClient = /** @class */ (function () {
7392
7758
  if (!runAsync || data.files)
7393
7759
  return [2 /*return*/, data];
7394
7760
  pollUrl = "".concat(API_URL, "document/form/generate/poll/?fid=").concat(userId, "&dids=").concat(documents);
7395
- return [4 /*yield*/, this.pollForCompletion({
7396
- pollUrl: pollUrl,
7397
- checkInterval: this.ENVELOPE_CHECK_INTERVAL,
7398
- maxTime: this.ENVELOPE_MAX_TIME,
7399
- operationName: 'Envelope generation'
7400
- })];
7761
+ return [4 /*yield*/, distExports$2.pollForCompletion(sdkKey, pollUrl, this.ENVELOPE_CHECK_INTERVAL, this.ENVELOPE_MAX_TIME, 'Envelope generation')];
7401
7762
  case 2: return [2 /*return*/, _a.sent()];
7402
- case 3: throw Error(parseError(data));
7763
+ case 3: throw Error(distExports$2.parseAPIError(data));
7403
7764
  case 4: return [2 /*return*/];
7404
7765
  }
7405
7766
  });
@@ -7443,7 +7804,7 @@ var IntegrationClient = /** @class */ (function () {
7443
7804
  case 1: return [2 /*return*/, _c.sent()];
7444
7805
  case 2:
7445
7806
  _a = Error;
7446
- _b = parseError;
7807
+ _b = distExports$2.parseAPIError;
7447
7808
  return [4 /*yield*/, response.json()];
7448
7809
  case 3: throw _a.apply(void 0, [_b.apply(void 0, [_c.sent()])]);
7449
7810
  case 4: return [2 /*return*/];
@@ -7465,7 +7826,7 @@ var IntegrationClient = /** @class */ (function () {
7465
7826
  if (!((response === null || response === void 0 ? void 0 : response.status) === 400)) return [3 /*break*/, 3];
7466
7827
  _a = resolve;
7467
7828
  _c = {};
7468
- _b = parseError;
7829
+ _b = distExports$2.parseAPIError;
7469
7830
  return [4 /*yield*/, response.json()];
7470
7831
  case 2: return [2 /*return*/, _a.apply(void 0, [(_c.error = _b.apply(void 0, [_d.sent()]), _c)])];
7471
7832
  case 3:
@@ -7547,7 +7908,7 @@ var IntegrationClient = /** @class */ (function () {
7547
7908
  return [4 /*yield*/, response.json()];
7548
7909
  case 2:
7549
7910
  errorData = _a.sent();
7550
- return [2 /*return*/, resolve({ error: parseError(errorData) })];
7911
+ return [2 /*return*/, resolve({ error: distExports$2.parseAPIError(errorData) })];
7551
7912
  case 3:
7552
7913
  if (!((response === null || response === void 0 ? void 0 : response.status) === 200)) return [3 /*break*/, 5];
7553
7914
  return [4 /*yield*/, response.json()];
@@ -7642,7 +8003,7 @@ var IntegrationClient = /** @class */ (function () {
7642
8003
  return [2 /*return*/, finalStatus];
7643
8004
  case 6:
7644
8005
  _b = Error;
7645
- _c = parseError;
8006
+ _c = distExports$2.parseAPIError;
7646
8007
  return [4 /*yield*/, finalResponse.json()];
7647
8008
  case 7: throw _b.apply(void 0, [_c.apply(void 0, [_d.sent()])]);
7648
8009
  case 8: return [2 /*return*/, false];
@@ -7731,7 +8092,7 @@ var IntegrationClient = /** @class */ (function () {
7731
8092
  return [2 /*return*/, otpStatus];
7732
8093
  case 3:
7733
8094
  _a = Error;
7734
- _b = parseError;
8095
+ _b = distExports$2.parseAPIError;
7735
8096
  return [4 /*yield*/, response.json()];
7736
8097
  case 4: throw _a.apply(void 0, [_b.apply(void 0, [_c.sent()])]);
7737
8098
  case 5: return [2 /*return*/];
@@ -7741,24 +8102,14 @@ var IntegrationClient = /** @class */ (function () {
7741
8102
  };
7742
8103
  IntegrationClient.prototype.sendEmail = function (templateId) {
7743
8104
  return __awaiter$2(this, void 0, void 0, function () {
7744
- var userId, url, options;
7745
- return __generator(this, function (_a) {
7746
- switch (_a.label) {
8105
+ var _a, userId, sdkKey;
8106
+ return __generator(this, function (_b) {
8107
+ switch (_b.label) {
7747
8108
  case 0:
7748
- userId = initInfo().userId;
7749
- url = "".concat(API_URL, "email/logic-rule/");
7750
- options = {
7751
- headers: { 'Content-Type': 'application/json' },
7752
- method: 'POST',
7753
- body: JSON.stringify({
7754
- template_id: templateId,
7755
- form_key: this.formKey,
7756
- fuser_key: userId
7757
- })
7758
- };
7759
- return [4 /*yield*/, this._fetch(url, options, false)];
8109
+ _a = initInfo(), userId = _a.userId, sdkKey = _a.sdkKey;
8110
+ return [4 /*yield*/, distExports$2.sendEmail(sdkKey, userId !== null && userId !== void 0 ? userId : '', this.formKey, templateId)];
7760
8111
  case 1:
7761
- _a.sent();
8112
+ _b.sent();
7762
8113
  return [2 /*return*/];
7763
8114
  }
7764
8115
  });
@@ -7900,43 +8251,16 @@ var IntegrationClient = /** @class */ (function () {
7900
8251
  });
7901
8252
  };
7902
8253
  IntegrationClient.prototype.customRolloutAction = function (automationIds, options) {
7903
- var _a, _b, _c;
7904
8254
  return __awaiter$2(this, void 0, void 0, function () {
7905
- var userId, url, reqOptions, res;
7906
- var _d, _e;
7907
- return __generator(this, function (_f) {
7908
- switch (_f.label) {
8255
+ var _a, userId, sdkKey;
8256
+ return __generator(this, function (_b) {
8257
+ switch (_b.label) {
7909
8258
  case 0:
7910
- userId = initInfo().userId;
7911
- url = "".concat(API_URL, "rollout/custom-trigger/");
7912
- if (typeof automationIds === 'string')
7913
- automationIds = [automationIds];
7914
- reqOptions = {
7915
- headers: { 'Content-Type': 'application/json' },
7916
- method: 'POST',
7917
- body: JSON.stringify({
7918
- automation_ids: automationIds,
7919
- sync: (_a = options.waitForCompletion) !== null && _a !== void 0 ? _a : true,
7920
- multiple: (_b = options.multiple) !== null && _b !== void 0 ? _b : false,
7921
- payload: exports.fieldValues,
7922
- form_key: this.formKey,
7923
- fuser_key: userId
7924
- })
7925
- };
8259
+ _a = initInfo(), userId = _a.userId, sdkKey = _a.sdkKey;
7926
8260
  return [4 /*yield*/, this.submitQueue];
7927
8261
  case 1:
7928
- _f.sent();
7929
- return [4 /*yield*/, this._fetch(url, reqOptions, false)];
7930
- case 2:
7931
- res = _f.sent();
7932
- if (!(res && res.status === 200)) return [3 /*break*/, 4];
7933
- _d = { ok: true };
7934
- return [4 /*yield*/, res.json()];
7935
- case 3: return [2 /*return*/, (_d.payload = _f.sent(), _d)];
7936
- case 4:
7937
- _e = { ok: false };
7938
- return [4 /*yield*/, (res === null || res === void 0 ? void 0 : res.text())];
7939
- case 5: return [2 /*return*/, (_e.error = (_c = (_f.sent())) !== null && _c !== void 0 ? _c : '', _e)];
8262
+ _b.sent();
8263
+ return [2 /*return*/, distExports$2.customRolloutAction(sdkKey, automationIds, this.formKey, exports.fieldValues, options, userId)];
7940
8264
  }
7941
8265
  });
7942
8266
  });
@@ -42275,66 +42599,28 @@ function loadQRScanner() {
42275
42599
  exports.qrPromise = dynamicImport(QR_SCANNER_LIB_URL);
42276
42600
  }
42277
42601
 
42278
- var API_URL_OPTIONS = {
42279
- local: 'http://localhost:8006/api/',
42280
- staging: 'https://staging.feathery.io/api/',
42281
- production: 'https://api.feathery.io/api/',
42282
- productionAU: 'https://api-au.feathery.io/api/',
42283
- productionEU: 'https://api-eu.feathery.io/api/',
42284
- productionCA: 'https://api-ca.feathery.io/api/'
42285
- };
42286
- var CDN_URL_OPTIONS = {
42287
- local: 'http://localhost:8006/api/',
42288
- staging: 'https://staging.feathery.io/api/',
42289
- production: 'https://cdn.feathery.io/api/',
42290
- productionAU: 'https://cdn-au.feathery.io/api/',
42291
- productionEU: 'https://cdn-eu.feathery.io/api/',
42292
- productionCA: 'https://cdn-ca.feathery.io/api/'
42293
- };
42294
- var STATIC_URL_OPTIONS = {
42295
- local: 'http://localhost:8006/api/',
42296
- staging: 'https://staging.feathery.io/api/',
42297
- production: 'https://api-static-2.feathery.io/api/',
42298
- productionAU: 'https://api-au.feathery.io/api/',
42299
- productionEU: 'https://api-eu.feathery.io/api/',
42300
- productionCA: 'https://api-ca.feathery.io/api/'
42301
- };
42302
- var S3_URL_OPTIONS = {
42303
- local: 'http://localhost:8006',
42304
- staging: 's3.us-west-1.amazonaws.com',
42305
- production: 's3.us-west-1.amazonaws.com',
42306
- productionAU: 's3.ap-southeast-2.amazonaws.com',
42307
- productionEU: 's3.eu-west-1.amazonaws.com',
42308
- productionCA: 's3.ca-central-1.amazonaws.com'
42309
- };
42310
- var environment = 'production';
42602
+ distExports$2.setEnvironment('production');
42311
42603
  try {
42312
- environment = (process.env.BACKEND_ENV || 'production');
42604
+ distExports$2.setEnvironment((process.env.BACKEND_ENV || 'production'));
42313
42605
  }
42314
42606
  catch (e) { } // process.env won't exist in production build
42315
- var API_URL = API_URL_OPTIONS[environment];
42316
- var CDN_URL = CDN_URL_OPTIONS[environment];
42317
- var STATIC_URL = STATIC_URL_OPTIONS[environment];
42318
- var S3_URL = S3_URL_OPTIONS[environment];
42607
+ var API_URL = distExports$2.getApiUrl();
42608
+ var CDN_URL = distExports$2.getCdnUrl();
42609
+ var STATIC_URL = distExports$2.getStaticUrl();
42610
+ var S3_URL = distExports$2.getS3Url();
42319
42611
  var updateRegionApiUrls = function (region) {
42320
- if (region === 'au') {
42321
- CDN_URL = CDN_URL_OPTIONS.productionAU;
42322
- API_URL = API_URL_OPTIONS.productionAU;
42323
- STATIC_URL = STATIC_URL_OPTIONS.productionAU;
42324
- S3_URL = S3_URL_OPTIONS.productionAU;
42325
- }
42326
- else if (region === 'eu') {
42327
- CDN_URL = CDN_URL_OPTIONS.productionEU;
42328
- API_URL = API_URL_OPTIONS.productionEU;
42329
- STATIC_URL = STATIC_URL_OPTIONS.productionEU;
42330
- S3_URL = S3_URL_OPTIONS.productionEU;
42331
- }
42332
- else if (region === 'ca') {
42333
- CDN_URL = CDN_URL_OPTIONS.productionCA;
42334
- API_URL = API_URL_OPTIONS.productionCA;
42335
- STATIC_URL = STATIC_URL_OPTIONS.productionCA;
42336
- S3_URL = S3_URL_OPTIONS.productionCA;
42337
- }
42612
+ var environmentMap = {
42613
+ au: 'productionAU',
42614
+ ca: 'productionCA',
42615
+ eu: 'productionEU'
42616
+ };
42617
+ if (!environmentMap[region])
42618
+ return;
42619
+ distExports$2.setEnvironment(environmentMap[region]);
42620
+ API_URL = distExports$2.getApiUrl();
42621
+ CDN_URL = distExports$2.getCdnUrl();
42622
+ STATIC_URL = distExports$2.getStaticUrl();
42623
+ S3_URL = distExports$2.getS3Url();
42338
42624
  };
42339
42625
  /**
42340
42626
  * The number of milliseconds waited until another submitCustom call
@@ -43142,39 +43428,6 @@ var FeatheryClient = /** @class */ (function (_super) {
43142
43428
  });
43143
43429
  });
43144
43430
  };
43145
- // Logic custom APIs
43146
- FeatheryClient.prototype.runCustomRequest = function (payload, fieldValues) {
43147
- var _this = this;
43148
- if (fieldValues === void 0) { fieldValues = null; }
43149
- var userId = initInfo().userId;
43150
- var data = {
43151
- fuser_key: userId,
43152
- form_key: this.formKey,
43153
- name: payload.name,
43154
- method: payload.method,
43155
- url: payload.url,
43156
- user_data: payload.data,
43157
- headers: payload.headers
43158
- };
43159
- if (fieldValues) {
43160
- data.field_values = fieldValues;
43161
- }
43162
- var url = "".concat(STATIC_URL, "custom_request/");
43163
- var options = {
43164
- headers: { 'Content-Type': 'application/json' },
43165
- method: 'POST',
43166
- body: JSON.stringify(data),
43167
- keepalive: false
43168
- };
43169
- var run = function () {
43170
- return _this._fetch(url, options).then(function (response) {
43171
- return response ? response.json() : Promise.resolve();
43172
- });
43173
- };
43174
- if (payload.method === 'GET')
43175
- return run();
43176
- return this.offlineRequestHandler.runOrSaveRequest(run, url, options, 'customRequest');
43177
- };
43178
43431
  FeatheryClient.prototype.runServerSideLogicRule = function (id) {
43179
43432
  var userId = initInfo().userId;
43180
43433
  var data = {
@@ -43197,54 +43450,13 @@ var FeatheryClient = /** @class */ (function (_super) {
43197
43450
  FeatheryClient.prototype.runAIExtraction = function (_a) {
43198
43451
  var extractionId = _a.extractionId, options = _a.options, pages = _a.pages, setPollFuserData = _a.setPollFuserData, onStatusUpdate = _a.onStatusUpdate;
43199
43452
  return __awaiter$2(this, void 0, void 0, function () {
43200
- var runAsync, variantId, meetingUrl, _b, userId, collaboratorId, data, res, response, pollUrl;
43453
+ var _b, userId, sdkKey, collaboratorId;
43201
43454
  return __generator(this, function (_c) {
43202
43455
  switch (_c.label) {
43203
43456
  case 0:
43204
- if (typeof options === 'object') {
43205
- runAsync = !options.waitForCompletion;
43206
- pages = options.pages;
43207
- variantId = options.variantId;
43208
- meetingUrl = options.meetingUrl || undefined;
43209
- }
43210
- else {
43211
- // deprecated usage, options is waitForCompletion
43212
- runAsync = !options;
43213
- }
43214
- _b = initInfo(), userId = _b.userId, collaboratorId = _b.collaboratorId;
43215
- data = {
43216
- fuser_key: userId,
43217
- collaborator_user: collaboratorId,
43218
- extraction_id: extractionId,
43219
- extraction_variant_id: variantId,
43220
- pages: pages,
43221
- meeting_url: meetingUrl
43222
- };
43223
- return [4 /*yield*/, this._fetch("".concat(STATIC_URL, "ai/vision/"), {
43224
- headers: { 'Content-Type': 'application/json' },
43225
- method: 'POST',
43226
- body: JSON.stringify(data)
43227
- })];
43228
- case 1:
43229
- res = _c.sent();
43230
- return [4 /*yield*/, (res === null || res === void 0 ? void 0 : res.json())];
43231
- case 2:
43232
- response = _c.sent();
43233
- if (runAsync)
43234
- return [2 /*return*/, {}];
43235
- if (response.meeting_info) {
43236
- setPollFuserData(true);
43237
- return [2 /*return*/, {}];
43238
- }
43239
- pollUrl = "".concat(STATIC_URL, "ai/vision/completion/?fid=").concat(userId, "&eid=").concat(extractionId, "&evid=").concat(variantId !== null && variantId !== void 0 ? variantId : '');
43240
- return [4 /*yield*/, this.pollForCompletion({
43241
- pollUrl: pollUrl,
43242
- checkInterval: this.AI_CHECK_INTERVAL,
43243
- maxTime: this.AI_MAX_TIME,
43244
- onStatusUpdate: onStatusUpdate,
43245
- operationName: 'Extraction'
43246
- })];
43247
- case 3: return [2 /*return*/, _c.sent()];
43457
+ _b = initInfo(), userId = _b.userId, sdkKey = _b.sdkKey, collaboratorId = _b.collaboratorId;
43458
+ return [4 /*yield*/, distExports$2.extractAIDocument(sdkKey, extractionId, options, userId, pages, undefined, collaboratorId, function () { return setPollFuserData === null || setPollFuserData === void 0 ? void 0 : setPollFuserData(true); }, onStatusUpdate)];
43459
+ case 1: return [2 /*return*/, _c.sent()];
43248
43460
  }
43249
43461
  });
43250
43462
  });
@@ -43294,41 +43506,20 @@ var FeatheryClient = /** @class */ (function (_super) {
43294
43506
  };
43295
43507
  FeatheryClient.prototype.inviteCollaborator = function (usersGroups, templateId) {
43296
43508
  return __awaiter$2(this, void 0, void 0, function () {
43297
- var _a, userId, collaboratorId, data, url;
43298
- var _this = this;
43509
+ var _a, userId, collaboratorId, sdkKey, res;
43299
43510
  return __generator(this, function (_b) {
43300
- _a = initInfo(), userId = _a.userId, collaboratorId = _a.collaboratorId;
43301
- data = {
43302
- form_key: this.formKey,
43303
- fuser_key: userId,
43304
- users_groups: usersGroups,
43305
- template_id: templateId
43306
- };
43307
- if (collaboratorId)
43308
- data.collaborator_user = collaboratorId;
43309
- url = "".concat(API_URL, "collaborator/invite/");
43310
- return [2 /*return*/, this._fetch(url, {
43311
- headers: { 'Content-Type': 'application/json' },
43312
- method: 'POST',
43313
- body: JSON.stringify(data)
43314
- }, false).then(function (response) { return __awaiter$2(_this, void 0, void 0, function () {
43315
- var _a, _b;
43316
- return __generator(this, function (_c) {
43317
- switch (_c.label) {
43318
- case 0:
43319
- if (!response) return [3 /*break*/, 4];
43320
- if (!response.ok) return [3 /*break*/, 2];
43321
- return [4 /*yield*/, response.json()];
43322
- case 1: return [2 /*return*/, _c.sent()];
43323
- case 2:
43324
- _a = Error;
43325
- _b = parseError;
43326
- return [4 /*yield*/, response.json()];
43327
- case 3: throw _a.apply(void 0, [_b.apply(void 0, [_c.sent()])]);
43328
- case 4: return [2 /*return*/];
43329
- }
43330
- });
43331
- }); })];
43511
+ switch (_b.label) {
43512
+ case 0:
43513
+ _a = initInfo(), userId = _a.userId, collaboratorId = _a.collaboratorId, sdkKey = _a.sdkKey;
43514
+ return [4 /*yield*/, distExports$2.inviteFormCollaborator(sdkKey, this.formKey, templateId, usersGroups, userId, collaboratorId)];
43515
+ case 1:
43516
+ res = _b.sent();
43517
+ if (res && res.ok) {
43518
+ return [2 /*return*/, res];
43519
+ }
43520
+ else
43521
+ throw Error(distExports$2.parseAPIError(res));
43522
+ }
43332
43523
  });
43333
43524
  });
43334
43525
  };
@@ -43362,7 +43553,7 @@ var FeatheryClient = /** @class */ (function (_super) {
43362
43553
  case 1: return [2 /*return*/, _c.sent()];
43363
43554
  case 2:
43364
43555
  _a = Error;
43365
- _b = parseError;
43556
+ _b = distExports$2.parseAPIError;
43366
43557
  return [4 /*yield*/, response.json()];
43367
43558
  case 3: throw _a.apply(void 0, [_b.apply(void 0, [_c.sent()])]);
43368
43559
  case 4: return [2 /*return*/];
@@ -43399,7 +43590,7 @@ var FeatheryClient = /** @class */ (function (_super) {
43399
43590
  case 1: return [2 /*return*/, _c.sent()];
43400
43591
  case 2:
43401
43592
  _a = Error;
43402
- _b = parseError;
43593
+ _b = distExports$2.parseAPIError;
43403
43594
  return [4 /*yield*/, response.json()];
43404
43595
  case 3: throw _a.apply(void 0, [_b.apply(void 0, [_c.sent()])]);
43405
43596
  case 4: return [2 /*return*/];
@@ -43445,7 +43636,7 @@ var FeatheryClient = /** @class */ (function (_super) {
43445
43636
  case 3: return [2 /*return*/, { files: files }];
43446
43637
  case 4:
43447
43638
  _a = Error;
43448
- _b = parseError;
43639
+ _b = distExports$2.parseAPIError;
43449
43640
  return [4 /*yield*/, response.json()];
43450
43641
  case 5: throw _a.apply(void 0, [_b.apply(void 0, [_c.sent()])]);
43451
43642
  case 6: return [2 /*return*/];
@@ -43561,9 +43752,9 @@ function init(sdkKey, options) {
43561
43752
  if (runningInClient()) {
43562
43753
  // Dynamically load libraries that must be client side
43563
43754
  global.scriptjsLoadPromise = Promise.resolve().then(function () { return require(
43564
- /* webpackChunkName: "scriptjs" */ './fthry_script.BR1PC2YO.js'); }).then(function (n) { return n.script; });
43755
+ /* webpackChunkName: "scriptjs" */ './fthry_script.rT4Hk6hO.js'); }).then(function (n) { return n.script; });
43565
43756
  global.webfontloaderPromise = Promise.resolve().then(function () { return require(
43566
- /* webpackChunkName: "webfontloader" */ './fthry_webfontloader.BxRwLQqw.js'); }).then(function (n) { return n.webfontloader; });
43757
+ /* webpackChunkName: "webfontloader" */ './fthry_webfontloader.BpYY6eaS.js'); }).then(function (n) { return n.webfontloader; });
43567
43758
  // Client-side tracking logic
43568
43759
  if (initState.userTracking === 'cookie') {
43569
43760
  var cookieKey = "feathery-user-id-".concat(sdkKey);
@@ -43709,7 +43900,7 @@ function getFieldValues() {
43709
43900
  return exports.__assign({}, exports.fieldValues);
43710
43901
  }
43711
43902
  function logFeatheryBadge() {
43712
- console.log('%c Feathery %c v' + "2.11.2" + ' ', // replaced with real version during build
43903
+ console.log('%c Feathery %c v' + "2.12.0" + ' ', // replaced with real version during build
43713
43904
  'background: #e2626e; color: white; padding: 2px 6px; border-radius: 3px 0 0 3px; font-weight: bold;', 'background: #fce7e9; color: #c5495a; padding: 2px 6px; border-radius: 0 3px 3px 0;');
43714
43905
  }
43715
43906
 
@@ -44056,63 +44247,13 @@ function isElementInViewport(el) {
44056
44247
  rect.right <= width);
44057
44248
  }
44058
44249
  function httpHelpers(client, connectorFields) {
44059
- var _this = this;
44060
44250
  if (connectorFields === void 0) { connectorFields = []; }
44061
- var helpers = {};
44062
- [
44063
- 'GET',
44064
- 'get',
44065
- 'PATCH',
44066
- 'patch',
44067
- 'POST',
44068
- 'post',
44069
- 'PUT',
44070
- 'put',
44071
- 'DELETE',
44072
- 'delete'
44073
- ].forEach(function (method) {
44074
- return (helpers[method] = function (url, data, headers) { return __awaiter$2(_this, void 0, void 0, function () {
44075
- var response;
44076
- return __generator(this, function (_a) {
44077
- switch (_a.label) {
44078
- case 0:
44079
- if (!url)
44080
- return [2 /*return*/, {}];
44081
- return [4 /*yield*/, client.runCustomRequest({ method: method.toUpperCase(), url: url, data: data, headers: headers }, getConnectorFieldValues(connectorFields))];
44082
- case 1:
44083
- response = _a.sent();
44084
- return [2 /*return*/, {
44085
- data: response.data,
44086
- statusCode: response.status_code,
44087
- // status_code for backwards compatibility
44088
- status_code: response.statusCode
44089
- }];
44090
- }
44091
- });
44092
- }); });
44093
- });
44094
- helpers.connect = function (name, data, headers) { return __awaiter$2(_this, void 0, void 0, function () {
44095
- var response;
44096
- return __generator(this, function (_a) {
44097
- switch (_a.label) {
44098
- case 0:
44099
- if (!name)
44100
- return [2 /*return*/, {}];
44101
- return [4 /*yield*/, client.runCustomRequest({ name: name, data: data, headers: headers }, getConnectorFieldValues(connectorFields))];
44102
- case 1:
44103
- response = _a.sent();
44104
- if (response === null || response === void 0 ? void 0 : response.field_values)
44105
- // skip server submit when setting field values here
44106
- // because these values were just created on the server
44107
- setFieldValues(response === null || response === void 0 ? void 0 : response.field_values, true, true);
44108
- return [2 /*return*/, {
44109
- data: response.data,
44110
- statusCode: response.status_code
44111
- }];
44112
- }
44113
- });
44114
- }); };
44115
- return helpers;
44251
+ var _a = initInfo(), sdkKey = _a.sdkKey, userId = _a.userId;
44252
+ return distExports$2.createHttpHelpers(sdkKey, client.formKey, userId, getConnectorFieldValues(connectorFields), function (fieldValues) {
44253
+ // skip server submit when setting field values here
44254
+ // because these values were just created on the server
44255
+ setFieldValues(fieldValues, true, true);
44256
+ }, client.offlineRequestHandler.runOrSaveRequest.bind(client.offlineRequestHandler));
44116
44257
  }
44117
44258
 
44118
44259
  function runningInClient() {
@@ -45181,39 +45322,39 @@ breakpoint) {
45181
45322
  return styles.getTarget('inner-container', undefined, viewport === 'mobile');
45182
45323
  };
45183
45324
 
45184
- var AddressLine1 = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "AddressField" */ './fthry_index.uPlANshe.js'); }); });
45185
- var ButtonGroupField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "ButtonGroupField" */ './fthry_index.CVdIUnnS.js'); }); });
45186
- var CheckboxField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "CheckboxField" */ './fthry_index.Biaf9DMR.js'); }); });
45325
+ var AddressLine1 = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "AddressField" */ './fthry_index.CcgrLEuS.js'); }); });
45326
+ var ButtonGroupField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "ButtonGroupField" */ './fthry_index.BpPVWOqt.js'); }); });
45327
+ var CheckboxField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "CheckboxField" */ './fthry_index.B8m8NcYS.js'); }); });
45187
45328
  var CheckboxGroupField = React.lazy(function () {
45188
- return Promise.resolve().then(function () { return require(/* webpackChunkName: "CheckboxGroupField" */ './fthry_index.Cl0pC-iC.js'); });
45329
+ return Promise.resolve().then(function () { return require(/* webpackChunkName: "CheckboxGroupField" */ './fthry_index.e1NDYANz.js'); });
45189
45330
  });
45190
- var ColorPickerField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "ColorPickerField" */ './fthry_index.BIDjlZK9.js'); }); });
45191
- var CustomField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "CustomField" */ './fthry_index.XwO_Rbt1.js'); }); });
45331
+ var ColorPickerField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "ColorPickerField" */ './fthry_index.CpHzsH9n.js'); }); });
45332
+ var CustomField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "CustomField" */ './fthry_index.DBr9A2ZJ.js'); }); });
45192
45333
  var DateSelectorField = React.lazy(function () {
45193
- return Promise.resolve().then(function () { return require(/* webpackChunkName: "DateSelectorField" */ './fthry_index.C-CXGg0X.js'); });
45334
+ return Promise.resolve().then(function () { return require(/* webpackChunkName: "DateSelectorField" */ './fthry_index.CxZygKnY.js'); });
45194
45335
  });
45195
- var DropdownField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "DropdownField" */ './fthry_index.DKwYIEay.js'); }); });
45336
+ var DropdownField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "DropdownField" */ './fthry_index.iaUi_vwz.js'); }); });
45196
45337
  var DropdownMultiField = React.lazy(function () {
45197
- return Promise.resolve().then(function () { return require(/* webpackChunkName: "DropdownMultiField" */ './fthry_index.DfjbwYs8.js'); });
45338
+ return Promise.resolve().then(function () { return require(/* webpackChunkName: "DropdownMultiField" */ './fthry_index.CuICsq3u.js'); });
45198
45339
  });
45199
- var FileUploadField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "FileUploadField" */ './fthry_index.Dg3FFh_g.js'); }); });
45200
- var MatrixField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "MatrixField" */ './fthry_index.5Pl_oKxb.js'); }); });
45201
- var PasswordField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "PasswordField" */ './fthry_index.lBGOIoJv.js'); }); });
45340
+ var FileUploadField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "FileUploadField" */ './fthry_index.DM58Cupo.js'); }); });
45341
+ var MatrixField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "MatrixField" */ './fthry_index.CRJbToBF.js'); }); });
45342
+ var PasswordField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "PasswordField" */ './fthry_index.CVGTkuBu.js'); }); });
45202
45343
  var PaymentMethodField = React.lazy(function () {
45203
- return Promise.resolve().then(function () { return require(/* webpackChunkName: "PaymentMethodField" */ './fthry_PaymentMethodField.D0YALHBL.js'); });
45344
+ return Promise.resolve().then(function () { return require(/* webpackChunkName: "PaymentMethodField" */ './fthry_PaymentMethodField.ClmgrMDW.js'); });
45204
45345
  });
45205
- var PhoneField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "PhoneField" */ './fthry_index.hetQ4hFA.js'); }); });
45206
- var PinInputField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "PinInputField" */ './fthry_index.DPJLojch.js'); }); });
45207
- var QRScanner = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "QRScanner" */ './fthry_index.CaFboSVZ.js'); }); });
45346
+ var PhoneField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "PhoneField" */ './fthry_index.Ce9wiHSK.js'); }); });
45347
+ var PinInputField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "PinInputField" */ './fthry_index.x3WPDwFM.js'); }); });
45348
+ var QRScanner = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "QRScanner" */ './fthry_index.CX0W0jE1.js'); }); });
45208
45349
  var RadioButtonGroupField = React.lazy(function () {
45209
45350
  return Promise.resolve().then(function () { return require(
45210
- /* webpackChunkName: "RadioButtonGroupField" */ './fthry_index._0ok1zlZ.js'); });
45351
+ /* webpackChunkName: "RadioButtonGroupField" */ './fthry_index.BrzbrcQa.js'); });
45211
45352
  });
45212
- var RatingField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "RatingField" */ './fthry_index.BVctbQwI.js'); }); });
45213
- var SignatureField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "SignatureField" */ './fthry_index.DhP_ifSD.js'); }); });
45214
- var SliderField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "SliderField" */ './fthry_index.nvFgoNpW.js'); }); });
45215
- var TextField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "TextField" */ './fthry_index.6K3SolcM.js'); }); });
45216
- var TextArea = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "TextArea" */ './fthry_index.ObOAUNgg.js'); }); });
45353
+ var RatingField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "RatingField" */ './fthry_index.CpIBnF75.js'); }); });
45354
+ var SignatureField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "SignatureField" */ './fthry_index.CmHODiIC.js'); }); });
45355
+ var SliderField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "SliderField" */ './fthry_index.C8jtezTq.js'); }); });
45356
+ var TextField = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "TextField" */ './fthry_index.D94gkYbC.js'); }); });
45357
+ var TextArea = React.lazy(function () { return Promise.resolve().then(function () { return require(/* webpackChunkName: "TextArea" */ './fthry_index.CdGAa2gf.js'); }); });
45217
45358
  var Fields = {
45218
45359
  AddressLine1: AddressLine1,
45219
45360
  ButtonGroupField: ButtonGroupField,