@wix/form-elements 1.82.0 → 1.83.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 (118) hide show
  1. package/dist/component/{appointment-rac-DmwbqZse.js → appointment-rac-ky2cE6hE.js} +6 -6
  2. package/dist/component/{bookings-address-rac-RCzVU87c.js → bookings-address-rac-Bxc6H9Pb.js} +1 -1
  3. package/dist/component/{bookings-email-rac-Df_Wte1_.js → bookings-email-rac-Dw1Xttdx.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-BmdRGYxF.js → bookings-first-name-rac-dgHOrJaJ.js} +1 -1
  5. package/dist/component/{bookings-header-rac-DewQWtkZ.js → bookings-header-rac-Bl9RYGWo.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-DmmNBuqy.js → bookings-last-name-rac-BeqYpbZq.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-QskvFo0C.js → bookings-login-bar-rac-C1k6o0A5.js} +2 -2
  8. package/dist/component/{bookings-phone-rac-7wn8IXna.js → bookings-phone-rac-ByhaJrwE.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-B5nk0BlD.js → bookings-rich-text-rac-Mw5-ZiIn.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-BnVNfYWL.js → checkbox-field-rac-CMEI5t4Y.js} +7 -7
  11. package/dist/component/{checkbox-group-field-headless-Bx5Y-RMP.js → checkbox-group-field-headless-CP21R7_s.js} +3 -3
  12. package/dist/component/checkbox-group-field-rac-DGOZjSIY.js +42 -0
  13. package/dist/component/{checkbox-group-rac-B20t8dTB.js → checkbox-group-rac-CEGtshrl.js} +1 -1
  14. package/dist/component/{checkbox-indicator-module-classes-DqzGZQRQ.js → checkbox-indicator-module-classes-Bb3xB1ve.js} +1 -1
  15. package/dist/component/{checkbox-rac-ifC6qSE8.js → checkbox-rac-DCnRh1WF.js} +1 -1
  16. package/dist/component/{contacts-address-rac-XJRKvPlp.js → contacts-address-rac-CZb_5N5o.js} +1 -1
  17. package/dist/component/{contacts-birthdate-rac-CKYESrPO.js → contacts-birthdate-rac-DZlwSyp5.js} +1 -1
  18. package/dist/component/{contacts-company-rac-BXwEeb0p.js → contacts-company-rac-BNEF6LjB.js} +1 -1
  19. package/dist/component/{contacts-email-rac-D8Yspo_m.js → contacts-email-rac-CAgk_zfN.js} +1 -1
  20. package/dist/component/{contacts-first-name-rac-mvCGP1LJ.js → contacts-first-name-rac-DyTVcmrX.js} +1 -1
  21. package/dist/component/{contacts-last-name-rac-Clg9RXal.js → contacts-last-name-rac-DrFcDcGr.js} +1 -1
  22. package/dist/component/{contacts-phone-rac-qEwjhByI.js → contacts-phone-rac-UAPALlFx.js} +1 -1
  23. package/dist/component/{contacts-position-rac-Bh8fvf2M.js → contacts-position-rac-CJ1M4kJJ.js} +1 -1
  24. package/dist/component/{contacts-subscribe-rac-DEQ2XkZo.js → contacts-subscribe-rac-1cEd5s1l.js} +2 -2
  25. package/dist/component/{contacts-tax-id-rac-0DUZ4tJz.js → contacts-tax-id-rac-CqnO__fd.js} +1 -1
  26. package/dist/component/{date-availability-2ek2RtXx.js → date-availability-COM2EaRy.js} +1 -1
  27. package/dist/component/{date-input-field-rac-Bp4SQB-t.js → date-input-field-rac-CuuWbw42.js} +80 -79
  28. package/dist/component/{date-input-rac-CYsJcMe5.js → date-input-rac-DfVmj9Gc.js} +1 -1
  29. package/dist/component/{date-picker-field-rac-BGQvnSYI.js → date-picker-field-rac-BFCZik9T.js} +6 -6
  30. package/dist/component/{date-picker-rac-BVncggYR.js → date-picker-rac-C2vajJpb.js} +1 -1
  31. package/dist/component/{date-time-input-field-rac-B1mggelc.js → date-time-input-field-rac-B7ne2emo.js} +127 -126
  32. package/dist/component/{date-time-input-rac-DzdCno0L.js → date-time-input-rac-D4FEieQz.js} +1 -1
  33. package/dist/component/{dext-checkbox-group-rac-CNCpeolD.js → dext-checkbox-group-rac-BDBBTNNo.js} +2 -2
  34. package/dist/component/{dext-checkbox-rac-BYDQ58Mo.js → dext-checkbox-rac-DAAhNboR.js} +1 -1
  35. package/dist/component/{dext-date-picker-rac-aYYk8Nrl.js → dext-date-picker-rac-me7XbR5z.js} +1 -1
  36. package/dist/component/{dext-date-time-input-rac-v2v974p5.js → dext-date-time-input-rac-DLsUl2Eg.js} +1 -1
  37. package/dist/component/{dext-dropdown-rac-C846KZCe.js → dext-dropdown-rac-C3vVIRir.js} +1 -1
  38. package/dist/component/{dext-email-rac-izjbfME9.js → dext-email-rac-a8qXYTLP.js} +1 -1
  39. package/dist/component/{dext-number-input-rac-CnOFsD7l.js → dext-number-input-rac-DdDnL_fX.js} +1 -1
  40. package/dist/component/{dext-phone-rac-D8GMXD88.js → dext-phone-rac-ByaxbHpO.js} +1 -1
  41. package/dist/component/{dext-radio-group-rac-BtiyGCRh.js → dext-radio-group-rac-Bzubt7Uy.js} +2 -2
  42. package/dist/component/{dext-rating-input-rac-BHJ1kitb.js → dext-rating-input-rac-BZ1EvOkG.js} +1 -1
  43. package/dist/component/{dext-tags-rac-CvNjwS5R.js → dext-tags-rac-C_R89noV.js} +2 -2
  44. package/dist/component/{dext-text-area-rac-X5L0Q3sC.js → dext-text-area-rac-DRpYeQ-K.js} +1 -1
  45. package/dist/component/{dext-text-input-rac-swkyAJqC.js → dext-text-input-rac-D_RtbQQ-.js} +1 -1
  46. package/dist/component/{dext-url-input-rac-BYlXOAkz.js → dext-url-input-rac-BSSjSbIo.js} +1 -1
  47. package/dist/component/{donation-rac-CDWLBZZM.js → donation-rac-De0KyyGR.js} +92 -91
  48. package/dist/component/{dropdown-field-headless-JJzbZvps.js → dropdown-field-headless-DNhnTDlD.js} +3 -3
  49. package/dist/component/{dropdown-field-rac-BodpIQ9Q.js → dropdown-field-rac-Bq_FNv9a.js} +3 -3
  50. package/dist/component/{dropdown-rac-Bfbxxx9k.js → dropdown-rac-0UIyqF15.js} +1 -1
  51. package/dist/component/{ecom-address-rac-BCnsL5tr.js → ecom-address-rac-7IVbvs3J.js} +1 -1
  52. package/dist/component/{ecom-subscription-checkbox-rac-CNSdI_ty.js → ecom-subscription-checkbox-rac-DilgIpiG.js} +3 -3
  53. package/dist/component/{email-input-field-rac-Btaa4O5T.js → email-input-field-rac-CHJ6RSGy.js} +83 -79
  54. package/dist/component/{events-repeater-rac-xBwqJddt.js → events-repeater-rac-v18FFLC7.js} +6 -6
  55. package/dist/component/{events-rsvp-rac-D90PwkHd.js → events-rsvp-rac-BpGLrxsf.js} +4 -4
  56. package/dist/component/{field-error-headless-BErhh9GG.js → field-error-headless-DAy-1oAQ.js} +1 -1
  57. package/dist/component/{field-label-headless-BGyK-5xW.js → field-label-headless-BWxHmO0c.js} +1 -1
  58. package/dist/component/field-rac.module-D06m9T9x.js +24 -0
  59. package/dist/component/{file-upload-rac-MxH3CVml.js → file-upload-rac-BfWN27JT.js} +5 -5
  60. package/dist/component/{fixed-payment-rac-DpBA9irF.js → fixed-payment-rac-Bha61SB4.js} +5 -5
  61. package/dist/component/{form-f0tqdMye.js → form-D0eeH0lX.js} +69 -69
  62. package/dist/component/{form-element-classes-jC8D0LnK.js → form-element-classes-Ct1UaxuQ.js} +38 -32
  63. package/dist/component/form.css +1 -1
  64. package/dist/component/form.js +1 -1
  65. package/dist/component/{header-field-rac-BXxFqu9u.js → header-field-rac-uNzfDMbv.js} +3 -3
  66. package/dist/component/{header-rac-BN70esac.js → header-rac-B91q4fHl.js} +1 -1
  67. package/dist/component/{image-choice-rac-DLBGIBXL.js → image-choice-rac-BKcnNGPp.js} +6 -6
  68. package/dist/component/{index-BvB-uE1H.js → index-BWHymomM.js} +2 -2
  69. package/dist/component/{index-DXLEHYlA.js → index-BvzLLTKc.js} +4 -4
  70. package/dist/component/{isObjectLike-BYOX5XY4.js → isObjectLike-D7Mkqoju.js} +1 -1
  71. package/dist/component/multiline-address-field-rac-Avd9Vlv1.js +1617 -0
  72. package/dist/component/{multiline-address-rac-D82Gbj3n.js → multiline-address-rac-BwQOoejw.js} +1 -1
  73. package/dist/component/number-input-field-rac-CRqPXDl0.js +93 -0
  74. package/dist/component/{number-input-rac-Bnsvb-SO.js → number-input-rac-0Y8K4e6K.js} +1 -1
  75. package/dist/component/password-rac-C7F6sEB3.js +143 -0
  76. package/dist/component/payment-input-rac-CTJr4QTK.js +141 -0
  77. package/dist/component/{phone-input-field-rac-Ce_wuE46.js → phone-input-field-rac-jjSmYCI1.js} +5 -5
  78. package/dist/component/{phone-rac-DslINtcH.js → phone-rac-BwSnmgYF.js} +1 -1
  79. package/dist/component/{product-list-rac-C4P_SOyG.js → product-list-rac-CTN2wvHE.js} +7 -7
  80. package/dist/component/{quiz-radio-group-rac-noy4fmD8.js → quiz-radio-group-rac-CZHEDJxr.js} +2 -2
  81. package/dist/component/{radio-button-module-classes-DXQ1UlmI.js → radio-button-module-classes-DCz6XS1X.js} +3 -3
  82. package/dist/component/radio-group-field-rac-60MF_9DO.js +48 -0
  83. package/dist/component/{radio-group-rac-CGHQFyJY.js → radio-group-rac-Dqo-Earp.js} +1 -1
  84. package/dist/component/{rating-input-field-rac-elaferlI.js → rating-input-field-rac-CzWTwWT8.js} +6 -6
  85. package/dist/component/{rating-input-rac-fnOtTKN8.js → rating-input-rac-Nq4tll2Z.js} +1 -1
  86. package/dist/component/{rich-content-rac.module-DbwuwQeo.js → rich-content-rac.module-sUUSbcSy.js} +1 -1
  87. package/dist/component/{rich-text-field-rac-DtcQC8zU.js → rich-text-field-rac-BvLfS4I5.js} +3 -3
  88. package/dist/component/{rich-text-rac-CuT97sby.js → rich-text-rac-BWkTbWk3.js} +1 -1
  89. package/dist/component/{service-dropdown-rac-rk2tzikX.js → service-dropdown-rac-DZ3USe7_.js} +5 -5
  90. package/dist/component/{services-multi-choice-rac-BMQyF_xs.js → services-multi-choice-rac-D-og7fMo.js} +7 -7
  91. package/dist/component/{signature-rac-DeV9C6ta.js → signature-rac-D3c4fnvN.js} +5 -5
  92. package/dist/component/{submit-button-rac-BpN-FYtM.js → submit-button-rac-Dn_BGt1n.js} +2 -2
  93. package/dist/component/tags-field-rac-DXmZBcpO.js +218 -0
  94. package/dist/component/{tags-rac-Dabz4jHd.js → tags-rac-CoXWx42D.js} +1 -1
  95. package/dist/component/text-area-field-rac-Cy0Mr29Z.js +73 -0
  96. package/dist/component/{text-area-rac-CDLF-_56.js → text-area-rac-C3Mjmgpa.js} +1 -1
  97. package/dist/component/text-input-field-rac-D1TB9B_M.js +28 -0
  98. package/dist/component/{text-input-headless-BwVLU9cp.js → text-input-headless-BUa59Rgn.js} +3 -3
  99. package/dist/component/{text-input-rac-CoGTzfo1.js → text-input-rac-BQ3Z9ws4.js} +1 -1
  100. package/dist/component/{time-input-rac-DQDupKTA.js → time-input-rac-Wi0oD5YF.js} +5 -5
  101. package/dist/component/url-input-field-rac-DINXfZdf.js +75 -0
  102. package/dist/component/{url-input-rac-_d6XRdKX.js → url-input-rac-Ch9eTIF_.js} +1 -1
  103. package/dist/component/use-element-state-class-name-j8W1zbdG.js +20 -0
  104. package/dist/component/{use-service-options-base-CRgxxz7b.js → use-service-options-base-BJZhzDyO.js} +1 -1
  105. package/dist/component/use-text-input-class-name-8gMUWeCb.js +24 -0
  106. package/package.json +2 -2
  107. package/dist/component/checkbox-group-field-rac-CZW28rj5.js +0 -41
  108. package/dist/component/field-rac.module-ColNPUt0.js +0 -23
  109. package/dist/component/multiline-address-field-rac-fcQYnPlO.js +0 -1613
  110. package/dist/component/number-input-field-rac-B0-4Rz3w.js +0 -89
  111. package/dist/component/password-rac-BdBjFa8y.js +0 -142
  112. package/dist/component/payment-input-rac-DkAGOvaF.js +0 -137
  113. package/dist/component/radio-group-field-rac-CYBDq7R1.js +0 -47
  114. package/dist/component/tags-field-rac-ByC9DnyH.js +0 -217
  115. package/dist/component/text-area-field-rac-CtSa8XW_.js +0 -69
  116. package/dist/component/text-input-field-rac-C6fQYKhI.js +0 -24
  117. package/dist/component/url-input-field-rac-4T8gcMHH.js +0 -71
  118. package/dist/component/use-element-state-class-name-BqmaTba3.js +0 -15
@@ -1,1613 +0,0 @@
1
- import { RicosViewer as X } from "@wix/ricos/viewer";
2
- import C from "classnames";
3
- import n, { useMemo as w, createContext as We, useContext as De, useState as ye, useRef as B, useCallback as D, useEffect as Ve } from "react";
4
- import { UNSAFE_PortalProvider as _t } from "react-aria";
5
- import { ad as bt, c as ft, a9 as Pt, ab as yt, G as Tt, H as Mt, u as qt, z as V, F as K, as as Me, a2 as at, ai as P, af as T, ak as le, ae as Ct, Q as wt, C as he, a0 as xt, a4 as Bt, ap as kt, aj as $t, ao as Ut, a7 as Wt, Y as Vt, a6 as Kt, al as Yt, j as Ht } from "./form-f0tqdMye.js";
6
- import { f as E, a as h } from "./find-child-C60k4CxG.js";
7
- import { F as jt, V as Jt } from "./headless-styles-CmcyA_pi.js";
8
- import { TextField as Ce, Input as ie, ComboBoxStateContext as It, ComboBox as Re, Popover as Ae, ListBox as _e, ListBoxItem as Pe, Group as Lt, Button as Nt } from "react-aria-components";
9
- import { D as ce, E as de } from "./field-error-headless-BErhh9GG.js";
10
- import { L as ue } from "./field-label-headless-BGyK-5xW.js";
11
- import { e as Gt, c as Xt, a as zt, r as Ot } from "./isObjectLike-BYOX5XY4.js";
12
- import { u as Qt } from "./use-invoke-callback-UH73A_J3.js";
13
- import { C as lt } from "./chevron-down-icon-CcpVm6B-.js";
14
- import { E as z } from "./error-icon-hZxQ6DEy.js";
15
- import { H as fe } from "./custom-focus-class-_483Pkwp.js";
16
- import { s as f } from "./field-rac.module-ColNPUt0.js";
17
- import { y as Q, O as Z, x as ee, A as ge, o as te, i as ne } from "./form-element-classes-jC8D0LnK.js";
18
- const Zt = (e, t, o) => {
19
- var a, l, i, s;
20
- const r = (a = e.steps) == null ? void 0 : a.map((d) => {
21
- var m, u, I, L, b, p;
22
- return {
23
- ...d,
24
- layout: {
25
- ...d.layout,
26
- large: {
27
- ...(m = d.layout) == null ? void 0 : m.large,
28
- items: ((L = (I = (u = d.layout) == null ? void 0 : u.large) == null ? void 0 : I.items) == null ? void 0 : L.map((y) => ({
29
- ...y,
30
- row: o.row <= y.row ? (y.row || 0) + 1 : y.row
31
- }))) || ((p = (b = d.layout) == null ? void 0 : b.large) == null ? void 0 : p.items)
32
- }
33
- }
34
- };
35
- });
36
- return (s = (i = (l = r == null ? void 0 : r[0].layout) == null ? void 0 : l.large) == null ? void 0 : i.items) == null || s.unshift(o), {
37
- ...e,
38
- fields: [
39
- t,
40
- ...e.fields || []
41
- ],
42
- steps: r || e.steps
43
- };
44
- };
45
- var Ie = /* @__PURE__ */ (function(e) {
46
- return e.COUNTRY = "country", e.SUBDIVISION = "subdivision", e.CITY = "city", e.ADDRESS_LINE = "addressLine", e.ADDRESS_LINE_2 = "addressLine2", e.POSTAL_CODE = "postalCode", e.STREET_NAME = "streetName", e.STREET_NUMBER = "streetNumber", e.APARTMENT = "apartment", e;
47
- })({});
48
- function en(e, t, o = !1) {
49
- const { country: r, subdivision: a, city: l, addressLine: i, streetAddress: s, addressLine2: d, postalCode: m } = e, u = {};
50
- return t ? (r && (u.country = r), a && (u.subdivision = a), l && (u.city = l), i ? u.addressLine = i : s != null && s.formattedAddressLine && (u.addressLine = s == null ? void 0 : s.formattedAddressLine), d && (u.addressLine = d), m && (u.postalCode = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.streetName = s == null ? void 0 : s.name : o && (s != null && s.formattedAddressLine) && (u.streetName = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.streetNumber = s.number)) : (r && (u.country = r), a && (u.subdivision = a), l && (u.city = l), i ? u.address_line = i : s != null && s.formattedAddressLine && (u.address_line = s == null ? void 0 : s.formattedAddressLine), d && (u.address_line = d), m && (u.postal_code = m), s != null && s.apt && (u.apartment = s == null ? void 0 : s.apt), s != null && s.name ? u.street_name = s == null ? void 0 : s.name : o && (s != null && s.formattedAddressLine) && (u.street_name = s == null ? void 0 : s.formattedAddressLine), s != null && s.number && (u.street_number = s.number)), u;
51
- }
52
- const gt = /* @__PURE__ */ We({
53
- onAddressSelect: () => {
54
- }
55
- }), tn = ({ children: e, onAddressSelect: t, autocompleteEnabled: o }) => {
56
- const r = w(() => ({
57
- onAddressSelect: t,
58
- autocompleteEnabled: o
59
- }), [
60
- t,
61
- o
62
- ]);
63
- return /* @__PURE__ */ n.createElement(gt.Provider, {
64
- value: r
65
- }, e);
66
- };
67
- function Le() {
68
- return De(gt);
69
- }
70
- const vt = /* @__PURE__ */ We(void 0), nn = ({ children: e, countryCode: t }) => {
71
- const o = w(() => ({
72
- countryCode: t
73
- }), [
74
- t
75
- ]);
76
- return /* @__PURE__ */ n.createElement(vt.Provider, {
77
- value: o
78
- }, e);
79
- };
80
- function Ne() {
81
- const e = De(vt);
82
- return e == null ? void 0 : e.countryCode;
83
- }
84
- function qe(e) {
85
- return e != null;
86
- }
87
- function rn(e, t, o) {
88
- return !t || !o ? e : {
89
- ...e,
90
- fields: (e.fields ?? []).map((r) => {
91
- const { show: a, ...l } = t[r.target] || {}, { required: i } = o[r.target] || {};
92
- return {
93
- ...r,
94
- view: {
95
- ...r.view,
96
- ...l
97
- },
98
- ...qe(a) && {
99
- hidden: !a
100
- },
101
- ...qe(i) && qe(r.validation) && {
102
- validation: {
103
- ...r.validation,
104
- required: i
105
- }
106
- }
107
- };
108
- })
109
- };
110
- }
111
- const on = (e, t) => e.map((o) => ({
112
- ...o,
113
- id: ("target" in o ? t[o.target] : void 0) ?? o.id
114
- })), ht = 12, sn = (e) => {
115
- const t = e.filter((r) => !r.properties.hidden), o = e.filter((r) => r.properties.hidden);
116
- return {
117
- visibleFields: t,
118
- hiddenFields: o
119
- };
120
- }, an = (e) => {
121
- const t = {};
122
- return e.forEach((o) => {
123
- const r = o.layout.row;
124
- t[r] || (t[r] = []), t[r].push(o);
125
- }), t;
126
- }, ln = (e) => {
127
- const t = {};
128
- return Object.keys(e).forEach((o) => {
129
- const r = parseInt(o, 10), a = e[r];
130
- a.reduce((i, s) => i + s.layout.width, 0) !== ht && (t[r] = a);
131
- }), t;
132
- }, cn = (e, t) => e.map((o) => {
133
- const r = o.layout.row;
134
- if (t[r] && !o.properties.hidden) {
135
- const a = t[r], l = a.length, i = ht / l, s = a.findIndex((m) => m.id === o.id), d = i * s;
136
- return {
137
- ...o,
138
- layout: {
139
- ...o.layout,
140
- width: i,
141
- column: d
142
- }
143
- };
144
- }
145
- return o;
146
- }), dn = (e, t, o) => {
147
- const r = Math.max(...t.map((a) => a.layout.row), -1);
148
- return e.map((a) => {
149
- if (a.properties.hidden) {
150
- const l = o.findIndex((i) => i.id === a.id);
151
- return {
152
- ...a,
153
- layout: {
154
- ...a.layout,
155
- row: r + 1 + l
156
- }
157
- };
158
- }
159
- return a;
160
- });
161
- }, un = (e) => {
162
- const { visibleFields: t, hiddenFields: o } = sn(e.fields), r = an(t), a = ln(r), l = cn(e.fields, a), i = dn(l, t, o);
163
- return {
164
- ...e,
165
- fields: i
166
- };
167
- }, mn = () => ({
168
- country: V(),
169
- subdivision: V(),
170
- city: V(),
171
- address_line: V(),
172
- address_line_2: V(),
173
- postal_code: V(),
174
- street_name: V(),
175
- street_number: V(),
176
- apartment: V()
177
- }), pn = ({ id: e, target: t, fieldType: o, form: r, country: a, fieldSettings: l, validation: i, required: s }) => {
178
- const [d] = ye(mn), { isExperimentEnabled: m } = bt(), u = m(ft.USE_FIELDS_V2), { getCountryAddressForm: I } = Pt(), { isMobile: L, breakpoint: b } = yt(), p = I(a), y = o === K.MULTILINE_ADDRESS || o === K.BOOKINGS_ADDRESS, N = w(() => {
179
- var g;
180
- return Tt(s, (g = i == null ? void 0 : i.predefined) == null ? void 0 : g.multilineAddressOptions);
181
- }, [
182
- i,
183
- s
184
- ]), F = w(() => Mt(), []);
185
- return {
186
- form: w(() => {
187
- var _, O;
188
- if (!y || !p)
189
- return r && {
190
- ...r,
191
- fields: on(r.fields, d)
192
- };
193
- const g = qt({
194
- useFieldsV2: u,
195
- path: t,
196
- parentId: e,
197
- includeHiddenFields: !0,
198
- isMobile: L,
199
- breakpoint: b,
200
- form: rn(Zt(p, N, F), l, (O = (_ = i == null ? void 0 : i.predefined) == null ? void 0 : _.multilineAddressOptions) == null ? void 0 : O.fields)
201
- });
202
- if (!g.fields.some((v) => v.properties.hidden))
203
- return g;
204
- const M = un(g);
205
- return {
206
- ...M,
207
- fields: M.fields.filter((v) => !v.properties.hidden)
208
- };
209
- }, [
210
- p,
211
- r,
212
- d,
213
- l,
214
- i,
215
- t,
216
- N,
217
- F,
218
- y,
219
- u,
220
- e,
221
- L,
222
- b
223
- ]),
224
- isMultilineAddressField: y
225
- };
226
- }, Ft = /* @__PURE__ */ We(void 0), En = ({ children: e, fields: t }) => {
227
- const o = w(() => ({
228
- fields: t
229
- }), [
230
- t
231
- ]);
232
- return /* @__PURE__ */ n.createElement(Ft.Provider, {
233
- value: o
234
- }, e);
235
- };
236
- function me(e) {
237
- const t = De(Ft);
238
- if (!t)
239
- throw new Error("useAddressFields must be used within AddressFieldsProvider");
240
- return t.fields[e];
241
- }
242
- function be(e) {
243
- const { t } = Me(), o = Ne(), r = o && at.getCountryByShortKey(o), l = (r ? r.addressPartDisplayNames : at.getDefaultAddressDisplayNames())[e];
244
- return l ? t(l) : "";
245
- }
246
- const re = ({ children: e }) => {
247
- const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), L = be("addressLine2"), b = E(e, re.Label), p = E(e, re.Input), y = E(e, re.Description), N = E(e, re.Error);
248
- return /* @__PURE__ */ n.createElement(u, {
249
- fieldId: t,
250
- renderLabel: () => h(b, {
251
- label: L
252
- }),
253
- renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
254
- "aria-labelledby": I,
255
- value: o ?? "",
256
- onChange: r,
257
- isDisabled: a,
258
- isReadOnly: l,
259
- isRequired: i,
260
- isInvalid: s,
261
- onBlur: d,
262
- onFocus: m
263
- }, p),
264
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, y)
265
- });
266
- }, bn = ({ className: e }) => {
267
- const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: a } = T(), l = B(null);
268
- return le(() => {
269
- var i;
270
- (i = l.current) == null || i.focus();
271
- }, t), /* @__PURE__ */ n.createElement(ie, {
272
- ref: l,
273
- id: r,
274
- "aria-describedby": a,
275
- className: e,
276
- placeholder: o
277
- });
278
- };
279
- re.Label = ue;
280
- re.Input = bn;
281
- re.Description = ce;
282
- re.Error = de;
283
- const Ke = ({ enabled: e }) => {
284
- const { actions: t } = Ct(), [o, r] = ye(V()), a = D(() => r(V()), []);
285
- return w(() => {
286
- const { predict: l, getPlace: i, searchByPostalCode: s } = t ?? {};
287
- if (!(!e || !l || !i || !s))
288
- return {
289
- predict: (d) => l({
290
- ...d,
291
- sessionToken: o
292
- }),
293
- getPlace: (d) => i({
294
- ...d,
295
- sessionToken: o,
296
- refreshSessionToken: a
297
- }),
298
- searchByPostalCode: (d) => s({
299
- ...d,
300
- sessionToken: o
301
- })
302
- };
303
- }, [
304
- e,
305
- t,
306
- o,
307
- a
308
- ]);
309
- };
310
- var we, it;
311
- function fn() {
312
- if (it) return we;
313
- it = 1;
314
- var e = Gt(), t = function() {
315
- return e.Date.now();
316
- };
317
- return we = t, we;
318
- }
319
- var xe, ct;
320
- function yn() {
321
- if (ct) return xe;
322
- ct = 1;
323
- var e = /\s/;
324
- function t(o) {
325
- for (var r = o.length; r-- && e.test(o.charAt(r)); )
326
- ;
327
- return r;
328
- }
329
- return xe = t, xe;
330
- }
331
- var Be, dt;
332
- function Cn() {
333
- if (dt) return Be;
334
- dt = 1;
335
- var e = yn(), t = /^\s+/;
336
- function o(r) {
337
- return r && r.slice(0, e(r) + 1).replace(t, "");
338
- }
339
- return Be = o, Be;
340
- }
341
- var ke, ut;
342
- function In() {
343
- if (ut) return ke;
344
- ut = 1;
345
- var e = Xt(), t = zt(), o = "[object Symbol]";
346
- function r(a) {
347
- return typeof a == "symbol" || t(a) && e(a) == o;
348
- }
349
- return ke = r, ke;
350
- }
351
- var $e, mt;
352
- function Ln() {
353
- if (mt) return $e;
354
- mt = 1;
355
- var e = Cn(), t = Ot(), o = In(), r = NaN, a = /^[-+]0x[0-9a-f]+$/i, l = /^0b[01]+$/i, i = /^0o[0-7]+$/i, s = parseInt;
356
- function d(m) {
357
- if (typeof m == "number")
358
- return m;
359
- if (o(m))
360
- return r;
361
- if (t(m)) {
362
- var u = typeof m.valueOf == "function" ? m.valueOf() : m;
363
- m = t(u) ? u + "" : u;
364
- }
365
- if (typeof m != "string")
366
- return m === 0 ? m : +m;
367
- m = e(m);
368
- var I = l.test(m);
369
- return I || i.test(m) ? s(m.slice(2), I ? 2 : 8) : a.test(m) ? r : +m;
370
- }
371
- return $e = d, $e;
372
- }
373
- var Ue, pt;
374
- function Nn() {
375
- if (pt) return Ue;
376
- pt = 1;
377
- var e = Ot(), t = fn(), o = Ln(), r = "Expected a function", a = Math.max, l = Math.min;
378
- function i(s, d, m) {
379
- var u, I, L, b, p, y, N = 0, F = !1, S = !1, g = !0;
380
- if (typeof s != "function")
381
- throw new TypeError(r);
382
- d = o(d) || 0, e(m) && (F = !!m.leading, S = "maxWait" in m, L = S ? a(o(m.maxWait) || 0, d) : L, g = "trailing" in m ? !!m.trailing : g);
383
- function R(A) {
384
- var J = u, Ee = I;
385
- return u = I = void 0, N = A, b = s.apply(Ee, J), b;
386
- }
387
- function M(A) {
388
- return N = A, p = setTimeout(v, d), F ? R(A) : b;
389
- }
390
- function _(A) {
391
- var J = A - y, Ee = A - N, Oe = d - J;
392
- return S ? l(Oe, L - Ee) : Oe;
393
- }
394
- function O(A) {
395
- var J = A - y, Ee = A - N;
396
- return y === void 0 || J >= d || J < 0 || S && Ee >= L;
397
- }
398
- function v() {
399
- var A = t();
400
- if (O(A))
401
- return pe(A);
402
- p = setTimeout(v, _(A));
403
- }
404
- function pe(A) {
405
- return p = void 0, g && u ? R(A) : (u = I = void 0, b);
406
- }
407
- function x() {
408
- p !== void 0 && clearTimeout(p), N = 0, u = y = I = p = void 0;
409
- }
410
- function q() {
411
- return p === void 0 ? b : pe(t());
412
- }
413
- function j() {
414
- var A = t(), J = O(A);
415
- if (u = arguments, I = this, y = A, J) {
416
- if (p === void 0)
417
- return M(y);
418
- if (S)
419
- return clearTimeout(p), p = setTimeout(v, d), R(y);
420
- }
421
- return p === void 0 && (p = setTimeout(v, d)), b;
422
- }
423
- return j.cancel = x, j.flush = q, j;
424
- }
425
- return Ue = i, Ue;
426
- }
427
- var On = Nn();
428
- const gn = /* @__PURE__ */ wt(On), vn = (e, t, o = 200) => {
429
- const r = B(e), a = D(gn((...l) => {
430
- r.current(...l);
431
- }, o), [
432
- o
433
- ]);
434
- return Ve(() => {
435
- r.current = e;
436
- }, [
437
- e,
438
- t
439
- ]), a;
440
- }, hn = () => {
441
- const e = B(!0);
442
- return Ve(() => () => {
443
- e.current = !1;
444
- }, []), () => e.current;
445
- }, Et = {
446
- loading: !1,
447
- predictions: []
448
- }, St = ({ atlas: e, onError: t }) => {
449
- const [{ loading: r, predictions: a }, l] = ye(Et), i = B(0), s = hn(), d = D(() => {
450
- i.current++, l(Et);
451
- }, []), m = vn(async ({ input: u, countryCodes: I }) => {
452
- if (!e || !s())
453
- return;
454
- if (!u) {
455
- d();
456
- return;
457
- }
458
- const L = ++i.current;
459
- l((p) => ({
460
- ...p,
461
- loading: !0
462
- }));
463
- let b;
464
- try {
465
- b = await e.predict({
466
- input: u,
467
- countryCodes: I
468
- });
469
- } catch (p) {
470
- t ? t(p) : console.error(p);
471
- } finally {
472
- const p = L === i.current;
473
- s() && p && l((y) => ({
474
- loading: !1,
475
- // set new predictions if fetched properly, else keep current predictions
476
- predictions: b || y.predictions
477
- }));
478
- }
479
- }, [
480
- e,
481
- t
482
- ], 200);
483
- return {
484
- predictions: a,
485
- loading: r,
486
- updatePredictions: m,
487
- clearPredictions: d
488
- };
489
- }, Ye = ({ optionCount: e }) => {
490
- const t = De(It), o = B(t);
491
- o.current = t;
492
- const r = B(e);
493
- return Ve(() => {
494
- const a = e > 0 && r.current === 0;
495
- r.current = e;
496
- const l = o.current;
497
- a && (l != null && l.isFocused) && !l.isOpen && l.open(null, "manual");
498
- }, [
499
- e
500
- ]), null;
501
- }, k = ({ children: e }) => {
502
- const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: I } = P(), { labelId: L } = T(), { autocompleteEnabled: b } = Le(), p = I || b, y = be("addressLine1"), N = E(e, k.Label), F = E(e, k.Input), S = E(e, k.Options), g = E(e, k.Description), R = E(e, k.Error);
503
- return p ? /* @__PURE__ */ n.createElement(u, {
504
- fieldId: t,
505
- renderLabel: () => h(N, {
506
- label: y
507
- }),
508
- renderInput: () => /* @__PURE__ */ n.createElement(Fn, {
509
- value: o,
510
- onChange: r,
511
- disabled: a,
512
- readOnly: l,
513
- required: i,
514
- hasError: s,
515
- onBlur: d,
516
- onFocus: m
517
- }, F, S),
518
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
519
- }) : /* @__PURE__ */ n.createElement(u, {
520
- fieldId: t,
521
- renderLabel: () => h(N, {
522
- label: y
523
- }),
524
- renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
525
- "aria-labelledby": L,
526
- value: o ?? "",
527
- onChange: r,
528
- isDisabled: a,
529
- isReadOnly: l,
530
- isRequired: i,
531
- isInvalid: s,
532
- onBlur: d,
533
- onFocus: m
534
- }, F),
535
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
536
- });
537
- }, Fn = ({ children: e, value: t, onChange: o, disabled: r, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
538
- const { labelId: m } = T(), { onAddressSelect: u } = Le(), I = Ne(), L = Ke({
539
- enabled: !0
540
- }), { predictions: b, updatePredictions: p, clearPredictions: y } = St({
541
- atlas: L
542
- }), N = w(() => b.map((O) => ({
543
- id: O.searchId || "",
544
- label: O.description || ""
545
- })), [
546
- b
547
- ]), F = D((O) => {
548
- p({
549
- input: O,
550
- countryCodes: I ? [
551
- I
552
- ] : void 0
553
- }), o(O);
554
- }, [
555
- o,
556
- p,
557
- I
558
- ]), S = D(async (O) => {
559
- if (!O)
560
- return;
561
- y();
562
- const v = await (L == null ? void 0 : L.getPlace({
563
- searchId: String(O)
564
- }));
565
- v && u && u(v);
566
- }, [
567
- u,
568
- y,
569
- L
570
- ]), g = D(() => {
571
- y(), s == null || s();
572
- }, [
573
- s,
574
- y
575
- ]), R = D(() => {
576
- d == null || d();
577
- }, [
578
- d
579
- ]), M = E(e, k.Input), _ = E(e, k.Options);
580
- return /* @__PURE__ */ n.createElement(Re, {
581
- "aria-labelledby": m,
582
- inputValue: t ?? "",
583
- onInputChange: F,
584
- value: null,
585
- onChange: S,
586
- isDisabled: r,
587
- isReadOnly: a,
588
- isRequired: l,
589
- isInvalid: i,
590
- onBlur: g,
591
- onFocus: R,
592
- allowsCustomValue: !0,
593
- menuTrigger: "input",
594
- items: N
595
- }, h(M, {
596
- onFocus: R
597
- }), h(_, {
598
- options: N
599
- }), /* @__PURE__ */ n.createElement(Ye, {
600
- optionCount: N.length
601
- }));
602
- }, Sn = ({ className: e, ...t }) => {
603
- const { id: o, placeholder: r } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = t, s = B(null);
604
- return le(() => {
605
- var d;
606
- (d = s.current) == null || d.focus();
607
- }, o), /* @__PURE__ */ n.createElement(ie, {
608
- ref: s,
609
- id: a,
610
- "aria-describedby": l,
611
- className: e,
612
- placeholder: r,
613
- onFocus: i
614
- });
615
- }, He = ({ children: e, className: t }) => {
616
- const o = E(e, He.Option);
617
- return /* @__PURE__ */ n.createElement(Ae, {
618
- className: t,
619
- containerPadding: 0,
620
- offset: 0
621
- }, /* @__PURE__ */ n.createElement(_e, {
622
- renderEmptyState: () => null
623
- }, (r) => h(o, {
624
- id: r.id,
625
- label: r.label
626
- })));
627
- }, Dn = ({ className: e, ...t }) => {
628
- const { id: o, label: r } = t;
629
- return /* @__PURE__ */ n.createElement(Pe, {
630
- className: e,
631
- id: o,
632
- textValue: r
633
- }, r);
634
- };
635
- He.Option = Dn;
636
- k.Label = ue;
637
- k.Input = Sn;
638
- k.Options = He;
639
- k.Description = ce;
640
- k.Error = de;
641
- const oe = ({ children: e }) => {
642
- const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), { t: L } = Me(), b = L("field.mla-apartment.label"), p = E(e, oe.Label), y = E(e, oe.Input), N = E(e, oe.Description), F = E(e, oe.Error);
643
- return /* @__PURE__ */ n.createElement(u, {
644
- fieldId: t,
645
- renderLabel: () => h(p, {
646
- label: b
647
- }),
648
- renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
649
- "aria-labelledby": I,
650
- value: o ?? "",
651
- onChange: r,
652
- isDisabled: a,
653
- isReadOnly: l,
654
- isRequired: i,
655
- isInvalid: s,
656
- onBlur: d,
657
- onFocus: m
658
- }, y),
659
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, F, N)
660
- });
661
- }, Rn = ({ className: e }) => {
662
- const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: a } = T(), l = B(null);
663
- return le(() => {
664
- var i;
665
- (i = l.current) == null || i.focus();
666
- }, t), /* @__PURE__ */ n.createElement(ie, {
667
- ref: l,
668
- id: r,
669
- "aria-describedby": a,
670
- className: e,
671
- placeholder: o
672
- });
673
- };
674
- oe.Label = ue;
675
- oe.Input = Rn;
676
- oe.Description = ce;
677
- oe.Error = de;
678
- const se = ({ children: e }) => {
679
- const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), L = be("city"), b = E(e, se.Label), p = E(e, se.Input), y = E(e, se.Description), N = E(e, se.Error);
680
- return /* @__PURE__ */ n.createElement(u, {
681
- fieldId: t,
682
- renderLabel: () => h(b, {
683
- label: L
684
- }),
685
- renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
686
- "aria-labelledby": I,
687
- value: o ?? "",
688
- onChange: r,
689
- isDisabled: a,
690
- isReadOnly: l,
691
- isRequired: i,
692
- isInvalid: s,
693
- onBlur: d,
694
- onFocus: m
695
- }, p),
696
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, y)
697
- });
698
- }, An = ({ className: e }) => {
699
- const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: a } = T(), l = B(null);
700
- return le(() => {
701
- var i;
702
- (i = l.current) == null || i.focus();
703
- }, t), /* @__PURE__ */ n.createElement(ie, {
704
- ref: l,
705
- id: r,
706
- "aria-describedby": a,
707
- className: e,
708
- placeholder: o
709
- });
710
- };
711
- se.Label = ue;
712
- se.Input = An;
713
- se.Description = ce;
714
- se.Error = de;
715
- const Dt = ({ readOnly: e, disabled: t } = {}) => {
716
- const o = De(It);
717
- return D(() => {
718
- !o || o.isOpen || e || t || o.open(null, "manual");
719
- }, [
720
- o,
721
- e,
722
- t
723
- ]);
724
- }, _n = (e, t) => e.find((o) => o.label.toLocaleLowerCase() === t.toLocaleLowerCase().trim()), Rt = ({ options: e, value: t, commit: o, clear: r, onBlur: a }) => {
725
- const [l, i] = ye(null), s = Qt(a), d = w(() => {
726
- var b;
727
- return t ? ((b = e.find((p) => p.value === t)) == null ? void 0 : b.label) ?? "" : "";
728
- }, [
729
- t,
730
- e
731
- ]), m = D((b) => {
732
- typeof b != "string" || b === "" || b === t || (i(null), o(b));
733
- }, [
734
- o,
735
- t
736
- ]), u = D((b) => {
737
- if (i(b), b === "")
738
- return;
739
- const p = _n(e, b);
740
- p && p.value !== t && o(p.value);
741
- }, [
742
- o,
743
- e,
744
- t
745
- ]), I = D((b) => {
746
- b.key !== "Enter" && b.key !== "Escape" || (i(null), b.key === "Enter" && l === "" && t && r());
747
- }, [
748
- l,
749
- t,
750
- r
751
- ]), L = D(() => {
752
- l === "" && t && r(), i(null), s();
753
- }, [
754
- l,
755
- t,
756
- r,
757
- s
758
- ]);
759
- return {
760
- value: t ?? null,
761
- inputValue: l ?? d,
762
- onChange: m,
763
- onInputChange: u,
764
- onBlur: L,
765
- onInputKeyDown: I
766
- };
767
- }, Y = ({ children: e }) => {
768
- const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, options: I } = P(), { labelId: L } = T(), { t: b } = Me(), { language: p } = yt(), y = w(() => (I || []).reduce((x, q) => (q.value && he.hasOwnProperty(q.value) && x.push({
769
- value: q.value,
770
- label: b(`locale-dataset.countries.${he[q.value].toUpperCase()}`)
771
- }), x), []).sort((x, q) => x.label.localeCompare(q.label, p)), [
772
- I,
773
- b,
774
- p
775
- ]), N = D((x) => r(x), [
776
- r
777
- ]), F = D(() => N(""), [
778
- N
779
- ]), { onInputKeyDown: S, ...g } = Rt({
780
- options: y,
781
- value: o,
782
- commit: N,
783
- clear: F,
784
- onBlur: d
785
- }), R = be("country"), M = E(e, Y.Label), _ = E(e, Y.Control), O = E(e, Y.Options), v = E(e, Y.Description), pe = E(e, Y.Error);
786
- return /* @__PURE__ */ n.createElement(u, {
787
- fieldId: t,
788
- renderLabel: () => h(M, {
789
- label: R
790
- }),
791
- renderInput: () => /* @__PURE__ */ n.createElement(Re, {
792
- "aria-labelledby": L,
793
- ...g,
794
- isDisabled: a,
795
- isReadOnly: l,
796
- isRequired: i,
797
- isInvalid: s,
798
- onFocus: m,
799
- menuTrigger: "input"
800
- }, h(_, {
801
- onKeyDown: S
802
- }), h(O, {
803
- options: y
804
- })),
805
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, pe, v)
806
- });
807
- }, Fe = ({ children: e, className: t, ...o }) => {
808
- const { disabled: r, hasError: a } = P(), { onKeyDown: l } = o, i = E(e, Fe.Input), s = E(e, Fe.Trigger);
809
- return /* @__PURE__ */ n.createElement(Lt, {
810
- className: t,
811
- isDisabled: r,
812
- isInvalid: a
813
- }, h(i, {
814
- onKeyDown: l
815
- }), s);
816
- }, Pn = ({ className: e, ...t }) => {
817
- const { id: o, placeholder: r, readOnly: a, disabled: l } = P(), { inputId: i, ariaDescribedBy: s } = T(), { onKeyDown: d } = t, m = B(null), u = Dt({
818
- readOnly: a,
819
- disabled: l
820
- });
821
- return le(() => {
822
- var I;
823
- (I = m.current) == null || I.focus();
824
- }, o), /* @__PURE__ */ n.createElement(ie, {
825
- ref: m,
826
- id: i,
827
- "aria-describedby": s,
828
- className: e,
829
- placeholder: r,
830
- onClick: u,
831
- onKeyDown: d
832
- });
833
- }, Tn = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(Nt, {
834
- className: t
835
- }, e);
836
- Fe.Input = Pn;
837
- Fe.Trigger = Tn;
838
- const je = ({ children: e, className: t, ...o }) => {
839
- const { options: r } = o, a = E(e, je.Option);
840
- return /* @__PURE__ */ n.createElement(Ae, {
841
- className: t,
842
- containerPadding: 0,
843
- offset: 0
844
- }, /* @__PURE__ */ n.createElement(_e, null, r.map((l) => h(a, {
845
- key: l.value,
846
- value: l.value,
847
- label: l.label
848
- }))));
849
- }, Mn = ({ className: e, ...t }) => {
850
- const { value: o, label: r } = t;
851
- return /* @__PURE__ */ n.createElement(Pe, {
852
- className: e,
853
- id: o,
854
- textValue: r
855
- }, r);
856
- };
857
- je.Option = Mn;
858
- Y.Label = ue;
859
- Y.Control = Fe;
860
- Y.Options = je;
861
- Y.Description = ce;
862
- Y.Error = de;
863
- const qn = /(\d{7})|(\d{3}-\d{4})/;
864
- function wn(e) {
865
- var t;
866
- return (t = e.match(qn)) == null ? void 0 : t[0];
867
- }
868
- function xn({ isAutocompleteEnabled: e }) {
869
- const t = B({
870
- hasAddress: !1
871
- }), o = Ke({
872
- enabled: e
873
- });
874
- return {
875
- searchByPostalCode: D(async (a) => {
876
- const l = wn(a);
877
- if (l) {
878
- if (t.current.postalCode === l && t.current.hasAddress)
879
- return t.current.address;
880
- t.current = {
881
- postalCode: l,
882
- address: void 0,
883
- hasAddress: !1
884
- };
885
- try {
886
- const i = await (o == null ? void 0 : o.searchByPostalCode({
887
- countryCode: "JP",
888
- postalCode: l
889
- }));
890
- return t.current.hasAddress = !0, t.current.address = void 0, i != null && i.formattedAddress ? (t.current.address = i, i) : void 0;
891
- } catch (i) {
892
- console.error(i);
893
- }
894
- }
895
- }, [
896
- o
897
- ])
898
- };
899
- }
900
- const $ = ({ children: e }) => {
901
- const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: I } = P(), { labelId: L } = T(), b = Ne(), { autocompleteEnabled: p } = Le(), y = !!(b && he[b] === he.JP), N = (I || p) && y, F = be("zipCode"), S = E(e, $.Label), g = E(e, $.Control), R = E(e, $.Options), M = E(e, $.Description), _ = E(e, $.Error);
902
- return N ? /* @__PURE__ */ n.createElement(u, {
903
- fieldId: t,
904
- renderLabel: () => h(S, {
905
- label: F
906
- }),
907
- renderInput: () => /* @__PURE__ */ n.createElement(Bn, {
908
- value: o,
909
- onChange: r,
910
- disabled: a,
911
- readOnly: l,
912
- required: i,
913
- hasError: s,
914
- onBlur: d,
915
- onFocus: m
916
- }, g, R),
917
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _, M)
918
- }) : /* @__PURE__ */ n.createElement(u, {
919
- fieldId: t,
920
- renderLabel: () => h(S, {
921
- label: F
922
- }),
923
- renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
924
- "aria-labelledby": L,
925
- value: o ?? "",
926
- onChange: r,
927
- isDisabled: a,
928
- isReadOnly: l,
929
- isRequired: i,
930
- isInvalid: s,
931
- onBlur: d,
932
- onFocus: m
933
- }, g),
934
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, _, M)
935
- });
936
- }, Bn = ({ children: e, value: t, onChange: o, disabled: r, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
937
- const { labelId: m } = T(), { onAddressSelect: u } = Le(), [I, L] = ye(!1), { searchByPostalCode: b } = xn({
938
- isAutocompleteEnabled: I
939
- }), [p, y] = ye(), N = w(() => p ? [
940
- {
941
- id: V(),
942
- label: p.formattedAddress || ""
943
- }
944
- ] : [], [
945
- p
946
- ]), F = D(async (O) => {
947
- o(O);
948
- const v = await b(O ?? "");
949
- y(v);
950
- }, [
951
- o,
952
- b
953
- ]), S = D(async (O) => {
954
- O && (y(void 0), p && u && u(p));
955
- }, [
956
- u,
957
- p
958
- ]), g = D(() => {
959
- y(void 0), s == null || s();
960
- }, [
961
- s
962
- ]), R = D(() => {
963
- L(!0), d == null || d();
964
- }, [
965
- d
966
- ]), M = E(e, $.Control), _ = E(e, $.Options);
967
- return /* @__PURE__ */ n.createElement(Re, {
968
- "aria-labelledby": m,
969
- inputValue: t ?? "",
970
- onInputChange: F,
971
- value: null,
972
- onChange: S,
973
- isDisabled: r,
974
- isReadOnly: a,
975
- isRequired: l,
976
- isInvalid: i,
977
- onBlur: g,
978
- onFocus: R,
979
- allowsCustomValue: !0,
980
- menuTrigger: "input",
981
- items: N
982
- }, h(M, {
983
- onFocus: R
984
- }), h(_, {
985
- options: N
986
- }), /* @__PURE__ */ n.createElement(Ye, {
987
- optionCount: N.length
988
- }));
989
- }, Je = ({ children: e, className: t, ...o }) => {
990
- const { disabled: r, hasError: a } = P(), { onFocus: l } = o, i = Ne(), s = E(e, Je.Input);
991
- return /* @__PURE__ */ n.createElement("div", {
992
- className: t,
993
- "data-country": i || void 0,
994
- "data-disabled": r || void 0,
995
- "data-invalid": a || void 0
996
- }, h(s, {
997
- onFocus: l
998
- }));
999
- }, kn = ({ className: e, ...t }) => {
1000
- const { id: o, placeholder: r } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = t, s = B(null);
1001
- return le(() => {
1002
- var d;
1003
- (d = s.current) == null || d.focus();
1004
- }, o), /* @__PURE__ */ n.createElement(ie, {
1005
- ref: s,
1006
- id: a,
1007
- "aria-describedby": l,
1008
- className: e,
1009
- placeholder: r,
1010
- onFocus: i
1011
- });
1012
- }, Ge = ({ children: e, className: t }) => {
1013
- const o = E(e, Ge.Option);
1014
- return /* @__PURE__ */ n.createElement(Ae, {
1015
- className: t,
1016
- containerPadding: 0,
1017
- offset: 0
1018
- }, /* @__PURE__ */ n.createElement(_e, {
1019
- renderEmptyState: () => null
1020
- }, (r) => h(o, {
1021
- id: r.id,
1022
- label: r.label
1023
- })));
1024
- }, $n = ({ className: e, ...t }) => {
1025
- const { id: o, label: r } = t;
1026
- return /* @__PURE__ */ n.createElement(Pe, {
1027
- className: e,
1028
- id: o,
1029
- textValue: r
1030
- }, r);
1031
- };
1032
- Ge.Option = $n;
1033
- Je.Input = kn;
1034
- $.Label = ue;
1035
- $.Control = Je;
1036
- $.Options = Ge;
1037
- $.Description = ce;
1038
- $.Error = de;
1039
- const U = ({ children: e }) => {
1040
- const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: I } = P(), { labelId: L } = T(), { autocompleteEnabled: b } = Le(), p = I || b, y = be("streetName"), N = E(e, U.Label), F = E(e, U.Input), S = E(e, U.Options), g = E(e, U.Description), R = E(e, U.Error);
1041
- return p ? /* @__PURE__ */ n.createElement(u, {
1042
- fieldId: t,
1043
- renderLabel: () => h(N, {
1044
- label: y
1045
- }),
1046
- renderInput: () => /* @__PURE__ */ n.createElement(Un, {
1047
- value: o,
1048
- onChange: r,
1049
- disabled: a,
1050
- readOnly: l,
1051
- required: i,
1052
- hasError: s,
1053
- onBlur: d,
1054
- onFocus: m
1055
- }, F, S),
1056
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
1057
- }) : /* @__PURE__ */ n.createElement(u, {
1058
- fieldId: t,
1059
- renderLabel: () => h(N, {
1060
- label: y
1061
- }),
1062
- renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
1063
- "aria-labelledby": L,
1064
- value: o ?? "",
1065
- onChange: r,
1066
- isDisabled: a,
1067
- isReadOnly: l,
1068
- isRequired: i,
1069
- isInvalid: s,
1070
- onBlur: d,
1071
- onFocus: m
1072
- }, F),
1073
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
1074
- });
1075
- }, Un = ({ children: e, value: t, onChange: o, disabled: r, readOnly: a, required: l, hasError: i, onBlur: s, onFocus: d }) => {
1076
- const { labelId: m } = T(), { onAddressSelect: u } = Le(), I = Ne(), L = Ke({
1077
- enabled: !0
1078
- }), { predictions: b, updatePredictions: p, clearPredictions: y } = St({
1079
- atlas: L
1080
- }), N = E(e, U.Input), F = E(e, U.Options), S = w(() => b.reduce((O, v) => (v.searchId && v.description && O.push({
1081
- id: v.searchId,
1082
- label: v.description
1083
- }), O), []), [
1084
- b
1085
- ]), g = D((O) => {
1086
- p({
1087
- input: O,
1088
- countryCodes: I ? [
1089
- I
1090
- ] : void 0
1091
- }), o(O);
1092
- }, [
1093
- o,
1094
- p,
1095
- I
1096
- ]), R = D(async (O) => {
1097
- if (y(), !O)
1098
- return;
1099
- const v = await (L == null ? void 0 : L.getPlace({
1100
- searchId: String(O)
1101
- }));
1102
- v && u && u(v);
1103
- }, [
1104
- u,
1105
- y,
1106
- L
1107
- ]), M = D(() => {
1108
- y(), s == null || s();
1109
- }, [
1110
- s,
1111
- y
1112
- ]), _ = D(() => {
1113
- d == null || d();
1114
- }, [
1115
- d
1116
- ]);
1117
- return /* @__PURE__ */ n.createElement(Re, {
1118
- "aria-labelledby": m,
1119
- inputValue: t ?? "",
1120
- onInputChange: g,
1121
- value: null,
1122
- onChange: R,
1123
- isDisabled: r,
1124
- isReadOnly: a,
1125
- isRequired: l,
1126
- isInvalid: i,
1127
- onBlur: M,
1128
- onFocus: _,
1129
- allowsCustomValue: !0,
1130
- menuTrigger: "input",
1131
- items: S
1132
- }, h(N, {
1133
- onFocus: _
1134
- }), h(F, {
1135
- options: S
1136
- }), /* @__PURE__ */ n.createElement(Ye, {
1137
- optionCount: S.length
1138
- }));
1139
- }, Wn = ({ className: e, ...t }) => {
1140
- const { id: o, placeholder: r } = P(), { inputId: a, ariaDescribedBy: l } = T(), { onFocus: i } = t, s = B(null);
1141
- return le(() => {
1142
- var d;
1143
- (d = s.current) == null || d.focus();
1144
- }, o), /* @__PURE__ */ n.createElement(ie, {
1145
- ref: s,
1146
- id: a,
1147
- "aria-describedby": l,
1148
- className: e,
1149
- placeholder: r,
1150
- onFocus: i
1151
- });
1152
- }, Xe = ({ children: e, className: t }) => {
1153
- const o = E(e, Xe.Option);
1154
- return /* @__PURE__ */ n.createElement(Ae, {
1155
- className: t,
1156
- containerPadding: 0,
1157
- offset: 0
1158
- }, /* @__PURE__ */ n.createElement(_e, {
1159
- renderEmptyState: () => null
1160
- }, (r) => h(o, {
1161
- id: r.id,
1162
- label: r.label
1163
- })));
1164
- }, Vn = ({ className: e, ...t }) => {
1165
- const { id: o, label: r } = t;
1166
- return /* @__PURE__ */ n.createElement(Pe, {
1167
- className: e,
1168
- id: o,
1169
- textValue: r
1170
- }, r);
1171
- };
1172
- Xe.Option = Vn;
1173
- U.Label = ue;
1174
- U.Input = Wn;
1175
- U.Options = Xe;
1176
- U.Description = ce;
1177
- U.Error = de;
1178
- const ae = ({ children: e }) => {
1179
- const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), L = be("streetNumber"), b = E(e, ae.Label), p = E(e, ae.Input), y = E(e, ae.Description), N = E(e, ae.Error);
1180
- return /* @__PURE__ */ n.createElement(u, {
1181
- fieldId: t,
1182
- renderLabel: () => h(b, {
1183
- label: L
1184
- }),
1185
- renderInput: () => /* @__PURE__ */ n.createElement(Ce, {
1186
- "aria-labelledby": I,
1187
- value: o ?? "",
1188
- onChange: r,
1189
- isDisabled: a,
1190
- isReadOnly: l,
1191
- isRequired: i,
1192
- isInvalid: s,
1193
- onBlur: d,
1194
- onFocus: m
1195
- }, p),
1196
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, y)
1197
- });
1198
- }, Kn = ({ className: e }) => {
1199
- const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: a } = T(), l = B(null);
1200
- return le(() => {
1201
- var i;
1202
- (i = l.current) == null || i.focus();
1203
- }, t), /* @__PURE__ */ n.createElement(ie, {
1204
- ref: l,
1205
- id: r,
1206
- "aria-describedby": a,
1207
- className: e,
1208
- placeholder: o
1209
- });
1210
- };
1211
- ae.Label = ue;
1212
- ae.Input = Kn;
1213
- ae.Description = ce;
1214
- ae.Error = de;
1215
- const H = ({ children: e }) => {
1216
- const { id: t, value: o, onChange: r, disabled: a, readOnly: l, required: i, hasError: s, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: I } = T(), { t: L } = Me(), b = Ne(), p = b ? he[b] : void 0, y = b && xt.getCountryByShortKey(b), N = w(() => {
1217
- var q;
1218
- return (Bt(((q = y == null ? void 0 : y.subdivisions) == null ? void 0 : q.list) || [], p) || []).map((j) => ({
1219
- value: j.key,
1220
- label: L(j.displayName)
1221
- })).sort((j, A) => j.label.localeCompare(A.label));
1222
- }, [
1223
- p,
1224
- L,
1225
- y
1226
- ]), F = D(() => r(""), [
1227
- r
1228
- ]), { onInputKeyDown: S, ...g } = Rt({
1229
- options: N,
1230
- value: o,
1231
- commit: r,
1232
- clear: F,
1233
- onBlur: d
1234
- }), R = be("subdivision"), M = E(e, H.Label), _ = E(e, H.Control), O = E(e, H.Options), v = E(e, H.Description), pe = E(e, H.Error);
1235
- return /* @__PURE__ */ n.createElement(u, {
1236
- fieldId: t,
1237
- renderLabel: () => h(M, {
1238
- label: R
1239
- }),
1240
- renderInput: () => /* @__PURE__ */ n.createElement(Re, {
1241
- "aria-labelledby": I,
1242
- ...g,
1243
- isDisabled: a,
1244
- isReadOnly: l,
1245
- isRequired: i,
1246
- isInvalid: s,
1247
- onFocus: m,
1248
- menuTrigger: "input"
1249
- }, h(_, {
1250
- onKeyDown: S
1251
- }), h(O, {
1252
- options: N
1253
- })),
1254
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, pe, v)
1255
- });
1256
- }, Se = ({ children: e, className: t, ...o }) => {
1257
- const { disabled: r, hasError: a } = P(), { onKeyDown: l } = o, i = E(e, Se.Input), s = E(e, Se.Trigger);
1258
- return /* @__PURE__ */ n.createElement(Lt, {
1259
- className: t,
1260
- isDisabled: r,
1261
- isInvalid: a
1262
- }, h(i, {
1263
- onKeyDown: l
1264
- }), s);
1265
- }, Yn = ({ className: e, ...t }) => {
1266
- const { id: o, placeholder: r, readOnly: a, disabled: l } = P(), { inputId: i, ariaDescribedBy: s } = T(), { onKeyDown: d } = t, m = B(null), u = Dt({
1267
- readOnly: a,
1268
- disabled: l
1269
- });
1270
- return le(() => {
1271
- var I;
1272
- (I = m.current) == null || I.focus();
1273
- }, o), /* @__PURE__ */ n.createElement(ie, {
1274
- ref: m,
1275
- id: i,
1276
- "aria-describedby": s,
1277
- className: e,
1278
- placeholder: r,
1279
- onClick: u,
1280
- onKeyDown: d
1281
- });
1282
- }, Hn = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(Nt, {
1283
- className: t
1284
- }, e);
1285
- Se.Input = Yn;
1286
- Se.Trigger = Hn;
1287
- const ze = ({ children: e, className: t, ...o }) => {
1288
- const { options: r } = o, a = E(e, ze.Option);
1289
- return /* @__PURE__ */ n.createElement(Ae, {
1290
- className: t,
1291
- containerPadding: 0,
1292
- offset: 0
1293
- }, /* @__PURE__ */ n.createElement(_e, null, r.map((l) => h(a, {
1294
- key: l.value,
1295
- value: l.value,
1296
- label: l.label
1297
- }))));
1298
- }, jn = ({ className: e, ...t }) => {
1299
- const { value: o, label: r } = t;
1300
- return /* @__PURE__ */ n.createElement(Pe, {
1301
- className: e,
1302
- id: o,
1303
- textValue: r
1304
- }, r);
1305
- };
1306
- ze.Option = jn;
1307
- H.Label = ue;
1308
- H.Control = Se;
1309
- H.Options = ze;
1310
- H.Description = ce;
1311
- H.Error = de;
1312
- const Jn = () => me("country"), Gn = () => me("subdivision"), Xn = () => me("city"), zn = () => me("addressLine"), Qn = () => me("addressLine2"), Zn = () => me("postalCode"), er = () => me("streetName"), tr = () => me("streetNumber"), nr = () => me("apartment"), rr = {
1313
- [K.MLA_COUNTRY]: Jn,
1314
- [K.MLA_SUBDIVISION]: Gn,
1315
- [K.MLA_CITY]: Xn,
1316
- [K.MLA_ADDRESS_LINE]: zn,
1317
- [K.MLA_ADDRESS_LINE_2]: Qn,
1318
- [K.MLA_POSTAL_CODE]: Zn,
1319
- [K.MLA_STREET_NAME]: er,
1320
- [K.MLA_STREET_NUMBER]: tr,
1321
- [K.MLA_APARTMENT]: nr
1322
- }, or = {}, sr = [], c = ({ children: e }) => {
1323
- const { id: t, form: o, value: r, onChange: a, onFieldBlur: l, onFieldFocus: i, errors: s, FieldLayout: d, fieldSettings: m, label: u, validation: I, target: L, autocompleteEnabled: b, required: p, fieldType: y } = P(), [N, F] = ye(null), S = kt(), g = w(() => ({
1324
- ...S,
1325
- ...rr
1326
- }), [
1327
- S
1328
- ]), { isExperimentEnabled: R } = bt(), M = R(ft.STREETLESS_LOCALITY_FALLBACK), { validateFields: _ } = $t(), O = Ut(), v = Ct(), pe = w(() => ({
1329
- ...v,
1330
- actions: {
1331
- predict: Kt,
1332
- getPlace: Vt,
1333
- searchByPostalCode: Wt,
1334
- ...v.actions
1335
- }
1336
- }), [
1337
- v
1338
- ]), { form: x, isMultilineAddressField: q } = pn({
1339
- id: t,
1340
- target: L,
1341
- fieldType: y,
1342
- form: o,
1343
- country: r == null ? void 0 : r.country,
1344
- fieldSettings: m,
1345
- validation: I,
1346
- required: p
1347
- }), j = D((W) => {
1348
- if (!r)
1349
- return;
1350
- const G = en(W, q, M), Te = {
1351
- ...G,
1352
- [Ie.COUNTRY]: G[Ie.COUNTRY] ?? r[Ie.COUNTRY]
1353
- };
1354
- a == null || a(Te);
1355
- }, [
1356
- a,
1357
- r,
1358
- q,
1359
- M
1360
- ]), A = D((W, G) => {
1361
- if (q && W === Ie.COUNTRY && (r == null ? void 0 : r[W]) !== G) {
1362
- a == null || a({
1363
- [Ie.COUNTRY]: G
1364
- });
1365
- return;
1366
- }
1367
- a == null || a({
1368
- ...r,
1369
- [W]: G
1370
- });
1371
- }, [
1372
- a,
1373
- r,
1374
- q
1375
- ]), J = D(async (W) => _(q ? [
1376
- ...W,
1377
- {
1378
- path: `${L}/${Ie.COUNTRY}`,
1379
- value: r == null ? void 0 : r.country
1380
- }
1381
- ] : W), [
1382
- r,
1383
- L,
1384
- _,
1385
- q
1386
- ]);
1387
- Yt(t, () => {
1388
- var Te;
1389
- const W = s == null ? void 0 : s[0], G = (Te = x == null ? void 0 : x.fields) == null ? void 0 : Te.find((st) => "target" in st && st.target === (W == null ? void 0 : W.errorPath));
1390
- return G == null ? void 0 : G.id;
1391
- });
1392
- const Ee = E(e, c.Country), Oe = E(e, c.Subdivision), Qe = E(e, c.City), Ze = E(e, c.AddressLine), et = E(e, c.AddressLine2), tt = E(e, c.PostalCode), nt = E(e, c.StreetName), rt = E(e, c.StreetNumber), ot = E(e, c.Apartment), At = w(() => ({
1393
- country: Ee,
1394
- subdivision: Oe,
1395
- city: Qe,
1396
- addressLine: Ze,
1397
- addressLine2: et,
1398
- postalCode: tt,
1399
- streetName: nt,
1400
- streetNumber: rt,
1401
- apartment: ot
1402
- }), [
1403
- Ee,
1404
- Oe,
1405
- Qe,
1406
- Ze,
1407
- et,
1408
- tt,
1409
- nt,
1410
- rt,
1411
- ot
1412
- ]);
1413
- return x ? /* @__PURE__ */ n.createElement(d, {
1414
- fieldId: t
1415
- }, /* @__PURE__ */ n.createElement(nn, {
1416
- countryCode: r == null ? void 0 : r.country
1417
- }, /* @__PURE__ */ n.createElement(tn, {
1418
- autocompleteEnabled: b,
1419
- onAddressSelect: j
1420
- }, /* @__PURE__ */ n.createElement(En, {
1421
- fields: At
1422
- }, /* @__PURE__ */ n.createElement("div", {
1423
- ref: F,
1424
- style: {
1425
- display: "contents"
1426
- }
1427
- }), /* @__PURE__ */ n.createElement(_t, {
1428
- getContainer: () => N
1429
- }, /* @__PURE__ */ n.createElement("fieldset", {
1430
- style: jt
1431
- }, /* @__PURE__ */ n.createElement("legend", {
1432
- style: Jt
1433
- }, u), /* @__PURE__ */ n.createElement(Ht, {
1434
- formSchema: O,
1435
- form: x,
1436
- values: r ?? or,
1437
- onFieldChange: A,
1438
- onBlur: l,
1439
- onFocus: i,
1440
- errors: s ?? sr,
1441
- validateFields: J,
1442
- fields: g,
1443
- fieldActions: pe
1444
- }))))))) : null;
1445
- };
1446
- c.Country = Y;
1447
- c.Subdivision = H;
1448
- c.City = se;
1449
- c.AddressLine = k;
1450
- c.AddressLine2 = re;
1451
- c.PostalCode = $;
1452
- c.StreetName = U;
1453
- c.StreetNumber = ae;
1454
- c.Apartment = oe;
1455
- const ar = "_postalCodeControl_1tire_1", lr = "_comboControl_1tire_5", ir = "_comboTrigger_1tire_19", ve = {
1456
- postalCodeControl: ar,
1457
- comboControl: lr,
1458
- comboTrigger: ir
1459
- }, Fr = () => /* @__PURE__ */ n.createElement(c, null, /* @__PURE__ */ n.createElement(c.Country, null, /* @__PURE__ */ n.createElement(c.Country.Label, {
1460
- className: C(Q, f.label)
1461
- }, /* @__PURE__ */ n.createElement(c.Country.Label.Required, {
1462
- className: C(Z, f.requiredMark)
1463
- })), /* @__PURE__ */ n.createElement(c.Country.Control, {
1464
- className: C(ee, f.input, ve.comboControl)
1465
- }, /* @__PURE__ */ n.createElement(c.Country.Control.Input, {
1466
- className: C(f.innerInput, fe)
1467
- }), /* @__PURE__ */ n.createElement(c.Country.Control.Trigger, {
1468
- className: ve.comboTrigger
1469
- }, /* @__PURE__ */ n.createElement(lt, {
1470
- className: f.dropdownIcon
1471
- }))), /* @__PURE__ */ n.createElement(c.Country.Options, {
1472
- className: C(ge, f.selectPopover, f.dropdownPopover)
1473
- }, /* @__PURE__ */ n.createElement(c.Country.Options.Option, {
1474
- className: C(f.selectOption, fe)
1475
- })), /* @__PURE__ */ n.createElement(c.Country.Error, {
1476
- className: C(te, f.error)
1477
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.Country.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Country.Description, {
1478
- className: C(ne, f.description)
1479
- }, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1480
- content: e,
1481
- locale: t
1482
- }))), /* @__PURE__ */ n.createElement(c.AddressLine, null, /* @__PURE__ */ n.createElement(c.AddressLine.Label, {
1483
- className: C(Q, f.label)
1484
- }, /* @__PURE__ */ n.createElement(c.AddressLine.Label.Required, {
1485
- className: C(Z, f.requiredMark)
1486
- })), /* @__PURE__ */ n.createElement(c.AddressLine.Input, {
1487
- className: C(ee, f.input)
1488
- }), /* @__PURE__ */ n.createElement(c.AddressLine.Options, {
1489
- className: C(ge, f.selectPopover, f.dropdownPopover)
1490
- }, /* @__PURE__ */ n.createElement(c.AddressLine.Options.Option, {
1491
- className: C(f.selectOption, fe)
1492
- })), /* @__PURE__ */ n.createElement(c.AddressLine.Error, {
1493
- className: C(te, f.error)
1494
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.AddressLine.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine.Description, {
1495
- className: C(ne, f.description)
1496
- }, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1497
- content: e,
1498
- locale: t
1499
- }))), /* @__PURE__ */ n.createElement(c.AddressLine2, null, /* @__PURE__ */ n.createElement(c.AddressLine2.Label, {
1500
- className: C(Q, f.label)
1501
- }, /* @__PURE__ */ n.createElement(c.AddressLine2.Label.Required, {
1502
- className: C(Z, f.requiredMark)
1503
- })), /* @__PURE__ */ n.createElement(c.AddressLine2.Input, {
1504
- className: C(ee, f.input)
1505
- }), /* @__PURE__ */ n.createElement(c.AddressLine2.Error, {
1506
- className: C(te, f.error)
1507
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.AddressLine2.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine2.Description, {
1508
- className: C(ne, f.description)
1509
- }, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1510
- content: e,
1511
- locale: t
1512
- }))), /* @__PURE__ */ n.createElement(c.City, null, /* @__PURE__ */ n.createElement(c.City.Label, {
1513
- className: C(Q, f.label)
1514
- }, /* @__PURE__ */ n.createElement(c.City.Label.Required, {
1515
- className: C(Z, f.requiredMark)
1516
- })), /* @__PURE__ */ n.createElement(c.City.Input, {
1517
- className: C(ee, f.input)
1518
- }), /* @__PURE__ */ n.createElement(c.City.Error, {
1519
- className: C(te, f.error)
1520
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.City.Error.Text, null)), /* @__PURE__ */ n.createElement(c.City.Description, {
1521
- className: C(ne, f.description)
1522
- }, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1523
- content: e,
1524
- locale: t
1525
- }))), /* @__PURE__ */ n.createElement(c.PostalCode, null, /* @__PURE__ */ n.createElement(c.PostalCode.Label, {
1526
- className: C(Q, f.label)
1527
- }, /* @__PURE__ */ n.createElement(c.PostalCode.Label.Required, {
1528
- className: C(Z, f.requiredMark)
1529
- })), /* @__PURE__ */ n.createElement(c.PostalCode.Control, {
1530
- className: ve.postalCodeControl
1531
- }, /* @__PURE__ */ n.createElement(c.PostalCode.Control.Input, {
1532
- className: C(ee, f.input)
1533
- })), /* @__PURE__ */ n.createElement(c.PostalCode.Options, {
1534
- className: C(ge, f.selectPopover, f.dropdownPopover)
1535
- }, /* @__PURE__ */ n.createElement(c.PostalCode.Options.Option, {
1536
- className: C(f.selectOption, fe)
1537
- })), /* @__PURE__ */ n.createElement(c.PostalCode.Error, {
1538
- className: C(te, f.error)
1539
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.PostalCode.Error.Text, null)), /* @__PURE__ */ n.createElement(c.PostalCode.Description, {
1540
- className: C(ne, f.description)
1541
- }, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1542
- content: e,
1543
- locale: t
1544
- }))), /* @__PURE__ */ n.createElement(c.Subdivision, null, /* @__PURE__ */ n.createElement(c.Subdivision.Label, {
1545
- className: C(Q, f.label)
1546
- }, /* @__PURE__ */ n.createElement(c.Subdivision.Label.Required, {
1547
- className: C(Z, f.requiredMark)
1548
- })), /* @__PURE__ */ n.createElement(c.Subdivision.Control, {
1549
- className: C(ee, f.input, ve.comboControl)
1550
- }, /* @__PURE__ */ n.createElement(c.Subdivision.Control.Input, {
1551
- className: C(f.innerInput, fe)
1552
- }), /* @__PURE__ */ n.createElement(c.Subdivision.Control.Trigger, {
1553
- className: ve.comboTrigger
1554
- }, /* @__PURE__ */ n.createElement(lt, {
1555
- className: f.dropdownIcon
1556
- }))), /* @__PURE__ */ n.createElement(c.Subdivision.Options, {
1557
- className: C(ge, f.selectPopover, f.dropdownPopover)
1558
- }, /* @__PURE__ */ n.createElement(c.Subdivision.Options.Option, {
1559
- className: C(f.selectOption, fe)
1560
- })), /* @__PURE__ */ n.createElement(c.Subdivision.Error, {
1561
- className: C(te, f.error)
1562
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.Subdivision.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Subdivision.Description, {
1563
- className: C(ne, f.description)
1564
- }, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1565
- content: e,
1566
- locale: t
1567
- }))), /* @__PURE__ */ n.createElement(c.StreetName, null, /* @__PURE__ */ n.createElement(c.StreetName.Label, {
1568
- className: C(Q, f.label)
1569
- }, /* @__PURE__ */ n.createElement(c.StreetName.Label.Required, {
1570
- className: C(Z, f.requiredMark)
1571
- })), /* @__PURE__ */ n.createElement(c.StreetName.Input, {
1572
- className: C(ee, f.input)
1573
- }), /* @__PURE__ */ n.createElement(c.StreetName.Options, {
1574
- className: C(ge, f.selectPopover, f.dropdownPopover)
1575
- }, /* @__PURE__ */ n.createElement(c.StreetName.Options.Option, {
1576
- className: C(f.selectOption, fe)
1577
- })), /* @__PURE__ */ n.createElement(c.StreetName.Error, {
1578
- className: C(te, f.error)
1579
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.StreetName.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetName.Description, {
1580
- className: C(ne, f.description)
1581
- }, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1582
- content: e,
1583
- locale: t
1584
- }))), /* @__PURE__ */ n.createElement(c.StreetNumber, null, /* @__PURE__ */ n.createElement(c.StreetNumber.Label, {
1585
- className: C(Q, f.label)
1586
- }, /* @__PURE__ */ n.createElement(c.StreetNumber.Label.Required, {
1587
- className: C(Z, f.requiredMark)
1588
- })), /* @__PURE__ */ n.createElement(c.StreetNumber.Input, {
1589
- className: C(ee, f.input)
1590
- }), /* @__PURE__ */ n.createElement(c.StreetNumber.Error, {
1591
- className: C(te, f.error)
1592
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.StreetNumber.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetNumber.Description, {
1593
- className: C(ne, f.description)
1594
- }, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1595
- content: e,
1596
- locale: t
1597
- }))), /* @__PURE__ */ n.createElement(c.Apartment, null, /* @__PURE__ */ n.createElement(c.Apartment.Label, {
1598
- className: C(Q, f.label)
1599
- }, /* @__PURE__ */ n.createElement(c.Apartment.Label.Required, {
1600
- className: C(Z, f.requiredMark)
1601
- })), /* @__PURE__ */ n.createElement(c.Apartment.Input, {
1602
- className: C(ee, f.input)
1603
- }), /* @__PURE__ */ n.createElement(c.Apartment.Error, {
1604
- className: C(te, f.error)
1605
- }, /* @__PURE__ */ n.createElement(z, null), /* @__PURE__ */ n.createElement(c.Apartment.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Apartment.Description, {
1606
- className: C(ne, f.description)
1607
- }, ({ content: e, locale: t }) => /* @__PURE__ */ n.createElement(X, {
1608
- content: e,
1609
- locale: t
1610
- }))));
1611
- export {
1612
- Fr as M
1613
- };