1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Dv||Wv(),n.schedule(e,t,r)},e}),{}),Vv=Fv.reduce((function(e,t){return e[t]=zv[t].cancel,e}),{}),Hv=(Fv.reduce((function(e,t){return e[t]=function(){return zv[t].process(Lv)},e}),{}),function(e){return zv[e].process(Lv)}),Uv=function e(t){Dv=!1,Lv.delta=Mv?Av:Math.max(Math.min(t-Lv.timestamp,40),1),Lv.timestamp=t,Nv=!0,Fv.forEach(Hv),Nv=!1,Dv&&(Mv=!1,Iv(e))},Wv=function(){Dv=!0,Mv=!0,Nv||Iv(Uv)},Gv=function(){return Lv},qv=Bv;function Qv(e,t){return e-t-(arguments.length>2&&void 0!==arguments[2]?arguments[2]:0)}var $v=function(e){var t=function(t){var n=t.delta;return e(n)};return{start:function(){return qv.update(t,!0)},stop:function(){return Vv.update(t)}}};function Yv(e){var t,n,r,o,i,a=e.from,l=e.autoplay,u=void 0===l||l,s=e.driver,c=void 0===s?$v:s,f=e.elapsed,d=void 0===f?0:f,h=e.repeat,p=void 0===h?0:h,v=e.repeatType,g=void 0===v?"loop":v,m=e.repeatDelay,y=void 0===m?0:m,b=e.onPlay,x=e.onStop,w=e.onComplete,S=e.onRepeat,_=e.onUpdate,k=Nf(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),T=k.to,C=0,E=k.duration,O=!1,j=!0,P=function(e){if(Array.isArray(e.to))return jv;if(Pv[e.type])return Pv[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?jv:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?Pp:jv}(k);(null===(n=(t=P).needsInterpolation)||void 0===n?void 0:n.call(t,a,T))&&(i=cv([0,100],[a,T],{clamp:!1}),a=0,T=100);var A=P(Object.assign(Object.assign({},k),{from:a,to:T}));function R(){C++,"reverse"===g?d=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?t-(e-t)+n:Qv(t+-e,t,n)}(d,E,y,j=C%2===0):(d=Qv(d,E,y),"mirror"===g&&A.flipTarget()),O=!1,S&&S()}function I(e){if(j||(e=-e),d+=e,!O){var t=A.next(Math.max(0,d));o=t.value,i&&(o=i(o)),O=j?t.done:d<=0}null===_||void 0===_||_(o),O&&(0===C&&(null!==E&&void 0!==E||(E=d)),C=t+n:e<=-n}(d,E,y,j)&&R():(r.stop(),w&&w()))}return u&&(null===b||void 0===b||b(),(r=c(I)).start()),{stop:function(){null===x||void 0===x||x(),r.stop()}}}function Kv(e,t){return t?e*(1e3/t):0}var Xv=function(e){return 1e3*e},Jv=function(e,t){return 1-3*t+3*e},Zv=function(e,t){return 3*t-6*e},eg=function(e){return 3*e},tg=function(e,t,n){return((Jv(t,n)*e+Zv(t,n))*e+eg(t))*e},ng=function(e,t,n){return 3*Jv(t,n)*e*e+2*Zv(t,n)*e+eg(t)},rg=1e-7,og=10;var ig=8,ag=.001;var lg=11,ug=1/(lg-1);function sg(e,t,n,r){if(e===t&&n===r)return vv;for(var o=new Float32Array(lg),i=0;i=ag?function(e,t,n,r){for(var o=0;o0?n=a:t=a}while(Math.abs(i)>rg&&++ll}function k(e){return void 0===a?l:void 0===l||Math.abs(a-e)P||-1===A&&e2&&void 0!==arguments[2]&&arguments[2]&&o,l=i?t:n;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&a.add(e),-1===l.indexOf(e)&&(l.push(e),i&&o&&(r=t.length)),e},cancel:function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:function(u){if(o)i=!0;else{o=!0;var s=[n,t];if(t=s[0],(n=s[1]).length=0,r=t.length)for(var c=0;c1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return Vg||Xg(),n.schedule(e,t,r)},e}),{}),Qg=Wg.reduce((function(e,t){return e[t]=Gg[t].cancel,e}),{}),$g=Wg.reduce((function(e,t){return e[t]=function(){return Gg[t].process(Ug)},e}),{}),Yg=function(e){return Gg[e].process(Ug)},Kg=function e(t){Vg=!1,Ug.delta=Bg?Lg:Math.max(Math.min(t-Ug.timestamp,40),1),Ug.timestamp=t,Hg=!0,Wg.forEach(Yg),Hg=!1,Vg&&(Bg=!1,zg(e))},Xg=function(){Vg=!0,Bg=!0,Hg||zg(Kg)},Jg=function(){return Ug},Zg=qg;function em(e,t){-1===e.indexOf(t)&&e.push(t)}function tm(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var nm=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return em(this.subscriptions,e),function(){return tm(t.subscriptions,e)}},e.prototype.notify=function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var o=0;op&&m,S=Array.isArray(g)?g:[g],_=S.reduce(i,{});!1===y&&(_={});var k=v.prevResolvedValues,T=void 0===k?{}:k,C=Df(Df({},T),_),E=function(e){w=!0,d.delete(e),v.needsAnimating[e]=!0};for(var O in C){var j=_[O],P=T[O];h.hasOwnProperty(O)||(j!==P?_h(j)&&_h(P)?!mp(j,P)||x?E(O):v.protectedKeys[O]=!0:void 0!==j?E(O):d.add(O):void 0!==j&&d.has(O)?E(O):v.protectedKeys[O]=!0)}v.prevProp=g,v.prevResolvedValues=_,v.isActive&&(h=Df(Df({},h),_)),o&&e.blockInitialAnimation&&(w=!1),w&&!b&&f.push.apply(f,Vf([],Bf(S.map((function(e){return{animation:e,options:Df({type:r},a)}}))),!1))},g=0;g=3;if(t||n){var o=e.point,i=Jg().timestamp;r.history.push(Df(Df({},o),{timestamp:i}));var a=r.handlers,l=a.onStart,u=a.onMove;t||(l&&l(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),u&&u(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=Pm(t,r.transformPagePoint),Dh(e)&&0===e.buttons?r.handlePointerUp(e,t):Zg.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,o=n.onEnd,i=n.onSessionEnd,a=Rm(Pm(t,r.transformPagePoint),r.history);r.startEvent&&o&&o(e,a),i&&i(e,a)},!(Nh(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=o;var i=Pm(Bh(e),this.transformPagePoint),a=i.point,l=Jg().timestamp;this.history=[Df(Df({},a),{timestamp:l})];var u=t.onSessionStart;u&&u(e,Rm(i,this.history)),this.removeListeners=ip($h(window,"pointermove",this.handlePointerMove),$h(window,"pointerup",this.handlePointerUp),$h(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),Qg.update(this.updatePoint)},e}();function Pm(e,t){return t?{point:t(e.point)}:e}function Am(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Rm(e,t){var n=e.point;return{point:n,delta:Am(n,Mm(t)),offset:Am(n,Im(t)),velocity:Dm(t,.1)}}function Im(e){return e[0]}function Mm(e){return e[e.length-1]}function Dm(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=Mm(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Xv(t)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Nm(e){return e.max-e.min}function Lm(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=.01),Om(e,t)t?n="y":Math.abs(e.x)>t&&(n="x");return n}(u),void(null!==n.currentDirection&&(null===a||void 0===a||a(n.currentDirection)));n.updateAxis("x",t.point,u),n.updateAxis("y",t.point,u),n.visualElement.syncRender(),null===l||void 0===l||l(e,t)}},onSessionEnd:function(e,t){return n.stop(e,t)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},e.prototype.stop=function(e,t){var n=this.isDragging;if(this.cancel(),n){var r=t.velocity;this.startAnimation(r);var o=this.getProps().onDragEnd;null===o||void 0===o||o(e,t)}},e.prototype.cancel=function(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(Ph.Drag,!1)},e.prototype.updateAxis=function(e,t,n){var r=this.getProps().drag;if(n&&py(e,r,this.currentDirection)){var o=this.getAxisMotionValue(e),i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,t,n){var r=t.min,o=t.max;return void 0!==r&&eo&&(e=n?Ip(o,e,n.max):Math.min(e,o)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}},e.prototype.resolveConstraints=function(){var e=this,t=this.getProps(),n=t.dragConstraints,r=t.dragElastic,o=(this.visualElement.projection||{}).layout,i=this.constraints;n&&od(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!n||!o)&&function(e,t){var n=t.top,r=t.left,o=t.bottom,i=t.right;return{x:Um(e.x,r,i),y:Um(e.y,n,o)}}(o.actual,n),this.elastic=function(e){return void 0===e&&(e=Gm),!1===e?e=0:!0===e&&(e=Gm),{x:qm(e,"left","right"),y:qm(e,"top","bottom")}}(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Km((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(o.actual[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(){var e=this.getProps(),t=e.dragConstraints,n=e.onMeasureDragConstraints;if(!t||!od(t))return!1;var r=t.current;qf(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var o=this.visualElement.projection;if(!o||!o.layout)return!1;var i=function(e,t,n){var r=fy(e,n),o=t.scroll;return o&&(ay(r.x,o.x),ay(r.y,o.y)),r}(r,o.root,this.visualElement.getTransformPagePoint()),a=function(e,t){return{x:Wm(e.x,t.x),y:Wm(e.y,t.y)}}(o.layout.actual,i);if(n){var l=n(function(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}(a));this.hasMutatedConstraints=!!l,l&&(a=Xm(l))}return a},e.prototype.startAnimation=function(e){var t=this,n=this.getProps(),r=n.drag,o=n.dragMomentum,i=n.dragElastic,a=n.dragTransition,l=n.dragSnapToOrigin,u=n.onDragTransitionEnd,s=this.constraints||{},c=Km((function(n){var u;if(py(n,r,t.currentDirection)){var c=null!==(u=null===s||void 0===s?void 0:s[n])&&void 0!==u?u:{};l&&(c={min:0,max:0});var f=i?200:1e6,d=i?40:1e7,h=Df(Df({type:"inertia",velocity:o?e[n]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10},a),c);return t.startAxisValueAnimation(n,h)}}));return Promise.all(c).then(u)},e.prototype.startAxisValueAnimation=function(e,t){return Mg(e,this.getAxisMotionValue(e),0,t)},e.prototype.stopAnimation=function(){var e=this;Km((function(t){return e.getAxisMotionValue(t).stop()}))},e.prototype.getAxisMotionValue=function(e){var t,n,r="_drag"+e.toUpperCase(),o=this.visualElement.getProps()[r];return o||this.visualElement.getValue(e,null!==(n=null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])&&void 0!==n?n:0)},e.prototype.snapToCursor=function(e){var t=this;Km((function(n){if(py(n,t.getProps().drag,t.currentDirection)){var r=t.visualElement.projection,o=t.getAxisMotionValue(n);if(r&&r.layout){var i=r.layout.actual[n],a=i.min,l=i.max;o.set(e[n]-Ip(a,l,.5))}}}))},e.prototype.scalePositionWithinConstraints=function(){var e,t=this,n=this.getProps(),r=n.drag,o=n.dragConstraints,i=this.visualElement.projection;if(od(o)&&i&&this.constraints){this.stopAnimation();var a={x:0,y:0};Km((function(e){var n=t.getAxisMotionValue(e);if(n){var r=n.get();a[e]=function(e,t){var n=.5,r=Nm(e),o=Nm(t);return o>r?n=Rp(t.min,t.max-r,e.min):r>o&&(n=Rp(e.min,e.max-o,t.min)),yp(0,1,n)}({min:r,max:r},t.constraints[e])}}));var l=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=l?l({},""):"none",null===(e=i.root)||void 0===e||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),Km((function(e){if(py(e,r,null)){var n=t.getAxisMotionValue(e),o=t.constraints[e],i=o.min,l=o.max;n.set(Ip(i,l,a[e]))}}))}},e.prototype.addListeners=function(){var e,t=this;dy.set(this.visualElement,this);var n=$h(this.visualElement.getInstance(),"pointerdown",(function(e){var n=t.getProps(),r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=function(){od(t.getProps().dragConstraints)&&(t.constraints=t.resolveRefConstraints())},o=this.visualElement.projection,i=o.addEventListener("measure",r);o&&!o.layout&&(null===(e=o.root)||void 0===e||e.updateScroll(),o.updateLayout()),r();var a=Ih(window,"resize",(function(){return t.scalePositionWithinConstraints()}));return o.addEventListener("didUpdate",(function(e){var n=e.delta,r=e.hasLayoutChanged;t.isDragging&&r&&(Km((function(e){var r=t.getAxisMotionValue(e);r&&(t.originPoint[e]+=n[e].translate,r.set(r.get()+n[e].translate))})),t.visualElement.syncRender())})),function(){a(),n(),i()}},e.prototype.getProps=function(){var e=this.visualElement.getProps(),t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,o=void 0!==r&&r,i=e.dragPropagation,a=void 0!==i&&i,l=e.dragConstraints,u=void 0!==l&&l,s=e.dragElastic,c=void 0===s?Gm:s,f=e.dragMomentum,d=void 0===f||f;return Df(Df({},e),{drag:n,dragDirectionLock:o,dragPropagation:a,dragConstraints:u,dragElastic:c,dragMomentum:d})},e}();function py(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}var vy={pan:vp((function(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,o=e.onPanSessionStart,i=e.visualElement,l=t||n||r||o,u=(0,a.useRef)(null),s=(0,a.useContext)(Kf).transformPagePoint,c={onSessionStart:o,onStart:n,onMove:t,onEnd:function(e,t){u.current=null,r&&r(e,t)}};(0,a.useEffect)((function(){null!==u.current&&u.current.updateHandlers(c)})),Yh(i,"pointerdown",l&&function(e){u.current=new jm(e,c,{transformPagePoint:s})}),rp((function(){return u.current&&u.current.end()}))})),drag:vp((function(e){var t=e.dragControls,n=e.visualElement,r=Ef((function(){return new hy(n)}));(0,a.useEffect)((function(){return t&&t.subscribe(r)}),[r,t]),(0,a.useEffect)((function(){return r.addListeners()}),[r])}))},gy=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var my=function(e){var t=e.treeType,n=void 0===t?"":t,r=e.build,o=e.getBaseTarget,i=e.makeTargetAnimatable,a=e.measureViewportBox,l=e.render,u=e.readValueFromInstance,s=e.removeValueFromRenderState,c=e.sortNodePosition,f=e.scrapeMotionValuesFromProps;return function(e,t){var d=e.parent,h=e.props,p=e.presenceId,v=e.blockInitialAnimation,g=e.visualState,m=e.shouldReduceMotion;void 0===t&&(t={});var y,b,x=!1,w=g.latestValues,S=g.renderState,_=function(){var e=gy.map((function(){return new nm})),t={},n={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){gy.forEach((function(r){var o,i="on"+r,a=e[i];null===(o=t[r])||void 0===o||o.call(t),a&&(t[r]=n[i](a))}))}};return e.forEach((function(e,t){n["on"+gy[t]]=function(t){return e.add(t)},n["notify"+gy[t]]=function(){for(var t=[],n=0;n=0?window.pageYOffset:null,s=function(e,t,n){var r=t.measureViewportBox(),o=t.getInstance(),i=getComputedStyle(o),a=i.display,l={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((function(e){l[e]=My[e](r,i)})),t.syncRender();var u=t.measureViewportBox();return n.forEach((function(n){var r=t.getValue(n);Oy(r,l[n]),e[n]=My[n](u,i)})),e}(t,e,l);return i.length&&i.forEach((function(t){var n=Bf(t,2),r=n[0],o=n[1];e.getValue(r).set(o)})),e.syncRender(),null!==u&&window.scrollTo({top:u}),{target:s,transitionEnd:r}}return{target:t,transitionEnd:r}};var Ny=function(e,t,n,r){var o=function(e,t,n){var r,o=Nf(t,[]),i=e.getInstance();if(!(i instanceof Element))return{target:o,transitionEnd:n};for(var a in n&&(n=Df({},n)),e.forEachValue((function(e){var t=e.get();if(xy(t)){var n=_y(t,i);n&&e.set(n)}})),o){var l=o[a];if(xy(l)){var u=_y(l,i);u&&(o[a]=u,n&&(null!==(r=n[a])&&void 0!==r||(n[a]=l)))}}return{target:o,transitionEnd:n}}(e,t,r);return function(e,t,n,r){return Ey(t)?Dy(e,t,n,r):{target:t,transitionEnd:r}}(e,t=o.target,n,r=o.transitionEnd)};var Ly={treeType:"dom",readValueFromInstance:function(e,t){if(Ed(t)){var n=Tg(t);return n&&n.default||0}var r,o=(r=e,window.getComputedStyle(r));return(Id(t)?o.getPropertyValue(t):o[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]},measureViewportBox:function(e,t){return fy(e,t.transformPagePoint)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,r){var o=n.transformValues;void 0===r&&(r=!0);var i=t.transition,a=t.transitionEnd,l=Nf(t,["transition","transitionEnd"]),u=function(e,t,n){var r,o,i={};for(var a in e)i[a]=null!==(r=hm(a,t))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}(l,i||{},e);if(o&&(a&&(a=o(a)),l&&(l=o(l)),u&&(u=o(u))),r){!function(e,t,n){var r,o,i,a,l=Object.keys(t).filter((function(t){return!e.hasValue(t)})),u=l.length;if(u)for(var s=0;s5)return o;var u=tv.createTransformer(e),s="number"!==typeof l[0]?1:0,c=r.x.scale*n.x,f=r.y.scale*n.y;l[0+s]/=c,l[1+s]/=f;var d=Ip(c,f,.5);"number"===typeof l[2+s]&&(l[2+s]/=d),"number"===typeof l[3+s]&&(l[3+s]/=d);var h=u(l);if(i){var p=0;h=h.replace(Uy,(function(){var e=a[p];return p++,e}))}return h}},Gy=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Mf(t,e),t.prototype.componentDidMount=function(){var e,t=this,n=this.props,r=n.visualElement,o=n.layoutGroup,i=n.switchLayoutGroup,a=n.layoutId,l=r.projection;e=qy,Object.assign(Sd,e),l&&((null===o||void 0===o?void 0:o.group)&&o.group.add(l),(null===i||void 0===i?void 0:i.register)&&a&&i.register(l),l.root.didUpdate(),l.addEventListener("animationComplete",(function(){t.safeToRemove()})),l.setOptions(Df(Df({},l.options),{onExitComplete:function(){return t.safeToRemove()}}))),hd.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(e){var t=this,n=this.props,r=n.layoutDependency,o=n.visualElement,i=n.drag,a=n.isPresent,l=o.projection;return l?(l.isPresent=a,i||e.layoutDependency!==r||void 0===r?l.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?l.promote():l.relegate()||Zg.postRender((function(){var e;(null===(e=l.getStack())||void 0===e?void 0:e.members.length)||t.safeToRemove()}))),null):null},t.prototype.componentDidUpdate=function(){var e=this.props.visualElement.projection;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.visualElement,n=e.layoutGroup,r=e.switchLayoutGroup,o=t.projection;o&&(o.scheduleCheckAfterUnmount(),(null===n||void 0===n?void 0:n.group)&&n.group.remove(o),(null===r||void 0===r?void 0:r.deregister)&&r.deregister(o))},t.prototype.safeToRemove=function(){var e=this.props.safeToRemove;null===e||void 0===e||e()},t.prototype.render=function(){return null},t}(a.Component);var qy={borderRadius:Df(Df({},Hy),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Hy,borderTopRightRadius:Hy,borderBottomLeftRadius:Hy,borderBottomRightRadius:Hy,boxShadow:Wy},Qy={measureLayout:function(e){var t=Bf(Af(),2),n=t[0],r=t[1],o=(0,a.useContext)(vd);return a.createElement(Gy,Df({},e,{layoutGroup:o,switchLayoutGroup:(0,a.useContext)(gd),isPresent:n,safeToRemove:r}))}};var $y=["TopLeft","TopRight","BottomLeft","BottomRight"],Yy=$y.length,Ky=function(e){return"string"===typeof e?parseFloat(e):e},Xy=function(e){return"number"===typeof e||Wd.test(e)};function Jy(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e.borderRadius}var Zy=tb(0,.5,xv),eb=tb(.5,.95,vv);function tb(e,t,n){return function(r){return rt?1:n(Rp(e,t,r))}}function nb(e,t){e.min=t.min,e.max=t.max}function rb(e,t){nb(e.x,t.x),nb(e.y,t.y)}function ob(e,t,n,r,o){return e=ny(e-=t,1/n,r),void 0!==o&&(e=ny(e,1/o,r)),e}function ib(e,t,n,r,o){var i=Bf(n,3),a=i[0],l=i[1],u=i[2];!function(e,t,n,r,o,i,a){if(void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=.5),void 0===i&&(i=e),void 0===a&&(a=e),Ud.test(t)&&(t=parseFloat(t),t=Ip(a.min,a.max,t/100)-a.min),"number"===typeof t){var l=Ip(i.min,i.max,r);e===i&&(l-=t),e.min=ob(e.min,t,n,l,o),e.max=ob(e.max,t,n,l,o)}}(e,t[a],t[l],t[u],t.scale,r,o)}var ab=["x","scaleX","originX"],lb=["y","scaleY","originY"];function ub(e,t,n,r){ib(e.x,t,ab,null===n||void 0===n?void 0:n.x,null===r||void 0===r?void 0:r.x),ib(e.y,t,lb,null===n||void 0===n?void 0:n.y,null===r||void 0===r?void 0:r.y)}function sb(e){return 0===e.translate&&1===e.scale}function cb(e){return sb(e.x)&&sb(e.y)}function fb(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var db=function(){function e(){this.members=[]}return e.prototype.add=function(e){em(this.members,e),e.scheduleRender()},e.prototype.remove=function(e){if(tm(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var t=this.members[this.members.length-1];t&&this.promote(t)}},e.prototype.relegate=function(e){var t,n=this.members.findIndex((function(t){return e===t}));if(0===n)return!1;for(var r=n;r>=0;r--){var o=this.members[r];if(!1!==o.isPresent){t=o;break}}return!!t&&(this.promote(t),!0)},e.prototype.promote=function(e,t){var n,r=this.lead;e!==r&&(this.prevLead=r,this.lead=e,e.show(),r&&(r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues,e.snapshot.isShared=!0),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0),!1===e.options.crossfade&&r.hide()))},e.prototype.exitAnimationComplete=function(){this.members.forEach((function(e){var t,n,r,o,i;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(i=null===(r=e.resumingFrom)||void 0===r?void 0:(o=r.options).onExitComplete)||void 0===i||i.call(o)}))},e.prototype.scheduleRender=function(){this.members.forEach((function(e){e.instance&&e.scheduleRender(!1)}))},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}(),hb="translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)";function pb(e,t,n){var r=e.x.translate/t.x,o=e.y.translate/t.y,i="translate3d(".concat(r,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),n){var a=n.rotate,l=n.rotateX,u=n.rotateY;a&&(i+="rotate(".concat(a,"deg) ")),l&&(i+="rotateX(".concat(l,"deg) ")),u&&(i+="rotateY(".concat(u,"deg) "))}var s=e.x.scale*t.x,c=e.y.scale*t.y;return(i+="scale(".concat(s,", ").concat(c,")"))===hb?"none":i}var vb=function(e,t){return e.depth-t.depth},gb=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){em(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){tm(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(vb),this.isDirty=!1,this.children.forEach(e)},e}(),mb=1e3;function yb(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,o=e.checkIsScrollRoot,i=e.resetTransform;return function(){function e(e,t,r){var o=this;void 0===t&&(t={}),void 0===r&&(r=null===n||void 0===n?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){o.isUpdating&&(o.isUpdating=!1,o.clearAllSnapshots())},this.updateProjection=function(){o.nodes.forEach(Tb),o.nodes.forEach(Cb)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=e,this.latestValues=t,this.root=r?r.root||r:this,this.path=r?Vf(Vf([],Bf(r.path),!1),[r],!1):[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(var i=0;i=0;r--)if(Boolean(e.path[r].instance)){n=e.path[r];break}var o=(n&&n!==e.root?n.instance:document).querySelector('[data-projection-id="'.concat(t,'"]'));o&&e.mount(o,!0)}function Mb(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Db(e){Mb(e.x),Mb(e.y)}var Nb=yb({attachResizeListener:function(e,t){return Ih(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),Lb={current:void 0},Fb=yb({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!Lb.current){var e=new Nb(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Lb.current=e}return Lb.current},resetTransform:function(e,t){e.style.transform=null!==t&&void 0!==t?t:"none"},checkIsScrollRoot:function(e){return Boolean("fixed"===window.getComputedStyle(e).position)}}),zb=Df(Df(Df(Df({},km),gp),vy),Qy),Bb=bd((function(e,t){return function(e,t,n,r,o){var i=t.forwardMotionProps,a=void 0!==i&&i,l=wd(e)?Ah:Rh;return Df(Df({},l),{preloadedFeatures:n,useRender:ph(a),createVisualElement:r,projectionNodeConstructor:o,Component:e})}(e,t,zb,By,Fb)}));var Vb=new Set([].concat(bt(hr),["textStyle","layerStyle","apply","noOfLines","focusBorderColor","errorBorderColor","as","__css","css","sx"])),Hb=new Set(["htmlWidth","htmlHeight","htmlSize","htmlTranslate"]);function Ub(e){return Hb.has(e)||!Vb.has(e)}function Wb(e){var t=Object.assign({},e);for(var n in t)void 0===t[n]&&delete t[n];return t}var Gb=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,qb=Te((function(e){return Gb.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),Qb=qb,$b=function(e){return"theme"!==e},Yb=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?Qb:$b},Kb=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},Xb=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;we(t,n,r);Le((function(){return Se(t,n,r)}));return null},Jb=function e(t,n){var r,o,i=t.__emotion_real===t,l=i&&t.__emotion_base||t;void 0!==n&&(r=n.label,o=n.target);var u=Kb(t,n,i),s=u||Yb(l),c=!s("as");return function(){var f=arguments,d=i&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==r&&d.push("label:"+r+";"),null==f[0]||void 0===f[0].raw)d.push.apply(d,f);else{0,d.push(f[0][0]);for(var h=f.length,p=1;p1?n-1:0),o=1;o` or ``");return e}sx.displayName="ToastComponent";var dx=n(77),hx=["styleConfig"];function px(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.styleConfig,o=p(n,hx),i=function(){var e=vt(),t=fx();return h(h({},e),{},{theme:t})}(),l=i.theme,u=i.colorMode,s=e?_r(l,"components.".concat(e)):void 0,c=r||s,f=Rt({theme:l,colorMode:u},null!=(t=null==c?void 0:c.defaultProps)?t:{},Tr(function(e,t){var n={};return Object.keys(e).forEach((function(r){t.includes(r)||(n[r]=e[r])})),n}(o,["children"]))),d=(0,a.useRef)({});if(c){var v=function(e){return function(t){var n,r=t.variant,o=t.size,i=wr(t.theme);return Rt({},Et(null!=(n=e.baseStyle)?n:{},t),i(e,"sizes",o,t),i(e,"variants",r,t))}}(c),g=v(f);dx(d.current,g)||(d.current=g)}return d.current}function vx(e){return px(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}function gx(e){return px(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}var mx=["as","viewBox","color","focusable","children","className","__css"],yx={path:(0,t.jsxs)("g",{stroke:"currentColor",strokeWidth:"1.5",children:[(0,t.jsx)("path",{strokeLinecap:"round",fill:"none",d:"M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"}),(0,t.jsx)("path",{fill:"currentColor",strokeLinecap:"round",d:"M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"}),(0,t.jsx)("circle",{fill:"none",strokeMiterlimit:"10",cx:"12",cy:"12",r:"11.25"})]}),viewBox:"0 0 24 24"},bx=cx((function(e,n){var r=e.as,o=e.viewBox,i=e.color,a=void 0===i?"currentColor":i,l=e.focusable,u=void 0!==l&&l,s=e.children,c=e.className,f=e.__css,d=p(e,mx),v=kt("chakra-icon",c),g=vx("Icon",e),m={ref:n,focusable:u,className:v,__css:h(h({w:"1em",h:"1em",display:"inline-block",lineHeight:"1em",flexShrink:0,color:a},f),g)},y=null!=o?o:yx.viewBox;if(r&&"string"!==typeof r)return(0,t.jsx)(lx.svg,h(h({as:r},m),d));var b=null!=s?s:yx.path;return(0,t.jsx)(lx.svg,h(h(h({verticalAlign:"middle",viewBox:y},m),d),{},{children:b}))}));bx.displayName="Icon";function xx(e){return(0,t.jsx)(bx,h(h({viewBox:"0 0 24 24"},e),{},{children:(0,t.jsx)("path",{fill:"currentColor",d:"M11.983,0a12.206,12.206,0,0,0-8.51,3.653A11.8,11.8,0,0,0,0,12.207,11.779,11.779,0,0,0,11.8,24h.214A12.111,12.111,0,0,0,24,11.791h0A11.766,11.766,0,0,0,11.983,0ZM10.5,16.542a1.476,1.476,0,0,1,1.449-1.53h.027a1.527,1.527,0,0,1,1.523,1.47,1.475,1.475,0,0,1-1.449,1.53h-.027A1.529,1.529,0,0,1,10.5,16.542ZM11,12.5v-6a1,1,0,0,1,2,0v6a1,1,0,1,1-2,0Z"})}))}var wx=["label","thickness","speed","emptyColor","className"],Sx=et({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),_x=cx((function(e,n){var r=vx("Spinner",e),o=Sr(e),i=o.label,a=void 0===i?"Loading...":i,l=o.thickness,u=void 0===l?"2px":l,s=o.speed,c=void 0===s?"0.45s":s,f=o.emptyColor,d=void 0===f?"transparent":f,v=o.className,g=p(o,wx),m=kt("chakra-spinner",v),y=h({display:"inline-block",borderColor:"currentColor",borderStyle:"solid",borderRadius:"99999px",borderWidth:u,borderBottomColor:d,borderLeftColor:d,animation:"".concat(Sx," ").concat(c," linear infinite")},r);return(0,t.jsx)(lx.div,h(h({ref:n,__css:y,className:m},g),{},{children:a&&(0,t.jsx)(lx.span,{srOnly:!0,children:a})}))}));_x.displayName="Spinner";var kx=ut(st({name:"AlertContext",hookName:"useAlertContext",providerName:""}),2),Tx=kx[0],Cx=kx[1],Ex=ut(st({name:"AlertStylesContext",hookName:"useAlertStyles",providerName:""}),2),Ox=Ex[0],jx=Ex[1],Px={info:{icon:function(e){return(0,t.jsx)(bx,h(h({viewBox:"0 0 24 24"},e),{},{children:(0,t.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.013,12.013,0,0,0,12,0Zm.25,5a1.5,1.5,0,1,1-1.5,1.5A1.5,1.5,0,0,1,12.25,5ZM14.5,18.5h-4a1,1,0,0,1,0-2h.75a.25.25,0,0,0,.25-.25v-4.5a.25.25,0,0,0-.25-.25H10.5a1,1,0,0,1,0-2h1a2,2,0,0,1,2,2v4.75a.25.25,0,0,0,.25.25h.75a1,1,0,1,1,0,2Z"})}))},colorScheme:"blue"},warning:{icon:xx,colorScheme:"orange"},success:{icon:function(e){return(0,t.jsx)(bx,h(h({viewBox:"0 0 24 24"},e),{},{children:(0,t.jsx)("path",{fill:"currentColor",d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm6.927,8.2-6.845,9.289a1.011,1.011,0,0,1-1.43.188L5.764,13.769a1,1,0,1,1,1.25-1.562l4.076,3.261,6.227-8.451A1,1,0,1,1,18.927,8.2Z"})}))},colorScheme:"green"},error:{icon:xx,colorScheme:"red"},loading:{icon:_x,colorScheme:"blue"}};var Ax=["status","addRole"],Rx=cx((function(e,n){var r,o=Sr(e),i=o.status,a=void 0===i?"info":i,l=o.addRole,u=void 0===l||l,s=p(o,Ax),c=null!=(r=e.colorScheme)?r:function(e){return Px[e].colorScheme}(a),f=gx("Alert",h(h({},e),{},{colorScheme:c})),d=h({width:"100%",display:"flex",alignItems:"center",position:"relative",overflow:"hidden"},f.container);return(0,t.jsx)(Tx,{value:{status:a},children:(0,t.jsx)(Ox,{value:f,children:(0,t.jsx)(lx.div,h(h({role:u?"alert":void 0,ref:n},s),{},{className:kt("chakra-alert",e.className),__css:d}))})})}));function Ix(e){var n=Cx().status,r=function(e){return Px[e].icon}(n),o=jx(),i="loading"===n?o.spinner:o.icon;return(0,t.jsx)(lx.span,h(h({display:"inherit"},e),{},{className:kt("chakra-alert__icon",e.className),__css:i,children:e.children||(0,t.jsx)(r,{h:"100%",w:"100%"})}))}Rx.displayName="Alert",Ix.displayName="AlertIcon";var Mx=cx((function(e,n){var r=jx();return(0,t.jsx)(lx.div,h(h({ref:n},e),{},{className:kt("chakra-alert__title",e.className),__css:r.title}))}));Mx.displayName="AlertTitle";var Dx=cx((function(e,n){var r=h({display:"inline"},jx().description);return(0,t.jsx)(lx.div,h(h({ref:n},e),{},{className:kt("chakra-alert__desc",e.className),__css:r}))}));Dx.displayName="AlertDescription";var Nx=["children","isDisabled","__css"];function Lx(e){return(0,t.jsx)(bx,h(h({focusable:"false","aria-hidden":!0},e),{},{children:(0,t.jsx)("path",{fill:"currentColor",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"})}))}var Fx=cx((function(e,n){var r=vx("CloseButton",e),o=Sr(e),i=o.children,a=o.isDisabled,l=o.__css,u=p(o,Nx);return(0,t.jsx)(lx.button,h(h({type:"button","aria-label":"Close",ref:n,disabled:a,__css:h(h(h({},{outline:0,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}),r),l)},u),{},{children:i||(0,t.jsx)(Lx,{width:"1em",height:"1em"})}))}));Fx.displayName="CloseButton";var zx=function(e){var t=e,n=new Set,r=function(e){t=e(t),n.forEach((function(e){return e()}))};return{getState:function(){return t},subscribe:function(t){return n.add(t),function(){r((function(){return e})),n.delete(t)}},removeToast:function(e,t){r((function(n){return h(h({},n),{},f({},t,n[t].filter((function(t){return t.id!=e}))))}))},notify:function(e,t){var n=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Bx+=1;var o=null!=(t=r.id)?t:Bx,i=null!=(n=r.position)?n:"bottom";return{id:o,message:e,position:i,duration:r.duration,onCloseComplete:r.onCloseComplete,onRequestRemove:function(){return zx.removeToast(String(o),i)},status:r.status,requestClose:!1,containerStyle:r.containerStyle}}(e,t),o=n.position,i=n.id;return r((function(e){var t,r,i=o.includes("top")?[n].concat(bt(null!=(t=e[o])?t:[])):[].concat(bt(null!=(r=e[o])?r:[]),[n]);return h(h({},e),{},f({},o,i))})),i},update:function(e,t){e&&r((function(n){var r=h({},n),o=wf(r,e),i=o.position,a=o.index;return i&&-1!==a&&(r[i][a]=h(h(h({},r[i][a]),t),{},{message:Hx(t)})),r}))},closeAll:function(){var e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).positions;r((function(t){return(null!=e?e:["bottom","bottom-right","bottom-left","top","top-left","top-right"]).reduce((function(e,n){return e[n]=t[n].map((function(e){return h(h({},e),{},{requestClose:!0})})),e}),h({},t))}))},close:function(e){r((function(t){var n=Sf(t,e);return n?h(h({},t),{},f({},n,t[n].map((function(t){return t.id==e?h(h({},t),{},{requestClose:!0}):t})))):t}))},isActive:function(e){return Boolean(wf(zx.getState(),e).position)}}}({top:[],"top-left":[],"top-right":[],"bottom-left":[],bottom:[],"bottom-right":[]});var Bx=0;var Vx=function(e){var n=e.status,r=e.variant,o=void 0===r?"solid":r,i=e.id,a=e.title,l=e.isClosable,u=e.onClose,s=e.description,c=e.icon,f=i?{root:"toast-".concat(i),title:"toast-".concat(i,"-title"),description:"toast-".concat(i,"-description")}:void 0;return(0,t.jsxs)(Rx,{addRole:!1,status:n,variant:o,id:null==f?void 0:f.root,alignItems:"start",borderRadius:"md",boxShadow:"lg",paddingEnd:8,textAlign:"start",width:"auto",children:[(0,t.jsx)(Ix,{children:c}),(0,t.jsxs)(lx.div,{flex:"1",maxWidth:"100%",children:[a&&(0,t.jsx)(Mx,{id:null==f?void 0:f.title,children:a}),s&&(0,t.jsx)(Dx,{id:null==f?void 0:f.description,display:"block",children:s})]}),l&&(0,t.jsx)(Fx,{size:"sm",onClick:u,position:"absolute",insetEnd:1,top:1})]})};function Hx(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.render,r=e.toastComponent,o=void 0===r?Vx:r;return function(r){return"function"===typeof n?n(h(h({},r),e)):(0,t.jsx)(o,h(h({},r),e))}}function Ux(){var e=(0,a.useRef)(!1);return Zf((function(){return e.current=!0,function(){e.current=!1}}),[]),e}var Wx=function(e){var t=e.children,n=e.initial,r=e.isPresent,o=e.onExitComplete,i=e.custom,l=e.presenceAffectsLayout,u=Ef(Gx),s=Pf(),c=(0,a.useMemo)((function(){return{id:s,initial:n,isPresent:r,custom:i,onExitComplete:function(e){var t,n;u.set(e,!0);try{for(var r=zf(u.values()),i=r.next();!i.done;i=r.next()){if(!i.value)return}}catch(a){t={error:a}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}null===o||void 0===o||o()},register:function(e){return u.set(e,!1),function(){return u.delete(e)}}}}),l?void 0:[r]);return(0,a.useMemo)((function(){u.forEach((function(e,t){return u.set(t,!1)}))}),[r]),a.useEffect((function(){!r&&!u.size&&(null===o||void 0===o||o())}),[r]),a.createElement(Cf.Provider,{value:c},t)};function Gx(){return new Map}var qx=function(e){return e.key||""};var Qx=function(e){var t=e.children,n=e.custom,r=e.initial,o=void 0===r||r,i=e.onExitComplete,l=e.exitBeforeEnter,u=e.presenceAffectsLayout,s=void 0===u||u,c=Bf(function(){var e=Ux(),t=Bf((0,a.useState)(0),2),n=t[0],r=t[1],o=(0,a.useCallback)((function(){e.current&&r(n+1)}),[n]);return[(0,a.useCallback)((function(){return Zg.postRender(o)}),[o]),n]}(),1),f=c[0],d=(0,a.useContext)(vd).forceRender;d&&(f=d);var h=Ux(),p=function(e){var t=[];return a.Children.forEach(e,(function(e){(0,a.isValidElement)(e)&&t.push(e)})),t}(t),v=p,g=new Set,m=(0,a.useRef)(v),y=(0,a.useRef)(new Map).current,b=(0,a.useRef)(!0);if(Zf((function(){b.current=!1,function(e,t){e.forEach((function(e){var n=qx(e);t.set(n,e)}))}(p,y),m.current=v})),rp((function(){b.current=!0,y.clear(),g.clear()})),b.current)return a.createElement(a.Fragment,null,v.map((function(e){return a.createElement(Wx,{key:qx(e),isPresent:!0,initial:!!o&&void 0,presenceAffectsLayout:s},e)})));v=Vf([],Bf(v),!1);for(var x=m.current.map(qx),w=p.map(qx),S=x.length,_=0;_1&&console.warn("You're attempting to animate multiple children within AnimatePresence, but its exitBeforeEnter prop is set to true. This will lead to odd visual behaviour."),a.createElement(a.Fragment,null,g.size?v:v.map((function(e){return(0,a.cloneElement)(e)})))},$x=n(4164),Yx=["containerRef"],Kx=ut(st({strict:!1,name:"PortalContext"}),2),Xx=Kx[0],Jx=Kx[1],Zx="chakra-portal",ew=function(e){return(0,t.jsx)("div",{className:"chakra-portal-zIndex",style:{position:"absolute",zIndex:e.zIndex,top:0,left:0,right:0},children:e.children})},tw=function(e){var n=e.appendToParentPortal,r=e.children,o=ut((0,a.useState)(null),2),i=o[0],l=o[1],u=(0,a.useRef)(null),s=ut((0,a.useState)({}),2)[1];(0,a.useEffect)((function(){return s({})}),[]);var c=Jx(),f=dt();Lr((function(){if(i){var e=i.ownerDocument,t=n&&null!=c?c:e.body;if(t){u.current=e.createElement("div"),u.current.className=Zx,t.appendChild(u.current),s({});var r=u.current;return function(){t.contains(r)&&t.removeChild(r)}}}}),[i]);var d=(null==f?void 0:f.zIndex)?(0,t.jsx)(ew,{zIndex:null==f?void 0:f.zIndex,children:r}):r;return u.current?(0,$x.createPortal)((0,t.jsx)(Xx,{value:u.current,children:d}),u.current):(0,t.jsx)("span",{ref:function(e){e&&l(e)}})},nw=function(e){var n=e.children,r=e.containerRef,o=e.appendToParentPortal,i=r.current,l=null!=i?i:"undefined"!==typeof window?document.body:void 0,u=(0,a.useMemo)((function(){var e=null==i?void 0:i.ownerDocument.createElement("div");return e&&(e.className=Zx),e}),[i]),s=ut((0,a.useState)({}),2)[1];return Lr((function(){return s({})}),[]),Lr((function(){if(u&&l)return l.appendChild(u),function(){l.removeChild(u)}}),[u,l]),l&&u?(0,$x.createPortal)((0,t.jsx)(Xx,{value:o?u:null,children:n}),u):null};function rw(e){var n=h({appendToParentPortal:!0},e),r=n.containerRef,o=p(n,Yx);return r?(0,t.jsx)(nw,h({containerRef:r},o)):(0,t.jsx)(tw,h({},o))}rw.className=Zx,rw.selector=".chakra-portal",rw.displayName="Portal";var ow,iw=ut(st({name:"ToastOptionsContext",strict:!1}),2),aw=iw[0],lw=(iw[1],function(e){var n=(0,a.useSyncExternalStore)(zx.subscribe,zx.getState,zx.getState),r=e.motionVariants,o=e.component,i=void 0===o?sx:o,l=e.portalProps,u=Object.keys(n).map((function(e){var o=n[e];return(0,t.jsx)("ul",{role:"region","aria-live":"polite",id:"chakra-toast-manager-".concat(e),style:_f(e),children:(0,t.jsx)(Qx,{initial:!1,children:o.map((function(e){return(0,t.jsx)(i,h({motionVariants:r},e),e.id)}))})},e)}));return(0,t.jsx)(rw,h(h({},l),{},{children:u}))}),uw=["children","theme","toastOptions"],sw=function(e){return function(n){var r=n.children,o=n.theme,i=void 0===o?e:o,a=n.toastOptions,l=p(n,uw);return(0,t.jsxs)(Ur,h(h({theme:i},l),{},{children:[(0,t.jsx)(aw,{value:null==a?void 0:a.defaultOptions,children:r}),(0,t.jsx)(lw,h({},a))]}))}},cw=sw(yf);sw(bf);function fw(){fw=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,r=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(j){u=function(e,t,n){return e[t]=n}}function c(e,t,n,o){var i=t&&t.prototype instanceof h?t:h,a=Object.create(i.prototype),l=new C(o||[]);return r(a,"_invoke",{value:S(e,n,l)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(j){return{type:"throw",arg:j}}}e.wrap=c;var d={};function h(){}function p(){}function v(){}var g={};u(g,i,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(E([])));y&&y!==t&&n.call(y,i)&&(g=y);var b=v.prototype=h.prototype=Object.create(g);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(r,i,a,l){var u=f(e[r],e,i);if("throw"!==u.type){var c=u.arg,d=c.value;return d&&"object"==s(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){o("next",e,a,l)}),(function(e){o("throw",e,a,l)})):t.resolve(d).then((function(e){c.value=e,a(c)}),(function(e){return o("throw",e,a,l)}))}l(u.arg)}var i;r(this,"_invoke",{value:function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}})}function S(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return O()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var l=_(a,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}function _(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var o=f(r,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,d;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function E(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function dw(e,t,n,r,o,i,a){try{var l=e[i](a),u=l.value}catch(s){return void n(s)}l.done?t(u):Promise.resolve(u).then(r,o)}function hw(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var i=e.apply(t,n);function a(e){dw(i,r,o,a,l,"next",e)}function l(e){dw(i,r,o,a,l,"throw",e)}a(void 0)}))}}function pw(){return pw=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function kw(e,t,n,r){void 0===r&&(r={});var o=r,i=o.window,a=void 0===i?document.defaultView:i,l=o.v5Compat,u=void 0!==l&&l,s=a.history,c=ow.Pop,f=null,d=h();function h(){return(s.state||{idx:null}).idx}function p(){c=ow.Pop;var e=h(),t=null==e?null:e-d;d=e,f&&f({action:c,location:g.location,delta:t})}function v(e){var t="null"!==a.location.origin?a.location.origin:a.location.href,n="string"===typeof e?e:Sw(e);return yw(t,"No window.location.(origin|href) available to create URL for href: "+n),new URL(n,t)}null==d&&(d=0,s.replaceState(pw({},s.state,{idx:d}),""));var g={get action(){return c},get location(){return e(a,s)},listen:function(e){if(f)throw new Error("A history only accepts one active listener");return a.addEventListener(gw,p),f=e,function(){a.removeEventListener(gw,p),f=null}},createHref:function(e){return t(a,e)},createURL:v,encodeLocation:function(e){var t=v(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){c=ow.Push;var r=ww(g.location,e,t);n&&n(r,e);var o=xw(r,d=h()+1),i=g.createHref(r);try{s.pushState(o,"",i)}catch(l){a.location.assign(i)}u&&f&&f({action:c,location:g.location,delta:1})},replace:function(e,t){c=ow.Replace;var r=ww(g.location,e,t);n&&n(r,e);var o=xw(r,d=h()),i=g.createHref(r);s.replaceState(o,"",i),u&&f&&f({action:c,location:g.location,delta:0})},go:function(e){return s.go(e)}};return g}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(vw||(vw={}));var Tw=new Set(["lazy","caseSensitive","path","id","index","children"]);function Cw(e,t,n,r){return void 0===n&&(n=[]),void 0===r&&(r={}),e.map((function(e,o){var i=[].concat(bt(n),[o]),a="string"===typeof e.id?e.id:i.join("-");if(yw(!0!==e.index||!e.children,"Cannot specify children on an index route"),yw(!r[a],'Found a route id collision on id "'+a+"\". Route id's must be globally unique within Data Router usages"),function(e){return!0===e.index}(e)){var l=pw({},e,{hasErrorBoundary:t(e),id:a});return r[a]=l,l}var u=pw({},e,{id:a,hasErrorBoundary:t(e),children:void 0});return r[a]=u,e.children&&(u.children=Cw(e.children,t,i,r)),u}))}function Ew(e,t,n){void 0===n&&(n="/");var r=Vw(("string"===typeof t?_w(t):t).pathname||"/",n);if(null==r)return null;var o=Ow(e);!function(e){e.sort((function(e,t){return e.score!==t.score?t.score-e.score:function(e,t){var n=e.length===t.length&&e.slice(0,-1).every((function(e,n){return e===t[n]}));return n?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((function(e){return e.childrenIndex})),t.routesMeta.map((function(e){return e.childrenIndex})))}))}(o);for(var i=null,a=0;null==i&&a0&&(yw(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+l+'".'),Ow(e.children,t,u,l)),(null!=e.path||e.index)&&t.push({path:l,score:Lw(l,e.index),routesMeta:u})};return e.forEach((function(e,t){var n;if(""!==e.path&&null!=(n=e.path)&&n.includes("?")){var r,i=mt(jw(e.path));try{for(i.s();!(r=i.n()).done;){var a=r.value;o(e,t,a)}}catch(l){i.e(l)}finally{i.f()}}else o(e,t)})),t}function jw(e){var t=e.split("/");if(0===t.length)return[];var n=xt(t),r=n[0],o=n.slice(1),i=r.endsWith("?"),a=r.replace(/\?$/,"");if(0===o.length)return i?[a,""]:[a];var l=jw(o.join("/")),u=[];return u.push.apply(u,bt(l.map((function(e){return""===e?a:[a,e].join("/")})))),i&&u.push.apply(u,bt(l)),u.map((function(t){return e.startsWith("/")&&""===t?"/":t}))}var Pw=/^:\w+$/,Aw=3,Rw=2,Iw=1,Mw=10,Dw=-2,Nw=function(e){return"*"===e};function Lw(e,t){var n=e.split("/"),r=n.length;return n.some(Nw)&&(r+=Dw),t&&(r+=Rw),n.filter((function(e){return!Nw(e)})).reduce((function(e,t){return e+(Pw.test(t)?Aw:""===t?Iw:Mw)}),r)}function Fw(e,t){for(var n=e.routesMeta,r={},o="/",i=[],a=0;a and the router will parse it for you.'}function Uw(e){return e.filter((function(e,t){return 0===t||e.route.path&&e.route.path.length>0}))}function Ww(e,t,n,r){var o;void 0===r&&(r=!1),"string"===typeof e?o=_w(e):(yw(!(o=pw({},e)).pathname||!o.pathname.includes("?"),Hw("?","pathname","search",o)),yw(!o.pathname||!o.pathname.includes("#"),Hw("#","pathname","hash",o)),yw(!o.search||!o.search.includes("#"),Hw("#","search","hash",o)));var i,a=""===e||""===o.pathname,l=a?"/":o.pathname;if(r||null==l)i=n;else{var u=t.length-1;if(l.startsWith("..")){for(var s=l.split("/");".."===s[0];)s.shift(),u-=1;o.pathname=s.join("/")}i=u>=0?t[u]:"/"}var c=function(e,t){void 0===t&&(t="/");var n="string"===typeof e?_w(e):e,r=n.pathname,o=n.search,i=void 0===o?"":o,a=n.hash,l=void 0===a?"":a,u=r?r.startsWith("/")?r:function(e,t){var n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((function(e){".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}(r,t):t;return{pathname:u,search:Qw(i),hash:$w(l)}}(o,i),f=l&&"/"!==l&&l.endsWith("/"),d=(a||"."===l)&&n.endsWith("/");return c.pathname.endsWith("/")||!f&&!d||(c.pathname+="/"),c}var Gw=function(e){return e.join("/").replace(/\/\/+/g,"/")},qw=function(e){return e.replace(/\/+$/,"").replace(/^\/*/,"/")},Qw=function(e){return e&&"?"!==e?e.startsWith("?")?e:"?"+e:""},$w=function(e){return e&&"#"!==e?e.startsWith("#")?e:"#"+e:""},Yw=function(e){St(n,e);var t=bi(n);function n(){return pi(this,n),t.apply(this,arguments)}return hi(n)}(wi(Error)),Kw=function(){function e(t,n){var r,o=this;pi(this,e),this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],yw(t&&"object"===typeof t&&!Array.isArray(t),"defer() only accepts plain objects"),this.abortPromise=new Promise((function(e,t){return r=t})),this.controller=new AbortController;var i=function(){return r(new Yw("Deferred data aborted"))};this.unlistenAbortSignal=function(){return o.controller.signal.removeEventListener("abort",i)},this.controller.signal.addEventListener("abort",i),this.data=Object.entries(t).reduce((function(e,t){var n=ut(t,2),r=n[0],i=n[1];return Object.assign(e,f({},r,o.trackPromise(r,i)))}),{}),this.done&&this.unlistenAbortSignal(),this.init=n}return hi(e,[{key:"trackPromise",value:function(e,t){var n=this;if(!(t instanceof Promise))return t;this.deferredKeys.push(e),this.pendingKeysSet.add(e);var r=Promise.race([t,this.abortPromise]).then((function(t){return n.onSettle(r,e,null,t)}),(function(t){return n.onSettle(r,e,t)}));return r.catch((function(){})),Object.defineProperty(r,"_tracked",{get:function(){return!0}}),r}},{key:"onSettle",value:function(e,t,n,r){return this.controller.signal.aborted&&n instanceof Yw?(this.unlistenAbortSignal(),Object.defineProperty(e,"_error",{get:function(){return n}}),Promise.reject(n)):(this.pendingKeysSet.delete(t),this.done&&this.unlistenAbortSignal(),n?(Object.defineProperty(e,"_error",{get:function(){return n}}),this.emit(!1,t),Promise.reject(n)):(Object.defineProperty(e,"_data",{get:function(){return r}}),this.emit(!1,t),r))}},{key:"emit",value:function(e,t){this.subscribers.forEach((function(n){return n(e,t)}))}},{key:"subscribe",value:function(e){var t=this;return this.subscribers.add(e),function(){return t.subscribers.delete(e)}}},{key:"cancel",value:function(){var e=this;this.controller.abort(),this.pendingKeysSet.forEach((function(t,n){return e.pendingKeysSet.delete(n)})),this.emit(!0)}},{key:"resolveData",value:function(){var e=hw(fw().mark((function e(t){var n,r,o=this;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=!1,this.done){e.next=7;break}return r=function(){return o.cancel()},t.addEventListener("abort",r),e.next=6,new Promise((function(e){o.subscribe((function(n){t.removeEventListener("abort",r),(n||o.done)&&e(n)}))}));case 6:n=e.sent;case 7:return e.abrupt("return",n);case 8:case"end":return e.stop()}}),e,this)})));return function(t){return e.apply(this,arguments)}}()},{key:"done",get:function(){return 0===this.pendingKeysSet.size}},{key:"unwrappedData",get:function(){return yw(null!==this.data&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((function(e,t){var n=ut(t,2),r=n[0],o=n[1];return Object.assign(e,f({},r,function(e){if(!function(e){return e instanceof Promise&&!0===e._tracked}(e))return e;if(e._error)throw e._error;return e._data}(o)))}),{})}},{key:"pendingKeys",get:function(){return Array.from(this.pendingKeysSet)}}]),e}();var Xw=hi((function e(t,n,r,o){pi(this,e),void 0===o&&(o=!1),this.status=t,this.statusText=n||"",this.internal=o,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}));function Jw(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"boolean"===typeof e.internal&&"data"in e}var Zw=["post","put","patch","delete"],eS=new Set(Zw),tS=["get"].concat(Zw),nS=new Set(tS),rS=new Set([301,302,303,307,308]),oS=new Set([307,308]),iS={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},aS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},lS={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},uS=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,sS="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement,cS=!sS,fS=function(e){return Boolean(e.hasErrorBoundary)};function dS(e){yw(e.routes.length>0,"You must provide a non-empty routes array to createRouter");var t,n=e.detectErrorBoundary||fS,r={},o=Cw(e.routes,n,void 0,r),i=null,a=new Set,l=null,u=null,s=null,c=null!=e.hydrationData,d=Ew(o,e.history.location,e.basename),h=null;if(null==d){var p=jS(404,{pathname:e.history.location.pathname}),v=OS(o);d=v.matches,h=f({},v.route.id,p)}var g,m,y=!d.some((function(e){return e.route.lazy}))&&(!d.some((function(e){return e.route.loader}))||null!=e.hydrationData),b={historyAction:e.history.action,location:e.history.location,matches:d,initialized:y,navigation:iS,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||h,fetchers:new Map,blockers:new Map},x=ow.Pop,w=!1,S=!1,_=!1,k=[],T=[],C=new Map,E=0,O=-1,j=new Map,P=new Set,A=new Map,R=new Map,I=new Map,M=!1;function D(e){b=pw({},b,e),a.forEach((function(e){return e(b)}))}function N(n,r){var i,a,l,u=null!=b.actionData&&null!=b.navigation.formMethod&&FS(b.navigation.formMethod)&&"loading"===b.navigation.state&&!0!==(null==(i=n.state)?void 0:i._isRedirect);l=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:u?b.actionData:null;var s,c=r.loaderData?CS(b.loaderData,r.loaderData,r.matches||[],r.errors):b.loaderData,f=mt(I);try{for(f.s();!(s=f.n()).done;){ie(ut(s.value,1)[0])}}catch(h){f.e(h)}finally{f.f()}var d=!0===w||null!=b.navigation.formMethod&&FS(b.navigation.formMethod)&&!0!==(null==(a=n.state)?void 0:a._isRedirect);t&&(o=t,t=void 0),D(pw({},r,{actionData:l,loaderData:c,historyAction:x,location:n,initialized:!0,navigation:iS,revalidation:"idle",restoreScrollPosition:ce(n,r.matches||b.matches),preventScrollReset:d,blockers:new Map(b.blockers)})),S||x===ow.Pop||(x===ow.Push?e.history.push(n,n.state):x===ow.Replace&&e.history.replace(n,n.state)),x=ow.Pop,w=!1,S=!1,_=!1,k=[],T=[]}function L(e,t){return F.apply(this,arguments)}function F(){return F=hw(fw().mark((function t(n,r){var o,i,a,l,u,s,c,f,d,h;return fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("number"!==typeof n){t.next=3;break}return e.history.go(n),t.abrupt("return");case 3:if(o=hS(n,r),i=o.path,a=o.submission,l=o.error,u=b.location,s=pw({},s=ww(b.location,i,r&&r.state),e.history.encodeLocation(s)),c=r&&null!=r.replace?r.replace:void 0,f=ow.Push,!0===c?f=ow.Replace:!1===c||null!=a&&FS(a.formMethod)&&a.formAction===b.location.pathname+b.location.search&&(f=ow.Replace),d=r&&"preventScrollReset"in r?!0===r.preventScrollReset:void 0,!(h=le({currentLocation:u,nextLocation:s,historyAction:f}))){t.next=15;break}return ae(h,{state:"blocked",location:s,proceed:function(){ae(h,{state:"proceeding",proceed:void 0,reset:void 0,location:s}),L(n,r)},reset:function(){ie(h),D({blockers:new Map(b.blockers)})}}),t.abrupt("return");case 15:return t.next=17,z(f,s,{submission:a,pendingError:l,preventScrollReset:d,replace:r&&r.replace});case 17:return t.abrupt("return",t.sent);case 18:case"end":return t.stop()}}),t)}))),F.apply(this,arguments)}function z(e,t,n){return B.apply(this,arguments)}function B(){return B=hw(fw().mark((function n(r,i,a){var l,u,s,c,d,h,p,v,g,y,_,k,T,C,E,O;return fw().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(m&&m.abort(),m=null,x=r,S=!0===(a&&a.startUninterruptedRevalidation),se(b.location,b.matches),w=!0===(a&&a.preventScrollReset),l=t||o,u=a&&a.overrideNavigation,s=Ew(l,i,e.basename)){n.next=15;break}return c=jS(404,{pathname:i.pathname}),d=OS(l),h=d.matches,p=d.route,ue(),N(i,{matches:h,loaderData:{},errors:f({},p.id,c)}),n.abrupt("return");case 15:if(!RS(b.location,i)||a&&a.submission&&FS(a.submission.formMethod)){n.next=18;break}return N(i,{matches:s}),n.abrupt("return");case 18:if(m=new AbortController,v=SS(e.history,i,m.signal,a&&a.submission),!a||!a.pendingError){n.next=24;break}y=f({},ES(s).route.id,a.pendingError),n.next=35;break;case 24:if(!(a&&a.submission&&FS(a.submission.formMethod))){n.next=35;break}return n.next=27,V(v,i,a.submission,s,{replace:a.replace});case 27:if(!(_=n.sent).shortCircuited){n.next=30;break}return n.abrupt("return");case 30:g=_.pendingActionData,y=_.pendingActionError,k=pw({state:"loading",location:i},a.submission),u=k,v=new Request(v.url,{signal:v.signal});case 35:return n.next=37,U(v,i,s,u,a&&a.submission,a&&a.replace,g,y);case 37:if(T=n.sent,C=T.shortCircuited,E=T.loaderData,O=T.errors,!C){n.next=43;break}return n.abrupt("return");case 43:m=null,N(i,pw({matches:s},g?{actionData:g}:{},{loaderData:E,errors:O}));case 45:case"end":return n.stop()}}),n)}))),B.apply(this,arguments)}function V(e,t,n,r,o){return H.apply(this,arguments)}function H(){return H=hw(fw().mark((function e(t,o,i,a,l){var u,s,c,d;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(J(),D({navigation:pw({state:"submitting",location:o},i)}),(s=GS(a,o)).route.action||s.route.lazy){e.next=8;break}u={type:vw.error,error:jS(405,{method:t.method,pathname:o.pathname,routeId:s.route.id})},e.next=13;break;case 8:return e.next=10,xS("action",t,s,a,r,n,g.basename);case 10:if(u=e.sent,!t.signal.aborted){e.next=13;break}return e.abrupt("return",{shortCircuited:!0});case 13:if(!DS(u)){e.next=18;break}return c=l&&null!=l.replace?l.replace:u.location===b.location.pathname+b.location.search,e.next=17,$(b,u,{submission:i,replace:c});case 17:return e.abrupt("return",{shortCircuited:!0});case 18:if(!MS(u)){e.next=22;break}return d=ES(a,s.route.id),!0!==(l&&l.replace)&&(x=ow.Push),e.abrupt("return",{pendingActionData:{},pendingActionError:f({},d.route.id,u.error)});case 22:if(!IS(u)){e.next=24;break}throw jS(400,{type:"defer-action"});case 24:return e.abrupt("return",{pendingActionData:f({},s.route.id,u.data)});case 25:case"end":return e.stop()}}),e)}))),H.apply(this,arguments)}function U(e,t,n,r,o,i,a,l){return W.apply(this,arguments)}function W(){return W=hw(fw().mark((function n(r,i,a,l,u,s,c,f){var d,h,p,v,g,y,x,w,j,P,I,M,L,F,z,B,V,H;return fw().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if((d=l)||(h=pw({state:"loading",location:i,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},u),d=h),p=u||(d.formMethod&&d.formAction&&d.formData&&d.formEncType?{formMethod:d.formMethod,formAction:d.formAction,formData:d.formData,formEncType:d.formEncType}:void 0),v=t||o,g=vS(e.history,b,a,p,i,_,k,T,A,v,e.basename,c,f),y=ut(g,2),x=y[0],w=y[1],ue((function(e){return!(a&&a.some((function(t){return t.route.id===e})))||x&&x.some((function(t){return t.route.id===e}))})),0!==x.length||0!==w.length){n.next=9;break}return N(i,pw({matches:a,loaderData:{},errors:f||null},c?{actionData:c}:{})),n.abrupt("return",{shortCircuited:!0});case 9:return S||(w.forEach((function(e){var t=b.fetchers.get(e.key),n={state:"loading",data:t&&t.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};b.fetchers.set(e.key,n)})),j=c||b.actionData,D(pw({navigation:d},j?0===Object.keys(j).length?{actionData:null}:{actionData:j}:{},w.length>0?{fetchers:new Map(b.fetchers)}:{}))),O=++E,w.forEach((function(e){return C.set(e.key,m)})),n.next=14,K(b.matches,a,x,w,r);case 14:if(P=n.sent,I=P.results,M=P.loaderResults,L=P.fetcherResults,!r.signal.aborted){n.next=20;break}return n.abrupt("return",{shortCircuited:!0});case 20:if(w.forEach((function(e){return C.delete(e.key)})),!(F=PS(I))){n.next=26;break}return n.next=25,$(b,F,{replace:s});case 25:return n.abrupt("return",{shortCircuited:!0});case 26:return z=TS(b,a,x,M,f,w,L,R),B=z.loaderData,V=z.errors,R.forEach((function(e,t){e.subscribe((function(n){(n||e.done)&&R.delete(t)}))})),re(),H=oe(O),n.abrupt("return",pw({loaderData:B,errors:V},H||w.length>0?{fetchers:new Map(b.fetchers)}:{}));case 31:case"end":return n.stop()}}),n)}))),W.apply(this,arguments)}function G(e){return b.fetchers.get(e)||aS}function q(){return q=hw(fw().mark((function i(a,l,u,s,c,d){var h,p,v,y,w,S,I,M,L,F,z,B,V,H,U,W,G,q,Q,Y,X,ee,te,ne,re,ie,ae;return fw().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:if(J(),A.delete(a),s.route.action||s.route.lazy){i.next=6;break}return h=jS(405,{method:d.formMethod,pathname:u,routeId:l}),Z(a,l,h),i.abrupt("return");case 6:return p=b.fetchers.get(a),v=pw({state:"submitting"},d,{data:p&&p.data," _hasFetcherDoneAnything ":!0}),b.fetchers.set(a,v),D({fetchers:new Map(b.fetchers)}),y=new AbortController,w=SS(e.history,u,y.signal,d),C.set(a,y),i.next=15,xS("action",w,s,c,r,n,g.basename);case 15:if(S=i.sent,!w.signal.aborted){i.next=19;break}return C.get(a)===y&&C.delete(a),i.abrupt("return");case 19:if(!DS(S)){i.next=26;break}return C.delete(a),P.add(a),I=pw({state:"loading"},d,{data:void 0," _hasFetcherDoneAnything ":!0}),b.fetchers.set(a,I),D({fetchers:new Map(b.fetchers)}),i.abrupt("return",$(b,S,{isFetchActionRedirect:!0}));case 26:if(!MS(S)){i.next=29;break}return Z(a,l,S.error),i.abrupt("return");case 29:if(!IS(S)){i.next=31;break}throw jS(400,{type:"defer-action"});case 31:return M=b.navigation.location||b.location,L=SS(e.history,M,y.signal),F=t||o,yw(z="idle"!==b.navigation.state?Ew(F,b.navigation.location,e.basename):b.matches,"Didn't find any matches after fetcher action"),B=++E,j.set(a,B),V=pw({state:"loading",data:S.data},d,{" _hasFetcherDoneAnything ":!0}),b.fetchers.set(a,V),H=vS(e.history,b,z,d,M,_,k,T,A,F,e.basename,f({},s.route.id,S.data),void 0),U=ut(H,2),W=U[0],(G=U[1]).filter((function(e){return e.key!==a})).forEach((function(e){var t=e.key,n=b.fetchers.get(t),r={state:"loading",data:n&&n.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};b.fetchers.set(t,r),C.set(t,y)})),D({fetchers:new Map(b.fetchers)}),i.next=45,K(b.matches,z,W,G,L);case 45:if(q=i.sent,Q=q.results,Y=q.loaderResults,X=q.fetcherResults,!y.signal.aborted){i.next=51;break}return i.abrupt("return");case 51:if(j.delete(a),C.delete(a),G.forEach((function(e){return C.delete(e.key)})),!(ee=PS(Q))){i.next=57;break}return i.abrupt("return",$(b,ee));case 57:te=TS(b,b.matches,W,Y,void 0,G,X,R),ne=te.loaderData,re=te.errors,ie={state:"idle",data:S.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0},b.fetchers.set(a,ie),ae=oe(B),"loading"===b.navigation.state&&B>O?(yw(x,"Expected pending action"),m&&m.abort(),N(b.navigation.location,{matches:z,loaderData:ne,errors:re,fetchers:new Map(b.fetchers)})):(D(pw({errors:re,loaderData:CS(b.loaderData,ne,z,re)},ae?{fetchers:new Map(b.fetchers)}:{})),_=!1);case 62:case"end":return i.stop()}}),i)}))),q.apply(this,arguments)}function Q(){return Q=hw(fw().mark((function t(o,i,a,l,u,s){var c,d,h,p,v,m,y;return fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return c=b.fetchers.get(o),d=pw({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},s,{data:c&&c.data," _hasFetcherDoneAnything ":!0}),b.fetchers.set(o,d),D({fetchers:new Map(b.fetchers)}),h=new AbortController,p=SS(e.history,a,h.signal),C.set(o,h),t.next=9,xS("loader",p,l,u,r,n,g.basename);case 9:if(!IS(v=t.sent)){t.next=17;break}return t.next=13,VS(v,p.signal,!0);case 13:if(t.t0=t.sent,t.t0){t.next=16;break}t.t0=v;case 16:v=t.t0;case 17:if(C.get(o)===h&&C.delete(o),!p.signal.aborted){t.next=20;break}return t.abrupt("return");case 20:if(!DS(v)){t.next=24;break}return t.next=23,$(b,v);case 23:return t.abrupt("return");case 24:if(!MS(v)){t.next=29;break}return m=ES(b.matches,i),b.fetchers.delete(o),D({fetchers:new Map(b.fetchers),errors:f({},m.route.id,v.error)}),t.abrupt("return");case 29:yw(!IS(v),"Unhandled fetcher deferred data"),y={state:"idle",data:v.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0},b.fetchers.set(o,y),D({fetchers:new Map(b.fetchers)});case 33:case"end":return t.stop()}}),t)}))),Q.apply(this,arguments)}function $(e,t,n){return Y.apply(this,arguments)}function Y(){return Y=hw(fw().mark((function t(n,r,o){var i,a,l,u,s,c,f,d,h,p,v,g,y,b;return fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(l=(a=void 0===o?{}:o).submission,u=a.replace,s=a.isFetchActionRedirect,r.revalidate&&(_=!0),yw(c=ww(n.location,r.location,pw({_isRedirect:!0},s?{_isFetchActionRedirect:!0}:{})),"Expected a location on the redirect navigation"),!uS.test(r.location)||!sS||"undefined"===typeof(null==(i=window)?void 0:i.location)){t.next=10;break}if(f=e.history.createURL(r.location),d=null==Vw(f.pathname,e.basename||"/"),window.location.origin===f.origin&&!d){t.next=10;break}return u?window.location.replace(r.location):window.location.assign(r.location),t.abrupt("return");case 10:if(m=null,h=!0===u?ow.Replace:ow.Push,p=n.navigation,v=p.formMethod,g=p.formAction,y=p.formEncType,b=p.formData,!l&&v&&g&&b&&y&&(l={formMethod:v,formAction:g,formEncType:y,formData:b}),!(oS.has(r.status)&&l&&FS(l.formMethod))){t.next=19;break}return t.next=17,z(h,c,{submission:pw({},l,{formAction:r.location}),preventScrollReset:w});case 17:t.next=21;break;case 19:return t.next=21,z(h,c,{overrideNavigation:{state:"loading",location:c,formMethod:l?l.formMethod:void 0,formAction:l?l.formAction:void 0,formEncType:l?l.formEncType:void 0,formData:l?l.formData:void 0},preventScrollReset:w});case 21:case"end":return t.stop()}}),t)}))),Y.apply(this,arguments)}function K(e,t,n,r,o){return X.apply(this,arguments)}function X(){return X=hw(fw().mark((function t(o,i,a,l,u){var s,c,f;return fw().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,Promise.all([].concat(bt(a.map((function(e){return xS("loader",u,e,i,r,n,g.basename)}))),bt(l.map((function(t){return t.matches&&t.match?xS("loader",SS(e.history,t.path,u.signal),t.match,t.matches,r,n,g.basename):{type:vw.error,error:jS(404,{pathname:t.path})}})))));case 2:return s=t.sent,c=s.slice(0,a.length),f=s.slice(a.length),t.next=7,Promise.all([zS(o,a,c,u.signal,!1,b.loaderData),zS(o,l.map((function(e){return e.match})),f,u.signal,!0)]);case 7:return t.abrupt("return",{results:s,loaderResults:c,fetcherResults:f});case 8:case"end":return t.stop()}}),t)}))),X.apply(this,arguments)}function J(){var e;_=!0,(e=k).push.apply(e,bt(ue())),A.forEach((function(e,t){C.has(t)&&(T.push(t),te(t))}))}function Z(e,t,n){var r=ES(b.matches,t);ee(e),D({errors:f({},r.route.id,n),fetchers:new Map(b.fetchers)})}function ee(e){C.has(e)&&te(e),A.delete(e),j.delete(e),P.delete(e),b.fetchers.delete(e)}function te(e){var t=C.get(e);yw(t,"Expected fetch controller: "+e),t.abort(),C.delete(e)}function ne(e){var t,n=mt(e);try{for(n.s();!(t=n.n()).done;){var r=t.value,o={state:"idle",data:G(r).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};b.fetchers.set(r,o)}}catch(i){n.e(i)}finally{n.f()}}function re(){var e,t=[],n=mt(P);try{for(n.s();!(e=n.n()).done;){var r=e.value,o=b.fetchers.get(r);yw(o,"Expected fetcher: "+r),"loading"===o.state&&(P.delete(r),t.push(r))}}catch(i){n.e(i)}finally{n.f()}ne(t)}function oe(e){var t,n=[],r=mt(j);try{for(r.s();!(t=r.n()).done;){var o=ut(t.value,2),i=o[0];if(o[1]0}function ie(e){b.blockers.delete(e),I.delete(e)}function ae(e,t){var n=b.blockers.get(e)||lS;yw("unblocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"blocked"===t.state||"blocked"===n.state&&"proceeding"===t.state||"blocked"===n.state&&"unblocked"===t.state||"proceeding"===n.state&&"unblocked"===t.state,"Invalid blocker state transition: "+n.state+" -> "+t.state),b.blockers.set(e,t),D({blockers:new Map(b.blockers)})}function le(e){var t=e.currentLocation,n=e.nextLocation,r=e.historyAction;if(0!==I.size){I.size>1&&bw(!1,"A router only supports one blocker at a time");var o=Array.from(I.entries()),i=ut(o[o.length-1],2),a=i[0],l=i[1],u=b.blockers.get(a);if(!u||"proceeding"!==u.state)return l({currentLocation:t,nextLocation:n,historyAction:r})?a:void 0}}function ue(e){var t=[];return R.forEach((function(n,r){e&&!e(r)||(n.cancel(),t.push(r),R.delete(r))})),t}function se(e,t){if(l&&u&&s){var n=t.map((function(e){return WS(e,b.loaderData)})),r=u(e,n)||e.key;l[r]=s()}}function ce(e,t){if(l&&u&&s){var n=t.map((function(e){return WS(e,b.loaderData)})),r=u(e,n)||e.key,o=l[r];if("number"===typeof o)return o}return null}return g={get basename(){return e.basename},get state(){return b},get routes(){return o},initialize:function(){if(i=e.history.listen((function(t){var n=t.action,r=t.location,o=t.delta;if(!M){bw(0===I.size||null!=o,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");var i=le({currentLocation:b.location,nextLocation:r,historyAction:n});return i&&null!=o?(M=!0,e.history.go(-1*o),void ae(i,{state:"blocked",location:r,proceed:function(){ae(i,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),e.history.go(o)},reset:function(){ie(i),D({blockers:new Map(g.state.blockers)})}})):z(n,r)}M=!1})),b.initialized)return g;var t=b.matches.filter((function(e){return e.route.lazy}));if(0===t.length)return z(ow.Pop,b.location),g;var o=t.map((function(e){return yS(e.route,n,r)}));return Promise.all(o).then((function(){!b.matches.some((function(e){return e.route.loader}))||null!=e.hydrationData?D({initialized:!0}):z(ow.Pop,b.location)})),g},subscribe:function(e){return a.add(e),function(){return a.delete(e)}},enableScrollRestoration:function(e,t,n){if(l=e,s=t,u=n||function(e){return e.key},!c&&b.navigation===iS){c=!0;var r=ce(b.location,b.matches);null!=r&&D({restoreScrollPosition:r})}return function(){l=null,s=null,u=null}},navigate:L,fetch:function(n,r,i,a){if(cS)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");C.has(n)&&te(n);var l=Ew(t||o,i,e.basename);if(l){var u=hS(i,a,!0),s=u.path,c=u.submission,f=GS(l,s);w=!0===(a&&a.preventScrollReset),c&&FS(c.formMethod)?function(e,t,n,r,o,i){q.apply(this,arguments)}(n,r,s,f,l,c):(A.set(n,{routeId:r,path:s}),function(e,t,n,r,o,i){Q.apply(this,arguments)}(n,r,s,f,l,c))}else Z(n,r,jS(404,{pathname:i}))},revalidate:function(){J(),D({revalidation:"loading"}),"submitting"!==b.navigation.state&&("idle"!==b.navigation.state?z(x||b.historyAction,b.navigation.location,{overrideNavigation:b.navigation}):z(b.historyAction,b.location,{startUninterruptedRevalidation:!0}))},createHref:function(t){return e.history.createHref(t)},encodeLocation:function(t){return e.history.encodeLocation(t)},getFetcher:G,deleteFetcher:ee,dispose:function(){i&&i(),a.clear(),m&&m.abort(),b.fetchers.forEach((function(e,t){return ee(t)})),b.blockers.forEach((function(e,t){return ie(t)}))},getBlocker:function(e,t){var n=b.blockers.get(e)||lS;return I.get(e)!==t&&I.set(e,t),n},deleteBlocker:ie,_internalFetchControllers:C,_internalActiveDeferreds:R,_internalSetRoutes:function(e){t=e}},g}Symbol("deferred");function hS(e,t,n){void 0===n&&(n=!1);var r,o="string"===typeof e?e:Sw(e);if(!t||!function(e){return null!=e&&"formData"in e}(t))return{path:o};if(t.formMethod&&!LS(t.formMethod))return{path:o,error:jS(405,{method:t.formMethod})};if(t.formData&&FS((r={formMethod:t.formMethod||"get",formAction:AS(o),formEncType:t&&t.formEncType||"application/x-www-form-urlencoded",formData:t.formData}).formMethod))return{path:o,submission:r};var i=_w(o),a=_S(t.formData);return n&&i.search&&US(i.search)&&a.append("index",""),i.search="?"+a,{path:Sw(i),submission:r}}function pS(e,t){var n=e;if(t){var r=e.findIndex((function(e){return e.route.id===t}));r>=0&&(n=e.slice(0,r))}return n}function vS(e,t,n,r,o,i,a,l,u,s,c,f,d){var h=d?Object.values(d)[0]:f?Object.values(f)[0]:void 0,p=e.createURL(t.location),v=e.createURL(o),g=i||p.toString()===v.toString()||p.search!==v.search,m=d?Object.keys(d)[0]:void 0,y=pS(n,m).filter((function(e,n){if(e.route.lazy)return!0;if(null==e.route.loader)return!1;if(function(e,t,n){var r=!t||n.route.id!==t.route.id,o=void 0===e[n.route.id];return r||o}(t.loaderData,t.matches[n],e)||a.some((function(t){return t===e.route.id})))return!0;var o=t.matches[n],i=e;return mS(e,pw({currentUrl:p,currentParams:o.params,nextUrl:v,nextParams:i.params},r,{actionResult:h,defaultShouldRevalidate:g||gS(o,i)}))})),b=[];return u.forEach((function(e,o){if(n.some((function(t){return t.route.id===e.routeId}))){var i=Ew(s,e.path,c);if(i){var a=GS(i,e.path);if(l.includes(o))b.push(pw({key:o,matches:i,match:a},e));else mS(a,pw({currentUrl:p,currentParams:t.matches[t.matches.length-1].params,nextUrl:v,nextParams:n[n.length-1].params},r,{actionResult:h,defaultShouldRevalidate:g}))&&b.push(pw({key:o,matches:i,match:a},e))}else b.push(pw({key:o},e,{matches:null,match:null}))}})),[y,b]}function gS(e,t){var n=e.route.path;return e.pathname!==t.pathname||null!=n&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function mS(e,t){if(e.route.shouldRevalidate){var n=e.route.shouldRevalidate(t);if("boolean"===typeof n)return n}return t.defaultShouldRevalidate}function yS(e,t,n){return bS.apply(this,arguments)}function bS(){return bS=hw(fw().mark((function e(t,n,r){var o,i,a,l,u,s;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.lazy){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,t.lazy();case 4:if(o=e.sent,t.lazy){e.next=7;break}return e.abrupt("return");case 7:for(l in yw(i=r[t.id],"No route found in manifest"),a={},o)u=i[l],bw(!(s=void 0!==u&&"hasErrorBoundary"!==l),'Route "'+i.id+'" has a static property "'+l+'" defined but its lazy function is also returning a value for this property. The lazy route property "'+l+'" will be ignored.'),s||Tw.has(l)||(a[l]=o[l]);Object.assign(i,a),Object.assign(i,{hasErrorBoundary:n(pw({},i)),lazy:void 0});case 13:case"end":return e.stop()}}),e)}))),bS.apply(this,arguments)}function xS(e,t,n,r,o,i,a,l,u,s){return wS.apply(this,arguments)}function wS(){return wS=hw(fw().mark((function e(t,n,r,o,i,a,l,u,s,c){var f,d,h,p,v,g,m,y,b,x,w,S,_,k,T,C,E,O,j;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===l&&(l="/"),void 0===u&&(u=!1),void 0===s&&(s=!1),p=function(e){var t,o=new Promise((function(e,n){return t=n}));return h=function(){return t()},n.signal.addEventListener("abort",h),Promise.race([e({request:n,params:r.params,context:c}),o])},e.prev=4,v=r.route[t],!r.route.lazy){e.next=30;break}if(!v){e.next=14;break}return e.next=10,Promise.all([p(v),yS(r.route,a,i)]);case 10:g=e.sent,d=g[0],e.next=28;break;case 14:return e.next=16,yS(r.route,a,i);case 16:if(!(v=r.route[t])){e.next=23;break}return e.next=20,p(v);case 20:d=e.sent,e.next=28;break;case 23:if("action"!==t){e.next=27;break}throw jS(405,{method:n.method,pathname:new URL(n.url).pathname,routeId:r.route.id});case 27:return e.abrupt("return",{type:vw.data,data:void 0});case 28:e.next=34;break;case 30:return yw(v,"Could not find the "+t+' to run on the "'+r.route.id+'" route'),e.next=33,p(v);case 33:d=e.sent;case 34:yw(void 0!==d,"You defined "+("action"===t?"an action":"a loader")+' for route "'+r.route.id+"\" but didn't return anything from your `"+t+"` function. Please return a value or `null`."),e.next=41;break;case 37:e.prev=37,e.t0=e.catch(4),f=vw.error,d=e.t0;case 41:return e.prev=41,h&&n.signal.removeEventListener("abort",h),e.finish(41);case 44:if(!NS(d)){e.next=69;break}if(m=d.status,!rS.has(m)){e.next=54;break}if(yw(y=d.headers.get("Location"),"Redirects returned/thrown from loaders/actions must have a Location header"),uS.test(y)?u||(_=new URL(n.url),k=y.startsWith("//")?new URL(_.protocol+y):new URL(y),T=null!=Vw(k.pathname,l),k.origin===_.origin&&T&&(y=k.pathname+k.search+k.hash)):(b=o.slice(0,o.indexOf(r)+1),x=Uw(b).map((function(e){return e.pathnameBase})),yw(Sw(w=Ww(y,x,new URL(n.url).pathname)),"Unable to resolve redirect location: "+y),l&&(S=w.pathname,w.pathname="/"===S?l:Gw([l,S])),y=Sw(w)),!u){e.next=53;break}throw d.headers.set("Location",y),d;case 53:return e.abrupt("return",{type:vw.redirect,status:m,location:y,revalidate:null!==d.headers.get("X-Remix-Revalidate")});case 54:if(!s){e.next=56;break}throw{type:f||vw.data,response:d};case 56:if(!(E=d.headers.get("Content-Type"))||!/\bapplication\/json\b/.test(E)){e.next=63;break}return e.next=60,d.json();case 60:C=e.sent,e.next=66;break;case 63:return e.next=65,d.text();case 65:C=e.sent;case 66:if(f!==vw.error){e.next=68;break}return e.abrupt("return",{type:f,error:new Xw(m,d.statusText,C),headers:d.headers});case 68:return e.abrupt("return",{type:vw.data,data:C,statusCode:d.status,headers:d.headers});case 69:if(f!==vw.error){e.next=71;break}return e.abrupt("return",{type:f,error:d});case 71:if(!(d instanceof Kw)){e.next=73;break}return e.abrupt("return",{type:vw.deferred,deferredData:d,statusCode:null==(O=d.init)?void 0:O.status,headers:(null==(j=d.init)?void 0:j.headers)&&new Headers(d.init.headers)});case 73:return e.abrupt("return",{type:vw.data,data:d});case 74:case"end":return e.stop()}}),e,null,[[4,37,41,44]])}))),wS.apply(this,arguments)}function SS(e,t,n,r){var o=e.createURL(AS(t)).toString(),i={signal:n};if(r&&FS(r.formMethod)){var a=r.formMethod,l=r.formEncType,u=r.formData;i.method=a.toUpperCase(),i.body="application/x-www-form-urlencoded"===l?_S(u):u}return new Request(o,i)}function _S(e){var t,n=new URLSearchParams,r=mt(e.entries());try{for(r.s();!(t=r.n()).done;){var o=ut(t.value,2),i=o[0],a=o[1];n.append(i,a instanceof File?a.name:a)}}catch(l){r.e(l)}finally{r.f()}return n}function kS(e,t,n,r,o){var i,a={},l=null,u=!1,s={};return n.forEach((function(n,c){var f=t[c].route.id;if(yw(!DS(n),"Cannot handle redirect results in processLoaderData"),MS(n)){var d=ES(e,f),h=n.error;r&&(h=Object.values(r)[0],r=void 0),null==(l=l||{})[d.route.id]&&(l[d.route.id]=h),a[f]=void 0,u||(u=!0,i=Jw(n.error)?n.error.status:500),n.headers&&(s[f]=n.headers)}else IS(n)?(o.set(f,n.deferredData),a[f]=n.deferredData.data):a[f]=n.data,null==n.statusCode||200===n.statusCode||u||(i=n.statusCode),n.headers&&(s[f]=n.headers)})),r&&(l=r,a[Object.keys(r)[0]]=void 0),{loaderData:a,errors:l,statusCode:i||200,loaderHeaders:s}}function TS(e,t,n,r,o,i,a,l){for(var u=kS(t,n,r,o,l),s=u.loaderData,c=u.errors,d=0;d=0;t--){var n=e[t];if(DS(n))return n}}function AS(e){return Sw(pw({},"string"===typeof e?_w(e):e,{hash:""}))}function RS(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash!==t.hash}function IS(e){return e.type===vw.deferred}function MS(e){return e.type===vw.error}function DS(e){return(e&&e.type)===vw.redirect}function NS(e){return null!=e&&"number"===typeof e.status&&"string"===typeof e.statusText&&"object"===typeof e.headers&&"undefined"!==typeof e.body}function LS(e){return nS.has(e)}function FS(e){return eS.has(e)}function zS(e,t,n,r,o,i){return BS.apply(this,arguments)}function BS(){return BS=hw(fw().mark((function e(t,n,r,o,i,a){var l,u;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l=fw().mark((function e(l){var u,s,c,f;return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u=r[l],s=n[l]){e.next=4;break}return e.abrupt("return","continue");case 4:if(c=t.find((function(e){return e.route.id===s.route.id})),f=null!=c&&!gS(c,s)&&void 0!==(a&&a[s.route.id]),!IS(u)||!i&&!f){e.next=9;break}return e.next=9,VS(u,o,i).then((function(e){e&&(r[l]=e||r[l])}));case 9:case"end":return e.stop()}}),e)})),u=0;case 2:if(!(u=0||yw(!1),r=r.slice(0,Math.min(r.length,i+1))}return r.reduceRight((function(e,i,l){var u=i.route.id?null==o?void 0:o[i.route.id]:null,s=null;n&&(s=i.route.ErrorBoundary?a.createElement(i.route.ErrorBoundary,null):i.route.errorElement?i.route.errorElement:a.createElement(d_,null));var c=t.concat(r.slice(0,l+1)),f=function(){var t=e;return u?t=s:i.route.Component?t=a.createElement(i.route.Component,null):i.route.element&&(t=i.route.element),a.createElement(g_,{match:i,routeContext:{outlet:e,matches:c},children:t})};return n&&(i.route.ErrorBoundary||i.route.errorElement||0===l)?a.createElement(v_,{location:n.location,component:s,error:u,children:f(),routeContext:{outlet:null,matches:c}}):f()}),null)}function y_(e){var t=a.useContext(e_);return t||yw(!1),t}function b_(e){var t=function(e){var t=a.useContext(o_);return t||yw(!1),t}(),n=t.matches[t.matches.length-1];return n.route.id||yw(!1),n.route.id}!function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"}(h_||(h_={})),function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"}(p_||(p_={}));var x_;function w_(e){var t=e.fallbackElement,n=e.router,r=a.useCallback((function(){return n.state}),[n]),o=JS(n.subscribe,r,r),i=a.useMemo((function(){return{createHref:n.createHref,encodeLocation:n.encodeLocation,go:function(e){return n.navigate(e)},push:function(e,t,r){return n.navigate(e,{state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})},replace:function(e,t,r){return n.navigate(e,{replace:!0,state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})}}}),[n]),l=n.basename||"/",u=a.useMemo((function(){return{router:n,navigator:i,static:!1,basename:l}}),[n,i,l]);return a.createElement(a.Fragment,null,a.createElement(ZS.Provider,{value:u},a.createElement(e_.Provider,{value:o},a.createElement(__,{basename:n.basename,location:n.state.location,navigationType:n.state.historyAction,navigator:i},n.state.initialized?a.createElement(k_,null):t))),null)}function S_(e){yw(!1)}function __(e){var t=e.basename,n=void 0===t?"/":t,r=e.children,o=void 0===r?null:r,i=e.location,l=e.navigationType,u=void 0===l?ow.Pop:l,s=e.navigator,c=e.static,f=void 0!==c&&c;l_()&&yw(!1);var d=n.replace(/^\/*/,"/"),h=a.useMemo((function(){return{basename:d,navigator:s,static:f}}),[d,s,f]);"string"===typeof i&&(i=_w(i));var p=i,v=p.pathname,g=void 0===v?"/":v,m=p.search,y=void 0===m?"":m,b=p.hash,x=void 0===b?"":b,w=p.state,S=void 0===w?null:w,_=p.key,k=void 0===_?"default":_,T=a.useMemo((function(){var e=Vw(g,d);return null==e?null:{location:{pathname:e,search:y,hash:x,state:S,key:k},navigationType:u}}),[d,g,y,x,S,k,u]);return null==T?null:a.createElement(n_.Provider,{value:h},a.createElement(r_.Provider,{children:o,value:T}))}function k_(e){var t=e.children,n=e.location,r=a.useContext(ZS);return function(e,t){l_()||yw(!1);var n,r=a.useContext(n_).navigator,o=a.useContext(e_),i=a.useContext(o_).matches,l=i[i.length-1],u=l?l.params:{},s=(l&&l.pathname,l?l.pathnameBase:"/"),c=(l&&l.route,u_());if(t){var f,d="string"===typeof t?_w(t):t;"/"===s||(null==(f=d.pathname)?void 0:f.startsWith(s))||yw(!1),n=d}else n=c;var h=n.pathname||"/",p=Ew(e,{pathname:"/"===s?h:h.slice(s.length)||"/"}),v=m_(p&&p.map((function(e){return Object.assign({},e,{params:Object.assign({},u,e.params),pathname:Gw([s,r.encodeLocation?r.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?s:Gw([s,r.encodeLocation?r.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})})),i,o||void 0);return t&&v?a.createElement(r_.Provider,{value:{location:a_({pathname:"/",search:"",hash:"",state:null,key:"default"},n),navigationType:ow.Pop}},v):v}(r&&!t?r.router.routes:C_(t),n)}!function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"}(x_||(x_={}));var T_=new Promise((function(){}));a.Component;function C_(e,t){void 0===t&&(t=[]);var n=[];return a.Children.forEach(e,(function(e,r){if(a.isValidElement(e))if(e.type!==a.Fragment){e.type!==S_&&yw(!1),e.props.index&&e.props.children&&yw(!1);var o=[].concat(bt(t),[r]),i={id:e.props.id||o.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(i.children=C_(e.props.children,o)),n.push(i)}else n.push.apply(n,C_(e.props.children,t))})),n}function E_(e){return Boolean(e.ErrorBoundary)||Boolean(e.errorElement)}function O_(){return O_=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}var P_=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"];function A_(){var e,t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=O_({},t,{errors:R_(t.errors)})),t}function R_(e){if(!e)return null;for(var t={},n=0,r=Object.entries(e);n2?r-2:0),i=2;i1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2?arguments[2]:void 0,o=arguments.length>3?arguments[3]:void 0,i=ak(e,["unmount","static"]),l=i.as,u=void 0===l?r:l,s=i.children,c=i.refName,d=void 0===c?"ref":c,h=p(i,J_),v=void 0!==e.ref?f({},d,e.ref):{},g="function"==typeof s?s(n):s;"className"in h&&h.className&&"function"==typeof h.className&&(h.className=h.className(n));var m={};if(n){for(var y=!1,b=[],x=0,w=Object.entries(n);x0){if(!(0,a.isValidElement)(g)||Array.isArray(g)&&g.length>1)throw new Error(['Passing props on "Fragment"!',"","The current component <".concat(o,' /> is rendering a "Fragment".'),"However we need to passthrough the following props:",Object.keys(h).map((function(e){return" - ".concat(e)})).join("\n"),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map((function(e){return" - ".concat(e)})).join("\n")].join("\n"));var T=$_(null==(t=g.props)?void 0:t.className,h.className),C=T?{className:T}:{};return(0,a.cloneElement)(g,Object.assign({},rk(g.props,ik(ak(h,["ref"]))),m,v,function(){for(var e=arguments.length,t=new Array(e),n=0;n1?r-1:0),a=1;a1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=mt(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}var lk=(0,a.createContext)(null);lk.displayName="OpenClosedContext";var uk=function(e){return e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e}(uk||{});function sk(){return(0,a.useContext)(lk)}function ck(e){var t=e.value,n=e.children;return a.createElement(lk.Provider,{value:t},n)}var fk=Object.defineProperty,dk=function(e,t,n){return function(e,t,n){t in e?fk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!=typeof t?t+"":t,n),n},hk=function(){function e(){pi(this,e),dk(this,"current",this.detect()),dk(this,"handoffState","pending"),dk(this,"currentId",0)}return hi(e,[{key:"set",value:function(e){this.current!==e&&(this.handoffState="pending",this.currentId=0,this.current=e)}},{key:"reset",value:function(){this.set(this.detect())}},{key:"nextId",value:function(){return++this.currentId}},{key:"isServer",get:function(){return"server"===this.current}},{key:"isClient",get:function(){return"client"===this.current}},{key:"detect",value:function(){return"undefined"==typeof window||"undefined"==typeof document?"server":"client"}},{key:"handoff",value:function(){"pending"===this.handoffState&&(this.handoffState="complete")}},{key:"isHandoffComplete",get:function(){return"complete"===this.handoffState}}]),e}(),pk=new hk,vk=function(e,t){pk.isServer?(0,a.useEffect)(e,t):(0,a.useLayoutEffect)(e,t)};function gk(){var e=(0,a.useRef)(!1);return vk((function(){return e.current=!0,function(){e.current=!1}}),[]),e}function mk(e){var t=(0,a.useRef)(e);return vk((function(){t.current=e}),[e]),t}function yk(){var e=ut((0,a.useState)(pk.isHandoffComplete),2),t=e[0],n=e[1];return t&&!1===pk.isHandoffComplete&&n(!1),(0,a.useEffect)((function(){!0!==t&&n(!0)}),[t]),(0,a.useEffect)((function(){return pk.handoff()}),[]),t}var bk=function(e){var t=mk(e);return a.useCallback((function(){return t.current.apply(t,arguments)}),[t])},xk=Symbol();function wk(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return Object.assign(e,f({},xk,t))}function Sk(){for(var e=arguments.length,t=new Array(e),n=0;n=0){var r,o=mt(e.splice(n,1));try{for(o.s();!(r=o.n()).done;){(0,r.value)()}}catch(i){o.e(i)}finally{o.f()}}}},dispose:function(){var t,n=mt(e.splice(0));try{for(n.s();!(t=n.n()).done;){(0,t.value)()}}catch(r){n.e(r)}finally{n.f()}}};return t}function Tk(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o0&&(t=e.classList).add.apply(t,r)}function Ck(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o0&&(t=e.classList).remove.apply(t,r)}function Ek(e,t,n,r){var o=n?"enter":"leave",i=kk(),a=void 0!==r?function(e){var t={called:!1};return function(){if(!t.called)return t.called=!0,e.apply(void 0,arguments)}}(r):function(){};"enter"===o&&(e.removeAttribute("hidden"),e.style.display="");var l=Y_(o,{enter:function(){return t.enter},leave:function(){return t.leave}}),u=Y_(o,{enter:function(){return t.enterTo},leave:function(){return t.leaveTo}}),s=Y_(o,{enter:function(){return t.enterFrom},leave:function(){return t.leaveFrom}});return Ck.apply(void 0,[e].concat(bt(t.enter),bt(t.enterTo),bt(t.enterFrom),bt(t.leave),bt(t.leaveFrom),bt(t.leaveTo),bt(t.entered))),Tk.apply(void 0,[e].concat(bt(l),bt(s))),i.nextFrame((function(){Ck.apply(void 0,[e].concat(bt(s))),Tk.apply(void 0,[e].concat(bt(u))),function(e,t){var n=kk();if(!e)return n.dispose;var r=getComputedStyle(e),o=[r.transitionDuration,r.transitionDelay].map((function(e){var t=e.split(",").filter(Boolean).map((function(e){return e.includes("ms")?parseFloat(e):1e3*parseFloat(e)})).sort((function(e,t){return t-e})),n=ut(t,1)[0];return void 0===n?0:n})),i=ut(o,2),a=i[0]+i[1];if(0!==a){n.group((function(n){n.setTimeout((function(){t(),n.dispose()}),a),n.addEventListener(e,"transitionrun",(function(e){e.target===e.currentTarget&&n.dispose()}))}));var l=n.addEventListener(e,"transitionend",(function(e){e.target===e.currentTarget&&(t(),l())}))}else t();n.add((function(){return t()})),n.dispose}(e,(function(){return Ck.apply(void 0,[e].concat(bt(l))),Tk.apply(void 0,[e].concat(bt(t.entered))),a()}))})),i.dispose}function Ok(){var e=ut((0,a.useState)(kk),1)[0];return(0,a.useEffect)((function(){return function(){return e.dispose()}}),[e]),e}function jk(e){var t=e.container,n=e.direction,r=e.classes,o=e.onStart,i=e.onStop,a=gk(),l=Ok(),u=mk(n);vk((function(){var e=kk();l.add(e.dispose);var n=t.current;if(n&&"idle"!==u.current&&a.current)return e.dispose(),o.current(u.current),e.add(Ek(n,r.current,"enter"===u.current,(function(){e.dispose(),i.current(u.current)}))),e.dispose}),[n])}function Pk(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=ut((0,a.useState)(e),2),n=t[0],r=t[1],o=(0,a.useCallback)((function(e){return r((function(t){return t|e}))}),[n]),i=(0,a.useCallback)((function(e){return Boolean(n&e)}),[n]),l=(0,a.useCallback)((function(e){return r((function(t){return t&~e}))}),[r]),u=(0,a.useCallback)((function(e){return r((function(t){return t^e}))}),[r]);return{flags:n,addFlag:o,hasFlag:i,removeFlag:l,toggleFlag:u}}var Ak=["beforeEnter","afterEnter","beforeLeave","afterLeave","enter","enterFrom","enterTo","entered","leave","leaveFrom","leaveTo"],Rk=["show","appear","unmount"];function Ik(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(" ").filter((function(e){return e.trim().length>1}))}var Mk=(0,a.createContext)(null);Mk.displayName="TransitionContext";var Dk=function(e){return e.Visible="visible",e.Hidden="hidden",e}(Dk||{});var Nk=(0,a.createContext)(null);function Lk(e){return"children"in e?Lk(e.children):e.current.filter((function(e){return null!==e.el.current})).filter((function(e){return"visible"===e.state})).length>0}function Fk(e,t){var n=mk(e),r=(0,a.useRef)([]),o=gk(),i=Ok(),l=bk((function(e){var t,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ek.Hidden,l=r.current.findIndex((function(t){return t.el===e}));-1!==l&&(Y_(a,(f(t={},ek.Unmount,(function(){r.current.splice(l,1)})),f(t,ek.Hidden,(function(){r.current[l].state="hidden"})),t)),i.microTask((function(){var e;!Lk(r)&&o.current&&(null==(e=n.current)||e.call(n))})))})),u=bk((function(e){var t=r.current.find((function(t){return t.el===e}));return t?"visible"!==t.state&&(t.state="visible"):r.current.push({el:e,state:"visible"}),function(){return l(e,ek.Unmount)}})),s=(0,a.useRef)([]),c=(0,a.useRef)(Promise.resolve()),d=(0,a.useRef)({enter:[],leave:[],idle:[]}),h=bk((function(e,n,r){s.current.splice(0),t&&(t.chains.current[n]=t.chains.current[n].filter((function(t){return ut(t,1)[0]!==e}))),null==t||t.chains.current[n].push([e,new Promise((function(e){s.current.push(e)}))]),null==t||t.chains.current[n].push([e,new Promise((function(e){Promise.all(d.current[n].map((function(e){var t=ut(e,2);t[0];return t[1]}))).then((function(){return e()}))}))]),"enter"===n?c.current=c.current.then((function(){return null==t?void 0:t.wait.current})).then((function(){return r(n)})):r(n)})),p=bk((function(e,t,n){Promise.all(d.current[t].splice(0).map((function(e){var t=ut(e,2);t[0];return t[1]}))).then((function(){var e;null==(e=s.current.shift())||e()})).then((function(){return n(t)}))}));return(0,a.useMemo)((function(){return{children:r,register:u,unregister:l,onStart:h,onStop:p,wait:c,chains:d}}),[u,l,r,h,p,d,c])}function zk(){}Nk.displayName="NestingContext";var Bk=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function Vk(e){var t,n,r={},o=mt(Bk);try{for(o.s();!(n=o.n()).done;){var i=n.value;r[i]=null!=(t=e[i])?t:zk}}catch(a){o.e(a)}finally{o.f()}return r}var Hk="div",Uk=Z_.RenderStrategy;var Wk,Gk=ok((function(e,t){var n=e.show,r=e.appear,o=void 0!==r&&r,i=e.unmount,l=p(e,Rk),u=(0,a.useRef)(null),s=Sk(u,t);yk();var c=sk();if(void 0===n&&null!==c&&(n=(c&uk.Open)===uk.Open),![!0,!1].includes(n))throw new Error("A is used but it is missing a `show={true | false}` prop.");var f=ut((0,a.useState)(n?"visible":"hidden"),2),d=f[0],v=f[1],g=Fk((function(){v("hidden")})),m=ut((0,a.useState)(!0),2),y=m[0],b=m[1],x=(0,a.useRef)([n]);vk((function(){!1!==y&&x.current[x.current.length-1]!==n&&(x.current.push(n),b(!1))}),[x,n]);var w=(0,a.useMemo)((function(){return{show:n,appear:o,initial:y}}),[n,o,y]);(0,a.useEffect)((function(){if(n)v("visible");else if(Lk(g)){var e=u.current;if(!e)return;var t=e.getBoundingClientRect();0===t.x&&0===t.y&&0===t.width&&0===t.height&&v("hidden")}else v("hidden")}),[n,g]);var S={unmount:i};return a.createElement(Nk.Provider,{value:g},a.createElement(Mk.Provider,{value:w},tk({ourProps:h(h({},S),{},{as:a.Fragment,children:a.createElement(qk,h(h({ref:s},S),l))}),theirProps:{},defaultTag:a.Fragment,features:Uk,visible:"visible"===d,name:"Transition"})))})),qk=ok((function(e,t){var n,r=e.beforeEnter,o=e.afterEnter,i=e.beforeLeave,l=e.afterLeave,u=e.enter,s=e.enterFrom,c=e.enterTo,d=e.entered,v=e.leave,g=e.leaveFrom,m=e.leaveTo,y=p(e,Ak),b=(0,a.useRef)(null),x=Sk(b,t),w=y.unmount?ek.Unmount:ek.Hidden,S=function(){var e=(0,a.useContext)(Mk);if(null===e)throw new Error("A is used but it is missing a parent or .");return e}(),_=S.show,k=S.appear,T=S.initial,C=ut((0,a.useState)(_?"visible":"hidden"),2),E=C[0],O=C[1],j=function(){var e=(0,a.useContext)(Nk);if(null===e)throw new Error("A is used but it is missing a parent or .");return e}(),P=j.register,A=j.unregister,R=(0,a.useRef)(null);(0,a.useEffect)((function(){return P(b)}),[P,b]),(0,a.useEffect)((function(){var e;if(w===ek.Hidden&&b.current)return _&&"visible"!==E?void O("visible"):Y_(E,(f(e={},"hidden",(function(){return A(b)})),f(e,"visible",(function(){return P(b)})),e))}),[E,b,P,A,_,w]);var I=mk({enter:Ik(u),enterFrom:Ik(s),enterTo:Ik(c),entered:Ik(d),leave:Ik(v),leaveFrom:Ik(g),leaveTo:Ik(m)}),M=function(e){var t=(0,a.useRef)(Vk(e));return(0,a.useEffect)((function(){t.current=Vk(e)}),[e]),t}({beforeEnter:r,afterEnter:o,beforeLeave:i,afterLeave:l}),D=yk();(0,a.useEffect)((function(){if(D&&"visible"===E&&null===b.current)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}),[b,E,D]);var N=T&&!k,L=!D||N||R.current===_?"idle":_?"enter":"leave",F=Pk(0),z=bk((function(e){return Y_(e,{enter:function(){F.addFlag(uk.Opening),M.current.beforeEnter()},leave:function(){F.addFlag(uk.Closing),M.current.beforeLeave()},idle:function(){}})})),B=bk((function(e){return Y_(e,{enter:function(){F.removeFlag(uk.Opening),M.current.afterEnter()},leave:function(){F.removeFlag(uk.Closing),M.current.afterLeave()},idle:function(){}})})),V=Fk((function(){O("hidden"),A(b)}),j);jk({container:b,classes:I,direction:L,onStart:mk((function(e){V.onStart(b,e,z)})),onStop:mk((function(e){V.onStop(b,e,B),"leave"===e&&!Lk(V)&&(O("hidden"),A(b))}))}),(0,a.useEffect)((function(){N&&(w===ek.Hidden?R.current=null:R.current=_)}),[_,N,E]);var H=y,U={ref:x};return k&&_&&pk.isServer&&(H=h(h({},H),{},{className:$_.apply(void 0,[y.className].concat(bt(I.current.enter),bt(I.current.enterFrom)))})),a.createElement(Nk.Provider,{value:V},a.createElement(ck,{value:Y_(E,(n={},f(n,"visible",uk.Open),f(n,"hidden",uk.Closed),n))|F.flags},tk({ourProps:U,theirProps:H,defaultTag:Hk,features:Uk,visible:"visible"===E,name:"Transition.Child"})))})),Qk=ok((function(e,t){var n=null!==(0,a.useContext)(Mk),r=null!==sk();return a.createElement(a.Fragment,null,!n&&r?a.createElement(Gk,h({ref:t},e)):a.createElement(qk,h({ref:t},e)))})),$k=Object.assign(Gk,{Child:Qk,Root:Gk}),Yk=function(e){return e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e}(Yk||{});function Kk(e){for(var t=e.parentElement,n=null;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;var r=""===(null==t?void 0:t.getAttribute("disabled"));return(!r||!function(e){if(!e)return!1;for(var t=e.previousElementSibling;null!==t;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}(n))&&r}var Xk=null!=(Wk=a.useId)?Wk:function(){var e=yk(),t=ut(a.useState(e?function(){return pk.nextId()}:null),2),n=t[0],r=t[1];return vk((function(){null===n&&r(pk.nextId())}),[n]),null!=n?""+n:void 0},Jk=["features"],Zk="div",eT=function(e){return e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e}(eT||{});var tT=ok((function(e,t){var n=e.features,r=void 0===n?1:n,o=p(e,Jk);return tk({ourProps:{ref:t,"aria-hidden":2===(2&r)||void 0,style:h({position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},4===(4&r)&&2!==(2&r)&&{display:"none"})},theirProps:o,slot:{},defaultTag:Zk,name:"Hidden"})}));function nT(e){return pk.isServer?null:e instanceof Node?e.ownerDocument:null!=e&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}var rT=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map((function(e){return"".concat(e,":not([tabindex='-1'])")})).join(","),oT=function(e){return e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e}(oT||{}),iT=function(e){return e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e}(iT||{}),aT=function(e){return e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e}(aT||{});function lT(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body;return null==e?[]:Array.from(e.querySelectorAll(rT)).sort((function(e,t){return Math.sign((e.tabIndex||Number.MAX_SAFE_INTEGER)-(t.tabIndex||Number.MAX_SAFE_INTEGER))}))}var uT=function(e){return e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e}(uT||{});function sT(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e!==(null==(n=nT(e))?void 0:n.body)&&Y_(r,(f(t={},0,(function(){return e.matches(rT)})),f(t,1,(function(){for(var t=e;null!==t;){if(t.matches(rT))return!0;t=t.parentElement}return!1})),t))}function cT(e){null==e||e.focus({preventScroll:!0})}var fT=["textarea","input"].join(",");function dT(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(e){return e};return e.slice().sort((function(e,n){var r=t(e),o=t(n);if(null===r||null===o)return 0;var i=r.compareDocumentPosition(o);return i&Node.DOCUMENT_POSITION_FOLLOWING?-1:i&Node.DOCUMENT_POSITION_PRECEDING?1:0}))}function hT(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.sorted,o=void 0===r||r,i=n.relativeTo,a=void 0===i?null:i,l=n.skipElements,u=void 0===l?[]:l,s=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,c=Array.isArray(e)?o?dT(e):e:lT(e);u.length>0&&c.length>1&&(c=c.filter((function(e){return!u.includes(e)}))),a=null!=a?a:s.activeElement;var f,d=function(){if(5&t)return 1;if(10&t)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),h=function(){if(1&t)return 0;if(2&t)return Math.max(0,c.indexOf(a))-1;if(4&t)return Math.max(0,c.indexOf(a))+1;if(8&t)return c.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")}(),p=32&t?{preventScroll:!0}:{},v=0,g=c.length;do{if(v>=g||v+g<=0)return 0;var m=h+v;if(16&t)m=(m+g)%g;else{if(m<0)return 3;if(m>=g)return 1}null==(f=c[m])||f.focus(p),v+=d}while(f!==s.activeElement);return 6&t&&function(e){var t,n;return null!=(n=null==(t=null==e?void 0:e.matches)?void 0:t.call(e,fT))&&n}(f)&&f.select(),f.hasAttribute("tabindex")||f.setAttribute("tabindex","0"),2}var pT=function(e){return e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e}(pT||{});function vT(){var e=(0,a.useRef)(0);return function(e,t,n){var r=mk(t);(0,a.useEffect)((function(){function t(e){r.current(e)}return window.addEventListener(e,t,n),function(){return window.removeEventListener(e,t,n)}}),[e,n])}("keydown",(function(t){"Tab"===t.key&&(e.current=t.shiftKey?1:0)}),!0),e}function gT(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0])||arguments[0],t=(0,a.useRef)(TT.slice());return yT((function(e,n){var r=ut(e,1)[0],o=ut(n,1)[0];!0===o&&!1===r&&_k((function(){t.current.splice(0)})),!1===o&&!0===r&&(t.current=TT.slice())}),[e,TT,t]),bk((function(){var e;return null!=(e=t.current.find((function(e){return null!=e&&e.isConnected})))?e:null}))}(t);yT((function(){t||(null==n?void 0:n.activeElement)===(null==n?void 0:n.body)&&cT(r())}),[t]);var o=(0,a.useRef)(!1);(0,a.useEffect)((function(){return o.current=!1,function(){o.current=!0,_k((function(){o.current&&cT(r())}))}}),[])}({ownerDocument:c},Boolean(16&u));var d=function(e,t){var n=e.ownerDocument,r=e.container,o=e.initialFocus,i=(0,a.useRef)(null),l=gk();return yT((function(){if(t){var e=r.current;e&&_k((function(){if(l.current){var t=null==n?void 0:n.activeElement;if(null!=o&&o.current){if((null==o?void 0:o.current)===t)return void(i.current=t)}else if(e.contains(t))return void(i.current=t);null!=o&&o.current?cT(o.current):hT(e,oT.First)===iT.Error&&console.warn("There are no focusable elements inside the "),i.current=null==n?void 0:n.activeElement}}))}}),[t]),i}({ownerDocument:c,container:n,initialFocus:o},Boolean(2&u));!function(e,t){var n=e.ownerDocument,r=e.container,o=e.containers,i=e.previousActiveElement,a=gk();mT(null==n?void 0:n.defaultView,"focus",(function(e){if(t&&a.current){var n=xT(o);r.current instanceof HTMLElement&&n.add(r.current);var l=i.current;if(l){var u=e.target;u&&u instanceof HTMLElement?ET(n,u)?(i.current=u,cT(u)):(e.preventDefault(),e.stopPropagation(),cT(l)):cT(i.current)}}}),!0)}({ownerDocument:c,container:n,containers:i,previousActiveElement:d},Boolean(8&u));var h=vT(),v=bk((function(e){var t=n.current;t&&function(){var n;Y_(h.current,(f(n={},pT.Forwards,(function(){hT(t,oT.First,{skipElements:[e.relatedTarget]})})),f(n,pT.Backwards,(function(){hT(t,oT.Last,{skipElements:[e.relatedTarget]})})),n))}()})),g=Ok(),m=(0,a.useRef)(!1),y={ref:r,onKeyDown:function(e){"Tab"==e.key&&(m.current=!0,g.requestAnimationFrame((function(){m.current=!1})))},onBlur:function(e){var t,r=xT(i);n.current instanceof HTMLElement&&r.add(n.current);var o=e.relatedTarget;o instanceof HTMLElement&&"true"!==o.dataset.headlessuiFocusGuard&&(ET(r,o)||(m.current?hT(n.current,Y_(h.current,(f(t={},pT.Forwards,(function(){return oT.Next})),f(t,pT.Backwards,(function(){return oT.Previous})),t))|oT.WrapAround,{relativeTo:e.target}):e.target instanceof HTMLElement&&cT(e.target)))}};return a.createElement(a.Fragment,null,Boolean(4&u)&&a.createElement(tT,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:eT.Focusable}),tk({ourProps:y,theirProps:s,defaultTag:wT,name:"FocusTrap"}),Boolean(4&u)&&a.createElement(tT,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:v,features:eT.Focusable}))})),kT=Object.assign(_T,{features:ST}),TT=[];if("undefined"!=typeof window&&"undefined"!=typeof document){var CT=function(e){e.target instanceof HTMLElement&&e.target!==document.body&&TT[0]!==e.target&&(TT.unshift(e.target),(TT=TT.filter((function(e){return null!=e&&e.isConnected}))).splice(10))};window.addEventListener("click",CT,{capture:!0}),window.addEventListener("mousedown",CT,{capture:!0}),window.addEventListener("focus",CT,{capture:!0}),document.body.addEventListener("click",CT,{capture:!0}),document.body.addEventListener("mousedown",CT,{capture:!0}),document.body.addEventListener("focus",CT,{capture:!0})}function ET(e,t){var n,r=mt(e);try{for(r.s();!(n=r.n()).done;){if(n.value.contains(t))return!0}}catch(o){r.e(o)}finally{r.f()}return!1}var OT=(0,a.createContext)(!1);function jT(e){return a.createElement(OT.Provider,{value:e.force},e.children)}var PT=["target"];function AT(e){var t=(0,a.useContext)(OT),n=(0,a.useContext)(MT),r=gT(e),o=(0,a.useState)((function(){if(!t&&null!==n||pk.isServer)return null;var e=null==r?void 0:r.getElementById("headlessui-portal-root");if(e)return e;if(null===r)return null;var o=r.createElement("div");return o.setAttribute("id","headlessui-portal-root"),r.body.appendChild(o)})),i=ut(o,2),l=i[0],u=i[1];return(0,a.useEffect)((function(){null!==l&&(null!=r&&r.body.contains(l)||null==r||r.body.appendChild(l))}),[l,r]),(0,a.useEffect)((function(){t||null!==n&&u(n.current)}),[n,u,t]),l}var RT=a.Fragment;var IT=a.Fragment,MT=(0,a.createContext)(null);var DT=ok((function(e,t){var n=e,r=(0,a.useRef)(null),o=Sk(wk((function(e){r.current=e})),t),i=gT(r),l=AT(r),u=(0,a.useState)((function(){var e;return pk.isServer?null:null!=(e=null==i?void 0:i.createElement("div"))?e:null})),s=ut(u,1)[0],c=yk(),f=(0,a.useRef)(!1);return vk((function(){if(f.current=!1,l&&s)return l.contains(s)||(s.setAttribute("data-headlessui-portal",""),l.appendChild(s)),function(){f.current=!0,_k((function(){var e;f.current&&(!l||!s||(s instanceof Node&&l.contains(s)&&l.removeChild(s),l.childNodes.length<=0&&(null==(e=l.parentElement)||e.removeChild(l))))}))}}),[l,s]),c&&l&&s?(0,$x.createPortal)(tk({ourProps:{ref:o},theirProps:n,defaultTag:RT,name:"Portal"}),s):null})),NT=ok((function(e,t){var n=e.target,r=p(e,PT),o={ref:Sk(t)};return a.createElement(MT.Provider,{value:n},tk({ourProps:o,theirProps:r,defaultTag:IT,name:"Popover.Group"}))})),LT=Object.assign(DT,{Group:NT}),FT=["id"],zT=(0,a.createContext)(null);function BT(){var e=(0,a.useContext)(zT);if(null===e){var t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,BT),t}return e}function VT(){var e=ut((0,a.useState)([]),2),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,a.useMemo)((function(){return function(e){var t=bk((function(e){return n((function(t){return[].concat(bt(t),[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}})),r=(0,a.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return a.createElement(zT.Provider,{value:r},e.children)}}),[n])]}var HT="p";var UT=ok((function(e,t){var n=Xk(),r=e.id,o=void 0===r?"headlessui-description-".concat(n):r,i=p(e,FT),a=BT(),l=Sk(t);return vk((function(){return a.register(o)}),[o,a.register]),tk({ourProps:h(h({ref:l},a.props),{},{id:o}),theirProps:i,slot:a.slot||{},defaultTag:HT,name:a.name||"Description"})})),WT=Object.assign(UT,{}),GT=(0,a.createContext)((function(){}));GT.displayName="StackContext";var qT=function(e){return e[e.Add=0]="Add",e[e.Remove=1]="Remove",e}(qT||{});function QT(e){var t=e.children,n=e.onUpdate,r=e.type,o=e.element,i=e.enabled,l=(0,a.useContext)(GT),u=bk((function(){null==n||n.apply(void 0,arguments),l.apply(void 0,arguments)}));return vk((function(){var e=void 0===i||!0===i;return e&&u(0,r,o),function(){e&&u(1,r,o)}}),[u,r,o,i]),a.createElement(GT.Provider,{value:u},t)}function $T(e,t,n){var r=mk(t);(0,a.useEffect)((function(){function t(e){r.current(e)}return document.addEventListener(e,t,n),function(){return document.removeEventListener(e,t,n)}}),[e,n])}var YT="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t},KT=a.useState,XT=a.useEffect,JT=a.useLayoutEffect,ZT=a.useDebugValue;function eC(e){var t=e.getSnapshot,n=e.value;try{var r=t();return!YT(n,r)}catch(o){return!0}}"undefined"!=typeof window&&"undefined"!=typeof window.document&&window.document.createElement;var tC=function(e){return e.useSyncExternalStore}(l);function nC(){var e;return{before:function(t){var n,r=t.doc,o=r.documentElement;e=(null!=(n=r.defaultView)?n:window).innerWidth-o.clientWidth},after:function(t){var n=t.doc,r=t.d,o=n.documentElement,i=o.clientWidth-o.offsetWidth,a=e-i;r.style(o,"paddingRight","".concat(a,"px"))}}}function rC(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function oC(){return rC()?{before:function(){e=window.pageYOffset},after:function(t){var n=t.doc,r=t.d,o=t.meta;function i(e){return o.containers.flatMap((function(e){return e()})).some((function(t){return t.contains(e)}))}r.style(n.body,"marginTop","-".concat(e,"px")),window.scrollTo(0,0);var a=null;r.addEventListener(n,"click",(function(e){if(e.target instanceof HTMLElement)try{var t=e.target.closest("a");if(!t)return;var r=new URL(t.href).hash,o=n.querySelector(r);o&&!i(o)&&(a=o)}catch(l){}}),!0),r.addEventListener(n,"touchmove",(function(e){e.target instanceof HTMLElement&&!i(e.target)&&e.preventDefault()}),{passive:!1}),r.add((function(){window.scrollTo(0,window.pageYOffset+e),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)}))}}:{};var e}function iC(e){var t,n={},r=mt(e);try{for(r.s();!(t=r.n()).done;){var o=t.value;Object.assign(n,o(n))}}catch(i){r.e(i)}finally{r.f()}return n}var aC=function(e,t){var n=e(),r=new Set;return{getSnapshot:function(){return n},subscribe:function(e){return r.add(e),function(){return r.delete(e)}},dispatch:function(e){for(var o,i=arguments.length,a=new Array(i>1?i-1:0),l=1;l0;return vk((function(){if(e&&t)return aC.dispatch("PUSH",e,n),function(){return aC.dispatch("POP",e,n)}}),[t,e]),i}aC.subscribe((function(){var e,t=aC.getSnapshot(),n=new Map,r=mt(t);try{for(r.s();!(e=r.n()).done;){var o=ut(e.value,1)[0];n.set(o,o.documentElement.style.overflow)}}catch(c){r.e(c)}finally{r.f()}var i,a=mt(t.values());try{for(a.s();!(i=a.n()).done;){var l=i.value,u="hidden"===n.get(l.doc),s=0!==l.count;(s&&!u||!s&&u)&&aC.dispatch(l.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",l),0===l.count&&aC.dispatch("TEARDOWN",l)}}catch(c){a.e(c)}finally{a.f()}}));var uC=new Map,sC=new Map;function cC(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];vk((function(){var n;if(t){var r="function"==typeof e?e():e.current;if(r){var o=null!=(n=sC.get(r))?n:0;return sC.set(r,o+1),0!==o||(uC.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0),function(){var e;if(r){var t=null!=(e=sC.get(r))?e:1;if(1===t?sC.delete(r):sC.set(r,t-1),1===t){var n=uC.get(r);n&&(null===n["aria-hidden"]?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",n["aria-hidden"]),r.inert=n.inert,uC.delete(r))}}}}}}),[e,t])}var fC=["id","open","onClose","initialFocus","__demoMode"],dC=["id"],hC=["id"],pC=["id"],vC=["id"],gC=function(e){return e[e.Open=0]="Open",e[e.Closed=1]="Closed",e}(gC||{}),mC=function(e){return e[e.SetTitleId=0]="SetTitleId",e}(mC||{}),yC=f({},0,(function(e,t){return e.titleId===t.id?e:h(h({},e),{},{titleId:t.id})})),bC=(0,a.createContext)(null);function xC(e){var t=(0,a.useContext)(bC);if(null===t){var n=new Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(n,xC),n}return t}function wC(e,t){return Y_(t.type,yC,e,t)}bC.displayName="DialogContext";var SC="div",_C=Z_.RenderStrategy|Z_.Static;var kC="div";var TC="div";var CC="div";var EC="h2";var OC=ok((function(e,t){var n=Xk(),r=e.id,o=void 0===r?"headlessui-dialog-".concat(n):r,i=e.open,l=e.onClose,u=e.initialFocus,s=e.__demoMode,c=void 0!==s&&s,d=p(e,fC),h=ut((0,a.useState)(0),2),v=h[0],g=h[1],m=sk();void 0===i&&null!==m&&(i=(m&uk.Open)===uk.Open);var y=(0,a.useRef)(null),b=Sk(y,t),x=(0,a.useRef)(null),w=gT(y),S=e.hasOwnProperty("open")||null!==m,_=e.hasOwnProperty("onClose");if(!S&&!_)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!S)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!_)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if("boolean"!=typeof i)throw new Error("You provided an `open` prop to the `Dialog`, but the value is not a boolean. Received: ".concat(i));if("function"!=typeof l)throw new Error("You provided an `onClose` prop to the `Dialog`, but the value is not a function. Received: ".concat(l));var k=i?0:1,T=ut((0,a.useReducer)(wC,{titleId:null,descriptionId:null,panelRef:(0,a.createRef)()}),2),C=T[0],E=T[1],O=bk((function(){return l(!1)})),j=bk((function(e){return E({type:0,id:e})})),P=!!yk()&&(!c&&0===k),A=v>1,R=null!==(0,a.useContext)(bC),I=A?"parent":"leaf",M=null!==m&&(m&uk.Closing)===uk.Closing,D=!R&&!M&&P,N=(0,a.useCallback)((function(){var e,t;return null!=(t=Array.from(null!=(e=null==w?void 0:w.querySelectorAll("body > *"))?e:[]).find((function(e){return"headlessui-portal-root"!==e.id&&(e.contains(x.current)&&e instanceof HTMLElement)})))?t:null}),[x]);cC(N,D);var L=!!A||P,F=(0,a.useCallback)((function(){var e,t;return null!=(t=Array.from(null!=(e=null==w?void 0:w.querySelectorAll("[data-headlessui-portal]"))?e:[]).find((function(e){return e.contains(x.current)&&e instanceof HTMLElement})))?t:null}),[x]);cC(F,L);var z=bk((function(){var e,t;return[].concat(bt(Array.from(null!=(e=null==w?void 0:w.querySelectorAll("html > *, body > *, [data-headlessui-portal]"))?e:[]).filter((function(e){return!(e===document.body||e===document.head||!(e instanceof HTMLElement)||e.contains(x.current)||C.panelRef.current&&e.contains(C.panelRef.current))}))),[null!=(t=C.panelRef.current)?t:y.current])}));!function(e,t){var n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=(0,a.useRef)(!1);function o(n,o){if(r.current&&!n.defaultPrevented){var i=function e(t){return"function"==typeof t?e(t()):Array.isArray(t)||t instanceof Set?t:[t]}(e),a=o(n);if(null!==a&&a.getRootNode().contains(a)){var l,u=mt(i);try{for(u.s();!(l=u.n()).done;){var s=l.value;if(null!==s){var c=s instanceof HTMLElement?s:s.current;if(null!=c&&c.contains(a)||n.composed&&n.composedPath().includes(c))return}}}catch(f){u.e(f)}finally{u.f()}return!sT(a,uT.Loose)&&-1!==a.tabIndex&&n.preventDefault(),t(n,a)}}}(0,a.useEffect)((function(){requestAnimationFrame((function(){r.current=n}))}),[n]);var i=(0,a.useRef)(null);$T("mousedown",(function(e){var t,n;r.current&&(i.current=(null==(n=null==(t=e.composedPath)?void 0:t.call(e))?void 0:n[0])||e.target)}),!0),$T("click",(function(e){i.current&&(o(e,(function(){return i.current})),i.current=null)}),!0),$T("blur",(function(e){return o(e,(function(){return window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null}))}),!0)}((function(){return z()}),O,!(!P||A));var B=!(A||0!==k);mT(null==w?void 0:w.defaultView,"keydown",(function(e){B&&(e.defaultPrevented||e.key===Yk.Escape&&(e.preventDefault(),e.stopPropagation(),O()))})),function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:function(){return[document.body]};lC(e,t,(function(e){var t;return{containers:[].concat(bt(null!=(t=e.containers)?t:[]),[n])}}))}(w,!(M||0!==k||R),z),(0,a.useEffect)((function(){if(0===k&&y.current){var e=new ResizeObserver((function(e){var t,n=mt(e);try{for(n.s();!(t=n.n()).done;){var r=t.value.target.getBoundingClientRect();0===r.x&&0===r.y&&0===r.width&&0===r.height&&O()}}catch(o){n.e(o)}finally{n.f()}}));return e.observe(y.current),function(){return e.disconnect()}}}),[k,y,O]);var V=ut(VT(),2),H=V[0],U=V[1],W=(0,a.useMemo)((function(){return[{dialogState:k,close:O,setTitleId:j},C]}),[k,C,O,j]),G=(0,a.useMemo)((function(){return{open:0===k}}),[k]),q={ref:b,id:o,role:"dialog","aria-modal":0===k||void 0,"aria-labelledby":C.titleId,"aria-describedby":H};return a.createElement(QT,{type:"Dialog",enabled:0===k,element:y,onUpdate:bk((function(e,t){var n;"Dialog"===t&&Y_(e,(f(n={},qT.Add,(function(){return g((function(e){return e+1}))})),f(n,qT.Remove,(function(){return g((function(e){return e-1}))})),n))}))},a.createElement(jT,{force:!0},a.createElement(LT,null,a.createElement(bC.Provider,{value:W},a.createElement(LT.Group,{target:y},a.createElement(jT,{force:!1},a.createElement(U,{slot:G,name:"Dialog.Description"},a.createElement(kT,{initialFocus:u,containers:z,features:P?Y_(I,{parent:kT.features.RestoreFocus,leaf:kT.features.All&~kT.features.FocusLock}):kT.features.None},tk({ourProps:q,theirProps:d,slot:G,defaultTag:SC,features:_C,visible:0===k,name:"Dialog"})))))))),a.createElement(tT,{features:eT.Hidden,ref:x}))})),jC=ok((function(e,t){var n=Xk(),r=e.id,o=void 0===r?"headlessui-dialog-backdrop-".concat(n):r,i=p(e,hC),l=ut(xC("Dialog.Backdrop"),2),u=l[0].dialogState,s=l[1],c=Sk(t);(0,a.useEffect)((function(){if(null===s.panelRef.current)throw new Error("A component is being used, but a component is missing.")}),[s.panelRef]);var f=(0,a.useMemo)((function(){return{open:0===u}}),[u]);return a.createElement(jT,{force:!0},a.createElement(LT,null,tk({ourProps:{ref:c,id:o,"aria-hidden":!0},theirProps:i,slot:f,defaultTag:TC,name:"Dialog.Backdrop"})))})),PC=ok((function(e,t){var n=Xk(),r=e.id,o=void 0===r?"headlessui-dialog-panel-".concat(n):r,i=p(e,pC),l=ut(xC("Dialog.Panel"),2),u=l[0].dialogState,s=Sk(t,l[1].panelRef),c=(0,a.useMemo)((function(){return{open:0===u}}),[u]);return tk({ourProps:{ref:s,id:o,onClick:bk((function(e){e.stopPropagation()}))},theirProps:i,slot:c,defaultTag:CC,name:"Dialog.Panel"})})),AC=ok((function(e,t){var n=Xk(),r=e.id,o=void 0===r?"headlessui-dialog-overlay-".concat(n):r,i=p(e,dC),l=ut(xC("Dialog.Overlay"),1)[0],u=l.dialogState,s=l.close;return tk({ourProps:{ref:Sk(t),id:o,"aria-hidden":!0,onClick:bk((function(e){if(e.target===e.currentTarget){if(Kk(e.currentTarget))return e.preventDefault();e.preventDefault(),e.stopPropagation(),s()}}))},theirProps:i,slot:(0,a.useMemo)((function(){return{open:0===u}}),[u]),defaultTag:kC,name:"Dialog.Overlay"})})),RC=ok((function(e,t){var n=Xk(),r=e.id,o=void 0===r?"headlessui-dialog-title-".concat(n):r,i=p(e,vC),l=ut(xC("Dialog.Title"),1)[0],u=l.dialogState,s=l.setTitleId,c=Sk(t);(0,a.useEffect)((function(){return s(o),function(){return s(null)}}),[o,s]);var f=(0,a.useMemo)((function(){return{open:0===u}}),[u]);return tk({ourProps:{ref:c,id:o},theirProps:i,slot:f,defaultTag:EC,name:"Dialog.Title"})})),IC=Object.assign(OC,{Backdrop:jC,Panel:PC,Overlay:AC,Title:RC,Description:WT}),MC=n(1242),DC=n(1597),NC=n(8831),LC=n(7995),FC=n(4350),zC=n(2297),BC=n(2150),VC=n(7907),HC=n(1423),UC=n.p+"static/media/eldrich.a80c74e8249d2461e174.png",WC=function(e){return e.Current="CURRENT",e.Upcoming="UPCOMING",e.Complete="COMPLETE",e}({}),GC=function(e){return e.dashboard="Dashboard",e.quests="Quest history",e.documentation="Documentation",e.playground="API Playground",e.tasks="Quest tasks",e.createQuest="Create new quest",e.hosts="Hosts",e}({}),qC=function(e){return e.Windows="PLATFORM_WINDOWS",e.Linux="PLATFORM_LINUX",e.MacOS="PLATFORM_MACOS",e.BSD="PLATFORM_BSD",e.Unknown="PLATFORM_UNSPECIFIED",e}({}),QC=function(e){return e[e.TaskRowLimit=8]="TaskRowLimit",e}({}),$C=function(e){return e.root="root",e.Administrator="Administrator",e.SYSTEM="SYSTEM",e}({});function YC(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function KC(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}var XC=/\r\n|[\n\r]/g;function JC(e,t){var n,r=0,o=1,i=mt(e.body.matchAll(XC));try{for(i.s();!(n=i.n()).done;){var a=n.value;if("number"===typeof a.index||KC(!1),a.index>=t)break;r=a.index+a[0].length,o+=1}}catch(l){i.e(l)}finally{i.f()}return{line:o,column:t+1-r}}function ZC(e){return eE(e.source,JC(e.source,e.start))}function eE(e,t){var n=e.locationOffset.column-1,r="".padStart(n)+e.body,o=t.line-1,i=e.locationOffset.line-1,a=t.line+i,l=1===t.line?n:0,u=t.column+l,s="".concat(e.name,":").concat(a,":").concat(u,"\n"),c=r.split(/\r\n|[\n\r]/g),f=c[o];if(f.length>120){for(var d=Math.floor(u/80),h=u%80,p=[],v=0;v1?l-1:0),s=1;s0&&(e.extensions=this.extensions),e}}]),r}(wi(Error),Symbol.toStringTag);function rE(e){return void 0===e||0===e.length?void 0:e}function oE(e,t,n){return new nE("Syntax Error: ".concat(n),{source:e,positions:[t]})}var iE,aE,lE,uE,sE=function(e){function t(e,n,r){pi(this,t),this.start=e.start,this.end=n.end,this.startToken=e,this.endToken=n,this.source=r}return hi(t,[{key:Symbol.toStringTag,get:function(){return"Location"}},{key:"toJSON",value:function(){return{start:this.start,end:this.end}}}]),t}(),cE=function(e){function t(e,n,r,o,i,a){pi(this,t),this.kind=e,this.start=n,this.end=r,this.line=o,this.column=i,this.value=a,this.prev=null,this.next=null}return hi(t,[{key:Symbol.toStringTag,get:function(){return"Token"}},{key:"toJSON",value:function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}]),t}(),fE={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},dE=new Set(Object.keys(fE));function hE(e){var t=null===e||void 0===e?void 0:e.kind;return"string"===typeof t&&dE.has(t)}function pE(e){return 9===e||32===e}function vE(e){return e>=48&&e<=57}function gE(e){return e>=97&&e<=122||e>=65&&e<=90}function mE(e){return gE(e)||95===e}function yE(e){return gE(e)||vE(e)||95===e}function bE(e){for(var t,n=Number.MAX_SAFE_INTEGER,r=null,o=-1,i=0;i",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"}(uE||(uE={}));var wE=function(e){function t(e){pi(this,t);var n=new cE(uE.SOF,0,0,0,0);this.source=e,this.lastToken=n,this.token=n,this.line=1,this.lineStart=0}return hi(t,[{key:Symbol.toStringTag,get:function(){return"Lexer"}},{key:"advance",value:function(){return this.lastToken=this.token,this.token=this.lookahead()}},{key:"lookahead",value:function(){var e=this.token;if(e.kind!==uE.EOF)do{if(e.next)e=e.next;else{var t=OE(this,e.end);e.next=t,t.prev=e,e=t}}while(e.kind===uE.COMMENT);return e}}]),t}();function SE(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function _E(e,t){return kE(e.charCodeAt(t))&&TE(e.charCodeAt(t+1))}function kE(e){return e>=55296&&e<=56319}function TE(e){return e>=56320&&e<=57343}function CE(e,t){var n=e.source.body.codePointAt(t);if(void 0===n)return uE.EOF;if(n>=32&&n<=126){var r=String.fromCodePoint(n);return'"'===r?"'\"'":'"'.concat(r,'"')}return"U+"+n.toString(16).toUpperCase().padStart(4,"0")}function EE(e,t,n,r,o){var i=e.line,a=1+n-e.lineStart;return new cE(t,n,r,i,a,o)}function OE(e,t){for(var n=e.source.body,r=n.length,o=t;o=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function LE(e,t){var n=e.source.body;switch(n.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:"\n",size:2};case 114:return{value:"\r",size:2};case 116:return{value:"\t",size:2}}throw oE(e.source,t,'Invalid character escape sequence: "'.concat(n.slice(t,t+2),'".'))}function FE(e,t){for(var n=e.source.body,r=n.length,o=e.lineStart,i=t+3,a=i,l="",u=[];iHE)return"[Array]";for(var n=Math.min(VE,e.length),r=e.length-n,o=[],i=0;i1&&o.push("... ".concat(r," more items"));return"["+o.join(", ")+"]"}(e,n);return function(e,t){var n=Object.entries(e);if(0===n.length)return"{}";if(t.length>HE)return"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"===typeof e.constructor){var n=e.constructor.name;if("string"===typeof n&&""!==n)return n}return t}(e)+"]";var r=n.map((function(e){var n=ut(e,2);return n[0]+": "+WE(n[1],t)}));return"{ "+r.join(", ")+" }"}(e,n)}(e,t);default:return String(e)}}var GE=function(e,t){return e instanceof t},qE=function(e){function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};pi(this,t),"string"===typeof e||BE(!1,"Body must be a string. Received: ".concat(UE(e),".")),this.body=e,this.name=n,this.locationOffset=r,this.locationOffset.line>0||BE(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||BE(!1,"column in locationOffset is 1-indexed and must be positive.")}return hi(t,[{key:Symbol.toStringTag,get:function(){return"Source"}}]),t}();var QE=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};pi(this,e);var r=function(e){return GE(e,qE)}(t)?t:new qE(t);this._lexer=new wE(r),this._options=n,this._tokenCounter=0}return hi(e,[{key:"parseName",value:function(){var e=this.expectToken(uE.NAME);return this.node(e,{kind:lE.NAME,value:e.value})}},{key:"parseDocument",value:function(){return this.node(this._lexer.token,{kind:lE.DOCUMENT,definitions:this.many(uE.SOF,this.parseDefinition,uE.EOF)})}},{key:"parseDefinition",value:function(){if(this.peek(uE.BRACE_L))return this.parseOperationDefinition();var e=this.peekDescription(),t=e?this._lexer.lookahead():this._lexer.token;if(t.kind===uE.NAME){switch(t.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(e)throw oE(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(t.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(t)}},{key:"parseOperationDefinition",value:function(){var e=this._lexer.token;if(this.peek(uE.BRACE_L))return this.node(e,{kind:lE.OPERATION_DEFINITION,operation:iE.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});var t,n=this.parseOperationType();return this.peek(uE.NAME)&&(t=this.parseName()),this.node(e,{kind:lE.OPERATION_DEFINITION,operation:n,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}},{key:"parseOperationType",value:function(){var e=this.expectToken(uE.NAME);switch(e.value){case"query":return iE.QUERY;case"mutation":return iE.MUTATION;case"subscription":return iE.SUBSCRIPTION}throw this.unexpected(e)}},{key:"parseVariableDefinitions",value:function(){return this.optionalMany(uE.PAREN_L,this.parseVariableDefinition,uE.PAREN_R)}},{key:"parseVariableDefinition",value:function(){return this.node(this._lexer.token,{kind:lE.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(uE.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(uE.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}},{key:"parseVariable",value:function(){var e=this._lexer.token;return this.expectToken(uE.DOLLAR),this.node(e,{kind:lE.VARIABLE,name:this.parseName()})}},{key:"parseSelectionSet",value:function(){return this.node(this._lexer.token,{kind:lE.SELECTION_SET,selections:this.many(uE.BRACE_L,this.parseSelection,uE.BRACE_R)})}},{key:"parseSelection",value:function(){return this.peek(uE.SPREAD)?this.parseFragment():this.parseField()}},{key:"parseField",value:function(){var e,t,n=this._lexer.token,r=this.parseName();return this.expectOptionalToken(uE.COLON)?(e=r,t=this.parseName()):t=r,this.node(n,{kind:lE.FIELD,alias:e,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(uE.BRACE_L)?this.parseSelectionSet():void 0})}},{key:"parseArguments",value:function(e){var t=e?this.parseConstArgument:this.parseArgument;return this.optionalMany(uE.PAREN_L,t,uE.PAREN_R)}},{key:"parseArgument",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this._lexer.token,n=this.parseName();return this.expectToken(uE.COLON),this.node(t,{kind:lE.ARGUMENT,name:n,value:this.parseValueLiteral(e)})}},{key:"parseConstArgument",value:function(){return this.parseArgument(!0)}},{key:"parseFragment",value:function(){var e=this._lexer.token;this.expectToken(uE.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(uE.NAME)?this.node(e,{kind:lE.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(e,{kind:lE.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}},{key:"parseFragmentDefinition",value:function(){var e=this._lexer.token;return this.expectKeyword("fragment"),!0===this._options.allowLegacyFragmentVariables?this.node(e,{kind:lE.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(e,{kind:lE.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}},{key:"parseFragmentName",value:function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()}},{key:"parseValueLiteral",value:function(e){var t=this._lexer.token;switch(t.kind){case uE.BRACKET_L:return this.parseList(e);case uE.BRACE_L:return this.parseObject(e);case uE.INT:return this.advanceLexer(),this.node(t,{kind:lE.INT,value:t.value});case uE.FLOAT:return this.advanceLexer(),this.node(t,{kind:lE.FLOAT,value:t.value});case uE.STRING:case uE.BLOCK_STRING:return this.parseStringLiteral();case uE.NAME:switch(this.advanceLexer(),t.value){case"true":return this.node(t,{kind:lE.BOOLEAN,value:!0});case"false":return this.node(t,{kind:lE.BOOLEAN,value:!1});case"null":return this.node(t,{kind:lE.NULL});default:return this.node(t,{kind:lE.ENUM,value:t.value})}case uE.DOLLAR:if(e){if(this.expectToken(uE.DOLLAR),this._lexer.token.kind===uE.NAME){var n=this._lexer.token.value;throw oE(this._lexer.source,t.start,'Unexpected variable "$'.concat(n,'" in constant value.'))}throw this.unexpected(t)}return this.parseVariable();default:throw this.unexpected()}}},{key:"parseConstValueLiteral",value:function(){return this.parseValueLiteral(!0)}},{key:"parseStringLiteral",value:function(){var e=this._lexer.token;return this.advanceLexer(),this.node(e,{kind:lE.STRING,value:e.value,block:e.kind===uE.BLOCK_STRING})}},{key:"parseList",value:function(e){var t=this;return this.node(this._lexer.token,{kind:lE.LIST,values:this.any(uE.BRACKET_L,(function(){return t.parseValueLiteral(e)}),uE.BRACKET_R)})}},{key:"parseObject",value:function(e){var t=this;return this.node(this._lexer.token,{kind:lE.OBJECT,fields:this.any(uE.BRACE_L,(function(){return t.parseObjectField(e)}),uE.BRACE_R)})}},{key:"parseObjectField",value:function(e){var t=this._lexer.token,n=this.parseName();return this.expectToken(uE.COLON),this.node(t,{kind:lE.OBJECT_FIELD,name:n,value:this.parseValueLiteral(e)})}},{key:"parseDirectives",value:function(e){for(var t=[];this.peek(uE.AT);)t.push(this.parseDirective(e));return t}},{key:"parseConstDirectives",value:function(){return this.parseDirectives(!0)}},{key:"parseDirective",value:function(e){var t=this._lexer.token;return this.expectToken(uE.AT),this.node(t,{kind:lE.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(e)})}},{key:"parseTypeReference",value:function(){var e,t=this._lexer.token;if(this.expectOptionalToken(uE.BRACKET_L)){var n=this.parseTypeReference();this.expectToken(uE.BRACKET_R),e=this.node(t,{kind:lE.LIST_TYPE,type:n})}else e=this.parseNamedType();return this.expectOptionalToken(uE.BANG)?this.node(t,{kind:lE.NON_NULL_TYPE,type:e}):e}},{key:"parseNamedType",value:function(){return this.node(this._lexer.token,{kind:lE.NAMED_TYPE,name:this.parseName()})}},{key:"peekDescription",value:function(){return this.peek(uE.STRING)||this.peek(uE.BLOCK_STRING)}},{key:"parseDescription",value:function(){if(this.peekDescription())return this.parseStringLiteral()}},{key:"parseSchemaDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var n=this.parseConstDirectives(),r=this.many(uE.BRACE_L,this.parseOperationTypeDefinition,uE.BRACE_R);return this.node(e,{kind:lE.SCHEMA_DEFINITION,description:t,directives:n,operationTypes:r})}},{key:"parseOperationTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseOperationType();this.expectToken(uE.COLON);var n=this.parseNamedType();return this.node(e,{kind:lE.OPERATION_TYPE_DEFINITION,operation:t,type:n})}},{key:"parseScalarTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var n=this.parseName(),r=this.parseConstDirectives();return this.node(e,{kind:lE.SCALAR_TYPE_DEFINITION,description:t,name:n,directives:r})}},{key:"parseObjectTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();return this.node(e,{kind:lE.OBJECT_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:o,fields:i})}},{key:"parseImplementsInterfaces",value:function(){return this.expectOptionalKeyword("implements")?this.delimitedMany(uE.AMP,this.parseNamedType):[]}},{key:"parseFieldsDefinition",value:function(){return this.optionalMany(uE.BRACE_L,this.parseFieldDefinition,uE.BRACE_R)}},{key:"parseFieldDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName(),r=this.parseArgumentDefs();this.expectToken(uE.COLON);var o=this.parseTypeReference(),i=this.parseConstDirectives();return this.node(e,{kind:lE.FIELD_DEFINITION,description:t,name:n,arguments:r,type:o,directives:i})}},{key:"parseArgumentDefs",value:function(){return this.optionalMany(uE.PAREN_L,this.parseInputValueDef,uE.PAREN_R)}},{key:"parseInputValueDef",value:function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseName();this.expectToken(uE.COLON);var r,o=this.parseTypeReference();this.expectOptionalToken(uE.EQUALS)&&(r=this.parseConstValueLiteral());var i=this.parseConstDirectives();return this.node(e,{kind:lE.INPUT_VALUE_DEFINITION,description:t,name:n,type:o,defaultValue:r,directives:i})}},{key:"parseInterfaceTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var n=this.parseName(),r=this.parseImplementsInterfaces(),o=this.parseConstDirectives(),i=this.parseFieldsDefinition();return this.node(e,{kind:lE.INTERFACE_TYPE_DEFINITION,description:t,name:n,interfaces:r,directives:o,fields:i})}},{key:"parseUnionTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var n=this.parseName(),r=this.parseConstDirectives(),o=this.parseUnionMemberTypes();return this.node(e,{kind:lE.UNION_TYPE_DEFINITION,description:t,name:n,directives:r,types:o})}},{key:"parseUnionMemberTypes",value:function(){return this.expectOptionalToken(uE.EQUALS)?this.delimitedMany(uE.PIPE,this.parseNamedType):[]}},{key:"parseEnumTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var n=this.parseName(),r=this.parseConstDirectives(),o=this.parseEnumValuesDefinition();return this.node(e,{kind:lE.ENUM_TYPE_DEFINITION,description:t,name:n,directives:r,values:o})}},{key:"parseEnumValuesDefinition",value:function(){return this.optionalMany(uE.BRACE_L,this.parseEnumValueDefinition,uE.BRACE_R)}},{key:"parseEnumValueDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription(),n=this.parseEnumValueName(),r=this.parseConstDirectives();return this.node(e,{kind:lE.ENUM_VALUE_DEFINITION,description:t,name:n,directives:r})}},{key:"parseEnumValueName",value:function(){if("true"===this._lexer.token.value||"false"===this._lexer.token.value||"null"===this._lexer.token.value)throw oE(this._lexer.source,this._lexer.token.start,"".concat($E(this._lexer.token)," is reserved and cannot be used for an enum value."));return this.parseName()}},{key:"parseInputObjectTypeDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var n=this.parseName(),r=this.parseConstDirectives(),o=this.parseInputFieldsDefinition();return this.node(e,{kind:lE.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:n,directives:r,fields:o})}},{key:"parseInputFieldsDefinition",value:function(){return this.optionalMany(uE.BRACE_L,this.parseInputValueDef,uE.BRACE_R)}},{key:"parseTypeSystemExtension",value:function(){var e=this._lexer.lookahead();if(e.kind===uE.NAME)switch(e.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(e)}},{key:"parseSchemaExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseConstDirectives(),n=this.optionalMany(uE.BRACE_L,this.parseOperationTypeDefinition,uE.BRACE_R);if(0===t.length&&0===n.length)throw this.unexpected();return this.node(e,{kind:lE.SCHEMA_EXTENSION,directives:t,operationTypes:n})}},{key:"parseScalarTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),n=this.parseConstDirectives();if(0===n.length)throw this.unexpected();return this.node(e,{kind:lE.SCALAR_TYPE_EXTENSION,name:t,directives:n})}},{key:"parseObjectTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===o.length)throw this.unexpected();return this.node(e,{kind:lE.OBJECT_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:o})}},{key:"parseInterfaceTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),n=this.parseImplementsInterfaces(),r=this.parseConstDirectives(),o=this.parseFieldsDefinition();if(0===n.length&&0===r.length&&0===o.length)throw this.unexpected();return this.node(e,{kind:lE.INTERFACE_TYPE_EXTENSION,name:t,interfaces:n,directives:r,fields:o})}},{key:"parseUnionTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),n=this.parseConstDirectives(),r=this.parseUnionMemberTypes();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:lE.UNION_TYPE_EXTENSION,name:t,directives:n,types:r})}},{key:"parseEnumTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),n=this.parseConstDirectives(),r=this.parseEnumValuesDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:lE.ENUM_TYPE_EXTENSION,name:t,directives:n,values:r})}},{key:"parseInputObjectTypeExtension",value:function(){var e=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),n=this.parseConstDirectives(),r=this.parseInputFieldsDefinition();if(0===n.length&&0===r.length)throw this.unexpected();return this.node(e,{kind:lE.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:n,fields:r})}},{key:"parseDirectiveDefinition",value:function(){var e=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(uE.AT);var n=this.parseName(),r=this.parseArgumentDefs(),o=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var i=this.parseDirectiveLocations();return this.node(e,{kind:lE.DIRECTIVE_DEFINITION,description:t,name:n,arguments:r,repeatable:o,locations:i})}},{key:"parseDirectiveLocations",value:function(){return this.delimitedMany(uE.PIPE,this.parseDirectiveLocation)}},{key:"parseDirectiveLocation",value:function(){var e=this._lexer.token,t=this.parseName();if(Object.prototype.hasOwnProperty.call(aE,t.value))return t;throw this.unexpected(e)}},{key:"node",value:function(e,t){return!0!==this._options.noLocation&&(t.loc=new sE(e,this._lexer.lastToken,this._lexer.source)),t}},{key:"peek",value:function(e){return this._lexer.token.kind===e}},{key:"expectToken",value:function(e){var t=this._lexer.token;if(t.kind===e)return this.advanceLexer(),t;throw oE(this._lexer.source,t.start,"Expected ".concat(YE(e),", found ").concat($E(t),"."))}},{key:"expectOptionalToken",value:function(e){return this._lexer.token.kind===e&&(this.advanceLexer(),!0)}},{key:"expectKeyword",value:function(e){var t=this._lexer.token;if(t.kind!==uE.NAME||t.value!==e)throw oE(this._lexer.source,t.start,'Expected "'.concat(e,'", found ').concat($E(t),"."));this.advanceLexer()}},{key:"expectOptionalKeyword",value:function(e){var t=this._lexer.token;return t.kind===uE.NAME&&t.value===e&&(this.advanceLexer(),!0)}},{key:"unexpected",value:function(e){var t=null!==e&&void 0!==e?e:this._lexer.token;return oE(this._lexer.source,t.start,"Unexpected ".concat($E(t),"."))}},{key:"any",value:function(e,t,n){this.expectToken(e);for(var r=[];!this.expectOptionalToken(n);)r.push(t.call(this));return r}},{key:"optionalMany",value:function(e,t,n){if(this.expectOptionalToken(e)){var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}return[]}},{key:"many",value:function(e,t,n){this.expectToken(e);var r=[];do{r.push(t.call(this))}while(!this.expectOptionalToken(n));return r}},{key:"delimitedMany",value:function(e,t){this.expectOptionalToken(e);var n=[];do{n.push(t.call(this))}while(this.expectOptionalToken(e));return n}},{key:"advanceLexer",value:function(){var e=this._options.maxTokens,t=this._lexer.advance();if(void 0!==e&&t.kind!==uE.EOF&&(++this._tokenCounter,this._tokenCounter>e))throw oE(this._lexer.source,t.start,"Document contains more that ".concat(e," tokens. Parsing aborted."))}}]),e}();function $E(e){var t=e.value;return YE(e.kind)+(null!=t?' "'.concat(t,'"'):"")}function YE(e){return function(e){return e===uE.BANG||e===uE.DOLLAR||e===uE.AMP||e===uE.PAREN_L||e===uE.PAREN_R||e===uE.SPREAD||e===uE.COLON||e===uE.EQUALS||e===uE.AT||e===uE.BRACKET_L||e===uE.BRACKET_R||e===uE.BRACE_L||e===uE.PIPE||e===uE.BRACE_R}(e)?'"'.concat(e,'"'):e}var KE=new Map,XE=new Map,JE=!0,ZE=!1;function eO(e){return e.replace(/[\s,]+/g," ").trim()}function tO(e){var t=new Set,n=[];return e.definitions.forEach((function(e){if("FragmentDefinition"===e.kind){var r=e.name.value,o=eO((a=e.loc).source.body.substring(a.start,a.end)),i=XE.get(r);i&&!i.has(o)?JE&&console.warn("Warning: fragment with name "+r+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):i||XE.set(r,i=new Set),i.add(o),t.has(o)||(t.add(o),n.push(e))}else n.push(e);var a})),Df(Df({},e),{definitions:n})}function nO(e){var t=eO(e);if(!KE.has(t)){var n=function(e,t){return new QE(e,t).parseDocument()}(e,{experimentalFragmentVariables:ZE,allowLegacyFragmentVariables:ZE});if(!n||"Document"!==n.kind)throw new Error("Not a valid GraphQL document.");KE.set(t,function(e){var t=new Set(e.definitions);t.forEach((function(e){e.loc&&delete e.loc,Object.keys(e).forEach((function(n){var r=e[n];r&&"object"===typeof r&&t.add(r)}))}));var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}(tO(n)))}return KE.get(t)}function rO(e){for(var t=[],n=1;n=gO)return(console[e]||console.log).apply(console,arguments)}}!function(e){e.debug=mO("debug"),e.log=mO("log"),e.warn=mO("warn"),e.error=mO("error")}(pO||(pO={}));function yO(e){try{return e()}catch(ja){}}var bO=yO((function(){return globalThis}))||yO((function(){return window}))||yO((function(){return self}))||yO((function(){return global}))||yO((function(){return yO.constructor("return this")()})),xO="__",wO=[xO,xO].join("DEV");var SO=function(){try{return Boolean(__DEV__)}catch(ja){return Object.defineProperty(bO,wO,{value:"production"!==yO((function(){return"production"})),enumerable:!1,configurable:!0,writable:!0}),bO[wO]}}();function _O(e){try{return e()}catch(Lk){}}var kO=_O((function(){return globalThis}))||_O((function(){return window}))||_O((function(){return self}))||_O((function(){return global}))||_O((function(){return _O.constructor("return this")()})),TO=!1;function CO(){TO&&(delete kO.process,TO=!1)}!kO||_O((function(){return"production"}))||_O((function(){return process}))||(Object.defineProperty(kO,"process",{value:{env:{NODE_ENV:"production"}},configurable:!0,enumerable:!1,writable:!0}),TO=!0),CO(),__DEV__?pO("boolean"===typeof SO,SO):pO("boolean"===typeof SO,39);var EO="function"===typeof WeakMap&&"ReactNative"!==yO((function(){return navigator.product})),OO="function"===typeof WeakSet,jO="function"===typeof Symbol&&"function"===typeof Symbol.for,PO=jO&&Symbol.asyncIterator,AO="function"===typeof yO((function(){return window.document.createElement})),RO=yO((function(){return navigator.userAgent.indexOf("jsdom")>=0}))||!1,IO=AO&&!RO,MO=!1,DO=l.useSyncExternalStore||function(e,t,n){var r=t();__DEV__&&!MO&&r!==t()&&(MO=!0,__DEV__&&pO.error("The result of getSnapshot should be cached to avoid an infinite loop"));var o=a.useState({inst:{value:r,getSnapshot:t}}),i=o[0].inst,l=o[1];return IO?a.useLayoutEffect((function(){Object.assign(i,{value:r,getSnapshot:t}),NO(i)&&l({inst:i})}),[e,r,t]):Object.assign(i,{value:r,getSnapshot:t}),a.useEffect((function(){return NO(i)&&l({inst:i}),e((function(){NO(i)&&l({inst:i})}))}),[e]),r};function NO(e){var t=e.value,n=e.getSnapshot;try{return t!==n()}catch(Aa){return!0}}var LO=Object.prototype,FO=LO.toString,zO=LO.hasOwnProperty,BO=Function.prototype.toString,VO=new Map;function HO(e,t){try{return UO(e,t)}finally{VO.clear()}}function UO(e,t){if(e===t)return!0;var n=FO.call(e);if(n!==FO.call(t))return!1;switch(n){case"[object Array]":if(e.length!==t.length)return!1;case"[object Object]":if(QO(e,t))return!0;var r=WO(e),o=WO(t),i=r.length;if(i!==o.length)return!1;for(var a=0;a=0&&e.indexOf(t,n)===n}(v,qO)}return!1}function WO(e){return Object.keys(e).filter(GO,e)}function GO(e){return void 0!==this[e]}var qO="{ [native code] }";function QO(e,t){var n=VO.get(e);if(n){if(n.has(t))return!0}else VO.set(e,n=new Set);return n.add(t),!1}function $O(){for(var e=[],t=0;t0}var ej,tj,nj=function(e){var t="";(ZO(e.graphQLErrors)||ZO(e.clientErrors))&&(e.graphQLErrors||[]).concat(e.clientErrors||[]).forEach((function(e){var n=e?e.message:"Error message not found.";t+="".concat(n,"\n")}));return e.networkError&&(t+="".concat(e.networkError.message,"\n")),t=t.replace(/\n$/,"")},rj=function(e){function t(n){var r=n.graphQLErrors,o=n.clientErrors,i=n.networkError,a=n.errorMessage,l=n.extraInfo,u=e.call(this,a)||this;return u.name="ApolloError",u.graphQLErrors=r||[],u.clientErrors=o||[],u.networkError=i||null,u.message=a||nj(u),u.extraInfo=l,u.__proto__=t.prototype,u}return Mf(t,e),t}(Error);function oj(e){return!!e&&e<7}!function(e){e[e.loading=1]="loading",e[e.setVariables=2]="setVariables",e[e.fetchMore=3]="fetchMore",e[e.refetch=4]="refetch",e[e.poll=6]="poll",e[e.ready=7]="ready",e[e.error=8]="error"}(ej||(ej={})),function(e){e[e.Query=0]="Query",e[e.Mutation=1]="Mutation",e[e.Subscription=2]="Subscription"}(tj||(tj={}));var ij=new Map;function aj(e){var t;switch(e){case tj.Query:t="Query";break;case tj.Mutation:t="Mutation";break;case tj.Subscription:t="Subscription"}return t}function lj(e,t){var n=function(e){var t,n,r=ij.get(e);if(r)return r;__DEV__?pO(!!e&&!!e.kind,"Argument of ".concat(e," passed to parser was not a valid GraphQL ")+"DocumentNode. You may need to use 'graphql-tag' or another method to convert your operation into a document"):pO(!!e&&!!e.kind,33);for(var o=[],i=[],a=[],l=[],u=0,s=e.definitions;u, or pass an ApolloClient instance in via options.'):pO(!!n,32),n}function sj(e){return null!==e&&"object"===typeof e}function cj(e){var t=new Set([e]);return t.forEach((function(e){sj(e)&&function(e){if(__DEV__&&!Object.isFrozen(e))try{Object.freeze(e)}catch(t){if(t instanceof TypeError)return null;throw t}return e}(e)===e&&Object.getOwnPropertyNames(e).forEach((function(n){sj(e[n])&&t.add(e[n])}))})),e}function fj(e){return __DEV__&&cj(e),e}var dj=Object.prototype.hasOwnProperty;function hj(e,t){return void 0===t&&(t=Object.create(null)),function(e,t){var n=(0,a.useRef)();n.current&&e===n.current.client&&t===n.current.query||(n.current=new vj(e,t,n.current));var r=n.current,o=(0,a.useState)(0),i=(o[0],o[1]);return r.forceUpdate=function(){i((function(e){return e+1}))},r}(uj(t.client),e).useQuery(t)}var pj,vj=function(){function e(e,t,n){this.client=e,this.query=t,this.asyncResolveFns=new Set,this.optionsToIgnoreOnce=new(OO?WeakSet:Set),this.ssrDisabledResult=fj({loading:!0,data:void 0,error:void 0,networkStatus:ej.loading}),this.skipStandbyResult=fj({loading:!1,data:void 0,error:void 0,networkStatus:ej.ready}),this.toQueryResultCache=new(EO?WeakMap:Map),lj(t,tj.Query);var r=n&&n.result,o=r&&r.data;o&&(this.previousData=o)}return e.prototype.forceUpdate=function(){__DEV__&&pO.warn("Calling default no-op implementation of InternalState#forceUpdate")},e.prototype.asyncUpdate=function(e){var t=this;return new Promise((function(n,r){var o=t.watchQueryOptions;t.asyncResolveFns.add(n),t.optionsToIgnoreOnce.add(o),e.addEventListener("abort",(function i(){t.asyncResolveFns.delete(n),t.optionsToIgnoreOnce.delete(o),e.removeEventListener("abort",i),r(e.reason)})),t.forceUpdate()}))},e.prototype.useQuery=function(e){var t=this;this.renderPromises=(0,a.useContext)(XO()).renderPromises,this.useOptions(e);var n=this.useObservableQuery(),r=DO((0,a.useCallback)((function(){if(t.renderPromises)return function(){};var e=function(){var e=t.result,r=n.getCurrentResult();e&&e.loading===r.loading&&e.networkStatus===r.networkStatus&&HO(e.data,r.data)||t.setResult(r)},r=n.subscribe(e,(function o(i){var a=n.last;r.unsubscribe();try{n.resetLastResults(),r=n.subscribe(e,o)}finally{n.last=a}if(!dj.call(i,"graphQLErrors"))throw i;var l=t.result;(!l||l&&l.loading||!HO(i,l.error))&&t.setResult({data:l&&l.data,error:i,loading:!1,networkStatus:ej.error})}));return function(){return r.unsubscribe()}}),[n,this.renderPromises,this.client.disableNetworkFetches]),(function(){return t.getCurrentResult()}),(function(){return t.getCurrentResult()}));this.unsafeHandlePartialRefetch(r);var o=this.toQueryResult(r);return!o.loading&&this.asyncResolveFns.size&&(this.asyncResolveFns.forEach((function(e){return e(o)})),this.asyncResolveFns.clear()),o},e.prototype.useOptions=function(t){var n,r=this.createWatchQueryOptions(this.queryHookOptions=t),o=this.watchQueryOptions;!this.optionsToIgnoreOnce.has(o)&&HO(r,o)||(this.watchQueryOptions=r,o&&this.observable&&(this.optionsToIgnoreOnce.delete(o),this.observable.reobserve(this.getObsQueryOptions()),this.previousData=(null===(n=this.result)||void 0===n?void 0:n.data)||this.previousData,this.result=void 0)),this.onCompleted=t.onCompleted||e.prototype.onCompleted,this.onError=t.onError||e.prototype.onError,!this.renderPromises&&!this.client.disableNetworkFetches||!1!==this.queryHookOptions.ssr||this.queryHookOptions.skip?this.queryHookOptions.skip||"standby"===this.watchQueryOptions.fetchPolicy?this.result=this.skipStandbyResult:this.result!==this.ssrDisabledResult&&this.result!==this.skipStandbyResult||(this.result=void 0):this.result=this.ssrDisabledResult},e.prototype.getObsQueryOptions=function(){var e=[],t=this.client.defaultOptions.watchQuery;return t&&e.push(t),this.queryHookOptions.defaultOptions&&e.push(this.queryHookOptions.defaultOptions),e.push($O(this.observable&&this.observable.options,this.watchQueryOptions)),e.reduce(YO)},e.prototype.createWatchQueryOptions=function(e){var t;void 0===e&&(e={});var n=e.skip,r=(e.ssr,e.onCompleted,e.onError,e.defaultOptions,Nf(e,["skip","ssr","onCompleted","onError","defaultOptions"])),o=Object.assign(r,{query:this.query});if(!this.renderPromises||"network-only"!==o.fetchPolicy&&"cache-and-network"!==o.fetchPolicy||(o.fetchPolicy="cache-first"),o.variables||(o.variables={}),n){var i=o.fetchPolicy,a=void 0===i?this.getDefaultFetchPolicy():i,l=o.initialFetchPolicy,u=void 0===l?a:l;Object.assign(o,{initialFetchPolicy:u,fetchPolicy:"standby"})}else o.fetchPolicy||(o.fetchPolicy=(null===(t=this.observable)||void 0===t?void 0:t.options.initialFetchPolicy)||this.getDefaultFetchPolicy());return o},e.prototype.getDefaultFetchPolicy=function(){var e,t;return(null===(e=this.queryHookOptions.defaultOptions)||void 0===e?void 0:e.fetchPolicy)||(null===(t=this.client.defaultOptions.watchQuery)||void 0===t?void 0:t.fetchPolicy)||"cache-first"},e.prototype.onCompleted=function(e){},e.prototype.onError=function(e){},e.prototype.useObservableQuery=function(){var e=this.observable=this.renderPromises&&this.renderPromises.getSSRObservable(this.watchQueryOptions)||this.observable||this.client.watchQuery(this.getObsQueryOptions());this.obsQueryFields=(0,a.useMemo)((function(){return{refetch:e.refetch.bind(e),reobserve:e.reobserve.bind(e),fetchMore:e.fetchMore.bind(e),updateQuery:e.updateQuery.bind(e),startPolling:e.startPolling.bind(e),stopPolling:e.stopPolling.bind(e),subscribeToMore:e.subscribeToMore.bind(e)}}),[e]);var t=!(!1===this.queryHookOptions.ssr||this.queryHookOptions.skip);return this.renderPromises&&t&&(this.renderPromises.registerSSRObservable(e),e.getCurrentResult().loading&&this.renderPromises.addObservableQueryPromise(e)),e},e.prototype.setResult=function(e){var t=this.result;t&&t.data&&(this.previousData=t.data),this.result=e,this.forceUpdate(),this.handleErrorOrCompleted(e)},e.prototype.handleErrorOrCompleted=function(e){var t=this;if(!e.loading){var n=this.toApolloError(e);Promise.resolve().then((function(){n?t.onError(n):e.data&&t.onCompleted(e.data)})).catch((function(e){__DEV__&&pO.warn(e)}))}},e.prototype.toApolloError=function(e){return ZO(e.errors)?new rj({graphQLErrors:e.errors}):e.error},e.prototype.getCurrentResult=function(){return this.result||this.handleErrorOrCompleted(this.result=this.observable.getCurrentResult()),this.result},e.prototype.toQueryResult=function(e){var t=this.toQueryResultCache.get(e);if(t)return t;var n=e.data,r=(e.partial,Nf(e,["data","partial"]));return this.toQueryResultCache.set(e,t=Df(Df(Df({data:n},r),this.obsQueryFields),{client:this.client,observable:this.observable,variables:this.observable.variables,called:!this.queryHookOptions.skip,previousData:this.previousData})),!t.error&&ZO(e.errors)&&(t.error=new rj({graphQLErrors:e.errors})),t},e.prototype.unsafeHandlePartialRefetch=function(e){!e.partial||!this.queryHookOptions.partialRefetch||e.loading||e.data&&0!==Object.keys(e.data).length||"cache-only"===this.observable.options.fetchPolicy||(Object.assign(e,{loading:!0,networkStatus:ej.refetch}),this.observable.refetch())},e}(),gj={data:void 0,isLoading:!1,error:void 0},mj=(0,a.createContext)(gj),yj=function(e){var n=e.children,r=hj(rO(pj||(pj=YC(["\n query GetMe{\n me {\n id\n name\n photoURL,\n isActivated,\n isAdmin\n }\n }\n "])))),o=r.loading,i=r.error,a=r.data;return(0,t.jsx)(mj.Provider,{value:{data:a,isLoading:o,error:i},children:n})},bj=function(e){var n,r,o=e.children,i=(0,a.useContext)(mj),l=i.data,u=i.isLoading,s=i.error;return u?(0,t.jsx)("div",{className:"flex flex-row w-sceen h-screen justify-center items-center",children:(0,t.jsx)(q_,{label:"Loading authroization state",type:G_.loading})}):s?(0,t.jsx)("div",{className:"flex flex-row w-sceen h-screen justify-center items-center",children:(0,t.jsx)(q_,{label:"Error fetching authroization state",type:G_.error,details:"Please contact your admin to diagnose the issue."})}):null!==l&&void 0!==l&&null!==(n=l.me)&&void 0!==n&&n.isActivated?o:(0,t.jsx)("div",{className:"flex flex-row w-sceen h-screen justify-center items-center",children:(0,t.jsx)(q_,{label:"Account not approved",details:"Gain approval by providing your id (".concat(null===l||void 0===l||null===(r=l.me)||void 0===r?void 0:r.id,") to an admin."),type:G_.noData})})},xj=[{name:GC.createQuest,href:"/createQuest",icon:MC,internal:!0},{name:GC.dashboard,href:"/dashboard",icon:DC,internal:!0},{name:GC.hosts,href:"/hosts",icon:NC,internal:!0},{name:GC.quests,href:"/quests",icon:LC,internal:!0},{name:GC.tasks,href:"/tasks",icon:FC,internal:!0},{name:GC.documentation,href:"https://docs.realm.pub/",icon:zC,target:"__blank",internal:!1},{name:GC.playground,href:"/playground",icon:BC,target:"__blank",internal:!1}];function wj(){for(var e=arguments.length,t=new Array(e),n=0;n\" "}),2),Pj=jj[0],Aj=jj[1],Rj=cx((function(e,n){var r=gx("Input",e),o=Sr(e),i=o.children,l=o.className,u=p(o,Oj),s=kt("chakra-input__group",l),c={},f=Ej(i),d=r.field;f.forEach((function(e){var t,n;r&&(d&&"InputLeftElement"===e.type.id&&(c.paddingStart=null!=(t=d.height)?t:d.h),d&&"InputRightElement"===e.type.id&&(c.paddingEnd=null!=(n=d.height)?n:d.h),"InputRightAddon"===e.type.id&&(c.borderEndRadius=0),"InputLeftAddon"===e.type.id&&(c.borderStartRadius=0))}));var v=f.map((function(t){var n,r,o=Wb({size:(null==(n=t.props)?void 0:n.size)||e.size,variant:(null==(r=t.props)?void 0:r.variant)||e.variant});return"Input"!==t.type.id?(0,a.cloneElement)(t,o):(0,a.cloneElement)(t,Object.assign(o,c,t.props))}));return(0,t.jsx)(lx.div,h(h({className:s,ref:n,__css:{width:"100%",display:"flex",position:"relative",isolation:"isolate"}},u),{},{children:(0,t.jsx)(Pj,{value:r,children:v})}))}));Rj.displayName="InputGroup";var Ij=["placement"],Mj=["className"],Dj=["className"],Nj=lx("div",{baseStyle:{display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",top:"0",zIndex:2}}),Lj=cx((function(e,n){var r,o,i,a=e.placement,l=void 0===a?"left":a,u=p(e,Ij),s=Aj(),c=s.field,d=h((f(r={},"left"===l?"insetStart":"insetEnd","0"),f(r,"width",null!=(o=null==c?void 0:c.height)?o:null==c?void 0:c.h),f(r,"height",null!=(i=null==c?void 0:c.height)?i:null==c?void 0:c.h),f(r,"fontSize",null==c?void 0:c.fontSize),r),s.element);return(0,t.jsx)(Nj,h({ref:n,__css:d},u))}));Lj.id="InputElement",Lj.displayName="InputElement";var Fj=cx((function(e,n){var r=e.className,o=p(e,Mj),i=kt("chakra-input__left-element",r);return(0,t.jsx)(Lj,h({ref:n,placement:"left",className:i},o))}));Fj.id="InputLeftElement",Fj.displayName="InputLeftElement";var zj=cx((function(e,n){var r=e.className,o=p(e,Dj),i=kt("chakra-input__right-element",r);return(0,t.jsx)(Lj,h({ref:n,placement:"right",className:i},o))}));function Bj(){for(var e=arguments.length,t=new Array(e),n=0;n\" "}),2),Gj=Wj[0],qj=Wj[1],Qj=ut(st({strict:!1,name:"FormControlContext"}),2),$j=Qj[0],Yj=Qj[1];var Kj=cx((function(e,n){var r=gx("Form",e),o=function(e){var t=e.id,n=e.isRequired,r=e.isInvalid,o=e.isDisabled,i=e.isReadOnly,l=p(e,Hj),u=(0,a.useId)(),s=t||"field-".concat(u),c="".concat(s,"-label"),f="".concat(s,"-feedback"),d="".concat(s,"-helptext"),v=ut((0,a.useState)(!1),2),g=v[0],m=v[1],y=ut((0,a.useState)(!1),2),b=y[0],x=y[1],w=ut((0,a.useState)(!1),2),S=w[0],_=w[1],k=(0,a.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({id:d},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:Bj(e,(function(e){e&&x(!0)}))})}),[d]),T=(0,a.useCallback)((function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},n),{},{ref:a,"data-focus":jt(S),"data-disabled":jt(o),"data-invalid":jt(r),"data-readonly":jt(i),id:null!=(e=n.id)?e:c,htmlFor:null!=(t=n.htmlFor)?t:s})}),[s,o,S,r,i,c]),C=(0,a.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({id:f},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:Bj(e,(function(e){e&&m(!0)})),"aria-live":"polite"})}),[f]),E=(0,a.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h(h({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),l),{},{ref:e,role:"group"})}),[l]),O=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},e),{},{ref:t,role:"presentation","aria-hidden":!0,children:e.children||"*"})}),[]);return{isRequired:!!n,isInvalid:!!r,isReadOnly:!!i,isDisabled:!!o,isFocused:!!S,onFocus:function(){return _(!0)},onBlur:function(){return _(!1)},hasFeedbackText:g,setHasFeedbackText:m,hasHelpText:b,setHasHelpText:x,id:s,labelId:c,feedbackId:f,helpTextId:d,htmlProps:l,getHelpTextProps:k,getErrorMessageProps:C,getRootProps:E,getLabelProps:T,getRequiredIndicatorProps:O}}(Sr(e)),i=o.getRootProps,l=(o.htmlProps,p(o,Uj)),u=kt("chakra-form-control",e.className);return(0,t.jsx)($j,{value:l,children:(0,t.jsx)(Gj,{value:r,children:(0,t.jsx)(lx.div,h(h({},i({},n)),{},{className:u,__css:r.container}))})})}));Kj.displayName="FormControl";var Xj=cx((function(e,n){var r=Yj(),o=qj(),i=kt("chakra-form__helper-text",e.className);return(0,t.jsx)(lx.div,h(h({},null==r?void 0:r.getHelpTextProps(e,n)),{},{__css:o.helperText,className:i}))}));Xj.displayName="FormHelperText";var Jj=["isDisabled","isInvalid","isReadOnly","isRequired"],Zj=["id","disabled","readOnly","required","isRequired","isInvalid","isReadOnly","isDisabled","onFocus","onBlur"];function eP(e){var t=tP(e),n=t.isDisabled,r=t.isInvalid,o=t.isReadOnly,i=t.isRequired;return h(h({},p(t,Jj)),{},{disabled:n,readOnly:o,required:i,"aria-invalid":Pt(r),"aria-required":Pt(i),"aria-readonly":Pt(o)})}function tP(e){var t,n,r,o=Yj(),i=e.id,a=e.disabled,l=e.readOnly,u=e.required,s=e.isRequired,c=e.isInvalid,f=e.isReadOnly,d=e.isDisabled,v=e.onFocus,g=e.onBlur,m=p(e,Zj),y=e["aria-describedby"]?[e["aria-describedby"]]:[];return(null==o?void 0:o.hasFeedbackText)&&(null==o?void 0:o.isInvalid)&&y.push(o.feedbackId),(null==o?void 0:o.hasHelpText)&&y.push(o.helpTextId),h(h({},m),{},{"aria-describedby":y.join(" ")||void 0,id:null!=i?i:null==o?void 0:o.id,isDisabled:null!=(t=null!=a?a:d)?t:null==o?void 0:o.isDisabled,isReadOnly:null!=(n=null!=l?l:f)?n:null==o?void 0:o.isReadOnly,isRequired:null!=(r=null!=u?u:s)?r:null==o?void 0:o.isRequired,isInvalid:null!=c?c:null==o?void 0:o.isInvalid,onFocus:At(null==o?void 0:o.onFocus,v),onBlur:At(null==o?void 0:o.onBlur,g)})}var nP=["htmlSize"],rP=cx((function(e,n){var r=e.htmlSize,o=p(e,nP),i=gx("Input",o),a=eP(Sr(o)),l=kt("chakra-input",e.className);return(0,t.jsx)(lx.input,h(h({size:r},a),{},{__css:i.field,ref:n,className:l}))}));rP.displayName="Input",rP.id="Input";var oP=n(763),iP=function(e){var n=e.placeholder,r=e.setSearch,o=(0,a.useRef)((0,oP.debounce)(function(){var e=hw(fw().mark((function e(t){return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r(t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),300)).current;function i(){return(i=hw(fw().mark((function e(t){return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o(t.target.value);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,a.useEffect)((function(){return function(){o.cancel()}}),[o]),(0,t.jsxs)("div",{className:"flex-1 gap-1",children:[(0,t.jsxs)(Cj,{size:"sm",mb:2,children:[" ",n]}),(0,t.jsxs)(Rj,{className:" border-gray-300",children:[(0,t.jsx)(Fj,{pointerEvents:"none",children:(0,t.jsx)(kj,{color:"gray.300"})}),(0,t.jsx)(rP,{type:"text",placeholder:n,onChange:function(e){return i.apply(this,arguments)}})]})]})},aP=["className"],lP=cx((function(e,n){var r=vx("Badge",e),o=Sr(e),i=(o.className,p(o,aP));return(0,t.jsx)(lx.span,h(h({ref:n,className:kt("chakra-badge",e.className)},i),{},{__css:h({display:"inline-block",whiteSpace:"nowrap",verticalAlign:"middle"},r)}))}));lP.displayName="Badge";var uP=["htmlWidth","htmlHeight","alt"],sP=cx((function(e,n){var r=e.htmlWidth,o=e.htmlHeight,i=e.alt,a=p(e,uP);return(0,t.jsx)("img",h({width:r,height:o,ref:n,alt:i},a))}));sP.displayName="NativeImage";var cP=["fallbackSrc","fallback","src","srcSet","align","fit","loading","ignoreFallback","crossOrigin","fallbackStrategy","referrerPolicy"];var fP=cx((function(e,n){var r=e.fallbackSrc,o=e.fallback,i=e.src,l=e.srcSet,u=e.align,s=e.fit,c=e.loading,f=e.ignoreFallback,d=e.crossOrigin,v=e.fallbackStrategy,g=void 0===v?"beforeLoadOrError":v,m=e.referrerPolicy,y=p(e,cP),b=null!=c||f||!(void 0!==r||void 0!==o),x=function(e){var t=e.loading,n=e.src,r=e.srcSet,o=e.onLoad,i=e.onError,l=e.crossOrigin,u=e.sizes,s=e.ignoreFallback,c=ut((0,a.useState)("pending"),2),f=c[0],d=c[1];(0,a.useEffect)((function(){d(n?"loading":"pending")}),[n]);var h=(0,a.useRef)(),p=(0,a.useCallback)((function(){if(n){v();var e=new Image;e.src=n,l&&(e.crossOrigin=l),r&&(e.srcset=r),u&&(e.sizes=u),t&&(e.loading=t),e.onload=function(e){v(),d("loaded"),null==o||o(e)},e.onerror=function(e){v(),d("failed"),null==i||i(e)},h.current=e}}),[n,l,r,u,o,i,t]),v=function(){h.current&&(h.current.onload=null,h.current.onerror=null,h.current=null)};return Lr((function(){if(!s)return"loading"===f&&p(),function(){v()}}),[f,p,s]),s?"loaded":f}(h(h({},e),{},{ignoreFallback:b})),w=function(e,t){return"loaded"!==e&&"beforeLoadOrError"===t||"failed"===e&&"onError"===t}(x,g),S=h({ref:n,objectFit:s,objectPosition:u},b?y:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=mt(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}(y,["onError","onLoad"]));return w?o||(0,t.jsx)(lx.img,h({as:sP,className:"chakra-image__placeholder",src:r},S)):(0,t.jsx)(lx.img,h({as:sP,src:i,srcSet:l,crossOrigin:d,loading:c,referrerPolicy:m,className:"chakra-image"},S))}));fP.displayName="Image";var dP={};function hP(){return dP}function pP(e,t){if(t.length1?"s":"")+" required, but only "+t.length+" present")}function vP(e){pP(1,arguments);var t=Object.prototype.toString.call(e);return e instanceof Date||"object"===s(e)&&"[object Date]"===t?new Date(e.getTime()):"number"===typeof e||"[object Number]"===t?new Date(e):("string"!==typeof e&&"[object String]"!==t||"undefined"===typeof console||(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn((new Error).stack)),new Date(NaN))}function gP(e,t){pP(2,arguments);var n=vP(e),r=vP(t),o=n.getTime()-r.getTime();return o<0?-1:o>0?1:o}function mP(e){pP(1,arguments);var t=vP(e);return function(e){pP(1,arguments);var t=vP(e);return t.setHours(23,59,59,999),t}(t).getTime()===function(e){pP(1,arguments);var t=vP(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}(t).getTime()}function yP(e,t){pP(2,arguments);var n,r=vP(e),o=vP(t),i=gP(r,o),a=Math.abs(function(e,t){pP(2,arguments);var n=vP(e),r=vP(t);return 12*(n.getFullYear()-r.getFullYear())+(n.getMonth()-r.getMonth())}(r,o));if(a<1)n=0;else{1===r.getMonth()&&r.getDate()>27&&r.setDate(30),r.setMonth(r.getMonth()-i*a);var l=gP(r,o)===-i;mP(vP(e))&&1===a&&1===gP(e,o)&&(l=!1),n=i*(a-Number(l))}return 0===n?0:n}function bP(e,t){return pP(2,arguments),vP(e).getTime()-vP(t).getTime()}var xP={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(e){return e<0?Math.ceil(e):Math.floor(e)}},wP="trunc";function SP(e){return e?xP[e]:xP[wP]}var _P={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},kP=function(e,t,n){var r,o=_P[e];return r="string"===typeof o?o:1===t?o.one:o.other.replace("{{count}}",t.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function TP(e){return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}var CP={date:TP({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:TP({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:TP({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},EP={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},OP=function(e,t,n,r){return EP[e]};function jP(e){return function(t,n){var r;if("formatting"===(null!==n&&void 0!==n&&n.context?String(n.context):"standalone")&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,i=null!==n&&void 0!==n&&n.width?String(n.width):o;r=e.formattingValues[i]||e.formattingValues[o]}else{var a=e.defaultWidth,l=null!==n&&void 0!==n&&n.width?String(n.width):e.defaultWidth;r=e.values[l]||e.values[a]}return r[e.argumentCallback?e.argumentCallback(t):t]}}var PP={ordinalNumber:function(e,t){var n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:jP({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:jP({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(e){return e-1}}),month:jP({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:jP({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:jP({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function AP(e){return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=t.match(o);if(!i)return null;var a,l=i[0],u=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(u)?function(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=e.match(RP.matchPattern);if(!n)return null;var r=n[0],o=e.match(RP.parsePattern);if(!o)return null;var i=RP.valueCallback?RP.valueCallback(o[0]):o[0];return{value:i=t.valueCallback?t.valueCallback(i):i,rest:e.slice(r.length)}}),era:AP({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:AP({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(e){return e+1}}),month:AP({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:AP({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:AP({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},MP={code:"en-US",formatDistance:kP,formatLong:CP,formatRelative:OP,localize:PP,match:IP,options:{weekStartsOn:0,firstWeekContainsDate:1}};function DP(e,t){if(null==e)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}function NP(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return t.setUTCFullYear(e.getFullYear()),e.getTime()-t.getTime()}var LP=1440,FP=2520,zP=43200,BP=86400;function VP(e,t,n){var r,o;pP(2,arguments);var i=hP(),a=null!==(r=null!==(o=null===n||void 0===n?void 0:n.locale)&&void 0!==o?o:i.locale)&&void 0!==r?r:MP;if(!a.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=gP(e,t);if(isNaN(l))throw new RangeError("Invalid time value");var u,s,c=DP(function(e){return DP({},e)}(n),{addSuffix:Boolean(null===n||void 0===n?void 0:n.addSuffix),comparison:l});l>0?(u=vP(t),s=vP(e)):(u=vP(e),s=vP(t));var f,d=function(e,t,n){pP(2,arguments);var r=bP(e,t)/1e3;return SP(null===n||void 0===n?void 0:n.roundingMethod)(r)}(s,u),h=(NP(s)-NP(u))/1e3,p=Math.round((d-h)/60);if(p<2)return null!==n&&void 0!==n&&n.includeSeconds?d<5?a.formatDistance("lessThanXSeconds",5,c):d<10?a.formatDistance("lessThanXSeconds",10,c):d<20?a.formatDistance("lessThanXSeconds",20,c):d<40?a.formatDistance("halfAMinute",0,c):d<60?a.formatDistance("lessThanXMinutes",1,c):a.formatDistance("xMinutes",1,c):0===p?a.formatDistance("lessThanXMinutes",1,c):a.formatDistance("xMinutes",p,c);if(p<45)return a.formatDistance("xMinutes",p,c);if(p<90)return a.formatDistance("aboutXHours",1,c);if(p0&&e(a,o-1)}(u,a-1),l.reverse();return function e(t){return t.filter((function(e){return e.column.getIsVisible()})).map((function(t){var n=0,r=0,o=[0];return t.subHeaders&&t.subHeaders.length?(o=[],e(t.subHeaders).forEach((function(e){var t=e.colSpan,r=e.rowSpan;n+=t,o.push(r)}))):n=1,r+=Math.min.apply(Math,bt(o)),t.colSpan=n,t.rowSpan=r,{colSpan:n,rowSpan:r}}))}(null!=(o=null==(i=l[0])?void 0:i.headers)?o:[]),l}var KP={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},XP={getDefaultColumnDef:function(){return KP},getInitialState:function(e){return h({columnSizing:{},columnSizingInfo:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}},e)},getDefaultOptions:function(e){return{columnResizeMode:"onEnd",onColumnSizingChange:UP("columnSizing",e),onColumnSizingInfoChange:UP("columnSizingInfo",e)}},createColumn:function(e,t){return{getSize:function(){var n,r,o,i=t.getState().columnSizing[e.id];return Math.min(Math.max(null!=(n=e.columnDef.minSize)?n:KP.minSize,null!=(r=null!=i?i:e.columnDef.size)?r:KP.size),null!=(o=e.columnDef.maxSize)?o:KP.maxSize)},getStart:function(n){var r=n?"left"===n?t.getLeftVisibleLeafColumns():t.getRightVisibleLeafColumns():t.getVisibleLeafColumns(),o=r.findIndex((function(t){return t.id===e.id}));if(o>0){var i=r[o-1];return i.getStart(n)+i.getSize()}return 0},resetSize:function(){t.setColumnSizing((function(t){var n=e.id;t[n];return p(t,[n].map(c))}))},getCanResize:function(){var n,r;return(null==(n=e.columnDef.enableResizing)||n)&&(null==(r=t.options.enableColumnResizing)||r)},getIsResizing:function(){return t.getState().columnSizingInfo.isResizingColumn===e.id}}},createHeader:function(e,t){return{getSize:function(){var t=0;return function e(n){var r;n.subHeaders.length?n.subHeaders.forEach(e):t+=null!=(r=n.column.getSize())?r:0}(e),t},getStart:function(){if(e.index>0){var t=e.headerGroup.headers[e.index-1];return t.getStart()+t.getSize()}return 0},getResizeHandler:function(){var n=t.getColumn(e.column.id),r=null==n?void 0:n.getCanResize();return function(o){if(n&&r&&(null==o.persist||o.persist(),!(ZP(o)&&o.touches&&o.touches.length>1))){var i=e.getSize(),a=e?e.getLeafHeaders().map((function(e){return[e.column.id,e.column.getSize()]})):[[n.id,n.getSize()]],l=ZP(o)?Math.round(o.touches[0].clientX):o.clientX,u={},s=function(e,n){"number"===typeof n&&(t.setColumnSizingInfo((function(e){var t,r,o=n-(null!=(t=null==e?void 0:e.startOffset)?t:0),i=Math.max(o/(null!=(r=null==e?void 0:e.startSize)?r:0),-.999999);return e.columnSizingStart.forEach((function(e){var t=ut(e,2),n=t[0],r=t[1];u[n]=Math.round(100*Math.max(r+r*i,0))/100})),h(h({},e),{},{deltaOffset:o,deltaPercentage:i})})),"onChange"!==t.options.columnResizeMode&&"end"!==e||t.setColumnSizing((function(e){return h(h({},e),u)})))},c=function(e){return s("move",e)},f=function(e){s("end",e),t.setColumnSizingInfo((function(e){return h(h({},e),{},{isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]})}))},d={moveHandler:function(e){return c(e.clientX)},upHandler:function(e){document.removeEventListener("mousemove",d.moveHandler),document.removeEventListener("mouseup",d.upHandler),f(e.clientX)}},p={moveHandler:function(e){return e.cancelable&&(e.preventDefault(),e.stopPropagation()),c(e.touches[0].clientX),!1},upHandler:function(e){var t;document.removeEventListener("touchmove",p.moveHandler),document.removeEventListener("touchend",p.upHandler),e.cancelable&&(e.preventDefault(),e.stopPropagation()),f(null==(t=e.touches[0])?void 0:t.clientX)}},v=!!function(){if("boolean"===typeof JP)return JP;var e=!1;try{var t={get passive(){return e=!0,!1}},n=function(){};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch(r){e=!1}return JP=e}()&&{passive:!1};ZP(o)?(document.addEventListener("touchmove",p.moveHandler,v),document.addEventListener("touchend",p.upHandler,v)):(document.addEventListener("mousemove",d.moveHandler,v),document.addEventListener("mouseup",d.upHandler,v)),t.setColumnSizingInfo((function(e){return h(h({},e),{},{startOffset:l,startSize:i,deltaOffset:0,deltaPercentage:0,columnSizingStart:a,isResizingColumn:n.id})}))}}}}},createTable:function(e){return{setColumnSizing:function(t){return null==e.options.onColumnSizingChange?void 0:e.options.onColumnSizingChange(t)},setColumnSizingInfo:function(t){return null==e.options.onColumnSizingInfoChange?void 0:e.options.onColumnSizingInfoChange(t)},resetColumnSizing:function(t){var n;e.setColumnSizing(t?{}:null!=(n=e.initialState.columnSizing)?n:{})},resetHeaderSizeInfo:function(t){var n;e.setColumnSizingInfo(t?{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}:null!=(n=e.initialState.columnSizingInfo)?n:{startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]})},getTotalSize:function(){var t,n;return null!=(t=null==(n=e.getHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0},getLeftTotalSize:function(){var t,n;return null!=(t=null==(n=e.getLeftHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0},getCenterTotalSize:function(){var t,n;return null!=(t=null==(n=e.getCenterHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0},getRightTotalSize:function(){var t,n;return null!=(t=null==(n=e.getRightHeaderGroups()[0])?void 0:n.headers.reduce((function(e,t){return e+t.getSize()}),0))?t:0}}}},JP=null;function ZP(e){return"touchstart"===e.type}var eA={getInitialState:function(e){return h({expanded:{}},e)},getDefaultOptions:function(e){return{onExpandedChange:UP("expanded",e),paginateExpandedRows:!0}},createTable:function(e){var t=!1,n=!1;return{_autoResetExpanded:function(){var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetExpanded)?r:!e.options.manualExpanding){if(n)return;n=!0,e._queue((function(){e.resetExpanded(),n=!1}))}}else e._queue((function(){t=!0}))},setExpanded:function(t){return null==e.options.onExpandedChange?void 0:e.options.onExpandedChange(t)},toggleAllRowsExpanded:function(t){(null!=t?t:!e.getIsAllRowsExpanded())?e.setExpanded(!0):e.setExpanded({})},resetExpanded:function(t){var n,r;e.setExpanded(t?{}:null!=(n=null==(r=e.initialState)?void 0:r.expanded)?n:{})},getCanSomeRowsExpand:function(){return e.getPrePaginationRowModel().flatRows.some((function(e){return e.getCanExpand()}))},getToggleAllRowsExpandedHandler:function(){return function(t){null==t.persist||t.persist(),e.toggleAllRowsExpanded()}},getIsSomeRowsExpanded:function(){var t=e.getState().expanded;return!0===t||Object.values(t).some(Boolean)},getIsAllRowsExpanded:function(){var t=e.getState().expanded;return"boolean"===typeof t?!0===t:!!Object.keys(t).length&&!e.getRowModel().flatRows.some((function(e){return!e.getIsExpanded()}))},getExpandedDepth:function(){var t=0;return(!0===e.getState().expanded?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach((function(e){var n=e.split(".");t=Math.max(t,n.length)})),t},getPreExpandedRowModel:function(){return e.getSortedRowModel()},getExpandedRowModel:function(){return!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel()}}},createRow:function(e,t){return{toggleExpanded:function(n){t.setExpanded((function(r){var o,i=!0===r||!(null==r||!r[e.id]),a={};if(!0===r?Object.keys(t.getRowModel().rowsById).forEach((function(e){a[e]=!0})):a=r,n=null!=(o=n)?o:!i,!i&&n)return h(h({},a),{},f({},e.id,!0));if(i&&!n){var l=a,u=e.id;l[u];return p(l,[u].map(c))}return r}))},getIsExpanded:function(){var n,r=t.getState().expanded;return!!(null!=(n=null==t.options.getIsRowExpanded?void 0:t.options.getIsRowExpanded(e))?n:!0===r||(null==r?void 0:r[e.id]))},getCanExpand:function(){var n,r,o;return null!=(n=null==t.options.getRowCanExpand?void 0:t.options.getRowCanExpand(e))?n:(null==(r=t.options.enableExpanding)||r)&&!(null==(o=e.subRows)||!o.length)},getToggleExpandedHandler:function(){var t=e.getCanExpand();return function(){t&&e.toggleExpanded()}}}}},tA=function(e,t,n){var r,o,i,a=n.toLowerCase();return Boolean(null==(r=e.getValue(t))||null==(o=r.toString())||null==(i=o.toLowerCase())?void 0:i.includes(a))};tA.autoRemove=function(e){return fA(e)};var nA=function(e,t,n){var r,o;return Boolean(null==(r=e.getValue(t))||null==(o=r.toString())?void 0:o.includes(n))};nA.autoRemove=function(e){return fA(e)};var rA=function(e,t,n){var r,o;return(null==(r=e.getValue(t))||null==(o=r.toString())?void 0:o.toLowerCase())===(null==n?void 0:n.toLowerCase())};rA.autoRemove=function(e){return fA(e)};var oA=function(e,t,n){var r;return null==(r=e.getValue(t))?void 0:r.includes(n)};oA.autoRemove=function(e){return fA(e)||!(null!=e&&e.length)};var iA=function(e,t,n){return!n.some((function(n){var r;return!(null!=(r=e.getValue(t))&&r.includes(n))}))};iA.autoRemove=function(e){return fA(e)||!(null!=e&&e.length)};var aA=function(e,t,n){return n.some((function(n){var r;return null==(r=e.getValue(t))?void 0:r.includes(n)}))};aA.autoRemove=function(e){return fA(e)||!(null!=e&&e.length)};var lA=function(e,t,n){return e.getValue(t)===n};lA.autoRemove=function(e){return fA(e)};var uA=function(e,t,n){return e.getValue(t)==n};uA.autoRemove=function(e){return fA(e)};var sA=function(e,t,n){var r=ut(n,2),o=r[0],i=r[1],a=e.getValue(t);return a>=o&&a<=i};sA.resolveFilterValue=function(e){var t=ut(e,2),n=t[0],r=t[1],o="number"!==typeof n?parseFloat(n):n,i="number"!==typeof r?parseFloat(r):r,a=null===n||Number.isNaN(o)?-1/0:o,l=null===r||Number.isNaN(i)?1/0:i;if(a>l){var u=a;a=l,l=u}return[a,l]},sA.autoRemove=function(e){return fA(e)||fA(e[0])&&fA(e[1])};var cA={includesString:tA,includesStringSensitive:nA,equalsString:rA,arrIncludes:oA,arrIncludesAll:iA,arrIncludesSome:aA,equals:lA,weakEquals:uA,inNumberRange:sA};function fA(e){return void 0===e||null===e||""===e}var dA={getDefaultColumnDef:function(){return{filterFn:"auto"}},getInitialState:function(e){return h({columnFilters:[],globalFilter:void 0},e)},getDefaultOptions:function(e){return{onColumnFiltersChange:UP("columnFilters",e),onGlobalFilterChange:UP("globalFilter",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100,globalFilterFn:"auto",getColumnCanGlobalFilter:function(t){var n,r,o=null==(n=e.getCoreRowModel().flatRows[0])||null==(r=n._getAllCellsByColumnId()[t.id])?void 0:r.getValue();return"string"===typeof o||"number"===typeof o}}},createColumn:function(e,t){return{getAutoFilterFn:function(){var n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"string"===typeof r?cA.includesString:"number"===typeof r?cA.inNumberRange:"boolean"===typeof r||null!==r&&"object"===typeof r?cA.equals:Array.isArray(r)?cA.arrIncludes:cA.weakEquals},getFilterFn:function(){var n,r;return WP(e.columnDef.filterFn)?e.columnDef.filterFn:"auto"===e.columnDef.filterFn?e.getAutoFilterFn():null!=(n=null==(r=t.options.filterFns)?void 0:r[e.columnDef.filterFn])?n:cA[e.columnDef.filterFn]},getCanFilter:function(){var n,r,o;return(null==(n=e.columnDef.enableColumnFilter)||n)&&(null==(r=t.options.enableColumnFilters)||r)&&(null==(o=t.options.enableFilters)||o)&&!!e.accessorFn},getCanGlobalFilter:function(){var n,r,o,i;return(null==(n=e.columnDef.enableGlobalFilter)||n)&&(null==(r=t.options.enableGlobalFilter)||r)&&(null==(o=t.options.enableFilters)||o)&&(null==(i=null==t.options.getColumnCanGlobalFilter?void 0:t.options.getColumnCanGlobalFilter(e))||i)&&!!e.accessorFn},getIsFiltered:function(){return e.getFilterIndex()>-1},getFilterValue:function(){var n,r;return null==(n=t.getState().columnFilters)||null==(r=n.find((function(t){return t.id===e.id})))?void 0:r.value},getFilterIndex:function(){var n,r;return null!=(n=null==(r=t.getState().columnFilters)?void 0:r.findIndex((function(t){return t.id===e.id})))?n:-1},setFilterValue:function(n){t.setColumnFilters((function(t){var r,o=e.getFilterFn(),i=null==t?void 0:t.find((function(t){return t.id===e.id})),a=HP(n,i?i.value:void 0);if(hA(o,a,e))return null!=(r=null==t?void 0:t.filter((function(t){return t.id!==e.id})))?r:[];var l,u={id:e.id,value:a};return i?null!=(l=null==t?void 0:t.map((function(t){return t.id===e.id?u:t})))?l:[]:null!=t&&t.length?[].concat(bt(t),[u]):[u]}))},_getFacetedRowModel:t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),getFacetedRowModel:function(){return e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel()},_getFacetedUniqueValues:t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.id),getFacetedUniqueValues:function(){return e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map},_getFacetedMinMaxValues:t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),getFacetedMinMaxValues:function(){if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},createRow:function(e,t){return{columnFilters:{},columnFiltersMeta:{}}},createTable:function(e){return{getGlobalAutoFilterFn:function(){return cA.includesString},getGlobalFilterFn:function(){var t,n,r=e.options.globalFilterFn;return WP(r)?r:"auto"===r?e.getGlobalAutoFilterFn():null!=(t=null==(n=e.options.filterFns)?void 0:n[r])?t:cA[r]},setColumnFilters:function(t){var n=e.getAllLeafColumns();null==e.options.onColumnFiltersChange||e.options.onColumnFiltersChange((function(e){var r;return null==(r=HP(t,e))?void 0:r.filter((function(e){var t=n.find((function(t){return t.id===e.id}));if(t&&hA(t.getFilterFn(),e.value,t))return!1;return!0}))}))},setGlobalFilter:function(t){null==e.options.onGlobalFilterChange||e.options.onGlobalFilterChange(t)},resetGlobalFilter:function(t){e.setGlobalFilter(t?void 0:e.initialState.globalFilter)},resetColumnFilters:function(t){var n,r;e.setColumnFilters(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.columnFilters)?n:[])},getPreFilteredRowModel:function(){return e.getCoreRowModel()},getFilteredRowModel:function(){return!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel()},_getGlobalFacetedRowModel:e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),getGlobalFacetedRowModel:function(){return e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel()},_getGlobalFacetedUniqueValues:e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),getGlobalFacetedUniqueValues:function(){return e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map},_getGlobalFacetedMinMaxValues:e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),getGlobalFacetedMinMaxValues:function(){if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}}};function hA(e,t,n){return!(!e||!e.autoRemove)&&e.autoRemove(t,n)||"undefined"===typeof t||"string"===typeof t&&!t}var pA={sum:function(e,t,n){return n.reduce((function(t,n){var r=n.getValue(e);return t+("number"===typeof r?r:0)}),0)},min:function(e,t,n){var r;return n.forEach((function(t){var n=t.getValue(e);null!=n&&(r>n||void 0===r&&n>=n)&&(r=n)})),r},max:function(e,t,n){var r;return n.forEach((function(t){var n=t.getValue(e);null!=n&&(r=n)&&(r=n)})),r},extent:function(e,t,n){var r,o;return n.forEach((function(t){var n=t.getValue(e);null!=n&&(void 0===r?n>=n&&(r=o=n):(r>n&&(r=n),o=o&&(++n,r+=o)})),n)return r/n},median:function(e,t){if(t.length){var n=t.map((function(t){return t.getValue(e)}));if(function(e){return Array.isArray(e)&&e.every((function(e){return"number"===typeof e}))}(n)){if(1===n.length)return n[0];var r=Math.floor(n.length/2),o=n.sort((function(e,t){return e-t}));return n.length%2!==0?o[r]:(o[r-1]+o[r])/2}}},unique:function(e,t){return Array.from(new Set(t.map((function(t){return t.getValue(e)}))).values())},uniqueCount:function(e,t){return new Set(t.map((function(t){return t.getValue(e)}))).size},count:function(e,t){return t.length}},vA={getDefaultColumnDef:function(){return{aggregatedCell:function(e){var t,n;return null!=(t=null==(n=e.getValue())||null==n.toString?void 0:n.toString())?t:null},aggregationFn:"auto"}},getInitialState:function(e){return h({grouping:[]},e)},getDefaultOptions:function(e){return{onGroupingChange:UP("grouping",e),groupedColumnMode:"reorder"}},createColumn:function(e,t){return{toggleGrouping:function(){t.setGrouping((function(t){return null!=t&&t.includes(e.id)?t.filter((function(t){return t!==e.id})):[].concat(bt(null!=t?t:[]),[e.id])}))},getCanGroup:function(){var n,r,o,i;return null!=(n=null==(r=null!=(o=null==(i=e.columnDef.enableGrouping)||i)?o:t.options.enableGrouping)||r)?n:!!e.accessorFn},getIsGrouped:function(){var n;return null==(n=t.getState().grouping)?void 0:n.includes(e.id)},getGroupedIndex:function(){var n;return null==(n=t.getState().grouping)?void 0:n.indexOf(e.id)},getToggleGroupingHandler:function(){var t=e.getCanGroup();return function(){t&&e.toggleGrouping()}},getAutoAggregationFn:function(){var n=t.getCoreRowModel().flatRows[0],r=null==n?void 0:n.getValue(e.id);return"number"===typeof r?pA.sum:"[object Date]"===Object.prototype.toString.call(r)?pA.extent:void 0},getAggregationFn:function(){var n,r;if(!e)throw new Error;return WP(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:"auto"===e.columnDef.aggregationFn?e.getAutoAggregationFn():null!=(n=null==(r=t.options.aggregationFns)?void 0:r[e.columnDef.aggregationFn])?n:pA[e.columnDef.aggregationFn]}}},createTable:function(e){return{setGrouping:function(t){return null==e.options.onGroupingChange?void 0:e.options.onGroupingChange(t)},resetGrouping:function(t){var n,r;e.setGrouping(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.grouping)?n:[])},getPreGroupedRowModel:function(){return e.getFilteredRowModel()},getGroupedRowModel:function(){return!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel()}}},createRow:function(e,t){return{getIsGrouped:function(){return!!e.groupingColumnId},getGroupingValue:function(n){if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];var r=t.getColumn(n);return null!=r&&r.columnDef.getGroupingValue?(e._groupingValuesCache[n]=r.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},_groupingValuesCache:{}}},createCell:function(e,t,n,r){return{getIsGrouped:function(){return t.getIsGrouped()&&t.id===n.groupingColumnId},getIsPlaceholder:function(){return!e.getIsGrouped()&&t.getIsGrouped()},getIsAggregated:function(){var t;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!(null==(t=n.subRows)||!t.length)}}}};var gA={getInitialState:function(e){return h({columnOrder:[]},e)},getDefaultOptions:function(e){return{onColumnOrderChange:UP("columnOrder",e)}},createTable:function(e){return{setColumnOrder:function(t){return null==e.options.onColumnOrderChange?void 0:e.options.onColumnOrderChange(t)},resetColumnOrder:function(t){var n;e.setColumnOrder(t?[]:null!=(n=e.initialState.columnOrder)?n:[])},_getOrderColumnsFn:qP((function(){return[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode]}),(function(e,t,n){return function(r){var o=[];if(null!=e&&e.length){for(var i=bt(e),a=bt(r),l=function(){var e=i.shift(),t=a.findIndex((function(t){return t.id===e}));t>-1&&o.push(a.splice(t,1)[0])};a.length&&i.length;)l();o=[].concat(bt(o),bt(a))}else o=r;return function(e,t,n){if(null==t||!t.length||!n)return e;var r=e.filter((function(e){return!t.includes(e.id)}));if("remove"===n)return r;var o=t.map((function(t){return e.find((function(e){return e.id===t}))})).filter(Boolean);return[].concat(bt(o),bt(r))}(o,t,n)}}),{key:!1})}}},mA={getInitialState:function(e){return h(h({},e),{},{pagination:h(h({},{pageIndex:0,pageSize:10}),null==e?void 0:e.pagination)})},getDefaultOptions:function(e){return{onPaginationChange:UP("pagination",e)}},createTable:function(e){var t=!1,n=!1;return{_autoResetPageIndex:function(){var r,o;if(t){if(null!=(r=null!=(o=e.options.autoResetAll)?o:e.options.autoResetPageIndex)?r:!e.options.manualPagination){if(n)return;n=!0,e._queue((function(){e.resetPageIndex(),n=!1}))}}else e._queue((function(){t=!0}))},setPagination:function(t){return null==e.options.onPaginationChange?void 0:e.options.onPaginationChange((function(e){return HP(t,e)}))},resetPagination:function(t){var n;e.setPagination(t?{pageIndex:0,pageSize:10}:null!=(n=e.initialState.pagination)?n:{pageIndex:0,pageSize:10})},setPageIndex:function(t){e.setPagination((function(n){var r=HP(t,n.pageIndex),o="undefined"===typeof e.options.pageCount||-1===e.options.pageCount?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),h(h({},n),{},{pageIndex:r})}))},resetPageIndex:function(t){var n,r,o;e.setPageIndex(t?0:null!=(n=null==(r=e.initialState)||null==(o=r.pagination)?void 0:o.pageIndex)?n:0)},resetPageSize:function(t){var n,r,o;e.setPageSize(t?10:null!=(n=null==(r=e.initialState)||null==(o=r.pagination)?void 0:o.pageSize)?n:10)},setPageSize:function(t){e.setPagination((function(e){var n=Math.max(1,HP(t,e.pageSize)),r=e.pageSize*e.pageIndex,o=Math.floor(r/n);return h(h({},e),{},{pageIndex:o,pageSize:n})}))},setPageCount:function(t){return e.setPagination((function(n){var r,o=HP(t,null!=(r=e.options.pageCount)?r:-1);return"number"===typeof o&&(o=Math.max(-1,o)),h(h({},n),{},{pageCount:o})}))},getPageOptions:qP((function(){return[e.getPageCount()]}),(function(e){var t=[];return e&&e>0&&(t=bt(new Array(e)).fill(null).map((function(e,t){return t}))),t}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getCanPreviousPage:function(){return e.getState().pagination.pageIndex>0},getCanNextPage:function(){var t=e.getState().pagination.pageIndex,n=e.getPageCount();return-1===n||0!==n&&t0&&nt?1:-1}function CA(e){return"number"===typeof e?isNaN(e)||e===1/0||e===-1/0?"":String(e):"string"===typeof e?e:""}function EA(e,t){for(var n=e.split(kA).filter(Boolean),r=t.split(kA).filter(Boolean);n.length&&r.length;){var o=n.shift(),i=r.shift(),a=parseInt(o,10),l=parseInt(i,10),u=[a,l].sort();if(isNaN(u[0])){if(o>i)return 1;if(i>o)return-1}else{if(isNaN(u[1]))return isNaN(a)?-1:1;if(a>l)return 1;if(l>a)return-1}}return n.length-r.length}var OA={alphanumeric:function(e,t,n){return EA(CA(e.getValue(n)).toLowerCase(),CA(t.getValue(n)).toLowerCase())},alphanumericCaseSensitive:function(e,t,n){return EA(CA(e.getValue(n)),CA(t.getValue(n)))},text:function(e,t,n){return TA(CA(e.getValue(n)).toLowerCase(),CA(t.getValue(n)).toLowerCase())},textCaseSensitive:function(e,t,n){return TA(CA(e.getValue(n)),CA(t.getValue(n)))},datetime:function(e,t,n){var r=e.getValue(n),o=t.getValue(n);return r>o?1:r1))return OA.alphanumeric}}catch(l){o.e(l)}finally{o.f()}return r?OA.text:OA.basic},getAutoSortDir:function(){var n=t.getFilteredRowModel().flatRows[0];return"string"===typeof(null==n?void 0:n.getValue(e.id))?"asc":"desc"},getSortingFn:function(){var n,r;if(!e)throw new Error;return WP(e.columnDef.sortingFn)?e.columnDef.sortingFn:"auto"===e.columnDef.sortingFn?e.getAutoSortingFn():null!=(n=null==(r=t.options.sortingFns)?void 0:r[e.columnDef.sortingFn])?n:OA[e.columnDef.sortingFn]},toggleSorting:function(n,r){var o=e.getNextSortingOrder(),i="undefined"!==typeof n&&null!==n;t.setSorting((function(a){var l,u,s=null==a?void 0:a.find((function(t){return t.id===e.id})),c=null==a?void 0:a.findIndex((function(t){return t.id===e.id})),f=[],d=i?n:"desc"===o;("toggle"===(l=null!=a&&a.length&&e.getCanMultiSort()&&r?s?"toggle":"add":null!=a&&a.length&&c!==a.length-1?"replace":s?"toggle":"replace")&&(i||o||(l="remove")),"add"===l)?(f=[].concat(bt(a),[{id:e.id,desc:d}])).splice(0,f.length-(null!=(u=t.options.maxMultiSortColCount)?u:Number.MAX_SAFE_INTEGER)):f="toggle"===l?a.map((function(t){return t.id===e.id?h(h({},t),{},{desc:d}):t})):"remove"===l?a.filter((function(t){return t.id!==e.id})):[{id:e.id,desc:d}];return f}))},getFirstSortDir:function(){var n,r;return(null!=(n=null!=(r=e.columnDef.sortDescFirst)?r:t.options.sortDescFirst)?n:"desc"===e.getAutoSortDir())?"desc":"asc"},getNextSortingOrder:function(n){var r,o,i=e.getFirstSortDir(),a=e.getIsSorted();return a?!!(a===i||null!=(r=t.options.enableSortingRemoval)&&!r||n&&null!=(o=t.options.enableMultiRemove)&&!o)&&("desc"===a?"asc":"desc"):i},getCanSort:function(){var n,r;return(null==(n=e.columnDef.enableSorting)||n)&&(null==(r=t.options.enableSorting)||r)&&!!e.accessorFn},getCanMultiSort:function(){var n,r;return null!=(n=null!=(r=e.columnDef.enableMultiSort)?r:t.options.enableMultiSort)?n:!!e.accessorFn},getIsSorted:function(){var n,r=null==(n=t.getState().sorting)?void 0:n.find((function(t){return t.id===e.id}));return!!r&&(r.desc?"desc":"asc")},getSortIndex:function(){var n,r;return null!=(n=null==(r=t.getState().sorting)?void 0:r.findIndex((function(t){return t.id===e.id})))?n:-1},clearSorting:function(){t.setSorting((function(t){return null!=t&&t.length?t.filter((function(t){return t.id!==e.id})):[]}))},getToggleSortingHandler:function(){var n=e.getCanSort();return function(r){n&&(null==r.persist||r.persist(),null==e.toggleSorting||e.toggleSorting(void 0,!!e.getCanMultiSort()&&(null==t.options.isMultiSortEvent?void 0:t.options.isMultiSortEvent(r))))}}}},createTable:function(e){return{setSorting:function(t){return null==e.options.onSortingChange?void 0:e.options.onSortingChange(t)},resetSorting:function(t){var n,r;e.setSorting(t?[]:null!=(n=null==(r=e.initialState)?void 0:r.sorting)?n:[])},getPreSortedRowModel:function(){return e.getGroupedRowModel()},getSortedRowModel:function(){return!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel()}}}},PA={getInitialState:function(e){return h({columnVisibility:{}},e)},getDefaultOptions:function(e){return{onColumnVisibilityChange:UP("columnVisibility",e)}},createColumn:function(e,t){return{toggleVisibility:function(n){e.getCanHide()&&t.setColumnVisibility((function(t){return h(h({},t),{},f({},e.id,null!=n?n:!e.getIsVisible()))}))},getIsVisible:function(){var n,r;return null==(n=null==(r=t.getState().columnVisibility)?void 0:r[e.id])||n},getCanHide:function(){var n,r;return(null==(n=e.columnDef.enableHiding)||n)&&(null==(r=t.options.enableHiding)||r)},getToggleVisibilityHandler:function(){return function(t){null==e.toggleVisibility||e.toggleVisibility(t.target.checked)}}}},createRow:function(e,t){return{_getAllVisibleCells:qP((function(){return[e.getAllCells(),t.getState().columnVisibility]}),(function(e){return e.filter((function(e){return e.column.getIsVisible()}))}),{key:"row._getAllVisibleCells",debug:function(){var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}}),getVisibleCells:qP((function(){return[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()]}),(function(e,t,n){return[].concat(bt(e),bt(t),bt(n))}),{key:!1,debug:function(){var e;return null!=(e=t.options.debugAll)?e:t.options.debugRows}})}},createTable:function(e){var t=function(t,n){return qP((function(){return[n(),n().filter((function(e){return e.getIsVisible()})).map((function(e){return e.id})).join("_")]}),(function(e){return e.filter((function(e){return null==e.getIsVisible?void 0:e.getIsVisible()}))}),{key:t,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};return{getVisibleFlatColumns:t("getVisibleFlatColumns",(function(){return e.getAllFlatColumns()})),getVisibleLeafColumns:t("getVisibleLeafColumns",(function(){return e.getAllLeafColumns()})),getLeftVisibleLeafColumns:t("getLeftVisibleLeafColumns",(function(){return e.getLeftLeafColumns()})),getRightVisibleLeafColumns:t("getRightVisibleLeafColumns",(function(){return e.getRightLeafColumns()})),getCenterVisibleLeafColumns:t("getCenterVisibleLeafColumns",(function(){return e.getCenterLeafColumns()})),setColumnVisibility:function(t){return null==e.options.onColumnVisibilityChange?void 0:e.options.onColumnVisibilityChange(t)},resetColumnVisibility:function(t){var n;e.setColumnVisibility(t?{}:null!=(n=e.initialState.columnVisibility)?n:{})},toggleAllColumnsVisible:function(t){var n;t=null!=(n=t)?n:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((function(e,n){return h(h({},e),{},f({},n.id,t||!(null!=n.getCanHide&&n.getCanHide())))}),{}))},getIsAllColumnsVisible:function(){return!e.getAllLeafColumns().some((function(e){return!(null!=e.getIsVisible&&e.getIsVisible())}))},getIsSomeColumnsVisible:function(){return e.getAllLeafColumns().some((function(e){return null==e.getIsVisible?void 0:e.getIsVisible()}))},getToggleAllColumnsVisibilityHandler:function(){return function(t){var n;e.toggleAllColumnsVisible(null==(n=t.target)?void 0:n.checked)}}}}},AA=[$P,PA,gA,yA,dA,jA,vA,eA,mA,bA,XP];function RA(e){var t;(e.debugAll||e.debugTable)&&console.info("Creating Table Instance...");var n={_features:AA},r=n._features.reduce((function(e,t){return Object.assign(e,null==t.getDefaultOptions?void 0:t.getDefaultOptions(n))}),{}),o=h(h({},{}),null!=(t=e.initialState)?t:{});n._features.forEach((function(e){var t;o=null!=(t=null==e.getInitialState?void 0:e.getInitialState(o))?t:o}));var i=[],a=!1,l={_features:AA,options:h(h({},r),e),initialState:o,_queue:function(e){i.push(e),a||(a=!0,Promise.resolve().then((function(){for(;i.length;)i.shift()();a=!1})).catch((function(e){return setTimeout((function(){throw e}))})))},reset:function(){n.setState(n.initialState)},setOptions:function(e){var t=HP(e,n.options);n.options=function(e){return n.options.mergeOptions?n.options.mergeOptions(r,e):h(h({},r),e)}(t)},getState:function(){return n.options.state},setState:function(e){null==n.options.onStateChange||n.options.onStateChange(e)},_getRowId:function(e,t,r){var o;return null!=(o=null==n.options.getRowId?void 0:n.options.getRowId(e,t,r))?o:"".concat(r?[r.id,t].join("."):t)},getCoreRowModel:function(){return n._getCoreRowModel||(n._getCoreRowModel=n.options.getCoreRowModel(n)),n._getCoreRowModel()},getRowModel:function(){return n.getPaginationRowModel()},getRow:function(e){var t=n.getRowModel().rowsById[e];if(!t)throw new Error;return t},_getDefaultColumnDef:qP((function(){return[n.options.defaultColumn]}),(function(e){var t;return e=null!=(t=e)?t:{},h(h({header:function(e){var t=e.header.column.columnDef;return t.accessorKey?t.accessorKey:t.accessorFn?t.id:null},cell:function(e){var t,n;return null!=(t=null==(n=e.renderValue())||null==n.toString?void 0:n.toString())?t:null}},n._features.reduce((function(e,t){return Object.assign(e,null==t.getDefaultColumnDef?void 0:t.getDefaultColumnDef())}),{})),e)}),{debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns},key:!1}),_getColumnDefs:function(){return n.options.columns},getAllColumns:qP((function(){return[n._getColumnDefs()]}),(function(e){return function e(t,r,o){return void 0===o&&(o=0),t.map((function(t){var i=function(e,t,n,r){var o,i,a,l=h(h({},e._getDefaultColumnDef()),t),u=l.accessorKey,s=null!=(o=null!=(i=l.id)?i:u?u.replace(".","_"):void 0)?o:"string"===typeof l.header?l.header:void 0;if(l.accessorFn?a=l.accessorFn:u&&(a=u.includes(".")?function(e){var t,n=e,r=mt(u.split("."));try{for(r.s();!(t=r.n()).done;){var o,i=t.value;n=null==(o=n)?void 0:o[i]}}catch(a){r.e(a)}finally{r.f()}return n}:function(e){return e[l.accessorKey]}),!s)throw new Error;var c={id:"".concat(String(s)),accessorFn:a,parent:r,depth:n,columnDef:l,columns:[],getFlatColumns:qP((function(){return[!0]}),(function(){var e;return[c].concat(bt(null==(e=c.columns)?void 0:e.flatMap((function(e){return e.getFlatColumns()}))))}),{key:"column.getFlatColumns",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}}),getLeafColumns:qP((function(){return[e._getOrderColumnsFn()]}),(function(e){var t;if(null!=(t=c.columns)&&t.length){var n=c.columns.flatMap((function(e){return e.getLeafColumns()}));return e(n)}return[c]}),{key:"column.getLeafColumns",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugColumns}})};return c=e._features.reduce((function(t,n){return Object.assign(t,null==n.createColumn?void 0:n.createColumn(c,e))}),c)}(n,t,o,r),a=t;return i.columns=a.columns?e(a.columns,i,o+1):[],i}))}(e)}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllFlatColumns:qP((function(){return[n.getAllColumns()]}),(function(e){return e.flatMap((function(e){return e.getFlatColumns()}))}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),_getAllFlatColumnsById:qP((function(){return[n.getAllFlatColumns()]}),(function(e){return e.reduce((function(e,t){return e[t.id]=t,e}),{})}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getAllLeafColumns:qP((function(){return[n.getAllColumns(),n._getOrderColumnsFn()]}),(function(e,t){var n=e.flatMap((function(e){return e.getLeafColumns()}));return t(n)}),{key:!1,debug:function(){var e;return null!=(e=n.options.debugAll)?e:n.options.debugColumns}}),getColumn:function(e){return n._getAllFlatColumnsById()[e]}};return Object.assign(n,l),n._features.forEach((function(e){return Object.assign(n,null==e.createTable?void 0:e.createTable(n))})),n}var IA=function(e,t,n,r,o,i,a){for(var l={id:t,index:r,original:n,depth:o,parentId:a,_valuesCache:{},_uniqueValuesCache:{},getValue:function(t){if(l._valuesCache.hasOwnProperty(t))return l._valuesCache[t];var n=e.getColumn(t);return null!=n&&n.accessorFn?(l._valuesCache[t]=n.accessorFn(l.original,r),l._valuesCache[t]):void 0},getUniqueValues:function(t){if(l._uniqueValuesCache.hasOwnProperty(t))return l._uniqueValuesCache[t];var n=e.getColumn(t);return null!=n&&n.accessorFn?n.columnDef.getUniqueValues?(l._uniqueValuesCache[t]=n.columnDef.getUniqueValues(l.original,r),l._uniqueValuesCache[t]):(l._uniqueValuesCache[t]=[l.getValue(t)],l._uniqueValuesCache[t]):void 0},renderValue:function(t){var n;return null!=(n=l.getValue(t))?n:e.options.renderFallbackValue},subRows:null!=i?i:[],getLeafRows:function(){return GP(l.subRows,(function(e){return e.subRows}))},getParentRow:function(){return l.parentId?e.getRow(l.parentId):void 0},getParentRows:function(){for(var e=[],t=l;;){var n=t.getParentRow();if(!n)break;e.push(n),t=n}return e.reverse()},getAllCells:qP((function(){return[e.getAllLeafColumns()]}),(function(t){return t.map((function(t){return function(e,t,n,r){var o={id:"".concat(t.id,"_").concat(n.id),row:t,column:n,getValue:function(){return t.getValue(r)},renderValue:function(){var t;return null!=(t=o.getValue())?t:e.options.renderFallbackValue},getContext:qP((function(){return[e,n,t,o]}),(function(e,t,n,r){return{table:e,column:t,row:n,cell:r,getValue:r.getValue,renderValue:r.renderValue}}),{key:!1,debug:function(){return e.options.debugAll}})};return e._features.forEach((function(r){Object.assign(o,null==r.createCell?void 0:r.createCell(o,n,t,e))}),{}),o}(e,l,t,t.id)}))}),{key:!1,debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}}),_getAllCellsByColumnId:qP((function(){return[l.getAllCells()]}),(function(e){return e.reduce((function(e,t){return e[t.column.id]=t,e}),{})}),{key:"row.getAllCellsByColumnId",debug:function(){var t;return null!=(t=e.options.debugAll)?t:e.options.debugRows}})},u=0;ui?-1:0}},{id:"finished",header:"Finished Tasks",accessorFn:function(e){return e},maxSize:100,cell:function(e){var n=e.row.original,r=n.finished,o=n.inprogress+n.queued+n.finished;return rnew Date(n.lastUpdated)&&(n.lastUpdated=t.lastModifiedAt),t.outputSize&&t.outputSize>0&&(n.outputCount+=1),n}),{finished:0,inprogress:0,queued:0,outputCount:0,lastUpdated:null});return h({id:e.id,name:e.name,tome:e.tome.name,creator:e.creator},t)}));return t.sort((function(e,t){return new Date(t.lastUpdated).getTime()-new Date(e.lastUpdated).getTime()}))}),[]),s=u((null===i||void 0===i?void 0:i.quests)||[]),c=(0,a.useMemo)((function(){return s.filter((function(e){var n=t.toLowerCase(),r=e.name.toLowerCase(),o=e.tome.toLowerCase();return r.includes(n)||o.includes(n)}))}),[t,s]);return{hasData:s.length>0,data:c,loading:o,error:l,setSearch:n}}(),n=e.hasData,r=e.data,o=e.loading,i=e.error,l=e.setSearch;return(0,t.jsxs)(Sj,{currNavItem:GC.quests,children:[(0,t.jsx)("div",{className:"border-b border-gray-200 pb-5 sm:flex sm:items-center sm:justify-between",children:(0,t.jsx)("h3",{className:"text-xl font-semibold leading-6 text-gray-900",children:"Quest history"})}),(0,t.jsx)("div",{className:"flex flex-col justify-center items-center",children:o?(0,t.jsx)(q_,{type:G_.loading,label:"Loading quests..."}):i?(0,t.jsx)(q_,{type:G_.error,label:"Error loading quests"}):n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"p-4 bg-white rounded-lg shadow-lg mt-2 flex flex-col gap-1 w-full",children:(0,t.jsx)(iP,{setSearch:l,placeholder:"Search by quest or tome name"})}),r.length>0?(0,t.jsx)("div",{className:"py-4 bg-white rounded-lg shadow-lg mt-2 flex flex-col gap-1 w-full",children:(0,t.jsx)(GA,{quests:r})}):(0,t.jsx)(q_,{label:"No quests matching search term",type:G_.noMatches})]}):(0,t.jsx)(Q_,{})})]})}),JA={data:void 0,isLoading:!1,error:void 0},ZA=(0,a.createContext)(JA),eR=function(e){var n=e.children,r=hj(rO(VA||(VA=YC(["\n query GetSearchFilters($groupTag: TagWhereInput, $serviceTag: TagWhereInput){\n groupTags:tags(where: $groupTag) {\n id\n name\n kind\n },\n serviceTags:tags(where: $serviceTag) {\n id\n name\n kind\n },\n beacons {\n id\n name\n principal\n lastSeenAt\n interval\n host{\n id\n name\n primaryIP\n platform\n tags {\n id\n kind\n name\n }\n }\n },\n hosts{\n id\n name\n }\n }\n "]))),{variables:{groupTag:{kind:"group"},serviceTag:{kind:"service"}}}),o=r.loading,i=r.error,l=r.data,u=r.startPolling,s=r.stopPolling;return(0,a.useEffect)((function(){return u(6e4),function(){s()}}),[u,s]),(0,t.jsx)(ZA.Provider,{value:{data:l,isLoading:o,error:i},children:n})},tR=n(3457),nR=n.n(tR),rR=function(e){return function(e){return!!e&&"object"===typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===oR}(e)}(e)};var oR="function"===typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function iR(e,t){return!1!==t.clone&&t.isMergeableObject(e)?lR((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function aR(e,t,n){return e.concat(t).map((function(e){return iR(e,n)}))}function lR(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||aR,n.isMergeableObject=n.isMergeableObject||rR;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):function(e,t,n){var r={};return n.isMergeableObject(e)&&Object.keys(e).forEach((function(t){r[t]=iR(e[t],n)})),Object.keys(t).forEach((function(o){n.isMergeableObject(t[o])&&e[o]?r[o]=lR(e[o],t[o],n):r[o]=iR(t[o],n)})),r}(e,t,n):iR(t,n)}lR.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(e,n){return lR(e,n,t)}),{})};var uR=lR,sR="object"==typeof global&&global&&global.Object===Object&&global,cR="object"==typeof self&&self&&self.Object===Object&&self,fR=sR||cR||Function("return this")(),dR=fR.Symbol,hR=Object.prototype,pR=hR.hasOwnProperty,vR=hR.toString,gR=dR?dR.toStringTag:void 0;var mR=function(e){var t=pR.call(e,gR),n=e[gR];try{e[gR]=void 0;var r=!0}catch(i){}var o=vR.call(e);return r&&(t?e[gR]=n:delete e[gR]),o},yR=Object.prototype.toString;var bR=function(e){return yR.call(e)},xR="[object Null]",wR="[object Undefined]",SR=dR?dR.toStringTag:void 0;var _R=function(e){return null==e?void 0===e?wR:xR:SR&&SR in Object(e)?mR(e):bR(e)};var kR=function(e,t){return function(n){return e(t(n))}},TR=kR(Object.getPrototypeOf,Object);var CR=function(e){return null!=e&&"object"==typeof e},ER="[object Object]",OR=Function.prototype,jR=Object.prototype,PR=OR.toString,AR=jR.hasOwnProperty,RR=PR.call(Object);var IR=function(e){if(!CR(e)||_R(e)!=ER)return!1;var t=TR(e);if(null===t)return!0;var n=AR.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&PR.call(n)==RR};var MR=function(){this.__data__=[],this.size=0};var DR=function(e,t){return e===t||e!==e&&t!==t};var NR=function(e,t){for(var n=e.length;n--;)if(DR(e[n][0],t))return n;return-1},LR=Array.prototype.splice;var FR=function(e){var t=this.__data__,n=NR(t,e);return!(n<0)&&(n==t.length-1?t.pop():LR.call(t,n,1),--this.size,!0)};var zR=function(e){var t=this.__data__,n=NR(t,e);return n<0?void 0:t[n][1]};var BR=function(e){return NR(this.__data__,e)>-1};var VR=function(e,t){var n=this.__data__,r=NR(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function HR(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e-1&&e%1==0&&e<=sM},fM={};fM["[object Float32Array]"]=fM["[object Float64Array]"]=fM["[object Int8Array]"]=fM["[object Int16Array]"]=fM["[object Int32Array]"]=fM["[object Uint8Array]"]=fM["[object Uint8ClampedArray]"]=fM["[object Uint16Array]"]=fM["[object Uint32Array]"]=!0,fM["[object Arguments]"]=fM["[object Array]"]=fM["[object ArrayBuffer]"]=fM["[object Boolean]"]=fM["[object DataView]"]=fM["[object Date]"]=fM["[object Error]"]=fM["[object Function]"]=fM["[object Map]"]=fM["[object Number]"]=fM["[object Object]"]=fM["[object RegExp]"]=fM["[object Set]"]=fM["[object String]"]=fM["[object WeakMap]"]=!1;var dM=function(e){return CR(e)&&cM(e.length)&&!!fM[_R(e)]};var hM=function(e){return function(t){return e(t)}},pM="object"==typeof exports&&exports&&!exports.nodeType&&exports,vM=pM&&"object"==typeof module&&module&&!module.nodeType&&module,gM=vM&&vM.exports===pM&&sR.process,mM=function(){try{var e=vM&&vM.require&&vM.require("util").types;return e||gM&&gM.binding&&gM.binding("util")}catch(t){}}(),yM=mM,bM=yM&&yM.isTypedArray,xM=bM?hM(bM):dM,wM=Object.prototype.hasOwnProperty;var SM=function(e,t){var n=eM(e),r=!n&&ZI(e),o=!n&&!r&&iM(e),i=!n&&!r&&!o&&xM(e),a=n||r||o||i,l=a?qI(e.length,String):[],u=l.length;for(var s in e)!t&&!wM.call(e,s)||a&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||uM(s,u))||l.push(s);return l},_M=Object.prototype;var kM=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||_M)},TM=kR(Object.keys,Object),CM=Object.prototype.hasOwnProperty;var EM=function(e){if(!kM(e))return TM(e);var t=[];for(var n in Object(e))CM.call(e,n)&&"constructor"!=n&&t.push(n);return t};var OM=function(e){return null!=e&&cM(e.length)&&!ZR(e)};var jM=function(e){return OM(e)?SM(e):EM(e)};var PM=function(e,t){return e&&GI(t,jM(t),e)};var AM=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t},RM=Object.prototype.hasOwnProperty;var IM=function(e){if(!$R(e))return AM(e);var t=kM(e),n=[];for(var r in e)("constructor"!=r||!t&&RM.call(e,r))&&n.push(r);return n};var MM=function(e){return OM(e)?SM(e,!0):IM(e)};var DM=function(e,t){return e&&GI(t,MM(t),e)},NM="object"==typeof exports&&exports&&!exports.nodeType&&exports,LM=NM&&"object"==typeof module&&module&&!module.nodeType&&module,FM=LM&&LM.exports===NM?fR.Buffer:void 0,zM=FM?FM.allocUnsafe:void 0;var BM=function(e,t){if(t)return e.slice();var n=e.length,r=zM?zM(n):new e.constructor(n);return e.copy(r),r};var VM=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n=0||(o[n]=e[n]);return o}function qN(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var QN=function(e){return Array.isArray(e)&&0===e.length},$N=function(e){return"function"===typeof e},YN=function(e){return null!==e&&"object"===typeof e},KN=function(e){return String(Math.floor(Number(e)))===e},XN=function(e){return"[object String]"===Object.prototype.toString.call(e)},JN=function(e){return 0===a.Children.count(e)},ZN=function(e){return YN(e)&&$N(e.then)};function eL(e,t,n,r){void 0===r&&(r=0);for(var o=LN(t);e&&r=0?[]:{}}}return(0===i?e:o)[a[i]]===n?e:(void 0===n?delete o[a[i]]:o[a[i]]=n,0===i&&void 0===n&&delete r[a[i]],r)}function nL(e,t,n,r){void 0===n&&(n=new WeakMap),void 0===r&&(r={});for(var o=0,i=Object.keys(e);o=n.length)break;i=n[o++]}else{if((o=n.next()).done)break;i=o.value}var a=i;eL(t,a.path)||(t=tL(t,a.path,a.message))}}return t}(n)):t(n)}))}))}),[h.validationSchema]),T=(0,a.useCallback)((function(e,t){return new Promise((function(n){return n(b.current[e].validate(t))}))}),[]),C=(0,a.useCallback)((function(e){var t=Object.keys(b.current).filter((function(e){return $N(b.current[e].validate)})),n=t.length>0?t.map((function(t){return T(t,eL(e,t))})):[Promise.resolve("DO_NOT_DELETE_YOU_WILL_BE_FIRED")];return Promise.all(n).then((function(e){return e.reduce((function(e,n,r){return"DO_NOT_DELETE_YOU_WILL_BE_FIRED"===n||n&&(e=tL(e,t[r],n)),e}),{})}))}),[T]),E=(0,a.useCallback)((function(e){return Promise.all([C(e),h.validationSchema?k(e):{},h.validate?_(e):{}]).then((function(e){var t=e[0],n=e[1],r=e[2];return uR.all([t,n,r],{arrayMerge:cL})}))}),[h.validate,h.validationSchema,C,_,k]),O=dL((function(e){return void 0===e&&(e=w.values),S({type:"SET_ISVALIDATING",payload:!0}),E(e).then((function(e){return y.current&&(S({type:"SET_ISVALIDATING",payload:!1}),S({type:"SET_ERRORS",payload:e})),e}))}));(0,a.useEffect)((function(){l&&!0===y.current&&nR()(p.current,h.initialValues)&&O(p.current)}),[l,O]);var j=(0,a.useCallback)((function(e){var t=e&&e.values?e.values:p.current,n=e&&e.errors?e.errors:v.current?v.current:h.initialErrors||{},r=e&&e.touched?e.touched:g.current?g.current:h.initialTouched||{},o=e&&e.status?e.status:m.current?m.current:h.initialStatus;p.current=t,v.current=n,g.current=r,m.current=o;var i=function(){S({type:"RESET_FORM",payload:{isSubmitting:!!e&&!!e.isSubmitting,errors:n,touched:r,status:o,values:t,isValidating:!!e&&!!e.isValidating,submitCount:e&&e.submitCount&&"number"===typeof e.submitCount?e.submitCount:0}})};if(h.onReset){var a=h.onReset(w.values,$);ZN(a)?a.then(i):i()}else i()}),[h.initialErrors,h.initialStatus,h.initialTouched]);(0,a.useEffect)((function(){!0!==y.current||nR()(p.current,h.initialValues)||(c&&(p.current=h.initialValues,j()),l&&O(p.current))}),[c,h.initialValues,j,l,O]),(0,a.useEffect)((function(){c&&!0===y.current&&!nR()(v.current,h.initialErrors)&&(v.current=h.initialErrors||aL,S({type:"SET_ERRORS",payload:h.initialErrors||aL}))}),[c,h.initialErrors]),(0,a.useEffect)((function(){c&&!0===y.current&&!nR()(g.current,h.initialTouched)&&(g.current=h.initialTouched||lL,S({type:"SET_TOUCHED",payload:h.initialTouched||lL}))}),[c,h.initialTouched]),(0,a.useEffect)((function(){c&&!0===y.current&&!nR()(m.current,h.initialStatus)&&(m.current=h.initialStatus,S({type:"SET_STATUS",payload:h.initialStatus}))}),[c,h.initialStatus,h.initialTouched]);var P=dL((function(e){if(b.current[e]&&$N(b.current[e].validate)){var t=eL(w.values,e),n=b.current[e].validate(t);return ZN(n)?(S({type:"SET_ISVALIDATING",payload:!0}),n.then((function(e){return e})).then((function(t){S({type:"SET_FIELD_ERROR",payload:{field:e,value:t}}),S({type:"SET_ISVALIDATING",payload:!1})}))):(S({type:"SET_FIELD_ERROR",payload:{field:e,value:n}}),Promise.resolve(n))}return h.validationSchema?(S({type:"SET_ISVALIDATING",payload:!0}),k(w.values,e).then((function(e){return e})).then((function(t){S({type:"SET_FIELD_ERROR",payload:{field:e,value:t[e]}}),S({type:"SET_ISVALIDATING",payload:!1})}))):Promise.resolve()})),A=(0,a.useCallback)((function(e,t){var n=t.validate;b.current[e]={validate:n}}),[]),R=(0,a.useCallback)((function(e){delete b.current[e]}),[]),I=dL((function(e,t){return S({type:"SET_TOUCHED",payload:e}),(void 0===t?o:t)?O(w.values):Promise.resolve()})),M=(0,a.useCallback)((function(e){S({type:"SET_ERRORS",payload:e})}),[]),D=dL((function(e,t){var r=$N(e)?e(w.values):e;return S({type:"SET_VALUES",payload:r}),(void 0===t?n:t)?O(r):Promise.resolve()})),N=(0,a.useCallback)((function(e,t){S({type:"SET_FIELD_ERROR",payload:{field:e,value:t}})}),[]),L=dL((function(e,t,r){return S({type:"SET_FIELD_VALUE",payload:{field:e,value:t}}),(void 0===r?n:r)?O(tL(w.values,e,t)):Promise.resolve()})),F=(0,a.useCallback)((function(e,t){var n,r=t,o=e;if(!XN(e)){e.persist&&e.persist();var i=e.target?e.target:e.currentTarget,a=i.type,l=i.name,u=i.id,s=i.value,c=i.checked,f=(i.outerHTML,i.options),d=i.multiple;r=t||(l||u),o=/number|range/.test(a)?(n=parseFloat(s),isNaN(n)?"":n):/checkbox/.test(a)?function(e,t,n){if("boolean"===typeof e)return Boolean(t);var r=[],o=!1,i=-1;if(Array.isArray(e))r=e,o=(i=e.indexOf(n))>=0;else if(!n||"true"==n||"false"==n)return Boolean(t);if(t&&n&&!o)return r.concat(n);if(!o)return r;return r.slice(0,i).concat(r.slice(i+1))}(eL(w.values,r),c,s):f&&d?function(e){return Array.from(e).filter((function(e){return e.selected})).map((function(e){return e.value}))}(f):s}r&&L(r,o)}),[L,w.values]),z=dL((function(e){if(XN(e))return function(t){return F(t,e)};F(e)})),B=dL((function(e,t,n){return void 0===t&&(t=!0),S({type:"SET_FIELD_TOUCHED",payload:{field:e,value:t}}),(void 0===n?o:n)?O(w.values):Promise.resolve()})),V=(0,a.useCallback)((function(e,t){e.persist&&e.persist();var n=e.target,r=n.name,o=n.id,i=(n.outerHTML,t||(r||o));B(i,!0)}),[B]),H=dL((function(e){if(XN(e))return function(t){return V(t,e)};V(e)})),U=(0,a.useCallback)((function(e){$N(e)?S({type:"SET_FORMIK_STATE",payload:e}):S({type:"SET_FORMIK_STATE",payload:function(){return e}})}),[]),W=(0,a.useCallback)((function(e){S({type:"SET_STATUS",payload:e})}),[]),G=(0,a.useCallback)((function(e){S({type:"SET_ISSUBMITTING",payload:e})}),[]),q=dL((function(){return S({type:"SUBMIT_ATTEMPT"}),O().then((function(e){var t=e instanceof Error;if(!t&&0===Object.keys(e).length){var n;try{if(void 0===(n=Y()))return}catch(r){throw r}return Promise.resolve(n).then((function(e){return y.current&&S({type:"SUBMIT_SUCCESS"}),e})).catch((function(e){if(y.current)throw S({type:"SUBMIT_FAILURE"}),e}))}if(y.current&&(S({type:"SUBMIT_FAILURE"}),t))throw e}))})),Q=dL((function(e){e&&e.preventDefault&&$N(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&$N(e.stopPropagation)&&e.stopPropagation(),q().catch((function(e){console.warn("Warning: An unhandled error was caught from submitForm()",e)}))})),$={resetForm:j,validateForm:O,validateField:P,setErrors:M,setFieldError:N,setFieldTouched:B,setFieldValue:L,setStatus:W,setSubmitting:G,setTouched:I,setValues:D,setFormikState:U,submitForm:q},Y=dL((function(){return f(w.values,$)})),K=dL((function(e){e&&e.preventDefault&&$N(e.preventDefault)&&e.preventDefault(),e&&e.stopPropagation&&$N(e.stopPropagation)&&e.stopPropagation(),j()})),X=(0,a.useCallback)((function(e){return{value:eL(w.values,e),error:eL(w.errors,e),touched:!!eL(w.touched,e),initialValue:eL(p.current,e),initialTouched:!!eL(g.current,e),initialError:eL(v.current,e)}}),[w.errors,w.touched,w.values]),J=(0,a.useCallback)((function(e){return{setValue:function(t,n){return L(e,t,n)},setTouched:function(t,n){return B(e,t,n)},setError:function(t){return N(e,t)}}}),[L,B,N]),Z=(0,a.useCallback)((function(e){var t=YN(e),n=t?e.name:e,r=eL(w.values,n),o={name:n,value:r,onChange:z,onBlur:H};if(t){var i=e.type,a=e.value,l=e.as,u=e.multiple;"checkbox"===i?void 0===a?o.checked=!!r:(o.checked=!(!Array.isArray(r)||!~r.indexOf(a)),o.value=a):"radio"===i?(o.checked=r===a,o.value=a):"select"===l&&u&&(o.value=o.value||[],o.multiple=!0)}return o}),[H,z,w.values]),ee=(0,a.useMemo)((function(){return!nR()(p.current,w.values)}),[p.current,w.values]),te=(0,a.useMemo)((function(){return"undefined"!==typeof u?ee?w.errors&&0===Object.keys(w.errors).length:!1!==u&&$N(u)?u(h):u:w.errors&&0===Object.keys(w.errors).length}),[u,ee,w.errors,h]);return UN({},w,{initialValues:p.current,initialErrors:v.current,initialTouched:g.current,initialStatus:m.current,handleBlur:H,handleChange:z,handleReset:K,handleSubmit:Q,resetForm:j,setErrors:M,setFormikState:U,setFieldTouched:B,setFieldValue:L,setFieldError:N,setStatus:W,setSubmitting:G,setTouched:I,setValues:D,submitForm:q,validateForm:O,validateField:P,isValid:te,dirty:ee,unregisterField:R,registerField:A,getFieldProps:Z,getFieldMeta:X,getFieldHelpers:J,validateOnBlur:o,validateOnChange:n,validateOnMount:l})}function sL(e){var t=Array.isArray(e)?[]:{};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=String(n);!0===Array.isArray(e[r])?t[r]=e[r].map((function(e){return!0===Array.isArray(e)||IR(e)?sL(e):""!==e?e:void 0})):IR(e[r])?t[r]=sL(e[r]):t[r]=""!==e[r]?e[r]:void 0}return t}function cL(e,t,n){var r=e.slice();return t.forEach((function(t,o){if("undefined"===typeof r[o]){var i=!1!==n.clone&&n.isMergeableObject(t);r[o]=i?uR(Array.isArray(t)?[]:{},t,n):t}else n.isMergeableObject(t)?r[o]=uR(e[o],t,n):-1===e.indexOf(t)&&r.push(t)})),r}var fL="undefined"!==typeof window&&"undefined"!==typeof window.document&&"undefined"!==typeof window.document.createElement?a.useLayoutEffect:a.useEffect;function dL(e){var t=(0,a.useRef)(e);return fL((function(){t.current=e})),(0,a.useCallback)((function(){for(var e=arguments.length,n=new Array(e),r=0;re?t:e}),0);return Array.from(UN({},e,{length:t+1}))}return[]},yL=function(e){function t(t){var n;return(n=e.call(this,t)||this).updateArrayField=function(e,t,r){var o=n.props,i=o.name;(0,o.formik.setFormikState)((function(n){var o="function"===typeof r?r:e,a="function"===typeof t?t:e,l=tL(n.values,i,e(eL(n.values,i))),u=r?o(eL(n.errors,i)):void 0,s=t?a(eL(n.touched,i)):void 0;return QN(u)&&(u=void 0),QN(s)&&(s=void 0),UN({},n,{values:l,errors:r?tL(n.errors,i,u):n.errors,touched:t?tL(n.touched,i,s):n.touched})}))},n.push=function(e){return n.updateArrayField((function(t){return[].concat(mL(t),[HN(e)])}),!1,!1)},n.handlePush=function(e){return function(){return n.push(e)}},n.swap=function(e,t){return n.updateArrayField((function(n){return pL(n,e,t)}),!0,!0)},n.handleSwap=function(e,t){return function(){return n.swap(e,t)}},n.move=function(e,t){return n.updateArrayField((function(n){return hL(n,e,t)}),!0,!0)},n.handleMove=function(e,t){return function(){return n.move(e,t)}},n.insert=function(e,t){return n.updateArrayField((function(n){return vL(n,e,t)}),(function(t){return vL(t,e,null)}),(function(t){return vL(t,e,null)}))},n.handleInsert=function(e,t){return function(){return n.insert(e,t)}},n.replace=function(e,t){return n.updateArrayField((function(n){return gL(n,e,t)}),!1,!1)},n.handleReplace=function(e,t){return function(){return n.replace(e,t)}},n.unshift=function(e){var t=-1;return n.updateArrayField((function(n){var r=n?[e].concat(n):[e];return t<0&&(t=r.length),r}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n}),(function(e){var n=e?[null].concat(e):[null];return t<0&&(t=n.length),n})),t},n.handleUnshift=function(e){return function(){return n.unshift(e)}},n.handleRemove=function(e){return function(){return n.remove(e)}},n.handlePop=function(){return function(){return n.pop()}},n.remove=n.remove.bind(qN(n)),n.pop=n.pop.bind(qN(n)),n}WN(t,e);var n=t.prototype;return n.componentDidUpdate=function(e){this.props.validateOnChange&&this.props.formik.validateOnChange&&!nR()(eL(e.formik.values,e.name),eL(this.props.formik.values,this.props.name))&&this.props.formik.validateForm(this.props.formik.values)},n.remove=function(e){var t;return this.updateArrayField((function(n){var r=n?mL(n):[];return t||(t=r[e]),$N(r.splice)&&r.splice(e,1),r}),!0,!0),t},n.pop=function(){var e;return this.updateArrayField((function(t){var n=t;return e||(e=n&&n.pop&&n.pop()),n}),!0,!0),e},n.render=function(){var e={push:this.push,pop:this.pop,swap:this.swap,move:this.move,insert:this.insert,replace:this.replace,unshift:this.unshift,remove:this.remove,handlePush:this.handlePush,handlePop:this.handlePop,handleSwap:this.handleSwap,handleMove:this.handleMove,handleInsert:this.handleInsert,handleReplace:this.handleReplace,handleUnshift:this.handleUnshift,handleRemove:this.handleRemove},t=this.props,n=t.component,r=t.render,o=t.children,i=t.name,l=UN({},e,{form:GN(t.formik,["validate","validationSchema"]),name:i});return n?(0,a.createElement)(n,l):r?r(l):o?"function"===typeof o?o(l):JN(o)?null:a.Children.only(o):null},t}(a.Component);yL.defaultProps={validateOnChange:!0};a.Component,a.Component;var bL=n(2819);function xL(){for(var e=arguments.length,t=new Array(e),n=0;ne.step?WC.Complete:n===e.step?WC.Current:WC.Upcoming;return(0,t.jsx)("li",{className:xL(o!==r.length-1?"pb-10":"","relative"),children:i===WC.Complete?(0,t.jsxs)(t.Fragment,{children:[o!==r.length-1?(0,t.jsx)("div",{className:"absolute top-4 left-4 -ml-px mt-0.5 h-full w-0.5 bg-purple-700","aria-hidden":"true"}):null,(0,t.jsxs)("div",{className:"group relative flex items-start",children:[(0,t.jsx)("span",{className:"flex h-9 items-center",children:(0,t.jsx)("span",{className:"relative z-10 flex h-8 w-8 items-center justify-center rounded-full bg-purple-700 group-hover:bg-purple-800",children:(0,t.jsx)(bL,{className:"h-5 w-5 text-white","aria-hidden":"true"})})}),(0,t.jsxs)("span",{className:"ml-4 flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:e.description})]})]})]}):i===WC.Current?(0,t.jsxs)(t.Fragment,{children:[o!==r.length-1?(0,t.jsx)("div",{className:"absolute top-4 left-4 -ml-px mt-0.5 h-full w-0.5 bg-gray-300","aria-hidden":"true"}):null,(0,t.jsxs)("div",{className:"group relative flex items-start","aria-current":"step",children:[(0,t.jsx)("span",{className:"flex h-9 items-center","aria-hidden":"true",children:(0,t.jsx)("span",{className:"relative z-10 flex h-8 w-8 items-center justify-center rounded-full border-2 border-purple-700 bg-white",children:(0,t.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-purple-700"})})}),(0,t.jsxs)("span",{className:"ml-4 flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-purple-700",children:e.name}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:e.description})]})]})]}):(0,t.jsxs)(t.Fragment,{children:[o!==r.length-1?(0,t.jsx)("div",{className:"absolute top-4 left-4 -ml-px mt-0.5 h-full w-0.5 bg-gray-300","aria-hidden":"true"}):null,(0,t.jsxs)("div",{className:"group relative flex items-start",children:[(0,t.jsx)("span",{className:"flex h-9 items-center","aria-hidden":"true",children:(0,t.jsx)("span",{className:"relative z-10 flex h-8 w-8 items-center justify-center rounded-full border-2 border-gray-300 bg-white",children:(0,t.jsx)("span",{className:"h-2.5 w-2.5 rounded-full bg-transparent"})})}),(0,t.jsxs)("span",{className:"ml-4 flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:"text-sm font-medium text-gray-500",children:e.name}),(0,t.jsx)("span",{className:"text-sm text-gray-500",children:e.description})]})]})]})},e.name)}))})})},SL=["className","rows"];var _L=["h","minH","height","minHeight"],kL=cx((function(e,n){var r=vx("Textarea",e),o=Sr(e),i=o.className,a=o.rows,l=eP(p(o,SL)),u=a?function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=mt(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}(r,_L):r;return(0,t.jsx)(lx.textarea,h(h({ref:n,rows:a},l),{},{className:kt("chakra-textarea",i),__css:u}))}));kL.displayName="Textarea";var TL=function(e){var n,r,o=e.index,i=e.formik,a=e.field;return(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"command",className:"block text-base font-semibold text-gray-900",children:null===a||void 0===a?void 0:a.label}),(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(kL,{rows:4,name:null===a||void 0===a?void 0:a.name,id:null===a||void 0===a?void 0:a.name,className:"block w-full p-2 placeholder-gray-500 rounded-md border-0 text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 placeholder:text-gray-400 focus:ring-2 focus:ring-inset focus:ring-indigo-600 sm:py-1.5 sm:text-sm sm:leading-6",placeholder:(null===a||void 0===a?void 0:a.placeholder)||"Enter tome param",value:(null===i||void 0===i||null===(n=i.values)||void 0===n||null===(r=n.params[o])||void 0===r?void 0:r.value)||"",onChange:function(e){var t,n=null===i||void 0===i||null===(t=i.values)||void 0===t?void 0:t.params;n[o].value=e.target.value,i.setFieldValue("params",n)}})})]},null===a||void 0===a?void 0:a.name)};function CL(e){if(null===e||!0===e||!1===e)return NaN;var t=Number(e);return isNaN(t)?t:t<0?Math.ceil(t):Math.floor(t)}function EL(e,t){if(pP(2,arguments),!t||"object"!==s(t))return new Date(NaN);var n=t.years?CL(t.years):0,r=t.months?CL(t.months):0,o=t.weeks?CL(t.weeks):0,i=t.days?CL(t.days):0,a=t.hours?CL(t.hours):0,l=t.minutes?CL(t.minutes):0,u=t.seconds?CL(t.seconds):0,c=vP(e),f=r||n?function(e,t){pP(2,arguments);var n=vP(e),r=CL(t);if(isNaN(r))return new Date(NaN);if(!r)return n;var o=n.getDate(),i=new Date(n.getTime());return i.setMonth(n.getMonth()+r+1,0),o>=i.getDate()?i:(n.setFullYear(i.getFullYear(),i.getMonth(),o),n)}(c,r+12*n):c,d=i||o?function(e,t){pP(2,arguments);var n=vP(e),r=CL(t);return isNaN(r)?new Date(NaN):r?(n.setDate(n.getDate()+r),n):n}(f,i+7*o):f,h=1e3*(u+60*(l+60*a));return new Date(d.getTime()+h)}var OL=function(e){return e.reduce((function(e,t){return e[t]=t,e}),{})},jL=function(e){var t=!1,n=[];if(""!==e)try{n=JSON.parse(e)}catch(r){t=!0}return{error:t,params:n}};var PL=function(e){return e.reduce((function(e,t){return AL(t)?e.offline+=1:e.online+=1,e}),{online:0,offline:0})};function AL(e){var t=new Date;return EL(new Date(e.lastSeenAt),{seconds:e.interval,minutes:1}) component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,DL),t}return e}function NL(){var e=ut((0,a.useState)([]),2),t=e[0],n=e[1];return[t.length>0?t.join(" "):void 0,(0,a.useMemo)((function(){return function(e){var t=bk((function(e){return n((function(t){return[].concat(bt(t),[e])})),function(){return n((function(t){var n=t.slice(),r=n.indexOf(e);return-1!==r&&n.splice(r,1),n}))}})),r=(0,a.useMemo)((function(){return{register:t,slot:e.slot,name:e.name,props:e.props}}),[t,e.slot,e.name,e.props]);return a.createElement(ML.Provider,{value:r},e.children)}}),[n])]}var LL="label";var FL=ok((function(e,t){var n=Xk(),r=e.id,o=void 0===r?"headlessui-label-".concat(n):r,i=e.passive,a=void 0!==i&&i,l=p(e,IL),u=DL(),s=Sk(t);vk((function(){return u.register(o)}),[o,u.register]);var c=h(h({ref:s},u.props),{},{id:o});return a&&("onClick"in c&&(delete c.htmlFor,delete c.onClick),"onClick"in l&&delete l.onClick),tk({ourProps:c,theirProps:l,slot:u.slot||{},defaultTag:LL,name:u.name||"Label"})})),zL=Object.assign(FL,{});function BL(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0,o=Object.entries(e);r is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(n,YL),n}return t}$L.displayName="RadioGroupDataContext";var KL=(0,a.createContext)(null);function XL(e){var t=(0,a.useContext)(KL);if(null===t){var n=new Error("<".concat(e," /> is missing a parent component."));throw Error.captureStackTrace&&Error.captureStackTrace(n,XL),n}return t}function JL(e,t){return Y_(t.type,QL,e,t)}KL.displayName="RadioGroupActionsContext";var ZL="div";var eF=function(e){return e[e.Empty=1]="Empty",e[e.Active=2]="Active",e}(eF||{}),tF="div";var nF=ok((function(e,t){var n=Xk(),r=e.id,o=void 0===r?"headlessui-radiogroup-".concat(n):r,i=e.value,l=e.defaultValue,u=e.name,s=e.onChange,c=e.by,d=void 0===c?function(e,t){return e===t}:c,v=e.disabled,g=void 0!==v&&v,m=p(e,WL),y=bk("string"==typeof d?function(e,t){var n=d;return(null==e?void 0:e[n])===(null==t?void 0:t[n])}:d),b=ut((0,a.useReducer)(JL,{options:[]}),2),x=b[0],w=b[1],S=x.options,_=ut(NL(),2),k=_[0],T=_[1],C=ut(VT(),2),E=C[0],O=C[1],j=(0,a.useRef)(null),P=Sk(j,t),A=function(e,t,n){var r=ut((0,a.useState)(n),2),o=r[0],i=r[1],l=void 0!==e,u=(0,a.useRef)(l),s=(0,a.useRef)(!1),c=(0,a.useRef)(!1);return!l||u.current||s.current?!l&&u.current&&!c.current&&(c.current=!0,u.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(s.current=!0,u.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[l?e:o,bk((function(e){return l||i(e),null==t?void 0:t(e)}))]}(i,s,l),R=ut(A,2),I=R[0],M=R[1],D=(0,a.useMemo)((function(){return S.find((function(e){return!e.propsRef.current.disabled}))}),[S]),N=(0,a.useMemo)((function(){return S.some((function(e){return y(e.propsRef.current.value,I)}))}),[S,I]),L=bk((function(e){var t;if(g||y(e,I))return!1;var n=null==(t=S.find((function(t){return y(t.propsRef.current.value,e)})))?void 0:t.propsRef.current;return(null==n||!n.disabled)&&(null==M||M(e),!0)}));!function(e){var t=e.container,n=e.accept,r=e.walk,o=e.enabled,i=void 0===o||o,l=(0,a.useRef)(n),u=(0,a.useRef)(r);(0,a.useEffect)((function(){l.current=n,u.current=r}),[n,r]),vk((function(){if(t&&i){var e=nT(t);if(e)for(var n=l.current,r=u.current,o=Object.assign((function(e){return n(e)}),{acceptNode:n}),a=e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,o,!1);a.nextNode();)r(a.currentNode)}}),[t,i,l,u])}({container:j.current,accept:function(e){return"radio"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk:function(e){e.setAttribute("role","none")}});var F=bk((function(e){var t=j.current;if(t){var n=nT(t),r=S.filter((function(e){return!1===e.propsRef.current.disabled})).map((function(e){return e.element.current}));switch(e.key){case Yk.Enter:!function(e){var t,n=null!=(t=null==e?void 0:e.form)?t:e.closest("form");if(n){var r,o=mt(n.elements);try{for(o.s();!(r=o.n()).done;){var i=r.value;if("INPUT"===i.tagName&&"submit"===i.type||"BUTTON"===i.tagName&&"submit"===i.type||"INPUT"===i.nodeName&&"image"===i.type)return void i.click()}}catch(a){o.e(a)}finally{o.f()}}}(e.currentTarget);break;case Yk.ArrowLeft:case Yk.ArrowUp:if(e.preventDefault(),e.stopPropagation(),hT(r,oT.Previous|oT.WrapAround)===iT.Success){var o=S.find((function(e){return e.element.current===(null==n?void 0:n.activeElement)}));o&&L(o.propsRef.current.value)}break;case Yk.ArrowRight:case Yk.ArrowDown:if(e.preventDefault(),e.stopPropagation(),hT(r,oT.Next|oT.WrapAround)===iT.Success){var i=S.find((function(e){return e.element.current===(null==n?void 0:n.activeElement)}));i&&L(i.propsRef.current.value)}break;case Yk.Space:e.preventDefault(),e.stopPropagation();var a=S.find((function(e){return e.element.current===(null==n?void 0:n.activeElement)}));a&&L(a.propsRef.current.value)}}})),z=bk((function(e){return w(h({type:0},e)),function(){return w({type:1,id:e.id})}})),B=(0,a.useMemo)((function(){return h({value:I,firstOption:D,containsCheckedOption:N,disabled:g,compare:y},x)}),[I,D,N,g,y,x]),V=(0,a.useMemo)((function(){return{registerOption:z,change:L}}),[z,L]),H={ref:P,id:o,role:"radiogroup","aria-labelledby":k,"aria-describedby":E,onKeyDown:F},U=(0,a.useMemo)((function(){return{value:I}}),[I]),W=(0,a.useRef)(null),G=Ok();return(0,a.useEffect)((function(){W.current&&void 0!==l&&G.addEventListener(W.current,"reset",(function(){L(l)}))}),[W,L]),a.createElement(O,{name:"RadioGroup.Description"},a.createElement(T,{name:"RadioGroup.Label"},a.createElement(KL.Provider,{value:V},a.createElement($L.Provider,{value:B},null!=u&&null!=I&&BL(f({},u,I)).map((function(e,t){var n=ut(e,2),r=n[0],o=n[1];return a.createElement(tT,h({features:eT.Hidden,ref:0===t?function(e){var t;W.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0},ik({key:r,as:"input",type:"radio",checked:null!=o,hidden:!0,readOnly:!0,name:r,value:o})))})),tk({ourProps:H,theirProps:m,slot:U,defaultTag:ZL,name:"RadioGroup"})))))})),rF=ok((function(e,t){var n,r=Xk(),o=e.id,i=void 0===o?"headlessui-radiogroup-option-".concat(r):o,l=e.value,u=e.disabled,s=void 0!==u&&u,c=p(e,GL),f=(0,a.useRef)(null),d=Sk(f,t),h=ut(NL(),2),v=h[0],g=h[1],m=ut(VT(),2),y=m[0],b=m[1],x=Pk(1),w=x.addFlag,S=x.removeFlag,_=x.hasFlag,k=mk({value:l,disabled:s}),T=YL("RadioGroup.Option"),C=XL("RadioGroup.Option");vk((function(){return C.registerOption({id:i,element:f,propsRef:k})}),[i,C,f,e]);var E=bk((function(e){var t;if(Kk(e.currentTarget))return e.preventDefault();C.change(l)&&(w(2),null==(t=f.current)||t.focus())})),O=bk((function(e){if(Kk(e.currentTarget))return e.preventDefault();w(2)})),j=bk((function(){return S(2)})),P=(null==(n=T.firstOption)?void 0:n.id)===i,A=T.disabled||s,R=T.compare(T.value,l),I={ref:d,id:i,role:"radio","aria-checked":R?"true":"false","aria-labelledby":v,"aria-describedby":y,"aria-disabled":!!A||void 0,tabIndex:A?-1:R||!T.containsCheckedOption&&P?0:-1,onClick:A?void 0:E,onFocus:A?void 0:O,onBlur:A?void 0:j},M=(0,a.useMemo)((function(){return{checked:R,disabled:A,active:_(2)}}),[R,A,_]);return a.createElement(b,{name:"RadioGroup.Description"},a.createElement(g,{name:"RadioGroup.Label"},tk({ourProps:I,theirProps:c,slot:M,defaultTag:tF,name:"RadioGroup.Option"})))})),oF=Object.assign(nF,{Option:rF,Label:zL,Description:WT}),iF=Object.defineProperty,aF=function(e,t,n){return function(e,t,n){t in e?iF(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n}(e,"symbol"!==typeof t?t+"":t,n),n};function lF(e){return e.sort((function(e,t){var n=e.compareDocumentPosition(t);if(n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY)return-1;if(n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS)return 1;if(n&Node.DOCUMENT_POSITION_DISCONNECTED||n&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC)throw Error("Cannot sort the given nodes.");return 0}))}function uF(e,t,n){var r=e+1;return n&&r>=t&&(r=0),r}function sF(e,t,n){var r=e-1;return n&&r<0&&(r=t),r}var cF="undefined"!==typeof window?a.useLayoutEffect:a.useEffect,fF=function(e){return e},dF=hi((function e(){var t=this;pi(this,e),aF(this,"descendants",new Map),aF(this,"register",(function(e){var n;if(null!=e)return"object"==typeof(n=e)&&"nodeType"in n&&n.nodeType===Node.ELEMENT_NODE?t.registerNode(e):function(n){t.registerNode(n,e)}})),aF(this,"unregister",(function(e){t.descendants.delete(e);var n=lF(Array.from(t.descendants.keys()));t.assignIndex(n)})),aF(this,"destroy",(function(){t.descendants.clear()})),aF(this,"assignIndex",(function(e){t.descendants.forEach((function(t){var n=e.indexOf(t.node);t.index=n,t.node.dataset.index=t.index.toString()}))})),aF(this,"count",(function(){return t.descendants.size})),aF(this,"enabledCount",(function(){return t.enabledValues().length})),aF(this,"values",(function(){return Array.from(t.descendants.values()).sort((function(e,t){return e.index-t.index}))})),aF(this,"enabledValues",(function(){return t.values().filter((function(e){return!e.disabled}))})),aF(this,"item",(function(e){if(0!==t.count())return t.values()[e]})),aF(this,"enabledItem",(function(e){if(0!==t.enabledCount())return t.enabledValues()[e]})),aF(this,"first",(function(){return t.item(0)})),aF(this,"firstEnabled",(function(){return t.enabledItem(0)})),aF(this,"last",(function(){return t.item(t.descendants.size-1)})),aF(this,"lastEnabled",(function(){var e=t.enabledValues().length-1;return t.enabledItem(e)})),aF(this,"indexOf",(function(e){var n,r;return e&&null!=(r=null==(n=t.descendants.get(e))?void 0:n.index)?r:-1})),aF(this,"enabledIndexOf",(function(e){return null==e?-1:t.enabledValues().findIndex((function(t){return t.node.isSameNode(e)}))})),aF(this,"next",(function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=uF(e,t.count(),n);return t.item(r)})),aF(this,"nextEnabled",(function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=t.item(e);if(r){var o=uF(t.enabledIndexOf(r.node),t.enabledCount(),n);return t.enabledItem(o)}})),aF(this,"prev",(function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=sF(e,t.count()-1,n);return t.item(r)})),aF(this,"prevEnabled",(function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=t.item(e);if(r){var o=sF(t.enabledIndexOf(r.node),t.enabledCount()-1,n);return t.enabledItem(o)}})),aF(this,"registerNode",(function(e,n){if(e&&!t.descendants.has(e)){var r=lF(Array.from(t.descendants.keys()).concat(e));(null==n?void 0:n.disabled)&&(n.disabled=!!n.disabled);var o=h({node:e,index:-1},n);t.descendants.set(e,o),t.assignIndex(r)}}))}));var hF=ut(st({name:"DescendantsProvider",errorMessage:"useDescendantsContext must be used within DescendantsProvider"}),2),pF=hF[0],vF=hF[1];var gF=ut(st({name:"AccordionStylesContext",hookName:"useAccordionStyles",providerName:""}),2),mF=gF[0],yF=gF[1],bF=ut(st({name:"AccordionItemContext",hookName:"useAccordionItemContext",providerName:""}),2),xF=bF[0],wF=bF[1],SF=[fF(pF),function(){return fF(vF())},function(){return function(){var e=(0,a.useRef)(new dF);return cF((function(){return function(){return e.current.destroy()}})),e.current}()},function(e){return function(e){var t=vF(),n=ut((0,a.useState)(-1),2),r=n[0],o=n[1],i=(0,a.useRef)(null);cF((function(){return function(){i.current&&t.unregister(i.current)}}),[]),cF((function(){if(i.current){var e=Number(i.current.dataset.index);r==e||Number.isNaN(e)||o(e)}}));var l=fF(e?t.register(e):t.register);return{descendants:t,index:r,enabledIndex:t.enabledIndexOf(i.current),register:Bj(l,i)}}(e)}],_F=ut(SF,4),kF=_F[0],TF=(_F[1],_F[2]),CF=_F[3];var EF=["onChange","defaultIndex","index","allowMultiple","allowToggle"],OF=["isDisabled","isFocusable","id"];function jF(e){var t=e.onChange,n=e.defaultIndex,r=e.index,o=e.allowMultiple,i=e.allowToggle,l=p(e,EF);!function(e){var t=e.index||e.defaultIndex,n=null!=t&&!Array.isArray(t)&&e.allowMultiple;Ct({condition:!!n,message:"If 'allowMultiple' is passed, then 'index' or 'defaultIndex' must be an array. You passed: ".concat(typeof t,",")})}(e),function(e){Ct({condition:!(!e.allowMultiple||!e.allowToggle),message:"If 'allowMultiple' is passed, 'allowToggle' will be ignored. Either remove 'allowToggle' or 'allowMultiple' depending on whether you want multiple accordions visible or not"})}(e);var u=TF(),s=ut((0,a.useState)(-1),2),c=s[0],f=s[1];(0,a.useEffect)((function(){return function(){f(-1)}}),[]);var d=function(e){var t=e.value,n=e.defaultValue,r=e.onChange,o=e.shouldUpdate,i=void 0===o?function(e,t){return e!==t}:o,l=kf(r),u=kf(i),s=ut((0,a.useState)(n),2),c=s[0],f=s[1],d=void 0!==t,h=d?t:c,p=kf((function(e){var t="function"===typeof e?e(h):e;u(h,t)&&(d||f(t),l(t))}),[d,l,h,u]);return[h,p]}({value:r,defaultValue:function(){return o?null!=n?n:[]:null!=n?n:-1},onChange:t}),h=ut(d,2),v=h[0],g=h[1];return{index:v,setIndex:g,htmlProps:l,getAccordionItemProps:function(e){var t=!1;null!==e&&(t=Array.isArray(v)?v.includes(e):v===e);return{isOpen:t,onChange:function(t){if(null!==e)if(o&&Array.isArray(v)){var n=t?v.concat(e):v.filter((function(t){return t!==e}));g(n)}else t?g(e):i&&g(-1)}}},focusedIndex:c,setFocusedIndex:f,descendants:u}}var PF=ut(st({name:"AccordionContext",hookName:"useAccordionContext",providerName:"Accordion"}),2),AF=PF[0],RF=PF[1];function IF(e){var t=e.isDisabled,n=e.isFocusable,r=e.id,o=p(e,OF),i=RF(),l=i.getAccordionItemProps,u=i.setFocusedIndex,s=(0,a.useRef)(null),c=(0,a.useId)(),f=null!=r?r:c,d="accordion-button-".concat(f),v="accordion-panel-".concat(f);!function(e){Ct({condition:!(!e.isFocusable||e.isDisabled),message:"Using only 'isFocusable', this prop is reserved for situations where you pass 'isDisabled' but you still want the element to receive focus (A11y). Either remove it or pass 'isDisabled' as well.\n "})}(e);var g=CF({disabled:t&&!n}),m=g.register,y=g.index,b=g.descendants,x=l(-1===y?null:y),w=x.isOpen,S=x.onChange;!function(e){Ct({condition:e.isOpen&&!!e.isDisabled,message:"Cannot open a disabled accordion item"})}({isOpen:w,isDisabled:t});var _=(0,a.useCallback)((function(){null==S||S(!w),u(y)}),[y,u,w,S]),k=(0,a.useCallback)((function(e){var t={ArrowDown:function(){var e=b.nextEnabled(y);null==e||e.node.focus()},ArrowUp:function(){var e=b.prevEnabled(y);null==e||e.node.focus()},Home:function(){var e=b.firstEnabled();null==e||e.node.focus()},End:function(){var e=b.lastEnabled();null==e||e.node.focus()}},n=t[e.key];n&&(e.preventDefault(),n(e))}),[b,y]),T=(0,a.useCallback)((function(){u(y)}),[u,y]),C=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},e),{},{type:"button",ref:Bj(m,s,n),id:d,disabled:!!t,"aria-expanded":!!w,"aria-controls":v,onClick:At(e.onClick,_),onFocus:At(e.onFocus,T),onKeyDown:At(e.onKeyDown,k)})}),[d,t,w,_,T,k,v,m]),E=(0,a.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:e,role:"region",id:v,"aria-labelledby":d,hidden:!w})}),[d,w,v]);return{isOpen:w,isDisabled:t,isFocusable:n,onOpen:function(){null==S||S(!0)},onClose:function(){null==S||S(!1)},getButtonProps:C,getPanelProps:E,htmlProps:o}}var MF=["children","reduceMotion"],DF=["htmlProps","descendants"],NF=cx((function(e,n){var r=e.children,o=e.reduceMotion,i=p(e,MF),l=gx("Accordion",i),u=jF(Sr(i)),s=u.htmlProps,c=u.descendants,f=p(u,DF),d=(0,a.useMemo)((function(){return h(h({},f),{},{reduceMotion:!!o})}),[f,o]);return(0,t.jsx)(kF,{value:c,children:(0,t.jsx)(AF,{value:d,children:(0,t.jsx)(mF,{value:l,children:(0,t.jsx)(lx.div,h(h({ref:n},s),{},{className:kt("chakra-accordion",i.className),__css:l.root,children:r}))})})})}));NF.displayName="Accordion";var LF=["htmlProps"],FF=cx((function(e,n){var r=e.children,o=e.className,i=IF(e),l=i.htmlProps,u=p(i,LF),s=h(h({},yF().container),{},{overflowAnchor:"none"}),c=(0,a.useMemo)((function(){return u}),[u]);return(0,t.jsx)(xF,{value:c,children:(0,t.jsx)(lx.div,h(h({ref:n},l),{},{className:kt("chakra-accordion__item",o),__css:s,children:"function"===typeof r?r({isExpanded:!!u.isOpen,isDisabled:!!u.isDisabled}):r}))})}));FF.displayName="AccordionItem";var zF=cx((function(e,n){var r=(0,wF().getButtonProps)(e,n),o=h({display:"flex",alignItems:"center",width:"100%",outline:0},yF().button);return(0,t.jsx)(lx.button,h(h({},r),{},{className:kt("chakra-accordion__button",e.className),__css:o}))}));zF.displayName="AccordionButton";var BF=["size","centerContent"],VF=["size"],HF=lx("div");HF.displayName="Box";var UF=cx((function(e,n){var r=e.size,o=e.centerContent,i=void 0===o||o,a=p(e,BF),l=i?{display:"flex",alignItems:"center",justifyContent:"center"}:{};return(0,t.jsx)(HF,h({ref:n,boxSize:r,__css:h(h({},l),{},{flexShrink:0,flexGrow:0})},a))}));UF.displayName="Square";var WF=cx((function(e,n){var r=e.size,o=p(e,VF);return(0,t.jsx)(UF,h({size:r,ref:n,borderRadius:"9999px"},o))}));function GF(e){var n=wF(),r=n.isOpen,o=n.isDisabled,i=RF().reduceMotion,a=kt("chakra-accordion__icon",e.className),l=h({opacity:o?.4:1,transform:r?"rotate(-180deg)":void 0,transition:i?void 0:"transform 0.2s",transformOrigin:"center"},yF().icon);return(0,t.jsx)(bx,h(h({viewBox:"0 0 24 24","aria-hidden":!0,className:a,__css:l},e),{},{children:(0,t.jsx)("path",{fill:"currentColor",d:"M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"})}))}WF.displayName="Circle",GF.displayName="AccordionIcon";var qF={ease:[.25,.1,.25,1],easeIn:[.4,0,1,1],easeOut:[0,0,.2,1],easeInOut:[.4,0,.2,1]};var QF=function(e,t){return h(h({},e),{},{delay:"number"===typeof t?t:null==t?void 0:t.enter})},$F=function(e,t){return h(h({},e),{},{delay:"number"===typeof t?t:null==t?void 0:t.exit})},YF=["in","unmountOnExit","animateOpacity","startingHeight","endingHeight","style","className","transition","transitionEnd"],KF=function(e){return null!=e&&parseInt(e.toString(),10)>0},XF={exit:{height:{duration:.2,ease:qF.ease},opacity:{duration:.3,ease:qF.ease}},enter:{height:{duration:.3,ease:qF.ease},opacity:{duration:.4,ease:qF.ease}}},JF={exit:function(e){var t,n=e.animateOpacity,r=e.startingHeight,o=e.transition,i=e.transitionEnd,a=e.delay;return h(h({},n&&{opacity:KF(r)?1:0}),{},{height:r,transitionEnd:null==i?void 0:i.exit,transition:null!=(t=null==o?void 0:o.exit)?t:$F(XF.exit,a)})},enter:function(e){var t,n=e.animateOpacity,r=e.endingHeight,o=e.transition,i=e.transitionEnd,a=e.delay;return h(h({},n&&{opacity:1}),{},{height:r,transitionEnd:null==i?void 0:i.enter,transition:null!=(t=null==o?void 0:o.enter)?t:QF(XF.enter,a)})}},ZF=(0,a.forwardRef)((function(e,n){var r=e.in,o=e.unmountOnExit,i=e.animateOpacity,l=void 0===i||i,u=e.startingHeight,s=void 0===u?0:u,c=e.endingHeight,f=void 0===c?"auto":c,d=e.style,v=e.className,g=e.transition,m=e.transitionEnd,y=p(e,YF),b=ut((0,a.useState)(!1),2),x=b[0],w=b[1];(0,a.useEffect)((function(){var e=setTimeout((function(){w(!0)}));return function(){return clearTimeout(e)}}),[]),Ct({condition:Boolean(s>0&&o),message:"startingHeight and unmountOnExit are mutually exclusive. You can't use them together"});var S=parseFloat(s.toString())>0,_={startingHeight:s,endingHeight:f,animateOpacity:l,transition:x?g:{enter:{duration:0}},transitionEnd:{enter:null==m?void 0:m.enter,exit:o?null==m?void 0:m.exit:h(h({},null==m?void 0:m.exit),{},{display:S?"block":"none"})}},k=!o||r,T=r||o?"enter":"exit";return(0,t.jsx)(Qx,{initial:!1,custom:_,children:k&&(0,t.jsx)(Bb.div,h(h({ref:n},y),{},{className:kt("chakra-collapse",v),style:h({overflow:"hidden",display:"block"},d),custom:_,variants:JF,initial:!!o&&"exit",animate:T,exit:"exit"}))})}));ZF.displayName="Collapse";var ez=["className","motionProps"],tz=cx((function(e,n){var r=e.className,o=e.motionProps,i=p(e,ez),a=RF().reduceMotion,l=wF(),u=l.getPanelProps,s=l.isOpen,c=u(i,n),f=kt("chakra-accordion__panel",r),d=yF();a||delete c.hidden;var v=(0,t.jsx)(lx.div,h(h({},c),{},{__css:d.panel,className:f}));return a?v:(0,t.jsx)(ZF,h(h({in:s},o),{},{children:v}))}));tz.displayName="AccordionPanel";var nz=n(3366),rz=n(7441),oz=n(9613),iz=n.n(oz);var az=function(e){function t(e,r,u,s,d){for(var h,p,v,g,x,S=0,_=0,k=0,T=0,C=0,R=0,M=v=h=0,N=0,L=0,F=0,z=0,B=u.length,V=B-1,H="",U="",W="",G="";Nh)&&(z=(H=H.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),r=[r],01?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}var xz=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&bz(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i=_z&&(_z=t+1),wz.set(e,t),Sz.set(t,e)},Ez="style["+gz+'][data-styled-version="5.3.11"]',Oz=new RegExp("^"+gz+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),jz=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(gz))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(gz,"active"),r.setAttribute("data-styled-version","5.3.11");var a=Az();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},Iz=function(){function e(e){var t=this.element=Rz(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(s+=e+",")})),r+=""+l+u+'{content:"'+s+'"}/*!sc*/\n'}}}return r}(this)},e}(),zz=/(a)(d)/gi,Bz=function(e){return String.fromCharCode(e+(e>25?39:97))};function Vz(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Bz(t%52)+n;return(Bz(t%52)+n).replace(zz,"$1-$2")}var Hz=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Uz=function(e){return Hz(5381,e)};function Wz(e){for(var t=0;t>>0);if(!t.hasNameForId(r,a)){var l=n(i,"."+a,void 0,r);t.insertRules(r,a,l)}o.push(a),this.staticRulesId=a}else{for(var u=this.rules.length,s=Hz(this.baseHash,n.hash),c="",f=0;f>>0);if(!t.hasNameForId(r,v)){var g=n(c,"."+v,void 0,r);t.insertRules(r,v,g)}o.push(v)}}return o.join(" ")},e}(),Qz=/^\s*\/\/.*$/gm,$z=[":","[",".","#"];function Yz(e){var t,n,r,o,i=void 0===e?dz:e,a=i.options,l=void 0===a?dz:a,u=i.plugins,s=void 0===u?fz:u,c=new az(l),f=[],d=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,l,u,s,c,f){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===s)return r+"/*|*/";break;case 3:switch(s){case 102:case 112:return e(o[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),h=function(e,r,i){return 0===r&&-1!==$z.indexOf(i[n.length])||i.match(o)?e:"."+t};function p(e,i,a,l){void 0===l&&(l="&");var u=e.replace(Qz,""),s=i&&a?a+" "+i+" { "+u+" }":u;return t=l,n=i,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),c(a||!i?"":i,s)}return c.use([].concat(s,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,h))},d,function(e){if(-2===e){var t=f;return f=[],t}}])),p.hash=s.length?s.reduce((function(e,t){return t.name||bz(15),Hz(e,t.name)}),5381).toString():"",p}var Kz=a.createContext(),Xz=(Kz.Consumer,a.createContext()),Jz=(Xz.Consumer,new Fz),Zz=Yz();function eB(){return(0,a.useContext)(Kz)||Jz}function tB(){return(0,a.useContext)(Xz)||Zz}function nB(e){var t=(0,a.useState)(e.stylisPlugins),n=t[0],r=t[1],o=eB(),i=(0,a.useMemo)((function(){var t=o;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=(0,a.useMemo)((function(){return Yz({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,a.useEffect)((function(){iz()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),a.createElement(Kz.Provider,{value:i},a.createElement(Xz.Provider,{value:l},e.children))}var rB=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=Zz);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return bz(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=Zz),this.name+e.hash},e}(),oB=/([A-Z])/,iB=/([A-Z])/g,aB=/^ms-/,lB=function(e){return"-"+e.toLowerCase()};function uB(e){return oB.test(e)?e.replace(iB,lB).replace(aB,"-ms-"):e}var sB=function(e){return null==e||!1===e||""===e};function cB(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,l=e.length;a1?t-1:0),r=1;r?@[\\\]^`{|}~-]+/g,vB=/(^-|-$)/g;function gB(e){return e.replace(pB,"-").replace(vB,"")}var mB=function(e){return Vz(Uz(e)>>>0)};function yB(e){return"string"==typeof e&&!0}var bB=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},xB=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function wB(e,t,n){var r=e[n];bB(t)&&bB(r)?SB(r,t):e[n]=t}function SB(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(yB(e)?e:gB(pz(e)));return TB(e,uz({},o,{attrs:h,componentId:i}),n)},Object.defineProperty(v,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?SB({},e.defaultProps,t):t}}),Object.defineProperty(v,"toString",{value:function(){return"."+v.styledComponentId}}),o&&Ke()(v,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),v}var CB=function(e){return function e(t,n,r){if(void 0===r&&(r=dz),!(0,rz.isValidElementType)(n))return bz(1,String(n));var o=function(){return t(n,r,dB.apply(void 0,arguments))};return o.withConfig=function(o){return e(t,n,uz({},r,{},o))},o.attrs=function(o){return e(t,n,uz({},r,{attrs:Array.prototype.concat(r.attrs,o).filter(Boolean)}))},o}(TB,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){CB[e]=CB(e)}));!function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=Wz(e),Fz.registerId(this.componentId+1)}var t=e.prototype;t.createStyles=function(e,t,n,r){var o=r(cB(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&Fz.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)}}();!function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=Az();return""},this.getStyleTags=function(){return e.sealed?bz(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return bz(2);var n=((t={})[gz]="",t["data-styled-version"]="5.3.11",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=Az();return r&&(n.nonce=r),[a.createElement("style",uz({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new Fz({isServer:!0}),this.sealed=!1}var t=e.prototype;t.collectStyles=function(e){return this.sealed?bz(2):a.createElement(nB,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return bz(3)}}();var EB=function(e){var t=a.forwardRef((function(t,n){var r=(0,a.useContext)(_B),o=e.defaultProps,i=hB(t,r,o);return a.createElement(e,uz({},t,{theme:i,ref:n}))}));return Ke()(t,e),t.displayName="WithTheme("+pz(e)+")",t},OB=CB,jB=n(4687),PB=n.n(jB);function AB(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2?arguments[2]:void 0;return e.reduce((function(e,t){return AB({},e,n[t])}),t)}function IB(e){return e.join(" ")}function MB(e){var t=e.node,n=e.stylesheet,r=e.style,o=void 0===r?{}:r,i=e.useInlineStyles,l=e.key,u=t.properties,s=t.type,c=t.tagName,f=t.value;if("text"===s)return f;if(c){var d=function(e,t){var n=0;return function(r){return n+=1,r.map((function(r,o){return MB({node:r,stylesheet:e,useInlineStyles:t,key:"code-segment-".concat(n,"-").concat(o)})}))}}(n,i),h=i&&u.className&&u.className.filter((function(e){return!n[e]})),p=h&&h.length?h:void 0,v=i?AB({},u,{className:p&&IB(p)},{style:RB(u.className,Object.assign({},u.style,o),n)}):AB({},u,{className:IB(u.className)}),g=d(t.children);return a.createElement(c,ye({key:l},v),g)}}var DB=/\n/g;function NB(e){var t=e.codeString,n=e.codeStyle,r=e.containerProps,o=void 0===r?{}:r,i=e.numberProps,l=e.startingLineNumber;return o.style=o.style||{float:"left",paddingRight:"10px"},a.createElement("code",ye({},o,{style:Object.assign({},n,o.style)}),function(e){var t=e.lines,n=e.startingLineNumber,r=e.numberProps,o=void 0===r?{}:r;return t.map((function(e,t){var r=t+n,i="function"===typeof o?o(r):o;return a.createElement("span",ye({key:"line-".concat(t),className:"react-syntax-highlighter-line-number"},i),"".concat(r,"\n"))}))}({lines:t.replace(/\n$/,"").split("\n"),numberProps:i,startingLineNumber:l}))}function LB(e){var t=e.children,n=e.lineNumber,r=e.lineProps,o=e.className,i=void 0===o?[]:o,a=("function"===typeof r?r(n):r)||{};return a.className=a.className?i.concat(a.className):i,{type:"element",tagName:"span",properties:a,children:t}}function FB(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=0;r=0||(o[n]=e[n]);return o}function qB(e,t){return t||(t=e.slice(0)),e.raw=t,e}var QB="light";function $B(e){var t=e;return function(e){var n=function(e){return UB({mode:QB},null===e||void 0===e?void 0:e.theme)}(e);return t[n.mode]}}var YB=function(e){var t={theme:e};return{lineNumberColor:$B({light:"#383a42",dark:"#abb2bf"})(t),lineNumberBgColor:$B({light:"#fafafa",dark:"#282c34"})(t),backgroundColor:$B({light:"#fafafa",dark:"#282c34"})(t),textColor:$B({light:"#383a42",dark:"#abb2bf"})(t),substringColor:$B({light:"#e45649",dark:"#e06c75"})(t),keywordColor:$B({light:"#a626a4",dark:"#c678dd"})(t),attributeColor:$B({light:"#50a14f",dark:"#98c379"})(t),selectorAttributeColor:$B({light:"#e45649",dark:"#e06c75"})(t),docTagColor:$B({light:"#a626a4",dark:"#c678dd"})(t),nameColor:$B({light:"#e45649",dark:"#e06c75"})(t),builtInColor:$B({light:"#c18401",dark:"#e6c07b"})(t),literalColor:$B({light:"#0184bb",dark:"#56b6c2"})(t),bulletColor:$B({light:"#4078f2",dark:"#61aeee"})(t),codeColor:$B({light:"#383a42",dark:"#abb2bf"})(t),additionColor:$B({light:"#50a14f",dark:"#98c379"})(t),regexpColor:$B({light:"#50a14f",dark:"#98c379"})(t),symbolColor:$B({light:"#4078f2",dark:"#61aeee"})(t),variableColor:$B({light:"#986801",dark:"#d19a66"})(t),templateVariableColor:$B({light:"#986801",dark:"#d19a66"})(t),linkColor:$B({light:"#4078f2",dark:"#61aeee"})(t),selectorClassColor:$B({light:"#986801",dark:"#d19a66"})(t),typeColor:$B({light:"#986801",dark:"#d19a66"})(t),stringColor:$B({light:"#50a14f",dark:"#98c379"})(t),selectorIdColor:$B({light:"#4078f2",dark:"#61aeee"})(t),quoteColor:$B({light:"#a0a1a7",dark:"#5c6370"})(t),templateTagColor:$B({light:"#383a42",dark:"#abb2bf"})(t),deletionColor:$B({light:"#e45649",dark:"#e06c75"})(t),titleColor:$B({light:"#4078f2",dark:"#61aeee"})(t),sectionColor:$B({light:"#e45649",dark:"#e06c75"})(t),commentColor:$B({light:"#a0a1a7",dark:"#5c6370"})(t),metaKeywordColor:$B({light:"#383a42",dark:"#abb2bf"})(t),metaColor:$B({light:"#4078f2",dark:"#61aeee"})(t),functionColor:$B({light:"#383a42",dark:"#abb2bf"})(t),numberColor:$B({light:"#986801",dark:"#d19a66"})(t)}},KB="inherit",XB="inherit",JB={fontSize:XB,fontFamily:KB,lineHeight:20/12,padding:8},ZB=function(e){return{fontSize:XB,lineHeight:20/14,color:e.lineNumberColor,backgroundColor:e.lineNumberBgColor,flexShrink:0,padding:8,textAlign:"right",userSelect:"none"}},eV=function(e){return{key:{color:e.keywordColor,fontWeight:"bolder"},keyword:{color:e.keywordColor,fontWeight:"bolder"},"attr-name":{color:e.attributeColor},selector:{color:e.selectorTagColor},comment:{color:e.commentColor,fontFamily:KB,fontStyle:"italic"},"block-comment":{color:e.commentColor,fontFamily:KB,fontStyle:"italic"},"function-name":{color:e.sectionColor},"class-name":{color:e.sectionColor},doctype:{color:e.docTagColor},substr:{color:e.substringColor},namespace:{color:e.nameColor},builtin:{color:e.builtInColor},entity:{color:e.literalColor},bullet:{color:e.bulletColor},code:{color:e.codeColor},addition:{color:e.additionColor},regex:{color:e.regexpColor},symbol:{color:e.symbolColor},variable:{color:e.variableColor},url:{color:e.linkColor},"selector-attr":{color:e.selectorAttributeColor},"selector-pseudo":{color:e.selectorPseudoColor},type:{color:e.typeColor},string:{color:e.stringColor},quote:{color:e.quoteColor},tag:{color:e.templateTagColor},deletion:{color:e.deletionColor},title:{color:e.titleColor},section:{color:e.sectionColor},"meta-keyword":{color:e.metaKeywordColor},meta:{color:e.metaColor},italic:{fontStyle:"italic"},bold:{fontWeight:"bolder"},function:{color:e.functionColor},number:{color:e.numberColor}}},tV=function(e){return{fontSize:XB,fontFamily:KB,background:e.backgroundColor,color:e.textColor,borderRadius:3,display:"flex",lineHeight:20/14,overflowX:"auto",whiteSpace:"pre"}},nV=function(e){return UB({'pre[class*="language-"]':tV(e)},eV(e))},rV=function(e){return UB({'pre[class*="language-"]':UB({},tV(e),{padding:"2px 4px",display:"inline",whiteSpace:"pre-wrap"})},eV(e))};function oV(e){void 0===e&&(e={mode:"light"});var t=UB({},YB(e),e);return{lineNumberContainerStyle:ZB(t),codeBlockStyle:nV(t),inlineCodeStyle:rV(t),codeContainerStyle:JB}}var iV=Object.freeze([{name:"PHP",alias:["php","php3","php4","php5"],value:"php"},{name:"Java",alias:["java"],value:"java"},{name:"CSharp",alias:["csharp","c#"],value:"cs"},{name:"Python",alias:["python","py"],value:"python"},{name:"JavaScript",alias:["javascript","js"],value:"javascript"},{name:"XML",alias:["xml"],value:"xml"},{name:"HTML",alias:["html","htm"],value:"html"},{name:"C++",alias:["c++","cpp","clike"],value:"cpp"},{name:"Ruby",alias:["ruby","rb","duby"],value:"ruby"},{name:"Objective-C",alias:["objective-c","objectivec","obj-c","objc"],value:"objectivec"},{name:"C",alias:["c"],value:"cpp"},{name:"Swift",alias:["swift"],value:"swift"},{name:"TeX",alias:["tex","latex"],value:"tex"},{name:"Shell",alias:["shell","bash","sh","ksh","zsh"],value:"shell"},{name:"Scala",alias:["scala"],value:"scala"},{name:"Go",alias:["go"],value:"go"},{name:"ActionScript",alias:["actionscript","actionscript3","as"],value:"actionscript"},{name:"ColdFusion",alias:["coldfusion"],value:"xml"},{name:"JavaFX",alias:["javafx","jfx"],value:"java"},{name:"VbNet",alias:["vbnet","vb.net"],value:"vbnet"},{name:"JSON",alias:["json"],value:"json"},{name:"MATLAB",alias:["matlab"],value:"matlab"},{name:"Groovy",alias:["groovy"],value:"groovy"},{name:"SQL",alias:["sql","postgresql","postgres","plpgsql","psql","postgresql-console","postgres-console","tsql","t-sql","mysql","sqlite"],value:"sql"},{name:"R",alias:["r"],value:"r"},{name:"Perl",alias:["perl","pl"],value:"perl"},{name:"Lua",alias:["lua"],value:"lua"},{name:"Delphi",alias:["delphi","pas","pascal","objectpascal"],value:"delphi"},{name:"XML",alias:["xml"],value:"xml"},{name:"TypeScript",alias:["typescript","ts","tsx"],value:"typescript"},{name:"CoffeeScript",alias:["coffeescript","coffee-script","coffee"],value:"coffeescript"},{name:"Haskell",alias:["haskell","hs"],value:"haskell"},{name:"Puppet",alias:["puppet"],value:"puppet"},{name:"Arduino",alias:["arduino"],value:"arduino"},{name:"Fortran",alias:["fortran"],value:"fortran"},{name:"Erlang",alias:["erlang","erl"],value:"erlang"},{name:"PowerShell",alias:["powershell","posh","ps1","psm1"],value:"powershell"},{name:"Haxe",alias:["haxe","hx","hxsl"],value:"haxe"},{name:"Elixir",alias:["elixir","ex","exs"],value:"elixir"},{name:"Verilog",alias:["verilog","v"],value:"verilog"},{name:"Rust",alias:["rust"],value:"rust"},{name:"VHDL",alias:["vhdl"],value:"vhdl"},{name:"Sass",alias:["sass"],value:"less"},{name:"OCaml",alias:["ocaml"],value:"ocaml"},{name:"Dart",alias:["dart"],value:"dart"},{name:"CSS",alias:["css"],value:"css"},{name:"reStructuredText",alias:["restructuredtext","rst","rest"],value:"rest"},{name:"ObjectPascal",alias:["objectpascal"],value:"delphi"},{name:"Kotlin",alias:["kotlin"],value:"kotlin"},{name:"D",alias:["d"],value:"d"},{name:"Octave",alias:["octave"],value:"matlab"},{name:"QML",alias:["qbs","qml"],value:"qml"},{name:"Prolog",alias:["prolog"],value:"prolog"},{name:"FoxPro",alias:["foxpro","vfp","clipper","xbase"],value:"vbnet"},{name:"Scheme",alias:["scheme","scm"],value:"scheme"},{name:"CUDA",alias:["cuda","cu"],value:"cpp"},{name:"Julia",alias:["julia","jl"],value:"julia"},{name:"Racket",alias:["racket","rkt"],value:"lisp"},{name:"Ada",alias:["ada","ada95","ada2005"],value:"ada"},{name:"Tcl",alias:["tcl"],value:"tcl"},{name:"Mathematica",alias:["mathematica","mma","nb"],value:"mathematica"},{name:"Autoit",alias:["autoit"],value:"autoit"},{name:"StandardML",alias:["standardmL","sml","standardml"],value:"sml"},{name:"Objective-J",alias:["objective-j","objectivej","obj-j","objj"],value:"objectivec"},{name:"Smalltalk",alias:["smalltalk","squeak","st"],value:"smalltalk"},{name:"Vala",alias:["vala","vapi"],value:"vala"},{name:"ABAP",alias:["abap"],value:"sql"},{name:"LiveScript",alias:["livescript","live-script"],value:"livescript"},{name:"XQuery",alias:["xquery","xqy","xq","xql","xqm"],value:"xquery"},{name:"PlainText",alias:["text","plaintext"],value:"text"},{name:"Yaml",alias:["yaml","yml"],value:"yaml"},{name:"GraphQL",alias:["graphql","gql"],value:"graphql"}]),aV=function(e){function t(){var t;return(t=e.apply(this,arguments)||this)._isMounted=!1,t}WB(t,e);var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0},n.componentWillUnmount=function(){this._isMounted=!1},n.getLineOpacity=function(e){if(!this.props.highlight)return 1;var t=this.props.highlight.split(",").map((function(e){if(e.indexOf("-")>0){var t=e.split("-").map(Number).sort(),n=t[0],r=t[1];return Array(r+1).fill(void 0).map((function(e,t){return t})).slice(n,r+1)}return Number(e)})).reduce((function(e,t){return e.concat(t)}),[]);return 0===t.length||t.includes(e)?1:.3},n.render=function(){var e=this,t=oV(this.props.theme).inlineCodeStyle,n={language:function(e){if(!e)return"";var t=iV.find((function(t){return t.name===e||t.alias.includes(e)}));return t?t.value:e||"text"}(this.props.language),PreTag:this.props.preTag,style:this.props.codeStyle||t,showLineNumbers:this.props.showLineNumbers,codeTagProps:this.props.codeTagProps};return a.createElement(HB,Object.assign({},n,{wrapLines:this.props.highlight.length>0,customStyle:this.props.customStyle,lineProps:function(t){return{style:UB({opacity:e.getLineOpacity(t)},e.props.lineNumberContainerStyle)}}}),this.props.text)},t}(a.PureComponent);aV.defaultProps={theme:{},showLineNumbers:!1,lineNumberContainerStyle:{},codeTagProps:{},preTag:"span",highlight:"",customStyle:{}};var lV="text",uV=function(e){function t(){var t;return(t=e.apply(this,arguments)||this)._isMounted=!1,t.handleCopy=function(e){var t=e.nativeEvent.clipboardData;if(t){e.preventDefault();var n=window.getSelection();if(null===n)return;var r=n.toString(),o=""+r+"
";t.clearData(),t.setData("text/html",o),t.setData("text/plain",r)}},t}WB(t,e);var n=t.prototype;return n.componentDidMount=function(){this._isMounted=!0},n.componentWillUnmount=function(){this._isMounted=!1},n.render=function(){var e,t,n,r,o=oV(this.props.theme),i=o.lineNumberContainerStyle,l=o.codeBlockStyle,u=o.codeContainerStyle,s={language:this.props.language||lV,codeStyle:UB({},l,null===(e=this.props)||void 0===e?void 0:e.codeBlockStyle),customStyle:null===(t=this.props)||void 0===t?void 0:t.customStyle,showLineNumbers:this.props.showLineNumbers,codeTagProps:{style:UB({},u,null===(n=this.props)||void 0===n?void 0:n.codeContainerStyle)},lineNumberContainerStyle:UB({},i,null===(r=this.props)||void 0===r?void 0:r.lineNumberContainerStyle),text:this.props.text.toString(),highlight:this.props.highlight};return a.createElement(aV,Object.assign({},s))},t}(a.PureComponent);uV.displayName="CodeBlock",uV.defaultProps={showLineNumbers:!0,language:lV,theme:{},highlight:"",lineNumberContainerStyle:{},customStyle:{},codeBlockStyle:{}};var sV=EB(uV);function cV(e){return a.createElement(sV,Object.assign({},e))}var fV=function(e){var t=e.size,n=e.color,r=GB(e,["size","color"]);return a.createElement("svg",Object.assign({},r,{viewBox:"0 0 384 512",width:t,height:t,fill:n}),a.createElement("path",{d:"M280 240H168c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8zm0 96H168c-4.4 0-8 3.6-8 8v16c0 4.4 3.6 8 8 8h112c4.4 0 8-3.6 8-8v-16c0-4.4-3.6-8-8-8zM112 232c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24 24-10.7 24-24-10.7-24-24-24zM336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 48c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16zm144 408c0 4.4-3.6 8-8 8H56c-4.4 0-8-3.6-8-8V120c0-4.4 3.6-8 8-8h40v32c0 8.8 7.2 16 16 16h160c8.8 0 16-7.2 16-16v-32h40c4.4 0 8 3.6 8 8v336z"}))};fV.displayName="ClipboardListIcon",fV.defaultProps={size:"16pt",color:"currentcolor"};var dV=function(e){var t=e.size,n=e.color,r=GB(e,["size","color"]);return a.createElement("svg",Object.assign({},r,{viewBox:"0 0 384 512",width:t,height:t,fill:n}),a.createElement("path",{d:"M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm121.2 231.8l-143 141.8c-4.7 4.7-12.3 4.6-17-.1l-82.6-83.3c-4.7-4.7-4.6-12.3.1-17L99.1 285c4.7-4.7 12.3-4.6 17 .1l46 46.4 106-105.2c4.7-4.7 12.3-4.6 17 .1l28.2 28.4c4.7 4.8 4.6 12.3-.1 17z"}))};function hV(e){var t=e.size,n=e.color,r=e.copied,o=GB(e,["size","color","copied"]);return r?a.createElement(dV,Object.assign({},{color:n,size:t},o)):a.createElement(fV,Object.assign({},{color:n,size:t},o))}dV.displayName="ClipboardCheckIcon",dV.defaultProps={size:"16pt",color:"currentcolor"};var pV=function(){var e=(0,a.useState)(!1),t=e[0],n=e[1];return(0,a.useEffect)((function(){n(Boolean("undefined"!==typeof window&&window.document&&window.document.createElement))}),[]),{isBrowser:t,isServer:!t}},vV=function(e){var t=document.createElement("div");return t.setAttribute("id",e),t},gV=function(e){void 0===e&&(e=Math.random().toString(32).slice(2,10));var t="zeit-ui-"+e,n=pV().isBrowser,r=(0,a.useState)(n?vV(t):null),o=r[0],i=r[1];return(0,a.useEffect)((function(){var e=document.querySelector("#"+t),n=e||vV(t);e||document.body.appendChild(n),i(n)}),[]),o},mV={},yV={onError:function(){return function(e,t){var n="[Zeit UI]"+(t?" ["+t+"]":" ")+": "+e;"undefined"!==typeof console&&(mV[n]||(mV[n]=!0,console.warn(n)))}("Failed to copy.","use-clipboard")}},bV=function(e){void 0===e&&(e=yV);var t=gV("clipboard"),n=(0,a.useCallback)((function(n){!function(t,n){if(t&&n){var r=window.getSelection();if(r){t.style.whiteSpace="pre",t.textContent=n;var o=window.document.createRange();r.removeAllRanges(),o.selectNode(t),r.addRange(o);try{window.document.execCommand("copy")}catch(i){e.onError&&e.onError()}r.removeAllRanges(),t&&(t.textContent="")}}}(t,n)}),[t]);return{copy:n}};function xV(){var e=qB(["\n position: relative;\n background: ",";\n border-radius: 0.25rem;\n padding: ",";\n"]);return xV=function(){return e},e}function wV(){var e=qB(["\n position: absolute;\n top: 0.5em;\n right: 0.75em;\n display: flex;\n flex-wrap: wrap;\n justify-content: center;\n align-items: center;\n background: ",";\n margin-top: 0.15rem;\n border-radius: 0.25rem;\n max-height: 2rem;\n max-width: 2rem;\n padding: 0.25rem;\n &:hover {\n opacity: ",";\n }\n &:focus {\n outline: none;\n opacity: 1;\n }\n .icon {\n width: 1rem;\n height: 1rem;\n }\n"]);return wV=function(){return e},e}var SV=OB.button(wV(),(function(e){return e.theme.backgroundColor}),(function(e){return e.copied?1:.5})),_V=OB.div(xV(),(function(e){return e.theme.backgroundColor}),(function(e){return e.codeBlock?"0.25rem 0.5rem 0.25rem 0.25rem":"0.25rem"}));function kV(e){var t=e.theme,n=e.text,r=e.codeBlock,o=void 0!==r&&r,i=e.customStyle,l=void 0===i?{}:i,u=GB(e,["theme","text","codeBlock","customStyle"]),s=(0,a.useState)(!1),c=s[0],f=s[1],d=bV().copy;return a.createElement(_V,Object.assign({},{codeBlock:o},{style:l,theme:t}),o?a.createElement(uV,Object.assign({text:n,theme:t},u)):a.createElement(aV,Object.assign({text:n,theme:t},u)),a.createElement(SV,Object.assign({type:"button",onClick:function(){d(n),f(!c)}},{theme:t,copied:c}),a.createElement(hV,{color:c?t.stringColor:t.textColor,copied:c,className:"icon",size:"16pt"})))}var TV=EB(kV);function CV(e){return a.createElement(TV,Object.assign({},e))}var EV,OV={lineNumberColor:"#4d4d4c",lineNumberBgColor:"white",backgroundColor:"white",textColor:"#4d4d4c",substringColor:"#4d4d4c",keywordColor:"#8959a8",attributeColor:"#eab700",selectorAttributeColor:"#8959a8",docTagColor:"#4d4d4c",nameColor:"#c82829",builtInColor:"#f5871f",literalColor:"#f5871f",bulletColor:"#718c00",codeColor:"#4d4d4c",additionColor:"#718c00",regexpColor:"#c82829",symbolColor:"#718c00",variableColor:"#c82829",templateVariableColor:"#c82829",linkColor:"#f5871f",selectorClassColor:"#c82829",typeColor:"#f5871f",stringColor:"#718c00",selectorIdColor:"#c82829",quoteColor:"#8e908c",templateTagColor:"#4d4d4c",deletionColor:"#c82829",titleColor:"#4271ae",sectionColor:"#4271ae",commentColor:"#8e908c",metaKeywordColor:"#4d4d4c",metaColor:"#f5871f",functionColor:"#4d4d4c",numberColor:"#f5871f"},jV=function(e){var n=e.label,r=e.data,o=e.selected,i=e.setSelected,l=ut((0,a.useState)(r),2),u=l[0],s=l[1],c=ut((0,a.useState)(!1),2),f=c[0],d=c[1];return(0,t.jsx)("div",{className:"w-full",children:(0,t.jsx)("div",{className:"mx-auto w-full",children:(0,t.jsxs)(oF,{value:o,onChange:i,className:"flex flex-col gap-3",children:[(0,t.jsx)(oF.Label,{className:"sr-only",children:(0,t.jsx)(Cj,{size:"sm",children:n})}),(0,t.jsxs)(Rj,{children:[(0,t.jsx)(Fj,{pointerEvents:"none",children:(0,t.jsx)(kj,{color:"gray.300"})}),(0,t.jsx)(rP,{placeholder:"Search by tome name",colorScheme:"purple",onChange:function(e){return function(e,t){var n=e.filter((function(e){var n=e.name.toLowerCase(),r=t.toLowerCase();return n.includes(r)||o&&o.name===(null===e||void 0===e?void 0:e.name)}));s(n)}(r,e.target.value)}})]}),(0,t.jsxs)("div",{className:"space-y-2 md-scroll-container py-2 px-4",children:[0===u.length&&r.length>0&&(0,t.jsx)(q_,{label:"No tomes matching your search term",type:G_.noMatches}),u.map((function(e){return(0,t.jsx)(oF.Option,{value:e,className:function(e){var t=e.active;e.checked;return"".concat(t?"ring-2 ring-white/60 ring-offset-2 ring-offset-purple-300":"","\n bg-white relative flex cursor-pointer rounded-lg shadow-md focus:outline-none")},children:function(n){n.active;var r=n.checked,o=jL(null===e||void 0===e?void 0:e.paramDefs).params;return(0,t.jsx)(NF,{index:r&&f?0:-1,allowToggle:!0,className:"w-full",onChange:function(e){return function(e,t){t&&d(e>=0)}(e,r)},children:(0,t.jsxs)(FF,{children:[(0,t.jsx)("h2",{children:(0,t.jsx)(zF,{children:(0,t.jsxs)("div",{className:"flex flex-row gap-2 w-full items-center",children:[r&&(0,t.jsx)("div",{className:"shrink-0 text-purple-500",children:(0,t.jsx)(nz,{className:"w-8 h-8"})}),(0,t.jsxs)(HF,{as:"div",flex:"1",textAlign:"left",className:"flex flex-col w-full gap-1",children:[(0,t.jsx)(oF.Label,{as:"div",className:"items-center font-medium text-gray-900",children:e.name}),(0,t.jsxs)(oF.Description,{as:"div",className:"flex flex-col gap- w-full text-sm text-gray-600",children:[(0,t.jsx)("p",{children:e.description}),o&&(0,t.jsxs)("div",{className:"flex flex-row gap-1",children:["Parameters:",o&&o.map((function(e,n){return(0,t.jsxs)("div",{children:[e.label,n0&&(null===i||void 0===i||null===(o=i.values)||void 0===o?void 0:o.params.map((function(e,n){return(0,t.jsx)(TL,{field:e,index:n,formik:i},e.name)})))]})},AV=rO(EV||(EV=YC(["\n query get_tomes{\n tomes {\n id\n name\n paramDefs\n description\n eldritch\n }\n }\n"]))),RV=function(e){var n,r,o,i=e.setCurrStep,a=e.formik,l=hj(AV),u=l.loading,s=l.error,c=l.data,f=(null===a||void 0===a||null===(n=a.values)||void 0===n?void 0:n.params.filter((function(e){return(null===e||void 0===e?void 0:e.value)&&""!==(null===e||void 0===e?void 0:e.value)}))).length!==(null===a||void 0===a||null===(r=a.values)||void 0===r?void 0:r.params.length)||null===(null===a||void 0===a||null===(o=a.values)||void 0===o?void 0:o.tome);return(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Select a tome"}),u?(0,t.jsx)(q_,{type:G_.loading,label:"Loading tomes..."}):s?(0,t.jsx)(q_,{type:G_.error,label:"Error loading tomes..."}):(0,t.jsx)(PV,{formik:a,data:(null===c||void 0===c?void 0:c.tomes)||[]}),(0,t.jsxs)("div",{className:"flex flex-row gap-2",children:[(0,t.jsx)("button",{className:"inline-flex items-center rounded-md bg-gray-50 py-3 px-4 text-sm font-semibold text-purple-600 shadow-sm hover:bg-purple-100",onClick:function(){return i(0)},children:"Back"}),(0,t.jsx)("button",{className:"btn-primary",onClick:function(){return i(2)},disabled:f,children:"Continue"})]})]})},IV=function(e){var n,r,o,i,a,l=e.beaconData,u=AL(l);return(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("div",{className:"flex flex-row gap-4",children:l.name}),(0,t.jsxs)("div",{className:"flex flex-row flex-wrap gap-1",children:[l.principal&&""!==l.principal&&(0,t.jsx)(lP,{textTransform:"none",children:l.principal}),(0,t.jsx)(lP,{children:null===l||void 0===l||null===(n=l.host)||void 0===n?void 0:n.name}),(0,t.jsx)(lP,{children:null===l||void 0===l||null===(r=l.host)||void 0===r?void 0:r.primaryIP}),(0,t.jsx)(lP,{children:null===l||void 0===l||null===(o=l.host)||void 0===o?void 0:o.platform}),(null===l||void 0===l||null===(i=l.host)||void 0===i?void 0:i.tags)&&(null===l||void 0===l||null===(a=l.host)||void 0===a?void 0:a.tags.map((function(e){return(0,t.jsx)(lP,{children:e.name},e.id)}))),u&&(0,t.jsx)(lP,{children:"Offline"})]})]})},MV=["className","children","requiredIndicator","optionalIndicator"],DV=cx((function(e,n){var r,o=vx("FormLabel",e),i=Sr(e),a=(i.className,i.children),l=i.requiredIndicator,u=void 0===l?(0,t.jsx)(NV,{}):l,s=i.optionalIndicator,c=void 0===s?null:s,f=p(i,MV),d=Yj(),v=null!=(r=null==d?void 0:d.getLabelProps(f,n))?r:h({ref:n},f);return(0,t.jsxs)(lx.label,h(h({},v),{},{className:kt("chakra-form__label",i.className),__css:h({display:"block",textAlign:"start"},o),children:[a,(null==d?void 0:d.isRequired)?u:c]}))}));DV.displayName="FormLabel";var NV=cx((function(e,n){var r=Yj(),o=qj();if(!(null==r?void 0:r.isRequired))return null;var i=kt("chakra-form__required-indicator",e.className);return(0,t.jsx)(lx.span,h(h({},null==r?void 0:r.getRequiredIndicatorProps(e,n)),{},{__css:o.requiredIndicator,className:i}))}));NV.displayName="RequiredIndicator";var LV=["htmlFor","label"],FV=function(e){var n=e.htmlFor,r=e.label,o=p(e,LV);return(0,t.jsxs)("div",{children:[(0,t.jsx)(DV,{htmlFor:n,children:(0,t.jsx)(Cj,{size:"sm",children:r})}),(0,t.jsx)(rP,h(h({colorScheme:"purple",name:n},o),{},{size:"sm"}))]})},zV=function(e){var n=e.tome,r=e.params;return(0,t.jsx)(NF,{allowToggle:!0,className:"w-full",children:(0,t.jsxs)(FF,{children:[(0,t.jsx)("h2",{children:(0,t.jsx)(zF,{children:(0,t.jsxs)("div",{className:"flex flex-row gap-2 w-full items-center",children:[(0,t.jsxs)(HF,{as:"div",flex:"1",textAlign:"left",className:"flex flex-col w-full gap-1",children:[(0,t.jsx)("div",{className:"items-center font-medium text-gray-900",children:n.name}),(0,t.jsxs)("div",{className:"flex flex-col gap-2 w-full text-sm text-gray-600",children:[(0,t.jsx)("p",{children:n.description}),r&&(0,t.jsx)("div",{className:"flex flex-col gap-1",children:r&&r.map((function(e,n){return(0,t.jsxs)("div",{className:"flex flex-row gap-1",children:[(0,t.jsxs)("label",{className:"font-medium",children:[e.label,":"]}),(0,t.jsx)("p",{children:e.value})]},"".concat(n,"_").concat(e.name))}))})]})]}),(0,t.jsxs)("div",{className:"text-sm items-center",children:["Details",(0,t.jsx)(GF,{})]})]})})}),n.eldritch&&(0,t.jsx)(tz,{pb:4,pl:12,children:(0,t.jsx)(cV,{className:"w-full",text:n.eldritch,language:"python",showLineNumbers:!1,theme:OV,codeBlock:!0})})]})})},BV=function(e){var n,r,o,i,l,u,s=e.formik,c=e.setCurrStep,f=""===(null===s||void 0===s||null===(n=s.values)||void 0===n?void 0:n.name),d=(0,a.useContext)(ZA).data;var h=function(e,t){var n=OL(t);return e.filter((function(e){return n[null===e||void 0===e?void 0:e.id]}))}((null===d||void 0===d?void 0:d.beacons)||[],s.values.beacons);return(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Confirm quest details"}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsxs)(Cj,{size:"sm",children:["Beacons (",null===s||void 0===s||null===(r=s.values)||void 0===r||null===(o=r.beacons)||void 0===o?void 0:o.length,")"]}),(0,t.jsx)("div",{className:"flex flex-col gap-2 max-h-80 overflow-scroll px-4",children:h.map((function(e){return(0,t.jsx)(IV,{beaconData:e},"beaconTile_".concat(e.id))}))})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3",children:[(0,t.jsx)(Cj,{size:"sm",children:"Tome"}),(0,t.jsx)("div",{className:"flex flex-col gap-1",children:(0,t.jsx)(zV,{tome:null===s||void 0===s||null===(i=s.values)||void 0===i?void 0:i.tome,params:null===s||void 0===s||null===(l=s.values)||void 0===l?void 0:l.params})})]}),(0,t.jsx)(FV,{htmlFor:"questName",label:"Quest name",placeholder:"Provide a recognizable name to this quest",value:null===s||void 0===s||null===(u=s.values)||void 0===u?void 0:u.name,onChange:function(e){var t,n;return n=null===e||void 0===e||null===(t=e.target)||void 0===t?void 0:t.value,void s.setFieldValue("name",n)}}),(0,t.jsxs)("div",{className:"flex flex-row gap-2",children:[(0,t.jsx)("button",{className:"inline-flex items-center rounded-md bg-gray-50 py-3 px-4 text-sm font-semibold text-purple-600 shadow-sm hover:bg-purple-100",onClick:function(){return c(1)},children:"Back"}),(0,t.jsx)("button",{className:"btn-primary",onClick:function(e){e.preventDefault(),s.handleSubmit()},disabled:f,type:"submit",children:"Submit"})]})]})},VV=function(e){return(0,t.jsx)(lx.div,h(h({className:"chakra-stack__item"},e),{},{__css:h({display:"inline-block",flex:"0 0 auto",minWidth:0},e.__css)}))};VV.displayName="StackItem";Object.freeze(["base","sm","md","lg","xl","2xl"]);function HV(e,t){return Array.isArray(e)?e.map((function(e){return null===e?null:t(e)})):Tt(e)?Object.keys(e).reduce((function(n,r){return n[r]=t(e[r]),n}),{}):null!=e?t(e):null}var UV="& > *:not(style) ~ *:not(style)";var WV=["isInline","direction","align","justify","spacing","wrap","children","divider","className","shouldWrapChildren"],GV=cx((function(e,n){var r=e.isInline,o=e.direction,i=e.align,l=e.justify,u=e.spacing,s=void 0===u?"0.5rem":u,c=e.wrap,d=e.children,v=e.divider,g=e.className,m=e.shouldWrapChildren,y=p(e,WV),b=r?"row":null!=o?o:"column",x=(0,a.useMemo)((function(){return function(e){var t=e.spacing,n=e.direction,r={column:{marginTop:t,marginEnd:0,marginBottom:0,marginStart:0},row:{marginTop:0,marginEnd:0,marginBottom:0,marginStart:t},"column-reverse":{marginTop:0,marginEnd:0,marginBottom:t,marginStart:0},"row-reverse":{marginTop:0,marginEnd:t,marginBottom:0,marginStart:0}};return f({flexDirection:n},UV,HV(n,(function(e){return r[e]})))}({direction:b,spacing:s})}),[b,s]),w=(0,a.useMemo)((function(){return function(e){var t=e.spacing,n=e.direction,r={column:{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},"column-reverse":{my:t,mx:0,borderLeftWidth:0,borderBottomWidth:"1px"},row:{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0},"row-reverse":{mx:t,my:0,borderLeftWidth:"1px",borderBottomWidth:0}};return{"&":HV(n,(function(e){return r[e]}))}}({spacing:s,direction:b})}),[s,b]),S=!!v,_=!m&&!S,k=(0,a.useMemo)((function(){var e=Ej(d);return _?e:e.map((function(n,r){var o="undefined"!==typeof n.key?n.key:r,i=r+1===e.length,l=m?(0,t.jsx)(VV,{children:n},o):n;if(!S)return l;var u=(0,a.cloneElement)(v,{__css:w}),s=i?null:u;return(0,t.jsxs)(a.Fragment,{children:[l,s]},o)}))}),[v,w,S,_,m,d]),T=kt("chakra-stack",g);return(0,t.jsx)(lx.div,h(h({ref:n,display:"flex",alignItems:i,justifyContent:l,flexDirection:x.flexDirection,flexWrap:c,className:T,__css:S?{}:f({},UV,x[UV])},y),{},{children:k}))}));GV.displayName="Stack";var qV={border:"0",clip:"rect(0, 0, 0, 0)",height:"1px",width:"1px",margin:"-1px",padding:"0",overflow:"hidden",whiteSpace:"nowrap",position:"absolute"},QV=!1,$V=null,YV=!1,KV=!1,XV=new Set;function JV(e,t){XV.forEach((function(n){return n(e,t)}))}var ZV="undefined"!==typeof window&&null!=window.navigator&&/^Mac/.test(window.navigator.platform);function eH(e){YV=!0,function(e){return!(e.metaKey||!ZV&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key)}(e)&&($V="keyboard",JV("keyboard",e))}function tH(e){if($V="pointer","mousedown"===e.type||"pointerdown"===e.type){YV=!0;var t=e.composedPath?e.composedPath()[0]:e.target,n=!1;try{n=t.matches(":focus-visible")}catch(r){}if(n)return;JV("pointer",e)}}function nH(e){var t;(0===(t=e).mozInputSource&&t.isTrusted||0===t.detail&&!t.pointerType)&&(YV=!0,$V="virtual")}function rH(e){e.target!==window&&e.target!==document&&(YV||KV||($V="virtual",JV("virtual",e)),YV=!1,KV=!1)}function oH(){YV=!1,KV=!0}function iH(){return"pointer"!==$V}function aH(){if("undefined"!==typeof window&&!QV){var e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){YV=!0;for(var t=arguments.length,n=new Array(t),r=0;r0&&void 0!==arguments[0]?arguments[0]:{},t=tP(e),n=t.isDisabled,r=t.isReadOnly,o=t.isRequired,i=t.isInvalid,l=t.id,u=t.onBlur,s=t.onFocus,c=t["aria-describedby"],f=e.defaultChecked,d=e.isChecked,v=e.isFocusable,g=e.onChange,m=e.isIndeterminate,y=e.name,b=e.value,x=e.tabIndex,w=void 0===x?void 0:x,S=e["aria-label"],_=e["aria-labelledby"],k=e["aria-invalid"],T=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=mt(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}(p(e,uH),["isDisabled","isReadOnly","isRequired","isInvalid","id","onBlur","onFocus","aria-describedby"]),C=kf(g),E=kf(u),O=kf(s),j=ut((0,a.useState)(!1),2),P=j[0],A=j[1],R=ut((0,a.useState)(!1),2),I=R[0],M=R[1],D=ut((0,a.useState)(!1),2),N=D[0],L=D[1],F=ut((0,a.useState)(!1),2),z=F[0],B=F[1];(0,a.useEffect)((function(){return lH(A)}),[]);var V=(0,a.useRef)(null),H=ut((0,a.useState)(!0),2),U=H[0],W=H[1],G=ut((0,a.useState)(!!f),2),q=G[0],Q=G[1],$=void 0!==d,Y=$?d:q,K=(0,a.useCallback)((function(e){r||n?e.preventDefault():($||Q(Y?e.target.checked:!!m||e.target.checked),null==C||C(e))}),[r,n,Y,$,m,C]);Lr((function(){V.current&&(V.current.indeterminate=Boolean(m))}),[m]),Tf((function(){n&&M(!1)}),[n,M]),Lr((function(){var e=V.current;(null==e?void 0:e.form)&&(e.form.onreset=function(){Q(!!f)})}),[]);var X=n&&!v,J=(0,a.useCallback)((function(e){" "===e.key&&B(!0)}),[B]),Z=(0,a.useCallback)((function(e){" "===e.key&&B(!1)}),[B]);Lr((function(){V.current&&(V.current.checked!==Y&&Q(V.current.checked))}),[V.current]);var ee=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},e),{},{ref:t,"data-active":jt(z),"data-hover":jt(N),"data-checked":jt(Y),"data-focus":jt(I),"data-focus-visible":jt(I&&P),"data-indeterminate":jt(m),"data-disabled":jt(n),"data-invalid":jt(i),"data-readonly":jt(r),"aria-hidden":!0,onMouseDown:At(e.onMouseDown,(function(e){I&&e.preventDefault(),B(!0)})),onMouseUp:At(e.onMouseUp,(function(){return B(!1)})),onMouseEnter:At(e.onMouseEnter,(function(){return L(!0)})),onMouseLeave:At(e.onMouseLeave,(function(){return L(!1)}))})}),[z,Y,n,I,P,N,m,i,r]),te=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h(h({},T),e),{},{ref:Bj(t,(function(e){e&&W("LABEL"===e.tagName)})),onClick:At(e.onClick,(function(){var e;U||(null==(e=V.current)||e.click(),requestAnimationFrame((function(){var e;null==(e=V.current)||e.focus()})))})),"data-disabled":jt(n),"data-checked":jt(Y),"data-invalid":jt(i)})}),[T,n,Y,i,U]),ne=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},e),{},{ref:Bj(V,t),type:"checkbox",name:y,value:b,id:l,tabIndex:w,onChange:At(e.onChange,K),onBlur:At(e.onBlur,E,(function(){return M(!1)})),onFocus:At(e.onFocus,O,(function(){return M(!0)})),onKeyDown:At(e.onKeyDown,J),onKeyUp:At(e.onKeyUp,Z),required:o,checked:Y,disabled:X,readOnly:r,"aria-label":S,"aria-labelledby":_,"aria-invalid":k?Boolean(k):i,"aria-describedby":c,"aria-disabled":n,style:qV})}),[y,b,l,K,E,O,J,Z,o,Y,X,r,S,_,k,i,c,n,w]),re=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},e),{},{ref:t,onMouseDown:At(e.onMouseDown,cH),onTouchStart:At(e.onTouchStart,cH),"data-disabled":jt(n),"data-checked":jt(Y),"data-invalid":jt(i)})}),[Y,n,i]);return{state:{isInvalid:i,isFocused:I,isChecked:Y,isActive:z,isHovered:N,isIndeterminate:m,isDisabled:n,isReadOnly:r,isRequired:o},getRootProps:te,getCheckboxProps:ee,getInputProps:ne,getLabelProps:re,htmlProps:T}}function cH(e){e.preventDefault(),e.stopPropagation()}var fH=["spacing","children"],dH=cx((function(e,n){var r=gx("Switch",e),o=Sr(e),i=o.spacing,l=void 0===i?"0.5rem":i,u=o.children,s=sH(p(o,fH)),c=s.state,f=s.getInputProps,d=s.getCheckboxProps,v=s.getRootProps,g=s.getLabelProps,m=(0,a.useMemo)((function(){return h({display:"inline-block",position:"relative",verticalAlign:"middle",lineHeight:0},r.container)}),[r.container]),y=(0,a.useMemo)((function(){return h({display:"inline-flex",flexShrink:0,justifyContent:"flex-start",boxSizing:"content-box",cursor:"pointer"},r.track)}),[r.track]),b=(0,a.useMemo)((function(){return h({userSelect:"none",marginStart:l},r.label)}),[l,r.label]);return(0,t.jsxs)(lx.label,h(h({},v()),{},{className:kt("chakra-switch",e.className),__css:m,children:[(0,t.jsx)("input",h({className:"chakra-switch__input"},f({},n))),(0,t.jsx)(lx.span,h(h({},d()),{},{className:"chakra-switch__track",__css:y,children:(0,t.jsx)(lx.span,{__css:r.thumb,className:"chakra-switch__thumb","data-checked":jt(c.isChecked),"data-hover":jt(c.isHovered)})})),u&&(0,t.jsx)(lx.span,h(h({className:"chakra-switch__label"},g()),{},{__css:b,children:u}))]}))}));dH.displayName="Switch";var hH=ut(st({strict:!1,name:"ButtonGroupContext"}),2),pH=(hH[0],hH[1]),vH=["children","className"];function gH(e){var n=e.children,r=e.className,o=p(e,vH),i=(0,a.isValidElement)(n)?(0,a.cloneElement)(n,{"aria-hidden":!0,focusable:!1}):n,l=kt("chakra-button__icon",r);return(0,t.jsx)(lx.span,h(h({display:"inline-flex",alignSelf:"center",flexShrink:0},o),{},{className:l,children:i}))}gH.displayName="ButtonIcon";var mH=["label","placement","spacing","children","className","__css"];function yH(e){var n=e.label,r=e.placement,o=e.spacing,i=void 0===o?"0.5rem":o,l=e.children,u=void 0===l?(0,t.jsx)(_x,{color:"currentColor",width:"1em",height:"1em"}):l,s=e.className,c=e.__css,d=p(e,mH),v=kt("chakra-button__spinner",s),g="start"===r?"marginEnd":"marginStart",m=(0,a.useMemo)((function(){var e;return h((f(e={display:"flex",alignItems:"center",position:n?"relative":"absolute"},g,n?i:0),f(e,"fontSize","1em"),f(e,"lineHeight","normal"),e),c)}),[c,n,g,i]);return(0,t.jsx)(lx.div,h(h({className:v},d),{},{__css:m,children:u}))}yH.displayName="ButtonSpinner";var bH=["isDisabled","isLoading","isActive","children","leftIcon","rightIcon","loadingText","iconSpacing","type","spinner","spinnerPlacement","className","as"],xH=cx((function(e,n){var r=pH(),o=vx("Button",h(h({},r),e)),i=Sr(e),l=i.isDisabled,u=void 0===l?null==r?void 0:r.isDisabled:l,s=i.isLoading,c=i.isActive,f=i.children,d=i.leftIcon,v=i.rightIcon,g=i.loadingText,m=i.iconSpacing,y=void 0===m?"0.5rem":m,b=i.type,x=i.spinner,w=i.spinnerPlacement,S=void 0===w?"start":w,_=i.className,k=i.as,T=p(i,bH),C=(0,a.useMemo)((function(){var e=h(h({},null==o?void 0:o._focus),{},{zIndex:1});return h(h({display:"inline-flex",appearance:"none",alignItems:"center",justifyContent:"center",userSelect:"none",position:"relative",whiteSpace:"nowrap",verticalAlign:"middle",outline:"none"},o),!!r&&{_focus:e})}),[o,r]),E=function(e){var t=ut((0,a.useState)(!e),2),n=t[0],r=t[1],o=(0,a.useCallback)((function(e){e&&r("BUTTON"===e.tagName)}),[]);return{ref:o,type:n?"button":void 0}}(k),O=E.ref,j=E.type,P={rightIcon:v,leftIcon:d,iconSpacing:y,children:f};return(0,t.jsxs)(lx.button,h(h({ref:Vj(n,O),as:k,type:null!=b?b:j,"data-active":jt(c),"data-loading":jt(s),__css:C,className:kt("chakra-button",_)},T),{},{disabled:u||s,children:[s&&"start"===S&&(0,t.jsx)(yH,{className:"chakra-button__spinner--start",label:g,placement:"start",spacing:y,children:x}),s?g||(0,t.jsx)(lx.span,{opacity:0,children:(0,t.jsx)(wH,h({},P))}):(0,t.jsx)(wH,h({},P)),s&&"end"===S&&(0,t.jsx)(yH,{className:"chakra-button__spinner--end",label:g,placement:"end",spacing:y,children:x})]}))}));function wH(e){var n=e.leftIcon,r=e.rightIcon,o=e.children,i=e.iconSpacing;return(0,t.jsxs)(t.Fragment,{children:[n&&(0,t.jsx)(gH,{marginEnd:i,children:n}),o,r&&(0,t.jsx)(gH,{marginStart:i,children:r})]})}xH.displayName="Button";var SH=["className","align","decoration","casing"],_H=cx((function(e,n){var r=vx("Text",e),o=Sr(e),i=(o.className,o.align,o.decoration,o.casing,p(o,SH)),a=Wb({textAlign:e.align,textDecoration:e.decoration,textTransform:e.casing});return(0,t.jsx)(lx.p,h(h(h({ref:n,className:kt("chakra-text",e.className)},a),i),{},{__css:r}))}));_H.displayName="Text";var kH=n(3679),TH=n(5217),CH=n(3688);function EH(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t=0&&u===l&&s())}var PH=function(){function e(t){var n=t.cellCount,r=t.cellSizeGetter,o=t.estimatedCellSize;pi(this,e),f(this,"_cellSizeAndPositionData",{}),f(this,"_lastMeasuredIndex",-1),f(this,"_lastBatchedIndex",-1),f(this,"_cellCount",void 0),f(this,"_cellSizeGetter",void 0),f(this,"_estimatedCellSize",void 0),this._cellSizeGetter=r,this._cellCount=n,this._estimatedCellSize=o}return hi(e,[{key:"areOffsetsAdjusted",value:function(){return!1}},{key:"configure",value:function(e){var t=e.cellCount,n=e.estimatedCellSize,r=e.cellSizeGetter;this._cellCount=t,this._estimatedCellSize=n,this._cellSizeGetter=r}},{key:"getCellCount",value:function(){return this._cellCount}},{key:"getEstimatedCellSize",value:function(){return this._estimatedCellSize}},{key:"getLastMeasuredIndex",value:function(){return this._lastMeasuredIndex}},{key:"getOffsetAdjustment",value:function(){return 0}},{key:"getSizeAndPositionOfCell",value:function(e){if(e<0||e>=this._cellCount)throw Error("Requested index ".concat(e," is outside of range 0..").concat(this._cellCount));if(e>this._lastMeasuredIndex)for(var t=this.getSizeAndPositionOfLastMeasuredCell(),n=t.offset+t.size,r=this._lastMeasuredIndex+1;r<=e;r++){var o=this._cellSizeGetter({index:r});if(void 0===o||isNaN(o))throw Error("Invalid size returned for cell ".concat(r," of value ").concat(o));null===o?(this._cellSizeAndPositionData[r]={offset:n,size:0},this._lastBatchedIndex=e):(this._cellSizeAndPositionData[r]={offset:n,size:o},n+=o,this._lastMeasuredIndex=e)}return this._cellSizeAndPositionData[e]}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._lastMeasuredIndex>=0?this._cellSizeAndPositionData[this._lastMeasuredIndex]:{offset:0,size:0}}},{key:"getTotalSize",value:function(){var e=this.getSizeAndPositionOfLastMeasuredCell();return e.offset+e.size+(this._cellCount-this._lastMeasuredIndex-1)*this._estimatedCellSize}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,o=e.currentOffset,i=e.targetIndex;if(r<=0)return 0;var a,l=this.getSizeAndPositionOfCell(i),u=l.offset,s=u-r+l.size;switch(n){case"start":a=u;break;case"end":a=s;break;case"center":a=u-(r-l.size)/2;break;default:a=Math.max(s,Math.min(u,o))}var c=this.getTotalSize();return Math.max(0,Math.min(c-r,a))}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;if(0===this.getTotalSize())return{};var r=n+t,o=this._findNearestCell(n),i=this.getSizeAndPositionOfCell(o);n=i.offset+i.size;for(var a=o;nn&&(e=r-1)}return t>0?t-1:0}},{key:"_exponentialSearch",value:function(e,t){for(var n=1;e=e?this._binarySearch(n,0,e):this._exponentialSearch(n,e)}}]),e}(),AH=function(){return"undefined"!==typeof window&&window.chrome?16777100:15e5},RH=function(){function e(t){var n=t.maxScrollSize,r=void 0===n?AH():n,o=p(t,["maxScrollSize"]);pi(this,e),f(this,"_cellSizeAndPositionManager",void 0),f(this,"_maxScrollSize",void 0),this._cellSizeAndPositionManager=new PH(o),this._maxScrollSize=r}return hi(e,[{key:"areOffsetsAdjusted",value:function(){return this._cellSizeAndPositionManager.getTotalSize()>this._maxScrollSize}},{key:"configure",value:function(e){this._cellSizeAndPositionManager.configure(e)}},{key:"getCellCount",value:function(){return this._cellSizeAndPositionManager.getCellCount()}},{key:"getEstimatedCellSize",value:function(){return this._cellSizeAndPositionManager.getEstimatedCellSize()}},{key:"getLastMeasuredIndex",value:function(){return this._cellSizeAndPositionManager.getLastMeasuredIndex()}},{key:"getOffsetAdjustment",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize(),i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:o});return Math.round(i*(o-r))}},{key:"getSizeAndPositionOfCell",value:function(e){return this._cellSizeAndPositionManager.getSizeAndPositionOfCell(e)}},{key:"getSizeAndPositionOfLastMeasuredCell",value:function(){return this._cellSizeAndPositionManager.getSizeAndPositionOfLastMeasuredCell()}},{key:"getTotalSize",value:function(){return Math.min(this._maxScrollSize,this._cellSizeAndPositionManager.getTotalSize())}},{key:"getUpdatedOffsetForIndex",value:function(e){var t=e.align,n=void 0===t?"auto":t,r=e.containerSize,o=e.currentOffset,i=e.targetIndex;o=this._safeOffsetToOffset({containerSize:r,offset:o});var a=this._cellSizeAndPositionManager.getUpdatedOffsetForIndex({align:n,containerSize:r,currentOffset:o,targetIndex:i});return this._offsetToSafeOffset({containerSize:r,offset:a})}},{key:"getVisibleCellRange",value:function(e){var t=e.containerSize,n=e.offset;return n=this._safeOffsetToOffset({containerSize:t,offset:n}),this._cellSizeAndPositionManager.getVisibleCellRange({containerSize:t,offset:n})}},{key:"resetCell",value:function(e){this._cellSizeAndPositionManager.resetCell(e)}},{key:"_getOffsetPercentage",value:function(e){var t=e.containerSize,n=e.offset,r=e.totalSize;return r<=t?0:n/(r-t)}},{key:"_offsetToSafeOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return n;var i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:r});return Math.round(i*(o-t))}},{key:"_safeOffsetToOffset",value:function(e){var t=e.containerSize,n=e.offset,r=this._cellSizeAndPositionManager.getTotalSize(),o=this.getTotalSize();if(r===o)return n;var i=this._getOffsetPercentage({containerSize:t,offset:n,totalSize:o});return Math.round(i*(r-t))}}]),e}();function IH(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t={};return function(n){var r=n.callback,o=n.indices,i=Object.keys(o),a=!e||i.every((function(e){var t=o[e];return Array.isArray(t)?t.length>0:t>=0})),l=i.length!==Object.keys(t).length||i.some((function(e){var n=t[e],r=o[e];return Array.isArray(r)?n.join(",")!==r.join(","):n!==r}));t=o,a&&l&&r(o)}}var MH=1;function DH(e){var t=e.cellSize,n=e.cellSizeAndPositionManager,r=e.previousCellsCount,o=e.previousCellSize,i=e.previousScrollToAlignment,a=e.previousScrollToIndex,l=e.previousSize,u=e.scrollOffset,s=e.scrollToAlignment,c=e.scrollToIndex,f=e.size,d=e.sizeJustIncreasedFromZero,h=e.updateScrollIndexCallback,p=n.getCellCount(),v=c>=0&&c0&&(fn.getTotalSize()-f&&h(p-1)}var NH,LH,FH=!("undefined"===typeof window||!window.document||!window.document.createElement);function zH(e){if((!NH&&0!==NH||e)&&FH){var t=document.createElement("div");t.style.position="absolute",t.style.top="-9999px",t.style.width="50px",t.style.height="50px",t.style.overflow="scroll",document.body.appendChild(t),NH=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return NH}var BH,VH,HH=(LH="undefined"!==typeof window?window:"undefined"!==typeof self?self:{}).requestAnimationFrame||LH.webkitRequestAnimationFrame||LH.mozRequestAnimationFrame||LH.oRequestAnimationFrame||LH.msRequestAnimationFrame||function(e){return LH.setTimeout(e,1e3/60)},UH=LH.cancelAnimationFrame||LH.webkitCancelAnimationFrame||LH.mozCancelAnimationFrame||LH.oCancelAnimationFrame||LH.msCancelAnimationFrame||function(e){LH.clearTimeout(e)},WH=HH,GH=UH,qH=function(e){return GH(e.id)},QH=function(e,t){var n;Promise.resolve().then((function(){n=Date.now()}));var r={id:WH((function o(){Date.now()-n>=t?e.call():r.id=WH(o)}))};return r};function $H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function YH(e){for(var t=1;t0&&(n._initialScrollTop=n._getCalculatedScrollTop(e,n.state)),e.scrollToColumn>0&&(n._initialScrollLeft=n._getCalculatedScrollLeft(e,n.state)),n}return St(t,e),hi(t,[{key:"getOffsetForCell",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.alignment,n=void 0===t?this.props.scrollToAlignment:t,r=e.columnIndex,o=void 0===r?this.props.scrollToColumn:r,i=e.rowIndex,a=void 0===i?this.props.scrollToRow:i,l=YH({},this.props,{scrollToAlignment:n,scrollToColumn:o,scrollToRow:a});return{scrollLeft:this._getCalculatedScrollLeft(l),scrollTop:this._getCalculatedScrollTop(l)}}},{key:"getTotalRowsHeight",value:function(){return this.state.instanceProps.rowSizeAndPositionManager.getTotalSize()}},{key:"getTotalColumnsWidth",value:function(){return this.state.instanceProps.columnSizeAndPositionManager.getTotalSize()}},{key:"handleScrollEvent",value:function(e){var t=e.scrollLeft,n=void 0===t?0:t,r=e.scrollTop,o=void 0===r?0:r;if(!(o<0)){this._debounceScrollEnded();var i=this.props,a=i.autoHeight,l=i.autoWidth,u=i.height,s=i.width,c=this.state.instanceProps,f=c.scrollbarSize,d=c.rowSizeAndPositionManager.getTotalSize(),h=c.columnSizeAndPositionManager.getTotalSize(),p=Math.min(Math.max(0,h-s+f),n),v=Math.min(Math.max(0,d-u+f),o);if(this.state.scrollLeft!==p||this.state.scrollTop!==v){var g={isScrolling:!0,scrollDirectionHorizontal:p!==this.state.scrollLeft?p>this.state.scrollLeft?MH:-1:this.state.scrollDirectionHorizontal,scrollDirectionVertical:v!==this.state.scrollTop?v>this.state.scrollTop?MH:-1:this.state.scrollDirectionVertical,scrollPositionChangeReason:KH};a||(g.scrollTop=v),l||(g.scrollLeft=p),g.needToResetStyleCache=!1,this.setState(g)}this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:v,totalColumnsWidth:h,totalRowsHeight:d})}}},{key:"invalidateCellSizeAfterRender",value:function(e){var t=e.columnIndex,n=e.rowIndex;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,t):t,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,n):n}},{key:"measureAllCells",value:function(){var e=this.props,t=e.columnCount,n=e.rowCount,r=this.state.instanceProps;r.columnSizeAndPositionManager.getSizeAndPositionOfCell(t-1),r.rowSizeAndPositionManager.getSizeAndPositionOfCell(n-1)}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r,i=this.props,a=i.scrollToColumn,l=i.scrollToRow,u=this.state.instanceProps;u.columnSizeAndPositionManager.resetCell(n),u.rowSizeAndPositionManager.resetCell(o),this._recomputeScrollLeftFlag=a>=0&&(this.state.scrollDirectionHorizontal===MH?n<=a:n>=a),this._recomputeScrollTopFlag=l>=0&&(this.state.scrollDirectionVertical===MH?o<=l:o>=l),this._styleCache={},this._cellCache={},this.forceUpdate()}},{key:"scrollToCell",value:function(e){var t=e.columnIndex,n=e.rowIndex,r=this.props.columnCount,o=this.props;r>1&&void 0!==t&&this._updateScrollLeftForScrollToColumn(YH({},o,{scrollToColumn:t})),void 0!==n&&this._updateScrollTopForScrollToRow(YH({},o,{scrollToRow:n}))}},{key:"componentDidMount",value:function(){var e=this.props,n=e.getScrollbarSize,r=e.height,o=e.scrollLeft,i=e.scrollToColumn,a=e.scrollTop,l=e.scrollToRow,u=e.width,s=this.state.instanceProps;if(this._initialScrollTop=0,this._initialScrollLeft=0,this._handleInvalidatedGridSize(),s.scrollbarSizeMeasured||this.setState((function(e){var t=YH({},e,{needToResetStyleCache:!1});return t.instanceProps.scrollbarSize=n(),t.instanceProps.scrollbarSizeMeasured=!0,t})),"number"===typeof o&&o>=0||"number"===typeof a&&a>=0){var c=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:o,scrollTop:a});c&&(c.needToResetStyleCache=!1,this.setState(c))}this._scrollingContainer&&(this._scrollingContainer.scrollLeft!==this.state.scrollLeft&&(this._scrollingContainer.scrollLeft=this.state.scrollLeft),this._scrollingContainer.scrollTop!==this.state.scrollTop&&(this._scrollingContainer.scrollTop=this.state.scrollTop));var f=r>0&&u>0;i>=0&&f&&this._updateScrollLeftForScrollToColumn(),l>=0&&f&&this._updateScrollTopForScrollToRow(),this._invokeOnGridRenderedHelper(),this._invokeOnScrollMemoizer({scrollLeft:o||0,scrollTop:a||0,totalColumnsWidth:s.columnSizeAndPositionManager.getTotalSize(),totalRowsHeight:s.rowSizeAndPositionManager.getTotalSize()}),this._maybeCallOnScrollbarPresenceChange()}},{key:"componentDidUpdate",value:function(e,t){var n=this,r=this.props,o=r.autoHeight,i=r.autoWidth,a=r.columnCount,l=r.height,u=r.rowCount,s=r.scrollToAlignment,c=r.scrollToColumn,f=r.scrollToRow,d=r.width,h=this.state,p=h.scrollLeft,v=h.scrollPositionChangeReason,g=h.scrollTop,m=h.instanceProps;this._handleInvalidatedGridSize();var y=a>0&&0===e.columnCount||u>0&&0===e.rowCount;v===XH&&(!i&&p>=0&&(p!==this._scrollingContainer.scrollLeft||y)&&(this._scrollingContainer.scrollLeft=p),!o&&g>=0&&(g!==this._scrollingContainer.scrollTop||y)&&(this._scrollingContainer.scrollTop=g));var b=(0===e.width||0===e.height)&&l>0&&d>0;if(this._recomputeScrollLeftFlag?(this._recomputeScrollLeftFlag=!1,this._updateScrollLeftForScrollToColumn(this.props)):DH({cellSizeAndPositionManager:m.columnSizeAndPositionManager,previousCellsCount:e.columnCount,previousCellSize:e.columnWidth,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToColumn,previousSize:e.width,scrollOffset:p,scrollToAlignment:s,scrollToIndex:c,size:d,sizeJustIncreasedFromZero:b,updateScrollIndexCallback:function(){return n._updateScrollLeftForScrollToColumn(n.props)}}),this._recomputeScrollTopFlag?(this._recomputeScrollTopFlag=!1,this._updateScrollTopForScrollToRow(this.props)):DH({cellSizeAndPositionManager:m.rowSizeAndPositionManager,previousCellsCount:e.rowCount,previousCellSize:e.rowHeight,previousScrollToAlignment:e.scrollToAlignment,previousScrollToIndex:e.scrollToRow,previousSize:e.height,scrollOffset:g,scrollToAlignment:s,scrollToIndex:f,size:l,sizeJustIncreasedFromZero:b,updateScrollIndexCallback:function(){return n._updateScrollTopForScrollToRow(n.props)}}),this._invokeOnGridRenderedHelper(),p!==t.scrollLeft||g!==t.scrollTop){var x=m.rowSizeAndPositionManager.getTotalSize(),w=m.columnSizeAndPositionManager.getTotalSize();this._invokeOnScrollMemoizer({scrollLeft:p,scrollTop:g,totalColumnsWidth:w,totalRowsHeight:x})}this._maybeCallOnScrollbarPresenceChange()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&qH(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoContainerWidth,n=e.autoHeight,r=e.autoWidth,o=e.className,i=e.containerProps,l=e.containerRole,u=e.containerStyle,s=e.height,c=e.id,f=e.noContentRenderer,d=e.role,h=e.style,p=e.tabIndex,v=e.width,g=this.state,m=g.instanceProps,y=g.needToResetStyleCache,b=this._isScrolling(),x={boxSizing:"border-box",direction:"ltr",height:n?"auto":s,position:"relative",width:r?"auto":v,WebkitOverflowScrolling:"touch",willChange:"transform"};y&&(this._styleCache={}),this.state.isScrolling||this._resetStyleCache(),this._calculateChildrenToRender(this.props,this.state);var w=m.columnSizeAndPositionManager.getTotalSize(),S=m.rowSizeAndPositionManager.getTotalSize(),_=S>s?m.scrollbarSize:0,k=w>v?m.scrollbarSize:0;k===this._horizontalScrollBarSize&&_===this._verticalScrollBarSize||(this._horizontalScrollBarSize=k,this._verticalScrollBarSize=_,this._scrollbarPresenceChanged=!0),x.overflowX=w+_<=v?"hidden":"auto",x.overflowY=S+k<=s?"hidden":"auto";var T=this._childrenToDisplay,C=0===T.length&&s>0&&v>0;return a.createElement("div",ye({ref:this._setScrollingContainerRef},i,{"aria-label":this.props["aria-label"],"aria-readonly":this.props["aria-readonly"],className:OH("ReactVirtualized__Grid",o),id:c,onScroll:this._onScroll,role:d,style:YH({},x,{},h),tabIndex:p}),T.length>0&&a.createElement("div",{className:"ReactVirtualized__Grid__innerScrollContainer",role:l,style:YH({width:t?"auto":w,height:S,maxWidth:w,maxHeight:S,overflow:"hidden",pointerEvents:b?"none":"",position:"relative"},u)},T),C&&f())}},{key:"_calculateChildrenToRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,n=e.cellRenderer,r=e.cellRangeRenderer,o=e.columnCount,i=e.deferredMeasurementCache,a=e.height,l=e.overscanColumnCount,u=e.overscanIndicesGetter,s=e.overscanRowCount,c=e.rowCount,f=e.width,d=e.isScrollingOptOut,h=t.scrollDirectionHorizontal,p=t.scrollDirectionVertical,v=t.instanceProps,g=this._initialScrollTop>0?this._initialScrollTop:t.scrollTop,m=this._initialScrollLeft>0?this._initialScrollLeft:t.scrollLeft,y=this._isScrolling(e,t);if(this._childrenToDisplay=[],a>0&&f>0){var b=v.columnSizeAndPositionManager.getVisibleCellRange({containerSize:f,offset:m}),x=v.rowSizeAndPositionManager.getVisibleCellRange({containerSize:a,offset:g}),w=v.columnSizeAndPositionManager.getOffsetAdjustment({containerSize:f,offset:m}),S=v.rowSizeAndPositionManager.getOffsetAdjustment({containerSize:a,offset:g});this._renderedColumnStartIndex=b.start,this._renderedColumnStopIndex=b.stop,this._renderedRowStartIndex=x.start,this._renderedRowStopIndex=x.stop;var _=u({direction:"horizontal",cellCount:o,overscanCellsCount:l,scrollDirection:h,startIndex:"number"===typeof b.start?b.start:0,stopIndex:"number"===typeof b.stop?b.stop:-1}),k=u({direction:"vertical",cellCount:c,overscanCellsCount:s,scrollDirection:p,startIndex:"number"===typeof x.start?x.start:0,stopIndex:"number"===typeof x.stop?x.stop:-1}),T=_.overscanStartIndex,C=_.overscanStopIndex,E=k.overscanStartIndex,O=k.overscanStopIndex;if(i){if(!i.hasFixedHeight())for(var j=E;j<=O;j++)if(!i.has(j,0)){T=0,C=o-1;break}if(!i.hasFixedWidth())for(var P=T;P<=C;P++)if(!i.has(0,P)){E=0,O=c-1;break}}this._childrenToDisplay=r({cellCache:this._cellCache,cellRenderer:n,columnSizeAndPositionManager:v.columnSizeAndPositionManager,columnStartIndex:T,columnStopIndex:C,deferredMeasurementCache:i,horizontalOffsetAdjustment:w,isScrolling:y,isScrollingOptOut:d,parent:this,rowSizeAndPositionManager:v.rowSizeAndPositionManager,rowStartIndex:E,rowStopIndex:O,scrollLeft:m,scrollTop:g,styleCache:this._styleCache,verticalOffsetAdjustment:S,visibleColumnIndices:b,visibleRowIndices:x}),this._columnStartIndex=T,this._columnStopIndex=C,this._rowStartIndex=E,this._rowStopIndex=O}}},{key:"_debounceScrollEnded",value:function(){var e=this.props.scrollingResetTimeInterval;this._disablePointerEventsTimeoutId&&qH(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=QH(this._debounceScrollEndedCallback,e)}},{key:"_handleInvalidatedGridSize",value:function(){if("number"===typeof this._deferredInvalidateColumnIndex&&"number"===typeof this._deferredInvalidateRowIndex){var e=this._deferredInvalidateColumnIndex,t=this._deferredInvalidateRowIndex;this._deferredInvalidateColumnIndex=null,this._deferredInvalidateRowIndex=null,this.recomputeGridSize({columnIndex:e,rowIndex:t})}}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,o=e.totalColumnsWidth,i=e.totalRowsHeight;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,a=t.props,l=a.height;(0,a.onScroll)({clientHeight:l,clientWidth:a.width,scrollHeight:i,scrollLeft:n,scrollTop:r,scrollWidth:o})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_isScrolling",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return Object.hasOwnProperty.call(e,"isScrolling")?Boolean(e.isScrolling):Boolean(t.isScrolling)}},{key:"_maybeCallOnScrollbarPresenceChange",value:function(){if(this._scrollbarPresenceChanged){var e=this.props.onScrollbarPresenceChange;this._scrollbarPresenceChanged=!1,e({horizontal:this._horizontalScrollBarSize>0,size:this.state.instanceProps.scrollbarSize,vertical:this._verticalScrollBarSize>0})}}},{key:"scrollToPosition",value:function(e){var n=e.scrollLeft,r=e.scrollTop,o=t._getScrollToPositionStateUpdate({prevState:this.state,scrollLeft:n,scrollTop:r});o&&(o.needToResetStyleCache=!1,this.setState(o))}},{key:"_getCalculatedScrollLeft",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollLeft(e,n)}},{key:"_updateScrollLeftForScrollToColumn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollLeftForScrollToColumnStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}},{key:"_getCalculatedScrollTop",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state;return t._getCalculatedScrollTop(e,n)}},{key:"_resetStyleCache",value:function(){var e=this._styleCache,t=this._cellCache,n=this.props.isScrollingOptOut;this._cellCache={},this._styleCache={};for(var r=this._rowStartIndex;r<=this._rowStopIndex;r++)for(var o=this._columnStartIndex;o<=this._columnStopIndex;o++){var i="".concat(r,"-").concat(o);this._styleCache[i]=e[i],n&&(this._cellCache[i]=t[i])}}},{key:"_updateScrollTopForScrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.props,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.state,r=t._getScrollTopForScrollToRowStateUpdate(e,n);r&&(r.needToResetStyleCache=!1,this.setState(r))}}],[{key:"getDerivedStateFromProps",value:function(e,n){var r={};0===e.columnCount&&0!==n.scrollLeft||0===e.rowCount&&0!==n.scrollTop?(r.scrollLeft=0,r.scrollTop=0):(e.scrollLeft!==n.scrollLeft&&e.scrollToColumn<0||e.scrollTop!==n.scrollTop&&e.scrollToRow<0)&&Object.assign(r,t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}));var o,i,a=n.instanceProps;return r.needToResetStyleCache=!1,e.columnWidth===a.prevColumnWidth&&e.rowHeight===a.prevRowHeight||(r.needToResetStyleCache=!0),a.columnSizeAndPositionManager.configure({cellCount:e.columnCount,estimatedCellSize:t._getEstimatedColumnSize(e),cellSizeGetter:t._wrapSizeGetter(e.columnWidth)}),a.rowSizeAndPositionManager.configure({cellCount:e.rowCount,estimatedCellSize:t._getEstimatedRowSize(e),cellSizeGetter:t._wrapSizeGetter(e.rowHeight)}),0!==a.prevColumnCount&&0!==a.prevRowCount||(a.prevColumnCount=0,a.prevRowCount=0),e.autoHeight&&!1===e.isScrolling&&!0===a.prevIsScrolling&&Object.assign(r,{isScrolling:!1}),jH({cellCount:a.prevColumnCount,cellSize:"number"===typeof a.prevColumnWidth?a.prevColumnWidth:null,computeMetadataCallback:function(){return a.columnSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.columnCount,nextCellSize:"number"===typeof e.columnWidth?e.columnWidth:null,nextScrollToIndex:e.scrollToColumn,scrollToIndex:a.prevScrollToColumn,updateScrollOffsetForScrollToIndex:function(){o=t._getScrollLeftForScrollToColumnStateUpdate(e,n)}}),jH({cellCount:a.prevRowCount,cellSize:"number"===typeof a.prevRowHeight?a.prevRowHeight:null,computeMetadataCallback:function(){return a.rowSizeAndPositionManager.resetCell(0)},computeMetadataCallbackProps:e,nextCellsCount:e.rowCount,nextCellSize:"number"===typeof e.rowHeight?e.rowHeight:null,nextScrollToIndex:e.scrollToRow,scrollToIndex:a.prevScrollToRow,updateScrollOffsetForScrollToIndex:function(){i=t._getScrollTopForScrollToRowStateUpdate(e,n)}}),a.prevColumnCount=e.columnCount,a.prevColumnWidth=e.columnWidth,a.prevIsScrolling=!0===e.isScrolling,a.prevRowCount=e.rowCount,a.prevRowHeight=e.rowHeight,a.prevScrollToColumn=e.scrollToColumn,a.prevScrollToRow=e.scrollToRow,a.scrollbarSize=e.getScrollbarSize(),void 0===a.scrollbarSize?(a.scrollbarSizeMeasured=!1,a.scrollbarSize=0):a.scrollbarSizeMeasured=!0,r.instanceProps=a,YH({},r,{},o,{},i)}},{key:"_getEstimatedColumnSize",value:function(e){return"number"===typeof e.columnWidth?e.columnWidth:e.estimatedColumnSize}},{key:"_getEstimatedRowSize",value:function(e){return"number"===typeof e.rowHeight?e.rowHeight:e.estimatedRowSize}},{key:"_getScrollToPositionStateUpdate",value:function(e){var t=e.prevState,n=e.scrollLeft,r=e.scrollTop,o={scrollPositionChangeReason:XH};return"number"===typeof n&&n>=0&&(o.scrollDirectionHorizontal=n>t.scrollLeft?MH:-1,o.scrollLeft=n),"number"===typeof r&&r>=0&&(o.scrollDirectionVertical=r>t.scrollTop?MH:-1,o.scrollTop=r),"number"===typeof n&&n>=0&&n!==t.scrollLeft||"number"===typeof r&&r>=0&&r!==t.scrollTop?o:{}}},{key:"_wrapSizeGetter",value:function(e){return"function"===typeof e?e:function(){return e}}},{key:"_getCalculatedScrollLeft",value:function(e,t){var n=e.columnCount,r=e.height,o=e.scrollToAlignment,i=e.scrollToColumn,a=e.width,l=t.scrollLeft,u=t.instanceProps;if(n>0){var s=n-1,c=i<0?s:Math.min(s,i),f=u.rowSizeAndPositionManager.getTotalSize(),d=u.scrollbarSizeMeasured&&f>r?u.scrollbarSize:0;return u.columnSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:a-d,currentOffset:l,targetIndex:c})}return 0}},{key:"_getScrollLeftForScrollToColumnStateUpdate",value:function(e,n){var r=n.scrollLeft,o=t._getCalculatedScrollLeft(e,n);return"number"===typeof o&&o>=0&&r!==o?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:o,scrollTop:-1}):{}}},{key:"_getCalculatedScrollTop",value:function(e,t){var n=e.height,r=e.rowCount,o=e.scrollToAlignment,i=e.scrollToRow,a=e.width,l=t.scrollTop,u=t.instanceProps;if(r>0){var s=r-1,c=i<0?s:Math.min(s,i),f=u.columnSizeAndPositionManager.getTotalSize(),d=u.scrollbarSizeMeasured&&f>a?u.scrollbarSize:0;return u.rowSizeAndPositionManager.getUpdatedOffsetForIndex({align:o,containerSize:n-d,currentOffset:l,targetIndex:c})}return 0}},{key:"_getScrollTopForScrollToRowStateUpdate",value:function(e,n){var r=n.scrollTop,o=t._getCalculatedScrollTop(e,n);return"number"===typeof o&&o>=0&&r!==o?t._getScrollToPositionStateUpdate({prevState:n,scrollLeft:-1,scrollTop:o}):{}}}]),t}(a.PureComponent),f(BH,"propTypes",null),VH);f(JH,"defaultProps",{"aria-label":"grid","aria-readonly":!0,autoContainerWidth:!1,autoHeight:!1,autoWidth:!1,cellRangeRenderer:function(e){for(var t=e.cellCache,n=e.cellRenderer,r=e.columnSizeAndPositionManager,o=e.columnStartIndex,i=e.columnStopIndex,a=e.deferredMeasurementCache,l=e.horizontalOffsetAdjustment,u=e.isScrolling,s=e.isScrollingOptOut,c=e.parent,f=e.rowSizeAndPositionManager,d=e.rowStartIndex,h=e.rowStopIndex,p=e.styleCache,v=e.verticalOffsetAdjustment,g=e.visibleColumnIndices,m=e.visibleRowIndices,y=[],b=r.areOffsetsAdjusted()||f.areOffsetsAdjusted(),x=!u&&!b,w=d;w<=h;w++)for(var S=f.getSizeAndPositionOfCell(w),_=o;_<=i;_++){var k=r.getSizeAndPositionOfCell(_),T=_>=g.start&&_<=g.stop&&w>=m.start&&w<=m.stop,C="".concat(w,"-").concat(_),E=void 0;x&&p[C]?E=p[C]:a&&!a.has(w,_)?E={height:"auto",left:0,position:"absolute",top:0,width:"auto"}:(E={height:S.size,left:k.offset+l,position:"absolute",top:S.offset+v,width:k.size},p[C]=E);var O={columnIndex:_,isScrolling:u,isVisible:T,key:C,parent:c,rowIndex:w,style:E},j=void 0;!s&&!u||l||v?j=n(O):(t[C]||(t[C]=n(O)),j=t[C]),null!=j&&!1!==j&&y.push(j)}return y},containerRole:"rowgroup",containerStyle:{},estimatedColumnSize:100,estimatedRowSize:30,getScrollbarSize:zH,noContentRenderer:function(){return null},onScroll:function(){},onScrollbarPresenceChange:function(){},onSectionRendered:function(){},overscanColumnCount:0,overscanIndicesGetter:function(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,o=e.startIndex,i=e.stopIndex;return r===MH?{overscanStartIndex:Math.max(0,o),overscanStopIndex:Math.min(t-1,i+n)}:{overscanStartIndex:Math.max(0,o-n),overscanStopIndex:Math.min(t-1,i)}},overscanRowCount:10,role:"grid",scrollingResetTimeInterval:150,scrollToAlignment:"auto",scrollToColumn:-1,scrollToRow:-1,style:{},tabIndex:0,isScrollingOptOut:!1}),(0,CH.polyfill)(JH);var ZH=JH,eU=1;function tU(e){var t=e.cellCount,n=e.overscanCellsCount,r=e.scrollDirection,o=e.startIndex,i=e.stopIndex;return n=Math.max(1,n),r===eU?{overscanStartIndex:Math.max(0,o-1),overscanStopIndex:Math.min(t-1,i+n)}:{overscanStartIndex:Math.max(0,o-n),overscanStopIndex:Math.min(t-1,i+1)}}var nU,rU;function oU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var iU=(rU=nU=function(e){function t(){var e,n;pi(this,t);for(var r=arguments.length,o=new Array(r),i=0;i div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',r=t.head||t.getElementsByTagName("head")[0],o=t.createElement("style");o.id="detectElementResize",o.type="text/css",null!=e&&o.setAttribute("nonce",e),o.styleSheet?o.styleSheet.cssText=n:o.appendChild(t.createTextNode(n)),r.appendChild(o)}}(i),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=i.createElement("div")).className="resize-triggers";var s='';if(window.trustedTypes){var c=trustedTypes.createPolicy("react-virtualized-auto-sizer",{createHTML:function(){return s}});t.__resizeTriggers__.innerHTML=c.createHTML("")}else t.__resizeTriggers__.innerHTML=s;t.appendChild(t.__resizeTriggers__),l(t),t.addEventListener("scroll",u,!0),f&&(t.__resizeTriggers__.__animationListener__=function(e){e.animationName==g&&l(t)},t.__resizeTriggers__.addEventListener(f,t.__resizeTriggers__.__animationListener__))}t.__resizeListeners__.push(n)}},removeResizeListener:function(e,t){if(o)e.detachEvent("onresize",t);else if(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),!e.__resizeListeners__.length){e.removeEventListener("scroll",u,!0),e.__resizeTriggers__.__animationListener__&&(e.__resizeTriggers__.removeEventListener(f,e.__resizeTriggers__.__animationListener__),e.__resizeTriggers__.__animationListener__=null);try{e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)}catch(n){}}}}}function sU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function cU(e){for(var t=1;t=0){var c=t.getScrollPositionForCell({align:o,cellIndex:i,height:r,scrollLeft:u,scrollTop:s,width:a});c.scrollLeft===u&&c.scrollTop===s||n._setScrollPosition(c)}})),f(mi(n),"_onScroll",(function(e){if(e.target===n._scrollingContainer){n._enablePointerEventsAfterDelay();var t=n.props,r=t.cellLayoutManager,o=t.height,i=t.isScrollingChange,a=t.width,l=n._scrollbarSize,u=r.getTotalSize(),s=u.height,c=u.width,f=Math.max(0,Math.min(c-a+l,e.target.scrollLeft)),d=Math.max(0,Math.min(s-o+l,e.target.scrollTop));if(n.state.scrollLeft!==f||n.state.scrollTop!==d){var h=e.cancelable?mU.OBSERVED:mU.REQUESTED;n.state.isScrolling||i(!0),n.setState({isScrolling:!0,scrollLeft:f,scrollPositionChangeReason:h,scrollTop:d})}n._invokeOnScrollMemoizer({scrollLeft:f,scrollTop:d,totalWidth:c,totalHeight:s})}})),n._scrollbarSize=zH(),void 0===n._scrollbarSize?(n._scrollbarSizeMeasured=!1,n._scrollbarSize=0):n._scrollbarSizeMeasured=!0,n}return St(t,e),hi(t,[{key:"recomputeCellSizesAndPositions",value:function(){this._calculateSizeAndPositionDataOnNextUpdate=!0,this.forceUpdate()}},{key:"componentDidMount",value:function(){var e=this.props,t=e.cellLayoutManager,n=e.scrollLeft,r=e.scrollToCell,o=e.scrollTop;this._scrollbarSizeMeasured||(this._scrollbarSize=zH(),this._scrollbarSizeMeasured=!0,this.setState({})),r>=0?this._updateScrollPositionForScrollToCell():(n>=0||o>=0)&&this._setScrollPosition({scrollLeft:n,scrollTop:o}),this._invokeOnSectionRenderedHelper();var i=t.getTotalSize(),a=i.height,l=i.width;this._invokeOnScrollMemoizer({scrollLeft:n||0,scrollTop:o||0,totalHeight:a,totalWidth:l})}},{key:"componentDidUpdate",value:function(e,t){var n=this.props,r=n.height,o=n.scrollToAlignment,i=n.scrollToCell,a=n.width,l=this.state,u=l.scrollLeft,s=l.scrollPositionChangeReason,c=l.scrollTop;s===mU.REQUESTED&&(u>=0&&u!==t.scrollLeft&&u!==this._scrollingContainer.scrollLeft&&(this._scrollingContainer.scrollLeft=u),c>=0&&c!==t.scrollTop&&c!==this._scrollingContainer.scrollTop&&(this._scrollingContainer.scrollTop=c)),r===e.height&&o===e.scrollToAlignment&&i===e.scrollToCell&&a===e.width||this._updateScrollPositionForScrollToCell(),this._invokeOnSectionRenderedHelper()}},{key:"componentWillUnmount",value:function(){this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId)}},{key:"render",value:function(){var e=this.props,t=e.autoHeight,n=e.cellCount,r=e.cellLayoutManager,o=e.className,i=e.height,l=e.horizontalOverscanSize,u=e.id,s=e.noContentRenderer,c=e.style,f=e.verticalOverscanSize,d=e.width,h=this.state,p=h.isScrolling,v=h.scrollLeft,g=h.scrollTop;(this._lastRenderedCellCount!==n||this._lastRenderedCellLayoutManager!==r||this._calculateSizeAndPositionDataOnNextUpdate)&&(this._lastRenderedCellCount=n,this._lastRenderedCellLayoutManager=r,this._calculateSizeAndPositionDataOnNextUpdate=!1,r.calculateSizeAndPositionData());var m=r.getTotalSize(),y=m.height,b=m.width,x=Math.max(0,v-l),w=Math.max(0,g-f),S=Math.min(b,v+d+l),_=Math.min(y,g+i+f),k=i>0&&d>0?r.cellRenderers({height:_-w,isScrolling:p,width:S-x,x:x,y:w}):[],T={boxSizing:"border-box",direction:"ltr",height:t?"auto":i,position:"relative",WebkitOverflowScrolling:"touch",width:d,willChange:"transform"},C=y>i?this._scrollbarSize:0,E=b>d?this._scrollbarSize:0;return T.overflowX=b+C<=d?"hidden":"auto",T.overflowY=y+E<=i?"hidden":"auto",a.createElement("div",{ref:this._setScrollingContainerRef,"aria-label":this.props["aria-label"],className:OH("ReactVirtualized__Collection",o),id:u,onScroll:this._onScroll,role:"grid",style:gU({},T,{},c),tabIndex:0},n>0&&a.createElement("div",{className:"ReactVirtualized__Collection__innerScrollContainer",style:{height:y,maxHeight:y,maxWidth:b,overflow:"hidden",pointerEvents:p?"none":"",width:b}},k),0===n&&s())}},{key:"_enablePointerEventsAfterDelay",value:function(){var e=this;this._disablePointerEventsTimeoutId&&clearTimeout(this._disablePointerEventsTimeoutId),this._disablePointerEventsTimeoutId=setTimeout((function(){(0,e.props.isScrollingChange)(!1),e._disablePointerEventsTimeoutId=null,e.setState({isScrolling:!1})}),150)}},{key:"_invokeOnScrollMemoizer",value:function(e){var t=this,n=e.scrollLeft,r=e.scrollTop,o=e.totalHeight,i=e.totalWidth;this._onScrollMemoizer({callback:function(e){var n=e.scrollLeft,r=e.scrollTop,a=t.props,l=a.height;(0,a.onScroll)({clientHeight:l,clientWidth:a.width,scrollHeight:o,scrollLeft:n,scrollTop:r,scrollWidth:i})},indices:{scrollLeft:n,scrollTop:r}})}},{key:"_setScrollPosition",value:function(e){var t=e.scrollLeft,n=e.scrollTop,r={scrollPositionChangeReason:mU.REQUESTED};t>=0&&(r.scrollLeft=t),n>=0&&(r.scrollTop=n),(t>=0&&t!==this.state.scrollLeft||n>=0&&n!==this.state.scrollTop)&&this.setState(r)}}],[{key:"getDerivedStateFromProps",value:function(e,t){return 0!==e.cellCount||0===t.scrollLeft&&0===t.scrollTop?e.scrollLeft!==t.scrollLeft||e.scrollTop!==t.scrollTop?{scrollLeft:null!=e.scrollLeft?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop?e.scrollTop:t.scrollTop,scrollPositionChangeReason:mU.REQUESTED}:null:{scrollLeft:0,scrollTop:0,scrollPositionChangeReason:mU.REQUESTED}}}]),t}(a.PureComponent);f(yU,"defaultProps",{"aria-label":"grid",horizontalOverscanSize:0,noContentRenderer:function(){return null},onScroll:function(){return null},onSectionRendered:function(){return null},scrollToAlignment:"auto",scrollToCell:-1,style:{},verticalOverscanSize:0}),yU.propTypes={},(0,CH.polyfill)(yU);var bU=yU,xU=function(){function e(t){var n=t.height,r=t.width,o=t.x,i=t.y;pi(this,e),this.height=n,this.width=r,this.x=o,this.y=i,this._indexMap={},this._indices=[]}return hi(e,[{key:"addCellIndex",value:function(e){var t=e.index;this._indexMap[t]||(this._indexMap[t]=!0,this._indices.push(t))}},{key:"getCellIndices",value:function(){return this._indices}},{key:"toString",value:function(){return"".concat(this.x,",").concat(this.y," ").concat(this.width,"x").concat(this.height)}}]),e}(),wU=100,SU=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:wU;pi(this,e),this._sectionSize=t,this._cellMetadata=[],this._sections={}}return hi(e,[{key:"getCellIndices",value:function(e){var t=e.height,n=e.width,r=e.x,o=e.y,i={};return this.getSections({height:t,width:n,x:r,y:o}).forEach((function(e){return e.getCellIndices().forEach((function(e){i[e]=e}))})),Object.keys(i).map((function(e){return i[e]}))}},{key:"getCellMetadata",value:function(e){var t=e.index;return this._cellMetadata[t]}},{key:"getSections",value:function(e){for(var t=e.height,n=e.width,r=e.x,o=e.y,i=Math.floor(r/this._sectionSize),a=Math.floor((r+n-1)/this._sectionSize),l=Math.floor(o/this._sectionSize),u=Math.floor((o+t-1)/this._sectionSize),s=[],c=i;c<=a;c++)for(var f=l;f<=u;f++){var d="".concat(c,".").concat(f);this._sections[d]||(this._sections[d]=new xU({height:this._sectionSize,width:this._sectionSize,x:c*this._sectionSize,y:f*this._sectionSize})),s.push(this._sections[d])}return s}},{key:"getTotalSectionCount",value:function(){return Object.keys(this._sections).length}},{key:"toString",value:function(){var e=this;return Object.keys(this._sections).map((function(t){return e._sections[t].toString()}))}},{key:"registerCell",value:function(e){var t=e.cellMetadatum,n=e.index;this._cellMetadata[n]=t,this.getSections(t).forEach((function(e){return e.addCellIndex({index:n})}))}}]),e}();function _U(e){var t=e.align,n=void 0===t?"auto":t,r=e.cellOffset,o=e.cellSize,i=e.containerSize,a=e.currentOffset,l=r,u=l-i+o;switch(n){case"start":return l;case"end":return u;case"center":return l-(i-o)/2;default:return Math.max(u,Math.min(l,a))}}var kU=function(e){function t(e,n){var r;return pi(this,t),(r=yi(this,vi(t).call(this,e,n)))._cellMetadata=[],r._lastRenderedCellIndices=[],r._cellCache=[],r._isScrollingChange=r._isScrollingChange.bind(mi(r)),r._setCollectionViewRef=r._setCollectionViewRef.bind(mi(r)),r}return St(t,e),hi(t,[{key:"forceUpdate",value:function(){void 0!==this._collectionView&&this._collectionView.forceUpdate()}},{key:"recomputeCellSizesAndPositions",value:function(){this._cellCache=[],this._collectionView.recomputeCellSizesAndPositions()}},{key:"render",value:function(){var e=ye({},this.props);return a.createElement(bU,ye({cellLayoutManager:this,isScrollingChange:this._isScrollingChange,ref:this._setCollectionViewRef},e))}},{key:"calculateSizeAndPositionData",value:function(){var e=this.props,t=function(e){for(var t=e.cellCount,n=e.cellSizeAndPositionGetter,r=e.sectionSize,o=[],i=new SU(r),a=0,l=0,u=0;u=0&&nn||o1&&void 0!==arguments[1]?arguments[1]:0,n="function"===typeof e.recomputeGridSize?e.recomputeGridSize:e.recomputeRowHeights;n?n.call(e,t):e.forceUpdate()}(t._registeredChild,t._lastRenderedStartIndex)}))}))}},{key:"_onRowsRendered",value:function(e){var t=e.startIndex,n=e.stopIndex;this._lastRenderedStartIndex=t,this._lastRenderedStopIndex=n,this._doStuff(t,n)}},{key:"_doStuff",value:function(e,t){var n,r=this,o=this.props,i=o.isRowLoaded,a=o.minimumBatchSize,l=o.rowCount,u=o.threshold,s=function(e){for(var t=e.isRowLoaded,n=e.minimumBatchSize,r=e.rowCount,o=e.startIndex,i=e.stopIndex,a=[],l=null,u=null,s=o;s<=i;s++){t({index:s})?null!==u&&(a.push({startIndex:l,stopIndex:u}),l=u=null):(u=s,null===l&&(l=s))}if(null!==u){for(var c=Math.min(Math.max(u,l+n-1),r-1),f=u+1;f<=c&&!t({index:f});f++)u=f;a.push({startIndex:l,stopIndex:u})}if(a.length)for(var d=a[0];d.stopIndex-d.startIndex+10;){var h=d.startIndex-1;if(t({index:h}))break;d.startIndex=h}return a}({isRowLoaded:i,minimumBatchSize:a,rowCount:l,startIndex:Math.max(0,e-u),stopIndex:Math.min(l-1,t+u)}),c=(n=[]).concat.apply(n,bt(s.map((function(e){return[e.startIndex,e.stopIndex]}))));this._loadMoreRowsMemoizer({callback:function(){r._loadUnloadedRanges(s)},indices:{squashedUnloadedRanges:c}})}},{key:"_registerChild",value:function(e){this._registeredChild=e}}]),t}(a.PureComponent);f(TU,"defaultProps",{minimumBatchSize:10,rowCount:0,threshold:15}),TU.propTypes={};var CU,EU,OU=(EU=CU=function(e){function t(){var e,n;pi(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:o,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e,columnIndex:0})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.noRowsRenderer,r=e.scrollToIndex,o=e.width,i=OH("ReactVirtualized__List",t);return a.createElement(ZH,ye({},this.props,{autoContainerWidth:!0,cellRenderer:this._cellRenderer,className:i,columnWidth:o,columnCount:1,noContentRenderer:n,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,scrollToRow:r}))}}]),t}(a.PureComponent),f(CU,"propTypes",null),EU);f(OU,"defaultProps",{autoHeight:!1,estimatedRowSize:30,onScroll:function(){},noRowsRenderer:function(){return null},onRowsRendered:function(){},overscanIndicesGetter:tU,overscanRowCount:10,scrollToAlignment:"auto",scrollToIndex:-1,style:{}});var jU={ge:function(e,t,n,r,o){return"function"===typeof n?function(e,t,n,r,o){for(var i=n+1;t<=n;){var a=t+n>>>1;o(e[a],r)>=0?(i=a,n=a-1):t=a+1}return i}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(var o=n+1;t<=n;){var i=t+n>>>1;e[i]>=r?(o=i,n=i-1):t=i+1}return o}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},gt:function(e,t,n,r,o){return"function"===typeof n?function(e,t,n,r,o){for(var i=n+1;t<=n;){var a=t+n>>>1;o(e[a],r)>0?(i=a,n=a-1):t=a+1}return i}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(var o=n+1;t<=n;){var i=t+n>>>1;e[i]>r?(o=i,n=i-1):t=i+1}return o}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},lt:function(e,t,n,r,o){return"function"===typeof n?function(e,t,n,r,o){for(var i=t-1;t<=n;){var a=t+n>>>1;o(e[a],r)<0?(i=a,t=a+1):n=a-1}return i}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(var o=t-1;t<=n;){var i=t+n>>>1;e[i]>>1;o(e[a],r)<=0?(i=a,t=a+1):n=a-1}return i}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(var o=t-1;t<=n;){var i=t+n>>>1;e[i]<=r?(o=i,t=i+1):n=i-1}return o}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)},eq:function(e,t,n,r,o){return"function"===typeof n?function(e,t,n,r,o){for(;t<=n;){var i=t+n>>>1,a=o(e[i],r);if(0===a)return i;a<=0?t=i+1:n=i-1}return-1}(e,void 0===r?0:0|r,void 0===o?e.length-1:0|o,t,n):function(e,t,n,r){for(;t<=n;){var o=t+n>>>1,i=e[o];if(i===r)return o;i<=r?t=o+1:n=o-1}return-1}(e,void 0===n?0:0|n,void 0===r?e.length-1:0|r,t)}},PU=0,AU=1;function RU(e,t,n,r,o){this.mid=e,this.left=t,this.right=n,this.leftPoints=r,this.rightPoints=o,this.count=(t?t.count:0)+(n?n.count:0)+r.length}var IU=RU.prototype;function MU(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function DU(e,t){var n=WU(t);e.mid=n.mid,e.left=n.left,e.right=n.right,e.leftPoints=n.leftPoints,e.rightPoints=n.rightPoints,e.count=n.count}function NU(e,t){var n=e.intervals([]);n.push(t),DU(e,n)}function LU(e,t){var n=e.intervals([]),r=n.indexOf(t);return r<0?PU:(n.splice(r,1),DU(e,n),AU)}function FU(e,t,n){for(var r=0;r=0&&e[r][1]>=t;--r){var o=n(e[r]);if(o)return o}}function BU(e,t){for(var n=0;n>1],o=[],i=[],a=[];for(n=0;n3*(t+1)?NU(this,e):this.left.insert(e):this.left=WU([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?NU(this,e):this.right.insert(e):this.right=WU([e]);else{var n=jU.ge(this.leftPoints,e,HU),r=jU.ge(this.rightPoints,e,UU);this.leftPoints.splice(n,0,e),this.rightPoints.splice(r,0,e)}},IU.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1)?LU(this,e):2===(i=this.left.remove(e))?(this.left=null,this.count-=1,AU):(i===AU&&(this.count-=1),i):PU;if(e[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(t-1)?LU(this,e):2===(i=this.right.remove(e))?(this.right=null,this.count-=1,AU):(i===AU&&(this.count-=1),i):PU;if(1===this.count)return this.leftPoints[0]===e?2:PU;if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var n=this,r=this.left;r.right;)n=r,r=r.right;if(n===this)r.right=this.right;else{var o=this.left,i=this.right;n.count-=r.count,n.right=r.left,r.left=o,r.right=i}MU(this,r),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?MU(this,this.left):MU(this,this.right);return AU}for(o=jU.ge(this.leftPoints,e,HU);othis.mid){var n;if(this.right)if(n=this.right.queryPoint(e,t))return n;return zU(this.rightPoints,e,t)}return BU(this.leftPoints,t)},IU.queryInterval=function(e,t,n){var r;if(ethis.mid&&this.right&&(r=this.right.queryInterval(e,t,n)))return r;return tthis.mid?zU(this.rightPoints,e,n):BU(this.leftPoints,n)};var qU=GU.prototype;qU.insert=function(e){this.root?this.root.insert(e):this.root=new RU(e[0],null,null,[e],[e])},qU.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),t!==PU}return!1},qU.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},qU.queryInterval=function(e,t,n){if(e<=t&&this.root)return this.root.queryInterval(e,t,n)},Object.defineProperty(qU,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(qU,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}});var QU,$U,YU=function(){function e(){var t;pi(this,e),f(this,"_columnSizeMap",{}),f(this,"_intervalTree",t&&0!==t.length?new GU(WU(t)):new GU(null)),f(this,"_leftMap",{})}return hi(e,[{key:"estimateTotalHeight",value:function(e,t,n){var r=e-this.count;return this.tallestColumnSize+Math.ceil(r/t)*n}},{key:"range",value:function(e,t,n){var r=this;this._intervalTree.queryInterval(e,e+t,(function(e){var t=ut(e,3),o=t[0],i=(t[1],t[2]);return n(i,r._leftMap[i],o)}))}},{key:"setPosition",value:function(e,t,n,r){this._intervalTree.insert([n,n+r,e]),this._leftMap[e]=t;var o=this._columnSizeMap,i=o[t];o[t]=void 0===i?n+r:Math.max(i,n+r)}},{key:"count",get:function(){return this._intervalTree.count}},{key:"shortestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=0===t?r:Math.min(t,r)}return t}},{key:"tallestColumnSize",get:function(){var e=this._columnSizeMap,t=0;for(var n in e){var r=e[n];t=Math.max(t,r)}return t}}]),e}();function KU(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function XU(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};pi(this,e),f(this,"_cellMeasurerCache",void 0),f(this,"_columnIndexOffset",void 0),f(this,"_rowIndexOffset",void 0),f(this,"columnWidth",(function(e){var n=e.index;t._cellMeasurerCache.columnWidth({index:n+t._columnIndexOffset})})),f(this,"rowHeight",(function(e){var n=e.index;t._cellMeasurerCache.rowHeight({index:n+t._rowIndexOffset})}));var r=n.cellMeasurerCache,o=n.columnIndexOffset,i=void 0===o?0:o,a=n.rowIndexOffset,l=void 0===a?0:a;this._cellMeasurerCache=r,this._columnIndexOffset=i,this._rowIndexOffset=l}return hi(e,[{key:"clear",value:function(e,t){this._cellMeasurerCache.clear(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"clearAll",value:function(){this._cellMeasurerCache.clearAll()}},{key:"hasFixedHeight",value:function(){return this._cellMeasurerCache.hasFixedHeight()}},{key:"hasFixedWidth",value:function(){return this._cellMeasurerCache.hasFixedWidth()}},{key:"getHeight",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getHeight(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"getWidth",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.getWidth(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"has",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._cellMeasurerCache.has(e+this._rowIndexOffset,t+this._columnIndexOffset)}},{key:"set",value:function(e,t,n,r){this._cellMeasurerCache.set(e+this._rowIndexOffset,t+this._columnIndexOffset,n,r)}},{key:"defaultHeight",get:function(){return this._cellMeasurerCache.defaultHeight}},{key:"defaultWidth",get:function(){return this._cellMeasurerCache.defaultWidth}}]),e}();function tW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function nW(e){for(var t=1;t0?new eW({cellMeasurerCache:o,columnIndexOffset:0,rowIndexOffset:l}):o,r._deferredMeasurementCacheBottomRightGrid=i>0||l>0?new eW({cellMeasurerCache:o,columnIndexOffset:i,rowIndexOffset:l}):o,r._deferredMeasurementCacheTopRightGrid=i>0?new eW({cellMeasurerCache:o,columnIndexOffset:i,rowIndexOffset:0}):o),r}return St(t,e),hi(t,[{key:"forceUpdateGrids",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.forceUpdate(),this._bottomRightGrid&&this._bottomRightGrid.forceUpdate(),this._topLeftGrid&&this._topLeftGrid.forceUpdate(),this._topRightGrid&&this._topRightGrid.forceUpdate()}},{key:"invalidateCellSizeAfterRender",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r;this._deferredInvalidateColumnIndex="number"===typeof this._deferredInvalidateColumnIndex?Math.min(this._deferredInvalidateColumnIndex,n):n,this._deferredInvalidateRowIndex="number"===typeof this._deferredInvalidateRowIndex?Math.min(this._deferredInvalidateRowIndex,o):o}},{key:"measureAllCells",value:function(){this._bottomLeftGrid&&this._bottomLeftGrid.measureAllCells(),this._bottomRightGrid&&this._bottomRightGrid.measureAllCells(),this._topLeftGrid&&this._topLeftGrid.measureAllCells(),this._topRightGrid&&this._topRightGrid.measureAllCells()}},{key:"recomputeGridSize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r,i=this.props,a=i.fixedColumnCount,l=i.fixedRowCount,u=Math.max(0,n-a),s=Math.max(0,o-l);this._bottomLeftGrid&&this._bottomLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:s}),this._bottomRightGrid&&this._bottomRightGrid.recomputeGridSize({columnIndex:u,rowIndex:s}),this._topLeftGrid&&this._topLeftGrid.recomputeGridSize({columnIndex:n,rowIndex:o}),this._topRightGrid&&this._topRightGrid.recomputeGridSize({columnIndex:u,rowIndex:o}),this._leftGridWidth=null,this._topGridHeight=null,this._maybeCalculateCachedStyles(!0)}},{key:"componentDidMount",value:function(){var e=this.props,t=e.scrollLeft,n=e.scrollTop;if(t>0||n>0){var r={};t>0&&(r.scrollLeft=t),n>0&&(r.scrollTop=n),this.setState(r)}this._handleInvalidatedGridSize()}},{key:"componentDidUpdate",value:function(){this._handleInvalidatedGridSize()}},{key:"render",value:function(){var e=this.props,t=e.onScroll,n=e.onSectionRendered,r=(e.onScrollbarPresenceChange,e.scrollLeft,e.scrollToColumn),o=(e.scrollTop,e.scrollToRow),i=p(e,["onScroll","onSectionRendered","onScrollbarPresenceChange","scrollLeft","scrollToColumn","scrollTop","scrollToRow"]);if(this._prepareForRender(),0===this.props.width||0===this.props.height)return null;var l=this.state,u=l.scrollLeft,s=l.scrollTop;return a.createElement("div",{style:this._containerOuterStyle},a.createElement("div",{style:this._containerTopStyle},this._renderTopLeftGrid(i),this._renderTopRightGrid(nW({},i,{onScroll:t,scrollLeft:u}))),a.createElement("div",{style:this._containerBottomStyle},this._renderBottomLeftGrid(nW({},i,{onScroll:t,scrollTop:s})),this._renderBottomRightGrid(nW({},i,{onScroll:t,onSectionRendered:n,scrollLeft:u,scrollToColumn:r,scrollToRow:o,scrollTop:s}))))}},{key:"_getBottomGridHeight",value:function(e){return e.height-this._getTopGridHeight(e)}},{key:"_getLeftGridWidth",value:function(e){var t=e.fixedColumnCount,n=e.columnWidth;if(null==this._leftGridWidth)if("function"===typeof n){for(var r=0,o=0;o=0?e.scrollLeft:t.scrollLeft,scrollTop:null!=e.scrollTop&&e.scrollTop>=0?e.scrollTop:t.scrollTop}:null}}]),t}(a.PureComponent);f(oW,"defaultProps",{classNameBottomLeftGrid:"",classNameBottomRightGrid:"",classNameTopLeftGrid:"",classNameTopRightGrid:"",enableFixedColumnScroll:!1,enableFixedRowScroll:!1,fixedColumnCount:0,fixedRowCount:0,scrollToColumn:-1,scrollToRow:-1,style:{},styleBottomLeftGrid:{},styleBottomRightGrid:{},styleTopLeftGrid:{},styleTopRightGrid:{},hideTopRightGridScrollbar:!1,hideBottomLeftGridScrollbar:!1}),oW.propTypes={},(0,CH.polyfill)(oW);var iW=function(e){function t(e,n){var r;return pi(this,t),(r=yi(this,vi(t).call(this,e,n))).state={clientHeight:0,clientWidth:0,scrollHeight:0,scrollLeft:0,scrollTop:0,scrollWidth:0},r._onScroll=r._onScroll.bind(mi(r)),r}return St(t,e),hi(t,[{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.clientHeight,r=t.clientWidth,o=t.scrollHeight,i=t.scrollLeft,a=t.scrollTop,l=t.scrollWidth;return e({clientHeight:n,clientWidth:r,onScroll:this._onScroll,scrollHeight:o,scrollLeft:i,scrollTop:a,scrollWidth:l})}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.clientWidth,r=e.scrollHeight,o=e.scrollLeft,i=e.scrollTop,a=e.scrollWidth;this.setState({clientHeight:t,clientWidth:n,scrollHeight:r,scrollLeft:o,scrollTop:i,scrollWidth:a})}}]),t}(a.PureComponent);iW.propTypes={};function aW(e){var t=e.className,n=e.columns,r=e.style;return a.createElement("div",{className:t,role:"row",style:r},n)}aW.propTypes=null;var lW={ASC:"ASC",DESC:"DESC"};function uW(e){var t=e.sortDirection,n=OH("ReactVirtualized__Table__sortableHeaderIcon",{"ReactVirtualized__Table__sortableHeaderIcon--ASC":t===lW.ASC,"ReactVirtualized__Table__sortableHeaderIcon--DESC":t===lW.DESC});return a.createElement("svg",{className:n,width:18,height:18,viewBox:"0 0 24 24"},t===lW.ASC?a.createElement("path",{d:"M7 14l5-5 5 5z"}):a.createElement("path",{d:"M7 10l5 5 5-5z"}),a.createElement("path",{d:"M0 0h24v24H0z",fill:"none"}))}function sW(e){var t=e.dataKey,n=e.label,r=e.sortBy,o=e.sortDirection,i=r===t,l=[a.createElement("span",{className:"ReactVirtualized__Table__headerTruncatedText",key:"label",title:"string"===typeof n?n:null},n)];return i&&l.push(a.createElement(uW,{key:"SortIndicator",sortDirection:o})),l}function cW(e){var t=e.className,n=e.columns,r=e.index,o=e.key,i=e.onRowClick,l=e.onRowDoubleClick,u=e.onRowMouseOut,s=e.onRowMouseOver,c=e.onRowRightClick,f=e.rowData,d=e.style,h={"aria-rowindex":r+1};return(i||l||u||s||c)&&(h["aria-label"]="row",h.tabIndex=0,i&&(h.onClick=function(e){return i({event:e,index:r,rowData:f})}),l&&(h.onDoubleClick=function(e){return l({event:e,index:r,rowData:f})}),u&&(h.onMouseOut=function(e){return u({event:e,index:r,rowData:f})}),s&&(h.onMouseOver=function(e){return s({event:e,index:r,rowData:f})}),c&&(h.onContextMenu=function(e){return c({event:e,index:r,rowData:f})})),a.createElement("div",ye({},h,{className:t,key:o,role:"row",style:d}),n)}uW.propTypes={},sW.propTypes=null,cW.propTypes=null;var fW=function(e){function t(){return pi(this,t),yi(this,vi(t).apply(this,arguments))}return St(t,e),t}(a.Component);function dW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function hW(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{},t=e.columnIndex,n=void 0===t?0:t,r=e.rowIndex,o=void 0===r?0:r;this.Grid&&this.Grid.recomputeGridSize({rowIndex:o,columnIndex:n})}},{key:"recomputeRowHeights",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.recomputeGridSize({rowIndex:e})}},{key:"scrollToPosition",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToPosition({scrollTop:e})}},{key:"scrollToRow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.Grid&&this.Grid.scrollToCell({columnIndex:0,rowIndex:e})}},{key:"getScrollbarWidth",value:function(){if(this.Grid){var e=(0,$x.findDOMNode)(this.Grid),t=e.clientWidth||0;return(e.offsetWidth||0)-t}return 0}},{key:"componentDidMount",value:function(){this._setScrollbarWidth()}},{key:"componentDidUpdate",value:function(){this._setScrollbarWidth()}},{key:"render",value:function(){var e=this,t=this.props,n=t.children,r=t.className,o=t.disableHeader,i=t.gridClassName,l=t.gridStyle,u=t.headerHeight,s=t.headerRowRenderer,c=t.height,f=t.id,d=t.noRowsRenderer,h=t.rowClassName,p=t.rowStyle,v=t.scrollToIndex,g=t.style,m=t.width,y=this.state.scrollbarWidth,b=o?c:c-u,x="function"===typeof h?h({index:-1}):h,w="function"===typeof p?p({index:-1}):p;return this._cachedColumnStyles=[],a.Children.toArray(n).forEach((function(t,n){var r=e._getFlexStyleForColumn(t,t.props.style);e._cachedColumnStyles[n]=hW({overflow:"hidden"},r)})),a.createElement("div",{"aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"],"aria-colcount":a.Children.toArray(n).length,"aria-rowcount":this.props.rowCount,className:OH("ReactVirtualized__Table",r),id:f,role:"grid",style:g},!o&&s({className:OH("ReactVirtualized__Table__headerRow",x),columns:this._getHeaderColumns(),style:hW({height:u,overflow:"hidden",paddingRight:y,width:m},w)}),a.createElement(ZH,ye({},this.props,{"aria-readonly":null,autoContainerWidth:!0,className:OH("ReactVirtualized__Table__Grid",i),cellRenderer:this._createRow,columnWidth:m,columnCount:1,height:b,id:void 0,noContentRenderer:d,onScroll:this._onScroll,onSectionRendered:this._onSectionRendered,ref:this._setRef,role:"rowgroup",scrollbarWidth:y,scrollToRow:v,style:hW({},l,{overflowX:"hidden"})})))}},{key:"_createColumn",value:function(e){var t=e.column,n=e.columnIndex,r=e.isScrolling,o=e.parent,i=e.rowData,l=e.rowIndex,u=this.props.onColumnClick,s=t.props,c=s.cellDataGetter,f=s.cellRenderer,d=s.className,h=s.columnData,p=s.dataKey,v=s.id,g=f({cellData:c({columnData:h,dataKey:p,rowData:i}),columnData:h,columnIndex:n,dataKey:p,isScrolling:r,parent:o,rowData:i,rowIndex:l}),m=this._cachedColumnStyles[n],y="string"===typeof g?g:null;return a.createElement("div",{"aria-colindex":n+1,"aria-describedby":v,className:OH("ReactVirtualized__Table__rowColumn",d),key:"Row"+l+"-Col"+n,onClick:function(e){u&&u({columnData:h,dataKey:p,event:e})},role:"gridcell",style:m,title:y},g)}},{key:"_createHeader",value:function(e){var t,n,r,o,i,l=e.column,u=e.index,s=this.props,c=s.headerClassName,f=s.headerStyle,d=s.onHeaderClick,h=s.sort,p=s.sortBy,v=s.sortDirection,g=l.props,m=g.columnData,y=g.dataKey,b=g.defaultSortDirection,x=g.disableSort,w=g.headerRenderer,S=g.id,_=g.label,k=!x&&h,T=OH("ReactVirtualized__Table__headerColumn",c,l.props.headerClassName,{ReactVirtualized__Table__sortableHeaderColumn:k}),C=this._getFlexStyleForColumn(l,hW({},f,{},l.props.headerStyle)),E=w({columnData:m,dataKey:y,disableSort:x,label:_,sortBy:p,sortDirection:v});if(k||d){var O=p!==y?b:v===lW.DESC?lW.ASC:lW.DESC,j=function(e){k&&h({defaultSortDirection:b,event:e,sortBy:y,sortDirection:O}),d&&d({columnData:m,dataKey:y,event:e})};i=l.props["aria-label"]||_||y,o="none",r=0,t=j,n=function(e){"Enter"!==e.key&&" "!==e.key||j(e)}}return p===y&&(o=v===lW.ASC?"ascending":"descending"),a.createElement("div",{"aria-label":i,"aria-sort":o,className:T,id:S,key:"Header-Col"+u,onClick:t,onKeyDown:n,role:"columnheader",style:C,tabIndex:r},E)}},{key:"_createRow",value:function(e){var t=this,n=e.rowIndex,r=e.isScrolling,o=e.key,i=e.parent,l=e.style,u=this.props,s=u.children,c=u.onRowClick,f=u.onRowDoubleClick,d=u.onRowRightClick,h=u.onRowMouseOver,p=u.onRowMouseOut,v=u.rowClassName,g=u.rowGetter,m=u.rowRenderer,y=u.rowStyle,b=this.state.scrollbarWidth,x="function"===typeof v?v({index:n}):v,w="function"===typeof y?y({index:n}):y,S=g({index:n}),_=a.Children.toArray(s).map((function(e,o){return t._createColumn({column:e,columnIndex:o,isScrolling:r,parent:i,rowData:S,rowIndex:n,scrollbarWidth:b})})),k=OH("ReactVirtualized__Table__row",x),T=hW({},l,{height:this._getRowHeight(n),overflow:"hidden",paddingRight:b},w);return m({className:k,columns:_,index:n,isScrolling:r,key:o,onRowClick:c,onRowDoubleClick:f,onRowRightClick:d,onRowMouseOver:h,onRowMouseOut:p,rowData:S,style:T})}},{key:"_getFlexStyleForColumn",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="".concat(e.props.flexGrow," ").concat(e.props.flexShrink," ").concat(e.props.width,"px"),r=hW({},t,{flex:n,msFlex:n,WebkitFlex:n});return e.props.maxWidth&&(r.maxWidth=e.props.maxWidth),e.props.minWidth&&(r.minWidth=e.props.minWidth),r}},{key:"_getHeaderColumns",value:function(){var e=this,t=this.props,n=t.children;return(t.disableHeader?[]:a.Children.toArray(n)).map((function(t,n){return e._createHeader({column:t,index:n})}))}},{key:"_getRowHeight",value:function(e){var t=this.props.rowHeight;return"function"===typeof t?t({index:e}):t}},{key:"_onScroll",value:function(e){var t=e.clientHeight,n=e.scrollHeight,r=e.scrollTop;(0,this.props.onScroll)({clientHeight:t,scrollHeight:n,scrollTop:r})}},{key:"_onSectionRendered",value:function(e){var t=e.rowOverscanStartIndex,n=e.rowOverscanStopIndex,r=e.rowStartIndex,o=e.rowStopIndex;(0,this.props.onRowsRendered)({overscanStartIndex:t,overscanStopIndex:n,startIndex:r,stopIndex:o})}},{key:"_setRef",value:function(e){this.Grid=e}},{key:"_setScrollbarWidth",value:function(){var e=this.getScrollbarWidth();this.setState({scrollbarWidth:e})}}]),t}(a.PureComponent);f(pW,"defaultProps",{disableHeader:!1,estimatedRowSize:30,headerHeight:0,headerStyle:{},noRowsRenderer:function(){return null},onRowsRendered:function(){return null},onScroll:function(){return null},overscanIndicesGetter:tU,overscanRowCount:10,rowRenderer:cW,headerRowRenderer:aW,rowStyle:{},scrollToAlignment:"auto",scrollToIndex:-1,style:{}}),pW.propTypes={};var vW=[],gW=null,mW=null;function yW(){mW&&(mW=null,document.body&&null!=gW&&(document.body.style.pointerEvents=gW),gW=null)}function bW(){yW(),vW.forEach((function(e){return e.__resetIsScrolling()}))}function xW(e){e.currentTarget===window&&null==gW&&document.body&&(gW=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),function(){mW&&qH(mW);var e=0;vW.forEach((function(t){e=Math.max(e,t.props.scrollingResetTimeInterval)})),mW=QH(bW,e)}(),vW.forEach((function(t){t.props.scrollElement===e.currentTarget&&t.__handleWindowScrollEvent()}))}function wW(e,t){vW.some((function(e){return e.props.scrollElement===t}))||t.addEventListener("scroll",xW),vW.push(e)}function SW(e,t){(vW=vW.filter((function(t){return t!==e}))).length||(t.removeEventListener("scroll",xW),mW&&(qH(mW),yW()))}var _W,kW,TW=function(e){return e===window},CW=function(e){return e.getBoundingClientRect()};function EW(e,t){if(e){if(TW(e)){var n=window,r=n.innerHeight,o=n.innerWidth;return{height:"number"===typeof r?r:0,width:"number"===typeof o?o:0}}return CW(e)}return{height:t.serverHeight,width:t.serverWidth}}function OW(e){return TW(e)&&document.documentElement?{top:"scrollY"in window?window.scrollY:document.documentElement.scrollTop,left:"scrollX"in window?window.scrollX:document.documentElement.scrollLeft}:{top:e.scrollTop,left:e.scrollLeft}}function jW(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var PW=function(){return"undefined"!==typeof window?window:void 0},AW=(kW=_W=function(e){function t(){var e,n;pi(this,t);for(var r=arguments.length,o=new Array(r),i=0;i0&&void 0!==arguments[0]?arguments[0]:this.props.scrollElement,t=this.props.onResize,n=this.state,r=n.height,o=n.width,i=this._child||$x.findDOMNode(this);if(i instanceof Element&&e){var a=function(e,t){if(TW(t)&&document.documentElement){var n=document.documentElement,r=CW(e),o=CW(n);return{top:r.top-o.top,left:r.left-o.left}}var i=OW(t),a=CW(e),l=CW(t);return{top:a.top+i.top-l.top,left:a.left+i.left-l.left}}(i,e);this._positionFromTop=a.top,this._positionFromLeft=a.left}var l=EW(e,this.props);r===l.height&&o===l.width||(this.setState({height:l.height,width:l.width}),t({height:l.height,width:l.width}))}},{key:"componentDidMount",value:function(){var e=this.props.scrollElement;this._detectElementResize=uU(),this.updatePosition(e),e&&(wW(this,e),this._registerResizeListener(e)),this._isMounted=!0}},{key:"componentDidUpdate",value:function(e,t){var n=this.props.scrollElement,r=e.scrollElement;r!==n&&null!=r&&null!=n&&(this.updatePosition(n),SW(this,r),wW(this,n),this._unregisterResizeListener(r),this._registerResizeListener(n))}},{key:"componentWillUnmount",value:function(){var e=this.props.scrollElement;e&&(SW(this,e),this._unregisterResizeListener(e)),this._isMounted=!1}},{key:"render",value:function(){var e=this.props.children,t=this.state,n=t.isScrolling,r=t.scrollTop,o=t.scrollLeft,i=t.height,a=t.width;return e({onChildScroll:this._onChildScroll,registerChild:this._registerChild,height:i,isScrolling:n,scrollLeft:o,scrollTop:r,width:a})}}]),t}(a.PureComponent),f(_W,"propTypes",null),kW);f(AW,"defaultProps",{onResize:function(){},onScroll:function(){},scrollingResetTimeInterval:150,scrollElement:PW(),serverHeight:0,serverWidth:0});var RW=["defaultInputValue","defaultMenuIsOpen","defaultValue","inputValue","menuIsOpen","onChange","onInputChange","onMenuClose","onMenuOpen","value"];Math.min,Math.max;var IW=["top","right","bottom","left"];IW.reduce((function(e,t){return e.concat(t,t+"-start",t+"-end")}),[]);function MW(e){var t;return(null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function DW(e){return MW(e).getComputedStyle(e)}Math.min,Math.max;var NW,LW=Math.round;function FW(e){var t=DW(e),n=parseFloat(t.width),r=parseFloat(t.height),o=e.offsetWidth,i=e.offsetHeight,a=LW(n)!==o||LW(r)!==i;return a&&(n=o,r=i),{width:n,height:r,fallback:a}}function zW(e){return UW(e)?(e.nodeName||"").toLowerCase():""}function BW(){if(NW)return NW;var e=navigator.userAgentData;return e&&Array.isArray(e.brands)?NW=e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function VW(e){return e instanceof MW(e).HTMLElement}function HW(e){return e instanceof MW(e).Element}function UW(e){return e instanceof MW(e).Node}function WW(e){return"undefined"!=typeof ShadowRoot&&(e instanceof MW(e).ShadowRoot||e instanceof ShadowRoot)}function GW(e){var t=DW(e),n=t.overflow,r=t.overflowX,o=t.overflowY,i=t.display;return/auto|scroll|overlay|hidden|clip/.test(n+o+r)&&!["inline","contents"].includes(i)}function qW(){return/^((?!chrome|android).)*safari/i.test(BW())}function QW(e){return["html","body","#document"].includes(zW(e))}function $W(e){return HW(e)?e:e.contextElement}var YW={x:1,y:1};function KW(e){var t=$W(e);if(!VW(t))return YW;var n=t.getBoundingClientRect(),r=FW(t),o=r.width,i=r.height,a=r.fallback,l=(a?LW(n.width):n.width)/o,u=(a?LW(n.height):n.height)/i;return l&&Number.isFinite(l)||(l=1),u&&Number.isFinite(u)||(u=1),{x:l,y:u}}function XW(e,t,n,r){var o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);var a=e.getBoundingClientRect(),l=$W(e),u=YW;t&&(r?HW(r)&&(u=KW(r)):u=KW(e));var s=l?MW(l):window,c=qW()&&n,f=(a.left+(c&&(null==(o=s.visualViewport)?void 0:o.offsetLeft)||0))/u.x,d=(a.top+(c&&(null==(i=s.visualViewport)?void 0:i.offsetTop)||0))/u.y,h=a.width/u.x,p=a.height/u.y;if(l)for(var v=MW(l),g=r&&HW(r)?MW(r):r,m=v.frameElement;m&&r&&g!==v;){var y=KW(m),b=m.getBoundingClientRect(),x=getComputedStyle(m);b.x+=(m.clientLeft+parseFloat(x.paddingLeft))*y.x,b.y+=(m.clientTop+parseFloat(x.paddingTop))*y.y,f*=y.x,d*=y.y,h*=y.x,p*=y.y,f+=b.x,d+=b.y,m=MW(m).frameElement}return{width:h,height:p,top:d,right:f+h,bottom:d+p,left:f,x:f,y:d}}function JW(e){return((UW(e)?e.ownerDocument:e.document)||window.document).documentElement}function ZW(e){if("html"===zW(e))return e;var t=e.assignedSlot||e.parentNode||WW(e)&&e.host||JW(e);return WW(t)?t.host:t}function eG(e){var t=ZW(e);return QW(t)?t.ownerDocument.body:VW(t)&&GW(t)?t:eG(t)}function tG(e,t){var n;void 0===t&&(t=[]);var r=eG(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=MW(r);return o?t.concat(i,i.visualViewport||[],GW(r)?r:[]):t.concat(r,tG(r))}var nG=a.useLayoutEffect,rG=["className","clearValue","cx","getStyles","getClassNames","getValue","hasValue","isMulti","isRtl","options","selectOption","selectProps","setValue","theme"],oG=function(){};function iG(e,t){return t?"-"===t[0]?e+t:e+"__"+t:e}function aG(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o-1}function fG(e){return cG(e)?window.pageYOffset:e.scrollTop}function dG(e,t){cG(e)?window.scrollTo(0,t):e.scrollTop=t}function hG(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:200,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:oG,o=fG(e),i=t-o,a=10,l=0;!function t(){var u=function(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}(l+=a,o,i,n);dG(e,u),ln.bottom?dG(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o1?t-1:0),r=1;r=p)return{placement:"bottom",maxHeight:t};if(k>=p&&!a)return i&&hG(u,T,E),{placement:"bottom",maxHeight:t};if(!a&&k>=r||a&&S>=r)return i&&hG(u,T,E),{placement:"bottom",maxHeight:a?S-b:k-b};if("auto"===o||a){var O=t,j=a?w:_;return j>=r&&(O=Math.min(j-b-l,t)),{placement:"top",maxHeight:O}}if("bottom"===o)return i&&dG(u,T),{placement:"bottom",maxHeight:t};break;case"top":if(w>=p)return{placement:"top",maxHeight:t};if(_>=p&&!a)return i&&hG(u,C,E),{placement:"top",maxHeight:t};if(!a&&_>=r||a&&w>=r){var P=t;return(!a&&_>=r||a&&w>=r)&&(P=a?w-x:_-x),i&&hG(u,C,E),{placement:"top",maxHeight:P}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return s}var kG=function(e){return"auto"===e?"bottom":e},TG=(0,a.createContext)(null),CG=function(e){var t=e.children,n=e.minMenuHeight,r=e.maxMenuHeight,o=e.menuPlacement,i=e.menuPosition,l=e.menuShouldScrollIntoView,u=e.theme,s=((0,a.useContext)(TG)||{}).setPortalPlacement,c=(0,a.useRef)(null),f=ut((0,a.useState)(r),2),d=f[0],p=f[1],v=ut((0,a.useState)(null),2),g=v[0],m=v[1],y=u.spacing.controlHeight;return nG((function(){var e=c.current;if(e){var t="fixed"===i,a=_G({maxHeight:r,menuEl:e,minHeight:n,placement:o,shouldScroll:l&&!t,isFixedPosition:t,controlHeight:y});p(a.maxHeight),m(a.placement),null===s||void 0===s||s(a.placement)}}),[r,o,i,l,n,s,y]),t({ref:c,placerProps:h(h({},e),{},{placement:g||kG(o),maxHeight:d})})},EG=function(e,t){var n=e.theme,r=n.spacing.baseUnit,o=n.colors;return h({textAlign:"center"},t?{}:{color:o.neutral40,padding:"".concat(2*r,"px ").concat(3*r,"px")})},OG=EG,jG=EG,PG=function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({},sG(e,"noOptionsMessage",{"menu-notice":!0,"menu-notice--no-options":!0}),n),t)};PG.defaultProps={children:"No options"};var AG=function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({},sG(e,"loadingMessage",{"menu-notice":!0,"menu-notice--loading":!0}),n),t)};AG.defaultProps={children:"Loading..."};var RG,IG=["size"];var MG={name:"8mmkcg",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0"},DG=function(e){var t=e.size,n=p(e,IG);return Xe("svg",ye({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:MG},n))},NG=function(e){return Xe(DG,ye({size:20},e),Xe("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"}))},LG=function(e){return Xe(DG,ye({size:20},e),Xe("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"}))},FG=function(e,t){var n=e.isFocused,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return h({label:"indicatorContainer",display:"flex",transition:"color 150ms"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*o,":hover":{color:n?i.neutral80:i.neutral40}})},zG=FG,BG=FG,VG=et(RG||(RG=YC(["\n 0%, 80%, 100% { opacity: 0; }\n 40% { opacity: 1; }\n"]))),HG=function(e){var t=e.delay,n=e.offset;return Xe("span",{css:Ze({animation:"".concat(VG," 1s ease-in-out ").concat(t,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:n?"1em":void 0,height:"1em",verticalAlign:"top",width:"1em"},"","")})},UG=function(e){var t=e.innerProps,n=e.isRtl;return Xe("div",ye({},sG(e,"loadingIndicator",{indicator:!0,"loading-indicator":!0}),t),Xe(HG,{delay:0,offset:n}),Xe(HG,{delay:160,offset:!0}),Xe(HG,{delay:320,offset:!n}))};UG.defaultProps={size:4};var WG=["data"],GG=["innerRef","isDisabled","isHidden","inputClassName"],qG={gridArea:"1 / 2",font:"inherit",minWidth:"2px",border:0,margin:0,outline:0,padding:0},QG={flex:"1 1 auto",display:"inline-grid",gridArea:"1 / 1 / 2 / 3",gridTemplateColumns:"0 min-content","&:after":h({content:'attr(data-value) " "',visibility:"hidden",whiteSpace:"pre"},qG)},$G=function(e){return h({label:"input",color:"inherit",background:0,opacity:e?0:1,width:"100%"},qG)},YG=function(e){var t=e.children,n=e.innerProps;return Xe("div",n,t)};var KG={ClearIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({},sG(e,"clearIndicator",{indicator:!0,"clear-indicator":!0}),n),t||Xe(NG,null))},Control:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.innerRef,i=e.innerProps,a=e.menuIsOpen;return Xe("div",ye({ref:o},sG(e,"control",{control:!0,"control--is-disabled":n,"control--is-focused":r,"control--menu-is-open":a}),i),t)},DropdownIndicator:function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({},sG(e,"dropdownIndicator",{indicator:!0,"dropdown-indicator":!0}),n),t||Xe(LG,null))},DownChevron:LG,CrossIcon:NG,Group:function(e){var t=e.children,n=e.cx,r=e.getStyles,o=e.getClassNames,i=e.Heading,a=e.headingProps,l=e.innerProps,u=e.label,s=e.theme,c=e.selectProps;return Xe("div",ye({},sG(e,"group",{group:!0}),l),Xe(i,ye({},a,{selectProps:c,theme:s,getStyles:r,getClassNames:o,cx:n}),u),Xe("div",null,t))},GroupHeading:function(e){var t=uG(e);t.data;var n=p(t,WG);return Xe("div",ye({},sG(e,"groupHeading",{"group-heading":!0}),n))},IndicatorsContainer:function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({},sG(e,"indicatorsContainer",{indicators:!0}),n),t)},IndicatorSeparator:function(e){var t=e.innerProps;return Xe("span",ye({},t,sG(e,"indicatorSeparator",{"indicator-separator":!0})))},Input:function(e){var t=e.cx,n=e.value,r=uG(e),o=r.innerRef,i=r.isDisabled,a=r.isHidden,l=r.inputClassName,u=p(r,GG);return Xe("div",ye({},sG(e,"input",{"input-container":!0}),{"data-value":n||""}),Xe("input",ye({className:t({input:!0},l),ref:o,style:$G(a),disabled:i},u)))},LoadingIndicator:UG,Menu:function(e){var t=e.children,n=e.innerRef,r=e.innerProps;return Xe("div",ye({},sG(e,"menu",{menu:!0}),{ref:n},r),t)},MenuList:function(e){var t=e.children,n=e.innerProps,r=e.innerRef,o=e.isMulti;return Xe("div",ye({},sG(e,"menuList",{"menu-list":!0,"menu-list--is-multi":o}),{ref:r},n),t)},MenuPortal:function(e){var t=e.appendTo,n=e.children,r=e.controlElement,o=e.innerProps,i=e.menuPlacement,l=e.menuPosition,u=(0,a.useRef)(null),s=(0,a.useRef)(null),c=ut((0,a.useState)(kG(i)),2),f=c[0],d=c[1],p=(0,a.useMemo)((function(){return{setPortalPlacement:d}}),[]),v=ut((0,a.useState)(null),2),g=v[0],m=v[1],y=(0,a.useCallback)((function(){if(r){var e=function(e){var t=e.getBoundingClientRect();return{bottom:t.bottom,height:t.height,left:t.left,right:t.right,top:t.top,width:t.width}}(r),t="fixed"===l?0:window.pageYOffset,n=e[f]+t;n===(null===g||void 0===g?void 0:g.offset)&&e.left===(null===g||void 0===g?void 0:g.rect.left)&&e.width===(null===g||void 0===g?void 0:g.rect.width)||m({offset:n,rect:e})}}),[r,l,f,null===g||void 0===g?void 0:g.offset,null===g||void 0===g?void 0:g.rect.left,null===g||void 0===g?void 0:g.rect.width]);nG((function(){y()}),[y]);var b=(0,a.useCallback)((function(){"function"===typeof s.current&&(s.current(),s.current=null),r&&u.current&&(s.current=function(e,t,n,r){void 0===r&&(r={});var o=r,i=o.ancestorScroll,a=void 0===i||i,l=o.ancestorResize,u=void 0===l||l,s=o.elementResize,c=void 0===s||s,f=o.animationFrame,d=void 0!==f&&f,h=a&&!d,p=h||u?[].concat(bt(HW(e)?tG(e):e.contextElement?tG(e.contextElement):[]),bt(tG(t))):[];p.forEach((function(e){h&&e.addEventListener("scroll",n,{passive:!0}),u&&e.addEventListener("resize",n)}));var v,g=null;if(c){var m=!0;g=new ResizeObserver((function(){m||n(),m=!1})),HW(e)&&!d&&g.observe(e),HW(e)||!e.contextElement||d||g.observe(e.contextElement),g.observe(t)}var y=d?XW(e):null;return d&&function t(){var r=XW(e);!y||r.x===y.x&&r.y===y.y&&r.width===y.width&&r.height===y.height||n(),y=r,v=requestAnimationFrame(t)}(),n(),function(){var e;p.forEach((function(e){h&&e.removeEventListener("scroll",n),u&&e.removeEventListener("resize",n)})),null==(e=g)||e.disconnect(),g=null,d&&cancelAnimationFrame(v)}}(r,u.current,y,{elementResize:"ResizeObserver"in window}))}),[r,y]);nG((function(){b()}),[b]);var x=(0,a.useCallback)((function(e){u.current=e,b()}),[b]);if(!t&&"fixed"!==l||!g)return null;var w=Xe("div",ye({ref:x},sG(h(h({},e),{},{offset:g.offset,position:l,rect:g.rect}),"menuPortal",{"menu-portal":!0}),o),n);return Xe(TG.Provider,{value:p},t?(0,$x.createPortal)(w,t):w)},LoadingMessage:AG,NoOptionsMessage:PG,MultiValue:function(e){var t=e.children,n=e.components,r=e.data,o=e.innerProps,i=e.isDisabled,a=e.removeProps,l=e.selectProps,u=n.Container,s=n.Label,c=n.Remove;return Xe(u,{data:r,innerProps:h(h({},sG(e,"multiValue",{"multi-value":!0,"multi-value--is-disabled":i})),o),selectProps:l},Xe(s,{data:r,innerProps:h({},sG(e,"multiValueLabel",{"multi-value__label":!0})),selectProps:l},t),Xe(c,{data:r,innerProps:h(h({},sG(e,"multiValueRemove",{"multi-value__remove":!0})),{},{"aria-label":"Remove ".concat(t||"option")},a),selectProps:l}))},MultiValueContainer:YG,MultiValueLabel:YG,MultiValueRemove:function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({role:"button"},n),t||Xe(NG,{size:14}))},Option:function(e){var t=e.children,n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.innerRef,a=e.innerProps;return Xe("div",ye({},sG(e,"option",{option:!0,"option--is-disabled":n,"option--is-focused":r,"option--is-selected":o}),{ref:i,"aria-disabled":n},a),t)},Placeholder:function(e){var t=e.children,n=e.innerProps;return Xe("div",ye({},sG(e,"placeholder",{placeholder:!0}),n),t)},SelectContainer:function(e){var t=e.children,n=e.innerProps,r=e.isDisabled,o=e.isRtl;return Xe("div",ye({},sG(e,"container",{"--is-disabled":r,"--is-rtl":o}),n),t)},SingleValue:function(e){var t=e.children,n=e.isDisabled,r=e.innerProps;return Xe("div",ye({},sG(e,"singleValue",{"single-value":!0,"single-value--is-disabled":n}),r),t)},ValueContainer:function(e){var t=e.children,n=e.innerProps,r=e.isMulti,o=e.hasValue;return Xe("div",ye({},sG(e,"valueContainer",{"value-container":!0,"value-container--is-multi":r,"value-container--has-value":o}),n),t)}},XG=function(e){return h(h({},KG),e.components)},JG=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function ZG(e,t){return e===t||!(!JG(e)||!JG(t))}function eq(e,t){if(e.length!==t.length)return!1;for(var n=0;n1?"s":""," ").concat(o.join(","),", selected.");case"select-option":return"option ".concat(r,i?" is disabled. Select another option.":", selected.");default:return""}},onFocus:function(e){var t=e.context,n=e.focused,r=e.options,o=e.label,i=void 0===o?"":o,a=e.selectValue,l=e.isDisabled,u=e.isSelected,s=function(e,t){return e&&e.length?"".concat(e.indexOf(t)+1," of ").concat(e.length):""};if("value"===t&&a)return"value ".concat(i," focused, ").concat(s(a,n),".");if("menu"===t){var c=l?" disabled":"",f="".concat(u?"selected":"focused").concat(c);return"option ".concat(i," ").concat(f,", ").concat(s(r,n),".")}return""},onFilter:function(e){var t=e.inputValue,n=e.resultsMessage;return"".concat(n).concat(t?" for search term "+t:"",".")}},oq=function(e){var t=e.ariaSelection,n=e.focusedOption,r=e.focusedValue,o=e.focusableOptions,i=e.isFocused,l=e.selectValue,u=e.selectProps,s=e.id,c=u.ariaLiveMessages,f=u.getOptionLabel,d=u.inputValue,p=u.isMulti,v=u.isOptionDisabled,g=u.isSearchable,m=u.menuIsOpen,y=u.options,b=u.screenReaderStatus,x=u.tabSelectsValue,w=u["aria-label"],S=u["aria-live"],_=(0,a.useMemo)((function(){return h(h({},rq),c||{})}),[c]),k=(0,a.useMemo)((function(){var e,n="";if(t&&_.onChange){var r=t.option,o=t.options,i=t.removedValue,a=t.removedValues,u=t.value,s=i||r||(e=u,Array.isArray(e)?null:e),c=s?f(s):"",d=o||a||void 0,p=d?d.map(f):[],g=h({isDisabled:s&&v(s,l),label:c,labels:p},t);n=_.onChange(g)}return n}),[t,_,v,l,f]),T=(0,a.useMemo)((function(){var e="",t=n||r,i=!!(n&&l&&l.includes(n));if(t&&_.onFocus){var a={focused:t,label:f(t),isDisabled:v(t,l),isSelected:i,options:o,context:t===n?"menu":"value",selectValue:l};e=_.onFocus(a)}return e}),[n,r,f,v,_,o,l]),C=(0,a.useMemo)((function(){var e="";if(m&&y.length&&_.onFilter){var t=b({count:o.length});e=_.onFilter({inputValue:d,resultsMessage:t})}return e}),[o,d,m,_,y,b]),E=(0,a.useMemo)((function(){var e="";if(_.guidance){var t=r?"value":m?"menu":"input";e=_.guidance({"aria-label":w,context:t,isDisabled:n&&v(n,l),isMulti:p,isSearchable:g,tabSelectsValue:x})}return e}),[w,n,r,p,v,g,m,_,l,x]),O="".concat(T," ").concat(C," ").concat(E),j=Xe(a.Fragment,null,Xe("span",{id:"aria-selection"},k),Xe("span",{id:"aria-context"},O)),P="initial-input-focus"===(null===t||void 0===t?void 0:t.action);return Xe(a.Fragment,null,Xe(nq,{id:s},P&&j),Xe(nq,{"aria-live":S,"aria-atomic":"false","aria-relevant":"additions text"},i&&!P&&j))},iq=[{base:"A",letters:"A\u24b6\uff21\xc0\xc1\xc2\u1ea6\u1ea4\u1eaa\u1ea8\xc3\u0100\u0102\u1eb0\u1eae\u1eb4\u1eb2\u0226\u01e0\xc4\u01de\u1ea2\xc5\u01fa\u01cd\u0200\u0202\u1ea0\u1eac\u1eb6\u1e00\u0104\u023a\u2c6f"},{base:"AA",letters:"\ua732"},{base:"AE",letters:"\xc6\u01fc\u01e2"},{base:"AO",letters:"\ua734"},{base:"AU",letters:"\ua736"},{base:"AV",letters:"\ua738\ua73a"},{base:"AY",letters:"\ua73c"},{base:"B",letters:"B\u24b7\uff22\u1e02\u1e04\u1e06\u0243\u0182\u0181"},{base:"C",letters:"C\u24b8\uff23\u0106\u0108\u010a\u010c\xc7\u1e08\u0187\u023b\ua73e"},{base:"D",letters:"D\u24b9\uff24\u1e0a\u010e\u1e0c\u1e10\u1e12\u1e0e\u0110\u018b\u018a\u0189\ua779"},{base:"DZ",letters:"\u01f1\u01c4"},{base:"Dz",letters:"\u01f2\u01c5"},{base:"E",letters:"E\u24ba\uff25\xc8\xc9\xca\u1ec0\u1ebe\u1ec4\u1ec2\u1ebc\u0112\u1e14\u1e16\u0114\u0116\xcb\u1eba\u011a\u0204\u0206\u1eb8\u1ec6\u0228\u1e1c\u0118\u1e18\u1e1a\u0190\u018e"},{base:"F",letters:"F\u24bb\uff26\u1e1e\u0191\ua77b"},{base:"G",letters:"G\u24bc\uff27\u01f4\u011c\u1e20\u011e\u0120\u01e6\u0122\u01e4\u0193\ua7a0\ua77d\ua77e"},{base:"H",letters:"H\u24bd\uff28\u0124\u1e22\u1e26\u021e\u1e24\u1e28\u1e2a\u0126\u2c67\u2c75\ua78d"},{base:"I",letters:"I\u24be\uff29\xcc\xcd\xce\u0128\u012a\u012c\u0130\xcf\u1e2e\u1ec8\u01cf\u0208\u020a\u1eca\u012e\u1e2c\u0197"},{base:"J",letters:"J\u24bf\uff2a\u0134\u0248"},{base:"K",letters:"K\u24c0\uff2b\u1e30\u01e8\u1e32\u0136\u1e34\u0198\u2c69\ua740\ua742\ua744\ua7a2"},{base:"L",letters:"L\u24c1\uff2c\u013f\u0139\u013d\u1e36\u1e38\u013b\u1e3c\u1e3a\u0141\u023d\u2c62\u2c60\ua748\ua746\ua780"},{base:"LJ",letters:"\u01c7"},{base:"Lj",letters:"\u01c8"},{base:"M",letters:"M\u24c2\uff2d\u1e3e\u1e40\u1e42\u2c6e\u019c"},{base:"N",letters:"N\u24c3\uff2e\u01f8\u0143\xd1\u1e44\u0147\u1e46\u0145\u1e4a\u1e48\u0220\u019d\ua790\ua7a4"},{base:"NJ",letters:"\u01ca"},{base:"Nj",letters:"\u01cb"},{base:"O",letters:"O\u24c4\uff2f\xd2\xd3\xd4\u1ed2\u1ed0\u1ed6\u1ed4\xd5\u1e4c\u022c\u1e4e\u014c\u1e50\u1e52\u014e\u022e\u0230\xd6\u022a\u1ece\u0150\u01d1\u020c\u020e\u01a0\u1edc\u1eda\u1ee0\u1ede\u1ee2\u1ecc\u1ed8\u01ea\u01ec\xd8\u01fe\u0186\u019f\ua74a\ua74c"},{base:"OI",letters:"\u01a2"},{base:"OO",letters:"\ua74e"},{base:"OU",letters:"\u0222"},{base:"P",letters:"P\u24c5\uff30\u1e54\u1e56\u01a4\u2c63\ua750\ua752\ua754"},{base:"Q",letters:"Q\u24c6\uff31\ua756\ua758\u024a"},{base:"R",letters:"R\u24c7\uff32\u0154\u1e58\u0158\u0210\u0212\u1e5a\u1e5c\u0156\u1e5e\u024c\u2c64\ua75a\ua7a6\ua782"},{base:"S",letters:"S\u24c8\uff33\u1e9e\u015a\u1e64\u015c\u1e60\u0160\u1e66\u1e62\u1e68\u0218\u015e\u2c7e\ua7a8\ua784"},{base:"T",letters:"T\u24c9\uff34\u1e6a\u0164\u1e6c\u021a\u0162\u1e70\u1e6e\u0166\u01ac\u01ae\u023e\ua786"},{base:"TZ",letters:"\ua728"},{base:"U",letters:"U\u24ca\uff35\xd9\xda\xdb\u0168\u1e78\u016a\u1e7a\u016c\xdc\u01db\u01d7\u01d5\u01d9\u1ee6\u016e\u0170\u01d3\u0214\u0216\u01af\u1eea\u1ee8\u1eee\u1eec\u1ef0\u1ee4\u1e72\u0172\u1e76\u1e74\u0244"},{base:"V",letters:"V\u24cb\uff36\u1e7c\u1e7e\u01b2\ua75e\u0245"},{base:"VY",letters:"\ua760"},{base:"W",letters:"W\u24cc\uff37\u1e80\u1e82\u0174\u1e86\u1e84\u1e88\u2c72"},{base:"X",letters:"X\u24cd\uff38\u1e8a\u1e8c"},{base:"Y",letters:"Y\u24ce\uff39\u1ef2\xdd\u0176\u1ef8\u0232\u1e8e\u0178\u1ef6\u1ef4\u01b3\u024e\u1efe"},{base:"Z",letters:"Z\u24cf\uff3a\u0179\u1e90\u017b\u017d\u1e92\u1e94\u01b5\u0224\u2c7f\u2c6b\ua762"},{base:"a",letters:"a\u24d0\uff41\u1e9a\xe0\xe1\xe2\u1ea7\u1ea5\u1eab\u1ea9\xe3\u0101\u0103\u1eb1\u1eaf\u1eb5\u1eb3\u0227\u01e1\xe4\u01df\u1ea3\xe5\u01fb\u01ce\u0201\u0203\u1ea1\u1ead\u1eb7\u1e01\u0105\u2c65\u0250"},{base:"aa",letters:"\ua733"},{base:"ae",letters:"\xe6\u01fd\u01e3"},{base:"ao",letters:"\ua735"},{base:"au",letters:"\ua737"},{base:"av",letters:"\ua739\ua73b"},{base:"ay",letters:"\ua73d"},{base:"b",letters:"b\u24d1\uff42\u1e03\u1e05\u1e07\u0180\u0183\u0253"},{base:"c",letters:"c\u24d2\uff43\u0107\u0109\u010b\u010d\xe7\u1e09\u0188\u023c\ua73f\u2184"},{base:"d",letters:"d\u24d3\uff44\u1e0b\u010f\u1e0d\u1e11\u1e13\u1e0f\u0111\u018c\u0256\u0257\ua77a"},{base:"dz",letters:"\u01f3\u01c6"},{base:"e",letters:"e\u24d4\uff45\xe8\xe9\xea\u1ec1\u1ebf\u1ec5\u1ec3\u1ebd\u0113\u1e15\u1e17\u0115\u0117\xeb\u1ebb\u011b\u0205\u0207\u1eb9\u1ec7\u0229\u1e1d\u0119\u1e19\u1e1b\u0247\u025b\u01dd"},{base:"f",letters:"f\u24d5\uff46\u1e1f\u0192\ua77c"},{base:"g",letters:"g\u24d6\uff47\u01f5\u011d\u1e21\u011f\u0121\u01e7\u0123\u01e5\u0260\ua7a1\u1d79\ua77f"},{base:"h",letters:"h\u24d7\uff48\u0125\u1e23\u1e27\u021f\u1e25\u1e29\u1e2b\u1e96\u0127\u2c68\u2c76\u0265"},{base:"hv",letters:"\u0195"},{base:"i",letters:"i\u24d8\uff49\xec\xed\xee\u0129\u012b\u012d\xef\u1e2f\u1ec9\u01d0\u0209\u020b\u1ecb\u012f\u1e2d\u0268\u0131"},{base:"j",letters:"j\u24d9\uff4a\u0135\u01f0\u0249"},{base:"k",letters:"k\u24da\uff4b\u1e31\u01e9\u1e33\u0137\u1e35\u0199\u2c6a\ua741\ua743\ua745\ua7a3"},{base:"l",letters:"l\u24db\uff4c\u0140\u013a\u013e\u1e37\u1e39\u013c\u1e3d\u1e3b\u017f\u0142\u019a\u026b\u2c61\ua749\ua781\ua747"},{base:"lj",letters:"\u01c9"},{base:"m",letters:"m\u24dc\uff4d\u1e3f\u1e41\u1e43\u0271\u026f"},{base:"n",letters:"n\u24dd\uff4e\u01f9\u0144\xf1\u1e45\u0148\u1e47\u0146\u1e4b\u1e49\u019e\u0272\u0149\ua791\ua7a5"},{base:"nj",letters:"\u01cc"},{base:"o",letters:"o\u24de\uff4f\xf2\xf3\xf4\u1ed3\u1ed1\u1ed7\u1ed5\xf5\u1e4d\u022d\u1e4f\u014d\u1e51\u1e53\u014f\u022f\u0231\xf6\u022b\u1ecf\u0151\u01d2\u020d\u020f\u01a1\u1edd\u1edb\u1ee1\u1edf\u1ee3\u1ecd\u1ed9\u01eb\u01ed\xf8\u01ff\u0254\ua74b\ua74d\u0275"},{base:"oi",letters:"\u01a3"},{base:"ou",letters:"\u0223"},{base:"oo",letters:"\ua74f"},{base:"p",letters:"p\u24df\uff50\u1e55\u1e57\u01a5\u1d7d\ua751\ua753\ua755"},{base:"q",letters:"q\u24e0\uff51\u024b\ua757\ua759"},{base:"r",letters:"r\u24e1\uff52\u0155\u1e59\u0159\u0211\u0213\u1e5b\u1e5d\u0157\u1e5f\u024d\u027d\ua75b\ua7a7\ua783"},{base:"s",letters:"s\u24e2\uff53\xdf\u015b\u1e65\u015d\u1e61\u0161\u1e67\u1e63\u1e69\u0219\u015f\u023f\ua7a9\ua785\u1e9b"},{base:"t",letters:"t\u24e3\uff54\u1e6b\u1e97\u0165\u1e6d\u021b\u0163\u1e71\u1e6f\u0167\u01ad\u0288\u2c66\ua787"},{base:"tz",letters:"\ua729"},{base:"u",letters:"u\u24e4\uff55\xf9\xfa\xfb\u0169\u1e79\u016b\u1e7b\u016d\xfc\u01dc\u01d8\u01d6\u01da\u1ee7\u016f\u0171\u01d4\u0215\u0217\u01b0\u1eeb\u1ee9\u1eef\u1eed\u1ef1\u1ee5\u1e73\u0173\u1e77\u1e75\u0289"},{base:"v",letters:"v\u24e5\uff56\u1e7d\u1e7f\u028b\ua75f\u028c"},{base:"vy",letters:"\ua761"},{base:"w",letters:"w\u24e6\uff57\u1e81\u1e83\u0175\u1e87\u1e85\u1e98\u1e89\u2c73"},{base:"x",letters:"x\u24e7\uff58\u1e8b\u1e8d"},{base:"y",letters:"y\u24e8\uff59\u1ef3\xfd\u0177\u1ef9\u0233\u1e8f\xff\u1ef7\u1e99\u1ef5\u01b4\u024f\u1eff"},{base:"z",letters:"z\u24e9\uff5a\u017a\u1e91\u017c\u017e\u1e93\u1e95\u01b6\u0225\u0240\u2c6c\ua763"}],aq=new RegExp("["+iq.map((function(e){return e.letters})).join("")+"]","g"),lq={},uq=0;uq-1}},gq=["innerRef"];function mq(e){var t=e.innerRef,n=p(e,gq),r=SG(n,"onExited","in","enter","exit","appear");return Xe("input",ye({ref:t},r,{css:Ze({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 yq=function(e){e.preventDefault(),e.stopPropagation()};var bq=["boxSizing","height","overflow","paddingRight","position"],xq={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function wq(e){e.preventDefault()}function Sq(e){e.stopPropagation()}function _q(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function kq(){return"ontouchstart"in window||navigator.maxTouchPoints}var Tq=!("undefined"===typeof window||!window.document||!window.document.createElement),Cq=0,Eq={capture:!1,passive:!1};var Oq=function(){return document.activeElement&&document.activeElement.blur()},jq={name:"1kfdb0e",styles:"position:fixed;left:0;bottom:0;right:0;top:0"};function Pq(e){var t=e.children,n=e.lockEnabled,r=e.captureEnabled,o=function(e){var t=e.isEnabled,n=e.onBottomArrive,r=e.onBottomLeave,o=e.onTopArrive,i=e.onTopLeave,l=(0,a.useRef)(!1),u=(0,a.useRef)(!1),s=(0,a.useRef)(0),c=(0,a.useRef)(null),f=(0,a.useCallback)((function(e,t){if(null!==c.current){var a=c.current,s=a.scrollTop,f=a.scrollHeight,d=a.clientHeight,h=c.current,p=t>0,v=f-d-s,g=!1;v>t&&l.current&&(r&&r(e),l.current=!1),p&&u.current&&(i&&i(e),u.current=!1),p&&t>v?(n&&!l.current&&n(e),h.scrollTop=f,g=!0,l.current=!0):!p&&-t>s&&(o&&!u.current&&o(e),h.scrollTop=0,g=!0,u.current=!0),g&&yq(e)}}),[n,r,o,i]),d=(0,a.useCallback)((function(e){f(e,e.deltaY)}),[f]),h=(0,a.useCallback)((function(e){s.current=e.changedTouches[0].clientY}),[]),p=(0,a.useCallback)((function(e){var t=s.current-e.changedTouches[0].clientY;f(e,t)}),[f]),v=(0,a.useCallback)((function(e){if(e){var t=!!bG&&{passive:!1};e.addEventListener("wheel",d,t),e.addEventListener("touchstart",h,t),e.addEventListener("touchmove",p,t)}}),[p,h,d]),g=(0,a.useCallback)((function(e){e&&(e.removeEventListener("wheel",d,!1),e.removeEventListener("touchstart",h,!1),e.removeEventListener("touchmove",p,!1))}),[p,h,d]);return(0,a.useEffect)((function(){if(t){var e=c.current;return v(e),function(){g(e)}}}),[t,v,g]),function(e){c.current=e}}({isEnabled:void 0===r||r,onBottomArrive:e.onBottomArrive,onBottomLeave:e.onBottomLeave,onTopArrive:e.onTopArrive,onTopLeave:e.onTopLeave}),i=function(e){var t=e.isEnabled,n=e.accountForScrollbars,r=void 0===n||n,o=(0,a.useRef)({}),i=(0,a.useRef)(null),l=(0,a.useCallback)((function(e){if(Tq){var t=document.body,n=t&&t.style;if(r&&bq.forEach((function(e){var t=n&&n[e];o.current[e]=t})),r&&Cq<1){var i=parseInt(o.current.paddingRight,10)||0,a=document.body?document.body.clientWidth:0,l=window.innerWidth-a+i||0;Object.keys(xq).forEach((function(e){var t=xq[e];n&&(n[e]=t)})),n&&(n.paddingRight="".concat(l,"px"))}t&&kq()&&(t.addEventListener("touchmove",wq,Eq),e&&(e.addEventListener("touchstart",_q,Eq),e.addEventListener("touchmove",Sq,Eq))),Cq+=1}}),[r]),u=(0,a.useCallback)((function(e){if(Tq){var t=document.body,n=t&&t.style;Cq=Math.max(Cq-1,0),r&&Cq<1&&bq.forEach((function(e){var t=o.current[e];n&&(n[e]=t)})),t&&kq()&&(t.removeEventListener("touchmove",wq,Eq),e&&(e.removeEventListener("touchstart",_q,Eq),e.removeEventListener("touchmove",Sq,Eq)))}}),[r]);return(0,a.useEffect)((function(){if(t){var e=i.current;return l(e),function(){u(e)}}}),[t,l,u]),function(e){i.current=e}}({isEnabled:n});return Xe(a.Fragment,null,n&&Xe("div",{onClick:Oq,css:jq}),t((function(e){o(e),i(e)})))}var Aq={name:"1a0ro4n-requiredInput",styles:"label:requiredInput;opacity:0;pointer-events:none;position:absolute;bottom:0;left:0;right:0;width:100%"},Rq=function(e){var t=e.name,n=e.onFocus;return Xe("input",{required:!0,name:t,tabIndex:-1,onFocus:n,css:Aq,value:"",onChange:function(){}})},Iq={clearIndicator:BG,container:function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":void 0,pointerEvents:t?"none":void 0,position:"relative"}},control:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.theme,i=o.colors,a=o.borderRadius;return h({label:"control",alignItems:"center",cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:o.spacing.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms"},t?{}:{backgroundColor:n?i.neutral5:i.neutral0,borderColor:n?i.neutral10:r?i.primary:i.neutral20,borderRadius:a,borderStyle:"solid",borderWidth:1,boxShadow:r?"0 0 0 1px ".concat(i.primary):void 0,"&:hover":{borderColor:r?i.primary:i.neutral30}})},dropdownIndicator:zG,group:function(e,t){var n=e.theme.spacing;return t?{}:{paddingBottom:2*n.baseUnit,paddingTop:2*n.baseUnit}},groupHeading:function(e,t){var n=e.theme,r=n.colors,o=n.spacing;return h({label:"group",cursor:"default",display:"block"},t?{}:{color:r.neutral40,fontSize:"75%",fontWeight:500,marginBottom:"0.25em",paddingLeft:3*o.baseUnit,paddingRight:3*o.baseUnit,textTransform:"uppercase"})},indicatorsContainer:function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},indicatorSeparator:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing.baseUnit,i=r.colors;return h({label:"indicatorSeparator",alignSelf:"stretch",width:1},t?{}:{backgroundColor:n?i.neutral10:i.neutral20,marginBottom:2*o,marginTop:2*o})},input:function(e,t){var n=e.isDisabled,r=e.value,o=e.theme,i=o.spacing,a=o.colors;return h(h({visibility:n?"hidden":"visible",transform:r?"translateZ(0)":""},QG),t?{}:{margin:i.baseUnit/2,paddingBottom:i.baseUnit/2,paddingTop:i.baseUnit/2,color:a.neutral80})},loadingIndicator:function(e,t){var n=e.isFocused,r=e.size,o=e.theme,i=o.colors,a=o.spacing.baseUnit;return h({label:"loadingIndicator",display:"flex",transition:"color 150ms",alignSelf:"center",fontSize:r,lineHeight:1,marginRight:r,textAlign:"center",verticalAlign:"middle"},t?{}:{color:n?i.neutral60:i.neutral20,padding:2*a})},loadingMessage:jG,menu:function(e,t){var n,r=e.placement,o=e.theme,i=o.borderRadius,a=o.spacing,l=o.colors;return h((f(n={label:"menu"},function(e){return e?{bottom:"top",top:"bottom"}[e]:"bottom"}(r),"100%"),f(n,"position","absolute"),f(n,"width","100%"),f(n,"zIndex",1),n),t?{}:{backgroundColor:l.neutral0,borderRadius:i,boxShadow:"0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)",marginBottom:a.menuGutter,marginTop:a.menuGutter})},menuList:function(e,t){var n=e.maxHeight,r=e.theme.spacing.baseUnit;return h({maxHeight:n,overflowY:"auto",position:"relative",WebkitOverflowScrolling:"touch"},t?{}:{paddingBottom:r,paddingTop:r})},menuPortal:function(e){var t=e.rect,n=e.offset,r=e.position;return{left:t.left,position:r,top:n,width:t.width,zIndex:1}},multiValue:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors;return h({label:"multiValue",display:"flex",minWidth:0},t?{}:{backgroundColor:i.neutral10,borderRadius:o/2,margin:r.baseUnit/2})},multiValueLabel:function(e,t){var n=e.theme,r=n.borderRadius,o=n.colors,i=e.cropWithEllipsis;return h({overflow:"hidden",textOverflow:i||void 0===i?"ellipsis":void 0,whiteSpace:"nowrap"},t?{}:{borderRadius:r/2,color:o.neutral80,fontSize:"85%",padding:3,paddingLeft:6})},multiValueRemove:function(e,t){var n=e.theme,r=n.spacing,o=n.borderRadius,i=n.colors,a=e.isFocused;return h({alignItems:"center",display:"flex"},t?{}:{borderRadius:o/2,backgroundColor:a?i.dangerLight:void 0,paddingLeft:r.baseUnit,paddingRight:r.baseUnit,":hover":{backgroundColor:i.dangerLight,color:i.danger}})},noOptionsMessage:OG,option:function(e,t){var n=e.isDisabled,r=e.isFocused,o=e.isSelected,i=e.theme,a=i.spacing,l=i.colors;return h({label:"option",cursor:"default",display:"block",fontSize:"inherit",width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)"},t?{}:{backgroundColor:o?l.primary:r?l.primary25:"transparent",color:n?l.neutral20:o?l.neutral0:"inherit",padding:"".concat(2*a.baseUnit,"px ").concat(3*a.baseUnit,"px"),":active":{backgroundColor:n?void 0:o?l.primary:l.primary50}})},placeholder:function(e,t){var n=e.theme,r=n.spacing,o=n.colors;return h({label:"placeholder",gridArea:"1 / 1 / 2 / 3"},t?{}:{color:o.neutral50,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2})},singleValue:function(e,t){var n=e.isDisabled,r=e.theme,o=r.spacing,i=r.colors;return h({label:"singleValue",gridArea:"1 / 1 / 2 / 3",maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},t?{}:{color:n?i.neutral40:i.neutral80,marginLeft:o.baseUnit/2,marginRight:o.baseUnit/2})},valueContainer:function(e,t){var n=e.theme.spacing,r=e.isMulti,o=e.hasValue,i=e.selectProps.controlShouldRenderValue;return h({alignItems:"center",display:r&&o&&i?"flex":"grid",flex:1,flexWrap:"wrap",WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"},t?{}:{padding:"".concat(n.baseUnit/2,"px ").concat(2*n.baseUnit,"px")})}};var Mq={borderRadius:4,colors:{primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},spacing:{baseUnit:4,controlHeight:38,menuGutter:8}},Dq={"aria-live":"polite",backspaceRemovesValue:!0,blurInputOnSelect:vG(),captureMenuScroll:!vG(),classNames:{},closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:vq(),formatGroupLabel:function(e){return e.label},getOptionLabel:function(e){return e.label},getOptionValue:function(e){return e.value},isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:function(e){return!!e.isDisabled},loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:0,tabSelectsValue:!0,unstyled:!1};function Nq(e,t,n,r){return{type:"option",data:t,isDisabled:Hq(e,t,n),isSelected:Uq(e,t,n),label:Bq(e,t),value:Vq(e,t),index:r}}function Lq(e,t){return e.options.map((function(n,r){if("options"in n){var o=n.options.map((function(n,r){return Nq(e,n,t,r)})).filter((function(t){return zq(e,t)}));return o.length>0?{type:"group",data:n,options:o,index:r}:void 0}var i=Nq(e,n,t,r);return zq(e,i)?i:void 0})).filter(xG)}function Fq(e){return e.reduce((function(e,t){return"group"===t.type?e.push.apply(e,bt(t.options.map((function(e){return e.data})))):e.push(t.data),e}),[])}function zq(e,t){var n=e.inputValue,r=void 0===n?"":n,o=t.data,i=t.isSelected,a=t.label,l=t.value;return(!Gq(e)||!i)&&Wq(e,{label:a,value:l,data:o},r)}var Bq=function(e,t){return e.getOptionLabel(t)},Vq=function(e,t){return e.getOptionValue(t)};function Hq(e,t,n){return"function"===typeof e.isOptionDisabled&&e.isOptionDisabled(t,n)}function Uq(e,t,n){if(n.indexOf(t)>-1)return!0;if("function"===typeof e.isOptionSelected)return e.isOptionSelected(t,n);var r=Vq(e,t);return n.some((function(t){return Vq(e,t)===r}))}function Wq(e,t,n){return!e.filterOption||e.filterOption(t,n)}var Gq=function(e){var t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t},qq=1,Qq=function(e){St(n,e);var t=bi(n);function n(e){var r;if(pi(this,n),(r=t.call(this,e)).state={ariaSelection:null,focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,selectValue:[],clearFocusValueOnUpdate:!1,prevWasFocused:!1,inputIsHiddenAfterUpdate:void 0,prevProps:void 0},r.blockOptionHover=!1,r.isComposing=!1,r.commonProps=void 0,r.initialTouchX=0,r.initialTouchY=0,r.instancePrefix="",r.openAfterFocus=!1,r.scrollToFocusedOptionOnUpdate=!1,r.userIsDragging=void 0,r.controlRef=null,r.getControlRef=function(e){r.controlRef=e},r.focusedOptionRef=null,r.getFocusedOptionRef=function(e){r.focusedOptionRef=e},r.menuListRef=null,r.getMenuListRef=function(e){r.menuListRef=e},r.inputRef=null,r.getInputRef=function(e){r.inputRef=e},r.focus=r.focusInput,r.blur=r.blurInput,r.onChange=function(e,t){var n=r.props,o=n.onChange,i=n.name;t.name=i,r.ariaOnChange(e,t),o(e,t)},r.setValue=function(e,t,n){var o=r.props,i=o.closeMenuOnSelect,a=o.isMulti,l=o.inputValue;r.onInputChange("",{action:"set-value",prevInputValue:l}),i&&(r.setState({inputIsHiddenAfterUpdate:!a}),r.onMenuClose()),r.setState({clearFocusValueOnUpdate:!0}),r.onChange(e,{action:t,option:n})},r.selectOption=function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=t.name,a=r.state.selectValue,l=o&&r.isOptionSelected(e,a),u=r.isOptionDisabled(e,a);if(l){var s=r.getOptionValue(e);r.setValue(a.filter((function(e){return r.getOptionValue(e)!==s})),"deselect-option",e)}else{if(u)return void r.ariaOnChange(e,{action:"select-option",option:e,name:i});o?r.setValue([].concat(bt(a),[e]),"select-option",e):r.setValue(e,"select-option")}n&&r.blurInput()},r.removeValue=function(e){var t=r.props.isMulti,n=r.state.selectValue,o=r.getOptionValue(e),i=n.filter((function(e){return r.getOptionValue(e)!==o})),a=wG(t,i,i[0]||null);r.onChange(a,{action:"remove-value",removedValue:e}),r.focusInput()},r.clearValue=function(){var e=r.state.selectValue;r.onChange(wG(r.props.isMulti,[],null),{action:"clear",removedValues:e})},r.popValue=function(){var e=r.props.isMulti,t=r.state.selectValue,n=t[t.length-1],o=t.slice(0,t.length-1),i=wG(e,o,o[0]||null);r.onChange(i,{action:"pop-value",removedValue:n})},r.getValue=function(){return r.state.selectValue},r.cx=function(){for(var e=arguments.length,t=new Array(e),n=0;n5||i>5}},r.onTouchEnd=function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)},r.onControlTouchEnd=function(e){r.userIsDragging||r.onControlMouseDown(e)},r.onClearIndicatorTouchEnd=function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)},r.onDropdownIndicatorTouchEnd=function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)},r.handleInputChange=function(e){var t=r.props.inputValue,n=e.currentTarget.value;r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange(n,{action:"input-change",prevInputValue:t}),r.props.menuIsOpen||r.onMenuOpen()},r.onInputFocus=function(e){r.props.onFocus&&r.props.onFocus(e),r.setState({inputIsHiddenAfterUpdate:!1,isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1},r.onInputBlur=function(e){var t=r.props.inputValue;r.menuListRef&&r.menuListRef.contains(document.activeElement)?r.inputRef.focus():(r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur",prevInputValue:t}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1}))},r.onOptionHover=function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})},r.shouldHideSelectedOptions=function(){return Gq(r.props)},r.onValueInputFocus=function(e){e.preventDefault(),e.stopPropagation(),r.focus()},r.onKeyDown=function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,l=t.isClearable,u=t.isDisabled,s=t.menuIsOpen,c=t.onKeyDown,f=t.tabSelectsValue,d=t.openMenuOnFocus,h=r.state,p=h.focusedOption,v=h.focusedValue,g=h.selectValue;if(!u&&("function"!==typeof c||(c(e),!e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(v)r.removeValue(v);else{if(!o)return;n?r.popValue():l&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!s||!f||!p||d&&r.isOptionSelected(p,g))return;r.selectOption(p);break;case"Enter":if(229===e.keyCode)break;if(s){if(!p)return;if(r.isComposing)return;r.selectOption(p);break}return;case"Escape":s?(r.setState({inputIsHiddenAfterUpdate:!1}),r.onInputChange("",{action:"menu-close",prevInputValue:a}),r.onMenuClose()):l&&i&&r.clearValue();break;case" ":if(a)return;if(!s){r.openMenu("first");break}if(!p)return;r.selectOption(p);break;case"ArrowUp":s?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":s?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!s)return;r.focusOption("pageup");break;case"PageDown":if(!s)return;r.focusOption("pagedown");break;case"Home":if(!s)return;r.focusOption("first");break;case"End":if(!s)return;r.focusOption("last");break;default:return}e.preventDefault()}},r.instancePrefix="react-select-"+(r.props.instanceId||++qq),r.state.selectValue=lG(e.value),e.menuIsOpen&&r.state.selectValue.length){var o=r.buildFocusableOptions(),i=o.indexOf(r.state.selectValue[0]);r.state.focusedOption=o[i]}return r}return hi(n,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput(),this.props.menuIsOpen&&this.state.focusedOption&&this.menuListRef&&this.focusedOptionRef&&pG(this.menuListRef,this.focusedOptionRef)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),o&&n&&!e.isDisabled?this.setState({isFocused:!1},this.onMenuClose):o||n||!e.isDisabled||this.inputRef!==document.activeElement||this.setState({isFocused:!0}),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&(pG(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){this.onInputChange("",{action:"menu-close",prevInputValue:this.props.inputValue}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this,n=this.state,r=n.selectValue,o=n.isFocused,i=this.buildFocusableOptions(),a="first"===e?0:i.length-1;if(!this.props.isMulti){var l=i.indexOf(r[0]);l>-1&&(a=l)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.setState({inputIsHiddenAfterUpdate:!1,focusedValue:null,focusedOption:i[a]},(function(){return t.onMenuOpen()}))}},{key:"focusValue",value:function(e){var t=this.state,n=t.selectValue,r=t.focusedValue;if(this.props.isMulti){this.setState({focusedOption:null});var o=n.indexOf(r);r||(o=-1);var i=n.length-1,a=-1;if(n.length){switch(e){case"previous":a=0===o?0:-1===o?i:o-1;break;case"next":o>-1&&o0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state.focusedOption,r=this.getFocusableOptions();if(r.length){var o=0,i=r.indexOf(n);n||(i=-1),"up"===e?o=i>0?i-1:r.length-1:"down"===e?o=(i+1)%r.length:"pageup"===e?(o=i-t)<0&&(o=0):"pagedown"===e?(o=i+t)>r.length-1&&(o=r.length-1):"last"===e&&(o=r.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:r[o],focusedValue:null})}}},{key:"getTheme",value:function(){return this.props.theme?"function"===typeof this.props.theme?this.props.theme(Mq):h(h({},Mq),this.props.theme):Mq}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.cx,n=this.getStyles,r=this.getClassNames,o=this.getValue,i=this.selectOption,a=this.setValue,l=this.props,u=l.isMulti,s=l.isRtl,c=l.options;return{clearValue:e,cx:t,getStyles:n,getClassNames:r,getValue:o,hasValue:this.hasValue(),isMulti:u,isRtl:s,options:c,selectOption:i,selectProps:l,setValue:a,theme:this.getTheme()}}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.getFocusableOptions().length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return Hq(this.props,e,t)}},{key:"isOptionSelected",value:function(e,t){return Uq(this.props,e,t)}},{key:"filterOption",value:function(e,t){return Wq(this.props,e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"===typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,l=e.form,u=e.menuIsOpen,s=e.required,c=this.getComponents().Input,f=this.state,d=f.inputIsHidden,p=f.ariaSelection,v=this.commonProps,g=r||this.getElementId("input"),m=h(h(h({"aria-autocomplete":"list","aria-expanded":u,"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":s,role:"combobox"},u&&{"aria-controls":this.getElementId("listbox"),"aria-owns":this.getElementId("listbox")}),!n&&{"aria-readonly":!0}),this.hasValue()?"initial-input-focus"===(null===p||void 0===p?void 0:p.action)&&{"aria-describedby":this.getElementId("live-region")}:{"aria-describedby":this.getElementId("placeholder")});return n?a.createElement(c,ye({},v,{autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",id:g,innerRef:this.getInputRef,isDisabled:t,isHidden:d,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,spellCheck:"false",tabIndex:i,form:l,type:"text",value:o},m)):a.createElement(mq,ye({id:g,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:oG,onFocus:this.onInputFocus,disabled:t,tabIndex:i,inputMode:"none",form:l,value:""},m))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.getComponents(),n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,l=t.SingleValue,u=t.Placeholder,s=this.commonProps,c=this.props,f=c.controlShouldRenderValue,d=c.isDisabled,h=c.isMulti,p=c.inputValue,v=c.placeholder,g=this.state,m=g.selectValue,y=g.focusedValue,b=g.isFocused;if(!this.hasValue()||!f)return p?null:a.createElement(u,ye({},s,{key:"placeholder",isDisabled:d,isFocused:b,innerProps:{id:this.getElementId("placeholder")}}),v);if(h)return m.map((function(t,l){var u=t===y,c="".concat(e.getOptionLabel(t),"-").concat(e.getOptionValue(t));return a.createElement(n,ye({},s,{components:{Container:r,Label:o,Remove:i},isFocused:u,isDisabled:d,key:c,index:l,removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault()}},data:t}),e.formatOptionLabel(t,"value"))}));if(p)return null;var x=m[0];return a.createElement(l,ye({},s,{data:x,isDisabled:d}),this.formatOptionLabel(x,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.getComponents().ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var l={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return a.createElement(e,ye({},t,{innerProps:l,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.getComponents().LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;return a.createElement(e,ye({},t,{innerProps:{"aria-hidden":"true"},isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.getComponents(),t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return a.createElement(n,ye({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.getComponents().DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return a.createElement(e,ye({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.getComponents(),n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,l=t.MenuPortal,u=t.LoadingMessage,s=t.NoOptionsMessage,c=t.Option,f=this.commonProps,d=this.state.focusedOption,h=this.props,p=h.captureMenuScroll,v=h.inputValue,g=h.isLoading,m=h.loadingMessage,y=h.minMenuHeight,b=h.maxMenuHeight,x=h.menuIsOpen,w=h.menuPlacement,S=h.menuPosition,_=h.menuPortalTarget,k=h.menuShouldBlockScroll,T=h.menuShouldScrollIntoView,C=h.noOptionsMessage,E=h.onMenuScrollToTop,O=h.onMenuScrollToBottom;if(!x)return null;var j,P=function(t,n){var r=t.type,o=t.data,i=t.isDisabled,l=t.isSelected,u=t.label,s=t.value,h=d===o,p=i?void 0:function(){return e.onOptionHover(o)},v=i?void 0:function(){return e.selectOption(o)},g="".concat(e.getElementId("option"),"-").concat(n),m={id:g,onClick:v,onMouseMove:p,onMouseOver:p,tabIndex:-1};return a.createElement(c,ye({},f,{innerProps:m,data:o,isDisabled:i,isSelected:l,key:g,label:u,type:r,value:s,isFocused:h,innerRef:h?e.getFocusedOptionRef:void 0}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())j=this.getCategorizedOptions().map((function(t){if("group"===t.type){var o=t.data,i=t.options,l=t.index,u="".concat(e.getElementId("group"),"-").concat(l),s="".concat(u,"-heading");return a.createElement(n,ye({},f,{key:u,data:o,options:i,Heading:r,headingProps:{id:s,data:t.data},label:e.formatGroupLabel(t.data)}),t.options.map((function(e){return P(e,"".concat(l,"-").concat(e.index))})))}if("option"===t.type)return P(t,"".concat(t.index))}));else if(g){var A=m({inputValue:v});if(null===A)return null;j=a.createElement(u,f,A)}else{var R=C({inputValue:v});if(null===R)return null;j=a.createElement(s,f,R)}var I={minMenuHeight:y,maxMenuHeight:b,menuPlacement:w,menuPosition:S,menuShouldScrollIntoView:T},M=a.createElement(CG,ye({},f,I),(function(t){var n=t.ref,r=t.placerProps,l=r.placement,u=r.maxHeight;return a.createElement(o,ye({},f,I,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove,id:e.getElementId("listbox")},isLoading:g,placement:l}),a.createElement(Pq,{captureEnabled:p,onTopArrive:E,onBottomArrive:O,lockEnabled:k},(function(t){return a.createElement(i,ye({},f,{innerRef:function(n){e.getMenuListRef(n),t(n)},isLoading:g,maxHeight:u,focusedOption:d}),j)})))}));return _||"fixed"===S?a.createElement(l,ye({},f,{appendTo:_,controlElement:this.controlRef,menuPlacement:w,menuPosition:S}),M):M}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,l=t.required,u=this.state.selectValue;if(i&&!r){if(l&&!this.hasValue())return a.createElement(Rq,{name:i,onFocus:this.onValueInputFocus});if(o){if(n){var s=u.map((function(t){return e.getOptionValue(t)})).join(n);return a.createElement("input",{name:i,type:"hidden",value:s})}var c=u.length>0?u.map((function(t,n){return a.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})})):a.createElement("input",{name:i,type:"hidden",value:""});return a.createElement("div",null,c)}var f=u[0]?this.getOptionValue(u[0]):"";return a.createElement("input",{name:i,type:"hidden",value:f})}}},{key:"renderLiveRegion",value:function(){var e=this.commonProps,t=this.state,n=t.ariaSelection,r=t.focusedOption,o=t.focusedValue,i=t.isFocused,l=t.selectValue,u=this.getFocusableOptions();return a.createElement(oq,ye({},e,{id:this.getElementId("live-region"),ariaSelection:n,focusedOption:r,focusedValue:o,isFocused:i,selectValue:l,focusableOptions:u}))}},{key:"render",value:function(){var e=this.getComponents(),t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,l=i.className,u=i.id,s=i.isDisabled,c=i.menuIsOpen,f=this.state.isFocused,d=this.commonProps=this.getCommonProps();return a.createElement(r,ye({},d,{className:l,innerProps:{id:u,onKeyDown:this.onKeyDown},isDisabled:s,isFocused:f}),this.renderLiveRegion(),a.createElement(t,ye({},d,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:s,isFocused:f,menuIsOpen:c}),a.createElement(o,ye({},d,{isDisabled:s}),this.renderPlaceholderOrValue(),this.renderInput()),a.createElement(n,ye({},d,{isDisabled:s}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevProps,r=t.clearFocusValueOnUpdate,o=t.inputIsHiddenAfterUpdate,i=t.ariaSelection,a=t.isFocused,l=t.prevWasFocused,u=e.options,s=e.value,c=e.menuIsOpen,f=e.inputValue,d=e.isMulti,p=lG(s),v={};if(n&&(s!==n.value||u!==n.options||c!==n.menuIsOpen||f!==n.inputValue)){var g=c?function(e,t){return Fq(Lq(e,t))}(e,p):[],m=r?function(e,t){var n=e.focusedValue,r=e.selectValue.indexOf(n);if(r>-1){if(t.indexOf(n)>-1)return n;if(r-1?n:t[0]}(t,g);v={selectValue:p,focusedOption:y,focusedValue:m,clearFocusValueOnUpdate:!1}}var b=null!=o&&e!==n?{inputIsHidden:o,inputIsHiddenAfterUpdate:void 0}:{},x=i,w=a&&l;return a&&!w&&(x={value:wG(d,p,p[0]||null),options:p,action:"initial-input-focus"},w=!l),"initial-input-focus"===(null===i||void 0===i?void 0:i.action)&&(x=null),h(h(h({},v),b),{},{prevProps:e,ariaSelection:x,prevWasFocused:w})}}]),n}(a.Component);Qq.defaultProps=Dq;var $q,Yq=(0,a.forwardRef)((function(e,t){var n=function(e){var t=e.defaultInputValue,n=void 0===t?"":t,r=e.defaultMenuIsOpen,o=void 0!==r&&r,i=e.defaultValue,l=void 0===i?null:i,u=e.inputValue,s=e.menuIsOpen,c=e.onChange,f=e.onInputChange,d=e.onMenuClose,v=e.onMenuOpen,g=e.value,m=p(e,RW),y=ut((0,a.useState)(void 0!==u?u:n),2),b=y[0],x=y[1],w=ut((0,a.useState)(void 0!==s?s:o),2),S=w[0],_=w[1],k=ut((0,a.useState)(void 0!==g?g:l),2),T=k[0],C=k[1],E=(0,a.useCallback)((function(e,t){"function"===typeof c&&c(e,t),C(e)}),[c]),O=(0,a.useCallback)((function(e,t){var n;"function"===typeof f&&(n=f(e,t)),x(void 0!==n?n:e)}),[f]),j=(0,a.useCallback)((function(){"function"===typeof v&&v(),_(!0)}),[v]),P=(0,a.useCallback)((function(){"function"===typeof d&&d(),_(!1)}),[d]),A=void 0!==u?u:b,R=void 0!==s?s:S,I=void 0!==g?g:T;return h(h({},m),{},{inputValue:A,menuIsOpen:R,onChange:E,onInputChange:O,onMenuClose:P,onMenuOpen:j,value:I})}(e);return a.createElement(Qq,ye({ref:t},n))})),Kq=Yq,Xq=function(e){var n=e.setFiltersSelected,r=e.beacons,o=e.groups,i=e.services,a=e.hosts,l=e.filtersSelected,u=Object.values(qC);return(0,t.jsxs)("div",{children:[(0,t.jsx)(Cj,{size:"sm",mb:2,children:" Filter by platform, service, group, hosts, and beacon"}),(0,t.jsx)(Kq,{isSearchable:!0,isMulti:!0,options:function(e,t,n,r){return[{label:"Platform",options:u.map((function(e){return{name:e,value:e,label:e,kind:"platform"}}))},{label:"Service",options:n.map((function(e){return h(h({},e),{},{value:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.name,kind:null===e||void 0===e?void 0:e.kind})}))},{label:"Group",options:t.map((function(e){return h(h({},e),{},{value:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.name,kind:null===e||void 0===e?void 0:e.kind})}))},{label:"Host",options:r.map((function(e){return h(h({},e),{},{value:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.name,kind:"host"})}))},{label:"Beacon",options:e.map((function(e){return h(h({},e),{},{value:null===e||void 0===e?void 0:e.id,label:null===e||void 0===e?void 0:e.name,kind:"beacon"})}))}]}(r,o,i,a),onChange:n,filterOption:vq({matchFrom:"any",stringify:function(e){return"".concat(e.label)}}),value:l||void 0})]})},Jq=ut(gt({name:"".concat($q="Card","StylesContext"),errorMessage:'useStyles: "styles" is undefined. Seems you forgot to wrap the components in "<'.concat($q,' />" ')}),2),Zq=Jq[0],eQ=Jq[1],tQ=["className","children","direction","justify","align"],nQ=cx((function(e,n){var r=Sr(e),o=r.className,i=r.children,a=r.direction,l=void 0===a?"column":a,u=r.justify,s=r.align,c=p(r,tQ),f=gx("Card",e);return(0,t.jsx)(lx.div,h(h({ref:n,className:kt("chakra-card",o),__css:h({display:"flex",flexDirection:l,justifyContent:u,alignItems:s,position:"relative",minWidth:0,wordWrap:"break-word"},f.container)},c),{},{children:(0,t.jsx)(Zq,{value:f,children:i})}))})),rQ=["className"],oQ=cx((function(e,n){var r=e.className,o=p(e,rQ),i=eQ();return(0,t.jsx)(lx.div,h({ref:n,className:kt("chakra-card__body",r),__css:i.body},o))})),iQ=ut(st({name:"CheckboxGroupContext",strict:!1}),2),aQ=(iQ[0],iQ[1]),lQ=["isIndeterminate","isChecked"];function uQ(e){return(0,t.jsx)(lx.svg,h(h({width:"1.2em",viewBox:"0 0 12 10",style:{fill:"none",strokeWidth:2,stroke:"currentColor",strokeDasharray:16}},e),{},{children:(0,t.jsx)("polyline",{points:"1.5 6 4.5 9 10.5 1"})}))}function sQ(e){return(0,t.jsx)(lx.svg,h(h({width:"1.2em",viewBox:"0 0 24 24",style:{stroke:"currentColor",strokeWidth:4}},e),{},{children:(0,t.jsx)("line",{x1:"21",x2:"3",y1:"12",y2:"12"})}))}function cQ(e){var n=e.isIndeterminate,r=e.isChecked,o=p(e,lQ),i=n?sQ:uQ;return r||n?(0,t.jsx)(lx.div,{style:{display:"flex",alignItems:"center",justifyContent:"center",height:"100%"},children:(0,t.jsx)(i,h({},o))}):null}var fQ=["spacing","className","children","iconColor","iconSize","icon","isChecked","isDisabled","onChange","inputProps"],dQ={display:"inline-flex",alignItems:"center",justifyContent:"center",verticalAlign:"top",userSelect:"none",flexShrink:0},hQ={cursor:"pointer",display:"inline-flex",alignItems:"center",verticalAlign:"top",position:"relative"},pQ=et({from:{opacity:0,strokeDashoffset:16,transform:"scale(0.95)"},to:{opacity:1,strokeDashoffset:0,transform:"scale(1)"}}),vQ=et({from:{opacity:0},to:{opacity:1}}),gQ=et({from:{transform:"scaleX(0.65)"},to:{transform:"scaleX(1)"}}),mQ=cx((function(e,n){var r=aQ(),o=gx("Checkbox",h(h({},r),e)),i=Sr(e),l=i.spacing,u=void 0===l?"0.5rem":l,s=i.className,c=i.children,f=i.iconColor,d=i.iconSize,v=i.icon,g=void 0===v?(0,t.jsx)(cQ,{}):v,m=i.isChecked,y=i.isDisabled,b=void 0===y?null==r?void 0:r.isDisabled:y,x=i.onChange,w=i.inputProps,S=p(i,fQ),_=m;(null==r?void 0:r.value)&&i.value&&(_=r.value.includes(i.value));var k=x;(null==r?void 0:r.onChange)&&i.value&&(k=function(){for(var e=arguments.length,t=new Array(e),n=0;n0){if(!(t.beacon.indexOf(e.id)>-1))return!1;u=!0}if(t.host.length>0){var s;if(!(t.host.indexOf(null===e||void 0===e||null===(s=e.host)||void 0===s?void 0:s.id)>-1))return!1;u=!0}if(t.service.length>0){if(!(l&&t.service.indexOf(null===l||void 0===l?void 0:l.id)>-1))return!1;u=!0}if(t.group.length>0){if(!(a&&t.group.indexOf(null===a||void 0===a?void 0:a.id)>-1))return!1;u=!0}if(t.platform.length>0){var c;if(!(t.platform.indexOf(null===e||void 0===e||null===(c=e.host)||void 0===c?void 0:c.platform)>-1))return!1;u=!0}return u}))}),[l]),h=(0,a.useCallback)((function(e,t){return c?e.filter((function(e){return t[null===e||void 0===e?void 0:e.id]})):e}),[c]);return(0,a.useEffect)((function(){var n=h(e,t);n=d(n),o(n)}),[e,t,l,c]),{filteredBeacons:r,setTypeFilters:u,viewOnlySelected:c,setViewOnlySelected:f}}(n,l),c=s.filteredBeacons,f=s.setTypeFilters,d=s.setViewOnlySelected,p=(0,a.useCallback)((function(e){u((function(t){var n=h({},t);return n[e]=!t[e],n}))}),[]),v=(0,a.useCallback)((function(){u((function(e){var t=h({},e);return c.map((function(e){t[e.id]=!0})),t}))}),[c]),g=(0,a.useCallback)((function(){u((function(e){var t=h({},e);return c.map((function(e){t[e.id]=!1})),t}))}),[c]);var m=function(){var e=0;for(var t in l)!0===l[t]&&(e+=1);return e}();return(0,t.jsx)("div",{className:"flex flex-col gap-4",children:(0,t.jsxs)(GV,{direction:"column",gap:"4",children:[(0,t.jsx)(VV,{children:(0,t.jsxs)("div",{className:"flex flex-row justify-between gap-8",children:[(0,t.jsx)("div",{className:" flex-1",children:(0,t.jsx)(Xq,{setFiltersSelected:f,groups:r,services:o,beacons:n,hosts:i})}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)(DV,{htmlFor:"isSelected",children:(0,t.jsx)(Cj,{size:"sm",children:"Filter by selected"})}),(0,t.jsx)(dH,{id:"isSelected",className:"pt-1",colorScheme:"purple",onChange:function(){return d((function(e){return!e}))}})]})]})}),(0,t.jsx)(VV,{children:(0,t.jsx)(HF,{p:2,className:"option-container",borderRadius:"md",children:(0,t.jsxs)(GV,{direction:"column",gap:2,width:"full",height:"full",children:[(0,t.jsxs)(VV,{children:[(0,t.jsx)(VV,{children:(0,t.jsxs)(xH,{leftIcon:(0,t.jsx)(kH,{className:"h-4 w-4"}),size:"sm",onClick:function(){return v()},children:["Select all (",c.length,")"]})}),(0,t.jsx)(VV,{children:(0,t.jsx)(xH,{leftIcon:(0,t.jsx)(TH,{className:" h-4 w-4"}),size:"sm",onClick:function(){return g()},children:"Clear selected"})})]}),0===c.length&&(0,t.jsx)(VV,{children:(0,t.jsxs)(_H,{fontSize:"sm",p:2,textAlign:"center",children:[c.length!==n.length&&"Try adjusting filter. ","No results found."]})}),(0,t.jsx)(VV,{className:"md-scroll-container",children:(0,t.jsx)(_Q,{disableHeight:!0,children:function(e){var n=e.width;return(0,t.jsx)(SQ,{cellRenderer:function(e){return function(e,n){var r=e.columnIndex,o=e.key,i=e.rowIndex,a=e.style,u=1*i+r;return(0,t.jsx)("div",{style:a,children:(0,t.jsx)(wQ,{index:u,style:{width:n,height:100},beaconsToDisplay:c,toggleCheck:p,beaconsSelected:l})},o)}(e,n)},columnCount:1,columnWidth:n,height:100*c.length,rowCount:c.length,rowHeight:100,width:n})}})})]})})}),(0,t.jsx)(VV,{className:"flex flex-row items-end justify-end w-full",children:(0,t.jsxs)(Cj,{size:"sm",mb:2,className:" self-end text-right",children:["Total beacons selected (",m,")"]})})]})})},TQ=function(e){var n=e.setCurrStep,r=e.formik,o=ut((0,a.useState)({}),2),i=o[0],l=o[1],u=(0,a.useContext)(ZA),s=u.data,c=u.isLoading,f=function(e){var t=new Date;return e.filter((function(e){return EL(new Date(e.lastSeenAt),{seconds:e.interval,minutes:1})>=t}))}((null===s||void 0===s?void 0:s.beacons)||[]),d=function(e){for(var t in e)if(!0===e[t])return!0;return!1}(i);return(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("h2",{className:"text-xl font-semibold text-gray-900",children:"Select agent beacons"}),(0,t.jsx)("p",{className:"text-sm text-gray-700 italic",children:"Only active beacons are available for selection"})]}),c||void 0===s?(0,t.jsx)(q_,{type:G_.loading,label:"Loading beacons..."}):(0,t.jsx)(kQ,{beacons:f,groups:(null===s||void 0===s?void 0:s.groupTags)||[],services:(null===s||void 0===s?void 0:s.serviceTags)||[],hosts:(null===s||void 0===s?void 0:s.hosts)||[],selectedBeacons:i,setSelectedBeacons:l}),(0,t.jsx)("div",{className:"flex flex-row gap-2",children:(0,t.jsx)("button",{className:"btn-primary",onClick:function(){return function(e){var t=[];for(var o in e)!0===e[o]&&t.push(o);r.setFieldValue("beacons",t),n(1)}(i)},disabled:!d,children:"Continue"})})]})};var CQ=function(){var e=ut((0,a.useState)(!1),2),t=e[0],n=e[1],r=s_(),o=function(e,t){var n=uj(null===t||void 0===t?void 0:t.client);lj(e,tj.Mutation);var r=(0,a.useState)({called:!1,loading:!1,client:n}),o=r[0],i=r[1],l=(0,a.useRef)({result:o,mutationId:0,isMounted:!0,client:n,mutation:e,options:t});Object.assign(l.current,{client:n,options:t,mutation:e});var u=(0,a.useCallback)((function(e){void 0===e&&(e={});var t=l.current,n=t.options,r=t.mutation,o=Df(Df({},n),{mutation:r}),a=e.client||l.current.client;l.current.result.loading||o.ignoreResults||!l.current.isMounted||i(l.current.result={loading:!0,error:void 0,data:void 0,called:!0,client:a});var u=++l.current.mutationId,s=YO(o,e);return a.mutate(s).then((function(t){var n,r=t.data,o=t.errors,c=o&&o.length>0?new rj({graphQLErrors:o}):void 0;if(u===l.current.mutationId&&!s.ignoreResults){var f={called:!0,loading:!1,data:r,error:c,client:a};l.current.isMounted&&!HO(l.current.result,f)&&i(l.current.result=f)}var d=e.onCompleted||(null===(n=l.current.options)||void 0===n?void 0:n.onCompleted);return null===d||void 0===d||d(t.data,s),t})).catch((function(t){var n;if(u===l.current.mutationId&&l.current.isMounted){var r={loading:!1,error:t,data:void 0,called:!0,client:a};HO(l.current.result,r)||i(l.current.result=r)}var o=e.onError||(null===(n=l.current.options)||void 0===n?void 0:n.onError);if(o)return o(t,s),{data:void 0,errors:t};throw t}))}),[]),s=(0,a.useCallback)((function(){l.current.isMounted&&i({called:!1,loading:!1,client:n})}),[]);return(0,a.useEffect)((function(){return l.current.isMounted=!0,function(){l.current.isMounted=!1}}),[]),[u,Df({reset:s},o)]}(rO(bQ||(bQ=YC(["\n mutation CreateQuest ($IDs: [ID!]!, $input: CreateQuestInput!) {\n createQuest(beaconIDs: $IDs, input: $input) {\n id\n name\n tasks{\n id\n lastModifiedAt\n output\n execStartedAt\n execFinishedAt\n }\n tome{\n id\n name\n paramDefs\n }\n }\n }\n "]))),{onCompleted:function(e){var t;r("/tasks/".concat(null===e||void 0===e||null===(t=e.createQuest)||void 0===t?void 0:t.id))},onError:function(e){e&&n(!0)},refetchQueries:[$A,"GetQuests"]}),i=ut(o,2),l=i[0],u=i[1];return{submitQuest:function(e){var t,n,r={},o=mt(e.params);try{for(o.s();!(n=o.n()).done;){var i=n.value;r=h(h({},f({},i.name,i.value)),r)}}catch(u){o.e(u)}finally{o.f()}var a={variables:{IDs:e.beacons,input:{name:null===e||void 0===e?void 0:e.name,tomeID:null===(t=e.tome)||void 0===t?void 0:t.id,parameters:JSON.stringify(r)}}};l(a)},loading:u.loading,error:t,reset:u.reset}},EQ=["The Lost Tome of Eldoria","Shadows Over Brimstone Village","The Crimson Ritual","Secrets of the Sunken Temple","The Dragon's Hoard Heist","The Cursed Crown of King Maldor","The Whispering Woods Mystery","The Goblins' Hidden Fortress","The Labyrinth of Eternal Echoes","The Ghost Ship of Captain Redbeard","The Siege of Castle Blackthorn","The Enigma of the Arcane Tower","The Plague of Ironvale","The Forgotten Crypt of the Ancient Kings","The Elemental Fury","The Sapphire Phoenix Rebirth","The Ice Queen's Winter Curse","The Siege of the Sky Fortress","The Secret of the Leviathan's Depths","The Necromancer's Dark Army","The Blood Moon Prophecy","The Lost City of Gold","The Revenge of the Fire Witch","The Forbidden Spellbook","The Werewolf's Last Stand","The Treasure of the Sunken Galleon","The Missing Merchant of Silverport","The Haunted Halls of Greyhaven","The Wrath of the Forest Spirits","The Sands of Time Artifact","The Siege of the Undead Citadel","The Pirate King's Hidden Cove","The Cult of the Eclipse","The Guardian of the Crystal Cave","The Ancient Druid's Riddle","The Sorcerer's Stone Legacy","The Beast of the Bitter Peaks","The Relic of the Fallen Paladin","The Enchanted Maze of Mirrors","The Assault on Ogre's Keep","The Demon Lord's Infernal Game","The Mystic Oracle's Vision","The Quest for the Celestial Staff","The Dragonkin Uprising","The Elixir of Eternal Youth","The Conquest of the Shadow Fortress","The Vampire Lord's Masquerade","The Titan's Lost Treasure","The Siege of the Elemental Gates","The Rise of the Lich Emperor","The Orb of Planar Dissonance","The Lost Fleet of the Abyssal Deep","The Shattered Amulet of Prophecy","The Ruins of Skyreach Castle","The Starfallen Meteorite","The Midnight Heist in Shadowgrove","The Banished Warlock's Revenge","The Flames of the Phoenix Forge","The Mirror of Forgotten Dreams","The Serpent's Lair in the Twisted Jungle","The Festival of the Golden Harvest","The Howling Caverns of the Wind Spirits","The Tower of the Timeless Mage","The Eternal Flame of the Fire Temple","The Secret of the Moonstone Monolith","The Unseen Invasion of the Dream Realm","The Siege of the Crystal Spire","The Fallen Star of Eldritch Power","The Hunt for the Dire Wolf Alpha","The Underworld's Dark Bargain","The Trial of the Elemental Champions","The Lost Expedition to the Frozen Wastes","The Enchanted Forest of Eternal Autumn","The Rebellion of the Stone Golems","The Awakening of the Ancient Leviathan","The Curse of the Blood Ruby","The Riddle of the Sphinx Gate","The Wrath of the Storm King","The Sacred Grove of the Moon Druids","The Disappearance of the Silver Swan","The Legend of the Sunken Kingdom","The Quest for the Arcane Codex","The Plight of the Thornwood Dryads","The Invasion of the Shadow Fey","The Secret of the Alchemist's Stone","The Festival of the Lunar Eclipse","The Crypt of the Forgotten Pharaoh","The Siege of the Demon's Bastion","The Battle for the Astral Fortress","The Pursuit of the Chaos Sorcerer","The Hunt for the Sacred Golden Stag","The Return of the Ice Sorceress","The Lost Scrolls of the Celestial Monks","The Nightmare in the Haunted Manor","The Expedition to the Molten Core","The Labyrinth of the Shadow Queen","The Assault on the Goblin King's Lair","The Mystery of the Vanishing Village","The Rise of the Phoenix Cult","The Challenge of the Elemental Lords","The Enigma of the Ebon Orb","The Guardian's Gauntlet","The Gilded Labyrinth","The Forbidden Forest's Heart","The Lost Fleet of the Damned","The Caverns of Echoing Madness","The Siege of the Sunken City","The Ghosts of the Crimson Coast","The Fire Giant's Forge","The Curse of the Blackened Sun","The Rite of the Winter's Warden","The Lost Shrine of the Sea Serpent","The Hidden Temple of the Sky Gods","The Crypts of the Cursed Kings","The Tower of the Mad Alchemist","The Phantom Caravan","The Sunken Ruins of Atlantis","The Desert of Shifting Sands","The Ice Castle of the Frozen King","The Valley of the Lost Titans","The Maze of the Mind Flayer","The Haunting of the Amber Keep","The Wrath of the Red Dragon","The Heist of the Celestial Jewels","The Tomb of the Shadow Pharaoh","The Beast in the Black Bog","The Secret of the Iron Golem","The Siege of the Wraith's Tower","The Lair of the Basilisk","The Festival of the Burning Skies","The Night of the Blood Moon","The Hunt for the Hydra","The Oracle's Prophecy","The Lost City of the Desert Dunes","The Nightmare of the Netherworld","The Forbidden Isle of the Storm Giant","The Treachery of the Dwarven Mines","The Enchantment of the Silver Lake","The War of the Elemental Princes","The Ghost Fleet of the Abyss","The Sorcerer's Secret Sanctum","The Peril of the Poisoned Chalice","The Quest for the Dragon's Heart","The Omen of the Obsidian Tower","The Wrath of the Eldritch Horror","The Harvest of the Haunted Orchard","The Lich's Last Stand","The Awakening of the Sleeping Mountain","The Plague of the Shadowfell","The Jewel of the Jungle King","The Invasion of the Iron Legion","The Mystery of the Moonlit Grove","The Dark Ritual of the Necropolis","The Conclave of the Arcane Order","The Mirage of the Desert Oasis","The Guardian of the Golden Fleece","The Siege of the Celestial Citadel","The Quest for the Crystal Skull","The Rebellion of the Fire Elementals","The Voyage to the Edge of the World","The Return of the Ancient Dragon","The Theft of the Sacred Scepter","The Trial of the Champions","The Pact of the Demon Prince","The Lost Legend of the Silver Sword","The Hunt for the Vampire's Crypt","The Battle of the Sky Pirates","The Ghostly Gallows of the Damned","The Oracle of the Starry Skies","The Awakening of the Stone Giants","The Secret of the Shadowy Depths","The Betrayal of the Royal Court","The Expedition to the Hollow Earth","The Wrath of the Winter Witch","The Curse of the Emerald Eye","The Siege of the Underdark","The Hunt for the Kraken's Lair","The Rescue from the Goblin's Dungeon","The Labyrinth of the Lost Souls","The Disappearance of the Arcane Academy","The Trial by Fire and Ice","The Riddle of the Sphinx's Tomb","The Terror of the Troll King","The Escape from the Enchanted Tower","The Quest for the Phoenix Feather","The Shadow Over the Silver City","The Nightmare of the Nocturnal Forest","The Secret of the Sphinx's Riddle","The Enigma of the Elemental Eye","The Haunting of the Haunted Mansion","The Journey to the Center of the Earth","The Curse of the Crystal Cavern","The Quest for the Golden Dragon","The Secret of the Starlight Grotto","The Plague of the Dark Druids","The Hunt for the Lost Paladin","The Siege of the Serpent's Spire","The Lost Treasures of the Sunken Ship","The Awakening of the Forgotten Gods","The Battle for the Throne of Bones","The Secret of the Sunken Pyramid","The Festival of the Fire Spirits","The Enigma of the Emerald Enclave","The Hunt for the Horned Serpent","The Lost Labyrinth of the Lich Lord","The Ruins of the Ravenous Sphinx","The Ghosts of the Gilded Graveyard","The Curse of the Crystal Dragon","The Siege of the Sapphire City","The Riddle of the Ruby Rose","The Trial of the Thunder Titan","The Wrath of the Winter Wyrm","The Vault of the Voidwalker","The Plague of the Petrified Forest","The Haunting of the Harpy's Haven","The Lair of the Leviathan","The Oracle of the Obsidian Obelisk","The Treasure of the Tidal Temple","The Enchantment of the Eternal Elixir","The Challenge of the Chained Chimeras","The Rebellion of the Runebound Realm","The Nightmare of the Naga Nests","The Secret of the Silver Sarcophagus","The Lost Legacy of the Lunar Lich","The Siege of the Storm Sorcerer's Sanctum","The Quest for the Quicksilver Quill","The Festival of the Frozen Flame","The Awakening of the Ancient Archmage","The Riddle of the Radiant Relic","The Caverns of the Chaos Cult","The Terror of the Twilight Tower","The Hunt for the Hydra's Heart","The Crypt of the Crimson Crown","The Mirage of the Moonlit Mesa","The Enigma of the Enchanted Estate","The Plague of the Primeval Plains","The Mystery of the Mystic Maelstrom","The Rebellion of the Rock Ridge Raiders","The Secret of the Sunfire Sanctuary","The Trial of the Tempest Titan","The Heist of the Heavenly Harp","The Curse of the Celestial Chalice","The Labyrinth of the Lightning Lord","The Assault on the Abyssal Altar","The Quest for the Queen's Quartz","The Wrath of the Warlock's Wraiths","The Enchantment of the Eternal Ember","The Nightmare of the Necromancer's Nook","The Siege of the Sapphire Spire","The Riddle of the Rose Quartz","The Trial of the Twilight Tribunal","The Hunt for the Hollow Hydra","The Crypt of the Crystal Centaur","The Mirage of the Moonstone Monastery","The Enigma of the Enchanted Emerald","The Plague of the Petrified Palace","The Mystery of the Mystic Mirage","The Rebellion of the Rune Raiders","The Secret of the Sunken Sarcophagus","The Trial of the Thunder Throne","The Heist of the Heavenly Horizon","The Curse of the Celestial Comet","The Labyrinth of the Lunar Leviathan","The Assault on the Abyssal Aerie","The Quest for the Queen's Quiver","The Wrath of the Warlock's Wyvern","The Enchantment of the Emerald Eye","The Nightmare of the Netherworld Nexus","The Siege of the Starlight Spire","The Riddle of the Ruby Ring","The Trial of the Tempest Temple","The Hunt for the Haunted Hydra","The Crypt of the Crimson Chimera","The Mirage of the Moonlit Mountain","The Enigma of the Eternal Echelon","The Plague of the Primeval Pyramid","The Mystery of the Mystic Mace","The Rebellion of the Runic Raptor","The Secret of the Sunken Sphinx","The Trial of the Thunder Typhoon","The Heist of the Heavenly Haven","The Curse of the Cosmic Crown","The Labyrinth of the Lunar Lagoon","The Assault on the Arcane Archipelago","The Quest for the Queen's Quasar","The Wrath of the Warlock's Whirlwind","The Enchantment of the Ethereal Eye","The Nightmare of the Netherworld Nymph","The Siege of the Starfall Sanctuary","The Riddle of the Rosewood Relic","The Trial of the Tempest Tyrant","The Hunt for the Helios Hydra","The Crypt of the Celestial Centaur","The Mirage of the Misty Mesa","The Enigma of the Enchanted Elixir","The Plague of the Perilous Pyramid","The Mystery of the Mystic Meteor","The Rebellion of the Rune Revenant","The Secret of the Sunken Statue","The Trial of the Thunderous Titan","The Enigma of the Eternal Eclipse","The Guardian's Gambit","The Gilded Gargoyle's Gauntlet","The Forbidden Fortress's Feud","The Lost Library of the Luminous Lord","The Caverns of the Crimson Cult","The Siege of the Sapphire Sanctum","The Ghosts of the Gloomwood Grove","The Fire Fiend's Folly","The Curse of the Celestial Cyclops","The Rite of the Raging Revenant","The Lost Lagoon of the Leviathan","The Hidden Havens of the Hollow Hills","The Crypts of the Cursed Conclave","The Tower of the Twilight Tyrant","The Phantom Phoenix's Plight","The Sunken Spires of the Silent Sea","The Desert of the Dwindling Dream","The Ice Imp's Icy Incursion","The Valley of the Vanishing Vortex","The Maze of the Mystic Minotaur","The Haunting of the Hollowed Halls","The Wrath of the Withered Wraith","The Heist of the Hallowed Helm","The Tomb of the Twisted Tempest","The Beast in the Blackened Brine","The Secret of the Stone Sentinel","The Siege of the Shadowed Spires","The Lair of the Lurking Lycanthrope","The Festival of the Fiery Fates","The Night of the Nefarious Necromancer","The Hunt for the Hidden Hydra","The Oracle's Ominous Offering","The Lost Legend of the Luminous Lagoon","The Nightmare of the Nether Naiad","The Forbidden Fountain of the Forsaken Forest","The Treachery of the Tumultuous Tides","The Enchantment of the Enshrouded Enclave","The War of the Wandering Warlocks","The Ghostly Gale of the Grim Galleon","The Sorcerer's Secret Sanctum","The Peril of the Prismatic Prism","The Quest for the Quivering Quasar","The Omen of the Opaque Oracle","The Wrath of the Wicked Warlord","The Harvest of the Haunting Harbinger","The Lich's Lurid Legacy","The Awakening of the Abyssal Archon","The Plague of the Petrifying Plague","The Jewel of the Jaded Juggernaut","The Invasion of the Ironclad Imposters","The Mystery of the Moonlit Mirages","The Dark Ritual of the Drowned Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Monolith","The Guardian of the Glowing Grotto","The Siege of the Shimmering Shrine","The Quest for the Quantum Quill","The Rebellion of the Radiant Raiders","The Voyage to the Veiled Vortex","The Return of the Risen Reaver","The Theft of the Timeless Tome","The Trial of the Tempestuous Titans","The Pact of the Perfidious Prince","The Lost Lore of the Languishing Land","The Hunt for the Harrowing Haunt","The Battle of the Baleful Brigands","The Ghostly Guise of the Ghastly Ghouls","The Oracle of the Ominous Oasis","The Awakening of the Ancient Anomaly","The Secret of the Sunken Shadows","The Betrayal of the Blazing Bastion","The Expedition to the Ethereal Expanse","The Wrath of the Withering Witch","The Curse of the Crimson Comet","The Siege of the Subterranean Stronghold","The Hunt for the Horrid Hydra","The Rescue from the Ravenous Raptor","The Labyrinth of the Lost Legion","The Disappearance of the Dimensional Druid","The Trial by the Thunderous Tempest","The Riddle of the Resonating Rune","The Terror of the Tyrannical Titan","The Escape from the Ensnaring Enclave","The Quest for the Quixotic Quetzalcoatl","The Shadow Over the Shrouded Sanctuary","The Nightmare of the Numinous Nymph","The Secret of the Sacred Seraphim","The Enigma of the Ethereal Eye","The Haunting of the Hallowed Hallows","The Journey to the Juxtaposed Jester","The Curse of the Cryptic Crypt","The Quest for the Quintessential Quagmire","The Secret of the Starlit Sanctum","The Plague of the Pernicious Pixies","The Hunt for the Haunting Harpy","The Siege of the Spectral Spire","The Lost Treasures of the Tumultuous Tides","The Awakening of the Arcane Archmage","The Battle for the Baleful Blade","The Enigma of the Eclipsed Empyrean","The Guardian's Gruesome Game","The Gilded Grotto's Gambit","The Forbidden Fortress's Fable","The Lost Legacy of the Lurid Lich","The Caverns of the Creeping Chimaera","The Siege of the Shrouded Sanctum","The Ghosts of the Grieving Grove","The Fire Fiend's Fable","The Curse of the Cosmic Cyclops","The Rite of the Raging Revenant","The Lost Lighthouse of the Leviathan","The Hidden Havens of the Haunted Hills","The Crypts of the Cursed Cabal","The Tower of the Tenebrous Tyrant","The Phantom Phoenix's Plight","The Sunken Spires of the Silent Sea","The Desert of the Dwindling Dream","The Ice Imp's Icy Incursion","The Valley of the Vanishing Vortex","The Maze of the Mystic Minotaur","The Haunting of the Hollowed Halls","The Wrath of the Withered Wraith","The Heist of the Hallowed Helm","The Tomb of the Twisted Tempest","The Beast in the Blackened Brine","The Secret of the Stone Sentinel","The Siege of the Shadowed Spires","The Lair of the Lurking Lycanthrope","The Festival of the Fiery Fates","The Night of the Nefarious Necromancer","The Hunt for the Hidden Hydra","The Oracle's Ominous Offering","The Lost Legend of the Luminous Lagoon","The Nightmare of the Nether Naiad","The Forbidden Fountain of the Forsaken Forest","The Treachery of the Tumultuous Tides","The Enchantment of the Enshrouded Enclave","The War of the Wandering Warlocks","The Ghostly Gale of the Grim Galleon","The Sorcerer's Secret Sanctum","The Peril of the Prismatic Prism","The Quest for the Quivering Quasar","The Omen of the Opaque Oracle","The Wrath of the Wicked Warlord","The Harvest of the Haunting Harbinger","The Lich's Lurid Legacy","The Awakening of the Abyssal Archon","The Plague of the Petrifying Plague","The Jewel of the Jaded Juggernaut","The Invasion of the Ironclad Imposters","The Mystery of the Moonlit Mirages","The Dark Ritual of the Drowned Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Monolith","The Guardian of the Glowing Grotto","The Siege of the Shimmering Shrine","The Quest for the Quantum Quill","The Rebellion of the Radiant Raiders","The Voyage to the Veiled Vortex","The Return of the Risen Reaver","The Theft of the Timeless Tome","The Trial of the Tempestuous Titans","The Pact of the Perfidious Prince","The Lost Lore of the Languishing Land","The Hunt for the Harrowing Haunt","The Battle of the Baleful Brigands","The Ghostly Guise of the Ghastly Ghouls","The Oracle of the Ominous Oasis","The Awakening of the Ancient Anomaly","The Secret of the Sunken Shadows","The Betrayal of the Blazing Bastion","The Expedition to the Ethereal Expanse","The Wrath of the Withering Witch","The Curse of the Crimson Comet","The Siege of the Subterranean Stronghold","The Hunt for the Horrid Hydra","The Rescue from the Ravenous Raptor","The Labyrinth of the Lost Legion","The Disappearance of the Dimensional Druid","The Trial by the Thunderous Tempest","The Riddle of the Resonating Rune","The Terror of the Tyrannical Titan","The Escape from the Ensnaring Enclave","The Quest for the Quixotic Quetzalcoatl","The Shadow Over the Shrouded Sanctuary","The Nightmare of the Numinous Nymph","The Secret of the Sacred Seraphim","The Enigma of the Ethereal Eye","The Haunting of the Hallowed Hallows","The Journey to the Juxtaposed Jester","The Curse of the Cryptic Crypt","The Quest for the Quintessential Quagmire","The Secret of the Starlit Sanctum","The Plague of the Pernicious Pixies","The Hunt for the Haunting Harpy","The Siege of the Spectral Spire","The Lost Treasures of the Tumultuous Tides","The Awakening of the Arcane Archmage","The Battle for the Baleful Blade","The Eclipse of the Enchanted Emissary","The Guardian's Grimoire","The Gilded Griffin's Gambit","The Forbidden Fountain's Fury","The Lost Labyrinth of the Lunar Lynx","The Caverns of the Crimson Crown","The Siege of the Starlight Shrine","The Ghosts of the Glistening Glade","The Fire Fissure's Fortune","The Curse of the Crystal Chimera","The Rite of the Roaring Rampart","The Lost Lake of the Luminous Leviathan","The Hidden Haven of the Hallowed Hills","The Crypts of the Cursed Cavalry","The Tower of the Tumultuous Tempest","The Phantom Phoenix's Parade","The Sunken Stones of the Silent Sea","The Desert of the Dancing Dunes","The Ice Idol's Intrigue","The Valley of the Vanquished Vampires","The Maze of the Moonlight Minotaur","The Haunting of the Hollowed Hearth","The Wrath of the Wandering Wisp","The Heist of the Haunted Helm","The Tomb of the Tainted Tempest","The Beast in the Baleful Bog","The Secret of the Silent Sentinel","The Siege of the Shadowed Sanctum","The Lair of the Lethal Lycanthrope","The Festival of the Flickering Flames","The Night of the Nocturnal Nymphs","The Hunt for the Hidden Harpy","The Oracle's Ominous Oath","The Lost Legend of the Lustrous Lagoon","The Nightmare of the Nefarious Naiad","The Forbidden Fountain of the Forsaken Fey","The Treachery of the Tidal Titan","The Enchantment of the Eldritch Enclave","The War of the Wicked Warlords","The Ghostly Galleon of the Grim Grimoire","The Sorcerer's Secret Stronghold","The Peril of the Prismatic Pyramid","The Quest for the Quaking Quill","The Omen of the Obsidian Oracle","The Wrath of the Wrathful Warlock","The Harvest of the Haunting Hydra","The Lich's Lost Legacy","The Awakening of the Abyssal Avenger","The Plague of the Petrified Pagoda","The Jewel of the Jinxed Juggernaut","The Invasion of the Illusory Imposters","The Mystery of the Moonlit Mirage","The Dark Ritual of the Desolate Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Maze","The Guardian of the Glacial Grotto","The Siege of the Shining Spire","The Quest for the Quantum Quasar","The Rebellion of the Radiant Renegades","The Voyage to the Vengeful Vortex","The Return of the Rancorous Reaver","The Theft of the Timeless Tiara","The Trial of the Thunderous Titans","The Pact of the Perilous Prince","The Lost Lore of the Lurking Leviathan","The Hunt for the Haunting Harbinger","The Battle of the Baleful Brutes","The Ghostly Guise of the Ghastly Gargoyle","The Oracle of the Ominous Oubliette","The Awakening of the Ancient Apparition","The Secret of the Submerged Shadows","The Betrayal of the Burning Bastion","The Expedition to the Ethereal Eyrie","The Wrath of the Withered Warlock","The Curse of the Crimson Comet","The Siege of the Sunken Stronghold","The Hunt for the Horrifying Hydra","The Rescue from the Ravenous Ramparts","The Labyrinth of the Lost Legionnaire","The Disappearance of the Dimensional Druid","The Trial by the Thunderous Tempest","The Riddle of the Resplendent Rune","The Terror of the Tyrannical Titan","The Escape from the Enchanted Enclave","The Quest for the Quixotic Quetzalcoatl","The Shadow Over the Shrouded Sanctuary","The Nightmare of the Numinous Nymph","The Secret of the Sacred Sarcophagus","The Enigma of the Ethereal Eye","The Haunting of the Hallowed Hall","The Journey to the Jovial Jester","The Curse of the Cryptic Crypt","The Quest for the Quintessential Quagmire","The Secret of the Starlit Sanctuary","The Plague of the Pernicious Pixies","The Hunt for the Haunting Harpy","The Siege of the Spectral Spire","The Lost Treasures of the Tempestuous Tides","The Awakening of the Arcane Archmage","The Battle for the Baleful Blade","The Eclipse of the Enchanted Emissary","The Guardian's Grimoire","The Gilded Griffin's Gambit","The Forbidden Fountain's Fury","The Lost Labyrinth of the Lunar Lynx","The Caverns of the Crimson Crown","The Siege of the Starlight Shrine","The Ghosts of the Glistening Glade","The Fire Fissure's Fortune","The Curse of the Crystal Chimera","The Rite of the Roaring Rampart","The Lost Lake of the Luminous Leviathan","The Hidden Haven of the Hallowed Hills","The Crypts of the Cursed Cavalry","The Tower of the Tumultuous Tempest","The Phantom Phoenix's Parade","The Sunken Stones of the Silent Sea","The Desert of the Dancing Dunes","The Ice Idol's Intrigue","The Valley of the Vanquished Vampires","The Maze of the Moonlight Minotaur","The Haunting of the Hollowed Hearth","The Wrath of the Wandering Wisp","The Heist of the Haunted Helm","The Tomb of the Tainted Tempest","The Beast in the Baleful Bog","The Secret of the Silent Sentinel","The Siege of the Shadowed Sanctum","The Lair of the Lethal Lycanthrope","The Festival of the Flickering Flames","The Night of the Nocturnal Nymphs","The Hunt for the Hidden Harpy","The Oracle's Ominous Oath","The Lost Legend of the Lustrous Lagoon","The Nightmare of the Nefarious Naiad","The Forbidden Fountain of the Forsaken Fey","The Treachery of the Tidal Titan","The Enchantment of the Eldritch Enclave","The War of the Wicked Warlords","The Ghostly Galleon of the Grim Grimoire","The Sorcerer's Secret Stronghold","The Peril of the Prismatic Pyramid","The Quest for the Quaking Quill","The Omen of the Obsidian Oracle","The Wrath of the Wrathful Warlock","The Harvest of the Haunting Hydra","The Lich's Lost Legacy","The Awakening of the Abyssal Avenger","The Plague of the Petrified Pagoda","The Jewel of the Jinxed Juggernaut","The Invasion of the Illusory Imposters","The Mystery of the Moonlit Mirage","The Dark Ritual of the Desolate Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Maze","The Guardian of the Glacial Grotto","The Siege of the Shining Spire","The Quest for the Quantum Quasar","The Rebellion of the Radiant Renegades","The Voyage to the Vengeful Vortex","The Return of the Rancorous Reaver","The Theft of the Timeless Tiara","The Trial of the Thunderous Titans","The Pact of the Perilous Prince","The Lost Lore of the Lurking Leviathan","The Hunt for the Haunting Harbinger","The Battle of the Baleful Brutes","The Ghostly Guise of the Ghastly Gargoyle","The Oracle of the Ominous Oubliette","The Awakening of the Ancient Apparition","The Secret of the Submerged Shadows","The Betrayal of the Burning Bastion","The Expedition to the Ethereal Eyrie","The Wrath of the Withered Warlock","The Curse of the Crimson Comet","The Siege of the Sunken Stronghold","The Hunt for the Horrifying Hydra","The Rescue from the Ravenous Ramparts","The Labyrinth of the Lost Legionnaire","The Disappearance of the Dimensional Druid","The Trial by the Thunderous Tempest","The Riddle of the Resplendent Rune","The Terror of the Tyrannical Titan","The Escape from the Enchanted Enclave","The Quest for the Quixotic Quetzalcoatl","The Shadow Over the Shrouded Sanctuary","The Nightmare of the Numinous Nymph","The Secret of the Sacred Sarcophagus","The Enigma of the Ethereal Eye","The Haunting of the Hallowed Hall","The Journey to the Jovial Jester","The Curse of the Cryptic Crypt","The Quest for the Quintessential Quagmire","The Secret of the Starlit Sanctuary","The Plague of the Pernicious Pixies","The Hunt for the Haunting Harpy","The Siege of the Spectral Spire","The Lost Treasures of the Tempestuous Tides","The Awakening of the Arcane Archmage","The Battle for the Baleful Blade","The Enigma of the Emerald Eye","The Guardian's Glade","The Gilded Golem's Gambit","The Forbidden Forest's Foe","The Lost Legacy of the Labyrinthine Lord","The Caverns of the Crystal Chalice","The Siege of the Sunken Sanctuary","The Ghosts of the Grimwood Grove","The Fire Forge's Folly","The Curse of the Crowned Cobra","The Rite of the Ravenous Rift","The Lost Lighthouse of the Leviathan","The Hidden Hamlet of the Hallowed Hills","The Crypts of the Condemned Cavalry","The Tower of the Tenebrous Tempest","The Phantom Parade of the Phoenix","The Sunken Spires of the Silent Sea","The Desert of the Dreaming Dunes","The Ice Imp's Intrigue","The Valley of the Vanished Vampires","The Maze of the Mystic Minotaur","The Haunting of the Hallowed Hearth","The Wrath of the Wandering Wisp","The Heist of the Haunted Helm","The Tomb of the Tainted Tempest","The Beast in the Baleful Bog","The Secret of the Silent Sentinel","The Siege of the Shadowed Sanctum","The Lair of the Lethal Lycanthrope","The Festival of the Flickering Flames","The Night of the Nocturnal Nymphs","The Hunt for the Hidden Harpy","The Oracle's Ominous Oath","The Lost Legend of the Lustrous Lagoon","The Nightmare of the Nefarious Naiad","The Forbidden Fountain of the Forsaken Fey","The Treachery of the Tidal Titan","The Enchantment of the Eldritch Enclave","The War of the Wicked Warlords","The Ghostly Galleon of the Grim Grimoire","The Sorcerer's Secret Stronghold","The Peril of the Prismatic Pyramid","The Quest for the Quaking Quill","The Omen of the Obsidian Oracle","The Wrath of the Wrathful Warlock","The Harvest of the Haunting Hydra","The Lich's Lost Legacy","The Awakening of the Abyssal Avenger","The Plague of the Petrified Pagoda","The Jewel of the Jinxed Juggernaut","The Invasion of the Illusory Imposters","The Mystery of the Moonlit Mirage","The Dark Ritual of the Desolate Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Maze","The Guardian of the Glacial Grotto","The Siege of the Shining Spire","The Quest for the Quantum Quasar","The Rebellion of the Radiant Renegades","The Voyage to the Vengeful Vortex","The Return of the Rancorous Reaver","The Theft of the Timeless Tiara","The Trial of the Thunderous Titans","The Pact of the Perilous Prince","The Lost Lore of the Lurking Leviathan","The Hunt for the Haunting Harbinger","The Battle of the Baleful Brutes","The Ghostly Guise of the Ghastly Gargoyle","The Oracle of the Ominous Oubliette","The Awakening of the Ancient Apparition","The Secret of the Submerged Shadows","The Betrayal of the Burning Bastion","The Expedition to the Ethereal Eyrie","The Wrath of the Withered Warlock","The Curse of the Crimson Comet","The Siege of the Sunken Stronghold","The Hunt for the Horrifying Hydra","The Rescue from the Ravenous Ramparts","The Labyrinth of the Lost Legionnaire","The Disappearance of the Dimensional Druid","The Trial by the Thunderous Tempest","The Riddle of the Resplendent Rune","The Terror of the Tyrannical Titan","The Escape from the Enchanted Enclave","The Quest for the Quixotic Quetzalcoatl","The Shadow Over the Shrouded Sanctuary","The Nightmare of the Numinous Nymph","The Secret of the Sacred Sarcophagus","The Enigma of the Ethereal Eye","The Haunting of the Hallowed Hall","The Journey to the Jovial Jester","The Curse of the Cryptic Crypt","The Quest for the Quintessential Quagmire","The Secret of the Starlit Sanctuary","The Plague of the Pernicious Pixies","The Hunt for the Haunting Harpy","The Siege of the Spectral Spire","The Lost Treasures of the Tempestuous Tides","The Awakening of the Arcane Archmage","The Battle for the Baleful Blade","The Enigma of the Emerald Eye","The Guardian's Glade","The Gilded Golem's Gambit","The Forbidden Forest's Foe","The Lost Legacy of the Labyrinthine Lord","The Caverns of the Crystal Chalice","The Siege of the Sunken Sanctuary","The Ghosts of the Grimwood Grove","The Fire Forge's Folly","The Curse of the Crowned Cobra","The Rite of the Ravenous Rift","The Lost Lighthouse of the Leviathan","The Hidden Hamlet of the Hallowed Hills","The Crypts of the Condemned Cavalry","The Tower of the Tenebrous Tempest","The Phantom Parade of the Phoenix","The Sunken Spires of the Silent Sea","The Desert of the Dreaming Dunes","The Ice Idol's Intrigue","The Valley of the Vanished Vampires","The Maze of the Mystic Minotaur","The Haunting of the Hallowed Hearth","The Wrath of the Wandering Wisp","The Heist of the Haunted Helm","The Tomb of the Tainted Tempest","The Beast in the Baleful Bog","The Secret of the Silent Sentinel","The Siege of the Shadowed Sanctum","The Lair of the Lethal Lycanthrope","The Festival of the Flickering Flames","The Night of the Nocturnal Nymphs","The Hunt for the Hidden Harpy","The Oracle's Ominous Oath","The Lost Legend of the Lustrous Lagoon","The Nightmare of the Nefarious Naiad","The Forbidden Fountain of the Forsaken Fey","The Treachery of the Tidal Titan","The Enchantment of the Eldritch Enclave","The War of the Wicked Warlords","The Ghostly Galleon of the Grim Grimoire","The Sorcerer's Secret Stronghold","The Peril of the Prismatic Pyramid","The Quest for the Quaking Quill","The Omen of the Obsidian Oracle","The Wrath of the Wrathful Warlock","The Harvest of the Haunting Hydra","The Lich's Lost Legacy","The Awakening of the Abyssal Avenger","The Plague of the Petrified Pagoda","The Jewel of the Jinxed Juggernaut","The Invasion of the Illusory Imposters","The Mystery of the Moonlit Mirage","The Dark Ritual of the Desolate Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Maze","The Guardian of the Glacial Grotto","The Siege of the Shining Spire","The Quest for the Quantum Quasar","The Rebellion of the Radiant Renegades","The Voyage to the Vengeful Vortex","The Return of the Rancorous Reaver","The Theft of the Timeless Tiara","The Trial of the Thunderous Titans","The Pact of the Perilous Prince","The Lost Lore of the Lurking Leviathan","The Hunt for the Haunting Harbinger","The Battle of the Baleful Brutes","The Ghostly Guise of the Ghastly Gargoyle","The Oracle of the Ominous Oubliette","The Awakening of the Ancient Apparition","The Secret of the Submerged Shadows","The Betrayal of the Burning Bastion","The Expedition to the Ethereal Eyrie","The Wrath of the Withered Warlock","The Curse of the Crimson Comet","The Siege of the Sunken Stronghold","The Hunt for the Horrifying Hydra","The Rescue from the Ravenous Ramparts","The Labyrinth of the Lost Legionnaire","The Disappearance of the Dimensional Druid","The Trial by the Thunderous Tempest","The Riddle of the Resplendent Rune","The Terror of the Tyrannical Titan","The Escape from the Enchanted Enclave","The Quest for the Quixotic Quetzalcoatl","The Shadow Over the Shrouded Sanctuary","The Nightmare of the Numinous Nymph","The Secret of the Sacred Sarcophagus","The Enigma of the Ethereal Eye","The Haunting of the Hallowed Hall","The Journey to the Jovial Jester","The Curse of the Cryptic Crypt","The Quest for the Quintessential Quagmire","The Secret of the Starlit Sanctuary","The Plague of the Pernicious Pixies","The Hunt for the Haunting Harpy","The Siege of the Spectral Spire","The Lost Treasures of the Tempestuous Tides","The Awakening of the Arcane Archmage","The Battle for the Baleful Blade","The Enigma of the Emerald Eye","The Guardian's Glade","The Gilded Golem's Gambit","The Forbidden Forest's Foe","The Lost Legacy of the Labyrinthine Lord","The Caverns of the Crystal Chalice","The Siege of the Sunken Sanctuary","The Ghosts of the Grimwood Grove","The Fire Forge's Folly","The Curse of the Crowned Cobra","The Rite of the Ravenous Rift","The Lost Lighthouse of the Leviathan","The Hidden Hamlet of the Hallowed Hills","The Crypts of the Condemned Cavalry","The Tower of the Tenebrous Tempest","The Phantom Parade of the Phoenix","The Sunken Spires of the Silent Sea","The Desert of the Dreaming Dunes","The Ice Idol's Intrigue","The Valley of the Vanished Vampires","The Maze of the Mystic Minotaur","The Haunting of the Hallowed Hearth","The Wrath of the Wandering Wisp","The Heist of the Haunted Helm","The Tomb of the Tainted Tempest","The Beast in the Baleful Bog","The Secret of the Silent Sentinel","The Siege of the Shadowed Sanctum","The Lair of the Lethal Lycanthrope","The Festival of the Flickering Flames","The Night of the Nocturnal Nymphs","The Hunt for the Hidden Harpy","The Oracle's Ominous Oath","The Lost Legend of the Lustrous Lagoon","The Nightmare of the Nefarious Naiad","The Forbidden Fountain of the Forsaken Fey","The Treachery of the Tidal Titan","The Enchantment of the Eldritch Enclave","The War of the Wicked Warlords","The Ghostly Galleon of the Grim Grimoire","The Sorcerer's Secret Stronghold","The Peril of the Prismatic Pyramid","The Quest for the Quaking Quill","The Omen of the Obsidian Oracle","The Wrath of the Wrathful Warlock","The Harvest of the Haunting Hydra","The Lich's Lost Legacy","The Awakening of the Abyssal Avenger","The Plague of the Petrified Pagoda","The Jewel of the Jinxed Juggernaut","The Invasion of the Illusory Imposters","The Mystery of the Moonlit Mirage","The Dark Ritual of the Desolate Demon","The Conclave of the Celestial Circle","The Mirage of the Mysterious Maze","The Guardian of the Glacial Grotto","The Siege of the Shining Spire","The Quest for the Quantum Quasar","The Rebellion of the Radiant Renegades","The Voyage to the Vengeful Vortex","The Return of the Rancorous Reaver","The Theft of the Timeless Tiara","The Trial of the Thunderous Titans","The Pact of the Perilous Prince","The Lost Lore of the Lurking Leviathan","The Hunt for the Haunting Harbinger","The Battle of the Baleful Brutes","The Ghostly Guise of the Ghastly Gargoyle","The Oracle of the Ominous Oubliette","The Awakening of the Ancient Apparition","The Mystery of the Mystic Monolith","The Gloom of the Ghostly Galleon","The Secret of the Sunken Sphinx","The Quest for the Quicksilver Queen","The Wrath of the Wicked Warlock","The Plague of the Petrified Palace","The Rebellion of the Runic Revenant","The Enigma of the Ethereal Emissary","The Siege of the Sunfire Sanctum","The Labyrinth of the Lost Leviathan","The Heist of the Heavenly Horizon","The Omen of the Obsidian Obelisk","The Riddle of the Radiant Relic","The Curse of the Celestial Chalice","The Haunting of the Harpy's Haven","The Guardian of the Golden Grotto","The Voyage to the Vanishing Vortex","The Awakening of the Ancient Archon","The Crypt of the Crimson Crown","The Hunt for the Hydra's Heart","The Trial of the Tempest Tower","The Festival of the Frozen Flame","The Nightmare in the Netherworld","The Treasure of the Tidal Temple","The Enchantment of the Emerald Eye","The Secret of the Silver Sarcophagus","The Challenge of the Chained Chimeras","The Siege of the Serpent's Spire","The Rite of the Radiant Rune","The Plight of the Phantom Phoenix"];var OQ=function(){var e=u_().state,n=ut((0,a.useState)((null===e||void 0===e?void 0:e.step)||0),2),r=n[0],o=n[1],i=CQ().submitQuest,l=uL({initialValues:{name:function(){var e=EQ;return e[Math.floor(Math.random()*e.length)]}(),tome:null,params:[],beacons:(null===e||void 0===e?void 0:e.beacons)||[]},onSubmit:function(e){return i(e)}});return(0,t.jsx)("form",{id:"create-quest-form",className:"py-6",children:(0,t.jsxs)("div",{className:"grid grid-cols-12",children:[(0,t.jsx)("div",{className:"hidden md:flex col-span-3",children:(0,t.jsx)(wL,{currStep:r,steps:[{name:"Select agent beacons",description:"Step 1",href:"#",step:0},{name:"Select a tome",description:"Step 2",href:"#",step:1},{name:"Confirm quest details",description:"Step 3",href:"#",step:2}]})}),(0,t.jsx)("div",{className:"col-span-12 md:col-span-9",children:function(e){switch(e){case 0:return(0,t.jsx)(TQ,{setCurrStep:o,formik:l});case 1:return(0,t.jsx)(RV,{setCurrStep:o,formik:l});case 2:return(0,t.jsx)(BV,{setCurrStep:o,formik:l});default:return(0,t.jsx)("div",{children:"An error has occured"})}}(r)})]})})},jQ=function(){return(0,t.jsx)(q_,{type:G_.noData,label:"No beacons found",details:"Get started by deploying an imix agent on your target system.",children:(0,t.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md bg-purple-700 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-purple-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-purple-700",onClick:function(){return window.open("https://docs.realm.pub/user-guide/getting-started#start-the-agent","_blank")},children:"See imix docs"})})},PQ=function(){var e,n=(0,a.useContext)(ZA),r=n.data,o=n.isLoading,i=n.error;return(0,t.jsxs)(Sj,{currNavItem:GC.createQuest,children:[(0,t.jsx)("div",{className:"border-b border-gray-200 pb-6 sm:flex sm:items-center sm:justify-between",children:(0,t.jsx)("h3",{className:"text-xl font-semibold leading-6 text-gray-900",children:"Create new quest"})}),o?(0,t.jsx)(q_,{type:G_.loading,label:"loading beacon info..."}):i?(0,t.jsx)(q_,{type:G_.error,label:"Error loading beacon info"}):null!==r&&void 0!==r&&r.beacons&&(null===r||void 0===r||null===(e=r.beacons)||void 0===e?void 0:e.length)>0?(0,t.jsx)(OQ,{}):(0,t.jsx)(jQ,{})]})},AQ=_j({displayName:"RepeatClockIcon",path:(0,t.jsxs)("g",{fill:"currentColor",children:[(0,t.jsx)("path",{d:"M12.965,6a1,1,0,0,0-1,1v5.5a1,1,0,0,0,1,1h5a1,1,0,0,0,0-2h-3.75a.25.25,0,0,1-.25-.25V7A1,1,0,0,0,12.965,6Z"}),(0,t.jsx)("path",{d:"M12.567,1.258A10.822,10.822,0,0,0,2.818,8.4a.25.25,0,0,1-.271.163L.858,8.309a.514.514,0,0,0-.485.213.5.5,0,0,0-.021.53l2.679,4.7a.5.5,0,0,0,.786.107l3.77-3.746a.5.5,0,0,0-.279-.85L5.593,9.007a.25.25,0,0,1-.192-.35,8.259,8.259,0,1,1,7.866,11.59,1.25,1.25,0,0,0,.045,2.5h.047a10.751,10.751,0,1,0-.792-21.487Z"})]})}),RQ=_j({displayName:"TimeIcon",path:(0,t.jsxs)("g",{fill:"currentColor",children:[(0,t.jsx)("path",{d:"M12,0A12,12,0,1,0,24,12,12.014,12.014,0,0,0,12,0Zm0,22A10,10,0,1,1,22,12,10.011,10.011,0,0,1,12,22Z"}),(0,t.jsx)("path",{d:"M17.134,15.81,12.5,11.561V6.5a1,1,0,0,0-2,0V12a1,1,0,0,0,.324.738l4.959,4.545a1.01,1.01,0,0,0,1.413-.061A1,1,0,0,0,17.134,15.81Z"})]})}),IQ=n(1774),MQ=function(e){var n=e.task;return n.execFinishedAt?(0,t.jsx)("div",{children:(0,t.jsx)(lP,{fontSize:"0.8em",size:"large",colorScheme:"green",variant:"solid",children:(0,t.jsxs)("div",{className:"flex flex-row gap-1 justify-center items-center p-1",children:[(0,t.jsx)(IQ,{className:"w-5",color:"white"}),(0,t.jsx)("div",{children:"Finished"})]})})}):n.execStartedAt?(0,t.jsx)("div",{children:(0,t.jsx)(lP,{fontSize:"0.8em",size:"large",colorScheme:"gray",variant:"outline",children:(0,t.jsxs)("div",{className:"flex flex-row gap-1 justify-center items-center p-1",children:[(0,t.jsx)(AQ,{w:4,h:4,color:"gray"}),(0,t.jsx)("div",{children:"In-Progress"})]})})}):(0,t.jsx)("div",{children:(0,t.jsx)(lP,{fontSize:"0.8em",size:"large",colorScheme:"gray",variant:"outline",children:(0,t.jsxs)("div",{className:"flex flex-row gap-1 justify-center items-center p-1",children:[(0,t.jsx)(RQ,{w:4,h:4,color:"gray"}),(0,t.jsx)("div",{children:"Queued"})]})})})},DQ=function(e){var n=e.tome,r=e.params,o=e.paramKeys;return(0,t.jsx)(NF,{allowToggle:!0,className:"w-full",children:(0,t.jsxs)(FF,{children:[(0,t.jsx)("h2",{children:(0,t.jsx)(zF,{children:(0,t.jsxs)("div",{className:"flex flex-row gap-2 w-full items-center",children:[(0,t.jsxs)(HF,{as:"div",flex:"1",textAlign:"left",className:"flex flex-col w-full gap-1",children:[(0,t.jsx)("div",{className:"items-center font-medium text-gray-900",children:n.name}),(0,t.jsxs)("div",{className:"flex flex-col gap- w-full text-sm text-gray-600 gap-2",children:[(0,t.jsx)("p",{children:n.description}),o.length>0&&(0,t.jsx)("div",{className:"flex flex-row gap-8 flex-wrap",children:o.map((function(e){return(0,t.jsxs)("div",{className:"flex flex-col gap-0",children:[(0,t.jsx)("div",{className:"font-semibold",children:e}),(0,t.jsx)("div",{children:r[e]})]},e)}))})]})]}),(0,t.jsxs)("div",{className:"text-sm items-center",children:["Details",(0,t.jsx)(GF,{})]})]})})}),n.eldritch&&(0,t.jsx)(tz,{pb:4,pl:12,children:(0,t.jsx)(cV,{className:"w-full",text:n.eldritch,language:"python",showLineNumbers:!1,theme:OV,codeBlock:!0})})]})})},NQ=function(e){var n,r,o,i,a,l,u,s,c=e.id,f=hj(KA,{variables:{where:{id:c}}}),d=f.loading,h=f.error,p=f.data,v=(null===p||void 0===p||null===(n=p.tasks)||void 0===n||null===(r=n.edges)||void 0===r?void 0:r.length)>0&&null!==p&&void 0!==p&&null!==(o=p.tasks)&&void 0!==o&&null!==(i=o.edges[0])&&void 0!==i&&null!==(a=i.node)&&void 0!==a&&a.output?null===p||void 0===p||null===(l=p.tasks)||void 0===l||null===(u=l.edges[0])||void 0===u||null===(s=u.node)||void 0===s?void 0:s.output:"No output available";return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-2xl text-gray-800",children:"Output"}),d?(0,t.jsx)(q_,{type:G_.loading,label:"Loading tasks..."}):h?(0,t.jsx)(q_,{type:G_.error,label:"Error loading tasks..."}):(0,t.jsx)("div",{className:"bg-gray-200 rounded-md p-0.5 ",children:(0,t.jsx)(CV,{text:v,language:"",showLineNumbers:!1,theme:OV,codeBlock:!0})})]})},LQ=function(e){var n,r,o,i,l,u,s,c,f,d,h,p=e.isOpen,v=e.setOpen,g=e.selectedTask,m=new Date((null===g||void 0===g?void 0:g.createdAt)||""),y=new Date((null===g||void 0===g?void 0:g.execFinishedAt)||""),b=new Date((null===g||void 0===g?void 0:g.execStartedAt)||""),x=null!==g&&void 0!==g&&null!==(n=g.quest)&&void 0!==n&&n.parameters?JSON.parse(null===g||void 0===g||null===(r=g.quest)||void 0===r?void 0:r.parameters):{},w=Object.keys(x);return(0,t.jsx)($k.Root,{show:p,as:a.Fragment,children:(0,t.jsxs)(IC,{as:"div",className:"relative z-10",onClose:v,children:[(0,t.jsx)("div",{className:"fixed inset-0 bg-black/30","aria-hidden":"true"}),(0,t.jsx)("div",{className:"fixed inset-0 overflow-hidden",children:(0,t.jsx)("div",{className:"absolute inset-0 overflow-hidden",children:(0,t.jsx)("div",{className:"pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10 ",children:(0,t.jsx)($k.Child,{as:a.Fragment,enter:"transform transition ease-in-out duration-500 sm:duration-700",enterFrom:"translate-x-full",enterTo:"translate-x-0",leave:"transform transition ease-in-out duration-500 sm:duration-700",leaveFrom:"translate-x-0",leaveTo:"translate-x-full",children:(0,t.jsx)(IC.Panel,{className:"pointer-events-auto w-screen max-w-xs md:max-w-md lg:max-w-4xl",children:(0,t.jsxs)("div",{className:"flex h-full flex-col overflow-y-scroll bg-white py-6 shadow-xl",children:[(0,t.jsx)("div",{className:"px-4 sm:px-6",children:(0,t.jsx)("div",{className:"flex w-full justify-end",children:(0,t.jsx)("div",{className:"ml-3 flex h-7 items-center",children:(0,t.jsxs)("button",{type:"button",className:"relative rounded-md bg-white text-gray-400 hover:text-gray-500 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2",onClick:function(){return v(!1)},children:[(0,t.jsx)("span",{className:"absolute -inset-2.5"}),(0,t.jsx)("span",{className:"sr-only",children:"Close panel"}),(0,t.jsx)(VC,{className:"h-6 w-6","aria-hidden":"true"})]})})})}),(0,t.jsxs)("div",{className:"relative mt-6 flex-1 px-4 sm:px-6 flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"flex flex-row gap-4 items-center",children:[(0,t.jsx)("h2",{className:"text-3xl font-semibold text-gray-900",children:null===g||void 0===g||null===(o=g.quest)||void 0===o?void 0:o.name}),(0,t.jsx)(MQ,{task:g})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-2xl",children:"Status"}),(0,t.jsxs)("div",{className:"flex flex-row gap-4 sm:gap-12 text-sm mx-4",children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Created"}),(0,t.jsx)("span",{children:"".concat(m.toLocaleTimeString())}),(0,t.jsx)("span",{children:"on ".concat(m.toDateString())})]}),(null===g||void 0===g?void 0:g.execStartedAt)&&(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Started"}),(0,t.jsx)("span",{children:"".concat(b.toLocaleTimeString())}),(0,t.jsx)("span",{children:"on ".concat(b.toDateString())})]}),(null===g||void 0===g?void 0:g.execFinishedAt)&&(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"font-semibold",children:"Finished"}),(0,t.jsx)("span",{children:"".concat(y.toLocaleTimeString())}),(0,t.jsx)("span",{children:"on ".concat(y.toDateString())})]})]})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-2xl text-gray-800",children:"Beacon"}),(0,t.jsx)("div",{className:"mx-4",children:(0,t.jsx)(IV,{beaconData:null===g||void 0===g?void 0:g.beacon})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-2xl text-gray-800",children:"Tome"}),(0,t.jsx)(DQ,{tome:null===g||void 0===g||null===(i=g.quest)||void 0===i?void 0:i.tome,params:x,paramKeys:w})]}),(null===g||void 0===g||null===(l=g.quest)||void 0===l?void 0:l.creator)&&(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("h3",{className:"text-2xl text-gray-800",children:"Creator"}),(0,t.jsxs)("div",{className:"flex flex-row gap-2 items-center mx-4",children:[(0,t.jsx)(fP,{borderRadius:"full",boxSize:"20px",src:null===g||void 0===g||null===(u=g.quest)||void 0===u||null===(s=u.creator)||void 0===s?void 0:s.photoURL,alt:"Profile of ".concat(null===g||void 0===g||null===(c=g.quest)||void 0===c||null===(f=c.creator)||void 0===f?void 0:f.name)}),(0,t.jsx)("div",{className:"text-sm flex flex-row gap-1 items-center text-gray-600",children:null===g||void 0===g||null===(d=g.quest)||void 0===d||null===(h=d.creator)||void 0===h?void 0:h.name})]})]}),g&&(null===g||void 0===g?void 0:g.id)&&(0,t.jsx)(NQ,{id:g.id})]})]})})})})})})]})})},FQ={exit:{scale:.85,opacity:0,transition:{opacity:{duration:.15,easings:"easeInOut"},scale:{duration:.2,easings:"easeInOut"}}},enter:{scale:1,opacity:1,transition:{opacity:{easings:"easeOut",duration:.2},scale:{duration:.2,ease:[.175,.885,.4,1.1]}}}};function zQ(e,t,n,r){var o=kf(n);return(0,a.useEffect)((function(){var i="function"===typeof e?e():null!=e?e:document;if(n&&i)return i.addEventListener(t,o,r),function(){i.removeEventListener(t,o,r)}}),[t,e,r,o,n]),function(){var n="function"===typeof e?e():null!=e?e:document;null==n||n.removeEventListener(t,o,r)}}var BQ=function(e,t){return{var:e,varRef:t?"var(".concat(e,", ").concat(t,")"):"var(".concat(e,")")}},VQ={arrowShadowColor:BQ("--popper-arrow-shadow-color"),arrowSize:BQ("--popper-arrow-size","8px"),arrowSizeHalf:BQ("--popper-arrow-size-half"),arrowBg:BQ("--popper-arrow-bg"),transformOrigin:BQ("--popper-transform-origin"),arrowOffset:BQ("--popper-arrow-offset")};var HQ={top:"bottom center","top-start":"bottom left","top-end":"bottom right",bottom:"top center","bottom-start":"top left","bottom-end":"top right",left:"right center","left-start":"right top","left-end":"right bottom",right:"left center","right-start":"left top","right-end":"left bottom"},UQ={scroll:!0,resize:!0};function WQ(e){return"object"===typeof e?{enabled:!0,options:h(h({},UQ),e)}:{enabled:e,options:UQ}}var GQ={name:"matchWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;t.styles.popper.width="".concat(t.rects.reference.width,"px")},effect:function(e){var t=e.state;return function(){var e=t.elements.reference;t.elements.popper.style.width="".concat(e.offsetWidth,"px")}}},qQ={name:"transformOrigin",enabled:!0,phase:"write",fn:function(e){var t=e.state;QQ(t)},effect:function(e){var t=e.state;return function(){QQ(t)}}},QQ=function(e){var t;e.elements.popper.style.setProperty(VQ.transformOrigin.var,(t=e.placement,HQ[t]))},$Q={name:"positionArrow",enabled:!0,phase:"afterWrite",fn:function(e){var t=e.state;YQ(t)}},YQ=function(e){var t;if(e.placement){var n=KQ(e.placement);if((null==(t=e.elements)?void 0:t.arrow)&&n){var r,o;Object.assign(e.elements.arrow.style,(f(r={},n.property,n.value),f(r,"width",VQ.arrowSize.varRef),f(r,"height",VQ.arrowSize.varRef),f(r,"zIndex",-1),r));var i=(f(o={},VQ.arrowSizeHalf.var,"calc(".concat(VQ.arrowSize.varRef," / 2)")),f(o,VQ.arrowOffset.var,"calc(".concat(VQ.arrowSizeHalf.varRef," * -1)")),o);for(var a in i)e.elements.arrow.style.setProperty(a,i[a])}}},KQ=function(e){return e.startsWith("top")?{property:"bottom",value:VQ.arrowOffset.varRef}:e.startsWith("bottom")?{property:"top",value:VQ.arrowOffset.varRef}:e.startsWith("left")?{property:"right",value:VQ.arrowOffset.varRef}:e.startsWith("right")?{property:"left",value:VQ.arrowOffset.varRef}:void 0},XQ={name:"innerArrow",enabled:!0,phase:"main",requires:["arrow"],fn:function(e){var t=e.state;JQ(t)},effect:function(e){var t=e.state;return function(){JQ(t)}}},JQ=function(e){if(e.elements.arrow){var t=e.elements.arrow.querySelector("[data-popper-arrow-inner]");if(t){var n,r=(n=e.placement).includes("top")?"1px 1px 1px 0 var(--popper-arrow-shadow-color)":n.includes("bottom")?"-1px -1px 1px 0 var(--popper-arrow-shadow-color)":n.includes("right")?"-1px 1px 1px 0 var(--popper-arrow-shadow-color)":n.includes("left")?"1px -1px 1px 0 var(--popper-arrow-shadow-color)":void 0;r&&t.style.setProperty("--popper-arrow-default-shadow",r),Object.assign(t.style,{transform:"rotate(45deg)",background:VQ.arrowBg.varRef,top:0,left:0,width:"100%",height:"100%",position:"absolute",zIndex:"inherit",boxShadow:"var(--popper-arrow-shadow, var(--popper-arrow-default-shadow))"})}}},ZQ={"start-start":{ltr:"left-start",rtl:"right-start"},"start-end":{ltr:"left-end",rtl:"right-end"},"end-start":{ltr:"right-start",rtl:"left-start"},"end-end":{ltr:"right-end",rtl:"left-end"},start:{ltr:"left",rtl:"right"},end:{ltr:"right",rtl:"left"}},e$={"auto-start":"auto-end","auto-end":"auto-start","top-start":"top-end","top-end":"top-start","bottom-start":"bottom-end","bottom-end":"bottom-start"};function t$(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function n$(e){return e instanceof t$(e).Element||e instanceof Element}function r$(e){return e instanceof t$(e).HTMLElement||e instanceof HTMLElement}function o$(e){return"undefined"!==typeof ShadowRoot&&(e instanceof t$(e).ShadowRoot||e instanceof ShadowRoot)}var i$=Math.max,a$=Math.min,l$=Math.round;function u$(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function s$(){return!/^((?!chrome|android).)*safari/i.test(u$())}function c$(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&r$(e)&&(o=e.offsetWidth>0&&l$(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&l$(r.height)/e.offsetHeight||1);var a=(n$(e)?t$(e):window).visualViewport,l=!s$()&&n,u=(r.left+(l&&a?a.offsetLeft:0))/o,s=(r.top+(l&&a?a.offsetTop:0))/i,c=r.width/o,f=r.height/i;return{width:c,height:f,top:s,right:u+c,bottom:s+f,left:u,x:u,y:s}}function f$(e){var t=t$(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function d$(e){return e?(e.nodeName||"").toLowerCase():null}function h$(e){return((n$(e)?e.ownerDocument:e.document)||window.document).documentElement}function p$(e){return c$(h$(e)).left+f$(e).scrollLeft}function v$(e){return t$(e).getComputedStyle(e)}function g$(e){var t=v$(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function m$(e,t,n){void 0===n&&(n=!1);var r=r$(t),o=r$(t)&&function(e){var t=e.getBoundingClientRect(),n=l$(t.width)/e.offsetWidth||1,r=l$(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=h$(t),a=c$(e,o,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(r||!r&&!n)&&(("body"!==d$(t)||g$(i))&&(l=function(e){return e!==t$(e)&&r$(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:f$(e);var t}(t)),r$(t)?((u=c$(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):i&&(u.x=p$(i))),{x:a.left+l.scrollLeft-u.x,y:a.top+l.scrollTop-u.y,width:a.width,height:a.height}}function y$(e){var t=c$(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function b$(e){return"html"===d$(e)?e:e.assignedSlot||e.parentNode||(o$(e)?e.host:null)||h$(e)}function x$(e){return["html","body","#document"].indexOf(d$(e))>=0?e.ownerDocument.body:r$(e)&&g$(e)?e:x$(b$(e))}function w$(e,t){var n;void 0===t&&(t=[]);var r=x$(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=t$(r),a=o?[i].concat(i.visualViewport||[],g$(r)?r:[]):r,l=t.concat(a);return o?l:l.concat(w$(b$(a)))}function S$(e){return["table","td","th"].indexOf(d$(e))>=0}function _$(e){return r$(e)&&"fixed"!==v$(e).position?e.offsetParent:null}function k$(e){for(var t=t$(e),n=_$(e);n&&S$(n)&&"static"===v$(n).position;)n=_$(n);return n&&("html"===d$(n)||"body"===d$(n)&&"static"===v$(n).position)?t:n||function(e){var t=/firefox/i.test(u$());if(/Trident/i.test(u$())&&r$(e)&&"fixed"===v$(e).position)return null;var n=b$(e);for(o$(n)&&(n=n.host);r$(n)&&["html","body"].indexOf(d$(n))<0;){var r=v$(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var T$="top",C$="bottom",E$="right",O$="left",j$="auto",P$=[T$,C$,E$,O$],A$="start",R$="end",I$="clippingParents",M$="viewport",D$="popper",N$="reference",L$=P$.reduce((function(e,t){return e.concat([t+"-"+A$,t+"-"+R$])}),[]),F$=[].concat(P$,[j$]).reduce((function(e,t){return e.concat([t,t+"-"+A$,t+"-"+R$])}),[]),z$=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function B$(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function V$(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var H$={placement:"bottom",modifiers:[],strategy:"absolute"};function U$(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function K$(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?Q$(o):null,a=o?$$(o):null,l=n.x+n.width/2-r.width/2,u=n.y+n.height/2-r.height/2;switch(i){case T$:t={x:l,y:n.y-r.height};break;case C$:t={x:l,y:n.y+n.height};break;case E$:t={x:n.x+n.width,y:u};break;case O$:t={x:n.x-r.width,y:u};break;default:t={x:n.x,y:n.y}}var s=i?Y$(i):null;if(null!=s){var c="y"===s?"height":"width";switch(a){case A$:t[s]=t[s]-(n[c]/2-r[c]/2);break;case R$:t[s]=t[s]+(n[c]/2-r[c]/2)}}return t}var X$={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=K$({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},J$={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Z$(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,a=e.offsets,l=e.position,u=e.gpuAcceleration,s=e.adaptive,c=e.roundOffsets,f=e.isFixed,d=a.x,h=void 0===d?0:d,p=a.y,v=void 0===p?0:p,g="function"===typeof c?c({x:h,y:v}):{x:h,y:v};h=g.x,v=g.y;var m=a.hasOwnProperty("x"),y=a.hasOwnProperty("y"),b=O$,x=T$,w=window;if(s){var S=k$(n),_="clientHeight",k="clientWidth";if(S===t$(n)&&"static"!==v$(S=h$(n)).position&&"absolute"===l&&(_="scrollHeight",k="scrollWidth"),o===T$||(o===O$||o===E$)&&i===R$)x=C$,v-=(f&&S===w&&w.visualViewport?w.visualViewport.height:S[_])-r.height,v*=u?1:-1;if(o===O$||(o===T$||o===C$)&&i===R$)b=E$,h-=(f&&S===w&&w.visualViewport?w.visualViewport.width:S[k])-r.width,h*=u?1:-1}var T,C=Object.assign({position:l},s&&J$),E=!0===c?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:l$(t*r)/r||0,y:l$(n*r)/r||0}}({x:h,y:v}):{x:h,y:v};return h=E.x,v=E.y,u?Object.assign({},C,((T={})[x]=y?"0":"",T[b]=m?"0":"",T.transform=(w.devicePixelRatio||1)<=1?"translate("+h+"px, "+v+"px)":"translate3d("+h+"px, "+v+"px, 0)",T)):Object.assign({},C,((t={})[x]=y?v+"px":"",t[b]=m?h+"px":"",t.transform="",t))}var eY={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,a=void 0===i||i,l=n.roundOffsets,u=void 0===l||l,s={placement:Q$(t.placement),variation:$$(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,Z$(Object.assign({},s,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,Z$(Object.assign({},s,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}};var tY={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];r$(o)&&d$(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});r$(r)&&d$(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};var nY={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,a=F$.reduce((function(e,n){return e[n]=function(e,t,n){var r=Q$(e),o=[O$,T$].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,a=i[0],l=i[1];return a=a||0,l=(l||0)*o,[O$,E$].indexOf(r)>=0?{x:l,y:a}:{x:a,y:l}}(n,t.rects,i),e}),{}),l=a[t.placement],u=l.x,s=l.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=s),t.modifiersData[r]=a}},rY={left:"right",right:"left",bottom:"top",top:"bottom"};function oY(e){return e.replace(/left|right|bottom|top/g,(function(e){return rY[e]}))}var iY={start:"end",end:"start"};function aY(e){return e.replace(/start|end/g,(function(e){return iY[e]}))}function lY(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&o$(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function uY(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function sY(e,t,n){return t===M$?uY(function(e,t){var n=t$(e),r=h$(e),o=n.visualViewport,i=r.clientWidth,a=r.clientHeight,l=0,u=0;if(o){i=o.width,a=o.height;var s=s$();(s||!s&&"fixed"===t)&&(l=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:l+p$(e),y:u}}(e,n)):n$(t)?function(e,t){var n=c$(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):uY(function(e){var t,n=h$(e),r=f$(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=i$(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=i$(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),l=-r.scrollLeft+p$(e),u=-r.scrollTop;return"rtl"===v$(o||n).direction&&(l+=i$(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:l,y:u}}(h$(e)))}function cY(e,t,n,r){var o="clippingParents"===t?function(e){var t=w$(b$(e)),n=["absolute","fixed"].indexOf(v$(e).position)>=0&&r$(e)?k$(e):e;return n$(n)?t.filter((function(e){return n$(e)&&lY(e,n)&&"body"!==d$(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),a=i[0],l=i.reduce((function(t,n){var o=sY(e,n,r);return t.top=i$(o.top,t.top),t.right=a$(o.right,t.right),t.bottom=a$(o.bottom,t.bottom),t.left=i$(o.left,t.left),t}),sY(e,a,r));return l.width=l.right-l.left,l.height=l.bottom-l.top,l.x=l.left,l.y=l.top,l}function fY(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function dY(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function hY(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,a=void 0===i?e.strategy:i,l=n.boundary,u=void 0===l?I$:l,s=n.rootBoundary,c=void 0===s?M$:s,f=n.elementContext,d=void 0===f?D$:f,h=n.altBoundary,p=void 0!==h&&h,v=n.padding,g=void 0===v?0:v,m=fY("number"!==typeof g?g:dY(g,P$)),y=d===D$?N$:D$,b=e.rects.popper,x=e.elements[p?y:d],w=cY(n$(x)?x:x.contextElement||h$(e.elements.popper),u,c,a),S=c$(e.elements.reference),_=K$({reference:S,element:b,strategy:"absolute",placement:o}),k=uY(Object.assign({},b,_)),T=d===D$?k:S,C={top:w.top-T.top+m.top,bottom:T.bottom-w.bottom+m.bottom,left:w.left-T.left+m.left,right:T.right-w.right+m.right},E=e.modifiersData.offset;if(d===D$&&E){var O=E[o];Object.keys(C).forEach((function(e){var t=[E$,C$].indexOf(e)>=0?1:-1,n=[T$,C$].indexOf(e)>=0?"y":"x";C[e]+=O[n]*t}))}return C}var pY={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,a=n.altAxis,l=void 0===a||a,u=n.fallbackPlacements,s=n.padding,c=n.boundary,f=n.rootBoundary,d=n.altBoundary,h=n.flipVariations,p=void 0===h||h,v=n.allowedAutoPlacements,g=t.options.placement,m=Q$(g),y=u||(m===g||!p?[oY(g)]:function(e){if(Q$(e)===j$)return[];var t=oY(e);return[aY(e),t,aY(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat(Q$(n)===j$?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,a=n.padding,l=n.flipVariations,u=n.allowedAutoPlacements,s=void 0===u?F$:u,c=$$(r),f=c?l?L$:L$.filter((function(e){return $$(e)===c})):P$,d=f.filter((function(e){return s.indexOf(e)>=0}));0===d.length&&(d=f);var h=d.reduce((function(t,n){return t[n]=hY(e,{placement:n,boundary:o,rootBoundary:i,padding:a})[Q$(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}(t,{placement:n,boundary:c,rootBoundary:f,padding:s,flipVariations:p,allowedAutoPlacements:v}):n)}),[]),x=t.rects.reference,w=t.rects.popper,S=new Map,_=!0,k=b[0],T=0;T=0,P=j?"width":"height",A=hY(t,{placement:C,boundary:c,rootBoundary:f,altBoundary:d,padding:s}),R=j?O?E$:O$:O?C$:T$;x[P]>w[P]&&(R=oY(R));var I=oY(R),M=[];if(i&&M.push(A[E]<=0),l&&M.push(A[R]<=0,A[I]<=0),M.every((function(e){return e}))){k=C,_=!1;break}S.set(C,M)}if(_)for(var D=function(e){var t=b.find((function(t){var n=S.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return k=t,"break"},N=p?3:1;N>0;N--){if("break"===D(N))break}t.placement!==k&&(t.modifiersData[r]._skip=!0,t.placement=k,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function vY(e,t,n){return i$(e,a$(t,n))}var gY={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,a=n.altAxis,l=void 0!==a&&a,u=n.boundary,s=n.rootBoundary,c=n.altBoundary,f=n.padding,d=n.tether,h=void 0===d||d,p=n.tetherOffset,v=void 0===p?0:p,g=hY(t,{boundary:u,rootBoundary:s,padding:f,altBoundary:c}),m=Q$(t.placement),y=$$(t.placement),b=!y,x=Y$(m),w="x"===x?"y":"x",S=t.modifiersData.popperOffsets,_=t.rects.reference,k=t.rects.popper,T="function"===typeof v?v(Object.assign({},t.rects,{placement:t.placement})):v,C="number"===typeof T?{mainAxis:T,altAxis:T}:Object.assign({mainAxis:0,altAxis:0},T),E=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(S){if(i){var j,P="y"===x?T$:O$,A="y"===x?C$:E$,R="y"===x?"height":"width",I=S[x],M=I+g[P],D=I-g[A],N=h?-k[R]/2:0,L=y===A$?_[R]:k[R],F=y===A$?-k[R]:-_[R],z=t.elements.arrow,B=h&&z?y$(z):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},H=V[P],U=V[A],W=vY(0,_[R],B[R]),G=b?_[R]/2-N-W-H-C.mainAxis:L-W-H-C.mainAxis,q=b?-_[R]/2+N+W+U+C.mainAxis:F+W+U+C.mainAxis,Q=t.elements.arrow&&k$(t.elements.arrow),$=Q?"y"===x?Q.clientTop||0:Q.clientLeft||0:0,Y=null!=(j=null==E?void 0:E[x])?j:0,K=I+q-Y,X=vY(h?a$(M,I+G-Y-$):M,I,h?i$(D,K):D);S[x]=X,O[x]=X-I}if(l){var J,Z="x"===x?T$:O$,ee="x"===x?C$:E$,te=S[w],ne="y"===w?"height":"width",re=te+g[Z],oe=te-g[ee],ie=-1!==[T$,O$].indexOf(m),ae=null!=(J=null==E?void 0:E[w])?J:0,le=ie?re:te-_[ne]-k[ne]-ae+C.altAxis,ue=ie?te+_[ne]+k[ne]-ae-C.altAxis:oe,se=h&&ie?function(e,t,n){var r=vY(e,t,n);return r>n?n:r}(le,te,ue):vY(h?le:re,te,h?ue:oe);S[w]=se,O[w]=se-te}t.modifiersData[r]=O}},requiresIfExists:["offset"]},mY=function(e,t){return fY("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:dY(e,P$))};var yY={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,a=n.modifiersData.popperOffsets,l=Q$(n.placement),u=Y$(l),s=[O$,E$].indexOf(l)>=0?"height":"width";if(i&&a){var c=mY(o.padding,n),f=y$(i),d="y"===u?T$:O$,h="y"===u?C$:E$,p=n.rects.reference[s]+n.rects.reference[u]-a[u]-n.rects.popper[s],v=a[u]-n.rects.reference[u],g=k$(i),m=g?"y"===u?g.clientHeight||0:g.clientWidth||0:0,y=p/2-v/2,b=c[d],x=m-f[s]-c[h],w=m/2-f[s]/2+y,S=vY(b,w,x),_=u;n.modifiersData[r]=((t={})[_]=S,t.centerOffset=S-w,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&lY(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function bY(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function xY(e){return[T$,E$,C$,O$].some((function(t){return e[t]>=0}))}var wY={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,a=hY(t,{elementContext:"reference"}),l=hY(t,{altBoundary:!0}),u=bY(a,r),s=bY(l,o,i),c=xY(u),f=xY(s);t.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:s,isReferenceHidden:c,hasPopperEscaped:f},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":f})}},SY=W$({defaultModifiers:[q$,X$,eY,tY,nY,pY,gY,yY,wY]}),_Y=["size","shadowColor","bg","style"];function kY(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.enabled,n=void 0===t||t,r=e.modifiers,o=e.placement,i=void 0===o?"bottom":o,l=e.strategy,u=void 0===l?"absolute":l,s=e.arrowPadding,c=void 0===s?8:s,f=e.eventListeners,d=void 0===f||f,v=e.offset,g=e.gutter,m=void 0===g?8:g,y=e.flip,b=void 0===y||y,x=e.boundary,w=void 0===x?"clippingParents":x,S=e.preventOverflow,_=void 0===S||S,k=e.matchWidth,T=e.direction,C=void 0===T?"ltr":T,E=(0,a.useRef)(null),O=(0,a.useRef)(null),j=(0,a.useRef)(null),P=function(e){var t,n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ltr",o=(null==(t=ZQ[e])?void 0:t[r])||e;return"ltr"===r?o:null!=(n=e$[e])?n:o}(i,C),A=(0,a.useRef)((function(){})),R=(0,a.useCallback)((function(){var e;n&&E.current&&O.current&&(null==(e=A.current)||e.call(A),j.current=SY(E.current,O.current,{placement:P,modifiers:[XQ,$Q,qQ,h(h({},GQ),{},{enabled:!!k}),h({name:"eventListeners"},WQ(d)),{name:"arrow",options:{padding:c}},{name:"offset",options:{offset:null!=v?v:[0,m]}},{name:"flip",enabled:!!b,options:{padding:8}},{name:"preventOverflow",enabled:!!_,options:{boundary:w}}].concat(bt(null!=r?r:[])),strategy:u}),j.current.forceUpdate(),A.current=j.current.destroy)}),[P,n,r,k,d,c,v,m,b,_,w,u]);(0,a.useEffect)((function(){return function(){var e;E.current||O.current||(null==(e=j.current)||e.destroy(),j.current=null)}}),[]);var I=(0,a.useCallback)((function(e){E.current=e,R()}),[R]),M=(0,a.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:Bj(I,e)})}),[I]),D=(0,a.useCallback)((function(e){O.current=e,R()}),[R]),N=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},e),{},{ref:Bj(D,t),style:h(h({},e.style),{},{position:u,minWidth:k?void 0:"max-content",inset:"0 auto auto 0"})})}),[u,D,k]),L=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e.size,e.shadowColor,e.bg,e.style;return h(h({},p(e,_Y)),{},{ref:t,"data-popper-arrow":"",style:TY(e)})}),[]),F=(0,a.useCallback)((function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{ref:e,"data-popper-arrow-inner":""})}),[]);return{update:function(){var e;null==(e=j.current)||e.update()},forceUpdate:function(){var e;null==(e=j.current)||e.forceUpdate()},transformOrigin:VQ.transformOrigin.varRef,referenceRef:I,popperRef:D,getPopperProps:N,getArrowProps:L,getArrowInnerProps:F,getReferenceProps:M}}function TY(e){var t=e.size,n=e.shadowColor,r=e.bg,o=h(h({},e.style),{},{position:"absolute"});return t&&(o["--popper-arrow-size"]=t),n&&(o["--popper-arrow-shadow-color"]=n),r&&(o["--popper-arrow-bg"]=r),o}var CY=["openDelay","closeDelay","closeOnClick","closeOnMouseDown","closeOnScroll","closeOnPointerDown","closeOnEsc","onOpen","onClose","placement","id","isOpen","defaultIsOpen","arrowSize","arrowShadowColor","arrowPadding","modifiers","isDisabled","gutter","offset","direction"],EY=function(e){var t;return(null==(t=e.current)?void 0:t.ownerDocument)||document},OY=function(e){var t,n;return(null==(n=null==(t=e.current)?void 0:t.ownerDocument)?void 0:n.defaultView)||window};function jY(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.openDelay,n=void 0===t?0:t,r=e.closeDelay,o=void 0===r?0:r,i=e.closeOnClick,l=void 0===i||i,u=e.closeOnMouseDown,s=e.closeOnScroll,c=e.closeOnPointerDown,d=void 0===c?u:c,v=e.closeOnEsc,g=void 0===v||v,m=e.onOpen,y=e.onClose,b=e.placement,x=e.id,w=e.isOpen,S=e.defaultIsOpen,_=e.arrowSize,k=void 0===_?10:_,T=e.arrowShadowColor,C=e.arrowPadding,E=e.modifiers,O=e.isDisabled,j=e.gutter,P=e.offset,A=e.direction,R=p(e,CY),I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.onClose,n=e.onOpen,r=e.isOpen,o=e.id,i=kf(n),l=kf(t),u=ut((0,a.useState)(e.defaultIsOpen||!1),2),s=u[0],c=u[1],f=void 0!==r?r:s,d=void 0!==r,p=(0,a.useId)(),v=null!=o?o:"disclosure-".concat(p),g=(0,a.useCallback)((function(){d||c(!1),null==l||l()}),[d,l]),m=(0,a.useCallback)((function(){d||c(!0),null==i||i()}),[d,i]),y=(0,a.useCallback)((function(){f?g():m()}),[f,m,g]);return{isOpen:f,onOpen:m,onClose:g,onToggle:y,isControlled:d,getButtonProps:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return h(h({},e),{},{"aria-expanded":f,"aria-controls":v,onClick:function(t){var n;null==(n=e.onClick)||n.call(e,t),y()}})},getDisclosureProps:function(){return h(h({},arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),{},{hidden:!f,id:v})}}}({isOpen:w,defaultIsOpen:S,onOpen:m,onClose:y}),M=I.isOpen,D=I.onOpen,N=I.onClose,L=kY({enabled:M,placement:b,arrowPadding:C,modifiers:E,gutter:j,offset:P,direction:A}),F=L.referenceRef,z=L.getPopperProps,B=L.getArrowInnerProps,V=L.getArrowProps,H=(0,a.useId)(),U="tooltip-".concat(null!=x?x:H),W=(0,a.useRef)(null),G=(0,a.useRef)(),q=(0,a.useCallback)((function(){G.current&&(clearTimeout(G.current),G.current=void 0)}),[]),Q=(0,a.useRef)(),$=(0,a.useCallback)((function(){Q.current&&(clearTimeout(Q.current),Q.current=void 0)}),[]),Y=(0,a.useCallback)((function(){$(),N()}),[N,$]),K=function(e,t){return(0,a.useEffect)((function(){var n=EY(e);return n.addEventListener(PY,t),function(){return n.removeEventListener(PY,t)}}),[t,e]),function(){var t=EY(e),n=OY(e);t.dispatchEvent(new n.CustomEvent(PY))}}(W,Y),X=(0,a.useCallback)((function(){if(!O&&!G.current){K();var e=OY(W);G.current=e.setTimeout(D,n)}}),[K,O,D,n]),J=(0,a.useCallback)((function(){q();var e=OY(W);Q.current=e.setTimeout(Y,o)}),[o,Y,q]),Z=(0,a.useCallback)((function(){M&&l&&J()}),[l,J,M]),ee=(0,a.useCallback)((function(){M&&d&&J()}),[d,J,M]),te=(0,a.useCallback)((function(e){M&&"Escape"===e.key&&J()}),[M,J]);zQ((function(){return EY(W)}),"keydown",g?te:void 0),zQ((function(){return EY(W)}),"scroll",(function(){M&&s&&Y()})),(0,a.useEffect)((function(){O&&(q(),M&&N())}),[O,M,N,q]),(0,a.useEffect)((function(){return function(){q(),$()}}),[q,$]),zQ((function(){return W.current}),"pointerleave",J);var ne=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return h(h({},e),{},{ref:Bj(W,t,F),onPointerEnter:At(e.onPointerEnter,(function(e){"touch"!==e.pointerType&&X()})),onClick:At(e.onClick,Z),onPointerDown:At(e.onPointerDown,ee),onFocus:At(e.onFocus,X),onBlur:At(e.onBlur,J),"aria-describedby":M?U:void 0})}),[X,J,ee,M,U,Z,F]),re=(0,a.useCallback)((function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return z(h(h({},t),{},{style:h(h({},t.style),{},(e={},f(e,VQ.arrowSize.var,k?"".concat(k,"px"):void 0),f(e,VQ.arrowShadowColor.var,T),e))}),n)}),[z,k,T]),oe=(0,a.useCallback)((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=h(h({},e.style),{},{position:"relative",transformOrigin:VQ.transformOrigin.varRef});return h(h(h({ref:t},R),e),{},{id:U,role:"tooltip",style:n})}),[R,U]);return{isOpen:M,show:X,hide:J,getTriggerProps:ne,getTooltipProps:oe,getTooltipPositionerProps:re,getArrowProps:V,getArrowInnerProps:B}}var PY="chakra-ui:close-tooltip";var AY=["children","label","shouldWrapChildren","aria-label","hasArrow","bg","portalProps","background","backgroundColor","bgColor","motionProps"];var RY=lx(Bb.div),IY=cx((function(e,n){var r,o,i=vx("Tooltip",e),l=Sr(e),u=fx(),s=l.children,c=l.label,f=l.shouldWrapChildren,d=l["aria-label"],v=l.hasArrow,g=l.bg,m=l.portalProps,y=l.background,b=l.backgroundColor,x=l.bgColor,w=l.motionProps,S=p(l,AY),_=null!=(o=null!=(r=null!=y?y:b)?r:g)?o:x;if(_){i.bg=_;var k=function(e,t,n){var r,o,i;return null!=(i=null==(o=null==(r=e.__cssMap)?void 0:r["".concat(t,".").concat(n)])?void 0:o.varRef)?i:n}(u,"colors",_);i[VQ.arrowBg.var]=k}var T,C=jY(h(h({},S),{},{direction:u.direction}));if("string"===typeof s||f)T=(0,t.jsx)(lx.span,h(h({display:"inline-block",tabIndex:0},C.getTriggerProps()),{},{children:s}));else{var E=a.Children.only(s);T=(0,a.cloneElement)(E,C.getTriggerProps(E.props,E.ref))}var O=!!d,j=C.getTooltipProps({},n),P=O?function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=Object.assign({},e),o=mt(n);try{for(o.s();!(t=o.n()).done;){var i=t.value;i in r&&delete r[i]}}catch(a){o.e(a)}finally{o.f()}return r}(j,["role","id"]):j,A=function(e,t){var n,r={},o=mt(t);try{for(o.s();!(n=o.n()).done;){var i=n.value;i in e&&(r[i]=e[i])}}catch(a){o.e(a)}finally{o.f()}return r}(j,["role","id"]);return c?(0,t.jsxs)(t.Fragment,{children:[T,(0,t.jsx)(Qx,{children:C.isOpen&&(0,t.jsx)(rw,h(h({},m),{},{children:(0,t.jsx)(lx.div,h(h({},C.getTooltipPositionerProps()),{},{__css:{zIndex:i.zIndex,pointerEvents:"none"},children:(0,t.jsxs)(RY,h(h(h({variants:FQ,initial:"exit",animate:"enter",exit:"exit"},w),P),{},{__css:i,children:[c,O&&(0,t.jsx)(lx.span,h(h({srOnly:!0},A),{},{children:d})),v&&(0,t.jsx)(lx.div,{"data-popper-arrow":!0,className:"chakra-tooltip__arrow-wrapper",children:(0,t.jsx)(lx.div,{"data-popper-arrow-inner":!0,className:"chakra-tooltip__arrow",__css:{bg:i.bg}})})]}))}))}))})]}):(0,t.jsx)(t.Fragment,{children:s})}));IY.displayName="Tooltip";var MY=function(e){var n=e.tasks,r=e.onToggle,o=new Date,i=[{id:"name",header:"Quest details",accessorFn:function(e){var t;return null===e||void 0===e||null===(t=e.node)||void 0===t?void 0:t.quest},footer:function(e){return e.column.id},maxSize:110,enableSorting:!1,cell:function(e){var n,r=e.getValue();return(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{children:r.name}),(0,t.jsx)("div",{className:"text-sm flex flex-row gap-1 items-center text-gray-500",children:null===r||void 0===r||null===(n=r.tome)||void 0===n?void 0:n.name})]})}},{id:"beacon",header:"Beacon",accessorFn:function(e){var t;return null===e||void 0===e||null===(t=e.node)||void 0===t?void 0:t.beacon},footer:function(e){return e.column.id},minSize:window.innerWidth/8,enableSorting:!1,cell:function(e){var n=e.getValue();return(0,t.jsx)(IV,{beaconData:n})}},{id:"status",header:"Status",accessorFn:function(e){return null===e||void 0===e?void 0:e.node},minSize:80,maxSize:100,enableSorting:!1,cell:function(e){var n=e.getValue(),r=new Date(null===n||void 0===n?void 0:n.lastModifiedAt),i=(null===n||void 0===n?void 0:n.outputSize)>0;return(0,t.jsx)(IY,{label:"Click to see output","aria-label":"Task output",children:(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsxs)("div",{className:"flex flex-row gap-2 flex-wrap",children:[(0,t.jsx)(MQ,{task:n}),i&&(0,t.jsx)("div",{children:(0,t.jsx)(lP,{fontSize:"0.8em",size:"large",colorScheme:"purple",children:(0,t.jsx)("div",{className:"p-1",children:"Has Output"})})})]}),(0,t.jsxs)("div",{className:"text-sm text-gray-500 flex flex-row flex-wrap",children:["last updated ",VP(r,o)]})]})})},footer:function(e){return e.column.id}}];return(0,t.jsx)(WA,{data:n,columns:i,onRowClick:r})};function DY(e){var n=e.totalCount,r=e.pageInfo,o=e.refetchTable,i=e.page,a=e.setPage,l=e.rowLimit;return(0,t.jsxs)("nav",{className:"flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6","aria-label":"Pagination",children:[(0,t.jsx)("div",{className:"hidden sm:block",children:(0,t.jsxs)("p",{className:"text-sm text-gray-800",children:["Page ",(0,t.jsx)("span",{className:"font-semibold",children:i})," of ",(0,t.jsx)("span",{className:"font-semibold",children:Math.ceil(n/l)})," ","(".concat(n," results)")]})}),(0,t.jsxs)("div",{className:"flex flex-1 justify-between sm:justify-end",children:[(0,t.jsx)("button",{disabled:!r.hasPreviousPage,onClick:function(){o&&r.hasPreviousPage&&(a((function(e){return e-1})),o(void 0,r.startCursor))},className:"relative inline-flex items-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus-visible:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed",children:"Previous"}),(0,t.jsx)("button",{disabled:!r.hasNextPage,onClick:function(){o&&r.hasNextPage&&(a((function(e){return e+1})),o(r.endCursor,void 0))},className:"relative ml-3 inline-flex items-center rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 ring-1 ring-inset ring-gray-300 hover:bg-gray-50 focus-visible:outline-offset-0 disabled:opacity-50 disabled:cursor-not-allowed",children:"Next"})]})]})}var NY,LY=function(e){var n=c_(),r=n.placeholder,o=n.questId,i=r||(o?"Search by output":"Search by tome name, quest name, or output"),l=e.setSearch,u=(0,a.useRef)((0,oP.debounce)(function(){var e=hw(fw().mark((function e(t){return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l(t);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),300)).current;function s(){return(s=hw(fw().mark((function e(t){return fw().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:u(t.target.value);case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,a.useEffect)((function(){return function(){u.cancel()}}),[u]),(0,t.jsxs)("div",{className:"flex-1 gap-1",children:[(0,t.jsxs)(Cj,{size:"sm",mb:2,children:[" ",i]}),(0,t.jsxs)(Rj,{className:" border-gray-300",children:[(0,t.jsx)(Fj,{pointerEvents:"none",children:(0,t.jsx)(kj,{color:"gray.300"})}),(0,t.jsx)(rP,{type:"text",placeholder:i,onChange:function(e){return s.apply(this,arguments)}})]})]})},FY=function(e){var n=e.setSearch,r=e.setFiltersSelected,o=e.filtersSelected,i=(0,a.useContext)(ZA),l=i.data,u=i.isLoading,s=i.error;return(0,t.jsx)("div",{children:!u&&!s&&l&&(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-2",children:[(0,t.jsx)(LY,{setSearch:n}),(0,t.jsx)(Xq,{beacons:(null===l||void 0===l?void 0:l.beacons)||[],groups:(null===l||void 0===l?void 0:l.groupTags)||[],services:(null===l||void 0===l?void 0:l.serviceTags)||[],hosts:(null===l||void 0===l?void 0:l.hosts)||[],setFiltersSelected:r,filtersSelected:o})]})})},zY=_j({displayName:"CloseIcon",d:"M.439,21.44a1.5,1.5,0,0,0,2.122,2.121L11.823,14.3a.25.25,0,0,1,.354,0l9.262,9.263a1.5,1.5,0,1,0,2.122-2.121L14.3,12.177a.25.25,0,0,1,0-.354l9.263-9.262A1.5,1.5,0,0,0,21.439.44L12.177,9.7a.25.25,0,0,1-.354,0L2.561.44A1.5,1.5,0,0,0,.439,2.561L9.7,11.823a.25.25,0,0,1,0,.354Z"}),BY=function(){var e,n,r,o=c_().questId,i=hj(rO(NY||(NY=YC(["\n query GetQuests($where: QuestWhereInput) {\n quests(where: $where){\n id\n name\n }\n }"]))),{variables:{where:{id:o}}}),a=i.loading,l=i.data,u=i.error;return(0,t.jsx)("div",{className:"flex flex-row justify-between w-full",children:(0,t.jsxs)("div",{className:"flex flex-row gap-2 items-center",children:[(0,t.jsx)("h3",{className:"text-xl font-semibold leading-6 text-gray-900",children:"Quest outputs for"}),(null===l||void 0===l||null===(e=l.quests[0])||void 0===e?void 0:e.name)&&(0,t.jsx)(D_,{to:"/tasks",children:(0,t.jsx)(xH,{rightIcon:(0,t.jsx)(zY,{}),colorScheme:"purple",variant:"outline",size:"xs",children:null===l||void 0===l||null===(n=l.quests[0])||void 0===n?void 0:n.name})}),(u||!(null!==l&&void 0!==l&&null!==(r=l.quests[0])&&void 0!==r&&r.name)&&!a)&&(0,t.jsx)(D_,{to:"/tasks",children:(0,t.jsx)(xH,{rightIcon:(0,t.jsx)(zY,{}),colorScheme:"purple",variant:"outline",size:"xs",children:o})})]})})},VY=function(){return c_().questId?(0,t.jsx)(BY,{}):(0,t.jsx)("h3",{className:"text-xl font-semibold leading-6 text-gray-900",children:"Quest outputs"})},HY=function(e){return e.hostIDQuery="HOST_ID_QUERY",e.questIdQuery="QUEST_ID_QUERY",e.questDetailsQuery="QUEST_DETAILS_QUERY",e}({}),UY=function(e,t){var n=u_().state,r=ut((0,a.useState)(1),2),o=r[0],i=r[1],l=ut((0,a.useState)(""),2),u=l[0],s=l[1],c=(0,a.useMemo)((function(){return n&&Array.isArray(n)&&n.every((function(e){return"kind"in e&&"value"in e&&"name"in e}))?n:[]}),[n]),f=ut((0,a.useState)(c),2),d=f[0],h=f[1],p=(0,a.useCallback)((function(n,r,o){var i=QC.TaskRowLimit,a={where:{and:[]},first:o?null:i,last:o?i:null,after:r||null,before:o||null,orderBy:[{direction:"DESC",field:"LAST_MODIFIED_AT"}]};switch(e){case HY.hostIDQuery:var l=[{hasBeaconWith:{hasHostWith:{id:t}}}];n&&l.push({or:[{outputContains:n},{hasQuestWith:{nameContains:n}},{hasQuestWith:{hasTomeWith:{nameContains:n}}}]}),a.where.and=l;break;case HY.questIdQuery:var u=[{hasQuestWith:{id:t}}];n&&u.push({outputContains:n}),a.where.and=u;break;case HY.questDetailsQuery:default:var s=n||"";a.where.and=[{or:[{outputContains:s},{hasQuestWith:{nameContains:s}},{hasQuestWith:{hasTomeWith:{nameContains:s}}}]}]}return a}),[e,t]),v=(0,a.useCallback)((function(e,t){var n=t,r=e.reduce((function(e,t){return"beacon"===t.kind?e.beacon.push(t.name):"platform"===t.kind?e.platform.push(t.name):"service"===t.kind?e.service.push(t.name):"group"===t.kind?e.group.push(t.name):"host"===t.kind&&e.host.push(t.name),e}),{beacon:[],service:[],group:[],host:[],platform:[]}),o=r.beacon,i=r.group,a=r.service,l=r.platform,u=r.hosts,s=void 0===u?[]:u;return o.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{nameIn:o}})),i.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{hasHostWith:{hasTagsWith:{and:[{kind:"group"},{nameIn:i}]}}}})),a.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{hasHostWith:{hasTagsWith:{and:[{kind:"service"},{nameIn:a}]}}}})),s.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{hasHostWith:{nameIn:s}}})),l.length>0&&(n.where.and=n.where.and.concat({hasBeaconWith:{hasHostWith:{platformIn:l}}})),n}),[]),g=hj(YA,{variables:p(),notifyOnNetworkStatusChange:!0}),m=g.loading,y=g.error,b=g.data,x=g.refetch,w=(0,a.useCallback)((function(e,t){var n=p(u,e,t),r=v(d,n);x(r)}),[u,d,p,v,x]);return(0,a.useEffect)((function(){w()}),[w]),{data:b,loading:m,error:y,page:o,filtersSelected:d,setPage:i,setSearch:function(e){i(1),s(e)},setFiltersSelected:function(e){i(1),h(e)},updateTaskList:w}},WY=function(){var e,n,r,o,i=c_().questId,l=i?HY.questIdQuery:HY.questDetailsQuery,u=UY(l,i),s=u.data,c=u.loading,f=u.error,d=u.setSearch,h=u.setFiltersSelected,p=u.filtersSelected,v=u.updateTaskList,g=u.page,m=u.setPage,y=ut((0,a.useState)(!1),2),b=y[0],x=y[1],w=ut((0,a.useState)(null),2),S=w[0],_=w[1];return(0,t.jsxs)(Sj,{currNavItem:GC.tasks,children:[(0,t.jsx)("div",{className:"border-b border-gray-200 pb-5 sm:flex sm:items-center sm:justify-between",children:(0,t.jsx)(VY,{})}),(0,t.jsx)("div",{className:"p-4 bg-white rounded-lg shadow-lg mt-2",children:(0,t.jsx)(FY,{setSearch:d,setFiltersSelected:h,filtersSelected:p})}),c?(0,t.jsx)(q_,{type:G_.loading,label:"Loading quest tasks..."}):f?(0,t.jsx)(q_,{type:G_.error,label:"Error loading tasks..."}):(0,t.jsx)("div",{children:(null===s||void 0===s||null===(e=s.tasks)||void 0===e?void 0:e.edges.length)>0?(0,t.jsxs)("div",{className:"py-4 bg-white rounded-lg shadow-lg mt-2 flex flex-col gap-1",children:[(0,t.jsx)(MY,{tasks:null===s||void 0===s||null===(n=s.tasks)||void 0===n?void 0:n.edges,onToggle:function(e){var t,n=null===e||void 0===e||null===(t=e.original)||void 0===t?void 0:t.node;_(n),x((function(e){return!e}))}}),(0,t.jsx)(DY,{totalCount:null===s||void 0===s||null===(r=s.tasks)||void 0===r?void 0:r.totalCount,pageInfo:null===s||void 0===s||null===(o=s.tasks)||void 0===o?void 0:o.pageInfo,refetchTable:v,page:g,setPage:m,rowLimit:QC.TaskRowLimit})]}):(0,t.jsx)(q_,{label:"No data found",details:"Try creating a new quest or adjusting filters.",type:G_.noData,children:(0,t.jsx)(D_,{to:"/createQuest",children:(0,t.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md bg-purple-700 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-purple-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-purple-700",children:"Create new quest"})})})}),(0,t.jsx)(LQ,{isOpen:b,setOpen:x,selectedTask:S})]})},GY=function(e){var n=e.setFiltersSelected,r=e.typeFilters,o=(0,a.useContext)(ZA),i=o.data,l=o.isLoading,u=o.error;return(0,t.jsx)("div",{children:!l&&!u&&i&&(0,t.jsx)("div",{className:"p-4 bg-white rounded-lg shadow-lg mt-2",children:(0,t.jsx)(Xq,{beacons:(null===i||void 0===i?void 0:i.beacons)||[],groups:(null===i||void 0===i?void 0:i.groupTags)||[],services:(null===i||void 0===i?void 0:i.serviceTags)||[],hosts:(null===i||void 0===i?void 0:i.hosts)||[],setFiltersSelected:n,filtersSelected:r})})})},qY=function(e){var n=e.data;return(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{children:n.name}),(0,t.jsxs)("div",{className:"flex flex-row flex-wrap gap-1",children:[(0,t.jsx)(lP,{children:null===n||void 0===n?void 0:n.primaryIP}),(0,t.jsx)(lP,{children:null===n||void 0===n?void 0:n.platform}),n.tags&&(null===n||void 0===n?void 0:n.tags.map((function(e){return(0,t.jsx)(lP,{children:e.name},e.id)})))]})]})},QY=function(e){var n=e.data,r=new Date,o=s_(),i=Object.values($C),a=[{id:"name",header:"Host details",accessorFn:function(e){return e},footer:function(e){return e.column.id},enableSorting:!1,cell:function(e){var n=e.getValue();return(0,t.jsx)(qY,{data:n})}},{id:"beaconStatus",header:"Online beacons",accessorFn:function(e){return e.beaconStatus},footer:function(e){return e.column.id},maxSize:100,sortingFn:function(e,t){var n,r,o,i,a,l,u=(null===e||void 0===e||null===(n=e.original)||void 0===n?void 0:n.beaconStatus.online)/((null===e||void 0===e||null===(r=e.original)||void 0===r?void 0:r.beaconStatus.offline)+(null===e||void 0===e||null===(o=e.original)||void 0===o?void 0:o.beaconStatus.online)),s=(null===t||void 0===t||null===(i=t.original)||void 0===i?void 0:i.beaconStatus.online)/((null===t||void 0===t||null===(a=t.original)||void 0===a?void 0:a.beaconStatus.offline)+(null===t||void 0===t||null===(l=t.original)||void 0===l?void 0:l.beaconStatus.online));return us?-1:0},cell:function(e){var n=e.getValue(),r=0===n.online?"red":"gray";return(0,t.jsxs)(lP,{ml:"1",px:"4",colorScheme:r,fontSize:"font-base",children:[n.online,"/",n.offline+n.online]})}},{id:"beaconPrincipals",header:"Beacon principals",accessorFn:function(e){return e.beaconPrincipals},footer:function(e){return e.column.id},sortingFn:function(e,t){var n,r,o,a,l=null!==e&&void 0!==e&&null!==(n=e.original)&&void 0!==n&&n.beaconPrincipals?null===e||void 0===e||null===(r=e.original)||void 0===r?void 0:r.beaconPrincipals.filter((function(e){return-1!==i.indexOf(e)})).length:0,u=null!==e&&void 0!==e&&null!==(o=e.original)&&void 0!==o&&o.beaconPrincipals?null===t||void 0===t||null===(a=t.original)||void 0===a?void 0:a.beaconPrincipals.filter((function(e){return-1!==i.indexOf(e)})).length:0;return lu?-1:0},cell:function(e){var n=e.getValue();return(0,t.jsx)("div",{className:"flex flex-row flex-wrap gap-1",children:n.map((function(e){var n=-1===i.indexOf(e)?"gray":"purple";return(0,t.jsx)(lP,{textTransform:"none",colorScheme:n,children:e},e)}))})}},{id:"lastSeenAt",header:"Last callback",accessorFn:function(e){return VP(new Date(e.lastSeenAt),r)},footer:function(e){return e.column.id},maxSize:100,sortingFn:function(e,t){var n,r,o=new Date(null===e||void 0===e||null===(n=e.original)||void 0===n?void 0:n.lastSeenAt),i=new Date(null===t||void 0===t||null===(r=t.original)||void 0===r?void 0:r.lastSeenAt);return oi?-1:0}}];return(0,t.jsx)("div",{children:(0,t.jsx)(WA,{data:n,columns:a,onRowClick:function(e){var t;o("/hosts/".concat(null===e||void 0===e||null===(t=e.original)||void 0===t?void 0:t.id))}})})},$Y=function(){var e=function(){var e=ut((0,a.useState)([]),2),t=e[0],n=e[1],r=hj(qA),o=r.loading,i=r.data,l=r.error,u=r.startPolling,s=r.stopPolling,c=(0,a.useCallback)((function(e){var t=function(e,t){return e.reduce((function(e,n){return e[n[t]]=n,e}),{})}(e.beacons||[],"principal"),n=Object.values($C),r=[];for(var o in t)-1!==n.indexOf(o)?r.unshift(o):r.push(o);return r}),[]),f=(0,a.useCallback)((function(e){var t,r=new Date;if(e&&e.hosts){var o=null===e||void 0===e||null===(t=e.hosts)||void 0===t?void 0:t.map((function(e){return h(h({},e),{},{beaconPrincipals:c(e),beaconStatus:PL(e.beacons),formattedLastSeenAt:VP(new Date(e.lastSeenAt),r)})}));n(o)}}),[c]);return(0,a.useEffect)((function(){return u(6e4),function(){s()}}),[u,s]),(0,a.useEffect)((function(){i&&f(i)}),[i,f]),{loading:o,hosts:t,error:l}}(),n=e.loading,r=e.hosts,o=e.error,i=function(e){var t=u_().state,n=ut((0,a.useState)(!1),2),r=n[0],o=n[1],i=ut((0,a.useState)(e),2),l=i[0],u=i[1],s=(0,a.useMemo)((function(){return t&&Array.isArray(t)&&t.every((function(e){return"kind"in e&&"value"in e&&"name"in e}))?t:[]}),[t]),c=ut((0,a.useState)(s),2),f=c[0],d=c[1],h=(0,a.useCallback)((function(e,t){if(t.length<1)return e;var n=function(e){return e.reduce((function(e,t){return"beacon"===t.kind?e.beacon.push(t.value):"platform"===t.kind?e.platform.push(t.value):"service"===t.kind?e.service.push(t.value):"group"===t.kind?e.group.push(t.value):"host"===t.kind&&e.host.push(t.value),e}),{beacon:[],service:[],host:[],group:[],platform:[]})}(t);return e.filter((function(e){var t=null!==e&&void 0!==e&&e.tags?(null===e||void 0===e?void 0:e.tags).find((function(e){return"group"===(null===e||void 0===e?void 0:e.kind)})):null,r=null!==e&&void 0!==e&&e.tags?(null===e||void 0===e?void 0:e.tags).find((function(e){return"service"===(null===e||void 0===e?void 0:e.kind)})):null,o=!0;if(n.beacon.length>0){var i;if(null===e||void 0===e||null===(i=e.beacons)||void 0===i||!i.some((function(e){return n.beacon.includes(e.id)})))return!1;o=!0}if(n.host.length>0){if(!(n.host.indexOf(null===e||void 0===e?void 0:e.id)>-1))return!1;o=!0}if(n.service.length>0){if(!(r&&n.service.indexOf(null===r||void 0===r?void 0:r.id)>-1))return!1;o=!0}if(n.group.length>0){if(!(t&&n.group.indexOf(null===t||void 0===t?void 0:t.id)>-1))return!1;o=!0}if(n.platform.length>0){if(!(n.platform.indexOf(null===e||void 0===e?void 0:e.platform)>-1))return!1;o=!0}return o}))}),[]);return(0,a.useEffect)((function(){if(e.length>0){o(!0);var t=h(e,f);u(t),o(!1)}}),[e,f,h]),{loading:r,filteredHosts:l,typeFilters:f,setTypeFilters:d}}(r),l=i.loading,u=i.filteredHosts,s=i.setTypeFilters,c=i.typeFilters;return(0,t.jsxs)(Sj,{currNavItem:GC.hosts,children:[(0,t.jsx)("div",{className:"border-b border-gray-200 pb-5 sm:flex sm:items-center sm:justify-between",children:(0,t.jsx)("h3",{className:"text-xl font-semibold leading-6 text-gray-900",children:"Hosts"})}),(0,t.jsx)(GY,{setFiltersSelected:s,typeFilters:c}),(0,t.jsx)("div",{className:"flex flex-col justify-center items-center gap-6",children:n||l?(0,t.jsx)(q_,{type:G_.loading,label:"Loading hosts..."}):o?(0,t.jsx)(q_,{type:G_.error,label:"Error hosts..."}):u.length>0?(0,t.jsx)("div",{className:"py-4 bg-white rounded-lg shadow-lg mt-2 flex flex-col gap-1 w-full",children:(0,t.jsx)(QY,{data:u})}):r.length>0?(0,t.jsx)(q_,{type:G_.noMatches,label:"No hosts matching search filters"}):(0,t.jsx)(q_,{type:G_.noData,label:"No hosts data found"})})]})},YY=function(){var e,n,r,o,i=c_().hostId,l=UY(HY.hostIDQuery,i),u=l.data,s=l.loading,c=l.error,f=l.page,d=l.setPage,h=l.setSearch,p=l.updateTaskList,v=ut((0,a.useState)(!1),2),g=v[0],m=v[1],y=ut((0,a.useState)(null),2),b=y[0],x=y[1];return(0,t.jsx)(NF,{allowToggle:!0,className:"w-full",defaultIndex:[0],children:(0,t.jsxs)(FF,{children:[(0,t.jsxs)(zF,{children:[(0,t.jsx)(HF,{as:"span",flex:"1",textAlign:"left",children:(0,t.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:"Tasks"})}),(0,t.jsx)(GF,{})]}),(0,t.jsxs)(tz,{children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsx)("div",{className:"px-6 pt-2 ",children:(0,t.jsx)(LY,{setSearch:h})}),s?(0,t.jsx)(q_,{type:G_.loading,label:"Loading tasks..."}):c?(0,t.jsx)(q_,{type:G_.error,label:"Error loading tasks..."}):(0,t.jsx)("div",{children:(null===u||void 0===u||null===(e=u.tasks)||void 0===e?void 0:e.edges.length)>0?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(MY,{tasks:null===u||void 0===u||null===(n=u.tasks)||void 0===n?void 0:n.edges,onToggle:function(e){var t,n=null===e||void 0===e||null===(t=e.original)||void 0===t?void 0:t.node;x(n),m((function(e){return!e}))}}),(0,t.jsx)(DY,{totalCount:null===u||void 0===u||null===(r=u.tasks)||void 0===r?void 0:r.totalCount,pageInfo:null===u||void 0===u||null===(o=u.tasks)||void 0===o?void 0:o.pageInfo,refetchTable:p,page:f,setPage:d,rowLimit:QC.TaskRowLimit})]}):(0,t.jsx)(q_,{label:"No tasks found",type:G_.noData,details:"Get started by creating a new quest.",children:(0,t.jsx)(D_,{to:"/createQuest",children:(0,t.jsx)("button",{type:"button",className:"inline-flex items-center rounded-md bg-purple-700 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-purple-600 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-purple-700",children:"Create new quest"})})})})]}),(0,t.jsx)(LQ,{isOpen:g,setOpen:m,selectedTask:b})]})]})})},KY=function(e){var n=e.beacons,r=s_(),o=new Date,i=Object.values($C),a=[{id:"name",header:"Beacon",accessorFn:function(e){return null===e||void 0===e?void 0:e.name},footer:function(e){return e.column.id},enableSorting:!0},{id:"principal",header:"Principal",accessorFn:function(e){return null===e||void 0===e?void 0:e.principal},footer:function(e){return e.column.id},enableSorting:!0,maxSize:100,sortingFn:function(e,t){var n,r,o,a,l=null!==e&&void 0!==e&&null!==(n=e.original)&&void 0!==n&&n.principal?-1!==i.indexOf(null===e||void 0===e||null===(r=e.original)||void 0===r?void 0:r.principal):0,u=null!==t&&void 0!==t&&null!==(o=t.original)&&void 0!==o&&o.principal?-1!==i.indexOf(null===t||void 0===t||null===(a=t.original)||void 0===a?void 0:a.principal):0;return l