????
Current Path : C:/inetpub/vhost/binhdinhf1.gdtsolutions.vn/www/.next/static/chunks/ |
Current File : C:/inetpub/vhost/binhdinhf1.gdtsolutions.vn/www/.next/static/chunks/150-45df75422af748c8.js |
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[150],{8843:function(t){t.exports={style:{fontFamily:"'__Inter_e66fe9', '__Inter_Fallback_e66fe9'",fontStyle:"normal"},className:"__className_e66fe9"}},622:function(t,e,n){"use strict";/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(2265),i=Symbol.for("react.element"),o=Symbol.for("react.fragment"),u=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var r,o={},c=null,l=null;for(r in void 0!==n&&(c=""+n),void 0!==e.key&&(c=""+e.key),void 0!==e.ref&&(l=e.ref),e)u.call(e,r)&&!a.hasOwnProperty(r)&&(o[r]=e[r]);if(t&&t.defaultProps)for(r in e=t.defaultProps)void 0===o[r]&&(o[r]=e[r]);return{$$typeof:i,type:t,key:c,ref:l,props:o,_owner:s.current}}e.Fragment=o,e.jsx=c,e.jsxs=c},7437:function(t,e,n){"use strict";t.exports=n(622)},1172:function(t,e,n){"use strict";n.d(e,{w_:function(){return a}});var r=n(2265),i={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},o=r.createContext&&r.createContext(i),u=function(){return(u=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var i=0,r=Object.getOwnPropertySymbols(t);i<r.length;i++)0>e.indexOf(r[i])&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]]);return n};function a(t){return function(e){return r.createElement(c,u({attr:u({},t.attr)},e),function t(e){return e&&e.map(function(e,n){return r.createElement(e.tag,u({key:n},e.attr),t(e.child))})}(t.child))}}function c(t){var e=function(e){var n,i=t.attr,o=t.size,a=t.title,c=s(t,["attr","size","title"]),l=o||e.size||"1em";return e.className&&(n=e.className),t.className&&(n=(n?n+" ":"")+t.className),r.createElement("svg",u({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},e.attr,i,c,{className:n,style:u(u({color:t.color||e.color},e.style),t.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&r.createElement("title",null,a),t.children)};return void 0!==o?r.createElement(o.Consumer,null,function(t){return e(t)}):e(i)}},7086:function(t,e,n){"use strict";n.d(e,{QueryClient:function(){return r.S}});var r=n(9968),i=n(6897);n.o(i,"QueryClientProvider")&&n.d(e,{QueryClientProvider:function(){return i.QueryClientProvider}})},1442:function(t,e,n){"use strict";n.d(e,{E:function(){return o},j:function(){return i}});var r=console;function i(){return r}function o(t){r=t}},2574:function(t,e,n){"use strict";n.d(e,{V:function(){return i}});var r=n(8172),i=new(function(){function t(){this.queue=[],this.transactions=0,this.notifyFn=function(t){t()},this.batchNotifyFn=function(t){t()}}var e=t.prototype;return e.batch=function(t){var e;this.transactions++;try{e=t()}finally{this.transactions--,this.transactions||this.flush()}return e},e.schedule=function(t){var e=this;this.transactions?this.queue.push(t):(0,r.A4)(function(){e.notifyFn(t)})},e.batchCalls=function(t){var e=this;return function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];e.schedule(function(){t.apply(void 0,r)})}},e.flush=function(){var t=this,e=this.queue;this.queue=[],e.length&&(0,r.A4)(function(){t.batchNotifyFn(function(){e.forEach(function(e){t.notifyFn(e)})})})},e.setNotifyFunction=function(t){this.notifyFn=t},e.setBatchNotifyFunction=function(t){this.batchNotifyFn=t},t}())},9968:function(t,e,n){"use strict";n.d(e,{S:function(){return O}});var r=n(3428),i=n(8172);function o(t,e){return(o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function u(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,o(t,e)}var s=n(2574),a=n(1442),c=function(){function t(){this.listeners=[]}var e=t.prototype;return e.subscribe=function(t){var e=this,n=t||function(){};return this.listeners.push(n),this.onSubscribe(),function(){e.listeners=e.listeners.filter(function(t){return t!==n}),e.onUnsubscribe()}},e.hasListeners=function(){return this.listeners.length>0},e.onSubscribe=function(){},e.onUnsubscribe=function(){},t}(),l=new(function(t){function e(){var e;return(e=t.call(this)||this).setup=function(t){var e;if(!i.sk&&(null==(e=window)?void 0:e.addEventListener)){var n=function(){return t()};return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),function(){window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}},e}u(e,t);var n=e.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var t;null==(t=this.cleanup)||t.call(this),this.cleanup=void 0}},n.setEventListener=function(t){var e,n=this;this.setup=t,null==(e=this.cleanup)||e.call(this),this.cleanup=t(function(t){"boolean"==typeof t?n.setFocused(t):n.onFocus()})},n.setFocused=function(t){this.focused=t,t&&this.onFocus()},n.onFocus=function(){this.listeners.forEach(function(t){t()})},n.isFocused=function(){return"boolean"==typeof this.focused?this.focused:"undefined"==typeof document||[void 0,"visible","prerender"].includes(document.visibilityState)},e}(c)),f=new(function(t){function e(){var e;return(e=t.call(this)||this).setup=function(t){var e;if(!i.sk&&(null==(e=window)?void 0:e.addEventListener)){var n=function(){return t()};return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),function(){window.removeEventListener("online",n),window.removeEventListener("offline",n)}}},e}u(e,t);var n=e.prototype;return n.onSubscribe=function(){this.cleanup||this.setEventListener(this.setup)},n.onUnsubscribe=function(){if(!this.hasListeners()){var t;null==(t=this.cleanup)||t.call(this),this.cleanup=void 0}},n.setEventListener=function(t){var e,n=this;this.setup=t,null==(e=this.cleanup)||e.call(this),this.cleanup=t(function(t){"boolean"==typeof t?n.setOnline(t):n.onOnline()})},n.setOnline=function(t){this.online=t,t&&this.onOnline()},n.onOnline=function(){this.listeners.forEach(function(t){t()})},n.isOnline=function(){return"boolean"==typeof this.online?this.online:"undefined"==typeof navigator||void 0===navigator.onLine||navigator.onLine},e}(c));function h(t){return Math.min(1e3*Math.pow(2,t),3e4)}function d(t){return"function"==typeof(null==t?void 0:t.cancel)}var p=function(t){this.revert=null==t?void 0:t.revert,this.silent=null==t?void 0:t.silent};function v(t){return t instanceof p}var y=function(t){var e,n,r,o,u=this,s=!1;this.abort=t.abort,this.cancel=function(t){return null==e?void 0:e(t)},this.cancelRetry=function(){s=!0},this.continueRetry=function(){s=!1},this.continue=function(){return null==n?void 0:n()},this.failureCount=0,this.isPaused=!1,this.isResolved=!1,this.isTransportCancelable=!1,this.promise=new Promise(function(t,e){r=t,o=e});var a=function(e){u.isResolved||(u.isResolved=!0,null==t.onSuccess||t.onSuccess(e),null==n||n(),r(e))},c=function(e){u.isResolved||(u.isResolved=!0,null==t.onError||t.onError(e),null==n||n(),o(e))};!function r(){var o;if(!u.isResolved){try{o=t.fn()}catch(t){o=Promise.reject(t)}e=function(t){if(!u.isResolved&&(c(new p(t)),null==u.abort||u.abort(),d(o)))try{o.cancel()}catch(t){}},u.isTransportCancelable=d(o),Promise.resolve(o).then(a).catch(function(e){if(!u.isResolved){var o,a,d=null!=(o=t.retry)?o:3,p=null!=(a=t.retryDelay)?a:h,v="function"==typeof p?p(u.failureCount,e):p,y=!0===d||"number"==typeof d&&u.failureCount<d||"function"==typeof d&&d(u.failureCount,e);if(s||!y){c(e);return}u.failureCount++,null==t.onFail||t.onFail(u.failureCount,e),(0,i.Gh)(v).then(function(){if(!l.isFocused()||!f.isOnline())return new Promise(function(e){n=e,u.isPaused=!0,null==t.onPause||t.onPause()}).then(function(){n=void 0,u.isPaused=!1,null==t.onContinue||t.onContinue()})}).then(function(){s?c(e):r()})}})}}()},m=function(){function t(t){this.abortSignalConsumed=!1,this.hadObservers=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||this.getDefaultState(this.options),this.state=this.initialState,this.meta=t.meta,this.scheduleGc()}var e=t.prototype;return e.setOptions=function(t){var e;this.options=(0,r.Z)({},this.defaultOptions,t),this.meta=null==t?void 0:t.meta,this.cacheTime=Math.max(this.cacheTime||0,null!=(e=this.options.cacheTime)?e:3e5)},e.setDefaultOptions=function(t){this.defaultOptions=t},e.scheduleGc=function(){var t=this;this.clearGcTimeout(),(0,i.PN)(this.cacheTime)&&(this.gcTimeout=setTimeout(function(){t.optionalRemove()},this.cacheTime))},e.clearGcTimeout=function(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)},e.optionalRemove=function(){!this.observers.length&&(this.state.isFetching?this.hadObservers&&this.scheduleGc():this.cache.remove(this))},e.setData=function(t,e){var n,r,o=this.state.data,u=(0,i.SE)(t,o);return(null==(n=(r=this.options).isDataEqual)?void 0:n.call(r,o,u))?u=o:!1!==this.options.structuralSharing&&(u=(0,i.Q$)(o,u)),this.dispatch({data:u,type:"success",dataUpdatedAt:null==e?void 0:e.updatedAt}),u},e.setState=function(t,e){this.dispatch({type:"setState",state:t,setStateOptions:e})},e.cancel=function(t){var e,n=this.promise;return null==(e=this.retryer)||e.cancel(t),n?n.then(i.ZT).catch(i.ZT):Promise.resolve()},e.destroy=function(){this.clearGcTimeout(),this.cancel({silent:!0})},e.reset=function(){this.destroy(),this.setState(this.initialState)},e.isActive=function(){return this.observers.some(function(t){return!1!==t.options.enabled})},e.isFetching=function(){return this.state.isFetching},e.isStale=function(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(function(t){return t.getCurrentResult().isStale})},e.isStaleByTime=function(t){return void 0===t&&(t=0),this.state.isInvalidated||!this.state.dataUpdatedAt||!(0,i.Kp)(this.state.dataUpdatedAt,t)},e.onFocus=function(){var t,e=this.observers.find(function(t){return t.shouldFetchOnWindowFocus()});e&&e.refetch(),null==(t=this.retryer)||t.continue()},e.onOnline=function(){var t,e=this.observers.find(function(t){return t.shouldFetchOnReconnect()});e&&e.refetch(),null==(t=this.retryer)||t.continue()},e.addObserver=function(t){-1===this.observers.indexOf(t)&&(this.observers.push(t),this.hadObservers=!0,this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))},e.removeObserver=function(t){-1!==this.observers.indexOf(t)&&(this.observers=this.observers.filter(function(e){return e!==t}),this.observers.length||(this.retryer&&(this.retryer.isTransportCancelable||this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.cacheTime?this.scheduleGc():this.cache.remove(this)),this.cache.notify({type:"observerRemoved",query:this,observer:t}))},e.getObserversCount=function(){return this.observers.length},e.invalidate=function(){this.state.isInvalidated||this.dispatch({type:"invalidate"})},e.fetch=function(t,e){var n,r,o,u,s,c,l=this;if(this.state.isFetching){if(this.state.dataUpdatedAt&&(null==e?void 0:e.cancelRefetch))this.cancel({silent:!0});else if(this.promise)return null==(n=this.retryer)||n.continueRetry(),this.promise}if(t&&this.setOptions(t),!this.options.queryFn){var f=this.observers.find(function(t){return t.options.queryFn});f&&this.setOptions(f.options)}var h=(0,i.mc)(this.queryKey),d=(0,i.G9)(),p={queryKey:h,pageParam:void 0,meta:this.meta};Object.defineProperty(p,"signal",{enumerable:!0,get:function(){if(d)return l.abortSignalConsumed=!0,d.signal}});var m={fetchOptions:e,options:this.options,queryKey:h,state:this.state,fetchFn:function(){return l.options.queryFn?(l.abortSignalConsumed=!1,l.options.queryFn(p)):Promise.reject("Missing queryFn")},meta:this.meta};return(null==(u=this.options.behavior)?void 0:u.onFetch)&&(null==(r=this.options.behavior)||r.onFetch(m)),this.revertState=this.state,this.state.isFetching&&this.state.fetchMeta===(null==(s=m.fetchOptions)?void 0:s.meta)||this.dispatch({type:"fetch",meta:null==(o=m.fetchOptions)?void 0:o.meta}),this.retryer=new y({fn:m.fetchFn,abort:null==d?void 0:null==(c=d.abort)?void 0:c.bind(d),onSuccess:function(t){l.setData(t),null==l.cache.config.onSuccess||l.cache.config.onSuccess(t,l),0===l.cacheTime&&l.optionalRemove()},onError:function(t){v(t)&&t.silent||l.dispatch({type:"error",error:t}),v(t)||(null==l.cache.config.onError||l.cache.config.onError(t,l),(0,a.j)().error(t)),0===l.cacheTime&&l.optionalRemove()},onFail:function(){l.dispatch({type:"failed"})},onPause:function(){l.dispatch({type:"pause"})},onContinue:function(){l.dispatch({type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay}),this.promise=this.retryer.promise,this.promise},e.dispatch=function(t){var e=this;this.state=this.reducer(this.state,t),s.V.batch(function(){e.observers.forEach(function(e){e.onQueryUpdate(t)}),e.cache.notify({query:e,type:"queryUpdated",action:t})})},e.getDefaultState=function(t){var e="function"==typeof t.initialData?t.initialData():t.initialData,n=void 0!==t.initialData?"function"==typeof t.initialDataUpdatedAt?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0,r=void 0!==e;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?null!=n?n:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isFetching:!1,isInvalidated:!1,isPaused:!1,status:r?"success":"idle"}},e.reducer=function(t,e){var n,i;switch(e.type){case"failed":return(0,r.Z)({},t,{fetchFailureCount:t.fetchFailureCount+1});case"pause":return(0,r.Z)({},t,{isPaused:!0});case"continue":return(0,r.Z)({},t,{isPaused:!1});case"fetch":return(0,r.Z)({},t,{fetchFailureCount:0,fetchMeta:null!=(n=e.meta)?n:null,isFetching:!0,isPaused:!1},!t.dataUpdatedAt&&{error:null,status:"loading"});case"success":return(0,r.Z)({},t,{data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:null!=(i=e.dataUpdatedAt)?i:Date.now(),error:null,fetchFailureCount:0,isFetching:!1,isInvalidated:!1,isPaused:!1,status:"success"});case"error":var o=e.error;if(v(o)&&o.revert&&this.revertState)return(0,r.Z)({},this.revertState);return(0,r.Z)({},t,{error:o,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,isFetching:!1,isPaused:!1,status:"error"});case"invalidate":return(0,r.Z)({},t,{isInvalidated:!0});case"setState":return(0,r.Z)({},t,e.state);default:return t}},t}(),b=function(t){function e(e){var n;return(n=t.call(this)||this).config=e||{},n.queries=[],n.queriesMap={},n}u(e,t);var n=e.prototype;return n.build=function(t,e,n){var r,o=e.queryKey,u=null!=(r=e.queryHash)?r:(0,i.Rm)(o,e),s=this.get(u);return s||(s=new m({cache:this,queryKey:o,queryHash:u,options:t.defaultQueryOptions(e),state:n,defaultOptions:t.getQueryDefaults(o),meta:e.meta}),this.add(s)),s},n.add=function(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"queryAdded",query:t}))},n.remove=function(t){var e=this.queriesMap[t.queryHash];e&&(t.destroy(),this.queries=this.queries.filter(function(e){return e!==t}),e===t&&delete this.queriesMap[t.queryHash],this.notify({type:"queryRemoved",query:t}))},n.clear=function(){var t=this;s.V.batch(function(){t.queries.forEach(function(e){t.remove(e)})})},n.get=function(t){return this.queriesMap[t]},n.getAll=function(){return this.queries},n.find=function(t,e){var n=(0,i.I6)(t,e)[0];return void 0===n.exact&&(n.exact=!0),this.queries.find(function(t){return(0,i._x)(n,t)})},n.findAll=function(t,e){var n=(0,i.I6)(t,e)[0];return Object.keys(n).length>0?this.queries.filter(function(t){return(0,i._x)(n,t)}):this.queries},n.notify=function(t){var e=this;s.V.batch(function(){e.listeners.forEach(function(e){e(t)})})},n.onFocus=function(){var t=this;s.V.batch(function(){t.queries.forEach(function(t){t.onFocus()})})},n.onOnline=function(){var t=this;s.V.batch(function(){t.queries.forEach(function(t){t.onOnline()})})},e}(c),g=function(){function t(t){this.options=(0,r.Z)({},t.defaultOptions,t.options),this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.observers=[],this.state=t.state||{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0},this.meta=t.meta}var e=t.prototype;return e.setState=function(t){this.dispatch({type:"setState",state:t})},e.addObserver=function(t){-1===this.observers.indexOf(t)&&this.observers.push(t)},e.removeObserver=function(t){this.observers=this.observers.filter(function(e){return e!==t})},e.cancel=function(){return this.retryer?(this.retryer.cancel(),this.retryer.promise.then(i.ZT).catch(i.ZT)):Promise.resolve()},e.continue=function(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()},e.execute=function(){var t,e=this,n="loading"===this.state.status,r=Promise.resolve();return n||(this.dispatch({type:"loading",variables:this.options.variables}),r=r.then(function(){null==e.mutationCache.config.onMutate||e.mutationCache.config.onMutate(e.state.variables,e)}).then(function(){return null==e.options.onMutate?void 0:e.options.onMutate(e.state.variables)}).then(function(t){t!==e.state.context&&e.dispatch({type:"loading",context:t,variables:e.state.variables})})),r.then(function(){return e.executeMutation()}).then(function(n){t=n,null==e.mutationCache.config.onSuccess||e.mutationCache.config.onSuccess(t,e.state.variables,e.state.context,e)}).then(function(){return null==e.options.onSuccess?void 0:e.options.onSuccess(t,e.state.variables,e.state.context)}).then(function(){return null==e.options.onSettled?void 0:e.options.onSettled(t,null,e.state.variables,e.state.context)}).then(function(){return e.dispatch({type:"success",data:t}),t}).catch(function(t){return null==e.mutationCache.config.onError||e.mutationCache.config.onError(t,e.state.variables,e.state.context,e),(0,a.j)().error(t),Promise.resolve().then(function(){return null==e.options.onError?void 0:e.options.onError(t,e.state.variables,e.state.context)}).then(function(){return null==e.options.onSettled?void 0:e.options.onSettled(void 0,t,e.state.variables,e.state.context)}).then(function(){throw e.dispatch({type:"error",error:t}),t})})},e.executeMutation=function(){var t,e=this;return this.retryer=new y({fn:function(){return e.options.mutationFn?e.options.mutationFn(e.state.variables):Promise.reject("No mutationFn found")},onFail:function(){e.dispatch({type:"failed"})},onPause:function(){e.dispatch({type:"pause"})},onContinue:function(){e.dispatch({type:"continue"})},retry:null!=(t=this.options.retry)?t:0,retryDelay:this.options.retryDelay}),this.retryer.promise},e.dispatch=function(t){var e=this;this.state=function(t,e){switch(e.type){case"failed":return(0,r.Z)({},t,{failureCount:t.failureCount+1});case"pause":return(0,r.Z)({},t,{isPaused:!0});case"continue":return(0,r.Z)({},t,{isPaused:!1});case"loading":return(0,r.Z)({},t,{context:e.context,data:void 0,error:null,isPaused:!1,status:"loading",variables:e.variables});case"success":return(0,r.Z)({},t,{data:e.data,error:null,status:"success",isPaused:!1});case"error":return(0,r.Z)({},t,{data:void 0,error:e.error,failureCount:t.failureCount+1,isPaused:!1,status:"error"});case"setState":return(0,r.Z)({},t,e.state);default:return t}}(this.state,t),s.V.batch(function(){e.observers.forEach(function(e){e.onMutationUpdate(t)}),e.mutationCache.notify(e)})},t}(),P=function(t){function e(e){var n;return(n=t.call(this)||this).config=e||{},n.mutations=[],n.mutationId=0,n}u(e,t);var n=e.prototype;return n.build=function(t,e,n){var r=new g({mutationCache:this,mutationId:++this.mutationId,options:t.defaultMutationOptions(e),state:n,defaultOptions:e.mutationKey?t.getMutationDefaults(e.mutationKey):void 0,meta:e.meta});return this.add(r),r},n.add=function(t){this.mutations.push(t),this.notify(t)},n.remove=function(t){this.mutations=this.mutations.filter(function(e){return e!==t}),t.cancel(),this.notify(t)},n.clear=function(){var t=this;s.V.batch(function(){t.mutations.forEach(function(e){t.remove(e)})})},n.getAll=function(){return this.mutations},n.find=function(t){return void 0===t.exact&&(t.exact=!0),this.mutations.find(function(e){return(0,i.X7)(t,e)})},n.findAll=function(t){return this.mutations.filter(function(e){return(0,i.X7)(t,e)})},n.notify=function(t){var e=this;s.V.batch(function(){e.listeners.forEach(function(e){e(t)})})},n.onFocus=function(){this.resumePausedMutations()},n.onOnline=function(){this.resumePausedMutations()},n.resumePausedMutations=function(){var t=this.mutations.filter(function(t){return t.state.isPaused});return s.V.batch(function(){return t.reduce(function(t,e){return t.then(function(){return e.continue().catch(i.ZT)})},Promise.resolve())})},e}(c);function C(t,e){return null==t.getNextPageParam?void 0:t.getNextPageParam(e[e.length-1],e)}var O=function(){function t(t){void 0===t&&(t={}),this.queryCache=t.queryCache||new b,this.mutationCache=t.mutationCache||new P,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}var e=t.prototype;return e.mount=function(){var t=this;this.unsubscribeFocus=l.subscribe(function(){l.isFocused()&&f.isOnline()&&(t.mutationCache.onFocus(),t.queryCache.onFocus())}),this.unsubscribeOnline=f.subscribe(function(){l.isFocused()&&f.isOnline()&&(t.mutationCache.onOnline(),t.queryCache.onOnline())})},e.unmount=function(){var t,e;null==(t=this.unsubscribeFocus)||t.call(this),null==(e=this.unsubscribeOnline)||e.call(this)},e.isFetching=function(t,e){var n=(0,i.I6)(t,e)[0];return n.fetching=!0,this.queryCache.findAll(n).length},e.isMutating=function(t){return this.mutationCache.findAll((0,r.Z)({},t,{fetching:!0})).length},e.getQueryData=function(t,e){var n;return null==(n=this.queryCache.find(t,e))?void 0:n.state.data},e.getQueriesData=function(t){return this.getQueryCache().findAll(t).map(function(t){return[t.queryKey,t.state.data]})},e.setQueryData=function(t,e,n){var r=(0,i._v)(t),o=this.defaultQueryOptions(r);return this.queryCache.build(this,o).setData(e,n)},e.setQueriesData=function(t,e,n){var r=this;return s.V.batch(function(){return r.getQueryCache().findAll(t).map(function(t){var i=t.queryKey;return[i,r.setQueryData(i,e,n)]})})},e.getQueryState=function(t,e){var n;return null==(n=this.queryCache.find(t,e))?void 0:n.state},e.removeQueries=function(t,e){var n=(0,i.I6)(t,e)[0],r=this.queryCache;s.V.batch(function(){r.findAll(n).forEach(function(t){r.remove(t)})})},e.resetQueries=function(t,e,n){var o=this,u=(0,i.I6)(t,e,n),a=u[0],c=u[1],l=this.queryCache,f=(0,r.Z)({},a,{active:!0});return s.V.batch(function(){return l.findAll(a).forEach(function(t){t.reset()}),o.refetchQueries(f,c)})},e.cancelQueries=function(t,e,n){var r=this,o=(0,i.I6)(t,e,n),u=o[0],a=o[1],c=void 0===a?{}:a;return void 0===c.revert&&(c.revert=!0),Promise.all(s.V.batch(function(){return r.queryCache.findAll(u).map(function(t){return t.cancel(c)})})).then(i.ZT).catch(i.ZT)},e.invalidateQueries=function(t,e,n){var o,u,a,c=this,l=(0,i.I6)(t,e,n),f=l[0],h=l[1],d=(0,r.Z)({},f,{active:null==(o=null!=(u=f.refetchActive)?u:f.active)||o,inactive:null!=(a=f.refetchInactive)&&a});return s.V.batch(function(){return c.queryCache.findAll(f).forEach(function(t){t.invalidate()}),c.refetchQueries(d,h)})},e.refetchQueries=function(t,e,n){var o=this,u=(0,i.I6)(t,e,n),a=u[0],c=u[1],l=Promise.all(s.V.batch(function(){return o.queryCache.findAll(a).map(function(t){return t.fetch(void 0,(0,r.Z)({},c,{meta:{refetchPage:null==a?void 0:a.refetchPage}}))})})).then(i.ZT);return(null==c?void 0:c.throwOnError)||(l=l.catch(i.ZT)),l},e.fetchQuery=function(t,e,n){var r=(0,i._v)(t,e,n),o=this.defaultQueryOptions(r);void 0===o.retry&&(o.retry=!1);var u=this.queryCache.build(this,o);return u.isStaleByTime(o.staleTime)?u.fetch(o):Promise.resolve(u.state.data)},e.prefetchQuery=function(t,e,n){return this.fetchQuery(t,e,n).then(i.ZT).catch(i.ZT)},e.fetchInfiniteQuery=function(t,e,n){var r=(0,i._v)(t,e,n);return r.behavior={onFetch:function(t){t.fetchFn=function(){var e,n,r,o,u,s,a,c=null==(e=t.fetchOptions)?void 0:null==(n=e.meta)?void 0:n.refetchPage,l=null==(r=t.fetchOptions)?void 0:null==(o=r.meta)?void 0:o.fetchMore,f=null==l?void 0:l.pageParam,h=(null==l?void 0:l.direction)==="forward",p=(null==l?void 0:l.direction)==="backward",v=(null==(u=t.state.data)?void 0:u.pages)||[],y=(null==(s=t.state.data)?void 0:s.pageParams)||[],m=(0,i.G9)(),b=null==m?void 0:m.signal,g=y,P=!1,O=t.options.queryFn||function(){return Promise.reject("Missing queryFn")},I=function(t,e,n,r){return g=r?[e].concat(g):[].concat(g,[e]),r?[n].concat(t):[].concat(t,[n])},S=function(e,n,r,i){if(P)return Promise.reject("Cancelled");if(void 0===r&&!n&&e.length)return Promise.resolve(e);var o=O({queryKey:t.queryKey,signal:b,pageParam:r,meta:t.meta}),u=Promise.resolve(o).then(function(t){return I(e,r,t,i)});return d(o)&&(u.cancel=o.cancel),u};if(v.length){if(h){var R=void 0!==f,E=R?f:C(t.options,v);a=S(v,R,E)}else if(p){var w,T=void 0!==f,x=T?f:null==(w=t.options).getPreviousPageParam?void 0:w.getPreviousPageParam(v[0],v);a=S(v,T,x,!0)}else!function(){g=[];var e=void 0===t.options.getNextPageParam;a=!c||!v[0]||c(v[0],0,v)?S([],e,y[0]):Promise.resolve(I([],y[0],v[0]));for(var n=function(n){a=a.then(function(r){if(!c||!v[n]||c(v[n],n,v)){var i=e?y[n]:C(t.options,r);return S(r,e,i)}return Promise.resolve(I(r,y[n],v[n]))})},r=1;r<v.length;r++)n(r)}()}else a=S([]);var F=a.then(function(t){return{pages:t,pageParams:g}});return F.cancel=function(){P=!0,null==m||m.abort(),d(a)&&a.cancel()},F}}},this.fetchQuery(r)},e.prefetchInfiniteQuery=function(t,e,n){return this.fetchInfiniteQuery(t,e,n).then(i.ZT).catch(i.ZT)},e.cancelMutations=function(){var t=this;return Promise.all(s.V.batch(function(){return t.mutationCache.getAll().map(function(t){return t.cancel()})})).then(i.ZT).catch(i.ZT)},e.resumePausedMutations=function(){return this.getMutationCache().resumePausedMutations()},e.executeMutation=function(t){return this.mutationCache.build(this,t).execute()},e.getQueryCache=function(){return this.queryCache},e.getMutationCache=function(){return this.mutationCache},e.getDefaultOptions=function(){return this.defaultOptions},e.setDefaultOptions=function(t){this.defaultOptions=t},e.setQueryDefaults=function(t,e){var n=this.queryDefaults.find(function(e){return(0,i.yF)(t)===(0,i.yF)(e.queryKey)});n?n.defaultOptions=e:this.queryDefaults.push({queryKey:t,defaultOptions:e})},e.getQueryDefaults=function(t){var e;return t?null==(e=this.queryDefaults.find(function(e){return(0,i.to)(t,e.queryKey)}))?void 0:e.defaultOptions:void 0},e.setMutationDefaults=function(t,e){var n=this.mutationDefaults.find(function(e){return(0,i.yF)(t)===(0,i.yF)(e.mutationKey)});n?n.defaultOptions=e:this.mutationDefaults.push({mutationKey:t,defaultOptions:e})},e.getMutationDefaults=function(t){var e;return t?null==(e=this.mutationDefaults.find(function(e){return(0,i.to)(t,e.mutationKey)}))?void 0:e.defaultOptions:void 0},e.defaultQueryOptions=function(t){if(null==t?void 0:t._defaulted)return t;var e=(0,r.Z)({},this.defaultOptions.queries,this.getQueryDefaults(null==t?void 0:t.queryKey),t,{_defaulted:!0});return!e.queryHash&&e.queryKey&&(e.queryHash=(0,i.Rm)(e.queryKey,e)),e},e.defaultQueryObserverOptions=function(t){return this.defaultQueryOptions(t)},e.defaultMutationOptions=function(t){return(null==t?void 0:t._defaulted)?t:(0,r.Z)({},this.defaultOptions.mutations,this.getMutationDefaults(null==t?void 0:t.mutationKey),t,{_defaulted:!0})},e.clear=function(){this.queryCache.clear(),this.mutationCache.clear()},t}()},6897:function(){},8172:function(t,e,n){"use strict";n.d(e,{A4:function(){return C},G9:function(){return O},Gh:function(){return P},I6:function(){return f},Kp:function(){return c},PN:function(){return s},Q$:function(){return function t(e,n){if(e===n)return e;var r=Array.isArray(e)&&Array.isArray(n);if(r||m(e)&&m(n)){for(var i=r?e.length:Object.keys(e).length,o=r?n:Object.keys(n),u=o.length,s=r?[]:{},a=0,c=0;c<u;c++){var l=r?c:o[c];s[l]=t(e[l],n[l]),s[l]===e[l]&&a++}return i===u&&a===i?e:s}return n}},Rm:function(){return p},SE:function(){return u},X7:function(){return d},ZT:function(){return o},_v:function(){return l},_x:function(){return h},mc:function(){return a},sk:function(){return i},to:function(){return y},yF:function(){return v}});var r=n(3428),i="undefined"==typeof window;function o(){}function u(t,e){return"function"==typeof t?t(e):t}function s(t){return"number"==typeof t&&t>=0&&t!==1/0}function a(t){return Array.isArray(t)?t:[t]}function c(t,e){return Math.max(t+(e||0)-Date.now(),0)}function l(t,e,n){return g(t)?"function"==typeof e?(0,r.Z)({},n,{queryKey:t,queryFn:e}):(0,r.Z)({},e,{queryKey:t}):t}function f(t,e,n){return g(t)?[(0,r.Z)({},e,{queryKey:t}),n]:[t||{},e]}function h(t,e){var n=t.active,r=t.exact,i=t.fetching,o=t.inactive,u=t.predicate,s=t.queryKey,a=t.stale;if(g(s)){if(r){if(e.queryHash!==p(s,e.options))return!1}else if(!y(e.queryKey,s))return!1}var c=!0===n&&!0===o||null==n&&null==o?"all":!1===n&&!1===o?"none":(null!=n?n:!o)?"active":"inactive";if("none"===c)return!1;if("all"!==c){var l=e.isActive();if("active"===c&&!l||"inactive"===c&&l)return!1}return("boolean"!=typeof a||e.isStale()===a)&&("boolean"!=typeof i||e.isFetching()===i)&&(!u||!!u(e))}function d(t,e){var n=t.exact,r=t.fetching,i=t.predicate,o=t.mutationKey;if(g(o)){if(!e.options.mutationKey)return!1;if(n){if(v(e.options.mutationKey)!==v(o))return!1}else if(!y(e.options.mutationKey,o))return!1}return("boolean"!=typeof r||"loading"===e.state.status===r)&&(!i||!!i(e))}function p(t,e){return((null==e?void 0:e.queryKeyHashFn)||v)(t)}function v(t){return JSON.stringify(a(t),function(t,e){return m(e)?Object.keys(e).sort().reduce(function(t,n){return t[n]=e[n],t},{}):e})}function y(t,e){return function t(e,n){return e===n||typeof e==typeof n&&!!e&&!!n&&"object"==typeof e&&"object"==typeof n&&!Object.keys(n).some(function(r){return!t(e[r],n[r])})}(a(t),a(e))}function m(t){if(!b(t))return!1;var e=t.constructor;if(void 0===e)return!0;var n=e.prototype;return!!(b(n)&&n.hasOwnProperty("isPrototypeOf"))}function b(t){return"[object Object]"===Object.prototype.toString.call(t)}function g(t){return"string"==typeof t||Array.isArray(t)}function P(t){return new Promise(function(e){setTimeout(e,t)})}function C(t){Promise.resolve().then(t).catch(function(t){return setTimeout(function(){throw t})})}function O(){if("function"==typeof AbortController)return new AbortController}},9077:function(t,e,n){"use strict";n.d(e,{QueryClient:function(){return r.QueryClient},QueryClientProvider:function(){return i.QueryClientProvider}});var r=n(7086);n.o(r,"QueryClientProvider")&&n.d(e,{QueryClientProvider:function(){return r.QueryClientProvider}});var i=n(4436)},4436:function(t,e,n){"use strict";n.d(e,{QueryClientProvider:function(){return l}});var r=n(2574),i=n(4887).unstable_batchedUpdates;r.V.setBatchNotifyFunction(i);var o=n(1442),u=console;(0,o.E)(u);var s=n(2265),a=s.createContext(void 0),c=s.createContext(!1),l=function(t){var e=t.client,n=t.contextSharing,r=void 0!==n&&n,i=t.children;s.useEffect(function(){return e.mount(),function(){e.unmount()}},[e]);var o=r&&"undefined"!=typeof window?(window.ReactQueryClientContext||(window.ReactQueryClientContext=a),window.ReactQueryClientContext):a;return s.createElement(c.Provider,{value:r},s.createElement(o.Provider,{value:e},i))}},3428:function(t,e,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}).apply(this,arguments)}n.d(e,{Z:function(){return r}})},8743:function(t,e,n){"use strict";n.d(e,{p:function(){return T}});var r,i,o,u=n(2265),s=n(597),a=n(1931),c=n(6618),l=n(5606),f=n(3850),h=n(5863),d=n(5306),p=n(8076),v=n(4851),y=n(2950);let m=null!=(o=u.startTransition)?o:function(t){t()};var b=((r=b||{})[r.Open=0]="Open",r[r.Closed=1]="Closed",r),g=((i=g||{})[i.ToggleDisclosure=0]="ToggleDisclosure",i[i.CloseDisclosure=1]="CloseDisclosure",i[i.SetButtonId=2]="SetButtonId",i[i.SetPanelId=3]="SetPanelId",i[i.LinkPanel=4]="LinkPanel",i[i.UnlinkPanel=5]="UnlinkPanel",i);let P={0:t=>({...t,disclosureState:(0,s.E)(t.disclosureState,{0:1,1:0})}),1:t=>1===t.disclosureState?t:{...t,disclosureState:1},4:t=>!0===t.linkedPanel?t:{...t,linkedPanel:!0},5:t=>!1===t.linkedPanel?t:{...t,linkedPanel:!1},2:(t,e)=>t.buttonId===e.buttonId?t:{...t,buttonId:e.buttonId},3:(t,e)=>t.panelId===e.panelId?t:{...t,panelId:e.panelId}},C=(0,u.createContext)(null);function O(t){let e=(0,u.useContext)(C);if(null===e){let e=Error(`<${t} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,O),e}return e}C.displayName="DisclosureContext";let I=(0,u.createContext)(null);I.displayName="DisclosureAPIContext";let S=(0,u.createContext)(null);function R(t,e){return(0,s.E)(e.type,P,t,e)}S.displayName="DisclosurePanelContext";let E=u.Fragment,w=a.AN.RenderStrategy|a.AN.Static,T=Object.assign((0,a.yV)(function(t,e){let{defaultOpen:n=!1,...r}=t,i=(0,u.useRef)(null),o=(0,c.T)(e,(0,c.h)(t=>{i.current=t},void 0===t.as||t.as===u.Fragment)),l=(0,u.useRef)(null),f=(0,u.useRef)(null),h=(0,u.useReducer)(R,{disclosureState:n?0:1,linkedPanel:!1,buttonRef:f,panelRef:l,buttonId:null,panelId:null}),[{disclosureState:p,buttonId:m},b]=h,g=(0,y.z)(t=>{b({type:1});let e=(0,v.r)(i);if(!e||!m)return;let n=t?t instanceof HTMLElement?t:t.current instanceof HTMLElement?t.current:e.getElementById(m):e.getElementById(m);null==n||n.focus()}),P=(0,u.useMemo)(()=>({close:g}),[g]),O=(0,u.useMemo)(()=>({open:0===p,close:g}),[p,g]);return u.createElement(C.Provider,{value:h},u.createElement(I.Provider,{value:P},u.createElement(d.up,{value:(0,s.E)(p,{0:d.ZM.Open,1:d.ZM.Closed})},(0,a.sY)({ourProps:{ref:o},theirProps:r,slot:O,defaultTag:E,name:"Disclosure"}))))}),{Button:(0,a.yV)(function(t,e){let n=(0,l.M)(),{id:r=`headlessui-disclosure-button-${n}`,...i}=t,[o,s]=O("Disclosure.Button"),d=(0,u.useContext)(S),v=null!==d&&d===o.panelId,m=(0,u.useRef)(null),b=(0,c.T)(m,e,v?null:o.buttonRef);(0,u.useEffect)(()=>{if(!v)return s({type:2,buttonId:r}),()=>{s({type:2,buttonId:null})}},[r,s,v]);let g=(0,y.z)(t=>{var e;if(v){if(1===o.disclosureState)return;switch(t.key){case f.R.Space:case f.R.Enter:t.preventDefault(),t.stopPropagation(),s({type:0}),null==(e=o.buttonRef.current)||e.focus()}}else switch(t.key){case f.R.Space:case f.R.Enter:t.preventDefault(),t.stopPropagation(),s({type:0})}}),P=(0,y.z)(t=>{t.key===f.R.Space&&t.preventDefault()}),C=(0,y.z)(e=>{var n;(0,h.P)(e.currentTarget)||t.disabled||(v?(s({type:0}),null==(n=o.buttonRef.current)||n.focus()):s({type:0}))}),I=(0,u.useMemo)(()=>({open:0===o.disclosureState}),[o]),R=(0,p.f)(t,m),E=v?{ref:b,type:R,onKeyDown:g,onClick:C}:{ref:b,id:r,type:R,"aria-expanded":0===o.disclosureState,"aria-controls":o.linkedPanel?o.panelId:void 0,onKeyDown:g,onKeyUp:P,onClick:C};return(0,a.sY)({ourProps:E,theirProps:i,slot:I,defaultTag:"button",name:"Disclosure.Button"})}),Panel:(0,a.yV)(function(t,e){let n=(0,l.M)(),{id:r=`headlessui-disclosure-panel-${n}`,...i}=t,[o,s]=O("Disclosure.Panel"),{close:f}=function t(e){let n=(0,u.useContext)(I);if(null===n){let n=Error(`<${e} /> is missing a parent <Disclosure /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,t),n}return n}("Disclosure.Panel"),h=(0,c.T)(e,o.panelRef,t=>{m(()=>s({type:t?4:5}))});(0,u.useEffect)(()=>(s({type:3,panelId:r}),()=>{s({type:3,panelId:null})}),[r,s]);let p=(0,d.oJ)(),v=null!==p?(p&d.ZM.Open)===d.ZM.Open:0===o.disclosureState,y=(0,u.useMemo)(()=>({open:0===o.disclosureState,close:f}),[o,f]);return u.createElement(S.Provider,{value:o.panelId},(0,a.sY)({ourProps:{ref:h,id:r},theirProps:i,slot:y,defaultTag:"div",features:w,visible:v,name:"Disclosure.Panel"}))})})},4017:function(t,e,n){"use strict";n.d(e,{v:function(){return _}});var r,i,o,u=n(2265),s=n(597),a=n(1931),c=n(5390),l=n(2769),f=n(2600),h=n(6618),d=n(5606),p=n(3850),v=n(3891),y=n(5863),m=n(5410),b=n(7742),g=n(4851),P=n(5306),C=n(8076),O=n(2950),I=n(3995),S=n(9426),R=((r=R||{})[r.Open=0]="Open",r[r.Closed=1]="Closed",r),E=((i=E||{})[i.Pointer=0]="Pointer",i[i.Other=1]="Other",i),w=((o=w||{})[o.OpenMenu=0]="OpenMenu",o[o.CloseMenu=1]="CloseMenu",o[o.GoToItem=2]="GoToItem",o[o.Search=3]="Search",o[o.ClearSearch=4]="ClearSearch",o[o.RegisterItem=5]="RegisterItem",o[o.UnregisterItem=6]="UnregisterItem",o);function T(t,e=t=>t){let n=null!==t.activeItemIndex?t.items[t.activeItemIndex]:null,r=(0,m.z2)(e(t.items.slice()),t=>t.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return -1===i&&(i=null),{items:r,activeItemIndex:i}}let x={1:t=>1===t.menuState?t:{...t,activeItemIndex:null,menuState:1},0:t=>0===t.menuState?t:{...t,__demoMode:!1,menuState:0},2:(t,e)=>{var n;let r=T(t),i=(0,v.d)(e,{resolveItems:()=>r.items,resolveActiveIndex:()=>r.activeItemIndex,resolveId:t=>t.id,resolveDisabled:t=>t.dataRef.current.disabled});return{...t,...r,searchQuery:"",activeItemIndex:i,activationTrigger:null!=(n=e.trigger)?n:1}},3:(t,e)=>{let n=""!==t.searchQuery?0:1,r=t.searchQuery+e.value.toLowerCase(),i=(null!==t.activeItemIndex?t.items.slice(t.activeItemIndex+n).concat(t.items.slice(0,t.activeItemIndex+n)):t.items).find(t=>{var e;return(null==(e=t.dataRef.current.textValue)?void 0:e.startsWith(r))&&!t.dataRef.current.disabled}),o=i?t.items.indexOf(i):-1;return -1===o||o===t.activeItemIndex?{...t,searchQuery:r}:{...t,searchQuery:r,activeItemIndex:o,activationTrigger:1}},4:t=>""===t.searchQuery?t:{...t,searchQuery:"",searchActiveItemIndex:null},5:(t,e)=>{let n=T(t,t=>[...t,{id:e.id,dataRef:e.dataRef}]);return{...t,...n}},6:(t,e)=>{let n=T(t,t=>{let n=t.findIndex(t=>t.id===e.id);return -1!==n&&t.splice(n,1),t});return{...t,...n,activationTrigger:1}}},F=(0,u.createContext)(null);function q(t){let e=(0,u.useContext)(F);if(null===e){let e=Error(`<${t} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(e,q),e}return e}function D(t,e){return(0,s.E)(e.type,x,t,e)}F.displayName="MenuContext";let M=u.Fragment,A=a.AN.RenderStrategy|a.AN.Static,k=u.Fragment,_=Object.assign((0,a.yV)(function(t,e){let{__demoMode:n=!1,...r}=t,i=(0,u.useReducer)(D,{__demoMode:n,menuState:n?0:1,buttonRef:(0,u.createRef)(),itemsRef:(0,u.createRef)(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:o,itemsRef:c,buttonRef:l},f]=i,d=(0,h.T)(e);(0,b.O)([l,c],(t,e)=>{var n;f({type:1}),(0,m.sP)(e,m.tJ.Loose)||(t.preventDefault(),null==(n=l.current)||n.focus())},0===o);let p=(0,O.z)(()=>{f({type:1})}),v=(0,u.useMemo)(()=>({open:0===o,close:p}),[o,p]);return u.createElement(F.Provider,{value:i},u.createElement(P.up,{value:(0,s.E)(o,{0:P.ZM.Open,1:P.ZM.Closed})},(0,a.sY)({ourProps:{ref:d},theirProps:r,slot:v,defaultTag:M,name:"Menu"})))}),{Button:(0,a.yV)(function(t,e){var n;let r=(0,d.M)(),{id:i=`headlessui-menu-button-${r}`,...o}=t,[s,c]=q("Menu.Button"),f=(0,h.T)(s.buttonRef,e),m=(0,l.G)(),b=(0,O.z)(t=>{switch(t.key){case p.R.Space:case p.R.Enter:case p.R.ArrowDown:t.preventDefault(),t.stopPropagation(),c({type:0}),m.nextFrame(()=>c({type:2,focus:v.T.First}));break;case p.R.ArrowUp:t.preventDefault(),t.stopPropagation(),c({type:0}),m.nextFrame(()=>c({type:2,focus:v.T.Last}))}}),g=(0,O.z)(t=>{t.key===p.R.Space&&t.preventDefault()}),P=(0,O.z)(e=>{if((0,y.P)(e.currentTarget))return e.preventDefault();t.disabled||(0===s.menuState?(c({type:1}),m.nextFrame(()=>{var t;return null==(t=s.buttonRef.current)?void 0:t.focus({preventScroll:!0})})):(e.preventDefault(),c({type:0})))}),I=(0,u.useMemo)(()=>({open:0===s.menuState}),[s]),S={ref:f,id:i,type:(0,C.f)(t,s.buttonRef),"aria-haspopup":"menu","aria-controls":null==(n=s.itemsRef.current)?void 0:n.id,"aria-expanded":0===s.menuState,onKeyDown:b,onKeyUp:g,onClick:P};return(0,a.sY)({ourProps:S,theirProps:o,slot:I,defaultTag:"button",name:"Menu.Button"})}),Items:(0,a.yV)(function(t,e){var n,r;let i=(0,d.M)(),{id:o=`headlessui-menu-items-${i}`,...s}=t,[y,b]=q("Menu.Items"),C=(0,h.T)(y.itemsRef,e),I=function(...t){return(0,u.useMemo)(()=>(0,g.r)(...t),[...t])}(y.itemsRef),S=(0,l.G)(),R=(0,P.oJ)(),E=null!==R?(R&P.ZM.Open)===P.ZM.Open:0===y.menuState;(0,u.useEffect)(()=>{let t=y.itemsRef.current;t&&0===y.menuState&&t!==(null==I?void 0:I.activeElement)&&t.focus({preventScroll:!0})},[y.menuState,y.itemsRef,I]),function({container:t,accept:e,walk:n,enabled:r=!0}){let i=(0,u.useRef)(e),o=(0,u.useRef)(n);(0,u.useEffect)(()=>{i.current=e,o.current=n},[e,n]),(0,f.e)(()=>{if(!t||!r)return;let e=(0,g.r)(t);if(!e)return;let n=i.current,u=o.current,s=Object.assign(t=>n(t),{acceptNode:n}),a=e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,s,!1);for(;a.nextNode();)u(a.currentNode)},[t,r,i,o])}({container:y.itemsRef.current,enabled:0===y.menuState,accept:t=>"menuitem"===t.getAttribute("role")?NodeFilter.FILTER_REJECT:t.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(t){t.setAttribute("role","none")}});let w=(0,O.z)(t=>{var e,n;switch(S.dispose(),t.key){case p.R.Space:if(""!==y.searchQuery)return t.preventDefault(),t.stopPropagation(),b({type:3,value:t.key});case p.R.Enter:if(t.preventDefault(),t.stopPropagation(),b({type:1}),null!==y.activeItemIndex){let{dataRef:t}=y.items[y.activeItemIndex];null==(n=null==(e=t.current)?void 0:e.domRef.current)||n.click()}(0,m.wI)(y.buttonRef.current);break;case p.R.ArrowDown:return t.preventDefault(),t.stopPropagation(),b({type:2,focus:v.T.Next});case p.R.ArrowUp:return t.preventDefault(),t.stopPropagation(),b({type:2,focus:v.T.Previous});case p.R.Home:case p.R.PageUp:return t.preventDefault(),t.stopPropagation(),b({type:2,focus:v.T.First});case p.R.End:case p.R.PageDown:return t.preventDefault(),t.stopPropagation(),b({type:2,focus:v.T.Last});case p.R.Escape:t.preventDefault(),t.stopPropagation(),b({type:1}),(0,c.k)().nextFrame(()=>{var t;return null==(t=y.buttonRef.current)?void 0:t.focus({preventScroll:!0})});break;case p.R.Tab:t.preventDefault(),t.stopPropagation(),b({type:1}),(0,c.k)().nextFrame(()=>{(0,m.EO)(y.buttonRef.current,t.shiftKey?m.TO.Previous:m.TO.Next)});break;default:1===t.key.length&&(b({type:3,value:t.key}),S.setTimeout(()=>b({type:4}),350))}}),T=(0,O.z)(t=>{t.key===p.R.Space&&t.preventDefault()}),x=(0,u.useMemo)(()=>({open:0===y.menuState}),[y]),F={"aria-activedescendant":null===y.activeItemIndex||null==(n=y.items[y.activeItemIndex])?void 0:n.id,"aria-labelledby":null==(r=y.buttonRef.current)?void 0:r.id,id:o,onKeyDown:w,onKeyUp:T,role:"menu",tabIndex:0,ref:C};return(0,a.sY)({ourProps:F,theirProps:s,slot:x,defaultTag:"div",features:A,visible:E,name:"Menu.Items"})}),Item:(0,a.yV)(function(t,e){let n=(0,d.M)(),{id:r=`headlessui-menu-item-${n}`,disabled:i=!1,...o}=t,[s,l]=q("Menu.Item"),p=null!==s.activeItemIndex&&s.items[s.activeItemIndex].id===r,y=(0,u.useRef)(null),b=(0,h.T)(e,y);(0,f.e)(()=>{if(s.__demoMode||0!==s.menuState||!p||0===s.activationTrigger)return;let t=(0,c.k)();return t.requestAnimationFrame(()=>{var t,e;null==(e=null==(t=y.current)?void 0:t.scrollIntoView)||e.call(t,{block:"nearest"})}),t.dispose},[s.__demoMode,y,p,s.menuState,s.activationTrigger,s.activeItemIndex]);let g=(0,S.x)(y),P=(0,u.useRef)({disabled:i,domRef:y,get textValue(){return g()}});(0,f.e)(()=>{P.current.disabled=i},[P,i]),(0,f.e)(()=>(l({type:5,id:r,dataRef:P}),()=>l({type:6,id:r})),[P,r]);let C=(0,O.z)(()=>{l({type:1})}),R=(0,O.z)(t=>{if(i)return t.preventDefault();l({type:1}),(0,m.wI)(s.buttonRef.current)}),E=(0,O.z)(()=>{if(i)return l({type:2,focus:v.T.Nothing});l({type:2,focus:v.T.Specific,id:r})}),w=(0,I.g)(),T=(0,O.z)(t=>w.update(t)),x=(0,O.z)(t=>{w.wasMoved(t)&&(i||p||l({type:2,focus:v.T.Specific,id:r,trigger:0}))}),F=(0,O.z)(t=>{w.wasMoved(t)&&(i||p&&l({type:2,focus:v.T.Nothing}))}),D=(0,u.useMemo)(()=>({active:p,disabled:i,close:C}),[p,i,C]);return(0,a.sY)({ourProps:{id:r,ref:b,role:"menuitem",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,disabled:void 0,onClick:R,onFocus:E,onPointerEnter:T,onMouseEnter:T,onPointerMove:x,onMouseMove:x,onPointerLeave:F,onMouseLeave:F},theirProps:o,slot:D,defaultTag:k,name:"Menu.Item"})})})}}]);