@wix/form-elements 1.217.0 → 1.218.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 (107) hide show
  1. package/dist/component/{appointment-rac-BwV-BiuM.js → appointment-rac-BHOy_R7-.js} +4 -4
  2. package/dist/component/{bookings-address-rac-60s8mINA.js → bookings-address-rac-BCrQv66p.js} +1 -1
  3. package/dist/component/{bookings-email-rac-CD180ofz.js → bookings-email-rac-DmRfdxfb.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-DPj9TLDZ.js → bookings-first-name-rac-BXO3f2gd.js} +1 -1
  5. package/dist/component/{bookings-header-rac-DWAqHAC3.js → bookings-header-rac-CO6AOevd.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-C-0GchtO.js → bookings-last-name-rac-BJBEASFi.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-DpVUsgYV.js → bookings-login-bar-rac-BIAIfq4E.js} +5 -5
  8. package/dist/component/{bookings-phone-rac-DSw3Wpi6.js → bookings-phone-rac-Ccj4N7sU.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-BcfuuhqF.js → bookings-rich-text-rac-B3HZ904h.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-CxN4DXcm.js → checkbox-field-rac-CMLQboNZ.js} +43 -43
  11. package/dist/component/{checkbox-group-field-headless-Cxytn3cY.js → checkbox-group-field-headless-BoPu_anP.js} +41 -41
  12. package/dist/component/{checkbox-group-field-rac-COySLANT.js → checkbox-group-field-rac-DDkB4mAS.js} +4 -4
  13. package/dist/component/{checkbox-group-rac-C36q50g-.js → checkbox-group-rac-CYRjp2pd.js} +1 -1
  14. package/dist/component/{checkbox-rac-CPRna7wo.js → checkbox-rac-CZtOcpN3.js} +1 -1
  15. package/dist/component/{contacts-address-rac-C9WfyF_C.js → contacts-address-rac-CTcU_s2X.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-DI_n6KW2.js → contacts-birthdate-rac-CfoYd88-.js} +1 -1
  17. package/dist/component/{contacts-company-rac-C2L3jLDV.js → contacts-company-rac-BFa1_U3K.js} +1 -1
  18. package/dist/component/{contacts-email-rac-BXxC1EQz.js → contacts-email-rac-DnAo-YRv.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-DDNYc6DW.js → contacts-first-name-rac-CXaZzVt1.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-C8kg5uC1.js → contacts-last-name-rac-DfpXadTk.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-GBwlIMQi.js → contacts-phone-rac-CCwC37Ud.js} +1 -1
  22. package/dist/component/{contacts-position-rac-sI-eyBLH.js → contacts-position-rac-CvMNYTKL.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-DI3nlzX4.js → contacts-subscribe-rac-vL2jR6hR.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-CRq4rhb6.js → contacts-tax-id-rac-CrFhrlkk.js} +1 -1
  25. package/dist/component/{date-availability-17HTB6Bn.js → date-availability-5zvsa_GI.js} +1 -1
  26. package/dist/component/{date-input-field-rac-BLO1qQSi.js → date-input-field-rac-BQuCwFBz.js} +43 -43
  27. package/dist/component/{date-input-rac-Zryc6o9F.js → date-input-rac-DKzwySbG.js} +1 -1
  28. package/dist/component/{date-picker-field-rac-COGESH_j.js → date-picker-field-rac-D-B3bNeU.js} +35 -35
  29. package/dist/component/{date-picker-rac-BR5X3Gg4.js → date-picker-rac-DjYsBhgo.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-CKbGhDKq.js → date-time-input-field-rac-BECpkgB2.js} +30 -30
  31. package/dist/component/{date-time-input-rac-DnP-sVbv.js → date-time-input-rac-FbqGdzfB.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-O9bQHdjz.js → dext-checkbox-group-rac-BtSRkEFa.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-3Eqa1NNz.js → dext-checkbox-rac-BnC_NNyy.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-BYjvDil-.js → dext-date-picker-rac-okrwxNz9.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-BLX3xG9x.js → dext-date-time-input-rac-DHKRYBUe.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-BwpbF2-Z.js → dext-dropdown-rac-1T_Ufw_J.js} +1 -1
  37. package/dist/component/{dext-email-rac-DUNmxVKy.js → dext-email-rac-BY3bKE0q.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-D2rZrzXe.js → dext-number-input-rac-CFnKXD1l.js} +1 -1
  39. package/dist/component/{dext-phone-rac-C9dvhFCl.js → dext-phone-rac-LT9InJXw.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-D8mUfv1Y.js → dext-radio-group-rac-BUebk1mz.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-BY8MRBDl.js → dext-rating-input-rac-Drk4nKuW.js} +1 -1
  42. package/dist/component/{dext-tags-rac-DBKnRkUI.js → dext-tags-rac-BcW2-hht.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-BYVMZ7HH.js → dext-text-area-rac-ew2HEDVz.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-B6Ga232R.js → dext-text-input-rac-BhhGEp-y.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-Cgu1URth.js → dext-url-input-rac-DKPl-POV.js} +1 -1
  46. package/dist/component/{donation-rac-DL1TnDAO.js → donation-rac-B9w7zHLs.js} +50 -50
  47. package/dist/component/{dropdown-field-rac-KYozl4DF.js → dropdown-field-rac-CyIgQ8Wg.js} +3 -3
  48. package/dist/component/{dropdown-rac-DiqI7QHS.js → dropdown-rac-D4zhCab8.js} +1 -1
  49. package/dist/component/{ecom-address-rac-Cmb0daDG.js → ecom-address-rac-Cgc5vi9N.js} +1 -1
  50. package/dist/component/{ecom-subscription-checkbox-rac-B7AuYQA2.js → ecom-subscription-checkbox-rac-Ci19HUzq.js} +2 -2
  51. package/dist/component/{email-input-field-rac-DocV1aB9.js → email-input-field-rac-DX-z3AgN.js} +29 -29
  52. package/dist/component/{events-repeater-rac-B0Qqfo8D.js → events-repeater-rac-XGxIXTW0.js} +29 -29
  53. package/dist/component/{events-rsvp-rac-fv3hIzAL.js → events-rsvp-rac-CMEcer8W.js} +3 -3
  54. package/dist/component/{field-error-headless-Dfvu9FuO.js → field-error-headless-fX6PeZaI.js} +1 -1
  55. package/dist/component/{field-label-headless-Cxyl3wGC.js → field-label-headless-CoLjciGG.js} +5 -5
  56. package/dist/component/{file-upload-rac-Je_--JfX.js → file-upload-rac-N6_i0ky0.js} +88 -88
  57. package/dist/component/{fixed-payment-rac-BnXYEIDe.js → fixed-payment-rac-DB6BtjkX.js} +7 -7
  58. package/dist/component/{form-a7SUDn8q.js → form-cgY_BDTU.js} +1444 -1426
  59. package/dist/component/form.js +1 -1
  60. package/dist/component/{header-field-rac-D6gL7ZE_.js → header-field-rac-CwNoeHks.js} +2 -2
  61. package/dist/component/{header-rac-DEkEGPwy.js → header-rac-DefKb4Vd.js} +1 -1
  62. package/dist/component/{image-choice-rac-Br7ZpUIc.js → image-choice-rac-CZFYVSzP.js} +25 -25
  63. package/dist/component/{index-nfuicG4V.js → index-D1ybDmS5.js} +2 -2
  64. package/dist/component/{index-CCtGcc8K.js → index-DUVXPUGc.js} +4 -4
  65. package/dist/component/{isObjectLike-zLoHjg3a.js → isObjectLike-93vxyYs1.js} +1 -1
  66. package/dist/component/multiline-address-field-rac-BN_Tnrno.js +1738 -0
  67. package/dist/component/{multiline-address-rac-CyM0O2ZV.js → multiline-address-rac-CoF0BwJI.js} +1 -1
  68. package/dist/component/{number-input-field-rac-orHx_sCp.js → number-input-field-rac-BVdfzTwW.js} +21 -21
  69. package/dist/component/{number-input-rac-CF5v19rL.js → number-input-rac-D-A2ybtN.js} +1 -1
  70. package/dist/component/{password-rac-BSWihZvF.js → password-rac-CbUBNreW.js} +26 -26
  71. package/dist/component/{payment-input-rac-CeAz10YA.js → payment-input-rac-BXdDXgXp.js} +46 -46
  72. package/dist/component/{phone-input-field-rac-BefHQnSh.js → phone-input-field-rac-CjmpG7p9.js} +57 -57
  73. package/dist/component/{phone-rac-C5jSEw_g.js → phone-rac-D3g5Pi2p.js} +1 -1
  74. package/dist/component/{product-list-rac-C0UIu3qw.js → product-list-rac-gJvJaUnQ.js} +35 -35
  75. package/dist/component/{quiz-radio-group-rac-Bya6uEoi.js → quiz-radio-group-rac-YCKwAv5G.js} +1 -1
  76. package/dist/component/{radio-button-module-classes-YEfiQQtW.js → radio-button-module-classes-2nfcqSJp.js} +15 -15
  77. package/dist/component/{radio-group-field-rac-DZWxn-QY.js → radio-group-field-rac-BBYaCpeZ.js} +4 -4
  78. package/dist/component/{radio-group-rac-DsL2Ttyk.js → radio-group-rac-fYuYtO48.js} +1 -1
  79. package/dist/component/{rating-input-field-rac-BioYAy-_.js → rating-input-field-rac-sPYk1nWc.js} +20 -20
  80. package/dist/component/{rating-input-rac-DahZMbKa.js → rating-input-rac-CiWqxkPO.js} +1 -1
  81. package/dist/component/{rich-content-rac.module-pvsjrr7Y.js → rich-content-rac.module-BjcbV5CK.js} +5 -5
  82. package/dist/component/{rich-text-field-rac-H-mxitKA.js → rich-text-field-rac-DY0vRG7M.js} +4 -4
  83. package/dist/component/{rich-text-rac-CPfXGilA.js → rich-text-rac-BngE_MAC.js} +1 -1
  84. package/dist/component/{service-dropdown-rac-C2qfLOFr.js → service-dropdown-rac-Db53P8Fm.js} +13 -13
  85. package/dist/component/{services-multi-choice-rac-D7-sJi_t.js → services-multi-choice-rac-Cr791rTd.js} +9 -9
  86. package/dist/component/{signature-rac-DuQuR2U3.js → signature-rac-BCNYIwad.js} +41 -41
  87. package/dist/component/{submit-button-rac-DrUDtzCX.js → submit-button-rac-CyyEQGsz.js} +10 -10
  88. package/dist/component/{tags-field-rac-D8gyv5Kk.js → tags-field-rac-k3HHiR5C.js} +24 -24
  89. package/dist/component/{tags-rac-Be588VqA.js → tags-rac-nOXYrsHv.js} +1 -1
  90. package/dist/component/{text-area-field-rac-hezqhMgQ.js → text-area-field-rac-CwpxShM0.js} +22 -22
  91. package/dist/component/{text-area-rac-B_KUlOes.js → text-area-rac-CkKcWyW5.js} +1 -1
  92. package/dist/component/{text-input-field-rac-BWRz4111.js → text-input-field-rac-DvIwNwn3.js} +3 -3
  93. package/dist/component/{text-input-headless-BUNQFfZw.js → text-input-headless-vfGxjFpa.js} +9 -9
  94. package/dist/component/{text-input-rac-DdfHXZ8B.js → text-input-rac-DoVI2HNp.js} +1 -1
  95. package/dist/component/{time-input-rac-CUTavG2g.js → time-input-rac-DPbbdnl3.js} +16 -16
  96. package/dist/component/{url-input-field-rac-CG5yrtux.js → url-input-field-rac-CiZi4oVe.js} +20 -20
  97. package/dist/component/{url-input-rac-DMw4tPKk.js → url-input-rac-C-IvLpA8.js} +1 -1
  98. package/dist/component/{use-dropdown-option-class-name-CHW3T4PQ.js → use-dropdown-option-class-name-CMgoymWE.js} +2 -2
  99. package/dist/component/{use-dropdown-trigger-class-name-6UsjW0rS.js → use-dropdown-trigger-class-name-BH0PyTH_.js} +24 -24
  100. package/dist/component/{use-element-state-class-name-YRDhi6Zr.js → use-element-state-class-name-DiZjY9WE.js} +1 -1
  101. package/dist/component/{use-hoverable-input-class-name-arCOozPK.js → use-hoverable-input-class-name-QpNEvrdn.js} +2 -2
  102. package/dist/component/{use-is-forced-open-dropdown-NJIAuz_W.js → use-is-forced-open-dropdown-CHh9nGJz.js} +4 -4
  103. package/dist/component/{use-service-options-base-nhf-7Ope.js → use-service-options-base-BGB82e2d.js} +4 -4
  104. package/dist/component/use-text-input-class-name-_CjB7lhB.js +6 -0
  105. package/package.json +2 -2
  106. package/dist/component/multiline-address-field-rac-Bgfked1m.js +0 -1664
  107. package/dist/component/use-text-input-class-name-C9496S5f.js +0 -6
@@ -1,1664 +0,0 @@
1
- import { RicosViewer as z } from "@wix/ricos/viewer";
2
- import L from "classnames";
3
- import n, { useMemo as w, createContext as We, useContext as Ie, useState as Ee, useRef as x, useCallback as _, useEffect as Pe } from "react";
4
- import { bH as It, d as Lt, bC as Mt, bE as Nt, bf as qt, bg as wt, b8 as xt, be as W, F as K, bX as Te, bv as ct, bM as P, bJ as M, bO as ae, bV as be, bI as Ot, bk as Bt, C as ge, bt as kt, bx as Ut, bT as Vt, bN as $t, bS as Wt, bA as Kt, bp as Yt, bz as Ht, bP as jt, aP as Jt, Y as Xt, _ as G, am as Q, $ as Oe, M as Z, I as ee, Z as zt, a0 as Gt, a1 as Qt } from "./form-a7SUDn8q.js";
5
- import { UNSAFE_PortalProvider as Zt } from "react-aria";
6
- import { f as b, a as v } from "./find-child-C60k4CxG.js";
7
- import { F as en, V as tn } from "./headless-styles-CmcyA_pi.js";
8
- import { c as nn } from "./use-is-forced-open-dropdown-NJIAuz_W.js";
9
- import { TextField as fe, Input as le, ComboBoxStateContext as Ke, ComboBox as Fe, Popover as De, ListBox as Me, ListBoxItem as he, Group as gt, Button as vt } from "react-aria-components";
10
- import { D as ie, E as ce } from "./field-error-headless-Dfvu9FuO.js";
11
- import { L as de } from "./field-label-headless-Cxyl3wGC.js";
12
- import { e as rn, c as on, a as sn, r as St } from "./isObjectLike-zLoHjg3a.js";
13
- import { V as an, a as ln } from "./use-dropdown-option-class-name-CHW3T4PQ.js";
14
- import { u as cn } from "./use-invoke-callback-UH73A_J3.js";
15
- import { C as dt } from "./chevron-down-icon-CcpVm6B-.js";
16
- import { E as te } from "./error-icon-hZxQ6DEy.js";
17
- import { H as qe } from "./custom-focus-class-_483Pkwp.js";
18
- import { s as C } from "./field-rac.module-DcyJyi2B.js";
19
- import { u as ut } from "./use-hoverable-input-class-name-arCOozPK.js";
20
- const dn = (e, t, o) => {
21
- var s, l, i, a;
22
- const r = (s = e.steps) == null ? void 0 : s.map((d) => {
23
- var m, u, y, I, p, E;
24
- return {
25
- ...d,
26
- layout: {
27
- ...d.layout,
28
- large: {
29
- ...(m = d.layout) == null ? void 0 : m.large,
30
- items: ((I = (y = (u = d.layout) == null ? void 0 : u.large) == null ? void 0 : y.items) == null ? void 0 : I.map((f) => ({
31
- ...f,
32
- row: o.row <= f.row ? (f.row || 0) + 1 : f.row
33
- }))) || ((E = (p = d.layout) == null ? void 0 : p.large) == null ? void 0 : E.items)
34
- }
35
- }
36
- };
37
- });
38
- return (a = (i = (l = r == null ? void 0 : r[0].layout) == null ? void 0 : l.large) == null ? void 0 : i.items) == null || a.unshift(o), {
39
- ...e,
40
- fields: [
41
- t,
42
- ...e.fields || []
43
- ],
44
- steps: r || e.steps
45
- };
46
- };
47
- var Ce = /* @__PURE__ */ (function(e) {
48
- 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;
49
- })({});
50
- function un(e, t, o = !1) {
51
- const { country: r, subdivision: s, city: l, addressLine: i, streetAddress: a, addressLine2: d, postalCode: m } = e, u = {};
52
- return t ? (r && (u.country = r), s && (u.subdivision = s), l && (u.city = l), i ? u.addressLine = i : a != null && a.formattedAddressLine && (u.addressLine = a == null ? void 0 : a.formattedAddressLine), d && (u.addressLine = d), m && (u.postalCode = m), a != null && a.apt && (u.apartment = a == null ? void 0 : a.apt), a != null && a.name ? u.streetName = a == null ? void 0 : a.name : o && (a != null && a.formattedAddressLine) && (u.streetName = a == null ? void 0 : a.formattedAddressLine), a != null && a.number && (u.streetNumber = a.number)) : (r && (u.country = r), s && (u.subdivision = s), l && (u.city = l), i ? u.address_line = i : a != null && a.formattedAddressLine && (u.address_line = a == null ? void 0 : a.formattedAddressLine), d && (u.address_line = d), m && (u.postal_code = m), a != null && a.apt && (u.apartment = a == null ? void 0 : a.apt), a != null && a.name ? u.street_name = a == null ? void 0 : a.name : o && (a != null && a.formattedAddressLine) && (u.street_name = a == null ? void 0 : a.formattedAddressLine), a != null && a.number && (u.street_number = a.number)), u;
53
- }
54
- const Ft = /* @__PURE__ */ We({
55
- onAddressSelect: () => {
56
- }
57
- }), mn = ({ children: e, onAddressSelect: t, autocompleteEnabled: o }) => {
58
- const r = w(() => ({
59
- onAddressSelect: t,
60
- autocompleteEnabled: o
61
- }), [
62
- t,
63
- o
64
- ]);
65
- return /* @__PURE__ */ n.createElement(Ft.Provider, {
66
- value: r
67
- }, e);
68
- };
69
- function Le() {
70
- return Ie(Ft);
71
- }
72
- const Dt = /* @__PURE__ */ We(void 0), pn = ({ children: e, countryCode: t }) => {
73
- const o = w(() => ({
74
- countryCode: t
75
- }), [
76
- t
77
- ]);
78
- return /* @__PURE__ */ n.createElement(Dt.Provider, {
79
- value: o
80
- }, e);
81
- };
82
- function Ne() {
83
- const e = Ie(Dt);
84
- return e == null ? void 0 : e.countryCode;
85
- }
86
- function we(e) {
87
- return e != null;
88
- }
89
- function En(e, t, o) {
90
- return !t || !o ? e : {
91
- ...e,
92
- fields: (e.fields ?? []).map((r) => {
93
- const { show: s, ...l } = t[r.target] || {}, { required: i } = o[r.target] || {};
94
- return {
95
- ...r,
96
- view: {
97
- ...r.view,
98
- ...l
99
- },
100
- ...we(s) && {
101
- hidden: !s
102
- },
103
- ...we(i) && we(r.validation) && {
104
- validation: {
105
- ...r.validation,
106
- required: i
107
- }
108
- }
109
- };
110
- })
111
- };
112
- }
113
- const bn = (e, t) => e.map((o) => ({
114
- ...o,
115
- id: ("target" in o ? t[o.target] : void 0) ?? o.id
116
- })), ht = 12, fn = (e) => {
117
- const t = e.filter((r) => !r.properties.hidden), o = e.filter((r) => r.properties.hidden);
118
- return {
119
- visibleFields: t,
120
- hiddenFields: o
121
- };
122
- }, yn = (e) => {
123
- const t = {};
124
- return e.forEach((o) => {
125
- const r = o.layout.row;
126
- t[r] || (t[r] = []), t[r].push(o);
127
- }), t;
128
- }, Cn = (e) => {
129
- const t = {};
130
- return Object.keys(e).forEach((o) => {
131
- const r = parseInt(o, 10), s = e[r];
132
- s.reduce((i, a) => i + a.layout.width, 0) !== ht && (t[r] = s);
133
- }), t;
134
- }, In = (e, t) => e.map((o) => {
135
- const r = o.layout.row;
136
- if (t[r] && !o.properties.hidden) {
137
- const s = t[r], l = s.length, i = ht / l, a = s.findIndex((m) => m.id === o.id), d = i * a;
138
- return {
139
- ...o,
140
- layout: {
141
- ...o.layout,
142
- width: i,
143
- column: d
144
- }
145
- };
146
- }
147
- return o;
148
- }), Ln = (e, t, o) => {
149
- const r = Math.max(...t.map((s) => s.layout.row), -1);
150
- return e.map((s) => {
151
- if (s.properties.hidden) {
152
- const l = o.findIndex((i) => i.id === s.id);
153
- return {
154
- ...s,
155
- layout: {
156
- ...s.layout,
157
- row: r + 1 + l
158
- }
159
- };
160
- }
161
- return s;
162
- });
163
- }, Nn = (e) => {
164
- const { visibleFields: t, hiddenFields: o } = fn(e.fields), r = yn(t), s = Cn(r), l = In(e.fields, s), i = Ln(l, t, o);
165
- return {
166
- ...e,
167
- fields: i
168
- };
169
- }, On = () => ({
170
- country: W(),
171
- subdivision: W(),
172
- city: W(),
173
- address_line: W(),
174
- address_line_2: W(),
175
- postal_code: W(),
176
- street_name: W(),
177
- street_number: W(),
178
- apartment: W()
179
- }), gn = ({ id: e, target: t, fieldType: o, form: r, country: s, fieldSettings: l, validation: i, required: a }) => {
180
- const [d] = Ee(On), { isExperimentEnabled: m } = It(), u = m(Lt.USE_FIELDS_V2), { getCountryAddressForm: y } = Mt(), { isMobile: I, breakpoint: p } = Nt(), E = y(s), f = o === K.MULTILINE_ADDRESS || o === K.BOOKINGS_ADDRESS, N = w(() => {
181
- var g;
182
- return qt(a, (g = i == null ? void 0 : i.predefined) == null ? void 0 : g.multilineAddressOptions);
183
- }, [
184
- i,
185
- a
186
- ]), F = w(() => wt(), []);
187
- return {
188
- form: w(() => {
189
- var T, O;
190
- if (!f || !E)
191
- return r && {
192
- ...r,
193
- fields: bn(r.fields, d)
194
- };
195
- const g = xt({
196
- useFieldsV2: u,
197
- path: t,
198
- parentId: e,
199
- includeHiddenFields: !0,
200
- isMobile: I,
201
- breakpoint: p,
202
- form: En(dn(E, N, F), l, (O = (T = i == null ? void 0 : i.predefined) == null ? void 0 : T.multilineAddressOptions) == null ? void 0 : O.fields)
203
- });
204
- if (!g.fields.some((h) => h.properties.hidden))
205
- return g;
206
- const q = Nn(g);
207
- return {
208
- ...q,
209
- fields: q.fields.filter((h) => !h.properties.hidden)
210
- };
211
- }, [
212
- E,
213
- r,
214
- d,
215
- l,
216
- i,
217
- t,
218
- N,
219
- F,
220
- f,
221
- u,
222
- e,
223
- I,
224
- p
225
- ]),
226
- isMultilineAddressField: f
227
- };
228
- }, _t = /* @__PURE__ */ We(void 0), vn = ({ children: e, fields: t }) => {
229
- const o = w(() => ({
230
- fields: t
231
- }), [
232
- t
233
- ]);
234
- return /* @__PURE__ */ n.createElement(_t.Provider, {
235
- value: o
236
- }, e);
237
- };
238
- function ue(e) {
239
- const t = Ie(_t);
240
- if (!t)
241
- throw new Error("useAddressFields must be used within AddressFieldsProvider");
242
- return t.fields[e];
243
- }
244
- function me(e) {
245
- const { t } = Te(), o = Ne(), r = o && ct.getCountryByShortKey(o), l = (r ? r.addressPartDisplayNames : ct.getDefaultAddressDisplayNames())[e];
246
- return l ? t(l) : "";
247
- }
248
- const ne = ({ children: e }) => {
249
- const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = M(), I = me("addressLine2"), p = b(e, ne.Label), E = b(e, ne.Input), f = b(e, ne.Description), N = b(e, ne.Error);
250
- return /* @__PURE__ */ n.createElement(u, {
251
- fieldId: t,
252
- renderLabel: () => v(p, {
253
- label: I
254
- }),
255
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
256
- "aria-labelledby": y,
257
- value: o ?? "",
258
- onChange: r,
259
- isDisabled: s,
260
- isReadOnly: l,
261
- isRequired: i,
262
- isInvalid: a,
263
- onBlur: d,
264
- onFocus: m
265
- }, E),
266
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
267
- });
268
- }, Sn = ({ className: e }) => {
269
- const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: s } = M(), l = x(null);
270
- return ae(() => {
271
- var i;
272
- (i = l.current) == null || i.focus({
273
- preventScroll: !0
274
- });
275
- }, t), be(l), /* @__PURE__ */ n.createElement(le, {
276
- ref: l,
277
- id: r,
278
- autoComplete: "address-line2",
279
- "aria-describedby": s,
280
- className: e,
281
- placeholder: o
282
- });
283
- };
284
- ne.Label = de;
285
- ne.Input = Sn;
286
- ne.Description = ie;
287
- ne.Error = ce;
288
- const Ye = ({ enabled: e }) => {
289
- const { actions: t } = Ot(), [o, r] = Ee(W()), s = _(() => r(W()), []);
290
- return w(() => {
291
- const { predict: l, getPlace: i, searchByPostalCode: a } = t ?? {};
292
- if (!(!e || !l || !i || !a))
293
- return {
294
- predict: (d) => l({
295
- ...d,
296
- sessionToken: o
297
- }),
298
- getPlace: (d) => i({
299
- ...d,
300
- sessionToken: o,
301
- refreshSessionToken: s
302
- }),
303
- searchByPostalCode: (d) => a({
304
- ...d,
305
- sessionToken: o
306
- })
307
- };
308
- }, [
309
- e,
310
- t,
311
- o,
312
- s
313
- ]);
314
- };
315
- var xe, mt;
316
- function Fn() {
317
- if (mt) return xe;
318
- mt = 1;
319
- var e = rn(), t = function() {
320
- return e.Date.now();
321
- };
322
- return xe = t, xe;
323
- }
324
- var Be, pt;
325
- function Dn() {
326
- if (pt) return Be;
327
- pt = 1;
328
- var e = /\s/;
329
- function t(o) {
330
- for (var r = o.length; r-- && e.test(o.charAt(r)); )
331
- ;
332
- return r;
333
- }
334
- return Be = t, Be;
335
- }
336
- var ke, Et;
337
- function hn() {
338
- if (Et) return ke;
339
- Et = 1;
340
- var e = Dn(), t = /^\s+/;
341
- function o(r) {
342
- return r && r.slice(0, e(r) + 1).replace(t, "");
343
- }
344
- return ke = o, ke;
345
- }
346
- var Ue, bt;
347
- function _n() {
348
- if (bt) return Ue;
349
- bt = 1;
350
- var e = on(), t = sn(), o = "[object Symbol]";
351
- function r(s) {
352
- return typeof s == "symbol" || t(s) && e(s) == o;
353
- }
354
- return Ue = r, Ue;
355
- }
356
- var Ve, ft;
357
- function Rn() {
358
- if (ft) return Ve;
359
- ft = 1;
360
- var e = hn(), t = St(), o = _n(), r = NaN, s = /^[-+]0x[0-9a-f]+$/i, l = /^0b[01]+$/i, i = /^0o[0-7]+$/i, a = parseInt;
361
- function d(m) {
362
- if (typeof m == "number")
363
- return m;
364
- if (o(m))
365
- return r;
366
- if (t(m)) {
367
- var u = typeof m.valueOf == "function" ? m.valueOf() : m;
368
- m = t(u) ? u + "" : u;
369
- }
370
- if (typeof m != "string")
371
- return m === 0 ? m : +m;
372
- m = e(m);
373
- var y = l.test(m);
374
- return y || i.test(m) ? a(m.slice(2), y ? 2 : 8) : s.test(m) ? r : +m;
375
- }
376
- return Ve = d, Ve;
377
- }
378
- var $e, yt;
379
- function An() {
380
- if (yt) return $e;
381
- yt = 1;
382
- var e = St(), t = Fn(), o = Rn(), r = "Expected a function", s = Math.max, l = Math.min;
383
- function i(a, d, m) {
384
- var u, y, I, p, E, f, N = 0, F = !1, D = !1, g = !0;
385
- if (typeof a != "function")
386
- throw new TypeError(r);
387
- d = o(d) || 0, e(m) && (F = !!m.leading, D = "maxWait" in m, I = D ? s(o(m.maxWait) || 0, d) : I, g = "trailing" in m ? !!m.trailing : g);
388
- function R(S) {
389
- var J = u, pe = y;
390
- return u = y = void 0, N = S, p = a.apply(pe, J), p;
391
- }
392
- function q(S) {
393
- return N = S, E = setTimeout(h, d), F ? R(S) : p;
394
- }
395
- function T(S) {
396
- var J = S - f, pe = S - N, _e = d - J;
397
- return D ? l(_e, I - pe) : _e;
398
- }
399
- function O(S) {
400
- var J = S - f, pe = S - N;
401
- return f === void 0 || J >= d || J < 0 || D && pe >= I;
402
- }
403
- function h() {
404
- var S = t();
405
- if (O(S))
406
- return j(S);
407
- E = setTimeout(h, T(S));
408
- }
409
- function j(S) {
410
- return E = void 0, g && u ? R(S) : (u = y = void 0, p);
411
- }
412
- function ye() {
413
- E !== void 0 && clearTimeout(E), N = 0, u = f = y = E = void 0;
414
- }
415
- function V() {
416
- return E === void 0 ? p : j(t());
417
- }
418
- function A() {
419
- var S = t(), J = O(S);
420
- if (u = arguments, y = this, f = S, J) {
421
- if (E === void 0)
422
- return q(f);
423
- if (D)
424
- return clearTimeout(E), E = setTimeout(h, d), R(f);
425
- }
426
- return E === void 0 && (E = setTimeout(h, d)), p;
427
- }
428
- return A.cancel = ye, A.flush = V, A;
429
- }
430
- return $e = i, $e;
431
- }
432
- var Pn = An();
433
- const Tn = /* @__PURE__ */ Bt(Pn), Mn = (e, t, o = 200) => {
434
- const r = x(e), s = _(Tn((...l) => {
435
- r.current(...l);
436
- }, o), [
437
- o
438
- ]);
439
- return Pe(() => {
440
- r.current = e;
441
- }, [
442
- e,
443
- t
444
- ]), s;
445
- }, qn = () => {
446
- const e = x(!0);
447
- return Pe(() => () => {
448
- e.current = !1;
449
- }, []), () => e.current;
450
- }, Ct = {
451
- loading: !1,
452
- predictions: []
453
- }, Rt = ({ atlas: e, onError: t }) => {
454
- const [{ loading: r, predictions: s }, l] = Ee(Ct), i = x(0), a = qn(), d = _(() => {
455
- i.current++, l(Ct);
456
- }, []), m = Mn(async ({ input: u, countryCodes: y }) => {
457
- if (!e || !a())
458
- return;
459
- if (!u) {
460
- d();
461
- return;
462
- }
463
- const I = ++i.current;
464
- l((E) => ({
465
- ...E,
466
- loading: !0
467
- }));
468
- let p;
469
- try {
470
- p = await e.predict({
471
- input: u,
472
- countryCodes: y
473
- });
474
- } catch (E) {
475
- t ? t(E) : console.error(E);
476
- } finally {
477
- const E = I === i.current;
478
- a() && E && l((f) => ({
479
- loading: !1,
480
- // set new predictions if fetched properly, else keep current predictions
481
- predictions: p || f.predictions
482
- }));
483
- }
484
- }, [
485
- e,
486
- t
487
- ], 200);
488
- return {
489
- predictions: s,
490
- loading: r,
491
- updatePredictions: m,
492
- clearPredictions: d
493
- };
494
- }, He = ({ optionCount: e }) => {
495
- const t = Ie(Ke), o = x(t);
496
- o.current = t;
497
- const r = x(e);
498
- return Pe(() => {
499
- const s = e > 0 && r.current === 0;
500
- r.current = e;
501
- const l = o.current;
502
- s && (l != null && l.isFocused) && !l.isOpen && l.open(null, "manual");
503
- }, [
504
- e
505
- ]), null;
506
- }, B = ({ children: e }) => {
507
- const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = M(), { autocompleteEnabled: p } = Le(), E = y || p, f = me("addressLine1"), N = b(e, B.Label), F = b(e, B.Input), D = b(e, B.Options), g = b(e, B.Description), R = b(e, B.Error);
508
- return E ? /* @__PURE__ */ n.createElement(u, {
509
- fieldId: t,
510
- renderLabel: () => v(N, {
511
- label: f
512
- }),
513
- renderInput: () => /* @__PURE__ */ n.createElement(wn, {
514
- value: o,
515
- onChange: r,
516
- disabled: s,
517
- readOnly: l,
518
- required: i,
519
- hasError: a,
520
- onBlur: d,
521
- onFocus: m
522
- }, F, D),
523
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
524
- }) : /* @__PURE__ */ n.createElement(u, {
525
- fieldId: t,
526
- renderLabel: () => v(N, {
527
- label: f
528
- }),
529
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
530
- "aria-labelledby": I,
531
- value: o ?? "",
532
- onChange: r,
533
- isDisabled: s,
534
- isReadOnly: l,
535
- isRequired: i,
536
- isInvalid: a,
537
- onBlur: d,
538
- onFocus: m
539
- }, F),
540
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
541
- });
542
- }, wn = ({ children: e, value: t, onChange: o, disabled: r, readOnly: s, required: l, hasError: i, onBlur: a, onFocus: d }) => {
543
- const { labelId: m } = M(), { onAddressSelect: u } = Le(), y = Ne(), I = Ye({
544
- enabled: !0
545
- }), { predictions: p, updatePredictions: E, clearPredictions: f } = Rt({
546
- atlas: I
547
- }), N = w(() => p.map((O) => ({
548
- id: O.searchId || "",
549
- label: O.description || ""
550
- })), [
551
- p
552
- ]), F = _((O) => {
553
- E({
554
- input: O,
555
- countryCodes: y ? [
556
- y
557
- ] : void 0
558
- }), o(O);
559
- }, [
560
- o,
561
- E,
562
- y
563
- ]), D = _(async (O) => {
564
- if (!O)
565
- return;
566
- f();
567
- const h = await (I == null ? void 0 : I.getPlace({
568
- searchId: String(O)
569
- }));
570
- h && u && u(h);
571
- }, [
572
- u,
573
- f,
574
- I
575
- ]), g = _(() => {
576
- f(), a == null || a();
577
- }, [
578
- a,
579
- f
580
- ]), R = _(() => {
581
- d == null || d();
582
- }, [
583
- d
584
- ]), q = b(e, B.Input), T = b(e, B.Options);
585
- return /* @__PURE__ */ n.createElement(Fe, {
586
- "aria-labelledby": m,
587
- inputValue: t ?? "",
588
- onInputChange: F,
589
- value: null,
590
- onChange: D,
591
- isDisabled: r,
592
- isReadOnly: s,
593
- isRequired: l,
594
- isInvalid: i,
595
- onBlur: g,
596
- onFocus: R,
597
- allowsCustomValue: !0,
598
- menuTrigger: "input",
599
- items: N
600
- }, v(q, {
601
- onFocus: R
602
- }), v(T, {
603
- options: N
604
- }), /* @__PURE__ */ n.createElement(He, {
605
- optionCount: N.length
606
- }));
607
- }, xn = ({ className: e, ...t }) => {
608
- const { id: o, placeholder: r } = P(), { inputId: s, ariaDescribedBy: l } = M(), { onFocus: i } = t, a = x(null);
609
- return ae(() => {
610
- var d;
611
- (d = a.current) == null || d.focus({
612
- preventScroll: !0
613
- });
614
- }, o), be(a), /* @__PURE__ */ n.createElement(le, {
615
- ref: a,
616
- id: s,
617
- autoComplete: "address-line1",
618
- "aria-describedby": l,
619
- className: e,
620
- placeholder: r,
621
- onFocus: i
622
- });
623
- }, je = ({ children: e, className: t }) => {
624
- const o = b(e, je.Option);
625
- return /* @__PURE__ */ n.createElement(De, {
626
- className: t,
627
- containerPadding: 0,
628
- offset: 0
629
- }, /* @__PURE__ */ n.createElement(Me, {
630
- renderEmptyState: () => null
631
- }, (r) => v(o, {
632
- id: r.id,
633
- label: r.label
634
- })));
635
- }, Bn = ({ className: e, ...t }) => {
636
- const { id: o, label: r } = t;
637
- return /* @__PURE__ */ n.createElement(he, {
638
- className: e,
639
- id: o,
640
- textValue: r
641
- }, r);
642
- };
643
- je.Option = Bn;
644
- B.Label = de;
645
- B.Input = xn;
646
- B.Options = je;
647
- B.Description = ie;
648
- B.Error = ce;
649
- const re = ({ children: e }) => {
650
- const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = M(), { t: I } = Te(), p = I("field.mla-apartment.label"), E = b(e, re.Label), f = b(e, re.Input), N = b(e, re.Description), F = b(e, re.Error);
651
- return /* @__PURE__ */ n.createElement(u, {
652
- fieldId: t,
653
- renderLabel: () => v(E, {
654
- label: p
655
- }),
656
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
657
- "aria-labelledby": y,
658
- value: o ?? "",
659
- onChange: r,
660
- isDisabled: s,
661
- isReadOnly: l,
662
- isRequired: i,
663
- isInvalid: a,
664
- onBlur: d,
665
- onFocus: m
666
- }, f),
667
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, F, N)
668
- });
669
- }, kn = ({ className: e }) => {
670
- const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: s } = M(), l = x(null);
671
- return ae(() => {
672
- var i;
673
- (i = l.current) == null || i.focus({
674
- preventScroll: !0
675
- });
676
- }, t), be(l), /* @__PURE__ */ n.createElement(le, {
677
- ref: l,
678
- id: r,
679
- autoComplete: "address-line2",
680
- "aria-describedby": s,
681
- className: e,
682
- placeholder: o
683
- });
684
- };
685
- re.Label = de;
686
- re.Input = kn;
687
- re.Description = ie;
688
- re.Error = ce;
689
- const oe = ({ children: e }) => {
690
- const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = M(), I = me("city"), p = b(e, oe.Label), E = b(e, oe.Input), f = b(e, oe.Description), N = b(e, oe.Error);
691
- return /* @__PURE__ */ n.createElement(u, {
692
- fieldId: t,
693
- renderLabel: () => v(p, {
694
- label: I
695
- }),
696
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
697
- "aria-labelledby": y,
698
- value: o ?? "",
699
- onChange: r,
700
- isDisabled: s,
701
- isReadOnly: l,
702
- isRequired: i,
703
- isInvalid: a,
704
- onBlur: d,
705
- onFocus: m
706
- }, E),
707
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
708
- });
709
- }, Un = ({ className: e }) => {
710
- const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: s } = M(), l = x(null);
711
- return ae(() => {
712
- var i;
713
- (i = l.current) == null || i.focus({
714
- preventScroll: !0
715
- });
716
- }, t), be(l), /* @__PURE__ */ n.createElement(le, {
717
- ref: l,
718
- id: r,
719
- autoComplete: "address-level2",
720
- "aria-describedby": s,
721
- className: e,
722
- placeholder: o
723
- });
724
- };
725
- oe.Label = de;
726
- oe.Input = Un;
727
- oe.Description = ie;
728
- oe.Error = ce;
729
- const Vn = ({ isOpen: e }) => {
730
- const t = Ie(Ke), o = x(!1);
731
- return Pe(() => {
732
- e && t && !t.isOpen && t.open(null, "manual"), e && (t == null ? void 0 : t.selectionManager.focusedKey) != null && t.selectionManager.setFocusedKey(null), !e && o.current && (t == null || t.close()), o.current = e;
733
- }, [
734
- e,
735
- t
736
- ]), null;
737
- }, At = ({ readOnly: e, disabled: t } = {}) => {
738
- const o = Ie(Ke);
739
- return _(() => {
740
- !o || o.isOpen || e || t || o.open(null, "manual");
741
- }, [
742
- o,
743
- e,
744
- t
745
- ]);
746
- }, $n = (e, t) => e.find((o) => o.label.toLocaleLowerCase() === t.toLocaleLowerCase().trim()), Pt = ({ options: e, value: t, commit: o, clear: r, onBlur: s }) => {
747
- const [l, i] = Ee(null), a = cn(s), d = w(() => {
748
- var p;
749
- return t ? ((p = e.find((E) => E.value === t)) == null ? void 0 : p.label) ?? "" : "";
750
- }, [
751
- t,
752
- e
753
- ]), m = _((p) => {
754
- typeof p != "string" || p === "" || p === t || (i(null), o(p));
755
- }, [
756
- o,
757
- t
758
- ]), u = _((p) => {
759
- if (i(p), p === "")
760
- return;
761
- const E = $n(e, p);
762
- E && E.value !== t && o(E.value);
763
- }, [
764
- o,
765
- e,
766
- t
767
- ]), y = _((p) => {
768
- p.key !== "Enter" && p.key !== "Escape" || (i(null), p.key === "Enter" && l === "" && t && r());
769
- }, [
770
- l,
771
- t,
772
- r
773
- ]), I = _(() => {
774
- l === "" && t && r(), i(null), a();
775
- }, [
776
- l,
777
- t,
778
- r,
779
- a
780
- ]);
781
- return {
782
- value: t ?? null,
783
- inputValue: l ?? d,
784
- onChange: m,
785
- onInputChange: u,
786
- onBlur: I,
787
- onInputKeyDown: y
788
- };
789
- }, Y = ({ children: e, ...t }) => {
790
- const { isForcedOpen: o = !1 } = t, { id: r, value: s, onChange: l, disabled: i, readOnly: a, required: d, hasError: m, onBlur: u, onFocus: y, FieldLayout: I, options: p } = P(), { labelId: E } = M(), { t: f } = Te(), { language: N } = Nt(), F = w(() => (p || []).reduce((A, S) => (S.value && ge.hasOwnProperty(S.value) && A.push({
791
- value: S.value,
792
- label: f(`locale-dataset.countries.${ge[S.value].toUpperCase()}`)
793
- }), A), []).sort((A, S) => A.label.localeCompare(S.label, N)), [
794
- p,
795
- f,
796
- N
797
- ]), D = _((A) => l(A), [
798
- l
799
- ]), g = _(() => D(""), [
800
- D
801
- ]), { onInputKeyDown: R, ...q } = Pt({
802
- options: F,
803
- value: s,
804
- commit: D,
805
- clear: g,
806
- onBlur: u
807
- }), T = me("country"), O = b(e, Y.Label), h = b(e, Y.Control), j = b(e, Y.Options), ye = b(e, Y.Description), V = b(e, Y.Error);
808
- return /* @__PURE__ */ n.createElement(I, {
809
- fieldId: r,
810
- renderLabel: () => v(O, {
811
- label: T
812
- }),
813
- renderInput: () => /* @__PURE__ */ n.createElement(Fe, {
814
- "aria-labelledby": E,
815
- ...q,
816
- isDisabled: i,
817
- isReadOnly: a,
818
- isRequired: d,
819
- isInvalid: m,
820
- onFocus: y,
821
- menuTrigger: "input"
822
- }, v(h, {
823
- onKeyDown: R
824
- }), v(j, {
825
- options: F,
826
- isForcedOpen: o
827
- }), /* @__PURE__ */ n.createElement(Vn, {
828
- isOpen: o
829
- })),
830
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, V, ye)
831
- });
832
- }, ve = ({ children: e, className: t, ...o }) => {
833
- const { disabled: r, hasError: s } = P(), { onKeyDown: l } = o, i = b(e, ve.Input), a = b(e, ve.Trigger);
834
- return /* @__PURE__ */ n.createElement(gt, {
835
- className: t,
836
- isDisabled: r,
837
- isInvalid: s
838
- }, v(i, {
839
- onKeyDown: l
840
- }), a);
841
- }, Wn = ({ className: e, ...t }) => {
842
- const { id: o, placeholder: r, readOnly: s, disabled: l } = P(), { inputId: i, ariaDescribedBy: a } = M(), { onKeyDown: d } = t, m = x(null), u = At({
843
- readOnly: s,
844
- disabled: l
845
- });
846
- return ae(() => {
847
- var y;
848
- (y = m.current) == null || y.focus({
849
- preventScroll: !0
850
- });
851
- }, o), /* @__PURE__ */ n.createElement(le, {
852
- ref: m,
853
- id: i,
854
- autoComplete: "country-name",
855
- "aria-describedby": a,
856
- className: e,
857
- placeholder: r,
858
- onClick: u,
859
- onKeyDown: d
860
- });
861
- }, Kn = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(vt, {
862
- className: t
863
- }, e);
864
- ve.Input = Wn;
865
- ve.Trigger = Kn;
866
- const Je = ({ children: e, className: t, ...o }) => {
867
- const { options: r, isForcedOpen: s } = o, l = b(e, Je.Option);
868
- return /* @__PURE__ */ n.createElement(De, {
869
- className: t,
870
- containerPadding: 0,
871
- offset: 0
872
- }, /* @__PURE__ */ n.createElement(an, {
873
- isForcedOpen: s
874
- }, r.map((i) => v(l, {
875
- key: i.value,
876
- value: i.value,
877
- label: i.label
878
- }))));
879
- }, Yn = ({ className: e, ...t }) => {
880
- const { value: o, label: r } = t;
881
- return /* @__PURE__ */ n.createElement(he, {
882
- className: e,
883
- id: o,
884
- textValue: r
885
- }, r);
886
- };
887
- Je.Option = Yn;
888
- Y.Label = de;
889
- Y.Control = ve;
890
- Y.Options = Je;
891
- Y.Description = ie;
892
- Y.Error = ce;
893
- const Hn = /(\d{7})|(\d{3}-\d{4})/;
894
- function jn(e) {
895
- var t;
896
- return (t = e.match(Hn)) == null ? void 0 : t[0];
897
- }
898
- function Jn({ isAutocompleteEnabled: e }) {
899
- const t = x({
900
- hasAddress: !1
901
- }), o = Ye({
902
- enabled: e
903
- });
904
- return {
905
- searchByPostalCode: _(async (s) => {
906
- const l = jn(s);
907
- if (l) {
908
- if (t.current.postalCode === l && t.current.hasAddress)
909
- return t.current.address;
910
- t.current = {
911
- postalCode: l,
912
- address: void 0,
913
- hasAddress: !1
914
- };
915
- try {
916
- const i = await (o == null ? void 0 : o.searchByPostalCode({
917
- countryCode: "JP",
918
- postalCode: l
919
- }));
920
- return t.current.hasAddress = !0, t.current.address = void 0, i != null && i.formattedAddress ? (t.current.address = i, i) : void 0;
921
- } catch (i) {
922
- console.error(i);
923
- }
924
- }
925
- }, [
926
- o
927
- ])
928
- };
929
- }
930
- const k = ({ children: e }) => {
931
- const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = M(), p = Ne(), { autocompleteEnabled: E } = Le(), f = !!(p && ge[p] === ge.JP), N = (y || E) && f, F = me("zipCode"), D = b(e, k.Label), g = b(e, k.Control), R = b(e, k.Options), q = b(e, k.Description), T = b(e, k.Error);
932
- return N ? /* @__PURE__ */ n.createElement(u, {
933
- fieldId: t,
934
- renderLabel: () => v(D, {
935
- label: F
936
- }),
937
- renderInput: () => /* @__PURE__ */ n.createElement(Xn, {
938
- value: o,
939
- onChange: r,
940
- disabled: s,
941
- readOnly: l,
942
- required: i,
943
- hasError: a,
944
- onBlur: d,
945
- onFocus: m
946
- }, g, R),
947
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, T, q)
948
- }) : /* @__PURE__ */ n.createElement(u, {
949
- fieldId: t,
950
- renderLabel: () => v(D, {
951
- label: F
952
- }),
953
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
954
- "aria-labelledby": I,
955
- value: o ?? "",
956
- onChange: r,
957
- isDisabled: s,
958
- isReadOnly: l,
959
- isRequired: i,
960
- isInvalid: a,
961
- onBlur: d,
962
- onFocus: m
963
- }, g),
964
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, T, q)
965
- });
966
- }, Xn = ({ children: e, value: t, onChange: o, disabled: r, readOnly: s, required: l, hasError: i, onBlur: a, onFocus: d }) => {
967
- const { labelId: m } = M(), { onAddressSelect: u } = Le(), [y, I] = Ee(!1), { searchByPostalCode: p } = Jn({
968
- isAutocompleteEnabled: y
969
- }), [E, f] = Ee(), N = w(() => E ? [
970
- {
971
- id: W(),
972
- label: E.formattedAddress || ""
973
- }
974
- ] : [], [
975
- E
976
- ]), F = _(async (O) => {
977
- o(O);
978
- const h = await p(O ?? "");
979
- f(h);
980
- }, [
981
- o,
982
- p
983
- ]), D = _(async (O) => {
984
- O && (f(void 0), E && u && u(E));
985
- }, [
986
- u,
987
- E
988
- ]), g = _(() => {
989
- f(void 0), a == null || a();
990
- }, [
991
- a
992
- ]), R = _(() => {
993
- I(!0), d == null || d();
994
- }, [
995
- d
996
- ]), q = b(e, k.Control), T = b(e, k.Options);
997
- return /* @__PURE__ */ n.createElement(Fe, {
998
- "aria-labelledby": m,
999
- inputValue: t ?? "",
1000
- onInputChange: F,
1001
- value: null,
1002
- onChange: D,
1003
- isDisabled: r,
1004
- isReadOnly: s,
1005
- isRequired: l,
1006
- isInvalid: i,
1007
- onBlur: g,
1008
- onFocus: R,
1009
- allowsCustomValue: !0,
1010
- menuTrigger: "input",
1011
- items: N
1012
- }, v(q, {
1013
- onFocus: R
1014
- }), v(T, {
1015
- options: N
1016
- }), /* @__PURE__ */ n.createElement(He, {
1017
- optionCount: N.length
1018
- }));
1019
- }, Xe = ({ children: e, className: t, ...o }) => {
1020
- const { disabled: r, hasError: s } = P(), { onFocus: l } = o, i = Ne(), a = b(e, Xe.Input);
1021
- return /* @__PURE__ */ n.createElement("div", {
1022
- className: t,
1023
- "data-country": i || void 0,
1024
- "data-disabled": r || void 0,
1025
- "data-invalid": s || void 0
1026
- }, v(a, {
1027
- onFocus: l
1028
- }));
1029
- }, zn = ({ className: e, ...t }) => {
1030
- const { id: o, placeholder: r } = P(), { inputId: s, ariaDescribedBy: l } = M(), { onFocus: i } = t, a = x(null);
1031
- return ae(() => {
1032
- var d;
1033
- (d = a.current) == null || d.focus({
1034
- preventScroll: !0
1035
- });
1036
- }, o), be(a), /* @__PURE__ */ n.createElement(le, {
1037
- ref: a,
1038
- id: s,
1039
- autoComplete: "postal-code",
1040
- "aria-describedby": l,
1041
- className: e,
1042
- placeholder: r,
1043
- onFocus: i
1044
- });
1045
- }, ze = ({ children: e, className: t }) => {
1046
- const o = b(e, ze.Option);
1047
- return /* @__PURE__ */ n.createElement(De, {
1048
- className: t,
1049
- containerPadding: 0,
1050
- offset: 0
1051
- }, /* @__PURE__ */ n.createElement(Me, {
1052
- renderEmptyState: () => null
1053
- }, (r) => v(o, {
1054
- id: r.id,
1055
- label: r.label
1056
- })));
1057
- }, Gn = ({ className: e, ...t }) => {
1058
- const { id: o, label: r } = t;
1059
- return /* @__PURE__ */ n.createElement(he, {
1060
- className: e,
1061
- id: o,
1062
- textValue: r
1063
- }, r);
1064
- };
1065
- ze.Option = Gn;
1066
- Xe.Input = zn;
1067
- k.Label = de;
1068
- k.Control = Xe;
1069
- k.Options = ze;
1070
- k.Description = ie;
1071
- k.Error = ce;
1072
- const U = ({ children: e }) => {
1073
- const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u, autocomplete: y } = P(), { labelId: I } = M(), { autocompleteEnabled: p } = Le(), E = y || p, f = me("streetName"), N = b(e, U.Label), F = b(e, U.Input), D = b(e, U.Options), g = b(e, U.Description), R = b(e, U.Error);
1074
- return E ? /* @__PURE__ */ n.createElement(u, {
1075
- fieldId: t,
1076
- renderLabel: () => v(N, {
1077
- label: f
1078
- }),
1079
- renderInput: () => /* @__PURE__ */ n.createElement(Qn, {
1080
- value: o,
1081
- onChange: r,
1082
- disabled: s,
1083
- readOnly: l,
1084
- required: i,
1085
- hasError: a,
1086
- onBlur: d,
1087
- onFocus: m
1088
- }, F, D),
1089
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
1090
- }) : /* @__PURE__ */ n.createElement(u, {
1091
- fieldId: t,
1092
- renderLabel: () => v(N, {
1093
- label: f
1094
- }),
1095
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
1096
- "aria-labelledby": I,
1097
- value: o ?? "",
1098
- onChange: r,
1099
- isDisabled: s,
1100
- isReadOnly: l,
1101
- isRequired: i,
1102
- isInvalid: a,
1103
- onBlur: d,
1104
- onFocus: m
1105
- }, F),
1106
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, R, g)
1107
- });
1108
- }, Qn = ({ children: e, value: t, onChange: o, disabled: r, readOnly: s, required: l, hasError: i, onBlur: a, onFocus: d }) => {
1109
- const { labelId: m } = M(), { onAddressSelect: u } = Le(), y = Ne(), I = Ye({
1110
- enabled: !0
1111
- }), { predictions: p, updatePredictions: E, clearPredictions: f } = Rt({
1112
- atlas: I
1113
- }), N = b(e, U.Input), F = b(e, U.Options), D = w(() => p.reduce((O, h) => (h.searchId && h.description && O.push({
1114
- id: h.searchId,
1115
- label: h.description
1116
- }), O), []), [
1117
- p
1118
- ]), g = _((O) => {
1119
- E({
1120
- input: O,
1121
- countryCodes: y ? [
1122
- y
1123
- ] : void 0
1124
- }), o(O);
1125
- }, [
1126
- o,
1127
- E,
1128
- y
1129
- ]), R = _(async (O) => {
1130
- if (f(), !O)
1131
- return;
1132
- const h = await (I == null ? void 0 : I.getPlace({
1133
- searchId: String(O)
1134
- }));
1135
- h && u && u(h);
1136
- }, [
1137
- u,
1138
- f,
1139
- I
1140
- ]), q = _(() => {
1141
- f(), a == null || a();
1142
- }, [
1143
- a,
1144
- f
1145
- ]), T = _(() => {
1146
- d == null || d();
1147
- }, [
1148
- d
1149
- ]);
1150
- return /* @__PURE__ */ n.createElement(Fe, {
1151
- "aria-labelledby": m,
1152
- inputValue: t ?? "",
1153
- onInputChange: g,
1154
- value: null,
1155
- onChange: R,
1156
- isDisabled: r,
1157
- isReadOnly: s,
1158
- isRequired: l,
1159
- isInvalid: i,
1160
- onBlur: q,
1161
- onFocus: T,
1162
- allowsCustomValue: !0,
1163
- menuTrigger: "input",
1164
- items: D
1165
- }, v(N, {
1166
- onFocus: T
1167
- }), v(F, {
1168
- options: D
1169
- }), /* @__PURE__ */ n.createElement(He, {
1170
- optionCount: D.length
1171
- }));
1172
- }, Zn = ({ className: e, ...t }) => {
1173
- const { id: o, placeholder: r } = P(), { inputId: s, ariaDescribedBy: l } = M(), { onFocus: i } = t, a = x(null);
1174
- return ae(() => {
1175
- var d;
1176
- (d = a.current) == null || d.focus({
1177
- preventScroll: !0
1178
- });
1179
- }, o), be(a), /* @__PURE__ */ n.createElement(le, {
1180
- ref: a,
1181
- id: s,
1182
- autoComplete: "address-line1",
1183
- "aria-describedby": l,
1184
- className: e,
1185
- placeholder: r,
1186
- onFocus: i
1187
- });
1188
- }, Ge = ({ children: e, className: t }) => {
1189
- const o = b(e, Ge.Option);
1190
- return /* @__PURE__ */ n.createElement(De, {
1191
- className: t,
1192
- containerPadding: 0,
1193
- offset: 0
1194
- }, /* @__PURE__ */ n.createElement(Me, {
1195
- renderEmptyState: () => null
1196
- }, (r) => v(o, {
1197
- id: r.id,
1198
- label: r.label
1199
- })));
1200
- }, er = ({ className: e, ...t }) => {
1201
- const { id: o, label: r } = t;
1202
- return /* @__PURE__ */ n.createElement(he, {
1203
- className: e,
1204
- id: o,
1205
- textValue: r
1206
- }, r);
1207
- };
1208
- Ge.Option = er;
1209
- U.Label = de;
1210
- U.Input = Zn;
1211
- U.Options = Ge;
1212
- U.Description = ie;
1213
- U.Error = ce;
1214
- const se = ({ children: e }) => {
1215
- const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = M(), I = me("streetNumber"), p = b(e, se.Label), E = b(e, se.Input), f = b(e, se.Description), N = b(e, se.Error);
1216
- return /* @__PURE__ */ n.createElement(u, {
1217
- fieldId: t,
1218
- renderLabel: () => v(p, {
1219
- label: I
1220
- }),
1221
- renderInput: () => /* @__PURE__ */ n.createElement(fe, {
1222
- "aria-labelledby": y,
1223
- value: o ?? "",
1224
- onChange: r,
1225
- isDisabled: s,
1226
- isReadOnly: l,
1227
- isRequired: i,
1228
- isInvalid: a,
1229
- onBlur: d,
1230
- onFocus: m
1231
- }, E),
1232
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, N, f)
1233
- });
1234
- }, tr = ({ className: e }) => {
1235
- const { id: t, placeholder: o } = P(), { inputId: r, ariaDescribedBy: s } = M(), l = x(null);
1236
- return ae(() => {
1237
- var i;
1238
- (i = l.current) == null || i.focus({
1239
- preventScroll: !0
1240
- });
1241
- }, t), be(l), /* @__PURE__ */ n.createElement(le, {
1242
- ref: l,
1243
- id: r,
1244
- "aria-describedby": s,
1245
- className: e,
1246
- placeholder: o
1247
- });
1248
- };
1249
- se.Label = de;
1250
- se.Input = tr;
1251
- se.Description = ie;
1252
- se.Error = ce;
1253
- const H = ({ children: e }) => {
1254
- const { id: t, value: o, onChange: r, disabled: s, readOnly: l, required: i, hasError: a, onBlur: d, onFocus: m, FieldLayout: u } = P(), { labelId: y } = M(), { t: I } = Te(), p = Ne(), E = p ? ge[p] : void 0, f = p && kt.getCountryByShortKey(p), N = w(() => {
1255
- var V;
1256
- return (Ut(((V = f == null ? void 0 : f.subdivisions) == null ? void 0 : V.list) || [], E) || []).map((A) => ({
1257
- value: A.key,
1258
- label: I(A.displayName)
1259
- })).sort((A, S) => A.label.localeCompare(S.label));
1260
- }, [
1261
- E,
1262
- I,
1263
- f
1264
- ]), F = _(() => r(""), [
1265
- r
1266
- ]), { onInputKeyDown: D, ...g } = Pt({
1267
- options: N,
1268
- value: o,
1269
- commit: r,
1270
- clear: F,
1271
- onBlur: d
1272
- }), R = me("subdivision"), q = b(e, H.Label), T = b(e, H.Control), O = b(e, H.Options), h = b(e, H.Description), j = b(e, H.Error);
1273
- return /* @__PURE__ */ n.createElement(u, {
1274
- fieldId: t,
1275
- renderLabel: () => v(q, {
1276
- label: R
1277
- }),
1278
- renderInput: () => /* @__PURE__ */ n.createElement(Fe, {
1279
- "aria-labelledby": y,
1280
- ...g,
1281
- isDisabled: s,
1282
- isReadOnly: l,
1283
- isRequired: i,
1284
- isInvalid: a,
1285
- onFocus: m,
1286
- menuTrigger: "input"
1287
- }, v(T, {
1288
- onKeyDown: D
1289
- }), v(O, {
1290
- options: N
1291
- })),
1292
- renderDescription: () => /* @__PURE__ */ n.createElement(n.Fragment, null, j, h)
1293
- });
1294
- }, Se = ({ children: e, className: t, ...o }) => {
1295
- const { disabled: r, hasError: s } = P(), { onKeyDown: l } = o, i = b(e, Se.Input), a = b(e, Se.Trigger);
1296
- return /* @__PURE__ */ n.createElement(gt, {
1297
- className: t,
1298
- isDisabled: r,
1299
- isInvalid: s
1300
- }, v(i, {
1301
- onKeyDown: l
1302
- }), a);
1303
- }, nr = ({ className: e, ...t }) => {
1304
- const { id: o, placeholder: r, readOnly: s, disabled: l } = P(), { inputId: i, ariaDescribedBy: a } = M(), { onKeyDown: d } = t, m = x(null), u = At({
1305
- readOnly: s,
1306
- disabled: l
1307
- });
1308
- return ae(() => {
1309
- var y;
1310
- (y = m.current) == null || y.focus({
1311
- preventScroll: !0
1312
- });
1313
- }, o), /* @__PURE__ */ n.createElement(le, {
1314
- ref: m,
1315
- id: i,
1316
- autoComplete: "address-level1",
1317
- "aria-describedby": a,
1318
- className: e,
1319
- placeholder: r,
1320
- onClick: u,
1321
- onKeyDown: d
1322
- });
1323
- }, rr = ({ children: e, className: t }) => /* @__PURE__ */ n.createElement(vt, {
1324
- className: t
1325
- }, e);
1326
- Se.Input = nr;
1327
- Se.Trigger = rr;
1328
- const Qe = ({ children: e, className: t, ...o }) => {
1329
- const { options: r } = o, s = b(e, Qe.Option);
1330
- return /* @__PURE__ */ n.createElement(De, {
1331
- className: t,
1332
- containerPadding: 0,
1333
- offset: 0
1334
- }, /* @__PURE__ */ n.createElement(Me, null, r.map((l) => v(s, {
1335
- key: l.value,
1336
- value: l.value,
1337
- label: l.label
1338
- }))));
1339
- }, or = ({ className: e, ...t }) => {
1340
- const { value: o, label: r } = t;
1341
- return /* @__PURE__ */ n.createElement(he, {
1342
- className: e,
1343
- id: o,
1344
- textValue: r
1345
- }, r);
1346
- };
1347
- Qe.Option = or;
1348
- H.Label = de;
1349
- H.Control = Se;
1350
- H.Options = Qe;
1351
- H.Description = ie;
1352
- H.Error = ce;
1353
- const sr = () => ue("country"), ar = () => ue("subdivision"), lr = () => ue("city"), ir = () => ue("addressLine"), cr = () => ue("addressLine2"), dr = () => ue("postalCode"), ur = () => ue("streetName"), mr = () => ue("streetNumber"), pr = () => ue("apartment"), Er = {
1354
- [K.MLA_COUNTRY]: sr,
1355
- [K.MLA_SUBDIVISION]: ar,
1356
- [K.MLA_CITY]: lr,
1357
- [K.MLA_ADDRESS_LINE]: ir,
1358
- [K.MLA_ADDRESS_LINE_2]: cr,
1359
- [K.MLA_POSTAL_CODE]: dr,
1360
- [K.MLA_STREET_NAME]: ur,
1361
- [K.MLA_STREET_NUMBER]: mr,
1362
- [K.MLA_APARTMENT]: pr
1363
- }, br = {}, fr = [], c = ({ children: e, className: t }) => {
1364
- const { id: o, form: r, value: s, onChange: l, onFieldBlur: i, onFieldFocus: a, errors: d, FieldLayout: m, fieldSettings: u, label: y, validation: I, target: p, autocompleteEnabled: E, required: f, fieldType: N } = P(), [F, D] = Ee(null), g = Vt(), R = w(() => ({
1365
- ...g,
1366
- ...Er
1367
- }), [
1368
- g
1369
- ]), { isExperimentEnabled: q } = It(), T = q(Lt.STREETLESS_LOCALITY_FALLBACK), { validateFields: O } = $t(), h = Wt(), j = Ot(), ye = w(() => ({
1370
- ...j,
1371
- actions: {
1372
- predict: Ht,
1373
- getPlace: Yt,
1374
- searchByPostalCode: Kt,
1375
- ...j.actions
1376
- }
1377
- }), [
1378
- j
1379
- ]), { form: V, isMultilineAddressField: A } = gn({
1380
- id: o,
1381
- target: p,
1382
- fieldType: N,
1383
- form: r,
1384
- country: s == null ? void 0 : s.country,
1385
- fieldSettings: u,
1386
- validation: I,
1387
- required: f
1388
- }), S = _(($) => {
1389
- if (!s)
1390
- return;
1391
- const X = un($, A, T), Re = {
1392
- ...X,
1393
- [Ce.COUNTRY]: X[Ce.COUNTRY] ?? s[Ce.COUNTRY]
1394
- };
1395
- l == null || l(Re);
1396
- }, [
1397
- l,
1398
- s,
1399
- A,
1400
- T
1401
- ]), J = _(($, X) => {
1402
- if (A && $ === Ce.COUNTRY && (s == null ? void 0 : s[$]) !== X) {
1403
- l == null || l({
1404
- [Ce.COUNTRY]: X
1405
- });
1406
- return;
1407
- }
1408
- l == null || l({
1409
- ...s,
1410
- [$]: X
1411
- });
1412
- }, [
1413
- l,
1414
- s,
1415
- A
1416
- ]), pe = _(async ($) => O(A ? [
1417
- ...$,
1418
- {
1419
- path: `${p}/${Ce.COUNTRY}`,
1420
- value: s == null ? void 0 : s.country
1421
- }
1422
- ] : $), [
1423
- s,
1424
- p,
1425
- O,
1426
- A
1427
- ]);
1428
- jt(o, () => {
1429
- var Re;
1430
- const $ = d == null ? void 0 : d[0], X = (Re = V == null ? void 0 : V.fields) == null ? void 0 : Re.find((it) => "target" in it && it.target === ($ == null ? void 0 : $.errorPath));
1431
- return X == null ? void 0 : X.id;
1432
- });
1433
- const _e = nn(o), Ze = v(b(e, c.Country), {
1434
- isForcedOpen: _e
1435
- }), et = b(e, c.Subdivision), tt = b(e, c.City), nt = b(e, c.AddressLine), rt = b(e, c.AddressLine2), ot = b(e, c.PostalCode), st = b(e, c.StreetName), at = b(e, c.StreetNumber), lt = b(e, c.Apartment), Tt = w(() => ({
1436
- country: Ze,
1437
- subdivision: et,
1438
- city: tt,
1439
- addressLine: nt,
1440
- addressLine2: rt,
1441
- postalCode: ot,
1442
- streetName: st,
1443
- streetNumber: at,
1444
- apartment: lt
1445
- }), [
1446
- Ze,
1447
- et,
1448
- tt,
1449
- nt,
1450
- rt,
1451
- ot,
1452
- st,
1453
- at,
1454
- lt
1455
- ]);
1456
- return V ? /* @__PURE__ */ n.createElement(m, {
1457
- fieldId: o
1458
- }, /* @__PURE__ */ n.createElement(pn, {
1459
- countryCode: s == null ? void 0 : s.country
1460
- }, /* @__PURE__ */ n.createElement(mn, {
1461
- autocompleteEnabled: E,
1462
- onAddressSelect: S
1463
- }, /* @__PURE__ */ n.createElement(vn, {
1464
- fields: Tt
1465
- }, /* @__PURE__ */ n.createElement("div", {
1466
- ref: D,
1467
- style: {
1468
- display: "contents"
1469
- }
1470
- }), /* @__PURE__ */ n.createElement(Zt, {
1471
- getContainer: () => F
1472
- }, /* @__PURE__ */ n.createElement("fieldset", {
1473
- className: t,
1474
- style: en
1475
- }, /* @__PURE__ */ n.createElement("legend", {
1476
- style: tn
1477
- }, y), /* @__PURE__ */ n.createElement(Jt, {
1478
- formSchema: h,
1479
- form: V,
1480
- values: s ?? br,
1481
- onFieldChange: J,
1482
- onBlur: i,
1483
- onFocus: a,
1484
- errors: d ?? fr,
1485
- validateFields: pe,
1486
- fields: R,
1487
- fieldActions: ye
1488
- }))))))) : null;
1489
- };
1490
- c.Country = Y;
1491
- c.Subdivision = H;
1492
- c.City = oe;
1493
- c.AddressLine = B;
1494
- c.AddressLine2 = ne;
1495
- c.PostalCode = k;
1496
- c.StreetName = U;
1497
- c.StreetNumber = se;
1498
- c.Apartment = re;
1499
- const yr = "_postalCodeControl_1tire_1", Cr = "_comboControl_1tire_5", Ir = "_comboTrigger_1tire_19", Ae = {
1500
- postalCodeControl: yr,
1501
- comboControl: Cr,
1502
- comboTrigger: Ir
1503
- }, kr = () => {
1504
- const e = ut(zt, [
1505
- Ae.comboControl
1506
- ]), t = ut(Qt, []), o = ln(Gt, qe);
1507
- return /* @__PURE__ */ n.createElement(c, {
1508
- className: Xt
1509
- }, /* @__PURE__ */ n.createElement(c.Country, null, /* @__PURE__ */ n.createElement(c.Country.Label, {
1510
- className: L(G, C.label)
1511
- }, /* @__PURE__ */ n.createElement(c.Country.Label.Required, {
1512
- className: L(Q, C.requiredMark)
1513
- })), /* @__PURE__ */ n.createElement(c.Country.Control, {
1514
- className: e
1515
- }, /* @__PURE__ */ n.createElement(c.Country.Control.Input, {
1516
- className: L(C.innerInput, qe)
1517
- }), /* @__PURE__ */ n.createElement(c.Country.Control.Trigger, {
1518
- className: Ae.comboTrigger
1519
- }, /* @__PURE__ */ n.createElement(dt, {
1520
- className: C.dropdownIcon
1521
- }))), /* @__PURE__ */ n.createElement(c.Country.Options, {
1522
- className: L(Oe, C.selectPopover, C.dropdownPopover)
1523
- }, /* @__PURE__ */ n.createElement(c.Country.Options.Option, {
1524
- className: o
1525
- })), /* @__PURE__ */ n.createElement(c.Country.Error, {
1526
- className: L(Z, C.error)
1527
- }, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.Country.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Country.Description, {
1528
- className: L(ee, C.description)
1529
- }, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
1530
- content: r,
1531
- locale: s
1532
- }))), /* @__PURE__ */ n.createElement(c.AddressLine, null, /* @__PURE__ */ n.createElement(c.AddressLine.Label, {
1533
- className: L(G, C.label)
1534
- }, /* @__PURE__ */ n.createElement(c.AddressLine.Label.Required, {
1535
- className: L(Q, C.requiredMark)
1536
- })), /* @__PURE__ */ n.createElement(c.AddressLine.Input, {
1537
- className: t
1538
- }), /* @__PURE__ */ n.createElement(c.AddressLine.Options, {
1539
- className: L(Oe, C.selectPopover, C.dropdownPopover)
1540
- }, /* @__PURE__ */ n.createElement(c.AddressLine.Options.Option, {
1541
- className: o
1542
- })), /* @__PURE__ */ n.createElement(c.AddressLine.Error, {
1543
- className: L(Z, C.error)
1544
- }, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.AddressLine.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine.Description, {
1545
- className: L(ee, C.description)
1546
- }, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
1547
- content: r,
1548
- locale: s
1549
- }))), /* @__PURE__ */ n.createElement(c.AddressLine2, null, /* @__PURE__ */ n.createElement(c.AddressLine2.Label, {
1550
- className: L(G, C.label)
1551
- }, /* @__PURE__ */ n.createElement(c.AddressLine2.Label.Required, {
1552
- className: L(Q, C.requiredMark)
1553
- })), /* @__PURE__ */ n.createElement(c.AddressLine2.Input, {
1554
- className: t
1555
- }), /* @__PURE__ */ n.createElement(c.AddressLine2.Error, {
1556
- className: L(Z, C.error)
1557
- }, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.AddressLine2.Error.Text, null)), /* @__PURE__ */ n.createElement(c.AddressLine2.Description, {
1558
- className: L(ee, C.description)
1559
- }, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
1560
- content: r,
1561
- locale: s
1562
- }))), /* @__PURE__ */ n.createElement(c.City, null, /* @__PURE__ */ n.createElement(c.City.Label, {
1563
- className: L(G, C.label)
1564
- }, /* @__PURE__ */ n.createElement(c.City.Label.Required, {
1565
- className: L(Q, C.requiredMark)
1566
- })), /* @__PURE__ */ n.createElement(c.City.Input, {
1567
- className: t
1568
- }), /* @__PURE__ */ n.createElement(c.City.Error, {
1569
- className: L(Z, C.error)
1570
- }, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.City.Error.Text, null)), /* @__PURE__ */ n.createElement(c.City.Description, {
1571
- className: L(ee, C.description)
1572
- }, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
1573
- content: r,
1574
- locale: s
1575
- }))), /* @__PURE__ */ n.createElement(c.PostalCode, null, /* @__PURE__ */ n.createElement(c.PostalCode.Label, {
1576
- className: L(G, C.label)
1577
- }, /* @__PURE__ */ n.createElement(c.PostalCode.Label.Required, {
1578
- className: L(Q, C.requiredMark)
1579
- })), /* @__PURE__ */ n.createElement(c.PostalCode.Control, {
1580
- className: Ae.postalCodeControl
1581
- }, /* @__PURE__ */ n.createElement(c.PostalCode.Control.Input, {
1582
- className: t
1583
- })), /* @__PURE__ */ n.createElement(c.PostalCode.Options, {
1584
- className: L(Oe, C.selectPopover, C.dropdownPopover)
1585
- }, /* @__PURE__ */ n.createElement(c.PostalCode.Options.Option, {
1586
- className: o
1587
- })), /* @__PURE__ */ n.createElement(c.PostalCode.Error, {
1588
- className: L(Z, C.error)
1589
- }, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.PostalCode.Error.Text, null)), /* @__PURE__ */ n.createElement(c.PostalCode.Description, {
1590
- className: L(ee, C.description)
1591
- }, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
1592
- content: r,
1593
- locale: s
1594
- }))), /* @__PURE__ */ n.createElement(c.Subdivision, null, /* @__PURE__ */ n.createElement(c.Subdivision.Label, {
1595
- className: L(G, C.label)
1596
- }, /* @__PURE__ */ n.createElement(c.Subdivision.Label.Required, {
1597
- className: L(Q, C.requiredMark)
1598
- })), /* @__PURE__ */ n.createElement(c.Subdivision.Control, {
1599
- className: e
1600
- }, /* @__PURE__ */ n.createElement(c.Subdivision.Control.Input, {
1601
- className: L(C.innerInput, qe)
1602
- }), /* @__PURE__ */ n.createElement(c.Subdivision.Control.Trigger, {
1603
- className: Ae.comboTrigger
1604
- }, /* @__PURE__ */ n.createElement(dt, {
1605
- className: C.dropdownIcon
1606
- }))), /* @__PURE__ */ n.createElement(c.Subdivision.Options, {
1607
- className: L(Oe, C.selectPopover, C.dropdownPopover)
1608
- }, /* @__PURE__ */ n.createElement(c.Subdivision.Options.Option, {
1609
- className: o
1610
- })), /* @__PURE__ */ n.createElement(c.Subdivision.Error, {
1611
- className: L(Z, C.error)
1612
- }, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.Subdivision.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Subdivision.Description, {
1613
- className: L(ee, C.description)
1614
- }, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
1615
- content: r,
1616
- locale: s
1617
- }))), /* @__PURE__ */ n.createElement(c.StreetName, null, /* @__PURE__ */ n.createElement(c.StreetName.Label, {
1618
- className: L(G, C.label)
1619
- }, /* @__PURE__ */ n.createElement(c.StreetName.Label.Required, {
1620
- className: L(Q, C.requiredMark)
1621
- })), /* @__PURE__ */ n.createElement(c.StreetName.Input, {
1622
- className: t
1623
- }), /* @__PURE__ */ n.createElement(c.StreetName.Options, {
1624
- className: L(Oe, C.selectPopover, C.dropdownPopover)
1625
- }, /* @__PURE__ */ n.createElement(c.StreetName.Options.Option, {
1626
- className: o
1627
- })), /* @__PURE__ */ n.createElement(c.StreetName.Error, {
1628
- className: L(Z, C.error)
1629
- }, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.StreetName.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetName.Description, {
1630
- className: L(ee, C.description)
1631
- }, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
1632
- content: r,
1633
- locale: s
1634
- }))), /* @__PURE__ */ n.createElement(c.StreetNumber, null, /* @__PURE__ */ n.createElement(c.StreetNumber.Label, {
1635
- className: L(G, C.label)
1636
- }, /* @__PURE__ */ n.createElement(c.StreetNumber.Label.Required, {
1637
- className: L(Q, C.requiredMark)
1638
- })), /* @__PURE__ */ n.createElement(c.StreetNumber.Input, {
1639
- className: t
1640
- }), /* @__PURE__ */ n.createElement(c.StreetNumber.Error, {
1641
- className: L(Z, C.error)
1642
- }, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.StreetNumber.Error.Text, null)), /* @__PURE__ */ n.createElement(c.StreetNumber.Description, {
1643
- className: L(ee, C.description)
1644
- }, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
1645
- content: r,
1646
- locale: s
1647
- }))), /* @__PURE__ */ n.createElement(c.Apartment, null, /* @__PURE__ */ n.createElement(c.Apartment.Label, {
1648
- className: L(G, C.label)
1649
- }, /* @__PURE__ */ n.createElement(c.Apartment.Label.Required, {
1650
- className: L(Q, C.requiredMark)
1651
- })), /* @__PURE__ */ n.createElement(c.Apartment.Input, {
1652
- className: t
1653
- }), /* @__PURE__ */ n.createElement(c.Apartment.Error, {
1654
- className: L(Z, C.error)
1655
- }, /* @__PURE__ */ n.createElement(te, null), /* @__PURE__ */ n.createElement(c.Apartment.Error.Text, null)), /* @__PURE__ */ n.createElement(c.Apartment.Description, {
1656
- className: L(ee, C.description)
1657
- }, ({ content: r, locale: s }) => /* @__PURE__ */ n.createElement(z, {
1658
- content: r,
1659
- locale: s
1660
- }))));
1661
- };
1662
- export {
1663
- kr as M
1664
- };