@wix/form-elements 1.168.0 → 1.170.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 (109) hide show
  1. package/dist/component/{appointment-rac-BbXyKTd7.js → appointment-rac-DZ0SFXmL.js} +83 -83
  2. package/dist/component/{bookings-address-rac-VJkR_U9L.js → bookings-address-rac-BW9grc77.js} +1 -1
  3. package/dist/component/{bookings-email-rac-_EupwXpQ.js → bookings-email-rac-D8gMaAfB.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-DTZixHYj.js → bookings-first-name-rac-CAjcs7b6.js} +1 -1
  5. package/dist/component/{bookings-header-rac-BKbKTv5g.js → bookings-header-rac-BhKZ1kku.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-BDy860-C.js → bookings-last-name-rac-DpsMDuU0.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-DgNP-YNZ.js → bookings-login-bar-rac-BVdWmKS8.js} +3 -3
  8. package/dist/component/{bookings-phone-rac-B_I6n96b.js → bookings-phone-rac-DsqNi2mI.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-prYPbIiz.js → bookings-rich-text-rac-elM4Ne3f.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-C-4PXuxG.js → checkbox-field-rac-BU4E73fD.js} +43 -43
  11. package/dist/component/{checkbox-group-field-headless-D16bAcaq.js → checkbox-group-field-headless-6yJdIbP2.js} +41 -41
  12. package/dist/component/{checkbox-group-field-rac-GUQ5dO_s.js → checkbox-group-field-rac-CojbCWSF.js} +4 -4
  13. package/dist/component/{checkbox-group-rac-Bl6xL5-H.js → checkbox-group-rac-3qUVUc-C.js} +1 -1
  14. package/dist/component/{checkbox-rac-Blg0KVyP.js → checkbox-rac-DwbTapd_.js} +1 -1
  15. package/dist/component/{contacts-address-rac-BfOhCAj8.js → contacts-address-rac-BL7XDZuP.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-DYBvDh62.js → contacts-birthdate-rac-DeJYIHAg.js} +1 -1
  17. package/dist/component/{contacts-company-rac-DIJr7zjA.js → contacts-company-rac-BeImf5uc.js} +1 -1
  18. package/dist/component/{contacts-email-rac-DjmqELhC.js → contacts-email-rac-CtacwrZ0.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-DGNll7gw.js → contacts-first-name-rac-CAdOqOOA.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-BJ8AZYQN.js → contacts-last-name-rac-Db9mHzCW.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-BC-QtpEN.js → contacts-phone-rac-W0OLEbzL.js} +1 -1
  22. package/dist/component/{contacts-position-rac-BQia__74.js → contacts-position-rac-CV4Ibt4Z.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-CTFptz01.js → contacts-subscribe-rac-CQ3Q1pjZ.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-Cy72Jouc.js → contacts-tax-id-rac-Dux-pk6r.js} +1 -1
  25. package/dist/component/{date-availability-BC6updcS.js → date-availability-RkX-Qw7G.js} +1 -1
  26. package/dist/component/date-input-field-rac-CYCT6qoa.js +309 -0
  27. package/dist/component/{date-input-rac-KkRyWRP_.js → date-input-rac-BkYZ7q_o.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-BLWVJbTJ.js → date-picker-field-rac-eMidYtsl.js} +31 -31
  29. package/dist/component/{date-picker-rac-DKCQza7v.js → date-picker-rac-D23rxZcF.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-CZxZW6fz.js → date-time-input-field-rac-BjIj4dXQ.js} +111 -111
  31. package/dist/component/{date-time-input-rac-DQ-iBwmr.js → date-time-input-rac-BSGAdk9L.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-kp1Jbwt-.js → dext-checkbox-group-rac-Xmb5IKrb.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-CBm9cRUz.js → dext-checkbox-rac-2eA7y0ld.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-DsVKWsRy.js → dext-date-picker-rac-CmLxVGGT.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-CO26-8Qo.js → dext-date-time-input-rac-Cd9nwSjb.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-eRzu2C-y.js → dext-dropdown-rac-BKdQ0nGS.js} +1 -1
  37. package/dist/component/{dext-email-rac-DDrZzE_G.js → dext-email-rac-07zDPxyf.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-Dj7sInLk.js → dext-number-input-rac-DRvGuppY.js} +1 -1
  39. package/dist/component/{dext-phone-rac-g8M77F7m.js → dext-phone-rac-CKtTVjFg.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-BjhygC0R.js → dext-radio-group-rac-BsBmMufq.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-BraNjvyA.js → dext-rating-input-rac-CcFSTAIh.js} +1 -1
  42. package/dist/component/{dext-tags-rac-B5mAIuDi.js → dext-tags-rac-CCTDlCvX.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-D_YBnaWi.js → dext-text-area-rac-Cif8po9h.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-BzeWH1jv.js → dext-text-input-rac-2118X4iF.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-Cn0h_vx3.js → dext-url-input-rac-DDImGkQe.js} +1 -1
  46. package/dist/component/{donation-rac-CQRdHxWh.js → donation-rac-Dnylss1d.js} +103 -103
  47. package/dist/component/{dropdown-field-rac-C7LL0W5Z.js → dropdown-field-rac-DDI4ZgZH.js} +3 -3
  48. package/dist/component/{dropdown-rac-Nb2VyJ0x.js → dropdown-rac-DX0Z3R_8.js} +1 -1
  49. package/dist/component/{ecom-address-rac-_c2YIIwg.js → ecom-address-rac-D9MeEQsk.js} +1 -1
  50. package/dist/component/{ecom-subscription-checkbox-rac-Bma7TAVj.js → ecom-subscription-checkbox-rac-DKJ9j5dj.js} +2 -2
  51. package/dist/component/{email-input-field-rac-2E2tEaS5.js → email-input-field-rac-DaKrmlwe.js} +55 -55
  52. package/dist/component/{events-repeater-rac-COWHYBFD.js → events-repeater-rac-DWrOLT0Y.js} +45 -45
  53. package/dist/component/{events-rsvp-rac-CXp8j19Y.js → events-rsvp-rac-YBTR1tR0.js} +6 -6
  54. package/dist/component/{field-error-headless-S-ugOQQX.js → field-error-headless-jksFrezt.js} +10 -10
  55. package/dist/component/{field-label-headless-_n4I0_tX.js → field-label-headless-BBvJAVxI.js} +10 -10
  56. package/dist/component/{file-upload-rac-DCH_iwDg.js → file-upload-rac-CgdmfUZG.js} +168 -168
  57. package/dist/component/{fixed-payment-rac-CYkKJUfM.js → fixed-payment-rac-v6rKwzFs.js} +13 -13
  58. package/dist/component/{form-jK8ezTss.js → form-BsiK682r.js} +530 -502
  59. package/dist/component/form.js +1 -1
  60. package/dist/component/{header-field-rac-DnbjI6W5.js → header-field-rac-BuXybl7K.js} +6 -6
  61. package/dist/component/{header-rac-DKUICrni.js → header-rac-CDyaLosW.js} +1 -1
  62. package/dist/component/{image-choice-rac-B_9ponST.js → image-choice-rac-BRlMroBw.js} +41 -41
  63. package/dist/component/{index-BxdMzOvN.js → index-BanOeCAF.js} +242 -236
  64. package/dist/component/{index-ZYnsxY-a.js → index-y9URYGEE.js} +6 -6
  65. package/dist/component/{isObjectLike-BW-9QEQl.js → isObjectLike-BG9nJ-rx.js} +7 -7
  66. package/dist/component/{multiline-address-field-rac-k-P0ijWG.js → multiline-address-field-rac-DRAkxI1l.js} +342 -342
  67. package/dist/component/{multiline-address-rac-Bbn9mNDa.js → multiline-address-rac-JjTzWsEb.js} +1 -1
  68. package/dist/component/{number-input-field-rac--lom-B_X.js → number-input-field-rac-QrouG7Hv.js} +22 -22
  69. package/dist/component/{number-input-rac-Bhbd6T9S.js → number-input-rac-DGmE7cLv.js} +1 -1
  70. package/dist/component/{password-rac-BV_uTHb3.js → password-rac-DeyY228m.js} +28 -28
  71. package/dist/component/{payment-input-rac-cawyGN_t.js → payment-input-rac-DmIennLi.js} +45 -45
  72. package/dist/component/{phone-input-field-rac-CsElHRto.js → phone-input-field-rac-F7e74TGA.js} +76 -76
  73. package/dist/component/{phone-rac-XrHN5Nko.js → phone-rac-CQfB2CQD.js} +1 -1
  74. package/dist/component/{product-list-rac-cxv_xz7K.js → product-list-rac--GGG8vvO.js} +62 -62
  75. package/dist/component/{quiz-radio-group-rac-DGaxOPE1.js → quiz-radio-group-rac-DF2C2vNq.js} +1 -1
  76. package/dist/component/{radio-button-module-classes-Xv2Jn01x.js → radio-button-module-classes-DmpNo6F2.js} +17 -17
  77. package/dist/component/{radio-group-field-rac-DgGqgTql.js → radio-group-field-rac-BGcPYfKO.js} +6 -6
  78. package/dist/component/{radio-group-rac-Bh0E-oe1.js → radio-group-rac-CqysUMCE.js} +1 -1
  79. package/dist/component/{rating-input-field-rac-C3YLV971.js → rating-input-field-rac-D-ei917Y.js} +24 -24
  80. package/dist/component/{rating-input-rac-CfcC5EUh.js → rating-input-rac-a9zJ74fw.js} +1 -1
  81. package/dist/component/{rich-content-rac.module-DUjzLGtX.js → rich-content-rac.module-CvyLVlXL.js} +5 -5
  82. package/dist/component/{rich-text-field-rac-BmguoJhk.js → rich-text-field-rac-vf19nvyw.js} +7 -7
  83. package/dist/component/{rich-text-rac-BWhHcq25.js → rich-text-rac-Cx_wpoxC.js} +1 -1
  84. package/dist/component/{service-dropdown-rac-C5oX-ql7.js → service-dropdown-rac-DITzKQxd.js} +26 -26
  85. package/dist/component/{services-multi-choice-rac-C1fem9NB.js → services-multi-choice-rac-BtisN0Aq.js} +11 -11
  86. package/dist/component/{signature-rac-BtHqiWj1.js → signature-rac-DUeIoS5O.js} +226 -226
  87. package/dist/component/{submit-button-rac-OYeKJFF8.js → submit-button-rac-C8h6zeTw.js} +36 -36
  88. package/dist/component/{tags-field-rac-kA2RSijL.js → tags-field-rac-CjFuiB0n.js} +51 -51
  89. package/dist/component/{tags-rac-B_2qCZGu.js → tags-rac-BO7rwyLl.js} +1 -1
  90. package/dist/component/{text-area-field-rac-DeO609Mv.js → text-area-field-rac-CgUx3nQ0.js} +23 -23
  91. package/dist/component/{text-area-rac-BAQFBOZd.js → text-area-rac-WgXYXIaf.js} +1 -1
  92. package/dist/component/{text-input-field-rac-CCcKwuLZ.js → text-input-field-rac-DaxWFha-.js} +6 -6
  93. package/dist/component/{text-input-headless-D8-jkaYm.js → text-input-headless-hjuRJTZN.js} +6 -6
  94. package/dist/component/{text-input-rac-BVcgjj8g.js → text-input-rac-BzumrJBj.js} +1 -1
  95. package/dist/component/{time-input-rac-BYctyHgU.js → time-input-rac-2FEkpQ7M.js} +18 -18
  96. package/dist/component/{url-input-field-rac-COC9qgcs.js → url-input-field-rac-BZ9f8D8I.js} +26 -26
  97. package/dist/component/{url-input-rac-BZXLh0Ej.js → url-input-rac-D-AVlxkD.js} +1 -1
  98. package/dist/component/{use-dropdown-option-class-name-BTltqRl1.js → use-dropdown-option-class-name-DwAAtzgX.js} +11 -11
  99. package/dist/component/{use-dropdown-trigger-class-name-BjJZfl3i.js → use-dropdown-trigger-class-name-D-6n9YVG.js} +18 -18
  100. package/dist/component/{use-element-state-class-name-CkT6Ga8t.js → use-element-state-class-name-C5auxwhj.js} +3 -3
  101. package/dist/component/{use-hoverable-input-class-name-BkoSr6tr.js → use-hoverable-input-class-name-Nd2jqfz4.js} +2 -2
  102. package/dist/component/use-is-forced-open-dropdown-CKaHhCqp.js +64 -0
  103. package/dist/component/{use-service-options-base-Wp8RZ4Z8.js → use-service-options-base-CvluFheT.js} +3 -3
  104. package/dist/component/use-text-input-class-name-DGTlYJxC.js +6 -0
  105. package/dist/form.d.ts +19 -0
  106. package/package.json +2 -2
  107. package/dist/component/date-input-field-rac-b_T1yf8D.js +0 -309
  108. package/dist/component/use-is-forced-open-dropdown-fo_NCnSk.js +0 -53
  109. package/dist/component/use-text-input-class-name-DS7i03Gk.js +0 -6
@@ -1,39 +1,39 @@
1
- import r, { useRef as V, useContext as Ne, useMemo as be, useCallback as _, useState as q, useEffect as le, Children as Fe, isValidElement as Le } from "react";
2
- import we from "@wix/editor-react-components/AnimatedIcon";
3
- import { RicosViewer as xe } from "@wix/ricos/viewer";
1
+ import r, { useRef as V, useContext as Re, useMemo as he, useCallback as y, useState as q, useEffect as le, Children as Ne, isValidElement as be } from "react";
2
+ import Fe from "@wix/editor-react-components/AnimatedIcon";
3
+ import { RicosViewer as we } from "@wix/ricos/viewer";
4
4
  import F from "classnames";
5
- import { b5 as Ue, bx as Te, aJ as Be, F as Oe, bz as Pe, bv as Me, bL as Ce, E as me, az as oe, bD as x, bA as z, bF as Ie, bN as He, bw as ze, U as We, af as Ye, ag as Ze, G as pe, b as ke, am as Ge, an as fe, K as Ve, ah as $e, ak as Xe, ai as qe, al as je, f as ne, aj as Je } from "./form-jK8ezTss.js";
6
- import { useHover as Ke, useFocusRing as Qe, mergeProps as et } from "react-aria";
7
- import { RadioGroup as tt, Button as ye, TextField as nt, DropZone as at, Input as ot, FileTrigger as st, RadioField as rt, RadioButton as lt } from "react-aria-components";
5
+ import { bc as xe, bE as Le, aQ as Ue, F as Be, bG as Oe, bC as Pe, bS as Te, E as me, aG as oe, bK as x, bH as W, bM as Ce, bU as Me, bD as He, X as We, al as ze, am as Ye, an as Ge, b as Ze, at as ke, au as pe, M as Ve, I as $e, ao as Xe, ar as qe, ap as je, as as Ke, f as ne, aq as Je } from "./form-BsiK682r.js";
6
+ import { useHover as Qe, useFocusRing as et, mergeProps as tt } from "react-aria";
7
+ import { RadioGroup as nt, Button as Ie, TextField as at, DropZone as ot, Input as st, FileTrigger as rt, RadioField as lt, RadioButton as it } from "react-aria-components";
8
8
  import _e from "signature_pad";
9
9
  import { f as I, a as N } from "./find-child-C60k4CxG.js";
10
- import { D as it, E as ct } from "./field-error-headless-S-ugOQQX.js";
11
- import { L as ut } from "./field-label-headless-_n4I0_tX.js";
12
- import { D as dt } from "./data-hooks-Dkw1pbRj.js";
13
- import { E as mt } from "./error-icon-hZxQ6DEy.js";
10
+ import { D as ct, E as ut } from "./field-error-headless-jksFrezt.js";
11
+ import { L as dt } from "./field-label-headless-BBvJAVxI.js";
12
+ import { D as mt } from "./data-hooks-Dkw1pbRj.js";
13
+ import { E as pt } from "./error-icon-hZxQ6DEy.js";
14
14
  import { s as ae } from "./field-rac.module-ts2t4WUO.js";
15
- import { u as X } from "./use-element-state-class-name-CkT6Ga8t.js";
16
- const pt = typeof r.useId == "function" ? r.useId : () => V(Ue()).current, ft = ({ properties: e }) => e.uploadEnabled === !0, Et = (e, t) => e.fieldType === Oe.SIGNATURE && !e.properties.hidden && !e.properties.disabled && !e.properties.readOnly && (t !== "upload" || ft(e)), gt = (e, t) => e.layout.row - t.layout.row || e.layout.column - t.layout.column, ht = (e) => {
15
+ import { u as X } from "./use-element-state-class-name-C5auxwhj.js";
16
+ const ft = typeof r.useId == "function" ? r.useId : () => V(xe()).current, Et = ({ properties: e }) => e.uploadEnabled === !0, gt = (e, t) => e.fieldType === Be.SIGNATURE && !e.properties.hidden && !e.properties.disabled && !e.properties.readOnly && (t !== "upload" || Et(e)), ht = (e, t) => e.layout.row - t.layout.row || e.layout.column - t.layout.column, bt = (e) => {
17
17
  var o;
18
- const t = (o = Te().signature) == null ? void 0 : o.signatureMode, a = Ne(Be);
19
- return be(() => {
18
+ const t = (o = Le().signature) == null ? void 0 : o.signatureMode, a = Re(Ue);
19
+ return he(() => {
20
20
  var s;
21
- return a && !a.parentId && t ? (s = a.fields.filter((l) => Et(l, t)).sort(gt)[0]) == null ? void 0 : s.id : void 0;
21
+ return a && !a.parentId && t ? (s = a.fields.filter((l) => gt(l, t)).sort(ht)[0]) == null ? void 0 : s.id : void 0;
22
22
  }, [
23
23
  a,
24
24
  t
25
25
  ]) === e ? t : void 0;
26
26
  };
27
- var A = /* @__PURE__ */ (function(e) {
27
+ var S = /* @__PURE__ */ (function(e) {
28
28
  return e.TEXT = "text/plain", e.POINTS = "points/json", e;
29
29
  })({}), C = /* @__PURE__ */ (function(e) {
30
30
  return e.DRAW = "draw", e.TYPE = "type", e.UPLOAD = "upload", e;
31
- })({}), R = /* @__PURE__ */ (function(e) {
31
+ })({}), A = /* @__PURE__ */ (function(e) {
32
32
  return e.DRAW = "draw", e.TYPE = "type", e.IMAGE = "image", e.UPLOAD = "upload", e;
33
33
  })({});
34
- const bt = (e) => {
35
- const { actions: t, formId: a } = Pe(), n = t == null ? void 0 : t.uploadFile;
36
- return _(async (o) => {
34
+ const Lt = (e) => {
35
+ const { actions: t, formId: a } = Oe(), n = t == null ? void 0 : t.uploadFile;
36
+ return y(async (o) => {
37
37
  if (!n)
38
38
  throw new Error("No uploadFile action");
39
39
  const s = await n({
@@ -53,26 +53,26 @@ const bt = (e) => {
53
53
  e
54
54
  ]);
55
55
  };
56
- function Lt(e) {
56
+ function Tt(e) {
57
57
  const a = j(1, 1).getContext("2d");
58
58
  a.fillStyle = e, a.fillRect(0, 0, 1, 1);
59
59
  const n = a.getImageData(0, 0, 1, 1);
60
60
  return n.data[0] * 65536 + n.data[1] * 256 + n.data[2];
61
61
  }
62
- const Tt = (e, t) => {
63
- const a = Lt(e);
62
+ const Ct = (e, t) => {
63
+ const a = Tt(e);
64
64
  return (n, o) => {
65
65
  const s = (o * t.width + n) * 4;
66
66
  return t.data[s] * 65536 + t.data[s + 1] * 256 + t.data[s + 2] === a;
67
67
  };
68
- }, Ct = (e) => (t, a) => {
68
+ }, It = (e) => (t, a) => {
69
69
  const n = (a * e.width + t) * 4;
70
70
  return e.data[n + 3] === 0;
71
71
  };
72
72
  function re(e, t) {
73
73
  const a = e.getContext("2d", {
74
74
  willReadFrequently: !0
75
- }), n = e.width, o = e.height, s = a.getImageData(0, 0, n, o), l = t ? Tt(t, s) : Ct(s);
75
+ }), n = e.width, o = e.height, s = a.getImageData(0, 0, n, o), l = t ? Ct(t, s) : It(s);
76
76
  let i = n + 1, c = -1, u = o + 1, d = -1, f = 0, m = 0;
77
77
  for (m = 0; m < o; m++)
78
78
  for (f = 0; f < n; f++)
@@ -93,7 +93,7 @@ function j(e, t, a) {
93
93
  }
94
94
  return n;
95
95
  }
96
- function It(e, t) {
96
+ function _t(e, t) {
97
97
  return new Promise((a, n) => {
98
98
  const o = new Image();
99
99
  o.onload = () => {
@@ -104,28 +104,28 @@ function It(e, t) {
104
104
  }, o.onerror = n, o.src = e;
105
105
  });
106
106
  }
107
- function Ee(e, t, a, n) {
107
+ function fe(e, t, a, n) {
108
108
  const o = e.width, s = e.height, l = 1, i = a / s, c = Math.min(i, l), u = o * c, d = s * c, f = j(u, d), m = f.getContext("2d");
109
109
  return n && m && (m.fillStyle = n, m.fillRect(0, 0, u, d)), m == null || m.drawImage(e, 0, 0, o, s, 0, 0, u, d), f;
110
110
  }
111
- function ge(e, t) {
111
+ function Ee(e, t) {
112
112
  const a = e.getContext("2d"), n = e.offsetWidth, o = e.offsetHeight, s = Math.max(window.devicePixelRatio || 1, 1), l = n * s, i = o * s;
113
113
  return (e.width !== l || e.height !== i) && a ? (e.width = l, e.height = i, a.scale(s, s), t == null || t.redraw(), !0) : !1;
114
114
  }
115
- const G = 480, yt = (e) => Se({
115
+ const k = 480, yt = (e) => Ae({
116
116
  data: JSON.stringify(e),
117
- mimeType: A.POINTS
118
- }), ve = (e) => {
119
- const t = W(e);
120
- if ((t == null ? void 0 : t.mimeType) === A.POINTS)
117
+ mimeType: S.POINTS
118
+ }), ye = (e) => {
119
+ const t = z(e);
120
+ if ((t == null ? void 0 : t.mimeType) === S.POINTS)
121
121
  try {
122
122
  return JSON.parse(t.data);
123
123
  } catch {
124
124
  return null;
125
125
  }
126
126
  return null;
127
- }, he = 0.8, De = "Madefor";
128
- function Ae(e, t) {
127
+ }, ge = 0.8, ve = "Madefor";
128
+ function De(e, t) {
129
129
  const { width: a, actualBoundingBoxAscent: n, actualBoundingBoxDescent: o } = t.measureText(e);
130
130
  return {
131
131
  width: a,
@@ -133,28 +133,28 @@ function Ae(e, t) {
133
133
  offsetY: n
134
134
  };
135
135
  }
136
- function _t(e, t) {
137
- const a = t.getContext("2d"), n = t.offsetWidth || t.width, s = (t.offsetHeight || t.height) * he, l = n * he;
138
- a.font = `${s}px ${De}`;
139
- const { width: i, height: c } = Ae(e, a), u = s / (i / l), d = s / (c / s);
136
+ function vt(e, t) {
137
+ const a = t.getContext("2d"), n = t.offsetWidth || t.width, s = (t.offsetHeight || t.height) * ge, l = n * ge;
138
+ a.font = `${s}px ${ve}`;
139
+ const { width: i, height: c } = De(e, a), u = s / (i / l), d = s / (c / s);
140
140
  return Math.min(u, d);
141
141
  }
142
- function vt(e, t, a = "black", n = !1, o) {
143
- const s = e.getContext("2d"), l = _t(t, e);
144
- s.font = `${l}px ${De}`, s.textBaseline = "top";
145
- const i = e.offsetWidth || e.width, c = e.offsetHeight || e.height, { width: u, height: d, offsetY: f } = Ae(t, s);
142
+ function Dt(e, t, a = "black", n = !1, o) {
143
+ const s = e.getContext("2d"), l = vt(t, e);
144
+ s.font = `${l}px ${ve}`, s.textBaseline = "top";
145
+ const i = e.offsetWidth || e.width, c = e.offsetHeight || e.height, { width: u, height: d, offsetY: f } = De(t, s);
146
146
  s.fillStyle = o, s.fillRect(0, 0, i, c), s.fillStyle = a;
147
147
  const m = (i - u) / 2;
148
148
  s.fillText(t, n ? i - m : m, (c - d) / 2 + f);
149
149
  }
150
- const Re = /^data:([^;,]+)(?:;([^,]+))?,(.+)$/;
151
- function Dt(e) {
152
- return Re.test(e);
150
+ const Se = /^data:([^;,]+)(?:;([^,]+))?,(.+)$/;
151
+ function St(e) {
152
+ return Se.test(e);
153
153
  }
154
- function W(e) {
154
+ function z(e) {
155
155
  if (!e)
156
156
  return;
157
- const t = e.match(Re);
157
+ const t = e.match(Se);
158
158
  if (!t)
159
159
  return;
160
160
  const [, a, n, o] = t;
@@ -164,12 +164,12 @@ function W(e) {
164
164
  encoding: n
165
165
  };
166
166
  }
167
- function Se({ data: e, mimeType: t, encoding: a = "text" }) {
167
+ function Ae({ data: e, mimeType: t, encoding: a = "text" }) {
168
168
  const n = a === "base64" ? btoa(e) : encodeURI(e);
169
169
  return `data:${a === "base64" ? `${t};base64` : t},${n}`;
170
170
  }
171
171
  function At(e, t) {
172
- const a = W(e);
172
+ const a = z(e);
173
173
  if (!a)
174
174
  return;
175
175
  let n = a.data.length;
@@ -184,7 +184,7 @@ function At(e, t) {
184
184
  });
185
185
  }
186
186
  function ie(e, t = "temp") {
187
- const a = W(e);
187
+ const a = z(e);
188
188
  return {
189
189
  fileId: "temp",
190
190
  displayName: t,
@@ -193,53 +193,53 @@ function ie(e, t = "temp") {
193
193
  };
194
194
  }
195
195
  async function Rt(e, t) {
196
- const a = W(e);
196
+ const a = z(e);
197
197
  if (!a)
198
198
  return e;
199
199
  const n = a.mimeType;
200
- if (n === A.TEXT) {
201
- const o = j(G * 20, G, 1);
202
- vt(o, a.data, "black", t, "white");
200
+ if (n === S.TEXT) {
201
+ const o = j(k * 20, k, 1);
202
+ Dt(o, a.data, "black", t, "white");
203
203
  const s = re(o, "white");
204
204
  return (s == null ? void 0 : s.toDataURL("image/jpeg", 0.7)) ?? null;
205
205
  }
206
- if (n === A.POINTS) {
207
- const o = ve(e);
206
+ if (n === S.POINTS) {
207
+ const o = ye(e);
208
208
  if (!o)
209
209
  return null;
210
210
  const s = o.map((d) => ({
211
211
  ...d,
212
212
  penColor: "black"
213
- })), l = j(G * 20, G, Math.max(window.devicePixelRatio || 1, 1));
213
+ })), l = j(k * 20, k, Math.max(window.devicePixelRatio || 1, 1));
214
214
  new _e(l).fromData(s);
215
215
  const c = re(l);
216
- return c ? Ee(c, void 0, G, "white").toDataURL("image/jpeg", 0.7) : null;
216
+ return c ? fe(c, void 0, k, "white").toDataURL("image/jpeg", 0.7) : null;
217
217
  }
218
218
  if (n != null && n.startsWith("image/")) {
219
- const o = await It(e), s = re(o);
220
- return s ? Ee(s, void 0, G).toDataURL("image/jpeg", 0.7) : null;
219
+ const o = await _t(e), s = re(o);
220
+ return s ? fe(s, void 0, k).toDataURL("image/jpeg", 0.7) : null;
221
221
  }
222
222
  return e;
223
223
  }
224
- async function St(e, t) {
224
+ async function Nt(e, t) {
225
225
  const a = await Rt(e, t);
226
226
  if (a)
227
227
  return At(a, "signature");
228
228
  }
229
- const Nt = ({ value: e, onChange: t, target: a }) => {
230
- const [n, o] = q(e), { isRTL: s } = Me(), l = bt(a), { setFormStatus: i } = Ce(), c = V();
229
+ const Ft = ({ value: e, onChange: t, target: a }) => {
230
+ const [n, o] = q(e), { isRTL: s } = Pe(), l = Lt(a), { setFormStatus: i } = Te(), c = V();
231
231
  le(() => {
232
232
  e === me && o(me);
233
233
  }, [
234
234
  e
235
235
  ]);
236
- const u = _(() => {
236
+ const u = y(() => {
237
237
  c.current && (clearTimeout(c.current), c.current = null);
238
- }, []), d = n == null ? void 0 : n[0], f = d != null && d.url ? W(d.url) : void 0, m = _(async (h) => {
238
+ }, []), d = n == null ? void 0 : n[0], f = d != null && d.url ? z(d.url) : void 0, m = y(async (h) => {
239
239
  try {
240
240
  const p = (h == null ? void 0 : h.url) ?? "";
241
- if (Dt(p)) {
242
- const g = await St(p, s);
241
+ if (St(p)) {
242
+ const g = await Nt(p, s);
243
243
  if (g) {
244
244
  const E = await l(g);
245
245
  t([
@@ -260,7 +260,7 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
260
260
  t
261
261
  ]);
262
262
  return {
263
- handleChange: _((h) => {
263
+ handleChange: y((h) => {
264
264
  const p = (g) => {
265
265
  c.current = setTimeout(() => m(g), 1500);
266
266
  };
@@ -277,8 +277,8 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
277
277
  decodedValue: f,
278
278
  cancelUpload: u
279
279
  };
280
- }, Ft = ({ target: e, value: t, onChange: a }) => {
281
- const { handleChange: n, cancelUpload: o, signature: s, decodedValue: l } = Nt({
280
+ }, wt = ({ target: e, value: t, onChange: a }) => {
281
+ const { handleChange: n, cancelUpload: o, signature: s, decodedValue: l } = Ft({
282
282
  value: t,
283
283
  onChange: a,
284
284
  target: e
@@ -286,36 +286,36 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
286
286
  if (s == null)
287
287
  return C.DRAW;
288
288
  switch (l == null ? void 0 : l.mimeType) {
289
- case A.POINTS:
289
+ case S.POINTS:
290
290
  return C.DRAW;
291
- case A.TEXT:
291
+ case S.TEXT:
292
292
  return C.TYPE;
293
293
  default:
294
294
  return C.UPLOAD;
295
295
  }
296
- }), { setFormStatus: u } = Ce(), d = _(() => {
296
+ }), { setFormStatus: u } = Te(), d = y(() => {
297
297
  o(), u(e, oe.BUSY);
298
298
  }, [
299
299
  o,
300
300
  u,
301
301
  e
302
- ]), f = _(() => {
302
+ ]), f = y(() => {
303
303
  o(), n(null), u(e, oe.READY);
304
304
  }, [
305
305
  o,
306
306
  n,
307
307
  u,
308
308
  e
309
- ]), m = s != null, L = xt(i, s, l), h = (() => {
309
+ ]), m = s != null, L = Ut(i, s, l), h = (() => {
310
310
  switch (i) {
311
311
  case C.DRAW:
312
- return R.DRAW;
312
+ return A.DRAW;
313
313
  case C.TYPE:
314
- return R.TYPE;
314
+ return A.TYPE;
315
315
  case C.UPLOAD:
316
- return L != null ? R.IMAGE : R.UPLOAD;
316
+ return L != null ? A.IMAGE : A.UPLOAD;
317
317
  default:
318
- return R.DRAW;
318
+ return A.DRAW;
319
319
  }
320
320
  })();
321
321
  return {
@@ -330,23 +330,23 @@ const Nt = ({ value: e, onChange: t, target: a }) => {
330
330
  handleBeforeChange: d,
331
331
  handleClear: f
332
332
  };
333
- }, wt = {
334
- [C.DRAW]: (e) => (e == null ? void 0 : e.mimeType) === A.POINTS,
335
- [C.TYPE]: (e) => (e == null ? void 0 : e.mimeType) === A.TEXT,
336
- [C.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !== A.POINTS && (e == null ? void 0 : e.mimeType) !== A.TEXT
333
+ }, xt = {
334
+ [C.DRAW]: (e) => (e == null ? void 0 : e.mimeType) === S.POINTS,
335
+ [C.TYPE]: (e) => (e == null ? void 0 : e.mimeType) === S.TEXT,
336
+ [C.UPLOAD]: (e) => (e == null ? void 0 : e.mimeType) !== S.POINTS && (e == null ? void 0 : e.mimeType) !== S.TEXT
337
337
  };
338
- function xt(e, t, a) {
339
- return t && wt[e](a) ? t : void 0;
338
+ function Ut(e, t, a) {
339
+ return t && xt[e](a) ? t : void 0;
340
340
  }
341
- const Ut = (e) => {
342
- const t = e.url ? W(e.url) : void 0;
343
- return t ? t.mimeType !== A.POINTS && t.mimeType !== A.TEXT : !0;
341
+ const Bt = (e) => {
342
+ const t = e.url ? z(e.url) : void 0;
343
+ return t ? t.mimeType !== S.POINTS && t.mimeType !== S.TEXT : !0;
344
344
  }, ce = () => {
345
- const { hoverProps: e, isHovered: t } = Ke({}), { focusProps: a, isFocused: n, isFocusVisible: o } = Qe({
345
+ const { hoverProps: e, isHovered: t } = Qe({}), { focusProps: a, isFocused: n, isFocusVisible: o } = et({
346
346
  within: !0
347
347
  });
348
348
  return {
349
- ...et(e, a),
349
+ ...tt(e, a),
350
350
  "data-hovered": t || void 0,
351
351
  "data-focus-within": n || void 0,
352
352
  "data-focus-visible": o || void 0
@@ -359,21 +359,21 @@ const Ut = (e) => {
359
359
  renderInput: () => o,
360
360
  renderDescription: () => /* @__PURE__ */ r.createElement(r.Fragment, null, l, s)
361
361
  });
362
- }, Bt = {
363
- [C.DRAW]: R.DRAW,
364
- [C.TYPE]: R.TYPE,
365
- [C.UPLOAD]: R.UPLOAD
366
- }, J = ({ children: e, className: t }) => {
367
- const { id: a, value: n, onChange: o, target: s, readOnly: l } = x(), i = ht(a), { signatureMode: c, setSignatureMode: u, handleClear: d, clearable: f, signatureView: m, signatureValueForView: L, handleChange: h, handleBeforeChange: p } = Ft({
362
+ }, Ot = {
363
+ [C.DRAW]: A.DRAW,
364
+ [C.TYPE]: A.TYPE,
365
+ [C.UPLOAD]: A.UPLOAD
366
+ }, K = ({ children: e, className: t }) => {
367
+ const { id: a, value: n, onChange: o, target: s, readOnly: l } = x(), i = bt(a), { signatureMode: c, setSignatureMode: u, handleClear: d, clearable: f, signatureView: m, signatureValueForView: L, handleChange: h, handleBeforeChange: p } = wt({
368
368
  target: s,
369
369
  value: n,
370
370
  onChange: o
371
- }), g = I(e, J.Header), E = I(e, J.Value), S = {
371
+ }), g = I(e, K.Header), E = I(e, K.Value), R = {
372
372
  signatureMode: i ?? c,
373
373
  setSignatureMode: u,
374
374
  handleClear: d,
375
375
  clearable: f,
376
- signatureView: i ? Bt[i] : m,
376
+ signatureView: i ? Ot[i] : m,
377
377
  signatureValueForView: i ? void 0 : L,
378
378
  handleChange: h,
379
379
  handleBeforeChange: p
@@ -381,9 +381,9 @@ const Ut = (e) => {
381
381
  return /* @__PURE__ */ r.createElement("div", {
382
382
  className: t,
383
383
  "data-hook": "signature-container"
384
- }, !l && N(g, S), N(E, S));
385
- }, K = ({ children: e, className: t, ...a }) => {
386
- const { signatureMode: n, setSignatureMode: o, clearable: s, handleClear: l } = a, { uploadEnabled: i } = x(), c = I(e, K.Tabs), u = I(e, K.Clear);
384
+ }, !l && N(g, R), N(E, R));
385
+ }, J = ({ children: e, className: t, ...a }) => {
386
+ const { signatureMode: n, setSignatureMode: o, clearable: s, handleClear: l } = a, { uploadEnabled: i } = x(), c = I(e, J.Tabs), u = I(e, J.Clear);
387
387
  return /* @__PURE__ */ r.createElement("div", {
388
388
  className: t
389
389
  }, N(c, {
@@ -394,7 +394,7 @@ const Ut = (e) => {
394
394
  handleClear: l
395
395
  }));
396
396
  }, M = ({ children: e, className: t, ...a }) => {
397
- const { signatureMode: n, setSignatureMode: o, uploadEnabled: s } = a, { disabled: l } = x(), { labelId: i, inputId: c } = z(), u = _((L) => {
397
+ const { signatureMode: n, setSignatureMode: o, uploadEnabled: s } = a, { disabled: l } = x(), { labelId: i, inputId: c } = W(), u = y((L) => {
398
398
  o(L);
399
399
  }, [
400
400
  o
@@ -402,7 +402,7 @@ const Ut = (e) => {
402
402
  [C.DRAW]: I(e, M.Draw),
403
403
  [C.TYPE]: I(e, M.Type),
404
404
  [C.UPLOAD]: s ? I(e, M.Upload) : null
405
- }, f = d[n], m = Ot(f) ? f.props.description : void 0;
405
+ }, f = d[n], m = Pt(f) ? f.props.description : void 0;
406
406
  return /* @__PURE__ */ r.createElement(r.Fragment, null, /* @__PURE__ */ r.createElement("div", {
407
407
  role: "status",
408
408
  "aria-live": "polite",
@@ -413,33 +413,33 @@ const Ut = (e) => {
413
413
  height: "1px",
414
414
  overflow: "hidden"
415
415
  }
416
- }, m), /* @__PURE__ */ r.createElement(tt, {
416
+ }, m), /* @__PURE__ */ r.createElement(nt, {
417
417
  value: n,
418
418
  onChange: u,
419
419
  isDisabled: l,
420
420
  "aria-labelledby": i,
421
421
  "aria-controls": c,
422
- "data-hook": dt.SIGNATURE_FIELD_MODE_SELECT,
422
+ "data-hook": mt.SIGNATURE_FIELD_MODE_SELECT,
423
423
  className: t
424
424
  }, d[C.DRAW], d[C.TYPE], d[C.UPLOAD]));
425
- }, Ot = (e) => /* @__PURE__ */ Le(e), ue = ({ mode: e, children: t, className: a, "aria-label": n }) => /* @__PURE__ */ r.createElement(rt, {
425
+ }, Pt = (e) => /* @__PURE__ */ be(e), ue = ({ mode: e, children: t, className: a, "aria-label": n }) => /* @__PURE__ */ r.createElement(lt, {
426
426
  value: e,
427
427
  "aria-label": n
428
- }, /* @__PURE__ */ r.createElement(lt, {
428
+ }, /* @__PURE__ */ r.createElement(it, {
429
429
  "data-hook": `signature-mode-${e}`,
430
430
  className: a
431
- }, t)), Pt = (e) => /* @__PURE__ */ r.createElement(ue, {
431
+ }, t)), Mt = (e) => /* @__PURE__ */ r.createElement(ue, {
432
432
  ...e,
433
433
  mode: C.DRAW
434
- }), Mt = (e) => /* @__PURE__ */ r.createElement(ue, {
434
+ }), Ht = (e) => /* @__PURE__ */ r.createElement(ue, {
435
435
  ...e,
436
436
  mode: C.TYPE
437
- }), Ht = (e) => /* @__PURE__ */ r.createElement(ue, {
437
+ }), Wt = (e) => /* @__PURE__ */ r.createElement(ue, {
438
438
  ...e,
439
439
  mode: C.UPLOAD
440
440
  }), zt = ({ children: e, className: t, "aria-label": a, ...n }) => {
441
- const { handleClear: o } = n, { disabled: s, target: l } = x(), { inputId: i } = z();
442
- return /* @__PURE__ */ r.createElement(ye, {
441
+ const { handleClear: o } = n, { disabled: s, target: l } = x(), { inputId: i } = W();
442
+ return /* @__PURE__ */ r.createElement(Ie, {
443
443
  onPress: o,
444
444
  isDisabled: s,
445
445
  "aria-label": a,
@@ -455,7 +455,7 @@ const Ut = (e) => {
455
455
  "data-invalid": f,
456
456
  "data-disabled": i,
457
457
  "data-readonly": c
458
- }, n === R.DRAW && N(m, {
458
+ }, n === A.DRAW && N(m, {
459
459
  value: o,
460
460
  onChange: s,
461
461
  onBeforeChange: l,
@@ -463,7 +463,7 @@ const Ut = (e) => {
463
463
  readOnly: c,
464
464
  onBlur: u,
465
465
  onFocus: d
466
- }), n === R.TYPE && N(L, {
466
+ }), n === A.TYPE && N(L, {
467
467
  value: o,
468
468
  onChange: s,
469
469
  onBeforeChange: l,
@@ -471,7 +471,7 @@ const Ut = (e) => {
471
471
  readOnly: c,
472
472
  onBlur: u,
473
473
  onFocus: d
474
- }), (n === R.UPLOAD || n === R.IMAGE) && N(h, {
474
+ }), (n === A.UPLOAD || n === A.IMAGE) && N(h, {
475
475
  value: o,
476
476
  onChange: s,
477
477
  onBeforeChange: l,
@@ -480,57 +480,57 @@ const Ut = (e) => {
480
480
  onBlur: u,
481
481
  onFocus: d
482
482
  }));
483
- }, Wt = ({ className: e, emptyLabel: t, signedLabel: a, ...n }) => {
484
- const { value: o, onChange: s, onBeforeChange: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } = n, { id: f } = x(), { inputId: m, ariaDescribedBy: L } = z(), h = ce(), p = V(), g = V(), E = V(null), S = o == null ? void 0 : o.url, [Y, P] = q(!1);
485
- Ie(() => {
486
- var y;
487
- (y = g.current) == null || y.focus({
483
+ }, Yt = ({ className: e, emptyLabel: t, signedLabel: a, ...n }) => {
484
+ const { value: o, onChange: s, onBeforeChange: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } = n, { id: f } = x(), { inputId: m, ariaDescribedBy: L } = W(), h = ce(), p = V(), g = V(), E = V(null), R = o == null ? void 0 : o.url, [Y, P] = q(!1);
485
+ Ce(() => {
486
+ var _;
487
+ (_ = g.current) == null || _.focus({
488
488
  preventScroll: !0
489
489
  });
490
490
  }, f);
491
- const v = be(() => ({
491
+ const v = he(() => ({
492
492
  throttle: 0,
493
493
  dotSize: 2,
494
494
  minWidth: 1,
495
495
  maxWidth: 3,
496
496
  velocityFilterWeight: 0.2
497
- }), []), ee = _(() => {
497
+ }), []), ee = y(() => {
498
498
  var w, U, B;
499
499
  if ((w = p.current) != null && w.isEmpty())
500
500
  return "";
501
- const y = (U = p.current) == null ? void 0 : U.toData();
502
- return y ? yt(y) : ((B = p.current) == null ? void 0 : B.toDataURL()) ?? "";
503
- }, []), $ = _(() => {
501
+ const _ = (U = p.current) == null ? void 0 : U.toData();
502
+ return _ ? yt(_) : ((B = p.current) == null ? void 0 : B.toDataURL()) ?? "";
503
+ }, []), $ = y(() => {
504
504
  var w;
505
- const y = (w = p.current) == null ? void 0 : w.isEmpty();
506
- P(!y), s(ie(ee()));
505
+ const _ = (w = p.current) == null ? void 0 : w.isEmpty();
506
+ P(!_), s(ie(ee()));
507
507
  }, [
508
508
  ee,
509
509
  s
510
- ]), Z = _(() => {
510
+ ]), G = y(() => {
511
511
  l == null || l();
512
512
  }, [
513
513
  l
514
- ]), te = _((y) => {
514
+ ]), te = y((_) => {
515
515
  var U, B, D, O;
516
- if (y != null) {
517
- if (g.current = y, p.current = new _e(y, {
516
+ if (_ != null) {
517
+ if (g.current = _, p.current = new _e(_, {
518
518
  ...v,
519
- penColor: getComputedStyle(y).color || void 0
520
- }), ge(g.current, p.current), S) {
521
- const k = ve(S);
522
- k && (p.current.fromData(k), P(!0));
519
+ penColor: getComputedStyle(_).color || void 0
520
+ }), Ee(g.current, p.current), R) {
521
+ const Z = ye(R);
522
+ Z && (p.current.fromData(Z), P(!0));
523
523
  } else
524
524
  p.current.clear(), P(!1);
525
- p.current.addEventListener("beginStroke", Z), p.current.addEventListener("endStroke", $), typeof ResizeObserver < "u" && !E.current && (E.current = new ResizeObserver(() => {
526
- g.current && ge(g.current, p == null ? void 0 : p.current);
527
- })), (U = E.current) == null || U.observe(y);
525
+ p.current.addEventListener("beginStroke", G), p.current.addEventListener("endStroke", $), typeof ResizeObserver < "u" && !E.current && (E.current = new ResizeObserver(() => {
526
+ g.current && Ee(g.current, p == null ? void 0 : p.current);
527
+ })), (U = E.current) == null || U.observe(_);
528
528
  } else
529
- (B = E.current) == null || B.disconnect(), (D = p.current) == null || D.removeEventListener("endStroke", $), (O = p.current) == null || O.removeEventListener("beginStroke", Z);
529
+ (B = E.current) == null || B.disconnect(), (D = p.current) == null || D.removeEventListener("endStroke", $), (O = p.current) == null || O.removeEventListener("beginStroke", G);
530
530
  }, [
531
531
  v,
532
- S,
533
- Z,
532
+ R,
533
+ G,
534
534
  $
535
535
  ]);
536
536
  return le(() => {
@@ -546,7 +546,7 @@ const Ut = (e) => {
546
546
  id: m,
547
547
  "data-hook": "signature-canvas",
548
548
  "data-input-id": m,
549
- "data-has-value": !!S,
549
+ "data-has-value": !!R,
550
550
  onFocus: d,
551
551
  onBlur: u,
552
552
  role: "img",
@@ -554,10 +554,10 @@ const Ut = (e) => {
554
554
  "aria-describedby": L
555
555
  }));
556
556
  }, de = ({ children: e, className: t, ...a }) => {
557
- const { value: n, onChange: o, onBeforeChange: s, disabled: l, readOnly: i, onBlur: c, onFocus: u } = a, { id: d, required: f, hasError: m } = x(), { inputId: L, ariaDescribedBy: h, labelId: p } = z(), g = ce(), E = n != null && n.url ? W(n.url) : void 0, { data: S = "" } = E ?? {
557
+ const { value: n, onChange: o, onBeforeChange: s, disabled: l, readOnly: i, onBlur: c, onFocus: u } = a, { id: d, required: f, hasError: m } = x(), { inputId: L, ariaDescribedBy: h, labelId: p } = W(), g = ce(), E = n != null && n.url ? z(n.url) : void 0, { data: R = "" } = E ?? {
558
558
  data: ""
559
559
  };
560
- Ie(() => {
560
+ Ce(() => {
561
561
  const v = document.getElementById(L);
562
562
  v == null || v.focus({
563
563
  preventScroll: !0
@@ -571,18 +571,18 @@ const Ut = (e) => {
571
571
  n,
572
572
  L
573
573
  ]);
574
- const Y = _((v) => {
575
- s == null || s(), v.trim() ? o(ie(Se({
574
+ const Y = y((v) => {
575
+ s == null || s(), v.trim() ? o(ie(Ae({
576
576
  data: v,
577
- mimeType: A.TEXT
577
+ mimeType: S.TEXT
578
578
  }))) : o(null);
579
579
  }, [
580
580
  s,
581
581
  o
582
582
  ]), P = I(e, de.Value);
583
- return /* @__PURE__ */ r.createElement(nt, {
583
+ return /* @__PURE__ */ r.createElement(at, {
584
584
  "aria-labelledby": p,
585
- value: S,
585
+ value: R,
586
586
  onChange: Y,
587
587
  onBlur: c,
588
588
  onFocus: u,
@@ -598,9 +598,9 @@ const Ut = (e) => {
598
598
  inputId: L,
599
599
  ariaDescribedBy: h
600
600
  })));
601
- }, Yt = ({ className: e, placeholder: t, ...a }) => {
601
+ }, Gt = ({ className: e, placeholder: t, ...a }) => {
602
602
  const { inputId: n, ariaDescribedBy: o } = a;
603
- return /* @__PURE__ */ r.createElement(ot, {
603
+ return /* @__PURE__ */ r.createElement(st, {
604
604
  id: n,
605
605
  "data-hook": "signature-text",
606
606
  "aria-describedby": o,
@@ -608,7 +608,7 @@ const Ut = (e) => {
608
608
  className: e
609
609
  });
610
610
  }, Q = ({ children: e, className: t, ...a }) => {
611
- const { value: n, onChange: o, disabled: s, readOnly: l, onBlur: i, onFocus: c } = a, { labelId: u, ariaDescribedBy: d } = z(), f = I(e, Q.Button), m = I(e, Q.Preview), L = _((p) => {
611
+ const { value: n, onChange: o, disabled: s, readOnly: l, onBlur: i, onFocus: c } = a, { labelId: u, ariaDescribedBy: d } = W(), f = I(e, Q.Button), m = I(e, Q.Preview), L = y((p) => {
612
612
  const g = p[0];
613
613
  if (!g) {
614
614
  o(null);
@@ -621,9 +621,9 @@ const Ut = (e) => {
621
621
  }, [
622
622
  o
623
623
  ]);
624
- return n && Ut(n) ? N(m, {
624
+ return n && Bt(n) ? N(m, {
625
625
  value: n
626
- }) ?? null : /* @__PURE__ */ r.createElement(at, {
626
+ }) ?? null : /* @__PURE__ */ r.createElement(ot, {
627
627
  className: t,
628
628
  isDisabled: s || l,
629
629
  "aria-labelledby": u,
@@ -649,7 +649,7 @@ const Ut = (e) => {
649
649
  onFocus: c
650
650
  }));
651
651
  }, Zt = ({ className: e, imageAlt: t, ...a }) => {
652
- const { value: n } = a, { inputId: o } = z(), s = ce();
652
+ const { value: n } = a, { inputId: o } = W(), s = ce();
653
653
  return /* @__PURE__ */ r.createElement("div", {
654
654
  className: e,
655
655
  "data-has-value": !0,
@@ -664,19 +664,19 @@ const Ut = (e) => {
664
664
  "data-hook": "signature-image"
665
665
  }, n.displayName || t));
666
666
  }, se = ({ children: e, className: t, onHoverStart: a, onHoverEnd: n, onFocusChange: o, ...s }) => {
667
- const { onSelectFiles: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } = s, { inputId: f, ariaDescribedBy: m, labelId: L } = z(), h = pt(), g = !!I(e, se.Text) ? Fe.map(e, (E) => /* @__PURE__ */ Le(E) && E.type === se.Text ? N(E, {
667
+ const { onSelectFiles: l, disabled: i, readOnly: c, onBlur: u, onFocus: d } = s, { inputId: f, ariaDescribedBy: m, labelId: L } = W(), h = ft(), g = !!I(e, se.Text) ? Ne.map(e, (E) => /* @__PURE__ */ be(E) && E.type === se.Text ? N(E, {
668
668
  textId: h
669
669
  }) : E) : /* @__PURE__ */ r.createElement("span", {
670
670
  id: h
671
671
  }, e);
672
- return /* @__PURE__ */ r.createElement(st, {
672
+ return /* @__PURE__ */ r.createElement(rt, {
673
673
  acceptedFileTypes: [
674
674
  "image/*"
675
675
  ],
676
676
  onSelect: (E) => {
677
677
  l(E ? Array.from(E) : []);
678
678
  }
679
- }, /* @__PURE__ */ r.createElement(ye, {
679
+ }, /* @__PURE__ */ r.createElement(Ie, {
680
680
  id: f,
681
681
  onBlur: u,
682
682
  onFocus: d,
@@ -696,26 +696,26 @@ const Ut = (e) => {
696
696
  className: t
697
697
  }, e);
698
698
  };
699
- b.Label = ut;
700
- b.Input = J;
701
- b.Description = it;
702
- b.Error = ct;
703
- J.Header = K;
704
- J.Value = H;
705
- K.Tabs = M;
706
- K.Clear = zt;
707
- M.Draw = Pt;
708
- M.Type = Mt;
709
- M.Upload = Ht;
710
- H.Canvas = Wt;
699
+ b.Label = dt;
700
+ b.Input = K;
701
+ b.Description = ct;
702
+ b.Error = ut;
703
+ K.Header = J;
704
+ K.Value = H;
705
+ J.Tabs = M;
706
+ J.Clear = zt;
707
+ M.Draw = Mt;
708
+ M.Type = Ht;
709
+ M.Upload = Wt;
710
+ H.Canvas = Yt;
711
711
  H.Type = de;
712
712
  H.Upload = Q;
713
- de.Value = Yt;
713
+ de.Value = Gt;
714
714
  Q.Preview = Zt;
715
715
  Q.Button = se;
716
716
  se.Text = kt;
717
- const Gt = () => {
718
- const { t: e } = He();
717
+ const Vt = () => {
718
+ const { t: e } = Me();
719
719
  return {
720
720
  drawLabel: e("field.signature.mode.draw.label"),
721
721
  typeLabel: e("field.signature.mode.type.label"),
@@ -730,7 +730,7 @@ const Gt = () => {
730
730
  imageAlt: e("field.signature.a11y.state.signed"),
731
731
  uploadLabel: e("field.signature.settings.upload-button.label")
732
732
  };
733
- }, Vt = (e) => /* @__PURE__ */ r.createElement("svg", {
733
+ }, $t = (e) => /* @__PURE__ */ r.createElement("svg", {
734
734
  viewBox: "0 0 24 24",
735
735
  width: 24,
736
736
  height: 24,
@@ -740,7 +740,7 @@ const Gt = () => {
740
740
  }, /* @__PURE__ */ r.createElement("path", {
741
741
  fillRule: "evenodd",
742
742
  d: "M13.5,3 C14.327,3 15,3.673 15,4.5 L15,4.5 L15,5 L19,5 L19,6 L18,6 L18,17.5 C18,18.879 16.878,20 15.5,20 L15.5,20 L7.5,20 C6.122,20 5,18.879 5,17.5 L5,17.5 L5,6 L4,6 L4,5 L8,5 L8,4.5 C8,3.673 8.673,3 9.5,3 L9.5,3 Z M17,6 L6,6 L6,17.5 C6,18.327 6.673,19 7.5,19 L7.5,19 L15.5,19 C16.327,19 17,18.327 17,17.5 L17,17.5 L17,6 Z M10,9 L10,16 L9,16 L9,9 L10,9 Z M14,9 L14,16 L13,16 L13,9 L14,9 Z M13.5,4 L9.5,4 C9.224,4 9,4.225 9,4.5 L9,4.5 L9,5 L14,5 L14,4.5 C14,4.225 13.776,4 13.5,4 L13.5,4 Z"
743
- })), $t = (e) => /* @__PURE__ */ r.createElement("svg", {
743
+ })), Xt = (e) => /* @__PURE__ */ r.createElement("svg", {
744
744
  viewBox: "0 0 24 24",
745
745
  width: 24,
746
746
  height: 24,
@@ -750,7 +750,7 @@ const Gt = () => {
750
750
  }, /* @__PURE__ */ r.createElement("path", {
751
751
  fillRule: "evenodd",
752
752
  d: "M4.9937,15.9971 L4.9937,18.4971 C4.9937,18.7721 5.2177,18.9971 5.4937,18.9971 L5.4937,18.9971 L17.4937,18.9971 C17.7697,18.9971 17.9937,18.7721 17.9937,18.4971 L17.9937,18.4971 L17.9937,15.9971 L18.9937,15.9971 L18.9937,18.4971 C18.9937,19.3241 18.3207,19.9971 17.4937,19.9971 L17.4937,19.9971 L5.4937,19.9971 C4.6657,19.9971 3.9937,19.3241 3.9937,18.4971 L3.9937,18.4971 L3.9937,15.9971 L4.9937,15.9971 Z M11.9933,4 L11.9933,14.078 L15.0293,11.043 L15.7363,11.75 L11.4933,15.992 L7.2513,11.75 L7.9583,11.043 L10.9933,14.078 L10.9933,4 L11.9933,4 Z"
753
- })), Xt = (e) => /* @__PURE__ */ r.createElement("svg", {
753
+ })), qt = (e) => /* @__PURE__ */ r.createElement("svg", {
754
754
  viewBox: "0 0 24 24",
755
755
  width: 24,
756
756
  height: 24,
@@ -760,7 +760,7 @@ const Gt = () => {
760
760
  }, /* @__PURE__ */ r.createElement("path", {
761
761
  fillRule: "evenodd",
762
762
  d: "M18.8525,7.543 L17.7515,8.644 L15.3565,6.248 L16.4575,5.147 C16.5555,5.05 16.6835,5.001 16.8105,5.001 C16.9385,5.001 17.0665,5.05 17.1645,5.147 L18.8525,6.835 C19.0475,7.03 19.0475,7.348 18.8525,7.543 L18.8525,7.543 Z M8.1895,18.206 C8.1185,18.276 8.0275,18.324 7.9295,18.344 L5.1275,18.873 L5.6575,16.07 C5.6755,15.972 5.7225,15.882 5.7945,15.811 L14.6495,6.955 L17.0445,9.351 L8.1895,18.206 Z M19.5595,6.128 L17.8715,4.44 C17.2865,3.856 16.3355,3.856 15.7505,4.44 L5.0875,15.103 C4.8735,15.317 4.7295,15.588 4.6745,15.886 L4.0085,19.407 C3.9775,19.569 4.0295,19.736 4.1465,19.854 C4.2415,19.948 4.3685,20 4.4995,20 C4.5305,20 4.5615,19.997 4.5925,19.991 L8.1165,19.326 C8.4145,19.269 8.6855,19.125 8.8965,18.912 L19.5595,8.25 C20.1445,7.665 20.1445,6.713 19.5595,6.128 L19.5595,6.128 Z"
763
- })), qt = (e) => /* @__PURE__ */ r.createElement("svg", {
763
+ })), jt = (e) => /* @__PURE__ */ r.createElement("svg", {
764
764
  viewBox: "0 0 20 20",
765
765
  width: 24,
766
766
  height: 24,
@@ -770,44 +770,44 @@ const Gt = () => {
770
770
  }, /* @__PURE__ */ r.createElement("path", {
771
771
  fillRule: "evenodd",
772
772
  d: "M12,4 L12,5 L8,5 L8,16 L7,16 L7,5 L3,5 L3,4 L12,4 Z M18,8 L18,9 L15,9 L15,16 L14,16 L14,9 L11,9 L11,8 L18,8 Z"
773
- })), jt = "_container_63unz_1", Jt = "_header_63unz_7", Kt = "_tabs_63unz_13", Qt = "_tab_63unz_13", en = "_tabHover_63unz_43", tn = "_tabSelected_63unz_48", nn = "_tabIcon_63unz_78", an = "_uploadButton_63unz_85", on = "_uploadButtonHover_63unz_138", sn = "_uploadButtonLabel_63unz_155", rn = "_clear_63unz_159", ln = "_value_63unz_191", cn = "_box_63unz_196", un = "_uploadBox_63unz_197", dn = "_dropZone_63unz_228", mn = "_dropZoneHover_63unz_243", pn = "_boxHover_63unz_280", fn = "_typeInput_63unz_335", T = {
774
- container: jt,
773
+ })), Kt = "_container_63unz_1", Jt = "_header_63unz_7", Qt = "_tabs_63unz_13", en = "_tab_63unz_13", tn = "_tabHover_63unz_43", nn = "_tabSelected_63unz_48", an = "_tabIcon_63unz_78", on = "_uploadButton_63unz_85", sn = "_uploadButtonHover_63unz_138", rn = "_uploadButtonLabel_63unz_155", ln = "_clear_63unz_159", cn = "_value_63unz_191", un = "_box_63unz_196", dn = "_uploadBox_63unz_197", mn = "_dropZone_63unz_228", pn = "_dropZoneHover_63unz_243", fn = "_boxHover_63unz_280", En = "_typeInput_63unz_335", T = {
774
+ container: Kt,
775
775
  header: Jt,
776
- tabs: Kt,
777
- tab: Qt,
778
- tabHover: en,
779
- tabSelected: tn,
780
- tabIcon: nn,
781
- uploadButton: an,
782
- uploadButtonHover: on,
783
- uploadButtonLabel: sn,
784
- clear: rn,
785
- value: ln,
786
- box: cn,
787
- uploadBox: un,
788
- dropZone: dn,
789
- dropZoneHover: mn,
790
- boxHover: pn,
791
- typeInput: fn
792
- }, En = ({ content: e, locale: t }) => /* @__PURE__ */ r.createElement(xe, {
776
+ tabs: Qt,
777
+ tab: en,
778
+ tabHover: tn,
779
+ tabSelected: nn,
780
+ tabIcon: an,
781
+ uploadButton: on,
782
+ uploadButtonHover: sn,
783
+ uploadButtonLabel: rn,
784
+ clear: ln,
785
+ value: cn,
786
+ box: un,
787
+ uploadBox: dn,
788
+ dropZone: mn,
789
+ dropZoneHover: pn,
790
+ boxHover: fn,
791
+ typeInput: En
792
+ }, gn = ({ content: e, locale: t }) => /* @__PURE__ */ r.createElement(we, {
793
793
  content: e,
794
794
  locale: t
795
- }), gn = () => {
796
- var Z, te, y, w, U, B;
797
- const e = Gt(), { disabled: t, readOnly: a } = x(), n = !t && !a, o = X({
795
+ }), hn = () => {
796
+ var G, te, _, w, U, B;
797
+ const e = Vt(), { disabled: t, readOnly: a } = x(), n = !t && !a, o = X({
798
798
  globalClasses: Je,
799
799
  moduleClasses: {
800
800
  base: T.tab,
801
801
  hover: T.tabHover,
802
802
  selected: T.tabSelected
803
803
  }
804
- }), s = ({ isSelected: D, isHovered: O, isFocused: k }) => o({
804
+ }), s = ({ isSelected: D, isHovered: O, isFocused: Z }) => o({
805
805
  isSelected: D,
806
806
  isHovered: O,
807
- isFocused: k,
807
+ isFocused: Z,
808
808
  isInteractive: n
809
809
  }), i = X({
810
- globalClasses: $e,
810
+ globalClasses: Xe,
811
811
  moduleClasses: {
812
812
  base: T.box,
813
813
  hover: T.boxHover
@@ -817,7 +817,7 @@ const Gt = () => {
817
817
  isHovered: !1,
818
818
  isInteractive: n
819
819
  }), u = X({
820
- globalClasses: Xe,
820
+ globalClasses: qe,
821
821
  moduleClasses: {
822
822
  base: T.box,
823
823
  hover: T.boxHover
@@ -827,30 +827,30 @@ const Gt = () => {
827
827
  isHovered: !1,
828
828
  isInteractive: n
829
829
  }), d = X({
830
- globalClasses: qe,
830
+ globalClasses: je,
831
831
  moduleClasses: {
832
832
  base: T.dropZone,
833
833
  hover: T.dropZoneHover
834
834
  }
835
835
  }), f = X({
836
- globalClasses: je,
836
+ globalClasses: Ke,
837
837
  moduleClasses: {
838
838
  base: T.uploadButton,
839
839
  hover: T.uploadButtonHover
840
840
  }
841
- }), m = (B = (U = (w = (y = (te = (Z = Te().signature) == null ? void 0 : Z.elementProps) == null ? void 0 : te.dropZone) == null ? void 0 : y.elementProps) == null ? void 0 : w.uploadButton) == null ? void 0 : U.elementProps) == null ? void 0 : B.icon, { wix: L, className: h, ...p } = m ?? {}, g = ze(ne.SIGNATURE, ne.SIGNATURE_DROP_ZONE, ne.SIGNATURE_UPLOAD_BUTTON, ne.UPLOAD_BUTTON_LABEL), E = V(null), [S, Y] = q(!1), [P, v] = q(!1), ee = _(() => {
841
+ }), m = (B = (U = (w = (_ = (te = (G = Le().signature) == null ? void 0 : G.elementProps) == null ? void 0 : te.dropZone) == null ? void 0 : _.elementProps) == null ? void 0 : w.uploadButton) == null ? void 0 : U.elementProps) == null ? void 0 : B.icon, { wix: L, className: h, ...p } = m ?? {}, g = He(ne.SIGNATURE, ne.SIGNATURE_DROP_ZONE, ne.SIGNATURE_UPLOAD_BUTTON, ne.UPLOAD_BUTTON_LABEL), E = V(null), [R, Y] = q(!1), [P, v] = q(!1), ee = y(() => {
842
842
  var D;
843
843
  Y(!0), (D = E.current) == null || D.runAnimationForward();
844
- }, []), $ = _(() => {
844
+ }, []), $ = y(() => {
845
845
  var D;
846
846
  Y(!1), (D = E.current) == null || D.runAnimationBackward();
847
847
  }, []);
848
848
  return /* @__PURE__ */ r.createElement(b, null, /* @__PURE__ */ r.createElement(b.Label, {
849
849
  className: F(We, ae.label)
850
850
  }, /* @__PURE__ */ r.createElement(b.Label.Required, {
851
- className: F(Ye, ae.requiredMark)
851
+ className: F(ze, ae.requiredMark)
852
852
  })), /* @__PURE__ */ r.createElement(b.Input, {
853
- className: F(Ze, T.container)
853
+ className: F(Ye, T.container)
854
854
  }, /* @__PURE__ */ r.createElement(b.Input.Header, {
855
855
  className: T.header
856
856
  }, /* @__PURE__ */ r.createElement(b.Input.Header.Tabs, {
@@ -859,24 +859,24 @@ const Gt = () => {
859
859
  className: s,
860
860
  "aria-label": e.drawLabel,
861
861
  description: e.drawDescription
862
- }, /* @__PURE__ */ r.createElement(Xt, {
862
+ }, /* @__PURE__ */ r.createElement(qt, {
863
863
  className: T.tabIcon
864
864
  })), /* @__PURE__ */ r.createElement(b.Input.Header.Tabs.Type, {
865
865
  className: s,
866
866
  "aria-label": e.typeLabel,
867
867
  description: e.typeDescription
868
- }, /* @__PURE__ */ r.createElement(qt, {
868
+ }, /* @__PURE__ */ r.createElement(jt, {
869
869
  className: T.tabIcon
870
870
  })), /* @__PURE__ */ r.createElement(b.Input.Header.Tabs.Upload, {
871
871
  className: s,
872
872
  "aria-label": e.uploadModeLabel,
873
873
  description: e.uploadDescription
874
- }, /* @__PURE__ */ r.createElement($t, {
874
+ }, /* @__PURE__ */ r.createElement(Xt, {
875
875
  className: T.tabIcon
876
876
  }))), /* @__PURE__ */ r.createElement(b.Input.Header.Clear, {
877
- className: F(pe, T.clear),
877
+ className: F(Ge, T.clear),
878
878
  "aria-label": e.clearLabel
879
- }, /* @__PURE__ */ r.createElement(Vt, null))), /* @__PURE__ */ r.createElement(b.Input.Value, {
879
+ }, /* @__PURE__ */ r.createElement($t, null))), /* @__PURE__ */ r.createElement(b.Input.Value, {
880
880
  className: T.value
881
881
  }, /* @__PURE__ */ r.createElement(b.Input.Value.Canvas, {
882
882
  className: i,
@@ -888,9 +888,9 @@ const Gt = () => {
888
888
  className: T.typeInput,
889
889
  placeholder: e.placeholder
890
890
  })), /* @__PURE__ */ r.createElement(b.Input.Value.Upload, {
891
- className: ({ isHovered: D, isFocused: O, isDropTarget: k }) => F(T.uploadBox, d({
891
+ className: ({ isHovered: D, isFocused: O, isDropTarget: Z }) => F(T.uploadBox, d({
892
892
  isSelected: !1,
893
- isHovered: D || k,
893
+ isHovered: D || Z,
894
894
  isFocused: O,
895
895
  isInteractive: n
896
896
  }))
@@ -907,20 +907,20 @@ const Gt = () => {
907
907
  onHoverStart: ee,
908
908
  onHoverEnd: $,
909
909
  onFocusChange: v
910
- }, p.svg ? /* @__PURE__ */ r.createElement(we, {
910
+ }, p.svg ? /* @__PURE__ */ r.createElement(Fe, {
911
911
  ...p,
912
912
  ref: E,
913
- className: F(ke, Ge, h)
913
+ className: F(Ze, ke, h)
914
914
  }) : null, /* @__PURE__ */ r.createElement(b.Input.Value.Upload.Button.Text, {
915
- className: F(fe.base, T.uploadButtonLabel, g, {
916
- [fe.hover]: n && (S || P)
915
+ className: F(pe.base, T.uploadButtonLabel, g, {
916
+ [pe.hover]: n && (R || P)
917
917
  })
918
918
  }, e.uploadLabel))))), /* @__PURE__ */ r.createElement(b.Error, {
919
919
  className: F(Ve, ae.error)
920
- }, /* @__PURE__ */ r.createElement(mt, null), /* @__PURE__ */ r.createElement(b.Error.Text, null)), /* @__PURE__ */ r.createElement(b.Description, {
921
- className: F(pe, ae.description)
922
- }, En));
923
- }, wn = () => /* @__PURE__ */ r.createElement(gn, null);
920
+ }, /* @__PURE__ */ r.createElement(pt, null), /* @__PURE__ */ r.createElement(b.Error.Text, null)), /* @__PURE__ */ r.createElement(b.Description, {
921
+ className: F($e, ae.description)
922
+ }, gn));
923
+ }, xn = () => /* @__PURE__ */ r.createElement(hn, null);
924
924
  export {
925
- wn as SignatureRAC
925
+ xn as SignatureRAC
926
926
  };