UNPKG

@taiga-ui/kit

Version:
833 lines 52.4 kB
(function (global, factory) {
    typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@taiga-ui/cdk'), require('@taiga-ui/core'), require('@taiga-ui/kit/components/arrow'), require('@taiga-ui/kit/components/input-phone'), require('@taiga-ui/kit/providers'), require('@angular/common'), require('@tinkoff/ng-polymorpheus')) :
    typeof define === 'function' && define.amd ? define('@taiga-ui/kit/components/input-phone-international', ['exports', '@angular/core', '@angular/forms', '@taiga-ui/cdk', '@taiga-ui/core', '@taiga-ui/kit/components/arrow', '@taiga-ui/kit/components/input-phone', '@taiga-ui/kit/providers', '@angular/common', '@tinkoff/ng-polymorpheus'], factory) :
    (global = global || self, factory((global['taiga-ui'] = global['taiga-ui'] || {}, global['taiga-ui'].kit = global['taiga-ui'].kit || {}, global['taiga-ui'].kit.components = global['taiga-ui'].kit.components || {}, global['taiga-ui'].kit.components['input-phone-international'] = {}), global.ng.core, global.ng.forms, global.cdk, global.core$1, global['taiga-ui'].kit.components.arrow, global['taiga-ui'].kit.components['input-phone'], global['taiga-ui'].kit.providers, global.ng.common, global.ngPolymorpheus));
}(this, (function (exports, core, forms, cdk, core$1, arrow, inputPhone, providers, common, ngPolymorpheus) { 'use strict';

    /*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */
    /* global Reflect, Promise */

    var extendStatics = function(d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };

    function __extends(d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    }

    var __assign = function() {
        __assign = Object.assign || function __assign(t) {
            for (var s, i = 1, n = arguments.length; i < n; i++) {
                s = arguments[i];
                for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
            }
            return t;
        };
        return __assign.apply(this, arguments);
    };

    function __rest(s, e) {
        var t = {};
        for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
            t[p] = s[p];
        if (s != null && typeof Object.getOwnPropertySymbols === "function")
            for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
                if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                    t[p[i]] = s[p[i]];
            }
        return t;
    }

    function __decorate(decorators, target, key, desc) {
        var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
        if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
        else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }

    function __param(paramIndex, decorator) {
        return function (target, key) { decorator(target, key, paramIndex); }
    }

    function __metadata(metadataKey, metadataValue) {
        if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
    }

    function __awaiter(thisArg, _arguments, P, generator) {
        function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
        return new (P || (P = Promise))(function (resolve, reject) {
            function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
            function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
            function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
            step((generator = generator.apply(thisArg, _arguments || [])).next());
        });
    }

    function __generator(thisArg, body) {
        var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
        return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
        function verb(n) { return function (v) { return step([n, v]); }; }
        function step(op) {
            if (f) throw new TypeError("Generator is already executing.");
            while (_) try {
                if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
                if (y = 0, t) op = [op[0] & 2, t.value];
                switch (op[0]) {
                    case 0: case 1: t = op; break;
                    case 4: _.label++; return { value: op[1], done: false };
                    case 5: _.label++; y = op[1]; op = [0]; continue;
                    case 7: op = _.ops.pop(); _.trys.pop(); continue;
                    default:
                        if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
                        if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
                        if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
                        if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
                        if (t[2]) _.ops.pop();
                        _.trys.pop(); continue;
                }
                op = body.call(thisArg, _);
            } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
            if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
        }
    }

    function __createBinding(o, m, k, k2) {
        if (k2 === undefined) k2 = k;
        o[k2] = m[k];
    }

    function __exportStar(m, exports) {
        for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
    }

    function __values(o) {
        var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
        if (m) return m.call(o);
        if (o && typeof o.length === "number") return {
            next: function () {
                if (o && i >= o.length) o = void 0;
                return { value: o && o[i++], done: !o };
            }
        };
        throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
    }

    function __read(o, n) {
        var m = typeof Symbol === "function" && o[Symbol.iterator];
        if (!m) return o;
        var i = m.call(o), r, ar = [], e;
        try {
            while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
        }
        catch (error) { e = { error: error }; }
        finally {
            try {
                if (r && !r.done && (m = i["return"])) m.call(i);
            }
            finally { if (e) throw e.error; }
        }
        return ar;
    }

    function __spread() {
        for (var ar = [], i = 0; i < arguments.length; i++)
            ar = ar.concat(__read(arguments[i]));
        return ar;
    }

    function __spreadArrays() {
        for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
        for (var r = Array(s), k = 0, i = 0; i < il; i++)
            for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
                r[k] = a[j];
        return r;
    };

    function __await(v) {
        return this instanceof __await ? (this.v = v, this) : new __await(v);
    }

    function __asyncGenerator(thisArg, _arguments, generator) {
        if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
        var g = generator.apply(thisArg, _arguments || []), i, q = [];
        return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
        function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
        function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
        function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
        function fulfill(value) { resume("next", value); }
        function reject(value) { resume("throw", value); }
        function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
    }

    function __asyncDelegator(o) {
        var i, p;
        return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
        function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
    }

    function __asyncValues(o) {
        if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
        var m = o[Symbol.asyncIterator], i;
        return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
        function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
        function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
    }

    function __makeTemplateObject(cooked, raw) {
        if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
        return cooked;
    };

    function __importStar(mod) {
        if (mod && mod.__esModule) return mod;
        var result = {};
        if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
        result.default = mod;
        return result;
    }

    function __importDefault(mod) {
        return (mod && mod.__esModule) ? mod : { default: mod };
    }

    function __classPrivateFieldGet(receiver, privateMap) {
        if (!privateMap.has(receiver)) {
            throw new TypeError("attempted to get private field on non-instance");
        }
        return privateMap.get(receiver);
    }

    function __classPrivateFieldSet(receiver, privateMap, value) {
        if (!privateMap.has(receiver)) {
            throw new TypeError("attempted to set private field on non-instance");
        }
        privateMap.set(receiver, value);
        return value;
    }

    (function (TuiCountryIsoCode) {
        TuiCountryIsoCode["AD"] = "AD";
        TuiCountryIsoCode["AE"] = "AE";
        TuiCountryIsoCode["AF"] = "AF";
        TuiCountryIsoCode["AG"] = "AG";
        TuiCountryIsoCode["AI"] = "AI";
        TuiCountryIsoCode["AL"] = "AL";
        TuiCountryIsoCode["AM"] = "AM";
        TuiCountryIsoCode["AN"] = "AN";
        TuiCountryIsoCode["AO"] = "AO";
        TuiCountryIsoCode["AR"] = "AR";
        TuiCountryIsoCode["AT"] = "AT";
        TuiCountryIsoCode["AU"] = "AU";
        TuiCountryIsoCode["AW"] = "AW";
        TuiCountryIsoCode["AZ"] = "AZ";
        TuiCountryIsoCode["BA"] = "BA";
        TuiCountryIsoCode["BB"] = "BB";
        TuiCountryIsoCode["BD"] = "BD";
        TuiCountryIsoCode["BE"] = "BE";
        TuiCountryIsoCode["BF"] = "BF";
        TuiCountryIsoCode["BG"] = "BG";
        TuiCountryIsoCode["BH"] = "BH";
        TuiCountryIsoCode["BI"] = "BI";
        TuiCountryIsoCode["BJ"] = "BJ";
        TuiCountryIsoCode["BM"] = "BM";
        TuiCountryIsoCode["BN"] = "BN";
        TuiCountryIsoCode["BO"] = "BO";
        TuiCountryIsoCode["BR"] = "BR";
        TuiCountryIsoCode["BS"] = "BS";
        TuiCountryIsoCode["BT"] = "BT";
        TuiCountryIsoCode["BW"] = "BW";
        TuiCountryIsoCode["BY"] = "BY";
        TuiCountryIsoCode["BZ"] = "BZ";
        TuiCountryIsoCode["CD"] = "CD";
        TuiCountryIsoCode["CF"] = "CF";
        TuiCountryIsoCode["CG"] = "CG";
        TuiCountryIsoCode["CH"] = "CH";
        TuiCountryIsoCode["CI"] = "CI";
        TuiCountryIsoCode["CL"] = "CL";
        TuiCountryIsoCode["CM"] = "CM";
        TuiCountryIsoCode["CN"] = "CN";
        TuiCountryIsoCode["CO"] = "CO";
        TuiCountryIsoCode["CR"] = "CR";
        TuiCountryIsoCode["CU"] = "CU";
        TuiCountryIsoCode["CV"] = "CV";
        TuiCountryIsoCode["CY"] = "CY";
        TuiCountryIsoCode["CZ"] = "CZ";
        TuiCountryIsoCode["DE"] = "DE";
        TuiCountryIsoCode["DJ"] = "DJ";
        TuiCountryIsoCode["DK"] = "DK";
        TuiCountryIsoCode["DM"] = "DM";
        TuiCountryIsoCode["DO"] = "DO";
        TuiCountryIsoCode["DZ"] = "DZ";
        TuiCountryIsoCode["EC"] = "EC";
        TuiCountryIsoCode["EE"] = "EE";
        TuiCountryIsoCode["EG"] = "EG";
        TuiCountryIsoCode["ER"] = "ER";
        TuiCountryIsoCode["ES"] = "ES";
        TuiCountryIsoCode["ET"] = "ET";
        TuiCountryIsoCode["FI"] = "FI";
        TuiCountryIsoCode["FJ"] = "FJ";
        TuiCountryIsoCode["FK"] = "FK";
        TuiCountryIsoCode["FM"] = "FM";
        TuiCountryIsoCode["FR"] = "FR";
        TuiCountryIsoCode["GA"] = "GA";
        TuiCountryIsoCode["GD"] = "GD";
        TuiCountryIsoCode["GE"] = "GE";
        TuiCountryIsoCode["GH"] = "GH";
        TuiCountryIsoCode["GI"] = "GI";
        TuiCountryIsoCode["GL"] = "GL";
        TuiCountryIsoCode["GM"] = "GM";
        TuiCountryIsoCode["GN"] = "GN";
        TuiCountryIsoCode["GQ"] = "GQ";
        TuiCountryIsoCode["GR"] = "GR";
        TuiCountryIsoCode["GT"] = "GT";
        TuiCountryIsoCode["GW"] = "GW";
        TuiCountryIsoCode["GY"] = "GY";
        TuiCountryIsoCode["HK"] = "HK";
        TuiCountryIsoCode["HN"] = "HN";
        TuiCountryIsoCode["HR"] = "HR";
        TuiCountryIsoCode["HT"] = "HT";
        TuiCountryIsoCode["HU"] = "HU";
        TuiCountryIsoCode["ID"] = "ID";
        TuiCountryIsoCode["IE"] = "IE";
        TuiCountryIsoCode["IL"] = "IL";
        TuiCountryIsoCode["IN"] = "IN";
        TuiCountryIsoCode["IQ"] = "IQ";
        TuiCountryIsoCode["IR"] = "IR";
        TuiCountryIsoCode["IS"] = "IS";
        TuiCountryIsoCode["IT"] = "IT";
        TuiCountryIsoCode["JM"] = "JM";
        TuiCountryIsoCode["JO"] = "JO";
        TuiCountryIsoCode["JP"] = "JP";
        TuiCountryIsoCode["KE"] = "KE";
        TuiCountryIsoCode["KG"] = "KG";
        TuiCountryIsoCode["KH"] = "KH";
        TuiCountryIsoCode["KM"] = "KM";
        TuiCountryIsoCode["KN"] = "KN";
        TuiCountryIsoCode["KP"] = "KP";
        TuiCountryIsoCode["KR"] = "KR";
        TuiCountryIsoCode["KW"] = "KW";
        TuiCountryIsoCode["KY"] = "KY";
        TuiCountryIsoCode["KZ"] = "KZ";
        TuiCountryIsoCode["LA"] = "LA";
        TuiCountryIsoCode["LB"] = "LB";
        TuiCountryIsoCode["LC"] = "LC";
        TuiCountryIsoCode["LI"] = "LI";
        TuiCountryIsoCode["LK"] = "LK";
        TuiCountryIsoCode["LR"] = "LR";
        TuiCountryIsoCode["LS"] = "LS";
        TuiCountryIsoCode["LT"] = "LT";
        TuiCountryIsoCode["LU"] = "LU";
        TuiCountryIsoCode["LV"] = "LV";
        TuiCountryIsoCode["LY"] = "LY";
        TuiCountryIsoCode["MA"] = "MA";
        TuiCountryIsoCode["MC"] = "MC";
        TuiCountryIsoCode["MD"] = "MD";
        TuiCountryIsoCode["ME"] = "ME";
        TuiCountryIsoCode["MG"] = "MG";
        TuiCountryIsoCode["MK"] = "MK";
        TuiCountryIsoCode["ML"] = "ML";
        TuiCountryIsoCode["MM"] = "MM";
        TuiCountryIsoCode["MN"] = "MN";
        TuiCountryIsoCode["MO"] = "MO";
        TuiCountryIsoCode["MR"] = "MR";
        TuiCountryIsoCode["MS"] = "MS";
        TuiCountryIsoCode["MT"] = "MT";
        TuiCountryIsoCode["MU"] = "MU";
        TuiCountryIsoCode["MV"] = "MV";
        TuiCountryIsoCode["MW"] = "MW";
        TuiCountryIsoCode["MX"] = "MX";
        TuiCountryIsoCode["MY"] = "MY";
        TuiCountryIsoCode["MZ"] = "MZ";
        TuiCountryIsoCode["NA"] = "NA";
        TuiCountryIsoCode["NE"] = "NE";
        TuiCountryIsoCode["NG"] = "NG";
        TuiCountryIsoCode["NI"] = "NI";
        TuiCountryIsoCode["NL"] = "NL";
        TuiCountryIsoCode["NO"] = "NO";
        TuiCountryIsoCode["NP"] = "NP";
        TuiCountryIsoCode["NZ"] = "NZ";
        TuiCountryIsoCode["OM"] = "OM";
        TuiCountryIsoCode["PA"] = "PA";
        TuiCountryIsoCode["PE"] = "PE";
        TuiCountryIsoCode["PF"] = "PF";
        TuiCountryIsoCode["PG"] = "PG";
        TuiCountryIsoCode["PH"] = "PH";
        TuiCountryIsoCode["PK"] = "PK";
        TuiCountryIsoCode["PL"] = "PL";
        TuiCountryIsoCode["PT"] = "PT";
        TuiCountryIsoCode["PW"] = "PW";
        TuiCountryIsoCode["PY"] = "PY";
        TuiCountryIsoCode["QA"] = "QA";
        TuiCountryIsoCode["RO"] = "RO";
        TuiCountryIsoCode["RS"] = "RS";
        TuiCountryIsoCode["RU"] = "RU";
        TuiCountryIsoCode["RW"] = "RW";
        TuiCountryIsoCode["SA"] = "SA";
        TuiCountryIsoCode["SB"] = "SB";
        TuiCountryIsoCode["SC"] = "SC";
        TuiCountryIsoCode["SD"] = "SD";
        TuiCountryIsoCode["SE"] = "SE";
        TuiCountryIsoCode["SG"] = "SG";
        TuiCountryIsoCode["SH"] = "SH";
        TuiCountryIsoCode["SI"] = "SI";
        TuiCountryIsoCode["SK"] = "SK";
        TuiCountryIsoCode["SL"] = "SL";
        TuiCountryIsoCode["SM"] = "SM";
        TuiCountryIsoCode["SN"] = "SN";
        TuiCountryIsoCode["SO"] = "SO";
        TuiCountryIsoCode["SR"] = "SR";
        TuiCountryIsoCode["ST"] = "ST";
        TuiCountryIsoCode["SV"] = "SV";
        TuiCountryIsoCode["SY"] = "SY";
        TuiCountryIsoCode["SZ"] = "SZ";
        TuiCountryIsoCode["TC"] = "TC";
        TuiCountryIsoCode["TD"] = "TD";
        TuiCountryIsoCode["TG"] = "TG";
        TuiCountryIsoCode["TH"] = "TH";
        TuiCountryIsoCode["TJ"] = "TJ";
        TuiCountryIsoCode["TL"] = "TL";
        TuiCountryIsoCode["TM"] = "TM";
        TuiCountryIsoCode["TN"] = "TN";
        TuiCountryIsoCode["TO"] = "TO";
        TuiCountryIsoCode["TR"] = "TR";
        TuiCountryIsoCode["TT"] = "TT";
        TuiCountryIsoCode["TW"] = "TW";
        TuiCountryIsoCode["TZ"] = "TZ";
        TuiCountryIsoCode["UA"] = "UA";
        TuiCountryIsoCode["UG"] = "UG";
        TuiCountryIsoCode["UK"] = "UK";
        TuiCountryIsoCode["UY"] = "UY";
        TuiCountryIsoCode["UZ"] = "UZ";
        TuiCountryIsoCode["VC"] = "VC";
        TuiCountryIsoCode["VE"] = "VE";
        TuiCountryIsoCode["VG"] = "VG";
        TuiCountryIsoCode["VN"] = "VN";
        TuiCountryIsoCode["VU"] = "VU";
        TuiCountryIsoCode["WS"] = "WS";
        TuiCountryIsoCode["YE"] = "YE";
        TuiCountryIsoCode["ZA"] = "ZA";
        TuiCountryIsoCode["ZM"] = "ZM";
        TuiCountryIsoCode["ZW"] = "ZW";
        TuiCountryIsoCode["US"] = "US";
        TuiCountryIsoCode["CA"] = "CA";
    })(exports.TuiCountryIsoCode || (exports.TuiCountryIsoCode = {}));

    var _a;
    // TODO: i18n
    var COUNTRIES = (_a = {},
        _a[exports.TuiCountryIsoCode.AD] = { mask: '+376###-###', name: 'Андорра' },
        _a[exports.TuiCountryIsoCode.AE] = {
            mask: '+971-#-###-####',
            name: 'Объединенные Арабские Эмираты',
        },
        _a[exports.TuiCountryIsoCode.AF] = { mask: '+93##-###-####', name: 'Афганистан' },
        _a[exports.TuiCountryIsoCode.AG] = { mask: '+1(268) ###-####', name: 'Антигуа и Барбуда' },
        _a[exports.TuiCountryIsoCode.AI] = { mask: '+1(264) ###-####', name: 'Ангилья' },
        _a[exports.TuiCountryIsoCode.AL] = { mask: '+355(###) ###-###', name: 'Албания' },
        _a[exports.TuiCountryIsoCode.AM] = { mask: '+374##-###-###', name: 'Армения' },
        _a[exports.TuiCountryIsoCode.AN] = {
            mask: '+599-###-####',
            name: 'Нидерландские Антильские острова',
        },
        _a[exports.TuiCountryIsoCode.AO] = { mask: '+244(###) ###-###', name: 'Ангола' },
        _a[exports.TuiCountryIsoCode.AR] = { mask: '+54(###) ###-####', name: 'Аргентина' },
        _a[exports.TuiCountryIsoCode.AT] = { mask: '+43(###) ###-####', name: 'Австрия' },
        _a[exports.TuiCountryIsoCode.AU] = { mask: '+61#-####-####', name: 'Австралия' },
        _a[exports.TuiCountryIsoCode.AW] = { mask: '+297###-####', name: 'Аруба' },
        _a[exports.TuiCountryIsoCode.AZ] = { mask: '+994##-###-##-##', name: 'Азербайджан' },
        _a[exports.TuiCountryIsoCode.BA] = { mask: '+387##-#####', name: 'Босния и Герцеговина' },
        _a[exports.TuiCountryIsoCode.BB] = { mask: '+1(246) ###-####', name: 'Барбадос' },
        _a[exports.TuiCountryIsoCode.BD] = { mask: '+880##-###-###', name: 'Бангладеш' },
        _a[exports.TuiCountryIsoCode.BE] = { mask: '+32(###) ###-###', name: 'Бельгия' },
        _a[exports.TuiCountryIsoCode.BF] = { mask: '+226##-##-####', name: 'Буркина Фасо' },
        _a[exports.TuiCountryIsoCode.BG] = { mask: '+359(###) ###-###', name: 'Болгария' },
        _a[exports.TuiCountryIsoCode.BH] = { mask: '+973####-####', name: 'Бахрейн' },
        _a[exports.TuiCountryIsoCode.BI] = { mask: '+257##-##-####', name: 'Бурунди' },
        _a[exports.TuiCountryIsoCode.BJ] = { mask: '+229##-##-####', name: 'Бенин' },
        _a[exports.TuiCountryIsoCode.BM] = { mask: '+1(441) ###-####', name: 'Бермудские острова' },
        _a[exports.TuiCountryIsoCode.BN] = { mask: '+673###-####', name: 'Бруней-Даруссалам' },
        _a[exports.TuiCountryIsoCode.BO] = { mask: '+591#-###-####', name: 'Боливия' },
        _a[exports.TuiCountryIsoCode.BR] = { mask: '+55(##) ####-####', name: 'Бразилия' },
        _a[exports.TuiCountryIsoCode.BS] = { mask: '+1(242) ###-####', name: 'Багамские Острова' },
        _a[exports.TuiCountryIsoCode.BT] = { mask: '+975#-###-###', name: 'Бутан' },
        _a[exports.TuiCountryIsoCode.BW] = { mask: '+267##-###-###', name: 'Ботсвана' },
        _a[exports.TuiCountryIsoCode.BY] = { mask: '+375(##) ###-##-##', name: 'Беларусь (Белоруссия)' },
        _a[exports.TuiCountryIsoCode.BZ] = { mask: '+501###-####', name: 'Белиз' },
        _a[exports.TuiCountryIsoCode.CA] = { mask: '+1(###) ###-####', name: 'Канада' },
        _a[exports.TuiCountryIsoCode.CD] = {
            mask: '+243(###) ###-###',
            name: 'Дем. Респ. Конго (Киншаса)',
        },
        _a[exports.TuiCountryIsoCode.CF] = {
            mask: '+236-##-##-####',
            name: 'Центральноафриканская Республика',
        },
        _a[exports.TuiCountryIsoCode.CG] = { mask: '+242##-###-####', name: 'Конго (Браззавиль)' },
        _a[exports.TuiCountryIsoCode.CH] = { mask: '+41##-###-####', name: 'Швейцария' },
        _a[exports.TuiCountryIsoCode.CI] = { mask: '+225##-###-###', name: 'Кот-д’Ивуар' },
        _a[exports.TuiCountryIsoCode.CL] = { mask: '+56#-####-####', name: 'Чили' },
        _a[exports.TuiCountryIsoCode.CM] = { mask: '+237####-####', name: 'Камерун' },
        _a[exports.TuiCountryIsoCode.CN] = { mask: '+86(###) ####-####', name: 'Китайская Н.Р.' },
        _a[exports.TuiCountryIsoCode.CO] = { mask: '+57(###) ###-####', name: 'Колумбия' },
        _a[exports.TuiCountryIsoCode.CR] = { mask: '+506####-####', name: 'Коста-Рика' },
        _a[exports.TuiCountryIsoCode.CU] = { mask: '+53#-###-####', name: 'Куба' },
        _a[exports.TuiCountryIsoCode.CV] = { mask: '+238(###) ##-##', name: 'Кабо-Верде' },
        _a[exports.TuiCountryIsoCode.CY] = { mask: '+357##-###-###', name: 'Кипр' },
        _a[exports.TuiCountryIsoCode.CZ] = { mask: '+420(###) ###-###', name: 'Чехия' },
        _a[exports.TuiCountryIsoCode.DE] = { mask: '+49(###) ###-###-##', name: 'Германия' },
        _a[exports.TuiCountryIsoCode.DJ] = { mask: '+253##-##-##-##', name: 'Джибути' },
        _a[exports.TuiCountryIsoCode.DK] = { mask: '+45##-##-##-##', name: 'Дания' },
        _a[exports.TuiCountryIsoCode.DM] = { mask: '+1(767) ###-####', name: 'Доминика' },
        _a[exports.TuiCountryIsoCode.DO] = { mask: '+1(###) ###-####', name: 'Доминиканская Республика' },
        _a[exports.TuiCountryIsoCode.DZ] = { mask: '+213##-###-####', name: 'Алжир' },
        _a[exports.TuiCountryIsoCode.EC] = { mask: '+593##-###-####', name: 'Эквадор ' },
        _a[exports.TuiCountryIsoCode.EE] = { mask: '+372####-####', name: 'Эстония ' },
        _a[exports.TuiCountryIsoCode.EG] = { mask: '+20(###) ###-####', name: 'Египет' },
        _a[exports.TuiCountryIsoCode.ER] = { mask: '+291#-###-###', name: 'Эритрея' },
        _a[exports.TuiCountryIsoCode.ES] = { mask: '+34(###) ###-###', name: 'Испания' },
        _a[exports.TuiCountryIsoCode.ET] = { mask: '+251##-###-####', name: 'Эфиопия' },
        _a[exports.TuiCountryIsoCode.FI] = { mask: '+358(###) ###-##-##', name: 'Финляндия' },
        _a[exports.TuiCountryIsoCode.FJ] = { mask: '+679##-#####', name: 'Фиджи' },
        _a[exports.TuiCountryIsoCode.FK] = { mask: '+500#####', name: 'Фолклендские острова' },
        _a[exports.TuiCountryIsoCode.FM] = { mask: '+691###-####', name: 'Ф.Ш. Микронезии' },
        _a[exports.TuiCountryIsoCode.FR] = { mask: '+33(###) ###-###', name: 'Франция' },
        _a[exports.TuiCountryIsoCode.GA] = { mask: '+241#-##-##-##', name: 'Габон' },
        _a[exports.TuiCountryIsoCode.GD] = { mask: '+1(473) ###-####', name: 'Гренада' },
        _a[exports.TuiCountryIsoCode.GE] = { mask: '+995(###) ###-###', name: 'Грузия' },
        _a[exports.TuiCountryIsoCode.GH] = { mask: '+233(###) ###-###', name: 'Гана' },
        _a[exports.TuiCountryIsoCode.GI] = { mask: '+350###-#####', name: 'Гибралтар' },
        _a[exports.TuiCountryIsoCode.GL] = { mask: '+299##-##-##', name: 'Гренландия' },
        _a[exports.TuiCountryIsoCode.GM] = { mask: '+220(###) ##-##', name: 'Гамбия' },
        _a[exports.TuiCountryIsoCode.GN] = { mask: '+224##-###-###', name: 'Гвинея' },
        _a[exports.TuiCountryIsoCode.GQ] = { mask: '+240##-###-####', name: 'Экваториальная Гвинея' },
        _a[exports.TuiCountryIsoCode.GR] = { mask: '+30(###) ###-####', name: 'Греция' },
        _a[exports.TuiCountryIsoCode.GT] = { mask: '+502#-###-####', name: 'Гватемала' },
        _a[exports.TuiCountryIsoCode.GW] = { mask: '+245#-######', name: 'Гвинея-Бисау' },
        _a[exports.TuiCountryIsoCode.GY] = { mask: '+592###-####', name: 'Гайана' },
        _a[exports.TuiCountryIsoCode.HK] = { mask: '+852####-####', name: 'Гонконг' },
        _a[exports.TuiCountryIsoCode.HN] = { mask: '+504####-####', name: 'Гондурас' },
        _a[exports.TuiCountryIsoCode.HR] = { mask: '+385##-###-###', name: 'Хорватия' },
        _a[exports.TuiCountryIsoCode.HT] = { mask: '+509##-##-####', name: 'Гаити' },
        _a[exports.TuiCountryIsoCode.HU] = { mask: '+36(###) ###-###', name: 'Венгрия' },
        _a[exports.TuiCountryIsoCode.ID] = { mask: '+62(###) ###-##-###', name: 'Индонезия ' },
        _a[exports.TuiCountryIsoCode.IE] = { mask: '+353(###) ###-###', name: 'Ирландия' },
        _a[exports.TuiCountryIsoCode.IL] = { mask: '+972##-###-####', name: 'Израиль' },
        _a[exports.TuiCountryIsoCode.IN] = { mask: '+91(####) ###-###', name: 'Индия' },
        _a[exports.TuiCountryIsoCode.IQ] = { mask: '+964(###) ###-####', name: 'Ирак' },
        _a[exports.TuiCountryIsoCode.IR] = { mask: '+98(###) ###-####', name: 'Иран' },
        _a[exports.TuiCountryIsoCode.IS] = { mask: '+354###-####', name: 'Исландия' },
        _a[exports.TuiCountryIsoCode.IT] = { mask: '+39(###) ####-###', name: 'Италия' },
        _a[exports.TuiCountryIsoCode.JM] = { mask: '+1(876) ###-####', name: 'Ямайка' },
        _a[exports.TuiCountryIsoCode.JO] = { mask: '+962#-####-####', name: 'Иордания' },
        _a[exports.TuiCountryIsoCode.JP] = { mask: '+81-##-####-####', name: 'Япония ' },
        _a[exports.TuiCountryIsoCode.KE] = { mask: '+254###-######', name: 'Кения' },
        _a[exports.TuiCountryIsoCode.KG] = { mask: '+996(###) ###-###', name: 'Киргизия' },
        _a[exports.TuiCountryIsoCode.KH] = { mask: '+855##-###-###', name: 'Камбоджа' },
        _a[exports.TuiCountryIsoCode.KM] = { mask: '+269##-#####', name: 'Коморы' },
        _a[exports.TuiCountryIsoCode.KN] = { mask: '+1(869) ###-####', name: 'Сент-Китс и Невис' },
        _a[exports.TuiCountryIsoCode.KP] = { mask: '+850####-#############', name: 'Корейская НДР' },
        _a[exports.TuiCountryIsoCode.KR] = { mask: '+82##-###-####', name: 'Респ. Корея' },
        _a[exports.TuiCountryIsoCode.KW] = { mask: '+965####-####', name: 'Кувейт' },
        _a[exports.TuiCountryIsoCode.KY] = { mask: '+1(345) ###-####', name: 'Каймановы острова' },
        _a[exports.TuiCountryIsoCode.KZ] = { mask: '+7(###) ###-##-##', name: 'Казахстан' },
        _a[exports.TuiCountryIsoCode.LA] = { mask: '+856##-##-###-###', name: 'Лаос' },
        _a[exports.TuiCountryIsoCode.LB] = { mask: '+961##-###-###', name: 'Ливан ' },
        _a[exports.TuiCountryIsoCode.LC] = { mask: '+1(758) ###-####', name: 'Сент-Люсия' },
        _a[exports.TuiCountryIsoCode.LI] = { mask: '+423(###) ###-####', name: 'Лихтенштейн' },
        _a[exports.TuiCountryIsoCode.LK] = { mask: '+94##-###-####', name: 'Шри-Ланка' },
        _a[exports.TuiCountryIsoCode.LR] = { mask: '+231##-###-###', name: 'Либерия' },
        _a[exports.TuiCountryIsoCode.LS] = { mask: '+266#-###-####', name: 'Лесото' },
        _a[exports.TuiCountryIsoCode.LT] = { mask: '+370(###) ##-###', name: 'Литва' },
        _a[exports.TuiCountryIsoCode.LU] = { mask: '+352(###) ###-###', name: 'Люксембург' },
        _a[exports.TuiCountryIsoCode.LV] = { mask: '+371##-###-###', name: 'Латвия' },
        _a[exports.TuiCountryIsoCode.LY] = { mask: '+218##-###-####', name: 'Ливия' },
        _a[exports.TuiCountryIsoCode.MA] = { mask: '+212##-####-###', name: 'Марокко' },
        _a[exports.TuiCountryIsoCode.MC] = { mask: '+377###-###-###', name: 'Монако' },
        _a[exports.TuiCountryIsoCode.MD] = { mask: '+373####-####', name: 'Молдова' },
        _a[exports.TuiCountryIsoCode.ME] = { mask: '+382##-###-###', name: 'Черногория' },
        _a[exports.TuiCountryIsoCode.MG] = { mask: '+261##-##-#####', name: 'Мадагаскар' },
        _a[exports.TuiCountryIsoCode.MK] = { mask: '+389##-###-###', name: 'Респ. Македония' },
        _a[exports.TuiCountryIsoCode.ML] = { mask: '+223##-##-####', name: 'Мали' },
        _a[exports.TuiCountryIsoCode.MM] = { mask: '+95##-###-###', name: 'Бирма (Мьянма)' },
        _a[exports.TuiCountryIsoCode.MN] = { mask: '+976##-##-####', name: 'Монголия' },
        _a[exports.TuiCountryIsoCode.MO] = { mask: '+853####-####', name: 'Макао' },
        _a[exports.TuiCountryIsoCode.MR] = { mask: '+222##-##-####', name: 'Мавритания' },
        _a[exports.TuiCountryIsoCode.MS] = { mask: '+1(664) ###-####', name: 'Монтсеррат' },
        _a[exports.TuiCountryIsoCode.MT] = { mask: '+356####-####', name: 'Мальта' },
        _a[exports.TuiCountryIsoCode.MU] = { mask: '+230###-####', name: 'Маврикий' },
        _a[exports.TuiCountryIsoCode.MV] = { mask: '+960###-####', name: 'Мальдивские острова' },
        _a[exports.TuiCountryIsoCode.MW] = { mask: '+265#-####-####', name: 'Малави' },
        _a[exports.TuiCountryIsoCode.MX] = { mask: '+52(###) ###-####', name: 'Мексика' },
        _a[exports.TuiCountryIsoCode.MY] = { mask: '+60(###) ###-###', name: 'Малайзия' },
        _a[exports.TuiCountryIsoCode.MZ] = { mask: '+258##-###-###', name: 'Мозамбик' },
        _a[exports.TuiCountryIsoCode.NA] = { mask: '+264##-###-####', name: 'Намибия' },
        _a[exports.TuiCountryIsoCode.NE] = { mask: '+227##-##-####', name: 'Нигер' },
        _a[exports.TuiCountryIsoCode.NG] = { mask: '+234(###) ###-####', name: 'Нигерия' },
        _a[exports.TuiCountryIsoCode.NI] = { mask: '+505####-####', name: 'Никарагуа' },
        _a[exports.TuiCountryIsoCode.NL] = { mask: '+31##-###-####', name: 'Нидерланды' },
        _a[exports.TuiCountryIsoCode.NO] = { mask: '+47(###) ##-###', name: 'Норвегия' },
        _a[exports.TuiCountryIsoCode.NP] = { mask: '+977##-###-###', name: 'Непал' },
        _a[exports.TuiCountryIsoCode.NZ] = { mask: '+64(###) ###-####', name: 'Новая Зеландия' },
        _a[exports.TuiCountryIsoCode.OM] = { mask: '+968##-###-###', name: 'Оман' },
        _a[exports.TuiCountryIsoCode.PA] = { mask: '+507###-####', name: 'Панама' },
        _a[exports.TuiCountryIsoCode.PE] = { mask: '+51(###) ###-###', name: 'Перу' },
        _a[exports.TuiCountryIsoCode.PF] = {
            mask: '+689##-##-##',
            name: 'Французская Полинезия (Таити)',
        },
        _a[exports.TuiCountryIsoCode.PG] = { mask: '+675(###) ##-###', name: 'Папуа-Новая Гвинея' },
        _a[exports.TuiCountryIsoCode.PH] = { mask: '+63(###) ###-####', name: 'Филиппины' },
        _a[exports.TuiCountryIsoCode.PK] = { mask: '+92(###) ###-####', name: 'Пакистан' },
        _a[exports.TuiCountryIsoCode.PL] = { mask: '+48(###) ###-###', name: 'Польша' },
        _a[exports.TuiCountryIsoCode.PT] = { mask: '+351##-###-####', name: 'Португалия' },
        _a[exports.TuiCountryIsoCode.PW] = { mask: '+680###-####', name: 'Палау' },
        _a[exports.TuiCountryIsoCode.PY] = { mask: '+595(###) ###-###', name: 'Парагвай' },
        _a[exports.TuiCountryIsoCode.QA] = { mask: '+974####-####', name: 'Катар' },
        _a[exports.TuiCountryIsoCode.RO] = { mask: '+40##-###-####', name: 'Румыния' },
        _a[exports.TuiCountryIsoCode.RS] = { mask: '+381##-###-####', name: 'Сербия' },
        _a[exports.TuiCountryIsoCode.RU] = { mask: '+7(###) ###-##-##', name: 'Россия' },
        _a[exports.TuiCountryIsoCode.RW] = { mask: '+250(###) ###-###', name: 'Руанда' },
        _a[exports.TuiCountryIsoCode.SA] = { mask: '+966#-####-####', name: 'Саудовская Аравия ' },
        _a[exports.TuiCountryIsoCode.SB] = { mask: '+677###-####', name: 'Соломоновы Острова ' },
        _a[exports.TuiCountryIsoCode.SC] = { mask: '+248#-###-###', name: 'Сейшелы' },
        _a[exports.TuiCountryIsoCode.SD] = { mask: '+249##-###-####', name: 'Судан' },
        _a[exports.TuiCountryIsoCode.SE] = { mask: '+46##-###-####', name: 'Швеция' },
        _a[exports.TuiCountryIsoCode.SG] = { mask: '+65####-####', name: 'Сингапур' },
        _a[exports.TuiCountryIsoCode.SH] = { mask: '+290####', name: 'Остров Святой Елены' },
        _a[exports.TuiCountryIsoCode.SI] = { mask: '+386##-###-###', name: 'Словения' },
        _a[exports.TuiCountryIsoCode.SK] = { mask: '+421(###) ###-###', name: 'Словакия' },
        _a[exports.TuiCountryIsoCode.SL] = { mask: '+232##-######', name: 'Сьерра-Леоне' },
        _a[exports.TuiCountryIsoCode.SM] = { mask: '+378####-######', name: 'Сан-Марино' },
        _a[exports.TuiCountryIsoCode.SN] = { mask: '+221##-###-####', name: 'Сенегал' },
        _a[exports.TuiCountryIsoCode.SO] = { mask: '+252##-###-###', name: 'Сомали' },
        _a[exports.TuiCountryIsoCode.SR] = { mask: '+597###-####', name: 'Суринам ' },
        _a[exports.TuiCountryIsoCode.ST] = { mask: '+239##-#####', name: 'Сан-Томе и Принсипи' },
        _a[exports.TuiCountryIsoCode.SV] = { mask: '+503##-##-####', name: 'Сальвадор' },
        _a[exports.TuiCountryIsoCode.SY] = {
            mask: '+963##-####-###',
            name: 'Сирийская арабская республика',
        },
        _a[exports.TuiCountryIsoCode.SZ] = { mask: '+268##-##-####', name: 'Свазиленд' },
        _a[exports.TuiCountryIsoCode.TC] = { mask: '+1(649) ###-####', name: 'Тёркс и Кайкос' },
        _a[exports.TuiCountryIsoCode.TD] = { mask: '+235##-##-##-##', name: 'Чад' },
        _a[exports.TuiCountryIsoCode.TG] = { mask: '+228##-###-###', name: 'Того' },
        _a[exports.TuiCountryIsoCode.TH] = { mask: '+66##-###-####', name: 'Таиланд ' },
        _a[exports.TuiCountryIsoCode.TJ] = { mask: '+992##-###-####', name: 'Таджикистан' },
        _a[exports.TuiCountryIsoCode.TL] = { mask: '+670###-#####', name: 'Восточный Тимор' },
        _a[exports.TuiCountryIsoCode.TM] = { mask: '+993#-###-####', name: 'Туркменистан' },
        _a[exports.TuiCountryIsoCode.TN] = { mask: '+216##-###-###', name: 'Тунис' },
        _a[exports.TuiCountryIsoCode.TO] = { mask: '+676#####', name: 'Тонга' },
        _a[exports.TuiCountryIsoCode.TR] = { mask: '+90(###) ###-####', name: 'Турция' },
        _a[exports.TuiCountryIsoCode.TT] = { mask: '+1(868) ###-####', name: 'Тринидад и Тобаго' },
        _a[exports.TuiCountryIsoCode.TW] = { mask: '+886#-####-####', name: 'Тайвань' },
        _a[exports.TuiCountryIsoCode.TZ] = { mask: '+255##-###-####', name: 'Танзания' },
        _a[exports.TuiCountryIsoCode.UA] = { mask: '+380(##) ###-##-##', name: 'Украина' },
        _a[exports.TuiCountryIsoCode.UG] = { mask: '+256(###) ###-###', name: 'Уганда' },
        _a[exports.TuiCountryIsoCode.UK] = { mask: '+44##-####-####', name: 'Великобритания' },
        _a[exports.TuiCountryIsoCode.US] = { mask: '+1(###) ###-####', name: 'США' },
        _a[exports.TuiCountryIsoCode.UY] = { mask: '+598#-###-##-##', name: 'Уругвай' },
        _a[exports.TuiCountryIsoCode.UZ] = { mask: '+998##-###-####', name: 'Узбекистан' },
        _a[exports.TuiCountryIsoCode.VC] = { mask: '+1(784) ###-####', name: 'Сент-Винсент и Гренадины' },
        _a[exports.TuiCountryIsoCode.VE] = { mask: '+58(###) ###-####', name: 'Венесуэла' },
        _a[exports.TuiCountryIsoCode.VG] = {
            mask: '+1(284)###-####',
            name: 'Британские Виргинские острова',
        },
        _a[exports.TuiCountryIsoCode.VN] = { mask: '+84(###) ####-###', name: 'Вьетнам' },
        _a[exports.TuiCountryIsoCode.VU] = { mask: '+678##-#####', name: 'Вануату ' },
        _a[exports.TuiCountryIsoCode.WS] = { mask: '+685##-####', name: 'Самоа' },
        _a[exports.TuiCountryIsoCode.YE] = { mask: '+967###-###-###', name: 'Йемен ' },
        _a[exports.TuiCountryIsoCode.ZA] = { mask: '+27##-###-####', name: 'Южно-Африканская Респ.' },
        _a[exports.TuiCountryIsoCode.ZM] = { mask: '+260##-###-####', name: 'Замбия' },
        _a[exports.TuiCountryIsoCode.ZW] = { mask: '+263#-######', name: 'Зимбабве' },
        _a);

    // @dynamic
    var TuiInputPhoneInternationalComponent = /** @class */ (function (_super) {
        __extends(TuiInputPhoneInternationalComponent, _super);
        function TuiInputPhoneInternationalComponent(control, changeDetectorRef, iconsPath) {
            var _this = _super.call(this, control, changeDetectorRef) || this;
            _this.countryIsoCode = exports.TuiCountryIsoCode.RU;
            _this.countries = [];
            _this.open = false;
            _this.arrow = arrow.TUI_ARROW;
            _this.staticPath = null;
            _this.staticPath = iconsPath('tuiIcon').replace('tuiIcon.svg#tuiIcon', '');
            return _this;
        }
        TuiInputPhoneInternationalComponent_1 = TuiInputPhoneInternationalComponent;
        Object.defineProperty(TuiInputPhoneInternationalComponent.prototype, "nativeFocusableElement", {
            get: function () {
                return this.inputPhoneComponent && !this.computedDisabled
                    ? this.inputPhoneComponent.nativeFocusableElement
                    : null;
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(TuiInputPhoneInternationalComponent.prototype, "focused", {
            get: function () {
                return ((!!this.primitiveTextfield && this.primitiveTextfield.focused) ||
                    (!!this.inputPhoneComponent && this.inputPhoneComponent.focused));
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(TuiInputPhoneInternationalComponent.prototype, "inputPhoneCountryCode", {
            get: function () {
                return this.isoToCountryCode(this.countryIsoCode);
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(TuiInputPhoneInternationalComponent.prototype, "phoneMaskAfterCountryCode", {
            get: function () {
                var countryCode = this.isoToCountryCode(this.countryIsoCode);
                return this.calculateMaskAfterCountryCode(COUNTRIES[this.countryIsoCode].mask, countryCode);
            },
            enumerable: true,
            configurable: true
        });
        Object.defineProperty(TuiInputPhoneInternationalComponent.prototype, "countryFlagPath", {
            get: function () {
                return this.getFlagPath(this.countryIsoCode);
            },
            enumerable: true,
            configurable: true
        });
        TuiInputPhoneInternationalComponent.prototype.getFlagPath = function (code) {
            return "" + this.staticPath + code + ".png";
        };
        TuiInputPhoneInternationalComponent.prototype.getCountryName = function (isoCode) {
            return COUNTRIES[isoCode].name;
        };
        TuiInputPhoneInternationalComponent.prototype.onItemClick = function (isoCode) {
            this.open = false;
            this.countryIsoCode = isoCode;
            // recalculates mask inside inputPhone to prevent isoCode conflict
            this.changeDetectorRef.detectChanges();
            if (this.nativeFocusableElement) {
                cdk.setNativeFocused(this.nativeFocusableElement);
            }
        };
        TuiInputPhoneInternationalComponent.prototype.setDisabledState = function () {
            _super.prototype.setDisabledState.call(this);
            this.close();
        };
        TuiInputPhoneInternationalComponent.prototype.isoToCountryCode = function (isoCode) {
            return ('+' +
                COUNTRIES[isoCode].mask
                    .split('')
                    .filter(function (symbol) { return core$1.TUI_DIGIT_REGEXP.test(symbol); })
                    .join(''));
        };
        TuiInputPhoneInternationalComponent.prototype.getFallbackValue = function () {
            return '';
        };
        TuiInputPhoneInternationalComponent.prototype.close = function () {
            this.open = false;
        };
        TuiInputPhoneInternationalComponent.prototype.calculateMaskAfterCountryCode = function (mask, countryCode) {
            return mask.replace(countryCode, '');
        };
        var TuiInputPhoneInternationalComponent_1;
        TuiInputPhoneInternationalComponent.ctorParameters = function () { return [
            { type: forms.NgControl, decorators: [{ type: core.Optional }, { type: core.Self }, { type: core.Inject, args: [forms.NgControl,] }] },
            { type: core.ChangeDetectorRef, decorators: [{ type: core.Inject, args: [core.ChangeDetectorRef,] }] },
            { type: undefined, decorators: [{ type: core.Inject, args: [core$1.TUI_ICONS_PATH,] }] }
        ]; };
        __decorate([
            core.Input(),
            cdk.tuiDefaultProp()
        ], TuiInputPhoneInternationalComponent.prototype, "countryIsoCode", void 0);
        __decorate([
            core.Input()
        ], TuiInputPhoneInternationalComponent.prototype, "countries", void 0);
        __decorate([
            core.ViewChild(inputPhone.TuiInputPhoneComponent)
        ], TuiInputPhoneInternationalComponent.prototype, "inputPhoneComponent", void 0);
        __decorate([
            core.ViewChild(core$1.TuiPrimitiveTextfieldComponent)
        ], TuiInputPhoneInternationalComponent.prototype, "primitiveTextfield", void 0);
        __decorate([
            cdk.tuiPure
        ], TuiInputPhoneInternationalComponent.prototype, "isoToCountryCode", null);
        __decorate([
            cdk.tuiPure
        ], TuiInputPhoneInternationalComponent.prototype, "calculateMaskAfterCountryCode", null);
        TuiInputPhoneInternationalComponent = TuiInputPhoneInternationalComponent_1 = __decorate([
            core.Component({
                selector: 'tui-input-phone-international',
                template: "<tui-hosted-dropdown\n    class=\"hosted-dropdown\"\n    [content]=\"dropdown\"\n    [canOpen]=\"!readOnly\"\n    [(open)]=\"open\"\n>\n    <div tuiGroup>\n        <tui-primitive-textfield\n            tuiHostedDropdownHost\n            class=\"country-select tui-group__auto-width-item\"\n            [tuiTextfieldCustomContent]=\"countryValueContent\"\n            [tuiTextfieldLabelOutside]=\"true\"\n            [disabled]=\"disabled\"\n            [focusable]=\"focusable\"\n            [editable]=\"false\"\n            [iconContent]=\"arrow\"\n            [pseudoFocused]=\"open || null\"\n            [readOnly]=\"readOnly\"\n            [tuiHintContent]=\"null\"\n        ></tui-primitive-textfield>\n        <tui-input-phone\n            class=\"input-phone tui-group__auto-width-item\"\n            tuiTextfieldAutocomplete=\"off\"\n            [tuiTextfieldLabelOutside]=\"true\"\n            [formControl]=\"control\"\n            [focusable]=\"focusable\"\n            [countryCode]=\"inputPhoneCountryCode\"\n            [phoneMaskAfterCountryCode]=\"phoneMaskAfterCountryCode\"\n            [readOnly]=\"readOnly\"\n            [pseudoInvalid]=\"pseudoInvalid\"\n            [pseudoFocused]=\"pseudoFocused\"\n            [pseudoHovered]=\"pseudoHovered\"\n        >\n            {{inputPhoneCountryCode}}\n        </tui-input-phone>\n    </div>\n</tui-hosted-dropdown>\n\n<ng-template #dropdown>\n    <tui-data-list>\n        <button\n            *ngFor=\"let item of countries\"\n            tuiOption\n            (click)=\"onItemClick(item)\"\n        >\n            <img class=\"country-item-flag\" alt=\"\" [src]=\"getFlagPath(item)\" />\n            <span class=\"country-item-name\">{{getCountryName(item)}}</span>\n            <span class=\"country-item-code\">{{isoToCountryCode(item)}}</span>\n        </button>\n    </tui-data-list>\n</ng-template>\n\n<ng-template #countryValueContent>\n    <img\n        class=\"flag\"\n        [alt]=\"getCountryName(countryIsoCode)\"\n        [src]=\"countryFlagPath\"\n    />\n</ng-template>\n",
                changeDetection: core.ChangeDetectionStrategy.OnPush,
                providers: [
                    {
                        provide: cdk.TUI_FOCUSABLE_ITEM_ACCESSOR,
                        useExisting: core.forwardRef(function () { return TuiInputPhoneInternationalComponent_1; }),
                    },
                    providers.FIXED_DROPDOWN_CONTROLLER_PROVIDER,
                ],
                styles: [":host{display:block}:host._disabled{pointer-events:none}.hosted-dropdown{display:block}.country-select{width:90px}.arrow-icon{transition-duration:.3s;transition-timing-function:ease-in-out;display:flex;width:24px;height:24px;align-items:center;justify-content:center;color:var(--tui-text-03);position:relative;box-sizing:border-box;cursor:pointer;transition-property:color,transform}.arrow-icon:hover{color:var(--tui-text-02)}:host._disabled .arrow-icon,:host._readonly .arrow-icon{pointer-events:none}:host[data-mode=onDark] .arrow-icon{color:var(--tui-text-03-night)}:host[data-mode=onDark] .arrow-icon:hover{color:var(--tui-text-01-night)}.arrow-icon_open{transform:rotate(180deg)}.input-phone{flex:1}.flag{width:28px;height:20px;margin-left:-8px}.country-item-flag{width:28px;height:20px}.country-item-name{margin-left:12px;margin-right:auto}.country-item-code{color:var(--tui-text-02);margin-right:4px}"]
            }),
            __param(0, core.Optional()),
            __param(0, core.Self()),
            __param(0, core.Inject(forms.NgControl)),
            __param(1, core.Inject(core.ChangeDetectorRef)),
            __param(2, core.Inject(core$1.TUI_ICONS_PATH))
        ], TuiInputPhoneInternationalComponent);
        return TuiInputPhoneInternationalComponent;
    }(cdk.AbstractTuiControl));

    var TuiInputPhoneInternationalModule = /** @class */ (function () {
        function TuiInputPhoneInternationalModule() {
        }
        TuiInputPhoneInternationalModule = __decorate([
            core.NgModule({
                imports: [
                    common.CommonModule,
                    forms.ReactiveFormsModule,
                    ngPolymorpheus.PolymorpheusModule,
                    core$1.TuiSvgModule,
                    inputPhone.TuiInputPhoneModule,
                    core$1.TuiGroupModule,
                    core$1.TuiPrimitiveTextfieldModule,
                    core$1.TuiTextfieldControllerModule,
                    core$1.TuiHintControllerModule,
                    core$1.TuiHostedDropdownModule,
                    core$1.TuiDataListModule,
                    arrow.TuiArrowModule,
                ],
                declarations: [TuiInputPhoneInternationalComponent],
                exports: [TuiInputPhoneInternationalComponent],
            })
        ], TuiInputPhoneInternationalModule);
        return TuiInputPhoneInternationalModule;
    }());

    exports.COUNTRIES = COUNTRIES;
    exports.TuiInputPhoneInternationalComponent = TuiInputPhoneInternationalComponent;
    exports.TuiInputPhoneInternationalModule = TuiInputPhoneInternationalModule;

    Object.defineProperty(exports, '__esModule', { value: true });

})));
//# sourceMappingURL=taiga-ui-kit-components-input-phone-international.umd.js.map