react-simple-phone-input
Advanced tools
Comparing version 4.1.1 to 4.4.0
@@ -1,11 +0,2 @@ | ||
"use strict";var e,o=require("react"),n={exports:{}},r={};var t,c,a={}; | ||
/** | ||
* @license React | ||
* react-jsx-runtime.development.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/function l(){return t||(t=1,"production"!==process.env.NODE_ENV&&function(){var e=o,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),i=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),f=Symbol.iterator;var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(e){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];v("error",e,n)}function v(e,o,n){var r=m.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(o+="%s",n=n.concat([r]));var t=n.map((function(e){return String(e)}));t.unshift("Warning: "+o),Function.prototype.apply.call(console[e],console,t)}var b;function S(e){return e.displayName||"Context"}function w(e){if(null==e)return null;if("number"==typeof e.tag&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case t:return"Fragment";case r:return"Portal";case l:return"Profiler";case c:return"StrictMode";case y:return"Suspense";case s:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case i:return S(e)+".Consumer";case u:return S(e._context)+".Provider";case d:return function(e,o,n){var r=e.displayName;if(r)return r;var t=o.displayName||o.name||"";return""!==t?n+"("+t+")":n}(e,e.render,"ForwardRef");case C:var o=e.displayName||null;return null!==o?o:w(e.type)||"Memo";case g:var n=e,a=n._payload,p=n._init;try{return w(p(a))}catch(e){return null}}return null}b=Symbol.for("react.module.reference");var x,N,T,E,R,j,k,M=Object.assign,P=0;function _(){}_.__reactDisabledLog=!0;var I,O=m.ReactCurrentDispatcher;function A(e,o,n){if(void 0===I)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);I=r&&r[1]||""}return"\n"+I+e}var B,F=!1,G="function"==typeof WeakMap?WeakMap:Map;function D(e,o){if(!e||F)return"";var n,r=B.get(e);if(void 0!==r)return r;F=!0;var t,c=Error.prepareStackTrace;Error.prepareStackTrace=void 0,t=O.current,O.current=null,function(){if(0===P){x=console.log,N=console.info,T=console.warn,E=console.error,R=console.group,j=console.groupCollapsed,k=console.groupEnd;var e={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}P++}();try{if(o){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(e){n=e}Reflect.construct(e,[],a)}else{try{a.call()}catch(e){n=e}e.call(a.prototype)}}else{try{throw Error()}catch(e){n=e}e()}}catch(o){if(o&&n&&"string"==typeof o.stack){for(var l=o.stack.split("\n"),u=n.stack.split("\n"),i=l.length-1,d=u.length-1;i>=1&&d>=0&&l[i]!==u[d];)d--;for(;i>=1&&d>=0;i--,d--)if(l[i]!==u[d]){if(1!==i||1!==d)do{if(i--,--d<0||l[i]!==u[d]){var y="\n"+l[i].replace(" at new "," at ");return e.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",e.displayName)),"function"==typeof e&&B.set(e,y),y}}while(i>=1&&d>=0);break}}}finally{F=!1,O.current=t,function(){if(0==--P){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},e,{value:x}),info:M({},e,{value:N}),warn:M({},e,{value:T}),error:M({},e,{value:E}),group:M({},e,{value:R}),groupCollapsed:M({},e,{value:j}),groupEnd:M({},e,{value:k})})}P<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=c}var s=e?e.displayName||e.name:"",C=s?A(s):"";return"function"==typeof e&&B.set(e,C),C}function L(e,o,n){if(null==e)return"";if("function"==typeof e)return D(e,!(!(r=e.prototype)||!r.isReactComponent));var r;if("string"==typeof e)return A(e);switch(e){case y:return A("Suspense");case s:return A("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case d:return D(e.render,!1);case C:return L(e.type,o,n);case g:var t=e,c=t._payload,a=t._init;try{return L(a(c),o,n)}catch(e){}}return""}B=new G;var U=Object.prototype.hasOwnProperty,K={},$=m.ReactDebugCurrentFrame;function V(e){if(e){var o=e._owner,n=L(e.type,e._source,o?o.type:null);$.setExtraStackFrame(n)}else $.setExtraStackFrame(null)}var W=Array.isArray;function z(e){return W(e)}function H(e){return""+e}function Y(e){if(function(e){try{return H(e),!1}catch(e){return!0}}(e))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(e){return"function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}(e)),H(e)}var Z,J,q,Q=m.ReactCurrentOwner,X={key:!0,ref:!0,__self:!0,__source:!0};q={};function ee(e,o,r,t,c){var a,l={},u=null,i=null;for(a in void 0!==r&&(Y(r),u=""+r),function(e){if(U.call(e,"key")){var o=Object.getOwnPropertyDescriptor(e,"key").get;if(o&&o.isReactWarning)return!1}return void 0!==e.key}(o)&&(Y(o.key),u=""+o.key),function(e){if(U.call(e,"ref")){var o=Object.getOwnPropertyDescriptor(e,"ref").get;if(o&&o.isReactWarning)return!1}return void 0!==e.ref}(o)&&(i=o.ref,function(e,o){if("string"==typeof e.ref&&Q.current&&o&&Q.current.stateNode!==o){var n=w(Q.current.type);q[n]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',w(Q.current.type),e.ref),q[n]=!0)}}(o,c)),o)U.call(o,a)&&!X.hasOwnProperty(a)&&(l[a]=o[a]);if(e&&e.defaultProps){var d=e.defaultProps;for(a in d)void 0===l[a]&&(l[a]=d[a])}if(u||i){var y="function"==typeof e?e.displayName||e.name||"Unknown":e;u&&function(e,o){var n=function(){Z||(Z=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",o))};n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(l,y),i&&function(e,o){var n=function(){J||(J=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",o))};n.isReactWarning=!0,Object.defineProperty(e,"ref",{get:n,configurable:!0})}(l,y)}return function(e,o,r,t,c,a,l){var u={$$typeof:n,type:e,key:o,ref:r,props:l,_owner:a,_store:{}};return Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:t}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:c}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u}(e,u,i,c,t,Q.current,l)}var oe,ne=m.ReactCurrentOwner,re=m.ReactDebugCurrentFrame;function te(e){if(e){var o=e._owner,n=L(e.type,e._source,o?o.type:null);re.setExtraStackFrame(n)}else re.setExtraStackFrame(null)}function ce(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}function ae(){if(ne.current){var e=w(ne.current.type);if(e)return"\n\nCheck the render method of `"+e+"`."}return""}oe=!1;var le={};function ue(e,o){if(e._store&&!e._store.validated&&null==e.key){e._store.validated=!0;var n=function(e){var o=ae();if(!o){var n="string"==typeof e?e:e.displayName||e.name;n&&(o="\n\nCheck the top-level render call using <"+n+">.")}return o}(o);if(!le[n]){le[n]=!0;var r="";e&&e._owner&&e._owner!==ne.current&&(r=" It was passed a child from "+w(e._owner.type)+"."),te(e),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),te(null)}}}function ie(e,o){if("object"==typeof e)if(z(e))for(var n=0;n<e.length;n++){var r=e[n];ce(r)&&ue(r,o)}else if(ce(e))e._store&&(e._store.validated=!0);else if(e){var t=function(e){if(null===e||"object"!=typeof e)return null;var o=f&&e[f]||e["@@iterator"];return"function"==typeof o?o:null}(e);if("function"==typeof t&&t!==e.entries)for(var c,a=t.call(e);!(c=a.next()).done;)ce(c.value)&&ue(c.value,o)}}function de(e){var o,n=e.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)o=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==d&&n.$$typeof!==C)return;o=n.propTypes}if(o){var r=w(n);!function(e,o,n,r,t){var c=Function.call.bind(U);for(var a in e)if(c(e,a)){var l=void 0;try{if("function"!=typeof e[a]){var u=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}l=e[a](o,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(e){l=e}!l||l instanceof Error||(V(t),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof l),V(null)),l instanceof Error&&!(l.message in K)&&(K[l.message]=!0,V(t),h("Failed %s type: %s",n,l.message),V(null))}}(o,e.props,"prop",r,e)}else if(void 0!==n.PropTypes&&!oe){oe=!0,h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ye(e,o,r,a,f,m){var v=function(e){return"string"==typeof e||"function"==typeof e||e===t||e===l||e===c||e===y||e===s||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===C||e.$$typeof===u||e.$$typeof===i||e.$$typeof===d||e.$$typeof===b||void 0!==e.getModuleId)}(e);if(!v){var S="";(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(S+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var x,N=function(e){return void 0!==e?"\n\nCheck your code at "+e.fileName.replace(/^.*[\\\/]/,"")+":"+e.lineNumber+".":""}(f);S+=N||ae(),null===e?x="null":z(e)?x="array":void 0!==e&&e.$$typeof===n?(x="<"+(w(e.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):x=typeof e,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",x,S)}var T=ee(e,o,r,f,m);if(null==T)return T;if(v){var E=o.children;if(void 0!==E)if(a)if(z(E)){for(var R=0;R<E.length;R++)ie(E[R],e);Object.freeze&&Object.freeze(E)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ie(E,e)}return e===t?function(e){for(var o=Object.keys(e.props),n=0;n<o.length;n++){var r=o[n];if("children"!==r&&"key"!==r){te(e),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),te(null);break}}null!==e.ref&&(te(e),h("Invalid attribute `ref` supplied to `React.Fragment`."),te(null))}(T):de(T),T}var se=function(e,o,n){return ye(e,o,n,!1)},Ce=function(e,o,n){return ye(e,o,n,!0)};a.Fragment=t,a.jsx=se,a.jsxs=Ce}()),a}c=n,"production"===process.env.NODE_ENV?c.exports=function(){if(e)return r;e=1;var n=o,t=Symbol.for("react.element"),c=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function i(e,o,n){var r,c={},i=null,d=null;for(r in void 0!==n&&(i=""+n),void 0!==o.key&&(i=""+o.key),void 0!==o.ref&&(d=o.ref),o)a.call(o,r)&&!u.hasOwnProperty(r)&&(c[r]=o[r]);if(e&&e.defaultProps)for(r in o=e.defaultProps)void 0===c[r]&&(c[r]=o[r]);return{$$typeof:t,type:e,key:i,ref:d,props:c,_owner:l.current}}return r.Fragment=c,r.jsx=i,r.jsxs=i,r}():c.exports=l();const u=[{country:"Afghanistan",countryCode:"AF",callingCode:"+93"},{country:"Albania",countryCode:"AL",callingCode:"+355"},{country:"Algeria",countryCode:"DZ",callingCode:"+213"},{country:"American Samoa",countryCode:"AS",callingCode:"+1684"},{country:"Andorra",countryCode:"AD",callingCode:"+376"},{country:"Angola",countryCode:"AO",callingCode:"+244"},{country:"Anguilla",countryCode:"AI",callingCode:"+1264"},{country:"Antarctica",countryCode:"AQ",callingCode:"+672"},{country:"Antigua and Barbuda",countryCode:"AG",callingCode:"+1268"},{country:"Argentina",countryCode:"AR",callingCode:"+54"},{country:"Armenia",countryCode:"AM",callingCode:"+374"},{country:"Aruba",countryCode:"AW",callingCode:"+297"},{country:"Australia",countryCode:"AU",callingCode:"+61"},{country:"Austria",countryCode:"AT",callingCode:"+43"},{country:"Azerbaijan",countryCode:"AZ",callingCode:"+994"},{country:"Bahamas",countryCode:"BS",callingCode:"+1242"},{country:"Bahrain",countryCode:"BH",callingCode:"+973"},{country:"Bangladesh",countryCode:"BD",callingCode:"+880"},{country:"Barbados",countryCode:"BB",callingCode:"+1246"},{country:"Belarus",countryCode:"BY",callingCode:"+375"},{country:"Belgium",countryCode:"BE",callingCode:"+32"},{country:"Belize",countryCode:"BZ",callingCode:"+501"},{country:"Benin",countryCode:"BJ",callingCode:"+229"},{country:"Bermuda",countryCode:"BM",callingCode:"+1441"},{country:"Bhutan",countryCode:"BT",callingCode:"+975"},{country:"Bolivia",countryCode:"BO",callingCode:"+591"},{country:"Bosnia and Herzegovina",countryCode:"BA",callingCode:"+387"},{country:"Botswana",countryCode:"BW",callingCode:"+267"},{country:"Bouvet Island",countryCode:"BV",callingCode:"+47"},{country:"Brazil",countryCode:"BR",callingCode:"+55"},{country:"British Indian Ocean Territory",countryCode:"IO",callingCode:"+246"},{country:"British Virgin Islands",countryCode:"VG",callingCode:"+1284"},{country:"Brunei",countryCode:"BN",callingCode:"+673"},{country:"Bulgaria",countryCode:"BG",callingCode:"+359"},{country:"Burkina Faso",countryCode:"BF",callingCode:"+226"},{country:"Burundi",countryCode:"BI",callingCode:"+257"},{country:"Cambodia",countryCode:"KH",callingCode:"+855"},{country:"Cameroon",countryCode:"CM",callingCode:"+237"},{country:"Canada",countryCode:"CA",callingCode:"+1"},{country:"Cape Verde",countryCode:"CV",callingCode:"+238"},{country:"Cayman Islands",countryCode:"KY",callingCode:"+1345"},{country:"Central African Republic",countryCode:"CF",callingCode:"+236"},{country:"Chad",countryCode:"TD",callingCode:"+235"},{country:"Chile",countryCode:"CL",callingCode:"+56"},{country:"China",countryCode:"CN",callingCode:"+86"},{country:"Christmas Island",countryCode:"CX",callingCode:"+61"},{country:"Cocos Islands",countryCode:"CC",callingCode:"+61"},{country:"Colombia",countryCode:"CO",callingCode:"+57"},{country:"Comoros",countryCode:"KM",callingCode:"+269"},{country:"Cook Islands",countryCode:"CK",callingCode:"+682"},{country:"Costa Rica",countryCode:"CR",callingCode:"+506"},{country:"Croatia",countryCode:"HR",callingCode:"+385"},{country:"Cuba",countryCode:"CU",callingCode:"+53"},{country:"Cyprus",countryCode:"CY",callingCode:"+357"},{country:"Czech Republic",countryCode:"CZ",callingCode:"+420"},{country:"Democratic Republic of the Congo",countryCode:"CD",callingCode:"+243"},{country:"Denmark",countryCode:"DK",callingCode:"+45"},{country:"Djibouti",countryCode:"DJ",callingCode:"+253"},{country:"Dominica",countryCode:"DM",callingCode:"+1767"},{country:"Dominican Republic",countryCode:"DO",callingCode:"+1"},{country:"East Timor",countryCode:"TL",callingCode:"+670"},{country:"Ecuador",countryCode:"EC",callingCode:"+593"},{country:"Egypt",countryCode:"EG",callingCode:"+20"},{country:"El Salvador",countryCode:"SV",callingCode:"+503"},{country:"Equatorial Guinea",countryCode:"GQ",callingCode:"+240"},{country:"Eritrea",countryCode:"ER",callingCode:"+291"},{country:"Estonia",countryCode:"EE",callingCode:"+372"},{country:"Ethiopia",countryCode:"ET",callingCode:"+251"},{country:"Falkland Islands",countryCode:"FK",callingCode:"+500"},{country:"Faroe Islands",countryCode:"FO",callingCode:"+298"},{country:"Fiji",countryCode:"FJ",callingCode:"+679"},{country:"Finland",countryCode:"FI",callingCode:"+358"},{country:"France",countryCode:"FR",callingCode:"+33"},{country:"French Guiana",countryCode:"GF",callingCode:"+594"},{country:"French Polynesia",countryCode:"PF",callingCode:"+689"},{country:"French Southern Territories",countryCode:"TF",callingCode:"+262"},{country:"Gabon",countryCode:"GA",callingCode:"+241"},{country:"Gambia",countryCode:"GM",callingCode:"+220"},{country:"Georgia",countryCode:"GE",callingCode:"+995"},{country:"Germany",countryCode:"DE",callingCode:"+49"},{country:"Ghana",countryCode:"GH",callingCode:"+233"},{country:"Gibraltar",countryCode:"GI",callingCode:"+350"},{country:"Greece",countryCode:"GR",callingCode:"+30"},{country:"Greenland",countryCode:"GL",callingCode:"+299"},{country:"Grenada",countryCode:"GD",callingCode:"+473"},{country:"Guadeloupe",countryCode:"GP",callingCode:"+590"},{country:"Guam",countryCode:"GU",callingCode:"+1671"},{country:"Guatemala",countryCode:"GT",callingCode:"+502"},{country:"Guinea",countryCode:"GN",callingCode:"+224"},{country:"Guinea-Bissau",countryCode:"GW",callingCode:"+245"},{country:"Guyana",countryCode:"GY",callingCode:"+592"},{country:"Haiti",countryCode:"HT",callingCode:"+509"},{country:"Honduras",countryCode:"HN",callingCode:"+504"},{country:"Hong Kong",countryCode:"HK",callingCode:"+852"},{country:"Hungary",countryCode:"HU",callingCode:"+36"},{country:"Iceland",countryCode:"IS",callingCode:"+354"},{country:"India",countryCode:"IN",callingCode:"+91"},{country:"Indonesia",countryCode:"ID",callingCode:"+62"},{country:"Iran",countryCode:"IR",callingCode:"+98"},{country:"Iraq",countryCode:"IQ",callingCode:"+964"},{country:"Ireland",countryCode:"IE",callingCode:"+353"},{country:"Israel",countryCode:"IL",callingCode:"+972"},{country:"Italy",countryCode:"IT",callingCode:"+39"},{country:"Ivory Coast",countryCode:"CI",callingCode:"+225"},{country:"Jamaica",countryCode:"JM",callingCode:"+1876"},{country:"Japan",countryCode:"JP",callingCode:"+81"},{country:"Jordan",countryCode:"JO",callingCode:"+962"},{country:"Kazakhstan",countryCode:"KZ",callingCode:"+7"},{country:"Kenya",countryCode:"KE",callingCode:"+254"},{country:"Kiribati",countryCode:"KI",callingCode:"+686"},{country:"Kuwait",countryCode:"KW",callingCode:"+965"},{country:"Kyrgyzstan",countryCode:"KG",callingCode:"+996"},{country:"Laos",countryCode:"LA",callingCode:"+856"},{country:"Latvia",countryCode:"LV",callingCode:"+371"},{country:"Lebanon",countryCode:"LB",callingCode:"+961"},{country:"Lesotho",countryCode:"LS",callingCode:"+266"},{country:"Liberia",countryCode:"LR",callingCode:"+231"},{country:"Libya",countryCode:"LY",callingCode:"+218"},{country:"Liechtenstein",countryCode:"LI",callingCode:"+423"},{country:"Lithuania",countryCode:"LT",callingCode:"+370"},{country:"Luxembourg",countryCode:"LU",callingCode:"+352"},{country:"Macao",countryCode:"MO",callingCode:"+853"},{country:"Macedonia",countryCode:"MK",callingCode:"+389"},{country:"Madagascar",countryCode:"MG",callingCode:"+261"},{country:"Malawi",countryCode:"MW",callingCode:"+265"},{country:"Malaysia",countryCode:"MY",callingCode:"+60"},{country:"Maldives",countryCode:"MV",callingCode:"+960"},{country:"Mali",countryCode:"ML",callingCode:"+223"},{country:"Malta",countryCode:"MT",callingCode:"+356"},{country:"Marshall Islands",countryCode:"MH",callingCode:"+692"},{country:"Martinique",countryCode:"MQ",callingCode:"+596"},{country:"Mauritania",countryCode:"MR",callingCode:"+222"},{country:"Mauritius",countryCode:"MU",callingCode:"+230"},{country:"Mayotte",countryCode:"YT",callingCode:"+262"},{country:"Mexico",countryCode:"MX",callingCode:"+52"},{country:"Micronesia",countryCode:"FM",callingCode:"+691"},{country:"Moldova",countryCode:"MD",callingCode:"+373"},{country:"Monaco",countryCode:"MC",callingCode:"+377"},{country:"Mongolia",countryCode:"MN",callingCode:"+976"},{country:"Montserrat",countryCode:"MS",callingCode:"+1664"},{country:"Morocco",countryCode:"MA",callingCode:"+212"},{country:"Mozambique",countryCode:"MZ",callingCode:"+258"},{country:"Myanmar",countryCode:"MM",callingCode:"+95"},{country:"Namibia",countryCode:"NA",callingCode:"+264"},{country:"Nauru",countryCode:"NR",callingCode:"+674"},{country:"Nepal",countryCode:"NP",callingCode:"+977"},{country:"Netherlands",countryCode:"NL",callingCode:"+31"},{country:"New Caledonia",countryCode:"NC",callingCode:"+687"},{country:"New Zealand",countryCode:"NZ",callingCode:"+64"},{country:"Nicaragua",countryCode:"NI",callingCode:"+505"},{country:"Niger",countryCode:"NE",callingCode:"+227"},{country:"Nigeria",countryCode:"NG",callingCode:"+234"},{country:"Niue",countryCode:"NU",callingCode:"+683"},{country:"Norfolk Island",countryCode:"NF",callingCode:"+672"},{country:"North Korea",countryCode:"KP",callingCode:"+850"},{country:"Northern Mariana Islands",countryCode:"MP",callingCode:"+1670"},{country:"Norway",countryCode:"NO",callingCode:"+47"},{country:"Oman",countryCode:"OM",callingCode:"+968"},{country:"Pakistan",countryCode:"PK",callingCode:"+92"},{country:"Palau",countryCode:"PW",callingCode:"+680"},{country:"Palestinian Territory",countryCode:"PS",callingCode:"+970"},{country:"Panama",countryCode:"PA",callingCode:"+507"},{country:"Papua New Guinea",countryCode:"PG",callingCode:"+675"},{country:"Paraguay",countryCode:"PY",callingCode:"+595"},{country:"Peru",countryCode:"PE",callingCode:"+51"},{country:"Philippines",countryCode:"PH",callingCode:"+63"},{country:"Pitcairn",countryCode:"PN",callingCode:"+872"},{country:"Poland",countryCode:"PL",callingCode:"+48"},{country:"Portugal",countryCode:"PT",callingCode:"+351"},{country:"Puerto Rico",countryCode:"PR",callingCode:"+1"},{country:"Qatar",countryCode:"QA",callingCode:"+974"},{country:"Republic of the Congo",countryCode:"CG",callingCode:"+242"},{country:"Reunion",countryCode:"RE",callingCode:"+262"},{country:"Romania",countryCode:"RO",callingCode:"+40"},{country:"Russia",countryCode:"RU",callingCode:"+7"},{country:"Rwanda",countryCode:"RW",callingCode:"+250"},{country:"Saint Helena",countryCode:"SH",callingCode:"+290"},{country:"Saint Kitts and Nevis",countryCode:"KN",callingCode:"+1869"},{country:"Saint Lucia",countryCode:"LC",callingCode:"+1758"},{country:"Saint Pierre and Miquelon",countryCode:"PM",callingCode:"+508"},{country:"Saint Vincent and the Grenadines",countryCode:"VC",callingCode:"+1784"},{country:"Samoa",countryCode:"WS",callingCode:"+685"},{country:"San Marino",countryCode:"SM",callingCode:"+378"},{country:"Sao Tome and Principe",countryCode:"ST",callingCode:"+239"},{country:"Saudi Arabia",countryCode:"SA",callingCode:"+966"},{country:"Senegal",countryCode:"SN",callingCode:"+221"},{country:"Seychelles",countryCode:"SC",callingCode:"+248"},{country:"Sierra Leone",countryCode:"SL",callingCode:"+232"},{country:"Singapore",countryCode:"SG",callingCode:"+65"},{country:"Slovakia",countryCode:"SK",callingCode:"+421"},{country:"Slovenia",countryCode:"SI",callingCode:"+386"},{country:"Solomon Islands",countryCode:"SB",callingCode:"+677"},{country:"Somalia",countryCode:"SO",callingCode:"+252"},{country:"South Africa",countryCode:"ZA",callingCode:"+27"},{country:"South Georgia and the South Sandwich Islands",countryCode:"GS",callingCode:"+500"},{country:"South Korea",countryCode:"KR",callingCode:"+82"},{country:"Spain",countryCode:"ES",callingCode:"+34"},{country:"Sri Lanka",countryCode:"LK",callingCode:"+94"},{country:"Sudan",countryCode:"SD",callingCode:"+249"},{country:"Suriname",countryCode:"SR",callingCode:"+597"},{country:"Svalbard and Jan Mayen",countryCode:"SJ",callingCode:"+47"},{country:"Swaziland",countryCode:"SZ",callingCode:"+268"},{country:"Sweden",countryCode:"SE",callingCode:"+46"},{country:"Switzerland",countryCode:"CH",callingCode:"+41"},{country:"Syria",countryCode:"SY",callingCode:"+963"},{country:"Taiwan",countryCode:"TW",callingCode:"+886"},{country:"Tajikistan",countryCode:"TJ",callingCode:"+992"},{country:"Tanzania",countryCode:"TZ",callingCode:"+255"},{country:"Thailand",countryCode:"TH",callingCode:"+66"},{country:"Togo",countryCode:"TG",callingCode:"+228"},{country:"Tokelau",countryCode:"TK",callingCode:"+690"},{country:"Tonga",countryCode:"TO",callingCode:"+676"},{country:"Trinidad and Tobago",countryCode:"TT",callingCode:"+1868"},{country:"Tunisia",countryCode:"TN",callingCode:"+216"},{country:"Turkey",countryCode:"TR",callingCode:"+90"},{country:"Turkmenistan",countryCode:"TM",callingCode:"+993"},{country:"Turks and Caicos Islands",countryCode:"TC",callingCode:"+1649"},{country:"Tuvalu",countryCode:"TV",callingCode:"+688"},{country:"U.S. Virgin Islands",countryCode:"VI",callingCode:"+1340"},{country:"Uganda",countryCode:"UG",callingCode:"+256"},{country:"Ukraine",countryCode:"UA",callingCode:"+380"},{country:"United Arab Emirates",countryCode:"AE",callingCode:"+971"},{country:"United Kingdom",countryCode:"GB",callingCode:"+44"},{country:"United States",countryCode:"US",callingCode:"+1"},{country:"United States Minor Outlying Islands",countryCode:"UM",callingCode:"+1"},{country:"Uruguay",countryCode:"UY",callingCode:"+598"},{country:"Uzbekistan",countryCode:"UZ",callingCode:"+998"},{country:"Vanuatu",countryCode:"VU",callingCode:"+678"},{country:"Vatican",countryCode:"VA",callingCode:"+379"},{country:"Venezuela",countryCode:"VE",callingCode:"+58"},{country:"Vietnam",countryCode:"VN",callingCode:"+84"},{country:"Wallis and Futuna",countryCode:"WF",callingCode:"+681"},{country:"Western Sahara",countryCode:"EH",callingCode:"+212"},{country:"Yemen",countryCode:"YE",callingCode:"+967"},{country:"Zambia",countryCode:"ZM",callingCode:"+260"},{country:"Zimbabwe",countryCode:"ZW",callingCode:"+263"}],i=e=>u.find((o=>o.countryCode===e));exports.PhoneInput=({placeholder:e,country:r,onChange:t,value:c,iconComponent:a,inputProps:l,onlyCountries:d,excludeCountries:y,preferredCountries:s,showDropdownIcon:C=!0,dialCodeInputField:g=!1,search:p=!0,searchPlaceholder:f="Search country",showSearchIcon:m=!0,searchIconComponent:h,searchProps:v,searchNotFound:b="Not found"})=>{const[S,w]=o.useState({}),[x,N]=o.useState(!1),[T,E]=o.useState(c||""),[R,j]=o.useState(u),[k,M]=o.useState(0),P=o.useRef(null),_=o.useRef(null);var I,O;I=P,O=()=>N(!1),o.useEffect((()=>{const e=e=>{I.current&&!I.current.contains(e.target)&&O(e)};return document.addEventListener("mousedown",e),document.addEventListener("touchstart",e),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("touchstart",e)}}),[I,O]);const A=e=>{x&&("ArrowDown"===e.key&&(e.preventDefault(),M((e=>e<R.length-1?e+1:e))),"ArrowUp"===e.key&&(e.preventDefault(),M((e=>e>0?e-1:0))),"Escape"===e.key&&N(!1),"Enter"===e.key&&k>=0&&(w(R[k]),N(!1)))};return o.useEffect((()=>{if(k<0||k>R.length||!_)return()=>{};if(x&&_&&R.length>0){let o=Array.from(_.current?.children);o[k]&&(e=o[k].offsetTop-65,p&&R.length>0&&_.current?.scrollTo({top:e,behavior:"smooth"}))}var e}),[k]),o.useMemo((()=>{if(g){const e=T?.replace(S.callingCode,i(r).callingCode);console.log(e),E(e.length>0?e:i(r).callingCode)}w(i(r))}),[r,g]),o.useMemo((()=>{j(((e,o,n)=>{let r=[];return r=o&&o.length>0?u.filter((e=>!o?.includes(e.countryCode))):e&&e?.length>0?u.filter((o=>e?.includes(o.countryCode))):u,r.sort(((e,o)=>Number(n?.includes(o.countryCode))-Number(n?.includes(e.countryCode))||n?.indexOf(e.countryCode)-n?.indexOf(o.countryCode)))})(d,y,s))}),[d,y,s]),n.exports.jsx("div",{className:"simple-phone-input-sri198-container",onKeyDown:e=>A(e),tabIndex:-1,children:n.exports.jsxs("div",{className:"simple-phone-input-sri198-main",children:[n.exports.jsxs("div",{className:"simple-phone-input-sri198-dropdown-container",ref:P,children:[n.exports.jsxs("div",{onClick:()=>N(!x),className:g?"simple-phone-input-sri198-dropdown-container-button dial":"simple-phone-input-sri198-dropdown-container-button",children:[n.exports.jsx("img",{src:"https://cdn.jsdelivr.net/gh/siamahnaf198/country-flags@main/img/"+S.countryCode+".svg",alt:S.country,width:"20px"}),!g&&n.exports.jsx("span",{className:"simple-phone-input-sri198-selected-code",children:S.callingCode}),C&&n.exports.jsx("div",{className:x?"simple-phone-input-sri198-dropdown-icon":"simple-phone-input-sri198-dropdown-icon active",children:a||n.exports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",children:n.exports.jsx("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})})]}),n.exports.jsxs("ul",{className:x?"simple-phone-input-sri198-dropdown active":"simple-phone-input-sri198-dropdown",ref:_,children:[p&&n.exports.jsxs("div",{className:"simple-phone-input-sri198-search-container",children:[n.exports.jsx("input",{placeholder:f,...v,onChange:e=>{const o=e.target.value;j(((e,o,n)=>{let r=[];return r=n&&n.length>0?u.filter((e=>!n?.includes(e.countryCode))):o&&o?.length>0?u.filter((e=>o?.includes(e.countryCode))):u,r.filter((o=>{const n=new RegExp(e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"gi");return o.country.match(n)}))})(o,d,y))}}),m&&n.exports.jsx("div",{className:"simple-phone-input-sri198-search-icon",children:h??n.exports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 48 48",children:[n.exports.jsxs("g",{fill:"#616161",children:[n.exports.jsx("path",{d:"m29.175 31.99l2.828-2.827l12.019 12.019l-2.828 2.827z"}),n.exports.jsx("circle",{cx:"20",cy:"20",r:"16"})]}),n.exports.jsx("path",{fill:"#37474F",d:"m32.45 35.34l2.827-2.828l8.696 8.696l-2.828 2.828z"}),n.exports.jsx("circle",{cx:"20",cy:"20",r:"13",fill:"#64B5F6"}),n.exports.jsx("path",{fill:"#BBDEFB",d:"M26.9 14.2c-1.7-2-4.2-3.2-6.9-3.2s-5.2 1.2-6.9 3.2c-.4.4-.3 1.1.1 1.4c.4.4 1.1.3 1.4-.1C16 13.9 17.9 13 20 13s4 .9 5.4 2.5c.2.2.5.4.8.4c.2 0 .5-.1.6-.2c.4-.4.4-1.1.1-1.5z"})]})})]}),0===R.length&&n.exports.jsx("div",{className:"simple-phone-input-sri198-not-found",children:b}),R.map(((e,o)=>n.exports.jsxs("li",{onClick:()=>((e,o)=>{if(g){const o=T?.replace(S.callingCode,e.callingCode);E(o.length>0?o:e.callingCode),t(o.length>0?o:e.callingCode)}else t(e.callingCode+T);w(e),N(!1),M(o)})(e,o),className:o===k?"active":"",children:[n.exports.jsx("img",{src:"https://cdn.jsdelivr.net/gh/siamahnaf198/country-flags@main/img/"+e.countryCode+".svg",alt:e.country,width:"20px"}),n.exports.jsx("span",{className:"simple-phone-input-sri198-dropdown-text",children:e.country}),n.exports.jsx("span",{className:"simple-phone-input-sri198-dropdown-country-code",children:e.callingCode})]},o)))]})]}),n.exports.jsx("input",{className:"simple-phone-input-sri198-input",placeholder:e,onChange:e=>{const o=e.target.value.replace(/\D/g,"");g?(t("+"+o),E("+"+o)):(E(o),t(S.callingCode+o))},type:"tel",onInput:e=>{if(g){const o=T.slice(S.callingCode.length);e.target.value.startsWith(S.callingCode)?e.target.value=e.target.value:e.target.value=S.callingCode+o}},onKeyDown:e=>A(e),value:T,...l})]})})}; | ||
"use strict";var o=require("react/jsx-runtime"),n=require("react");const e=[{country:"Afghanistan",countryCode:"AF",callingCode:"+93"},{country:"Albania",countryCode:"AL",callingCode:"+355"},{country:"Algeria",countryCode:"DZ",callingCode:"+213"},{country:"American Samoa",countryCode:"AS",callingCode:"+1684"},{country:"Andorra",countryCode:"AD",callingCode:"+376"},{country:"Angola",countryCode:"AO",callingCode:"+244"},{country:"Anguilla",countryCode:"AI",callingCode:"+1264"},{country:"Antarctica",countryCode:"AQ",callingCode:"+672"},{country:"Antigua and Barbuda",countryCode:"AG",callingCode:"+1268"},{country:"Argentina",countryCode:"AR",callingCode:"+54"},{country:"Armenia",countryCode:"AM",callingCode:"+374"},{country:"Aruba",countryCode:"AW",callingCode:"+297"},{country:"Australia",countryCode:"AU",callingCode:"+61"},{country:"Austria",countryCode:"AT",callingCode:"+43"},{country:"Azerbaijan",countryCode:"AZ",callingCode:"+994"},{country:"Bahamas",countryCode:"BS",callingCode:"+1242"},{country:"Bahrain",countryCode:"BH",callingCode:"+973"},{country:"Bangladesh",countryCode:"BD",callingCode:"+880"},{country:"Barbados",countryCode:"BB",callingCode:"+1246"},{country:"Belarus",countryCode:"BY",callingCode:"+375"},{country:"Belgium",countryCode:"BE",callingCode:"+32"},{country:"Belize",countryCode:"BZ",callingCode:"+501"},{country:"Benin",countryCode:"BJ",callingCode:"+229"},{country:"Bermuda",countryCode:"BM",callingCode:"+1441"},{country:"Bhutan",countryCode:"BT",callingCode:"+975"},{country:"Bolivia",countryCode:"BO",callingCode:"+591"},{country:"Bosnia and Herzegovina",countryCode:"BA",callingCode:"+387"},{country:"Botswana",countryCode:"BW",callingCode:"+267"},{country:"Bouvet Island",countryCode:"BV",callingCode:"+47"},{country:"Brazil",countryCode:"BR",callingCode:"+55"},{country:"British Indian Ocean Territory",countryCode:"IO",callingCode:"+246"},{country:"British Virgin Islands",countryCode:"VG",callingCode:"+1284"},{country:"Brunei",countryCode:"BN",callingCode:"+673"},{country:"Bulgaria",countryCode:"BG",callingCode:"+359"},{country:"Burkina Faso",countryCode:"BF",callingCode:"+226"},{country:"Burundi",countryCode:"BI",callingCode:"+257"},{country:"Cambodia",countryCode:"KH",callingCode:"+855"},{country:"Cameroon",countryCode:"CM",callingCode:"+237"},{country:"Canada",countryCode:"CA",callingCode:"+1"},{country:"Cape Verde",countryCode:"CV",callingCode:"+238"},{country:"Cayman Islands",countryCode:"KY",callingCode:"+1345"},{country:"Central African Republic",countryCode:"CF",callingCode:"+236"},{country:"Chad",countryCode:"TD",callingCode:"+235"},{country:"Chile",countryCode:"CL",callingCode:"+56"},{country:"China",countryCode:"CN",callingCode:"+86"},{country:"Christmas Island",countryCode:"CX",callingCode:"+61"},{country:"Cocos Islands",countryCode:"CC",callingCode:"+61"},{country:"Colombia",countryCode:"CO",callingCode:"+57"},{country:"Comoros",countryCode:"KM",callingCode:"+269"},{country:"Cook Islands",countryCode:"CK",callingCode:"+682"},{country:"Costa Rica",countryCode:"CR",callingCode:"+506"},{country:"Croatia",countryCode:"HR",callingCode:"+385"},{country:"Cuba",countryCode:"CU",callingCode:"+53"},{country:"Cyprus",countryCode:"CY",callingCode:"+357"},{country:"Czech Republic",countryCode:"CZ",callingCode:"+420"},{country:"Democratic Republic of the Congo",countryCode:"CD",callingCode:"+243"},{country:"Denmark",countryCode:"DK",callingCode:"+45"},{country:"Djibouti",countryCode:"DJ",callingCode:"+253"},{country:"Dominica",countryCode:"DM",callingCode:"+1767"},{country:"Dominican Republic",countryCode:"DO",callingCode:"+1"},{country:"East Timor",countryCode:"TL",callingCode:"+670"},{country:"Ecuador",countryCode:"EC",callingCode:"+593"},{country:"Egypt",countryCode:"EG",callingCode:"+20"},{country:"El Salvador",countryCode:"SV",callingCode:"+503"},{country:"Equatorial Guinea",countryCode:"GQ",callingCode:"+240"},{country:"Eritrea",countryCode:"ER",callingCode:"+291"},{country:"Estonia",countryCode:"EE",callingCode:"+372"},{country:"Ethiopia",countryCode:"ET",callingCode:"+251"},{country:"Falkland Islands",countryCode:"FK",callingCode:"+500"},{country:"Faroe Islands",countryCode:"FO",callingCode:"+298"},{country:"Fiji",countryCode:"FJ",callingCode:"+679"},{country:"Finland",countryCode:"FI",callingCode:"+358"},{country:"France",countryCode:"FR",callingCode:"+33"},{country:"French Guiana",countryCode:"GF",callingCode:"+594"},{country:"French Polynesia",countryCode:"PF",callingCode:"+689"},{country:"French Southern Territories",countryCode:"TF",callingCode:"+262"},{country:"Gabon",countryCode:"GA",callingCode:"+241"},{country:"Gambia",countryCode:"GM",callingCode:"+220"},{country:"Georgia",countryCode:"GE",callingCode:"+995"},{country:"Germany",countryCode:"DE",callingCode:"+49"},{country:"Ghana",countryCode:"GH",callingCode:"+233"},{country:"Gibraltar",countryCode:"GI",callingCode:"+350"},{country:"Greece",countryCode:"GR",callingCode:"+30"},{country:"Greenland",countryCode:"GL",callingCode:"+299"},{country:"Grenada",countryCode:"GD",callingCode:"+473"},{country:"Guadeloupe",countryCode:"GP",callingCode:"+590"},{country:"Guam",countryCode:"GU",callingCode:"+1671"},{country:"Guatemala",countryCode:"GT",callingCode:"+502"},{country:"Guinea",countryCode:"GN",callingCode:"+224"},{country:"Guinea-Bissau",countryCode:"GW",callingCode:"+245"},{country:"Guyana",countryCode:"GY",callingCode:"+592"},{country:"Haiti",countryCode:"HT",callingCode:"+509"},{country:"Honduras",countryCode:"HN",callingCode:"+504"},{country:"Hong Kong",countryCode:"HK",callingCode:"+852"},{country:"Hungary",countryCode:"HU",callingCode:"+36"},{country:"Iceland",countryCode:"IS",callingCode:"+354"},{country:"India",countryCode:"IN",callingCode:"+91"},{country:"Indonesia",countryCode:"ID",callingCode:"+62"},{country:"Iran",countryCode:"IR",callingCode:"+98"},{country:"Iraq",countryCode:"IQ",callingCode:"+964"},{country:"Ireland",countryCode:"IE",callingCode:"+353"},{country:"Israel",countryCode:"IL",callingCode:"+972"},{country:"Italy",countryCode:"IT",callingCode:"+39"},{country:"Ivory Coast",countryCode:"CI",callingCode:"+225"},{country:"Jamaica",countryCode:"JM",callingCode:"+1876"},{country:"Japan",countryCode:"JP",callingCode:"+81"},{country:"Jordan",countryCode:"JO",callingCode:"+962"},{country:"Kazakhstan",countryCode:"KZ",callingCode:"+7"},{country:"Kenya",countryCode:"KE",callingCode:"+254"},{country:"Kiribati",countryCode:"KI",callingCode:"+686"},{country:"Kuwait",countryCode:"KW",callingCode:"+965"},{country:"Kyrgyzstan",countryCode:"KG",callingCode:"+996"},{country:"Laos",countryCode:"LA",callingCode:"+856"},{country:"Latvia",countryCode:"LV",callingCode:"+371"},{country:"Lebanon",countryCode:"LB",callingCode:"+961"},{country:"Lesotho",countryCode:"LS",callingCode:"+266"},{country:"Liberia",countryCode:"LR",callingCode:"+231"},{country:"Libya",countryCode:"LY",callingCode:"+218"},{country:"Liechtenstein",countryCode:"LI",callingCode:"+423"},{country:"Lithuania",countryCode:"LT",callingCode:"+370"},{country:"Luxembourg",countryCode:"LU",callingCode:"+352"},{country:"Macao",countryCode:"MO",callingCode:"+853"},{country:"Macedonia",countryCode:"MK",callingCode:"+389"},{country:"Madagascar",countryCode:"MG",callingCode:"+261"},{country:"Malawi",countryCode:"MW",callingCode:"+265"},{country:"Malaysia",countryCode:"MY",callingCode:"+60"},{country:"Maldives",countryCode:"MV",callingCode:"+960"},{country:"Mali",countryCode:"ML",callingCode:"+223"},{country:"Malta",countryCode:"MT",callingCode:"+356"},{country:"Marshall Islands",countryCode:"MH",callingCode:"+692"},{country:"Martinique",countryCode:"MQ",callingCode:"+596"},{country:"Mauritania",countryCode:"MR",callingCode:"+222"},{country:"Mauritius",countryCode:"MU",callingCode:"+230"},{country:"Mayotte",countryCode:"YT",callingCode:"+262"},{country:"Mexico",countryCode:"MX",callingCode:"+52"},{country:"Micronesia",countryCode:"FM",callingCode:"+691"},{country:"Moldova",countryCode:"MD",callingCode:"+373"},{country:"Monaco",countryCode:"MC",callingCode:"+377"},{country:"Mongolia",countryCode:"MN",callingCode:"+976"},{country:"Montserrat",countryCode:"MS",callingCode:"+1664"},{country:"Morocco",countryCode:"MA",callingCode:"+212"},{country:"Mozambique",countryCode:"MZ",callingCode:"+258"},{country:"Myanmar",countryCode:"MM",callingCode:"+95"},{country:"Namibia",countryCode:"NA",callingCode:"+264"},{country:"Nauru",countryCode:"NR",callingCode:"+674"},{country:"Nepal",countryCode:"NP",callingCode:"+977"},{country:"Netherlands",countryCode:"NL",callingCode:"+31"},{country:"New Caledonia",countryCode:"NC",callingCode:"+687"},{country:"New Zealand",countryCode:"NZ",callingCode:"+64"},{country:"Nicaragua",countryCode:"NI",callingCode:"+505"},{country:"Niger",countryCode:"NE",callingCode:"+227"},{country:"Nigeria",countryCode:"NG",callingCode:"+234"},{country:"Niue",countryCode:"NU",callingCode:"+683"},{country:"Norfolk Island",countryCode:"NF",callingCode:"+672"},{country:"North Korea",countryCode:"KP",callingCode:"+850"},{country:"Northern Mariana Islands",countryCode:"MP",callingCode:"+1670"},{country:"Norway",countryCode:"NO",callingCode:"+47"},{country:"Oman",countryCode:"OM",callingCode:"+968"},{country:"Pakistan",countryCode:"PK",callingCode:"+92"},{country:"Palau",countryCode:"PW",callingCode:"+680"},{country:"Palestinian Territory",countryCode:"PS",callingCode:"+970"},{country:"Panama",countryCode:"PA",callingCode:"+507"},{country:"Papua New Guinea",countryCode:"PG",callingCode:"+675"},{country:"Paraguay",countryCode:"PY",callingCode:"+595"},{country:"Peru",countryCode:"PE",callingCode:"+51"},{country:"Philippines",countryCode:"PH",callingCode:"+63"},{country:"Pitcairn",countryCode:"PN",callingCode:"+872"},{country:"Poland",countryCode:"PL",callingCode:"+48"},{country:"Portugal",countryCode:"PT",callingCode:"+351"},{country:"Puerto Rico",countryCode:"PR",callingCode:"+1"},{country:"Qatar",countryCode:"QA",callingCode:"+974"},{country:"Republic of the Congo",countryCode:"CG",callingCode:"+242"},{country:"Reunion",countryCode:"RE",callingCode:"+262"},{country:"Romania",countryCode:"RO",callingCode:"+40"},{country:"Russia",countryCode:"RU",callingCode:"+7"},{country:"Rwanda",countryCode:"RW",callingCode:"+250"},{country:"Saint Helena",countryCode:"SH",callingCode:"+290"},{country:"Saint Kitts and Nevis",countryCode:"KN",callingCode:"+1869"},{country:"Saint Lucia",countryCode:"LC",callingCode:"+1758"},{country:"Saint Pierre and Miquelon",countryCode:"PM",callingCode:"+508"},{country:"Saint Vincent and the Grenadines",countryCode:"VC",callingCode:"+1784"},{country:"Samoa",countryCode:"WS",callingCode:"+685"},{country:"San Marino",countryCode:"SM",callingCode:"+378"},{country:"Sao Tome and Principe",countryCode:"ST",callingCode:"+239"},{country:"Saudi Arabia",countryCode:"SA",callingCode:"+966"},{country:"Senegal",countryCode:"SN",callingCode:"+221"},{country:"Seychelles",countryCode:"SC",callingCode:"+248"},{country:"Sierra Leone",countryCode:"SL",callingCode:"+232"},{country:"Singapore",countryCode:"SG",callingCode:"+65"},{country:"Slovakia",countryCode:"SK",callingCode:"+421"},{country:"Slovenia",countryCode:"SI",callingCode:"+386"},{country:"Solomon Islands",countryCode:"SB",callingCode:"+677"},{country:"Somalia",countryCode:"SO",callingCode:"+252"},{country:"South Africa",countryCode:"ZA",callingCode:"+27"},{country:"South Georgia and the South Sandwich Islands",countryCode:"GS",callingCode:"+500"},{country:"South Korea",countryCode:"KR",callingCode:"+82"},{country:"Spain",countryCode:"ES",callingCode:"+34"},{country:"Sri Lanka",countryCode:"LK",callingCode:"+94"},{country:"Sudan",countryCode:"SD",callingCode:"+249"},{country:"Suriname",countryCode:"SR",callingCode:"+597"},{country:"Svalbard and Jan Mayen",countryCode:"SJ",callingCode:"+47"},{country:"Swaziland",countryCode:"SZ",callingCode:"+268"},{country:"Sweden",countryCode:"SE",callingCode:"+46"},{country:"Switzerland",countryCode:"CH",callingCode:"+41"},{country:"Syria",countryCode:"SY",callingCode:"+963"},{country:"Taiwan",countryCode:"TW",callingCode:"+886"},{country:"Tajikistan",countryCode:"TJ",callingCode:"+992"},{country:"Tanzania",countryCode:"TZ",callingCode:"+255"},{country:"Thailand",countryCode:"TH",callingCode:"+66"},{country:"Togo",countryCode:"TG",callingCode:"+228"},{country:"Tokelau",countryCode:"TK",callingCode:"+690"},{country:"Tonga",countryCode:"TO",callingCode:"+676"},{country:"Trinidad and Tobago",countryCode:"TT",callingCode:"+1868"},{country:"Tunisia",countryCode:"TN",callingCode:"+216"},{country:"Turkey",countryCode:"TR",callingCode:"+90"},{country:"Turkmenistan",countryCode:"TM",callingCode:"+993"},{country:"Turks and Caicos Islands",countryCode:"TC",callingCode:"+1649"},{country:"Tuvalu",countryCode:"TV",callingCode:"+688"},{country:"U.S. Virgin Islands",countryCode:"VI",callingCode:"+1340"},{country:"Uganda",countryCode:"UG",callingCode:"+256"},{country:"Ukraine",countryCode:"UA",callingCode:"+380"},{country:"United Arab Emirates",countryCode:"AE",callingCode:"+971"},{country:"United Kingdom",countryCode:"GB",callingCode:"+44"},{country:"United States",countryCode:"US",callingCode:"+1"},{country:"United States Minor Outlying Islands",countryCode:"UM",callingCode:"+1"},{country:"Uruguay",countryCode:"UY",callingCode:"+598"},{country:"Uzbekistan",countryCode:"UZ",callingCode:"+998"},{country:"Vanuatu",countryCode:"VU",callingCode:"+678"},{country:"Vatican",countryCode:"VA",callingCode:"+379"},{country:"Venezuela",countryCode:"VE",callingCode:"+58"},{country:"Vietnam",countryCode:"VN",callingCode:"+84"},{country:"Wallis and Futuna",countryCode:"WF",callingCode:"+681"},{country:"Western Sahara",countryCode:"EH",callingCode:"+212"},{country:"Yemen",countryCode:"YE",callingCode:"+967"},{country:"Zambia",countryCode:"ZM",callingCode:"+260"},{country:"Zimbabwe",countryCode:"ZW",callingCode:"+263"}],c=o=>e.find((n=>n.countryCode===o));exports.PhoneInput=({placeholder:r,country:t,onChange:l,value:a,iconComponent:d,inputProps:u,onlyCountries:i,excludeCountries:C,preferredCountries:y,showDropdownIcon:g=!0,dialCodeInputField:s=!1,search:h=!0,searchPlaceholder:p="Search country",showSearchIcon:m=!0,searchIconComponent:S,searchProps:M,searchNotFound:N="Not found"})=>{const[v,B]=n.useState({}),[I,A]=n.useState(!1),[G,T]=n.useState(a||""),[w,x]=n.useState(e),[f,E]=n.useState(0),b=n.useRef(null),P=n.useRef(null);var L,R;L=b,R=()=>A(!1),n.useEffect((()=>{const o=o=>{L.current&&!L.current.contains(o.target)&&R(o)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}}),[L,R]);const j=o=>{I&&("ArrowDown"===o.key&&(o.preventDefault(),E((o=>o<w.length-1?o+1:o))),"ArrowUp"===o.key&&(o.preventDefault(),E((o=>o>0?o-1:0))),"Escape"===o.key&&A(!1),"Enter"===o.key&&f>=0&&(B(w[f]),A(!1)))};return n.useEffect((()=>{if(f<0||f>w.length||!P)return()=>{};if(I&&P&&w.length>0){let n=Array.from(P.current?.children);n[f]&&(o=n[f].offsetTop-65,h&&w.length>0&&P.current?.scrollTo({top:o,behavior:"smooth"}))}var o}),[f]),n.useMemo((()=>{if(s){const o=G?.replace(v.callingCode,c(t).callingCode);console.log(o),T(o.length>0?o:c(t).callingCode)}B(c(t))}),[t,s]),n.useMemo((()=>{x(((o,n,c)=>{let r=[];return r=n&&n.length>0?e.filter((o=>!n?.includes(o.countryCode))):o&&o?.length>0?e.filter((n=>o?.includes(n.countryCode))):e,r.sort(((o,n)=>Number(c?.includes(n.countryCode))-Number(c?.includes(o.countryCode))||c?.indexOf(o.countryCode)-c?.indexOf(n.countryCode)))})(i,C,y))}),[i,C,y]),o.jsx("div",{className:"simple-phone-input-sri198-container",onKeyDown:o=>j(o),tabIndex:-1,children:o.jsxs("div",{className:"simple-phone-input-sri198-main",children:[o.jsxs("div",{className:"simple-phone-input-sri198-dropdown-container",ref:b,children:[o.jsxs("div",{onClick:()=>A(!I),className:s?"simple-phone-input-sri198-dropdown-container-button dial":"simple-phone-input-sri198-dropdown-container-button",children:[o.jsx("img",{src:"https://cdn.jsdelivr.net/gh/siamahnaf198/country-flags@main/img/"+v.countryCode+".svg",alt:v.country,width:"20px"}),!s&&o.jsx("span",{className:"simple-phone-input-sri198-selected-code",children:v.callingCode}),g&&o.jsx("div",{className:I?"simple-phone-input-sri198-dropdown-icon":"simple-phone-input-sri198-dropdown-icon active",children:d||o.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",children:o.jsx("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})})]}),o.jsxs("ul",{className:I?"simple-phone-input-sri198-dropdown active":"simple-phone-input-sri198-dropdown",ref:P,children:[h&&o.jsxs("div",{className:"simple-phone-input-sri198-search-container",children:[o.jsx("input",{placeholder:p,...M,onChange:o=>{const n=o.target.value;x(((o,n,c)=>{let r=[];return r=c&&c.length>0?e.filter((o=>!c?.includes(o.countryCode))):n&&n?.length>0?e.filter((o=>n?.includes(o.countryCode))):e,r.filter((n=>{const e=new RegExp(o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"gi");return n.country.match(e)}))})(n,i,C))}}),m&&o.jsx("div",{className:"simple-phone-input-sri198-search-icon",children:S??o.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 48 48",children:[o.jsxs("g",{fill:"#616161",children:[o.jsx("path",{d:"m29.175 31.99l2.828-2.827l12.019 12.019l-2.828 2.827z"}),o.jsx("circle",{cx:"20",cy:"20",r:"16"})]}),o.jsx("path",{fill:"#37474F",d:"m32.45 35.34l2.827-2.828l8.696 8.696l-2.828 2.828z"}),o.jsx("circle",{cx:"20",cy:"20",r:"13",fill:"#64B5F6"}),o.jsx("path",{fill:"#BBDEFB",d:"M26.9 14.2c-1.7-2-4.2-3.2-6.9-3.2s-5.2 1.2-6.9 3.2c-.4.4-.3 1.1.1 1.4c.4.4 1.1.3 1.4-.1C16 13.9 17.9 13 20 13s4 .9 5.4 2.5c.2.2.5.4.8.4c.2 0 .5-.1.6-.2c.4-.4.4-1.1.1-1.5z"})]})})]}),0===w.length&&o.jsx("div",{className:"simple-phone-input-sri198-not-found",children:N}),w.map(((n,e)=>o.jsxs("li",{onClick:()=>((o,n)=>{if(s){const n=G?.replace(v.callingCode,o.callingCode);T(n.length>0?n:o.callingCode),l(n.length>0?n:o.callingCode)}else l(o.callingCode+G);B(o),A(!1),E(n)})(n,e),className:e===f?"active":"",children:[o.jsx("img",{src:"https://cdn.jsdelivr.net/gh/siamahnaf198/country-flags@main/img/"+n.countryCode+".svg",alt:n.country,width:"20px"}),o.jsx("span",{className:"simple-phone-input-sri198-dropdown-text",children:n.country}),o.jsx("span",{className:"simple-phone-input-sri198-dropdown-country-code",children:n.callingCode})]},e)))]})]}),o.jsx("input",{className:"simple-phone-input-sri198-input",placeholder:r,onChange:o=>{const n=o.target.value.replace(/\D/g,"");s?(l("+"+n),T("+"+n)):(T(n),l(v.callingCode+n))},type:"tel",onInput:o=>{if(s){const n=G.slice(v.callingCode.length);o.target.value.startsWith(v.callingCode)?o.target.value=o.target.value:o.target.value=v.callingCode+n}},onKeyDown:o=>j(o),value:G,...u})]})})}; | ||
//# sourceMappingURL=index.js.map |
@@ -1,11 +0,2 @@ | ||
import o from"react";var e,n={exports:{}},r={};var t,c,a={}; | ||
/** | ||
* @license React | ||
* react-jsx-runtime.development.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/function l(){return t||(t=1,"production"!==process.env.NODE_ENV&&function(){var e=o,n=Symbol.for("react.element"),r=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),c=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),i=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),y=Symbol.for("react.suspense"),s=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.offscreen"),f=Symbol.iterator;var m=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function h(o){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];v("error",o,n)}function v(o,e,n){var r=m.ReactDebugCurrentFrame.getStackAddendum();""!==r&&(e+="%s",n=n.concat([r]));var t=n.map((function(o){return String(o)}));t.unshift("Warning: "+e),Function.prototype.apply.call(console[o],console,t)}var b;function S(o){return o.displayName||"Context"}function w(o){if(null==o)return null;if("number"==typeof o.tag&&h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),"function"==typeof o)return o.displayName||o.name||null;if("string"==typeof o)return o;switch(o){case t:return"Fragment";case r:return"Portal";case l:return"Profiler";case c:return"StrictMode";case y:return"Suspense";case s:return"SuspenseList"}if("object"==typeof o)switch(o.$$typeof){case i:return S(o)+".Consumer";case u:return S(o._context)+".Provider";case d:return function(o,e,n){var r=o.displayName;if(r)return r;var t=e.displayName||e.name||"";return""!==t?n+"("+t+")":n}(o,o.render,"ForwardRef");case C:var e=o.displayName||null;return null!==e?e:w(o.type)||"Memo";case g:var n=o,a=n._payload,p=n._init;try{return w(p(a))}catch(o){return null}}return null}b=Symbol.for("react.module.reference");var x,N,T,E,R,j,k,M=Object.assign,P=0;function _(){}_.__reactDisabledLog=!0;var I,O=m.ReactCurrentDispatcher;function A(o,e,n){if(void 0===I)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);I=r&&r[1]||""}return"\n"+I+o}var B,F=!1,G="function"==typeof WeakMap?WeakMap:Map;function D(o,e){if(!o||F)return"";var n,r=B.get(o);if(void 0!==r)return r;F=!0;var t,c=Error.prepareStackTrace;Error.prepareStackTrace=void 0,t=O.current,O.current=null,function(){if(0===P){x=console.log,N=console.info,T=console.warn,E=console.error,R=console.group,j=console.groupCollapsed,k=console.groupEnd;var o={configurable:!0,enumerable:!0,value:_,writable:!0};Object.defineProperties(console,{info:o,log:o,warn:o,error:o,group:o,groupCollapsed:o,groupEnd:o})}P++}();try{if(e){var a=function(){throw Error()};if(Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(a,[])}catch(o){n=o}Reflect.construct(o,[],a)}else{try{a.call()}catch(o){n=o}o.call(a.prototype)}}else{try{throw Error()}catch(o){n=o}o()}}catch(e){if(e&&n&&"string"==typeof e.stack){for(var l=e.stack.split("\n"),u=n.stack.split("\n"),i=l.length-1,d=u.length-1;i>=1&&d>=0&&l[i]!==u[d];)d--;for(;i>=1&&d>=0;i--,d--)if(l[i]!==u[d]){if(1!==i||1!==d)do{if(i--,--d<0||l[i]!==u[d]){var y="\n"+l[i].replace(" at new "," at ");return o.displayName&&y.includes("<anonymous>")&&(y=y.replace("<anonymous>",o.displayName)),"function"==typeof o&&B.set(o,y),y}}while(i>=1&&d>=0);break}}}finally{F=!1,O.current=t,function(){if(0==--P){var o={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:M({},o,{value:x}),info:M({},o,{value:N}),warn:M({},o,{value:T}),error:M({},o,{value:E}),group:M({},o,{value:R}),groupCollapsed:M({},o,{value:j}),groupEnd:M({},o,{value:k})})}P<0&&h("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=c}var s=o?o.displayName||o.name:"",C=s?A(s):"";return"function"==typeof o&&B.set(o,C),C}function L(o,e,n){if(null==o)return"";if("function"==typeof o)return D(o,!(!(r=o.prototype)||!r.isReactComponent));var r;if("string"==typeof o)return A(o);switch(o){case y:return A("Suspense");case s:return A("SuspenseList")}if("object"==typeof o)switch(o.$$typeof){case d:return D(o.render,!1);case C:return L(o.type,e,n);case g:var t=o,c=t._payload,a=t._init;try{return L(a(c),e,n)}catch(o){}}return""}B=new G;var U=Object.prototype.hasOwnProperty,K={},$=m.ReactDebugCurrentFrame;function V(o){if(o){var e=o._owner,n=L(o.type,o._source,e?e.type:null);$.setExtraStackFrame(n)}else $.setExtraStackFrame(null)}var W=Array.isArray;function z(o){return W(o)}function H(o){return""+o}function Y(o){if(function(o){try{return H(o),!1}catch(o){return!0}}(o))return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",function(o){return"function"==typeof Symbol&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object"}(o)),H(o)}var Z,J,q,Q=m.ReactCurrentOwner,X={key:!0,ref:!0,__self:!0,__source:!0};q={};function oo(o,e,r,t,c){var a,l={},u=null,i=null;for(a in void 0!==r&&(Y(r),u=""+r),function(o){if(U.call(o,"key")){var e=Object.getOwnPropertyDescriptor(o,"key").get;if(e&&e.isReactWarning)return!1}return void 0!==o.key}(e)&&(Y(e.key),u=""+e.key),function(o){if(U.call(o,"ref")){var e=Object.getOwnPropertyDescriptor(o,"ref").get;if(e&&e.isReactWarning)return!1}return void 0!==o.ref}(e)&&(i=e.ref,function(o,e){if("string"==typeof o.ref&&Q.current&&e&&Q.current.stateNode!==e){var n=w(Q.current.type);q[n]||(h('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',w(Q.current.type),o.ref),q[n]=!0)}}(e,c)),e)U.call(e,a)&&!X.hasOwnProperty(a)&&(l[a]=e[a]);if(o&&o.defaultProps){var d=o.defaultProps;for(a in d)void 0===l[a]&&(l[a]=d[a])}if(u||i){var y="function"==typeof o?o.displayName||o.name||"Unknown":o;u&&function(o,e){var n=function(){Z||(Z=!0,h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(o,"key",{get:n,configurable:!0})}(l,y),i&&function(o,e){var n=function(){J||(J=!0,h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",e))};n.isReactWarning=!0,Object.defineProperty(o,"ref",{get:n,configurable:!0})}(l,y)}return function(o,e,r,t,c,a,l){var u={$$typeof:n,type:o,key:e,ref:r,props:l,_owner:a,_store:{}};return Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:t}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:c}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u}(o,u,i,c,t,Q.current,l)}var eo,no=m.ReactCurrentOwner,ro=m.ReactDebugCurrentFrame;function to(o){if(o){var e=o._owner,n=L(o.type,o._source,e?e.type:null);ro.setExtraStackFrame(n)}else ro.setExtraStackFrame(null)}function co(o){return"object"==typeof o&&null!==o&&o.$$typeof===n}function ao(){if(no.current){var o=w(no.current.type);if(o)return"\n\nCheck the render method of `"+o+"`."}return""}eo=!1;var lo={};function uo(o,e){if(o._store&&!o._store.validated&&null==o.key){o._store.validated=!0;var n=function(o){var e=ao();if(!e){var n="string"==typeof o?o:o.displayName||o.name;n&&(e="\n\nCheck the top-level render call using <"+n+">.")}return e}(e);if(!lo[n]){lo[n]=!0;var r="";o&&o._owner&&o._owner!==no.current&&(r=" It was passed a child from "+w(o._owner.type)+"."),to(o),h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',n,r),to(null)}}}function io(o,e){if("object"==typeof o)if(z(o))for(var n=0;n<o.length;n++){var r=o[n];co(r)&&uo(r,e)}else if(co(o))o._store&&(o._store.validated=!0);else if(o){var t=function(o){if(null===o||"object"!=typeof o)return null;var e=f&&o[f]||o["@@iterator"];return"function"==typeof e?e:null}(o);if("function"==typeof t&&t!==o.entries)for(var c,a=t.call(o);!(c=a.next()).done;)co(c.value)&&uo(c.value,e)}}function yo(o){var e,n=o.type;if(null!=n&&"string"!=typeof n){if("function"==typeof n)e=n.propTypes;else{if("object"!=typeof n||n.$$typeof!==d&&n.$$typeof!==C)return;e=n.propTypes}if(e){var r=w(n);!function(o,e,n,r,t){var c=Function.call.bind(U);for(var a in o)if(c(o,a)){var l=void 0;try{if("function"!=typeof o[a]){var u=Error((r||"React class")+": "+n+" type `"+a+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof o[a]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw u.name="Invariant Violation",u}l=o[a](e,a,r,n,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(o){l=o}!l||l instanceof Error||(V(t),h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",r||"React class",n,a,typeof l),V(null)),l instanceof Error&&!(l.message in K)&&(K[l.message]=!0,V(t),h("Failed %s type: %s",n,l.message),V(null))}}(e,o.props,"prop",r,o)}else if(void 0!==n.PropTypes&&!eo){eo=!0,h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",w(n)||"Unknown")}"function"!=typeof n.getDefaultProps||n.getDefaultProps.isReactClassApproved||h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function so(o,e,r,a,f,m){var v=function(o){return"string"==typeof o||"function"==typeof o||o===t||o===l||o===c||o===y||o===s||o===p||"object"==typeof o&&null!==o&&(o.$$typeof===g||o.$$typeof===C||o.$$typeof===u||o.$$typeof===i||o.$$typeof===d||o.$$typeof===b||void 0!==o.getModuleId)}(o);if(!v){var S="";(void 0===o||"object"==typeof o&&null!==o&&0===Object.keys(o).length)&&(S+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var x,N=function(o){return void 0!==o?"\n\nCheck your code at "+o.fileName.replace(/^.*[\\\/]/,"")+":"+o.lineNumber+".":""}(f);S+=N||ao(),null===o?x="null":z(o)?x="array":void 0!==o&&o.$$typeof===n?(x="<"+(w(o.type)||"Unknown")+" />",S=" Did you accidentally export a JSX literal instead of a component?"):x=typeof o,h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",x,S)}var T=oo(o,e,r,f,m);if(null==T)return T;if(v){var E=e.children;if(void 0!==E)if(a)if(z(E)){for(var R=0;R<E.length;R++)io(E[R],o);Object.freeze&&Object.freeze(E)}else h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else io(E,o)}return o===t?function(o){for(var e=Object.keys(o.props),n=0;n<e.length;n++){var r=e[n];if("children"!==r&&"key"!==r){to(o),h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",r),to(null);break}}null!==o.ref&&(to(o),h("Invalid attribute `ref` supplied to `React.Fragment`."),to(null))}(T):yo(T),T}var Co=function(o,e,n){return so(o,e,n,!1)},go=function(o,e,n){return so(o,e,n,!0)};a.Fragment=t,a.jsx=Co,a.jsxs=go}()),a}c=n,"production"===process.env.NODE_ENV?c.exports=function(){if(e)return r;e=1;var n=o,t=Symbol.for("react.element"),c=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function i(o,e,n){var r,c={},i=null,d=null;for(r in void 0!==n&&(i=""+n),void 0!==e.key&&(i=""+e.key),void 0!==e.ref&&(d=e.ref),e)a.call(e,r)&&!u.hasOwnProperty(r)&&(c[r]=e[r]);if(o&&o.defaultProps)for(r in e=o.defaultProps)void 0===c[r]&&(c[r]=e[r]);return{$$typeof:t,type:o,key:i,ref:d,props:c,_owner:l.current}}return r.Fragment=c,r.jsx=i,r.jsxs=i,r}():c.exports=l();const u=[{country:"Afghanistan",countryCode:"AF",callingCode:"+93"},{country:"Albania",countryCode:"AL",callingCode:"+355"},{country:"Algeria",countryCode:"DZ",callingCode:"+213"},{country:"American Samoa",countryCode:"AS",callingCode:"+1684"},{country:"Andorra",countryCode:"AD",callingCode:"+376"},{country:"Angola",countryCode:"AO",callingCode:"+244"},{country:"Anguilla",countryCode:"AI",callingCode:"+1264"},{country:"Antarctica",countryCode:"AQ",callingCode:"+672"},{country:"Antigua and Barbuda",countryCode:"AG",callingCode:"+1268"},{country:"Argentina",countryCode:"AR",callingCode:"+54"},{country:"Armenia",countryCode:"AM",callingCode:"+374"},{country:"Aruba",countryCode:"AW",callingCode:"+297"},{country:"Australia",countryCode:"AU",callingCode:"+61"},{country:"Austria",countryCode:"AT",callingCode:"+43"},{country:"Azerbaijan",countryCode:"AZ",callingCode:"+994"},{country:"Bahamas",countryCode:"BS",callingCode:"+1242"},{country:"Bahrain",countryCode:"BH",callingCode:"+973"},{country:"Bangladesh",countryCode:"BD",callingCode:"+880"},{country:"Barbados",countryCode:"BB",callingCode:"+1246"},{country:"Belarus",countryCode:"BY",callingCode:"+375"},{country:"Belgium",countryCode:"BE",callingCode:"+32"},{country:"Belize",countryCode:"BZ",callingCode:"+501"},{country:"Benin",countryCode:"BJ",callingCode:"+229"},{country:"Bermuda",countryCode:"BM",callingCode:"+1441"},{country:"Bhutan",countryCode:"BT",callingCode:"+975"},{country:"Bolivia",countryCode:"BO",callingCode:"+591"},{country:"Bosnia and Herzegovina",countryCode:"BA",callingCode:"+387"},{country:"Botswana",countryCode:"BW",callingCode:"+267"},{country:"Bouvet Island",countryCode:"BV",callingCode:"+47"},{country:"Brazil",countryCode:"BR",callingCode:"+55"},{country:"British Indian Ocean Territory",countryCode:"IO",callingCode:"+246"},{country:"British Virgin Islands",countryCode:"VG",callingCode:"+1284"},{country:"Brunei",countryCode:"BN",callingCode:"+673"},{country:"Bulgaria",countryCode:"BG",callingCode:"+359"},{country:"Burkina Faso",countryCode:"BF",callingCode:"+226"},{country:"Burundi",countryCode:"BI",callingCode:"+257"},{country:"Cambodia",countryCode:"KH",callingCode:"+855"},{country:"Cameroon",countryCode:"CM",callingCode:"+237"},{country:"Canada",countryCode:"CA",callingCode:"+1"},{country:"Cape Verde",countryCode:"CV",callingCode:"+238"},{country:"Cayman Islands",countryCode:"KY",callingCode:"+1345"},{country:"Central African Republic",countryCode:"CF",callingCode:"+236"},{country:"Chad",countryCode:"TD",callingCode:"+235"},{country:"Chile",countryCode:"CL",callingCode:"+56"},{country:"China",countryCode:"CN",callingCode:"+86"},{country:"Christmas Island",countryCode:"CX",callingCode:"+61"},{country:"Cocos Islands",countryCode:"CC",callingCode:"+61"},{country:"Colombia",countryCode:"CO",callingCode:"+57"},{country:"Comoros",countryCode:"KM",callingCode:"+269"},{country:"Cook Islands",countryCode:"CK",callingCode:"+682"},{country:"Costa Rica",countryCode:"CR",callingCode:"+506"},{country:"Croatia",countryCode:"HR",callingCode:"+385"},{country:"Cuba",countryCode:"CU",callingCode:"+53"},{country:"Cyprus",countryCode:"CY",callingCode:"+357"},{country:"Czech Republic",countryCode:"CZ",callingCode:"+420"},{country:"Democratic Republic of the Congo",countryCode:"CD",callingCode:"+243"},{country:"Denmark",countryCode:"DK",callingCode:"+45"},{country:"Djibouti",countryCode:"DJ",callingCode:"+253"},{country:"Dominica",countryCode:"DM",callingCode:"+1767"},{country:"Dominican Republic",countryCode:"DO",callingCode:"+1"},{country:"East Timor",countryCode:"TL",callingCode:"+670"},{country:"Ecuador",countryCode:"EC",callingCode:"+593"},{country:"Egypt",countryCode:"EG",callingCode:"+20"},{country:"El Salvador",countryCode:"SV",callingCode:"+503"},{country:"Equatorial Guinea",countryCode:"GQ",callingCode:"+240"},{country:"Eritrea",countryCode:"ER",callingCode:"+291"},{country:"Estonia",countryCode:"EE",callingCode:"+372"},{country:"Ethiopia",countryCode:"ET",callingCode:"+251"},{country:"Falkland Islands",countryCode:"FK",callingCode:"+500"},{country:"Faroe Islands",countryCode:"FO",callingCode:"+298"},{country:"Fiji",countryCode:"FJ",callingCode:"+679"},{country:"Finland",countryCode:"FI",callingCode:"+358"},{country:"France",countryCode:"FR",callingCode:"+33"},{country:"French Guiana",countryCode:"GF",callingCode:"+594"},{country:"French Polynesia",countryCode:"PF",callingCode:"+689"},{country:"French Southern Territories",countryCode:"TF",callingCode:"+262"},{country:"Gabon",countryCode:"GA",callingCode:"+241"},{country:"Gambia",countryCode:"GM",callingCode:"+220"},{country:"Georgia",countryCode:"GE",callingCode:"+995"},{country:"Germany",countryCode:"DE",callingCode:"+49"},{country:"Ghana",countryCode:"GH",callingCode:"+233"},{country:"Gibraltar",countryCode:"GI",callingCode:"+350"},{country:"Greece",countryCode:"GR",callingCode:"+30"},{country:"Greenland",countryCode:"GL",callingCode:"+299"},{country:"Grenada",countryCode:"GD",callingCode:"+473"},{country:"Guadeloupe",countryCode:"GP",callingCode:"+590"},{country:"Guam",countryCode:"GU",callingCode:"+1671"},{country:"Guatemala",countryCode:"GT",callingCode:"+502"},{country:"Guinea",countryCode:"GN",callingCode:"+224"},{country:"Guinea-Bissau",countryCode:"GW",callingCode:"+245"},{country:"Guyana",countryCode:"GY",callingCode:"+592"},{country:"Haiti",countryCode:"HT",callingCode:"+509"},{country:"Honduras",countryCode:"HN",callingCode:"+504"},{country:"Hong Kong",countryCode:"HK",callingCode:"+852"},{country:"Hungary",countryCode:"HU",callingCode:"+36"},{country:"Iceland",countryCode:"IS",callingCode:"+354"},{country:"India",countryCode:"IN",callingCode:"+91"},{country:"Indonesia",countryCode:"ID",callingCode:"+62"},{country:"Iran",countryCode:"IR",callingCode:"+98"},{country:"Iraq",countryCode:"IQ",callingCode:"+964"},{country:"Ireland",countryCode:"IE",callingCode:"+353"},{country:"Israel",countryCode:"IL",callingCode:"+972"},{country:"Italy",countryCode:"IT",callingCode:"+39"},{country:"Ivory Coast",countryCode:"CI",callingCode:"+225"},{country:"Jamaica",countryCode:"JM",callingCode:"+1876"},{country:"Japan",countryCode:"JP",callingCode:"+81"},{country:"Jordan",countryCode:"JO",callingCode:"+962"},{country:"Kazakhstan",countryCode:"KZ",callingCode:"+7"},{country:"Kenya",countryCode:"KE",callingCode:"+254"},{country:"Kiribati",countryCode:"KI",callingCode:"+686"},{country:"Kuwait",countryCode:"KW",callingCode:"+965"},{country:"Kyrgyzstan",countryCode:"KG",callingCode:"+996"},{country:"Laos",countryCode:"LA",callingCode:"+856"},{country:"Latvia",countryCode:"LV",callingCode:"+371"},{country:"Lebanon",countryCode:"LB",callingCode:"+961"},{country:"Lesotho",countryCode:"LS",callingCode:"+266"},{country:"Liberia",countryCode:"LR",callingCode:"+231"},{country:"Libya",countryCode:"LY",callingCode:"+218"},{country:"Liechtenstein",countryCode:"LI",callingCode:"+423"},{country:"Lithuania",countryCode:"LT",callingCode:"+370"},{country:"Luxembourg",countryCode:"LU",callingCode:"+352"},{country:"Macao",countryCode:"MO",callingCode:"+853"},{country:"Macedonia",countryCode:"MK",callingCode:"+389"},{country:"Madagascar",countryCode:"MG",callingCode:"+261"},{country:"Malawi",countryCode:"MW",callingCode:"+265"},{country:"Malaysia",countryCode:"MY",callingCode:"+60"},{country:"Maldives",countryCode:"MV",callingCode:"+960"},{country:"Mali",countryCode:"ML",callingCode:"+223"},{country:"Malta",countryCode:"MT",callingCode:"+356"},{country:"Marshall Islands",countryCode:"MH",callingCode:"+692"},{country:"Martinique",countryCode:"MQ",callingCode:"+596"},{country:"Mauritania",countryCode:"MR",callingCode:"+222"},{country:"Mauritius",countryCode:"MU",callingCode:"+230"},{country:"Mayotte",countryCode:"YT",callingCode:"+262"},{country:"Mexico",countryCode:"MX",callingCode:"+52"},{country:"Micronesia",countryCode:"FM",callingCode:"+691"},{country:"Moldova",countryCode:"MD",callingCode:"+373"},{country:"Monaco",countryCode:"MC",callingCode:"+377"},{country:"Mongolia",countryCode:"MN",callingCode:"+976"},{country:"Montserrat",countryCode:"MS",callingCode:"+1664"},{country:"Morocco",countryCode:"MA",callingCode:"+212"},{country:"Mozambique",countryCode:"MZ",callingCode:"+258"},{country:"Myanmar",countryCode:"MM",callingCode:"+95"},{country:"Namibia",countryCode:"NA",callingCode:"+264"},{country:"Nauru",countryCode:"NR",callingCode:"+674"},{country:"Nepal",countryCode:"NP",callingCode:"+977"},{country:"Netherlands",countryCode:"NL",callingCode:"+31"},{country:"New Caledonia",countryCode:"NC",callingCode:"+687"},{country:"New Zealand",countryCode:"NZ",callingCode:"+64"},{country:"Nicaragua",countryCode:"NI",callingCode:"+505"},{country:"Niger",countryCode:"NE",callingCode:"+227"},{country:"Nigeria",countryCode:"NG",callingCode:"+234"},{country:"Niue",countryCode:"NU",callingCode:"+683"},{country:"Norfolk Island",countryCode:"NF",callingCode:"+672"},{country:"North Korea",countryCode:"KP",callingCode:"+850"},{country:"Northern Mariana Islands",countryCode:"MP",callingCode:"+1670"},{country:"Norway",countryCode:"NO",callingCode:"+47"},{country:"Oman",countryCode:"OM",callingCode:"+968"},{country:"Pakistan",countryCode:"PK",callingCode:"+92"},{country:"Palau",countryCode:"PW",callingCode:"+680"},{country:"Palestinian Territory",countryCode:"PS",callingCode:"+970"},{country:"Panama",countryCode:"PA",callingCode:"+507"},{country:"Papua New Guinea",countryCode:"PG",callingCode:"+675"},{country:"Paraguay",countryCode:"PY",callingCode:"+595"},{country:"Peru",countryCode:"PE",callingCode:"+51"},{country:"Philippines",countryCode:"PH",callingCode:"+63"},{country:"Pitcairn",countryCode:"PN",callingCode:"+872"},{country:"Poland",countryCode:"PL",callingCode:"+48"},{country:"Portugal",countryCode:"PT",callingCode:"+351"},{country:"Puerto Rico",countryCode:"PR",callingCode:"+1"},{country:"Qatar",countryCode:"QA",callingCode:"+974"},{country:"Republic of the Congo",countryCode:"CG",callingCode:"+242"},{country:"Reunion",countryCode:"RE",callingCode:"+262"},{country:"Romania",countryCode:"RO",callingCode:"+40"},{country:"Russia",countryCode:"RU",callingCode:"+7"},{country:"Rwanda",countryCode:"RW",callingCode:"+250"},{country:"Saint Helena",countryCode:"SH",callingCode:"+290"},{country:"Saint Kitts and Nevis",countryCode:"KN",callingCode:"+1869"},{country:"Saint Lucia",countryCode:"LC",callingCode:"+1758"},{country:"Saint Pierre and Miquelon",countryCode:"PM",callingCode:"+508"},{country:"Saint Vincent and the Grenadines",countryCode:"VC",callingCode:"+1784"},{country:"Samoa",countryCode:"WS",callingCode:"+685"},{country:"San Marino",countryCode:"SM",callingCode:"+378"},{country:"Sao Tome and Principe",countryCode:"ST",callingCode:"+239"},{country:"Saudi Arabia",countryCode:"SA",callingCode:"+966"},{country:"Senegal",countryCode:"SN",callingCode:"+221"},{country:"Seychelles",countryCode:"SC",callingCode:"+248"},{country:"Sierra Leone",countryCode:"SL",callingCode:"+232"},{country:"Singapore",countryCode:"SG",callingCode:"+65"},{country:"Slovakia",countryCode:"SK",callingCode:"+421"},{country:"Slovenia",countryCode:"SI",callingCode:"+386"},{country:"Solomon Islands",countryCode:"SB",callingCode:"+677"},{country:"Somalia",countryCode:"SO",callingCode:"+252"},{country:"South Africa",countryCode:"ZA",callingCode:"+27"},{country:"South Georgia and the South Sandwich Islands",countryCode:"GS",callingCode:"+500"},{country:"South Korea",countryCode:"KR",callingCode:"+82"},{country:"Spain",countryCode:"ES",callingCode:"+34"},{country:"Sri Lanka",countryCode:"LK",callingCode:"+94"},{country:"Sudan",countryCode:"SD",callingCode:"+249"},{country:"Suriname",countryCode:"SR",callingCode:"+597"},{country:"Svalbard and Jan Mayen",countryCode:"SJ",callingCode:"+47"},{country:"Swaziland",countryCode:"SZ",callingCode:"+268"},{country:"Sweden",countryCode:"SE",callingCode:"+46"},{country:"Switzerland",countryCode:"CH",callingCode:"+41"},{country:"Syria",countryCode:"SY",callingCode:"+963"},{country:"Taiwan",countryCode:"TW",callingCode:"+886"},{country:"Tajikistan",countryCode:"TJ",callingCode:"+992"},{country:"Tanzania",countryCode:"TZ",callingCode:"+255"},{country:"Thailand",countryCode:"TH",callingCode:"+66"},{country:"Togo",countryCode:"TG",callingCode:"+228"},{country:"Tokelau",countryCode:"TK",callingCode:"+690"},{country:"Tonga",countryCode:"TO",callingCode:"+676"},{country:"Trinidad and Tobago",countryCode:"TT",callingCode:"+1868"},{country:"Tunisia",countryCode:"TN",callingCode:"+216"},{country:"Turkey",countryCode:"TR",callingCode:"+90"},{country:"Turkmenistan",countryCode:"TM",callingCode:"+993"},{country:"Turks and Caicos Islands",countryCode:"TC",callingCode:"+1649"},{country:"Tuvalu",countryCode:"TV",callingCode:"+688"},{country:"U.S. Virgin Islands",countryCode:"VI",callingCode:"+1340"},{country:"Uganda",countryCode:"UG",callingCode:"+256"},{country:"Ukraine",countryCode:"UA",callingCode:"+380"},{country:"United Arab Emirates",countryCode:"AE",callingCode:"+971"},{country:"United Kingdom",countryCode:"GB",callingCode:"+44"},{country:"United States",countryCode:"US",callingCode:"+1"},{country:"United States Minor Outlying Islands",countryCode:"UM",callingCode:"+1"},{country:"Uruguay",countryCode:"UY",callingCode:"+598"},{country:"Uzbekistan",countryCode:"UZ",callingCode:"+998"},{country:"Vanuatu",countryCode:"VU",callingCode:"+678"},{country:"Vatican",countryCode:"VA",callingCode:"+379"},{country:"Venezuela",countryCode:"VE",callingCode:"+58"},{country:"Vietnam",countryCode:"VN",callingCode:"+84"},{country:"Wallis and Futuna",countryCode:"WF",callingCode:"+681"},{country:"Western Sahara",countryCode:"EH",callingCode:"+212"},{country:"Yemen",countryCode:"YE",callingCode:"+967"},{country:"Zambia",countryCode:"ZM",callingCode:"+260"},{country:"Zimbabwe",countryCode:"ZW",callingCode:"+263"}],i=o=>u.find((e=>e.countryCode===o));const d=({placeholder:e,country:r,onChange:t,value:c,iconComponent:a,inputProps:l,onlyCountries:d,excludeCountries:y,preferredCountries:s,showDropdownIcon:C=!0,dialCodeInputField:g=!1,search:p=!0,searchPlaceholder:f="Search country",showSearchIcon:m=!0,searchIconComponent:h,searchProps:v,searchNotFound:b="Not found"})=>{const[S,w]=o.useState({}),[x,N]=o.useState(!1),[T,E]=o.useState(c||""),[R,j]=o.useState(u),[k,M]=o.useState(0),P=o.useRef(null),_=o.useRef(null);var I,O;I=P,O=()=>N(!1),o.useEffect((()=>{const o=o=>{I.current&&!I.current.contains(o.target)&&O(o)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}}),[I,O]);const A=o=>{x&&("ArrowDown"===o.key&&(o.preventDefault(),M((o=>o<R.length-1?o+1:o))),"ArrowUp"===o.key&&(o.preventDefault(),M((o=>o>0?o-1:0))),"Escape"===o.key&&N(!1),"Enter"===o.key&&k>=0&&(w(R[k]),N(!1)))};return o.useEffect((()=>{if(k<0||k>R.length||!_)return()=>{};if(x&&_&&R.length>0){let e=Array.from(_.current?.children);e[k]&&(o=e[k].offsetTop-65,p&&R.length>0&&_.current?.scrollTo({top:o,behavior:"smooth"}))}var o}),[k]),o.useMemo((()=>{if(g){const o=T?.replace(S.callingCode,i(r).callingCode);console.log(o),E(o.length>0?o:i(r).callingCode)}w(i(r))}),[r,g]),o.useMemo((()=>{j(((o,e,n)=>{let r=[];return r=e&&e.length>0?u.filter((o=>!e?.includes(o.countryCode))):o&&o?.length>0?u.filter((e=>o?.includes(e.countryCode))):u,r.sort(((o,e)=>Number(n?.includes(e.countryCode))-Number(n?.includes(o.countryCode))||n?.indexOf(o.countryCode)-n?.indexOf(e.countryCode)))})(d,y,s))}),[d,y,s]),n.exports.jsx("div",{className:"simple-phone-input-sri198-container",onKeyDown:o=>A(o),tabIndex:-1,children:n.exports.jsxs("div",{className:"simple-phone-input-sri198-main",children:[n.exports.jsxs("div",{className:"simple-phone-input-sri198-dropdown-container",ref:P,children:[n.exports.jsxs("div",{onClick:()=>N(!x),className:g?"simple-phone-input-sri198-dropdown-container-button dial":"simple-phone-input-sri198-dropdown-container-button",children:[n.exports.jsx("img",{src:"https://cdn.jsdelivr.net/gh/siamahnaf198/country-flags@main/img/"+S.countryCode+".svg",alt:S.country,width:"20px"}),!g&&n.exports.jsx("span",{className:"simple-phone-input-sri198-selected-code",children:S.callingCode}),C&&n.exports.jsx("div",{className:x?"simple-phone-input-sri198-dropdown-icon":"simple-phone-input-sri198-dropdown-icon active",children:a||n.exports.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",children:n.exports.jsx("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})})]}),n.exports.jsxs("ul",{className:x?"simple-phone-input-sri198-dropdown active":"simple-phone-input-sri198-dropdown",ref:_,children:[p&&n.exports.jsxs("div",{className:"simple-phone-input-sri198-search-container",children:[n.exports.jsx("input",{placeholder:f,...v,onChange:o=>{const e=o.target.value;j(((o,e,n)=>{let r=[];return r=n&&n.length>0?u.filter((o=>!n?.includes(o.countryCode))):e&&e?.length>0?u.filter((o=>e?.includes(o.countryCode))):u,r.filter((e=>{const n=new RegExp(o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"gi");return e.country.match(n)}))})(e,d,y))}}),m&&n.exports.jsx("div",{className:"simple-phone-input-sri198-search-icon",children:h??n.exports.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 48 48",children:[n.exports.jsxs("g",{fill:"#616161",children:[n.exports.jsx("path",{d:"m29.175 31.99l2.828-2.827l12.019 12.019l-2.828 2.827z"}),n.exports.jsx("circle",{cx:"20",cy:"20",r:"16"})]}),n.exports.jsx("path",{fill:"#37474F",d:"m32.45 35.34l2.827-2.828l8.696 8.696l-2.828 2.828z"}),n.exports.jsx("circle",{cx:"20",cy:"20",r:"13",fill:"#64B5F6"}),n.exports.jsx("path",{fill:"#BBDEFB",d:"M26.9 14.2c-1.7-2-4.2-3.2-6.9-3.2s-5.2 1.2-6.9 3.2c-.4.4-.3 1.1.1 1.4c.4.4 1.1.3 1.4-.1C16 13.9 17.9 13 20 13s4 .9 5.4 2.5c.2.2.5.4.8.4c.2 0 .5-.1.6-.2c.4-.4.4-1.1.1-1.5z"})]})})]}),0===R.length&&n.exports.jsx("div",{className:"simple-phone-input-sri198-not-found",children:b}),R.map(((o,e)=>n.exports.jsxs("li",{onClick:()=>((o,e)=>{if(g){const e=T?.replace(S.callingCode,o.callingCode);E(e.length>0?e:o.callingCode),t(e.length>0?e:o.callingCode)}else t(o.callingCode+T);w(o),N(!1),M(e)})(o,e),className:e===k?"active":"",children:[n.exports.jsx("img",{src:"https://cdn.jsdelivr.net/gh/siamahnaf198/country-flags@main/img/"+o.countryCode+".svg",alt:o.country,width:"20px"}),n.exports.jsx("span",{className:"simple-phone-input-sri198-dropdown-text",children:o.country}),n.exports.jsx("span",{className:"simple-phone-input-sri198-dropdown-country-code",children:o.callingCode})]},e)))]})]}),n.exports.jsx("input",{className:"simple-phone-input-sri198-input",placeholder:e,onChange:o=>{const e=o.target.value.replace(/\D/g,"");g?(t("+"+e),E("+"+e)):(E(e),t(S.callingCode+e))},type:"tel",onInput:o=>{if(g){const e=T.slice(S.callingCode.length);o.target.value.startsWith(S.callingCode)?o.target.value=o.target.value:o.target.value=S.callingCode+e}},onKeyDown:o=>A(o),value:T,...l})]})})};export{d as PhoneInput}; | ||
import{jsx as o,jsxs as n}from"react/jsx-runtime";import e from"react";const c=[{country:"Afghanistan",countryCode:"AF",callingCode:"+93"},{country:"Albania",countryCode:"AL",callingCode:"+355"},{country:"Algeria",countryCode:"DZ",callingCode:"+213"},{country:"American Samoa",countryCode:"AS",callingCode:"+1684"},{country:"Andorra",countryCode:"AD",callingCode:"+376"},{country:"Angola",countryCode:"AO",callingCode:"+244"},{country:"Anguilla",countryCode:"AI",callingCode:"+1264"},{country:"Antarctica",countryCode:"AQ",callingCode:"+672"},{country:"Antigua and Barbuda",countryCode:"AG",callingCode:"+1268"},{country:"Argentina",countryCode:"AR",callingCode:"+54"},{country:"Armenia",countryCode:"AM",callingCode:"+374"},{country:"Aruba",countryCode:"AW",callingCode:"+297"},{country:"Australia",countryCode:"AU",callingCode:"+61"},{country:"Austria",countryCode:"AT",callingCode:"+43"},{country:"Azerbaijan",countryCode:"AZ",callingCode:"+994"},{country:"Bahamas",countryCode:"BS",callingCode:"+1242"},{country:"Bahrain",countryCode:"BH",callingCode:"+973"},{country:"Bangladesh",countryCode:"BD",callingCode:"+880"},{country:"Barbados",countryCode:"BB",callingCode:"+1246"},{country:"Belarus",countryCode:"BY",callingCode:"+375"},{country:"Belgium",countryCode:"BE",callingCode:"+32"},{country:"Belize",countryCode:"BZ",callingCode:"+501"},{country:"Benin",countryCode:"BJ",callingCode:"+229"},{country:"Bermuda",countryCode:"BM",callingCode:"+1441"},{country:"Bhutan",countryCode:"BT",callingCode:"+975"},{country:"Bolivia",countryCode:"BO",callingCode:"+591"},{country:"Bosnia and Herzegovina",countryCode:"BA",callingCode:"+387"},{country:"Botswana",countryCode:"BW",callingCode:"+267"},{country:"Bouvet Island",countryCode:"BV",callingCode:"+47"},{country:"Brazil",countryCode:"BR",callingCode:"+55"},{country:"British Indian Ocean Territory",countryCode:"IO",callingCode:"+246"},{country:"British Virgin Islands",countryCode:"VG",callingCode:"+1284"},{country:"Brunei",countryCode:"BN",callingCode:"+673"},{country:"Bulgaria",countryCode:"BG",callingCode:"+359"},{country:"Burkina Faso",countryCode:"BF",callingCode:"+226"},{country:"Burundi",countryCode:"BI",callingCode:"+257"},{country:"Cambodia",countryCode:"KH",callingCode:"+855"},{country:"Cameroon",countryCode:"CM",callingCode:"+237"},{country:"Canada",countryCode:"CA",callingCode:"+1"},{country:"Cape Verde",countryCode:"CV",callingCode:"+238"},{country:"Cayman Islands",countryCode:"KY",callingCode:"+1345"},{country:"Central African Republic",countryCode:"CF",callingCode:"+236"},{country:"Chad",countryCode:"TD",callingCode:"+235"},{country:"Chile",countryCode:"CL",callingCode:"+56"},{country:"China",countryCode:"CN",callingCode:"+86"},{country:"Christmas Island",countryCode:"CX",callingCode:"+61"},{country:"Cocos Islands",countryCode:"CC",callingCode:"+61"},{country:"Colombia",countryCode:"CO",callingCode:"+57"},{country:"Comoros",countryCode:"KM",callingCode:"+269"},{country:"Cook Islands",countryCode:"CK",callingCode:"+682"},{country:"Costa Rica",countryCode:"CR",callingCode:"+506"},{country:"Croatia",countryCode:"HR",callingCode:"+385"},{country:"Cuba",countryCode:"CU",callingCode:"+53"},{country:"Cyprus",countryCode:"CY",callingCode:"+357"},{country:"Czech Republic",countryCode:"CZ",callingCode:"+420"},{country:"Democratic Republic of the Congo",countryCode:"CD",callingCode:"+243"},{country:"Denmark",countryCode:"DK",callingCode:"+45"},{country:"Djibouti",countryCode:"DJ",callingCode:"+253"},{country:"Dominica",countryCode:"DM",callingCode:"+1767"},{country:"Dominican Republic",countryCode:"DO",callingCode:"+1"},{country:"East Timor",countryCode:"TL",callingCode:"+670"},{country:"Ecuador",countryCode:"EC",callingCode:"+593"},{country:"Egypt",countryCode:"EG",callingCode:"+20"},{country:"El Salvador",countryCode:"SV",callingCode:"+503"},{country:"Equatorial Guinea",countryCode:"GQ",callingCode:"+240"},{country:"Eritrea",countryCode:"ER",callingCode:"+291"},{country:"Estonia",countryCode:"EE",callingCode:"+372"},{country:"Ethiopia",countryCode:"ET",callingCode:"+251"},{country:"Falkland Islands",countryCode:"FK",callingCode:"+500"},{country:"Faroe Islands",countryCode:"FO",callingCode:"+298"},{country:"Fiji",countryCode:"FJ",callingCode:"+679"},{country:"Finland",countryCode:"FI",callingCode:"+358"},{country:"France",countryCode:"FR",callingCode:"+33"},{country:"French Guiana",countryCode:"GF",callingCode:"+594"},{country:"French Polynesia",countryCode:"PF",callingCode:"+689"},{country:"French Southern Territories",countryCode:"TF",callingCode:"+262"},{country:"Gabon",countryCode:"GA",callingCode:"+241"},{country:"Gambia",countryCode:"GM",callingCode:"+220"},{country:"Georgia",countryCode:"GE",callingCode:"+995"},{country:"Germany",countryCode:"DE",callingCode:"+49"},{country:"Ghana",countryCode:"GH",callingCode:"+233"},{country:"Gibraltar",countryCode:"GI",callingCode:"+350"},{country:"Greece",countryCode:"GR",callingCode:"+30"},{country:"Greenland",countryCode:"GL",callingCode:"+299"},{country:"Grenada",countryCode:"GD",callingCode:"+473"},{country:"Guadeloupe",countryCode:"GP",callingCode:"+590"},{country:"Guam",countryCode:"GU",callingCode:"+1671"},{country:"Guatemala",countryCode:"GT",callingCode:"+502"},{country:"Guinea",countryCode:"GN",callingCode:"+224"},{country:"Guinea-Bissau",countryCode:"GW",callingCode:"+245"},{country:"Guyana",countryCode:"GY",callingCode:"+592"},{country:"Haiti",countryCode:"HT",callingCode:"+509"},{country:"Honduras",countryCode:"HN",callingCode:"+504"},{country:"Hong Kong",countryCode:"HK",callingCode:"+852"},{country:"Hungary",countryCode:"HU",callingCode:"+36"},{country:"Iceland",countryCode:"IS",callingCode:"+354"},{country:"India",countryCode:"IN",callingCode:"+91"},{country:"Indonesia",countryCode:"ID",callingCode:"+62"},{country:"Iran",countryCode:"IR",callingCode:"+98"},{country:"Iraq",countryCode:"IQ",callingCode:"+964"},{country:"Ireland",countryCode:"IE",callingCode:"+353"},{country:"Israel",countryCode:"IL",callingCode:"+972"},{country:"Italy",countryCode:"IT",callingCode:"+39"},{country:"Ivory Coast",countryCode:"CI",callingCode:"+225"},{country:"Jamaica",countryCode:"JM",callingCode:"+1876"},{country:"Japan",countryCode:"JP",callingCode:"+81"},{country:"Jordan",countryCode:"JO",callingCode:"+962"},{country:"Kazakhstan",countryCode:"KZ",callingCode:"+7"},{country:"Kenya",countryCode:"KE",callingCode:"+254"},{country:"Kiribati",countryCode:"KI",callingCode:"+686"},{country:"Kuwait",countryCode:"KW",callingCode:"+965"},{country:"Kyrgyzstan",countryCode:"KG",callingCode:"+996"},{country:"Laos",countryCode:"LA",callingCode:"+856"},{country:"Latvia",countryCode:"LV",callingCode:"+371"},{country:"Lebanon",countryCode:"LB",callingCode:"+961"},{country:"Lesotho",countryCode:"LS",callingCode:"+266"},{country:"Liberia",countryCode:"LR",callingCode:"+231"},{country:"Libya",countryCode:"LY",callingCode:"+218"},{country:"Liechtenstein",countryCode:"LI",callingCode:"+423"},{country:"Lithuania",countryCode:"LT",callingCode:"+370"},{country:"Luxembourg",countryCode:"LU",callingCode:"+352"},{country:"Macao",countryCode:"MO",callingCode:"+853"},{country:"Macedonia",countryCode:"MK",callingCode:"+389"},{country:"Madagascar",countryCode:"MG",callingCode:"+261"},{country:"Malawi",countryCode:"MW",callingCode:"+265"},{country:"Malaysia",countryCode:"MY",callingCode:"+60"},{country:"Maldives",countryCode:"MV",callingCode:"+960"},{country:"Mali",countryCode:"ML",callingCode:"+223"},{country:"Malta",countryCode:"MT",callingCode:"+356"},{country:"Marshall Islands",countryCode:"MH",callingCode:"+692"},{country:"Martinique",countryCode:"MQ",callingCode:"+596"},{country:"Mauritania",countryCode:"MR",callingCode:"+222"},{country:"Mauritius",countryCode:"MU",callingCode:"+230"},{country:"Mayotte",countryCode:"YT",callingCode:"+262"},{country:"Mexico",countryCode:"MX",callingCode:"+52"},{country:"Micronesia",countryCode:"FM",callingCode:"+691"},{country:"Moldova",countryCode:"MD",callingCode:"+373"},{country:"Monaco",countryCode:"MC",callingCode:"+377"},{country:"Mongolia",countryCode:"MN",callingCode:"+976"},{country:"Montserrat",countryCode:"MS",callingCode:"+1664"},{country:"Morocco",countryCode:"MA",callingCode:"+212"},{country:"Mozambique",countryCode:"MZ",callingCode:"+258"},{country:"Myanmar",countryCode:"MM",callingCode:"+95"},{country:"Namibia",countryCode:"NA",callingCode:"+264"},{country:"Nauru",countryCode:"NR",callingCode:"+674"},{country:"Nepal",countryCode:"NP",callingCode:"+977"},{country:"Netherlands",countryCode:"NL",callingCode:"+31"},{country:"New Caledonia",countryCode:"NC",callingCode:"+687"},{country:"New Zealand",countryCode:"NZ",callingCode:"+64"},{country:"Nicaragua",countryCode:"NI",callingCode:"+505"},{country:"Niger",countryCode:"NE",callingCode:"+227"},{country:"Nigeria",countryCode:"NG",callingCode:"+234"},{country:"Niue",countryCode:"NU",callingCode:"+683"},{country:"Norfolk Island",countryCode:"NF",callingCode:"+672"},{country:"North Korea",countryCode:"KP",callingCode:"+850"},{country:"Northern Mariana Islands",countryCode:"MP",callingCode:"+1670"},{country:"Norway",countryCode:"NO",callingCode:"+47"},{country:"Oman",countryCode:"OM",callingCode:"+968"},{country:"Pakistan",countryCode:"PK",callingCode:"+92"},{country:"Palau",countryCode:"PW",callingCode:"+680"},{country:"Palestinian Territory",countryCode:"PS",callingCode:"+970"},{country:"Panama",countryCode:"PA",callingCode:"+507"},{country:"Papua New Guinea",countryCode:"PG",callingCode:"+675"},{country:"Paraguay",countryCode:"PY",callingCode:"+595"},{country:"Peru",countryCode:"PE",callingCode:"+51"},{country:"Philippines",countryCode:"PH",callingCode:"+63"},{country:"Pitcairn",countryCode:"PN",callingCode:"+872"},{country:"Poland",countryCode:"PL",callingCode:"+48"},{country:"Portugal",countryCode:"PT",callingCode:"+351"},{country:"Puerto Rico",countryCode:"PR",callingCode:"+1"},{country:"Qatar",countryCode:"QA",callingCode:"+974"},{country:"Republic of the Congo",countryCode:"CG",callingCode:"+242"},{country:"Reunion",countryCode:"RE",callingCode:"+262"},{country:"Romania",countryCode:"RO",callingCode:"+40"},{country:"Russia",countryCode:"RU",callingCode:"+7"},{country:"Rwanda",countryCode:"RW",callingCode:"+250"},{country:"Saint Helena",countryCode:"SH",callingCode:"+290"},{country:"Saint Kitts and Nevis",countryCode:"KN",callingCode:"+1869"},{country:"Saint Lucia",countryCode:"LC",callingCode:"+1758"},{country:"Saint Pierre and Miquelon",countryCode:"PM",callingCode:"+508"},{country:"Saint Vincent and the Grenadines",countryCode:"VC",callingCode:"+1784"},{country:"Samoa",countryCode:"WS",callingCode:"+685"},{country:"San Marino",countryCode:"SM",callingCode:"+378"},{country:"Sao Tome and Principe",countryCode:"ST",callingCode:"+239"},{country:"Saudi Arabia",countryCode:"SA",callingCode:"+966"},{country:"Senegal",countryCode:"SN",callingCode:"+221"},{country:"Seychelles",countryCode:"SC",callingCode:"+248"},{country:"Sierra Leone",countryCode:"SL",callingCode:"+232"},{country:"Singapore",countryCode:"SG",callingCode:"+65"},{country:"Slovakia",countryCode:"SK",callingCode:"+421"},{country:"Slovenia",countryCode:"SI",callingCode:"+386"},{country:"Solomon Islands",countryCode:"SB",callingCode:"+677"},{country:"Somalia",countryCode:"SO",callingCode:"+252"},{country:"South Africa",countryCode:"ZA",callingCode:"+27"},{country:"South Georgia and the South Sandwich Islands",countryCode:"GS",callingCode:"+500"},{country:"South Korea",countryCode:"KR",callingCode:"+82"},{country:"Spain",countryCode:"ES",callingCode:"+34"},{country:"Sri Lanka",countryCode:"LK",callingCode:"+94"},{country:"Sudan",countryCode:"SD",callingCode:"+249"},{country:"Suriname",countryCode:"SR",callingCode:"+597"},{country:"Svalbard and Jan Mayen",countryCode:"SJ",callingCode:"+47"},{country:"Swaziland",countryCode:"SZ",callingCode:"+268"},{country:"Sweden",countryCode:"SE",callingCode:"+46"},{country:"Switzerland",countryCode:"CH",callingCode:"+41"},{country:"Syria",countryCode:"SY",callingCode:"+963"},{country:"Taiwan",countryCode:"TW",callingCode:"+886"},{country:"Tajikistan",countryCode:"TJ",callingCode:"+992"},{country:"Tanzania",countryCode:"TZ",callingCode:"+255"},{country:"Thailand",countryCode:"TH",callingCode:"+66"},{country:"Togo",countryCode:"TG",callingCode:"+228"},{country:"Tokelau",countryCode:"TK",callingCode:"+690"},{country:"Tonga",countryCode:"TO",callingCode:"+676"},{country:"Trinidad and Tobago",countryCode:"TT",callingCode:"+1868"},{country:"Tunisia",countryCode:"TN",callingCode:"+216"},{country:"Turkey",countryCode:"TR",callingCode:"+90"},{country:"Turkmenistan",countryCode:"TM",callingCode:"+993"},{country:"Turks and Caicos Islands",countryCode:"TC",callingCode:"+1649"},{country:"Tuvalu",countryCode:"TV",callingCode:"+688"},{country:"U.S. Virgin Islands",countryCode:"VI",callingCode:"+1340"},{country:"Uganda",countryCode:"UG",callingCode:"+256"},{country:"Ukraine",countryCode:"UA",callingCode:"+380"},{country:"United Arab Emirates",countryCode:"AE",callingCode:"+971"},{country:"United Kingdom",countryCode:"GB",callingCode:"+44"},{country:"United States",countryCode:"US",callingCode:"+1"},{country:"United States Minor Outlying Islands",countryCode:"UM",callingCode:"+1"},{country:"Uruguay",countryCode:"UY",callingCode:"+598"},{country:"Uzbekistan",countryCode:"UZ",callingCode:"+998"},{country:"Vanuatu",countryCode:"VU",callingCode:"+678"},{country:"Vatican",countryCode:"VA",callingCode:"+379"},{country:"Venezuela",countryCode:"VE",callingCode:"+58"},{country:"Vietnam",countryCode:"VN",callingCode:"+84"},{country:"Wallis and Futuna",countryCode:"WF",callingCode:"+681"},{country:"Western Sahara",countryCode:"EH",callingCode:"+212"},{country:"Yemen",countryCode:"YE",callingCode:"+967"},{country:"Zambia",countryCode:"ZM",callingCode:"+260"},{country:"Zimbabwe",countryCode:"ZW",callingCode:"+263"}],r=o=>c.find((n=>n.countryCode===o));const t=({placeholder:t,country:l,onChange:a,value:d,iconComponent:u,inputProps:i,onlyCountries:C,excludeCountries:y,preferredCountries:g,showDropdownIcon:s=!0,dialCodeInputField:h=!1,search:p=!0,searchPlaceholder:m="Search country",showSearchIcon:S=!0,searchIconComponent:M,searchProps:N,searchNotFound:v="Not found"})=>{const[B,A]=e.useState({}),[I,G]=e.useState(!1),[T,w]=e.useState(d||""),[f,E]=e.useState(c),[b,P]=e.useState(0),L=e.useRef(null),R=e.useRef(null);var K,F;K=L,F=()=>G(!1),e.useEffect((()=>{const o=o=>{K.current&&!K.current.contains(o.target)&&F(o)};return document.addEventListener("mousedown",o),document.addEventListener("touchstart",o),()=>{document.removeEventListener("mousedown",o),document.removeEventListener("touchstart",o)}}),[K,F]);const D=o=>{I&&("ArrowDown"===o.key&&(o.preventDefault(),P((o=>o<f.length-1?o+1:o))),"ArrowUp"===o.key&&(o.preventDefault(),P((o=>o>0?o-1:0))),"Escape"===o.key&&G(!1),"Enter"===o.key&&b>=0&&(A(f[b]),G(!1)))};return e.useEffect((()=>{if(b<0||b>f.length||!R)return()=>{};if(I&&R&&f.length>0){let n=Array.from(R.current?.children);n[b]&&(o=n[b].offsetTop-65,p&&f.length>0&&R.current?.scrollTo({top:o,behavior:"smooth"}))}var o}),[b]),e.useMemo((()=>{if(h){const o=T?.replace(B.callingCode,r(l).callingCode);console.log(o),w(o.length>0?o:r(l).callingCode)}A(r(l))}),[l,h]),e.useMemo((()=>{E(((o,n,e)=>{let r=[];return r=n&&n.length>0?c.filter((o=>!n?.includes(o.countryCode))):o&&o?.length>0?c.filter((n=>o?.includes(n.countryCode))):c,r.sort(((o,n)=>Number(e?.includes(n.countryCode))-Number(e?.includes(o.countryCode))||e?.indexOf(o.countryCode)-e?.indexOf(n.countryCode)))})(C,y,g))}),[C,y,g]),o("div",{className:"simple-phone-input-sri198-container",onKeyDown:o=>D(o),tabIndex:-1,children:n("div",{className:"simple-phone-input-sri198-main",children:[n("div",{className:"simple-phone-input-sri198-dropdown-container",ref:L,children:[n("div",{onClick:()=>G(!I),className:h?"simple-phone-input-sri198-dropdown-container-button dial":"simple-phone-input-sri198-dropdown-container-button",children:[o("img",{src:"https://cdn.jsdelivr.net/gh/siamahnaf198/country-flags@main/img/"+B.countryCode+".svg",alt:B.country,width:"20px"}),!h&&o("span",{className:"simple-phone-input-sri198-selected-code",children:B.callingCode}),s&&o("div",{className:I?"simple-phone-input-sri198-dropdown-icon":"simple-phone-input-sri198-dropdown-icon active",children:u||o("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 24 24",children:o("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})})]}),n("ul",{className:I?"simple-phone-input-sri198-dropdown active":"simple-phone-input-sri198-dropdown",ref:R,children:[p&&n("div",{className:"simple-phone-input-sri198-search-container",children:[o("input",{placeholder:m,...N,onChange:o=>{const n=o.target.value;E(((o,n,e)=>{let r=[];return r=e&&e.length>0?c.filter((o=>!e?.includes(o.countryCode))):n&&n?.length>0?c.filter((o=>n?.includes(o.countryCode))):c,r.filter((n=>{const e=new RegExp(o.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"gi");return n.country.match(e)}))})(n,C,y))}}),S&&o("div",{className:"simple-phone-input-sri198-search-icon",children:M??n("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",preserveAspectRatio:"xMidYMid meet",viewBox:"0 0 48 48",children:[n("g",{fill:"#616161",children:[o("path",{d:"m29.175 31.99l2.828-2.827l12.019 12.019l-2.828 2.827z"}),o("circle",{cx:"20",cy:"20",r:"16"})]}),o("path",{fill:"#37474F",d:"m32.45 35.34l2.827-2.828l8.696 8.696l-2.828 2.828z"}),o("circle",{cx:"20",cy:"20",r:"13",fill:"#64B5F6"}),o("path",{fill:"#BBDEFB",d:"M26.9 14.2c-1.7-2-4.2-3.2-6.9-3.2s-5.2 1.2-6.9 3.2c-.4.4-.3 1.1.1 1.4c.4.4 1.1.3 1.4-.1C16 13.9 17.9 13 20 13s4 .9 5.4 2.5c.2.2.5.4.8.4c.2 0 .5-.1.6-.2c.4-.4.4-1.1.1-1.5z"})]})})]}),0===f.length&&o("div",{className:"simple-phone-input-sri198-not-found",children:v}),f.map(((e,c)=>n("li",{onClick:()=>((o,n)=>{if(h){const n=T?.replace(B.callingCode,o.callingCode);w(n.length>0?n:o.callingCode),a(n.length>0?n:o.callingCode)}else a(o.callingCode+T);A(o),G(!1),P(n)})(e,c),className:c===b?"active":"",children:[o("img",{src:"https://cdn.jsdelivr.net/gh/siamahnaf198/country-flags@main/img/"+e.countryCode+".svg",alt:e.country,width:"20px"}),o("span",{className:"simple-phone-input-sri198-dropdown-text",children:e.country}),o("span",{className:"simple-phone-input-sri198-dropdown-country-code",children:e.callingCode})]},c)))]})]}),o("input",{className:"simple-phone-input-sri198-input",placeholder:t,onChange:o=>{const n=o.target.value.replace(/\D/g,"");h?(a("+"+n),w("+"+n)):(w(n),a(B.callingCode+n))},type:"tel",onInput:o=>{if(h){const n=T.slice(B.callingCode.length);o.target.value.startsWith(B.callingCode)?o.target.value=o.target.value:o.target.value=B.callingCode+n}},onKeyDown:o=>D(o),value:T,...i})]})})};export{t as PhoneInput}; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "react-simple-phone-input", | ||
"version": "4.1.1", | ||
"version": "4.4.0", | ||
"description": "A simple react phone input component with calling code dropdown🤷", | ||
@@ -57,3 +57,7 @@ "homepage": "https://react-simple-phone-input.vercel.app", | ||
"typescript": "^4.9.4" | ||
}, | ||
"peerDependencies": { | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
24
534
0
88859
2
1