@payloqa/payment-widget 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import*as e from"react";import t,{useState as n,useCallback as r,forwardRef as o,useContext as i,useLayoutEffect as a,useRef as s,useMemo as l,createContext as u,Component as c,Fragment as d,useEffect as p}from"react";import{createPortal as f}from"react-dom";var m={exports:{}},h={},v=t,g=Symbol.for("react.element"),b=Symbol.for("react.fragment"),y=Object.prototype.hasOwnProperty,x=v.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,w={key:!0,ref:!0,__self:!0,__source:!0};function O(e,t,n){var r,o={},i=null,a=null;for(r in void 0!==n&&(i=""+n),void 0!==t.key&&(i=""+t.key),void 0!==t.ref&&(a=t.ref),t)y.call(t,r)&&!w.hasOwnProperty(r)&&(o[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===o[r]&&(o[r]=t[r]);return{$$typeof:g,type:e,key:i,ref:a,props:o,_owner:x.current}}h.Fragment=b,h.jsx=O,h.jsxs=O,m.exports=h;var C=m.exports;function S(e){try{return"https:"===new URL(e).protocol}catch{return!1}}function I(e,t,n,r){const o=new URLSearchParams({payment_id:t,status:n});if("completed"===n&&r){const e="number"==typeof r.amount?r.amount.toString():r.amount;o.append("amount",e),o.append("currency",r.currency||"GHS");const t=r.metadata?.reference||r.metadata?.order_reference;t&&o.append("reference",t)}if("failed"===n&&r?.metadata?.error){const e=r.metadata.error;o.append("reason",e.code||"unknown"),o.append("message",e.message||"Payment failed")}return`${e}?${o.toString()}`}class k{constructor(e){this.config=e}async makeRequest(e,t={}){const n=`${this.config.baseUrl||"https://payment.payloqa.com/api/v1/payments"}${e}`,r={"Content-Type":"application/json","X-API-Key":this.config.apiKey,"X-Platform-Id":this.config.platformId,...t.headers},o=await fetch(n,{...t,headers:r}),i=await o.json();if(!o.ok||!1===i.success){const e=i.error?.message||i.message||`HTTP ${o.status}: ${o.statusText}`,t=new Error(e);throw i.error?.code&&(t.code=i.error.code),t}return i}async createPayment(e){if(e.redirect_url&&!S(e.redirect_url))throw new Error("Redirect URL must be a valid HTTPS URL. HTTP URLs are not allowed for security reasons.");return this.makeRequest("/create",{method:"POST",body:JSON.stringify(e)})}async verifyOTP(e,t){return this.makeRequest(`/${e}/verify-otp`,{method:"POST",body:JSON.stringify(t)})}async resendOTP(e,t){return this.makeRequest(`/${e}/resend-otp`,{method:"POST",body:JSON.stringify(t)})}async getPaymentStatus(e){return this.makeRequest(`/${e}`,{method:"GET"})}async cancelPayment(e,t){return this.makeRequest(`/${e}/cancel`,{method:"POST",body:t?JSON.stringify(t):void 0})}async getPlatformInfo(){const e=await this.makeRequest("/platform",{method:"GET"});return{logo_url:e.data?.logo_url}}}const E=({value:e,onChange:t,onValid:n,placeholder:r="Phone number",disabled:o=!1,error:i,primaryColor:a="#3B82F6"})=>C.jsxs("div",{className:"w-full",children:[C.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Phone Number"}),C.jsx("input",{type:"tel",value:e,onChange:e=>{const r=e.target.value.replace(/\D/g,"").slice(0,10);t(r);10===r.length&&n&&n((e=>{const t=e.replace(/[^\d+]/g,"");return t.startsWith("+233")?t:t.startsWith("0")?"+233"+t.substring(1):10!==t.length||t.startsWith("0")?t:"+233"+t})(r))},placeholder:r,disabled:o,maxLength:10,className:`w-full px-4 py-3 border-2 rounded-lg text-base focus:outline-none focus:ring-2 focus:border-transparent transition-all ${i?"border-red-500":"border-gray-300"} ${o?"bg-gray-50 cursor-not-allowed":"bg-white"}`,style:i?{}:{"--focus-ring-color":a},onFocus:e=>{i||o||(e.target.style.borderColor=a,e.target.style.boxShadow=`0 0 0 3px ${a}33`)},onBlur:e=>{i||(e.target.style.borderColor="#D1D5DB",e.target.style.boxShadow="")}}),i&&C.jsx("p",{className:"mt-2 text-sm text-red-600 font-medium",children:i})]});function P(e){return P="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},P(e)}function M(e){var t=function(e,t){if("object"!=P(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=P(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==P(t)?t:t+""}function T(e,t,n){return(t=M(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach(function(t){T(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function L(e,t){if(e){if("string"==typeof e)return V(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?V(e,t):void 0}}function F(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||L(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function D(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var N=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},A.apply(null,arguments)}function $(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,M(r.key),r)}}function _(e,t){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_(e,t)}function H(e){return H=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},H(e)}function U(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(U=function(){return!!e})()}function B(e,t){if(t&&("object"==P(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function z(e){return function(e){if(Array.isArray(e))return V(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||L(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var W=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),G="-ms-",Y="-moz-",q="-webkit-",X="comm",K="rule",J="decl",Z="@keyframes",Q=Math.abs,ee=String.fromCharCode,te=Object.assign;function ne(e){return e.trim()}function re(e,t,n){return e.replace(t,n)}function oe(e,t){return e.indexOf(t)}function ie(e,t){return 0|e.charCodeAt(t)}function ae(e,t,n){return e.slice(t,n)}function se(e){return e.length}function le(e){return e.length}function ue(e,t){return t.push(e),e}var ce=1,de=1,pe=0,fe=0,me=0,he="";function ve(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:ce,column:de,length:a,return:""}}function ge(e,t){return te(ve("",null,null,"",null,null,0),e,{length:-e.length},t)}function be(){return me=fe>0?ie(he,--fe):0,de--,10===me&&(de=1,ce--),me}function ye(){return me=fe<pe?ie(he,fe++):0,de++,10===me&&(de=1,ce++),me}function xe(){return ie(he,fe)}function we(){return fe}function Oe(e,t){return ae(he,e,t)}function Ce(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Se(e){return ce=de=1,pe=se(he=e),fe=0,[]}function Ie(e){return he="",e}function ke(e){return ne(Oe(fe-1,Me(91===e?e+2:40===e?e+1:e)))}function Ee(e){for(;(me=xe())&&me<33;)ye();return Ce(e)>2||Ce(me)>3?"":" "}function Pe(e,t){for(;--t&&ye()&&!(me<48||me>102||me>57&&me<65||me>70&&me<97););return Oe(e,we()+(t<6&&32==xe()&&32==ye()))}function Me(e){for(;ye();)switch(me){case e:return fe;case 34:case 39:34!==e&&39!==e&&Me(me);break;case 40:41===e&&Me(e);break;case 92:ye()}return fe}function Te(e,t){for(;ye()&&e+me!==57&&(e+me!==84||47!==xe()););return"/*"+Oe(t,fe-1)+"*"+ee(47===e?e:ye())}function je(e){for(;!Ce(xe());)ye();return Oe(e,fe)}function Re(e){return Ie(Ve("",null,null,null,[""],e=Se(e),0,[0],e))}function Ve(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,m=0,h=1,v=1,g=1,b=0,y="",x=o,w=i,O=r,C=y;v;)switch(m=b,b=ye()){case 40:if(108!=m&&58==ie(C,d-1)){-1!=oe(C+=re(ke(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:C+=ke(b);break;case 9:case 10:case 13:case 32:C+=Ee(m);break;case 92:C+=Pe(we()-1,7);continue;case 47:switch(xe()){case 42:case 47:ue(Fe(Te(ye(),we()),t,n),l);break;default:C+="/"}break;case 123*h:s[u++]=se(C)*g;case 125*h:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+c:-1==g&&(C=re(C,/\f/g,"")),f>0&&se(C)-d&&ue(f>32?De(C+";",r,n,d-1):De(re(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(ue(O=Le(C,t,n,u,c,o,s,y,x=[],w=[],d),i),123===b)if(0===c)Ve(C,t,O,O,x,i,d,s,w);else switch(99===p&&110===ie(C,3)?100:p){case 100:case 108:case 109:case 115:Ve(e,O,O,r&&ue(Le(e,O,O,0,0,o,s,y,o,x=[],d),w),o,w,d,s,r?x:w);break;default:Ve(C,O,O,O,[""],w,0,s,w)}}u=c=f=0,h=g=1,y=C="",d=a;break;case 58:d=1+se(C),f=m;default:if(h<1)if(123==b)--h;else if(125==b&&0==h++&&125==be())continue;switch(C+=ee(b),b*h){case 38:g=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(se(C)-1)*g,g=1;break;case 64:45===xe()&&(C+=ke(ye())),p=xe(),c=d=se(y=C+=je(we())),b++;break;case 45:45===m&&2==se(C)&&(h=0)}}return i}function Le(e,t,n,r,o,i,a,s,l,u,c){for(var d=o-1,p=0===o?i:[""],f=le(p),m=0,h=0,v=0;m<r;++m)for(var g=0,b=ae(e,d+1,d=Q(h=a[m])),y=e;g<f;++g)(y=ne(h>0?p[g]+" "+b:re(b,/&\f/g,p[g])))&&(l[v++]=y);return ve(e,t,n,0===o?K:s,l,u,c)}function Fe(e,t,n){return ve(e,t,n,X,ee(me),ae(e,2,-2),0)}function De(e,t,n,r){return ve(e,t,n,J,ae(e,0,r),ae(e,r+1,-1),r)}function Ne(e,t){for(var n="",r=le(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Ae(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case J:return e.return=e.return||e.value;case X:return"";case Z:return e.return=e.value+"{"+Ne(e.children,r)+"}";case K:e.value=e.props.join(",")}return se(n=Ne(e.children,r))?e.return=e.value+"{"+n+"}":""}function $e(e){var t=le(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function _e(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var He="undefined"!=typeof document,Ue=function(e,t,n){for(var r=0,o=0;r=o,o=xe(),38===r&&12===o&&(t[n]=1),!Ce(o);)ye();return Oe(e,fe)},Be=function(e,t){return Ie(function(e,t){var n=-1,r=44;do{switch(Ce(r)){case 0:38===r&&12===xe()&&(t[n]=1),e[n]+=Ue(fe-1,t,n);break;case 2:e[n]+=ke(r);break;case 4:if(44===r){e[++n]=58===xe()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=ee(r)}}while(r=ye());return e}(Se(e),t))},ze=new WeakMap,We=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ze.get(n))&&!r){ze.set(e,!0);for(var o=[],i=Be(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[u]):a[u]+" "+i[s]}}},Ge=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Ye(e,t){switch(function(e,t){return 45^ie(e,0)?(((t<<2^ie(e,0))<<2^ie(e,1))<<2^ie(e,2))<<2^ie(e,3):0}(e,t)){case 5103:return q+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return q+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return q+e+Y+e+G+e+e;case 6828:case 4268:return q+e+G+e+e;case 6165:return q+e+G+"flex-"+e+e;case 5187:return q+e+re(e,/(\w+).+(:[^]+)/,q+"box-$1$2"+G+"flex-$1$2")+e;case 5443:return q+e+G+"flex-item-"+re(e,/flex-|-self/,"")+e;case 4675:return q+e+G+"flex-line-pack"+re(e,/align-content|flex-|-self/,"")+e;case 5548:return q+e+G+re(e,"shrink","negative")+e;case 5292:return q+e+G+re(e,"basis","preferred-size")+e;case 6060:return q+"box-"+re(e,"-grow","")+q+e+G+re(e,"grow","positive")+e;case 4554:return q+re(e,/([^-])(transform)/g,"$1"+q+"$2")+e;case 6187:return re(re(re(e,/(zoom-|grab)/,q+"$1"),/(image-set)/,q+"$1"),e,"")+e;case 5495:case 3959:return re(e,/(image-set\([^]*)/,q+"$1$`$1");case 4968:return re(re(e,/(.+:)(flex-)?(.*)/,q+"box-pack:$3"+G+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+q+e+e;case 4095:case 3583:case 4068:case 2532:return re(e,/(.+)-inline(.+)/,q+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(se(e)-1-t>6)switch(ie(e,t+1)){case 109:if(45!==ie(e,t+4))break;case 102:return re(e,/(.+:)(.+)-([^]+)/,"$1"+q+"$2-$3$1"+Y+(108==ie(e,t+3)?"$3":"$2-$3"))+e;case 115:return~oe(e,"stretch")?Ye(re(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==ie(e,t+1))break;case 6444:switch(ie(e,se(e)-3-(~oe(e,"!important")&&10))){case 107:return re(e,":",":"+q)+e;case 101:return re(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+q+(45===ie(e,14)?"inline-":"")+"box$3$1"+q+"$2$3$1"+G+"$2box$3")+e}break;case 5936:switch(ie(e,t+11)){case 114:return q+e+G+re(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return q+e+G+re(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return q+e+G+re(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return q+e+G+e+e}return e}var qe,Xe,Ke=He?void 0:(qe=function(){return _e(function(){return{}})},Xe=new WeakMap,function(e){if(Xe.has(e))return Xe.get(e);var t=qe(e);return Xe.set(e,t),t}),Je=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case J:e.return=Ye(e.value,e.length);break;case Z:return Ne([ge(e,{value:re(e.value,"@","@"+q)})],r);case K:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Ne([ge(e,{props:[re(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Ne([ge(e,{props:[re(t,/:(plac\w+)/,":"+q+"input-$1")]}),ge(e,{props:[re(t,/:(plac\w+)/,":-moz-$1")]}),ge(e,{props:[re(t,/:(plac\w+)/,G+"input-$1")]})],r)}return""})}}],Ze=function(e){var t=e.key;if(He&&"css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||Je,a={},s=[];He&&(r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,u=[We,Ge];if(Ke){var c=[Ae],d=$e(u.concat(i,c)),p=Ke(i)(t),f=function(e,t){var n=t.name;return void 0===p[n]&&(p[n]=Ne(Re(e?e+"{"+t.styles+"}":t.styles),d)),p[n]};o=function(e,t,n,r){var o=t.name,i=f(e,t);return void 0===g.compat?(r&&(g.inserted[o]=!0),i):r?void(g.inserted[o]=i):i}}else{var m,h=[Ae,(l=function(e){m.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],v=$e(u.concat(i,h));o=function(e,t,n,r){m=n,Ne(Re(e?e+"{"+t.styles+"}":t.styles),v),r&&(g.inserted[t.name]=!0)}}var g={key:t,sheet:new W({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return g.sheet.hydrate(s),g},Qe={exports:{}},et={},tt="function"==typeof Symbol&&Symbol.for,nt=tt?Symbol.for("react.element"):60103,rt=tt?Symbol.for("react.portal"):60106,ot=tt?Symbol.for("react.fragment"):60107,it=tt?Symbol.for("react.strict_mode"):60108,at=tt?Symbol.for("react.profiler"):60114,st=tt?Symbol.for("react.provider"):60109,lt=tt?Symbol.for("react.context"):60110,ut=tt?Symbol.for("react.async_mode"):60111,ct=tt?Symbol.for("react.concurrent_mode"):60111,dt=tt?Symbol.for("react.forward_ref"):60112,pt=tt?Symbol.for("react.suspense"):60113,ft=tt?Symbol.for("react.suspense_list"):60120,mt=tt?Symbol.for("react.memo"):60115,ht=tt?Symbol.for("react.lazy"):60116,vt=tt?Symbol.for("react.block"):60121,gt=tt?Symbol.for("react.fundamental"):60117,bt=tt?Symbol.for("react.responder"):60118,yt=tt?Symbol.for("react.scope"):60119;function xt(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case nt:switch(e=e.type){case ut:case ct:case ot:case at:case it:case pt:return e;default:switch(e=e&&e.$$typeof){case lt:case dt:case ht:case mt:case st:return e;default:return t}}case rt:return t}}}function wt(e){return xt(e)===ct}et.AsyncMode=ut,et.ConcurrentMode=ct,et.ContextConsumer=lt,et.ContextProvider=st,et.Element=nt,et.ForwardRef=dt,et.Fragment=ot,et.Lazy=ht,et.Memo=mt,et.Portal=rt,et.Profiler=at,et.StrictMode=it,et.Suspense=pt,et.isAsyncMode=function(e){return wt(e)||xt(e)===ut},et.isConcurrentMode=wt,et.isContextConsumer=function(e){return xt(e)===lt},et.isContextProvider=function(e){return xt(e)===st},et.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===nt},et.isForwardRef=function(e){return xt(e)===dt},et.isFragment=function(e){return xt(e)===ot},et.isLazy=function(e){return xt(e)===ht},et.isMemo=function(e){return xt(e)===mt},et.isPortal=function(e){return xt(e)===rt},et.isProfiler=function(e){return xt(e)===at},et.isStrictMode=function(e){return xt(e)===it},et.isSuspense=function(e){return xt(e)===pt},et.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===ot||e===ct||e===at||e===it||e===pt||e===ft||"object"==typeof e&&null!==e&&(e.$$typeof===ht||e.$$typeof===mt||e.$$typeof===st||e.$$typeof===lt||e.$$typeof===dt||e.$$typeof===gt||e.$$typeof===bt||e.$$typeof===yt||e.$$typeof===vt)},et.typeOf=xt,Qe.exports=et;var Ot=Qe.exports,Ct={};Ct[Ot.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ct[Ot.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var St="undefined"!=typeof document;var It=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===St&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)};var kt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Et=/[A-Z]|^ms/g,Pt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Mt=function(e){return 45===e.charCodeAt(1)},Tt=function(e){return null!=e&&"boolean"!=typeof e},jt=_e(function(e){return Mt(e)?e:e.replace(Et,"-$&").toLowerCase()}),Rt=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Pt,function(e,t,n){return Lt={name:t,styles:n,next:Lt},t})}return 1===kt[e]||Mt(e)||"number"!=typeof t||0===t?t:t+"px"};function Vt(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Lt={name:o.name,styles:o.styles,next:Lt},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)Lt={name:a.name,styles:a.styles,next:Lt},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Vt(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;Tt(s)&&(r+=jt(i)+":"+Rt(i,s)+";")}else if(Array.isArray(a)&&"string"==typeof a[0]&&null==t)for(var l=0;l<a.length;l++)Tt(a[l])&&(r+=jt(i)+":"+Rt(i,a[l])+";");else{var u=Vt(e,t,a);switch(i){case"animation":case"animationName":r+=jt(i)+":"+u+";";break;default:r+=i+"{"+u+"}"}}}return r}(e,t,n);case"function":if(void 0!==e){var s=Lt,l=n(e);return Lt=s,Vt(e,t,l)}}return n}var Lt,Ft=/label:\s*([^\s;{]+)\s*(;|$)/g;function Dt(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Lt=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Vt(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=Vt(n,t,e[a]),r)o+=i[a]}Ft.lastIndex=0;for(var s,l="";null!==(s=Ft.exec(o));)l+="-"+s[1];var u=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:u,styles:o,next:Lt}}var Nt="undefined"!=typeof document,At=function(e){return e()},$t=!!e.useInsertionEffect&&e.useInsertionEffect,_t=Nt&&$t||At,Ht="undefined"!=typeof document,Ut=e.createContext("undefined"!=typeof HTMLElement?Ze({key:"css"}):null);Ut.Provider;var Bt=function(e){return o(function(t,n){var r=i(Ut);return e(t,r,n)})};Ht||(Bt=function(t){return function(n){var r=i(Ut);return null===r?(r=Ze({key:"css"}),e.createElement(Ut.Provider,{value:r},t(n,r))):t(n,r)}});var zt,Wt,Gt=e.createContext({}),Yt={}.hasOwnProperty,qt="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Xt=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;It(n,r,o);var i=_t(function(){return function(e,t,n){It(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o="",i=t;do{var a=e.insert(t===i?"."+r:"",i,e.sheet,!0);St||void 0===a||(o+=a),i=i.next}while(void 0!==i);if(!St&&0!==o.length)return o}}(n,r,o)});if(!Ht&&void 0!==i){for(var a,s=r.name,l=r.next;void 0!==l;)s+=" "+l.name,l=l.next;return e.createElement("style",((a={})["data-emotion"]=n.key+" "+s,a.dangerouslySetInnerHTML={__html:i},a.nonce=n.sheet.nonce,a))}return null},Kt=Bt(function(t,n,r){var o=t.css;"string"==typeof o&&void 0!==n.registered[o]&&(o=n.registered[o]);var i=t[qt],a=[o],s="";"string"==typeof t.className?s=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(n.registered,a,t.className):null!=t.className&&(s=t.className+" ");var l=Dt(a,void 0,e.useContext(Gt));s+=n.key+"-"+l.name;var u={};for(var c in t)Yt.call(t,c)&&"css"!==c&&c!==qt&&(u[c]=t[c]);return u.className=s,r&&(u.ref=r),e.createElement(e.Fragment,null,e.createElement(Xt,{cache:n,serialized:l,isStringTag:"string"==typeof i}),e.createElement(i,u))}),Jt=Kt,Zt=function(t,n){var r=arguments;if(null==n||!Yt.call(n,"css"))return e.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=Jt,i[1]=function(e,t){var n={};for(var r in t)Yt.call(t,r)&&(n[r]=t[r]);return n[qt]=e,n}(t,n);for(var a=2;a<o;a++)i[a]=r[a];return e.createElement.apply(null,i)};function Qt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Dt(t)}zt=Zt||(Zt={}),Wt||(Wt=zt.JSX||(zt.JSX={}));const en=Math.min,tn=Math.max,nn=Math.round,rn=Math.floor,on=e=>({x:e,y:e});function an(){return"undefined"!=typeof window}function sn(e){return cn(e)?(e.nodeName||"").toLowerCase():"#document"}function ln(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function un(e){var t;return null==(t=(cn(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function cn(e){return!!an()&&(e instanceof Node||e instanceof ln(e).Node)}function dn(e){return!!an()&&(e instanceof HTMLElement||e instanceof ln(e).HTMLElement)}function pn(e){return!(!an()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof ln(e).ShadowRoot)}const fn=new Set(["inline","contents"]);function mn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=vn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!fn.has(o)}const hn=new Set(["html","body","#document"]);function vn(e){return ln(e).getComputedStyle(e)}function gn(e){const t=function(e){if("html"===sn(e))return e;const t=e.assignedSlot||e.parentNode||pn(e)&&e.host||un(e);return pn(t)?t.host:t}(e);return function(e){return hn.has(sn(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:dn(t)&&mn(t)?t:gn(t)}function bn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=gn(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=ln(o);if(i){const e=yn(a);return t.concat(a,a.visualViewport||[],mn(o)?o:[],e&&n?bn(e):[])}return t.concat(o,bn(o,[],n))}function yn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xn(e){return t=e,an()&&(t instanceof Element||t instanceof ln(t).Element)?e:e.contextElement;var t}function wn(e){const t=xn(e);if(!dn(t))return on(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=vn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=dn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=nn(n)!==i||nn(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}(t);let a=(i?nn(n.width):n.width)/r,s=(i?nn(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function On(e,t,n,r){void 0===t&&(t=!1);const o=e.getBoundingClientRect(),i=xn(e);let a=on(1);t&&(a=wn(e));const s=on(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const e=r;let t=ln(i),n=yn(t);for(;n&&r&&e!==t;){const e=wn(n),r=n.getBoundingClientRect(),o=vn(n),i=r.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,a=r.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=i,u+=a,t=ln(n),n=yn(t)}}return function(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}({width:c,height:d,x:l,y:u})}function Cn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Sn(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=xn(e),c=o||i?[...u?bn(u):[],...bn(t)]:[];c.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=u&&s?function(e,t){let n,r=null;const o=un(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:p,height:f}=u;if(s||t(),!p||!f)return;const m={rootMargin:-rn(d)+"px "+-rn(o.clientWidth-(c+p))+"px "+-rn(o.clientHeight-(d+f))+"px "+-rn(c)+"px",threshold:tn(0,en(1,l))||1};let h=!0;function v(t){const r=t[0].intersectionRatio;if(r!==l){if(!h)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||Cn(u,e.getBoundingClientRect())||a(),h=!1}try{r=new IntersectionObserver(v,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,m)}r.observe(e)}(!0),i}(u,n):null;let p,f=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let h=l?On(e):null;return l&&function t(){const r=On(e);h&&!Cn(h,r)&&n();h=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var In="undefined"!=typeof document?a:function(){},kn=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],En=function(){};function Pn(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function Mn(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(Pn(e,a)));return i.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var Tn=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===P(e)&&null!==e?[e]:[];var t},jn=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,R({},D(e,kn))},Rn=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function Vn(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Ln(e){return Vn(e)?window.pageYOffset:e.scrollTop}function Fn(e,t){Vn(e)?window.scrollTo(0,t):e.scrollTop=t}function Dn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:En,o=Ln(e),i=t-o,a=0;!function t(){var s=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(a+=10,o,i,n);Fn(e,s),a<n?window.requestAnimationFrame(t):r(e)}()}function Nn(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?Fn(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&Fn(e,Math.max(t.offsetTop-o,0))}function An(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var $n=!1,_n={get passive(){return $n=!0}},Hn="undefined"!=typeof window?window:{};Hn.addEventListener&&Hn.removeEventListener&&(Hn.addEventListener("p",En,_n),Hn.removeEventListener("p",En,!1));var Un=$n;function Bn(e){return null!=e}function zn(e,t,n){return e?t:n}var Wn=["children","innerProps"],Gn=["children","innerProps"];function Yn(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c,d=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,m=p.height,h=p.top,v=n.offsetParent.getBoundingClientRect().top,g=a?window.innerHeight:Vn(c=l)?window.innerHeight:c.clientHeight,b=Ln(l),y=parseInt(getComputedStyle(n).marginBottom,10),x=parseInt(getComputedStyle(n).marginTop,10),w=v-x,O=g-h,C=w+b,S=d-b-h,I=f-g+b+y,k=b+h-x,E=160;switch(o){case"auto":case"bottom":if(O>=m)return{placement:"bottom",maxHeight:t};if(S>=m&&!a)return i&&Dn(l,I,E),{placement:"bottom",maxHeight:t};if(!a&&S>=r||a&&O>=r)return i&&Dn(l,I,E),{placement:"bottom",maxHeight:a?O-y:S-y};if("auto"===o||a){var P=t,M=a?w:C;return M>=r&&(P=Math.min(M-y-s,t)),{placement:"top",maxHeight:P}}if("bottom"===o)return i&&Fn(l,I),{placement:"bottom",maxHeight:t};break;case"top":if(w>=m)return{placement:"top",maxHeight:t};if(C>=m&&!a)return i&&Dn(l,k,E),{placement:"top",maxHeight:t};if(!a&&C>=r||a&&w>=r){var T=t;return(!a&&C>=r||a&&w>=r)&&(T=a?w-x:C-x),i&&Dn(l,k,E),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}var qn,Xn=function(e){return"auto"===e?"bottom":e},Kn=u(null),Jn=function(e){var t=e.children,r=e.minMenuHeight,o=e.maxMenuHeight,a=e.menuPlacement,l=e.menuPosition,u=e.menuShouldScrollIntoView,c=e.theme,d=(i(Kn)||{}).setPortalPlacement,p=s(null),f=F(n(o),2),m=f[0],h=f[1],v=F(n(null),2),g=v[0],b=v[1],y=c.spacing.controlHeight;return In(function(){var e=p.current;if(e){var t="fixed"===l,n=Yn({maxHeight:o,menuEl:e,minHeight:r,placement:a,shouldScroll:u&&!t,isFixedPosition:t,controlHeight:y});h(n.maxHeight),b(n.placement),null==d||d(n.placement)}},[o,a,l,u,r,d,y]),t({ref:p,placerProps:R(R({},e),{},{placement:g||Xn(a),maxHeight:m})})},Zn=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Zt("div",A({},Rn(e,"menu",{menu:!0}),{ref:n},r),t)},Qn=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return R({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},er=Qn,tr=Qn,nr=["size"],rr=["innerProps","isRtl","size"],or={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},ir=function(e){var t=e.size,n=D(e,nr);return Zt("svg",A({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:or},n))},ar=function(e){return Zt(ir,A({size:20},e),Zt("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},sr=function(e){return Zt(ir,A({size:20},e),Zt("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},lr=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return R({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},ur=lr,cr=lr,dr=function(){var e=Qt.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(qn||(qn=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),pr=function(e){var t=e.delay,n=e.offset;return Zt("span",{css:Qt({animation:"".concat(dr," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},fr=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Zt("div",A({ref:o},Rn(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},mr=["data"],hr=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,u=e.theme,c=e.selectProps;return Zt("div",A({},Rn(e,"group",{group:!0}),s),Zt(i,A({},a,{selectProps:c,theme:u,getStyles:r,getClassNames:o,cx:n}),l),Zt("div",null,t))},vr=["innerRef","isDisabled","isHidden","inputClassName"],gr={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},br={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":R({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},gr)},yr=function(e){return R({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},gr)},xr=function(e){var t=e.children,n=e.innerProps;return Zt("div",n,t)};var wr=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,u=n.Label,c=n.Remove;return Zt(l,{data:r,innerProps:R(R({},Rn(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},Zt(u,{data:r,innerProps:R({},Rn(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),Zt(c,{data:r,innerProps:R(R({},Rn(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},Or={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Zt("div",A({},Rn(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Zt(ar,null))},Control:fr,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Zt("div",A({},Rn(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Zt(sr,null))},DownChevron:sr,CrossIcon:ar,Group:hr,GroupHeading:function(e){var t=jn(e);t.data;var n=D(t,mr);return Zt("div",A({},Rn(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Zt("div",A({},Rn(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Zt("span",A({},t,Rn(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=jn(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=D(r,vr);return Zt("div",A({},Rn(e,"input",{"input-container":!0}),{"data-value":n||""}),Zt("input",A({className:t({input:!0},s),ref:o,style:yr(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=D(e,rr);return Zt("div",A({},Rn(R(R({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Zt(pr,{delay:0,offset:n}),Zt(pr,{delay:160,offset:!0}),Zt(pr,{delay:320,offset:!n}))},Menu:Zn,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Zt("div",A({},Rn(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,o=e.children,i=e.controlElement,a=e.innerProps,u=e.menuPlacement,c=e.menuPosition,d=s(null),p=s(null),m=F(n(Xn(u)),2),h=m[0],v=m[1],g=l(function(){return{setPortalPlacement:v}},[]),b=F(n(null),2),y=b[0],x=b[1],w=r(function(){if(i){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),t="fixed"===c?0:window.pageYOffset,n=e[h]+t;n===(null==y?void 0:y.offset)&&e.left===(null==y?void 0:y.rect.left)&&e.width===(null==y?void 0:y.rect.width)||x({offset:n,rect:e})}},[i,c,h,null==y?void 0:y.offset,null==y?void 0:y.rect.left,null==y?void 0:y.rect.width]);In(function(){w()},[w]);var O=r(function(){"function"==typeof p.current&&(p.current(),p.current=null),i&&d.current&&(p.current=Sn(i,d.current,w,{elementResize:"ResizeObserver"in window}))},[i,w]);In(function(){O()},[O]);var C=r(function(e){d.current=e,O()},[O]);if(!t&&"fixed"!==c||!y)return null;var S=Zt("div",A({ref:C},Rn(R(R({},e),{},{offset:y.offset,position:c,rect:y.rect}),"menuPortal",{"menu-portal":!0}),a),o);return Zt(Kn.Provider,{value:g},t?f(S,t):S)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=D(e,Gn);return Zt("div",A({},Rn(R(R({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=D(e,Wn);return Zt("div",A({},Rn(R(R({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:wr,MultiValueContainer:xr,MultiValueLabel:xr,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Zt("div",A({role:"button"},n),t||Zt(ar,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Zt("div",A({},Rn(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Zt("div",A({},Rn(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Zt("div",A({},Rn(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Zt("div",A({},Rn(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Zt("div",A({},Rn(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},Cr=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function Sr(e,t){return e===t||!(!Cr(e)||!Cr(t))}function Ir(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!Sr(e[n],t[n]))return!1;return!0}for(var kr={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Er=function(e){return Zt("span",A({css:kr},e))},Pr={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,u=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(c(a,n),".");if("menu"===t&&u){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Mr=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,u=e.id,c=e.isAppleDevice,p=s.ariaLiveMessages,f=s.getOptionLabel,m=s.inputValue,h=s.isMulti,v=s.isOptionDisabled,g=s.isSearchable,b=s.menuIsOpen,y=s.options,x=s.screenReaderStatus,w=s.tabSelectsValue,O=s.isLoading,C=s["aria-label"],S=s["aria-live"],I=l(function(){return R(R({},Pr),p||{})},[p]),k=l(function(){var e,n="";if(t&&I.onChange){var r=t.option,o=t.options,i=t.removedValue,s=t.removedValues,l=t.value,u=i||r||(e=l,Array.isArray(e)?null:e),c=u?f(u):"",d=o||s||void 0,p=d?d.map(f):[],m=R({isDisabled:u&&v(u,a),label:c,labels:p},t);n=I.onChange(m)}return n},[t,I,v,a,f]),E=l(function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&I.onFocus){var s={focused:t,label:f(t),isDisabled:v(t,a),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:a,isAppleDevice:c};e=I.onFocus(s)}return e},[n,r,f,v,I,o,a,c]),P=l(function(){var e="";if(b&&y.length&&!O&&I.onFilter){var t=x({count:o.length});e=I.onFilter({inputValue:m,resultsMessage:t})}return e},[o,m,b,I,y,x,O]),M="initial-input-focus"===(null==t?void 0:t.action),T=l(function(){var e="";if(I.guidance){var t=r?"value":b?"menu":"input";e=I.guidance({"aria-label":C,context:t,isDisabled:n&&v(n,a),isMulti:h,isSearchable:g,tabSelectsValue:w,isInitialFocus:M})}return e},[C,n,r,h,v,g,b,I,a,w,M]),j=Zt(d,null,Zt("span",{id:"aria-selection"},k),Zt("span",{id:"aria-focused"},E),Zt("span",{id:"aria-results"},P),Zt("span",{id:"aria-guidance"},T));return Zt(d,null,Zt(Er,{id:u},M&&j),Zt(Er,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!M&&j))},Tr=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],jr=new RegExp("["+Tr.map(function(e){return e.letters}).join("")+"]","g"),Rr={},Vr=0;Vr<Tr.length;Vr++)for(var Lr=Tr[Vr],Fr=0;Fr<Lr.letters.length;Fr++)Rr[Lr.letters[Fr]]=Lr.base;var Dr=function(e){return e.replace(jr,function(e){return Rr[e]})},Nr=function(e,t){void 0===t&&(t=Ir);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(Dr),Ar=function(e){return e.replace(/^\s+|\s+$/g,"")},$r=function(e){return"".concat(e.label," ").concat(e.value)},_r=["innerRef"];function Hr(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter(function(e){var t=F(e,1)[0];return!n.includes(t)});return o.reduce(function(e,t){var n=F(t,2),r=n[0],o=n[1];return e[r]=o,e},{})}(D(e,_r),"onExited","in","enter","exit","appear");return Zt("input",A({ref:t},n,{css:Qt({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Ur=["boxSizing","height","overflow","paddingRight","position"],Br={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function zr(e){e.cancelable&&e.preventDefault()}function Wr(e){e.stopPropagation()}function Gr(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Yr(){return"ontouchstart"in window||navigator.maxTouchPoints}var qr=!("undefined"==typeof window||!window.document||!window.document.createElement),Xr=0,Kr={capture:!1,passive:!1};var Jr=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},Zr={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Qr(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,i=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,l=s(!1),u=s(!1),c=s(0),d=s(null),f=r(function(e,t){if(null!==d.current){var r=d.current,s=r.scrollTop,c=r.scrollHeight,p=r.clientHeight,f=d.current,m=t>0,h=c-p-s,v=!1;h>t&&l.current&&(o&&o(e),l.current=!1),m&&u.current&&(a&&a(e),u.current=!1),m&&t>h?(n&&!l.current&&n(e),f.scrollTop=c,v=!0,l.current=!0):!m&&-t>s&&(i&&!u.current&&i(e),f.scrollTop=0,v=!0,u.current=!0),v&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[n,o,i,a]),m=r(function(e){f(e,e.deltaY)},[f]),h=r(function(e){c.current=e.changedTouches[0].clientY},[]),v=r(function(e){var t=c.current-e.changedTouches[0].clientY;f(e,t)},[f]),g=r(function(e){if(e){var t=!!Un&&{passive:!1};e.addEventListener("wheel",m,t),e.addEventListener("touchstart",h,t),e.addEventListener("touchmove",v,t)}},[v,h,m]),b=r(function(e){e&&(e.removeEventListener("wheel",m,!1),e.removeEventListener("touchstart",h,!1),e.removeEventListener("touchmove",v,!1))},[v,h,m]);return p(function(){if(t){var e=d.current;return g(e),function(){b(e)}}},[t,g,b]),function(e){d.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,i=s({}),a=s(null),l=r(function(e){if(qr){var t=document.body,n=t&&t.style;if(o&&Ur.forEach(function(e){var t=n&&n[e];i.current[e]=t}),o&&Xr<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+r||0;Object.keys(Br).forEach(function(e){var t=Br[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(s,"px"))}t&&Yr()&&(t.addEventListener("touchmove",zr,Kr),e&&(e.addEventListener("touchstart",Gr,Kr),e.addEventListener("touchmove",Wr,Kr))),Xr+=1}},[o]),u=r(function(e){if(qr){var t=document.body,n=t&&t.style;Xr=Math.max(Xr-1,0),o&&Xr<1&&Ur.forEach(function(e){var t=i.current[e];n&&(n[e]=t)}),t&&Yr()&&(t.removeEventListener("touchmove",zr,Kr),e&&(e.removeEventListener("touchstart",Gr,Kr),e.removeEventListener("touchmove",Wr,Kr)))}},[o]);return p(function(){if(t){var e=a.current;return l(e),function(){u(e)}}},[t,l,u]),function(e){a.current=e}}({isEnabled:n});return Zt(d,null,n&&Zt("div",{onClick:Jr,css:Zr}),t(function(e){i(e),a(e)}))}var eo={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},to=function(e){var t=e.name,n=e.onFocus;return Zt("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:eo,value:"",onChange:function(){}})};function no(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function ro(){return no(/^Mac/i)}function oo(){return no(/^iPhone/i)||no(/^iPad/i)||ro()&&navigator.maxTouchPoints>1}var io,ao={clearIndicator:cr,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return R({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:ur,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return R({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return R({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return R(R({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},br),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return R({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:tr,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return R((T(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),T(n,"position","absolute"),T(n,"width","100%"),T(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return R({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return R({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return R({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return R({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:er,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return R({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return R({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return R({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return R({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},so={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},lo={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:An(),captureMenuScroll:!An(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=R({ignoreCase:!0,ignoreAccents:!0,stringify:$r,trim:!0,matchFrom:"any"},io),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?Ar(t):t,u=a?Ar(i(e)):i(e);return r&&(l=l.toLowerCase(),u=u.toLowerCase()),o&&(l=Nr(l),u=Dr(u)),"start"===s?u.substr(0,l.length)===l:u.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function uo(e,t,n,r){return{type:"option",data:t,isDisabled:bo(e,t,n),isSelected:yo(e,t,n),label:vo(e,t),value:go(e,t),index:r}}function co(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(n,r){return uo(e,n,t,r)}).filter(function(t){return mo(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=uo(e,n,t,r);return mo(e,i)?i:void 0}).filter(Bn)}function po(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,z(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function fo(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,z(n.options.map(function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function mo(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!wo(e)||!i)&&xo(e,{label:a,value:s,data:o},r)}var ho=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},vo=function(e,t){return e.getOptionLabel(t)},go=function(e,t){return e.getOptionValue(t)};function bo(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function yo(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=go(e,t);return n.some(function(t){return go(e,t)===r})}function xo(e,t,n){return!e.filterOption||e.filterOption(t,n)}var wo=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},Oo=1,Co=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_(e,t)}(n,c);var t=function(e){var t=U();return function(){var n,r=H(e);if(t){var o=H(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return B(this,n)}}(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var u=r.getOptionValue(e);r.setValue(a.filter(function(e){return r.getOptionValue(e)!==u}),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(z(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter(function(e){return r.getOptionValue(e)!==o}),a=zn(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(zn(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=zn(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return ho(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return fo(co(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Mn.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return vo(r.props,e)},r.getOptionValue=function(e){return go(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=ao[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,R(R({},Or),e.components);var e},r.buildCategorizedOptions=function(){return co(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return po(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:R({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Vn(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return wo(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,m=f.focusedOption,h=f.focusedValue,v=f.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(h)r.removeValue(h);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!u||!d||!m||p&&r.isOptionSelected(m,v))return;r.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(u){if(!m)return;if(r.isComposing)return;r.selectOption(m);break}return;case"Escape":u?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!u){r.openMenu("first");break}if(!m)return;r.selectOption(m);break;case"ArrowUp":u?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":u?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!u)return;r.focusOption("pageup");break;case"PageDown":if(!u)return;r.focusOption("pagedown");break;case"Home":if(!u)return;r.focusOption("first");break;case"End":if(!u)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++Oo),r.state.selectValue=Tn(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=ho(o,i[a])}return r}return function(e,t,n){t&&$(e.prototype,t),n&&$(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Nn(this.menuListRef,this.focusedOptionRef),(ro()||oo())&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Nn(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(so):R(R({},so),this.props.theme):so}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,u=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:c,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return bo(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return yo(this.props,e,t)}},{key:"filterOption",value:function(e,t){return xo(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var t=this.props,n=t.isDisabled,r=t.isSearchable,o=t.inputId,i=t.inputValue,a=t.tabIndex,s=t.form,l=t.menuIsOpen,u=t.required,c=this.getComponents().Input,d=this.state,p=d.inputIsHidden,f=d.ariaSelection,m=this.commonProps,h=o||this.getElementId("input"),v=R(R(R({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":u,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!r&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return r?e.createElement(c,A({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:n,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},v)):e.createElement(Hr,A({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:En,onFocus:this.onInputFocus,disabled:n,tabIndex:a,inputMode:"none",form:s,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,n=this.getComponents(),r=n.MultiValue,o=n.MultiValueContainer,i=n.MultiValueLabel,a=n.MultiValueRemove,s=n.SingleValue,l=n.Placeholder,u=this.commonProps,c=this.props,d=c.controlShouldRenderValue,p=c.isDisabled,f=c.isMulti,m=c.inputValue,h=c.placeholder,v=this.state,g=v.selectValue,b=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!d)return m?null:e.createElement(l,A({},u,{key:"placeholder",isDisabled:p,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),h);if(f)return g.map(function(n,s){var l=n===b,c="".concat(t.getOptionLabel(n),"-").concat(t.getOptionValue(n));return e.createElement(r,A({},u,{components:{Container:o,Label:i,Remove:a},isFocused:l,isDisabled:p,key:c,index:s,removeProps:{onClick:function(){return t.removeValue(n)},onTouchEnd:function(){return t.removeValue(n)},onMouseDown:function(e){e.preventDefault()}},data:n}),t.formatOptionLabel(n,"value"))});if(m)return null;var x=g[0];return e.createElement(s,A({},u,{data:x,isDisabled:p}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!this.isClearable()||!t||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,A({},n,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!t||!i)return null;return e.createElement(t,A({},n,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),n=t.DropdownIndicator,r=t.IndicatorSeparator;if(!n||!r)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return e.createElement(r,A({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var n=this.commonProps,r=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,A({},n,{innerProps:i,isDisabled:r,isFocused:o}))}},{key:"renderMenu",value:function(){var t=this,n=this.getComponents(),r=n.Group,o=n.GroupHeading,i=n.Menu,a=n.MenuList,s=n.MenuPortal,l=n.LoadingMessage,u=n.NoOptionsMessage,c=n.Option,d=this.commonProps,p=this.state.focusedOption,f=this.props,m=f.captureMenuScroll,h=f.inputValue,v=f.isLoading,g=f.loadingMessage,b=f.minMenuHeight,y=f.maxMenuHeight,x=f.menuIsOpen,w=f.menuPlacement,O=f.menuPosition,C=f.menuPortalTarget,S=f.menuShouldBlockScroll,I=f.menuShouldScrollIntoView,k=f.noOptionsMessage,E=f.onMenuScrollToTop,P=f.onMenuScrollToBottom;if(!x)return null;var M,T=function(n,r){var o=n.type,i=n.data,a=n.isDisabled,s=n.isSelected,l=n.label,u=n.value,f=p===i,m=a?void 0:function(){return t.onOptionHover(i)},h=a?void 0:function(){return t.selectOption(i)},v="".concat(t.getElementId("option"),"-").concat(r),g={id:v,onClick:h,onMouseMove:m,onMouseOver:m,tabIndex:-1,role:"option","aria-selected":t.state.isAppleDevice?void 0:s};return e.createElement(c,A({},d,{innerProps:g,data:i,isDisabled:a,isSelected:s,key:v,label:l,type:o,value:u,isFocused:f,innerRef:f?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())M=this.getCategorizedOptions().map(function(n){if("group"===n.type){var i=n.data,a=n.options,s=n.index,l="".concat(t.getElementId("group"),"-").concat(s),u="".concat(l,"-heading");return e.createElement(r,A({},d,{key:l,data:i,options:a,Heading:o,headingProps:{id:u,data:n.data},label:t.formatGroupLabel(n.data)}),n.options.map(function(e){return T(e,"".concat(s,"-").concat(e.index))}))}if("option"===n.type)return T(n,"".concat(n.index))});else if(v){var j=g({inputValue:h});if(null===j)return null;M=e.createElement(l,d,j)}else{var R=k({inputValue:h});if(null===R)return null;M=e.createElement(u,d,R)}var V={minMenuHeight:b,maxMenuHeight:y,menuPlacement:w,menuPosition:O,menuShouldScrollIntoView:I},L=e.createElement(Jn,A({},d,V),function(n){var r=n.ref,o=n.placerProps,s=o.placement,l=o.maxHeight;return e.createElement(i,A({},d,V,{innerRef:r,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:v,placement:s}),e.createElement(Qr,{captureEnabled:m,onTopArrive:E,onBottomArrive:P,lockEnabled:S},function(n){return e.createElement(a,A({},d,{innerRef:function(e){t.getMenuListRef(e),n(e)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:t.getElementId("listbox")},isLoading:v,maxHeight:l,focusedOption:p}),M)}))});return C||"fixed"===O?e.createElement(s,A({},d,{appendTo:C,controlElement:this.controlRef,menuPlacement:w,menuPosition:O}),L):L}},{key:"renderFormField",value:function(){var t=this,n=this.props,r=n.delimiter,o=n.isDisabled,i=n.isMulti,a=n.name,s=n.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!o)return e.createElement(to,{name:a,onFocus:this.onValueInputFocus});if(a&&!o){if(i){if(r){var u=l.map(function(e){return t.getOptionValue(e)}).join(r);return e.createElement("input",{name:a,type:"hidden",value:u})}var c=l.length>0?l.map(function(n,r){return e.createElement("input",{key:"i-".concat(r),name:a,type:"hidden",value:t.getOptionValue(n)})}):e.createElement("input",{name:a,type:"hidden",value:""});return e.createElement("div",null,c)}var d=l[0]?this.getOptionValue(l[0]):"";return e.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,n=this.state,r=n.ariaSelection,o=n.focusedOption,i=n.focusedValue,a=n.isFocused,s=n.selectValue,l=this.getFocusableOptions();return e.createElement(Mr,A({},t,{id:this.getElementId("live-region"),ariaSelection:r,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var t=this.getComponents(),n=t.Control,r=t.IndicatorsContainer,o=t.SelectContainer,i=t.ValueContainer,a=this.props,s=a.className,l=a.id,u=a.isDisabled,c=a.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return e.createElement(o,A({},p,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:d}),this.renderLiveRegion(),e.createElement(n,A({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:d,menuIsOpen:c}),e.createElement(i,A({},p,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),e.createElement(r,A({},p,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,u=e.options,c=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,m=Tn(c),h={};if(n&&(c!==n.value||u!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var v=d?function(e,t){return po(co(e,t))}(e,m):[],g=d?fo(co(e,m),"".concat(l,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,m):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,v);h={selectValue:m,focusedOption:y,focusedOptionId:ho(g,y),focusableOptionsWithIds:g,focusedValue:b,clearFocusValueOnUpdate:!1}}var x=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,O=a&&s;return a&&!O&&(w={value:zn(f,m,m[0]||null),options:m,action:"initial-input-focus"},O=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(w=null),R(R(R({},h),x),{},{prevProps:e,ariaSelection:w,prevWasFocused:O})}}]),n}();Co.defaultProps=lo;var So=o(function(t,o){var i=function(e){var t=e.defaultInputValue,o=void 0===t?"":t,i=e.defaultMenuIsOpen,a=void 0!==i&&i,s=e.defaultValue,l=void 0===s?null:s,u=e.inputValue,c=e.menuIsOpen,d=e.onChange,p=e.onInputChange,f=e.onMenuClose,m=e.onMenuOpen,h=e.value,v=D(e,N),g=F(n(void 0!==u?u:o),2),b=g[0],y=g[1],x=F(n(void 0!==c?c:a),2),w=x[0],O=x[1],C=F(n(void 0!==h?h:l),2),S=C[0],I=C[1],k=r(function(e,t){"function"==typeof d&&d(e,t),I(e)},[d]),E=r(function(e,t){var n;"function"==typeof p&&(n=p(e,t)),y(void 0!==n?n:e)},[p]),P=r(function(){"function"==typeof m&&m(),O(!0)},[m]),M=r(function(){"function"==typeof f&&f(),O(!1)},[f]),T=void 0!==u?u:b,j=void 0!==c?c:w,V=void 0!==h?h:S;return R(R({},v),{},{inputValue:T,menuIsOpen:j,onChange:k,onInputChange:E,onMenuClose:M,onMenuOpen:P,value:V})}(t);return e.createElement(Co,A({ref:o},i))}),Io=So;const ko=({logoUrl:e,alt:t})=>C.jsx("img",{src:e,alt:t,className:"w-8 h-8 flex-shrink-0 object-contain",onError:e=>{const n=e.target;n.style.display="none";const r=document.createElement("div");r.className="w-8 h-8 rounded-full flex items-center justify-center font-bold text-xs flex-shrink-0 bg-gray-200",r.textContent=t.substring(0,2).toUpperCase(),n.parentNode?.appendChild(r)}}),Eo=[{value:"mtn",label:"MTN",logoUrl:"https://payments-web.anmgw.com/assets/images/mtn.svg"},{value:"vodafone",label:"Telecel",logoUrl:"https://payments-web.anmgw.com/assets/images/telecel.svg"},{value:"airteltigo",label:"AirtelTigo",logoUrl:"https://payments-web.anmgw.com/assets/images/at.svg"}],Po=e=>C.jsx(Or.Option,{...e,children:C.jsxs("div",{className:"flex items-center gap-3",children:[C.jsx(ko,{logoUrl:e.data.logoUrl,alt:e.data.label}),C.jsx("span",{className:"font-medium",children:e.data.label})]})}),Mo=e=>C.jsx(Or.SingleValue,{...e,children:C.jsxs("div",{className:"flex items-center gap-3",children:[C.jsx(ko,{logoUrl:e.data.logoUrl,alt:e.data.label}),C.jsx("span",{className:"font-medium",children:e.data.label})]})}),To=({selectedNetwork:e,onSelect:n,disabled:r=!1,primaryColor:o})=>{const i=o||"#3B82F6",a=Eo.find(t=>t.value===e),s={control:(t,n)=>({...t,minHeight:"48px",borderWidth:"2px",borderColor:n.isFocused||e?i:"#D1D5DB",boxShadow:n.isFocused?`0 0 0 3px ${i}33`:"none",outline:"none","&:hover":{borderColor:n.isFocused||e?i:"#9CA3AF"},opacity:r?.5:1,cursor:r?"not-allowed":"pointer",backgroundColor:r?"#F9FAFB":"white"}),menu:e=>({...e,borderRadius:"8px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",border:`1px solid ${i}33`,zIndex:9999,position:"absolute"}),menuList:e=>({...e,padding:"4px",maxHeight:"200px",overflowY:"auto",overflowX:"hidden"}),menuPortal:e=>({...e,zIndex:9999}),option:(e,t)=>({...e,backgroundColor:t.isSelected?i:t.isFocused?`${i}20`:"white",color:t.isSelected?"white":"#111827",cursor:"pointer","&:active":{backgroundColor:t.isSelected?i:`${i}40`}}),placeholder:e=>({...e,color:"#9CA3AF"}),singleValue:e=>({...e,color:"#111827"}),indicatorSeparator:()=>({display:"none"}),dropdownIndicator:e=>({...e,color:"#6B7280","&:hover":{color:"#111827"}})},l=t.useMemo(()=>`network-selector-${Math.random().toString(36).substr(2,9)}`,[]);return C.jsxs(C.Fragment,{children:[C.jsx("style",{children:`\n #${l} .react-select__control--is-focused {\n border-color: ${i} !important;\n box-shadow: 0 0 0 3px ${i}33 !important;\n }\n #${l} .react-select__control:hover:not(.react-select__control--is-disabled) {\n border-color: ${e?i:"#9CA3AF"} !important;\n }\n `}),C.jsxs("div",{id:l,className:"w-full",children:[C.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Select Network"}),C.jsx(Io,{value:a||null,onChange:e=>{e&&n(e.value)},options:Eo,isDisabled:r,placeholder:"-- Select Network --",components:{Option:Po,SingleValue:Mo},styles:s,isSearchable:!1,menuPortalTarget:"undefined"!=typeof document?document.body:void 0,menuPosition:"fixed",className:"react-select-container",classNamePrefix:"react-select"})]})]})},jo=({length:e=4,onComplete:t,onResend:r,disabled:o=!1,loading:i=!1,error:a,primaryColor:s="#3B82F6"})=>{const[l,u]=n(new Array(e).fill("")),[c,d]=n(0);p(()=>{let e;return c>0&&(e=setTimeout(()=>d(c-1),1e3)),()=>clearTimeout(e)},[c]);const f=n=>{if(o||i)return;n.preventDefault();const r=n.clipboardData.getData("text/plain").replace(/\D/g,"");if(r.length===e){const n=r.split("");u(n),t(r);const o=document.getElementById("otp-input-"+(e-1));o?.focus()}};return C.jsxs("div",{className:"w-full",children:[C.jsx("div",{className:"flex justify-center gap-2 mb-4",children:l.map((n,r)=>C.jsx("input",{id:`otp-input-${r}`,type:"text",inputMode:"numeric",maxLength:1,value:n,onChange:n=>((n,r)=>{if(o||i)return;if(!/^\d*$/.test(r))return;const a=[...l];if(a[n]=r,u(a),r&&n<e-1){const e=document.getElementById(`otp-input-${n+1}`);e?.focus()}const s=a.join("");s.length===e&&t(s)})(r,n.target.value),onKeyDown:t=>((t,n)=>{if(!o&&!i){if("Backspace"===n.key)if(l[t]){const e=[...l];e[t]="",u(e)}else if(t>0){const e=document.getElementById("otp-input-"+(t-1));e?.focus()}if("ArrowLeft"===n.key&&t>0){const e=document.getElementById("otp-input-"+(t-1));e?.focus()}if("ArrowRight"===n.key&&t<e-1){const e=document.getElementById(`otp-input-${t+1}`);e?.focus()}}})(r,t),onPaste:f,disabled:o||i,className:`w-12 h-12 md:w-14 md:h-14 text-center text-lg md:text-xl font-semibold border-2 rounded-lg focus:outline-none focus:ring-2 transition-all ${a?"border-red-500 bg-red-50":"border-gray-300 bg-white"} ${o||i?"opacity-50 cursor-not-allowed":""}`,style:{...a?{}:{"--focus-ring-color":s,"--focus-border-color":s}},onFocus:e=>{a||o||i||(e.target.style.borderColor=s,e.target.style.boxShadow=`0 0 0 3px ${s}33`)},onBlur:e=>{a||(e.target.style.borderColor="#D1D5DB",e.target.style.boxShadow="")}},r))}),a&&C.jsx("p",{className:"text-red-500 text-sm text-center mb-4",children:a}),C.jsx("div",{className:"text-center",children:C.jsx("button",{type:"button",onClick:()=>{c>0||o||i||(r(),d(60))},disabled:c>0||o||i,className:"text-sm "+(c>0||o||i?"opacity-50 cursor-not-allowed":""),style:{color:s},onMouseEnter:e=>{e.currentTarget.disabled||(e.currentTarget.style.opacity="0.8")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:c>0?`Resend OTP in ${c}s`:"Resend OTP"})})]})},Ro=({paymentId:e,showTimeoutWarning:t=!1,primaryColor:n="#3B82F6"})=>C.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[C.jsx("div",{className:"relative w-16 h-16 mb-4",children:C.jsx("div",{className:"absolute inset-0 border-4 rounded-full animate-spin",style:{borderColor:`${n}33`,borderTopColor:n}})}),C.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Processing Payment"}),C.jsx("div",{className:"rounded-lg p-3 mb-4 max-w-sm border",style:{backgroundColor:`${n}15`,borderColor:`${n}40`},children:C.jsxs("p",{className:"text-sm text-center font-medium",style:{color:n},children:["Please wait for a prompt or go to ",C.jsx("strong",{children:"my approvals"})," to complete the transaction"]})}),t&&C.jsx("p",{className:"text-xs text-amber-600 text-center mt-2",children:"This is taking longer than usual. You'll be notified when it completes."}),C.jsxs("p",{className:"text-xs text-gray-400 mt-2",children:["Payment ID: ",e]})]}),Vo=({success:e,payment:t,redirectUrl:r,onRedirect:o,primaryColor:i="#3B82F6"})=>{const[a,s]=n(r?5:0);return p(()=>{if(r&&a>0){const e=setTimeout(()=>{s(a-1)},1e3);return()=>clearTimeout(e)}if(r&&0===a){const e=setTimeout(()=>{o()},100);return()=>clearTimeout(e)}},[a,r,o]),C.jsx("div",{className:"flex flex-col items-center justify-center py-8",children:e?C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:C.jsx("svg",{className:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),C.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Payment Successful!"}),t&&C.jsxs("p",{className:"text-gray-600 text-sm mb-2",children:["Amount: ",t.currency," ","number"==typeof t.amount?t.amount.toFixed(2):"string"==typeof t.amount?Number.parseFloat(t.amount).toFixed(2):t.amount]}),r?C.jsx("p",{className:"text-gray-500 text-xs mb-4",children:a>0?`Redirecting in ${a} seconds...`:"Redirecting..."}):C.jsx("button",{onClick:o,className:"mt-4 px-6 py-2 text-white rounded-lg transition-all",style:{backgroundColor:i},onMouseEnter:e=>{e.currentTarget.style.opacity="0.9"},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:"Close"})]}):C.jsxs(C.Fragment,{children:[C.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mb-4",children:C.jsx("svg",{className:"w-8 h-8 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),C.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Payment Failed"}),C.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Your payment could not be processed. Please try again."}),r?C.jsx("p",{className:"text-gray-500 text-xs mb-4",children:a>0?`Redirecting in ${a} seconds...`:"Redirecting..."}):C.jsx("button",{onClick:o,className:"mt-4 px-6 py-2 text-white rounded-lg transition-all",style:{backgroundColor:i},onMouseEnter:e=>{e.currentTarget.style.opacity="0.9"},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:"Close"})]})})},Lo=({paymentId:e,redirectUrl:t,onRedirect:r,onContinueWaiting:o,primaryColor:i="#3B82F6"})=>{const[a,s]=n(5);return p(()=>{if(!t)return;const e=setInterval(()=>{s(t=>t<=1?(clearInterval(e),r(),0):t-1)},1e3);return()=>clearInterval(e)},[t,r]),C.jsxs("div",{className:"mt-6 p-4 rounded-lg border",style:{backgroundColor:`${i}08`,borderColor:`${i}30`},children:[C.jsx("h4",{className:"text-sm font-semibold mb-2",style:{color:i},children:"Payment Still Processing"}),C.jsx("p",{className:"text-sm mb-4",style:{color:`${i}DD`},children:"Your payment is still being processed. You'll be notified via webhook when it completes."}),C.jsx("div",{className:"flex gap-3",children:t?C.jsxs(C.Fragment,{children:[C.jsxs("button",{onClick:r,className:"flex-1 py-2 px-4 text-white rounded-lg text-sm font-medium transition-colors",style:{backgroundColor:i},onMouseEnter:e=>{e.currentTarget.style.opacity="0.9"},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:["Return Now ",a>0&&`(${a}s)`]}),C.jsx("button",{onClick:o,className:"flex-1 py-2 px-4 bg-white border rounded-lg text-sm font-medium transition-colors",style:{borderColor:`${i}40`,color:i},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`${i}10`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="white"},children:"Continue Waiting"})]}):C.jsx("button",{onClick:o,className:"w-full py-2 px-4 text-white rounded-lg text-sm font-medium transition-colors",style:{backgroundColor:i},onMouseEnter:e=>{e.currentTarget.style.opacity="0.9"},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:"Continue Waiting"})}),C.jsxs("p",{className:"text-xs mt-3 text-gray-500 text-center",children:["Payment ID: ",e]})]})},Fo=({config:e,isOpen:t,onClose:r})=>{const[o,i]=n("phone-input"),[a,s]=n(""),[l,u]=n(""),[c,d]=n(),[f,m]=n(""),[h,v]=n(null),[g,b]=n(null),[y,x]=n(!1),[w,O]=n(null),[P,M]=n(!1),[T,j]=n(!1),[R,V]=n(!1),[L,F]=n(0),D=new k({apiKey:e.apiKey,platformId:e.platformId,baseUrl:e.apiUrl});p(()=>{t&&e.platformId&&D.getPlatformInfo().then(e=>{if(e.logo_url){const t=new Image;t.onload=()=>{O(e.logo_url),M(!0)},t.onerror=()=>{M(!1)},t.src=e.logo_url}}).catch(e=>{console.debug("Failed to fetch platform logo:",e)})},[t,e.platformId,D]),p(()=>{const n=e.displayMode||"modal";if(t&&"modal"===n){const e=globalThis.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[t,e.displayMode]),p(()=>{t||(i("phone-input"),s(""),u(""),d(void 0),m(""),v(null),b(null),x(!1),O(null),M(!1),j(!1),V(!1),F(0))},[t]),p(()=>{if("verifying"===o&&f&&!T){let t=0;const n=15,r=7;j(!1),V(!1);const o=setInterval(async()=>{t++,t===r&&V(!0);try{const t=await D.getPaymentStatus(f);if(t.data){const n=t.data.status;"completed"===n?(v(t.data),clearInterval(o),V(!1),j(!1),e.onSuccess?.(t.data),i("success")):"failed"!==n&&"cancelled"!==n&&"expired"!==n||(clearInterval(o),V(!1),j(!1),e.onError?.({message:`Payment ${n}`}),i("failed"))}}catch(e){console.error("Error polling payment status:",e)}t>=n&&(clearInterval(o),j(!0),V(!1))},2e3);return()=>{clearInterval(o),V(!1)}}},[o,f,e,L,T]);const N=async()=>{if(l&&c){if(e.redirect_url&&!S(e.redirect_url))return b("Redirect URL must be a valid HTTPS URL"),void e.onError?.({message:"Redirect URL must be a valid HTTPS URL",code:"INVALID_REDIRECT_URL"});x(!0),b(null);try{const t=await D.createPayment({amount:e.amount,currency:e.currency||"GHS",payment_method:"mobile_money",phone_number:l,network:c,redirect_url:e.redirect_url,webhook_url:e.webhookUrl,order_id:e.orderId,metadata:e.metadata});if(!t.data?.payment_id)throw new Error("Failed to create payment");m(t.data.payment_id),t.data.otp_required?i("otp-input"):i("verifying")}catch(t){const n=t instanceof Error?t.message:"Failed to create payment";b(n),e.onError?.({message:n})}finally{x(!1)}}else b("Please enter phone number and select network")},A=async t=>{if(f&&l){x(!0),b(null);try{if(!(await D.verifyOTP(f,{phone_number:l,otp_code:t})).data)throw new Error("Failed to verify OTP");i("verifying")}catch(t){const n=t instanceof Error?t.message:"Invalid OTP code";b(n),e.onError?.({message:n})}finally{x(!1)}}else b("Missing required data")},$=async()=>{if(f){x(!0),b(null);try{await D.resendOTP(f,{phone_number:l})}catch(e){const t=e instanceof Error?e.message:"Failed to resend OTP";b(t)}finally{x(!1)}}},_=()=>{if(f&&e.redirect_url){const t=I(e.redirect_url,f,"cancelled");return void(globalThis.location.href=t)}r&&r()},H=e.displayMode||"modal",U=e.primaryColor||"#3B82F6",B=w||e.logoUrl;if(p(()=>{if(e.logoUrl&&!w&&""!==e.logoUrl.trim()){const t=new Image;t.onload=()=>M(!0),t.onerror=()=>M(!1),t.src=e.logoUrl}},[e.logoUrl,w]),p(()=>{if(!t)return;const e=e=>(e.preventDefault(),!1),n=e=>{if("F12"===e.key||e.ctrlKey&&e.shiftKey&&("I"===e.key||"J"===e.key||"C"===e.key)||e.ctrlKey&&("U"===e.key||"S"===e.key))return e.preventDefault(),!1},r=e=>{const t=e.target;"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&e.preventDefault()};return document.addEventListener("contextmenu",e),document.addEventListener("keydown",n),document.addEventListener("selectstart",r),()=>{document.removeEventListener("contextmenu",e),document.removeEventListener("keydown",n),document.removeEventListener("selectstart",r)}},[t]),!t)return null;const z=()=>C.jsxs(C.Fragment,{children:["fullpage"!==H&&C.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[C.jsxs("div",{className:"flex items-center gap-3",children:[B&&C.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-gray-200 flex-shrink-0 flex items-center justify-center bg-gray-100 overflow-hidden",children:P||B===e.logoUrl&&!w?C.jsx("img",{src:B,alt:"Logo",className:"w-full h-full rounded-full object-cover",onError:e=>{e.target.style.display="none"}}):C.jsx("div",{className:"w-full h-full rounded-full bg-gray-200 animate-pulse"})}),C.jsxs("h2",{className:"text-xl font-semibold text-gray-800",children:[e.currency||"GHS"," ",e.amount.toFixed(2)]})]}),"success"!==o&&"failed"!==o&&C.jsx("button",{onClick:_,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close",children:C.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),C.jsxs("div",{className:"p-6",children:["phone-input"===o&&C.jsxs("div",{className:"space-y-4",children:[C.jsx(To,{selectedNetwork:c,onSelect:d,disabled:y,primaryColor:U}),C.jsx(E,{value:a,onChange:s,onValid:u,disabled:y,error:g||void 0,primaryColor:U}),g&&C.jsx("p",{className:"text-red-500 text-sm",children:g}),C.jsx("button",{onClick:N,disabled:!l||!c||y,className:"w-full py-3 text-white rounded-lg font-medium disabled:opacity-50 disabled:cursor-not-allowed transition-all",style:{backgroundColor:U},onMouseEnter:e=>{e.currentTarget.disabled||(e.currentTarget.style.opacity="0.9")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:y?"Processing...":"Continue"})]}),"otp-input"===o&&C.jsxs("div",{className:"space-y-4",children:[C.jsxs("div",{children:[C.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"Enter OTP"}),C.jsxs("p",{className:"text-sm text-gray-600 mb-4",children:["We've sent a 4-digit code to ",l]})]}),C.jsx(jo,{length:4,onComplete:A,onResend:$,disabled:y,loading:y,error:g||void 0,primaryColor:U})]}),"verifying"===o&&C.jsxs(C.Fragment,{children:[C.jsx(Ro,{paymentId:f,primaryColor:U,showTimeoutWarning:R}),T&&C.jsx(Lo,{paymentId:f,redirectUrl:e.redirect_url,onRedirect:()=>{if(e.redirect_url){const t=I(e.redirect_url,f,"pending");globalThis.location.href=t}},onContinueWaiting:()=>{j(!1),V(!1),F(e=>e+1)},primaryColor:U})]}),("success"===o||"failed"===o)&&C.jsx(Vo,{success:"success"===o,payment:h||void 0,redirectUrl:e.redirect_url,primaryColor:U,onRedirect:()=>((t,n)=>{if(e.redirect_url&&f){const r=I(e.redirect_url,f,t,n);return void(globalThis.location.href=r)}r&&r()})("success"===o?"completed":"failed"===o?"failed":"cancelled",h||void 0)})]})]});return"inline"===H?C.jsx("div",{className:"w-full max-w-md mx-auto bg-white rounded-lg shadow-lg border border-gray-200",children:z()}):"fullpage"===H?C.jsx("div",{className:"fixed inset-0 z-50 bg-white overflow-y-auto",children:C.jsxs("div",{className:"min-h-screen flex flex-col",children:[C.jsxs("div",{className:"flex items-center justify-between p-4 border-b bg-gray-50",children:[C.jsxs("div",{className:"flex items-center gap-3",children:[B&&C.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-gray-200 flex-shrink-0 flex items-center justify-center bg-gray-100 overflow-hidden",children:P||B===e.logoUrl&&!w?C.jsx("img",{src:B,alt:"Logo",className:"w-full h-full rounded-full object-cover",onError:e=>{e.target.style.display="none"}}):C.jsx("div",{className:"w-full h-full rounded-full bg-gray-200 animate-pulse"})}),C.jsxs("h2",{className:"text-xl font-semibold text-gray-800",children:[e.currency||"GHS"," ",e.amount.toFixed(2)]})]}),"success"!==o&&"failed"!==o&&C.jsx("button",{onClick:_,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close",children:C.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:C.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),C.jsx("div",{className:"flex-1 flex items-center justify-center p-4",children:C.jsx("div",{className:"w-full max-w-md",children:C.jsx("div",{className:"bg-white rounded-lg shadow-lg border border-gray-200",children:z()})})})]})}):C.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50 p-4",children:C.jsx("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-md max-h-[90vh] overflow-y-auto",children:z()})})};export{k as PaymentService,Fo as PaymentWidget};
1
+ import*as e from"react";import t,{useState as n,useCallback as r,forwardRef as o,useContext as i,useLayoutEffect as a,useRef as s,useMemo as l,createContext as u,Component as c,Fragment as d,useEffect as p}from"react";import{createPortal as f}from"react-dom";var m={exports:{}},h={},v=Symbol.for("react.transitional.element"),g=Symbol.for("react.fragment");function b(e,t,n){var r=null;if(void 0!==n&&(r=""+n),void 0!==t.key&&(r=""+t.key),"key"in t)for(var o in n={},t)"key"!==o&&(n[o]=t[o]);else n=t;return t=n.ref,{$$typeof:v,type:e,key:r,ref:void 0!==t?t:null,props:n}}h.Fragment=g,h.jsx=b,h.jsxs=b,m.exports=h;var y=m.exports;function x(e){try{return"https:"===new URL(e).protocol}catch{return!1}}function w(e,t,n,r){const o=new URLSearchParams({payment_id:t,status:n});if("completed"===n&&r){const e="number"==typeof r.amount?r.amount.toString():r.amount;o.append("amount",e),o.append("currency",r.currency||"GHS");const t=r.metadata?.reference||r.metadata?.order_reference;t&&o.append("reference",t)}if("failed"===n&&r?.metadata?.error){const e=r.metadata.error;o.append("reason",e.code||"unknown"),o.append("message",e.message||"Payment failed")}return`${e}?${o.toString()}`}class O{constructor(e){this.config=e}async makeRequest(e,t={}){const n=`${this.config.baseUrl||"https://payment.payloqa.com/api/v1/payments"}${e}`,r={"Content-Type":"application/json","X-API-Key":this.config.apiKey,"X-Platform-Id":this.config.platformId,...t.headers},o=await fetch(n,{...t,headers:r}),i=await o.json();if(!o.ok||!1===i.success){const e=i.error?.message||i.message||`HTTP ${o.status}: ${o.statusText}`,t=new Error(e);throw i.error?.code&&(t.code=i.error.code),t}return i}async createPayment(e){if(e.redirect_url&&!x(e.redirect_url))throw new Error("Redirect URL must be a valid HTTPS URL. HTTP URLs are not allowed for security reasons.");return this.makeRequest("/create",{method:"POST",body:JSON.stringify(e)})}async verifyOTP(e,t){return this.makeRequest(`/${e}/verify-otp`,{method:"POST",body:JSON.stringify(t)})}async resendOTP(e,t){return this.makeRequest(`/${e}/resend-otp`,{method:"POST",body:JSON.stringify(t)})}async getPaymentStatus(e){return this.makeRequest(`/${e}`,{method:"GET"})}async cancelPayment(e,t){return this.makeRequest(`/${e}/cancel`,{method:"POST",body:t?JSON.stringify(t):void 0})}async getPlatformInfo(){const e=await this.makeRequest("/platform",{method:"GET"});return{logo_url:e.data?.logo_url}}}const C=({value:e,onChange:t,onValid:n,placeholder:r="Phone number",disabled:o=!1,error:i,primaryColor:a="#3B82F6"})=>y.jsxs("div",{className:"w-full",children:[y.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Phone Number"}),y.jsx("input",{type:"tel",value:e,onChange:e=>{const r=e.target.value.replace(/\D/g,"").slice(0,10);t(r);10===r.length&&n&&n((e=>{const t=e.replace(/[^\d+]/g,"");return t.startsWith("+233")?t:t.startsWith("0")?"+233"+t.substring(1):10!==t.length||t.startsWith("0")?t:"+233"+t})(r))},placeholder:r,disabled:o,maxLength:10,className:`w-full px-4 py-3 border-2 rounded-lg text-base focus:outline-none focus:ring-2 focus:border-transparent transition-all ${i?"border-red-500":"border-gray-300"} ${o?"bg-gray-50 cursor-not-allowed":"bg-white"}`,style:i?{}:{"--focus-ring-color":a},onFocus:e=>{i||o||(e.target.style.borderColor=a,e.target.style.boxShadow=`0 0 0 3px ${a}33`)},onBlur:e=>{i||(e.target.style.borderColor="#D1D5DB",e.target.style.boxShadow="")}}),i&&y.jsx("p",{className:"mt-2 text-sm text-red-600 font-medium",children:i})]});function S(e){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},S(e)}function I(e){var t=function(e,t){if("object"!=S(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==S(t)?t:t+""}function k(e,t,n){return(t=I(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach(function(t){k(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function T(e,t){if(e){if("string"==typeof e)return M(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?M(e,t):void 0}}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],l=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){u=!0,o=e}finally{try{if(!l&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||T(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function V(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var R=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(null,arguments)}function F(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I(r.key),r)}}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}function N(e){return N=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},N(e)}function A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(A=function(){return!!e})()}function $(e,t){if(t&&("object"==S(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function H(e){return function(e){if(Array.isArray(e))return M(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||T(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var U=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(e){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),_="-ms-",B="-moz-",z="-webkit-",W="comm",G="rule",Y="decl",q="@keyframes",X=Math.abs,K=String.fromCharCode,J=Object.assign;function Z(e){return e.trim()}function Q(e,t,n){return e.replace(t,n)}function ee(e,t){return e.indexOf(t)}function te(e,t){return 0|e.charCodeAt(t)}function ne(e,t,n){return e.slice(t,n)}function re(e){return e.length}function oe(e){return e.length}function ie(e,t){return t.push(e),e}var ae=1,se=1,le=0,ue=0,ce=0,de="";function pe(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:ae,column:se,length:a,return:""}}function fe(e,t){return J(pe("",null,null,"",null,null,0),e,{length:-e.length},t)}function me(){return ce=ue>0?te(de,--ue):0,se--,10===ce&&(se=1,ae--),ce}function he(){return ce=ue<le?te(de,ue++):0,se++,10===ce&&(se=1,ae++),ce}function ve(){return te(de,ue)}function ge(){return ue}function be(e,t){return ne(de,e,t)}function ye(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function xe(e){return ae=se=1,le=re(de=e),ue=0,[]}function we(e){return de="",e}function Oe(e){return Z(be(ue-1,Ie(91===e?e+2:40===e?e+1:e)))}function Ce(e){for(;(ce=ve())&&ce<33;)he();return ye(e)>2||ye(ce)>3?"":" "}function Se(e,t){for(;--t&&he()&&!(ce<48||ce>102||ce>57&&ce<65||ce>70&&ce<97););return be(e,ge()+(t<6&&32==ve()&&32==he()))}function Ie(e){for(;he();)switch(ce){case e:return ue;case 34:case 39:34!==e&&39!==e&&Ie(ce);break;case 40:41===e&&Ie(e);break;case 92:he()}return ue}function ke(e,t){for(;he()&&e+ce!==57&&(e+ce!==84||47!==ve()););return"/*"+be(t,ue-1)+"*"+K(47===e?e:he())}function Ee(e){for(;!ye(ve());)he();return be(e,ue)}function Pe(e){return we(Me("",null,null,null,[""],e=xe(e),0,[0],e))}function Me(e,t,n,r,o,i,a,s,l){for(var u=0,c=0,d=a,p=0,f=0,m=0,h=1,v=1,g=1,b=0,y="",x=o,w=i,O=r,C=y;v;)switch(m=b,b=he()){case 40:if(108!=m&&58==te(C,d-1)){-1!=ee(C+=Q(Oe(b),"&","&\f"),"&\f")&&(g=-1);break}case 34:case 39:case 91:C+=Oe(b);break;case 9:case 10:case 13:case 32:C+=Ce(m);break;case 92:C+=Se(ge()-1,7);continue;case 47:switch(ve()){case 42:case 47:ie(je(ke(he(),ge()),t,n),l);break;default:C+="/"}break;case 123*h:s[u++]=re(C)*g;case 125*h:case 59:case 0:switch(b){case 0:case 125:v=0;case 59+c:-1==g&&(C=Q(C,/\f/g,"")),f>0&&re(C)-d&&ie(f>32?Ve(C+";",r,n,d-1):Ve(Q(C," ","")+";",r,n,d-2),l);break;case 59:C+=";";default:if(ie(O=Te(C,t,n,u,c,o,s,y,x=[],w=[],d),i),123===b)if(0===c)Me(C,t,O,O,x,i,d,s,w);else switch(99===p&&110===te(C,3)?100:p){case 100:case 108:case 109:case 115:Me(e,O,O,r&&ie(Te(e,O,O,0,0,o,s,y,o,x=[],d),w),o,w,d,s,r?x:w);break;default:Me(C,O,O,O,[""],w,0,s,w)}}u=c=f=0,h=g=1,y=C="",d=a;break;case 58:d=1+re(C),f=m;default:if(h<1)if(123==b)--h;else if(125==b&&0==h++&&125==me())continue;switch(C+=K(b),b*h){case 38:g=c>0?1:(C+="\f",-1);break;case 44:s[u++]=(re(C)-1)*g,g=1;break;case 64:45===ve()&&(C+=Oe(he())),p=ve(),c=d=re(y=C+=Ee(ge())),b++;break;case 45:45===m&&2==re(C)&&(h=0)}}return i}function Te(e,t,n,r,o,i,a,s,l,u,c){for(var d=o-1,p=0===o?i:[""],f=oe(p),m=0,h=0,v=0;m<r;++m)for(var g=0,b=ne(e,d+1,d=X(h=a[m])),y=e;g<f;++g)(y=Z(h>0?p[g]+" "+b:Q(b,/&\f/g,p[g])))&&(l[v++]=y);return pe(e,t,n,0===o?G:s,l,u,c)}function je(e,t,n){return pe(e,t,n,W,K(ce),ne(e,2,-2),0)}function Ve(e,t,n,r){return pe(e,t,n,Y,ne(e,0,r),ne(e,r+1,-1),r)}function Re(e,t){for(var n="",r=oe(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function Le(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Y:return e.return=e.return||e.value;case W:return"";case q:return e.return=e.value+"{"+Re(e.children,r)+"}";case G:e.value=e.props.join(",")}return re(n=Re(e.children,r))?e.return=e.value+"{"+n+"}":""}function Fe(e){var t=oe(e);return function(n,r,o,i){for(var a="",s=0;s<t;s++)a+=e[s](n,r,o,i)||"";return a}}function De(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var Ne="undefined"!=typeof document,Ae=function(e,t,n){for(var r=0,o=0;r=o,o=ve(),38===r&&12===o&&(t[n]=1),!ye(o);)he();return be(e,ue)},$e=function(e,t){return we(function(e,t){var n=-1,r=44;do{switch(ye(r)){case 0:38===r&&12===ve()&&(t[n]=1),e[n]+=Ae(ue-1,t,n);break;case 2:e[n]+=Oe(r);break;case 4:if(44===r){e[++n]=58===ve()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=K(r)}}while(r=he());return e}(xe(e),t))},He=new WeakMap,Ue=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||He.get(n))&&!r){He.set(e,!0);for(var o=[],i=$e(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var u=0;u<a.length;u++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[u]):a[u]+" "+i[s]}}},_e=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function Be(e,t){switch(function(e,t){return 45^te(e,0)?(((t<<2^te(e,0))<<2^te(e,1))<<2^te(e,2))<<2^te(e,3):0}(e,t)){case 5103:return z+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return z+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return z+e+B+e+_+e+e;case 6828:case 4268:return z+e+_+e+e;case 6165:return z+e+_+"flex-"+e+e;case 5187:return z+e+Q(e,/(\w+).+(:[^]+)/,z+"box-$1$2"+_+"flex-$1$2")+e;case 5443:return z+e+_+"flex-item-"+Q(e,/flex-|-self/,"")+e;case 4675:return z+e+_+"flex-line-pack"+Q(e,/align-content|flex-|-self/,"")+e;case 5548:return z+e+_+Q(e,"shrink","negative")+e;case 5292:return z+e+_+Q(e,"basis","preferred-size")+e;case 6060:return z+"box-"+Q(e,"-grow","")+z+e+_+Q(e,"grow","positive")+e;case 4554:return z+Q(e,/([^-])(transform)/g,"$1"+z+"$2")+e;case 6187:return Q(Q(Q(e,/(zoom-|grab)/,z+"$1"),/(image-set)/,z+"$1"),e,"")+e;case 5495:case 3959:return Q(e,/(image-set\([^]*)/,z+"$1$`$1");case 4968:return Q(Q(e,/(.+:)(flex-)?(.*)/,z+"box-pack:$3"+_+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+z+e+e;case 4095:case 3583:case 4068:case 2532:return Q(e,/(.+)-inline(.+)/,z+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(re(e)-1-t>6)switch(te(e,t+1)){case 109:if(45!==te(e,t+4))break;case 102:return Q(e,/(.+:)(.+)-([^]+)/,"$1"+z+"$2-$3$1"+B+(108==te(e,t+3)?"$3":"$2-$3"))+e;case 115:return~ee(e,"stretch")?Be(Q(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==te(e,t+1))break;case 6444:switch(te(e,re(e)-3-(~ee(e,"!important")&&10))){case 107:return Q(e,":",":"+z)+e;case 101:return Q(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+z+(45===te(e,14)?"inline-":"")+"box$3$1"+z+"$2$3$1"+_+"$2box$3")+e}break;case 5936:switch(te(e,t+11)){case 114:return z+e+_+Q(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return z+e+_+Q(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return z+e+_+Q(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return z+e+_+e+e}return e}var ze,We,Ge=Ne?void 0:(ze=function(){return De(function(){return{}})},We=new WeakMap,function(e){if(We.has(e))return We.get(e);var t=ze(e);return We.set(e,t),t}),Ye=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case Y:e.return=Be(e.value,e.length);break;case q:return Re([fe(e,{value:Q(e.value,"@","@"+z)})],r);case G:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return Re([fe(e,{props:[Q(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return Re([fe(e,{props:[Q(t,/:(plac\w+)/,":"+z+"input-$1")]}),fe(e,{props:[Q(t,/:(plac\w+)/,":-moz-$1")]}),fe(e,{props:[Q(t,/:(plac\w+)/,_+"input-$1")]})],r)}return""})}}],qe=function(e){var t=e.key;if(Ne&&"css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||Ye,a={},s=[];Ne&&(r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)}));var l,u=[Ue,_e];if(Ge){var c=[Le],d=Fe(u.concat(i,c)),p=Ge(i)(t),f=function(e,t){var n=t.name;return void 0===p[n]&&(p[n]=Re(Pe(e?e+"{"+t.styles+"}":t.styles),d)),p[n]};o=function(e,t,n,r){var o=t.name,i=f(e,t);return void 0===g.compat?(r&&(g.inserted[o]=!0),i):r?void(g.inserted[o]=i):i}}else{var m,h=[Le,(l=function(e){m.insert(e)},function(e){e.root||(e=e.return)&&l(e)})],v=Fe(u.concat(i,h));o=function(e,t,n,r){m=n,Re(Pe(e?e+"{"+t.styles+"}":t.styles),v),r&&(g.inserted[t.name]=!0)}}var g={key:t,sheet:new U({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return g.sheet.hydrate(s),g},Xe={exports:{}},Ke={},Je="function"==typeof Symbol&&Symbol.for,Ze=Je?Symbol.for("react.element"):60103,Qe=Je?Symbol.for("react.portal"):60106,et=Je?Symbol.for("react.fragment"):60107,tt=Je?Symbol.for("react.strict_mode"):60108,nt=Je?Symbol.for("react.profiler"):60114,rt=Je?Symbol.for("react.provider"):60109,ot=Je?Symbol.for("react.context"):60110,it=Je?Symbol.for("react.async_mode"):60111,at=Je?Symbol.for("react.concurrent_mode"):60111,st=Je?Symbol.for("react.forward_ref"):60112,lt=Je?Symbol.for("react.suspense"):60113,ut=Je?Symbol.for("react.suspense_list"):60120,ct=Je?Symbol.for("react.memo"):60115,dt=Je?Symbol.for("react.lazy"):60116,pt=Je?Symbol.for("react.block"):60121,ft=Je?Symbol.for("react.fundamental"):60117,mt=Je?Symbol.for("react.responder"):60118,ht=Je?Symbol.for("react.scope"):60119;function vt(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case Ze:switch(e=e.type){case it:case at:case et:case nt:case tt:case lt:return e;default:switch(e=e&&e.$$typeof){case ot:case st:case dt:case ct:case rt:return e;default:return t}}case Qe:return t}}}function gt(e){return vt(e)===at}Ke.AsyncMode=it,Ke.ConcurrentMode=at,Ke.ContextConsumer=ot,Ke.ContextProvider=rt,Ke.Element=Ze,Ke.ForwardRef=st,Ke.Fragment=et,Ke.Lazy=dt,Ke.Memo=ct,Ke.Portal=Qe,Ke.Profiler=nt,Ke.StrictMode=tt,Ke.Suspense=lt,Ke.isAsyncMode=function(e){return gt(e)||vt(e)===it},Ke.isConcurrentMode=gt,Ke.isContextConsumer=function(e){return vt(e)===ot},Ke.isContextProvider=function(e){return vt(e)===rt},Ke.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===Ze},Ke.isForwardRef=function(e){return vt(e)===st},Ke.isFragment=function(e){return vt(e)===et},Ke.isLazy=function(e){return vt(e)===dt},Ke.isMemo=function(e){return vt(e)===ct},Ke.isPortal=function(e){return vt(e)===Qe},Ke.isProfiler=function(e){return vt(e)===nt},Ke.isStrictMode=function(e){return vt(e)===tt},Ke.isSuspense=function(e){return vt(e)===lt},Ke.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===et||e===at||e===nt||e===tt||e===lt||e===ut||"object"==typeof e&&null!==e&&(e.$$typeof===dt||e.$$typeof===ct||e.$$typeof===rt||e.$$typeof===ot||e.$$typeof===st||e.$$typeof===ft||e.$$typeof===mt||e.$$typeof===ht||e.$$typeof===pt)},Ke.typeOf=vt,Xe.exports=Ke;var bt=Xe.exports,yt={};yt[bt.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},yt[bt.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var xt="undefined"!=typeof document;var wt=function(e,t,n){var r=e.key+"-"+t.name;(!1===n||!1===xt&&void 0!==e.compat)&&void 0===e.registered[r]&&(e.registered[r]=t.styles)};var Ot={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},Ct=/[A-Z]|^ms/g,St=/_EMO_([^_]+?)_([^]*?)_EMO_/g,It=function(e){return 45===e.charCodeAt(1)},kt=function(e){return null!=e&&"boolean"!=typeof e},Et=De(function(e){return It(e)?e:e.replace(Ct,"-$&").toLowerCase()}),Pt=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(St,function(e,t,n){return Tt={name:t,styles:n,next:Tt},t})}return 1===Ot[e]||It(e)||"number"!=typeof t||0===t?t:t+"px"};function Mt(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Tt={name:o.name,styles:o.styles,next:Tt},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)Tt={name:a.name,styles:a.styles,next:Tt},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Mt(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;kt(s)&&(r+=Et(i)+":"+Pt(i,s)+";")}else if(Array.isArray(a)&&"string"==typeof a[0]&&null==t)for(var l=0;l<a.length;l++)kt(a[l])&&(r+=Et(i)+":"+Pt(i,a[l])+";");else{var u=Mt(e,t,a);switch(i){case"animation":case"animationName":r+=Et(i)+":"+u+";";break;default:r+=i+"{"+u+"}"}}}return r}(e,t,n);case"function":if(void 0!==e){var s=Tt,l=n(e);return Tt=s,Mt(e,t,l)}}return n}var Tt,jt=/label:\s*([^\s;{]+)\s*(;|$)/g;function Vt(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Tt=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Mt(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=Mt(n,t,e[a]),r)o+=i[a]}jt.lastIndex=0;for(var s,l="";null!==(s=jt.exec(o));)l+="-"+s[1];var u=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:u,styles:o,next:Tt}}var Rt="undefined"!=typeof document,Lt=function(e){return e()},Ft=!!e.useInsertionEffect&&e.useInsertionEffect,Dt=Rt&&Ft||Lt,Nt="undefined"!=typeof document,At=e.createContext("undefined"!=typeof HTMLElement?qe({key:"css"}):null);At.Provider;var $t=function(e){return o(function(t,n){var r=i(At);return e(t,r,n)})};Nt||($t=function(t){return function(n){var r=i(At);return null===r?(r=qe({key:"css"}),e.createElement(At.Provider,{value:r},t(n,r))):t(n,r)}});var Ht,Ut,_t=e.createContext({}),Bt={}.hasOwnProperty,zt="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",Wt=function(t){var n=t.cache,r=t.serialized,o=t.isStringTag;wt(n,r,o);var i=Dt(function(){return function(e,t,n){wt(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o="",i=t;do{var a=e.insert(t===i?"."+r:"",i,e.sheet,!0);xt||void 0===a||(o+=a),i=i.next}while(void 0!==i);if(!xt&&0!==o.length)return o}}(n,r,o)});if(!Nt&&void 0!==i){for(var a,s=r.name,l=r.next;void 0!==l;)s+=" "+l.name,l=l.next;return e.createElement("style",((a={})["data-emotion"]=n.key+" "+s,a.dangerouslySetInnerHTML={__html:i},a.nonce=n.sheet.nonce,a))}return null},Gt=$t(function(t,n,r){var o=t.css;"string"==typeof o&&void 0!==n.registered[o]&&(o=n.registered[o]);var i=t[zt],a=[o],s="";"string"==typeof t.className?s=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(n.registered,a,t.className):null!=t.className&&(s=t.className+" ");var l=Vt(a,void 0,e.useContext(_t));s+=n.key+"-"+l.name;var u={};for(var c in t)Bt.call(t,c)&&"css"!==c&&c!==zt&&(u[c]=t[c]);return u.className=s,r&&(u.ref=r),e.createElement(e.Fragment,null,e.createElement(Wt,{cache:n,serialized:l,isStringTag:"string"==typeof i}),e.createElement(i,u))}),Yt=Gt,qt=function(t,n){var r=arguments;if(null==n||!Bt.call(n,"css"))return e.createElement.apply(void 0,r);var o=r.length,i=new Array(o);i[0]=Yt,i[1]=function(e,t){var n={};for(var r in t)Bt.call(t,r)&&(n[r]=t[r]);return n[zt]=e,n}(t,n);for(var a=2;a<o;a++)i[a]=r[a];return e.createElement.apply(null,i)};function Xt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Vt(t)}Ht=qt||(qt={}),Ut||(Ut=Ht.JSX||(Ht.JSX={}));const Kt=Math.min,Jt=Math.max,Zt=Math.round,Qt=Math.floor,en=e=>({x:e,y:e});function tn(){return"undefined"!=typeof window}function nn(e){return an(e)?(e.nodeName||"").toLowerCase():"#document"}function rn(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function on(e){var t;return null==(t=(an(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function an(e){return!!tn()&&(e instanceof Node||e instanceof rn(e).Node)}function sn(e){return!!tn()&&(e instanceof HTMLElement||e instanceof rn(e).HTMLElement)}function ln(e){return!(!tn()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof rn(e).ShadowRoot)}const un=new Set(["inline","contents"]);function cn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=pn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!un.has(o)}const dn=new Set(["html","body","#document"]);function pn(e){return rn(e).getComputedStyle(e)}function fn(e){const t=function(e){if("html"===nn(e))return e;const t=e.assignedSlot||e.parentNode||ln(e)&&e.host||on(e);return ln(t)?t.host:t}(e);return function(e){return dn.has(nn(e))}(t)?e.ownerDocument?e.ownerDocument.body:e.body:sn(t)&&cn(t)?t:fn(t)}function mn(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=fn(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=rn(o);if(i){const e=hn(a);return t.concat(a,a.visualViewport||[],cn(o)?o:[],e&&n?mn(e):[])}return t.concat(o,mn(o,[],n))}function hn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function vn(e){return t=e,tn()&&(t instanceof Element||t instanceof rn(t).Element)?e:e.contextElement;var t}function gn(e){const t=vn(e);if(!sn(t))return en(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=function(e){const t=pn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=sn(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=Zt(n)!==i||Zt(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}(t);let a=(i?Zt(n.width):n.width)/r,s=(i?Zt(n.height):n.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}function bn(e,t,n,r){void 0===t&&(t=!1);const o=e.getBoundingClientRect(),i=vn(e);let a=en(1);t&&(a=gn(e));const s=en(0);let l=(o.left+s.x)/a.x,u=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const e=r;let t=rn(i),n=hn(t);for(;n&&r&&e!==t;){const e=gn(n),r=n.getBoundingClientRect(),o=pn(n),i=r.left+(n.clientLeft+parseFloat(o.paddingLeft))*e.x,a=r.top+(n.clientTop+parseFloat(o.paddingTop))*e.y;l*=e.x,u*=e.y,c*=e.x,d*=e.y,l+=i,u+=a,t=rn(n),n=hn(t)}}return function(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}({width:c,height:d,x:l,y:u})}function yn(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function xn(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,u=vn(e),c=o||i?[...u?mn(u):[],...mn(t)]:[];c.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const d=u&&s?function(e,t){let n,r=null;const o=on(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,l){void 0===s&&(s=!1),void 0===l&&(l=1),i();const u=e.getBoundingClientRect(),{left:c,top:d,width:p,height:f}=u;if(s||t(),!p||!f)return;const m={rootMargin:-Qt(d)+"px "+-Qt(o.clientWidth-(c+p))+"px "+-Qt(o.clientHeight-(d+f))+"px "+-Qt(c)+"px",threshold:Jt(0,Kt(1,l))||1};let h=!0;function v(t){const r=t[0].intersectionRatio;if(r!==l){if(!h)return a();r?a(!1,r):n=setTimeout(()=>{a(!1,1e-7)},1e3)}1!==r||yn(u,e.getBoundingClientRect())||a(),h=!1}try{r=new IntersectionObserver(v,{...m,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(v,m)}r.observe(e)}(!0),i}(u,n):null;let p,f=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&(m.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),u&&!l&&m.observe(u),m.observe(t));let h=l?bn(e):null;return l&&function t(){const r=bn(e);h&&!yn(h,r)&&n();h=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),null==d||d(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(p)}}var wn="undefined"!=typeof document?a:function(){},On=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Cn=function(){};function Sn(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function In(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];var i=[].concat(r);if(t&&e)for(var a in t)t.hasOwnProperty(a)&&t[a]&&i.push("".concat(Sn(e,a)));return i.filter(function(e){return e}).map(function(e){return String(e).trim()}).join(" ")}var kn=function(e){return t=e,Array.isArray(t)?e.filter(Boolean):"object"===S(e)&&null!==e?[e]:[];var t},En=function(e){return e.className,e.clearValue,e.cx,e.getStyles,e.getClassNames,e.getValue,e.hasValue,e.isMulti,e.isRtl,e.options,e.selectOption,e.selectProps,e.setValue,e.theme,P({},V(e,On))},Pn=function(e,t,n){var r=e.cx,o=e.getStyles,i=e.getClassNames,a=e.className;return{css:o(t,e),className:r(null!=n?n:{},i(t,e),a)}};function Mn(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function Tn(e){return Mn(e)?window.pageYOffset:e.scrollTop}function jn(e,t){Mn(e)?window.scrollTo(0,t):e.scrollTop=t}function Vn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Cn,o=Tn(e),i=t-o,a=0;!function t(){var s=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(a+=10,o,i,n);jn(e,s),a<n?window.requestAnimationFrame(t):r(e)}()}function Rn(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?jn(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o<n.top&&jn(e,Math.max(t.offsetTop-o,0))}function Ln(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}var Fn=!1,Dn={get passive(){return Fn=!0}},Nn="undefined"!=typeof window?window:{};Nn.addEventListener&&Nn.removeEventListener&&(Nn.addEventListener("p",Cn,Dn),Nn.removeEventListener("p",Cn,!1));var An=Fn;function $n(e){return null!=e}function Hn(e,t,n){return e?t:n}var Un=["children","innerProps"],_n=["children","innerProps"];function Bn(e){var t=e.maxHeight,n=e.menuEl,r=e.minHeight,o=e.placement,i=e.shouldScroll,a=e.isFixedPosition,s=e.controlHeight,l=function(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/;if("fixed"===t.position)return document.documentElement;for(var o=e;o=o.parentElement;)if(t=getComputedStyle(o),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return o;return document.documentElement}(n),u={placement:"bottom",maxHeight:t};if(!n||!n.offsetParent)return u;var c,d=l.getBoundingClientRect().height,p=n.getBoundingClientRect(),f=p.bottom,m=p.height,h=p.top,v=n.offsetParent.getBoundingClientRect().top,g=a?window.innerHeight:Mn(c=l)?window.innerHeight:c.clientHeight,b=Tn(l),y=parseInt(getComputedStyle(n).marginBottom,10),x=parseInt(getComputedStyle(n).marginTop,10),w=v-x,O=g-h,C=w+b,S=d-b-h,I=f-g+b+y,k=b+h-x,E=160;switch(o){case"auto":case"bottom":if(O>=m)return{placement:"bottom",maxHeight:t};if(S>=m&&!a)return i&&Vn(l,I,E),{placement:"bottom",maxHeight:t};if(!a&&S>=r||a&&O>=r)return i&&Vn(l,I,E),{placement:"bottom",maxHeight:a?O-y:S-y};if("auto"===o||a){var P=t,M=a?w:C;return M>=r&&(P=Math.min(M-y-s,t)),{placement:"top",maxHeight:P}}if("bottom"===o)return i&&jn(l,I),{placement:"bottom",maxHeight:t};break;case"top":if(w>=m)return{placement:"top",maxHeight:t};if(C>=m&&!a)return i&&Vn(l,k,E),{placement:"top",maxHeight:t};if(!a&&C>=r||a&&w>=r){var T=t;return(!a&&C>=r||a&&w>=r)&&(T=a?w-x:C-x),i&&Vn(l,k,E),{placement:"top",maxHeight:T}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return u}var zn,Wn=function(e){return"auto"===e?"bottom":e},Gn=u(null),Yn=function(e){var t=e.children,r=e.minMenuHeight,o=e.maxMenuHeight,a=e.menuPlacement,l=e.menuPosition,u=e.menuShouldScrollIntoView,c=e.theme,d=(i(Gn)||{}).setPortalPlacement,p=s(null),f=j(n(o),2),m=f[0],h=f[1],v=j(n(null),2),g=v[0],b=v[1],y=c.spacing.controlHeight;return wn(function(){var e=p.current;if(e){var t="fixed"===l,n=Bn({maxHeight:o,menuEl:e,minHeight:r,placement:a,shouldScroll:u&&!t,isFixedPosition:t,controlHeight:y});h(n.maxHeight),b(n.placement),null==d||d(n.placement)}},[o,a,l,u,r,d,y]),t({ref:p,placerProps:P(P({},e),{},{placement:g||Wn(a),maxHeight:m})})},qn=function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return qt("div",L({},Pn(e,"menu",{menu:!0}),{ref:n},r),t)},Xn=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return P({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},Kn=Xn,Jn=Xn,Zn=["size"],Qn=["innerProps","isRtl","size"],er={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},tr=function(e){var t=e.size,n=V(e,Zn);return qt("svg",L({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:er},n))},nr=function(e){return qt(tr,L({size:20},e),qt("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},rr=function(e){return qt(tr,L({size:20},e),qt("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},or=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return P({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},ir=or,ar=or,sr=function(){var e=Xt.apply(void 0,arguments),t="animation-"+e.name;return{name:t,styles:"@keyframes "+t+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}}(zn||(zn=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),lr=function(e){var t=e.delay,n=e.offset;return qt("span",{css:Xt({animation:"".concat(sr," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},ur=function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return qt("div",L({ref:o},Pn(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i,{"aria-disabled":n||void 0}),t)},cr=["data"],dr=function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,s=e.innerProps,l=e.label,u=e.theme,c=e.selectProps;return qt("div",L({},Pn(e,"group",{group:!0}),s),qt(i,L({},a,{selectProps:c,theme:u,getStyles:r,getClassNames:o,cx:n}),l),qt("div",null,t))},pr=["innerRef","isDisabled","isHidden","inputClassName"],fr={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},mr={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":P({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},fr)},hr=function(e){return P({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},fr)},vr=function(e){var t=e.children,n=e.innerProps;return qt("div",n,t)};var gr=function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,s=e.selectProps,l=n.Container,u=n.Label,c=n.Remove;return qt(l,{data:r,innerProps:P(P({},Pn(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:s},qt(u,{data:r,innerProps:P({},Pn(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},t),qt(c,{data:r,innerProps:P(P({},Pn(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:s}))},br={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return qt("div",L({},Pn(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||qt(nr,null))},Control:ur,DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return qt("div",L({},Pn(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||qt(rr,null))},DownChevron:rr,CrossIcon:nr,Group:dr,GroupHeading:function(e){var t=En(e);t.data;var n=V(t,cr);return qt("div",L({},Pn(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return qt("div",L({},Pn(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return qt("span",L({},t,Pn(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=En(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,s=r.inputClassName,l=V(r,pr);return qt("div",L({},Pn(e,"input",{"input-container":!0}),{"data-value":n||""}),qt("input",L({className:t({input:!0},s),ref:o,style:hr(a),disabled:i},l)))},LoadingIndicator:function(e){var t=e.innerProps,n=e.isRtl,r=e.size,o=void 0===r?4:r,i=V(e,Qn);return qt("div",L({},Pn(P(P({},i),{},{innerProps:t,isRtl:n,size:o}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),qt(lr,{delay:0,offset:n}),qt(lr,{delay:160,offset:!0}),qt(lr,{delay:320,offset:!n}))},Menu:qn,MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return qt("div",L({},Pn(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,o=e.children,i=e.controlElement,a=e.innerProps,u=e.menuPlacement,c=e.menuPosition,d=s(null),p=s(null),m=j(n(Wn(u)),2),h=m[0],v=m[1],g=l(function(){return{setPortalPlacement:v}},[]),b=j(n(null),2),y=b[0],x=b[1],w=r(function(){if(i){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(i),t="fixed"===c?0:window.pageYOffset,n=e[h]+t;n===(null==y?void 0:y.offset)&&e.left===(null==y?void 0:y.rect.left)&&e.width===(null==y?void 0:y.rect.width)||x({offset:n,rect:e})}},[i,c,h,null==y?void 0:y.offset,null==y?void 0:y.rect.left,null==y?void 0:y.rect.width]);wn(function(){w()},[w]);var O=r(function(){"function"==typeof p.current&&(p.current(),p.current=null),i&&d.current&&(p.current=xn(i,d.current,w,{elementResize:"ResizeObserver"in window}))},[i,w]);wn(function(){O()},[O]);var C=r(function(e){d.current=e,O()},[O]);if(!t&&"fixed"!==c||!y)return null;var S=qt("div",L({ref:C},Pn(P(P({},e),{},{offset:y.offset,position:c,rect:y.rect}),"menuPortal",{"menu-portal":!0}),a),o);return qt(Gn.Provider,{value:g},t?f(S,t):S)},LoadingMessage:function(e){var t=e.children,n=void 0===t?"Loading...":t,r=e.innerProps,o=V(e,_n);return qt("div",L({},Pn(P(P({},o),{},{children:n,innerProps:r}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),r),n)},NoOptionsMessage:function(e){var t=e.children,n=void 0===t?"No options":t,r=e.innerProps,o=V(e,Un);return qt("div",L({},Pn(P(P({},o),{},{children:n,innerProps:r}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),r),n)},MultiValue:gr,MultiValueContainer:vr,MultiValueLabel:vr,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return qt("div",L({role:"button"},n),t||qt(nr,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return qt("div",L({},Pn(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return qt("div",L({},Pn(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return qt("div",L({},Pn(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return qt("div",L({},Pn(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return qt("div",L({},Pn(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},yr=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function xr(e,t){return e===t||!(!yr(e)||!yr(t))}function wr(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(!xr(e[n],t[n]))return!1;return!0}for(var Or={name:"7pg0cj-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap"},Cr=function(e){return qt("span",L({css:Or},e))},Sr={guidance:function(e){var t=e.isSearchable,n=e.isMulti,r=e.tabSelectsValue,o=e.context,i=e.isInitialFocus;switch(o){case"menu":return"Use Up and Down to choose options, press Enter to select the currently focused option, press Escape to exit the menu".concat(r?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(e["aria-label"]||"Select"," is focused ").concat(t?",type to refine list":"",", press Down to open the menu, ").concat(n?" press left to focus selected values":""):"";case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value";default:return""}},onChange:function(e){var t=e.action,n=e.label,r=void 0===n?"":n,o=e.labels,i=e.isDisabled;switch(t){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(r,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(o.length>1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,s=e.isDisabled,l=e.isSelected,u=e.isAppleDevice,c=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(c(a,n),".");if("menu"===t&&u){var d=s?" disabled":"",p="".concat(l?" selected":"").concat(d);return"".concat(i).concat(p,", ").concat(c(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},Ir=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,a=e.selectValue,s=e.selectProps,u=e.id,c=e.isAppleDevice,p=s.ariaLiveMessages,f=s.getOptionLabel,m=s.inputValue,h=s.isMulti,v=s.isOptionDisabled,g=s.isSearchable,b=s.menuIsOpen,y=s.options,x=s.screenReaderStatus,w=s.tabSelectsValue,O=s.isLoading,C=s["aria-label"],S=s["aria-live"],I=l(function(){return P(P({},Sr),p||{})},[p]),k=l(function(){var e,n="";if(t&&I.onChange){var r=t.option,o=t.options,i=t.removedValue,s=t.removedValues,l=t.value,u=i||r||(e=l,Array.isArray(e)?null:e),c=u?f(u):"",d=o||s||void 0,p=d?d.map(f):[],m=P({isDisabled:u&&v(u,a),label:c,labels:p},t);n=I.onChange(m)}return n},[t,I,v,a,f]),E=l(function(){var e="",t=n||r,i=!!(n&&a&&a.includes(n));if(t&&I.onFocus){var s={focused:t,label:f(t),isDisabled:v(t,a),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:a,isAppleDevice:c};e=I.onFocus(s)}return e},[n,r,f,v,I,o,a,c]),M=l(function(){var e="";if(b&&y.length&&!O&&I.onFilter){var t=x({count:o.length});e=I.onFilter({inputValue:m,resultsMessage:t})}return e},[o,m,b,I,y,x,O]),T="initial-input-focus"===(null==t?void 0:t.action),j=l(function(){var e="";if(I.guidance){var t=r?"value":b?"menu":"input";e=I.guidance({"aria-label":C,context:t,isDisabled:n&&v(n,a),isMulti:h,isSearchable:g,tabSelectsValue:w,isInitialFocus:T})}return e},[C,n,r,h,v,g,b,I,a,w,T]),V=qt(d,null,qt("span",{id:"aria-selection"},k),qt("span",{id:"aria-focused"},E),qt("span",{id:"aria-results"},M),qt("span",{id:"aria-guidance"},j));return qt(d,null,qt(Cr,{id:u},T&&V),qt(Cr,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!T&&V))},kr=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],Er=new RegExp("["+kr.map(function(e){return e.letters}).join("")+"]","g"),Pr={},Mr=0;Mr<kr.length;Mr++)for(var Tr=kr[Mr],jr=0;jr<Tr.letters.length;jr++)Pr[Tr.letters[jr]]=Tr.base;var Vr=function(e){return e.replace(Er,function(e){return Pr[e]})},Rr=function(e,t){void 0===t&&(t=wr);var n=null;function r(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var i=e.apply(this,r);return n={lastResult:i,lastArgs:r,lastThis:this},i}return r.clear=function(){n=null},r}(Vr),Lr=function(e){return e.replace(/^\s+|\s+$/g,"")},Fr=function(e){return"".concat(e.label," ").concat(e.value)},Dr=["innerRef"];function Nr(e){var t=e.innerRef,n=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=Object.entries(e).filter(function(e){var t=j(e,1)[0];return!n.includes(t)});return o.reduce(function(e,t){var n=j(t,2),r=n[0],o=n[1];return e[r]=o,e},{})}(V(e,Dr),"onExited","in","enter","exit","appear");return qt("input",L({ref:t},n,{css:Xt({label:"dummyInput",background:0,border:0,caretColor:"transparent",fontSize:"inherit",gridArea:"1 / 1 / 2 / 3",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(.01)"},"","")}))}var Ar=["boxSizing","height","overflow","paddingRight","position"],$r={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Hr(e){e.cancelable&&e.preventDefault()}function Ur(e){e.stopPropagation()}function _r(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function Br(){return"ontouchstart"in window||navigator.maxTouchPoints}var zr=!("undefined"==typeof window||!window.document||!window.document.createElement),Wr=0,Gr={capture:!1,passive:!1};var Yr=function(e){var t=e.target;return t.ownerDocument.activeElement&&t.ownerDocument.activeElement.blur()},qr={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Xr(e){var t=e.children,n=e.lockEnabled,o=e.captureEnabled,i=function(e){var t=e.isEnabled,n=e.onBottomArrive,o=e.onBottomLeave,i=e.onTopArrive,a=e.onTopLeave,l=s(!1),u=s(!1),c=s(0),d=s(null),f=r(function(e,t){if(null!==d.current){var r=d.current,s=r.scrollTop,c=r.scrollHeight,p=r.clientHeight,f=d.current,m=t>0,h=c-p-s,v=!1;h>t&&l.current&&(o&&o(e),l.current=!1),m&&u.current&&(a&&a(e),u.current=!1),m&&t>h?(n&&!l.current&&n(e),f.scrollTop=c,v=!0,l.current=!0):!m&&-t>s&&(i&&!u.current&&i(e),f.scrollTop=0,v=!0,u.current=!0),v&&function(e){e.cancelable&&e.preventDefault(),e.stopPropagation()}(e)}},[n,o,i,a]),m=r(function(e){f(e,e.deltaY)},[f]),h=r(function(e){c.current=e.changedTouches[0].clientY},[]),v=r(function(e){var t=c.current-e.changedTouches[0].clientY;f(e,t)},[f]),g=r(function(e){if(e){var t=!!An&&{passive:!1};e.addEventListener("wheel",m,t),e.addEventListener("touchstart",h,t),e.addEventListener("touchmove",v,t)}},[v,h,m]),b=r(function(e){e&&(e.removeEventListener("wheel",m,!1),e.removeEventListener("touchstart",h,!1),e.removeEventListener("touchmove",v,!1))},[v,h,m]);return p(function(){if(t){var e=d.current;return g(e),function(){b(e)}}},[t,g,b]),function(e){d.current=e}}({isEnabled:void 0===o||o,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),a=function(e){var t=e.isEnabled,n=e.accountForScrollbars,o=void 0===n||n,i=s({}),a=s(null),l=r(function(e){if(zr){var t=document.body,n=t&&t.style;if(o&&Ar.forEach(function(e){var t=n&&n[e];i.current[e]=t}),o&&Wr<1){var r=parseInt(i.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,s=window.innerWidth-a+r||0;Object.keys($r).forEach(function(e){var t=$r[e];n&&(n[e]=t)}),n&&(n.paddingRight="".concat(s,"px"))}t&&Br()&&(t.addEventListener("touchmove",Hr,Gr),e&&(e.addEventListener("touchstart",_r,Gr),e.addEventListener("touchmove",Ur,Gr))),Wr+=1}},[o]),u=r(function(e){if(zr){var t=document.body,n=t&&t.style;Wr=Math.max(Wr-1,0),o&&Wr<1&&Ar.forEach(function(e){var t=i.current[e];n&&(n[e]=t)}),t&&Br()&&(t.removeEventListener("touchmove",Hr,Gr),e&&(e.removeEventListener("touchstart",_r,Gr),e.removeEventListener("touchmove",Ur,Gr)))}},[o]);return p(function(){if(t){var e=a.current;return l(e),function(){u(e)}}},[t,l,u]),function(e){a.current=e}}({isEnabled:n});return qt(d,null,n&&qt("div",{onClick:Yr,css:qr}),t(function(e){i(e),a(e)}))}var Kr={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Jr=function(e){var t=e.name,n=e.onFocus;return qt("input",{required:!0,name:t,tabIndex:-1,"aria-hidden":"true",onFocus:n,css:Kr,value:"",onChange:function(){}})};function Zr(e){var t;return"undefined"!=typeof window&&null!=window.navigator&&e.test((null===(t=window.navigator.userAgentData)||void 0===t?void 0:t.platform)||window.navigator.platform)}function Qr(){return Zr(/^Mac/i)}function eo(){return Zr(/^iPhone/i)||Zr(/^iPad/i)||Qr()&&navigator.maxTouchPoints>1}var to,no={clearIndicator:ar,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return P({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:ir,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return P({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return P({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return P(P({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},mr),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return P({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:Jn,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,s=o.colors;return P((k(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),k(n,"position","absolute"),k(n,"width","100%"),k(n,"zIndex",1),n),t?{}:{backgroundColor:s.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return P({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return P({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return P({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return P({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:Kn,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,s=i.colors;return P({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?s.primary:r?s.primary25:"transparent",color:n?s.neutral20:o?s.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?s.primary:s.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return P({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return P({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return P({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}},ro={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},oo={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:Ln(),captureMenuScroll:!Ln(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:function(e,t){if(e.data.__isNew__)return!0;var n=P({ignoreCase:!0,ignoreAccents:!0,stringify:Fr,trim:!0,matchFrom:"any"},to),r=n.ignoreCase,o=n.ignoreAccents,i=n.stringify,a=n.trim,s=n.matchFrom,l=a?Lr(t):t,u=a?Lr(i(e)):i(e);return r&&(l=l.toLowerCase(),u=u.toLowerCase()),o&&(l=Rr(l),u=Vr(u)),"start"===s?u.substr(0,l.length)===l:u.indexOf(l)>-1},formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function io(e,t,n,r){return{type:"option",data:t,isDisabled:mo(e,t,n),isSelected:ho(e,t,n),label:po(e,t),value:fo(e,t),index:r}}function ao(e,t){return e.options.map(function(n,r){if("options"in n){var o=n.options.map(function(n,r){return io(e,n,t,r)}).filter(function(t){return uo(e,t)});return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=io(e,n,t,r);return uo(e,i)?i:void 0}).filter($n)}function so(e){return e.reduce(function(e,t){return"group"===t.type?e.push.apply(e,H(t.options.map(function(e){return e.data}))):e.push(t.data),e},[])}function lo(e,t){return e.reduce(function(e,n){return"group"===n.type?e.push.apply(e,H(n.options.map(function(e){return{data:e.data,id:"".concat(t,"-").concat(n.index,"-").concat(e.index)}}))):e.push({data:n.data,id:"".concat(t,"-").concat(n.index)}),e},[])}function uo(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,s=t.value;return(!go(e)||!i)&&vo(e,{label:a,value:s,data:o},r)}var co=function(e,t){var n;return(null===(n=e.find(function(e){return e.data===t}))||void 0===n?void 0:n.id)||null},po=function(e,t){return e.getOptionLabel(t)},fo=function(e,t){return e.getOptionValue(t)};function mo(e,t,n){return"function"==typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function ho(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"==typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=fo(e,t);return n.some(function(t){return fo(e,t)===r})}function vo(e,t,n){return!e.filterOption||e.filterOption(t,n)}var go=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},bo=1,yo=function(){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(n,c);var t=function(e){var t=A();return function(){var n,r=N(e);if(t){var o=N(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return $(this,n)}}(n);function n(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedOptionId:null,focusableOptionsWithIds:[],focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0,instancePrefix:"",isAppleDevice:!1},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,s=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:s}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,s=o&&r.isOptionSelected(e,a),l=r.isOptionDisabled(e,a);if(s){var u=r.getOptionValue(e);r.setValue(a.filter(function(e){return r.getOptionValue(e)!==u}),"deselect-option",e)}else{if(l)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(H(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter(function(e){return r.getOptionValue(e)!==o}),a=Hn(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(Hn(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=Hn(e,o,o[0]||null);n&&r.onChange(i,{action:"pop-value",removedValue:n})},r.getFocusedOptionId=function(e){return co(r.state.focusableOptionsWithIds,e)},r.getFocusableOptionsWithIds=function(){return lo(ao(r.props,r.state.selectValue),r.getElementId("option"))},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return In.apply(void 0,[r.props.classNamePrefix].concat(t))},r.getOptionLabel=function(e){return po(r.props,e)},r.getOptionValue=function(e){return fo(r.props,e)},r.getStyles=function(e,t){var n=r.props.unstyled,o=no[e](t,n);o.boxSizing="border-box";var i=r.props.styles[e];return i?i(o,t):o},r.getClassNames=function(e,t){var n,o;return null===(n=(o=r.props.classNames)[e])||void 0===n?void 0:n.call(o,t)},r.getElementId=function(e){return"".concat(r.state.instancePrefix,"-").concat(e)},r.getComponents=function(){return e=r.props,P(P({},br),e.components);var e},r.buildCategorizedOptions=function(){return ao(r.props,r.state.selectValue)},r.getCategorizedOptions=function(){return r.props.menuIsOpen?r.buildCategorizedOptions():[]},r.buildFocusableOptions=function(){return so(r.buildCategorizedOptions())},r.getFocusableOptions=function(){return r.props.menuIsOpen?r.buildFocusableOptions():[]},r.ariaOnChange=function(e,t){r.setState({ariaSelection:P({value:e},t)})},r.onMenuMouseDown=function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())},r.onMenuMouseMove=function(e){r.blockOptionHover=!1},r.onControlMouseDown=function(e){if(!e.defaultPrevented){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName&&e.preventDefault()}},r.onDropdownIndicatorMouseDown=function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.setState({inputIsHiddenAfterUpdate:!n}),r.onMenuClose()):r.openMenu("first"),e.preventDefault()}},r.onClearIndicatorMouseDown=function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.preventDefault(),r.openAfterFocus=!1,"touchend"===e.type?r.focusInput():setTimeout(function(){return r.focusInput()}))},r.onScroll=function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&Mn(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()},r.onCompositionStart=function(){r.isComposing=!0},r.onCompositionEnd=function(){r.isComposing=!1},r.onTouchStart=function(e){var t=e.touches,n=t&&t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)},r.onTouchMove=function(e){var t=e.touches,n=t&&t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){if(!r.blockOptionHover&&r.state.focusedOption!==e){var t=r.getFocusableOptions().indexOf(e);r.setState({focusedOption:e,focusedOptionId:t>-1?r.getFocusedOptionId(e):null})}},r.shouldHideSelectedOptions=function(){return go(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,l=t.isDisabled,u=t.menuIsOpen,c=t.onKeyDown,d=t.tabSelectsValue,p=t.openMenuOnFocus,f=r.state,m=f.focusedOption,h=f.focusedValue,v=f.selectValue;if(!(l||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(h)r.removeValue(h);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!u||!d||!m||p&&r.isOptionSelected(m,v))return;r.selectOption(m);break;case"Enter":if(229===e.keyCode)break;if(u){if(!m)return;if(r.isComposing)return;r.selectOption(m);break}return;case"Escape":u?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!u){r.openMenu("first");break}if(!m)return;r.selectOption(m);break;case"ArrowUp":u?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":u?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!u)return;r.focusOption("pageup");break;case"PageDown":if(!u)return;r.focusOption("pagedown");break;case"Home":if(!u)return;r.focusOption("first");break;case"End":if(!u)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.state.instancePrefix="react-select-"+(r.props.instanceId||++bo),r.state.selectValue=kn(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.getFocusableOptionsWithIds(),i=r.buildFocusableOptions(),a=i.indexOf(r.state.selectValue[0]);r.state.focusableOptionsWithIds=o,r.state.focusedOption=i[a],r.state.focusedOptionId=co(o,i[a])}return r}return function(e,t,n){t&&F(e.prototype,t),n&&F(e,n),Object.defineProperty(e,"prototype",{writable:!1})}(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&Rn(this.menuListRef,this.focusedOptionRef),(Qr()||eo())&&this.setState({isAppleDevice:!0})}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(Rn(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var s=i.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a],focusedOptionId:this.getFocusedOptionId(i[a])},function(){return t.onMenuOpen()})}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o<i&&(a=o+1)}this.setState({inputIsHidden:-1!==a,focusedValue:n[a]})}}}},{key:"focusOption",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null,focusedOptionId:this.getFocusedOptionId(r[o])})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(ro):P(P({},ro),this.props.theme):ro}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,s=this.props,l=s.isMulti,u=s.isRtl,c=s.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:l,isRtl:u,options:c,selectOption:i,selectProps:s,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return mo(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return ho(this.props,e,t)}},{key:"filterOption",value:function(e,t){return vo(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var t=this.props,n=t.isDisabled,r=t.isSearchable,o=t.inputId,i=t.inputValue,a=t.tabIndex,s=t.form,l=t.menuIsOpen,u=t.required,c=this.getComponents().Input,d=this.state,p=d.inputIsHidden,f=d.ariaSelection,m=this.commonProps,h=o||this.getElementId("input"),v=P(P(P({"aria-autocomplete":"list","aria-expanded":l,"aria-haspopup":!0,"aria-errormessage":this.props["aria-errormessage"],"aria-invalid":this.props["aria-invalid"],"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-required":u,role:"combobox","aria-activedescendant":this.state.isAppleDevice?void 0:this.state.focusedOptionId||""},l&&{"aria-controls":this.getElementId("listbox")}),!r&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null==f?void 0:f.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return r?e.createElement(c,L({},m,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:h,innerRef:this.getInputRef,isDisabled:n,isHidden:p,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:a,form:s,type:"text",value:i},v)):e.createElement(Nr,L({id:h,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Cn,onFocus:this.onInputFocus,disabled:n,tabIndex:a,inputMode:"none",form:s,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,n=this.getComponents(),r=n.MultiValue,o=n.MultiValueContainer,i=n.MultiValueLabel,a=n.MultiValueRemove,s=n.SingleValue,l=n.Placeholder,u=this.commonProps,c=this.props,d=c.controlShouldRenderValue,p=c.isDisabled,f=c.isMulti,m=c.inputValue,h=c.placeholder,v=this.state,g=v.selectValue,b=v.focusedValue,y=v.isFocused;if(!this.hasValue()||!d)return m?null:e.createElement(l,L({},u,{key:"placeholder",isDisabled:p,isFocused:y,innerProps:{id:this.getElementId("placeholder")}}),h);if(f)return g.map(function(n,s){var l=n===b,c="".concat(t.getOptionLabel(n),"-").concat(t.getOptionValue(n));return e.createElement(r,L({},u,{components:{Container:o,Label:i,Remove:a},isFocused:l,isDisabled:p,key:c,index:s,removeProps:{onClick:function(){return t.removeValue(n)},onTouchEnd:function(){return t.removeValue(n)},onMouseDown:function(e){e.preventDefault()}},data:n}),t.formatOptionLabel(n,"value"))});if(m)return null;var x=g[0];return e.createElement(s,L({},u,{data:x,isDisabled:p}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.getComponents().ClearIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!this.isClearable()||!t||o||!this.hasValue()||i)return null;var s={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,L({},n,{innerProps:s,isFocused:a}))}},{key:"renderLoadingIndicator",value:function(){var t=this.getComponents().LoadingIndicator,n=this.commonProps,r=this.props,o=r.isDisabled,i=r.isLoading,a=this.state.isFocused;if(!t||!i)return null;return e.createElement(t,L({},n,{innerProps:{"aria-hidden":"true"},isDisabled:o,isFocused:a}))}},{key:"renderIndicatorSeparator",value:function(){var t=this.getComponents(),n=t.DropdownIndicator,r=t.IndicatorSeparator;if(!n||!r)return null;var o=this.commonProps,i=this.props.isDisabled,a=this.state.isFocused;return e.createElement(r,L({},o,{isDisabled:i,isFocused:a}))}},{key:"renderDropdownIndicator",value:function(){var t=this.getComponents().DropdownIndicator;if(!t)return null;var n=this.commonProps,r=this.props.isDisabled,o=this.state.isFocused,i={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return e.createElement(t,L({},n,{innerProps:i,isDisabled:r,isFocused:o}))}},{key:"renderMenu",value:function(){var t=this,n=this.getComponents(),r=n.Group,o=n.GroupHeading,i=n.Menu,a=n.MenuList,s=n.MenuPortal,l=n.LoadingMessage,u=n.NoOptionsMessage,c=n.Option,d=this.commonProps,p=this.state.focusedOption,f=this.props,m=f.captureMenuScroll,h=f.inputValue,v=f.isLoading,g=f.loadingMessage,b=f.minMenuHeight,y=f.maxMenuHeight,x=f.menuIsOpen,w=f.menuPlacement,O=f.menuPosition,C=f.menuPortalTarget,S=f.menuShouldBlockScroll,I=f.menuShouldScrollIntoView,k=f.noOptionsMessage,E=f.onMenuScrollToTop,P=f.onMenuScrollToBottom;if(!x)return null;var M,T=function(n,r){var o=n.type,i=n.data,a=n.isDisabled,s=n.isSelected,l=n.label,u=n.value,f=p===i,m=a?void 0:function(){return t.onOptionHover(i)},h=a?void 0:function(){return t.selectOption(i)},v="".concat(t.getElementId("option"),"-").concat(r),g={id:v,onClick:h,onMouseMove:m,onMouseOver:m,tabIndex:-1,role:"option","aria-selected":t.state.isAppleDevice?void 0:s};return e.createElement(c,L({},d,{innerProps:g,data:i,isDisabled:a,isSelected:s,key:v,label:l,type:o,value:u,isFocused:f,innerRef:f?t.getFocusedOptionRef:void 0}),t.formatOptionLabel(n.data,"menu"))};if(this.hasOptions())M=this.getCategorizedOptions().map(function(n){if("group"===n.type){var i=n.data,a=n.options,s=n.index,l="".concat(t.getElementId("group"),"-").concat(s),u="".concat(l,"-heading");return e.createElement(r,L({},d,{key:l,data:i,options:a,Heading:o,headingProps:{id:u,data:n.data},label:t.formatGroupLabel(n.data)}),n.options.map(function(e){return T(e,"".concat(s,"-").concat(e.index))}))}if("option"===n.type)return T(n,"".concat(n.index))});else if(v){var j=g({inputValue:h});if(null===j)return null;M=e.createElement(l,d,j)}else{var V=k({inputValue:h});if(null===V)return null;M=e.createElement(u,d,V)}var R={minMenuHeight:b,maxMenuHeight:y,menuPlacement:w,menuPosition:O,menuShouldScrollIntoView:I},F=e.createElement(Yn,L({},d,R),function(n){var r=n.ref,o=n.placerProps,s=o.placement,l=o.maxHeight;return e.createElement(i,L({},d,R,{innerRef:r,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:v,placement:s}),e.createElement(Xr,{captureEnabled:m,onTopArrive:E,onBottomArrive:P,lockEnabled:S},function(n){return e.createElement(a,L({},d,{innerRef:function(e){t.getMenuListRef(e),n(e)},innerProps:{role:"listbox","aria-multiselectable":d.isMulti,id:t.getElementId("listbox")},isLoading:v,maxHeight:l,focusedOption:p}),M)}))});return C||"fixed"===O?e.createElement(s,L({},d,{appendTo:C,controlElement:this.controlRef,menuPlacement:w,menuPosition:O}),F):F}},{key:"renderFormField",value:function(){var t=this,n=this.props,r=n.delimiter,o=n.isDisabled,i=n.isMulti,a=n.name,s=n.required,l=this.state.selectValue;if(s&&!this.hasValue()&&!o)return e.createElement(Jr,{name:a,onFocus:this.onValueInputFocus});if(a&&!o){if(i){if(r){var u=l.map(function(e){return t.getOptionValue(e)}).join(r);return e.createElement("input",{name:a,type:"hidden",value:u})}var c=l.length>0?l.map(function(n,r){return e.createElement("input",{key:"i-".concat(r),name:a,type:"hidden",value:t.getOptionValue(n)})}):e.createElement("input",{name:a,type:"hidden",value:""});return e.createElement("div",null,c)}var d=l[0]?this.getOptionValue(l[0]):"";return e.createElement("input",{name:a,type:"hidden",value:d})}}},{key:"renderLiveRegion",value:function(){var t=this.commonProps,n=this.state,r=n.ariaSelection,o=n.focusedOption,i=n.focusedValue,a=n.isFocused,s=n.selectValue,l=this.getFocusableOptions();return e.createElement(Ir,L({},t,{id:this.getElementId("live-region"),ariaSelection:r,focusedOption:o,focusedValue:i,isFocused:a,selectValue:s,focusableOptions:l,isAppleDevice:this.state.isAppleDevice}))}},{key:"render",value:function(){var t=this.getComponents(),n=t.Control,r=t.IndicatorsContainer,o=t.SelectContainer,i=t.ValueContainer,a=this.props,s=a.className,l=a.id,u=a.isDisabled,c=a.menuIsOpen,d=this.state.isFocused,p=this.commonProps=this.getCommonProps();return e.createElement(o,L({},p,{className:s,innerProps:{id:l,onKeyDown:this.onKeyDown},isDisabled:u,isFocused:d}),this.renderLiveRegion(),e.createElement(n,L({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:u,isFocused:d,menuIsOpen:c}),e.createElement(i,L({},p,{isDisabled:u}),this.renderPlaceholderOrValue(),this.renderInput()),e.createElement(r,L({},p,{isDisabled:u}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,s=t.prevWasFocused,l=t.instancePrefix,u=e.options,c=e.value,d=e.menuIsOpen,p=e.inputValue,f=e.isMulti,m=kn(c),h={};if(n&&(c!==n.value||u!==n.options||d!==n.menuIsOpen||p!==n.inputValue)){var v=d?function(e,t){return so(ao(e,t))}(e,m):[],g=d?lo(ao(e,m),"".concat(l,"-option")):[],b=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r<t.length)return t[r]}return null}(t,m):null,y=function(e,t){var n=e.focusedOption;return n&&t.indexOf(n)>-1?n:t[0]}(t,v);h={selectValue:m,focusedOption:y,focusedOptionId:co(g,y),focusableOptionsWithIds:g,focusedValue:b,clearFocusValueOnUpdate:!1}}var x=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},w=i,O=a&&s;return a&&!O&&(w={value:Hn(f,m,m[0]||null),options:m,action:"initial-input-focus"},O=!s),"initial-input-focus"===(null==i?void 0:i.action)&&(w=null),P(P(P({},h),x),{},{prevProps:e,ariaSelection:w,prevWasFocused:O})}}]),n}();yo.defaultProps=oo;var xo=o(function(t,o){var i=function(e){var t=e.defaultInputValue,o=void 0===t?"":t,i=e.defaultMenuIsOpen,a=void 0!==i&&i,s=e.defaultValue,l=void 0===s?null:s,u=e.inputValue,c=e.menuIsOpen,d=e.onChange,p=e.onInputChange,f=e.onMenuClose,m=e.onMenuOpen,h=e.value,v=V(e,R),g=j(n(void 0!==u?u:o),2),b=g[0],y=g[1],x=j(n(void 0!==c?c:a),2),w=x[0],O=x[1],C=j(n(void 0!==h?h:l),2),S=C[0],I=C[1],k=r(function(e,t){"function"==typeof d&&d(e,t),I(e)},[d]),E=r(function(e,t){var n;"function"==typeof p&&(n=p(e,t)),y(void 0!==n?n:e)},[p]),M=r(function(){"function"==typeof m&&m(),O(!0)},[m]),T=r(function(){"function"==typeof f&&f(),O(!1)},[f]),L=void 0!==u?u:b,F=void 0!==c?c:w,D=void 0!==h?h:S;return P(P({},v),{},{inputValue:L,menuIsOpen:F,onChange:k,onInputChange:E,onMenuClose:T,onMenuOpen:M,value:D})}(t);return e.createElement(yo,L({ref:o},i))}),wo=xo;const Oo=({logoUrl:e,alt:t})=>y.jsx("img",{src:e,alt:t,className:"w-8 h-8 flex-shrink-0 object-contain",onError:e=>{const n=e.target;n.style.display="none";const r=document.createElement("div");r.className="w-8 h-8 rounded-full flex items-center justify-center font-bold text-xs flex-shrink-0 bg-gray-200",r.textContent=t.substring(0,2).toUpperCase(),n.parentNode?.appendChild(r)}}),Co=[{value:"mtn",label:"MTN",logoUrl:"https://payments-web.anmgw.com/assets/images/mtn.svg"},{value:"vodafone",label:"Telecel",logoUrl:"https://payments-web.anmgw.com/assets/images/telecel.svg"},{value:"airteltigo",label:"AirtelTigo",logoUrl:"https://payments-web.anmgw.com/assets/images/at.svg"}],So=e=>y.jsx(br.Option,{...e,children:y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(Oo,{logoUrl:e.data.logoUrl,alt:e.data.label}),y.jsx("span",{className:"font-medium",children:e.data.label})]})}),Io=e=>y.jsx(br.SingleValue,{...e,children:y.jsxs("div",{className:"flex items-center gap-3",children:[y.jsx(Oo,{logoUrl:e.data.logoUrl,alt:e.data.label}),y.jsx("span",{className:"font-medium",children:e.data.label})]})}),ko=({selectedNetwork:e,onSelect:n,disabled:r=!1,primaryColor:o})=>{const i=o||"#3B82F6",a=Co.find(t=>t.value===e),s={control:(t,n)=>({...t,minHeight:"48px",borderWidth:"2px",borderColor:n.isFocused||e?i:"#D1D5DB",boxShadow:n.isFocused?`0 0 0 3px ${i}33`:"none",outline:"none","&:hover":{borderColor:n.isFocused||e?i:"#9CA3AF"},opacity:r?.5:1,cursor:r?"not-allowed":"pointer",backgroundColor:r?"#F9FAFB":"white"}),menu:e=>({...e,borderRadius:"8px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",border:`1px solid ${i}33`,zIndex:9999,position:"absolute"}),menuList:e=>({...e,padding:"4px",maxHeight:"200px",overflowY:"auto",overflowX:"hidden"}),menuPortal:e=>({...e,zIndex:9999}),option:(e,t)=>({...e,backgroundColor:t.isSelected?i:t.isFocused?`${i}20`:"white",color:t.isSelected?"white":"#111827",cursor:"pointer","&:active":{backgroundColor:t.isSelected?i:`${i}40`}}),placeholder:e=>({...e,color:"#9CA3AF"}),singleValue:e=>({...e,color:"#111827"}),indicatorSeparator:()=>({display:"none"}),dropdownIndicator:e=>({...e,color:"#6B7280","&:hover":{color:"#111827"}})},l=t.useMemo(()=>`network-selector-${Math.random().toString(36).substr(2,9)}`,[]);return y.jsxs(y.Fragment,{children:[y.jsx("style",{children:`\n #${l} .react-select__control--is-focused {\n border-color: ${i} !important;\n box-shadow: 0 0 0 3px ${i}33 !important;\n }\n #${l} .react-select__control:hover:not(.react-select__control--is-disabled) {\n border-color: ${e?i:"#9CA3AF"} !important;\n }\n `}),y.jsxs("div",{id:l,className:"w-full",children:[y.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Select Network"}),y.jsx(wo,{value:a||null,onChange:e=>{e&&n(e.value)},options:Co,isDisabled:r,placeholder:"-- Select Network --",components:{Option:So,SingleValue:Io},styles:s,isSearchable:!1,menuPortalTarget:"undefined"!=typeof document?document.body:void 0,menuPosition:"fixed",className:"react-select-container",classNamePrefix:"react-select"})]})]})},Eo=({length:e=4,onComplete:t,onResend:r,disabled:o=!1,loading:i=!1,error:a,primaryColor:s="#3B82F6"})=>{const[l,u]=n(new Array(e).fill("")),[c,d]=n(0);p(()=>{let e;return c>0&&(e=setTimeout(()=>d(c-1),1e3)),()=>clearTimeout(e)},[c]);const f=n=>{if(o||i)return;n.preventDefault();const r=n.clipboardData.getData("text/plain").replace(/\D/g,"");if(r.length===e){const n=r.split("");u(n),t(r);const o=document.getElementById("otp-input-"+(e-1));o?.focus()}};return y.jsxs("div",{className:"w-full",children:[y.jsx("div",{className:"flex justify-center gap-2 mb-4",children:l.map((n,r)=>y.jsx("input",{id:`otp-input-${r}`,type:"text",inputMode:"numeric",maxLength:1,value:n,onChange:n=>((n,r)=>{if(o||i)return;if(!/^\d*$/.test(r))return;const a=[...l];if(a[n]=r,u(a),r&&n<e-1){const e=document.getElementById(`otp-input-${n+1}`);e?.focus()}const s=a.join("");s.length===e&&t(s)})(r,n.target.value),onKeyDown:t=>((t,n)=>{if(!o&&!i){if("Backspace"===n.key)if(l[t]){const e=[...l];e[t]="",u(e)}else if(t>0){const e=document.getElementById("otp-input-"+(t-1));e?.focus()}if("ArrowLeft"===n.key&&t>0){const e=document.getElementById("otp-input-"+(t-1));e?.focus()}if("ArrowRight"===n.key&&t<e-1){const e=document.getElementById(`otp-input-${t+1}`);e?.focus()}}})(r,t),onPaste:f,disabled:o||i,className:`w-12 h-12 md:w-14 md:h-14 text-center text-lg md:text-xl font-semibold border-2 rounded-lg focus:outline-none focus:ring-2 transition-all ${a?"border-red-500 bg-red-50":"border-gray-300 bg-white"} ${o||i?"opacity-50 cursor-not-allowed":""}`,style:{...a?{}:{"--focus-ring-color":s,"--focus-border-color":s}},onFocus:e=>{a||o||i||(e.target.style.borderColor=s,e.target.style.boxShadow=`0 0 0 3px ${s}33`)},onBlur:e=>{a||(e.target.style.borderColor="#D1D5DB",e.target.style.boxShadow="")}},r))}),a&&y.jsx("p",{className:"text-red-500 text-sm text-center mb-4",children:a}),y.jsx("div",{className:"text-center",children:y.jsx("button",{type:"button",onClick:()=>{c>0||o||i||(r(),d(60))},disabled:c>0||o||i,className:"text-sm "+(c>0||o||i?"opacity-50 cursor-not-allowed":""),style:{color:s},onMouseEnter:e=>{e.currentTarget.disabled||(e.currentTarget.style.opacity="0.8")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:c>0?`Resend OTP in ${c}s`:"Resend OTP"})})]})},Po=({paymentId:e,showTimeoutWarning:t=!1,primaryColor:n="#3B82F6"})=>y.jsxs("div",{className:"flex flex-col items-center justify-center py-8",children:[y.jsx("div",{className:"relative w-16 h-16 mb-4",children:y.jsx("div",{className:"absolute inset-0 border-4 rounded-full animate-spin",style:{borderColor:`${n}33`,borderTopColor:n}})}),y.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Processing Payment"}),y.jsx("div",{className:"rounded-lg p-3 mb-4 max-w-sm border",style:{backgroundColor:`${n}15`,borderColor:`${n}40`},children:y.jsxs("p",{className:"text-sm text-center font-medium",style:{color:n},children:["Please wait for a prompt or go to ",y.jsx("strong",{children:"my approvals"})," to complete the transaction"]})}),t&&y.jsx("p",{className:"text-xs text-amber-600 text-center mt-2",children:"This is taking longer than usual. You'll be notified when it completes."}),y.jsxs("p",{className:"text-xs text-gray-400 mt-2",children:["Payment ID: ",e]})]}),Mo=({success:e,payment:t,redirectUrl:r,onRedirect:o,primaryColor:i="#3B82F6"})=>{const[a,s]=n(r?5:0);return p(()=>{if(r&&a>0){const e=setTimeout(()=>{s(a-1)},1e3);return()=>clearTimeout(e)}if(r&&0===a){const e=setTimeout(()=>{o()},100);return()=>clearTimeout(e)}},[a,r,o]),y.jsx("div",{className:"flex flex-col items-center justify-center py-8",children:e?y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"w-16 h-16 bg-green-100 rounded-full flex items-center justify-center mb-4",children:y.jsx("svg",{className:"w-8 h-8 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),y.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Payment Successful!"}),t&&y.jsxs("p",{className:"text-gray-600 text-sm mb-2",children:["Amount: ",t.currency," ","number"==typeof t.amount?t.amount.toFixed(2):"string"==typeof t.amount?Number.parseFloat(t.amount).toFixed(2):t.amount]}),r?y.jsx("p",{className:"text-gray-500 text-xs mb-4",children:a>0?`Redirecting in ${a} seconds...`:"Redirecting..."}):y.jsx("button",{onClick:o,className:"mt-4 px-6 py-2 text-white rounded-lg transition-all",style:{backgroundColor:i},onMouseEnter:e=>{e.currentTarget.style.opacity="0.9"},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:"Close"})]}):y.jsxs(y.Fragment,{children:[y.jsx("div",{className:"w-16 h-16 bg-red-100 rounded-full flex items-center justify-center mb-4",children:y.jsx("svg",{className:"w-8 h-8 text-red-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),y.jsx("h3",{className:"text-xl font-semibold text-gray-800 mb-2",children:"Payment Failed"}),y.jsx("p",{className:"text-gray-600 text-sm mb-4",children:"Your payment could not be processed. Please try again."}),r?y.jsx("p",{className:"text-gray-500 text-xs mb-4",children:a>0?`Redirecting in ${a} seconds...`:"Redirecting..."}):y.jsx("button",{onClick:o,className:"mt-4 px-6 py-2 text-white rounded-lg transition-all",style:{backgroundColor:i},onMouseEnter:e=>{e.currentTarget.style.opacity="0.9"},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:"Close"})]})})},To=({paymentId:e,redirectUrl:t,onRedirect:r,onContinueWaiting:o,primaryColor:i="#3B82F6"})=>{const[a,s]=n(5);return p(()=>{if(!t)return;const e=setInterval(()=>{s(t=>t<=1?(clearInterval(e),r(),0):t-1)},1e3);return()=>clearInterval(e)},[t,r]),y.jsxs("div",{className:"mt-6 p-4 rounded-lg border",style:{backgroundColor:`${i}08`,borderColor:`${i}30`},children:[y.jsx("h4",{className:"text-sm font-semibold mb-2",style:{color:i},children:"Payment Still Processing"}),y.jsx("p",{className:"text-sm mb-4",style:{color:`${i}DD`},children:"Your payment is still being processed. You'll be notified via webhook when it completes."}),y.jsx("div",{className:"flex gap-3",children:t?y.jsxs(y.Fragment,{children:[y.jsxs("button",{onClick:r,className:"flex-1 py-2 px-4 text-white rounded-lg text-sm font-medium transition-colors",style:{backgroundColor:i},onMouseEnter:e=>{e.currentTarget.style.opacity="0.9"},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:["Return Now ",a>0&&`(${a}s)`]}),y.jsx("button",{onClick:o,className:"flex-1 py-2 px-4 bg-white border rounded-lg text-sm font-medium transition-colors",style:{borderColor:`${i}40`,color:i},onMouseEnter:e=>{e.currentTarget.style.backgroundColor=`${i}10`},onMouseLeave:e=>{e.currentTarget.style.backgroundColor="white"},children:"Continue Waiting"})]}):y.jsx("button",{onClick:o,className:"w-full py-2 px-4 text-white rounded-lg text-sm font-medium transition-colors",style:{backgroundColor:i},onMouseEnter:e=>{e.currentTarget.style.opacity="0.9"},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:"Continue Waiting"})}),y.jsxs("p",{className:"text-xs mt-3 text-gray-500 text-center",children:["Payment ID: ",e]})]})},jo=({config:e,isOpen:t,onClose:r})=>{const[o,i]=n("phone-input"),[a,s]=n(""),[l,u]=n(""),[c,d]=n(),[f,m]=n(""),[h,v]=n(null),[g,b]=n(null),[S,I]=n(!1),[k,E]=n(null),[P,M]=n(!1),[T,j]=n(!1),[V,R]=n(!1),[L,F]=n(0),D=new O({apiKey:e.apiKey,platformId:e.platformId,baseUrl:e.apiUrl});p(()=>{t&&e.platformId&&D.getPlatformInfo().then(e=>{if(e.logo_url){const t=new Image;t.onload=()=>{E(e.logo_url),M(!0)},t.onerror=()=>{M(!1)},t.src=e.logo_url}}).catch(e=>{console.debug("Failed to fetch platform logo:",e)})},[t,e.platformId,D]),p(()=>{const n=e.displayMode||"modal";if(t&&"modal"===n){const e=globalThis.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[t,e.displayMode]),p(()=>{t||(i("phone-input"),s(""),u(""),d(void 0),m(""),v(null),b(null),I(!1),E(null),M(!1),j(!1),R(!1),F(0))},[t]),p(()=>{if("verifying"===o&&f&&!T){let t=0;const n=15,r=7;j(!1),R(!1);const o=setInterval(async()=>{t++,t===r&&R(!0);try{const t=await D.getPaymentStatus(f);if(t.data){const n=t.data.status;"completed"===n?(v(t.data),clearInterval(o),R(!1),j(!1),e.onSuccess?.(t.data),i("success")):"failed"!==n&&"cancelled"!==n&&"expired"!==n||(clearInterval(o),R(!1),j(!1),e.onError?.({message:`Payment ${n}`}),i("failed"))}}catch(e){console.error("Error polling payment status:",e)}t>=n&&(clearInterval(o),j(!0),R(!1))},2e3);return()=>{clearInterval(o),R(!1)}}},[o,f,e,L,T]);const N=async()=>{if(l&&c){if(e.redirect_url&&!x(e.redirect_url))return b("Redirect URL must be a valid HTTPS URL"),void e.onError?.({message:"Redirect URL must be a valid HTTPS URL",code:"INVALID_REDIRECT_URL"});I(!0),b(null);try{const t=await D.createPayment({amount:e.amount,currency:e.currency||"GHS",payment_method:"mobile_money",phone_number:l,network:c,redirect_url:e.redirect_url,webhook_url:e.webhookUrl,order_id:e.orderId,metadata:e.metadata});if(!t.data?.payment_id)throw new Error("Failed to create payment");m(t.data.payment_id),t.data.otp_required?i("otp-input"):i("verifying")}catch(t){const n=t instanceof Error?t.message:"Failed to create payment";b(n),e.onError?.({message:n})}finally{I(!1)}}else b("Please enter phone number and select network")},A=async t=>{if(f&&l){I(!0),b(null);try{if(!(await D.verifyOTP(f,{phone_number:l,otp_code:t})).data)throw new Error("Failed to verify OTP");i("verifying")}catch(t){const n=t instanceof Error?t.message:"Invalid OTP code";b(n),e.onError?.({message:n})}finally{I(!1)}}else b("Missing required data")},$=async()=>{if(f){I(!0),b(null);try{await D.resendOTP(f,{phone_number:l})}catch(e){const t=e instanceof Error?e.message:"Failed to resend OTP";b(t)}finally{I(!1)}}},H=()=>{if(f&&e.redirect_url){const t=w(e.redirect_url,f,"cancelled");return void(globalThis.location.href=t)}r&&r()},U=e.displayMode||"modal",_=e.primaryColor||"#3B82F6",B=k||e.logoUrl;if(p(()=>{if(e.logoUrl&&!k&&""!==e.logoUrl.trim()){const t=new Image;t.onload=()=>M(!0),t.onerror=()=>M(!1),t.src=e.logoUrl}},[e.logoUrl,k]),p(()=>{if(!t)return;const e=e=>(e.preventDefault(),!1),n=e=>{if("F12"===e.key||e.ctrlKey&&e.shiftKey&&("I"===e.key||"J"===e.key||"C"===e.key)||e.ctrlKey&&("U"===e.key||"S"===e.key))return e.preventDefault(),!1},r=e=>{const t=e.target;"INPUT"!==t.tagName&&"TEXTAREA"!==t.tagName&&e.preventDefault()};return document.addEventListener("contextmenu",e),document.addEventListener("keydown",n),document.addEventListener("selectstart",r),()=>{document.removeEventListener("contextmenu",e),document.removeEventListener("keydown",n),document.removeEventListener("selectstart",r)}},[t]),!t)return null;const z=()=>y.jsxs(y.Fragment,{children:["fullpage"!==U&&y.jsxs("div",{className:"flex items-center justify-between p-4 border-b",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[B&&y.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-gray-200 flex-shrink-0 flex items-center justify-center bg-gray-100 overflow-hidden",children:P||B===e.logoUrl&&!k?y.jsx("img",{src:B,alt:"Logo",className:"w-full h-full rounded-full object-cover",onError:e=>{e.target.style.display="none"}}):y.jsx("div",{className:"w-full h-full rounded-full bg-gray-200 animate-pulse"})}),y.jsxs("h2",{className:"text-xl font-semibold text-gray-800",children:[e.currency||"GHS"," ",e.amount.toFixed(2)]})]}),"success"!==o&&"failed"!==o&&y.jsx("button",{onClick:H,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close",children:y.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),y.jsxs("div",{className:"p-6",children:["phone-input"===o&&y.jsxs("div",{className:"space-y-4",children:[y.jsx(ko,{selectedNetwork:c,onSelect:d,disabled:S,primaryColor:_}),y.jsx(C,{value:a,onChange:s,onValid:u,disabled:S,error:g||void 0,primaryColor:_}),g&&y.jsx("p",{className:"text-red-500 text-sm",children:g}),y.jsx("button",{onClick:N,disabled:!l||!c||S,className:"w-full py-3 text-white rounded-lg font-medium disabled:opacity-50 disabled:cursor-not-allowed transition-all",style:{backgroundColor:_},onMouseEnter:e=>{e.currentTarget.disabled||(e.currentTarget.style.opacity="0.9")},onMouseLeave:e=>{e.currentTarget.style.opacity="1"},children:S?"Processing...":"Continue"})]}),"otp-input"===o&&y.jsxs("div",{className:"space-y-4",children:[y.jsxs("div",{children:[y.jsx("h3",{className:"text-lg font-semibold text-gray-800 mb-2",children:"Enter OTP"}),y.jsxs("p",{className:"text-sm text-gray-600 mb-4",children:["We've sent a 4-digit code to ",l]})]}),y.jsx(Eo,{length:4,onComplete:A,onResend:$,disabled:S,loading:S,error:g||void 0,primaryColor:_})]}),"verifying"===o&&y.jsxs(y.Fragment,{children:[y.jsx(Po,{paymentId:f,primaryColor:_,showTimeoutWarning:V}),T&&y.jsx(To,{paymentId:f,redirectUrl:e.redirect_url,onRedirect:()=>{if(e.redirect_url){const t=w(e.redirect_url,f,"pending");globalThis.location.href=t}},onContinueWaiting:()=>{j(!1),R(!1),F(e=>e+1)},primaryColor:_})]}),("success"===o||"failed"===o)&&y.jsx(Mo,{success:"success"===o,payment:h||void 0,redirectUrl:e.redirect_url,primaryColor:_,onRedirect:()=>((t,n)=>{if(e.redirect_url&&f){const r=w(e.redirect_url,f,t,n);return void(globalThis.location.href=r)}r&&r()})("success"===o?"completed":"failed"===o?"failed":"cancelled",h||void 0)})]})]});return"inline"===U?y.jsx("div",{className:"w-full max-w-md mx-auto bg-white rounded-lg shadow-lg border border-gray-200",children:z()}):"fullpage"===U?y.jsx("div",{className:"fixed inset-0 z-50 bg-white overflow-y-auto",children:y.jsxs("div",{className:"min-h-screen flex flex-col",children:[y.jsxs("div",{className:"flex items-center justify-between p-4 border-b bg-gray-50",children:[y.jsxs("div",{className:"flex items-center gap-3",children:[B&&y.jsx("div",{className:"w-10 h-10 rounded-full border-2 border-gray-200 flex-shrink-0 flex items-center justify-center bg-gray-100 overflow-hidden",children:P||B===e.logoUrl&&!k?y.jsx("img",{src:B,alt:"Logo",className:"w-full h-full rounded-full object-cover",onError:e=>{e.target.style.display="none"}}):y.jsx("div",{className:"w-full h-full rounded-full bg-gray-200 animate-pulse"})}),y.jsxs("h2",{className:"text-xl font-semibold text-gray-800",children:[e.currency||"GHS"," ",e.amount.toFixed(2)]})]}),"success"!==o&&"failed"!==o&&y.jsx("button",{onClick:H,className:"text-gray-400 hover:text-gray-600 transition-colors","aria-label":"Close",children:y.jsx("svg",{className:"w-6 h-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:y.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),y.jsx("div",{className:"flex-1 flex items-center justify-center p-4",children:y.jsx("div",{className:"w-full max-w-md",children:y.jsx("div",{className:"bg-white rounded-lg shadow-lg border border-gray-200",children:z()})})})]})}):y.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-50 p-4",children:y.jsx("div",{className:"bg-white rounded-lg shadow-xl w-full max-w-md max-h-[90vh] overflow-y-auto",children:z()})})};export{O as PaymentService,jo as PaymentWidget};
2
2
  //# sourceMappingURL=index.esm.js.map