intl-tel-input 25.12.6 → 25.13.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.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v25.12.6
2
+ * International Telephone Input v25.13.0
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -368,12 +368,18 @@ declare module "intl-tel-input" {
368
368
  private defaultCountry;
369
369
  private abortController;
370
370
  private dropdownAbortController;
371
+ private userNumeralSet;
371
372
  private resolveAutoCountryPromise;
372
373
  private rejectAutoCountryPromise;
373
374
  private resolveUtilsScriptPromise;
374
375
  private rejectUtilsScriptPromise;
375
376
  constructor(input: HTMLInputElement, customOptions?: SomeOptions);
376
377
  private static _getIsAndroid;
378
+ private _updateNumeralSet;
379
+ private _mapAsciiToUserNumerals;
380
+ private _normaliseNumerals;
381
+ private _getTelInputValue;
382
+ private _setTelInputValue;
377
383
  private _createInitPromises;
378
384
  _init(): void;
379
385
  private _processCountryData;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v25.12.6
2
+ * International Telephone Input v25.13.0
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -2931,6 +2931,45 @@ var factoryOutput = (() => {
2931
2931
  static _getIsAndroid() {
2932
2932
  return typeof navigator !== "undefined" ? /Android/i.test(navigator.userAgent) : false;
2933
2933
  }
2934
+ _updateNumeralSet(str) {
2935
+ if (/[\u0660-\u0669]/.test(str)) {
2936
+ this.userNumeralSet = "arabic-indic";
2937
+ } else if (/[\u06F0-\u06F9]/.test(str)) {
2938
+ this.userNumeralSet = "persian";
2939
+ } else {
2940
+ this.userNumeralSet = "ascii";
2941
+ }
2942
+ }
2943
+ _mapAsciiToUserNumerals(str) {
2944
+ if (!this.userNumeralSet) {
2945
+ this._updateNumeralSet(this.ui.telInput.value);
2946
+ }
2947
+ if (this.userNumeralSet === "ascii") {
2948
+ return str;
2949
+ }
2950
+ const base = this.userNumeralSet === "arabic-indic" ? 1632 : 1776;
2951
+ return str.replace(/[0-9]/g, (d) => String.fromCharCode(base + Number(d)));
2952
+ }
2953
+ // Normalize Eastern Arabic (U+0660-0669) and Persian/Extended Arabic-Indic (U+06F0-06F9) numerals to ASCII 0-9
2954
+ _normaliseNumerals(str) {
2955
+ if (!str) {
2956
+ return "";
2957
+ }
2958
+ this._updateNumeralSet(str);
2959
+ if (this.userNumeralSet === "ascii") {
2960
+ return str;
2961
+ }
2962
+ const base = this.userNumeralSet === "arabic-indic" ? 1632 : 1776;
2963
+ const regex = this.userNumeralSet === "arabic-indic" ? /[\u0660-\u0669]/g : /[\u06F0-\u06F9]/g;
2964
+ return str.replace(regex, (ch) => String.fromCharCode(48 + (ch.charCodeAt(0) - base)));
2965
+ }
2966
+ _getTelInputValue() {
2967
+ const inputValue = this.ui.telInput.value.trim();
2968
+ return this._normaliseNumerals(inputValue);
2969
+ }
2970
+ _setTelInputValue(asciiValue) {
2971
+ this.ui.telInput.value = this._mapAsciiToUserNumerals(asciiValue);
2972
+ }
2934
2973
  _createInitPromises() {
2935
2974
  const autoCountryPromise = new Promise((resolve, reject) => {
2936
2975
  this.resolveAutoCountryPromise = resolve;
@@ -2965,8 +3004,9 @@ var factoryOutput = (() => {
2965
3004
  //* 1. Extracting a dial code from the given number
2966
3005
  //* 2. Using explicit initialCountry
2967
3006
  _setInitialState(overrideAutoCountry = false) {
2968
- const attributeValue = this.ui.telInput.getAttribute("value");
2969
- const inputValue = this.ui.telInput.value;
3007
+ const attributeValueRaw = this.ui.telInput.getAttribute("value");
3008
+ const attributeValue = this._normaliseNumerals(attributeValueRaw);
3009
+ const inputValue = this._getTelInputValue();
2970
3010
  const useAttribute = attributeValue && attributeValue.startsWith("+") && (!inputValue || !inputValue.startsWith("+"));
2971
3011
  const val = useAttribute ? attributeValue : inputValue;
2972
3012
  const dialCode = this._getDialCode(val);
@@ -3137,35 +3177,34 @@ var factoryOutput = (() => {
3137
3177
  countrySearch
3138
3178
  } = this.options;
3139
3179
  let userOverrideFormatting = false;
3140
- if (REGEX.ALPHA_UNICODE.test(this.ui.telInput.value)) {
3180
+ if (REGEX.ALPHA_UNICODE.test(this._getTelInputValue())) {
3141
3181
  userOverrideFormatting = true;
3142
3182
  }
3143
3183
  const handleInputEvent = (e) => {
3184
+ const inputValue = this._getTelInputValue();
3144
3185
  if (this.isAndroid && e?.data === "+" && separateDialCode && allowDropdown && countrySearch) {
3145
3186
  const currentCaretPos = this.ui.telInput.selectionStart || 0;
3146
- const valueBeforeCaret = this.ui.telInput.value.substring(
3147
- 0,
3148
- currentCaretPos - 1
3149
- );
3150
- const valueAfterCaret = this.ui.telInput.value.substring(currentCaretPos);
3151
- this.ui.telInput.value = valueBeforeCaret + valueAfterCaret;
3187
+ const valueBeforeCaret = inputValue.substring(0, currentCaretPos - 1);
3188
+ const valueAfterCaret = inputValue.substring(currentCaretPos);
3189
+ this._setTelInputValue(valueBeforeCaret + valueAfterCaret);
3152
3190
  this._openDropdownWithPlus();
3153
3191
  return;
3154
3192
  }
3155
- if (this._updateCountryFromNumber(this.ui.telInput.value)) {
3193
+ if (this._updateCountryFromNumber(inputValue)) {
3156
3194
  this._triggerCountryChange();
3157
3195
  }
3158
3196
  const isFormattingChar = e?.data && REGEX.NON_PLUS_NUMERIC.test(e.data);
3159
- const isPaste = e?.inputType === INPUT_TYPES.PASTE && this.ui.telInput.value;
3197
+ const isPaste = e?.inputType === INPUT_TYPES.PASTE && inputValue;
3160
3198
  if (isFormattingChar || isPaste && !strictMode) {
3161
3199
  userOverrideFormatting = true;
3162
- } else if (!REGEX.NON_PLUS_NUMERIC.test(this.ui.telInput.value)) {
3200
+ } else if (!REGEX.NON_PLUS_NUMERIC.test(inputValue)) {
3163
3201
  userOverrideFormatting = false;
3164
3202
  }
3165
3203
  const isSetNumber = e?.detail && e.detail["isSetNumber"];
3166
- if (formatAsYouType && !userOverrideFormatting && !isSetNumber) {
3204
+ const isAscii = this.userNumeralSet === "ascii";
3205
+ if (formatAsYouType && !userOverrideFormatting && !isSetNumber && isAscii) {
3167
3206
  const currentCaretPos = this.ui.telInput.selectionStart || 0;
3168
- const valueBeforeCaret = this.ui.telInput.value.substring(
3207
+ const valueBeforeCaret = inputValue.substring(
3169
3208
  0,
3170
3209
  currentCaretPos
3171
3210
  );
@@ -3177,7 +3216,7 @@ var factoryOutput = (() => {
3177
3216
  const fullNumber = this._getFullNumber();
3178
3217
  const formattedValue = formatNumberAsYouType(
3179
3218
  fullNumber,
3180
- this.ui.telInput.value,
3219
+ inputValue,
3181
3220
  intlTelInput.utils,
3182
3221
  this.selectedCountryData,
3183
3222
  this.options.separateDialCode
@@ -3188,7 +3227,7 @@ var factoryOutput = (() => {
3188
3227
  currentCaretPos,
3189
3228
  isDeleteForwards
3190
3229
  );
3191
- this.ui.telInput.value = formattedValue;
3230
+ this._setTelInputValue(formattedValue);
3192
3231
  this.ui.telInput.setSelectionRange(newCaretPos, newCaretPos);
3193
3232
  }
3194
3233
  };
@@ -3211,12 +3250,18 @@ var factoryOutput = (() => {
3211
3250
  return;
3212
3251
  }
3213
3252
  if (strictMode) {
3214
- const value = this.ui.telInput.value;
3215
- const alreadyHasPlus = value.startsWith("+");
3253
+ const inputValue = this._getTelInputValue();
3254
+ const alreadyHasPlus = inputValue.startsWith("+");
3216
3255
  const isInitialPlus = !alreadyHasPlus && this.ui.telInput.selectionStart === 0 && e.key === "+";
3217
- const isNumeric = /^[0-9]$/.test(e.key);
3256
+ const normalisedKey = this._normaliseNumerals(e.key);
3257
+ const isNumeric = /^[0-9]$/.test(normalisedKey);
3218
3258
  const isAllowedChar = separateDialCode ? isNumeric : isInitialPlus || isNumeric;
3219
- const newValue = value.slice(0, this.ui.telInput.selectionStart) + e.key + value.slice(this.ui.telInput.selectionEnd);
3259
+ const input = this.ui.telInput;
3260
+ const selStart = input.selectionStart;
3261
+ const selEnd = input.selectionEnd;
3262
+ const before = inputValue.slice(0, selStart);
3263
+ const after = inputValue.slice(selEnd);
3264
+ const newValue = before + e.key + after;
3220
3265
  const newFullNumber = this._getFullNumber(newValue);
3221
3266
  const coreNumber = intlTelInput.utils.getCoreNumber(
3222
3267
  newFullNumber,
@@ -3243,34 +3288,38 @@ var factoryOutput = (() => {
3243
3288
  const input = this.ui.telInput;
3244
3289
  const selStart = input.selectionStart;
3245
3290
  const selEnd = input.selectionEnd;
3246
- const before = input.value.slice(0, selStart);
3247
- const after = input.value.slice(selEnd);
3291
+ const inputValue = this._getTelInputValue();
3292
+ const before = inputValue.slice(0, selStart);
3293
+ const after = inputValue.slice(selEnd);
3248
3294
  const iso2 = this.selectedCountryData.iso2;
3249
- const pasted = e.clipboardData.getData("text");
3295
+ const pastedRaw = e.clipboardData.getData("text");
3296
+ const pasted = this._normaliseNumerals(pastedRaw);
3250
3297
  const initialCharSelected = selStart === 0 && selEnd > 0;
3251
- const allowLeadingPlus = !input.value.startsWith("+") || initialCharSelected;
3298
+ const allowLeadingPlus = !inputValue.startsWith("+") || initialCharSelected;
3252
3299
  const allowedChars = pasted.replace(REGEX.NON_PLUS_NUMERIC_GLOBAL, "");
3253
3300
  const hasLeadingPlus = allowedChars.startsWith("+");
3254
3301
  const numerics = allowedChars.replace(/\+/g, "");
3255
3302
  const sanitised = hasLeadingPlus && allowLeadingPlus ? `+${numerics}` : numerics;
3256
3303
  let newVal = before + sanitised + after;
3257
- let coreNumber = intlTelInput.utils.getCoreNumber(newVal, iso2);
3258
- while (coreNumber.length === 0 && newVal.length > 0) {
3259
- newVal = newVal.slice(0, -1);
3260
- coreNumber = intlTelInput.utils.getCoreNumber(newVal, iso2);
3261
- }
3262
- if (!coreNumber) {
3263
- return;
3264
- }
3265
- if (this.maxCoreNumberLength && coreNumber.length > this.maxCoreNumberLength) {
3266
- if (input.selectionEnd === input.value.length) {
3267
- const trimLength = coreNumber.length - this.maxCoreNumberLength;
3268
- newVal = newVal.slice(0, newVal.length - trimLength);
3269
- } else {
3304
+ if (newVal.length > 5) {
3305
+ let coreNumber = intlTelInput.utils.getCoreNumber(newVal, iso2);
3306
+ while (coreNumber.length === 0 && newVal.length > 0) {
3307
+ newVal = newVal.slice(0, -1);
3308
+ coreNumber = intlTelInput.utils.getCoreNumber(newVal, iso2);
3309
+ }
3310
+ if (!coreNumber) {
3270
3311
  return;
3271
3312
  }
3313
+ if (this.maxCoreNumberLength && coreNumber.length > this.maxCoreNumberLength) {
3314
+ if (input.selectionEnd === inputValue.length) {
3315
+ const trimLength = coreNumber.length - this.maxCoreNumberLength;
3316
+ newVal = newVal.slice(0, newVal.length - trimLength);
3317
+ } else {
3318
+ return;
3319
+ }
3320
+ }
3272
3321
  }
3273
- input.value = newVal;
3322
+ this._setTelInputValue(newVal);
3274
3323
  const caretPos = selStart + sanitised.length;
3275
3324
  input.setSelectionRange(caretPos, caretPos);
3276
3325
  input.dispatchEvent(new InputEvent("input", { bubbles: true }));
@@ -3522,7 +3571,7 @@ var factoryOutput = (() => {
3522
3571
  );
3523
3572
  }
3524
3573
  number = this._beforeSetNumber(number);
3525
- this.ui.telInput.value = number;
3574
+ this._setTelInputValue(number);
3526
3575
  }
3527
3576
  //* Check if need to select a new country based on the given number
3528
3577
  //* Note: called from _setInitialState, keyup handler, setNumber.
@@ -3696,7 +3745,8 @@ var factoryOutput = (() => {
3696
3745
  const dialCode = listItem.dataset[DATA_KEYS.DIAL_CODE];
3697
3746
  this._updateDialCode(dialCode);
3698
3747
  if (this.options.formatOnDisplay) {
3699
- this._updateValFromNumber(this.ui.telInput.value);
3748
+ const inputValue = this._getTelInputValue();
3749
+ this._updateValFromNumber(inputValue);
3700
3750
  }
3701
3751
  this.ui.telInput.focus();
3702
3752
  if (countryChanged) {
@@ -3727,7 +3777,7 @@ var factoryOutput = (() => {
3727
3777
  //* Replace any existing dial code with the new one
3728
3778
  //* Note: called from _selectListItem and setCountry
3729
3779
  _updateDialCode(newDialCodeBare) {
3730
- const inputVal = this.ui.telInput.value;
3780
+ const inputVal = this._getTelInputValue();
3731
3781
  const newDialCode = `+${newDialCodeBare}`;
3732
3782
  let newNumber;
3733
3783
  if (inputVal.startsWith("+")) {
@@ -3737,7 +3787,7 @@ var factoryOutput = (() => {
3737
3787
  } else {
3738
3788
  newNumber = newDialCode;
3739
3789
  }
3740
- this.ui.telInput.value = newNumber;
3790
+ this._setTelInputValue(newNumber);
3741
3791
  }
3742
3792
  }
3743
3793
  //* Try and extract a valid international dial code from a full telephone number.
@@ -3774,7 +3824,7 @@ var factoryOutput = (() => {
3774
3824
  }
3775
3825
  //* Get the input val, adding the dial code if separateDialCode is enabled.
3776
3826
  _getFullNumber(overrideVal) {
3777
- const val = overrideVal || this.ui.telInput.value.trim();
3827
+ const val = overrideVal ? this._normaliseNumerals(overrideVal) : this._getTelInputValue();
3778
3828
  const { dialCode } = this.selectedCountryData;
3779
3829
  let prefix;
3780
3830
  const numericVal = getNumeric(val);
@@ -3817,8 +3867,9 @@ var factoryOutput = (() => {
3817
3867
  //* This is called when the utils request completes.
3818
3868
  handleUtils() {
3819
3869
  if (intlTelInput.utils) {
3820
- if (this.ui.telInput.value) {
3821
- this._updateValFromNumber(this.ui.telInput.value);
3870
+ const inputValue = this._getTelInputValue();
3871
+ if (inputValue) {
3872
+ this._updateValFromNumber(inputValue);
3822
3873
  }
3823
3874
  if (this.selectedCountryData.iso2) {
3824
3875
  this._updatePlaceholder();
@@ -3861,11 +3912,13 @@ var factoryOutput = (() => {
3861
3912
  getNumber(format) {
3862
3913
  if (intlTelInput.utils) {
3863
3914
  const { iso2 } = this.selectedCountryData;
3864
- return intlTelInput.utils.formatNumber(
3865
- this._getFullNumber(),
3915
+ const fullNumber = this._getFullNumber();
3916
+ const formattedNumber = intlTelInput.utils.formatNumber(
3917
+ fullNumber,
3866
3918
  iso2,
3867
3919
  format
3868
3920
  );
3921
+ return this._mapAsciiToUserNumerals(formattedNumber);
3869
3922
  }
3870
3923
  return "";
3871
3924
  }
@@ -3953,15 +4006,17 @@ var factoryOutput = (() => {
3953
4006
  this._setCountry(iso2Lower);
3954
4007
  this._updateDialCode(this.selectedCountryData.dialCode);
3955
4008
  if (this.options.formatOnDisplay) {
3956
- this._updateValFromNumber(this.ui.telInput.value);
4009
+ const inputValue = this._getTelInputValue();
4010
+ this._updateValFromNumber(inputValue);
3957
4011
  }
3958
4012
  this._triggerCountryChange();
3959
4013
  }
3960
4014
  }
3961
4015
  //* Set the input value and update the country.
3962
4016
  setNumber(number) {
3963
- const countryChanged = this._updateCountryFromNumber(number);
3964
- this._updateValFromNumber(number);
4017
+ const normalisedNumber = this._normaliseNumerals(number);
4018
+ const countryChanged = this._updateCountryFromNumber(normalisedNumber);
4019
+ this._updateValFromNumber(normalisedNumber);
3965
4020
  if (countryChanged) {
3966
4021
  this._triggerCountryChange();
3967
4022
  }
@@ -4046,7 +4101,7 @@ var factoryOutput = (() => {
4046
4101
  attachUtils,
4047
4102
  startedLoadingUtilsScript: false,
4048
4103
  startedLoadingAutoCountry: false,
4049
- version: "25.12.6"
4104
+ version: "25.13.0"
4050
4105
  }
4051
4106
  );
4052
4107
  var intl_tel_input_default = intlTelInput;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v25.12.6
2
+ * International Telephone Input v25.13.0
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -13,18 +13,18 @@
13
13
  }
14
14
  }(() => {
15
15
 
16
- var factoryOutput=(()=>{var U=Object.defineProperty;var ht=Object.getOwnPropertyDescriptor;var pt=Object.getOwnPropertyNames;var Ct=Object.prototype.hasOwnProperty;var mt=(r,t)=>{for(var e in t)U(r,e,{get:t[e],enumerable:!0})},yt=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of pt(t))!Ct.call(r,n)&&n!==e&&U(r,n,{get:()=>t[n],enumerable:!(i=ht(t,n))||i.enumerable});return r};var ft=r=>yt(U({},"__esModule",{value:!0}),r);var At={};mt(At,{Iti:()=>k,default:()=>wt});var gt=[["af","93",0,null,"0"],["ax","358",1,["18","4"],"0"],["al","355",0,null,"0"],["dz","213",0,null,"0"],["as","1",5,["684"],"1"],["ad","376"],["ao","244"],["ai","1",6,["264"],"1"],["ag","1",7,["268"],"1"],["ar","54",0,null,"0"],["am","374",0,null,"0"],["aw","297"],["ac","247"],["au","61",0,["4"],"0"],["at","43",0,null,"0"],["az","994",0,null,"0"],["bs","1",8,["242"],"1"],["bh","973"],["bd","880",0,null,"0"],["bb","1",9,["246"],"1"],["by","375",0,null,"8"],["be","32",0,null,"0"],["bz","501"],["bj","229"],["bm","1",10,["441"],"1"],["bt","975"],["bo","591",0,null,"0"],["ba","387",0,null,"0"],["bw","267"],["br","55",0,null,"0"],["io","246"],["vg","1",11,["284"],"1"],["bn","673"],["bg","359",0,null,"0"],["bf","226"],["bi","257"],["kh","855",0,null,"0"],["cm","237"],["ca","1",1,["204","226","236","249","250","257","263","289","306","343","354","365","367","368","382","403","416","418","428","431","437","438","450","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905","942"],"1"],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"],"1"],["cf","236"],["td","235"],["cl","56"],["cn","86",0,null,"0"],["cx","61",2,["4","89164"],"0"],["cc","61",1,["4","89162"],"0"],["co","57",0,null,"0"],["km","269"],["cg","242"],["cd","243",0,null,"0"],["ck","682"],["cr","506"],["ci","225"],["hr","385",0,null,"0"],["cu","53",0,null,"0"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"],"1"],["do","1",2,["809","829","849"],"1"],["ec","593",0,null,"0"],["eg","20",0,null,"0"],["sv","503"],["gq","240"],["er","291",0,null,"0"],["ee","372"],["sz","268"],["et","251",0,null,"0"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0,["4"],"0"],["fr","33",0,null,"0"],["gf","594",0,null,"0"],["pf","689"],["ga","241"],["gm","220"],["ge","995",0,null,"0"],["de","49",0,null,"0"],["gh","233",0,null,"0"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"],"1"],["gp","590",0,null,"0"],["gu","1",15,["671"],"1"],["gt","502"],["gg","44",1,["1481","7781","7839","7911"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36",0,null,"06"],["is","354"],["in","91",0,null,"0"],["id","62",0,null,"0"],["ir","98",0,null,"0"],["iq","964",0,null,"0"],["ie","353",0,null,"0"],["im","44",2,["1624","74576","7524","7624","7924"],"0"],["il","972",0,null,"0"],["it","39",0,["3"]],["jm","1",4,["658","876"],"1"],["jp","81",0,null,"0"],["je","44",3,["1534","7509","7700","7797","7829","7937"],"0"],["jo","962",0,null,"0"],["kz","7",1,["33","7"],"8"],["ke","254",0,null,"0"],["ki","686",0,null,"0"],["xk","383",0,null,"0"],["kw","965"],["kg","996",0,null,"0"],["la","856",0,null,"0"],["lv","371"],["lb","961",0,null,"0"],["ls","266"],["lr","231",0,null,"0"],["ly","218",0,null,"0"],["li","423",0,null,"0"],["lt","370",0,null,"0"],["lu","352"],["mo","853"],["mg","261",0,null,"0"],["mw","265",0,null,"0"],["my","60",0,null,"0"],["mv","960"],["ml","223"],["mt","356"],["mh","692",0,null,"1"],["mq","596",0,null,"0"],["mr","222"],["mu","230"],["yt","262",1,["269","639"],"0"],["mx","52"],["fm","691"],["md","373",0,null,"0"],["mc","377",0,null,"0"],["mn","976",0,null,"0"],["me","382",0,null,"0"],["ms","1",16,["664"],"1"],["ma","212",0,["6","7"],"0"],["mz","258"],["mm","95",0,null,"0"],["na","264",0,null,"0"],["nr","674"],["np","977",0,null,"0"],["nl","31",0,null,"0"],["nc","687"],["nz","64",0,null,"0"],["ni","505"],["ne","227"],["ng","234",0,null,"0"],["nu","683"],["nf","672"],["kp","850",0,null,"0"],["mk","389",0,null,"0"],["mp","1",17,["670"],"1"],["no","47",0,["4","9"]],["om","968"],["pk","92",0,null,"0"],["pw","680"],["ps","970",0,null,"0"],["pa","507"],["pg","675"],["py","595",0,null,"0"],["pe","51",0,null,"0"],["ph","63",0,null,"0"],["pl","48"],["pt","351"],["pr","1",3,["787","939"],"1"],["qa","974"],["re","262",0,null,"0"],["ro","40",0,null,"0"],["ru","7",0,["33"],"8"],["rw","250",0,null,"0"],["ws","685"],["sm","378"],["st","239"],["sa","966",0,null,"0"],["sn","221"],["rs","381",0,null,"0"],["sc","248"],["sl","232",0,null,"0"],["sg","65"],["sx","1",21,["721"],"1"],["sk","421",0,null,"0"],["si","386",0,null,"0"],["sb","677"],["so","252",0,null,"0"],["za","27",0,null,"0"],["kr","82",0,null,"0"],["ss","211",0,null,"0"],["es","34"],["lk","94",0,null,"0"],["bl","590",1,null,"0"],["sh","290"],["kn","1",18,["869"],"1"],["lc","1",19,["758"],"1"],["mf","590",2,null,"0"],["pm","508",0,null,"0"],["vc","1",20,["784"],"1"],["sd","249",0,null,"0"],["sr","597"],["sj","47",1,["4","79","9"]],["se","46",0,null,"0"],["ch","41",0,null,"0"],["sy","963",0,null,"0"],["tw","886",0,null,"0"],["tj","992"],["tz","255",0,null,"0"],["th","66",0,null,"0"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"],"1"],["tn","216"],["tr","90",0,null,"0"],["tm","993",0,null,"8"],["tc","1",23,["649"],"1"],["tv","688"],["vi","1",24,["340"],"1"],["ug","256",0,null,"0"],["ua","380",0,null,"0"],["ae","971",0,null,"0"],["gb","44",0,null,"0"],["us","1",0,null,"1"],["uy","598",0,null,"0"],["uz","998"],["vu","678"],["va","39",1,["06698","3"]],["ve","58",0,null,"0"],["vn","84",0,null,"0"],["wf","681"],["eh","212",1,["5288","5289","6","7"],"0"],["ye","967",0,null,"0"],["zm","260",0,null,"0"],["zw","263",0,null,"0"]],j=[];for(let r of gt)j.push({name:"",iso2:r[0],dialCode:r[1],priority:r[2]||0,areaCodes:r[3]||null,nodeById:{},nationalPrefix:r[4]||null,normalisedName:"",initials:"",dialCodePlus:""});var L=j;var It={ad:"Andorra",ae:"United Arab Emirates",af:"Afghanistan",ag:"Antigua & Barbuda",ai:"Anguilla",al:"Albania",am:"Armenia",ao:"Angola",ar:"Argentina",as:"American Samoa",at:"Austria",au:"Australia",aw:"Aruba",ax:"\xC5land Islands",az:"Azerbaijan",ba:"Bosnia & Herzegovina",bb:"Barbados",bd:"Bangladesh",be:"Belgium",bf:"Burkina Faso",bg:"Bulgaria",bh:"Bahrain",bi:"Burundi",bj:"Benin",bl:"St. Barth\xE9lemy",bm:"Bermuda",bn:"Brunei",bo:"Bolivia",bq:"Caribbean Netherlands",br:"Brazil",bs:"Bahamas",bt:"Bhutan",bw:"Botswana",by:"Belarus",bz:"Belize",ca:"Canada",cc:"Cocos (Keeling) Islands",cd:"Congo - Kinshasa",cf:"Central African Republic",cg:"Congo - Brazzaville",ch:"Switzerland",ci:"C\xF4te d\u2019Ivoire",ck:"Cook Islands",cl:"Chile",cm:"Cameroon",cn:"China",co:"Colombia",cr:"Costa Rica",cu:"Cuba",cv:"Cape Verde",cw:"Cura\xE7ao",cx:"Christmas Island",cy:"Cyprus",cz:"Czechia",de:"Germany",dj:"Djibouti",dk:"Denmark",dm:"Dominica",do:"Dominican Republic",dz:"Algeria",ec:"Ecuador",ee:"Estonia",eg:"Egypt",eh:"Western Sahara",er:"Eritrea",es:"Spain",et:"Ethiopia",fi:"Finland",fj:"Fiji",fk:"Falkland Islands",fm:"Micronesia",fo:"Faroe Islands",fr:"France",ga:"Gabon",gb:"United Kingdom",gd:"Grenada",ge:"Georgia",gf:"French Guiana",gg:"Guernsey",gh:"Ghana",gi:"Gibraltar",gl:"Greenland",gm:"Gambia",gn:"Guinea",gp:"Guadeloupe",gq:"Equatorial Guinea",gr:"Greece",gt:"Guatemala",gu:"Guam",gw:"Guinea-Bissau",gy:"Guyana",hk:"Hong Kong SAR China",hn:"Honduras",hr:"Croatia",ht:"Haiti",hu:"Hungary",id:"Indonesia",ie:"Ireland",il:"Israel",im:"Isle of Man",in:"India",io:"British Indian Ocean Territory",iq:"Iraq",ir:"Iran",is:"Iceland",it:"Italy",je:"Jersey",jm:"Jamaica",jo:"Jordan",jp:"Japan",ke:"Kenya",kg:"Kyrgyzstan",kh:"Cambodia",ki:"Kiribati",km:"Comoros",kn:"St. Kitts & Nevis",kp:"North Korea",kr:"South Korea",kw:"Kuwait",ky:"Cayman Islands",kz:"Kazakhstan",la:"Laos",lb:"Lebanon",lc:"St. Lucia",li:"Liechtenstein",lk:"Sri Lanka",lr:"Liberia",ls:"Lesotho",lt:"Lithuania",lu:"Luxembourg",lv:"Latvia",ly:"Libya",ma:"Morocco",mc:"Monaco",md:"Moldova",me:"Montenegro",mf:"St. Martin",mg:"Madagascar",mh:"Marshall Islands",mk:"North Macedonia",ml:"Mali",mm:"Myanmar (Burma)",mn:"Mongolia",mo:"Macao SAR China",mp:"Northern Mariana Islands",mq:"Martinique",mr:"Mauritania",ms:"Montserrat",mt:"Malta",mu:"Mauritius",mv:"Maldives",mw:"Malawi",mx:"Mexico",my:"Malaysia",mz:"Mozambique",na:"Namibia",nc:"New Caledonia",ne:"Niger",nf:"Norfolk Island",ng:"Nigeria",ni:"Nicaragua",nl:"Netherlands",no:"Norway",np:"Nepal",nr:"Nauru",nu:"Niue",nz:"New Zealand",om:"Oman",pa:"Panama",pe:"Peru",pf:"French Polynesia",pg:"Papua New Guinea",ph:"Philippines",pk:"Pakistan",pl:"Poland",pm:"St. Pierre & Miquelon",pr:"Puerto Rico",ps:"Palestinian Territories",pt:"Portugal",pw:"Palau",py:"Paraguay",qa:"Qatar",re:"R\xE9union",ro:"Romania",rs:"Serbia",ru:"Russia",rw:"Rwanda",sa:"Saudi Arabia",sb:"Solomon Islands",sc:"Seychelles",sd:"Sudan",se:"Sweden",sg:"Singapore",sh:"St. Helena",si:"Slovenia",sj:"Svalbard & Jan Mayen",sk:"Slovakia",sl:"Sierra Leone",sm:"San Marino",sn:"Senegal",so:"Somalia",sr:"Suriname",ss:"South Sudan",st:"S\xE3o Tom\xE9 & Pr\xEDncipe",sv:"El Salvador",sx:"Sint Maarten",sy:"Syria",sz:"Eswatini",tc:"Turks & Caicos Islands",td:"Chad",tg:"Togo",th:"Thailand",tj:"Tajikistan",tk:"Tokelau",tl:"Timor-Leste",tm:"Turkmenistan",tn:"Tunisia",to:"Tonga",tr:"Turkey",tt:"Trinidad & Tobago",tv:"Tuvalu",tw:"Taiwan",tz:"Tanzania",ua:"Ukraine",ug:"Uganda",us:"United States",uy:"Uruguay",uz:"Uzbekistan",va:"Vatican City",vc:"St. Vincent & Grenadines",ve:"Venezuela",vg:"British Virgin Islands",vi:"U.S. Virgin Islands",vn:"Vietnam",vu:"Vanuatu",wf:"Wallis & Futuna",ws:"Samoa",ye:"Yemen",yt:"Mayotte",za:"South Africa",zm:"Zambia",zw:"Zimbabwe"},Y=It;var bt={selectedCountryAriaLabel:"Change country, selected ${countryName} (${dialCode})",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",zeroSearchResults:"No results found",oneSearchResult:"1 result found",multipleSearchResults:"${count} results found",ac:"Ascension Island",xk:"Kosovo"},q=bt;var vt={...Y,...q},B=vt;var w={OPEN_COUNTRY_DROPDOWN:"open:countrydropdown",CLOSE_COUNTRY_DROPDOWN:"close:countrydropdown",COUNTRY_CHANGE:"countrychange",INPUT:"input"},h={HIDE:"iti__hide",V_HIDE:"iti__v-hide",ARROW_UP:"iti__arrow--up",GLOBE:"iti__globe",FLAG:"iti__flag",COUNTRY_ITEM:"iti__country",HIGHLIGHT:"iti__highlight"},y={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",SPACE:" ",ENTER:"Enter",ESC:"Escape",TAB:"Tab"},W={PASTE:"insertFromPaste",DELETE_FWD:"deleteContentForward"},D={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},X={SEARCH_DEBOUNCE_MS:100,HIDDEN_SEARCH_RESET_MS:1e3,NEXT_TICK:0},F={UNKNOWN_NUMBER_TYPE:-99,UNKNOWN_VALIDATION_ERROR:-99},P={SANE_SELECTED_WITH_DIAL_WIDTH:78,SANE_SELECTED_NO_DIAL_WIDTH:42,INPUT_PADDING_EXTRA_LEFT:6},M={PLUS:"+",NANP:"1"},O={ISO2:"gb",DIAL_CODE:"44",MOBILE_PREFIX:"7",MOBILE_CORE_LENGTH:10},J={ISO2:"us",DIAL_CODE:"1"},A={AGGRESSIVE:"aggressive",POLITE:"polite",OFF:"off"},x={AUTO:"auto"},$={COUNTRY_CODE:"countryCode",DIAL_CODE:"dialCode"},p={EXPANDED:"aria-expanded",LABEL:"aria-label",SELECTED:"aria-selected",ACTIVE_DESCENDANT:"aria-activedescendant",HASPOPUP:"aria-haspopup",CONTROLS:"aria-controls",HIDDEN:"aria-hidden",AUTOCOMPLETE:"aria-autocomplete",MODAL:"aria-modal"};var G=r=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(r).matches,Et=()=>{if(typeof navigator<"u"&&typeof window<"u"){let r=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),t=G("(max-width: 500px)"),e=G("(max-height: 600px)"),i=G("(pointer: coarse)");return r||t||i&&e}return!1},K={allowPhonewords:!1,allowDropdown:!0,autoPlaceholder:A.POLITE,containerClass:"",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",showFlags:!0,separateDialCode:!1,strictMode:!1,useFullscreenPopup:Et(),validationNumberTypes:["MOBILE"]},Q=(r,t)=>{r.useFullscreenPopup&&(r.fixDropdownWidth=!1),r.onlyCountries.length===1&&(r.initialCountry=r.onlyCountries[0]),r.separateDialCode&&(r.nationalMode=!1),r.allowDropdown&&!r.showFlags&&!r.separateDialCode&&(r.nationalMode=!1),r.useFullscreenPopup&&!r.dropdownContainer&&(r.dropdownContainer=document.body),r.i18n={...t,...r.i18n}};var N=r=>r.replace(/\D/g,""),R=(r="")=>r.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var Z=(r,t)=>{let e=R(t),i=[],n=[],o=[],s=[],a=[],l=[];for(let c of r)c.iso2===e?i.push(c):c.normalisedName.startsWith(e)?n.push(c):c.normalisedName.includes(e)?o.push(c):e===c.dialCode||e===c.dialCodePlus?s.push(c):c.dialCodePlus.includes(e)?a.push(c):c.initials.includes(e)&&l.push(c);let d=(c,m)=>c.priority-m.priority;return[...i.sort(d),...n.sort(d),...o.sort(d),...s.sort(d),...a.sort(d),...l.sort(d)]},tt=(r,t)=>{let e=t.toLowerCase();for(let i of r)if(i.name.toLowerCase().startsWith(e))return i;return null};var H=r=>Object.keys(r).filter(t=>!!r[t]).join(" "),C=(r,t,e)=>{let i=document.createElement(r);return t&&Object.entries(t).forEach(([n,o])=>i.setAttribute(n,o)),e&&e.appendChild(i),i};var et=()=>`
16
+ var factoryOutput=(()=>{var F=Object.defineProperty;var Ct=Object.getOwnPropertyDescriptor;var yt=Object.getOwnPropertyNames;var ft=Object.prototype.hasOwnProperty;var gt=(r,t)=>{for(var e in t)F(r,e,{get:t[e],enumerable:!0})},It=(r,t,e,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of yt(t))!ft.call(r,n)&&n!==e&&F(r,n,{get:()=>t[n],enumerable:!(i=Ct(t,n))||i.enumerable});return r};var bt=r=>It(F({},"__esModule",{value:!0}),r);var Pt={};gt(Pt,{Iti:()=>B,default:()=>St});var _t=[["af","93",0,null,"0"],["ax","358",1,["18","4"],"0"],["al","355",0,null,"0"],["dz","213",0,null,"0"],["as","1",5,["684"],"1"],["ad","376"],["ao","244"],["ai","1",6,["264"],"1"],["ag","1",7,["268"],"1"],["ar","54",0,null,"0"],["am","374",0,null,"0"],["aw","297"],["ac","247"],["au","61",0,["4"],"0"],["at","43",0,null,"0"],["az","994",0,null,"0"],["bs","1",8,["242"],"1"],["bh","973"],["bd","880",0,null,"0"],["bb","1",9,["246"],"1"],["by","375",0,null,"8"],["be","32",0,null,"0"],["bz","501"],["bj","229"],["bm","1",10,["441"],"1"],["bt","975"],["bo","591",0,null,"0"],["ba","387",0,null,"0"],["bw","267"],["br","55",0,null,"0"],["io","246"],["vg","1",11,["284"],"1"],["bn","673"],["bg","359",0,null,"0"],["bf","226"],["bi","257"],["kh","855",0,null,"0"],["cm","237"],["ca","1",1,["204","226","236","249","250","257","263","289","306","343","354","365","367","368","382","403","416","418","428","431","437","438","450","468","474","506","514","519","548","579","581","584","587","604","613","639","647","672","683","705","709","742","753","778","780","782","807","819","825","867","873","879","902","905","942"],"1"],["cv","238"],["bq","599",1,["3","4","7"]],["ky","1",12,["345"],"1"],["cf","236"],["td","235"],["cl","56"],["cn","86",0,null,"0"],["cx","61",2,["4","89164"],"0"],["cc","61",1,["4","89162"],"0"],["co","57",0,null,"0"],["km","269"],["cg","242"],["cd","243",0,null,"0"],["ck","682"],["cr","506"],["ci","225"],["hr","385",0,null,"0"],["cu","53",0,null,"0"],["cw","599",0],["cy","357"],["cz","420"],["dk","45"],["dj","253"],["dm","1",13,["767"],"1"],["do","1",2,["809","829","849"],"1"],["ec","593",0,null,"0"],["eg","20",0,null,"0"],["sv","503"],["gq","240"],["er","291",0,null,"0"],["ee","372"],["sz","268"],["et","251",0,null,"0"],["fk","500"],["fo","298"],["fj","679"],["fi","358",0,["4"],"0"],["fr","33",0,null,"0"],["gf","594",0,null,"0"],["pf","689"],["ga","241"],["gm","220"],["ge","995",0,null,"0"],["de","49",0,null,"0"],["gh","233",0,null,"0"],["gi","350"],["gr","30"],["gl","299"],["gd","1",14,["473"],"1"],["gp","590",0,null,"0"],["gu","1",15,["671"],"1"],["gt","502"],["gg","44",1,["1481","7781","7839","7911"],"0"],["gn","224"],["gw","245"],["gy","592"],["ht","509"],["hn","504"],["hk","852"],["hu","36",0,null,"06"],["is","354"],["in","91",0,null,"0"],["id","62",0,null,"0"],["ir","98",0,null,"0"],["iq","964",0,null,"0"],["ie","353",0,null,"0"],["im","44",2,["1624","74576","7524","7624","7924"],"0"],["il","972",0,null,"0"],["it","39",0,["3"]],["jm","1",4,["658","876"],"1"],["jp","81",0,null,"0"],["je","44",3,["1534","7509","7700","7797","7829","7937"],"0"],["jo","962",0,null,"0"],["kz","7",1,["33","7"],"8"],["ke","254",0,null,"0"],["ki","686",0,null,"0"],["xk","383",0,null,"0"],["kw","965"],["kg","996",0,null,"0"],["la","856",0,null,"0"],["lv","371"],["lb","961",0,null,"0"],["ls","266"],["lr","231",0,null,"0"],["ly","218",0,null,"0"],["li","423",0,null,"0"],["lt","370",0,null,"0"],["lu","352"],["mo","853"],["mg","261",0,null,"0"],["mw","265",0,null,"0"],["my","60",0,null,"0"],["mv","960"],["ml","223"],["mt","356"],["mh","692",0,null,"1"],["mq","596",0,null,"0"],["mr","222"],["mu","230"],["yt","262",1,["269","639"],"0"],["mx","52"],["fm","691"],["md","373",0,null,"0"],["mc","377",0,null,"0"],["mn","976",0,null,"0"],["me","382",0,null,"0"],["ms","1",16,["664"],"1"],["ma","212",0,["6","7"],"0"],["mz","258"],["mm","95",0,null,"0"],["na","264",0,null,"0"],["nr","674"],["np","977",0,null,"0"],["nl","31",0,null,"0"],["nc","687"],["nz","64",0,null,"0"],["ni","505"],["ne","227"],["ng","234",0,null,"0"],["nu","683"],["nf","672"],["kp","850",0,null,"0"],["mk","389",0,null,"0"],["mp","1",17,["670"],"1"],["no","47",0,["4","9"]],["om","968"],["pk","92",0,null,"0"],["pw","680"],["ps","970",0,null,"0"],["pa","507"],["pg","675"],["py","595",0,null,"0"],["pe","51",0,null,"0"],["ph","63",0,null,"0"],["pl","48"],["pt","351"],["pr","1",3,["787","939"],"1"],["qa","974"],["re","262",0,null,"0"],["ro","40",0,null,"0"],["ru","7",0,["33"],"8"],["rw","250",0,null,"0"],["ws","685"],["sm","378"],["st","239"],["sa","966",0,null,"0"],["sn","221"],["rs","381",0,null,"0"],["sc","248"],["sl","232",0,null,"0"],["sg","65"],["sx","1",21,["721"],"1"],["sk","421",0,null,"0"],["si","386",0,null,"0"],["sb","677"],["so","252",0,null,"0"],["za","27",0,null,"0"],["kr","82",0,null,"0"],["ss","211",0,null,"0"],["es","34"],["lk","94",0,null,"0"],["bl","590",1,null,"0"],["sh","290"],["kn","1",18,["869"],"1"],["lc","1",19,["758"],"1"],["mf","590",2,null,"0"],["pm","508",0,null,"0"],["vc","1",20,["784"],"1"],["sd","249",0,null,"0"],["sr","597"],["sj","47",1,["4","79","9"]],["se","46",0,null,"0"],["ch","41",0,null,"0"],["sy","963",0,null,"0"],["tw","886",0,null,"0"],["tj","992"],["tz","255",0,null,"0"],["th","66",0,null,"0"],["tl","670"],["tg","228"],["tk","690"],["to","676"],["tt","1",22,["868"],"1"],["tn","216"],["tr","90",0,null,"0"],["tm","993",0,null,"8"],["tc","1",23,["649"],"1"],["tv","688"],["vi","1",24,["340"],"1"],["ug","256",0,null,"0"],["ua","380",0,null,"0"],["ae","971",0,null,"0"],["gb","44",0,null,"0"],["us","1",0,null,"1"],["uy","598",0,null,"0"],["uz","998"],["vu","678"],["va","39",1,["06698","3"]],["ve","58",0,null,"0"],["vn","84",0,null,"0"],["wf","681"],["eh","212",1,["5288","5289","6","7"],"0"],["ye","967",0,null,"0"],["zm","260",0,null,"0"],["zw","263",0,null,"0"]],X=[];for(let r of _t)X.push({name:"",iso2:r[0],dialCode:r[1],priority:r[2]||0,areaCodes:r[3]||null,nodeById:{},nationalPrefix:r[4]||null,normalisedName:"",initials:"",dialCodePlus:""});var N=X;var Et={ad:"Andorra",ae:"United Arab Emirates",af:"Afghanistan",ag:"Antigua & Barbuda",ai:"Anguilla",al:"Albania",am:"Armenia",ao:"Angola",ar:"Argentina",as:"American Samoa",at:"Austria",au:"Australia",aw:"Aruba",ax:"\xC5land Islands",az:"Azerbaijan",ba:"Bosnia & Herzegovina",bb:"Barbados",bd:"Bangladesh",be:"Belgium",bf:"Burkina Faso",bg:"Bulgaria",bh:"Bahrain",bi:"Burundi",bj:"Benin",bl:"St. Barth\xE9lemy",bm:"Bermuda",bn:"Brunei",bo:"Bolivia",bq:"Caribbean Netherlands",br:"Brazil",bs:"Bahamas",bt:"Bhutan",bw:"Botswana",by:"Belarus",bz:"Belize",ca:"Canada",cc:"Cocos (Keeling) Islands",cd:"Congo - Kinshasa",cf:"Central African Republic",cg:"Congo - Brazzaville",ch:"Switzerland",ci:"C\xF4te d\u2019Ivoire",ck:"Cook Islands",cl:"Chile",cm:"Cameroon",cn:"China",co:"Colombia",cr:"Costa Rica",cu:"Cuba",cv:"Cape Verde",cw:"Cura\xE7ao",cx:"Christmas Island",cy:"Cyprus",cz:"Czechia",de:"Germany",dj:"Djibouti",dk:"Denmark",dm:"Dominica",do:"Dominican Republic",dz:"Algeria",ec:"Ecuador",ee:"Estonia",eg:"Egypt",eh:"Western Sahara",er:"Eritrea",es:"Spain",et:"Ethiopia",fi:"Finland",fj:"Fiji",fk:"Falkland Islands",fm:"Micronesia",fo:"Faroe Islands",fr:"France",ga:"Gabon",gb:"United Kingdom",gd:"Grenada",ge:"Georgia",gf:"French Guiana",gg:"Guernsey",gh:"Ghana",gi:"Gibraltar",gl:"Greenland",gm:"Gambia",gn:"Guinea",gp:"Guadeloupe",gq:"Equatorial Guinea",gr:"Greece",gt:"Guatemala",gu:"Guam",gw:"Guinea-Bissau",gy:"Guyana",hk:"Hong Kong SAR China",hn:"Honduras",hr:"Croatia",ht:"Haiti",hu:"Hungary",id:"Indonesia",ie:"Ireland",il:"Israel",im:"Isle of Man",in:"India",io:"British Indian Ocean Territory",iq:"Iraq",ir:"Iran",is:"Iceland",it:"Italy",je:"Jersey",jm:"Jamaica",jo:"Jordan",jp:"Japan",ke:"Kenya",kg:"Kyrgyzstan",kh:"Cambodia",ki:"Kiribati",km:"Comoros",kn:"St. Kitts & Nevis",kp:"North Korea",kr:"South Korea",kw:"Kuwait",ky:"Cayman Islands",kz:"Kazakhstan",la:"Laos",lb:"Lebanon",lc:"St. Lucia",li:"Liechtenstein",lk:"Sri Lanka",lr:"Liberia",ls:"Lesotho",lt:"Lithuania",lu:"Luxembourg",lv:"Latvia",ly:"Libya",ma:"Morocco",mc:"Monaco",md:"Moldova",me:"Montenegro",mf:"St. Martin",mg:"Madagascar",mh:"Marshall Islands",mk:"North Macedonia",ml:"Mali",mm:"Myanmar (Burma)",mn:"Mongolia",mo:"Macao SAR China",mp:"Northern Mariana Islands",mq:"Martinique",mr:"Mauritania",ms:"Montserrat",mt:"Malta",mu:"Mauritius",mv:"Maldives",mw:"Malawi",mx:"Mexico",my:"Malaysia",mz:"Mozambique",na:"Namibia",nc:"New Caledonia",ne:"Niger",nf:"Norfolk Island",ng:"Nigeria",ni:"Nicaragua",nl:"Netherlands",no:"Norway",np:"Nepal",nr:"Nauru",nu:"Niue",nz:"New Zealand",om:"Oman",pa:"Panama",pe:"Peru",pf:"French Polynesia",pg:"Papua New Guinea",ph:"Philippines",pk:"Pakistan",pl:"Poland",pm:"St. Pierre & Miquelon",pr:"Puerto Rico",ps:"Palestinian Territories",pt:"Portugal",pw:"Palau",py:"Paraguay",qa:"Qatar",re:"R\xE9union",ro:"Romania",rs:"Serbia",ru:"Russia",rw:"Rwanda",sa:"Saudi Arabia",sb:"Solomon Islands",sc:"Seychelles",sd:"Sudan",se:"Sweden",sg:"Singapore",sh:"St. Helena",si:"Slovenia",sj:"Svalbard & Jan Mayen",sk:"Slovakia",sl:"Sierra Leone",sm:"San Marino",sn:"Senegal",so:"Somalia",sr:"Suriname",ss:"South Sudan",st:"S\xE3o Tom\xE9 & Pr\xEDncipe",sv:"El Salvador",sx:"Sint Maarten",sy:"Syria",sz:"Eswatini",tc:"Turks & Caicos Islands",td:"Chad",tg:"Togo",th:"Thailand",tj:"Tajikistan",tk:"Tokelau",tl:"Timor-Leste",tm:"Turkmenistan",tn:"Tunisia",to:"Tonga",tr:"Turkey",tt:"Trinidad & Tobago",tv:"Tuvalu",tw:"Taiwan",tz:"Tanzania",ua:"Ukraine",ug:"Uganda",us:"United States",uy:"Uruguay",uz:"Uzbekistan",va:"Vatican City",vc:"St. Vincent & Grenadines",ve:"Venezuela",vg:"British Virgin Islands",vi:"U.S. Virgin Islands",vn:"Vietnam",vu:"Vanuatu",wf:"Wallis & Futuna",ws:"Samoa",ye:"Yemen",yt:"Mayotte",za:"South Africa",zm:"Zambia",zw:"Zimbabwe"},J=Et;var vt={selectedCountryAriaLabel:"Change country, selected ${countryName} (${dialCode})",noCountrySelected:"Select country",countryListAriaLabel:"List of countries",searchPlaceholder:"Search",clearSearchAriaLabel:"Clear search",zeroSearchResults:"No results found",oneSearchResult:"1 result found",multipleSearchResults:"${count} results found",ac:"Ascension Island",xk:"Kosovo"},Q=vt;var Lt={...J,...Q},V=Lt;var A={OPEN_COUNTRY_DROPDOWN:"open:countrydropdown",CLOSE_COUNTRY_DROPDOWN:"close:countrydropdown",COUNTRY_CHANGE:"countrychange",INPUT:"input"},h={HIDE:"iti__hide",V_HIDE:"iti__v-hide",ARROW_UP:"iti__arrow--up",GLOBE:"iti__globe",FLAG:"iti__flag",COUNTRY_ITEM:"iti__country",HIGHLIGHT:"iti__highlight"},f={ARROW_UP:"ArrowUp",ARROW_DOWN:"ArrowDown",SPACE:" ",ENTER:"Enter",ESC:"Escape",TAB:"Tab"},$={PASTE:"insertFromPaste",DELETE_FWD:"deleteContentForward"},D={ALPHA_UNICODE:/\p{L}/u,NON_PLUS_NUMERIC:/[^+0-9]/,NON_PLUS_NUMERIC_GLOBAL:/[^+0-9]/g,HIDDEN_SEARCH_CHAR:/^[a-zA-ZÀ-ÿа-яА-Я ]$/},Z={SEARCH_DEBOUNCE_MS:100,HIDDEN_SEARCH_RESET_MS:1e3,NEXT_TICK:0},G={UNKNOWN_NUMBER_TYPE:-99,UNKNOWN_VALIDATION_ERROR:-99},O={SANE_SELECTED_WITH_DIAL_WIDTH:78,SANE_SELECTED_NO_DIAL_WIDTH:42,INPUT_PADDING_EXTRA_LEFT:6},x={PLUS:"+",NANP:"1"},R={ISO2:"gb",DIAL_CODE:"44",MOBILE_PREFIX:"7",MOBILE_CORE_LENGTH:10},tt={ISO2:"us",DIAL_CODE:"1"},S={AGGRESSIVE:"aggressive",POLITE:"polite",OFF:"off"},H={AUTO:"auto"},K={COUNTRY_CODE:"countryCode",DIAL_CODE:"dialCode"},p={EXPANDED:"aria-expanded",LABEL:"aria-label",SELECTED:"aria-selected",ACTIVE_DESCENDANT:"aria-activedescendant",HASPOPUP:"aria-haspopup",CONTROLS:"aria-controls",HIDDEN:"aria-hidden",AUTOCOMPLETE:"aria-autocomplete",MODAL:"aria-modal"};var z=r=>typeof window<"u"&&typeof window.matchMedia=="function"&&window.matchMedia(r).matches,Nt=()=>{if(typeof navigator<"u"&&typeof window<"u"){let r=/Android.+Mobile|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),t=z("(max-width: 500px)"),e=z("(max-height: 600px)"),i=z("(pointer: coarse)");return r||t||i&&e}return!1},j={allowPhonewords:!1,allowDropdown:!0,autoPlaceholder:S.POLITE,containerClass:"",countryOrder:null,countrySearch:!0,customPlaceholder:null,dropdownContainer:null,excludeCountries:[],fixDropdownWidth:!0,formatAsYouType:!0,formatOnDisplay:!0,geoIpLookup:null,hiddenInput:null,i18n:{},initialCountry:"",loadUtils:null,nationalMode:!0,onlyCountries:[],placeholderNumberType:"MOBILE",showFlags:!0,separateDialCode:!1,strictMode:!1,useFullscreenPopup:Nt(),validationNumberTypes:["MOBILE"]},et=(r,t)=>{r.useFullscreenPopup&&(r.fixDropdownWidth=!1),r.onlyCountries.length===1&&(r.initialCountry=r.onlyCountries[0]),r.separateDialCode&&(r.nationalMode=!1),r.allowDropdown&&!r.showFlags&&!r.separateDialCode&&(r.nationalMode=!1),r.useFullscreenPopup&&!r.dropdownContainer&&(r.dropdownContainer=document.body),r.i18n={...t,...r.i18n}};var T=r=>r.replace(/\D/g,""),k=(r="")=>r.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var it=(r,t)=>{let e=k(t),i=[],n=[],o=[],s=[],a=[],u=[];for(let c of r)c.iso2===e?i.push(c):c.normalisedName.startsWith(e)?n.push(c):c.normalisedName.includes(e)?o.push(c):e===c.dialCode||e===c.dialCodePlus?s.push(c):c.dialCodePlus.includes(e)?a.push(c):c.initials.includes(e)&&u.push(c);let d=(c,C)=>c.priority-C.priority;return[...i.sort(d),...n.sort(d),...o.sort(d),...s.sort(d),...a.sort(d),...u.sort(d)]},nt=(r,t)=>{let e=t.toLowerCase();for(let i of r)if(i.name.toLowerCase().startsWith(e))return i;return null};var U=r=>Object.keys(r).filter(t=>!!r[t]).join(" "),m=(r,t,e)=>{let i=document.createElement(r);return t&&Object.entries(t).forEach(([n,o])=>i.setAttribute(n,o)),e&&e.appendChild(i),i};var st=()=>`
17
17
  <svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${p.HIDDEN}="true">
18
18
  <circle cx="11" cy="11" r="7" />
19
19
  <line x1="21" y1="21" x2="16.65" y2="16.65" />
20
- </svg>`,it=r=>{let t=`iti-${r}-clear-mask`;return`
20
+ </svg>`,ot=r=>{let t=`iti-${r}-clear-mask`;return`
21
21
  <svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${p.HIDDEN}="true" focusable="false">
22
22
  <mask id="${t}" maskUnits="userSpaceOnUse">
23
23
  <rect width="16" height="16" fill="white" />
24
24
  <path d="M5.2 5.2 L10.8 10.8 M10.8 5.2 L5.2 10.8" stroke="black" stroke-linecap="round" class="iti__search-clear-x" />
25
25
  </mask>
26
26
  <circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${t})" />
27
- </svg>`};var T=class{constructor(t,e,i){this.highlightedItem=null;t.dataset.intlTelInputId=i.toString(),this.telInput=t,this.options=e,this.id=i,this.a=!!t.getAttribute("placeholder"),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.separateDialCode&&(this.o=this.telInput.style.paddingLeft)}generateMarkup(t){this.countries=t,this._at();let e=this._au();this._av(e),e.appendChild(this.telInput),this._ay(),this._az(e)}_at(){this.telInput.classList.add("iti__tel-input"),!this.telInput.hasAttribute("autocomplete")&&!this.telInput.form?.hasAttribute("autocomplete")&&this.telInput.setAttribute("autocomplete","off")}_au(){let{allowDropdown:t,showFlags:e,containerClass:i,useFullscreenPopup:n}=this.options,o=H({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":e,"iti--inline-dropdown":!n,[i]:!!i}),s=C("div",{class:o});return this.isRTL&&s.setAttribute("dir","ltr"),this.telInput.before(s),s}_av(t){let{allowDropdown:e,separateDialCode:i,showFlags:n}=this.options;if(e||n||i){this.countryContainer=C("div",{class:`iti__country-container ${h.V_HIDE}`},t),e?(this.selectedCountry=C("button",{type:"button",class:"iti__selected-country",[p.EXPANDED]:"false",[p.LABEL]:this.options.i18n.noCountrySelected,[p.HASPOPUP]:"dialog",[p.CONTROLS]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=C("div",{class:"iti__selected-country"},this.countryContainer);let o=C("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=C("div",{class:h.FLAG},o),e&&(this.dropdownArrow=C("div",{class:"iti__arrow",[p.HIDDEN]:"true"},o)),i&&(this.selectedDialCode=C("div",{class:"iti__selected-dial-code"},this.selectedCountry)),e&&this._aw()}}_aw(){let{fixDropdownWidth:t,useFullscreenPopup:e,countrySearch:i,i18n:n,dropdownContainer:o,containerClass:s}=this.options,a=t?"":"iti--flexible-dropdown-width";if(this.dropdownContent=C("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content ${h.HIDE} ${a}`,role:"dialog",[p.MODAL]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),i&&this._ax(),this.countryList=C("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[p.LABEL]:n.countryListAriaLabel},this.dropdownContent),this._ba(),i&&this.updateSearchResultsA11yText(),o){let l=H({iti:!0,"iti--container":!0,"iti--fullscreen-popup":e,"iti--inline-dropdown":!e,[s]:!!s});this.dropdown=C("div",{class:l}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_ax(){let{i18n:t}=this.options,e=C("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=C("span",{class:"iti__search-icon",[p.HIDDEN]:"true"},e),this.searchIcon.innerHTML=et(),this.searchInput=C("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:t.searchPlaceholder,role:"combobox",[p.EXPANDED]:"true",[p.LABEL]:t.searchPlaceholder,[p.CONTROLS]:`iti-${this.id}__country-listbox`,[p.AUTOCOMPLETE]:"list",autocomplete:"off"},e),this.k=C("button",{type:"button",class:`iti__search-clear ${h.HIDE}`,[p.LABEL]:t.clearSearchAriaLabel,tabindex:"-1"},e),this.k.innerHTML=it(this.id),this.l=C("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=C("div",{class:`iti__no-results ${h.HIDE}`,[p.HIDDEN]:"true"},this.dropdownContent),this.searchNoResults.textContent=t.zeroSearchResults}_ay(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(h.V_HIDE))}_az(t){let{hiddenInput:e}=this.options;if(e){let i=this.telInput.getAttribute("name")||"",n=e(i);if(n.phone){let o=this.telInput.form?.querySelector(`input[name="${n.phone}"]`);o?this.hiddenInput=o:(this.hiddenInput=C("input",{type:"hidden",name:n.phone}),t.appendChild(this.hiddenInput))}if(n.country){let o=this.telInput.form?.querySelector(`input[name="${n.country}"]`);o?this.m=o:(this.m=C("input",{type:"hidden",name:n.country}),t.appendChild(this.m))}}}_ba(){let t=document.createDocumentFragment();for(let e=0;e<this.countries.length;e++){let i=this.countries[e],n=H({[h.COUNTRY_ITEM]:!0,[h.HIGHLIGHT]:e===0}),o=C("li",{id:`iti-${this.id}__item-${i.iso2}`,class:n,tabindex:"-1",role:"option",[p.SELECTED]:"false"});o.dataset.dialCode=i.dialCode,o.dataset.countryCode=i.iso2,i.nodeById[this.id]=o,this.options.showFlags&&C("div",{class:`${h.FLAG} iti__${i.iso2}`},o);let s=C("span",{class:"iti__country-name"},o);s.textContent=i.name;let a=C("span",{class:"iti__dial-code"},o);this.isRTL&&a.setAttribute("dir","ltr"),a.textContent=`+${i.dialCode}`,t.appendChild(o)}this.countryList.appendChild(t)}updateInputPadding(){if(this.selectedCountry){let t=this.options.separateDialCode?P.SANE_SELECTED_WITH_DIAL_WIDTH:P.SANE_SELECTED_NO_DIAL_WIDTH,i=(this.selectedCountry.offsetWidth||this._bb()||t)+P.INPUT_PADDING_EXTRA_LEFT;this.telInput.style.paddingLeft=`${i}px`}}_bb(){if(this.telInput.parentNode){let t;try{t=window.top.document.body}catch{t=document.body}let e=this.telInput.parentNode.cloneNode(!1);e.style.visibility="hidden",t.appendChild(e);let i=this.countryContainer.cloneNode();e.appendChild(i);let n=this.selectedCountry.cloneNode(!0);i.appendChild(n);let o=n.offsetWidth;return t.removeChild(e),o}return 0}updateSearchResultsA11yText(){let{i18n:t}=this.options,e=this.countryList.childElementCount,i;e===0?i=t.zeroSearchResults:t.searchResultsText?i=t.searchResultsText(e):e===1?i=t.oneSearchResult:i=t.multipleSearchResults.replace("${count}",e.toString()),this.l.textContent=i}scrollTo(t){let e=this.countryList,i=document.documentElement.scrollTop,n=e.offsetHeight,o=e.getBoundingClientRect().top+i,s=o+n,a=t.offsetHeight,l=t.getBoundingClientRect().top+i,d=l+a,c=l-o+e.scrollTop;if(l<o)e.scrollTop=c;else if(d>s){let m=n-a;e.scrollTop=c-m}}highlightListItem(t,e){let i=this.highlightedItem;if(i&&(i.classList.remove(h.HIGHLIGHT),i.setAttribute(p.SELECTED,"false")),this.highlightedItem=t,this.highlightedItem&&(this.highlightedItem.classList.add(h.HIGHLIGHT),this.highlightedItem.setAttribute(p.SELECTED,"true"),this.options.countrySearch)){let n=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(p.ACTIVE_DESCENDANT,n)}e&&this.highlightedItem.focus()}filterCountries(t){this.countryList.innerHTML="";let e=!0;for(let i of t){let n=i.nodeById[this.id];n&&(this.countryList.appendChild(n),e&&(this.highlightListItem(n,!1),e=!1))}e?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(h.HIDE)):this.searchNoResults&&this.searchNoResults.classList.add(h.HIDE),this.countryList.scrollTop=0,this.updateSearchResultsA11yText()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.options.separateDialCode&&(this.telInput.style.paddingLeft=this.o);let t=this.telInput.parentNode;t.before(this.telInput),t.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.selectedDialCode=null,this.dropdownArrow=null,this.dropdownContent=null,this.searchInput=null,this.searchIcon=null,this.k=null,this.searchNoResults=null,this.l=null,this.countryList=null,this.dropdown=null,this.hiddenInput=null,this.m=null,this.highlightedItem=null;for(let e of this.countries)delete e.nodeById[this.id];this.countries=null}};var nt=r=>{let{onlyCountries:t,excludeCountries:e}=r;if(t.length){let i=t.map(n=>n.toLowerCase());return L.filter(n=>i.includes(n.iso2))}else if(e.length){let i=e.map(n=>n.toLowerCase());return L.filter(n=>!i.includes(n.iso2))}return L},st=(r,t)=>{for(let e of r){let i=e.iso2.toLowerCase();t.i18n[i]&&(e.name=t.i18n[i])}},ot=(r,t)=>{let e=new Set,i=0,n={},o=(s,a,l)=>{if(!s||!a)return;a.length>i&&(i=a.length),n.hasOwnProperty(a)||(n[a]=[]);let d=n[a];if(d.includes(s))return;let c=l!==void 0?l:d.length;d[c]=s};for(let s of r){e.has(s.dialCode)||e.add(s.dialCode);for(let a=1;a<s.dialCode.length;a++){let l=s.dialCode.substring(0,a);o(s.iso2,l)}o(s.iso2,s.dialCode,s.priority)}(t.onlyCountries.length||t.excludeCountries.length)&&e.forEach(s=>{n[s]=n[s].filter(Boolean)});for(let s of r)if(s.areaCodes){let a=n[s.dialCode][0];for(let l of s.areaCodes){for(let d=1;d<l.length;d++){let c=l.substring(0,d),m=s.dialCode+c;o(a,m),o(s.iso2,m)}o(s.iso2,s.dialCode+l)}}return{dialCodes:e,dialCodeMaxLen:i,dialCodeToIso2Map:n}},rt=(r,t)=>{t.countryOrder&&(t.countryOrder=t.countryOrder.map(e=>e.toLowerCase())),r.sort((e,i)=>{let{countryOrder:n}=t;if(n){let o=n.indexOf(e.iso2),s=n.indexOf(i.iso2),a=o>-1,l=s>-1;if(a||l)return a&&l?o-s:a?-1:1}return e.name.localeCompare(i.name)})},at=r=>{for(let t of r)t.normalisedName=R(t.name),t.initials=t.normalisedName.split(/[^a-z]/).map(e=>e[0]).join(""),t.dialCodePlus=`+${t.dialCode}`};var lt=(r,t,e,i)=>{let n=r;if(e&&t){t=`+${i.dialCode}`;let o=n[t.length]===" "||n[t.length]==="-"?t.length+1:t.length;n=n.substring(o)}return n},ut=(r,t,e,i,n)=>{let o=e?e.formatNumberAsYouType(r,i.iso2):r,{dialCode:s}=i;return n&&t.charAt(0)!=="+"&&o.includes(`+${s}`)?(o.split(`+${s}`)[1]||"").trim():o};var dt=(r,t,e,i)=>{if(e===0&&!i)return 0;let n=0;for(let o=0;o<t.length;o++){if(/[+0-9]/.test(t[o])&&n++,n===r&&!i)return o+1;if(i&&n===r+1)return o}return t.length};var _t=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],z=r=>{let t=N(r);if(t.startsWith(M.NANP)&&t.length>=4){let e=t.substring(1,4);return _t.includes(e)}return!1};for(let r of L)r.name=B[r.iso2];var Lt=0,Dt=new Set(L.map(r=>r.iso2)),V=r=>Dt.has(r),k=class r{constructor(t,e={}){this.id=Lt++,this.options={...K,...e},Q(this.options,B),this.ui=new T(t,this.options,this.id),this.i=r._b(),this.promise=this._c(),this.countries=nt(this.options);let{dialCodes:i,dialCodeMaxLen:n,dialCodeToIso2Map:o}=ot(this.countries,this.options);this.dialCodes=i,this.dialCodeMaxLen=n,this.dialCodeToIso2Map=o,this.j=new Map(this.countries.map(s=>[s.iso2,s])),this._init()}static _b(){return typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1}_c(){let t=new Promise((i,n)=>{this.b=i,this.c=n}),e=new Promise((i,n)=>{this.d=i,this.e=n});return Promise.all([t,e])}_init(){this.selectedCountryData={},this.g=new AbortController,this._a(),this.ui.generateMarkup(this.countries),this._d(),this._e(),this._h()}_a(){st(this.countries,this.options),rt(this.countries,this.options),at(this.countries)}_d(t=!1){let e=this.ui.telInput.getAttribute("value"),i=this.ui.telInput.value,o=e&&e.startsWith("+")&&(!i||!i.startsWith("+"))?e:i,s=this._ao(o),a=z(o),{initialCountry:l,geoIpLookup:d}=this.options,c=l===x.AUTO&&d;if(s&&!a)this._ai(o);else if(!c||t){let m=l?l.toLowerCase():"";V(m)?this._aj(m):s&&a?this._aj(J.ISO2):this._aj("")}o&&this._ah(o)}_e(){this._j(),this.options.allowDropdown&&this._g(),(this.ui.hiddenInput||this.ui.m)&&this.ui.telInput.form&&this._f()}_f(){let t=()=>{this.ui.hiddenInput&&(this.ui.hiddenInput.value=this.getNumber()),this.ui.m&&(this.ui.m.value=this.selectedCountryData.iso2||"")};this.ui.telInput.form?.addEventListener("submit",t,{signal:this.g.signal})}_g(){let t=this.g.signal,e=s=>{this.ui.dropdownContent.classList.contains(h.HIDE)?this.ui.telInput.focus():s.preventDefault()},i=this.ui.telInput.closest("label");i&&i.addEventListener("click",e,{signal:t});let n=()=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&!this.ui.telInput.disabled&&!this.ui.telInput.readOnly&&this._l()};this.ui.selectedCountry.addEventListener("click",n,{signal:t});let o=s=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&[y.ARROW_UP,y.ARROW_DOWN,y.SPACE,y.ENTER].includes(s.key)&&(s.preventDefault(),s.stopPropagation(),this._l()),s.key===y.TAB&&this._am()};this.ui.countryContainer.addEventListener("keydown",o,{signal:t})}_h(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.options;if(t&&!u.utils){let o=()=>{u.attachUtils(t)?.catch(()=>{})};if(u.documentReady())o();else{let s=()=>{o()};window.addEventListener("load",s,{signal:this.g.signal})}}else this.d();e===x.AUTO&&i&&!this.selectedCountryData.iso2?this._i():this.b()}_i(){u.autoCountry?this.handleAutoCountry():u.startedLoadingAutoCountry||(u.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((t="")=>{let e=t.toLowerCase();V(e)?(u.autoCountry=e,setTimeout(()=>S("handleAutoCountry"))):(this._d(!0),S("rejectAutoCountryPromise"))},()=>{this._d(!0),S("rejectAutoCountryPromise")}))}_m(){this._l(),this.ui.searchInput.value="+",this._ae("")}_j(){this._p(),this._n(),this._o()}_p(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,allowDropdown:n,countrySearch:o}=this.options,s=!1;D.ALPHA_UNICODE.test(this.ui.telInput.value)&&(s=!0);let a=l=>{if(this.i&&l?.data==="+"&&i&&n&&o){let g=this.ui.telInput.selectionStart||0,E=this.ui.telInput.value.substring(0,g-1),b=this.ui.telInput.value.substring(g);this.ui.telInput.value=E+b,this._m();return}this._ai(this.ui.telInput.value)&&this._ar();let d=l?.data&&D.NON_PLUS_NUMERIC.test(l.data),c=l?.inputType===W.PASTE&&this.ui.telInput.value;d||c&&!t?s=!0:D.NON_PLUS_NUMERIC.test(this.ui.telInput.value)||(s=!1);let m=l?.detail&&l.detail.isSetNumber;if(e&&!s&&!m){let g=this.ui.telInput.selectionStart||0,b=this.ui.telInput.value.substring(0,g).replace(D.NON_PLUS_NUMERIC_GLOBAL,"").length,_=l?.inputType===W.DELETE_FWD,f=this._ap(),I=ut(f,this.ui.telInput.value,u.utils,this.selectedCountryData,this.options.separateDialCode),v=dt(b,I,g,_);this.ui.telInput.value=I,this.ui.telInput.setSelectionRange(v,v)}};this.ui.telInput.addEventListener("input",a,{signal:this.g.signal})}_n(){let{strictMode:t,separateDialCode:e,allowDropdown:i,countrySearch:n}=this.options;if(t||e){let o=s=>{if(s.key&&s.key.length===1&&!s.altKey&&!s.ctrlKey&&!s.metaKey){if(e&&i&&n&&s.key==="+"){s.preventDefault(),this._m();return}if(t){let a=this.ui.telInput.value,d=!a.startsWith("+")&&this.ui.telInput.selectionStart===0&&s.key==="+",c=/^[0-9]$/.test(s.key),m=e?c:d||c,g=a.slice(0,this.ui.telInput.selectionStart)+s.key+a.slice(this.ui.telInput.selectionEnd),E=this._ap(g),b=u.utils.getCoreNumber(E,this.selectedCountryData.iso2),_=this.n&&b.length>this.n,I=this._s(E)!==null;(!m||_&&!I&&!d)&&s.preventDefault()}}};this.ui.telInput.addEventListener("keydown",o,{signal:this.g.signal})}}_o(){if(this.options.strictMode){let t=e=>{e.preventDefault();let i=this.ui.telInput,n=i.selectionStart,o=i.selectionEnd,s=i.value.slice(0,n),a=i.value.slice(o),l=this.selectedCountryData.iso2,d=e.clipboardData.getData("text"),c=n===0&&o>0,m=!i.value.startsWith("+")||c,g=d.replace(D.NON_PLUS_NUMERIC_GLOBAL,""),E=g.startsWith("+"),b=g.replace(/\+/g,""),_=E&&m?`+${b}`:b,f=s+_+a,I=u.utils.getCoreNumber(f,l);for(;I.length===0&&f.length>0;)f=f.slice(0,-1),I=u.utils.getCoreNumber(f,l);if(!I)return;if(this.n&&I.length>this.n)if(i.selectionEnd===i.value.length){let ct=I.length-this.n;f=f.slice(0,f.length-ct)}else return;i.value=f;let v=n+_.length;i.setSelectionRange(v,v),i.dispatchEvent(new InputEvent("input",{bubbles:!0}))};this.ui.telInput.addEventListener("paste",t,{signal:this.g.signal})}}_k(t){let e=Number(this.ui.telInput.getAttribute("maxlength"));return e&&t.length>e?t.substring(0,e):t}_as(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.ui.telInput.dispatchEvent(i)}_l(){let{fixDropdownWidth:t,countrySearch:e}=this.options;if(this.h=new AbortController,t&&(this.ui.dropdownContent.style.width=`${this.ui.telInput.offsetWidth}px`),this.ui.dropdownContent.classList.remove(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"true"),this._x(),e){let i=this.ui.countryList.firstElementChild;i&&(this.ui.highlightListItem(i,!1),this.ui.countryList.scrollTop=0),this.ui.searchInput.focus()}this._y(),this.ui.dropdownArrow.classList.add(h.ARROW_UP),this._as(w.OPEN_COUNTRY_DROPDOWN)}_x(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.ui.dropdown),!this.options.useFullscreenPopup){let t=this.ui.telInput.getBoundingClientRect(),e=this.ui.telInput.offsetHeight;if(this.options.dropdownContainer){this.ui.dropdown.style.top=`${t.top+e}px`,this.ui.dropdown.style.left=`${t.left}px`;let i=()=>this._am();window.addEventListener("scroll",i,{signal:this.h.signal})}}}_y(){let t=this.h.signal;this._z(t),this._aa(t),this._ab(t),this._ac(t),this.options.countrySearch&&this._ad(t)}_z(t){let e=i=>{let n=i.target?.closest(`.${h.COUNTRY_ITEM}`);n&&this.ui.highlightListItem(n,!1)};this.ui.countryList.addEventListener("mouseover",e,{signal:t})}_aa(t){let e=i=>{let n=i.target?.closest(`.${h.COUNTRY_ITEM}`);n&&this._al(n)};this.ui.countryList.addEventListener("click",e,{signal:t})}_ab(t){let e=i=>{!!i.target.closest(`#iti-${this.id}__dropdown-content`)||this._am()};setTimeout(()=>{document.documentElement.addEventListener("click",e,{signal:t})},0)}_ac(t){let e="",i=null,n=o=>{[y.ARROW_UP,y.ARROW_DOWN,y.ENTER,y.ESC].includes(o.key)&&(o.preventDefault(),o.stopPropagation(),o.key===y.ARROW_UP||o.key===y.ARROW_DOWN?this._af(o.key):o.key===y.ENTER?this._ag():o.key===y.ESC&&(this._am(),this.ui.selectedCountry.focus())),!this.options.countrySearch&&D.HIDDEN_SEARCH_CHAR.test(o.key)&&(o.stopPropagation(),i&&clearTimeout(i),e+=o.key.toLowerCase(),this._q(e),i=setTimeout(()=>{e=""},X.HIDDEN_SEARCH_RESET_MS))};document.addEventListener("keydown",n,{signal:t})}_ad(t){let e=()=>{let s=this.ui.searchInput.value.trim();this._ae(s),this.ui.searchInput.value?this.ui.k.classList.remove(h.HIDE):this.ui.k.classList.add(h.HIDE)},i=null,n=()=>{i&&clearTimeout(i),i=setTimeout(()=>{e(),i=null},100)};this.ui.searchInput.addEventListener("input",n,{signal:t});let o=()=>{this.ui.searchInput.value="",this.ui.searchInput.focus(),e()};this.ui.k.addEventListener("click",o,{signal:t})}_q(t){let e=tt(this.countries,t);if(e){let i=e.nodeById[this.id];this.ui.highlightListItem(i,!1),this.ui.scrollTo(i)}}_ae(t){let e;t===""?e=this.countries:e=Z(this.countries,t),this.ui.filterCountries(e)}_af(t){let e=t===y.ARROW_UP?this.ui.highlightedItem?.previousElementSibling:this.ui.highlightedItem?.nextElementSibling;!e&&this.ui.countryList.childElementCount>1&&(e=t===y.ARROW_UP?this.ui.countryList.lastElementChild:this.ui.countryList.firstElementChild),e&&(this.ui.scrollTo(e),this.ui.highlightListItem(e,!1))}_ag(){this.ui.highlightedItem&&this._al(this.ui.highlightedItem)}_ah(t){let e=t;if(this.options.formatOnDisplay&&u.utils&&this.selectedCountryData){let i=this.options.nationalMode||!e.startsWith("+")&&!this.options.separateDialCode,{NATIONAL:n,INTERNATIONAL:o}=u.utils.numberFormat,s=i?n:o;e=u.utils.formatNumber(e,this.selectedCountryData.iso2,s)}e=this._aq(e),this.ui.telInput.value=e}_ai(t){let e=this._s(t);return e!==null?this._aj(e):!1}_r(t){let{dialCode:e,nationalPrefix:i}=this.selectedCountryData;if(t.startsWith("+")||!e)return t;let s=i&&t.startsWith(i)&&!this.options.separateDialCode?t.substring(1):t;return`+${e}${s}`}_s(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.selectedCountryData.iso2,o=this.selectedCountryData.dialCode;i=this._r(i);let s=this._ao(i,!0),a=N(i);if(s){let l=N(s),d=this.dialCodeToIso2Map[l];if(d.length===1)return d[0]===n?null:d[0];if(!n&&this.f&&d.includes(this.f))return this.f;if(o===M.NANP&&z(a))return null;let{areaCodes:m,priority:g}=this.selectedCountryData;if(m){let I=m.map(v=>`${o}${v}`);for(let v of I)if(a.startsWith(v))return null}let b=m&&!(g===0)&&a.length>l.length,_=n&&d.includes(n)&&!b,f=n===d[0];if(!_&&!f)return d[0]}else if(i.startsWith("+")&&a.length){let l=this.selectedCountryData.dialCode||"";return l&&l.startsWith(a)?null:""}else if((!i||i==="+")&&!n)return this.f;return null}_aj(t){let{separateDialCode:e,showFlags:i,i18n:n}=this.options,o=this.selectedCountryData.iso2||"";if(this.selectedCountryData=t?this.j.get(t):{},this.selectedCountryData.iso2&&(this.f=this.selectedCountryData.iso2),this.ui.selectedCountry){let s=t&&i?`${h.FLAG} iti__${t}`:`${h.FLAG} ${h.GLOBE}`,a,l;if(t){let{name:d,dialCode:c}=this.selectedCountryData;l=d,a=n.selectedCountryAriaLabel.replace("${countryName}",d).replace("${dialCode}",`+${c}`)}else l=n.noCountrySelected,a=n.noCountrySelected;this.ui.selectedCountryInner.className=s,this.ui.selectedCountry.setAttribute("title",l),this.ui.selectedCountry.setAttribute(p.LABEL,a)}if(e){let s=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.ui.selectedDialCode.textContent=s,this.ui.updateInputPadding()}return this._ak(),this._t(),o!==t}_t(){let{strictMode:t,placeholderNumberType:e,validationNumberTypes:i}=this.options,{iso2:n}=this.selectedCountryData;if(t&&u.utils)if(n){let o=u.utils.numberType[e],s=u.utils.getExampleNumber(n,!1,o,!0),a=s;for(;u.utils.isPossibleNumber(s,n,i);)a=s,s+="0";let l=u.utils.getCoreNumber(a,n);this.n=l.length,n==="by"&&(this.n=l.length+1)}else this.n=null}_ak(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:n}=this.options,o=t===A.AGGRESSIVE||!this.ui.a&&t===A.POLITE;if(u.utils&&o){let s=u.utils.numberType[e],a=this.selectedCountryData.iso2?u.utils.getExampleNumber(this.selectedCountryData.iso2,i,s):"";a=this._aq(a),typeof n=="function"&&(a=n(a,this.selectedCountryData)),this.ui.telInput.setAttribute("placeholder",a)}}_al(t){let e=t.dataset[$.COUNTRY_CODE],i=this._aj(e);this._am();let n=t.dataset[$.DIAL_CODE];this._an(n),this.options.formatOnDisplay&&this._ah(this.ui.telInput.value),this.ui.telInput.focus(),i&&this._ar()}_am(){this.ui.dropdownContent.classList.contains(h.HIDE)||(this.ui.dropdownContent.classList.add(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"false"),this.ui.highlightedItem&&this.ui.highlightedItem.setAttribute(p.SELECTED,"false"),this.options.countrySearch&&this.ui.searchInput.removeAttribute(p.ACTIVE_DESCENDANT),this.ui.dropdownArrow.classList.remove(h.ARROW_UP),this.h.abort(),this.h=null,this.options.dropdownContainer&&this.ui.dropdown.remove(),this._as(w.CLOSE_COUNTRY_DROPDOWN))}_an(t){let e=this.ui.telInput.value,i=`+${t}`,n;if(e.startsWith("+")){let o=this._ao(e);o?n=e.replace(o,i):n=i,this.ui.telInput.value=n}}_ao(t,e){let i="";if(t.startsWith("+")){let n="",o=!1;for(let s=0;s<t.length;s++){let a=t.charAt(s);if(/[0-9]/.test(a)){if(n+=a,!!!this.dialCodeToIso2Map[n])break;if(this.dialCodes.has(n)){if(i=t.substring(0,s+1),o=!0,!e)break}else e&&o&&(i=t.substring(0,s+1));if(n.length===this.dialCodeMaxLen)break}}}return i}_ap(t){let e=t||this.ui.telInput.value.trim(),{dialCode:i}=this.selectedCountryData,n,o=N(e);return this.options.separateDialCode&&!e.startsWith("+")&&i&&o?n=`+${i}`:n="",n+e}_aq(t){let e=this._ao(t),i=lt(t,e,this.options.separateDialCode,this.selectedCountryData);return this._k(i)}_ar(){this._as(w.COUNTRY_CHANGE)}handleAutoCountry(){this.options.initialCountry===x.AUTO&&u.autoCountry&&(this.f=u.autoCountry,this.selectedCountryData.iso2||this.ui.selectedCountryInner.classList.contains(h.GLOBE)||this.setCountry(this.f),this.b())}handleUtils(){u.utils&&(this.ui.telInput.value&&this._ah(this.ui.telInput.value),this.selectedCountryData.iso2&&(this._ak(),this._t())),this.d()}destroy(){this.ui.telInput&&(this.options.allowDropdown&&this._am(),this.g.abort(),this.g=null,this.ui.destroy(),u.instances instanceof Map?u.instances.delete(this.id):delete u.instances[this.id])}getExtension(){return u.utils?u.utils.getExtension(this._ap(),this.selectedCountryData.iso2):""}getNumber(t){if(u.utils){let{iso2:e}=this.selectedCountryData;return u.utils.formatNumber(this._ap(),e,t)}return""}getNumberType(){return u.utils?u.utils.getNumberType(this._ap(),this.selectedCountryData.iso2):F.UNKNOWN_NUMBER_TYPE}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(u.utils){let{iso2:t}=this.selectedCountryData;return u.utils.getValidationError(this._ap(),t)}return F.UNKNOWN_VALIDATION_ERROR}isValidNumber(){let{dialCode:t,iso2:e}=this.selectedCountryData;if(t===O.DIAL_CODE&&u.utils){let i=this._ap(),n=u.utils.getCoreNumber(i,e);if(n[0]===O.MOBILE_PREFIX&&n.length!==O.MOBILE_CORE_LENGTH)return!1}return this._v(!1)}isValidNumberPrecise(){return this._v(!0)}_u(t){return u.utils?u.utils.isPossibleNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}_v(t){if(!u.utils)return null;if(!this.selectedCountryData.iso2)return!1;let e=s=>t?this._w(s):this._u(s),i=this._ap(),n=i.search(D.ALPHA_UNICODE);if(n>-1&&!this.options.allowPhonewords){let s=i.substring(0,n),a=e(s),l=e(i);return a&&l}return e(i)}_w(t){return u.utils?u.utils.isValidNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry(t){let e=t?.toLowerCase();if(!V(e))throw new Error(`Invalid country code: '${e}'`);let i=this.selectedCountryData.iso2;(t&&e!==i||!t&&i)&&(this._aj(e),this._an(this.selectedCountryData.dialCode),this.options.formatOnDisplay&&this._ah(this.ui.telInput.value),this._ar())}setNumber(t){let e=this._ai(t);this._ah(t),e&&this._ar(),this._as(w.INPUT,{isSetNumber:!0})}setPlaceholderNumberType(t){this.options.placeholderNumberType=t,this._ak()}setDisabled(t){this.ui.telInput.disabled=t,t?this.ui.selectedCountry.setAttribute("disabled","true"):this.ui.selectedCountry.removeAttribute("disabled")}},Nt=r=>{if(!u.utils&&!u.startedLoadingUtilsScript){let t;if(typeof r=="function")try{t=Promise.resolve(r())}catch(e){return Promise.reject(e)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof r}`));return u.startedLoadingUtilsScript=!0,t.then(e=>{let i=e?.default;if(!i||typeof i!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return u.utils=i,S("handleUtils"),!0}).catch(e=>{throw S("rejectUtilsScriptPromise",e),e})}return null},S=(r,...t)=>{Object.values(u.instances).forEach(e=>{let i=e[r];typeof i=="function"&&i.apply(e,t)})},u=Object.assign((r,t)=>{let e=new k(r,t);return u.instances[e.id]=e,r.iti=e,e},{defaults:K,documentReady:()=>document.readyState==="complete",getCountryData:()=>L,getInstance:r=>{let t=r.dataset.intlTelInputId;return t?u.instances[t]:null},instances:{},attachUtils:Nt,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.12.6"}),wt=u;return ft(At);})();
27
+ </svg>`};var P=class{constructor(t,e,i){this.highlightedItem=null;t.dataset.intlTelInputId=i.toString(),this.telInput=t,this.options=e,this.id=i,this.a=!!t.getAttribute("placeholder"),this.isRTL=!!this.telInput.closest("[dir=rtl]"),this.options.separateDialCode&&(this.o=this.telInput.style.paddingLeft)}generateMarkup(t){this.countries=t,this._at();let e=this._au();this._av(e),e.appendChild(this.telInput),this._ay(),this._az(e)}_at(){this.telInput.classList.add("iti__tel-input"),!this.telInput.hasAttribute("autocomplete")&&!this.telInput.form?.hasAttribute("autocomplete")&&this.telInput.setAttribute("autocomplete","off")}_au(){let{allowDropdown:t,showFlags:e,containerClass:i,useFullscreenPopup:n}=this.options,o=U({iti:!0,"iti--allow-dropdown":t,"iti--show-flags":e,"iti--inline-dropdown":!n,[i]:!!i}),s=m("div",{class:o});return this.isRTL&&s.setAttribute("dir","ltr"),this.telInput.before(s),s}_av(t){let{allowDropdown:e,separateDialCode:i,showFlags:n}=this.options;if(e||n||i){this.countryContainer=m("div",{class:`iti__country-container ${h.V_HIDE}`},t),e?(this.selectedCountry=m("button",{type:"button",class:"iti__selected-country",[p.EXPANDED]:"false",[p.LABEL]:this.options.i18n.noCountrySelected,[p.HASPOPUP]:"dialog",[p.CONTROLS]:`iti-${this.id}__dropdown-content`},this.countryContainer),this.telInput.disabled&&this.selectedCountry.setAttribute("disabled","true")):this.selectedCountry=m("div",{class:"iti__selected-country"},this.countryContainer);let o=m("div",{class:"iti__selected-country-primary"},this.selectedCountry);this.selectedCountryInner=m("div",{class:h.FLAG},o),e&&(this.dropdownArrow=m("div",{class:"iti__arrow",[p.HIDDEN]:"true"},o)),i&&(this.selectedDialCode=m("div",{class:"iti__selected-dial-code"},this.selectedCountry)),e&&this._aw()}}_aw(){let{fixDropdownWidth:t,useFullscreenPopup:e,countrySearch:i,i18n:n,dropdownContainer:o,containerClass:s}=this.options,a=t?"":"iti--flexible-dropdown-width";if(this.dropdownContent=m("div",{id:`iti-${this.id}__dropdown-content`,class:`iti__dropdown-content ${h.HIDE} ${a}`,role:"dialog",[p.MODAL]:"true"}),this.isRTL&&this.dropdownContent.setAttribute("dir","rtl"),i&&this._ax(),this.countryList=m("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox",[p.LABEL]:n.countryListAriaLabel},this.dropdownContent),this._ba(),i&&this.updateSearchResultsA11yText(),o){let u=U({iti:!0,"iti--container":!0,"iti--fullscreen-popup":e,"iti--inline-dropdown":!e,[s]:!!s});this.dropdown=m("div",{class:u}),this.dropdown.appendChild(this.dropdownContent)}else this.countryContainer.appendChild(this.dropdownContent)}_ax(){let{i18n:t}=this.options,e=m("div",{class:"iti__search-input-wrapper"},this.dropdownContent);this.searchIcon=m("span",{class:"iti__search-icon",[p.HIDDEN]:"true"},e),this.searchIcon.innerHTML=st(),this.searchInput=m("input",{id:`iti-${this.id}__search-input`,type:"search",class:"iti__search-input",placeholder:t.searchPlaceholder,role:"combobox",[p.EXPANDED]:"true",[p.LABEL]:t.searchPlaceholder,[p.CONTROLS]:`iti-${this.id}__country-listbox`,[p.AUTOCOMPLETE]:"list",autocomplete:"off"},e),this.k=m("button",{type:"button",class:`iti__search-clear ${h.HIDE}`,[p.LABEL]:t.clearSearchAriaLabel,tabindex:"-1"},e),this.k.innerHTML=ot(this.id),this.l=m("span",{class:"iti__a11y-text"},this.dropdownContent),this.searchNoResults=m("div",{class:`iti__no-results ${h.HIDE}`,[p.HIDDEN]:"true"},this.dropdownContent),this.searchNoResults.textContent=t.zeroSearchResults}_ay(){this.countryContainer&&(this.updateInputPadding(),this.countryContainer.classList.remove(h.V_HIDE))}_az(t){let{hiddenInput:e}=this.options;if(e){let i=this.telInput.getAttribute("name")||"",n=e(i);if(n.phone){let o=this.telInput.form?.querySelector(`input[name="${n.phone}"]`);o?this.hiddenInput=o:(this.hiddenInput=m("input",{type:"hidden",name:n.phone}),t.appendChild(this.hiddenInput))}if(n.country){let o=this.telInput.form?.querySelector(`input[name="${n.country}"]`);o?this.m=o:(this.m=m("input",{type:"hidden",name:n.country}),t.appendChild(this.m))}}}_ba(){let t=document.createDocumentFragment();for(let e=0;e<this.countries.length;e++){let i=this.countries[e],n=U({[h.COUNTRY_ITEM]:!0,[h.HIGHLIGHT]:e===0}),o=m("li",{id:`iti-${this.id}__item-${i.iso2}`,class:n,tabindex:"-1",role:"option",[p.SELECTED]:"false"});o.dataset.dialCode=i.dialCode,o.dataset.countryCode=i.iso2,i.nodeById[this.id]=o,this.options.showFlags&&m("div",{class:`${h.FLAG} iti__${i.iso2}`},o);let s=m("span",{class:"iti__country-name"},o);s.textContent=i.name;let a=m("span",{class:"iti__dial-code"},o);this.isRTL&&a.setAttribute("dir","ltr"),a.textContent=`+${i.dialCode}`,t.appendChild(o)}this.countryList.appendChild(t)}updateInputPadding(){if(this.selectedCountry){let t=this.options.separateDialCode?O.SANE_SELECTED_WITH_DIAL_WIDTH:O.SANE_SELECTED_NO_DIAL_WIDTH,i=(this.selectedCountry.offsetWidth||this._bb()||t)+O.INPUT_PADDING_EXTRA_LEFT;this.telInput.style.paddingLeft=`${i}px`}}_bb(){if(this.telInput.parentNode){let t;try{t=window.top.document.body}catch{t=document.body}let e=this.telInput.parentNode.cloneNode(!1);e.style.visibility="hidden",t.appendChild(e);let i=this.countryContainer.cloneNode();e.appendChild(i);let n=this.selectedCountry.cloneNode(!0);i.appendChild(n);let o=n.offsetWidth;return t.removeChild(e),o}return 0}updateSearchResultsA11yText(){let{i18n:t}=this.options,e=this.countryList.childElementCount,i;e===0?i=t.zeroSearchResults:t.searchResultsText?i=t.searchResultsText(e):e===1?i=t.oneSearchResult:i=t.multipleSearchResults.replace("${count}",e.toString()),this.l.textContent=i}scrollTo(t){let e=this.countryList,i=document.documentElement.scrollTop,n=e.offsetHeight,o=e.getBoundingClientRect().top+i,s=o+n,a=t.offsetHeight,u=t.getBoundingClientRect().top+i,d=u+a,c=u-o+e.scrollTop;if(u<o)e.scrollTop=c;else if(d>s){let C=n-a;e.scrollTop=c-C}}highlightListItem(t,e){let i=this.highlightedItem;if(i&&(i.classList.remove(h.HIGHLIGHT),i.setAttribute(p.SELECTED,"false")),this.highlightedItem=t,this.highlightedItem&&(this.highlightedItem.classList.add(h.HIGHLIGHT),this.highlightedItem.setAttribute(p.SELECTED,"true"),this.options.countrySearch)){let n=this.highlightedItem.getAttribute("id")||"";this.searchInput.setAttribute(p.ACTIVE_DESCENDANT,n)}e&&this.highlightedItem.focus()}filterCountries(t){this.countryList.innerHTML="";let e=!0;for(let i of t){let n=i.nodeById[this.id];n&&(this.countryList.appendChild(n),e&&(this.highlightListItem(n,!1),e=!1))}e?(this.highlightListItem(null,!1),this.searchNoResults&&this.searchNoResults.classList.remove(h.HIDE)):this.searchNoResults&&this.searchNoResults.classList.add(h.HIDE),this.countryList.scrollTop=0,this.updateSearchResultsA11yText()}destroy(){this.telInput.iti=void 0,delete this.telInput.dataset.intlTelInputId,this.options.separateDialCode&&(this.telInput.style.paddingLeft=this.o);let t=this.telInput.parentNode;t.before(this.telInput),t.remove(),this.telInput=null,this.countryContainer=null,this.selectedCountry=null,this.selectedCountryInner=null,this.selectedDialCode=null,this.dropdownArrow=null,this.dropdownContent=null,this.searchInput=null,this.searchIcon=null,this.k=null,this.searchNoResults=null,this.l=null,this.countryList=null,this.dropdown=null,this.hiddenInput=null,this.m=null,this.highlightedItem=null;for(let e of this.countries)delete e.nodeById[this.id];this.countries=null}};var rt=r=>{let{onlyCountries:t,excludeCountries:e}=r;if(t.length){let i=t.map(n=>n.toLowerCase());return N.filter(n=>i.includes(n.iso2))}else if(e.length){let i=e.map(n=>n.toLowerCase());return N.filter(n=>!i.includes(n.iso2))}return N},at=(r,t)=>{for(let e of r){let i=e.iso2.toLowerCase();t.i18n[i]&&(e.name=t.i18n[i])}},lt=(r,t)=>{let e=new Set,i=0,n={},o=(s,a,u)=>{if(!s||!a)return;a.length>i&&(i=a.length),n.hasOwnProperty(a)||(n[a]=[]);let d=n[a];if(d.includes(s))return;let c=u!==void 0?u:d.length;d[c]=s};for(let s of r){e.has(s.dialCode)||e.add(s.dialCode);for(let a=1;a<s.dialCode.length;a++){let u=s.dialCode.substring(0,a);o(s.iso2,u)}o(s.iso2,s.dialCode,s.priority)}(t.onlyCountries.length||t.excludeCountries.length)&&e.forEach(s=>{n[s]=n[s].filter(Boolean)});for(let s of r)if(s.areaCodes){let a=n[s.dialCode][0];for(let u of s.areaCodes){for(let d=1;d<u.length;d++){let c=u.substring(0,d),C=s.dialCode+c;o(a,C),o(s.iso2,C)}o(s.iso2,s.dialCode+u)}}return{dialCodes:e,dialCodeMaxLen:i,dialCodeToIso2Map:n}},ut=(r,t)=>{t.countryOrder&&(t.countryOrder=t.countryOrder.map(e=>e.toLowerCase())),r.sort((e,i)=>{let{countryOrder:n}=t;if(n){let o=n.indexOf(e.iso2),s=n.indexOf(i.iso2),a=o>-1,u=s>-1;if(a||u)return a&&u?o-s:a?-1:1}return e.name.localeCompare(i.name)})},dt=r=>{for(let t of r)t.normalisedName=k(t.name),t.initials=t.normalisedName.split(/[^a-z]/).map(e=>e[0]).join(""),t.dialCodePlus=`+${t.dialCode}`};var ct=(r,t,e,i)=>{let n=r;if(e&&t){t=`+${i.dialCode}`;let o=n[t.length]===" "||n[t.length]==="-"?t.length+1:t.length;n=n.substring(o)}return n},ht=(r,t,e,i,n)=>{let o=e?e.formatNumberAsYouType(r,i.iso2):r,{dialCode:s}=i;return n&&t.charAt(0)!=="+"&&o.includes(`+${s}`)?(o.split(`+${s}`)[1]||"").trim():o};var pt=(r,t,e,i)=>{if(e===0&&!i)return 0;let n=0;for(let o=0;o<t.length;o++){if(/[+0-9]/.test(t[o])&&n++,n===r&&!i)return o+1;if(i&&n===r+1)return o}return t.length};var Dt=["800","822","833","844","855","866","877","880","881","882","883","884","885","886","887","888","889"],Y=r=>{let t=T(r);if(t.startsWith(x.NANP)&&t.length>=4){let e=t.substring(1,4);return Dt.includes(e)}return!1};for(let r of N)r.name=V[r.iso2];var wt=0,Tt=new Set(N.map(r=>r.iso2)),q=r=>Tt.has(r),B=class r{constructor(t,e={}){this.id=wt++,this.options={...j,...e},et(this.options,V),this.ui=new P(t,this.options,this.id),this.i=r._b(),this.promise=this._c(),this.countries=rt(this.options);let{dialCodes:i,dialCodeMaxLen:n,dialCodeToIso2Map:o}=lt(this.countries,this.options);this.dialCodes=i,this.dialCodeMaxLen=n,this.dialCodeToIso2Map=o,this.j=new Map(this.countries.map(s=>[s.iso2,s])),this._init()}static _b(){return typeof navigator<"u"?/Android/i.test(navigator.userAgent):!1}_updateNumeralSet(t){/[\u0660-\u0669]/.test(t)?this.userNumeralSet="arabic-indic":/[\u06F0-\u06F9]/.test(t)?this.userNumeralSet="persian":this.userNumeralSet="ascii"}_mapAsciiToUserNumerals(t){if(this.userNumeralSet||this._updateNumeralSet(this.ui.telInput.value),this.userNumeralSet==="ascii")return t;let e=this.userNumeralSet==="arabic-indic"?1632:1776;return t.replace(/[0-9]/g,i=>String.fromCharCode(e+Number(i)))}_normaliseNumerals(t){if(!t)return"";if(this._updateNumeralSet(t),this.userNumeralSet==="ascii")return t;let e=this.userNumeralSet==="arabic-indic"?1632:1776,i=this.userNumeralSet==="arabic-indic"?/[\u0660-\u0669]/g:/[\u06F0-\u06F9]/g;return t.replace(i,n=>String.fromCharCode(48+(n.charCodeAt(0)-e)))}_getTelInputValue(){let t=this.ui.telInput.value.trim();return this._normaliseNumerals(t)}_setTelInputValue(t){this.ui.telInput.value=this._mapAsciiToUserNumerals(t)}_c(){let t=new Promise((i,n)=>{this.b=i,this.c=n}),e=new Promise((i,n)=>{this.d=i,this.e=n});return Promise.all([t,e])}_init(){this.selectedCountryData={},this.g=new AbortController,this._a(),this.ui.generateMarkup(this.countries),this._d(),this._e(),this._h()}_a(){at(this.countries,this.options),ut(this.countries,this.options),dt(this.countries)}_d(t=!1){let e=this.ui.telInput.getAttribute("value"),i=this._normaliseNumerals(e),n=this._getTelInputValue(),s=i&&i.startsWith("+")&&(!n||!n.startsWith("+"))?i:n,a=this._ao(s),u=Y(s),{initialCountry:d,geoIpLookup:c}=this.options,C=d===H.AUTO&&c;if(a&&!u)this._ai(s);else if(!C||t){let I=d?d.toLowerCase():"";q(I)?this._aj(I):a&&u?this._aj(tt.ISO2):this._aj("")}s&&this._ah(s)}_e(){this._j(),this.options.allowDropdown&&this._g(),(this.ui.hiddenInput||this.ui.m)&&this.ui.telInput.form&&this._f()}_f(){let t=()=>{this.ui.hiddenInput&&(this.ui.hiddenInput.value=this.getNumber()),this.ui.m&&(this.ui.m.value=this.selectedCountryData.iso2||"")};this.ui.telInput.form?.addEventListener("submit",t,{signal:this.g.signal})}_g(){let t=this.g.signal,e=s=>{this.ui.dropdownContent.classList.contains(h.HIDE)?this.ui.telInput.focus():s.preventDefault()},i=this.ui.telInput.closest("label");i&&i.addEventListener("click",e,{signal:t});let n=()=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&!this.ui.telInput.disabled&&!this.ui.telInput.readOnly&&this._l()};this.ui.selectedCountry.addEventListener("click",n,{signal:t});let o=s=>{this.ui.dropdownContent.classList.contains(h.HIDE)&&[f.ARROW_UP,f.ARROW_DOWN,f.SPACE,f.ENTER].includes(s.key)&&(s.preventDefault(),s.stopPropagation(),this._l()),s.key===f.TAB&&this._am()};this.ui.countryContainer.addEventListener("keydown",o,{signal:t})}_h(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.options;if(t&&!l.utils){let o=()=>{l.attachUtils(t)?.catch(()=>{})};if(l.documentReady())o();else{let s=()=>{o()};window.addEventListener("load",s,{signal:this.g.signal})}}else this.d();e===H.AUTO&&i&&!this.selectedCountryData.iso2?this._i():this.b()}_i(){l.autoCountry?this.handleAutoCountry():l.startedLoadingAutoCountry||(l.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((t="")=>{let e=t.toLowerCase();q(e)?(l.autoCountry=e,setTimeout(()=>M("handleAutoCountry"))):(this._d(!0),M("rejectAutoCountryPromise"))},()=>{this._d(!0),M("rejectAutoCountryPromise")}))}_m(){this._l(),this.ui.searchInput.value="+",this._ae("")}_j(){this._p(),this._n(),this._o()}_p(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,allowDropdown:n,countrySearch:o}=this.options,s=!1;D.ALPHA_UNICODE.test(this._getTelInputValue())&&(s=!0);let a=u=>{let d=this._getTelInputValue();if(this.i&&u?.data==="+"&&i&&n&&o){let g=this.ui.telInput.selectionStart||0,E=d.substring(0,g-1),b=d.substring(g);this._setTelInputValue(E+b),this._m();return}this._ai(d)&&this._ar();let c=u?.data&&D.NON_PLUS_NUMERIC.test(u.data),C=u?.inputType===$.PASTE&&d;c||C&&!t?s=!0:D.NON_PLUS_NUMERIC.test(d)||(s=!1);let I=u?.detail&&u.detail.isSetNumber,w=this.userNumeralSet==="ascii";if(e&&!s&&!I&&w){let g=this.ui.telInput.selectionStart||0,b=d.substring(0,g).replace(D.NON_PLUS_NUMERIC_GLOBAL,"").length,v=u?.inputType===$.DELETE_FWD,y=this._ap(),L=ht(y,d,l.utils,this.selectedCountryData,this.options.separateDialCode),_=pt(b,L,g,v);this._setTelInputValue(L),this.ui.telInput.setSelectionRange(_,_)}};this.ui.telInput.addEventListener("input",a,{signal:this.g.signal})}_n(){let{strictMode:t,separateDialCode:e,allowDropdown:i,countrySearch:n}=this.options;if(t||e){let o=s=>{if(s.key&&s.key.length===1&&!s.altKey&&!s.ctrlKey&&!s.metaKey){if(e&&i&&n&&s.key==="+"){s.preventDefault(),this._m();return}if(t){let a=this._getTelInputValue(),d=!a.startsWith("+")&&this.ui.telInput.selectionStart===0&&s.key==="+",c=this._normaliseNumerals(s.key),C=/^[0-9]$/.test(c),I=e?C:d||C,w=this.ui.telInput,g=w.selectionStart,E=w.selectionEnd,b=a.slice(0,g),v=a.slice(E),y=b+s.key+v,L=this._ap(y),_=l.utils.getCoreNumber(L,this.selectedCountryData.iso2),W=this.n&&_.length>this.n,mt=this._s(L)!==null;(!I||W&&!mt&&!d)&&s.preventDefault()}}};this.ui.telInput.addEventListener("keydown",o,{signal:this.g.signal})}}_o(){if(this.options.strictMode){let t=e=>{e.preventDefault();let i=this.ui.telInput,n=i.selectionStart,o=i.selectionEnd,s=this._getTelInputValue(),a=s.slice(0,n),u=s.slice(o),d=this.selectedCountryData.iso2,c=e.clipboardData.getData("text"),C=this._normaliseNumerals(c),I=n===0&&o>0,w=!s.startsWith("+")||I,g=C.replace(D.NON_PLUS_NUMERIC_GLOBAL,""),E=g.startsWith("+"),b=g.replace(/\+/g,""),v=E&&w?`+${b}`:b,y=a+v+u;if(y.length>5){let _=l.utils.getCoreNumber(y,d);for(;_.length===0&&y.length>0;)y=y.slice(0,-1),_=l.utils.getCoreNumber(y,d);if(!_)return;if(this.n&&_.length>this.n)if(i.selectionEnd===s.length){let W=_.length-this.n;y=y.slice(0,y.length-W)}else return}this._setTelInputValue(y);let L=n+v.length;i.setSelectionRange(L,L),i.dispatchEvent(new InputEvent("input",{bubbles:!0}))};this.ui.telInput.addEventListener("paste",t,{signal:this.g.signal})}}_k(t){let e=Number(this.ui.telInput.getAttribute("maxlength"));return e&&t.length>e?t.substring(0,e):t}_as(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.ui.telInput.dispatchEvent(i)}_l(){let{fixDropdownWidth:t,countrySearch:e}=this.options;if(this.h=new AbortController,t&&(this.ui.dropdownContent.style.width=`${this.ui.telInput.offsetWidth}px`),this.ui.dropdownContent.classList.remove(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"true"),this._x(),e){let i=this.ui.countryList.firstElementChild;i&&(this.ui.highlightListItem(i,!1),this.ui.countryList.scrollTop=0),this.ui.searchInput.focus()}this._y(),this.ui.dropdownArrow.classList.add(h.ARROW_UP),this._as(A.OPEN_COUNTRY_DROPDOWN)}_x(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.ui.dropdown),!this.options.useFullscreenPopup){let t=this.ui.telInput.getBoundingClientRect(),e=this.ui.telInput.offsetHeight;if(this.options.dropdownContainer){this.ui.dropdown.style.top=`${t.top+e}px`,this.ui.dropdown.style.left=`${t.left}px`;let i=()=>this._am();window.addEventListener("scroll",i,{signal:this.h.signal})}}}_y(){let t=this.h.signal;this._z(t),this._aa(t),this._ab(t),this._ac(t),this.options.countrySearch&&this._ad(t)}_z(t){let e=i=>{let n=i.target?.closest(`.${h.COUNTRY_ITEM}`);n&&this.ui.highlightListItem(n,!1)};this.ui.countryList.addEventListener("mouseover",e,{signal:t})}_aa(t){let e=i=>{let n=i.target?.closest(`.${h.COUNTRY_ITEM}`);n&&this._al(n)};this.ui.countryList.addEventListener("click",e,{signal:t})}_ab(t){let e=i=>{!!i.target.closest(`#iti-${this.id}__dropdown-content`)||this._am()};setTimeout(()=>{document.documentElement.addEventListener("click",e,{signal:t})},0)}_ac(t){let e="",i=null,n=o=>{[f.ARROW_UP,f.ARROW_DOWN,f.ENTER,f.ESC].includes(o.key)&&(o.preventDefault(),o.stopPropagation(),o.key===f.ARROW_UP||o.key===f.ARROW_DOWN?this._af(o.key):o.key===f.ENTER?this._ag():o.key===f.ESC&&(this._am(),this.ui.selectedCountry.focus())),!this.options.countrySearch&&D.HIDDEN_SEARCH_CHAR.test(o.key)&&(o.stopPropagation(),i&&clearTimeout(i),e+=o.key.toLowerCase(),this._q(e),i=setTimeout(()=>{e=""},Z.HIDDEN_SEARCH_RESET_MS))};document.addEventListener("keydown",n,{signal:t})}_ad(t){let e=()=>{let s=this.ui.searchInput.value.trim();this._ae(s),this.ui.searchInput.value?this.ui.k.classList.remove(h.HIDE):this.ui.k.classList.add(h.HIDE)},i=null,n=()=>{i&&clearTimeout(i),i=setTimeout(()=>{e(),i=null},100)};this.ui.searchInput.addEventListener("input",n,{signal:t});let o=()=>{this.ui.searchInput.value="",this.ui.searchInput.focus(),e()};this.ui.k.addEventListener("click",o,{signal:t})}_q(t){let e=nt(this.countries,t);if(e){let i=e.nodeById[this.id];this.ui.highlightListItem(i,!1),this.ui.scrollTo(i)}}_ae(t){let e;t===""?e=this.countries:e=it(this.countries,t),this.ui.filterCountries(e)}_af(t){let e=t===f.ARROW_UP?this.ui.highlightedItem?.previousElementSibling:this.ui.highlightedItem?.nextElementSibling;!e&&this.ui.countryList.childElementCount>1&&(e=t===f.ARROW_UP?this.ui.countryList.lastElementChild:this.ui.countryList.firstElementChild),e&&(this.ui.scrollTo(e),this.ui.highlightListItem(e,!1))}_ag(){this.ui.highlightedItem&&this._al(this.ui.highlightedItem)}_ah(t){let e=t;if(this.options.formatOnDisplay&&l.utils&&this.selectedCountryData){let i=this.options.nationalMode||!e.startsWith("+")&&!this.options.separateDialCode,{NATIONAL:n,INTERNATIONAL:o}=l.utils.numberFormat,s=i?n:o;e=l.utils.formatNumber(e,this.selectedCountryData.iso2,s)}e=this._aq(e),this._setTelInputValue(e)}_ai(t){let e=this._s(t);return e!==null?this._aj(e):!1}_r(t){let{dialCode:e,nationalPrefix:i}=this.selectedCountryData;if(t.startsWith("+")||!e)return t;let s=i&&t.startsWith(i)&&!this.options.separateDialCode?t.substring(1):t;return`+${e}${s}`}_s(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.selectedCountryData.iso2,o=this.selectedCountryData.dialCode;i=this._r(i);let s=this._ao(i,!0),a=T(i);if(s){let u=T(s),d=this.dialCodeToIso2Map[u];if(d.length===1)return d[0]===n?null:d[0];if(!n&&this.f&&d.includes(this.f))return this.f;if(o===x.NANP&&Y(a))return null;let{areaCodes:C,priority:I}=this.selectedCountryData;if(C){let v=C.map(y=>`${o}${y}`);for(let y of v)if(a.startsWith(y))return null}let g=C&&!(I===0)&&a.length>u.length,E=n&&d.includes(n)&&!g,b=n===d[0];if(!E&&!b)return d[0]}else if(i.startsWith("+")&&a.length){let u=this.selectedCountryData.dialCode||"";return u&&u.startsWith(a)?null:""}else if((!i||i==="+")&&!n)return this.f;return null}_aj(t){let{separateDialCode:e,showFlags:i,i18n:n}=this.options,o=this.selectedCountryData.iso2||"";if(this.selectedCountryData=t?this.j.get(t):{},this.selectedCountryData.iso2&&(this.f=this.selectedCountryData.iso2),this.ui.selectedCountry){let s=t&&i?`${h.FLAG} iti__${t}`:`${h.FLAG} ${h.GLOBE}`,a,u;if(t){let{name:d,dialCode:c}=this.selectedCountryData;u=d,a=n.selectedCountryAriaLabel.replace("${countryName}",d).replace("${dialCode}",`+${c}`)}else u=n.noCountrySelected,a=n.noCountrySelected;this.ui.selectedCountryInner.className=s,this.ui.selectedCountry.setAttribute("title",u),this.ui.selectedCountry.setAttribute(p.LABEL,a)}if(e){let s=this.selectedCountryData.dialCode?`+${this.selectedCountryData.dialCode}`:"";this.ui.selectedDialCode.textContent=s,this.ui.updateInputPadding()}return this._ak(),this._t(),o!==t}_t(){let{strictMode:t,placeholderNumberType:e,validationNumberTypes:i}=this.options,{iso2:n}=this.selectedCountryData;if(t&&l.utils)if(n){let o=l.utils.numberType[e],s=l.utils.getExampleNumber(n,!1,o,!0),a=s;for(;l.utils.isPossibleNumber(s,n,i);)a=s,s+="0";let u=l.utils.getCoreNumber(a,n);this.n=u.length,n==="by"&&(this.n=u.length+1)}else this.n=null}_ak(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:n}=this.options,o=t===S.AGGRESSIVE||!this.ui.a&&t===S.POLITE;if(l.utils&&o){let s=l.utils.numberType[e],a=this.selectedCountryData.iso2?l.utils.getExampleNumber(this.selectedCountryData.iso2,i,s):"";a=this._aq(a),typeof n=="function"&&(a=n(a,this.selectedCountryData)),this.ui.telInput.setAttribute("placeholder",a)}}_al(t){let e=t.dataset[K.COUNTRY_CODE],i=this._aj(e);this._am();let n=t.dataset[K.DIAL_CODE];if(this._an(n),this.options.formatOnDisplay){let o=this._getTelInputValue();this._ah(o)}this.ui.telInput.focus(),i&&this._ar()}_am(){this.ui.dropdownContent.classList.contains(h.HIDE)||(this.ui.dropdownContent.classList.add(h.HIDE),this.ui.selectedCountry.setAttribute(p.EXPANDED,"false"),this.ui.highlightedItem&&this.ui.highlightedItem.setAttribute(p.SELECTED,"false"),this.options.countrySearch&&this.ui.searchInput.removeAttribute(p.ACTIVE_DESCENDANT),this.ui.dropdownArrow.classList.remove(h.ARROW_UP),this.h.abort(),this.h=null,this.options.dropdownContainer&&this.ui.dropdown.remove(),this._as(A.CLOSE_COUNTRY_DROPDOWN))}_an(t){let e=this._getTelInputValue(),i=`+${t}`,n;if(e.startsWith("+")){let o=this._ao(e);o?n=e.replace(o,i):n=i,this._setTelInputValue(n)}}_ao(t,e){let i="";if(t.startsWith("+")){let n="",o=!1;for(let s=0;s<t.length;s++){let a=t.charAt(s);if(/[0-9]/.test(a)){if(n+=a,!!!this.dialCodeToIso2Map[n])break;if(this.dialCodes.has(n)){if(i=t.substring(0,s+1),o=!0,!e)break}else e&&o&&(i=t.substring(0,s+1));if(n.length===this.dialCodeMaxLen)break}}}return i}_ap(t){let e=t?this._normaliseNumerals(t):this._getTelInputValue(),{dialCode:i}=this.selectedCountryData,n,o=T(e);return this.options.separateDialCode&&!e.startsWith("+")&&i&&o?n=`+${i}`:n="",n+e}_aq(t){let e=this._ao(t),i=ct(t,e,this.options.separateDialCode,this.selectedCountryData);return this._k(i)}_ar(){this._as(A.COUNTRY_CHANGE)}handleAutoCountry(){this.options.initialCountry===H.AUTO&&l.autoCountry&&(this.f=l.autoCountry,this.selectedCountryData.iso2||this.ui.selectedCountryInner.classList.contains(h.GLOBE)||this.setCountry(this.f),this.b())}handleUtils(){if(l.utils){let t=this._getTelInputValue();t&&this._ah(t),this.selectedCountryData.iso2&&(this._ak(),this._t())}this.d()}destroy(){this.ui.telInput&&(this.options.allowDropdown&&this._am(),this.g.abort(),this.g=null,this.ui.destroy(),l.instances instanceof Map?l.instances.delete(this.id):delete l.instances[this.id])}getExtension(){return l.utils?l.utils.getExtension(this._ap(),this.selectedCountryData.iso2):""}getNumber(t){if(l.utils){let{iso2:e}=this.selectedCountryData,i=this._ap(),n=l.utils.formatNumber(i,e,t);return this._mapAsciiToUserNumerals(n)}return""}getNumberType(){return l.utils?l.utils.getNumberType(this._ap(),this.selectedCountryData.iso2):G.UNKNOWN_NUMBER_TYPE}getSelectedCountryData(){return this.selectedCountryData}getValidationError(){if(l.utils){let{iso2:t}=this.selectedCountryData;return l.utils.getValidationError(this._ap(),t)}return G.UNKNOWN_VALIDATION_ERROR}isValidNumber(){let{dialCode:t,iso2:e}=this.selectedCountryData;if(t===R.DIAL_CODE&&l.utils){let i=this._ap(),n=l.utils.getCoreNumber(i,e);if(n[0]===R.MOBILE_PREFIX&&n.length!==R.MOBILE_CORE_LENGTH)return!1}return this._v(!1)}isValidNumberPrecise(){return this._v(!0)}_u(t){return l.utils?l.utils.isPossibleNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}_v(t){if(!l.utils)return null;if(!this.selectedCountryData.iso2)return!1;let e=s=>t?this._w(s):this._u(s),i=this._ap(),n=i.search(D.ALPHA_UNICODE);if(n>-1&&!this.options.allowPhonewords){let s=i.substring(0,n),a=e(s),u=e(i);return a&&u}return e(i)}_w(t){return l.utils?l.utils.isValidNumber(t,this.selectedCountryData.iso2,this.options.validationNumberTypes):null}setCountry(t){let e=t?.toLowerCase();if(!q(e))throw new Error(`Invalid country code: '${e}'`);let i=this.selectedCountryData.iso2;if(t&&e!==i||!t&&i){if(this._aj(e),this._an(this.selectedCountryData.dialCode),this.options.formatOnDisplay){let o=this._getTelInputValue();this._ah(o)}this._ar()}}setNumber(t){let e=this._normaliseNumerals(t),i=this._ai(e);this._ah(e),i&&this._ar(),this._as(A.INPUT,{isSetNumber:!0})}setPlaceholderNumberType(t){this.options.placeholderNumberType=t,this._ak()}setDisabled(t){this.ui.telInput.disabled=t,t?this.ui.selectedCountry.setAttribute("disabled","true"):this.ui.selectedCountry.removeAttribute("disabled")}},At=r=>{if(!l.utils&&!l.startedLoadingUtilsScript){let t;if(typeof r=="function")try{t=Promise.resolve(r())}catch(e){return Promise.reject(e)}else return Promise.reject(new TypeError(`The argument passed to attachUtils must be a function that returns a promise for the utilities module, not ${typeof r}`));return l.startedLoadingUtilsScript=!0,t.then(e=>{let i=e?.default;if(!i||typeof i!="object")throw new TypeError("The loader function passed to attachUtils did not resolve to a module object with utils as its default export.");return l.utils=i,M("handleUtils"),!0}).catch(e=>{throw M("rejectUtilsScriptPromise",e),e})}return null},M=(r,...t)=>{Object.values(l.instances).forEach(e=>{let i=e[r];typeof i=="function"&&i.apply(e,t)})},l=Object.assign((r,t)=>{let e=new B(r,t);return l.instances[e.id]=e,r.iti=e,e},{defaults:j,documentReady:()=>document.readyState==="complete",getCountryData:()=>N,getInstance:r=>{let t=r.dataset.intlTelInputId;return t?l.instances[t]:null},instances:{},attachUtils:At,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.13.0"}),St=l;return bt(Pt);})();
28
28
 
29
29
  // UMD
30
30
  return factoryOutput.default;