@wellesley/uploads 1.0.742 → 1.0.744
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.mjs +2 -2
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var VL=Object.defineProperty,jL=(e,t,n)=>t in e?VL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,G1=(e,t,n)=>jL(e,"symbol"!=typeof t?t+"":t,n);function FL(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function $S(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var W1=()=>Math.random().toString(36).substring(7).split("").join("."),zL={INIT:`@@redux/INIT${W1()}`,REPLACE:`@@redux/REPLACE${W1()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${W1()}`},PC=zL;function gd(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function UL(e){Object.keys(e).forEach((t=>{const n=e[t];if(typeof n(void 0,{type:PC.INIT})>"u")throw new Error($S(12));if(typeof n(void 0,{type:PC.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($S(13))}))}function vO(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o;try{UL(n)}catch(e){o=e}return function(e={},t){if(o)throw o;let i=!1;const a={};for(let o=0;o<r.length;o++){const s=r[o],u=n[s],l=e[s],c=u(l,t);if(typeof c>"u")throw t&&t.type,new Error($S(14));a[s]=c,i=i||c!==l}return i=i||r.length!==Object.keys(e).length,i?a:e}}function gO(e){return gd(e)&&"type"in e&&"string"==typeof e.type}var I_=Symbol.for("immer-nothing"),dv=Symbol.for("immer-draftable"),Si=Symbol.for("immer-state");function _o(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Qf=Object.getPrototypeOf;function ws(e){return!!e&&!!e[Si]}function bs(e){var t;return!!e&&(yO(e)||Array.isArray(e)||!!e[dv]||!(null==(t=e.constructor)||!t[dv])||jv(e)||Fv(e))}var GL=Object.prototype.constructor.toString();function yO(e){if(!e||"object"!=typeof e)return!1;const t=Qf(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===GL}function WL(e){return ws(e)||_o(15,e),e[Si].base_}function Fh(e,t){0===Kf(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function Kf(e){const t=e[Si];return t?t.type_:Array.isArray(e)?1:jv(e)?2:Fv(e)?3:0}function bv(e,t){return 2===Kf(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function q1(e,t){return 2===Kf(e)?e.get(t):e[t]}function wO(e,t,n){const r=Kf(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function qL(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function jv(e){return e instanceof Map}function Fv(e){return e instanceof Set}function Ff(e){return e.copy_||e.base_}function NS(e,t){if(jv(e))return new Map(e);if(Fv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&yO(e))return Qf(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Si];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],i=n[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Qf(e),n)}function C_(e,t=!1){return Ey(e)||ws(e)||!bs(e)||(Kf(e)>1&&(e.set=e.add=e.clear=e.delete=HL),Object.freeze(e),t&&Fh(e,((e,t)=>C_(t,!0)))),e}function HL(){_o(2)}function Ey(e){return Object.isFrozen(e)}var xv,kS={};function Yf(e){const t=kS[e];return t||_o(0,e),t}function XL(e,t){kS[e]||(kS[e]=t)}function bO(){return xv}function QL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function RC(e,t){t&&(Yf("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function LS(e){BS(e),e.drafts_.forEach(KL),e.drafts_=null}function BS(e){e===xv&&(xv=e.parent_)}function TC(e){return xv=QL(xv,e)}function KL(e){const t=e[Si];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function MC(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Si].modified_&&(LS(t),_o(4)),bs(e)&&(e=ly(t,e),t.parent_||cy(t,e)),t.patches_&&Yf("Patches").generateReplacementPatches_(n[Si].base_,e,t.patches_,t.inversePatches_)):e=ly(t,n,[]),LS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==I_?e:void 0}function ly(e,t,n){if(Ey(t))return t;const r=t[Si];if(!r)return Fh(t,((o,i)=>OC(e,r,t,o,i,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return cy(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,i=!1;3===r.type_&&(o=new Set(t),t.clear(),i=!0),Fh(o,((o,a)=>OC(e,r,t,o,a,n,i))),cy(e,t,!1),n&&e.patches_&&Yf("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function OC(e,t,n,r,o,i,a){if(ws(o)){const a=ly(e,o,i&&t&&3!==t.type_&&!bv(t.assigned_,r)?i.concat(r):void 0);if(wO(n,r,a),!ws(a))return;e.canAutoFreeze_=!1}else a&&n.add(o);if(bs(o)&&!Ey(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ly(e,o),(!t||!t.scope_.parent_)&&cy(e,o)}}function cy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&C_(t,n)}function YL(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:bO(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=E_;n&&(o=[r],i=Av);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,s}var E_={get(e,t){if(t===Si)return e;const n=Ff(e);if(!bv(n,t))return JL(e,n,t);const r=n[t];return e.finalized_||!bs(r)?r:r===H1(e.base_,t)?(X1(e),e.copy_[t]=jS(r,e)):r},has:(e,t)=>t in Ff(e),ownKeys:e=>Reflect.ownKeys(Ff(e)),set(e,t,n){const r=xO(Ff(e),t);if(null!=r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=H1(Ff(e),t),o=null==r?void 0:r[Si];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(qL(n,r)&&(void 0!==n||bv(e.base_,t)))return!0;X1(e),VS(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==H1(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,X1(e),VS(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Ff(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){_o(11)},getPrototypeOf:e=>Qf(e.base_),setPrototypeOf(){_o(12)}},Av={};function H1(e,t){const n=e[Si];return(n?Ff(n):e)[t]}function JL(e,t,n){var r;const o=xO(t,n);return o?"value"in o?o.value:null==(r=o.get)?void 0:r.call(e.draft_):void 0}function xO(e,t){if(!(t in e))return;let n=Qf(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Qf(n)}}function VS(e){e.modified_||(e.modified_=!0,e.parent_&&VS(e.parent_))}function X1(e){e.copy_||(e.copy_=NS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Fh(E_,((e,t)=>{Av[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Av.deleteProperty=function(e,t){return Av.set.call(this,e,t,void 0)},Av.set=function(e,t,n){return E_.set.call(this,e[0],t,n,e[0])};var ZL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&_o(6),void 0!==n&&"function"!=typeof n&&_o(7),bs(e)){const o=TC(this),i=jS(e,void 0);let a=!0;try{r=t(i),a=!1}finally{a?LS(o):BS(o)}return RC(o,n),MC(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===I_&&(r=void 0),this.autoFreeze_&&C_(r,!0),n){const t=[],o=[];Yf("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}_o(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){bs(e)||_o(8),ws(e)&&(e=AO(e));const t=TC(this),n=jS(e,void 0);return n[Si].isManual_=!0,BS(t),n}finishDraft(e,t){const n=e&&e[Si];(!n||!n.isManual_)&&_o(9);const{scope_:r}=n;return RC(r,t),MC(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=Yf("Patches").applyPatches_;return ws(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function jS(e,t){const n=jv(e)?Yf("MapSet").proxyMap_(e,t):Fv(e)?Yf("MapSet").proxySet_(e,t):YL(e,t);return(t?t.scope_:bO()).drafts_.push(n),n}function AO(e){return ws(e)||_o(10,e),SO(e)}function SO(e){if(!bs(e)||Ey(e))return e;const t=e[Si];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=NS(e,t.scope_.immer_.useStrictShallowCopy_)}else n=NS(e,!0);return Fh(n,((e,t)=>{wO(n,e,SO(t))})),t&&(t.finalized_=!1),n}function e5(){const e="replace",t="remove";function n(e){if(!bs(e))return e;if(Array.isArray(e))return e.map(n);if(jv(e))return new Map(Array.from(e.entries()).map((([e,t])=>[e,n(t)])));if(Fv(e))return new Set(Array.from(e).map(n));const t=Object.create(Qf(e));for(const r in e)t[r]=n(e[r]);return bv(e,dv)&&(t[dv]=e[dv]),t}function r(e){return ws(e)?n(e):e}XL("Patches",{applyPatches_:function(r,o){return o.forEach((o=>{const{path:i,op:a}=o;let s=r;for(let e=0;e<i.length-1;e++){const t=Kf(s);let n=i[e];"string"!=typeof n&&"number"!=typeof n&&(n=""+n),(0===t||1===t)&&("__proto__"===n||"constructor"===n)&&_o(19),"function"==typeof s&&"prototype"===n&&_o(19),s=q1(s,n),"object"!=typeof s&&_o(18,i.join("/"))}const u=Kf(s),l=n(o.value),c=i[i.length-1];switch(a){case e:switch(u){case 2:return s.set(c,l);case 3:_o(16);default:return s[c]=l}case"add":switch(u){case 1:return"-"===c?s.push(l):s.splice(c,0,l);case 2:return s.set(c,l);case 3:return s.add(l);default:return s[c]=l}case t:switch(u){case 1:return s.splice(c,1);case 2:return s.delete(c);case 3:return s.delete(o.value);default:return delete s[c]}default:_o(17,a)}})),r},generatePatches_:function(n,o,i,a){switch(n.type_){case 0:case 2:return function(n,o,i,a){const{base_:s,copy_:u}=n;Fh(n.assigned_,((n,l)=>{const c=q1(s,n),d=q1(u,n),f=l?bv(s,n)?e:"add":t;if(c===d&&f===e)return;const p=o.concat(n);i.push(f===t?{op:f,path:p}:{op:f,path:p,value:d}),a.push("add"===f?{op:t,path:p}:f===t?{op:"add",path:p,value:r(c)}:{op:e,path:p,value:r(c)})}))}(n,o,i,a);case 1:return function(n,o,i,a){let{base_:s,assigned_:u}=n,l=n.copy_;l.length<s.length&&([s,l]=[l,s],[i,a]=[a,i]);for(let t=0;t<s.length;t++)if(u[t]&&l[t]!==s[t]){const n=o.concat([t]);i.push({op:e,path:n,value:r(l[t])}),a.push({op:e,path:n,value:r(s[t])})}for(let e=s.length;e<l.length;e++){const t=o.concat([e]);i.push({op:"add",path:t,value:r(l[e])})}for(let e=l.length-1;s.length<=e;--e){const n=o.concat([e]);a.push({op:t,path:n})}}(n,o,i,a);case 3:return function(e,n,r,o){let{base_:i,copy_:a}=e,s=0;i.forEach((e=>{if(!a.has(e)){const i=n.concat([s]);r.push({op:t,path:i,value:e}),o.unshift({op:"add",path:i,value:e})}s++})),s=0,a.forEach((e=>{if(!i.has(e)){const i=n.concat([s]);r.push({op:"add",path:i,value:e}),o.unshift({op:t,path:i,value:e})}s++}))}(n,o,i,a)}},generateReplacementPatches_:function(t,n,r,o){r.push({op:e,path:[],value:n===I_?void 0:n}),o.push({op:e,path:[],value:t})}})}var Zi=new ZL,zv=Zi.produce,_O=Zi.produceWithPatches.bind(Zi);Zi.setAutoFreeze.bind(Zi),Zi.setUseStrictShallowCopy.bind(Zi);var DC=Zi.applyPatches.bind(Zi);function t5(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function n5(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function r5(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}Zi.createDraft.bind(Zi),Zi.finishDraft.bind(Zi);var $C=e=>Array.isArray(e)?e:[e];function o5(e){const t=Array.isArray(e[0])?e[0]:e;return r5(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function i5(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var a5=class{constructor(e){this.value=e}deref(){return this.value}},s5=typeof WeakRef<"u"?WeakRef:a5,u5=0,NC=1;function Mg(){return{s:u5,v:void 0,o:null,p:null}}function Sv(e,t={}){let n=Mg();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var t;let a=n;const{length:s}=arguments;for(let e=0,t=s;e<t;e++){const t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=a.o;null===e&&(a.o=e=new WeakMap);const n=e.get(t);void 0===n?(a=Mg(),e.set(t,a)):a=n}else{let e=a.p;null===e&&(a.p=e=new Map);const n=e.get(t);void 0===n?(a=Mg(),e.set(t,a)):a=n}}const u=a;let l;if(a.s===NC?l=a.v:(l=e.apply(null,arguments),i++),u.s=NC,r){const e=(null==(t=null==o?void 0:o.deref)?void 0:t.call(o))??o;null!=e&&r(e,l)&&(l=e,0!==i&&i--),o="object"==typeof l&&null!==l||"function"==typeof l?new s5(l):l}return u.v=l,l}return a.clearCache=()=>{n=Mg(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function IO(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,i={},a=e.pop();"object"==typeof a&&(i=a,a=e.pop()),t5(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const s={...n,...i},{memoize:u,memoizeOptions:l=[],argsMemoize:c=Sv,argsMemoizeOptions:d=[],devModeChecks:f={}}=s,p=$C(l),m=$C(d),h=o5(e),g=u((function(){return r++,a.apply(null,arguments)}),...p),y=c((function(){o++;const e=i5(h,arguments);return t=g.apply(null,e),t}),...m);return Object.assign(y,{resultFunc:a,memoizedResultFunc:g,dependencies:h,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:u,argsMemoize:c})};return Object.assign(r,{withTypes:()=>r}),r}var Zn=IO(Sv),l5=Object.assign(((e,t=Zn)=>{n5(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,r)=>(e[n[r]]=t,e)),{})))}),{withTypes:()=>l5}),c5=(...e)=>{const t=IO(...e),n=Object.assign(((...e)=>{const n=t(...e),r=(e,...t)=>n(ws(e)?AO(e):e,...t);return Object.assign(r,n),r}),{withTypes:()=>n});return n};c5(Sv);var d5=e=>e&&"function"==typeof e.match;function zn(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(Io(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>gO(t)&&t.type===e,n}function kC(e){return bs(e)?zv(e,(()=>{})):e}function FS(e,t,n){if(e.has(t)){let r=e.get(t);return n.update&&(r=n.update(r,t,e),e.set(t,r)),r}if(!n.insert)throw new Error(Io(10));const r=n.insert(t,e);return e.set(t,r),r}var iv="RTK_autoBatch",Km=()=>e=>({payload:e,meta:{[iv]:!0}});function CO(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(Io(28));if(r in t)throw new Error(Io(29));return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function f5(e){return"function"==typeof e}function p5(e,t){let n,[r,o,i]=CO(t);if(f5(e))n=()=>kC(e());else{const t=kC(e);n=()=>t}function a(e=n(),t){let a=[r[t.type],...o.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===a.filter((e=>!!e)).length&&(a=[i]),a.reduce(((e,n)=>{if(n){if(ws(e)){const r=n(e,t);return void 0===r?e:r}if(bs(e))return zv(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error(Io(9))}return r}}return e}),e)}return a.getInitialState=n,a}var h5="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Py=(e=21)=>{let t="",n=e;for(;n--;)t+=h5[64*Math.random()|0];return t},EO=(e,t)=>d5(e)?e.match(t):e(t);function yd(...e){return t=>e.some((e=>EO(e,t)))}function fv(...e){return t=>e.every((e=>EO(e,t)))}function Ry(e,t){if(!e||!e.meta)return!1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function Uv(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function P_(...e){return 0===e.length?e=>Ry(e,["pending"]):Uv(e)?t=>yd(...e.map((e=>e.pending)))(t):P_()(e[0])}function zh(...e){return 0===e.length?e=>Ry(e,["rejected"]):Uv(e)?t=>yd(...e.map((e=>e.rejected)))(t):zh()(e[0])}function Ty(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||Uv(e)?n=>fv(zh(...e),t)(n):Ty()(e[0])}function wd(...e){return 0===e.length?e=>Ry(e,["fulfilled"]):Uv(e)?t=>yd(...e.map((e=>e.fulfilled)))(t):wd()(e[0])}function zS(...e){return 0===e.length?e=>Ry(e,["pending","fulfilled","rejected"]):Uv(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return yd(...n)(t)}:zS()(e[0])}var m5=["name","message","stack","code"],Q1=class{constructor(e,t){G1(this,"_type"),this.payload=e,this.meta=t}},LC=class{constructor(e,t){G1(this,"_type"),this.payload=e,this.meta=t}},v5=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of m5)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},BC=(()=>{function e(e,t,n){const r=zn(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),o=zn(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),i=zn(e+"/rejected",((e,t,r,o,i)=>({payload:o,error:(n&&n.serializeError||v5)(e||"Rejected"),meta:{...i||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)}})));return Object.assign((function(e){return(a,s,u)=>{const l=null!=n&&n.idGenerator?n.idGenerator(e):Py(),c=new AbortController;let d,f;function p(e){f=e,c.abort()}const m=async function(){var m,h;let g;try{let i=null==(m=null==n?void 0:n.condition)?void 0:m.call(n,e,{getState:s,extra:u});if(y5(i)&&(i=await i),!1===i||c.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const y=new Promise(((e,t)=>{d=()=>{t({name:"AbortError",message:f||"Aborted"})},c.signal.addEventListener("abort",d)}));a(o(l,e,null==(h=null==n?void 0:n.getPendingMeta)?void 0:h.call(n,{requestId:l,arg:e},{getState:s,extra:u}))),g=await Promise.race([y,Promise.resolve(t(e,{dispatch:a,getState:s,extra:u,requestId:l,signal:c.signal,abort:p,rejectWithValue:(e,t)=>new Q1(e,t),fulfillWithValue:(e,t)=>new LC(e,t)})).then((t=>{if(t instanceof Q1)throw t;return t instanceof LC?r(t.payload,l,e,t.meta):r(t,l,e)}))])}catch(t){g=t instanceof Q1?i(null,l,e,t.payload,t.meta):i(t,l,e)}finally{d&&c.signal.removeEventListener("abort",d)}return n&&!n.dispatchConditionRejection&&i.match(g)&&g.meta.condition||a(g),g}();return Object.assign(m,{abort:p,requestId:l,arg:e,unwrap:()=>m.then(g5)})}}),{pending:o,rejected:i,fulfilled:r,settled:yd(i,r),typePrefix:e})}return e.withTypes=()=>e,e})();function g5(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function y5(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}var w5=Symbol.for("rtk-slice-createasyncthunk");function b5(e,t){return`${e}/${t}`}function x5({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[w5];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error(Io(11));const o=("function"==typeof e.reducers?e.reducers(S5()):e.reducers)||{},i=Object.keys(o),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(Io(12));if(n in a.sliceCaseReducersByType)throw new Error(Io(13));return a.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(a.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,s)};function u(){const[t={},n=[],r]="function"==typeof e.extraReducers?CO(e.extraReducers):[e.extraReducers],o={...t,...a.sliceCaseReducersByType};return p5(e.initialState,(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of a.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}i.forEach((r=>{const i=o[r],a={reducerName:r,type:b5(t,r),createNotation:"function"==typeof e.reducers};I5(i)?E5(a,i,s,n):_5(a,i,s)}));const l=e=>e,c=new Map;let d;function f(e,t){return d||(d=u()),d(e,t)}function p(){return d||(d=u()),d.getInitialState()}function m(t,n=!1){function r(e){let r=e[t];return typeof r>"u"&&n&&(r=p()),r}function o(t=l){const r=FS(c,n,{insert:()=>new WeakMap});return FS(r,t,{insert:()=>{const r={};for(const[o,i]of Object.entries(e.selectors??{}))r[o]=A5(i,t,p,n);return r}})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const h={name:t,reducer:f,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:p,...m(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:f},n),{...h,...m(o,!0)}}};return h}}function A5(e,t,n,r){function o(o,...i){let a=t(o);return typeof a>"u"&&r&&(a=n()),e(a,...i)}return o.unwrapped=e,o}var Wr=x5();function S5(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}function _5({type:e,reducerName:t,createNotation:n},r,o){let i,a;if("reducer"in r){if(n&&!C5(r))throw new Error(Io(17));i=r.reducer,a=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?zn(e,a):zn(e))}function I5(e){return"asyncThunk"===e._reducerDefinitionType}function C5(e){return"reducerWithPrepare"===e._reducerDefinitionType}function E5({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Io(18));const{payloadCreator:i,fulfilled:a,pending:s,rejected:u,settled:l,options:c}=n,d=o(e,i,c);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),u&&r.addCase(d.rejected,u),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:a||Og,pending:s||Og,rejected:u||Og,settled:l||Og})}function Og(){}var P5=(e,t)=>{if("function"!=typeof e)throw new Error(Io(32))},R_="listenerMiddleware",R5=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=zn(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(Io(21));return P5(i),{predicate:o,type:t,effect:i}},T5=Object.assign((e=>{const{type:t,predicate:n,effect:r}=R5(e);return{id:Py(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Io(22))}}}),{withTypes:()=>T5}),M5=Object.assign(zn(`${R_}/add`),{withTypes:()=>M5});zn(`${R_}/removeAll`);var O5=Object.assign(zn(`${R_}/remove`),{withTypes:()=>O5}),D5=e=>"reducerPath"in e&&"string"==typeof e.reducerPath,$5=e=>e.flatMap((e=>D5(e)?[[e.reducerPath,e.reducer]]:Object.entries(e))),T_=Symbol.for("rtk-state-proxy-original"),N5=e=>!!e&&!!e[T_],k5=new WeakMap,L5=(e,t)=>FS(k5,e,{insert:()=>new Proxy(e,{get:(e,n,r)=>{if(n===T_)return e;const o=Reflect.get(e,n,r);if(typeof o>"u"){const e=t[n.toString()];if(e){const t=e(void 0,{type:Py()});if(typeof t>"u")throw new Error(Io(24));return t}}return o}})}),B5=e=>{if(!N5(e))throw new Error(Io(25));return e[T_]},V5=(e={})=>e;function j5(...e){const t=Object.fromEntries($5(e)),n=()=>Object.keys(t).length?vO(t):V5;let r=n();function o(e,t){return r(e,t)}o.withLazyLoadedSlices=()=>o;const i=Object.assign((function(e,n){return function(r,...o){return e(L5(n?n(r,...o):r,t),...o)}}),{original:B5});return Object.assign(o,{inject:(e,i={})=>{const{reducerPath:a,reducer:s}=e,u=t[a];return!i.overrideExisting&&u&&u!==s||(t[a]=s,r=n()),o},selector:i})}function Io(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var F5={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",SENTRY_AUTH_TOKEN:"1d93ff28a44e4c3aaaaff854277cd8583c1de670bd8744bc895670dfd9300840",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/uploads/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",USE_NPM_LIBS:"false",npm_config_ignore_scripts:"true",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/uploads/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"9e186e91ff33922e",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/uploads",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.742",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/uploads",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"false",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/uploads",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3782",APP_NAME:"@wellesley/uploads"},PO=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(PO||{});function z5(e){return{status:e,isUninitialized:"uninitialized"===e,isLoading:"pending"===e,isSuccess:"fulfilled"===e,isError:"rejected"===e}}function U5(e){return new RegExp("(^|:)//").test(e)}var G5=e=>e.replace(/\/$/,""),W5=e=>e.replace(/^\//,"");function q5(e,t){if(!e)return t;if(!t)return e;if(U5(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return`${e=G5(e)}${n}${t=W5(t)}`}var VC=e=>[].concat(...e);function H5(){return typeof navigator>"u"||void 0===navigator.onLine||navigator.onLine}function X5(){return typeof document>"u"||"hidden"!==document.visibilityState}var jC=gd;function RO(e,t){if(e===t||!(jC(e)&&jC(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let o=n.length===r.length;const i=Array.isArray(t)?[]:{};for(const r of n)i[r]=RO(e[r],t[r]),o&&(o=e[r]===i[r]);return o?e:i}var FC=(...e)=>fetch(...e),Q5=e=>e.status>=200&&e.status<=299,K5=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function zC(e){if(!gd(e))return e;const t={...e};for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}function Y5({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:n=FC,paramsSerializer:r,isJsonContentType:o=K5,jsonContentType:i="application/json",jsonReplacer:a,timeout:s,responseHandler:u,validateStatus:l,...c}={}){return typeof fetch>"u"&&n===FC&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(f,p)=>{const{signal:m,getState:h,extra:g,endpoint:y,forced:v,type:b}=p;let w,{url:A,headers:x=new Headers(c.headers),params:S,responseHandler:I=u??"json",validateStatus:E=l??Q5,timeout:C=s,...P}="string"==typeof f?{url:f}:f,k={...c,signal:m,...P};x=new Headers(zC(x)),k.headers=await t(x,{getState:h,extra:g,endpoint:y,forced:v,type:b})||x;const _=e=>"object"==typeof e&&(gd(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!k.headers.has("content-type")&&_(k.body)&&k.headers.set("content-type",i),_(k.body)&&o(k.headers)&&(k.body=JSON.stringify(k.body,a)),S){const e=~A.indexOf("?")?"&":"?";A+=e+(r?r(S):new URLSearchParams(zC(S)))}A=q5(e,A);const T=new Request(A,k);w={request:new Request(A,k)};let M,O=!1,R=C&&setTimeout((()=>{O=!0,p.abort()}),C);try{M=await n(T)}catch(e){return{error:{status:O?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:w}}finally{R&&clearTimeout(R)}const N=M.clone();w.response=N;let z,D="";try{let e;if(await Promise.all([d(M,I).then((e=>z=e),(t=>e=t)),N.text().then((e=>D=e),(()=>{}))]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:M.status,data:D,error:String(e)},meta:w}}return E(M,z)?{data:z,meta:w}:{error:{status:M.status,data:z},meta:w}};async function d(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=o(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var UC=class{constructor(e,t=void 0){this.value=e,this.meta=t}},M_=zn("__rtkq/focused"),TO=zn("__rtkq/unfocused"),O_=zn("__rtkq/online"),MO=zn("__rtkq/offline");function OO(e){return"query"===e.type}function J5(e){return"mutation"===e.type}function D_(e,t,n,r,o,i){return Z5(e)?e(t,n,r,o).map(US).map(i):Array.isArray(e)?e.map(US).map(i):[]}function Z5(e){return"function"==typeof e}function US(e){return"string"==typeof e?{type:e}:e}function GC(e){return null!=e}function Lh(e){let t=0;for(const n in e)t++;return t}function e6(e,t){return e.catch(t)}var _v=Symbol("forceQueryFn"),GS=e=>"function"==typeof e[_v];function t6({serializeQueryArgs:e,queryThunk:t,mutationThunk:n,api:r,context:o}){const i=new Map,a=new Map,{unsubscribeQueryResult:s,removeMutationResult:u,updateSubscriptionOptions:l}=r.internalActions;return{buildInitiateQuery:function(n,o){const a=(u,{subscribe:c=!0,forceRefetch:d,subscriptionOptions:f,[_v]:p,...m}={})=>(h,g)=>{var y;const v=e({queryArgs:u,endpointDefinition:o,endpointName:n}),b=t({...m,type:"query",subscribe:c,forceRefetch:d,subscriptionOptions:f,endpointName:n,originalArgs:u,queryCacheKey:v,[_v]:p}),w=r.endpoints[n].select(u),A=h(b),x=w(g()),{requestId:S,abort:I}=A,E=x.requestId!==S,C=null==(y=i.get(h))?void 0:y[v],P=()=>w(g()),k=Object.assign(p?A.then(P):E&&!C?Promise.resolve(x):Promise.all([C,A]).then(P),{arg:u,requestId:S,subscriptionOptions:f,queryCacheKey:v,abort:I,async unwrap(){const e=await k;if(e.isError)throw e.error;return e.data},refetch:()=>h(a(u,{subscribe:!1,forceRefetch:!0})),unsubscribe(){c&&h(s({queryCacheKey:v,requestId:S}))},updateSubscriptionOptions(e){k.subscriptionOptions=e,h(l({endpointName:n,requestId:S,queryCacheKey:v,options:e}))}});if(!C&&!E&&!p){const e=i.get(h)||{};e[v]=k,i.set(h,e),k.then((()=>{delete e[v],Lh(e)||i.delete(h)}))}return k};return a},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:o}={})=>(i,s)=>{const l=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:o}),c=i(l),{requestId:d,abort:f,unwrap:p}=c,m=e6(c.unwrap().then((e=>({data:e}))),(e=>({error:e}))),h=Object.assign(m,{arg:c.arg,requestId:d,abort:f,unwrap:p,reset:()=>{i(u({requestId:d,fixedCacheKey:o}))}}),g=a.get(i)||{};return a.set(i,g),g[d]=h,h.then((()=>{delete g[d],Lh(g)||a.delete(i)})),o&&(g[o]=h,h.then((()=>{g[o]===h&&(delete g[o],Lh(g)||a.delete(i))}))),h}},getRunningQueryThunk:function(t,n){return r=>{var a;const s=o.endpointDefinitions[t],u=e({queryArgs:n,endpointDefinition:s,endpointName:t});return null==(a=i.get(r))?void 0:a[u]}},getRunningMutationThunk:function(e,t){return e=>{var n;return null==(n=a.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return e=>Object.values(i.get(e)||{}).filter(GC)},getRunningMutationsThunk:function(){return e=>Object.values(a.get(e)||{}).filter(GC)}}}function WC(e){return e}function n6({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:o,assertTagType:i}){const a=async(e,{signal:r,abort:o,rejectWithValue:i,fulfillWithValue:a,dispatch:u,getState:l,extra:c})=>{const d=n[e.endpointName];try{let n,i=WC;const f={signal:r,abort:o,dispatch:u,getState:l,extra:c,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?s(e,l()):void 0},p="query"===e.type?e[_v]:void 0;if(p?n=p():d.query?(n=await t(d.query(e.originalArgs),f,d.extraOptions),d.transformResponse&&(i=d.transformResponse)):n=await d.queryFn(e.originalArgs,f,d.extraOptions,(e=>t(e,f,d.extraOptions))),typeof process<"u"&&F5.NODE_ENV,n.error)throw new UC(n.error,n.meta);return a(await i(n.data,n.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:n.meta,[iv]:!0})}catch(t){let n=t;if(n instanceof UC){let t=WC;d.query&&d.transformErrorResponse&&(t=d.transformErrorResponse);try{return i(await t(n.value,n.meta,e.originalArgs),{baseQueryMeta:n.meta,[iv]:!0})}catch(e){n=e}}throw console.error(n),n}};function s(t,n){var r,o,i;const a=null==(o=null==(r=n[e])?void 0:r.queries)?void 0:o[t.queryCacheKey],s=null==(i=n[e])?void 0:i.config.refetchOnMountOrArgChange,u=null==a?void 0:a.fulfilledTimeStamp,l=t.forceRefetch??(t.subscribe&&s);return!!l&&(!0===l||(Number(new Date)-Number(u))/1e3>=l)}const u=BC(`${e}/executeQuery`,a,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[iv]:!0}),condition(t,{getState:r}){var o,i,a;const u=r(),l=null==(i=null==(o=u[e])?void 0:o.queries)?void 0:i[t.queryCacheKey],c=null==l?void 0:l.fulfilledTimeStamp,d=t.originalArgs,f=null==l?void 0:l.originalArgs,p=n[t.endpointName];return!!GS(t)||"pending"!==(null==l?void 0:l.status)&&(!!(s(t,u)||OO(p)&&null!=(a=null==p?void 0:p.forceRefetch)&&a.call(p,{currentArg:d,previousArg:f,endpointState:l,state:u}))||!c)},dispatchConditionRejection:!0}),l=BC(`${e}/executeMutation`,a,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[iv]:!0})});function c(e){return t=>{var n,r;return(null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return{queryThunk:u,mutationThunk:l,prefetch:(e,t,n)=>(r,i)=>{const a=(e=>"force"in e)(n)&&n.force,s=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,u=(n=!0)=>{const r={forceRefetch:n,isPrefetch:!0};return o.endpoints[e].initiate(t,r)},l=o.endpoints[e].select(t)(i());if(a)r(u());else if(s){const e=null==l?void 0:l.fulfilledTimeStamp;if(!e)return void r(u());(Number(new Date)-Number(new Date(e)))/1e3>=s&&r(u())}else r(u(!1))},updateQueryData:(e,t,n,r=!0)=>(i,a)=>{const s=o.endpoints[e].select(t)(a());let u,l={patches:[],inversePatches:[],undo:()=>i(o.util.patchQueryData(e,t,l.inversePatches,r))};if("uninitialized"===s.status)return l;if("data"in s)if(bs(s.data)){const[e,t,r]=_O(s.data,n);l.patches.push(...t),l.inversePatches.push(...r),u=e}else u=n(s.data),l.patches.push({op:"replace",path:[],value:u}),l.inversePatches.push({op:"replace",path:[],value:s.data});return i(o.util.patchQueryData(e,t,l.patches,r)),l},upsertQueryData:(e,t,n)=>r=>r(o.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[_v]:()=>({data:n})})),patchQueryData:(e,t,a,s)=>(u,l)=>{const c=n[e],d=r({queryArgs:t,endpointDefinition:c,endpointName:e});if(u(o.internalActions.queryResultPatched({queryCacheKey:d,patches:a})),!s)return;const f=o.endpoints[e].select(t)(l()),p=D_(c.providesTags,f.data,void 0,t,{},i);u(o.internalActions.updateProvidedBy({queryCacheKey:d,providedTags:p}))},buildMatchThunkActions:function(e,t){return{matchPending:fv(P_(e),c(t)),matchFulfilled:fv(wd(e),c(t)),matchRejected:fv(zh(e),c(t))}}}}function DO(e,t,n,r){return D_(n[e.meta.arg.endpointName][t],wd(e)?e.payload:void 0,Ty(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function Dg(e,t,n){const r=e[t];r&&n(r)}function Iv(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function qC(e,t,n){const r=e[Iv(t)];r&&n(r)}var Ym={};function r6({reducerPath:e,queryThunk:t,mutationThunk:n,context:{endpointDefinitions:r,apiUid:o,extractRehydrationInfo:i,hasRehydrationInfo:a},assertTagType:s,config:u}){const l=zn(`${e}/resetApiState`),c=Wr({name:`${e}/queries`,initialState:Ym,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:Km()},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:n}}){Dg(e,t,(e=>{e.data=DC(e.data,n.concat())}))},prepare:Km()}},extraReducers(e){e.addCase(t.pending,((e,{meta:t,meta:{arg:n}})=>{var r;const o=GS(n);e[r=n.queryCacheKey]??(e[r]={status:"uninitialized",endpointName:n.endpointName}),Dg(e,n.queryCacheKey,(e=>{e.status="pending",e.requestId=o&&e.requestId?e.requestId:t.requestId,void 0!==n.originalArgs&&(e.originalArgs=n.originalArgs),e.startedTimeStamp=t.startedTimeStamp}))})).addCase(t.fulfilled,((e,{meta:t,payload:n})=>{Dg(e,t.arg.queryCacheKey,(e=>{if(e.requestId!==t.requestId&&!GS(t.arg))return;const{merge:o}=r[t.arg.endpointName];if(e.status="fulfilled",o)if(void 0!==e.data){const{fulfilledTimeStamp:r,arg:i,baseQueryMeta:a,requestId:s}=t;let u=zv(e.data,(e=>o(e,n,{arg:i.originalArgs,baseQueryMeta:a,fulfilledTimeStamp:r,requestId:s})));e.data=u}else e.data=n;else e.data=r[t.arg.endpointName].structuralSharing??1?RO(ws(e.data)?WL(e.data):e.data,n):n;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp}))})).addCase(t.rejected,((e,{meta:{condition:t,arg:n,requestId:r},error:o,payload:i})=>{Dg(e,n.queryCacheKey,(e=>{if(!t){if(e.requestId!==r)return;e.status="rejected",e.error=i??o}}))})).addMatcher(a,((e,t)=>{const{queries:n}=i(t);for(const[t,r]of Object.entries(n))("fulfilled"===(null==r?void 0:r.status)||"rejected"===(null==r?void 0:r.status))&&(e[t]=r)}))}}),d=Wr({name:`${e}/mutations`,initialState:Ym,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=Iv(t);n in e&&delete e[n]},prepare:Km()}},extraReducers(e){e.addCase(n.pending,((e,{meta:t,meta:{requestId:n,arg:r,startedTimeStamp:o}})=>{r.track&&(e[Iv(t)]={requestId:n,status:"pending",endpointName:r.endpointName,startedTimeStamp:o})})).addCase(n.fulfilled,((e,{payload:t,meta:n})=>{n.arg.track&&qC(e,n,(e=>{e.requestId===n.requestId&&(e.status="fulfilled",e.data=t,e.fulfilledTimeStamp=n.fulfilledTimeStamp)}))})).addCase(n.rejected,((e,{payload:t,error:n,meta:r})=>{r.arg.track&&qC(e,r,(e=>{e.requestId===r.requestId&&(e.status="rejected",e.error=t??n)}))})).addMatcher(a,((e,t)=>{const{mutations:n}=i(t);for(const[t,r]of Object.entries(n))("fulfilled"===(null==r?void 0:r.status)||"rejected"===(null==r?void 0:r.status))&&t!==(null==r?void 0:r.requestId)&&(e[t]=r)}))}}),f=Wr({name:`${e}/invalidation`,initialState:Ym,reducers:{updateProvidedBy:{reducer(e,t){var n,r;const{queryCacheKey:o,providedTags:i}=t.payload;for(const t of Object.values(e))for(const e of Object.values(t)){const t=e.indexOf(o);-1!==t&&e.splice(t,1)}for(const{type:t,id:a}of i){const i=(n=e[t]??(e[t]={}))[r=a||"__internal_without_id"]??(n[r]=[]);i.includes(o)||i.push(o)}},prepare:Km()}},extraReducers(e){e.addCase(c.actions.removeQueryResult,((e,{payload:{queryCacheKey:t}})=>{for(const n of Object.values(e))for(const e of Object.values(n)){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}})).addMatcher(a,((e,t)=>{var n,r;const{provided:o}=i(t);for(const[t,i]of Object.entries(o))for(const[o,a]of Object.entries(i)){const i=(n=e[t]??(e[t]={}))[r=o||"__internal_without_id"]??(n[r]=[]);for(const e of a)i.includes(e)||i.push(e)}})).addMatcher(yd(wd(t),Ty(t)),((e,t)=>{const n=DO(t,"providesTags",r,s),{queryCacheKey:o}=t.meta.arg;f.caseReducers.updateProvidedBy(e,f.actions.updateProvidedBy({queryCacheKey:o,providedTags:n}))}))}}),p=Wr({name:`${e}/subscriptions`,initialState:Ym,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),m=Wr({name:`${e}/internalSubscriptions`,initialState:Ym,reducers:{subscriptionsUpdated:{reducer:(e,t)=>DC(e,t.payload),prepare:Km()}}}),h=Wr({name:`${e}/config`,initialState:{online:H5(),focused:X5(),middlewareRegistered:!1,...u},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&o===t||"conflict"}},extraReducers:e=>{e.addCase(O_,(e=>{e.online=!0})).addCase(MO,(e=>{e.online=!1})).addCase(M_,(e=>{e.focused=!0})).addCase(TO,(e=>{e.focused=!1})).addMatcher(a,(e=>({...e})))}}),g=vO({queries:c.reducer,mutations:d.reducer,provided:f.reducer,subscriptions:m.reducer,config:h.reducer});return{reducer:(e,t)=>g(l.match(t)?void 0:e,t),actions:{...h.actions,...c.actions,...p.actions,...m.actions,...d.actions,...f.actions,resetApiState:l}}}var Gf=Symbol.for("RTKQ/skipToken"),$O={status:"uninitialized"},HC=zv($O,(()=>{})),XC=zv($O,(()=>{}));function o6({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=e=>HC,o=e=>XC;return{buildQuerySelector:function(t,o){return s=>{const u=e({queryArgs:s,endpointDefinition:o,endpointName:t});return n(s===Gf?r:e=>{var t,n;return(null==(n=null==(t=a(e))?void 0:t.queries)?void 0:n[u])??HC},i)}},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?Iv(e)??Gf:e,n(t===Gf?o:e=>{var n,r;return(null==(r=null==(n=a(e))?void 0:n.mutations)?void 0:r[t])??XC},i)}},selectInvalidatedBy:function(e,n){const r=e[t],o=new Set;for(const e of n.map(US)){const t=r.provided[e.type];if(!t)continue;let n=(void 0!==e.id?t[e.id]:VC(Object.values(t)))??[];for(const e of n)o.add(e)}return VC(Array.from(o.values()).map((e=>{const t=r.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))},selectCachedArgsForQuery:function(e,n){return Object.values(e[t].queries).filter((e=>(null==e?void 0:e.endpointName)===n&&"uninitialized"!==e.status)).map((e=>e.originalArgs))}};function i(e){return{...e,...z5(e.status)}}function a(e){return e[t]}}var Ih=WeakMap?new WeakMap:void 0,QC=({endpointName:e,queryArgs:t})=>{let n="";const r=null==Ih?void 0:Ih.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,((e,t)=>gd(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t));gd(t)&&(null==Ih||Ih.set(t,e)),n=e}return`${e}(${n})`};function i6(...e){return function(t){const n=Sv((e=>{var n;return null==(n=t.extractRehydrationInfo)?void 0:n.call(t,e,{reducerPath:t.reducerPath??"api"})})),r={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:n,serializeQueryArgs(e){let n=QC;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:QC({...e,queryArgs:n})}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},o={endpointDefinitions:{},batch(e){e()},apiUid:Py(),extractRehydrationInfo:n,hasRehydrationInfo:Sv((e=>null!=n(e)))},i={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:"query"}),mutation:e=>({...e,type:"mutation"})});for(const[n,r]of Object.entries(t))if(!0!==e.overrideExisting&&n in o.endpointDefinitions){if("throw"===e.overrideExisting)throw new Error(Io(39))}else{o.endpointDefinitions[n]=r;for(const e of a)e.injectEndpoint(n,r)}return i},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const t of e)r.tagTypes.includes(t)||r.tagTypes.push(t);if(t)for(const[e,n]of Object.entries(t))"function"==typeof n?n(o.endpointDefinitions[e]):Object.assign(o.endpointDefinitions[e]||{},n);return i}},a=e.map((e=>e.init(i,r,o)));return i.injectEndpoints({endpoints:t.endpoints})}}function a6(e){for(let t in e)return!1;return!0}var s6=2147482.647,u6=({reducerPath:e,api:t,context:n,internalState:r})=>{const{removeQueryResult:o,unsubscribeQueryResult:i}=t.internalActions;function a(e){const t=r.currentSubscriptions[e];return!!t&&!a6(t)}const s={};function u(e,t,r,i){const u=n.endpointDefinitions[t],l=(null==u?void 0:u.keepUnusedDataFor)??i.keepUnusedDataFor;if(l===1/0)return;const c=Math.max(0,Math.min(l,s6));if(!a(e)){const t=s[e];t&&clearTimeout(t),s[e]=setTimeout((()=>{a(e)||r.dispatch(o({queryCacheKey:e})),delete s[e]}),1e3*c)}}return(r,o,a)=>{var l;if(i.match(r)){const t=o.getState()[e],{queryCacheKey:n}=r.payload;u(n,null==(l=t.queries[n])?void 0:l.endpointName,o,t.config)}if(t.util.resetApiState.match(r))for(const[e,t]of Object.entries(s))t&&clearTimeout(t),delete s[e];if(n.hasRehydrationInfo(r)){const t=o.getState()[e],{queries:i}=n.extractRehydrationInfo(r);for(const[e,n]of Object.entries(i))u(e,null==n?void 0:n.endpointName,o,t.config)}}},l6=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:o,api:i,assertTagType:a,refetchQuery:s,internalState:u})=>{const{removeQueryResult:l}=i.internalActions,c=yd(wd(r),Ty(r)),d=yd(wd(r,o),zh(r,o));let f=[];function p(n,r){const o=r.getState(),a=o[e];if(f.push(...n),"delayed"===a.config.invalidationBehavior&&function(e){var t,n;for(const n in e.queries)if("pending"===(null==(t=e.queries[n])?void 0:t.status))return!0;for(const t in e.mutations)if("pending"===(null==(n=e.mutations[t])?void 0:n.status))return!0;return!1}(a))return;const c=f;if(f=[],0===c.length)return;const d=i.util.selectInvalidatedBy(o,c);t.batch((()=>{const e=Array.from(d.values());for(const{queryCacheKey:t}of e){const e=a.queries[t],n=u.currentSubscriptions[t]??{};e&&(0===Lh(n)?r.dispatch(l({queryCacheKey:t})):"uninitialized"!==e.status&&r.dispatch(s(e,t)))}}))}return(e,t)=>{c(e)?p(DO(e,"invalidatesTags",n,a),t):d(e)?p([],t):i.util.invalidateTags.match(e)&&p(D_(e.payload,void 0,void 0,void 0,void 0,a),t)}},c6=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:o})=>{const i={};function a({queryCacheKey:t},n){const s=n.getState()[e],u=s.queries[t],c=o.currentSubscriptions[t];if(!u||"uninitialized"===u.status)return;const{lowestPollingInterval:d,skipPollingIfUnfocused:f}=l(c);if(!Number.isFinite(d))return;const p=i[t];null!=p&&p.timeout&&(clearTimeout(p.timeout),p.timeout=void 0);const m=Date.now()+d;i[t]={nextPollTimestamp:m,pollingInterval:d,timeout:setTimeout((()=>{(s.config.focused||!f)&&n.dispatch(r(u,t)),a({queryCacheKey:t},n)}),d)}}function s({queryCacheKey:t},n){const r=n.getState()[e].queries[t],s=o.currentSubscriptions[t];if(!r||"uninitialized"===r.status)return;const{lowestPollingInterval:c}=l(s);if(!Number.isFinite(c))return void u(t);const d=i[t],f=Date.now()+c;(!d||f<d.nextPollTimestamp)&&a({queryCacheKey:t},n)}function u(e){const t=i[e];null!=t&&t.timeout&&clearTimeout(t.timeout),delete i[e]}function l(e={}){let t=!1,n=Number.POSITIVE_INFINITY;for(let r in e)e[r].pollingInterval&&(n=Math.min(e[r].pollingInterval,n),t=e[r].skipPollingIfUnfocused||t);return{lowestPollingInterval:n,skipPollingIfUnfocused:t}}return(e,r)=>{(n.internalActions.updateSubscriptionOptions.match(e)||n.internalActions.unsubscribeQueryResult.match(e))&&s(e.payload,r),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&s(e.meta.arg,r),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&a(e.meta.arg,r),n.util.resetApiState.match(e)&&function(){for(const e of Object.keys(i))u(e)}()}},d6=({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:o})=>{const{removeQueryResult:i}=n.internalActions;function a(n,a){const s=n.getState()[e],u=s.queries,l=o.currentSubscriptions;t.batch((()=>{for(const e of Object.keys(l)){const t=u[e],o=l[e];o&&t&&((Object.values(o).some((e=>!0===e[a]))||Object.values(o).every((e=>void 0===e[a]))&&s.config[a])&&(0===Lh(o)?n.dispatch(i({queryCacheKey:e})):"uninitialized"!==t.status&&n.dispatch(r(t,e))))}}))}return(e,t)=>{M_.match(e)&&a(t,"refetchOnFocus"),O_.match(e)&&a(t,"refetchOnReconnect")}},KC=new Error("Promise never resolved before cacheEntryRemoved."),f6=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:o,internalState:i})=>{const a=zS(r),s=zS(o),u=wd(r,o),l={};function c(t,r,o,i,a){const s=n.endpointDefinitions[t],u=null==s?void 0:s.onCacheEntryAdded;if(!u)return;let c={};const d=new Promise((e=>{c.cacheEntryRemoved=e})),f=Promise.race([new Promise((e=>{c.valueResolved=e})),d.then((()=>{throw KC}))]);f.catch((()=>{})),l[o]=c;const p=e.endpoints[t].select("query"===s.type?r:o),m=i.dispatch(((e,t,n)=>n)),h={...i,getCacheEntry:()=>p(i.getState()),requestId:a,extra:m,updateCachedData:"query"===s.type?n=>i.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:f,cacheEntryRemoved:d},g=u(r,h);Promise.resolve(g).catch((e=>{if(e!==KC)throw e}))}return(n,i,d)=>{const f=function(t){return a(t)?t.meta.arg.queryCacheKey:s(t)?t.meta.arg.fixedCacheKey??t.meta.requestId:e.internalActions.removeQueryResult.match(t)?t.payload.queryCacheKey:e.internalActions.removeMutationResult.match(t)?Iv(t.payload):""}(n);if(r.pending.match(n)){const e=d[t].queries[f],r=i.getState()[t].queries[f];!e&&r&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,i,n.meta.requestId)}else if(o.pending.match(n))i.getState()[t].mutations[f]&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,i,n.meta.requestId);else if(u(n)){const e=l[f];null!=e&&e.valueResolved&&(e.valueResolved({data:n.payload,meta:n.meta.baseQueryMeta}),delete e.valueResolved)}else if(e.internalActions.removeQueryResult.match(n)||e.internalActions.removeMutationResult.match(n)){const e=l[f];e&&(delete l[f],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(n))for(const[e,t]of Object.entries(l))delete l[e],t.cacheEntryRemoved()}},p6=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const o=P_(n,r),i=zh(n,r),a=wd(n,r),s={};return(n,r)=>{var u,l;if(o(n)){const{requestId:o,arg:{endpointName:i,originalArgs:a}}=n.meta,u=t.endpointDefinitions[i],l=null==u?void 0:u.onQueryStarted;if(l){const t={},n=new Promise(((e,n)=>{t.resolve=e,t.reject=n}));n.catch((()=>{})),s[o]=t;const c=e.endpoints[i].select("query"===u.type?a:o),d=r.dispatch(((e,t,n)=>n)),f={...r,getCacheEntry:()=>c(r.getState()),requestId:o,extra:d,updateCachedData:"query"===u.type?t=>r.dispatch(e.util.updateQueryData(i,a,t)):void 0,queryFulfilled:n};l(a,f)}}else if(a(n)){const{requestId:e,baseQueryMeta:t}=n.meta;null==(u=s[e])||u.resolve({data:n.payload,meta:t}),delete s[e]}else if(i(n)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:r}=n.meta;null==(l=s[e])||l.reject({error:n.payload??n.error,isUnhandledError:!t,meta:r}),delete s[e]}}},h6=({api:e,context:{apiUid:t},reducerPath:n})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t))},m6=({api:e,queryThunk:t,internalState:n})=>{const r=`${e.reducerPath}/subscriptions`;let o=null,i=null;const{updateSubscriptionOptions:a,unsubscribeQueryResult:s}=e.internalActions,u=()=>n.currentSubscriptions,l={getSubscriptions:u,getSubscriptionCount:e=>Lh(u()[e]??{}),isRequestSubscribed:(e,t)=>{var n;const r=u();return!(null==(n=null==r?void 0:r[e])||!n[t])}};return(u,c)=>{if(o||(o=JSON.parse(JSON.stringify(n.currentSubscriptions))),e.util.resetApiState.match(u))return o=n.currentSubscriptions={},i=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(u))return[!1,l];const d=((n,r)=>{var o,i,u;if(a.match(r)){const{queryCacheKey:e,requestId:t,options:i}=r.payload;return null!=(o=null==n?void 0:n[e])&&o[t]&&(n[e][t]=i),!0}if(s.match(r)){const{queryCacheKey:e,requestId:t}=r.payload;return n[e]&&delete n[e][t],!0}if(e.internalActions.removeQueryResult.match(r))return delete n[r.payload.queryCacheKey],!0;if(t.pending.match(r)){const{meta:{arg:e,requestId:t}}=r,o=n[i=e.queryCacheKey]??(n[i]={});return o[`${t}_running`]={},e.subscribe&&(o[t]=e.subscriptionOptions??o[t]??{}),!0}let l=!1;if(t.fulfilled.match(r)||t.rejected.match(r)){const e=n[r.meta.arg.queryCacheKey]||{},t=`${r.meta.requestId}_running`;l||(l=!!e[t]),delete e[t]}if(t.rejected.match(r)){const{meta:{condition:e,arg:t,requestId:o}}=r;if(e&&t.subscribe){const e=n[u=t.queryCacheKey]??(n[u]={});e[o]=t.subscriptionOptions??e[o]??{},l=!0}}return l})(n.currentSubscriptions,u);let f=!0;if(d){i||(i=setTimeout((()=>{const t=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,r]=_O(o,(()=>t));c.next(e.internalActions.subscriptionsUpdated(r)),o=t,i=null}),500));const a="string"==typeof u.type&&!!u.type.startsWith(r),s=t.rejected.match(u)&&u.meta.condition&&!!u.meta.arg.subscribe;f=!a&&!s}return[f,!1]}};function v6(e){const{reducerPath:t,queryThunk:n,api:r,context:o}=e,{apiUid:i}=o,a={invalidateTags:zn(`${t}/invalidateTags`)},s=e=>e.type.startsWith(`${t}/`),u=[h6,u6,l6,c6,f6,p6];return{middleware:n=>{let a=!1;const c={...e,internalState:{currentSubscriptions:{}},refetchQuery:l,isThisApiSliceAction:s},d=u.map((e=>e(c))),f=m6(c),p=d6(c);return e=>u=>{if(!gO(u))return e(u);a||(a=!0,n.dispatch(r.internalActions.middlewareRegistered(i)));const l={...n,next:e},c=n.getState(),[m,h]=f(u,l,c);let g;if(g=m?e(u):h,n.getState()[t]&&(p(u,l,c),s(u)||o.hasRehydrationInfo(u)))for(let e of d)e(u,l,c);return g}},actions:a};function l(e,t,r={}){return n({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t,...r})}}function ad(e,...t){return Object.assign(e,...t)}var YC=Symbol(),g6=({createSelector:e=Zn}={})=>({name:YC,init(t,{baseQuery:n,tagTypes:r,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:s,refetchOnFocus:u,refetchOnReconnect:l,invalidationBehavior:c},d){e5();const f=e=>e;Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:O_,onOffline:MO,onFocus:M_,onFocusLost:TO},util:{}});const{queryThunk:p,mutationThunk:m,patchQueryData:h,updateQueryData:g,upsertQueryData:y,prefetch:v,buildMatchThunkActions:b}=n6({baseQuery:n,reducerPath:o,context:d,api:t,serializeQueryArgs:i,assertTagType:f}),{reducer:w,actions:A}=r6({context:d,queryThunk:p,mutationThunk:m,reducerPath:o,assertTagType:f,config:{refetchOnFocus:u,refetchOnReconnect:l,refetchOnMountOrArgChange:s,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:c}});ad(t.util,{patchQueryData:h,updateQueryData:g,upsertQueryData:y,prefetch:v,resetApiState:A.resetApiState}),ad(t.internalActions,A);const{middleware:x,actions:S}=v6({reducerPath:o,context:d,queryThunk:p,mutationThunk:m,api:t,assertTagType:f});ad(t.util,S),ad(t,{reducer:w,middleware:x});const{buildQuerySelector:I,buildMutationSelector:E,selectInvalidatedBy:C,selectCachedArgsForQuery:P}=o6({serializeQueryArgs:i,reducerPath:o,createSelector:e});ad(t.util,{selectInvalidatedBy:C,selectCachedArgsForQuery:P});const{buildInitiateQuery:k,buildInitiateMutation:_,getRunningMutationThunk:T,getRunningMutationsThunk:M,getRunningQueriesThunk:O,getRunningQueryThunk:R}=t6({queryThunk:p,mutationThunk:m,api:t,serializeQueryArgs:i,context:d});return ad(t.util,{getRunningMutationThunk:T,getRunningMutationsThunk:M,getRunningQueryThunk:R,getRunningQueriesThunk:O}),{name:YC,injectEndpoint(e,n){var r;const o=t;(r=o.endpoints)[e]??(r[e]={}),OO(n)?ad(o.endpoints[e],{name:e,select:I(e,n),initiate:k(e,n)},b(p,e)):J5(n)&&ad(o.endpoints[e],{name:e,select:E(),initiate:_(e)},b(m,e))}}}}),$a=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function My(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var JC,ZC,K1={exports:{}},Tt={};
|
|
1
|
+
var VL=Object.defineProperty,jL=(e,t,n)=>t in e?VL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,G1=(e,t,n)=>jL(e,"symbol"!=typeof t?t+"":t,n);function FL(e,t){for(var n=0;n<t.length;n++){const r=t[n];if("string"!=typeof r&&!Array.isArray(r))for(const t in r)if("default"!==t&&!(t in e)){const n=Object.getOwnPropertyDescriptor(r,t);n&&Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function $S(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var W1=()=>Math.random().toString(36).substring(7).split("").join("."),zL={INIT:`@@redux/INIT${W1()}`,REPLACE:`@@redux/REPLACE${W1()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${W1()}`},PC=zL;function gd(e){if("object"!=typeof e||null===e)return!1;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||null===Object.getPrototypeOf(e)}function UL(e){Object.keys(e).forEach((t=>{const n=e[t];if(typeof n(void 0,{type:PC.INIT})>"u")throw new Error($S(12));if(typeof n(void 0,{type:PC.PROBE_UNKNOWN_ACTION()})>"u")throw new Error($S(13))}))}function vO(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const o=t[r];"function"==typeof e[o]&&(n[o]=e[o])}const r=Object.keys(n);let o;try{UL(n)}catch(e){o=e}return function(e={},t){if(o)throw o;let i=!1;const a={};for(let o=0;o<r.length;o++){const s=r[o],u=n[s],l=e[s],c=u(l,t);if(typeof c>"u")throw t&&t.type,new Error($S(14));a[s]=c,i=i||c!==l}return i=i||r.length!==Object.keys(e).length,i?a:e}}function gO(e){return gd(e)&&"type"in e&&"string"==typeof e.type}var I_=Symbol.for("immer-nothing"),dv=Symbol.for("immer-draftable"),Si=Symbol.for("immer-state");function _o(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Qf=Object.getPrototypeOf;function ws(e){return!!e&&!!e[Si]}function bs(e){var t;return!!e&&(yO(e)||Array.isArray(e)||!!e[dv]||!(null==(t=e.constructor)||!t[dv])||jv(e)||Fv(e))}var GL=Object.prototype.constructor.toString();function yO(e){if(!e||"object"!=typeof e)return!1;const t=Qf(e);if(null===t)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===GL}function WL(e){return ws(e)||_o(15,e),e[Si].base_}function Fh(e,t){0===Kf(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function Kf(e){const t=e[Si];return t?t.type_:Array.isArray(e)?1:jv(e)?2:Fv(e)?3:0}function bv(e,t){return 2===Kf(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function q1(e,t){return 2===Kf(e)?e.get(t):e[t]}function wO(e,t,n){const r=Kf(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function qL(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function jv(e){return e instanceof Map}function Fv(e){return e instanceof Set}function Ff(e){return e.copy_||e.base_}function NS(e,t){if(jv(e))return new Map(e);if(Fv(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&yO(e))return Qf(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Si];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const o=r[t],i=n[o];!1===i.writable&&(i.writable=!0,i.configurable=!0),(i.get||i.set)&&(n[o]={configurable:!0,writable:!0,enumerable:i.enumerable,value:e[o]})}return Object.create(Qf(e),n)}function C_(e,t=!1){return Ey(e)||ws(e)||!bs(e)||(Kf(e)>1&&(e.set=e.add=e.clear=e.delete=HL),Object.freeze(e),t&&Fh(e,((e,t)=>C_(t,!0)))),e}function HL(){_o(2)}function Ey(e){return Object.isFrozen(e)}var xv,kS={};function Yf(e){const t=kS[e];return t||_o(0,e),t}function XL(e,t){kS[e]||(kS[e]=t)}function bO(){return xv}function QL(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function RC(e,t){t&&(Yf("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function LS(e){BS(e),e.drafts_.forEach(KL),e.drafts_=null}function BS(e){e===xv&&(xv=e.parent_)}function TC(e){return xv=QL(xv,e)}function KL(e){const t=e[Si];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function MC(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Si].modified_&&(LS(t),_o(4)),bs(e)&&(e=ly(t,e),t.parent_||cy(t,e)),t.patches_&&Yf("Patches").generateReplacementPatches_(n[Si].base_,e,t.patches_,t.inversePatches_)):e=ly(t,n,[]),LS(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==I_?e:void 0}function ly(e,t,n){if(Ey(t))return t;const r=t[Si];if(!r)return Fh(t,((o,i)=>OC(e,r,t,o,i,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return cy(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let o=t,i=!1;3===r.type_&&(o=new Set(t),t.clear(),i=!0),Fh(o,((o,a)=>OC(e,r,t,o,a,n,i))),cy(e,t,!1),n&&e.patches_&&Yf("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function OC(e,t,n,r,o,i,a){if(ws(o)){const a=ly(e,o,i&&t&&3!==t.type_&&!bv(t.assigned_,r)?i.concat(r):void 0);if(wO(n,r,a),!ws(a))return;e.canAutoFreeze_=!1}else a&&n.add(o);if(bs(o)&&!Ey(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ly(e,o),(!t||!t.scope_.parent_)&&cy(e,o)}}function cy(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&C_(t,n)}function YL(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:bO(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,i=E_;n&&(o=[r],i=Av);const{revoke:a,proxy:s}=Proxy.revocable(o,i);return r.draft_=s,r.revoke_=a,s}var E_={get(e,t){if(t===Si)return e;const n=Ff(e);if(!bv(n,t))return JL(e,n,t);const r=n[t];return e.finalized_||!bs(r)?r:r===H1(e.base_,t)?(X1(e),e.copy_[t]=jS(r,e)):r},has:(e,t)=>t in Ff(e),ownKeys:e=>Reflect.ownKeys(Ff(e)),set(e,t,n){const r=xO(Ff(e),t);if(null!=r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=H1(Ff(e),t),o=null==r?void 0:r[Si];if(o&&o.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(qL(n,r)&&(void 0!==n||bv(e.base_,t)))return!0;X1(e),VS(e)}return e.copy_[t]===n&&(void 0!==n||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty:(e,t)=>(void 0!==H1(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,X1(e),VS(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Ff(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){_o(11)},getPrototypeOf:e=>Qf(e.base_),setPrototypeOf(){_o(12)}},Av={};function H1(e,t){const n=e[Si];return(n?Ff(n):e)[t]}function JL(e,t,n){var r;const o=xO(t,n);return o?"value"in o?o.value:null==(r=o.get)?void 0:r.call(e.draft_):void 0}function xO(e,t){if(!(t in e))return;let n=Qf(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=Qf(n)}}function VS(e){e.modified_||(e.modified_=!0,e.parent_&&VS(e.parent_))}function X1(e){e.copy_||(e.copy_=NS(e.base_,e.scope_.immer_.useStrictShallowCopy_))}Fh(E_,((e,t)=>{Av[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Av.deleteProperty=function(e,t){return Av.set.call(this,e,t,void 0)},Av.set=function(e,t,n){return E_.set.call(this,e[0],t,n,e[0])};var ZL=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(e,t,n)=>{if("function"==typeof e&&"function"!=typeof t){const n=t;t=e;const r=this;return function(e=n,...o){return r.produce(e,(e=>t.call(this,e,...o)))}}let r;if("function"!=typeof t&&_o(6),void 0!==n&&"function"!=typeof n&&_o(7),bs(e)){const o=TC(this),i=jS(e,void 0);let a=!0;try{r=t(i),a=!1}finally{a?LS(o):BS(o)}return RC(o,n),MC(r,o)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===I_&&(r=void 0),this.autoFreeze_&&C_(r,!0),n){const t=[],o=[];Yf("Patches").generateReplacementPatches_(e,r,t,o),n(t,o)}return r}_o(1,e)},this.produceWithPatches=(e,t)=>{if("function"==typeof e)return(t,...n)=>this.produceWithPatches(t,(t=>e(t,...n)));let n,r;return[this.produce(e,t,((e,t)=>{n=e,r=t})),n,r]},"boolean"==typeof(null==e?void 0:e.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),"boolean"==typeof(null==e?void 0:e.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){bs(e)||_o(8),ws(e)&&(e=AO(e));const t=TC(this),n=jS(e,void 0);return n[Si].isManual_=!0,BS(t),n}finishDraft(e,t){const n=e&&e[Si];(!n||!n.isManual_)&&_o(9);const{scope_:r}=n;return RC(r,t),MC(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const r=t[n];if(0===r.path.length&&"replace"===r.op){e=r.value;break}}n>-1&&(t=t.slice(n+1));const r=Yf("Patches").applyPatches_;return ws(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function jS(e,t){const n=jv(e)?Yf("MapSet").proxyMap_(e,t):Fv(e)?Yf("MapSet").proxySet_(e,t):YL(e,t);return(t?t.scope_:bO()).drafts_.push(n),n}function AO(e){return ws(e)||_o(10,e),SO(e)}function SO(e){if(!bs(e)||Ey(e))return e;const t=e[Si];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=NS(e,t.scope_.immer_.useStrictShallowCopy_)}else n=NS(e,!0);return Fh(n,((e,t)=>{wO(n,e,SO(t))})),t&&(t.finalized_=!1),n}function e5(){const e="replace",t="remove";function n(e){if(!bs(e))return e;if(Array.isArray(e))return e.map(n);if(jv(e))return new Map(Array.from(e.entries()).map((([e,t])=>[e,n(t)])));if(Fv(e))return new Set(Array.from(e).map(n));const t=Object.create(Qf(e));for(const r in e)t[r]=n(e[r]);return bv(e,dv)&&(t[dv]=e[dv]),t}function r(e){return ws(e)?n(e):e}XL("Patches",{applyPatches_:function(r,o){return o.forEach((o=>{const{path:i,op:a}=o;let s=r;for(let e=0;e<i.length-1;e++){const t=Kf(s);let n=i[e];"string"!=typeof n&&"number"!=typeof n&&(n=""+n),(0===t||1===t)&&("__proto__"===n||"constructor"===n)&&_o(19),"function"==typeof s&&"prototype"===n&&_o(19),s=q1(s,n),"object"!=typeof s&&_o(18,i.join("/"))}const u=Kf(s),l=n(o.value),c=i[i.length-1];switch(a){case e:switch(u){case 2:return s.set(c,l);case 3:_o(16);default:return s[c]=l}case"add":switch(u){case 1:return"-"===c?s.push(l):s.splice(c,0,l);case 2:return s.set(c,l);case 3:return s.add(l);default:return s[c]=l}case t:switch(u){case 1:return s.splice(c,1);case 2:return s.delete(c);case 3:return s.delete(o.value);default:return delete s[c]}default:_o(17,a)}})),r},generatePatches_:function(n,o,i,a){switch(n.type_){case 0:case 2:return function(n,o,i,a){const{base_:s,copy_:u}=n;Fh(n.assigned_,((n,l)=>{const c=q1(s,n),d=q1(u,n),f=l?bv(s,n)?e:"add":t;if(c===d&&f===e)return;const p=o.concat(n);i.push(f===t?{op:f,path:p}:{op:f,path:p,value:d}),a.push("add"===f?{op:t,path:p}:f===t?{op:"add",path:p,value:r(c)}:{op:e,path:p,value:r(c)})}))}(n,o,i,a);case 1:return function(n,o,i,a){let{base_:s,assigned_:u}=n,l=n.copy_;l.length<s.length&&([s,l]=[l,s],[i,a]=[a,i]);for(let t=0;t<s.length;t++)if(u[t]&&l[t]!==s[t]){const n=o.concat([t]);i.push({op:e,path:n,value:r(l[t])}),a.push({op:e,path:n,value:r(s[t])})}for(let e=s.length;e<l.length;e++){const t=o.concat([e]);i.push({op:"add",path:t,value:r(l[e])})}for(let e=l.length-1;s.length<=e;--e){const n=o.concat([e]);a.push({op:t,path:n})}}(n,o,i,a);case 3:return function(e,n,r,o){let{base_:i,copy_:a}=e,s=0;i.forEach((e=>{if(!a.has(e)){const i=n.concat([s]);r.push({op:t,path:i,value:e}),o.unshift({op:"add",path:i,value:e})}s++})),s=0,a.forEach((e=>{if(!i.has(e)){const i=n.concat([s]);r.push({op:"add",path:i,value:e}),o.unshift({op:t,path:i,value:e})}s++}))}(n,o,i,a)}},generateReplacementPatches_:function(t,n,r,o){r.push({op:e,path:[],value:n===I_?void 0:n}),o.push({op:e,path:[],value:t})}})}var Zi=new ZL,zv=Zi.produce,_O=Zi.produceWithPatches.bind(Zi);Zi.setAutoFreeze.bind(Zi),Zi.setUseStrictShallowCopy.bind(Zi);var DC=Zi.applyPatches.bind(Zi);function t5(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function n5(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function r5(e,t="expected all items to be functions, instead received the following types: "){if(!e.every((e=>"function"==typeof e))){const n=e.map((e=>"function"==typeof e?`function ${e.name||"unnamed"}()`:typeof e)).join(", ");throw new TypeError(`${t}[${n}]`)}}Zi.createDraft.bind(Zi),Zi.finishDraft.bind(Zi);var $C=e=>Array.isArray(e)?e:[e];function o5(e){const t=Array.isArray(e[0])?e[0]:e;return r5(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function i5(e,t){const n=[],{length:r}=e;for(let o=0;o<r;o++)n.push(e[o].apply(null,t));return n}var a5=class{constructor(e){this.value=e}deref(){return this.value}},s5=typeof WeakRef<"u"?WeakRef:a5,u5=0,NC=1;function Mg(){return{s:u5,v:void 0,o:null,p:null}}function Sv(e,t={}){let n=Mg();const{resultEqualityCheck:r}=t;let o,i=0;function a(){var t;let a=n;const{length:s}=arguments;for(let e=0,t=s;e<t;e++){const t=arguments[e];if("function"==typeof t||"object"==typeof t&&null!==t){let e=a.o;null===e&&(a.o=e=new WeakMap);const n=e.get(t);void 0===n?(a=Mg(),e.set(t,a)):a=n}else{let e=a.p;null===e&&(a.p=e=new Map);const n=e.get(t);void 0===n?(a=Mg(),e.set(t,a)):a=n}}const u=a;let l;if(a.s===NC?l=a.v:(l=e.apply(null,arguments),i++),u.s=NC,r){const e=(null==(t=null==o?void 0:o.deref)?void 0:t.call(o))??o;null!=e&&r(e,l)&&(l=e,0!==i&&i--),o="object"==typeof l&&null!==l||"function"==typeof l?new s5(l):l}return u.v=l,l}return a.clearCache=()=>{n=Mg(),a.resetResultsCount()},a.resultsCount=()=>i,a.resetResultsCount=()=>{i=0},a}function IO(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,o=0,i={},a=e.pop();"object"==typeof a&&(i=a,a=e.pop()),t5(a,`createSelector expects an output function after the inputs, but received: [${typeof a}]`);const s={...n,...i},{memoize:u,memoizeOptions:l=[],argsMemoize:c=Sv,argsMemoizeOptions:d=[],devModeChecks:f={}}=s,p=$C(l),m=$C(d),h=o5(e),g=u((function(){return r++,a.apply(null,arguments)}),...p),y=c((function(){o++;const e=i5(h,arguments);return t=g.apply(null,e),t}),...m);return Object.assign(y,{resultFunc:a,memoizedResultFunc:g,dependencies:h,dependencyRecomputations:()=>o,resetDependencyRecomputations:()=>{o=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:u,argsMemoize:c})};return Object.assign(r,{withTypes:()=>r}),r}var Zn=IO(Sv),l5=Object.assign(((e,t=Zn)=>{n5(e,"createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);const n=Object.keys(e);return t(n.map((t=>e[t])),((...e)=>e.reduce(((e,t,r)=>(e[n[r]]=t,e)),{})))}),{withTypes:()=>l5}),c5=(...e)=>{const t=IO(...e),n=Object.assign(((...e)=>{const n=t(...e),r=(e,...t)=>n(ws(e)?AO(e):e,...t);return Object.assign(r,n),r}),{withTypes:()=>n});return n};c5(Sv);var d5=e=>e&&"function"==typeof e.match;function zn(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(Io(0));return{type:e,payload:r.payload,..."meta"in r&&{meta:r.meta},..."error"in r&&{error:r.error}}}return{type:e,payload:n[0]}}return n.toString=()=>`${e}`,n.type=e,n.match=t=>gO(t)&&t.type===e,n}function kC(e){return bs(e)?zv(e,(()=>{})):e}function FS(e,t,n){if(e.has(t)){let r=e.get(t);return n.update&&(r=n.update(r,t,e),e.set(t,r)),r}if(!n.insert)throw new Error(Io(10));const r=n.insert(t,e);return e.set(t,r),r}var iv="RTK_autoBatch",Km=()=>e=>({payload:e,meta:{[iv]:!0}});function CO(e){const t={},n=[];let r;const o={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(Io(28));if(r in t)throw new Error(Io(29));return t[r]=n,o},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),o),addDefaultCase:e=>(r=e,o)};return e(o),[t,n,r]}function f5(e){return"function"==typeof e}function p5(e,t){let n,[r,o,i]=CO(t);if(f5(e))n=()=>kC(e());else{const t=kC(e);n=()=>t}function a(e=n(),t){let a=[r[t.type],...o.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===a.filter((e=>!!e)).length&&(a=[i]),a.reduce(((e,n)=>{if(n){if(ws(e)){const r=n(e,t);return void 0===r?e:r}if(bs(e))return zv(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error(Io(9))}return r}}return e}),e)}return a.getInitialState=n,a}var h5="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Py=(e=21)=>{let t="",n=e;for(;n--;)t+=h5[64*Math.random()|0];return t},EO=(e,t)=>d5(e)?e.match(t):e(t);function yd(...e){return t=>e.some((e=>EO(e,t)))}function fv(...e){return t=>e.every((e=>EO(e,t)))}function Ry(e,t){if(!e||!e.meta)return!1;const n="string"==typeof e.meta.requestId,r=t.indexOf(e.meta.requestStatus)>-1;return n&&r}function Uv(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function P_(...e){return 0===e.length?e=>Ry(e,["pending"]):Uv(e)?t=>yd(...e.map((e=>e.pending)))(t):P_()(e[0])}function zh(...e){return 0===e.length?e=>Ry(e,["rejected"]):Uv(e)?t=>yd(...e.map((e=>e.rejected)))(t):zh()(e[0])}function Ty(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||Uv(e)?n=>fv(zh(...e),t)(n):Ty()(e[0])}function wd(...e){return 0===e.length?e=>Ry(e,["fulfilled"]):Uv(e)?t=>yd(...e.map((e=>e.fulfilled)))(t):wd()(e[0])}function zS(...e){return 0===e.length?e=>Ry(e,["pending","fulfilled","rejected"]):Uv(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return yd(...n)(t)}:zS()(e[0])}var m5=["name","message","stack","code"],Q1=class{constructor(e,t){G1(this,"_type"),this.payload=e,this.meta=t}},LC=class{constructor(e,t){G1(this,"_type"),this.payload=e,this.meta=t}},v5=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of m5)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},BC=(()=>{function e(e,t,n){const r=zn(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),o=zn(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),i=zn(e+"/rejected",((e,t,r,o,i)=>({payload:o,error:(n&&n.serializeError||v5)(e||"Rejected"),meta:{...i||{},arg:r,requestId:t,rejectedWithValue:!!o,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)}})));return Object.assign((function(e){return(a,s,u)=>{const l=null!=n&&n.idGenerator?n.idGenerator(e):Py(),c=new AbortController;let d,f;function p(e){f=e,c.abort()}const m=async function(){var m,h;let g;try{let i=null==(m=null==n?void 0:n.condition)?void 0:m.call(n,e,{getState:s,extra:u});if(y5(i)&&(i=await i),!1===i||c.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const y=new Promise(((e,t)=>{d=()=>{t({name:"AbortError",message:f||"Aborted"})},c.signal.addEventListener("abort",d)}));a(o(l,e,null==(h=null==n?void 0:n.getPendingMeta)?void 0:h.call(n,{requestId:l,arg:e},{getState:s,extra:u}))),g=await Promise.race([y,Promise.resolve(t(e,{dispatch:a,getState:s,extra:u,requestId:l,signal:c.signal,abort:p,rejectWithValue:(e,t)=>new Q1(e,t),fulfillWithValue:(e,t)=>new LC(e,t)})).then((t=>{if(t instanceof Q1)throw t;return t instanceof LC?r(t.payload,l,e,t.meta):r(t,l,e)}))])}catch(t){g=t instanceof Q1?i(null,l,e,t.payload,t.meta):i(t,l,e)}finally{d&&c.signal.removeEventListener("abort",d)}return n&&!n.dispatchConditionRejection&&i.match(g)&&g.meta.condition||a(g),g}();return Object.assign(m,{abort:p,requestId:l,arg:e,unwrap:()=>m.then(g5)})}}),{pending:o,rejected:i,fulfilled:r,settled:yd(i,r),typePrefix:e})}return e.withTypes=()=>e,e})();function g5(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function y5(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}var w5=Symbol.for("rtk-slice-createasyncthunk");function b5(e,t){return`${e}/${t}`}function x5({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[w5];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error(Io(11));const o=("function"==typeof e.reducers?e.reducers(S5()):e.reducers)||{},i=Object.keys(o),a={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(Io(12));if(n in a.sliceCaseReducersByType)throw new Error(Io(13));return a.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(a.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(a.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(a.sliceCaseReducersByName[e]=t,s)};function u(){const[t={},n=[],r]="function"==typeof e.extraReducers?CO(e.extraReducers):[e.extraReducers],o={...t,...a.sliceCaseReducersByType};return p5(e.initialState,(e=>{for(let t in o)e.addCase(t,o[t]);for(let t of a.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}i.forEach((r=>{const i=o[r],a={reducerName:r,type:b5(t,r),createNotation:"function"==typeof e.reducers};I5(i)?E5(a,i,s,n):_5(a,i,s)}));const l=e=>e,c=new Map;let d;function f(e,t){return d||(d=u()),d(e,t)}function p(){return d||(d=u()),d.getInitialState()}function m(t,n=!1){function r(e){let r=e[t];return typeof r>"u"&&n&&(r=p()),r}function o(t=l){const r=FS(c,n,{insert:()=>new WeakMap});return FS(r,t,{insert:()=>{const r={};for(const[o,i]of Object.entries(e.selectors??{}))r[o]=A5(i,t,p,n);return r}})}return{reducerPath:t,getSelectors:o,get selectors(){return o(r)},selectSlice:r}}const h={name:t,reducer:f,actions:a.actionCreators,caseReducers:a.sliceCaseReducersByName,getInitialState:p,...m(r),injectInto(e,{reducerPath:t,...n}={}){const o=t??r;return e.inject({reducerPath:o,reducer:f},n),{...h,...m(o,!0)}}};return h}}function A5(e,t,n,r){function o(o,...i){let a=t(o);return typeof a>"u"&&r&&(a=n()),e(a,...i)}return o.unwrapped=e,o}var Wr=x5();function S5(){function e(e,t){return{_reducerDefinitionType:"asyncThunk",payloadCreator:e,...t}}return e.withTypes=()=>e,{reducer:e=>Object.assign({[e.name]:(...t)=>e(...t)}[e.name],{_reducerDefinitionType:"reducer"}),preparedReducer:(e,t)=>({_reducerDefinitionType:"reducerWithPrepare",prepare:e,reducer:t}),asyncThunk:e}}function _5({type:e,reducerName:t,createNotation:n},r,o){let i,a;if("reducer"in r){if(n&&!C5(r))throw new Error(Io(17));i=r.reducer,a=r.prepare}else i=r;o.addCase(e,i).exposeCaseReducer(t,i).exposeAction(t,a?zn(e,a):zn(e))}function I5(e){return"asyncThunk"===e._reducerDefinitionType}function C5(e){return"reducerWithPrepare"===e._reducerDefinitionType}function E5({type:e,reducerName:t},n,r,o){if(!o)throw new Error(Io(18));const{payloadCreator:i,fulfilled:a,pending:s,rejected:u,settled:l,options:c}=n,d=o(e,i,c);r.exposeAction(t,d),a&&r.addCase(d.fulfilled,a),s&&r.addCase(d.pending,s),u&&r.addCase(d.rejected,u),l&&r.addMatcher(d.settled,l),r.exposeCaseReducer(t,{fulfilled:a||Og,pending:s||Og,rejected:u||Og,settled:l||Og})}function Og(){}var P5=(e,t)=>{if("function"!=typeof e)throw new Error(Io(32))},R_="listenerMiddleware",R5=e=>{let{type:t,actionCreator:n,matcher:r,predicate:o,effect:i}=e;if(t)o=zn(t).match;else if(n)t=n.type,o=n.match;else if(r)o=r;else if(!o)throw new Error(Io(21));return P5(i),{predicate:o,type:t,effect:i}},T5=Object.assign((e=>{const{type:t,predicate:n,effect:r}=R5(e);return{id:Py(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Io(22))}}}),{withTypes:()=>T5}),M5=Object.assign(zn(`${R_}/add`),{withTypes:()=>M5});zn(`${R_}/removeAll`);var O5=Object.assign(zn(`${R_}/remove`),{withTypes:()=>O5}),D5=e=>"reducerPath"in e&&"string"==typeof e.reducerPath,$5=e=>e.flatMap((e=>D5(e)?[[e.reducerPath,e.reducer]]:Object.entries(e))),T_=Symbol.for("rtk-state-proxy-original"),N5=e=>!!e&&!!e[T_],k5=new WeakMap,L5=(e,t)=>FS(k5,e,{insert:()=>new Proxy(e,{get:(e,n,r)=>{if(n===T_)return e;const o=Reflect.get(e,n,r);if(typeof o>"u"){const e=t[n.toString()];if(e){const t=e(void 0,{type:Py()});if(typeof t>"u")throw new Error(Io(24));return t}}return o}})}),B5=e=>{if(!N5(e))throw new Error(Io(25));return e[T_]},V5=(e={})=>e;function j5(...e){const t=Object.fromEntries($5(e)),n=()=>Object.keys(t).length?vO(t):V5;let r=n();function o(e,t){return r(e,t)}o.withLazyLoadedSlices=()=>o;const i=Object.assign((function(e,n){return function(r,...o){return e(L5(n?n(r,...o):r,t),...o)}}),{original:B5});return Object.assign(o,{inject:(e,i={})=>{const{reducerPath:a,reducer:s}=e,u=t[a];return!i.overrideExisting&&u&&u!==s||(t[a]=s,r=n()),o},selector:i})}function Io(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var F5={USER:"teamcity",npm_config_user_agent:"npm/10.9.3 node/v22.18.0 linux x64 workspaces/true",SENTRY_AUTH_TOKEN:"1d93ff28a44e4c3aaaaff854277cd8583c1de670bd8744bc895670dfd9300840",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/uploads/package.json",npm_config_userconfig:"/home/teamcity/.npmrc",npm_config_local_prefix:"/mnt/agent/work/70fcd8585843667f",COLOR:"1",npm_config_progress:"",TEMP:"/mnt/agent/temp/buildTmp",npm_config_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_config_npm_version:"10.9.3",npm_config_cache:"/home/teamcity/.npm",USE_NPM_LIBS:"false",npm_config_ignore_scripts:"true",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/uploads/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/packages/node_modules/.bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/mnt/agent/work/70fcd8585843667f/node_modules/.bin:/mnt/agent/work/node_modules/.bin:/mnt/agent/node_modules/.bin:/mnt/node_modules/.bin:/node_modules/.bin:/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/node_modules/@npmcli/run-script/lib/node-gyp-bin:/home/teamcity/.cargo/bin:/home/teamcity/.rvm/gems/ruby-3.3.9/bin:/home/teamcity/.rvm/gems/ruby-3.3.9@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.9/bin:/home/teamcity/.rvm/bin:/home/teamcity/.local/bin:/usr/lib/jvm/java-21-amazon-corretto/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/snap/bin:/usr/share/dotnet:/usr/share/dotnet/tools:/home/teamcity/google-cloud-sdk/bin:/home/teamcity/go/bin:/usr/bin/mvn:/home/teamcity/.nvm/versions/node/v22.18.0/bin",TURBO_HASH:"7d2d9574f596911f",NODE:"/home/teamcity/.nvm/versions/node/v22.18.0/bin/node",npm_package_name:"@wellesley/uploads",npm_config_color:"always",DOMAIN_ENV:"test",LANG:"en_US.UTF-8",TURBO_TEAM:"wellesley",TMP:"/mnt/agent/temp/buildTmp",TURBO_API:"https://turborepo-remote-cache-fo3np.ondigitalocean.app",npm_lifecycle_script:"vite build",SHELL:"/bin/bash",npm_package_version:"1.0.744",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",SENTRY_MAPS_UPLOAD:"true",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.18.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/uploads",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.18.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.18.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",USE_PACKAGES_FROM_NPM:"false",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/uploads",EDITOR:"vi",NODE_ENV:"production",BUILD_NUMBER:"3784",APP_NAME:"@wellesley/uploads"},PO=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(PO||{});function z5(e){return{status:e,isUninitialized:"uninitialized"===e,isLoading:"pending"===e,isSuccess:"fulfilled"===e,isError:"rejected"===e}}function U5(e){return new RegExp("(^|:)//").test(e)}var G5=e=>e.replace(/\/$/,""),W5=e=>e.replace(/^\//,"");function q5(e,t){if(!e)return t;if(!t)return e;if(U5(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return`${e=G5(e)}${n}${t=W5(t)}`}var VC=e=>[].concat(...e);function H5(){return typeof navigator>"u"||void 0===navigator.onLine||navigator.onLine}function X5(){return typeof document>"u"||"hidden"!==document.visibilityState}var jC=gd;function RO(e,t){if(e===t||!(jC(e)&&jC(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let o=n.length===r.length;const i=Array.isArray(t)?[]:{};for(const r of n)i[r]=RO(e[r],t[r]),o&&(o=e[r]===i[r]);return o?e:i}var FC=(...e)=>fetch(...e),Q5=e=>e.status>=200&&e.status<=299,K5=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function zC(e){if(!gd(e))return e;const t={...e};for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}function Y5({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:n=FC,paramsSerializer:r,isJsonContentType:o=K5,jsonContentType:i="application/json",jsonReplacer:a,timeout:s,responseHandler:u,validateStatus:l,...c}={}){return typeof fetch>"u"&&n===FC&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(f,p)=>{const{signal:m,getState:h,extra:g,endpoint:y,forced:v,type:b}=p;let w,{url:A,headers:x=new Headers(c.headers),params:S,responseHandler:I=u??"json",validateStatus:E=l??Q5,timeout:C=s,...P}="string"==typeof f?{url:f}:f,k={...c,signal:m,...P};x=new Headers(zC(x)),k.headers=await t(x,{getState:h,extra:g,endpoint:y,forced:v,type:b})||x;const _=e=>"object"==typeof e&&(gd(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!k.headers.has("content-type")&&_(k.body)&&k.headers.set("content-type",i),_(k.body)&&o(k.headers)&&(k.body=JSON.stringify(k.body,a)),S){const e=~A.indexOf("?")?"&":"?";A+=e+(r?r(S):new URLSearchParams(zC(S)))}A=q5(e,A);const T=new Request(A,k);w={request:new Request(A,k)};let M,O=!1,R=C&&setTimeout((()=>{O=!0,p.abort()}),C);try{M=await n(T)}catch(e){return{error:{status:O?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:w}}finally{R&&clearTimeout(R)}const N=M.clone();w.response=N;let z,D="";try{let e;if(await Promise.all([d(M,I).then((e=>z=e),(t=>e=t)),N.text().then((e=>D=e),(()=>{}))]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:M.status,data:D,error:String(e)},meta:w}}return E(M,z)?{data:z,meta:w}:{error:{status:M.status,data:z},meta:w}};async function d(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=o(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var UC=class{constructor(e,t=void 0){this.value=e,this.meta=t}},M_=zn("__rtkq/focused"),TO=zn("__rtkq/unfocused"),O_=zn("__rtkq/online"),MO=zn("__rtkq/offline");function OO(e){return"query"===e.type}function J5(e){return"mutation"===e.type}function D_(e,t,n,r,o,i){return Z5(e)?e(t,n,r,o).map(US).map(i):Array.isArray(e)?e.map(US).map(i):[]}function Z5(e){return"function"==typeof e}function US(e){return"string"==typeof e?{type:e}:e}function GC(e){return null!=e}function Lh(e){let t=0;for(const n in e)t++;return t}function e6(e,t){return e.catch(t)}var _v=Symbol("forceQueryFn"),GS=e=>"function"==typeof e[_v];function t6({serializeQueryArgs:e,queryThunk:t,mutationThunk:n,api:r,context:o}){const i=new Map,a=new Map,{unsubscribeQueryResult:s,removeMutationResult:u,updateSubscriptionOptions:l}=r.internalActions;return{buildInitiateQuery:function(n,o){const a=(u,{subscribe:c=!0,forceRefetch:d,subscriptionOptions:f,[_v]:p,...m}={})=>(h,g)=>{var y;const v=e({queryArgs:u,endpointDefinition:o,endpointName:n}),b=t({...m,type:"query",subscribe:c,forceRefetch:d,subscriptionOptions:f,endpointName:n,originalArgs:u,queryCacheKey:v,[_v]:p}),w=r.endpoints[n].select(u),A=h(b),x=w(g()),{requestId:S,abort:I}=A,E=x.requestId!==S,C=null==(y=i.get(h))?void 0:y[v],P=()=>w(g()),k=Object.assign(p?A.then(P):E&&!C?Promise.resolve(x):Promise.all([C,A]).then(P),{arg:u,requestId:S,subscriptionOptions:f,queryCacheKey:v,abort:I,async unwrap(){const e=await k;if(e.isError)throw e.error;return e.data},refetch:()=>h(a(u,{subscribe:!1,forceRefetch:!0})),unsubscribe(){c&&h(s({queryCacheKey:v,requestId:S}))},updateSubscriptionOptions(e){k.subscriptionOptions=e,h(l({endpointName:n,requestId:S,queryCacheKey:v,options:e}))}});if(!C&&!E&&!p){const e=i.get(h)||{};e[v]=k,i.set(h,e),k.then((()=>{delete e[v],Lh(e)||i.delete(h)}))}return k};return a},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:o}={})=>(i,s)=>{const l=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:o}),c=i(l),{requestId:d,abort:f,unwrap:p}=c,m=e6(c.unwrap().then((e=>({data:e}))),(e=>({error:e}))),h=Object.assign(m,{arg:c.arg,requestId:d,abort:f,unwrap:p,reset:()=>{i(u({requestId:d,fixedCacheKey:o}))}}),g=a.get(i)||{};return a.set(i,g),g[d]=h,h.then((()=>{delete g[d],Lh(g)||a.delete(i)})),o&&(g[o]=h,h.then((()=>{g[o]===h&&(delete g[o],Lh(g)||a.delete(i))}))),h}},getRunningQueryThunk:function(t,n){return r=>{var a;const s=o.endpointDefinitions[t],u=e({queryArgs:n,endpointDefinition:s,endpointName:t});return null==(a=i.get(r))?void 0:a[u]}},getRunningMutationThunk:function(e,t){return e=>{var n;return null==(n=a.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return e=>Object.values(i.get(e)||{}).filter(GC)},getRunningMutationsThunk:function(){return e=>Object.values(a.get(e)||{}).filter(GC)}}}function WC(e){return e}function n6({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:o,assertTagType:i}){const a=async(e,{signal:r,abort:o,rejectWithValue:i,fulfillWithValue:a,dispatch:u,getState:l,extra:c})=>{const d=n[e.endpointName];try{let n,i=WC;const f={signal:r,abort:o,dispatch:u,getState:l,extra:c,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?s(e,l()):void 0},p="query"===e.type?e[_v]:void 0;if(p?n=p():d.query?(n=await t(d.query(e.originalArgs),f,d.extraOptions),d.transformResponse&&(i=d.transformResponse)):n=await d.queryFn(e.originalArgs,f,d.extraOptions,(e=>t(e,f,d.extraOptions))),typeof process<"u"&&F5.NODE_ENV,n.error)throw new UC(n.error,n.meta);return a(await i(n.data,n.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:n.meta,[iv]:!0})}catch(t){let n=t;if(n instanceof UC){let t=WC;d.query&&d.transformErrorResponse&&(t=d.transformErrorResponse);try{return i(await t(n.value,n.meta,e.originalArgs),{baseQueryMeta:n.meta,[iv]:!0})}catch(e){n=e}}throw console.error(n),n}};function s(t,n){var r,o,i;const a=null==(o=null==(r=n[e])?void 0:r.queries)?void 0:o[t.queryCacheKey],s=null==(i=n[e])?void 0:i.config.refetchOnMountOrArgChange,u=null==a?void 0:a.fulfilledTimeStamp,l=t.forceRefetch??(t.subscribe&&s);return!!l&&(!0===l||(Number(new Date)-Number(u))/1e3>=l)}const u=BC(`${e}/executeQuery`,a,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[iv]:!0}),condition(t,{getState:r}){var o,i,a;const u=r(),l=null==(i=null==(o=u[e])?void 0:o.queries)?void 0:i[t.queryCacheKey],c=null==l?void 0:l.fulfilledTimeStamp,d=t.originalArgs,f=null==l?void 0:l.originalArgs,p=n[t.endpointName];return!!GS(t)||"pending"!==(null==l?void 0:l.status)&&(!!(s(t,u)||OO(p)&&null!=(a=null==p?void 0:p.forceRefetch)&&a.call(p,{currentArg:d,previousArg:f,endpointState:l,state:u}))||!c)},dispatchConditionRejection:!0}),l=BC(`${e}/executeMutation`,a,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[iv]:!0})});function c(e){return t=>{var n,r;return(null==(r=null==(n=null==t?void 0:t.meta)?void 0:n.arg)?void 0:r.endpointName)===e}}return{queryThunk:u,mutationThunk:l,prefetch:(e,t,n)=>(r,i)=>{const a=(e=>"force"in e)(n)&&n.force,s=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,u=(n=!0)=>{const r={forceRefetch:n,isPrefetch:!0};return o.endpoints[e].initiate(t,r)},l=o.endpoints[e].select(t)(i());if(a)r(u());else if(s){const e=null==l?void 0:l.fulfilledTimeStamp;if(!e)return void r(u());(Number(new Date)-Number(new Date(e)))/1e3>=s&&r(u())}else r(u(!1))},updateQueryData:(e,t,n,r=!0)=>(i,a)=>{const s=o.endpoints[e].select(t)(a());let u,l={patches:[],inversePatches:[],undo:()=>i(o.util.patchQueryData(e,t,l.inversePatches,r))};if("uninitialized"===s.status)return l;if("data"in s)if(bs(s.data)){const[e,t,r]=_O(s.data,n);l.patches.push(...t),l.inversePatches.push(...r),u=e}else u=n(s.data),l.patches.push({op:"replace",path:[],value:u}),l.inversePatches.push({op:"replace",path:[],value:s.data});return i(o.util.patchQueryData(e,t,l.patches,r)),l},upsertQueryData:(e,t,n)=>r=>r(o.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[_v]:()=>({data:n})})),patchQueryData:(e,t,a,s)=>(u,l)=>{const c=n[e],d=r({queryArgs:t,endpointDefinition:c,endpointName:e});if(u(o.internalActions.queryResultPatched({queryCacheKey:d,patches:a})),!s)return;const f=o.endpoints[e].select(t)(l()),p=D_(c.providesTags,f.data,void 0,t,{},i);u(o.internalActions.updateProvidedBy({queryCacheKey:d,providedTags:p}))},buildMatchThunkActions:function(e,t){return{matchPending:fv(P_(e),c(t)),matchFulfilled:fv(wd(e),c(t)),matchRejected:fv(zh(e),c(t))}}}}function DO(e,t,n,r){return D_(n[e.meta.arg.endpointName][t],wd(e)?e.payload:void 0,Ty(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function Dg(e,t,n){const r=e[t];r&&n(r)}function Iv(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function qC(e,t,n){const r=e[Iv(t)];r&&n(r)}var Ym={};function r6({reducerPath:e,queryThunk:t,mutationThunk:n,context:{endpointDefinitions:r,apiUid:o,extractRehydrationInfo:i,hasRehydrationInfo:a},assertTagType:s,config:u}){const l=zn(`${e}/resetApiState`),c=Wr({name:`${e}/queries`,initialState:Ym,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:Km()},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:n}}){Dg(e,t,(e=>{e.data=DC(e.data,n.concat())}))},prepare:Km()}},extraReducers(e){e.addCase(t.pending,((e,{meta:t,meta:{arg:n}})=>{var r;const o=GS(n);e[r=n.queryCacheKey]??(e[r]={status:"uninitialized",endpointName:n.endpointName}),Dg(e,n.queryCacheKey,(e=>{e.status="pending",e.requestId=o&&e.requestId?e.requestId:t.requestId,void 0!==n.originalArgs&&(e.originalArgs=n.originalArgs),e.startedTimeStamp=t.startedTimeStamp}))})).addCase(t.fulfilled,((e,{meta:t,payload:n})=>{Dg(e,t.arg.queryCacheKey,(e=>{if(e.requestId!==t.requestId&&!GS(t.arg))return;const{merge:o}=r[t.arg.endpointName];if(e.status="fulfilled",o)if(void 0!==e.data){const{fulfilledTimeStamp:r,arg:i,baseQueryMeta:a,requestId:s}=t;let u=zv(e.data,(e=>o(e,n,{arg:i.originalArgs,baseQueryMeta:a,fulfilledTimeStamp:r,requestId:s})));e.data=u}else e.data=n;else e.data=r[t.arg.endpointName].structuralSharing??1?RO(ws(e.data)?WL(e.data):e.data,n):n;delete e.error,e.fulfilledTimeStamp=t.fulfilledTimeStamp}))})).addCase(t.rejected,((e,{meta:{condition:t,arg:n,requestId:r},error:o,payload:i})=>{Dg(e,n.queryCacheKey,(e=>{if(!t){if(e.requestId!==r)return;e.status="rejected",e.error=i??o}}))})).addMatcher(a,((e,t)=>{const{queries:n}=i(t);for(const[t,r]of Object.entries(n))("fulfilled"===(null==r?void 0:r.status)||"rejected"===(null==r?void 0:r.status))&&(e[t]=r)}))}}),d=Wr({name:`${e}/mutations`,initialState:Ym,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=Iv(t);n in e&&delete e[n]},prepare:Km()}},extraReducers(e){e.addCase(n.pending,((e,{meta:t,meta:{requestId:n,arg:r,startedTimeStamp:o}})=>{r.track&&(e[Iv(t)]={requestId:n,status:"pending",endpointName:r.endpointName,startedTimeStamp:o})})).addCase(n.fulfilled,((e,{payload:t,meta:n})=>{n.arg.track&&qC(e,n,(e=>{e.requestId===n.requestId&&(e.status="fulfilled",e.data=t,e.fulfilledTimeStamp=n.fulfilledTimeStamp)}))})).addCase(n.rejected,((e,{payload:t,error:n,meta:r})=>{r.arg.track&&qC(e,r,(e=>{e.requestId===r.requestId&&(e.status="rejected",e.error=t??n)}))})).addMatcher(a,((e,t)=>{const{mutations:n}=i(t);for(const[t,r]of Object.entries(n))("fulfilled"===(null==r?void 0:r.status)||"rejected"===(null==r?void 0:r.status))&&t!==(null==r?void 0:r.requestId)&&(e[t]=r)}))}}),f=Wr({name:`${e}/invalidation`,initialState:Ym,reducers:{updateProvidedBy:{reducer(e,t){var n,r;const{queryCacheKey:o,providedTags:i}=t.payload;for(const t of Object.values(e))for(const e of Object.values(t)){const t=e.indexOf(o);-1!==t&&e.splice(t,1)}for(const{type:t,id:a}of i){const i=(n=e[t]??(e[t]={}))[r=a||"__internal_without_id"]??(n[r]=[]);i.includes(o)||i.push(o)}},prepare:Km()}},extraReducers(e){e.addCase(c.actions.removeQueryResult,((e,{payload:{queryCacheKey:t}})=>{for(const n of Object.values(e))for(const e of Object.values(n)){const n=e.indexOf(t);-1!==n&&e.splice(n,1)}})).addMatcher(a,((e,t)=>{var n,r;const{provided:o}=i(t);for(const[t,i]of Object.entries(o))for(const[o,a]of Object.entries(i)){const i=(n=e[t]??(e[t]={}))[r=o||"__internal_without_id"]??(n[r]=[]);for(const e of a)i.includes(e)||i.push(e)}})).addMatcher(yd(wd(t),Ty(t)),((e,t)=>{const n=DO(t,"providesTags",r,s),{queryCacheKey:o}=t.meta.arg;f.caseReducers.updateProvidedBy(e,f.actions.updateProvidedBy({queryCacheKey:o,providedTags:n}))}))}}),p=Wr({name:`${e}/subscriptions`,initialState:Ym,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),m=Wr({name:`${e}/internalSubscriptions`,initialState:Ym,reducers:{subscriptionsUpdated:{reducer:(e,t)=>DC(e,t.payload),prepare:Km()}}}),h=Wr({name:`${e}/config`,initialState:{online:H5(),focused:X5(),middlewareRegistered:!1,...u},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&o===t||"conflict"}},extraReducers:e=>{e.addCase(O_,(e=>{e.online=!0})).addCase(MO,(e=>{e.online=!1})).addCase(M_,(e=>{e.focused=!0})).addCase(TO,(e=>{e.focused=!1})).addMatcher(a,(e=>({...e})))}}),g=vO({queries:c.reducer,mutations:d.reducer,provided:f.reducer,subscriptions:m.reducer,config:h.reducer});return{reducer:(e,t)=>g(l.match(t)?void 0:e,t),actions:{...h.actions,...c.actions,...p.actions,...m.actions,...d.actions,...f.actions,resetApiState:l}}}var Gf=Symbol.for("RTKQ/skipToken"),$O={status:"uninitialized"},HC=zv($O,(()=>{})),XC=zv($O,(()=>{}));function o6({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=e=>HC,o=e=>XC;return{buildQuerySelector:function(t,o){return s=>{const u=e({queryArgs:s,endpointDefinition:o,endpointName:t});return n(s===Gf?r:e=>{var t,n;return(null==(n=null==(t=a(e))?void 0:t.queries)?void 0:n[u])??HC},i)}},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?Iv(e)??Gf:e,n(t===Gf?o:e=>{var n,r;return(null==(r=null==(n=a(e))?void 0:n.mutations)?void 0:r[t])??XC},i)}},selectInvalidatedBy:function(e,n){const r=e[t],o=new Set;for(const e of n.map(US)){const t=r.provided[e.type];if(!t)continue;let n=(void 0!==e.id?t[e.id]:VC(Object.values(t)))??[];for(const e of n)o.add(e)}return VC(Array.from(o.values()).map((e=>{const t=r.queries[e];return t?[{queryCacheKey:e,endpointName:t.endpointName,originalArgs:t.originalArgs}]:[]})))},selectCachedArgsForQuery:function(e,n){return Object.values(e[t].queries).filter((e=>(null==e?void 0:e.endpointName)===n&&"uninitialized"!==e.status)).map((e=>e.originalArgs))}};function i(e){return{...e,...z5(e.status)}}function a(e){return e[t]}}var Ih=WeakMap?new WeakMap:void 0,QC=({endpointName:e,queryArgs:t})=>{let n="";const r=null==Ih?void 0:Ih.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,((e,t)=>gd(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t));gd(t)&&(null==Ih||Ih.set(t,e)),n=e}return`${e}(${n})`};function i6(...e){return function(t){const n=Sv((e=>{var n;return null==(n=t.extractRehydrationInfo)?void 0:n.call(t,e,{reducerPath:t.reducerPath??"api"})})),r={reducerPath:"api",keepUnusedDataFor:60,refetchOnMountOrArgChange:!1,refetchOnFocus:!1,refetchOnReconnect:!1,invalidationBehavior:"delayed",...t,extractRehydrationInfo:n,serializeQueryArgs(e){let n=QC;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:QC({...e,queryArgs:n})}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},o={endpointDefinitions:{},batch(e){e()},apiUid:Py(),extractRehydrationInfo:n,hasRehydrationInfo:Sv((e=>null!=n(e)))},i={injectEndpoints:function(e){const t=e.endpoints({query:e=>({...e,type:"query"}),mutation:e=>({...e,type:"mutation"})});for(const[n,r]of Object.entries(t))if(!0!==e.overrideExisting&&n in o.endpointDefinitions){if("throw"===e.overrideExisting)throw new Error(Io(39))}else{o.endpointDefinitions[n]=r;for(const e of a)e.injectEndpoint(n,r)}return i},enhanceEndpoints({addTagTypes:e,endpoints:t}){if(e)for(const t of e)r.tagTypes.includes(t)||r.tagTypes.push(t);if(t)for(const[e,n]of Object.entries(t))"function"==typeof n?n(o.endpointDefinitions[e]):Object.assign(o.endpointDefinitions[e]||{},n);return i}},a=e.map((e=>e.init(i,r,o)));return i.injectEndpoints({endpoints:t.endpoints})}}function a6(e){for(let t in e)return!1;return!0}var s6=2147482.647,u6=({reducerPath:e,api:t,context:n,internalState:r})=>{const{removeQueryResult:o,unsubscribeQueryResult:i}=t.internalActions;function a(e){const t=r.currentSubscriptions[e];return!!t&&!a6(t)}const s={};function u(e,t,r,i){const u=n.endpointDefinitions[t],l=(null==u?void 0:u.keepUnusedDataFor)??i.keepUnusedDataFor;if(l===1/0)return;const c=Math.max(0,Math.min(l,s6));if(!a(e)){const t=s[e];t&&clearTimeout(t),s[e]=setTimeout((()=>{a(e)||r.dispatch(o({queryCacheKey:e})),delete s[e]}),1e3*c)}}return(r,o,a)=>{var l;if(i.match(r)){const t=o.getState()[e],{queryCacheKey:n}=r.payload;u(n,null==(l=t.queries[n])?void 0:l.endpointName,o,t.config)}if(t.util.resetApiState.match(r))for(const[e,t]of Object.entries(s))t&&clearTimeout(t),delete s[e];if(n.hasRehydrationInfo(r)){const t=o.getState()[e],{queries:i}=n.extractRehydrationInfo(r);for(const[e,n]of Object.entries(i))u(e,null==n?void 0:n.endpointName,o,t.config)}}},l6=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:o,api:i,assertTagType:a,refetchQuery:s,internalState:u})=>{const{removeQueryResult:l}=i.internalActions,c=yd(wd(r),Ty(r)),d=yd(wd(r,o),zh(r,o));let f=[];function p(n,r){const o=r.getState(),a=o[e];if(f.push(...n),"delayed"===a.config.invalidationBehavior&&function(e){var t,n;for(const n in e.queries)if("pending"===(null==(t=e.queries[n])?void 0:t.status))return!0;for(const t in e.mutations)if("pending"===(null==(n=e.mutations[t])?void 0:n.status))return!0;return!1}(a))return;const c=f;if(f=[],0===c.length)return;const d=i.util.selectInvalidatedBy(o,c);t.batch((()=>{const e=Array.from(d.values());for(const{queryCacheKey:t}of e){const e=a.queries[t],n=u.currentSubscriptions[t]??{};e&&(0===Lh(n)?r.dispatch(l({queryCacheKey:t})):"uninitialized"!==e.status&&r.dispatch(s(e,t)))}}))}return(e,t)=>{c(e)?p(DO(e,"invalidatesTags",n,a),t):d(e)?p([],t):i.util.invalidateTags.match(e)&&p(D_(e.payload,void 0,void 0,void 0,void 0,a),t)}},c6=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:o})=>{const i={};function a({queryCacheKey:t},n){const s=n.getState()[e],u=s.queries[t],c=o.currentSubscriptions[t];if(!u||"uninitialized"===u.status)return;const{lowestPollingInterval:d,skipPollingIfUnfocused:f}=l(c);if(!Number.isFinite(d))return;const p=i[t];null!=p&&p.timeout&&(clearTimeout(p.timeout),p.timeout=void 0);const m=Date.now()+d;i[t]={nextPollTimestamp:m,pollingInterval:d,timeout:setTimeout((()=>{(s.config.focused||!f)&&n.dispatch(r(u,t)),a({queryCacheKey:t},n)}),d)}}function s({queryCacheKey:t},n){const r=n.getState()[e].queries[t],s=o.currentSubscriptions[t];if(!r||"uninitialized"===r.status)return;const{lowestPollingInterval:c}=l(s);if(!Number.isFinite(c))return void u(t);const d=i[t],f=Date.now()+c;(!d||f<d.nextPollTimestamp)&&a({queryCacheKey:t},n)}function u(e){const t=i[e];null!=t&&t.timeout&&clearTimeout(t.timeout),delete i[e]}function l(e={}){let t=!1,n=Number.POSITIVE_INFINITY;for(let r in e)e[r].pollingInterval&&(n=Math.min(e[r].pollingInterval,n),t=e[r].skipPollingIfUnfocused||t);return{lowestPollingInterval:n,skipPollingIfUnfocused:t}}return(e,r)=>{(n.internalActions.updateSubscriptionOptions.match(e)||n.internalActions.unsubscribeQueryResult.match(e))&&s(e.payload,r),(t.pending.match(e)||t.rejected.match(e)&&e.meta.condition)&&s(e.meta.arg,r),(t.fulfilled.match(e)||t.rejected.match(e)&&!e.meta.condition)&&a(e.meta.arg,r),n.util.resetApiState.match(e)&&function(){for(const e of Object.keys(i))u(e)}()}},d6=({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:o})=>{const{removeQueryResult:i}=n.internalActions;function a(n,a){const s=n.getState()[e],u=s.queries,l=o.currentSubscriptions;t.batch((()=>{for(const e of Object.keys(l)){const t=u[e],o=l[e];o&&t&&((Object.values(o).some((e=>!0===e[a]))||Object.values(o).every((e=>void 0===e[a]))&&s.config[a])&&(0===Lh(o)?n.dispatch(i({queryCacheKey:e})):"uninitialized"!==t.status&&n.dispatch(r(t,e))))}}))}return(e,t)=>{M_.match(e)&&a(t,"refetchOnFocus"),O_.match(e)&&a(t,"refetchOnReconnect")}},KC=new Error("Promise never resolved before cacheEntryRemoved."),f6=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:o,internalState:i})=>{const a=zS(r),s=zS(o),u=wd(r,o),l={};function c(t,r,o,i,a){const s=n.endpointDefinitions[t],u=null==s?void 0:s.onCacheEntryAdded;if(!u)return;let c={};const d=new Promise((e=>{c.cacheEntryRemoved=e})),f=Promise.race([new Promise((e=>{c.valueResolved=e})),d.then((()=>{throw KC}))]);f.catch((()=>{})),l[o]=c;const p=e.endpoints[t].select("query"===s.type?r:o),m=i.dispatch(((e,t,n)=>n)),h={...i,getCacheEntry:()=>p(i.getState()),requestId:a,extra:m,updateCachedData:"query"===s.type?n=>i.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:f,cacheEntryRemoved:d},g=u(r,h);Promise.resolve(g).catch((e=>{if(e!==KC)throw e}))}return(n,i,d)=>{const f=function(t){return a(t)?t.meta.arg.queryCacheKey:s(t)?t.meta.arg.fixedCacheKey??t.meta.requestId:e.internalActions.removeQueryResult.match(t)?t.payload.queryCacheKey:e.internalActions.removeMutationResult.match(t)?Iv(t.payload):""}(n);if(r.pending.match(n)){const e=d[t].queries[f],r=i.getState()[t].queries[f];!e&&r&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,i,n.meta.requestId)}else if(o.pending.match(n))i.getState()[t].mutations[f]&&c(n.meta.arg.endpointName,n.meta.arg.originalArgs,f,i,n.meta.requestId);else if(u(n)){const e=l[f];null!=e&&e.valueResolved&&(e.valueResolved({data:n.payload,meta:n.meta.baseQueryMeta}),delete e.valueResolved)}else if(e.internalActions.removeQueryResult.match(n)||e.internalActions.removeMutationResult.match(n)){const e=l[f];e&&(delete l[f],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(n))for(const[e,t]of Object.entries(l))delete l[e],t.cacheEntryRemoved()}},p6=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const o=P_(n,r),i=zh(n,r),a=wd(n,r),s={};return(n,r)=>{var u,l;if(o(n)){const{requestId:o,arg:{endpointName:i,originalArgs:a}}=n.meta,u=t.endpointDefinitions[i],l=null==u?void 0:u.onQueryStarted;if(l){const t={},n=new Promise(((e,n)=>{t.resolve=e,t.reject=n}));n.catch((()=>{})),s[o]=t;const c=e.endpoints[i].select("query"===u.type?a:o),d=r.dispatch(((e,t,n)=>n)),f={...r,getCacheEntry:()=>c(r.getState()),requestId:o,extra:d,updateCachedData:"query"===u.type?t=>r.dispatch(e.util.updateQueryData(i,a,t)):void 0,queryFulfilled:n};l(a,f)}}else if(a(n)){const{requestId:e,baseQueryMeta:t}=n.meta;null==(u=s[e])||u.resolve({data:n.payload,meta:t}),delete s[e]}else if(i(n)){const{requestId:e,rejectedWithValue:t,baseQueryMeta:r}=n.meta;null==(l=s[e])||l.reject({error:n.payload??n.error,isUnhandledError:!t,meta:r}),delete s[e]}}},h6=({api:e,context:{apiUid:t},reducerPath:n})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t))},m6=({api:e,queryThunk:t,internalState:n})=>{const r=`${e.reducerPath}/subscriptions`;let o=null,i=null;const{updateSubscriptionOptions:a,unsubscribeQueryResult:s}=e.internalActions,u=()=>n.currentSubscriptions,l={getSubscriptions:u,getSubscriptionCount:e=>Lh(u()[e]??{}),isRequestSubscribed:(e,t)=>{var n;const r=u();return!(null==(n=null==r?void 0:r[e])||!n[t])}};return(u,c)=>{if(o||(o=JSON.parse(JSON.stringify(n.currentSubscriptions))),e.util.resetApiState.match(u))return o=n.currentSubscriptions={},i=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(u))return[!1,l];const d=((n,r)=>{var o,i,u;if(a.match(r)){const{queryCacheKey:e,requestId:t,options:i}=r.payload;return null!=(o=null==n?void 0:n[e])&&o[t]&&(n[e][t]=i),!0}if(s.match(r)){const{queryCacheKey:e,requestId:t}=r.payload;return n[e]&&delete n[e][t],!0}if(e.internalActions.removeQueryResult.match(r))return delete n[r.payload.queryCacheKey],!0;if(t.pending.match(r)){const{meta:{arg:e,requestId:t}}=r,o=n[i=e.queryCacheKey]??(n[i]={});return o[`${t}_running`]={},e.subscribe&&(o[t]=e.subscriptionOptions??o[t]??{}),!0}let l=!1;if(t.fulfilled.match(r)||t.rejected.match(r)){const e=n[r.meta.arg.queryCacheKey]||{},t=`${r.meta.requestId}_running`;l||(l=!!e[t]),delete e[t]}if(t.rejected.match(r)){const{meta:{condition:e,arg:t,requestId:o}}=r;if(e&&t.subscribe){const e=n[u=t.queryCacheKey]??(n[u]={});e[o]=t.subscriptionOptions??e[o]??{},l=!0}}return l})(n.currentSubscriptions,u);let f=!0;if(d){i||(i=setTimeout((()=>{const t=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,r]=_O(o,(()=>t));c.next(e.internalActions.subscriptionsUpdated(r)),o=t,i=null}),500));const a="string"==typeof u.type&&!!u.type.startsWith(r),s=t.rejected.match(u)&&u.meta.condition&&!!u.meta.arg.subscribe;f=!a&&!s}return[f,!1]}};function v6(e){const{reducerPath:t,queryThunk:n,api:r,context:o}=e,{apiUid:i}=o,a={invalidateTags:zn(`${t}/invalidateTags`)},s=e=>e.type.startsWith(`${t}/`),u=[h6,u6,l6,c6,f6,p6];return{middleware:n=>{let a=!1;const c={...e,internalState:{currentSubscriptions:{}},refetchQuery:l,isThisApiSliceAction:s},d=u.map((e=>e(c))),f=m6(c),p=d6(c);return e=>u=>{if(!gO(u))return e(u);a||(a=!0,n.dispatch(r.internalActions.middlewareRegistered(i)));const l={...n,next:e},c=n.getState(),[m,h]=f(u,l,c);let g;if(g=m?e(u):h,n.getState()[t]&&(p(u,l,c),s(u)||o.hasRehydrationInfo(u)))for(let e of d)e(u,l,c);return g}},actions:a};function l(e,t,r={}){return n({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t,...r})}}function ad(e,...t){return Object.assign(e,...t)}var YC=Symbol(),g6=({createSelector:e=Zn}={})=>({name:YC,init(t,{baseQuery:n,tagTypes:r,reducerPath:o,serializeQueryArgs:i,keepUnusedDataFor:a,refetchOnMountOrArgChange:s,refetchOnFocus:u,refetchOnReconnect:l,invalidationBehavior:c},d){e5();const f=e=>e;Object.assign(t,{reducerPath:o,endpoints:{},internalActions:{onOnline:O_,onOffline:MO,onFocus:M_,onFocusLost:TO},util:{}});const{queryThunk:p,mutationThunk:m,patchQueryData:h,updateQueryData:g,upsertQueryData:y,prefetch:v,buildMatchThunkActions:b}=n6({baseQuery:n,reducerPath:o,context:d,api:t,serializeQueryArgs:i,assertTagType:f}),{reducer:w,actions:A}=r6({context:d,queryThunk:p,mutationThunk:m,reducerPath:o,assertTagType:f,config:{refetchOnFocus:u,refetchOnReconnect:l,refetchOnMountOrArgChange:s,keepUnusedDataFor:a,reducerPath:o,invalidationBehavior:c}});ad(t.util,{patchQueryData:h,updateQueryData:g,upsertQueryData:y,prefetch:v,resetApiState:A.resetApiState}),ad(t.internalActions,A);const{middleware:x,actions:S}=v6({reducerPath:o,context:d,queryThunk:p,mutationThunk:m,api:t,assertTagType:f});ad(t.util,S),ad(t,{reducer:w,middleware:x});const{buildQuerySelector:I,buildMutationSelector:E,selectInvalidatedBy:C,selectCachedArgsForQuery:P}=o6({serializeQueryArgs:i,reducerPath:o,createSelector:e});ad(t.util,{selectInvalidatedBy:C,selectCachedArgsForQuery:P});const{buildInitiateQuery:k,buildInitiateMutation:_,getRunningMutationThunk:T,getRunningMutationsThunk:M,getRunningQueriesThunk:O,getRunningQueryThunk:R}=t6({queryThunk:p,mutationThunk:m,api:t,serializeQueryArgs:i,context:d});return ad(t.util,{getRunningMutationThunk:T,getRunningMutationsThunk:M,getRunningQueryThunk:R,getRunningQueriesThunk:O}),{name:YC,injectEndpoint(e,n){var r;const o=t;(r=o.endpoints)[e]??(r[e]={}),OO(n)?ad(o.endpoints[e],{name:e,select:I(e,n),initiate:k(e,n)},b(p,e)):J5(n)&&ad(o.endpoints[e],{name:e,select:E(),initiate:_(e)},b(m,e))}}}}),$a=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function My(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var JC,ZC,K1={exports:{}},Tt={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -84,7 +84,7 @@ var VL=Object.defineProperty,jL=(e,t,n)=>t in e?VL(e,t,{enumerable:!0,configurab
|
|
|
84
84
|
*
|
|
85
85
|
* This source code is licensed under the MIT license found in the
|
|
86
86
|
* LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/function _j(){if(ZP)return nn;ZP=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function h(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case r:case i:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case s:case l:case p:case f:case a:return e;default:return m}}case n:return m}}}return e=Symbol.for("react.module.reference"),nn.ContextConsumer=s,nn.ContextProvider=a,nn.Element=t,nn.ForwardRef=l,nn.Fragment=r,nn.Lazy=p,nn.Memo=f,nn.Portal=n,nn.Profiler=i,nn.StrictMode=o,nn.Suspense=c,nn.SuspenseList=d,nn.isAsyncMode=function(){return!1},nn.isConcurrentMode=function(){return!1},nn.isContextConsumer=function(e){return h(e)===s},nn.isContextProvider=function(e){return h(e)===a},nn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},nn.isForwardRef=function(e){return h(e)===l},nn.isFragment=function(e){return h(e)===r},nn.isLazy=function(e){return h(e)===p},nn.isMemo=function(e){return h(e)===f},nn.isPortal=function(e){return h(e)===n},nn.isProfiler=function(e){return h(e)===i},nn.isStrictMode=function(e){return h(e)===o},nn.isSuspense=function(e){return h(e)===c},nn.isSuspenseList=function(e){return h(e)===d},nn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===c||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===a||t.$$typeof===s||t.$$typeof===l||t.$$typeof===e||void 0!==t.getModuleId)},nn.typeOf=h,nn}function Ij(){return eR||(eR=1,gb.exports=_j()),gb.exports}function g$(){if(tR)return yb;tR=1;var e=Ml(),t=ta();return yb=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function Cj(){if(nR)return wb;nR=1;var e=g$();return wb=function(t){return e(t)&&t!=+t}}Ij(),Cj(),g$();var xb,rR,Ab,oR,Sb,iR,_b,aR,Ib,sR,Cb,uR,Eb,lR,Pb,cR,Rb,dR,Tb,fR,Mb,pR,Ob,hR,Db,mR,$b,vR,Nb,gR,kb,yR,Lb,wR,Bb,bR,Vb,xR,jb,AR,Fb,SR,zb,_R,Ub,IR,Gb,CR,Gg=function(e){return Sj(e)&&e.indexOf("%")===e.length-1},Ej=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},bb=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]};function Pj(){if(rR)return xb;rR=1;var e=Hy();return xb=function(){this.__data__=new e,this.size=0}}function Rj(){if(oR)return Ab;return oR=1,Ab=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function Tj(){if(iR)return Sb;return iR=1,Sb=function(e){return this.__data__.get(e)}}function Mj(){if(aR)return _b;return aR=1,_b=function(e){return this.__data__.has(e)}}function Oj(){if(sR)return Ib;sR=1;var e=Hy(),t=cI(),n=dI();return Ib=function(r,o){var i=this.__data__;if(i instanceof e){var a=i.__data__;if(!t||a.length<199)return a.push([r,o]),this.size=++i.size,this;i=this.__data__=new n(a)}return i.set(r,o),this.size=i.size,this}}function fI(){if(uR)return Cb;uR=1;var e=Hy(),t=Pj(),n=Rj(),r=Tj(),o=Mj(),i=Oj();function a(t){var n=this.__data__=new e(t);this.size=n.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,Cb=a}function Dj(){if(lR)return Eb;lR=1;return Eb=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function $j(){if(cR)return Pb;return cR=1,Pb=function(e){return this.__data__.has(e)}}function Nj(){if(dR)return Rb;dR=1;var e=dI(),t=Dj(),n=$j();function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Rb=r}function kj(){if(fR)return Tb;return fR=1,Tb=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}}function Lj(){if(pR)return Mb;return pR=1,Mb=function(e,t){return e.has(t)}}function y$(){if(hR)return Ob;hR=1;var e=Nj(),t=kj(),n=Lj();return Ob=function(r,o,i,a,s,u){var l=1&i,c=r.length,d=o.length;if(c!=d&&!(l&&d>c))return!1;var f=u.get(r),p=u.get(o);if(f&&p)return f==o&&p==r;var m=-1,h=!0,g=2&i?new e:void 0;for(u.set(r,o),u.set(o,r);++m<c;){var y=r[m],v=o[m];if(a)var b=l?a(v,y,m,o,r,u):a(y,v,m,r,o,u);if(void 0!==b){if(b)continue;h=!1;break}if(g){if(!t(o,(function(e,t){if(!n(g,t)&&(y===e||s(y,e,i,a,u)))return g.push(t)}))){h=!1;break}}else if(y!==v&&!s(y,v,i,a,u)){h=!1;break}}return u.delete(r),u.delete(o),h}}function w$(){if(mR)return Db;mR=1;var e=oi().Uint8Array;return Db=e}function Bj(){if(vR)return $b;return vR=1,$b=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function Vj(){if(gR)return Nb;return gR=1,Nb=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function jj(){if(yR)return kb;yR=1;var e=Yh(),t=w$(),n=lI(),r=y$(),o=Bj(),i=Vj(),a=e?e.prototype:void 0,s=a?a.valueOf:void 0;return kb=function(e,a,u,l,c,d,f){switch(u){case"[object DataView]":if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=a.byteLength||!d(new t(e),new t(a)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+a);case"[object Error]":return e.name==a.name&&e.message==a.message;case"[object RegExp]":case"[object String]":return e==a+"";case"[object Map]":var p=o;case"[object Set]":var m=1&l;if(p||(p=i),e.size!=a.size&&!m)return!1;var h=f.get(e);if(h)return h==a;l|=2,f.set(e,a);var g=r(p(e),p(a),l,c,d,f);return f.delete(e),g;case"[object Symbol]":if(s)return s.call(e)==s.call(a)}return!1}}function pI(){if(wR)return Lb;return wR=1,Lb=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function b$(){if(bR)return Bb;bR=1;var e=pI(),t=_i();return Bb=function(n,r,o){var i=r(n);return t(n)?i:e(i,o(n))}}function Fj(){if(xR)return Vb;return xR=1,Vb=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}}function x$(){if(AR)return jb;return AR=1,jb=function(){return[]}}function hI(){if(SR)return Fb;SR=1;var e=Fj(),t=x$(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Fb=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function zj(){if(_R)return zb;return _R=1,zb=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function Uj(){if(IR)return Ub;IR=1;var e=Ml(),t=ta();return Ub=function(n){return t(n)&&"[object Arguments]"==e(n)}}function mI(){if(CR)return Gb;CR=1;var e=Uj(),t=ta(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return Gb=i}var Wb,ER,PR,qb,RR,Hb,TR,Xb,MR,Qb,OR,sv={exports:{}};function Gj(){if(ER)return Wb;return ER=1,Wb=function(){return!1}}function vI(){return PR||(PR=1,e=sv,t=sv.exports,n=oi(),r=Gj(),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r,e.exports=s),sv.exports;var e,t,n,r,o,i,a,s}function gI(){if(RR)return qb;RR=1;var e=/^(?:0|[1-9]\d*)$/;return qb=function(t,n){var r=typeof t;return!!(n=n??9007199254740991)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function yI(){if(TR)return Hb;TR=1;return Hb=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function Wj(){if(MR)return Xb;MR=1;var e=Ml(),t=yI(),n=ta(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Xb=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function wI(){if(OR)return Qb;return OR=1,Qb=function(e){return function(t){return e(t)}}}sv.exports;var DR,Kb,$R,Yb,NR,Jb,kR,Zb,LR,ex,BR,tx,VR,nx,jR,rx,FR,ox,zR,ix,UR,ax,GR,sx,WR,ux,qR,lx,HR,cx,XR,dx,QR,fx,KR,px,YR,hx,JR,mx,ZR,vx,eT,gx,tT,yx,nT,wx,rT,bx,oT,xx,iT,Ax,aT,Sx,sT,_x,uT,Ix,lT,Cx,cT,Ex,dT,Px,fT,Rx,pT,Tx,hT,Mx,mT,Ox,vT,Dx,gT,$x,yT,Nx,wT,kx,bT,Lx,xT,Bx,AT,Vx,ST,jx,_T,Fx,IT,zx,CT,Ux,ET,Gx,PT,Wx,RT,qx,TT,Hx,MT,uv={exports:{}};function bI(){return DR||(DR=1,e=uv,t=uv.exports,n=l$(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||i&&i.binding&&i.binding("util")}catch{}}(),e.exports=a),uv.exports;var e,t,n,r,o,i,a}function A$(){if($R)return Kb;$R=1;var e=Wj(),t=wI(),n=bI(),r=n&&n.isTypedArray,o=r?t(r):e;return Kb=o}function S$(){if(NR)return Yb;NR=1;var e=zj(),t=mI(),n=_i(),r=vI(),o=gI(),i=A$(),a=Object.prototype.hasOwnProperty;return Yb=function(s,u){var l=n(s),c=!l&&t(s),d=!l&&!c&&r(s),f=!l&&!c&&!d&&i(s),p=l||c||d||f,m=p?e(s.length,String):[],h=m.length;for(var g in s)(u||a.call(s,g))&&(!p||!("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||o(g,h)))&&m.push(g);return m}}function xI(){if(kR)return Jb;kR=1;var e=Object.prototype;return Jb=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function _$(){if(LR)return Zb;return LR=1,Zb=function(e,t){return function(n){return e(t(n))}}}function qj(){if(BR)return ex;BR=1;var e=_$()(Object.keys,Object);return ex=e}function I$(){if(VR)return tx;VR=1;var e=xI(),t=qj(),n=Object.prototype.hasOwnProperty;return tx=function(r){if(!e(r))return t(r);var o=[];for(var i in Object(r))n.call(r,i)&&"constructor"!=i&&o.push(i);return o}}function C$(){if(jR)return nx;jR=1;var e=Gy(),t=yI();return nx=function(n){return null!=n&&t(n.length)&&!e(n)}}function Qy(){if(FR)return rx;FR=1;var e=S$(),t=I$(),n=C$();return rx=function(r){return n(r)?e(r):t(r)}}function E$(){if(zR)return ox;zR=1;var e=b$(),t=hI(),n=Qy();return ox=function(r){return e(r,n,t)}}function Hj(){if(UR)return ix;UR=1;var e=E$(),t=Object.prototype.hasOwnProperty;return ix=function(n,r,o,i,a,s){var u=1&o,l=e(n),c=l.length;if(c!=e(r).length&&!u)return!1;for(var d=c;d--;){var f=l[d];if(!(u?f in r:t.call(r,f)))return!1}var p=s.get(n),m=s.get(r);if(p&&m)return p==r&&m==n;var h=!0;s.set(n,r),s.set(r,n);for(var g=u;++d<c;){var y=n[f=l[d]],v=r[f];if(i)var b=u?i(v,y,f,r,n,s):i(y,v,f,n,r,s);if(!(void 0===b?y===v||a(y,v,o,i,s):b)){h=!1;break}g||(g="constructor"==f)}if(h&&!g){var w=n.constructor,A=r.constructor;w!=A&&"constructor"in n&&"constructor"in r&&!("function"==typeof w&&w instanceof w&&"function"==typeof A&&A instanceof A)&&(h=!1)}return s.delete(n),s.delete(r),h}}function Xj(){if(GR)return ax;GR=1;var e=sp()(oi(),"DataView");return ax=e}function Qj(){if(WR)return sx;WR=1;var e=sp()(oi(),"Promise");return sx=e}function Kj(){if(qR)return ux;qR=1;var e=sp()(oi(),"Set");return ux=e}function P$(){if(HR)return lx;HR=1;var e=sp()(oi(),"WeakMap");return lx=e}function Yv(){if(XR)return cx;XR=1;var e=Xj(),t=cI(),n=Qj(),r=Kj(),o=P$(),i=Ml(),a=c$(),s="[object Map]",u="[object Promise]",l="[object Set]",c="[object WeakMap]",d="[object DataView]",f=a(e),p=a(t),m=a(n),h=a(r),g=a(o),y=i;return(e&&y(new e(new ArrayBuffer(1)))!=d||t&&y(new t)!=s||n&&y(n.resolve())!=u||r&&y(new r)!=l||o&&y(new o)!=c)&&(y=function(e){var t=i(e),n="[object Object]"==t?e.constructor:void 0,r=n?a(n):"";if(r)switch(r){case f:return d;case p:return s;case m:return u;case h:return l;case g:return c}return t}),cx=y}function Yj(){if(QR)return dx;QR=1;var e=fI(),t=y$(),n=jj(),r=Hj(),o=Yv(),i=_i(),a=vI(),s=A$(),u="[object Arguments]",l="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return dx=function(f,p,m,h,g,y){var v=i(f),b=i(p),w=v?l:o(f),A=b?l:o(p),x=(w=w==u?c:w)==c,S=(A=A==u?c:A)==c,I=w==A;if(I&&a(f)){if(!a(p))return!1;v=!0,x=!1}if(I&&!x)return y||(y=new e),v||s(f)?t(f,p,m,h,g,y):n(f,p,w,m,h,g,y);if(!(1&m)){var E=x&&d.call(f,"__wrapped__"),C=S&&d.call(p,"__wrapped__");if(E||C){var P=E?f.value():f,k=C?p.value():p;return y||(y=new e),g(P,k,m,h,y)}}return!!I&&(y||(y=new e),r(f,p,m,h,g,y))}}function R$(){if(KR)return fx;KR=1;var e=Yj(),t=ta();return fx=function n(r,o,i,a,s){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,i,a,n,s))},fx}function Jj(){if(YR)return px;YR=1;var e=fI(),t=R$();return px=function(n,r,o,i){var a=o.length,s=a,u=!i;if(null==n)return!s;for(n=Object(n);a--;){var l=o[a];if(u&&l[2]?l[1]!==n[l[0]]:!(l[0]in n))return!1}for(;++a<s;){var c=(l=o[a])[0],d=n[c],f=l[1];if(u&&l[2]){if(void 0===d&&!(c in n))return!1}else{var p=new e;if(i)var m=i(d,f,c,n,r,p);if(!(void 0===m?t(f,d,3,i,p):m))return!1}}return!0}}function T$(){if(JR)return hx;JR=1;var e=Ss();return hx=function(t){return t==t&&!e(t)}}function Zj(){if(ZR)return mx;ZR=1;var e=T$(),t=Qy();return mx=function(n){for(var r=t(n),o=r.length;o--;){var i=r[o],a=n[i];r[o]=[i,a,e(a)]}return r}}function M$(){if(eT)return vx;return eT=1,vx=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function eF(){if(tT)return gx;tT=1;var e=Jj(),t=Zj(),n=M$();return gx=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function tF(){if(nT)return yx;return nT=1,yx=function(e,t){return null!=e&&t in Object(e)}}function nF(){if(rT)return wx;rT=1;var e=h$(),t=mI(),n=_i(),r=gI(),o=yI(),i=Kv();return wx=function(a,s,u){for(var l=-1,c=(s=e(s,a)).length,d=!1;++l<c;){var f=i(s[l]);if(!(d=null!=a&&u(a,f)))break;a=a[f]}return d||++l!=c?d:!!(c=null==a?0:a.length)&&o(c)&&r(f,c)&&(n(a)||t(a))}}function rF(){if(oT)return bx;oT=1;var e=tF(),t=nF();return bx=function(n,r){return null!=n&&t(n,r,e)}}function oF(){if(iT)return xx;iT=1;var e=R$(),t=v$(),n=rF(),r=uI(),o=T$(),i=M$(),a=Kv();return xx=function(s,u){return r(s)&&o(u)?i(a(s),u):function(r){var o=t(r,s);return void 0===o&&o===u?n(r,s):e(u,o,3)}}}function AI(){if(aT)return Ax;return aT=1,Ax=function(e){return e}}function iF(){if(sT)return Sx;return sT=1,Sx=function(e){return function(t){return null==t?void 0:t[e]}}}function aF(){if(uT)return _x;uT=1;var e=m$();return _x=function(t){return function(n){return e(n,t)}}}function sF(){if(lT)return Ix;lT=1;var e=iF(),t=aF(),n=uI(),r=Kv();return Ix=function(o){return n(o)?e(r(o)):t(o)}}function uF(){if(cT)return Cx;cT=1;var e=eF(),t=oF(),n=AI(),r=_i(),o=sF();return Cx=function(i){return"function"==typeof i?i:null==i?n:"object"==typeof i?r(i)?t(i[0],i[1]):e(i):o(i)}}function lF(){if(dT)return Ex;return dT=1,Ex=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}}function cF(){if(fT)return Px;return fT=1,Px=function(e){return e!=e}}function dF(){if(pT)return Rx;return pT=1,Rx=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function fF(){if(hT)return Tx;hT=1;var e=lF(),t=cF(),n=dF();return Tx=function(r,o,i){return o==o?n(r,o,i):e(r,t,i)}}function pF(){if(mT)return Mx;mT=1;var e=fF();return Mx=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function hF(){if(vT)return Ox;return vT=1,Ox=function(){}}function mF(){if(gT)return Dx;gT=1;var e=Yh(),t=mI(),n=_i(),r=e?e.isConcatSpreadable:void 0;return Dx=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function vF(){if(yT)return $x;yT=1;var e=pI(),t=mF();return $x=function n(r,o,i,a,s){var u=-1,l=r.length;for(i||(i=t),s||(s=[]);++u<l;){var c=r[u];o>0&&i(c)?o>1?n(c,o-1,i,a,s):e(s,c):a||(s[s.length]=c)}return s},$x}function SI(){if(wT)return Nx;return wT=1,Nx=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}}function gF(){if(bT)return kx;bT=1;var e=SI(),t=Math.max;return kx=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var i=arguments,a=-1,s=t(i.length-r,0),u=Array(s);++a<s;)u[a]=i[r+a];a=-1;for(var l=Array(r+1);++a<r;)l[a]=i[a];return l[r]=o(u),e(n,this,l)}},kx}function yF(){if(xT)return Lx;return xT=1,Lx=function(e){return function(){return e}}}function O$(){if(AT)return Bx;AT=1;var e=sp(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return Bx=t}function wF(){if(ST)return Vx;ST=1;var e=yF(),t=O$(),n=AI();return Vx=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function D$(){if(_T)return jx;_T=1;var e=Date.now;return jx=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},jx}function $$(){if(IT)return Fx;IT=1;var e=wF(),t=D$()(e);return Fx=t}function bF(){if(CT)return zx;CT=1;var e=oi();return zx=function(){return e.Date.now()}}function xF(){if(ET)return Ux;ET=1;var e=/\s/;return Ux=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function AF(){if(PT)return Gx;PT=1;var e=xF(),t=/^\s+/;return Gx=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function N$(){if(RT)return Wx;RT=1;var e=AF(),t=Ss(),n=Qv(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt;return Wx=function(s){if("number"==typeof s)return s;if(n(s))return NaN;if(t(s)){var u="function"==typeof s.valueOf?s.valueOf():s;s=t(u)?u+"":u}if("string"!=typeof s)return 0===s?s:+s;s=e(s);var l=o.test(s);return l||i.test(s)?a(s.slice(2),l?2:8):r.test(s)?NaN:+s}}function k$(){if(TT)return qx;TT=1;var e=Ss(),t=bF(),n=N$(),r=Math.max,o=Math.min;return qx=function(i,a,s){var u,l,c,d,f,p,m=0,h=!1,g=!1,y=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function v(e){var t=u,n=l;return u=l=void 0,m=e,d=i.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=a||t<0||g&&e-m>=c}function w(){var e=t();if(b(e))return A(e);f=setTimeout(w,function(e){var t=a-(e-p);return g?o(t,c-(e-m)):t}(e))}function A(e){return f=void 0,y&&u?v(e):(u=l=void 0,d)}function x(){var e=t(),n=b(e);if(u=arguments,l=this,p=e,n){if(void 0===f)return function(e){return m=e,f=setTimeout(w,a),h?v(e):d}(p);if(g)return clearTimeout(f),f=setTimeout(w,a),v(p)}return void 0===f&&(f=setTimeout(w,a)),d}return a=n(a)||0,e(s)&&(h=!!s.leading,c=(g="maxWait"in s)?r(n(s.maxWait)||0,a):c,y="trailing"in s?!!s.trailing:y),x.cancel=function(){void 0!==f&&clearTimeout(f),m=0,u=p=l=f=void 0},x.flush=function(){return void 0===f?d:A(t())},x},qx}function SF(){if(MT)return Hx;MT=1;var e=k$(),t=Ss();return Hx=function(n,r,o){var i=!0,a=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(o)&&(i="leading"in o?!!o.leading:i,a="trailing"in o?!!o.trailing:a),e(n,r,{leading:i,maxWait:r,trailing:a})}}uv.exports;var _F=SF();const IF=My(_F);function Tv(e){return(Tv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OT(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 Wg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OT(Object(n),!0).forEach((function(t){CF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function CF(e,t,n){return(t=EF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EF(e){var t=PF(e,"string");return"symbol"==Tv(t)?t:t+""}function PF(e,t){if("object"!=Tv(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Tv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function RF(e,t){return DF(e)||OF(e,t)||MF(e,t)||TF()}function TF(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function MF(e,t){if(e){if("string"==typeof e)return DT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DT(e,t)}}function DT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function OF(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}function DF(e){if(Array.isArray(e))return e}var Xx,$T,Qx,NT,Kx,kT,Yx,LT,Jx,BT,Zx,VT,eA,jT,tA,FT,nA,zT,rA,UT,oA,GT,iA,WT,aA,qT,$F=g.forwardRef((function(e,t){var n=e.aspect,r=e.initialDimension,o=void 0===r?{width:-1,height:-1}:r,i=e.width,a=void 0===i?"100%":i,s=e.height,u=void 0===s?"100%":s,l=e.minWidth,c=void 0===l?0:l,d=e.minHeight,f=e.maxHeight,p=e.children,m=e.debounce,h=void 0===m?0:m,y=e.id,v=e.className,b=e.onResize,w=e.style,A=void 0===w?{}:w,x=g.useRef(null),S=g.useRef();S.current=b,g.useImperativeHandle(t,(function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),x.current},configurable:!0})}));var I=RF(g.useState({containerWidth:o.width,containerHeight:o.height}),2),E=I[0],C=I[1],P=g.useCallback((function(e,t){C((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);g.useEffect((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;P(r,o),null===(t=S.current)||void 0===t||t.call(S,r,o)};h>0&&(e=IF(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,o=n.height;return P(r,o),t.observe(x.current),function(){t.disconnect()}}),[P,h]);var k=g.useMemo((function(){var e=E.containerWidth,t=E.containerHeight;if(e<0||t<0)return null;bb(Gg(a)||Gg(u),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",a,u),bb(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=Gg(a)?e:a,o=Gg(u)?t:u;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),bb(r>0||o>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",r,o,a,u,c,d,n);var i=!Array.isArray(p)&&Ej(p.type).endsWith("Chart");return Oe.Children.map(p,(function(e){return Oe.isValidElement(e)?g.cloneElement(e,Wg({width:r,height:o},i?{style:Wg({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,u,f,d,c,E,a]);return Oe.createElement("div",{id:y?"".concat(y):void 0,className:pD("recharts-responsive-container",v),style:Wg(Wg({},A),{},{width:a,height:u,minWidth:c,minHeight:d,maxHeight:f}),ref:x},k)}));function _I(){if($T)return Xx;$T=1;var e=_$()(Object.getPrototypeOf,Object);return Xx=e}function NF(){if(NT)return Qx;NT=1;var e=Ml(),t=_I(),n=ta(),r=Function.prototype,o=Object.prototype,i=r.toString,a=o.hasOwnProperty,s=i.call(Object);return Qx=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var u=a.call(o,"constructor")&&o.constructor;return"function"==typeof u&&u instanceof u&&i.call(u)==s}}function kF(){if(kT)return Kx;kT=1;var e=N$(),t=1/0;return Kx=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function L$(){if(LT)return Yx;LT=1;var e=O$();return Yx=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function B$(){if(BT)return Jx;BT=1;var e=kF();return Jx=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function II(){if(VT)return Zx;return VT=1,Zx=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function V$(){if(jT)return eA;jT=1;var e=L$(),t=lI(),n=Object.prototype.hasOwnProperty;return eA=function(r,o,i){var a=r[o];(!n.call(r,o)||!t(a,i)||void 0===i&&!(o in r))&&e(r,o,i)}}function Ky(){if(FT)return tA;FT=1;var e=V$(),t=L$();return tA=function(n,r,o,i){var a=!o;o||(o={});for(var s=-1,u=r.length;++s<u;){var l=r[s],c=i?i(o[l],n[l],l,o,n):void 0;void 0===c&&(c=n[l]),a?t(o,l,c):e(o,l,c)}return o}}function j$(){if(zT)return nA;zT=1;var e=Ky(),t=Qy();return nA=function(n,r){return n&&e(r,t(r),n)}}function LF(){if(UT)return rA;return UT=1,rA=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function BF(){if(GT)return oA;GT=1;var e=Ss(),t=xI(),n=LF(),r=Object.prototype.hasOwnProperty;return oA=function(o){if(!e(o))return n(o);var i=t(o),a=[];for(var s in o)"constructor"==s&&(i||!r.call(o,s))||a.push(s);return a}}function CI(){if(WT)return iA;WT=1;var e=S$(),t=BF(),n=C$();return iA=function(r){return n(r)?e(r,!0):t(r)}}function VF(){if(qT)return aA;qT=1;var e=Ky(),t=CI();return aA=function(n,r){return n&&e(r,t(r),n)}}var HT,sA,XT,uA,QT,lA,KT,cA,YT,dA,JT,fA,ZT,pA,eM,hA,tM,mA,nM,vA,rM,gA,oM,yA,iM,wA,aM,bA,sM,xA,uM,AA,lM,SA,cM,_A,dM,IA,fM,CA,pM,EA,hM,lv={exports:{}};function jF(){return HT||(HT=1,e=lv,t=lv.exports,n=oi(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r?n.Buffer:void 0,a=i?i.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}),lv.exports;var e,t,n,r,o,i,a}function Yy(){if(XT)return sA;return XT=1,sA=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function FF(){if(QT)return uA;QT=1;var e=Ky(),t=hI();return uA=function(n,r){return e(n,t(n),r)}}function F$(){if(KT)return lA;KT=1;var e=pI(),t=_I(),n=hI(),r=x$(),o=Object.getOwnPropertySymbols;return lA=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function zF(){if(YT)return cA;YT=1;var e=Ky(),t=F$();return cA=function(n,r){return e(n,t(n),r)}}function UF(){if(JT)return dA;JT=1;var e=b$(),t=F$(),n=CI();return dA=function(r){return e(r,n,t)}}function GF(){if(ZT)return fA;ZT=1;var e=Object.prototype.hasOwnProperty;return fA=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}function EI(){if(eM)return pA;eM=1;var e=w$();return pA=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function WF(){if(tM)return hA;tM=1;var e=EI();return hA=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function qF(){if(nM)return mA;nM=1;var e=/\w*$/;return mA=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function HF(){if(rM)return vA;rM=1;var e=Yh(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return vA=function(e){return n?Object(n.call(e)):{}}}function XF(){if(oM)return gA;oM=1;var e=EI();return gA=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function QF(){if(iM)return yA;iM=1;var e=EI(),t=WF(),n=qF(),r=HF(),o=XF();return yA=function(i,a,s){var u=i.constructor;switch(a){case"[object ArrayBuffer]":return e(i);case"[object Boolean]":case"[object Date]":return new u(+i);case"[object DataView]":return t(i,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(i,s);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(i);case"[object RegExp]":return n(i);case"[object Symbol]":return r(i)}}}function Jy(){if(aM)return wA;aM=1;var e=Ss(),t=Object.create;return wA=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}()}function KF(){if(sM)return bA;sM=1;var e=Jy(),t=_I(),n=xI();return bA=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function YF(){if(uM)return xA;uM=1;var e=Yv(),t=ta();return xA=function(n){return t(n)&&"[object Map]"==e(n)}}function JF(){if(lM)return AA;lM=1;var e=YF(),t=wI(),n=bI(),r=n&&n.isMap,o=r?t(r):e;return AA=o}function ZF(){if(cM)return SA;cM=1;var e=Yv(),t=ta();return SA=function(n){return t(n)&&"[object Set]"==e(n)}}function ez(){if(dM)return _A;dM=1;var e=ZF(),t=wI(),n=bI(),r=n&&n.isSet,o=r?t(r):e;return _A=o}function z$(){if(fM)return IA;fM=1;var e=fI(),t=II(),n=V$(),r=j$(),o=VF(),i=jF(),a=Yy(),s=FF(),u=zF(),l=E$(),c=UF(),d=Yv(),f=GF(),p=QF(),m=KF(),h=_i(),g=vI(),y=JF(),v=Ss(),b=ez(),w=Qy(),A=CI(),x="[object Arguments]",S="[object Function]",I="[object Object]",E={};return E[x]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E[I]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E[S]=E["[object WeakMap]"]=!1,IA=function C(P,k,_,T,M,O){var R,N=1&k,z=2&k,D=4&k;if(_&&(R=M?_(P,T,M,O):_(P)),void 0!==R)return R;if(!v(P))return P;var j=h(P);if(j){if(R=f(P),!N)return a(P,R)}else{var V=d(P),L=V==S||"[object GeneratorFunction]"==V;if(g(P))return i(P,N);if(V==I||V==x||L&&!M){if(R=z||L?{}:m(P),!N)return z?u(P,o(R,P)):s(P,r(R,P))}else{if(!E[V])return M?P:{};R=p(P,V,N)}}O||(O=new e);var q=O.get(P);if(q)return q;O.set(P,R),b(P)?P.forEach((function(e){R.add(C(e,k,_,e,P,O))})):y(P)&&P.forEach((function(e,t){R.set(t,C(e,k,_,t,P,O))}));var B=j?void 0:(D?z?c:l:z?A:w)(P);return t(B||P,(function(e,t){B&&(e=P[t=e]),n(R,t,C(e,k,_,t,P,O))})),R},IA}function tz(){if(pM)return CA;pM=1;var e=vF();return CA=function(t){return(null==t?0:t.length)?e(t,1):[]}}function nz(){if(hM)return EA;hM=1;var e=tz(),t=gF(),n=$$();return EA=function(r){return n(t(r,void 0,e),r+"")}}lv.exports;const rz={light:"",dark:".dark"},U$=g.createContext(null);function G$(){const e=g.useContext(U$);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const oz=g.forwardRef((({id:e,className:t,children:n,config:r,...o},i)=>{const a=g.useId(),s=`chart-${e||a.replace(/:/g,"")}`;return z.jsx(U$.Provider,{value:{config:r},children:z.jsxs("div",{"data-chart":s,ref:i,className:ye("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...o,children:[z.jsx(iz,{id:s,config:r}),z.jsx($F,{children:n})]})})}));oz.displayName="Chart";const iz=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?z.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(rz).map((([t,r])=>`\n${r} [data-chart=${e}] {\n${n.map((([e,n])=>{var r;const o=(null==(r=n.theme)?void 0:r[t])||n.color;return o?` --color-${e}: ${o};`:null})).join("\n")}\n}\n`)).join("\n")}}):null},az=g.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:s,labelClassName:u,formatter:l,color:c,nameKey:d,labelKey:f,hoveredItem:p,onItemHover:m},h)=>{const{config:y}=G$(),v=g.useMemo((()=>{var e;if(o||null==t||!t.length)return null;const[n]=t,r=`${f||(null==n?void 0:n.dataKey)||(null==n?void 0:n.name)||"value"}`,i=t_(y,n,r),l=f||"string"!=typeof a?null==i?void 0:i.label:(null==(e=y[a])?void 0:e.label)||a;return s?z.jsx("div",{className:ye("font-medium",u),children:s(l,t)}):l?z.jsx("div",{className:ye("font-medium",u),children:l}):null}),[a,s,t,o,u,y,f]);if(!e||null==t||!t.length)return null;const b=1===t.length&&"dot"!==r,w=t.length>10;return z.jsxs("div",{ref:h,className:ye("grid min-w-[8rem] items-start gap-xxs rounded-sm border border-border/50 bg-background px-xs py-xxs text-xs shadow-xl",w&&"min-w-[16rem]",n),children:[b?null:v,z.jsx("div",{className:ye("grid gap-xxs",w&&"grid-cols-2 gap-x-s"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,a=t_(y,e,o),s=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"",u=o===p;return z.jsx("div",{className:ye("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground","dot"===r&&"items-center",u?"":p?"opacity-40":""),onMouseEnter:()=>null==m?void 0:m(o),onMouseLeave:()=>null==m?void 0:m(null),children:l&&void 0!==(null==e?void 0:e.value)&&void 0!==(null==e?void 0:e.payload)&&e.name?l(e.value,e.name,e,t,[e.payload]):z.jsxs(z.Fragment,{children:[null!=a&&a.icon?z.jsx(a.icon,{}):!i&&z.jsx("div",{className:ye("shrink-0 rounded-full border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border border-dashed bg-transparent":"dashed"===r,"my-0.5":b&&"dashed"===r}),style:{"--color-bg":s,"--color-border":s}}),z.jsxs("div",{className:ye("flex flex-1 justify-between leading-none",b?"items-end":"items-center"),children:[z.jsxs("div",{className:"grid gap-xxs",children:[b?v:null,z.jsx("span",{className:ye("text-muted-foreground",u&&"font-medium text-foreground"),children:(null==a?void 0:a.label)||e.name})]}),e.value&&z.jsx("span",{className:ye("font-mono font-medium tabular-nums text-foreground",u&&"font-bold"),children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));az.displayName="ChartTooltip";const sz=g.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:i},a)=>{const{config:s}=G$(),u=g.useRef({});return g.useEffect((()=>{if(i&&u.current[i]){const e=u.current[i];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[i]),null!=n&&n.length?z.jsx("div",{ref:a,className:ye("flex h-[150px] w-full flex-wrap items-center justify-center gap-l overflow-y-auto pb-xl",e),children:n.map((e=>{var n;const a=`${r||e.dataKey||"value"}`,l=t_(s,e,a),c=!!o&&a===i;return z.jsxs("div",{ref:e=>{e?u.current[a]=e:delete u.current[a]},className:ye("group flex cursor-pointer select-none items-center gap-xs text-base transition-all duration-150",c?"scale-105 text-black":i?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==o?void 0:o(e.dataKey),onMouseLeave:()=>null==o?void 0:o(null),children:[null!=l&&l.icon&&!t?z.jsx(l.icon,{}):z.jsx("div",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e.color||""}}),z.jsx("span",{className:"min-w-[max-content]",children:(null==l?void 0:l.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||a)}))}):null}));function t_(e,t,n){if("object"!=typeof t||null===t)return;const r="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0;let o=n;return n in t&&"string"==typeof t[n]?o=t[n]:r&&n in r&&"string"==typeof r[n]&&(o=r[n]),o in e?e[o]:e[n]}sz.displayName="ChartLegend";const uz=({children:e,className:t})=>z.jsx("div",{className:ye("flex flex-wrap gap-xxxs",t),children:e}),W$=({text:e,icon:t,disabled:n,isLoading:r,avatarSrc:o,onClick:i,onRemove:a,className:s})=>z.jsxs("div",{onClick:n?void 0:i,className:ye("flex cursor-pointer items-center gap-xxxs rounded-sm bg-gray-100 p-xxs text-sm font-medium text-gray-900 transition-all hover:bg-gray-200 [&_svg]:size-4",n&&"cursor-not-allowed bg-gray-100 text-gray-300",s),children:[o&&z.jsxs(e$,{className:ye("size-6 text-[10px]"),children:[z.jsx(t$,{src:o,alt:e}),z.jsx(n$,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,z.jsx("span",{children:e}),a&&!r&&z.jsx("span",{role:"button",tabIndex:-1,onClick:e=>{e.stopPropagation(),e.preventDefault(),!n&&(null==a||a())},onPointerDown:e=>{e.stopPropagation(),e.preventDefault()},className:ye("pointer-events-auto cursor-pointer",n&&"pointer-events-none cursor-not-allowed opacity-50"),children:z.jsx(Wv,{size:16})}),r&&z.jsx(q_,{size:16,className:"animate-spin"})]});function Zy(e){const t=g.useRef({value:e,previous:e});return g.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function e0(e){const[t,n]=g.useState(void 0);return Uo((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const q$="Checkbox",[lz,wce]=ri(q$),[cz,dz]=lz(q$),fz=g.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:u="on",onCheckedChange:l,...c}=e,[d,f]=g.useState(null),p=zt(t,(e=>f(e))),m=g.useRef(!1),h=!d||!!d.closest("form"),[y=!1,v]=bd({prop:o,defaultProp:i,onChange:l}),b=g.useRef(y);return g.useEffect((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>v(b.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,v]),g.createElement(cz,{scope:n,state:y,disabled:s},g.createElement(ft.button,Te({type:"button",role:"checkbox","aria-checked":Hf(y)?"mixed":y,"aria-required":a,"data-state":H$(y),"data-disabled":s?"":void 0,disabled:s,value:u},c,{ref:p,onKeyDown:et(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:et(e.onClick,(e=>{v((e=>!!Hf(e)||!e)),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&g.createElement(mz,{control:d,bubbles:!m.current,name:r,value:u,checked:y,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))})),pz="CheckboxIndicator",hz=g.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=dz(pz,n);return g.createElement(ea,{present:r||Hf(i.state)||!0===i.state},g.createElement(ft.span,Te({"data-state":H$(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),mz=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=g.useRef(null),a=Zy(n),s=e0(t);return g.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=Hf(n),o.call(e,!Hf(n)&&n),e.dispatchEvent(t)}}),[a,n,r]),g.createElement("input",Te({type:"checkbox","aria-hidden":!0,defaultChecked:!Hf(n)&&n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Hf(e){return"indeterminate"===e}function H$(e){return Hf(e)?"indeterminate":e?"checked":"unchecked"}const X$=fz,vz=hz,gz=xu("relative overflow-hidden ",{variants:{size:{default:"size-xs"},variant:{default:"peer shrink-0 rounded-sm border disabled:cursor-not-allowed disabled:!border-0 disabled:!bg-gray-100"}},defaultVariants:{size:"default",variant:"default"}}),PI=g.forwardRef((({className:e,size:t,variant:n,iconType:r,...o},i)=>{const a=o.checked,[s]=g.useState(a),[u,l]=g.useState(!1);g.useEffect((()=>{s!==a&&l(!0)}),[a]);const c=e=>"minus"===r?z.jsx(o8,{...e}):z.jsx($y,{...e});return z.jsxs(X$,{ref:i,className:ye(gz({size:t,variant:n}),"transition-[border] duration-100 ease-linear",a?"border-0":"border-gray-300 hover:border-2",e),...o,children:[z.jsx("div",{className:ye("transform-origin-center absolute left-0 top-0 size-full rounded-full bg-blue_100",a?"scale-[1.2]":"scale-0",{"animate-fill-in":a&&u,"animate-fill-out":!a&&u})}),z.jsx(vz,{className:"relative flex items-center justify-center text-current",children:z.jsx(c,{className:"size-xxxs",color:o.disabled?"var(--gray-300)":"white"})})]})}));PI.displayName=X$.displayName;var mM=1,yz=.9,wz=.8,bz=.17,PA=.1,RA=.999,xz=.9999,Az=.99,Sz=/[\\\/_+.#"@\[\(\{&]/,_z=/[\\\/_+.#"@\[\(\{&]/g,Iz=/[\s-]/,Q$=/[\s-]/g;function n_(e,t,n,r,o,i,a){if(i===t.length)return o===e.length?mM:Az;var s=`${o},${i}`;if(void 0!==a[s])return a[s];for(var u,l,c,d,f=r.charAt(i),p=n.indexOf(f,o),m=0;p>=0;)(u=n_(e,t,n,r,p+1,i+1,a))>m&&(p===o?u*=mM:Sz.test(e.charAt(p-1))?(u*=wz,(c=e.slice(o,p-1).match(_z))&&o>0&&(u*=Math.pow(RA,c.length))):Iz.test(e.charAt(p-1))?(u*=yz,(d=e.slice(o,p-1).match(Q$))&&o>0&&(u*=Math.pow(RA,d.length))):(u*=bz,o>0&&(u*=Math.pow(RA,p-o))),e.charAt(p)!==t.charAt(i)&&(u*=xz)),(u<PA&&n.charAt(p-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(p-1)!==r.charAt(i))&&((l=n_(e,t,n,r,p+1,i+2,a))*PA>u&&(u=l*PA)),u>m&&(m=u),p=n.indexOf(f,p+1);return a[s]=m,m}function vM(e){return e.toLowerCase().replace(Q$," ")}function Cz(e,t,n){return n_(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,vM(e),vM(t),0,0,{})}var tv='[cmdk-group=""]',TA='[cmdk-group-items=""]',Ez='[cmdk-group-heading=""]',RI='[cmdk-item=""]',gM=`${RI}:not([aria-disabled="true"])`,r_="cmdk-item-select",Uf="data-value",Pz=(e,t,n)=>Cz(e,t,n),K$=g.createContext(void 0),Jv=()=>g.useContext(K$),Y$=g.createContext(void 0),TI=()=>g.useContext(Y$),J$=g.createContext(void 0),Z$=g.forwardRef(((e,t)=>{let n=Nh((()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",filtered:{count:0,items:new Map,groups:new Set}}})),r=Nh((()=>new Set)),o=Nh((()=>new Map)),i=Nh((()=>new Map)),a=Nh((()=>new Set)),s=eN(e),{label:u,children:l,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:y=!0,...v}=e,b=g.useId(),w=g.useId(),A=g.useId(),x=g.useRef(null),S=Vz();tp((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,I.emit()}}),[c]),tp((()=>{S(6,T)}),[]);let I=g.useMemo((()=>({subscribe:e=>(a.current.add(e),()=>a.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,i,a;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)_(),P(),S(1,k);else if("value"===e&&(r||S(5,T),void 0!==(null==(o=s.current)?void 0:o.value))){let e=t??"";return void(null==(a=(i=s.current).onValueChange)||a.call(i,e))}I.emit()}},emit:()=>{a.current.forEach((e=>e()))}})),[]),E=g.useMemo((()=>({value:(e,t,r)=>{var o;t!==(null==(o=i.current.get(e))?void 0:o.value)&&(i.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,C(t,r)),S(2,(()=>{P(),I.emit()})))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),S(3,(()=>{_(),P(),n.current.value||k(),I.emit()})),()=>{i.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=M();S(4,(()=>{_(),(null==t?void 0:t.getAttribute("id"))===e&&k(),I.emit()}))}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{i.current.delete(e),o.current.delete(e)}),filter:()=>s.current.shouldFilter,label:u||e["aria-label"],disablePointerSelection:h,listId:b,inputId:A,labelId:w,listInnerRef:x})),[]);function C(e,t){var r,o;let i=null!=(o=null==(r=s.current)?void 0:r.filter)?o:Pz;return e?i(e,n.current.search,t):0}function P(){if(!n.current.search||!1===s.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=o.current.get(n),i=0;r.forEach((t=>{let n=e.get(t);i=Math.max(n,i)})),t.push([n,i])}));let r=x.current;O().sort(((t,n)=>{var r,o;let i=t.getAttribute("id"),a=n.getAttribute("id");return(null!=(r=e.get(a))?r:0)-(null!=(o=e.get(i))?o:0)})).forEach((e=>{let t=e.closest(TA);t?t.appendChild(e.parentElement===t?e:e.closest(`${TA} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${TA} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${tv}[${Uf}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function k(){let e=O().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(Uf);I.setState("value",t||void 0)}function _(){var e,t,a,u;if(!n.current.search||!1===s.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let l=0;for(let o of r.current){let r=C(null!=(t=null==(e=i.current.get(o))?void 0:e.value)?t:"",null!=(u=null==(a=i.current.get(o))?void 0:a.keywords)?u:[]);n.current.filtered.items.set(o,r),r>0&&l++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=l}function T(){var e,t,n;let r=M();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(tv))?void 0:t.querySelector(Ez))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function M(){var e;return null==(e=x.current)?void 0:e.querySelector(`${RI}[aria-selected="true"]`)}function O(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(gM))}function R(e){let t=O()[e];t&&I.setState("value",t.getAttribute(Uf))}function N(e){var t;let n=M(),r=O(),o=r.findIndex((e=>e===n)),i=r[o+e];null!=(t=s.current)&&t.loop&&(i=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),i&&I.setState("value",i.getAttribute(Uf))}function z(e){let t,n=M(),r=null==n?void 0:n.closest(tv);for(;r&&!t;)r=e>0?Lz(r,tv):Bz(r,tv),t=null==r?void 0:r.querySelector(gM);t?I.setState("value",t.getAttribute(Uf)):N(e)}let D=()=>R(O().length-1),j=e=>{e.preventDefault(),e.metaKey?D():e.altKey?z(1):N(1)},V=e=>{e.preventDefault(),e.metaKey?R(0):e.altKey?z(-1):N(-1)};return g.createElement(ft.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=v.onKeyDown)||t.call(v,e),!e.defaultPrevented)switch(e.key){case"n":case"j":y&&e.ctrlKey&&j(e);break;case"ArrowDown":j(e);break;case"p":case"k":y&&e.ctrlKey&&V(e);break;case"ArrowUp":V(e);break;case"Home":e.preventDefault(),R(0);break;case"End":e.preventDefault(),D();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=M();if(t){let e=new Event(r_);t.dispatchEvent(e)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:Fz},u),t0(e,(e=>g.createElement(Y$.Provider,{value:I},g.createElement(K$.Provider,{value:E},e)))))})),Rz=g.forwardRef(((e,t)=>{var n,r;let o=g.useId(),i=g.useRef(null),a=g.useContext(J$),s=Jv(),u=eN(e),l=null!=(r=null==(n=u.current)?void 0:n.forceMount)?r:null==a?void 0:a.forceMount;tp((()=>{if(!l)return s.item(o,null==a?void 0:a.id)}),[l]);let c=tN(o,i,[e.value,e.children,i],e.keywords),d=TI(),f=np((e=>e.value&&e.value===c.current)),p=np((e=>!(!l&&!1!==s.filter())||(!e.search||e.filtered.items.get(o)>0)));function m(){var e,t;h(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function h(){d.setState("value",c.current,!0)}if(g.useEffect((()=>{let t=i.current;if(t&&!e.disabled)return t.addEventListener(r_,m),()=>t.removeEventListener(r_,m)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:y,value:v,onSelect:b,forceMount:w,keywords:A,...x}=e;return g.createElement(ft.div,{ref:Mv([i,t]),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!f,"data-disabled":!!y,"data-selected":!!f,onPointerMove:y||s.disablePointerSelection?void 0:h,onClick:y?void 0:m},e.children)})),Tz=g.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,a=g.useId(),s=g.useRef(null),u=g.useRef(null),l=g.useId(),c=Jv(),d=np((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(a))));tp((()=>c.group(a)),[]),tN(a,s,[e.value,e.heading,u]);let f=g.useMemo((()=>({id:a,forceMount:o})),[o]);return g.createElement(ft.div,{ref:Mv([s,t]),...i,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&g.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),t0(e,(e=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},g.createElement(J$.Provider,{value:f},e)))))})),Mz=g.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=g.useRef(null),i=np((e=>!e.search));return n||i?g.createElement(ft.div,{ref:Mv([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),Oz=g.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,i=TI(),a=np((e=>e.search)),s=np((e=>e.value)),u=Jv(),l=g.useMemo((()=>{var e;let t=null==(e=u.listInnerRef.current)?void 0:e.querySelector(`${RI}[${Uf}="${encodeURIComponent(s)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return g.useEffect((()=>{null!=e.value&&i.setState("search",e.value)}),[e.value]),g.createElement(ft.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:o?e.value:a,onChange:e=>{o||i.setState("search",e.target.value),null==n||n(e.target.value)}})})),Dz=g.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,i=g.useRef(null),a=g.useRef(null),s=Jv();return g.useEffect((()=>{if(a.current&&i.current){let e,t=a.current,n=i.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),g.createElement(ft.div,{ref:Mv([i,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:s.listId},t0(e,(e=>g.createElement("div",{ref:Mv([a,s.listInnerRef]),"cmdk-list-sizer":""},e))))})),$z=g.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:a,...s}=e;return g.createElement(tI,{open:n,onOpenChange:r},g.createElement(Fy,{container:a},g.createElement(Qh,{"cmdk-overlay":"",className:o}),g.createElement(Kh,{"aria-label":e.label,"cmdk-dialog":"",className:i},g.createElement(Z$,{ref:t,...s}))))})),Nz=g.forwardRef(((e,t)=>np((e=>0===e.filtered.count))?g.createElement(ft.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),kz=g.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...i}=e;return g.createElement(ft.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},t0(e,(e=>g.createElement("div",{"aria-hidden":!0},e))))})),Ii=Object.assign(Z$,{List:Dz,Item:Rz,Input:Oz,Group:Tz,Separator:Mz,Dialog:$z,Empty:Nz,Loading:kz});function Lz(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Bz(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function eN(e){let t=g.useRef(e);return tp((()=>{t.current=e})),t}var tp=typeof window>"u"?g.useEffect:g.useLayoutEffect;function Nh(e){let t=g.useRef();return void 0===t.current&&(t.current=e()),t}function Mv(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function np(e){let t=TI(),n=()=>e(t.snapshot());return g.useSyncExternalStore(t.subscribe,n,n)}function tN(e,t,n,r=[]){let o=g.useRef(),i=Jv();return tp((()=>{var a;let s=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),u=r.map((e=>e.trim()));i.value(e,s,u),null==(a=t.current)||a.setAttribute(Uf,s),o.current=s})),o}var Vz=()=>{let[e,t]=g.useState(),n=Nh((()=>new Map));return tp((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function jz(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function t0({asChild:e,children:t},n){return e&&g.isValidElement(t)?g.cloneElement(jz(t),{ref:t.ref},n(t.props.children)):n(t)}var Fz={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const zz=tI,Uz=Fy,nN=g.forwardRef((({className:e,...t},n)=>(g.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{0===Array.from(document.querySelectorAll('[role="dialog"]')).length&&e.forEach((e=>e&&(e.style.filter="none")))}}),[]),z.jsx(Qh,{ref:n,"data-testid":"dialog_overlay",className:ye("fixed inset-0 z-dialog bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));nN.displayName=Qh.displayName;const Gz=xu("",{variants:{closeVariant:{none:"",insideCard:"absolute right-m top-m rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-gray-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-gray-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),Wz=xu("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),rN=g.forwardRef((({title:e,titleIcon:t,className:n,dialogName:r,showClose:o=!0,closeVariant:i="outsideCard",closeSize:a="big",children:s,titleClassName:u,overlayClassName:l,childrenClassName:c,footerClassName:d,onBack:f,onCloseModal:p,renderFooter:m,onScroll:h,...g},y)=>{const v=z.jsxs(zy,{className:ye(Gz({closeVariant:i})),children:[z.jsx(Wv,{onClick:p,fill:"currentColor",className:ye(Wz({closeSize:a}))}),z.jsx("span",{className:"sr-only",children:"Close"})]});return z.jsxs(Uz,{children:[z.jsx(nN,{className:l,onClick:p}),o&&"insideCard"!==i&&v,z.jsxs(Kh,{ref:y,className:ye("fixed left-[50%] top-[50%] z-[101] grid max-w-[600px] translate-x-[-50%] translate-y-[-50%] !overflow-visible rounded-sm bg-background shadow-lg outline-none duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] max-md:w-[calc(100vw-32px)] md:w-full [&>div]:min-w-0",n),...g,children:[e&&z.jsxs("h3",{className:ye("flex items-center justify-center gap-xxs border-b border-gray-200 p-m text-center text-lg font-semibold text-gray-700",u),children:[t,e]}),z.jsx("div",{id:r||"dialog-content",className:ye("p-m",c),onScroll:h,children:s}),o&&"insideCard"===i&&v,f&&z.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:f,className:"absolute left-m top-m",children:z.jsx(uD,{color:"var(--gray-400)",size:24})}),z.jsx(oN,{className:ye("empty:hidden",d),children:null==m?void 0:m()})]})]})}));rN.displayName=Kh.displayName;const oN=({className:e,...t})=>z.jsx("div",{className:ye("flex border-t border-gray-200 p-m",e),...t});oN.displayName="DialogFooter";const qz=g.forwardRef((({className:e,...t},n)=>z.jsx(qv,{ref:n,className:ye("text-lg font-semibold leading-none tracking-tight",e),...t})));qz.displayName=qv.displayName;const Hz=g.forwardRef((({className:e,...t},n)=>z.jsx(Hv,{ref:n,className:ye("text-sm text-muted-foreground",e),...t})));Hz.displayName=Hv.displayName;const Xz=g.forwardRef((({className:e,...t},n)=>z.jsx(Ii,{ref:n,className:ye("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));Xz.displayName=Ii.displayName;const Qz=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:z.jsx(Ii.Input,{ref:n,className:ye("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})})));Qz.displayName=Ii.Input.displayName;const Kz=g.forwardRef((({className:e,...t},n)=>z.jsx(Ii.List,{ref:n,className:ye("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));Kz.displayName=Ii.List.displayName;const Yz=g.forwardRef(((e,t)=>z.jsx(Ii.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));Yz.displayName=Ii.Empty.displayName;const Jz=g.forwardRef((({className:e,...t},n)=>z.jsx(Ii.Group,{ref:n,className:ye("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})));Jz.displayName=Ii.Group.displayName;const Zz=g.forwardRef((({className:e,...t},n)=>z.jsx(Ii.Separator,{ref:n,className:ye("-mx-1 h-px bg-border",e),...t})));Zz.displayName=Ii.Separator.displayName;const eU=g.forwardRef((({className:e,...t},n)=>z.jsx(Ii.Item,{ref:n,className:ye("relative flex max-w-[215px] cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t})));function md(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function yM(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function iN(...e){return t=>{let n=!1;const r=e.map((e=>{const r=yM(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():yM(e[t],null)}}}}function up(...e){return g.useCallback(iN(...e),e)}function tU(e,t){const n=g.createContext(t),r=e=>{const{children:t,...r}=e,o=g.useMemo((()=>r),Object.values(r));return z.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=g.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function nU(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>g.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return g.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=g.createContext(r),i=n.length;n=[...n,r];const a=t=>{var n;const{scope:r,children:a,...s}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[i])||o,l=g.useMemo((()=>s),Object.values(s));return z.jsx(u.Provider,{value:l,children:a})};return a.displayName=t+"Provider",[a,function(n,a){var s;const u=(null==(s=null==a?void 0:a[e])?void 0:s[i])||o,l=g.useContext(u);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},rU(r,...t)]}function rU(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return g.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}eU.displayName=Ii.Item.displayName;var py=null!=globalThis&&globalThis.document?g.useLayoutEffect:()=>{},oU=dy[" useId ".trim().toString()]||(()=>{}),iU=0;function MA(e){const[t,n]=g.useState(oU());return py((()=>{e||n((e=>e??String(iU++)))}),[e]),e||(t?`radix-${t}`:"")}function rp(e){const t=g.useRef(e);return g.useEffect((()=>{t.current=e})),g.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function aU({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=sU({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,s=rp(n);return[a,g.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else o(t)}),[i,e,o,s])]}function sU({defaultProp:e,onChange:t}){const n=g.useState(e),[r]=n,o=g.useRef(r),i=rp(t);return g.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}function aN(e){const t=uU(e),n=g.forwardRef(((e,n)=>{const{children:r,...o}=e,i=g.Children.toArray(r),a=i.find(cU);if(a){const e=a.props.children,r=i.map((t=>t===a?g.Children.count(e)>1?g.Children.only(null):g.isValidElement(e)?e.props.children:null:t));return z.jsx(t,{...o,ref:n,children:g.isValidElement(e)?g.cloneElement(e,void 0,r):null})}return z.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function uU(e){const t=g.forwardRef(((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const e=fU(n),o=dU(r,n.props);return n.type!==g.Fragment&&(o.ref=t?iN(t,e):e),g.cloneElement(n,o)}return g.Children.count(n)>1?g.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var lU=Symbol("radix.slottable");function cU(e){return g.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===lU}function dU(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function fU(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var pU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ol=pU.reduce(((e,t)=>{const n=aN(`Primitive.${t}`),r=g.forwardRef(((e,r)=>{const{asChild:o,...i}=e,a=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),z.jsx(a,{...i,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function hU(e,t){e&&bu.flushSync((()=>e.dispatchEvent(t)))}function mU(e,t=(null==globalThis?void 0:globalThis.document)){const n=rp(e);g.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var wM,vU="DismissableLayer",o_="dismissableLayer.update",gU="dismissableLayer.pointerDownOutside",yU="dismissableLayer.focusOutside",sN=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uN=g.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,l=g.useContext(sN),[c,d]=g.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=g.useState({}),m=up(t,(e=>d(e))),h=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(y),b=c?h.indexOf(c):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,A=b>=v,x=xU((e=>{const t=e.target,n=[...l.branches].some((e=>e.contains(t)));!A||n||(null==o||o(e),null==a||a(e),e.defaultPrevented||null==s||s())}),f),S=AU((e=>{const t=e.target;[...l.branches].some((e=>e.contains(t)))||(null==i||i(e),null==a||a(e),e.defaultPrevented||null==s||s())}),f);return mU((e=>{b===l.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),f),g.useEffect((()=>{if(c)return n&&(0===l.layersWithOutsidePointerEventsDisabled.size&&(wM=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),bM(),()=>{n&&1===l.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=wM)}}),[c,f,n,l]),g.useEffect((()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),bM())}),[c,l]),g.useEffect((()=>{const e=()=>p({});return document.addEventListener(o_,e),()=>document.removeEventListener(o_,e)}),[]),z.jsx(Ol.div,{...u,ref:m,style:{pointerEvents:w?A?"auto":"none":void 0,...e.style},onFocusCapture:md(e.onFocusCapture,S.onFocusCapture),onBlurCapture:md(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:md(e.onPointerDownCapture,x.onPointerDownCapture)})}));uN.displayName=vU;var wU="DismissableLayerBranch",bU=g.forwardRef(((e,t)=>{const n=g.useContext(sN),r=g.useRef(null),o=up(t,r);return g.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),z.jsx(Ol.div,{...e,ref:o})}));function xU(e,t=(null==globalThis?void 0:globalThis.document)){const n=rp(e),r=g.useRef(!1),o=g.useRef((()=>{}));return g.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){lN(gU,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function AU(e,t=(null==globalThis?void 0:globalThis.document)){const n=rp(e),r=g.useRef(!1);return g.useEffect((()=>{const e=e=>{e.target&&!r.current&&lN(yU,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bM(){const e=new CustomEvent(o_);document.dispatchEvent(e)}function lN(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?hU(o,i):o.dispatchEvent(i)}bU.displayName=wU;var OA="focusScope.autoFocusOnMount",DA="focusScope.autoFocusOnUnmount",xM={bubbles:!1,cancelable:!0},SU="FocusScope",cN=g.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,u]=g.useState(null),l=rp(o),c=rp(i),d=g.useRef(null),f=up(t,(e=>u(e))),p=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect((()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:dd(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||dd(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&dd(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,p.paused]),g.useEffect((()=>{if(s){SM.add(p);const e=document.activeElement;if(!s.contains(e)){const t=new CustomEvent(OA,xM);s.addEventListener(OA,l),s.dispatchEvent(t),t.defaultPrevented||(_U(RU(dN(s)),{select:!0}),document.activeElement===e&&dd(s))}return()=>{s.removeEventListener(OA,l),setTimeout((()=>{const t=new CustomEvent(DA,xM);s.addEventListener(DA,c),s.dispatchEvent(t),t.defaultPrevented||dd(e??document.body,{select:!0}),s.removeEventListener(DA,c),SM.remove(p)}),0)}}}),[s,l,c,p]);const m=g.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=IU(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&dd(i,{select:!0})):(e.preventDefault(),n&&dd(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return z.jsx(Ol.div,{tabIndex:-1,...a,ref:f,onKeyDown:m})}));function _U(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(dd(r,{select:t}),document.activeElement!==n)return}function IU(e){const t=dN(e);return[AM(t,e),AM(t.reverse(),e)]}function dN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function AM(e,t){for(const n of e)if(!CU(n,{upTo:t}))return n}function CU(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function EU(e){return e instanceof HTMLInputElement&&"select"in e}function dd(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&EU(e)&&t&&e.select()}}cN.displayName=SU;var SM=PU();function PU(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=_M(e,t),e.unshift(t)},remove(t){var n;e=_M(e,t),null==(n=e[0])||n.resume()}}}function _M(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function RU(e){return e.filter((e=>"A"!==e.tagName))}var TU="Portal",fN=g.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[i,a]=g.useState(!1);py((()=>a(!0)),[]);const s=r||i&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?cD.createPortal(z.jsx(Ol.div,{...o,ref:t}),s):null}));function MU(e,t){return g.useReducer(((e,n)=>t[e][n]??e),e)}fN.displayName=TU;var n0=e=>{const{present:t,children:n}=e,r=OU(t),o="function"==typeof n?n({present:r.isPresent}):g.Children.only(n),i=up(r.ref,DU(o));return"function"==typeof n||r.isPresent?g.cloneElement(o,{ref:i}):null};function OU(e){const[t,n]=g.useState(),r=g.useRef({}),o=g.useRef(e),i=g.useRef("none"),a=e?"mounted":"unmounted",[s,u]=MU(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect((()=>{const e=qg(r.current);i.current="mounted"===s?e:"none"}),[s]),py((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=qg(t);e?u("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),py((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,a=i=>{const a=qg(r.current).includes(i.animationName);if(i.target===t&&a&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(i.current=qg(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:g.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function qg(e){return(null==e?void 0:e.animationName)||"none"}function DU(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}n0.displayName="Presence";var $A=0;function $U(){g.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??IM()),document.body.insertAdjacentElement("beforeend",e[1]??IM()),$A++,()=>{1===$A&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),$A--}}),[])}function IM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var pN=_D(),NA=function(){},r0=g.forwardRef((function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:NA,onWheelCapture:NA,onTouchMoveCapture:NA}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,h=e.allowPinchZoom,y=e.as,v=void 0===y?"div":y,b=e.gapMode,w=Z_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=f,x=SD([n,t]),S=zo(zo({},w),o);return g.createElement(g.Fragment,null,c&&g.createElement(A,{sideCar:pN,removeScrollBar:l,shards:d,noIsolation:p,inert:m,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:b}),a?g.cloneElement(g.Children.only(s),zo(zo({},S),{ref:x})):g.createElement(v,zo({},S,{className:u,ref:x}),s))}));r0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},r0.classNames={fullWidth:vv,zeroRight:mv};var i_=!1;if(typeof window<"u")try{var Hg=Object.defineProperty({},"passive",{get:function(){return i_=!0,!0}});window.addEventListener("test",Hg,Hg),window.removeEventListener("test",Hg,Hg)}catch{i_=!1}var Th=!!i_&&{passive:!1},NU=function(e){return"TEXTAREA"===e.tagName},hN=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!NU(e)&&"visible"===n[t])},kU=function(e){return hN(e,"overflowY")},LU=function(e){return hN(e,"overflowX")},CM=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),mN(e,r)){var o=vN(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},BU=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},VU=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},mN=function(e,t){return"v"===e?kU(t):LU(t)},vN=function(e,t){return"v"===e?BU(t):VU(t)},jU=function(e,t){return"h"===e&&"rtl"===t?-1:1},FU=function(e,t,n,r,o){var i=jU(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,u=t.contains(s),l=!1,c=a>0,d=0,f=0;do{var p=vN(e,s),m=p[0],h=p[1]-p[2]-i*m;(m||h)&&mN(e,s)&&(d+=h,f+=m),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(d)<1||!o)||!c&&(Math.abs(f)<1||!o))&&(l=!0),l},Xg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},EM=function(e){return[e.deltaX,e.deltaY]},PM=function(e){return e&&"current"in e?e.current:e},zU=function(e,t){return e[0]===t[0]&&e[1]===t[1]},UU=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},GU=0,Mh=[];function WU(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(GU++)[0],i=g.useState(eI)[0],a=g.useRef(e);g.useEffect((function(){a.current=e}),[e]),g.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=AD([e.lockRef.current],(e.shards||[]).map(PM),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=g.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var o,i=Xg(e),s=n.current,u="deltaX"in e?e.deltaX:s[0]-i[0],l="deltaY"in e?e.deltaY:s[1]-i[1],c=e.target,d=Math.abs(u)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=CM(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=CM(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||l)&&(r.current=o),!o)return!0;var p=r.current||o;return FU(p,t,e,"h"===p?u:l,!0)}),[]),u=g.useCallback((function(e){var n=e;if(Mh.length&&Mh[Mh.length-1]===i){var r="deltaY"in n?EM(n):Xg(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&zU(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var u=(a.current.shards||[]).map(PM).filter(Boolean).filter((function(e){return e.contains(n.target)}));(u.length>0?s(n,u[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),l=g.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:qU(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),c=g.useCallback((function(e){n.current=Xg(e),r.current=void 0}),[]),d=g.useCallback((function(t){l(t.type,EM(t),t.target,s(t,e.lockRef.current))}),[]),f=g.useCallback((function(t){l(t.type,Xg(t),t.target,s(t,e.lockRef.current))}),[]);g.useEffect((function(){return Mh.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,Th),document.addEventListener("touchmove",u,Th),document.addEventListener("touchstart",c,Th),function(){Mh=Mh.filter((function(e){return e!==i})),document.removeEventListener("wheel",u,Th),document.removeEventListener("touchmove",u,Th),document.removeEventListener("touchstart",c,Th)}}),[]);var p=e.removeScrollBar,m=e.inert;return g.createElement(g.Fragment,null,m?g.createElement(i,{styles:UU(o)}):null,p?g.createElement(PD,{gapMode:e.gapMode}):null)}function qU(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const HU=CD(pN,WU);var gN=g.forwardRef((function(e,t){return g.createElement(r0,zo({},e,{ref:t,sideCar:HU}))}));gN.classNames=r0.classNames;var MI="Dialog",[yN,bce]=nU(MI),[XU,_s]=yN(MI),wN=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=g.useRef(null),u=g.useRef(null),[l=!1,c]=aU({prop:r,defaultProp:o,onChange:i});return z.jsx(XU,{scope:t,triggerRef:s,contentRef:u,contentId:MA(),titleId:MA(),descriptionId:MA(),open:l,onOpenChange:c,onOpenToggle:g.useCallback((()=>c((e=>!e))),[c]),modal:a,children:n})};wN.displayName=MI;var bN="DialogTrigger",xN=g.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(bN,n),i=up(t,o.triggerRef);return z.jsx(Ol.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":$I(o.open),...r,ref:i,onClick:md(e.onClick,o.onOpenToggle)})}));xN.displayName=bN;var OI="DialogPortal",[QU,AN]=yN(OI,{forceMount:void 0}),SN=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=_s(OI,t);return z.jsx(QU,{scope:t,forceMount:n,children:g.Children.map(r,(e=>z.jsx(n0,{present:n||i.open,children:z.jsx(fN,{asChild:!0,container:o,children:e})})))})};SN.displayName=OI;var hy="DialogOverlay",_N=g.forwardRef(((e,t)=>{const n=AN(hy,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=_s(hy,e.__scopeDialog);return i.modal?z.jsx(n0,{present:r||i.open,children:z.jsx(YU,{...o,ref:t})}):null}));_N.displayName=hy;var KU=aN("DialogOverlay.RemoveScroll"),YU=g.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(hy,n);return z.jsx(gN,{as:KU,allowPinchZoom:!0,shards:[o.contentRef],children:z.jsx(Ol.div,{"data-state":$I(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),op="DialogContent",IN=g.forwardRef(((e,t)=>{const n=AN(op,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=_s(op,e.__scopeDialog);return z.jsx(n0,{present:r||i.open,children:i.modal?z.jsx(JU,{...o,ref:t}):z.jsx(ZU,{...o,ref:t})})}));IN.displayName=op;var JU=g.forwardRef(((e,t)=>{const n=_s(op,e.__scopeDialog),r=g.useRef(null),o=up(t,n.contentRef,r);return g.useEffect((()=>{const e=r.current;if(e)return jy(e)}),[]),z.jsx(CN,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:md(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:md(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:md(e.onFocusOutside,(e=>e.preventDefault()))})})),ZU=g.forwardRef(((e,t)=>{const n=_s(op,e.__scopeDialog),r=g.useRef(!1),o=g.useRef(!1);return z.jsx(CN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var i,a;null==(i=e.onCloseAutoFocus)||i.call(e,t),t.defaultPrevented||(r.current||null==(a=n.triggerRef.current)||a.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var i,a;null==(i=e.onInteractOutside)||i.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const s=t.target;(null==(a=n.triggerRef.current)?void 0:a.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),CN=g.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=_s(op,n),u=g.useRef(null),l=up(t,u);return $U(),z.jsxs(z.Fragment,{children:[z.jsx(cN,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:z.jsx(uN,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":$I(s.open),...a,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),z.jsxs(z.Fragment,{children:[z.jsx(eG,{titleId:s.titleId}),z.jsx(nG,{contentRef:u,descriptionId:s.descriptionId})]})]})})),DI="DialogTitle",EN=g.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(DI,n);return z.jsx(Ol.h2,{id:o.titleId,...r,ref:t})}));EN.displayName=DI;var PN="DialogDescription",RN=g.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(PN,n);return z.jsx(Ol.p,{id:o.descriptionId,...r,ref:t})}));RN.displayName=PN;var TN="DialogClose",MN=g.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(TN,n);return z.jsx(Ol.button,{type:"button",...r,ref:t,onClick:md(e.onClick,(()=>o.onOpenChange(!1)))})}));function $I(e){return e?"open":"closed"}MN.displayName=TN;var ON="DialogTitleWarning",[xce,DN]=tU(ON,{contentName:op,titleName:DI,docsSlug:"dialog"}),eG=({titleId:e})=>{const t=DN(ON),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},tG="DialogDescriptionWarning",nG=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${DN(tG).contentName}}.`;return g.useEffect((()=>{var r;const o=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))}),[n,e,t]),null},rG=wN,oG=xN,iG=SN,aG=_N,sG=IN,uG=EN,lG=RN,cG=MN;function dG(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const $N=Oe.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Jh=()=>{const e=Oe.useContext($N);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};dG("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}");const fG=24,pG=typeof window<"u"?g.useLayoutEffect:g.useEffect;function RM(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function hG(){return NI(/^Mac/)}function mG(){return NI(/^iPhone/)}function TM(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function vG(){return NI(/^iPad/)||hG()&&navigator.maxTouchPoints>1}function NN(){return mG()||vG()}function NI(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const kA=typeof document<"u"&&window.visualViewport;function MM(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function kN(e){for(MM(e)&&(e=e.parentElement);e&&!MM(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const gG=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let LA,Qg=0;function yG(e={}){let{isDisabled:t}=e;pG((()=>{if(!t)return Qg++,1===Qg&&NN()&&(LA=wG()),()=>{Qg--,0===Qg&&(null==LA||LA())}}),[t])}function wG(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=RM(bG(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let i=RM(nv(document,"touchstart",(n=>{e=kN(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),nv(document,"touchmove",(n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,i=e.scrollHeight-e.clientHeight;0!==i&&((o<=0&&r>t||o>=i&&r<t)&&n.preventDefault(),t=r)}),{passive:!1,capture:!0}),nv(document,"touchend",(e=>{let t=e.target;a_(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),nv(document,"focus",(e=>{let t=e.target;a_(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",kA&&(kA.height<window.innerHeight?requestAnimationFrame((()=>{OM(t)})):kA.addEventListener("resize",(()=>OM(t)),{once:!0}))})))}),!0),nv(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),i(),window.scrollTo(n,r)}}function bG(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function nv(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function OM(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=kN(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function a_(e){return e instanceof HTMLInputElement&&!gG.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function xG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function AG(...e){return t=>e.forEach((e=>xG(e,t)))}function LN(...e){return g.useCallback(AG(...e),e)}const BN=new WeakMap;function Ur(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach((([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)})),!n&&BN.set(e,r)}function SG(e,t){if(!(e&&e instanceof HTMLElement))return;let n=BN.get(e);n&&(e.style[t]=n[t])}const Gr=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Kg(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Gr(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Gr(t)?5:4]):null)}function _G(e){return 8*(Math.log(e+1)-2)}function BA(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function IG(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const Fn={DURATION:.5,EASE:[.32,.72,0,1]},VN=.4,CG=.25,EG=100,jN=8,jf=16,s_=26,VA="vaul-dragging";function FN(e){const t=Oe.useRef(e);return Oe.useEffect((()=>{t.current=e})),Oe.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function PG({defaultProp:e,onChange:t}){const n=Oe.useState(e),[r]=n,o=Oe.useRef(r),i=FN(t);return Oe.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}function zN({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=PG({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,s=FN(n);return[a,Oe.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else o(t)}),[i,e,o,s])]}function RG({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:i,onSnapPointChange:a,direction:s="bottom",container:u,snapToSequentialPoint:l}){const[c,d]=zN({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=Oe.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);Oe.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const m=Oe.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),h=Oe.useMemo((()=>null==n?void 0:n.findIndex((e=>e===c))),[n,c]),g=n&&n.length>0&&(i||0===i)&&!Number.isNaN(i)&&n[i]===c||!n,y=Oe.useMemo((()=>{const e=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map((t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),Gr(s)){const o=n?r:f?t*e.height:0;return f?"bottom"===s?e.height-o:-e.height+o:o}const o=n?r:f?t*e.width:0;return f?"right"===s?e.width-o:-e.width+o:o})))?t:[]}),[n,f,u]),v=Oe.useMemo((()=>null!==h?null==y?void 0:y[h]:null),[y,h]),b=Oe.useCallback((e=>{var t;const u=null!=(t=null==y?void 0:y.findIndex((t=>t===e)))?t:null;a(u),Ur(r.current,{transition:`transform ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`,transform:Gr(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),y&&u!==y.length-1&&u!==i&&u<i?Ur(o.current,{transition:`opacity ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`,opacity:"0"}):Ur(o.current,{transition:`opacity ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(u,0)])}),[r.current,n,y,i,o,d]);return Oe.useEffect((()=>{if(c||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===c)))?t:-1;y&&-1!==r&&"number"==typeof y[r]&&b(y[r])}}),[c,e,n,y,b]),{isLastSnapPoint:m,activeSnapPoint:c,shouldFade:g,getPercentageDragged:function(e,t){if(!n||"number"!=typeof h||!y||void 0===i)return null;const r=h===i-1;if(h>=i&&t)return 0;if(r&&!t)return 1;if(!g&&!r)return null;const o=r?h+1:h-1,a=r?y[o]-y[o-1]:y[o+1]-y[o],s=e/Math.abs(a);return r?1-s:s},setActiveSnapPoint:d,activeSnapPointIndex:h,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:a}){if(void 0===i)return;const u="bottom"===s||"right"===s?(v??0)-e:(v??0)+e,c=0===h,d=e>0;if(h===i-1&&Ur(o.current,{transition:`opacity ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`}),!l&&r>2&&!d)return void(a?t():b(y[0]));if(!l&&r>2&&d&&y&&n)return void b(y[n.length-1]);const f=null==y?void 0:y.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-u)<Math.abs(e-u)?t:e)),p=Gr(s)?window.innerHeight:window.innerWidth;if(r>VN&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&m)return void b(y[n.length-1]);if(c&&e<0&&a&&t(),null===h)return;b(y[h+e])}else b(f)},onDrag:function({draggedDistance:e}){if(null===v)return;const t="bottom"===s||"right"===s?v-e:v+e;("bottom"===s||"right"===s)&&t<y[y.length-1]||("top"===s||"left"===s)&&t>y[y.length-1]||Ur(r.current,{transform:Gr(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:y}}const TG=()=>()=>{};function MG(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=Jh(),i=Oe.useRef(null),a=g.useMemo((()=>document.body.style.backgroundColor),[]);function s(){return(window.innerWidth-26)/window.innerWidth}Oe.useEffect((()=>{if(t&&n){i.current&&clearTimeout(i.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;IG(r&&!o?BA(document.body,{background:"black"}):TG,BA(t,{transformOrigin:Gr(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Fn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Fn.EASE.join(",")})`}));const n=BA(t,{borderRadius:"8px",overflow:"hidden",...Gr(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),i.current=window.setTimeout((()=>{a?document.body.style.background=a:document.body.style.removeProperty("background")}),1e3*Fn.DURATION)}}}),[t,n,a])}let rv=null;function OG({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:i}){const[a,s]=Oe.useState((()=>typeof window<"u"?window.location.href:"")),u=Oe.useRef(0),l=Oe.useCallback((()=>{if(TM()&&null===rv&&e&&!i){rv={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-u.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&u.current>=t&&(document.body.style.top=-(u.current+e)+"px")}))),300)}}),[e]),c=Oe.useCallback((()=>{if(TM()&&null!==rv&&!i){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,rv),window.requestAnimationFrame((()=>{o&&a!==window.location.href?s(window.location.href):window.scrollTo(t,e)})),rv=null}}),[a]);return Oe.useEffect((()=>{function e(){u.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),Oe.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&l(),t||window.setTimeout((()=>{c()}),500)):c())}),[e,r,a,t,n,l,c]),{restorePositionSetting:c}}function UN({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:i,shouldScaleBackground:a=!1,setBackgroundColorOnScale:s=!0,closeThreshold:u=CG,scrollLockTimeout:l=EG,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=i&&i.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:h,modal:g=!0,onClose:y,nested:v,noBodyStyles:b,direction:w="bottom",defaultOpen:A=!1,disablePreventScroll:x=!0,snapToSequentialPoint:S=!1,preventScrollRestoration:I=!1,repositionInputs:E=!0,onAnimationEnd:C,container:P,autoFocus:k=!1}){var _,T;const[M=!1,O]=zN({defaultProp:A,prop:e,onChange:e=>{null==t||t(e),!e&&!v&&ue(),setTimeout((()=>{null==C||C(e)}),1e3*Fn.DURATION),e&&!g&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[R,N]=Oe.useState(!1),[z,D]=Oe.useState(!1),[j,V]=Oe.useState(!1),L=Oe.useRef(null),q=Oe.useRef(null),B=Oe.useRef(null),U=Oe.useRef(null),F=Oe.useRef(null),G=Oe.useRef(!1),W=Oe.useRef(null),Q=Oe.useRef(0),H=Oe.useRef(!1),X=Oe.useRef(0),K=Oe.useRef(null),Y=Oe.useRef((null==(_=K.current)?void 0:_.getBoundingClientRect().height)||0),J=Oe.useRef((null==(T=K.current)?void 0:T.getBoundingClientRect().width)||0),Z=Oe.useRef(0),$=Oe.useCallback((e=>{i&&e===oe.length-1&&(q.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:oe,onDrag:ie,shouldFade:ae,getPercentageDragged:se}=RG({snapPoints:i,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:K,fadeFromIndex:f,overlayRef:L,onSnapPointChange:$,direction:w,container:P,snapToSequentialPoint:S});yG({isDisabled:!M||z||!g||j||!R||!E||!x});const{restorePositionSetting:ue}=OG({isOpen:M,modal:g,nested:v,hasBeenOpened:R,preventScrollRestoration:I,noBodyStyles:b});function le(){return(window.innerWidth-26)/window.innerWidth}function ce(e,t){var n,r;let o=e;const i=null==(n=window.getSelection())?void 0:n.toString(),a=K.current?Kg(K.current,w):null,s=new Date;if(o.hasAttribute("data-vaul-no-drag")||o.closest("[data-vaul-no-drag]"))return!1;if("right"===w||"left"===w)return!0;if(q.current&&s.getTime()-q.current.getTime()<500)return!1;if(null!==a&&("bottom"===w?a>0:a<0))return!0;if(i&&i.length>0)return!1;if(s.getTime()-(null==(r=F.current)?void 0:r.getTime())<l&&0===a||t)return F.current=s,!1;for(;o;){if(o.scrollHeight>o.clientHeight){if(0!==o.scrollTop)return F.current=new Date,!1;if("dialog"===o.getAttribute("role"))return!0}o=o.parentNode}return!0}function de(e){!z||!K.current||(K.current.classList.remove(VA),G.current=!1,D(!1),U.current=new Date),null==y||y(),e||O(!1),setTimeout((()=>{i&&ne(i[0])}),1e3*Fn.DURATION)}function fe(){if(!K.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=Kg(K.current,w);Ur(K.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`}),Ur(L.current,{transition:`opacity ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`,opacity:"1"}),a&&t&&t>0&&M&&Ur(e,{borderRadius:"8px",overflow:"hidden",...Gr(w)?{transform:`scale(${le()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${le()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Fn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Fn.EASE.join(",")})`},!0)}return Oe.useEffect((()=>{var e;function t(){if(!K.current||!E)return;if(a_(document.activeElement)||H.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=K.current.getBoundingClientRect().height||0,a=o>.8*n;Z.current||(Z.current=o);const s=K.current.getBoundingClientRect().top;if(Math.abs(X.current-r)>60&&(H.current=!H.current),i&&i.length>0&&oe&&te){r+=oe[te]||0}if(X.current=r,o>t||H.current){const e=K.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(a?s:26)),K.current.style.height=h?e-Math.max(r,0)+"px":`${Math.max(n,t-s)}px`}else K.current.style.height=`${Z.current}px`;i&&i.length>0&&!H.current?K.current.style.bottom="0px":K.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[te,i,oe]),Oe.useEffect((()=>(M&&(Ur(document.documentElement,{scrollBehavior:"auto"}),q.current=new Date),()=>{SG(document.documentElement,"scrollBehavior")})),[M]),Oe.createElement(rG,{defaultOpen:A,onOpenChange:e=>{!c&&!e||(e?N(!0):de(!0),O(e))},open:M},Oe.createElement($N.Provider,{value:{activeSnapPoint:ee,snapPoints:i,setActiveSnapPoint:ne,drawerRef:K,overlayRef:L,onOpenChange:t,onPress:function(e){var t,n;!c&&!i||K.current&&!K.current.contains(e.target)||(Y.current=(null==(t=K.current)?void 0:t.getBoundingClientRect().height)||0,J.current=(null==(n=K.current)?void 0:n.getBoundingClientRect().width)||0,D(!0),B.current=new Date,NN()&&window.addEventListener("touchend",(()=>G.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),Q.current=Gr(w)?e.pageY:e.pageX)},onRelease:function(e){if(!z||!K.current)return;K.current.classList.remove(VA),G.current=!1,D(!1),U.current=new Date;const t=Kg(K.current,w);if(!ce(e.target,!1)||!t||Number.isNaN(t)||null===B.current)return;const n=U.current.getTime()-B.current.getTime(),r=Q.current-(Gr(w)?e.pageY:e.pageX),a=Math.abs(r)/n;if(a>.05&&(V(!0),setTimeout((()=>{V(!1)}),200)),i)return re({draggedDistance:r*("bottom"===w||"right"===w?1:-1),closeDrawer:de,velocity:a,dismissible:c}),void(null==o||o(e,!0));if("bottom"===w||"right"===w?r>0:r<0)return fe(),void(null==o||o(e,!0));if(a>VN)return de(),void(null==o||o(e,!1));var s;const l=Math.min(null!=(s=K.current.getBoundingClientRect().height)?s:0,window.innerHeight);var d;const f=Math.min(null!=(d=K.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:l)*u)return de(),void(null==o||o(e,!1));null==o||o(e,!0),fe()},onDrag:function(e){if(K.current&&z){const t="bottom"===w||"right"===w?1:-1,n=(Q.current-(Gr(w)?e.pageY:e.pageX))*t,o=n>0,s=i&&!c&&!o;if(s&&0===te)return;const u=Math.abs(n),l=document.querySelector("[data-vaul-drawer-wrapper]");let d=u/("bottom"===w||"top"===w?Y.current:J.current);const p=se(u,o);if(null!==p&&(d=p),s&&d>=1||!G.current&&!ce(e.target,o))return;if(K.current.classList.add(VA),G.current=!0,Ur(K.current,{transition:"none"}),Ur(L.current,{transition:"none"}),i&&ie({draggedDistance:n}),o&&!i){const e=_G(n),r=Math.min(-1*e,0)*t;return void Ur(K.current,{transform:Gr(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const m=1-d;if((ae||f&&te===f-1)&&(null==r||r(e,d),Ur(L.current,{opacity:`${m}`,transition:"none"},!0)),l&&L.current&&a){const e=Math.min(le()+d*(1-le()),1),t=8-8*d,n=Math.max(0,14-14*d);Ur(l,{borderRadius:`${t}px`,transform:Gr(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!i){const e=u*t;Ur(K.current,{transform:Gr(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:M,isDragging:z,shouldFade:ae,closeDrawer:de,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),o=16*t-16;Ur(K.current,{transform:Gr(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;W.current&&window.clearTimeout(W.current),Ur(K.current,{transition:`transform ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&K.current&&(W.current=setTimeout((()=>{const e=Kg(K.current,w);Ur(K.current,{transition:"none",transform:Gr(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Gr(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&Ur(K.current,{transition:`transform ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`,transform:Gr(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:H,modal:g,snapPointsOffset:oe,direction:w,shouldScaleBackground:a,setBackgroundColorOnScale:s,noBodyStyles:b,container:P,autoFocus:k}},n))}const GN=Oe.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:i,isOpen:a,modal:s}=Jh(),u=LN(t,n),l=r&&r.length>0;return s?Oe.createElement(aG,{onMouseUp:o,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":a&&l?"true":"false","data-vaul-snap-points-overlay":a&&i?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));GN.displayName="Drawer.Overlay";const WN=Oe.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:i,onPress:a,onRelease:s,onDrag:u,keyboardIsOpen:l,snapPointsOffset:c,modal:d,isOpen:f,direction:p,snapPoints:m,container:h,handleOnly:g,autoFocus:y}=Jh(),[v,b]=Oe.useState(!1),w=LN(o,i),A=Oe.useRef(null),x=Oe.useRef(null),S=Oe.useRef(!1),I=m&&m.length>0;MG();function E(e){A.current=null,S.current=!1,s(e)}return Oe.useEffect((()=>{I&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),Oe.createElement(sG,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":v?"true":"false","data-vaul-snap-points":f&&I?"true":"false","data-vaul-custom-container":h?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{g||(null==r.onPointerDown||r.onPointerDown.call(r,e),A.current={x:e.pageX,y:e.pageY},a(e))},onOpenAutoFocus:e=>{null==n||n(e),y||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),d&&!t.defaultPrevented?l.current&&(l.current=!1):t.preventDefault()},onFocusOutside:e=>{d||e.preventDefault()},onPointerMove:e=>{if(x.current=e,g||(null==r.onPointerMove||r.onPointerMove.call(r,e),!A.current))return;const t=e.pageY-A.current.y,n=e.pageX-A.current.x,o="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(S.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),i=o>r,a=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*a<0)&&o>=0&&o<=n)return i}else if(!(e.y*a<0)&&r>=0&&r<=n)return!i;return S.current=!0,!0})({x:n,y:t},p,o)?u(e):(Math.abs(n)>o||Math.abs(t)>o)&&(A.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),A.current=null,S.current=!1,s(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),E(x.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),E(x.current)}})}));WN.displayName="Drawer.Content";const DG=250,$G=120,qN=Oe.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:i,snapPoints:a,activeSnapPoint:s,setActiveSnapPoint:u,dismissible:l,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=Jh(),m=Oe.useRef(null),h=Oe.useRef(!1);function g(){window.clearTimeout(m.current),h.current=!1}return Oe.createElement("div",{onClick:function(){h.current?g():window.setTimeout((()=>{!function(){if(i||e||h.current)return void g();if(g(),(!a||0===a.length)&&l)return void o();if(s===a[a.length-1]&&l)return void o();const t=a.findIndex((e=>e===s));if(-1===t)return;const n=a[t+1];u(n)}()}),$G)},onPointerCancel:g,onPointerDown:e=>{c&&f(e),m.current=window.setTimeout((()=>{h.current=!0}),DG)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},Oe.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function NG({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:i}=Jh();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return Oe.createElement(UN,{nested:!0,onClose:()=>{o(!1)},onDrag:(t,n)=>{r(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&o(e)},onRelease:i,...n})}function kG(e){const t=Jh(),{container:n=t.container,...r}=e;return Oe.createElement(iG,{container:n,...r})}qN.displayName="Drawer.Handle";const Ed={Root:UN,NestedRoot:NG,Content:WN,Overlay:GN,Trigger:oG,Portal:kG,Handle:qN,Close:cG,Title:uG,Description:lG},LG=Ed.Portal,HN=g.forwardRef((({className:e,...t},n)=>z.jsx(Ed.Overlay,{ref:n,className:ye("fixed inset-0 z-50 bg-black/5",e),...t})));HN.displayName=Ed.Overlay.displayName;const BG=g.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>z.jsxs(LG,{children:[z.jsx(HN,{}),z.jsxs(Ed.Content,{ref:o,className:ye("fixed z-50 border bg-background shadow-lg","bottom"===n&&"inset-x-0 bottom-0 mt-24 flex h-auto flex-col rounded-t-sm","top"===n&&"inset-x-0 top-0 mb-24 flex h-auto flex-col rounded-b-sm","left"===n&&"inset-y-0 left-0 flex h-full flex-col","right"===n&&"inset-y-0 right-0 flex h-full w-[346px] flex-col sm:w-[435px]",e),...r,children:["bottom"===n&&z.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));BG.displayName="DrawerContent";const VG=g.forwardRef((({className:e,...t},n)=>z.jsx(Ed.Title,{ref:n,className:ye("text-lg font-semibold leading-none tracking-tight",e),...t})));VG.displayName=Ed.Title.displayName;const jG=g.forwardRef((({className:e,...t},n)=>z.jsx(Ed.Description,{ref:n,className:ye("text-sm text-muted-foreground",e),...t})));function kI(e){const t=e+"CollectionProvider",[n,r]=ri(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=e+"CollectionItemSlot",u="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=Oe.useRef(null),i=Oe.useRef(new Map).current;return Oe.createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},Slot:Oe.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=zt(t,i(a,n).collectionRef);return Oe.createElement(Zf,{ref:o},r)})),ItemSlot:Oe.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=Oe.useRef(null),l=zt(t,a),c=i(s,n);return Oe.useEffect((()=>(c.itemMap.set(a,{ref:a,...o}),()=>{c.itemMap.delete(a)}))),Oe.createElement(Zf,{[u]:"",ref:l},r)}))},function(t){const n=i(e+"CollectionConsumer",t);return Oe.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}jG.displayName=Ed.Description.displayName;const FG=g.createContext(void 0);function LI(e){const t=g.useContext(FG);return e||t||"ltr"}const zG=["top","right","bottom","left"],xd=Math.min,Yi=Math.max,my=Math.round,Yg=Math.floor,Ad=e=>({x:e,y:e}),UG={left:"right",right:"left",bottom:"top",top:"bottom"},GG={start:"end",end:"start"};function u_(e,t,n){return Yi(e,xd(t,n))}function Rl(e,t){return"function"==typeof e?e(t):e}function Tl(e){return e.split("-")[0]}function Zh(e){return e.split("-")[1]}function BI(e){return"x"===e?"y":"x"}function VI(e){return"y"===e?"height":"width"}function Sd(e){return["top","bottom"].includes(Tl(e))?"y":"x"}function jI(e){return BI(Sd(e))}function WG(e,t,n){void 0===n&&(n=!1);const r=Zh(e),o=jI(e),i=VI(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=vy(a)),[a,vy(a)]}function qG(e){const t=vy(e);return[l_(e),t,l_(t)]}function l_(e){return e.replace(/start|end/g,(e=>GG[e]))}function HG(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function XG(e,t,n,r){const o=Zh(e);let i=HG(Tl(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(l_)))),i}function vy(e){return e.replace(/left|right|bottom|top/g,(e=>UG[e]))}function QG(e){return{top:0,right:0,bottom:0,left:0,...e}}function XN(e){return"number"!=typeof e?QG(e):{top:e,right:e,bottom:e,left:e}}function gy(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function DM(e,t,n){let{reference:r,floating:o}=e;const i=Sd(t),a=jI(t),s=VI(a),u=Tl(t),l="y"===i,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Zh(t)){case"start":p[a]-=f*(n&&l?-1:1);break;case"end":p[a]+=f*(n&&l?-1:1)}return p}const KG=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),u=await(null==a.isRTL?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=DM(l,r,u),f=r,p={},m=0;for(let n=0;n<s.length;n++){const{name:i,fn:h}=s[n],{x:g,y:y,data:v,reset:b}=await h({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});c=g??c,d=y??d,p={...p,[i]:{...p[i],...v}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(l=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=DM(l,f,u))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function Ov(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Rl(t,e),m=XN(p),h=s[f?"floating"===d?"reference":"floating":d],g=gy(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=gy(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:u}):y);return{top:(g.top-w.top+m.top)/b.y,bottom:(w.bottom-g.bottom+m.bottom)/b.y,left:(g.left-w.left+m.left)/b.x,right:(w.right-g.right+m.right)/b.x}}const YG=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=Rl(e,t)||{};if(null==l)return{};const d=XN(c),f={x:n,y:r},p=jI(o),m=VI(p),h=await a.getDimensions(l),g="y"===p,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[p]-f[p]-i.floating[m],A=f[p]-i.reference[p],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l));let S=x?x[b]:0;(!S||!await(null==a.isElement?void 0:a.isElement(x)))&&(S=s.floating[b]||i.floating[m]);const I=w/2-A/2,E=S/2-h[m]/2-1,C=xd(d[y],E),P=xd(d[v],E),k=C,_=S-h[m]-P,T=S/2-h[m]/2+I,M=u_(k,T,_),O=!u.arrow&&null!=Zh(o)&&T!==M&&i.reference[m]/2-(T<k?C:P)-h[m]/2<0,R=O?T<k?T-k:T-_:0;return{[p]:f[p]+R,data:{[p]:M,centerOffset:T-M-R,...O&&{alignmentOffset:R}},reset:O}}}),JG=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:u,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=Rl(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=Tl(o),v=Sd(s),b=Tl(s)===s,w=await(null==u.isRTL?void 0:u.isRTL(l.floating)),A=f||(b||!h?[vy(s)]:qG(s)),x="none"!==m;!f&&x&&A.push(...XG(s,h,m,w));const S=[s,...A],I=await Ov(t,g),E=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(c&&E.push(I[y]),d){const e=WG(o,a,w);E.push(I[e[0]],I[e[1]])}if(C=[...C,{placement:o,overflows:E}],!E.every((e=>e<=0))){var P,k;const e=((null==(P=i.flip)?void 0:P.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(k=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var _;const e=null==(_=C.filter((e=>{if(x){const t=Sd(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:_[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}};function $M(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function NM(e){return zG.some((t=>e[t]>=0))}const ZG=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Rl(e,t);switch(r){case"referenceHidden":{const e=$M(await Ov(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:NM(e)}}}case"escaped":{const e=$M(await Ov(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:NM(e)}}}default:return{}}}}};async function eW(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Tl(n),s=Zh(n),u="y"===Sd(n),l=["left","top"].includes(a)?-1:1,c=i&&u?-1:1,d=Rl(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),u?{x:p*c,y:f*l}:{x:f*l,y:p*c}}const tW=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,u=await eW(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},nW=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=Rl(e,t),l={x:n,y:r},c=await Ov(t,u),d=Sd(Tl(o)),f=BI(d);let p=l[f],m=l[d];if(i){const e="y"===f?"bottom":"right";p=u_(p+c["y"===f?"top":"left"],p,p-c[e])}if(a){const e="y"===d?"bottom":"right";m=u_(m+c["y"===d?"top":"left"],m,m-c[e])}const h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:i,[d]:a}}}}}},rW=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=Rl(e,t),c={x:n,y:r},d=Sd(o),f=BI(d);let p=c[f],m=c[d];const h=Rl(s,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var y,v;const e="y"===f?"width":"height",t=["top","left"].includes(Tl(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},oW=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:u=()=>{},...l}=Rl(e,t),c=await Ov(t,l),d=Tl(o),f=Zh(o),p="y"===Sd(o),{width:m,height:h}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const v=h-c.top-c.bottom,b=m-c.left-c.right,w=xd(h-c[g],v),A=xd(m-c[y],b),x=!t.middlewareData.shift;let S=w,I=A;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(I=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=v),x&&!f){const e=Yi(c.left,0),t=Yi(c.right,0),n=Yi(c.top,0),r=Yi(c.bottom,0);p?I=m-2*(0!==e||0!==t?e+t:Yi(c.left,c.right)):S=h-2*(0!==n||0!==r?n+r:Yi(c.top,c.bottom))}await u({...t,availableWidth:I,availableHeight:S});const E=await a.getDimensions(s.floating);return m!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function o0(){return typeof window<"u"}function _d(e){return QN(e)?(e.nodeName||"").toLowerCase():"#document"}function Ji(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Dl(e){var t;return null==(t=(QN(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function QN(e){return!!o0()&&(e instanceof Node||e instanceof Ji(e).Node)}function gu(e){return!!o0()&&(e instanceof Element||e instanceof Ji(e).Element)}function yu(e){return!!o0()&&(e instanceof HTMLElement||e instanceof Ji(e).HTMLElement)}function kM(e){return!(!o0()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof Ji(e).ShadowRoot)}function Zv(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ka(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function iW(e){return["table","td","th"].includes(_d(e))}function aW(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function FI(e){const t=zI(),n=gu(e)?ka(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function KN(e){let t=Wh(e);for(;yu(t)&&!i0(t);){if(FI(t))return t;if(aW(t))return null;t=Wh(t)}return null}function zI(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function i0(e){return["html","body","#document"].includes(_d(e))}function ka(e){return Ji(e).getComputedStyle(e)}function a0(e){return gu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wh(e){if("html"===_d(e))return e;const t=e.assignedSlot||e.parentNode||kM(e)&&e.host||Dl(e);return kM(t)?t.host:t}function YN(e){const t=Wh(e);return i0(t)?e.ownerDocument?e.ownerDocument.body:e.body:yu(t)&&Zv(t)?t:YN(t)}function Dv(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=YN(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Ji(o);if(i){const e=sW(a);return t.concat(a,a.visualViewport||[],Zv(o)?o:[],e&&n?Dv(e):[])}return t.concat(o,Dv(o,[],n))}function sW(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function JN(e){const t=ka(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yu(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=my(n)!==i||my(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function UI(e){return gu(e)?e:e.contextElement}function jh(e){const t=UI(e);if(!yu(t))return Ad(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=JN(t);let a=(i?my(n.width):n.width)/r,s=(i?my(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const uW=Ad(0);function ZN(e){const t=Ji(e);return zI()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:uW}function lW(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ji(e))&&t}function ip(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=UI(e);let a=Ad(1);t&&(r?gu(r)&&(a=jh(r)):a=jh(e));const s=lW(i,n,r)?ZN(i):Ad(0);let u=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const e=Ji(i),t=r&&gu(r)?Ji(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=jh(n),t=n.getBoundingClientRect(),r=ka(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,l*=e.y,c*=e.x,d*=e.y,u+=o,l+=i,n=Ji(n).frameElement}}return gy({width:c,height:d,x:u,y:l})}const cW=[":popover-open",":modal"];function ek(e){let t=!1,n=0,r=0;if(cW.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=KN(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function dW(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=Dl(r),[a]=t?ek(t.floating):[!1];if(r===i||a)return n;let s={scrollLeft:0,scrollTop:0},u=Ad(1);const l=Ad(0),c=yu(r);if((c||!c&&"fixed"!==o)&&(("body"!==_d(r)||Zv(i))&&(s=a0(r)),yu(r))){const e=ip(r);u=jh(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+l.x,y:n.y*u.y-s.scrollTop*u.y+l.y}}function fW(e){return Array.from(e.getClientRects())}function tk(e){return ip(Dl(e)).left+a0(e).scrollLeft}function pW(e){const t=Dl(e),n=a0(e),r=e.ownerDocument.body,o=Yi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Yi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+tk(e);const s=-n.scrollTop;return"rtl"===ka(r).direction&&(a+=Yi(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function hW(e,t){const n=Ji(e),r=Dl(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;const e=zI();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s,y:u}}function mW(e,t){const n=ip(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=yu(e)?jh(e):Ad(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}function LM(e,t,n){let r;if("viewport"===t)r=hW(e,n);else if("document"===t)r=pW(Dl(e));else if(gu(t))r=mW(t,n);else{const n=ZN(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return gy(r)}function nk(e,t){const n=Wh(e);return!(n===t||!gu(n)||i0(n))&&("fixed"===ka(n).position||nk(n,t))}function vW(e,t){const n=t.get(e);if(n)return n;let r=Dv(e,[],!1).filter((e=>gu(e)&&"body"!==_d(e))),o=null;const i="fixed"===ka(e).position;let a=i?Wh(e):e;for(;gu(a)&&!i0(a);){const t=ka(a),n=FI(a);!n&&"fixed"===t.position&&(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Zv(a)&&!n&&nk(e,a))?r=r.filter((e=>e!==a)):o=t,a=Wh(a)}return t.set(e,r),r}function gW(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?vW(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=LM(t,n,o);return e.top=Yi(r.top,e.top),e.right=xd(r.right,e.right),e.bottom=xd(r.bottom,e.bottom),e.left=Yi(r.left,e.left),e}),LM(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function yW(e){const{width:t,height:n}=JN(e);return{width:t,height:n}}function wW(e,t,n,r){const o=yu(t),i=Dl(t),a="fixed"===n,s=ip(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const l=Ad(0);if(o||!o&&!a)if(("body"!==_d(t)||Zv(i))&&(u=a0(t)),o){const e=ip(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=tk(i));let c=s.left+u.scrollLeft-l.x,d=s.top+u.scrollTop-l.y;const[f,p,m]=ek(r);return f&&(c+=p,d+=m,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:s.width,height:s.height}}function BM(e,t){return yu(e)&&"fixed"!==ka(e).position?t?t(e):e.offsetParent:null}function rk(e,t){const n=Ji(e);if(!yu(e))return n;let r=BM(e,t);for(;r&&iW(r)&&"static"===ka(r).position;)r=BM(r,t);return r&&("html"===_d(r)||"body"===_d(r)&&"static"===ka(r).position&&!FI(r))?n:r||KN(e)||n}const bW=async function(e){const t=this.getOffsetParent||rk,n=this.getDimensions;return{reference:wW(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function xW(e){return"rtl"===ka(e).direction}const AW={convertOffsetParentRelativeRectToViewportRelativeRect:dW,getDocumentElement:Dl,getClippingRect:gW,getOffsetParent:rk,getElementRects:bW,getClientRects:fW,getDimensions:yW,getScale:jh,isElement:gu,isRTL:xW};function SW(e,t){let n,r=null;const o=Dl(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,u){void 0===s&&(s=!1),void 0===u&&(u=1),i();const{left:l,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p={rootMargin:-Yg(c)+"px "+-Yg(o.clientWidth-(l+d))+"px "+-Yg(o.clientHeight-(c+f))+"px "+-Yg(l)+"px",threshold:Yi(0,xd(1,u))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==u){if(!m)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}m=!1}try{r=new IntersectionObserver(h,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(h,p)}r.observe(e)}(!0),i}function _W(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,l=UI(e),c=o||i?[...l?Dv(l):[],...Dv(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=l&&s?SW(l,n):null;let f=-1,p=null;a&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),l&&!u&&p.observe(l),p.observe(t));let m,h=u?ip(e):null;return u&&function t(){const r=ip(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,m=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const IW=nW,CW=JG,EW=oW,PW=ZG,VM=YG,RW=rW,TW=(e,t,n)=>{const r=new Map,o={platform:AW,...n},i={...o.platform,_c:r};return KG(e,t,{...o,platform:i})};var sy=typeof document<"u"?g.useLayoutEffect:g.useEffect;function yy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!yy(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||yy(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function ok(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jM(e,t){const n=ok(e);return Math.round(t*n)/n}function jA(e){const t=g.useRef(e);return sy((()=>{t.current=e})),t}function MW(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=g.useState(r);yy(f,r)||p(r);const[m,h]=g.useState(null),[y,v]=g.useState(null),b=g.useCallback((e=>{e!==S.current&&(S.current=e,h(e))}),[]),w=g.useCallback((e=>{e!==I.current&&(I.current=e,v(e))}),[]),A=i||m,x=a||y,S=g.useRef(null),I=g.useRef(null),E=g.useRef(c),C=null!=u,P=jA(u),k=jA(o),_=jA(l),T=g.useCallback((()=>{if(!S.current||!I.current)return;const e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),TW(S.current,I.current,e).then((e=>{const t={...e,isPositioned:!1!==_.current};M.current&&!yy(E.current,t)&&(E.current=t,bu.flushSync((()=>{d(t)})))}))}),[f,t,n,k,_]);sy((()=>{!1===l&&E.current.isPositioned&&(E.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[l]);const M=g.useRef(!1);sy((()=>(M.current=!0,()=>{M.current=!1})),[]),sy((()=>{if(A&&(S.current=A),x&&(I.current=x),A&&x){if(P.current)return P.current(A,x,T);T()}}),[A,x,T,P,C]);const O=g.useMemo((()=>({reference:S,floating:I,setReference:b,setFloating:w})),[b,w]),R=g.useMemo((()=>({reference:A,floating:x})),[A,x]),N=g.useMemo((()=>{const e={position:n,left:0,top:0};if(!R.floating)return e;const t=jM(R.floating,c.x),r=jM(R.floating,c.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...ok(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,R.floating,c.x,c.y]);return g.useMemo((()=>({...c,update:T,refs:O,elements:R,floatingStyles:N})),[c,T,O,R,N])}const OW=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?VM({element:n.current,padding:r}).fn(t):{}:n?VM({element:n,padding:r}).fn(t):{}}}),DW=(e,t)=>({...tW(e),options:[e,t]}),$W=(e,t)=>({...IW(e),options:[e,t]}),NW=(e,t)=>({...RW(e),options:[e,t]}),kW=(e,t)=>({...CW(e),options:[e,t]}),LW=(e,t)=>({...EW(e),options:[e,t]}),BW=(e,t)=>({...PW(e),options:[e,t]}),VW=(e,t)=>({...OW(e),options:[e,t]}),ik="Popper",[ak,em]=ri(ik),[jW,sk]=ak(ik),FW=e=>{const{__scopePopper:t,children:n}=e,[r,o]=g.useState(null);return g.createElement(jW,{scope:t,anchor:r,onAnchorChange:o},n)},zW="PopperAnchor",UW=g.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=sk(zW,n),a=g.useRef(null),s=zt(t,a);return g.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:g.createElement(ft.div,Te({},o,{ref:s}))})),uk="PopperContent",[GW,Ace]=ak(uk),WW=g.forwardRef(((e,t)=>{var n,r,o,i,a,s,u,l;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,avoidCollisions:y=!0,collisionBoundary:v=[],collisionPadding:b=0,sticky:w="partial",hideWhenDetached:A=!1,updatePositionStrategy:x="optimized",onPlaced:S,...I}=e,E=sk(uk,c),[C,P]=g.useState(null),k=zt(t,(e=>P(e))),[_,T]=g.useState(null),M=e0(_),O=null!==(n=null==M?void 0:M.width)&&void 0!==n?n:0,R=null!==(r=null==M?void 0:M.height)&&void 0!==r?r:0,N=d+("center"!==p?"-"+p:""),z="number"==typeof b?b:{top:0,right:0,bottom:0,left:0,...b},D=Array.isArray(v)?v:[v],j=D.length>0,V={padding:z,boundary:D.filter(qW),altBoundary:j},{refs:L,floatingStyles:q,placement:B,isPositioned:U,middlewareData:F}=MW({strategy:"fixed",placement:N,whileElementsMounted:(...e)=>_W(...e,{animationFrame:"always"===x}),elements:{reference:E.anchor},middleware:[DW({mainAxis:f+R,alignmentAxis:m}),y&&$W({mainAxis:!0,crossAxis:!1,limiter:"partial"===w?NW():void 0,...V}),y&&kW({...V}),LW({...V,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),_&&VW({element:_,padding:h}),HW({arrowWidth:O,arrowHeight:R}),A&&BW({strategy:"referenceHidden",...V})]}),[G,W]=lk(B),Q=xs(S);Uo((()=>{U&&(null==Q||Q())}),[U,Q]);const H=null===(o=F.arrow)||void 0===o?void 0:o.x,X=null===(i=F.arrow)||void 0===i?void 0:i.y,K=0!==(null===(a=F.arrow)||void 0===a?void 0:a.centerOffset),[Y,J]=g.useState();return Uo((()=>{C&&J(window.getComputedStyle(C).zIndex)}),[C]),g.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:U?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[null===(s=F.transformOrigin)||void 0===s?void 0:s.x,null===(u=F.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},g.createElement(GW,{scope:c,placedSide:G,onArrowChange:T,arrowX:H,arrowY:X,shouldHideArrow:K},g.createElement(ft.div,Te({"data-side":G,"data-align":W},I,{ref:k,style:{...I.style,animation:U?void 0:"none",opacity:null!==(l=F.hide)&&void 0!==l&&l.referenceHidden?0:void 0}}))))}));function qW(e){return null!==e}const HW=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:u,middlewareData:l}=t,c=0!==(null===(n=l.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=lk(s),h={start:"0%",center:"50%",end:"100%"}[m],g=(null!==(r=null===(o=l.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,y=(null!==(i=null===(a=l.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let v="",b="";return"bottom"===p?(v=c?h:`${g}px`,b=-f+"px"):"top"===p?(v=c?h:`${g}px`,b=`${u.floating.height+f}px`):"right"===p?(v=-f+"px",b=c?h:`${y}px`):"left"===p&&(v=`${u.floating.width+f}px`,b=c?h:`${y}px`),{data:{x:v,y:b}}}});function lk(e){const[t,n="center"]=e.split("-");return[t,n]}const ck=FW,GI=UW,WI=WW,FA="rovingFocusGroup.onEntryFocus",XW={bubbles:!1,cancelable:!0},qI="RovingFocusGroup",[c_,dk,QW]=kI(qI),[KW,tm]=ri(qI,[QW]),[YW,JW]=KW(qI),ZW=g.forwardRef(((e,t)=>g.createElement(c_.Provider,{scope:e.__scopeRovingFocusGroup},g.createElement(c_.Slot,{scope:e.__scopeRovingFocusGroup},g.createElement(eq,Te({},e,{ref:t})))))),eq=g.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,...c}=e,d=g.useRef(null),f=zt(t,d),p=LI(i),[m=null,h]=bd({prop:a,defaultProp:s,onChange:u}),[y,v]=g.useState(!1),b=xs(l),w=dk(n),A=g.useRef(!1),[x,S]=g.useState(0);return g.useEffect((()=>{const e=d.current;if(e)return e.addEventListener(FA,b),()=>e.removeEventListener(FA,b)}),[b]),g.createElement(YW,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:m,onItemFocus:g.useCallback((e=>h(e)),[h]),onItemShiftTab:g.useCallback((()=>v(!0)),[]),onFocusableItemAdd:g.useCallback((()=>S((e=>e+1))),[]),onFocusableItemRemove:g.useCallback((()=>S((e=>e-1))),[])},g.createElement(ft.div,Te({tabIndex:y||0===x?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:et(e.onMouseDown,(()=>{A.current=!0})),onFocus:et(e.onFocus,(e=>{const t=!A.current;if(e.target===e.currentTarget&&t&&!y){const t=new CustomEvent(FA,XW);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));fk([e.find((e=>e.active)),e.find((e=>e.id===m)),...e].filter(Boolean).map((e=>e.ref.current)))}}A.current=!1})),onBlur:et(e.onBlur,(()=>v(!1)))})))})),tq="RovingFocusGroupItem",nq=g.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=hd(),u=i||s,l=JW(tq,n),c=l.currentTabStopId===u,d=dk(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=l;return g.useEffect((()=>{if(r)return f(),()=>p()}),[r,f,p]),g.createElement(c_.ItemSlot,{scope:n,id:u,focusable:r,active:o},g.createElement(ft.span,Te({tabIndex:c?0:-1,"data-orientation":l.orientation},a,{ref:t,onMouseDown:et(e.onMouseDown,(e=>{r?l.onItemFocus(u):e.preventDefault()})),onFocus:et(e.onFocus,(()=>l.onItemFocus(u))),onKeyDown:et(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void l.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=iq(e,l.orientation,l.dir);if(void 0!==t){e.preventDefault();let n=d().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=l.loop?aq(n,r+1):n.slice(r+1)}setTimeout((()=>fk(n)))}}))})))})),rq={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function oq(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function iq(e,t,n){const r=oq(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return rq[r]}function fk(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function aq(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const HI=ZW,XI=nq,d_=["Enter"," "],sq=["ArrowDown","PageUp","Home"],pk=["ArrowUp","PageDown","End"],uq=[...sq,...pk],lq={ltr:[...d_,"ArrowRight"],rtl:[...d_,"ArrowLeft"]},cq={ltr:["ArrowLeft"],rtl:["ArrowRight"]},s0="Menu",[$v,dq,fq]=kI(s0),[lp,hk]=ri(s0,[fq,em,tm]),mk=em(),vk=tm(),[Sce,cp]=lp(s0),[_ce,eg]=lp(s0),pq=g.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=mk(n);return g.createElement(GI,Te({},o,r,{ref:t}))})),gk="MenuPortal",[hq,yk]=lp(gk,{forceMount:void 0}),mq=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=cp(gk,t);return g.createElement(hq,{scope:t,forceMount:n},g.createElement(ea,{present:n||i.open},g.createElement(Ly,{asChild:!0,container:o},r)))},ys="MenuContent",[vq,QI]=lp(ys),gq=g.forwardRef(((e,t)=>{const n=yk(ys,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=cp(ys,e.__scopeMenu),a=eg(ys,e.__scopeMenu);return g.createElement($v.Provider,{scope:e.__scopeMenu},g.createElement(ea,{present:r||i.open},g.createElement($v.Slot,{scope:e.__scopeMenu},a.modal?g.createElement(yq,Te({},o,{ref:t})):g.createElement(wq,Te({},o,{ref:t})))))})),yq=g.forwardRef(((e,t)=>{const n=cp(ys,e.__scopeMenu),r=g.useRef(null),o=zt(t,r);return g.useEffect((()=>{const e=r.current;if(e)return jy(e)}),[]),g.createElement(KI,Te({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:et(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),wq=g.forwardRef(((e,t)=>{const n=cp(ys,e.__scopeMenu);return g.createElement(KI,Te({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),KI=g.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,y=cp(ys,n),v=eg(ys,n),b=mk(n),w=vk(n),A=dq(n),[x,S]=g.useState(null),I=g.useRef(null),E=zt(t,I,y.onContentChange),C=g.useRef(0),P=g.useRef(""),k=g.useRef(0),_=g.useRef(null),T=g.useRef("right"),M=g.useRef(0),O=m?Vy:g.Fragment,R=m?{as:Zf,allowPinchZoom:!0}:void 0;g.useEffect((()=>()=>window.clearTimeout(C.current)),[]),J_();const N=g.useCallback((e=>{var t,n;return T.current===(null===(t=_.current)||void 0===t?void 0:t.side)&&Lq(e,null===(n=_.current)||void 0===n?void 0:n.area)}),[]);return g.createElement(vq,{scope:n,searchRef:P,onItemEnter:g.useCallback((e=>{N(e)&&e.preventDefault()}),[N]),onItemLeave:g.useCallback((e=>{var t;N(e)||(null===(t=I.current)||void 0===t||t.focus(),S(null))}),[N]),onTriggerLeave:g.useCallback((e=>{N(e)&&e.preventDefault()}),[N]),pointerGraceTimerRef:k,onPointerGraceIntentChange:g.useCallback((e=>{_.current=e}),[])},g.createElement(O,R,g.createElement(Y_,{asChild:!0,trapped:o,onMountAutoFocus:et(i,(e=>{var t;e.preventDefault(),null===(t=I.current)||void 0===t||t.focus()})),onUnmountAutoFocus:a},g.createElement(ky,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p},g.createElement(HI,Te({asChild:!0},w,{dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:et(u,(e=>{v.isUsingKeyboardRef.current||e.preventDefault()}))}),g.createElement(WI,Te({role:"menu","aria-orientation":"vertical","data-state":Sk(y.open),"data-radix-menu-content":"",dir:v.dir},b,h,{ref:E,style:{outline:"none",...h.style},onKeyDown:et(h.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{var t,n;const r=P.current+e,o=A().filter((e=>!e.disabled)),i=document.activeElement,a=null===(t=o.find((e=>e.ref.current===i)))||void 0===t?void 0:t.textValue,s=Nq(o.map((e=>e.textValue)),r,a),u=null===(n=o.find((e=>e.textValue===s)))||void 0===n?void 0:n.ref.current;(function e(t){P.current=t,window.clearTimeout(C.current),""!==t&&(C.current=window.setTimeout((()=>e("")),1e3))})(r),u&&setTimeout((()=>u.focus()))})(e.key));const o=I.current;if(e.target!==o||!uq.includes(e.key))return;e.preventDefault();const i=A().filter((e=>!e.disabled)).map((e=>e.ref.current));pk.includes(e.key)&&i.reverse(),Dq(i)})),onBlur:et(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(C.current),P.current="")})),onPointerMove:et(e.onPointerMove,Nv((e=>{const t=e.target,n=M.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>M.current?"right":"left";T.current=t,M.current=e.clientX}})))})))))))})),bq=g.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return g.createElement(ft.div,Te({},r,{ref:t}))})),f_="MenuItem",FM="menu.itemSelect",YI=g.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=g.useRef(null),a=eg(f_,e.__scopeMenu),s=QI(f_,e.__scopeMenu),u=zt(t,i),l=g.useRef(!1);return g.createElement(wk,Te({},o,{ref:u,disabled:n,onClick:et(e.onClick,(()=>{const e=i.current;if(!n&&e){const t=new CustomEvent(FM,{bubbles:!0,cancelable:!0});e.addEventListener(FM,(e=>null==r?void 0:r(e)),{once:!0}),wD(e,t),t.defaultPrevented?l.current=!1:a.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),l.current=!0},onPointerUp:et(e.onPointerUp,(e=>{var t;l.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:et(e.onKeyDown,(e=>{const t=""!==s.searchRef.current;n||t&&" "===e.key||d_.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),wk=g.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=QI(f_,n),s=vk(n),u=g.useRef(null),l=zt(t,u),[c,d]=g.useState(!1),[f,p]=g.useState("");return g.useEffect((()=>{const e=u.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[i.children]),g.createElement($v.ItemSlot,{scope:n,disabled:r,textValue:o??f},g.createElement(XI,Te({asChild:!0},s,{focusable:!r}),g.createElement(ft.div,Te({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:l,onPointerMove:et(e.onPointerMove,Nv((e=>{r?a.onItemLeave(e):(a.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:et(e.onPointerLeave,Nv((e=>a.onItemLeave(e)))),onFocus:et(e.onFocus,(()=>d(!0))),onBlur:et(e.onBlur,(()=>d(!1)))}))))})),xq=g.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return g.createElement(xk,{scope:e.__scopeMenu,checked:n},g.createElement(YI,Te({role:"menuitemcheckbox","aria-checked":wy(n)?"mixed":n},o,{ref:t,"data-state":JI(n),onSelect:et(o.onSelect,(()=>null==r?void 0:r(!!wy(n)||!n)),{checkForDefaultPrevented:!1})})))})),Aq="MenuRadioGroup",[Ice,Sq]=lp(Aq,{value:void 0,onValueChange:()=>{}}),_q="MenuRadioItem",Iq=g.forwardRef(((e,t)=>{const{value:n,...r}=e,o=Sq(_q,e.__scopeMenu),i=n===o.value;return g.createElement(xk,{scope:e.__scopeMenu,checked:i},g.createElement(YI,Te({role:"menuitemradio","aria-checked":i},r,{ref:t,"data-state":JI(i),onSelect:et(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),bk="MenuItemIndicator",[xk,Cq]=lp(bk,{checked:!1}),Eq=g.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=Cq(bk,n);return g.createElement(ea,{present:r||wy(i.checked)||!0===i.checked},g.createElement(ft.span,Te({},o,{ref:t,"data-state":JI(i.checked)})))})),Pq=g.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return g.createElement(ft.div,Te({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),Rq="MenuSub",[Cce,Ak]=lp(Rq),Jg="MenuSubTrigger",Tq=g.forwardRef(((e,t)=>{const n=cp(Jg,e.__scopeMenu),r=eg(Jg,e.__scopeMenu),o=Ak(Jg,e.__scopeMenu),i=QI(Jg,e.__scopeMenu),a=g.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=i,l={__scopeMenu:e.__scopeMenu},c=g.useCallback((()=>{a.current&&window.clearTimeout(a.current),a.current=null}),[]);return g.useEffect((()=>c),[c]),g.useEffect((()=>{const e=s.current;return()=>{window.clearTimeout(e),u(null)}}),[s,u]),g.createElement(pq,Te({asChild:!0},l),g.createElement(wk,Te({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Sk(n.open)},e,{ref:Q_(t,o.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),!e.disabled&&!t.defaultPrevented&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:et(e.onPointerMove,Nv((t=>{i.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout((()=>{n.onOpenChange(!0),c()}),100))}))),onPointerLeave:et(e.onPointerLeave,Nv((e=>{var t;c();const r=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(r){var o;const t=null===(o=n.content)||void 0===o?void 0:o.dataset.side,a="right"===t,u=a?-5:5,l=r[a?"left":"right"],c=r[a?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+u,y:e.clientY},{x:l,y:r.top},{x:c,y:r.top},{x:c,y:r.bottom},{x:l,y:r.bottom}],side:t}),window.clearTimeout(s.current),s.current=window.setTimeout((()=>i.onPointerGraceIntentChange(null)),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}}))),onKeyDown:et(e.onKeyDown,(t=>{const o=""!==i.searchRef.current;var a;e.disabled||o&&" "===t.key||!lq[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(a=n.content)||void 0===a||a.focus(),t.preventDefault())}))})))})),Mq="MenuSubContent",Oq=g.forwardRef(((e,t)=>{const n=yk(ys,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=cp(ys,e.__scopeMenu),a=eg(ys,e.__scopeMenu),s=Ak(Mq,e.__scopeMenu),u=g.useRef(null),l=zt(t,u);return g.createElement($v.Provider,{scope:e.__scopeMenu},g.createElement(ea,{present:r||i.open},g.createElement($v.Slot,{scope:e.__scopeMenu},g.createElement(KI,Te({id:s.contentId,"aria-labelledby":s.triggerId},o,{ref:l,align:"start",side:"rtl"===a.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;a.isUsingKeyboardRef.current&&(null===(t=u.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:et(e.onFocusOutside,(e=>{e.target!==s.trigger&&i.onOpenChange(!1)})),onEscapeKeyDown:et(e.onEscapeKeyDown,(e=>{a.onClose(),e.preventDefault()})),onKeyDown:et(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=cq[a.dir].includes(e.key);var r;t&&n&&(i.onOpenChange(!1),null===(r=s.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function Sk(e){return e?"open":"closed"}function wy(e){return"indeterminate"===e}function JI(e){return wy(e)?"indeterminate":e?"checked":"unchecked"}function Dq(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $q(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function Nq(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=$q(e,Math.max(o,0));1===r.length&&(i=i.filter((e=>e!==n)));const a=i.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return a!==n?a:void 0}function kq(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,u=t[i].x,l=t[i].y;s>r!=l>r&&n<(u-a)*(r-s)/(l-s)+a&&(o=!o)}return o}function Lq(e,t){if(!t)return!1;return kq({x:e.clientX,y:e.clientY},t)}function Nv(e){return t=>"mouse"===t.pointerType?e(t):void 0}const Bq=mq,Vq=gq,jq=bq,Fq=YI,zq=xq,Uq=Iq,Gq=Eq,Wq=Pq,qq=Tq,Hq=Oq,_k="DropdownMenu",[Xq,Ece]=ri(_k,[hk]),Su=hk(),[Pce,Qq]=Xq(_k),Kq=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Su(t);return g.createElement(Bq,Te({},r,n))},Yq="DropdownMenuContent",Jq=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Qq(Yq,n),i=Su(n),a=g.useRef(!1);return g.createElement(Vq,Te({id:o.contentId,"aria-labelledby":o.triggerId},i,r,{ref:t,onCloseAutoFocus:et(e.onCloseAutoFocus,(e=>{var t;a.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),a.current=!1,e.preventDefault()})),onInteractOutside:et(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!o.modal||r)&&(a.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),Zq=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(jq,Te({},o,r,{ref:t}))})),eH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(Fq,Te({},o,r,{ref:t}))})),tH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(zq,Te({},o,r,{ref:t}))})),nH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(Uq,Te({},o,r,{ref:t}))})),rH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(Gq,Te({},o,r,{ref:t}))})),oH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(Wq,Te({},o,r,{ref:t}))})),iH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(qq,Te({},o,r,{ref:t}))})),aH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(Hq,Te({},o,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),sH=Kq,Ik=Jq,Ck=Zq,Ek=eH,Pk=tH,Rk=nH,uH=rH,ZI=oH,Tk=iH,Mk=aH,lH=g.forwardRef((({className:e,inset:t,children:n,...r},o)=>z.jsxs(Tk,{ref:o,className:ye("flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,z.jsx(lD,{className:"ml-auto h-4 w-4"})]})));lH.displayName=Tk.displayName;const cH=g.forwardRef((({className:e,...t},n)=>z.jsx(Mk,{ref:n,className:ye("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));cH.displayName=Mk.displayName;const zM=e=>{e.preventDefault()},dH=g.forwardRef((({className:e,sideOffset:t=4,isPortal:n,...r},o)=>{const i=z.jsx(Ik,{ref:o,sideOffset:t,onOpenAutoFocus:zM,onCloseAutoFocus:zM,className:ye("z-[101] flex max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] flex-col gap-xxxs overflow-y-auto rounded-lg border border-gray-200 bg-white p-xxs text-popover-foreground ","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)] ","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2","data-[state=closed]:duration-150 data-[state=open]:duration-150","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]",e),...r});return n?z.jsx(sH,{children:i}):i}));dH.displayName=Ik.displayName;const fH=g.forwardRef((({className:e,inset:t,...n},r)=>z.jsx(Ek,{ref:r,className:ye("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-xl",e),...n})));fH.displayName=Ek.displayName;const pH=g.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},i)=>{const a=z.jsx(PI,{size:"default",variant:"default",checked:n});return z.jsxs(Pk,{ref:i,className:ye("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900"," outline-none transition-colors hover:bg-gray-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,onSelect:e=>e.preventDefault(),...o,children:["left"===r&&a,z.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&a]})}));pH.displayName=Pk.displayName;const hH=g.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const i=z.jsx("div",{className:"flex h-xxs items-center justify-center",children:z.jsx(uH,{children:z.jsx($y,{size:20})})});return z.jsxs(Rk,{ref:o,className:ye("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900"," outline-none transition-colors hover:bg-gray-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onSelect:e=>e.preventDefault(),...r,children:["left"===n&&i,z.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&i]})}));hH.displayName=Rk.displayName;const mH=g.forwardRef((({className:e,inset:t,...n},r)=>z.jsx(Ck,{ref:r,className:ye("text-sm font-semibold",t&&"pl-xl",e),...n})));mH.displayName=Ck.displayName;const vH=g.forwardRef((({className:e,...t},n)=>z.jsx(ZI,{ref:n,className:ye("-mx-1 my-1 h-px bg-muted",e),...t})));vH.displayName=ZI.displayName;const gH=Oe.createContext(null),yH=()=>Oe.useContext(gH),wH=g.forwardRef(((e,t)=>g.createElement(ft.label,Te({},e,{ref:t,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}})))),Ok=wH,bH=xu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Dk=g.forwardRef((({className:e,...t},n)=>z.jsx(Ok,{ref:n,className:ye(bH(),e),...t})));function UM(e,[t,n]){return Math.min(n,Math.max(t,e))}Dk.displayName=Ok.displayName;const $k=g.forwardRef(((e,t)=>g.createElement(ft.span,Te({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),xH=$k,AH=[" ","Enter","ArrowUp","ArrowDown"],SH=[" ","Enter"],u0="Select",[l0,c0,_H]=kI(u0),[nm,Rce]=ri(u0,[_H,em]),eC=em(),[IH,dp]=nm(u0),[CH,EH]=nm(u0),PH=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:u,dir:l,name:c,autoComplete:d,disabled:f,required:p}=e,m=eC(t),[h,y]=g.useState(null),[v,b]=g.useState(null),[w,A]=g.useState(!1),x=LI(l),[S=!1,I]=bd({prop:r,defaultProp:o,onChange:i}),[E,C]=bd({prop:a,defaultProp:s,onChange:u}),P=g.useRef(null),k=!h||!!h.closest("form"),[_,T]=g.useState(new Set),M=Array.from(_).map((e=>e.props.value)).join(";");return g.createElement(ck,m,g.createElement(IH,{required:p,scope:t,trigger:h,onTriggerChange:y,valueNode:v,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:A,contentId:hd(),value:E,onValueChange:C,open:S,onOpenChange:I,dir:x,triggerPointerDownPosRef:P,disabled:f},g.createElement(l0.Provider,{scope:t},g.createElement(CH,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:g.useCallback((e=>{T((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),k?g.createElement(Vk,{key:M,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:E,onChange:e=>C(e.target.value),disabled:f},void 0===E?g.createElement("option",{value:""}):null,Array.from(_)):null))},RH="SelectTrigger",TH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=eC(n),a=dp(RH,n),s=a.disabled||r,u=zt(t,a.onTriggerChange),l=c0(n),[c,d,f]=jk((e=>{const t=l().filter((e=>!e.disabled)),n=t.find((e=>e.value===a.value)),r=Fk(t,e,n);void 0!==r&&a.onValueChange(r.value)})),p=()=>{s||(a.onOpenChange(!0),f())};return g.createElement(GI,Te({asChild:!0},i),g.createElement(ft.button,Te({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Bk(a.value)?"":void 0},o,{ref:u,onClick:et(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:et(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:et(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&AH.includes(e.key)&&(p(),e.preventDefault())}))})))})),MH="SelectValue",OH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...s}=e,u=dp(MH,n),{onValueNodeHasChildrenChange:l}=u,c=void 0!==i,d=zt(t,u.onValueNodeChange);return Uo((()=>{l(c)}),[l,c]),g.createElement(ft.span,Te({},s,{ref:d,style:{pointerEvents:"none"}}),Bk(u.value)?g.createElement(g.Fragment,null,a):i)})),DH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return g.createElement(ft.span,Te({"aria-hidden":!0},o,{ref:t}),r||"▼")})),$H=e=>g.createElement(Ly,Te({asChild:!0},e)),qh="SelectContent",NH=g.forwardRef(((e,t)=>{const n=dp(qh,e.__scopeSelect),[r,o]=g.useState();if(Uo((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?bu.createPortal(g.createElement(Nk,{scope:e.__scopeSelect},g.createElement(l0.Slot,{scope:e.__scopeSelect},g.createElement("div",null,e.children))),t):null}return g.createElement(kH,Te({},e,{ref:t}))})),_l=10,[Nk,fp]=nm(qh),kH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:y,...v}=e,b=dp(qh,n),[w,A]=g.useState(null),[x,S]=g.useState(null),I=zt(t,(e=>A(e))),[E,C]=g.useState(null),[P,k]=g.useState(null),_=c0(n),[T,M]=g.useState(!1),O=g.useRef(!1);g.useEffect((()=>{if(w)return jy(w)}),[w]),J_();const R=g.useCallback((e=>{const[t,...n]=_().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[_,x]),N=g.useCallback((()=>R([E,w])),[R,E,w]);g.useEffect((()=>{T&&N()}),[T,N]);const{onOpenChange:z,triggerPointerDownPosRef:D}=b;g.useEffect((()=>{if(w){let e={x:0,y:0};const t=t=>{var n,r,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=D.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(i=D.current)||void 0===i?void 0:i.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||z(!1),document.removeEventListener("pointermove",t),D.current=null};return null!==D.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[w,z,D]),g.useEffect((()=>{const e=()=>z(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[z]);const[j,V]=jk((e=>{const t=_().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=Fk(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),L=g.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&(C(e),r&&(O.current=!0))}),[b.value]),q=g.useCallback((()=>null==w?void 0:w.focus()),[w]),B=g.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&k(e)}),[b.value]),U="popper"===r?GM:LH,F=U===GM?{side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:y}:{};return g.createElement(Nk,{scope:n,content:w,viewport:x,onViewportChange:S,itemRefCallback:L,selectedItem:E,onItemLeave:q,itemTextRefCallback:B,focusSelectedItem:N,selectedItemText:P,position:r,isPositioned:T,searchRef:j},g.createElement(Vy,{as:Zf,allowPinchZoom:!0},g.createElement(Y_,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:et(o,(e=>{var t;null===(t=b.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},g.createElement(ky,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1)},g.createElement(U,Te({role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault()},v,F,{onPlaced:()=>M(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:et(v.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&V(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=_().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>R(t))),e.preventDefault()}}))}))))))})),LH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=dp(qh,n),a=fp(qh,n),[s,u]=g.useState(null),[l,c]=g.useState(null),d=zt(t,(e=>c(e))),f=c0(n),p=g.useRef(!1),m=g.useRef(!0),{viewport:h,selectedItem:y,selectedItemText:v,focusSelectedItem:b}=a,w=g.useCallback((()=>{if(i.trigger&&i.valueNode&&s&&l&&h&&y&&v){const e=i.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),o=v.getBoundingClientRect();if("rtl"!==i.dir){const r=o.left-t.left,i=n.left-r,a=e.left-i,u=e.width+a,l=Math.max(u,t.width),c=window.innerWidth-_l,d=UM(i,[_l,c-l]);s.style.minWidth=u+"px",s.style.left=d+"px"}else{const r=t.right-o.right,i=window.innerWidth-n.right-r,a=window.innerWidth-e.right-i,u=e.width+a,l=Math.max(u,t.width),c=window.innerWidth-_l,d=UM(i,[_l,c-l]);s.style.minWidth=u+"px",s.style.right=d+"px"}const a=f(),u=window.innerHeight-2*_l,c=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),g=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=m+g+c+parseInt(d.paddingBottom,10)+b,A=Math.min(5*y.offsetHeight,w),x=window.getComputedStyle(h),S=parseInt(x.paddingTop,10),I=parseInt(x.paddingBottom,10),E=e.top+e.height/2-_l,C=u-E,P=y.offsetHeight/2,k=m+g+(y.offsetTop+P),_=w-k;if(k<=E){const e=y===a[a.length-1].ref.current;s.style.bottom="0px";const t=l.clientHeight-h.offsetTop-h.offsetHeight,n=k+Math.max(C,P+(e?I:0)+t+b);s.style.height=n+"px"}else{const e=y===a[0].ref.current;s.style.top="0px";const t=Math.max(E,m+h.offsetTop+(e?S:0)+P)+_;s.style.height=t+"px",h.scrollTop=k-E+h.offsetTop}s.style.margin=`${_l}px 0`,s.style.minHeight=A+"px",s.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,i.trigger,i.valueNode,s,l,h,y,v,i.dir,r]);Uo((()=>w()),[w]);const[A,x]=g.useState();Uo((()=>{l&&x(window.getComputedStyle(l).zIndex)}),[l]);const S=g.useCallback((e=>{e&&!0===m.current&&(w(),null==b||b(),m.current=!1)}),[w,b]);return g.createElement(BH,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:S},g.createElement("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A}},g.createElement(ft.div,Te({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),GM=g.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=_l,...i}=e,a=eC(n);return g.createElement(WI,Te({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[BH,tC]=nm(qh,{}),WM="SelectViewport",VH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=fp(WM,n),i=tC(WM,n),a=zt(t,o.onViewportChange),s=g.useRef(0);return g.createElement(g.Fragment,null,g.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),g.createElement(l0.Slot,{scope:n},g.createElement(ft.div,Te({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:et(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(null!=r&&r.current&&n){const e=Math.abs(s.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*_l,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),s=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}s.current=t.scrollTop}))}))))})),jH="SelectGroup",[FH,zH]=nm(jH),UH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=hd();return g.createElement(FH,{scope:n,id:o},g.createElement(ft.div,Te({role:"group","aria-labelledby":o},r,{ref:t})))})),GH="SelectLabel",WH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=zH(GH,n);return g.createElement(ft.div,Te({id:o.id},r,{ref:t}))})),p_="SelectItem",[qH,kk]=nm(p_),HH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=dp(p_,n),u=fp(p_,n),l=s.value===r,[c,d]=g.useState(i??""),[f,p]=g.useState(!1),m=zt(t,(e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)})),h=hd(),y=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.createElement(qH,{scope:n,value:r,disabled:o,textId:h,isSelected:l,onItemTextChange:g.useCallback((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},g.createElement(l0.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},g.createElement(ft.div,Te({role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":l&&f,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:m,onFocus:et(a.onFocus,(()=>p(!0))),onBlur:et(a.onBlur,(()=>p(!1))),onPointerUp:et(a.onPointerUp,y),onPointerMove:et(a.onPointerMove,(e=>{var t;o?null===(t=u.onItemLeave)||void 0===t||t.call(u):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:et(a.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=u.onItemLeave)||void 0===t||t.call(u))})),onKeyDown:et(a.onKeyDown,(e=>{var t;""!==(null===(t=u.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(SH.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))}))))})),Zg="SelectItemText",XH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=dp(Zg,n),s=fp(Zg,n),u=kk(Zg,n),l=EH(Zg,n),[c,d]=g.useState(null),f=zt(t,(e=>d(e)),u.onItemTextChange,(e=>{var t;return null===(t=s.itemTextRefCallback)||void 0===t?void 0:t.call(s,e,u.value,u.disabled)})),p=null==c?void 0:c.textContent,m=g.useMemo((()=>g.createElement("option",{key:u.value,value:u.value,disabled:u.disabled},p)),[u.disabled,u.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:y}=l;return Uo((()=>(h(m),()=>y(m))),[h,y,m]),g.createElement(g.Fragment,null,g.createElement(ft.span,Te({id:u.textId},i,{ref:f})),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?bu.createPortal(i.children,a.valueNode):null)})),QH="SelectItemIndicator",KH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return kk(QH,n).isSelected?g.createElement(ft.span,Te({"aria-hidden":!0},r,{ref:t})):null})),qM="SelectScrollUpButton",YH=g.forwardRef(((e,t)=>{const n=fp(qM,e.__scopeSelect),r=tC(qM,e.__scopeSelect),[o,i]=g.useState(!1),a=zt(t,r.onScrollButtonChange);return Uo((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;i(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?g.createElement(Lk,Te({},e,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),HM="SelectScrollDownButton",JH=g.forwardRef(((e,t)=>{const n=fp(HM,e.__scopeSelect),r=tC(HM,e.__scopeSelect),[o,i]=g.useState(!1),a=zt(t,r.onScrollButtonChange);return Uo((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;i(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?g.createElement(Lk,Te({},e,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),Lk=g.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=fp("SelectScrollButton",n),a=g.useRef(null),s=c0(n),u=g.useCallback((()=>{null!==a.current&&(window.clearInterval(a.current),a.current=null)}),[]);return g.useEffect((()=>()=>u()),[u]),Uo((()=>{var e;const t=s().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[s]),g.createElement(ft.div,Te({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:et(o.onPointerDown,(()=>{null===a.current&&(a.current=window.setInterval(r,50))})),onPointerMove:et(o.onPointerMove,(()=>{var e;null===(e=i.onItemLeave)||void 0===e||e.call(i),null===a.current&&(a.current=window.setInterval(r,50))})),onPointerLeave:et(o.onPointerLeave,(()=>{u()}))}))})),ZH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return g.createElement(ft.div,Te({"aria-hidden":!0},r,{ref:t}))}));function Bk(e){return""===e||void 0===e}const Vk=g.forwardRef(((e,t)=>{const{value:n,...r}=e,o=g.useRef(null),i=zt(t,o),a=Zy(n);return g.useEffect((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(a!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[a,n]),g.createElement($k,{asChild:!0},g.createElement("select",Te({},r,{ref:i,defaultValue:n})))}));function jk(e){const t=xs(e),n=g.useRef(""),r=g.useRef(0),o=g.useCallback((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),i=g.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return g.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,o,i]}function Fk(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=eX(e,Math.max(o,0));1===r.length&&(i=i.filter((e=>e!==n)));const a=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return a!==n?a:void 0}function eX(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}Vk.displayName="BubbleSelect";const zk=PH,nC=TH,Uk=OH,tX=DH,nX=$H,Gk=NH,rX=VH,Wk=UH,qk=WH,Hk=HH,oX=XH,iX=KH,Xk=YH,Qk=JH,Kk=ZH,aX=zk,rC=g.forwardRef((({...e},t)=>z.jsx(aX,{ref:t,...e})));rC.displayName=zk.displayName;const Yk=g.forwardRef(((e,t)=>z.jsx(Wk,{ref:t,...e})));Yk.displayName=Wk.displayName;const Jk=g.forwardRef(((e,t)=>z.jsx(Uk,{ref:t,...e})));Jk.displayName=Uk.displayName;const oC=g.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,renderCaret:i,...a},s)=>{const u=i?i():i?null:z.jsx(sD,{size:20,className:"transition-transform duration-200 group-data-[state=open]/select:rotate-180"});return z.jsxs("div",{className:"w-full",children:[z.jsxs(nC,{ref:s,className:ye("group/select flex h-l w-full items-center justify-between rounded-m border bg-background p-xxs text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus-visible:ring-gray-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...a,children:[z.jsxs("div",{className:ye("flex flex-1 items-center gap-xxs",{"max-w-[calc(100%-20px)]":u}),children:[o&&z.jsx("span",{className:ye("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),z.jsx(tX,{asChild:!0,children:u})]}),n||r?r?z.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[z.jsx(Ny,{size:16}),r]}):z.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[z.jsx(t8,{size:16}),n]}):null]})}));oC.displayName="SelectTriggerWrapper";const Zk=g.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...i},a)=>z.jsx(oC,{ref:a,className:ye("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...i,children:t})));Zk.displayName=nC.displayName;const iC=g.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const i=g.useMemo((()=>{const e=t=>{var n,r;if(!t)return!1;if(Array.isArray(t))return t.some(e);if(g.isValidElement(t)){const o=null==(n=t.type)?void 0:n.displayName;return"SelectActions"===o||"SelectFooter"===o||e(null==(r=t.props)?void 0:r.children)}return!1};return e(t)}),[t]);return z.jsx(nX,{children:z.jsx(Gk,{ref:o,className:ye("z-[101] flex max-h-[var(--radix-select-content-available-height)] min-w-[8rem] flex-col rounded-lg border border-gray-200 bg-white text-popover-foreground","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)]","data-[state=open]:animate-in data-[state=closed]:animate-out ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2 ","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2 ","data-[state=closed]:duration-150 data-[state=open]:duration-150 ","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:z.jsx(rX,{className:ye("flex flex-col gap-xxxs overflow-y-auto px-xxs",{"py-xxs":!i},"popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})})}));iC.displayName=Gk.displayName;const e3=g.forwardRef((({className:e,...t},n)=>z.jsx(qk,{ref:n,className:ye("text-sm font-medium text-gray-900",e),...t})));e3.displayName=qk.displayName;const t3=g.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},i)=>{const a=z.jsx(iX,{children:z.jsx($y,{size:20})});return z.jsxs(Hk,{ref:i,className:ye("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs","text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[t&&"left"===n&&a,z.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:z.jsx(oX,{children:r})}),t&&"right"===n&&a]})}));t3.displayName=Hk.displayName;const n3=g.forwardRef((({className:e,...t},n)=>z.jsx(Kk,{ref:n,className:ye("-mx-1 my-1 h-px bg-gray-200",e),...t})));n3.displayName=Kk.displayName;const sX=({selectedValues:e=[],onRemoveValue:t})=>{const n=g.useRef(null),[r,o]=g.useState(e.length);return g.useLayoutEffect((()=>{if(!n.current||0===e.length)return void o(e.length);const r=n.current.offsetWidth-60,i=document.createElement("div");Object.assign(i.style,{position:"absolute",visibility:"hidden",whiteSpace:"nowrap",display:"flex",gap:"4px",top:"-9999px",left:"-9999px"}),document.body.appendChild(i);let a=0,s=0;for(const n of e){const e=document.createElement("div");e.className="gap-xxxs p-xxs flex cursor-pointer items-center rounded-sm bg-gray-100 text-sm font-medium text-gray-900";const o=document.createElement("span");if(o.textContent="string"==typeof n?n:n.value,e.appendChild(o),"string"!=typeof n&&n.avatar){const t=document.createElement("div");t.className="w-6 h-6 rounded-full bg-gray-300 flex-shrink-0",e.insertBefore(t,o)}if(t){const t=document.createElement("button");t.innerHTML="×",t.className="ml-1 rounded-full outline-none",e.appendChild(t)}i.appendChild(e);const u=e.offsetWidth+4;if(!(a+u<=r))break;a+=u,s++}document.body.removeChild(i),o(Math.max(1,s))}),[e,t]),{containerRef:n,visibleCount:r}},r3=({hiddenCount:e,selectedValues:t=[],onRemoveValue:n})=>{const r=e=>{e.stopPropagation(),e.preventDefault()};return z.jsx("div",{onPointerDown:r,onMouseDown:r,onClick:r,children:z.jsxs(rC,{name:"hidden-chips-counter",children:[z.jsx(nC,{asChild:!0,children:z.jsx("div",{children:z.jsx(W$,{text:`+${e}`})})}),z.jsx(iC,{align:"end",className:"max-h-[250px] w-screen max-w-[300px] gap-xxxs overflow-y-auto",children:t.map((e=>{const t="string"==typeof e?e:e.value;return z.jsxs("div",{className:"flex justify-between p-xxs",onClick:e=>e.stopPropagation(),children:[z.jsx("span",{children:t}),z.jsx(Wv,{size:16,className:"cursor-pointer",onClick:()=>null==n?void 0:n(t)})]},t)}))})]})})};r3.displayName="SelectHiddenChipsCounter";const uX=g.forwardRef(((e,t)=>{const{className:n,selectedValues:r=[],placeholder:o,onRemoveValue:i,icon:a,caption:s,error:u,...l}=e,{containerRef:c,visibleCount:d}=sX({selectedValues:r,onRemoveValue:i}),f=r.length-d;return z.jsx(oC,{ref:t,className:n,caption:s,error:u,icon:a,...l,children:z.jsx("div",{ref:c,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===r.length?z.jsx("span",{children:o||"Select options..."}):z.jsxs(uz,{children:[r.slice(0,d).map((e=>{const t="string"==typeof e?e:e.value;return z.jsx(W$,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==i?void 0:i(t)},t)})),f>0&&z.jsx(r3,{hiddenCount:f,onRemoveValue:i,selectedValues:r})]})})})}));uX.displayName="SelectMultiTrigger";const lX=g.forwardRef((({value:e,isSelected:t=!1,isLoading:n=!1,checkboxPosition:r="right",onSelect:o,className:i,children:a,...s},u)=>{const l=n?z.jsx(q_,{size:24,className:"flex-shrink-0 animate-spin text-blue_100"}):z.jsx(PI,{size:"default",variant:"default",checked:t}),c=()=>{null==o||o(e)};return z.jsxs("div",{ref:u,className:ye("relative flex cursor-pointer select-none items-center gap-xxs rounded-m","p-xxs text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","focus:bg-accent focus:text-accent-foreground",{"pointer-events-none":n},i),onClick:c,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c())},...s,children:["left"===r&&l,z.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:a}),"right"===r&&l]})}));lX.displayName="SelectCheckboxItem";const cX=g.forwardRef((({className:e,...t},n)=>z.jsx(Xk,{ref:n,className:ye("flex cursor-default items-center justify-center py-xxs",e),...t,children:z.jsx(W7,{size:16})})));cX.displayName=Xk.displayName;const dX=g.forwardRef((({className:e,...t},n)=>z.jsx(Qk,{ref:n,className:ye("flex cursor-default items-center justify-center p-xxs",e),...t,children:z.jsx(sD,{size:16})})));dX.displayName=Qk.displayName;const fX=g.forwardRef((({className:e,children:t,...n},r)=>z.jsx("div",{ref:r,className:ye("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));fX.displayName="SelectActions";const pX=g.forwardRef((({className:e,children:t,...n},r)=>z.jsx("div",{ref:r,className:ye("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));pX.displayName="SelectFooter";const hX=g.createContext({}),Pd=()=>{const e=g.useContext(hX),t=g.useContext(o3),n=yH();e||console.error("useFormContext must be used within a FormProvider");const{getFieldState:r,formState:o}=n,i=r(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},o3=g.createContext({}),mX=g.forwardRef((({className:e,...t},n)=>{const r=g.useId();return z.jsx(o3.Provider,{value:{id:r},children:z.jsx("div",{ref:n,className:ye("mt-[8px]",e),...t})})}));mX.displayName="FormItem";const vX=g.forwardRef((({className:e,isRequired:t,...n},r)=>{const{formItemId:o}=Pd();return z.jsxs(Dk,{ref:r,className:ye("mb-2 text-sm font-medium",e),htmlFor:o,...n,children:[t&&"*",n.children]})}));vX.displayName="FormLabel";const gX=g.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:i}=Pd();return z.jsx(Cd,{ref:t,id:r,"aria-describedby":n?`${o} ${i}`:`${o}`,"aria-invalid":!!n,...e})}));gX.displayName="FormControl";const yX=g.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=Pd();return z.jsx("p",{ref:n,id:r,className:ye("text-sm text-muted-foreground",e),...t})}));yX.displayName="FormDescription";const wX=g.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:i}=Pd(),a=o?String(null==o?void 0:o.message):t;return a?z.jsxs("p",{ref:r,id:i,className:ye("flex items-start gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[z.jsx(Ny,{size:16,className:"text-red-dark"})," ",a]}):null}));wX.displayName="FormMessage";const bX=g.forwardRef((({...e},t)=>{const{name:n}=Pd();return z.jsx(rC,{ref:t,name:n,...e})}));bX.displayName="FormSelect";const xX=g.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=Pd();return z.jsx(Zk,{ref:r,id:o,className:e,...n,children:t})}));xX.displayName="FormSelectTrigger";const AX=g.forwardRef(((e,t)=>z.jsx(iC,{ref:t,...e})));AX.displayName="FormSelectContent";const SX=g.forwardRef(((e,t)=>z.jsx(t3,{ref:t,...e})));SX.displayName="FormSelectItem";const _X=g.forwardRef(((e,t)=>z.jsx(Yk,{ref:t,...e})));_X.displayName="FormSelectGroup";const IX=g.forwardRef(((e,t)=>z.jsx(e3,{ref:t,...e})));IX.displayName="FormSelectLabel";const CX=g.forwardRef(((e,t)=>z.jsx(n3,{ref:t,...e})));CX.displayName="FormSelectSeparator";const EX=g.forwardRef(((e,t)=>z.jsx(Jk,{ref:t,...e})));function Xf(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function i3(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>g.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return g.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=g.createContext(r),i=n.length;function a(t){const{scope:n,children:r,...a}=t,s=(null==n?void 0:n[e][i])||o,u=g.useMemo((()=>a),Object.values(a));return g.createElement(s.Provider,{value:u},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){const s=(null==a?void 0:a[e][i])||o,u=g.useContext(s);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},PX(r,...t)]}function PX(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return g.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function d0(e){const t=g.useRef(e);return g.useEffect((()=>{t.current=e})),g.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function RX(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function TX(...e){return t=>e.forEach((e=>RX(e,t)))}function MX(...e){return g.useCallback(TX(...e),e)}function pp(e){return e.split("-")[0]}function tg(e){return e.split("-")[1]}function rm(e){return["top","bottom"].includes(pp(e))?"x":"y"}function aC(e){return"y"===e?"height":"width"}function XM(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,s=rm(t),u=aC(s),l=r[u]/2-o[u]/2,c="x"===s;let d;switch(pp(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-o.width,y:a};break;default:d={x:r.x,y:r.y}}switch(tg(t)){case"start":d[s]-=l*(n&&c?-1:1);break;case"end":d[s]+=l*(n&&c?-1:1)}return d}EX.displayName="FormSelectValue";const OX=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:c}=XM(u,r,s),d=r,f={},p=0;for(let n=0;n<i.length;n++){const{name:m,fn:h}=i[n],{x:g,y:y,data:v,reset:b}=await h({x:l,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:u,platform:a,elements:{reference:e,floating:t}});l=g??l,c=y??c,f={...f,[m]:{...f[m],...v}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:l,y:c}=XM(u,d,s))),n=-1)}return{x:l,y:c,placement:d,strategy:o,middlewareData:f}};function a3(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function by(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function kv(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,m=a3(p),h=s[f?"floating"===d?"reference":"floating":d],g=by(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),y=by(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...a.floating,x:r,y:o}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),strategy:u}):a[d]);return{top:g.top-y.top+m.top,bottom:y.bottom-g.bottom+m.bottom,left:g.left-y.left+m.left,right:y.right-g.right+m.right}}const DX=Math.min,zf=Math.max;function h_(e,t,n){return zf(e,DX(t,n))}const QM=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:o,y:i,placement:a,rects:s,platform:u}=t;if(null==n)return{};const l=a3(r),c={x:o,y:i},d=rm(a),f=tg(a),p=aC(d),m=await u.getDimensions(n),h="y"===d?"top":"left",g="y"===d?"bottom":"right",y=s.reference[p]+s.reference[d]-c[d]-s.floating[p],v=c[d]-s.reference[d],b=await(null==u.getOffsetParent?void 0:u.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=s.floating[p]);const A=y/2-v/2,x=l[h],S=w-m[p]-l[g],I=w/2-m[p]/2+A,E=h_(x,I,S),C=("start"===f?l[h]:l[g])>0&&I!==E&&s.reference[p]<=s.floating[p];return{[d]:c[d]-(C?I<x?x-I:S-I:0),data:{[d]:E,centerOffset:I-E}}}}),$X={left:"right",right:"left",bottom:"top",top:"bottom"};function xy(e){return e.replace(/left|right|bottom|top/g,(e=>$X[e]))}function NX(e,t,n){void 0===n&&(n=!1);const r=tg(e),o=rm(e),i=aC(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=xy(a)),{main:a,cross:xy(a)}}const kX={start:"end",end:"start"};function KM(e){return e.replace(/start|end/g,(e=>kX[e]))}const s3=["top","right","bottom","left"];s3.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const LX=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:u}=t,{mainAxis:l=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...m}=e,h=pp(r),g=[a,...d||(h!==a&&p?function(e){const t=xy(e);return[KM(e),t,KM(t)]}(a):[xy(a)])],y=await kv(t,m),v=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(l&&v.push(y[h]),c){const{main:e,cross:t}=NX(r,i,await(null==s.isRTL?void 0:s.isRTL(u.floating)));v.push(y[e],y[t])}if(b=[...b,{placement:r,overflows:v}],!v.every((e=>e<=0))){var w,A;const e=(null!=(w=null==(A=o.flip)?void 0:A.index)?w:0)+1,t=g[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var x;const e=null==(x=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:x[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};function YM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JM(e){return s3.some((t=>e[t]>=0))}const BX=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=YM(await kv(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:JM(t)}}}case"escaped":{const t=YM(await kv(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:JM(t)}}}default:return{}}}}},VX=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=pp(n),s=tg(n),u="x"===rm(n),l=["left","top"].includes(a)?-1:1,c=i&&u?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),u?{x:p*c,y:f*l}:{x:f*l,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function u3(e){return"x"===e?"y":"x"}const jX=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,l={x:n,y:r},c=await kv(t,u),d=rm(pp(o)),f=u3(d);let p=l[d],m=l[f];if(i){const e="y"===d?"bottom":"right";p=h_(p+c["y"===d?"top":"left"],p,p-c[e])}if(a){const e="y"===f?"bottom":"right";m=h_(m+c["y"===f?"top":"left"],m,m-c[e])}const h=s.fn({...t,[d]:p,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r}}}}},FX=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=e,c={x:n,y:r},d=rm(o),f=u3(d);let p=c[d],m=c[f];const h="function"==typeof s?s({...i,placement:o}):s,g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+g.mainAxis,n=i.reference[d]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var y,v,b,w;const e="y"===d?"width":"height",t=["top","left"].includes(pp(o)),n=i.reference[f]-i.floating[e]+(t&&null!=(y=null==(v=a.offset)?void 0:v[f])?y:0)+(t?0:g.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:null!=(b=null==(w=a.offset)?void 0:w[f])?b:0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[f]:m}}}},zX=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a,...s}=e,u=await kv(t,s),l=pp(n),c=tg(n);let d,f;"top"===l||"bottom"===l?(d=l,f=c===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(f=l,d="end"===c?"top":"bottom");const p=zf(u.left,0),m=zf(u.right,0),h=zf(u.top,0),g=zf(u.bottom,0),y={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==h||0!==g?h+g:zf(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==m?p+m:zf(u.left,u.right)):u[f])},v=await o.getDimensions(i.floating);null==a||a({...t,...y});const b=await o.getDimensions(i.floating);return v.width!==b.width||v.height!==b.height?{reset:{rects:!0}}:{}}}};function l3(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function $l(e){if(null==e)return window;if(!l3(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function ng(e){return $l(e).getComputedStyle(e)}function Cl(e){return l3(e)?"":e?(e.nodeName||"").toLowerCase():""}function c3(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function wu(e){return e instanceof $l(e).HTMLElement}function Id(e){return e instanceof $l(e).Element}function sC(e){return!(typeof ShadowRoot>"u")&&(e instanceof $l(e).ShadowRoot||e instanceof ShadowRoot)}function f0(e){const{overflow:t,overflowX:n,overflowY:r}=ng(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function UX(e){return["table","td","th"].includes(Cl(e))}function ZM(e){const t=/firefox/i.test(c3()),n=ng(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function d3(){return!/^((?!chrome|android).)*safari/i.test(c3())}const e2=Math.min,yv=Math.max,Ay=Math.round;function El(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect();let u=1,l=1;t&&wu(e)&&(u=e.offsetWidth>0&&Ay(s.width)/e.offsetWidth||1,l=e.offsetHeight>0&&Ay(s.height)/e.offsetHeight||1);const c=Id(e)?$l(e):window,d=!d3()&&n,f=(s.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/u,p=(s.top+(d&&null!=(i=null==(a=c.visualViewport)?void 0:a.offsetTop)?i:0))/l,m=s.width/u,h=s.height/l;return{width:m,height:h,top:p,right:f+m,bottom:p+h,left:f,x:f,y:p}}function vd(e){return(t=e,(t instanceof $l(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function p0(e){return Id(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function f3(e){return El(vd(e)).left+p0(e).scrollLeft}function GX(e,t,n){const r=wu(t),o=vd(t),i=El(e,r&&function(e){const t=El(e);return Ay(t.width)!==e.offsetWidth||Ay(t.height)!==e.offsetHeight}(t),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==Cl(t)||f0(o))&&(a=p0(t)),wu(t)){const e=El(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=f3(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function p3(e){return"html"===Cl(e)?e:e.assignedSlot||e.parentNode||(sC(e)?e.host:null)||vd(e)}function t2(e){return wu(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function m_(e){const t=$l(e);let n=t2(e);for(;n&&UX(n)&&"static"===getComputedStyle(n).position;)n=t2(n);return n&&("html"===Cl(n)||"body"===Cl(n)&&"static"===getComputedStyle(n).position&&!ZM(n))?t:n||function(e){let t=p3(e);for(sC(t)&&(t=t.host);wu(t)&&!["html","body"].includes(Cl(t));){if(ZM(t))return t;t=t.parentNode}return null}(e)||t}function n2(e){if(wu(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=El(e);return{width:t.width,height:t.height}}function h3(e){const t=p3(e);return["html","body","#document"].includes(Cl(t))?e.ownerDocument.body:wu(t)&&f0(t)?t:h3(t)}function Sy(e,t){var n;void 0===t&&(t=[]);const r=h3(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=$l(r),a=o?[i].concat(i.visualViewport||[],f0(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Sy(a))}function r2(e,t,n){return"viewport"===t?by(function(e,t){const n=$l(e),r=vd(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;const e=d3();(e||!e&&"fixed"===t)&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s,y:u}}(e,n)):Id(t)?function(e,t){const n=El(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):by(function(e){var t;const n=vd(e),r=p0(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=yv(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=yv(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let s=-r.scrollLeft+f3(e);const u=-r.scrollTop;return"rtl"===ng(o||n).direction&&(s+=yv(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:u}}(vd(e)))}function WX(e){const t=Sy(e),n=["absolute","fixed"].includes(ng(e).position)&&wu(e)?m_(e):e;return Id(n)?t.filter((e=>Id(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&sC(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==Cl(e))):[]}const qX={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?WX(t):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=r2(t,n,o);return e.top=yv(r.top,e.top),e.right=e2(r.right,e.right),e.bottom=e2(r.bottom,e.bottom),e.left=yv(r.left,e.left),e}),r2(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=wu(n),i=vd(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Cl(n)||f0(i))&&(a=p0(n)),wu(n))){const e=El(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:Id,getDimensions:n2,getOffsetParent:m_,getDocumentElement:vd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:GX(t,m_(n),r),floating:{...n2(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===ng(e).direction};function HX(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=r,u=o&&!s,l=i&&!s,c=u||l?[...Id(e)?Sy(e):[],...Sy(t)]:[];c.forEach((e=>{u&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)}));let d,f=null;if(a){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),Id(e)&&!s&&f.observe(e),f.observe(t)}let p=s?El(e):null;return s&&function t(){const r=El(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{u&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(d)}}const XX=(e,t,n)=>OX(e,t,{platform:qX,...n});var v_=typeof document<"u"?g.useLayoutEffect:g.useEffect;function g_(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!g_(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||g_(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function QX(e){const t=g.useRef(e);return v_((()=>{t.current=e})),t}function KX(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const i=g.useRef(null),a=g.useRef(null),s=QX(o),u=g.useRef(null),[l,c]=g.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=g.useState(t);g_(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=g.useCallback((()=>{!i.current||!a.current||XX(i.current,a.current,{middleware:d,placement:n,strategy:r}).then((e=>{m.current&&bu.flushSync((()=>{c(e)}))}))}),[d,n,r]);v_((()=>{m.current&&p()}),[p]);const m=g.useRef(!1);v_((()=>(m.current=!0,()=>{m.current=!1})),[]);const h=g.useCallback((()=>{if("function"==typeof u.current&&(u.current(),u.current=null),i.current&&a.current)if(s.current){const e=s.current(i.current,a.current,p);u.current=e}else p()}),[p,s]),y=g.useCallback((e=>{i.current=e,h()}),[h]),v=g.useCallback((e=>{a.current=e,h()}),[h]),b=g.useMemo((()=>({reference:i,floating:a})),[]);return g.useMemo((()=>({...l,update:p,refs:b,reference:y,floating:v})),[l,p,b,y,v])}const YX=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn:e=>function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?QM({element:t.current,padding:n}).fn(e):{}:t?QM({element:t,padding:n}).fn(e):{}}};function JX(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function ZX(...e){return t=>e.forEach((e=>JX(e,t)))}const m3=g.forwardRef(((e,t)=>{const{children:n,...r}=e,o=g.Children.toArray(n),i=o.find(tQ);if(i){const e=i.props.children,n=o.map((t=>t===i?g.Children.count(e)>1?g.Children.only(null):g.isValidElement(e)?e.props.children:null:t));return g.createElement(y_,Te({},r,{ref:t}),g.isValidElement(e)?g.cloneElement(e,void 0,n):null)}return g.createElement(y_,Te({},r,{ref:t}),n)}));m3.displayName="Slot";const y_=g.forwardRef(((e,t)=>{const{children:n,...r}=e;return g.isValidElement(n)?g.cloneElement(n,{...nQ(r,n.props),ref:ZX(t,n.ref)}):g.Children.count(n)>1?g.Children.only(null):null}));y_.displayName="SlotClone";const eQ=({children:e})=>g.createElement(g.Fragment,null,e);function tQ(e){return g.isValidElement(e)&&e.type===eQ}function nQ(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const rQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],w_=rQ.reduce(((e,t)=>{const n=g.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?m3:t;return g.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),g.createElement(i,Te({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function oQ(e,t){e&&bu.flushSync((()=>e.dispatchEvent(t)))}function iQ(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function aQ(...e){return t=>e.forEach((e=>iQ(e,t)))}function sQ(...e){return g.useCallback(aQ(...e),e)}const qf=null!=globalThis&&globalThis.document?g.useLayoutEffect:()=>{};function uQ(e){const[t,n]=g.useState(void 0);return qf((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const v3="Popper",[uC,g3]=i3(v3),[Tce,lQ]=uC(v3),_y="PopperContent",[cQ,Mce]=uC(_y),[dQ,fQ]=uC(_y,{hasParent:!1,positionUpdateFns:new Set}),pQ=g.forwardRef(((e,t)=>{var n,r,o,i,a,s,u,l;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,collisionBoundary:y=[],collisionPadding:v=0,sticky:b="partial",hideWhenDetached:w=!1,avoidCollisions:A=!0,onPlaced:x,...S}=e,I=lQ(_y,c),[E,C]=g.useState(null),P=sQ(t,(e=>C(e))),[k,_]=g.useState(null),T=uQ(k),M=null!==(n=null==T?void 0:T.width)&&void 0!==n?n:0,O=null!==(r=null==T?void 0:T.height)&&void 0!==r?r:0,R=d+("center"!==p?"-"+p:""),N="number"==typeof v?v:{top:0,right:0,bottom:0,left:0,...v},z=Array.isArray(y)?y:[y],D=z.length>0,j={padding:N,boundary:z.filter(mQ),altBoundary:D},{reference:V,floating:L,strategy:q,x:B,y:U,placement:F,middlewareData:G,update:W}=KX({strategy:"fixed",placement:R,whileElementsMounted:HX,middleware:[vQ(),VX({mainAxis:f+O,alignmentAxis:m}),A?jX({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?FX():void 0,...j}):void 0,k?YX({element:k,padding:h}):void 0,A?LX({...j}):void 0,zX({...j,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),gQ({arrowWidth:M,arrowHeight:O}),w?BX({strategy:"referenceHidden"}):void 0].filter(hQ)});qf((()=>{V(I.anchor)}),[V,I.anchor]);const Q=null!==B&&null!==U,[H,X]=y3(F),K=d0(x);qf((()=>{Q&&(null==K||K())}),[Q,K]);const Y=null===(o=G.arrow)||void 0===o?void 0:o.x,J=null===(i=G.arrow)||void 0===i?void 0:i.y,Z=0!==(null===(a=G.arrow)||void 0===a?void 0:a.centerOffset),[$,ee]=g.useState();qf((()=>{E&&ee(window.getComputedStyle(E).zIndex)}),[E]);const{hasParent:te,positionUpdateFns:ne}=fQ(_y,c),re=!te;g.useLayoutEffect((()=>{if(!re)return ne.add(W),()=>{ne.delete(W)}}),[re,ne,W]),qf((()=>{re&&Q&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,Q,ne]);const oe={"data-side":H,"data-align":X,...S,ref:P,style:{...S.style,animation:Q?void 0:"none",opacity:null!==(s=G.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return g.createElement("div",{ref:L,"data-radix-popper-content-wrapper":"",style:{position:q,left:0,top:0,transform:Q?`translate3d(${Math.round(B)}px, ${Math.round(U)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:$,"--radix-popper-transform-origin":[null===(u=G.transformOrigin)||void 0===u?void 0:u.x,null===(l=G.transformOrigin)||void 0===l?void 0:l.y].join(" ")},dir:e.dir},g.createElement(cQ,{scope:c,placedSide:H,onArrowChange:_,arrowX:Y,arrowY:J,shouldHideArrow:Z},re?g.createElement(dQ,{scope:c,hasParent:!0,positionUpdateFns:ne},g.createElement(w_.div,oe)):g.createElement(w_.div,oe)))}));function hQ(e){return void 0!==e}function mQ(e){return null!==e}const vQ=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),gQ=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:u,middlewareData:l}=t,c=0!==(null===(n=l.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=y3(s),h={start:"0%",center:"50%",end:"100%"}[m],g=(null!==(r=null===(o=l.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,y=(null!==(i=null===(a=l.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let v="",b="";return"bottom"===p?(v=c?h:`${g}px`,b=-f+"px"):"top"===p?(v=c?h:`${g}px`,b=`${u.floating.height+f}px`):"right"===p?(v=-f+"px",b=c?h:`${y}px`):"left"===p&&(v=`${u.floating.width+f}px`,b=c?h:`${y}px`),{data:{x:v,y:b}}}});function y3(e){const[t,n="center"]=e.split("-");return[t,n]}const yQ=pQ;function wQ(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function bQ(...e){return t=>e.forEach((e=>wQ(e,t)))}function xQ(...e){return g.useCallback(bQ(...e),e)}function AQ(e,t){return g.useReducer(((e,n)=>t[e][n]??e),e)}const w3=e=>{const{present:t,children:n}=e,r=SQ(t),o="function"==typeof n?n({present:r.isPresent}):g.Children.only(n),i=xQ(r.ref,o.ref);return"function"==typeof n||r.isPresent?g.cloneElement(o,{ref:i}):null};function SQ(e){const[t,n]=g.useState(),r=g.useRef({}),o=g.useRef(e),i=g.useRef("none"),a=e?"mounted":"unmounted",[s,u]=AQ(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect((()=>{const e=ey(r.current);i.current="mounted"===s?e:"none"}),[s]),qf((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=ey(t);e?u("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),qf((()=>{if(t){const e=e=>{const n=ey(r.current).includes(e.animationName);e.target===t&&n&&bu.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===t&&(i.current=ey(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:g.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function ey(e){return(null==e?void 0:e.animationName)||"none"}function _Q(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function IQ(...e){return t=>e.forEach((e=>_Q(e,t)))}function CQ(...e){return g.useCallback(IQ(...e),e)}function EQ(e,t=(null==globalThis?void 0:globalThis.document)){const n=d0(e);g.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}w3.displayName="Presence";const b_="dismissableLayer.update",PQ="dismissableLayer.pointerDownOutside",RQ="dismissableLayer.focusOutside";let o2;const TQ=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),MQ=g.forwardRef(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:u,...l}=e,c=g.useContext(TQ),[d,f]=g.useState(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=g.useState({}),h=CQ(t,(e=>f(e))),y=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(v),w=d?y.indexOf(d):-1,A=c.layersWithOutsidePointerEventsDisabled.size>0,x=w>=b,S=OQ((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!x||n||(null==i||i(e),null==s||s(e),e.defaultPrevented||null==u||u())}),p),I=DQ((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==a||a(e),null==s||s(e),e.defaultPrevented||null==u||u())}),p);return EQ((e=>{w===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),p),g.useEffect((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(o2=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),i2(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=o2)}}),[d,p,r,c]),g.useEffect((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),i2())}),[d,c]),g.useEffect((()=>{const e=()=>m({});return document.addEventListener(b_,e),()=>document.removeEventListener(b_,e)}),[]),g.createElement(w_.div,Te({},l,{ref:h,style:{pointerEvents:A?x?"auto":"none":void 0,...e.style},onFocusCapture:Xf(e.onFocusCapture,I.onFocusCapture),onBlurCapture:Xf(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Xf(e.onPointerDownCapture,S.onPointerDownCapture)}))}));function OQ(e,t=(null==globalThis?void 0:globalThis.document)){const n=d0(e),r=g.useRef(!1),o=g.useRef((()=>{}));return g.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){b3(PQ,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function DQ(e,t=(null==globalThis?void 0:globalThis.document)){const n=d0(e),r=g.useRef(!1);return g.useEffect((()=>{const e=e=>{e.target&&!r.current&&b3(RQ,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function i2(){const e=new CustomEvent(b_);document.dispatchEvent(e)}function b3(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?oQ(o,i):o.dispatchEvent(i)}let zA;const x3="HoverCard",[A3,Oce]=i3(x3,[g3]),$Q=g3(),[Dce,S3]=A3(x3),NQ="HoverCardPortal",[$ce,kQ]=A3(NQ,{forceMount:void 0}),x_="HoverCardContent",LQ=g.forwardRef(((e,t)=>{const n=kQ(x_,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,i=S3(x_,e.__scopeHoverCard);return g.createElement(w3,{present:r||i.open},g.createElement(BQ,Te({"data-state":i.open?"open":"closed"},o,{onPointerEnter:Xf(e.onPointerEnter,a2(i.onOpen)),onPointerLeave:Xf(e.onPointerLeave,a2(i.onClose)),ref:t})))})),BQ=g.forwardRef(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,...s}=e,u=S3(x_,n),l=$Q(n),c=g.useRef(null),d=MX(t,c),[f,p]=g.useState(!1);return g.useEffect((()=>{if(f){const e=document.body;return zA=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=zA,e.style.webkitUserSelect=zA}}}),[f]),g.useEffect((()=>{if(c.current){const e=()=>{p(!1),u.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(u.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}}),[u.isPointerDownOnContentRef,u.hasSelectionRef]),g.useEffect((()=>{c.current&&VQ(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),g.createElement(MQ,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Xf(i,(e=>{e.preventDefault()})),onDismiss:u.onDismiss},g.createElement(yQ,Te({},l,s,{onPointerDown:Xf(s.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0})),ref:d,style:{...s.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})))}));function a2(e){return t=>"touch"===t.pointerType?void 0:e()}function VQ(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}const _3=LQ,jQ=g.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>z.jsx(_3,{ref:o,align:t,sideOffset:n,className:ye("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})));jQ.displayName=_3.displayName;const I3=g.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=Pd();return z.jsx("input",{type:t,title:n.disabled?"Disabled":"",className:ye("flex w-full rounded-m px-s py-3.5 text-base text-gray-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-base placeholder:text-gray-400 placeholder:text-muted-foreground focus-visible:bg-gray-50 focus-visible:text-gray-900 focus-visible:outline-2 focus-visible:outline-blue_120 enabled:hover:outline-2 enabled:hover:outline-gray-400 disabled:bg-transparent disabled:text-gray-300 disabled:outline-gray-200 disabled:ring-0 disabled:ring-transparent disabled:placeholder:text-gray-300",{"bg-red_30_17 outline-red-dark":!!o},e),ref:r,...n})}));function FQ(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>g.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return g.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=g.createContext(r),i=n.length;n=[...n,r];const a=t=>{var n;const{scope:r,children:a,...s}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[i])||o,l=g.useMemo((()=>s),Object.values(s));return z.jsx(u.Provider,{value:l,children:a})};return a.displayName=t+"Provider",[a,function(n,a){var s;const u=(null==(s=null==a?void 0:a[e])?void 0:s[i])||o,l=g.useContext(u);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},zQ(r,...t)]}function zQ(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return g.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function s2(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function UQ(...e){return t=>{let n=!1;const r=e.map((e=>{const r=s2(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():s2(e[t],null)}}}}function GQ(e){const t=WQ(e),n=g.forwardRef(((e,n)=>{const{children:r,...o}=e,i=g.Children.toArray(r),a=i.find(HQ);if(a){const e=a.props.children,r=i.map((t=>t===a?g.Children.count(e)>1?g.Children.only(null):g.isValidElement(e)?e.props.children:null:t));return z.jsx(t,{...o,ref:n,children:g.isValidElement(e)?g.cloneElement(e,void 0,r):null})}return z.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function WQ(e){const t=g.forwardRef(((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const e=QQ(n),o=XQ(r,n.props);return n.type!==g.Fragment&&(o.ref=t?UQ(t,e):e),g.cloneElement(n,o)}return g.Children.count(n)>1?g.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}I3.displayName="Input";var qQ=Symbol("radix.slottable");function HQ(e){return g.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===qQ}function XQ(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function QQ(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var KQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],C3=KQ.reduce(((e,t)=>{const n=GQ(`Primitive.${t}`),r=g.forwardRef(((e,r)=>{const{asChild:o,...i}=e,a=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),z.jsx(a,{...i,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),lC="Progress",cC=100,[YQ,Nce]=FQ(lC),[JQ,ZQ]=YQ(lC),E3=g.forwardRef(((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=eK,...a}=e;(o||0===o)&&!u2(o)&&console.error(tK(`${o}`,"Progress"));const s=u2(o)?o:cC;null!==r&&!l2(r,s)&&console.error(nK(`${r}`,"Progress"));const u=l2(r,s)?r:null,l=Iy(u)?i(u,s):void 0;return z.jsx(JQ,{scope:n,value:u,max:s,children:z.jsx(C3.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Iy(u)?u:void 0,"aria-valuetext":l,role:"progressbar","data-state":T3(u,s),"data-value":u??void 0,"data-max":s,...a,ref:t})})}));E3.displayName=lC;var P3="ProgressIndicator",R3=g.forwardRef(((e,t)=>{const{__scopeProgress:n,...r}=e,o=ZQ(P3,n);return z.jsx(C3.div,{"data-state":T3(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})}));function eK(e,t){return`${Math.round(e/t*100)}%`}function T3(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Iy(e){return"number"==typeof e}function u2(e){return Iy(e)&&!isNaN(e)&&e>0}function l2(e,t){return Iy(e)&&!isNaN(e)&&e<=t&&e>=0}function tK(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${cC}\`.`}function nK(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or ${cC} if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}R3.displayName=P3;var M3=E3,rK=R3;const oK=g.forwardRef((({className:e,value:t,indicatorClassName:n,...r},o)=>z.jsx(M3,{ref:o,className:ye("relative h-[7px] w-full overflow-hidden rounded-full bg-blue_10",e),...r,children:z.jsx(rK,{className:ye("h-full w-full flex-1 rounded-full bg-blue_100 transition-all",n),style:{transform:`translateX(-${100-(t||0)}%)`}})})));oK.displayName=M3.displayName;const O3="Radio",[iK,D3]=ri(O3),[aK,sK]=iK(O3),uK=g.forwardRef(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:u,...l}=e,[c,d]=g.useState(null),f=zt(t,(e=>d(e))),p=g.useRef(!1),m=!c||!!c.closest("form");return g.createElement(aK,{scope:n,checked:o,disabled:a},g.createElement(ft.button,Te({type:"button",role:"radio","aria-checked":o,"data-state":$3(o),"data-disabled":a?"":void 0,disabled:a,value:s},l,{ref:f,onClick:et(e.onClick,(e=>{o||null==u||u(),m&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),m&&g.createElement(dK,{control:c,bubbles:!p.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))})),lK="RadioIndicator",cK=g.forwardRef(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=sK(lK,n);return g.createElement(ea,{present:r||i.checked},g.createElement(ft.span,Te({"data-state":$3(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))})),dK=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=g.useRef(null),a=Zy(n),s=e0(t);return g.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[a,n,r]),g.createElement("input",Te({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function $3(e){return e?"checked":"unchecked"}const fK=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],N3="RadioGroup",[pK,kce]=ri(N3,[tm,D3]),k3=tm(),L3=D3(),[hK,mK]=pK(N3),vK=g.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:u,dir:l,loop:c=!0,onValueChange:d,...f}=e,p=k3(n),m=LI(l),[h,y]=bd({prop:i,defaultProp:o,onChange:d});return g.createElement(hK,{scope:n,name:r,required:a,disabled:s,value:h,onValueChange:y},g.createElement(HI,Te({asChild:!0},p,{orientation:u,dir:m,loop:c}),g.createElement(ft.div,Te({role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":s?"":void 0,dir:m},f,{ref:t}))))})),gK="RadioGroupItem",yK=g.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=mK(gK,n),a=i.disabled||r,s=k3(n),u=L3(n),l=g.useRef(null),c=zt(t,l),d=i.value===o.value,f=g.useRef(!1);return g.useEffect((()=>{const e=e=>{fK.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),g.createElement(XI,Te({asChild:!0},s,{focusable:!a,active:d}),g.createElement(uK,Te({disabled:a,required:i.required,checked:d},u,o,{name:i.name,ref:c,onCheck:()=>i.onValueChange(o.value),onKeyDown:et((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:et(o.onFocus,(()=>{var e;f.current&&(null===(e=l.current)||void 0===e||e.click())}))})))})),wK=g.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=L3(n);return g.createElement(cK,Te({},o,r,{ref:t}))})),B3=vK,V3=yK,bK=wK,xK=g.forwardRef((({className:e,...t},n)=>z.jsx(B3,{className:ye("grid gap-2",e),...t,ref:n})));xK.displayName=B3.displayName;const AK=g.forwardRef((({className:e,...t},n)=>z.jsx(V3,{ref:n,className:ye("aspect-square size-6 rounded-full border border-gray-300 disabled:cursor-not-allowed disabled:border-gray-100 disabled:bg-gray-100","data-[state=checked]:border-blue_100 data-[state=checked]:bg-blue_100 hover:data-[state=checked]:border-blue_120","disabled:data-[state=checked]:border-gray-100 disabled:data-[state=checked]:bg-gray-100","transition-[border] duration-200 hover:data-[state=checked]:bg-blue_120 md:hover:border-2",e),...t,children:z.jsx(bK,{className:"flex items-center justify-center",children:z.jsx(Z7,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--gray-300)":"white",color:t.disabled?"var(--gray-300)":"white"}})})})));AK.displayName=V3.displayName;const SK=tI,_K=Fy,j3=g.forwardRef((({className:e,...t},n)=>z.jsx(Qh,{className:ye("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n})));j3.displayName=Qh.displayName;const IK=xu("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),F3=g.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},i)=>z.jsxs(_K,{children:[z.jsx(j3,{className:ye("bg-gray-900/70",n)}),z.jsxs(Kh,{ref:i,className:ye(IK({side:e}),t),...o,children:[r,z.jsxs(zy,{className:"absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[z.jsx(Wv,{className:"h-4 w-4"}),z.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));F3.displayName=Kh.displayName;const z3=({className:e,...t})=>z.jsx("div",{className:ye("flex flex-col space-y-2 text-center sm:text-left",e),...t});z3.displayName="SheetHeader";const U3=g.forwardRef((({className:e,...t},n)=>z.jsx(qv,{ref:n,className:ye("text-lg font-semibold text-foreground",e),...t})));U3.displayName=qv.displayName;const G3=g.forwardRef((({className:e,...t},n)=>z.jsx(Hv,{ref:n,className:ye("text-sm text-muted-foreground",e),...t})));G3.displayName=Hv.displayName;const[h0,Lce]=ri("Tooltip",[em]),dC=em(),CK="TooltipProvider",EK=700,A_="tooltip.open",[PK,fC]=h0(CK),RK=e=>{const{__scopeTooltip:t,delayDuration:n=EK,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=g.useState(!0),u=g.useRef(!1),l=g.useRef(0);return g.useEffect((()=>{const e=l.current;return()=>window.clearTimeout(e)}),[]),g.createElement(PK,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:g.useCallback((()=>{window.clearTimeout(l.current),s(!1)}),[]),onClose:g.useCallback((()=>{window.clearTimeout(l.current),l.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:u,onPointerInTransitChange:g.useCallback((e=>{u.current=e}),[]),disableHoverableContent:o},i)},pC="Tooltip",[TK,rg]=h0(pC),W3=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,u=fC(pC,e.__scopeTooltip),l=dC(t),[c,d]=g.useState(null),f=hd(),p=g.useRef(0),m=a??u.disableHoverableContent,h=s??u.delayDuration,y=g.useRef(!1),[v=!1,b]=bd({prop:r,defaultProp:o,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(A_))):u.onClose(),null==i||i(e)}}),w=g.useMemo((()=>v?y.current?"delayed-open":"instant-open":"closed"),[v]),A=g.useCallback((()=>{window.clearTimeout(p.current),y.current=!1,b(!0)}),[b]),x=g.useCallback((()=>{window.clearTimeout(p.current),b(!1)}),[b]),S=g.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{y.current=!0,b(!0)}),h)}),[h,b]);return g.useEffect((()=>()=>window.clearTimeout(p.current)),[]),g.createElement(ck,l,g.createElement(TK,{scope:t,contentId:f,open:v,stateAttribute:w,trigger:c,onTriggerChange:d,onTriggerEnter:g.useCallback((()=>{u.isOpenDelayed?S():A()}),[u.isOpenDelayed,S,A]),onTriggerLeave:g.useCallback((()=>{m?x():window.clearTimeout(p.current)}),[x,m]),onOpen:A,onClose:x,disableHoverableContent:m},n))},c2="TooltipTrigger",q3=g.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=rg(c2,n),i=fC(c2,n),a=dC(n),s=zt(t,g.useRef(null),o.onTriggerChange),u=g.useRef(!1),l=g.useRef(!1),c=g.useCallback((()=>u.current=!1),[]);return g.useEffect((()=>()=>document.removeEventListener("pointerup",c)),[c]),g.createElement(GI,Te({asChild:!0},a),g.createElement(ft.button,Te({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:s,onPointerMove:et(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!l.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)})),onPointerLeave:et(e.onPointerLeave,(()=>{o.onTriggerLeave(),l.current=!1})),onPointerDown:et(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:et(e.onFocus,(()=>{u.current||o.onOpen()})),onBlur:et(e.onBlur,o.onClose),onClick:et(e.onClick,o.onClose)})))})),H3="TooltipPortal",[MK,OK]=h0(H3,{forceMount:void 0}),DK=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=rg(H3,t);return g.createElement(MK,{scope:t,forceMount:n},g.createElement(ea,{present:n||i.open},g.createElement(Ly,{asChild:!0,container:o},r)))},Lv="TooltipContent",X3=g.forwardRef(((e,t)=>{const n=OK(Lv,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=rg(Lv,e.__scopeTooltip);return g.createElement(ea,{present:r||a.open},a.disableHoverableContent?g.createElement(Q3,Te({side:o},i,{ref:t})):g.createElement($K,Te({side:o},i,{ref:t})))})),$K=g.forwardRef(((e,t)=>{const n=rg(Lv,e.__scopeTooltip),r=fC(Lv,e.__scopeTooltip),o=g.useRef(null),i=zt(t,o),[a,s]=g.useState(null),{trigger:u,onClose:l}=n,c=o.current,{onPointerInTransitChange:d}=r,f=g.useCallback((()=>{s(null),d(!1)}),[d]),p=g.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=jK([...LK(r,kK(r,n.getBoundingClientRect())),...BK(t.getBoundingClientRect())]);s(o),d(!0)}),[d]);return g.useEffect((()=>()=>f()),[f]),g.useEffect((()=>{if(u&&c){const e=e=>p(e,c),t=e=>p(e,u);return u.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[u,c,p,f]),g.useEffect((()=>{if(a){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.contains(t))||(null==c?void 0:c.contains(t)),o=!VK(n,a);r?f():o&&(f(),l())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,c,a,l,f]),g.createElement(Q3,Te({},e,{ref:i}))})),[NK,Bce]=h0(pC,{isInside:!1}),Q3=g.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,u=rg(Lv,n),l=dC(n),{onClose:c}=u;return g.useEffect((()=>(document.addEventListener(A_,c),()=>document.removeEventListener(A_,c))),[c]),g.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(u.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,c]),g.createElement(ky,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:c},g.createElement(WI,Te({"data-state":u.stateAttribute},l,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),g.createElement(K_,null,r),g.createElement(NK,{scope:n,isInside:!0},g.createElement(xH,{id:u.contentId,role:"tooltip"},o||r))))}));function kK(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function LK(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function BK(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function VK(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,u=t[i].x,l=t[i].y;s>r!=l>r&&n<(u-a)*(r-s)/(l-s)+a&&(o=!o)}return o}function jK(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),FK(t)}function FK(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const zK=W3,UK=q3,GK=DK,K3=X3,WK=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},qK={deviceType:WK(),deviceWidth:window.innerWidth},Y3=Wr({name:"ui",initialState:qK,reducers:{},extraReducers:e=>{e.addCase(Z6,((e,{payload:t})=>{e.deviceType=t})),e.addCase(e4,((e,{payload:t})=>{e.deviceWidth=t}))},selectors:{selectDeviceType:e=>e.deviceType,selectDeviceWidth:e=>e.deviceWidth,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var UA,d2,GA,f2,WA,p2,qA,h2,HA,m2,XA,v2,QA,g2,KA,y2,YA,w2,JA,b2,ZA,x2,eS,A2,tS,S2,nS,_2,rS,I2,oS,C2,iS,E2,aS,P2,sS,R2,uS,T2,lS,M2,cS,O2,dS,D2,fS,$2,pS,N2,hS,k2,mS,L2,vS,B2,gS,V2,yS,j2,wS,F2,bS,z2,xS,U2,AS,G2,SS,W2,_S,q2,IS,H2,CS,X2,ES,Q2,PS,K2,RS,Y2;function J3(){if(d2)return UA;d2=1;var e=P$(),t=e&&new e;return UA=t}function Z3(){if(f2)return GA;f2=1;var e=AI(),t=J3();return GA=t?function(e,n){return t.set(e,n),e}:e}function m0(){if(p2)return WA;p2=1;var e=Jy(),t=Ss();return WA=function(n){return function(){var r=arguments;switch(r.length){case 0:return new n;case 1:return new n(r[0]);case 2:return new n(r[0],r[1]);case 3:return new n(r[0],r[1],r[2]);case 4:return new n(r[0],r[1],r[2],r[3]);case 5:return new n(r[0],r[1],r[2],r[3],r[4]);case 6:return new n(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new n(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=e(n.prototype),i=n.apply(o,r);return t(i)?i:o}},WA}function HK(){if(h2)return qA;h2=1;var e=m0(),t=oi();return qA=function(n,r,o){var i=1&r,a=e(n);return function e(){return(this&&this!==t&&this instanceof e?a:n).apply(i?o:this,arguments)}},qA}function eL(){if(m2)return HA;m2=1;var e=Math.max;return HA=function(t,n,r,o){for(var i=-1,a=t.length,s=r.length,u=-1,l=n.length,c=e(a-s,0),d=Array(l+c),f=!o;++u<l;)d[u]=n[u];for(;++i<s;)(f||i<a)&&(d[r[i]]=t[i]);for(;c--;)d[u++]=t[i++];return d}}function tL(){if(v2)return XA;v2=1;var e=Math.max;return XA=function(t,n,r,o){for(var i=-1,a=t.length,s=-1,u=r.length,l=-1,c=n.length,d=e(a-u,0),f=Array(d+c),p=!o;++i<d;)f[i]=t[i];for(var m=i;++l<c;)f[m+l]=n[l];for(;++s<u;)(p||i<a)&&(f[m+r[s]]=t[i++]);return f}}function XK(){if(g2)return QA;return g2=1,QA=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function hC(){if(y2)return KA;return y2=1,KA=function(){}}function mC(){if(w2)return YA;w2=1;var e=Jy(),t=hC();function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}return n.prototype=e(t.prototype),n.prototype.constructor=n,YA=n}function nL(){if(b2)return JA;b2=1;var e=J3(),t=hF();return JA=e?function(t){return e.get(t)}:t}function QK(){if(x2)return ZA;x2=1;return ZA={}}function KK(){if(A2)return eS;A2=1;var e=QK(),t=Object.prototype.hasOwnProperty;return eS=function(n){for(var r=n.name+"",o=e[r],i=t.call(e,r)?o.length:0;i--;){var a=o[i],s=a.func;if(null==s||s==n)return a.name}return r}}function rL(){if(S2)return tS;S2=1;var e=Jy(),t=hC();function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}return n.prototype=e(t.prototype),n.prototype.constructor=n,tS=n}function YK(){if(_2)return nS;_2=1;var e=mC(),t=rL(),n=Yy();return nS=function(r){if(r instanceof e)return r.clone();var o=new t(r.__wrapped__,r.__chain__);return o.__actions__=n(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}}function JK(){if(I2)return rS;I2=1;var e=mC(),t=rL(),n=hC(),r=_i(),o=ta(),i=YK(),a=Object.prototype.hasOwnProperty;function s(n){if(o(n)&&!r(n)&&!(n instanceof e)){if(n instanceof t)return n;if(a.call(n,"__wrapped__"))return i(n)}return new t(n)}return s.prototype=n.prototype,s.prototype.constructor=s,rS=s}function ZK(){if(C2)return oS;C2=1;var e=mC(),t=nL(),n=KK(),r=JK();return oS=function(o){var i=n(o),a=r[i];if("function"!=typeof a||!(i in e.prototype))return!1;if(o===a)return!0;var s=t(a);return!!s&&o===s[0]}}function oL(){if(E2)return iS;E2=1;var e=Z3(),t=D$()(e);return iS=t}function eY(){if(P2)return aS;P2=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return aS=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function tY(){if(R2)return sS;R2=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return sS=function(t,n){var r=n.length;if(!r)return t;var o=r-1;return n[o]=(r>1?"& ":"")+n[o],n=n.join(r>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+n+"] */\n")}}function nY(){if(T2)return uS;T2=1;var e=II(),t=pF(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return uS=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function iL(){if(M2)return lS;M2=1;var e=eY(),t=tY(),n=$$(),r=nY();return lS=function(o,i,a){var s=i+"";return n(o,t(s,r(e(s),a)))}}function aL(){if(O2)return cS;O2=1;var e=ZK(),t=oL(),n=iL();return cS=function(r,o,i,a,s,u,l,c,d,f){var p=8&o;o|=p?32:64,4&(o&=~(p?64:32))||(o&=-4);var m=[r,o,s,p?u:void 0,p?l:void 0,p?void 0:u,p?void 0:l,c,d,f],h=i.apply(void 0,m);return e(r)&&t(h,m),h.placeholder=a,n(h,r,o)}}function sL(){if(D2)return dS;return D2=1,dS=function(e){return e.placeholder}}function rY(){if($2)return fS;$2=1;var e=Yy(),t=gI(),n=Math.min;return fS=function(r,o){for(var i=r.length,a=n(o.length,i),s=e(r);a--;){var u=o[a];r[a]=t(u,i)?s[u]:void 0}return r}}function vC(){if(N2)return pS;N2=1;var e="__lodash_placeholder__";return pS=function(t,n){for(var r=-1,o=t.length,i=0,a=[];++r<o;){var s=t[r];(s===n||s===e)&&(t[r]=e,a[i++]=r)}return a}}function uL(){if(k2)return hS;k2=1;var e=eL(),t=tL(),n=XK(),r=m0(),o=aL(),i=sL(),a=rY(),s=vC(),u=oi();return hS=function l(c,d,f,p,m,h,g,y,v,b){var w=128&d,A=1&d,x=2&d,S=24&d,I=512&d,E=x?void 0:r(c);return function C(){for(var P=arguments.length,k=Array(P),_=P;_--;)k[_]=arguments[_];if(S)var T=i(C),M=n(k,T);if(p&&(k=e(k,p,m,S)),h&&(k=t(k,h,g,S)),P-=M,S&&P<b){var O=s(k,T);return o(c,d,l,C.placeholder,f,k,O,y,v,b-P)}var R=A?f:this,N=x?R[c]:c;return P=k.length,y?k=a(k,y):I&&P>1&&k.reverse(),w&&v<P&&(k.length=v),this&&this!==u&&this instanceof C&&(N=E||r(N)),N.apply(R,k)}},hS}function oY(){if(L2)return mS;L2=1;var e=SI(),t=m0(),n=uL(),r=aL(),o=sL(),i=vC(),a=oi();return mS=function(s,u,l){var c=t(s);return function t(){for(var d=arguments.length,f=Array(d),p=d,m=o(t);p--;)f[p]=arguments[p];var h=d<3&&f[0]!==m&&f[d-1]!==m?[]:i(f,m);return(d-=h.length)<l?r(s,u,n,t.placeholder,void 0,f,h,void 0,void 0,l-d):e(this&&this!==a&&this instanceof t?c:s,this,f)}},mS}function iY(){if(B2)return vS;B2=1;var e=SI(),t=m0(),n=oi();return vS=function(r,o,i,a){var s=1&o,u=t(r);return function t(){for(var o=-1,l=arguments.length,c=-1,d=a.length,f=Array(d+l),p=this&&this!==n&&this instanceof t?u:r;++c<d;)f[c]=a[c];for(;l--;)f[c++]=arguments[++o];return e(p,s?i:this,f)}},vS}function aY(){if(V2)return gS;V2=1;var e=eL(),t=tL(),n=vC(),r="__lodash_placeholder__",o=128,i=Math.min;return gS=function(a,s){var u=a[1],l=s[1],c=u|l,d=c<131,f=l==o&&8==u||l==o&&256==u&&a[7].length<=s[8]||384==l&&s[7].length<=s[8]&&8==u;if(!d&&!f)return a;1&l&&(a[2]=s[2],c|=1&u?0:4);var p=s[3];if(p){var m=a[3];a[3]=m?e(m,p,s[4]):p,a[4]=m?n(a[3],r):s[4]}return(p=s[5])&&(m=a[5],a[5]=m?t(m,p,s[6]):p,a[6]=m?n(a[5],r):s[6]),(p=s[7])&&(a[7]=p),l&o&&(a[8]=null==a[8]?s[8]:i(a[8],s[8])),null==a[9]&&(a[9]=s[9]),a[0]=s[0],a[1]=c,a}}function gC(){if(j2)return yS;j2=1;var e=Z3(),t=HK(),n=oY(),r=uL(),o=iY(),i=nL(),a=aY(),s=oL(),u=iL(),l=B$(),c=Math.max;return yS=function(d,f,p,m,h,g,y,v){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=m?m.length:0;if(w||(f&=-97,m=h=void 0),y=void 0===y?y:c(l(y),0),v=void 0===v?v:l(v),w-=h?h.length:0,64&f){var A=m,x=h;m=h=void 0}var S=b?void 0:i(d),I=[d,f,p,m,h,A,x,g,y,v];if(S&&a(I,S),d=I[0],f=I[1],p=I[2],m=I[3],h=I[4],!(v=I[9]=void 0===I[9]?b?0:d.length:c(I[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)E=8==f||16==f?n(d,f,v):32!=f&&33!=f||h.length?r.apply(void 0,I):o(d,f,p,m);else var E=t(d,f,p);return u((S?e:s)(E,I),d,f)}}function sY(){if(F2)return wS;F2=1;var e=gC();return wS=function(t,n,r){return n=r?void 0:n,n=t&&null==n?t.length:n,e(t,128,void 0,void 0,void 0,void 0,n)}}function uY(){if(z2)return bS;z2=1;var e=z$();return bS=function(t){return e(t,4)}}function lY(){if(U2)return xS;U2=1;var e=gC();function t(n,r,o){var i=e(n,8,void 0,void 0,void 0,void 0,void 0,r=o?void 0:r);return i.placeholder=t.placeholder,i}return t.placeholder={},xS=t}function cY(){if(G2)return AS;G2=1;var e=Ml(),t=ta(),n=NF();return AS=function(r){if(!t(r))return!1;var o=e(r);return"[object Error]"==o||"[object DOMException]"==o||"string"==typeof r.message&&"string"==typeof r.name&&!n(r)}}function dY(){if(W2)return SS;W2=1;var e=Yv(),t=ta();return SS=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function fY(){if(q2)return _S;q2=1;var e=z$(),t=uF();return _S=function(n){return t("function"==typeof n?n:e(n,1))}}function pY(){if(H2)return IS;H2=1;var e=gC(),t=nz(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return IS=n}function hY(){if(X2)return CS;X2=1;var e=f$(),t=Yy(),n=_i(),r=Qv(),o=d$(),i=Kv(),a=p$();return CS=function(s){return n(s)?e(s,i):r(s)?[s]:t(o(a(s)))}}function mY(){return Q2||(Q2=1,ES={ary:sY(),assign:j$(),clone:uY(),curry:lY(),forEach:II(),isArray:_i(),isError:cY(),isFunction:Gy(),isWeakMap:dY(),iteratee:fY(),keys:I$(),rearg:pY(),toInteger:B$(),toPath:hY()}),ES}function vY(){if(K2)return PS;K2=1;var e=iD(),t=mY();return PS=function(n,r,o){return e(t,n,r,o)}}function gY(){if(Y2)return RS;Y2=1;var e=vY()("debounce",k$());return e.placeholder=oD(),RS=e}gY();const lL=()=>Na(Y3.selectors.selectIsMobile);function J2({className:e,...t}){return z.jsx("div",{className:ye("animate-pulse rounded-md bg-muted",e),...t})}const yY="sidebar_state",wY=604800,bY="12rem",xY="18rem",AY="2rem",SY="b",cL=g.createContext(null);function v0(){const e=g.useContext(cL);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const _Y=g.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...a},s)=>{const u=lL(),[l,c]=g.useState(!1),[d,f]=g.useState(e),p=t??d,m=g.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):f(t),document.cookie=`${yY}=${t}; path=/; max-age=${wY}`}),[n,p]),h=g.useCallback((()=>u?c((e=>!e)):m((e=>!e))),[u,m,c]);g.useEffect((()=>{const e=e=>{e.key===SY&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[h]);const y=p?"expanded":"collapsed",v=g.useMemo((()=>({state:y,open:p,setOpen:m,isMobile:u,openMobile:l,setOpenMobile:c,toggleSidebar:h})),[y,p,m,u,l,c,h]);return z.jsx(cL.Provider,{value:v,children:z.jsx(RK,{delayDuration:0,children:z.jsx("div",{style:{"--sidebar-width":bY,"--sidebar-width-icon":AY,...o},className:ye("group/sidebar-wrapper flex min-h-svh w-full bg-gray-100 has-[[data-variant=inset]]:bg-sidebar",r),ref:s,...a,children:i})})})}));_Y.displayName="SidebarProvider";const IY=g.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...i},a)=>{const{isMobile:s,state:u,openMobile:l,setOpenMobile:c}=v0();return"none"===n?z.jsx("div",{className:ye("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:a,...i,children:o}):s?z.jsx(SK,{open:l,onOpenChange:c,children:z.jsxs(F3,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":xY},side:e,children:[z.jsxs(z3,{className:"sr-only",children:[z.jsx(U3,{children:"Sidebar"}),z.jsx(G3,{children:"Displays the mobile sidebar."})]}),z.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):z.jsxs("div",{ref:a,className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":"collapsed"===u?n:"","data-variant":t,"data-side":e,children:[z.jsx("div",{className:ye("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),z.jsx("div",{className:ye("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:z.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-sm group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})}));IY.displayName="Sidebar";const CY=g.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:i}=v0();return z.jsx(pd,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:ye("size-6 text-gray-900",e),onClick:e=>{null==t||t(e),o()},...n,children:i?z.jsx(u8,{size:16}):z.jsx(a8,{size:16})})}));CY.displayName="SidebarTrigger";const EY=g.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=v0();return z.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:ye("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}));EY.displayName="SidebarRail";const PY=g.forwardRef((({className:e,...t},n)=>z.jsx("main",{ref:n,className:ye("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-m md:peer-data-[variant=inset]:shadow",e),...t})));PY.displayName="SidebarInset";const RY=g.forwardRef((({className:e,...t},n)=>z.jsx(I3,{ref:n,"data-sidebar":"input",className:ye("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));RY.displayName="SidebarInput";const TY=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{ref:n,"data-sidebar":"header",className:ye("flex flex-col gap-xxs p-xs",e),...t})));TY.displayName="SidebarHeader";const MY=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{ref:n,"data-sidebar":"footer",className:ye("flex flex-col gap-2 p-2",e),...t})));MY.displayName="SidebarFooter";const OY=g.forwardRef((({className:e,...t},n)=>z.jsx(ZI,{ref:n,"data-sidebar":"separator",className:ye("mx-2 w-auto bg-sidebar-border",e),...t})));OY.displayName="SidebarSeparator";const DY=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{ref:n,"data-sidebar":"content",className:ye("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));DY.displayName="SidebarContent";const $Y=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{ref:n,"data-sidebar":"group",className:ye("relative flex w-full min-w-0 flex-col pt-xs",e),...t})));$Y.displayName="SidebarGroup";const NY=g.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?Cd:"div";return z.jsx(o,{ref:r,"data-sidebar":"group-label",className:ye("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-gray-700 opacity-60 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-xl group-data-[collapsible=icon]:opacity-0",e),...n})}));NY.displayName="SidebarGroupLabel";const kY=g.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?Cd:"button";return z.jsx(o,{ref:r,"data-sidebar":"group-action",className:ye("absolute right-xs top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})}));kY.displayName="SidebarGroupAction";const LY=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{ref:n,"data-sidebar":"group-content",className:ye("w-full text-sm",e),...t})));LY.displayName="SidebarGroupContent";const BY=g.forwardRef((({className:e,...t},n)=>z.jsx("ul",{ref:n,"data-sidebar":"menu",className:ye("flex w-full min-w-0 flex-col p-xs font-semibold text-gray-700 [&_svg]:size-4",e),...t})));BY.displayName="SidebarMenu";const VY=g.forwardRef((({className:e,...t},n)=>z.jsx("li",{ref:n,"data-sidebar":"menu-item",className:ye("group/menu-item relative",e),...t})));VY.displayName="SidebarMenuItem";const jY=xu("peer/menu-button flex w-full items-center gap-xxs overflow-hidden rounded-sm p-xxs text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:text-blue_100 hover:bg-white focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-white data-[active=true]:font-medium data-[active=true]:text-blue_100 data-[state=open]:hover:bg-white data-[state=open]:hover:text-blue_100 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:text-blue_100 hover:bg-white",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-white hover:text-blue_100 hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-s text-sm",sm:"h-m text-xs",lg:"h-l text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),FY=g.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...a},s)=>{const u=e?Cd:"button",{isMobile:l,state:c}=v0(),d=z.jsx(u,{ref:s,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:ye(jY({variant:n,size:r}),i),...a});return o?("string"==typeof o&&(o={children:o}),z.jsxs(W3,{children:[z.jsx(q3,{asChild:!0,children:d}),z.jsx(X3,{side:"right",align:"center",hidden:"collapsed"!==c||l,...o})]})):d}));FY.displayName="SidebarMenuButton";const zY=g.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const i=t?Cd:"button";return z.jsx(i,{ref:o,"data-sidebar":"menu-action",className:ye("absolute right-xxxs top-xxs flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})}));zY.displayName="SidebarMenuAction";const UY=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:ye("pointer-events-none absolute right-xxxs flex h-m min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",e),...t})));UY.displayName="SidebarMenuBadge";const GY=g.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=g.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return z.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:ye("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&z.jsx(J2,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),z.jsx(J2,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));GY.displayName="SidebarMenuSkeleton";const WY=g.forwardRef((({className:e,...t},n)=>z.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:ye("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));WY.displayName="SidebarMenuSub";const qY=g.forwardRef((({...e},t)=>z.jsx("li",{ref:t,...e})));qY.displayName="SidebarMenuSubItem";const HY=g.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},i)=>{const a=e?Cd:"a";return z.jsx(a,{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:ye("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-gray-700 outline-none ring-sidebar-ring hover:bg-white hover:text-blue_100 focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-blue_100","data-[active=true]:bg-white data-[active=true]:text-blue_100","sm"===t&&"text-xs","md"===t&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}));HY.displayName="SidebarMenuSubButton";const dL="Switch",[XY,Vce]=ri(dL),[QY,KY]=XY(dL),YY=g.forwardRef(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:u="on",onCheckedChange:l,...c}=e,[d,f]=g.useState(null),p=zt(t,(e=>f(e))),m=g.useRef(!1),h=!d||!!d.closest("form"),[y=!1,v]=bd({prop:o,defaultProp:i,onChange:l});return g.createElement(QY,{scope:n,checked:y,disabled:s},g.createElement(ft.button,Te({type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":fL(y),"data-disabled":s?"":void 0,disabled:s,value:u},c,{ref:p,onClick:et(e.onClick,(e=>{v((e=>!e)),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&g.createElement(eJ,{control:d,bubbles:!m.current,name:r,value:u,checked:y,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))})),JY="SwitchThumb",ZY=g.forwardRef(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=KY(JY,n);return g.createElement(ft.span,Te({"data-state":fL(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),eJ=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=g.useRef(null),a=Zy(n),s=e0(t);return g.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[a,n,r]),g.createElement("input",Te({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function fL(e){return e?"checked":"unchecked"}const pL=YY,tJ=ZY,nJ=g.forwardRef((({className:e,...t},n)=>z.jsx(pL,{className:ye("group peer inline-flex h-xs w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:bg-blue_100 data-[state=unchecked]:bg-gray-200","disabled:cursor-not-allowed disabled:!bg-gray-100 md:hover:data-[state=checked]:bg-blue_120 md:hover:data-[state=unchecked]:!bg-gray-300",e),...t,ref:n,children:z.jsx(tJ,{className:ye("pointer-events-none block size-xxs rounded-full bg-background shadow-lg ring-0 transition-[transform,width] data-[state=checked]:translate-x-[20px] data-[state=unchecked]:translate-x-0",{"md:group-hover:w-[26px] md:group-hover:data-[state=checked]:translate-x-[14px]":!t.disabled,"bg-gray-300":t.disabled})})})));nJ.displayName=pL.displayName;const Z2={forgotPasswordStep:"request",forgotPasswordFields:null,signupStep:"rules",signupFields:null,token:null,newEmail:null,isPending:!!B_.getToken(),isAuthenticated:!1,isAskLoginOpen:!1},rJ=Wr({name:"auth",initialState:Z2,reducers:{setAskLoginOpen:(e,t)=>{e.isAskLoginOpen=t.payload},login:(e,t)=>{e.isAuthenticated=!0,e.token=t.payload||null,e.isPending=!1},logout:()=>({...Z2,isPending:!1}),setNewEmail:(e,t)=>{e.newEmail=t.payload},setForgotPasswordStep:(e,t)=>{e.forgotPasswordStep=t.payload},updateForgotPasswordFields:(e,t)=>{e.forgotPasswordFields={...e.forgotPasswordFields,...t.payload}},resetForgotPasswordFields:e=>{e.forgotPasswordFields=null},setSignupStep:(e,t)=>{e.signupStep=t.payload},updateSignupFields:(e,t)=>{e.signupFields={...e.signupFields,...t.payload}},resetSignupFields:e=>{e.signupFields=null},setPending:(e,t)=>{e.isPending=t.payload}},selectors:{selectAskLoginOpen:e=>e.isAskLoginOpen,selectToken:e=>e.token,selectNewEmail:e=>e.newEmail,selectForgotPasswordStep:e=>e.forgotPasswordStep,selectForgotPasswordFields:e=>e.forgotPasswordFields,selectSignupStep:e=>e.signupStep,selectSignupFields:e=>e.signupFields,selectPending:e=>e.isPending,selectIsAuthenticated:e=>e.isAuthenticated}}),oJ={data:null,isPending:!1,isSuccess:!1},iJ=Wr({name:"userNoHTML",initialState:oJ,reducers:{setUser:(e,t)=>{e.data=t.payload},setPending:(e,t)=>{e.isPending=t.payload},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setError:(e,{payload:t})=>{e.error=t}},selectors:{selectUser:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),eO={data:null,isError:!1,isPending:!1,isSuccess:!1},aJ=Wr({name:"user",initialState:eO,reducers:{reset:e=>{Object.assign(e,eO)}},extraReducers:e=>{e.addCase(i4,((e,{payload:t})=>{e.data=t})).addCase(a4,((e,{payload:t})=>{e.data&&Object.assign(e.data,t||{})})).addCase(o4,((e,{payload:t})=>{e.isSuccess=t})).addCase(r4,((e,{payload:t})=>{e.isPending=t})).addCase(n4,((e,{payload:t})=>{e.isError=t})).addCase(t4,((e,{payload:t})=>{e.error=t})).addCase(s4,((e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}))},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectAccountId:e=>{var t;return null==(t=e.data)?void 0:t.account.id},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess}});var mO;const sJ={value:(null==(mO=G_())?void 0:mO.initialState)??null},uJ=Wr({name:"initialState",initialState:sJ,reducers:{setInitialState:(e,t)=>{e.value=t.payload},clearInitialState:e=>{e.value=null}},selectors:{selectInitialState:e=>e.value}}),yC=e=>e,g0=Zn(yC,(e=>e.data)),lJ=Zn(yC,(e=>e.error)),cJ=Zn(yC,(e=>e.isPending)),dJ=Zn(g0,(e=>null==e?void 0:e.rules)),fJ=Zn(g0,(e=>null==e?void 0:e.contact_account)),pJ=Zn(g0,(e=>(null==e?void 0:e.stats)&&Object.fromEntries(Object.entries(e.stats).map((([e,t])=>[e,t??0]))))),hJ={data:null,isPending:!1},mJ=Wr({name:"instanceInfo",initialState:hJ,reducers:{},extraReducers:e=>{e.addCase(y4,((e,{payload:t})=>{e.data=t})).addCase(w4,((e,{payload:t})=>{e.isPending=t})).addCase(b4,((e,{payload:t})=>{e.error=t}))},selectors:{selectInstanceInfo:g0,selectInstanceInfoError:lJ,selectInstanceInfoPending:cJ,selectPlatformRules:dJ,selectInstanceContacts:fJ,selectInstanceStats:pJ,selectDescription:e=>{var t;return null==(t=e.data)?void 0:t.description},selectStats:e=>{var t;return null==(t=e.data)?void 0:t.stats},selectRegistrations:e=>{var t;return null==(t=e.data)?void 0:t.configuration.registrations}}}),vJ={data:null,isPending:!1,isSuccess:!1},gJ=Wr({name:"profileSettings",initialState:vJ,reducers:{setPending:(e,t)=>{e.isPending=t.payload},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setError:(e,{payload:t})=>{e.error=t}},extraReducers:e=>{e.addCase(A4,((e,{payload:t})=>{e.data=t}))},selectors:{selectProfileSettings:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),yJ={sms:"wellesley.admin.sms",openai:"wellesley.admin.openai",uploads:"wellesley.admin.uploads",captcha:"wellesley.admin.captcha",language:"wellesley.admin.language",mediacache:"wellesley.admin.mediacache",translation:"wellesley.admin.translation",link_service:"wellesley.admin.link_service"},S_={posts:"wellesley.posts",translation:"wellesley.translation",registration:"wellesley.registration",confirmationCode:"wellesley.confirmationCode",uploadsPolicyDoc:"wellesley.uploads.policy.doc",uploadsPolicyAudio:"wellesley.uploads.policy.audio",uploadsPolicyImage:"wellesley.uploads.policy.image",uploadsPolicyVideo:"wellesley.uploads.policy.video",captcha:"wellesley.captcha",access:"wellesley.access",branding:"wellesley.branding",instanceAdmin:"wellesley.instance.admin",legal:"wellesley.instance.legal",domainBlocks:"wellesley.instance.domainBlocks",contacts:"wellesley.instance.contacts"},vu=e=>(null==e?void 0:e.map((e=>e.value||e)))||[],wJ={data:null,isPending:!1},{posts:TS,uploadsPolicyDoc:tO,uploadsPolicyAudio:MS,uploadsPolicyImage:ty,uploadsPolicyVideo:ov,registration:hL,captcha:bJ,instanceAdmin:xJ,branding:AJ,translation:SJ,domainBlocks:_J,access:IJ}=S_,{captcha:CJ,language:EJ,translation:PJ,openai:RJ,link_service:TJ}=yJ,hp=e=>e.data,MJ=Zn(hp,(e=>{var t,n,r;return{max_characters:(null==(t=null==e?void 0:e[TS])?void 0:t.max_characters)||0,max_media_attachments:(null==(n=null==e?void 0:e[TS])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==e?void 0:e[TS])?void 0:r.max_pins)||0}})),wC=Zn(hp,(e=>{var t,n,r;return{...null==e?void 0:e[ty],maxSize:(null==(t=null==e?void 0:e[ty])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[ty])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==e?void 0:e[ty])?void 0:r.maxResolution)||0}})),OJ=Zn(wC,(e=>vu(e.extensions))),bC=Zn(hp,(e=>{var t,n,r,o;return{...null==e?void 0:e[ov],maxSize:(null==(t=null==e?void 0:e[ov])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[ov])?void 0:n.maxMatrix)||0,maxDuration:(null==(r=null==e?void 0:e[ov])?void 0:r.maxDuration)||0,maxResolution:(null==(o=null==e?void 0:e[ov])?void 0:o.maxResolution)||0}})),DJ=Zn(bC,(e=>vu(e.extensions))),mL=Zn(hp,(e=>{var t,n;return{...null==e?void 0:e[MS],maxSize:null==(t=null==e?void 0:e[MS])?void 0:t.maxSize,keepOriginal:(null==(n=null==e?void 0:e[MS])?void 0:n.keepOriginal)||0}})),vL=Zn(hp,(e=>{var t;return{...null==e?void 0:e[tO],maxSize:(null==(t=null==e?void 0:e[tO])?void 0:t.maxSize)||0}})),gL=Zn([wC,bC,mL,vL],((e,t,n,r)=>({IMAGE:vu(null==e?void 0:e.extensions),VIDEO:vu(null==t?void 0:t.extensions),AUDIO:vu(null==n?void 0:n.extensions),DOCUMENT:vu(null==r?void 0:r.extensions)}))),$J=Zn(gL,(e=>Object.keys(e).reduce(((t,n)=>[...t,...e[n]||[]]),[]))),NJ=Zn(hp,(e=>{var t;return null==(t=null==e?void 0:e[hL])?void 0:t.invites})),Il=Wr({name:"platformSettings",initialState:wJ,reducers:{setError:(e,t)=>{e.error=t.payload},setPending:(e,t)=>{e.isPending=t.payload}},extraReducers:e=>{e.addCase(x4,((e,{payload:t})=>{e.data={...e.data,...t}}))},selectors:{selectSettings:hp,selectPostConfig:MJ,selectDocPolicy:vL,selectImagePolicy:wC,selectVideoPolicy:bC,selectAudioPolicy:mL,selectInvitesEnabled:NJ,selectImageExtensions:OJ,selectVideoExtensions:DJ,selectSupportedExtensions:gL,selectFullExtensionsList:$J,selectRegistration:e=>{var t;return null==(t=e.data)?void 0:t[hL]},selectLanguageDetection:e=>{var t;return null==(t=e.data)?void 0:t[EJ]},selectLanguageTranslation:e=>{var t;return null==(t=e.data)?void 0:t[PJ]},selectOpenai:e=>{var t;return null==(t=e.data)?void 0:t[RJ]},selectCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[bJ]},selectAdminCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[CJ]},selectPlatformTranslation:e=>{var t;return null==(t=e.data)?void 0:t[SJ]},selectAccess:e=>{var t;return null==(t=e.data)?void 0:t[IJ]},selectBranding:e=>{var t;return null==(t=e.data)?void 0:t[AJ]},selectLinkService:e=>{var t;return null==(t=e.data)?void 0:t[TJ]},selectInstanceAdmin:e=>{var t;return null==(t=e.data)?void 0:t[xJ]},selectLegal:e=>{var t;return null==(t=e.data)?void 0:t[S_.legal]},selectDomainBlocks:e=>{var t;return null==(t=e.data)?void 0:t[_J]},selectContacts:e=>{var t;return null==(t=e.data)?void 0:t[S_.contacts]}}}),nO={data:{userId:"",list:[]},count:{},isPending:!1},kJ=e=>e,LJ=e=>e.error,BJ=e=>e.isPending,VJ=e=>{var t;return null==(t=e.count)?void 0:t.total},jJ=e=>{var t;return null==(t=e.count)?void 0:t.unread},FJ=e=>e.data.userId,xC=Zn(kJ,(e=>e.data.list)),zJ=Zn(xC,(e=>null==e?void 0:e.filter((e=>"UNREAD"===e.status)))),UJ=Zn(xC,(e=>null==e?void 0:e.at(-1))),GJ=Wr({name:"notifications",initialState:nO,reducers:{updateNotification:(e,t)=>{var n;if(!e.data.list)return;const r=t.payload;e.data.list=null==(n=e.data.list)?void 0:n.map((e=>e.id===r.id?{...e,...r}:e))},readAll:e=>{var t;e.data.list&&(e.data.list=null==(t=e.data.list)?void 0:t.map((e=>({...e,status:"READ"}))))}},extraReducers:e=>{e.addCase(f4,((e,t)=>{e.isPending=t.payload})).addCase(c4,((e,t)=>{e.error=t.payload})).addCase(d4,((e,t)=>{const n=t.payload.userId,r=t.payload.list;e.data={userId:n,list:[...e.data.list||[],...r.filter((t=>{var n;return!(null!=(n=e.data.list)&&n.some((e=>e.id===t.id)))}))]}})).addCase(u4,((e,t)=>{e.count.unread=(e.count.unread||0)+1,e.data.list&&(e.data.list=[t.payload,...e.data.list||[]])})).addCase(l4,((e,t)=>{e.data.list&&(e.data.list=e.data.list.map((e=>e.id===t.payload.id?{...e,status:t.payload.status}:e)))})).addCase(p4,((e,t)=>{e.count.total=t.payload})).addCase(h4,((e,t)=>{e.count.unread=t.payload})).addCase(v4,(()=>nO)).addCase(g4,((e,t)=>{var n,r,o;const i=t.payload;"UNREAD"===(null==(r=null==(n=e.data.list)?void 0:n.find((e=>e.id===i)))?void 0:r.status)&&e.count.unread&&(e.count.unread-=1),e.data.list=(null==(o=e.data.list)?void 0:o.filter((e=>e.id!==i)))||[]})).addCase(m4,(e=>{e.data.list&&(e.data.list=e.data.list.map((e=>"FOLLOW_REQUEST"===e.type?{...e,followResponse:"Accepted"}:e)))}))},selectors:{selectError:LJ,selectIsPending:BJ,selectTotalCount:VJ,selectUnreadCount:jJ,selectNotifications:xC,selectUnreadNotifications:zJ,selectLastNotification:UJ,selectNotificationsOwner:FJ}});function WJ(){return!(typeof navigator<"u"&&"boolean"==typeof navigator.onLine)||navigator.onLine}const qJ={isOnline:WJ()},HJ=Wr({name:"network",initialState:qJ,reducers:{setOnline:(e,{payload:t})=>{e.isOnline=t}},selectors:{selectOnline:e=>e.isOnline}}),AC=j5(W_,HJ,Y3,rJ,aJ,iJ,uJ,mJ,GJ,gJ,Il);zn("app/hydrate");var rO,cv={exports:{}},XJ=cv.exports;
|
|
87
|
+
*/function _j(){if(ZP)return nn;ZP=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),u=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen");function h(e){if("object"==typeof e&&null!==e){var m=e.$$typeof;switch(m){case t:switch(e=e.type){case r:case i:case o:case c:case d:return e;default:switch(e=e&&e.$$typeof){case u:case s:case l:case p:case f:case a:return e;default:return m}}case n:return m}}}return e=Symbol.for("react.module.reference"),nn.ContextConsumer=s,nn.ContextProvider=a,nn.Element=t,nn.ForwardRef=l,nn.Fragment=r,nn.Lazy=p,nn.Memo=f,nn.Portal=n,nn.Profiler=i,nn.StrictMode=o,nn.Suspense=c,nn.SuspenseList=d,nn.isAsyncMode=function(){return!1},nn.isConcurrentMode=function(){return!1},nn.isContextConsumer=function(e){return h(e)===s},nn.isContextProvider=function(e){return h(e)===a},nn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},nn.isForwardRef=function(e){return h(e)===l},nn.isFragment=function(e){return h(e)===r},nn.isLazy=function(e){return h(e)===p},nn.isMemo=function(e){return h(e)===f},nn.isPortal=function(e){return h(e)===n},nn.isProfiler=function(e){return h(e)===i},nn.isStrictMode=function(e){return h(e)===o},nn.isSuspense=function(e){return h(e)===c},nn.isSuspenseList=function(e){return h(e)===d},nn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===i||t===o||t===c||t===d||t===m||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===f||t.$$typeof===a||t.$$typeof===s||t.$$typeof===l||t.$$typeof===e||void 0!==t.getModuleId)},nn.typeOf=h,nn}function Ij(){return eR||(eR=1,gb.exports=_j()),gb.exports}function g$(){if(tR)return yb;tR=1;var e=Ml(),t=ta();return yb=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function Cj(){if(nR)return wb;nR=1;var e=g$();return wb=function(t){return e(t)&&t!=+t}}Ij(),Cj(),g$();var xb,rR,Ab,oR,Sb,iR,_b,aR,Ib,sR,Cb,uR,Eb,lR,Pb,cR,Rb,dR,Tb,fR,Mb,pR,Ob,hR,Db,mR,$b,vR,Nb,gR,kb,yR,Lb,wR,Bb,bR,Vb,xR,jb,AR,Fb,SR,zb,_R,Ub,IR,Gb,CR,Gg=function(e){return Sj(e)&&e.indexOf("%")===e.length-1},Ej=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},bb=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o]};function Pj(){if(rR)return xb;rR=1;var e=Hy();return xb=function(){this.__data__=new e,this.size=0}}function Rj(){if(oR)return Ab;return oR=1,Ab=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function Tj(){if(iR)return Sb;return iR=1,Sb=function(e){return this.__data__.get(e)}}function Mj(){if(aR)return _b;return aR=1,_b=function(e){return this.__data__.has(e)}}function Oj(){if(sR)return Ib;sR=1;var e=Hy(),t=cI(),n=dI();return Ib=function(r,o){var i=this.__data__;if(i instanceof e){var a=i.__data__;if(!t||a.length<199)return a.push([r,o]),this.size=++i.size,this;i=this.__data__=new n(a)}return i.set(r,o),this.size=i.size,this}}function fI(){if(uR)return Cb;uR=1;var e=Hy(),t=Pj(),n=Rj(),r=Tj(),o=Mj(),i=Oj();function a(t){var n=this.__data__=new e(t);this.size=n.size}return a.prototype.clear=t,a.prototype.delete=n,a.prototype.get=r,a.prototype.has=o,a.prototype.set=i,Cb=a}function Dj(){if(lR)return Eb;lR=1;return Eb=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function $j(){if(cR)return Pb;return cR=1,Pb=function(e){return this.__data__.has(e)}}function Nj(){if(dR)return Rb;dR=1;var e=dI(),t=Dj(),n=$j();function r(t){var n=-1,r=null==t?0:t.length;for(this.__data__=new e;++n<r;)this.add(t[n])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,Rb=r}function kj(){if(fR)return Tb;return fR=1,Tb=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}}function Lj(){if(pR)return Mb;return pR=1,Mb=function(e,t){return e.has(t)}}function y$(){if(hR)return Ob;hR=1;var e=Nj(),t=kj(),n=Lj();return Ob=function(r,o,i,a,s,u){var l=1&i,c=r.length,d=o.length;if(c!=d&&!(l&&d>c))return!1;var f=u.get(r),p=u.get(o);if(f&&p)return f==o&&p==r;var m=-1,h=!0,g=2&i?new e:void 0;for(u.set(r,o),u.set(o,r);++m<c;){var y=r[m],v=o[m];if(a)var b=l?a(v,y,m,o,r,u):a(y,v,m,r,o,u);if(void 0!==b){if(b)continue;h=!1;break}if(g){if(!t(o,(function(e,t){if(!n(g,t)&&(y===e||s(y,e,i,a,u)))return g.push(t)}))){h=!1;break}}else if(y!==v&&!s(y,v,i,a,u)){h=!1;break}}return u.delete(r),u.delete(o),h}}function w$(){if(mR)return Db;mR=1;var e=oi().Uint8Array;return Db=e}function Bj(){if(vR)return $b;return vR=1,$b=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function Vj(){if(gR)return Nb;return gR=1,Nb=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function jj(){if(yR)return kb;yR=1;var e=Yh(),t=w$(),n=lI(),r=y$(),o=Bj(),i=Vj(),a=e?e.prototype:void 0,s=a?a.valueOf:void 0;return kb=function(e,a,u,l,c,d,f){switch(u){case"[object DataView]":if(e.byteLength!=a.byteLength||e.byteOffset!=a.byteOffset)return!1;e=e.buffer,a=a.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=a.byteLength||!d(new t(e),new t(a)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+a);case"[object Error]":return e.name==a.name&&e.message==a.message;case"[object RegExp]":case"[object String]":return e==a+"";case"[object Map]":var p=o;case"[object Set]":var m=1&l;if(p||(p=i),e.size!=a.size&&!m)return!1;var h=f.get(e);if(h)return h==a;l|=2,f.set(e,a);var g=r(p(e),p(a),l,c,d,f);return f.delete(e),g;case"[object Symbol]":if(s)return s.call(e)==s.call(a)}return!1}}function pI(){if(wR)return Lb;return wR=1,Lb=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}}function b$(){if(bR)return Bb;bR=1;var e=pI(),t=_i();return Bb=function(n,r,o){var i=r(n);return t(n)?i:e(i,o(n))}}function Fj(){if(xR)return Vb;return xR=1,Vb=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n<r;){var a=e[n];t(a,n,e)&&(i[o++]=a)}return i}}function x$(){if(AR)return jb;return AR=1,jb=function(){return[]}}function hI(){if(SR)return Fb;SR=1;var e=Fj(),t=x$(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Fb=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function zj(){if(_R)return zb;return _R=1,zb=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function Uj(){if(IR)return Ub;IR=1;var e=Ml(),t=ta();return Ub=function(n){return t(n)&&"[object Arguments]"==e(n)}}function mI(){if(CR)return Gb;CR=1;var e=Uj(),t=ta(),n=Object.prototype,r=n.hasOwnProperty,o=n.propertyIsEnumerable,i=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!o.call(e,"callee")};return Gb=i}var Wb,ER,PR,qb,RR,Hb,TR,Xb,MR,Qb,OR,sv={exports:{}};function Gj(){if(ER)return Wb;return ER=1,Wb=function(){return!1}}function vI(){return PR||(PR=1,e=sv,t=sv.exports,n=oi(),r=Gj(),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r,e.exports=s),sv.exports;var e,t,n,r,o,i,a,s}function gI(){if(RR)return qb;RR=1;var e=/^(?:0|[1-9]\d*)$/;return qb=function(t,n){var r=typeof t;return!!(n=n??9007199254740991)&&("number"==r||"symbol"!=r&&e.test(t))&&t>-1&&t%1==0&&t<n}}function yI(){if(TR)return Hb;TR=1;return Hb=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function Wj(){if(MR)return Xb;MR=1;var e=Ml(),t=yI(),n=ta(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Xb=function(o){return n(o)&&t(o.length)&&!!r[e(o)]}}function wI(){if(OR)return Qb;return OR=1,Qb=function(e){return function(t){return e(t)}}}sv.exports;var DR,Kb,$R,Yb,NR,Jb,kR,Zb,LR,ex,BR,tx,VR,nx,jR,rx,FR,ox,zR,ix,UR,ax,GR,sx,WR,ux,qR,lx,HR,cx,XR,dx,QR,fx,KR,px,YR,hx,JR,mx,ZR,vx,eT,gx,tT,yx,nT,wx,rT,bx,oT,xx,iT,Ax,aT,Sx,sT,_x,uT,Ix,lT,Cx,cT,Ex,dT,Px,fT,Rx,pT,Tx,hT,Mx,mT,Ox,vT,Dx,gT,$x,yT,Nx,wT,kx,bT,Lx,xT,Bx,AT,Vx,ST,jx,_T,Fx,IT,zx,CT,Ux,ET,Gx,PT,Wx,RT,qx,TT,Hx,MT,uv={exports:{}};function bI(){return DR||(DR=1,e=uv,t=uv.exports,n=l$(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r&&n.process,a=function(){try{return o&&o.require&&o.require("util").types||i&&i.binding&&i.binding("util")}catch{}}(),e.exports=a),uv.exports;var e,t,n,r,o,i,a}function A$(){if($R)return Kb;$R=1;var e=Wj(),t=wI(),n=bI(),r=n&&n.isTypedArray,o=r?t(r):e;return Kb=o}function S$(){if(NR)return Yb;NR=1;var e=zj(),t=mI(),n=_i(),r=vI(),o=gI(),i=A$(),a=Object.prototype.hasOwnProperty;return Yb=function(s,u){var l=n(s),c=!l&&t(s),d=!l&&!c&&r(s),f=!l&&!c&&!d&&i(s),p=l||c||d||f,m=p?e(s.length,String):[],h=m.length;for(var g in s)(u||a.call(s,g))&&(!p||!("length"==g||d&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||o(g,h)))&&m.push(g);return m}}function xI(){if(kR)return Jb;kR=1;var e=Object.prototype;return Jb=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function _$(){if(LR)return Zb;return LR=1,Zb=function(e,t){return function(n){return e(t(n))}}}function qj(){if(BR)return ex;BR=1;var e=_$()(Object.keys,Object);return ex=e}function I$(){if(VR)return tx;VR=1;var e=xI(),t=qj(),n=Object.prototype.hasOwnProperty;return tx=function(r){if(!e(r))return t(r);var o=[];for(var i in Object(r))n.call(r,i)&&"constructor"!=i&&o.push(i);return o}}function C$(){if(jR)return nx;jR=1;var e=Gy(),t=yI();return nx=function(n){return null!=n&&t(n.length)&&!e(n)}}function Qy(){if(FR)return rx;FR=1;var e=S$(),t=I$(),n=C$();return rx=function(r){return n(r)?e(r):t(r)}}function E$(){if(zR)return ox;zR=1;var e=b$(),t=hI(),n=Qy();return ox=function(r){return e(r,n,t)}}function Hj(){if(UR)return ix;UR=1;var e=E$(),t=Object.prototype.hasOwnProperty;return ix=function(n,r,o,i,a,s){var u=1&o,l=e(n),c=l.length;if(c!=e(r).length&&!u)return!1;for(var d=c;d--;){var f=l[d];if(!(u?f in r:t.call(r,f)))return!1}var p=s.get(n),m=s.get(r);if(p&&m)return p==r&&m==n;var h=!0;s.set(n,r),s.set(r,n);for(var g=u;++d<c;){var y=n[f=l[d]],v=r[f];if(i)var b=u?i(v,y,f,r,n,s):i(y,v,f,n,r,s);if(!(void 0===b?y===v||a(y,v,o,i,s):b)){h=!1;break}g||(g="constructor"==f)}if(h&&!g){var w=n.constructor,A=r.constructor;w!=A&&"constructor"in n&&"constructor"in r&&!("function"==typeof w&&w instanceof w&&"function"==typeof A&&A instanceof A)&&(h=!1)}return s.delete(n),s.delete(r),h}}function Xj(){if(GR)return ax;GR=1;var e=sp()(oi(),"DataView");return ax=e}function Qj(){if(WR)return sx;WR=1;var e=sp()(oi(),"Promise");return sx=e}function Kj(){if(qR)return ux;qR=1;var e=sp()(oi(),"Set");return ux=e}function P$(){if(HR)return lx;HR=1;var e=sp()(oi(),"WeakMap");return lx=e}function Yv(){if(XR)return cx;XR=1;var e=Xj(),t=cI(),n=Qj(),r=Kj(),o=P$(),i=Ml(),a=c$(),s="[object Map]",u="[object Promise]",l="[object Set]",c="[object WeakMap]",d="[object DataView]",f=a(e),p=a(t),m=a(n),h=a(r),g=a(o),y=i;return(e&&y(new e(new ArrayBuffer(1)))!=d||t&&y(new t)!=s||n&&y(n.resolve())!=u||r&&y(new r)!=l||o&&y(new o)!=c)&&(y=function(e){var t=i(e),n="[object Object]"==t?e.constructor:void 0,r=n?a(n):"";if(r)switch(r){case f:return d;case p:return s;case m:return u;case h:return l;case g:return c}return t}),cx=y}function Yj(){if(QR)return dx;QR=1;var e=fI(),t=y$(),n=jj(),r=Hj(),o=Yv(),i=_i(),a=vI(),s=A$(),u="[object Arguments]",l="[object Array]",c="[object Object]",d=Object.prototype.hasOwnProperty;return dx=function(f,p,m,h,g,y){var v=i(f),b=i(p),w=v?l:o(f),A=b?l:o(p),x=(w=w==u?c:w)==c,S=(A=A==u?c:A)==c,I=w==A;if(I&&a(f)){if(!a(p))return!1;v=!0,x=!1}if(I&&!x)return y||(y=new e),v||s(f)?t(f,p,m,h,g,y):n(f,p,w,m,h,g,y);if(!(1&m)){var E=x&&d.call(f,"__wrapped__"),C=S&&d.call(p,"__wrapped__");if(E||C){var P=E?f.value():f,k=C?p.value():p;return y||(y=new e),g(P,k,m,h,y)}}return!!I&&(y||(y=new e),r(f,p,m,h,g,y))}}function R$(){if(KR)return fx;KR=1;var e=Yj(),t=ta();return fx=function n(r,o,i,a,s){return r===o||(null==r||null==o||!t(r)&&!t(o)?r!=r&&o!=o:e(r,o,i,a,n,s))},fx}function Jj(){if(YR)return px;YR=1;var e=fI(),t=R$();return px=function(n,r,o,i){var a=o.length,s=a,u=!i;if(null==n)return!s;for(n=Object(n);a--;){var l=o[a];if(u&&l[2]?l[1]!==n[l[0]]:!(l[0]in n))return!1}for(;++a<s;){var c=(l=o[a])[0],d=n[c],f=l[1];if(u&&l[2]){if(void 0===d&&!(c in n))return!1}else{var p=new e;if(i)var m=i(d,f,c,n,r,p);if(!(void 0===m?t(f,d,3,i,p):m))return!1}}return!0}}function T$(){if(JR)return hx;JR=1;var e=Ss();return hx=function(t){return t==t&&!e(t)}}function Zj(){if(ZR)return mx;ZR=1;var e=T$(),t=Qy();return mx=function(n){for(var r=t(n),o=r.length;o--;){var i=r[o],a=n[i];r[o]=[i,a,e(a)]}return r}}function M$(){if(eT)return vx;return eT=1,vx=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function eF(){if(tT)return gx;tT=1;var e=Jj(),t=Zj(),n=M$();return gx=function(r){var o=t(r);return 1==o.length&&o[0][2]?n(o[0][0],o[0][1]):function(t){return t===r||e(t,r,o)}}}function tF(){if(nT)return yx;return nT=1,yx=function(e,t){return null!=e&&t in Object(e)}}function nF(){if(rT)return wx;rT=1;var e=h$(),t=mI(),n=_i(),r=gI(),o=yI(),i=Kv();return wx=function(a,s,u){for(var l=-1,c=(s=e(s,a)).length,d=!1;++l<c;){var f=i(s[l]);if(!(d=null!=a&&u(a,f)))break;a=a[f]}return d||++l!=c?d:!!(c=null==a?0:a.length)&&o(c)&&r(f,c)&&(n(a)||t(a))}}function rF(){if(oT)return bx;oT=1;var e=tF(),t=nF();return bx=function(n,r){return null!=n&&t(n,r,e)}}function oF(){if(iT)return xx;iT=1;var e=R$(),t=v$(),n=rF(),r=uI(),o=T$(),i=M$(),a=Kv();return xx=function(s,u){return r(s)&&o(u)?i(a(s),u):function(r){var o=t(r,s);return void 0===o&&o===u?n(r,s):e(u,o,3)}}}function AI(){if(aT)return Ax;return aT=1,Ax=function(e){return e}}function iF(){if(sT)return Sx;return sT=1,Sx=function(e){return function(t){return null==t?void 0:t[e]}}}function aF(){if(uT)return _x;uT=1;var e=m$();return _x=function(t){return function(n){return e(n,t)}}}function sF(){if(lT)return Ix;lT=1;var e=iF(),t=aF(),n=uI(),r=Kv();return Ix=function(o){return n(o)?e(r(o)):t(o)}}function uF(){if(cT)return Cx;cT=1;var e=eF(),t=oF(),n=AI(),r=_i(),o=sF();return Cx=function(i){return"function"==typeof i?i:null==i?n:"object"==typeof i?r(i)?t(i[0],i[1]):e(i):o(i)}}function lF(){if(dT)return Ex;return dT=1,Ex=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i<o;)if(t(e[i],i,e))return i;return-1}}function cF(){if(fT)return Px;return fT=1,Px=function(e){return e!=e}}function dF(){if(pT)return Rx;return pT=1,Rx=function(e,t,n){for(var r=n-1,o=e.length;++r<o;)if(e[r]===t)return r;return-1}}function fF(){if(hT)return Tx;hT=1;var e=lF(),t=cF(),n=dF();return Tx=function(r,o,i){return o==o?n(r,o,i):e(r,t,i)}}function pF(){if(mT)return Mx;mT=1;var e=fF();return Mx=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function hF(){if(vT)return Ox;return vT=1,Ox=function(){}}function mF(){if(gT)return Dx;gT=1;var e=Yh(),t=mI(),n=_i(),r=e?e.isConcatSpreadable:void 0;return Dx=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function vF(){if(yT)return $x;yT=1;var e=pI(),t=mF();return $x=function n(r,o,i,a,s){var u=-1,l=r.length;for(i||(i=t),s||(s=[]);++u<l;){var c=r[u];o>0&&i(c)?o>1?n(c,o-1,i,a,s):e(s,c):a||(s[s.length]=c)}return s},$x}function SI(){if(wT)return Nx;return wT=1,Nx=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}}function gF(){if(bT)return kx;bT=1;var e=SI(),t=Math.max;return kx=function(n,r,o){return r=t(void 0===r?n.length-1:r,0),function(){for(var i=arguments,a=-1,s=t(i.length-r,0),u=Array(s);++a<s;)u[a]=i[r+a];a=-1;for(var l=Array(r+1);++a<r;)l[a]=i[a];return l[r]=o(u),e(n,this,l)}},kx}function yF(){if(xT)return Lx;return xT=1,Lx=function(e){return function(){return e}}}function O$(){if(AT)return Bx;AT=1;var e=sp(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return Bx=t}function wF(){if(ST)return Vx;ST=1;var e=yF(),t=O$(),n=AI();return Vx=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function D$(){if(_T)return jx;_T=1;var e=Date.now;return jx=function(t){var n=0,r=0;return function(){var o=e(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},jx}function $$(){if(IT)return Fx;IT=1;var e=wF(),t=D$()(e);return Fx=t}function bF(){if(CT)return zx;CT=1;var e=oi();return zx=function(){return e.Date.now()}}function xF(){if(ET)return Ux;ET=1;var e=/\s/;return Ux=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function AF(){if(PT)return Gx;PT=1;var e=xF(),t=/^\s+/;return Gx=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function N$(){if(RT)return Wx;RT=1;var e=AF(),t=Ss(),n=Qv(),r=/^[-+]0x[0-9a-f]+$/i,o=/^0b[01]+$/i,i=/^0o[0-7]+$/i,a=parseInt;return Wx=function(s){if("number"==typeof s)return s;if(n(s))return NaN;if(t(s)){var u="function"==typeof s.valueOf?s.valueOf():s;s=t(u)?u+"":u}if("string"!=typeof s)return 0===s?s:+s;s=e(s);var l=o.test(s);return l||i.test(s)?a(s.slice(2),l?2:8):r.test(s)?NaN:+s}}function k$(){if(TT)return qx;TT=1;var e=Ss(),t=bF(),n=N$(),r=Math.max,o=Math.min;return qx=function(i,a,s){var u,l,c,d,f,p,m=0,h=!1,g=!1,y=!0;if("function"!=typeof i)throw new TypeError("Expected a function");function v(e){var t=u,n=l;return u=l=void 0,m=e,d=i.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=a||t<0||g&&e-m>=c}function w(){var e=t();if(b(e))return A(e);f=setTimeout(w,function(e){var t=a-(e-p);return g?o(t,c-(e-m)):t}(e))}function A(e){return f=void 0,y&&u?v(e):(u=l=void 0,d)}function x(){var e=t(),n=b(e);if(u=arguments,l=this,p=e,n){if(void 0===f)return function(e){return m=e,f=setTimeout(w,a),h?v(e):d}(p);if(g)return clearTimeout(f),f=setTimeout(w,a),v(p)}return void 0===f&&(f=setTimeout(w,a)),d}return a=n(a)||0,e(s)&&(h=!!s.leading,c=(g="maxWait"in s)?r(n(s.maxWait)||0,a):c,y="trailing"in s?!!s.trailing:y),x.cancel=function(){void 0!==f&&clearTimeout(f),m=0,u=p=l=f=void 0},x.flush=function(){return void 0===f?d:A(t())},x},qx}function SF(){if(MT)return Hx;MT=1;var e=k$(),t=Ss();return Hx=function(n,r,o){var i=!0,a=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(o)&&(i="leading"in o?!!o.leading:i,a="trailing"in o?!!o.trailing:a),e(n,r,{leading:i,maxWait:r,trailing:a})}}uv.exports;var _F=SF();const IF=My(_F);function Tv(e){return(Tv="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function OT(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 Wg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?OT(Object(n),!0).forEach((function(t){CF(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):OT(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function CF(e,t,n){return(t=EF(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function EF(e){var t=PF(e,"string");return"symbol"==Tv(t)?t:t+""}function PF(e,t){if("object"!=Tv(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=Tv(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function RF(e,t){return DF(e)||OF(e,t)||MF(e,t)||TF()}function TF(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function MF(e,t){if(e){if("string"==typeof e)return DT(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if("Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return DT(e,t)}}function DT(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function OF(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],u=!0,l=!1;try{if(i=(n=n.call(e)).next,0!==t)for(;!(u=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);u=!0);}catch(e){l=!0,o=e}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(l)throw o}}return s}}function DF(e){if(Array.isArray(e))return e}var Xx,$T,Qx,NT,Kx,kT,Yx,LT,Jx,BT,Zx,VT,eA,jT,tA,FT,nA,zT,rA,UT,oA,GT,iA,WT,aA,qT,$F=g.forwardRef((function(e,t){var n=e.aspect,r=e.initialDimension,o=void 0===r?{width:-1,height:-1}:r,i=e.width,a=void 0===i?"100%":i,s=e.height,u=void 0===s?"100%":s,l=e.minWidth,c=void 0===l?0:l,d=e.minHeight,f=e.maxHeight,p=e.children,m=e.debounce,h=void 0===m?0:m,y=e.id,v=e.className,b=e.onResize,w=e.style,A=void 0===w?{}:w,x=g.useRef(null),S=g.useRef();S.current=b,g.useImperativeHandle(t,(function(){return Object.defineProperty(x.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),x.current},configurable:!0})}));var I=RF(g.useState({containerWidth:o.width,containerHeight:o.height}),2),E=I[0],C=I[1],P=g.useCallback((function(e,t){C((function(n){var r=Math.round(e),o=Math.round(t);return n.containerWidth===r&&n.containerHeight===o?n:{containerWidth:r,containerHeight:o}}))}),[]);g.useEffect((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,o=n.height;P(r,o),null===(t=S.current)||void 0===t||t.call(S,r,o)};h>0&&(e=IF(e,h,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=x.current.getBoundingClientRect(),r=n.width,o=n.height;return P(r,o),t.observe(x.current),function(){t.disconnect()}}),[P,h]);var k=g.useMemo((function(){var e=E.containerWidth,t=E.containerHeight;if(e<0||t<0)return null;bb(Gg(a)||Gg(u),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",a,u),bb(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=Gg(a)?e:a,o=Gg(u)?t:u;n&&n>0&&(r?o=r/n:o&&(r=o*n),f&&o>f&&(o=f)),bb(r>0||o>0,"The width(%s) and height(%s) of chart should be greater than 0,\n please check the style of container, or the props width(%s) and height(%s),\n or add a minWidth(%s) or minHeight(%s) or use aspect(%s) to control the\n height and width.",r,o,a,u,c,d,n);var i=!Array.isArray(p)&&Ej(p.type).endsWith("Chart");return Oe.Children.map(p,(function(e){return Oe.isValidElement(e)?g.cloneElement(e,Wg({width:r,height:o},i?{style:Wg({height:"100%",width:"100%",maxHeight:o,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,u,f,d,c,E,a]);return Oe.createElement("div",{id:y?"".concat(y):void 0,className:pD("recharts-responsive-container",v),style:Wg(Wg({},A),{},{width:a,height:u,minWidth:c,minHeight:d,maxHeight:f}),ref:x},k)}));function _I(){if($T)return Xx;$T=1;var e=_$()(Object.getPrototypeOf,Object);return Xx=e}function NF(){if(NT)return Qx;NT=1;var e=Ml(),t=_I(),n=ta(),r=Function.prototype,o=Object.prototype,i=r.toString,a=o.hasOwnProperty,s=i.call(Object);return Qx=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var u=a.call(o,"constructor")&&o.constructor;return"function"==typeof u&&u instanceof u&&i.call(u)==s}}function kF(){if(kT)return Kx;kT=1;var e=N$(),t=1/0;return Kx=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function L$(){if(LT)return Yx;LT=1;var e=O$();return Yx=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function B$(){if(BT)return Jx;BT=1;var e=kF();return Jx=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function II(){if(VT)return Zx;return VT=1,Zx=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function V$(){if(jT)return eA;jT=1;var e=L$(),t=lI(),n=Object.prototype.hasOwnProperty;return eA=function(r,o,i){var a=r[o];(!n.call(r,o)||!t(a,i)||void 0===i&&!(o in r))&&e(r,o,i)}}function Ky(){if(FT)return tA;FT=1;var e=V$(),t=L$();return tA=function(n,r,o,i){var a=!o;o||(o={});for(var s=-1,u=r.length;++s<u;){var l=r[s],c=i?i(o[l],n[l],l,o,n):void 0;void 0===c&&(c=n[l]),a?t(o,l,c):e(o,l,c)}return o}}function j$(){if(zT)return nA;zT=1;var e=Ky(),t=Qy();return nA=function(n,r){return n&&e(r,t(r),n)}}function LF(){if(UT)return rA;return UT=1,rA=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function BF(){if(GT)return oA;GT=1;var e=Ss(),t=xI(),n=LF(),r=Object.prototype.hasOwnProperty;return oA=function(o){if(!e(o))return n(o);var i=t(o),a=[];for(var s in o)"constructor"==s&&(i||!r.call(o,s))||a.push(s);return a}}function CI(){if(WT)return iA;WT=1;var e=S$(),t=BF(),n=C$();return iA=function(r){return n(r)?e(r,!0):t(r)}}function VF(){if(qT)return aA;qT=1;var e=Ky(),t=CI();return aA=function(n,r){return n&&e(r,t(r),n)}}var HT,sA,XT,uA,QT,lA,KT,cA,YT,dA,JT,fA,ZT,pA,eM,hA,tM,mA,nM,vA,rM,gA,oM,yA,iM,wA,aM,bA,sM,xA,uM,AA,lM,SA,cM,_A,dM,IA,fM,CA,pM,EA,hM,lv={exports:{}};function jF(){return HT||(HT=1,e=lv,t=lv.exports,n=oi(),r=t&&!t.nodeType&&t,o=r&&e&&!e.nodeType&&e,i=o&&o.exports===r?n.Buffer:void 0,a=i?i.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}),lv.exports;var e,t,n,r,o,i,a}function Yy(){if(XT)return sA;return XT=1,sA=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function FF(){if(QT)return uA;QT=1;var e=Ky(),t=hI();return uA=function(n,r){return e(n,t(n),r)}}function F$(){if(KT)return lA;KT=1;var e=pI(),t=_I(),n=hI(),r=x$(),o=Object.getOwnPropertySymbols;return lA=o?function(r){for(var o=[];r;)e(o,n(r)),r=t(r);return o}:r}function zF(){if(YT)return cA;YT=1;var e=Ky(),t=F$();return cA=function(n,r){return e(n,t(n),r)}}function UF(){if(JT)return dA;JT=1;var e=b$(),t=F$(),n=CI();return dA=function(r){return e(r,n,t)}}function GF(){if(ZT)return fA;ZT=1;var e=Object.prototype.hasOwnProperty;return fA=function(t){var n=t.length,r=new t.constructor(n);return n&&"string"==typeof t[0]&&e.call(t,"index")&&(r.index=t.index,r.input=t.input),r}}function EI(){if(eM)return pA;eM=1;var e=w$();return pA=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function WF(){if(tM)return hA;tM=1;var e=EI();return hA=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function qF(){if(nM)return mA;nM=1;var e=/\w*$/;return mA=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function HF(){if(rM)return vA;rM=1;var e=Yh(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return vA=function(e){return n?Object(n.call(e)):{}}}function XF(){if(oM)return gA;oM=1;var e=EI();return gA=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function QF(){if(iM)return yA;iM=1;var e=EI(),t=WF(),n=qF(),r=HF(),o=XF();return yA=function(i,a,s){var u=i.constructor;switch(a){case"[object ArrayBuffer]":return e(i);case"[object Boolean]":case"[object Date]":return new u(+i);case"[object DataView]":return t(i,s);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return o(i,s);case"[object Map]":case"[object Set]":return new u;case"[object Number]":case"[object String]":return new u(i);case"[object RegExp]":return n(i);case"[object Symbol]":return r(i)}}}function Jy(){if(aM)return wA;aM=1;var e=Ss(),t=Object.create;return wA=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var o=new n;return n.prototype=void 0,o}}()}function KF(){if(sM)return bA;sM=1;var e=Jy(),t=_I(),n=xI();return bA=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function YF(){if(uM)return xA;uM=1;var e=Yv(),t=ta();return xA=function(n){return t(n)&&"[object Map]"==e(n)}}function JF(){if(lM)return AA;lM=1;var e=YF(),t=wI(),n=bI(),r=n&&n.isMap,o=r?t(r):e;return AA=o}function ZF(){if(cM)return SA;cM=1;var e=Yv(),t=ta();return SA=function(n){return t(n)&&"[object Set]"==e(n)}}function ez(){if(dM)return _A;dM=1;var e=ZF(),t=wI(),n=bI(),r=n&&n.isSet,o=r?t(r):e;return _A=o}function z$(){if(fM)return IA;fM=1;var e=fI(),t=II(),n=V$(),r=j$(),o=VF(),i=jF(),a=Yy(),s=FF(),u=zF(),l=E$(),c=UF(),d=Yv(),f=GF(),p=QF(),m=KF(),h=_i(),g=vI(),y=JF(),v=Ss(),b=ez(),w=Qy(),A=CI(),x="[object Arguments]",S="[object Function]",I="[object Object]",E={};return E[x]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E[I]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E[S]=E["[object WeakMap]"]=!1,IA=function C(P,k,_,T,M,O){var R,N=1&k,z=2&k,D=4&k;if(_&&(R=M?_(P,T,M,O):_(P)),void 0!==R)return R;if(!v(P))return P;var j=h(P);if(j){if(R=f(P),!N)return a(P,R)}else{var V=d(P),L=V==S||"[object GeneratorFunction]"==V;if(g(P))return i(P,N);if(V==I||V==x||L&&!M){if(R=z||L?{}:m(P),!N)return z?u(P,o(R,P)):s(P,r(R,P))}else{if(!E[V])return M?P:{};R=p(P,V,N)}}O||(O=new e);var q=O.get(P);if(q)return q;O.set(P,R),b(P)?P.forEach((function(e){R.add(C(e,k,_,e,P,O))})):y(P)&&P.forEach((function(e,t){R.set(t,C(e,k,_,t,P,O))}));var B=j?void 0:(D?z?c:l:z?A:w)(P);return t(B||P,(function(e,t){B&&(e=P[t=e]),n(R,t,C(e,k,_,t,P,O))})),R},IA}function tz(){if(pM)return CA;pM=1;var e=vF();return CA=function(t){return(null==t?0:t.length)?e(t,1):[]}}function nz(){if(hM)return EA;hM=1;var e=tz(),t=gF(),n=$$();return EA=function(r){return n(t(r,void 0,e),r+"")}}lv.exports;const rz={light:"",dark:".dark"},U$=g.createContext(null);function G$(){const e=g.useContext(U$);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const oz=g.forwardRef((({id:e,className:t,children:n,config:r,...o},i)=>{const a=g.useId(),s=`chart-${e||a.replace(/:/g,"")}`;return z.jsx(U$.Provider,{value:{config:r},children:z.jsxs("div",{"data-chart":s,ref:i,className:ye("flex aspect-video justify-center text-xs [&_.recharts-cartesian-axis-tick_text]:fill-muted-foreground [&_.recharts-cartesian-grid_line[stroke='#ccc']]:stroke-border/50 [&_.recharts-curve.recharts-tooltip-cursor]:stroke-border [&_.recharts-dot[stroke='#fff']]:stroke-transparent [&_.recharts-layer]:outline-none [&_.recharts-polar-grid_[stroke='#ccc']]:stroke-border [&_.recharts-radial-bar-background-sector]:fill-muted [&_.recharts-rectangle.recharts-tooltip-cursor]:fill-muted [&_.recharts-reference-line_[stroke='#ccc']]:stroke-border [&_.recharts-sector[stroke='#fff']]:stroke-transparent [&_.recharts-sector]:outline-none [&_.recharts-surface]:outline-none",t),...o,children:[z.jsx(iz,{id:s,config:r}),z.jsx($F,{children:n})]})})}));oz.displayName="Chart";const iz=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?z.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(rz).map((([t,r])=>`\n${r} [data-chart=${e}] {\n${n.map((([e,n])=>{var r;const o=(null==(r=n.theme)?void 0:r[t])||n.color;return o?` --color-${e}: ${o};`:null})).join("\n")}\n}\n`)).join("\n")}}):null},az=g.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:o=!1,hideIndicator:i=!1,label:a,labelFormatter:s,labelClassName:u,formatter:l,color:c,nameKey:d,labelKey:f,hoveredItem:p,onItemHover:m},h)=>{const{config:y}=G$(),v=g.useMemo((()=>{var e;if(o||null==t||!t.length)return null;const[n]=t,r=`${f||(null==n?void 0:n.dataKey)||(null==n?void 0:n.name)||"value"}`,i=t_(y,n,r),l=f||"string"!=typeof a?null==i?void 0:i.label:(null==(e=y[a])?void 0:e.label)||a;return s?z.jsx("div",{className:ye("font-medium",u),children:s(l,t)}):l?z.jsx("div",{className:ye("font-medium",u),children:l}):null}),[a,s,t,o,u,y,f]);if(!e||null==t||!t.length)return null;const b=1===t.length&&"dot"!==r,w=t.length>10;return z.jsxs("div",{ref:h,className:ye("grid min-w-[8rem] items-start gap-xxs rounded-sm border border-border/50 bg-background px-xs py-xxs text-xs shadow-xl",w&&"min-w-[16rem]",n),children:[b?null:v,z.jsx("div",{className:ye("grid gap-xxs",w&&"grid-cols-2 gap-x-s"),children:t.map(((e,t)=>{var n;const o=`${d||e.name||e.dataKey||"value"}`,a=t_(y,e,o),s=c||(null==(n=e.payload)?void 0:n.fill)||e.color||"",u=o===p;return z.jsx("div",{className:ye("flex w-full flex-wrap items-stretch gap-2 [&>svg]:h-2.5 [&>svg]:w-2.5 [&>svg]:text-muted-foreground","dot"===r&&"items-center",u?"":p?"opacity-40":""),onMouseEnter:()=>null==m?void 0:m(o),onMouseLeave:()=>null==m?void 0:m(null),children:l&&void 0!==(null==e?void 0:e.value)&&void 0!==(null==e?void 0:e.payload)&&e.name?l(e.value,e.name,e,t,[e.payload]):z.jsxs(z.Fragment,{children:[null!=a&&a.icon?z.jsx(a.icon,{}):!i&&z.jsx("div",{className:ye("shrink-0 rounded-full border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border border-dashed bg-transparent":"dashed"===r,"my-0.5":b&&"dashed"===r}),style:{"--color-bg":s,"--color-border":s}}),z.jsxs("div",{className:ye("flex flex-1 justify-between leading-none",b?"items-end":"items-center"),children:[z.jsxs("div",{className:"grid gap-xxs",children:[b?v:null,z.jsx("span",{className:ye("text-muted-foreground",u&&"font-medium text-foreground"),children:(null==a?void 0:a.label)||e.name})]}),e.value&&z.jsx("span",{className:ye("font-mono font-medium tabular-nums text-foreground",u&&"font-bold"),children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));az.displayName="ChartTooltip";const sz=g.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:o,hoveredItem:i},a)=>{const{config:s}=G$(),u=g.useRef({});return g.useEffect((()=>{if(i&&u.current[i]){const e=u.current[i];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[i]),null!=n&&n.length?z.jsx("div",{ref:a,className:ye("flex h-[150px] w-full flex-wrap items-center justify-center gap-l overflow-y-auto pb-xl",e),children:n.map((e=>{var n;const a=`${r||e.dataKey||"value"}`,l=t_(s,e,a),c=!!o&&a===i;return z.jsxs("div",{ref:e=>{e?u.current[a]=e:delete u.current[a]},className:ye("group flex cursor-pointer select-none items-center gap-xs text-base transition-all duration-150",c?"scale-105 text-black":i?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==o?void 0:o(e.dataKey),onMouseLeave:()=>null==o?void 0:o(null),children:[null!=l&&l.icon&&!t?z.jsx(l.icon,{}):z.jsx("div",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:e.color||""}}),z.jsx("span",{className:"min-w-[max-content]",children:(null==l?void 0:l.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||a)}))}):null}));function t_(e,t,n){if("object"!=typeof t||null===t)return;const r="payload"in t&&"object"==typeof t.payload&&null!==t.payload?t.payload:void 0;let o=n;return n in t&&"string"==typeof t[n]?o=t[n]:r&&n in r&&"string"==typeof r[n]&&(o=r[n]),o in e?e[o]:e[n]}sz.displayName="ChartLegend";const uz=({children:e,className:t})=>z.jsx("div",{className:ye("flex flex-wrap gap-xxxs",t),children:e}),W$=({text:e,icon:t,disabled:n,isLoading:r,avatarSrc:o,onClick:i,onRemove:a,className:s})=>z.jsxs("div",{onClick:n?void 0:i,className:ye("flex cursor-pointer items-center gap-xxxs rounded-sm bg-gray-100 p-xxs text-sm font-medium text-gray-900 transition-all hover:bg-gray-200 [&_svg]:size-4",n&&"cursor-not-allowed bg-gray-100 text-gray-300",s),children:[o&&z.jsxs(e$,{className:ye("size-6 text-[10px]"),children:[z.jsx(t$,{src:o,alt:e}),z.jsx(n$,{className:"text-xs",children:e.charAt(0).toUpperCase()})]}),t,z.jsx("span",{children:e}),a&&!r&&z.jsx("span",{role:"button",tabIndex:-1,onClick:e=>{e.stopPropagation(),e.preventDefault(),!n&&(null==a||a())},onPointerDown:e=>{e.stopPropagation(),e.preventDefault()},className:ye("pointer-events-auto cursor-pointer",n&&"pointer-events-none cursor-not-allowed opacity-50"),children:z.jsx(Wv,{size:16})}),r&&z.jsx(q_,{size:16,className:"animate-spin"})]});function Zy(e){const t=g.useRef({value:e,previous:e});return g.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function e0(e){const[t,n]=g.useState(void 0);return Uo((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const q$="Checkbox",[lz,wce]=ri(q$),[cz,dz]=lz(q$),fz=g.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:u="on",onCheckedChange:l,...c}=e,[d,f]=g.useState(null),p=zt(t,(e=>f(e))),m=g.useRef(!1),h=!d||!!d.closest("form"),[y=!1,v]=bd({prop:o,defaultProp:i,onChange:l}),b=g.useRef(y);return g.useEffect((()=>{const e=null==d?void 0:d.form;if(e){const t=()=>v(b.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[d,v]),g.createElement(cz,{scope:n,state:y,disabled:s},g.createElement(ft.button,Te({type:"button",role:"checkbox","aria-checked":Hf(y)?"mixed":y,"aria-required":a,"data-state":H$(y),"data-disabled":s?"":void 0,disabled:s,value:u},c,{ref:p,onKeyDown:et(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:et(e.onClick,(e=>{v((e=>!!Hf(e)||!e)),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&g.createElement(mz,{control:d,bubbles:!m.current,name:r,value:u,checked:y,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))})),pz="CheckboxIndicator",hz=g.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,i=dz(pz,n);return g.createElement(ea,{present:r||Hf(i.state)||!0===i.state},g.createElement(ft.span,Te({"data-state":H$(i.state),"data-disabled":i.disabled?"":void 0},o,{ref:t,style:{pointerEvents:"none",...e.style}})))})),mz=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=g.useRef(null),a=Zy(n),s=e0(t);return g.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});e.indeterminate=Hf(n),o.call(e,!Hf(n)&&n),e.dispatchEvent(t)}}),[a,n,r]),g.createElement("input",Te({type:"checkbox","aria-hidden":!0,defaultChecked:!Hf(n)&&n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function Hf(e){return"indeterminate"===e}function H$(e){return Hf(e)?"indeterminate":e?"checked":"unchecked"}const X$=fz,vz=hz,gz=xu("relative overflow-hidden ",{variants:{size:{default:"size-xs"},variant:{default:"peer shrink-0 rounded-sm border disabled:cursor-not-allowed disabled:!border-0 disabled:!bg-gray-100"}},defaultVariants:{size:"default",variant:"default"}}),PI=g.forwardRef((({className:e,size:t,variant:n,iconType:r,...o},i)=>{const a=o.checked,[s]=g.useState(a),[u,l]=g.useState(!1);g.useEffect((()=>{s!==a&&l(!0)}),[a]);const c=e=>"minus"===r?z.jsx(o8,{...e}):z.jsx($y,{...e});return z.jsxs(X$,{ref:i,className:ye(gz({size:t,variant:n}),"transition-[border] duration-100 ease-linear",a?"border-0":"border-gray-300 hover:border-2",e),...o,children:[z.jsx("div",{className:ye("transform-origin-center absolute left-0 top-0 size-full rounded-full bg-blue_100",a?"scale-[1.2]":"scale-0",{"animate-fill-in":a&&u,"animate-fill-out":!a&&u})}),z.jsx(vz,{className:"relative flex items-center justify-center text-current",children:z.jsx(c,{className:"size-xxxs",color:o.disabled?"var(--gray-300)":"white"})})]})}));PI.displayName=X$.displayName;var mM=1,yz=.9,wz=.8,bz=.17,PA=.1,RA=.999,xz=.9999,Az=.99,Sz=/[\\\/_+.#"@\[\(\{&]/,_z=/[\\\/_+.#"@\[\(\{&]/g,Iz=/[\s-]/,Q$=/[\s-]/g;function n_(e,t,n,r,o,i,a){if(i===t.length)return o===e.length?mM:Az;var s=`${o},${i}`;if(void 0!==a[s])return a[s];for(var u,l,c,d,f=r.charAt(i),p=n.indexOf(f,o),m=0;p>=0;)(u=n_(e,t,n,r,p+1,i+1,a))>m&&(p===o?u*=mM:Sz.test(e.charAt(p-1))?(u*=wz,(c=e.slice(o,p-1).match(_z))&&o>0&&(u*=Math.pow(RA,c.length))):Iz.test(e.charAt(p-1))?(u*=yz,(d=e.slice(o,p-1).match(Q$))&&o>0&&(u*=Math.pow(RA,d.length))):(u*=bz,o>0&&(u*=Math.pow(RA,p-o))),e.charAt(p)!==t.charAt(i)&&(u*=xz)),(u<PA&&n.charAt(p-1)===r.charAt(i+1)||r.charAt(i+1)===r.charAt(i)&&n.charAt(p-1)!==r.charAt(i))&&((l=n_(e,t,n,r,p+1,i+2,a))*PA>u&&(u=l*PA)),u>m&&(m=u),p=n.indexOf(f,p+1);return a[s]=m,m}function vM(e){return e.toLowerCase().replace(Q$," ")}function Cz(e,t,n){return n_(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,vM(e),vM(t),0,0,{})}var tv='[cmdk-group=""]',TA='[cmdk-group-items=""]',Ez='[cmdk-group-heading=""]',RI='[cmdk-item=""]',gM=`${RI}:not([aria-disabled="true"])`,r_="cmdk-item-select",Uf="data-value",Pz=(e,t,n)=>Cz(e,t,n),K$=g.createContext(void 0),Jv=()=>g.useContext(K$),Y$=g.createContext(void 0),TI=()=>g.useContext(Y$),J$=g.createContext(void 0),Z$=g.forwardRef(((e,t)=>{let n=Nh((()=>{var t,n;return{search:"",value:null!=(n=null!=(t=e.value)?t:e.defaultValue)?n:"",filtered:{count:0,items:new Map,groups:new Set}}})),r=Nh((()=>new Set)),o=Nh((()=>new Map)),i=Nh((()=>new Map)),a=Nh((()=>new Set)),s=eN(e),{label:u,children:l,value:c,onValueChange:d,filter:f,shouldFilter:p,loop:m,disablePointerSelection:h=!1,vimBindings:y=!0,...v}=e,b=g.useId(),w=g.useId(),A=g.useId(),x=g.useRef(null),S=Vz();tp((()=>{if(void 0!==c){let e=c.trim();n.current.value=e,I.emit()}}),[c]),tp((()=>{S(6,T)}),[]);let I=g.useMemo((()=>({subscribe:e=>(a.current.add(e),()=>a.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var o,i,a;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)_(),P(),S(1,k);else if("value"===e&&(r||S(5,T),void 0!==(null==(o=s.current)?void 0:o.value))){let e=t??"";return void(null==(a=(i=s.current).onValueChange)||a.call(i,e))}I.emit()}},emit:()=>{a.current.forEach((e=>e()))}})),[]),E=g.useMemo((()=>({value:(e,t,r)=>{var o;t!==(null==(o=i.current.get(e))?void 0:o.value)&&(i.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,C(t,r)),S(2,(()=>{P(),I.emit()})))},item:(e,t)=>(r.current.add(e),t&&(o.current.has(t)?o.current.get(t).add(e):o.current.set(t,new Set([e]))),S(3,(()=>{_(),P(),n.current.value||k(),I.emit()})),()=>{i.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=M();S(4,(()=>{_(),(null==t?void 0:t.getAttribute("id"))===e&&k(),I.emit()}))}),group:e=>(o.current.has(e)||o.current.set(e,new Set),()=>{i.current.delete(e),o.current.delete(e)}),filter:()=>s.current.shouldFilter,label:u||e["aria-label"],disablePointerSelection:h,listId:b,inputId:A,labelId:w,listInnerRef:x})),[]);function C(e,t){var r,o;let i=null!=(o=null==(r=s.current)?void 0:r.filter)?o:Pz;return e?i(e,n.current.search,t):0}function P(){if(!n.current.search||!1===s.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=o.current.get(n),i=0;r.forEach((t=>{let n=e.get(t);i=Math.max(n,i)})),t.push([n,i])}));let r=x.current;O().sort(((t,n)=>{var r,o;let i=t.getAttribute("id"),a=n.getAttribute("id");return(null!=(r=e.get(a))?r:0)-(null!=(o=e.get(i))?o:0)})).forEach((e=>{let t=e.closest(TA);t?t.appendChild(e.parentElement===t?e:e.closest(`${TA} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${TA} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=x.current.querySelector(`${tv}[${Uf}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function k(){let e=O().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(Uf);I.setState("value",t||void 0)}function _(){var e,t,a,u;if(!n.current.search||!1===s.current.shouldFilter)return void(n.current.filtered.count=r.current.size);n.current.filtered.groups=new Set;let l=0;for(let o of r.current){let r=C(null!=(t=null==(e=i.current.get(o))?void 0:e.value)?t:"",null!=(u=null==(a=i.current.get(o))?void 0:a.keywords)?u:[]);n.current.filtered.items.set(o,r),r>0&&l++}for(let[e,t]of o.current)for(let r of t)if(n.current.filtered.items.get(r)>0){n.current.filtered.groups.add(e);break}n.current.filtered.count=l}function T(){var e,t,n;let r=M();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(tv))?void 0:t.querySelector(Ez))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function M(){var e;return null==(e=x.current)?void 0:e.querySelector(`${RI}[aria-selected="true"]`)}function O(){var e;return Array.from(null==(e=x.current)?void 0:e.querySelectorAll(gM))}function R(e){let t=O()[e];t&&I.setState("value",t.getAttribute(Uf))}function N(e){var t;let n=M(),r=O(),o=r.findIndex((e=>e===n)),i=r[o+e];null!=(t=s.current)&&t.loop&&(i=o+e<0?r[r.length-1]:o+e===r.length?r[0]:r[o+e]),i&&I.setState("value",i.getAttribute(Uf))}function z(e){let t,n=M(),r=null==n?void 0:n.closest(tv);for(;r&&!t;)r=e>0?Lz(r,tv):Bz(r,tv),t=null==r?void 0:r.querySelector(gM);t?I.setState("value",t.getAttribute(Uf)):N(e)}let D=()=>R(O().length-1),j=e=>{e.preventDefault(),e.metaKey?D():e.altKey?z(1):N(1)},V=e=>{e.preventDefault(),e.metaKey?R(0):e.altKey?z(-1):N(-1)};return g.createElement(ft.div,{ref:t,tabIndex:-1,...v,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=v.onKeyDown)||t.call(v,e),!e.defaultPrevented)switch(e.key){case"n":case"j":y&&e.ctrlKey&&j(e);break;case"ArrowDown":j(e);break;case"p":case"k":y&&e.ctrlKey&&V(e);break;case"ArrowUp":V(e);break;case"Home":e.preventDefault(),R(0);break;case"End":e.preventDefault(),D();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=M();if(t){let e=new Event(r_);t.dispatchEvent(e)}}}}},g.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:Fz},u),t0(e,(e=>g.createElement(Y$.Provider,{value:I},g.createElement(K$.Provider,{value:E},e)))))})),Rz=g.forwardRef(((e,t)=>{var n,r;let o=g.useId(),i=g.useRef(null),a=g.useContext(J$),s=Jv(),u=eN(e),l=null!=(r=null==(n=u.current)?void 0:n.forceMount)?r:null==a?void 0:a.forceMount;tp((()=>{if(!l)return s.item(o,null==a?void 0:a.id)}),[l]);let c=tN(o,i,[e.value,e.children,i],e.keywords),d=TI(),f=np((e=>e.value&&e.value===c.current)),p=np((e=>!(!l&&!1!==s.filter())||(!e.search||e.filtered.items.get(o)>0)));function m(){var e,t;h(),null==(t=(e=u.current).onSelect)||t.call(e,c.current)}function h(){d.setState("value",c.current,!0)}if(g.useEffect((()=>{let t=i.current;if(t&&!e.disabled)return t.addEventListener(r_,m),()=>t.removeEventListener(r_,m)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:y,value:v,onSelect:b,forceMount:w,keywords:A,...x}=e;return g.createElement(ft.div,{ref:Mv([i,t]),...x,id:o,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!f,"data-disabled":!!y,"data-selected":!!f,onPointerMove:y||s.disablePointerSelection?void 0:h,onClick:y?void 0:m},e.children)})),Tz=g.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:o,...i}=e,a=g.useId(),s=g.useRef(null),u=g.useRef(null),l=g.useId(),c=Jv(),d=np((e=>!(!o&&!1!==c.filter())||(!e.search||e.filtered.groups.has(a))));tp((()=>c.group(a)),[]),tN(a,s,[e.value,e.heading,u]);let f=g.useMemo((()=>({id:a,forceMount:o})),[o]);return g.createElement(ft.div,{ref:Mv([s,t]),...i,"cmdk-group":"",role:"presentation",hidden:!d||void 0},n&&g.createElement("div",{ref:u,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),t0(e,(e=>g.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},g.createElement(J$.Provider,{value:f},e)))))})),Mz=g.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,o=g.useRef(null),i=np((e=>!e.search));return n||i?g.createElement(ft.div,{ref:Mv([o,t]),...r,"cmdk-separator":"",role:"separator"}):null})),Oz=g.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,o=null!=e.value,i=TI(),a=np((e=>e.search)),s=np((e=>e.value)),u=Jv(),l=g.useMemo((()=>{var e;let t=null==(e=u.listInnerRef.current)?void 0:e.querySelector(`${RI}[${Uf}="${encodeURIComponent(s)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return g.useEffect((()=>{null!=e.value&&i.setState("search",e.value)}),[e.value]),g.createElement(ft.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":u.listId,"aria-labelledby":u.labelId,"aria-activedescendant":l,id:u.inputId,type:"text",value:o?e.value:a,onChange:e=>{o||i.setState("search",e.target.value),null==n||n(e.target.value)}})})),Dz=g.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,i=g.useRef(null),a=g.useRef(null),s=Jv();return g.useEffect((()=>{if(a.current&&i.current){let e,t=a.current,n=i.current,r=new ResizeObserver((()=>{e=requestAnimationFrame((()=>{let e=t.offsetHeight;n.style.setProperty("--cmdk-list-height",e.toFixed(1)+"px")}))}));return r.observe(t),()=>{cancelAnimationFrame(e),r.unobserve(t)}}}),[]),g.createElement(ft.div,{ref:Mv([i,t]),...o,"cmdk-list":"",role:"listbox","aria-label":r,id:s.listId},t0(e,(e=>g.createElement("div",{ref:Mv([a,s.listInnerRef]),"cmdk-list-sizer":""},e))))})),$z=g.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:i,container:a,...s}=e;return g.createElement(tI,{open:n,onOpenChange:r},g.createElement(Fy,{container:a},g.createElement(Qh,{"cmdk-overlay":"",className:o}),g.createElement(Kh,{"aria-label":e.label,"cmdk-dialog":"",className:i},g.createElement(Z$,{ref:t,...s}))))})),Nz=g.forwardRef(((e,t)=>np((e=>0===e.filtered.count))?g.createElement(ft.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),kz=g.forwardRef(((e,t)=>{let{progress:n,children:r,label:o="Loading...",...i}=e;return g.createElement(ft.div,{ref:t,...i,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},t0(e,(e=>g.createElement("div",{"aria-hidden":!0},e))))})),Ii=Object.assign(Z$,{List:Dz,Item:Rz,Input:Oz,Group:Tz,Separator:Mz,Dialog:$z,Empty:Nz,Loading:kz});function Lz(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Bz(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function eN(e){let t=g.useRef(e);return tp((()=>{t.current=e})),t}var tp=typeof window>"u"?g.useEffect:g.useLayoutEffect;function Nh(e){let t=g.useRef();return void 0===t.current&&(t.current=e()),t}function Mv(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function np(e){let t=TI(),n=()=>e(t.snapshot());return g.useSyncExternalStore(t.subscribe,n,n)}function tN(e,t,n,r=[]){let o=g.useRef(),i=Jv();return tp((()=>{var a;let s=(()=>{var e;for(let t of n){if("string"==typeof t)return t.trim();if("object"==typeof t&&"current"in t)return t.current?null==(e=t.current.textContent)?void 0:e.trim():o.current}})(),u=r.map((e=>e.trim()));i.value(e,s,u),null==(a=t.current)||a.setAttribute(Uf,s),o.current=s})),o}var Vz=()=>{let[e,t]=g.useState(),n=Nh((()=>new Map));return tp((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function jz(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function t0({asChild:e,children:t},n){return e&&g.isValidElement(t)?g.cloneElement(jz(t),{ref:t.ref},n(t.props.children)):n(t)}var Fz={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const zz=tI,Uz=Fy,nN=g.forwardRef((({className:e,...t},n)=>(g.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{0===Array.from(document.querySelectorAll('[role="dialog"]')).length&&e.forEach((e=>e&&(e.style.filter="none")))}}),[]),z.jsx(Qh,{ref:n,"data-testid":"dialog_overlay",className:ye("fixed inset-0 z-dialog bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));nN.displayName=Qh.displayName;const Gz=xu("",{variants:{closeVariant:{none:"",insideCard:"absolute right-m top-m rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground text-gray-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-gray-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),Wz=xu("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),rN=g.forwardRef((({title:e,titleIcon:t,className:n,dialogName:r,showClose:o=!0,closeVariant:i="outsideCard",closeSize:a="big",children:s,titleClassName:u,overlayClassName:l,childrenClassName:c,footerClassName:d,onBack:f,onCloseModal:p,renderFooter:m,onScroll:h,...g},y)=>{const v=z.jsxs(zy,{className:ye(Gz({closeVariant:i})),children:[z.jsx(Wv,{onClick:p,fill:"currentColor",className:ye(Wz({closeSize:a}))}),z.jsx("span",{className:"sr-only",children:"Close"})]});return z.jsxs(Uz,{children:[z.jsx(nN,{className:l,onClick:p}),o&&"insideCard"!==i&&v,z.jsxs(Kh,{ref:y,className:ye("fixed left-[50%] top-[50%] z-[101] grid max-w-[600px] translate-x-[-50%] translate-y-[-50%] !overflow-visible rounded-sm bg-background shadow-lg outline-none duration-200 data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] max-md:w-[calc(100vw-32px)] md:w-full [&>div]:min-w-0",n),...g,children:[e&&z.jsxs("h3",{className:ye("flex items-center justify-center gap-xxs border-b border-gray-200 p-m text-center text-lg font-semibold text-gray-700",u),children:[t,e]}),z.jsx("div",{id:r||"dialog-content",className:ye("p-m",c),onScroll:h,children:s}),o&&"insideCard"===i&&v,f&&z.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:f,className:"absolute left-m top-m",children:z.jsx(uD,{color:"var(--gray-400)",size:24})}),z.jsx(oN,{className:ye("empty:hidden",d),children:null==m?void 0:m()})]})]})}));rN.displayName=Kh.displayName;const oN=({className:e,...t})=>z.jsx("div",{className:ye("flex border-t border-gray-200 p-m",e),...t});oN.displayName="DialogFooter";const qz=g.forwardRef((({className:e,...t},n)=>z.jsx(qv,{ref:n,className:ye("text-lg font-semibold leading-none tracking-tight",e),...t})));qz.displayName=qv.displayName;const Hz=g.forwardRef((({className:e,...t},n)=>z.jsx(Hv,{ref:n,className:ye("text-sm text-muted-foreground",e),...t})));Hz.displayName=Hv.displayName;const Xz=g.forwardRef((({className:e,...t},n)=>z.jsx(Ii,{ref:n,className:ye("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));Xz.displayName=Ii.displayName;const Qz=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:z.jsx(Ii.Input,{ref:n,className:ye("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})})));Qz.displayName=Ii.Input.displayName;const Kz=g.forwardRef((({className:e,...t},n)=>z.jsx(Ii.List,{ref:n,className:ye("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));Kz.displayName=Ii.List.displayName;const Yz=g.forwardRef(((e,t)=>z.jsx(Ii.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));Yz.displayName=Ii.Empty.displayName;const Jz=g.forwardRef((({className:e,...t},n)=>z.jsx(Ii.Group,{ref:n,className:ye("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t})));Jz.displayName=Ii.Group.displayName;const Zz=g.forwardRef((({className:e,...t},n)=>z.jsx(Ii.Separator,{ref:n,className:ye("-mx-1 h-px bg-border",e),...t})));Zz.displayName=Ii.Separator.displayName;const eU=g.forwardRef((({className:e,...t},n)=>z.jsx(Ii.Item,{ref:n,className:ye("relative flex max-w-[215px] cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50",e),...t})));function md(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function yM(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function iN(...e){return t=>{let n=!1;const r=e.map((e=>{const r=yM(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():yM(e[t],null)}}}}function up(...e){return g.useCallback(iN(...e),e)}function tU(e,t){const n=g.createContext(t),r=e=>{const{children:t,...r}=e,o=g.useMemo((()=>r),Object.values(r));return z.jsx(n.Provider,{value:o,children:t})};return r.displayName=e+"Provider",[r,function(r){const o=g.useContext(n);if(o)return o;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function nU(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>g.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return g.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=g.createContext(r),i=n.length;n=[...n,r];const a=t=>{var n;const{scope:r,children:a,...s}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[i])||o,l=g.useMemo((()=>s),Object.values(s));return z.jsx(u.Provider,{value:l,children:a})};return a.displayName=t+"Provider",[a,function(n,a){var s;const u=(null==(s=null==a?void 0:a[e])?void 0:s[i])||o,l=g.useContext(u);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},rU(r,...t)]}function rU(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return g.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}eU.displayName=Ii.Item.displayName;var py=null!=globalThis&&globalThis.document?g.useLayoutEffect:()=>{},oU=dy[" useId ".trim().toString()]||(()=>{}),iU=0;function MA(e){const[t,n]=g.useState(oU());return py((()=>{e||n((e=>e??String(iU++)))}),[e]),e||(t?`radix-${t}`:"")}function rp(e){const t=g.useRef(e);return g.useEffect((()=>{t.current=e})),g.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function aU({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=sU({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,s=rp(n);return[a,g.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else o(t)}),[i,e,o,s])]}function sU({defaultProp:e,onChange:t}){const n=g.useState(e),[r]=n,o=g.useRef(r),i=rp(t);return g.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}function aN(e){const t=uU(e),n=g.forwardRef(((e,n)=>{const{children:r,...o}=e,i=g.Children.toArray(r),a=i.find(cU);if(a){const e=a.props.children,r=i.map((t=>t===a?g.Children.count(e)>1?g.Children.only(null):g.isValidElement(e)?e.props.children:null:t));return z.jsx(t,{...o,ref:n,children:g.isValidElement(e)?g.cloneElement(e,void 0,r):null})}return z.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function uU(e){const t=g.forwardRef(((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const e=fU(n),o=dU(r,n.props);return n.type!==g.Fragment&&(o.ref=t?iN(t,e):e),g.cloneElement(n,o)}return g.Children.count(n)>1?g.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var lU=Symbol("radix.slottable");function cU(e){return g.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===lU}function dU(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function fU(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var pU=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Ol=pU.reduce(((e,t)=>{const n=aN(`Primitive.${t}`),r=g.forwardRef(((e,r)=>{const{asChild:o,...i}=e,a=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),z.jsx(a,{...i,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function hU(e,t){e&&bu.flushSync((()=>e.dispatchEvent(t)))}function mU(e,t=(null==globalThis?void 0:globalThis.document)){const n=rp(e);g.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e,{capture:!0}),()=>t.removeEventListener("keydown",e,{capture:!0})}),[n,t])}var wM,vU="DismissableLayer",o_="dismissableLayer.update",gU="dismissableLayer.pointerDownOutside",yU="dismissableLayer.focusOutside",sN=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),uN=g.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,onDismiss:s,...u}=e,l=g.useContext(sN),[c,d]=g.useState(null),f=(null==c?void 0:c.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=g.useState({}),m=up(t,(e=>d(e))),h=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),v=h.indexOf(y),b=c?h.indexOf(c):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,A=b>=v,x=xU((e=>{const t=e.target,n=[...l.branches].some((e=>e.contains(t)));!A||n||(null==o||o(e),null==a||a(e),e.defaultPrevented||null==s||s())}),f),S=AU((e=>{const t=e.target;[...l.branches].some((e=>e.contains(t)))||(null==i||i(e),null==a||a(e),e.defaultPrevented||null==s||s())}),f);return mU((e=>{b===l.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),f),g.useEffect((()=>{if(c)return n&&(0===l.layersWithOutsidePointerEventsDisabled.size&&(wM=f.body.style.pointerEvents,f.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(c)),l.layers.add(c),bM(),()=>{n&&1===l.layersWithOutsidePointerEventsDisabled.size&&(f.body.style.pointerEvents=wM)}}),[c,f,n,l]),g.useEffect((()=>()=>{c&&(l.layers.delete(c),l.layersWithOutsidePointerEventsDisabled.delete(c),bM())}),[c,l]),g.useEffect((()=>{const e=()=>p({});return document.addEventListener(o_,e),()=>document.removeEventListener(o_,e)}),[]),z.jsx(Ol.div,{...u,ref:m,style:{pointerEvents:w?A?"auto":"none":void 0,...e.style},onFocusCapture:md(e.onFocusCapture,S.onFocusCapture),onBlurCapture:md(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:md(e.onPointerDownCapture,x.onPointerDownCapture)})}));uN.displayName=vU;var wU="DismissableLayerBranch",bU=g.forwardRef(((e,t)=>{const n=g.useContext(sN),r=g.useRef(null),o=up(t,r);return g.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),z.jsx(Ol.div,{...e,ref:o})}));function xU(e,t=(null==globalThis?void 0:globalThis.document)){const n=rp(e),r=g.useRef(!1),o=g.useRef((()=>{}));return g.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){lN(gU,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function AU(e,t=(null==globalThis?void 0:globalThis.document)){const n=rp(e),r=g.useRef(!1);return g.useEffect((()=>{const e=e=>{e.target&&!r.current&&lN(yU,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function bM(){const e=new CustomEvent(o_);document.dispatchEvent(e)}function lN(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?hU(o,i):o.dispatchEvent(i)}bU.displayName=wU;var OA="focusScope.autoFocusOnMount",DA="focusScope.autoFocusOnUnmount",xM={bubbles:!1,cancelable:!0},SU="FocusScope",cN=g.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:i,...a}=e,[s,u]=g.useState(null),l=rp(o),c=rp(i),d=g.useRef(null),f=up(t,(e=>u(e))),p=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect((()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?d.current=t:dd(d.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||dd(d.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&dd(s)};document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[r,s,p.paused]),g.useEffect((()=>{if(s){SM.add(p);const e=document.activeElement;if(!s.contains(e)){const t=new CustomEvent(OA,xM);s.addEventListener(OA,l),s.dispatchEvent(t),t.defaultPrevented||(_U(RU(dN(s)),{select:!0}),document.activeElement===e&&dd(s))}return()=>{s.removeEventListener(OA,l),setTimeout((()=>{const t=new CustomEvent(DA,xM);s.addEventListener(DA,c),s.dispatchEvent(t),t.defaultPrevented||dd(e??document.body,{select:!0}),s.removeEventListener(DA,c),SM.remove(p)}),0)}}}),[s,l,c,p]);const m=g.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,o=document.activeElement;if(t&&o){const t=e.currentTarget,[r,i]=IU(t);r&&i?e.shiftKey||o!==i?e.shiftKey&&o===r&&(e.preventDefault(),n&&dd(i,{select:!0})):(e.preventDefault(),n&&dd(r,{select:!0})):o===t&&e.preventDefault()}}),[n,r,p.paused]);return z.jsx(Ol.div,{tabIndex:-1,...a,ref:f,onKeyDown:m})}));function _U(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(dd(r,{select:t}),document.activeElement!==n)return}function IU(e){const t=dN(e);return[AM(t,e),AM(t.reverse(),e)]}function dN(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function AM(e,t){for(const n of e)if(!CU(n,{upTo:t}))return n}function CU(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function EU(e){return e instanceof HTMLInputElement&&"select"in e}function dd(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&EU(e)&&t&&e.select()}}cN.displayName=SU;var SM=PU();function PU(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=_M(e,t),e.unshift(t)},remove(t){var n;e=_M(e,t),null==(n=e[0])||n.resume()}}}function _M(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function RU(e){return e.filter((e=>"A"!==e.tagName))}var TU="Portal",fN=g.forwardRef(((e,t)=>{var n;const{container:r,...o}=e,[i,a]=g.useState(!1);py((()=>a(!0)),[]);const s=r||i&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?cD.createPortal(z.jsx(Ol.div,{...o,ref:t}),s):null}));function MU(e,t){return g.useReducer(((e,n)=>t[e][n]??e),e)}fN.displayName=TU;var n0=e=>{const{present:t,children:n}=e,r=OU(t),o="function"==typeof n?n({present:r.isPresent}):g.Children.only(n),i=up(r.ref,DU(o));return"function"==typeof n||r.isPresent?g.cloneElement(o,{ref:i}):null};function OU(e){const[t,n]=g.useState(),r=g.useRef({}),o=g.useRef(e),i=g.useRef("none"),a=e?"mounted":"unmounted",[s,u]=MU(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect((()=>{const e=qg(r.current);i.current="mounted"===s?e:"none"}),[s]),py((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=qg(t);e?u("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),py((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,a=i=>{const a=qg(r.current).includes(i.animationName);if(i.target===t&&a&&(u("ANIMATION_END"),!o.current)){const r=t.style.animationFillMode;t.style.animationFillMode="forwards",e=n.setTimeout((()=>{"forwards"===t.style.animationFillMode&&(t.style.animationFillMode=r)}))}},s=e=>{e.target===t&&(i.current=qg(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",a),t.addEventListener("animationend",a),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",a),t.removeEventListener("animationend",a)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:g.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function qg(e){return(null==e?void 0:e.animationName)||"none"}function DU(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}n0.displayName="Presence";var $A=0;function $U(){g.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??IM()),document.body.insertAdjacentElement("beforeend",e[1]??IM()),$A++,()=>{1===$A&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),$A--}}),[])}function IM(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var pN=_D(),NA=function(){},r0=g.forwardRef((function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:NA,onWheelCapture:NA,onTouchMoveCapture:NA}),o=r[0],i=r[1],a=e.forwardProps,s=e.children,u=e.className,l=e.removeScrollBar,c=e.enabled,d=e.shards,f=e.sideCar,p=e.noIsolation,m=e.inert,h=e.allowPinchZoom,y=e.as,v=void 0===y?"div":y,b=e.gapMode,w=Z_(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),A=f,x=SD([n,t]),S=zo(zo({},w),o);return g.createElement(g.Fragment,null,c&&g.createElement(A,{sideCar:pN,removeScrollBar:l,shards:d,noIsolation:p,inert:m,setCallbacks:i,allowPinchZoom:!!h,lockRef:n,gapMode:b}),a?g.cloneElement(g.Children.only(s),zo(zo({},S),{ref:x})):g.createElement(v,zo({},S,{className:u,ref:x}),s))}));r0.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},r0.classNames={fullWidth:vv,zeroRight:mv};var i_=!1;if(typeof window<"u")try{var Hg=Object.defineProperty({},"passive",{get:function(){return i_=!0,!0}});window.addEventListener("test",Hg,Hg),window.removeEventListener("test",Hg,Hg)}catch{i_=!1}var Th=!!i_&&{passive:!1},NU=function(e){return"TEXTAREA"===e.tagName},hN=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!NU(e)&&"visible"===n[t])},kU=function(e){return hN(e,"overflowY")},LU=function(e){return hN(e,"overflowX")},CM=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),mN(e,r)){var o=vN(e,r);if(o[1]>o[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},BU=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},VU=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},mN=function(e,t){return"v"===e?kU(t):LU(t)},vN=function(e,t){return"v"===e?BU(t):VU(t)},jU=function(e,t){return"h"===e&&"rtl"===t?-1:1},FU=function(e,t,n,r,o){var i=jU(e,window.getComputedStyle(t).direction),a=i*r,s=n.target,u=t.contains(s),l=!1,c=a>0,d=0,f=0;do{var p=vN(e,s),m=p[0],h=p[1]-p[2]-i*m;(m||h)&&mN(e,s)&&(d+=h,f+=m),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!u&&s!==document.body||u&&(t.contains(s)||t===s));return(c&&(Math.abs(d)<1||!o)||!c&&(Math.abs(f)<1||!o))&&(l=!0),l},Xg=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},EM=function(e){return[e.deltaX,e.deltaY]},PM=function(e){return e&&"current"in e?e.current:e},zU=function(e,t){return e[0]===t[0]&&e[1]===t[1]},UU=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},GU=0,Mh=[];function WU(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(GU++)[0],i=g.useState(eI)[0],a=g.useRef(e);g.useEffect((function(){a.current=e}),[e]),g.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var t=AD([e.lockRef.current],(e.shards||[]).map(PM),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(o))})),function(){document.body.classList.remove("block-interactivity-".concat(o)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(o))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=g.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!a.current.allowPinchZoom;var o,i=Xg(e),s=n.current,u="deltaX"in e?e.deltaX:s[0]-i[0],l="deltaY"in e?e.deltaY:s[1]-i[1],c=e.target,d=Math.abs(u)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===d&&"range"===c.type)return!1;var f=CM(d,c);if(!f)return!0;if(f?o=d:(o="v"===d?"h":"v",f=CM(d,c)),!f)return!1;if(!r.current&&"changedTouches"in e&&(u||l)&&(r.current=o),!o)return!0;var p=r.current||o;return FU(p,t,e,"h"===p?u:l,!0)}),[]),u=g.useCallback((function(e){var n=e;if(Mh.length&&Mh[Mh.length-1]===i){var r="deltaY"in n?EM(n):Xg(n),o=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&zU(e.delta,r)}))[0];if(o&&o.should)return void(n.cancelable&&n.preventDefault());if(!o){var u=(a.current.shards||[]).map(PM).filter(Boolean).filter((function(e){return e.contains(n.target)}));(u.length>0?s(n,u[0]):!a.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),l=g.useCallback((function(e,n,r,o){var i={name:e,delta:n,target:r,should:o,shadowParent:qU(r)};t.current.push(i),setTimeout((function(){t.current=t.current.filter((function(e){return e!==i}))}),1)}),[]),c=g.useCallback((function(e){n.current=Xg(e),r.current=void 0}),[]),d=g.useCallback((function(t){l(t.type,EM(t),t.target,s(t,e.lockRef.current))}),[]),f=g.useCallback((function(t){l(t.type,Xg(t),t.target,s(t,e.lockRef.current))}),[]);g.useEffect((function(){return Mh.push(i),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener("wheel",u,Th),document.addEventListener("touchmove",u,Th),document.addEventListener("touchstart",c,Th),function(){Mh=Mh.filter((function(e){return e!==i})),document.removeEventListener("wheel",u,Th),document.removeEventListener("touchmove",u,Th),document.removeEventListener("touchstart",c,Th)}}),[]);var p=e.removeScrollBar,m=e.inert;return g.createElement(g.Fragment,null,m?g.createElement(i,{styles:UU(o)}):null,p?g.createElement(PD,{gapMode:e.gapMode}):null)}function qU(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const HU=CD(pN,WU);var gN=g.forwardRef((function(e,t){return g.createElement(r0,zo({},e,{ref:t,sideCar:HU}))}));gN.classNames=r0.classNames;var MI="Dialog",[yN,bce]=nU(MI),[XU,_s]=yN(MI),wN=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:i,modal:a=!0}=e,s=g.useRef(null),u=g.useRef(null),[l=!1,c]=aU({prop:r,defaultProp:o,onChange:i});return z.jsx(XU,{scope:t,triggerRef:s,contentRef:u,contentId:MA(),titleId:MA(),descriptionId:MA(),open:l,onOpenChange:c,onOpenToggle:g.useCallback((()=>c((e=>!e))),[c]),modal:a,children:n})};wN.displayName=MI;var bN="DialogTrigger",xN=g.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(bN,n),i=up(t,o.triggerRef);return z.jsx(Ol.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":$I(o.open),...r,ref:i,onClick:md(e.onClick,o.onOpenToggle)})}));xN.displayName=bN;var OI="DialogPortal",[QU,AN]=yN(OI,{forceMount:void 0}),SN=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,i=_s(OI,t);return z.jsx(QU,{scope:t,forceMount:n,children:g.Children.map(r,(e=>z.jsx(n0,{present:n||i.open,children:z.jsx(fN,{asChild:!0,container:o,children:e})})))})};SN.displayName=OI;var hy="DialogOverlay",_N=g.forwardRef(((e,t)=>{const n=AN(hy,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=_s(hy,e.__scopeDialog);return i.modal?z.jsx(n0,{present:r||i.open,children:z.jsx(YU,{...o,ref:t})}):null}));_N.displayName=hy;var KU=aN("DialogOverlay.RemoveScroll"),YU=g.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(hy,n);return z.jsx(gN,{as:KU,allowPinchZoom:!0,shards:[o.contentRef],children:z.jsx(Ol.div,{"data-state":$I(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),op="DialogContent",IN=g.forwardRef(((e,t)=>{const n=AN(op,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,i=_s(op,e.__scopeDialog);return z.jsx(n0,{present:r||i.open,children:i.modal?z.jsx(JU,{...o,ref:t}):z.jsx(ZU,{...o,ref:t})})}));IN.displayName=op;var JU=g.forwardRef(((e,t)=>{const n=_s(op,e.__scopeDialog),r=g.useRef(null),o=up(t,n.contentRef,r);return g.useEffect((()=>{const e=r.current;if(e)return jy(e)}),[]),z.jsx(CN,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:md(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:md(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:md(e.onFocusOutside,(e=>e.preventDefault()))})})),ZU=g.forwardRef(((e,t)=>{const n=_s(op,e.__scopeDialog),r=g.useRef(!1),o=g.useRef(!1);return z.jsx(CN,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var i,a;null==(i=e.onCloseAutoFocus)||i.call(e,t),t.defaultPrevented||(r.current||null==(a=n.triggerRef.current)||a.focus(),t.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:t=>{var i,a;null==(i=e.onInteractOutside)||i.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(o.current=!0));const s=t.target;(null==(a=n.triggerRef.current)?void 0:a.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&o.current&&t.preventDefault()}})})),CN=g.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:i,...a}=e,s=_s(op,n),u=g.useRef(null),l=up(t,u);return $U(),z.jsxs(z.Fragment,{children:[z.jsx(cN,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:i,children:z.jsx(uN,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":$I(s.open),...a,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),z.jsxs(z.Fragment,{children:[z.jsx(eG,{titleId:s.titleId}),z.jsx(nG,{contentRef:u,descriptionId:s.descriptionId})]})]})})),DI="DialogTitle",EN=g.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(DI,n);return z.jsx(Ol.h2,{id:o.titleId,...r,ref:t})}));EN.displayName=DI;var PN="DialogDescription",RN=g.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(PN,n);return z.jsx(Ol.p,{id:o.descriptionId,...r,ref:t})}));RN.displayName=PN;var TN="DialogClose",MN=g.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,o=_s(TN,n);return z.jsx(Ol.button,{type:"button",...r,ref:t,onClick:md(e.onClick,(()=>o.onOpenChange(!1)))})}));function $I(e){return e?"open":"closed"}MN.displayName=TN;var ON="DialogTitleWarning",[xce,DN]=tU(ON,{contentName:op,titleName:DI,docsSlug:"dialog"}),eG=({titleId:e})=>{const t=DN(ON),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.\n\nIf you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.\n\nFor more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return g.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},tG="DialogDescriptionWarning",nG=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${DN(tG).contentName}}.`;return g.useEffect((()=>{var r;const o=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(n))}),[n,e,t]),null},rG=wN,oG=xN,iG=SN,aG=_N,sG=IN,uG=EN,lG=RN,cG=MN;function dG(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const $N=Oe.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),Jh=()=>{const e=Oe.useContext($N);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};dG("[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,-100%,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(-100%,0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(100%,0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(\n[data-state=closed]\n){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,100%,0)}}@keyframes slideFromTop{from{transform:translate3d(0,-100%,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,-100%,0)}}@keyframes slideFromLeft{from{transform:translate3d(-100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(-100%,0,0)}}@keyframes slideFromRight{from{transform:translate3d(100%,0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(100%,0,0)}}");const fG=24,pG=typeof window<"u"?g.useLayoutEffect:g.useEffect;function RM(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function hG(){return NI(/^Mac/)}function mG(){return NI(/^iPhone/)}function TM(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function vG(){return NI(/^iPad/)||hG()&&navigator.maxTouchPoints>1}function NN(){return mG()||vG()}function NI(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const kA=typeof document<"u"&&window.visualViewport;function MM(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function kN(e){for(MM(e)&&(e=e.parentElement);e&&!MM(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const gG=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let LA,Qg=0;function yG(e={}){let{isDisabled:t}=e;pG((()=>{if(!t)return Qg++,1===Qg&&NN()&&(LA=wG()),()=>{Qg--,0===Qg&&(null==LA||LA())}}),[t])}function wG(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,o=RM(bG(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let i=RM(nv(document,"touchstart",(n=>{e=kN(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),nv(document,"touchmove",(n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,o=e.scrollTop,i=e.scrollHeight-e.clientHeight;0!==i&&((o<=0&&r>t||o>=i&&r<t)&&n.preventDefault(),t=r)}),{passive:!1,capture:!0}),nv(document,"touchend",(e=>{let t=e.target;a_(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),nv(document,"focus",(e=>{let t=e.target;a_(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",kA&&(kA.height<window.innerHeight?requestAnimationFrame((()=>{OM(t)})):kA.addEventListener("resize",(()=>OM(t)),{once:!0}))})))}),!0),nv(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{o(),i(),window.scrollTo(n,r)}}function bG(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function nv(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function OM(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=kN(e);if(t!==document.documentElement&&t!==document.body&&t!==e){let n=t.getBoundingClientRect().top,r=e.getBoundingClientRect().top;e.getBoundingClientRect().bottom>t.getBoundingClientRect().bottom+24&&(t.scrollTop+=r-n)}e=t.parentElement}}function a_(e){return e instanceof HTMLInputElement&&!gG.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function xG(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function AG(...e){return t=>e.forEach((e=>xG(e,t)))}function LN(...e){return g.useCallback(AG(...e),e)}const BN=new WeakMap;function Ur(e,t,n=!1){if(!(e&&e instanceof HTMLElement))return;let r={};Object.entries(t).forEach((([t,n])=>{t.startsWith("--")?e.style.setProperty(t,n):(r[t]=e.style[t],e.style[t]=n)})),!n&&BN.set(e,r)}function SG(e,t){if(!(e&&e instanceof HTMLElement))return;let n=BN.get(e);n&&(e.style[t]=n[t])}const Gr=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Kg(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Gr(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Gr(t)?5:4]):null)}function _G(e){return 8*(Math.log(e+1)-2)}function BA(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function IG(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const Fn={DURATION:.5,EASE:[.32,.72,0,1]},VN=.4,CG=.25,EG=100,jN=8,jf=16,s_=26,VA="vaul-dragging";function FN(e){const t=Oe.useRef(e);return Oe.useEffect((()=>{t.current=e})),Oe.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function PG({defaultProp:e,onChange:t}){const n=Oe.useState(e),[r]=n,o=Oe.useRef(r),i=FN(t);return Oe.useEffect((()=>{o.current!==r&&(i(r),o.current=r)}),[r,o,i]),n}function zN({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=PG({defaultProp:t,onChange:n}),i=void 0!==e,a=i?e:r,s=FN(n);return[a,Oe.useCallback((t=>{if(i){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else o(t)}),[i,e,o,s])]}function RG({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:i,onSnapPointChange:a,direction:s="bottom",container:u,snapToSequentialPoint:l}){const[c,d]=zN({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[f,p]=Oe.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);Oe.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const m=Oe.useMemo((()=>c===(null==n?void 0:n[n.length-1])||null),[n,c]),h=Oe.useMemo((()=>null==n?void 0:n.findIndex((e=>e===c))),[n,c]),g=n&&n.length>0&&(i||0===i)&&!Number.isNaN(i)&&n[i]===c||!n,y=Oe.useMemo((()=>{const e=u?{width:u.getBoundingClientRect().width,height:u.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var t;return null!=(t=null==n?void 0:n.map((t=>{const n="string"==typeof t;let r=0;if(n&&(r=parseInt(t,10)),Gr(s)){const o=n?r:f?t*e.height:0;return f?"bottom"===s?e.height-o:-e.height+o:o}const o=n?r:f?t*e.width:0;return f?"right"===s?e.width-o:-e.width+o:o})))?t:[]}),[n,f,u]),v=Oe.useMemo((()=>null!==h?null==y?void 0:y[h]:null),[y,h]),b=Oe.useCallback((e=>{var t;const u=null!=(t=null==y?void 0:y.findIndex((t=>t===e)))?t:null;a(u),Ur(r.current,{transition:`transform ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`,transform:Gr(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),y&&u!==y.length-1&&u!==i&&u<i?Ur(o.current,{transition:`opacity ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`,opacity:"0"}):Ur(o.current,{transition:`opacity ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`,opacity:"1"}),d(null==n?void 0:n[Math.max(u,0)])}),[r.current,n,y,i,o,d]);return Oe.useEffect((()=>{if(c||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===c)))?t:-1;y&&-1!==r&&"number"==typeof y[r]&&b(y[r])}}),[c,e,n,y,b]),{isLastSnapPoint:m,activeSnapPoint:c,shouldFade:g,getPercentageDragged:function(e,t){if(!n||"number"!=typeof h||!y||void 0===i)return null;const r=h===i-1;if(h>=i&&t)return 0;if(r&&!t)return 1;if(!g&&!r)return null;const o=r?h+1:h-1,a=r?y[o]-y[o-1]:y[o+1]-y[o],s=e/Math.abs(a);return r?1-s:s},setActiveSnapPoint:d,activeSnapPointIndex:h,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:a}){if(void 0===i)return;const u="bottom"===s||"right"===s?(v??0)-e:(v??0)+e,c=0===h,d=e>0;if(h===i-1&&Ur(o.current,{transition:`opacity ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`}),!l&&r>2&&!d)return void(a?t():b(y[0]));if(!l&&r>2&&d&&y&&n)return void b(y[n.length-1]);const f=null==y?void 0:y.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-u)<Math.abs(e-u)?t:e)),p=Gr(s)?window.innerHeight:window.innerWidth;if(r>VN&&Math.abs(e)<.4*p){const e=d?1:-1;if(e>0&&m)return void b(y[n.length-1]);if(c&&e<0&&a&&t(),null===h)return;b(y[h+e])}else b(f)},onDrag:function({draggedDistance:e}){if(null===v)return;const t="bottom"===s||"right"===s?v-e:v+e;("bottom"===s||"right"===s)&&t<y[y.length-1]||("top"===s||"left"===s)&&t>y[y.length-1]||Ur(r.current,{transform:Gr(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:y}}const TG=()=>()=>{};function MG(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=Jh(),i=Oe.useRef(null),a=g.useMemo((()=>document.body.style.backgroundColor),[]);function s(){return(window.innerWidth-26)/window.innerWidth}Oe.useEffect((()=>{if(t&&n){i.current&&clearTimeout(i.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;IG(r&&!o?BA(document.body,{background:"black"}):TG,BA(t,{transformOrigin:Gr(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Fn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Fn.EASE.join(",")})`}));const n=BA(t,{borderRadius:"8px",overflow:"hidden",...Gr(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{n(),i.current=window.setTimeout((()=>{a?document.body.style.background=a:document.body.style.removeProperty("background")}),1e3*Fn.DURATION)}}}),[t,n,a])}let rv=null;function OG({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:i}){const[a,s]=Oe.useState((()=>typeof window<"u"?window.location.href:"")),u=Oe.useRef(0),l=Oe.useCallback((()=>{if(TM()&&null===rv&&e&&!i){rv={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:e,innerHeight:t}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:-u.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&u.current>=t&&(document.body.style.top=-(u.current+e)+"px")}))),300)}}),[e]),c=Oe.useCallback((()=>{if(TM()&&null!==rv&&!i){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,rv),window.requestAnimationFrame((()=>{o&&a!==window.location.href?s(window.location.href):window.scrollTo(t,e)})),rv=null}}),[a]);return Oe.useEffect((()=>{function e(){u.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),Oe.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&l(),t||window.setTimeout((()=>{c()}),500)):c())}),[e,r,a,t,n,l,c]),{restorePositionSetting:c}}function UN({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:i,shouldScaleBackground:a=!1,setBackgroundColorOnScale:s=!0,closeThreshold:u=CG,scrollLockTimeout:l=EG,dismissible:c=!0,handleOnly:d=!1,fadeFromIndex:f=i&&i.length-1,activeSnapPoint:p,setActiveSnapPoint:m,fixed:h,modal:g=!0,onClose:y,nested:v,noBodyStyles:b,direction:w="bottom",defaultOpen:A=!1,disablePreventScroll:x=!0,snapToSequentialPoint:S=!1,preventScrollRestoration:I=!1,repositionInputs:E=!0,onAnimationEnd:C,container:P,autoFocus:k=!1}){var _,T;const[M=!1,O]=zN({defaultProp:A,prop:e,onChange:e=>{null==t||t(e),!e&&!v&&ue(),setTimeout((()=>{null==C||C(e)}),1e3*Fn.DURATION),e&&!g&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[R,N]=Oe.useState(!1),[z,D]=Oe.useState(!1),[j,V]=Oe.useState(!1),L=Oe.useRef(null),q=Oe.useRef(null),B=Oe.useRef(null),U=Oe.useRef(null),F=Oe.useRef(null),G=Oe.useRef(!1),W=Oe.useRef(null),Q=Oe.useRef(0),H=Oe.useRef(!1),X=Oe.useRef(0),K=Oe.useRef(null),Y=Oe.useRef((null==(_=K.current)?void 0:_.getBoundingClientRect().height)||0),J=Oe.useRef((null==(T=K.current)?void 0:T.getBoundingClientRect().width)||0),Z=Oe.useRef(0),$=Oe.useCallback((e=>{i&&e===oe.length-1&&(q.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:oe,onDrag:ie,shouldFade:ae,getPercentageDragged:se}=RG({snapPoints:i,activeSnapPointProp:p,setActiveSnapPointProp:m,drawerRef:K,fadeFromIndex:f,overlayRef:L,onSnapPointChange:$,direction:w,container:P,snapToSequentialPoint:S});yG({isDisabled:!M||z||!g||j||!R||!E||!x});const{restorePositionSetting:ue}=OG({isOpen:M,modal:g,nested:v,hasBeenOpened:R,preventScrollRestoration:I,noBodyStyles:b});function le(){return(window.innerWidth-26)/window.innerWidth}function ce(e,t){var n,r;let o=e;const i=null==(n=window.getSelection())?void 0:n.toString(),a=K.current?Kg(K.current,w):null,s=new Date;if(o.hasAttribute("data-vaul-no-drag")||o.closest("[data-vaul-no-drag]"))return!1;if("right"===w||"left"===w)return!0;if(q.current&&s.getTime()-q.current.getTime()<500)return!1;if(null!==a&&("bottom"===w?a>0:a<0))return!0;if(i&&i.length>0)return!1;if(s.getTime()-(null==(r=F.current)?void 0:r.getTime())<l&&0===a||t)return F.current=s,!1;for(;o;){if(o.scrollHeight>o.clientHeight){if(0!==o.scrollTop)return F.current=new Date,!1;if("dialog"===o.getAttribute("role"))return!0}o=o.parentNode}return!0}function de(e){!z||!K.current||(K.current.classList.remove(VA),G.current=!1,D(!1),U.current=new Date),null==y||y(),e||O(!1),setTimeout((()=>{i&&ne(i[0])}),1e3*Fn.DURATION)}function fe(){if(!K.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=Kg(K.current,w);Ur(K.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`}),Ur(L.current,{transition:`opacity ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`,opacity:"1"}),a&&t&&t>0&&M&&Ur(e,{borderRadius:"8px",overflow:"hidden",...Gr(w)?{transform:`scale(${le()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${le()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Fn.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Fn.EASE.join(",")})`},!0)}return Oe.useEffect((()=>{var e;function t(){if(!K.current||!E)return;if(a_(document.activeElement)||H.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const o=K.current.getBoundingClientRect().height||0,a=o>.8*n;Z.current||(Z.current=o);const s=K.current.getBoundingClientRect().top;if(Math.abs(X.current-r)>60&&(H.current=!H.current),i&&i.length>0&&oe&&te){r+=oe[te]||0}if(X.current=r,o>t||H.current){const e=K.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(a?s:26)),K.current.style.height=h?e-Math.max(r,0)+"px":`${Math.max(n,t-s)}px`}else K.current.style.height=`${Z.current}px`;i&&i.length>0&&!H.current?K.current.style.bottom="0px":K.current.style.bottom=`${Math.max(r,0)}px`}}return null==(e=window.visualViewport)||e.addEventListener("resize",t),()=>{var e;return null==(e=window.visualViewport)?void 0:e.removeEventListener("resize",t)}}),[te,i,oe]),Oe.useEffect((()=>(M&&(Ur(document.documentElement,{scrollBehavior:"auto"}),q.current=new Date),()=>{SG(document.documentElement,"scrollBehavior")})),[M]),Oe.createElement(rG,{defaultOpen:A,onOpenChange:e=>{!c&&!e||(e?N(!0):de(!0),O(e))},open:M},Oe.createElement($N.Provider,{value:{activeSnapPoint:ee,snapPoints:i,setActiveSnapPoint:ne,drawerRef:K,overlayRef:L,onOpenChange:t,onPress:function(e){var t,n;!c&&!i||K.current&&!K.current.contains(e.target)||(Y.current=(null==(t=K.current)?void 0:t.getBoundingClientRect().height)||0,J.current=(null==(n=K.current)?void 0:n.getBoundingClientRect().width)||0,D(!0),B.current=new Date,NN()&&window.addEventListener("touchend",(()=>G.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),Q.current=Gr(w)?e.pageY:e.pageX)},onRelease:function(e){if(!z||!K.current)return;K.current.classList.remove(VA),G.current=!1,D(!1),U.current=new Date;const t=Kg(K.current,w);if(!ce(e.target,!1)||!t||Number.isNaN(t)||null===B.current)return;const n=U.current.getTime()-B.current.getTime(),r=Q.current-(Gr(w)?e.pageY:e.pageX),a=Math.abs(r)/n;if(a>.05&&(V(!0),setTimeout((()=>{V(!1)}),200)),i)return re({draggedDistance:r*("bottom"===w||"right"===w?1:-1),closeDrawer:de,velocity:a,dismissible:c}),void(null==o||o(e,!0));if("bottom"===w||"right"===w?r>0:r<0)return fe(),void(null==o||o(e,!0));if(a>VN)return de(),void(null==o||o(e,!1));var s;const l=Math.min(null!=(s=K.current.getBoundingClientRect().height)?s:0,window.innerHeight);var d;const f=Math.min(null!=(d=K.current.getBoundingClientRect().width)?d:0,window.innerWidth),p="left"===w||"right"===w;if(Math.abs(t)>=(p?f:l)*u)return de(),void(null==o||o(e,!1));null==o||o(e,!0),fe()},onDrag:function(e){if(K.current&&z){const t="bottom"===w||"right"===w?1:-1,n=(Q.current-(Gr(w)?e.pageY:e.pageX))*t,o=n>0,s=i&&!c&&!o;if(s&&0===te)return;const u=Math.abs(n),l=document.querySelector("[data-vaul-drawer-wrapper]");let d=u/("bottom"===w||"top"===w?Y.current:J.current);const p=se(u,o);if(null!==p&&(d=p),s&&d>=1||!G.current&&!ce(e.target,o))return;if(K.current.classList.add(VA),G.current=!0,Ur(K.current,{transition:"none"}),Ur(L.current,{transition:"none"}),i&&ie({draggedDistance:n}),o&&!i){const e=_G(n),r=Math.min(-1*e,0)*t;return void Ur(K.current,{transform:Gr(w)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const m=1-d;if((ae||f&&te===f-1)&&(null==r||r(e,d),Ur(L.current,{opacity:`${m}`,transition:"none"},!0)),l&&L.current&&a){const e=Math.min(le()+d*(1-le()),1),t=8-8*d,n=Math.max(0,14-14*d);Ur(l,{borderRadius:`${t}px`,transform:Gr(w)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!i){const e=u*t;Ur(K.current,{transform:Gr(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:c,handleOnly:d,isOpen:M,isDragging:z,shouldFade:ae,closeDrawer:de,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),o=16*t-16;Ur(K.current,{transform:Gr(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`,transition:"none"})},onNestedOpenChange:function(e){const t=e?(window.innerWidth-16)/window.innerWidth:1,n=e?-16:0;W.current&&window.clearTimeout(W.current),Ur(K.current,{transition:`transform ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&K.current&&(W.current=setTimeout((()=>{const e=Kg(K.current,w);Ur(K.current,{transition:"none",transform:Gr(w)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Gr(w)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,o=t?-16:0;t&&Ur(K.current,{transition:`transform ${Fn.DURATION}s cubic-bezier(${Fn.EASE.join(",")})`,transform:Gr(w)?`scale(${r}) translate3d(0, ${o}px, 0)`:`scale(${r}) translate3d(${o}px, 0, 0)`})},keyboardIsOpen:H,modal:g,snapPointsOffset:oe,direction:w,shouldScaleBackground:a,setBackgroundColorOnScale:s,noBodyStyles:b,container:P,autoFocus:k}},n))}const GN=Oe.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:i,isOpen:a,modal:s}=Jh(),u=LN(t,n),l=r&&r.length>0;return s?Oe.createElement(aG,{onMouseUp:o,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":a&&l?"true":"false","data-vaul-snap-points-overlay":a&&i?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));GN.displayName="Drawer.Overlay";const WN=Oe.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:i,onPress:a,onRelease:s,onDrag:u,keyboardIsOpen:l,snapPointsOffset:c,modal:d,isOpen:f,direction:p,snapPoints:m,container:h,handleOnly:g,autoFocus:y}=Jh(),[v,b]=Oe.useState(!1),w=LN(o,i),A=Oe.useRef(null),x=Oe.useRef(null),S=Oe.useRef(!1),I=m&&m.length>0;MG();function E(e){A.current=null,S.current=!1,s(e)}return Oe.useEffect((()=>{I&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),Oe.createElement(sG,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":v?"true":"false","data-vaul-snap-points":f&&I?"true":"false","data-vaul-custom-container":h?"true":"false",...r,ref:w,style:c&&c.length>0?{"--snap-point-height":`${c[0]}px`,...t}:t,onPointerDown:e=>{g||(null==r.onPointerDown||r.onPointerDown.call(r,e),A.current={x:e.pageX,y:e.pageY},a(e))},onOpenAutoFocus:e=>{null==n||n(e),y||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),d&&!t.defaultPrevented?l.current&&(l.current=!1):t.preventDefault()},onFocusOutside:e=>{d||e.preventDefault()},onPointerMove:e=>{if(x.current=e,g||(null==r.onPointerMove||r.onPointerMove.call(r,e),!A.current))return;const t=e.pageY-A.current.y,n=e.pageX-A.current.x,o="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(S.current)return!0;const r=Math.abs(e.y),o=Math.abs(e.x),i=o>r,a=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*a<0)&&o>=0&&o<=n)return i}else if(!(e.y*a<0)&&r>=0&&r<=n)return!i;return S.current=!0,!0})({x:n,y:t},p,o)?u(e):(Math.abs(n)>o||Math.abs(t)>o)&&(A.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),A.current=null,S.current=!1,s(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),E(x.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),E(x.current)}})}));WN.displayName="Drawer.Content";const DG=250,$G=120,qN=Oe.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:i,snapPoints:a,activeSnapPoint:s,setActiveSnapPoint:u,dismissible:l,handleOnly:c,isOpen:d,onPress:f,onDrag:p}=Jh(),m=Oe.useRef(null),h=Oe.useRef(!1);function g(){window.clearTimeout(m.current),h.current=!1}return Oe.createElement("div",{onClick:function(){h.current?g():window.setTimeout((()=>{!function(){if(i||e||h.current)return void g();if(g(),(!a||0===a.length)&&l)return void o();if(s===a[a.length-1]&&l)return void o();const t=a.findIndex((e=>e===s));if(-1===t)return;const n=a[t+1];u(n)}()}),$G)},onPointerCancel:g,onPointerDown:e=>{c&&f(e),m.current=window.setTimeout((()=>{h.current=!0}),DG)},onPointerMove:e=>{c&&p(e)},ref:r,"data-vaul-drawer-visible":d?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},Oe.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function NG({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:o,onNestedRelease:i}=Jh();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return Oe.createElement(UN,{nested:!0,onClose:()=>{o(!1)},onDrag:(t,n)=>{r(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&o(e)},onRelease:i,...n})}function kG(e){const t=Jh(),{container:n=t.container,...r}=e;return Oe.createElement(iG,{container:n,...r})}qN.displayName="Drawer.Handle";const Ed={Root:UN,NestedRoot:NG,Content:WN,Overlay:GN,Trigger:oG,Portal:kG,Handle:qN,Close:cG,Title:uG,Description:lG},LG=Ed.Portal,HN=g.forwardRef((({className:e,...t},n)=>z.jsx(Ed.Overlay,{ref:n,className:ye("fixed inset-0 z-50 bg-black/5",e),...t})));HN.displayName=Ed.Overlay.displayName;const BG=g.forwardRef((({className:e,children:t,direction:n="bottom",...r},o)=>z.jsxs(LG,{children:[z.jsx(HN,{}),z.jsxs(Ed.Content,{ref:o,className:ye("fixed z-50 border bg-background shadow-lg","bottom"===n&&"inset-x-0 bottom-0 mt-24 flex h-auto flex-col rounded-t-sm","top"===n&&"inset-x-0 top-0 mb-24 flex h-auto flex-col rounded-b-sm","left"===n&&"inset-y-0 left-0 flex h-full flex-col","right"===n&&"inset-y-0 right-0 flex h-full w-[346px] flex-col sm:w-[435px]",e),...r,children:["bottom"===n&&z.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));BG.displayName="DrawerContent";const VG=g.forwardRef((({className:e,...t},n)=>z.jsx(Ed.Title,{ref:n,className:ye("text-lg font-semibold leading-none tracking-tight",e),...t})));VG.displayName=Ed.Title.displayName;const jG=g.forwardRef((({className:e,...t},n)=>z.jsx(Ed.Description,{ref:n,className:ye("text-sm text-muted-foreground",e),...t})));function kI(e){const t=e+"CollectionProvider",[n,r]=ri(t),[o,i]=n(t,{collectionRef:{current:null},itemMap:new Map}),a=e+"CollectionSlot",s=e+"CollectionItemSlot",u="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=Oe.useRef(null),i=Oe.useRef(new Map).current;return Oe.createElement(o,{scope:t,itemMap:i,collectionRef:r},n)},Slot:Oe.forwardRef(((e,t)=>{const{scope:n,children:r}=e,o=zt(t,i(a,n).collectionRef);return Oe.createElement(Zf,{ref:o},r)})),ItemSlot:Oe.forwardRef(((e,t)=>{const{scope:n,children:r,...o}=e,a=Oe.useRef(null),l=zt(t,a),c=i(s,n);return Oe.useEffect((()=>(c.itemMap.set(a,{ref:a,...o}),()=>{c.itemMap.delete(a)}))),Oe.createElement(Zf,{[u]:"",ref:l},r)}))},function(t){const n=i(e+"CollectionConsumer",t);return Oe.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${u}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}jG.displayName=Ed.Description.displayName;const FG=g.createContext(void 0);function LI(e){const t=g.useContext(FG);return e||t||"ltr"}const zG=["top","right","bottom","left"],xd=Math.min,Yi=Math.max,my=Math.round,Yg=Math.floor,Ad=e=>({x:e,y:e}),UG={left:"right",right:"left",bottom:"top",top:"bottom"},GG={start:"end",end:"start"};function u_(e,t,n){return Yi(e,xd(t,n))}function Rl(e,t){return"function"==typeof e?e(t):e}function Tl(e){return e.split("-")[0]}function Zh(e){return e.split("-")[1]}function BI(e){return"x"===e?"y":"x"}function VI(e){return"y"===e?"height":"width"}function Sd(e){return["top","bottom"].includes(Tl(e))?"y":"x"}function jI(e){return BI(Sd(e))}function WG(e,t,n){void 0===n&&(n=!1);const r=Zh(e),o=jI(e),i=VI(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=vy(a)),[a,vy(a)]}function qG(e){const t=vy(e);return[l_(e),t,l_(t)]}function l_(e){return e.replace(/start|end/g,(e=>GG[e]))}function HG(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:a;default:return[]}}function XG(e,t,n,r){const o=Zh(e);let i=HG(Tl(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(l_)))),i}function vy(e){return e.replace(/left|right|bottom|top/g,(e=>UG[e]))}function QG(e){return{top:0,right:0,bottom:0,left:0,...e}}function XN(e){return"number"!=typeof e?QG(e):{top:e,right:e,bottom:e,left:e}}function gy(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function DM(e,t,n){let{reference:r,floating:o}=e;const i=Sd(t),a=jI(t),s=VI(a),u=Tl(t),l="y"===i,c=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[s]/2-o[s]/2;let p;switch(u){case"top":p={x:c,y:r.y-o.height};break;case"bottom":p={x:c,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Zh(t)){case"start":p[a]-=f*(n&&l?-1:1);break;case"end":p[a]+=f*(n&&l?-1:1)}return p}const KG=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=i.filter(Boolean),u=await(null==a.isRTL?void 0:a.isRTL(t));let l=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:c,y:d}=DM(l,r,u),f=r,p={},m=0;for(let n=0;n<s.length;n++){const{name:i,fn:h}=s[n],{x:g,y:y,data:v,reset:b}=await h({x:c,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:p,rects:l,platform:a,elements:{reference:e,floating:t}});c=g??c,d=y??d,p={...p,[i]:{...p[i],...v}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(l=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:c,y:d}=DM(l,f,u))),n=-1)}return{x:c,y:d,placement:f,strategy:o,middlewareData:p}};async function Ov(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=Rl(t,e),m=XN(p),h=s[f?"floating"===d?"reference":"floating":d],g=gy(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),y="floating"===d?{x:r,y:o,width:a.floating.width,height:a.floating.height}:a.reference,v=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),b=await(null==i.isElement?void 0:i.isElement(v))&&await(null==i.getScale?void 0:i.getScale(v))||{x:1,y:1},w=gy(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:v,strategy:u}):y);return{top:(g.top-w.top+m.top)/b.y,bottom:(w.bottom-g.bottom+m.bottom)/b.y,left:(g.left-w.left+m.left)/b.x,right:(w.right-g.right+m.right)/b.x}}const YG=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:a,elements:s,middlewareData:u}=t,{element:l,padding:c=0}=Rl(e,t)||{};if(null==l)return{};const d=XN(c),f={x:n,y:r},p=jI(o),m=VI(p),h=await a.getDimensions(l),g="y"===p,y=g?"top":"left",v=g?"bottom":"right",b=g?"clientHeight":"clientWidth",w=i.reference[m]+i.reference[p]-f[p]-i.floating[m],A=f[p]-i.reference[p],x=await(null==a.getOffsetParent?void 0:a.getOffsetParent(l));let S=x?x[b]:0;(!S||!await(null==a.isElement?void 0:a.isElement(x)))&&(S=s.floating[b]||i.floating[m]);const I=w/2-A/2,E=S/2-h[m]/2-1,C=xd(d[y],E),P=xd(d[v],E),k=C,_=S-h[m]-P,T=S/2-h[m]/2+I,M=u_(k,T,_),O=!u.arrow&&null!=Zh(o)&&T!==M&&i.reference[m]/2-(T<k?C:P)-h[m]/2<0,R=O?T<k?T-k:T-_:0;return{[p]:f[p]+R,data:{[p]:M,centerOffset:T-M-R,...O&&{alignmentOffset:R}},reset:O}}}),JG=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:u,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:h=!0,...g}=Rl(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const y=Tl(o),v=Sd(s),b=Tl(s)===s,w=await(null==u.isRTL?void 0:u.isRTL(l.floating)),A=f||(b||!h?[vy(s)]:qG(s)),x="none"!==m;!f&&x&&A.push(...XG(s,h,m,w));const S=[s,...A],I=await Ov(t,g),E=[];let C=(null==(r=i.flip)?void 0:r.overflows)||[];if(c&&E.push(I[y]),d){const e=WG(o,a,w);E.push(I[e[0]],I[e[1]])}if(C=[...C,{placement:o,overflows:E}],!E.every((e=>e<=0))){var P,k;const e=((null==(P=i.flip)?void 0:P.index)||0)+1,t=S[e];if(t)return{data:{index:e,overflows:C},reset:{placement:t}};let n=null==(k=C.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var _;const e=null==(_=C.filter((e=>{if(x){const t=Sd(e.placement);return t===v||"y"===t}return!0})).map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:_[0];e&&(n=e);break}case"initialPlacement":n=s}if(o!==n)return{reset:{placement:n}}}return{}}}};function $M(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function NM(e){return zG.some((t=>e[t]>=0))}const ZG=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Rl(e,t);switch(r){case"referenceHidden":{const e=$M(await Ov(t,{...o,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:NM(e)}}}case"escaped":{const e=$M(await Ov(t,{...o,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:NM(e)}}}default:return{}}}}};async function eW(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=Tl(n),s=Zh(n),u="y"===Sd(n),l=["left","top"].includes(a)?-1:1,c=i&&u?-1:1,d=Rl(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),u?{x:p*c,y:f*l}:{x:f*l,y:p*c}}const tW=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:a,middlewareData:s}=t,u=await eW(t,e);return a===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:o+u.x,y:i+u.y,data:{...u,placement:a}}}}},nW=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=Rl(e,t),l={x:n,y:r},c=await Ov(t,u),d=Sd(Tl(o)),f=BI(d);let p=l[f],m=l[d];if(i){const e="y"===f?"bottom":"right";p=u_(p+c["y"===f?"top":"left"],p,p-c[e])}if(a){const e="y"===d?"bottom":"right";m=u_(m+c["y"===d?"top":"left"],m,m-c[e])}const h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:i,[d]:a}}}}}},rW=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=Rl(e,t),c={x:n,y:r},d=Sd(o),f=BI(d);let p=c[f],m=c[d];const h=Rl(s,t),g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+g.mainAxis,n=i.reference[f]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var y,v;const e="y"===f?"width":"height",t=["top","left"].includes(Tl(o)),n=i.reference[d]-i.floating[e]+(t&&(null==(y=a.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=i.reference[d]+i.reference[e]+(t?0:(null==(v=a.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},oW=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:i,platform:a,elements:s}=t,{apply:u=()=>{},...l}=Rl(e,t),c=await Ov(t,l),d=Tl(o),f=Zh(o),p="y"===Sd(o),{width:m,height:h}=i.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==a.isRTL?void 0:a.isRTL(s.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const v=h-c.top-c.bottom,b=m-c.left-c.right,w=xd(h-c[g],v),A=xd(m-c[y],b),x=!t.middlewareData.shift;let S=w,I=A;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(I=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=v),x&&!f){const e=Yi(c.left,0),t=Yi(c.right,0),n=Yi(c.top,0),r=Yi(c.bottom,0);p?I=m-2*(0!==e||0!==t?e+t:Yi(c.left,c.right)):S=h-2*(0!==n||0!==r?n+r:Yi(c.top,c.bottom))}await u({...t,availableWidth:I,availableHeight:S});const E=await a.getDimensions(s.floating);return m!==E.width||h!==E.height?{reset:{rects:!0}}:{}}}};function o0(){return typeof window<"u"}function _d(e){return QN(e)?(e.nodeName||"").toLowerCase():"#document"}function Ji(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Dl(e){var t;return null==(t=(QN(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function QN(e){return!!o0()&&(e instanceof Node||e instanceof Ji(e).Node)}function gu(e){return!!o0()&&(e instanceof Element||e instanceof Ji(e).Element)}function yu(e){return!!o0()&&(e instanceof HTMLElement||e instanceof Ji(e).HTMLElement)}function kM(e){return!(!o0()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof Ji(e).ShadowRoot)}function Zv(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ka(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function iW(e){return["table","td","th"].includes(_d(e))}function aW(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function FI(e){const t=zI(),n=gu(e)?ka(e):e;return"none"!==n.transform||"none"!==n.perspective||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function KN(e){let t=Wh(e);for(;yu(t)&&!i0(t);){if(FI(t))return t;if(aW(t))return null;t=Wh(t)}return null}function zI(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function i0(e){return["html","body","#document"].includes(_d(e))}function ka(e){return Ji(e).getComputedStyle(e)}function a0(e){return gu(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wh(e){if("html"===_d(e))return e;const t=e.assignedSlot||e.parentNode||kM(e)&&e.host||Dl(e);return kM(t)?t.host:t}function YN(e){const t=Wh(e);return i0(t)?e.ownerDocument?e.ownerDocument.body:e.body:yu(t)&&Zv(t)?t:YN(t)}function Dv(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=YN(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),a=Ji(o);if(i){const e=sW(a);return t.concat(a,a.visualViewport||[],Zv(o)?o:[],e&&n?Dv(e):[])}return t.concat(o,Dv(o,[],n))}function sW(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function JN(e){const t=ka(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yu(e),i=o?e.offsetWidth:n,a=o?e.offsetHeight:r,s=my(n)!==i||my(r)!==a;return s&&(n=i,r=a),{width:n,height:r,$:s}}function UI(e){return gu(e)?e:e.contextElement}function jh(e){const t=UI(e);if(!yu(t))return Ad(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=JN(t);let a=(i?my(n.width):n.width)/r,s=(i?my(n.height):n.height)/o;return(!a||!Number.isFinite(a))&&(a=1),(!s||!Number.isFinite(s))&&(s=1),{x:a,y:s}}const uW=Ad(0);function ZN(e){const t=Ji(e);return zI()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:uW}function lW(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==Ji(e))&&t}function ip(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=UI(e);let a=Ad(1);t&&(r?gu(r)&&(a=jh(r)):a=jh(e));const s=lW(i,n,r)?ZN(i):Ad(0);let u=(o.left+s.x)/a.x,l=(o.top+s.y)/a.y,c=o.width/a.x,d=o.height/a.y;if(i){const e=Ji(i),t=r&&gu(r)?Ji(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=jh(n),t=n.getBoundingClientRect(),r=ka(n),o=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,l*=e.y,c*=e.x,d*=e.y,u+=o,l+=i,n=Ji(n).frameElement}}return gy({width:c,height:d,x:u,y:l})}const cW=[":popover-open",":modal"];function ek(e){let t=!1,n=0,r=0;if(cW.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=KN(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function dW(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i=Dl(r),[a]=t?ek(t.floating):[!1];if(r===i||a)return n;let s={scrollLeft:0,scrollTop:0},u=Ad(1);const l=Ad(0),c=yu(r);if((c||!c&&"fixed"!==o)&&(("body"!==_d(r)||Zv(i))&&(s=a0(r)),yu(r))){const e=ip(r);u=jh(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-s.scrollLeft*u.x+l.x,y:n.y*u.y-s.scrollTop*u.y+l.y}}function fW(e){return Array.from(e.getClientRects())}function tk(e){return ip(Dl(e)).left+a0(e).scrollLeft}function pW(e){const t=Dl(e),n=a0(e),r=e.ownerDocument.body,o=Yi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=Yi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+tk(e);const s=-n.scrollTop;return"rtl"===ka(r).direction&&(a+=Yi(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:a,y:s}}function hW(e,t){const n=Ji(e),r=Dl(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;const e=zI();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s,y:u}}function mW(e,t){const n=ip(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=yu(e)?jh(e):Ad(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}function LM(e,t,n){let r;if("viewport"===t)r=hW(e,n);else if("document"===t)r=pW(Dl(e));else if(gu(t))r=mW(t,n);else{const n=ZN(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return gy(r)}function nk(e,t){const n=Wh(e);return!(n===t||!gu(n)||i0(n))&&("fixed"===ka(n).position||nk(n,t))}function vW(e,t){const n=t.get(e);if(n)return n;let r=Dv(e,[],!1).filter((e=>gu(e)&&"body"!==_d(e))),o=null;const i="fixed"===ka(e).position;let a=i?Wh(e):e;for(;gu(a)&&!i0(a);){const t=ka(a),n=FI(a);!n&&"fixed"===t.position&&(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||Zv(a)&&!n&&nk(e,a))?r=r.filter((e=>e!==a)):o=t,a=Wh(a)}return t.set(e,r),r}function gW(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?vW(t,this._c):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=LM(t,n,o);return e.top=Yi(r.top,e.top),e.right=xd(r.right,e.right),e.bottom=xd(r.bottom,e.bottom),e.left=Yi(r.left,e.left),e}),LM(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function yW(e){const{width:t,height:n}=JN(e);return{width:t,height:n}}function wW(e,t,n,r){const o=yu(t),i=Dl(t),a="fixed"===n,s=ip(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const l=Ad(0);if(o||!o&&!a)if(("body"!==_d(t)||Zv(i))&&(u=a0(t)),o){const e=ip(t,!0,a,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else i&&(l.x=tk(i));let c=s.left+u.scrollLeft-l.x,d=s.top+u.scrollTop-l.y;const[f,p,m]=ek(r);return f&&(c+=p,d+=m,o&&(c+=t.clientLeft,d+=t.clientTop)),{x:c,y:d,width:s.width,height:s.height}}function BM(e,t){return yu(e)&&"fixed"!==ka(e).position?t?t(e):e.offsetParent:null}function rk(e,t){const n=Ji(e);if(!yu(e))return n;let r=BM(e,t);for(;r&&iW(r)&&"static"===ka(r).position;)r=BM(r,t);return r&&("html"===_d(r)||"body"===_d(r)&&"static"===ka(r).position&&!FI(r))?n:r||KN(e)||n}const bW=async function(e){const t=this.getOffsetParent||rk,n=this.getDimensions;return{reference:wW(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function xW(e){return"rtl"===ka(e).direction}const AW={convertOffsetParentRelativeRectToViewportRelativeRect:dW,getDocumentElement:Dl,getClippingRect:gW,getOffsetParent:rk,getElementRects:bW,getClientRects:fW,getDimensions:yW,getScale:jh,isElement:gu,isRTL:xW};function SW(e,t){let n,r=null;const o=Dl(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function a(s,u){void 0===s&&(s=!1),void 0===u&&(u=1),i();const{left:l,top:c,width:d,height:f}=e.getBoundingClientRect();if(s||t(),!d||!f)return;const p={rootMargin:-Yg(c)+"px "+-Yg(o.clientWidth-(l+d))+"px "+-Yg(o.clientHeight-(c+f))+"px "+-Yg(l)+"px",threshold:Yi(0,xd(1,u))||1};let m=!0;function h(e){const t=e[0].intersectionRatio;if(t!==u){if(!m)return a();t?a(!1,t):n=setTimeout((()=>{a(!1,1e-7)}),100)}m=!1}try{r=new IntersectionObserver(h,{...p,root:o.ownerDocument})}catch{r=new IntersectionObserver(h,p)}r.observe(e)}(!0),i}function _W(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,l=UI(e),c=o||i?[...l?Dv(l):[],...Dv(t)]:[];c.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=l&&s?SW(l,n):null;let f=-1,p=null;a&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),l&&!u&&p.observe(l),p.observe(t));let m,h=u?ip(e):null;return u&&function t(){const r=ip(e);h&&(r.x!==h.x||r.y!==h.y||r.width!==h.width||r.height!==h.height)&&n(),h=r,m=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=p)||e.disconnect(),p=null,u&&cancelAnimationFrame(m)}}const IW=nW,CW=JG,EW=oW,PW=ZG,VM=YG,RW=rW,TW=(e,t,n)=>{const r=new Map,o={platform:AW,...n},i={...o.platform,_c:r};return KG(e,t,{...o,platform:i})};var sy=typeof document<"u"?g.useLayoutEffect:g.useEffect;function yy(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!yy(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||yy(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function ok(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function jM(e,t){const n=ok(e);return Math.round(t*n)/n}function jA(e){const t=g.useRef(e);return sy((()=>{t.current=e})),t}function MW(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:u,open:l}=e,[c,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=g.useState(r);yy(f,r)||p(r);const[m,h]=g.useState(null),[y,v]=g.useState(null),b=g.useCallback((e=>{e!==S.current&&(S.current=e,h(e))}),[]),w=g.useCallback((e=>{e!==I.current&&(I.current=e,v(e))}),[]),A=i||m,x=a||y,S=g.useRef(null),I=g.useRef(null),E=g.useRef(c),C=null!=u,P=jA(u),k=jA(o),_=jA(l),T=g.useCallback((()=>{if(!S.current||!I.current)return;const e={placement:t,strategy:n,middleware:f};k.current&&(e.platform=k.current),TW(S.current,I.current,e).then((e=>{const t={...e,isPositioned:!1!==_.current};M.current&&!yy(E.current,t)&&(E.current=t,bu.flushSync((()=>{d(t)})))}))}),[f,t,n,k,_]);sy((()=>{!1===l&&E.current.isPositioned&&(E.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[l]);const M=g.useRef(!1);sy((()=>(M.current=!0,()=>{M.current=!1})),[]),sy((()=>{if(A&&(S.current=A),x&&(I.current=x),A&&x){if(P.current)return P.current(A,x,T);T()}}),[A,x,T,P,C]);const O=g.useMemo((()=>({reference:S,floating:I,setReference:b,setFloating:w})),[b,w]),R=g.useMemo((()=>({reference:A,floating:x})),[A,x]),N=g.useMemo((()=>{const e={position:n,left:0,top:0};if(!R.floating)return e;const t=jM(R.floating,c.x),r=jM(R.floating,c.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...ok(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,R.floating,c.x,c.y]);return g.useMemo((()=>({...c,update:T,refs:O,elements:R,floatingStyles:N})),[c,T,O,R,N])}const OW=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&function(e){return{}.hasOwnProperty.call(e,"current")}(n)?null!=n.current?VM({element:n.current,padding:r}).fn(t):{}:n?VM({element:n,padding:r}).fn(t):{}}}),DW=(e,t)=>({...tW(e),options:[e,t]}),$W=(e,t)=>({...IW(e),options:[e,t]}),NW=(e,t)=>({...RW(e),options:[e,t]}),kW=(e,t)=>({...CW(e),options:[e,t]}),LW=(e,t)=>({...EW(e),options:[e,t]}),BW=(e,t)=>({...PW(e),options:[e,t]}),VW=(e,t)=>({...OW(e),options:[e,t]}),ik="Popper",[ak,em]=ri(ik),[jW,sk]=ak(ik),FW=e=>{const{__scopePopper:t,children:n}=e,[r,o]=g.useState(null);return g.createElement(jW,{scope:t,anchor:r,onAnchorChange:o},n)},zW="PopperAnchor",UW=g.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,i=sk(zW,n),a=g.useRef(null),s=zt(t,a);return g.useEffect((()=>{i.onAnchorChange((null==r?void 0:r.current)||a.current)})),r?null:g.createElement(ft.div,Te({},o,{ref:s}))})),uk="PopperContent",[GW,Ace]=ak(uk),WW=g.forwardRef(((e,t)=>{var n,r,o,i,a,s,u,l;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,avoidCollisions:y=!0,collisionBoundary:v=[],collisionPadding:b=0,sticky:w="partial",hideWhenDetached:A=!1,updatePositionStrategy:x="optimized",onPlaced:S,...I}=e,E=sk(uk,c),[C,P]=g.useState(null),k=zt(t,(e=>P(e))),[_,T]=g.useState(null),M=e0(_),O=null!==(n=null==M?void 0:M.width)&&void 0!==n?n:0,R=null!==(r=null==M?void 0:M.height)&&void 0!==r?r:0,N=d+("center"!==p?"-"+p:""),z="number"==typeof b?b:{top:0,right:0,bottom:0,left:0,...b},D=Array.isArray(v)?v:[v],j=D.length>0,V={padding:z,boundary:D.filter(qW),altBoundary:j},{refs:L,floatingStyles:q,placement:B,isPositioned:U,middlewareData:F}=MW({strategy:"fixed",placement:N,whileElementsMounted:(...e)=>_W(...e,{animationFrame:"always"===x}),elements:{reference:E.anchor},middleware:[DW({mainAxis:f+R,alignmentAxis:m}),y&&$W({mainAxis:!0,crossAxis:!1,limiter:"partial"===w?NW():void 0,...V}),y&&kW({...V}),LW({...V,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${n}px`),a.setProperty("--radix-popper-available-height",`${r}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),_&&VW({element:_,padding:h}),HW({arrowWidth:O,arrowHeight:R}),A&&BW({strategy:"referenceHidden",...V})]}),[G,W]=lk(B),Q=xs(S);Uo((()=>{U&&(null==Q||Q())}),[U,Q]);const H=null===(o=F.arrow)||void 0===o?void 0:o.x,X=null===(i=F.arrow)||void 0===i?void 0:i.y,K=0!==(null===(a=F.arrow)||void 0===a?void 0:a.centerOffset),[Y,J]=g.useState();return Uo((()=>{C&&J(window.getComputedStyle(C).zIndex)}),[C]),g.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:U?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[null===(s=F.transformOrigin)||void 0===s?void 0:s.x,null===(u=F.transformOrigin)||void 0===u?void 0:u.y].join(" ")},dir:e.dir},g.createElement(GW,{scope:c,placedSide:G,onArrowChange:T,arrowX:H,arrowY:X,shouldHideArrow:K},g.createElement(ft.div,Te({"data-side":G,"data-align":W},I,{ref:k,style:{...I.style,animation:U?void 0:"none",opacity:null!==(l=F.hide)&&void 0!==l&&l.referenceHidden?0:void 0}}))))}));function qW(e){return null!==e}const HW=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:u,middlewareData:l}=t,c=0!==(null===(n=l.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=lk(s),h={start:"0%",center:"50%",end:"100%"}[m],g=(null!==(r=null===(o=l.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,y=(null!==(i=null===(a=l.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let v="",b="";return"bottom"===p?(v=c?h:`${g}px`,b=-f+"px"):"top"===p?(v=c?h:`${g}px`,b=`${u.floating.height+f}px`):"right"===p?(v=-f+"px",b=c?h:`${y}px`):"left"===p&&(v=`${u.floating.width+f}px`,b=c?h:`${y}px`),{data:{x:v,y:b}}}});function lk(e){const[t,n="center"]=e.split("-");return[t,n]}const ck=FW,GI=UW,WI=WW,FA="rovingFocusGroup.onEntryFocus",XW={bubbles:!1,cancelable:!0},qI="RovingFocusGroup",[c_,dk,QW]=kI(qI),[KW,tm]=ri(qI,[QW]),[YW,JW]=KW(qI),ZW=g.forwardRef(((e,t)=>g.createElement(c_.Provider,{scope:e.__scopeRovingFocusGroup},g.createElement(c_.Slot,{scope:e.__scopeRovingFocusGroup},g.createElement(eq,Te({},e,{ref:t})))))),eq=g.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:i,currentTabStopId:a,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:u,onEntryFocus:l,...c}=e,d=g.useRef(null),f=zt(t,d),p=LI(i),[m=null,h]=bd({prop:a,defaultProp:s,onChange:u}),[y,v]=g.useState(!1),b=xs(l),w=dk(n),A=g.useRef(!1),[x,S]=g.useState(0);return g.useEffect((()=>{const e=d.current;if(e)return e.addEventListener(FA,b),()=>e.removeEventListener(FA,b)}),[b]),g.createElement(YW,{scope:n,orientation:r,dir:p,loop:o,currentTabStopId:m,onItemFocus:g.useCallback((e=>h(e)),[h]),onItemShiftTab:g.useCallback((()=>v(!0)),[]),onFocusableItemAdd:g.useCallback((()=>S((e=>e+1))),[]),onFocusableItemRemove:g.useCallback((()=>S((e=>e-1))),[])},g.createElement(ft.div,Te({tabIndex:y||0===x?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:et(e.onMouseDown,(()=>{A.current=!0})),onFocus:et(e.onFocus,(e=>{const t=!A.current;if(e.target===e.currentTarget&&t&&!y){const t=new CustomEvent(FA,XW);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=w().filter((e=>e.focusable));fk([e.find((e=>e.active)),e.find((e=>e.id===m)),...e].filter(Boolean).map((e=>e.ref.current)))}}A.current=!1})),onBlur:et(e.onBlur,(()=>v(!1)))})))})),tq="RovingFocusGroupItem",nq=g.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:i,...a}=e,s=hd(),u=i||s,l=JW(tq,n),c=l.currentTabStopId===u,d=dk(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=l;return g.useEffect((()=>{if(r)return f(),()=>p()}),[r,f,p]),g.createElement(c_.ItemSlot,{scope:n,id:u,focusable:r,active:o},g.createElement(ft.span,Te({tabIndex:c?0:-1,"data-orientation":l.orientation},a,{ref:t,onMouseDown:et(e.onMouseDown,(e=>{r?l.onItemFocus(u):e.preventDefault()})),onFocus:et(e.onFocus,(()=>l.onItemFocus(u))),onKeyDown:et(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void l.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=iq(e,l.orientation,l.dir);if(void 0!==t){e.preventDefault();let n=d().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)n.reverse();else if("prev"===t||"next"===t){"prev"===t&&n.reverse();const r=n.indexOf(e.currentTarget);n=l.loop?aq(n,r+1):n.slice(r+1)}setTimeout((()=>fk(n)))}}))})))})),rq={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function oq(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function iq(e,t,n){const r=oq(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return rq[r]}function fk(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function aq(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const HI=ZW,XI=nq,d_=["Enter"," "],sq=["ArrowDown","PageUp","Home"],pk=["ArrowUp","PageDown","End"],uq=[...sq,...pk],lq={ltr:[...d_,"ArrowRight"],rtl:[...d_,"ArrowLeft"]},cq={ltr:["ArrowLeft"],rtl:["ArrowRight"]},s0="Menu",[$v,dq,fq]=kI(s0),[lp,hk]=ri(s0,[fq,em,tm]),mk=em(),vk=tm(),[Sce,cp]=lp(s0),[_ce,eg]=lp(s0),pq=g.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,o=mk(n);return g.createElement(GI,Te({},o,r,{ref:t}))})),gk="MenuPortal",[hq,yk]=lp(gk,{forceMount:void 0}),mq=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,i=cp(gk,t);return g.createElement(hq,{scope:t,forceMount:n},g.createElement(ea,{present:n||i.open},g.createElement(Ly,{asChild:!0,container:o},r)))},ys="MenuContent",[vq,QI]=lp(ys),gq=g.forwardRef(((e,t)=>{const n=yk(ys,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=cp(ys,e.__scopeMenu),a=eg(ys,e.__scopeMenu);return g.createElement($v.Provider,{scope:e.__scopeMenu},g.createElement(ea,{present:r||i.open},g.createElement($v.Slot,{scope:e.__scopeMenu},a.modal?g.createElement(yq,Te({},o,{ref:t})):g.createElement(wq,Te({},o,{ref:t})))))})),yq=g.forwardRef(((e,t)=>{const n=cp(ys,e.__scopeMenu),r=g.useRef(null),o=zt(t,r);return g.useEffect((()=>{const e=r.current;if(e)return jy(e)}),[]),g.createElement(KI,Te({},e,{ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:et(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),wq=g.forwardRef(((e,t)=>{const n=cp(ys,e.__scopeMenu);return g.createElement(KI,Te({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),KI=g.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:i,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEntryFocus:u,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p,disableOutsideScroll:m,...h}=e,y=cp(ys,n),v=eg(ys,n),b=mk(n),w=vk(n),A=dq(n),[x,S]=g.useState(null),I=g.useRef(null),E=zt(t,I,y.onContentChange),C=g.useRef(0),P=g.useRef(""),k=g.useRef(0),_=g.useRef(null),T=g.useRef("right"),M=g.useRef(0),O=m?Vy:g.Fragment,R=m?{as:Zf,allowPinchZoom:!0}:void 0;g.useEffect((()=>()=>window.clearTimeout(C.current)),[]),J_();const N=g.useCallback((e=>{var t,n;return T.current===(null===(t=_.current)||void 0===t?void 0:t.side)&&Lq(e,null===(n=_.current)||void 0===n?void 0:n.area)}),[]);return g.createElement(vq,{scope:n,searchRef:P,onItemEnter:g.useCallback((e=>{N(e)&&e.preventDefault()}),[N]),onItemLeave:g.useCallback((e=>{var t;N(e)||(null===(t=I.current)||void 0===t||t.focus(),S(null))}),[N]),onTriggerLeave:g.useCallback((e=>{N(e)&&e.preventDefault()}),[N]),pointerGraceTimerRef:k,onPointerGraceIntentChange:g.useCallback((e=>{_.current=e}),[])},g.createElement(O,R,g.createElement(Y_,{asChild:!0,trapped:o,onMountAutoFocus:et(i,(e=>{var t;e.preventDefault(),null===(t=I.current)||void 0===t||t.focus()})),onUnmountAutoFocus:a},g.createElement(ky,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:c,onFocusOutside:d,onInteractOutside:f,onDismiss:p},g.createElement(HI,Te({asChild:!0},w,{dir:v.dir,orientation:"vertical",loop:r,currentTabStopId:x,onCurrentTabStopIdChange:S,onEntryFocus:et(u,(e=>{v.isUsingKeyboardRef.current||e.preventDefault()}))}),g.createElement(WI,Te({role:"menu","aria-orientation":"vertical","data-state":Sk(y.open),"data-radix-menu-content":"",dir:v.dir},b,h,{ref:E,style:{outline:"none",...h.style},onKeyDown:et(h.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!n&&r&&(e=>{var t,n;const r=P.current+e,o=A().filter((e=>!e.disabled)),i=document.activeElement,a=null===(t=o.find((e=>e.ref.current===i)))||void 0===t?void 0:t.textValue,s=Nq(o.map((e=>e.textValue)),r,a),u=null===(n=o.find((e=>e.textValue===s)))||void 0===n?void 0:n.ref.current;(function e(t){P.current=t,window.clearTimeout(C.current),""!==t&&(C.current=window.setTimeout((()=>e("")),1e3))})(r),u&&setTimeout((()=>u.focus()))})(e.key));const o=I.current;if(e.target!==o||!uq.includes(e.key))return;e.preventDefault();const i=A().filter((e=>!e.disabled)).map((e=>e.ref.current));pk.includes(e.key)&&i.reverse(),Dq(i)})),onBlur:et(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(C.current),P.current="")})),onPointerMove:et(e.onPointerMove,Nv((e=>{const t=e.target,n=M.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>M.current?"right":"left";T.current=t,M.current=e.clientX}})))})))))))})),bq=g.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return g.createElement(ft.div,Te({},r,{ref:t}))})),f_="MenuItem",FM="menu.itemSelect",YI=g.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,i=g.useRef(null),a=eg(f_,e.__scopeMenu),s=QI(f_,e.__scopeMenu),u=zt(t,i),l=g.useRef(!1);return g.createElement(wk,Te({},o,{ref:u,disabled:n,onClick:et(e.onClick,(()=>{const e=i.current;if(!n&&e){const t=new CustomEvent(FM,{bubbles:!0,cancelable:!0});e.addEventListener(FM,(e=>null==r?void 0:r(e)),{once:!0}),wD(e,t),t.defaultPrevented?l.current=!1:a.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),l.current=!0},onPointerUp:et(e.onPointerUp,(e=>{var t;l.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:et(e.onKeyDown,(e=>{const t=""!==s.searchRef.current;n||t&&" "===e.key||d_.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),wk=g.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...i}=e,a=QI(f_,n),s=vk(n),u=g.useRef(null),l=zt(t,u),[c,d]=g.useState(!1),[f,p]=g.useState("");return g.useEffect((()=>{const e=u.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[i.children]),g.createElement($v.ItemSlot,{scope:n,disabled:r,textValue:o??f},g.createElement(XI,Te({asChild:!0},s,{focusable:!r}),g.createElement(ft.div,Te({role:"menuitem","data-highlighted":c?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},i,{ref:l,onPointerMove:et(e.onPointerMove,Nv((e=>{r?a.onItemLeave(e):(a.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:et(e.onPointerLeave,Nv((e=>a.onItemLeave(e)))),onFocus:et(e.onFocus,(()=>d(!0))),onBlur:et(e.onBlur,(()=>d(!1)))}))))})),xq=g.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return g.createElement(xk,{scope:e.__scopeMenu,checked:n},g.createElement(YI,Te({role:"menuitemcheckbox","aria-checked":wy(n)?"mixed":n},o,{ref:t,"data-state":JI(n),onSelect:et(o.onSelect,(()=>null==r?void 0:r(!!wy(n)||!n)),{checkForDefaultPrevented:!1})})))})),Aq="MenuRadioGroup",[Ice,Sq]=lp(Aq,{value:void 0,onValueChange:()=>{}}),_q="MenuRadioItem",Iq=g.forwardRef(((e,t)=>{const{value:n,...r}=e,o=Sq(_q,e.__scopeMenu),i=n===o.value;return g.createElement(xk,{scope:e.__scopeMenu,checked:i},g.createElement(YI,Te({role:"menuitemradio","aria-checked":i},r,{ref:t,"data-state":JI(i),onSelect:et(r.onSelect,(()=>{var e;return null===(e=o.onValueChange)||void 0===e?void 0:e.call(o,n)}),{checkForDefaultPrevented:!1})})))})),bk="MenuItemIndicator",[xk,Cq]=lp(bk,{checked:!1}),Eq=g.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,i=Cq(bk,n);return g.createElement(ea,{present:r||wy(i.checked)||!0===i.checked},g.createElement(ft.span,Te({},o,{ref:t,"data-state":JI(i.checked)})))})),Pq=g.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return g.createElement(ft.div,Te({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),Rq="MenuSub",[Cce,Ak]=lp(Rq),Jg="MenuSubTrigger",Tq=g.forwardRef(((e,t)=>{const n=cp(Jg,e.__scopeMenu),r=eg(Jg,e.__scopeMenu),o=Ak(Jg,e.__scopeMenu),i=QI(Jg,e.__scopeMenu),a=g.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:u}=i,l={__scopeMenu:e.__scopeMenu},c=g.useCallback((()=>{a.current&&window.clearTimeout(a.current),a.current=null}),[]);return g.useEffect((()=>c),[c]),g.useEffect((()=>{const e=s.current;return()=>{window.clearTimeout(e),u(null)}}),[s,u]),g.createElement(pq,Te({asChild:!0},l),g.createElement(wk,Te({id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Sk(n.open)},e,{ref:Q_(t,o.onTriggerChange),onClick:t=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,t),!e.disabled&&!t.defaultPrevented&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:et(e.onPointerMove,Nv((t=>{i.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!a.current&&(i.onPointerGraceIntentChange(null),a.current=window.setTimeout((()=>{n.onOpenChange(!0),c()}),100))}))),onPointerLeave:et(e.onPointerLeave,Nv((e=>{var t;c();const r=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(r){var o;const t=null===(o=n.content)||void 0===o?void 0:o.dataset.side,a="right"===t,u=a?-5:5,l=r[a?"left":"right"],c=r[a?"right":"left"];i.onPointerGraceIntentChange({area:[{x:e.clientX+u,y:e.clientY},{x:l,y:r.top},{x:c,y:r.top},{x:c,y:r.bottom},{x:l,y:r.bottom}],side:t}),window.clearTimeout(s.current),s.current=window.setTimeout((()=>i.onPointerGraceIntentChange(null)),300)}else{if(i.onTriggerLeave(e),e.defaultPrevented)return;i.onPointerGraceIntentChange(null)}}))),onKeyDown:et(e.onKeyDown,(t=>{const o=""!==i.searchRef.current;var a;e.disabled||o&&" "===t.key||!lq[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(a=n.content)||void 0===a||a.focus(),t.preventDefault())}))})))})),Mq="MenuSubContent",Oq=g.forwardRef(((e,t)=>{const n=yk(ys,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,i=cp(ys,e.__scopeMenu),a=eg(ys,e.__scopeMenu),s=Ak(Mq,e.__scopeMenu),u=g.useRef(null),l=zt(t,u);return g.createElement($v.Provider,{scope:e.__scopeMenu},g.createElement(ea,{present:r||i.open},g.createElement($v.Slot,{scope:e.__scopeMenu},g.createElement(KI,Te({id:s.contentId,"aria-labelledby":s.triggerId},o,{ref:l,align:"start",side:"rtl"===a.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;a.isUsingKeyboardRef.current&&(null===(t=u.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:et(e.onFocusOutside,(e=>{e.target!==s.trigger&&i.onOpenChange(!1)})),onEscapeKeyDown:et(e.onEscapeKeyDown,(e=>{a.onClose(),e.preventDefault()})),onKeyDown:et(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=cq[a.dir].includes(e.key);var r;t&&n&&(i.onOpenChange(!1),null===(r=s.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function Sk(e){return e?"open":"closed"}function wy(e){return"indeterminate"===e}function JI(e){return wy(e)?"indeterminate":e?"checked":"unchecked"}function Dq(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function $q(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function Nq(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=$q(e,Math.max(o,0));1===r.length&&(i=i.filter((e=>e!==n)));const a=i.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return a!==n?a:void 0}function kq(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,u=t[i].x,l=t[i].y;s>r!=l>r&&n<(u-a)*(r-s)/(l-s)+a&&(o=!o)}return o}function Lq(e,t){if(!t)return!1;return kq({x:e.clientX,y:e.clientY},t)}function Nv(e){return t=>"mouse"===t.pointerType?e(t):void 0}const Bq=mq,Vq=gq,jq=bq,Fq=YI,zq=xq,Uq=Iq,Gq=Eq,Wq=Pq,qq=Tq,Hq=Oq,_k="DropdownMenu",[Xq,Ece]=ri(_k,[hk]),Su=hk(),[Pce,Qq]=Xq(_k),Kq=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Su(t);return g.createElement(Bq,Te({},r,n))},Yq="DropdownMenuContent",Jq=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Qq(Yq,n),i=Su(n),a=g.useRef(!1);return g.createElement(Vq,Te({id:o.contentId,"aria-labelledby":o.triggerId},i,r,{ref:t,onCloseAutoFocus:et(e.onCloseAutoFocus,(e=>{var t;a.current||null===(t=o.triggerRef.current)||void 0===t||t.focus(),a.current=!1,e.preventDefault()})),onInteractOutside:et(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!o.modal||r)&&(a.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),Zq=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(jq,Te({},o,r,{ref:t}))})),eH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(Fq,Te({},o,r,{ref:t}))})),tH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(zq,Te({},o,r,{ref:t}))})),nH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(Uq,Te({},o,r,{ref:t}))})),rH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(Gq,Te({},o,r,{ref:t}))})),oH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(Wq,Te({},o,r,{ref:t}))})),iH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(qq,Te({},o,r,{ref:t}))})),aH=g.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Su(n);return g.createElement(Hq,Te({},o,r,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),sH=Kq,Ik=Jq,Ck=Zq,Ek=eH,Pk=tH,Rk=nH,uH=rH,ZI=oH,Tk=iH,Mk=aH,lH=g.forwardRef((({className:e,inset:t,children:n,...r},o)=>z.jsxs(Tk,{ref:o,className:ye("flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,z.jsx(lD,{className:"ml-auto h-4 w-4"})]})));lH.displayName=Tk.displayName;const cH=g.forwardRef((({className:e,...t},n)=>z.jsx(Mk,{ref:n,className:ye("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})));cH.displayName=Mk.displayName;const zM=e=>{e.preventDefault()},dH=g.forwardRef((({className:e,sideOffset:t=4,isPortal:n,...r},o)=>{const i=z.jsx(Ik,{ref:o,sideOffset:t,onOpenAutoFocus:zM,onCloseAutoFocus:zM,className:ye("z-[101] flex max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] flex-col gap-xxxs overflow-y-auto rounded-lg border border-gray-200 bg-white p-xxs text-popover-foreground ","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)] ","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2","data-[state=closed]:duration-150 data-[state=open]:duration-150","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]",e),...r});return n?z.jsx(sH,{children:i}):i}));dH.displayName=Ik.displayName;const fH=g.forwardRef((({className:e,inset:t,...n},r)=>z.jsx(Ek,{ref:r,className:ye("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100 data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-xl",e),...n})));fH.displayName=Ek.displayName;const pH=g.forwardRef((({className:e,children:t,checked:n,checkboxPosition:r="right",...o},i)=>{const a=z.jsx(PI,{size:"default",variant:"default",checked:n});return z.jsxs(Pk,{ref:i,className:ye("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900"," outline-none transition-colors hover:bg-gray-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,onSelect:e=>e.preventDefault(),...o,children:["left"===r&&a,z.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===r&&a]})}));pH.displayName=Pk.displayName;const hH=g.forwardRef((({className:e,children:t,radioPosition:n="right",...r},o)=>{const i=z.jsx("div",{className:"flex h-xxs items-center justify-center",children:z.jsx(uH,{children:z.jsx($y,{size:20})})});return z.jsxs(Rk,{ref:o,className:ye("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs text-base font-medium text-gray-900"," outline-none transition-colors hover:bg-gray-100 focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),onSelect:e=>e.preventDefault(),...r,children:["left"===n&&i,z.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:t}),"right"===n&&i]})}));hH.displayName=Rk.displayName;const mH=g.forwardRef((({className:e,inset:t,...n},r)=>z.jsx(Ck,{ref:r,className:ye("text-sm font-semibold",t&&"pl-xl",e),...n})));mH.displayName=Ck.displayName;const vH=g.forwardRef((({className:e,...t},n)=>z.jsx(ZI,{ref:n,className:ye("-mx-1 my-1 h-px bg-muted",e),...t})));vH.displayName=ZI.displayName;const gH=Oe.createContext(null),yH=()=>Oe.useContext(gH),wH=g.forwardRef(((e,t)=>g.createElement(ft.label,Te({},e,{ref:t,onMouseDown:t=>{var n;null===(n=e.onMouseDown)||void 0===n||n.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}})))),Ok=wH,bH=xu("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Dk=g.forwardRef((({className:e,...t},n)=>z.jsx(Ok,{ref:n,className:ye(bH(),e),...t})));function UM(e,[t,n]){return Math.min(n,Math.max(t,e))}Dk.displayName=Ok.displayName;const $k=g.forwardRef(((e,t)=>g.createElement(ft.span,Te({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}})))),xH=$k,AH=[" ","Enter","ArrowUp","ArrowDown"],SH=[" ","Enter"],u0="Select",[l0,c0,_H]=kI(u0),[nm,Rce]=ri(u0,[_H,em]),eC=em(),[IH,dp]=nm(u0),[CH,EH]=nm(u0),PH=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:i,value:a,defaultValue:s,onValueChange:u,dir:l,name:c,autoComplete:d,disabled:f,required:p}=e,m=eC(t),[h,y]=g.useState(null),[v,b]=g.useState(null),[w,A]=g.useState(!1),x=LI(l),[S=!1,I]=bd({prop:r,defaultProp:o,onChange:i}),[E,C]=bd({prop:a,defaultProp:s,onChange:u}),P=g.useRef(null),k=!h||!!h.closest("form"),[_,T]=g.useState(new Set),M=Array.from(_).map((e=>e.props.value)).join(";");return g.createElement(ck,m,g.createElement(IH,{required:p,scope:t,trigger:h,onTriggerChange:y,valueNode:v,onValueNodeChange:b,valueNodeHasChildren:w,onValueNodeHasChildrenChange:A,contentId:hd(),value:E,onValueChange:C,open:S,onOpenChange:I,dir:x,triggerPointerDownPosRef:P,disabled:f},g.createElement(l0.Provider,{scope:t},g.createElement(CH,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:g.useCallback((e=>{T((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),k?g.createElement(Vk,{key:M,"aria-hidden":!0,required:p,tabIndex:-1,name:c,autoComplete:d,value:E,onChange:e=>C(e.target.value),disabled:f},void 0===E?g.createElement("option",{value:""}):null,Array.from(_)):null))},RH="SelectTrigger",TH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,i=eC(n),a=dp(RH,n),s=a.disabled||r,u=zt(t,a.onTriggerChange),l=c0(n),[c,d,f]=jk((e=>{const t=l().filter((e=>!e.disabled)),n=t.find((e=>e.value===a.value)),r=Fk(t,e,n);void 0!==r&&a.onValueChange(r.value)})),p=()=>{s||(a.onOpenChange(!0),f())};return g.createElement(GI,Te({asChild:!0},i),g.createElement(ft.button,Te({type:"button",role:"combobox","aria-controls":a.contentId,"aria-expanded":a.open,"aria-required":a.required,"aria-autocomplete":"none",dir:a.dir,"data-state":a.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Bk(a.value)?"":void 0},o,{ref:u,onClick:et(o.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:et(o.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),a.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:et(o.onKeyDown,(e=>{const t=""!==c.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&d(e.key),(!t||" "!==e.key)&&AH.includes(e.key)&&(p(),e.preventDefault())}))})))})),MH="SelectValue",OH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:i,placeholder:a="",...s}=e,u=dp(MH,n),{onValueNodeHasChildrenChange:l}=u,c=void 0!==i,d=zt(t,u.onValueNodeChange);return Uo((()=>{l(c)}),[l,c]),g.createElement(ft.span,Te({},s,{ref:d,style:{pointerEvents:"none"}}),Bk(u.value)?g.createElement(g.Fragment,null,a):i)})),DH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return g.createElement(ft.span,Te({"aria-hidden":!0},o,{ref:t}),r||"▼")})),$H=e=>g.createElement(Ly,Te({asChild:!0},e)),qh="SelectContent",NH=g.forwardRef(((e,t)=>{const n=dp(qh,e.__scopeSelect),[r,o]=g.useState();if(Uo((()=>{o(new DocumentFragment)}),[]),!n.open){const t=r;return t?bu.createPortal(g.createElement(Nk,{scope:e.__scopeSelect},g.createElement(l0.Slot,{scope:e.__scopeSelect},g.createElement("div",null,e.children))),t):null}return g.createElement(kH,Te({},e,{ref:t}))})),_l=10,[Nk,fp]=nm(qh),kH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:i,onPointerDownOutside:a,side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:y,...v}=e,b=dp(qh,n),[w,A]=g.useState(null),[x,S]=g.useState(null),I=zt(t,(e=>A(e))),[E,C]=g.useState(null),[P,k]=g.useState(null),_=c0(n),[T,M]=g.useState(!1),O=g.useRef(!1);g.useEffect((()=>{if(w)return jy(w)}),[w]),J_();const R=g.useCallback((e=>{const[t,...n]=_().map((e=>e.ref.current)),[r]=n.slice(-1),o=document.activeElement;for(const n of e)if(n===o||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&x&&(x.scrollTop=0),n===r&&x&&(x.scrollTop=x.scrollHeight),null==n||n.focus(),document.activeElement!==o))return}),[_,x]),N=g.useCallback((()=>R([E,w])),[R,E,w]);g.useEffect((()=>{T&&N()}),[T,N]);const{onOpenChange:z,triggerPointerDownPosRef:D}=b;g.useEffect((()=>{if(w){let e={x:0,y:0};const t=t=>{var n,r,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=D.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(i=D.current)||void 0===i?void 0:i.y)&&void 0!==o?o:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():w.contains(n.target)||z(!1),document.removeEventListener("pointermove",t),D.current=null};return null!==D.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[w,z,D]),g.useEffect((()=>{const e=()=>z(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[z]);const[j,V]=jk((e=>{const t=_().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=Fk(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),L=g.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&(C(e),r&&(O.current=!0))}),[b.value]),q=g.useCallback((()=>null==w?void 0:w.focus()),[w]),B=g.useCallback(((e,t,n)=>{const r=!O.current&&!n;(void 0!==b.value&&b.value===t||r)&&k(e)}),[b.value]),U="popper"===r?GM:LH,F=U===GM?{side:s,sideOffset:u,align:l,alignOffset:c,arrowPadding:d,collisionBoundary:f,collisionPadding:p,sticky:m,hideWhenDetached:h,avoidCollisions:y}:{};return g.createElement(Nk,{scope:n,content:w,viewport:x,onViewportChange:S,itemRefCallback:L,selectedItem:E,onItemLeave:q,itemTextRefCallback:B,focusSelectedItem:N,selectedItemText:P,position:r,isPositioned:T,searchRef:j},g.createElement(Vy,{as:Zf,allowPinchZoom:!0},g.createElement(Y_,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:et(o,(e=>{var t;null===(t=b.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},g.createElement(ky,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1)},g.createElement(U,Te({role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault()},v,F,{onPlaced:()=>M(!0),ref:I,style:{display:"flex",flexDirection:"column",outline:"none",...v.style},onKeyDown:et(v.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&V(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=_().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const n=e.target,r=t.indexOf(n);t=t.slice(r+1)}setTimeout((()=>R(t))),e.preventDefault()}}))}))))))})),LH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,i=dp(qh,n),a=fp(qh,n),[s,u]=g.useState(null),[l,c]=g.useState(null),d=zt(t,(e=>c(e))),f=c0(n),p=g.useRef(!1),m=g.useRef(!0),{viewport:h,selectedItem:y,selectedItemText:v,focusSelectedItem:b}=a,w=g.useCallback((()=>{if(i.trigger&&i.valueNode&&s&&l&&h&&y&&v){const e=i.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=i.valueNode.getBoundingClientRect(),o=v.getBoundingClientRect();if("rtl"!==i.dir){const r=o.left-t.left,i=n.left-r,a=e.left-i,u=e.width+a,l=Math.max(u,t.width),c=window.innerWidth-_l,d=UM(i,[_l,c-l]);s.style.minWidth=u+"px",s.style.left=d+"px"}else{const r=t.right-o.right,i=window.innerWidth-n.right-r,a=window.innerWidth-e.right-i,u=e.width+a,l=Math.max(u,t.width),c=window.innerWidth-_l,d=UM(i,[_l,c-l]);s.style.minWidth=u+"px",s.style.right=d+"px"}const a=f(),u=window.innerHeight-2*_l,c=h.scrollHeight,d=window.getComputedStyle(l),m=parseInt(d.borderTopWidth,10),g=parseInt(d.paddingTop,10),b=parseInt(d.borderBottomWidth,10),w=m+g+c+parseInt(d.paddingBottom,10)+b,A=Math.min(5*y.offsetHeight,w),x=window.getComputedStyle(h),S=parseInt(x.paddingTop,10),I=parseInt(x.paddingBottom,10),E=e.top+e.height/2-_l,C=u-E,P=y.offsetHeight/2,k=m+g+(y.offsetTop+P),_=w-k;if(k<=E){const e=y===a[a.length-1].ref.current;s.style.bottom="0px";const t=l.clientHeight-h.offsetTop-h.offsetHeight,n=k+Math.max(C,P+(e?I:0)+t+b);s.style.height=n+"px"}else{const e=y===a[0].ref.current;s.style.top="0px";const t=Math.max(E,m+h.offsetTop+(e?S:0)+P)+_;s.style.height=t+"px",h.scrollTop=k-E+h.offsetTop}s.style.margin=`${_l}px 0`,s.style.minHeight=A+"px",s.style.maxHeight=u+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[f,i.trigger,i.valueNode,s,l,h,y,v,i.dir,r]);Uo((()=>w()),[w]);const[A,x]=g.useState();Uo((()=>{l&&x(window.getComputedStyle(l).zIndex)}),[l]);const S=g.useCallback((e=>{e&&!0===m.current&&(w(),null==b||b(),m.current=!1)}),[w,b]);return g.createElement(BH,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:S},g.createElement("div",{ref:u,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A}},g.createElement(ft.div,Te({},o,{ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}}))))})),GM=g.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=_l,...i}=e,a=eC(n);return g.createElement(WI,Te({},a,i,{ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...i.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[BH,tC]=nm(qh,{}),WM="SelectViewport",VH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=fp(WM,n),i=tC(WM,n),a=zt(t,o.onViewportChange),s=g.useRef(0);return g.createElement(g.Fragment,null,g.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),g.createElement(l0.Slot,{scope:n},g.createElement(ft.div,Te({"data-radix-select-viewport":"",role:"presentation"},r,{ref:a,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:et(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=i;if(null!=r&&r.current&&n){const e=Math.abs(s.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*_l,o=parseFloat(n.style.minHeight),i=parseFloat(n.style.height),a=Math.max(o,i);if(a<r){const o=a+e,i=Math.min(r,o),s=o-i;n.style.height=i+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}s.current=t.scrollTop}))}))))})),jH="SelectGroup",[FH,zH]=nm(jH),UH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=hd();return g.createElement(FH,{scope:n,id:o},g.createElement(ft.div,Te({role:"group","aria-labelledby":o},r,{ref:t})))})),GH="SelectLabel",WH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,o=zH(GH,n);return g.createElement(ft.div,Te({id:o.id},r,{ref:t}))})),p_="SelectItem",[qH,kk]=nm(p_),HH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:i,...a}=e,s=dp(p_,n),u=fp(p_,n),l=s.value===r,[c,d]=g.useState(i??""),[f,p]=g.useState(!1),m=zt(t,(e=>{var t;return null===(t=u.itemRefCallback)||void 0===t?void 0:t.call(u,e,r,o)})),h=hd(),y=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(""===r)throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.createElement(qH,{scope:n,value:r,disabled:o,textId:h,isSelected:l,onItemTextChange:g.useCallback((e=>{d((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},g.createElement(l0.ItemSlot,{scope:n,value:r,disabled:o,textValue:c},g.createElement(ft.div,Te({role:"option","aria-labelledby":h,"data-highlighted":f?"":void 0,"aria-selected":l&&f,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1},a,{ref:m,onFocus:et(a.onFocus,(()=>p(!0))),onBlur:et(a.onBlur,(()=>p(!1))),onPointerUp:et(a.onPointerUp,y),onPointerMove:et(a.onPointerMove,(e=>{var t;o?null===(t=u.onItemLeave)||void 0===t||t.call(u):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:et(a.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=u.onItemLeave)||void 0===t||t.call(u))})),onKeyDown:et(a.onKeyDown,(e=>{var t;""!==(null===(t=u.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(SH.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))}))))})),Zg="SelectItemText",XH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:o,...i}=e,a=dp(Zg,n),s=fp(Zg,n),u=kk(Zg,n),l=EH(Zg,n),[c,d]=g.useState(null),f=zt(t,(e=>d(e)),u.onItemTextChange,(e=>{var t;return null===(t=s.itemTextRefCallback)||void 0===t?void 0:t.call(s,e,u.value,u.disabled)})),p=null==c?void 0:c.textContent,m=g.useMemo((()=>g.createElement("option",{key:u.value,value:u.value,disabled:u.disabled},p)),[u.disabled,u.value,p]),{onNativeOptionAdd:h,onNativeOptionRemove:y}=l;return Uo((()=>(h(m),()=>y(m))),[h,y,m]),g.createElement(g.Fragment,null,g.createElement(ft.span,Te({id:u.textId},i,{ref:f})),u.isSelected&&a.valueNode&&!a.valueNodeHasChildren?bu.createPortal(i.children,a.valueNode):null)})),QH="SelectItemIndicator",KH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return kk(QH,n).isSelected?g.createElement(ft.span,Te({"aria-hidden":!0},r,{ref:t})):null})),qM="SelectScrollUpButton",YH=g.forwardRef(((e,t)=>{const n=fp(qM,e.__scopeSelect),r=tC(qM,e.__scopeSelect),[o,i]=g.useState(!1),a=zt(t,r.onScrollButtonChange);return Uo((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;i(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?g.createElement(Lk,Te({},e,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),HM="SelectScrollDownButton",JH=g.forwardRef(((e,t)=>{const n=fp(HM,e.__scopeSelect),r=tC(HM,e.__scopeSelect),[o,i]=g.useState(!1),a=zt(t,r.onScrollButtonChange);return Uo((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;i(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),o?g.createElement(Lk,Te({},e,{ref:a,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),Lk=g.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,i=fp("SelectScrollButton",n),a=g.useRef(null),s=c0(n),u=g.useCallback((()=>{null!==a.current&&(window.clearInterval(a.current),a.current=null)}),[]);return g.useEffect((()=>()=>u()),[u]),Uo((()=>{var e;const t=s().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[s]),g.createElement(ft.div,Te({"aria-hidden":!0},o,{ref:t,style:{flexShrink:0,...o.style},onPointerDown:et(o.onPointerDown,(()=>{null===a.current&&(a.current=window.setInterval(r,50))})),onPointerMove:et(o.onPointerMove,(()=>{var e;null===(e=i.onItemLeave)||void 0===e||e.call(i),null===a.current&&(a.current=window.setInterval(r,50))})),onPointerLeave:et(o.onPointerLeave,(()=>{u()}))}))})),ZH=g.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return g.createElement(ft.div,Te({"aria-hidden":!0},r,{ref:t}))}));function Bk(e){return""===e||void 0===e}const Vk=g.forwardRef(((e,t)=>{const{value:n,...r}=e,o=g.useRef(null),i=zt(t,o),a=Zy(n);return g.useEffect((()=>{const e=o.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(a!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[a,n]),g.createElement($k,{asChild:!0},g.createElement("select",Te({},r,{ref:i,defaultValue:n})))}));function jk(e){const t=xs(e),n=g.useRef(""),r=g.useRef(0),o=g.useCallback((e=>{const o=n.current+e;t(o),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),i=g.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return g.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,o,i]}function Fk(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=n?e.indexOf(n):-1;let i=eX(e,Math.max(o,0));1===r.length&&(i=i.filter((e=>e!==n)));const a=i.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return a!==n?a:void 0}function eX(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}Vk.displayName="BubbleSelect";const zk=PH,nC=TH,Uk=OH,tX=DH,nX=$H,Gk=NH,rX=VH,Wk=UH,qk=WH,Hk=HH,oX=XH,iX=KH,Xk=YH,Qk=JH,Kk=ZH,aX=zk,rC=g.forwardRef((({...e},t)=>z.jsx(aX,{ref:t,...e})));rC.displayName=zk.displayName;const Yk=g.forwardRef(((e,t)=>z.jsx(Wk,{ref:t,...e})));Yk.displayName=Wk.displayName;const Jk=g.forwardRef(((e,t)=>z.jsx(Uk,{ref:t,...e})));Jk.displayName=Uk.displayName;const oC=g.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,renderCaret:i,...a},s)=>{const u=i?i():z.jsx(sD,{size:20,className:"transition-transform duration-200 group-data-[state=open]/select:rotate-180"});return z.jsxs("div",{className:"w-full",children:[z.jsxs(nC,{ref:s,className:ye("group/select flex h-l w-full items-center justify-between rounded-m border bg-background p-xxs text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus-visible:ring-gray-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",r?"border-red-500":"border-input",e),...a,children:[z.jsxs("div",{className:ye("flex w-full flex-1 items-center gap-xxs",{"max-w-[calc(100%-20px)]":u}),children:[o&&z.jsx("span",{className:ye("text-muted-foreground",{"text-red-dark":r}),children:o}),t]}),z.jsx(tX,{asChild:!0,children:u})]}),n||r?r?z.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-red-600",children:[z.jsx(Ny,{size:16}),r]}):z.jsxs("div",{className:"mt-xxs flex items-center gap-xxxs text-sm text-muted-foreground",children:[z.jsx(t8,{size:16}),n]}):null]})}));oC.displayName="SelectTriggerWrapper";const Zk=g.forwardRef((({className:e,children:t,caption:n,error:r,icon:o,...i},a)=>z.jsx(oC,{ref:a,className:ye("[&>span]:line-clamp-1 [&>span]:text-left",e),caption:n,error:r,icon:o,...i,children:t})));Zk.displayName=nC.displayName;const iC=g.forwardRef((({className:e,children:t,position:n="popper",...r},o)=>{const i=g.useMemo((()=>{const e=t=>{var n,r;if(!t)return!1;if(Array.isArray(t))return t.some(e);if(g.isValidElement(t)){const o=null==(n=t.type)?void 0:n.displayName;return"SelectActions"===o||"SelectFooter"===o||e(null==(r=t.props)?void 0:r.children)}return!1};return e(t)}),[t]);return z.jsx(nX,{children:z.jsx(Gk,{ref:o,className:ye("z-[101] flex max-h-[var(--radix-select-content-available-height)] min-w-[8rem] flex-col rounded-lg border border-gray-200 bg-white text-popover-foreground","shadow-[0px_0px_12px_0px_rgba(0,0,0,0.08)]","data-[state=open]:animate-in data-[state=closed]:animate-out ","data-[state=open]:fade-in data-[state=open]:slide-in-from-top-2 ","data-[state=closed]:fade-out data-[state=closed]:slide-out-to-top-2 ","data-[state=closed]:duration-150 data-[state=open]:duration-150 ","data-[state=closed]:[animation-timing-function:ease-in] data-[state=open]:[animation-timing-function:ease-out]","popper"===n&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:z.jsx(rX,{className:ye("flex flex-col gap-xxxs overflow-y-auto px-xxs",{"py-xxs":!i},"popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})})}));iC.displayName=Gk.displayName;const e3=g.forwardRef((({className:e,...t},n)=>z.jsx(qk,{ref:n,className:ye("text-sm font-medium text-gray-900",e),...t})));e3.displayName=qk.displayName;const t3=g.forwardRef((({className:e,showCheck:t=!0,checkPosition:n="right",children:r,...o},i)=>{const a=z.jsx(iX,{children:z.jsx($y,{size:20})});return z.jsxs(Hk,{ref:i,className:ye("relative flex cursor-default select-none items-center gap-xxs rounded-m p-xxs","text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[t&&"left"===n&&a,z.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:z.jsx(oX,{children:r})}),t&&"right"===n&&a]})}));t3.displayName=Hk.displayName;const n3=g.forwardRef((({className:e,...t},n)=>z.jsx(Kk,{ref:n,className:ye("-mx-1 my-1 h-px bg-gray-200",e),...t})));n3.displayName=Kk.displayName;const sX=({selectedValues:e=[],onRemoveValue:t})=>{const n=g.useRef(null),[r,o]=g.useState(e.length);return g.useLayoutEffect((()=>{if(!n.current||0===e.length)return void o(e.length);const r=n.current.offsetWidth-60,i=document.createElement("div");Object.assign(i.style,{position:"absolute",visibility:"hidden",whiteSpace:"nowrap",display:"flex",gap:"4px",top:"-9999px",left:"-9999px"}),document.body.appendChild(i);let a=0,s=0;for(const n of e){const e=document.createElement("div");e.className="gap-xxxs p-xxs flex cursor-pointer items-center rounded-sm bg-gray-100 text-sm font-medium text-gray-900";const o=document.createElement("span");if(o.textContent="string"==typeof n?n:n.value,e.appendChild(o),"string"!=typeof n&&n.avatar){const t=document.createElement("div");t.className="w-6 h-6 rounded-full bg-gray-300 flex-shrink-0",e.insertBefore(t,o)}if(t){const t=document.createElement("button");t.innerHTML="×",t.className="ml-1 rounded-full outline-none",e.appendChild(t)}i.appendChild(e);const u=e.offsetWidth+4;if(!(a+u<=r))break;a+=u,s++}document.body.removeChild(i),o(Math.max(1,s))}),[e,t]),{containerRef:n,visibleCount:r}},r3=({hiddenCount:e,selectedValues:t=[],onRemoveValue:n})=>{const r=e=>{e.stopPropagation(),e.preventDefault()};return z.jsx("div",{onPointerDown:r,onMouseDown:r,onClick:r,children:z.jsxs(rC,{name:"hidden-chips-counter",children:[z.jsx(nC,{asChild:!0,children:z.jsx("div",{children:z.jsx(W$,{text:`+${e}`})})}),z.jsx(iC,{align:"end",className:"max-h-[250px] w-screen max-w-[300px] gap-xxxs overflow-y-auto",children:t.map((e=>{const t="string"==typeof e?e:e.value;return z.jsxs("div",{className:"flex justify-between p-xxs",onClick:e=>e.stopPropagation(),children:[z.jsx("span",{children:t}),z.jsx(Wv,{size:16,className:"cursor-pointer",onClick:()=>null==n?void 0:n(t)})]},t)}))})]})})};r3.displayName="SelectHiddenChipsCounter";const uX=g.forwardRef(((e,t)=>{const{className:n,selectedValues:r=[],placeholder:o,onRemoveValue:i,icon:a,caption:s,error:u,...l}=e,{containerRef:c,visibleCount:d}=sX({selectedValues:r,onRemoveValue:i}),f=r.length-d;return z.jsx(oC,{ref:t,className:n,caption:s,error:u,icon:a,...l,children:z.jsx("div",{ref:c,className:"flex w-full flex-1 flex-nowrap overflow-hidden",children:0===r.length?z.jsx("span",{children:o||"Select options..."}):z.jsxs(uz,{children:[r.slice(0,d).map((e=>{const t="string"==typeof e?e:e.value;return z.jsx(W$,{avatarSrc:"string"==typeof e?void 0:e.avatar,text:t,onRemove:()=>null==i?void 0:i(t)},t)})),f>0&&z.jsx(r3,{hiddenCount:f,onRemoveValue:i,selectedValues:r})]})})})}));uX.displayName="SelectMultiTrigger";const lX=g.forwardRef((({value:e,isSelected:t=!1,isLoading:n=!1,checkboxPosition:r="right",onSelect:o,className:i,children:a,...s},u)=>{const l=n?z.jsx(q_,{size:24,className:"flex-shrink-0 animate-spin text-blue_100"}):z.jsx(PI,{size:"default",variant:"default",checked:t}),c=()=>{null==o||o(e)};return z.jsxs("div",{ref:u,className:ye("relative flex cursor-pointer select-none items-center gap-xxs rounded-m","p-xxs text-base font-medium text-gray-900 outline-none transition-colors hover:bg-gray-100","focus:bg-accent focus:text-accent-foreground",{"pointer-events-none":n},i),onClick:c,role:"button",tabIndex:0,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),c())},...s,children:["left"===r&&l,z.jsx("div",{className:"flex flex-1 items-center gap-xxs",children:a}),"right"===r&&l]})}));lX.displayName="SelectCheckboxItem";const cX=g.forwardRef((({className:e,...t},n)=>z.jsx(Xk,{ref:n,className:ye("flex cursor-default items-center justify-center py-xxs",e),...t,children:z.jsx(W7,{size:16})})));cX.displayName=Xk.displayName;const dX=g.forwardRef((({className:e,...t},n)=>z.jsx(Qk,{ref:n,className:ye("flex cursor-default items-center justify-center p-xxs",e),...t,children:z.jsx(sD,{size:16})})));dX.displayName=Qk.displayName;const fX=g.forwardRef((({className:e,children:t,...n},r)=>z.jsx("div",{ref:r,className:ye("sticky top-0 z-20 bg-white p-xxs",e),...n,children:t})));fX.displayName="SelectActions";const pX=g.forwardRef((({className:e,children:t,...n},r)=>z.jsx("div",{ref:r,className:ye("sticky bottom-0 z-20 bg-white p-xxs",e),...n,children:t})));pX.displayName="SelectFooter";const hX=g.createContext({}),Pd=()=>{const e=g.useContext(hX),t=g.useContext(o3),n=yH();e||console.error("useFormContext must be used within a FormProvider");const{getFieldState:r,formState:o}=n,i=r(e.name,o);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:a}=t;return{id:a,name:e.name,formItemId:`${a}-form-item`,formDescriptionId:`${a}-form-item-description`,formMessageId:`${a}-form-item-message`,...i}},o3=g.createContext({}),mX=g.forwardRef((({className:e,...t},n)=>{const r=g.useId();return z.jsx(o3.Provider,{value:{id:r},children:z.jsx("div",{ref:n,className:ye("mt-[8px]",e),...t})})}));mX.displayName="FormItem";const vX=g.forwardRef((({className:e,isRequired:t,...n},r)=>{const{formItemId:o}=Pd();return z.jsxs(Dk,{ref:r,className:ye("mb-2 text-sm font-medium",e),htmlFor:o,...n,children:[t&&"*",n.children]})}));vX.displayName="FormLabel";const gX=g.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:o,formMessageId:i}=Pd();return z.jsx(Cd,{ref:t,id:r,"aria-describedby":n?`${o} ${i}`:`${o}`,"aria-invalid":!!n,...e})}));gX.displayName="FormControl";const yX=g.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=Pd();return z.jsx("p",{ref:n,id:r,className:ye("text-sm text-muted-foreground",e),...t})}));yX.displayName="FormDescription";const wX=g.forwardRef((({className:e,children:t,...n},r)=>{const{error:o,formMessageId:i}=Pd(),a=o?String(null==o?void 0:o.message):t;return a?z.jsxs("p",{ref:r,id:i,className:ye("flex items-start gap-1 pt-xxs text-sm text-red-dark",e),...n,children:[z.jsx(Ny,{size:16,className:"text-red-dark"})," ",a]}):null}));wX.displayName="FormMessage";const bX=g.forwardRef((({...e},t)=>{const{name:n}=Pd();return z.jsx(rC,{ref:t,name:n,...e})}));bX.displayName="FormSelect";const xX=g.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:o}=Pd();return z.jsx(Zk,{ref:r,id:o,className:e,...n,children:t})}));xX.displayName="FormSelectTrigger";const AX=g.forwardRef(((e,t)=>z.jsx(iC,{ref:t,...e})));AX.displayName="FormSelectContent";const SX=g.forwardRef(((e,t)=>z.jsx(t3,{ref:t,...e})));SX.displayName="FormSelectItem";const _X=g.forwardRef(((e,t)=>z.jsx(Yk,{ref:t,...e})));_X.displayName="FormSelectGroup";const IX=g.forwardRef(((e,t)=>z.jsx(e3,{ref:t,...e})));IX.displayName="FormSelectLabel";const CX=g.forwardRef(((e,t)=>z.jsx(n3,{ref:t,...e})));CX.displayName="FormSelectSeparator";const EX=g.forwardRef(((e,t)=>z.jsx(Jk,{ref:t,...e})));function Xf(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}function i3(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>g.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return g.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=g.createContext(r),i=n.length;function a(t){const{scope:n,children:r,...a}=t,s=(null==n?void 0:n[e][i])||o,u=g.useMemo((()=>a),Object.values(a));return g.createElement(s.Provider,{value:u},r)}return n=[...n,r],a.displayName=t+"Provider",[a,function(n,a){const s=(null==a?void 0:a[e][i])||o,u=g.useContext(s);if(u)return u;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},PX(r,...t)]}function PX(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return g.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function d0(e){const t=g.useRef(e);return g.useEffect((()=>{t.current=e})),g.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function RX(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function TX(...e){return t=>e.forEach((e=>RX(e,t)))}function MX(...e){return g.useCallback(TX(...e),e)}function pp(e){return e.split("-")[0]}function tg(e){return e.split("-")[1]}function rm(e){return["top","bottom"].includes(pp(e))?"x":"y"}function aC(e){return"y"===e?"height":"width"}function XM(e,t,n){let{reference:r,floating:o}=e;const i=r.x+r.width/2-o.width/2,a=r.y+r.height/2-o.height/2,s=rm(t),u=aC(s),l=r[u]/2-o[u]/2,c="x"===s;let d;switch(pp(t)){case"top":d={x:i,y:r.y-o.height};break;case"bottom":d={x:i,y:r.y+r.height};break;case"right":d={x:r.x+r.width,y:a};break;case"left":d={x:r.x-o.width,y:a};break;default:d={x:r.x,y:r.y}}switch(tg(t)){case"start":d[s]-=l*(n&&c?-1:1);break;case"end":d[s]+=l*(n&&c?-1:1)}return d}EX.displayName="FormSelectValue";const OX=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:a}=n,s=await(null==a.isRTL?void 0:a.isRTL(t));let u=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:l,y:c}=XM(u,r,s),d=r,f={},p=0;for(let n=0;n<i.length;n++){const{name:m,fn:h}=i[n],{x:g,y:y,data:v,reset:b}=await h({x:l,y:c,initialPlacement:r,placement:d,strategy:o,middlewareData:f,rects:u,platform:a,elements:{reference:e,floating:t}});l=g??l,c=y??c,f={...f,[m]:{...f[m],...v}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(u=!0===b.rects?await a.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:l,y:c}=XM(u,d,s))),n=-1)}return{x:l,y:c,placement:d,strategy:o,middlewareData:f}};function a3(e){return"number"!=typeof e?(t=e,{top:0,right:0,bottom:0,left:0,...t}):{top:e,right:e,bottom:e,left:e};var t}function by(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function kv(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:a,elements:s,strategy:u}=e,{boundary:l="clippingAncestors",rootBoundary:c="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=t,m=a3(p),h=s[f?"floating"===d?"reference":"floating":d],g=by(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(h)))||n?h:h.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:l,rootBoundary:c,strategy:u})),y=by(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===d?{...a.floating,x:r,y:o}:a.reference,offsetParent:await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),strategy:u}):a[d]);return{top:g.top-y.top+m.top,bottom:y.bottom-g.bottom+m.bottom,left:g.left-y.left+m.left,right:y.right-g.right+m.right}}const DX=Math.min,zf=Math.max;function h_(e,t,n){return zf(e,DX(t,n))}const QM=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:o,y:i,placement:a,rects:s,platform:u}=t;if(null==n)return{};const l=a3(r),c={x:o,y:i},d=rm(a),f=tg(a),p=aC(d),m=await u.getDimensions(n),h="y"===d?"top":"left",g="y"===d?"bottom":"right",y=s.reference[p]+s.reference[d]-c[d]-s.floating[p],v=c[d]-s.reference[d],b=await(null==u.getOffsetParent?void 0:u.getOffsetParent(n));let w=b?"y"===d?b.clientHeight||0:b.clientWidth||0:0;0===w&&(w=s.floating[p]);const A=y/2-v/2,x=l[h],S=w-m[p]-l[g],I=w/2-m[p]/2+A,E=h_(x,I,S),C=("start"===f?l[h]:l[g])>0&&I!==E&&s.reference[p]<=s.floating[p];return{[d]:c[d]-(C?I<x?x-I:S-I:0),data:{[d]:E,centerOffset:I-E}}}}),$X={left:"right",right:"left",bottom:"top",top:"bottom"};function xy(e){return e.replace(/left|right|bottom|top/g,(e=>$X[e]))}function NX(e,t,n){void 0===n&&(n=!1);const r=tg(e),o=rm(e),i=aC(o);let a="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=xy(a)),{main:a,cross:xy(a)}}const kX={start:"end",end:"start"};function KM(e){return e.replace(/start|end/g,(e=>kX[e]))}const s3=["top","right","bottom","left"];s3.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const LX=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:o,rects:i,initialPlacement:a,platform:s,elements:u}=t,{mainAxis:l=!0,crossAxis:c=!0,fallbackPlacements:d,fallbackStrategy:f="bestFit",flipAlignment:p=!0,...m}=e,h=pp(r),g=[a,...d||(h!==a&&p?function(e){const t=xy(e);return[KM(e),t,KM(t)]}(a):[xy(a)])],y=await kv(t,m),v=[];let b=(null==(n=o.flip)?void 0:n.overflows)||[];if(l&&v.push(y[h]),c){const{main:e,cross:t}=NX(r,i,await(null==s.isRTL?void 0:s.isRTL(u.floating)));v.push(y[e],y[t])}if(b=[...b,{placement:r,overflows:v}],!v.every((e=>e<=0))){var w,A;const e=(null!=(w=null==(A=o.flip)?void 0:A.index)?w:0)+1,t=g[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(f){case"bestFit":{var x;const e=null==(x=b.map((e=>[e,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:x[0].placement;e&&(n=e);break}case"initialPlacement":n=a}if(r!==n)return{reset:{placement:n}}}return{}}}};function YM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function JM(e){return s3.some((t=>e[t]>=0))}const BX=function(e){let{strategy:t="referenceHidden",...n}=void 0===e?{}:e;return{name:"hide",async fn(e){const{rects:r}=e;switch(t){case"referenceHidden":{const t=YM(await kv(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:JM(t)}}}case"escaped":{const t=YM(await kv(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:JM(t)}}}default:return{}}}}},VX=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,o=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),a=pp(n),s=tg(n),u="x"===rm(n),l=["left","top"].includes(a)?-1:1,c=i&&u?-1:1,d="function"==typeof t?t(e):t;let{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),u?{x:p*c,y:f*l}:{x:f*l,y:p*c}}(t,e);return{x:n+o.x,y:r+o.y,data:o}}}};function u3(e){return"x"===e?"y":"x"}const jX=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...u}=e,l={x:n,y:r},c=await kv(t,u),d=rm(pp(o)),f=u3(d);let p=l[d],m=l[f];if(i){const e="y"===d?"bottom":"right";p=h_(p+c["y"===d?"top":"left"],p,p-c[e])}if(a){const e="y"===f?"bottom":"right";m=h_(m+c["y"===f?"top":"left"],m,m-c[e])}const h=s.fn({...t,[d]:p,[f]:m});return{...h,data:{x:h.x-n,y:h.y-r}}}}},FX=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:u=!0,crossAxis:l=!0}=e,c={x:n,y:r},d=rm(o),f=u3(d);let p=c[d],m=c[f];const h="function"==typeof s?s({...i,placement:o}):s,g="number"==typeof h?{mainAxis:h,crossAxis:0}:{mainAxis:0,crossAxis:0,...h};if(u){const e="y"===d?"height":"width",t=i.reference[d]-i.floating[e]+g.mainAxis,n=i.reference[d]+i.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var y,v,b,w;const e="y"===d?"width":"height",t=["top","left"].includes(pp(o)),n=i.reference[f]-i.floating[e]+(t&&null!=(y=null==(v=a.offset)?void 0:v[f])?y:0)+(t?0:g.crossAxis),r=i.reference[f]+i.reference[e]+(t?0:null!=(b=null==(w=a.offset)?void 0:w[f])?b:0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[d]:p,[f]:m}}}},zX=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:o,elements:i}=t,{apply:a,...s}=e,u=await kv(t,s),l=pp(n),c=tg(n);let d,f;"top"===l||"bottom"===l?(d=l,f=c===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(f=l,d="end"===c?"top":"bottom");const p=zf(u.left,0),m=zf(u.right,0),h=zf(u.top,0),g=zf(u.bottom,0),y={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==h||0!==g?h+g:zf(u.top,u.bottom)):u[d]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==m?p+m:zf(u.left,u.right)):u[f])},v=await o.getDimensions(i.floating);null==a||a({...t,...y});const b=await o.getDimensions(i.floating);return v.width!==b.width||v.height!==b.height?{reset:{rects:!0}}:{}}}};function l3(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function $l(e){if(null==e)return window;if(!l3(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function ng(e){return $l(e).getComputedStyle(e)}function Cl(e){return l3(e)?"":e?(e.nodeName||"").toLowerCase():""}function c3(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function wu(e){return e instanceof $l(e).HTMLElement}function Id(e){return e instanceof $l(e).Element}function sC(e){return!(typeof ShadowRoot>"u")&&(e instanceof $l(e).ShadowRoot||e instanceof ShadowRoot)}function f0(e){const{overflow:t,overflowX:n,overflowY:r}=ng(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function UX(e){return["table","td","th"].includes(Cl(e))}function ZM(e){const t=/firefox/i.test(c3()),n=ng(e);return"none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||["transform","perspective"].includes(n.willChange)||t&&"filter"===n.willChange||t&&!!n.filter&&"none"!==n.filter}function d3(){return!/^((?!chrome|android).)*safari/i.test(c3())}const e2=Math.min,yv=Math.max,Ay=Math.round;function El(e,t,n){var r,o,i,a;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect();let u=1,l=1;t&&wu(e)&&(u=e.offsetWidth>0&&Ay(s.width)/e.offsetWidth||1,l=e.offsetHeight>0&&Ay(s.height)/e.offsetHeight||1);const c=Id(e)?$l(e):window,d=!d3()&&n,f=(s.left+(d&&null!=(r=null==(o=c.visualViewport)?void 0:o.offsetLeft)?r:0))/u,p=(s.top+(d&&null!=(i=null==(a=c.visualViewport)?void 0:a.offsetTop)?i:0))/l,m=s.width/u,h=s.height/l;return{width:m,height:h,top:p,right:f+m,bottom:p+h,left:f,x:f,y:p}}function vd(e){return(t=e,(t instanceof $l(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function p0(e){return Id(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function f3(e){return El(vd(e)).left+p0(e).scrollLeft}function GX(e,t,n){const r=wu(t),o=vd(t),i=El(e,r&&function(e){const t=El(e);return Ay(t.width)!==e.offsetWidth||Ay(t.height)!==e.offsetHeight}(t),"fixed"===n);let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==Cl(t)||f0(o))&&(a=p0(t)),wu(t)){const e=El(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else o&&(s.x=f3(o));return{x:i.left+a.scrollLeft-s.x,y:i.top+a.scrollTop-s.y,width:i.width,height:i.height}}function p3(e){return"html"===Cl(e)?e:e.assignedSlot||e.parentNode||(sC(e)?e.host:null)||vd(e)}function t2(e){return wu(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function m_(e){const t=$l(e);let n=t2(e);for(;n&&UX(n)&&"static"===getComputedStyle(n).position;)n=t2(n);return n&&("html"===Cl(n)||"body"===Cl(n)&&"static"===getComputedStyle(n).position&&!ZM(n))?t:n||function(e){let t=p3(e);for(sC(t)&&(t=t.host);wu(t)&&!["html","body"].includes(Cl(t));){if(ZM(t))return t;t=t.parentNode}return null}(e)||t}function n2(e){if(wu(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=El(e);return{width:t.width,height:t.height}}function h3(e){const t=p3(e);return["html","body","#document"].includes(Cl(t))?e.ownerDocument.body:wu(t)&&f0(t)?t:h3(t)}function Sy(e,t){var n;void 0===t&&(t=[]);const r=h3(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=$l(r),a=o?[i].concat(i.visualViewport||[],f0(r)?r:[]):r,s=t.concat(a);return o?s:s.concat(Sy(a))}function r2(e,t,n){return"viewport"===t?by(function(e,t){const n=$l(e),r=vd(e),o=n.visualViewport;let i=r.clientWidth,a=r.clientHeight,s=0,u=0;if(o){i=o.width,a=o.height;const e=d3();(e||!e&&"fixed"===t)&&(s=o.offsetLeft,u=o.offsetTop)}return{width:i,height:a,x:s,y:u}}(e,n)):Id(t)?function(e,t){const n=El(e,!1,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft;return{top:r,left:o,x:o,y:r,right:o+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):by(function(e){var t;const n=vd(e),r=p0(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=yv(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=yv(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0);let s=-r.scrollLeft+f3(e);const u=-r.scrollTop;return"rtl"===ng(o||n).direction&&(s+=yv(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:a,x:s,y:u}}(vd(e)))}function WX(e){const t=Sy(e),n=["absolute","fixed"].includes(ng(e).position)&&wu(e)?m_(e):e;return Id(n)?t.filter((e=>Id(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&sC(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==Cl(e))):[]}const qX={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?WX(t):[].concat(n),r],a=i[0],s=i.reduce(((e,n)=>{const r=r2(t,n,o);return e.top=yv(r.top,e.top),e.right=e2(r.right,e.right),e.bottom=e2(r.bottom,e.bottom),e.left=yv(r.left,e.left),e}),r2(t,a,o));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const o=wu(n),i=vd(n);if(n===i)return t;let a={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((o||!o&&"fixed"!==r)&&(("body"!==Cl(n)||f0(i))&&(a=p0(n)),wu(n))){const e=El(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-a.scrollLeft+s.x,y:t.y-a.scrollTop+s.y}},isElement:Id,getDimensions:n2,getOffsetParent:m_,getDocumentElement:vd,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:GX(t,m_(n),r),floating:{...n2(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===ng(e).direction};function HX(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a=!0,animationFrame:s=!1}=r,u=o&&!s,l=i&&!s,c=u||l?[...Id(e)?Sy(e):[],...Sy(t)]:[];c.forEach((e=>{u&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)}));let d,f=null;if(a){let r=!0;f=new ResizeObserver((()=>{r||n(),r=!1})),Id(e)&&!s&&f.observe(e),f.observe(t)}let p=s?El(e):null;return s&&function t(){const r=El(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,d=requestAnimationFrame(t)}(),n(),()=>{var e;c.forEach((e=>{u&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)})),null==(e=f)||e.disconnect(),f=null,s&&cancelAnimationFrame(d)}}const XX=(e,t,n)=>OX(e,t,{platform:qX,...n});var v_=typeof document<"u"?g.useLayoutEffect:g.useEffect;function g_(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;0!=r--;)if(!g_(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||g_(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function QX(e){const t=g.useRef(e);return v_((()=>{t.current=e})),t}function KX(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:o}=void 0===e?{}:e;const i=g.useRef(null),a=g.useRef(null),s=QX(o),u=g.useRef(null),[l,c]=g.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[d,f]=g.useState(t);g_(null==d?void 0:d.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||f(t);const p=g.useCallback((()=>{!i.current||!a.current||XX(i.current,a.current,{middleware:d,placement:n,strategy:r}).then((e=>{m.current&&bu.flushSync((()=>{c(e)}))}))}),[d,n,r]);v_((()=>{m.current&&p()}),[p]);const m=g.useRef(!1);v_((()=>(m.current=!0,()=>{m.current=!1})),[]);const h=g.useCallback((()=>{if("function"==typeof u.current&&(u.current(),u.current=null),i.current&&a.current)if(s.current){const e=s.current(i.current,a.current,p);u.current=e}else p()}),[p,s]),y=g.useCallback((e=>{i.current=e,h()}),[h]),v=g.useCallback((e=>{a.current=e,h()}),[h]),b=g.useMemo((()=>({reference:i,floating:a})),[]);return g.useMemo((()=>({...l,update:p,refs:b,reference:y,floating:v})),[l,p,b,y,v])}const YX=e=>{const{element:t,padding:n}=e;return{name:"arrow",options:e,fn:e=>function(e){return Object.prototype.hasOwnProperty.call(e,"current")}(t)?null!=t.current?QM({element:t.current,padding:n}).fn(e):{}:t?QM({element:t,padding:n}).fn(e):{}}};function JX(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function ZX(...e){return t=>e.forEach((e=>JX(e,t)))}const m3=g.forwardRef(((e,t)=>{const{children:n,...r}=e,o=g.Children.toArray(n),i=o.find(tQ);if(i){const e=i.props.children,n=o.map((t=>t===i?g.Children.count(e)>1?g.Children.only(null):g.isValidElement(e)?e.props.children:null:t));return g.createElement(y_,Te({},r,{ref:t}),g.isValidElement(e)?g.cloneElement(e,void 0,n):null)}return g.createElement(y_,Te({},r,{ref:t}),n)}));m3.displayName="Slot";const y_=g.forwardRef(((e,t)=>{const{children:n,...r}=e;return g.isValidElement(n)?g.cloneElement(n,{...nQ(r,n.props),ref:ZX(t,n.ref)}):g.Children.count(n)>1?g.Children.only(null):null}));y_.displayName="SlotClone";const eQ=({children:e})=>g.createElement(g.Fragment,null,e);function tQ(e){return g.isValidElement(e)&&e.type===eQ}function nQ(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{i(...e),o(...e)}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}const rQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],w_=rQ.reduce(((e,t)=>{const n=g.forwardRef(((e,n)=>{const{asChild:r,...o}=e,i=r?m3:t;return g.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),g.createElement(i,Te({},o,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function oQ(e,t){e&&bu.flushSync((()=>e.dispatchEvent(t)))}function iQ(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function aQ(...e){return t=>e.forEach((e=>iQ(e,t)))}function sQ(...e){return g.useCallback(aQ(...e),e)}const qf=null!=globalThis&&globalThis.document?g.useLayoutEffect:()=>{};function uQ(e){const[t,n]=g.useState(void 0);return qf((()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t)||!t.length)return;const r=t[0];let o,i;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;n({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const v3="Popper",[uC,g3]=i3(v3),[Tce,lQ]=uC(v3),_y="PopperContent",[cQ,Mce]=uC(_y),[dQ,fQ]=uC(_y,{hasParent:!1,positionUpdateFns:new Set}),pQ=g.forwardRef(((e,t)=>{var n,r,o,i,a,s,u,l;const{__scopePopper:c,side:d="bottom",sideOffset:f=0,align:p="center",alignOffset:m=0,arrowPadding:h=0,collisionBoundary:y=[],collisionPadding:v=0,sticky:b="partial",hideWhenDetached:w=!1,avoidCollisions:A=!0,onPlaced:x,...S}=e,I=lQ(_y,c),[E,C]=g.useState(null),P=sQ(t,(e=>C(e))),[k,_]=g.useState(null),T=uQ(k),M=null!==(n=null==T?void 0:T.width)&&void 0!==n?n:0,O=null!==(r=null==T?void 0:T.height)&&void 0!==r?r:0,R=d+("center"!==p?"-"+p:""),N="number"==typeof v?v:{top:0,right:0,bottom:0,left:0,...v},z=Array.isArray(y)?y:[y],D=z.length>0,j={padding:N,boundary:z.filter(mQ),altBoundary:D},{reference:V,floating:L,strategy:q,x:B,y:U,placement:F,middlewareData:G,update:W}=KX({strategy:"fixed",placement:R,whileElementsMounted:HX,middleware:[vQ(),VX({mainAxis:f+O,alignmentAxis:m}),A?jX({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?FX():void 0,...j}):void 0,k?YX({element:k,padding:h}):void 0,A?LX({...j}):void 0,zX({...j,apply:({elements:e,availableWidth:t,availableHeight:n})=>{e.floating.style.setProperty("--radix-popper-available-width",`${t}px`),e.floating.style.setProperty("--radix-popper-available-height",`${n}px`)}}),gQ({arrowWidth:M,arrowHeight:O}),w?BX({strategy:"referenceHidden"}):void 0].filter(hQ)});qf((()=>{V(I.anchor)}),[V,I.anchor]);const Q=null!==B&&null!==U,[H,X]=y3(F),K=d0(x);qf((()=>{Q&&(null==K||K())}),[Q,K]);const Y=null===(o=G.arrow)||void 0===o?void 0:o.x,J=null===(i=G.arrow)||void 0===i?void 0:i.y,Z=0!==(null===(a=G.arrow)||void 0===a?void 0:a.centerOffset),[$,ee]=g.useState();qf((()=>{E&&ee(window.getComputedStyle(E).zIndex)}),[E]);const{hasParent:te,positionUpdateFns:ne}=fQ(_y,c),re=!te;g.useLayoutEffect((()=>{if(!re)return ne.add(W),()=>{ne.delete(W)}}),[re,ne,W]),qf((()=>{re&&Q&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,Q,ne]);const oe={"data-side":H,"data-align":X,...S,ref:P,style:{...S.style,animation:Q?void 0:"none",opacity:null!==(s=G.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return g.createElement("div",{ref:L,"data-radix-popper-content-wrapper":"",style:{position:q,left:0,top:0,transform:Q?`translate3d(${Math.round(B)}px, ${Math.round(U)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:$,"--radix-popper-transform-origin":[null===(u=G.transformOrigin)||void 0===u?void 0:u.x,null===(l=G.transformOrigin)||void 0===l?void 0:l.y].join(" ")},dir:e.dir},g.createElement(cQ,{scope:c,placedSide:H,onArrowChange:_,arrowX:Y,arrowY:J,shouldHideArrow:Z},re?g.createElement(dQ,{scope:c,hasParent:!0,positionUpdateFns:ne},g.createElement(w_.div,oe)):g.createElement(w_.div,oe)))}));function hQ(e){return void 0!==e}function mQ(e){return null!==e}const vQ=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:o}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${o}px`),{}}}),gQ=e=>({name:"transformOrigin",options:e,fn(t){var n,r,o,i,a;const{placement:s,rects:u,middlewareData:l}=t,c=0!==(null===(n=l.arrow)||void 0===n?void 0:n.centerOffset),d=c?0:e.arrowWidth,f=c?0:e.arrowHeight,[p,m]=y3(s),h={start:"0%",center:"50%",end:"100%"}[m],g=(null!==(r=null===(o=l.arrow)||void 0===o?void 0:o.x)&&void 0!==r?r:0)+d/2,y=(null!==(i=null===(a=l.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let v="",b="";return"bottom"===p?(v=c?h:`${g}px`,b=-f+"px"):"top"===p?(v=c?h:`${g}px`,b=`${u.floating.height+f}px`):"right"===p?(v=-f+"px",b=c?h:`${y}px`):"left"===p&&(v=`${u.floating.width+f}px`,b=c?h:`${y}px`),{data:{x:v,y:b}}}});function y3(e){const[t,n="center"]=e.split("-");return[t,n]}const yQ=pQ;function wQ(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function bQ(...e){return t=>e.forEach((e=>wQ(e,t)))}function xQ(...e){return g.useCallback(bQ(...e),e)}function AQ(e,t){return g.useReducer(((e,n)=>t[e][n]??e),e)}const w3=e=>{const{present:t,children:n}=e,r=SQ(t),o="function"==typeof n?n({present:r.isPresent}):g.Children.only(n),i=xQ(r.ref,o.ref);return"function"==typeof n||r.isPresent?g.cloneElement(o,{ref:i}):null};function SQ(e){const[t,n]=g.useState(),r=g.useRef({}),o=g.useRef(e),i=g.useRef("none"),a=e?"mounted":"unmounted",[s,u]=AQ(a,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect((()=>{const e=ey(r.current);i.current="mounted"===s?e:"none"}),[s]),qf((()=>{const t=r.current,n=o.current;if(n!==e){const r=i.current,a=ey(t);e?u("MOUNT"):"none"===a||"none"===(null==t?void 0:t.display)?u("UNMOUNT"):u(n&&r!==a?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,u]),qf((()=>{if(t){const e=e=>{const n=ey(r.current).includes(e.animationName);e.target===t&&n&&bu.flushSync((()=>u("ANIMATION_END")))},n=e=>{e.target===t&&(i.current=ey(r.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}u("ANIMATION_END")}),[t,u]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:g.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function ey(e){return(null==e?void 0:e.animationName)||"none"}function _Q(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function IQ(...e){return t=>e.forEach((e=>_Q(e,t)))}function CQ(...e){return g.useCallback(IQ(...e),e)}function EQ(e,t=(null==globalThis?void 0:globalThis.document)){const n=d0(e);g.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}w3.displayName="Presence";const b_="dismissableLayer.update",PQ="dismissableLayer.pointerDownOutside",RQ="dismissableLayer.focusOutside";let o2;const TQ=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),MQ=g.forwardRef(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:a,onInteractOutside:s,onDismiss:u,...l}=e,c=g.useContext(TQ),[d,f]=g.useState(null),p=null!==(n=null==d?void 0:d.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,m]=g.useState({}),h=CQ(t,(e=>f(e))),y=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(v),w=d?y.indexOf(d):-1,A=c.layersWithOutsidePointerEventsDisabled.size>0,x=w>=b,S=OQ((e=>{const t=e.target,n=[...c.branches].some((e=>e.contains(t)));!x||n||(null==i||i(e),null==s||s(e),e.defaultPrevented||null==u||u())}),p),I=DQ((e=>{const t=e.target;[...c.branches].some((e=>e.contains(t)))||(null==a||a(e),null==s||s(e),e.defaultPrevented||null==u||u())}),p);return EQ((e=>{w===c.layers.size-1&&(null==o||o(e),!e.defaultPrevented&&u&&(e.preventDefault(),u()))}),p),g.useEffect((()=>{if(d)return r&&(0===c.layersWithOutsidePointerEventsDisabled.size&&(o2=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),i2(),()=>{r&&1===c.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=o2)}}),[d,p,r,c]),g.useEffect((()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),i2())}),[d,c]),g.useEffect((()=>{const e=()=>m({});return document.addEventListener(b_,e),()=>document.removeEventListener(b_,e)}),[]),g.createElement(w_.div,Te({},l,{ref:h,style:{pointerEvents:A?x?"auto":"none":void 0,...e.style},onFocusCapture:Xf(e.onFocusCapture,I.onFocusCapture),onBlurCapture:Xf(e.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Xf(e.onPointerDownCapture,S.onPointerDownCapture)}))}));function OQ(e,t=(null==globalThis?void 0:globalThis.document)){const n=d0(e),r=g.useRef(!1),o=g.useRef((()=>{}));return g.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){b3(PQ,n,i,{discrete:!0})};const i={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",o.current),o.current=r,t.addEventListener("click",o.current,{once:!0})):r()}r.current=!1},i=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",e),t.removeEventListener("click",o.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function DQ(e,t=(null==globalThis?void 0:globalThis.document)){const n=d0(e),r=g.useRef(!1);return g.useEffect((()=>{const e=e=>{e.target&&!r.current&&b3(RQ,n,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function i2(){const e=new CustomEvent(b_);document.dispatchEvent(e)}function b3(e,t,n,{discrete:r}){const o=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?oQ(o,i):o.dispatchEvent(i)}let zA;const x3="HoverCard",[A3,Oce]=i3(x3,[g3]),$Q=g3(),[Dce,S3]=A3(x3),NQ="HoverCardPortal",[$ce,kQ]=A3(NQ,{forceMount:void 0}),x_="HoverCardContent",LQ=g.forwardRef(((e,t)=>{const n=kQ(x_,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,i=S3(x_,e.__scopeHoverCard);return g.createElement(w3,{present:r||i.open},g.createElement(BQ,Te({"data-state":i.open?"open":"closed"},o,{onPointerEnter:Xf(e.onPointerEnter,a2(i.onOpen)),onPointerLeave:Xf(e.onPointerLeave,a2(i.onClose)),ref:t})))})),BQ=g.forwardRef(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:a,...s}=e,u=S3(x_,n),l=$Q(n),c=g.useRef(null),d=MX(t,c),[f,p]=g.useState(!1);return g.useEffect((()=>{if(f){const e=document.body;return zA=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=zA,e.style.webkitUserSelect=zA}}}),[f]),g.useEffect((()=>{if(c.current){const e=()=>{p(!1),u.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(u.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!1}}}),[u.isPointerDownOnContentRef,u.hasSelectionRef]),g.useEffect((()=>{c.current&&VQ(c.current).forEach((e=>e.setAttribute("tabindex","-1")))})),g.createElement(MQ,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:a,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:Xf(i,(e=>{e.preventDefault()})),onDismiss:u.onDismiss},g.createElement(yQ,Te({},l,s,{onPointerDown:Xf(s.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!0),u.hasSelectionRef.current=!1,u.isPointerDownOnContentRef.current=!0})),ref:d,style:{...s.style,userSelect:f?"text":void 0,WebkitUserSelect:f?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})))}));function a2(e){return t=>"touch"===t.pointerType?void 0:e()}function VQ(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}const _3=LQ,jQ=g.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},o)=>z.jsx(_3,{ref:o,align:t,sideOffset:n,className:ye("z-50 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})));jQ.displayName=_3.displayName;const I3=g.forwardRef((({className:e,type:t,...n},r)=>{const{error:o}=Pd();return z.jsx("input",{type:t,title:n.disabled?"Disabled":"",className:ye("flex w-full rounded-m px-s py-3.5 text-base text-gray-900 outline outline-1 outline-input ring-offset-background transition-all duration-200 ease-in-out file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-base placeholder:text-gray-400 placeholder:text-muted-foreground focus-visible:bg-gray-50 focus-visible:text-gray-900 focus-visible:outline-2 focus-visible:outline-blue_120 enabled:hover:outline-2 enabled:hover:outline-gray-400 disabled:bg-transparent disabled:text-gray-300 disabled:outline-gray-200 disabled:ring-0 disabled:ring-transparent disabled:placeholder:text-gray-300",{"bg-red_30_17 outline-red-dark":!!o},e),ref:r,...n})}));function FQ(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>g.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return g.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const o=g.createContext(r),i=n.length;n=[...n,r];const a=t=>{var n;const{scope:r,children:a,...s}=t,u=(null==(n=null==r?void 0:r[e])?void 0:n[i])||o,l=g.useMemo((()=>s),Object.values(s));return z.jsx(u.Provider,{value:l,children:a})};return a.displayName=t+"Provider",[a,function(n,a){var s;const u=(null==(s=null==a?void 0:a[e])?void 0:s[i])||o,l=g.useContext(u);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},zQ(r,...t)]}function zQ(...e){const t=e[0];if(1===e.length)return t;const n=()=>{const n=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const r=n.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return g.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function s2(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function UQ(...e){return t=>{let n=!1;const r=e.map((e=>{const r=s2(e,t);return!n&&"function"==typeof r&&(n=!0),r}));if(n)return()=>{for(let t=0;t<r.length;t++){const n=r[t];"function"==typeof n?n():s2(e[t],null)}}}}function GQ(e){const t=WQ(e),n=g.forwardRef(((e,n)=>{const{children:r,...o}=e,i=g.Children.toArray(r),a=i.find(HQ);if(a){const e=a.props.children,r=i.map((t=>t===a?g.Children.count(e)>1?g.Children.only(null):g.isValidElement(e)?e.props.children:null:t));return z.jsx(t,{...o,ref:n,children:g.isValidElement(e)?g.cloneElement(e,void 0,r):null})}return z.jsx(t,{...o,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function WQ(e){const t=g.forwardRef(((e,t)=>{const{children:n,...r}=e;if(g.isValidElement(n)){const e=QQ(n),o=XQ(r,n.props);return n.type!==g.Fragment&&(o.ref=t?UQ(t,e):e),g.cloneElement(n,o)}return g.Children.count(n)>1?g.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}I3.displayName="Input";var qQ=Symbol("radix.slottable");function HQ(e){return g.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===qQ}function XQ(e,t){const n={...t};for(const r in t){const o=e[r],i=t[r];/^on[A-Z]/.test(r)?o&&i?n[r]=(...e)=>{const t=i(...e);return o(...e),t}:o&&(n[r]=o):"style"===r?n[r]={...o,...i}:"className"===r&&(n[r]=[o,i].filter(Boolean).join(" "))}return{...e,...n}}function QQ(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,o=r&&"isReactWarning"in r&&r.isReactWarning;return o?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,o=r&&"isReactWarning"in r&&r.isReactWarning,o?e.props.ref:e.props.ref||e.ref)}var KQ=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],C3=KQ.reduce(((e,t)=>{const n=GQ(`Primitive.${t}`),r=g.forwardRef(((e,r)=>{const{asChild:o,...i}=e,a=o?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),z.jsx(a,{...i,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{}),lC="Progress",cC=100,[YQ,Nce]=FQ(lC),[JQ,ZQ]=YQ(lC),E3=g.forwardRef(((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:i=eK,...a}=e;(o||0===o)&&!u2(o)&&console.error(tK(`${o}`,"Progress"));const s=u2(o)?o:cC;null!==r&&!l2(r,s)&&console.error(nK(`${r}`,"Progress"));const u=l2(r,s)?r:null,l=Iy(u)?i(u,s):void 0;return z.jsx(JQ,{scope:n,value:u,max:s,children:z.jsx(C3.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Iy(u)?u:void 0,"aria-valuetext":l,role:"progressbar","data-state":T3(u,s),"data-value":u??void 0,"data-max":s,...a,ref:t})})}));E3.displayName=lC;var P3="ProgressIndicator",R3=g.forwardRef(((e,t)=>{const{__scopeProgress:n,...r}=e,o=ZQ(P3,n);return z.jsx(C3.div,{"data-state":T3(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})}));function eK(e,t){return`${Math.round(e/t*100)}%`}function T3(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function Iy(e){return"number"==typeof e}function u2(e){return Iy(e)&&!isNaN(e)&&e>0}function l2(e,t){return Iy(e)&&!isNaN(e)&&e<=t&&e>=0}function tK(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${cC}\`.`}function nK(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or ${cC} if no \`max\` prop is set)\n - \`null\` or \`undefined\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}R3.displayName=P3;var M3=E3,rK=R3;const oK=g.forwardRef((({className:e,value:t,indicatorClassName:n,...r},o)=>z.jsx(M3,{ref:o,className:ye("relative h-[7px] w-full overflow-hidden rounded-full bg-blue_10",e),...r,children:z.jsx(rK,{className:ye("h-full w-full flex-1 rounded-full bg-blue_100 transition-all",n),style:{transform:`translateX(-${100-(t||0)}%)`}})})));oK.displayName=M3.displayName;const O3="Radio",[iK,D3]=ri(O3),[aK,sK]=iK(O3),uK=g.forwardRef(((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:i,disabled:a,value:s="on",onCheck:u,...l}=e,[c,d]=g.useState(null),f=zt(t,(e=>d(e))),p=g.useRef(!1),m=!c||!!c.closest("form");return g.createElement(aK,{scope:n,checked:o,disabled:a},g.createElement(ft.button,Te({type:"button",role:"radio","aria-checked":o,"data-state":$3(o),"data-disabled":a?"":void 0,disabled:a,value:s},l,{ref:f,onClick:et(e.onClick,(e=>{o||null==u||u(),m&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),m&&g.createElement(dK,{control:c,bubbles:!p.current,name:r,value:s,checked:o,required:i,disabled:a,style:{transform:"translateX(-100%)"}}))})),lK="RadioIndicator",cK=g.forwardRef(((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,i=sK(lK,n);return g.createElement(ea,{present:r||i.checked},g.createElement(ft.span,Te({"data-state":$3(i.checked),"data-disabled":i.disabled?"":void 0},o,{ref:t})))})),dK=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=g.useRef(null),a=Zy(n),s=e0(t);return g.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[a,n,r]),g.createElement("input",Te({type:"radio","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function $3(e){return e?"checked":"unchecked"}const fK=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],N3="RadioGroup",[pK,kce]=ri(N3,[tm,D3]),k3=tm(),L3=D3(),[hK,mK]=pK(N3),vK=g.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:i,required:a=!1,disabled:s=!1,orientation:u,dir:l,loop:c=!0,onValueChange:d,...f}=e,p=k3(n),m=LI(l),[h,y]=bd({prop:i,defaultProp:o,onChange:d});return g.createElement(hK,{scope:n,name:r,required:a,disabled:s,value:h,onValueChange:y},g.createElement(HI,Te({asChild:!0},p,{orientation:u,dir:m,loop:c}),g.createElement(ft.div,Te({role:"radiogroup","aria-required":a,"aria-orientation":u,"data-disabled":s?"":void 0,dir:m},f,{ref:t}))))})),gK="RadioGroupItem",yK=g.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,i=mK(gK,n),a=i.disabled||r,s=k3(n),u=L3(n),l=g.useRef(null),c=zt(t,l),d=i.value===o.value,f=g.useRef(!1);return g.useEffect((()=>{const e=e=>{fK.includes(e.key)&&(f.current=!0)},t=()=>f.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),g.createElement(XI,Te({asChild:!0},s,{focusable:!a,active:d}),g.createElement(uK,Te({disabled:a,required:i.required,checked:d},u,o,{name:i.name,ref:c,onCheck:()=>i.onValueChange(o.value),onKeyDown:et((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:et(o.onFocus,(()=>{var e;f.current&&(null===(e=l.current)||void 0===e||e.click())}))})))})),wK=g.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=L3(n);return g.createElement(cK,Te({},o,r,{ref:t}))})),B3=vK,V3=yK,bK=wK,xK=g.forwardRef((({className:e,...t},n)=>z.jsx(B3,{className:ye("grid gap-2",e),...t,ref:n})));xK.displayName=B3.displayName;const AK=g.forwardRef((({className:e,...t},n)=>z.jsx(V3,{ref:n,className:ye("aspect-square size-6 rounded-full border border-gray-300 disabled:cursor-not-allowed disabled:border-gray-100 disabled:bg-gray-100","data-[state=checked]:border-blue_100 data-[state=checked]:bg-blue_100 hover:data-[state=checked]:border-blue_120","disabled:data-[state=checked]:border-gray-100 disabled:data-[state=checked]:bg-gray-100","transition-[border] duration-200 hover:data-[state=checked]:bg-blue_120 md:hover:border-2",e),...t,children:z.jsx(bK,{className:"flex items-center justify-center",children:z.jsx(Z7,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--gray-300)":"white",color:t.disabled?"var(--gray-300)":"white"}})})})));AK.displayName=V3.displayName;const SK=tI,_K=Fy,j3=g.forwardRef((({className:e,...t},n)=>z.jsx(Qh,{className:ye("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n})));j3.displayName=Qh.displayName;const IK=xu("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),F3=g.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...o},i)=>z.jsxs(_K,{children:[z.jsx(j3,{className:ye("bg-gray-900/70",n)}),z.jsxs(Kh,{ref:i,className:ye(IK({side:e}),t),...o,children:[r,z.jsxs(zy,{className:"absolute right-4 top-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[z.jsx(Wv,{className:"h-4 w-4"}),z.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));F3.displayName=Kh.displayName;const z3=({className:e,...t})=>z.jsx("div",{className:ye("flex flex-col space-y-2 text-center sm:text-left",e),...t});z3.displayName="SheetHeader";const U3=g.forwardRef((({className:e,...t},n)=>z.jsx(qv,{ref:n,className:ye("text-lg font-semibold text-foreground",e),...t})));U3.displayName=qv.displayName;const G3=g.forwardRef((({className:e,...t},n)=>z.jsx(Hv,{ref:n,className:ye("text-sm text-muted-foreground",e),...t})));G3.displayName=Hv.displayName;const[h0,Lce]=ri("Tooltip",[em]),dC=em(),CK="TooltipProvider",EK=700,A_="tooltip.open",[PK,fC]=h0(CK),RK=e=>{const{__scopeTooltip:t,delayDuration:n=EK,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:i}=e,[a,s]=g.useState(!0),u=g.useRef(!1),l=g.useRef(0);return g.useEffect((()=>{const e=l.current;return()=>window.clearTimeout(e)}),[]),g.createElement(PK,{scope:t,isOpenDelayed:a,delayDuration:n,onOpen:g.useCallback((()=>{window.clearTimeout(l.current),s(!1)}),[]),onClose:g.useCallback((()=>{window.clearTimeout(l.current),l.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:u,onPointerInTransitChange:g.useCallback((e=>{u.current=e}),[]),disableHoverableContent:o},i)},pC="Tooltip",[TK,rg]=h0(pC),W3=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o=!1,onOpenChange:i,disableHoverableContent:a,delayDuration:s}=e,u=fC(pC,e.__scopeTooltip),l=dC(t),[c,d]=g.useState(null),f=hd(),p=g.useRef(0),m=a??u.disableHoverableContent,h=s??u.delayDuration,y=g.useRef(!1),[v=!1,b]=bd({prop:r,defaultProp:o,onChange:e=>{e?(u.onOpen(),document.dispatchEvent(new CustomEvent(A_))):u.onClose(),null==i||i(e)}}),w=g.useMemo((()=>v?y.current?"delayed-open":"instant-open":"closed"),[v]),A=g.useCallback((()=>{window.clearTimeout(p.current),y.current=!1,b(!0)}),[b]),x=g.useCallback((()=>{window.clearTimeout(p.current),b(!1)}),[b]),S=g.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{y.current=!0,b(!0)}),h)}),[h,b]);return g.useEffect((()=>()=>window.clearTimeout(p.current)),[]),g.createElement(ck,l,g.createElement(TK,{scope:t,contentId:f,open:v,stateAttribute:w,trigger:c,onTriggerChange:d,onTriggerEnter:g.useCallback((()=>{u.isOpenDelayed?S():A()}),[u.isOpenDelayed,S,A]),onTriggerLeave:g.useCallback((()=>{m?x():window.clearTimeout(p.current)}),[x,m]),onOpen:A,onClose:x,disableHoverableContent:m},n))},c2="TooltipTrigger",q3=g.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,o=rg(c2,n),i=fC(c2,n),a=dC(n),s=zt(t,g.useRef(null),o.onTriggerChange),u=g.useRef(!1),l=g.useRef(!1),c=g.useCallback((()=>u.current=!1),[]);return g.useEffect((()=>()=>document.removeEventListener("pointerup",c)),[c]),g.createElement(GI,Te({asChild:!0},a),g.createElement(ft.button,Te({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},r,{ref:s,onPointerMove:et(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!l.current&&!i.isPointerInTransitRef.current&&(o.onTriggerEnter(),l.current=!0)})),onPointerLeave:et(e.onPointerLeave,(()=>{o.onTriggerLeave(),l.current=!1})),onPointerDown:et(e.onPointerDown,(()=>{u.current=!0,document.addEventListener("pointerup",c,{once:!0})})),onFocus:et(e.onFocus,(()=>{u.current||o.onOpen()})),onBlur:et(e.onBlur,o.onClose),onClick:et(e.onClick,o.onClose)})))})),H3="TooltipPortal",[MK,OK]=h0(H3,{forceMount:void 0}),DK=e=>{const{__scopeTooltip:t,forceMount:n,children:r,container:o}=e,i=rg(H3,t);return g.createElement(MK,{scope:t,forceMount:n},g.createElement(ea,{present:n||i.open},g.createElement(Ly,{asChild:!0,container:o},r)))},Lv="TooltipContent",X3=g.forwardRef(((e,t)=>{const n=OK(Lv,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...i}=e,a=rg(Lv,e.__scopeTooltip);return g.createElement(ea,{present:r||a.open},a.disableHoverableContent?g.createElement(Q3,Te({side:o},i,{ref:t})):g.createElement($K,Te({side:o},i,{ref:t})))})),$K=g.forwardRef(((e,t)=>{const n=rg(Lv,e.__scopeTooltip),r=fC(Lv,e.__scopeTooltip),o=g.useRef(null),i=zt(t,o),[a,s]=g.useState(null),{trigger:u,onClose:l}=n,c=o.current,{onPointerInTransitChange:d}=r,f=g.useCallback((()=>{s(null),d(!1)}),[d]),p=g.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},o=jK([...LK(r,kK(r,n.getBoundingClientRect())),...BK(t.getBoundingClientRect())]);s(o),d(!0)}),[d]);return g.useEffect((()=>()=>f()),[f]),g.useEffect((()=>{if(u&&c){const e=e=>p(e,c),t=e=>p(e,u);return u.addEventListener("pointerleave",e),c.addEventListener("pointerleave",t),()=>{u.removeEventListener("pointerleave",e),c.removeEventListener("pointerleave",t)}}}),[u,c,p,f]),g.useEffect((()=>{if(a){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==u?void 0:u.contains(t))||(null==c?void 0:c.contains(t)),o=!VK(n,a);r?f():o&&(f(),l())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[u,c,a,l,f]),g.createElement(Q3,Te({},e,{ref:i}))})),[NK,Bce]=h0(pC,{isInside:!1}),Q3=g.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:i,onPointerDownOutside:a,...s}=e,u=rg(Lv,n),l=dC(n),{onClose:c}=u;return g.useEffect((()=>(document.addEventListener(A_,c),()=>document.removeEventListener(A_,c))),[c]),g.useEffect((()=>{if(u.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(u.trigger)&&c()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[u.trigger,c]),g.createElement(ky,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:e=>e.preventDefault(),onDismiss:c},g.createElement(WI,Te({"data-state":u.stateAttribute},l,s,{ref:t,style:{...s.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),g.createElement(K_,null,r),g.createElement(NK,{scope:n,isInside:!0},g.createElement(xH,{id:u.contentId,role:"tooltip"},o||r))))}));function kK(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(n,r,o,i)){case i:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function LK(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n})}return r}function BK(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function VK(e,t){const{x:n,y:r}=e;let o=!1;for(let e=0,i=t.length-1;e<t.length;i=e++){const a=t[e].x,s=t[e].y,u=t[i].x,l=t[i].y;s>r!=l>r&&n<(u-a)*(r-s)/(l-s)+a&&(o=!o)}return o}function jK(e){const t=e.slice();return t.sort(((e,t)=>e.x<t.x?-1:e.x>t.x?1:e.y<t.y?-1:e.y>t.y?1:0)),FK(t)}function FK(e){if(e.length<=1)return e.slice();const t=[];for(let n=0;n<e.length;n++){const r=e[n];for(;t.length>=2;){const e=t[t.length-1],n=t[t.length-2];if(!((e.x-n.x)*(r.y-n.y)>=(e.y-n.y)*(r.x-n.x)))break;t.pop()}t.push(r)}t.pop();const n=[];for(let t=e.length-1;t>=0;t--){const r=e[t];for(;n.length>=2;){const e=n[n.length-1],t=n[n.length-2];if(!((e.x-t.x)*(r.y-t.y)>=(e.y-t.y)*(r.x-t.x)))break;n.pop()}n.push(r)}return n.pop(),1===t.length&&1===n.length&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}const zK=W3,UK=q3,GK=DK,K3=X3,WK=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},qK={deviceType:WK(),deviceWidth:window.innerWidth},Y3=Wr({name:"ui",initialState:qK,reducers:{},extraReducers:e=>{e.addCase(Z6,((e,{payload:t})=>{e.deviceType=t})),e.addCase(e4,((e,{payload:t})=>{e.deviceWidth=t}))},selectors:{selectDeviceType:e=>e.deviceType,selectDeviceWidth:e=>e.deviceWidth,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var UA,d2,GA,f2,WA,p2,qA,h2,HA,m2,XA,v2,QA,g2,KA,y2,YA,w2,JA,b2,ZA,x2,eS,A2,tS,S2,nS,_2,rS,I2,oS,C2,iS,E2,aS,P2,sS,R2,uS,T2,lS,M2,cS,O2,dS,D2,fS,$2,pS,N2,hS,k2,mS,L2,vS,B2,gS,V2,yS,j2,wS,F2,bS,z2,xS,U2,AS,G2,SS,W2,_S,q2,IS,H2,CS,X2,ES,Q2,PS,K2,RS,Y2;function J3(){if(d2)return UA;d2=1;var e=P$(),t=e&&new e;return UA=t}function Z3(){if(f2)return GA;f2=1;var e=AI(),t=J3();return GA=t?function(e,n){return t.set(e,n),e}:e}function m0(){if(p2)return WA;p2=1;var e=Jy(),t=Ss();return WA=function(n){return function(){var r=arguments;switch(r.length){case 0:return new n;case 1:return new n(r[0]);case 2:return new n(r[0],r[1]);case 3:return new n(r[0],r[1],r[2]);case 4:return new n(r[0],r[1],r[2],r[3]);case 5:return new n(r[0],r[1],r[2],r[3],r[4]);case 6:return new n(r[0],r[1],r[2],r[3],r[4],r[5]);case 7:return new n(r[0],r[1],r[2],r[3],r[4],r[5],r[6])}var o=e(n.prototype),i=n.apply(o,r);return t(i)?i:o}},WA}function HK(){if(h2)return qA;h2=1;var e=m0(),t=oi();return qA=function(n,r,o){var i=1&r,a=e(n);return function e(){return(this&&this!==t&&this instanceof e?a:n).apply(i?o:this,arguments)}},qA}function eL(){if(m2)return HA;m2=1;var e=Math.max;return HA=function(t,n,r,o){for(var i=-1,a=t.length,s=r.length,u=-1,l=n.length,c=e(a-s,0),d=Array(l+c),f=!o;++u<l;)d[u]=n[u];for(;++i<s;)(f||i<a)&&(d[r[i]]=t[i]);for(;c--;)d[u++]=t[i++];return d}}function tL(){if(v2)return XA;v2=1;var e=Math.max;return XA=function(t,n,r,o){for(var i=-1,a=t.length,s=-1,u=r.length,l=-1,c=n.length,d=e(a-u,0),f=Array(d+c),p=!o;++i<d;)f[i]=t[i];for(var m=i;++l<c;)f[m+l]=n[l];for(;++s<u;)(p||i<a)&&(f[m+r[s]]=t[i++]);return f}}function XK(){if(g2)return QA;return g2=1,QA=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function hC(){if(y2)return KA;return y2=1,KA=function(){}}function mC(){if(w2)return YA;w2=1;var e=Jy(),t=hC();function n(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}return n.prototype=e(t.prototype),n.prototype.constructor=n,YA=n}function nL(){if(b2)return JA;b2=1;var e=J3(),t=hF();return JA=e?function(t){return e.get(t)}:t}function QK(){if(x2)return ZA;x2=1;return ZA={}}function KK(){if(A2)return eS;A2=1;var e=QK(),t=Object.prototype.hasOwnProperty;return eS=function(n){for(var r=n.name+"",o=e[r],i=t.call(e,r)?o.length:0;i--;){var a=o[i],s=a.func;if(null==s||s==n)return a.name}return r}}function rL(){if(S2)return tS;S2=1;var e=Jy(),t=hC();function n(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}return n.prototype=e(t.prototype),n.prototype.constructor=n,tS=n}function YK(){if(_2)return nS;_2=1;var e=mC(),t=rL(),n=Yy();return nS=function(r){if(r instanceof e)return r.clone();var o=new t(r.__wrapped__,r.__chain__);return o.__actions__=n(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}}function JK(){if(I2)return rS;I2=1;var e=mC(),t=rL(),n=hC(),r=_i(),o=ta(),i=YK(),a=Object.prototype.hasOwnProperty;function s(n){if(o(n)&&!r(n)&&!(n instanceof e)){if(n instanceof t)return n;if(a.call(n,"__wrapped__"))return i(n)}return new t(n)}return s.prototype=n.prototype,s.prototype.constructor=s,rS=s}function ZK(){if(C2)return oS;C2=1;var e=mC(),t=nL(),n=KK(),r=JK();return oS=function(o){var i=n(o),a=r[i];if("function"!=typeof a||!(i in e.prototype))return!1;if(o===a)return!0;var s=t(a);return!!s&&o===s[0]}}function oL(){if(E2)return iS;E2=1;var e=Z3(),t=D$()(e);return iS=t}function eY(){if(P2)return aS;P2=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return aS=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function tY(){if(R2)return sS;R2=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return sS=function(t,n){var r=n.length;if(!r)return t;var o=r-1;return n[o]=(r>1?"& ":"")+n[o],n=n.join(r>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+n+"] */\n")}}function nY(){if(T2)return uS;T2=1;var e=II(),t=pF(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return uS=function(r,o){return e(n,(function(e){var n="_."+e[0];o&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function iL(){if(M2)return lS;M2=1;var e=eY(),t=tY(),n=$$(),r=nY();return lS=function(o,i,a){var s=i+"";return n(o,t(s,r(e(s),a)))}}function aL(){if(O2)return cS;O2=1;var e=ZK(),t=oL(),n=iL();return cS=function(r,o,i,a,s,u,l,c,d,f){var p=8&o;o|=p?32:64,4&(o&=~(p?64:32))||(o&=-4);var m=[r,o,s,p?u:void 0,p?l:void 0,p?void 0:u,p?void 0:l,c,d,f],h=i.apply(void 0,m);return e(r)&&t(h,m),h.placeholder=a,n(h,r,o)}}function sL(){if(D2)return dS;return D2=1,dS=function(e){return e.placeholder}}function rY(){if($2)return fS;$2=1;var e=Yy(),t=gI(),n=Math.min;return fS=function(r,o){for(var i=r.length,a=n(o.length,i),s=e(r);a--;){var u=o[a];r[a]=t(u,i)?s[u]:void 0}return r}}function vC(){if(N2)return pS;N2=1;var e="__lodash_placeholder__";return pS=function(t,n){for(var r=-1,o=t.length,i=0,a=[];++r<o;){var s=t[r];(s===n||s===e)&&(t[r]=e,a[i++]=r)}return a}}function uL(){if(k2)return hS;k2=1;var e=eL(),t=tL(),n=XK(),r=m0(),o=aL(),i=sL(),a=rY(),s=vC(),u=oi();return hS=function l(c,d,f,p,m,h,g,y,v,b){var w=128&d,A=1&d,x=2&d,S=24&d,I=512&d,E=x?void 0:r(c);return function C(){for(var P=arguments.length,k=Array(P),_=P;_--;)k[_]=arguments[_];if(S)var T=i(C),M=n(k,T);if(p&&(k=e(k,p,m,S)),h&&(k=t(k,h,g,S)),P-=M,S&&P<b){var O=s(k,T);return o(c,d,l,C.placeholder,f,k,O,y,v,b-P)}var R=A?f:this,N=x?R[c]:c;return P=k.length,y?k=a(k,y):I&&P>1&&k.reverse(),w&&v<P&&(k.length=v),this&&this!==u&&this instanceof C&&(N=E||r(N)),N.apply(R,k)}},hS}function oY(){if(L2)return mS;L2=1;var e=SI(),t=m0(),n=uL(),r=aL(),o=sL(),i=vC(),a=oi();return mS=function(s,u,l){var c=t(s);return function t(){for(var d=arguments.length,f=Array(d),p=d,m=o(t);p--;)f[p]=arguments[p];var h=d<3&&f[0]!==m&&f[d-1]!==m?[]:i(f,m);return(d-=h.length)<l?r(s,u,n,t.placeholder,void 0,f,h,void 0,void 0,l-d):e(this&&this!==a&&this instanceof t?c:s,this,f)}},mS}function iY(){if(B2)return vS;B2=1;var e=SI(),t=m0(),n=oi();return vS=function(r,o,i,a){var s=1&o,u=t(r);return function t(){for(var o=-1,l=arguments.length,c=-1,d=a.length,f=Array(d+l),p=this&&this!==n&&this instanceof t?u:r;++c<d;)f[c]=a[c];for(;l--;)f[c++]=arguments[++o];return e(p,s?i:this,f)}},vS}function aY(){if(V2)return gS;V2=1;var e=eL(),t=tL(),n=vC(),r="__lodash_placeholder__",o=128,i=Math.min;return gS=function(a,s){var u=a[1],l=s[1],c=u|l,d=c<131,f=l==o&&8==u||l==o&&256==u&&a[7].length<=s[8]||384==l&&s[7].length<=s[8]&&8==u;if(!d&&!f)return a;1&l&&(a[2]=s[2],c|=1&u?0:4);var p=s[3];if(p){var m=a[3];a[3]=m?e(m,p,s[4]):p,a[4]=m?n(a[3],r):s[4]}return(p=s[5])&&(m=a[5],a[5]=m?t(m,p,s[6]):p,a[6]=m?n(a[5],r):s[6]),(p=s[7])&&(a[7]=p),l&o&&(a[8]=null==a[8]?s[8]:i(a[8],s[8])),null==a[9]&&(a[9]=s[9]),a[0]=s[0],a[1]=c,a}}function gC(){if(j2)return yS;j2=1;var e=Z3(),t=HK(),n=oY(),r=uL(),o=iY(),i=nL(),a=aY(),s=oL(),u=iL(),l=B$(),c=Math.max;return yS=function(d,f,p,m,h,g,y,v){var b=2&f;if(!b&&"function"!=typeof d)throw new TypeError("Expected a function");var w=m?m.length:0;if(w||(f&=-97,m=h=void 0),y=void 0===y?y:c(l(y),0),v=void 0===v?v:l(v),w-=h?h.length:0,64&f){var A=m,x=h;m=h=void 0}var S=b?void 0:i(d),I=[d,f,p,m,h,A,x,g,y,v];if(S&&a(I,S),d=I[0],f=I[1],p=I[2],m=I[3],h=I[4],!(v=I[9]=void 0===I[9]?b?0:d.length:c(I[9]-w,0))&&24&f&&(f&=-25),f&&1!=f)E=8==f||16==f?n(d,f,v):32!=f&&33!=f||h.length?r.apply(void 0,I):o(d,f,p,m);else var E=t(d,f,p);return u((S?e:s)(E,I),d,f)}}function sY(){if(F2)return wS;F2=1;var e=gC();return wS=function(t,n,r){return n=r?void 0:n,n=t&&null==n?t.length:n,e(t,128,void 0,void 0,void 0,void 0,n)}}function uY(){if(z2)return bS;z2=1;var e=z$();return bS=function(t){return e(t,4)}}function lY(){if(U2)return xS;U2=1;var e=gC();function t(n,r,o){var i=e(n,8,void 0,void 0,void 0,void 0,void 0,r=o?void 0:r);return i.placeholder=t.placeholder,i}return t.placeholder={},xS=t}function cY(){if(G2)return AS;G2=1;var e=Ml(),t=ta(),n=NF();return AS=function(r){if(!t(r))return!1;var o=e(r);return"[object Error]"==o||"[object DOMException]"==o||"string"==typeof r.message&&"string"==typeof r.name&&!n(r)}}function dY(){if(W2)return SS;W2=1;var e=Yv(),t=ta();return SS=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function fY(){if(q2)return _S;q2=1;var e=z$(),t=uF();return _S=function(n){return t("function"==typeof n?n:e(n,1))}}function pY(){if(H2)return IS;H2=1;var e=gC(),t=nz(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return IS=n}function hY(){if(X2)return CS;X2=1;var e=f$(),t=Yy(),n=_i(),r=Qv(),o=d$(),i=Kv(),a=p$();return CS=function(s){return n(s)?e(s,i):r(s)?[s]:t(o(a(s)))}}function mY(){return Q2||(Q2=1,ES={ary:sY(),assign:j$(),clone:uY(),curry:lY(),forEach:II(),isArray:_i(),isError:cY(),isFunction:Gy(),isWeakMap:dY(),iteratee:fY(),keys:I$(),rearg:pY(),toInteger:B$(),toPath:hY()}),ES}function vY(){if(K2)return PS;K2=1;var e=iD(),t=mY();return PS=function(n,r,o){return e(t,n,r,o)}}function gY(){if(Y2)return RS;Y2=1;var e=vY()("debounce",k$());return e.placeholder=oD(),RS=e}gY();const lL=()=>Na(Y3.selectors.selectIsMobile);function J2({className:e,...t}){return z.jsx("div",{className:ye("animate-pulse rounded-md bg-muted",e),...t})}const yY="sidebar_state",wY=604800,bY="12rem",xY="18rem",AY="2rem",SY="b",cL=g.createContext(null);function v0(){const e=g.useContext(cL);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const _Y=g.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:o,children:i,...a},s)=>{const u=lL(),[l,c]=g.useState(!1),[d,f]=g.useState(e),p=t??d,m=g.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):f(t),document.cookie=`${yY}=${t}; path=/; max-age=${wY}`}),[n,p]),h=g.useCallback((()=>u?c((e=>!e)):m((e=>!e))),[u,m,c]);g.useEffect((()=>{const e=e=>{e.key===SY&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[h]);const y=p?"expanded":"collapsed",v=g.useMemo((()=>({state:y,open:p,setOpen:m,isMobile:u,openMobile:l,setOpenMobile:c,toggleSidebar:h})),[y,p,m,u,l,c,h]);return z.jsx(cL.Provider,{value:v,children:z.jsx(RK,{delayDuration:0,children:z.jsx("div",{style:{"--sidebar-width":bY,"--sidebar-width-icon":AY,...o},className:ye("group/sidebar-wrapper flex min-h-svh w-full bg-gray-100 has-[[data-variant=inset]]:bg-sidebar",r),ref:s,...a,children:i})})})}));_Y.displayName="SidebarProvider";const IY=g.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:o,...i},a)=>{const{isMobile:s,state:u,openMobile:l,setOpenMobile:c}=v0();return"none"===n?z.jsx("div",{className:ye("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:a,...i,children:o}):s?z.jsx(SK,{open:l,onOpenChange:c,children:z.jsxs(F3,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":xY},side:e,children:[z.jsxs(z3,{className:"sr-only",children:[z.jsx(U3,{children:"Sidebar"}),z.jsx(G3,{children:"Displays the mobile sidebar."})]}),z.jsx("div",{className:"flex h-full w-full flex-col",children:o})]})}):z.jsxs("div",{ref:a,className:"group peer hidden text-sidebar-foreground md:block","data-state":u,"data-collapsible":"collapsed"===u?n:"","data-variant":t,"data-side":e,children:[z.jsx("div",{className:ye("relative w-[--sidebar-width] bg-transparent transition-[width] duration-200 ease-linear","group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180","floating"===t||"inset"===t?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4))]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon]")}),z.jsx("div",{className:ye("fixed inset-y-0 z-10 hidden h-svh w-[--sidebar-width] transition-[left,right,width] duration-200 ease-linear md:flex","left"===e?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]","floating"===t||"inset"===t?"p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)_+_theme(spacing.4)_+2px)]":"group-data-[collapsible=icon]:w-[--sidebar-width-icon] group-data-[side=left]:border-r group-data-[side=right]:border-l",r),...i,children:z.jsx("div",{"data-sidebar":"sidebar",className:"flex h-full w-full flex-col bg-sidebar group-data-[variant=floating]:rounded-sm group-data-[variant=floating]:border group-data-[variant=floating]:border-sidebar-border group-data-[variant=floating]:shadow",children:o})})]})}));IY.displayName="Sidebar";const CY=g.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:o,open:i}=v0();return z.jsx(pd,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:ye("size-6 text-gray-900",e),onClick:e=>{null==t||t(e),o()},...n,children:i?z.jsx(u8,{size:16}):z.jsx(a8,{size:16})})}));CY.displayName="SidebarTrigger";const EY=g.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=v0();return z.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:ye("absolute inset-y-0 z-20 hidden w-4 -translate-x-1/2 transition-all ease-linear after:absolute after:inset-y-0 after:left-1/2 after:w-[2px] hover:after:bg-sidebar-border group-data-[side=left]:-right-4 group-data-[side=right]:left-0 sm:flex","[[data-side=left]_&]:cursor-w-resize [[data-side=right]_&]:cursor-e-resize","[[data-side=left][data-state=collapsed]_&]:cursor-e-resize [[data-side=right][data-state=collapsed]_&]:cursor-w-resize","group-data-[collapsible=offcanvas]:translate-x-0 group-data-[collapsible=offcanvas]:after:left-full group-data-[collapsible=offcanvas]:hover:bg-sidebar","[[data-side=left][data-collapsible=offcanvas]_&]:-right-2","[[data-side=right][data-collapsible=offcanvas]_&]:-left-2",e),...t})}));EY.displayName="SidebarRail";const PY=g.forwardRef((({className:e,...t},n)=>z.jsx("main",{ref:n,className:ye("relative flex w-full flex-1 flex-col bg-background","md:peer-data-[variant=inset]:m-2 md:peer-data-[state=collapsed]:peer-data-[variant=inset]:ml-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-m md:peer-data-[variant=inset]:shadow",e),...t})));PY.displayName="SidebarInset";const RY=g.forwardRef((({className:e,...t},n)=>z.jsx(I3,{ref:n,"data-sidebar":"input",className:ye("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));RY.displayName="SidebarInput";const TY=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{ref:n,"data-sidebar":"header",className:ye("flex flex-col gap-xxs p-xs",e),...t})));TY.displayName="SidebarHeader";const MY=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{ref:n,"data-sidebar":"footer",className:ye("flex flex-col gap-2 p-2",e),...t})));MY.displayName="SidebarFooter";const OY=g.forwardRef((({className:e,...t},n)=>z.jsx(ZI,{ref:n,"data-sidebar":"separator",className:ye("mx-2 w-auto bg-sidebar-border",e),...t})));OY.displayName="SidebarSeparator";const DY=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{ref:n,"data-sidebar":"content",className:ye("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));DY.displayName="SidebarContent";const $Y=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{ref:n,"data-sidebar":"group",className:ye("relative flex w-full min-w-0 flex-col pt-xs",e),...t})));$Y.displayName="SidebarGroup";const NY=g.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?Cd:"div";return z.jsx(o,{ref:r,"data-sidebar":"group-label",className:ye("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-gray-700 opacity-60 outline-none ring-sidebar-ring transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-xl group-data-[collapsible=icon]:opacity-0",e),...n})}));NY.displayName="SidebarGroupLabel";const kY=g.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const o=t?Cd:"button";return z.jsx(o,{ref:r,"data-sidebar":"group-action",className:ye("absolute right-xs top-3.5 flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","group-data-[collapsible=icon]:hidden",e),...n})}));kY.displayName="SidebarGroupAction";const LY=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{ref:n,"data-sidebar":"group-content",className:ye("w-full text-sm",e),...t})));LY.displayName="SidebarGroupContent";const BY=g.forwardRef((({className:e,...t},n)=>z.jsx("ul",{ref:n,"data-sidebar":"menu",className:ye("flex w-full min-w-0 flex-col p-xs font-semibold text-gray-700 [&_svg]:size-4",e),...t})));BY.displayName="SidebarMenu";const VY=g.forwardRef((({className:e,...t},n)=>z.jsx("li",{ref:n,"data-sidebar":"menu-item",className:ye("group/menu-item relative",e),...t})));VY.displayName="SidebarMenuItem";const jY=xu("peer/menu-button flex w-full items-center gap-xxs overflow-hidden rounded-sm p-xxs text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:text-blue_100 hover:bg-white focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 group-has-[[data-sidebar=menu-action]]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-white data-[active=true]:font-medium data-[active=true]:text-blue_100 data-[state=open]:hover:bg-white data-[state=open]:hover:text-blue_100 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-2 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",{variants:{variant:{default:"hover:text-blue_100 hover:bg-white",outline:"bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-white hover:text-blue_100 hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))]"},size:{default:"h-s text-sm",sm:"h-m text-xs",lg:"h-l text-sm group-data-[collapsible=icon]:!p-0"}},defaultVariants:{variant:"default",size:"default"}}),FY=g.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:o,className:i,...a},s)=>{const u=e?Cd:"button",{isMobile:l,state:c}=v0(),d=z.jsx(u,{ref:s,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:ye(jY({variant:n,size:r}),i),...a});return o?("string"==typeof o&&(o={children:o}),z.jsxs(W3,{children:[z.jsx(q3,{asChild:!0,children:d}),z.jsx(X3,{side:"right",align:"center",hidden:"collapsed"!==c||l,...o})]})):d}));FY.displayName="SidebarMenuButton";const zY=g.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},o)=>{const i=t?Cd:"button";return z.jsx(i,{ref:o,"data-sidebar":"menu-action",className:ye("absolute right-xxxs top-xxs flex aspect-square w-5 items-center justify-center rounded-md p-0 text-sidebar-foreground outline-none ring-sidebar-ring transition-transform hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 peer-hover/menu-button:text-sidebar-accent-foreground [&>svg]:size-4 [&>svg]:shrink-0","after:absolute after:-inset-2 after:md:hidden","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",n&&"group-focus-within/menu-item:opacity-100 group-hover/menu-item:opacity-100 data-[state=open]:opacity-100 peer-data-[active=true]/menu-button:text-sidebar-accent-foreground md:opacity-0",e),...r})}));zY.displayName="SidebarMenuAction";const UY=g.forwardRef((({className:e,...t},n)=>z.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:ye("pointer-events-none absolute right-xxxs flex h-m min-w-5 select-none items-center justify-center rounded-md px-1 text-xs font-medium tabular-nums text-sidebar-foreground","peer-hover/menu-button:text-sidebar-accent-foreground peer-data-[active=true]/menu-button:text-sidebar-accent-foreground","peer-data-[size=sm]/menu-button:top-xxxs","peer-data-[size=default]/menu-button:top-xxs","peer-data-[size=lg]/menu-button:top-xs","group-data-[collapsible=icon]:hidden",e),...t})));UY.displayName="SidebarMenuBadge";const GY=g.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const o=g.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return z.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:ye("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&z.jsx(J2,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),z.jsx(J2,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":o}})]})}));GY.displayName="SidebarMenuSkeleton";const WY=g.forwardRef((({className:e,...t},n)=>z.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:ye("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));WY.displayName="SidebarMenuSub";const qY=g.forwardRef((({...e},t)=>z.jsx("li",{ref:t,...e})));qY.displayName="SidebarMenuSubItem";const HY=g.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...o},i)=>{const a=e?Cd:"a";return z.jsx(a,{ref:i,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:ye("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-gray-700 outline-none ring-sidebar-ring hover:bg-white hover:text-blue_100 focus-visible:ring-2 active:bg-white active:text-blue_100 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-blue_100","data-[active=true]:bg-white data-[active=true]:text-blue_100","sm"===t&&"text-xs","md"===t&&"text-sm","group-data-[collapsible=icon]:hidden",r),...o})}));HY.displayName="SidebarMenuSubButton";const dL="Switch",[XY,Vce]=ri(dL),[QY,KY]=XY(dL),YY=g.forwardRef(((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:i,required:a,disabled:s,value:u="on",onCheckedChange:l,...c}=e,[d,f]=g.useState(null),p=zt(t,(e=>f(e))),m=g.useRef(!1),h=!d||!!d.closest("form"),[y=!1,v]=bd({prop:o,defaultProp:i,onChange:l});return g.createElement(QY,{scope:n,checked:y,disabled:s},g.createElement(ft.button,Te({type:"button",role:"switch","aria-checked":y,"aria-required":a,"data-state":fL(y),"data-disabled":s?"":void 0,disabled:s,value:u},c,{ref:p,onClick:et(e.onClick,(e=>{v((e=>!e)),h&&(m.current=e.isPropagationStopped(),m.current||e.stopPropagation())}))})),h&&g.createElement(eJ,{control:d,bubbles:!m.current,name:r,value:u,checked:y,required:a,disabled:s,style:{transform:"translateX(-100%)"}}))})),JY="SwitchThumb",ZY=g.forwardRef(((e,t)=>{const{__scopeSwitch:n,...r}=e,o=KY(JY,n);return g.createElement(ft.span,Te({"data-state":fL(o.checked),"data-disabled":o.disabled?"":void 0},r,{ref:t}))})),eJ=e=>{const{control:t,checked:n,bubbles:r=!0,...o}=e,i=g.useRef(null),a=Zy(n),s=e0(t);return g.useEffect((()=>{const e=i.current,t=window.HTMLInputElement.prototype,o=Object.getOwnPropertyDescriptor(t,"checked").set;if(a!==n&&o){const t=new Event("click",{bubbles:r});o.call(e,n),e.dispatchEvent(t)}}),[a,n,r]),g.createElement("input",Te({type:"checkbox","aria-hidden":!0,defaultChecked:n},o,{tabIndex:-1,ref:i,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function fL(e){return e?"checked":"unchecked"}const pL=YY,tJ=ZY,nJ=g.forwardRef((({className:e,...t},n)=>z.jsx(pL,{className:ye("group peer inline-flex h-xs w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background data-[state=checked]:bg-blue_100 data-[state=unchecked]:bg-gray-200","disabled:cursor-not-allowed disabled:!bg-gray-100 md:hover:data-[state=checked]:bg-blue_120 md:hover:data-[state=unchecked]:!bg-gray-300",e),...t,ref:n,children:z.jsx(tJ,{className:ye("pointer-events-none block size-xxs rounded-full bg-background shadow-lg ring-0 transition-[transform,width] data-[state=checked]:translate-x-[20px] data-[state=unchecked]:translate-x-0",{"md:group-hover:w-[26px] md:group-hover:data-[state=checked]:translate-x-[14px]":!t.disabled,"bg-gray-300":t.disabled})})})));nJ.displayName=pL.displayName;const Z2={forgotPasswordStep:"request",forgotPasswordFields:null,signupStep:"rules",signupFields:null,token:null,newEmail:null,isPending:!!B_.getToken(),isAuthenticated:!1,isAskLoginOpen:!1},rJ=Wr({name:"auth",initialState:Z2,reducers:{setAskLoginOpen:(e,t)=>{e.isAskLoginOpen=t.payload},login:(e,t)=>{e.isAuthenticated=!0,e.token=t.payload||null,e.isPending=!1},logout:()=>({...Z2,isPending:!1}),setNewEmail:(e,t)=>{e.newEmail=t.payload},setForgotPasswordStep:(e,t)=>{e.forgotPasswordStep=t.payload},updateForgotPasswordFields:(e,t)=>{e.forgotPasswordFields={...e.forgotPasswordFields,...t.payload}},resetForgotPasswordFields:e=>{e.forgotPasswordFields=null},setSignupStep:(e,t)=>{e.signupStep=t.payload},updateSignupFields:(e,t)=>{e.signupFields={...e.signupFields,...t.payload}},resetSignupFields:e=>{e.signupFields=null},setPending:(e,t)=>{e.isPending=t.payload}},selectors:{selectAskLoginOpen:e=>e.isAskLoginOpen,selectToken:e=>e.token,selectNewEmail:e=>e.newEmail,selectForgotPasswordStep:e=>e.forgotPasswordStep,selectForgotPasswordFields:e=>e.forgotPasswordFields,selectSignupStep:e=>e.signupStep,selectSignupFields:e=>e.signupFields,selectPending:e=>e.isPending,selectIsAuthenticated:e=>e.isAuthenticated}}),oJ={data:null,isPending:!1,isSuccess:!1},iJ=Wr({name:"userNoHTML",initialState:oJ,reducers:{setUser:(e,t)=>{e.data=t.payload},setPending:(e,t)=>{e.isPending=t.payload},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setError:(e,{payload:t})=>{e.error=t}},selectors:{selectUser:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),eO={data:null,isError:!1,isPending:!1,isSuccess:!1},aJ=Wr({name:"user",initialState:eO,reducers:{reset:e=>{Object.assign(e,eO)}},extraReducers:e=>{e.addCase(i4,((e,{payload:t})=>{e.data=t})).addCase(a4,((e,{payload:t})=>{e.data&&Object.assign(e.data,t||{})})).addCase(o4,((e,{payload:t})=>{e.isSuccess=t})).addCase(r4,((e,{payload:t})=>{e.isPending=t})).addCase(n4,((e,{payload:t})=>{e.isError=t})).addCase(t4,((e,{payload:t})=>{e.error=t})).addCase(s4,((e,{payload:t})=>{var n;null!=(n=e.data)&&n.users&&(e.data.users=e.data.users.map((e=>t.id===e.id?t:e)))}))},selectors:{selectIsError:e=>e.isError,selectError:e=>e.error,selectPending:e=>e.isPending,selectData:e=>e.data,selectAccount:e=>{var t;return null==(t=e.data)?void 0:t.account},selectAccountId:e=>{var t;return null==(t=e.data)?void 0:t.account.id},selectUsers:e=>{var t;return null==(t=e.data)?void 0:t.users},selectUserById:(e,t)=>{var n;return null==(n=e.data)?void 0:n.users.find((({id:e})=>e===t))},selectCurrentUser:e=>{var t;return null==(t=e.data)?void 0:t.users.find((({id:t})=>{var n;return t===(null==(n=e.data)?void 0:n.selectedUserId)}))},selectSelectedUserId:e=>{var t;return null==(t=e.data)?void 0:t.selectedUserId},selectSuccess:e=>e.isSuccess}});var mO;const sJ={value:(null==(mO=G_())?void 0:mO.initialState)??null},uJ=Wr({name:"initialState",initialState:sJ,reducers:{setInitialState:(e,t)=>{e.value=t.payload},clearInitialState:e=>{e.value=null}},selectors:{selectInitialState:e=>e.value}}),yC=e=>e,g0=Zn(yC,(e=>e.data)),lJ=Zn(yC,(e=>e.error)),cJ=Zn(yC,(e=>e.isPending)),dJ=Zn(g0,(e=>null==e?void 0:e.rules)),fJ=Zn(g0,(e=>null==e?void 0:e.contact_account)),pJ=Zn(g0,(e=>(null==e?void 0:e.stats)&&Object.fromEntries(Object.entries(e.stats).map((([e,t])=>[e,t??0]))))),hJ={data:null,isPending:!1},mJ=Wr({name:"instanceInfo",initialState:hJ,reducers:{},extraReducers:e=>{e.addCase(y4,((e,{payload:t})=>{e.data=t})).addCase(w4,((e,{payload:t})=>{e.isPending=t})).addCase(b4,((e,{payload:t})=>{e.error=t}))},selectors:{selectInstanceInfo:g0,selectInstanceInfoError:lJ,selectInstanceInfoPending:cJ,selectPlatformRules:dJ,selectInstanceContacts:fJ,selectInstanceStats:pJ,selectDescription:e=>{var t;return null==(t=e.data)?void 0:t.description},selectStats:e=>{var t;return null==(t=e.data)?void 0:t.stats},selectRegistrations:e=>{var t;return null==(t=e.data)?void 0:t.configuration.registrations}}}),vJ={data:null,isPending:!1,isSuccess:!1},gJ=Wr({name:"profileSettings",initialState:vJ,reducers:{setPending:(e,t)=>{e.isPending=t.payload},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setError:(e,{payload:t})=>{e.error=t}},extraReducers:e=>{e.addCase(A4,((e,{payload:t})=>{e.data=t}))},selectors:{selectProfileSettings:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),yJ={sms:"wellesley.admin.sms",openai:"wellesley.admin.openai",uploads:"wellesley.admin.uploads",captcha:"wellesley.admin.captcha",language:"wellesley.admin.language",mediacache:"wellesley.admin.mediacache",translation:"wellesley.admin.translation",link_service:"wellesley.admin.link_service"},S_={posts:"wellesley.posts",translation:"wellesley.translation",registration:"wellesley.registration",confirmationCode:"wellesley.confirmationCode",uploadsPolicyDoc:"wellesley.uploads.policy.doc",uploadsPolicyAudio:"wellesley.uploads.policy.audio",uploadsPolicyImage:"wellesley.uploads.policy.image",uploadsPolicyVideo:"wellesley.uploads.policy.video",captcha:"wellesley.captcha",access:"wellesley.access",branding:"wellesley.branding",instanceAdmin:"wellesley.instance.admin",legal:"wellesley.instance.legal",domainBlocks:"wellesley.instance.domainBlocks",contacts:"wellesley.instance.contacts"},vu=e=>(null==e?void 0:e.map((e=>e.value||e)))||[],wJ={data:null,isPending:!1},{posts:TS,uploadsPolicyDoc:tO,uploadsPolicyAudio:MS,uploadsPolicyImage:ty,uploadsPolicyVideo:ov,registration:hL,captcha:bJ,instanceAdmin:xJ,branding:AJ,translation:SJ,domainBlocks:_J,access:IJ}=S_,{captcha:CJ,language:EJ,translation:PJ,openai:RJ,link_service:TJ}=yJ,hp=e=>e.data,MJ=Zn(hp,(e=>{var t,n,r;return{max_characters:(null==(t=null==e?void 0:e[TS])?void 0:t.max_characters)||0,max_media_attachments:(null==(n=null==e?void 0:e[TS])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==e?void 0:e[TS])?void 0:r.max_pins)||0}})),wC=Zn(hp,(e=>{var t,n,r;return{...null==e?void 0:e[ty],maxSize:(null==(t=null==e?void 0:e[ty])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[ty])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==e?void 0:e[ty])?void 0:r.maxResolution)||0}})),OJ=Zn(wC,(e=>vu(e.extensions))),bC=Zn(hp,(e=>{var t,n,r,o;return{...null==e?void 0:e[ov],maxSize:(null==(t=null==e?void 0:e[ov])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[ov])?void 0:n.maxMatrix)||0,maxDuration:(null==(r=null==e?void 0:e[ov])?void 0:r.maxDuration)||0,maxResolution:(null==(o=null==e?void 0:e[ov])?void 0:o.maxResolution)||0}})),DJ=Zn(bC,(e=>vu(e.extensions))),mL=Zn(hp,(e=>{var t,n;return{...null==e?void 0:e[MS],maxSize:null==(t=null==e?void 0:e[MS])?void 0:t.maxSize,keepOriginal:(null==(n=null==e?void 0:e[MS])?void 0:n.keepOriginal)||0}})),vL=Zn(hp,(e=>{var t;return{...null==e?void 0:e[tO],maxSize:(null==(t=null==e?void 0:e[tO])?void 0:t.maxSize)||0}})),gL=Zn([wC,bC,mL,vL],((e,t,n,r)=>({IMAGE:vu(null==e?void 0:e.extensions),VIDEO:vu(null==t?void 0:t.extensions),AUDIO:vu(null==n?void 0:n.extensions),DOCUMENT:vu(null==r?void 0:r.extensions)}))),$J=Zn(gL,(e=>Object.keys(e).reduce(((t,n)=>[...t,...e[n]||[]]),[]))),NJ=Zn(hp,(e=>{var t;return null==(t=null==e?void 0:e[hL])?void 0:t.invites})),Il=Wr({name:"platformSettings",initialState:wJ,reducers:{setError:(e,t)=>{e.error=t.payload},setPending:(e,t)=>{e.isPending=t.payload}},extraReducers:e=>{e.addCase(x4,((e,{payload:t})=>{e.data={...e.data,...t}}))},selectors:{selectSettings:hp,selectPostConfig:MJ,selectDocPolicy:vL,selectImagePolicy:wC,selectVideoPolicy:bC,selectAudioPolicy:mL,selectInvitesEnabled:NJ,selectImageExtensions:OJ,selectVideoExtensions:DJ,selectSupportedExtensions:gL,selectFullExtensionsList:$J,selectRegistration:e=>{var t;return null==(t=e.data)?void 0:t[hL]},selectLanguageDetection:e=>{var t;return null==(t=e.data)?void 0:t[EJ]},selectLanguageTranslation:e=>{var t;return null==(t=e.data)?void 0:t[PJ]},selectOpenai:e=>{var t;return null==(t=e.data)?void 0:t[RJ]},selectCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[bJ]},selectAdminCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[CJ]},selectPlatformTranslation:e=>{var t;return null==(t=e.data)?void 0:t[SJ]},selectAccess:e=>{var t;return null==(t=e.data)?void 0:t[IJ]},selectBranding:e=>{var t;return null==(t=e.data)?void 0:t[AJ]},selectLinkService:e=>{var t;return null==(t=e.data)?void 0:t[TJ]},selectInstanceAdmin:e=>{var t;return null==(t=e.data)?void 0:t[xJ]},selectLegal:e=>{var t;return null==(t=e.data)?void 0:t[S_.legal]},selectDomainBlocks:e=>{var t;return null==(t=e.data)?void 0:t[_J]},selectContacts:e=>{var t;return null==(t=e.data)?void 0:t[S_.contacts]}}}),nO={data:{userId:"",list:[]},count:{},isPending:!1},kJ=e=>e,LJ=e=>e.error,BJ=e=>e.isPending,VJ=e=>{var t;return null==(t=e.count)?void 0:t.total},jJ=e=>{var t;return null==(t=e.count)?void 0:t.unread},FJ=e=>e.data.userId,xC=Zn(kJ,(e=>e.data.list)),zJ=Zn(xC,(e=>null==e?void 0:e.filter((e=>"UNREAD"===e.status)))),UJ=Zn(xC,(e=>null==e?void 0:e.at(-1))),GJ=Wr({name:"notifications",initialState:nO,reducers:{updateNotification:(e,t)=>{var n;if(!e.data.list)return;const r=t.payload;e.data.list=null==(n=e.data.list)?void 0:n.map((e=>e.id===r.id?{...e,...r}:e))},readAll:e=>{var t;e.data.list&&(e.data.list=null==(t=e.data.list)?void 0:t.map((e=>({...e,status:"READ"}))))}},extraReducers:e=>{e.addCase(f4,((e,t)=>{e.isPending=t.payload})).addCase(c4,((e,t)=>{e.error=t.payload})).addCase(d4,((e,t)=>{const n=t.payload.userId,r=t.payload.list;e.data={userId:n,list:[...e.data.list||[],...r.filter((t=>{var n;return!(null!=(n=e.data.list)&&n.some((e=>e.id===t.id)))}))]}})).addCase(u4,((e,t)=>{e.count.unread=(e.count.unread||0)+1,e.data.list&&(e.data.list=[t.payload,...e.data.list||[]])})).addCase(l4,((e,t)=>{e.data.list&&(e.data.list=e.data.list.map((e=>e.id===t.payload.id?{...e,status:t.payload.status}:e)))})).addCase(p4,((e,t)=>{e.count.total=t.payload})).addCase(h4,((e,t)=>{e.count.unread=t.payload})).addCase(v4,(()=>nO)).addCase(g4,((e,t)=>{var n,r,o;const i=t.payload;"UNREAD"===(null==(r=null==(n=e.data.list)?void 0:n.find((e=>e.id===i)))?void 0:r.status)&&e.count.unread&&(e.count.unread-=1),e.data.list=(null==(o=e.data.list)?void 0:o.filter((e=>e.id!==i)))||[]})).addCase(m4,(e=>{e.data.list&&(e.data.list=e.data.list.map((e=>"FOLLOW_REQUEST"===e.type?{...e,followResponse:"Accepted"}:e)))}))},selectors:{selectError:LJ,selectIsPending:BJ,selectTotalCount:VJ,selectUnreadCount:jJ,selectNotifications:xC,selectUnreadNotifications:zJ,selectLastNotification:UJ,selectNotificationsOwner:FJ}});function WJ(){return!(typeof navigator<"u"&&"boolean"==typeof navigator.onLine)||navigator.onLine}const qJ={isOnline:WJ()},HJ=Wr({name:"network",initialState:qJ,reducers:{setOnline:(e,{payload:t})=>{e.isOnline=t}},selectors:{selectOnline:e=>e.isOnline}}),AC=j5(W_,HJ,Y3,rJ,aJ,iJ,uJ,mJ,GJ,gJ,Il);zn("app/hydrate");var rO,cv={exports:{}},XJ=cv.exports;
|
|
88
88
|
/**
|
|
89
89
|
* @license
|
|
90
90
|
* Lodash <https://lodash.com/>
|