{"version":3,"sources":["../source/CountrySelect.js"],"names":["CountrySelect","value","onChange","options","rest","onChange_","event","target","undefined","selectedOption","getSelectedOption","map","label","divider","DIVIDER_STYLE","propTypes","PropTypes","string","func","isRequired","arrayOf","shape","bool","fontSize","backgroundColor","color","CountrySelectWithIcon","className","Icon","iconComponent","getIconAspectRatio","Arrow","arrowComponent","unicodeFlags","elementType","defaultProps","option"],"mappings":";;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;AAEe,SAASA,aAAT,OAKZ;AAAA,MAJFC,KAIE,QAJFA,KAIE;AAAA,MAHFC,QAGE,QAHFA,QAGE;AAAA,MAFFC,OAEE,QAFFA,OAEE;AAAA,MADCC,IACD;;AACF,MAAMC,SAAS,GAAG,wBAAY,UAACC,KAAD,EAAW;AACxC,QAAML,KAAK,GAAGK,KAAK,CAACC,MAAN,CAAaN,KAA3B;AACAC,IAAAA,QAAQ,CAACD,KAAK,KAAK,IAAV,GAAiBO,SAAjB,GAA6BP,KAA9B,CAAR;AACA,GAHiB,EAGf,CAACC,QAAD,CAHe,CAAlB;AAKA,MAAMO,cAAc,GAAG,oBAAQ,YAAM;AACpC,WAAOC,iBAAiB,CAACP,OAAD,EAAUF,KAAV,CAAxB;AACA,GAFsB,EAEpB,CAACE,OAAD,EAAUF,KAAV,CAFoB,CAAvB,CANE,CAUF;AACA;;AACA,SACC,uDACKG,IADL;AAEC,IAAA,KAAK,EAAEH,KAAK,IAAI,IAFjB;AAGC,IAAA,QAAQ,EAAEI;AAHX,MAIEF,OAAO,CAACQ,GAAR,CAAY;AAAA,QAAGV,KAAH,SAAGA,KAAH;AAAA,QAAUW,KAAV,SAAUA,KAAV;AAAA,QAAiBC,OAAjB,SAAiBA,OAAjB;AAAA,WACZ;AACC,MAAA,GAAG,EAAEA,OAAO,GAAG,GAAH,GAASZ,KAAK,IAAI,IAD/B;AAEC,MAAA,KAAK,EAAEY,OAAO,GAAG,GAAH,GAASZ,KAAK,IAAI,IAFjC;A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A,OAAO,EAAEE,OAHV;AAIC,IAAA,SAAS,EAAE,4BAAW,yBAAX,EAAsCwB,SAAtC;AAJZ,KADD,EAQGM,YAAY,IAAIhC,KAAjB,IACA;AAAK,IAAA,SAAS,EAAC;AAAf,KACE,yBAAmBA,KAAnB,CADF,CATF,EAeE,EAAEgC,YAAY,IAAIhC,KAAlB,KACA,gCAAC,IAAD;AACC,IAAA,OAAO,EAAEA,KADV;AAEC,IAAA,KAAK,EAAEQ,cAAc,IAAIA,cAAc,CAACG,KAFzC;AAGC,IAAA,WAAW,EAAEqB,YAAY,GAAG,CAAH,GAAOzB;AAHjC,IAhBF,EAsBC,gCAAC,KAAD,OAtBD,CADD;AA0BA;;AAEDkB,qBAAqB,CAACX,SAAtB,GAAkC;AACjC;AACAc,EAAAA,aAAa,EAAEb,sBAAUkB,WAFQ;AAIjC;AACAF,EAAAA,cAAc,EAAEhB,sBAAUkB,WAAV,CAAsBf,UALL;AAOjC;AACAc,EAAAA,YAAY,EAAEjB,sBAAUM;AARS,CAAlC;AAWAI,qBAAqB,CAACS,YAAtB,GAAqC;AACpC;AACAH,EAAAA,cAAc,EAAE;AAAA,WAAM;AAAK,MAAA,SAAS,EAAC;AAAf,MAAN;AAAA;AAFoB,CAArC;;AAKA,SAAStB,iBAAT,CAA2BP,OAA3B,EAAoCF,KAApC,EAA2C;AAC1C,uBAAqBE,OAArB,kHAA8B;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAAA,QAAnBiC,MAAmB;;AAC7B,QAAI,CAACA,MAAM,CAACvB,OAAR,IAAmBuB,MAAM,CAACnC,KAAP,KAAiBA,KAAxC,EAA+C;AAC9C,aAAOmC,MAAP;AACA;AACD;AACD","sourcesContent":["import React, { useCallback, useMemo } from 'react'\r\nimport PropTypes from 'prop-types'\r\nimport classNames from 'classnames'\r\nimport getUnicodeFlagIcon from 'country-flag-icons/unicode'\r\n\r\nexport default function CountrySelect({\r\n\tvalue,\r\n\tonChange,\r\n\toptions,\r\n\t...rest\r\n}) {\r\n\tconst onChange_ = useCallback((event) => {\r\n\t\tconst value = event.target.value\r\n\t\tonChange(value === 'ZZ' ? undefined : value)\r\n\t}, [onChange])\r\n\r\n\tconst selectedOption = useMemo(() => {\r\n\t\treturn getSelectedOption(options, value)\r\n\t}, [options, value])\r\n\r\n\t// \"ZZ\" means \"International\".\r\n\t// (HTML requires each `\r\n\t\t\t))}\r\n\t\t\r\n\t)\r\n}\r\n\r\nCountrySelect.propTypes = {\r\n\t/**\r\n\t * A two-letter country code.\r\n\t * Example: \"US\", \"RU\", etc.\r\n\t */\r\n\tvalue: PropTypes.string,\r\n\r\n\t/**\r\n\t * Updates the `value`.\r\n\t */\r\n\tonChange: PropTypes.func.isRequired,\r\n\r\n\t// `