momentic-mobile 0.4.3 → 0.4.4
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/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "momentic-mobile",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "momentic-mobile",
|
|
9
|
-
"version": "0.4.
|
|
9
|
+
"version": "0.4.4",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@actions/exec": "^1.1.1",
|
|
12
12
|
"@actions/io": "^1.1.3",
|
package/package.json
CHANGED
|
@@ -620,4 +620,4 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
620
620
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ls(e,u){return xqe(e)||fqe(e,u)||tsu(e,u)||pqe()}function Io(e,u){if(e==null)return{};var a=W9e(e,u),t,n;if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)t=r[n],!(u.indexOf(t)>=0)&&Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}function gqe(e,u){return u||(u=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(u)}}))}const Cqe=Math.min,Fqe=Math.max,yp=Math.round,yx=Math.floor,Bp=e=>({x:e,y:e});function kqe(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function gsu(e){return Fsu(e)?(e.nodeName||"").toLowerCase():"#document"}function Oi(e){var u;return(e==null||(u=e.ownerDocument)==null?void 0:u.defaultView)||window}function Csu(e){var u;return(u=(Fsu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:u.documentElement}function Fsu(e){return e instanceof Node||e instanceof Oi(e).Node}function J9(e){return e instanceof Element||e instanceof Oi(e).Element}function Uz(e){return e instanceof HTMLElement||e instanceof Oi(e).HTMLElement}function t_(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Oi(e).ShadowRoot}function ksu(e){const{overflow:u,overflowX:a,overflowY:t,display:n}=Zz(e);return/auto|scroll|overlay|hidden|clip/.test(u+t+a)&&!["inline","contents"].includes(n)}function vqe(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Aqe(e){return["html","body","#document"].includes(gsu(e))}function Zz(e){return Oi(e).getComputedStyle(e)}function bqe(e){if(gsu(e)==="html")return e;const u=e.assignedSlot||e.parentNode||t_(e)&&e.host||Csu(e);return t_(u)?u.host:u}function vsu(e){const u=bqe(e);return Aqe(u)?e.ownerDocument?e.ownerDocument.body:e.body:Uz(u)&&ksu(u)?u:vsu(u)}function W9(e,u){var a;u===void 0&&(u=[]);const t=vsu(e),n=t===((a=e.ownerDocument)==null?void 0:a.body),r=Oi(t);return n?u.concat(r,r.visualViewport||[],ksu(t)?t:[]):u.concat(t,W9(t))}function yqe(e){const u=Zz(e);let a=parseFloat(u.width)||0,t=parseFloat(u.height)||0;const n=Uz(e),r=n?e.offsetWidth:a,i=n?e.offsetHeight:t,o=yp(a)!==r||yp(t)!==i;return o&&(a=r,t=i),{width:a,height:t,$:o}}function Qz(e){return J9(e)?e:e.contextElement}function kv(e){const u=Qz(e);if(!Uz(u))return Bp(1);const a=u.getBoundingClientRect(),{width:t,height:n,$:r}=yqe(u);let i=(r?yp(a.width):a.width)/t,o=(r?yp(a.height):a.height)/n;return(!i||!Number.isFinite(i))&&(i=1),(!o||!Number.isFinite(o))&&(o=1),{x:i,y:o}}const Bqe=Bp(0);function Sqe(e){const u=Oi(e);return!vqe()||!u.visualViewport?Bqe:{x:u.visualViewport.offsetLeft,y:u.visualViewport.offsetTop}}function zqe(e,u,a){return u===void 0&&(u=!1),!a||u&&a!==Oi(e)?!1:u}function n_(e,u,a,t){u===void 0&&(u=!1),a===void 0&&(a=!1);const n=e.getBoundingClientRect(),r=Qz(e);let i=Bp(1);u&&(t?J9(t)&&(i=kv(t)):i=kv(e));const o=zqe(r,a,t)?Sqe(r):Bp(0);let s=(n.left+o.x)/i.x,l=(n.top+o.y)/i.y,E=n.width/i.x,c=n.height/i.y;if(r){const d=Oi(r),h=t&&J9(t)?Oi(t):t;let m=d.frameElement;for(;m&&t&&h!==d;){const x=kv(m),C=m.getBoundingClientRect(),p=Zz(m),g=C.left+(m.clientLeft+parseFloat(p.paddingLeft))*x.x,F=C.top+(m.clientTop+parseFloat(p.paddingTop))*x.y;s*=x.x,l*=x.y,E*=x.x,c*=x.y,s+=g,l+=F,m=Oi(m).frameElement}}return kqe({width:E,height:c,x:s,y:l})}function Oqe(e,u){let a=null,t;const n=Csu(e);function r(){clearTimeout(t),a&&a.disconnect(),a=null}function i(o,s){o===void 0&&(o=!1),s===void 0&&(s=1),r();const{left:l,top:E,width:c,height:d}=e.getBoundingClientRect();if(o||u(),!c||!d)return;const h=yx(E),m=yx(n.clientWidth-(l+c)),x=yx(n.clientHeight-(E+d)),C=yx(l),g={rootMargin:-h+"px "+-m+"px "+-x+"px "+-C+"px",threshold:Fqe(0,Cqe(1,s))||1};let F=!0;function v(y){const A=y[0].intersectionRatio;if(A!==s){if(!F)return i();A?i(!1,A):t=setTimeout(()=>{i(!1,1e-7)},100)}F=!1}try{a=new IntersectionObserver(v,{...g,root:n.ownerDocument})}catch{a=new IntersectionObserver(v,g)}a.observe(e)}return i(!0),r}function wqe(e,u,a,t){t===void 0&&(t={});const{ancestorScroll:n=!0,ancestorResize:r=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:o=typeof IntersectionObserver=="function",animationFrame:s=!1}=t,l=Qz(e),E=n||r?[...l?W9(l):[],...W9(u)]:[];E.forEach(p=>{n&&p.addEventListener("scroll",a,{passive:!0}),r&&p.addEventListener("resize",a)});const c=l&&o?Oqe(l,a):null;let d=-1,h=null;i&&(h=new ResizeObserver(p=>{let[g]=p;g&&g.target===l&&h&&(h.unobserve(u),cancelAnimationFrame(d),d=requestAnimationFrame(()=>{h&&h.observe(u)})),a()}),l&&!s&&h.observe(l),h.observe(u));let m,x=s?n_(e):null;s&&C();function C(){const p=n_(e);x&&(p.x!==x.x||p.y!==x.y||p.width!==x.width||p.height!==x.height)&&a(),x=p,m=requestAnimationFrame(C)}return a(),()=>{E.forEach(p=>{n&&p.removeEventListener("scroll",a),r&&p.removeEventListener("resize",a)}),c&&c(),h&&h.disconnect(),h=null,s&&cancelAnimationFrame(m)}}var U9=f.useLayoutEffect,Mqe=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],Sp=function(){};function Tqe(e,u){return u?u[0]==="-"?e+u:e+"__"+u:e}function Pqe(e,u){for(var a=arguments.length,t=new Array(a>2?a-2:0),n=2;n<a;n++)t[n-2]=arguments[n];var r=[].concat(t);if(u&&e)for(var i in u)u.hasOwnProperty(i)&&u[i]&&r.push("".concat(Tqe(e,i)));return r.filter(function(o){return o}).map(function(o){return String(o).trim()}).join(" ")}var zp=function(u){return Vqe(u)?u.filter(Boolean):b4(u)==="object"&&u!==null?[u]:[]},Asu=function(u){u.className,u.clearValue,u.cx,u.getStyles,u.getClassNames,u.getValue,u.hasValue,u.isMulti,u.isRtl,u.options,u.selectOption,u.selectProps,u.setValue,u.theme;var a=Io(u,Mqe);return xe({},a)},pa=function(u,a,t){var n=u.cx,r=u.getStyles,i=u.getClassNames,o=u.className;return{css:r(a,u),className:n(t??{},i(a,u),o)}};function SC(e){return[document.documentElement,document.body,window].indexOf(e)>-1}function jqe(e){return SC(e)?window.innerHeight:e.clientHeight}function bsu(e){return SC(e)?window.pageYOffset:e.scrollTop}function Op(e,u){if(SC(e)){window.scrollTo(0,u);return}e.scrollTop=u}function Nqe(e){var u=getComputedStyle(e),a=u.position==="absolute",t=/(auto|scroll)/;if(u.position==="fixed")return document.documentElement;for(var n=e;n=n.parentElement;)if(u=getComputedStyle(n),!(a&&u.position==="static")&&t.test(u.overflow+u.overflowY+u.overflowX))return n;return document.documentElement}function Rqe(e,u,a,t){return a*((e=e/t-1)*e*e+1)+u}function Bx(e,u){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Sp,n=bsu(e),r=u-n,i=10,o=0;function s(){o+=i;var l=Rqe(o,n,r,a);Op(e,l),o<a?window.requestAnimationFrame(s):t(e)}s()}function r_(e,u){var a=e.getBoundingClientRect(),t=u.getBoundingClientRect(),n=u.offsetHeight/3;t.bottom+n>a.bottom?Op(e,Math.min(u.offsetTop+u.clientHeight-e.offsetHeight+n,e.scrollHeight)):t.top-n<a.top&&Op(e,Math.max(u.offsetTop-n,0))}function Lqe(e){var u=e.getBoundingClientRect();return{bottom:u.bottom,height:u.height,left:u.left,right:u.right,top:u.top,width:u.width}}function i_(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function _qe(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}var ysu=!1,Iqe={get passive(){return ysu=!0}},Sx=typeof window<"u"?window:{};Sx.addEventListener&&Sx.removeEventListener&&(Sx.addEventListener("p",Sp,Iqe),Sx.removeEventListener("p",Sp,!1));var Kqe=ysu;function $qe(e){return e!=null}function Vqe(e){return Array.isArray(e)}function r5(e,u,a){return e?u:a}var Hqe=function(u){for(var a=arguments.length,t=new Array(a>1?a-1:0),n=1;n<a;n++)t[n-1]=arguments[n];var r=Object.entries(u).filter(function(i){var o=ls(i,1),s=o[0];return!t.includes(s)});return r.reduce(function(i,o){var s=ls(o,2),l=s[0],E=s[1];return i[l]=E,i},{})},Gqe=["children","innerProps"],Jqe=["children","innerProps"];function Wqe(e){var u=e.maxHeight,a=e.menuEl,t=e.minHeight,n=e.placement,r=e.shouldScroll,i=e.isFixedPosition,o=e.controlHeight,s=Nqe(a),l={placement:"bottom",maxHeight:u};if(!a||!a.offsetParent)return l;var E=s.getBoundingClientRect(),c=E.height,d=a.getBoundingClientRect(),h=d.bottom,m=d.height,x=d.top,C=a.offsetParent.getBoundingClientRect(),p=C.top,g=i?window.innerHeight:jqe(s),F=bsu(s),v=parseInt(getComputedStyle(a).marginBottom,10),y=parseInt(getComputedStyle(a).marginTop,10),A=p-y,b=g-x,B=A+F,T=c-F-x,_=h-g+F+v,$=F+x-y,M=160;switch(n){case"auto":case"bottom":if(b>=m)return{placement:"bottom",maxHeight:u};if(T>=m&&!i)return r&&Bx(s,_,M),{placement:"bottom",maxHeight:u};if(!i&&T>=t||i&&b>=t){r&&Bx(s,_,M);var R=i?b-v:T-v;return{placement:"bottom",maxHeight:R}}if(n==="auto"||i){var O=u,N=i?A:B;return N>=t&&(O=Math.min(N-v-o,u)),{placement:"top",maxHeight:O}}if(n==="bottom")return r&&Op(s,_),{placement:"bottom",maxHeight:u};break;case"top":if(A>=m)return{placement:"top",maxHeight:u};if(B>=m&&!i)return r&&Bx(s,$,M),{placement:"top",maxHeight:u};if(!i&&B>=t||i&&A>=t){var z=u;return(!i&&B>=t||i&&A>=t)&&(z=i?A-y:B-y),r&&Bx(s,$,M),{placement:"top",maxHeight:z}}return{placement:"bottom",maxHeight:u};default:throw new Error('Invalid placement provided "'.concat(n,'".'))}return l}function Uqe(e){var u={bottom:"top",top:"bottom"};return e?u[e]:"bottom"}var Bsu=function(u){return u==="auto"?"bottom":u},Zqe=function(u,a){var t,n=u.placement,r=u.theme,i=r.borderRadius,o=r.spacing,s=r.colors;return xe((t={label:"menu"},Wd(t,Uqe(n),"100%"),Wd(t,"position","absolute"),Wd(t,"width","100%"),Wd(t,"zIndex",1),t),a?{}:{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:o.menuGutter,marginTop:o.menuGutter})},Ssu=f.createContext(null),Qqe=function(u){var a=u.children,t=u.minMenuHeight,n=u.maxMenuHeight,r=u.menuPlacement,i=u.menuPosition,o=u.menuShouldScrollIntoView,s=u.theme,l=f.useContext(Ssu)||{},E=l.setPortalPlacement,c=f.useRef(null),d=f.useState(n),h=ls(d,2),m=h[0],x=h[1],C=f.useState(null),p=ls(C,2),g=p[0],F=p[1],v=s.spacing.controlHeight;return U9(function(){var y=c.current;if(y){var A=i==="fixed",b=o&&!A,B=Wqe({maxHeight:n,menuEl:y,minHeight:t,placement:r,shouldScroll:b,isFixedPosition:A,controlHeight:v});x(B.maxHeight),F(B.placement),E==null||E(B.placement)}},[n,r,i,o,t,E,v]),a({ref:c,placerProps:xe(xe({},u),{},{placement:g||Bsu(r),maxHeight:m})})},qqe=function(u){var a=u.children,t=u.innerRef,n=u.innerProps;return Fe("div",ne({},pa(u,"menu",{menu:!0}),{ref:t},n),a)},Yqe=qqe,Xqe=function(u,a){var t=u.maxHeight,n=u.theme.spacing.baseUnit;return xe({maxHeight:t,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},a?{}:{paddingBottom:n,paddingTop:n})},uYe=function(u){var a=u.children,t=u.innerProps,n=u.innerRef,r=u.isMulti;return Fe("div",ne({},pa(u,"menuList",{"menu-list":!0,"menu-list--is-multi":r}),{ref:n},t),a)},zsu=function(u,a){var t=u.theme,n=t.spacing.baseUnit,r=t.colors;return xe({textAlign:"center"},a?{}:{color:r.neutral40,padding:"".concat(n*2,"px ").concat(n*3,"px")})},eYe=zsu,aYe=zsu,tYe=function(u){var a=u.children,t=a===void 0?"No options":a,n=u.innerProps,r=Io(u,Gqe);return Fe("div",ne({},pa(xe(xe({},r),{},{children:t,innerProps:n}),"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),n),t)},nYe=function(u){var a=u.children,t=a===void 0?"Loading...":a,n=u.innerProps,r=Io(u,Jqe);return Fe("div",ne({},pa(xe(xe({},r),{},{children:t,innerProps:n}),"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),n),t)},rYe=function(u){var a=u.rect,t=u.offset,n=u.position;return{left:a.left,position:n,top:t,width:a.width,zIndex:1}},iYe=function(u){var a=u.appendTo,t=u.children,n=u.controlElement,r=u.innerProps,i=u.menuPlacement,o=u.menuPosition,s=f.useRef(null),l=f.useRef(null),E=f.useState(Bsu(i)),c=ls(E,2),d=c[0],h=c[1],m=f.useMemo(function(){return{setPortalPlacement:h}},[]),x=f.useState(null),C=ls(x,2),p=C[0],g=C[1],F=f.useCallback(function(){if(n){var b=Lqe(n),B=o==="fixed"?0:window.pageYOffset,T=b[d]+B;(T!==(p==null?void 0:p.offset)||b.left!==(p==null?void 0:p.rect.left)||b.width!==(p==null?void 0:p.rect.width))&&g({offset:T,rect:b})}},[n,o,d,p==null?void 0:p.offset,p==null?void 0:p.rect.left,p==null?void 0:p.rect.width]);U9(function(){F()},[F]);var v=f.useCallback(function(){typeof l.current=="function"&&(l.current(),l.current=null),n&&s.current&&(l.current=wqe(n,s.current,F,{elementResize:"ResizeObserver"in window}))},[n,F]);U9(function(){v()},[v]);var y=f.useCallback(function(b){s.current=b,v()},[v]);if(!a&&o!=="fixed"||!p)return null;var A=Fe("div",ne({ref:y},pa(xe(xe({},u),{},{offset:p.offset,position:o,rect:p.rect}),"menuPortal",{"menu-portal":!0}),r),t);return Fe(Ssu.Provider,{value:m},a?Li.createPortal(A,a):A)},oYe=function(u){var a=u.isDisabled,t=u.isRtl;return{label:"container",direction:t?"rtl":void 0,pointerEvents:a?"none":void 0,position:"relative"}},sYe=function(u){var a=u.children,t=u.innerProps,n=u.isDisabled,r=u.isRtl;return Fe("div",ne({},pa(u,"container",{"--is-disabled":n,"--is-rtl":r}),t),a)},lYe=function(u,a){var t=u.theme.spacing,n=u.isMulti,r=u.hasValue,i=u.selectProps.controlShouldRenderValue;return xe({alignItems:"center",display:n&&r&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},a?{}:{padding:"".concat(t.baseUnit/2,"px ").concat(t.baseUnit*2,"px")})},EYe=function(u){var a=u.children,t=u.innerProps,n=u.isMulti,r=u.hasValue;return Fe("div",ne({},pa(u,"valueContainer",{"value-container":!0,"value-container--is-multi":n,"value-container--has-value":r}),t),a)},cYe=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},dYe=function(u){var a=u.children,t=u.innerProps;return Fe("div",ne({},pa(u,"indicatorsContainer",{indicators:!0}),t),a)},o_,DYe=["size"],hYe=["innerProps","isRtl","size"],mYe={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},Osu=function(u){var a=u.size,t=Io(u,DYe);return Fe("svg",ne({height:a,width:a,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:mYe},t))},qz=function(u){return Fe(Osu,ne({size:20},u),Fe("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"}))},wsu=function(u){return Fe(Osu,ne({size:20},u),Fe("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"}))},Msu=function(u,a){var t=u.isFocused,n=u.theme,r=n.spacing.baseUnit,i=n.colors;return xe({label:"indicatorContainer",display:"flex",transition:"color 150ms"},a?{}:{color:t?i.neutral60:i.neutral20,padding:r*2,":hover":{color:t?i.neutral80:i.neutral40}})},xYe=Msu,fYe=function(u){var a=u.children,t=u.innerProps;return Fe("div",ne({},pa(u,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),t),a||Fe(wsu,null))},pYe=Msu,gYe=function(u){var a=u.children,t=u.innerProps;return Fe("div",ne({},pa(u,"clearIndicator",{indicator:!0,"clear-indicator":!0}),t),a||Fe(qz,null))},CYe=function(u,a){var t=u.isDisabled,n=u.theme,r=n.spacing.baseUnit,i=n.colors;return xe({label:"indicatorSeparator",alignSelf:"stretch",width:1},a?{}:{backgroundColor:t?i.neutral10:i.neutral20,marginBottom:r*2,marginTop:r*2})},FYe=function(u){var a=u.innerProps;return Fe("span",ne({},a,pa(u,"indicatorSeparator",{"indicator-separator":!0})))},kYe=mqe(o_||(o_=gqe([`
|
|
621
621
|
0%, 80%, 100% { opacity: 0; }
|
|
622
622
|
40% { opacity: 1; }
|
|
623
|
-
`]))),vYe=function(u,a){var t=u.isFocused,n=u.size,r=u.theme,i=r.colors,o=r.spacing.baseUnit;return xe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"},a?{}:{color:t?i.neutral60:i.neutral20,padding:o*2})},vv=function(u){var a=u.delay,t=u.offset;return Fe("span",{css:Wz({animation:"".concat(kYe," 1s ease-in-out ").concat(a,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:t?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},AYe=function(u){var a=u.innerProps,t=u.isRtl,n=u.size,r=n===void 0?4:n,i=Io(u,hYe);return Fe("div",ne({},pa(xe(xe({},i),{},{innerProps:a,isRtl:t,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),a),Fe(vv,{delay:0,offset:t}),Fe(vv,{delay:160,offset:!0}),Fe(vv,{delay:320,offset:!t}))},bYe=function(u,a){var t=u.isDisabled,n=u.isFocused,r=u.theme,i=r.colors,o=r.borderRadius,s=r.spacing;return xe({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},a?{}:{backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:n?i.primary:i.neutral30}})},yYe=function(u){var a=u.children,t=u.isDisabled,n=u.isFocused,r=u.innerRef,i=u.innerProps,o=u.menuIsOpen;return Fe("div",ne({ref:r},pa(u,"control",{control:!0,"control--is-disabled":t,"control--is-focused":n,"control--menu-is-open":o}),i,{"aria-disabled":t||void 0}),a)},BYe=yYe,SYe=["data"],zYe=function(u,a){var t=u.theme.spacing;return a?{}:{paddingBottom:t.baseUnit*2,paddingTop:t.baseUnit*2}},OYe=function(u){var a=u.children,t=u.cx,n=u.getStyles,r=u.getClassNames,i=u.Heading,o=u.headingProps,s=u.innerProps,l=u.label,E=u.theme,c=u.selectProps;return Fe("div",ne({},pa(u,"group",{group:!0}),s),Fe(i,ne({},o,{selectProps:c,theme:E,getStyles:n,getClassNames:r,cx:t}),l),Fe("div",null,a))},wYe=function(u,a){var t=u.theme,n=t.colors,r=t.spacing;return xe({label:"group",cursor:"default",display:"block"},a?{}:{color:n.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:r.baseUnit*3,paddingRight:r.baseUnit*3,textTransform:"uppercase"})},MYe=function(u){var a=Asu(u);a.data;var t=Io(a,SYe);return Fe("div",ne({},pa(u,"groupHeading",{"group-heading":!0}),t))},TYe=OYe,PYe=["innerRef","isDisabled","isHidden","inputClassName"],jYe=function(u,a){var t=u.isDisabled,n=u.value,r=u.theme,i=r.spacing,o=r.colors;return xe(xe({visibility:t?"hidden":"visible",transform:n?"translateZ(0)":""},NYe),a?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:o.neutral80})},Tsu={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},NYe={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":xe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Tsu)},RYe=function(u){return xe({label:"input",color:"inherit",background:0,opacity:u?0:1,width:"100%"},Tsu)},LYe=function(u){var a=u.cx,t=u.value,n=Asu(u),r=n.innerRef,i=n.isDisabled,o=n.isHidden,s=n.inputClassName,l=Io(n,PYe);return Fe("div",ne({},pa(u,"input",{"input-container":!0}),{"data-value":t||""}),Fe("input",ne({className:a({input:!0},s),ref:r,style:RYe(o),disabled:i},l)))},_Ye=LYe,IYe=function(u,a){var t=u.theme,n=t.spacing,r=t.borderRadius,i=t.colors;return xe({label:"multiValue",display:"flex",minWidth:0},a?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:n.baseUnit/2})},KYe=function(u,a){var t=u.theme,n=t.borderRadius,r=t.colors,i=u.cropWithEllipsis;return xe({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},a?{}:{borderRadius:n/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},$Ye=function(u,a){var t=u.theme,n=t.spacing,r=t.borderRadius,i=t.colors,o=u.isFocused;return xe({alignItems:"center",display:"flex"},a?{}:{borderRadius:r/2,backgroundColor:o?i.dangerLight:void 0,paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},Psu=function(u){var a=u.children,t=u.innerProps;return Fe("div",t,a)},VYe=Psu,HYe=Psu;function GYe(e){var u=e.children,a=e.innerProps;return Fe("div",ne({role:"button"},a),u||Fe(qz,{size:14}))}var JYe=function(u){var a=u.children,t=u.components,n=u.data,r=u.innerProps,i=u.isDisabled,o=u.removeProps,s=u.selectProps,l=t.Container,E=t.Label,c=t.Remove;return Fe(l,{data:n,innerProps:xe(xe({},pa(u,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:s},Fe(E,{data:n,innerProps:xe({},pa(u,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},a),Fe(c,{data:n,innerProps:xe(xe({},pa(u,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(a||"option")},o),selectProps:s}))},WYe=JYe,UYe=function(u,a){var t=u.isDisabled,n=u.isFocused,r=u.isSelected,i=u.theme,o=i.spacing,s=i.colors;return xe({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},a?{}:{backgroundColor:r?s.primary:n?s.primary25:"transparent",color:t?s.neutral20:r?s.neutral0:"inherit",padding:"".concat(o.baseUnit*2,"px ").concat(o.baseUnit*3,"px"),":active":{backgroundColor:t?void 0:r?s.primary:s.primary50}})},ZYe=function(u){var a=u.children,t=u.isDisabled,n=u.isFocused,r=u.isSelected,i=u.innerRef,o=u.innerProps;return Fe("div",ne({},pa(u,"option",{option:!0,"option--is-disabled":t,"option--is-focused":n,"option--is-selected":r}),{ref:i,"aria-disabled":t},o),a)},QYe=ZYe,qYe=function(u,a){var t=u.theme,n=t.spacing,r=t.colors;return xe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},a?{}:{color:r.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2})},YYe=function(u){var a=u.children,t=u.innerProps;return Fe("div",ne({},pa(u,"placeholder",{placeholder:!0}),t),a)},XYe=YYe,uXe=function(u,a){var t=u.isDisabled,n=u.theme,r=n.spacing,i=n.colors;return xe({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},a?{}:{color:t?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},eXe=function(u){var a=u.children,t=u.isDisabled,n=u.innerProps;return Fe("div",ne({},pa(u,"singleValue",{"single-value":!0,"single-value--is-disabled":t}),n),a)},aXe=eXe,tXe={ClearIndicator:gYe,Control:BYe,DropdownIndicator:fYe,DownChevron:wsu,CrossIcon:qz,Group:TYe,GroupHeading:MYe,IndicatorsContainer:dYe,IndicatorSeparator:FYe,Input:_Ye,LoadingIndicator:AYe,Menu:Yqe,MenuList:uYe,MenuPortal:iYe,LoadingMessage:nYe,NoOptionsMessage:tYe,MultiValue:WYe,MultiValueContainer:VYe,MultiValueLabel:HYe,MultiValueRemove:GYe,Option:QYe,Placeholder:XYe,SelectContainer:sYe,SingleValue:aXe,ValueContainer:EYe},nXe=function(u){return xe(xe({},tXe),u.components)},s_=Number.isNaN||function(u){return typeof u=="number"&&u!==u};function rXe(e,u){return!!(e===u||s_(e)&&s_(u))}function iXe(e,u){if(e.length!==u.length)return!1;for(var a=0;a<e.length;a++)if(!rXe(e[a],u[a]))return!1;return!0}function oXe(e,u){u===void 0&&(u=iXe);var a=null;function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(a&&a.lastThis===this&&u(n,a.lastArgs))return a.lastResult;var i=e.apply(this,n);return a={lastResult:i,lastArgs:n,lastThis:this},i}return t.clear=function(){a=null},t}var sXe={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"},lXe=function(u){return Fe("span",ne({css:sXe},u))},l_=lXe,EXe={guidance:function(u){var a=u.isSearchable,t=u.isMulti,n=u.tabSelectsValue,r=u.context,i=u.isInitialFocus;switch(r){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(n?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(u["aria-label"]||"Select"," is focused ").concat(a?",type to refine list":"",", press Down to open the menu, ").concat(t?" 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(u){var a=u.action,t=u.label,n=t===void 0?"":t,r=u.labels,i=u.isDisabled;switch(a){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(r.length>1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return i?"option ".concat(n," is disabled. Select another option."):"option ".concat(n,", selected.");default:return""}},onFocus:function(u){var a=u.context,t=u.focused,n=u.options,r=u.label,i=r===void 0?"":r,o=u.selectValue,s=u.isDisabled,l=u.isSelected,E=u.isAppleDevice,c=function(x,C){return x&&x.length?"".concat(x.indexOf(C)+1," of ").concat(x.length):""};if(a==="value"&&o)return"value ".concat(i," focused, ").concat(c(o,t),".");if(a==="menu"&&E){var d=s?" disabled":"",h="".concat(l?" selected":"").concat(d);return"".concat(i).concat(h,", ").concat(c(n,t),".")}return""},onFilter:function(u){var a=u.inputValue,t=u.resultsMessage;return"".concat(t).concat(a?" for search term "+a:"",".")}},cXe=function(u){var a=u.ariaSelection,t=u.focusedOption,n=u.focusedValue,r=u.focusableOptions,i=u.isFocused,o=u.selectValue,s=u.selectProps,l=u.id,E=u.isAppleDevice,c=s.ariaLiveMessages,d=s.getOptionLabel,h=s.inputValue,m=s.isMulti,x=s.isOptionDisabled,C=s.isSearchable,p=s.menuIsOpen,g=s.options,F=s.screenReaderStatus,v=s.tabSelectsValue,y=s.isLoading,A=s["aria-label"],b=s["aria-live"],B=f.useMemo(function(){return xe(xe({},EXe),c||{})},[c]),T=f.useMemo(function(){var N="";if(a&&B.onChange){var z=a.option,L=a.options,w=a.removedValue,j=a.removedValues,K=a.value,W=function(iu){return Array.isArray(iu)?null:iu},P=w||z||W(K),G=P?d(P):"",Z=L||j||void 0,J=Z?Z.map(d):[],nu=xe({isDisabled:P&&x(P,o),label:G,labels:J},a);N=B.onChange(nu)}return N},[a,B,x,o,d]),_=f.useMemo(function(){var N="",z=t||n,L=!!(t&&o&&o.includes(t));if(z&&B.onFocus){var w={focused:z,label:d(z),isDisabled:x(z,o),isSelected:L,options:r,context:z===t?"menu":"value",selectValue:o,isAppleDevice:E};N=B.onFocus(w)}return N},[t,n,d,x,B,r,o,E]),$=f.useMemo(function(){var N="";if(p&&g.length&&!y&&B.onFilter){var z=F({count:r.length});N=B.onFilter({inputValue:h,resultsMessage:z})}return N},[r,h,p,B,g,F,y]),M=(a==null?void 0:a.action)==="initial-input-focus",R=f.useMemo(function(){var N="";if(B.guidance){var z=n?"value":p?"menu":"input";N=B.guidance({"aria-label":A,context:z,isDisabled:t&&x(t,o),isMulti:m,isSearchable:C,tabSelectsValue:v,isInitialFocus:M})}return N},[A,t,n,m,x,C,p,B,o,v,M]),O=Fe(f.Fragment,null,Fe("span",{id:"aria-selection"},T),Fe("span",{id:"aria-focused"},_),Fe("span",{id:"aria-results"},$),Fe("span",{id:"aria-guidance"},R));return Fe(f.Fragment,null,Fe(l_,{id:l},M&&O),Fe(l_,{"aria-live":b,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!M&&O))},dXe=cXe,Z9=[{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źẑżžẓẕƶȥɀⱬꝣ"}],DXe=new RegExp("["+Z9.map(function(e){return e.letters}).join("")+"]","g"),jsu={};for(var Av=0;Av<Z9.length;Av++)for(var bv=Z9[Av],yv=0;yv<bv.letters.length;yv++)jsu[bv.letters[yv]]=bv.base;var Nsu=function(u){return u.replace(DXe,function(a){return jsu[a]})},hXe=oXe(Nsu),E_=function(u){return u.replace(/^\s+|\s+$/g,"")},mXe=function(u){return"".concat(u.label," ").concat(u.value)},xXe=function(u){return function(a,t){if(a.data.__isNew__)return!0;var n=xe({ignoreCase:!0,ignoreAccents:!0,stringify:mXe,trim:!0,matchFrom:"any"},u),r=n.ignoreCase,i=n.ignoreAccents,o=n.stringify,s=n.trim,l=n.matchFrom,E=s?E_(t):t,c=s?E_(o(a)):o(a);return r&&(E=E.toLowerCase(),c=c.toLowerCase()),i&&(E=hXe(E),c=Nsu(c)),l==="start"?c.substr(0,E.length)===E:c.indexOf(E)>-1}},fXe=["innerRef"];function pXe(e){var u=e.innerRef,a=Io(e,fXe),t=Hqe(a,"onExited","in","enter","exit","appear");return Fe("input",ne({ref:u},t,{css:Wz({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 gXe=function(u){u.cancelable&&u.preventDefault(),u.stopPropagation()};function CXe(e){var u=e.isEnabled,a=e.onBottomArrive,t=e.onBottomLeave,n=e.onTopArrive,r=e.onTopLeave,i=f.useRef(!1),o=f.useRef(!1),s=f.useRef(0),l=f.useRef(null),E=f.useCallback(function(C,p){if(l.current!==null){var g=l.current,F=g.scrollTop,v=g.scrollHeight,y=g.clientHeight,A=l.current,b=p>0,B=v-y-F,T=!1;B>p&&i.current&&(t&&t(C),i.current=!1),b&&o.current&&(r&&r(C),o.current=!1),b&&p>B?(a&&!i.current&&a(C),A.scrollTop=v,T=!0,i.current=!0):!b&&-p>F&&(n&&!o.current&&n(C),A.scrollTop=0,T=!0,o.current=!0),T&&gXe(C)}},[a,t,n,r]),c=f.useCallback(function(C){E(C,C.deltaY)},[E]),d=f.useCallback(function(C){s.current=C.changedTouches[0].clientY},[]),h=f.useCallback(function(C){var p=s.current-C.changedTouches[0].clientY;E(C,p)},[E]),m=f.useCallback(function(C){if(C){var p=Kqe?{passive:!1}:!1;C.addEventListener("wheel",c,p),C.addEventListener("touchstart",d,p),C.addEventListener("touchmove",h,p)}},[h,d,c]),x=f.useCallback(function(C){C&&(C.removeEventListener("wheel",c,!1),C.removeEventListener("touchstart",d,!1),C.removeEventListener("touchmove",h,!1))},[h,d,c]);return f.useEffect(function(){if(u){var C=l.current;return m(C),function(){x(C)}}},[u,m,x]),function(C){l.current=C}}var c_=["boxSizing","height","overflow","paddingRight","position"],d_={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function D_(e){e.preventDefault()}function h_(e){e.stopPropagation()}function m_(){var e=this.scrollTop,u=this.scrollHeight,a=e+this.offsetHeight;e===0?this.scrollTop=1:a===u&&(this.scrollTop=e-1)}function x_(){return"ontouchstart"in window||navigator.maxTouchPoints}var f_=!!(typeof window<"u"&&window.document&&window.document.createElement),Rd=0,kE={capture:!1,passive:!1};function FXe(e){var u=e.isEnabled,a=e.accountForScrollbars,t=a===void 0?!0:a,n=f.useRef({}),r=f.useRef(null),i=f.useCallback(function(s){if(f_){var l=document.body,E=l&&l.style;if(t&&c_.forEach(function(m){var x=E&&E[m];n.current[m]=x}),t&&Rd<1){var c=parseInt(n.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,h=window.innerWidth-d+c||0;Object.keys(d_).forEach(function(m){var x=d_[m];E&&(E[m]=x)}),E&&(E.paddingRight="".concat(h,"px"))}l&&x_()&&(l.addEventListener("touchmove",D_,kE),s&&(s.addEventListener("touchstart",m_,kE),s.addEventListener("touchmove",h_,kE))),Rd+=1}},[t]),o=f.useCallback(function(s){if(f_){var l=document.body,E=l&&l.style;Rd=Math.max(Rd-1,0),t&&Rd<1&&c_.forEach(function(c){var d=n.current[c];E&&(E[c]=d)}),l&&x_()&&(l.removeEventListener("touchmove",D_,kE),s&&(s.removeEventListener("touchstart",m_,kE),s.removeEventListener("touchmove",h_,kE)))}},[t]);return f.useEffect(function(){if(u){var s=r.current;return i(s),function(){o(s)}}},[u,i,o]),function(s){r.current=s}}var kXe=function(u){var a=u.target;return a.ownerDocument.activeElement&&a.ownerDocument.activeElement.blur()},vXe={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function AXe(e){var u=e.children,a=e.lockEnabled,t=e.captureEnabled,n=t===void 0?!0:t,r=e.onBottomArrive,i=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,l=CXe({isEnabled:n,onBottomArrive:r,onBottomLeave:i,onTopArrive:o,onTopLeave:s}),E=FXe({isEnabled:a}),c=function(h){l(h),E(h)};return Fe(f.Fragment,null,a&&Fe("div",{onClick:kXe,css:vXe}),u(c))}var bXe={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},yXe=function(u){var a=u.name,t=u.onFocus;return Fe("input",{required:!0,name:a,tabIndex:-1,"aria-hidden":"true",onFocus:t,css:bXe,value:"",onChange:function(){}})},BXe=yXe;function Yz(e){var u;return typeof window<"u"&&window.navigator!=null?e.test(((u=window.navigator.userAgentData)===null||u===void 0?void 0:u.platform)||window.navigator.platform):!1}function SXe(){return Yz(/^iPhone/i)}function Rsu(){return Yz(/^Mac/i)}function zXe(){return Yz(/^iPad/i)||Rsu()&&navigator.maxTouchPoints>1}function OXe(){return SXe()||zXe()}function wXe(){return Rsu()||OXe()}var MXe=function(u){return u.label},Lsu=function(u){return u.label},_su=function(u){return u.value},TXe=function(u){return!!u.isDisabled},PXe={clearIndicator:pYe,container:oYe,control:bYe,dropdownIndicator:xYe,group:zYe,groupHeading:wYe,indicatorsContainer:cYe,indicatorSeparator:CYe,input:jYe,loadingIndicator:vYe,loadingMessage:aYe,menu:Zqe,menuList:Xqe,menuPortal:rYe,multiValue:IYe,multiValueLabel:KYe,multiValueRemove:$Ye,noOptionsMessage:eYe,option:UYe,placeholder:qYe,singleValue:uXe,valueContainer:lYe},jXe={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%)"},NXe=4,Isu=4,RXe=38,LXe=Isu*2,_Xe={baseUnit:Isu,controlHeight:RXe,menuGutter:LXe},Bv={borderRadius:NXe,colors:jXe,spacing:_Xe},IXe={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:i_(),captureMenuScroll:!i_(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:xXe(),formatGroupLabel:MXe,getOptionLabel:Lsu,getOptionValue:_su,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:TXe,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!_qe(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(u){var a=u.count;return"".concat(a," result").concat(a!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function p_(e,u,a,t){var n=Vsu(e,u,a),r=Hsu(e,u,a),i=$su(e,u),o=wp(e,u);return{type:"option",data:u,isDisabled:n,isSelected:r,label:i,value:o,index:t}}function g6(e,u){return e.options.map(function(a,t){if("options"in a){var n=a.options.map(function(i,o){return p_(e,i,u,o)}).filter(function(i){return C_(e,i)});return n.length>0?{type:"group",data:a,options:n,index:t}:void 0}var r=p_(e,a,u,t);return C_(e,r)?r:void 0}).filter($qe)}function Ksu(e){return e.reduce(function(u,a){return a.type==="group"?u.push.apply(u,vc(a.options.map(function(t){return t.data}))):u.push(a.data),u},[])}function g_(e,u){return e.reduce(function(a,t){return t.type==="group"?a.push.apply(a,vc(t.options.map(function(n){return{data:n.data,id:"".concat(u,"-").concat(t.index,"-").concat(n.index)}}))):a.push({data:t.data,id:"".concat(u,"-").concat(t.index)}),a},[])}function KXe(e,u){return Ksu(g6(e,u))}function C_(e,u){var a=e.inputValue,t=a===void 0?"":a,n=u.data,r=u.isSelected,i=u.label,o=u.value;return(!Jsu(e)||!r)&&Gsu(e,{label:i,value:o,data:n},t)}function $Xe(e,u){var a=e.focusedValue,t=e.selectValue,n=t.indexOf(a);if(n>-1){var r=u.indexOf(a);if(r>-1)return a;if(n<u.length)return u[n]}return null}function VXe(e,u){var a=e.focusedOption;return a&&u.indexOf(a)>-1?a:u[0]}var Sv=function(u,a){var t,n=(t=u.find(function(r){return r.data===a}))===null||t===void 0?void 0:t.id;return n||null},$su=function(u,a){return u.getOptionLabel(a)},wp=function(u,a){return u.getOptionValue(a)};function Vsu(e,u,a){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(u,a):!1}function Hsu(e,u,a){if(a.indexOf(u)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(u,a);var t=wp(e,u);return a.some(function(n){return wp(e,n)===t})}function Gsu(e,u,a){return e.filterOption?e.filterOption(u,a):!0}var Jsu=function(u){var a=u.hideSelectedOptions,t=u.isMulti;return a===void 0?t:a},HXe=1,Wsu=function(e){oQe(a,e);var u=EQe(a);function a(t){var n;if(rQe(this,a),n=u.call(this,t),n.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:""},n.blockOptionHover=!1,n.isComposing=!1,n.commonProps=void 0,n.initialTouchX=0,n.initialTouchY=0,n.openAfterFocus=!1,n.scrollToFocusedOptionOnUpdate=!1,n.userIsDragging=void 0,n.isAppleDevice=wXe(),n.controlRef=null,n.getControlRef=function(s){n.controlRef=s},n.focusedOptionRef=null,n.getFocusedOptionRef=function(s){n.focusedOptionRef=s},n.menuListRef=null,n.getMenuListRef=function(s){n.menuListRef=s},n.inputRef=null,n.getInputRef=function(s){n.inputRef=s},n.focus=n.focusInput,n.blur=n.blurInput,n.onChange=function(s,l){var E=n.props,c=E.onChange,d=E.name;l.name=d,n.ariaOnChange(s,l),c(s,l)},n.setValue=function(s,l,E){var c=n.props,d=c.closeMenuOnSelect,h=c.isMulti,m=c.inputValue;n.onInputChange("",{action:"set-value",prevInputValue:m}),d&&(n.setState({inputIsHiddenAfterUpdate:!h}),n.onMenuClose()),n.setState({clearFocusValueOnUpdate:!0}),n.onChange(s,{action:l,option:E})},n.selectOption=function(s){var l=n.props,E=l.blurInputOnSelect,c=l.isMulti,d=l.name,h=n.state.selectValue,m=c&&n.isOptionSelected(s,h),x=n.isOptionDisabled(s,h);if(m){var C=n.getOptionValue(s);n.setValue(h.filter(function(p){return n.getOptionValue(p)!==C}),"deselect-option",s)}else if(!x)c?n.setValue([].concat(vc(h),[s]),"select-option",s):n.setValue(s,"select-option");else{n.ariaOnChange(s,{action:"select-option",option:s,name:d});return}E&&n.blurInput()},n.removeValue=function(s){var l=n.props.isMulti,E=n.state.selectValue,c=n.getOptionValue(s),d=E.filter(function(m){return n.getOptionValue(m)!==c}),h=r5(l,d,d[0]||null);n.onChange(h,{action:"remove-value",removedValue:s}),n.focusInput()},n.clearValue=function(){var s=n.state.selectValue;n.onChange(r5(n.props.isMulti,[],null),{action:"clear",removedValues:s})},n.popValue=function(){var s=n.props.isMulti,l=n.state.selectValue,E=l[l.length-1],c=l.slice(0,l.length-1),d=r5(s,c,c[0]||null);n.onChange(d,{action:"pop-value",removedValue:E})},n.getFocusedOptionId=function(s){return Sv(n.state.focusableOptionsWithIds,s)},n.getFocusableOptionsWithIds=function(){return g_(g6(n.props,n.state.selectValue),n.getElementId("option"))},n.getValue=function(){return n.state.selectValue},n.cx=function(){for(var s=arguments.length,l=new Array(s),E=0;E<s;E++)l[E]=arguments[E];return Pqe.apply(void 0,[n.props.classNamePrefix].concat(l))},n.getOptionLabel=function(s){return $su(n.props,s)},n.getOptionValue=function(s){return wp(n.props,s)},n.getStyles=function(s,l){var E=n.props.unstyled,c=PXe[s](l,E);c.boxSizing="border-box";var d=n.props.styles[s];return d?d(c,l):c},n.getClassNames=function(s,l){var E,c;return(E=(c=n.props.classNames)[s])===null||E===void 0?void 0:E.call(c,l)},n.getElementId=function(s){return"".concat(n.state.instancePrefix,"-").concat(s)},n.getComponents=function(){return nXe(n.props)},n.buildCategorizedOptions=function(){return g6(n.props,n.state.selectValue)},n.getCategorizedOptions=function(){return n.props.menuIsOpen?n.buildCategorizedOptions():[]},n.buildFocusableOptions=function(){return Ksu(n.buildCategorizedOptions())},n.getFocusableOptions=function(){return n.props.menuIsOpen?n.buildFocusableOptions():[]},n.ariaOnChange=function(s,l){n.setState({ariaSelection:xe({value:s},l)})},n.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),n.focusInput())},n.onMenuMouseMove=function(s){n.blockOptionHover=!1},n.onControlMouseDown=function(s){if(!s.defaultPrevented){var l=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&n.onMenuClose():l&&n.openMenu("first"):(l&&(n.openAfterFocus=!0),n.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},n.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0)&&!n.props.isDisabled){var l=n.props,E=l.isMulti,c=l.menuIsOpen;n.focusInput(),c?(n.setState({inputIsHiddenAfterUpdate:!E}),n.onMenuClose()):n.openMenu("first"),s.preventDefault()}},n.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(n.clearValue(),s.preventDefault(),n.openAfterFocus=!1,s.type==="touchend"?n.focusInput():setTimeout(function(){return n.focusInput()}))},n.onScroll=function(s){typeof n.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&SC(s.target)&&n.props.onMenuClose():typeof n.props.closeMenuOnScroll=="function"&&n.props.closeMenuOnScroll(s)&&n.props.onMenuClose()},n.onCompositionStart=function(){n.isComposing=!0},n.onCompositionEnd=function(){n.isComposing=!1},n.onTouchStart=function(s){var l=s.touches,E=l&&l.item(0);E&&(n.initialTouchX=E.clientX,n.initialTouchY=E.clientY,n.userIsDragging=!1)},n.onTouchMove=function(s){var l=s.touches,E=l&&l.item(0);if(E){var c=Math.abs(E.clientX-n.initialTouchX),d=Math.abs(E.clientY-n.initialTouchY),h=5;n.userIsDragging=c>h||d>h}},n.onTouchEnd=function(s){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(s.target)&&n.menuListRef&&!n.menuListRef.contains(s.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)},n.onControlTouchEnd=function(s){n.userIsDragging||n.onControlMouseDown(s)},n.onClearIndicatorTouchEnd=function(s){n.userIsDragging||n.onClearIndicatorMouseDown(s)},n.onDropdownIndicatorTouchEnd=function(s){n.userIsDragging||n.onDropdownIndicatorMouseDown(s)},n.handleInputChange=function(s){var l=n.props.inputValue,E=s.currentTarget.value;n.setState({inputIsHiddenAfterUpdate:!1}),n.onInputChange(E,{action:"input-change",prevInputValue:l}),n.props.menuIsOpen||n.onMenuOpen()},n.onInputFocus=function(s){n.props.onFocus&&n.props.onFocus(s),n.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1},n.onInputBlur=function(s){var l=n.props.inputValue;if(n.menuListRef&&n.menuListRef.contains(document.activeElement)){n.inputRef.focus();return}n.props.onBlur&&n.props.onBlur(s),n.onInputChange("",{action:"input-blur",prevInputValue:l}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1})},n.onOptionHover=function(s){if(!(n.blockOptionHover||n.state.focusedOption===s)){var l=n.getFocusableOptions(),E=l.indexOf(s);n.setState({focusedOption:s,focusedOptionId:E>-1?n.getFocusedOptionId(s):null})}},n.shouldHideSelectedOptions=function(){return Jsu(n.props)},n.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),n.focus()},n.onKeyDown=function(s){var l=n.props,E=l.isMulti,c=l.backspaceRemovesValue,d=l.escapeClearsValue,h=l.inputValue,m=l.isClearable,x=l.isDisabled,C=l.menuIsOpen,p=l.onKeyDown,g=l.tabSelectsValue,F=l.openMenuOnFocus,v=n.state,y=v.focusedOption,A=v.focusedValue,b=v.selectValue;if(!x&&!(typeof p=="function"&&(p(s),s.defaultPrevented))){switch(n.blockOptionHover=!0,s.key){case"ArrowLeft":if(!E||h)return;n.focusValue("previous");break;case"ArrowRight":if(!E||h)return;n.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(A)n.removeValue(A);else{if(!c)return;E?n.popValue():m&&n.clearValue()}break;case"Tab":if(n.isComposing||s.shiftKey||!C||!g||!y||F&&n.isOptionSelected(y,b))return;n.selectOption(y);break;case"Enter":if(s.keyCode===229)break;if(C){if(!y||n.isComposing)return;n.selectOption(y);break}return;case"Escape":C?(n.setState({inputIsHiddenAfterUpdate:!1}),n.onInputChange("",{action:"menu-close",prevInputValue:h}),n.onMenuClose()):m&&d&&n.clearValue();break;case" ":if(h)return;if(!C){n.openMenu("first");break}if(!y)return;n.selectOption(y);break;case"ArrowUp":C?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":C?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!C)return;n.focusOption("pageup");break;case"PageDown":if(!C)return;n.focusOption("pagedown");break;case"Home":if(!C)return;n.focusOption("first");break;case"End":if(!C)return;n.focusOption("last");break;default:return}s.preventDefault()}},n.state.instancePrefix="react-select-"+(n.props.instanceId||++HXe),n.state.selectValue=zp(t.value),t.menuIsOpen&&n.state.selectValue.length){var r=n.getFocusableOptionsWithIds(),i=n.buildFocusableOptions(),o=i.indexOf(n.state.selectValue[0]);n.state.focusableOptionsWithIds=r,n.state.focusedOption=i[o],n.state.focusedOptionId=Sv(r,i[o])}return n}return iQe(a,[{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&&r_(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(n){var r=this.props,i=r.isDisabled,o=r.menuIsOpen,s=this.state.isFocused;(s&&!i&&n.isDisabled||s&&o&&!n.menuIsOpen)&&this.focusInput(),s&&i&&!n.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!s&&!i&&n.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(r_(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(n,r){this.props.onInputChange(n,r)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(n){var r=this,i=this.state,o=i.selectValue,s=i.isFocused,l=this.buildFocusableOptions(),E=n==="first"?0:l.length-1;if(!this.props.isMulti){var c=l.indexOf(o[0]);c>-1&&(E=c)}this.scrollToFocusedOptionOnUpdate=!(s&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[E],focusedOptionId:this.getFocusedOptionId(l[E])},function(){return r.onMenuOpen()})}},{key:"focusValue",value:function(n){var r=this.state,i=r.selectValue,o=r.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var s=i.indexOf(o);o||(s=-1);var l=i.length-1,E=-1;if(i.length){switch(n){case"previous":s===0?E=0:s===-1?E=l:E=s-1;break;case"next":s>-1&&s<l&&(E=s+1);break}this.setState({inputIsHidden:E!==-1,focusedValue:i[E]})}}}},{key:"focusOption",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",r=this.props.pageSize,i=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var s=0,l=o.indexOf(i);i||(l=-1),n==="up"?s=l>0?l-1:o.length-1:n==="down"?s=(l+1)%o.length:n==="pageup"?(s=l-r,s<0&&(s=0)):n==="pagedown"?(s=l+r,s>o.length-1&&(s=o.length-1)):n==="last"&&(s=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[s],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[s])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Bv):xe(xe({},Bv),this.props.theme):Bv}},{key:"getCommonProps",value:function(){var n=this.clearValue,r=this.cx,i=this.getStyles,o=this.getClassNames,s=this.getValue,l=this.selectOption,E=this.setValue,c=this.props,d=c.isMulti,h=c.isRtl,m=c.options,x=this.hasValue();return{clearValue:n,cx:r,getStyles:i,getClassNames:o,getValue:s,hasValue:x,isMulti:d,isRtl:h,options:m,selectOption:l,selectProps:c,setValue:E,theme:this.getTheme()}}},{key:"hasValue",value:function(){var n=this.state.selectValue;return n.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var n=this.props,r=n.isClearable,i=n.isMulti;return r===void 0?i:r}},{key:"isOptionDisabled",value:function(n,r){return Vsu(this.props,n,r)}},{key:"isOptionSelected",value:function(n,r){return Hsu(this.props,n,r)}},{key:"filterOption",value:function(n,r){return Gsu(this.props,n,r)}},{key:"formatOptionLabel",value:function(n,r){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(n,{context:r,inputValue:i,selectValue:o})}else return this.getOptionLabel(n)}},{key:"formatGroupLabel",value:function(n){return this.props.formatGroupLabel(n)}},{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 n=this.props,r=n.isDisabled,i=n.isSearchable,o=n.inputId,s=n.inputValue,l=n.tabIndex,E=n.form,c=n.menuIsOpen,d=n.required,h=this.getComponents(),m=h.Input,x=this.state,C=x.inputIsHidden,p=x.ariaSelection,g=this.commonProps,F=o||this.getElementId("input"),v=xe(xe(xe({"aria-autocomplete":"list","aria-expanded":c,"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":d,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},c&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?(p==null?void 0:p.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?f.createElement(m,ne({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:F,innerRef:this.getInputRef,isDisabled:r,isHidden:C,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:E,type:"text",value:s},v)):f.createElement(pXe,ne({id:F,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Sp,onFocus:this.onInputFocus,disabled:r,tabIndex:l,inputMode:"none",form:E,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var n=this,r=this.getComponents(),i=r.MultiValue,o=r.MultiValueContainer,s=r.MultiValueLabel,l=r.MultiValueRemove,E=r.SingleValue,c=r.Placeholder,d=this.commonProps,h=this.props,m=h.controlShouldRenderValue,x=h.isDisabled,C=h.isMulti,p=h.inputValue,g=h.placeholder,F=this.state,v=F.selectValue,y=F.focusedValue,A=F.isFocused;if(!this.hasValue()||!m)return p?null:f.createElement(c,ne({},d,{key:"placeholder",isDisabled:x,isFocused:A,innerProps:{id:this.getElementId("placeholder")}}),g);if(C)return v.map(function(B,T){var _=B===y,$="".concat(n.getOptionLabel(B),"-").concat(n.getOptionValue(B));return f.createElement(i,ne({},d,{components:{Container:o,Label:s,Remove:l},isFocused:_,isDisabled:x,key:$,index:T,removeProps:{onClick:function(){return n.removeValue(B)},onTouchEnd:function(){return n.removeValue(B)},onMouseDown:function(R){R.preventDefault()}},data:B}),n.formatOptionLabel(B,"value"))});if(p)return null;var b=v[0];return f.createElement(E,ne({},d,{data:b,isDisabled:x}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var n=this.getComponents(),r=n.ClearIndicator,i=this.commonProps,o=this.props,s=o.isDisabled,l=o.isLoading,E=this.state.isFocused;if(!this.isClearable()||!r||s||!this.hasValue()||l)return null;var c={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(r,ne({},i,{innerProps:c,isFocused:E}))}},{key:"renderLoadingIndicator",value:function(){var n=this.getComponents(),r=n.LoadingIndicator,i=this.commonProps,o=this.props,s=o.isDisabled,l=o.isLoading,E=this.state.isFocused;if(!r||!l)return null;var c={"aria-hidden":"true"};return f.createElement(r,ne({},i,{innerProps:c,isDisabled:s,isFocused:E}))}},{key:"renderIndicatorSeparator",value:function(){var n=this.getComponents(),r=n.DropdownIndicator,i=n.IndicatorSeparator;if(!r||!i)return null;var o=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused;return f.createElement(i,ne({},o,{isDisabled:s,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var n=this.getComponents(),r=n.DropdownIndicator;if(!r)return null;var i=this.commonProps,o=this.props.isDisabled,s=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(r,ne({},i,{innerProps:l,isDisabled:o,isFocused:s}))}},{key:"renderMenu",value:function(){var n=this,r=this.getComponents(),i=r.Group,o=r.GroupHeading,s=r.Menu,l=r.MenuList,E=r.MenuPortal,c=r.LoadingMessage,d=r.NoOptionsMessage,h=r.Option,m=this.commonProps,x=this.state.focusedOption,C=this.props,p=C.captureMenuScroll,g=C.inputValue,F=C.isLoading,v=C.loadingMessage,y=C.minMenuHeight,A=C.maxMenuHeight,b=C.menuIsOpen,B=C.menuPlacement,T=C.menuPosition,_=C.menuPortalTarget,$=C.menuShouldBlockScroll,M=C.menuShouldScrollIntoView,R=C.noOptionsMessage,O=C.onMenuScrollToTop,N=C.onMenuScrollToBottom;if(!b)return null;var z=function(G,Z){var J=G.type,nu=G.data,q=G.isDisabled,iu=G.isSelected,Cu=G.label,yu=G.value,ku=x===nu,Fu=q?void 0:function(){return n.onOptionHover(nu)},Nu=q?void 0:function(){return n.selectOption(nu)},Ku="".concat(n.getElementId("option"),"-").concat(Z),ie={id:Ku,onClick:Nu,onMouseMove:Fu,onMouseOver:Fu,tabIndex:-1,role:"option","aria-selected":n.isAppleDevice?void 0:iu};return f.createElement(h,ne({},m,{innerProps:ie,data:nu,isDisabled:q,isSelected:iu,key:Ku,label:Cu,type:J,value:yu,isFocused:ku,innerRef:ku?n.getFocusedOptionRef:void 0}),n.formatOptionLabel(G.data,"menu"))},L;if(this.hasOptions())L=this.getCategorizedOptions().map(function(P){if(P.type==="group"){var G=P.data,Z=P.options,J=P.index,nu="".concat(n.getElementId("group"),"-").concat(J),q="".concat(nu,"-heading");return f.createElement(i,ne({},m,{key:nu,data:G,options:Z,Heading:o,headingProps:{id:q,data:P.data},label:n.formatGroupLabel(P.data)}),P.options.map(function(iu){return z(iu,"".concat(J,"-").concat(iu.index))}))}else if(P.type==="option")return z(P,"".concat(P.index))});else if(F){var w=v({inputValue:g});if(w===null)return null;L=f.createElement(c,m,w)}else{var j=R({inputValue:g});if(j===null)return null;L=f.createElement(d,m,j)}var K={minMenuHeight:y,maxMenuHeight:A,menuPlacement:B,menuPosition:T,menuShouldScrollIntoView:M},W=f.createElement(Qqe,ne({},m,K),function(P){var G=P.ref,Z=P.placerProps,J=Z.placement,nu=Z.maxHeight;return f.createElement(s,ne({},m,K,{innerRef:G,innerProps:{onMouseDown:n.onMenuMouseDown,onMouseMove:n.onMenuMouseMove},isLoading:F,placement:J}),f.createElement(AXe,{captureEnabled:p,onTopArrive:O,onBottomArrive:N,lockEnabled:$},function(q){return f.createElement(l,ne({},m,{innerRef:function(Cu){n.getMenuListRef(Cu),q(Cu)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:n.getElementId("listbox")},isLoading:F,maxHeight:nu,focusedOption:x}),L)}))});return _||T==="fixed"?f.createElement(E,ne({},m,{appendTo:_,controlElement:this.controlRef,menuPlacement:B,menuPosition:T}),W):W}},{key:"renderFormField",value:function(){var n=this,r=this.props,i=r.delimiter,o=r.isDisabled,s=r.isMulti,l=r.name,E=r.required,c=this.state.selectValue;if(E&&!this.hasValue()&&!o)return f.createElement(BXe,{name:l,onFocus:this.onValueInputFocus});if(!(!l||o))if(s)if(i){var d=c.map(function(x){return n.getOptionValue(x)}).join(i);return f.createElement("input",{name:l,type:"hidden",value:d})}else{var h=c.length>0?c.map(function(x,C){return f.createElement("input",{key:"i-".concat(C),name:l,type:"hidden",value:n.getOptionValue(x)})}):f.createElement("input",{name:l,type:"hidden",value:""});return f.createElement("div",null,h)}else{var m=c[0]?this.getOptionValue(c[0]):"";return f.createElement("input",{name:l,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var n=this.commonProps,r=this.state,i=r.ariaSelection,o=r.focusedOption,s=r.focusedValue,l=r.isFocused,E=r.selectValue,c=this.getFocusableOptions();return f.createElement(dXe,ne({},n,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:o,focusedValue:s,isFocused:l,selectValue:E,focusableOptions:c,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var n=this.getComponents(),r=n.Control,i=n.IndicatorsContainer,o=n.SelectContainer,s=n.ValueContainer,l=this.props,E=l.className,c=l.id,d=l.isDisabled,h=l.menuIsOpen,m=this.state.isFocused,x=this.commonProps=this.getCommonProps();return f.createElement(o,ne({},x,{className:E,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:m}),this.renderLiveRegion(),f.createElement(r,ne({},x,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:m,menuIsOpen:h}),f.createElement(s,ne({},x,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),f.createElement(i,ne({},x,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(n,r){var i=r.prevProps,o=r.clearFocusValueOnUpdate,s=r.inputIsHiddenAfterUpdate,l=r.ariaSelection,E=r.isFocused,c=r.prevWasFocused,d=r.instancePrefix,h=n.options,m=n.value,x=n.menuIsOpen,C=n.inputValue,p=n.isMulti,g=zp(m),F={};if(i&&(m!==i.value||h!==i.options||x!==i.menuIsOpen||C!==i.inputValue)){var v=x?KXe(n,g):[],y=x?g_(g6(n,g),"".concat(d,"-option")):[],A=o?$Xe(r,g):null,b=VXe(r,v),B=Sv(y,b);F={selectValue:g,focusedOption:b,focusedOptionId:B,focusableOptionsWithIds:y,focusedValue:A,clearFocusValueOnUpdate:!1}}var T=s!=null&&n!==i?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},_=l,$=E&&c;return E&&!$&&(_={value:r5(p,g,g[0]||null),options:g,action:"initial-input-focus"},$=!c),(l==null?void 0:l.action)==="initial-input-focus"&&(_=null),xe(xe(xe({},F),T),{},{prevProps:n,ariaSelection:_,prevWasFocused:$})}}]),a}(f.Component);Wsu.defaultProps=IXe;var GXe=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function JXe(e){var u=e.defaultInputValue,a=u===void 0?"":u,t=e.defaultMenuIsOpen,n=t===void 0?!1:t,r=e.defaultValue,i=r===void 0?null:r,o=e.inputValue,s=e.menuIsOpen,l=e.onChange,E=e.onInputChange,c=e.onMenuClose,d=e.onMenuOpen,h=e.value,m=Io(e,GXe),x=f.useState(o!==void 0?o:a),C=ls(x,2),p=C[0],g=C[1],F=f.useState(s!==void 0?s:n),v=ls(F,2),y=v[0],A=v[1],b=f.useState(h!==void 0?h:i),B=ls(b,2),T=B[0],_=B[1],$=f.useCallback(function(w,j){typeof l=="function"&&l(w,j),_(w)},[l]),M=f.useCallback(function(w,j){var K;typeof E=="function"&&(K=E(w,j)),g(K!==void 0?K:w)},[E]),R=f.useCallback(function(){typeof d=="function"&&d(),A(!0)},[d]),O=f.useCallback(function(){typeof c=="function"&&c(),A(!1)},[c]),N=o!==void 0?o:p,z=s!==void 0?s:y,L=h!==void 0?h:T;return xe(xe({},m),{},{inputValue:N,menuIsOpen:z,onChange:$,onInputChange:M,onMenuClose:O,onMenuOpen:R,value:L})}var WXe=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],F_=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,n=String(u).toLowerCase(),r=String(t.getOptionValue(a)).toLowerCase(),i=String(t.getOptionLabel(a)).toLowerCase();return r===n||i===n},zv={formatCreateLabel:function(u){return'Create "'.concat(u,'"')},isValidNewOption:function(u,a,t,n){return!(!u||a.some(function(r){return F_(u,r,n)})||t.some(function(r){return F_(u,r,n)}))},getNewOptionData:function(u,a){return{label:a,value:u,__isNew__:!0}}};function UXe(e){var u=e.allowCreateWhileLoading,a=u===void 0?!1:u,t=e.createOptionPosition,n=t===void 0?"last":t,r=e.formatCreateLabel,i=r===void 0?zv.formatCreateLabel:r,o=e.isValidNewOption,s=o===void 0?zv.isValidNewOption:o,l=e.getNewOptionData,E=l===void 0?zv.getNewOptionData:l,c=e.onCreateOption,d=e.options,h=d===void 0?[]:d,m=e.onChange,x=Io(e,WXe),C=x.getOptionValue,p=C===void 0?_su:C,g=x.getOptionLabel,F=g===void 0?Lsu:g,v=x.inputValue,y=x.isLoading,A=x.isMulti,b=x.value,B=x.name,T=f.useMemo(function(){return s(v,zp(b),h,{getOptionValue:p,getOptionLabel:F})?E(v,i(v)):void 0},[i,E,F,p,v,s,h,b]),_=f.useMemo(function(){return(a||!y)&&T?n==="first"?[T].concat(vc(h)):[].concat(vc(h),[T]):h},[a,n,y,T,h]),$=f.useCallback(function(M,R){if(R.action!=="select-option")return m(M,R);var O=Array.isArray(M)?M:[M];if(O[O.length-1]===T){if(c)c(v);else{var N=E(v,v),z={action:"create-option",name:B,option:N};m(r5(A,[].concat(vc(zp(b)),[N]),N),z)}return}m(M,R)},[E,v,A,B,T,c,m,b]);return xe(xe({},x),{},{options:_,onChange:$})}var ZXe=f.forwardRef(function(e,u){var a=JXe(e),t=UXe(a);return f.createElement(Wsu,ne({ref:u},t))}),QXe=ZXe;Sh.pick({parameters:!0,defaultParameters:!0,parameterEnums:!0,defaultCacheKey:!0,defaultCacheTtl:!0,defaultCacheAllInvocations:!0,autoAuth:!0,advanced:!0});const qXe=({value:e,onChange:u})=>{var a,t;return D.jsxs(wz,{children:[D.jsx(Mz,{children:D.jsxs(r4,{children:[D.jsx(q1,{children:"Name"}),D.jsx(q1,{className:"w-1/2",children:"Options"}),D.jsx(q1,{className:"w-1/2",children:"Default value"}),D.jsx(q1,{className:"w-8"})]})}),D.jsxs(Tz,{children:[(a=e.parameters)==null?void 0:a.map((n,r)=>{var i,o,s;return D.jsxs(r4,{children:[D.jsx(es,{className:"whitespace-nowrap",children:n}),D.jsx(es,{children:D.jsx(QXe,{className:"my-react-select-container",classNamePrefix:"my-react-select",placeholder:"Add options...",formatCreateLabel:l=>`Add ${l}`,isMulti:!0,isClearable:!1,styles:{menuPortal:l=>({...l,zIndex:9999})},menuPortalTarget:document.body,value:(o=(i=e.parameterEnums)==null?void 0:i[n])==null?void 0:o.map(l=>({label:l,value:l})),onChange:l=>{u({...e,parameterEnums:{...e.parameterEnums,[n]:(l==null?void 0:l.map(E=>E.value))||[]}})}})}),D.jsx(es,{children:D.jsx(pou,{singleLine:!0,value:((s=e.defaultParameters)==null?void 0:s[n])||"",language:"template-string",placeholder:"JavaScript expression",onChange:l=>{u({...e,defaultParameters:{...e.defaultParameters,[n]:l}})}})}),D.jsx(es,{children:D.jsx(_e,{type:"button",variant:"ghost",size:"smIcon",className:"text-destructive hover:text-destructive hover:bg-transparent",onClick:()=>{var c;const l={...e.defaultParameters};delete l[n];const E={...e.parameterEnums};delete E[n],u({...e,parameters:(c=e.parameters)==null?void 0:c.filter(d=>d!==n),defaultParameters:l,parameterEnums:E})},children:D.jsx(sh,{className:"h-4 w-4"})})})]},r)}),(t=e.parameters)!=null&&t.length?null:D.jsx(r4,{children:D.jsx(es,{colSpan:4,className:"h-24 text-center",children:"No parameters."})})]})]})},YXe=e=>{var t,n,r;const[u,a]=f.useState("");return D.jsxs("div",{className:"space-y-4",children:[D.jsxs("div",{className:"flex items-center gap-2",children:[D.jsx(Lt,{placeholder:"PARAMETER_NAME",value:u,onChange:i=>a(i.target.value)}),D.jsxs(_e,{variant:"outline",disabled:!u,onClick:()=>{var i,o,s;a(""),e.onChange({...e.step,parameters:{parameterNames:[...((i=e.step.parameters)==null?void 0:i.parameterNames)||[],u],defaultParameters:(o=e.step.parameters)==null?void 0:o.defaultParameters,parameterEnums:(s=e.step.parameters)==null?void 0:s.parameterEnums}})},children:[D.jsx(oh,{}),"Add"]})]}),D.jsx(qXe,{value:{parameters:(t=e.step.parameters)==null?void 0:t.parameterNames,defaultParameters:(n=e.step.parameters)==null?void 0:n.defaultParameters,parameterEnums:(r=e.step.parameters)==null?void 0:r.parameterEnums},onChange:i=>{e.onChange({...e.step,parameters:{parameterNames:i.parameters??[],defaultParameters:i.defaultParameters??void 0,parameterEnums:i.parameterEnums??void 0}})}})]})},k_=e=>{var u,a;switch(e.type){case te.AI_ACTION:return e.text.trim().length>0;case b0.MODULE:return e.name.trim().length>0;case te.PRESET:{const t=e.command;switch(t.type){case Eu.AI_CHECK:return t.assertion.trim().length>0;case Eu.TAP:return t.target.type==="description"?t.target.description.trim().length>0:!0;case Eu.TYPE:return t.text.trim().length>0;case Eu.OPEN_APP:if((u=t.intentExtras)!=null&&u.length)try{JSON.parse(t.intentExtras)}catch{return!1}return t.packageName.trim().length>0;case Eu.JAVASCRIPT:return t.code.trim().length>0;case Eu.REQUEST:return t.url.trim().length>0;case Eu.WAIT:return t.timeoutSecs>0;case Eu.ADD_FILE:return t.file.trim().length>0&&t.storageLocation.trim().length>0;case Eu.INSTALL_APP:return t.uri.trim().length>0;case Eu.ADB:if((a=t.jsonArgs)!=null&&a.length)try{JSON.parse(t.jsonArgs)}catch{return!1}return t.command.trim().length>0;case Eu.SWIPE:return t.scrollableElement.type===br.CUSTOM?t.scrollableElement.target.description.trim().length>0:!0;default:return!0}}}return!0},XXe={[yr.BACK]:"Back",[yr.HOME]:"Home",[yr.APP_SWITCHER]:"App switcher",[yr.POWER]:"Power",[yr.SEARCH]:"Search",[yr.VOLUME_UP]:"Volume up",[yr.VOLUME_DOWN]:"Volume down",[yr.VOLUME_MUTE]:"Volume mute"},uu0={[ic.BACKSPACE]:"Backspace",[ic.CLOSE_KEYBOARD]:"Close keyboard",[ic.ENTER]:"Enter"},Re=(e,u)=>e.type===u,E0=(e,u)=>e.type===u,Ov=e=>{if(!e)return"";switch(e.type){case"description":return e.description;case"coordinates":return`${e.xPercent}%, ${e.yPercent}%`}},eu0=({state:e,modules:u,onChange:a})=>{var m,x,C,p;const t=n3(e),n=f.useMemo(()=>{switch(t.type){case te.AI_ACTION:return{type:te.AI_ACTION};case te.PRESET:return{type:te.PRESET,command:t.command.type};case b0.MODULE:return{...t,type:b0.MODULE}}},[t]),[r,i]=cb(t),o=()=>{if(k_(r)){a==null||a(r);return}i(t)},s=g=>{k_(g)&&(a==null||a(g)),i(t)};f.useEffect(()=>{i(t)},[t,i]);const l=[],E=[],c=[],d=[],h=[];switch(r.type){case te.AI_ACTION:E.push(D.jsxs(x0,{children:[D.jsx(Gs,{placeholder:"Re-enable 2FA in account settings and confirm it is active.",value:r.text,onChange:g=>{const F=g.target.value;i(v=>{Re(v,te.AI_ACTION)&&(v.text=F)})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Goal"})})]},"ai-action-goal"));break;case b0.MODULE:d.push(D.jsxs(x0,{children:[D.jsx(gn,{value:r.name,onChange:g=>{const F=g.target.value;i(v=>{Re(v,b0.MODULE)&&(v.name=F)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Name"})})]},"module-name"),D.jsxs(x0,{children:[D.jsx(Gs,{value:r.description,onChange:g=>{const F=g.target.value;i(v=>{Re(v,b0.MODULE)&&(v.description=F)})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Description"})})]},"module-description"),D.jsxs(zf,{onOpenChange:()=>{i(g=>{var F,v;if(Re(g,b0.MODULE)){const y=(F=g.parameters)==null?void 0:F.defaultParameters;y&&(Object.keys(y).forEach(b=>{y[b].trim()||delete y[b]}),Object.keys(y||{}).length||(g.parameters.defaultParameters=void 0));const A=(v=g.parameters)==null?void 0:v.parameterEnums;A&&(Object.keys(A).forEach(b=>{A[b].length||delete A[b]}),Object.keys(A||{}).length||(g.parameters.parameterEnums=void 0)),s(Ra(g))}})},children:[D.jsx(Of,{asChild:!0,children:D.jsxs(_e,{variant:"outline",className:"w-fit",children:[D.jsx(IA,{}),"Configure parameters"]})}),D.jsx(vD,{className:"w-[700px]",side:"right",align:"start",children:D.jsx(YXe,{step:r,onChange:g=>{i(F=>{Re(F,b0.MODULE)&&(F.parameters=g.parameters)})}})})]},"module-parameters")),(m=r.parameters)==null||m.parameterNames.forEach(g=>{var F,v,y;h.push(D.jsxs(x0,{children:[D.jsx(gn,{placeholder:((v=(F=r.parameters)==null?void 0:F.defaultParameters)==null?void 0:v[g])||"'hello world'",value:((y=r.inputs)==null?void 0:y[g])||"",onChange:A=>{const b=A.target.value;i(B=>{Re(B,b0.MODULE)&&(B.inputs={...B.inputs||{}},b?B.inputs[g]=b:delete B.inputs[g],Object.keys(B.inputs).length===0&&(B.inputs=void 0))})},onBlur:()=>{i(A=>{Re(A,b0.MODULE)&&(A.inputs={...A.inputs||{}},Object.keys(A.inputs).forEach(b=>{var T,_;const B=(T=A.inputs)==null?void 0:T[b].trim();B?A.inputs[b]=B:(_=A.inputs)==null||delete _[b]}),Object.keys(A.inputs).length===0&&(A.inputs=void 0),s(Ra(A)))})}}),D.jsx(me,{children:D.jsx($e,{children:g})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:'JavaScript expression to pass into the module that can be referenced inside the module using the `env` variable. You should quote strings ("hello") and reference variables directly without {{ }} (e.g. `env.CURRENT_URL`)'})]})})]},`module-param-${g}`))}),c.push(D.jsxs(x0,{children:[D.jsx(gn,{placeholder:"ENV_VAR_NAME",value:r.envKey||"",onChange:g=>{const F=g.target.value.trim();i(v=>{Re(v,b0.MODULE)&&(v.envKey=F||void 0)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Variable name"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Store the output of this step onto the environment with the given variable name."})]})})]},"module-env"));break;case te.PRESET:switch(r.command.type){case Eu.AI_CHECK:E.push(D.jsxs(x0,{children:[D.jsx(Gs,{value:r.command.assertion,onChange:g=>{const F=g.target.value;i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.AI_CHECK)&&(v.command.assertion=F)})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Assertion"})})]},"ai-check-assertion"),D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.timeoutSecs??null,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.AI_CHECK)&&(F.command.timeoutSecs=g??void 0,s(Ra(F)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Timeout"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"s"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Maximum numer of seconds to wait for the assertion to pass. At least two attempts will be made. Defaults to 5 seconds."})]})})]},"ai-check-timeout"));break;case Eu.TAP:{l.push(D.jsxs(x0,{children:[D.jsx(gn,{value:Ov(r.command.target),onChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&(b.command.target={type:"description",description:A.target.value})})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Element"})})]},"tap-element"));let g;(A=>{A.SINGLE="SINGLE",A.DOUBLE="DOUBLE",A.LONG_PRESS="LONG_PRESS"})(g||(g={}));const F=r.command.longPress?"LONG_PRESS":r.command.doubleTap?"DOUBLE":"SINGLE";let v;(A=>{A.CENTER="CENTER",A.CUSTOM="CUSTOM"})(v||(v={}));const y=((x=r.command.relativePosition)==null?void 0:x.x)!==void 0&&r.command.relativePosition.y!==void 0?"CUSTOM":"CENTER";E.push(D.jsxs(m6,{type:"single",variant:"outline",className:"justify-start",value:F,onValueChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&(b.command.longPress=A==="LONG_PRESS",b.command.doubleTap=A==="DOUBLE",b.command.longPressDurationMs=void 0,b.command.doubleTapDelayMs=void 0,s(Ra(b)))})},children:[D.jsx(uo,{value:"SINGLE",children:"Single tap"}),D.jsx(uo,{value:"DOUBLE",children:"Double tap"}),D.jsx(uo,{value:"LONG_PRESS",children:"Long press"})]},"tap-type"),F==="LONG_PRESS"&&D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.longPressDurationMs??null,onChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&(b.command.longPressDurationMs=A??void 0,s(Ra(b)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Press duration"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"ms"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Milliseconds to hold the tap before releasing. Defaults to 2000 milliseconds."})]})})]},"press-duration"),F==="DOUBLE"&&D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.doubleTapDelayMs??null,onChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&(b.command.doubleTapDelayMs=A??void 0,s(Ra(b)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Tap delay"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"ms"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Milliseconds to wait between taps. Defaults to 100 milliseconds."})]})})]},"double-tap-delay"),D.jsxs(m6,{type:"single",variant:"outline",className:"justify-start",value:y,onValueChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&(A==="CENTER"?b.command.relativePosition=void 0:b.command.relativePosition={x:0,y:0},s(Ra(b)))})},children:[D.jsx(uo,{value:"CENTER",children:"Center"}),D.jsx(uo,{value:"CUSTOM",children:"Custom"})]},"tap-position"),y==="CUSTOM"&&D.jsxs("div",{className:"flex items-center gap-1",children:[D.jsxs(x0,{children:[D.jsx(Qi,{value:((C=r.command.relativePosition)==null?void 0:C.x)??null,onChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&b.command.relativePosition&&(b.command.relativePosition.x=A??0,s(Ra(b)))})}}),D.jsx(me,{children:D.jsx($e,{children:"X offset"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"px"})})]}),D.jsxs(x0,{children:[D.jsx(Qi,{value:((p=r.command.relativePosition)==null?void 0:p.y)??null,onChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&b.command.relativePosition&&(b.command.relativePosition.y=A??0,s(Ra(b)))})}}),D.jsx(me,{children:D.jsx($e,{children:"X offset"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"px"})})]})]},"tap-position-inputs"));break}case Eu.TYPE:l.push(D.jsxs(x0,{children:[D.jsx(gn,{value:Ov(r.command.target),onChange:g=>{i(F=>{if(Re(F,te.PRESET)&&E0(F.command,Eu.TYPE)){if(!g.target.value){F.command.target=void 0;return}F.command.target={type:"description",description:g.target.value}}})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Element"})})]},"type-element")),E.push(D.jsxs(x0,{children:[D.jsx(Gs,{value:r.command.text,onChange:g=>{const F=g.target.value;i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.TYPE)&&(v.command.text=F)})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Value"})})]},"type-value"),D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.keyPressDelayMs??null,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.TYPE)&&(F.command.keyPressDelayMs=g??void 0,s(Ra(F)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Key press delay"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"ms"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Milliseconds to wait between each key press. Defaults to 25 milliseconds."})]})})]},"type-delay"),D.jsxs("div",{className:"flex h-9 items-center gap-2",children:[D.jsx(Vou,{id:"clear-content",checked:r.command.clearContent,onCheckedChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.TYPE)&&(F.command.clearContent=g==="indeterminate"?!1:g,s(Ra(F)))})}}),D.jsx(pi,{htmlFor:"clear-content",children:"Clear content"})]},"type-clear-content"));break;case Eu.PRESS:E.push(D.jsxs(Xn,{value:r.command.key,onValueChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.PRESS)&&(F.command.key=g,s(Ra(F)))})},children:[D.jsx(Bn,{className:"w-fit space-x-2",children:D.jsx(ur,{placeholder:"Select a button"})}),D.jsx(Sn,{children:Object.values(yr).map(g=>D.jsx(y0,{value:g,children:XXe[g]},g))})]},"press-key"));break;case Eu.PRESS_KEYBOARD:E.push(D.jsxs(Xn,{value:r.command.key,onValueChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.PRESS_KEYBOARD)&&(F.command.key=g,s(Ra(F)))})},children:[D.jsx(Bn,{className:"w-fit space-x-2",children:D.jsx(ur,{placeholder:"Select a key"})}),D.jsx(Sn,{children:Object.values(ic).map(g=>D.jsx(y0,{value:g,children:uu0[g]},g))})]},"press-keyboard"));break;case Eu.SWIPE:{E.push(D.jsxs(m6,{type:"single",variant:"outline",className:"justify-start",value:r.command.direction,onValueChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.SWIPE)&&(F.command.direction=g,s(Ra(F)))})},children:[D.jsx(uo,{value:"up",children:"Up"}),D.jsx(uo,{value:"down",children:"Down"}),D.jsx(uo,{value:"left",children:"Left"}),D.jsx(uo,{value:"right",children:"Right"})]},"swipe-direction"),D.jsxs(Xn,{value:r.command.scrollableElement.type,onValueChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.SWIPE)&&(g===br.CUSTOM?F.command.scrollableElement={type:br.CUSTOM,target:{type:"description",description:""}}:(F.command.scrollableElement={type:g},s(Ra(F))))})},children:[D.jsx(Bn,{className:"w-fit space-x-2",children:D.jsx(ur,{placeholder:"Select a direction"})}),D.jsxs(Sn,{children:[D.jsx(y0,{value:br.SCREEN,children:"Screen"}),D.jsx(y0,{value:br.OPEN_APP,children:"Currently open app"}),D.jsx(y0,{value:br.OPEN_WEBVIEW,children:"Active webview"}),D.jsx(y0,{value:br.CUSTOM,children:"Custom container"})]})]},"swipe-container-type"),r.command.scrollableElement.type===br.CUSTOM&&D.jsxs(x0,{children:[D.jsx(gn,{value:Ov(r.command.scrollableElement.target),onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.SWIPE)&&(F.command.scrollableElement={type:br.CUSTOM,target:{type:"description",description:g.target.value}})})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Container"})})]},"swipe-container-element"),D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.viewportPercent??null,min:0,max:100,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.SWIPE)&&(F.command.viewportPercent=g??void 0,s(Ra(F)))})}}),D.jsx(me,{children:D.jsx($e,{children:r.command.direction==="down"||r.command.direction==="up"?"Height":"Width"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"%"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"The amount to scroll, as a percentage of the height for vertical swipes and the width for horizontal swipes. Defaults to 90%."})]})})]},"swipe-percentage"),D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.durationMs??null,min:0,max:100,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.SWIPE)&&(F.command.durationMs=g??void 0,s(Ra(F)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Duration"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"ms"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"The duration of the swipe in milliseconds. Defaults to 500 milliseconds."})]})})]},"swipe-duration"));break}case Eu.OPEN_APP:E.push(D.jsxs(x0,{children:[D.jsx(gn,{value:r.command.packageName,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.OPEN_APP)&&(F.command.packageName=g.target.value)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Package"})})]},"open-app-package-name"),D.jsxs(x0,{children:[D.jsx(gn,{value:r.command.activityName,onChange:g=>{i(F=>{if(Re(F,te.PRESET)&&E0(F.command,Eu.OPEN_APP)){if(!g.target.value){F.command.activityName=void 0;return}F.command.activityName=g.target.value}})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Activity"})})]},"open-app-activity-name"),D.jsxs(x0,{children:[D.jsx(Gs,{value:r.command.intentExtras||"",onChange:g=>{i(F=>{if(Re(F,te.PRESET)&&E0(F.command,Eu.OPEN_APP)){const v=g.target.value.trim();F.command.intentExtras=v||void 0}})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Intent extras"})})]},"open-app-intent-extras"));break;case Eu.OPEN_NOTIFICATION_DRAWER:break;case Eu.ADB:E.push(D.jsxs(x0,{children:[D.jsx(Gs,{value:r.command.command,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.ADB)&&(F.command.command=g.target.value)})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Command"})})]},"adb-command"),D.jsxs(x0,{children:[D.jsx(Gs,{value:r.command.jsonArgs||"",onChange:g=>{i(F=>{if(Re(F,te.PRESET)&&E0(F.command,Eu.ADB)){const v=g.target.value.trim();F.command.jsonArgs=v||void 0}})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Arguments"})})]},"adb-args"));break;case Eu.JAVASCRIPT:E.push(D.jsxs(x0,{children:[D.jsx(Gs,{value:r.command.code,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.JAVASCRIPT)&&(F.command.code=g.target.value)})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Code"})})]},"javascript-code"),D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.timeout??null,min:0,max:120,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.JAVASCRIPT)&&(F.command.timeout=g??void 0,s(Ra(F)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Timeout"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"s"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"The maximum amount of time to wait for the code to complete in seconds. Defaults to 15 seconds."})]})})]},"javascript-timeout")),c.push(D.jsxs(x0,{children:[D.jsx(gn,{placeholder:"ENV_VAR_NAME",value:r.envKey||"",onChange:g=>{const F=g.target.value.trim();i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.REQUEST)&&(v.envKey=F||void 0)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Variable name"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Store the output of this step onto the environment with the given variable name."})]})})]},"javascript-env"));break;case Eu.WAIT:E.push(D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.timeoutSecs,min:0,max:1800,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.WAIT)&&(F.command.timeoutSecs=g??0,s(Ra(F)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Duration"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"s"})})]},"wait-timeout"));break;case Eu.REQUEST:E.push(D.jsxs(zf,{onOpenChange:o,children:[D.jsx(Of,{asChild:!0,children:D.jsxs(_e,{variant:"outline",className:"w-fit",children:[D.jsx(IA,{}),"Configure request"]})}),D.jsx(vD,{className:"w-[700px]",side:"right",align:"start",children:D.jsx(JZe,{command:r.command,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.REQUEST)&&(F.command={...g,type:Eu.REQUEST})})}})})]},"request-config")),c.push(D.jsxs(x0,{children:[D.jsx(gn,{placeholder:"ENV_VAR_NAME",value:r.envKey||"",onChange:g=>{const F=g.target.value.trim();i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.REQUEST)&&(v.envKey=F||void 0)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Variable name"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Store the output of this step onto the environment with the given variable name."})]})})]},"request-env"));break;case Eu.ADD_FILE:E.push(D.jsxs(x0,{children:[D.jsx(gn,{placeholder:"https://example.com/file.txt",value:r.command.file,onChange:g=>{const F=g.target.value;i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.ADD_FILE)&&(v.command.file=F)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"File"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"File to upload. This can either be a path on the local filesystem, or a URL."})]})})]},"file-path"),D.jsxs(x0,{children:[D.jsx(gn,{placeholder:"/sdcard/Download/android.jpg",value:r.command.storageLocation,onChange:g=>{const F=g.target.value;i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.ADD_FILE)&&(v.command.storageLocation=F)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Storage"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Location on the device where the file should be stored. This should be a file name."})]})})]},"storage-location"));break;case Eu.INSTALL_APP:E.push(D.jsxs(x0,{children:[D.jsx(gn,{placeholder:"/Users/wwu/Download/app.apk",value:r.command.uri,onChange:g=>{const F=g.target.value;i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.INSTALL_APP)&&(v.command.uri=F)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"APK URI"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"A publicly accessible URL to an APK, or a path to a file on disk. Non-absolute paths are resolved relative to the Momentic project root."})]})})]},"storage-location"));break;case Eu.KILL_APP:break;case Eu.STATE:break;default:r.command}}return D.jsxs("div",{children:[D.jsxs("div",{className:"flex items-center px-2 py-1",children:[D.jsx(tQe,{value:n,modules:u,onSwitch:g=>{switch(g.type){case te.AI_ACTION:a==null||a({id:cl(),type:te.AI_ACTION,text:""});break;case te.PRESET:a==null||a({id:cl(),type:te.PRESET,command:FZ(g.command)});break;case b0.MODULE:a==null||a({...g,id:cl(),type:b0.MODULE});break}}}),D.jsx("div",{className:"ml-auto",children:D.jsx(Wou,{variant:"outline",pressed:t.skipped||!1,onPressedChange:g=>{a==null||a({...t,skipped:g})},children:t.skipped?D.jsx($3u,{}):D.jsx(H3u,{})})})]}),D.jsx(ao,{}),d.length>0&&D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:"grid gap-1 px-2 py-1",children:[D.jsx("div",{className:"flex h-9 items-center",children:D.jsx(pi,{children:"Module"})}),d]}),D.jsx(ao,{})]}),h.length>0&&D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:"grid gap-1 px-2 py-1",children:[D.jsx("div",{className:"flex h-9 items-center",children:D.jsx(pi,{children:"Inputs"})}),h]}),D.jsx(ao,{})]}),l.length>0&&D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:"grid gap-1 px-2 py-1",children:[D.jsx("div",{className:"flex h-9 items-center",children:D.jsx(pi,{children:"Target"})}),l]}),D.jsx(ao,{})]}),E.length>0&&D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:"grid gap-1 px-2 py-1",children:[D.jsx("div",{className:"flex h-9 items-center",children:D.jsx(pi,{children:"Action"})}),E]}),D.jsx(ao,{})]}),c.length>0&&D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:"grid gap-1 px-2 py-1",children:[D.jsx("div",{className:"flex h-9 items-center",children:D.jsx(pi,{children:"Output"})}),c]}),D.jsx(ao,{})]})]})},au0=2e3,tu0=({testPath:e,test:u,pathSegments:a})=>{const t=Os(),{limbar:n,canceling:r,executing:i,canExecute:o,error:s,connectionStatusUpdate:l,editorState:E,editingUniqueId:c,selectedUniqueIds:d,logcatLogs:h,a11yTreeResponse:m,isLoadingA11yTree:x,sessionLoaded:C,testContext:p,handleCancel:g,handleRunSingleStep:F,handleRunAllSteps:v,handleEdit:y,handleDelete:A,handleAddStep:b,handleStepChange:B,handleDuplicate:T,handleFetchA11yTree:_,handleMove:$,handleSelect:M,handleCreateModuleSuccess:R}=JRe({websocketUrl:jau,test:u,testPath:e}),{data:O}=oS(),N=f.useMemo(()=>(O==null?void 0:O.modules.map(iu=>iu.content))||[],[O==null?void 0:O.modules]),z=f.useMemo(()=>E.rootIds.map(iu=>n3(E.steps[iu]||E.modules[iu])),[E]),[L,w]=f.useState(z),j=f.useMemo(()=>{const iu=C0u(L,z);return Object.keys(iu).length>0},[L,z]),[K,W]=BNe(z,au0);f.useEffect(()=>{W(z)},[W,z]);const[P,G]=c1(async(iu=!0)=>{if(!j)return;const Cu={steps:z};try{await t(`/api/mobile-tests/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(Cu)}),iu&&Wr.success("Test saved!"),w(Cu.steps||[])}catch(yu){Wr.error("Failed to save test.",{description:`${yu}`})}},[e,z,j]),Z=[];for(let iu=0;iu<a.length-1;iu++)Z.push(D.jsx(ns,{children:D.jsx(eD,{asChild:!0,children:D.jsx(So,{to:`/browse/${a.slice(0,iu+1).join("/")}`,children:a[iu]})})},iu)),Z.push(D.jsx(tD,{},`separator-${iu}`));const J=w0(G);f.useEffect(()=>{J(!1)},[J,K]);const nu=f.useMemo(()=>{if(!c)return null;const{stepId:iu,parentStepIdChain:Cu}=zE(c);return Wo(E,Cu,iu)},[c,E]),q=f.useMemo(()=>{const iu=[];return d.forEach(Cu=>{const yu=E.steps[Cu];if(!yu)return;const ku=n3(yu);iu.push(ku)}),iu},[d,E]);return D.jsxs("div",{className:"grid h-full max-h-screen min-h-screen w-full grid-rows-[auto_minmax(0px,_1fr)] overflow-hidden",children:[D.jsxs("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[D.jsx(kg,{children:D.jsxs(vg,{children:[D.jsx(ns,{children:D.jsx(eD,{asChild:!0,children:D.jsx(So,{to:"/browse",children:"Repository"})})}),D.jsx(tD,{}),Z,D.jsx(ns,{children:D.jsx(aD,{children:a[a.length-1]})})]})}),D.jsx(nOe,{}),D.jsx("div",{className:"ml-auto flex items-center gap-2",children:D.jsx(NNe,{testPath:e,onSuccess:()=>{window.location.reload()}})})]}),D.jsxs("div",{className:ou("grid h-full w-full grid-cols-[auto_auto_minmax(0px,_1fr)]",{"grid-cols-[auto_minmax(0px,_1fr)]":!nu}),children:[D.jsxs("div",{className:"grid w-[20vw] min-w-[250px] grid-rows-[auto_auto_auto_1fr] overflow-auto border-r",children:[D.jsx("div",{className:"flex flex-col border-b",children:D.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[D.jsx(_e,{variant:"outline",size:"icon",className:"ml-auto",onClick:()=>void G(),disabled:!j||P.loading,children:P.loading?D.jsx(gdu,{className:"h-4 w-4 animate-spin"}):D.jsx(Fdu,{className:"h-4 w-4"})}),D.jsx(URe,{testId:u.id,testPath:e,disabled:q.length===0,steps:q,onSuccess:R}),r?D.jsxs(M0,{defaultOpen:!0,children:[D.jsx(T0,{asChild:!0,children:D.jsxs(_e,{variant:"outline",className:"text-destructive hover:text-destructive",children:[D.jsx(_A,{className:"h-4 w-4"}),"Canceling"]})}),D.jsx(A0,{side:"bottom",className:"max-w-xs",children:"Waiting for the current step to finish executing. This may take a few seconds."})]}):i?D.jsxs(_e,{variant:"outline",className:"text-destructive hover:text-destructive",onClick:g,children:[D.jsx(_A,{className:"h-4 w-4"}),"Cancel"]}):D.jsxs(_e,{onClick:v,disabled:!o,children:[D.jsx(hdu,{className:"h-4 w-4"}),"Run"]})]})}),D.jsx(cTe,{backend:aPe,children:D.jsx("div",{className:"overflow-auto",children:E.rootIds.map((iu,Cu)=>{const yu=E.steps[iu]||E.modules[iu];return yu?D.jsx(atu,{index:Cu,state:yu,editingUniqueId:c,selectedUniqueIds:d,droppableUniqueIds:E.rootIds,modules:N,onEdit:y,onSelect:M,onChange:B,onDuplicate:T,onDelete:A,onExecute:F,onMove:$,onAddBefore:(ku,Fu)=>{b(ku,Fu,"before")},onAddAfter:(ku,Fu)=>{b(ku,Fu,"after")}},iu):null})})}),D.jsx("div",{className:"my-2 flex items-center justify-center",children:D.jsx(INe,{modules:N,onAdd:iu=>{b(iu,null,"after")}})}),D.jsx("div",{})]}),c&&nu&&D.jsx("div",{className:"w-[20vw] min-w-[250px] overflow-auto border-r",children:D.jsx(eu0,{state:nu,modules:N,onChange:iu=>{B(c,iu)}})}),D.jsx("div",{className:"h-full overflow-hidden",children:D.jsxs(Beu,{direction:"vertical",className:"h-full",children:[D.jsx(Tf,{defaultSize:75,children:s?D.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2",children:[D.jsx("h2",{className:"text-xl font-semibold",children:"An unexpected error happened!"}),D.jsxs("div",{className:"text-destructive max-w-lg",children:["Error: ",s]}),D.jsxs("div",{className:"text-muted-foreground max-w-lg text-center",children:["We apologize for the inconvenience. We have been notified of this problem. If the issue persists please contact"," ",D.jsx("a",{href:"mailto:support@momentic.ai",className:"text-primary hover:underline",children:"support@momentic.ai"}),"."]}),D.jsx(_e,{variant:"outline",onClick:()=>{window.location.reload()},children:"Reconnect"})]}):n?D.jsx("div",{className:"mx-auto h-full max-h-full max-w-full",children:D.jsx(uOe,{token:n.token,url:n.rtcUrl,sessionId:n.sessionId})}):D.jsx("div",{className:"flex h-full w-full items-center justify-center",children:D.jsx("h2",{className:"text-xl font-semibold",children:l||"Connecting to emulator..."})})}),D.jsx(Seu,{withHandle:!0}),D.jsx(Tf,{defaultSize:25,children:D.jsxs(j2,{defaultValue:"context",className:"flex h-full flex-col p-2",children:[D.jsxs(jh,{className:"self-start",children:[D.jsx($r,{value:"context",children:"Context"}),D.jsx($r,{value:"logcat",children:"Logcat"}),D.jsx($r,{value:"accessibility",children:"Accessibility"})]}),D.jsx(Vr,{value:"context",className:"flex-1 overflow-auto",children:D.jsxs("div",{className:"grid h-full grid-rows-[auto_1fr] gap-2",children:[D.jsxs("p",{className:"text-muted-foreground text-sm",children:["You can access these values directly in a JavaScript step, or using the special"," ",D.jsx("span",{className:"text-foreground whitespace-nowrap font-mono",children:"{{ }}"})," ","syntax in other steps. For example, you can get the current URL with"," ",D.jsxs("span",{className:"text-foreground whitespace-nowrap font-mono",children:["{{ env.CURRENT_URL }}","."]})," ",D.jsx(rPe,{slug:"/variables"})]}),p&&D.jsx(Wwe,{data:p})]})}),D.jsx(Vr,{value:"logcat",className:"h-full flex-1 overflow-hidden",children:D.jsx(QP,{FallbackComponent:CM,children:D.jsx(zPe,{logs:h})})}),D.jsx(Vr,{value:"accessibility",className:"h-full flex-1 overflow-hidden",children:D.jsxs("div",{className:"flex h-full flex-col gap-2",children:[D.jsxs("div",{className:"flex flex-row gap-2",children:[D.jsxs(_e,{onClick:_,disabled:x||!o||!C,variant:"secondary",size:"sm",children:[x&&D.jsx(qy,{className:"h-4 w-4 animate-spin"})," ","Load current page accessibility tree"]}),(m==null?void 0:m.a11yTree)&&D.jsx(_e,{onClick:()=>{const iu=new Blob([m.a11yTree],{type:"application/xml"});LNe("snapshot.xml",iu)},variant:"secondary",size:"sm",children:"Download accessibility tree"})]}),D.jsx("div",{className:"flex-1",children:m!=null&&m.a11yTree?D.jsx(QP,{FallbackComponent:CM,children:D.jsx(iNe,{xml:m.a11yTree,dataType:"html"})}):m!=null&&m.err?D.jsxs("div",{className:"pl-2",children:[D.jsx("p",{className:"text-muted-foreground text-sm",children:"An error occurred while fetching the a11y tree."}),D.jsxs("p",{className:"text-destructive text-sm",children:["Error: ",m.err]})]}):m&&!m.a11yTree?D.jsx("p",{className:"text-muted-foreground pl-2 text-sm",children:"No a11y tree snapshot available."}):null})]})})]})})]})})]})]})};function nu0(){const{"*":e=""}=QK(),{data:u,error:a}=Pau(e);return a?D.jsx(Zze,{err:a}):u?D.jsx(tu0,{test:u,testPath:e,pathSegments:e.split("/")}):null}const ru0=QEu([{path:"/",errorElement:D.jsx(Ofu,{}),children:[{index:!0,element:D.jsx(IEu,{to:"/browse",replace:!0})},{element:D.jsx(Uze,{}),children:[{path:"search",element:D.jsx(fSe,{})},{path:"assets",element:D.jsx(YCu,{})},{path:"browse/*",element:D.jsx(tSe,{})}]},{path:"tests/*",element:D.jsx(nu0,{})}]}]);zA.createRoot(document.getElementById("root")).render(D.jsx(eu.StrictMode,{children:D.jsx(ccu,{children:D.jsx(Jcu,{value:{fetcher:RNe},children:D.jsx(nH,{sidebarWidth:"auto",children:D.jsxs(aH,{delayDuration:0,children:[D.jsx(rcu,{router:ru0}),D.jsx(Sfu,{richColors:!0,closeButton:!0})]})})})})}));
|
|
623
|
+
`]))),vYe=function(u,a){var t=u.isFocused,n=u.size,r=u.theme,i=r.colors,o=r.spacing.baseUnit;return xe({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"},a?{}:{color:t?i.neutral60:i.neutral20,padding:o*2})},vv=function(u){var a=u.delay,t=u.offset;return Fe("span",{css:Wz({animation:"".concat(kYe," 1s ease-in-out ").concat(a,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:t?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},AYe=function(u){var a=u.innerProps,t=u.isRtl,n=u.size,r=n===void 0?4:n,i=Io(u,hYe);return Fe("div",ne({},pa(xe(xe({},i),{},{innerProps:a,isRtl:t,size:r}),"loadingIndicator",{indicator:!0,"loading-indicator":!0}),a),Fe(vv,{delay:0,offset:t}),Fe(vv,{delay:160,offset:!0}),Fe(vv,{delay:320,offset:!t}))},bYe=function(u,a){var t=u.isDisabled,n=u.isFocused,r=u.theme,i=r.colors,o=r.borderRadius,s=r.spacing;return xe({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:s.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},a?{}:{backgroundColor:t?i.neutral5:i.neutral0,borderColor:t?i.neutral10:n?i.primary:i.neutral20,borderRadius:o,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:n?i.primary:i.neutral30}})},yYe=function(u){var a=u.children,t=u.isDisabled,n=u.isFocused,r=u.innerRef,i=u.innerProps,o=u.menuIsOpen;return Fe("div",ne({ref:r},pa(u,"control",{control:!0,"control--is-disabled":t,"control--is-focused":n,"control--menu-is-open":o}),i,{"aria-disabled":t||void 0}),a)},BYe=yYe,SYe=["data"],zYe=function(u,a){var t=u.theme.spacing;return a?{}:{paddingBottom:t.baseUnit*2,paddingTop:t.baseUnit*2}},OYe=function(u){var a=u.children,t=u.cx,n=u.getStyles,r=u.getClassNames,i=u.Heading,o=u.headingProps,s=u.innerProps,l=u.label,E=u.theme,c=u.selectProps;return Fe("div",ne({},pa(u,"group",{group:!0}),s),Fe(i,ne({},o,{selectProps:c,theme:E,getStyles:n,getClassNames:r,cx:t}),l),Fe("div",null,a))},wYe=function(u,a){var t=u.theme,n=t.colors,r=t.spacing;return xe({label:"group",cursor:"default",display:"block"},a?{}:{color:n.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:r.baseUnit*3,paddingRight:r.baseUnit*3,textTransform:"uppercase"})},MYe=function(u){var a=Asu(u);a.data;var t=Io(a,SYe);return Fe("div",ne({},pa(u,"groupHeading",{"group-heading":!0}),t))},TYe=OYe,PYe=["innerRef","isDisabled","isHidden","inputClassName"],jYe=function(u,a){var t=u.isDisabled,n=u.value,r=u.theme,i=r.spacing,o=r.colors;return xe(xe({visibility:t?"hidden":"visible",transform:n?"translateZ(0)":""},NYe),a?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:o.neutral80})},Tsu={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},NYe={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":xe({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},Tsu)},RYe=function(u){return xe({label:"input",color:"inherit",background:0,opacity:u?0:1,width:"100%"},Tsu)},LYe=function(u){var a=u.cx,t=u.value,n=Asu(u),r=n.innerRef,i=n.isDisabled,o=n.isHidden,s=n.inputClassName,l=Io(n,PYe);return Fe("div",ne({},pa(u,"input",{"input-container":!0}),{"data-value":t||""}),Fe("input",ne({className:a({input:!0},s),ref:r,style:RYe(o),disabled:i},l)))},_Ye=LYe,IYe=function(u,a){var t=u.theme,n=t.spacing,r=t.borderRadius,i=t.colors;return xe({label:"multiValue",display:"flex",minWidth:0},a?{}:{backgroundColor:i.neutral10,borderRadius:r/2,margin:n.baseUnit/2})},KYe=function(u,a){var t=u.theme,n=t.borderRadius,r=t.colors,i=u.cropWithEllipsis;return xe({overflow:"hidden",textOverflow:i||i===void 0?"ellipsis":void 0,whiteSpace:"nowrap"},a?{}:{borderRadius:n/2,color:r.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},$Ye=function(u,a){var t=u.theme,n=t.spacing,r=t.borderRadius,i=t.colors,o=u.isFocused;return xe({alignItems:"center",display:"flex"},a?{}:{borderRadius:r/2,backgroundColor:o?i.dangerLight:void 0,paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},Psu=function(u){var a=u.children,t=u.innerProps;return Fe("div",t,a)},VYe=Psu,HYe=Psu;function GYe(e){var u=e.children,a=e.innerProps;return Fe("div",ne({role:"button"},a),u||Fe(qz,{size:14}))}var JYe=function(u){var a=u.children,t=u.components,n=u.data,r=u.innerProps,i=u.isDisabled,o=u.removeProps,s=u.selectProps,l=t.Container,E=t.Label,c=t.Remove;return Fe(l,{data:n,innerProps:xe(xe({},pa(u,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),r),selectProps:s},Fe(E,{data:n,innerProps:xe({},pa(u,"multiValueLabel",{"multi-value__label":!0})),selectProps:s},a),Fe(c,{data:n,innerProps:xe(xe({},pa(u,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(a||"option")},o),selectProps:s}))},WYe=JYe,UYe=function(u,a){var t=u.isDisabled,n=u.isFocused,r=u.isSelected,i=u.theme,o=i.spacing,s=i.colors;return xe({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},a?{}:{backgroundColor:r?s.primary:n?s.primary25:"transparent",color:t?s.neutral20:r?s.neutral0:"inherit",padding:"".concat(o.baseUnit*2,"px ").concat(o.baseUnit*3,"px"),":active":{backgroundColor:t?void 0:r?s.primary:s.primary50}})},ZYe=function(u){var a=u.children,t=u.isDisabled,n=u.isFocused,r=u.isSelected,i=u.innerRef,o=u.innerProps;return Fe("div",ne({},pa(u,"option",{option:!0,"option--is-disabled":t,"option--is-focused":n,"option--is-selected":r}),{ref:i,"aria-disabled":t},o),a)},QYe=ZYe,qYe=function(u,a){var t=u.theme,n=t.spacing,r=t.colors;return xe({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},a?{}:{color:r.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2})},YYe=function(u){var a=u.children,t=u.innerProps;return Fe("div",ne({},pa(u,"placeholder",{placeholder:!0}),t),a)},XYe=YYe,uXe=function(u,a){var t=u.isDisabled,n=u.theme,r=n.spacing,i=n.colors;return xe({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},a?{}:{color:t?i.neutral40:i.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},eXe=function(u){var a=u.children,t=u.isDisabled,n=u.innerProps;return Fe("div",ne({},pa(u,"singleValue",{"single-value":!0,"single-value--is-disabled":t}),n),a)},aXe=eXe,tXe={ClearIndicator:gYe,Control:BYe,DropdownIndicator:fYe,DownChevron:wsu,CrossIcon:qz,Group:TYe,GroupHeading:MYe,IndicatorsContainer:dYe,IndicatorSeparator:FYe,Input:_Ye,LoadingIndicator:AYe,Menu:Yqe,MenuList:uYe,MenuPortal:iYe,LoadingMessage:nYe,NoOptionsMessage:tYe,MultiValue:WYe,MultiValueContainer:VYe,MultiValueLabel:HYe,MultiValueRemove:GYe,Option:QYe,Placeholder:XYe,SelectContainer:sYe,SingleValue:aXe,ValueContainer:EYe},nXe=function(u){return xe(xe({},tXe),u.components)},s_=Number.isNaN||function(u){return typeof u=="number"&&u!==u};function rXe(e,u){return!!(e===u||s_(e)&&s_(u))}function iXe(e,u){if(e.length!==u.length)return!1;for(var a=0;a<e.length;a++)if(!rXe(e[a],u[a]))return!1;return!0}function oXe(e,u){u===void 0&&(u=iXe);var a=null;function t(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(a&&a.lastThis===this&&u(n,a.lastArgs))return a.lastResult;var i=e.apply(this,n);return a={lastResult:i,lastArgs:n,lastThis:this},i}return t.clear=function(){a=null},t}var sXe={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"},lXe=function(u){return Fe("span",ne({css:sXe},u))},l_=lXe,EXe={guidance:function(u){var a=u.isSearchable,t=u.isMulti,n=u.tabSelectsValue,r=u.context,i=u.isInitialFocus;switch(r){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(n?", press Tab to select the option and exit the menu":"",".");case"input":return i?"".concat(u["aria-label"]||"Select"," is focused ").concat(a?",type to refine list":"",", press Down to open the menu, ").concat(t?" 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(u){var a=u.action,t=u.label,n=t===void 0?"":t,r=u.labels,i=u.isDisabled;switch(a){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"clear":return"All selected options have been cleared.";case"initial-input-focus":return"option".concat(r.length>1?"s":""," ").concat(r.join(","),", selected.");case"select-option":return i?"option ".concat(n," is disabled. Select another option."):"option ".concat(n,", selected.");default:return""}},onFocus:function(u){var a=u.context,t=u.focused,n=u.options,r=u.label,i=r===void 0?"":r,o=u.selectValue,s=u.isDisabled,l=u.isSelected,E=u.isAppleDevice,c=function(x,C){return x&&x.length?"".concat(x.indexOf(C)+1," of ").concat(x.length):""};if(a==="value"&&o)return"value ".concat(i," focused, ").concat(c(o,t),".");if(a==="menu"&&E){var d=s?" disabled":"",h="".concat(l?" selected":"").concat(d);return"".concat(i).concat(h,", ").concat(c(n,t),".")}return""},onFilter:function(u){var a=u.inputValue,t=u.resultsMessage;return"".concat(t).concat(a?" for search term "+a:"",".")}},cXe=function(u){var a=u.ariaSelection,t=u.focusedOption,n=u.focusedValue,r=u.focusableOptions,i=u.isFocused,o=u.selectValue,s=u.selectProps,l=u.id,E=u.isAppleDevice,c=s.ariaLiveMessages,d=s.getOptionLabel,h=s.inputValue,m=s.isMulti,x=s.isOptionDisabled,C=s.isSearchable,p=s.menuIsOpen,g=s.options,F=s.screenReaderStatus,v=s.tabSelectsValue,y=s.isLoading,A=s["aria-label"],b=s["aria-live"],B=f.useMemo(function(){return xe(xe({},EXe),c||{})},[c]),T=f.useMemo(function(){var N="";if(a&&B.onChange){var z=a.option,L=a.options,w=a.removedValue,j=a.removedValues,K=a.value,W=function(iu){return Array.isArray(iu)?null:iu},P=w||z||W(K),G=P?d(P):"",Z=L||j||void 0,J=Z?Z.map(d):[],nu=xe({isDisabled:P&&x(P,o),label:G,labels:J},a);N=B.onChange(nu)}return N},[a,B,x,o,d]),_=f.useMemo(function(){var N="",z=t||n,L=!!(t&&o&&o.includes(t));if(z&&B.onFocus){var w={focused:z,label:d(z),isDisabled:x(z,o),isSelected:L,options:r,context:z===t?"menu":"value",selectValue:o,isAppleDevice:E};N=B.onFocus(w)}return N},[t,n,d,x,B,r,o,E]),$=f.useMemo(function(){var N="";if(p&&g.length&&!y&&B.onFilter){var z=F({count:r.length});N=B.onFilter({inputValue:h,resultsMessage:z})}return N},[r,h,p,B,g,F,y]),M=(a==null?void 0:a.action)==="initial-input-focus",R=f.useMemo(function(){var N="";if(B.guidance){var z=n?"value":p?"menu":"input";N=B.guidance({"aria-label":A,context:z,isDisabled:t&&x(t,o),isMulti:m,isSearchable:C,tabSelectsValue:v,isInitialFocus:M})}return N},[A,t,n,m,x,C,p,B,o,v,M]),O=Fe(f.Fragment,null,Fe("span",{id:"aria-selection"},T),Fe("span",{id:"aria-focused"},_),Fe("span",{id:"aria-results"},$),Fe("span",{id:"aria-guidance"},R));return Fe(f.Fragment,null,Fe(l_,{id:l},M&&O),Fe(l_,{"aria-live":b,"aria-atomic":"false","aria-relevant":"additions text",role:"log"},i&&!M&&O))},dXe=cXe,Z9=[{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źẑżžẓẕƶȥɀⱬꝣ"}],DXe=new RegExp("["+Z9.map(function(e){return e.letters}).join("")+"]","g"),jsu={};for(var Av=0;Av<Z9.length;Av++)for(var bv=Z9[Av],yv=0;yv<bv.letters.length;yv++)jsu[bv.letters[yv]]=bv.base;var Nsu=function(u){return u.replace(DXe,function(a){return jsu[a]})},hXe=oXe(Nsu),E_=function(u){return u.replace(/^\s+|\s+$/g,"")},mXe=function(u){return"".concat(u.label," ").concat(u.value)},xXe=function(u){return function(a,t){if(a.data.__isNew__)return!0;var n=xe({ignoreCase:!0,ignoreAccents:!0,stringify:mXe,trim:!0,matchFrom:"any"},u),r=n.ignoreCase,i=n.ignoreAccents,o=n.stringify,s=n.trim,l=n.matchFrom,E=s?E_(t):t,c=s?E_(o(a)):o(a);return r&&(E=E.toLowerCase(),c=c.toLowerCase()),i&&(E=hXe(E),c=Nsu(c)),l==="start"?c.substr(0,E.length)===E:c.indexOf(E)>-1}},fXe=["innerRef"];function pXe(e){var u=e.innerRef,a=Io(e,fXe),t=Hqe(a,"onExited","in","enter","exit","appear");return Fe("input",ne({ref:u},t,{css:Wz({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 gXe=function(u){u.cancelable&&u.preventDefault(),u.stopPropagation()};function CXe(e){var u=e.isEnabled,a=e.onBottomArrive,t=e.onBottomLeave,n=e.onTopArrive,r=e.onTopLeave,i=f.useRef(!1),o=f.useRef(!1),s=f.useRef(0),l=f.useRef(null),E=f.useCallback(function(C,p){if(l.current!==null){var g=l.current,F=g.scrollTop,v=g.scrollHeight,y=g.clientHeight,A=l.current,b=p>0,B=v-y-F,T=!1;B>p&&i.current&&(t&&t(C),i.current=!1),b&&o.current&&(r&&r(C),o.current=!1),b&&p>B?(a&&!i.current&&a(C),A.scrollTop=v,T=!0,i.current=!0):!b&&-p>F&&(n&&!o.current&&n(C),A.scrollTop=0,T=!0,o.current=!0),T&&gXe(C)}},[a,t,n,r]),c=f.useCallback(function(C){E(C,C.deltaY)},[E]),d=f.useCallback(function(C){s.current=C.changedTouches[0].clientY},[]),h=f.useCallback(function(C){var p=s.current-C.changedTouches[0].clientY;E(C,p)},[E]),m=f.useCallback(function(C){if(C){var p=Kqe?{passive:!1}:!1;C.addEventListener("wheel",c,p),C.addEventListener("touchstart",d,p),C.addEventListener("touchmove",h,p)}},[h,d,c]),x=f.useCallback(function(C){C&&(C.removeEventListener("wheel",c,!1),C.removeEventListener("touchstart",d,!1),C.removeEventListener("touchmove",h,!1))},[h,d,c]);return f.useEffect(function(){if(u){var C=l.current;return m(C),function(){x(C)}}},[u,m,x]),function(C){l.current=C}}var c_=["boxSizing","height","overflow","paddingRight","position"],d_={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function D_(e){e.preventDefault()}function h_(e){e.stopPropagation()}function m_(){var e=this.scrollTop,u=this.scrollHeight,a=e+this.offsetHeight;e===0?this.scrollTop=1:a===u&&(this.scrollTop=e-1)}function x_(){return"ontouchstart"in window||navigator.maxTouchPoints}var f_=!!(typeof window<"u"&&window.document&&window.document.createElement),Rd=0,kE={capture:!1,passive:!1};function FXe(e){var u=e.isEnabled,a=e.accountForScrollbars,t=a===void 0?!0:a,n=f.useRef({}),r=f.useRef(null),i=f.useCallback(function(s){if(f_){var l=document.body,E=l&&l.style;if(t&&c_.forEach(function(m){var x=E&&E[m];n.current[m]=x}),t&&Rd<1){var c=parseInt(n.current.paddingRight,10)||0,d=document.body?document.body.clientWidth:0,h=window.innerWidth-d+c||0;Object.keys(d_).forEach(function(m){var x=d_[m];E&&(E[m]=x)}),E&&(E.paddingRight="".concat(h,"px"))}l&&x_()&&(l.addEventListener("touchmove",D_,kE),s&&(s.addEventListener("touchstart",m_,kE),s.addEventListener("touchmove",h_,kE))),Rd+=1}},[t]),o=f.useCallback(function(s){if(f_){var l=document.body,E=l&&l.style;Rd=Math.max(Rd-1,0),t&&Rd<1&&c_.forEach(function(c){var d=n.current[c];E&&(E[c]=d)}),l&&x_()&&(l.removeEventListener("touchmove",D_,kE),s&&(s.removeEventListener("touchstart",m_,kE),s.removeEventListener("touchmove",h_,kE)))}},[t]);return f.useEffect(function(){if(u){var s=r.current;return i(s),function(){o(s)}}},[u,i,o]),function(s){r.current=s}}var kXe=function(u){var a=u.target;return a.ownerDocument.activeElement&&a.ownerDocument.activeElement.blur()},vXe={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function AXe(e){var u=e.children,a=e.lockEnabled,t=e.captureEnabled,n=t===void 0?!0:t,r=e.onBottomArrive,i=e.onBottomLeave,o=e.onTopArrive,s=e.onTopLeave,l=CXe({isEnabled:n,onBottomArrive:r,onBottomLeave:i,onTopArrive:o,onTopLeave:s}),E=FXe({isEnabled:a}),c=function(h){l(h),E(h)};return Fe(f.Fragment,null,a&&Fe("div",{onClick:kXe,css:vXe}),u(c))}var bXe={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},yXe=function(u){var a=u.name,t=u.onFocus;return Fe("input",{required:!0,name:a,tabIndex:-1,"aria-hidden":"true",onFocus:t,css:bXe,value:"",onChange:function(){}})},BXe=yXe;function Yz(e){var u;return typeof window<"u"&&window.navigator!=null?e.test(((u=window.navigator.userAgentData)===null||u===void 0?void 0:u.platform)||window.navigator.platform):!1}function SXe(){return Yz(/^iPhone/i)}function Rsu(){return Yz(/^Mac/i)}function zXe(){return Yz(/^iPad/i)||Rsu()&&navigator.maxTouchPoints>1}function OXe(){return SXe()||zXe()}function wXe(){return Rsu()||OXe()}var MXe=function(u){return u.label},Lsu=function(u){return u.label},_su=function(u){return u.value},TXe=function(u){return!!u.isDisabled},PXe={clearIndicator:pYe,container:oYe,control:bYe,dropdownIndicator:xYe,group:zYe,groupHeading:wYe,indicatorsContainer:cYe,indicatorSeparator:CYe,input:jYe,loadingIndicator:vYe,loadingMessage:aYe,menu:Zqe,menuList:Xqe,menuPortal:rYe,multiValue:IYe,multiValueLabel:KYe,multiValueRemove:$Ye,noOptionsMessage:eYe,option:UYe,placeholder:qYe,singleValue:uXe,valueContainer:lYe},jXe={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%)"},NXe=4,Isu=4,RXe=38,LXe=Isu*2,_Xe={baseUnit:Isu,controlHeight:RXe,menuGutter:LXe},Bv={borderRadius:NXe,colors:jXe,spacing:_Xe},IXe={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:i_(),captureMenuScroll:!i_(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:xXe(),formatGroupLabel:MXe,getOptionLabel:Lsu,getOptionValue:_su,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:TXe,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!_qe(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(u){var a=u.count;return"".concat(a," result").concat(a!==1?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function p_(e,u,a,t){var n=Vsu(e,u,a),r=Hsu(e,u,a),i=$su(e,u),o=wp(e,u);return{type:"option",data:u,isDisabled:n,isSelected:r,label:i,value:o,index:t}}function g6(e,u){return e.options.map(function(a,t){if("options"in a){var n=a.options.map(function(i,o){return p_(e,i,u,o)}).filter(function(i){return C_(e,i)});return n.length>0?{type:"group",data:a,options:n,index:t}:void 0}var r=p_(e,a,u,t);return C_(e,r)?r:void 0}).filter($qe)}function Ksu(e){return e.reduce(function(u,a){return a.type==="group"?u.push.apply(u,vc(a.options.map(function(t){return t.data}))):u.push(a.data),u},[])}function g_(e,u){return e.reduce(function(a,t){return t.type==="group"?a.push.apply(a,vc(t.options.map(function(n){return{data:n.data,id:"".concat(u,"-").concat(t.index,"-").concat(n.index)}}))):a.push({data:t.data,id:"".concat(u,"-").concat(t.index)}),a},[])}function KXe(e,u){return Ksu(g6(e,u))}function C_(e,u){var a=e.inputValue,t=a===void 0?"":a,n=u.data,r=u.isSelected,i=u.label,o=u.value;return(!Jsu(e)||!r)&&Gsu(e,{label:i,value:o,data:n},t)}function $Xe(e,u){var a=e.focusedValue,t=e.selectValue,n=t.indexOf(a);if(n>-1){var r=u.indexOf(a);if(r>-1)return a;if(n<u.length)return u[n]}return null}function VXe(e,u){var a=e.focusedOption;return a&&u.indexOf(a)>-1?a:u[0]}var Sv=function(u,a){var t,n=(t=u.find(function(r){return r.data===a}))===null||t===void 0?void 0:t.id;return n||null},$su=function(u,a){return u.getOptionLabel(a)},wp=function(u,a){return u.getOptionValue(a)};function Vsu(e,u,a){return typeof e.isOptionDisabled=="function"?e.isOptionDisabled(u,a):!1}function Hsu(e,u,a){if(a.indexOf(u)>-1)return!0;if(typeof e.isOptionSelected=="function")return e.isOptionSelected(u,a);var t=wp(e,u);return a.some(function(n){return wp(e,n)===t})}function Gsu(e,u,a){return e.filterOption?e.filterOption(u,a):!0}var Jsu=function(u){var a=u.hideSelectedOptions,t=u.isMulti;return a===void 0?t:a},HXe=1,Wsu=function(e){oQe(a,e);var u=EQe(a);function a(t){var n;if(rQe(this,a),n=u.call(this,t),n.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:""},n.blockOptionHover=!1,n.isComposing=!1,n.commonProps=void 0,n.initialTouchX=0,n.initialTouchY=0,n.openAfterFocus=!1,n.scrollToFocusedOptionOnUpdate=!1,n.userIsDragging=void 0,n.isAppleDevice=wXe(),n.controlRef=null,n.getControlRef=function(s){n.controlRef=s},n.focusedOptionRef=null,n.getFocusedOptionRef=function(s){n.focusedOptionRef=s},n.menuListRef=null,n.getMenuListRef=function(s){n.menuListRef=s},n.inputRef=null,n.getInputRef=function(s){n.inputRef=s},n.focus=n.focusInput,n.blur=n.blurInput,n.onChange=function(s,l){var E=n.props,c=E.onChange,d=E.name;l.name=d,n.ariaOnChange(s,l),c(s,l)},n.setValue=function(s,l,E){var c=n.props,d=c.closeMenuOnSelect,h=c.isMulti,m=c.inputValue;n.onInputChange("",{action:"set-value",prevInputValue:m}),d&&(n.setState({inputIsHiddenAfterUpdate:!h}),n.onMenuClose()),n.setState({clearFocusValueOnUpdate:!0}),n.onChange(s,{action:l,option:E})},n.selectOption=function(s){var l=n.props,E=l.blurInputOnSelect,c=l.isMulti,d=l.name,h=n.state.selectValue,m=c&&n.isOptionSelected(s,h),x=n.isOptionDisabled(s,h);if(m){var C=n.getOptionValue(s);n.setValue(h.filter(function(p){return n.getOptionValue(p)!==C}),"deselect-option",s)}else if(!x)c?n.setValue([].concat(vc(h),[s]),"select-option",s):n.setValue(s,"select-option");else{n.ariaOnChange(s,{action:"select-option",option:s,name:d});return}E&&n.blurInput()},n.removeValue=function(s){var l=n.props.isMulti,E=n.state.selectValue,c=n.getOptionValue(s),d=E.filter(function(m){return n.getOptionValue(m)!==c}),h=r5(l,d,d[0]||null);n.onChange(h,{action:"remove-value",removedValue:s}),n.focusInput()},n.clearValue=function(){var s=n.state.selectValue;n.onChange(r5(n.props.isMulti,[],null),{action:"clear",removedValues:s})},n.popValue=function(){var s=n.props.isMulti,l=n.state.selectValue,E=l[l.length-1],c=l.slice(0,l.length-1),d=r5(s,c,c[0]||null);n.onChange(d,{action:"pop-value",removedValue:E})},n.getFocusedOptionId=function(s){return Sv(n.state.focusableOptionsWithIds,s)},n.getFocusableOptionsWithIds=function(){return g_(g6(n.props,n.state.selectValue),n.getElementId("option"))},n.getValue=function(){return n.state.selectValue},n.cx=function(){for(var s=arguments.length,l=new Array(s),E=0;E<s;E++)l[E]=arguments[E];return Pqe.apply(void 0,[n.props.classNamePrefix].concat(l))},n.getOptionLabel=function(s){return $su(n.props,s)},n.getOptionValue=function(s){return wp(n.props,s)},n.getStyles=function(s,l){var E=n.props.unstyled,c=PXe[s](l,E);c.boxSizing="border-box";var d=n.props.styles[s];return d?d(c,l):c},n.getClassNames=function(s,l){var E,c;return(E=(c=n.props.classNames)[s])===null||E===void 0?void 0:E.call(c,l)},n.getElementId=function(s){return"".concat(n.state.instancePrefix,"-").concat(s)},n.getComponents=function(){return nXe(n.props)},n.buildCategorizedOptions=function(){return g6(n.props,n.state.selectValue)},n.getCategorizedOptions=function(){return n.props.menuIsOpen?n.buildCategorizedOptions():[]},n.buildFocusableOptions=function(){return Ksu(n.buildCategorizedOptions())},n.getFocusableOptions=function(){return n.props.menuIsOpen?n.buildFocusableOptions():[]},n.ariaOnChange=function(s,l){n.setState({ariaSelection:xe({value:s},l)})},n.onMenuMouseDown=function(s){s.button===0&&(s.stopPropagation(),s.preventDefault(),n.focusInput())},n.onMenuMouseMove=function(s){n.blockOptionHover=!1},n.onControlMouseDown=function(s){if(!s.defaultPrevented){var l=n.props.openMenuOnClick;n.state.isFocused?n.props.menuIsOpen?s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&n.onMenuClose():l&&n.openMenu("first"):(l&&(n.openAfterFocus=!0),n.focusInput()),s.target.tagName!=="INPUT"&&s.target.tagName!=="TEXTAREA"&&s.preventDefault()}},n.onDropdownIndicatorMouseDown=function(s){if(!(s&&s.type==="mousedown"&&s.button!==0)&&!n.props.isDisabled){var l=n.props,E=l.isMulti,c=l.menuIsOpen;n.focusInput(),c?(n.setState({inputIsHiddenAfterUpdate:!E}),n.onMenuClose()):n.openMenu("first"),s.preventDefault()}},n.onClearIndicatorMouseDown=function(s){s&&s.type==="mousedown"&&s.button!==0||(n.clearValue(),s.preventDefault(),n.openAfterFocus=!1,s.type==="touchend"?n.focusInput():setTimeout(function(){return n.focusInput()}))},n.onScroll=function(s){typeof n.props.closeMenuOnScroll=="boolean"?s.target instanceof HTMLElement&&SC(s.target)&&n.props.onMenuClose():typeof n.props.closeMenuOnScroll=="function"&&n.props.closeMenuOnScroll(s)&&n.props.onMenuClose()},n.onCompositionStart=function(){n.isComposing=!0},n.onCompositionEnd=function(){n.isComposing=!1},n.onTouchStart=function(s){var l=s.touches,E=l&&l.item(0);E&&(n.initialTouchX=E.clientX,n.initialTouchY=E.clientY,n.userIsDragging=!1)},n.onTouchMove=function(s){var l=s.touches,E=l&&l.item(0);if(E){var c=Math.abs(E.clientX-n.initialTouchX),d=Math.abs(E.clientY-n.initialTouchY),h=5;n.userIsDragging=c>h||d>h}},n.onTouchEnd=function(s){n.userIsDragging||(n.controlRef&&!n.controlRef.contains(s.target)&&n.menuListRef&&!n.menuListRef.contains(s.target)&&n.blurInput(),n.initialTouchX=0,n.initialTouchY=0)},n.onControlTouchEnd=function(s){n.userIsDragging||n.onControlMouseDown(s)},n.onClearIndicatorTouchEnd=function(s){n.userIsDragging||n.onClearIndicatorMouseDown(s)},n.onDropdownIndicatorTouchEnd=function(s){n.userIsDragging||n.onDropdownIndicatorMouseDown(s)},n.handleInputChange=function(s){var l=n.props.inputValue,E=s.currentTarget.value;n.setState({inputIsHiddenAfterUpdate:!1}),n.onInputChange(E,{action:"input-change",prevInputValue:l}),n.props.menuIsOpen||n.onMenuOpen()},n.onInputFocus=function(s){n.props.onFocus&&n.props.onFocus(s),n.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(n.openAfterFocus||n.props.openMenuOnFocus)&&n.openMenu("first"),n.openAfterFocus=!1},n.onInputBlur=function(s){var l=n.props.inputValue;if(n.menuListRef&&n.menuListRef.contains(document.activeElement)){n.inputRef.focus();return}n.props.onBlur&&n.props.onBlur(s),n.onInputChange("",{action:"input-blur",prevInputValue:l}),n.onMenuClose(),n.setState({focusedValue:null,isFocused:!1})},n.onOptionHover=function(s){if(!(n.blockOptionHover||n.state.focusedOption===s)){var l=n.getFocusableOptions(),E=l.indexOf(s);n.setState({focusedOption:s,focusedOptionId:E>-1?n.getFocusedOptionId(s):null})}},n.shouldHideSelectedOptions=function(){return Jsu(n.props)},n.onValueInputFocus=function(s){s.preventDefault(),s.stopPropagation(),n.focus()},n.onKeyDown=function(s){var l=n.props,E=l.isMulti,c=l.backspaceRemovesValue,d=l.escapeClearsValue,h=l.inputValue,m=l.isClearable,x=l.isDisabled,C=l.menuIsOpen,p=l.onKeyDown,g=l.tabSelectsValue,F=l.openMenuOnFocus,v=n.state,y=v.focusedOption,A=v.focusedValue,b=v.selectValue;if(!x&&!(typeof p=="function"&&(p(s),s.defaultPrevented))){switch(n.blockOptionHover=!0,s.key){case"ArrowLeft":if(!E||h)return;n.focusValue("previous");break;case"ArrowRight":if(!E||h)return;n.focusValue("next");break;case"Delete":case"Backspace":if(h)return;if(A)n.removeValue(A);else{if(!c)return;E?n.popValue():m&&n.clearValue()}break;case"Tab":if(n.isComposing||s.shiftKey||!C||!g||!y||F&&n.isOptionSelected(y,b))return;n.selectOption(y);break;case"Enter":if(s.keyCode===229)break;if(C){if(!y||n.isComposing)return;n.selectOption(y);break}return;case"Escape":C?(n.setState({inputIsHiddenAfterUpdate:!1}),n.onInputChange("",{action:"menu-close",prevInputValue:h}),n.onMenuClose()):m&&d&&n.clearValue();break;case" ":if(h)return;if(!C){n.openMenu("first");break}if(!y)return;n.selectOption(y);break;case"ArrowUp":C?n.focusOption("up"):n.openMenu("last");break;case"ArrowDown":C?n.focusOption("down"):n.openMenu("first");break;case"PageUp":if(!C)return;n.focusOption("pageup");break;case"PageDown":if(!C)return;n.focusOption("pagedown");break;case"Home":if(!C)return;n.focusOption("first");break;case"End":if(!C)return;n.focusOption("last");break;default:return}s.preventDefault()}},n.state.instancePrefix="react-select-"+(n.props.instanceId||++HXe),n.state.selectValue=zp(t.value),t.menuIsOpen&&n.state.selectValue.length){var r=n.getFocusableOptionsWithIds(),i=n.buildFocusableOptions(),o=i.indexOf(n.state.selectValue[0]);n.state.focusableOptionsWithIds=r,n.state.focusedOption=i[o],n.state.focusedOptionId=Sv(r,i[o])}return n}return iQe(a,[{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&&r_(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(n){var r=this.props,i=r.isDisabled,o=r.menuIsOpen,s=this.state.isFocused;(s&&!i&&n.isDisabled||s&&o&&!n.menuIsOpen)&&this.focusInput(),s&&i&&!n.isDisabled?this.setState({isFocused:!1},this.onMenuClose):!s&&!i&&n.isDisabled&&this.inputRef===document.activeElement&&this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(r_(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(n,r){this.props.onInputChange(n,r)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(n){var r=this,i=this.state,o=i.selectValue,s=i.isFocused,l=this.buildFocusableOptions(),E=n==="first"?0:l.length-1;if(!this.props.isMulti){var c=l.indexOf(o[0]);c>-1&&(E=c)}this.scrollToFocusedOptionOnUpdate=!(s&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:l[E],focusedOptionId:this.getFocusedOptionId(l[E])},function(){return r.onMenuOpen()})}},{key:"focusValue",value:function(n){var r=this.state,i=r.selectValue,o=r.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var s=i.indexOf(o);o||(s=-1);var l=i.length-1,E=-1;if(i.length){switch(n){case"previous":s===0?E=0:s===-1?E=l:E=s-1;break;case"next":s>-1&&s<l&&(E=s+1);break}this.setState({inputIsHidden:E!==-1,focusedValue:i[E]})}}}},{key:"focusOption",value:function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",r=this.props.pageSize,i=this.state.focusedOption,o=this.getFocusableOptions();if(o.length){var s=0,l=o.indexOf(i);i||(l=-1),n==="up"?s=l>0?l-1:o.length-1:n==="down"?s=(l+1)%o.length:n==="pageup"?(s=l-r,s<0&&(s=0)):n==="pagedown"?(s=l+r,s>o.length-1&&(s=o.length-1)):n==="last"&&(s=o.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:o[s],focusedValue:null,focusedOptionId:this.getFocusedOptionId(o[s])})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme(Bv):xe(xe({},Bv),this.props.theme):Bv}},{key:"getCommonProps",value:function(){var n=this.clearValue,r=this.cx,i=this.getStyles,o=this.getClassNames,s=this.getValue,l=this.selectOption,E=this.setValue,c=this.props,d=c.isMulti,h=c.isRtl,m=c.options,x=this.hasValue();return{clearValue:n,cx:r,getStyles:i,getClassNames:o,getValue:s,hasValue:x,isMulti:d,isRtl:h,options:m,selectOption:l,selectProps:c,setValue:E,theme:this.getTheme()}}},{key:"hasValue",value:function(){var n=this.state.selectValue;return n.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var n=this.props,r=n.isClearable,i=n.isMulti;return r===void 0?i:r}},{key:"isOptionDisabled",value:function(n,r){return Vsu(this.props,n,r)}},{key:"isOptionSelected",value:function(n,r){return Hsu(this.props,n,r)}},{key:"filterOption",value:function(n,r){return Gsu(this.props,n,r)}},{key:"formatOptionLabel",value:function(n,r){if(typeof this.props.formatOptionLabel=="function"){var i=this.props.inputValue,o=this.state.selectValue;return this.props.formatOptionLabel(n,{context:r,inputValue:i,selectValue:o})}else return this.getOptionLabel(n)}},{key:"formatGroupLabel",value:function(n){return this.props.formatGroupLabel(n)}},{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 n=this.props,r=n.isDisabled,i=n.isSearchable,o=n.inputId,s=n.inputValue,l=n.tabIndex,E=n.form,c=n.menuIsOpen,d=n.required,h=this.getComponents(),m=h.Input,x=this.state,C=x.inputIsHidden,p=x.ariaSelection,g=this.commonProps,F=o||this.getElementId("input"),v=xe(xe(xe({"aria-autocomplete":"list","aria-expanded":c,"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":d,role:"combobox","aria-activedescendant":this.isAppleDevice?void 0:this.state.focusedOptionId||""},c&&{"aria-controls":this.getElementId("listbox")}),!i&&{"aria-readonly":!0}),this.hasValue()?(p==null?void 0:p.action)==="initial-input-focus"&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return i?f.createElement(m,ne({},g,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:F,innerRef:this.getInputRef,isDisabled:r,isHidden:C,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:l,form:E,type:"text",value:s},v)):f.createElement(pXe,ne({id:F,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:Sp,onFocus:this.onInputFocus,disabled:r,tabIndex:l,inputMode:"none",form:E,value:""},v))}},{key:"renderPlaceholderOrValue",value:function(){var n=this,r=this.getComponents(),i=r.MultiValue,o=r.MultiValueContainer,s=r.MultiValueLabel,l=r.MultiValueRemove,E=r.SingleValue,c=r.Placeholder,d=this.commonProps,h=this.props,m=h.controlShouldRenderValue,x=h.isDisabled,C=h.isMulti,p=h.inputValue,g=h.placeholder,F=this.state,v=F.selectValue,y=F.focusedValue,A=F.isFocused;if(!this.hasValue()||!m)return p?null:f.createElement(c,ne({},d,{key:"placeholder",isDisabled:x,isFocused:A,innerProps:{id:this.getElementId("placeholder")}}),g);if(C)return v.map(function(B,T){var _=B===y,$="".concat(n.getOptionLabel(B),"-").concat(n.getOptionValue(B));return f.createElement(i,ne({},d,{components:{Container:o,Label:s,Remove:l},isFocused:_,isDisabled:x,key:$,index:T,removeProps:{onClick:function(){return n.removeValue(B)},onTouchEnd:function(){return n.removeValue(B)},onMouseDown:function(R){R.preventDefault()}},data:B}),n.formatOptionLabel(B,"value"))});if(p)return null;var b=v[0];return f.createElement(E,ne({},d,{data:b,isDisabled:x}),this.formatOptionLabel(b,"value"))}},{key:"renderClearIndicator",value:function(){var n=this.getComponents(),r=n.ClearIndicator,i=this.commonProps,o=this.props,s=o.isDisabled,l=o.isLoading,E=this.state.isFocused;if(!this.isClearable()||!r||s||!this.hasValue()||l)return null;var c={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(r,ne({},i,{innerProps:c,isFocused:E}))}},{key:"renderLoadingIndicator",value:function(){var n=this.getComponents(),r=n.LoadingIndicator,i=this.commonProps,o=this.props,s=o.isDisabled,l=o.isLoading,E=this.state.isFocused;if(!r||!l)return null;var c={"aria-hidden":"true"};return f.createElement(r,ne({},i,{innerProps:c,isDisabled:s,isFocused:E}))}},{key:"renderIndicatorSeparator",value:function(){var n=this.getComponents(),r=n.DropdownIndicator,i=n.IndicatorSeparator;if(!r||!i)return null;var o=this.commonProps,s=this.props.isDisabled,l=this.state.isFocused;return f.createElement(i,ne({},o,{isDisabled:s,isFocused:l}))}},{key:"renderDropdownIndicator",value:function(){var n=this.getComponents(),r=n.DropdownIndicator;if(!r)return null;var i=this.commonProps,o=this.props.isDisabled,s=this.state.isFocused,l={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return f.createElement(r,ne({},i,{innerProps:l,isDisabled:o,isFocused:s}))}},{key:"renderMenu",value:function(){var n=this,r=this.getComponents(),i=r.Group,o=r.GroupHeading,s=r.Menu,l=r.MenuList,E=r.MenuPortal,c=r.LoadingMessage,d=r.NoOptionsMessage,h=r.Option,m=this.commonProps,x=this.state.focusedOption,C=this.props,p=C.captureMenuScroll,g=C.inputValue,F=C.isLoading,v=C.loadingMessage,y=C.minMenuHeight,A=C.maxMenuHeight,b=C.menuIsOpen,B=C.menuPlacement,T=C.menuPosition,_=C.menuPortalTarget,$=C.menuShouldBlockScroll,M=C.menuShouldScrollIntoView,R=C.noOptionsMessage,O=C.onMenuScrollToTop,N=C.onMenuScrollToBottom;if(!b)return null;var z=function(G,Z){var J=G.type,nu=G.data,q=G.isDisabled,iu=G.isSelected,Cu=G.label,yu=G.value,ku=x===nu,Fu=q?void 0:function(){return n.onOptionHover(nu)},Nu=q?void 0:function(){return n.selectOption(nu)},Ku="".concat(n.getElementId("option"),"-").concat(Z),ie={id:Ku,onClick:Nu,onMouseMove:Fu,onMouseOver:Fu,tabIndex:-1,role:"option","aria-selected":n.isAppleDevice?void 0:iu};return f.createElement(h,ne({},m,{innerProps:ie,data:nu,isDisabled:q,isSelected:iu,key:Ku,label:Cu,type:J,value:yu,isFocused:ku,innerRef:ku?n.getFocusedOptionRef:void 0}),n.formatOptionLabel(G.data,"menu"))},L;if(this.hasOptions())L=this.getCategorizedOptions().map(function(P){if(P.type==="group"){var G=P.data,Z=P.options,J=P.index,nu="".concat(n.getElementId("group"),"-").concat(J),q="".concat(nu,"-heading");return f.createElement(i,ne({},m,{key:nu,data:G,options:Z,Heading:o,headingProps:{id:q,data:P.data},label:n.formatGroupLabel(P.data)}),P.options.map(function(iu){return z(iu,"".concat(J,"-").concat(iu.index))}))}else if(P.type==="option")return z(P,"".concat(P.index))});else if(F){var w=v({inputValue:g});if(w===null)return null;L=f.createElement(c,m,w)}else{var j=R({inputValue:g});if(j===null)return null;L=f.createElement(d,m,j)}var K={minMenuHeight:y,maxMenuHeight:A,menuPlacement:B,menuPosition:T,menuShouldScrollIntoView:M},W=f.createElement(Qqe,ne({},m,K),function(P){var G=P.ref,Z=P.placerProps,J=Z.placement,nu=Z.maxHeight;return f.createElement(s,ne({},m,K,{innerRef:G,innerProps:{onMouseDown:n.onMenuMouseDown,onMouseMove:n.onMenuMouseMove},isLoading:F,placement:J}),f.createElement(AXe,{captureEnabled:p,onTopArrive:O,onBottomArrive:N,lockEnabled:$},function(q){return f.createElement(l,ne({},m,{innerRef:function(Cu){n.getMenuListRef(Cu),q(Cu)},innerProps:{role:"listbox","aria-multiselectable":m.isMulti,id:n.getElementId("listbox")},isLoading:F,maxHeight:nu,focusedOption:x}),L)}))});return _||T==="fixed"?f.createElement(E,ne({},m,{appendTo:_,controlElement:this.controlRef,menuPlacement:B,menuPosition:T}),W):W}},{key:"renderFormField",value:function(){var n=this,r=this.props,i=r.delimiter,o=r.isDisabled,s=r.isMulti,l=r.name,E=r.required,c=this.state.selectValue;if(E&&!this.hasValue()&&!o)return f.createElement(BXe,{name:l,onFocus:this.onValueInputFocus});if(!(!l||o))if(s)if(i){var d=c.map(function(x){return n.getOptionValue(x)}).join(i);return f.createElement("input",{name:l,type:"hidden",value:d})}else{var h=c.length>0?c.map(function(x,C){return f.createElement("input",{key:"i-".concat(C),name:l,type:"hidden",value:n.getOptionValue(x)})}):f.createElement("input",{name:l,type:"hidden",value:""});return f.createElement("div",null,h)}else{var m=c[0]?this.getOptionValue(c[0]):"";return f.createElement("input",{name:l,type:"hidden",value:m})}}},{key:"renderLiveRegion",value:function(){var n=this.commonProps,r=this.state,i=r.ariaSelection,o=r.focusedOption,s=r.focusedValue,l=r.isFocused,E=r.selectValue,c=this.getFocusableOptions();return f.createElement(dXe,ne({},n,{id:this.getElementId("live-region"),ariaSelection:i,focusedOption:o,focusedValue:s,isFocused:l,selectValue:E,focusableOptions:c,isAppleDevice:this.isAppleDevice}))}},{key:"render",value:function(){var n=this.getComponents(),r=n.Control,i=n.IndicatorsContainer,o=n.SelectContainer,s=n.ValueContainer,l=this.props,E=l.className,c=l.id,d=l.isDisabled,h=l.menuIsOpen,m=this.state.isFocused,x=this.commonProps=this.getCommonProps();return f.createElement(o,ne({},x,{className:E,innerProps:{id:c,onKeyDown:this.onKeyDown},isDisabled:d,isFocused:m}),this.renderLiveRegion(),f.createElement(r,ne({},x,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:d,isFocused:m,menuIsOpen:h}),f.createElement(s,ne({},x,{isDisabled:d}),this.renderPlaceholderOrValue(),this.renderInput()),f.createElement(i,ne({},x,{isDisabled:d}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(n,r){var i=r.prevProps,o=r.clearFocusValueOnUpdate,s=r.inputIsHiddenAfterUpdate,l=r.ariaSelection,E=r.isFocused,c=r.prevWasFocused,d=r.instancePrefix,h=n.options,m=n.value,x=n.menuIsOpen,C=n.inputValue,p=n.isMulti,g=zp(m),F={};if(i&&(m!==i.value||h!==i.options||x!==i.menuIsOpen||C!==i.inputValue)){var v=x?KXe(n,g):[],y=x?g_(g6(n,g),"".concat(d,"-option")):[],A=o?$Xe(r,g):null,b=VXe(r,v),B=Sv(y,b);F={selectValue:g,focusedOption:b,focusedOptionId:B,focusableOptionsWithIds:y,focusedValue:A,clearFocusValueOnUpdate:!1}}var T=s!=null&&n!==i?{inputIsHidden:s,inputIsHiddenAfterUpdate:void 0}:{},_=l,$=E&&c;return E&&!$&&(_={value:r5(p,g,g[0]||null),options:g,action:"initial-input-focus"},$=!c),(l==null?void 0:l.action)==="initial-input-focus"&&(_=null),xe(xe(xe({},F),T),{},{prevProps:n,ariaSelection:_,prevWasFocused:$})}}]),a}(f.Component);Wsu.defaultProps=IXe;var GXe=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];function JXe(e){var u=e.defaultInputValue,a=u===void 0?"":u,t=e.defaultMenuIsOpen,n=t===void 0?!1:t,r=e.defaultValue,i=r===void 0?null:r,o=e.inputValue,s=e.menuIsOpen,l=e.onChange,E=e.onInputChange,c=e.onMenuClose,d=e.onMenuOpen,h=e.value,m=Io(e,GXe),x=f.useState(o!==void 0?o:a),C=ls(x,2),p=C[0],g=C[1],F=f.useState(s!==void 0?s:n),v=ls(F,2),y=v[0],A=v[1],b=f.useState(h!==void 0?h:i),B=ls(b,2),T=B[0],_=B[1],$=f.useCallback(function(w,j){typeof l=="function"&&l(w,j),_(w)},[l]),M=f.useCallback(function(w,j){var K;typeof E=="function"&&(K=E(w,j)),g(K!==void 0?K:w)},[E]),R=f.useCallback(function(){typeof d=="function"&&d(),A(!0)},[d]),O=f.useCallback(function(){typeof c=="function"&&c(),A(!1)},[c]),N=o!==void 0?o:p,z=s!==void 0?s:y,L=h!==void 0?h:T;return xe(xe({},m),{},{inputValue:N,menuIsOpen:z,onChange:$,onInputChange:M,onMenuClose:O,onMenuOpen:R,value:L})}var WXe=["allowCreateWhileLoading","createOptionPosition","formatCreateLabel","isValidNewOption","getNewOptionData","onCreateOption","options","onChange"],F_=function(){var u=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",a=arguments.length>1?arguments[1]:void 0,t=arguments.length>2?arguments[2]:void 0,n=String(u).toLowerCase(),r=String(t.getOptionValue(a)).toLowerCase(),i=String(t.getOptionLabel(a)).toLowerCase();return r===n||i===n},zv={formatCreateLabel:function(u){return'Create "'.concat(u,'"')},isValidNewOption:function(u,a,t,n){return!(!u||a.some(function(r){return F_(u,r,n)})||t.some(function(r){return F_(u,r,n)}))},getNewOptionData:function(u,a){return{label:a,value:u,__isNew__:!0}}};function UXe(e){var u=e.allowCreateWhileLoading,a=u===void 0?!1:u,t=e.createOptionPosition,n=t===void 0?"last":t,r=e.formatCreateLabel,i=r===void 0?zv.formatCreateLabel:r,o=e.isValidNewOption,s=o===void 0?zv.isValidNewOption:o,l=e.getNewOptionData,E=l===void 0?zv.getNewOptionData:l,c=e.onCreateOption,d=e.options,h=d===void 0?[]:d,m=e.onChange,x=Io(e,WXe),C=x.getOptionValue,p=C===void 0?_su:C,g=x.getOptionLabel,F=g===void 0?Lsu:g,v=x.inputValue,y=x.isLoading,A=x.isMulti,b=x.value,B=x.name,T=f.useMemo(function(){return s(v,zp(b),h,{getOptionValue:p,getOptionLabel:F})?E(v,i(v)):void 0},[i,E,F,p,v,s,h,b]),_=f.useMemo(function(){return(a||!y)&&T?n==="first"?[T].concat(vc(h)):[].concat(vc(h),[T]):h},[a,n,y,T,h]),$=f.useCallback(function(M,R){if(R.action!=="select-option")return m(M,R);var O=Array.isArray(M)?M:[M];if(O[O.length-1]===T){if(c)c(v);else{var N=E(v,v),z={action:"create-option",name:B,option:N};m(r5(A,[].concat(vc(zp(b)),[N]),N),z)}return}m(M,R)},[E,v,A,B,T,c,m,b]);return xe(xe({},x),{},{options:_,onChange:$})}var ZXe=f.forwardRef(function(e,u){var a=JXe(e),t=UXe(a);return f.createElement(Wsu,ne({ref:u},t))}),QXe=ZXe;Sh.pick({parameters:!0,defaultParameters:!0,parameterEnums:!0,defaultCacheKey:!0,defaultCacheTtl:!0,defaultCacheAllInvocations:!0,autoAuth:!0,advanced:!0});const qXe=({value:e,onChange:u})=>{var a,t;return D.jsxs(wz,{children:[D.jsx(Mz,{children:D.jsxs(r4,{children:[D.jsx(q1,{children:"Name"}),D.jsx(q1,{className:"w-1/2",children:"Options"}),D.jsx(q1,{className:"w-1/2",children:"Default value"}),D.jsx(q1,{className:"w-8"})]})}),D.jsxs(Tz,{children:[(a=e.parameters)==null?void 0:a.map((n,r)=>{var i,o,s;return D.jsxs(r4,{children:[D.jsx(es,{className:"whitespace-nowrap",children:n}),D.jsx(es,{children:D.jsx(QXe,{className:"my-react-select-container",classNamePrefix:"my-react-select",placeholder:"Add options...",formatCreateLabel:l=>`Add ${l}`,isMulti:!0,isClearable:!1,styles:{menuPortal:l=>({...l,zIndex:9999})},menuPortalTarget:document.body,value:(o=(i=e.parameterEnums)==null?void 0:i[n])==null?void 0:o.map(l=>({label:l,value:l})),onChange:l=>{u({...e,parameterEnums:{...e.parameterEnums,[n]:(l==null?void 0:l.map(E=>E.value))||[]}})}})}),D.jsx(es,{children:D.jsx(pou,{singleLine:!0,value:((s=e.defaultParameters)==null?void 0:s[n])||"",language:"template-string",placeholder:"JavaScript expression",onChange:l=>{u({...e,defaultParameters:{...e.defaultParameters,[n]:l}})}})}),D.jsx(es,{children:D.jsx(_e,{type:"button",variant:"ghost",size:"smIcon",className:"text-destructive hover:text-destructive hover:bg-transparent",onClick:()=>{var c;const l={...e.defaultParameters};delete l[n];const E={...e.parameterEnums};delete E[n],u({...e,parameters:(c=e.parameters)==null?void 0:c.filter(d=>d!==n),defaultParameters:l,parameterEnums:E})},children:D.jsx(sh,{className:"h-4 w-4"})})})]},r)}),(t=e.parameters)!=null&&t.length?null:D.jsx(r4,{children:D.jsx(es,{colSpan:4,className:"h-24 text-center",children:"No parameters."})})]})]})},YXe=e=>{var t,n,r;const[u,a]=f.useState("");return D.jsxs("div",{className:"space-y-4",children:[D.jsxs("div",{className:"flex items-center gap-2",children:[D.jsx(Lt,{placeholder:"PARAMETER_NAME",value:u,onChange:i=>a(i.target.value)}),D.jsxs(_e,{variant:"outline",disabled:!u,onClick:()=>{var i,o,s;a(""),e.onChange({...e.step,parameters:{parameterNames:[...((i=e.step.parameters)==null?void 0:i.parameterNames)||[],u],defaultParameters:(o=e.step.parameters)==null?void 0:o.defaultParameters,parameterEnums:(s=e.step.parameters)==null?void 0:s.parameterEnums}})},children:[D.jsx(oh,{}),"Add"]})]}),D.jsx(qXe,{value:{parameters:(t=e.step.parameters)==null?void 0:t.parameterNames,defaultParameters:(n=e.step.parameters)==null?void 0:n.defaultParameters,parameterEnums:(r=e.step.parameters)==null?void 0:r.parameterEnums},onChange:i=>{e.onChange({...e.step,parameters:{parameterNames:i.parameters??[],defaultParameters:i.defaultParameters??void 0,parameterEnums:i.parameterEnums??void 0}})}})]})},k_=e=>{var u,a;switch(e.type){case te.AI_ACTION:return e.text.trim().length>0;case b0.MODULE:return e.name.trim().length>0;case te.PRESET:{const t=e.command;switch(t.type){case Eu.AI_CHECK:return t.assertion.trim().length>0;case Eu.TAP:return t.target.type==="description"?t.target.description.trim().length>0:!0;case Eu.TYPE:return t.text.trim().length>0;case Eu.OPEN_APP:if((u=t.intentExtras)!=null&&u.length)try{JSON.parse(t.intentExtras)}catch{return!1}return t.packageName.trim().length>0;case Eu.JAVASCRIPT:return t.code.trim().length>0;case Eu.REQUEST:return t.url.trim().length>0;case Eu.WAIT:return t.timeoutSecs>0;case Eu.ADD_FILE:return t.file.trim().length>0&&t.storageLocation.trim().length>0;case Eu.INSTALL_APP:return t.uri.trim().length>0;case Eu.ADB:if((a=t.jsonArgs)!=null&&a.length)try{JSON.parse(t.jsonArgs)}catch{return!1}return t.command.trim().length>0;case Eu.SWIPE:return t.scrollableElement.type===br.CUSTOM?t.scrollableElement.target.description.trim().length>0:!0;default:return!0}}}return!0},XXe={[yr.BACK]:"Back",[yr.HOME]:"Home",[yr.APP_SWITCHER]:"App switcher",[yr.POWER]:"Power",[yr.SEARCH]:"Search",[yr.VOLUME_UP]:"Volume up",[yr.VOLUME_DOWN]:"Volume down",[yr.VOLUME_MUTE]:"Volume mute"},uu0={[ic.BACKSPACE]:"Backspace",[ic.CLOSE_KEYBOARD]:"Close keyboard",[ic.ENTER]:"Enter"},Re=(e,u)=>e.type===u,E0=(e,u)=>e.type===u,Ov=e=>{if(!e)return"";switch(e.type){case"description":return e.description;case"coordinates":return`${e.xPercent}%, ${e.yPercent}%`}},eu0=({state:e,modules:u,onChange:a})=>{var m,x,C,p;const t=n3(e),n=f.useMemo(()=>{switch(t.type){case te.AI_ACTION:return{type:te.AI_ACTION};case te.PRESET:return{type:te.PRESET,command:t.command.type};case b0.MODULE:return{...t,type:b0.MODULE}}},[t]),[r,i]=cb(t),o=()=>{if(k_(r)){a==null||a(r);return}i(t)},s=g=>{k_(g)&&(a==null||a(g)),i(t)};f.useEffect(()=>{i(t)},[t,i]);const l=[],E=[],c=[],d=[],h=[];switch(r.type){case te.AI_ACTION:E.push(D.jsxs(x0,{children:[D.jsx(Gs,{placeholder:"Re-enable 2FA in account settings and confirm it is active.",value:r.text,onChange:g=>{const F=g.target.value;i(v=>{Re(v,te.AI_ACTION)&&(v.text=F)})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Goal"})})]},"ai-action-goal"));break;case b0.MODULE:d.push(D.jsxs(x0,{children:[D.jsx(gn,{value:r.name,onChange:g=>{const F=g.target.value;i(v=>{Re(v,b0.MODULE)&&(v.name=F)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Name"})})]},"module-name"),D.jsxs(x0,{children:[D.jsx(Gs,{value:r.description,onChange:g=>{const F=g.target.value;i(v=>{Re(v,b0.MODULE)&&(v.description=F)})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Description"})})]},"module-description"),D.jsxs(zf,{onOpenChange:()=>{i(g=>{var F,v;if(Re(g,b0.MODULE)){const y=(F=g.parameters)==null?void 0:F.defaultParameters;y&&(Object.keys(y).forEach(b=>{y[b].trim()||delete y[b]}),Object.keys(y||{}).length||(g.parameters.defaultParameters=void 0));const A=(v=g.parameters)==null?void 0:v.parameterEnums;A&&(Object.keys(A).forEach(b=>{A[b].length||delete A[b]}),Object.keys(A||{}).length||(g.parameters.parameterEnums=void 0)),s(Ra(g))}})},children:[D.jsx(Of,{asChild:!0,children:D.jsxs(_e,{variant:"outline",className:"w-fit",children:[D.jsx(IA,{}),"Configure parameters"]})}),D.jsx(vD,{className:"w-[700px]",side:"right",align:"start",children:D.jsx(YXe,{step:r,onChange:g=>{i(F=>{Re(F,b0.MODULE)&&(F.parameters=g.parameters)})}})})]},"module-parameters")),(m=r.parameters)==null||m.parameterNames.forEach(g=>{var F,v,y;h.push(D.jsxs(x0,{children:[D.jsx(gn,{placeholder:((v=(F=r.parameters)==null?void 0:F.defaultParameters)==null?void 0:v[g])||"'hello world'",value:((y=r.inputs)==null?void 0:y[g])||"",onChange:A=>{const b=A.target.value;i(B=>{Re(B,b0.MODULE)&&(B.inputs={...B.inputs||{}},b?B.inputs[g]=b:delete B.inputs[g],Object.keys(B.inputs).length===0&&(B.inputs=void 0))})},onBlur:()=>{i(A=>{Re(A,b0.MODULE)&&(A.inputs={...A.inputs||{}},Object.keys(A.inputs).forEach(b=>{var T,_;const B=(T=A.inputs)==null?void 0:T[b].trim();B?A.inputs[b]=B:(_=A.inputs)==null||delete _[b]}),Object.keys(A.inputs).length===0&&(A.inputs=void 0),s(Ra(A)))})}}),D.jsx(me,{children:D.jsx($e,{children:g})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:'JavaScript expression to pass into the module that can be referenced inside the module using the `env` variable. You should quote strings ("hello") and reference variables directly without {{ }} (e.g. `env.CURRENT_URL`)'})]})})]},`module-param-${g}`))}),c.push(D.jsxs(x0,{children:[D.jsx(gn,{placeholder:"ENV_VAR_NAME",value:r.envKey||"",onChange:g=>{const F=g.target.value.trim();i(v=>{Re(v,b0.MODULE)&&(v.envKey=F||void 0)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Variable name"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Store the output of this step onto the environment with the given variable name."})]})})]},"module-env"));break;case te.PRESET:switch(r.command.type){case Eu.AI_CHECK:E.push(D.jsxs(x0,{children:[D.jsx(Gs,{value:r.command.assertion,onChange:g=>{const F=g.target.value;i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.AI_CHECK)&&(v.command.assertion=F)})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Assertion"})})]},"ai-check-assertion"),D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.timeoutSecs??null,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.AI_CHECK)&&(F.command.timeoutSecs=g??void 0,s(Ra(F)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Timeout"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"s"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Maximum numer of seconds to wait for the assertion to pass. At least two attempts will be made. Defaults to 5 seconds."})]})})]},"ai-check-timeout"));break;case Eu.TAP:{l.push(D.jsxs(x0,{children:[D.jsx(gn,{value:Ov(r.command.target),onChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&(b.command.target={type:"description",description:A.target.value})})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Element"})})]},"tap-element"));let g;(A=>{A.SINGLE="SINGLE",A.DOUBLE="DOUBLE",A.LONG_PRESS="LONG_PRESS"})(g||(g={}));const F=r.command.longPress?"LONG_PRESS":r.command.doubleTap?"DOUBLE":"SINGLE";let v;(A=>{A.CENTER="CENTER",A.CUSTOM="CUSTOM"})(v||(v={}));const y=((x=r.command.relativePosition)==null?void 0:x.x)!==void 0&&r.command.relativePosition.y!==void 0?"CUSTOM":"CENTER";E.push(D.jsxs(m6,{type:"single",variant:"outline",className:"justify-start",value:F,onValueChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&(b.command.longPress=A==="LONG_PRESS",b.command.doubleTap=A==="DOUBLE",b.command.longPressDurationMs=void 0,b.command.doubleTapDelayMs=void 0,s(Ra(b)))})},children:[D.jsx(uo,{value:"SINGLE",children:"Single tap"}),D.jsx(uo,{value:"DOUBLE",children:"Double tap"}),D.jsx(uo,{value:"LONG_PRESS",children:"Long press"})]},"tap-type"),F==="LONG_PRESS"&&D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.longPressDurationMs??null,onChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&(b.command.longPressDurationMs=A??void 0,s(Ra(b)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Press duration"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"ms"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Milliseconds to hold the tap before releasing. Defaults to 2000 milliseconds."})]})})]},"press-duration"),F==="DOUBLE"&&D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.doubleTapDelayMs??null,onChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&(b.command.doubleTapDelayMs=A??void 0,s(Ra(b)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Tap delay"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"ms"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Milliseconds to wait between taps. Defaults to 100 milliseconds."})]})})]},"double-tap-delay"),D.jsxs(m6,{type:"single",variant:"outline",className:"justify-start",value:y,onValueChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&(A==="CENTER"?b.command.relativePosition=void 0:b.command.relativePosition={x:0,y:0},s(Ra(b)))})},children:[D.jsx(uo,{value:"CENTER",children:"Center"}),D.jsx(uo,{value:"CUSTOM",children:"Custom"})]},"tap-position"),y==="CUSTOM"&&D.jsxs("div",{className:"flex items-center gap-1",children:[D.jsxs(x0,{children:[D.jsx(Qi,{value:((C=r.command.relativePosition)==null?void 0:C.x)??null,onChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&b.command.relativePosition&&(b.command.relativePosition.x=A??0,s(Ra(b)))})}}),D.jsx(me,{children:D.jsx($e,{children:"X offset"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"px"})})]}),D.jsxs(x0,{children:[D.jsx(Qi,{value:((p=r.command.relativePosition)==null?void 0:p.y)??null,onChange:A=>{i(b=>{Re(b,te.PRESET)&&E0(b.command,Eu.TAP)&&b.command.relativePosition&&(b.command.relativePosition.y=A??0,s(Ra(b)))})}}),D.jsx(me,{children:D.jsx($e,{children:"X offset"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"px"})})]})]},"tap-position-inputs"));break}case Eu.TYPE:l.push(D.jsxs(x0,{children:[D.jsx(gn,{value:Ov(r.command.target),onChange:g=>{i(F=>{if(Re(F,te.PRESET)&&E0(F.command,Eu.TYPE)){if(!g.target.value){F.command.target=void 0;return}F.command.target={type:"description",description:g.target.value}}})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Element"})})]},"type-element")),E.push(D.jsxs(x0,{children:[D.jsx(Gs,{value:r.command.text,onChange:g=>{const F=g.target.value;i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.TYPE)&&(v.command.text=F)})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Value"})})]},"type-value"),D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.keyPressDelayMs??null,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.TYPE)&&(F.command.keyPressDelayMs=g??void 0,s(Ra(F)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Key press delay"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"ms"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Milliseconds to wait between each key press. Defaults to 25 milliseconds."})]})})]},"type-delay"),D.jsxs("div",{className:"flex h-9 items-center gap-2",children:[D.jsx(Vou,{id:"clear-content",checked:r.command.clearContent,onCheckedChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.TYPE)&&(F.command.clearContent=g==="indeterminate"?!1:g,s(Ra(F)))})}}),D.jsx(pi,{htmlFor:"clear-content",children:"Clear content"})]},"type-clear-content"));break;case Eu.PRESS:E.push(D.jsxs(Xn,{value:r.command.key,onValueChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.PRESS)&&(F.command.key=g,s(Ra(F)))})},children:[D.jsx(Bn,{className:"w-fit space-x-2",children:D.jsx(ur,{placeholder:"Select a button"})}),D.jsx(Sn,{children:Object.values(yr).map(g=>D.jsx(y0,{value:g,children:XXe[g]},g))})]},"press-key"));break;case Eu.PRESS_KEYBOARD:E.push(D.jsxs(Xn,{value:r.command.key,onValueChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.PRESS_KEYBOARD)&&(F.command.key=g,s(Ra(F)))})},children:[D.jsx(Bn,{className:"w-fit space-x-2",children:D.jsx(ur,{placeholder:"Select a key"})}),D.jsx(Sn,{children:Object.values(ic).map(g=>D.jsx(y0,{value:g,children:uu0[g]},g))})]},"press-keyboard"));break;case Eu.SWIPE:{E.push(D.jsxs(m6,{type:"single",variant:"outline",className:"justify-start",value:r.command.direction,onValueChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.SWIPE)&&(F.command.direction=g,s(Ra(F)))})},children:[D.jsx(uo,{value:"up",children:"Up"}),D.jsx(uo,{value:"down",children:"Down"}),D.jsx(uo,{value:"left",children:"Left"}),D.jsx(uo,{value:"right",children:"Right"})]},"swipe-direction"),D.jsxs(Xn,{value:r.command.scrollableElement.type,onValueChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.SWIPE)&&(g===br.CUSTOM?F.command.scrollableElement={type:br.CUSTOM,target:{type:"description",description:""}}:(F.command.scrollableElement={type:g},s(Ra(F))))})},children:[D.jsx(Bn,{className:"w-fit space-x-2",children:D.jsx(ur,{placeholder:"Select a direction"})}),D.jsxs(Sn,{children:[D.jsx(y0,{value:br.SCREEN,children:"Screen"}),D.jsx(y0,{value:br.OPEN_APP,children:"Currently open app"}),D.jsx(y0,{value:br.OPEN_WEBVIEW,children:"Active webview"}),D.jsx(y0,{value:br.CUSTOM,children:"Custom container"})]})]},"swipe-container-type"),r.command.scrollableElement.type===br.CUSTOM&&D.jsxs(x0,{children:[D.jsx(gn,{value:Ov(r.command.scrollableElement.target),onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.SWIPE)&&(F.command.scrollableElement={type:br.CUSTOM,target:{type:"description",description:g.target.value}})})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Container"})})]},"swipe-container-element"),D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.viewportPercent??null,min:0,max:100,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.SWIPE)&&(F.command.viewportPercent=g??void 0,s(Ra(F)))})}}),D.jsx(me,{children:D.jsx($e,{children:r.command.direction==="down"||r.command.direction==="up"?"Height":"Width"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"%"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"The amount to scroll, as a percentage of the height for vertical swipes and the width for horizontal swipes. Defaults to 90%."})]})})]},"swipe-percentage"),D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.durationMs??null,min:0,max:100,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.SWIPE)&&(F.command.durationMs=g??void 0,s(Ra(F)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Duration"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"ms"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"The duration of the swipe in milliseconds. Defaults to 500 milliseconds."})]})})]},"swipe-duration"));break}case Eu.OPEN_APP:E.push(D.jsxs(x0,{children:[D.jsx(gn,{value:r.command.packageName,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.OPEN_APP)&&(F.command.packageName=g.target.value)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Package"})})]},"open-app-package-name"),D.jsxs(x0,{children:[D.jsx(gn,{value:r.command.activityName,onChange:g=>{i(F=>{if(Re(F,te.PRESET)&&E0(F.command,Eu.OPEN_APP)){if(!g.target.value){F.command.activityName=void 0;return}F.command.activityName=g.target.value}})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Activity"})})]},"open-app-activity-name"),D.jsxs(x0,{children:[D.jsx(Gs,{value:r.command.intentExtras||"",onChange:g=>{i(F=>{if(Re(F,te.PRESET)&&E0(F.command,Eu.OPEN_APP)){const v=g.target.value.trim();F.command.intentExtras=v||void 0}})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Intent extras"})})]},"open-app-intent-extras"));break;case Eu.OPEN_NOTIFICATION_DRAWER:break;case Eu.ADB:E.push(D.jsxs(x0,{children:[D.jsx(Gs,{value:r.command.command,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.ADB)&&(F.command.command=g.target.value)})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Command"})})]},"adb-command"),D.jsxs(x0,{children:[D.jsx(Gs,{value:r.command.jsonArgs||"",onChange:g=>{i(F=>{if(Re(F,te.PRESET)&&E0(F.command,Eu.ADB)){const v=g.target.value.trim();F.command.jsonArgs=v||void 0}})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Arguments"})})]},"adb-args"));break;case Eu.JAVASCRIPT:E.push(D.jsxs(x0,{children:[D.jsx(Gs,{value:r.command.code,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.JAVASCRIPT)&&(F.command.code=g.target.value)})},onBlur:o}),D.jsx(me,{align:"block-start",children:D.jsx($e,{children:"Code"})})]},"javascript-code"),D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.timeout??null,min:0,max:120,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.JAVASCRIPT)&&(F.command.timeout=g??void 0,s(Ra(F)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Timeout"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"s"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"The maximum amount of time to wait for the code to complete in seconds. Defaults to 15 seconds."})]})})]},"javascript-timeout")),c.push(D.jsxs(x0,{children:[D.jsx(gn,{placeholder:"ENV_VAR_NAME",value:r.envKey||"",onChange:g=>{const F=g.target.value.trim();i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.JAVASCRIPT)&&(v.envKey=F||void 0)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Variable name"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Store the output of this step onto the environment with the given variable name."})]})})]},"javascript-env"));break;case Eu.WAIT:E.push(D.jsxs(x0,{children:[D.jsx(Qi,{value:r.command.timeoutSecs,min:0,max:1800,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.WAIT)&&(F.command.timeoutSecs=g??0,s(Ra(F)))})}}),D.jsx(me,{children:D.jsx($e,{children:"Duration"})}),D.jsx(me,{align:"inline-end",children:D.jsx($e,{children:"s"})})]},"wait-timeout"));break;case Eu.REQUEST:E.push(D.jsxs(zf,{onOpenChange:o,children:[D.jsx(Of,{asChild:!0,children:D.jsxs(_e,{variant:"outline",className:"w-fit",children:[D.jsx(IA,{}),"Configure request"]})}),D.jsx(vD,{className:"w-[700px]",side:"right",align:"start",children:D.jsx(JZe,{command:r.command,onChange:g=>{i(F=>{Re(F,te.PRESET)&&E0(F.command,Eu.REQUEST)&&(F.command={...g,type:Eu.REQUEST})})}})})]},"request-config")),c.push(D.jsxs(x0,{children:[D.jsx(gn,{placeholder:"ENV_VAR_NAME",value:r.envKey||"",onChange:g=>{const F=g.target.value.trim();i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.REQUEST)&&(v.envKey=F||void 0)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Variable name"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Store the output of this step onto the environment with the given variable name."})]})})]},"request-env"));break;case Eu.ADD_FILE:E.push(D.jsxs(x0,{children:[D.jsx(gn,{placeholder:"https://example.com/file.txt",value:r.command.file,onChange:g=>{const F=g.target.value;i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.ADD_FILE)&&(v.command.file=F)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"File"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"File to upload. This can either be a path on the local filesystem, or a URL."})]})})]},"file-path"),D.jsxs(x0,{children:[D.jsx(gn,{placeholder:"/sdcard/Download/android.jpg",value:r.command.storageLocation,onChange:g=>{const F=g.target.value;i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.ADD_FILE)&&(v.command.storageLocation=F)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"Storage"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"Location on the device where the file should be stored. This should be a file name."})]})})]},"storage-location"));break;case Eu.INSTALL_APP:E.push(D.jsxs(x0,{children:[D.jsx(gn,{placeholder:"/Users/wwu/Download/app.apk",value:r.command.uri,onChange:g=>{const F=g.target.value;i(v=>{Re(v,te.PRESET)&&E0(v.command,Eu.INSTALL_APP)&&(v.command.uri=F)})},onBlur:o}),D.jsx(me,{children:D.jsx($e,{children:"APK URI"})}),D.jsx(me,{align:"inline-end",children:D.jsxs(M0,{children:[D.jsx(T0,{asChild:!0,children:D.jsx(Yt,{variant:"ghost","aria-label":"Help",size:"icon-xs",children:D.jsx(pn,{})})}),D.jsx(A0,{className:"max-w-xs",children:"A publicly accessible URL to an APK, or a path to a file on disk. Non-absolute paths are resolved relative to the Momentic project root."})]})})]},"storage-location"));break;case Eu.KILL_APP:break;case Eu.STATE:break;default:r.command}}return D.jsxs("div",{children:[D.jsxs("div",{className:"flex items-center px-2 py-1",children:[D.jsx(tQe,{value:n,modules:u,onSwitch:g=>{switch(g.type){case te.AI_ACTION:a==null||a({id:cl(),type:te.AI_ACTION,text:""});break;case te.PRESET:a==null||a({id:cl(),type:te.PRESET,command:FZ(g.command)});break;case b0.MODULE:a==null||a({...g,id:cl(),type:b0.MODULE});break}}}),D.jsx("div",{className:"ml-auto",children:D.jsx(Wou,{variant:"outline",pressed:t.skipped||!1,onPressedChange:g=>{a==null||a({...t,skipped:g})},children:t.skipped?D.jsx($3u,{}):D.jsx(H3u,{})})})]}),D.jsx(ao,{}),d.length>0&&D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:"grid gap-1 px-2 py-1",children:[D.jsx("div",{className:"flex h-9 items-center",children:D.jsx(pi,{children:"Module"})}),d]}),D.jsx(ao,{})]}),h.length>0&&D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:"grid gap-1 px-2 py-1",children:[D.jsx("div",{className:"flex h-9 items-center",children:D.jsx(pi,{children:"Inputs"})}),h]}),D.jsx(ao,{})]}),l.length>0&&D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:"grid gap-1 px-2 py-1",children:[D.jsx("div",{className:"flex h-9 items-center",children:D.jsx(pi,{children:"Target"})}),l]}),D.jsx(ao,{})]}),E.length>0&&D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:"grid gap-1 px-2 py-1",children:[D.jsx("div",{className:"flex h-9 items-center",children:D.jsx(pi,{children:"Action"})}),E]}),D.jsx(ao,{})]}),c.length>0&&D.jsxs(D.Fragment,{children:[D.jsxs("div",{className:"grid gap-1 px-2 py-1",children:[D.jsx("div",{className:"flex h-9 items-center",children:D.jsx(pi,{children:"Output"})}),c]}),D.jsx(ao,{})]})]})},au0=2e3,tu0=({testPath:e,test:u,pathSegments:a})=>{const t=Os(),{limbar:n,canceling:r,executing:i,canExecute:o,error:s,connectionStatusUpdate:l,editorState:E,editingUniqueId:c,selectedUniqueIds:d,logcatLogs:h,a11yTreeResponse:m,isLoadingA11yTree:x,sessionLoaded:C,testContext:p,handleCancel:g,handleRunSingleStep:F,handleRunAllSteps:v,handleEdit:y,handleDelete:A,handleAddStep:b,handleStepChange:B,handleDuplicate:T,handleFetchA11yTree:_,handleMove:$,handleSelect:M,handleCreateModuleSuccess:R}=JRe({websocketUrl:jau,test:u,testPath:e}),{data:O}=oS(),N=f.useMemo(()=>(O==null?void 0:O.modules.map(iu=>iu.content))||[],[O==null?void 0:O.modules]),z=f.useMemo(()=>E.rootIds.map(iu=>n3(E.steps[iu]||E.modules[iu])),[E]),[L,w]=f.useState(z),j=f.useMemo(()=>{const iu=C0u(L,z);return Object.keys(iu).length>0},[L,z]),[K,W]=BNe(z,au0);f.useEffect(()=>{W(z)},[W,z]);const[P,G]=c1(async(iu=!0)=>{if(!j)return;const Cu={steps:z};try{await t(`/api/mobile-tests/${encodeURIComponent(e)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(Cu)}),iu&&Wr.success("Test saved!"),w(Cu.steps||[])}catch(yu){Wr.error("Failed to save test.",{description:`${yu}`})}},[e,z,j]),Z=[];for(let iu=0;iu<a.length-1;iu++)Z.push(D.jsx(ns,{children:D.jsx(eD,{asChild:!0,children:D.jsx(So,{to:`/browse/${a.slice(0,iu+1).join("/")}`,children:a[iu]})})},iu)),Z.push(D.jsx(tD,{},`separator-${iu}`));const J=w0(G);f.useEffect(()=>{J(!1)},[J,K]);const nu=f.useMemo(()=>{if(!c)return null;const{stepId:iu,parentStepIdChain:Cu}=zE(c);return Wo(E,Cu,iu)},[c,E]),q=f.useMemo(()=>{const iu=[];return d.forEach(Cu=>{const yu=E.steps[Cu];if(!yu)return;const ku=n3(yu);iu.push(ku)}),iu},[d,E]);return D.jsxs("div",{className:"grid h-full max-h-screen min-h-screen w-full grid-rows-[auto_minmax(0px,_1fr)] overflow-hidden",children:[D.jsxs("header",{className:"flex h-16 shrink-0 items-center gap-2 border-b px-4",children:[D.jsx(kg,{children:D.jsxs(vg,{children:[D.jsx(ns,{children:D.jsx(eD,{asChild:!0,children:D.jsx(So,{to:"/browse",children:"Repository"})})}),D.jsx(tD,{}),Z,D.jsx(ns,{children:D.jsx(aD,{children:a[a.length-1]})})]})}),D.jsx(nOe,{}),D.jsx("div",{className:"ml-auto flex items-center gap-2",children:D.jsx(NNe,{testPath:e,onSuccess:()=>{window.location.reload()}})})]}),D.jsxs("div",{className:ou("grid h-full w-full grid-cols-[auto_auto_minmax(0px,_1fr)]",{"grid-cols-[auto_minmax(0px,_1fr)]":!nu}),children:[D.jsxs("div",{className:"grid w-[20vw] min-w-[250px] grid-rows-[auto_auto_auto_1fr] overflow-auto border-r",children:[D.jsx("div",{className:"flex flex-col border-b",children:D.jsxs("div",{className:"flex items-center gap-2 px-2 py-1",children:[D.jsx(_e,{variant:"outline",size:"icon",className:"ml-auto",onClick:()=>void G(),disabled:!j||P.loading,children:P.loading?D.jsx(gdu,{className:"h-4 w-4 animate-spin"}):D.jsx(Fdu,{className:"h-4 w-4"})}),D.jsx(URe,{testId:u.id,testPath:e,disabled:q.length===0,steps:q,onSuccess:R}),r?D.jsxs(M0,{defaultOpen:!0,children:[D.jsx(T0,{asChild:!0,children:D.jsxs(_e,{variant:"outline",className:"text-destructive hover:text-destructive",children:[D.jsx(_A,{className:"h-4 w-4"}),"Canceling"]})}),D.jsx(A0,{side:"bottom",className:"max-w-xs",children:"Waiting for the current step to finish executing. This may take a few seconds."})]}):i?D.jsxs(_e,{variant:"outline",className:"text-destructive hover:text-destructive",onClick:g,children:[D.jsx(_A,{className:"h-4 w-4"}),"Cancel"]}):D.jsxs(_e,{onClick:v,disabled:!o,children:[D.jsx(hdu,{className:"h-4 w-4"}),"Run"]})]})}),D.jsx(cTe,{backend:aPe,children:D.jsx("div",{className:"overflow-auto",children:E.rootIds.map((iu,Cu)=>{const yu=E.steps[iu]||E.modules[iu];return yu?D.jsx(atu,{index:Cu,state:yu,editingUniqueId:c,selectedUniqueIds:d,droppableUniqueIds:E.rootIds,modules:N,onEdit:y,onSelect:M,onChange:B,onDuplicate:T,onDelete:A,onExecute:F,onMove:$,onAddBefore:(ku,Fu)=>{b(ku,Fu,"before")},onAddAfter:(ku,Fu)=>{b(ku,Fu,"after")}},iu):null})})}),D.jsx("div",{className:"my-2 flex items-center justify-center",children:D.jsx(INe,{modules:N,onAdd:iu=>{b(iu,null,"after")}})}),D.jsx("div",{})]}),c&&nu&&D.jsx("div",{className:"w-[20vw] min-w-[250px] overflow-auto border-r",children:D.jsx(eu0,{state:nu,modules:N,onChange:iu=>{B(c,iu)}})}),D.jsx("div",{className:"h-full overflow-hidden",children:D.jsxs(Beu,{direction:"vertical",className:"h-full",children:[D.jsx(Tf,{defaultSize:75,children:s?D.jsxs("div",{className:"flex h-full w-full flex-col items-center justify-center gap-2",children:[D.jsx("h2",{className:"text-xl font-semibold",children:"An unexpected error happened!"}),D.jsxs("div",{className:"text-destructive max-w-lg",children:["Error: ",s]}),D.jsxs("div",{className:"text-muted-foreground max-w-lg text-center",children:["We apologize for the inconvenience. We have been notified of this problem. If the issue persists please contact"," ",D.jsx("a",{href:"mailto:support@momentic.ai",className:"text-primary hover:underline",children:"support@momentic.ai"}),"."]}),D.jsx(_e,{variant:"outline",onClick:()=>{window.location.reload()},children:"Reconnect"})]}):n?D.jsx("div",{className:"mx-auto h-full max-h-full max-w-full",children:D.jsx(uOe,{token:n.token,url:n.rtcUrl,sessionId:n.sessionId})}):D.jsx("div",{className:"flex h-full w-full items-center justify-center",children:D.jsx("h2",{className:"text-xl font-semibold",children:l||"Connecting to emulator..."})})}),D.jsx(Seu,{withHandle:!0}),D.jsx(Tf,{defaultSize:25,children:D.jsxs(j2,{defaultValue:"context",className:"flex h-full flex-col p-2",children:[D.jsxs(jh,{className:"self-start",children:[D.jsx($r,{value:"context",children:"Context"}),D.jsx($r,{value:"logcat",children:"Logcat"}),D.jsx($r,{value:"accessibility",children:"Accessibility"})]}),D.jsx(Vr,{value:"context",className:"flex-1 overflow-auto",children:D.jsxs("div",{className:"grid h-full grid-rows-[auto_1fr] gap-2",children:[D.jsxs("p",{className:"text-muted-foreground text-sm",children:["You can access these values directly in a JavaScript step, or using the special"," ",D.jsx("span",{className:"text-foreground whitespace-nowrap font-mono",children:"{{ }}"})," ","syntax in other steps. For example, you can get the current URL with"," ",D.jsxs("span",{className:"text-foreground whitespace-nowrap font-mono",children:["{{ env.CURRENT_URL }}","."]})," ",D.jsx(rPe,{slug:"/variables"})]}),p&&D.jsx(Wwe,{data:p})]})}),D.jsx(Vr,{value:"logcat",className:"h-full flex-1 overflow-hidden",children:D.jsx(QP,{FallbackComponent:CM,children:D.jsx(zPe,{logs:h})})}),D.jsx(Vr,{value:"accessibility",className:"h-full flex-1 overflow-hidden",children:D.jsxs("div",{className:"flex h-full flex-col gap-2",children:[D.jsxs("div",{className:"flex flex-row gap-2",children:[D.jsxs(_e,{onClick:_,disabled:x||!o||!C,variant:"secondary",size:"sm",children:[x&&D.jsx(qy,{className:"h-4 w-4 animate-spin"})," ","Load current page accessibility tree"]}),(m==null?void 0:m.a11yTree)&&D.jsx(_e,{onClick:()=>{const iu=new Blob([m.a11yTree],{type:"application/xml"});LNe("snapshot.xml",iu)},variant:"secondary",size:"sm",children:"Download accessibility tree"})]}),D.jsx("div",{className:"flex-1",children:m!=null&&m.a11yTree?D.jsx(QP,{FallbackComponent:CM,children:D.jsx(iNe,{xml:m.a11yTree,dataType:"html"})}):m!=null&&m.err?D.jsxs("div",{className:"pl-2",children:[D.jsx("p",{className:"text-muted-foreground text-sm",children:"An error occurred while fetching the a11y tree."}),D.jsxs("p",{className:"text-destructive text-sm",children:["Error: ",m.err]})]}):m&&!m.a11yTree?D.jsx("p",{className:"text-muted-foreground pl-2 text-sm",children:"No a11y tree snapshot available."}):null})]})})]})})]})})]})]})};function nu0(){const{"*":e=""}=QK(),{data:u,error:a}=Pau(e);return a?D.jsx(Zze,{err:a}):u?D.jsx(tu0,{test:u,testPath:e,pathSegments:e.split("/")}):null}const ru0=QEu([{path:"/",errorElement:D.jsx(Ofu,{}),children:[{index:!0,element:D.jsx(IEu,{to:"/browse",replace:!0})},{element:D.jsx(Uze,{}),children:[{path:"search",element:D.jsx(fSe,{})},{path:"assets",element:D.jsx(YCu,{})},{path:"browse/*",element:D.jsx(tSe,{})}]},{path:"tests/*",element:D.jsx(nu0,{})}]}]);zA.createRoot(document.getElementById("root")).render(D.jsx(eu.StrictMode,{children:D.jsx(ccu,{children:D.jsx(Jcu,{value:{fetcher:RNe},children:D.jsx(nH,{sidebarWidth:"auto",children:D.jsxs(aH,{delayDuration:0,children:[D.jsx(rcu,{router:ru0}),D.jsx(Sfu,{richColors:!0,closeButton:!0})]})})})})}));
|
package/static/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/x-icon" href="/favicon.ico" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Momentic mobile App</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-lOERtu1q.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-C7BrGrop.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|