@feathery/react 2.40.1 → 2.41.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 (104) hide show
  1. package/cjs/Form/grid/Element/index.d.ts.map +1 -1
  2. package/cjs/Form/index.d.ts.map +1 -1
  3. package/cjs/assistant/AssistantChat.d.ts.map +1 -1
  4. package/cjs/assistant/ToolStatus.d.ts.map +1 -1
  5. package/cjs/elements/basic/ProgressBarElement/components/StepperBar.d.ts +2 -1
  6. package/cjs/elements/basic/ProgressBarElement/components/StepperBar.d.ts.map +1 -1
  7. package/cjs/elements/basic/ProgressBarElement/index.d.ts +1 -1
  8. package/cjs/elements/basic/ProgressBarElement/index.d.ts.map +1 -1
  9. package/cjs/{fthry_AssistantChat.BINgQyo6.js → fthry_AssistantChat.ZStzPnR-.js} +46 -35
  10. package/cjs/{fthry_FormControl.DvttBFQA.js → fthry_FormControl.DyIaD_oy.js} +1 -1
  11. package/cjs/{fthry_InlineTooltip.9rIsJpfs.js → fthry_InlineTooltip.uDegsH9E.js} +2 -2
  12. package/cjs/{fthry_Overlay.WBYrIj6B.js → fthry_Overlay.CUcDMC-q.js} +1 -1
  13. package/cjs/{fthry_PaymentMethodField.C4VaZqHL.js → fthry_PaymentMethodField.sRwR5_61.js} +4 -4
  14. package/cjs/{fthry_Placeholder.CgOjJ0U4.js → fthry_Placeholder.BMypFtTl.js} +1 -1
  15. package/cjs/{fthry_ShowEyeIcon.Du1EeWml.js → fthry_ShowEyeIcon.BkGAa4Ku.js} +1 -1
  16. package/cjs/{fthry_highlighted-body-TPN3WLV5.Dp7GX6-r.js → fthry_highlighted-body-TPN3WLV5.BoFXEr9N.js} +3 -3
  17. package/cjs/{fthry_index.BFhnkMpT.js → fthry_index.1oEFyAGP.js} +5 -5
  18. package/cjs/{fthry_index.7mKI1oBY.js → fthry_index.792DnHfR.js} +6 -6
  19. package/cjs/{fthry_index.cnUDSCaQ.js → fthry_index.B-UU8i3N.js} +4 -4
  20. package/cjs/{fthry_index.WF97Zeu4.js → fthry_index.B9l-Z_I7.js} +1 -1
  21. package/cjs/{fthry_index.BUdPhxy4.js → fthry_index.BKVCeI8M.js} +1 -1
  22. package/cjs/{fthry_index.B3vyA57B.js → fthry_index.BOC9Xno9.js} +4 -4
  23. package/cjs/{fthry_index.DJ6koGNn.js → fthry_index.BZV0QImG.js} +5 -5
  24. package/cjs/{fthry_index.BKWR0eIG.js → fthry_index.BZsqfLAY.js} +6 -6
  25. package/cjs/{fthry_index.CbQmuDs_.js → fthry_index.BfKMhDL9.js} +1 -1
  26. package/cjs/{fthry_index.Da5woXe8.js → fthry_index.BrR9-bMa.js} +5 -5
  27. package/cjs/{fthry_index.4pE67UNZ.js → fthry_index.C-vFVU2N.js} +2 -2
  28. package/cjs/{fthry_index.D_BPIST3.js → fthry_index.C4KmumGc.js} +8 -8
  29. package/cjs/{fthry_index.it32PXmr.js → fthry_index.C5nqE8kC.js} +187 -170
  30. package/cjs/{fthry_index.Dj4ehG8g.js → fthry_index.CErEr18j.js} +6 -6
  31. package/cjs/{fthry_index.CKWYW0O2.js → fthry_index.CewNeOjM.js} +1 -1
  32. package/cjs/{fthry_index.BSCklZZq.js → fthry_index.ClmLN_OD.js} +3 -3
  33. package/cjs/{fthry_index.flfYpHk5.js → fthry_index.CmrAr3T2.js} +1 -1
  34. package/cjs/{fthry_index.77iwkkTt.js → fthry_index.CuRipLlH.js} +1 -1
  35. package/cjs/{fthry_index.DpVhF5g2.js → fthry_index.DeDGU7A8.js} +5 -5
  36. package/cjs/{fthry_index.BMETf3gc.js → fthry_index.Di7Giv3P.js} +1 -1
  37. package/cjs/{fthry_index.B8ak9onq.js → fthry_index.Jpj4Glh5.js} +6 -6
  38. package/cjs/{fthry_index.DAxzjise.js → fthry_index.OWnm3N9F.js} +1 -1
  39. package/cjs/{fthry_index.XvyKMnpa.js → fthry_index.ZMlNlPA3.js} +3 -3
  40. package/cjs/{fthry_index.zUy9GEIP.js → fthry_index.x3euiywy.js} +2 -2
  41. package/cjs/{fthry_index.D8ITkmFC.js → fthry_index.y4tmJzGh.js} +1 -1
  42. package/cjs/{fthry_input.nvV9Bxkl.js → fthry_input.CaZ_ApZk.js} +1 -1
  43. package/cjs/{fthry_mermaid-O7DHMXV3.BFcqxiN5.js → fthry_mermaid-O7DHMXV3.mRK63yr_.js} +3 -3
  44. package/cjs/{fthry_script.DfcanA-w.js → fthry_script.hfuKeX0M.js} +1 -1
  45. package/cjs/{fthry_styles.uG1sSQ2A.js → fthry_styles.Cwk2sjQL.js} +1 -1
  46. package/cjs/{fthry_useElementSize.DgMtXr2A.js → fthry_useElementSize.C3TLx2VP.js} +1 -1
  47. package/cjs/{fthry_useSalesforceSync.C7Dsl-VD.js → fthry_useSalesforceSync.CnbWPLV2.js} +1 -1
  48. package/cjs/{fthry_webfontloader.Db18omAR.js → fthry_webfontloader.BLyUiSYA.js} +1 -1
  49. package/cjs/index.js +1 -1
  50. package/cjs/integrations/mixpanel.d.ts.map +1 -1
  51. package/dist/Form/grid/Element/index.d.ts.map +1 -1
  52. package/dist/Form/index.d.ts.map +1 -1
  53. package/dist/assistant/AssistantChat.d.ts.map +1 -1
  54. package/dist/assistant/ToolStatus.d.ts.map +1 -1
  55. package/dist/elements/basic/ProgressBarElement/components/StepperBar.d.ts +2 -1
  56. package/dist/elements/basic/ProgressBarElement/components/StepperBar.d.ts.map +1 -1
  57. package/dist/elements/basic/ProgressBarElement/index.d.ts +1 -1
  58. package/dist/elements/basic/ProgressBarElement/index.d.ts.map +1 -1
  59. package/dist/{fthry_AssistantChat.CpwDG4Ri.js → fthry_AssistantChat.BuRxZIgB.js} +46 -35
  60. package/dist/{fthry_FormControl.aDOShOnN.js → fthry_FormControl.BHer-tLb.js} +1 -1
  61. package/dist/{fthry_InlineTooltip.B5_RegvG.js → fthry_InlineTooltip.f3x8nQox.js} +2 -2
  62. package/dist/{fthry_Overlay.t3wJuWQ8.js → fthry_Overlay.CRG8vJk1.js} +1 -1
  63. package/dist/{fthry_PaymentMethodField.BNkIfG_Z.js → fthry_PaymentMethodField.PwUhO-uR.js} +4 -4
  64. package/dist/{fthry_Placeholder.D4oxVj_P.js → fthry_Placeholder.C9-QE3Fn.js} +1 -1
  65. package/dist/{fthry_ShowEyeIcon.DVClpFRX.js → fthry_ShowEyeIcon.iJEStsbc.js} +1 -1
  66. package/dist/{fthry_highlighted-body-TPN3WLV5.CjlsNAY7.js → fthry_highlighted-body-TPN3WLV5.DjJlbwHG.js} +3 -3
  67. package/dist/{fthry_index.DNOrRr2p.js → fthry_index.BrUrpkIy.js} +1 -1
  68. package/dist/{fthry_index.Cuk_Vs8O.js → fthry_index.C1zVJ3Wf.js} +6 -6
  69. package/dist/{fthry_index.BR6pD2W9.js → fthry_index.C506fLTN.js} +4 -4
  70. package/dist/{fthry_index.D9PZSsaC.js → fthry_index.C7BrODdJ.js} +1 -1
  71. package/dist/{fthry_index.D54GKwWT.js → fthry_index.CJFSHzAe.js} +1 -1
  72. package/dist/{fthry_index.Bw-_5HVu.js → fthry_index.CKvp6HuY.js} +1 -1
  73. package/dist/{fthry_index.THknYMbR.js → fthry_index.CWHjYPzF.js} +2 -2
  74. package/dist/{fthry_index.DSvEn71B.js → fthry_index.CpkJbhj2.js} +3 -3
  75. package/dist/{fthry_index.DFAEKElD.js → fthry_index.CqLl_Dj_.js} +2 -2
  76. package/dist/{fthry_index.DtnlZPBE.js → fthry_index.Cxgu56Xt.js} +5 -5
  77. package/dist/{fthry_index.Dz10UO8A.js → fthry_index.D88l_RDZ.js} +6 -6
  78. package/dist/{fthry_index.DRsP7zHy.js → fthry_index.D97WdEJD.js} +6 -6
  79. package/dist/{fthry_index.C55D2H1o.js → fthry_index.DNZw4sNY.js} +5 -5
  80. package/dist/{fthry_index.Cb2svRRS.js → fthry_index.DRf21FOT.js} +5 -5
  81. package/dist/{fthry_index.DGrF6rBR.js → fthry_index.Din0z99q.js} +5 -5
  82. package/dist/{fthry_index.tT6s5qHu.js → fthry_index.DyPvHHnZ.js} +1 -1
  83. package/dist/{fthry_index.CxnWFkgd.js → fthry_index.GsLrKjfr.js} +187 -170
  84. package/dist/{fthry_index.BGLOsRWg.js → fthry_index.HeX_lYBZ.js} +5 -5
  85. package/dist/{fthry_index.HKMtuquq.js → fthry_index.PyoWaCZ6.js} +1 -1
  86. package/dist/{fthry_index.XucW1AjN.js → fthry_index.c25IqSX6.js} +1 -1
  87. package/dist/{fthry_index.BO07WkMA.js → fthry_index.kMe5pAne.js} +1 -1
  88. package/dist/{fthry_index.DGYmS3yE.js → fthry_index.m2htvwhf.js} +3 -3
  89. package/dist/{fthry_index.BXDa3BX8.js → fthry_index.pHCTO9d-.js} +4 -4
  90. package/dist/{fthry_index.DRCzThWg.js → fthry_index.xs4pBnbE.js} +8 -8
  91. package/dist/{fthry_index.Du0fTEDI.js → fthry_index.zI-Q4p5L.js} +1 -1
  92. package/dist/{fthry_input.qy9b9thc.js → fthry_input.DVSbIwMV.js} +1 -1
  93. package/dist/{fthry_mermaid-O7DHMXV3.C3O0wHy0.js → fthry_mermaid-O7DHMXV3.fc5fAcxr.js} +3 -3
  94. package/dist/{fthry_script.CzgDHOyt.js → fthry_script.CK8ajvJd.js} +1 -1
  95. package/dist/{fthry_styles.B_d3wcqj.js → fthry_styles.9Pz3F8Ry.js} +1 -1
  96. package/dist/{fthry_useElementSize.BHI3Ek3Q.js → fthry_useElementSize.DUGbDlSz.js} +1 -1
  97. package/dist/{fthry_useSalesforceSync.pcGl8IA9.js → fthry_useSalesforceSync.73AbGgFc.js} +1 -1
  98. package/dist/{fthry_webfontloader.CX5xEcgl.js → fthry_webfontloader.DESOOCJe.js} +1 -1
  99. package/dist/index.js +1 -1
  100. package/dist/integrations/mixpanel.d.ts.map +1 -1
  101. package/package.json +1 -1
  102. package/umd/AssistantChat.7af8f8f25348f5379aeb.js +1 -0
  103. package/umd/index.js +1 -1
  104. package/umd/AssistantChat.1d48433115b848b43bb9.js +0 -1
@@ -22334,7 +22334,7 @@ var Element$1 = function (_a) {
22334
22334
  if (elementOnView && onViewElements.includes(fieldId))
22335
22335
  basicProps.onView = function (inView) { return elementOnView(fieldId, inView); };
22336
22336
  if (type === 'progress_bar')
22337
- return (jsx$1(Elements.ProgressBarElement, __assign({}, basicProps, { progress: userProgress, curDepth: curDepth, maxDepth: maxDepth, stepKey: activeStep === null || activeStep === void 0 ? void 0 : activeStep.key, changeStep: form.changeStep })));
22337
+ return (jsx$1(Elements.ProgressBarElement, __assign({}, basicProps, { progress: userProgress, curDepth: curDepth, maxDepth: maxDepth, stepKey: activeStep === null || activeStep === void 0 ? void 0 : activeStep.key, changeStep: form.changeStep, runElementActions: runElementActions })));
22338
22338
  else if (type === 'image')
22339
22339
  return jsx$1(Elements.ImageElement, __assign({}, basicProps));
22340
22340
  else if (type === 'video')
@@ -40981,7 +40981,7 @@ function useTrackUserInteraction(formRef, activeStep, stepKey, formName) {
40981
40981
  }, [activeStep, stepKey, formName]);
40982
40982
  }
40983
40983
 
40984
- var LazyAssistantChat = lazy(function () { return import(/* webpackChunkName: "AssistantChat" */ './fthry_AssistantChat.CpwDG4Ri.js').then(function (n) { return n.A; }); });
40984
+ var LazyAssistantChat = lazy(function () { return import(/* webpackChunkName: "AssistantChat" */ './fthry_AssistantChat.BuRxZIgB.js').then(function (n) { return n.A; }); });
40985
40985
  var AssistantChat = function (props) { return (jsx$1(Suspense, __assign({ fallback: null }, { children: jsx$1(LazyAssistantChat, __assign({}, props)) }))); };
40986
40986
 
40987
40987
  var AssistantClient = /** @class */ (function () {
@@ -41178,13 +41178,8 @@ function Form(_a) {
41178
41178
  var right = side === 'right' ? width : 0;
41179
41179
  if (isFillWidth) {
41180
41180
  var calc = "calc(100% - ".concat(left + right, "px)");
41181
- return {
41182
- minWidth: calc,
41183
- maxWidth: calc,
41184
- marginLeft: "".concat(left, "px"),
41185
- marginRight: "".concat(right, "px"),
41186
- transition: transition
41187
- };
41181
+ var sidebarOpen = !!side && width > 0;
41182
+ return __assign({ minWidth: calc, maxWidth: calc, marginLeft: "".concat(left, "px"), marginRight: "".concat(right, "px"), transition: transition }, (sidebarOpen ? { height: '100vh', overflowY: 'auto' } : {}));
41188
41183
  }
41189
41184
  if (!side || !width)
41190
41185
  return {};
@@ -42781,11 +42776,11 @@ function Form(_a) {
42781
42776
  var runElementActions = function (_a) {
42782
42777
  var actions = _a.actions, element = _a.element, elementType = _a.elementType, _b = _a.submit, submit = _b === void 0 ? false : _b, _c = _a.setElementError, setElementError = _c === void 0 ? function () { } : _c, _d = _a.onAsyncEnd, onAsyncEnd = _d === void 0 ? function () { } : _d, textSpanStart = _a.textSpanStart, textSpanEnd = _a.textSpanEnd, triggerPayload = _a.triggerPayload, externalPreOpenedWindows = _a.preOpenedWindows;
42783
42778
  return __awaiter$2(_this, void 0, void 0, function () {
42784
- var id, preOpenedWindows, metadata, trigger, submitPromise, pendingFileKeys, invalid, hasNext, submissionResult, error_3, _e, stepPromise, flowOnSuccess, actionTypes, runAction, i, hasExtractions, hasEnvelopeGeneration, _loop_1, state_1;
42779
+ var id, preOpenedWindows, metadata, trigger, submitPromise, pendingFileKeys, invalid, nextAction, hasNext, submissionResult, error_3, _e, stepPromise, flowOnSuccess, actionTypes, runAction, i, hasExtractions, hasEnvelopeGeneration, _loop_1, state_1;
42785
42780
  var _this = this;
42786
- var _f, _g, _h, _j, _k;
42787
- return __generator(this, function (_l) {
42788
- switch (_l.label) {
42781
+ var _f, _g, _h, _j, _k, _l, _m;
42782
+ return __generator(this, function (_o) {
42783
+ switch (_o.label) {
42789
42784
  case 0:
42790
42785
  id = (_f = element.id) !== null && _f !== void 0 ? _f : '';
42791
42786
  preOpenedWindows = externalPreOpenedWindows !== null && externalPreOpenedWindows !== void 0 ? externalPreOpenedWindows : new Map();
@@ -42824,8 +42819,8 @@ function Form(_a) {
42824
42819
  if (!pendingFileKeys.length) return [3 /*break*/, 2];
42825
42820
  return [4 /*yield*/, client.resetPendingFileUploads(pendingFileKeys)];
42826
42821
  case 1:
42827
- _l.sent();
42828
- _l.label = 2;
42822
+ _o.sent();
42823
+ _o.label = 2;
42829
42824
  case 2:
42830
42825
  // Clear any previous button error before re-validation
42831
42826
  // This allows retry after file upload errors
@@ -42856,18 +42851,18 @@ function Form(_a) {
42856
42851
  closePreOpenedWindows(preOpenedWindows);
42857
42852
  return [2 /*return*/];
42858
42853
  }
42859
- hasNext = actions.some(function (action) { return action.type === ACTION_NEXT; }) &&
42860
- getNextStepKey(metadata);
42854
+ nextAction = actions.find(function (action) { return action.type === ACTION_NEXT; });
42855
+ hasNext = nextAction && ((_g = nextAction.next_step_key) !== null && _g !== void 0 ? _g : getNextStepKey(metadata));
42861
42856
  submissionResult = void 0;
42862
- _l.label = 3;
42857
+ _o.label = 3;
42863
42858
  case 3:
42864
- _l.trys.push([3, 5, , 6]);
42859
+ _o.trys.push([3, 5, , 6]);
42865
42860
  return [4 /*yield*/, submitStep(metadata, element.repeat || 0, !!hasNext)];
42866
42861
  case 4:
42867
- submissionResult = _l.sent();
42862
+ submissionResult = _o.sent();
42868
42863
  return [3 /*break*/, 6];
42869
42864
  case 5:
42870
- error_3 = _l.sent();
42865
+ error_3 = _o.sent();
42871
42866
  submissionResult = [Promise.reject(error_3)];
42872
42867
  return [3 /*break*/, 6];
42873
42868
  case 6:
@@ -42890,7 +42885,7 @@ function Form(_a) {
42890
42885
  // Ensure all rejection paths are marked handled so React Dev overlay
42891
42886
  // doesn't surface "Unhandled Runtime Error" when navigation is allowed
42892
42887
  submitPromise.catch(function () { });
42893
- _l.label = 7;
42888
+ _o.label = 7;
42894
42889
  case 7:
42895
42890
  if (!externalPreOpenedWindows)
42896
42891
  actions = prioritizeActions(actions);
@@ -42941,7 +42936,7 @@ function Form(_a) {
42941
42936
  };
42942
42937
  return [4 /*yield*/, runAction(true)];
42943
42938
  case 8:
42944
- _l.sent();
42939
+ _o.sent();
42945
42940
  hasExtractions = actions.some(function (action) { return action.type === ACTION_AI_EXTRACTION && !action.run_async; });
42946
42941
  if (hasExtractions) {
42947
42942
  initializeActionExtractions(actions);
@@ -42952,9 +42947,9 @@ function Form(_a) {
42952
42947
  }
42953
42948
  _loop_1 = function () {
42954
42949
  var action, type, container, container, personaMeta, url, preOpened, eventData, phoneNum, e_6, phoneNum, e_7, emailAddress, e_8, pinKey, pin, params, hasErr_1, prom, email, e_9, auth, loginStep, actionSuccess, val, valid, val, invitees, res, collabKey, collaborators, newVals, e_10, e_11, extractions, _loop_2, state_2, data, errorEntry, e_12, envelopeId, data, envAction, url, eventData, files, newValues, e_13, payload, e_14, key_1, val, servar_1, hiddenFieldType, destVal, setToDefaultValue, curIndex, defaultVal, i_1, newValues, phoneNum, silentVeriResult, key, newValues, e_15, phoneNum, phoneType, key, newValues, e_16, phoneNum, e_17, pinKey, pin, pinMatch, e_18;
42955
- var _m, _o, _p, _q, _r, _s, _t;
42956
- return __generator(this, function (_u) {
42957
- switch (_u.label) {
42950
+ var _p, _q, _r, _s, _t, _u, _v;
42951
+ return __generator(this, function (_w) {
42952
+ switch (_w.label) {
42958
42953
  case 0:
42959
42954
  action = actions[i];
42960
42955
  type = action.type;
@@ -42971,56 +42966,56 @@ function Form(_a) {
42971
42966
  if (!(type === ACTION_TRIGGER_PERSONA)) return [3 /*break*/, 4];
42972
42967
  return [4 /*yield*/, Promise.all([submitPromise, client.flushCustomFields()])];
42973
42968
  case 3:
42974
- _u.sent();
42975
- personaMeta = (_g = integrations === null || integrations === void 0 ? void 0 : integrations.persona.metadata) !== null && _g !== void 0 ? _g : {};
42969
+ _w.sent();
42970
+ personaMeta = (_h = integrations === null || integrations === void 0 ? void 0 : integrations.persona.metadata) !== null && _h !== void 0 ? _h : {};
42976
42971
  triggerPersona(personaMeta, flowOnSuccess(i), setElementError, updateFieldValues, client);
42977
42972
  return [2 /*return*/, "break"];
42978
42973
  case 4:
42979
42974
  if (!(type === ACTION_ALLOY_VERIFY_ID)) return [3 /*break*/, 7];
42980
42975
  return [4 /*yield*/, Promise.all([submitPromise, client.flushCustomFields()])];
42981
42976
  case 5:
42982
- _u.sent();
42977
+ _w.sent();
42983
42978
  return [4 /*yield*/, verifyAlloyId(action, integrations === null || integrations === void 0 ? void 0 : integrations.alloy, flowOnSuccess(i))];
42984
42979
  case 6:
42985
- _u.sent();
42980
+ _w.sent();
42986
42981
  return [2 /*return*/, "break"];
42987
42982
  case 7:
42988
42983
  if (!(type === ACTION_SCHWAB_CREATE_CONTACT)) return [3 /*break*/, 10];
42989
42984
  return [4 /*yield*/, Promise.all([submitPromise, client.flushCustomFields()])];
42990
42985
  case 8:
42991
- _u.sent();
42986
+ _w.sent();
42992
42987
  return [4 /*yield*/, createSchwabContact(client, setElementError)];
42993
42988
  case 9:
42994
- _u.sent();
42989
+ _w.sent();
42995
42990
  return [2 /*return*/, "break"];
42996
42991
  case 10:
42997
42992
  if (!(type === ACTION_TRIGGER_PLAID)) return [3 /*break*/, 13];
42998
42993
  return [4 /*yield*/, submitPromise];
42999
42994
  case 11:
43000
- _u.sent();
42995
+ _w.sent();
43001
42996
  return [4 /*yield*/, openPlaidLink(client, flowOnSuccess(i), function () { return onAsyncEnd(); }, updateFieldValues, action, function (err) {
43002
42997
  return setElementError(err || 'Plaid was unable to fetch your data');
43003
42998
  })];
43004
42999
  case 12:
43005
- _u.sent();
43000
+ _w.sent();
43006
43001
  return [2 /*return*/, "break"];
43007
43002
  case 13:
43008
43003
  if (!(type === ACTION_TRIGGER_ARGYLE)) return [3 /*break*/, 16];
43009
43004
  return [4 /*yield*/, Promise.all([submitPromise, client.flushCustomFields()])];
43010
43005
  case 14:
43011
- _u.sent();
43006
+ _w.sent();
43012
43007
  return [4 /*yield*/, openArgyleLink(client, flowOnSuccess(i), integrations === null || integrations === void 0 ? void 0 : integrations.argyle)];
43013
43008
  case 15:
43014
- _u.sent();
43009
+ _w.sent();
43015
43010
  return [2 /*return*/, "break"];
43016
43011
  case 16:
43017
43012
  if (!(type === ACTION_TRIGGER_FLINKS)) return [3 /*break*/, 19];
43018
43013
  return [4 /*yield*/, submitPromise];
43019
43014
  case 17:
43020
- _u.sent();
43015
+ _w.sent();
43021
43016
  return [4 /*yield*/, openFlinksConnect(client, flowOnSuccess(i), function (err) { return setElementError(err || 'Please connect Flinks'); }, integrations === null || integrations === void 0 ? void 0 : integrations.flinks, updateFieldValues)];
43022
43017
  case 18:
43023
- _u.sent();
43018
+ _w.sent();
43024
43019
  return [2 /*return*/, "break"];
43025
43020
  case 19:
43026
43021
  if (!(type === ACTION_URL)) return [3 /*break*/, 22];
@@ -43048,23 +43043,23 @@ function Form(_a) {
43048
43043
  };
43049
43044
  return [4 /*yield*/, client.registerEvent(eventData)];
43050
43045
  case 20:
43051
- _u.sent();
43046
+ _w.sent();
43052
43047
  featheryWindow().location.href = url;
43053
- _u.label = 21;
43048
+ _w.label = 21;
43054
43049
  case 21: return [3 /*break*/, 139];
43055
43050
  case 22:
43056
43051
  if (!(type === ACTION_SEND_SMS_MESSAGE)) return [3 /*break*/, 29];
43057
43052
  phoneNum = fieldValues[action.phone_target_field_key];
43058
43053
  if (!validators.phone(phoneNum)) return [3 /*break*/, 27];
43059
- _u.label = 23;
43054
+ _w.label = 23;
43060
43055
  case 23:
43061
- _u.trys.push([23, 25, , 26]);
43056
+ _w.trys.push([23, 25, , 26]);
43062
43057
  return [4 /*yield*/, client.sendSMSMessage(phoneNum, action.sms_message)];
43063
43058
  case 24:
43064
- _u.sent();
43059
+ _w.sent();
43065
43060
  return [3 /*break*/, 26];
43066
43061
  case 25:
43067
- e_6 = _u.sent();
43062
+ e_6 = _w.sent();
43068
43063
  setElementError(e_6.message);
43069
43064
  return [2 /*return*/, "break"];
43070
43065
  case 26: return [3 /*break*/, 28];
@@ -43076,15 +43071,15 @@ function Form(_a) {
43076
43071
  if (!(type === ACTION_SEND_SMS_CODE)) return [3 /*break*/, 36];
43077
43072
  phoneNum = fieldValues[action.auth_target_field_key];
43078
43073
  if (!validators.phone(phoneNum)) return [3 /*break*/, 34];
43079
- _u.label = 30;
43074
+ _w.label = 30;
43080
43075
  case 30:
43081
- _u.trys.push([30, 32, , 33]);
43076
+ _w.trys.push([30, 32, , 33]);
43082
43077
  return [4 /*yield*/, Auth.sendSms(phoneNum, client)];
43083
43078
  case 31:
43084
- _u.sent();
43079
+ _w.sent();
43085
43080
  return [3 /*break*/, 33];
43086
43081
  case 32:
43087
- e_7 = _u.sent();
43082
+ e_7 = _w.sent();
43088
43083
  setElementError(e_7.message);
43089
43084
  return [2 /*return*/, "break"];
43090
43085
  case 33: return [3 /*break*/, 35];
@@ -43096,15 +43091,15 @@ function Form(_a) {
43096
43091
  if (!(type === ACTION_SEND_EMAIL_CODE)) return [3 /*break*/, 43];
43097
43092
  emailAddress = fieldValues[action.email_field_key];
43098
43093
  if (!validators.email(emailAddress)) return [3 /*break*/, 41];
43099
- _u.label = 37;
43094
+ _w.label = 37;
43100
43095
  case 37:
43101
- _u.trys.push([37, 39, , 40]);
43096
+ _w.trys.push([37, 39, , 40]);
43102
43097
  return [4 /*yield*/, client.sendEmailOTP(emailAddress)];
43103
43098
  case 38:
43104
- _u.sent();
43099
+ _w.sent();
43105
43100
  return [3 /*break*/, 40];
43106
43101
  case 39:
43107
- e_8 = _u.sent();
43102
+ e_8 = _w.sent();
43108
43103
  setElementError(e_8.message);
43109
43104
  return [2 /*return*/, "break"];
43110
43105
  case 40: return [3 /*break*/, 42];
@@ -43133,25 +43128,25 @@ function Form(_a) {
43133
43128
  hasErr_1 = true;
43134
43129
  })];
43135
43130
  case 44:
43136
- _u.sent();
43131
+ _w.sent();
43137
43132
  if (hasErr_1)
43138
43133
  return [2 /*return*/, "break"];
43139
- client.submitCustom((_m = {}, _m[pinKey] = pin, _m));
43134
+ client.submitCustom((_p = {}, _p[pinKey] = pin, _p));
43140
43135
  authState.redirectAfterLogin = true;
43141
43136
  return [3 /*break*/, 139];
43142
43137
  case 45:
43143
43138
  if (!(type === ACTION_SEND_MAGIC_LINK)) return [3 /*break*/, 52];
43144
43139
  email = fieldValues[action.auth_target_field_key];
43145
43140
  if (!validators.email(email)) return [3 /*break*/, 50];
43146
- _u.label = 46;
43141
+ _w.label = 46;
43147
43142
  case 46:
43148
- _u.trys.push([46, 48, , 49]);
43143
+ _w.trys.push([46, 48, , 49]);
43149
43144
  return [4 /*yield*/, Auth.sendMagicLink(email)];
43150
43145
  case 47:
43151
- _u.sent();
43146
+ _w.sent();
43152
43147
  return [3 /*break*/, 49];
43153
43148
  case 48:
43154
- e_9 = _u.sent();
43149
+ e_9 = _w.sent();
43155
43150
  setElementError(e_9.message);
43156
43151
  return [2 /*return*/, "break"];
43157
43152
  case 49: return [3 /*break*/, 51];
@@ -43163,7 +43158,7 @@ function Form(_a) {
43163
43158
  if (!(type === ACTION_OAUTH_LOGIN)) return [3 /*break*/, 56];
43164
43159
  return [4 /*yield*/, Auth.oauthRedirect(action.oauth_type, client)];
43165
43160
  case 53:
43166
- auth = _u.sent();
43161
+ auth = _w.sent();
43167
43162
  if (!(auth && auth.result)) return [3 /*break*/, 55];
43168
43163
  loginStep = getLoginStep(steps, integrations);
43169
43164
  if (!loginStep) return [3 /*break*/, 55];
@@ -43171,44 +43166,44 @@ function Form(_a) {
43171
43166
  redirectKey: loginStep.key
43172
43167
  })];
43173
43168
  case 54:
43174
- _u.sent();
43175
- _u.label = 55;
43169
+ _w.sent();
43170
+ _w.label = 55;
43176
43171
  case 55: return [3 /*break*/, 139];
43177
43172
  case 56:
43178
43173
  if (!(type === ACTION_LOGOUT)) return [3 /*break*/, 58];
43179
43174
  return [4 /*yield*/, Auth.inferAuthLogout()];
43180
43175
  case 57:
43181
- _u.sent();
43176
+ _w.sent();
43182
43177
  return [3 /*break*/, 139];
43183
43178
  case 58:
43184
43179
  if (!(type === ACTION_NEW_SUBMISSION)) return [3 /*break*/, 60];
43185
43180
  return [4 /*yield*/, updateUserId(v4$1())];
43186
43181
  case 59:
43187
- _u.sent();
43182
+ _w.sent();
43188
43183
  return [3 /*break*/, 139];
43189
43184
  case 60:
43190
43185
  if (!(type === ACTION_NEXT)) return [3 /*break*/, 62];
43191
43186
  return [4 /*yield*/, goToNewStep({
43192
- redirectKey: getNextStepKey(metadata),
43187
+ redirectKey: (_j = action.next_step_key) !== null && _j !== void 0 ? _j : getNextStepKey(metadata),
43193
43188
  elementType: metadata.elementType,
43194
43189
  submitData: submit,
43195
43190
  submitPromise: submitPromise,
43196
43191
  completionButton: elementType === 'button' ? element : null
43197
43192
  })];
43198
43193
  case 61:
43199
- _u.sent();
43194
+ _w.sent();
43200
43195
  return [3 /*break*/, 139];
43201
43196
  case 62:
43202
43197
  if (!(type === ACTION_BACK)) return [3 /*break*/, 64];
43203
43198
  return [4 /*yield*/, goToPreviousStep()];
43204
43199
  case 63:
43205
- _u.sent();
43200
+ _w.sent();
43206
43201
  return [3 /*break*/, 139];
43207
43202
  case 64:
43208
43203
  if (!(type === ACTION_PURCHASE_PRODUCTS)) return [3 /*break*/, 66];
43209
43204
  return [4 /*yield*/, purchaseProductsAction(element)];
43210
43205
  case 65:
43211
- actionSuccess = _u.sent();
43206
+ actionSuccess = _w.sent();
43212
43207
  if (!actionSuccess)
43213
43208
  return [2 /*return*/, "break"];
43214
43209
  return [3 /*break*/, 139];
@@ -43229,7 +43224,7 @@ function Form(_a) {
43229
43224
  }
43230
43225
  return [4 /*yield*/, client.verifyCollaborator(val)];
43231
43226
  case 69:
43232
- valid = (_u.sent()).valid;
43227
+ valid = (_w.sent()).valid;
43233
43228
  if (!valid) {
43234
43229
  setElementError('Invalid form collaborator');
43235
43230
  return [2 /*return*/, "break"];
@@ -43239,33 +43234,33 @@ function Form(_a) {
43239
43234
  if (!(type === ACTION_INVITE_COLLABORATOR)) return [3 /*break*/, 78];
43240
43235
  return [4 /*yield*/, Promise.all([submitPromise, client.flushCustomFields()])];
43241
43236
  case 71:
43242
- _u.sent();
43237
+ _w.sent();
43243
43238
  val = fieldValues[action.email_field_key];
43244
43239
  if (!val) {
43245
43240
  setElementError('Collaborators required');
43246
43241
  return [2 /*return*/, "break"];
43247
43242
  }
43248
43243
  invitees = toList(val, true);
43249
- _u.label = 72;
43244
+ _w.label = 72;
43250
43245
  case 72:
43251
- _u.trys.push([72, 76, , 77]);
43246
+ _w.trys.push([72, 76, , 77]);
43252
43247
  return [4 /*yield*/, client.inviteCollaborator(invitees, action.template_id)];
43253
43248
  case 73:
43254
- res = _u.sent();
43249
+ res = _w.sent();
43255
43250
  collabKey = action.collaborator_field_key;
43256
43251
  if (!(res && res.ok && collabKey)) return [3 /*break*/, 75];
43257
43252
  collaborators = res.payload.collaborators;
43258
- newVals = (_o = {},
43259
- _o[collabKey] = collaborators.map(function (c) { return c.id; }),
43260
- _o);
43253
+ newVals = (_q = {},
43254
+ _q[collabKey] = collaborators.map(function (c) { return c.id; }),
43255
+ _q);
43261
43256
  updateFieldValues(newVals);
43262
43257
  return [4 /*yield*/, client.submitCustom(newVals)];
43263
43258
  case 74:
43264
- _u.sent();
43265
- _u.label = 75;
43259
+ _w.sent();
43260
+ _w.label = 75;
43266
43261
  case 75: return [3 /*break*/, 77];
43267
43262
  case 76:
43268
- e_10 = _u.sent();
43263
+ e_10 = _w.sent();
43269
43264
  setElementError(e_10.message);
43270
43265
  return [2 /*return*/, "break"];
43271
43266
  case 77: return [3 /*break*/, 139];
@@ -43273,16 +43268,16 @@ function Form(_a) {
43273
43268
  if (!(type === ACTION_REWIND_COLLABORATION)) return [3 /*break*/, 84];
43274
43269
  return [4 /*yield*/, Promise.all([submitPromise, client.flushCustomFields()])];
43275
43270
  case 79:
43276
- _u.sent();
43277
- _u.label = 80;
43271
+ _w.sent();
43272
+ _w.label = 80;
43278
43273
  case 80:
43279
- _u.trys.push([80, 82, , 83]);
43274
+ _w.trys.push([80, 82, , 83]);
43280
43275
  return [4 /*yield*/, client.rewindCollaboration(action.template_id, action.email_field_key)];
43281
43276
  case 81:
43282
- _u.sent();
43277
+ _w.sent();
43283
43278
  return [3 /*break*/, 83];
43284
43279
  case 82:
43285
- e_11 = _u.sent();
43280
+ e_11 = _w.sent();
43286
43281
  setElementError(e_11.message);
43287
43282
  return [2 /*return*/, "break"];
43288
43283
  case 83: return [3 /*break*/, 139];
@@ -43290,11 +43285,11 @@ function Form(_a) {
43290
43285
  if (!(type === ACTION_AI_EXTRACTION)) return [3 /*break*/, 90];
43291
43286
  return [4 /*yield*/, Promise.all([submitPromise, client.flushCustomFields()])];
43292
43287
  case 85:
43293
- _u.sent();
43288
+ _w.sent();
43294
43289
  extractions = [];
43295
- _u.label = 86;
43290
+ _w.label = 86;
43296
43291
  case 86:
43297
- _u.trys.push([86, 88, , 89]);
43292
+ _w.trys.push([86, 88, , 89]);
43298
43293
  _loop_2 = function () {
43299
43294
  var curAction = actions[i];
43300
43295
  if (curAction.type === ACTION_AI_EXTRACTION &&
@@ -43333,7 +43328,7 @@ function Form(_a) {
43333
43328
  }
43334
43329
  return [4 /*yield*/, Promise.all(extractions)];
43335
43330
  case 87:
43336
- data = _u.sent();
43331
+ data = _w.sent();
43337
43332
  errorEntry = data.find(function (entry) { return entry.status === 'error'; });
43338
43333
  if (errorEntry) {
43339
43334
  setElementError(errorEntry.message);
@@ -43348,7 +43343,7 @@ function Form(_a) {
43348
43343
  }
43349
43344
  return [3 /*break*/, 89];
43350
43345
  case 88:
43351
- e_12 = _u.sent();
43346
+ e_12 = _w.sent();
43352
43347
  setElementError(e_12.message);
43353
43348
  return [2 /*return*/, "break"];
43354
43349
  case 89: return [3 /*break*/, 139];
@@ -43358,13 +43353,13 @@ function Form(_a) {
43358
43353
  updateEnvelopeGeneration(envelopeId, { status: 'incomplete' });
43359
43354
  return [4 /*yield*/, Promise.all([submitPromise, client.flushCustomFields()])];
43360
43355
  case 91:
43361
- _u.sent();
43362
- _u.label = 92;
43356
+ _w.sent();
43357
+ _w.label = 92;
43363
43358
  case 92:
43364
- _u.trys.push([92, 101, , 102]);
43359
+ _w.trys.push([92, 101, , 102]);
43365
43360
  return [4 /*yield*/, client.generateEnvelopes(action)];
43366
43361
  case 93:
43367
- data = _u.sent();
43362
+ data = _w.sent();
43368
43363
  if (data.status === 'error') {
43369
43364
  updateEnvelopeGeneration(envelopeId, { status: 'error' });
43370
43365
  setElementError(data.message);
@@ -43383,12 +43378,12 @@ function Form(_a) {
43383
43378
  };
43384
43379
  return [4 /*yield*/, client.registerEvent(eventData)];
43385
43380
  case 94:
43386
- _u.sent();
43381
+ _w.sent();
43387
43382
  featheryWindow().location.href = url;
43388
43383
  return [3 /*break*/, 96];
43389
43384
  case 95:
43390
43385
  openTab(url);
43391
- _u.label = 96;
43386
+ _w.label = 96;
43392
43387
  case 96: return [3 /*break*/, 100];
43393
43388
  case 97:
43394
43389
  if (!(envAction === 'download' && data.files)) return [3 /*break*/, 99];
@@ -43396,21 +43391,21 @@ function Form(_a) {
43396
43391
  return [4 /*yield*/, downloadAllFileUrls(data.files, replaceTextVariables(action.envelope_zip_name))];
43397
43392
  case 98:
43398
43393
  // Download files directly
43399
- _u.sent();
43394
+ _w.sent();
43400
43395
  return [3 /*break*/, 100];
43401
43396
  case 99:
43402
43397
  if (envAction === 'save') {
43403
43398
  files = data.files;
43404
43399
  if (files.length === 1)
43405
43400
  files = files[0];
43406
- newValues = (_p = {}, _p[action.save_document_field_key] = files, _p);
43401
+ newValues = (_r = {}, _r[action.save_document_field_key] = files, _r);
43407
43402
  updateFieldValues(newValues);
43408
43403
  client.submitCustom(newValues);
43409
43404
  }
43410
- _u.label = 100;
43405
+ _w.label = 100;
43411
43406
  case 100: return [3 /*break*/, 102];
43412
43407
  case 101:
43413
- e_13 = _u.sent();
43408
+ e_13 = _w.sent();
43414
43409
  updateEnvelopeGeneration(envelopeId, { status: 'error' });
43415
43410
  setElementError(e_13.message);
43416
43411
  return [2 /*return*/, "break"];
@@ -43419,13 +43414,13 @@ function Form(_a) {
43419
43414
  if (!(type === ACTION_GENERATE_QUIK_DOCUMENTS)) return [3 /*break*/, 113];
43420
43415
  return [4 /*yield*/, Promise.all([submitPromise, client.flushCustomFields()])];
43421
43416
  case 104:
43422
- _u.sent();
43423
- _u.label = 105;
43417
+ _w.sent();
43418
+ _w.label = 105;
43424
43419
  case 105:
43425
- _u.trys.push([105, 111, , 112]);
43420
+ _w.trys.push([105, 111, , 112]);
43426
43421
  return [4 /*yield*/, client.generateQuikEnvelopes(action)];
43427
43422
  case 106:
43428
- payload = _u.sent();
43423
+ payload = _w.sent();
43429
43424
  if (!(payload.status === 'error')) return [3 /*break*/, 107];
43430
43425
  setElementError(payload.message);
43431
43426
  return [3 /*break*/, 110];
@@ -43449,11 +43444,11 @@ function Form(_a) {
43449
43444
  if (!(action.form_fill_type === 'pdf' && payload.files)) return [3 /*break*/, 110];
43450
43445
  return [4 /*yield*/, downloadAllFileUrls(payload.files, replaceTextVariables(action.envelope_zip_name))];
43451
43446
  case 109:
43452
- _u.sent();
43453
- _u.label = 110;
43447
+ _w.sent();
43448
+ _w.label = 110;
43454
43449
  case 110: return [3 /*break*/, 112];
43455
43450
  case 111:
43456
- e_14 = _u.sent();
43451
+ e_14 = _w.sent();
43457
43452
  setElementError(e_14.message);
43458
43453
  return [2 /*return*/, "break"];
43459
43454
  case 112: return [3 /*break*/, 139];
@@ -43476,14 +43471,14 @@ function Form(_a) {
43476
43471
  }
43477
43472
  });
43478
43473
  if (isNum(element.repeat) && Array.isArray(val))
43479
- val = (_h = val[element.repeat]) !== null && _h !== void 0 ? _h : '';
43474
+ val = (_k = val[element.repeat]) !== null && _k !== void 0 ? _k : '';
43480
43475
  hiddenFieldType = hiddenFields[key_1];
43481
43476
  val = hiddenFieldType
43482
43477
  ? castHiddenVal(hiddenFieldType, val)
43483
43478
  : castServarVal(servar_1 === null || servar_1 === void 0 ? void 0 : servar_1.type, val);
43484
43479
  destVal = fieldValues[key_1];
43485
43480
  if (servar_1 === null || servar_1 === void 0 ? void 0 : servar_1.repeated)
43486
- destVal = destVal[(_j = element.repeat) !== null && _j !== void 0 ? _j : 0];
43481
+ destVal = destVal[(_l = element.repeat) !== null && _l !== void 0 ? _l : 0];
43487
43482
  setToDefaultValue = action.toggle && JSON.stringify(destVal) === JSON.stringify(val);
43488
43483
  if (setToDefaultValue) {
43489
43484
  // could be a hidden field
@@ -43491,7 +43486,7 @@ function Form(_a) {
43491
43486
  }
43492
43487
  if (servar_1 === null || servar_1 === void 0 ? void 0 : servar_1.repeated) {
43493
43488
  destVal = __spreadArray([], __read(fieldValues[key_1]), false);
43494
- curIndex = (_k = element.repeat) !== null && _k !== void 0 ? _k : 0;
43489
+ curIndex = (_m = element.repeat) !== null && _m !== void 0 ? _m : 0;
43495
43490
  // Repeat index already set via click if retain_click_value
43496
43491
  if (!action.retain_click_value)
43497
43492
  destVal[curIndex] = val;
@@ -43506,7 +43501,7 @@ function Form(_a) {
43506
43501
  }
43507
43502
  else if (action.retain_click_value)
43508
43503
  return [2 /*return*/, "continue"]; // Field already set via click
43509
- newValues = (_q = {}, _q[key_1] = val, _q);
43504
+ newValues = (_s = {}, _s[key_1] = val, _s);
43510
43505
  updateFieldValues(newValues, { clearErrors: false });
43511
43506
  client.submitCustom(newValues);
43512
43507
  return [3 /*break*/, 139];
@@ -43514,21 +43509,21 @@ function Form(_a) {
43514
43509
  if (!(type === ACTION_TELESIGN_SILENT_VERIFICATION)) return [3 /*break*/, 121];
43515
43510
  phoneNum = fieldValues[action.telesign_target_field_key];
43516
43511
  if (!validators.phone(phoneNum)) return [3 /*break*/, 119];
43517
- _u.label = 115;
43512
+ _w.label = 115;
43518
43513
  case 115:
43519
- _u.trys.push([115, 117, , 118]);
43514
+ _w.trys.push([115, 117, , 118]);
43520
43515
  return [4 /*yield*/, client.telesignSilentVerification(phoneNum)];
43521
43516
  case 116:
43522
- silentVeriResult = _u.sent();
43517
+ silentVeriResult = _w.sent();
43523
43518
  key = action.telesign_status_field_key;
43524
- newValues = (_r = {},
43525
- _r[key] = silentVeriResult,
43526
- _r);
43519
+ newValues = (_t = {},
43520
+ _t[key] = silentVeriResult,
43521
+ _t);
43527
43522
  updateFieldValues(newValues, { clearErrors: false });
43528
43523
  client.submitCustom(newValues);
43529
43524
  return [3 /*break*/, 118];
43530
43525
  case 117:
43531
- e_15 = _u.sent();
43526
+ e_15 = _w.sent();
43532
43527
  setElementError(e_15.message);
43533
43528
  return [2 /*return*/, "break"];
43534
43529
  case 118: return [3 /*break*/, 120];
@@ -43540,21 +43535,21 @@ function Form(_a) {
43540
43535
  if (!(type === ACTION_TELESIGN_PHONE_TYPE)) return [3 /*break*/, 128];
43541
43536
  phoneNum = fieldValues[action.telesign_target_field_key];
43542
43537
  if (!validators.phone(phoneNum)) return [3 /*break*/, 126];
43543
- _u.label = 122;
43538
+ _w.label = 122;
43544
43539
  case 122:
43545
- _u.trys.push([122, 124, , 125]);
43540
+ _w.trys.push([122, 124, , 125]);
43546
43541
  return [4 /*yield*/, client.telesignPhoneType(phoneNum)];
43547
43542
  case 123:
43548
- phoneType = _u.sent();
43543
+ phoneType = _w.sent();
43549
43544
  key = action.telesign_status_field_key;
43550
- newValues = (_s = {},
43551
- _s[key] = phoneType,
43552
- _s);
43545
+ newValues = (_u = {},
43546
+ _u[key] = phoneType,
43547
+ _u);
43553
43548
  updateFieldValues(newValues, { clearErrors: false });
43554
43549
  client.submitCustom(newValues);
43555
43550
  return [3 /*break*/, 125];
43556
43551
  case 124:
43557
- e_16 = _u.sent();
43552
+ e_16 = _w.sent();
43558
43553
  setElementError(e_16.message);
43559
43554
  return [2 /*return*/, "break"];
43560
43555
  case 125: return [3 /*break*/, 127];
@@ -43566,15 +43561,15 @@ function Form(_a) {
43566
43561
  if (![ACTION_TELESIGN_VOICE_OTP, ACTION_TELESIGN_SMS_OTP].includes(type)) return [3 /*break*/, 135];
43567
43562
  phoneNum = fieldValues[action.telesign_target_field_key];
43568
43563
  if (!validators.phone(phoneNum)) return [3 /*break*/, 133];
43569
- _u.label = 129;
43564
+ _w.label = 129;
43570
43565
  case 129:
43571
- _u.trys.push([129, 131, , 132]);
43566
+ _w.trys.push([129, 131, , 132]);
43572
43567
  return [4 /*yield*/, client.telesignSendOTP(phoneNum, type === ACTION_TELESIGN_VOICE_OTP ? 'voice' : 'sms')];
43573
43568
  case 130:
43574
- _u.sent();
43569
+ _w.sent();
43575
43570
  return [3 /*break*/, 132];
43576
43571
  case 131:
43577
- e_17 = _u.sent();
43572
+ e_17 = _w.sent();
43578
43573
  setElementError(e_17.message);
43579
43574
  return [2 /*return*/, "break"];
43580
43575
  case 132: return [3 /*break*/, 134];
@@ -43586,21 +43581,21 @@ function Form(_a) {
43586
43581
  if (!(type === ACTION_TELESIGN_VERIFY_OTP)) return [3 /*break*/, 139];
43587
43582
  pinKey = action.telesign_target_field_key;
43588
43583
  pin = fieldValues[pinKey];
43589
- _u.label = 136;
43584
+ _w.label = 136;
43590
43585
  case 136:
43591
- _u.trys.push([136, 138, , 139]);
43586
+ _w.trys.push([136, 138, , 139]);
43592
43587
  return [4 /*yield*/, client.telesignVerifyOTP(pin)];
43593
43588
  case 137:
43594
- pinMatch = _u.sent();
43589
+ pinMatch = _w.sent();
43595
43590
  if (!pinMatch) {
43596
43591
  setElementError('Invalid code. Please try again');
43597
43592
  return [2 /*return*/, "break"];
43598
43593
  }
43599
43594
  else
43600
- client.submitCustom((_t = {}, _t[pinKey] = pin, _t));
43595
+ client.submitCustom((_v = {}, _v[pinKey] = pin, _v));
43601
43596
  return [3 /*break*/, 139];
43602
43597
  case 138:
43603
- e_18 = _u.sent();
43598
+ e_18 = _w.sent();
43604
43599
  setElementError(e_18.message);
43605
43600
  return [2 /*return*/, "break"];
43606
43601
  case 139: return [2 /*return*/];
@@ -43608,15 +43603,15 @@ function Form(_a) {
43608
43603
  });
43609
43604
  };
43610
43605
  i = 0;
43611
- _l.label = 9;
43606
+ _o.label = 9;
43612
43607
  case 9:
43613
43608
  if (!(i < actions.length)) return [3 /*break*/, 12];
43614
43609
  return [5 /*yield**/, _loop_1()];
43615
43610
  case 10:
43616
- state_1 = _l.sent();
43611
+ state_1 = _o.sent();
43617
43612
  if (state_1 === "break")
43618
43613
  return [3 /*break*/, 12];
43619
- _l.label = 11;
43614
+ _o.label = 11;
43620
43615
  case 11:
43621
43616
  i++;
43622
43617
  return [3 /*break*/, 9];
@@ -43629,7 +43624,7 @@ function Form(_a) {
43629
43624
  }
43630
43625
  return [4 /*yield*/, runAction(false)];
43631
43626
  case 13:
43632
- _l.sent();
43627
+ _o.sent();
43633
43628
  elementClicks[id] = false;
43634
43629
  clearButtonActionState();
43635
43630
  return [2 /*return*/];
@@ -46042,7 +46037,10 @@ function installMixpanel(mixpanelConfig) {
46042
46037
  }
46043
46038
  })(featheryDoc(), featheryWindow().mixpanel || []);
46044
46039
  var meta = mixpanelConfig.metadata;
46045
- featheryWindow().mixpanel.init(meta.api_key);
46040
+ var options = meta.eu_server
46041
+ ? { api_host: 'https://api-eu.mixpanel.com' }
46042
+ : {};
46043
+ featheryWindow().mixpanel.init(meta.api_key, options);
46046
46044
  if (meta.identify_user)
46047
46045
  featheryWindow().mixpanel.identify(initInfo().userId);
46048
46046
  }
@@ -47587,9 +47585,9 @@ function init(sdkKey, options) {
47587
47585
  if (runningInClient()) {
47588
47586
  // Dynamically load libraries that must be client side
47589
47587
  global.scriptjsLoadPromise = import(
47590
- /* webpackChunkName: "scriptjs" */ './fthry_script.CzgDHOyt.js').then(function (n) { return n.s; });
47588
+ /* webpackChunkName: "scriptjs" */ './fthry_script.CK8ajvJd.js').then(function (n) { return n.s; });
47591
47589
  global.webfontloaderPromise = import(
47592
- /* webpackChunkName: "webfontloader" */ './fthry_webfontloader.CX5xEcgl.js').then(function (n) { return n.w; });
47590
+ /* webpackChunkName: "webfontloader" */ './fthry_webfontloader.DESOOCJe.js').then(function (n) { return n.w; });
47593
47591
  // Client-side tracking logic
47594
47592
  if (initState.userTracking === 'cookie') {
47595
47593
  var cookieKey = "feathery-user-id-".concat(sdkKey);
@@ -47735,7 +47733,7 @@ function getFieldValues() {
47735
47733
  return __assign({}, fieldValues);
47736
47734
  }
47737
47735
  function logFeatheryBadge() {
47738
- console.log('%c Feathery %c v' + "2.40.1" + ' ', // replaced with real version during build
47736
+ console.log('%c Feathery %c v' + "2.41.0" + ' ', // replaced with real version during build
47739
47737
  '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;');
47740
47738
  }
47741
47739
 
@@ -49250,64 +49248,64 @@ breakpoint) {
49250
49248
 
49251
49249
  var fieldLoaders = {
49252
49250
  AddressLine1: function () {
49253
- return import(/* webpackChunkName: "AddressField" */ './fthry_index.BGLOsRWg.js');
49251
+ return import(/* webpackChunkName: "AddressField" */ './fthry_index.HeX_lYBZ.js');
49254
49252
  },
49255
49253
  ButtonGroupField: function () {
49256
- return import(/* webpackChunkName: "ButtonGroupField" */ './fthry_index.BXDa3BX8.js');
49254
+ return import(/* webpackChunkName: "ButtonGroupField" */ './fthry_index.pHCTO9d-.js');
49257
49255
  },
49258
49256
  CheckboxField: function () {
49259
- return import(/* webpackChunkName: "CheckboxField" */ './fthry_index.XucW1AjN.js');
49257
+ return import(/* webpackChunkName: "CheckboxField" */ './fthry_index.c25IqSX6.js');
49260
49258
  },
49261
49259
  CheckboxGroupField: function () {
49262
- return import(/* webpackChunkName: "CheckboxGroupField" */ './fthry_index.Cuk_Vs8O.js');
49260
+ return import(/* webpackChunkName: "CheckboxGroupField" */ './fthry_index.C1zVJ3Wf.js');
49263
49261
  },
49264
49262
  ColorPickerField: function () {
49265
- return import(/* webpackChunkName: "ColorPickerField" */ './fthry_index.DNOrRr2p.js');
49263
+ return import(/* webpackChunkName: "ColorPickerField" */ './fthry_index.BrUrpkIy.js');
49266
49264
  },
49267
49265
  CustomField: function () {
49268
- return import(/* webpackChunkName: "CustomField" */ './fthry_index.HKMtuquq.js');
49266
+ return import(/* webpackChunkName: "CustomField" */ './fthry_index.PyoWaCZ6.js');
49269
49267
  },
49270
49268
  DateSelectorField: function () {
49271
- return import(/* webpackChunkName: "DateSelectorField" */ './fthry_index.DRsP7zHy.js');
49269
+ return import(/* webpackChunkName: "DateSelectorField" */ './fthry_index.D97WdEJD.js');
49272
49270
  },
49273
49271
  DropdownField: function () {
49274
- return import(/* webpackChunkName: "DropdownField" */ './fthry_index.DGrF6rBR.js');
49272
+ return import(/* webpackChunkName: "DropdownField" */ './fthry_index.Din0z99q.js');
49275
49273
  },
49276
49274
  DropdownMultiField: function () {
49277
- return import(/* webpackChunkName: "DropdownMultiField" */ './fthry_index.Cb2svRRS.js');
49275
+ return import(/* webpackChunkName: "DropdownMultiField" */ './fthry_index.DRf21FOT.js');
49278
49276
  },
49279
49277
  FileUploadField: function () {
49280
- return import(/* webpackChunkName: "FileUploadField" */ './fthry_index.BO07WkMA.js');
49278
+ return import(/* webpackChunkName: "FileUploadField" */ './fthry_index.kMe5pAne.js');
49281
49279
  },
49282
49280
  MatrixField: function () {
49283
- return import(/* webpackChunkName: "MatrixField" */ './fthry_index.DSvEn71B.js');
49281
+ return import(/* webpackChunkName: "MatrixField" */ './fthry_index.CpkJbhj2.js');
49284
49282
  },
49285
49283
  PasswordField: function () {
49286
- return import(/* webpackChunkName: "PasswordField" */ './fthry_index.DtnlZPBE.js');
49284
+ return import(/* webpackChunkName: "PasswordField" */ './fthry_index.Cxgu56Xt.js');
49287
49285
  },
49288
49286
  PaymentMethodField: function () {
49289
- return import(/* webpackChunkName: "PaymentMethodField" */ './fthry_PaymentMethodField.BNkIfG_Z.js');
49287
+ return import(/* webpackChunkName: "PaymentMethodField" */ './fthry_PaymentMethodField.PwUhO-uR.js');
49290
49288
  },
49291
- PhoneField: function () { return import(/* webpackChunkName: "PhoneField" */ './fthry_index.C55D2H1o.js'); },
49289
+ PhoneField: function () { return import(/* webpackChunkName: "PhoneField" */ './fthry_index.DNZw4sNY.js'); },
49292
49290
  PinInputField: function () {
49293
- return import(/* webpackChunkName: "PinInputField" */ './fthry_index.D9PZSsaC.js');
49291
+ return import(/* webpackChunkName: "PinInputField" */ './fthry_index.C7BrODdJ.js');
49294
49292
  },
49295
- QRScanner: function () { return import(/* webpackChunkName: "QRScanner" */ './fthry_index.DFAEKElD.js'); },
49293
+ QRScanner: function () { return import(/* webpackChunkName: "QRScanner" */ './fthry_index.CqLl_Dj_.js'); },
49296
49294
  RadioButtonGroupField: function () {
49297
49295
  return import(
49298
- /* webpackChunkName: "RadioButtonGroupField" */ './fthry_index.Dz10UO8A.js');
49296
+ /* webpackChunkName: "RadioButtonGroupField" */ './fthry_index.D88l_RDZ.js');
49299
49297
  },
49300
49298
  RatingField: function () {
49301
- return import(/* webpackChunkName: "RatingField" */ './fthry_index.D54GKwWT.js');
49299
+ return import(/* webpackChunkName: "RatingField" */ './fthry_index.CJFSHzAe.js');
49302
49300
  },
49303
49301
  SignatureField: function () {
49304
- return import(/* webpackChunkName: "SignatureField" */ './fthry_index.DGYmS3yE.js');
49302
+ return import(/* webpackChunkName: "SignatureField" */ './fthry_index.m2htvwhf.js');
49305
49303
  },
49306
49304
  SliderField: function () {
49307
- return import(/* webpackChunkName: "SliderField" */ './fthry_index.THknYMbR.js');
49305
+ return import(/* webpackChunkName: "SliderField" */ './fthry_index.CWHjYPzF.js');
49308
49306
  },
49309
- TextField: function () { return import(/* webpackChunkName: "TextField" */ './fthry_index.DRCzThWg.js'); },
49310
- TextArea: function () { return import(/* webpackChunkName: "TextArea" */ './fthry_index.BR6pD2W9.js'); }
49307
+ TextField: function () { return import(/* webpackChunkName: "TextField" */ './fthry_index.xs4pBnbE.js'); },
49308
+ TextArea: function () { return import(/* webpackChunkName: "TextArea" */ './fthry_index.C506fLTN.js'); }
49311
49309
  };
49312
49310
  var getPositionKey = function (element) { var _a; return ((_a = element.position) === null || _a === void 0 ? void 0 : _a.join(',')) || 'root'; };
49313
49311
  // Share the resolved component between preload and render. A separate
@@ -50236,7 +50234,7 @@ function isStepVisible(step) {
50236
50234
  }
50237
50235
  function StepperBar(_a) {
50238
50236
  var _b, _c;
50239
- var styles = _a.styles, stepConfigs = _a.stepConfigs, stepKey = _a.stepKey, _d = _a.textPlacement, textPlacement = _d === void 0 ? 'bottom' : _d, onStepClick = _a.onStepClick, _e = _a.vertical, vertical = _e === void 0 ? false : _e, style = _a.style;
50237
+ var styles = _a.styles, stepConfigs = _a.stepConfigs, stepKey = _a.stepKey, _d = _a.textPlacement, textPlacement = _d === void 0 ? 'bottom' : _d, onStepClick = _a.onStepClick, _e = _a.allowAllNavigation, allowAllNavigation = _e === void 0 ? false : _e, _f = _a.vertical, vertical = _f === void 0 ? false : _f, style = _a.style;
50240
50238
  var barStyles = styles.getTarget('bar');
50241
50239
  var showLabels = textPlacement !== 'none';
50242
50240
  var visibleStepConfigs = stepConfigs.filter(isStepVisible);
@@ -50261,7 +50259,12 @@ function StepperBar(_a) {
50261
50259
  var isActive = index === activeStep;
50262
50260
  var isLast = index === steps.length - 1;
50263
50261
  var sKey = (_a = visibleStepConfigs === null || visibleStepConfigs === void 0 ? void 0 : visibleStepConfigs[index]) === null || _a === void 0 ? void 0 : _a.step_key;
50264
- var isClickable = isCompleted && !!onStepClick && !!sKey;
50262
+ // With all-step navigation on, any step other than the current one is
50263
+ // clickable; otherwise only completed (already-visited) steps are.
50264
+ var isClickable = !!onStepClick &&
50265
+ !!sKey &&
50266
+ !isActive &&
50267
+ (allowAllNavigation || isCompleted);
50265
50268
  var connectorStyle = vertical
50266
50269
  ? {
50267
50270
  width: '2px',
@@ -50330,13 +50333,27 @@ function applyProgressBarStyles(responsiveStyles) {
50330
50333
  return responsiveStyles;
50331
50334
  }
50332
50335
  function ProgressBarElement(_a) {
50333
- var _b, _c, _d, _e, _f;
50334
- var element = _a.element, responsiveStyles = _a.responsiveStyles, progress = _a.progress, _g = _a.curDepth, curDepth = _g === void 0 ? 1 : _g, _h = _a.maxDepth, maxDepth = _h === void 0 ? 1 : _h, stepKey = _a.stepKey, changeStep = _a.changeStep, _j = _a.elementProps, elementProps = _j === void 0 ? {} : _j, children = _a.children;
50336
+ var _b, _c, _d, _e, _f, _g;
50337
+ var element = _a.element, responsiveStyles = _a.responsiveStyles, progress = _a.progress, _h = _a.curDepth, curDepth = _h === void 0 ? 1 : _h, _j = _a.maxDepth, maxDepth = _j === void 0 ? 1 : _j, stepKey = _a.stepKey, changeStep = _a.changeStep, runElementActions = _a.runElementActions, _k = _a.elementProps, elementProps = _k === void 0 ? {} : _k, children = _a.children;
50335
50338
  var styles = useMemo(function () { return applyProgressBarStyles(responsiveStyles); }, [responsiveStyles]);
50336
50339
  var vertical = element.styles.bar_direction === 'vertical';
50337
50340
  var containerProps = __assign({ css: __assign(__assign({ display: 'flex', flexDirection: 'column', position: 'relative', width: '100%' }, (vertical && { height: '100%' })), styles.getTarget('barContainer')) }, elementProps);
50338
50341
  if ((_b = element.properties) === null || _b === void 0 ? void 0 : _b.stepper) {
50339
- return (jsxs("div", __assign({}, containerProps, { children: [children, jsx$1(StepperBar, { styles: styles, stepConfigs: (_d = (_c = element.properties) === null || _c === void 0 ? void 0 : _c.stepper_steps) !== null && _d !== void 0 ? _d : [], stepKey: stepKey, textPlacement: element.styles.percent_text_layout, onStepClick: changeStep, vertical: vertical, style: vertical ? { flex: 1 } : undefined })] })));
50342
+ // When navigation to all steps is enabled, clicking a step validates and
50343
+ // submits the current step before navigating to the clicked step; otherwise
50344
+ // only already-visited steps are clickable and navigation happens directly.
50345
+ var allowAllNavigation = !!((_c = element.properties) === null || _c === void 0 ? void 0 : _c.navigate_to_all_steps);
50346
+ var onStepClick = allowAllNavigation
50347
+ ? function (targetStepKey) {
50348
+ return runElementActions({
50349
+ element: element,
50350
+ elementType: 'progress_bar',
50351
+ actions: [{ type: ACTION_NEXT, next_step_key: targetStepKey }],
50352
+ submit: true
50353
+ });
50354
+ }
50355
+ : changeStep;
50356
+ return (jsxs("div", __assign({}, containerProps, { children: [children, jsx$1(StepperBar, { styles: styles, stepConfigs: (_e = (_d = element.properties) === null || _d === void 0 ? void 0 : _d.stepper_steps) !== null && _e !== void 0 ? _e : [], stepKey: stepKey, textPlacement: element.styles.percent_text_layout, onStepClick: onStepClick, allowAllNavigation: allowAllNavigation, vertical: vertical, style: vertical ? { flex: 1 } : undefined })] })));
50340
50357
  }
50341
50358
  var userProgress, userSegments;
50342
50359
  if (![null, undefined].includes(progress)) {
@@ -50345,10 +50362,10 @@ function ProgressBarElement(_a) {
50345
50362
  }
50346
50363
  else {
50347
50364
  userProgress = progress.progress;
50348
- userSegments = (_e = progress.segments) !== null && _e !== void 0 ? _e : element.properties.num_segments;
50365
+ userSegments = (_f = progress.segments) !== null && _f !== void 0 ? _f : element.properties.num_segments;
50349
50366
  }
50350
50367
  }
50351
- userProgress = userProgress !== null && userProgress !== void 0 ? userProgress : (_f = element.properties) === null || _f === void 0 ? void 0 : _f.progress;
50368
+ userProgress = userProgress !== null && userProgress !== void 0 ? userProgress : (_g = element.properties) === null || _g === void 0 ? void 0 : _g.progress;
50352
50369
  var percent = isNum(userProgress)
50353
50370
  ? userProgress
50354
50371
  : Math.round((100 * (curDepth + 1)) / ((maxDepth || 1) + 1));
@@ -50519,7 +50536,7 @@ function ElementSkeleton(_a) {
50519
50536
  }
50520
50537
  var templateObject_1;
50521
50538
 
50522
- var TableElement = lazy(function () { return import(/* webpackChunkName: "TableElement" */ './fthry_index.tT6s5qHu.js'); });
50539
+ var TableElement = lazy(function () { return import(/* webpackChunkName: "TableElement" */ './fthry_index.DyPvHHnZ.js'); });
50523
50540
  var Basic = {
50524
50541
  ImageElement: ImageElement,
50525
50542
  VideoElement: VideoElement,