intl-tel-input 25.15.0 → 26.0.0-beta.1
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 +26 -38
- package/angular/build/IntlTelInput.js +78 -324
- package/angular/build/IntlTelInputWithUtils.js +78 -324
- package/angular/build/types/intl-tel-input/i18n/ar/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/bg/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/bn/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/bs/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ca/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/cs/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/da/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/de/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ee/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/el/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/en/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/es/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/fa/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/fi/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/fr/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/hi/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/hr/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/hu/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/id/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/index.d.ts +43 -43
- package/angular/build/types/intl-tel-input/i18n/it/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ja/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ko/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/lt/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/mr/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/nl/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/no/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/pl/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/pt/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ro/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ru/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/sk/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/sl/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/sq/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/sr/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/sv/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/te/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/th/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/tr/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/types.d.ts +2 -4
- package/angular/build/types/intl-tel-input/i18n/uk/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/ur/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/uz/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/vi/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input/i18n/zh/index.d.ts +3 -6
- package/angular/build/types/intl-tel-input.d.ts +1 -1
- package/angular/build/types/modules/constants.d.ts +1 -1
- package/angular/build/types/modules/core/icons.d.ts +2 -0
- package/angular/build/types/modules/core/options.d.ts +1 -2
- package/angular/build/types/modules/core/ui.d.ts +2 -3
- package/angular/build/types/modules/data/country-data.d.ts +2 -2
- package/angular/build/types/modules/format/formatting.d.ts +2 -2
- package/angular/build/types/modules/types/public-api.d.ts +3 -1
- package/build/css/demo.css +1 -3
- package/build/css/intlTelInput-no-assets.css +17 -19
- package/build/css/intlTelInput-no-assets.min.css +1 -1
- package/build/css/intlTelInput.css +18 -21
- package/build/css/intlTelInput.min.css +1 -1
- package/build/js/data.js +1 -1
- package/build/js/data.min.js +1 -1
- package/build/js/i18n/ar/index.js +23 -5
- package/build/js/i18n/bg/index.js +17 -5
- package/build/js/i18n/bn/index.js +17 -5
- package/build/js/i18n/bs/index.js +23 -5
- package/build/js/i18n/ca/index.js +17 -5
- package/build/js/i18n/cs/index.js +20 -5
- package/build/js/i18n/da/index.js +17 -5
- package/build/js/i18n/de/index.js +17 -5
- package/build/js/i18n/ee/index.js +17 -5
- package/build/js/i18n/el/index.js +17 -5
- package/build/js/i18n/en/index.js +18 -5
- package/build/js/i18n/es/index.js +17 -5
- package/build/js/i18n/fa/index.js +17 -5
- package/build/js/i18n/fi/index.js +17 -5
- package/build/js/i18n/fr/index.js +17 -5
- package/build/js/i18n/hi/index.js +17 -5
- package/build/js/i18n/hr/index.js +23 -5
- package/build/js/i18n/hu/index.js +17 -5
- package/build/js/i18n/id/index.js +17 -5
- package/build/js/i18n/index.js +43 -43
- package/build/js/i18n/it/index.js +17 -5
- package/build/js/i18n/ja/index.js +17 -5
- package/build/js/i18n/ko/index.js +17 -5
- package/build/js/i18n/lt/index.js +26 -5
- package/build/js/i18n/mr/index.js +17 -5
- package/build/js/i18n/nl/index.js +17 -5
- package/build/js/i18n/no/index.js +17 -5
- package/build/js/i18n/pl/index.js +21 -5
- package/build/js/i18n/pt/index.js +17 -5
- package/build/js/i18n/ro/index.js +21 -5
- package/build/js/i18n/ru/index.js +23 -5
- package/build/js/i18n/sk/index.js +23 -5
- package/build/js/i18n/sl/index.js +25 -5
- package/build/js/i18n/sq/index.js +18 -5
- package/build/js/i18n/sr/index.js +24 -5
- package/build/js/i18n/sv/index.js +17 -5
- package/build/js/i18n/te/index.js +17 -5
- package/build/js/i18n/th/index.js +17 -5
- package/build/js/i18n/tr/index.js +17 -5
- package/build/js/i18n/uk/index.js +23 -5
- package/build/js/i18n/ur/index.js +17 -5
- package/build/js/i18n/uz/index.js +17 -5
- package/build/js/i18n/vi/index.js +17 -5
- package/build/js/i18n/zh/index.js +17 -5
- package/build/js/intlTelInput.d.ts +118 -677
- package/build/js/intlTelInput.js +79 -329
- package/build/js/intlTelInput.min.js +8 -4
- package/build/js/intlTelInputWithUtils.js +79 -329
- package/build/js/intlTelInputWithUtils.min.js +7 -3
- package/package.json +10 -4
- package/react/build/IntlTelInput.cjs +78 -328
- package/react/build/IntlTelInput.d.ts +118 -677
- package/react/build/IntlTelInput.js +78 -328
- package/react/build/IntlTelInputWithUtils.cjs +78 -328
- package/react/build/IntlTelInputWithUtils.js +78 -328
- package/svelte/build/IntlTelInput.mjs +1170 -1413
- package/svelte/build/IntlTelInputWithUtils.mjs +935 -1178
- package/vue/build/exports/IntlTelInput.mjs +1 -1
- package/vue/build/exports/IntlTelInputWithUtils.mjs +1 -1
- package/vue/build/intl-tel-input/data.d.ts +18 -0
- package/vue/build/intl-tel-input/i18n/ar/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/bg/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/bn/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/bs/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ca/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/cs/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/da/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/de/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ee/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/el/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/en/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/es/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/fa/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/fi/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/fr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/hi/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/hr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/hu/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/id/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/index.d.ts +43 -0
- package/vue/build/intl-tel-input/i18n/it/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ja/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ko/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/lt/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/mr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/nl/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/no/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/pl/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/pt/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ro/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ru/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sk/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sl/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sq/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/sv/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/te/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/th/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/tr/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/types.d.ts +10 -0
- package/vue/build/intl-tel-input/i18n/uk/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/ur/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/uz/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/vi/index.d.ts +3 -0
- package/vue/build/intl-tel-input/i18n/zh/index.d.ts +3 -0
- package/vue/build/intl-tel-input/intlTelInputWithUtils.d.ts +2 -0
- package/vue/build/{intl-tel-input-Db39yQmC.mjs → intl-tel-input-f0-6rrpA.mjs} +136 -138
- package/vue/build/modules/core/ui.d.ts +0 -1
- package/vue/build/modules/format/formatting.d.ts +1 -1
- package/vue/build/modules/types/public-api.d.ts +2 -1
- package/build/js/i18n/ar/countries.js +0 -245
- package/build/js/i18n/ar/interface.js +0 -23
- package/build/js/i18n/bg/countries.js +0 -245
- package/build/js/i18n/bg/interface.js +0 -13
- package/build/js/i18n/bn/countries.js +0 -245
- package/build/js/i18n/bn/interface.js +0 -13
- package/build/js/i18n/bs/countries.js +0 -245
- package/build/js/i18n/bs/interface.js +0 -20
- package/build/js/i18n/ca/countries.js +0 -245
- package/build/js/i18n/ca/interface.js +0 -13
- package/build/js/i18n/cs/countries.js +0 -245
- package/build/js/i18n/cs/interface.js +0 -20
- package/build/js/i18n/da/countries.js +0 -245
- package/build/js/i18n/da/interface.js +0 -13
- package/build/js/i18n/de/countries.js +0 -245
- package/build/js/i18n/de/interface.js +0 -13
- package/build/js/i18n/ee/countries.js +0 -245
- package/build/js/i18n/ee/interface.js +0 -13
- package/build/js/i18n/el/countries.js +0 -245
- package/build/js/i18n/el/interface.js +0 -13
- package/build/js/i18n/en/countries.js +0 -245
- package/build/js/i18n/en/interface.js +0 -14
- package/build/js/i18n/es/countries.js +0 -245
- package/build/js/i18n/es/interface.js +0 -13
- package/build/js/i18n/fa/countries.js +0 -245
- package/build/js/i18n/fa/interface.js +0 -13
- package/build/js/i18n/fi/countries.js +0 -245
- package/build/js/i18n/fi/interface.js +0 -13
- package/build/js/i18n/fr/countries.js +0 -245
- package/build/js/i18n/fr/interface.js +0 -13
- package/build/js/i18n/hi/countries.js +0 -245
- package/build/js/i18n/hi/interface.js +0 -13
- package/build/js/i18n/hr/countries.js +0 -245
- package/build/js/i18n/hr/interface.js +0 -20
- package/build/js/i18n/hu/countries.js +0 -245
- package/build/js/i18n/hu/interface.js +0 -13
- package/build/js/i18n/id/countries.js +0 -245
- package/build/js/i18n/id/interface.js +0 -13
- package/build/js/i18n/it/countries.js +0 -245
- package/build/js/i18n/it/interface.js +0 -13
- package/build/js/i18n/ja/countries.js +0 -245
- package/build/js/i18n/ja/interface.js +0 -13
- package/build/js/i18n/ko/countries.js +0 -245
- package/build/js/i18n/ko/interface.js +0 -13
- package/build/js/i18n/lt/countries.js +0 -245
- package/build/js/i18n/lt/interface.js +0 -26
- package/build/js/i18n/mr/countries.js +0 -245
- package/build/js/i18n/mr/interface.js +0 -13
- package/build/js/i18n/nl/countries.js +0 -245
- package/build/js/i18n/nl/interface.js +0 -13
- package/build/js/i18n/no/countries.js +0 -245
- package/build/js/i18n/no/interface.js +0 -13
- package/build/js/i18n/pl/countries.js +0 -245
- package/build/js/i18n/pl/interface.js +0 -19
- package/build/js/i18n/pt/countries.js +0 -245
- package/build/js/i18n/pt/interface.js +0 -13
- package/build/js/i18n/ro/countries.js +0 -245
- package/build/js/i18n/ro/interface.js +0 -18
- package/build/js/i18n/ru/countries.js +0 -245
- package/build/js/i18n/ru/interface.js +0 -20
- package/build/js/i18n/sk/countries.js +0 -245
- package/build/js/i18n/sk/interface.js +0 -20
- package/build/js/i18n/sl/countries.js +0 -245
- package/build/js/i18n/sl/interface.js +0 -25
- package/build/js/i18n/sq/countries.js +0 -245
- package/build/js/i18n/sq/interface.js +0 -14
- package/build/js/i18n/sr/countries.js +0 -245
- package/build/js/i18n/sr/interface.js +0 -21
- package/build/js/i18n/sv/countries.js +0 -245
- package/build/js/i18n/sv/interface.js +0 -13
- package/build/js/i18n/te/countries.js +0 -245
- package/build/js/i18n/te/interface.js +0 -13
- package/build/js/i18n/th/countries.js +0 -245
- package/build/js/i18n/th/interface.js +0 -13
- package/build/js/i18n/tr/countries.js +0 -245
- package/build/js/i18n/tr/interface.js +0 -13
- package/build/js/i18n/uk/countries.js +0 -245
- package/build/js/i18n/uk/interface.js +0 -20
- package/build/js/i18n/ur/countries.js +0 -245
- package/build/js/i18n/ur/interface.js +0 -13
- package/build/js/i18n/uz/countries.js +0 -245
- package/build/js/i18n/uz/interface.js +0 -13
- package/build/js/i18n/vi/countries.js +0 -245
- package/build/js/i18n/vi/interface.js +0 -13
- package/build/js/i18n/zh/countries.js +0 -245
- package/build/js/i18n/zh/interface.js +0 -13
- package/vue/build/IntlTelInput.mjs +0 -3398
- package/vue/build/IntlTelInputWithUtils.mjs +0 -9540
|
@@ -3,35 +3,35 @@ var $d = (t) => {
|
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
5
|
var D3 = (t, d, e) => d in t ? L3(t, d, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[d] = e;
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
import { onMount as P3, onDestroy as
|
|
9
|
-
const
|
|
6
|
+
var A1 = (t, d, e) => D3(t, typeof d != "symbol" ? d + "" : d, e), X0 = (t, d, e) => d.has(t) || $d("Cannot " + e);
|
|
7
|
+
var F = (t, d, e) => (X0(t, d, "read from private field"), e ? e.call(t) : d.get(t)), E1 = (t, d, e) => d.has(t) ? $d("Cannot add the same private member more than once") : d instanceof WeakSet ? d.add(t) : d.set(t, e), Z1 = (t, d, e, i) => (X0(t, d, "write to private field"), i ? i.call(t, e) : d.set(t, e), e), f1 = (t, d, e) => (X0(t, d, "access private method"), e);
|
|
8
|
+
import { onMount as P3, onDestroy as O3 } from "svelte";
|
|
9
|
+
const R3 = "5";
|
|
10
10
|
var Sd;
|
|
11
|
-
typeof window < "u" && ((Sd = window.__svelte ?? (window.__svelte = {})).v ?? (Sd.v = /* @__PURE__ */ new Set())).add(
|
|
12
|
-
const
|
|
13
|
-
var
|
|
11
|
+
typeof window < "u" && ((Sd = window.__svelte ?? (window.__svelte = {})).v ?? (Sd.v = /* @__PURE__ */ new Set())).add(R3);
|
|
12
|
+
const M3 = 1, x3 = 4, U3 = 8, B3 = 16, F3 = 2, Y = Symbol(), H3 = "http://www.w3.org/1999/xhtml", G3 = "@attach", s2 = !1;
|
|
13
|
+
var Ad = Array.isArray, V3 = Array.prototype.indexOf, k3 = Object.defineProperty, P0 = Object.getOwnPropertyDescriptor, W3 = Object.getOwnPropertyDescriptors, K3 = Object.prototype, j3 = Array.prototype, Td = Object.getPrototypeOf;
|
|
14
14
|
function Y3(t) {
|
|
15
15
|
for (var d = 0; d < t.length; d++)
|
|
16
16
|
t[d]();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function bd() {
|
|
19
19
|
var t, d, e = new Promise((i, s) => {
|
|
20
20
|
t = i, d = s;
|
|
21
21
|
});
|
|
22
22
|
return { promise: e, resolve: t, reject: d };
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const z = 2, p2 = 4, Ld = 8, Dd = 1 << 24, V1 = 16, k1 = 32, r0 = 64, g2 = 128, h1 = 512, e1 = 1024, o1 = 2048, C1 = 4096, J1 = 8192, I1 = 16384, C2 = 32768, od = 65536, ud = 1 << 17, Pd = 1 << 18, V0 = 1 << 19, Z3 = 1 << 20, H1 = 32768, $2 = 1 << 21, _2 = 1 << 22, T1 = 1 << 23, U1 = Symbol("$state"), z3 = Symbol("legacy props"), X3 = Symbol(""), z1 = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
A1(this, "name", "StaleReactionError");
|
|
28
|
+
A1(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
30
|
}();
|
|
31
|
-
function
|
|
31
|
+
function q3() {
|
|
32
32
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function J3(t) {
|
|
35
35
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
36
36
|
}
|
|
37
37
|
function Q3() {
|
|
@@ -58,7 +58,7 @@ function r4() {
|
|
|
58
58
|
function s4() {
|
|
59
59
|
console.warn("https://svelte.dev/e/select_multiple_invalid_value");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Od(t) {
|
|
62
62
|
return t === this.v;
|
|
63
63
|
}
|
|
64
64
|
function $4(t, d) {
|
|
@@ -68,7 +68,7 @@ function o4(t) {
|
|
|
68
68
|
return !$4(t, this.v);
|
|
69
69
|
}
|
|
70
70
|
let u4 = !1, _1 = null;
|
|
71
|
-
function
|
|
71
|
+
function R0(t) {
|
|
72
72
|
_1 = t;
|
|
73
73
|
}
|
|
74
74
|
function l4(t, d = !1, e) {
|
|
@@ -90,7 +90,7 @@ function a4(t) {
|
|
|
90
90
|
if (e !== null) {
|
|
91
91
|
d.e = null;
|
|
92
92
|
for (var i of e)
|
|
93
|
-
|
|
93
|
+
Kd(i);
|
|
94
94
|
}
|
|
95
95
|
return t !== void 0 && (d.x = t), d.i = !0, _1 = d.p, t ?? /** @type {T} */
|
|
96
96
|
{};
|
|
@@ -98,32 +98,32 @@ function a4(t) {
|
|
|
98
98
|
function Rd() {
|
|
99
99
|
return !0;
|
|
100
100
|
}
|
|
101
|
-
let
|
|
101
|
+
let X1 = [];
|
|
102
102
|
function f4() {
|
|
103
|
-
var t =
|
|
104
|
-
|
|
103
|
+
var t = X1;
|
|
104
|
+
X1 = [], Y3(t);
|
|
105
105
|
}
|
|
106
|
-
function
|
|
107
|
-
if (
|
|
108
|
-
var d =
|
|
106
|
+
function k0(t) {
|
|
107
|
+
if (X1.length === 0) {
|
|
108
|
+
var d = X1;
|
|
109
109
|
queueMicrotask(() => {
|
|
110
|
-
d ===
|
|
110
|
+
d === X1 && f4();
|
|
111
111
|
});
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
X1.push(t);
|
|
114
114
|
}
|
|
115
115
|
function c4(t) {
|
|
116
|
-
var d =
|
|
116
|
+
var d = U;
|
|
117
117
|
if (d === null)
|
|
118
|
-
return P.f |=
|
|
118
|
+
return P.f |= T1, t;
|
|
119
119
|
if ((d.f & C2) === 0) {
|
|
120
120
|
if ((d.f & g2) === 0)
|
|
121
121
|
throw t;
|
|
122
122
|
d.b.error(t);
|
|
123
123
|
} else
|
|
124
|
-
|
|
124
|
+
M0(t, d);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function M0(t, d) {
|
|
127
127
|
for (; d !== null; ) {
|
|
128
128
|
if ((d.f & g2) !== 0)
|
|
129
129
|
try {
|
|
@@ -136,70 +136,70 @@ function O0(t, d) {
|
|
|
136
136
|
}
|
|
137
137
|
throw t;
|
|
138
138
|
}
|
|
139
|
-
const
|
|
140
|
-
let
|
|
141
|
-
var d0, t0,
|
|
142
|
-
const
|
|
139
|
+
const T0 = /* @__PURE__ */ new Set();
|
|
140
|
+
let x = null, K = null, p1 = [], m2 = null, o2 = !1;
|
|
141
|
+
var d0, t0, M1, x1, _0, e0, n0, Z, u2, h0, l2, Md, xd;
|
|
142
|
+
const G0 = class G0 {
|
|
143
143
|
constructor() {
|
|
144
|
-
|
|
145
|
-
|
|
144
|
+
E1(this, Z);
|
|
145
|
+
A1(this, "committed", !1);
|
|
146
146
|
/**
|
|
147
147
|
* The current values of any sources that are updated in this batch
|
|
148
148
|
* They keys of this map are identical to `this.#previous`
|
|
149
149
|
* @type {Map<Source, any>}
|
|
150
150
|
*/
|
|
151
|
-
|
|
151
|
+
A1(this, "current", /* @__PURE__ */ new Map());
|
|
152
152
|
/**
|
|
153
153
|
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
154
154
|
* They keys of this map are identical to `this.#current`
|
|
155
155
|
* @type {Map<Source, any>}
|
|
156
156
|
*/
|
|
157
|
-
|
|
157
|
+
A1(this, "previous", /* @__PURE__ */ new Map());
|
|
158
158
|
/**
|
|
159
159
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
160
160
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
161
161
|
* @type {Set<() => void>}
|
|
162
162
|
*/
|
|
163
|
-
|
|
163
|
+
E1(this, d0, /* @__PURE__ */ new Set());
|
|
164
164
|
/**
|
|
165
165
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
166
166
|
* @type {Set<(batch: Batch) => void>}
|
|
167
167
|
*/
|
|
168
|
-
|
|
168
|
+
E1(this, t0, /* @__PURE__ */ new Set());
|
|
169
169
|
/**
|
|
170
170
|
* The number of async effects that are currently in flight
|
|
171
171
|
*/
|
|
172
|
-
|
|
172
|
+
E1(this, M1, 0);
|
|
173
173
|
/**
|
|
174
174
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
175
175
|
*/
|
|
176
|
-
|
|
176
|
+
E1(this, x1, 0);
|
|
177
177
|
/**
|
|
178
178
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
179
179
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
180
180
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
181
181
|
*/
|
|
182
|
-
|
|
182
|
+
E1(this, _0, null);
|
|
183
183
|
/**
|
|
184
184
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
185
185
|
* @type {Set<Effect>}
|
|
186
186
|
*/
|
|
187
|
-
|
|
187
|
+
E1(this, e0, /* @__PURE__ */ new Set());
|
|
188
188
|
/**
|
|
189
189
|
* Deferred effects that are MAYBE_DIRTY
|
|
190
190
|
* @type {Set<Effect>}
|
|
191
191
|
*/
|
|
192
|
-
|
|
192
|
+
E1(this, n0, /* @__PURE__ */ new Set());
|
|
193
193
|
/**
|
|
194
194
|
* A set of branches that still exist, but will be destroyed when this batch
|
|
195
195
|
* is committed — we skip over these during `process`
|
|
196
196
|
* @type {Set<Effect>}
|
|
197
197
|
*/
|
|
198
|
-
|
|
199
|
-
|
|
198
|
+
A1(this, "skipped_effects", /* @__PURE__ */ new Set());
|
|
199
|
+
A1(this, "is_fork", !1);
|
|
200
200
|
}
|
|
201
201
|
is_deferred() {
|
|
202
|
-
return this.is_fork ||
|
|
202
|
+
return this.is_fork || F(this, x1) > 0;
|
|
203
203
|
}
|
|
204
204
|
/**
|
|
205
205
|
*
|
|
@@ -215,8 +215,8 @@ const F0 = class F0 {
|
|
|
215
215
|
render_effects: []
|
|
216
216
|
};
|
|
217
217
|
for (const s of d)
|
|
218
|
-
f1(this,
|
|
219
|
-
this.is_fork || f1(this,
|
|
218
|
+
f1(this, Z, u2).call(this, s, e);
|
|
219
|
+
this.is_fork || f1(this, Z, Md).call(this), this.is_deferred() ? (f1(this, Z, h0).call(this, e.effects), f1(this, Z, h0).call(this, e.render_effects)) : (x = null, ld(e.render_effects), ld(e.effects), (i = F(this, _0)) == null || i.resolve()), K = null;
|
|
220
220
|
}
|
|
221
221
|
/**
|
|
222
222
|
* Associate a change to a given source with the current
|
|
@@ -225,74 +225,74 @@ const F0 = class F0 {
|
|
|
225
225
|
* @param {any} value
|
|
226
226
|
*/
|
|
227
227
|
capture(d, e) {
|
|
228
|
-
this.previous.has(d) || this.previous.set(d, e), (d.f &
|
|
228
|
+
this.previous.has(d) || this.previous.set(d, e), (d.f & T1) === 0 && (this.current.set(d, d.v), K == null || K.set(d, d.v));
|
|
229
229
|
}
|
|
230
230
|
activate() {
|
|
231
|
-
|
|
231
|
+
x = this, this.apply();
|
|
232
232
|
}
|
|
233
233
|
deactivate() {
|
|
234
|
-
|
|
234
|
+
x === this && (x = null, K = null);
|
|
235
235
|
}
|
|
236
236
|
flush() {
|
|
237
237
|
if (this.activate(), p1.length > 0) {
|
|
238
|
-
if (h4(),
|
|
238
|
+
if (h4(), x !== null && x !== this)
|
|
239
239
|
return;
|
|
240
|
-
} else
|
|
240
|
+
} else F(this, M1) === 0 && this.process([]);
|
|
241
241
|
this.deactivate();
|
|
242
242
|
}
|
|
243
243
|
discard() {
|
|
244
|
-
for (const d of
|
|
245
|
-
|
|
244
|
+
for (const d of F(this, t0)) d(this);
|
|
245
|
+
F(this, t0).clear();
|
|
246
246
|
}
|
|
247
247
|
/**
|
|
248
248
|
*
|
|
249
249
|
* @param {boolean} blocking
|
|
250
250
|
*/
|
|
251
251
|
increment(d) {
|
|
252
|
-
Z1(this,
|
|
252
|
+
Z1(this, M1, F(this, M1) + 1), d && Z1(this, x1, F(this, x1) + 1);
|
|
253
253
|
}
|
|
254
254
|
/**
|
|
255
255
|
*
|
|
256
256
|
* @param {boolean} blocking
|
|
257
257
|
*/
|
|
258
258
|
decrement(d) {
|
|
259
|
-
Z1(this,
|
|
259
|
+
Z1(this, M1, F(this, M1) - 1), d && Z1(this, x1, F(this, x1) - 1), this.revive();
|
|
260
260
|
}
|
|
261
261
|
revive() {
|
|
262
|
-
for (const d of
|
|
263
|
-
|
|
264
|
-
for (const d of
|
|
262
|
+
for (const d of F(this, e0))
|
|
263
|
+
F(this, n0).delete(d), i1(d, o1), i0(d);
|
|
264
|
+
for (const d of F(this, n0))
|
|
265
265
|
i1(d, C1), i0(d);
|
|
266
266
|
this.flush();
|
|
267
267
|
}
|
|
268
268
|
/** @param {() => void} fn */
|
|
269
269
|
oncommit(d) {
|
|
270
|
-
|
|
270
|
+
F(this, d0).add(d);
|
|
271
271
|
}
|
|
272
272
|
/** @param {(batch: Batch) => void} fn */
|
|
273
273
|
ondiscard(d) {
|
|
274
|
-
|
|
274
|
+
F(this, t0).add(d);
|
|
275
275
|
}
|
|
276
276
|
settled() {
|
|
277
|
-
return (
|
|
277
|
+
return (F(this, _0) ?? Z1(this, _0, bd())).promise;
|
|
278
278
|
}
|
|
279
279
|
static ensure() {
|
|
280
|
-
if (
|
|
281
|
-
const d =
|
|
282
|
-
|
|
283
|
-
|
|
280
|
+
if (x === null) {
|
|
281
|
+
const d = x = new G0();
|
|
282
|
+
T0.add(x), G0.enqueue(() => {
|
|
283
|
+
x === d && d.flush();
|
|
284
284
|
});
|
|
285
285
|
}
|
|
286
|
-
return
|
|
286
|
+
return x;
|
|
287
287
|
}
|
|
288
288
|
/** @param {() => void} task */
|
|
289
289
|
static enqueue(d) {
|
|
290
|
-
|
|
290
|
+
k0(d);
|
|
291
291
|
}
|
|
292
292
|
apply() {
|
|
293
293
|
}
|
|
294
294
|
};
|
|
295
|
-
d0 = new WeakMap(), t0 = new WeakMap(),
|
|
295
|
+
d0 = new WeakMap(), t0 = new WeakMap(), M1 = new WeakMap(), x1 = new WeakMap(), _0 = new WeakMap(), e0 = new WeakMap(), n0 = new WeakMap(), Z = new WeakSet(), /**
|
|
296
296
|
* Traverse the effect tree, executing effects or stashing
|
|
297
297
|
* them for later execution as appropriate
|
|
298
298
|
* @param {Effect} root
|
|
@@ -302,14 +302,14 @@ u2 = function(d, e) {
|
|
|
302
302
|
var C;
|
|
303
303
|
d.f ^= e1;
|
|
304
304
|
for (var i = d.first; i !== null; ) {
|
|
305
|
-
var s = i.f, $ = (s & (
|
|
305
|
+
var s = i.f, $ = (s & (k1 | r0)) !== 0, o = $ && (s & e1) !== 0, l = o || (s & J1) !== 0 || this.skipped_effects.has(i);
|
|
306
306
|
if ((i.f & g2) !== 0 && ((C = i.b) != null && C.is_pending()) && (e = {
|
|
307
307
|
parent: e,
|
|
308
308
|
effect: i,
|
|
309
309
|
effects: [],
|
|
310
310
|
render_effects: []
|
|
311
311
|
}), !l && i.fn !== null) {
|
|
312
|
-
$ ? i.f ^= e1 : (s & p2) !== 0 ? e.effects.push(i) : m0(i) && ((i.f & V1) !== 0 &&
|
|
312
|
+
$ ? i.f ^= e1 : (s & p2) !== 0 ? e.effects.push(i) : m0(i) && ((i.f & V1) !== 0 && F(this, e0).add(i), C0(i));
|
|
313
313
|
var f = i.first;
|
|
314
314
|
if (f !== null) {
|
|
315
315
|
i = f;
|
|
@@ -318,7 +318,7 @@ u2 = function(d, e) {
|
|
|
318
318
|
}
|
|
319
319
|
var a = i.parent;
|
|
320
320
|
for (i = i.next; i === null && a !== null; )
|
|
321
|
-
a === e.effect && (f1(this,
|
|
321
|
+
a === e.effect && (f1(this, Z, h0).call(this, e.effects), f1(this, Z, h0).call(this, e.render_effects), e = /** @type {EffectTarget} */
|
|
322
322
|
e.parent), i = a.next, a = a.parent;
|
|
323
323
|
}
|
|
324
324
|
}, /**
|
|
@@ -326,27 +326,27 @@ u2 = function(d, e) {
|
|
|
326
326
|
*/
|
|
327
327
|
h0 = function(d) {
|
|
328
328
|
for (const e of d)
|
|
329
|
-
(e.f & o1) !== 0 ?
|
|
329
|
+
(e.f & o1) !== 0 ? F(this, e0).add(e) : (e.f & C1) !== 0 && F(this, n0).add(e), f1(this, Z, l2).call(this, e.deps), i1(e, e1);
|
|
330
330
|
}, /**
|
|
331
331
|
* @param {Value[] | null} deps
|
|
332
332
|
*/
|
|
333
333
|
l2 = function(d) {
|
|
334
334
|
if (d !== null)
|
|
335
335
|
for (const e of d)
|
|
336
|
-
(e.f &
|
|
336
|
+
(e.f & z) === 0 || (e.f & H1) === 0 || (e.f ^= H1, f1(this, Z, l2).call(
|
|
337
337
|
this,
|
|
338
338
|
/** @type {Derived} */
|
|
339
339
|
e.deps
|
|
340
340
|
));
|
|
341
341
|
}, Md = function() {
|
|
342
|
-
if (
|
|
343
|
-
for (const d of
|
|
344
|
-
|
|
342
|
+
if (F(this, x1) === 0) {
|
|
343
|
+
for (const d of F(this, d0)) d();
|
|
344
|
+
F(this, d0).clear();
|
|
345
345
|
}
|
|
346
|
-
|
|
347
|
-
},
|
|
346
|
+
F(this, M1) === 0 && f1(this, Z, xd).call(this);
|
|
347
|
+
}, xd = function() {
|
|
348
348
|
var $;
|
|
349
|
-
if (
|
|
349
|
+
if (T0.size > 1) {
|
|
350
350
|
this.previous.clear();
|
|
351
351
|
var d = K, e = !0, i = {
|
|
352
352
|
parent: null,
|
|
@@ -354,7 +354,7 @@ l2 = function(d) {
|
|
|
354
354
|
effects: [],
|
|
355
355
|
render_effects: []
|
|
356
356
|
};
|
|
357
|
-
for (const o of
|
|
357
|
+
for (const o of T0) {
|
|
358
358
|
if (o === this) {
|
|
359
359
|
e = !1;
|
|
360
360
|
continue;
|
|
@@ -376,44 +376,44 @@ l2 = function(d) {
|
|
|
376
376
|
p1 = [];
|
|
377
377
|
const a = /* @__PURE__ */ new Set(), C = /* @__PURE__ */ new Map();
|
|
378
378
|
for (const _ of l)
|
|
379
|
-
|
|
379
|
+
Ud(_, f, a, C);
|
|
380
380
|
if (p1.length > 0) {
|
|
381
|
-
|
|
381
|
+
x = o, o.apply();
|
|
382
382
|
for (const _ of p1)
|
|
383
|
-
f1($ = o,
|
|
383
|
+
f1($ = o, Z, u2).call($, _, i);
|
|
384
384
|
o.deactivate();
|
|
385
385
|
}
|
|
386
386
|
p1 = s;
|
|
387
387
|
}
|
|
388
388
|
}
|
|
389
|
-
|
|
389
|
+
x = null, K = d;
|
|
390
390
|
}
|
|
391
|
-
this.committed = !0,
|
|
391
|
+
this.committed = !0, T0.delete(this);
|
|
392
392
|
};
|
|
393
|
-
let
|
|
393
|
+
let x0 = G0;
|
|
394
394
|
function h4() {
|
|
395
|
-
var t =
|
|
395
|
+
var t = B1;
|
|
396
396
|
o2 = !0;
|
|
397
397
|
var d = null;
|
|
398
398
|
try {
|
|
399
399
|
var e = 0;
|
|
400
|
-
for (
|
|
401
|
-
var i =
|
|
400
|
+
for (F0(!0); p1.length > 0; ) {
|
|
401
|
+
var i = x0.ensure();
|
|
402
402
|
if (e++ > 1e3) {
|
|
403
403
|
var s, $;
|
|
404
404
|
p4();
|
|
405
405
|
}
|
|
406
|
-
i.process(p1),
|
|
406
|
+
i.process(p1), b1.clear();
|
|
407
407
|
}
|
|
408
408
|
} finally {
|
|
409
|
-
o2 = !1,
|
|
409
|
+
o2 = !1, F0(t), m2 = null;
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
412
|
function p4() {
|
|
413
413
|
try {
|
|
414
414
|
t4();
|
|
415
415
|
} catch (t) {
|
|
416
|
-
|
|
416
|
+
M0(t, m2);
|
|
417
417
|
}
|
|
418
418
|
}
|
|
419
419
|
let c1 = null;
|
|
@@ -422,17 +422,17 @@ function ld(t) {
|
|
|
422
422
|
if (d !== 0) {
|
|
423
423
|
for (var e = 0; e < d; ) {
|
|
424
424
|
var i = t[e++];
|
|
425
|
-
if ((i.f & (
|
|
426
|
-
|
|
425
|
+
if ((i.f & (I1 | J1)) === 0 && m0(i) && (c1 = /* @__PURE__ */ new Set(), C0(i), i.deps === null && i.first === null && i.nodes === null && (i.teardown === null && i.ac === null ? Xd(i) : i.fn = null), (c1 == null ? void 0 : c1.size) > 0)) {
|
|
426
|
+
b1.clear();
|
|
427
427
|
for (const s of c1) {
|
|
428
|
-
if ((s.f & (
|
|
428
|
+
if ((s.f & (I1 | J1)) !== 0) continue;
|
|
429
429
|
const $ = [s];
|
|
430
430
|
let o = s.parent;
|
|
431
431
|
for (; o !== null; )
|
|
432
432
|
c1.has(o) && (c1.delete(o), $.push(o)), o = o.parent;
|
|
433
433
|
for (let l = $.length - 1; l >= 0; l--) {
|
|
434
434
|
const f = $[l];
|
|
435
|
-
(f.f & (
|
|
435
|
+
(f.f & (I1 | J1)) === 0 && C0(f);
|
|
436
436
|
}
|
|
437
437
|
}
|
|
438
438
|
c1.clear();
|
|
@@ -441,30 +441,30 @@ function ld(t) {
|
|
|
441
441
|
c1 = null;
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
function
|
|
444
|
+
function Ud(t, d, e, i) {
|
|
445
445
|
if (!e.has(t) && (e.add(t), t.reactions !== null))
|
|
446
446
|
for (const s of t.reactions) {
|
|
447
447
|
const $ = s.f;
|
|
448
|
-
($ &
|
|
448
|
+
($ & z) !== 0 ? Ud(
|
|
449
449
|
/** @type {Derived} */
|
|
450
450
|
s,
|
|
451
451
|
d,
|
|
452
452
|
e,
|
|
453
453
|
i
|
|
454
|
-
) : ($ & (_2 | V1)) !== 0 && ($ & o1) === 0 &&
|
|
454
|
+
) : ($ & (_2 | V1)) !== 0 && ($ & o1) === 0 && Bd(s, d, i) && (i1(s, o1), i0(
|
|
455
455
|
/** @type {Effect} */
|
|
456
456
|
s
|
|
457
457
|
));
|
|
458
458
|
}
|
|
459
459
|
}
|
|
460
|
-
function
|
|
460
|
+
function Bd(t, d, e) {
|
|
461
461
|
const i = e.get(t);
|
|
462
462
|
if (i !== void 0) return i;
|
|
463
463
|
if (t.deps !== null)
|
|
464
464
|
for (const s of t.deps) {
|
|
465
465
|
if (d.includes(s))
|
|
466
466
|
return !0;
|
|
467
|
-
if ((s.f &
|
|
467
|
+
if ((s.f & z) !== 0 && Bd(
|
|
468
468
|
/** @type {Derived} */
|
|
469
469
|
s,
|
|
470
470
|
d,
|
|
@@ -482,9 +482,9 @@ function i0(t) {
|
|
|
482
482
|
for (var d = m2 = t; d.parent !== null; ) {
|
|
483
483
|
d = d.parent;
|
|
484
484
|
var e = d.f;
|
|
485
|
-
if (o2 && d ===
|
|
485
|
+
if (o2 && d === U && (e & V1) !== 0 && (e & Pd) === 0)
|
|
486
486
|
return;
|
|
487
|
-
if ((e & (r0 |
|
|
487
|
+
if ((e & (r0 | k1)) !== 0) {
|
|
488
488
|
if ((e & e1) === 0) return;
|
|
489
489
|
d.f ^= e1;
|
|
490
490
|
}
|
|
@@ -497,9 +497,9 @@ function g4(t, d, e, i) {
|
|
|
497
497
|
i(d.map(s));
|
|
498
498
|
return;
|
|
499
499
|
}
|
|
500
|
-
var $ =
|
|
500
|
+
var $ = x, o = (
|
|
501
501
|
/** @type {Effect} */
|
|
502
|
-
|
|
502
|
+
U
|
|
503
503
|
), l = C4();
|
|
504
504
|
function f() {
|
|
505
505
|
Promise.all(e.map((a) => /* @__PURE__ */ _4(a))).then((a) => {
|
|
@@ -507,11 +507,11 @@ function g4(t, d, e, i) {
|
|
|
507
507
|
try {
|
|
508
508
|
i([...d.map(s), ...a]);
|
|
509
509
|
} catch (C) {
|
|
510
|
-
(o.f &
|
|
510
|
+
(o.f & I1) === 0 && M0(C, o);
|
|
511
511
|
}
|
|
512
|
-
$ == null || $.deactivate(),
|
|
512
|
+
$ == null || $.deactivate(), U0();
|
|
513
513
|
}).catch((a) => {
|
|
514
|
-
|
|
514
|
+
M0(a, o);
|
|
515
515
|
});
|
|
516
516
|
}
|
|
517
517
|
t.length > 0 ? Promise.all(t).then(() => {
|
|
@@ -519,30 +519,30 @@ function g4(t, d, e, i) {
|
|
|
519
519
|
try {
|
|
520
520
|
return f();
|
|
521
521
|
} finally {
|
|
522
|
-
$ == null || $.deactivate(),
|
|
522
|
+
$ == null || $.deactivate(), U0();
|
|
523
523
|
}
|
|
524
524
|
}) : f();
|
|
525
525
|
}
|
|
526
526
|
function C4() {
|
|
527
|
-
var t =
|
|
527
|
+
var t = U, d = P, e = _1, i = x;
|
|
528
528
|
return function($ = !0) {
|
|
529
|
-
L1(t), m1(d),
|
|
529
|
+
L1(t), m1(d), R0(e), $ && (i == null || i.activate());
|
|
530
530
|
};
|
|
531
531
|
}
|
|
532
|
-
function
|
|
533
|
-
L1(null), m1(null),
|
|
532
|
+
function U0() {
|
|
533
|
+
L1(null), m1(null), R0(null);
|
|
534
534
|
}
|
|
535
535
|
// @__NO_SIDE_EFFECTS__
|
|
536
536
|
function y2(t) {
|
|
537
|
-
var d =
|
|
537
|
+
var d = z | o1, e = P !== null && (P.f & z) !== 0 ? (
|
|
538
538
|
/** @type {Derived} */
|
|
539
539
|
P
|
|
540
540
|
) : null;
|
|
541
|
-
return
|
|
541
|
+
return U !== null && (U.f |= V0), {
|
|
542
542
|
ctx: _1,
|
|
543
543
|
deps: null,
|
|
544
544
|
effects: null,
|
|
545
|
-
equals:
|
|
545
|
+
equals: Od,
|
|
546
546
|
f: d,
|
|
547
547
|
fn: t,
|
|
548
548
|
reactions: null,
|
|
@@ -552,7 +552,7 @@ function y2(t) {
|
|
|
552
552
|
Y
|
|
553
553
|
),
|
|
554
554
|
wv: 0,
|
|
555
|
-
parent: e ??
|
|
555
|
+
parent: e ?? U,
|
|
556
556
|
ac: null
|
|
557
557
|
};
|
|
558
558
|
}
|
|
@@ -560,9 +560,9 @@ function y2(t) {
|
|
|
560
560
|
function _4(t, d) {
|
|
561
561
|
let e = (
|
|
562
562
|
/** @type {Effect | null} */
|
|
563
|
-
|
|
563
|
+
U
|
|
564
564
|
);
|
|
565
|
-
e === null &&
|
|
565
|
+
e === null && q3();
|
|
566
566
|
var i = (
|
|
567
567
|
/** @type {Boundary} */
|
|
568
568
|
e.b
|
|
@@ -570,45 +570,45 @@ function _4(t, d) {
|
|
|
570
570
|
/** @type {Promise<V>} */
|
|
571
571
|
/** @type {unknown} */
|
|
572
572
|
void 0
|
|
573
|
-
), $ =
|
|
573
|
+
), $ = Vd(
|
|
574
574
|
/** @type {V} */
|
|
575
575
|
Y
|
|
576
576
|
), o = !P, l = /* @__PURE__ */ new Map();
|
|
577
577
|
return P4(() => {
|
|
578
|
-
var
|
|
579
|
-
var f =
|
|
578
|
+
var m;
|
|
579
|
+
var f = bd();
|
|
580
580
|
s = f.promise;
|
|
581
581
|
try {
|
|
582
582
|
Promise.resolve(t()).then(f.resolve, f.reject).then(() => {
|
|
583
|
-
a ===
|
|
583
|
+
a === x && a.committed && a.deactivate(), U0();
|
|
584
584
|
});
|
|
585
585
|
} catch (v) {
|
|
586
|
-
f.reject(v),
|
|
586
|
+
f.reject(v), U0();
|
|
587
587
|
}
|
|
588
588
|
var a = (
|
|
589
589
|
/** @type {Batch} */
|
|
590
|
-
|
|
590
|
+
x
|
|
591
591
|
);
|
|
592
592
|
if (o) {
|
|
593
593
|
var C = !i.is_pending();
|
|
594
|
-
i.update_pending_count(1), a.increment(C), (
|
|
594
|
+
i.update_pending_count(1), a.increment(C), (m = l.get(a)) == null || m.reject(z1), l.delete(a), l.set(a, f);
|
|
595
595
|
}
|
|
596
|
-
const _ = (v,
|
|
597
|
-
if (a.activate(),
|
|
598
|
-
|
|
596
|
+
const _ = (v, N = void 0) => {
|
|
597
|
+
if (a.activate(), N)
|
|
598
|
+
N !== z1 && ($.f |= T1, f2($, N));
|
|
599
599
|
else {
|
|
600
|
-
($.f &
|
|
600
|
+
($.f & T1) !== 0 && ($.f ^= T1), f2($, v);
|
|
601
601
|
for (const [D, L] of l) {
|
|
602
602
|
if (l.delete(D), D === a) break;
|
|
603
|
-
L.reject(
|
|
603
|
+
L.reject(z1);
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
606
|
o && (i.update_pending_count(-1), a.decrement(C));
|
|
607
607
|
};
|
|
608
608
|
f.promise.then(_, (v) => _(null, v || "unknown"));
|
|
609
|
-
}),
|
|
609
|
+
}), Wd(() => {
|
|
610
610
|
for (const f of l.values())
|
|
611
|
-
f.reject(
|
|
611
|
+
f.reject(z1);
|
|
612
612
|
}), new Promise((f) => {
|
|
613
613
|
function a(C) {
|
|
614
614
|
function _() {
|
|
@@ -624,12 +624,12 @@ function m4(t) {
|
|
|
624
624
|
const d = /* @__PURE__ */ y2(t);
|
|
625
625
|
return d.equals = o4, d;
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function Fd(t) {
|
|
628
628
|
var d = t.effects;
|
|
629
629
|
if (d !== null) {
|
|
630
630
|
t.effects = null;
|
|
631
631
|
for (var e = 0; e < d.length; e += 1)
|
|
632
|
-
|
|
632
|
+
G1(
|
|
633
633
|
/** @type {Effect} */
|
|
634
634
|
d[e]
|
|
635
635
|
);
|
|
@@ -637,8 +637,8 @@ function Ud(t) {
|
|
|
637
637
|
}
|
|
638
638
|
function y4(t) {
|
|
639
639
|
for (var d = t.parent; d !== null; ) {
|
|
640
|
-
if ((d.f &
|
|
641
|
-
return (d.f &
|
|
640
|
+
if ((d.f & z) === 0)
|
|
641
|
+
return (d.f & I1) === 0 ? (
|
|
642
642
|
/** @type {Effect} */
|
|
643
643
|
d
|
|
644
644
|
) : null;
|
|
@@ -647,35 +647,35 @@ function y4(t) {
|
|
|
647
647
|
return null;
|
|
648
648
|
}
|
|
649
649
|
function v2(t) {
|
|
650
|
-
var d, e =
|
|
650
|
+
var d, e = U;
|
|
651
651
|
L1(y4(t));
|
|
652
652
|
try {
|
|
653
|
-
t.f &= ~
|
|
653
|
+
t.f &= ~H1, Fd(t), d = d3(t);
|
|
654
654
|
} finally {
|
|
655
655
|
L1(e);
|
|
656
656
|
}
|
|
657
657
|
return d;
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function Hd(t) {
|
|
660
660
|
var d = v2(t);
|
|
661
|
-
if (t.equals(d) || (
|
|
661
|
+
if (t.equals(d) || (x != null && x.is_fork || (t.v = d), t.wv = Jd()), !K1)
|
|
662
662
|
if (K !== null)
|
|
663
|
-
(
|
|
663
|
+
(B0() || x != null && x.is_fork) && K.set(t, d);
|
|
664
664
|
else {
|
|
665
665
|
var e = (t.f & h1) === 0 ? C1 : e1;
|
|
666
666
|
i1(t, e);
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
669
|
let a2 = /* @__PURE__ */ new Set();
|
|
670
|
-
const
|
|
670
|
+
const b1 = /* @__PURE__ */ new Map();
|
|
671
671
|
let Gd = !1;
|
|
672
|
-
function
|
|
672
|
+
function Vd(t, d) {
|
|
673
673
|
var e = {
|
|
674
674
|
f: 0,
|
|
675
675
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
676
676
|
v: t,
|
|
677
677
|
reactions: null,
|
|
678
|
-
equals:
|
|
678
|
+
equals: Od,
|
|
679
679
|
rv: 0,
|
|
680
680
|
wv: 0
|
|
681
681
|
};
|
|
@@ -683,55 +683,55 @@ function Fd(t, d) {
|
|
|
683
683
|
}
|
|
684
684
|
// @__NO_SIDE_EFFECTS__
|
|
685
685
|
function a1(t, d) {
|
|
686
|
-
const e =
|
|
687
|
-
return
|
|
686
|
+
const e = Vd(t);
|
|
687
|
+
return x4(e), e;
|
|
688
688
|
}
|
|
689
689
|
function $1(t, d, e = !1) {
|
|
690
690
|
P !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
691
691
|
// to ensure we error if state is set inside an inspect effect
|
|
692
|
-
(!g1 || (P.f & ud) !== 0) && Rd() && (P.f & (
|
|
693
|
-
let i = e ?
|
|
692
|
+
(!g1 || (P.f & ud) !== 0) && Rd() && (P.f & (z | V1 | _2 | ud)) !== 0 && !(n1 != null && n1.includes(t)) && r4();
|
|
693
|
+
let i = e ? q1(d) : d;
|
|
694
694
|
return f2(t, i);
|
|
695
695
|
}
|
|
696
696
|
function f2(t, d) {
|
|
697
697
|
if (!t.equals(d)) {
|
|
698
698
|
var e = t.v;
|
|
699
|
-
|
|
700
|
-
var i =
|
|
701
|
-
i.capture(t, e), (t.f &
|
|
699
|
+
K1 ? b1.set(t, d) : b1.set(t, e), t.v = d;
|
|
700
|
+
var i = x0.ensure();
|
|
701
|
+
i.capture(t, e), (t.f & z) !== 0 && ((t.f & o1) !== 0 && v2(
|
|
702
702
|
/** @type {Derived} */
|
|
703
703
|
t
|
|
704
|
-
), i1(t, (t.f & h1) !== 0 ? e1 : C1)), t.wv = Jd(),
|
|
704
|
+
), i1(t, (t.f & h1) !== 0 ? e1 : C1)), t.wv = Jd(), kd(t, o1), U !== null && (U.f & e1) !== 0 && (U.f & (k1 | r0)) === 0 && (l1 === null ? U4([t]) : l1.push(t)), !i.is_fork && a2.size > 0 && !Gd && v4();
|
|
705
705
|
}
|
|
706
706
|
return d;
|
|
707
707
|
}
|
|
708
708
|
function v4() {
|
|
709
709
|
Gd = !1;
|
|
710
|
-
var t =
|
|
711
|
-
|
|
710
|
+
var t = B1;
|
|
711
|
+
F0(!0);
|
|
712
712
|
const d = Array.from(a2);
|
|
713
713
|
try {
|
|
714
714
|
for (const e of d)
|
|
715
715
|
(e.f & e1) !== 0 && i1(e, C1), m0(e) && C0(e);
|
|
716
716
|
} finally {
|
|
717
|
-
|
|
717
|
+
F0(t);
|
|
718
718
|
}
|
|
719
719
|
a2.clear();
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function q0(t) {
|
|
722
722
|
$1(t, t.v + 1);
|
|
723
723
|
}
|
|
724
|
-
function
|
|
724
|
+
function kd(t, d) {
|
|
725
725
|
var e = t.reactions;
|
|
726
726
|
if (e !== null)
|
|
727
727
|
for (var i = e.length, s = 0; s < i; s++) {
|
|
728
728
|
var $ = e[s], o = $.f, l = (o & o1) === 0;
|
|
729
|
-
if (l && i1($, d), (o &
|
|
729
|
+
if (l && i1($, d), (o & z) !== 0) {
|
|
730
730
|
var f = (
|
|
731
731
|
/** @type {Derived} */
|
|
732
732
|
$
|
|
733
733
|
);
|
|
734
|
-
K == null || K.delete(f), (o &
|
|
734
|
+
K == null || K.delete(f), (o & H1) === 0 && (o & h1 && ($.f |= H1), kd(f, C1));
|
|
735
735
|
} else l && ((o & V1) !== 0 && c1 !== null && c1.add(
|
|
736
736
|
/** @type {Effect} */
|
|
737
737
|
$
|
|
@@ -741,16 +741,16 @@ function Hd(t, d) {
|
|
|
741
741
|
));
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
|
-
function
|
|
745
|
-
if (typeof t != "object" || t === null ||
|
|
744
|
+
function q1(t) {
|
|
745
|
+
if (typeof t != "object" || t === null || U1 in t)
|
|
746
746
|
return t;
|
|
747
|
-
const d =
|
|
747
|
+
const d = Td(t);
|
|
748
748
|
if (d !== K3 && d !== j3)
|
|
749
749
|
return t;
|
|
750
|
-
var e = /* @__PURE__ */ new Map(), i =
|
|
751
|
-
if (
|
|
750
|
+
var e = /* @__PURE__ */ new Map(), i = Ad(t), s = /* @__PURE__ */ a1(0), $ = F1, o = (l) => {
|
|
751
|
+
if (F1 === $)
|
|
752
752
|
return l();
|
|
753
|
-
var f = P, a =
|
|
753
|
+
var f = P, a = F1;
|
|
754
754
|
m1(null), cd($);
|
|
755
755
|
var C = l();
|
|
756
756
|
return m1(f), cd(a), C;
|
|
@@ -775,23 +775,23 @@ function X1(t) {
|
|
|
775
775
|
if (a === void 0) {
|
|
776
776
|
if (f in l) {
|
|
777
777
|
const C = o(() => /* @__PURE__ */ a1(Y));
|
|
778
|
-
e.set(f, C),
|
|
778
|
+
e.set(f, C), q0(s);
|
|
779
779
|
}
|
|
780
780
|
} else
|
|
781
|
-
$1(a, Y),
|
|
781
|
+
$1(a, Y), q0(s);
|
|
782
782
|
return !0;
|
|
783
783
|
},
|
|
784
784
|
get(l, f, a) {
|
|
785
785
|
var v;
|
|
786
|
-
if (f ===
|
|
786
|
+
if (f === U1)
|
|
787
787
|
return t;
|
|
788
788
|
var C = e.get(f), _ = f in l;
|
|
789
789
|
if (C === void 0 && (!_ || (v = P0(l, f)) != null && v.writable) && (C = o(() => {
|
|
790
|
-
var
|
|
790
|
+
var N = q1(_ ? l[f] : Y), D = /* @__PURE__ */ a1(N);
|
|
791
791
|
return D;
|
|
792
792
|
}), e.set(f, C)), C !== void 0) {
|
|
793
|
-
var
|
|
794
|
-
return
|
|
793
|
+
var m = O(C);
|
|
794
|
+
return m === Y ? void 0 : m;
|
|
795
795
|
}
|
|
796
796
|
return Reflect.get(l, f, a);
|
|
797
797
|
},
|
|
@@ -799,69 +799,69 @@ function X1(t) {
|
|
|
799
799
|
var a = Reflect.getOwnPropertyDescriptor(l, f);
|
|
800
800
|
if (a && "value" in a) {
|
|
801
801
|
var C = e.get(f);
|
|
802
|
-
C && (a.value =
|
|
802
|
+
C && (a.value = O(C));
|
|
803
803
|
} else if (a === void 0) {
|
|
804
|
-
var _ = e.get(f),
|
|
805
|
-
if (_ !== void 0 &&
|
|
804
|
+
var _ = e.get(f), m = _ == null ? void 0 : _.v;
|
|
805
|
+
if (_ !== void 0 && m !== Y)
|
|
806
806
|
return {
|
|
807
807
|
enumerable: !0,
|
|
808
808
|
configurable: !0,
|
|
809
|
-
value:
|
|
809
|
+
value: m,
|
|
810
810
|
writable: !0
|
|
811
811
|
};
|
|
812
812
|
}
|
|
813
813
|
return a;
|
|
814
814
|
},
|
|
815
815
|
has(l, f) {
|
|
816
|
-
var
|
|
817
|
-
if (f ===
|
|
816
|
+
var m;
|
|
817
|
+
if (f === U1)
|
|
818
818
|
return !0;
|
|
819
819
|
var a = e.get(f), C = a !== void 0 && a.v !== Y || Reflect.has(l, f);
|
|
820
|
-
if (a !== void 0 ||
|
|
820
|
+
if (a !== void 0 || U !== null && (!C || (m = P0(l, f)) != null && m.writable)) {
|
|
821
821
|
a === void 0 && (a = o(() => {
|
|
822
|
-
var v = C ?
|
|
823
|
-
return
|
|
822
|
+
var v = C ? q1(l[f]) : Y, N = /* @__PURE__ */ a1(v);
|
|
823
|
+
return N;
|
|
824
824
|
}), e.set(f, a));
|
|
825
|
-
var _ =
|
|
825
|
+
var _ = O(a);
|
|
826
826
|
if (_ === Y)
|
|
827
827
|
return !1;
|
|
828
828
|
}
|
|
829
829
|
return C;
|
|
830
830
|
},
|
|
831
831
|
set(l, f, a, C) {
|
|
832
|
-
var
|
|
833
|
-
var _ = e.get(f),
|
|
832
|
+
var E;
|
|
833
|
+
var _ = e.get(f), m = f in l;
|
|
834
834
|
if (i && f === "length")
|
|
835
835
|
for (var v = a; v < /** @type {Source<number>} */
|
|
836
836
|
_.v; v += 1) {
|
|
837
|
-
var
|
|
838
|
-
|
|
837
|
+
var N = e.get(v + "");
|
|
838
|
+
N !== void 0 ? $1(N, Y) : v in l && (N = o(() => /* @__PURE__ */ a1(Y)), e.set(v + "", N));
|
|
839
839
|
}
|
|
840
840
|
if (_ === void 0)
|
|
841
|
-
(!
|
|
841
|
+
(!m || (E = P0(l, f)) != null && E.writable) && (_ = o(() => /* @__PURE__ */ a1(void 0)), $1(_, q1(a)), e.set(f, _));
|
|
842
842
|
else {
|
|
843
|
-
|
|
844
|
-
var D = o(() =>
|
|
843
|
+
m = _.v !== Y;
|
|
844
|
+
var D = o(() => q1(a));
|
|
845
845
|
$1(_, D);
|
|
846
846
|
}
|
|
847
847
|
var L = Reflect.getOwnPropertyDescriptor(l, f);
|
|
848
|
-
if (L != null && L.set && L.set.call(C, a), !
|
|
848
|
+
if (L != null && L.set && L.set.call(C, a), !m) {
|
|
849
849
|
if (i && typeof f == "string") {
|
|
850
|
-
var
|
|
850
|
+
var S = (
|
|
851
851
|
/** @type {Source<number>} */
|
|
852
852
|
e.get("length")
|
|
853
|
-
),
|
|
854
|
-
Number.isInteger(
|
|
853
|
+
), A = Number(f);
|
|
854
|
+
Number.isInteger(A) && A >= S.v && $1(S, A + 1);
|
|
855
855
|
}
|
|
856
|
-
|
|
856
|
+
q0(s);
|
|
857
857
|
}
|
|
858
858
|
return !0;
|
|
859
859
|
},
|
|
860
860
|
ownKeys(l) {
|
|
861
|
-
|
|
861
|
+
O(s);
|
|
862
862
|
var f = Reflect.ownKeys(l).filter((_) => {
|
|
863
|
-
var
|
|
864
|
-
return
|
|
863
|
+
var m = e.get(_);
|
|
864
|
+
return m === void 0 || m.v !== Y;
|
|
865
865
|
});
|
|
866
866
|
for (var [a, C] of e)
|
|
867
867
|
C.v !== Y && !(a in l) && f.push(a);
|
|
@@ -875,40 +875,40 @@ function X1(t) {
|
|
|
875
875
|
}
|
|
876
876
|
function ad(t) {
|
|
877
877
|
try {
|
|
878
|
-
if (t !== null && typeof t == "object" &&
|
|
879
|
-
return t[
|
|
878
|
+
if (t !== null && typeof t == "object" && U1 in t)
|
|
879
|
+
return t[U1];
|
|
880
880
|
} catch {
|
|
881
881
|
}
|
|
882
882
|
return t;
|
|
883
883
|
}
|
|
884
|
-
function
|
|
884
|
+
function E4(t, d) {
|
|
885
885
|
return Object.is(ad(t), ad(d));
|
|
886
886
|
}
|
|
887
|
-
var
|
|
887
|
+
var I4, w4, N4;
|
|
888
888
|
// @__NO_SIDE_EFFECTS__
|
|
889
|
-
function
|
|
889
|
+
function S4(t) {
|
|
890
890
|
return (
|
|
891
891
|
/** @type {TemplateNode | null} */
|
|
892
892
|
w4.call(t)
|
|
893
893
|
);
|
|
894
894
|
}
|
|
895
895
|
// @__NO_SIDE_EFFECTS__
|
|
896
|
-
function
|
|
896
|
+
function A4(t) {
|
|
897
897
|
return (
|
|
898
898
|
/** @type {TemplateNode | null} */
|
|
899
|
-
|
|
899
|
+
N4.call(t)
|
|
900
900
|
);
|
|
901
901
|
}
|
|
902
|
-
function
|
|
902
|
+
function T4(t, d) {
|
|
903
903
|
if (d) {
|
|
904
904
|
const e = document.body;
|
|
905
|
-
t.autofocus = !0,
|
|
905
|
+
t.autofocus = !0, k0(() => {
|
|
906
906
|
document.activeElement === e && t.focus();
|
|
907
907
|
});
|
|
908
908
|
}
|
|
909
909
|
}
|
|
910
|
-
function
|
|
911
|
-
var d = P, e =
|
|
910
|
+
function E2(t) {
|
|
911
|
+
var d = P, e = U;
|
|
912
912
|
m1(null), L1(null);
|
|
913
913
|
try {
|
|
914
914
|
return t();
|
|
@@ -916,16 +916,16 @@ function I2(t) {
|
|
|
916
916
|
m1(d), L1(e);
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
|
-
function
|
|
920
|
-
|
|
919
|
+
function b4(t) {
|
|
920
|
+
U === null && (P === null && d4(), Q3()), K1 && J3();
|
|
921
921
|
}
|
|
922
922
|
function L4(t, d) {
|
|
923
923
|
var e = d.last;
|
|
924
924
|
e === null ? d.last = d.first = t : (e.next = t, t.prev = e, d.last = t);
|
|
925
925
|
}
|
|
926
|
-
function
|
|
927
|
-
var i =
|
|
928
|
-
i !== null && (i.f &
|
|
926
|
+
function W1(t, d, e) {
|
|
927
|
+
var i = U;
|
|
928
|
+
i !== null && (i.f & J1) !== 0 && (t |= J1);
|
|
929
929
|
var s = {
|
|
930
930
|
ctx: _1,
|
|
931
931
|
deps: null,
|
|
@@ -946,12 +946,12 @@ function K1(t, d, e) {
|
|
|
946
946
|
try {
|
|
947
947
|
C0(s), s.f |= C2;
|
|
948
948
|
} catch (l) {
|
|
949
|
-
throw
|
|
949
|
+
throw G1(s), l;
|
|
950
950
|
}
|
|
951
951
|
else d !== null && i0(s);
|
|
952
952
|
var $ = s;
|
|
953
953
|
if (e && $.deps === null && $.teardown === null && $.nodes === null && $.first === $.last && // either `null`, or a singular child
|
|
954
|
-
($.f &
|
|
954
|
+
($.f & V0) === 0 && ($ = $.first, (t & V1) !== 0 && (t & od) !== 0 && $ !== null && ($.f |= od)), $ !== null && ($.parent = i, i !== null && L4($, i), P !== null && (P.f & z) !== 0 && (t & r0) === 0)) {
|
|
955
955
|
var o = (
|
|
956
956
|
/** @type {Derived} */
|
|
957
957
|
P
|
|
@@ -960,19 +960,19 @@ function K1(t, d, e) {
|
|
|
960
960
|
}
|
|
961
961
|
return s;
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function B0() {
|
|
964
964
|
return P !== null && !g1;
|
|
965
965
|
}
|
|
966
|
-
function
|
|
967
|
-
const d =
|
|
966
|
+
function Wd(t) {
|
|
967
|
+
const d = W1(Ld, null, !1);
|
|
968
968
|
return i1(d, e1), d.teardown = t, d;
|
|
969
969
|
}
|
|
970
970
|
function D4(t) {
|
|
971
|
-
|
|
971
|
+
b4();
|
|
972
972
|
var d = (
|
|
973
973
|
/** @type {Effect} */
|
|
974
|
-
|
|
975
|
-
), e = !P && (d &
|
|
974
|
+
U.f
|
|
975
|
+
), e = !P && (d & k1) !== 0 && (d & C2) === 0;
|
|
976
976
|
if (e) {
|
|
977
977
|
var i = (
|
|
978
978
|
/** @type {ComponentContext} */
|
|
@@ -980,31 +980,31 @@ function D4(t) {
|
|
|
980
980
|
);
|
|
981
981
|
(i.e ?? (i.e = [])).push(t);
|
|
982
982
|
} else
|
|
983
|
-
return
|
|
983
|
+
return Kd(t);
|
|
984
984
|
}
|
|
985
|
-
function
|
|
986
|
-
return
|
|
985
|
+
function Kd(t) {
|
|
986
|
+
return W1(p2 | Z3, t, !1);
|
|
987
987
|
}
|
|
988
|
-
function
|
|
989
|
-
return
|
|
988
|
+
function I2(t) {
|
|
989
|
+
return W1(p2, t, !1);
|
|
990
990
|
}
|
|
991
991
|
function P4(t) {
|
|
992
|
-
return
|
|
992
|
+
return W1(_2 | V0, t, !0);
|
|
993
993
|
}
|
|
994
|
-
function
|
|
995
|
-
return
|
|
994
|
+
function O4(t, d = 0) {
|
|
995
|
+
return W1(Ld | d, t, !0);
|
|
996
996
|
}
|
|
997
|
-
function
|
|
998
|
-
var e =
|
|
997
|
+
function jd(t, d = 0) {
|
|
998
|
+
var e = W1(Dd | d, t, !0);
|
|
999
999
|
return e;
|
|
1000
1000
|
}
|
|
1001
|
-
function jd(t) {
|
|
1002
|
-
return K1(W1 | H0, t, !0);
|
|
1003
|
-
}
|
|
1004
1001
|
function Yd(t) {
|
|
1002
|
+
return W1(k1 | V0, t, !0);
|
|
1003
|
+
}
|
|
1004
|
+
function Zd(t) {
|
|
1005
1005
|
var d = t.teardown;
|
|
1006
1006
|
if (d !== null) {
|
|
1007
|
-
const e =
|
|
1007
|
+
const e = K1, i = P;
|
|
1008
1008
|
fd(!0), m1(null);
|
|
1009
1009
|
try {
|
|
1010
1010
|
d.call(null);
|
|
@@ -1017,71 +1017,71 @@ function zd(t, d = !1) {
|
|
|
1017
1017
|
var e = t.first;
|
|
1018
1018
|
for (t.first = t.last = null; e !== null; ) {
|
|
1019
1019
|
const s = e.ac;
|
|
1020
|
-
s !== null &&
|
|
1021
|
-
s.abort(
|
|
1020
|
+
s !== null && E2(() => {
|
|
1021
|
+
s.abort(z1);
|
|
1022
1022
|
});
|
|
1023
1023
|
var i = e.next;
|
|
1024
|
-
(e.f & r0) !== 0 ? e.parent = null :
|
|
1024
|
+
(e.f & r0) !== 0 ? e.parent = null : G1(e, d), e = i;
|
|
1025
1025
|
}
|
|
1026
1026
|
}
|
|
1027
|
-
function
|
|
1027
|
+
function R4(t) {
|
|
1028
1028
|
for (var d = t.first; d !== null; ) {
|
|
1029
1029
|
var e = d.next;
|
|
1030
|
-
(d.f &
|
|
1030
|
+
(d.f & k1) === 0 && G1(d), d = e;
|
|
1031
1031
|
}
|
|
1032
1032
|
}
|
|
1033
|
-
function
|
|
1033
|
+
function G1(t, d = !0) {
|
|
1034
1034
|
var e = !1;
|
|
1035
|
-
(d || (t.f &
|
|
1035
|
+
(d || (t.f & Pd) !== 0) && t.nodes !== null && t.nodes.end !== null && (M4(
|
|
1036
1036
|
t.nodes.start,
|
|
1037
1037
|
/** @type {TemplateNode} */
|
|
1038
1038
|
t.nodes.end
|
|
1039
|
-
), e = !0), zd(t, d && !e),
|
|
1039
|
+
), e = !0), zd(t, d && !e), H0(t, 0), i1(t, I1);
|
|
1040
1040
|
var i = t.nodes && t.nodes.t;
|
|
1041
1041
|
if (i !== null)
|
|
1042
1042
|
for (const $ of i)
|
|
1043
1043
|
$.stop();
|
|
1044
|
-
|
|
1044
|
+
Zd(t);
|
|
1045
1045
|
var s = t.parent;
|
|
1046
|
-
s !== null && s.first !== null &&
|
|
1046
|
+
s !== null && s.first !== null && Xd(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1048
|
+
function M4(t, d) {
|
|
1049
1049
|
for (; t !== null; ) {
|
|
1050
|
-
var e = t === d ? null : /* @__PURE__ */
|
|
1050
|
+
var e = t === d ? null : /* @__PURE__ */ A4(t);
|
|
1051
1051
|
t.remove(), t = e;
|
|
1052
1052
|
}
|
|
1053
1053
|
}
|
|
1054
|
-
function
|
|
1054
|
+
function Xd(t) {
|
|
1055
1055
|
var d = t.parent, e = t.prev, i = t.next;
|
|
1056
1056
|
e !== null && (e.next = i), i !== null && (i.prev = e), d !== null && (d.first === t && (d.first = i), d.last === t && (d.last = e));
|
|
1057
1057
|
}
|
|
1058
|
-
let
|
|
1059
|
-
function
|
|
1060
|
-
|
|
1058
|
+
let B1 = !1;
|
|
1059
|
+
function F0(t) {
|
|
1060
|
+
B1 = t;
|
|
1061
1061
|
}
|
|
1062
|
-
let
|
|
1062
|
+
let K1 = !1;
|
|
1063
1063
|
function fd(t) {
|
|
1064
|
-
|
|
1064
|
+
K1 = t;
|
|
1065
1065
|
}
|
|
1066
1066
|
let P = null, g1 = !1;
|
|
1067
1067
|
function m1(t) {
|
|
1068
1068
|
P = t;
|
|
1069
1069
|
}
|
|
1070
|
-
let
|
|
1070
|
+
let U = null;
|
|
1071
1071
|
function L1(t) {
|
|
1072
|
-
|
|
1072
|
+
U = t;
|
|
1073
1073
|
}
|
|
1074
1074
|
let n1 = null;
|
|
1075
|
-
function
|
|
1075
|
+
function x4(t) {
|
|
1076
1076
|
P !== null && (n1 === null ? n1 = [t] : n1.push(t));
|
|
1077
1077
|
}
|
|
1078
1078
|
let t1 = null, s1 = 0, l1 = null;
|
|
1079
|
-
function
|
|
1079
|
+
function U4(t) {
|
|
1080
1080
|
l1 = t;
|
|
1081
1081
|
}
|
|
1082
|
-
let qd = 1, g0 = 0,
|
|
1082
|
+
let qd = 1, g0 = 0, F1 = g0;
|
|
1083
1083
|
function cd(t) {
|
|
1084
|
-
|
|
1084
|
+
F1 = t;
|
|
1085
1085
|
}
|
|
1086
1086
|
function Jd() {
|
|
1087
1087
|
return ++qd;
|
|
@@ -1090,7 +1090,7 @@ function m0(t) {
|
|
|
1090
1090
|
var d = t.f;
|
|
1091
1091
|
if ((d & o1) !== 0)
|
|
1092
1092
|
return !0;
|
|
1093
|
-
if (d &
|
|
1093
|
+
if (d & z && (t.f &= ~H1), (d & C1) !== 0) {
|
|
1094
1094
|
var e = t.deps;
|
|
1095
1095
|
if (e !== null)
|
|
1096
1096
|
for (var i = e.length, s = 0; s < i; s++) {
|
|
@@ -1098,7 +1098,7 @@ function m0(t) {
|
|
|
1098
1098
|
if (m0(
|
|
1099
1099
|
/** @type {Derived} */
|
|
1100
1100
|
$
|
|
1101
|
-
) &&
|
|
1101
|
+
) && Hd(
|
|
1102
1102
|
/** @type {Derived} */
|
|
1103
1103
|
$
|
|
1104
1104
|
), $.wv > t.wv)
|
|
@@ -1110,12 +1110,12 @@ function m0(t) {
|
|
|
1110
1110
|
}
|
|
1111
1111
|
return !1;
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1113
|
+
function Qd(t, d, e = !0) {
|
|
1114
1114
|
var i = t.reactions;
|
|
1115
1115
|
if (i !== null && !(n1 != null && n1.includes(t)))
|
|
1116
1116
|
for (var s = 0; s < i.length; s++) {
|
|
1117
1117
|
var $ = i[s];
|
|
1118
|
-
($.f &
|
|
1118
|
+
($.f & z) !== 0 ? Qd(
|
|
1119
1119
|
/** @type {Derived} */
|
|
1120
1120
|
$,
|
|
1121
1121
|
d,
|
|
@@ -1126,94 +1126,94 @@ function Xd(t, d, e = !0) {
|
|
|
1126
1126
|
));
|
|
1127
1127
|
}
|
|
1128
1128
|
}
|
|
1129
|
-
function
|
|
1130
|
-
var
|
|
1131
|
-
var d = t1, e = s1, i = l1, s = P, $ = n1, o = _1, l = g1, f =
|
|
1129
|
+
function d3(t) {
|
|
1130
|
+
var N;
|
|
1131
|
+
var d = t1, e = s1, i = l1, s = P, $ = n1, o = _1, l = g1, f = F1, a = t.f;
|
|
1132
1132
|
t1 = /** @type {null | Value[]} */
|
|
1133
|
-
null, s1 = 0, l1 = null, P = (a & (
|
|
1134
|
-
t.ac.abort(
|
|
1133
|
+
null, s1 = 0, l1 = null, P = (a & (k1 | r0)) === 0 ? t : null, n1 = null, R0(t.ctx), g1 = !1, F1 = ++g0, t.ac !== null && (E2(() => {
|
|
1134
|
+
t.ac.abort(z1);
|
|
1135
1135
|
}), t.ac = null);
|
|
1136
1136
|
try {
|
|
1137
1137
|
t.f |= $2;
|
|
1138
1138
|
var C = (
|
|
1139
1139
|
/** @type {Function} */
|
|
1140
1140
|
t.fn
|
|
1141
|
-
), _ = C(),
|
|
1141
|
+
), _ = C(), m = t.deps;
|
|
1142
1142
|
if (t1 !== null) {
|
|
1143
1143
|
var v;
|
|
1144
|
-
if (
|
|
1145
|
-
for (
|
|
1146
|
-
|
|
1144
|
+
if (H0(t, s1), m !== null && s1 > 0)
|
|
1145
|
+
for (m.length = s1 + t1.length, v = 0; v < t1.length; v++)
|
|
1146
|
+
m[s1 + v] = t1[v];
|
|
1147
1147
|
else
|
|
1148
|
-
t.deps =
|
|
1149
|
-
if (
|
|
1150
|
-
for (v = s1; v <
|
|
1151
|
-
((
|
|
1152
|
-
} else
|
|
1153
|
-
if (Rd() && l1 !== null && !g1 &&
|
|
1148
|
+
t.deps = m = t1;
|
|
1149
|
+
if (B0() && (t.f & h1) !== 0)
|
|
1150
|
+
for (v = s1; v < m.length; v++)
|
|
1151
|
+
((N = m[v]).reactions ?? (N.reactions = [])).push(t);
|
|
1152
|
+
} else m !== null && s1 < m.length && (H0(t, s1), m.length = s1);
|
|
1153
|
+
if (Rd() && l1 !== null && !g1 && m !== null && (t.f & (z | C1 | o1)) === 0)
|
|
1154
1154
|
for (v = 0; v < /** @type {Source[]} */
|
|
1155
1155
|
l1.length; v++)
|
|
1156
|
-
|
|
1156
|
+
Qd(
|
|
1157
1157
|
l1[v],
|
|
1158
1158
|
/** @type {Effect} */
|
|
1159
1159
|
t
|
|
1160
1160
|
);
|
|
1161
1161
|
return s !== null && s !== t && (g0++, l1 !== null && (i === null ? i = l1 : i.push(.../** @type {Source[]} */
|
|
1162
|
-
l1))), (t.f &
|
|
1162
|
+
l1))), (t.f & T1) !== 0 && (t.f ^= T1), _;
|
|
1163
1163
|
} catch (D) {
|
|
1164
1164
|
return c4(D);
|
|
1165
1165
|
} finally {
|
|
1166
|
-
t.f ^= $2, t1 = d, s1 = e, l1 = i, P = s, n1 = $,
|
|
1166
|
+
t.f ^= $2, t1 = d, s1 = e, l1 = i, P = s, n1 = $, R0(o), g1 = l, F1 = f;
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
|
-
function
|
|
1169
|
+
function B4(t, d) {
|
|
1170
1170
|
let e = d.reactions;
|
|
1171
1171
|
if (e !== null) {
|
|
1172
|
-
var i =
|
|
1172
|
+
var i = V3.call(e, t);
|
|
1173
1173
|
if (i !== -1) {
|
|
1174
1174
|
var s = e.length - 1;
|
|
1175
1175
|
s === 0 ? e = d.reactions = null : (e[i] = e[s], e.pop());
|
|
1176
1176
|
}
|
|
1177
1177
|
}
|
|
1178
|
-
e === null && (d.f &
|
|
1178
|
+
e === null && (d.f & z) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1179
1179
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1180
1180
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1181
|
-
(t1 === null || !t1.includes(d)) && (i1(d, C1), (d.f & h1) !== 0 && (d.f ^= h1, d.f &= ~
|
|
1181
|
+
(t1 === null || !t1.includes(d)) && (i1(d, C1), (d.f & h1) !== 0 && (d.f ^= h1, d.f &= ~H1), Fd(
|
|
1182
1182
|
/** @type {Derived} **/
|
|
1183
1183
|
d
|
|
1184
|
-
),
|
|
1184
|
+
), H0(
|
|
1185
1185
|
/** @type {Derived} **/
|
|
1186
1186
|
d,
|
|
1187
1187
|
0
|
|
1188
1188
|
));
|
|
1189
1189
|
}
|
|
1190
|
-
function
|
|
1190
|
+
function H0(t, d) {
|
|
1191
1191
|
var e = t.deps;
|
|
1192
1192
|
if (e !== null)
|
|
1193
1193
|
for (var i = d; i < e.length; i++)
|
|
1194
|
-
|
|
1194
|
+
B4(t, e[i]);
|
|
1195
1195
|
}
|
|
1196
1196
|
function C0(t) {
|
|
1197
1197
|
var d = t.f;
|
|
1198
|
-
if ((d &
|
|
1198
|
+
if ((d & I1) === 0) {
|
|
1199
1199
|
i1(t, e1);
|
|
1200
|
-
var e =
|
|
1201
|
-
|
|
1200
|
+
var e = U, i = B1;
|
|
1201
|
+
U = t, B1 = !0;
|
|
1202
1202
|
try {
|
|
1203
|
-
(d & (V1 |
|
|
1204
|
-
var s =
|
|
1203
|
+
(d & (V1 | Dd)) !== 0 ? R4(t) : zd(t), Zd(t);
|
|
1204
|
+
var s = d3(t);
|
|
1205
1205
|
t.teardown = typeof s == "function" ? s : null, t.wv = qd;
|
|
1206
1206
|
var $;
|
|
1207
1207
|
s2 && u4 && (t.f & o1) !== 0 && t.deps;
|
|
1208
1208
|
} finally {
|
|
1209
|
-
|
|
1209
|
+
B1 = i, U = e;
|
|
1210
1210
|
}
|
|
1211
1211
|
}
|
|
1212
1212
|
}
|
|
1213
|
-
function
|
|
1214
|
-
var d = t.f, e = (d &
|
|
1213
|
+
function O(t) {
|
|
1214
|
+
var d = t.f, e = (d & z) !== 0;
|
|
1215
1215
|
if (P !== null && !g1) {
|
|
1216
|
-
var i =
|
|
1216
|
+
var i = U !== null && (U.f & I1) !== 0;
|
|
1217
1217
|
if (!i && !(n1 != null && n1.includes(t))) {
|
|
1218
1218
|
var s = P.deps;
|
|
1219
1219
|
if ((P.f & $2) !== 0)
|
|
@@ -1225,46 +1225,46 @@ function R(t) {
|
|
|
1225
1225
|
}
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
|
-
if (
|
|
1229
|
-
if (
|
|
1230
|
-
return
|
|
1228
|
+
if (K1) {
|
|
1229
|
+
if (b1.has(t))
|
|
1230
|
+
return b1.get(t);
|
|
1231
1231
|
if (e) {
|
|
1232
1232
|
var o = (
|
|
1233
1233
|
/** @type {Derived} */
|
|
1234
1234
|
t
|
|
1235
1235
|
), l = o.v;
|
|
1236
|
-
return ((o.f & e1) === 0 && o.reactions !== null ||
|
|
1236
|
+
return ((o.f & e1) === 0 && o.reactions !== null || e3(o)) && (l = v2(o)), b1.set(o, l), l;
|
|
1237
1237
|
}
|
|
1238
|
-
} else e && (!(K != null && K.has(t)) ||
|
|
1239
|
-
t, m0(o) &&
|
|
1238
|
+
} else e && (!(K != null && K.has(t)) || x != null && x.is_fork && !B0()) && (o = /** @type {Derived} */
|
|
1239
|
+
t, m0(o) && Hd(o), B1 && B0() && (o.f & h1) === 0 && t3(o));
|
|
1240
1240
|
if (K != null && K.has(t))
|
|
1241
1241
|
return K.get(t);
|
|
1242
|
-
if ((t.f &
|
|
1242
|
+
if ((t.f & T1) !== 0)
|
|
1243
1243
|
throw t.v;
|
|
1244
1244
|
return t.v;
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1246
|
+
function t3(t) {
|
|
1247
1247
|
if (t.deps !== null) {
|
|
1248
1248
|
t.f ^= h1;
|
|
1249
1249
|
for (const d of t.deps)
|
|
1250
|
-
(d.reactions ?? (d.reactions = [])).push(t), (d.f &
|
|
1250
|
+
(d.reactions ?? (d.reactions = [])).push(t), (d.f & z) !== 0 && (d.f & h1) === 0 && t3(
|
|
1251
1251
|
/** @type {Derived} */
|
|
1252
1252
|
d
|
|
1253
1253
|
);
|
|
1254
1254
|
}
|
|
1255
1255
|
}
|
|
1256
|
-
function
|
|
1256
|
+
function e3(t) {
|
|
1257
1257
|
if (t.v === Y) return !0;
|
|
1258
1258
|
if (t.deps === null) return !1;
|
|
1259
1259
|
for (const d of t.deps)
|
|
1260
|
-
if (
|
|
1260
|
+
if (b1.has(d) || (d.f & z) !== 0 && e3(
|
|
1261
1261
|
/** @type {Derived} */
|
|
1262
1262
|
d
|
|
1263
1263
|
))
|
|
1264
1264
|
return !0;
|
|
1265
1265
|
return !1;
|
|
1266
1266
|
}
|
|
1267
|
-
function
|
|
1267
|
+
function n3(t) {
|
|
1268
1268
|
var d = g1;
|
|
1269
1269
|
try {
|
|
1270
1270
|
return g1 = !0, t();
|
|
@@ -1272,24 +1272,24 @@ function e3(t) {
|
|
|
1272
1272
|
g1 = d;
|
|
1273
1273
|
}
|
|
1274
1274
|
}
|
|
1275
|
-
const
|
|
1275
|
+
const F4 = -7169;
|
|
1276
1276
|
function i1(t, d) {
|
|
1277
|
-
t.f = t.f &
|
|
1277
|
+
t.f = t.f & F4 | d;
|
|
1278
1278
|
}
|
|
1279
|
-
const
|
|
1280
|
-
function
|
|
1279
|
+
const H4 = /* @__PURE__ */ new Set(), G4 = /* @__PURE__ */ new Set();
|
|
1280
|
+
function V4(t, d, e, i = {}) {
|
|
1281
1281
|
function s($) {
|
|
1282
1282
|
if (i.capture || W4.call(d, $), !$.cancelBubble)
|
|
1283
|
-
return
|
|
1283
|
+
return E2(() => e == null ? void 0 : e.call(this, $));
|
|
1284
1284
|
}
|
|
1285
|
-
return t.startsWith("pointer") || t.startsWith("touch") || t === "wheel" ?
|
|
1285
|
+
return t.startsWith("pointer") || t.startsWith("touch") || t === "wheel" ? k0(() => {
|
|
1286
1286
|
d.addEventListener(t, s, i);
|
|
1287
1287
|
}) : d.addEventListener(t, s, i), s;
|
|
1288
1288
|
}
|
|
1289
|
-
function
|
|
1289
|
+
function k4(t) {
|
|
1290
1290
|
for (var d = 0; d < t.length; d++)
|
|
1291
|
-
|
|
1292
|
-
for (var e of
|
|
1291
|
+
H4.add(t[d]);
|
|
1292
|
+
for (var e of G4)
|
|
1293
1293
|
e(t);
|
|
1294
1294
|
}
|
|
1295
1295
|
let hd = null;
|
|
@@ -1318,17 +1318,17 @@ function W4(t) {
|
|
|
1318
1318
|
}
|
|
1319
1319
|
if ($ = /** @type {Element} */
|
|
1320
1320
|
s[o] || t.target, $ !== d) {
|
|
1321
|
-
|
|
1321
|
+
k3(t, "currentTarget", {
|
|
1322
1322
|
configurable: !0,
|
|
1323
1323
|
get() {
|
|
1324
1324
|
return $ || e;
|
|
1325
1325
|
}
|
|
1326
1326
|
});
|
|
1327
|
-
var C = P, _ =
|
|
1327
|
+
var C = P, _ = U;
|
|
1328
1328
|
m1(null), L1(null);
|
|
1329
1329
|
try {
|
|
1330
|
-
for (var
|
|
1331
|
-
var
|
|
1330
|
+
for (var m, v = []; $ !== null; ) {
|
|
1331
|
+
var N = $.assignedSlot || $.parentNode || /** @type {any} */
|
|
1332
1332
|
$.host || null;
|
|
1333
1333
|
try {
|
|
1334
1334
|
var D = $["__" + i];
|
|
@@ -1336,19 +1336,19 @@ function W4(t) {
|
|
|
1336
1336
|
$.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1337
1337
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1338
1338
|
t.target === $) && D.call($, t);
|
|
1339
|
-
} catch (
|
|
1340
|
-
|
|
1339
|
+
} catch (S) {
|
|
1340
|
+
m ? v.push(S) : m = S;
|
|
1341
1341
|
}
|
|
1342
|
-
if (t.cancelBubble ||
|
|
1342
|
+
if (t.cancelBubble || N === d || N === null)
|
|
1343
1343
|
break;
|
|
1344
|
-
$ =
|
|
1344
|
+
$ = N;
|
|
1345
1345
|
}
|
|
1346
|
-
if (
|
|
1347
|
-
for (let
|
|
1346
|
+
if (m) {
|
|
1347
|
+
for (let S of v)
|
|
1348
1348
|
queueMicrotask(() => {
|
|
1349
|
-
throw
|
|
1349
|
+
throw S;
|
|
1350
1350
|
});
|
|
1351
|
-
throw
|
|
1351
|
+
throw m;
|
|
1352
1352
|
}
|
|
1353
1353
|
} finally {
|
|
1354
1354
|
t.__root = d, delete t.currentTarget, m1(C), L1(_);
|
|
@@ -1362,33 +1362,33 @@ function K4(t) {
|
|
|
1362
1362
|
function j4(t, d) {
|
|
1363
1363
|
var e = (
|
|
1364
1364
|
/** @type {Effect} */
|
|
1365
|
-
|
|
1365
|
+
U
|
|
1366
1366
|
);
|
|
1367
1367
|
e.nodes === null && (e.nodes = { start: t, end: d, a: null, t: null });
|
|
1368
1368
|
}
|
|
1369
1369
|
// @__NO_SIDE_EFFECTS__
|
|
1370
1370
|
function Y4(t, d) {
|
|
1371
|
-
var e = (d &
|
|
1371
|
+
var e = (d & F3) !== 0, i, s = !t.startsWith("<!>");
|
|
1372
1372
|
return () => {
|
|
1373
1373
|
i === void 0 && (i = K4(s ? t : "<!>" + t), i = /** @type {TemplateNode} */
|
|
1374
|
-
/* @__PURE__ */
|
|
1374
|
+
/* @__PURE__ */ S4(i));
|
|
1375
1375
|
var $ = (
|
|
1376
1376
|
/** @type {TemplateNode} */
|
|
1377
|
-
e ||
|
|
1377
|
+
e || I4 ? document.importNode(i, !0) : i.cloneNode(!0)
|
|
1378
1378
|
);
|
|
1379
1379
|
return j4($, $), $;
|
|
1380
1380
|
};
|
|
1381
1381
|
}
|
|
1382
|
-
function
|
|
1382
|
+
function Z4(t, d) {
|
|
1383
1383
|
t !== null && t.before(
|
|
1384
1384
|
/** @type {Node} */
|
|
1385
1385
|
d
|
|
1386
1386
|
);
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1388
|
+
function z4(t) {
|
|
1389
1389
|
return t.endsWith("capture") && t !== "gotpointercapture" && t !== "lostpointercapture";
|
|
1390
1390
|
}
|
|
1391
|
-
const
|
|
1391
|
+
const X4 = [
|
|
1392
1392
|
"beforeinput",
|
|
1393
1393
|
"click",
|
|
1394
1394
|
"change",
|
|
@@ -1413,10 +1413,10 @@ const q4 = [
|
|
|
1413
1413
|
"touchmove",
|
|
1414
1414
|
"touchstart"
|
|
1415
1415
|
];
|
|
1416
|
-
function
|
|
1417
|
-
return
|
|
1416
|
+
function q4(t) {
|
|
1417
|
+
return X4.includes(t);
|
|
1418
1418
|
}
|
|
1419
|
-
const
|
|
1419
|
+
const J4 = {
|
|
1420
1420
|
// no `class: 'className'` because we handle that separately
|
|
1421
1421
|
formnovalidate: "formNoValidate",
|
|
1422
1422
|
ismap: "isMap",
|
|
@@ -1432,30 +1432,30 @@ const X4 = {
|
|
|
1432
1432
|
disableremoteplayback: "disableRemotePlayback"
|
|
1433
1433
|
};
|
|
1434
1434
|
function Q4(t) {
|
|
1435
|
-
return t = t.toLowerCase(),
|
|
1435
|
+
return t = t.toLowerCase(), J4[t] ?? t;
|
|
1436
1436
|
}
|
|
1437
1437
|
function d9(t, d) {
|
|
1438
1438
|
var e = void 0, i;
|
|
1439
|
-
|
|
1440
|
-
e !== (e = d()) && (i && (
|
|
1441
|
-
|
|
1439
|
+
jd(() => {
|
|
1440
|
+
e !== (e = d()) && (i && (G1(i), i = null), e && (i = Yd(() => {
|
|
1441
|
+
I2(() => (
|
|
1442
1442
|
/** @type {(node: Element) => void} */
|
|
1443
1443
|
e(t)
|
|
1444
1444
|
));
|
|
1445
1445
|
})));
|
|
1446
1446
|
});
|
|
1447
1447
|
}
|
|
1448
|
-
function
|
|
1448
|
+
function i3(t) {
|
|
1449
1449
|
var d, e, i = "";
|
|
1450
1450
|
if (typeof t == "string" || typeof t == "number") i += t;
|
|
1451
1451
|
else if (typeof t == "object") if (Array.isArray(t)) {
|
|
1452
1452
|
var s = t.length;
|
|
1453
|
-
for (d = 0; d < s; d++) t[d] && (e =
|
|
1453
|
+
for (d = 0; d < s; d++) t[d] && (e = i3(t[d])) && (i && (i += " "), i += e);
|
|
1454
1454
|
} else for (e in t) t[e] && (i && (i += " "), i += e);
|
|
1455
1455
|
return i;
|
|
1456
1456
|
}
|
|
1457
1457
|
function t9() {
|
|
1458
|
-
for (var t, d, e = 0, i = "", s = arguments.length; e < s; e++) (t = arguments[e]) && (d =
|
|
1458
|
+
for (var t, d, e = 0, i = "", s = arguments.length; e < s; e++) (t = arguments[e]) && (d = i3(t)) && (i && (i += " "), i += d);
|
|
1459
1459
|
return i;
|
|
1460
1460
|
}
|
|
1461
1461
|
function e9(t) {
|
|
@@ -1485,7 +1485,7 @@ function gd(t, d = !1) {
|
|
|
1485
1485
|
}
|
|
1486
1486
|
return i;
|
|
1487
1487
|
}
|
|
1488
|
-
function
|
|
1488
|
+
function J0(t) {
|
|
1489
1489
|
return t[0] !== "-" || t[1] !== "-" ? t.toLowerCase() : t;
|
|
1490
1490
|
}
|
|
1491
1491
|
function i9(t, d) {
|
|
@@ -1494,21 +1494,21 @@ function i9(t, d) {
|
|
|
1494
1494
|
if (Array.isArray(d) ? (i = d[0], s = d[1]) : i = d, t) {
|
|
1495
1495
|
t = String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
|
|
1496
1496
|
var $ = !1, o = 0, l = !1, f = [];
|
|
1497
|
-
i && f.push(...Object.keys(i).map(
|
|
1497
|
+
i && f.push(...Object.keys(i).map(J0)), s && f.push(...Object.keys(s).map(J0));
|
|
1498
1498
|
var a = 0, C = -1;
|
|
1499
1499
|
const D = t.length;
|
|
1500
1500
|
for (var _ = 0; _ < D; _++) {
|
|
1501
|
-
var
|
|
1502
|
-
if (l ?
|
|
1503
|
-
if (
|
|
1501
|
+
var m = t[_];
|
|
1502
|
+
if (l ? m === "/" && t[_ - 1] === "*" && (l = !1) : $ ? $ === m && ($ = !1) : m === "/" && t[_ + 1] === "*" ? l = !0 : m === '"' || m === "'" ? $ = m : m === "(" ? o++ : m === ")" && o--, !l && $ === !1 && o === 0) {
|
|
1503
|
+
if (m === ":" && C === -1)
|
|
1504
1504
|
C = _;
|
|
1505
|
-
else if (
|
|
1505
|
+
else if (m === ";" || _ === D - 1) {
|
|
1506
1506
|
if (C !== -1) {
|
|
1507
|
-
var v =
|
|
1507
|
+
var v = J0(t.substring(a, C).trim());
|
|
1508
1508
|
if (!f.includes(v)) {
|
|
1509
|
-
|
|
1510
|
-
var
|
|
1511
|
-
e += " " +
|
|
1509
|
+
m !== ";" && _++;
|
|
1510
|
+
var N = t.substring(a, _).trim();
|
|
1511
|
+
e += " " + N + ";";
|
|
1512
1512
|
}
|
|
1513
1513
|
}
|
|
1514
1514
|
a = _ + 1, C = -1;
|
|
@@ -1550,7 +1550,7 @@ function c2(t, d, e = !1) {
|
|
|
1550
1550
|
if (t.multiple) {
|
|
1551
1551
|
if (d == null)
|
|
1552
1552
|
return;
|
|
1553
|
-
if (!
|
|
1553
|
+
if (!Ad(d))
|
|
1554
1554
|
return s4();
|
|
1555
1555
|
for (var i of t.options)
|
|
1556
1556
|
i.selected = d.includes(Cd(i));
|
|
@@ -1558,7 +1558,7 @@ function c2(t, d, e = !1) {
|
|
|
1558
1558
|
}
|
|
1559
1559
|
for (i of t.options) {
|
|
1560
1560
|
var s = Cd(i);
|
|
1561
|
-
if (
|
|
1561
|
+
if (E4(s, d)) {
|
|
1562
1562
|
i.selected = !0;
|
|
1563
1563
|
return;
|
|
1564
1564
|
}
|
|
@@ -1579,102 +1579,102 @@ function $9(t) {
|
|
|
1579
1579
|
// because that property is not reflected as an attribute)
|
|
1580
1580
|
attributes: !0,
|
|
1581
1581
|
attributeFilter: ["value"]
|
|
1582
|
-
}),
|
|
1582
|
+
}), Wd(() => {
|
|
1583
1583
|
d.disconnect();
|
|
1584
1584
|
});
|
|
1585
1585
|
}
|
|
1586
1586
|
function Cd(t) {
|
|
1587
1587
|
return "__value" in t ? t.__value : t.value;
|
|
1588
1588
|
}
|
|
1589
|
-
const f0 = Symbol("class"), c0 = Symbol("style"),
|
|
1589
|
+
const f0 = Symbol("class"), c0 = Symbol("style"), r3 = Symbol("is custom element"), s3 = Symbol("is html");
|
|
1590
1590
|
function o9(t, d) {
|
|
1591
1591
|
d ? t.hasAttribute("selected") || t.setAttribute("selected", "") : t.removeAttribute("selected");
|
|
1592
1592
|
}
|
|
1593
1593
|
function _d(t, d, e, i) {
|
|
1594
|
-
var s =
|
|
1595
|
-
s[d] !== (s[d] = e) && (d === "loading" && (t[
|
|
1594
|
+
var s = $3(t);
|
|
1595
|
+
s[d] !== (s[d] = e) && (d === "loading" && (t[X3] = e), e == null ? t.removeAttribute(d) : typeof e != "string" && o3(t).includes(d) ? t[d] = e : t.setAttribute(d, e));
|
|
1596
1596
|
}
|
|
1597
1597
|
function u9(t, d, e, i, s = !1, $ = !1) {
|
|
1598
|
-
var o =
|
|
1598
|
+
var o = $3(t), l = o[r3], f = !o[s3], a = d || {}, C = t.tagName === "OPTION";
|
|
1599
1599
|
for (var _ in d)
|
|
1600
1600
|
_ in e || (e[_] = null);
|
|
1601
1601
|
e.class ? e.class = e9(e.class) : e[f0] && (e.class = null), e[c0] && (e.style ?? (e.style = null));
|
|
1602
|
-
var
|
|
1603
|
-
for (const
|
|
1604
|
-
let
|
|
1605
|
-
if (C &&
|
|
1606
|
-
t.value = t.__value = "", a[
|
|
1602
|
+
var m = o3(t);
|
|
1603
|
+
for (const E in e) {
|
|
1604
|
+
let T = e[E];
|
|
1605
|
+
if (C && E === "value" && T == null) {
|
|
1606
|
+
t.value = t.__value = "", a[E] = T;
|
|
1607
1607
|
continue;
|
|
1608
1608
|
}
|
|
1609
|
-
if (
|
|
1609
|
+
if (E === "class") {
|
|
1610
1610
|
var v = t.namespaceURI === "http://www.w3.org/1999/xhtml";
|
|
1611
|
-
r9(t, v,
|
|
1611
|
+
r9(t, v, T, i, d == null ? void 0 : d[f0], e[f0]), a[E] = T, a[f0] = e[f0];
|
|
1612
1612
|
continue;
|
|
1613
1613
|
}
|
|
1614
|
-
if (
|
|
1615
|
-
s9(t,
|
|
1614
|
+
if (E === "style") {
|
|
1615
|
+
s9(t, T, d == null ? void 0 : d[c0], e[c0]), a[E] = T, a[c0] = e[c0];
|
|
1616
1616
|
continue;
|
|
1617
1617
|
}
|
|
1618
|
-
var
|
|
1619
|
-
if (!(
|
|
1620
|
-
a[
|
|
1621
|
-
var D =
|
|
1618
|
+
var N = a[E];
|
|
1619
|
+
if (!(T === N && !(T === void 0 && t.hasAttribute(E)))) {
|
|
1620
|
+
a[E] = T;
|
|
1621
|
+
var D = E[0] + E[1];
|
|
1622
1622
|
if (D !== "$$")
|
|
1623
1623
|
if (D === "on") {
|
|
1624
|
-
const
|
|
1625
|
-
let W =
|
|
1626
|
-
var L =
|
|
1627
|
-
if (
|
|
1628
|
-
if (
|
|
1629
|
-
t.removeEventListener(W, a[
|
|
1624
|
+
const G = {}, V = "$$" + E;
|
|
1625
|
+
let W = E.slice(2);
|
|
1626
|
+
var L = q4(W);
|
|
1627
|
+
if (z4(W) && (W = W.slice(0, -7), G.capture = !0), !L && N) {
|
|
1628
|
+
if (T != null) continue;
|
|
1629
|
+
t.removeEventListener(W, a[V], G), a[V] = null;
|
|
1630
1630
|
}
|
|
1631
|
-
if (
|
|
1631
|
+
if (T != null)
|
|
1632
1632
|
if (L)
|
|
1633
|
-
t[`__${W}`] =
|
|
1633
|
+
t[`__${W}`] = T, k4([W]);
|
|
1634
1634
|
else {
|
|
1635
|
-
let
|
|
1636
|
-
a[
|
|
1635
|
+
let X = function(j1) {
|
|
1636
|
+
a[E].call(this, j1);
|
|
1637
1637
|
};
|
|
1638
|
-
a[
|
|
1638
|
+
a[V] = V4(W, t, X, G);
|
|
1639
1639
|
}
|
|
1640
1640
|
else L && (t[`__${W}`] = void 0);
|
|
1641
|
-
} else if (
|
|
1642
|
-
_d(t,
|
|
1643
|
-
else if (
|
|
1644
|
-
|
|
1641
|
+
} else if (E === "style")
|
|
1642
|
+
_d(t, E, T);
|
|
1643
|
+
else if (E === "autofocus")
|
|
1644
|
+
T4(
|
|
1645
1645
|
/** @type {HTMLElement} */
|
|
1646
1646
|
t,
|
|
1647
|
-
!!
|
|
1647
|
+
!!T
|
|
1648
1648
|
);
|
|
1649
|
-
else if (!l && (
|
|
1650
|
-
t.value = t.__value =
|
|
1651
|
-
else if (
|
|
1649
|
+
else if (!l && (E === "__value" || E === "value" && T != null))
|
|
1650
|
+
t.value = t.__value = T;
|
|
1651
|
+
else if (E === "selected" && C)
|
|
1652
1652
|
o9(
|
|
1653
1653
|
/** @type {HTMLOptionElement} */
|
|
1654
1654
|
t,
|
|
1655
|
-
|
|
1655
|
+
T
|
|
1656
1656
|
);
|
|
1657
1657
|
else {
|
|
1658
|
-
var
|
|
1659
|
-
f || (
|
|
1660
|
-
var
|
|
1661
|
-
if (
|
|
1662
|
-
if (o[
|
|
1663
|
-
let
|
|
1658
|
+
var S = E;
|
|
1659
|
+
f || (S = Q4(S));
|
|
1660
|
+
var A = S === "defaultValue" || S === "defaultChecked";
|
|
1661
|
+
if (T == null && !l && !A)
|
|
1662
|
+
if (o[E] = null, S === "value" || S === "checked") {
|
|
1663
|
+
let G = (
|
|
1664
1664
|
/** @type {HTMLInputElement} */
|
|
1665
1665
|
t
|
|
1666
1666
|
);
|
|
1667
|
-
const
|
|
1668
|
-
if (
|
|
1669
|
-
let W =
|
|
1670
|
-
|
|
1667
|
+
const V = d === void 0;
|
|
1668
|
+
if (S === "value") {
|
|
1669
|
+
let W = G.defaultValue;
|
|
1670
|
+
G.removeAttribute(S), G.defaultValue = W, G.value = G.__value = V ? W : null;
|
|
1671
1671
|
} else {
|
|
1672
|
-
let W =
|
|
1673
|
-
|
|
1672
|
+
let W = G.defaultChecked;
|
|
1673
|
+
G.removeAttribute(S), G.defaultChecked = W, G.checked = V ? W : !1;
|
|
1674
1674
|
}
|
|
1675
1675
|
} else
|
|
1676
|
-
t.removeAttribute(
|
|
1677
|
-
else
|
|
1676
|
+
t.removeAttribute(E);
|
|
1677
|
+
else A || m.includes(S) && (l || typeof T != "string") ? (t[S] = T, S in o && (o[S] = Y)) : typeof T != "function" && _d(t, S, T);
|
|
1678
1678
|
}
|
|
1679
1679
|
}
|
|
1680
1680
|
}
|
|
@@ -1682,26 +1682,26 @@ function u9(t, d, e, i, s = !1, $ = !1) {
|
|
|
1682
1682
|
}
|
|
1683
1683
|
function l9(t, d, e = [], i = [], s = [], $, o = !1, l = !1) {
|
|
1684
1684
|
g4(s, e, i, (f) => {
|
|
1685
|
-
var a = void 0, C = {}, _ = t.nodeName === "SELECT",
|
|
1686
|
-
if (
|
|
1687
|
-
var
|
|
1685
|
+
var a = void 0, C = {}, _ = t.nodeName === "SELECT", m = !1;
|
|
1686
|
+
if (jd(() => {
|
|
1687
|
+
var N = d(...f.map(O)), D = u9(
|
|
1688
1688
|
t,
|
|
1689
1689
|
a,
|
|
1690
|
-
|
|
1690
|
+
N,
|
|
1691
1691
|
$,
|
|
1692
1692
|
o,
|
|
1693
1693
|
l
|
|
1694
1694
|
);
|
|
1695
|
-
|
|
1695
|
+
m && _ && "value" in N && c2(
|
|
1696
1696
|
/** @type {HTMLSelectElement} */
|
|
1697
1697
|
t,
|
|
1698
|
-
|
|
1698
|
+
N.value
|
|
1699
1699
|
);
|
|
1700
|
-
for (let
|
|
1701
|
-
S
|
|
1702
|
-
for (let
|
|
1703
|
-
var L = S
|
|
1704
|
-
|
|
1700
|
+
for (let S of Object.getOwnPropertySymbols(C))
|
|
1701
|
+
N[S] || G1(C[S]);
|
|
1702
|
+
for (let S of Object.getOwnPropertySymbols(N)) {
|
|
1703
|
+
var L = N[S];
|
|
1704
|
+
S.description === G3 && (!a || L !== a[S]) && (C[S] && G1(C[S]), C[S] = Yd(() => d9(t, () => L))), D[S] = L;
|
|
1705
1705
|
}
|
|
1706
1706
|
a = D;
|
|
1707
1707
|
}), _) {
|
|
@@ -1709,7 +1709,7 @@ function l9(t, d, e = [], i = [], s = [], $, o = !1, l = !1) {
|
|
|
1709
1709
|
/** @type {HTMLSelectElement} */
|
|
1710
1710
|
t
|
|
1711
1711
|
);
|
|
1712
|
-
|
|
1712
|
+
I2(() => {
|
|
1713
1713
|
c2(
|
|
1714
1714
|
v,
|
|
1715
1715
|
/** @type {Record<string | symbol, any>} */
|
|
@@ -1718,21 +1718,21 @@ function l9(t, d, e = [], i = [], s = [], $, o = !1, l = !1) {
|
|
|
1718
1718
|
), $9(v);
|
|
1719
1719
|
});
|
|
1720
1720
|
}
|
|
1721
|
-
|
|
1721
|
+
m = !0;
|
|
1722
1722
|
});
|
|
1723
1723
|
}
|
|
1724
|
-
function
|
|
1724
|
+
function $3(t) {
|
|
1725
1725
|
return (
|
|
1726
1726
|
/** @type {Record<string | symbol, unknown>} **/
|
|
1727
1727
|
// @ts-expect-error
|
|
1728
1728
|
t.__attributes ?? (t.__attributes = {
|
|
1729
|
-
[
|
|
1730
|
-
[
|
|
1729
|
+
[r3]: t.nodeName.includes("-"),
|
|
1730
|
+
[s3]: t.namespaceURI === H3
|
|
1731
1731
|
})
|
|
1732
1732
|
);
|
|
1733
1733
|
}
|
|
1734
1734
|
var md = /* @__PURE__ */ new Map();
|
|
1735
|
-
function
|
|
1735
|
+
function o3(t) {
|
|
1736
1736
|
var d = t.getAttribute("is") || t.nodeName, e = md.get(d);
|
|
1737
1737
|
if (e) return e;
|
|
1738
1738
|
md.set(d, e = []);
|
|
@@ -1740,42 +1740,42 @@ function $3(t) {
|
|
|
1740
1740
|
i = W3(s);
|
|
1741
1741
|
for (var o in i)
|
|
1742
1742
|
i[o].set && e.push(o);
|
|
1743
|
-
s =
|
|
1743
|
+
s = Td(s);
|
|
1744
1744
|
}
|
|
1745
1745
|
return e;
|
|
1746
1746
|
}
|
|
1747
1747
|
function yd(t, d) {
|
|
1748
|
-
return t === d || (t == null ? void 0 : t[
|
|
1748
|
+
return t === d || (t == null ? void 0 : t[U1]) === d;
|
|
1749
1749
|
}
|
|
1750
1750
|
function a9(t = {}, d, e, i) {
|
|
1751
|
-
return
|
|
1751
|
+
return I2(() => {
|
|
1752
1752
|
var s, $;
|
|
1753
|
-
return
|
|
1754
|
-
s = $, $ = [],
|
|
1753
|
+
return O4(() => {
|
|
1754
|
+
s = $, $ = [], n3(() => {
|
|
1755
1755
|
t !== e(...$) && (d(t, ...$), s && yd(e(...s), t) && d(null, ...s));
|
|
1756
1756
|
});
|
|
1757
1757
|
}), () => {
|
|
1758
|
-
|
|
1758
|
+
k0(() => {
|
|
1759
1759
|
$ && yd(e(...$), t) && d(null, ...$);
|
|
1760
1760
|
});
|
|
1761
1761
|
};
|
|
1762
1762
|
}), t;
|
|
1763
1763
|
}
|
|
1764
|
-
let
|
|
1764
|
+
let b0 = !1;
|
|
1765
1765
|
function f9(t) {
|
|
1766
|
-
var d =
|
|
1766
|
+
var d = b0;
|
|
1767
1767
|
try {
|
|
1768
|
-
return
|
|
1768
|
+
return b0 = !1, [t(), b0];
|
|
1769
1769
|
} finally {
|
|
1770
|
-
|
|
1770
|
+
b0 = d;
|
|
1771
1771
|
}
|
|
1772
1772
|
}
|
|
1773
1773
|
function L0(t, d, e, i) {
|
|
1774
|
-
var
|
|
1775
|
-
var s = (e &
|
|
1774
|
+
var A;
|
|
1775
|
+
var s = (e & U3) !== 0, $ = (e & B3) !== 0, o = (
|
|
1776
1776
|
/** @type {V} */
|
|
1777
1777
|
i
|
|
1778
|
-
), l = !0, f = () => (l && (l = !1, o = $ ?
|
|
1778
|
+
), l = !0, f = () => (l && (l = !1, o = $ ? n3(
|
|
1779
1779
|
/** @type {() => V} */
|
|
1780
1780
|
i
|
|
1781
1781
|
) : (
|
|
@@ -1783,47 +1783,47 @@ function L0(t, d, e, i) {
|
|
|
1783
1783
|
i
|
|
1784
1784
|
)), o), a;
|
|
1785
1785
|
if (s) {
|
|
1786
|
-
var C =
|
|
1787
|
-
a = ((
|
|
1786
|
+
var C = U1 in t || z3 in t;
|
|
1787
|
+
a = ((A = P0(t, d)) == null ? void 0 : A.set) ?? (C && d in t ? (E) => t[d] = E : void 0);
|
|
1788
1788
|
}
|
|
1789
|
-
var _,
|
|
1790
|
-
s ? [_,
|
|
1789
|
+
var _, m = !1;
|
|
1790
|
+
s ? [_, m] = f9(() => (
|
|
1791
1791
|
/** @type {V} */
|
|
1792
1792
|
t[d]
|
|
1793
1793
|
)) : _ = /** @type {V} */
|
|
1794
1794
|
t[d], _ === void 0 && i !== void 0 && (_ = f(), a && (e4(), a(_)));
|
|
1795
1795
|
var v;
|
|
1796
1796
|
if (v = () => {
|
|
1797
|
-
var
|
|
1797
|
+
var E = (
|
|
1798
1798
|
/** @type {V} */
|
|
1799
1799
|
t[d]
|
|
1800
1800
|
);
|
|
1801
|
-
return
|
|
1802
|
-
}, (e &
|
|
1801
|
+
return E === void 0 ? f() : (l = !0, E);
|
|
1802
|
+
}, (e & x3) === 0)
|
|
1803
1803
|
return v;
|
|
1804
1804
|
if (a) {
|
|
1805
|
-
var
|
|
1805
|
+
var N = t.$$legacy;
|
|
1806
1806
|
return (
|
|
1807
1807
|
/** @type {() => V} */
|
|
1808
|
-
(function(
|
|
1809
|
-
return arguments.length > 0 ? ((!
|
|
1808
|
+
(function(E, T) {
|
|
1809
|
+
return arguments.length > 0 ? ((!T || N || m) && a(T ? v() : E), E) : v();
|
|
1810
1810
|
})
|
|
1811
1811
|
);
|
|
1812
1812
|
}
|
|
1813
|
-
var D = !1, L = ((e &
|
|
1814
|
-
s &&
|
|
1815
|
-
var
|
|
1813
|
+
var D = !1, L = ((e & M3) !== 0 ? y2 : m4)(() => (D = !1, v()));
|
|
1814
|
+
s && O(L);
|
|
1815
|
+
var S = (
|
|
1816
1816
|
/** @type {Effect} */
|
|
1817
|
-
|
|
1817
|
+
U
|
|
1818
1818
|
);
|
|
1819
1819
|
return (
|
|
1820
1820
|
/** @type {() => V} */
|
|
1821
|
-
(function(
|
|
1821
|
+
(function(E, T) {
|
|
1822
1822
|
if (arguments.length > 0) {
|
|
1823
|
-
const
|
|
1824
|
-
return $1(L,
|
|
1823
|
+
const G = T ? O(L) : s ? q1(E) : E;
|
|
1824
|
+
return $1(L, G), D = !0, o !== void 0 && (o = G), E;
|
|
1825
1825
|
}
|
|
1826
|
-
return
|
|
1826
|
+
return K1 && D || (S.f & I1) !== 0 ? L.v : O(L);
|
|
1827
1827
|
})
|
|
1828
1828
|
);
|
|
1829
1829
|
}
|
|
@@ -3504,9 +3504,9 @@ const c9 = [
|
|
|
3504
3504
|
null,
|
|
3505
3505
|
"0"
|
|
3506
3506
|
]
|
|
3507
|
-
],
|
|
3507
|
+
], Q1 = [];
|
|
3508
3508
|
for (const t of c9)
|
|
3509
|
-
|
|
3509
|
+
Q1.push({
|
|
3510
3510
|
name: "",
|
|
3511
3511
|
// populated in the plugin
|
|
3512
3512
|
iso2: t[0],
|
|
@@ -3523,268 +3523,13 @@ for (const t of c9)
|
|
|
3523
3523
|
dialCodePlus: ""
|
|
3524
3524
|
// populated in the plugin
|
|
3525
3525
|
});
|
|
3526
|
-
const
|
|
3527
|
-
ad: "Andorra",
|
|
3528
|
-
ae: "United Arab Emirates",
|
|
3529
|
-
af: "Afghanistan",
|
|
3530
|
-
ag: "Antigua & Barbuda",
|
|
3531
|
-
ai: "Anguilla",
|
|
3532
|
-
al: "Albania",
|
|
3533
|
-
am: "Armenia",
|
|
3534
|
-
ao: "Angola",
|
|
3535
|
-
ar: "Argentina",
|
|
3536
|
-
as: "American Samoa",
|
|
3537
|
-
at: "Austria",
|
|
3538
|
-
au: "Australia",
|
|
3539
|
-
aw: "Aruba",
|
|
3540
|
-
ax: "Åland Islands",
|
|
3541
|
-
az: "Azerbaijan",
|
|
3542
|
-
ba: "Bosnia & Herzegovina",
|
|
3543
|
-
bb: "Barbados",
|
|
3544
|
-
bd: "Bangladesh",
|
|
3545
|
-
be: "Belgium",
|
|
3546
|
-
bf: "Burkina Faso",
|
|
3547
|
-
bg: "Bulgaria",
|
|
3548
|
-
bh: "Bahrain",
|
|
3549
|
-
bi: "Burundi",
|
|
3550
|
-
bj: "Benin",
|
|
3551
|
-
bl: "St. Barthélemy",
|
|
3552
|
-
bm: "Bermuda",
|
|
3553
|
-
bn: "Brunei",
|
|
3554
|
-
bo: "Bolivia",
|
|
3555
|
-
bq: "Caribbean Netherlands",
|
|
3556
|
-
br: "Brazil",
|
|
3557
|
-
bs: "Bahamas",
|
|
3558
|
-
bt: "Bhutan",
|
|
3559
|
-
bw: "Botswana",
|
|
3560
|
-
by: "Belarus",
|
|
3561
|
-
bz: "Belize",
|
|
3562
|
-
ca: "Canada",
|
|
3563
|
-
cc: "Cocos (Keeling) Islands",
|
|
3564
|
-
cd: "Congo - Kinshasa",
|
|
3565
|
-
cf: "Central African Republic",
|
|
3566
|
-
cg: "Congo - Brazzaville",
|
|
3567
|
-
ch: "Switzerland",
|
|
3568
|
-
ci: "Côte d’Ivoire",
|
|
3569
|
-
ck: "Cook Islands",
|
|
3570
|
-
cl: "Chile",
|
|
3571
|
-
cm: "Cameroon",
|
|
3572
|
-
cn: "China",
|
|
3573
|
-
co: "Colombia",
|
|
3574
|
-
cr: "Costa Rica",
|
|
3575
|
-
cu: "Cuba",
|
|
3576
|
-
cv: "Cape Verde",
|
|
3577
|
-
cw: "Curaçao",
|
|
3578
|
-
cx: "Christmas Island",
|
|
3579
|
-
cy: "Cyprus",
|
|
3580
|
-
cz: "Czechia",
|
|
3581
|
-
de: "Germany",
|
|
3582
|
-
dj: "Djibouti",
|
|
3583
|
-
dk: "Denmark",
|
|
3584
|
-
dm: "Dominica",
|
|
3585
|
-
do: "Dominican Republic",
|
|
3586
|
-
dz: "Algeria",
|
|
3587
|
-
ec: "Ecuador",
|
|
3588
|
-
ee: "Estonia",
|
|
3589
|
-
eg: "Egypt",
|
|
3590
|
-
eh: "Western Sahara",
|
|
3591
|
-
er: "Eritrea",
|
|
3592
|
-
es: "Spain",
|
|
3593
|
-
et: "Ethiopia",
|
|
3594
|
-
fi: "Finland",
|
|
3595
|
-
fj: "Fiji",
|
|
3596
|
-
fk: "Falkland Islands",
|
|
3597
|
-
fm: "Micronesia",
|
|
3598
|
-
fo: "Faroe Islands",
|
|
3599
|
-
fr: "France",
|
|
3600
|
-
ga: "Gabon",
|
|
3601
|
-
gb: "United Kingdom",
|
|
3602
|
-
gd: "Grenada",
|
|
3603
|
-
ge: "Georgia",
|
|
3604
|
-
gf: "French Guiana",
|
|
3605
|
-
gg: "Guernsey",
|
|
3606
|
-
gh: "Ghana",
|
|
3607
|
-
gi: "Gibraltar",
|
|
3608
|
-
gl: "Greenland",
|
|
3609
|
-
gm: "Gambia",
|
|
3610
|
-
gn: "Guinea",
|
|
3611
|
-
gp: "Guadeloupe",
|
|
3612
|
-
gq: "Equatorial Guinea",
|
|
3613
|
-
gr: "Greece",
|
|
3614
|
-
gt: "Guatemala",
|
|
3615
|
-
gu: "Guam",
|
|
3616
|
-
gw: "Guinea-Bissau",
|
|
3617
|
-
gy: "Guyana",
|
|
3618
|
-
hk: "Hong Kong SAR China",
|
|
3619
|
-
hn: "Honduras",
|
|
3620
|
-
hr: "Croatia",
|
|
3621
|
-
ht: "Haiti",
|
|
3622
|
-
hu: "Hungary",
|
|
3623
|
-
id: "Indonesia",
|
|
3624
|
-
ie: "Ireland",
|
|
3625
|
-
il: "Israel",
|
|
3626
|
-
im: "Isle of Man",
|
|
3627
|
-
in: "India",
|
|
3628
|
-
io: "British Indian Ocean Territory",
|
|
3629
|
-
iq: "Iraq",
|
|
3630
|
-
ir: "Iran",
|
|
3631
|
-
is: "Iceland",
|
|
3632
|
-
it: "Italy",
|
|
3633
|
-
je: "Jersey",
|
|
3634
|
-
jm: "Jamaica",
|
|
3635
|
-
jo: "Jordan",
|
|
3636
|
-
jp: "Japan",
|
|
3637
|
-
ke: "Kenya",
|
|
3638
|
-
kg: "Kyrgyzstan",
|
|
3639
|
-
kh: "Cambodia",
|
|
3640
|
-
ki: "Kiribati",
|
|
3641
|
-
km: "Comoros",
|
|
3642
|
-
kn: "St. Kitts & Nevis",
|
|
3643
|
-
kp: "North Korea",
|
|
3644
|
-
kr: "South Korea",
|
|
3645
|
-
kw: "Kuwait",
|
|
3646
|
-
ky: "Cayman Islands",
|
|
3647
|
-
kz: "Kazakhstan",
|
|
3648
|
-
la: "Laos",
|
|
3649
|
-
lb: "Lebanon",
|
|
3650
|
-
lc: "St. Lucia",
|
|
3651
|
-
li: "Liechtenstein",
|
|
3652
|
-
lk: "Sri Lanka",
|
|
3653
|
-
lr: "Liberia",
|
|
3654
|
-
ls: "Lesotho",
|
|
3655
|
-
lt: "Lithuania",
|
|
3656
|
-
lu: "Luxembourg",
|
|
3657
|
-
lv: "Latvia",
|
|
3658
|
-
ly: "Libya",
|
|
3659
|
-
ma: "Morocco",
|
|
3660
|
-
mc: "Monaco",
|
|
3661
|
-
md: "Moldova",
|
|
3662
|
-
me: "Montenegro",
|
|
3663
|
-
mf: "St. Martin",
|
|
3664
|
-
mg: "Madagascar",
|
|
3665
|
-
mh: "Marshall Islands",
|
|
3666
|
-
mk: "North Macedonia",
|
|
3667
|
-
ml: "Mali",
|
|
3668
|
-
mm: "Myanmar (Burma)",
|
|
3669
|
-
mn: "Mongolia",
|
|
3670
|
-
mo: "Macao SAR China",
|
|
3671
|
-
mp: "Northern Mariana Islands",
|
|
3672
|
-
mq: "Martinique",
|
|
3673
|
-
mr: "Mauritania",
|
|
3674
|
-
ms: "Montserrat",
|
|
3675
|
-
mt: "Malta",
|
|
3676
|
-
mu: "Mauritius",
|
|
3677
|
-
mv: "Maldives",
|
|
3678
|
-
mw: "Malawi",
|
|
3679
|
-
mx: "Mexico",
|
|
3680
|
-
my: "Malaysia",
|
|
3681
|
-
mz: "Mozambique",
|
|
3682
|
-
na: "Namibia",
|
|
3683
|
-
nc: "New Caledonia",
|
|
3684
|
-
ne: "Niger",
|
|
3685
|
-
nf: "Norfolk Island",
|
|
3686
|
-
ng: "Nigeria",
|
|
3687
|
-
ni: "Nicaragua",
|
|
3688
|
-
nl: "Netherlands",
|
|
3689
|
-
no: "Norway",
|
|
3690
|
-
np: "Nepal",
|
|
3691
|
-
nr: "Nauru",
|
|
3692
|
-
nu: "Niue",
|
|
3693
|
-
nz: "New Zealand",
|
|
3694
|
-
om: "Oman",
|
|
3695
|
-
pa: "Panama",
|
|
3696
|
-
pe: "Peru",
|
|
3697
|
-
pf: "French Polynesia",
|
|
3698
|
-
pg: "Papua New Guinea",
|
|
3699
|
-
ph: "Philippines",
|
|
3700
|
-
pk: "Pakistan",
|
|
3701
|
-
pl: "Poland",
|
|
3702
|
-
pm: "St. Pierre & Miquelon",
|
|
3703
|
-
pr: "Puerto Rico",
|
|
3704
|
-
ps: "Palestinian Territories",
|
|
3705
|
-
pt: "Portugal",
|
|
3706
|
-
pw: "Palau",
|
|
3707
|
-
py: "Paraguay",
|
|
3708
|
-
qa: "Qatar",
|
|
3709
|
-
re: "Réunion",
|
|
3710
|
-
ro: "Romania",
|
|
3711
|
-
rs: "Serbia",
|
|
3712
|
-
ru: "Russia",
|
|
3713
|
-
rw: "Rwanda",
|
|
3714
|
-
sa: "Saudi Arabia",
|
|
3715
|
-
sb: "Solomon Islands",
|
|
3716
|
-
sc: "Seychelles",
|
|
3717
|
-
sd: "Sudan",
|
|
3718
|
-
se: "Sweden",
|
|
3719
|
-
sg: "Singapore",
|
|
3720
|
-
sh: "St. Helena",
|
|
3721
|
-
si: "Slovenia",
|
|
3722
|
-
sj: "Svalbard & Jan Mayen",
|
|
3723
|
-
sk: "Slovakia",
|
|
3724
|
-
sl: "Sierra Leone",
|
|
3725
|
-
sm: "San Marino",
|
|
3726
|
-
sn: "Senegal",
|
|
3727
|
-
so: "Somalia",
|
|
3728
|
-
sr: "Suriname",
|
|
3729
|
-
ss: "South Sudan",
|
|
3730
|
-
st: "São Tomé & Príncipe",
|
|
3731
|
-
sv: "El Salvador",
|
|
3732
|
-
sx: "Sint Maarten",
|
|
3733
|
-
sy: "Syria",
|
|
3734
|
-
sz: "Eswatini",
|
|
3735
|
-
tc: "Turks & Caicos Islands",
|
|
3736
|
-
td: "Chad",
|
|
3737
|
-
tg: "Togo",
|
|
3738
|
-
th: "Thailand",
|
|
3739
|
-
tj: "Tajikistan",
|
|
3740
|
-
tk: "Tokelau",
|
|
3741
|
-
tl: "Timor-Leste",
|
|
3742
|
-
tm: "Turkmenistan",
|
|
3743
|
-
tn: "Tunisia",
|
|
3744
|
-
to: "Tonga",
|
|
3745
|
-
tr: "Turkey",
|
|
3746
|
-
tt: "Trinidad & Tobago",
|
|
3747
|
-
tv: "Tuvalu",
|
|
3748
|
-
tw: "Taiwan",
|
|
3749
|
-
tz: "Tanzania",
|
|
3750
|
-
ua: "Ukraine",
|
|
3751
|
-
ug: "Uganda",
|
|
3752
|
-
us: "United States",
|
|
3753
|
-
uy: "Uruguay",
|
|
3754
|
-
uz: "Uzbekistan",
|
|
3755
|
-
va: "Vatican City",
|
|
3756
|
-
vc: "St. Vincent & Grenadines",
|
|
3757
|
-
ve: "Venezuela",
|
|
3758
|
-
vg: "British Virgin Islands",
|
|
3759
|
-
vi: "U.S. Virgin Islands",
|
|
3760
|
-
vn: "Vietnam",
|
|
3761
|
-
vu: "Vanuatu",
|
|
3762
|
-
wf: "Wallis & Futuna",
|
|
3763
|
-
ws: "Samoa",
|
|
3764
|
-
ye: "Yemen",
|
|
3765
|
-
yt: "Mayotte",
|
|
3766
|
-
za: "South Africa",
|
|
3767
|
-
zm: "Zambia",
|
|
3768
|
-
zw: "Zimbabwe"
|
|
3769
|
-
}, p9 = {
|
|
3770
|
-
selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
|
|
3771
|
-
noCountrySelected: "Select country",
|
|
3772
|
-
countryListAriaLabel: "List of countries",
|
|
3773
|
-
searchPlaceholder: "Search",
|
|
3774
|
-
clearSearchAriaLabel: "Clear search",
|
|
3775
|
-
zeroSearchResults: "No results found",
|
|
3776
|
-
oneSearchResult: "1 result found",
|
|
3777
|
-
multipleSearchResults: "${count} results found",
|
|
3778
|
-
// additional countries (not supported by country-list library)
|
|
3779
|
-
ac: "Ascension Island",
|
|
3780
|
-
xk: "Kosovo"
|
|
3781
|
-
}, o3 = { ...h9, ...p9 }, D0 = {
|
|
3526
|
+
const D0 = {
|
|
3782
3527
|
OPEN_COUNTRY_DROPDOWN: "open:countrydropdown",
|
|
3783
3528
|
CLOSE_COUNTRY_DROPDOWN: "close:countrydropdown",
|
|
3784
3529
|
COUNTRY_CHANGE: "countrychange",
|
|
3785
3530
|
INPUT: "input"
|
|
3786
3531
|
// used for synthetic input trigger
|
|
3787
|
-
},
|
|
3532
|
+
}, R = {
|
|
3788
3533
|
HIDE: "iti__hide",
|
|
3789
3534
|
V_HIDE: "iti__v-hide",
|
|
3790
3535
|
ARROW_UP: "iti__arrow--up",
|
|
@@ -3802,7 +3547,7 @@ const h9 = {
|
|
|
3802
3547
|
}, vd = {
|
|
3803
3548
|
PASTE: "insertFromPaste",
|
|
3804
3549
|
DELETE_FWD: "deleteContentForward"
|
|
3805
|
-
},
|
|
3550
|
+
}, R1 = {
|
|
3806
3551
|
ALPHA_UNICODE: new RegExp("\\p{L}", "u"),
|
|
3807
3552
|
// any kind of letter from any language
|
|
3808
3553
|
NON_PLUS_NUMERIC: /[^+0-9]/,
|
|
@@ -3811,9 +3556,9 @@ const h9 = {
|
|
|
3811
3556
|
// chars that are NOT + or digit (global)
|
|
3812
3557
|
HIDDEN_SEARCH_CHAR: /^[a-zA-ZÀ-ÿа-яА-Я ]$/
|
|
3813
3558
|
// single acceptable hidden-search char
|
|
3814
|
-
},
|
|
3559
|
+
}, h9 = {
|
|
3815
3560
|
HIDDEN_SEARCH_RESET_MS: 1e3
|
|
3816
|
-
},
|
|
3561
|
+
}, Ed = {
|
|
3817
3562
|
UNKNOWN_NUMBER_TYPE: -99,
|
|
3818
3563
|
UNKNOWN_VALIDATION_ERROR: -99
|
|
3819
3564
|
}, d2 = {
|
|
@@ -3833,17 +3578,17 @@ const h9 = {
|
|
|
3833
3578
|
// UK mobile numbers start with 7 after national trunk (0) or core section
|
|
3834
3579
|
MOBILE_CORE_LENGTH: 10
|
|
3835
3580
|
// core number length (excluding dial code / national prefix) for mobiles
|
|
3836
|
-
},
|
|
3581
|
+
}, p9 = {
|
|
3837
3582
|
ISO2: "us"
|
|
3838
3583
|
}, h2 = {
|
|
3839
3584
|
AGGRESSIVE: "aggressive",
|
|
3840
3585
|
POLITE: "polite"
|
|
3841
3586
|
}, e2 = {
|
|
3842
3587
|
AUTO: "auto"
|
|
3843
|
-
},
|
|
3588
|
+
}, Id = {
|
|
3844
3589
|
COUNTRY_CODE: "countryCode",
|
|
3845
3590
|
DIAL_CODE: "dialCode"
|
|
3846
|
-
},
|
|
3591
|
+
}, B = {
|
|
3847
3592
|
EXPANDED: "aria-expanded",
|
|
3848
3593
|
LABEL: "aria-label",
|
|
3849
3594
|
SELECTED: "aria-selected",
|
|
@@ -3853,23 +3598,35 @@ const h9 = {
|
|
|
3853
3598
|
HIDDEN: "aria-hidden",
|
|
3854
3599
|
AUTOCOMPLETE: "aria-autocomplete",
|
|
3855
3600
|
MODAL: "aria-modal"
|
|
3856
|
-
},
|
|
3601
|
+
}, g9 = {
|
|
3602
|
+
selectedCountryAriaLabel: "Change country, selected ${countryName} (${dialCode})",
|
|
3603
|
+
noCountrySelected: "Select country",
|
|
3604
|
+
countryListAriaLabel: "List of countries",
|
|
3605
|
+
searchPlaceholder: "Search",
|
|
3606
|
+
clearSearchAriaLabel: "Clear search",
|
|
3607
|
+
searchEmptyState: "No results found",
|
|
3608
|
+
searchSummaryAria(t) {
|
|
3609
|
+
return t === 0 ? "No results found" : t === 1 ? "1 result found" : `${t} results found`;
|
|
3610
|
+
}
|
|
3611
|
+
}, n2 = (t) => typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia(t).matches, C9 = () => {
|
|
3857
3612
|
if (typeof navigator < "u" && typeof window < "u") {
|
|
3858
|
-
const t =
|
|
3859
|
-
|
|
3860
|
-
), d = n2("(max-width: 500px)"), e = n2("(max-height: 600px)"), i = n2("(pointer: coarse)");
|
|
3861
|
-
return t || d || i && e;
|
|
3613
|
+
const t = n2("(max-width: 500px)"), d = n2("(max-height: 600px)"), e = n2("(pointer: coarse)");
|
|
3614
|
+
return t || e && d;
|
|
3862
3615
|
}
|
|
3863
3616
|
return !1;
|
|
3864
3617
|
}, l3 = {
|
|
3865
|
-
// Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
|
|
3866
|
-
allowPhonewords: !1,
|
|
3867
3618
|
//* Whether or not to allow the dropdown.
|
|
3868
3619
|
allowDropdown: !0,
|
|
3620
|
+
//* Whether or not to allow extensions after the main number.
|
|
3621
|
+
allowNumberExtensions: !1,
|
|
3622
|
+
// Allow alphanumeric "phonewords" (e.g. +1 800 FLOWERS) as valid numbers
|
|
3623
|
+
allowPhonewords: !1,
|
|
3869
3624
|
//* Add a placeholder in the input with an example number for the selected country.
|
|
3870
3625
|
autoPlaceholder: h2.POLITE,
|
|
3871
3626
|
//* Modify the parentClass.
|
|
3872
3627
|
containerClass: "",
|
|
3628
|
+
//* Locale for localising country names via Intl.DisplayNames.
|
|
3629
|
+
countryNameLocale: "en",
|
|
3873
3630
|
//* The order of the countries in the dropdown. Defaults to alphabetical.
|
|
3874
3631
|
countryOrder: null,
|
|
3875
3632
|
//* Add a country search input at the top of the dropdown.
|
|
@@ -3909,12 +3666,12 @@ const h9 = {
|
|
|
3909
3666
|
//* Only allow certain chars e.g. a plus followed by numeric digits, and cap at max valid length.
|
|
3910
3667
|
strictMode: !1,
|
|
3911
3668
|
//* Use full screen popup instead of dropdown for country list.
|
|
3912
|
-
useFullscreenPopup:
|
|
3669
|
+
useFullscreenPopup: C9(),
|
|
3913
3670
|
//* The number type to enforce during validation.
|
|
3914
|
-
|
|
3915
|
-
},
|
|
3916
|
-
t.useFullscreenPopup && (t.fixDropdownWidth = !1), t.onlyCountries.length === 1 && (t.initialCountry = t.onlyCountries[0]), t.separateDialCode && (t.nationalMode = !1), t.allowDropdown && !t.showFlags && !t.separateDialCode && (t.nationalMode = !1), t.useFullscreenPopup && !t.dropdownContainer && (t.dropdownContainer = document.body), t.i18n = { ...
|
|
3917
|
-
},
|
|
3671
|
+
allowedNumberTypes: ["MOBILE", "FIXED_LINE"]
|
|
3672
|
+
}, _9 = (t) => {
|
|
3673
|
+
t.useFullscreenPopup && (t.fixDropdownWidth = !1), t.onlyCountries.length === 1 && (t.initialCountry = t.onlyCountries[0]), t.separateDialCode && (t.nationalMode = !1), t.allowDropdown && !t.showFlags && !t.separateDialCode && (t.nationalMode = !1), t.useFullscreenPopup && !t.dropdownContainer && (t.dropdownContainer = document.body), t.i18n = { ...g9, ...t.i18n };
|
|
3674
|
+
}, O0 = (t) => t.replace(/\D/g, ""), a3 = (t = "") => t.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase(), m9 = (t, d) => {
|
|
3918
3675
|
const e = a3(d), i = [], s = [], $ = [], o = [], l = [], f = [];
|
|
3919
3676
|
for (const C of t)
|
|
3920
3677
|
C.iso2 === e ? i.push(C) : C.normalisedName.startsWith(e) ? s.push(C) : C.normalisedName.includes(e) ? $.push(C) : e === C.dialCode || e === C.dialCodePlus ? o.push(C) : C.dialCodePlus.includes(e) ? l.push(C) : C.initials.includes(e) && f.push(C);
|
|
@@ -3927,46 +3684,46 @@ const h9 = {
|
|
|
3927
3684
|
...l.sort(a),
|
|
3928
3685
|
...f.sort(a)
|
|
3929
3686
|
];
|
|
3930
|
-
},
|
|
3687
|
+
}, y9 = (t, d) => {
|
|
3931
3688
|
const e = d.toLowerCase();
|
|
3932
3689
|
for (const i of t)
|
|
3933
3690
|
if (i.name.toLowerCase().startsWith(e))
|
|
3934
3691
|
return i;
|
|
3935
3692
|
return null;
|
|
3936
|
-
}, i2 = (t) => Object.keys(t).filter((d) => !!t[d]).join(" "),
|
|
3693
|
+
}, i2 = (t) => Object.keys(t).filter((d) => !!t[d]).join(" "), H = (t, d, e) => {
|
|
3937
3694
|
const i = document.createElement(t);
|
|
3938
3695
|
return d && Object.entries(d).forEach(
|
|
3939
3696
|
([s, $]) => i.setAttribute(s, $)
|
|
3940
3697
|
), e && e.appendChild(i), i;
|
|
3941
|
-
},
|
|
3942
|
-
<svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${
|
|
3698
|
+
}, v9 = () => `
|
|
3699
|
+
<svg class="iti__search-icon-svg" width="14" height="14" viewBox="0 0 24 24" focusable="false" ${B.HIDDEN}="true">
|
|
3943
3700
|
<circle cx="11" cy="11" r="7" />
|
|
3944
3701
|
<line x1="21" y1="21" x2="16.65" y2="16.65" />
|
|
3945
3702
|
</svg>`, E9 = (t) => {
|
|
3946
3703
|
const d = `iti-${t}-clear-mask`;
|
|
3947
3704
|
return `
|
|
3948
|
-
<svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${
|
|
3705
|
+
<svg class="iti__search-clear-svg" width="12" height="12" viewBox="0 0 16 16" ${B.HIDDEN}="true" focusable="false">
|
|
3949
3706
|
<mask id="${d}" maskUnits="userSpaceOnUse">
|
|
3950
3707
|
<rect width="16" height="16" fill="white" />
|
|
3951
3708
|
<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" />
|
|
3952
3709
|
</mask>
|
|
3953
3710
|
<circle cx="8" cy="8" r="8" class="iti__search-clear-bg" mask="url(#${d})" />
|
|
3954
3711
|
</svg>`;
|
|
3955
|
-
}
|
|
3712
|
+
}, I9 = () => `
|
|
3713
|
+
<svg width="256" height="256" viewBox="0 0 512 512" class="iti__globe-svg">
|
|
3714
|
+
<path d="M508 213a240 240 0 0 0-449-87l-2 5-2 5c-8 14-13 30-17 46a65 65 0 0 1 56 4c16-10 35-19 56-27l9-3c-6 23-10 48-10 74h-16l4 6c3 4 5 8 6 13h6c0 22 3 44 8 65l2 10-25-10-4 5 12 18 9 3 6 2 8 3 9 26 1 2 16-7h1l-5-13-1-2c24 6 49 9 75 10v26l11 10 7 7v-30l1-13c22 0 44-3 65-8l10-2-21 48-1 1a317 317 0 0 1-14 23l-21 5h-2c6 16 7 33 1 50a240 240 0 0 0 211-265m-401-56-11 6c19-44 54-79 98-98-11 20-21 44-29 69-21 6-40 15-58 23m154 182v4c-29-1-57-6-81-13-7-25-12-52-13-81h94zm0-109h-94c1-29 6-56 13-81 24-7 52-12 81-13zm0-112c-22 1-44 4-65 8l-10 2 12-30 9-17 1-2a332 332 0 0 1 13-23c13-4 26-6 40-7zm187 69 6 4c4 12 6 25 6 38v1h-68c-1-26-4-51-10-74l48 20 1 1 14 8zm-14-44 10 20c-20-11-43-21-68-29-8-25-18-49-29-69 37 16 67 44 87 78M279 49h1c13 1 27 3 39 7l14 23 1 2a343 343 0 0 1 12 26l2 5 6 16c-23-6-48-9-74-10h-1zm0 87h1c29 1 56 6 81 13 7 24 12 51 12 80v1h-94zm2 207h-2v-94h95c-1 29-6 56-13 81-24 7-51 12-80 13m86 60-20 10c11-20 21-43 29-68 25-8 48-18 68-29-16 37-43 67-77 87m87-115-7 5-16 9-2 1a337 337 0 0 1-47 21c6-24 9-49 10-75h68c0 13-2 27-6 39"/>
|
|
3715
|
+
<path d="m261 428-2-2-22-21a40 40 0 0 0-32-11h-1a37 37 0 0 0-18 8l-1 1-4 2-2 2-5 4c-9-3-36-31-47-44s-32-45-34-55l3-2a151 151 0 0 0 11-9v-1a39 39 0 0 0 5-48l-3-3-11-19-3-4-5-7h-1l-3-3-4-3-5-2a35 35 0 0 0-16-3h-5c-4 1-14 5-24 11l-4 2-4 3-4 2c-9 8-17 17-18 27a380 380 0 0 0 212 259h3c12 0 25-10 36-21l10-12 6-11a39 39 0 0 0-8-40"/>
|
|
3716
|
+
</svg>`;
|
|
3956
3717
|
class w9 {
|
|
3957
3718
|
constructor(d, e, i) {
|
|
3958
3719
|
this.highlightedItem = null, this.selectedItem = null, d.dataset.intlTelInputId = i.toString(), this.telInput = d, this.options = e, this.id = i, this.hadInitialPlaceholder = !!d.getAttribute("placeholder"), this.isRTL = !!this.telInput.closest("[dir=rtl]"), this.options.separateDialCode && (this.originalPaddingLeft = this.telInput.style.paddingLeft);
|
|
3959
3720
|
}
|
|
3960
3721
|
//* Generate all of the markup for the plugin: the selected country overlay, and the dropdown.
|
|
3961
3722
|
generateMarkup(d) {
|
|
3962
|
-
this.countries = d, this.
|
|
3723
|
+
this.countries = d, this.telInput.classList.add("iti__tel-input");
|
|
3963
3724
|
const e = this._createWrapperAndInsert();
|
|
3964
3725
|
this._maybeBuildCountryContainer(e), e.appendChild(this.telInput), this._maybeUpdateInputPaddingAndReveal(), this._maybeBuildHiddenInputs(e);
|
|
3965
3726
|
}
|
|
3966
|
-
_prepareTelInput() {
|
|
3967
|
-
var d;
|
|
3968
|
-
this.telInput.classList.add("iti__tel-input"), !this.telInput.hasAttribute("autocomplete") && !((d = this.telInput.form) != null && d.hasAttribute("autocomplete")) && this.telInput.setAttribute("autocomplete", "off");
|
|
3969
|
-
}
|
|
3970
3727
|
_createWrapperAndInsert() {
|
|
3971
3728
|
const { allowDropdown: d, showFlags: e, containerClass: i, useFullscreenPopup: s } = this.options, $ = i2({
|
|
3972
3729
|
iti: !0,
|
|
@@ -3974,47 +3731,47 @@ class w9 {
|
|
|
3974
3731
|
"iti--show-flags": e,
|
|
3975
3732
|
"iti--inline-dropdown": !s,
|
|
3976
3733
|
[i]: !!i
|
|
3977
|
-
}), o =
|
|
3734
|
+
}), o = H("div", { class: $ });
|
|
3978
3735
|
return this.isRTL && o.setAttribute("dir", "ltr"), this.telInput.before(o), o;
|
|
3979
3736
|
}
|
|
3980
3737
|
_maybeBuildCountryContainer(d) {
|
|
3981
3738
|
const { allowDropdown: e, separateDialCode: i, showFlags: s } = this.options;
|
|
3982
3739
|
if (e || s || i) {
|
|
3983
|
-
this.countryContainer =
|
|
3740
|
+
this.countryContainer = H(
|
|
3984
3741
|
"div",
|
|
3985
3742
|
// visibly hidden until we measure it's width to set the input padding correctly
|
|
3986
|
-
{ class: `iti__country-container ${
|
|
3743
|
+
{ class: `iti__country-container ${R.V_HIDE}` },
|
|
3987
3744
|
d
|
|
3988
|
-
), e ? (this.selectedCountry =
|
|
3745
|
+
), e ? (this.selectedCountry = H(
|
|
3989
3746
|
"button",
|
|
3990
3747
|
{
|
|
3991
3748
|
type: "button",
|
|
3992
3749
|
class: "iti__selected-country",
|
|
3993
|
-
[
|
|
3994
|
-
[
|
|
3995
|
-
[
|
|
3996
|
-
[
|
|
3750
|
+
[B.EXPANDED]: "false",
|
|
3751
|
+
[B.LABEL]: this.options.i18n.noCountrySelected,
|
|
3752
|
+
[B.HASPOPUP]: "dialog",
|
|
3753
|
+
[B.CONTROLS]: `iti-${this.id}__dropdown-content`
|
|
3997
3754
|
},
|
|
3998
3755
|
this.countryContainer
|
|
3999
|
-
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry =
|
|
3756
|
+
), this.telInput.disabled && this.selectedCountry.setAttribute("disabled", "true")) : this.selectedCountry = H(
|
|
4000
3757
|
"div",
|
|
4001
3758
|
{ class: "iti__selected-country" },
|
|
4002
3759
|
this.countryContainer
|
|
4003
3760
|
);
|
|
4004
|
-
const $ =
|
|
3761
|
+
const $ = H(
|
|
4005
3762
|
"div",
|
|
4006
3763
|
{ class: "iti__selected-country-primary" },
|
|
4007
3764
|
this.selectedCountry
|
|
4008
3765
|
);
|
|
4009
|
-
this.selectedCountryInner =
|
|
3766
|
+
this.selectedCountryInner = H(
|
|
4010
3767
|
"div",
|
|
4011
|
-
{ class:
|
|
3768
|
+
{ class: R.FLAG },
|
|
4012
3769
|
$
|
|
4013
|
-
), e && (this.dropdownArrow =
|
|
3770
|
+
), e && (this.dropdownArrow = H(
|
|
4014
3771
|
"div",
|
|
4015
|
-
{ class: "iti__arrow", [
|
|
3772
|
+
{ class: "iti__arrow", [B.HIDDEN]: "true" },
|
|
4016
3773
|
$
|
|
4017
|
-
)), i && (this.selectedDialCode =
|
|
3774
|
+
)), i && (this.selectedDialCode = H(
|
|
4018
3775
|
"div",
|
|
4019
3776
|
{ class: "iti__selected-dial-code" },
|
|
4020
3777
|
this.selectedCountry
|
|
@@ -4030,18 +3787,18 @@ class w9 {
|
|
|
4030
3787
|
dropdownContainer: $,
|
|
4031
3788
|
containerClass: o
|
|
4032
3789
|
} = this.options, l = d ? "" : "iti--flexible-dropdown-width";
|
|
4033
|
-
if (this.dropdownContent =
|
|
3790
|
+
if (this.dropdownContent = H("div", {
|
|
4034
3791
|
id: `iti-${this.id}__dropdown-content`,
|
|
4035
|
-
class: `iti__dropdown-content ${
|
|
3792
|
+
class: `iti__dropdown-content ${R.HIDE} ${l}`,
|
|
4036
3793
|
role: "dialog",
|
|
4037
|
-
[
|
|
4038
|
-
}), this.isRTL && this.dropdownContent.setAttribute("dir", "rtl"), i && this._buildSearchUI(), this.countryList =
|
|
3794
|
+
[B.MODAL]: "true"
|
|
3795
|
+
}), this.isRTL && this.dropdownContent.setAttribute("dir", "rtl"), i && this._buildSearchUI(), this.countryList = H(
|
|
4039
3796
|
"ul",
|
|
4040
3797
|
{
|
|
4041
3798
|
class: "iti__country-list",
|
|
4042
3799
|
id: `iti-${this.id}__country-listbox`,
|
|
4043
3800
|
role: "listbox",
|
|
4044
|
-
[
|
|
3801
|
+
[B.LABEL]: s.countryListAriaLabel
|
|
4045
3802
|
},
|
|
4046
3803
|
this.dropdownContent
|
|
4047
3804
|
), this._appendListItems(), i && this.updateSearchResultsA11yText(), $) {
|
|
@@ -4052,24 +3809,24 @@ class w9 {
|
|
|
4052
3809
|
"iti--inline-dropdown": !e,
|
|
4053
3810
|
[o]: !!o
|
|
4054
3811
|
});
|
|
4055
|
-
this.dropdown =
|
|
3812
|
+
this.dropdown = H("div", { class: f }), this.dropdown.appendChild(this.dropdownContent);
|
|
4056
3813
|
} else
|
|
4057
3814
|
this.countryContainer.appendChild(this.dropdownContent);
|
|
4058
3815
|
}
|
|
4059
3816
|
_buildSearchUI() {
|
|
4060
|
-
const { i18n: d } = this.options, e =
|
|
3817
|
+
const { i18n: d } = this.options, e = H(
|
|
4061
3818
|
"div",
|
|
4062
3819
|
{ class: "iti__search-input-wrapper" },
|
|
4063
3820
|
this.dropdownContent
|
|
4064
3821
|
);
|
|
4065
|
-
this.searchIcon =
|
|
3822
|
+
this.searchIcon = H(
|
|
4066
3823
|
"span",
|
|
4067
3824
|
{
|
|
4068
3825
|
class: "iti__search-icon",
|
|
4069
|
-
[
|
|
3826
|
+
[B.HIDDEN]: "true"
|
|
4070
3827
|
},
|
|
4071
3828
|
e
|
|
4072
|
-
), this.searchIcon.innerHTML =
|
|
3829
|
+
), this.searchIcon.innerHTML = v9(), this.searchInput = H(
|
|
4073
3830
|
"input",
|
|
4074
3831
|
{
|
|
4075
3832
|
id: `iti-${this.id}__search-input`,
|
|
@@ -4079,38 +3836,38 @@ class w9 {
|
|
|
4079
3836
|
placeholder: d.searchPlaceholder,
|
|
4080
3837
|
// role=combobox + aria-autocomplete=list + aria-activedescendant allows maintaining focus on the search input while allowing users to navigate search results with up/down keyboard keys
|
|
4081
3838
|
role: "combobox",
|
|
4082
|
-
[
|
|
4083
|
-
[
|
|
4084
|
-
[
|
|
4085
|
-
[
|
|
3839
|
+
[B.EXPANDED]: "true",
|
|
3840
|
+
[B.LABEL]: d.searchPlaceholder,
|
|
3841
|
+
[B.CONTROLS]: `iti-${this.id}__country-listbox`,
|
|
3842
|
+
[B.AUTOCOMPLETE]: "list",
|
|
4086
3843
|
autocomplete: "off"
|
|
4087
3844
|
},
|
|
4088
3845
|
e
|
|
4089
|
-
), this.searchClearButton =
|
|
3846
|
+
), this.searchClearButton = H(
|
|
4090
3847
|
"button",
|
|
4091
3848
|
{
|
|
4092
3849
|
type: "button",
|
|
4093
|
-
class: `iti__search-clear ${
|
|
4094
|
-
[
|
|
3850
|
+
class: `iti__search-clear ${R.HIDE}`,
|
|
3851
|
+
[B.LABEL]: d.clearSearchAriaLabel,
|
|
4095
3852
|
tabindex: "-1"
|
|
4096
3853
|
},
|
|
4097
3854
|
e
|
|
4098
|
-
), this.searchClearButton.innerHTML = E9(this.id), this.searchResultsA11yText =
|
|
3855
|
+
), this.searchClearButton.innerHTML = E9(this.id), this.searchResultsA11yText = H(
|
|
4099
3856
|
"span",
|
|
4100
3857
|
{ class: "iti__a11y-text" },
|
|
4101
3858
|
this.dropdownContent
|
|
4102
|
-
), this.searchNoResults =
|
|
3859
|
+
), this.searchNoResults = H(
|
|
4103
3860
|
"div",
|
|
4104
3861
|
{
|
|
4105
|
-
class: `iti__no-results ${
|
|
4106
|
-
[
|
|
3862
|
+
class: `iti__no-results ${R.HIDE}`,
|
|
3863
|
+
[B.HIDDEN]: "true"
|
|
4107
3864
|
// all a11y messaging happens in this.searchResultsA11yText
|
|
4108
3865
|
},
|
|
4109
3866
|
this.dropdownContent
|
|
4110
|
-
), this.searchNoResults.textContent = d.
|
|
3867
|
+
), this.searchNoResults.textContent = d.searchEmptyState;
|
|
4111
3868
|
}
|
|
4112
3869
|
_maybeUpdateInputPaddingAndReveal() {
|
|
4113
|
-
this.countryContainer && (this.updateInputPadding(), this.countryContainer.classList.remove(
|
|
3870
|
+
this.countryContainer && (this.updateInputPadding(), this.countryContainer.classList.remove(R.V_HIDE));
|
|
4114
3871
|
}
|
|
4115
3872
|
_maybeBuildHiddenInputs(d) {
|
|
4116
3873
|
var i, s;
|
|
@@ -4121,7 +3878,7 @@ class w9 {
|
|
|
4121
3878
|
const l = (i = this.telInput.form) == null ? void 0 : i.querySelector(
|
|
4122
3879
|
`input[name="${o.phone}"]`
|
|
4123
3880
|
);
|
|
4124
|
-
l ? this.hiddenInput = l : (this.hiddenInput =
|
|
3881
|
+
l ? this.hiddenInput = l : (this.hiddenInput = H("input", {
|
|
4125
3882
|
type: "hidden",
|
|
4126
3883
|
name: o.phone
|
|
4127
3884
|
}), d.appendChild(this.hiddenInput));
|
|
@@ -4130,7 +3887,7 @@ class w9 {
|
|
|
4130
3887
|
const l = (s = this.telInput.form) == null ? void 0 : s.querySelector(
|
|
4131
3888
|
`input[name="${o.country}"]`
|
|
4132
3889
|
);
|
|
4133
|
-
l ? this.hiddenInputCountry = l : (this.hiddenInputCountry =
|
|
3890
|
+
l ? this.hiddenInputCountry = l : (this.hiddenInputCountry = H("input", {
|
|
4134
3891
|
type: "hidden",
|
|
4135
3892
|
name: o.country
|
|
4136
3893
|
}), d.appendChild(this.hiddenInputCountry));
|
|
@@ -4142,18 +3899,18 @@ class w9 {
|
|
|
4142
3899
|
const d = document.createDocumentFragment();
|
|
4143
3900
|
for (let e = 0; e < this.countries.length; e++) {
|
|
4144
3901
|
const i = this.countries[e], s = i2({
|
|
4145
|
-
[
|
|
4146
|
-
}), $ =
|
|
3902
|
+
[R.COUNTRY_ITEM]: !0
|
|
3903
|
+
}), $ = H("li", {
|
|
4147
3904
|
id: `iti-${this.id}__item-${i.iso2}`,
|
|
4148
3905
|
class: s,
|
|
4149
3906
|
tabindex: "-1",
|
|
4150
3907
|
role: "option",
|
|
4151
|
-
[
|
|
3908
|
+
[B.SELECTED]: "false"
|
|
4152
3909
|
});
|
|
4153
|
-
$.dataset.dialCode = i.dialCode, $.dataset.countryCode = i.iso2, i.nodeById[this.id] = $, this.options.showFlags &&
|
|
4154
|
-
const o =
|
|
3910
|
+
$.dataset.dialCode = i.dialCode, $.dataset.countryCode = i.iso2, i.nodeById[this.id] = $, this.options.showFlags && H("div", { class: `${R.FLAG} iti__${i.iso2}` }, $);
|
|
3911
|
+
const o = H("span", { class: "iti__country-name" }, $);
|
|
4155
3912
|
o.textContent = i.name;
|
|
4156
|
-
const l =
|
|
3913
|
+
const l = H("span", { class: "iti__dial-code" }, $);
|
|
4157
3914
|
this.isRTL && l.setAttribute("dir", "ltr"), l.textContent = `+${i.dialCode}`, d.appendChild($);
|
|
4158
3915
|
}
|
|
4159
3916
|
this.countryList.appendChild(d);
|
|
@@ -4195,11 +3952,7 @@ class w9 {
|
|
|
4195
3952
|
//* Update search results text (for a11y).
|
|
4196
3953
|
updateSearchResultsA11yText() {
|
|
4197
3954
|
const { i18n: d } = this.options, e = this.countryList.childElementCount;
|
|
4198
|
-
|
|
4199
|
-
e === 0 ? i = d.zeroSearchResults : d.searchResultsText ? i = d.searchResultsText(e) : e === 1 ? i = d.oneSearchResult : i = d.multipleSearchResults.replace(
|
|
4200
|
-
"${count}",
|
|
4201
|
-
e.toString()
|
|
4202
|
-
), this.searchResultsA11yText.textContent = i;
|
|
3955
|
+
this.searchResultsA11yText.textContent = d.searchSummaryAria(e);
|
|
4203
3956
|
}
|
|
4204
3957
|
//* Check if an element is visible within it's container, else scroll until it is.
|
|
4205
3958
|
scrollTo(d) {
|
|
@@ -4214,18 +3967,18 @@ class w9 {
|
|
|
4214
3967
|
//* Remove highlighting from the previous list item and highlight the new one.
|
|
4215
3968
|
highlightListItem(d, e) {
|
|
4216
3969
|
const i = this.highlightedItem;
|
|
4217
|
-
if (i && i.classList.remove(
|
|
3970
|
+
if (i && i.classList.remove(R.HIGHLIGHT), this.highlightedItem = d, this.highlightedItem && (this.highlightedItem.classList.add(R.HIGHLIGHT), this.options.countrySearch)) {
|
|
4218
3971
|
const s = this.highlightedItem.getAttribute("id") || "";
|
|
4219
|
-
this.searchInput.setAttribute(
|
|
3972
|
+
this.searchInput.setAttribute(B.ACTIVE_DESCENDANT, s);
|
|
4220
3973
|
}
|
|
4221
3974
|
e && this.highlightedItem.focus();
|
|
4222
3975
|
}
|
|
4223
3976
|
updateSelectedItem(d) {
|
|
4224
|
-
if (this.selectedItem && this.selectedItem.dataset.countryCode !== d && (this.selectedItem.setAttribute(
|
|
3977
|
+
if (this.selectedItem && this.selectedItem.dataset.countryCode !== d && (this.selectedItem.setAttribute(B.SELECTED, "false"), this.selectedItem = null), d && !this.selectedItem) {
|
|
4225
3978
|
const e = this.countryList.querySelector(
|
|
4226
3979
|
`[data-country-code="${d}"]`
|
|
4227
3980
|
);
|
|
4228
|
-
e && (e.setAttribute(
|
|
3981
|
+
e && (e.setAttribute(B.SELECTED, "true"), this.selectedItem = e);
|
|
4229
3982
|
}
|
|
4230
3983
|
}
|
|
4231
3984
|
//* Country search: Filter the country list to the given array of countries.
|
|
@@ -4236,7 +3989,7 @@ class w9 {
|
|
|
4236
3989
|
const s = i.nodeById[this.id];
|
|
4237
3990
|
s && (this.countryList.appendChild(s), e && (this.highlightListItem(s, !1), e = !1));
|
|
4238
3991
|
}
|
|
4239
|
-
e ? (this.highlightListItem(null, !1), this.searchNoResults && this.searchNoResults.classList.remove(
|
|
3992
|
+
e ? (this.highlightListItem(null, !1), this.searchNoResults && this.searchNoResults.classList.remove(R.HIDE)) : this.searchNoResults && this.searchNoResults.classList.add(R.HIDE), this.countryList.scrollTop = 0, this.updateSearchResultsA11yText();
|
|
4240
3993
|
}
|
|
4241
3994
|
destroy() {
|
|
4242
3995
|
this.telInput.iti = void 0, delete this.telInput.dataset.intlTelInputId, this.options.separateDialCode && (this.telInput.style.paddingLeft = this.originalPaddingLeft);
|
|
@@ -4247,30 +4000,31 @@ class w9 {
|
|
|
4247
4000
|
this.countries = null;
|
|
4248
4001
|
}
|
|
4249
4002
|
}
|
|
4250
|
-
const
|
|
4003
|
+
const N9 = (t) => {
|
|
4251
4004
|
const { onlyCountries: d, excludeCountries: e } = t;
|
|
4252
4005
|
if (d.length) {
|
|
4253
4006
|
const i = d.map(
|
|
4254
4007
|
(s) => s.toLowerCase()
|
|
4255
4008
|
);
|
|
4256
|
-
return
|
|
4009
|
+
return Q1.filter(
|
|
4257
4010
|
(s) => i.includes(s.iso2)
|
|
4258
4011
|
);
|
|
4259
4012
|
} else if (e.length) {
|
|
4260
4013
|
const i = e.map(
|
|
4261
4014
|
(s) => s.toLowerCase()
|
|
4262
4015
|
);
|
|
4263
|
-
return
|
|
4016
|
+
return Q1.filter(
|
|
4264
4017
|
(s) => !i.includes(s.iso2)
|
|
4265
4018
|
);
|
|
4266
4019
|
}
|
|
4267
|
-
return
|
|
4268
|
-
},
|
|
4269
|
-
|
|
4270
|
-
|
|
4271
|
-
|
|
4272
|
-
|
|
4273
|
-
|
|
4020
|
+
return Q1;
|
|
4021
|
+
}, S9 = (t, d) => {
|
|
4022
|
+
const { countryNameLocale: e, i18n: i } = d, $ = typeof Intl < "u" && typeof Intl.DisplayNames == "function" ? new Intl.DisplayNames(e, {
|
|
4023
|
+
type: "region"
|
|
4024
|
+
}) : null;
|
|
4025
|
+
for (const o of t)
|
|
4026
|
+
o.name = i[o.iso2] || ($ == null ? void 0 : $.of(o.iso2.toUpperCase()));
|
|
4027
|
+
}, A9 = (t) => {
|
|
4274
4028
|
const d = /* @__PURE__ */ new Set();
|
|
4275
4029
|
let e = 0;
|
|
4276
4030
|
const i = {}, s = (o, l) => {
|
|
@@ -4298,7 +4052,7 @@ const S9 = (t) => {
|
|
|
4298
4052
|
}
|
|
4299
4053
|
}
|
|
4300
4054
|
return { dialCodes: d, dialCodeMaxLen: e, dialCodeToIso2Map: i };
|
|
4301
|
-
},
|
|
4055
|
+
}, T9 = (t, d) => {
|
|
4302
4056
|
d.countryOrder && (d.countryOrder = d.countryOrder.map(
|
|
4303
4057
|
(e) => e.toLowerCase()
|
|
4304
4058
|
)), t.sort((e, i) => {
|
|
@@ -4310,21 +4064,20 @@ const S9 = (t) => {
|
|
|
4310
4064
|
}
|
|
4311
4065
|
return e.name.localeCompare(i.name);
|
|
4312
4066
|
});
|
|
4313
|
-
},
|
|
4067
|
+
}, b9 = (t) => {
|
|
4314
4068
|
for (const d of t)
|
|
4315
4069
|
d.normalisedName = a3(d.name), d.initials = d.normalisedName.split(/[^a-z]/).map((e) => e[0]).join(""), d.dialCodePlus = `+${d.dialCode}`;
|
|
4316
|
-
},
|
|
4070
|
+
}, wd = (t, d, e, i) => {
|
|
4317
4071
|
let s = t;
|
|
4318
4072
|
if (e && d) {
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
s = s.substring($);
|
|
4073
|
+
const $ = `+${i.dialCode}`, o = s[$.length] === " " || s[$.length] === "-" ? $.length + 1 : $.length;
|
|
4074
|
+
s = s.substring(o);
|
|
4322
4075
|
}
|
|
4323
4076
|
return s;
|
|
4324
|
-
},
|
|
4077
|
+
}, L9 = (t, d, e, i, s) => {
|
|
4325
4078
|
const $ = e ? e.formatNumberAsYouType(t, i.iso2) : t, { dialCode: o } = i;
|
|
4326
4079
|
return s && d.charAt(0) !== "+" && $.includes(`+${o}`) ? ($.split(`+${o}`)[1] || "").trim() : $;
|
|
4327
|
-
},
|
|
4080
|
+
}, D9 = (t, d, e, i) => {
|
|
4328
4081
|
if (e === 0 && !i)
|
|
4329
4082
|
return 0;
|
|
4330
4083
|
let s = 0;
|
|
@@ -4335,7 +4088,7 @@ const S9 = (t) => {
|
|
|
4335
4088
|
return $;
|
|
4336
4089
|
}
|
|
4337
4090
|
return d.length;
|
|
4338
|
-
},
|
|
4091
|
+
}, P9 = [
|
|
4339
4092
|
"800",
|
|
4340
4093
|
"822",
|
|
4341
4094
|
"833",
|
|
@@ -4353,22 +4106,20 @@ const S9 = (t) => {
|
|
|
4353
4106
|
"887",
|
|
4354
4107
|
"888",
|
|
4355
4108
|
"889"
|
|
4356
|
-
],
|
|
4357
|
-
const d =
|
|
4109
|
+
], Nd = (t) => {
|
|
4110
|
+
const d = O0(t);
|
|
4358
4111
|
if (d.startsWith(u3.NANP) && d.length >= 4) {
|
|
4359
4112
|
const e = d.substring(1, 4);
|
|
4360
|
-
return
|
|
4113
|
+
return P9.includes(e);
|
|
4361
4114
|
}
|
|
4362
4115
|
return !1;
|
|
4363
4116
|
};
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
let M9 = 0;
|
|
4367
|
-
const O9 = new Set(G1.map((t) => t.iso2)), r2 = (t) => O9.has(t);
|
|
4117
|
+
let O9 = 0;
|
|
4118
|
+
const R9 = new Set(Q1.map((t) => t.iso2)), r2 = (t) => R9.has(t);
|
|
4368
4119
|
class w2 {
|
|
4369
4120
|
constructor(d, e = {}) {
|
|
4370
|
-
this.id =
|
|
4371
|
-
const { dialCodes: i, dialCodeMaxLen: s, dialCodeToIso2Map: $ } =
|
|
4121
|
+
this.id = O9++, this.options = { ...l3, ...e }, _9(this.options), this.ui = new w9(d, this.options, this.id), this.isAndroid = w2._getIsAndroid(), this.promise = this._createInitPromises(), this.countries = N9(this.options);
|
|
4122
|
+
const { dialCodes: i, dialCodeMaxLen: s, dialCodeToIso2Map: $ } = A9(
|
|
4372
4123
|
this.countries
|
|
4373
4124
|
);
|
|
4374
4125
|
this.dialCodes = i, this.dialCodeMaxLen = s, this.dialCodeToIso2Map = $, this.countryByIso2 = new Map(this.countries.map((o) => [o.iso2, o])), this._init();
|
|
@@ -4418,18 +4169,18 @@ class w2 {
|
|
|
4418
4169
|
//********************
|
|
4419
4170
|
//* Prepare all of the country data, including onlyCountries, excludeCountries, countryOrder options.
|
|
4420
4171
|
_processCountryData() {
|
|
4421
|
-
|
|
4172
|
+
S9(this.countries, this.options), T9(this.countries, this.options), b9(this.countries);
|
|
4422
4173
|
}
|
|
4423
4174
|
//* Set the initial state of the input value and the selected country by:
|
|
4424
4175
|
//* 1. Extracting a dial code from the given number
|
|
4425
4176
|
//* 2. Using explicit initialCountry
|
|
4426
4177
|
_setInitialState(d = !1) {
|
|
4427
|
-
const e = this.ui.telInput.getAttribute("value"), i = this._normaliseNumerals(e), s = this._getTelInputValue(), o = i && i.startsWith("+") && (!s || !s.startsWith("+")) ? i : s, l = this._getDialCode(o), f =
|
|
4178
|
+
const e = this.ui.telInput.getAttribute("value"), i = this._normaliseNumerals(e), s = this._getTelInputValue(), o = i && i.startsWith("+") && (!s || !s.startsWith("+")) ? i : s, l = this._getDialCode(o), f = Nd(o), { initialCountry: a, geoIpLookup: C } = this.options, _ = a === e2.AUTO && C;
|
|
4428
4179
|
if (l && !f)
|
|
4429
4180
|
this._updateCountryFromNumber(o);
|
|
4430
4181
|
else if (!_ || d) {
|
|
4431
|
-
const
|
|
4432
|
-
r2(
|
|
4182
|
+
const m = a ? a.toLowerCase() : "";
|
|
4183
|
+
r2(m) ? this._setCountry(m) : l && f ? this._setCountry(p9.ISO2) : this._setCountry("");
|
|
4433
4184
|
}
|
|
4434
4185
|
o && this._updateValFromNumber(o);
|
|
4435
4186
|
}
|
|
@@ -4450,12 +4201,12 @@ class w2 {
|
|
|
4450
4201
|
//* initialise the dropdown listeners.
|
|
4451
4202
|
_initDropdownListeners() {
|
|
4452
4203
|
const d = this.abortController.signal, e = (o) => {
|
|
4453
|
-
this.ui.dropdownContent.classList.contains(
|
|
4204
|
+
this.ui.dropdownContent.classList.contains(R.HIDE) ? this.ui.telInput.focus() : o.preventDefault();
|
|
4454
4205
|
}, i = this.ui.telInput.closest("label");
|
|
4455
4206
|
i && i.addEventListener("click", e, { signal: d });
|
|
4456
4207
|
const s = () => {
|
|
4457
4208
|
this.ui.dropdownContent.classList.contains(
|
|
4458
|
-
|
|
4209
|
+
R.HIDE
|
|
4459
4210
|
) && !this.ui.telInput.disabled && !this.ui.telInput.readOnly && this._openDropdown();
|
|
4460
4211
|
};
|
|
4461
4212
|
this.ui.selectedCountry.addEventListener(
|
|
@@ -4467,7 +4218,7 @@ class w2 {
|
|
|
4467
4218
|
);
|
|
4468
4219
|
const $ = (o) => {
|
|
4469
4220
|
this.ui.dropdownContent.classList.contains(
|
|
4470
|
-
|
|
4221
|
+
R.HIDE
|
|
4471
4222
|
) && [d1.ARROW_UP, d1.ARROW_DOWN, d1.SPACE, d1.ENTER].includes(o.key) && (o.preventDefault(), o.stopPropagation(), this._openDropdown()), o.key === d1.TAB && this._closeDropdown();
|
|
4472
4223
|
};
|
|
4473
4224
|
this.ui.countryContainer.addEventListener(
|
|
@@ -4527,38 +4278,42 @@ class w2 {
|
|
|
4527
4278
|
countrySearch: $
|
|
4528
4279
|
} = this.options;
|
|
4529
4280
|
let o = !1;
|
|
4530
|
-
|
|
4281
|
+
R1.ALPHA_UNICODE.test(this._getTelInputValue()) && (o = !0);
|
|
4531
4282
|
const l = (f) => {
|
|
4532
4283
|
const a = this._getTelInputValue();
|
|
4533
4284
|
if (this.isAndroid && (f == null ? void 0 : f.data) === "+" && i && s && $) {
|
|
4534
|
-
const
|
|
4285
|
+
const N = this.ui.telInput.selectionStart || 0, D = a.substring(0, N - 1), L = a.substring(N);
|
|
4535
4286
|
this._setTelInputValue(D + L), this._openDropdownWithPlus();
|
|
4536
4287
|
return;
|
|
4537
4288
|
}
|
|
4538
4289
|
this._updateCountryFromNumber(a) && this._triggerCountryChange();
|
|
4539
|
-
const C = (f == null ? void 0 : f.data) &&
|
|
4540
|
-
C || _ && !d ? o = !0 :
|
|
4541
|
-
const
|
|
4542
|
-
if (e && !o && !
|
|
4543
|
-
const
|
|
4290
|
+
const C = (f == null ? void 0 : f.data) && R1.NON_PLUS_NUMERIC.test(f.data), _ = (f == null ? void 0 : f.inputType) === vd.PASTE && a;
|
|
4291
|
+
C || _ && !d ? o = !0 : R1.NON_PLUS_NUMERIC.test(a) || (o = !1);
|
|
4292
|
+
const m = (f == null ? void 0 : f.detail) && f.detail.isSetNumber, v = this.userNumeralSet === "ascii";
|
|
4293
|
+
if (e && !o && !m && v) {
|
|
4294
|
+
const N = this.ui.telInput.selectionStart || 0, L = a.substring(
|
|
4544
4295
|
0,
|
|
4545
|
-
|
|
4296
|
+
N
|
|
4546
4297
|
).replace(
|
|
4547
|
-
|
|
4298
|
+
R1.NON_PLUS_NUMERIC_GLOBAL,
|
|
4548
4299
|
""
|
|
4549
|
-
).length,
|
|
4550
|
-
|
|
4300
|
+
).length, S = (f == null ? void 0 : f.inputType) === vd.DELETE_FWD, A = this._getFullNumber(), E = L9(
|
|
4301
|
+
A,
|
|
4551
4302
|
a,
|
|
4552
4303
|
w.utils,
|
|
4553
4304
|
this.selectedCountryData,
|
|
4554
|
-
|
|
4555
|
-
),
|
|
4305
|
+
i
|
|
4306
|
+
), T = D9(
|
|
4556
4307
|
L,
|
|
4557
|
-
|
|
4558
|
-
|
|
4559
|
-
|
|
4308
|
+
E,
|
|
4309
|
+
N,
|
|
4310
|
+
S
|
|
4560
4311
|
);
|
|
4561
|
-
this._setTelInputValue(
|
|
4312
|
+
this._setTelInputValue(E), this.ui.telInput.setSelectionRange(T, T);
|
|
4313
|
+
}
|
|
4314
|
+
if (i && a.startsWith("+") && this.selectedCountryData.dialCode) {
|
|
4315
|
+
const N = wd(a, !0, i, this.selectedCountryData);
|
|
4316
|
+
this._setTelInputValue(N);
|
|
4562
4317
|
}
|
|
4563
4318
|
};
|
|
4564
4319
|
this.ui.telInput.addEventListener(
|
|
@@ -4579,11 +4334,11 @@ class w2 {
|
|
|
4579
4334
|
return;
|
|
4580
4335
|
}
|
|
4581
4336
|
if (d) {
|
|
4582
|
-
const l = this._getTelInputValue(), a = !l.startsWith("+") && this.ui.telInput.selectionStart === 0 && o.key === "+", C = this._normaliseNumerals(o.key), _ = /^[0-9]$/.test(C),
|
|
4583
|
-
|
|
4337
|
+
const l = this._getTelInputValue(), a = !l.startsWith("+") && this.ui.telInput.selectionStart === 0 && o.key === "+", C = this._normaliseNumerals(o.key), _ = /^[0-9]$/.test(C), m = e ? _ : a || _, v = this.ui.telInput, N = v.selectionStart, D = v.selectionEnd, L = l.slice(0, N), S = l.slice(D), A = L + o.key + S, E = this._getFullNumber(A), T = w.utils.getCoreNumber(
|
|
4338
|
+
E,
|
|
4584
4339
|
this.selectedCountryData.iso2
|
|
4585
|
-
),
|
|
4586
|
-
(!
|
|
4340
|
+
), G = this.maxCoreNumberLength && T.length > this.maxCoreNumberLength, W = this._getNewCountryFromNumber(E) !== null;
|
|
4341
|
+
(!m || G && !W && !a) && o.preventDefault();
|
|
4587
4342
|
}
|
|
4588
4343
|
}
|
|
4589
4344
|
};
|
|
@@ -4596,24 +4351,24 @@ class w2 {
|
|
|
4596
4351
|
if (this.options.strictMode) {
|
|
4597
4352
|
const d = (e) => {
|
|
4598
4353
|
e.preventDefault();
|
|
4599
|
-
const i = this.ui.telInput, s = i.selectionStart, $ = i.selectionEnd, o = this._getTelInputValue(), l = o.slice(0, s), f = o.slice($), a = this.selectedCountryData.iso2, C = e.clipboardData.getData("text"), _ = this._normaliseNumerals(C),
|
|
4600
|
-
let
|
|
4601
|
-
if (
|
|
4602
|
-
let
|
|
4603
|
-
for (;
|
|
4604
|
-
|
|
4605
|
-
if (!
|
|
4354
|
+
const i = this.ui.telInput, s = i.selectionStart, $ = i.selectionEnd, o = this._getTelInputValue(), l = o.slice(0, s), f = o.slice($), a = this.selectedCountryData.iso2, C = e.clipboardData.getData("text"), _ = this._normaliseNumerals(C), m = s === 0 && $ > 0, v = !o.startsWith("+") || m, N = _.replace(R1.NON_PLUS_NUMERIC_GLOBAL, ""), D = N.startsWith("+"), L = N.replace(/\+/g, ""), S = D && v ? `+${L}` : L;
|
|
4355
|
+
let A = l + S + f;
|
|
4356
|
+
if (A.length > 5) {
|
|
4357
|
+
let T = w.utils.getCoreNumber(A, a);
|
|
4358
|
+
for (; T.length === 0 && A.length > 0; )
|
|
4359
|
+
A = A.slice(0, -1), T = w.utils.getCoreNumber(A, a);
|
|
4360
|
+
if (!T)
|
|
4606
4361
|
return;
|
|
4607
|
-
if (this.maxCoreNumberLength &&
|
|
4362
|
+
if (this.maxCoreNumberLength && T.length > this.maxCoreNumberLength)
|
|
4608
4363
|
if (i.selectionEnd === o.length) {
|
|
4609
|
-
const
|
|
4610
|
-
|
|
4364
|
+
const G = T.length - this.maxCoreNumberLength;
|
|
4365
|
+
A = A.slice(0, A.length - G);
|
|
4611
4366
|
} else
|
|
4612
4367
|
return;
|
|
4613
4368
|
}
|
|
4614
|
-
this._setTelInputValue(
|
|
4615
|
-
const
|
|
4616
|
-
i.setSelectionRange(
|
|
4369
|
+
this._setTelInputValue(A);
|
|
4370
|
+
const E = s + S.length;
|
|
4371
|
+
i.setSelectionRange(E, E), i.dispatchEvent(new InputEvent("input", { bubbles: !0 }));
|
|
4617
4372
|
};
|
|
4618
4373
|
this.ui.telInput.addEventListener("paste", d, {
|
|
4619
4374
|
signal: this.abortController.signal
|
|
@@ -4637,11 +4392,11 @@ class w2 {
|
|
|
4637
4392
|
//* Open the dropdown.
|
|
4638
4393
|
_openDropdown() {
|
|
4639
4394
|
const { fixDropdownWidth: d, countrySearch: e } = this.options;
|
|
4640
|
-
if (this.dropdownAbortController = new AbortController(), d && (this.ui.dropdownContent.style.width = `${this.ui.telInput.offsetWidth}px`), this.ui.dropdownContent.classList.remove(
|
|
4395
|
+
if (this.dropdownAbortController = new AbortController(), d && (this.ui.dropdownContent.style.width = `${this.ui.telInput.offsetWidth}px`), this.ui.dropdownContent.classList.remove(R.HIDE), this.ui.selectedCountry.setAttribute(B.EXPANDED, "true"), this._setDropdownPosition(), e) {
|
|
4641
4396
|
const i = this.ui.countryList.firstElementChild;
|
|
4642
4397
|
i && (this.ui.highlightListItem(i, !1), this.ui.countryList.scrollTop = 0), this.ui.searchInput.focus();
|
|
4643
4398
|
}
|
|
4644
|
-
this._bindDropdownListeners(), this.ui.dropdownArrow.classList.add(
|
|
4399
|
+
this._bindDropdownListeners(), this.ui.dropdownArrow.classList.add(R.ARROW_UP), this._trigger(D0.OPEN_COUNTRY_DROPDOWN);
|
|
4645
4400
|
}
|
|
4646
4401
|
//* Set the dropdown position
|
|
4647
4402
|
_setDropdownPosition() {
|
|
@@ -4667,7 +4422,7 @@ class w2 {
|
|
|
4667
4422
|
const e = (i) => {
|
|
4668
4423
|
var $;
|
|
4669
4424
|
const s = ($ = i.target) == null ? void 0 : $.closest(
|
|
4670
|
-
`.${
|
|
4425
|
+
`.${R.COUNTRY_ITEM}`
|
|
4671
4426
|
);
|
|
4672
4427
|
s && this.ui.highlightListItem(s, !1);
|
|
4673
4428
|
};
|
|
@@ -4684,7 +4439,7 @@ class w2 {
|
|
|
4684
4439
|
const e = (i) => {
|
|
4685
4440
|
var $;
|
|
4686
4441
|
const s = ($ = i.target) == null ? void 0 : $.closest(
|
|
4687
|
-
`.${
|
|
4442
|
+
`.${R.COUNTRY_ITEM}`
|
|
4688
4443
|
);
|
|
4689
4444
|
s && this._selectListItem(s);
|
|
4690
4445
|
};
|
|
@@ -4720,9 +4475,9 @@ class w2 {
|
|
|
4720
4475
|
d1.ARROW_DOWN,
|
|
4721
4476
|
d1.ENTER,
|
|
4722
4477
|
d1.ESC
|
|
4723
|
-
].includes($.key) && ($.preventDefault(), $.stopPropagation(), $.key === d1.ARROW_UP || $.key === d1.ARROW_DOWN ? this._handleUpDownKey($.key) : $.key === d1.ENTER ? this._handleEnterKey() : $.key === d1.ESC && (this._closeDropdown(), this.ui.selectedCountry.focus())), !this.options.countrySearch &&
|
|
4478
|
+
].includes($.key) && ($.preventDefault(), $.stopPropagation(), $.key === d1.ARROW_UP || $.key === d1.ARROW_DOWN ? this._handleUpDownKey($.key) : $.key === d1.ENTER ? this._handleEnterKey() : $.key === d1.ESC && (this._closeDropdown(), this.ui.selectedCountry.focus())), !this.options.countrySearch && R1.HIDDEN_SEARCH_CHAR.test($.key) && ($.stopPropagation(), i && clearTimeout(i), e += $.key.toLowerCase(), this._searchForCountry(e), i = setTimeout(() => {
|
|
4724
4479
|
e = "";
|
|
4725
|
-
},
|
|
4480
|
+
}, h9.HIDDEN_SEARCH_RESET_MS));
|
|
4726
4481
|
};
|
|
4727
4482
|
document.addEventListener("keydown", s, { signal: d });
|
|
4728
4483
|
}
|
|
@@ -4730,7 +4485,7 @@ class w2 {
|
|
|
4730
4485
|
_bindDropdownSearchListeners(d) {
|
|
4731
4486
|
const e = () => {
|
|
4732
4487
|
const o = this.ui.searchInput.value.trim();
|
|
4733
|
-
this._filterCountriesByQuery(o), this.ui.searchInput.value ? this.ui.searchClearButton.classList.remove(
|
|
4488
|
+
this._filterCountriesByQuery(o), this.ui.searchInput.value ? this.ui.searchClearButton.classList.remove(R.HIDE) : this.ui.searchClearButton.classList.add(R.HIDE);
|
|
4734
4489
|
};
|
|
4735
4490
|
let i = null;
|
|
4736
4491
|
const s = () => {
|
|
@@ -4750,7 +4505,7 @@ class w2 {
|
|
|
4750
4505
|
}
|
|
4751
4506
|
//* Hidden search (countrySearch disabled): Find the first list item whose name starts with the query string.
|
|
4752
4507
|
_searchForCountry(d) {
|
|
4753
|
-
const e =
|
|
4508
|
+
const e = y9(this.countries, d);
|
|
4754
4509
|
if (e) {
|
|
4755
4510
|
const i = e.nodeById[this.id];
|
|
4756
4511
|
this.ui.highlightListItem(i, !1), this.ui.scrollTo(i);
|
|
@@ -4759,7 +4514,7 @@ class w2 {
|
|
|
4759
4514
|
//* Country search: Filter the countries according to the search query.
|
|
4760
4515
|
_filterCountriesByQuery(d) {
|
|
4761
4516
|
let e;
|
|
4762
|
-
d === "" ? e = this.countries : e =
|
|
4517
|
+
d === "" ? e = this.countries : e = m9(this.countries, d), this.ui.filterCountries(e);
|
|
4763
4518
|
}
|
|
4764
4519
|
//* Highlight the next/prev item in the list (and ensure it is visible).
|
|
4765
4520
|
_handleUpDownKey(d) {
|
|
@@ -4807,25 +4562,25 @@ class w2 {
|
|
|
4807
4562
|
let i = e ? d.substring(e) : d;
|
|
4808
4563
|
const s = this.selectedCountryData.iso2, $ = this.selectedCountryData.dialCode;
|
|
4809
4564
|
i = this._ensureHasDialCode(i);
|
|
4810
|
-
const o = this._getDialCode(i, !0), l =
|
|
4565
|
+
const o = this._getDialCode(i, !0), l = O0(i);
|
|
4811
4566
|
if (o) {
|
|
4812
|
-
const f =
|
|
4567
|
+
const f = O0(o), a = this.dialCodeToIso2Map[f];
|
|
4813
4568
|
if (a.length === 1)
|
|
4814
4569
|
return a[0] === s ? null : a[0];
|
|
4815
4570
|
if (!s && this.defaultCountry && a.includes(this.defaultCountry))
|
|
4816
4571
|
return this.defaultCountry;
|
|
4817
|
-
if ($ === u3.NANP &&
|
|
4572
|
+
if ($ === u3.NANP && Nd(l))
|
|
4818
4573
|
return null;
|
|
4819
|
-
const { areaCodes: _, priority:
|
|
4574
|
+
const { areaCodes: _, priority: m } = this.selectedCountryData;
|
|
4820
4575
|
if (_) {
|
|
4821
|
-
const
|
|
4822
|
-
(
|
|
4576
|
+
const S = _.map(
|
|
4577
|
+
(A) => `${$}${A}`
|
|
4823
4578
|
);
|
|
4824
|
-
for (const
|
|
4825
|
-
if (l.startsWith(
|
|
4579
|
+
for (const A of S)
|
|
4580
|
+
if (l.startsWith(A))
|
|
4826
4581
|
return null;
|
|
4827
4582
|
}
|
|
4828
|
-
const
|
|
4583
|
+
const N = _ && !(m === 0) && l.length > f.length, D = s && a.includes(s) && !N, L = s === a[0];
|
|
4829
4584
|
if (!D && !L)
|
|
4830
4585
|
return a[0];
|
|
4831
4586
|
} else if (i.startsWith("+") && l.length) {
|
|
@@ -4840,14 +4595,14 @@ class w2 {
|
|
|
4840
4595
|
_setCountry(d) {
|
|
4841
4596
|
const { separateDialCode: e, showFlags: i, i18n: s, allowDropdown: $ } = this.options, o = this.selectedCountryData.iso2 || "";
|
|
4842
4597
|
if ($ && this.ui.updateSelectedItem(d), this.selectedCountryData = d ? this.countryByIso2.get(d) : {}, this.selectedCountryData.iso2 && (this.defaultCountry = this.selectedCountryData.iso2), this.ui.selectedCountry) {
|
|
4843
|
-
const l = d && i ? `${
|
|
4844
|
-
let f, a;
|
|
4598
|
+
const l = d && i ? `${R.FLAG} iti__${d}` : `${R.FLAG} ${R.GLOBE}`;
|
|
4599
|
+
let f, a, C;
|
|
4845
4600
|
if (d) {
|
|
4846
|
-
const { name:
|
|
4847
|
-
a =
|
|
4601
|
+
const { name: _, dialCode: m } = this.selectedCountryData;
|
|
4602
|
+
a = _, f = s.selectedCountryAriaLabel.replace("${countryName}", _).replace("${dialCode}", `+${m}`), C = "";
|
|
4848
4603
|
} else
|
|
4849
|
-
a = s.noCountrySelected, f = s.noCountrySelected;
|
|
4850
|
-
this.ui.selectedCountryInner.className = l, this.ui.selectedCountry.setAttribute("title", a), this.ui.selectedCountry.setAttribute(
|
|
4604
|
+
a = s.noCountrySelected, f = s.noCountrySelected, C = I9();
|
|
4605
|
+
this.ui.selectedCountryInner.className = l, this.ui.selectedCountry.setAttribute("title", a), this.ui.selectedCountry.setAttribute(B.LABEL, f), this.ui.selectedCountryInner.innerHTML = C;
|
|
4851
4606
|
}
|
|
4852
4607
|
if (e) {
|
|
4853
4608
|
const l = this.selectedCountryData.dialCode ? `+${this.selectedCountryData.dialCode}` : "";
|
|
@@ -4857,7 +4612,7 @@ class w2 {
|
|
|
4857
4612
|
}
|
|
4858
4613
|
//* Update the maximum valid number length for the currently selected country.
|
|
4859
4614
|
_updateMaxLength() {
|
|
4860
|
-
const { strictMode: d, placeholderNumberType: e,
|
|
4615
|
+
const { strictMode: d, placeholderNumberType: e, allowedNumberTypes: i } = this.options, { iso2: s } = this.selectedCountryData;
|
|
4861
4616
|
if (d && w.utils)
|
|
4862
4617
|
if (s) {
|
|
4863
4618
|
const $ = w.utils.numberType[e];
|
|
@@ -4898,9 +4653,9 @@ class w2 {
|
|
|
4898
4653
|
}
|
|
4899
4654
|
//* Called when the user selects a list item from the dropdown.
|
|
4900
4655
|
_selectListItem(d) {
|
|
4901
|
-
const e = d.dataset[
|
|
4656
|
+
const e = d.dataset[Id.COUNTRY_CODE], i = this._setCountry(e);
|
|
4902
4657
|
this._closeDropdown();
|
|
4903
|
-
const s = d.dataset[
|
|
4658
|
+
const s = d.dataset[Id.DIAL_CODE];
|
|
4904
4659
|
if (this._updateDialCode(s), this.options.formatOnDisplay) {
|
|
4905
4660
|
const $ = this._getTelInputValue();
|
|
4906
4661
|
this._updateValFromNumber($);
|
|
@@ -4909,7 +4664,7 @@ class w2 {
|
|
|
4909
4664
|
}
|
|
4910
4665
|
//* Close the dropdown and unbind any listeners.
|
|
4911
4666
|
_closeDropdown() {
|
|
4912
|
-
this.ui.dropdownContent.classList.contains(
|
|
4667
|
+
this.ui.dropdownContent.classList.contains(R.HIDE) || (this.ui.dropdownContent.classList.add(R.HIDE), this.ui.selectedCountry.setAttribute(B.EXPANDED, "false"), this.options.countrySearch && (this.ui.searchInput.removeAttribute(B.ACTIVE_DESCENDANT), this.ui.highlightedItem && (this.ui.highlightedItem.classList.remove(R.HIGHLIGHT), this.ui.highlightedItem = null)), this.ui.dropdownArrow.classList.remove(R.ARROW_UP), this.dropdownAbortController.abort(), this.dropdownAbortController = null, this.options.dropdownContainer && this.ui.dropdown.remove(), this._trigger(D0.CLOSE_COUNTRY_DROPDOWN));
|
|
4913
4668
|
}
|
|
4914
4669
|
//* Replace any existing dial code with the new one
|
|
4915
4670
|
//* Note: called from _selectListItem and setCountry
|
|
@@ -4947,12 +4702,12 @@ class w2 {
|
|
|
4947
4702
|
_getFullNumber(d) {
|
|
4948
4703
|
const e = d ? this._normaliseNumerals(d) : this._getTelInputValue(), { dialCode: i } = this.selectedCountryData;
|
|
4949
4704
|
let s;
|
|
4950
|
-
const $ =
|
|
4705
|
+
const $ = O0(e);
|
|
4951
4706
|
return this.options.separateDialCode && !e.startsWith("+") && i && $ ? s = `+${i}` : s = "", s + e;
|
|
4952
4707
|
}
|
|
4953
4708
|
//* Remove the dial code if separateDialCode is enabled also cap the length if the input has a maxlength attribute
|
|
4954
4709
|
_beforeSetNumber(d) {
|
|
4955
|
-
const e = this._getDialCode(d), i =
|
|
4710
|
+
const e = !!this._getDialCode(d), i = wd(
|
|
4956
4711
|
d,
|
|
4957
4712
|
e,
|
|
4958
4713
|
this.options.separateDialCode,
|
|
@@ -4969,7 +4724,7 @@ class w2 {
|
|
|
4969
4724
|
//**************************
|
|
4970
4725
|
//* This is called when the geoip call returns.
|
|
4971
4726
|
handleAutoCountry() {
|
|
4972
|
-
this.options.initialCountry === e2.AUTO && w.autoCountry && (this.defaultCountry = w.autoCountry, this.selectedCountryData.iso2 || this.ui.selectedCountryInner.classList.contains(
|
|
4727
|
+
this.options.initialCountry === e2.AUTO && w.autoCountry && (this.defaultCountry = w.autoCountry, this.selectedCountryData.iso2 || this.ui.selectedCountryInner.classList.contains(R.GLOBE) || this.setCountry(this.defaultCountry), this.resolveAutoCountryPromise());
|
|
4973
4728
|
}
|
|
4974
4729
|
//* This is called when the utils request completes.
|
|
4975
4730
|
handleUtils() {
|
|
@@ -5010,7 +4765,7 @@ class w2 {
|
|
|
5010
4765
|
return w.utils ? w.utils.getNumberType(
|
|
5011
4766
|
this._getFullNumber(),
|
|
5012
4767
|
this.selectedCountryData.iso2
|
|
5013
|
-
) :
|
|
4768
|
+
) : Ed.UNKNOWN_NUMBER_TYPE;
|
|
5014
4769
|
}
|
|
5015
4770
|
//* Get the country data for the currently selected country.
|
|
5016
4771
|
getSelectedCountryData() {
|
|
@@ -5022,7 +4777,7 @@ class w2 {
|
|
|
5022
4777
|
const { iso2: d } = this.selectedCountryData;
|
|
5023
4778
|
return w.utils.getValidationError(this._getFullNumber(), d);
|
|
5024
4779
|
}
|
|
5025
|
-
return
|
|
4780
|
+
return Ed.UNKNOWN_VALIDATION_ERROR;
|
|
5026
4781
|
}
|
|
5027
4782
|
//* Validate the input val using number length only
|
|
5028
4783
|
isValidNumber() {
|
|
@@ -5042,7 +4797,7 @@ class w2 {
|
|
|
5042
4797
|
return w.utils ? w.utils.isPossibleNumber(
|
|
5043
4798
|
d,
|
|
5044
4799
|
this.selectedCountryData.iso2,
|
|
5045
|
-
this.options.
|
|
4800
|
+
this.options.allowedNumberTypes
|
|
5046
4801
|
) : null;
|
|
5047
4802
|
}
|
|
5048
4803
|
//* Shared internal validation logic to handle alpha character extension rules.
|
|
@@ -5051,18 +4806,20 @@ class w2 {
|
|
|
5051
4806
|
return null;
|
|
5052
4807
|
if (!this.selectedCountryData.iso2)
|
|
5053
4808
|
return !1;
|
|
5054
|
-
const e = (
|
|
5055
|
-
if (s
|
|
5056
|
-
|
|
5057
|
-
|
|
4809
|
+
const { allowNumberExtensions: e, allowPhonewords: i } = this.options, s = (f) => d ? this._utilsIsValidNumber(f) : this._utilsIsPossibleNumber(f), $ = this._getFullNumber();
|
|
4810
|
+
if (!s($))
|
|
4811
|
+
return !1;
|
|
4812
|
+
if ($.search(R1.ALPHA_UNICODE) > -1) {
|
|
4813
|
+
const f = this.selectedCountryData.iso2;
|
|
4814
|
+
return w.utils.getExtension($, f) ? e : i;
|
|
5058
4815
|
}
|
|
5059
|
-
return
|
|
4816
|
+
return !0;
|
|
5060
4817
|
}
|
|
5061
4818
|
_utilsIsValidNumber(d) {
|
|
5062
4819
|
return w.utils ? w.utils.isValidNumber(
|
|
5063
4820
|
d,
|
|
5064
4821
|
this.selectedCountryData.iso2,
|
|
5065
|
-
this.options.
|
|
4822
|
+
this.options.allowedNumberTypes
|
|
5066
4823
|
) : null;
|
|
5067
4824
|
}
|
|
5068
4825
|
//* Update the selected country, and update the input val accordingly.
|
|
@@ -5092,7 +4849,7 @@ class w2 {
|
|
|
5092
4849
|
this.ui.telInput.disabled = d, d ? this.ui.selectedCountry.setAttribute("disabled", "true") : this.ui.selectedCountry.removeAttribute("disabled");
|
|
5093
4850
|
}
|
|
5094
4851
|
}
|
|
5095
|
-
const
|
|
4852
|
+
const M9 = (t) => {
|
|
5096
4853
|
if (!w.utils && !w.startedLoadingUtilsScript) {
|
|
5097
4854
|
let d;
|
|
5098
4855
|
if (typeof t == "function")
|
|
@@ -5134,7 +4891,7 @@ const B9 = (t) => {
|
|
|
5134
4891
|
//* Using a static var like this allows us to mock it in the tests.
|
|
5135
4892
|
documentReady: () => document.readyState === "complete",
|
|
5136
4893
|
//* Get the country data object.
|
|
5137
|
-
getCountryData: () =>
|
|
4894
|
+
getCountryData: () => Q1,
|
|
5138
4895
|
//* A getter for the plugin instance.
|
|
5139
4896
|
getInstance: (t) => {
|
|
5140
4897
|
const d = t.dataset.intlTelInputId;
|
|
@@ -5142,10 +4899,10 @@ const B9 = (t) => {
|
|
|
5142
4899
|
},
|
|
5143
4900
|
//* A map from instance ID to instance object.
|
|
5144
4901
|
instances: {},
|
|
5145
|
-
attachUtils:
|
|
4902
|
+
attachUtils: M9,
|
|
5146
4903
|
startedLoadingUtilsScript: !1,
|
|
5147
4904
|
startedLoadingAutoCountry: !1,
|
|
5148
|
-
version: "
|
|
4905
|
+
version: "26.0.0-beta.1"
|
|
5149
4906
|
}
|
|
5150
4907
|
);
|
|
5151
4908
|
(function() {
|
|
@@ -5160,7 +4917,7 @@ const B9 = (t) => {
|
|
|
5160
4917
|
function u() {
|
|
5161
4918
|
}
|
|
5162
4919
|
u.prototype = r.prototype, n.ma = r.prototype, n.prototype = new u(), n.prototype.constructor = n, n.sa = function(c, h, p) {
|
|
5163
|
-
for (var g = Array(arguments.length - 2),
|
|
4920
|
+
for (var g = Array(arguments.length - 2), y = 2; y < arguments.length; y++) g[y - 2] = arguments[y];
|
|
5164
4921
|
return r.prototype[h].apply(c, g);
|
|
5165
4922
|
};
|
|
5166
4923
|
}
|
|
@@ -5212,64 +4969,64 @@ const B9 = (t) => {
|
|
|
5212
4969
|
}
|
|
5213
4970
|
}
|
|
5214
4971
|
new _();
|
|
5215
|
-
function
|
|
4972
|
+
function m(n, r) {
|
|
5216
4973
|
switch (this.g = n, this.l = !!r.aa, this.h = r.i, this.s = r.type, this.o = !1, this.h) {
|
|
5217
4974
|
case D:
|
|
5218
4975
|
case L:
|
|
5219
|
-
case N:
|
|
5220
|
-
case b:
|
|
5221
|
-
case I:
|
|
5222
4976
|
case S:
|
|
4977
|
+
case A:
|
|
4978
|
+
case E:
|
|
4979
|
+
case N:
|
|
5223
4980
|
case v:
|
|
5224
4981
|
this.o = !0;
|
|
5225
4982
|
}
|
|
5226
4983
|
this.j = r.defaultValue;
|
|
5227
4984
|
}
|
|
5228
|
-
var v = 1,
|
|
5229
|
-
function
|
|
4985
|
+
var v = 1, N = 2, D = 3, L = 4, S = 6, A = 16, E = 18;
|
|
4986
|
+
function T(n, r) {
|
|
5230
4987
|
for (this.h = n, this.g = {}, n = 0; n < r.length; n++) {
|
|
5231
4988
|
var u = r[n];
|
|
5232
4989
|
this.g[u.g] = u;
|
|
5233
4990
|
}
|
|
5234
4991
|
}
|
|
5235
|
-
function
|
|
4992
|
+
function G(n) {
|
|
5236
4993
|
return n = i(n.g), n.sort(function(r, u) {
|
|
5237
4994
|
return r.g - u.g;
|
|
5238
4995
|
}), n;
|
|
5239
4996
|
}
|
|
5240
|
-
function
|
|
4997
|
+
function V() {
|
|
5241
4998
|
this.h = {}, this.j = this.m().g, this.g = this.l = null;
|
|
5242
4999
|
}
|
|
5243
|
-
|
|
5244
|
-
return
|
|
5245
|
-
},
|
|
5246
|
-
return
|
|
5247
|
-
},
|
|
5248
|
-
|
|
5249
|
-
},
|
|
5250
|
-
|
|
5000
|
+
V.prototype.has = function(n) {
|
|
5001
|
+
return X(this, n.g);
|
|
5002
|
+
}, V.prototype.get = function(n, r) {
|
|
5003
|
+
return I(this, n.g, r);
|
|
5004
|
+
}, V.prototype.set = function(n, r) {
|
|
5005
|
+
q(this, n.g, r);
|
|
5006
|
+
}, V.prototype.add = function(n, r) {
|
|
5007
|
+
N2(this, n.g, r);
|
|
5251
5008
|
};
|
|
5252
5009
|
function W(n, r) {
|
|
5253
|
-
for (var u =
|
|
5010
|
+
for (var u = G(n.m()), c = 0; c < u.length; c++) {
|
|
5254
5011
|
var h = u[c], p = h.g;
|
|
5255
|
-
if (
|
|
5012
|
+
if (X(r, p)) {
|
|
5256
5013
|
n.g && delete n.g[h.g];
|
|
5257
5014
|
var g = h.h == 11 || h.h == 10;
|
|
5258
5015
|
if (h.l) {
|
|
5259
5016
|
h = Q(r, p);
|
|
5260
|
-
for (var
|
|
5261
|
-
} else h =
|
|
5017
|
+
for (var y = 0; y < h.length; y++) N2(n, p, g ? h[y].clone() : h[y]);
|
|
5018
|
+
} else h = j1(r, p), g ? (g = j1(n, p)) ? W(g, h) : q(n, p, h.clone()) : q(n, p, h);
|
|
5262
5019
|
}
|
|
5263
5020
|
}
|
|
5264
5021
|
}
|
|
5265
|
-
|
|
5022
|
+
V.prototype.clone = function() {
|
|
5266
5023
|
var n = new this.constructor();
|
|
5267
5024
|
return n != this && (n.h = {}, n.g && (n.g = {}), W(n, this)), n;
|
|
5268
5025
|
};
|
|
5269
|
-
function
|
|
5026
|
+
function X(n, r) {
|
|
5270
5027
|
return n.h[r] != null;
|
|
5271
5028
|
}
|
|
5272
|
-
function
|
|
5029
|
+
function j1(n, r) {
|
|
5273
5030
|
var u = n.h[r];
|
|
5274
5031
|
if (u == null) return null;
|
|
5275
5032
|
if (n.l) {
|
|
@@ -5285,12 +5042,12 @@ const B9 = (t) => {
|
|
|
5285
5042
|
}
|
|
5286
5043
|
return u;
|
|
5287
5044
|
}
|
|
5288
|
-
function
|
|
5289
|
-
var c =
|
|
5045
|
+
function I(n, r, u) {
|
|
5046
|
+
var c = j1(n, r);
|
|
5290
5047
|
return n.j[r].l ? c[u || 0] : c;
|
|
5291
5048
|
}
|
|
5292
|
-
function
|
|
5293
|
-
if (
|
|
5049
|
+
function M(n, r) {
|
|
5050
|
+
if (X(n, r)) n = I(n, r);
|
|
5294
5051
|
else d: {
|
|
5295
5052
|
if (n = n.j[r], n.j === void 0) if (r = n.s, r === Boolean) n.j = !1;
|
|
5296
5053
|
else if (r === Number) n.j = 0;
|
|
@@ -5304,36 +5061,36 @@ const B9 = (t) => {
|
|
|
5304
5061
|
return n;
|
|
5305
5062
|
}
|
|
5306
5063
|
function Q(n, r) {
|
|
5307
|
-
return
|
|
5064
|
+
return j1(n, r) || [];
|
|
5308
5065
|
}
|
|
5309
5066
|
function w1(n, r) {
|
|
5310
|
-
return n.j[r].l ?
|
|
5067
|
+
return n.j[r].l ? X(n, r) ? n.h[r].length : 0 : X(n, r) ? 1 : 0;
|
|
5311
5068
|
}
|
|
5312
|
-
function
|
|
5069
|
+
function q(n, r, u) {
|
|
5313
5070
|
n.h[r] = u, n.g && (n.g[r] = u);
|
|
5314
5071
|
}
|
|
5315
|
-
function
|
|
5072
|
+
function N2(n, r, u) {
|
|
5316
5073
|
n.h[r] || (n.h[r] = []), n.h[r].push(u), n.g && delete n.g[r];
|
|
5317
5074
|
}
|
|
5318
5075
|
function y0(n, r) {
|
|
5319
5076
|
var u = [], c;
|
|
5320
|
-
for (c in r) c != 0 && u.push(new
|
|
5321
|
-
return new
|
|
5077
|
+
for (c in r) c != 0 && u.push(new m(c, r[c]));
|
|
5078
|
+
return new T(n, u);
|
|
5322
5079
|
}
|
|
5323
5080
|
function v0() {
|
|
5324
5081
|
}
|
|
5325
5082
|
v0.prototype.g = function(n) {
|
|
5326
5083
|
throw new n.h(), Error("Unimplemented");
|
|
5327
5084
|
}, v0.prototype.h = function(n, r) {
|
|
5328
|
-
if (n.h == 11 || n.h == 10) return r instanceof
|
|
5329
|
-
if (n.h == 14) return typeof r == "string" &&
|
|
5085
|
+
if (n.h == 11 || n.h == 10) return r instanceof V ? r : this.g(n.s.prototype.m(), r);
|
|
5086
|
+
if (n.h == 14) return typeof r == "string" && S2.test(r) && (n = Number(r), 0 < n) ? n : r;
|
|
5330
5087
|
if (!n.o) return r;
|
|
5331
5088
|
if (n = n.s, n === String) {
|
|
5332
5089
|
if (typeof r == "number") return String(r);
|
|
5333
|
-
} else if (n === Number && typeof r == "string" && (r === "Infinity" || r === "-Infinity" || r === "NaN" ||
|
|
5090
|
+
} else if (n === Number && typeof r == "string" && (r === "Infinity" || r === "-Infinity" || r === "NaN" || S2.test(r))) return Number(r);
|
|
5334
5091
|
return r;
|
|
5335
5092
|
};
|
|
5336
|
-
var
|
|
5093
|
+
var S2 = /^-?[0-9]+$/;
|
|
5337
5094
|
function W0() {
|
|
5338
5095
|
}
|
|
5339
5096
|
e(W0, v0), W0.prototype.g = function(n, r) {
|
|
@@ -5362,47 +5119,47 @@ const B9 = (t) => {
|
|
|
5362
5119
|
return this.h;
|
|
5363
5120
|
};
|
|
5364
5121
|
function D1() {
|
|
5365
|
-
|
|
5366
|
-
}
|
|
5367
|
-
e(D1, H);
|
|
5368
|
-
var b2 = null;
|
|
5369
|
-
function V() {
|
|
5370
|
-
H.call(this);
|
|
5122
|
+
V.call(this);
|
|
5371
5123
|
}
|
|
5372
|
-
e(
|
|
5124
|
+
e(D1, V);
|
|
5373
5125
|
var A2 = null;
|
|
5374
|
-
function
|
|
5375
|
-
|
|
5126
|
+
function k() {
|
|
5127
|
+
V.call(this);
|
|
5376
5128
|
}
|
|
5377
|
-
e(
|
|
5129
|
+
e(k, V);
|
|
5378
5130
|
var T2 = null;
|
|
5131
|
+
function P1() {
|
|
5132
|
+
V.call(this);
|
|
5133
|
+
}
|
|
5134
|
+
e(P1, V);
|
|
5135
|
+
var b2 = null;
|
|
5379
5136
|
D1.prototype.m = function() {
|
|
5380
|
-
var n = b2;
|
|
5381
|
-
return n || (b2 = n = y0(D1, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), n;
|
|
5382
|
-
}, D1.m = D1.prototype.m, V.prototype.m = function() {
|
|
5383
5137
|
var n = A2;
|
|
5384
|
-
return n || (A2 = n = y0(
|
|
5385
|
-
},
|
|
5138
|
+
return n || (A2 = n = y0(D1, { 0: { name: "NumberFormat", ia: "i18n.phonenumbers.NumberFormat" }, 1: { name: "pattern", required: !0, i: 9, type: String }, 2: { name: "format", required: !0, i: 9, type: String }, 3: { name: "leading_digits_pattern", aa: !0, i: 9, type: String }, 4: { name: "national_prefix_formatting_rule", i: 9, type: String }, 6: { name: "national_prefix_optional_when_formatting", i: 8, defaultValue: !1, type: Boolean }, 5: { name: "domestic_carrier_code_formatting_rule", i: 9, type: String } })), n;
|
|
5139
|
+
}, D1.m = D1.prototype.m, k.prototype.m = function() {
|
|
5386
5140
|
var n = T2;
|
|
5387
|
-
return n || (T2 = n = y0(
|
|
5141
|
+
return n || (T2 = n = y0(k, { 0: { name: "PhoneNumberDesc", ia: "i18n.phonenumbers.PhoneNumberDesc" }, 2: { name: "national_number_pattern", i: 9, type: String }, 9: { name: "possible_length", aa: !0, i: 5, type: Number }, 10: { name: "possible_length_local_only", aa: !0, i: 5, type: Number }, 6: { name: "example_number", i: 9, type: String } })), n;
|
|
5142
|
+
}, k.m = k.prototype.m, P1.prototype.m = function() {
|
|
5143
|
+
var n = b2;
|
|
5144
|
+
return n || (b2 = n = y0(P1, {
|
|
5388
5145
|
0: { name: "PhoneMetadata", ia: "i18n.phonenumbers.PhoneMetadata" },
|
|
5389
|
-
1: { name: "general_desc", i: 11, type:
|
|
5390
|
-
2: { name: "fixed_line", i: 11, type:
|
|
5391
|
-
3: { name: "mobile", i: 11, type:
|
|
5392
|
-
4: { name: "toll_free", i: 11, type:
|
|
5393
|
-
5: { name: "premium_rate", i: 11, type:
|
|
5394
|
-
6: { name: "shared_cost", i: 11, type:
|
|
5395
|
-
7: { name: "personal_number", i: 11, type:
|
|
5396
|
-
8: { name: "voip", i: 11, type:
|
|
5397
|
-
21: { name: "pager", i: 11, type:
|
|
5398
|
-
25: { name: "uan", i: 11, type:
|
|
5399
|
-
27: { name: "emergency", i: 11, type:
|
|
5400
|
-
28: { name: "voicemail", i: 11, type:
|
|
5401
|
-
29: { name: "short_code", i: 11, type:
|
|
5402
|
-
30: { name: "standard_rate", i: 11, type:
|
|
5403
|
-
31: { name: "carrier_specific", i: 11, type:
|
|
5404
|
-
33: { name: "sms_services", i: 11, type:
|
|
5405
|
-
24: { name: "no_international_dialling", i: 11, type:
|
|
5146
|
+
1: { name: "general_desc", i: 11, type: k },
|
|
5147
|
+
2: { name: "fixed_line", i: 11, type: k },
|
|
5148
|
+
3: { name: "mobile", i: 11, type: k },
|
|
5149
|
+
4: { name: "toll_free", i: 11, type: k },
|
|
5150
|
+
5: { name: "premium_rate", i: 11, type: k },
|
|
5151
|
+
6: { name: "shared_cost", i: 11, type: k },
|
|
5152
|
+
7: { name: "personal_number", i: 11, type: k },
|
|
5153
|
+
8: { name: "voip", i: 11, type: k },
|
|
5154
|
+
21: { name: "pager", i: 11, type: k },
|
|
5155
|
+
25: { name: "uan", i: 11, type: k },
|
|
5156
|
+
27: { name: "emergency", i: 11, type: k },
|
|
5157
|
+
28: { name: "voicemail", i: 11, type: k },
|
|
5158
|
+
29: { name: "short_code", i: 11, type: k },
|
|
5159
|
+
30: { name: "standard_rate", i: 11, type: k },
|
|
5160
|
+
31: { name: "carrier_specific", i: 11, type: k },
|
|
5161
|
+
33: { name: "sms_services", i: 11, type: k },
|
|
5162
|
+
24: { name: "no_international_dialling", i: 11, type: k },
|
|
5406
5163
|
9: { name: "id", required: !0, i: 9, type: String },
|
|
5407
5164
|
10: { name: "country_code", i: 5, type: Number },
|
|
5408
5165
|
11: { name: "international_prefix", i: 9, type: String },
|
|
@@ -5422,19 +5179,19 @@ const B9 = (t) => {
|
|
|
5422
5179
|
23: { name: "leading_digits", i: 9, type: String }
|
|
5423
5180
|
})), n;
|
|
5424
5181
|
}, P1.m = P1.prototype.m;
|
|
5425
|
-
function
|
|
5426
|
-
|
|
5182
|
+
function N1() {
|
|
5183
|
+
V.call(this);
|
|
5427
5184
|
}
|
|
5428
|
-
e(
|
|
5185
|
+
e(N1, V);
|
|
5429
5186
|
var L2 = null, c3 = { ra: 0, qa: 1, pa: 5, oa: 10, na: 20 };
|
|
5430
|
-
|
|
5187
|
+
N1.prototype.m = function() {
|
|
5431
5188
|
var n = L2;
|
|
5432
|
-
return n || (L2 = n = y0(
|
|
5189
|
+
return n || (L2 = n = y0(N1, { 0: { name: "PhoneNumber", ia: "i18n.phonenumbers.PhoneNumber" }, 1: { name: "country_code", required: !0, i: 5, type: Number }, 2: { name: "national_number", required: !0, i: 4, type: Number }, 3: { name: "extension", i: 9, type: String }, 4: { name: "italian_leading_zero", i: 8, type: Boolean }, 8: { name: "number_of_leading_zeros", i: 5, defaultValue: 1, type: Number }, 5: { name: "raw_input", i: 9, type: String }, 6: { name: "country_code_source", i: 14, defaultValue: 0, type: c3 }, 7: {
|
|
5433
5190
|
name: "preferred_domestic_carrier_code",
|
|
5434
5191
|
i: 9,
|
|
5435
5192
|
type: String
|
|
5436
5193
|
} })), n;
|
|
5437
|
-
},
|
|
5194
|
+
}, N1.ctor = N1, N1.ctor.m = N1.prototype.m;
|
|
5438
5195
|
var $0 = {
|
|
5439
5196
|
1: "US AG AI AS BB BM BS CA DM DO GD GU JM KN KY LC MP MS PR SX TC TT VC VG VI".split(" "),
|
|
5440
5197
|
7: ["RU", "KZ"],
|
|
@@ -10734,11 +10491,11 @@ const B9 = (t) => {
|
|
|
10734
10491
|
], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 888, , , , , , , , 1, [[, "(\\d{3})(\\d{3})(\\d{5})", "$1 $2 $3"]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , "\\d{11}", , , , "12345678901"], , , [, , , , , , , , , [-1]]],
|
|
10735
10492
|
979: [, [, , "[1359]\\d{8}", , , , , , , [9], [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , "[1359]\\d{8}", , , , "123456789", , , , [8]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], "001", 979, , , , , , , , 1, [[, "(\\d)(\\d{4})(\\d{4})", "$1 $2 $3", ["[1359]"]]], , [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]], [, , , , , , , , , [-1]], , , [, , , , , , , , , [-1]]]
|
|
10736
10493
|
};
|
|
10737
|
-
function
|
|
10494
|
+
function J() {
|
|
10738
10495
|
this.g = {};
|
|
10739
10496
|
}
|
|
10740
|
-
|
|
10741
|
-
return
|
|
10497
|
+
J.h = void 0, J.g = function() {
|
|
10498
|
+
return J.h ? J.h : J.h = new J();
|
|
10742
10499
|
};
|
|
10743
10500
|
var K0 = { 0: "0", 1: "1", 2: "2", 3: "3", 4: "4", 5: "5", 6: "6", 7: "7", 8: "8", 9: "9", "0": "0", "1": "1", "2": "2", "3": "3", "4": "4", "5": "5", "6": "6", "7": "7", "8": "8", "9": "9", "٠": "0", "١": "1", "٢": "2", "٣": "3", "٤": "4", "٥": "5", "٦": "6", "٧": "7", "٨": "8", "٩": "9", "۰": "0", "۱": "1", "۲": "2", "۳": "3", "۴": "4", "۵": "5", "۶": "6", "۷": "7", "۸": "8", "۹": "9" }, h3 = {
|
|
10744
10501
|
0: "0",
|
|
@@ -10821,74 +10578,74 @@ const B9 = (t) => {
|
|
|
10821
10578
|
X: "9",
|
|
10822
10579
|
Y: "9",
|
|
10823
10580
|
Z: "9"
|
|
10824
|
-
}, g3 = RegExp("[++]+"), o0 = RegExp("^[++]+"), P2 = RegExp("([0-90-9٠-٩۰-۹])"), C3 = RegExp("[++0-90-9٠-٩۰-۹]"), _3 = /[\\\/] *x/, m3 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), y3 = /(?:.*?[A-Za-z]){3}.*/, v3 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"),
|
|
10825
|
-
function
|
|
10581
|
+
}, g3 = RegExp("[++]+"), o0 = RegExp("^[++]+"), P2 = RegExp("([0-90-9٠-٩۰-۹])"), C3 = RegExp("[++0-90-9٠-٩۰-۹]"), _3 = /[\\\/] *x/, m3 = RegExp("[^0-90-9٠-٩۰-۹A-Za-z#]+$"), y3 = /(?:.*?[A-Za-z]){3}.*/, v3 = RegExp("^\\+([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*[0-90-9٠-٩۰-۹]([0-90-9٠-٩۰-۹]|[\\-\\.\\(\\)]?)*$"), E3 = RegExp("^([A-Za-z0-90-9٠-٩۰-۹]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.)*[A-Za-z]+((\\-)*[A-Za-z0-90-9٠-٩۰-۹])*\\.?$");
|
|
10582
|
+
function Y1(n) {
|
|
10826
10583
|
return "([0-90-9٠-٩۰-۹]{1," + n + "})";
|
|
10827
10584
|
}
|
|
10828
|
-
function
|
|
10829
|
-
return ";ext=" +
|
|
10830
|
-
}
|
|
10831
|
-
var M2 = new RegExp("(?:" + R2() + ")$", "i"), E3 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + R2() + ")?$", "i"), w3 = /(\$\d)/, S3 = /^\(?\$1\)?$/;
|
|
10832
|
-
function O2(n) {
|
|
10833
|
-
return 2 > n.length ? !1 : y1(E3, n);
|
|
10585
|
+
function O2() {
|
|
10586
|
+
return ";ext=" + Y1("20") + "|[ \\t,]*(?:e?xt(?:ensi(?:ó?|ó))?n?|e?xtn?|доб|anexo)[:\\..]?[ \\t,-]*" + (Y1("20") + "#?|[ \\t,]*(?:[xx##~~]|int|int)[:\\..]?[ \\t,-]*") + (Y1("9") + "#?|[- ]+") + (Y1("6") + "#|[ \\t]*(?:,{2}|;)[:\\..]?[ \\t,-]*") + (Y1("15") + "#?|[ \\t]*(?:,)+[:\\..]?[ \\t,-]*") + (Y1("9") + "#?");
|
|
10834
10587
|
}
|
|
10835
|
-
|
|
10836
|
-
|
|
10588
|
+
var R2 = new RegExp("(?:" + O2() + ")$", "i"), I3 = new RegExp("^[0-90-9٠-٩۰-۹]{2}$|^[++]*(?:[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*]*[0-90-9٠-٩۰-۹]){3,}[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~*A-Za-z0-90-9٠-٩۰-۹]*(?:" + O2() + ")?$", "i"), w3 = /(\$\d)/, N3 = /^\(?\$1\)?$/;
|
|
10589
|
+
function M2(n) {
|
|
10590
|
+
return 2 > n.length ? !1 : y1(I3, n);
|
|
10837
10591
|
}
|
|
10838
10592
|
function x2(n) {
|
|
10839
|
-
|
|
10840
|
-
r1(n), n.g(r);
|
|
10593
|
+
return y1(y3, n) ? E0(n, p3) : E0(n, K0);
|
|
10841
10594
|
}
|
|
10842
10595
|
function U2(n) {
|
|
10596
|
+
var r = x2(n.toString());
|
|
10597
|
+
r1(n), n.g(r);
|
|
10598
|
+
}
|
|
10599
|
+
function B2(n) {
|
|
10843
10600
|
return n != null && (w1(n, 9) != 1 || Q(n, 9)[0] != -1);
|
|
10844
10601
|
}
|
|
10845
|
-
function
|
|
10602
|
+
function E0(n, r) {
|
|
10846
10603
|
for (var u = new j(), c, h = n.length, p = 0; p < h; ++p) c = n.charAt(p), c = r[c.toUpperCase()], c != null && u.g(c);
|
|
10847
10604
|
return u.toString();
|
|
10848
10605
|
}
|
|
10849
|
-
function
|
|
10850
|
-
return n.length == 0 ||
|
|
10606
|
+
function F2(n) {
|
|
10607
|
+
return n.length == 0 || N3.test(n);
|
|
10851
10608
|
}
|
|
10852
|
-
function
|
|
10609
|
+
function I0(n) {
|
|
10853
10610
|
return n != null && isNaN(n) && n.toUpperCase() in D2;
|
|
10854
10611
|
}
|
|
10855
|
-
|
|
10856
|
-
if (
|
|
10857
|
-
var u =
|
|
10612
|
+
J.prototype.format = function(n, r) {
|
|
10613
|
+
if (I(n, 2) == 0 && X(n, 5)) {
|
|
10614
|
+
var u = M(n, 5);
|
|
10858
10615
|
if (0 < u.length) return u;
|
|
10859
10616
|
}
|
|
10860
|
-
u =
|
|
10617
|
+
u = M(n, 1);
|
|
10861
10618
|
var c = l0(n);
|
|
10862
|
-
if (r == 0) return
|
|
10619
|
+
if (r == 0) return H2(u, 0, c, "");
|
|
10863
10620
|
if (!(u in $0)) return c;
|
|
10864
10621
|
var h = u0(this, u, a0(u));
|
|
10865
|
-
n =
|
|
10622
|
+
n = X(n, 3) && I(n, 3).length != 0 ? r == 3 ? ";ext=" + I(n, 3) : X(h, 13) ? I(h, 13) + M(n, 3) : " ext. " + M(n, 3) : "";
|
|
10866
10623
|
d: {
|
|
10867
10624
|
h = Q(h, 20).length == 0 || r == 2 ? Q(h, 19) : Q(h, 20);
|
|
10868
|
-
for (var p, g = h.length,
|
|
10869
|
-
p = h[
|
|
10870
|
-
var
|
|
10871
|
-
if ((
|
|
10625
|
+
for (var p, g = h.length, y = 0; y < g; ++y) {
|
|
10626
|
+
p = h[y];
|
|
10627
|
+
var b = w1(p, 3);
|
|
10628
|
+
if ((b == 0 || c.search(I(p, 3, b - 1)) == 0) && (b = new RegExp(I(p, 1)), y1(b, c))) {
|
|
10872
10629
|
h = p;
|
|
10873
10630
|
break d;
|
|
10874
10631
|
}
|
|
10875
10632
|
}
|
|
10876
10633
|
h = null;
|
|
10877
10634
|
}
|
|
10878
|
-
return h != null && (g = h, h =
|
|
10635
|
+
return h != null && (g = h, h = M(g, 2), p = new RegExp(I(g, 1)), M(
|
|
10879
10636
|
g,
|
|
10880
10637
|
5
|
|
10881
|
-
), g =
|
|
10638
|
+
), g = M(g, 4), c = r == 2 && g != null && 0 < g.length ? c.replace(p, h.replace(w3, g)) : c.replace(p, h), r == 3 && (c = c.replace(RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+"), ""), c = c.replace(RegExp("[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]+", "g"), "-"))), H2(u, r, c, n);
|
|
10882
10639
|
};
|
|
10883
10640
|
function u0(n, r, u) {
|
|
10884
|
-
return u == "001" ?
|
|
10641
|
+
return u == "001" ? S1(n, "" + r) : S1(n, u);
|
|
10885
10642
|
}
|
|
10886
10643
|
function l0(n) {
|
|
10887
|
-
if (!
|
|
10888
|
-
var r = "" +
|
|
10889
|
-
return
|
|
10644
|
+
if (!X(n, 2)) return "";
|
|
10645
|
+
var r = "" + I(n, 2);
|
|
10646
|
+
return X(n, 4) && I(n, 4) && 0 < M(n, 8) ? Array(M(n, 8) + 1).join("0") + r : r;
|
|
10890
10647
|
}
|
|
10891
|
-
function
|
|
10648
|
+
function H2(n, r, u, c) {
|
|
10892
10649
|
switch (r) {
|
|
10893
10650
|
case 0:
|
|
10894
10651
|
return "+" + n + u + c;
|
|
@@ -10903,38 +10660,38 @@ const B9 = (t) => {
|
|
|
10903
10660
|
function w0(n, r) {
|
|
10904
10661
|
switch (r) {
|
|
10905
10662
|
case 4:
|
|
10906
|
-
return
|
|
10663
|
+
return I(n, 5);
|
|
10907
10664
|
case 3:
|
|
10908
|
-
return
|
|
10665
|
+
return I(n, 4);
|
|
10909
10666
|
case 1:
|
|
10910
|
-
return
|
|
10667
|
+
return I(n, 3);
|
|
10911
10668
|
case 0:
|
|
10912
10669
|
case 2:
|
|
10913
|
-
return
|
|
10670
|
+
return I(n, 2);
|
|
10914
10671
|
case 5:
|
|
10915
|
-
return
|
|
10672
|
+
return I(n, 6);
|
|
10916
10673
|
case 6:
|
|
10917
|
-
return
|
|
10674
|
+
return I(n, 8);
|
|
10918
10675
|
case 7:
|
|
10919
|
-
return
|
|
10676
|
+
return I(n, 7);
|
|
10920
10677
|
case 8:
|
|
10921
|
-
return
|
|
10678
|
+
return I(n, 21);
|
|
10922
10679
|
case 9:
|
|
10923
|
-
return
|
|
10680
|
+
return I(n, 25);
|
|
10924
10681
|
case 10:
|
|
10925
|
-
return
|
|
10682
|
+
return I(n, 28);
|
|
10926
10683
|
default:
|
|
10927
|
-
return
|
|
10684
|
+
return I(n, 1);
|
|
10928
10685
|
}
|
|
10929
10686
|
}
|
|
10930
|
-
function
|
|
10931
|
-
var u =
|
|
10932
|
-
return n = u0(n,
|
|
10687
|
+
function G2(n, r) {
|
|
10688
|
+
var u = V2(n, r);
|
|
10689
|
+
return n = u0(n, M(r, 1), u), n == null ? -1 : (r = l0(r), j0(r, n));
|
|
10933
10690
|
}
|
|
10934
10691
|
function j0(n, r) {
|
|
10935
|
-
return u1(n,
|
|
10692
|
+
return u1(n, I(r, 1)) ? u1(n, I(r, 5)) ? 4 : u1(n, I(r, 4)) ? 3 : u1(n, I(r, 6)) ? 5 : u1(n, I(r, 8)) ? 6 : u1(n, I(r, 7)) ? 7 : u1(n, I(r, 21)) ? 8 : u1(n, I(r, 25)) ? 9 : u1(n, I(r, 28)) ? 10 : u1(n, I(r, 2)) ? I(r, 18) || u1(n, I(r, 3)) ? 2 : 0 : !I(r, 18) && u1(n, I(r, 3)) ? 1 : -1 : -1;
|
|
10936
10693
|
}
|
|
10937
|
-
function
|
|
10694
|
+
function S1(n, r) {
|
|
10938
10695
|
if (r == null) return null;
|
|
10939
10696
|
r = r.toUpperCase();
|
|
10940
10697
|
var u = n.g[r];
|
|
@@ -10946,24 +10703,24 @@ const B9 = (t) => {
|
|
|
10946
10703
|
}
|
|
10947
10704
|
function u1(n, r) {
|
|
10948
10705
|
var u = n.length;
|
|
10949
|
-
return 0 < w1(r, 9) && Q(r, 9).indexOf(u) == -1 ? !1 : y1(
|
|
10706
|
+
return 0 < w1(r, 9) && Q(r, 9).indexOf(u) == -1 ? !1 : y1(M(r, 2), n);
|
|
10950
10707
|
}
|
|
10951
|
-
function
|
|
10952
|
-
var u =
|
|
10953
|
-
return h == null || u != "001" && c !=
|
|
10708
|
+
function S3(n, r) {
|
|
10709
|
+
var u = V2(n, r), c = M(r, 1), h = u0(n, c, u);
|
|
10710
|
+
return h == null || u != "001" && c != k2(n, u) ? h = !1 : (n = l0(r), h = j0(n, h) != -1), h;
|
|
10954
10711
|
}
|
|
10955
|
-
function
|
|
10712
|
+
function V2(n, r) {
|
|
10956
10713
|
if (r == null) return null;
|
|
10957
|
-
var u =
|
|
10714
|
+
var u = M(r, 1);
|
|
10958
10715
|
if (u = $0[u], u == null) n = null;
|
|
10959
10716
|
else if (u.length == 1) n = u[0];
|
|
10960
10717
|
else d: {
|
|
10961
10718
|
r = l0(r);
|
|
10962
10719
|
for (var c, h = u.length, p = 0; p < h; p++) {
|
|
10963
10720
|
c = u[p];
|
|
10964
|
-
var g =
|
|
10965
|
-
if (
|
|
10966
|
-
if (r.search(
|
|
10721
|
+
var g = S1(n, c);
|
|
10722
|
+
if (X(g, 23)) {
|
|
10723
|
+
if (r.search(I(g, 23)) == 0) {
|
|
10967
10724
|
n = c;
|
|
10968
10725
|
break d;
|
|
10969
10726
|
}
|
|
@@ -10979,19 +10736,19 @@ const B9 = (t) => {
|
|
|
10979
10736
|
function a0(n) {
|
|
10980
10737
|
return n = $0[n], n == null ? "ZZ" : n[0];
|
|
10981
10738
|
}
|
|
10982
|
-
function
|
|
10983
|
-
if (n =
|
|
10984
|
-
return
|
|
10739
|
+
function k2(n, r) {
|
|
10740
|
+
if (n = S1(n, r), n == null) throw Error("Invalid region code: " + r);
|
|
10741
|
+
return M(n, 10);
|
|
10985
10742
|
}
|
|
10986
|
-
function
|
|
10987
|
-
var h = w0(u, c), p = w1(h, 9) == 0 ? Q(
|
|
10988
|
-
if (h = Q(h, 10), c == 2) if (
|
|
10989
|
-
else return
|
|
10743
|
+
function N0(n, r, u, c) {
|
|
10744
|
+
var h = w0(u, c), p = w1(h, 9) == 0 ? Q(I(u, 1), 9) : Q(h, 9);
|
|
10745
|
+
if (h = Q(h, 10), c == 2) if (B2(w0(u, 0))) n = w0(u, 1), B2(n) && (p = p.concat(w1(n, 9) == 0 ? Q(I(u, 1), 9) : Q(n, 9)), p.sort(), h.length == 0 ? h = Q(n, 10) : (h = h.concat(Q(n, 10)), h.sort()));
|
|
10746
|
+
else return N0(n, r, u, 1);
|
|
10990
10747
|
return p[0] == -1 ? 5 : (r = r.length, -1 < h.indexOf(r) ? 4 : (u = p[0], u == r ? 0 : u > r ? 2 : p[p.length - 1] < r ? 3 : -1 < p.indexOf(r, 1) ? 0 : 5));
|
|
10991
10748
|
}
|
|
10992
|
-
function
|
|
10749
|
+
function S0(n, r, u) {
|
|
10993
10750
|
var c = l0(r);
|
|
10994
|
-
return r =
|
|
10751
|
+
return r = M(r, 1), r in $0 ? (r = u0(n, r, a0(r)), N0(n, c, r, u)) : 1;
|
|
10995
10752
|
}
|
|
10996
10753
|
function W2(n, r) {
|
|
10997
10754
|
if (n = n.toString(), n.length == 0 || n.charAt(0) == "0") return 0;
|
|
@@ -11002,38 +10759,38 @@ const B9 = (t) => {
|
|
|
11002
10759
|
if (r.length == 0) return 0;
|
|
11003
10760
|
r = new j(r);
|
|
11004
10761
|
var g;
|
|
11005
|
-
u != null && (g =
|
|
11006
|
-
var
|
|
11007
|
-
if (
|
|
11008
|
-
else if (o0.test(
|
|
10762
|
+
u != null && (g = I(u, 11)), g == null && (g = "NonMatch");
|
|
10763
|
+
var y = r.toString();
|
|
10764
|
+
if (y.length == 0) g = 20;
|
|
10765
|
+
else if (o0.test(y)) y = y.replace(o0, ""), r1(r), r.g(x2(y)), g = 1;
|
|
11009
10766
|
else {
|
|
11010
|
-
if (
|
|
11011
|
-
|
|
11012
|
-
var
|
|
11013
|
-
|
|
10767
|
+
if (y = new RegExp(g), U2(r), g = r.toString(), g.search(y) == 0) {
|
|
10768
|
+
y = g.match(y)[0].length;
|
|
10769
|
+
var b = g.substring(y).match(P2);
|
|
10770
|
+
b && b[1] != null && 0 < b[1].length && E0(b[1], K0) == "0" ? g = !1 : (r1(r), r.g(g.substring(y)), g = !0);
|
|
11014
10771
|
} else g = !1;
|
|
11015
10772
|
g = g ? 5 : 20;
|
|
11016
10773
|
}
|
|
11017
|
-
if (h &&
|
|
10774
|
+
if (h && q(p, 6, g), g != 20) {
|
|
11018
10775
|
if (2 >= r.h.length) throw Error("Phone number too short after IDD");
|
|
11019
|
-
if (n = W2(r, c), n != 0) return
|
|
10776
|
+
if (n = W2(r, c), n != 0) return q(p, 1, n), n;
|
|
11020
10777
|
throw Error("Invalid country calling code");
|
|
11021
10778
|
}
|
|
11022
|
-
return u != null && (g =
|
|
10779
|
+
return u != null && (g = M(u, 10), y = "" + g, b = r.toString(), b.lastIndexOf(y, 0) == 0 && (y = new j(b.substring(y.length)), b = I(u, 1), b = new RegExp(M(b, 2)), j2(y, u, null), y = y.toString(), !y1(b, r.toString()) && y1(b, y) || N0(n, r.toString(), u, -1) == 3)) ? (c.g(y), h && q(p, 6, 10), q(p, 1, g), g) : (q(p, 1, 0), 0);
|
|
11023
10780
|
}
|
|
11024
10781
|
function j2(n, r, u) {
|
|
11025
|
-
var c = n.toString(), h = c.length, p =
|
|
10782
|
+
var c = n.toString(), h = c.length, p = I(r, 15);
|
|
11026
10783
|
if (h != 0 && p != null && p.length != 0) {
|
|
11027
10784
|
var g = new RegExp("^(?:" + p + ")");
|
|
11028
10785
|
if (h = g.exec(c)) {
|
|
11029
|
-
p = new RegExp(
|
|
11030
|
-
var
|
|
11031
|
-
r =
|
|
10786
|
+
p = new RegExp(M(I(r, 1), 2));
|
|
10787
|
+
var y = y1(p, c), b = h.length - 1;
|
|
10788
|
+
r = I(r, 16), r == null || r.length == 0 || h[b] == null || h[b].length == 0 ? (!y || y1(p, c.substring(h[0].length))) && (u != null && 0 < b && h[b] != null && u.g(h[1]), n.set(c.substring(h[0].length))) : (c = c.replace(g, r), (!y || y1(p, c)) && (u != null && 0 < b && u.g(h[1]), n.set(c)));
|
|
11032
10789
|
}
|
|
11033
10790
|
}
|
|
11034
10791
|
}
|
|
11035
|
-
function
|
|
11036
|
-
if (!
|
|
10792
|
+
function O1(n, r, u) {
|
|
10793
|
+
if (!I0(u) && 0 < r.length && r.charAt(0) != "+") throw Error("Invalid country calling code");
|
|
11037
10794
|
return Y2(n, r, u, !0);
|
|
11038
10795
|
}
|
|
11039
10796
|
function Y2(n, r, u, c) {
|
|
@@ -11046,74 +10803,74 @@ const B9 = (t) => {
|
|
|
11046
10803
|
var g = r.indexOf(";", p);
|
|
11047
10804
|
p = g !== -1 ? r.substring(p, g) : r.substring(p);
|
|
11048
10805
|
}
|
|
11049
|
-
var
|
|
11050
|
-
if (
|
|
11051
|
-
if (p = h.toString(), !(
|
|
11052
|
-
p = new
|
|
10806
|
+
var y = p;
|
|
10807
|
+
if (y == null ? g = !0 : y.length === 0 ? g = !1 : (g = v3.exec(y), y = E3.exec(y), g = g !== null || y !== null), !g || (p != null ? (p.charAt(0) === "+" && h.g(p), p = r.indexOf("tel:"), h.g(r.substring(0 <= p ? p + 4 : 0, r.indexOf(";phone-context=")))) : (p = h.g, g = r ?? "", y = g.search(C3), 0 <= y ? (g = g.substring(y), g = g.replace(m3, ""), y = g.search(_3), 0 <= y && (g = g.substring(0, y))) : g = "", p.call(h, g)), p = h.toString(), g = p.indexOf(";isub="), 0 < g && (r1(h), h.g(p.substring(0, g))), !M2(h.toString()))) throw Error("The string supplied did not seem to be a phone number");
|
|
10808
|
+
if (p = h.toString(), !(I0(u) || p != null && 0 < p.length && o0.test(p))) throw Error("Invalid country calling code");
|
|
10809
|
+
p = new N1(), c && q(p, 5, r);
|
|
11053
10810
|
d: {
|
|
11054
|
-
if (r = h.toString(), g = r.search(
|
|
11055
|
-
|
|
11056
|
-
for (var
|
|
11057
|
-
r1(h), h.g(r.substring(0, g)), r =
|
|
10811
|
+
if (r = h.toString(), g = r.search(R2), 0 <= g && M2(r.substring(0, g))) {
|
|
10812
|
+
y = r.match(R2);
|
|
10813
|
+
for (var b = y.length, v1 = 1; v1 < b; ++v1) if (y[v1] != null && 0 < y[v1].length) {
|
|
10814
|
+
r1(h), h.g(r.substring(0, g)), r = y[v1];
|
|
11058
10815
|
break d;
|
|
11059
10816
|
}
|
|
11060
10817
|
}
|
|
11061
10818
|
r = "";
|
|
11062
10819
|
}
|
|
11063
|
-
0 < r.length &&
|
|
10820
|
+
0 < r.length && q(p, 3, r), g = S1(n, u), r = new j(), y = 0, b = h.toString();
|
|
11064
10821
|
try {
|
|
11065
|
-
|
|
11066
|
-
} catch (
|
|
11067
|
-
if (
|
|
11068
|
-
if (
|
|
11069
|
-
} else throw
|
|
10822
|
+
y = K2(n, b, g, r, c, p);
|
|
10823
|
+
} catch (z0) {
|
|
10824
|
+
if (z0.message == "Invalid country calling code" && o0.test(b)) {
|
|
10825
|
+
if (b = b.replace(o0, ""), y = K2(n, b, g, r, c, p), y == 0) throw z0;
|
|
10826
|
+
} else throw z0;
|
|
11070
10827
|
}
|
|
11071
|
-
if (
|
|
10828
|
+
if (y != 0 ? (h = a0(y), h != u && (g = u0(n, y, h))) : (U2(h), r.g(h.toString()), u != null ? (y = M(g, 10), q(
|
|
11072
10829
|
p,
|
|
11073
10830
|
1,
|
|
11074
|
-
|
|
11075
|
-
)) : c && (delete p.h[6], p.g && delete p.g[6])), 2 > r.h.length || (g != null && (u = new j(), h = new j(r.toString()), j2(h, g, u), n =
|
|
10831
|
+
y
|
|
10832
|
+
)) : c && (delete p.h[6], p.g && delete p.g[6])), 2 > r.h.length || (g != null && (u = new j(), h = new j(r.toString()), j2(h, g, u), n = N0(n, h.toString(), g, -1), n != 2 && n != 4 && n != 5 && (r = h, c && 0 < u.toString().length && q(p, 7, u.toString()))), c = r.toString(), n = c.length, 2 > n)) throw Error("The string supplied is too short to be a phone number");
|
|
11076
10833
|
if (17 < n) throw Error("The string supplied is too long to be a phone number");
|
|
11077
10834
|
if (1 < c.length && c.charAt(0) == "0") {
|
|
11078
|
-
for (
|
|
11079
|
-
n != 1 &&
|
|
10835
|
+
for (q(p, 4, !0), n = 1; n < c.length - 1 && c.charAt(n) == "0"; ) n++;
|
|
10836
|
+
n != 1 && q(p, 8, n);
|
|
11080
10837
|
}
|
|
11081
|
-
return
|
|
10838
|
+
return q(p, 2, parseInt(c, 10)), p;
|
|
11082
10839
|
}
|
|
11083
10840
|
function y1(n, r) {
|
|
11084
10841
|
return !!((n = r.match(new RegExp("^(?:" + (typeof n == "string" ? n : n.source) + ")$", "i"))) && n[0].length == r.length);
|
|
11085
10842
|
}
|
|
11086
|
-
function
|
|
11087
|
-
this.fa = RegExp(" "), this.ja = "", this.v = new j(), this.da = "", this.s = new j(), this.ba = new j(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga =
|
|
10843
|
+
function A3(n) {
|
|
10844
|
+
this.fa = RegExp(" "), this.ja = "", this.v = new j(), this.da = "", this.s = new j(), this.ba = new j(), this.u = !0, this.ea = this.ca = this.la = !1, this.ga = J.g(), this.$ = 0, this.h = new j(), this.ha = !1, this.o = "", this.g = new j(), this.j = [], this.ka = n, this.l = X2(this, this.ka);
|
|
11088
10845
|
}
|
|
11089
|
-
var
|
|
11090
|
-
|
|
11091
|
-
var
|
|
11092
|
-
function
|
|
10846
|
+
var Z2 = new P1();
|
|
10847
|
+
q(Z2, 11, "NA");
|
|
10848
|
+
var T3 = RegExp("^[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*\\$1[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*(\\$\\d[-x‐-―−ー--/ ()()[].\\[\\]/~⁓∼~]*)*$"), z2 = /[- ]/;
|
|
10849
|
+
function X2(n, r) {
|
|
11093
10850
|
var u = n.ga;
|
|
11094
|
-
return r =
|
|
10851
|
+
return r = I0(r) ? k2(u, r) : 0, n = S1(n.ga, a0(r)), n ?? Z2;
|
|
11095
10852
|
}
|
|
11096
|
-
function
|
|
10853
|
+
function q2(n) {
|
|
11097
10854
|
for (var r = n.j.length, u = 0; u < r; ++u) {
|
|
11098
|
-
var c = n.j[u], h =
|
|
10855
|
+
var c = n.j[u], h = M(c, 1);
|
|
11099
10856
|
if (n.da == h) return !1;
|
|
11100
|
-
var p = n, g = c,
|
|
10857
|
+
var p = n, g = c, y = M(g, 1);
|
|
11101
10858
|
r1(p.v);
|
|
11102
|
-
var
|
|
11103
|
-
g =
|
|
11104
|
-
var v1 = "999999999999999".match(
|
|
11105
|
-
if (v1.length <
|
|
10859
|
+
var b = p;
|
|
10860
|
+
g = M(g, 2);
|
|
10861
|
+
var v1 = "999999999999999".match(y)[0];
|
|
10862
|
+
if (v1.length < b.g.h.length ? b = "" : (b = v1.replace(new RegExp(y, "g"), g), b = b.replace(RegExp("9", "g"), " ")), 0 < b.length ? (p.v.g(b), p = !0) : p = !1, p) return n.da = h, n.ha = z2.test(I(c, 4)), n.$ = 0, !0;
|
|
11106
10863
|
}
|
|
11107
10864
|
return n.u = !1;
|
|
11108
10865
|
}
|
|
11109
|
-
function
|
|
10866
|
+
function J2(n, r) {
|
|
11110
10867
|
for (var u = [], c = r.length - 3, h = n.j.length, p = 0; p < h; ++p) {
|
|
11111
10868
|
var g = n.j[p];
|
|
11112
|
-
w1(g, 3) == 0 ? u.push(n.j[p]) : (g =
|
|
10869
|
+
w1(g, 3) == 0 ? u.push(n.j[p]) : (g = I(g, 3, Math.min(c, w1(g, 3) - 1)), r.search(g) == 0 && u.push(n.j[p]));
|
|
11113
10870
|
}
|
|
11114
10871
|
n.j = u;
|
|
11115
10872
|
}
|
|
11116
|
-
function
|
|
10873
|
+
function b3(n, r) {
|
|
11117
10874
|
n.s.g(r);
|
|
11118
10875
|
var u = r;
|
|
11119
10876
|
if (P2.test(u) || n.s.h.length == 1 && g3.test(u) ? (r == "+" ? (u = r, n.ba.g(r)) : (u = K0[r], n.ba.g(u), n.g.g(u)), r = u) : (n.u = !1, n.la = !0), !n.u) {
|
|
@@ -11133,7 +10890,7 @@ const B9 = (t) => {
|
|
|
11133
10890
|
if (nd(n)) n.ea = !0;
|
|
11134
10891
|
else return n.o = ed(n), Y0(n);
|
|
11135
10892
|
default:
|
|
11136
|
-
return n.ea ? (id(n) && (n.ea = !1), n.h.toString() + n.g.toString()) : 0 < n.j.length ? (r = rd(n, r), u = dd(n), 0 < u.length ? u : (
|
|
10893
|
+
return n.ea ? (id(n) && (n.ea = !1), n.h.toString() + n.g.toString()) : 0 < n.j.length ? (r = rd(n, r), u = dd(n), 0 < u.length ? u : (J2(n, n.g.toString()), q2(n) ? td(n) : n.u ? A0(n, r) : n.s.toString())) : Y0(n);
|
|
11137
10894
|
}
|
|
11138
10895
|
}
|
|
11139
10896
|
function Q2(n) {
|
|
@@ -11141,12 +10898,12 @@ const B9 = (t) => {
|
|
|
11141
10898
|
}
|
|
11142
10899
|
function dd(n) {
|
|
11143
10900
|
for (var r = n.g.toString(), u = n.j.length, c = 0; c < u; ++c) {
|
|
11144
|
-
var h = n.j[c], p =
|
|
11145
|
-
if (new RegExp("^(?:" + p + ")$").test(r) && (n.ha =
|
|
10901
|
+
var h = n.j[c], p = M(h, 1);
|
|
10902
|
+
if (new RegExp("^(?:" + p + ")$").test(r) && (n.ha = z2.test(I(h, 4)), h = r.replace(new RegExp(p, "g"), I(h, 2)), h = A0(n, h), E0(h, h3) == n.ba)) return h;
|
|
11146
10903
|
}
|
|
11147
10904
|
return "";
|
|
11148
10905
|
}
|
|
11149
|
-
function
|
|
10906
|
+
function A0(n, r) {
|
|
11150
10907
|
var u = n.h.h.length;
|
|
11151
10908
|
return n.ha && 0 < u && n.h.toString().charAt(u - 1) != " " ? n.h + " " + r : n.h + r;
|
|
11152
10909
|
}
|
|
@@ -11155,34 +10912,34 @@ const B9 = (t) => {
|
|
|
11155
10912
|
if (3 <= r.length) {
|
|
11156
10913
|
for (var u = n.ca && n.o.length == 0 && 0 < w1(n.l, 20) ? Q(n.l, 20) : Q(n.l, 19), c = u.length, h = 0; h < c; ++h) {
|
|
11157
10914
|
var p = u[h];
|
|
11158
|
-
0 < n.o.length &&
|
|
10915
|
+
0 < n.o.length && F2(M(p, 4)) && !I(p, 6) && !X(p, 5) || (n.o.length != 0 || n.ca || F2(M(p, 4)) || I(p, 6)) && T3.test(M(p, 2)) && n.j.push(p);
|
|
11159
10916
|
}
|
|
11160
|
-
return
|
|
10917
|
+
return J2(n, r), r = dd(n), 0 < r.length ? r : q2(n) ? td(n) : n.s.toString();
|
|
11161
10918
|
}
|
|
11162
|
-
return
|
|
10919
|
+
return A0(n, r);
|
|
11163
10920
|
}
|
|
11164
10921
|
function td(n) {
|
|
11165
10922
|
var r = n.g.toString(), u = r.length;
|
|
11166
10923
|
if (0 < u) {
|
|
11167
10924
|
for (var c = "", h = 0; h < u; h++) c = rd(n, r.charAt(h));
|
|
11168
|
-
return n.u ?
|
|
10925
|
+
return n.u ? A0(n, c) : n.s.toString();
|
|
11169
10926
|
}
|
|
11170
10927
|
return n.h.toString();
|
|
11171
10928
|
}
|
|
11172
10929
|
function ed(n) {
|
|
11173
10930
|
var r = n.g.toString(), u = 0;
|
|
11174
|
-
if (
|
|
10931
|
+
if (I(n.l, 10) != 1) var c = !1;
|
|
11175
10932
|
else c = n.g.toString(), c = c.charAt(0) == "1" && c.charAt(1) != "0" && c.charAt(1) != "1";
|
|
11176
|
-
return c ? (u = 1, n.h.g("1").g(" "), n.ca = !0) :
|
|
10933
|
+
return c ? (u = 1, n.h.g("1").g(" "), n.ca = !0) : X(n.l, 15) && (c = new RegExp("^(?:" + I(n.l, 15) + ")"), c = r.match(c), c != null && c[0] != null && 0 < c[0].length && (n.ca = !0, u = c[0].length, n.h.g(r.substring(0, u)))), r1(n.g), n.g.g(r.substring(u)), r.substring(0, u);
|
|
11177
10934
|
}
|
|
11178
10935
|
function nd(n) {
|
|
11179
|
-
var r = n.ba.toString(), u = new RegExp("^(?:\\+|" +
|
|
10936
|
+
var r = n.ba.toString(), u = new RegExp("^(?:\\+|" + I(n.l, 11) + ")");
|
|
11180
10937
|
return u = r.match(u), u != null && u[0] != null && 0 < u[0].length ? (n.ca = !0, u = u[0].length, r1(n.g), n.g.g(r.substring(u)), r1(n.h), n.h.g(r.substring(0, u)), r.charAt(0) != "+" && n.h.g(" "), !0) : !1;
|
|
11181
10938
|
}
|
|
11182
10939
|
function id(n) {
|
|
11183
10940
|
if (n.g.h.length == 0) return !1;
|
|
11184
10941
|
var r = new j(), u = W2(n.g, r);
|
|
11185
|
-
return u == 0 ? !1 : (r1(n.g), n.g.g(r.toString()), r = a0(u), r == "001" ? n.l =
|
|
10942
|
+
return u == 0 ? !1 : (r1(n.g), n.g.g(r.toString()), r = a0(u), r == "001" ? n.l = S1(n.ga, "" + u) : r != n.ka && (n.l = X2(n, r)), n.h.g("" + u).g(" "), n.o = "", !0);
|
|
11186
10943
|
}
|
|
11187
10944
|
function rd(n, r) {
|
|
11188
10945
|
var u = n.v.toString();
|
|
@@ -11195,72 +10952,72 @@ const B9 = (t) => {
|
|
|
11195
10952
|
const sd = (n) => {
|
|
11196
10953
|
const r = [];
|
|
11197
10954
|
return n.includes("FIXED_LINE_OR_MOBILE") ? (n.includes("MOBILE") || r.push("MOBILE"), n.includes("FIXED_LINE") || r.push("FIXED_LINE")) : (n.includes("MOBILE") || n.includes("FIXED_LINE")) && r.push("FIXED_LINE_OR_MOBILE"), n.concat(r);
|
|
11198
|
-
},
|
|
10955
|
+
}, Z0 = { FIXED_LINE: 0, MOBILE: 1, FIXED_LINE_OR_MOBILE: 2, TOLL_FREE: 3, PREMIUM_RATE: 4, SHARED_COST: 5, VOIP: 6, PERSONAL_NUMBER: 7, PAGER: 8, UAN: 9, VOICEMAIL: 10, UNKNOWN: -1 };
|
|
11199
10956
|
d("intlTelInputUtilsTemp", {}), d("intlTelInputUtilsTemp.formatNumberAsYouType", (n, r) => {
|
|
11200
10957
|
try {
|
|
11201
|
-
const u = n.replace(/[^+0-9]/g, ""), c = new
|
|
10958
|
+
const u = n.replace(/[^+0-9]/g, ""), c = new A3(r);
|
|
11202
10959
|
r = "";
|
|
11203
|
-
for (let h = 0; h < u.length; h++) c.ja =
|
|
10960
|
+
for (let h = 0; h < u.length; h++) c.ja = b3(c, u.charAt(h)), r = c.ja;
|
|
11204
10961
|
return r;
|
|
11205
10962
|
} catch {
|
|
11206
10963
|
return n;
|
|
11207
10964
|
}
|
|
11208
10965
|
}), d("intlTelInputUtilsTemp.formatNumber", (n, r, u) => {
|
|
11209
10966
|
try {
|
|
11210
|
-
const h =
|
|
11211
|
-
var c =
|
|
10967
|
+
const h = J.g(), p = O1(h, n, r);
|
|
10968
|
+
var c = S0(h, p, -1);
|
|
11212
10969
|
return c == 0 || c == 4 ? h.format(p, typeof u > "u" ? 0 : u) : n;
|
|
11213
10970
|
} catch {
|
|
11214
10971
|
return n;
|
|
11215
10972
|
}
|
|
11216
10973
|
}), d("intlTelInputUtilsTemp.getExampleNumber", (n, r, u, c) => {
|
|
11217
10974
|
try {
|
|
11218
|
-
const
|
|
10975
|
+
const b = J.g();
|
|
11219
10976
|
d: {
|
|
11220
|
-
var h =
|
|
11221
|
-
if (
|
|
11222
|
-
var p = w0(
|
|
10977
|
+
var h = b;
|
|
10978
|
+
if (I0(n)) {
|
|
10979
|
+
var p = w0(S1(h, n), u);
|
|
11223
10980
|
try {
|
|
11224
|
-
if (
|
|
11225
|
-
var g =
|
|
10981
|
+
if (X(p, 6)) {
|
|
10982
|
+
var g = I(p, 6), y = Y2(h, g, n, !1);
|
|
11226
10983
|
break d;
|
|
11227
10984
|
}
|
|
11228
10985
|
} catch {
|
|
11229
10986
|
}
|
|
11230
10987
|
}
|
|
11231
|
-
|
|
10988
|
+
y = null;
|
|
11232
10989
|
}
|
|
11233
|
-
return
|
|
10990
|
+
return b.format(y, c ? 0 : r ? 2 : 1);
|
|
11234
10991
|
} catch {
|
|
11235
10992
|
return "";
|
|
11236
10993
|
}
|
|
11237
10994
|
}), d("intlTelInputUtilsTemp.getExtension", (n, r) => {
|
|
11238
10995
|
try {
|
|
11239
|
-
return
|
|
10996
|
+
return I(O1(J.g(), n, r), 3);
|
|
11240
10997
|
} catch {
|
|
11241
10998
|
return "";
|
|
11242
10999
|
}
|
|
11243
11000
|
}), d("intlTelInputUtilsTemp.getNumberType", (n, r) => {
|
|
11244
11001
|
try {
|
|
11245
|
-
const u =
|
|
11246
|
-
return
|
|
11002
|
+
const u = J.g(), c = O1(u, n, r);
|
|
11003
|
+
return G2(u, c);
|
|
11247
11004
|
} catch {
|
|
11248
11005
|
return -99;
|
|
11249
11006
|
}
|
|
11250
11007
|
}), d("intlTelInputUtilsTemp.getValidationError", (n, r) => {
|
|
11251
11008
|
if (!r) return 1;
|
|
11252
11009
|
try {
|
|
11253
|
-
const u =
|
|
11254
|
-
return
|
|
11010
|
+
const u = J.g(), c = O1(u, n, r);
|
|
11011
|
+
return S0(u, c, -1);
|
|
11255
11012
|
} catch (u) {
|
|
11256
11013
|
return u.message === "Invalid country calling code" ? 1 : 3 >= n.length || u.message === "Phone number too short after IDD" || u.message === "The string supplied is too short to be a phone number" ? 2 : u.message === "The string supplied is too long to be a phone number" ? 3 : -99;
|
|
11257
11014
|
}
|
|
11258
11015
|
}), d("intlTelInputUtilsTemp.isValidNumber", (n, r, u) => {
|
|
11259
11016
|
try {
|
|
11260
|
-
const c =
|
|
11017
|
+
const c = J.g(), h = O1(c, n, r), p = S3(c, h);
|
|
11261
11018
|
if (u) {
|
|
11262
|
-
const g = sd(u).map((
|
|
11263
|
-
return p && g.includes(
|
|
11019
|
+
const g = sd(u).map((y) => Z0[y]);
|
|
11020
|
+
return p && g.includes(G2(c, h));
|
|
11264
11021
|
}
|
|
11265
11022
|
return p;
|
|
11266
11023
|
} catch {
|
|
@@ -11268,59 +11025,59 @@ const B9 = (t) => {
|
|
|
11268
11025
|
}
|
|
11269
11026
|
}), d("intlTelInputUtilsTemp.isPossibleNumber", (n, r, u) => {
|
|
11270
11027
|
try {
|
|
11271
|
-
const c =
|
|
11028
|
+
const c = J.g(), h = O1(c, n, r);
|
|
11272
11029
|
if (u) {
|
|
11273
11030
|
const p = sd(u);
|
|
11274
|
-
for (let g of p) if (
|
|
11031
|
+
for (let g of p) if (S0(c, h, Z0[g]) === 0) return !0;
|
|
11275
11032
|
return !1;
|
|
11276
11033
|
}
|
|
11277
|
-
return
|
|
11034
|
+
return S0(c, h, -1) === 0;
|
|
11278
11035
|
} catch {
|
|
11279
11036
|
return !1;
|
|
11280
11037
|
}
|
|
11281
11038
|
}), d("intlTelInputUtilsTemp.getCoreNumber", (n, r) => {
|
|
11282
11039
|
try {
|
|
11283
|
-
return
|
|
11040
|
+
return I(O1(J.g(), n, r), 2).toString();
|
|
11284
11041
|
} catch {
|
|
11285
11042
|
return "";
|
|
11286
11043
|
}
|
|
11287
|
-
}), d("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), d("intlTelInputUtilsTemp.numberType",
|
|
11044
|
+
}), d("intlTelInputUtilsTemp.numberFormat", { E164: 0, INTERNATIONAL: 1, NATIONAL: 2, RFC3966: 3 }), d("intlTelInputUtilsTemp.numberType", Z0), d("intlTelInputUtilsTemp.validationError", { IS_POSSIBLE: 0, INVALID_COUNTRY_CODE: 1, TOO_SHORT: 2, TOO_LONG: 3, IS_POSSIBLE_LOCAL_ONLY: 4, INVALID_LENGTH: 5 });
|
|
11288
11045
|
})();
|
|
11289
11046
|
const f3 = typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : void 0, x9 = f3.intlTelInputUtilsTemp;
|
|
11290
11047
|
delete f3.intlTelInputUtilsTemp;
|
|
11291
11048
|
w.utils = x9;
|
|
11292
11049
|
var U9 = /* @__PURE__ */ Y4("<input/>");
|
|
11293
|
-
function
|
|
11050
|
+
function G9(t, d) {
|
|
11294
11051
|
l4(d, !0);
|
|
11295
11052
|
let e = L0(d, "disabled", 3, !1), i = L0(d, "inputProps", 19, () => ({})), s = L0(d, "options", 19, () => ({})), $ = L0(d, "value", 3, ""), o = /* @__PURE__ */ a1(void 0), l = /* @__PURE__ */ a1(void 0), f = /* @__PURE__ */ a1(null), a = /* @__PURE__ */ a1(!1);
|
|
11296
|
-
const C = () =>
|
|
11297
|
-
var
|
|
11298
|
-
const
|
|
11299
|
-
|
|
11300
|
-
},
|
|
11301
|
-
var
|
|
11302
|
-
(
|
|
11053
|
+
const C = () => O(l) ? s().strictMode ? O(l).isValidNumberPrecise() : O(l).isValidNumber() : null, _ = () => {
|
|
11054
|
+
var E, T;
|
|
11055
|
+
const A = C();
|
|
11056
|
+
O(f) !== A && ($1(f, A, !0), (E = d.onChangeValidity) == null || E.call(d, !!A), (T = d.onChangeErrorCode) == null || T.call(d, A ? null : O(l).getValidationError()));
|
|
11057
|
+
}, m = () => {
|
|
11058
|
+
var A, E;
|
|
11059
|
+
(E = d.onChangeNumber) == null || E.call(d, ((A = O(l)) == null ? void 0 : A.getNumber()) ?? ""), _();
|
|
11303
11060
|
}, v = () => {
|
|
11304
|
-
var
|
|
11305
|
-
(
|
|
11061
|
+
var A, E;
|
|
11062
|
+
(E = d.onChangeCountry) == null || E.call(d, ((A = O(l)) == null ? void 0 : A.getSelectedCountryData().iso2) ?? ""), m();
|
|
11306
11063
|
};
|
|
11307
11064
|
P3(() => {
|
|
11308
|
-
|
|
11309
|
-
}),
|
|
11310
|
-
var
|
|
11311
|
-
|
|
11065
|
+
O(o) && ($1(l, w(O(o), s()), !0), O(o).addEventListener("countrychange", v), $() && O(l).setNumber($()), e() && O(l).setDisabled(e()), $1(f, C(), !0), $1(a, !0));
|
|
11066
|
+
}), O3(() => {
|
|
11067
|
+
var A;
|
|
11068
|
+
O(o) && O(o).removeEventListener("countrychange", v), (A = O(l)) == null || A.destroy();
|
|
11312
11069
|
}), D4(() => {
|
|
11313
|
-
|
|
11070
|
+
O(a) && O(l) && O(l).setDisabled(e());
|
|
11314
11071
|
});
|
|
11315
|
-
function
|
|
11316
|
-
return
|
|
11072
|
+
function N() {
|
|
11073
|
+
return O(l);
|
|
11317
11074
|
}
|
|
11318
11075
|
function D() {
|
|
11319
|
-
return
|
|
11076
|
+
return O(o);
|
|
11320
11077
|
}
|
|
11321
|
-
var L = { getInstance:
|
|
11322
|
-
return l9(
|
|
11078
|
+
var L = { getInstance: N, getInput: D }, S = U9();
|
|
11079
|
+
return l9(S, () => ({ type: "tel", oninput: m, ...i() }), void 0, void 0, void 0, void 0, !0), a9(S, (A) => $1(o, A), () => O(o)), Z4(t, S), a4(L);
|
|
11323
11080
|
}
|
|
11324
11081
|
export {
|
|
11325
|
-
|
|
11082
|
+
G9 as default
|
|
11326
11083
|
};
|