@payloqa/payment-widget 1.0.0
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/README.md +460 -0
- package/dist/components/NetworkSelector.d.ts +11 -0
- package/dist/components/NetworkSelector.d.ts.map +1 -0
- package/dist/components/OTPInput.d.ts +13 -0
- package/dist/components/OTPInput.d.ts.map +1 -0
- package/dist/components/PaymentWidget.d.ts +10 -0
- package/dist/components/PaymentWidget.d.ts.map +1 -0
- package/dist/components/PhoneInput.d.ts +13 -0
- package/dist/components/PhoneInput.d.ts.map +1 -0
- package/dist/components/ResultScreen.d.ts +12 -0
- package/dist/components/ResultScreen.d.ts.map +1 -0
- package/dist/components/TimeoutScreen.d.ts +11 -0
- package/dist/components/TimeoutScreen.d.ts.map +1 -0
- package/dist/components/VerifyingScreen.d.ts +9 -0
- package/dist/components/VerifyingScreen.d.ts.map +1 -0
- package/dist/demo.d.ts +4 -0
- package/dist/demo.d.ts.map +1 -0
- package/dist/index.d.ts +175 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.umd.js +2 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/payment-widget.css +1 -0
- package/dist/payment-widget.d.ts +175 -0
- package/dist/payment-widget.esm.js +2 -0
- package/dist/payment-widget.esm.js.map +1 -0
- package/dist/payment-widget.umd.js +2 -0
- package/dist/payment-widget.umd.js.map +1 -0
- package/dist/services/paymentService.d.ts +16 -0
- package/dist/services/paymentService.d.ts.map +1 -0
- package/dist/types/payment.d.ts +150 -0
- package/dist/types/payment.d.ts.map +1 -0
- package/dist/utils/index.d.ts +11 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/package.json +86 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:after,:before{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(59,130,246,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com*/*,:after,:before{border:0 solid #e5e7eb;box-sizing:border-box}:after,:before{--tw-content:""}:host,html{line-height:1.5;-webkit-text-size-adjust:100%;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-feature-settings:normal;font-variation-settings:normal;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-tap-highlight-color:transparent}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{color:inherit;font-family:inherit;font-feature-settings:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#9ca3af;opacity:1}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}[multiple],[type=date],[type=datetime-local],[type=email],[type=month],[type=number],[type=password],[type=search],[type=tel],[type=text],[type=time],[type=url],[type=week],input:where(:not([type])),select,textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#6b7280;border-radius:0;border-width:1px;font-size:1rem;line-height:1.5rem;padding:.5rem .75rem;--tw-shadow:0 0 #0000}[multiple]:focus,[type=date]:focus,[type=datetime-local]:focus,[type=email]:focus,[type=month]:focus,[type=number]:focus,[type=password]:focus,[type=search]:focus,[type=tel]:focus,[type=text]:focus,[type=time]:focus,[type=url]:focus,[type=week]:focus,input:where(:not([type])):focus,select:focus,textarea:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);border-color:#2563eb;box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}input::-moz-placeholder,textarea::-moz-placeholder{color:#6b7280;opacity:1}input::placeholder,textarea::placeholder{color:#6b7280;opacity:1}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-date-and-time-value{min-height:1.5em;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-meridiem-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-year-field{padding-bottom:0;padding-top:0}select{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3E%3C/svg%3E");background-position:right .5rem center;background-repeat:no-repeat;background-size:1.5em 1.5em;padding-right:2.5rem;-webkit-print-color-adjust:exact;print-color-adjust:exact}[multiple],[size]:where(select:not([size="1"])){background-image:none;background-position:0 0;background-repeat:unset;background-size:initial;padding-right:.75rem;-webkit-print-color-adjust:unset;print-color-adjust:unset}[type=checkbox],[type=radio]{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;background-origin:border-box;border-color:#6b7280;border-width:1px;color:#2563eb;display:inline-block;flex-shrink:0;height:1rem;padding:0;-webkit-print-color-adjust:exact;print-color-adjust:exact;-webkit-user-select:none;-moz-user-select:none;user-select:none;vertical-align:middle;width:1rem;--tw-shadow:0 0 #0000}[type=checkbox]{border-radius:0}[type=radio]{border-radius:100%}[type=checkbox]:focus,[type=radio]:focus{outline:2px solid transparent;outline-offset:2px;--tw-ring-inset:var(--tw-empty,/*!*/ /*!*/);--tw-ring-offset-width:2px;--tw-ring-offset-color:#fff;--tw-ring-color:#2563eb;--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}[type=checkbox]:checked,[type=radio]:checked{background-color:currentColor;background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}[type=checkbox]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Cpath d='M12.207 4.793a1 1 0 0 1 0 1.414l-5 5a1 1 0 0 1-1.414 0l-2-2a1 1 0 0 1 1.414-1.414L6.5 9.086l4.293-4.293a1 1 0 0 1 1.414 0'/%3E%3C/svg%3E")}@media (forced-colors:active) {[type=checkbox]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=radio]:checked{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='%23fff' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='3'/%3E%3C/svg%3E")}@media (forced-colors:active) {[type=radio]:checked{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:checked:focus,[type=checkbox]:checked:hover,[type=radio]:checked:focus,[type=radio]:checked:hover{background-color:currentColor;border-color:transparent}[type=checkbox]:indeterminate{background-color:currentColor;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3E%3C/svg%3E");background-position:50%;background-repeat:no-repeat;background-size:100% 100%;border-color:transparent}@media (forced-colors:active) {[type=checkbox]:indeterminate{-webkit-appearance:auto;-moz-appearance:auto;appearance:auto}}[type=checkbox]:indeterminate:focus,[type=checkbox]:indeterminate:hover{background-color:currentColor;border-color:transparent}[type=file]{background:unset;border-color:inherit;border-radius:0;border-width:0;font-size:unset;line-height:inherit;padding:0}[type=file]:focus{outline:1px solid ButtonText;outline:1px auto -webkit-focus-ring-color}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.top-0{top:0}.z-40{z-index:40}.z-50{z-index:50}.mx-auto{margin-left:auto;margin-right:auto}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-12{height:3rem}.h-16{height:4rem}.h-6{height:1.5rem}.h-8{height:2rem}.h-full{height:100%}.max-h-64{max-height:16rem}.max-h-96{max-height:24rem}.max-h-\[90vh\]{max-height:90vh}.min-h-screen{min-height:100vh}.w-10{width:2.5rem}.w-12{width:3rem}.w-16{width:4rem}.w-6{width:1.5rem}.w-8{width:2rem}.w-full{width:100%}.max-w-6xl{max-width:72rem}.max-w-md{max-width:28rem}.max-w-sm{max-width:24rem}.flex-1{flex:1 1 0%}.flex-shrink-0{flex-shrink:0}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-spin{animation:spin 1s linear infinite}.cursor-not-allowed{cursor:not-allowed}.list-inside{list-style-position:inside}.list-disc{list-style-type:disc}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.5rem*var(--tw-space-y-reverse));margin-top:calc(.5rem*(1 - var(--tw-space-y-reverse)))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(1rem*var(--tw-space-y-reverse));margin-top:calc(1rem*(1 - var(--tw-space-y-reverse)))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-t{border-top-width:1px}.border-gray-200{--tw-border-opacity:1;border-color:rgb(229 231 235/var(--tw-border-opacity,1))}.border-gray-300{--tw-border-opacity:1;border-color:rgb(209 213 219/var(--tw-border-opacity,1))}.border-red-500{--tw-border-opacity:1;border-color:rgb(239 68 68/var(--tw-border-opacity,1))}.bg-black{--tw-bg-opacity:1;background-color:rgb(0 0 0/var(--tw-bg-opacity,1))}.bg-blue-100{--tw-bg-opacity:1;background-color:rgb(219 234 254/var(--tw-bg-opacity,1))}.bg-blue-600{--tw-bg-opacity:1;background-color:rgb(37 99 235/var(--tw-bg-opacity,1))}.bg-gray-100{--tw-bg-opacity:1;background-color:rgb(243 244 246/var(--tw-bg-opacity,1))}.bg-gray-200{--tw-bg-opacity:1;background-color:rgb(229 231 235/var(--tw-bg-opacity,1))}.bg-gray-50{--tw-bg-opacity:1;background-color:rgb(249 250 251/var(--tw-bg-opacity,1))}.bg-green-100{--tw-bg-opacity:1;background-color:rgb(220 252 231/var(--tw-bg-opacity,1))}.bg-green-50{--tw-bg-opacity:1;background-color:rgb(240 253 244/var(--tw-bg-opacity,1))}.bg-red-100{--tw-bg-opacity:1;background-color:rgb(254 226 226/var(--tw-bg-opacity,1))}.bg-red-50{--tw-bg-opacity:1;background-color:rgb(254 242 242/var(--tw-bg-opacity,1))}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.bg-yellow-100{--tw-bg-opacity:1;background-color:rgb(254 249 195/var(--tw-bg-opacity,1))}.bg-opacity-50{--tw-bg-opacity:0.5}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.py-1{padding-bottom:.25rem;padding-top:.25rem}.py-2{padding-bottom:.5rem;padding-top:.5rem}.py-3{padding-bottom:.75rem;padding-top:.75rem}.py-8{padding-bottom:2rem;padding-top:2rem}.pt-3{padding-top:.75rem}.text-center{text-align:center}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-sans{font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-normal{font-weight:400}.font-semibold{font-weight:600}.text-amber-600{--tw-text-opacity:1;color:rgb(217 119 6/var(--tw-text-opacity,1))}.text-blue-700{--tw-text-opacity:1;color:rgb(29 78 216/var(--tw-text-opacity,1))}.text-gray-400{--tw-text-opacity:1;color:rgb(156 163 175/var(--tw-text-opacity,1))}.text-gray-500{--tw-text-opacity:1;color:rgb(107 114 128/var(--tw-text-opacity,1))}.text-gray-600{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.text-gray-700{--tw-text-opacity:1;color:rgb(55 65 81/var(--tw-text-opacity,1))}.text-gray-800{--tw-text-opacity:1;color:rgb(31 41 55/var(--tw-text-opacity,1))}.text-gray-900{--tw-text-opacity:1;color:rgb(17 24 39/var(--tw-text-opacity,1))}.text-green-600{--tw-text-opacity:1;color:rgb(22 163 74/var(--tw-text-opacity,1))}.text-green-700{--tw-text-opacity:1;color:rgb(21 128 61/var(--tw-text-opacity,1))}.text-green-800{--tw-text-opacity:1;color:rgb(22 101 52/var(--tw-text-opacity,1))}.text-red-500{--tw-text-opacity:1;color:rgb(239 68 68/var(--tw-text-opacity,1))}.text-red-600{--tw-text-opacity:1;color:rgb(220 38 38/var(--tw-text-opacity,1))}.text-red-800{--tw-text-opacity:1;color:rgb(153 27 27/var(--tw-text-opacity,1))}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity,1))}.text-yellow-700{--tw-text-opacity:1;color:rgb(161 98 7/var(--tw-text-opacity,1))}.text-yellow-800{--tw-text-opacity:1;color:rgb(133 77 14/var(--tw-text-opacity,1))}.opacity-50{opacity:.5}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-lg{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);--tw-shadow-colored:0 10px 15px -3px var(--tw-shadow-color),0 4px 6px -4px var(--tw-shadow-color)}.shadow-xl{--tw-shadow:0 20px 25px -5px rgba(0,0,0,.1),0 8px 10px -6px rgba(0,0,0,.1);--tw-shadow-colored:0 20px 25px -5px var(--tw-shadow-color),0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline{outline-style:solid}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.payment-widget-modal{font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,sans-serif}.payment-widget-modal::-webkit-scrollbar{width:6px}.payment-widget-modal::-webkit-scrollbar-track{background:#f1f1f1;border-radius:10px}.payment-widget-modal::-webkit-scrollbar-thumb{background:#888;border-radius:10px}.payment-widget-modal::-webkit-scrollbar-thumb:hover{background:#555}@keyframes spin{to{transform:rotate(1turn)}}.animate-spin{animation:spin 1s linear infinite}@media (max-width:640px){.payment-widget-modal{padding:1rem}}.payment-widget-modal *{-webkit-user-select:none;-moz-user-select:none;user-select:none}.payment-widget-modal input,.payment-widget-modal textarea{-webkit-user-select:text;-moz-user-select:text;user-select:text}.hover\:bg-blue-200:hover{--tw-bg-opacity:1;background-color:rgb(191 219 254/var(--tw-bg-opacity,1))}.hover\:bg-blue-700:hover{--tw-bg-opacity:1;background-color:rgb(29 78 216/var(--tw-bg-opacity,1))}.hover\:bg-gray-300:hover{--tw-bg-opacity:1;background-color:rgb(209 213 219/var(--tw-bg-opacity,1))}.hover\:bg-green-200:hover{--tw-bg-opacity:1;background-color:rgb(187 247 208/var(--tw-bg-opacity,1))}.hover\:bg-yellow-200:hover{--tw-bg-opacity:1;background-color:rgb(254 240 138/var(--tw-bg-opacity,1))}.hover\:text-gray-600:hover{--tw-text-opacity:1;color:rgb(75 85 99/var(--tw-text-opacity,1))}.focus\:border-transparent:focus{border-color:transparent}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-blue-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(59 130 246/var(--tw-ring-opacity,1))}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width:768px){.md\:h-14{height:3.5rem}.md\:w-14{width:3.5rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.md\:text-xl{font-size:1.25rem;line-height:1.75rem}}@media (min-width:1024px){.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface PaymentServiceConfig {
|
|
4
|
+
apiKey: string;
|
|
5
|
+
platformId: string;
|
|
6
|
+
baseUrl?: string;
|
|
7
|
+
}
|
|
8
|
+
interface CreatePaymentRequest {
|
|
9
|
+
amount: number;
|
|
10
|
+
currency: string;
|
|
11
|
+
payment_method: "mobile_money" | "card";
|
|
12
|
+
phone_number: string;
|
|
13
|
+
network?: "mtn" | "vodafone" | "airteltigo";
|
|
14
|
+
redirect_url?: string;
|
|
15
|
+
webhook_url?: string;
|
|
16
|
+
reference?: string;
|
|
17
|
+
metadata?: Record<string, any>;
|
|
18
|
+
payee_id?: string;
|
|
19
|
+
offline?: boolean;
|
|
20
|
+
order_id?: string;
|
|
21
|
+
transaction_id?: string;
|
|
22
|
+
payer_id?: string;
|
|
23
|
+
payment_flow?: "direct" | "escrow";
|
|
24
|
+
}
|
|
25
|
+
interface CreatePaymentResponse {
|
|
26
|
+
success: boolean;
|
|
27
|
+
data?: {
|
|
28
|
+
payment_id: string;
|
|
29
|
+
payment_url: string;
|
|
30
|
+
otp_required: boolean;
|
|
31
|
+
otp_sent: boolean;
|
|
32
|
+
message: string;
|
|
33
|
+
};
|
|
34
|
+
error?: {
|
|
35
|
+
code: string;
|
|
36
|
+
message: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
interface VerifyOTPRequest {
|
|
40
|
+
phone_number: string;
|
|
41
|
+
otp_code: string;
|
|
42
|
+
}
|
|
43
|
+
interface VerifyOTPResponse {
|
|
44
|
+
success: boolean;
|
|
45
|
+
data?: {
|
|
46
|
+
payment_id: string;
|
|
47
|
+
status: PaymentStatus;
|
|
48
|
+
message: string;
|
|
49
|
+
};
|
|
50
|
+
error?: {
|
|
51
|
+
code: string;
|
|
52
|
+
message: string;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
interface ResendOTPRequest {
|
|
56
|
+
phone_number: string;
|
|
57
|
+
}
|
|
58
|
+
interface ResendOTPResponse {
|
|
59
|
+
success: boolean;
|
|
60
|
+
data?: {
|
|
61
|
+
payment_id: string;
|
|
62
|
+
message: string;
|
|
63
|
+
};
|
|
64
|
+
error?: {
|
|
65
|
+
code: string;
|
|
66
|
+
message: string;
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
interface GetPaymentStatusResponse {
|
|
70
|
+
success: boolean;
|
|
71
|
+
data?: PaymentData;
|
|
72
|
+
error?: {
|
|
73
|
+
code: string;
|
|
74
|
+
message: string;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
interface CancelPaymentRequest {
|
|
78
|
+
reason?: string;
|
|
79
|
+
metadata?: Record<string, any>;
|
|
80
|
+
}
|
|
81
|
+
interface CancelPaymentResponse {
|
|
82
|
+
success: boolean;
|
|
83
|
+
data?: {
|
|
84
|
+
payment_id: string;
|
|
85
|
+
status: PaymentStatus;
|
|
86
|
+
message: string;
|
|
87
|
+
};
|
|
88
|
+
error?: {
|
|
89
|
+
code: string;
|
|
90
|
+
message: string;
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
interface PaymentData {
|
|
94
|
+
payment_id: string;
|
|
95
|
+
status: PaymentStatus;
|
|
96
|
+
amount: number | string;
|
|
97
|
+
currency: string;
|
|
98
|
+
payment_method: "mobile_money" | "card";
|
|
99
|
+
phone_number?: string;
|
|
100
|
+
network?: "mtn" | "vodafone" | "airteltigo";
|
|
101
|
+
reference?: string;
|
|
102
|
+
created_at: string;
|
|
103
|
+
updated_at: string;
|
|
104
|
+
paid_at?: string;
|
|
105
|
+
metadata?: Record<string, any>;
|
|
106
|
+
}
|
|
107
|
+
type PaymentStatus = "pending" | "processing" | "completed" | "failed" | "cancelled" | "expired";
|
|
108
|
+
type PaymentWidgetDisplayMode = "modal" | "inline" | "fullpage";
|
|
109
|
+
interface PaymentWidgetConfig {
|
|
110
|
+
apiKey: string;
|
|
111
|
+
platformId: string;
|
|
112
|
+
apiUrl?: string;
|
|
113
|
+
amount: number;
|
|
114
|
+
currency?: string;
|
|
115
|
+
redirect_url?: string;
|
|
116
|
+
payeeId?: string;
|
|
117
|
+
orderId?: string;
|
|
118
|
+
transactionId?: string;
|
|
119
|
+
payerId?: string;
|
|
120
|
+
webhookUrl?: string;
|
|
121
|
+
reference?: string;
|
|
122
|
+
metadata?: Record<string, any>;
|
|
123
|
+
displayMode?: PaymentWidgetDisplayMode;
|
|
124
|
+
primaryColor?: string;
|
|
125
|
+
logoUrl?: string;
|
|
126
|
+
onSuccess?: (payment: PaymentData) => void;
|
|
127
|
+
onError?: (error: PaymentError) => void;
|
|
128
|
+
onClose?: () => void;
|
|
129
|
+
}
|
|
130
|
+
interface PaymentError {
|
|
131
|
+
message: string;
|
|
132
|
+
code?: string;
|
|
133
|
+
details?: any;
|
|
134
|
+
}
|
|
135
|
+
type PaymentWidgetState = "phone-input" | "otp-input" | "verifying" | "success" | "failed" | "loading";
|
|
136
|
+
type MobileNetwork = "mtn" | "vodafone" | "airteltigo";
|
|
137
|
+
interface NetworkOption {
|
|
138
|
+
value: MobileNetwork;
|
|
139
|
+
label: string;
|
|
140
|
+
icon?: string;
|
|
141
|
+
}
|
|
142
|
+
type PaymentRedirectStatus = "completed" | "failed" | "cancelled" | "pending";
|
|
143
|
+
interface PaymentRedirectParams {
|
|
144
|
+
payment_id: string;
|
|
145
|
+
status: PaymentRedirectStatus;
|
|
146
|
+
amount?: number;
|
|
147
|
+
currency?: string;
|
|
148
|
+
reference?: string;
|
|
149
|
+
reason?: string;
|
|
150
|
+
message?: string;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
interface PaymentWidgetProps {
|
|
154
|
+
config: PaymentWidgetConfig;
|
|
155
|
+
isOpen: boolean;
|
|
156
|
+
onClose?: () => void;
|
|
157
|
+
}
|
|
158
|
+
declare const PaymentWidget: React.FC<PaymentWidgetProps>;
|
|
159
|
+
|
|
160
|
+
declare class PaymentService {
|
|
161
|
+
private readonly config;
|
|
162
|
+
constructor(config: PaymentServiceConfig);
|
|
163
|
+
private makeRequest;
|
|
164
|
+
createPayment(request: CreatePaymentRequest): Promise<CreatePaymentResponse>;
|
|
165
|
+
verifyOTP(paymentId: string, request: VerifyOTPRequest): Promise<VerifyOTPResponse>;
|
|
166
|
+
resendOTP(paymentId: string, request: ResendOTPRequest): Promise<ResendOTPResponse>;
|
|
167
|
+
getPaymentStatus(paymentId: string): Promise<GetPaymentStatusResponse>;
|
|
168
|
+
cancelPayment(paymentId: string, request?: CancelPaymentRequest): Promise<CancelPaymentResponse>;
|
|
169
|
+
getPlatformInfo(): Promise<{
|
|
170
|
+
logo_url?: string;
|
|
171
|
+
}>;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export { PaymentService, PaymentWidget };
|
|
175
|
+
export type { CancelPaymentRequest, CancelPaymentResponse, CreatePaymentRequest, CreatePaymentResponse, GetPaymentStatusResponse, MobileNetwork, NetworkOption, PaymentData, PaymentError, PaymentRedirectParams, PaymentRedirectStatus, PaymentServiceConfig, PaymentStatus, PaymentWidgetConfig, PaymentWidgetDisplayMode, PaymentWidgetState, ResendOTPRequest, ResendOTPResponse, VerifyOTPRequest, VerifyOTPResponse };
|
|
@@ -0,0 +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};
|
|
2
|
+
//# sourceMappingURL=payment-widget.esm.js.map
|