react-country-kit-core 2.1.1 → 2.1.3
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.
- package/dist/hooks/usePhoneInput.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +783 -460
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -2
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
1
|
+
import { useCallback as k, useEffect as x, useMemo as C, useRef as w, useState as M } from "react";
|
|
2
|
+
function De(a) {
|
|
3
3
|
return [...a.toUpperCase()].map((o) => String.fromCodePoint(127462 + o.charCodeAt(0) - 65)).join("");
|
|
4
4
|
}
|
|
5
|
-
|
|
5
|
+
var ce = [
|
|
6
6
|
{
|
|
7
7
|
name: "Afghanistan",
|
|
8
8
|
iso2: "AF",
|
|
@@ -4253,7 +4253,7 @@ const se = [
|
|
|
4253
4253
|
date_separator: "/",
|
|
4254
4254
|
week_start: 0
|
|
4255
4255
|
}
|
|
4256
|
-
],
|
|
4256
|
+
], de = [
|
|
4257
4257
|
{
|
|
4258
4258
|
name: "Badakhshan",
|
|
4259
4259
|
iso2: "BDS",
|
|
@@ -36103,94 +36103,442 @@ const se = [
|
|
|
36103
36103
|
countryCode: "ZW"
|
|
36104
36104
|
}
|
|
36105
36105
|
], K = [
|
|
36106
|
-
{
|
|
36107
|
-
|
|
36108
|
-
|
|
36109
|
-
|
|
36110
|
-
|
|
36111
|
-
{
|
|
36112
|
-
|
|
36113
|
-
|
|
36114
|
-
|
|
36115
|
-
|
|
36116
|
-
{
|
|
36117
|
-
|
|
36118
|
-
|
|
36119
|
-
|
|
36120
|
-
|
|
36121
|
-
{
|
|
36122
|
-
|
|
36123
|
-
|
|
36124
|
-
|
|
36125
|
-
|
|
36126
|
-
{
|
|
36127
|
-
|
|
36128
|
-
|
|
36129
|
-
|
|
36130
|
-
|
|
36131
|
-
{
|
|
36132
|
-
|
|
36133
|
-
|
|
36134
|
-
|
|
36135
|
-
|
|
36136
|
-
{
|
|
36137
|
-
|
|
36138
|
-
|
|
36139
|
-
|
|
36140
|
-
|
|
36141
|
-
{
|
|
36142
|
-
|
|
36143
|
-
|
|
36144
|
-
|
|
36145
|
-
|
|
36146
|
-
{
|
|
36147
|
-
|
|
36148
|
-
|
|
36149
|
-
|
|
36150
|
-
|
|
36151
|
-
{
|
|
36152
|
-
|
|
36153
|
-
|
|
36154
|
-
|
|
36155
|
-
|
|
36156
|
-
{
|
|
36157
|
-
|
|
36158
|
-
|
|
36159
|
-
|
|
36160
|
-
|
|
36161
|
-
{
|
|
36162
|
-
|
|
36163
|
-
|
|
36164
|
-
|
|
36165
|
-
|
|
36166
|
-
{
|
|
36167
|
-
|
|
36168
|
-
|
|
36169
|
-
|
|
36170
|
-
|
|
36171
|
-
{
|
|
36172
|
-
|
|
36173
|
-
|
|
36174
|
-
|
|
36175
|
-
|
|
36176
|
-
{
|
|
36177
|
-
|
|
36178
|
-
|
|
36179
|
-
|
|
36180
|
-
|
|
36181
|
-
{
|
|
36182
|
-
|
|
36183
|
-
|
|
36184
|
-
|
|
36185
|
-
|
|
36186
|
-
{
|
|
36187
|
-
|
|
36188
|
-
|
|
36189
|
-
|
|
36190
|
-
|
|
36191
|
-
{
|
|
36192
|
-
|
|
36193
|
-
|
|
36106
|
+
{
|
|
36107
|
+
code: "af",
|
|
36108
|
+
english_name: "Afrikaans",
|
|
36109
|
+
native_name: "Afrikaans"
|
|
36110
|
+
},
|
|
36111
|
+
{
|
|
36112
|
+
code: "am",
|
|
36113
|
+
english_name: "Amharic",
|
|
36114
|
+
native_name: "አማርኛ"
|
|
36115
|
+
},
|
|
36116
|
+
{
|
|
36117
|
+
code: "ar",
|
|
36118
|
+
english_name: "Arabic",
|
|
36119
|
+
native_name: "العربية"
|
|
36120
|
+
},
|
|
36121
|
+
{
|
|
36122
|
+
code: "as",
|
|
36123
|
+
english_name: "Assamese",
|
|
36124
|
+
native_name: "অসমীয়া"
|
|
36125
|
+
},
|
|
36126
|
+
{
|
|
36127
|
+
code: "az",
|
|
36128
|
+
english_name: "Azerbaijani",
|
|
36129
|
+
native_name: "azərbaycanca"
|
|
36130
|
+
},
|
|
36131
|
+
{
|
|
36132
|
+
code: "be",
|
|
36133
|
+
english_name: "Belarusian",
|
|
36134
|
+
native_name: "беларуская"
|
|
36135
|
+
},
|
|
36136
|
+
{
|
|
36137
|
+
code: "bg",
|
|
36138
|
+
english_name: "Bulgarian",
|
|
36139
|
+
native_name: "български"
|
|
36140
|
+
},
|
|
36141
|
+
{
|
|
36142
|
+
code: "bn",
|
|
36143
|
+
english_name: "Bangla",
|
|
36144
|
+
native_name: "বাংলা"
|
|
36145
|
+
},
|
|
36146
|
+
{
|
|
36147
|
+
code: "bs",
|
|
36148
|
+
english_name: "Bosnian",
|
|
36149
|
+
native_name: "bosanski"
|
|
36150
|
+
},
|
|
36151
|
+
{
|
|
36152
|
+
code: "ca",
|
|
36153
|
+
english_name: "Catalan",
|
|
36154
|
+
native_name: "català"
|
|
36155
|
+
},
|
|
36156
|
+
{
|
|
36157
|
+
code: "cs",
|
|
36158
|
+
english_name: "Czech",
|
|
36159
|
+
native_name: "čeština"
|
|
36160
|
+
},
|
|
36161
|
+
{
|
|
36162
|
+
code: "da",
|
|
36163
|
+
english_name: "Danish",
|
|
36164
|
+
native_name: "dansk"
|
|
36165
|
+
},
|
|
36166
|
+
{
|
|
36167
|
+
code: "de",
|
|
36168
|
+
english_name: "German",
|
|
36169
|
+
native_name: "Deutsch"
|
|
36170
|
+
},
|
|
36171
|
+
{
|
|
36172
|
+
code: "el",
|
|
36173
|
+
english_name: "Greek",
|
|
36174
|
+
native_name: "Ελληνικά"
|
|
36175
|
+
},
|
|
36176
|
+
{
|
|
36177
|
+
code: "en",
|
|
36178
|
+
english_name: "English",
|
|
36179
|
+
native_name: "English"
|
|
36180
|
+
},
|
|
36181
|
+
{
|
|
36182
|
+
code: "en-AU",
|
|
36183
|
+
english_name: "English (Australia)",
|
|
36184
|
+
native_name: "English (Australia)"
|
|
36185
|
+
},
|
|
36186
|
+
{
|
|
36187
|
+
code: "en-CA",
|
|
36188
|
+
english_name: "English (Canada)",
|
|
36189
|
+
native_name: "English (Canada)"
|
|
36190
|
+
},
|
|
36191
|
+
{
|
|
36192
|
+
code: "en-GB",
|
|
36193
|
+
english_name: "English (United Kingdom)",
|
|
36194
|
+
native_name: "English (United Kingdom)"
|
|
36195
|
+
},
|
|
36196
|
+
{
|
|
36197
|
+
code: "en-US",
|
|
36198
|
+
english_name: "English (United States)",
|
|
36199
|
+
native_name: "English (United States)"
|
|
36200
|
+
},
|
|
36201
|
+
{
|
|
36202
|
+
code: "es",
|
|
36203
|
+
english_name: "Spanish",
|
|
36204
|
+
native_name: "español"
|
|
36205
|
+
},
|
|
36206
|
+
{
|
|
36207
|
+
code: "es-ES",
|
|
36208
|
+
english_name: "Spanish (Spain)",
|
|
36209
|
+
native_name: "español (España)"
|
|
36210
|
+
},
|
|
36211
|
+
{
|
|
36212
|
+
code: "es-MX",
|
|
36213
|
+
english_name: "Spanish (Mexico)",
|
|
36214
|
+
native_name: "español (México)"
|
|
36215
|
+
},
|
|
36216
|
+
{
|
|
36217
|
+
code: "et",
|
|
36218
|
+
english_name: "Estonian",
|
|
36219
|
+
native_name: "eesti"
|
|
36220
|
+
},
|
|
36221
|
+
{
|
|
36222
|
+
code: "eu",
|
|
36223
|
+
english_name: "Basque",
|
|
36224
|
+
native_name: "euskara"
|
|
36225
|
+
},
|
|
36226
|
+
{
|
|
36227
|
+
code: "fa",
|
|
36228
|
+
english_name: "Persian",
|
|
36229
|
+
native_name: "فارسی"
|
|
36230
|
+
},
|
|
36231
|
+
{
|
|
36232
|
+
code: "fi",
|
|
36233
|
+
english_name: "Finnish",
|
|
36234
|
+
native_name: "suomi"
|
|
36235
|
+
},
|
|
36236
|
+
{
|
|
36237
|
+
code: "fil",
|
|
36238
|
+
english_name: "Filipino",
|
|
36239
|
+
native_name: "Filipino"
|
|
36240
|
+
},
|
|
36241
|
+
{
|
|
36242
|
+
code: "fr",
|
|
36243
|
+
english_name: "French",
|
|
36244
|
+
native_name: "français"
|
|
36245
|
+
},
|
|
36246
|
+
{
|
|
36247
|
+
code: "fr-CA",
|
|
36248
|
+
english_name: "French (Canada)",
|
|
36249
|
+
native_name: "français (Canada)"
|
|
36250
|
+
},
|
|
36251
|
+
{
|
|
36252
|
+
code: "fr-FR",
|
|
36253
|
+
english_name: "French (France)",
|
|
36254
|
+
native_name: "français (France)"
|
|
36255
|
+
},
|
|
36256
|
+
{
|
|
36257
|
+
code: "gl",
|
|
36258
|
+
english_name: "Galician",
|
|
36259
|
+
native_name: "galego"
|
|
36260
|
+
},
|
|
36261
|
+
{
|
|
36262
|
+
code: "gu",
|
|
36263
|
+
english_name: "Gujarati",
|
|
36264
|
+
native_name: "ગુજરાતી"
|
|
36265
|
+
},
|
|
36266
|
+
{
|
|
36267
|
+
code: "he",
|
|
36268
|
+
english_name: "Hebrew",
|
|
36269
|
+
native_name: "עברית"
|
|
36270
|
+
},
|
|
36271
|
+
{
|
|
36272
|
+
code: "hi",
|
|
36273
|
+
english_name: "Hindi",
|
|
36274
|
+
native_name: "हिन्दी"
|
|
36275
|
+
},
|
|
36276
|
+
{
|
|
36277
|
+
code: "hr",
|
|
36278
|
+
english_name: "Croatian",
|
|
36279
|
+
native_name: "hrvatski"
|
|
36280
|
+
},
|
|
36281
|
+
{
|
|
36282
|
+
code: "hu",
|
|
36283
|
+
english_name: "Hungarian",
|
|
36284
|
+
native_name: "magyar"
|
|
36285
|
+
},
|
|
36286
|
+
{
|
|
36287
|
+
code: "hy",
|
|
36288
|
+
english_name: "Armenian",
|
|
36289
|
+
native_name: "հայերեն"
|
|
36290
|
+
},
|
|
36291
|
+
{
|
|
36292
|
+
code: "id",
|
|
36293
|
+
english_name: "Indonesian",
|
|
36294
|
+
native_name: "Bahasa Indonesia"
|
|
36295
|
+
},
|
|
36296
|
+
{
|
|
36297
|
+
code: "is",
|
|
36298
|
+
english_name: "Icelandic",
|
|
36299
|
+
native_name: "íslenska"
|
|
36300
|
+
},
|
|
36301
|
+
{
|
|
36302
|
+
code: "it",
|
|
36303
|
+
english_name: "Italian",
|
|
36304
|
+
native_name: "italiano"
|
|
36305
|
+
},
|
|
36306
|
+
{
|
|
36307
|
+
code: "ja",
|
|
36308
|
+
english_name: "Japanese",
|
|
36309
|
+
native_name: "日本語"
|
|
36310
|
+
},
|
|
36311
|
+
{
|
|
36312
|
+
code: "ka",
|
|
36313
|
+
english_name: "Georgian",
|
|
36314
|
+
native_name: "ქართული"
|
|
36315
|
+
},
|
|
36316
|
+
{
|
|
36317
|
+
code: "kk",
|
|
36318
|
+
english_name: "Kazakh",
|
|
36319
|
+
native_name: "қазақ тілі"
|
|
36320
|
+
},
|
|
36321
|
+
{
|
|
36322
|
+
code: "km",
|
|
36323
|
+
english_name: "Khmer",
|
|
36324
|
+
native_name: "ខ្មែរ"
|
|
36325
|
+
},
|
|
36326
|
+
{
|
|
36327
|
+
code: "kn",
|
|
36328
|
+
english_name: "Kannada",
|
|
36329
|
+
native_name: "ಕನ್ನಡ"
|
|
36330
|
+
},
|
|
36331
|
+
{
|
|
36332
|
+
code: "ko",
|
|
36333
|
+
english_name: "Korean",
|
|
36334
|
+
native_name: "한국어"
|
|
36335
|
+
},
|
|
36336
|
+
{
|
|
36337
|
+
code: "ky",
|
|
36338
|
+
english_name: "Kyrgyz",
|
|
36339
|
+
native_name: "кыргызча"
|
|
36340
|
+
},
|
|
36341
|
+
{
|
|
36342
|
+
code: "lo",
|
|
36343
|
+
english_name: "Lao",
|
|
36344
|
+
native_name: "ລາວ"
|
|
36345
|
+
},
|
|
36346
|
+
{
|
|
36347
|
+
code: "lt",
|
|
36348
|
+
english_name: "Lithuanian",
|
|
36349
|
+
native_name: "lietuvių"
|
|
36350
|
+
},
|
|
36351
|
+
{
|
|
36352
|
+
code: "lv",
|
|
36353
|
+
english_name: "Latvian",
|
|
36354
|
+
native_name: "latviešu"
|
|
36355
|
+
},
|
|
36356
|
+
{
|
|
36357
|
+
code: "mk",
|
|
36358
|
+
english_name: "Macedonian",
|
|
36359
|
+
native_name: "македонски"
|
|
36360
|
+
},
|
|
36361
|
+
{
|
|
36362
|
+
code: "ml",
|
|
36363
|
+
english_name: "Malayalam",
|
|
36364
|
+
native_name: "മലയാളം"
|
|
36365
|
+
},
|
|
36366
|
+
{
|
|
36367
|
+
code: "mn",
|
|
36368
|
+
english_name: "Mongolian",
|
|
36369
|
+
native_name: "монгол"
|
|
36370
|
+
},
|
|
36371
|
+
{
|
|
36372
|
+
code: "mr",
|
|
36373
|
+
english_name: "Marathi",
|
|
36374
|
+
native_name: "मराठी"
|
|
36375
|
+
},
|
|
36376
|
+
{
|
|
36377
|
+
code: "ms",
|
|
36378
|
+
english_name: "Malay",
|
|
36379
|
+
native_name: "Bahasa Melayu"
|
|
36380
|
+
},
|
|
36381
|
+
{
|
|
36382
|
+
code: "my",
|
|
36383
|
+
english_name: "Burmese",
|
|
36384
|
+
native_name: "မြန်မာ"
|
|
36385
|
+
},
|
|
36386
|
+
{
|
|
36387
|
+
code: "nb",
|
|
36388
|
+
english_name: "Norwegian Bokmål",
|
|
36389
|
+
native_name: "norsk bokmål"
|
|
36390
|
+
},
|
|
36391
|
+
{
|
|
36392
|
+
code: "ne",
|
|
36393
|
+
english_name: "Nepali",
|
|
36394
|
+
native_name: "नेपाली"
|
|
36395
|
+
},
|
|
36396
|
+
{
|
|
36397
|
+
code: "nl",
|
|
36398
|
+
english_name: "Dutch",
|
|
36399
|
+
native_name: "Nederlands"
|
|
36400
|
+
},
|
|
36401
|
+
{
|
|
36402
|
+
code: "or",
|
|
36403
|
+
english_name: "Odia",
|
|
36404
|
+
native_name: "ଓଡ଼ିଆ"
|
|
36405
|
+
},
|
|
36406
|
+
{
|
|
36407
|
+
code: "pa",
|
|
36408
|
+
english_name: "Punjabi",
|
|
36409
|
+
native_name: "ਪੰਜਾਬੀ"
|
|
36410
|
+
},
|
|
36411
|
+
{
|
|
36412
|
+
code: "pl",
|
|
36413
|
+
english_name: "Polish",
|
|
36414
|
+
native_name: "polski"
|
|
36415
|
+
},
|
|
36416
|
+
{
|
|
36417
|
+
code: "pt",
|
|
36418
|
+
english_name: "Portuguese",
|
|
36419
|
+
native_name: "português"
|
|
36420
|
+
},
|
|
36421
|
+
{
|
|
36422
|
+
code: "pt-BR",
|
|
36423
|
+
english_name: "Portuguese (Brazil)",
|
|
36424
|
+
native_name: "português (Brasil)"
|
|
36425
|
+
},
|
|
36426
|
+
{
|
|
36427
|
+
code: "pt-PT",
|
|
36428
|
+
english_name: "Portuguese (Portugal)",
|
|
36429
|
+
native_name: "português (Portugal)"
|
|
36430
|
+
},
|
|
36431
|
+
{
|
|
36432
|
+
code: "ro",
|
|
36433
|
+
english_name: "Romanian",
|
|
36434
|
+
native_name: "română"
|
|
36435
|
+
},
|
|
36436
|
+
{
|
|
36437
|
+
code: "ru",
|
|
36438
|
+
english_name: "Russian",
|
|
36439
|
+
native_name: "русский"
|
|
36440
|
+
},
|
|
36441
|
+
{
|
|
36442
|
+
code: "si",
|
|
36443
|
+
english_name: "Sinhala",
|
|
36444
|
+
native_name: "සිංහල"
|
|
36445
|
+
},
|
|
36446
|
+
{
|
|
36447
|
+
code: "sk",
|
|
36448
|
+
english_name: "Slovak",
|
|
36449
|
+
native_name: "slovenčina"
|
|
36450
|
+
},
|
|
36451
|
+
{
|
|
36452
|
+
code: "sl",
|
|
36453
|
+
english_name: "Slovenian",
|
|
36454
|
+
native_name: "slovenščina"
|
|
36455
|
+
},
|
|
36456
|
+
{
|
|
36457
|
+
code: "sq",
|
|
36458
|
+
english_name: "Albanian",
|
|
36459
|
+
native_name: "shqip"
|
|
36460
|
+
},
|
|
36461
|
+
{
|
|
36462
|
+
code: "sr",
|
|
36463
|
+
english_name: "Serbian",
|
|
36464
|
+
native_name: "српски"
|
|
36465
|
+
},
|
|
36466
|
+
{
|
|
36467
|
+
code: "sv",
|
|
36468
|
+
english_name: "Swedish",
|
|
36469
|
+
native_name: "svenska"
|
|
36470
|
+
},
|
|
36471
|
+
{
|
|
36472
|
+
code: "sw",
|
|
36473
|
+
english_name: "Swahili",
|
|
36474
|
+
native_name: "Kiswahili"
|
|
36475
|
+
},
|
|
36476
|
+
{
|
|
36477
|
+
code: "ta",
|
|
36478
|
+
english_name: "Tamil",
|
|
36479
|
+
native_name: "தமிழ்"
|
|
36480
|
+
},
|
|
36481
|
+
{
|
|
36482
|
+
code: "te",
|
|
36483
|
+
english_name: "Telugu",
|
|
36484
|
+
native_name: "తెలుగు"
|
|
36485
|
+
},
|
|
36486
|
+
{
|
|
36487
|
+
code: "th",
|
|
36488
|
+
english_name: "Thai",
|
|
36489
|
+
native_name: "ไทย"
|
|
36490
|
+
},
|
|
36491
|
+
{
|
|
36492
|
+
code: "tr",
|
|
36493
|
+
english_name: "Turkish",
|
|
36494
|
+
native_name: "Türkçe"
|
|
36495
|
+
},
|
|
36496
|
+
{
|
|
36497
|
+
code: "uk",
|
|
36498
|
+
english_name: "Ukrainian",
|
|
36499
|
+
native_name: "українська"
|
|
36500
|
+
},
|
|
36501
|
+
{
|
|
36502
|
+
code: "ur",
|
|
36503
|
+
english_name: "Urdu",
|
|
36504
|
+
native_name: "اردو"
|
|
36505
|
+
},
|
|
36506
|
+
{
|
|
36507
|
+
code: "uz",
|
|
36508
|
+
english_name: "Uzbek",
|
|
36509
|
+
native_name: "o'zbek"
|
|
36510
|
+
},
|
|
36511
|
+
{
|
|
36512
|
+
code: "vi",
|
|
36513
|
+
english_name: "Vietnamese",
|
|
36514
|
+
native_name: "Tiếng Việt"
|
|
36515
|
+
},
|
|
36516
|
+
{
|
|
36517
|
+
code: "zh-Hans",
|
|
36518
|
+
english_name: "Chinese (Simplified)",
|
|
36519
|
+
native_name: "简体中文"
|
|
36520
|
+
},
|
|
36521
|
+
{
|
|
36522
|
+
code: "zh-CN",
|
|
36523
|
+
english_name: "Chinese (Mainland China)",
|
|
36524
|
+
native_name: "简体中文 (中国)"
|
|
36525
|
+
},
|
|
36526
|
+
{
|
|
36527
|
+
code: "zh-Hant",
|
|
36528
|
+
english_name: "Chinese (Traditional)",
|
|
36529
|
+
native_name: "繁體中文"
|
|
36530
|
+
},
|
|
36531
|
+
{
|
|
36532
|
+
code: "zh-TW",
|
|
36533
|
+
english_name: "Chinese (Taiwan)",
|
|
36534
|
+
native_name: "繁體中文 (台灣)"
|
|
36535
|
+
},
|
|
36536
|
+
{
|
|
36537
|
+
code: "zu",
|
|
36538
|
+
english_name: "Zulu",
|
|
36539
|
+
native_name: "isizulu"
|
|
36540
|
+
}
|
|
36541
|
+
], ae = [
|
|
36194
36542
|
{
|
|
36195
36543
|
name: "Asia/Kabul",
|
|
36196
36544
|
offset: 16200,
|
|
@@ -39647,7 +39995,7 @@ const se = [
|
|
|
39647
39995
|
tzName: "Central Africa Time",
|
|
39648
39996
|
countryCode: "ZW"
|
|
39649
39997
|
}
|
|
39650
|
-
],
|
|
39998
|
+
], ue = [
|
|
39651
39999
|
{
|
|
39652
40000
|
countryCode: "AF",
|
|
39653
40001
|
iso2: "AF",
|
|
@@ -43543,7 +43891,7 @@ const se = [
|
|
|
43543
43891
|
countryCode: "ZW",
|
|
43544
43892
|
precision: 2
|
|
43545
43893
|
}
|
|
43546
|
-
],
|
|
43894
|
+
], ne = [
|
|
43547
43895
|
{
|
|
43548
43896
|
countryCode: "AF",
|
|
43549
43897
|
format: "YYYY-MM-DD",
|
|
@@ -45044,279 +45392,266 @@ const se = [
|
|
|
45044
45392
|
separator: "/",
|
|
45045
45393
|
weekStart: 0
|
|
45046
45394
|
}
|
|
45047
|
-
], P =
|
|
45048
|
-
function
|
|
45395
|
+
], P = ce;
|
|
45396
|
+
function ie() {
|
|
45049
45397
|
return P;
|
|
45050
45398
|
}
|
|
45051
45399
|
function Y(a) {
|
|
45052
45400
|
return P.find((o) => o.iso2.toLowerCase() === a.toLowerCase());
|
|
45053
45401
|
}
|
|
45054
|
-
function De(a) {
|
|
45055
|
-
return P.find((o) => o.iso3.toLowerCase() === a.toLowerCase());
|
|
45056
|
-
}
|
|
45057
45402
|
function Pe(a) {
|
|
45058
|
-
return P.find(
|
|
45059
|
-
(o) => o.name.toLowerCase().includes(a.toLowerCase())
|
|
45060
|
-
);
|
|
45403
|
+
return P.find((o) => o.iso3.toLowerCase() === a.toLowerCase());
|
|
45061
45404
|
}
|
|
45062
|
-
|
|
45063
|
-
|
|
45064
|
-
if (!a.trim()) return P;
|
|
45065
|
-
const o = a.toLowerCase().trim(), e = Z.get(o);
|
|
45066
|
-
if (e) return e;
|
|
45067
|
-
const i = P.filter(
|
|
45068
|
-
(n) => n.name.toLowerCase().includes(o) || n.iso2.toLowerCase().includes(o) || n.iso3.toLowerCase().includes(o) || n.phone_code.includes(o)
|
|
45069
|
-
);
|
|
45070
|
-
return Z.set(o, i), i;
|
|
45405
|
+
function Ye(a) {
|
|
45406
|
+
return P.find((o) => o.name.toLowerCase().includes(a.toLowerCase()));
|
|
45071
45407
|
}
|
|
45408
|
+
var W = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), Q = /* @__PURE__ */ new Map();
|
|
45072
45409
|
function Ce(a) {
|
|
45073
|
-
|
|
45410
|
+
if (!a.trim()) return P;
|
|
45411
|
+
const o = a.toLowerCase().trim(), e = W.get(o);
|
|
45074
45412
|
if (e) return e;
|
|
45075
|
-
const i =
|
|
45413
|
+
const i = P.filter((n) => n.name.toLowerCase().includes(o) || n.iso2.toLowerCase().includes(o) || n.iso3.toLowerCase().includes(o) || n.phone_code.includes(o));
|
|
45076
45414
|
return W.set(o, i), i;
|
|
45077
45415
|
}
|
|
45078
|
-
function
|
|
45416
|
+
function le(a) {
|
|
45079
45417
|
const o = a.toLowerCase(), e = J.get(o);
|
|
45080
45418
|
if (e) return e;
|
|
45081
|
-
const i =
|
|
45419
|
+
const i = de.filter((n) => n.countryCode.toLowerCase() === o);
|
|
45082
45420
|
return J.set(o, i), i;
|
|
45083
45421
|
}
|
|
45084
|
-
function
|
|
45422
|
+
function te(a) {
|
|
45423
|
+
const o = a.toLowerCase(), e = Q.get(o);
|
|
45424
|
+
if (e) return e;
|
|
45425
|
+
const i = ae.filter((n) => n.countryCode.toLowerCase() === o);
|
|
45426
|
+
return Q.set(o, i), i;
|
|
45427
|
+
}
|
|
45428
|
+
function ye(a) {
|
|
45085
45429
|
return H.find((o) => o.countryCode.toLowerCase() === a.toLowerCase());
|
|
45086
45430
|
}
|
|
45087
45431
|
function j(a) {
|
|
45088
|
-
return
|
|
45432
|
+
return ue.find((o) => o.iso2.toLowerCase() === a.toLowerCase());
|
|
45089
45433
|
}
|
|
45090
|
-
function
|
|
45434
|
+
function re(a) {
|
|
45091
45435
|
const o = j(a);
|
|
45092
|
-
if (!o || !o.possibleLengths)
|
|
45093
|
-
|
|
45436
|
+
if (!o || !o.possibleLengths) return {
|
|
45437
|
+
min: void 0,
|
|
45438
|
+
max: void 0
|
|
45439
|
+
};
|
|
45094
45440
|
const e = o.possibleLengths, i = e.match(/\[(\d+)-(\d+)\]/);
|
|
45095
|
-
if (i)
|
|
45096
|
-
|
|
45441
|
+
if (i) return {
|
|
45442
|
+
min: parseInt(i[1], 10),
|
|
45443
|
+
max: parseInt(i[2], 10)
|
|
45444
|
+
};
|
|
45097
45445
|
if (e.includes(",")) {
|
|
45098
45446
|
const t = e.split(",").map((r) => parseInt(r.trim(), 10)).filter((r) => !isNaN(r));
|
|
45099
|
-
return {
|
|
45447
|
+
return {
|
|
45448
|
+
min: Math.min(...t),
|
|
45449
|
+
max: Math.max(...t)
|
|
45450
|
+
};
|
|
45100
45451
|
}
|
|
45101
45452
|
const n = parseInt(e, 10);
|
|
45102
|
-
return isNaN(n) ? {
|
|
45453
|
+
return isNaN(n) ? {
|
|
45454
|
+
min: void 0,
|
|
45455
|
+
max: void 0
|
|
45456
|
+
} : {
|
|
45457
|
+
min: n,
|
|
45458
|
+
max: n
|
|
45459
|
+
};
|
|
45103
45460
|
}
|
|
45104
|
-
function
|
|
45461
|
+
function pe(a) {
|
|
45105
45462
|
return Y(a)?.tax_id_label || "Tax ID";
|
|
45106
45463
|
}
|
|
45107
|
-
function
|
|
45464
|
+
function ze(a) {
|
|
45108
45465
|
return Y(a)?.tax_id_placeholder || "Enter tax ID";
|
|
45109
45466
|
}
|
|
45110
|
-
function
|
|
45467
|
+
function Ae(a) {
|
|
45111
45468
|
return Y(a)?.postal_code_label || "Postal Code";
|
|
45112
45469
|
}
|
|
45113
45470
|
function N(a, o, e, i) {
|
|
45114
|
-
const [n, t] =
|
|
45471
|
+
const [n, t] = M(!1), [r, m] = M(""), [c, z] = M(e ?? null);
|
|
45115
45472
|
x(() => {
|
|
45116
|
-
|
|
45473
|
+
z(e ?? null);
|
|
45117
45474
|
}, [e]);
|
|
45118
45475
|
const l = w(i);
|
|
45119
45476
|
l.current = i;
|
|
45120
|
-
const y = C(
|
|
45121
|
-
|
|
45122
|
-
|
|
45123
|
-
|
|
45477
|
+
const y = C(() => o(a, r), [
|
|
45478
|
+
a,
|
|
45479
|
+
r,
|
|
45480
|
+
o
|
|
45481
|
+
]), p = () => t(!0), A = () => {
|
|
45124
45482
|
t(!1), m("");
|
|
45125
|
-
},
|
|
45126
|
-
|
|
45483
|
+
}, _ = () => t((h) => !h), f = (h) => {
|
|
45484
|
+
z(h), l.current?.(h), A();
|
|
45127
45485
|
}, b = () => {
|
|
45128
|
-
|
|
45486
|
+
z(null);
|
|
45129
45487
|
};
|
|
45130
|
-
return C(
|
|
45131
|
-
|
|
45132
|
-
|
|
45133
|
-
|
|
45134
|
-
|
|
45135
|
-
|
|
45136
|
-
|
|
45137
|
-
|
|
45138
|
-
|
|
45139
|
-
|
|
45140
|
-
|
|
45141
|
-
|
|
45142
|
-
|
|
45143
|
-
|
|
45144
|
-
|
|
45145
|
-
|
|
45146
|
-
|
|
45147
|
-
|
|
45148
|
-
|
|
45149
|
-
|
|
45150
|
-
|
|
45151
|
-
|
|
45152
|
-
b
|
|
45153
|
-
]
|
|
45154
|
-
);
|
|
45488
|
+
return C(() => ({
|
|
45489
|
+
isOpen: n,
|
|
45490
|
+
searchQuery: r,
|
|
45491
|
+
filteredItems: y,
|
|
45492
|
+
selectedItem: c,
|
|
45493
|
+
open: p,
|
|
45494
|
+
close: A,
|
|
45495
|
+
toggle: _,
|
|
45496
|
+
setSearchQuery: m,
|
|
45497
|
+
selectItem: f,
|
|
45498
|
+
clearSelection: b
|
|
45499
|
+
}), [
|
|
45500
|
+
n,
|
|
45501
|
+
r,
|
|
45502
|
+
y,
|
|
45503
|
+
c,
|
|
45504
|
+
p,
|
|
45505
|
+
A,
|
|
45506
|
+
_,
|
|
45507
|
+
f,
|
|
45508
|
+
b
|
|
45509
|
+
]);
|
|
45155
45510
|
}
|
|
45156
|
-
function
|
|
45157
|
-
const e = k(
|
|
45158
|
-
|
|
45159
|
-
[]
|
|
45160
|
-
);
|
|
45161
|
-
return N(ne(), e, a, o);
|
|
45511
|
+
function Be(a, o) {
|
|
45512
|
+
const e = k((i, n) => Ce(n), []);
|
|
45513
|
+
return N(ie(), e, a, o);
|
|
45162
45514
|
}
|
|
45163
|
-
function
|
|
45164
|
-
return
|
|
45515
|
+
function ke() {
|
|
45516
|
+
return ne;
|
|
45165
45517
|
}
|
|
45166
|
-
|
|
45518
|
+
var X = {
|
|
45167
45519
|
countryCode: "DEFAULT",
|
|
45168
45520
|
format: "DD/MM/YYYY",
|
|
45169
45521
|
separator: "/",
|
|
45170
45522
|
weekStart: 1
|
|
45171
45523
|
};
|
|
45172
45524
|
function U(a) {
|
|
45173
|
-
if (!a) return
|
|
45525
|
+
if (!a) return X;
|
|
45174
45526
|
const o = a.toUpperCase();
|
|
45175
|
-
return
|
|
45176
|
-
...
|
|
45527
|
+
return ne.find((e) => e.countryCode === o) ?? {
|
|
45528
|
+
...X,
|
|
45177
45529
|
countryCode: o
|
|
45178
45530
|
};
|
|
45179
45531
|
}
|
|
45180
|
-
function
|
|
45181
|
-
if (!a || isNaN(a.getTime()) || !o)
|
|
45182
|
-
return "";
|
|
45532
|
+
function me(a, o) {
|
|
45533
|
+
if (!a || isNaN(a.getTime()) || !o) return "";
|
|
45183
45534
|
const e = String(a.getFullYear()), i = String(a.getMonth() + 1).padStart(2, "0"), n = String(a.getDate()).padStart(2, "0");
|
|
45184
45535
|
return o.replace(/YYYY/g, e).replace(/MM/g, i).replace(/DD/g, n);
|
|
45185
45536
|
}
|
|
45186
|
-
function
|
|
45187
|
-
|
|
45188
|
-
return re(a, e.format);
|
|
45537
|
+
function Ne(a, o) {
|
|
45538
|
+
return me(a, U(o).format);
|
|
45189
45539
|
}
|
|
45190
|
-
function
|
|
45191
|
-
if (!a || !o || a.length !== o.length)
|
|
45192
|
-
return null;
|
|
45540
|
+
function se(a, o) {
|
|
45541
|
+
if (!a || !o || a.length !== o.length) return null;
|
|
45193
45542
|
const e = o.indexOf("YYYY"), i = o.indexOf("MM"), n = o.indexOf("DD");
|
|
45194
|
-
if (e === -1 || i === -1 || n === -1)
|
|
45195
|
-
return null;
|
|
45543
|
+
if (e === -1 || i === -1 || n === -1) return null;
|
|
45196
45544
|
const t = parseInt(a.slice(e, e + 4), 10), r = parseInt(a.slice(i, i + 2), 10) - 1, m = parseInt(a.slice(n, n + 2), 10);
|
|
45197
|
-
if (isNaN(t) || isNaN(r) || isNaN(m) || r < 0 || r > 11 || m < 1 || m > 31)
|
|
45198
|
-
|
|
45199
|
-
|
|
45200
|
-
return s.getFullYear() !== t || s.getMonth() !== r || s.getDate() !== m ? null : s;
|
|
45545
|
+
if (isNaN(t) || isNaN(r) || isNaN(m) || r < 0 || r > 11 || m < 1 || m > 31) return null;
|
|
45546
|
+
const c = new Date(t, r, m);
|
|
45547
|
+
return c.getFullYear() !== t || c.getMonth() !== r || c.getDate() !== m ? null : c;
|
|
45201
45548
|
}
|
|
45202
|
-
function
|
|
45203
|
-
|
|
45204
|
-
return me(a, e.format);
|
|
45549
|
+
function Le(a, o) {
|
|
45550
|
+
return se(a, U(o).format);
|
|
45205
45551
|
}
|
|
45206
|
-
|
|
45552
|
+
var q = /* @__PURE__ */ new Map(), fe = {
|
|
45207
45553
|
country: null,
|
|
45208
45554
|
divisions: [],
|
|
45209
45555
|
timezones: [],
|
|
45210
45556
|
currency: null,
|
|
45211
45557
|
phoneFormat: null,
|
|
45212
|
-
phoneLengths: {
|
|
45558
|
+
phoneLengths: {
|
|
45559
|
+
min: void 0,
|
|
45560
|
+
max: void 0
|
|
45561
|
+
},
|
|
45213
45562
|
exampleNumber: void 0,
|
|
45214
|
-
tax: {
|
|
45563
|
+
tax: {
|
|
45564
|
+
label: "Tax ID",
|
|
45565
|
+
placeholder: "Enter tax ID"
|
|
45566
|
+
},
|
|
45215
45567
|
postalCode: { label: "Postal Code" },
|
|
45216
45568
|
dateFormat: null
|
|
45217
45569
|
};
|
|
45218
45570
|
function O(a) {
|
|
45219
45571
|
const o = C(() => a ? a === a.toUpperCase() ? a : a.toUpperCase() : null, [a]);
|
|
45220
45572
|
return C(() => {
|
|
45221
|
-
if (!o) return
|
|
45222
|
-
let e =
|
|
45573
|
+
if (!o) return fe;
|
|
45574
|
+
let e = q.get(o.length);
|
|
45223
45575
|
if (e) {
|
|
45224
|
-
const
|
|
45225
|
-
if (
|
|
45576
|
+
const f = e.get(o);
|
|
45577
|
+
if (f) return f;
|
|
45226
45578
|
}
|
|
45227
|
-
const i = Y(o) ?? null, n =
|
|
45579
|
+
const i = Y(o) ?? null, n = le(o), t = te(o), r = ye(o) ?? null, m = j(o) ?? null, c = re(o), z = m?.example !== void 0 ? String(m.example) : void 0, l = pe(o), y = ze(o), p = Ae(o), A = U(o), _ = {
|
|
45228
45580
|
country: i,
|
|
45229
45581
|
divisions: n,
|
|
45230
45582
|
timezones: t,
|
|
45231
45583
|
currency: r,
|
|
45232
45584
|
phoneFormat: m,
|
|
45233
|
-
phoneLengths:
|
|
45234
|
-
exampleNumber:
|
|
45235
|
-
tax: {
|
|
45585
|
+
phoneLengths: c,
|
|
45586
|
+
exampleNumber: z,
|
|
45587
|
+
tax: {
|
|
45588
|
+
label: l,
|
|
45589
|
+
placeholder: y
|
|
45590
|
+
},
|
|
45236
45591
|
postalCode: { label: p },
|
|
45237
|
-
dateFormat:
|
|
45592
|
+
dateFormat: A
|
|
45238
45593
|
};
|
|
45239
|
-
return e || (e = /* @__PURE__ */ new Map(),
|
|
45594
|
+
return e || (e = /* @__PURE__ */ new Map(), q.set(o.length, e)), e.set(o, _), _;
|
|
45240
45595
|
}, [o]);
|
|
45241
45596
|
}
|
|
45242
|
-
|
|
45243
|
-
const q = /* @__PURE__ */ new Map();
|
|
45597
|
+
var G = null, $ = /* @__PURE__ */ new Map();
|
|
45244
45598
|
function F() {
|
|
45245
45599
|
if (G) return G;
|
|
45246
45600
|
const a = /* @__PURE__ */ new Set(), o = [];
|
|
45247
|
-
for (const e of H)
|
|
45248
|
-
a.has(e.code) || (a.add(e.code), o.push(e));
|
|
45601
|
+
for (const e of H) a.has(e.code) || (a.add(e.code), o.push(e));
|
|
45249
45602
|
return G = o.sort((e, i) => e.code.localeCompare(i.code)), G;
|
|
45250
45603
|
}
|
|
45251
|
-
function
|
|
45604
|
+
function Re(a) {
|
|
45252
45605
|
const o = a.toLowerCase();
|
|
45253
|
-
return F().find(
|
|
45254
|
-
(e) => e.code.toLowerCase() === o
|
|
45255
|
-
);
|
|
45606
|
+
return F().find((e) => e.code.toLowerCase() === o);
|
|
45256
45607
|
}
|
|
45257
|
-
function
|
|
45608
|
+
function _e(a, o) {
|
|
45258
45609
|
let e = F();
|
|
45259
45610
|
if (o && (e = H.filter((m) => m.countryCode.toLowerCase() === o.toLowerCase())), !a.trim()) return e;
|
|
45260
|
-
const i = a.toLowerCase().trim(), n = `${o || ""}:${i}`, t =
|
|
45611
|
+
const i = a.toLowerCase().trim(), n = `${o || ""}:${i}`, t = $.get(n);
|
|
45261
45612
|
if (t) return t;
|
|
45262
|
-
const r = e.filter(
|
|
45263
|
-
|
|
45264
|
-
);
|
|
45265
|
-
return q.set(n, r), r;
|
|
45613
|
+
const r = e.filter((m) => m.code.toLowerCase().includes(i) || m.name.toLowerCase().includes(i) || m.symbol.toLowerCase().includes(i));
|
|
45614
|
+
return $.set(n, r), r;
|
|
45266
45615
|
}
|
|
45267
|
-
function
|
|
45268
|
-
const e = k(
|
|
45269
|
-
(i, n) => fe(n),
|
|
45270
|
-
[]
|
|
45271
|
-
);
|
|
45616
|
+
function Ie(a, o) {
|
|
45617
|
+
const e = k((i, n) => _e(n), []);
|
|
45272
45618
|
return N(F(), e, a, o);
|
|
45273
45619
|
}
|
|
45274
|
-
function
|
|
45275
|
-
const
|
|
45276
|
-
|
|
45277
|
-
|
|
45278
|
-
|
|
45279
|
-
|
|
45280
|
-
|
|
45281
|
-
);
|
|
45282
|
-
},
|
|
45283
|
-
[]
|
|
45284
|
-
);
|
|
45285
|
-
return N(n, t, o, e);
|
|
45620
|
+
function Ge(a, o, e) {
|
|
45621
|
+
const i = O(a).divisions;
|
|
45622
|
+
return N(i, k((n, t) => {
|
|
45623
|
+
if (!t.trim()) return n;
|
|
45624
|
+
const r = t.toLowerCase().trim();
|
|
45625
|
+
return n.filter((m) => m.name.toLowerCase().includes(r) || m.iso2.toLowerCase().includes(r));
|
|
45626
|
+
}, []), o, e);
|
|
45286
45627
|
}
|
|
45287
|
-
|
|
45288
|
-
function
|
|
45628
|
+
var ee = /* @__PURE__ */ new Map();
|
|
45629
|
+
function ge() {
|
|
45289
45630
|
return K;
|
|
45290
45631
|
}
|
|
45291
|
-
function
|
|
45632
|
+
function ve(a) {
|
|
45292
45633
|
const o = a.toLowerCase();
|
|
45293
45634
|
return K.find((e) => e.code.toLowerCase() === o);
|
|
45294
45635
|
}
|
|
45295
|
-
function
|
|
45636
|
+
function Ee(a) {
|
|
45296
45637
|
if (!a.trim()) return K;
|
|
45297
|
-
const o = a.toLowerCase().trim(), e =
|
|
45638
|
+
const o = a.toLowerCase().trim(), e = ee.get(o);
|
|
45298
45639
|
if (e) return e;
|
|
45299
|
-
const i = K.filter(
|
|
45300
|
-
|
|
45301
|
-
);
|
|
45302
|
-
return $.set(o, i), i;
|
|
45640
|
+
const i = K.filter((n) => n.english_name.toLowerCase().includes(o) || n.native_name.toLowerCase().includes(o) || n.code.toLowerCase().includes(o));
|
|
45641
|
+
return ee.set(o, i), i;
|
|
45303
45642
|
}
|
|
45304
|
-
function
|
|
45305
|
-
const e = k(
|
|
45306
|
-
|
|
45307
|
-
[]
|
|
45308
|
-
);
|
|
45309
|
-
return N(_e(), e, a, o);
|
|
45643
|
+
function Ke(a, o) {
|
|
45644
|
+
const e = k((i, n) => Ee(n), []);
|
|
45645
|
+
return N(ge(), e, a, o);
|
|
45310
45646
|
}
|
|
45311
|
-
|
|
45647
|
+
var v = null;
|
|
45312
45648
|
function V() {
|
|
45313
45649
|
if (v) return v;
|
|
45314
45650
|
const a = /* @__PURE__ */ new Set(), o = [];
|
|
45315
|
-
for (const e of
|
|
45316
|
-
a.has(e.name) || (a.add(e.name), o.push(e));
|
|
45651
|
+
for (const e of ae) a.has(e.name) || (a.add(e.name), o.push(e));
|
|
45317
45652
|
return v = o.sort((e, i) => e.offset - i.offset), v;
|
|
45318
45653
|
}
|
|
45319
|
-
|
|
45654
|
+
var Me = {
|
|
45320
45655
|
"US/Eastern": "America/New_York",
|
|
45321
45656
|
"US/Central": "America/Chicago",
|
|
45322
45657
|
"US/Mountain": "America/Denver",
|
|
@@ -45362,49 +45697,33 @@ const Ee = {
|
|
|
45362
45697
|
"Europe/Belfast": "Europe/London",
|
|
45363
45698
|
"Europe/Tiraspol": "Europe/Chisinau"
|
|
45364
45699
|
};
|
|
45365
|
-
function
|
|
45700
|
+
function Ue(a) {
|
|
45366
45701
|
if (!a) return;
|
|
45367
|
-
const o = a.toLowerCase(), e = V(), i = e.find(
|
|
45368
|
-
(t) => t.name.toLowerCase() === o
|
|
45369
|
-
);
|
|
45702
|
+
const o = a.toLowerCase(), e = V(), i = e.find((t) => t.name.toLowerCase() === o);
|
|
45370
45703
|
if (i) return i;
|
|
45371
|
-
const n = Object.entries(
|
|
45372
|
-
|
|
45373
|
-
)?.[1];
|
|
45374
|
-
if (n)
|
|
45375
|
-
return e.find(
|
|
45376
|
-
(t) => t.name.toLowerCase() === n.toLowerCase()
|
|
45377
|
-
);
|
|
45704
|
+
const n = Object.entries(Me).find(([t]) => t.toLowerCase() === o)?.[1];
|
|
45705
|
+
if (n) return e.find((t) => t.name.toLowerCase() === n.toLowerCase());
|
|
45378
45706
|
}
|
|
45379
|
-
|
|
45380
|
-
function
|
|
45381
|
-
const e = o ?
|
|
45707
|
+
var oe = /* @__PURE__ */ new Map();
|
|
45708
|
+
function he(a, o) {
|
|
45709
|
+
const e = o ? te(o) : V();
|
|
45382
45710
|
if (!a.trim()) return e;
|
|
45383
|
-
const i = a.toLowerCase().trim(), n = `${o || ""}:${i}`, t =
|
|
45711
|
+
const i = a.toLowerCase().trim(), n = `${o || ""}:${i}`, t = oe.get(n);
|
|
45384
45712
|
if (t) return t;
|
|
45385
|
-
const r = e.filter(
|
|
45386
|
-
|
|
45387
|
-
);
|
|
45388
|
-
return ee.set(n, r), r;
|
|
45713
|
+
const r = e.filter((m) => m.name.toLowerCase().includes(i) || m.tzName.toLowerCase().includes(i) || m.abbreviation.toLowerCase().includes(i) || m.offset_name.toLowerCase().includes(i));
|
|
45714
|
+
return oe.set(n, r), r;
|
|
45389
45715
|
}
|
|
45390
|
-
function
|
|
45391
|
-
const i = O(e)
|
|
45392
|
-
|
|
45393
|
-
[e, i.timezones]
|
|
45394
|
-
), t = k(
|
|
45395
|
-
(r, m) => Me(m, e),
|
|
45396
|
-
[e]
|
|
45397
|
-
);
|
|
45398
|
-
return N(n, t, a, o);
|
|
45716
|
+
function xe(a, o, e) {
|
|
45717
|
+
const i = O(e);
|
|
45718
|
+
return N(C(() => e ? i.timezones : V(), [e, i.timezones]), k((n, t) => he(t, e), [e]), a, o);
|
|
45399
45719
|
}
|
|
45400
45720
|
function B(a) {
|
|
45401
45721
|
const o = Y(a);
|
|
45402
|
-
if (!o)
|
|
45403
|
-
|
|
45404
|
-
const e = te(a), i = j(a);
|
|
45722
|
+
if (!o) return {};
|
|
45723
|
+
const e = re(a), i = j(a);
|
|
45405
45724
|
let n = i?.example ? String(i.example) : void 0;
|
|
45406
45725
|
n?.startsWith("+") && (n = n.slice(1 + o.phone_code.length));
|
|
45407
|
-
const t = n ?
|
|
45726
|
+
const t = n ? Se(n, a) : void 0;
|
|
45408
45727
|
return {
|
|
45409
45728
|
minLength: e.min,
|
|
45410
45729
|
maxLength: e.max,
|
|
@@ -45414,236 +45733,240 @@ function B(a) {
|
|
|
45414
45733
|
nationalPrefix: i?.nationalPrefix
|
|
45415
45734
|
};
|
|
45416
45735
|
}
|
|
45417
|
-
function
|
|
45736
|
+
function Se(a, o) {
|
|
45418
45737
|
const e = a.replace(/\D/g, "");
|
|
45419
45738
|
if (o.toUpperCase() === "US" || o.toUpperCase() === "CA") {
|
|
45420
|
-
if (e.length >= 10)
|
|
45421
|
-
return `(${e.slice(0, 3)}) ${e.slice(3, 6)}-${e.slice(6, 10)}`;
|
|
45739
|
+
if (e.length >= 10) return `(${e.slice(0, 3)}) ${e.slice(3, 6)}-${e.slice(6, 10)}`;
|
|
45422
45740
|
} else if (o.toUpperCase() === "GB") {
|
|
45423
|
-
if (e.length >= 10)
|
|
45424
|
-
return `${e.slice(0, 4)} ${e.slice(4, 8)} ${e.slice(8)}`;
|
|
45741
|
+
if (e.length >= 10) return `${e.slice(0, 4)} ${e.slice(4, 8)} ${e.slice(8)}`;
|
|
45425
45742
|
} else if (o.toUpperCase() === "DE") {
|
|
45426
|
-
if (e.length >= 10)
|
|
45427
|
-
return `${e.slice(0, 3)} ${e.slice(3)}`;
|
|
45743
|
+
if (e.length >= 10) return `${e.slice(0, 3)} ${e.slice(3)}`;
|
|
45428
45744
|
} else if (o.toUpperCase() === "FR" && e.length >= 9)
|
|
45429
45745
|
return `${e.slice(0, 1)} ${e.slice(1, 5)} ${e.slice(5)}`;
|
|
45430
45746
|
const i = e.match(/(\d{1,4})(\d{1,4})?(\d{1,4})?(\d{0,4})?/);
|
|
45431
|
-
return i ? [
|
|
45747
|
+
return i ? [
|
|
45748
|
+
i[1],
|
|
45749
|
+
i[2],
|
|
45750
|
+
i[3],
|
|
45751
|
+
i[4]
|
|
45752
|
+
].filter(Boolean).join(" ") : e;
|
|
45432
45753
|
}
|
|
45433
|
-
function
|
|
45754
|
+
function Te(a, o, e) {
|
|
45434
45755
|
const i = [];
|
|
45435
45756
|
let n = o.replace(/\D/g, "");
|
|
45436
45757
|
const t = B(e);
|
|
45437
|
-
if (t.nationalPrefix && n.startsWith(t.nationalPrefix) && (n = n.slice(t.nationalPrefix.length)), t.minLength && n.length < t.minLength && i.push(`Phone number must be at least ${t.minLength} digits`), t.maxLength && n.length > t.maxLength && i.push(`Phone number must be at most ${t.maxLength} digits`), t.pattern && n.length > 0)
|
|
45438
|
-
|
|
45439
|
-
|
|
45440
|
-
|
|
45441
|
-
}
|
|
45758
|
+
if (t.nationalPrefix && n.startsWith(t.nationalPrefix) && (n = n.slice(t.nationalPrefix.length)), t.minLength && n.length < t.minLength && i.push(`Phone number must be at least ${t.minLength} digits`), t.maxLength && n.length > t.maxLength && i.push(`Phone number must be at most ${t.maxLength} digits`), t.pattern && n.length > 0) try {
|
|
45759
|
+
new RegExp(`^${t.pattern}$`).test(n) || i.push("Phone number format is invalid");
|
|
45760
|
+
} catch {
|
|
45761
|
+
}
|
|
45442
45762
|
return {
|
|
45443
45763
|
isValid: i.length === 0,
|
|
45444
45764
|
errors: i
|
|
45445
45765
|
};
|
|
45446
45766
|
}
|
|
45447
|
-
function
|
|
45767
|
+
function we(a, o) {
|
|
45448
45768
|
const e = a.replace(/\D/g, "");
|
|
45449
45769
|
if (o.toUpperCase() === "US" || o.toUpperCase() === "CA") {
|
|
45450
|
-
if (e.length >= 10)
|
|
45451
|
-
return `(${e.slice(0, 3)}) ${e.slice(3, 6)}-${e.slice(6, 10)}`;
|
|
45770
|
+
if (e.length >= 10) return `(${e.slice(0, 3)}) ${e.slice(3, 6)}-${e.slice(6, 10)}`;
|
|
45452
45771
|
} else if (o.toUpperCase() === "GB") {
|
|
45453
|
-
if (e.length >= 10)
|
|
45454
|
-
return `${e.slice(0, 4)} ${e.slice(4, 8)} ${e.slice(8)}`;
|
|
45772
|
+
if (e.length >= 10) return `${e.slice(0, 4)} ${e.slice(4, 8)} ${e.slice(8)}`;
|
|
45455
45773
|
} else if (o.toUpperCase() === "DE" && e.length >= 10)
|
|
45456
45774
|
return `${e.slice(0, 3)} ${e.slice(3)}`;
|
|
45457
45775
|
return a;
|
|
45458
45776
|
}
|
|
45459
|
-
function
|
|
45460
|
-
const i = a?.country ?? (e ? Y(e) ?? null : null), [n, t] =
|
|
45777
|
+
function He(a, o, e) {
|
|
45778
|
+
const i = a?.country ?? (e ? Y(e) ?? null : null), [n, t] = M(i), [r, m] = M(a?.number ?? ""), [c, z] = M(!1), [l, y] = M("");
|
|
45461
45779
|
x(() => {
|
|
45462
45780
|
a ? (t(a.country), m(a.number)) : (t(i), m(""));
|
|
45463
45781
|
}, [a, i]);
|
|
45464
45782
|
const p = w(o);
|
|
45465
45783
|
p.current = o;
|
|
45466
|
-
const
|
|
45467
|
-
if (!l.trim()) return
|
|
45468
|
-
const
|
|
45469
|
-
return
|
|
45470
|
-
|
|
45471
|
-
);
|
|
45472
|
-
|
|
45473
|
-
|
|
45474
|
-
|
|
45475
|
-
|
|
45476
|
-
|
|
45477
|
-
|
|
45478
|
-
|
|
45479
|
-
|
|
45480
|
-
|
|
45784
|
+
const A = ie(), _ = C(() => {
|
|
45785
|
+
if (!l.trim()) return A;
|
|
45786
|
+
const s = l.toLowerCase().trim().replace("+", "");
|
|
45787
|
+
return A.filter((d) => d.name.toLowerCase().includes(s) || d.phone_code.includes(s) || d.iso2.toLowerCase().includes(s));
|
|
45788
|
+
}, [A, l]), f = (s, d) => {
|
|
45789
|
+
const u = B(s.iso2);
|
|
45790
|
+
let T = d, Z = u;
|
|
45791
|
+
return u.nationalPrefix && d.startsWith(u.nationalPrefix) && (T = d.slice(u.nationalPrefix.length), Z = {
|
|
45792
|
+
...u,
|
|
45793
|
+
minLength: u.minLength ? u.minLength + u.nationalPrefix.length : void 0,
|
|
45794
|
+
maxLength: u.maxLength ? u.maxLength + u.nationalPrefix.length : void 0
|
|
45795
|
+
}), {
|
|
45796
|
+
country: s,
|
|
45797
|
+
dialCode: `+${s.phone_code}`,
|
|
45798
|
+
number: d,
|
|
45799
|
+
full: `+${s.phone_code}${T}`,
|
|
45800
|
+
validation: Z
|
|
45481
45801
|
};
|
|
45482
|
-
}, b = (
|
|
45483
|
-
t(
|
|
45484
|
-
},
|
|
45485
|
-
let
|
|
45486
|
-
const
|
|
45487
|
-
let T =
|
|
45488
|
-
T &&
|
|
45489
|
-
}, R = () => n ? r ?
|
|
45490
|
-
|
|
45491
|
-
|
|
45492
|
-
|
|
45493
|
-
|
|
45494
|
-
|
|
45495
|
-
|
|
45496
|
-
|
|
45497
|
-
)
|
|
45498
|
-
|
|
45499
|
-
|
|
45500
|
-
|
|
45501
|
-
|
|
45502
|
-
|
|
45503
|
-
|
|
45504
|
-
|
|
45505
|
-
|
|
45506
|
-
|
|
45507
|
-
|
|
45508
|
-
|
|
45509
|
-
|
|
45510
|
-
|
|
45511
|
-
|
|
45512
|
-
|
|
45513
|
-
|
|
45514
|
-
|
|
45515
|
-
|
|
45516
|
-
|
|
45517
|
-
|
|
45518
|
-
|
|
45519
|
-
|
|
45520
|
-
|
|
45521
|
-
|
|
45522
|
-
|
|
45523
|
-
|
|
45524
|
-
|
|
45802
|
+
}, b = (s) => {
|
|
45803
|
+
t(s), z(!1), y(""), p.current?.(f(s, r));
|
|
45804
|
+
}, h = O(n?.iso2), L = (s) => {
|
|
45805
|
+
let d = s.replace(/\D/g, "");
|
|
45806
|
+
const u = B(n?.iso2 ?? "");
|
|
45807
|
+
let T = h.phoneLengths.max;
|
|
45808
|
+
T && u.nationalPrefix && d.startsWith(u.nationalPrefix) && (T += u.nationalPrefix.length), T && d.length > T && (d = d.slice(0, T)), m(d), n && p.current?.(f(n, d));
|
|
45809
|
+
}, R = () => n ? r ? Te(`+${n.phone_code}`, r, n.iso2) : {
|
|
45810
|
+
isValid: !1,
|
|
45811
|
+
errors: ["Phone number is required"]
|
|
45812
|
+
} : {
|
|
45813
|
+
isValid: !1,
|
|
45814
|
+
errors: ["Please select a country"]
|
|
45815
|
+
}, I = () => n ? B(n.iso2).placeholder || "Enter phone number" : "Phone number", g = () => z((s) => !s), E = () => {
|
|
45816
|
+
z(!1), y("");
|
|
45817
|
+
}, D = C(() => n ? f(n, r) : null, [n, r]), S = C(() => {
|
|
45818
|
+
if (!n) return null;
|
|
45819
|
+
const s = B(n.iso2);
|
|
45820
|
+
return s.nationalPrefix && r.startsWith(s.nationalPrefix) ? {
|
|
45821
|
+
...s,
|
|
45822
|
+
minLength: s.minLength ? s.minLength + s.nationalPrefix.length : void 0,
|
|
45823
|
+
maxLength: s.maxLength ? s.maxLength + s.nationalPrefix.length : void 0
|
|
45824
|
+
} : s;
|
|
45825
|
+
}, [n, r]);
|
|
45826
|
+
return C(() => ({
|
|
45827
|
+
country: n,
|
|
45828
|
+
number: r,
|
|
45829
|
+
value: D,
|
|
45830
|
+
validation: S,
|
|
45831
|
+
isOpen: c,
|
|
45832
|
+
searchQuery: l,
|
|
45833
|
+
filteredCountries: _,
|
|
45834
|
+
setSearchQuery: y,
|
|
45835
|
+
selectCountry: b,
|
|
45836
|
+
setNumber: L,
|
|
45837
|
+
toggle: g,
|
|
45838
|
+
close: E,
|
|
45839
|
+
validate: R,
|
|
45840
|
+
getPlaceholder: I
|
|
45841
|
+
}), [
|
|
45842
|
+
n,
|
|
45843
|
+
r,
|
|
45844
|
+
D,
|
|
45845
|
+
S,
|
|
45846
|
+
c,
|
|
45847
|
+
l,
|
|
45848
|
+
_
|
|
45849
|
+
]);
|
|
45525
45850
|
}
|
|
45526
|
-
function
|
|
45527
|
-
const [r, m] =
|
|
45851
|
+
function je(a, o, e, i, n, t) {
|
|
45852
|
+
const [r, m] = M(!1), [c, z] = M(""), [l, y] = M(i ?? []);
|
|
45528
45853
|
x(() => {
|
|
45529
45854
|
y(i ?? []);
|
|
45530
45855
|
}, [i]);
|
|
45531
45856
|
const p = w(n);
|
|
45532
45857
|
p.current = n;
|
|
45533
|
-
const
|
|
45534
|
-
|
|
45535
|
-
|
|
45536
|
-
|
|
45537
|
-
|
|
45538
|
-
|
|
45539
|
-
|
|
45540
|
-
|
|
45541
|
-
|
|
45542
|
-
|
|
45543
|
-
|
|
45858
|
+
const A = C(() => o(a, c), [
|
|
45859
|
+
a,
|
|
45860
|
+
c,
|
|
45861
|
+
o
|
|
45862
|
+
]), _ = () => m(!0), f = () => {
|
|
45863
|
+
m(!1), z("");
|
|
45864
|
+
}, b = () => m((g) => !g), h = (g) => l.some((E) => e(E) === e(g)), L = (g) => {
|
|
45865
|
+
y((E) => {
|
|
45866
|
+
const D = E.some((s) => e(s) === e(g));
|
|
45867
|
+
let S;
|
|
45868
|
+
if (D) S = E.filter((s) => e(s) !== e(g));
|
|
45544
45869
|
else {
|
|
45545
|
-
if (t !== void 0 &&
|
|
45546
|
-
|
|
45870
|
+
if (t !== void 0 && E.length >= t) return E;
|
|
45871
|
+
S = [...E, g];
|
|
45547
45872
|
}
|
|
45548
|
-
return p.current?.(
|
|
45873
|
+
return p.current?.(S), S;
|
|
45549
45874
|
});
|
|
45550
|
-
}, R = (
|
|
45551
|
-
y((
|
|
45552
|
-
const D =
|
|
45875
|
+
}, R = (g) => {
|
|
45876
|
+
y((E) => {
|
|
45877
|
+
const D = E.filter((S) => e(S) !== e(g));
|
|
45553
45878
|
return p.current?.(D), D;
|
|
45554
45879
|
});
|
|
45555
45880
|
}, I = () => {
|
|
45556
45881
|
y([]), p.current?.([]);
|
|
45557
45882
|
};
|
|
45558
|
-
return C(
|
|
45559
|
-
|
|
45560
|
-
|
|
45561
|
-
|
|
45562
|
-
|
|
45563
|
-
|
|
45564
|
-
|
|
45565
|
-
|
|
45566
|
-
|
|
45567
|
-
|
|
45568
|
-
|
|
45569
|
-
|
|
45570
|
-
|
|
45571
|
-
|
|
45572
|
-
|
|
45573
|
-
|
|
45574
|
-
|
|
45575
|
-
|
|
45576
|
-
|
|
45577
|
-
|
|
45578
|
-
|
|
45579
|
-
|
|
45580
|
-
|
|
45581
|
-
|
|
45582
|
-
|
|
45583
|
-
|
|
45584
|
-
I
|
|
45585
|
-
]
|
|
45586
|
-
);
|
|
45883
|
+
return C(() => ({
|
|
45884
|
+
isOpen: r,
|
|
45885
|
+
searchQuery: c,
|
|
45886
|
+
filteredItems: A,
|
|
45887
|
+
selectedItems: l,
|
|
45888
|
+
open: _,
|
|
45889
|
+
close: f,
|
|
45890
|
+
toggle: b,
|
|
45891
|
+
setSearchQuery: z,
|
|
45892
|
+
toggleItem: L,
|
|
45893
|
+
isSelected: h,
|
|
45894
|
+
removeItem: R,
|
|
45895
|
+
clearAll: I
|
|
45896
|
+
}), [
|
|
45897
|
+
r,
|
|
45898
|
+
c,
|
|
45899
|
+
A,
|
|
45900
|
+
l,
|
|
45901
|
+
_,
|
|
45902
|
+
f,
|
|
45903
|
+
b,
|
|
45904
|
+
L,
|
|
45905
|
+
h,
|
|
45906
|
+
R,
|
|
45907
|
+
I
|
|
45908
|
+
]);
|
|
45587
45909
|
}
|
|
45588
|
-
function
|
|
45589
|
-
const o = C(() => a ? a === a.toUpperCase() ? a : a.toUpperCase() : null, [a]), e = C(() => o ? U(o) : null, [o])
|
|
45910
|
+
function Oe(a) {
|
|
45911
|
+
const o = C(() => a ? a === a.toUpperCase() ? a : a.toUpperCase() : null, [a]), e = C(() => o ? U(o) : null, [o]);
|
|
45590
45912
|
return {
|
|
45591
45913
|
dateFormat: e,
|
|
45592
|
-
formatDate: i,
|
|
45593
|
-
parseDate:
|
|
45594
|
-
placeholder:
|
|
45595
|
-
weekStart:
|
|
45914
|
+
formatDate: C(() => (i) => e ? me(i, e.format) : "", [e]),
|
|
45915
|
+
parseDate: C(() => (i) => e ? se(i, e.format) : null, [e]),
|
|
45916
|
+
placeholder: e?.format ?? "",
|
|
45917
|
+
weekStart: e?.weekStart ?? 1
|
|
45596
45918
|
};
|
|
45597
45919
|
}
|
|
45598
45920
|
export {
|
|
45599
|
-
|
|
45921
|
+
ce as COUNTRIES,
|
|
45600
45922
|
H as CURRENCIES,
|
|
45601
|
-
|
|
45602
|
-
|
|
45603
|
-
|
|
45604
|
-
|
|
45605
|
-
|
|
45606
|
-
|
|
45607
|
-
|
|
45608
|
-
|
|
45609
|
-
|
|
45923
|
+
ne as DATE_FORMATS,
|
|
45924
|
+
de as DIVISIONS,
|
|
45925
|
+
ue as PHONE_FORMATS,
|
|
45926
|
+
ae as TIMEZONES,
|
|
45927
|
+
Ne as formatDateByCountry,
|
|
45928
|
+
me as formatDateWithPattern,
|
|
45929
|
+
Se as formatPhoneExample,
|
|
45930
|
+
we as formatPhoneNumber,
|
|
45931
|
+
ie as getAllCountries,
|
|
45610
45932
|
F as getAllCurrencies,
|
|
45611
|
-
|
|
45612
|
-
|
|
45933
|
+
ke as getAllDateFormats,
|
|
45934
|
+
ge as getAllLanguages,
|
|
45613
45935
|
V as getAllTimezones,
|
|
45614
45936
|
Y as getCountryByIso2,
|
|
45615
|
-
|
|
45616
|
-
|
|
45617
|
-
|
|
45618
|
-
|
|
45937
|
+
Pe as getCountryByIso3,
|
|
45938
|
+
Ye as getCountryByName,
|
|
45939
|
+
Re as getCurrencyByCode,
|
|
45940
|
+
ye as getCurrencyByCountry,
|
|
45619
45941
|
U as getDateFormatByCountry,
|
|
45620
|
-
|
|
45621
|
-
|
|
45942
|
+
le as getDivisionsByCountry,
|
|
45943
|
+
ve as getLanguageByCode,
|
|
45622
45944
|
j as getPhoneFormatByCountry,
|
|
45623
|
-
|
|
45945
|
+
re as getPhoneLengths,
|
|
45624
45946
|
B as getPhoneValidation,
|
|
45625
|
-
|
|
45626
|
-
|
|
45627
|
-
|
|
45628
|
-
|
|
45629
|
-
|
|
45630
|
-
|
|
45631
|
-
|
|
45632
|
-
|
|
45633
|
-
|
|
45634
|
-
|
|
45635
|
-
|
|
45636
|
-
|
|
45947
|
+
Ae as getPostalLabelByCountry,
|
|
45948
|
+
pe as getTaxLabelByCountry,
|
|
45949
|
+
ze as getTaxPlaceholderByCountry,
|
|
45950
|
+
Ue as getTimezoneByName,
|
|
45951
|
+
te as getTimezonesByCountry,
|
|
45952
|
+
De as iso2ToFlag,
|
|
45953
|
+
Le as parseDateByCountry,
|
|
45954
|
+
se as parseDateWithPattern,
|
|
45955
|
+
Ce as searchCountries,
|
|
45956
|
+
_e as searchCurrencies,
|
|
45957
|
+
Ee as searchLanguages,
|
|
45958
|
+
he as searchTimezones,
|
|
45637
45959
|
N as useBasePicker,
|
|
45638
45960
|
O as useCountry,
|
|
45639
|
-
|
|
45640
|
-
|
|
45641
|
-
|
|
45642
|
-
|
|
45643
|
-
|
|
45644
|
-
|
|
45645
|
-
|
|
45646
|
-
|
|
45647
|
-
|
|
45961
|
+
Be as useCountryPicker,
|
|
45962
|
+
Ie as useCurrencyPicker,
|
|
45963
|
+
Oe as useDateFormat,
|
|
45964
|
+
Ge as useDivisionPicker,
|
|
45965
|
+
Ke as useLanguagePicker,
|
|
45966
|
+
je as useMultiSelect,
|
|
45967
|
+
He as usePhoneInput,
|
|
45968
|
+
xe as useTimezonePicker,
|
|
45969
|
+
Te as validatePhoneNumber
|
|
45648
45970
|
};
|
|
45649
|
-
|
|
45971
|
+
|
|
45972
|
+
//# sourceMappingURL=index.mjs.map
|