intl-tel-input 25.10.1 → 25.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -77,16 +77,16 @@ _Note: We have now dropped support for all versions of Internet Explorer because
77
77
  ## Getting Started (Using a CDN)
78
78
  1. Add the CSS
79
79
  ```html
80
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.1/build/css/intlTelInput.css">
80
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.3/build/css/intlTelInput.css">
81
81
  ```
82
82
 
83
83
  2. Add the plugin script and initialise it on your input element
84
84
  ```html
85
- <script src="https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.1/build/js/intlTelInput.min.js"></script>
85
+ <script src="https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.3/build/js/intlTelInput.min.js"></script>
86
86
  <script>
87
87
  const input = document.querySelector("#phone");
88
88
  window.intlTelInput(input, {
89
- loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.1/build/js/utils.js"),
89
+ loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.3/build/js/utils.js"),
90
90
  });
91
91
  </script>
92
92
  ```
@@ -326,7 +326,7 @@ The `loadUtils` option takes a function which returns a Promise which resolves t
326
326
  ```js
327
327
  // (A) import utils module from a CDN
328
328
  intlTelInput(htmlInputElement, {
329
- loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.1/build/js/utils.js"),
329
+ loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.3/build/js/utils.js"),
330
330
  });
331
331
 
332
332
  // (B) import utils module from your own hosted version of utils.js
@@ -610,7 +610,7 @@ The `loadUtils` option takes a function which returns a Promise which resolves t
610
610
  ```js
611
611
  // (A) import utils module from a CDN
612
612
  intlTelInput(htmlInputElement, {
613
- loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.1/build/js/utils.js"),
613
+ loadUtils: () => import("https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.3/build/js/utils.js"),
614
614
  });
615
615
 
616
616
  // (B) import utils module from your own hosted version of utils.js
package/angular/README.md CHANGED
@@ -29,7 +29,7 @@ import "intl-tel-input/styles";
29
29
 
30
30
  See the [Validation demo](https://github.com/jackocnr/intl-tel-input/blob/master/angular/demo/validation/validation.component.ts) for a more fleshed-out example of how to handle validation.
31
31
 
32
- A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/angularWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/angular"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.1/build/js/utils.js"`.
32
+ A note on the utils script (~260KB): if you're lazy loading the IntlTelInput chunk (and so less worried about filesize) then you can just import IntlTelInput from `"intl-tel-input/angularWithUtils"`, to include the utils script. Alternatively, if you use the main `"intl-tel-input/angular"` import, then you should couple this with the `loadUtils` initialisation option - you will need to host the [utils.js](https://github.com/jackocnr/intl-tel-input/blob/master/build/js/utils.js) file, and then set the `loadUtils` option to that URL, or alternatively just point it to a CDN hosted version e.g. `"https://cdn.jsdelivr.net/npm/intl-tel-input@25.10.3/build/js/utils.js"`.
33
33
 
34
34
  ## Props
35
35
  Here's a list of all of the current props you can pass to the IntlTelInput Angular component.
@@ -3119,7 +3119,7 @@ var intlTelInput = Object.assign((input, options) => {
3119
3119
  attachUtils,
3120
3120
  startedLoadingUtilsScript: false,
3121
3121
  startedLoadingAutoCountry: false,
3122
- version: "25.10.1"
3122
+ version: "25.10.3"
3123
3123
  });
3124
3124
  var intl_tel_input_default = intlTelInput;
3125
3125
 
@@ -3168,10 +3168,19 @@ var IntlTelInputComponent = class {
3168
3168
  }
3169
3169
  }
3170
3170
  ngAfterViewInit() {
3171
- var _a;
3171
+ var _a, _b;
3172
3172
  if (this.initialValue) {
3173
3173
  (_a = this.iti) === null || _a === void 0 ? void 0 : _a.setNumber(this.initialValue);
3174
3174
  }
3175
+ if (this.disabled) {
3176
+ (_b = this.iti) === null || _b === void 0 ? void 0 : _b.setDisabled(this.disabled);
3177
+ }
3178
+ }
3179
+ ngOnChanges(changes) {
3180
+ var _a;
3181
+ if (changes["disabled"]) {
3182
+ (_a = this.iti) === null || _a === void 0 ? void 0 : _a.setDisabled(this.disabled || false);
3183
+ }
3175
3184
  }
3176
3185
  handleInput() {
3177
3186
  if (!this.iti)
@@ -3213,8 +3222,8 @@ var IntlTelInputComponent = class {
3213
3222
  }
3214
3223
  // ============ ControlValueAccessor Implementation ============
3215
3224
  writeValue(value) {
3216
- if (this.iti && value) {
3217
- this.iti.setNumber(value);
3225
+ if (this.iti) {
3226
+ this.iti.setNumber(value || "");
3218
3227
  }
3219
3228
  }
3220
3229
  registerOnChange(fn) {
@@ -3224,7 +3233,9 @@ var IntlTelInputComponent = class {
3224
3233
  this.onTouched = fn;
3225
3234
  }
3226
3235
  setDisabledState(isDisabled) {
3236
+ var _a;
3227
3237
  this.disabled = isDisabled;
3238
+ (_a = this.iti) === null || _a === void 0 ? void 0 : _a.setDisabled(isDisabled);
3228
3239
  }
3229
3240
  // ============ Validator Implementation ============
3230
3241
  validate(control) {
@@ -3269,7 +3280,7 @@ IntlTelInputComponent.\u0275cmp = /* @__PURE__ */ i0.\u0275\u0275defineComponent
3269
3280
  useExisting: forwardRef(() => IntlTelInputComponent),
3270
3281
  multi: true
3271
3282
  }
3272
- ])], decls: 2, vars: 1, consts: [["inputRef", ""], ["type", "tel", 3, "input", "blur", "disabled"]], template: function IntlTelInputComponent_Template(rf, ctx) {
3283
+ ]), i0.\u0275\u0275NgOnChangesFeature], decls: 2, vars: 0, consts: [["inputRef", ""], ["type", "tel", 3, "input", "blur"]], template: function IntlTelInputComponent_Template(rf, ctx) {
3273
3284
  if (rf & 1) {
3274
3285
  const _r1 = i0.\u0275\u0275getCurrentView();
3275
3286
  i0.\u0275\u0275elementStart(0, "input", 1, 0);
@@ -3282,9 +3293,6 @@ IntlTelInputComponent.\u0275cmp = /* @__PURE__ */ i0.\u0275\u0275defineComponent
3282
3293
  });
3283
3294
  i0.\u0275\u0275elementEnd();
3284
3295
  }
3285
- if (rf & 2) {
3286
- i0.\u0275\u0275property("disabled", ctx.disabled);
3287
- }
3288
3296
  }, encapsulation: 2 });
3289
3297
  (() => {
3290
3298
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.\u0275setClassMetadata(IntlTelInputComponent, [{
@@ -3298,7 +3306,6 @@ IntlTelInputComponent.\u0275cmp = /* @__PURE__ */ i0.\u0275\u0275defineComponent
3298
3306
  #inputRef
3299
3307
  (input)="handleInput()"
3300
3308
  (blur)="handleBlur()"
3301
- [disabled]="disabled"
3302
3309
  />
3303
3310
  `,
3304
3311
  providers: [
@@ -3338,7 +3345,7 @@ IntlTelInputComponent.\u0275cmp = /* @__PURE__ */ i0.\u0275\u0275defineComponent
3338
3345
  }] });
3339
3346
  })();
3340
3347
  (() => {
3341
- (typeof ngDevMode === "undefined" || ngDevMode) && i0.\u0275setClassDebugInfo(IntlTelInputComponent, { className: "IntlTelInputComponent", filePath: "intl-tel-input/angular.ts", lineNumber: 42 });
3348
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.\u0275setClassDebugInfo(IntlTelInputComponent, { className: "IntlTelInputComponent", filePath: "intl-tel-input/angular.ts", lineNumber: 41 });
3342
3349
  })();
3343
3350
  export {
3344
3351
  IntlTelInputComponent,
@@ -3119,7 +3119,7 @@ var intlTelInput = Object.assign((input, options) => {
3119
3119
  attachUtils,
3120
3120
  startedLoadingUtilsScript: false,
3121
3121
  startedLoadingAutoCountry: false,
3122
- version: "25.10.1"
3122
+ version: "25.10.3"
3123
3123
  });
3124
3124
  var intl_tel_input_default = intlTelInput;
3125
3125
 
@@ -9605,10 +9605,19 @@ var IntlTelInputComponent = class {
9605
9605
  }
9606
9606
  }
9607
9607
  ngAfterViewInit() {
9608
- var _a;
9608
+ var _a, _b;
9609
9609
  if (this.initialValue) {
9610
9610
  (_a = this.iti) === null || _a === void 0 ? void 0 : _a.setNumber(this.initialValue);
9611
9611
  }
9612
+ if (this.disabled) {
9613
+ (_b = this.iti) === null || _b === void 0 ? void 0 : _b.setDisabled(this.disabled);
9614
+ }
9615
+ }
9616
+ ngOnChanges(changes) {
9617
+ var _a;
9618
+ if (changes["disabled"]) {
9619
+ (_a = this.iti) === null || _a === void 0 ? void 0 : _a.setDisabled(this.disabled || false);
9620
+ }
9612
9621
  }
9613
9622
  handleInput() {
9614
9623
  if (!this.iti)
@@ -9650,8 +9659,8 @@ var IntlTelInputComponent = class {
9650
9659
  }
9651
9660
  // ============ ControlValueAccessor Implementation ============
9652
9661
  writeValue(value) {
9653
- if (this.iti && value) {
9654
- this.iti.setNumber(value);
9662
+ if (this.iti) {
9663
+ this.iti.setNumber(value || "");
9655
9664
  }
9656
9665
  }
9657
9666
  registerOnChange(fn) {
@@ -9661,7 +9670,9 @@ var IntlTelInputComponent = class {
9661
9670
  this.onTouched = fn;
9662
9671
  }
9663
9672
  setDisabledState(isDisabled) {
9673
+ var _a;
9664
9674
  this.disabled = isDisabled;
9675
+ (_a = this.iti) === null || _a === void 0 ? void 0 : _a.setDisabled(isDisabled);
9665
9676
  }
9666
9677
  // ============ Validator Implementation ============
9667
9678
  validate(control) {
@@ -9706,7 +9717,7 @@ IntlTelInputComponent.\u0275cmp = /* @__PURE__ */ i0.\u0275\u0275defineComponent
9706
9717
  useExisting: forwardRef(() => IntlTelInputComponent),
9707
9718
  multi: true
9708
9719
  }
9709
- ])], decls: 2, vars: 1, consts: [["inputRef", ""], ["type", "tel", 3, "input", "blur", "disabled"]], template: function IntlTelInputComponent_Template(rf, ctx) {
9720
+ ]), i0.\u0275\u0275NgOnChangesFeature], decls: 2, vars: 0, consts: [["inputRef", ""], ["type", "tel", 3, "input", "blur"]], template: function IntlTelInputComponent_Template(rf, ctx) {
9710
9721
  if (rf & 1) {
9711
9722
  const _r1 = i0.\u0275\u0275getCurrentView();
9712
9723
  i0.\u0275\u0275elementStart(0, "input", 1, 0);
@@ -9719,9 +9730,6 @@ IntlTelInputComponent.\u0275cmp = /* @__PURE__ */ i0.\u0275\u0275defineComponent
9719
9730
  });
9720
9731
  i0.\u0275\u0275elementEnd();
9721
9732
  }
9722
- if (rf & 2) {
9723
- i0.\u0275\u0275property("disabled", ctx.disabled);
9724
- }
9725
9733
  }, encapsulation: 2 });
9726
9734
  (() => {
9727
9735
  (typeof ngDevMode === "undefined" || ngDevMode) && i0.\u0275setClassMetadata(IntlTelInputComponent, [{
@@ -9735,7 +9743,6 @@ IntlTelInputComponent.\u0275cmp = /* @__PURE__ */ i0.\u0275\u0275defineComponent
9735
9743
  #inputRef
9736
9744
  (input)="handleInput()"
9737
9745
  (blur)="handleBlur()"
9738
- [disabled]="disabled"
9739
9746
  />
9740
9747
  `,
9741
9748
  providers: [
@@ -9775,7 +9782,7 @@ IntlTelInputComponent.\u0275cmp = /* @__PURE__ */ i0.\u0275\u0275defineComponent
9775
9782
  }] });
9776
9783
  })();
9777
9784
  (() => {
9778
- (typeof ngDevMode === "undefined" || ngDevMode) && i0.\u0275setClassDebugInfo(IntlTelInputComponent, { className: "IntlTelInputComponent", filePath: "intl-tel-input/angularwithutils.ts", lineNumber: 43 });
9785
+ (typeof ngDevMode === "undefined" || ngDevMode) && i0.\u0275setClassDebugInfo(IntlTelInputComponent, { className: "IntlTelInputComponent", filePath: "intl-tel-input/angularwithutils.ts", lineNumber: 42 });
9779
9786
  })();
9780
9787
  export {
9781
9788
  IntlTelInputComponent,
@@ -1,11 +1,11 @@
1
1
  import intlTelInput from "../intl-tel-input";
2
2
  import { Iti, SomeOptions } from "../intl-tel-input";
3
- import { OnInit, OnDestroy, ElementRef, EventEmitter, AfterViewInit } from "@angular/core";
3
+ import { OnInit, OnDestroy, ElementRef, EventEmitter, AfterViewInit, OnChanges, SimpleChanges } from "@angular/core";
4
4
  import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from "@angular/forms";
5
5
  import * as i0 from "@angular/core";
6
6
  export { intlTelInput };
7
7
  export declare const PHONE_ERROR_MESSAGES: string[];
8
- export declare class IntlTelInputComponent implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, Validator {
8
+ export declare class IntlTelInputComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges, ControlValueAccessor, Validator {
9
9
  inputRef: ElementRef<HTMLInputElement>;
10
10
  initialValue: string;
11
11
  usePreciseValidation: boolean;
@@ -23,6 +23,7 @@ export declare class IntlTelInputComponent implements OnInit, AfterViewInit, OnD
23
23
  private onValidatorChange;
24
24
  ngOnInit(): void;
25
25
  ngAfterViewInit(): void;
26
+ ngOnChanges(changes: SimpleChanges): void;
26
27
  handleInput(): void;
27
28
  handleBlur(): void;
28
29
  getInstance(): Iti | null;
@@ -1,11 +1,11 @@
1
1
  import intlTelInput from "./intlTelInputWithUtils";
2
2
  import { Iti, SomeOptions } from "../intl-tel-input";
3
- import { OnInit, OnDestroy, ElementRef, EventEmitter, AfterViewInit } from "@angular/core";
3
+ import { OnInit, OnDestroy, ElementRef, EventEmitter, AfterViewInit, OnChanges, SimpleChanges } from "@angular/core";
4
4
  import { ControlValueAccessor, Validator, AbstractControl, ValidationErrors } from "@angular/forms";
5
5
  import * as i0 from "@angular/core";
6
6
  export { intlTelInput };
7
7
  export declare const PHONE_ERROR_MESSAGES: string[];
8
- export declare class IntlTelInputComponent implements OnInit, AfterViewInit, OnDestroy, ControlValueAccessor, Validator {
8
+ export declare class IntlTelInputComponent implements OnInit, AfterViewInit, OnDestroy, OnChanges, ControlValueAccessor, Validator {
9
9
  inputRef: ElementRef<HTMLInputElement>;
10
10
  initialValue: string;
11
11
  usePreciseValidation: boolean;
@@ -23,6 +23,7 @@ export declare class IntlTelInputComponent implements OnInit, AfterViewInit, OnD
23
23
  private onValidatorChange;
24
24
  ngOnInit(): void;
25
25
  ngAfterViewInit(): void;
26
+ ngOnChanges(changes: SimpleChanges): void;
26
27
  handleInput(): void;
27
28
  handleBlur(): void;
28
29
  getInstance(): Iti | null;
package/build/js/data.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v25.10.1
2
+ * International Telephone Input v25.10.3
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v25.10.1
2
+ * International Telephone Input v25.10.3
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v25.10.1
2
+ * International Telephone Input v25.10.3
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -3287,7 +3287,7 @@ var factoryOutput = (() => {
3287
3287
  attachUtils,
3288
3288
  startedLoadingUtilsScript: false,
3289
3289
  startedLoadingAutoCountry: false,
3290
- version: "25.10.1"
3290
+ version: "25.10.3"
3291
3291
  }
3292
3292
  );
3293
3293
  var intl_tel_input_default = intlTelInput;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v25.10.1
2
+ * International Telephone Input v25.10.3
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -24,7 +24,7 @@ var factoryOutput=(()=>{var w=Object.defineProperty;var P=Object.getOwnPropertyD
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(#${f})" />
27
- </svg>`,this.m5=m("span",{class:"iti__a11y-text"},this.m0),this.m4=m("div",{class:"iti__no-results iti__hide","aria-hidden":"true"},this.m0),this.m4.textContent=c.zeroSearchResults}if(this.countryList=m("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox","aria-label":c.countryListAriaLabel},this.m0),this._g(),C&&this._p4(),r){let y=a._buildClassNames({iti:!0,"iti--container":!0,"iti--fullscreen-popup":d,"iti--inline-dropdown":!d,[n]:!!n});this.dropdown=m("div",{class:y}),this.dropdown.appendChild(this.m0)}else this.k.appendChild(this.m0)}}if(g.appendChild(this.a),this.k&&(this._z3(),this.k.classList.remove("iti__v-hide")),s){let u=this.a.getAttribute("name")||"",h=s(u);if(h.phone){let y=this.a.form?.querySelector(`input[name="${h.phone}"]`);y?this.hiddenInput=y:(this.hiddenInput=m("input",{type:"hidden",name:h.phone}),g.appendChild(this.hiddenInput))}if(h.country){let y=this.a.form?.querySelector(`input[name="${h.country}"]`);y?this.m9=y:(this.m9=m("input",{type:"hidden",name:h.country}),g.appendChild(this.m9))}}}_g(){for(let t=0;t<this.countries.length;t++){let e=this.countries[t],i=t===0?"iti__highlight":"",n=m("li",{id:`iti-${this.id}__item-${e.iso2}`,class:`iti__country ${i}`,tabindex:"-1",role:"option","data-dial-code":e.dialCode,"data-country-code":e.iso2,"aria-selected":"false"},this.countryList);e.nodeById[this.id]=n;let s="";this.options.showFlags&&(s+=`<div class='iti__flag iti__${e.iso2}'></div>`),s+=`<span class='iti__country-name'>${e.name}</span>`,s+=`<span class='iti__dial-code' dir='ltr'>+${e.dialCode}</span>`,n.insertAdjacentHTML("beforeend",s)}}_h(t=!1){let e=this.a.getAttribute("value"),i=this.a.value,s=e&&e.charAt(0)==="+"&&(!i||i.charAt(0)!=="+")?e:i,r=this._5(s),o=A(s),{initialCountry:d,geoIpLookup:C}=this.options,c=d==="auto"&&C;if(r&&!o)this._v(s);else if(!c||t){let p=d?d.toLowerCase():"";p&&this._y(p,!0)?this._z(p):r&&o?this._z("us"):this._z()}s&&this._u(s)}_i(){this._j(),this.options.allowDropdown&&this._i2(),(this.hiddenInput||this.m9)&&this.a.form&&this._i0()}_i0(){this._a14=()=>{this.hiddenInput&&(this.hiddenInput.value=this.getNumber()),this.m9&&(this.m9.value=this.getSelectedCountryData().iso2||"")},this.a.form?.addEventListener("submit",this._a14)}_i2(){this._a9=e=>{this.m0.classList.contains("iti__hide")?this.a.focus():e.preventDefault()};let t=this.a.closest("label");t&&t.addEventListener("click",this._a9),this._a10=()=>{this.m0.classList.contains("iti__hide")&&!this.a.disabled&&!this.a.readOnly&&this._openDropdown()},this.selectedCountry.addEventListener("click",this._a10),this._a11=e=>{this.m0.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this._openDropdown()),e.key==="Tab"&&this._2()},this.k.addEventListener("keydown",this._a11)}_i3(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.options;t&&!l.utils?(this._a8=()=>{window.removeEventListener("load",this._a8),l.attachUtils(t)?.catch(()=>{})},l.documentReady()?this._a8():window.addEventListener("load",this._a8)):this.i0(),e==="auto"&&i&&!this.s.iso2?this._i4():this.h()}_i4(){l.autoCountry?this.handleAutoCountry():l.startedLoadingAutoCountry||(l.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((t="")=>{let e=t.toLowerCase();e&&this._y(e,!0)?(l.autoCountry=e,setTimeout(()=>b("handleAutoCountry"))):(this._h(!0),b("rejectAutoCountryPromise"))},()=>{this._h(!0),b("rejectAutoCountryPromise")}))}_n0(){this._openDropdown(),this.m1.value="+",this._p3("",!0)}_j(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,allowDropdown:n,countrySearch:s}=this.options,r=!1;/\p{L}/u.test(this.a.value)&&(r=!0),this._a12=o=>{if(this.x&&o?.data==="+"&&i&&n&&s){let p=this.a.selectionStart||0,g=this.a.value.substring(0,p-1),u=this.a.value.substring(p);this.a.value=g+u,this._n0();return}this._v(this.a.value)&&this._8();let d=o?.data&&/[^+0-9]/.test(o.data),C=o?.inputType==="insertFromPaste"&&this.a.value;d||C&&!t?r=!0:/[^+0-9]/.test(this.a.value)||(r=!1);let c=o?.detail&&o.detail.isSetNumber;if(e&&!r&&!c){let p=this.a.selectionStart||0,u=this.a.value.substring(0,p).replace(/[^+0-9]/g,"").length,h=o?.inputType==="deleteContentForward",y=this._9(),f=W(u,y,p,h);this.a.value=y,this.a.setSelectionRange(f,f)}},this.a.addEventListener("input",this._a12),(t||i)&&(this._a5=o=>{if(o.key&&o.key.length===1&&!o.altKey&&!o.ctrlKey&&!o.metaKey){if(i&&n&&s&&o.key==="+"){o.preventDefault(),this._n0();return}if(t){let d=this.a.value,c=!(d.charAt(0)==="+")&&this.a.selectionStart===0&&o.key==="+",p=/^[0-9]$/.test(o.key),g=i?p:c||p,u=d.slice(0,this.a.selectionStart)+o.key+d.slice(this.a.selectionEnd),h=this._6(u),y=l.utils.getCoreNumber(h,this.s.iso2),f=this.n0&&y.length>this.n0,k=this._v0(h)!==null;(!g||f&&!k&&!c)&&o.preventDefault()}}},this.a.addEventListener("keydown",this._a5))}_j2(t){let e=parseInt(this.a.getAttribute("maxlength")||"",10);return e&&t.length>e?t.substring(0,e):t}_trigger(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.a.dispatchEvent(i)}_openDropdown(){let{fixDropdownWidth:t,countrySearch:e}=this.options;if(t&&(this.m0.style.width=`${this.a.offsetWidth}px`),this.m0.classList.remove("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","true"),this._o(),e){let i=this.countryList.firstElementChild;i&&(this._x(i,!1),this.countryList.scrollTop=0),this.m1.focus()}this._p(),this.u.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}_o(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.options.useFullscreenPopup){let t=this.a.getBoundingClientRect(),e=this.a.offsetHeight;this.options.dropdownContainer&&(this.dropdown.style.top=`${t.top+e}px`,this.dropdown.style.left=`${t.left}px`,this._a4=()=>this._2(),window.addEventListener("scroll",this._a4))}}_p(){this._a0=i=>{let n=i.target?.closest(".iti__country");n&&this._x(n,!1)},this.countryList.addEventListener("mouseover",this._a0),this._a1=i=>{let n=i.target?.closest(".iti__country");n&&this._1(n)},this.countryList.addEventListener("click",this._a1),this._a2=i=>{!!i.target.closest(`#iti-${this.id}__dropdown-content`)||this._2()},setTimeout(()=>{document.documentElement.addEventListener("click",this._a2)},0);let t="",e=null;if(this._a3=i=>{["ArrowUp","ArrowDown","Enter","Escape"].includes(i.key)&&(i.preventDefault(),i.stopPropagation(),i.key==="ArrowUp"||i.key==="ArrowDown"?this._q(i.key):i.key==="Enter"?this._r():i.key==="Escape"&&this._2()),!this.options.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(i.key)&&(i.stopPropagation(),e&&clearTimeout(e),t+=i.key.toLowerCase(),this._p0(t),e=setTimeout(()=>{t=""},1e3))},document.addEventListener("keydown",this._a3),this.options.countrySearch){let i=()=>{let s=this.m1.value.trim();s?this._p3(s):this._p3("",!0),this.m1.value?this.m3.classList.remove("iti__hide"):this.m3.classList.add("iti__hide")},n=null;this._a7=()=>{n&&clearTimeout(n),n=setTimeout(()=>{i(),n=null},100)},this.m1.addEventListener("input",this._a7),this._a6=()=>{this.m1.value="",this.m1.focus(),i()},this.m3.addEventListener("click",this._a6)}}_p0(t){for(let e of this.countries)if(e.name.substring(0,t.length).toLowerCase()===t){let n=e.nodeById[this.id];this._x(n,!1),this._3(n);break}}_p3(t,e=!1){let i=!0;this.countryList.innerHTML="";let n=S(t),s=n.length,r=[],o=[],d=[],C=[],c=[],p=[];for(let u of this.countries)e||s===0?d.push(u):u.iso2===n?r.push(u):u.normalisedName.startsWith(n)?o.push(u):u.normalisedName.includes(n)?d.push(u):n===u.dialCode||n===u.dialCodePlus?C.push(u):u.dialCodePlus.includes(n)?c.push(u):u.initials.includes(n)&&p.push(u);let g=[...r.sort((u,h)=>u.priority-h.priority),...o.sort((u,h)=>u.priority-h.priority),...d.sort((u,h)=>u.priority-h.priority),...C.sort((u,h)=>u.priority-h.priority),...c.sort((u,h)=>u.priority-h.priority),...p.sort((u,h)=>u.priority-h.priority)];for(let u of g){let h=u.nodeById[this.id];h&&(this.countryList.appendChild(h),i&&(this._x(h,!1),i=!1))}i?(this._x(null,!1),this.m4&&this.m4.classList.remove("iti__hide")):this.m4&&this.m4.classList.add("iti__hide"),this.countryList.scrollTop=0,this._p4()}_p4(){let{i18n:t}=this.options,e=this.countryList.childElementCount,i;"searchResultsText"in t?i=t.searchResultsText(e):e===0?i=t.zeroSearchResults:e===1?i=t.oneSearchResult:i=t.multipleSearchResults.replace("${count}",e.toString()),this.m5.textContent=i}_q(t){let e=t==="ArrowUp"?this.c?.previousElementSibling:this.c?.nextElementSibling;!e&&this.countryList.childElementCount>1&&(e=t==="ArrowUp"?this.countryList.lastElementChild:this.countryList.firstElementChild),e&&(this._3(e),this._x(e,!1))}_r(){this.c&&this._1(this.c)}_u(t){let e=t;if(this.options.formatOnDisplay&&l.utils&&this.s){let i=this.options.nationalMode||e.charAt(0)!=="+"&&!this.options.separateDialCode,{NATIONAL:n,INTERNATIONAL:s}=l.utils.numberFormat,r=i?n:s;e=l.utils.formatNumber(e,this.s.iso2,r)}e=this._7(e),this.a.value=e}_v(t){let e=this._v0(t);return e!==null?this._z(e):!1}_u0(t){let{dialCode:e,nationalPrefix:i}=this.s;if(t.charAt(0)==="+"||!e)return t;let r=i&&t.charAt(0)===i&&!this.options.separateDialCode?t.substring(1):t;return`+${e}${r}`}_v0(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.s.iso2,s=this.s.dialCode;i=this._u0(i);let r=this._5(i,!0),o=_(i);if(r){let d=_(r),C=this.q[d];if(!n&&this.j&&C.includes(this.j))return this.j;let c=this.s.areaCodes&&o.length>d.length,p=n&&C.includes(n)&&!c;if(!(s==="1"&&A(o))&&!p){for(let u of C)if(u)return u}}else{if(i.charAt(0)==="+"&&o.length)return"";if((!i||i==="+")&&!this.s.iso2)return this.j}return null}_x(t,e){let i=this.c;if(i&&(i.classList.remove("iti__highlight"),i.setAttribute("aria-selected","false")),this.c=t,this.c&&(this.c.classList.add("iti__highlight"),this.c.setAttribute("aria-selected","true"),this.options.countrySearch)){let n=this.c.getAttribute("id")||"";this.m1.setAttribute("aria-activedescendant",n)}e&&this.c.focus()}_y(t,e){let i=this.z0.get(t);if(i)return i;if(e)return null;throw new Error(`No country data for '${t}'`)}_z(t){let{separateDialCode:e,showFlags:i,i18n:n}=this.options,s=this.s.iso2||"";if(this.s=t?this._y(t,!1)||{}:{},this.s.iso2&&(this.j=this.s.iso2),this.selectedCountry){let r=t&&i?`iti__flag iti__${t}`:"iti__flag iti__globe",o,d;if(t){let{name:C,dialCode:c}=this.s;d=C,o=n.selectedCountryAriaLabel.replace("${countryName}",C).replace("${dialCode}",`+${c}`)}else d=n.noCountrySelected,o=n.noCountrySelected;this.l.className=r,this.selectedCountry.setAttribute("title",d),this.selectedCountry.setAttribute("aria-label",o)}if(e){let r=this.s.dialCode?`+${this.s.dialCode}`:"";this.t.innerHTML=r,this._z3()}return this._0(),this._z4(),s!==t}_z3(){if(this.selectedCountry){let t=this.options.separateDialCode?78:42,i=(this.selectedCountry.offsetWidth||this._z2()||t)+6;this.w?this.a.style.paddingLeft=`${i}px`:this.a.style.paddingRight=`${i}px`}}_z4(){let{strictMode:t,placeholderNumberType:e,validationNumberTypes:i}=this.options,{iso2:n}=this.s;if(t&&l.utils)if(n){let s=l.utils.numberType[e],r=l.utils.getExampleNumber(n,!1,s,!0),o=r;for(;l.utils.isPossibleNumber(r,n,i);)o=r,r+="0";let d=l.utils.getCoreNumber(o,n);this.n0=d.length,n==="by"&&(this.n0=d.length+1)}else this.n0=null}_z2(){if(this.a.parentNode){let t;try{t=window.top.document.body}catch{t=document.body}let e=this.a.parentNode.cloneNode(!1);e.style.visibility="hidden",t.appendChild(e);let i=this.k.cloneNode();e.appendChild(i);let n=this.selectedCountry.cloneNode(!0);i.appendChild(n);let s=n.offsetWidth;return t.removeChild(e),s}return 0}_0(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:n}=this.options,s=t==="aggressive"||!this.e&&t==="polite";if(l.utils&&s){let r=l.utils.numberType[e],o=this.s.iso2?l.utils.getExampleNumber(this.s.iso2,i,r):"";o=this._7(o),typeof n=="function"&&(o=n(o,this.s)),this.a.setAttribute("placeholder",o)}}_1(t){let e=this._z(t.getAttribute("data-country-code"));this._2(),this._4(t.getAttribute("data-dial-code")),this.options.formatOnDisplay&&this._u(this.a.value),this.a.focus(),e&&this._8()}_2(){this.m0.classList.add("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","false"),this.c&&this.c.setAttribute("aria-selected","false"),this.options.countrySearch&&this.m1.removeAttribute("aria-activedescendant"),this.u.classList.remove("iti__arrow--up"),this.options.countrySearch&&(this.m1.removeEventListener("input",this._a7),this.m3.removeEventListener("click",this._a6)),document.documentElement.removeEventListener("click",this._a2),this.countryList.removeEventListener("mouseover",this._a0),this.countryList.removeEventListener("click",this._a1),this.options.dropdownContainer&&(this.options.useFullscreenPopup||window.removeEventListener("scroll",this._a4),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._a8&&window.removeEventListener("load",this._a8),this._trigger("close:countrydropdown")}_3(t){let e=this.countryList,i=document.documentElement.scrollTop,n=e.offsetHeight,s=e.getBoundingClientRect().top+i,r=s+n,o=t.offsetHeight,d=t.getBoundingClientRect().top+i,C=d+o,c=d-s+e.scrollTop;if(d<s)e.scrollTop=c;else if(C>r){let p=n-o;e.scrollTop=c-p}}_4(t){let e=this.a.value,i=`+${t}`,n;if(e.charAt(0)==="+"){let s=this._5(e);s?n=e.replace(s,i):n=i,this.a.value=n}}_5(t,e){let i="";if(t.charAt(0)==="+"){let n="";for(let s=0;s<t.length;s++){let r=t.charAt(s);if(!isNaN(parseInt(r,10))){if(n+=r,e)this.q[n]&&(i=t.substring(0,s+1));else if(this.dialCodes.has(n)){i=t.substring(0,s+1);break}if(n.length===this.y)break}}}return i}_6(t){let e=t||this.a.value.trim(),{dialCode:i}=this.s,n,s=_(e);return this.options.separateDialCode&&e.charAt(0)!=="+"&&i&&s?n=`+${i}`:n="",n+e}_7(t){let e=t;if(this.options.separateDialCode){let i=this._5(e);if(i){i=`+${this.s.dialCode}`;let n=e[i.length]===" "||e[i.length]==="-"?i.length+1:i.length;e=e.substring(n)}}return this._j2(e)}_8(){this._trigger("countrychange")}_9(){let t=this._6(),e=l.utils?l.utils.formatNumberAsYouType(t,this.s.iso2):t,{dialCode:i}=this.s;return this.options.separateDialCode&&this.a.value.charAt(0)!=="+"&&e.includes(`+${i}`)?(e.split(`+${i}`)[1]||"").trim():e}handleAutoCountry(){this.options.initialCountry==="auto"&&l.autoCountry&&(this.j=l.autoCountry,this.s.iso2||this.l.classList.contains("iti__globe")||this.setCountry(this.j),this.h())}handleUtils(){l.utils&&(this.a.value&&this._u(this.a.value),this.s.iso2&&(this._0(),this._z4())),this.i0()}destroy(){this.a.iti=void 0;let{allowDropdown:t,separateDialCode:e}=this.options;if(t){this._2(),this.selectedCountry.removeEventListener("click",this._a10),this.k.removeEventListener("keydown",this._a11);let s=this.a.closest("label");s&&s.removeEventListener("click",this._a9)}let{form:i}=this.a;this._a14&&i&&i.removeEventListener("submit",this._a14),this.a.removeEventListener("input",this._a12),this._a5&&this.a.removeEventListener("keydown",this._a5),this.a.removeAttribute("data-intl-tel-input-id"),e&&(this.v?this.a.style.paddingRight=this.n1:this.a.style.paddingLeft=this.n2);let n=this.a.parentNode;n?.parentNode?.insertBefore(this.a,n),n?.parentNode?.removeChild(n),delete l.instances[this.id]}getExtension(){return l.utils?l.utils.getExtension(this._6(),this.s.iso2):""}getNumber(t){if(l.utils){let{iso2:e}=this.s;return l.utils.formatNumber(this._6(),e,t)}return""}getNumberType(){return l.utils?l.utils.getNumberType(this._6(),this.s.iso2):-99}getSelectedCountryData(){return this.s}getValidationError(){if(l.utils){let{iso2:t}=this.s;return l.utils.getValidationError(this._6(),t)}return-99}isValidNumber(){return this._9b(!1)}isValidNumberPrecise(){return this._9b(!0)}_9a(t){return l.utils?l.utils.isPossibleNumber(t,this.s.iso2,this.options.validationNumberTypes):null}_9b(t){if(!this.s.iso2)return!1;let e=r=>t?this._9c(r):this._9a(r),i=this._6(),n=i.search(/\p{L}/u);if(n>-1&&!this.options.allowPhonewords){let r=i.substring(0,n),o=e(r),d=e(i);return o&&d}return e(i)}_9c(t){return l.utils?l.utils.isValidNumber(t,this.s.iso2,this.options.validationNumberTypes):null}setCountry(t){let e=t?.toLowerCase(),i=this.s.iso2;(t&&e!==i||!t&&i)&&(this._z(e),this._4(this.s.dialCode),this.options.formatOnDisplay&&this._u(this.a.value),this._8())}setNumber(t){let e=this._v(t);this._u(t),e&&this._8(),this._trigger("input",{isSetNumber:!0})}setPlaceholderNumberType(t){this.options.placeholderNumberType=t,this._0()}setDisabled(t){this.a.disabled=t,t?this.selectedCountry.setAttribute("disabled","true"):this.selectedCountry.removeAttribute("disabled")}},G=a=>{if(!l.utils&&!l.startedLoadingUtilsScript){let t;if(typeof a=="function")try{t=Promise.resolve(a())}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 a}`));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,b("handleUtils"),!0}).catch(e=>{throw b("rejectUtilsScriptPromise",e),e})}return null},l=Object.assign((a,t)=>{let e=new I(a,t);return e._init(),a.setAttribute("data-intl-tel-input-id",e.id.toString()),l.instances[e.id]=e,a.iti=e,e},{defaults:M,documentReady:()=>document.readyState==="complete",getCountryData:()=>v,getInstance:a=>{let t=a.getAttribute("data-intl-tel-input-id");return t?l.instances[t]:null},instances:{},attachUtils:G,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.10.1"}),q=l;return B(Y);})();
27
+ </svg>`,this.m5=m("span",{class:"iti__a11y-text"},this.m0),this.m4=m("div",{class:"iti__no-results iti__hide","aria-hidden":"true"},this.m0),this.m4.textContent=c.zeroSearchResults}if(this.countryList=m("ul",{class:"iti__country-list",id:`iti-${this.id}__country-listbox`,role:"listbox","aria-label":c.countryListAriaLabel},this.m0),this._g(),C&&this._p4(),r){let y=a._buildClassNames({iti:!0,"iti--container":!0,"iti--fullscreen-popup":d,"iti--inline-dropdown":!d,[n]:!!n});this.dropdown=m("div",{class:y}),this.dropdown.appendChild(this.m0)}else this.k.appendChild(this.m0)}}if(g.appendChild(this.a),this.k&&(this._z3(),this.k.classList.remove("iti__v-hide")),s){let u=this.a.getAttribute("name")||"",h=s(u);if(h.phone){let y=this.a.form?.querySelector(`input[name="${h.phone}"]`);y?this.hiddenInput=y:(this.hiddenInput=m("input",{type:"hidden",name:h.phone}),g.appendChild(this.hiddenInput))}if(h.country){let y=this.a.form?.querySelector(`input[name="${h.country}"]`);y?this.m9=y:(this.m9=m("input",{type:"hidden",name:h.country}),g.appendChild(this.m9))}}}_g(){for(let t=0;t<this.countries.length;t++){let e=this.countries[t],i=t===0?"iti__highlight":"",n=m("li",{id:`iti-${this.id}__item-${e.iso2}`,class:`iti__country ${i}`,tabindex:"-1",role:"option","data-dial-code":e.dialCode,"data-country-code":e.iso2,"aria-selected":"false"},this.countryList);e.nodeById[this.id]=n;let s="";this.options.showFlags&&(s+=`<div class='iti__flag iti__${e.iso2}'></div>`),s+=`<span class='iti__country-name'>${e.name}</span>`,s+=`<span class='iti__dial-code' dir='ltr'>+${e.dialCode}</span>`,n.insertAdjacentHTML("beforeend",s)}}_h(t=!1){let e=this.a.getAttribute("value"),i=this.a.value,s=e&&e.charAt(0)==="+"&&(!i||i.charAt(0)!=="+")?e:i,r=this._5(s),o=A(s),{initialCountry:d,geoIpLookup:C}=this.options,c=d==="auto"&&C;if(r&&!o)this._v(s);else if(!c||t){let p=d?d.toLowerCase():"";p&&this._y(p,!0)?this._z(p):r&&o?this._z("us"):this._z()}s&&this._u(s)}_i(){this._j(),this.options.allowDropdown&&this._i2(),(this.hiddenInput||this.m9)&&this.a.form&&this._i0()}_i0(){this._a14=()=>{this.hiddenInput&&(this.hiddenInput.value=this.getNumber()),this.m9&&(this.m9.value=this.getSelectedCountryData().iso2||"")},this.a.form?.addEventListener("submit",this._a14)}_i2(){this._a9=e=>{this.m0.classList.contains("iti__hide")?this.a.focus():e.preventDefault()};let t=this.a.closest("label");t&&t.addEventListener("click",this._a9),this._a10=()=>{this.m0.classList.contains("iti__hide")&&!this.a.disabled&&!this.a.readOnly&&this._openDropdown()},this.selectedCountry.addEventListener("click",this._a10),this._a11=e=>{this.m0.classList.contains("iti__hide")&&["ArrowUp","ArrowDown"," ","Enter"].includes(e.key)&&(e.preventDefault(),e.stopPropagation(),this._openDropdown()),e.key==="Tab"&&this._2()},this.k.addEventListener("keydown",this._a11)}_i3(){let{loadUtils:t,initialCountry:e,geoIpLookup:i}=this.options;t&&!l.utils?(this._a8=()=>{window.removeEventListener("load",this._a8),l.attachUtils(t)?.catch(()=>{})},l.documentReady()?this._a8():window.addEventListener("load",this._a8)):this.i0(),e==="auto"&&i&&!this.s.iso2?this._i4():this.h()}_i4(){l.autoCountry?this.handleAutoCountry():l.startedLoadingAutoCountry||(l.startedLoadingAutoCountry=!0,typeof this.options.geoIpLookup=="function"&&this.options.geoIpLookup((t="")=>{let e=t.toLowerCase();e&&this._y(e,!0)?(l.autoCountry=e,setTimeout(()=>b("handleAutoCountry"))):(this._h(!0),b("rejectAutoCountryPromise"))},()=>{this._h(!0),b("rejectAutoCountryPromise")}))}_n0(){this._openDropdown(),this.m1.value="+",this._p3("",!0)}_j(){let{strictMode:t,formatAsYouType:e,separateDialCode:i,allowDropdown:n,countrySearch:s}=this.options,r=!1;/\p{L}/u.test(this.a.value)&&(r=!0),this._a12=o=>{if(this.x&&o?.data==="+"&&i&&n&&s){let p=this.a.selectionStart||0,g=this.a.value.substring(0,p-1),u=this.a.value.substring(p);this.a.value=g+u,this._n0();return}this._v(this.a.value)&&this._8();let d=o?.data&&/[^+0-9]/.test(o.data),C=o?.inputType==="insertFromPaste"&&this.a.value;d||C&&!t?r=!0:/[^+0-9]/.test(this.a.value)||(r=!1);let c=o?.detail&&o.detail.isSetNumber;if(e&&!r&&!c){let p=this.a.selectionStart||0,u=this.a.value.substring(0,p).replace(/[^+0-9]/g,"").length,h=o?.inputType==="deleteContentForward",y=this._9(),f=W(u,y,p,h);this.a.value=y,this.a.setSelectionRange(f,f)}},this.a.addEventListener("input",this._a12),(t||i)&&(this._a5=o=>{if(o.key&&o.key.length===1&&!o.altKey&&!o.ctrlKey&&!o.metaKey){if(i&&n&&s&&o.key==="+"){o.preventDefault(),this._n0();return}if(t){let d=this.a.value,c=!(d.charAt(0)==="+")&&this.a.selectionStart===0&&o.key==="+",p=/^[0-9]$/.test(o.key),g=i?p:c||p,u=d.slice(0,this.a.selectionStart)+o.key+d.slice(this.a.selectionEnd),h=this._6(u),y=l.utils.getCoreNumber(h,this.s.iso2),f=this.n0&&y.length>this.n0,k=this._v0(h)!==null;(!g||f&&!k&&!c)&&o.preventDefault()}}},this.a.addEventListener("keydown",this._a5))}_j2(t){let e=parseInt(this.a.getAttribute("maxlength")||"",10);return e&&t.length>e?t.substring(0,e):t}_trigger(t,e={}){let i=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:e});this.a.dispatchEvent(i)}_openDropdown(){let{fixDropdownWidth:t,countrySearch:e}=this.options;if(t&&(this.m0.style.width=`${this.a.offsetWidth}px`),this.m0.classList.remove("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","true"),this._o(),e){let i=this.countryList.firstElementChild;i&&(this._x(i,!1),this.countryList.scrollTop=0),this.m1.focus()}this._p(),this.u.classList.add("iti__arrow--up"),this._trigger("open:countrydropdown")}_o(){if(this.options.dropdownContainer&&this.options.dropdownContainer.appendChild(this.dropdown),!this.options.useFullscreenPopup){let t=this.a.getBoundingClientRect(),e=this.a.offsetHeight;this.options.dropdownContainer&&(this.dropdown.style.top=`${t.top+e}px`,this.dropdown.style.left=`${t.left}px`,this._a4=()=>this._2(),window.addEventListener("scroll",this._a4))}}_p(){this._a0=i=>{let n=i.target?.closest(".iti__country");n&&this._x(n,!1)},this.countryList.addEventListener("mouseover",this._a0),this._a1=i=>{let n=i.target?.closest(".iti__country");n&&this._1(n)},this.countryList.addEventListener("click",this._a1),this._a2=i=>{!!i.target.closest(`#iti-${this.id}__dropdown-content`)||this._2()},setTimeout(()=>{document.documentElement.addEventListener("click",this._a2)},0);let t="",e=null;if(this._a3=i=>{["ArrowUp","ArrowDown","Enter","Escape"].includes(i.key)&&(i.preventDefault(),i.stopPropagation(),i.key==="ArrowUp"||i.key==="ArrowDown"?this._q(i.key):i.key==="Enter"?this._r():i.key==="Escape"&&this._2()),!this.options.countrySearch&&/^[a-zA-ZÀ-ÿа-яА-Я ]$/.test(i.key)&&(i.stopPropagation(),e&&clearTimeout(e),t+=i.key.toLowerCase(),this._p0(t),e=setTimeout(()=>{t=""},1e3))},document.addEventListener("keydown",this._a3),this.options.countrySearch){let i=()=>{let s=this.m1.value.trim();s?this._p3(s):this._p3("",!0),this.m1.value?this.m3.classList.remove("iti__hide"):this.m3.classList.add("iti__hide")},n=null;this._a7=()=>{n&&clearTimeout(n),n=setTimeout(()=>{i(),n=null},100)},this.m1.addEventListener("input",this._a7),this._a6=()=>{this.m1.value="",this.m1.focus(),i()},this.m3.addEventListener("click",this._a6)}}_p0(t){for(let e of this.countries)if(e.name.substring(0,t.length).toLowerCase()===t){let n=e.nodeById[this.id];this._x(n,!1),this._3(n);break}}_p3(t,e=!1){let i=!0;this.countryList.innerHTML="";let n=S(t),s=n.length,r=[],o=[],d=[],C=[],c=[],p=[];for(let u of this.countries)e||s===0?d.push(u):u.iso2===n?r.push(u):u.normalisedName.startsWith(n)?o.push(u):u.normalisedName.includes(n)?d.push(u):n===u.dialCode||n===u.dialCodePlus?C.push(u):u.dialCodePlus.includes(n)?c.push(u):u.initials.includes(n)&&p.push(u);let g=[...r.sort((u,h)=>u.priority-h.priority),...o.sort((u,h)=>u.priority-h.priority),...d.sort((u,h)=>u.priority-h.priority),...C.sort((u,h)=>u.priority-h.priority),...c.sort((u,h)=>u.priority-h.priority),...p.sort((u,h)=>u.priority-h.priority)];for(let u of g){let h=u.nodeById[this.id];h&&(this.countryList.appendChild(h),i&&(this._x(h,!1),i=!1))}i?(this._x(null,!1),this.m4&&this.m4.classList.remove("iti__hide")):this.m4&&this.m4.classList.add("iti__hide"),this.countryList.scrollTop=0,this._p4()}_p4(){let{i18n:t}=this.options,e=this.countryList.childElementCount,i;"searchResultsText"in t?i=t.searchResultsText(e):e===0?i=t.zeroSearchResults:e===1?i=t.oneSearchResult:i=t.multipleSearchResults.replace("${count}",e.toString()),this.m5.textContent=i}_q(t){let e=t==="ArrowUp"?this.c?.previousElementSibling:this.c?.nextElementSibling;!e&&this.countryList.childElementCount>1&&(e=t==="ArrowUp"?this.countryList.lastElementChild:this.countryList.firstElementChild),e&&(this._3(e),this._x(e,!1))}_r(){this.c&&this._1(this.c)}_u(t){let e=t;if(this.options.formatOnDisplay&&l.utils&&this.s){let i=this.options.nationalMode||e.charAt(0)!=="+"&&!this.options.separateDialCode,{NATIONAL:n,INTERNATIONAL:s}=l.utils.numberFormat,r=i?n:s;e=l.utils.formatNumber(e,this.s.iso2,r)}e=this._7(e),this.a.value=e}_v(t){let e=this._v0(t);return e!==null?this._z(e):!1}_u0(t){let{dialCode:e,nationalPrefix:i}=this.s;if(t.charAt(0)==="+"||!e)return t;let r=i&&t.charAt(0)===i&&!this.options.separateDialCode?t.substring(1):t;return`+${e}${r}`}_v0(t){let e=t.indexOf("+"),i=e?t.substring(e):t,n=this.s.iso2,s=this.s.dialCode;i=this._u0(i);let r=this._5(i,!0),o=_(i);if(r){let d=_(r),C=this.q[d];if(!n&&this.j&&C.includes(this.j))return this.j;let c=this.s.areaCodes&&o.length>d.length,p=n&&C.includes(n)&&!c;if(!(s==="1"&&A(o))&&!p){for(let u of C)if(u)return u}}else{if(i.charAt(0)==="+"&&o.length)return"";if((!i||i==="+")&&!this.s.iso2)return this.j}return null}_x(t,e){let i=this.c;if(i&&(i.classList.remove("iti__highlight"),i.setAttribute("aria-selected","false")),this.c=t,this.c&&(this.c.classList.add("iti__highlight"),this.c.setAttribute("aria-selected","true"),this.options.countrySearch)){let n=this.c.getAttribute("id")||"";this.m1.setAttribute("aria-activedescendant",n)}e&&this.c.focus()}_y(t,e){let i=this.z0.get(t);if(i)return i;if(e)return null;throw new Error(`No country data for '${t}'`)}_z(t){let{separateDialCode:e,showFlags:i,i18n:n}=this.options,s=this.s.iso2||"";if(this.s=t?this._y(t,!1)||{}:{},this.s.iso2&&(this.j=this.s.iso2),this.selectedCountry){let r=t&&i?`iti__flag iti__${t}`:"iti__flag iti__globe",o,d;if(t){let{name:C,dialCode:c}=this.s;d=C,o=n.selectedCountryAriaLabel.replace("${countryName}",C).replace("${dialCode}",`+${c}`)}else d=n.noCountrySelected,o=n.noCountrySelected;this.l.className=r,this.selectedCountry.setAttribute("title",d),this.selectedCountry.setAttribute("aria-label",o)}if(e){let r=this.s.dialCode?`+${this.s.dialCode}`:"";this.t.innerHTML=r,this._z3()}return this._0(),this._z4(),s!==t}_z3(){if(this.selectedCountry){let t=this.options.separateDialCode?78:42,i=(this.selectedCountry.offsetWidth||this._z2()||t)+6;this.w?this.a.style.paddingLeft=`${i}px`:this.a.style.paddingRight=`${i}px`}}_z4(){let{strictMode:t,placeholderNumberType:e,validationNumberTypes:i}=this.options,{iso2:n}=this.s;if(t&&l.utils)if(n){let s=l.utils.numberType[e],r=l.utils.getExampleNumber(n,!1,s,!0),o=r;for(;l.utils.isPossibleNumber(r,n,i);)o=r,r+="0";let d=l.utils.getCoreNumber(o,n);this.n0=d.length,n==="by"&&(this.n0=d.length+1)}else this.n0=null}_z2(){if(this.a.parentNode){let t;try{t=window.top.document.body}catch{t=document.body}let e=this.a.parentNode.cloneNode(!1);e.style.visibility="hidden",t.appendChild(e);let i=this.k.cloneNode();e.appendChild(i);let n=this.selectedCountry.cloneNode(!0);i.appendChild(n);let s=n.offsetWidth;return t.removeChild(e),s}return 0}_0(){let{autoPlaceholder:t,placeholderNumberType:e,nationalMode:i,customPlaceholder:n}=this.options,s=t==="aggressive"||!this.e&&t==="polite";if(l.utils&&s){let r=l.utils.numberType[e],o=this.s.iso2?l.utils.getExampleNumber(this.s.iso2,i,r):"";o=this._7(o),typeof n=="function"&&(o=n(o,this.s)),this.a.setAttribute("placeholder",o)}}_1(t){let e=this._z(t.getAttribute("data-country-code"));this._2(),this._4(t.getAttribute("data-dial-code")),this.options.formatOnDisplay&&this._u(this.a.value),this.a.focus(),e&&this._8()}_2(){this.m0.classList.add("iti__hide"),this.selectedCountry.setAttribute("aria-expanded","false"),this.c&&this.c.setAttribute("aria-selected","false"),this.options.countrySearch&&this.m1.removeAttribute("aria-activedescendant"),this.u.classList.remove("iti__arrow--up"),this.options.countrySearch&&(this.m1.removeEventListener("input",this._a7),this.m3.removeEventListener("click",this._a6)),document.documentElement.removeEventListener("click",this._a2),this.countryList.removeEventListener("mouseover",this._a0),this.countryList.removeEventListener("click",this._a1),this.options.dropdownContainer&&(this.options.useFullscreenPopup||window.removeEventListener("scroll",this._a4),this.dropdown.parentNode&&this.dropdown.parentNode.removeChild(this.dropdown)),this._a8&&window.removeEventListener("load",this._a8),this._trigger("close:countrydropdown")}_3(t){let e=this.countryList,i=document.documentElement.scrollTop,n=e.offsetHeight,s=e.getBoundingClientRect().top+i,r=s+n,o=t.offsetHeight,d=t.getBoundingClientRect().top+i,C=d+o,c=d-s+e.scrollTop;if(d<s)e.scrollTop=c;else if(C>r){let p=n-o;e.scrollTop=c-p}}_4(t){let e=this.a.value,i=`+${t}`,n;if(e.charAt(0)==="+"){let s=this._5(e);s?n=e.replace(s,i):n=i,this.a.value=n}}_5(t,e){let i="";if(t.charAt(0)==="+"){let n="";for(let s=0;s<t.length;s++){let r=t.charAt(s);if(!isNaN(parseInt(r,10))){if(n+=r,e)this.q[n]&&(i=t.substring(0,s+1));else if(this.dialCodes.has(n)){i=t.substring(0,s+1);break}if(n.length===this.y)break}}}return i}_6(t){let e=t||this.a.value.trim(),{dialCode:i}=this.s,n,s=_(e);return this.options.separateDialCode&&e.charAt(0)!=="+"&&i&&s?n=`+${i}`:n="",n+e}_7(t){let e=t;if(this.options.separateDialCode){let i=this._5(e);if(i){i=`+${this.s.dialCode}`;let n=e[i.length]===" "||e[i.length]==="-"?i.length+1:i.length;e=e.substring(n)}}return this._j2(e)}_8(){this._trigger("countrychange")}_9(){let t=this._6(),e=l.utils?l.utils.formatNumberAsYouType(t,this.s.iso2):t,{dialCode:i}=this.s;return this.options.separateDialCode&&this.a.value.charAt(0)!=="+"&&e.includes(`+${i}`)?(e.split(`+${i}`)[1]||"").trim():e}handleAutoCountry(){this.options.initialCountry==="auto"&&l.autoCountry&&(this.j=l.autoCountry,this.s.iso2||this.l.classList.contains("iti__globe")||this.setCountry(this.j),this.h())}handleUtils(){l.utils&&(this.a.value&&this._u(this.a.value),this.s.iso2&&(this._0(),this._z4())),this.i0()}destroy(){this.a.iti=void 0;let{allowDropdown:t,separateDialCode:e}=this.options;if(t){this._2(),this.selectedCountry.removeEventListener("click",this._a10),this.k.removeEventListener("keydown",this._a11);let s=this.a.closest("label");s&&s.removeEventListener("click",this._a9)}let{form:i}=this.a;this._a14&&i&&i.removeEventListener("submit",this._a14),this.a.removeEventListener("input",this._a12),this._a5&&this.a.removeEventListener("keydown",this._a5),this.a.removeAttribute("data-intl-tel-input-id"),e&&(this.v?this.a.style.paddingRight=this.n1:this.a.style.paddingLeft=this.n2);let n=this.a.parentNode;n?.parentNode?.insertBefore(this.a,n),n?.parentNode?.removeChild(n),delete l.instances[this.id]}getExtension(){return l.utils?l.utils.getExtension(this._6(),this.s.iso2):""}getNumber(t){if(l.utils){let{iso2:e}=this.s;return l.utils.formatNumber(this._6(),e,t)}return""}getNumberType(){return l.utils?l.utils.getNumberType(this._6(),this.s.iso2):-99}getSelectedCountryData(){return this.s}getValidationError(){if(l.utils){let{iso2:t}=this.s;return l.utils.getValidationError(this._6(),t)}return-99}isValidNumber(){return this._9b(!1)}isValidNumberPrecise(){return this._9b(!0)}_9a(t){return l.utils?l.utils.isPossibleNumber(t,this.s.iso2,this.options.validationNumberTypes):null}_9b(t){if(!this.s.iso2)return!1;let e=r=>t?this._9c(r):this._9a(r),i=this._6(),n=i.search(/\p{L}/u);if(n>-1&&!this.options.allowPhonewords){let r=i.substring(0,n),o=e(r),d=e(i);return o&&d}return e(i)}_9c(t){return l.utils?l.utils.isValidNumber(t,this.s.iso2,this.options.validationNumberTypes):null}setCountry(t){let e=t?.toLowerCase(),i=this.s.iso2;(t&&e!==i||!t&&i)&&(this._z(e),this._4(this.s.dialCode),this.options.formatOnDisplay&&this._u(this.a.value),this._8())}setNumber(t){let e=this._v(t);this._u(t),e&&this._8(),this._trigger("input",{isSetNumber:!0})}setPlaceholderNumberType(t){this.options.placeholderNumberType=t,this._0()}setDisabled(t){this.a.disabled=t,t?this.selectedCountry.setAttribute("disabled","true"):this.selectedCountry.removeAttribute("disabled")}},G=a=>{if(!l.utils&&!l.startedLoadingUtilsScript){let t;if(typeof a=="function")try{t=Promise.resolve(a())}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 a}`));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,b("handleUtils"),!0}).catch(e=>{throw b("rejectUtilsScriptPromise",e),e})}return null},l=Object.assign((a,t)=>{let e=new I(a,t);return e._init(),a.setAttribute("data-intl-tel-input-id",e.id.toString()),l.instances[e.id]=e,a.iti=e,e},{defaults:M,documentReady:()=>document.readyState==="complete",getCountryData:()=>v,getInstance:a=>{let t=a.getAttribute("data-intl-tel-input-id");return t?l.instances[t]:null},instances:{},attachUtils:G,startedLoadingUtilsScript:!1,startedLoadingAutoCountry:!1,version:"25.10.3"}),q=l;return B(Y);})();
28
28
 
29
29
  // UMD
30
30
  return factoryOutput.default;
@@ -1,5 +1,5 @@
1
1
  /*
2
- * International Telephone Input v25.10.1
2
+ * International Telephone Input v25.10.3
3
3
  * https://github.com/jackocnr/intl-tel-input.git
4
4
  * Licensed under the MIT license
5
5
  */
@@ -3286,7 +3286,7 @@ var factoryOutput = (() => {
3286
3286
  attachUtils,
3287
3287
  startedLoadingUtilsScript: false,
3288
3288
  startedLoadingAutoCountry: false,
3289
- version: "25.10.1"
3289
+ version: "25.10.3"
3290
3290
  }
3291
3291
  );
3292
3292
  var intl_tel_input_default = intlTelInput;