(function(e,h){typeof exports=="object"&&typeof module<"u"?module.exports=h(require("vue")):typeof define=="function"&&define.amd?define(["vue"],h):(e=typeof globalThis<"u"?globalThis:e||self,e.vue3IntlInput=h(e.Vue))})(this,function(e){"use strict";const h=[{alpha2Code:"af",country:"Afghanistan (\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646)",dialCode:"93"},{alpha2Code:"al",country:"Albania (Shqip\xEBri)",dialCode:"355"},{alpha2Code:"dz",country:"Algeria (\u0627\u0644\u062C\u0632\u0627\u0626\u0631\u202C\u200E)",dialCode:"213"},{alpha2Code:"as",country:"American Samoa",dialCode:"1684"},{alpha2Code:"ad",country:"Andorra",dialCode:"376"},{alpha2Code:"ao",country:"Angola",dialCode:"244"},{alpha2Code:"ai",country:"Anguilla",dialCode:"1264"},{alpha2Code:"ag",country:"Antigua and Barbuda",dialCode:"1268"},{alpha2Code:"ar",country:"Argentina",dialCode:"54"},{alpha2Code:"am",country:"Armenia (\u0540\u0561\u0575\u0561\u057D\u057F\u0561\u0576)",dialCode:"374"},{alpha2Code:"aw",country:"Aruba",dialCode:"297"},{alpha2Code:"au",country:"Australia",dialCode:"61"},{alpha2Code:"at",country:"Austria (\xD6sterreich)",dialCode:"43"},{alpha2Code:"az",country:"Azerbaijan (Az\u0259rbaycan)",dialCode:"994"},{alpha2Code:"bs",country:"Bahamas",dialCode:"1242"},{alpha2Code:"bh",country:"Bahrain (\u0627\u0644\u0628\u062D\u0631\u064A\u0646\u202C\u200E)",dialCode:"973"},{alpha2Code:"bd",country:"Bangladesh (\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6)",dialCode:"880"},{alpha2Code:"bb",country:"Barbados",dialCode:"1246"},{alpha2Code:"by",country:"Belarus (\u0411\u0435\u043B\u0430\u0440\u0443\u0441\u044C)",dialCode:"375"},{alpha2Code:"be",country:"Belgium (Belgi\xEB)",dialCode:"32"},{alpha2Code:"bz",country:"Belize",dialCode:"501"},{alpha2Code:"bj",country:"Benin (B\xE9nin)",dialCode:"229"},{alpha2Code:"bm",country:"Bermuda",dialCode:"1441"},{alpha2Code:"bt",country:"Bhutan (\u0F60\u0F56\u0FB2\u0F74\u0F42)",dialCode:"975"},{alpha2Code:"bo",country:"Bolivia",dialCode:"591"},{alpha2Code:"ba",country:"Bosnia and Herzegovina (\u0411\u043E\u0441\u043D\u0430 \u0438 \u0425\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430)",dialCode:"387"},{alpha2Code:"bw",country:"Botswana",dialCode:"267"},{alpha2Code:"br",country:"Brazil (Brasil)",dialCode:"55"},{alpha2Code:"bn",country:"Brunei",dialCode:"673"},{alpha2Code:"bg",country:"Bulgaria (\u0411\u044A\u043B\u0433\u0430\u0440\u0438\u044F)",dialCode:"359"},{alpha2Code:"bf",country:"Burkina Faso",dialCode:"226"},{alpha2Code:"bi",country:"Burundi (Uburundi)",dialCode:"257"},{alpha2Code:"kh",country:"Cambodia (\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6)",dialCode:"855"},{alpha2Code:"cm",country:"Cameroon (Cameroun)",dialCode:"237"},{alpha2Code:"ca",country:"Canada",dialCode:"1"},{alpha2Code:"cv",country:"Cape Verde (Kabu Verdi)",dialCode:"238"},{alpha2Code:"ky",country:"Cayman Islands",dialCode:"1345"},{alpha2Code:"cf",country:"Central African Republic (R\xE9publique centrafricaine)",dialCode:"236"},{alpha2Code:"td",country:"Chad (Tchad)",dialCode:"235"},{alpha2Code:"cl",country:"Chile",dialCode:"56"},{alpha2Code:"cn",country:"China (\u4E2D\u56FD)",dialCode:"86",language:"Chinese"},{alpha2Code:"co",country:"Colombia",dialCode:"57"},{alpha2Code:"km",country:"Comoros (\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631\u202C\u200E)",dialCode:"269"},{alpha2Code:"cd",country:"DR Congo (Jamhuri ya Kidemokrasia ya Kongo)",dialCode:"243"},{alpha2Code:"cg",country:"Congo (Republic) (Congo-Brazzaville)",dialCode:"242"},{alpha2Code:"ck",country:"Cook Islands",dialCode:"682"},{alpha2Code:"cr",country:"Costa Rica",dialCode:"506"},{alpha2Code:"ci",country:"C\xF4te d'Ivoire (Ivory Coast)",dialCode:"225"},{alpha2Code:"hr",country:"Croatia (Hrvatska)",dialCode:"385"},{alpha2Code:"cu",country:"Cuba",dialCode:"53"},{alpha2Code:"cy",country:"Cyprus (\u039A\u03CD\u03C0\u03C1\u03BF\u03C2)",dialCode:"357"},{alpha2Code:"cz",country:"Czech Republic (\u010Cesk\xE1 republika)",dialCode:"420"},{alpha2Code:"dk",country:"Denmark (Danmark)",dialCode:"45"},{alpha2Code:"dj",country:"Djibouti",dialCode:"253"},{alpha2Code:"dm",country:"Dominica",dialCode:"1767"},{alpha2Code:"do",country:"Dominican Republic (Rep\xFAblica Dominicana)",dialCode:"1"},{alpha2Code:"tl",country:"East Timor (Timor-Leste)",dialCode:"670"},{alpha2Code:"ec",country:"Ecuador",dialCode:"593"},{alpha2Code:"eg",country:"Egypt (\u0645\u0635\u0631\u202C\u200E)",dialCode:"20"},{alpha2Code:"sv",country:"El Salvador",dialCode:"503"},{alpha2Code:"gq",country:"Equatorial Guinea (Guinea Ecuatorial)",dialCode:"240"},{alpha2Code:"er",country:"Eritrea",dialCode:"291"},{alpha2Code:"ee",country:"Estonia (Eesti)",dialCode:"372"},{alpha2Code:"et",country:"Ethiopia",dialCode:"251"},{alpha2Code:"fk",country:"Falkland Islands (Islas Malvinas)",dialCode:"500"},{alpha2Code:"fo",country:"Faroe Islands (F\xF8royar)",dialCode:"298"},{alpha2Code:"fj",country:"Fiji",dialCode:"679"},{alpha2Code:"fi",country:"Finland (Suomi)",dialCode:"358"},{alpha2Code:"fr",country:"France",dialCode:"33"},{alpha2Code:"gf",country:"French Guiana (Guyane fran\xE7aise)",dialCode:"594"},{alpha2Code:"pf",country:"French Polynesia (Polyn\xE9sie fran\xE7aise)",dialCode:"689"},{alpha2Code:"ga",country:"Gabon",dialCode:"241"},{alpha2Code:"gm",country:"Gambia",dialCode:"220"},{alpha2Code:"ge",country:"Georgia (\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD)",dialCode:"995"},{alpha2Code:"de",country:"Germany (Deutschland)",dialCode:"49"},{alpha2Code:"gh",country:"Ghana (Gaana)",dialCode:"233"},{alpha2Code:"gi",country:"Gibraltar",dialCode:"350"},{alpha2Code:"gr",country:"Greece (\u0395\u03BB\u03BB\u03AC\u03B4\u03B1)",dialCode:"30"},{alpha2Code:"gl",country:"Greenland (Kalaallit Nunaat)",dialCode:"299"},{alpha2Code:"gd",country:"Grenada",dialCode:"1473"},{alpha2Code:"gp",country:"Guadeloupe",dialCode:"590"},{alpha2Code:"gu",country:"Guam",dialCode:"1671"},{alpha2Code:"gt",country:"Guatemala",dialCode:"502"},{alpha2Code:"gn",country:"Guinea (Guin\xE9e)",dialCode:"224"},{alpha2Code:"gw",country:"Guinea-Bissau (Guin\xE9 Bissau)",dialCode:"245"},{alpha2Code:"gy",country:"Guyana",dialCode:"592"},{alpha2Code:"ht",country:"Haiti",dialCode:"509"},{alpha2Code:"hn",country:"Honduras",dialCode:"504"},{alpha2Code:"hk",country:"Hong Kong (\u9999\u6E2F)",dialCode:"852"},{alpha2Code:"hu",country:"Hungary (Magyarorsz\xE1g)",dialCode:"36"},{alpha2Code:"is",country:"Iceland (\xCDsland)",dialCode:"354"},{alpha2Code:"in",country:"India (\u092D\u093E\u0930\u0924)",dialCode:"91"},{alpha2Code:"id",country:"Indonesia",dialCode:"62"},{alpha2Code:"ir",country:"Iran (\u0627\u06CC\u0631\u0627\u0646\u202C\u200E)",dialCode:"98"},{alpha2Code:"iq",country:"Iraq (\u0627\u0644\u0639\u0631\u0627\u0642\u202C\u200E)",dialCode:"964"},{alpha2Code:"ie",country:"Ireland",dialCode:"353"},{alpha2Code:"il",country:"Israel (\u05D9\u05E9\u05E8\u05D0\u05DC\u202C\u200E‬&lrml)",dialCode:"972"},{alpha2Code:"it",country:"Italy (Italia)",dialCode:"39"},{alpha2Code:"jm",country:"Jamaica",dialCode:"1876"},{alpha2Code:"jp",country:"Japan (\u65E5\u672C)",dialCode:"81",language:"Japanese"},{alpha2Code:"jo",country:"Jordan (\u0627\u0644\u0623\u0631\u062F\u0646\u202C\u200E)",dialCode:"962"},{alpha2Code:"kz",country:"Kazakhstan (\u041A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D)",dialCode:"7"},{alpha2Code:"ke",country:"Kenya",dialCode:"254"},{alpha2Code:"ki",country:"Kiribati",dialCode:"686"},{alpha2Code:"kw",country:"Kuwait (\u0627\u0644\u0643\u0648\u064A\u062A\u202C\u200E\u202C\u200E)",dialCode:"965"},{alpha2Code:"kg",country:"Kyrgyzstan (\u041A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D)",dialCode:"996"},{alpha2Code:"la",country:"Laos PDR (\u0EA5\u0EB2\u0EA7)",dialCode:"856"},{alpha2Code:"lv",country:"Latvia (Latvija)",dialCode:"371"},{alpha2Code:"lb",country:"Lebanon (\u0644\u0628\u0646\u0627\u0646\u202C\u200E)",dialCode:"961"},{alpha2Code:"ls",country:"Lesotho",dialCode:"266"},{alpha2Code:"lr",country:"Liberia",dialCode:"231"},{alpha2Code:"ly",country:"Libya (\u0644\u064A\u0628\u064A\u0627\u202C\u200E)",dialCode:"218"},{alpha2Code:"li",country:"Liechtenstein",dialCode:"423"},{alpha2Code:"lt",country:"Lithuania (Lietuva)",dialCode:"370"},{alpha2Code:"lu",country:"Luxembourg",dialCode:"352"},{alpha2Code:"mo",country:"Macau (\u6FB3\u9580)",dialCode:"853"},{alpha2Code:"mk",country:"Macedonia (FYROM) (\u041C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430)",dialCode:"389"},{alpha2Code:"mg",country:"Madagascar (Madagasikara)",dialCode:"261"},{alpha2Code:"mw",country:"Malawi",dialCode:"265"},{alpha2Code:"my",country:"Malaysia",dialCode:"60"},{alpha2Code:"mv",country:"Maldives",dialCode:"960"},{alpha2Code:"ml",country:"Mali",dialCode:"223"},{alpha2Code:"mt",country:"Malta",dialCode:"356"},{alpha2Code:"mh",country:"Marshall Islands",dialCode:"692"},{alpha2Code:"mq",country:"Martinique",dialCode:"596"},{alpha2Code:"mr",country:"Mauritania (\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627\u202C\u200E)",dialCode:"222"},{alpha2Code:"mu",country:"Mauritius (Moris)",dialCode:"230"},{alpha2Code:"mx",country:"Mexico (M\xE9xico)",dialCode:"52"},{alpha2Code:"fm",country:"Micronesia",dialCode:"691"},{alpha2Code:"md",country:"Moldova (Republica Moldova)",dialCode:"373"},{alpha2Code:"mc",country:"Monaco",dialCode:"377"},{alpha2Code:"mn",country:"Mongolia (\u041C\u043E\u043D\u0433\u043E\u043B)",dialCode:"976"},{alpha2Code:"me",country:"Montenegro (Crna Gora)",dialCode:"382"},{alpha2Code:"ms",country:"Montserrat",dialCode:"1664"},{alpha2Code:"ma",country:"Morocco (\u0627\u0644\u0645\u063A\u0631\u0628\u202C\u200E)",dialCode:"212"},{alpha2Code:"mz",country:"Mozambique (Mo\xE7ambique)",dialCode:"258"},{alpha2Code:"mm",country:"Myanmar (Burma) (\u1019\u103C\u1014\u103A\u1019\u102C)",dialCode:"95"},{alpha2Code:"na",country:"Namibia (Namibi\xEB)",dialCode:"264"},{alpha2Code:"np",country:"Nepal (\u0928\u0947\u092A\u093E\u0932)",dialCode:"977"},{alpha2Code:"nl",country:"Netherlands (Nederland)",dialCode:"31"},{alpha2Code:"nc",country:"New Caledonia (Nouvelle-Cal\xE9donie)",dialCode:"687"},{alpha2Code:"nz",country:"New Zealand",dialCode:"64"},{alpha2Code:"ni",country:"Nicaragua",dialCode:"505"},{alpha2Code:"ne",country:"Niger (Nijar)",dialCode:"227"},{alpha2Code:"ng",country:"Nigeria",dialCode:"234"},{alpha2Code:"nu",country:"Niue",dialCode:"683"},{alpha2Code:"nf",country:"Norfolk Island",dialCode:"672"},{alpha2Code:"no",country:"Norway (Norge)",dialCode:"47"},{alpha2Code:"om",country:"Oman (\u0639\u064F\u0645\u0627\u0646\u202C\u200E)",dialCode:"968"},{alpha2Code:"pk",country:"Pakistan (\u067E\u0627\u06A9\u0633\u062A\u0627\u0646\u202C\u200E)",dialCode:"92"},{alpha2Code:"pw",country:"Palau",dialCode:"680"},{alpha2Code:"ps",country:"Palestine (Palestinian Territory) (\u0641\u0644\u0633\u0637\u064A\u0646\u202C\u200E)",dialCode:"970"},{alpha2Code:"pa",country:"Panama (Panam\xE1)",dialCode:"507"},{alpha2Code:"pg",country:"Papua New Guinea",dialCode:"675"},{alpha2Code:"py",country:"Paraguay",dialCode:"595"},{alpha2Code:"pe",country:"Peru (Per\xFA)",dialCode:"51"},{alpha2Code:"ph",country:"Philippines",dialCode:"63",language:"Filipino"},{alpha2Code:"pl",country:"Poland (Polska)",dialCode:"48"},{alpha2Code:"pt",country:"Portugal",dialCode:"351"},{alpha2Code:"pr",country:"Puerto Rico",dialCode:"1"},{alpha2Code:"qa",country:"Qatar (\u0642\u0637\u0631\u202C\u200E)",dialCode:"974"},{alpha2Code:"re",country:"Reunion/Mayotte",dialCode:"262"},{alpha2Code:"ro",country:"Romania (Rom\xE2nia)",dialCode:"40"},{alpha2Code:"ru",country:"Russia (\u0420\u043E\u0441\u0441\u0438\u044F)",dialCode:"7",language:"Russian"},{alpha2Code:"rw",country:"Rwanda",dialCode:"250"},{alpha2Code:"ws",country:"Samoa",dialCode:"685"},{alpha2Code:"sm",country:"San Marino",dialCode:"378"},{alpha2Code:"st",country:"Sao Tome and Principe (S\xE3o Tom\xE9 and Pr\xEDncipe) (S\xE3o Tom\xE9 e Pr\xEDncipe)",dialCode:"239"},{alpha2Code:"sa",country:"Saudi Arabia (\u202B\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629\u202C\u200E)",dialCode:"966"},{alpha2Code:"sn",country:"Senegal (S\xE9n\xE9gal)",dialCode:"221"},{alpha2Code:"rs",country:"Serbia (\u0421\u0440\u0431\u0438\u0458\u0430)",dialCode:"381"},{alpha2Code:"sc",country:"Seychelles",dialCode:"248"},{alpha2Code:"sl",country:"Sierra Leone",dialCode:"232"},{alpha2Code:"sg",country:"Singapore",dialCode:"65"},{alpha2Code:"sk",country:"Slovakia (Slovensko)",dialCode:"421"},{alpha2Code:"sb",country:"Solomon Islands",dialCode:"677"},{alpha2Code:"so",country:"Somalia (Soomaaliya)",dialCode:"252"},{alpha2Code:"za",country:"South Africa",dialCode:"27"},{alpha2Code:"kr",country:"Republic Of Korea (\uB300\uD55C\uBBFC\uAD6D) (South Korea)",dialCode:"82",language:"Korean"},{alpha2Code:"es",country:"Spain (Espa\xF1a)",dialCode:"34",language:"Spanish"},{alpha2Code:"lk",country:"Sri Lanka (\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0)",dialCode:"94"},{alpha2Code:"kn",country:"St Kitts and Nevis (Saint Kitts and Nevis)",dialCode:"1869"},{alpha2Code:"lc",country:"St Lucia (Saint Lucia)",dialCode:"1758"},{alpha2Code:"pm",country:"St Pierre and Miquelon (St Pierre and Miquelon) (Saint-Pierre-et-Miquelon)",dialCode:"508"},{alpha2Code:"vc",country:"St Vincent Grenadines (Saint Vincent and the Grenadines)",dialCode:"1784"},{alpha2Code:"sd",country:"Sudan (\u0627\u0644\u0633\u0648\u062F\u0627\u0646\u202C\u200E)",dialCode:"249"},{alpha2Code:"sr",country:"Suriname",dialCode:"597"},{alpha2Code:"sz",country:"Swaziland",dialCode:"268"},{alpha2Code:"se",country:"Sweden (Sverige)",dialCode:"46"},{alpha2Code:"ch",country:"Switzerland (Schweiz)",dialCode:"41"},{alpha2Code:"sy",country:"Syria (\u0633\u0648\u0631\u064A\u0627\u202C\u200E)",dialCode:"963"},{alpha2Code:"tw",country:"Taiwan (\u53F0\u7063)",dialCode:"886"},{alpha2Code:"tj",country:"Tajikistan",dialCode:"992"},{alpha2Code:"tz",country:"Tanzania",dialCode:"255"},{alpha2Code:"th",country:"Thailand (\u0E44\u0E17\u0E22)",dialCode:"66",language:"Thailand"},{alpha2Code:"tg",country:"Togo",dialCode:"228"},{alpha2Code:"to",country:"Tonga",dialCode:"676"},{alpha2Code:"tt",country:"Trinidad and Tobago",dialCode:"1868"},{alpha2Code:"tn",country:"Tunisia (\u062A\u0648\u0646\u0633\u202C\u200E)",dialCode:"216"},{alpha2Code:"tr",country:"Turkey (T\xFCrkiye)",dialCode:"90"},{alpha2Code:"tm",country:"Turkmenistan",dialCode:"993"},{alpha2Code:"tc",country:"Turks and Caicos Islands",dialCode:"1649"},{alpha2Code:"tv",country:"Tuvalu",dialCode:"688"},{alpha2Code:"ug",country:"Uganda",dialCode:"256"},{alpha2Code:"ua",country:"Ukraine (\u0423\u043A\u0440\u0430\u0457\u043D\u0430)",dialCode:"380"},{alpha2Code:"ae",country:"United Arab Emirates (\u202B\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629\u202C\u200E)",dialCode:"971"},{alpha2Code:"gb",country:"United Kingdom",dialCode:"44"},{alpha2Code:"us",country:"United States",dialCode:"1",language:"English"},{alpha2Code:"uy",country:"Uruguay",dialCode:"598"},{alpha2Code:"uz",country:"Uzbekistan (O\u02BBzbekiston)",dialCode:"998"},{alpha2Code:"vu",country:"Vanuatu",dialCode:"678"},{alpha2Code:"ve",country:"Venezuela",dialCode:"58"},{alpha2Code:"vn",country:"Vietnam (Vi\u1EC7t Nam)",dialCode:"84"},{alpha2Code:"vg",country:"Virgin Islands, British",dialCode:"1284"},{alpha2Code:"vi",country:"Virgin Islands, U.S.",dialCode:"1340"},{alpha2Code:"wf",country:"Wallis and Futuna (Wallis-et-Futuna)",dialCode:"681"},{alpha2Code:"ye",country:"Yemen (\u0627\u0644\u064A\u0645\u0646\u202C\u200E)",dialCode:"967"},{alpha2Code:"zm",country:"Zambia",dialCode:"260"},{alpha2Code:"zw",country:"Zimbabwe",dialCode:"263"}],b={class:"country-intl-modal-container"},w={class:"country-intl-wrap"},B={key:0,class:"country-intl-top"},k=["placeholder"],S={key:1,class:"country-pos-sti-up"},D={class:"country-intl-top"},I=["placeholder"],M={class:"country-intl-lists"},A=["onClick"],x={class:"country-info"},V={class:"intl-flag-area"},N={key:0,class:"country-dial"},E=e.defineComponent({__name:"CountryIntlModal",props:{countryIntlModalIsActive:{type:Boolean},contentType:{type:String,default:"modal"},noDataText:{type:String,default:"no search data....."},searchPlaceholder:{type:String,default:"Search"},clickCloseOutSide:{type:Boolean,default:!1},showSearchCountryInput:{type:Boolean,default:!0},showDialCode:{type:Boolean,default:!0},bindingMode:{type:Number,default:1},countriesList:{type:Array,default:[]},firstValue:{type:Object,default:{}}},emits:["sendCountryInfo","sendCloseModal"],setup(c,{emit:i}){const a=c,r=e.ref(h),p=e.computed(()=>a.countryIntlModalIsActive),u=e.ref(a.firstValue),l=e.ref(""),C=e.ref(r.value),m=e.ref(),g=()=>{event==null||event.stopPropagation()},s=()=>{l.value="",i("sendCloseModal",!1)},f=n=>{u.value=C.value[n],i("sendCountryInfo",u.value),s()};return e.watch(l,()=>{let n=[];a.countriesList.length===0?n=r.value.filter(o=>{var d;return o.alpha2Code.toLowerCase().includes(l.value.toLowerCase())||o.country.toLowerCase().includes(l.value.toLowerCase())||o.dialCode.includes(l.value)||((d=o==null?void 0:o.language)==null?void 0:d.toLowerCase().includes(l.value.toLowerCase()))}):a.countriesList.length>0&&(n=Array.of(...m.value).filter(o=>{var d;return(d=o==null?void 0:o.language)==null?void 0:d.toLowerCase().includes(l.value.toLowerCase())})),C.value=n}),e.onMounted(()=>{if(a!=null&&a.clickCloseOutSide&&window.addEventListener("click",s),(a==null?void 0:a.countriesList.length)>0){let n=[];const o=Array.of(...a.countriesList);o.sort();for(let d=0;dy.alpha2Code===o[d]);n.push(t)}m.value=n.sort(),C.value=n.sort()}i("sendCountryInfo",u.value)}),e.onUnmounted(()=>{a!=null&&a.clickCloseOutSide&&window.removeEventListener("click",s)}),(n,o)=>{var d;return e.openBlock(),e.createElementBlock("div",b,[e.createElementVNode("div",{onClick:o[4]||(o[4]=t=>g()),class:e.normalizeClass([a.contentType==="modal"?"country-intl-modal":(a==null?void 0:a.contentType)==="dropdown"?"country-intl-dropdown":"country-intl-dropdown-up",e.unref(p)?"show":"",a.bindingMode===2&&a.contentType==="dropdown"?"language":""])},[e.createElementVNode("div",w,[e.createElementVNode("i",{class:"country-intl-close-btn",onClick:o[0]||(o[0]=t=>s())}),a!=null&&a.showSearchCountryInput?(e.openBlock(),e.createElementBlock("div",B,[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":o[1]||(o[1]=t=>l.value=t),class:"country-intl-search-input",placeholder:a==null?void 0:a.searchPlaceholder},null,8,k),[[e.vModelText,l.value]])])):e.createCommentVNode("",!0),(d=a==null?void 0:a.contentType)!=null&&d.includes("dropdown-up")?(e.openBlock(),e.createElementBlock("div",S,[e.createElementVNode("i",{class:"country-intl-close-btn",onClick:o[2]||(o[2]=t=>s())}),e.createElementVNode("div",D,[e.withDirectives(e.createElementVNode("input",{type:"text","onUpdate:modelValue":o[3]||(o[3]=t=>l.value=t),class:"country-intl-search-input",placeholder:a==null?void 0:a.searchPlaceholder},null,8,I),[[e.vModelText,l.value]])])])):e.createCommentVNode("",!0)])],2),e.createElementVNode("div",{onClick:o[5]||(o[5]=t=>g()),class:e.normalizeClass([a.contentType==="modal"?"country-intl-modal-body":(a==null?void 0:a.contentType)==="dropdown"?"country-intl-dropdown-body":"",e.unref(p)?"show":"",c.showSearchCountryInput?"":"no-search",a.bindingMode===2&&a.contentType==="dropdown"?"language":""])},[e.withDirectives(e.createElementVNode("div",{class:"country-intl-search-no-data"},e.toDisplayString(a.noDataText),513),[[e.vShow,C.value.length===0]]),e.withDirectives(e.createElementVNode("ul",M,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(t,y)=>(e.openBlock(),e.createElementBlock("li",{key:y,class:e.normalizeClass(["country-intl-list",{selected:t.alpha2Code===u.value.alpha2Code}]),onClick:U=>f(y)},[e.createElementVNode("div",x,[e.createElementVNode("div",V,[e.createElementVNode("img",{class:e.normalizeClass(["intl-flag",t.alpha2Code])},null,2)]),e.createElementVNode("span",null,e.toDisplayString(a.bindingMode===1||a.bindingMode===3?t.country.split("(")[0]:a.bindingMode===2?t==null?void 0:t.language:""),1)]),a.showDialCode&&a.bindingMode===1?(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("span",null,"+"+e.toDisplayString(t.dialCode),1)])):e.createCommentVNode("",!0)],10,A))),128))],512),[[e.vShow,C.value.length>0]])],2)])}}}),R="",_=[e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M16.7071 8.29289C17.0976 8.68342 17.0976 9.31658 16.7071 9.70711L11.7071 14.7071C11.3166 15.0976 10.6834 15.0976 10.2929 14.7071L5.29289 9.70711C4.90237 9.31658 4.90237 8.68342 5.29289 8.29289C5.68342 7.90237 6.31658 7.90237 6.70711 8.29289L11 12.5858L15.2929 8.29289C15.6834 7.90237 16.3166 7.90237 16.7071 8.29289Z",fill:"#979797"},null,-1)],T=e.defineComponent({__name:"DropdownArrow",props:{countryIntlModalIsActive:{type:Boolean,default:!1}},setup(c){const i=c;return(a,r)=>(e.openBlock(),e.createElementBlock("svg",{width:"18",height:"18",viewBox:"0 0 22 22",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:e.normalizeClass(["vue3-intl-input-arrow-controller",{"vue3-intl-input-deg180":i.countryIntlModalIsActive}])},_,2))}}),K="",v={class:"country-intl-input-group"},L={class:"country-intl-input-title"},F={class:"country-intl-input-wrap"},P={class:"country-intl-dial-code"},z=["placeholder","maxlength"],G=e.createElementVNode("i",{class:"ico ico-reset"},null,-1),$=e.defineComponent({__name:"vue3-intl-input",props:{firstValue:{type:Object},inputInfoMsg:{type:String},title:{type:String,default:"Phone Number"},placeholder:{type:String,default:"Phone number"},searchPlaceholder:{type:String,default:"Search"},contentType:{type:String,default:"modal"},maxlength:{type:String,default:"13"},noDataText:{type:String,default:"No Search Data...."},effect:{type:Boolean,default:!1},clickCloseOutSide:{type:Boolean,default:!1},showTelInput:{type:Boolean,default:!0},showDialCode:{type:Boolean,default:!0},showSearchCountryInput:{type:Boolean,default:!0},bindingMode:{type:Number,default:1},countriesList:{type:Array,default:[]},color:{type:String,default:"white"}},emits:["sendIntlModalIsActive","sendInputValue","sendCountryInfo"],setup(c,{emit:i}){const a=c,r=e.ref(!1),p=e.ref(!1),u=e.ref(""),l=e.ref(a.firstValue?{alpha2Code:a.firstValue.alpha2Code,country:a.firstValue.country,dialCode:a.firstValue.dialCode,language:a.firstValue.language}:{alpha2Code:"us",country:"United States",dialCode:"1",language:"English"}),C=()=>{u.value=""},m=n=>{l.value=n,i("sendCountryInfo",n)},g=n=>{r.value=n,i("sendIntlModalIsActive",n)},s=()=>{event==null||event.stopPropagation(),r.value=!r.value,i("sendIntlModalIsActive",!0)};let f="";return e.watch(u,()=>{var y;u.value.match(/[^0-9]/)!==null&&u.value.length<14?u.value=f:f=u.value;const n=l.value.alpha2Code,o=l.value.dialCode,d=(y=l.value)==null?void 0:y.country,t=u.value;i("sendInputValue",{alpha2Code:n,dialCode:o,countryName:d,phoneNumber:t})}),(n,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[a!=null&&a.contentType.includes("modal")?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(E,{countryIntlModalIsActive:r.value,noDataText:a==null?void 0:a.noDataText,clickCloseOutSide:a==null?void 0:a.clickCloseOutSide,searchPlaceholder:a==null?void 0:a.searchPlaceholder,showSearchCountryInput:a==null?void 0:a.showSearchCountryInput,showDialCode:a==null?void 0:a.showDialCode,countriesList:a==null?void 0:a.countriesList,bindingMode:a==null?void 0:a.bindingMode,firstValue:l.value,onSendCloseModal:g,onSendCountryInfo:m},null,8,["countryIntlModalIsActive","noDataText","clickCloseOutSide","searchPlaceholder","showSearchCountryInput","showDialCode","countriesList","bindingMode","firstValue"])])):e.createCommentVNode("",!0),e.createElementVNode("div",v,[e.createElementVNode("div",L,e.toDisplayString(a==null?void 0:a.title),1),e.createElementVNode("div",F,[e.createElementVNode("button",{type:"button",onClick:o[0]||(o[0]=d=>s()),class:"country-intl-tel-btn"},[e.createElementVNode("img",{class:e.normalizeClass(["intl-flag",[{effect:a==null?void 0:a.effect},l.value.alpha2Code]])},null,2),e.createElementVNode("span",P,e.toDisplayString(a.bindingMode===1?"+"+l.value.dialCode:a.bindingMode===2?l.value.language:a.bindingMode===3?l.value.country.split("(")[0]:""),1),e.createVNode(T,{countryIntlModalIsActive:r.value},null,8,["countryIntlModalIsActive"])]),a!=null&&a.contentType.includes("dropdown")?(e.openBlock(),e.createBlock(E,{key:0,countryIntlModalIsActive:r.value,contentType:a==null?void 0:a.contentType,noDataText:a==null?void 0:a.noDataText,clickCloseOutSide:a==null?void 0:a.clickCloseOutSide,searchPlaceholder:a==null?void 0:a.searchPlaceholder,showSearchCountryInput:a==null?void 0:a.showSearchCountryInput,showDialCode:a==null?void 0:a.showDialCode,countriesList:a==null?void 0:a.countriesList,bindingMode:a==null?void 0:a.bindingMode,firstValue:l.value,onSendCloseModal:g,onSendCountryInfo:m},null,8,["countryIntlModalIsActive","contentType","noDataText","clickCloseOutSide","searchPlaceholder","showSearchCountryInput","showDialCode","countriesList","bindingMode","firstValue"])):e.createCommentVNode("",!0),a.showTelInput?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.withDirectives(e.createElementVNode("input",{type:"text",class:"country-intl-form-control",placeholder:a==null?void 0:a.placeholder,autocomplete:"off","onUpdate:modelValue":o[1]||(o[1]=d=>u.value=d),onFocus:o[2]||(o[2]=d=>p.value=!0),maxlength:a==null?void 0:a.maxlength},null,40,z),[[e.vModelText,u.value]]),e.withDirectives(e.createElementVNode("button",{type:"button",class:"country-intl-input-clear-btn",onClick:o[3]||(o[3]=d=>C()),tabindex:"-1"},[e.createTextVNode(" reset "),G],512),[[e.vShow,u.value.length>0]])],64)):e.createCommentVNode("",!0)]),a.showTelInput?e.withDirectives((e.openBlock(),e.createElementBlock("p",{key:0,class:"country-intl-input-feed"},e.toDisplayString(a==null?void 0:a.inputInfoMsg),513)),[[e.vShow,p.value]]):e.createCommentVNode("",!0)])],64))}}),O="";return{install:(c,i)=>{c.component("vue3-intl-input",$)}}});