@wellesley/settings 1.0.172 → 1.0.173

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.
Files changed (2) hide show
  1. package/index.mjs +4 -4
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- var AW=Object.defineProperty,TW=(e,t,n)=>t in e?AW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gx=(e,t,n)=>TW(e,"symbol"!=typeof t?t+"":t,n);function IW(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 po(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 PW="function"==typeof Symbol&&Symbol.observable||"@@observable",n9=PW,Kx=()=>Math.random().toString(36).substring(7).split("").join("."),$W={INIT:`@@redux/INIT${Kx()}`,REPLACE:`@@redux/REPLACE${Kx()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Kx()}`},Kb=$W;function Vl(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 I8(e,t,n){if("function"!=typeof e)throw new Error(po(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(po(0));if("function"==typeof t&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if("function"!=typeof n)throw new Error(po(1));return n(I8)(e,t)}let r=e,a=t,o=new Map,i=o,s=0,c=!1;function l(){i===o&&(i=new Map,o.forEach(((e,t)=>{i.set(t,e)})))}function u(){if(c)throw new Error(po(3));return a}function f(e){if("function"!=typeof e)throw new Error(po(4));if(c)throw new Error(po(5));let t=!0;l();const n=s++;return i.set(n,e),function(){if(t){if(c)throw new Error(po(6));t=!1,l(),i.delete(n),o=null}}}function d(e){if(!Vl(e))throw new Error(po(7));if(typeof e.type>"u")throw new Error(po(8));if("string"!=typeof e.type)throw new Error(po(17));if(c)throw new Error(po(9));try{c=!0,a=r(a,e)}finally{c=!1}return(o=i).forEach((e=>{e()})),e}return d({type:Kb.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(po(10));r=e,d({type:Kb.REPLACE})},[n9]:function(){const e=f;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(po(11));function n(){const e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[n9](){return this}}}}}function OW(e){Object.keys(e).forEach((t=>{const n=e[t];if(typeof n(void 0,{type:Kb.INIT})>"u")throw new Error(po(12));if(typeof n(void 0,{type:Kb.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(po(13))}))}function GR(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const a=t[r];"function"==typeof e[a]&&(n[a]=e[a])}const r=Object.keys(n);let a;try{OW(n)}catch(e){a=e}return function(e={},t){if(a)throw a;let o=!1;const i={};for(let a=0;a<r.length;a++){const s=r[a],c=n[s],l=e[s],u=c(l,t);if(typeof u>"u")throw t&&t.type,new Error(po(14));i[s]=u,o=o||u!==l}return o=o||r.length!==Object.keys(e).length,o?i:e}}function Qb(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function zW(...e){return t=>(n,r)=>{const a=t(n,r);let o=()=>{throw new Error(po(15))};const i={getState:a.getState,dispatch:(e,...t)=>o(e,...t)},s=e.map((e=>e(i)));return o=Qb(...s)(a.dispatch),{...a,dispatch:o}}}function P8(e){return Vl(e)&&"type"in e&&"string"==typeof e.type}var KR=Symbol.for("immer-nothing"),Cy=Symbol.for("immer-draftable"),Ri=Symbol.for("immer-state");function ho(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var um=Object.getPrototypeOf;function Lc(e){return!!e&&!!e[Ri]}function jc(e){var t;return!!e&&($8(e)||Array.isArray(e)||!!e[Cy]||!(null==(t=e.constructor)||!t[Cy])||O_(e)||z_(e))}var MW=Object.prototype.constructor.toString();function $8(e){if(!e||"object"!=typeof e)return!1;const t=um(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)===MW}function DW(e){return Lc(e)||ho(15,e),e[Ri].base_}function S1(e,t){0===dm(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function dm(e){const t=e[Ri];return t?t.type_:Array.isArray(e)?1:O_(e)?2:z_(e)?3:0}function Hy(e,t){return 2===dm(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qx(e,t){return 2===dm(e)?e.get(t):e[t]}function O8(e,t,n){const r=dm(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function NW(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function O_(e){return e instanceof Map}function z_(e){return e instanceof Set}function Xh(e){return e.copy_||e.base_}function dC(e,t){if(O_(e))return new Map(e);if(z_(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&$8(e))return um(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Ri];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const a=r[t],o=n[a];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(n[a]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[a]})}return Object.create(um(e),n)}function QR(e,t=!1){return Qw(e)||Lc(e)||!jc(e)||(dm(e)>1&&(e.set=e.add=e.clear=e.delete=LW),Object.freeze(e),t&&S1(e,((e,t)=>QR(t,!0)))),e}function LW(){ho(2)}function Qw(e){return Object.isFrozen(e)}var Gy,pC={};function pm(e){const t=pC[e];return t||ho(0,e),t}function jW(e,t){pC[e]||(pC[e]=t)}function z8(){return Gy}function FW(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function r9(e,t){t&&(pm("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function hC(e){mC(e),e.drafts_.forEach(BW),e.drafts_=null}function mC(e){e===Gy&&(Gy=e.parent_)}function a9(e){return Gy=FW(Gy,e)}function BW(e){const t=e[Ri];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function o9(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Ri].modified_&&(hC(t),ho(4)),jc(e)&&(e=Yb(t,e),t.parent_||Zb(t,e)),t.patches_&&pm("Patches").generateReplacementPatches_(n[Ri].base_,e,t.patches_,t.inversePatches_)):e=Yb(t,n,[]),hC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==KR?e:void 0}function Yb(e,t,n){if(Qw(t))return t;const r=t[Ri];if(!r)return S1(t,((a,o)=>i9(e,r,t,a,o,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Zb(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let a=t,o=!1;3===r.type_&&(a=new Set(t),t.clear(),o=!0),S1(a,((a,i)=>i9(e,r,t,a,i,n,o))),Zb(e,t,!1),n&&e.patches_&&pm("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function i9(e,t,n,r,a,o,i){if(Lc(a)){const i=Yb(e,a,o&&t&&3!==t.type_&&!Hy(t.assigned_,r)?o.concat(r):void 0);if(O8(n,r,i),!Lc(i))return;e.canAutoFreeze_=!1}else i&&n.add(a);if(jc(a)&&!Qw(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Yb(e,a),(!t||!t.scope_.parent_)&&Zb(e,a)}}function Zb(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&QR(t,n)}function VW(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:z8(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,o=YR;n&&(a=[r],o=Ky);const{revoke:i,proxy:s}=Proxy.revocable(a,o);return r.draft_=s,r.revoke_=i,s}var YR={get(e,t){if(t===Ri)return e;const n=Xh(e);if(!Hy(n,t))return UW(e,n,t);const r=n[t];return e.finalized_||!jc(r)?r:r===Yx(e.base_,t)?(Zx(e),e.copy_[t]=yC(r,e)):r},has:(e,t)=>t in Xh(e),ownKeys:e=>Reflect.ownKeys(Xh(e)),set(e,t,n){const r=M8(Xh(e),t);if(null!=r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Yx(Xh(e),t),a=null==r?void 0:r[Ri];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(NW(n,r)&&(void 0!==n||Hy(e.base_,t)))return!0;Zx(e),gC(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!==Yx(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Zx(e),gC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Xh(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){ho(11)},getPrototypeOf:e=>um(e.base_),setPrototypeOf(){ho(12)}},Ky={};function Yx(e,t){const n=e[Ri];return(n?Xh(n):e)[t]}function UW(e,t,n){var r;const a=M8(t,n);return a?"value"in a?a.value:null==(r=a.get)?void 0:r.call(e.draft_):void 0}function M8(e,t){if(!(t in e))return;let n=um(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=um(n)}}function gC(e){e.modified_||(e.modified_=!0,e.parent_&&gC(e.parent_))}function Zx(e){e.copy_||(e.copy_=dC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}S1(YR,((e,t)=>{Ky[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Ky.deleteProperty=function(e,t){return Ky.set.call(this,e,t,void 0)},Ky.set=function(e,t,n){return YR.set.call(this,e[0],t,n,e[0])};var qW=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,...a){return r.produce(e,(e=>t.call(this,e,...a)))}}let r;if("function"!=typeof t&&ho(6),void 0!==n&&"function"!=typeof n&&ho(7),jc(e)){const a=a9(this),o=yC(e,void 0);let i=!0;try{r=t(o),i=!1}finally{i?hC(a):mC(a)}return r9(a,n),o9(r,a)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===KR&&(r=void 0),this.autoFreeze_&&QR(r,!0),n){const t=[],a=[];pm("Patches").generateReplacementPatches_(e,r,t,a),n(t,a)}return r}ho(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){jc(e)||ho(8),Lc(e)&&(e=D8(e));const t=a9(this),n=yC(e,void 0);return n[Ri].isManual_=!0,mC(t),n}finishDraft(e,t){const n=e&&e[Ri];(!n||!n.isManual_)&&ho(9);const{scope_:r}=n;return r9(r,t),o9(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=pm("Patches").applyPatches_;return Lc(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function yC(e,t){const n=O_(e)?pm("MapSet").proxyMap_(e,t):z_(e)?pm("MapSet").proxySet_(e,t):VW(e,t);return(t?t.scope_:z8()).drafts_.push(n),n}function D8(e){return Lc(e)||ho(10,e),N8(e)}function N8(e){if(!jc(e)||Qw(e))return e;const t=e[Ri];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=dC(e,t.scope_.immer_.useStrictShallowCopy_)}else n=dC(e,!0);return S1(n,((e,t)=>{O8(n,e,N8(t))})),t&&(t.finalized_=!1),n}function WW(){const e="replace",t="add",n="remove";function r(e){if(!jc(e))return e;if(Array.isArray(e))return e.map(r);if(O_(e))return new Map(Array.from(e.entries()).map((([e,t])=>[e,r(t)])));if(z_(e))return new Set(Array.from(e).map(r));const t=Object.create(um(e));for(const n in e)t[n]=r(e[n]);return Hy(e,Cy)&&(t[Cy]=e[Cy]),t}function a(e){return Lc(e)?r(e):e}jW("Patches",{applyPatches_:function(a,o){return o.forEach((o=>{const{path:i,op:s}=o;let c=a;for(let e=0;e<i.length-1;e++){const t=dm(c);let n=i[e];"string"!=typeof n&&"number"!=typeof n&&(n=""+n),(0===t||1===t)&&("__proto__"===n||"constructor"===n)&&ho(19),"function"==typeof c&&"prototype"===n&&ho(19),c=Qx(c,n),"object"!=typeof c&&ho(18,i.join("/"))}const l=dm(c),u=r(o.value),f=i[i.length-1];switch(s){case e:switch(l){case 2:return c.set(f,u);case 3:ho(16);default:return c[f]=u}case t:switch(l){case 1:return"-"===f?c.push(u):c.splice(f,0,u);case 2:return c.set(f,u);case 3:return c.add(u);default:return c[f]=u}case n:switch(l){case 1:return c.splice(f,1);case 2:return c.delete(f);case 3:return c.delete(o.value);default:return delete c[f]}default:ho(17,s)}})),a},generatePatches_:function(r,o,i,s){switch(r.type_){case 0:case 2:return function(r,o,i,s){const{base_:c,copy_:l}=r;S1(r.assigned_,((r,u)=>{const f=Qx(c,r),d=Qx(l,r),p=u?Hy(c,r)?e:t:n;if(f===d&&p===e)return;const h=o.concat(r);i.push(p===n?{op:p,path:h}:{op:p,path:h,value:d}),s.push(p===t?{op:n,path:h}:p===n?{op:t,path:h,value:a(f)}:{op:e,path:h,value:a(f)})}))}(r,o,i,s);case 1:return function(r,o,i,s){let{base_:c,assigned_:l}=r,u=r.copy_;u.length<c.length&&([c,u]=[u,c],[i,s]=[s,i]);for(let t=0;t<c.length;t++)if(l[t]&&u[t]!==c[t]){const n=o.concat([t]);i.push({op:e,path:n,value:a(u[t])}),s.push({op:e,path:n,value:a(c[t])})}for(let e=c.length;e<u.length;e++){const n=o.concat([e]);i.push({op:t,path:n,value:a(u[e])})}for(let e=u.length-1;c.length<=e;--e){const t=o.concat([e]);s.push({op:n,path:t})}}(r,o,i,s);case 3:return function(e,r,a,o){let{base_:i,copy_:s}=e,c=0;i.forEach((e=>{if(!s.has(e)){const i=r.concat([c]);a.push({op:n,path:i,value:e}),o.unshift({op:t,path:i,value:e})}c++})),c=0,s.forEach((e=>{if(!i.has(e)){const i=r.concat([c]);a.push({op:t,path:i,value:e}),o.unshift({op:n,path:i,value:e})}c++}))}(r,o,i,s)}},generateReplacementPatches_:function(t,n,r,a){r.push({op:e,path:[],value:n===KR?void 0:n}),a.push({op:e,path:[],value:t})}})}var as=new qW,M_=as.produce,L8=as.produceWithPatches.bind(as);as.setAutoFreeze.bind(as),as.setUseStrictShallowCopy.bind(as);var s9=as.applyPatches.bind(as);function HW(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function GW(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function KW(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}]`)}}as.createDraft.bind(as),as.finishDraft.bind(as);var c9=e=>Array.isArray(e)?e:[e];function QW(e){const t=Array.isArray(e[0])?e[0]:e;return KW(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YW(e,t){const n=[],{length:r}=e;for(let a=0;a<r;a++)n.push(e[a].apply(null,t));return n}var ZW=class{constructor(e){this.value=e}deref(){return this.value}},XW=typeof WeakRef<"u"?WeakRef:ZW,JW=0,l9=1;function Bv(){return{s:JW,v:void 0,o:null,p:null}}function Qy(e,t={}){let n=Bv();const{resultEqualityCheck:r}=t;let a,o=0;function i(){var t;let i=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=i.o;null===e&&(i.o=e=new WeakMap);const n=e.get(t);void 0===n?(i=Bv(),e.set(t,i)):i=n}else{let e=i.p;null===e&&(i.p=e=new Map);const n=e.get(t);void 0===n?(i=Bv(),e.set(t,i)):i=n}}const c=i;let l;if(i.s===l9?l=i.v:(l=e.apply(null,arguments),o++),c.s=l9,r){const e=(null==(t=null==a?void 0:a.deref)?void 0:t.call(a))??a;null!=e&&r(e,l)&&(l=e,0!==o&&o--),a="object"==typeof l&&null!==l||"function"==typeof l?new XW(l):l}return c.v=l,l}return i.clearCache=()=>{n=Bv(),i.resetResultsCount()},i.resultsCount=()=>o,i.resetResultsCount=()=>{o=0},i}function j8(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,a=0,o={},i=e.pop();"object"==typeof i&&(o=i,i=e.pop()),HW(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const s={...n,...o},{memoize:c,memoizeOptions:l=[],argsMemoize:u=Qy,argsMemoizeOptions:f=[],devModeChecks:d={}}=s,p=c9(l),h=c9(f),m=QW(e),y=c((function(){return r++,i.apply(null,arguments)}),...p),g=u((function(){a++;const e=YW(m,arguments);return t=y.apply(null,e),t}),...h);return Object.assign(g,{resultFunc:i,memoizedResultFunc:y,dependencies:m,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:c,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var go=j8(Qy),eH=Object.assign(((e,t=go)=>{GW(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:()=>eH});function F8(e){return({dispatch:t,getState:n})=>r=>a=>"function"==typeof a?a(t,n,e):r(a)}var tH=F8(),nH=F8,rH={USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.16.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.0",npm_config_npm_version:"10.9.2",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.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.16.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.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/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.16.0/bin",TURBO_HASH:"2ec5ae70fa15de8b",NODE:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_package_name:"@wellesley/settings",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:"tsc && vite build",SHELL:"/bin/bash",npm_package_version:"1.0.172",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.16.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",EDITOR:"vi",NODE_ENV:"production",APP_NAME:"@wellesley/settings"},aH=(...e)=>{const t=j8(...e),n=Object.assign(((...e)=>{const n=t(...e),r=(e,...t)=>n(Lc(e)?D8(e):e,...t);return Object.assign(r,n),r}),{withTypes:()=>n});return n};aH(Qy);var oH=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Qb:Qb.apply(null,arguments)},iH=e=>e&&"function"==typeof e.match;function Ir(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(Ha(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=>P8(t)&&t.type===e,n}var B8=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function f9(e){return jc(e)?M_(e,(()=>{})):e}function _C(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(Ha(10));const r=n.insert(t,e);return e.set(t,r),r}function sH(e){return"boolean"==typeof e}var cH=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:a=!0}=e??{};let o=new B8;return t&&(sH(t)?o.push(tH):o.push(nH(t.extraArgument))),o},u1="RTK_autoBatch",X0=()=>e=>({payload:e,meta:{[u1]:!0}}),V8=e=>t=>{setTimeout(t,e)},lH=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:V8(10),fH=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let a=!0,o=!1,i=!1;const s=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?lH:"callback"===e.type?e.queueNotification:V8(e.timeout),l=()=>{i=!1,o&&(o=!1,s.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>a&&e()));return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){var t;try{return a=!(null!=(t=null==e?void 0:e.meta)&&t[u1]),o=!a,o&&(i||(i=!0,c(l))),r.dispatch(e)}finally{a=!0}}})},uH=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new B8(e);return n&&r.push(fH("object"==typeof n?n:void 0)),r},dH="production"===rH.NODE_ENV;function pH(e){const t=cH(),{reducer:n,middleware:r,devTools:a=!0,preloadedState:o,enhancers:i}=e;let s,c;if("function"==typeof n)s=n;else{if(!Vl(n))throw new Error(Ha(1));s=GR(n)}c="function"==typeof r?r(t):t();let l=Qb;a&&(l=oH({trace:!dH,..."object"==typeof a&&a}));const u=zW(...c),f=uH(u);return I8(s,o,l(..."function"==typeof i?i(f):f()))}function U8(e){const t={},n=[];let r;const a={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(Ha(28));if(r in t)throw new Error(Ha(29));return t[r]=n,a},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),a),addDefaultCase:e=>(r=e,a)};return e(a),[t,n,r]}function hH(e){return"function"==typeof e}function mH(e,t){let n,[r,a,o]=U8(t);if(hH(e))n=()=>f9(e());else{const t=f9(e);n=()=>t}function i(e=n(),t){let i=[r[t.type],...a.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===i.filter((e=>!!e)).length&&(i=[o]),i.reduce(((e,n)=>{if(n){if(Lc(e)){const r=n(e,t);return void 0===r?e:r}if(jc(e))return M_(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error(Ha(9))}return r}}return e}),e)}return i.getInitialState=n,i}var gH="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Yw=(e=21)=>{let t="",n=e;for(;n--;)t+=gH[64*Math.random()|0];return t},q8=(e,t)=>iH(e)?e.match(t):e(t);function bp(...e){return t=>e.some((e=>q8(e,t)))}function Ry(...e){return t=>e.every((e=>q8(e,t)))}function Zw(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 D_(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ZR(...e){return 0===e.length?e=>Zw(e,["pending"]):D_(e)?t=>bp(...e.map((e=>e.pending)))(t):ZR()(e[0])}function E1(...e){return 0===e.length?e=>Zw(e,["rejected"]):D_(e)?t=>bp(...e.map((e=>e.rejected)))(t):E1()(e[0])}function Xw(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||D_(e)?n=>Ry(E1(...e),t)(n):Xw()(e[0])}function wp(...e){return 0===e.length?e=>Zw(e,["fulfilled"]):D_(e)?t=>bp(...e.map((e=>e.fulfilled)))(t):wp()(e[0])}function vC(...e){return 0===e.length?e=>Zw(e,["pending","fulfilled","rejected"]):D_(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return bp(...n)(t)}:vC()(e[0])}var yH=["name","message","stack","code"],Xx=class{constructor(e,t){Gx(this,"_type"),this.payload=e,this.meta=t}},u9=class{constructor(e,t){Gx(this,"_type"),this.payload=e,this.meta=t}},_H=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of yH)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},d9=(()=>{function e(e,t,n){const r=Ir(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),a=Ir(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),o=Ir(e+"/rejected",((e,t,r,a,o)=>({payload:a,error:(n&&n.serializeError||_H)(e||"Rejected"),meta:{...o||{},arg:r,requestId:t,rejectedWithValue:!!a,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)}})));return Object.assign((function(e){return(i,s,c)=>{const l=null!=n&&n.idGenerator?n.idGenerator(e):Yw(),u=new AbortController;let f,d;function p(e){d=e,u.abort()}const h=async function(){var h,m;let y;try{let o=null==(h=null==n?void 0:n.condition)?void 0:h.call(n,e,{getState:s,extra:c});if(bH(o)&&(o=await o),!1===o||u.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const g=new Promise(((e,t)=>{f=()=>{t({name:"AbortError",message:d||"Aborted"})},u.signal.addEventListener("abort",f)}));i(a(l,e,null==(m=null==n?void 0:n.getPendingMeta)?void 0:m.call(n,{requestId:l,arg:e},{getState:s,extra:c}))),y=await Promise.race([g,Promise.resolve(t(e,{dispatch:i,getState:s,extra:c,requestId:l,signal:u.signal,abort:p,rejectWithValue:(e,t)=>new Xx(e,t),fulfillWithValue:(e,t)=>new u9(e,t)})).then((t=>{if(t instanceof Xx)throw t;return t instanceof u9?r(t.payload,l,e,t.meta):r(t,l,e)}))])}catch(t){y=t instanceof Xx?o(null,l,e,t.payload,t.meta):o(t,l,e)}finally{f&&u.signal.removeEventListener("abort",f)}return n&&!n.dispatchConditionRejection&&o.match(y)&&y.meta.condition||i(y),y}();return Object.assign(h,{abort:p,requestId:l,arg:e,unwrap:()=>h.then(vH)})}}),{pending:a,rejected:o,fulfilled:r,settled:bp(o,r),typePrefix:e})}return e.withTypes=()=>e,e})();function vH(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function bH(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}var wH=Symbol.for("rtk-slice-createasyncthunk");function kH(e,t){return`${e}/${t}`}function xH({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[wH];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error(Ha(11));const a=("function"==typeof e.reducers?e.reducers(EH()):e.reducers)||{},o=Object.keys(a),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(Ha(12));if(n in i.sliceCaseReducersByType)throw new Error(Ha(13));return i.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(i.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,s)};function c(){const[t={},n=[],r]="function"==typeof e.extraReducers?U8(e.extraReducers):[e.extraReducers],a={...t,...i.sliceCaseReducersByType};return mH(e.initialState,(e=>{for(let t in a)e.addCase(t,a[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}o.forEach((r=>{const o=a[r],i={reducerName:r,type:kH(t,r),createNotation:"function"==typeof e.reducers};RH(o)?TH(i,o,s,n):CH(i,o,s)}));const l=e=>e,u=new Map;let f;function d(e,t){return f||(f=c()),f(e,t)}function p(){return f||(f=c()),f.getInitialState()}function h(t,n=!1){function r(e){let r=e[t];return typeof r>"u"&&n&&(r=p()),r}function a(t=l){const r=_C(u,n,{insert:()=>new WeakMap});return _C(r,t,{insert:()=>{const r={};for(const[a,o]of Object.entries(e.selectors??{}))r[a]=SH(o,t,p,n);return r}})}return{reducerPath:t,getSelectors:a,get selectors(){return a(r)},selectSlice:r}}const m={name:t,reducer:d,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:p,...h(r),injectInto(e,{reducerPath:t,...n}={}){const a=t??r;return e.inject({reducerPath:a,reducer:d},n),{...m,...h(a,!0)}}};return m}}function SH(e,t,n,r){function a(a,...o){let i=t(a);return typeof i>"u"&&r&&(i=n()),e(i,...o)}return a.unwrapped=e,a}var ua=xH();function EH(){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 CH({type:e,reducerName:t,createNotation:n},r,a){let o,i;if("reducer"in r){if(n&&!AH(r))throw new Error(Ha(17));o=r.reducer,i=r.prepare}else o=r;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,i?Ir(e,i):Ir(e))}function RH(e){return"asyncThunk"===e._reducerDefinitionType}function AH(e){return"reducerWithPrepare"===e._reducerDefinitionType}function TH({type:e,reducerName:t},n,r,a){if(!a)throw new Error(Ha(18));const{payloadCreator:o,fulfilled:i,pending:s,rejected:c,settled:l,options:u}=n,f=a(e,o,u);r.exposeAction(t,f),i&&r.addCase(f.fulfilled,i),s&&r.addCase(f.pending,s),c&&r.addCase(f.rejected,c),l&&r.addMatcher(f.settled,l),r.exposeCaseReducer(t,{fulfilled:i||Vv,pending:s||Vv,rejected:c||Vv,settled:l||Vv})}function Vv(){}var IH=(e,t)=>{if("function"!=typeof e)throw new Error(Ha(32))},XR="listenerMiddleware",PH=e=>{let{type:t,actionCreator:n,matcher:r,predicate:a,effect:o}=e;if(t)a=Ir(t).match;else if(n)t=n.type,a=n.match;else if(r)a=r;else if(!a)throw new Error(Ha(21));return IH(o),{predicate:a,type:t,effect:o}},$H=Object.assign((e=>{const{type:t,predicate:n,effect:r}=PH(e);return{id:Yw(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Ha(22))}}}),{withTypes:()=>$H}),OH=Object.assign(Ir(`${XR}/add`),{withTypes:()=>OH});Ir(`${XR}/removeAll`);var zH=Object.assign(Ir(`${XR}/remove`),{withTypes:()=>zH}),MH=e=>"reducerPath"in e&&"string"==typeof e.reducerPath,DH=e=>e.flatMap((e=>MH(e)?[[e.reducerPath,e.reducer]]:Object.entries(e))),JR=Symbol.for("rtk-state-proxy-original"),NH=e=>!!e&&!!e[JR],LH=new WeakMap,jH=(e,t)=>_C(LH,e,{insert:()=>new Proxy(e,{get:(e,n,r)=>{if(n===JR)return e;const a=Reflect.get(e,n,r);if(typeof a>"u"){const e=t[n.toString()];if(e){const t=e(void 0,{type:Yw()});if(typeof t>"u")throw new Error(Ha(24));return t}}return a}})}),FH=e=>{if(!NH(e))throw new Error(Ha(25));return e[JR]},BH=(e={})=>e;function VH(...e){const t=Object.fromEntries(DH(e)),n=()=>Object.keys(t).length?GR(t):BH;let r=n();function a(e,t){return r(e,t)}a.withLazyLoadedSlices=()=>a;const o=Object.assign((function(e,n){return function(r,...a){return e(jH(n?n(r,...a):r,t),...a)}}),{original:FH});return Object.assign(a,{inject:(e,o={})=>{const{reducerPath:i,reducer:s}=e,c=t[i];return!o.overrideExisting&&c&&c!==s||(t[i]=s,r=n()),a},selector:o})}function Ha(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. `}const UH={data:null,isPending:!1,isSuccess:!1},Yy=ua({name:"profileSettings",initialState:UH,reducers:{setSettings:(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:{selectProfileSettings:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),bt={openaiConfigModel:"wellesley.openai.config.model",openaiConfigApiKey:"wellesley.openai.config.apiKey",uploadsProvider:"wellesley.uploads.provider",uploadsS3:"wellesley.uploads.s3",uploadsPolicyImageExtensions:"wellesley.uploads.policy.image.extensions",uploadsPolicyImageKeepOriginal:"wellesley.uploads.policy.image.keepOriginal",uploadsPolicyImageResolutions:"wellesley.uploads.policy.image.resolutions",uploadsPolicyImageMaxResolution:"wellesley.uploads.policy.image.maxResolution",uploadsPolicyImageMaxMatrix:"wellesley.uploads.policy.image.maxMatrix",uploadsPolicyImageMaxSize:"wellesley.uploads.policy.image.maxSize",uploadsPolicyVideoExtensions:"wellesley.uploads.policy.video.extensions",uploadsPolicyVideoResolutions:"wellesley.uploads.policy.video.resolutions",uploadsPolicyVideoKeepOriginal:"wellesley.uploads.policy.video.keepOriginal",uploadsPolicyVideoMaxResolution:"wellesley.uploads.policy.video.maxResolution",uploadsPolicyVideoMaxMatrix:"wellesley.uploads.policy.video.maxMatrix",uploadsPolicyVideoMaxSize:"wellesley.uploads.policy.video.maxSize",uploadsPolicyVideoMaxDuration:"wellesley.uploads.policy.video.maxDuration",uploadsPolicyVideoStreamingThreshold:"wellesley.uploads.policy.video.streamingThreshold",uploadsPolicyAudioExtensions:"wellesley.uploads.policy.audio.extensions",uploadsPolicyAudioKeepOriginal:"wellesley.uploads.policy.audio.keepOriginal",uploadsPolicyAudioMaxSize:"wellesley.uploads.policy.audio.maxSize",uploadsPolicyDocExtensions:"wellesley.uploads.policy.doc.extensions",uploadsPolicyDocMaxSize:"wellesley.uploads.policy.doc.maxSize",mediacacheEnabled:"wellesley.mediacache.enabled",mediacacheMaxTotalSize:"wellesley.mediacache.maxTotalSize",mediacacheMaxFileSize:"wellesley.mediacache.maxFileSize",mediacacheLimitPerRun:"wellesley.mediacache.limitPerRun",mediacacheSingleRun:"wellesley.mediacache.singleRun",mediacacheCheckInterval:"wellesley.mediacache.checkInterval",postsMaxMediaAttachments:"wellesley.posts.max_media_attachments",postsMaxCharacters:"wellesley.posts.max_characters",postsMaxPins:"wellesley.posts.max_pins",registrationMode:"wellesley.registration.mode",registrationInvitesEnabled:"wellesley.registration.invitesEnabled",registrationReasonToJoin:"wellesley.registration.reasonToJoin",registrationShowCaptcha:"wellesley.registration.showCaptcha",registrationNotAvailableMessage:"wellesley.registration.notAvailableMessage",captchaVerifyUrl:"wellesley.captcha.verifyUrl",captchaSecretKey:"wellesley.captcha.secretKey",captchaSiteKey:"wellesley.captcha.siteKey",confirmationCodeCodeExpirationMinutes:"wellesley.confirmationCode.codeExpirationMinutes",confirmationCodeCounterExpirationMinutes:"wellesley.confirmationCode.counterExpirationMinutes",confirmationCodeLimitStoreAttempts:"wellesley.confirmationCode.limitStoreAttempts",confirmationCodeLimitCheckAttempts:"wellesley.confirmationCode.limitCheckAttempts",translation:"wellesley.translation"},MWe=[bt.uploadsPolicyImageExtensions,bt.uploadsPolicyImageKeepOriginal,bt.uploadsPolicyImageResolutions,bt.uploadsPolicyImageMaxResolution,bt.uploadsPolicyImageMaxMatrix,bt.uploadsPolicyImageMaxSize,bt.uploadsPolicyVideoExtensions,bt.uploadsPolicyVideoResolutions,bt.uploadsPolicyVideoKeepOriginal,bt.uploadsPolicyVideoMaxResolution,bt.uploadsPolicyVideoMaxMatrix,bt.uploadsPolicyVideoMaxSize,bt.uploadsPolicyVideoMaxDuration,bt.uploadsPolicyVideoStreamingThreshold,bt.uploadsPolicyAudioExtensions,bt.uploadsPolicyAudioKeepOriginal,bt.uploadsPolicyAudioMaxSize,bt.uploadsPolicyDocExtensions,bt.uploadsPolicyDocMaxSize,bt.mediacacheEnabled,bt.mediacacheMaxTotalSize,bt.mediacacheMaxFileSize,bt.mediacacheLimitPerRun,bt.mediacacheSingleRun,bt.mediacacheCheckInterval,bt.postsMaxMediaAttachments,bt.postsMaxCharacters,bt.postsMaxPins,bt.registrationMode,bt.registrationInvitesEnabled,bt.registrationReasonToJoin,bt.registrationShowCaptcha,bt.registrationNotAvailableMessage],DWe="wellesley",uo={followAutoAccept:"user.follow.autoAccept",notificationsPrefsFollow:"user.notifications.prefs.follow",notificationsPrefsFollow_request:"user.notifications.prefs.followRequest",notificationsPrefsLike:"user.notifications.prefs.like",notificationsPrefsComment:"user.notifications.prefs.comment",notificationsPrefsMention:"user.notifications.prefs.mention",notificationsPrefsRepost:"user.notifications.prefs.repost",notificationsPrefsList_post_create:"user.notifications.prefs.list_post_create",notificationsPrefsPost_update:"user.notifications.prefs.post_update",notificationsPrefsSubscribeOnComment:"user.notifications.prefs.subscribeOnComment",notificationsPrefsAlwaysSendEmail:"user.notifications.prefs.alwaysSendEmail",notificationsShowPopup:"user.notifications.prefs.showPopup",notificationsPolicyBlockNonFollowers:"user.notifications.policy.blockNonFollowers",notificationsPolicyBlockNonFollowing:"user.notifications.policy.blockNonFollowing",notificationsPolicyBlockNonFollowingMessages:"user.notifications.policy.blockNonFollowingMessages",notificationsPolicyBlockNewAccounts:"user.notifications.policy.blockNewAccounts",privacyShowPublicPosts:"user.privacy.showPublicPosts",privacyShowProfilePage:"user.privacy.showProfilePage",privacyShowFollowers:"user.privacy.showFollowers",translation:"user.translation"},NWe="user",qH=["wellesley.posts","wellesley.captcha","wellesley.registration","wellesley.confirmationCode","wellesley.uploads.policy.doc","wellesley.uploads.policy.audio","wellesley.uploads.policy.image","wellesley.uploads.policy.video","wellesley.translation"],WH=["wellesley.admin.sms","wellesley.admin.auth","wellesley.admin.openai","wellesley.admin.uploads","wellesley.admin.captcha","wellesley.admin.language","wellesley.admin.mediacache","wellesley.admin.translation"],HH={sms:"wellesley.admin.sms",auth:"wellesley.admin.auth",openai:"wellesley.admin.openai",uploads:"wellesley.admin.uploads",captcha:"wellesley.admin.captcha",language:"wellesley.admin.language",mediacache:"wellesley.admin.mediacache",translation:"wellesley.admin.translation"},GH={posts:"wellesley.posts",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"},KH={data:null,isPending:!1},{posts:Jx,uploadsPolicyDoc:p9,uploadsPolicyAudio:e3,uploadsPolicyImage:Uv,uploadsPolicyVideo:J0,registration:QH,captcha:YH}=GH,{captcha:ZH,language:XH,translation:JH,openai:eG}=HH,V1=e=>e.data,tG=go(V1,(e=>{var t,n,r;return{max_characters:(null==(t=null==e?void 0:e[Jx])?void 0:t.max_characters)||0,max_media_attachments:(null==(n=null==e?void 0:e[Jx])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==e?void 0:e[Jx])?void 0:r.max_pins)||0}})),W8=go(V1,(e=>{var t,n,r;return{...null==e?void 0:e[Uv],maxSize:(null==(t=null==e?void 0:e[Uv])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[Uv])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==e?void 0:e[Uv])?void 0:r.maxResolution)||0}})),H8=go(V1,(e=>{var t,n,r,a;return{...null==e?void 0:e[J0],maxSize:(null==(t=null==e?void 0:e[J0])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[J0])?void 0:n.maxMatrix)||0,maxDuration:(null==(r=null==e?void 0:e[J0])?void 0:r.maxDuration)||0,maxResolution:(null==(a=null==e?void 0:e[J0])?void 0:a.maxResolution)||0}})),G8=go(V1,(e=>{var t,n;return{...null==e?void 0:e[e3],maxSize:null==(t=null==e?void 0:e[e3])?void 0:t.maxSize,keepOriginal:(null==(n=null==e?void 0:e[e3])?void 0:n.keepOriginal)||0}})),K8=go(V1,(e=>{var t;return{...null==e?void 0:e[p9],maxSize:(null==(t=null==e?void 0:e[p9])?void 0:t.maxSize)||0}})),Q8=go([W8,H8,G8,K8],((e,t,n,r)=>({IMAGE:null==e?void 0:e.extensions,VIDEO:null==t?void 0:t.extensions,AUDIO:null==n?void 0:n.extensions,DOCUMENT:null==r?void 0:r.extensions}))),nG=go(Q8,(e=>Object.keys(e).reduce(((t,n)=>[...t,...e[n]||[]]),[]))),Ay=ua({name:"platformSettings",initialState:KH,reducers:{setSettings:(e,t)=>{e.data={...e.data,...t.payload}},setError:(e,t)=>{e.error=t.payload},setPending:(e,t)=>{e.isPending=t.payload}},selectors:{selectSettings:V1,selectPostConfig:tG,selectDocPolicy:K8,selectImagePolicy:W8,selectVideoPolicy:H8,selectAudioPolicy:G8,selectSupportedExtensions:Q8,selectFullExtensionsList:nG,selectRegistration:e=>{var t;return null==(t=e.data)?void 0:t[QH]},selectLanguageDetection:e=>{var t;return null==(t=e.data)?void 0:t[XH]},selectLanguageTranslation:e=>{var t;return null==(t=e.data)?void 0:t[JH]},selectOpenai:e=>{var t;return null==(t=e.data)?void 0:t[eG]},selectCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[YH]},selectAdminCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[ZH]}}});var js=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ql(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h9,m9,g9,y9,t3={exports:{}},ey={},n3={exports:{}},Jt={};
1
+ var AW=Object.defineProperty,TW=(e,t,n)=>t in e?AW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Gx=(e,t,n)=>TW(e,"symbol"!=typeof t?t+"":t,n);function IW(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 po(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 PW="function"==typeof Symbol&&Symbol.observable||"@@observable",n9=PW,Kx=()=>Math.random().toString(36).substring(7).split("").join("."),$W={INIT:`@@redux/INIT${Kx()}`,REPLACE:`@@redux/REPLACE${Kx()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${Kx()}`},Kb=$W;function Vl(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 I8(e,t,n){if("function"!=typeof e)throw new Error(po(2));if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(po(0));if("function"==typeof t&&typeof n>"u"&&(n=t,t=void 0),typeof n<"u"){if("function"!=typeof n)throw new Error(po(1));return n(I8)(e,t)}let r=e,a=t,o=new Map,i=o,s=0,c=!1;function l(){i===o&&(i=new Map,o.forEach(((e,t)=>{i.set(t,e)})))}function u(){if(c)throw new Error(po(3));return a}function f(e){if("function"!=typeof e)throw new Error(po(4));if(c)throw new Error(po(5));let t=!0;l();const n=s++;return i.set(n,e),function(){if(t){if(c)throw new Error(po(6));t=!1,l(),i.delete(n),o=null}}}function d(e){if(!Vl(e))throw new Error(po(7));if(typeof e.type>"u")throw new Error(po(8));if("string"!=typeof e.type)throw new Error(po(17));if(c)throw new Error(po(9));try{c=!0,a=r(a,e)}finally{c=!1}return(o=i).forEach((e=>{e()})),e}return d({type:Kb.INIT}),{dispatch:d,subscribe:f,getState:u,replaceReducer:function(e){if("function"!=typeof e)throw new Error(po(10));r=e,d({type:Kb.REPLACE})},[n9]:function(){const e=f;return{subscribe(t){if("object"!=typeof t||null===t)throw new Error(po(11));function n(){const e=t;e.next&&e.next(u())}return n(),{unsubscribe:e(n)}},[n9](){return this}}}}}function OW(e){Object.keys(e).forEach((t=>{const n=e[t];if(typeof n(void 0,{type:Kb.INIT})>"u")throw new Error(po(12));if(typeof n(void 0,{type:Kb.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(po(13))}))}function GR(e){const t=Object.keys(e),n={};for(let r=0;r<t.length;r++){const a=t[r];"function"==typeof e[a]&&(n[a]=e[a])}const r=Object.keys(n);let a;try{OW(n)}catch(e){a=e}return function(e={},t){if(a)throw a;let o=!1;const i={};for(let a=0;a<r.length;a++){const s=r[a],c=n[s],l=e[s],u=c(l,t);if(typeof u>"u")throw t&&t.type,new Error(po(14));i[s]=u,o=o||u!==l}return o=o||r.length!==Object.keys(e).length,o?i:e}}function Qb(...e){return 0===e.length?e=>e:1===e.length?e[0]:e.reduce(((e,t)=>(...n)=>e(t(...n))))}function zW(...e){return t=>(n,r)=>{const a=t(n,r);let o=()=>{throw new Error(po(15))};const i={getState:a.getState,dispatch:(e,...t)=>o(e,...t)},s=e.map((e=>e(i)));return o=Qb(...s)(a.dispatch),{...a,dispatch:o}}}function P8(e){return Vl(e)&&"type"in e&&"string"==typeof e.type}var KR=Symbol.for("immer-nothing"),Cy=Symbol.for("immer-draftable"),Ri=Symbol.for("immer-state");function ho(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var um=Object.getPrototypeOf;function Lc(e){return!!e&&!!e[Ri]}function jc(e){var t;return!!e&&($8(e)||Array.isArray(e)||!!e[Cy]||!(null==(t=e.constructor)||!t[Cy])||O_(e)||z_(e))}var MW=Object.prototype.constructor.toString();function $8(e){if(!e||"object"!=typeof e)return!1;const t=um(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)===MW}function DW(e){return Lc(e)||ho(15,e),e[Ri].base_}function S1(e,t){0===dm(e)?Object.entries(e).forEach((([n,r])=>{t(n,r,e)})):e.forEach(((n,r)=>t(r,n,e)))}function dm(e){const t=e[Ri];return t?t.type_:Array.isArray(e)?1:O_(e)?2:z_(e)?3:0}function Hy(e,t){return 2===dm(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Qx(e,t){return 2===dm(e)?e.get(t):e[t]}function O8(e,t,n){const r=dm(e);2===r?e.set(t,n):3===r?e.add(n):e[t]=n}function NW(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function O_(e){return e instanceof Map}function z_(e){return e instanceof Set}function Xh(e){return e.copy_||e.base_}function dC(e,t){if(O_(e))return new Map(e);if(z_(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&$8(e))return um(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Ri];let r=Reflect.ownKeys(n);for(let t=0;t<r.length;t++){const a=r[t],o=n[a];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(n[a]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[a]})}return Object.create(um(e),n)}function QR(e,t=!1){return Qw(e)||Lc(e)||!jc(e)||(dm(e)>1&&(e.set=e.add=e.clear=e.delete=LW),Object.freeze(e),t&&S1(e,((e,t)=>QR(t,!0)))),e}function LW(){ho(2)}function Qw(e){return Object.isFrozen(e)}var Gy,pC={};function pm(e){const t=pC[e];return t||ho(0,e),t}function jW(e,t){pC[e]||(pC[e]=t)}function z8(){return Gy}function FW(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function r9(e,t){t&&(pm("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function hC(e){mC(e),e.drafts_.forEach(BW),e.drafts_=null}function mC(e){e===Gy&&(Gy=e.parent_)}function a9(e){return Gy=FW(Gy,e)}function BW(e){const t=e[Ri];0===t.type_||1===t.type_?t.revoke_():t.revoked_=!0}function o9(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return void 0!==e&&e!==n?(n[Ri].modified_&&(hC(t),ho(4)),jc(e)&&(e=Yb(t,e),t.parent_||Zb(t,e)),t.patches_&&pm("Patches").generateReplacementPatches_(n[Ri].base_,e,t.patches_,t.inversePatches_)):e=Yb(t,n,[]),hC(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==KR?e:void 0}function Yb(e,t,n){if(Qw(t))return t;const r=t[Ri];if(!r)return S1(t,((a,o)=>i9(e,r,t,a,o,n))),t;if(r.scope_!==e)return t;if(!r.modified_)return Zb(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const t=r.copy_;let a=t,o=!1;3===r.type_&&(a=new Set(t),t.clear(),o=!0),S1(a,((a,i)=>i9(e,r,t,a,i,n,o))),Zb(e,t,!1),n&&e.patches_&&pm("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function i9(e,t,n,r,a,o,i){if(Lc(a)){const i=Yb(e,a,o&&t&&3!==t.type_&&!Hy(t.assigned_,r)?o.concat(r):void 0);if(O8(n,r,i),!Lc(i))return;e.canAutoFreeze_=!1}else i&&n.add(a);if(jc(a)&&!Qw(a)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Yb(e,a),(!t||!t.scope_.parent_)&&Zb(e,a)}}function Zb(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&QR(t,n)}function VW(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:z8(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let a=r,o=YR;n&&(a=[r],o=Ky);const{revoke:i,proxy:s}=Proxy.revocable(a,o);return r.draft_=s,r.revoke_=i,s}var YR={get(e,t){if(t===Ri)return e;const n=Xh(e);if(!Hy(n,t))return UW(e,n,t);const r=n[t];return e.finalized_||!jc(r)?r:r===Yx(e.base_,t)?(Zx(e),e.copy_[t]=yC(r,e)):r},has:(e,t)=>t in Xh(e),ownKeys:e=>Reflect.ownKeys(Xh(e)),set(e,t,n){const r=M8(Xh(e),t);if(null!=r&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const r=Yx(Xh(e),t),a=null==r?void 0:r[Ri];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(NW(n,r)&&(void 0!==n||Hy(e.base_,t)))return!0;Zx(e),gC(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!==Yx(e.base_,t)||t in e.base_?(e.assigned_[t]=!1,Zx(e),gC(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0),getOwnPropertyDescriptor(e,t){const n=Xh(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:1!==e.type_||"length"!==t,enumerable:r.enumerable,value:n[t]}},defineProperty(){ho(11)},getPrototypeOf:e=>um(e.base_),setPrototypeOf(){ho(12)}},Ky={};function Yx(e,t){const n=e[Ri];return(n?Xh(n):e)[t]}function UW(e,t,n){var r;const a=M8(t,n);return a?"value"in a?a.value:null==(r=a.get)?void 0:r.call(e.draft_):void 0}function M8(e,t){if(!(t in e))return;let n=um(e);for(;n;){const e=Object.getOwnPropertyDescriptor(n,t);if(e)return e;n=um(n)}}function gC(e){e.modified_||(e.modified_=!0,e.parent_&&gC(e.parent_))}function Zx(e){e.copy_||(e.copy_=dC(e.base_,e.scope_.immer_.useStrictShallowCopy_))}S1(YR,((e,t)=>{Ky[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Ky.deleteProperty=function(e,t){return Ky.set.call(this,e,t,void 0)},Ky.set=function(e,t,n){return YR.set.call(this,e[0],t,n,e[0])};var qW=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,...a){return r.produce(e,(e=>t.call(this,e,...a)))}}let r;if("function"!=typeof t&&ho(6),void 0!==n&&"function"!=typeof n&&ho(7),jc(e)){const a=a9(this),o=yC(e,void 0);let i=!0;try{r=t(o),i=!1}finally{i?hC(a):mC(a)}return r9(a,n),o9(r,a)}if(!e||"object"!=typeof e){if(r=t(e),void 0===r&&(r=e),r===KR&&(r=void 0),this.autoFreeze_&&QR(r,!0),n){const t=[],a=[];pm("Patches").generateReplacementPatches_(e,r,t,a),n(t,a)}return r}ho(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){jc(e)||ho(8),Lc(e)&&(e=D8(e));const t=a9(this),n=yC(e,void 0);return n[Ri].isManual_=!0,mC(t),n}finishDraft(e,t){const n=e&&e[Ri];(!n||!n.isManual_)&&ho(9);const{scope_:r}=n;return r9(r,t),o9(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=pm("Patches").applyPatches_;return Lc(e)?r(e,t):this.produce(e,(e=>r(e,t)))}};function yC(e,t){const n=O_(e)?pm("MapSet").proxyMap_(e,t):z_(e)?pm("MapSet").proxySet_(e,t):VW(e,t);return(t?t.scope_:z8()).drafts_.push(n),n}function D8(e){return Lc(e)||ho(10,e),N8(e)}function N8(e){if(!jc(e)||Qw(e))return e;const t=e[Ri];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=dC(e,t.scope_.immer_.useStrictShallowCopy_)}else n=dC(e,!0);return S1(n,((e,t)=>{O8(n,e,N8(t))})),t&&(t.finalized_=!1),n}function WW(){const e="replace",t="add",n="remove";function r(e){if(!jc(e))return e;if(Array.isArray(e))return e.map(r);if(O_(e))return new Map(Array.from(e.entries()).map((([e,t])=>[e,r(t)])));if(z_(e))return new Set(Array.from(e).map(r));const t=Object.create(um(e));for(const n in e)t[n]=r(e[n]);return Hy(e,Cy)&&(t[Cy]=e[Cy]),t}function a(e){return Lc(e)?r(e):e}jW("Patches",{applyPatches_:function(a,o){return o.forEach((o=>{const{path:i,op:s}=o;let c=a;for(let e=0;e<i.length-1;e++){const t=dm(c);let n=i[e];"string"!=typeof n&&"number"!=typeof n&&(n=""+n),(0===t||1===t)&&("__proto__"===n||"constructor"===n)&&ho(19),"function"==typeof c&&"prototype"===n&&ho(19),c=Qx(c,n),"object"!=typeof c&&ho(18,i.join("/"))}const l=dm(c),u=r(o.value),f=i[i.length-1];switch(s){case e:switch(l){case 2:return c.set(f,u);case 3:ho(16);default:return c[f]=u}case t:switch(l){case 1:return"-"===f?c.push(u):c.splice(f,0,u);case 2:return c.set(f,u);case 3:return c.add(u);default:return c[f]=u}case n:switch(l){case 1:return c.splice(f,1);case 2:return c.delete(f);case 3:return c.delete(o.value);default:return delete c[f]}default:ho(17,s)}})),a},generatePatches_:function(r,o,i,s){switch(r.type_){case 0:case 2:return function(r,o,i,s){const{base_:c,copy_:l}=r;S1(r.assigned_,((r,u)=>{const f=Qx(c,r),d=Qx(l,r),p=u?Hy(c,r)?e:t:n;if(f===d&&p===e)return;const h=o.concat(r);i.push(p===n?{op:p,path:h}:{op:p,path:h,value:d}),s.push(p===t?{op:n,path:h}:p===n?{op:t,path:h,value:a(f)}:{op:e,path:h,value:a(f)})}))}(r,o,i,s);case 1:return function(r,o,i,s){let{base_:c,assigned_:l}=r,u=r.copy_;u.length<c.length&&([c,u]=[u,c],[i,s]=[s,i]);for(let t=0;t<c.length;t++)if(l[t]&&u[t]!==c[t]){const n=o.concat([t]);i.push({op:e,path:n,value:a(u[t])}),s.push({op:e,path:n,value:a(c[t])})}for(let e=c.length;e<u.length;e++){const n=o.concat([e]);i.push({op:t,path:n,value:a(u[e])})}for(let e=u.length-1;c.length<=e;--e){const t=o.concat([e]);s.push({op:n,path:t})}}(r,o,i,s);case 3:return function(e,r,a,o){let{base_:i,copy_:s}=e,c=0;i.forEach((e=>{if(!s.has(e)){const i=r.concat([c]);a.push({op:n,path:i,value:e}),o.unshift({op:t,path:i,value:e})}c++})),c=0,s.forEach((e=>{if(!i.has(e)){const i=r.concat([c]);a.push({op:t,path:i,value:e}),o.unshift({op:n,path:i,value:e})}c++}))}(r,o,i,s)}},generateReplacementPatches_:function(t,n,r,a){r.push({op:e,path:[],value:n===KR?void 0:n}),a.push({op:e,path:[],value:t})}})}var as=new qW,M_=as.produce,L8=as.produceWithPatches.bind(as);as.setAutoFreeze.bind(as),as.setUseStrictShallowCopy.bind(as);var s9=as.applyPatches.bind(as);function HW(e,t="expected a function, instead received "+typeof e){if("function"!=typeof e)throw new TypeError(t)}function GW(e,t="expected an object, instead received "+typeof e){if("object"!=typeof e)throw new TypeError(t)}function KW(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}]`)}}as.createDraft.bind(as),as.finishDraft.bind(as);var c9=e=>Array.isArray(e)?e:[e];function QW(e){const t=Array.isArray(e[0])?e[0]:e;return KW(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function YW(e,t){const n=[],{length:r}=e;for(let a=0;a<r;a++)n.push(e[a].apply(null,t));return n}var ZW=class{constructor(e){this.value=e}deref(){return this.value}},XW=typeof WeakRef<"u"?WeakRef:ZW,JW=0,l9=1;function Bv(){return{s:JW,v:void 0,o:null,p:null}}function Qy(e,t={}){let n=Bv();const{resultEqualityCheck:r}=t;let a,o=0;function i(){var t;let i=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=i.o;null===e&&(i.o=e=new WeakMap);const n=e.get(t);void 0===n?(i=Bv(),e.set(t,i)):i=n}else{let e=i.p;null===e&&(i.p=e=new Map);const n=e.get(t);void 0===n?(i=Bv(),e.set(t,i)):i=n}}const c=i;let l;if(i.s===l9?l=i.v:(l=e.apply(null,arguments),o++),c.s=l9,r){const e=(null==(t=null==a?void 0:a.deref)?void 0:t.call(a))??a;null!=e&&r(e,l)&&(l=e,0!==o&&o--),a="object"==typeof l&&null!==l||"function"==typeof l?new XW(l):l}return c.v=l,l}return i.clearCache=()=>{n=Bv(),i.resetResultsCount()},i.resultsCount=()=>o,i.resetResultsCount=()=>{o=0},i}function j8(e,...t){const n="function"==typeof e?{memoize:e,memoizeOptions:t}:e,r=(...e)=>{let t,r=0,a=0,o={},i=e.pop();"object"==typeof i&&(o=i,i=e.pop()),HW(i,`createSelector expects an output function after the inputs, but received: [${typeof i}]`);const s={...n,...o},{memoize:c,memoizeOptions:l=[],argsMemoize:u=Qy,argsMemoizeOptions:f=[],devModeChecks:d={}}=s,p=c9(l),h=c9(f),m=QW(e),y=c((function(){return r++,i.apply(null,arguments)}),...p),g=u((function(){a++;const e=YW(m,arguments);return t=y.apply(null,e),t}),...h);return Object.assign(g,{resultFunc:i,memoizedResultFunc:y,dependencies:m,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>t,recomputations:()=>r,resetRecomputations:()=>{r=0},memoize:c,argsMemoize:u})};return Object.assign(r,{withTypes:()=>r}),r}var go=j8(Qy),eH=Object.assign(((e,t=go)=>{GW(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:()=>eH});function F8(e){return({dispatch:t,getState:n})=>r=>a=>"function"==typeof a?a(t,n,e):r(a)}var tH=F8(),nH=F8,rH={USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.16.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.0",npm_config_npm_version:"10.9.2",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.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.16.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.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/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.16.0/bin",TURBO_HASH:"e4a68314798a2e38",NODE:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_package_name:"@wellesley/settings",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:"tsc && vite build",SHELL:"/bin/bash",npm_package_version:"1.0.173",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.16.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",EDITOR:"vi",NODE_ENV:"production",APP_NAME:"@wellesley/settings"},aH=(...e)=>{const t=j8(...e),n=Object.assign(((...e)=>{const n=t(...e),r=(e,...t)=>n(Lc(e)?D8(e):e,...t);return Object.assign(r,n),r}),{withTypes:()=>n});return n};aH(Qy);var oH=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?Qb:Qb.apply(null,arguments)},iH=e=>e&&"function"==typeof e.match;function Ir(e,t){function n(...n){if(t){let r=t(...n);if(!r)throw new Error(Ha(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=>P8(t)&&t.type===e,n}var B8=class e extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,e.prototype)}static get[Symbol.species](){return e}concat(...e){return super.concat.apply(this,e)}prepend(...t){return 1===t.length&&Array.isArray(t[0])?new e(...t[0].concat(this)):new e(...t.concat(this))}};function f9(e){return jc(e)?M_(e,(()=>{})):e}function _C(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(Ha(10));const r=n.insert(t,e);return e.set(t,r),r}function sH(e){return"boolean"==typeof e}var cH=()=>function(e){const{thunk:t=!0,immutableCheck:n=!0,serializableCheck:r=!0,actionCreatorCheck:a=!0}=e??{};let o=new B8;return t&&(sH(t)?o.push(tH):o.push(nH(t.extraArgument))),o},u1="RTK_autoBatch",X0=()=>e=>({payload:e,meta:{[u1]:!0}}),V8=e=>t=>{setTimeout(t,e)},lH=typeof window<"u"&&window.requestAnimationFrame?window.requestAnimationFrame:V8(10),fH=(e={type:"raf"})=>t=>(...n)=>{const r=t(...n);let a=!0,o=!1,i=!1;const s=new Set,c="tick"===e.type?queueMicrotask:"raf"===e.type?lH:"callback"===e.type?e.queueNotification:V8(e.timeout),l=()=>{i=!1,o&&(o=!1,s.forEach((e=>e())))};return Object.assign({},r,{subscribe(e){const t=r.subscribe((()=>a&&e()));return s.add(e),()=>{t(),s.delete(e)}},dispatch(e){var t;try{return a=!(null!=(t=null==e?void 0:e.meta)&&t[u1]),o=!a,o&&(i||(i=!0,c(l))),r.dispatch(e)}finally{a=!0}}})},uH=e=>function(t){const{autoBatch:n=!0}=t??{};let r=new B8(e);return n&&r.push(fH("object"==typeof n?n:void 0)),r},dH="production"===rH.NODE_ENV;function pH(e){const t=cH(),{reducer:n,middleware:r,devTools:a=!0,preloadedState:o,enhancers:i}=e;let s,c;if("function"==typeof n)s=n;else{if(!Vl(n))throw new Error(Ha(1));s=GR(n)}c="function"==typeof r?r(t):t();let l=Qb;a&&(l=oH({trace:!dH,..."object"==typeof a&&a}));const u=zW(...c),f=uH(u);return I8(s,o,l(..."function"==typeof i?i(f):f()))}function U8(e){const t={},n=[];let r;const a={addCase(e,n){const r="string"==typeof e?e:e.type;if(!r)throw new Error(Ha(28));if(r in t)throw new Error(Ha(29));return t[r]=n,a},addMatcher:(e,t)=>(n.push({matcher:e,reducer:t}),a),addDefaultCase:e=>(r=e,a)};return e(a),[t,n,r]}function hH(e){return"function"==typeof e}function mH(e,t){let n,[r,a,o]=U8(t);if(hH(e))n=()=>f9(e());else{const t=f9(e);n=()=>t}function i(e=n(),t){let i=[r[t.type],...a.filter((({matcher:e})=>e(t))).map((({reducer:e})=>e))];return 0===i.filter((e=>!!e)).length&&(i=[o]),i.reduce(((e,n)=>{if(n){if(Lc(e)){const r=n(e,t);return void 0===r?e:r}if(jc(e))return M_(e,(e=>n(e,t)));{const r=n(e,t);if(void 0===r){if(null===e)return e;throw new Error(Ha(9))}return r}}return e}),e)}return i.getInitialState=n,i}var gH="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",Yw=(e=21)=>{let t="",n=e;for(;n--;)t+=gH[64*Math.random()|0];return t},q8=(e,t)=>iH(e)?e.match(t):e(t);function bp(...e){return t=>e.some((e=>q8(e,t)))}function Ry(...e){return t=>e.every((e=>q8(e,t)))}function Zw(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 D_(e){return"function"==typeof e[0]&&"pending"in e[0]&&"fulfilled"in e[0]&&"rejected"in e[0]}function ZR(...e){return 0===e.length?e=>Zw(e,["pending"]):D_(e)?t=>bp(...e.map((e=>e.pending)))(t):ZR()(e[0])}function E1(...e){return 0===e.length?e=>Zw(e,["rejected"]):D_(e)?t=>bp(...e.map((e=>e.rejected)))(t):E1()(e[0])}function Xw(...e){const t=e=>e&&e.meta&&e.meta.rejectedWithValue;return 0===e.length||D_(e)?n=>Ry(E1(...e),t)(n):Xw()(e[0])}function wp(...e){return 0===e.length?e=>Zw(e,["fulfilled"]):D_(e)?t=>bp(...e.map((e=>e.fulfilled)))(t):wp()(e[0])}function vC(...e){return 0===e.length?e=>Zw(e,["pending","fulfilled","rejected"]):D_(e)?t=>{const n=[];for(const t of e)n.push(t.pending,t.rejected,t.fulfilled);return bp(...n)(t)}:vC()(e[0])}var yH=["name","message","stack","code"],Xx=class{constructor(e,t){Gx(this,"_type"),this.payload=e,this.meta=t}},u9=class{constructor(e,t){Gx(this,"_type"),this.payload=e,this.meta=t}},_H=e=>{if("object"==typeof e&&null!==e){const t={};for(const n of yH)"string"==typeof e[n]&&(t[n]=e[n]);return t}return{message:String(e)}},d9=(()=>{function e(e,t,n){const r=Ir(e+"/fulfilled",((e,t,n,r)=>({payload:e,meta:{...r||{},arg:n,requestId:t,requestStatus:"fulfilled"}}))),a=Ir(e+"/pending",((e,t,n)=>({payload:void 0,meta:{...n||{},arg:t,requestId:e,requestStatus:"pending"}}))),o=Ir(e+"/rejected",((e,t,r,a,o)=>({payload:a,error:(n&&n.serializeError||_H)(e||"Rejected"),meta:{...o||{},arg:r,requestId:t,rejectedWithValue:!!a,requestStatus:"rejected",aborted:"AbortError"===(null==e?void 0:e.name),condition:"ConditionError"===(null==e?void 0:e.name)}})));return Object.assign((function(e){return(i,s,c)=>{const l=null!=n&&n.idGenerator?n.idGenerator(e):Yw(),u=new AbortController;let f,d;function p(e){d=e,u.abort()}const h=async function(){var h,m;let y;try{let o=null==(h=null==n?void 0:n.condition)?void 0:h.call(n,e,{getState:s,extra:c});if(bH(o)&&(o=await o),!1===o||u.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};const g=new Promise(((e,t)=>{f=()=>{t({name:"AbortError",message:d||"Aborted"})},u.signal.addEventListener("abort",f)}));i(a(l,e,null==(m=null==n?void 0:n.getPendingMeta)?void 0:m.call(n,{requestId:l,arg:e},{getState:s,extra:c}))),y=await Promise.race([g,Promise.resolve(t(e,{dispatch:i,getState:s,extra:c,requestId:l,signal:u.signal,abort:p,rejectWithValue:(e,t)=>new Xx(e,t),fulfillWithValue:(e,t)=>new u9(e,t)})).then((t=>{if(t instanceof Xx)throw t;return t instanceof u9?r(t.payload,l,e,t.meta):r(t,l,e)}))])}catch(t){y=t instanceof Xx?o(null,l,e,t.payload,t.meta):o(t,l,e)}finally{f&&u.signal.removeEventListener("abort",f)}return n&&!n.dispatchConditionRejection&&o.match(y)&&y.meta.condition||i(y),y}();return Object.assign(h,{abort:p,requestId:l,arg:e,unwrap:()=>h.then(vH)})}}),{pending:a,rejected:o,fulfilled:r,settled:bp(o,r),typePrefix:e})}return e.withTypes=()=>e,e})();function vH(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function bH(e){return null!==e&&"object"==typeof e&&"function"==typeof e.then}var wH=Symbol.for("rtk-slice-createasyncthunk");function kH(e,t){return`${e}/${t}`}function xH({creators:e}={}){var t;const n=null==(t=null==e?void 0:e.asyncThunk)?void 0:t[wH];return function(e){const{name:t,reducerPath:r=t}=e;if(!t)throw new Error(Ha(11));const a=("function"==typeof e.reducers?e.reducers(EH()):e.reducers)||{},o=Object.keys(a),i={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},s={addCase(e,t){const n="string"==typeof e?e:e.type;if(!n)throw new Error(Ha(12));if(n in i.sliceCaseReducersByType)throw new Error(Ha(13));return i.sliceCaseReducersByType[n]=t,s},addMatcher:(e,t)=>(i.sliceMatchers.push({matcher:e,reducer:t}),s),exposeAction:(e,t)=>(i.actionCreators[e]=t,s),exposeCaseReducer:(e,t)=>(i.sliceCaseReducersByName[e]=t,s)};function c(){const[t={},n=[],r]="function"==typeof e.extraReducers?U8(e.extraReducers):[e.extraReducers],a={...t,...i.sliceCaseReducersByType};return mH(e.initialState,(e=>{for(let t in a)e.addCase(t,a[t]);for(let t of i.sliceMatchers)e.addMatcher(t.matcher,t.reducer);for(let t of n)e.addMatcher(t.matcher,t.reducer);r&&e.addDefaultCase(r)}))}o.forEach((r=>{const o=a[r],i={reducerName:r,type:kH(t,r),createNotation:"function"==typeof e.reducers};RH(o)?TH(i,o,s,n):CH(i,o,s)}));const l=e=>e,u=new Map;let f;function d(e,t){return f||(f=c()),f(e,t)}function p(){return f||(f=c()),f.getInitialState()}function h(t,n=!1){function r(e){let r=e[t];return typeof r>"u"&&n&&(r=p()),r}function a(t=l){const r=_C(u,n,{insert:()=>new WeakMap});return _C(r,t,{insert:()=>{const r={};for(const[a,o]of Object.entries(e.selectors??{}))r[a]=SH(o,t,p,n);return r}})}return{reducerPath:t,getSelectors:a,get selectors(){return a(r)},selectSlice:r}}const m={name:t,reducer:d,actions:i.actionCreators,caseReducers:i.sliceCaseReducersByName,getInitialState:p,...h(r),injectInto(e,{reducerPath:t,...n}={}){const a=t??r;return e.inject({reducerPath:a,reducer:d},n),{...m,...h(a,!0)}}};return m}}function SH(e,t,n,r){function a(a,...o){let i=t(a);return typeof i>"u"&&r&&(i=n()),e(i,...o)}return a.unwrapped=e,a}var ua=xH();function EH(){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 CH({type:e,reducerName:t,createNotation:n},r,a){let o,i;if("reducer"in r){if(n&&!AH(r))throw new Error(Ha(17));o=r.reducer,i=r.prepare}else o=r;a.addCase(e,o).exposeCaseReducer(t,o).exposeAction(t,i?Ir(e,i):Ir(e))}function RH(e){return"asyncThunk"===e._reducerDefinitionType}function AH(e){return"reducerWithPrepare"===e._reducerDefinitionType}function TH({type:e,reducerName:t},n,r,a){if(!a)throw new Error(Ha(18));const{payloadCreator:o,fulfilled:i,pending:s,rejected:c,settled:l,options:u}=n,f=a(e,o,u);r.exposeAction(t,f),i&&r.addCase(f.fulfilled,i),s&&r.addCase(f.pending,s),c&&r.addCase(f.rejected,c),l&&r.addMatcher(f.settled,l),r.exposeCaseReducer(t,{fulfilled:i||Vv,pending:s||Vv,rejected:c||Vv,settled:l||Vv})}function Vv(){}var IH=(e,t)=>{if("function"!=typeof e)throw new Error(Ha(32))},XR="listenerMiddleware",PH=e=>{let{type:t,actionCreator:n,matcher:r,predicate:a,effect:o}=e;if(t)a=Ir(t).match;else if(n)t=n.type,a=n.match;else if(r)a=r;else if(!a)throw new Error(Ha(21));return IH(o),{predicate:a,type:t,effect:o}},$H=Object.assign((e=>{const{type:t,predicate:n,effect:r}=PH(e);return{id:Yw(),effect:r,type:t,predicate:n,pending:new Set,unsubscribe:()=>{throw new Error(Ha(22))}}}),{withTypes:()=>$H}),OH=Object.assign(Ir(`${XR}/add`),{withTypes:()=>OH});Ir(`${XR}/removeAll`);var zH=Object.assign(Ir(`${XR}/remove`),{withTypes:()=>zH}),MH=e=>"reducerPath"in e&&"string"==typeof e.reducerPath,DH=e=>e.flatMap((e=>MH(e)?[[e.reducerPath,e.reducer]]:Object.entries(e))),JR=Symbol.for("rtk-state-proxy-original"),NH=e=>!!e&&!!e[JR],LH=new WeakMap,jH=(e,t)=>_C(LH,e,{insert:()=>new Proxy(e,{get:(e,n,r)=>{if(n===JR)return e;const a=Reflect.get(e,n,r);if(typeof a>"u"){const e=t[n.toString()];if(e){const t=e(void 0,{type:Yw()});if(typeof t>"u")throw new Error(Ha(24));return t}}return a}})}),FH=e=>{if(!NH(e))throw new Error(Ha(25));return e[JR]},BH=(e={})=>e;function VH(...e){const t=Object.fromEntries(DH(e)),n=()=>Object.keys(t).length?GR(t):BH;let r=n();function a(e,t){return r(e,t)}a.withLazyLoadedSlices=()=>a;const o=Object.assign((function(e,n){return function(r,...a){return e(jH(n?n(r,...a):r,t),...a)}}),{original:FH});return Object.assign(a,{inject:(e,o={})=>{const{reducerPath:i,reducer:s}=e,c=t[i];return!o.overrideExisting&&c&&c!==s||(t[i]=s,r=n()),a},selector:o})}function Ha(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. `}const UH={data:null,isPending:!1,isSuccess:!1},Yy=ua({name:"profileSettings",initialState:UH,reducers:{setSettings:(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:{selectProfileSettings:e=>e.data,selectPending:e=>e.isPending,selectError:e=>e.error,selectSuccess:e=>e.isSuccess}}),bt={openaiConfigModel:"wellesley.openai.config.model",openaiConfigApiKey:"wellesley.openai.config.apiKey",uploadsProvider:"wellesley.uploads.provider",uploadsS3:"wellesley.uploads.s3",uploadsPolicyImageExtensions:"wellesley.uploads.policy.image.extensions",uploadsPolicyImageKeepOriginal:"wellesley.uploads.policy.image.keepOriginal",uploadsPolicyImageResolutions:"wellesley.uploads.policy.image.resolutions",uploadsPolicyImageMaxResolution:"wellesley.uploads.policy.image.maxResolution",uploadsPolicyImageMaxMatrix:"wellesley.uploads.policy.image.maxMatrix",uploadsPolicyImageMaxSize:"wellesley.uploads.policy.image.maxSize",uploadsPolicyVideoExtensions:"wellesley.uploads.policy.video.extensions",uploadsPolicyVideoResolutions:"wellesley.uploads.policy.video.resolutions",uploadsPolicyVideoKeepOriginal:"wellesley.uploads.policy.video.keepOriginal",uploadsPolicyVideoMaxResolution:"wellesley.uploads.policy.video.maxResolution",uploadsPolicyVideoMaxMatrix:"wellesley.uploads.policy.video.maxMatrix",uploadsPolicyVideoMaxSize:"wellesley.uploads.policy.video.maxSize",uploadsPolicyVideoMaxDuration:"wellesley.uploads.policy.video.maxDuration",uploadsPolicyVideoStreamingThreshold:"wellesley.uploads.policy.video.streamingThreshold",uploadsPolicyAudioExtensions:"wellesley.uploads.policy.audio.extensions",uploadsPolicyAudioKeepOriginal:"wellesley.uploads.policy.audio.keepOriginal",uploadsPolicyAudioMaxSize:"wellesley.uploads.policy.audio.maxSize",uploadsPolicyDocExtensions:"wellesley.uploads.policy.doc.extensions",uploadsPolicyDocMaxSize:"wellesley.uploads.policy.doc.maxSize",mediacacheEnabled:"wellesley.mediacache.enabled",mediacacheMaxTotalSize:"wellesley.mediacache.maxTotalSize",mediacacheMaxFileSize:"wellesley.mediacache.maxFileSize",mediacacheLimitPerRun:"wellesley.mediacache.limitPerRun",mediacacheSingleRun:"wellesley.mediacache.singleRun",mediacacheCheckInterval:"wellesley.mediacache.checkInterval",postsMaxMediaAttachments:"wellesley.posts.max_media_attachments",postsMaxCharacters:"wellesley.posts.max_characters",postsMaxPins:"wellesley.posts.max_pins",registrationMode:"wellesley.registration.mode",registrationInvitesEnabled:"wellesley.registration.invitesEnabled",registrationReasonToJoin:"wellesley.registration.reasonToJoin",registrationShowCaptcha:"wellesley.registration.showCaptcha",registrationNotAvailableMessage:"wellesley.registration.notAvailableMessage",captchaVerifyUrl:"wellesley.captcha.verifyUrl",captchaSecretKey:"wellesley.captcha.secretKey",captchaSiteKey:"wellesley.captcha.siteKey",confirmationCodeCodeExpirationMinutes:"wellesley.confirmationCode.codeExpirationMinutes",confirmationCodeCounterExpirationMinutes:"wellesley.confirmationCode.counterExpirationMinutes",confirmationCodeLimitStoreAttempts:"wellesley.confirmationCode.limitStoreAttempts",confirmationCodeLimitCheckAttempts:"wellesley.confirmationCode.limitCheckAttempts",translation:"wellesley.translation"},MWe=[bt.uploadsPolicyImageExtensions,bt.uploadsPolicyImageKeepOriginal,bt.uploadsPolicyImageResolutions,bt.uploadsPolicyImageMaxResolution,bt.uploadsPolicyImageMaxMatrix,bt.uploadsPolicyImageMaxSize,bt.uploadsPolicyVideoExtensions,bt.uploadsPolicyVideoResolutions,bt.uploadsPolicyVideoKeepOriginal,bt.uploadsPolicyVideoMaxResolution,bt.uploadsPolicyVideoMaxMatrix,bt.uploadsPolicyVideoMaxSize,bt.uploadsPolicyVideoMaxDuration,bt.uploadsPolicyVideoStreamingThreshold,bt.uploadsPolicyAudioExtensions,bt.uploadsPolicyAudioKeepOriginal,bt.uploadsPolicyAudioMaxSize,bt.uploadsPolicyDocExtensions,bt.uploadsPolicyDocMaxSize,bt.mediacacheEnabled,bt.mediacacheMaxTotalSize,bt.mediacacheMaxFileSize,bt.mediacacheLimitPerRun,bt.mediacacheSingleRun,bt.mediacacheCheckInterval,bt.postsMaxMediaAttachments,bt.postsMaxCharacters,bt.postsMaxPins,bt.registrationMode,bt.registrationInvitesEnabled,bt.registrationReasonToJoin,bt.registrationShowCaptcha,bt.registrationNotAvailableMessage],DWe="wellesley",uo={followAutoAccept:"user.follow.autoAccept",notificationsPrefsFollow:"user.notifications.prefs.follow",notificationsPrefsFollow_request:"user.notifications.prefs.followRequest",notificationsPrefsLike:"user.notifications.prefs.like",notificationsPrefsComment:"user.notifications.prefs.comment",notificationsPrefsMention:"user.notifications.prefs.mention",notificationsPrefsRepost:"user.notifications.prefs.repost",notificationsPrefsList_post_create:"user.notifications.prefs.list_post_create",notificationsPrefsPost_update:"user.notifications.prefs.post_update",notificationsPrefsSubscribeOnComment:"user.notifications.prefs.subscribeOnComment",notificationsPrefsAlwaysSendEmail:"user.notifications.prefs.alwaysSendEmail",notificationsShowPopup:"user.notifications.prefs.showPopup",notificationsPolicyBlockNonFollowers:"user.notifications.policy.blockNonFollowers",notificationsPolicyBlockNonFollowing:"user.notifications.policy.blockNonFollowing",notificationsPolicyBlockNonFollowingMessages:"user.notifications.policy.blockNonFollowingMessages",notificationsPolicyBlockNewAccounts:"user.notifications.policy.blockNewAccounts",privacyShowPublicPosts:"user.privacy.showPublicPosts",privacyShowProfilePage:"user.privacy.showProfilePage",privacyShowFollowers:"user.privacy.showFollowers",translation:"user.translation"},NWe="user",qH=["wellesley.posts","wellesley.captcha","wellesley.registration","wellesley.confirmationCode","wellesley.uploads.policy.doc","wellesley.uploads.policy.audio","wellesley.uploads.policy.image","wellesley.uploads.policy.video","wellesley.translation"],WH=["wellesley.admin.sms","wellesley.admin.auth","wellesley.admin.openai","wellesley.admin.uploads","wellesley.admin.captcha","wellesley.admin.language","wellesley.admin.mediacache","wellesley.admin.translation"],HH={sms:"wellesley.admin.sms",auth:"wellesley.admin.auth",openai:"wellesley.admin.openai",uploads:"wellesley.admin.uploads",captcha:"wellesley.admin.captcha",language:"wellesley.admin.language",mediacache:"wellesley.admin.mediacache",translation:"wellesley.admin.translation"},GH={posts:"wellesley.posts",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"},KH={data:null,isPending:!1},{posts:Jx,uploadsPolicyDoc:p9,uploadsPolicyAudio:e3,uploadsPolicyImage:Uv,uploadsPolicyVideo:J0,registration:QH,captcha:YH}=GH,{captcha:ZH,language:XH,translation:JH,openai:eG}=HH,V1=e=>e.data,tG=go(V1,(e=>{var t,n,r;return{max_characters:(null==(t=null==e?void 0:e[Jx])?void 0:t.max_characters)||0,max_media_attachments:(null==(n=null==e?void 0:e[Jx])?void 0:n.max_media_attachments)||0,max_pins:(null==(r=null==e?void 0:e[Jx])?void 0:r.max_pins)||0}})),W8=go(V1,(e=>{var t,n,r;return{...null==e?void 0:e[Uv],maxSize:(null==(t=null==e?void 0:e[Uv])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[Uv])?void 0:n.maxMatrix)||0,maxResolution:(null==(r=null==e?void 0:e[Uv])?void 0:r.maxResolution)||0}})),H8=go(V1,(e=>{var t,n,r,a;return{...null==e?void 0:e[J0],maxSize:(null==(t=null==e?void 0:e[J0])?void 0:t.maxSize)||0,maxMatrix:(null==(n=null==e?void 0:e[J0])?void 0:n.maxMatrix)||0,maxDuration:(null==(r=null==e?void 0:e[J0])?void 0:r.maxDuration)||0,maxResolution:(null==(a=null==e?void 0:e[J0])?void 0:a.maxResolution)||0}})),G8=go(V1,(e=>{var t,n;return{...null==e?void 0:e[e3],maxSize:null==(t=null==e?void 0:e[e3])?void 0:t.maxSize,keepOriginal:(null==(n=null==e?void 0:e[e3])?void 0:n.keepOriginal)||0}})),K8=go(V1,(e=>{var t;return{...null==e?void 0:e[p9],maxSize:(null==(t=null==e?void 0:e[p9])?void 0:t.maxSize)||0}})),Q8=go([W8,H8,G8,K8],((e,t,n,r)=>({IMAGE:null==e?void 0:e.extensions,VIDEO:null==t?void 0:t.extensions,AUDIO:null==n?void 0:n.extensions,DOCUMENT:null==r?void 0:r.extensions}))),nG=go(Q8,(e=>Object.keys(e).reduce(((t,n)=>[...t,...e[n]||[]]),[]))),Ay=ua({name:"platformSettings",initialState:KH,reducers:{setSettings:(e,t)=>{e.data={...e.data,...t.payload}},setError:(e,t)=>{e.error=t.payload},setPending:(e,t)=>{e.isPending=t.payload}},selectors:{selectSettings:V1,selectPostConfig:tG,selectDocPolicy:K8,selectImagePolicy:W8,selectVideoPolicy:H8,selectAudioPolicy:G8,selectSupportedExtensions:Q8,selectFullExtensionsList:nG,selectRegistration:e=>{var t;return null==(t=e.data)?void 0:t[QH]},selectLanguageDetection:e=>{var t;return null==(t=e.data)?void 0:t[XH]},selectLanguageTranslation:e=>{var t;return null==(t=e.data)?void 0:t[JH]},selectOpenai:e=>{var t;return null==(t=e.data)?void 0:t[eG]},selectCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[YH]},selectAdminCaptcha:e=>{var t;return null==(t=e.data)?void 0:t[ZH]}}});var js=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ql(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var h9,m9,g9,y9,t3={exports:{}},ey={},n3={exports:{}},Jt={};
2
2
  /**
3
3
  * @license React
4
4
  * react.production.min.js
@@ -75,7 +75,7 @@ var AW=Object.defineProperty,TW=(e,t,n)=>t in e?AW(e,t,{enumerable:!0,configurab
75
75
  *
76
76
  * This source code is licensed under the MIT license found in the
77
77
  * LICENSE file in the root directory of this source tree.
78
- */function HZ(){if(HP)return Pn;HP=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case o:case a:case u:case f:return e;default:switch(e=e&&e.$$typeof){case c:case s:case l:case p:case d:case i:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),Pn.ContextConsumer=s,Pn.ContextProvider=i,Pn.Element=t,Pn.ForwardRef=l,Pn.Fragment=r,Pn.Lazy=p,Pn.Memo=d,Pn.Portal=n,Pn.Profiler=o,Pn.StrictMode=a,Pn.Suspense=u,Pn.SuspenseList=f,Pn.isAsyncMode=function(){return!1},Pn.isConcurrentMode=function(){return!1},Pn.isContextConsumer=function(e){return m(e)===s},Pn.isContextProvider=function(e){return m(e)===i},Pn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Pn.isForwardRef=function(e){return m(e)===l},Pn.isFragment=function(e){return m(e)===r},Pn.isLazy=function(e){return m(e)===p},Pn.isMemo=function(e){return m(e)===d},Pn.isPortal=function(e){return m(e)===n},Pn.isProfiler=function(e){return m(e)===o},Pn.isStrictMode=function(e){return m(e)===a},Pn.isSuspense=function(e){return m(e)===u},Pn.isSuspenseList=function(e){return m(e)===f},Pn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===o||t===a||t===u||t===f||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===d||t.$$typeof===i||t.$$typeof===s||t.$$typeof===l||t.$$typeof===e||void 0!==t.getModuleId)},Pn.typeOf=m,Pn}function GZ(){return GP||(GP=1,gS.exports=HZ()),gS.exports}function f5(){if(KP)return yS;KP=1;var e=Su(),t=os();return yS=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function KZ(){if(QP)return _S;QP=1;var e=f5();return _S=function(t){return e(t)&&t!=+t}}GZ(),KZ(),f5();var bS,YP,wS,ZP,kS,XP,xS,JP,SS,e$,ES,t$,CS,n$,RS,r$,AS,a$,TS,o$,IS,i$,PS,s$,$S,c$,OS,l$,zS,f$,MS,u$,DS,d$,NS,p$,LS,h$,jS,m$,FS,g$,BS,y$,VS,_$,US,v$,Yv=function(e){return WZ(e)&&e.indexOf("%")===e.length-1},QZ=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},vS=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a]};function YZ(){if(YP)return bS;YP=1;var e=uk();return bS=function(){this.__data__=new e,this.size=0}}function ZZ(){if(ZP)return wS;return ZP=1,wS=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function XZ(){if(XP)return kS;return XP=1,kS=function(e){return this.__data__.get(e)}}function JZ(){if(JP)return xS;return JP=1,xS=function(e){return this.__data__.has(e)}}function eX(){if(e$)return SS;e$=1;var e=uk(),t=vA(),n=bA();return SS=function(r,a){var o=this.__data__;if(o instanceof e){var i=o.__data__;if(!t||i.length<199)return i.push([r,a]),this.size=++o.size,this;o=this.__data__=new n(i)}return o.set(r,a),this.size=o.size,this}}function wA(){if(t$)return ES;t$=1;var e=uk(),t=YZ(),n=ZZ(),r=XZ(),a=JZ(),o=eX();function i(t){var n=this.__data__=new e(t);this.size=n.size}return i.prototype.clear=t,i.prototype.delete=n,i.prototype.get=r,i.prototype.has=a,i.prototype.set=o,ES=i}function tX(){if(n$)return CS;n$=1;return CS=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function nX(){if(r$)return RS;return r$=1,RS=function(e){return this.__data__.has(e)}}function rX(){if(a$)return AS;a$=1;var e=bA(),t=tX(),n=nX();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,AS=r}function aX(){if(o$)return TS;return o$=1,TS=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 oX(){if(i$)return IS;return i$=1,IS=function(e,t){return e.has(t)}}function u5(){if(s$)return PS;s$=1;var e=rX(),t=aX(),n=oX();return PS=function(r,a,o,i,s,c){var l=1&o,u=r.length,f=a.length;if(u!=f&&!(l&&f>u))return!1;var d=c.get(r),p=c.get(a);if(d&&p)return d==a&&p==r;var h=-1,m=!0,y=2&o?new e:void 0;for(c.set(r,a),c.set(a,r);++h<u;){var g=r[h],v=a[h];if(i)var b=l?i(v,g,h,a,r,c):i(g,v,h,r,a,c);if(void 0!==b){if(b)continue;m=!1;break}if(y){if(!t(a,(function(e,t){if(!n(y,t)&&(g===e||s(g,e,o,i,c)))return y.push(t)}))){m=!1;break}}else if(g!==v&&!s(g,v,o,i,c)){m=!1;break}}return c.delete(r),c.delete(a),m}}function d5(){if(c$)return $S;c$=1;var e=si().Uint8Array;return $S=e}function iX(){if(l$)return OS;return l$=1,OS=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function sX(){if(f$)return zS;return f$=1,zS=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function cX(){if(u$)return MS;u$=1;var e=H1(),t=d5(),n=_A(),r=u5(),a=iX(),o=sX(),i=e?e.prototype:void 0,s=i?i.valueOf:void 0;return MS=function(e,i,c,l,u,f,d){switch(c){case"[object DataView]":if(e.byteLength!=i.byteLength||e.byteOffset!=i.byteOffset)return!1;e=e.buffer,i=i.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=i.byteLength||!f(new t(e),new t(i)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+i);case"[object Error]":return e.name==i.name&&e.message==i.message;case"[object RegExp]":case"[object String]":return e==i+"";case"[object Map]":var p=a;case"[object Set]":var h=1&l;if(p||(p=o),e.size!=i.size&&!h)return!1;var m=d.get(e);if(m)return m==i;l|=2,d.set(e,i);var y=r(p(e),p(i),l,u,f,d);return d.delete(e),y;case"[object Symbol]":if(s)return s.call(e)==s.call(i)}return!1}}function kA(){if(d$)return DS;return d$=1,DS=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}}function p5(){if(p$)return NS;p$=1;var e=kA(),t=Ai();return NS=function(n,r,a){var o=r(n);return t(n)?o:e(o,a(n))}}function lX(){if(h$)return LS;return h$=1,LS=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[a++]=i)}return o}}function h5(){if(m$)return jS;return m$=1,jS=function(){return[]}}function xA(){if(g$)return FS;g$=1;var e=lX(),t=h5(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return FS=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function fX(){if(y$)return BS;return y$=1,BS=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function uX(){if(_$)return VS;_$=1;var e=Su(),t=os();return VS=function(n){return t(n)&&"[object Arguments]"==e(n)}}function SA(){if(v$)return US;v$=1;var e=uX(),t=os(),n=Object.prototype,r=n.hasOwnProperty,a=n.propertyIsEnumerable,o=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!a.call(e,"callee")};return US=o}var qS,b$,w$,WS,k$,HS,x$,GS,S$,KS,E$,gy={exports:{}};function dX(){if(b$)return qS;return b$=1,qS=function(){return!1}}function EA(){return w$||(w$=1,e=gy,t=gy.exports,n=si(),r=dX(),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,i=o&&o.exports===a?n.Buffer:void 0,s=(i?i.isBuffer:void 0)||r,e.exports=s),gy.exports;var e,t,n,r,a,o,i,s}function CA(){if(k$)return WS;k$=1;var e=/^(?:0|[1-9]\d*)$/;return WS=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 RA(){if(x$)return HS;x$=1;return HS=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function pX(){if(S$)return GS;S$=1;var e=Su(),t=RA(),n=os(),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,GS=function(a){return n(a)&&t(a.length)&&!!r[e(a)]}}function AA(){if(E$)return KS;return E$=1,KS=function(e){return function(t){return e(t)}}}gy.exports;var C$,QS,R$,YS,A$,ZS,T$,XS,I$,JS,P$,e6,$$,t6,O$,n6,z$,r6,M$,a6,D$,o6,N$,i6,L$,s6,j$,c6,F$,l6,B$,f6,V$,u6,U$,d6,q$,p6,W$,h6,H$,m6,G$,g6,K$,y6,Q$,_6,Y$,v6,Z$,b6,X$,w6,J$,k6,eO,x6,tO,S6,nO,E6,rO,C6,aO,R6,oO,A6,iO,T6,sO,I6,cO,P6,lO,$6,fO,O6,uO,z6,dO,M6,pO,D6,hO,N6,mO,L6,gO,j6,yO,F6,_O,B6,vO,V6,bO,U6,wO,q6,kO,W6,xO,H6,SO,yy={exports:{}};function TA(){return C$||(C$=1,e=yy,t=yy.exports,n=n5(),r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,o=a&&a.exports===r&&n.process,i=function(){try{return a&&a.require&&a.require("util").types||o&&o.binding&&o.binding("util")}catch{}}(),e.exports=i),yy.exports;var e,t,n,r,a,o,i}function m5(){if(R$)return QS;R$=1;var e=pX(),t=AA(),n=TA(),r=n&&n.isTypedArray,a=r?t(r):e;return QS=a}function g5(){if(A$)return YS;A$=1;var e=fX(),t=SA(),n=Ai(),r=EA(),a=CA(),o=m5(),i=Object.prototype.hasOwnProperty;return YS=function(s,c){var l=n(s),u=!l&&t(s),f=!l&&!u&&r(s),d=!l&&!u&&!f&&o(s),p=l||u||f||d,h=p?e(s.length,String):[],m=h.length;for(var y in s)(c||i.call(s,y))&&(!p||!("length"==y||f&&("offset"==y||"parent"==y)||d&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||a(y,m)))&&h.push(y);return h}}function IA(){if(T$)return ZS;T$=1;var e=Object.prototype;return ZS=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function y5(){if(I$)return XS;return I$=1,XS=function(e,t){return function(n){return e(t(n))}}}function hX(){if(P$)return JS;P$=1;var e=y5()(Object.keys,Object);return JS=e}function _5(){if($$)return e6;$$=1;var e=IA(),t=hX(),n=Object.prototype.hasOwnProperty;return e6=function(r){if(!e(r))return t(r);var a=[];for(var o in Object(r))n.call(r,o)&&"constructor"!=o&&a.push(o);return a}}function v5(){if(O$)return t6;O$=1;var e=ck(),t=RA();return t6=function(n){return null!=n&&t(n.length)&&!e(n)}}function pk(){if(z$)return n6;z$=1;var e=g5(),t=_5(),n=v5();return n6=function(r){return n(r)?e(r):t(r)}}function b5(){if(M$)return r6;M$=1;var e=p5(),t=xA(),n=pk();return r6=function(r){return e(r,n,t)}}function mX(){if(D$)return a6;D$=1;var e=b5(),t=Object.prototype.hasOwnProperty;return a6=function(n,r,a,o,i,s){var c=1&a,l=e(n),u=l.length;if(u!=e(r).length&&!c)return!1;for(var f=u;f--;){var d=l[f];if(!(c?d in r:t.call(r,d)))return!1}var p=s.get(n),h=s.get(r);if(p&&h)return p==r&&h==n;var m=!0;s.set(n,r),s.set(r,n);for(var y=c;++f<u;){var g=n[d=l[f]],v=r[d];if(o)var b=c?o(v,g,d,r,n,s):o(g,v,d,n,r,s);if(!(void 0===b?g===v||i(g,v,a,o,s):b)){m=!1;break}y||(y="constructor"==d)}if(m&&!y){var _=n.constructor,w=r.constructor;_!=w&&"constructor"in n&&"constructor"in r&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(m=!1)}return s.delete(n),s.delete(r),m}}function gX(){if(N$)return o6;N$=1;var e=Tm()(si(),"DataView");return o6=e}function yX(){if(L$)return i6;L$=1;var e=Tm()(si(),"Promise");return i6=e}function _X(){if(j$)return s6;j$=1;var e=Tm()(si(),"Set");return s6=e}function w5(){if(F$)return c6;F$=1;var e=Tm()(si(),"WeakMap");return c6=e}function V_(){if(B$)return l6;B$=1;var e=gX(),t=vA(),n=yX(),r=_X(),a=w5(),o=Su(),i=r5(),s="[object Map]",c="[object Promise]",l="[object Set]",u="[object WeakMap]",f="[object DataView]",d=i(e),p=i(t),h=i(n),m=i(r),y=i(a),g=o;return(e&&g(new e(new ArrayBuffer(1)))!=f||t&&g(new t)!=s||n&&g(n.resolve())!=c||r&&g(new r)!=l||a&&g(new a)!=u)&&(g=function(e){var t=o(e),n="[object Object]"==t?e.constructor:void 0,r=n?i(n):"";if(r)switch(r){case d:return f;case p:return s;case h:return c;case m:return l;case y:return u}return t}),l6=g}function vX(){if(V$)return f6;V$=1;var e=wA(),t=u5(),n=cX(),r=mX(),a=V_(),o=Ai(),i=EA(),s=m5(),c="[object Arguments]",l="[object Array]",u="[object Object]",f=Object.prototype.hasOwnProperty;return f6=function(d,p,h,m,y,g){var v=o(d),b=o(p),_=v?l:a(d),w=b?l:a(p),k=(_=_==c?u:_)==u,x=(w=w==c?u:w)==u,S=_==w;if(S&&i(d)){if(!i(p))return!1;v=!0,k=!1}if(S&&!k)return g||(g=new e),v||s(d)?t(d,p,h,m,y,g):n(d,p,_,h,m,y,g);if(!(1&h)){var E=k&&f.call(d,"__wrapped__"),A=x&&f.call(p,"__wrapped__");if(E||A){var z=E?d.value():d,C=A?p.value():p;return g||(g=new e),y(z,C,h,m,g)}}return!!S&&(g||(g=new e),r(d,p,h,m,y,g))}}function k5(){if(U$)return u6;U$=1;var e=vX(),t=os();return u6=function n(r,a,o,i,s){return r===a||(null==r||null==a||!t(r)&&!t(a)?r!=r&&a!=a:e(r,a,o,i,n,s))},u6}function bX(){if(q$)return d6;q$=1;var e=wA(),t=k5();return d6=function(n,r,a,o){var i=a.length,s=i,c=!o;if(null==n)return!s;for(n=Object(n);i--;){var l=a[i];if(c&&l[2]?l[1]!==n[l[0]]:!(l[0]in n))return!1}for(;++i<s;){var u=(l=a[i])[0],f=n[u],d=l[1];if(c&&l[2]){if(void 0===f&&!(u in n))return!1}else{var p=new e;if(o)var h=o(f,d,u,n,r,p);if(!(void 0===h?t(d,f,3,o,p):h))return!1}}return!0}}function x5(){if(W$)return p6;W$=1;var e=Vc();return p6=function(t){return t==t&&!e(t)}}function wX(){if(H$)return h6;H$=1;var e=x5(),t=pk();return h6=function(n){for(var r=t(n),a=r.length;a--;){var o=r[a],i=n[o];r[a]=[o,i,e(i)]}return r}}function S5(){if(G$)return m6;return G$=1,m6=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function kX(){if(K$)return g6;K$=1;var e=bX(),t=wX(),n=S5();return g6=function(r){var a=t(r);return 1==a.length&&a[0][2]?n(a[0][0],a[0][1]):function(t){return t===r||e(t,r,a)}}}function xX(){if(Q$)return y6;return Q$=1,y6=function(e,t){return null!=e&&t in Object(e)}}function SX(){if(Y$)return _6;Y$=1;var e=s5(),t=SA(),n=Ai(),r=CA(),a=RA(),o=B_();return _6=function(i,s,c){for(var l=-1,u=(s=e(s,i)).length,f=!1;++l<u;){var d=o(s[l]);if(!(f=null!=i&&c(i,d)))break;i=i[d]}return f||++l!=u?f:!!(u=null==i?0:i.length)&&a(u)&&r(d,u)&&(n(i)||t(i))}}function EX(){if(Z$)return v6;Z$=1;var e=xX(),t=SX();return v6=function(n,r){return null!=n&&t(n,r,e)}}function CX(){if(X$)return b6;X$=1;var e=k5(),t=l5(),n=EX(),r=yA(),a=x5(),o=S5(),i=B_();return b6=function(s,c){return r(s)&&a(c)?o(i(s),c):function(r){var a=t(r,s);return void 0===a&&a===c?n(r,s):e(c,a,3)}}}function PA(){if(J$)return w6;return J$=1,w6=function(e){return e}}function RX(){if(eO)return k6;return eO=1,k6=function(e){return function(t){return null==t?void 0:t[e]}}}function AX(){if(tO)return x6;tO=1;var e=c5();return x6=function(t){return function(n){return e(n,t)}}}function TX(){if(nO)return S6;nO=1;var e=RX(),t=AX(),n=yA(),r=B_();return S6=function(a){return n(a)?e(r(a)):t(a)}}function IX(){if(rO)return E6;rO=1;var e=kX(),t=CX(),n=PA(),r=Ai(),a=TX();return E6=function(o){return"function"==typeof o?o:null==o?n:"object"==typeof o?r(o)?t(o[0],o[1]):e(o):a(o)}}function PX(){if(aO)return C6;return aO=1,C6=function(e,t,n,r){for(var a=e.length,o=n+(r?1:-1);r?o--:++o<a;)if(t(e[o],o,e))return o;return-1}}function $X(){if(oO)return R6;return oO=1,R6=function(e){return e!=e}}function OX(){if(iO)return A6;return iO=1,A6=function(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}}function zX(){if(sO)return T6;sO=1;var e=PX(),t=$X(),n=OX();return T6=function(r,a,o){return a==a?n(r,a,o):e(r,t,o)}}function MX(){if(cO)return I6;cO=1;var e=zX();return I6=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function E5(){if(lO)return P6;return lO=1,P6=function(){}}function DX(){if(fO)return $6;fO=1;var e=H1(),t=SA(),n=Ai(),r=e?e.isConcatSpreadable:void 0;return $6=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function NX(){if(uO)return O6;uO=1;var e=kA(),t=DX();return O6=function n(r,a,o,i,s){var c=-1,l=r.length;for(o||(o=t),s||(s=[]);++c<l;){var u=r[c];a>0&&o(u)?a>1?n(u,a-1,o,i,s):e(s,u):i||(s[s.length]=u)}return s},O6}function $A(){if(dO)return z6;return dO=1,z6=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 LX(){if(pO)return M6;pO=1;var e=$A(),t=Math.max;return M6=function(n,r,a){return r=t(void 0===r?n.length-1:r,0),function(){for(var o=arguments,i=-1,s=t(o.length-r,0),c=Array(s);++i<s;)c[i]=o[r+i];i=-1;for(var l=Array(r+1);++i<r;)l[i]=o[i];return l[r]=a(c),e(n,this,l)}},M6}function jX(){if(hO)return D6;return hO=1,D6=function(e){return function(){return e}}}function C5(){if(mO)return N6;mO=1;var e=Tm(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return N6=t}function FX(){if(gO)return L6;gO=1;var e=jX(),t=C5(),n=PA();return L6=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function R5(){if(yO)return j6;yO=1;var e=Date.now;return j6=function(t){var n=0,r=0;return function(){var a=e(),o=16-(a-r);if(r=a,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},j6}function A5(){if(_O)return F6;_O=1;var e=FX(),t=R5()(e);return F6=t}function BX(){if(vO)return B6;vO=1;var e=si();return B6=function(){return e.Date.now()}}function VX(){if(bO)return V6;bO=1;var e=/\s/;return V6=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function UX(){if(wO)return U6;wO=1;var e=VX(),t=/^\s+/;return U6=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function T5(){if(kO)return q6;kO=1;var e=UX(),t=Vc(),n=F_(),r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,i=parseInt;return q6=function(s){if("number"==typeof s)return s;if(n(s))return NaN;if(t(s)){var c="function"==typeof s.valueOf?s.valueOf():s;s=t(c)?c+"":c}if("string"!=typeof s)return 0===s?s:+s;s=e(s);var l=a.test(s);return l||o.test(s)?i(s.slice(2),l?2:8):r.test(s)?NaN:+s}}function I5(){if(xO)return W6;xO=1;var e=Vc(),t=BX(),n=T5(),r=Math.max,a=Math.min;return W6=function(o,i,s){var c,l,u,f,d,p,h=0,m=!1,y=!1,g=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function v(e){var t=c,n=l;return c=l=void 0,h=e,f=o.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=i||t<0||y&&e-h>=u}function _(){var e=t();if(b(e))return w(e);d=setTimeout(_,function(e){var t=i-(e-p);return y?a(t,u-(e-h)):t}(e))}function w(e){return d=void 0,g&&c?v(e):(c=l=void 0,f)}function k(){var e=t(),n=b(e);if(c=arguments,l=this,p=e,n){if(void 0===d)return function(e){return h=e,d=setTimeout(_,i),m?v(e):f}(p);if(y)return clearTimeout(d),d=setTimeout(_,i),v(p)}return void 0===d&&(d=setTimeout(_,i)),f}return i=n(i)||0,e(s)&&(m=!!s.leading,u=(y="maxWait"in s)?r(n(s.maxWait)||0,i):u,g="trailing"in s?!!s.trailing:g),k.cancel=function(){void 0!==d&&clearTimeout(d),h=0,c=p=l=d=void 0},k.flush=function(){return void 0===d?f:w(t())},k},W6}function qX(){if(SO)return H6;SO=1;var e=I5(),t=Vc();return H6=function(n,r,a){var o=!0,i=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(a)&&(o="leading"in a?!!a.leading:o,i="trailing"in a?!!a.trailing:i),e(n,r,{leading:o,maxWait:r,trailing:i})}}yy.exports;var WX=qX();const HX=Ql(WX);function e_(e){return(e_="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 EO(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 Zv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EO(Object(n),!0).forEach((function(t){GX(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EO(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function GX(e,t,n){return(t=KX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KX(e){var t=QX(e,"string");return"symbol"==e_(t)?t:t+""}function QX(e,t){if("object"!=e_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=e_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function YX(e,t){return eJ(e)||JX(e,t)||XX(e,t)||ZX()}function ZX(){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 XX(e,t){if(e){if("string"==typeof e)return CO(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 CO(e,t)}}function CO(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 JX(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0!==t)for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}function eJ(e){if(Array.isArray(e))return e}var G6,RO,K6,AO,Q6,TO,Y6,IO,Z6,PO,X6,$O,J6,OO,eE,zO,tE,MO,nE,DO,rE,NO,aE,LO,oE,jO,tJ=v.forwardRef((function(e,t){var n=e.aspect,r=e.initialDimension,a=void 0===r?{width:-1,height:-1}:r,o=e.width,i=void 0===o?"100%":o,s=e.height,c=void 0===s?"100%":s,l=e.minWidth,u=void 0===l?0:l,f=e.minHeight,d=e.maxHeight,p=e.children,h=e.debounce,m=void 0===h?0:h,y=e.id,g=e.className,b=e.onResize,_=e.style,w=void 0===_?{}:_,k=v.useRef(null),x=v.useRef();x.current=b,v.useImperativeHandle(t,(function(){return Object.defineProperty(k.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),k.current},configurable:!0})}));var S=YX(v.useState({containerWidth:a.width,containerHeight:a.height}),2),E=S[0],A=S[1],z=v.useCallback((function(e,t){A((function(n){var r=Math.round(e),a=Math.round(t);return n.containerWidth===r&&n.containerHeight===a?n:{containerWidth:r,containerHeight:a}}))}),[]);v.useEffect((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,a=n.height;z(r,a),null===(t=x.current)||void 0===t||t.call(x,r,a)};m>0&&(e=HX(e,m,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=k.current.getBoundingClientRect(),r=n.width,a=n.height;return z(r,a),t.observe(k.current),function(){t.disconnect()}}),[z,m]);var C=v.useMemo((function(){var e=E.containerWidth,t=E.containerHeight;if(e<0||t<0)return null;vS(Yv(i)||Yv(c),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,c),vS(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=Yv(i)?e:i,a=Yv(c)?t:c;n&&n>0&&(r?a=r/n:a&&(r=a*n),d&&a>d&&(a=d)),vS(r>0||a>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,a,i,c,u,f,n);var o=!Array.isArray(p)&&QZ(p.type).endsWith("Chart");return ze.Children.map(p,(function(e){return ze.isValidElement(e)?v.cloneElement(e,Zv({width:r,height:a},o?{style:Zv({height:"100%",width:"100%",maxHeight:a,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,c,d,f,u,E,i]);return ze.createElement("div",{id:y?"".concat(y):void 0,className:o7("recharts-responsive-container",g),style:Zv(Zv({},w),{},{width:i,height:c,minWidth:u,minHeight:f,maxHeight:d}),ref:k},C)}));function OA(){if(RO)return G6;RO=1;var e=y5()(Object.getPrototypeOf,Object);return G6=e}function nJ(){if(AO)return K6;AO=1;var e=Su(),t=OA(),n=os(),r=Function.prototype,a=Object.prototype,o=r.toString,i=a.hasOwnProperty,s=o.call(Object);return K6=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var a=t(r);if(null===a)return!0;var c=i.call(a,"constructor")&&a.constructor;return"function"==typeof c&&c instanceof c&&o.call(c)==s}}function rJ(){if(TO)return Q6;TO=1;var e=T5(),t=1/0;return Q6=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function P5(){if(IO)return Y6;IO=1;var e=C5();return Y6=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function $5(){if(PO)return Z6;PO=1;var e=rJ();return Z6=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function zA(){if($O)return X6;return $O=1,X6=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function O5(){if(OO)return J6;OO=1;var e=P5(),t=_A(),n=Object.prototype.hasOwnProperty;return J6=function(r,a,o){var i=r[a];(!n.call(r,a)||!t(i,o)||void 0===o&&!(a in r))&&e(r,a,o)}}function hk(){if(zO)return eE;zO=1;var e=O5(),t=P5();return eE=function(n,r,a,o){var i=!a;a||(a={});for(var s=-1,c=r.length;++s<c;){var l=r[s],u=o?o(a[l],n[l],l,a,n):void 0;void 0===u&&(u=n[l]),i?t(a,l,u):e(a,l,u)}return a}}function z5(){if(MO)return tE;MO=1;var e=hk(),t=pk();return tE=function(n,r){return n&&e(r,t(r),n)}}function aJ(){if(DO)return nE;return DO=1,nE=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function oJ(){if(NO)return rE;NO=1;var e=Vc(),t=IA(),n=aJ(),r=Object.prototype.hasOwnProperty;return rE=function(a){if(!e(a))return n(a);var o=t(a),i=[];for(var s in a)"constructor"==s&&(o||!r.call(a,s))||i.push(s);return i}}function MA(){if(LO)return aE;LO=1;var e=g5(),t=oJ(),n=v5();return aE=function(r){return n(r)?e(r,!0):t(r)}}function iJ(){if(jO)return oE;jO=1;var e=hk(),t=MA();return oE=function(n,r){return n&&e(r,t(r),n)}}var FO,iE,BO,sE,VO,cE,UO,lE,qO,fE,WO,uE,HO,dE,GO,pE,KO,hE,QO,mE,YO,gE,ZO,yE,XO,_E,JO,vE,ez,bE,tz,wE,nz,kE,rz,xE,az,SE,oz,EE,iz,CE,sz,_y={exports:{}};function sJ(){return FO||(FO=1,e=_y,t=_y.exports,n=si(),r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,o=a&&a.exports===r?n.Buffer:void 0,i=o?o.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}),_y.exports;var e,t,n,r,a,o,i}function mk(){if(BO)return iE;return BO=1,iE=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function cJ(){if(VO)return sE;VO=1;var e=hk(),t=xA();return sE=function(n,r){return e(n,t(n),r)}}function M5(){if(UO)return cE;UO=1;var e=kA(),t=OA(),n=xA(),r=h5(),a=Object.getOwnPropertySymbols;return cE=a?function(r){for(var a=[];r;)e(a,n(r)),r=t(r);return a}:r}function lJ(){if(qO)return lE;qO=1;var e=hk(),t=M5();return lE=function(n,r){return e(n,t(n),r)}}function fJ(){if(WO)return fE;WO=1;var e=p5(),t=M5(),n=MA();return fE=function(r){return e(r,n,t)}}function uJ(){if(HO)return uE;HO=1;var e=Object.prototype.hasOwnProperty;return uE=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 DA(){if(GO)return dE;GO=1;var e=d5();return dE=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function dJ(){if(KO)return pE;KO=1;var e=DA();return pE=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function pJ(){if(QO)return hE;QO=1;var e=/\w*$/;return hE=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function hJ(){if(YO)return mE;YO=1;var e=H1(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return mE=function(e){return n?Object(n.call(e)):{}}}function mJ(){if(ZO)return gE;ZO=1;var e=DA();return gE=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function gJ(){if(XO)return yE;XO=1;var e=DA(),t=dJ(),n=pJ(),r=hJ(),a=mJ();return yE=function(o,i,s){var c=o.constructor;switch(i){case"[object ArrayBuffer]":return e(o);case"[object Boolean]":case"[object Date]":return new c(+o);case"[object DataView]":return t(o,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 a(o,s);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(o);case"[object RegExp]":return n(o);case"[object Symbol]":return r(o)}}}function gk(){if(JO)return _E;JO=1;var e=Vc(),t=Object.create;return _E=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var a=new n;return n.prototype=void 0,a}}()}function yJ(){if(ez)return vE;ez=1;var e=gk(),t=OA(),n=IA();return vE=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function _J(){if(tz)return bE;tz=1;var e=V_(),t=os();return bE=function(n){return t(n)&&"[object Map]"==e(n)}}function vJ(){if(nz)return wE;nz=1;var e=_J(),t=AA(),n=TA(),r=n&&n.isMap,a=r?t(r):e;return wE=a}function bJ(){if(rz)return kE;rz=1;var e=V_(),t=os();return kE=function(n){return t(n)&&"[object Set]"==e(n)}}function wJ(){if(az)return xE;az=1;var e=bJ(),t=AA(),n=TA(),r=n&&n.isSet,a=r?t(r):e;return xE=a}function D5(){if(oz)return SE;oz=1;var e=wA(),t=zA(),n=O5(),r=z5(),a=iJ(),o=sJ(),i=mk(),s=cJ(),c=lJ(),l=b5(),u=fJ(),f=V_(),d=uJ(),p=gJ(),h=yJ(),m=Ai(),y=EA(),g=vJ(),v=Vc(),b=wJ(),_=pk(),w=MA(),k="[object Arguments]",x="[object Function]",S="[object Object]",E={};return E[k]=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[S]=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[x]=E["[object WeakMap]"]=!1,SE=function A(z,C,I,T,R,P){var j,O=1&C,N=2&C,M=4&C;if(I&&(j=R?I(z,T,R,P):I(z)),void 0!==j)return j;if(!v(z))return z;var D=m(z);if(D){if(j=d(z),!O)return i(z,j)}else{var B=f(z),L=B==x||"[object GeneratorFunction]"==B;if(y(z))return o(z,O);if(B==S||B==k||L&&!R){if(j=N||L?{}:h(z),!O)return N?c(z,a(j,z)):s(z,r(j,z))}else{if(!E[B])return R?z:{};j=p(z,B,O)}}P||(P=new e);var V=P.get(z);if(V)return V;P.set(z,j),b(z)?z.forEach((function(e){j.add(A(e,C,I,e,z,P))})):g(z)&&z.forEach((function(e,t){j.set(t,A(e,C,I,t,z,P))}));var q=D?void 0:(M?N?u:l:N?w:_)(z);return t(q||z,(function(e,t){q&&(e=z[t=e]),n(j,t,A(e,C,I,t,z,P))})),j},SE}function kJ(){if(iz)return EE;iz=1;var e=NX();return EE=function(t){return(null==t?0:t.length)?e(t,1):[]}}function xJ(){if(sz)return CE;sz=1;var e=kJ(),t=LX(),n=A5();return CE=function(r){return n(t(r,void 0,e),r+"")}}_y.exports;const SJ={light:"",dark:".dark"},N5=v.createContext(null);function L5(){const e=v.useContext(N5);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const EJ=v.forwardRef((({id:e,className:t,children:n,config:r,...a},o)=>{const i=v.useId(),s=`chart-${e||i.replace(/:/g,"")}`;return B.jsx(N5.Provider,{value:{config:r},children:B.jsxs("div",{"data-chart":s,ref:o,className:$e("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),...a,children:[B.jsx(CJ,{id:s,config:r}),B.jsx(tJ,{children:n})]})})}));EJ.displayName="Chart";const CJ=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?B.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(SJ).map((([t,r])=>`\n${r} [data-chart=${e}] {\n${n.map((([e,n])=>{var r;const a=(null==(r=n.theme)?void 0:r[t])||n.color;return a?` --color-${e}: ${a};`:null})).join("\n")}\n}\n`)).join("\n")}}):null},RJ=v.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:a=!1,hideIndicator:o=!1,label:i,labelFormatter:s,labelClassName:c,formatter:l,color:u,nameKey:f,labelKey:d},p)=>{const{config:h}=L5(),m=v.useMemo((()=>{var e;if(a||null==t||!t.length)return null;const[n]=t,r=`${d||(null==n?void 0:n.dataKey)||(null==n?void 0:n.name)||"value"}`,o=RC(h,n,r),l=d||"string"!=typeof i?null==o?void 0:o.label:(null==(e=h[i])?void 0:e.label)||i;return s?B.jsx("div",{className:$e("font-medium",c),children:s(l,t)}):l?B.jsx("div",{className:$e("font-medium",c),children:l}):null}),[i,s,t,a,c,h,d]);if(!e||null==t||!t.length)return null;const y=1===t.length&&"dot"!==r,g=t.length>10;return B.jsxs("div",{ref:p,className:$e("grid min-w-[8rem] items-start gap-1.5 rounded-sm border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",g&&"min-w-[16rem]",n),children:[y?null:m,B.jsx("div",{className:$e("grid gap-1.5",g&&"grid-cols-2 gap-x-4"),children:t.map(((e,t)=>{var n;const a=`${f||e.name||e.dataKey||"value"}`,i=RC(h,e,a),s=u||(null==(n=e.payload)?void 0:n.fill)||e.color||"";return B.jsx("div",{className:$e("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"),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]):B.jsxs(B.Fragment,{children:[null!=i&&i.icon?B.jsx(i.icon,{}):!o&&B.jsx("div",{className:$e("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border-[1.5px] border-dashed bg-transparent":"dashed"===r,"my-0.5":y&&"dashed"===r}),style:{"--color-bg":s,"--color-border":s}}),B.jsxs("div",{className:$e("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[B.jsxs("div",{className:"grid gap-1.5",children:[y?m:null,B.jsx("span",{className:"text-muted-foreground",children:(null==i?void 0:i.label)||e.name})]}),e.value&&B.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));RJ.displayName="ChartTooltip";const AJ=v.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:a,hoveredItem:o},i)=>{const{config:s}=L5(),c=v.useRef({});return v.useEffect((()=>{if(o&&c.current[o]){const e=c.current[o];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[o]),null!=n&&n.length?B.jsx("div",{ref:i,className:$e("flex h-[150px] w-full flex-wrap items-center justify-center gap-6 overflow-y-auto pb-10",e),children:n.map((e=>{var n;const i=`${r||e.dataKey||"value"}`,l=RC(s,e,i),u=!!a&&i===o;return B.jsxs("div",{ref:e=>{e?c.current[i]=e:delete c.current[i]},className:$e("group flex cursor-pointer select-none items-center gap-2 text-base transition-all duration-150",u?"scale-105 text-black":o?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==a?void 0:a(e.dataKey),onMouseLeave:()=>null==a?void 0:a(null),children:[null!=l&&l.icon&&!t?B.jsx(l.icon,{}):B.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:e.color||""}}),B.jsx("span",{className:"min-w-[max-content]",children:(null==l?void 0:l.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||i)}))}):null}));function RC(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 a=n;return n in t&&"string"==typeof t[n]?a=t[n]:r&&n in r&&"string"==typeof r[n]&&(a=r[n]),a in e?e[a]:e[n]}function yk(e){const t=v.useRef({value:e,previous:e});return v.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function _k(e){const[t,n]=v.useState(void 0);return Mo((()=>{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 a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}AJ.displayName="ChartLegend";const j5="Checkbox",[TJ,BWe]=ii(j5),[IJ,PJ]=TJ(j5),$J=v.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:o,required:i,disabled:s,value:c="on",onCheckedChange:l,...u}=e,[f,d]=v.useState(null),p=yn(t,(e=>d(e))),h=v.useRef(!1),m=!f||!!f.closest("form"),[y=!1,g]=kp({prop:a,defaultProp:o,onChange:l}),b=v.useRef(y);return v.useEffect((()=>{const e=null==f?void 0:f.form;if(e){const t=()=>g(b.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,g]),v.createElement(IJ,{scope:n,state:y,disabled:s},v.createElement(St.button,Le({type:"button",role:"checkbox","aria-checked":sm(y)?"mixed":y,"aria-required":i,"data-state":F5(y),"data-disabled":s?"":void 0,disabled:s,value:c},u,{ref:p,onKeyDown:lt(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:lt(e.onClick,(e=>{g((e=>!!sm(e)||!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&v.createElement(MJ,{control:f,bubbles:!h.current,name:r,value:c,checked:y,required:i,disabled:s,style:{transform:"translateX(-100%)"}}))})),OJ="CheckboxIndicator",zJ=v.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,o=PJ(OJ,n);return v.createElement(Ws,{present:r||sm(o.state)||!0===o.state},v.createElement(St.span,Le({"data-state":F5(o.state),"data-disabled":o.disabled?"":void 0},a,{ref:t,style:{pointerEvents:"none",...e.style}})))})),MJ=e=>{const{control:t,checked:n,bubbles:r=!0,...a}=e,o=v.useRef(null),i=yk(n),s=_k(t);return v.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&a){const t=new Event("click",{bubbles:r});e.indeterminate=sm(n),a.call(e,!sm(n)&&n),e.dispatchEvent(t)}}),[i,n,r]),v.createElement("input",Le({type:"checkbox","aria-hidden":!0,defaultChecked:!sm(n)&&n},a,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function sm(e){return"indeterminate"===e}function F5(e){return sm(e)?"indeterminate":e?"checked":"unchecked"}const B5=$J,DJ=zJ,cz=Yl("",{variants:{size:{default:"h-4 w-4",20:"size-5",24:"size-6",32:"size-8"},variant:{default:"peer shrink-0 rounded-xs border border-slate-700 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:border-slate-700 data-[state=checked]:bg-slate-700 data-[state=checked]:text-primary-foreground",dark:"shrink-0 bg-slate-900_50 data-[state=checked]:bg-slate-700 rounded-[4px] border-[2px] data-[state=checked]:text-primary-foreground border-slate-100 [&_svg]:size-[24px] [&_svg]:border-none"}},defaultVariants:{size:"default",variant:"default"}}),V5=v.forwardRef((({className:e,size:t,variant:n,...r},a)=>B.jsx(B5,{ref:a,className:$e(e,cz({size:t,variant:n})),...r,children:B.jsx(DJ,{className:$e("flex items-center justify-center text-current"),children:B.jsx(tA,{className:$e(cz({size:t}))})})})));V5.displayName=B5.displayName;var lz=1,NJ=.9,LJ=.8,jJ=.17,RE=.1,AE=.999,FJ=.9999,BJ=.99,VJ=/[\\\/_+.#"@\[\(\{&]/,UJ=/[\\\/_+.#"@\[\(\{&]/g,qJ=/[\s-]/,U5=/[\s-]/g;function AC(e,t,n,r,a,o,i){if(o===t.length)return a===e.length?lz:BJ;var s=`${a},${o}`;if(void 0!==i[s])return i[s];for(var c,l,u,f,d=r.charAt(o),p=n.indexOf(d,a),h=0;p>=0;)(c=AC(e,t,n,r,p+1,o+1,i))>h&&(p===a?c*=lz:VJ.test(e.charAt(p-1))?(c*=LJ,(u=e.slice(a,p-1).match(UJ))&&a>0&&(c*=Math.pow(AE,u.length))):qJ.test(e.charAt(p-1))?(c*=NJ,(f=e.slice(a,p-1).match(U5))&&a>0&&(c*=Math.pow(AE,f.length))):(c*=jJ,a>0&&(c*=Math.pow(AE,p-a))),e.charAt(p)!==t.charAt(o)&&(c*=FJ)),(c<RE&&n.charAt(p-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(p-1)!==r.charAt(o))&&((l=AC(e,t,n,r,p+1,o+2,i))*RE>c&&(c=l*RE)),c>h&&(h=c),p=n.indexOf(d,p+1);return i[s]=h,h}function fz(e){return e.toLowerCase().replace(U5," ")}function WJ(e,t,n){return AC(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,fz(e),fz(t),0,0,{})}var ry='[cmdk-group=""]',TE='[cmdk-group-items=""]',HJ='[cmdk-group-heading=""]',NA='[cmdk-item=""]',uz=`${NA}:not([aria-disabled="true"])`,TC="cmdk-item-select",tm="data-value",GJ=(e,t,n)=>WJ(e,t,n),q5=v.createContext(void 0),U_=()=>v.useContext(q5),W5=v.createContext(void 0),LA=()=>v.useContext(W5),H5=v.createContext(void 0),G5=v.forwardRef(((e,t)=>{let n=c1((()=>{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=c1((()=>new Set)),a=c1((()=>new Map)),o=c1((()=>new Map)),i=c1((()=>new Set)),s=K5(e),{label:c,children:l,value:u,onValueChange:f,filter:d,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:y=!0,...g}=e,b=v.useId(),_=v.useId(),w=v.useId(),k=v.useRef(null),x=aee();gm((()=>{if(void 0!==u){let e=u.trim();n.current.value=e,S.emit()}}),[u]),gm((()=>{x(6,T)}),[]);let S=v.useMemo((()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var a,o,i;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)I(),z(),x(1,C);else if("value"===e&&(r||x(5,T),void 0!==(null==(a=s.current)?void 0:a.value))){let e=t??"";return void(null==(i=(o=s.current).onValueChange)||i.call(o,e))}S.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),E=v.useMemo((()=>({value:(e,t,r)=>{var a;t!==(null==(a=o.current.get(e))?void 0:a.value)&&(o.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,A(t,r)),x(2,(()=>{z(),S.emit()})))},item:(e,t)=>(r.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),x(3,(()=>{I(),z(),n.current.value||C(),S.emit()})),()=>{o.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=R();x(4,(()=>{I(),(null==t?void 0:t.getAttribute("id"))===e&&C(),S.emit()}))}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{o.current.delete(e),a.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],disablePointerSelection:m,listId:b,inputId:w,labelId:_,listInnerRef:k})),[]);function A(e,t){var r,a;let o=null!=(a=null==(r=s.current)?void 0:r.filter)?a:GJ;return e?o(e,n.current.search,t):0}function z(){if(!n.current.search||!1===s.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=a.current.get(n),o=0;r.forEach((t=>{let n=e.get(t);o=Math.max(n,o)})),t.push([n,o])}));let r=k.current;P().sort(((t,n)=>{var r,a;let o=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(a=e.get(o))?a:0)})).forEach((e=>{let t=e.closest(TE);t?t.appendChild(e.parentElement===t?e:e.closest(`${TE} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${TE} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=k.current.querySelector(`${ry}[${tm}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function C(){let e=P().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(tm);S.setState("value",t||void 0)}function I(){var e,t,i,c;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 a of r.current){let r=A(null!=(t=null==(e=o.current.get(a))?void 0:e.value)?t:"",null!=(c=null==(i=o.current.get(a))?void 0:i.keywords)?c:[]);n.current.filtered.items.set(a,r),r>0&&l++}for(let[e,t]of a.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=R();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(ry))?void 0:t.querySelector(HJ))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function R(){var e;return null==(e=k.current)?void 0:e.querySelector(`${NA}[aria-selected="true"]`)}function P(){var e;return Array.from(null==(e=k.current)?void 0:e.querySelectorAll(uz))}function j(e){let t=P()[e];t&&S.setState("value",t.getAttribute(tm))}function O(e){var t;let n=R(),r=P(),a=r.findIndex((e=>e===n)),o=r[a+e];null!=(t=s.current)&&t.loop&&(o=a+e<0?r[r.length-1]:a+e===r.length?r[0]:r[a+e]),o&&S.setState("value",o.getAttribute(tm))}function N(e){let t,n=R(),r=null==n?void 0:n.closest(ry);for(;r&&!t;)r=e>0?nee(r,ry):ree(r,ry),t=null==r?void 0:r.querySelector(uz);t?S.setState("value",t.getAttribute(tm)):O(e)}let M=()=>j(P().length-1),D=e=>{e.preventDefault(),e.metaKey?M():e.altKey?N(1):O(1)},B=e=>{e.preventDefault(),e.metaKey?j(0):e.altKey?N(-1):O(-1)};return v.createElement(St.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=g.onKeyDown)||t.call(g,e),!e.defaultPrevented)switch(e.key){case"n":case"j":y&&e.ctrlKey&&D(e);break;case"ArrowDown":D(e);break;case"p":case"k":y&&e.ctrlKey&&B(e);break;case"ArrowUp":B(e);break;case"Home":e.preventDefault(),j(0);break;case"End":e.preventDefault(),M();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=R();if(t){let e=new Event(TC);t.dispatchEvent(e)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:iee},c),vk(e,(e=>v.createElement(W5.Provider,{value:S},v.createElement(q5.Provider,{value:E},e)))))})),KJ=v.forwardRef(((e,t)=>{var n,r;let a=v.useId(),o=v.useRef(null),i=v.useContext(H5),s=U_(),c=K5(e),l=null!=(r=null==(n=c.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;gm((()=>{if(!l)return s.item(a,null==i?void 0:i.id)}),[l]);let u=Q5(a,o,[e.value,e.children,o],e.keywords),f=LA(),d=ym((e=>e.value&&e.value===u.current)),p=ym((e=>!(!l&&!1!==s.filter())||(!e.search||e.filtered.items.get(a)>0)));function h(){var e,t;m(),null==(t=(e=c.current).onSelect)||t.call(e,u.current)}function m(){f.setState("value",u.current,!0)}if(v.useEffect((()=>{let t=o.current;if(t&&!e.disabled)return t.addEventListener(TC,h),()=>t.removeEventListener(TC,h)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:y,value:g,onSelect:b,forceMount:_,keywords:w,...k}=e;return v.createElement(St.div,{ref:t_([o,t]),...k,id:a,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!d,"data-disabled":!!y,"data-selected":!!d,onPointerMove:y||s.disablePointerSelection?void 0:m,onClick:y?void 0:h},e.children)})),QJ=v.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,i=v.useId(),s=v.useRef(null),c=v.useRef(null),l=v.useId(),u=U_(),f=ym((e=>!(!a&&!1!==u.filter())||(!e.search||e.filtered.groups.has(i))));gm((()=>u.group(i)),[]),Q5(i,s,[e.value,e.heading,c]);let d=v.useMemo((()=>({id:i,forceMount:a})),[a]);return v.createElement(St.div,{ref:t_([s,t]),...o,"cmdk-group":"",role:"presentation",hidden:!f||void 0},n&&v.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),vk(e,(e=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},v.createElement(H5.Provider,{value:d},e)))))})),YJ=v.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,a=v.useRef(null),o=ym((e=>!e.search));return n||o?v.createElement(St.div,{ref:t_([a,t]),...r,"cmdk-separator":"",role:"separator"}):null})),ZJ=v.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,a=null!=e.value,o=LA(),i=ym((e=>e.search)),s=ym((e=>e.value)),c=U_(),l=v.useMemo((()=>{var e;let t=null==(e=c.listInnerRef.current)?void 0:e.querySelector(`${NA}[${tm}="${encodeURIComponent(s)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return v.useEffect((()=>{null!=e.value&&o.setState("search",e.value)}),[e.value]),v.createElement(St.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:a?e.value:i,onChange:e=>{a||o.setState("search",e.target.value),null==n||n(e.target.value)}})})),XJ=v.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,o=v.useRef(null),i=v.useRef(null),s=U_();return v.useEffect((()=>{if(i.current&&o.current){let e,t=i.current,n=o.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)}}}),[]),v.createElement(St.div,{ref:t_([o,t]),...a,"cmdk-list":"",role:"listbox","aria-label":r,id:s.listId},vk(e,(e=>v.createElement("div",{ref:t_([i,s.listInnerRef]),"cmdk-list-sizer":""},e))))})),JJ=v.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:i,...s}=e;return v.createElement(z7,{open:n,onOpenChange:r},v.createElement(ok,{container:i},v.createElement(q1,{"cmdk-overlay":"",className:a}),v.createElement(W1,{"aria-label":e.label,"cmdk-dialog":"",className:o},v.createElement(G5,{ref:t,...s}))))})),eee=v.forwardRef(((e,t)=>ym((e=>0===e.filtered.count))?v.createElement(St.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),tee=v.forwardRef(((e,t)=>{let{progress:n,children:r,label:a="Loading...",...o}=e;return v.createElement(St.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},vk(e,(e=>v.createElement("div",{"aria-hidden":!0},e))))})),Ti=Object.assign(G5,{List:XJ,Item:KJ,Input:ZJ,Group:QJ,Separator:YJ,Dialog:JJ,Empty:eee,Loading:tee});function nee(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ree(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function K5(e){let t=v.useRef(e);return gm((()=>{t.current=e})),t}var gm=typeof window>"u"?v.useEffect:v.useLayoutEffect;function c1(e){let t=v.useRef();return void 0===t.current&&(t.current=e()),t}function t_(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function ym(e){let t=LA(),n=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,n,n)}function Q5(e,t,n,r=[]){let a=v.useRef(),o=U_();return gm((()=>{var i;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():a.current}})(),c=r.map((e=>e.trim()));o.value(e,s,c),null==(i=t.current)||i.setAttribute(tm,s),a.current=s})),a}var aee=()=>{let[e,t]=v.useState(),n=c1((()=>new Map));return gm((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function oee(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function vk({asChild:e,children:t},n){return e&&v.isValidElement(t)?v.cloneElement(oee(t),{ref:t.ref},n(t.props.children)):n(t)}var iee={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const see=ok,Y5=v.forwardRef((({className:e,...t},n)=>(v.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{e.forEach((e=>e&&(e.style.filter="none")))}}),[]),B.jsx(q1,{ref:n,"data-testid":"dialog_overlay",className:$e("fixed inset-0 z-100 bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));Y5.displayName=q1.displayName;const cee=Yl("",{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-slate-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-slate-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),lee=Yl("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),fee=v.forwardRef((({title:e,titleIcon:t,className:n,showClose:r=!0,closeVariant:a="outsideCard",closeSize:o="big",children:i,overlayClassName:s,childrenClassName:c,onBack:l,onCloseModal:u,...f},d)=>{const p=B.jsxs(ik,{className:$e(cee({closeVariant:a})),children:[B.jsx(n7,{onClick:u,fill:"currentColor",className:$e(lee({closeSize:o}))}),B.jsx("span",{className:"sr-only",children:"Close"})]});return B.jsxs(see,{children:[B.jsx(Y5,{className:s,onClick:u}),r&&"insideCard"!==a&&p,B.jsxs(W1,{ref:d,className:$e("fixed left-[50%] top-[50%] z-100 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),...f,children:[B.jsx(Z5,{className:"hidden",children:"DialogTitle"}),B.jsx(X5,{className:"hidden",children:"DialogDescription"}),e&&B.jsxs("h3",{className:"flex items-center justify-center gap-xxs border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",children:[t,e]}),B.jsx("div",{className:$e("p-m",c),children:i}),r&&"insideCard"===a&&p,l&&B.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:l,className:"absolute left-m top-m",children:B.jsx(J8,{color:"var(--slate-400)",size:24})})]})]})}));fee.displayName=W1.displayName;const Z5=v.forwardRef((({className:e,...t},n)=>B.jsx(N_,{ref:n,className:$e("text-lg font-semibold leading-none tracking-tight",e),...t})));Z5.displayName=N_.displayName;const X5=v.forwardRef((({className:e,...t},n)=>B.jsx(L_,{ref:n,className:$e("text-sm text-muted-foreground",e),...t})));X5.displayName=L_.displayName;const uee=v.forwardRef((({className:e,...t},n)=>B.jsx(Ti,{ref:n,className:$e("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));uee.displayName=Ti.displayName;const dee=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:B.jsx(Ti.Input,{ref:n,className:$e("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})})));dee.displayName=Ti.Input.displayName;const pee=v.forwardRef((({className:e,...t},n)=>B.jsx(Ti.List,{ref:n,className:$e("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));pee.displayName=Ti.List.displayName;const hee=v.forwardRef(((e,t)=>B.jsx(Ti.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));hee.displayName=Ti.Empty.displayName;const mee=v.forwardRef((({className:e,...t},n)=>B.jsx(Ti.Group,{ref:n,className:$e("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})));mee.displayName=Ti.Group.displayName;const gee=v.forwardRef((({className:e,...t},n)=>B.jsx(Ti.Separator,{ref:n,className:$e("-mx-1 h-px bg-border",e),...t})));gee.displayName=Ti.Separator.displayName;const yee=v.forwardRef((({className:e,...t},n)=>B.jsx(Ti.Item,{ref:n,className:$e("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 gp(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 dz(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function J5(...e){return t=>{let n=!1;const r=e.map((e=>{const r=dz(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():dz(e[t],null)}}}}function Im(...e){return v.useCallback(J5(...e),e)}function _ee(e,t){const n=v.createContext(t),r=e=>{const{children:t,...r}=e,a=v.useMemo((()=>r),Object.values(r));return B.jsx(n.Provider,{value:a,children:t})};return r.displayName=e+"Provider",[r,function(r){const a=v.useContext(n);if(a)return a;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function vee(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>v.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return v.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=v.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,c=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,l=v.useMemo((()=>s),Object.values(s));return B.jsx(c.Provider,{value:l,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const c=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,l=v.useContext(c);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},bee(r,...t)]}function bee(...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 v.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}yee.displayName=Ti.Item.displayName;var ew=null!=globalThis&&globalThis.document?v.useLayoutEffect:()=>{},wee=Xb[" useId ".trim().toString()]||(()=>{}),kee=0;function IE(e){const[t,n]=v.useState(wee());return ew((()=>{e||n((e=>e??String(kee++)))}),[e]),e||(t?`radix-${t}`:"")}function _m(e){const t=v.useRef(e);return v.useEffect((()=>{t.current=e})),v.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function xee({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=See({defaultProp:t,onChange:n}),o=void 0!==e,i=o?e:r,s=_m(n);return[i,v.useCallback((t=>{if(o){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)}),[o,e,a,s])]}function See({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,a=v.useRef(r),o=_m(t);return v.useEffect((()=>{a.current!==r&&(o(r),a.current=r)}),[r,a,o]),n}function eL(e){const t=Eee(e),n=v.forwardRef(((e,n)=>{const{children:r,...a}=e,o=v.Children.toArray(r),i=o.find(Ree);if(i){const e=i.props.children,r=o.map((t=>t===i?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t));return B.jsx(t,{...a,ref:n,children:v.isValidElement(e)?v.cloneElement(e,void 0,r):null})}return B.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function Eee(e){const t=v.forwardRef(((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const e=Tee(n),a=Aee(r,n.props);return n.type!==v.Fragment&&(a.ref=t?J5(t,e):e),v.cloneElement(n,a)}return v.Children.count(n)>1?v.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var Cee=Symbol("radix.slottable");function Ree(e){return v.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Cee}function Aee(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function Tee(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;return a?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var Iee=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Eu=Iee.reduce(((e,t)=>{const n=eL(`Primitive.${t}`),r=v.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),B.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function Pee(e,t){e&&Zl.flushSync((()=>e.dispatchEvent(t)))}function $ee(e,t=(null==globalThis?void 0:globalThis.document)){const n=_m(e);v.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 pz,Oee="DismissableLayer",IC="dismissableLayer.update",zee="dismissableLayer.pointerDownOutside",Mee="dismissableLayer.focusOutside",tL=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nL=v.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...c}=e,l=v.useContext(tL),[u,f]=v.useState(null),d=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=v.useState({}),h=Im(t,(e=>f(e))),m=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(y),b=u?m.indexOf(u):-1,_=l.layersWithOutsidePointerEventsDisabled.size>0,w=b>=g,k=Lee((e=>{const t=e.target,n=[...l.branches].some((e=>e.contains(t)));!w||n||(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),d),x=jee((e=>{const t=e.target;[...l.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),d);return $ee((e=>{b===l.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),d),v.useEffect((()=>{if(u)return n&&(0===l.layersWithOutsidePointerEventsDisabled.size&&(pz=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),hz(),()=>{n&&1===l.layersWithOutsidePointerEventsDisabled.size&&(d.body.style.pointerEvents=pz)}}),[u,d,n,l]),v.useEffect((()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),hz())}),[u,l]),v.useEffect((()=>{const e=()=>p({});return document.addEventListener(IC,e),()=>document.removeEventListener(IC,e)}),[]),B.jsx(Eu.div,{...c,ref:h,style:{pointerEvents:_?w?"auto":"none":void 0,...e.style},onFocusCapture:gp(e.onFocusCapture,x.onFocusCapture),onBlurCapture:gp(e.onBlurCapture,x.onBlurCapture),onPointerDownCapture:gp(e.onPointerDownCapture,k.onPointerDownCapture)})}));nL.displayName=Oee;var Dee="DismissableLayerBranch",Nee=v.forwardRef(((e,t)=>{const n=v.useContext(tL),r=v.useRef(null),a=Im(t,r);return v.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),B.jsx(Eu.div,{...e,ref:a})}));function Lee(e,t=(null==globalThis?void 0:globalThis.document)){const n=_m(e),r=v.useRef(!1),a=v.useRef((()=>{}));return v.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){rL(zee,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function jee(e,t=(null==globalThis?void 0:globalThis.document)){const n=_m(e),r=v.useRef(!1);return v.useEffect((()=>{const e=e=>{e.target&&!r.current&&rL(Mee,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 hz(){const e=new CustomEvent(IC);document.dispatchEvent(e)}function rL(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Pee(a,o):a.dispatchEvent(o)}Nee.displayName=Dee;var PE="focusScope.autoFocusOnMount",$E="focusScope.autoFocusOnUnmount",mz={bubbles:!1,cancelable:!0},Fee="FocusScope",aL=v.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,c]=v.useState(null),l=_m(a),u=_m(o),f=v.useRef(null),d=Im(t,(e=>c(e))),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect((()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?f.current=t:ip(f.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||ip(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&ip(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]),v.useEffect((()=>{if(s){yz.add(p);const e=document.activeElement;if(!s.contains(e)){const t=new CustomEvent(PE,mz);s.addEventListener(PE,l),s.dispatchEvent(t),t.defaultPrevented||(Bee(Hee(oL(s)),{select:!0}),document.activeElement===e&&ip(s))}return()=>{s.removeEventListener(PE,l),setTimeout((()=>{const t=new CustomEvent($E,mz);s.addEventListener($E,u),s.dispatchEvent(t),t.defaultPrevented||ip(e??document.body,{select:!0}),s.removeEventListener($E,u),yz.remove(p)}),0)}}}),[s,l,u,p]);const h=v.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=Vee(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&ip(o,{select:!0})):(e.preventDefault(),n&&ip(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,p.paused]);return B.jsx(Eu.div,{tabIndex:-1,...i,ref:d,onKeyDown:h})}));function Bee(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ip(r,{select:t}),document.activeElement!==n)return}function Vee(e){const t=oL(e);return[gz(t,e),gz(t.reverse(),e)]}function oL(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 gz(e,t){for(const n of e)if(!Uee(n,{upTo:t}))return n}function Uee(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 qee(e){return e instanceof HTMLInputElement&&"select"in e}function ip(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&qee(e)&&t&&e.select()}}aL.displayName=Fee;var yz=Wee();function Wee(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=_z(e,t),e.unshift(t)},remove(t){var n;e=_z(e,t),null==(n=e[0])||n.resume()}}}function _z(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function Hee(e){return e.filter((e=>"A"!==e.tagName))}var Gee="Portal",iL=v.forwardRef(((e,t)=>{var n;const{container:r,...a}=e,[o,i]=v.useState(!1);ew((()=>i(!0)),[]);const s=r||o&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?u7.createPortal(B.jsx(Eu.div,{...a,ref:t}),s):null}));function Kee(e,t){return v.useReducer(((e,n)=>t[e][n]??e),e)}iL.displayName=Gee;var bk=e=>{const{present:t,children:n}=e,r=Qee(t),a="function"==typeof n?n({present:r.isPresent}):v.Children.only(n),o=Im(r.ref,Yee(a));return"function"==typeof n||r.isPresent?v.cloneElement(a,{ref:o}):null};function Qee(e){const[t,n]=v.useState(),r=v.useRef({}),a=v.useRef(e),o=v.useRef("none"),i=e?"mounted":"unmounted",[s,c]=Kee(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect((()=>{const e=Xv(r.current);o.current="mounted"===s?e:"none"}),[s]),ew((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=Xv(t);e?c("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?c("UNMOUNT"):c(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),a.current=e}}),[e,c]),ew((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=Xv(r.current).includes(o.animationName);if(o.target===t&&i&&(c("ANIMATION_END"),!a.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&&(o.current=Xv(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function Xv(e){return(null==e?void 0:e.animationName)||"none"}function Yee(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;return a?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}bk.displayName="Presence";var OE=0;function Zee(){v.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??vz()),document.body.insertAdjacentElement("beforeend",e[1]??vz()),OE++,()=>{1===OE&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),OE--}}),[])}function vz(){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 sL=y7(),zE=function(){},wk=v.forwardRef((function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:zE,onWheelCapture:zE,onTouchMoveCapture:zE}),a=r[0],o=r[1],i=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,d=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,y=e.as,g=void 0===y?"div":y,b=e.gapMode,_=lA(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,k=g7([n,t]),x=Oo(Oo({},_),a);return v.createElement(v.Fragment,null,u&&v.createElement(w,{sideCar:sL,removeScrollBar:l,shards:f,noIsolation:p,inert:h,setCallbacks:o,allowPinchZoom:!!m,lockRef:n,gapMode:b}),i?v.cloneElement(v.Children.only(s),Oo(Oo({},x),{ref:k})):v.createElement(g,Oo({},x,{className:c,ref:k}),s))}));wk.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},wk.classNames={fullWidth:Iy,zeroRight:Ty};var PC=!1;if(typeof window<"u")try{var Jv=Object.defineProperty({},"passive",{get:function(){return PC=!0,!0}});window.addEventListener("test",Jv,Jv),window.removeEventListener("test",Jv,Jv)}catch{PC=!1}var Jg=!!PC&&{passive:!1},Xee=function(e){return"TEXTAREA"===e.tagName},cL=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!Xee(e)&&"visible"===n[t])},Jee=function(e){return cL(e,"overflowY")},ete=function(e){return cL(e,"overflowX")},bz=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),lL(e,r)){var a=fL(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},tte=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},nte=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},lL=function(e,t){return"v"===e?Jee(t):ete(t)},fL=function(e,t){return"v"===e?tte(t):nte(t)},rte=function(e,t){return"h"===e&&"rtl"===t?-1:1},ate=function(e,t,n,r,a){var o=rte(e,window.getComputedStyle(t).direction),i=o*r,s=n.target,c=t.contains(s),l=!1,u=i>0,f=0,d=0;do{var p=fL(e,s),h=p[0],m=p[1]-p[2]-o*h;(h||m)&&lL(e,s)&&(f+=m,d+=h),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(Math.abs(f)<1||!a)||!u&&(Math.abs(d)<1||!a))&&(l=!0),l},eb=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wz=function(e){return[e.deltaX,e.deltaY]},kz=function(e){return e&&"current"in e?e.current:e},ote=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ite=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ste=0,e1=[];function cte(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),a=v.useState(ste++)[0],o=v.useState(fA)[0],i=v.useRef(e);v.useEffect((function(){i.current=e}),[e]),v.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=m7([e.lockRef.current],(e.shards||[]).map(kz),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=eb(e),s=n.current,c="deltaX"in e?e.deltaX:s[0]-o[0],l="deltaY"in e?e.deltaY:s[1]-o[1],u=e.target,f=Math.abs(c)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===f&&"range"===u.type)return!1;var d=bz(f,u);if(!d)return!0;if(d?a=f:(a="v"===f?"h":"v",d=bz(f,u)),!d)return!1;if(!r.current&&"changedTouches"in e&&(c||l)&&(r.current=a),!a)return!0;var p=r.current||a;return ate(p,t,e,"h"===p?c:l,!0)}),[]),c=v.useCallback((function(e){var n=e;if(e1.length&&e1[e1.length-1]===o){var r="deltaY"in n?wz(n):eb(n),a=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ote(e.delta,r)}))[0];if(a&&a.should)return void(n.cancelable&&n.preventDefault());if(!a){var c=(i.current.shards||[]).map(kz).filter(Boolean).filter((function(e){return e.contains(n.target)}));(c.length>0?s(n,c[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),l=v.useCallback((function(e,n,r,a){var o={name:e,delta:n,target:r,should:a,shadowParent:lte(r)};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),u=v.useCallback((function(e){n.current=eb(e),r.current=void 0}),[]),f=v.useCallback((function(t){l(t.type,wz(t),t.target,s(t,e.lockRef.current))}),[]),d=v.useCallback((function(t){l(t.type,eb(t),t.target,s(t,e.lockRef.current))}),[]);v.useEffect((function(){return e1.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Jg),document.addEventListener("touchmove",c,Jg),document.addEventListener("touchstart",u,Jg),function(){e1=e1.filter((function(e){return e!==o})),document.removeEventListener("wheel",c,Jg),document.removeEventListener("touchmove",c,Jg),document.removeEventListener("touchstart",u,Jg)}}),[]);var p=e.removeScrollBar,h=e.inert;return v.createElement(v.Fragment,null,h?v.createElement(o,{styles:ite(a)}):null,p?v.createElement(w7,{gapMode:e.gapMode}):null)}function lte(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fte=v7(sL,cte);var uL=v.forwardRef((function(e,t){return v.createElement(wk,Oo({},e,{ref:t,sideCar:fte}))}));uL.classNames=wk.classNames;var jA="Dialog",[dL,VWe]=vee(jA),[ute,Uc]=dL(jA),pL=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,s=v.useRef(null),c=v.useRef(null),[l=!1,u]=xee({prop:r,defaultProp:a,onChange:o});return B.jsx(ute,{scope:t,triggerRef:s,contentRef:c,contentId:IE(),titleId:IE(),descriptionId:IE(),open:l,onOpenChange:u,onOpenToggle:v.useCallback((()=>u((e=>!e))),[u]),modal:i,children:n})};pL.displayName=jA;var hL="DialogTrigger",mL=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uc(hL,n),o=Im(t,a.triggerRef);return B.jsx(Eu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":VA(a.open),...r,ref:o,onClick:gp(e.onClick,a.onOpenToggle)})}));mL.displayName=hL;var FA="DialogPortal",[dte,gL]=dL(FA,{forceMount:void 0}),yL=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=Uc(FA,t);return B.jsx(dte,{scope:t,forceMount:n,children:v.Children.map(r,(e=>B.jsx(bk,{present:n||o.open,children:B.jsx(iL,{asChild:!0,container:a,children:e})})))})};yL.displayName=FA;var tw="DialogOverlay",_L=v.forwardRef(((e,t)=>{const n=gL(tw,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Uc(tw,e.__scopeDialog);return o.modal?B.jsx(bk,{present:r||o.open,children:B.jsx(hte,{...a,ref:t})}):null}));_L.displayName=tw;var pte=eL("DialogOverlay.RemoveScroll"),hte=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uc(tw,n);return B.jsx(uL,{as:pte,allowPinchZoom:!0,shards:[a.contentRef],children:B.jsx(Eu.div,{"data-state":VA(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),vm="DialogContent",vL=v.forwardRef(((e,t)=>{const n=gL(vm,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Uc(vm,e.__scopeDialog);return B.jsx(bk,{present:r||o.open,children:o.modal?B.jsx(mte,{...a,ref:t}):B.jsx(gte,{...a,ref:t})})}));vL.displayName=vm;var mte=v.forwardRef(((e,t)=>{const n=Uc(vm,e.__scopeDialog),r=v.useRef(null),a=Im(t,n.contentRef,r);return v.useEffect((()=>{const e=r.current;if(e)return ak(e)}),[]),B.jsx(bL,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gp(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:gp(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:gp(e.onFocusOutside,(e=>e.preventDefault()))})})),gte=v.forwardRef(((e,t)=>{const n=Uc(vm,e.__scopeDialog),r=v.useRef(!1),a=v.useRef(!1);return B.jsx(bL,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;null==(o=e.onCloseAutoFocus)||o.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),bL=v.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,s=Uc(vm,n),c=v.useRef(null),l=Im(t,c);return Zee(),B.jsxs(B.Fragment,{children:[B.jsx(aL,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:B.jsx(nL,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":VA(s.open),...i,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),B.jsxs(B.Fragment,{children:[B.jsx(yte,{titleId:s.titleId}),B.jsx(vte,{contentRef:c,descriptionId:s.descriptionId})]})]})})),BA="DialogTitle",wL=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uc(BA,n);return B.jsx(Eu.h2,{id:a.titleId,...r,ref:t})}));wL.displayName=BA;var kL="DialogDescription",xL=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uc(kL,n);return B.jsx(Eu.p,{id:a.descriptionId,...r,ref:t})}));xL.displayName=kL;var SL="DialogClose",EL=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uc(SL,n);return B.jsx(Eu.button,{type:"button",...r,ref:t,onClick:gp(e.onClick,(()=>a.onOpenChange(!1)))})}));function VA(e){return e?"open":"closed"}EL.displayName=SL;var CL="DialogTitleWarning",[UWe,RL]=_ee(CL,{contentName:vm,titleName:BA,docsSlug:"dialog"}),yte=({titleId:e})=>{const t=RL(CL),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 v.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},_te="DialogDescriptionWarning",vte=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${RL(_te).contentName}}.`;return v.useEffect((()=>{var r;const a=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))}),[n,e,t]),null},bte=pL,wte=mL,kte=yL,xte=_L,Ste=vL,Ete=wL,Cte=xL,Rte=EL;function Ate(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 AL=ze.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}),G1=()=>{const e=ze.useContext(AL);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Ate("[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 Tte=24,Ite=typeof window<"u"?v.useLayoutEffect:v.useEffect;function xz(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function Pte(){return UA(/^Mac/)}function $te(){return UA(/^iPhone/)}function Sz(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Ote(){return UA(/^iPad/)||Pte()&&navigator.maxTouchPoints>1}function TL(){return $te()||Ote()}function UA(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const ME=typeof document<"u"&&window.visualViewport;function Ez(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function IL(e){for(Ez(e)&&(e=e.parentElement);e&&!Ez(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const zte=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let DE,tb=0;function Mte(e={}){let{isDisabled:t}=e;Ite((()=>{if(!t)return tb++,1===tb&&TL()&&(DE=Dte()),()=>{tb--,0===tb&&(null==DE||DE())}}),[t])}function Dte(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,a=xz(Nte(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let o=xz(ay(document,"touchstart",(n=>{e=IL(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),ay(document,"touchmove",(n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,a=e.scrollTop,o=e.scrollHeight-e.clientHeight;0!==o&&((a<=0&&r>t||a>=o&&r<t)&&n.preventDefault(),t=r)}),{passive:!1,capture:!0}),ay(document,"touchend",(e=>{let t=e.target;$C(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),ay(document,"focus",(e=>{let t=e.target;$C(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",ME&&(ME.height<window.innerHeight?requestAnimationFrame((()=>{Cz(t)})):ME.addEventListener("resize",(()=>Cz(t)),{once:!0}))})))}),!0),ay(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{a(),o(),window.scrollTo(n,r)}}function Nte(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function ay(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Cz(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=IL(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 $C(e){return e instanceof HTMLInputElement&&!zte.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Lte(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function jte(...e){return t=>e.forEach((e=>Lte(e,t)))}function PL(...e){return v.useCallback(jte(...e),e)}const $L=new WeakMap;function Sa(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&&$L.set(e,r)}function Fte(e,t){if(!(e&&e instanceof HTMLElement))return;let n=$L.get(e);n&&(e.style[t]=n[t])}const Ea=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function nb(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let a=r.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[Ea(t)?13:12]):(a=r.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[Ea(t)?5:4]):null)}function Bte(e){return 8*(Math.log(e+1)-2)}function NE(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Vte(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const _r={DURATION:.5,EASE:[.32,.72,0,1]},OL=.4,Ute=.25,qte=100,zL=8,Kh=16,OC=26,LE="vaul-dragging";function ML(e){const t=ze.useRef(e);return ze.useEffect((()=>{t.current=e})),ze.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function Wte({defaultProp:e,onChange:t}){const n=ze.useState(e),[r]=n,a=ze.useRef(r),o=ML(t);return ze.useEffect((()=>{a.current!==r&&(o(r),a.current=r)}),[r,a,o]),n}function DL({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=Wte({defaultProp:t,onChange:n}),o=void 0!==e,i=o?e:r,s=ML(n);return[i,ze.useCallback((t=>{if(o){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)}),[o,e,a,s])]}function Hte({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:o,onSnapPointChange:i,direction:s="bottom",container:c,snapToSequentialPoint:l}){const[u,f]=DL({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[d,p]=ze.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);ze.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const h=ze.useMemo((()=>u===(null==n?void 0:n[n.length-1])||null),[n,u]),m=ze.useMemo((()=>null==n?void 0:n.findIndex((e=>e===u))),[n,u]),y=n&&n.length>0&&(o||0===o)&&!Number.isNaN(o)&&n[o]===u||!n,g=ze.useMemo((()=>{const e=c?{width:c.getBoundingClientRect().width,height:c.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)),Ea(s)){const a=n?r:d?t*e.height:0;return d?"bottom"===s?e.height-a:-e.height+a:a}const a=n?r:d?t*e.width:0;return d?"right"===s?e.width-a:-e.width+a:a})))?t:[]}),[n,d,c]),v=ze.useMemo((()=>null!==m?null==g?void 0:g[m]:null),[g,m]),b=ze.useCallback((e=>{var t;const c=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;i(c),Sa(r.current,{transition:`transform ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`,transform:Ea(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&c!==g.length-1&&c!==o&&c<o?Sa(a.current,{transition:`opacity ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`,opacity:"0"}):Sa(a.current,{transition:`opacity ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`,opacity:"1"}),f(null==n?void 0:n[Math.max(c,0)])}),[r.current,n,g,o,a,f]);return ze.useEffect((()=>{if(u||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===u)))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&b(g[r])}}),[u,e,n,g,b]),{isLastSnapPoint:h,activeSnapPoint:u,shouldFade:y,getPercentageDragged:function(e,t){if(!n||"number"!=typeof m||!g||void 0===o)return null;const r=m===o-1;if(m>=o&&t)return 0;if(r&&!t)return 1;if(!y&&!r)return null;const a=r?m+1:m-1,i=r?g[a]-g[a-1]:g[a+1]-g[a],s=e/Math.abs(i);return r?1-s:s},setActiveSnapPoint:f,activeSnapPointIndex:m,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:i}){if(void 0===o)return;const c="bottom"===s||"right"===s?(v??0)-e:(v??0)+e,u=0===m,f=e>0;if(m===o-1&&Sa(a.current,{transition:`opacity ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`}),!l&&r>2&&!f)return void(i?t():b(g[0]));if(!l&&r>2&&f&&g&&n)return void b(g[n.length-1]);const d=null==g?void 0:g.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-c)<Math.abs(e-c)?t:e)),p=Ea(s)?window.innerHeight:window.innerWidth;if(r>OL&&Math.abs(e)<.4*p){const e=f?1:-1;if(e>0&&h)return void b(g[n.length-1]);if(u&&e<0&&i&&t(),null===m)return;b(g[m+e])}else b(d)},onDrag:function({draggedDistance:e}){if(null===v)return;const t="bottom"===s||"right"===s?v-e:v+e;("bottom"===s||"right"===s)&&t<g[g.length-1]||("top"===s||"left"===s)&&t>g[g.length-1]||Sa(r.current,{transform:Ea(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}const Gte=()=>()=>{};function Kte(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=G1(),o=ze.useRef(null),i=v.useMemo((()=>document.body.style.backgroundColor),[]);function s(){return(window.innerWidth-26)/window.innerWidth}ze.useEffect((()=>{if(t&&n){o.current&&clearTimeout(o.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;Vte(r&&!a?NE(document.body,{background:"black"}):Gte,NE(t,{transformOrigin:Ea(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${_r.DURATION}s`,transitionTimingFunction:`cubic-bezier(${_r.EASE.join(",")})`}));const n=NE(t,{borderRadius:"8px",overflow:"hidden",...Ea(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(),o.current=window.setTimeout((()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")}),1e3*_r.DURATION)}}}),[t,n,i])}let oy=null;function Qte({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:a,noBodyStyles:o}){const[i,s]=ze.useState((()=>typeof window<"u"?window.location.href:"")),c=ze.useRef(0),l=ze.useCallback((()=>{if(Sz()&&null===oy&&e&&!o){oy={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:-c.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=-(c.current+e)+"px")}))),300)}}),[e]),u=ze.useCallback((()=>{if(Sz()&&null!==oy&&!o){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,oy),window.requestAnimationFrame((()=>{a&&i!==window.location.href?s(window.location.href):window.scrollTo(t,e)})),oy=null}}),[i]);return ze.useEffect((()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),ze.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&l(),t||window.setTimeout((()=>{u()}),500)):u())}),[e,r,i,t,n,l,u]),{restorePositionSetting:u}}function NL({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:a,snapPoints:o,shouldScaleBackground:i=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=Ute,scrollLockTimeout:l=100,dismissible:u=!0,handleOnly:f=!1,fadeFromIndex:d=o&&o.length-1,activeSnapPoint:p,setActiveSnapPoint:h,fixed:m,modal:y=!0,onClose:g,nested:v,noBodyStyles:b,direction:_="bottom",defaultOpen:w=!1,disablePreventScroll:k=!0,snapToSequentialPoint:x=!1,preventScrollRestoration:S=!1,repositionInputs:E=!0,onAnimationEnd:A,container:z,autoFocus:C=!1}){var I,T;const[R=!1,P]=DL({defaultProp:w,prop:e,onChange:e=>{null==t||t(e),!e&&!v&&ce(),setTimeout((()=>{null==A||A(e)}),1e3*_r.DURATION),e&&!y&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[j,O]=ze.useState(!1),[N,M]=ze.useState(!1),[D,B]=ze.useState(!1),L=ze.useRef(null),V=ze.useRef(null),q=ze.useRef(null),F=ze.useRef(null),U=ze.useRef(null),$=ze.useRef(!1),W=ze.useRef(null),H=ze.useRef(0),G=ze.useRef(!1),Q=ze.useRef(0),K=ze.useRef(null),Y=ze.useRef((null==(I=K.current)?void 0:I.getBoundingClientRect().height)||0),Z=ze.useRef((null==(T=K.current)?void 0:T.getBoundingClientRect().width)||0),X=ze.useRef(0),J=ze.useCallback((e=>{o&&e===ae.length-1&&(V.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:ae,onDrag:oe,shouldFade:ie,getPercentageDragged:se}=Hte({snapPoints:o,activeSnapPointProp:p,setActiveSnapPointProp:h,drawerRef:K,fadeFromIndex:d,overlayRef:L,onSnapPointChange:J,direction:_,container:z,snapToSequentialPoint:x});Mte({isDisabled:!R||N||!y||D||!j||!E||!k});const{restorePositionSetting:ce}=Qte({isOpen:R,modal:y,nested:v,hasBeenOpened:j,preventScrollRestoration:S,noBodyStyles:b});function le(){return(window.innerWidth-26)/window.innerWidth}function ue(e,t){var n,r;let a=e;const o=null==(n=window.getSelection())?void 0:n.toString(),i=K.current?nb(K.current,_):null,s=new Date;if(a.hasAttribute("data-vaul-no-drag")||a.closest("[data-vaul-no-drag]"))return!1;if("right"===_||"left"===_)return!0;if(V.current&&s.getTime()-V.current.getTime()<500)return!1;if(null!==i&&("bottom"===_?i>0:i<0))return!0;if(o&&o.length>0)return!1;if(s.getTime()-(null==(r=U.current)?void 0:r.getTime())<l&&0===i||t)return U.current=s,!1;for(;a;){if(a.scrollHeight>a.clientHeight){if(0!==a.scrollTop)return U.current=new Date,!1;if("dialog"===a.getAttribute("role"))return!0}a=a.parentNode}return!0}function fe(e){!N||!K.current||(K.current.classList.remove(LE),$.current=!1,M(!1),F.current=new Date),null==g||g(),e||P(!1),setTimeout((()=>{o&&ne(o[0])}),1e3*_r.DURATION)}function de(){if(!K.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=nb(K.current,_);Sa(K.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`}),Sa(L.current,{transition:`opacity ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`,opacity:"1"}),i&&t&&t>0&&R&&Sa(e,{borderRadius:"8px",overflow:"hidden",...Ea(_)?{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:`${_r.DURATION}s`,transitionTimingFunction:`cubic-bezier(${_r.EASE.join(",")})`},!0)}return ze.useEffect((()=>{var e;function t(){if(!K.current||!E)return;if($C(document.activeElement)||G.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const a=K.current.getBoundingClientRect().height||0,i=a>.8*n;X.current||(X.current=a);const s=K.current.getBoundingClientRect().top;if(Math.abs(Q.current-r)>60&&(G.current=!G.current),o&&o.length>0&&ae&&te){r+=ae[te]||0}if(Q.current=r,a>t||G.current){const e=K.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?s:26)),K.current.style.height=m?e-Math.max(r,0)+"px":`${Math.max(n,t-s)}px`}else K.current.style.height=`${X.current}px`;o&&o.length>0&&!G.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,o,ae]),ze.useEffect((()=>(R&&(Sa(document.documentElement,{scrollBehavior:"auto"}),V.current=new Date),()=>{Fte(document.documentElement,"scrollBehavior")})),[R]),ze.createElement(bte,{defaultOpen:w,onOpenChange:e=>{!u&&!e||(e?O(!0):fe(!0),P(e))},open:R},ze.createElement(AL.Provider,{value:{activeSnapPoint:ee,snapPoints:o,setActiveSnapPoint:ne,drawerRef:K,overlayRef:L,onOpenChange:t,onPress:function(e){var t,n;!u&&!o||K.current&&!K.current.contains(e.target)||(Y.current=(null==(t=K.current)?void 0:t.getBoundingClientRect().height)||0,Z.current=(null==(n=K.current)?void 0:n.getBoundingClientRect().width)||0,M(!0),q.current=new Date,TL()&&window.addEventListener("touchend",(()=>$.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),H.current=Ea(_)?e.pageY:e.pageX)},onRelease:function(e){if(!N||!K.current)return;K.current.classList.remove(LE),$.current=!1,M(!1),F.current=new Date;const t=nb(K.current,_);if(!ue(e.target,!1)||!t||Number.isNaN(t)||null===q.current)return;const n=F.current.getTime()-q.current.getTime(),r=H.current-(Ea(_)?e.pageY:e.pageX),i=Math.abs(r)/n;if(i>.05&&(B(!0),setTimeout((()=>{B(!1)}),200)),o)return re({draggedDistance:r*("bottom"===_||"right"===_?1:-1),closeDrawer:fe,velocity:i,dismissible:u}),void(null==a||a(e,!0));if("bottom"===_||"right"===_?r>0:r<0)return de(),void(null==a||a(e,!0));if(i>OL)return fe(),void(null==a||a(e,!1));var s;const l=Math.min(null!=(s=K.current.getBoundingClientRect().height)?s:0,window.innerHeight);var f;const d=Math.min(null!=(f=K.current.getBoundingClientRect().width)?f:0,window.innerWidth),p="left"===_||"right"===_;if(Math.abs(t)>=(p?d:l)*c)return fe(),void(null==a||a(e,!1));null==a||a(e,!0),de()},onDrag:function(e){if(K.current&&N){const t="bottom"===_||"right"===_?1:-1,n=(H.current-(Ea(_)?e.pageY:e.pageX))*t,a=n>0,s=o&&!u&&!a;if(s&&0===te)return;const c=Math.abs(n),l=document.querySelector("[data-vaul-drawer-wrapper]");let f=c/("bottom"===_||"top"===_?Y.current:Z.current);const p=se(c,a);if(null!==p&&(f=p),s&&f>=1||!$.current&&!ue(e.target,a))return;if(K.current.classList.add(LE),$.current=!0,Sa(K.current,{transition:"none"}),Sa(L.current,{transition:"none"}),o&&oe({draggedDistance:n}),a&&!o){const e=Bte(n),r=Math.min(-1*e,0)*t;return void Sa(K.current,{transform:Ea(_)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const h=1-f;if((ie||d&&te===d-1)&&(null==r||r(e,f),Sa(L.current,{opacity:`${h}`,transition:"none"},!0)),l&&L.current&&i){const e=Math.min(le()+f*(1-le()),1),t=8-8*f,n=Math.max(0,14-14*f);Sa(l,{borderRadius:`${t}px`,transform:Ea(_)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!o){const e=c*t;Sa(K.current,{transform:Ea(_)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:u,handleOnly:f,isOpen:R,isDragging:N,shouldFade:ie,closeDrawer:fe,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),a=16*t-16;Sa(K.current,{transform:Ea(_)?`scale(${r}) translate3d(0, ${a}px, 0)`:`scale(${r}) translate3d(${a}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),Sa(K.current,{transition:`transform ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&K.current&&(W.current=setTimeout((()=>{const e=nb(K.current,_);Sa(K.current,{transition:"none",transform:Ea(_)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Ea(_)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,a=t?-16:0;t&&Sa(K.current,{transition:`transform ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`,transform:Ea(_)?`scale(${r}) translate3d(0, ${a}px, 0)`:`scale(${r}) translate3d(${a}px, 0, 0)`})},keyboardIsOpen:G,modal:y,snapPointsOffset:ae,direction:_,shouldScaleBackground:i,setBackgroundColorOnScale:s,noBodyStyles:b,container:z,autoFocus:C}},n))}const LL=ze.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:a,shouldFade:o,isOpen:i,modal:s}=G1(),c=PL(t,n),l=r&&r.length>0;return s?ze.createElement(xte,{onMouseUp:a,ref:c,"data-vaul-overlay":"","data-vaul-snap-points":i&&l?"true":"false","data-vaul-snap-points-overlay":i&&o?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));LL.displayName="Drawer.Overlay";const jL=ze.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},a){const{drawerRef:o,onPress:i,onRelease:s,onDrag:c,keyboardIsOpen:l,snapPointsOffset:u,modal:f,isOpen:d,direction:p,snapPoints:h,container:m,handleOnly:y,autoFocus:g}=G1(),[v,b]=ze.useState(!1),_=PL(a,o),w=ze.useRef(null),k=ze.useRef(null),x=ze.useRef(!1),S=h&&h.length>0;Kte();function E(e){w.current=null,x.current=!1,s(e)}return ze.useEffect((()=>{S&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),ze.createElement(Ste,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":v?"true":"false","data-vaul-snap-points":d&&S?"true":"false","data-vaul-custom-container":m?"true":"false",...r,ref:_,style:u&&u.length>0?{"--snap-point-height":`${u[0]}px`,...t}:t,onPointerDown:e=>{y||(null==r.onPointerDown||r.onPointerDown.call(r,e),w.current={x:e.pageX,y:e.pageY},i(e))},onOpenAutoFocus:e=>{null==n||n(e),g||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),f&&!t.defaultPrevented?l.current&&(l.current=!1):t.preventDefault()},onFocusOutside:e=>{f||e.preventDefault()},onPointerMove:e=>{if(k.current=e,y||(null==r.onPointerMove||r.onPointerMove.call(r,e),!w.current))return;const t=e.pageY-w.current.y,n=e.pageX-w.current.x,a="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(x.current)return!0;const r=Math.abs(e.y),a=Math.abs(e.x),o=a>r,i=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*i<0)&&a>=0&&a<=n)return o}else if(!(e.y*i<0)&&r>=0&&r<=n)return!o;return x.current=!0,!0})({x:n,y:t},p,a)?c(e):(Math.abs(n)>a||Math.abs(t)>a)&&(w.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),w.current=null,x.current=!1,s(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),E(k.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),E(k.current)}})}));jL.displayName="Drawer.Content";const Yte=250,Zte=120,FL=ze.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:a,isDragging:o,snapPoints:i,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:l,handleOnly:u,isOpen:f,onPress:d,onDrag:p}=G1(),h=ze.useRef(null),m=ze.useRef(!1);function y(){window.clearTimeout(h.current),m.current=!1}return ze.createElement("div",{onClick:function(){m.current?y():window.setTimeout((()=>{!function(){if(o||e||m.current)return void y();if(y(),(!i||0===i.length)&&l)return void a();if(s===i[i.length-1]&&l)return void a();const t=i.findIndex((e=>e===s));if(-1===t)return;const n=i[t+1];c(n)}()}),120)},onPointerCancel:y,onPointerDown:e=>{u&&d(e),h.current=window.setTimeout((()=>{m.current=!0}),250)},onPointerMove:e=>{u&&p(e)},ref:r,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},ze.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function Xte({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:a,onNestedRelease:o}=G1();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return ze.createElement(NL,{nested:!0,onClose:()=>{a(!1)},onDrag:(t,n)=>{r(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&a(e)},onRelease:o,...n})}function Jte(e){const t=G1(),{container:n=t.container,...r}=e;return ze.createElement(kte,{container:n,...r})}FL.displayName="Drawer.Handle";const zp={Root:NL,NestedRoot:Xte,Content:jL,Overlay:LL,Trigger:wte,Portal:Jte,Handle:FL,Close:Rte,Title:Ete,Description:Cte},ene=zp.Portal,BL=v.forwardRef((({className:e,...t},n)=>B.jsx(zp.Overlay,{ref:n,className:$e("fixed inset-0 z-50 bg-black/5",e),...t})));BL.displayName=zp.Overlay.displayName;const tne=v.forwardRef((({className:e,children:t,direction:n="bottom",...r},a)=>B.jsxs(ene,{children:[B.jsx(BL,{}),B.jsxs(zp.Content,{ref:a,className:$e("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&&B.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));tne.displayName="DrawerContent";const nne=v.forwardRef((({className:e,...t},n)=>B.jsx(zp.Title,{ref:n,className:$e("text-lg font-semibold leading-none tracking-tight",e),...t})));nne.displayName=zp.Title.displayName;const rne=v.forwardRef((({className:e,...t},n)=>B.jsx(zp.Description,{ref:n,className:$e("text-sm text-muted-foreground",e),...t})));function qA(e){const t=e+"CollectionProvider",[n,r]=ii(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e+"CollectionSlot",s=e+"CollectionItemSlot",c="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=ze.useRef(null),o=ze.useRef(new Map).current;return ze.createElement(a,{scope:t,itemMap:o,collectionRef:r},n)},Slot:ze.forwardRef(((e,t)=>{const{scope:n,children:r}=e,a=yn(t,o(i,n).collectionRef);return ze.createElement(hm,{ref:a},r)})),ItemSlot:ze.forwardRef(((e,t)=>{const{scope:n,children:r,...a}=e,i=ze.useRef(null),l=yn(t,i),u=o(s,n);return ze.useEffect((()=>(u.itemMap.set(i,{ref:i,...a}),()=>{u.itemMap.delete(i)}))),ze.createElement(hm,{[c]:"",ref:l},r)}))},function(t){const n=o(e+"CollectionConsumer",t);return ze.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${c}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}rne.displayName=zp.Description.displayName;const ane=v.createContext(void 0);function WA(e){const t=v.useContext(ane);return e||t||"ltr"}const one=["top","right","bottom","left"],xp=Math.min,ts=Math.max,nw=Math.round,rb=Math.floor,Sp=e=>({x:e,y:e}),ine={left:"right",right:"left",bottom:"top",top:"bottom"},sne={start:"end",end:"start"};function zC(e,t,n){return ts(e,xp(t,n))}function vu(e,t){return"function"==typeof e?e(t):e}function bu(e){return e.split("-")[0]}function K1(e){return e.split("-")[1]}function HA(e){return"x"===e?"y":"x"}function GA(e){return"y"===e?"height":"width"}function Ep(e){return["top","bottom"].includes(bu(e))?"y":"x"}function KA(e){return HA(Ep(e))}function cne(e,t,n){void 0===n&&(n=!1);const r=K1(e),a=KA(e),o=GA(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=rw(i)),[i,rw(i)]}function lne(e){const t=rw(e);return[MC(e),t,MC(t)]}function MC(e){return e.replace(/start|end/g,(e=>sne[e]))}function fne(e,t,n){const r=["left","right"],a=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?o:i;default:return[]}}function une(e,t,n,r){const a=K1(e);let o=fne(bu(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(MC)))),o}function rw(e){return e.replace(/left|right|bottom|top/g,(e=>ine[e]))}function dne(e){return{top:0,right:0,bottom:0,left:0,...e}}function VL(e){return"number"!=typeof e?dne(e):{top:e,right:e,bottom:e,left:e}}function aw(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function Rz(e,t,n){let{reference:r,floating:a}=e;const o=Ep(t),i=KA(t),s=GA(i),c=bu(t),l="y"===o,u=r.x+r.width/2-a.width/2,f=r.y+r.height/2-a.height/2,d=r[s]/2-a[s]/2;let p;switch(c){case"top":p={x:u,y:r.y-a.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-a.width,y:f};break;default:p={x:r.x,y:r.y}}switch(K1(t)){case"start":p[i]-=d*(n&&l?-1:1);break;case"end":p[i]+=d*(n&&l?-1:1)}return p}const pne=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=o.filter(Boolean),c=await(null==i.isRTL?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:f}=Rz(l,r,c),d=r,p={},h=0;for(let n=0;n<s.length;n++){const{name:o,fn:m}=s[n],{x:y,y:g,data:v,reset:b}=await m({x:u,y:f,initialPlacement:r,placement:d,strategy:a,middlewareData:p,rects:l,platform:i,elements:{reference:e,floating:t}});u=y??u,f=g??f,p={...p,[o]:{...p[o],...v}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(l=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:u,y:f}=Rz(l,d,c))),n=-1)}return{x:u,y:f,placement:d,strategy:a,middlewareData:p}};async function n_(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=vu(t,e),h=VL(p),m=s[d?"floating"===f?"reference":"floating":f],y=aw(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),g="floating"===f?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),b=await(null==o.isElement?void 0:o.isElement(v))&&await(null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},_=aw(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:v,strategy:c}):g);return{top:(y.top-_.top+h.top)/b.y,bottom:(_.bottom-y.bottom+h.bottom)/b.y,left:(y.left-_.left+h.left)/b.x,right:(_.right-y.right+h.right)/b.x}}const hne=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=vu(e,t)||{};if(null==l)return{};const f=VL(u),d={x:n,y:r},p=KA(a),h=GA(p),m=await i.getDimensions(l),y="y"===p,g=y?"top":"left",v=y?"bottom":"right",b=y?"clientHeight":"clientWidth",_=o.reference[h]+o.reference[p]-d[p]-o.floating[h],w=d[p]-o.reference[p],k=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l));let x=k?k[b]:0;(!x||!await(null==i.isElement?void 0:i.isElement(k)))&&(x=s.floating[b]||o.floating[h]);const S=_/2-w/2,E=x/2-m[h]/2-1,A=xp(f[g],E),z=xp(f[v],E),C=A,I=x-m[h]-z,T=x/2-m[h]/2+S,R=zC(C,T,I),P=!c.arrow&&null!=K1(a)&&T!==R&&o.reference[h]/2-(T<C?A:z)-m[h]/2<0,j=P?T<C?T-C:T-I:0;return{[p]:d[p]+j,data:{[p]:R,centerOffset:T-R-j,...P&&{alignmentOffset:j}},reset:P}}}),mne=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=vu(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const g=bu(a),v=Ep(s),b=bu(s)===s,_=await(null==c.isRTL?void 0:c.isRTL(l.floating)),w=d||(b||!m?[rw(s)]:lne(s)),k="none"!==h;!d&&k&&w.push(...une(s,m,h,_));const x=[s,...w],S=await n_(t,y),E=[];let A=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&E.push(S[g]),f){const e=cne(a,i,_);E.push(S[e[0]],S[e[1]])}if(A=[...A,{placement:a,overflows:E}],!E.every((e=>e<=0))){var z,C;const e=((null==(z=o.flip)?void 0:z.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(C=A.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!n)switch(p){case"bestFit":{var I;const e=null==(I=A.filter((e=>{if(k){const t=Ep(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:I[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}};function Az(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Tz(e){return one.some((t=>e[t]>=0))}const gne=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=vu(e,t);switch(r){case"referenceHidden":{const e=Az(await n_(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Tz(e)}}}case"escaped":{const e=Az(await n_(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Tz(e)}}}default:return{}}}}};async function yne(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=bu(n),s=K1(n),c="y"===Ep(n),l=["left","top"].includes(i)?-1:1,u=o&&c?-1:1,f=vu(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),c?{x:p*u,y:d*l}:{x:d*l,y:p*u}}const _ne=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:s}=t,c=await yne(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:a+c.x,y:o+c.y,data:{...c,placement:i}}}}},vne=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=vu(e,t),l={x:n,y:r},u=await n_(t,c),f=Ep(bu(a)),d=HA(f);let p=l[d],h=l[f];if(o){const e="y"===d?"bottom":"right";p=zC(p+u["y"===d?"top":"left"],p,p-u[e])}if(i){const e="y"===f?"bottom":"right";h=zC(h+u["y"===f?"top":"left"],h,h-u[e])}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:o,[f]:i}}}}}},bne=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=vu(e,t),u={x:n,y:r},f=Ep(a),d=HA(f);let p=u[d],h=u[f];const m=vu(s,t),y="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const e="y"===d?"height":"width",t=o.reference[d]-o.floating[e]+y.mainAxis,n=o.reference[d]+o.reference[e]-y.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var g,v;const e="y"===d?"width":"height",t=["top","left"].includes(bu(a)),n=o.reference[f]-o.floating[e]+(t&&(null==(g=i.offset)?void 0:g[f])||0)+(t?0:y.crossAxis),r=o.reference[f]+o.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[f])||0)-(t?y.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[d]:p,[f]:h}}}},wne=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:i,elements:s}=t,{apply:c=()=>{},...l}=vu(e,t),u=await n_(t,l),f=bu(a),d=K1(a),p="y"===Ep(a),{width:h,height:m}=o.floating;let y,g;"top"===f||"bottom"===f?(y=f,g=d===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=f,y="end"===d?"top":"bottom");const v=m-u.top-u.bottom,b=h-u.left-u.right,_=xp(m-u[y],v),w=xp(h-u[g],b),k=!t.middlewareData.shift;let x=_,S=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(x=v),k&&!d){const e=ts(u.left,0),t=ts(u.right,0),n=ts(u.top,0),r=ts(u.bottom,0);p?S=h-2*(0!==e||0!==t?e+t:ts(u.left,u.right)):x=m-2*(0!==n||0!==r?n+r:ts(u.top,u.bottom))}await c({...t,availableWidth:S,availableHeight:x});const E=await i.getDimensions(s.floating);return h!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function kk(){return typeof window<"u"}function Cp(e){return UL(e)?(e.nodeName||"").toLowerCase():"#document"}function ns(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Cu(e){var t;return null==(t=(UL(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function UL(e){return!!kk()&&(e instanceof Node||e instanceof ns(e).Node)}function Ul(e){return!!kk()&&(e instanceof Element||e instanceof ns(e).Element)}function ql(e){return!!kk()&&(e instanceof HTMLElement||e instanceof ns(e).HTMLElement)}function Iz(e){return!(!kk()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof ns(e).ShadowRoot)}function q_(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Us(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function kne(e){return["table","td","th"].includes(Cp(e))}function xne(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function QA(e){const t=YA(),n=Ul(e)?Us(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 qL(e){let t=R1(e);for(;ql(t)&&!xk(t);){if(QA(t))return t;if(xne(t))return null;t=R1(t)}return null}function YA(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function xk(e){return["html","body","#document"].includes(Cp(e))}function Us(e){return ns(e).getComputedStyle(e)}function Sk(e){return Ul(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function R1(e){if("html"===Cp(e))return e;const t=e.assignedSlot||e.parentNode||Iz(e)&&e.host||Cu(e);return Iz(t)?t.host:t}function WL(e){const t=R1(e);return xk(t)?e.ownerDocument?e.ownerDocument.body:e.body:ql(t)&&q_(t)?t:WL(t)}function r_(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=WL(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=ns(a);if(o){const e=Sne(i);return t.concat(i,i.visualViewport||[],q_(a)?a:[],e&&n?r_(e):[])}return t.concat(a,r_(a,[],n))}function Sne(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function HL(e){const t=Us(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=ql(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=nw(n)!==o||nw(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function ZA(e){return Ul(e)?e:e.contextElement}function v1(e){const t=ZA(e);if(!ql(t))return Sp(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=HL(t);let i=(o?nw(n.width):n.width)/r,s=(o?nw(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Ene=Sp(0);function GL(e){const t=ns(e);return YA()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ene}function Cne(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ns(e))&&t}function bm(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=ZA(e);let i=Sp(1);t&&(r?Ul(r)&&(i=v1(r)):i=v1(e));const s=Cne(o,n,r)?GL(o):Sp(0);let c=(a.left+s.x)/i.x,l=(a.top+s.y)/i.y,u=a.width/i.x,f=a.height/i.y;if(o){const e=ns(o),t=r&&Ul(r)?ns(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=v1(n),t=n.getBoundingClientRect(),r=Us(n),a=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,f*=e.y,c+=a,l+=o,n=ns(n).frameElement}}return aw({width:u,height:f,x:c,y:l})}const Rne=[":popover-open",":modal"];function KL(e){let t=!1,n=0,r=0;if(Rne.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=qL(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function Ane(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=Cu(r),[i]=t?KL(t.floating):[!1];if(r===o||i)return n;let s={scrollLeft:0,scrollTop:0},c=Sp(1);const l=Sp(0),u=ql(r);if((u||!u&&"fixed"!==a)&&(("body"!==Cp(r)||q_(o))&&(s=Sk(r)),ql(r))){const e=bm(r);c=v1(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+l.x,y:n.y*c.y-s.scrollTop*c.y+l.y}}function Tne(e){return Array.from(e.getClientRects())}function QL(e){return bm(Cu(e)).left+Sk(e).scrollLeft}function Ine(e){const t=Cu(e),n=Sk(e),r=e.ownerDocument.body,a=ts(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ts(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+QL(e);const s=-n.scrollTop;return"rtl"===Us(r).direction&&(i+=ts(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}function Pne(e,t){const n=ns(e),r=Cu(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,c=0;if(a){o=a.width,i=a.height;const e=YA();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,c=a.offsetTop)}return{width:o,height:i,x:s,y:c}}function $ne(e,t){const n=bm(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=ql(e)?v1(e):Sp(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:r*o.y}}function Pz(e,t,n){let r;if("viewport"===t)r=Pne(e,n);else if("document"===t)r=Ine(Cu(e));else if(Ul(t))r=$ne(t,n);else{const n=GL(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return aw(r)}function YL(e,t){const n=R1(e);return!(n===t||!Ul(n)||xk(n))&&("fixed"===Us(n).position||YL(n,t))}function One(e,t){const n=t.get(e);if(n)return n;let r=r_(e,[],!1).filter((e=>Ul(e)&&"body"!==Cp(e))),a=null;const o="fixed"===Us(e).position;let i=o?R1(e):e;for(;Ul(i)&&!xk(i);){const t=Us(i),n=QA(i);!n&&"fixed"===t.position&&(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||q_(i)&&!n&&YL(e,i))?r=r.filter((e=>e!==i)):a=t,i=R1(i)}return t.set(e,r),r}function zne(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?One(t,this._c):[].concat(n),r],i=o[0],s=o.reduce(((e,n)=>{const r=Pz(t,n,a);return e.top=ts(r.top,e.top),e.right=xp(r.right,e.right),e.bottom=xp(r.bottom,e.bottom),e.left=ts(r.left,e.left),e}),Pz(t,i,a));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Mne(e){const{width:t,height:n}=HL(e);return{width:t,height:n}}function Dne(e,t,n,r){const a=ql(t),o=Cu(t),i="fixed"===n,s=bm(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=Sp(0);if(a||!a&&!i)if(("body"!==Cp(t)||q_(o))&&(c=Sk(t)),a){const e=bm(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=QL(o));let u=s.left+c.scrollLeft-l.x,f=s.top+c.scrollTop-l.y;const[d,p,h]=KL(r);return d&&(u+=p,f+=h,a&&(u+=t.clientLeft,f+=t.clientTop)),{x:u,y:f,width:s.width,height:s.height}}function $z(e,t){return ql(e)&&"fixed"!==Us(e).position?t?t(e):e.offsetParent:null}function ZL(e,t){const n=ns(e);if(!ql(e))return n;let r=$z(e,t);for(;r&&kne(r)&&"static"===Us(r).position;)r=$z(r,t);return r&&("html"===Cp(r)||"body"===Cp(r)&&"static"===Us(r).position&&!QA(r))?n:r||qL(e)||n}const Nne=async function(e){const t=this.getOffsetParent||ZL,n=this.getDimensions;return{reference:Dne(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function Lne(e){return"rtl"===Us(e).direction}const jne={convertOffsetParentRelativeRectToViewportRelativeRect:Ane,getDocumentElement:Cu,getClippingRect:zne,getOffsetParent:ZL,getElementRects:Nne,getClientRects:Tne,getDimensions:Mne,getScale:v1,isElement:Ul,isRTL:Lne};function Fne(e,t){let n,r=null;const a=Cu(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,c){void 0===s&&(s=!1),void 0===c&&(c=1),o();const{left:l,top:u,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p={rootMargin:-rb(u)+"px "+-rb(a.clientWidth-(l+f))+"px "+-rb(a.clientHeight-(u+d))+"px "+-rb(l)+"px",threshold:ts(0,xp(1,c))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==c){if(!h)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(m,{...p,root:a.ownerDocument})}catch{r=new IntersectionObserver(m,p)}r.observe(e)}(!0),o}function Bne(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,l=ZA(e),u=a||o?[...l?r_(l):[],...r_(t)]:[];u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const f=l&&s?Fne(l,n):null;let d=-1,p=null;i&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),l&&!c&&p.observe(l),p.observe(t));let h,m=c?bm(e):null;return c&&function t(){const r=bm(e);m&&(r.x!==m.x||r.y!==m.y||r.width!==m.width||r.height!==m.height)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==f||f(),null==(e=p)||e.disconnect(),p=null,c&&cancelAnimationFrame(h)}}const Vne=vne,Une=mne,qne=wne,Wne=gne,Oz=hne,Hne=bne,Gne=(e,t,n)=>{const r=new Map,a={platform:jne,...n},o={...a.platform,_c:r};return pne(e,t,{...a,platform:o})};var Mb=typeof document<"u"?v.useLayoutEffect:v.useEffect;function ow(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,a;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(!ow(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){const n=a[r];if(!("_owner"===n&&e.$$typeof||ow(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function XL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zz(e,t){const n=XL(e);return Math.round(t*n)/n}function jE(e){const t=v.useRef(e);return Mb((()=>{t.current=e})),t}function Kne(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=v.useState(r);ow(d,r)||p(r);const[h,m]=v.useState(null),[y,g]=v.useState(null),b=v.useCallback((e=>{e!==x.current&&(x.current=e,m(e))}),[]),_=v.useCallback((e=>{e!==S.current&&(S.current=e,g(e))}),[]),w=o||h,k=i||y,x=v.useRef(null),S=v.useRef(null),E=v.useRef(u),A=null!=c,z=jE(c),C=jE(a),I=jE(l),T=v.useCallback((()=>{if(!x.current||!S.current)return;const e={placement:t,strategy:n,middleware:d};C.current&&(e.platform=C.current),Gne(x.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==I.current};R.current&&!ow(E.current,t)&&(E.current=t,Zl.flushSync((()=>{f(t)})))}))}),[d,t,n,C,I]);Mb((()=>{!1===l&&E.current.isPositioned&&(E.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[l]);const R=v.useRef(!1);Mb((()=>(R.current=!0,()=>{R.current=!1})),[]),Mb((()=>{if(w&&(x.current=w),k&&(S.current=k),w&&k){if(z.current)return z.current(w,k,T);T()}}),[w,k,T,z,A]);const P=v.useMemo((()=>({reference:x,floating:S,setReference:b,setFloating:_})),[b,_]),j=v.useMemo((()=>({reference:w,floating:k})),[w,k]),O=v.useMemo((()=>{const e={position:n,left:0,top:0};if(!j.floating)return e;const t=zz(j.floating,u.x),r=zz(j.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...XL(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,j.floating,u.x,u.y]);return v.useMemo((()=>({...u,update:T,refs:P,elements:j,floatingStyles:O})),[u,T,P,j,O])}const Qne=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?Oz({element:n.current,padding:r}).fn(t):{}:n?Oz({element:n,padding:r}).fn(t):{}}}),Yne=(e,t)=>({..._ne(e),options:[e,t]}),Zne=(e,t)=>({...Vne(e),options:[e,t]}),Xne=(e,t)=>({...Hne(e),options:[e,t]}),Jne=(e,t)=>({...Une(e),options:[e,t]}),ere=(e,t)=>({...qne(e),options:[e,t]}),tre=(e,t)=>({...Wne(e),options:[e,t]}),nre=(e,t)=>({...Qne(e),options:[e,t]}),JL="Popper",[ej,Q1]=ii(JL),[rre,tj]=ej(JL),are=e=>{const{__scopePopper:t,children:n}=e,[r,a]=v.useState(null);return v.createElement(rre,{scope:t,anchor:r,onAnchorChange:a},n)},ore="PopperAnchor",ire=v.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=tj(ore,n),i=v.useRef(null),s=yn(t,i);return v.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:v.createElement(St.div,Le({},a,{ref:s}))})),nj="PopperContent",[sre,qWe]=ej(nj),cre=v.forwardRef(((e,t)=>{var n,r,a,o,i,s,c,l;const{__scopePopper:u,side:f="bottom",sideOffset:d=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,avoidCollisions:y=!0,collisionBoundary:g=[],collisionPadding:b=0,sticky:_="partial",hideWhenDetached:w=!1,updatePositionStrategy:k="optimized",onPlaced:x,...S}=e,E=tj(nj,u),[A,z]=v.useState(null),C=yn(t,(e=>z(e))),[I,T]=v.useState(null),R=_k(I),P=null!==(n=null==R?void 0:R.width)&&void 0!==n?n:0,j=null!==(r=null==R?void 0:R.height)&&void 0!==r?r:0,O=f+("center"!==p?"-"+p:""),N="number"==typeof b?b:{top:0,right:0,bottom:0,left:0,...b},M=Array.isArray(g)?g:[g],D=M.length>0,B={padding:N,boundary:M.filter(lre),altBoundary:D},{refs:L,floatingStyles:V,placement:q,isPositioned:F,middlewareData:U}=Kne({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>Bne(...e,{animationFrame:"always"===k}),elements:{reference:E.anchor},middleware:[Yne({mainAxis:d+j,alignmentAxis:h}),y&&Zne({mainAxis:!0,crossAxis:!1,limiter:"partial"===_?Xne():void 0,...B}),y&&Jne({...B}),ere({...B,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),I&&nre({element:I,padding:m}),fre({arrowWidth:P,arrowHeight:j}),w&&tre({strategy:"referenceHidden",...B})]}),[$,W]=rj(q),H=Fc(x);Mo((()=>{F&&(null==H||H())}),[F,H]);const G=null===(a=U.arrow)||void 0===a?void 0:a.x,Q=null===(o=U.arrow)||void 0===o?void 0:o.y,K=0!==(null===(i=U.arrow)||void 0===i?void 0:i.centerOffset),[Y,Z]=v.useState();return Mo((()=>{A&&Z(window.getComputedStyle(A).zIndex)}),[A]),v.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:F?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[null===(s=U.transformOrigin)||void 0===s?void 0:s.x,null===(c=U.transformOrigin)||void 0===c?void 0:c.y].join(" ")},dir:e.dir},v.createElement(sre,{scope:u,placedSide:$,onArrowChange:T,arrowX:G,arrowY:Q,shouldHideArrow:K},v.createElement(St.div,Le({"data-side":$,"data-align":W},S,{ref:C,style:{...S.style,animation:F?void 0:"none",opacity:null!==(l=U.hide)&&void 0!==l&&l.referenceHidden?0:void 0}}))))}));function lre(e){return null!==e}const fre=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a,o,i;const{placement:s,rects:c,middlewareData:l}=t,u=0!==(null===(n=l.arrow)||void 0===n?void 0:n.centerOffset),f=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[p,h]=rj(s),m={start:"0%",center:"50%",end:"100%"}[h],y=(null!==(r=null===(a=l.arrow)||void 0===a?void 0:a.x)&&void 0!==r?r:0)+f/2,g=(null!==(o=null===(i=l.arrow)||void 0===i?void 0:i.y)&&void 0!==o?o:0)+d/2;let v="",b="";return"bottom"===p?(v=u?m:`${y}px`,b=-d+"px"):"top"===p?(v=u?m:`${y}px`,b=`${c.floating.height+d}px`):"right"===p?(v=-d+"px",b=u?m:`${g}px`):"left"===p&&(v=`${c.floating.width+d}px`,b=u?m:`${g}px`),{data:{x:v,y:b}}}});function rj(e){const[t,n="center"]=e.split("-");return[t,n]}const aj=are,XA=ire,JA=cre,FE="rovingFocusGroup.onEntryFocus",ure={bubbles:!1,cancelable:!0},eT="RovingFocusGroup",[DC,oj,dre]=qA(eT),[pre,Y1]=ii(eT,[dre]),[hre,mre]=pre(eT),gre=v.forwardRef(((e,t)=>v.createElement(DC.Provider,{scope:e.__scopeRovingFocusGroup},v.createElement(DC.Slot,{scope:e.__scopeRovingFocusGroup},v.createElement(yre,Le({},e,{ref:t})))))),yre=v.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,...u}=e,f=v.useRef(null),d=yn(t,f),p=WA(o),[h=null,m]=kp({prop:i,defaultProp:s,onChange:c}),[y,g]=v.useState(!1),b=Fc(l),_=oj(n),w=v.useRef(!1),[k,x]=v.useState(0);return v.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(FE,b),()=>e.removeEventListener(FE,b)}),[b]),v.createElement(hre,{scope:n,orientation:r,dir:p,loop:a,currentTabStopId:h,onItemFocus:v.useCallback((e=>m(e)),[m]),onItemShiftTab:v.useCallback((()=>g(!0)),[]),onFocusableItemAdd:v.useCallback((()=>x((e=>e+1))),[]),onFocusableItemRemove:v.useCallback((()=>x((e=>e-1))),[])},v.createElement(St.div,Le({tabIndex:y||0===k?-1:0,"data-orientation":r},u,{ref:d,style:{outline:"none",...e.style},onMouseDown:lt(e.onMouseDown,(()=>{w.current=!0})),onFocus:lt(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!y){const t=new CustomEvent(FE,ure);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=_().filter((e=>e.focusable));ij([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:lt(e.onBlur,(()=>g(!1)))})))})),_re="RovingFocusGroupItem",vre=v.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,...i}=e,s=mp(),c=o||s,l=mre(_re,n),u=l.currentTabStopId===c,f=oj(n),{onFocusableItemAdd:d,onFocusableItemRemove:p}=l;return v.useEffect((()=>{if(r)return d(),()=>p()}),[r,d,p]),v.createElement(DC.ItemSlot,{scope:n,id:c,focusable:r,active:a},v.createElement(St.span,Le({tabIndex:u?0:-1,"data-orientation":l.orientation},i,{ref:t,onMouseDown:lt(e.onMouseDown,(e=>{r?l.onItemFocus(c):e.preventDefault()})),onFocus:lt(e.onFocus,(()=>l.onItemFocus(c))),onKeyDown:lt(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void l.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=kre(e,l.orientation,l.dir);if(void 0!==t){e.preventDefault();let n=f().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?xre(n,r+1):n.slice(r+1)}setTimeout((()=>ij(n)))}}))})))})),bre={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wre(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function kre(e,t,n){const r=wre(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return bre[r]}function ij(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xre(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const tT=gre,nT=vre,NC=["Enter"," "],Sre=["ArrowDown","PageUp","Home"],sj=["ArrowUp","PageDown","End"],Ere=[...Sre,...sj],Cre={ltr:[...NC,"ArrowRight"],rtl:[...NC,"ArrowLeft"]},Rre={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ek="Menu",[a_,Are,Tre]=qA(Ek),[Pm,cj]=ii(Ek,[Tre,Q1,Y1]),lj=Q1(),fj=Y1(),[WWe,$m]=Pm(Ek),[HWe,W_]=Pm(Ek),Ire=v.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,a=lj(n);return v.createElement(XA,Le({},a,r,{ref:t}))})),uj="MenuPortal",[Pre,dj]=Pm(uj,{forceMount:void 0}),$re=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,o=$m(uj,t);return v.createElement(Pre,{scope:t,forceMount:n},v.createElement(Ws,{present:n||o.open},v.createElement(sA,{asChild:!0,container:a},r)))},zc="MenuContent",[Ore,rT]=Pm(zc),zre=v.forwardRef(((e,t)=>{const n=dj(zc,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=$m(zc,e.__scopeMenu),i=W_(zc,e.__scopeMenu);return v.createElement(a_.Provider,{scope:e.__scopeMenu},v.createElement(Ws,{present:r||o.open},v.createElement(a_.Slot,{scope:e.__scopeMenu},i.modal?v.createElement(Mre,Le({},a,{ref:t})):v.createElement(Dre,Le({},a,{ref:t})))))})),Mre=v.forwardRef(((e,t)=>{const n=$m(zc,e.__scopeMenu),r=v.useRef(null),a=yn(t,r);return v.useEffect((()=>{const e=r.current;if(e)return ak(e)}),[]),v.createElement(aT,Le({},e,{ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:lt(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),Dre=v.forwardRef(((e,t)=>{const n=$m(zc,e.__scopeMenu);return v.createElement(aT,Le({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),aT=v.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:p,disableOutsideScroll:h,...m}=e,y=$m(zc,n),g=W_(zc,n),b=lj(n),_=fj(n),w=Are(n),[k,x]=v.useState(null),S=v.useRef(null),E=yn(t,S,y.onContentChange),A=v.useRef(0),z=v.useRef(""),C=v.useRef(0),I=v.useRef(null),T=v.useRef("right"),R=v.useRef(0),P=h?rk:v.Fragment,j=h?{as:hm,allowPinchZoom:!0}:void 0;v.useEffect((()=>()=>window.clearTimeout(A.current)),[]),cA();const O=v.useCallback((e=>{var t,n;return T.current===(null===(t=I.current)||void 0===t?void 0:t.side)&&eae(e,null===(n=I.current)||void 0===n?void 0:n.area)}),[]);return v.createElement(Ore,{scope:n,searchRef:z,onItemEnter:v.useCallback((e=>{O(e)&&e.preventDefault()}),[O]),onItemLeave:v.useCallback((e=>{var t;O(e)||(null===(t=S.current)||void 0===t||t.focus(),x(null))}),[O]),onTriggerLeave:v.useCallback((e=>{O(e)&&e.preventDefault()}),[O]),pointerGraceTimerRef:C,onPointerGraceIntentChange:v.useCallback((e=>{I.current=e}),[])},v.createElement(P,j,v.createElement(iA,{asChild:!0,trapped:a,onMountAutoFocus:lt(o,(e=>{var t;e.preventDefault(),null===(t=S.current)||void 0===t||t.focus()})),onUnmountAutoFocus:i},v.createElement(tk,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:p},v.createElement(tT,Le({asChild:!0},_,{dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:k,onCurrentTabStopIdChange:x,onEntryFocus:lt(c,(e=>{g.isUsingKeyboardRef.current||e.preventDefault()}))}),v.createElement(JA,Le({role:"menu","aria-orientation":"vertical","data-state":yj(y.open),"data-radix-menu-content":"",dir:g.dir},b,m,{ref:E,style:{outline:"none",...m.style},onKeyDown:lt(m.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=z.current+e,a=w().filter((e=>!e.disabled)),o=document.activeElement,i=null===(t=a.find((e=>e.ref.current===o)))||void 0===t?void 0:t.textValue,s=Xre(a.map((e=>e.textValue)),r,i),c=null===(n=a.find((e=>e.textValue===s)))||void 0===n?void 0:n.ref.current;(function e(t){z.current=t,window.clearTimeout(A.current),""!==t&&(A.current=window.setTimeout((()=>e("")),1e3))})(r),c&&setTimeout((()=>c.focus()))})(e.key));const a=S.current;if(e.target!==a||!Ere.includes(e.key))return;e.preventDefault();const o=w().filter((e=>!e.disabled)).map((e=>e.ref.current));sj.includes(e.key)&&o.reverse(),Yre(o)})),onBlur:lt(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(A.current),z.current="")})),onPointerMove:lt(e.onPointerMove,o_((e=>{const t=e.target,n=R.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>R.current?"right":"left";T.current=t,R.current=e.clientX}})))})))))))})),Nre=v.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return v.createElement(St.div,Le({},r,{ref:t}))})),LC="MenuItem",Mz="menu.itemSelect",oT=v.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,o=v.useRef(null),i=W_(LC,e.__scopeMenu),s=rT(LC,e.__scopeMenu),c=yn(t,o),l=v.useRef(!1);return v.createElement(pj,Le({},a,{ref:c,disabled:n,onClick:lt(e.onClick,(()=>{const e=o.current;if(!n&&e){const t=new CustomEvent(Mz,{bubbles:!0,cancelable:!0});e.addEventListener(Mz,(e=>null==r?void 0:r(e)),{once:!0}),d7(e,t),t.defaultPrevented?l.current=!1:i.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),l.current=!0},onPointerUp:lt(e.onPointerUp,(e=>{var t;l.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:lt(e.onKeyDown,(e=>{const t=""!==s.searchRef.current;n||t&&" "===e.key||NC.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),pj=v.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,i=rT(LC,n),s=fj(n),c=v.useRef(null),l=yn(t,c),[u,f]=v.useState(!1),[d,p]=v.useState("");return v.useEffect((()=>{const e=c.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[o.children]),v.createElement(a_.ItemSlot,{scope:n,disabled:r,textValue:a??d},v.createElement(nT,Le({asChild:!0},s,{focusable:!r}),v.createElement(St.div,Le({role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:l,onPointerMove:lt(e.onPointerMove,o_((e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:lt(e.onPointerLeave,o_((e=>i.onItemLeave(e)))),onFocus:lt(e.onFocus,(()=>f(!0))),onBlur:lt(e.onBlur,(()=>f(!1)))}))))})),Lre=v.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return v.createElement(mj,{scope:e.__scopeMenu,checked:n},v.createElement(oT,Le({role:"menuitemcheckbox","aria-checked":iw(n)?"mixed":n},a,{ref:t,"data-state":iT(n),onSelect:lt(a.onSelect,(()=>null==r?void 0:r(!!iw(n)||!n)),{checkForDefaultPrevented:!1})})))})),jre="MenuRadioGroup",[GWe,Fre]=Pm(jre,{value:void 0,onValueChange:()=>{}}),Bre="MenuRadioItem",Vre=v.forwardRef(((e,t)=>{const{value:n,...r}=e,a=Fre(Bre,e.__scopeMenu),o=n===a.value;return v.createElement(mj,{scope:e.__scopeMenu,checked:o},v.createElement(oT,Le({role:"menuitemradio","aria-checked":o},r,{ref:t,"data-state":iT(o),onSelect:lt(r.onSelect,(()=>{var e;return null===(e=a.onValueChange)||void 0===e?void 0:e.call(a,n)}),{checkForDefaultPrevented:!1})})))})),hj="MenuItemIndicator",[mj,Ure]=Pm(hj,{checked:!1}),qre=v.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,o=Ure(hj,n);return v.createElement(Ws,{present:r||iw(o.checked)||!0===o.checked},v.createElement(St.span,Le({},a,{ref:t,"data-state":iT(o.checked)})))})),Wre=v.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return v.createElement(St.div,Le({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),Hre="MenuSub",[KWe,gj]=Pm(Hre),ab="MenuSubTrigger",Gre=v.forwardRef(((e,t)=>{const n=$m(ab,e.__scopeMenu),r=W_(ab,e.__scopeMenu),a=gj(ab,e.__scopeMenu),o=rT(ab,e.__scopeMenu),i=v.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=o,l={__scopeMenu:e.__scopeMenu},u=v.useCallback((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return v.useEffect((()=>u),[u]),v.useEffect((()=>{const e=s.current;return()=>{window.clearTimeout(e),c(null)}}),[s,c]),v.createElement(Ire,Le({asChild:!0},l),v.createElement(pj,Le({id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":yj(n.open)},e,{ref:aA(t,a.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:lt(e.onPointerMove,o_((t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout((()=>{n.onOpenChange(!0),u()}),100))}))),onPointerLeave:lt(e.onPointerLeave,o_((e=>{var t;u();const r=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(r){var a;const t=null===(a=n.content)||void 0===a?void 0:a.dataset.side,i="right"===t,c=i?-5:5,l=r[i?"left":"right"],u=r[i?"right":"left"];o.onPointerGraceIntentChange({area:[{x:e.clientX+c,y:e.clientY},{x:l,y:r.top},{x:u,y:r.top},{x:u,y:r.bottom},{x:l,y:r.bottom}],side:t}),window.clearTimeout(s.current),s.current=window.setTimeout((()=>o.onPointerGraceIntentChange(null)),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}}))),onKeyDown:lt(e.onKeyDown,(t=>{const a=""!==o.searchRef.current;var i;e.disabled||a&&" "===t.key||!Cre[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(i=n.content)||void 0===i||i.focus(),t.preventDefault())}))})))})),Kre="MenuSubContent",Qre=v.forwardRef(((e,t)=>{const n=dj(zc,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=$m(zc,e.__scopeMenu),i=W_(zc,e.__scopeMenu),s=gj(Kre,e.__scopeMenu),c=v.useRef(null),l=yn(t,c);return v.createElement(a_.Provider,{scope:e.__scopeMenu},v.createElement(Ws,{present:r||o.open},v.createElement(a_.Slot,{scope:e.__scopeMenu},v.createElement(aT,Le({id:s.contentId,"aria-labelledby":s.triggerId},a,{ref:l,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;i.isUsingKeyboardRef.current&&(null===(t=c.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:lt(e.onFocusOutside,(e=>{e.target!==s.trigger&&o.onOpenChange(!1)})),onEscapeKeyDown:lt(e.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:lt(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=Rre[i.dir].includes(e.key);var r;t&&n&&(o.onOpenChange(!1),null===(r=s.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function yj(e){return e?"open":"closed"}function iw(e){return"indeterminate"===e}function iT(e){return iw(e)?"indeterminate":e?"checked":"unchecked"}function Yre(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Zre(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function Xre(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,a=n?e.indexOf(n):-1;let o=Zre(e,Math.max(a,0));1===r.length&&(o=o.filter((e=>e!==n)));const i=o.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function Jre(e,t){const{x:n,y:r}=e;let a=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){const i=t[e].x,s=t[e].y,c=t[o].x,l=t[o].y;s>r!=l>r&&n<(c-i)*(r-s)/(l-s)+i&&(a=!a)}return a}function eae(e,t){if(!t)return!1;return Jre({x:e.clientX,y:e.clientY},t)}function o_(e){return t=>"mouse"===t.pointerType?e(t):void 0}const tae=$re,nae=zre,rae=Nre,aae=oT,oae=Lre,iae=Vre,sae=qre,cae=Wre,lae=Gre,fae=Qre,_j="DropdownMenu",[uae,QWe]=ii(_j,[cj]),Jl=cj(),[YWe,dae]=uae(_j),pae=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Jl(t);return v.createElement(tae,Le({},r,n))},hae="DropdownMenuContent",mae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=dae(hae,n),o=Jl(n),i=v.useRef(!1);return v.createElement(nae,Le({id:a.contentId,"aria-labelledby":a.triggerId},o,r,{ref:t,onCloseAutoFocus:lt(e.onCloseAutoFocus,(e=>{var t;i.current||null===(t=a.triggerRef.current)||void 0===t||t.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:lt(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!a.modal||r)&&(i.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)"}}))})),gae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(rae,Le({},a,r,{ref:t}))})),yae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(aae,Le({},a,r,{ref:t}))})),_ae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(oae,Le({},a,r,{ref:t}))})),vae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(iae,Le({},a,r,{ref:t}))})),bae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(sae,Le({},a,r,{ref:t}))})),wae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(cae,Le({},a,r,{ref:t}))})),kae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(lae,Le({},a,r,{ref:t}))})),xae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(fae,Le({},a,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)"}}))})),Sae=pae,vj=mae,bj=gae,wj=yae,kj=_ae,xj=vae,Sj=bae,sT=wae,Ej=kae,Cj=xae,Eae=v.forwardRef((({className:e,inset:t,children:n,...r},a)=>B.jsxs(Ej,{ref:a,className:$e("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,B.jsx(e7,{className:"ml-auto h-4 w-4"})]})));Eae.displayName=Ej.displayName;const Cae=v.forwardRef((({className:e,...t},n)=>B.jsx(Cj,{ref:n,className:$e("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})));Cae.displayName=Cj.displayName;const Rae=v.forwardRef((({className:e,sideOffset:t=4,...n},r)=>B.jsx(Sae,{children:B.jsx(vj,{ref:r,sideOffset:t,className:$e("z-[101] min-w-[8rem] overflow-hidden rounded-md border bg-popover p-[8px] text-popover-foreground shadow-md 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),...n})})));Rae.displayName=vj.displayName;const Aae=v.forwardRef((({className:e,inset:t,...n},r)=>B.jsx(wj,{ref:r,className:$e("relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n})));Aae.displayName=wj.displayName;const Tae=v.forwardRef((({className:e,children:t,checked:n,...r},a)=>B.jsxs(kj,{ref:a,className:$e("relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[B.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:B.jsx(Sj,{children:B.jsx(tA,{className:"h-4 w-4"})})}),t]})));Tae.displayName=kj.displayName;const Iae=v.forwardRef((({className:e,children:t,...n},r)=>B.jsxs(xj,{ref:r,className:$e("relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[B.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:B.jsx(Sj,{children:B.jsx(t7,{className:"h-2 w-2 fill-current"})})}),t]})));Iae.displayName=xj.displayName;const Pae=v.forwardRef((({className:e,inset:t,...n},r)=>B.jsx(bj,{ref:r,className:$e("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n})));Pae.displayName=bj.displayName;const $ae=v.forwardRef((({className:e,...t},n)=>B.jsx(sT,{ref:n,className:$e("-mx-1 my-1 h-px bg-muted",e),...t})));$ae.displayName=sT.displayName;var H_=e=>"checkbox"===e.type,d1=e=>e instanceof Date,ti=e=>null==e;const Rj=e=>"object"==typeof e;var da=e=>!ti(e)&&!Array.isArray(e)&&Rj(e)&&!d1(e),Oae=e=>da(e)&&e.target?H_(e.target)?e.target.checked:e.target.value:e,zae=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Mae=(e,t)=>e.has(zae(t)),Dae=e=>{const t=e.constructor&&e.constructor.prototype;return da(t)&&t.hasOwnProperty("isPrototypeOf")},cT=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ns(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(cT&&(e instanceof Blob||e instanceof FileList)||!n&&!da(e))return e;if(t=n?[]:{},n||Dae(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=Ns(e[n]));else t=e}return t}var G_=e=>Array.isArray(e)?e.filter(Boolean):[],Fr=e=>void 0===e,dt=(e,t,n)=>{if(!t||!da(e))return n;const r=G_(t.split(/[,[\].]+?/)).reduce(((e,t)=>ti(e)?e:e[t]),e);return Fr(r)||r===e?Fr(e[t])?n:e[t]:r},du=e=>"boolean"==typeof e;const Dz={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ic={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},nu={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Aj=ze.createContext(null),Nae=()=>ze.useContext(Aj),Lae=e=>{const{children:t,...n}=e;return ze.createElement(Aj.Provider,{value:n},t)};var jae=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const n in e)Object.defineProperty(a,n,{get:()=>{const a=n;return t._proxyFormState[a]!==Ic.all&&(t._proxyFormState[a]=!r||Ic.all),e[a]}});return a},Ls=e=>da(e)&&!Object.keys(e).length,Fae=(e,t,n,r)=>{n(e);const{name:a,...o}=e;return Ls(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===Ic.all))},BE=e=>Array.isArray(e)?e:[e];function Bae(e){const t=ze.useRef(e);t.current=e,ze.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var Nl=e=>"string"==typeof e,Vae=(e,t,n,r,a)=>Nl(e)?(r&&t.watch.add(e),dt(n,e,a)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),dt(n,e)))):(r&&(t.watchAll=!0),n),lT=e=>/^\w*$/.test(e),Tj=e=>G_(e.replace(/["|']|\]/g,"").split(/\.|\[/)),or=(e,t,n)=>{let r=-1;const a=lT(t)?[t]:Tj(t),o=a.length,i=o-1;for(;++r<o;){const t=a[r];let o=n;if(r!==i){const n=e[t];o=da(n)||Array.isArray(n)?n:isNaN(+a[r+1])?{}:[]}e[t]=o,e=e[t]}return e},Uae=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},Nz=e=>({isOnSubmit:!e||e===Ic.onSubmit,isOnBlur:e===Ic.onBlur,isOnChange:e===Ic.onChange,isOnAll:e===Ic.all,isOnTouch:e===Ic.onTouched}),Lz=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))));const $y=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const n=dt(e,a);if(n){const{_f:e,...o}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],a)&&!r)break;if(e.ref&&t(e.ref,e.name)&&!r)break;$y(o,t)}else da(o)&&$y(o,t)}}};var qae=(e,t,n)=>{const r=G_(dt(e,n));return or(r,"root",t[n]),or(e,n,r),e},fT=e=>"file"===e.type,hp=e=>"function"==typeof e,sw=e=>{if(!cT)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Db=e=>Nl(e),uT=e=>"radio"===e.type,cw=e=>e instanceof RegExp;const jz={value:!1,isValid:!1},Fz={value:!0,isValid:!0};var Ij=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Fr(e[0].attributes.value)?Fr(e[0].value)||""===e[0].value?Fz:{value:e[0].value,isValid:!0}:Fz:jz}return jz};const Bz={isValid:!1,value:null};var Pj=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),Bz):Bz;function Vz(e,t,n="validate"){if(Db(e)||Array.isArray(e)&&e.every(Db)||du(e)&&!e)return{type:n,message:Db(e)?e:"",ref:t}}var t1=e=>da(e)&&!cw(e)?e:{value:e,message:""},Uz=async(e,t,n,r,a)=>{const{ref:o,refs:i,required:s,maxLength:c,minLength:l,min:u,max:f,pattern:d,validate:p,name:h,valueAsNumber:m,mount:y,disabled:g}=e._f,v=dt(t,h);if(!y||g)return{};const b=i?i[0]:o,_=e=>{r&&b.reportValidity&&(b.setCustomValidity(du(e)?"":e||""),b.reportValidity())},w={},k=uT(o),x=H_(o),S=k||x,E=(m||fT(o))&&Fr(o.value)&&Fr(v)||sw(o)&&""===o.value||""===v||Array.isArray(v)&&!v.length,A=Uae.bind(null,h,n,w),z=(e,t,n,r=nu.maxLength,a=nu.minLength)=>{const i=e?t:n;w[h]={type:e?r:a,message:i,ref:o,...A(e?r:a,i)}};if(a?!Array.isArray(v)||!v.length:s&&(!S&&(E||ti(v))||du(v)&&!v||x&&!Ij(i).isValid||k&&!Pj(i).isValid)){const{value:e,message:t}=Db(s)?{value:!!s,message:s}:t1(s);if(e&&(w[h]={type:nu.required,message:t,ref:b,...A(nu.required,t)},!n))return _(t),w}if(!(E||ti(u)&&ti(f))){let e,t;const r=t1(f),a=t1(u);if(ti(v)||isNaN(v)){const n=o.valueAsDate||new Date(v),i=e=>new Date((new Date).toDateString()+" "+e),s="time"==o.type,c="week"==o.type;Nl(r.value)&&v&&(e=s?i(v)>i(r.value):c?v>r.value:n>new Date(r.value)),Nl(a.value)&&v&&(t=s?i(v)<i(a.value):c?v<a.value:n<new Date(a.value))}else{const n=o.valueAsNumber||v&&+v;ti(r.value)||(e=n>r.value),ti(a.value)||(t=n<a.value)}if((e||t)&&(z(!!e,r.message,a.message,nu.max,nu.min),!n))return _(w[h].message),w}if((c||l)&&!E&&(Nl(v)||a&&Array.isArray(v))){const e=t1(c),t=t1(l),r=!ti(e.value)&&v.length>+e.value,a=!ti(t.value)&&v.length<+t.value;if((r||a)&&(z(r,e.message,t.message),!n))return _(w[h].message),w}if(d&&!E&&Nl(v)){const{value:e,message:t}=t1(d);if(cw(e)&&!v.match(e)&&(w[h]={type:nu.pattern,message:t,ref:o,...A(nu.pattern,t)},!n))return _(t),w}if(p)if(hp(p)){const e=Vz(await p(v,t),b);if(e&&(w[h]={...e,...A(nu.validate,e.message)},!n))return _(e.message),w}else if(da(p)){let e={};for(const r in p){if(!Ls(e)&&!n)break;const a=Vz(await p[r](v,t),b,r);a&&(e={...a,...A(r,a.message)},_(a.message),n&&(w[h]=e))}if(!Ls(e)&&(w[h]={ref:b,...e},!n))return w}return _(!0),w};function Wae(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Fr(e)?r++:e[t[r++]];return e}function Hae(e){for(const t in e)if(e.hasOwnProperty(t)&&!Fr(e[t]))return!1;return!0}function Va(e,t){const n=Array.isArray(t)?t:lT(t)?[t]:Tj(t),r=1===n.length?e:Wae(e,n),a=n.length-1,o=n[a];return r&&delete r[o],0!==a&&(da(r)&&Ls(r)||Array.isArray(r)&&Hae(r))&&Va(e,n.slice(0,-1)),e}var VE=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},lw=e=>ti(e)||!Rj(e);function rm(e,t){if(lw(e)||lw(t))return e===t;if(d1(e)&&d1(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){const n=e[a];if(!r.includes(a))return!1;if("ref"!==a){const e=t[a];if(d1(n)&&d1(e)||da(n)&&da(e)||Array.isArray(n)&&Array.isArray(e)?!rm(n,e):n!==e)return!1}}return!0}var $j=e=>"select-multiple"===e.type,Gae=e=>uT(e)||H_(e),UE=e=>sw(e)&&e.isConnected,Kae=e=>da(e)&&Object.values(e).some((e=>e)),Oj=e=>{for(const t in e)if(hp(e[t]))return!0;return!1};function fw(e,t={}){const n=Array.isArray(e);if(da(e)||n)for(const n in e)Array.isArray(e[n])||da(e[n])&&!Oj(e[n])?(t[n]=Array.isArray(e[n])?[]:{},fw(e[n],t[n])):ti(e[n])||(t[n]=!0);return t}function zj(e,t,n){const r=Array.isArray(e);if(da(e)||r)for(const r in e)Array.isArray(e[r])||da(e[r])&&!Oj(e[r])?Fr(t)||lw(n[r])?n[r]=Array.isArray(e[r])?fw(e[r],[]):{...fw(e[r])}:zj(e[r],ti(t)?{}:t[r],n[r]):n[r]=!rm(e[r],t[r]);return n}var ob=(e,t)=>zj(e,t,fw(t)),Mj=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Fr(e)?e:t?""===e?NaN:e&&+e:n&&Nl(e)?new Date(e):r?r(e):e;function qE(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return fT(t)?t.files:uT(t)?Pj(e.refs).value:$j(t)?[...t.selectedOptions].map((({value:e})=>e)):H_(t)?Ij(e.refs).value:Mj(Fr(t.value)?e.ref.value:t.value,e)}var Qae=(e,t,n,r)=>{const a={};for(const n of e){const e=dt(t,n);e&&or(a,n,e._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},iy=e=>Fr(e)?e:cw(e)?e.source:da(e)?cw(e.value)?e.value.source:e.value:e,Yae=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function qz(e,t,n){const r=dt(e,n);if(r||lT(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const r=a.join("."),o=dt(t,r),i=dt(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(i&&i.type)return{name:r,error:i};a.pop()}return{name:n}}var Zae=(e,t,n,r,a)=>!a.isOnAll&&(!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:!(n?r.isOnChange:a.isOnChange)||e),Xae=(e,t)=>!G_(dt(e,t)).length&&Va(e,t);const Jae={mode:Ic.onSubmit,reValidateMode:Ic.onChange,shouldFocusError:!0};function eoe(e={}){let t,n={...Jae,...e},r={submitCount:0,isDirty:!1,isLoading:hp(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},a={},o=(da(n.defaultValues)||da(n.values))&&Ns(n.defaultValues||n.values)||{},i=n.shouldUnregister?{}:Ns(o),s={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:VE(),array:VE(),state:VE()},d=Nz(n.mode),p=Nz(n.reValidateMode),h=n.criteriaMode===Ic.all,m=async e=>{if(u.isValid||e){const e=n.resolver?Ls((await _()).errors):await w(a,!0);e!==r.isValid&&f.state.next({isValid:e})}},y=(e,t)=>{(u.isValidating||u.validatingFields)&&(t.forEach((t=>{or(r.validatingFields,t,e)})),r.isValidating=Kae(r.validatingFields),f.state.next({validatingFields:r.validatingFields,isValidating:r.isValidating}))},g=(e,t,n,r)=>{const c=dt(a,e);if(c){const a=dt(i,e,Fr(n)?dt(o,e):n);Fr(a)||r&&r.defaultChecked||t?or(i,e,t?a:qE(c._f)):S(e,a),s.mount&&m()}},v=(e,t,n,i,s)=>{let c=!1,l=!1;const d={name:e},p=!(!dt(a,e)||!dt(a,e)._f.disabled);if(!n||i){u.isDirty&&(l=r.isDirty,r.isDirty=d.isDirty=k(),c=l!==d.isDirty);const n=p||rm(dt(o,e),t);l=!(p||!dt(r.dirtyFields,e)),n||p?Va(r.dirtyFields,e):or(r.dirtyFields,e,!0),d.dirtyFields=r.dirtyFields,c=c||u.dirtyFields&&l!==!n}if(n){const t=dt(r.touchedFields,e);t||(or(r.touchedFields,e,n),d.touchedFields=r.touchedFields,c=c||u.touchedFields&&t!==n)}return c&&s&&f.state.next(d),c?d:{}},b=(n,a,o,i)=>{const s=dt(r.errors,n),c=u.isValid&&du(a)&&r.isValid!==a;if(e.delayError&&o?(t=(e=>t=>{clearTimeout(l),l=setTimeout(e,t)})((()=>((e,t)=>{or(r.errors,e,t),f.state.next({errors:r.errors})})(n,o))),t(e.delayError)):(clearTimeout(l),t=null,o?or(r.errors,n,o):Va(r.errors,n)),(o?!rm(s,o):s)||!Ls(i)||c){const e={...i,...c&&du(a)?{isValid:a}:{},errors:r.errors,name:n};r={...r,...e},f.state.next(e)}y(!1,Object.keys(r.validatingFields).filter((e=>e===n)))},_=async e=>n.resolver(i,n.context,Qae(e||c.mount,a,n.criteriaMode,n.shouldUseNativeValidation)),w=async(e,t,a={valid:!0})=>{for(const o in e){const s=e[o];if(s){const{_f:e,...o}=s;if(e){const o=c.array.has(e.name),l=await Uz(s,i,h,n.shouldUseNativeValidation&&!t,o);if(l[e.name]&&(a.valid=!1,t))break;!t&&(dt(l,e.name)?o?qae(r.errors,l,e.name):or(r.errors,e.name,l[e.name]):Va(r.errors,e.name))}o&&await w(o,t,a)}}return a.valid},k=(e,t)=>(e&&t&&or(i,e,t),!rm(T(),o)),x=(e,t,n)=>Vae(e,c,{...s.mount?i:Fr(t)?o:Nl(e)?{[e]:t}:t},n,t),S=(e,t,n={})=>{const r=dt(a,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&or(i,e,Mj(t,n)),o=sw(n.ref)&&ti(t)?"":t,$j(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?H_(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):fT(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||f.values.next({name:e,values:{...i}})))}(n.shouldDirty||n.shouldTouch)&&v(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&I(e)},E=(e,t,n)=>{for(const r in t){const o=t[r],i=`${e}.${r}`,s=dt(a,i);!c.array.has(e)&&lw(o)&&(!s||s._f)||d1(o)?S(i,o,n):E(i,o,n)}},A=(e,t,n={})=>{const l=dt(a,e),d=c.array.has(e),p=Ns(t);or(i,e,p),d?(f.array.next({name:e,values:{...i}}),(u.isDirty||u.dirtyFields)&&n.shouldDirty&&f.state.next({name:e,dirtyFields:ob(o,i),isDirty:k(e,p)})):!l||l._f||ti(p)?S(e,p,n):E(e,p,n),Lz(e,c)&&f.state.next({...r}),f.values.next({name:s.mount?e:void 0,values:{...i}})},z=async e=>{const o=e.target;let s=o.name,l=!0;const g=dt(a,s),k=e=>{l=Number.isNaN(e)||e===dt(i,s,e)};if(g){let x,S;const E=o.type?qE(g._f):Oae(e),A=e.type===Dz.BLUR||e.type===Dz.FOCUS_OUT,z=!Yae(g._f)&&!n.resolver&&!dt(r.errors,s)&&!g._f.deps||Zae(A,dt(r.touchedFields,s),r.isSubmitted,p,d),C=Lz(s,c,A);or(i,s,E),A?(g._f.onBlur&&g._f.onBlur(e),t&&t(0)):g._f.onChange&&g._f.onChange(e);const T=v(s,E,A,!1),R=!Ls(T)||C;if(!A&&f.values.next({name:s,type:e.type,values:{...i}}),z)return u.isValid&&m(),R&&f.state.next({name:s,...C?{}:T});if(!A&&C&&f.state.next({...r}),y(!0,[s]),n.resolver){const{errors:e}=await _([s]);if(k(E),l){const t=qz(r.errors,a,s),n=qz(e,a,t.name||s);x=n.error,s=n.name,S=Ls(e)}}else x=(await Uz(g,i,h,n.shouldUseNativeValidation))[s],k(E),l&&(x?S=!1:u.isValid&&(S=await w(a,!0)));l&&(g._f.deps&&I(g._f.deps),b(s,S,x,T))}},C=(e,t)=>{if(dt(r.errors,t)&&e.focus)return e.focus(),1},I=async(e,t={})=>{let o,i;const s=BE(e);if(y(!0,s),n.resolver){const t=await(async e=>{const{errors:t}=await _(e);if(e)for(const n of e){const e=dt(t,n);e?or(r.errors,n,e):Va(r.errors,n)}else r.errors=t;return t})(Fr(e)?e:s);o=Ls(t),i=e?!s.some((e=>dt(t,e))):o}else e?(i=(await Promise.all(s.map((async e=>{const t=dt(a,e);return await w(t&&t._f?{[e]:t}:t)})))).every(Boolean),(i||r.isValid)&&m()):i=o=await w(a);return f.state.next({...!Nl(e)||u.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors,isValidating:!1}),t.shouldFocus&&!i&&$y(a,C,e?s:c.mount),i},T=e=>{const t={...o,...s.mount?i:{}};return Fr(e)?t:Nl(e)?dt(t,e):e.map((e=>dt(t,e)))},R=(e,t)=>({invalid:!!dt((t||r).errors,e),isDirty:!!dt((t||r).dirtyFields,e),isTouched:!!dt((t||r).touchedFields,e),isValidating:!!dt((t||r).validatingFields,e),error:dt((t||r).errors,e)}),P=(e,t,n)=>{const o=(dt(a,e,{_f:{}})._f||{}).ref;or(r.errors,e,{...t,ref:o}),f.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},j=(e,t={})=>{for(const s of e?BE(e):c.mount)c.mount.delete(s),c.array.delete(s),t.keepValue||(Va(a,s),Va(i,s)),!t.keepError&&Va(r.errors,s),!t.keepDirty&&Va(r.dirtyFields,s),!t.keepTouched&&Va(r.touchedFields,s),!t.keepIsValidating&&Va(r.validatingFields,s),!n.shouldUnregister&&!t.keepDefaultValue&&Va(o,s);f.values.next({values:{...i}}),f.state.next({...r,...t.keepDirty?{isDirty:k()}:{}}),!t.keepIsValid&&m()},O=({disabled:e,name:t,field:n,fields:r,value:a})=>{if(du(e)){const o=e?void 0:Fr(a)?qE(n?n._f:dt(r,t)._f):a;or(i,t,o),v(t,o,!1,!1,!0)}},N=(e,t={})=>{let r=dt(a,e);const i=du(t.disabled);return or(a,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),c.mount.add(e),r?O({field:r,disabled:t.disabled,name:e,value:t.value}):g(e,!0,t.value),{...i?{disabled:t.disabled}:{},...n.progressive?{required:!!t.required,min:iy(t.min),max:iy(t.max),minLength:iy(t.minLength),maxLength:iy(t.maxLength),pattern:iy(t.pattern)}:{},name:e,onChange:z,onBlur:z,ref:i=>{if(i){N(e,t),r=dt(a,e);const n=Fr(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,s=Gae(n),c=r._f.refs||[];if(s?c.find((e=>e===n)):n===r._f.ref)return;or(a,e,{_f:{...r._f,...s?{refs:[...c.filter(UE),n,...Array.isArray(dt(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),g(e,!1,void 0,n)}else r=dt(a,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!Mae(c.array,e)||!s.action)&&c.unMount.add(e)}}},M=()=>n.shouldFocusError&&$y(a,C,c.mount),D=(e,t)=>async o=>{let s;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let c=Ns(i);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await _();r.errors=e,c=t}else await w(a);if(Va(r.errors,"root"),Ls(r.errors)){f.state.next({errors:{}});try{await e(c,o)}catch(e){s=e}}else t&&await t({...r.errors},o),M(),setTimeout(M);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ls(r.errors)&&!s,submitCount:r.submitCount+1,errors:r.errors}),s)throw s},B=(t,n={})=>{const l=t?Ns(t):o,d=Ns(l),p=Ls(t),h=p?o:d;if(n.keepDefaultValues||(o=l),!n.keepValues){if(n.keepDirtyValues)for(const e of c.mount)dt(r.dirtyFields,e)?or(h,e,dt(i,e)):A(e,dt(h,e));else{if(cT&&Fr(t))for(const e of c.mount){const t=dt(a,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(sw(e)){const t=e.closest("form");if(t){t.reset();break}}}}a={}}i=e.shouldUnregister?n.keepDefaultValues?Ns(o):{}:Ns(h),f.array.next({values:{...h}}),f.values.next({values:{...h}})}c={mount:n.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!u.isValid||!!n.keepIsValid||!!n.keepDirtyValues,s.watch=!!e.shouldUnregister,f.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:!p&&(n.keepDirty?r.isDirty:!(!n.keepDefaultValues||rm(t,o))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:p?[]:n.keepDirtyValues?n.keepDefaultValues&&i?ob(o,i):r.dirtyFields:n.keepDefaultValues&&t?ob(o,t):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},L=(e,t)=>B(hp(e)?e(i):e,t);return{control:{register:N,unregister:j,getFieldState:R,handleSubmit:D,setError:P,_executeSchema:_,_getWatch:x,_getDirty:k,_updateValid:m,_removeUnmounted:()=>{for(const e of c.unMount){const t=dt(a,e);t&&(t._f.refs?t._f.refs.every((e=>!UE(e))):!UE(t._f.ref))&&j(e)}c.unMount=new Set},_updateFieldArray:(e,t=[],n,c,l=!0,d=!0)=>{if(c&&n){if(s.action=!0,d&&Array.isArray(dt(a,e))){const t=n(dt(a,e),c.argA,c.argB);l&&or(a,e,t)}if(d&&Array.isArray(dt(r.errors,e))){const t=n(dt(r.errors,e),c.argA,c.argB);l&&or(r.errors,e,t),Xae(r.errors,e)}if(u.touchedFields&&d&&Array.isArray(dt(r.touchedFields,e))){const t=n(dt(r.touchedFields,e),c.argA,c.argB);l&&or(r.touchedFields,e,t)}u.dirtyFields&&(r.dirtyFields=ob(o,i)),f.state.next({name:e,isDirty:k(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else or(i,e,t)},_updateDisabledField:O,_getFieldArray:t=>G_(dt(s.mount?i:o,t,e.shouldUnregister?dt(o,t,[]):[])),_reset:B,_resetDefaultValues:()=>hp(n.defaultValues)&&n.defaultValues().then((e=>{L(e,n.resetOptions),f.state.next({isLoading:!1})})),_updateFormState:e=>{r={...r,...e}},_disableForm:e=>{du(e)&&(f.state.next({disabled:e}),$y(a,((t,n)=>{let r=e;const o=dt(a,n);o&&du(o._f.disabled)&&(r||(r=o._f.disabled)),t.disabled=r}),0,!1))},_subjects:f,_proxyFormState:u,_setErrors:e=>{r.errors=e,f.state.next({errors:r.errors,isValid:!1})},get _fields(){return a},get _formValues(){return i},get _state(){return s},set _state(e){s=e},get _defaultValues(){return o},get _names(){return c},set _names(e){c=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:I,register:N,handleSubmit:D,watch:(e,t)=>hp(e)?f.values.subscribe({next:n=>e(x(void 0,t),n)}):x(e,t,!0),setValue:A,getValues:T,reset:L,resetField:(e,t={})=>{dt(a,e)&&(Fr(t.defaultValue)?A(e,Ns(dt(o,e))):(A(e,t.defaultValue),or(o,e,Ns(t.defaultValue))),t.keepTouched||Va(r.touchedFields,e),t.keepDirty||(Va(r.dirtyFields,e),r.isDirty=t.defaultValue?k(e,Ns(dt(o,e))):k()),t.keepError||(Va(r.errors,e),u.isValid&&m()),f.state.next({...r}))},clearErrors:e=>{e&&BE(e).forEach((e=>Va(r.errors,e))),f.state.next({errors:e?r.errors:{}})},unregister:j,setError:P,setFocus:(e,t={})=>{const n=dt(a,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:R}}function toe(e={}){const t=ze.useRef(),n=ze.useRef(),[r,a]=ze.useState({isDirty:!1,isValidating:!1,isLoading:hp(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:hp(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...eoe(e),formState:r});const o=t.current.control;return o._options=e,Bae({subject:o._subjects.state,next:e=>{Fae(e,o._proxyFormState,o._updateFormState)&&a({...o._formState})}}),ze.useEffect((()=>o._disableForm(e.disabled)),[o,e.disabled]),ze.useEffect((()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==r.isDirty&&o._subjects.state.next({isDirty:e})}}),[o,r.isDirty]),ze.useEffect((()=>{e.values&&!rm(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,a((e=>({...e})))):o._resetDefaultValues()}),[e.values,o]),ze.useEffect((()=>{e.errors&&o._setErrors(e.errors)}),[e.errors,o]),ze.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),ze.useEffect((()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})}),[e.shouldUnregister,o]),t.current.formState=jae(r,o),t.current}function Wz(e,[t,n]){return Math.min(n,Math.max(t,e))}const Dj=v.forwardRef(((e,t)=>v.createElement(St.span,Le({},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}})))),noe=Dj,roe=[" ","Enter","ArrowUp","ArrowDown"],aoe=[" ","Enter"],Ck="Select",[Rk,Ak,ooe]=qA(Ck),[Z1,ZWe]=ii(Ck,[ooe,Q1]),dT=Q1(),[ioe,Om]=Z1(Ck),[soe,coe]=Z1(Ck),loe=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:f,disabled:d,required:p}=e,h=dT(t),[m,y]=v.useState(null),[g,b]=v.useState(null),[_,w]=v.useState(!1),k=WA(l),[x=!1,S]=kp({prop:r,defaultProp:a,onChange:o}),[E,A]=kp({prop:i,defaultProp:s,onChange:c}),z=v.useRef(null),C=!m||!!m.closest("form"),[I,T]=v.useState(new Set),R=Array.from(I).map((e=>e.props.value)).join(";");return v.createElement(aj,h,v.createElement(ioe,{required:p,scope:t,trigger:m,onTriggerChange:y,valueNode:g,onValueNodeChange:b,valueNodeHasChildren:_,onValueNodeHasChildrenChange:w,contentId:mp(),value:E,onValueChange:A,open:x,onOpenChange:S,dir:k,triggerPointerDownPosRef:z,disabled:d},v.createElement(Rk.Provider,{scope:t},v.createElement(soe,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:v.useCallback((e=>{T((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),C?v.createElement(Bj,{key:R,"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:f,value:E,onChange:e=>A(e.target.value),disabled:d},void 0===E?v.createElement("option",{value:""}):null,Array.from(I)):null))},foe="SelectTrigger",uoe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=dT(n),i=Om(foe,n),s=i.disabled||r,c=yn(t,i.onTriggerChange),l=Ak(n),[u,f,d]=Vj((e=>{const t=l().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=Uj(t,e,n);void 0!==r&&i.onValueChange(r.value)})),p=()=>{s||(i.onOpenChange(!0),d())};return v.createElement(XA,Le({asChild:!0},o),v.createElement(St.button,Le({type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Fj(i.value)?"":void 0},a,{ref:c,onClick:lt(a.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:lt(a.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:lt(a.onKeyDown,(e=>{const t=""!==u.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&f(e.key),(!t||" "!==e.key)&&roe.includes(e.key)&&(p(),e.preventDefault())}))})))})),doe="SelectValue",poe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...s}=e,c=Om(doe,n),{onValueNodeHasChildrenChange:l}=c,u=void 0!==o,f=yn(t,c.onValueNodeChange);return Mo((()=>{l(u)}),[l,u]),v.createElement(St.span,Le({},s,{ref:f,style:{pointerEvents:"none"}}),Fj(c.value)?v.createElement(v.Fragment,null,i):o)})),hoe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return v.createElement(St.span,Le({"aria-hidden":!0},a,{ref:t}),r||"▼")})),moe=e=>v.createElement(sA,Le({asChild:!0},e)),A1="SelectContent",goe=v.forwardRef(((e,t)=>{const n=Om(A1,e.__scopeSelect),[r,a]=v.useState();if(Mo((()=>{a(new DocumentFragment)}),[]),!n.open){const t=r;return t?Zl.createPortal(v.createElement(Nj,{scope:e.__scopeSelect},v.createElement(Rk.Slot,{scope:e.__scopeSelect},v.createElement("div",null,e.children))),t):null}return v.createElement(yoe,Le({},e,{ref:t}))})),su=10,[Nj,zm]=Z1(A1),yoe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:y,...g}=e,b=Om(A1,n),[_,w]=v.useState(null),[k,x]=v.useState(null),S=yn(t,(e=>w(e))),[E,A]=v.useState(null),[z,C]=v.useState(null),I=Ak(n),[T,R]=v.useState(!1),P=v.useRef(!1);v.useEffect((()=>{if(_)return ak(_)}),[_]),cA();const j=v.useCallback((e=>{const[t,...n]=I().map((e=>e.ref.current)),[r]=n.slice(-1),a=document.activeElement;for(const n of e)if(n===a||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&k&&(k.scrollTop=0),n===r&&k&&(k.scrollTop=k.scrollHeight),null==n||n.focus(),document.activeElement!==a))return}),[I,k]),O=v.useCallback((()=>j([E,_])),[j,E,_]);v.useEffect((()=>{T&&O()}),[T,O]);const{onOpenChange:N,triggerPointerDownPosRef:M}=b;v.useEffect((()=>{if(_){let e={x:0,y:0};const t=t=>{var n,r,a,o;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=M.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(a=null===(o=M.current)||void 0===o?void 0:o.y)&&void 0!==a?a:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():_.contains(n.target)||N(!1),document.removeEventListener("pointermove",t),M.current=null};return null!==M.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[_,N,M]),v.useEffect((()=>{const e=()=>N(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[N]);const[D,B]=Vj((e=>{const t=I().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=Uj(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),L=v.useCallback(((e,t,n)=>{const r=!P.current&&!n;(void 0!==b.value&&b.value===t||r)&&(A(e),r&&(P.current=!0))}),[b.value]),V=v.useCallback((()=>null==_?void 0:_.focus()),[_]),q=v.useCallback(((e,t,n)=>{const r=!P.current&&!n;(void 0!==b.value&&b.value===t||r)&&C(e)}),[b.value]),F="popper"===r?Hz:_oe,U=F===Hz?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:y}:{};return v.createElement(Nj,{scope:n,content:_,viewport:k,onViewportChange:x,itemRefCallback:L,selectedItem:E,onItemLeave:V,itemTextRefCallback:q,focusSelectedItem:O,selectedItemText:z,position:r,isPositioned:T,searchRef:D},v.createElement(rk,{as:hm,allowPinchZoom:!0},v.createElement(iA,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:lt(a,(e=>{var t;null===(t=b.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},v.createElement(tk,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1)},v.createElement(F,Le({role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault()},g,U,{onPlaced:()=>R(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:lt(g.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&B(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=I().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((()=>j(t))),e.preventDefault()}}))}))))))})),_oe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=Om(A1,n),i=zm(A1,n),[s,c]=v.useState(null),[l,u]=v.useState(null),f=yn(t,(e=>u(e))),d=Ak(n),p=v.useRef(!1),h=v.useRef(!0),{viewport:m,selectedItem:y,selectedItemText:g,focusSelectedItem:b}=i,_=v.useCallback((()=>{if(o.trigger&&o.valueNode&&s&&l&&m&&y&&g){const e=o.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=g.getBoundingClientRect();if("rtl"!==o.dir){const r=a.left-t.left,o=n.left-r,i=e.left-o,c=e.width+i,l=Math.max(c,t.width),u=window.innerWidth-su,f=Wz(o,[su,u-l]);s.style.minWidth=c+"px",s.style.left=f+"px"}else{const r=t.right-a.right,o=window.innerWidth-n.right-r,i=window.innerWidth-e.right-o,c=e.width+i,l=Math.max(c,t.width),u=window.innerWidth-su,f=Wz(o,[su,u-l]);s.style.minWidth=c+"px",s.style.right=f+"px"}const i=d(),c=window.innerHeight-2*su,u=m.scrollHeight,f=window.getComputedStyle(l),h=parseInt(f.borderTopWidth,10),v=parseInt(f.paddingTop,10),b=parseInt(f.borderBottomWidth,10),_=h+v+u+parseInt(f.paddingBottom,10)+b,w=Math.min(5*y.offsetHeight,_),k=window.getComputedStyle(m),x=parseInt(k.paddingTop,10),S=parseInt(k.paddingBottom,10),E=e.top+e.height/2-su,A=c-E,z=y.offsetHeight/2,C=h+v+(y.offsetTop+z),I=_-C;if(C<=E){const e=y===i[i.length-1].ref.current;s.style.bottom="0px";const t=l.clientHeight-m.offsetTop-m.offsetHeight,n=C+Math.max(A,z+(e?S:0)+t+b);s.style.height=n+"px"}else{const e=y===i[0].ref.current;s.style.top="0px";const t=Math.max(E,h+m.offsetTop+(e?x:0)+z)+I;s.style.height=t+"px",m.scrollTop=C-E+m.offsetTop}s.style.margin=`${su}px 0`,s.style.minHeight=w+"px",s.style.maxHeight=c+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[d,o.trigger,o.valueNode,s,l,m,y,g,o.dir,r]);Mo((()=>_()),[_]);const[w,k]=v.useState();Mo((()=>{l&&k(window.getComputedStyle(l).zIndex)}),[l]);const x=v.useCallback((e=>{e&&!0===h.current&&(_(),null==b||b(),h.current=!1)}),[_,b]);return v.createElement(voe,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:x},v.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},v.createElement(St.div,Le({},a,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}}))))})),Hz=v.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=su,...o}=e,i=dT(n);return v.createElement(JA,Le({},i,o,{ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.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)"}}))})),[voe,pT]=Z1(A1,{}),Gz="SelectViewport",boe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=zm(Gz,n),o=pT(Gz,n),i=yn(t,a.onViewportChange),s=v.useRef(0);return v.createElement(v.Fragment,null,v.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}"}}),v.createElement(Rk.Slot,{scope:n},v.createElement(St.div,Le({"data-radix-select-viewport":"",role:"presentation"},r,{ref:i,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:lt(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(null!=r&&r.current&&n){const e=Math.abs(s.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*su,a=parseFloat(n.style.minHeight),o=parseFloat(n.style.height),i=Math.max(a,o);if(i<r){const a=i+e,o=Math.min(r,a),s=a-o;n.style.height=o+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}s.current=t.scrollTop}))}))))})),woe="SelectGroup",[koe,xoe]=Z1(woe),Soe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=mp();return v.createElement(koe,{scope:n,id:a},v.createElement(St.div,Le({role:"group","aria-labelledby":a},r,{ref:t})))})),Eoe="SelectLabel",Coe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=xoe(Eoe,n);return v.createElement(St.div,Le({id:a.id},r,{ref:t}))})),jC="SelectItem",[Roe,Lj]=Z1(jC),Aoe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,s=Om(jC,n),c=zm(jC,n),l=s.value===r,[u,f]=v.useState(o??""),[d,p]=v.useState(!1),h=yn(t,(e=>{var t;return null===(t=c.itemRefCallback)||void 0===t?void 0:t.call(c,e,r,a)})),m=mp(),y=()=>{a||(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 v.createElement(Roe,{scope:n,value:r,disabled:a,textId:m,isSelected:l,onItemTextChange:v.useCallback((e=>{f((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},v.createElement(Rk.ItemSlot,{scope:n,value:r,disabled:a,textValue:u},v.createElement(St.div,Le({role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":l&&d,"data-state":l?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1},i,{ref:h,onFocus:lt(i.onFocus,(()=>p(!0))),onBlur:lt(i.onBlur,(()=>p(!1))),onPointerUp:lt(i.onPointerUp,y),onPointerMove:lt(i.onPointerMove,(e=>{var t;a?null===(t=c.onItemLeave)||void 0===t||t.call(c):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:lt(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=c.onItemLeave)||void 0===t||t.call(c))})),onKeyDown:lt(i.onKeyDown,(e=>{var t;""!==(null===(t=c.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(aoe.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))}))))})),ib="SelectItemText",Toe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,i=Om(ib,n),s=zm(ib,n),c=Lj(ib,n),l=coe(ib,n),[u,f]=v.useState(null),d=yn(t,(e=>f(e)),c.onItemTextChange,(e=>{var t;return null===(t=s.itemTextRefCallback)||void 0===t?void 0:t.call(s,e,c.value,c.disabled)})),p=null==u?void 0:u.textContent,h=v.useMemo((()=>v.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p)),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:y}=l;return Mo((()=>(m(h),()=>y(h))),[m,y,h]),v.createElement(v.Fragment,null,v.createElement(St.span,Le({id:c.textId},o,{ref:d})),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Zl.createPortal(o.children,i.valueNode):null)})),Ioe="SelectItemIndicator",Poe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return Lj(Ioe,n).isSelected?v.createElement(St.span,Le({"aria-hidden":!0},r,{ref:t})):null})),Kz="SelectScrollUpButton",$oe=v.forwardRef(((e,t)=>{const n=zm(Kz,e.__scopeSelect),r=pT(Kz,e.__scopeSelect),[a,o]=v.useState(!1),i=yn(t,r.onScrollButtonChange);return Mo((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;o(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?v.createElement(jj,Le({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),Qz="SelectScrollDownButton",Ooe=v.forwardRef(((e,t)=>{const n=zm(Qz,e.__scopeSelect),r=pT(Qz,e.__scopeSelect),[a,o]=v.useState(!1),i=yn(t,r.onScrollButtonChange);return Mo((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;o(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?v.createElement(jj,Le({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),jj=v.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=zm("SelectScrollButton",n),i=v.useRef(null),s=Ak(n),c=v.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return v.useEffect((()=>()=>c()),[c]),Mo((()=>{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]),v.createElement(St.div,Le({"aria-hidden":!0},a,{ref:t,style:{flexShrink:0,...a.style},onPointerDown:lt(a.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:lt(a.onPointerMove,(()=>{var e;null===(e=o.onItemLeave)||void 0===e||e.call(o),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:lt(a.onPointerLeave,(()=>{c()}))}))})),zoe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return v.createElement(St.div,Le({"aria-hidden":!0},r,{ref:t}))}));function Fj(e){return""===e||void 0===e}const Bj=v.forwardRef(((e,t)=>{const{value:n,...r}=e,a=v.useRef(null),o=yn(t,a),i=yk(n);return v.useEffect((()=>{const e=a.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),v.createElement(Dj,{asChild:!0},v.createElement("select",Le({},r,{ref:o,defaultValue:n})))}));function Vj(e){const t=Fc(e),n=v.useRef(""),r=v.useRef(0),a=v.useCallback((e=>{const a=n.current+e;t(a),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(a)}),[t]),o=v.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return v.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,a,o]}function Uj(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,a=n?e.indexOf(n):-1;let o=Moe(e,Math.max(a,0));1===r.length&&(o=o.filter((e=>e!==n)));const i=o.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function Moe(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}Bj.displayName="BubbleSelect";const qj=loe,Wj=uoe,Hj=poe,Doe=hoe,Noe=moe,Gj=goe,Loe=boe,Kj=Soe,Qj=Coe,Yj=Aoe,joe=Toe,Foe=Poe,Zj=$oe,Xj=Ooe,Jj=zoe,Boe=qj,hT=v.forwardRef((({...e},t)=>B.jsx(Boe,{ref:t,...e})));hT.displayName=qj.displayName;const mT=v.forwardRef(((e,t)=>B.jsx(Kj,{ref:t,...e})));mT.displayName=Kj.displayName;const gT=v.forwardRef(((e,t)=>B.jsx(Hj,{ref:t,...e})));gT.displayName=Hj.displayName;const yT=v.forwardRef((({className:e,children:t,...n},r)=>B.jsxs(Wj,{ref:r,className:$e("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-slate-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:text-left",e),...n,children:[t,B.jsx(Doe,{asChild:!0,children:B.jsx(X8,{className:"h-4 w-4 opacity-50"})})]})));yT.displayName=Wj.displayName;const eF=v.forwardRef((({className:e,...t},n)=>B.jsx(Zj,{ref:n,className:$e("flex cursor-default items-center justify-center py-1",e),...t,children:B.jsx(bG,{className:"h-4 w-4"})})));eF.displayName=Zj.displayName;const tF=v.forwardRef((({className:e,...t},n)=>B.jsx(Xj,{ref:n,className:$e("flex cursor-default items-center justify-center py-1",e),...t,children:B.jsx(X8,{className:"h-4 w-4"})})));tF.displayName=Xj.displayName;const _T=v.forwardRef((({className:e,children:t,position:n="popper",...r},a)=>B.jsx(Noe,{children:B.jsxs(Gj,{ref:a,className:$e("relative z-[150] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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","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:[B.jsx(eF,{}),B.jsx(Loe,{className:$e("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),B.jsx(tF,{})]})})));_T.displayName=Gj.displayName;const nF=v.forwardRef((({className:e,...t},n)=>B.jsx(Qj,{ref:n,className:$e("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t})));nF.displayName=Qj.displayName;const vT=v.forwardRef((({className:e,showCheck:t=!0,children:n,...r},a)=>B.jsxs(Yj,{ref:a,className:$e("relative flex w-full cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-base outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[t&&B.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:B.jsx(Foe,{children:B.jsx(tA,{className:"size-4"})})}),B.jsx(joe,{children:n})]})));vT.displayName=Yj.displayName;const rF=v.forwardRef((({className:e,...t},n)=>B.jsx(Jj,{ref:n,className:$e("-mx-1 my-1 h-px bg-muted",e),...t})));rF.displayName=Jj.displayName;const Voe=v.createContext({}),Mp=()=>{const e=v.useContext(Voe),t=v.useContext(aF),n=Nae();e||console.error("useFormContext must be used within a FormProvider");const{getFieldState:r,formState:a}=n,o=r(e.name,a);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...o}},aF=v.createContext({}),Uoe=v.forwardRef((({className:e,...t},n)=>{const r=v.useId();return B.jsx(aF.Provider,{value:{id:r},children:B.jsx("div",{ref:n,className:$e("mt-[8px]",e),...t})})}));Uoe.displayName="FormItem";const qoe=v.forwardRef((({className:e,isRequired:t,...n},r)=>{var a;const{formItemId:o}=Mp();return B.jsx(ST,{ref:r,className:$e("mb-2 text-sm font-medium",e),htmlFor:o,...n,children:t?`*${null==(a=n.children)?void 0:a.toString()}`:n.children})}));qoe.displayName="FormLabel";const Woe=v.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:a,formMessageId:o}=Mp();return B.jsx(Op,{ref:t,id:r,"aria-describedby":n?`${a} ${o}`:`${a}`,"aria-invalid":!!n,...e})}));Woe.displayName="FormControl";const Hoe=v.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=Mp();return B.jsx("p",{ref:n,id:r,className:$e("text-sm text-muted-foreground",e),...t})}));Hoe.displayName="FormDescription";const Goe=v.forwardRef((({className:e,children:t,...n},r)=>{const{error:a,formMessageId:o}=Mp(),i=a?String(null==a?void 0:a.message):t;return i?B.jsxs("p",{ref:r,id:o,className:$e("flex items-center gap-0.5 pt-1 text-sm font-medium text-destructive",e),...n,children:[B.jsx(UG,{size:16,className:"text-red-dark"})," ",i]}):null}));Goe.displayName="FormMessage";const Koe=v.forwardRef((({...e},t)=>{const{name:n}=Mp();return B.jsx(hT,{ref:t,name:n,...e})}));Koe.displayName="FormSelect";const Qoe=v.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:a}=Mp();return B.jsx(yT,{ref:r,id:a,className:e,...n,children:t})}));Qoe.displayName="FormSelectTrigger";const Yoe=v.forwardRef(((e,t)=>B.jsx(_T,{ref:t,...e})));Yoe.displayName="FormSelectContent";const Zoe=v.forwardRef(((e,t)=>B.jsx(vT,{ref:t,...e})));Zoe.displayName="FormSelectItem";const Xoe=v.forwardRef(((e,t)=>B.jsx(mT,{ref:t,...e})));Xoe.displayName="FormSelectGroup";const Joe=v.forwardRef(((e,t)=>B.jsx(nF,{ref:t,...e})));Joe.displayName="FormSelectLabel";const eie=v.forwardRef(((e,t)=>B.jsx(rF,{ref:t,...e})));eie.displayName="FormSelectSeparator";const tie=v.forwardRef(((e,t)=>B.jsx(gT,{ref:t,...e})));function cm(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 oF(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>v.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return v.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=v.createContext(r),o=n.length;function i(t){const{scope:n,children:r,...i}=t,s=(null==n?void 0:n[e][o])||a,c=v.useMemo((()=>i),Object.values(i));return v.createElement(s.Provider,{value:c},r)}return n=[...n,r],i.displayName=t+"Provider",[i,function(n,i){const s=(null==i?void 0:i[e][o])||a,c=v.useContext(s);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},nie(r,...t)]}function nie(...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 v.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function Tk(e){const t=v.useRef(e);return v.useEffect((()=>{t.current=e})),v.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function rie(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function aie(...e){return t=>e.forEach((e=>rie(e,t)))}function oie(...e){return v.useCallback(aie(...e),e)}function Mm(e){return e.split("-")[0]}function K_(e){return e.split("-")[1]}function X1(e){return["top","bottom"].includes(Mm(e))?"x":"y"}function bT(e){return"y"===e?"height":"width"}function Yz(e,t,n){let{reference:r,floating:a}=e;const o=r.x+r.width/2-a.width/2,i=r.y+r.height/2-a.height/2,s=X1(t),c=bT(s),l=r[c]/2-a[c]/2,u="x"===s;let f;switch(Mm(t)){case"top":f={x:o,y:r.y-a.height};break;case"bottom":f={x:o,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:i};break;case"left":f={x:r.x-a.width,y:i};break;default:f={x:r.x,y:r.y}}switch(K_(t)){case"start":f[s]-=l*(n&&u?-1:1);break;case"end":f[s]+=l*(n&&u?-1:1)}return f}tie.displayName="FormSelectValue";const iie=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:l,y:u}=Yz(c,r,s),f=r,d={},p=0;for(let n=0;n<o.length;n++){const{name:h,fn:m}=o[n],{x:y,y:g,data:v,reset:b}=await m({x:l,y:u,initialPlacement:r,placement:f,strategy:a,middlewareData:d,rects:c,platform:i,elements:{reference:e,floating:t}});l=y??l,u=g??u,d={...d,[h]:{...d[h],...v}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:l,y:u}=Yz(c,f,s))),n=-1)}return{x:l,y:u,placement:f,strategy:a,middlewareData:d}};function iF(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 uw(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function i_(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=t,h=iF(p),m=s[d?"floating"===f?"reference":"floating":f],y=uw(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),g=uw(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===f?{...i.floating,x:r,y:a}:i.reference,offsetParent:await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),strategy:c}):i[f]);return{top:y.top-g.top+h.top,bottom:g.bottom-y.bottom+h.bottom,left:y.left-g.left+h.left,right:g.right-y.right+h.right}}const sie=Math.min,Jh=Math.max;function FC(e,t,n){return Jh(e,sie(t,n))}const Zz=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:a,y:o,placement:i,rects:s,platform:c}=t;if(null==n)return{};const l=iF(r),u={x:a,y:o},f=X1(i),d=K_(i),p=bT(f),h=await c.getDimensions(n),m="y"===f?"top":"left",y="y"===f?"bottom":"right",g=s.reference[p]+s.reference[f]-u[f]-s.floating[p],v=u[f]-s.reference[f],b=await(null==c.getOffsetParent?void 0:c.getOffsetParent(n));let _=b?"y"===f?b.clientHeight||0:b.clientWidth||0:0;0===_&&(_=s.floating[p]);const w=g/2-v/2,k=l[m],x=_-h[p]-l[y],S=_/2-h[p]/2+w,E=FC(k,S,x),A=("start"===d?l[m]:l[y])>0&&S!==E&&s.reference[p]<=s.floating[p];return{[f]:u[f]-(A?S<k?k-S:x-S:0),data:{[f]:E,centerOffset:S-E}}}}),cie={left:"right",right:"left",bottom:"top",top:"bottom"};function dw(e){return e.replace(/left|right|bottom|top/g,(e=>cie[e]))}function lie(e,t,n){void 0===n&&(n=!1);const r=K_(e),a=X1(e),o=bT(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=dw(i)),{main:i,cross:dw(i)}}const fie={start:"end",end:"start"};function Xz(e){return e.replace(/start|end/g,(e=>fie[e]))}const sF=["top","right","bottom","left"];sF.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const uie=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:a,rects:o,initialPlacement:i,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",flipAlignment:p=!0,...h}=e,m=Mm(r),y=[i,...f||(m!==i&&p?function(e){const t=dw(e);return[Xz(e),t,Xz(t)]}(i):[dw(i)])],g=await i_(t,h),v=[];let b=(null==(n=a.flip)?void 0:n.overflows)||[];if(l&&v.push(g[m]),u){const{main:e,cross:t}=lie(r,o,await(null==s.isRTL?void 0:s.isRTL(c.floating)));v.push(g[e],g[t])}if(b=[...b,{placement:r,overflows:v}],!v.every((e=>e<=0))){var _,w;const e=(null!=(_=null==(w=a.flip)?void 0:w.index)?_:0)+1,t=y[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(d){case"bestFit":{var k;const e=null==(k=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:k[0].placement;e&&(n=e);break}case"initialPlacement":n=i}if(r!==n)return{reset:{placement:n}}}return{}}}};function Jz(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eM(e){return sF.some((t=>e[t]>=0))}const die=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=Jz(await i_(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:eM(t)}}}case"escaped":{const t=Jz(await i_(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:eM(t)}}}default:return{}}}}},pie=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,a=await async function(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=Mm(n),s=K_(n),c="x"===X1(n),l=["left","top"].includes(i)?-1:1,u=o&&c?-1:1,f="function"==typeof t?t(e):t;let{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),c?{x:p*u,y:d*l}:{x:d*l,y:p*u}}(t,e);return{x:n+a.x,y:r+a.y,data:a}}}};function cF(e){return"x"===e?"y":"x"}const hie=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=e,l={x:n,y:r},u=await i_(t,c),f=X1(Mm(a)),d=cF(f);let p=l[f],h=l[d];if(o){const e="y"===f?"bottom":"right";p=FC(p+u["y"===f?"top":"left"],p,p-u[e])}if(i){const e="y"===d?"bottom":"right";h=FC(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},mie=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=e,u={x:n,y:r},f=X1(a),d=cF(f);let p=u[f],h=u[d];const m="function"==typeof s?s({...o,placement:a}):s,y="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const e="y"===f?"height":"width",t=o.reference[f]-o.floating[e]+y.mainAxis,n=o.reference[f]+o.reference[e]-y.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var g,v,b,_;const e="y"===f?"width":"height",t=["top","left"].includes(Mm(a)),n=o.reference[d]-o.floating[e]+(t&&null!=(g=null==(v=i.offset)?void 0:v[d])?g:0)+(t?0:y.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:null!=(b=null==(_=i.offset)?void 0:_[d])?b:0)-(t?y.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},gie=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:a,elements:o}=t,{apply:i,...s}=e,c=await i_(t,s),l=Mm(n),u=K_(n);let f,d;"top"===l||"bottom"===l?(f=l,d=u===(await(null==a.isRTL?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(d=l,f="end"===u?"top":"bottom");const p=Jh(c.left,0),h=Jh(c.right,0),m=Jh(c.top,0),y=Jh(c.bottom,0),g={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==m||0!==y?m+y:Jh(c.top,c.bottom)):c[f]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==h?p+h:Jh(c.left,c.right)):c[d])},v=await a.getDimensions(o.floating);null==i||i({...t,...g});const b=await a.getDimensions(o.floating);return v.width!==b.width||v.height!==b.height?{reset:{rects:!0}}:{}}}};function lF(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Ru(e){if(null==e)return window;if(!lF(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Q_(e){return Ru(e).getComputedStyle(e)}function mu(e){return lF(e)?"":e?(e.nodeName||"").toLowerCase():""}function fF(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function Wl(e){return e instanceof Ru(e).HTMLElement}function Rp(e){return e instanceof Ru(e).Element}function wT(e){return!(typeof ShadowRoot>"u")&&(e instanceof Ru(e).ShadowRoot||e instanceof ShadowRoot)}function Ik(e){const{overflow:t,overflowX:n,overflowY:r}=Q_(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function yie(e){return["table","td","th"].includes(mu(e))}function tM(e){const t=/firefox/i.test(fF()),n=Q_(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 uF(){return!/^((?!chrome|android).)*safari/i.test(fF())}const nM=Math.min,Oy=Math.max,pw=Math.round;function gu(e,t,n){var r,a,o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect();let c=1,l=1;t&&Wl(e)&&(c=e.offsetWidth>0&&pw(s.width)/e.offsetWidth||1,l=e.offsetHeight>0&&pw(s.height)/e.offsetHeight||1);const u=Rp(e)?Ru(e):window,f=!uF()&&n,d=(s.left+(f&&null!=(r=null==(a=u.visualViewport)?void 0:a.offsetLeft)?r:0))/c,p=(s.top+(f&&null!=(o=null==(i=u.visualViewport)?void 0:i.offsetTop)?o:0))/l,h=s.width/c,m=s.height/l;return{width:h,height:m,top:p,right:d+h,bottom:p+m,left:d,x:d,y:p}}function yp(e){return(t=e,(t instanceof Ru(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Pk(e){return Rp(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function dF(e){return gu(yp(e)).left+Pk(e).scrollLeft}function _ie(e,t,n){const r=Wl(t),a=yp(t),o=gu(e,r&&function(e){const t=gu(e);return pw(t.width)!==e.offsetWidth||pw(t.height)!==e.offsetHeight}(t),"fixed"===n);let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==mu(t)||Ik(a))&&(i=Pk(t)),Wl(t)){const e=gu(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=dF(a));return{x:o.left+i.scrollLeft-s.x,y:o.top+i.scrollTop-s.y,width:o.width,height:o.height}}function pF(e){return"html"===mu(e)?e:e.assignedSlot||e.parentNode||(wT(e)?e.host:null)||yp(e)}function rM(e){return Wl(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function BC(e){const t=Ru(e);let n=rM(e);for(;n&&yie(n)&&"static"===getComputedStyle(n).position;)n=rM(n);return n&&("html"===mu(n)||"body"===mu(n)&&"static"===getComputedStyle(n).position&&!tM(n))?t:n||function(e){let t=pF(e);for(wT(t)&&(t=t.host);Wl(t)&&!["html","body"].includes(mu(t));){if(tM(t))return t;t=t.parentNode}return null}(e)||t}function aM(e){if(Wl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=gu(e);return{width:t.width,height:t.height}}function hF(e){const t=pF(e);return["html","body","#document"].includes(mu(t))?e.ownerDocument.body:Wl(t)&&Ik(t)?t:hF(t)}function hw(e,t){var n;void 0===t&&(t=[]);const r=hF(e),a=r===(null==(n=e.ownerDocument)?void 0:n.body),o=Ru(r),i=a?[o].concat(o.visualViewport||[],Ik(r)?r:[]):r,s=t.concat(i);return a?s:s.concat(hw(i))}function oM(e,t,n){return"viewport"===t?uw(function(e,t){const n=Ru(e),r=yp(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,c=0;if(a){o=a.width,i=a.height;const e=uF();(e||!e&&"fixed"===t)&&(s=a.offsetLeft,c=a.offsetTop)}return{width:o,height:i,x:s,y:c}}(e,n)):Rp(t)?function(e,t){const n=gu(e,!1,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft;return{top:r,left:a,x:a,y:r,right:a+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):uw(function(e){var t;const n=yp(e),r=Pk(e),a=null==(t=e.ownerDocument)?void 0:t.body,o=Oy(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=Oy(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0);let s=-r.scrollLeft+dF(e);const c=-r.scrollTop;return"rtl"===Q_(a||n).direction&&(s+=Oy(n.clientWidth,a?a.clientWidth:0)-o),{width:o,height:i,x:s,y:c}}(yp(e)))}function vie(e){const t=hw(e),n=["absolute","fixed"].includes(Q_(e).position)&&Wl(e)?BC(e):e;return Rp(n)?t.filter((e=>Rp(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&wT(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==mu(e))):[]}const bie={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?vie(t):[].concat(n),r],i=o[0],s=o.reduce(((e,n)=>{const r=oM(t,n,a);return e.top=Oy(r.top,e.top),e.right=nM(r.right,e.right),e.bottom=nM(r.bottom,e.bottom),e.left=Oy(r.left,e.left),e}),oM(t,i,a));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 a=Wl(n),o=yp(n);if(n===o)return t;let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((a||!a&&"fixed"!==r)&&(("body"!==mu(n)||Ik(o))&&(i=Pk(n)),Wl(n))){const e=gu(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-i.scrollLeft+s.x,y:t.y-i.scrollTop+s.y}},isElement:Rp,getDimensions:aM,getOffsetParent:BC,getDocumentElement:yp,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:_ie(t,BC(n),r),floating:{...aM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Q_(e).direction};function wie(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i=!0,animationFrame:s=!1}=r,c=a&&!s,l=o&&!s,u=c||l?[...Rp(e)?hw(e):[],...hw(t)]:[];u.forEach((e=>{c&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)}));let f,d=null;if(i){let r=!0;d=new ResizeObserver((()=>{r||n(),r=!1})),Rp(e)&&!s&&d.observe(e),d.observe(t)}let p=s?gu(e):null;return s&&function t(){const r=gu(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{c&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,s&&cancelAnimationFrame(f)}}const kie=(e,t,n)=>iie(e,t,{platform:bie,...n});var VC=typeof document<"u"?v.useLayoutEffect:v.useEffect;function UC(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,a;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(!UC(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){const n=a[r];if(!("_owner"===n&&e.$$typeof||UC(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function xie(e){const t=v.useRef(e);return VC((()=>{t.current=e})),t}function Sie(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:a}=void 0===e?{}:e;const o=v.useRef(null),i=v.useRef(null),s=xie(a),c=v.useRef(null),[l,u]=v.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[f,d]=v.useState(t);UC(null==f?void 0:f.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||d(t);const p=v.useCallback((()=>{!o.current||!i.current||kie(o.current,i.current,{middleware:f,placement:n,strategy:r}).then((e=>{h.current&&Zl.flushSync((()=>{u(e)}))}))}),[f,n,r]);VC((()=>{h.current&&p()}),[p]);const h=v.useRef(!1);VC((()=>(h.current=!0,()=>{h.current=!1})),[]);const m=v.useCallback((()=>{if("function"==typeof c.current&&(c.current(),c.current=null),o.current&&i.current)if(s.current){const e=s.current(o.current,i.current,p);c.current=e}else p()}),[p,s]),y=v.useCallback((e=>{o.current=e,m()}),[m]),g=v.useCallback((e=>{i.current=e,m()}),[m]),b=v.useMemo((()=>({reference:o,floating:i})),[]);return v.useMemo((()=>({...l,update:p,refs:b,reference:y,floating:g})),[l,p,b,y,g])}const Eie=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?Zz({element:t.current,padding:n}).fn(e):{}:t?Zz({element:t,padding:n}).fn(e):{}}};function Cie(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Rie(...e){return t=>e.forEach((e=>Cie(e,t)))}const mF=v.forwardRef(((e,t)=>{const{children:n,...r}=e,a=v.Children.toArray(n),o=a.find(Tie);if(o){const e=o.props.children,n=a.map((t=>t===o?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t));return v.createElement(qC,Le({},r,{ref:t}),v.isValidElement(e)?v.cloneElement(e,void 0,n):null)}return v.createElement(qC,Le({},r,{ref:t}),n)}));mF.displayName="Slot";const qC=v.forwardRef(((e,t)=>{const{children:n,...r}=e;return v.isValidElement(n)?v.cloneElement(n,{...Iie(r,n.props),ref:Rie(t,n.ref)}):v.Children.count(n)>1?v.Children.only(null):null}));qC.displayName="SlotClone";const Aie=({children:e})=>v.createElement(v.Fragment,null,e);function Tie(e){return v.isValidElement(e)&&e.type===Aie}function Iie(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}const Pie=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],WC=Pie.reduce(((e,t)=>{const n=v.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?mF:t;return v.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),v.createElement(o,Le({},a,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function $ie(e,t){e&&Zl.flushSync((()=>e.dispatchEvent(t)))}function Oie(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function zie(...e){return t=>e.forEach((e=>Oie(e,t)))}function Mie(...e){return v.useCallback(zie(...e),e)}const am=null!=globalThis&&globalThis.document?v.useLayoutEffect:()=>{};function Die(e){const[t,n]=v.useState(void 0);return am((()=>{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 a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const gF="Popper",[kT,yF]=oF(gF),[XWe,Nie]=kT(gF),mw="PopperContent",[Lie,JWe]=kT(mw),[jie,Fie]=kT(mw,{hasParent:!1,positionUpdateFns:new Set}),Bie=v.forwardRef(((e,t)=>{var n,r,a,o,i,s,c,l;const{__scopePopper:u,side:f="bottom",sideOffset:d=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:y=[],collisionPadding:g=0,sticky:b="partial",hideWhenDetached:_=!1,avoidCollisions:w=!0,onPlaced:k,...x}=e,S=Nie(mw,u),[E,A]=v.useState(null),z=Mie(t,(e=>A(e))),[C,I]=v.useState(null),T=Die(C),R=null!==(n=null==T?void 0:T.width)&&void 0!==n?n:0,P=null!==(r=null==T?void 0:T.height)&&void 0!==r?r:0,j=f+("center"!==p?"-"+p:""),O="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},N=Array.isArray(y)?y:[y],M=N.length>0,D={padding:O,boundary:N.filter(Uie),altBoundary:M},{reference:B,floating:L,strategy:V,x:q,y:F,placement:U,middlewareData:$,update:W}=Sie({strategy:"fixed",placement:j,whileElementsMounted:wie,middleware:[qie(),pie({mainAxis:d+P,alignmentAxis:h}),w?hie({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?mie():void 0,...D}):void 0,C?Eie({element:C,padding:m}):void 0,w?uie({...D}):void 0,gie({...D,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`)}}),Wie({arrowWidth:R,arrowHeight:P}),_?die({strategy:"referenceHidden"}):void 0].filter(Vie)});am((()=>{B(S.anchor)}),[B,S.anchor]);const H=null!==q&&null!==F,[G,Q]=_F(U),K=Tk(k);am((()=>{H&&(null==K||K())}),[H,K]);const Y=null===(a=$.arrow)||void 0===a?void 0:a.x,Z=null===(o=$.arrow)||void 0===o?void 0:o.y,X=0!==(null===(i=$.arrow)||void 0===i?void 0:i.centerOffset),[J,ee]=v.useState();am((()=>{E&&ee(window.getComputedStyle(E).zIndex)}),[E]);const{hasParent:te,positionUpdateFns:ne}=Fie(mw,u),re=!te;v.useLayoutEffect((()=>{if(!re)return ne.add(W),()=>{ne.delete(W)}}),[re,ne,W]),am((()=>{re&&H&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,H,ne]);const ae={"data-side":G,"data-align":Q,...x,ref:z,style:{...x.style,animation:H?void 0:"none",opacity:null!==(s=$.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return v.createElement("div",{ref:L,"data-radix-popper-content-wrapper":"",style:{position:V,left:0,top:0,transform:H?`translate3d(${Math.round(q)}px, ${Math.round(F)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(c=$.transformOrigin)||void 0===c?void 0:c.x,null===(l=$.transformOrigin)||void 0===l?void 0:l.y].join(" ")},dir:e.dir},v.createElement(Lie,{scope:u,placedSide:G,onArrowChange:I,arrowX:Y,arrowY:Z,shouldHideArrow:X},re?v.createElement(jie,{scope:u,hasParent:!0,positionUpdateFns:ne},v.createElement(WC.div,ae)):v.createElement(WC.div,ae)))}));function Vie(e){return void 0!==e}function Uie(e){return null!==e}const qie=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:a}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${a}px`),{}}}),Wie=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a,o,i;const{placement:s,rects:c,middlewareData:l}=t,u=0!==(null===(n=l.arrow)||void 0===n?void 0:n.centerOffset),f=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[p,h]=_F(s),m={start:"0%",center:"50%",end:"100%"}[h],y=(null!==(r=null===(a=l.arrow)||void 0===a?void 0:a.x)&&void 0!==r?r:0)+f/2,g=(null!==(o=null===(i=l.arrow)||void 0===i?void 0:i.y)&&void 0!==o?o:0)+d/2;let v="",b="";return"bottom"===p?(v=u?m:`${y}px`,b=-d+"px"):"top"===p?(v=u?m:`${y}px`,b=`${c.floating.height+d}px`):"right"===p?(v=-d+"px",b=u?m:`${g}px`):"left"===p&&(v=`${c.floating.width+d}px`,b=u?m:`${g}px`),{data:{x:v,y:b}}}});function _F(e){const[t,n="center"]=e.split("-");return[t,n]}const Hie=Bie;function Gie(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Kie(...e){return t=>e.forEach((e=>Gie(e,t)))}function Qie(...e){return v.useCallback(Kie(...e),e)}function Yie(e,t){return v.useReducer(((e,n)=>t[e][n]??e),e)}const vF=e=>{const{present:t,children:n}=e,r=Zie(t),a="function"==typeof n?n({present:r.isPresent}):v.Children.only(n),o=Qie(r.ref,a.ref);return"function"==typeof n||r.isPresent?v.cloneElement(a,{ref:o}):null};function Zie(e){const[t,n]=v.useState(),r=v.useRef({}),a=v.useRef(e),o=v.useRef("none"),i=e?"mounted":"unmounted",[s,c]=Yie(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect((()=>{const e=sb(r.current);o.current="mounted"===s?e:"none"}),[s]),am((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=sb(t);e?c("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?c("UNMOUNT"):c(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),a.current=e}}),[e,c]),am((()=>{if(t){const e=e=>{const n=sb(r.current).includes(e.animationName);e.target===t&&n&&Zl.flushSync((()=>c("ANIMATION_END")))},n=e=>{e.target===t&&(o.current=sb(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)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function sb(e){return(null==e?void 0:e.animationName)||"none"}function Xie(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Jie(...e){return t=>e.forEach((e=>Xie(e,t)))}function ese(...e){return v.useCallback(Jie(...e),e)}function tse(e,t=(null==globalThis?void 0:globalThis.document)){const n=Tk(e);v.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}vF.displayName="Presence";const HC="dismissableLayer.update",nse="dismissableLayer.pointerDownOutside",rse="dismissableLayer.focusOutside";let iM;const ase=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ose=v.forwardRef(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...l}=e,u=v.useContext(ase),[f,d]=v.useState(null),p=null!==(n=null==f?void 0:f.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,h]=v.useState({}),m=ese(t,(e=>d(e))),y=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(g),_=f?y.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,k=_>=b,x=ise((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));!k||n||(null==o||o(e),null==s||s(e),e.defaultPrevented||null==c||c())}),p),S=sse((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(null==i||i(e),null==s||s(e),e.defaultPrevented||null==c||c())}),p);return tse((e=>{_===u.layers.size-1&&(null==a||a(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),p),v.useEffect((()=>{if(f)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(iM=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),sM(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=iM)}}),[f,p,r,u]),v.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),sM())}),[f,u]),v.useEffect((()=>{const e=()=>h({});return document.addEventListener(HC,e),()=>document.removeEventListener(HC,e)}),[]),v.createElement(WC.div,Le({},l,{ref:m,style:{pointerEvents:w?k?"auto":"none":void 0,...e.style},onFocusCapture:cm(e.onFocusCapture,S.onFocusCapture),onBlurCapture:cm(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:cm(e.onPointerDownCapture,x.onPointerDownCapture)}))}));function ise(e,t=(null==globalThis?void 0:globalThis.document)){const n=Tk(e),r=v.useRef(!1),a=v.useRef((()=>{}));return v.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){bF(nse,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function sse(e,t=(null==globalThis?void 0:globalThis.document)){const n=Tk(e),r=v.useRef(!1);return v.useEffect((()=>{const e=e=>{e.target&&!r.current&&bF(rse,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 sM(){const e=new CustomEvent(HC);document.dispatchEvent(e)}function bF(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?$ie(a,o):a.dispatchEvent(o)}let WE;const wF="HoverCard",[kF,eHe]=oF(wF,[yF]),cse=yF(),[tHe,xF]=kF(wF),lse="HoverCardPortal",[nHe,fse]=kF(lse,{forceMount:void 0}),GC="HoverCardContent",use=v.forwardRef(((e,t)=>{const n=fse(GC,e.__scopeHoverCard),{forceMount:r=n.forceMount,...a}=e,o=xF(GC,e.__scopeHoverCard);return v.createElement(vF,{present:r||o.open},v.createElement(dse,Le({"data-state":o.open?"open":"closed"},a,{onPointerEnter:cm(e.onPointerEnter,cM(o.onOpen)),onPointerLeave:cm(e.onPointerLeave,cM(o.onClose)),ref:t})))})),dse=v.forwardRef(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,...s}=e,c=xF(GC,n),l=cse(n),u=v.useRef(null),f=oie(t,u),[d,p]=v.useState(!1);return v.useEffect((()=>{if(d){const e=document.body;return WE=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=WE,e.style.webkitUserSelect=WE}}}),[d]),v.useEffect((()=>{if(u.current){const e=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(c.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}}),[c.isPointerDownOnContentRef,c.hasSelectionRef]),v.useEffect((()=>{u.current&&pse(u.current).forEach((e=>e.setAttribute("tabindex","-1")))})),v.createElement(ose,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:cm(o,(e=>{e.preventDefault()})),onDismiss:c.onDismiss},v.createElement(Hie,Le({},l,s,{onPointerDown:cm(s.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0})),ref:f,style:{...s.style,userSelect:d?"text":void 0,WebkitUserSelect:d?"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 cM(e){return t=>"touch"===t.pointerType?void 0:e()}function pse(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 SF=use,hse=v.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},a)=>B.jsx(SF,{ref:a,align:t,sideOffset:n,className:$e("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})));hse.displayName=SF.displayName;const xT=v.forwardRef((({className:e,type:t,...n},r)=>{const{error:a}=Mp();return B.jsx("input",{type:t,className:$e("flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-base placeholder:text-muted-foreground placeholder:text-slate-400 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-slate-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",{"border-red-dark focus-visible:border-input focus-visible:ring-red-dark":!!a},e),ref:r,...n})}));xT.displayName="Input";const mse=v.forwardRef(((e,t)=>v.createElement(St.label,Le({},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()}})))),EF=mse,gse=Yl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ST=v.forwardRef((({className:e,...t},n)=>B.jsx(EF,{ref:n,className:$e(gse(),e),...t})));ST.displayName=EF.displayName;const CF="Radio",[yse,RF]=ii(CF),[_se,vse]=yse(CF),bse=v.forwardRef(((e,t)=>{const{__scopeRadio:n,name:r,checked:a=!1,required:o,disabled:i,value:s="on",onCheck:c,...l}=e,[u,f]=v.useState(null),d=yn(t,(e=>f(e))),p=v.useRef(!1),h=!u||!!u.closest("form");return v.createElement(_se,{scope:n,checked:a,disabled:i},v.createElement(St.button,Le({type:"button",role:"radio","aria-checked":a,"data-state":AF(a),"data-disabled":i?"":void 0,disabled:i,value:s},l,{ref:d,onClick:lt(e.onClick,(e=>{a||null==c||c(),h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),h&&v.createElement(xse,{control:u,bubbles:!p.current,name:r,value:s,checked:a,required:o,disabled:i,style:{transform:"translateX(-100%)"}}))})),wse="RadioIndicator",kse=v.forwardRef(((e,t)=>{const{__scopeRadio:n,forceMount:r,...a}=e,o=vse(wse,n);return v.createElement(Ws,{present:r||o.checked},v.createElement(St.span,Le({"data-state":AF(o.checked),"data-disabled":o.disabled?"":void 0},a,{ref:t})))})),xse=e=>{const{control:t,checked:n,bubbles:r=!0,...a}=e,o=v.useRef(null),i=yk(n),s=_k(t);return v.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&a){const t=new Event("click",{bubbles:r});a.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),v.createElement("input",Le({type:"radio","aria-hidden":!0,defaultChecked:n},a,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function AF(e){return e?"checked":"unchecked"}const Sse=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],TF="RadioGroup",[Ese,rHe]=ii(TF,[Y1,RF]),IF=Y1(),PF=RF(),[Cse,Rse]=Ese(TF),Ase=v.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:a,value:o,required:i=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:f,...d}=e,p=IF(n),h=WA(l),[m,y]=kp({prop:o,defaultProp:a,onChange:f});return v.createElement(Cse,{scope:n,name:r,required:i,disabled:s,value:m,onValueChange:y},v.createElement(tT,Le({asChild:!0},p,{orientation:c,dir:h,loop:u}),v.createElement(St.div,Le({role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":s?"":void 0,dir:h},d,{ref:t}))))})),Tse="RadioGroupItem",Ise=v.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...a}=e,o=Rse(Tse,n),i=o.disabled||r,s=IF(n),c=PF(n),l=v.useRef(null),u=yn(t,l),f=o.value===a.value,d=v.useRef(!1);return v.useEffect((()=>{const e=e=>{Sse.includes(e.key)&&(d.current=!0)},t=()=>d.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),v.createElement(nT,Le({asChild:!0},s,{focusable:!i,active:f}),v.createElement(bse,Le({disabled:i,required:o.required,checked:f},c,a,{name:o.name,ref:u,onCheck:()=>o.onValueChange(a.value),onKeyDown:lt((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:lt(a.onFocus,(()=>{var e;d.current&&(null===(e=l.current)||void 0===e||e.click())}))})))})),Pse=v.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,a=PF(n);return v.createElement(kse,Le({},a,r,{ref:t}))})),$F=Ase,OF=Ise,$se=Pse,zF=v.forwardRef((({className:e,...t},n)=>B.jsx($F,{className:$e("grid gap-2",e),...t,ref:n})));zF.displayName=$F.displayName;const MF=v.forwardRef((({className:e,...t},n)=>B.jsx(OF,{ref:n,className:$e("aspect-square h-4 w-4 rounded-full border-[1.67px] border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:B.jsx($se,{className:"flex items-center justify-center",children:B.jsx(t7,{className:"h-2.5 w-2.5 fill-current text-current"})})})));MF.displayName=OF.displayName;const Ose=z7,zse=ok,DF=v.forwardRef((({className:e,...t},n)=>B.jsx(q1,{className:$e("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})));DF.displayName=q1.displayName;const Mse=Yl("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"}}),NF=v.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...a},o)=>B.jsxs(zse,{children:[B.jsx(DF,{className:$e("bg-slate-900/70",n)}),B.jsxs(W1,{ref:o,className:$e(Mse({side:e}),t),...a,children:[r,B.jsxs(ik,{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:[B.jsx(n7,{className:"h-4 w-4"}),B.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));NF.displayName=W1.displayName;const LF=({className:e,...t})=>B.jsx("div",{className:$e("flex flex-col space-y-2 text-center sm:text-left",e),...t});LF.displayName="SheetHeader";const jF=v.forwardRef((({className:e,...t},n)=>B.jsx(N_,{ref:n,className:$e("text-lg font-semibold text-foreground",e),...t})));jF.displayName=N_.displayName;const FF=v.forwardRef((({className:e,...t},n)=>B.jsx(L_,{ref:n,className:$e("text-sm text-muted-foreground",e),...t})));FF.displayName=L_.displayName;const[$k,aHe]=ii("Tooltip",[Q1]),ET=Q1(),Dse="TooltipProvider",Nse=700,KC="tooltip.open",[Lse,CT]=$k(Dse),BF=e=>{const{__scopeTooltip:t,delayDuration:n=Nse,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,[i,s]=v.useState(!0),c=v.useRef(!1),l=v.useRef(0);return v.useEffect((()=>{const e=l.current;return()=>window.clearTimeout(e)}),[]),v.createElement(Lse,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:v.useCallback((()=>{window.clearTimeout(l.current),s(!1)}),[]),onClose:v.useCallback((()=>{window.clearTimeout(l.current),l.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:c,onPointerInTransitChange:v.useCallback((e=>{c.current=e}),[]),disableHoverableContent:a},o)},RT="Tooltip",[jse,Ok]=$k(RT),VF=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:s}=e,c=CT(RT,e.__scopeTooltip),l=ET(t),[u,f]=v.useState(null),d=mp(),p=v.useRef(0),h=i??c.disableHoverableContent,m=s??c.delayDuration,y=v.useRef(!1),[g=!1,b]=kp({prop:r,defaultProp:a,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(KC))):c.onClose(),null==o||o(e)}}),_=v.useMemo((()=>g?y.current?"delayed-open":"instant-open":"closed"),[g]),w=v.useCallback((()=>{window.clearTimeout(p.current),y.current=!1,b(!0)}),[b]),k=v.useCallback((()=>{window.clearTimeout(p.current),b(!1)}),[b]),x=v.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{y.current=!0,b(!0)}),m)}),[m,b]);return v.useEffect((()=>()=>window.clearTimeout(p.current)),[]),v.createElement(aj,l,v.createElement(jse,{scope:t,contentId:d,open:g,stateAttribute:_,trigger:u,onTriggerChange:f,onTriggerEnter:v.useCallback((()=>{c.isOpenDelayed?x():w()}),[c.isOpenDelayed,x,w]),onTriggerLeave:v.useCallback((()=>{h?k():window.clearTimeout(p.current)}),[k,h]),onOpen:w,onClose:k,disableHoverableContent:h},n))},lM="TooltipTrigger",UF=v.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=Ok(lM,n),o=CT(lM,n),i=ET(n),s=yn(t,v.useRef(null),a.onTriggerChange),c=v.useRef(!1),l=v.useRef(!1),u=v.useCallback((()=>c.current=!1),[]);return v.useEffect((()=>()=>document.removeEventListener("pointerup",u)),[u]),v.createElement(XA,Le({asChild:!0},i),v.createElement(St.button,Le({"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute},r,{ref:s,onPointerMove:lt(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!l.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),l.current=!0)})),onPointerLeave:lt(e.onPointerLeave,(()=>{a.onTriggerLeave(),l.current=!1})),onPointerDown:lt(e.onPointerDown,(()=>{c.current=!0,document.addEventListener("pointerup",u,{once:!0})})),onFocus:lt(e.onFocus,(()=>{c.current||a.onOpen()})),onBlur:lt(e.onBlur,a.onClose),onClick:lt(e.onClick,a.onClose)})))})),Fse="TooltipPortal",[oHe,Bse]=$k(Fse,{forceMount:void 0}),s_="TooltipContent",qF=v.forwardRef(((e,t)=>{const n=Bse(s_,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,i=Ok(s_,e.__scopeTooltip);return v.createElement(Ws,{present:r||i.open},i.disableHoverableContent?v.createElement(WF,Le({side:a},o,{ref:t})):v.createElement(Vse,Le({side:a},o,{ref:t})))})),Vse=v.forwardRef(((e,t)=>{const n=Ok(s_,e.__scopeTooltip),r=CT(s_,e.__scopeTooltip),a=v.useRef(null),o=yn(t,a),[i,s]=v.useState(null),{trigger:c,onClose:l}=n,u=a.current,{onPointerInTransitChange:f}=r,d=v.useCallback((()=>{s(null),f(!1)}),[f]),p=v.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},a=Kse([...Wse(r,qse(r,n.getBoundingClientRect())),...Hse(t.getBoundingClientRect())]);s(a),f(!0)}),[f]);return v.useEffect((()=>()=>d()),[d]),v.useEffect((()=>{if(c&&u){const e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}}),[c,u,p,d]),v.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==c?void 0:c.contains(t))||(null==u?void 0:u.contains(t)),a=!Gse(n,i);r?d():a&&(d(),l())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,u,i,l,d]),v.createElement(WF,Le({},e,{ref:o}))})),[Use,iHe]=$k(RT,{isInside:!1}),WF=v.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...s}=e,c=Ok(s_,n),l=ET(n),{onClose:u}=c;return v.useEffect((()=>(document.addEventListener(KC,u),()=>document.removeEventListener(KC,u))),[u]),v.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(c.trigger)&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,u]),v.createElement(tk,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u},v.createElement(JA,Le({"data-state":c.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)"}}),v.createElement(oA,null,r),v.createElement(Use,{scope:n,isInside:!0},v.createElement(noe,{id:c.contentId,role:"tooltip"},a||r))))}));function qse(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Wse(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 Hse(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function Gse(e,t){const{x:n,y:r}=e;let a=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){const i=t[e].x,s=t[e].y,c=t[o].x,l=t[o].y;s>r!=l>r&&n<(c-i)*(r-s)/(l-s)+i&&(a=!a)}return a}function Kse(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)),Qse(t)}function Qse(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 Yse=BF,Zse=VF,Xse=UF,HF=qF,Jse=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},ece={deviceType:Jse()},AT=ua({name:"ui",initialState:ece,reducers:{setDeviceType:(e,{payload:t})=>{e.deviceType=t}},selectors:{selectDeviceType:e=>e.deviceType,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var HE,fM,GE,uM,KE,dM,QE,pM,YE,hM,ZE,mM,XE,gM,JE,yM,e4,_M,t4,vM,n4,bM,r4,wM,a4,kM,o4,xM,i4,SM,s4,EM,c4,CM,l4,RM,f4,AM,u4,TM,d4,IM,p4,PM,h4,$M,m4,OM,g4,zM,y4,MM,_4,DM,v4,NM,b4,LM,w4,jM,k4,FM,x4,BM,S4,VM,E4,UM,C4,qM,R4,WM,A4,HM,T4,GM,I4,KM,P4,QM,$4,YM;function GF(){if(fM)return HE;fM=1;var e=w5(),t=e&&new e;return HE=t}function KF(){if(uM)return GE;uM=1;var e=PA(),t=GF();return GE=t?function(e,n){return t.set(e,n),e}:e}function zk(){if(dM)return KE;dM=1;var e=gk(),t=Vc();return KE=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 a=e(n.prototype),o=n.apply(a,r);return t(o)?o:a}},KE}function tce(){if(pM)return QE;pM=1;var e=zk(),t=si();return QE=function(n,r,a){var o=1&r,i=e(n);return function e(){return(this&&this!==t&&this instanceof e?i:n).apply(o?a:this,arguments)}},QE}function QF(){if(hM)return YE;hM=1;var e=Math.max;return YE=function(t,n,r,a){for(var o=-1,i=t.length,s=r.length,c=-1,l=n.length,u=e(i-s,0),f=Array(l+u),d=!a;++c<l;)f[c]=n[c];for(;++o<s;)(d||o<i)&&(f[r[o]]=t[o]);for(;u--;)f[c++]=t[o++];return f}}function YF(){if(mM)return ZE;mM=1;var e=Math.max;return ZE=function(t,n,r,a){for(var o=-1,i=t.length,s=-1,c=r.length,l=-1,u=n.length,f=e(i-c,0),d=Array(f+u),p=!a;++o<f;)d[o]=t[o];for(var h=o;++l<u;)d[h+l]=n[l];for(;++s<c;)(p||o<i)&&(d[h+r[s]]=t[o++]);return d}}function nce(){if(gM)return XE;return gM=1,XE=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function TT(){if(yM)return JE;return yM=1,JE=function(){}}function IT(){if(_M)return e4;_M=1;var e=gk(),t=TT();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,e4=n}function ZF(){if(vM)return t4;vM=1;var e=GF(),t=E5();return t4=e?function(t){return e.get(t)}:t}function rce(){if(bM)return n4;bM=1;return n4={}}function ace(){if(wM)return r4;wM=1;var e=rce(),t=Object.prototype.hasOwnProperty;return r4=function(n){for(var r=n.name+"",a=e[r],o=t.call(e,r)?a.length:0;o--;){var i=a[o],s=i.func;if(null==s||s==n)return i.name}return r}}function XF(){if(kM)return a4;kM=1;var e=gk(),t=TT();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,a4=n}function oce(){if(xM)return o4;xM=1;var e=IT(),t=XF(),n=mk();return o4=function(r){if(r instanceof e)return r.clone();var a=new t(r.__wrapped__,r.__chain__);return a.__actions__=n(r.__actions__),a.__index__=r.__index__,a.__values__=r.__values__,a}}function ice(){if(SM)return i4;SM=1;var e=IT(),t=XF(),n=TT(),r=Ai(),a=os(),o=oce(),i=Object.prototype.hasOwnProperty;function s(n){if(a(n)&&!r(n)&&!(n instanceof e)){if(n instanceof t)return n;if(i.call(n,"__wrapped__"))return o(n)}return new t(n)}return s.prototype=n.prototype,s.prototype.constructor=s,i4=s}function sce(){if(EM)return s4;EM=1;var e=IT(),t=ZF(),n=ace(),r=ice();return s4=function(a){var o=n(a),i=r[o];if("function"!=typeof i||!(o in e.prototype))return!1;if(a===i)return!0;var s=t(i);return!!s&&a===s[0]}}function JF(){if(CM)return c4;CM=1;var e=KF(),t=R5()(e);return c4=t}function cce(){if(RM)return l4;RM=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return l4=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function lce(){if(AM)return f4;AM=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return f4=function(t,n){var r=n.length;if(!r)return t;var a=r-1;return n[a]=(r>1?"& ":"")+n[a],n=n.join(r>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+n+"] */\n")}}function fce(){if(TM)return u4;TM=1;var e=zA(),t=MX(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return u4=function(r,a){return e(n,(function(e){var n="_."+e[0];a&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function eB(){if(IM)return d4;IM=1;var e=cce(),t=lce(),n=A5(),r=fce();return d4=function(a,o,i){var s=o+"";return n(a,t(s,r(e(s),i)))}}function tB(){if(PM)return p4;PM=1;var e=sce(),t=JF(),n=eB();return p4=function(r,a,o,i,s,c,l,u,f,d){var p=8&a;a|=p?32:64,4&(a&=~(p?64:32))||(a&=-4);var h=[r,a,s,p?c:void 0,p?l:void 0,p?void 0:c,p?void 0:l,u,f,d],m=o.apply(void 0,h);return e(r)&&t(m,h),m.placeholder=i,n(m,r,a)}}function nB(){if($M)return h4;return $M=1,h4=function(e){return e.placeholder}}function uce(){if(OM)return m4;OM=1;var e=mk(),t=CA(),n=Math.min;return m4=function(r,a){for(var o=r.length,i=n(a.length,o),s=e(r);i--;){var c=a[i];r[i]=t(c,o)?s[c]:void 0}return r}}function PT(){if(zM)return g4;zM=1;var e="__lodash_placeholder__";return g4=function(t,n){for(var r=-1,a=t.length,o=0,i=[];++r<a;){var s=t[r];(s===n||s===e)&&(t[r]=e,i[o++]=r)}return i}}function rB(){if(MM)return y4;MM=1;var e=QF(),t=YF(),n=nce(),r=zk(),a=tB(),o=nB(),i=uce(),s=PT(),c=si();return y4=function l(u,f,d,p,h,m,y,g,v,b){var _=128&f,w=1&f,k=2&f,x=24&f,S=512&f,E=k?void 0:r(u);return function A(){for(var z=arguments.length,C=Array(z),I=z;I--;)C[I]=arguments[I];if(x)var T=o(A),R=n(C,T);if(p&&(C=e(C,p,h,x)),m&&(C=t(C,m,y,x)),z-=R,x&&z<b){var P=s(C,T);return a(u,f,l,A.placeholder,d,C,P,g,v,b-z)}var j=w?d:this,O=k?j[u]:u;return z=C.length,g?C=i(C,g):S&&z>1&&C.reverse(),_&&v<z&&(C.length=v),this&&this!==c&&this instanceof A&&(O=E||r(O)),O.apply(j,C)}},y4}function dce(){if(DM)return _4;DM=1;var e=$A(),t=zk(),n=rB(),r=tB(),a=nB(),o=PT(),i=si();return _4=function(s,c,l){var u=t(s);return function t(){for(var f=arguments.length,d=Array(f),p=f,h=a(t);p--;)d[p]=arguments[p];var m=f<3&&d[0]!==h&&d[f-1]!==h?[]:o(d,h);return(f-=m.length)<l?r(s,c,n,t.placeholder,void 0,d,m,void 0,void 0,l-f):e(this&&this!==i&&this instanceof t?u:s,this,d)}},_4}function pce(){if(NM)return v4;NM=1;var e=$A(),t=zk(),n=si();return v4=function(r,a,o,i){var s=1&a,c=t(r);return function t(){for(var a=-1,l=arguments.length,u=-1,f=i.length,d=Array(f+l),p=this&&this!==n&&this instanceof t?c:r;++u<f;)d[u]=i[u];for(;l--;)d[u++]=arguments[++a];return e(p,s?o:this,d)}},v4}function hce(){if(LM)return b4;LM=1;var e=QF(),t=YF(),n=PT(),r="__lodash_placeholder__",a=128,o=Math.min;return b4=function(i,s){var c=i[1],l=s[1],u=c|l,f=u<131,d=l==a&&8==c||l==a&&256==c&&i[7].length<=s[8]||384==l&&s[7].length<=s[8]&&8==c;if(!f&&!d)return i;1&l&&(i[2]=s[2],u|=1&c?0:4);var p=s[3];if(p){var h=i[3];i[3]=h?e(h,p,s[4]):p,i[4]=h?n(i[3],r):s[4]}return(p=s[5])&&(h=i[5],i[5]=h?t(h,p,s[6]):p,i[6]=h?n(i[5],r):s[6]),(p=s[7])&&(i[7]=p),l&a&&(i[8]=null==i[8]?s[8]:o(i[8],s[8])),null==i[9]&&(i[9]=s[9]),i[0]=s[0],i[1]=u,i}}function $T(){if(jM)return w4;jM=1;var e=KF(),t=tce(),n=dce(),r=rB(),a=pce(),o=ZF(),i=hce(),s=JF(),c=eB(),l=$5(),u=Math.max;return w4=function(f,d,p,h,m,y,g,v){var b=2&d;if(!b&&"function"!=typeof f)throw new TypeError("Expected a function");var _=h?h.length:0;if(_||(d&=-97,h=m=void 0),g=void 0===g?g:u(l(g),0),v=void 0===v?v:l(v),_-=m?m.length:0,64&d){var w=h,k=m;h=m=void 0}var x=b?void 0:o(f),S=[f,d,p,h,m,w,k,y,g,v];if(x&&i(S,x),f=S[0],d=S[1],p=S[2],h=S[3],m=S[4],!(v=S[9]=void 0===S[9]?b?0:f.length:u(S[9]-_,0))&&24&d&&(d&=-25),d&&1!=d)E=8==d||16==d?n(f,d,v):32!=d&&33!=d||m.length?r.apply(void 0,S):a(f,d,p,h);else var E=t(f,d,p);return c((x?e:s)(E,S),f,d)}}function mce(){if(FM)return k4;FM=1;var e=$T();return k4=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 gce(){if(BM)return x4;BM=1;var e=D5();return x4=function(t){return e(t,4)}}function yce(){if(VM)return S4;VM=1;var e=$T();function t(n,r,a){var o=e(n,8,void 0,void 0,void 0,void 0,void 0,r=a?void 0:r);return o.placeholder=t.placeholder,o}return t.placeholder={},S4=t}function _ce(){if(UM)return E4;UM=1;var e=Su(),t=os(),n=nJ();return E4=function(r){if(!t(r))return!1;var a=e(r);return"[object Error]"==a||"[object DOMException]"==a||"string"==typeof r.message&&"string"==typeof r.name&&!n(r)}}function vce(){if(qM)return C4;qM=1;var e=V_(),t=os();return C4=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function bce(){if(WM)return R4;WM=1;var e=D5(),t=IX();return R4=function(n){return t("function"==typeof n?n:e(n,1))}}function wce(){if(HM)return A4;HM=1;var e=$T(),t=xJ(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return A4=n}function kce(){if(GM)return T4;GM=1;var e=o5(),t=mk(),n=Ai(),r=F_(),a=a5(),o=B_(),i=i5();return T4=function(s){return n(s)?e(s,o):r(s)?[s]:t(a(i(s)))}}function xce(){return KM||(KM=1,I4={ary:mce(),assign:z5(),clone:gce(),curry:yce(),forEach:zA(),isArray:Ai(),isError:_ce(),isFunction:ck(),isWeakMap:vce(),iteratee:bce(),keys:_5(),rearg:wce(),toInteger:$5(),toPath:kce()}),I4}function aB(){if(QM)return P4;QM=1;var e=Y8(),t=xce();return P4=function(n,r,a){return e(t,n,r,a)}}function Sce(){if(YM)return $4;YM=1;var e=aB()("debounce",I5());return e.placeholder=eA(),$4=e}function Ece(e,t,n=window){const r=v.useRef(t);v.useEffect((()=>{r.current=t}),[t]),v.useEffect((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}Sce();var ZM,XM,O4={exports:{}},z4={};
78
+ */function HZ(){if(HP)return Pn;HP=1;var e,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),s=Symbol.for("react.context"),c=Symbol.for("react.server_context"),l=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.offscreen");function m(e){if("object"==typeof e&&null!==e){var h=e.$$typeof;switch(h){case t:switch(e=e.type){case r:case o:case a:case u:case f:return e;default:switch(e=e&&e.$$typeof){case c:case s:case l:case p:case d:case i:return e;default:return h}}case n:return h}}}return e=Symbol.for("react.module.reference"),Pn.ContextConsumer=s,Pn.ContextProvider=i,Pn.Element=t,Pn.ForwardRef=l,Pn.Fragment=r,Pn.Lazy=p,Pn.Memo=d,Pn.Portal=n,Pn.Profiler=o,Pn.StrictMode=a,Pn.Suspense=u,Pn.SuspenseList=f,Pn.isAsyncMode=function(){return!1},Pn.isConcurrentMode=function(){return!1},Pn.isContextConsumer=function(e){return m(e)===s},Pn.isContextProvider=function(e){return m(e)===i},Pn.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Pn.isForwardRef=function(e){return m(e)===l},Pn.isFragment=function(e){return m(e)===r},Pn.isLazy=function(e){return m(e)===p},Pn.isMemo=function(e){return m(e)===d},Pn.isPortal=function(e){return m(e)===n},Pn.isProfiler=function(e){return m(e)===o},Pn.isStrictMode=function(e){return m(e)===a},Pn.isSuspense=function(e){return m(e)===u},Pn.isSuspenseList=function(e){return m(e)===f},Pn.isValidElementType=function(t){return"string"==typeof t||"function"==typeof t||t===r||t===o||t===a||t===u||t===f||t===h||"object"==typeof t&&null!==t&&(t.$$typeof===p||t.$$typeof===d||t.$$typeof===i||t.$$typeof===s||t.$$typeof===l||t.$$typeof===e||void 0!==t.getModuleId)},Pn.typeOf=m,Pn}function GZ(){return GP||(GP=1,gS.exports=HZ()),gS.exports}function f5(){if(KP)return yS;KP=1;var e=Su(),t=os();return yS=function(n){return"number"==typeof n||t(n)&&"[object Number]"==e(n)}}function KZ(){if(QP)return _S;QP=1;var e=f5();return _S=function(t){return e(t)&&t!=+t}}GZ(),KZ(),f5();var bS,YP,wS,ZP,kS,XP,xS,JP,SS,e$,ES,t$,CS,n$,RS,r$,AS,a$,TS,o$,IS,i$,PS,s$,$S,c$,OS,l$,zS,f$,MS,u$,DS,d$,NS,p$,LS,h$,jS,m$,FS,g$,BS,y$,VS,_$,US,v$,Yv=function(e){return WZ(e)&&e.indexOf("%")===e.length-1},QZ=function(e){return"string"==typeof e?e:e?e.displayName||e.name||"Component":""},vS=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),a=2;a<n;a++)r[a-2]=arguments[a]};function YZ(){if(YP)return bS;YP=1;var e=uk();return bS=function(){this.__data__=new e,this.size=0}}function ZZ(){if(ZP)return wS;return ZP=1,wS=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}}function XZ(){if(XP)return kS;return XP=1,kS=function(e){return this.__data__.get(e)}}function JZ(){if(JP)return xS;return JP=1,xS=function(e){return this.__data__.has(e)}}function eX(){if(e$)return SS;e$=1;var e=uk(),t=vA(),n=bA();return SS=function(r,a){var o=this.__data__;if(o instanceof e){var i=o.__data__;if(!t||i.length<199)return i.push([r,a]),this.size=++o.size,this;o=this.__data__=new n(i)}return o.set(r,a),this.size=o.size,this}}function wA(){if(t$)return ES;t$=1;var e=uk(),t=YZ(),n=ZZ(),r=XZ(),a=JZ(),o=eX();function i(t){var n=this.__data__=new e(t);this.size=n.size}return i.prototype.clear=t,i.prototype.delete=n,i.prototype.get=r,i.prototype.has=a,i.prototype.set=o,ES=i}function tX(){if(n$)return CS;n$=1;return CS=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}}function nX(){if(r$)return RS;return r$=1,RS=function(e){return this.__data__.has(e)}}function rX(){if(a$)return AS;a$=1;var e=bA(),t=tX(),n=nX();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,AS=r}function aX(){if(o$)return TS;return o$=1,TS=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 oX(){if(i$)return IS;return i$=1,IS=function(e,t){return e.has(t)}}function u5(){if(s$)return PS;s$=1;var e=rX(),t=aX(),n=oX();return PS=function(r,a,o,i,s,c){var l=1&o,u=r.length,f=a.length;if(u!=f&&!(l&&f>u))return!1;var d=c.get(r),p=c.get(a);if(d&&p)return d==a&&p==r;var h=-1,m=!0,y=2&o?new e:void 0;for(c.set(r,a),c.set(a,r);++h<u;){var g=r[h],v=a[h];if(i)var b=l?i(v,g,h,a,r,c):i(g,v,h,r,a,c);if(void 0!==b){if(b)continue;m=!1;break}if(y){if(!t(a,(function(e,t){if(!n(y,t)&&(g===e||s(g,e,o,i,c)))return y.push(t)}))){m=!1;break}}else if(g!==v&&!s(g,v,o,i,c)){m=!1;break}}return c.delete(r),c.delete(a),m}}function d5(){if(c$)return $S;c$=1;var e=si().Uint8Array;return $S=e}function iX(){if(l$)return OS;return l$=1,OS=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}}function sX(){if(f$)return zS;return f$=1,zS=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}}function cX(){if(u$)return MS;u$=1;var e=H1(),t=d5(),n=_A(),r=u5(),a=iX(),o=sX(),i=e?e.prototype:void 0,s=i?i.valueOf:void 0;return MS=function(e,i,c,l,u,f,d){switch(c){case"[object DataView]":if(e.byteLength!=i.byteLength||e.byteOffset!=i.byteOffset)return!1;e=e.buffer,i=i.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=i.byteLength||!f(new t(e),new t(i)));case"[object Boolean]":case"[object Date]":case"[object Number]":return n(+e,+i);case"[object Error]":return e.name==i.name&&e.message==i.message;case"[object RegExp]":case"[object String]":return e==i+"";case"[object Map]":var p=a;case"[object Set]":var h=1&l;if(p||(p=o),e.size!=i.size&&!h)return!1;var m=d.get(e);if(m)return m==i;l|=2,d.set(e,i);var y=r(p(e),p(i),l,u,f,d);return d.delete(e),y;case"[object Symbol]":if(s)return s.call(e)==s.call(i)}return!1}}function kA(){if(d$)return DS;return d$=1,DS=function(e,t){for(var n=-1,r=t.length,a=e.length;++n<r;)e[a+n]=t[n];return e}}function p5(){if(p$)return NS;p$=1;var e=kA(),t=Ai();return NS=function(n,r,a){var o=r(n);return t(n)?o:e(o,a(n))}}function lX(){if(h$)return LS;return h$=1,LS=function(e,t){for(var n=-1,r=null==e?0:e.length,a=0,o=[];++n<r;){var i=e[n];t(i,n,e)&&(o[a++]=i)}return o}}function h5(){if(m$)return jS;return m$=1,jS=function(){return[]}}function xA(){if(g$)return FS;g$=1;var e=lX(),t=h5(),n=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return FS=r?function(t){return null==t?[]:(t=Object(t),e(r(t),(function(e){return n.call(t,e)})))}:t}function fX(){if(y$)return BS;return y$=1,BS=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}}function uX(){if(_$)return VS;_$=1;var e=Su(),t=os();return VS=function(n){return t(n)&&"[object Arguments]"==e(n)}}function SA(){if(v$)return US;v$=1;var e=uX(),t=os(),n=Object.prototype,r=n.hasOwnProperty,a=n.propertyIsEnumerable,o=e(function(){return arguments}())?e:function(e){return t(e)&&r.call(e,"callee")&&!a.call(e,"callee")};return US=o}var qS,b$,w$,WS,k$,HS,x$,GS,S$,KS,E$,gy={exports:{}};function dX(){if(b$)return qS;return b$=1,qS=function(){return!1}}function EA(){return w$||(w$=1,e=gy,t=gy.exports,n=si(),r=dX(),a=t&&!t.nodeType&&t,o=a&&e&&!e.nodeType&&e,i=o&&o.exports===a?n.Buffer:void 0,s=(i?i.isBuffer:void 0)||r,e.exports=s),gy.exports;var e,t,n,r,a,o,i,s}function CA(){if(k$)return WS;k$=1;var e=/^(?:0|[1-9]\d*)$/;return WS=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 RA(){if(x$)return HS;x$=1;return HS=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}}function pX(){if(S$)return GS;S$=1;var e=Su(),t=RA(),n=os(),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,GS=function(a){return n(a)&&t(a.length)&&!!r[e(a)]}}function AA(){if(E$)return KS;return E$=1,KS=function(e){return function(t){return e(t)}}}gy.exports;var C$,QS,R$,YS,A$,ZS,T$,XS,I$,JS,P$,e6,$$,t6,O$,n6,z$,r6,M$,a6,D$,o6,N$,i6,L$,s6,j$,c6,F$,l6,B$,f6,V$,u6,U$,d6,q$,p6,W$,h6,H$,m6,G$,g6,K$,y6,Q$,_6,Y$,v6,Z$,b6,X$,w6,J$,k6,eO,x6,tO,S6,nO,E6,rO,C6,aO,R6,oO,A6,iO,T6,sO,I6,cO,P6,lO,$6,fO,O6,uO,z6,dO,M6,pO,D6,hO,N6,mO,L6,gO,j6,yO,F6,_O,B6,vO,V6,bO,U6,wO,q6,kO,W6,xO,H6,SO,yy={exports:{}};function TA(){return C$||(C$=1,e=yy,t=yy.exports,n=n5(),r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,o=a&&a.exports===r&&n.process,i=function(){try{return a&&a.require&&a.require("util").types||o&&o.binding&&o.binding("util")}catch{}}(),e.exports=i),yy.exports;var e,t,n,r,a,o,i}function m5(){if(R$)return QS;R$=1;var e=pX(),t=AA(),n=TA(),r=n&&n.isTypedArray,a=r?t(r):e;return QS=a}function g5(){if(A$)return YS;A$=1;var e=fX(),t=SA(),n=Ai(),r=EA(),a=CA(),o=m5(),i=Object.prototype.hasOwnProperty;return YS=function(s,c){var l=n(s),u=!l&&t(s),f=!l&&!u&&r(s),d=!l&&!u&&!f&&o(s),p=l||u||f||d,h=p?e(s.length,String):[],m=h.length;for(var y in s)(c||i.call(s,y))&&(!p||!("length"==y||f&&("offset"==y||"parent"==y)||d&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||a(y,m)))&&h.push(y);return h}}function IA(){if(T$)return ZS;T$=1;var e=Object.prototype;return ZS=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||e)}}function y5(){if(I$)return XS;return I$=1,XS=function(e,t){return function(n){return e(t(n))}}}function hX(){if(P$)return JS;P$=1;var e=y5()(Object.keys,Object);return JS=e}function _5(){if($$)return e6;$$=1;var e=IA(),t=hX(),n=Object.prototype.hasOwnProperty;return e6=function(r){if(!e(r))return t(r);var a=[];for(var o in Object(r))n.call(r,o)&&"constructor"!=o&&a.push(o);return a}}function v5(){if(O$)return t6;O$=1;var e=ck(),t=RA();return t6=function(n){return null!=n&&t(n.length)&&!e(n)}}function pk(){if(z$)return n6;z$=1;var e=g5(),t=_5(),n=v5();return n6=function(r){return n(r)?e(r):t(r)}}function b5(){if(M$)return r6;M$=1;var e=p5(),t=xA(),n=pk();return r6=function(r){return e(r,n,t)}}function mX(){if(D$)return a6;D$=1;var e=b5(),t=Object.prototype.hasOwnProperty;return a6=function(n,r,a,o,i,s){var c=1&a,l=e(n),u=l.length;if(u!=e(r).length&&!c)return!1;for(var f=u;f--;){var d=l[f];if(!(c?d in r:t.call(r,d)))return!1}var p=s.get(n),h=s.get(r);if(p&&h)return p==r&&h==n;var m=!0;s.set(n,r),s.set(r,n);for(var y=c;++f<u;){var g=n[d=l[f]],v=r[d];if(o)var b=c?o(v,g,d,r,n,s):o(g,v,d,n,r,s);if(!(void 0===b?g===v||i(g,v,a,o,s):b)){m=!1;break}y||(y="constructor"==d)}if(m&&!y){var _=n.constructor,w=r.constructor;_!=w&&"constructor"in n&&"constructor"in r&&!("function"==typeof _&&_ instanceof _&&"function"==typeof w&&w instanceof w)&&(m=!1)}return s.delete(n),s.delete(r),m}}function gX(){if(N$)return o6;N$=1;var e=Tm()(si(),"DataView");return o6=e}function yX(){if(L$)return i6;L$=1;var e=Tm()(si(),"Promise");return i6=e}function _X(){if(j$)return s6;j$=1;var e=Tm()(si(),"Set");return s6=e}function w5(){if(F$)return c6;F$=1;var e=Tm()(si(),"WeakMap");return c6=e}function V_(){if(B$)return l6;B$=1;var e=gX(),t=vA(),n=yX(),r=_X(),a=w5(),o=Su(),i=r5(),s="[object Map]",c="[object Promise]",l="[object Set]",u="[object WeakMap]",f="[object DataView]",d=i(e),p=i(t),h=i(n),m=i(r),y=i(a),g=o;return(e&&g(new e(new ArrayBuffer(1)))!=f||t&&g(new t)!=s||n&&g(n.resolve())!=c||r&&g(new r)!=l||a&&g(new a)!=u)&&(g=function(e){var t=o(e),n="[object Object]"==t?e.constructor:void 0,r=n?i(n):"";if(r)switch(r){case d:return f;case p:return s;case h:return c;case m:return l;case y:return u}return t}),l6=g}function vX(){if(V$)return f6;V$=1;var e=wA(),t=u5(),n=cX(),r=mX(),a=V_(),o=Ai(),i=EA(),s=m5(),c="[object Arguments]",l="[object Array]",u="[object Object]",f=Object.prototype.hasOwnProperty;return f6=function(d,p,h,m,y,g){var v=o(d),b=o(p),_=v?l:a(d),w=b?l:a(p),k=(_=_==c?u:_)==u,x=(w=w==c?u:w)==u,S=_==w;if(S&&i(d)){if(!i(p))return!1;v=!0,k=!1}if(S&&!k)return g||(g=new e),v||s(d)?t(d,p,h,m,y,g):n(d,p,_,h,m,y,g);if(!(1&h)){var E=k&&f.call(d,"__wrapped__"),A=x&&f.call(p,"__wrapped__");if(E||A){var z=E?d.value():d,C=A?p.value():p;return g||(g=new e),y(z,C,h,m,g)}}return!!S&&(g||(g=new e),r(d,p,h,m,y,g))}}function k5(){if(U$)return u6;U$=1;var e=vX(),t=os();return u6=function n(r,a,o,i,s){return r===a||(null==r||null==a||!t(r)&&!t(a)?r!=r&&a!=a:e(r,a,o,i,n,s))},u6}function bX(){if(q$)return d6;q$=1;var e=wA(),t=k5();return d6=function(n,r,a,o){var i=a.length,s=i,c=!o;if(null==n)return!s;for(n=Object(n);i--;){var l=a[i];if(c&&l[2]?l[1]!==n[l[0]]:!(l[0]in n))return!1}for(;++i<s;){var u=(l=a[i])[0],f=n[u],d=l[1];if(c&&l[2]){if(void 0===f&&!(u in n))return!1}else{var p=new e;if(o)var h=o(f,d,u,n,r,p);if(!(void 0===h?t(d,f,3,o,p):h))return!1}}return!0}}function x5(){if(W$)return p6;W$=1;var e=Vc();return p6=function(t){return t==t&&!e(t)}}function wX(){if(H$)return h6;H$=1;var e=x5(),t=pk();return h6=function(n){for(var r=t(n),a=r.length;a--;){var o=r[a],i=n[o];r[a]=[o,i,e(i)]}return r}}function S5(){if(G$)return m6;return G$=1,m6=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}}function kX(){if(K$)return g6;K$=1;var e=bX(),t=wX(),n=S5();return g6=function(r){var a=t(r);return 1==a.length&&a[0][2]?n(a[0][0],a[0][1]):function(t){return t===r||e(t,r,a)}}}function xX(){if(Q$)return y6;return Q$=1,y6=function(e,t){return null!=e&&t in Object(e)}}function SX(){if(Y$)return _6;Y$=1;var e=s5(),t=SA(),n=Ai(),r=CA(),a=RA(),o=B_();return _6=function(i,s,c){for(var l=-1,u=(s=e(s,i)).length,f=!1;++l<u;){var d=o(s[l]);if(!(f=null!=i&&c(i,d)))break;i=i[d]}return f||++l!=u?f:!!(u=null==i?0:i.length)&&a(u)&&r(d,u)&&(n(i)||t(i))}}function EX(){if(Z$)return v6;Z$=1;var e=xX(),t=SX();return v6=function(n,r){return null!=n&&t(n,r,e)}}function CX(){if(X$)return b6;X$=1;var e=k5(),t=l5(),n=EX(),r=yA(),a=x5(),o=S5(),i=B_();return b6=function(s,c){return r(s)&&a(c)?o(i(s),c):function(r){var a=t(r,s);return void 0===a&&a===c?n(r,s):e(c,a,3)}}}function PA(){if(J$)return w6;return J$=1,w6=function(e){return e}}function RX(){if(eO)return k6;return eO=1,k6=function(e){return function(t){return null==t?void 0:t[e]}}}function AX(){if(tO)return x6;tO=1;var e=c5();return x6=function(t){return function(n){return e(n,t)}}}function TX(){if(nO)return S6;nO=1;var e=RX(),t=AX(),n=yA(),r=B_();return S6=function(a){return n(a)?e(r(a)):t(a)}}function IX(){if(rO)return E6;rO=1;var e=kX(),t=CX(),n=PA(),r=Ai(),a=TX();return E6=function(o){return"function"==typeof o?o:null==o?n:"object"==typeof o?r(o)?t(o[0],o[1]):e(o):a(o)}}function PX(){if(aO)return C6;return aO=1,C6=function(e,t,n,r){for(var a=e.length,o=n+(r?1:-1);r?o--:++o<a;)if(t(e[o],o,e))return o;return-1}}function $X(){if(oO)return R6;return oO=1,R6=function(e){return e!=e}}function OX(){if(iO)return A6;return iO=1,A6=function(e,t,n){for(var r=n-1,a=e.length;++r<a;)if(e[r]===t)return r;return-1}}function zX(){if(sO)return T6;sO=1;var e=PX(),t=$X(),n=OX();return T6=function(r,a,o){return a==a?n(r,a,o):e(r,t,o)}}function MX(){if(cO)return I6;cO=1;var e=zX();return I6=function(t,n){return!!(null==t?0:t.length)&&e(t,n,0)>-1}}function E5(){if(lO)return P6;return lO=1,P6=function(){}}function DX(){if(fO)return $6;fO=1;var e=H1(),t=SA(),n=Ai(),r=e?e.isConcatSpreadable:void 0;return $6=function(e){return n(e)||t(e)||!!(r&&e&&e[r])}}function NX(){if(uO)return O6;uO=1;var e=kA(),t=DX();return O6=function n(r,a,o,i,s){var c=-1,l=r.length;for(o||(o=t),s||(s=[]);++c<l;){var u=r[c];a>0&&o(u)?a>1?n(u,a-1,o,i,s):e(s,u):i||(s[s.length]=u)}return s},O6}function $A(){if(dO)return z6;return dO=1,z6=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 LX(){if(pO)return M6;pO=1;var e=$A(),t=Math.max;return M6=function(n,r,a){return r=t(void 0===r?n.length-1:r,0),function(){for(var o=arguments,i=-1,s=t(o.length-r,0),c=Array(s);++i<s;)c[i]=o[r+i];i=-1;for(var l=Array(r+1);++i<r;)l[i]=o[i];return l[r]=a(c),e(n,this,l)}},M6}function jX(){if(hO)return D6;return hO=1,D6=function(e){return function(){return e}}}function C5(){if(mO)return N6;mO=1;var e=Tm(),t=function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}}();return N6=t}function FX(){if(gO)return L6;gO=1;var e=jX(),t=C5(),n=PA();return L6=t?function(n,r){return t(n,"toString",{configurable:!0,enumerable:!1,value:e(r),writable:!0})}:n}function R5(){if(yO)return j6;yO=1;var e=Date.now;return j6=function(t){var n=0,r=0;return function(){var a=e(),o=16-(a-r);if(r=a,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(void 0,arguments)}},j6}function A5(){if(_O)return F6;_O=1;var e=FX(),t=R5()(e);return F6=t}function BX(){if(vO)return B6;vO=1;var e=si();return B6=function(){return e.Date.now()}}function VX(){if(bO)return V6;bO=1;var e=/\s/;return V6=function(t){for(var n=t.length;n--&&e.test(t.charAt(n)););return n}}function UX(){if(wO)return U6;wO=1;var e=VX(),t=/^\s+/;return U6=function(n){return n&&n.slice(0,e(n)+1).replace(t,"")}}function T5(){if(kO)return q6;kO=1;var e=UX(),t=Vc(),n=F_(),r=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,i=parseInt;return q6=function(s){if("number"==typeof s)return s;if(n(s))return NaN;if(t(s)){var c="function"==typeof s.valueOf?s.valueOf():s;s=t(c)?c+"":c}if("string"!=typeof s)return 0===s?s:+s;s=e(s);var l=a.test(s);return l||o.test(s)?i(s.slice(2),l?2:8):r.test(s)?NaN:+s}}function I5(){if(xO)return W6;xO=1;var e=Vc(),t=BX(),n=T5(),r=Math.max,a=Math.min;return W6=function(o,i,s){var c,l,u,f,d,p,h=0,m=!1,y=!1,g=!0;if("function"!=typeof o)throw new TypeError("Expected a function");function v(e){var t=c,n=l;return c=l=void 0,h=e,f=o.apply(n,t)}function b(e){var t=e-p;return void 0===p||t>=i||t<0||y&&e-h>=u}function _(){var e=t();if(b(e))return w(e);d=setTimeout(_,function(e){var t=i-(e-p);return y?a(t,u-(e-h)):t}(e))}function w(e){return d=void 0,g&&c?v(e):(c=l=void 0,f)}function k(){var e=t(),n=b(e);if(c=arguments,l=this,p=e,n){if(void 0===d)return function(e){return h=e,d=setTimeout(_,i),m?v(e):f}(p);if(y)return clearTimeout(d),d=setTimeout(_,i),v(p)}return void 0===d&&(d=setTimeout(_,i)),f}return i=n(i)||0,e(s)&&(m=!!s.leading,u=(y="maxWait"in s)?r(n(s.maxWait)||0,i):u,g="trailing"in s?!!s.trailing:g),k.cancel=function(){void 0!==d&&clearTimeout(d),h=0,c=p=l=d=void 0},k.flush=function(){return void 0===d?f:w(t())},k},W6}function qX(){if(SO)return H6;SO=1;var e=I5(),t=Vc();return H6=function(n,r,a){var o=!0,i=!0;if("function"!=typeof n)throw new TypeError("Expected a function");return t(a)&&(o="leading"in a?!!a.leading:o,i="trailing"in a?!!a.trailing:i),e(n,r,{leading:o,maxWait:r,trailing:i})}}yy.exports;var WX=qX();const HX=Ql(WX);function e_(e){return(e_="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 EO(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 Zv(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?EO(Object(n),!0).forEach((function(t){GX(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):EO(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function GX(e,t,n){return(t=KX(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function KX(e){var t=QX(e,"string");return"symbol"==e_(t)?t:t+""}function QX(e,t){if("object"!=e_(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=e_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function YX(e,t){return eJ(e)||JX(e,t)||XX(e,t)||ZX()}function ZX(){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 XX(e,t){if(e){if("string"==typeof e)return CO(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 CO(e,t)}}function CO(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 JX(e,t){var n=null==e?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,a,o,i,s=[],c=!0,l=!1;try{if(o=(n=n.call(e)).next,0!==t)for(;!(c=(r=o.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,a=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(l)throw a}}return s}}function eJ(e){if(Array.isArray(e))return e}var G6,RO,K6,AO,Q6,TO,Y6,IO,Z6,PO,X6,$O,J6,OO,eE,zO,tE,MO,nE,DO,rE,NO,aE,LO,oE,jO,tJ=v.forwardRef((function(e,t){var n=e.aspect,r=e.initialDimension,a=void 0===r?{width:-1,height:-1}:r,o=e.width,i=void 0===o?"100%":o,s=e.height,c=void 0===s?"100%":s,l=e.minWidth,u=void 0===l?0:l,f=e.minHeight,d=e.maxHeight,p=e.children,h=e.debounce,m=void 0===h?0:h,y=e.id,g=e.className,b=e.onResize,_=e.style,w=void 0===_?{}:_,k=v.useRef(null),x=v.useRef();x.current=b,v.useImperativeHandle(t,(function(){return Object.defineProperty(k.current,"current",{get:function(){return console.warn("The usage of ref.current.current is deprecated and will no longer be supported."),k.current},configurable:!0})}));var S=YX(v.useState({containerWidth:a.width,containerHeight:a.height}),2),E=S[0],A=S[1],z=v.useCallback((function(e,t){A((function(n){var r=Math.round(e),a=Math.round(t);return n.containerWidth===r&&n.containerHeight===a?n:{containerWidth:r,containerHeight:a}}))}),[]);v.useEffect((function(){var e=function(e){var t,n=e[0].contentRect,r=n.width,a=n.height;z(r,a),null===(t=x.current)||void 0===t||t.call(x,r,a)};m>0&&(e=HX(e,m,{trailing:!0,leading:!1}));var t=new ResizeObserver(e),n=k.current.getBoundingClientRect(),r=n.width,a=n.height;return z(r,a),t.observe(k.current),function(){t.disconnect()}}),[z,m]);var C=v.useMemo((function(){var e=E.containerWidth,t=E.containerHeight;if(e<0||t<0)return null;vS(Yv(i)||Yv(c),"The width(%s) and height(%s) are both fixed numbers,\n maybe you don't need to use a ResponsiveContainer.",i,c),vS(!n||n>0,"The aspect(%s) must be greater than zero.",n);var r=Yv(i)?e:i,a=Yv(c)?t:c;n&&n>0&&(r?a=r/n:a&&(r=a*n),d&&a>d&&(a=d)),vS(r>0||a>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,a,i,c,u,f,n);var o=!Array.isArray(p)&&QZ(p.type).endsWith("Chart");return ze.Children.map(p,(function(e){return ze.isValidElement(e)?v.cloneElement(e,Zv({width:r,height:a},o?{style:Zv({height:"100%",width:"100%",maxHeight:a,maxWidth:r},e.props.style)}:{})):e}))}),[n,p,c,d,f,u,E,i]);return ze.createElement("div",{id:y?"".concat(y):void 0,className:o7("recharts-responsive-container",g),style:Zv(Zv({},w),{},{width:i,height:c,minWidth:u,minHeight:f,maxHeight:d}),ref:k},C)}));function OA(){if(RO)return G6;RO=1;var e=y5()(Object.getPrototypeOf,Object);return G6=e}function nJ(){if(AO)return K6;AO=1;var e=Su(),t=OA(),n=os(),r=Function.prototype,a=Object.prototype,o=r.toString,i=a.hasOwnProperty,s=o.call(Object);return K6=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var a=t(r);if(null===a)return!0;var c=i.call(a,"constructor")&&a.constructor;return"function"==typeof c&&c instanceof c&&o.call(c)==s}}function rJ(){if(TO)return Q6;TO=1;var e=T5(),t=1/0;return Q6=function(n){return n?(n=e(n))===t||n===-t?17976931348623157e292*(n<0?-1:1):n==n?n:0:0===n?n:0}}function P5(){if(IO)return Y6;IO=1;var e=C5();return Y6=function(t,n,r){"__proto__"==n&&e?e(t,n,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[n]=r}}function $5(){if(PO)return Z6;PO=1;var e=rJ();return Z6=function(t){var n=e(t),r=n%1;return n==n?r?n-r:n:0}}function zA(){if($O)return X6;return $O=1,X6=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}}function O5(){if(OO)return J6;OO=1;var e=P5(),t=_A(),n=Object.prototype.hasOwnProperty;return J6=function(r,a,o){var i=r[a];(!n.call(r,a)||!t(i,o)||void 0===o&&!(a in r))&&e(r,a,o)}}function hk(){if(zO)return eE;zO=1;var e=O5(),t=P5();return eE=function(n,r,a,o){var i=!a;a||(a={});for(var s=-1,c=r.length;++s<c;){var l=r[s],u=o?o(a[l],n[l],l,a,n):void 0;void 0===u&&(u=n[l]),i?t(a,l,u):e(a,l,u)}return a}}function z5(){if(MO)return tE;MO=1;var e=hk(),t=pk();return tE=function(n,r){return n&&e(r,t(r),n)}}function aJ(){if(DO)return nE;return DO=1,nE=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}}function oJ(){if(NO)return rE;NO=1;var e=Vc(),t=IA(),n=aJ(),r=Object.prototype.hasOwnProperty;return rE=function(a){if(!e(a))return n(a);var o=t(a),i=[];for(var s in a)"constructor"==s&&(o||!r.call(a,s))||i.push(s);return i}}function MA(){if(LO)return aE;LO=1;var e=g5(),t=oJ(),n=v5();return aE=function(r){return n(r)?e(r,!0):t(r)}}function iJ(){if(jO)return oE;jO=1;var e=hk(),t=MA();return oE=function(n,r){return n&&e(r,t(r),n)}}var FO,iE,BO,sE,VO,cE,UO,lE,qO,fE,WO,uE,HO,dE,GO,pE,KO,hE,QO,mE,YO,gE,ZO,yE,XO,_E,JO,vE,ez,bE,tz,wE,nz,kE,rz,xE,az,SE,oz,EE,iz,CE,sz,_y={exports:{}};function sJ(){return FO||(FO=1,e=_y,t=_y.exports,n=si(),r=t&&!t.nodeType&&t,a=r&&e&&!e.nodeType&&e,o=a&&a.exports===r?n.Buffer:void 0,i=o?o.allocUnsafe:void 0,e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=i?i(n):new e.constructor(n);return e.copy(r),r}),_y.exports;var e,t,n,r,a,o,i}function mk(){if(BO)return iE;return BO=1,iE=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}}function cJ(){if(VO)return sE;VO=1;var e=hk(),t=xA();return sE=function(n,r){return e(n,t(n),r)}}function M5(){if(UO)return cE;UO=1;var e=kA(),t=OA(),n=xA(),r=h5(),a=Object.getOwnPropertySymbols;return cE=a?function(r){for(var a=[];r;)e(a,n(r)),r=t(r);return a}:r}function lJ(){if(qO)return lE;qO=1;var e=hk(),t=M5();return lE=function(n,r){return e(n,t(n),r)}}function fJ(){if(WO)return fE;WO=1;var e=p5(),t=M5(),n=MA();return fE=function(r){return e(r,n,t)}}function uJ(){if(HO)return uE;HO=1;var e=Object.prototype.hasOwnProperty;return uE=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 DA(){if(GO)return dE;GO=1;var e=d5();return dE=function(t){var n=new t.constructor(t.byteLength);return new e(n).set(new e(t)),n}}function dJ(){if(KO)return pE;KO=1;var e=DA();return pE=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}}function pJ(){if(QO)return hE;QO=1;var e=/\w*$/;return hE=function(t){var n=new t.constructor(t.source,e.exec(t));return n.lastIndex=t.lastIndex,n}}function hJ(){if(YO)return mE;YO=1;var e=H1(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;return mE=function(e){return n?Object(n.call(e)):{}}}function mJ(){if(ZO)return gE;ZO=1;var e=DA();return gE=function(t,n){var r=n?e(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}}function gJ(){if(XO)return yE;XO=1;var e=DA(),t=dJ(),n=pJ(),r=hJ(),a=mJ();return yE=function(o,i,s){var c=o.constructor;switch(i){case"[object ArrayBuffer]":return e(o);case"[object Boolean]":case"[object Date]":return new c(+o);case"[object DataView]":return t(o,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 a(o,s);case"[object Map]":case"[object Set]":return new c;case"[object Number]":case"[object String]":return new c(o);case"[object RegExp]":return n(o);case"[object Symbol]":return r(o)}}}function gk(){if(JO)return _E;JO=1;var e=Vc(),t=Object.create;return _E=function(){function n(){}return function(r){if(!e(r))return{};if(t)return t(r);n.prototype=r;var a=new n;return n.prototype=void 0,a}}()}function yJ(){if(ez)return vE;ez=1;var e=gk(),t=OA(),n=IA();return vE=function(r){return"function"!=typeof r.constructor||n(r)?{}:e(t(r))}}function _J(){if(tz)return bE;tz=1;var e=V_(),t=os();return bE=function(n){return t(n)&&"[object Map]"==e(n)}}function vJ(){if(nz)return wE;nz=1;var e=_J(),t=AA(),n=TA(),r=n&&n.isMap,a=r?t(r):e;return wE=a}function bJ(){if(rz)return kE;rz=1;var e=V_(),t=os();return kE=function(n){return t(n)&&"[object Set]"==e(n)}}function wJ(){if(az)return xE;az=1;var e=bJ(),t=AA(),n=TA(),r=n&&n.isSet,a=r?t(r):e;return xE=a}function D5(){if(oz)return SE;oz=1;var e=wA(),t=zA(),n=O5(),r=z5(),a=iJ(),o=sJ(),i=mk(),s=cJ(),c=lJ(),l=b5(),u=fJ(),f=V_(),d=uJ(),p=gJ(),h=yJ(),m=Ai(),y=EA(),g=vJ(),v=Vc(),b=wJ(),_=pk(),w=MA(),k="[object Arguments]",x="[object Function]",S="[object Object]",E={};return E[k]=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[S]=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[x]=E["[object WeakMap]"]=!1,SE=function A(z,C,I,T,R,P){var j,O=1&C,N=2&C,M=4&C;if(I&&(j=R?I(z,T,R,P):I(z)),void 0!==j)return j;if(!v(z))return z;var D=m(z);if(D){if(j=d(z),!O)return i(z,j)}else{var B=f(z),L=B==x||"[object GeneratorFunction]"==B;if(y(z))return o(z,O);if(B==S||B==k||L&&!R){if(j=N||L?{}:h(z),!O)return N?c(z,a(j,z)):s(z,r(j,z))}else{if(!E[B])return R?z:{};j=p(z,B,O)}}P||(P=new e);var V=P.get(z);if(V)return V;P.set(z,j),b(z)?z.forEach((function(e){j.add(A(e,C,I,e,z,P))})):g(z)&&z.forEach((function(e,t){j.set(t,A(e,C,I,t,z,P))}));var q=D?void 0:(M?N?u:l:N?w:_)(z);return t(q||z,(function(e,t){q&&(e=z[t=e]),n(j,t,A(e,C,I,t,z,P))})),j},SE}function kJ(){if(iz)return EE;iz=1;var e=NX();return EE=function(t){return(null==t?0:t.length)?e(t,1):[]}}function xJ(){if(sz)return CE;sz=1;var e=kJ(),t=LX(),n=A5();return CE=function(r){return n(t(r,void 0,e),r+"")}}_y.exports;const SJ={light:"",dark:".dark"},N5=v.createContext(null);function L5(){const e=v.useContext(N5);if(!e)throw new Error("useChart must be used within a <ChartContainer />");return e}const EJ=v.forwardRef((({id:e,className:t,children:n,config:r,...a},o)=>{const i=v.useId(),s=`chart-${e||i.replace(/:/g,"")}`;return B.jsx(N5.Provider,{value:{config:r},children:B.jsxs("div",{"data-chart":s,ref:o,className:$e("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),...a,children:[B.jsx(CJ,{id:s,config:r}),B.jsx(tJ,{children:n})]})})}));EJ.displayName="Chart";const CJ=({id:e,config:t})=>{const n=Object.entries(t).filter((([,e])=>e.theme||e.color));return n.length?B.jsx("style",{dangerouslySetInnerHTML:{__html:Object.entries(SJ).map((([t,r])=>`\n${r} [data-chart=${e}] {\n${n.map((([e,n])=>{var r;const a=(null==(r=n.theme)?void 0:r[t])||n.color;return a?` --color-${e}: ${a};`:null})).join("\n")}\n}\n`)).join("\n")}}):null},RJ=v.forwardRef((({active:e,payload:t,className:n,indicator:r="dot",hideLabel:a=!1,hideIndicator:o=!1,label:i,labelFormatter:s,labelClassName:c,formatter:l,color:u,nameKey:f,labelKey:d},p)=>{const{config:h}=L5(),m=v.useMemo((()=>{var e;if(a||null==t||!t.length)return null;const[n]=t,r=`${d||(null==n?void 0:n.dataKey)||(null==n?void 0:n.name)||"value"}`,o=RC(h,n,r),l=d||"string"!=typeof i?null==o?void 0:o.label:(null==(e=h[i])?void 0:e.label)||i;return s?B.jsx("div",{className:$e("font-medium",c),children:s(l,t)}):l?B.jsx("div",{className:$e("font-medium",c),children:l}):null}),[i,s,t,a,c,h,d]);if(!e||null==t||!t.length)return null;const y=1===t.length&&"dot"!==r,g=t.length>10;return B.jsxs("div",{ref:p,className:$e("grid min-w-[8rem] items-start gap-1.5 rounded-sm border border-border/50 bg-background px-2.5 py-1.5 text-xs shadow-xl",g&&"min-w-[16rem]",n),children:[y?null:m,B.jsx("div",{className:$e("grid gap-1.5",g&&"grid-cols-2 gap-x-4"),children:t.map(((e,t)=>{var n;const a=`${f||e.name||e.dataKey||"value"}`,i=RC(h,e,a),s=u||(null==(n=e.payload)?void 0:n.fill)||e.color||"";return B.jsx("div",{className:$e("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"),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]):B.jsxs(B.Fragment,{children:[null!=i&&i.icon?B.jsx(i.icon,{}):!o&&B.jsx("div",{className:$e("shrink-0 rounded-[2px] border-[--color-border] bg-[--color-bg]",{"h-2.5 w-2.5":"dot"===r,"w-1":"line"===r,"w-0 border-[1.5px] border-dashed bg-transparent":"dashed"===r,"my-0.5":y&&"dashed"===r}),style:{"--color-bg":s,"--color-border":s}}),B.jsxs("div",{className:$e("flex flex-1 justify-between leading-none",y?"items-end":"items-center"),children:[B.jsxs("div",{className:"grid gap-1.5",children:[y?m:null,B.jsx("span",{className:"text-muted-foreground",children:(null==i?void 0:i.label)||e.name})]}),e.value&&B.jsx("span",{className:"font-mono font-medium tabular-nums text-foreground",children:e.value.toLocaleString()})]})]})},e.dataKey)}))})]})}));RJ.displayName="ChartTooltip";const AJ=v.forwardRef((({className:e,hideIcon:t=!1,payload:n,nameKey:r,onItemHover:a,hoveredItem:o},i)=>{const{config:s}=L5(),c=v.useRef({});return v.useEffect((()=>{if(o&&c.current[o]){const e=c.current[o];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}}),[o]),null!=n&&n.length?B.jsx("div",{ref:i,className:$e("flex h-[150px] w-full flex-wrap items-center justify-center gap-6 overflow-y-auto pb-10",e),children:n.map((e=>{var n;const i=`${r||e.dataKey||"value"}`,l=RC(s,e,i),u=!!a&&i===o;return B.jsxs("div",{ref:e=>{e?c.current[i]=e:delete c.current[i]},className:$e("group flex cursor-pointer select-none items-center gap-2 text-base transition-all duration-150",u?"scale-105 text-black":o?"text-gray-700 opacity-40":"text-gray-700"),onMouseEnter:()=>null==a?void 0:a(e.dataKey),onMouseLeave:()=>null==a?void 0:a(null),children:[null!=l&&l.icon&&!t?B.jsx(l.icon,{}):B.jsx("div",{className:"h-2 w-2 shrink-0 rounded-[2px]",style:{backgroundColor:e.color||""}}),B.jsx("span",{className:"min-w-[max-content]",children:(null==l?void 0:l.label)||e.name})]},(null==(n=e.value)?void 0:n.toString())||i)}))}):null}));function RC(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 a=n;return n in t&&"string"==typeof t[n]?a=t[n]:r&&n in r&&"string"==typeof r[n]&&(a=r[n]),a in e?e[a]:e[n]}function yk(e){const t=v.useRef({value:e,previous:e});return v.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}function _k(e){const[t,n]=v.useState(void 0);return Mo((()=>{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 a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}AJ.displayName="ChartLegend";const j5="Checkbox",[TJ,BWe]=ii(j5),[IJ,PJ]=TJ(j5),$J=v.forwardRef(((e,t)=>{const{__scopeCheckbox:n,name:r,checked:a,defaultChecked:o,required:i,disabled:s,value:c="on",onCheckedChange:l,...u}=e,[f,d]=v.useState(null),p=yn(t,(e=>d(e))),h=v.useRef(!1),m=!f||!!f.closest("form"),[y=!1,g]=kp({prop:a,defaultProp:o,onChange:l}),b=v.useRef(y);return v.useEffect((()=>{const e=null==f?void 0:f.form;if(e){const t=()=>g(b.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[f,g]),v.createElement(IJ,{scope:n,state:y,disabled:s},v.createElement(St.button,Le({type:"button",role:"checkbox","aria-checked":sm(y)?"mixed":y,"aria-required":i,"data-state":F5(y),"data-disabled":s?"":void 0,disabled:s,value:c},u,{ref:p,onKeyDown:lt(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:lt(e.onClick,(e=>{g((e=>!!sm(e)||!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&v.createElement(MJ,{control:f,bubbles:!h.current,name:r,value:c,checked:y,required:i,disabled:s,style:{transform:"translateX(-100%)"}}))})),OJ="CheckboxIndicator",zJ=v.forwardRef(((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...a}=e,o=PJ(OJ,n);return v.createElement(Ws,{present:r||sm(o.state)||!0===o.state},v.createElement(St.span,Le({"data-state":F5(o.state),"data-disabled":o.disabled?"":void 0},a,{ref:t,style:{pointerEvents:"none",...e.style}})))})),MJ=e=>{const{control:t,checked:n,bubbles:r=!0,...a}=e,o=v.useRef(null),i=yk(n),s=_k(t);return v.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&a){const t=new Event("click",{bubbles:r});e.indeterminate=sm(n),a.call(e,!sm(n)&&n),e.dispatchEvent(t)}}),[i,n,r]),v.createElement("input",Le({type:"checkbox","aria-hidden":!0,defaultChecked:!sm(n)&&n},a,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function sm(e){return"indeterminate"===e}function F5(e){return sm(e)?"indeterminate":e?"checked":"unchecked"}const B5=$J,DJ=zJ,cz=Yl("",{variants:{size:{default:"h-4 w-4",20:"size-5",24:"size-6",32:"size-8"},variant:{default:"peer shrink-0 rounded-xs border border-slate-700 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=unchecked]:border-slate-700 data-[state=checked]:bg-slate-700 data-[state=checked]:text-primary-foreground",dark:"shrink-0 bg-slate-900_50 data-[state=checked]:bg-slate-700 rounded-[4px] border-[2px] data-[state=checked]:text-primary-foreground border-slate-100 [&_svg]:size-[24px] [&_svg]:border-none"}},defaultVariants:{size:"default",variant:"default"}}),V5=v.forwardRef((({className:e,size:t,variant:n,...r},a)=>B.jsx(B5,{ref:a,className:$e(e,cz({size:t,variant:n})),...r,children:B.jsx(DJ,{className:$e("flex items-center justify-center text-current"),children:B.jsx(tA,{className:$e(cz({size:t}))})})})));V5.displayName=B5.displayName;var lz=1,NJ=.9,LJ=.8,jJ=.17,RE=.1,AE=.999,FJ=.9999,BJ=.99,VJ=/[\\\/_+.#"@\[\(\{&]/,UJ=/[\\\/_+.#"@\[\(\{&]/g,qJ=/[\s-]/,U5=/[\s-]/g;function AC(e,t,n,r,a,o,i){if(o===t.length)return a===e.length?lz:BJ;var s=`${a},${o}`;if(void 0!==i[s])return i[s];for(var c,l,u,f,d=r.charAt(o),p=n.indexOf(d,a),h=0;p>=0;)(c=AC(e,t,n,r,p+1,o+1,i))>h&&(p===a?c*=lz:VJ.test(e.charAt(p-1))?(c*=LJ,(u=e.slice(a,p-1).match(UJ))&&a>0&&(c*=Math.pow(AE,u.length))):qJ.test(e.charAt(p-1))?(c*=NJ,(f=e.slice(a,p-1).match(U5))&&a>0&&(c*=Math.pow(AE,f.length))):(c*=jJ,a>0&&(c*=Math.pow(AE,p-a))),e.charAt(p)!==t.charAt(o)&&(c*=FJ)),(c<RE&&n.charAt(p-1)===r.charAt(o+1)||r.charAt(o+1)===r.charAt(o)&&n.charAt(p-1)!==r.charAt(o))&&((l=AC(e,t,n,r,p+1,o+2,i))*RE>c&&(c=l*RE)),c>h&&(h=c),p=n.indexOf(d,p+1);return i[s]=h,h}function fz(e){return e.toLowerCase().replace(U5," ")}function WJ(e,t,n){return AC(e=n&&n.length>0?""+(e+" "+n.join(" ")):e,t,fz(e),fz(t),0,0,{})}var ry='[cmdk-group=""]',TE='[cmdk-group-items=""]',HJ='[cmdk-group-heading=""]',NA='[cmdk-item=""]',uz=`${NA}:not([aria-disabled="true"])`,TC="cmdk-item-select",tm="data-value",GJ=(e,t,n)=>WJ(e,t,n),q5=v.createContext(void 0),U_=()=>v.useContext(q5),W5=v.createContext(void 0),LA=()=>v.useContext(W5),H5=v.createContext(void 0),G5=v.forwardRef(((e,t)=>{let n=c1((()=>{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=c1((()=>new Set)),a=c1((()=>new Map)),o=c1((()=>new Map)),i=c1((()=>new Set)),s=K5(e),{label:c,children:l,value:u,onValueChange:f,filter:d,shouldFilter:p,loop:h,disablePointerSelection:m=!1,vimBindings:y=!0,...g}=e,b=v.useId(),_=v.useId(),w=v.useId(),k=v.useRef(null),x=aee();gm((()=>{if(void 0!==u){let e=u.trim();n.current.value=e,S.emit()}}),[u]),gm((()=>{x(6,T)}),[]);let S=v.useMemo((()=>({subscribe:e=>(i.current.add(e),()=>i.current.delete(e)),snapshot:()=>n.current,setState:(e,t,r)=>{var a,o,i;if(!Object.is(n.current[e],t)){if(n.current[e]=t,"search"===e)I(),z(),x(1,C);else if("value"===e&&(r||x(5,T),void 0!==(null==(a=s.current)?void 0:a.value))){let e=t??"";return void(null==(i=(o=s.current).onValueChange)||i.call(o,e))}S.emit()}},emit:()=>{i.current.forEach((e=>e()))}})),[]),E=v.useMemo((()=>({value:(e,t,r)=>{var a;t!==(null==(a=o.current.get(e))?void 0:a.value)&&(o.current.set(e,{value:t,keywords:r}),n.current.filtered.items.set(e,A(t,r)),x(2,(()=>{z(),S.emit()})))},item:(e,t)=>(r.current.add(e),t&&(a.current.has(t)?a.current.get(t).add(e):a.current.set(t,new Set([e]))),x(3,(()=>{I(),z(),n.current.value||C(),S.emit()})),()=>{o.current.delete(e),r.current.delete(e),n.current.filtered.items.delete(e);let t=R();x(4,(()=>{I(),(null==t?void 0:t.getAttribute("id"))===e&&C(),S.emit()}))}),group:e=>(a.current.has(e)||a.current.set(e,new Set),()=>{o.current.delete(e),a.current.delete(e)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],disablePointerSelection:m,listId:b,inputId:w,labelId:_,listInnerRef:k})),[]);function A(e,t){var r,a;let o=null!=(a=null==(r=s.current)?void 0:r.filter)?a:GJ;return e?o(e,n.current.search,t):0}function z(){if(!n.current.search||!1===s.current.shouldFilter)return;let e=n.current.filtered.items,t=[];n.current.filtered.groups.forEach((n=>{let r=a.current.get(n),o=0;r.forEach((t=>{let n=e.get(t);o=Math.max(n,o)})),t.push([n,o])}));let r=k.current;P().sort(((t,n)=>{var r,a;let o=t.getAttribute("id"),i=n.getAttribute("id");return(null!=(r=e.get(i))?r:0)-(null!=(a=e.get(o))?a:0)})).forEach((e=>{let t=e.closest(TE);t?t.appendChild(e.parentElement===t?e:e.closest(`${TE} > *`)):r.appendChild(e.parentElement===r?e:e.closest(`${TE} > *`))})),t.sort(((e,t)=>t[1]-e[1])).forEach((e=>{let t=k.current.querySelector(`${ry}[${tm}="${encodeURIComponent(e[0])}"]`);null==t||t.parentElement.appendChild(t)}))}function C(){let e=P().find((e=>"true"!==e.getAttribute("aria-disabled"))),t=null==e?void 0:e.getAttribute(tm);S.setState("value",t||void 0)}function I(){var e,t,i,c;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 a of r.current){let r=A(null!=(t=null==(e=o.current.get(a))?void 0:e.value)?t:"",null!=(c=null==(i=o.current.get(a))?void 0:i.keywords)?c:[]);n.current.filtered.items.set(a,r),r>0&&l++}for(let[e,t]of a.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=R();r&&((null==(e=r.parentElement)?void 0:e.firstChild)===r&&(null==(n=null==(t=r.closest(ry))?void 0:t.querySelector(HJ))||n.scrollIntoView({block:"nearest"})),r.scrollIntoView({block:"nearest"}))}function R(){var e;return null==(e=k.current)?void 0:e.querySelector(`${NA}[aria-selected="true"]`)}function P(){var e;return Array.from(null==(e=k.current)?void 0:e.querySelectorAll(uz))}function j(e){let t=P()[e];t&&S.setState("value",t.getAttribute(tm))}function O(e){var t;let n=R(),r=P(),a=r.findIndex((e=>e===n)),o=r[a+e];null!=(t=s.current)&&t.loop&&(o=a+e<0?r[r.length-1]:a+e===r.length?r[0]:r[a+e]),o&&S.setState("value",o.getAttribute(tm))}function N(e){let t,n=R(),r=null==n?void 0:n.closest(ry);for(;r&&!t;)r=e>0?nee(r,ry):ree(r,ry),t=null==r?void 0:r.querySelector(uz);t?S.setState("value",t.getAttribute(tm)):O(e)}let M=()=>j(P().length-1),D=e=>{e.preventDefault(),e.metaKey?M():e.altKey?N(1):O(1)},B=e=>{e.preventDefault(),e.metaKey?j(0):e.altKey?N(-1):O(-1)};return v.createElement(St.div,{ref:t,tabIndex:-1,...g,"cmdk-root":"",onKeyDown:e=>{var t;if(null==(t=g.onKeyDown)||t.call(g,e),!e.defaultPrevented)switch(e.key){case"n":case"j":y&&e.ctrlKey&&D(e);break;case"ArrowDown":D(e);break;case"p":case"k":y&&e.ctrlKey&&B(e);break;case"ArrowUp":B(e);break;case"Home":e.preventDefault(),j(0);break;case"End":e.preventDefault(),M();break;case"Enter":if(!e.nativeEvent.isComposing&&229!==e.keyCode){e.preventDefault();let t=R();if(t){let e=new Event(TC);t.dispatchEvent(e)}}}}},v.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:iee},c),vk(e,(e=>v.createElement(W5.Provider,{value:S},v.createElement(q5.Provider,{value:E},e)))))})),KJ=v.forwardRef(((e,t)=>{var n,r;let a=v.useId(),o=v.useRef(null),i=v.useContext(H5),s=U_(),c=K5(e),l=null!=(r=null==(n=c.current)?void 0:n.forceMount)?r:null==i?void 0:i.forceMount;gm((()=>{if(!l)return s.item(a,null==i?void 0:i.id)}),[l]);let u=Q5(a,o,[e.value,e.children,o],e.keywords),f=LA(),d=ym((e=>e.value&&e.value===u.current)),p=ym((e=>!(!l&&!1!==s.filter())||(!e.search||e.filtered.items.get(a)>0)));function h(){var e,t;m(),null==(t=(e=c.current).onSelect)||t.call(e,u.current)}function m(){f.setState("value",u.current,!0)}if(v.useEffect((()=>{let t=o.current;if(t&&!e.disabled)return t.addEventListener(TC,h),()=>t.removeEventListener(TC,h)}),[p,e.onSelect,e.disabled]),!p)return null;let{disabled:y,value:g,onSelect:b,forceMount:_,keywords:w,...k}=e;return v.createElement(St.div,{ref:t_([o,t]),...k,id:a,"cmdk-item":"",role:"option","aria-disabled":!!y,"aria-selected":!!d,"data-disabled":!!y,"data-selected":!!d,onPointerMove:y||s.disablePointerSelection?void 0:m,onClick:y?void 0:h},e.children)})),QJ=v.forwardRef(((e,t)=>{let{heading:n,children:r,forceMount:a,...o}=e,i=v.useId(),s=v.useRef(null),c=v.useRef(null),l=v.useId(),u=U_(),f=ym((e=>!(!a&&!1!==u.filter())||(!e.search||e.filtered.groups.has(i))));gm((()=>u.group(i)),[]),Q5(i,s,[e.value,e.heading,c]);let d=v.useMemo((()=>({id:i,forceMount:a})),[a]);return v.createElement(St.div,{ref:t_([s,t]),...o,"cmdk-group":"",role:"presentation",hidden:!f||void 0},n&&v.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:l},n),vk(e,(e=>v.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?l:void 0},v.createElement(H5.Provider,{value:d},e)))))})),YJ=v.forwardRef(((e,t)=>{let{alwaysRender:n,...r}=e,a=v.useRef(null),o=ym((e=>!e.search));return n||o?v.createElement(St.div,{ref:t_([a,t]),...r,"cmdk-separator":"",role:"separator"}):null})),ZJ=v.forwardRef(((e,t)=>{let{onValueChange:n,...r}=e,a=null!=e.value,o=LA(),i=ym((e=>e.search)),s=ym((e=>e.value)),c=U_(),l=v.useMemo((()=>{var e;let t=null==(e=c.listInnerRef.current)?void 0:e.querySelector(`${NA}[${tm}="${encodeURIComponent(s)}"]`);return null==t?void 0:t.getAttribute("id")}),[]);return v.useEffect((()=>{null!=e.value&&o.setState("search",e.value)}),[e.value]),v.createElement(St.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":l,id:c.inputId,type:"text",value:a?e.value:i,onChange:e=>{a||o.setState("search",e.target.value),null==n||n(e.target.value)}})})),XJ=v.forwardRef(((e,t)=>{let{children:n,label:r="Suggestions",...a}=e,o=v.useRef(null),i=v.useRef(null),s=U_();return v.useEffect((()=>{if(i.current&&o.current){let e,t=i.current,n=o.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)}}}),[]),v.createElement(St.div,{ref:t_([o,t]),...a,"cmdk-list":"",role:"listbox","aria-label":r,id:s.listId},vk(e,(e=>v.createElement("div",{ref:t_([i,s.listInnerRef]),"cmdk-list-sizer":""},e))))})),JJ=v.forwardRef(((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:a,contentClassName:o,container:i,...s}=e;return v.createElement(z7,{open:n,onOpenChange:r},v.createElement(ok,{container:i},v.createElement(q1,{"cmdk-overlay":"",className:a}),v.createElement(W1,{"aria-label":e.label,"cmdk-dialog":"",className:o},v.createElement(G5,{ref:t,...s}))))})),eee=v.forwardRef(((e,t)=>ym((e=>0===e.filtered.count))?v.createElement(St.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null)),tee=v.forwardRef(((e,t)=>{let{progress:n,children:r,label:a="Loading...",...o}=e;return v.createElement(St.div,{ref:t,...o,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},vk(e,(e=>v.createElement("div",{"aria-hidden":!0},e))))})),Ti=Object.assign(G5,{List:XJ,Item:KJ,Input:ZJ,Group:QJ,Separator:YJ,Dialog:JJ,Empty:eee,Loading:tee});function nee(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function ree(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function K5(e){let t=v.useRef(e);return gm((()=>{t.current=e})),t}var gm=typeof window>"u"?v.useEffect:v.useLayoutEffect;function c1(e){let t=v.useRef();return void 0===t.current&&(t.current=e()),t}function t_(e){return t=>{e.forEach((e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}function ym(e){let t=LA(),n=()=>e(t.snapshot());return v.useSyncExternalStore(t.subscribe,n,n)}function Q5(e,t,n,r=[]){let a=v.useRef(),o=U_();return gm((()=>{var i;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():a.current}})(),c=r.map((e=>e.trim()));o.value(e,s,c),null==(i=t.current)||i.setAttribute(tm,s),a.current=s})),a}var aee=()=>{let[e,t]=v.useState(),n=c1((()=>new Map));return gm((()=>{n.current.forEach((e=>e())),n.current=new Map}),[e]),(e,r)=>{n.current.set(e,r),t({})}};function oee(e){let t=e.type;return"function"==typeof t?t(e.props):"render"in t?t.render(e.props):e}function vk({asChild:e,children:t},n){return e&&v.isValidElement(t)?v.cloneElement(oee(t),{ref:t.ref},n(t.props.children)):n(t)}var iee={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const see=ok,Y5=v.forwardRef((({className:e,...t},n)=>(v.useEffect((()=>{const e=document.querySelectorAll(".blured-modal-overlay");return e.forEach((e=>e&&(e.style.filter="blur(5px)"))),()=>{e.forEach((e=>e&&(e.style.filter="none")))}}),[]),B.jsx(q1,{ref:n,"data-testid":"dialog_overlay",className:$e("fixed inset-0 z-100 bg-black opacity-[0.8] data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}))));Y5.displayName=q1.displayName;const cee=Yl("",{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-slate-400",outsideCard:"fixed right-[30px] top-[30px] z-100 text-slate-400",mobileGallery:"fixed right-m top-[62px] text-white z-[110]"}},defaultVariants:{closeVariant:"outsideCard"}}),lee=Yl("",{variants:{closeSize:{small:"size-6",big:"size-[42px]","18x18":"size-[18px]"}},defaultVariants:{closeSize:"small"}}),fee=v.forwardRef((({title:e,titleIcon:t,className:n,showClose:r=!0,closeVariant:a="outsideCard",closeSize:o="big",children:i,overlayClassName:s,childrenClassName:c,onBack:l,onCloseModal:u,...f},d)=>{const p=B.jsxs(ik,{className:$e(cee({closeVariant:a})),children:[B.jsx(n7,{onClick:u,fill:"currentColor",className:$e(lee({closeSize:o}))}),B.jsx("span",{className:"sr-only",children:"Close"})]});return B.jsxs(see,{children:[B.jsx(Y5,{className:s,onClick:u}),r&&"insideCard"!==a&&p,B.jsxs(W1,{ref:d,className:$e("fixed left-[50%] top-[50%] z-100 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),...f,children:[B.jsx(Z5,{className:"hidden",children:"DialogTitle"}),B.jsx(X5,{className:"hidden",children:"DialogDescription"}),e&&B.jsxs("h3",{className:"flex items-center justify-center gap-xxs border-b border-slate-200 p-m text-center text-lg font-semibold text-slate-700",children:[t,e]}),B.jsx("div",{className:$e("p-m",c),children:i}),r&&"insideCard"===a&&p,l&&B.jsx("button",{"data-testid":"dialog-back-button","aria-label":"Back",onClick:l,className:"absolute left-m top-m",children:B.jsx(J8,{color:"var(--slate-400)",size:24})})]})]})}));fee.displayName=W1.displayName;const Z5=v.forwardRef((({className:e,...t},n)=>B.jsx(N_,{ref:n,className:$e("text-lg font-semibold leading-none tracking-tight",e),...t})));Z5.displayName=N_.displayName;const X5=v.forwardRef((({className:e,...t},n)=>B.jsx(L_,{ref:n,className:$e("text-sm text-muted-foreground",e),...t})));X5.displayName=L_.displayName;const uee=v.forwardRef((({className:e,...t},n)=>B.jsx(Ti,{ref:n,className:$e("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t})));uee.displayName=Ti.displayName;const dee=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:B.jsx(Ti.Input,{ref:n,className:$e("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})})));dee.displayName=Ti.Input.displayName;const pee=v.forwardRef((({className:e,...t},n)=>B.jsx(Ti.List,{ref:n,className:$e("mt-2 max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t})));pee.displayName=Ti.List.displayName;const hee=v.forwardRef(((e,t)=>B.jsx(Ti.Empty,{ref:t,className:"py-6 text-center text-sm",...e})));hee.displayName=Ti.Empty.displayName;const mee=v.forwardRef((({className:e,...t},n)=>B.jsx(Ti.Group,{ref:n,className:$e("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})));mee.displayName=Ti.Group.displayName;const gee=v.forwardRef((({className:e,...t},n)=>B.jsx(Ti.Separator,{ref:n,className:$e("-mx-1 h-px bg-border",e),...t})));gee.displayName=Ti.Separator.displayName;const yee=v.forwardRef((({className:e,...t},n)=>B.jsx(Ti.Item,{ref:n,className:$e("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 gp(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 dz(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function J5(...e){return t=>{let n=!1;const r=e.map((e=>{const r=dz(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():dz(e[t],null)}}}}function Im(...e){return v.useCallback(J5(...e),e)}function _ee(e,t){const n=v.createContext(t),r=e=>{const{children:t,...r}=e,a=v.useMemo((()=>r),Object.values(r));return B.jsx(n.Provider,{value:a,children:t})};return r.displayName=e+"Provider",[r,function(r){const a=v.useContext(n);if(a)return a;if(void 0!==t)return t;throw new Error(`\`${r}\` must be used within \`${e}\``)}]}function vee(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>v.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return v.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=v.createContext(r),o=n.length;n=[...n,r];const i=t=>{var n;const{scope:r,children:i,...s}=t,c=(null==(n=null==r?void 0:r[e])?void 0:n[o])||a,l=v.useMemo((()=>s),Object.values(s));return B.jsx(c.Provider,{value:l,children:i})};return i.displayName=t+"Provider",[i,function(n,i){var s;const c=(null==(s=null==i?void 0:i[e])?void 0:s[o])||a,l=v.useContext(c);if(l)return l;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},bee(r,...t)]}function bee(...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 v.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}yee.displayName=Ti.Item.displayName;var ew=null!=globalThis&&globalThis.document?v.useLayoutEffect:()=>{},wee=Xb[" useId ".trim().toString()]||(()=>{}),kee=0;function IE(e){const[t,n]=v.useState(wee());return ew((()=>{e||n((e=>e??String(kee++)))}),[e]),e||(t?`radix-${t}`:"")}function _m(e){const t=v.useRef(e);return v.useEffect((()=>{t.current=e})),v.useMemo((()=>(...e)=>{var n;return null==(n=t.current)?void 0:n.call(t,...e)}),[])}function xee({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=See({defaultProp:t,onChange:n}),o=void 0!==e,i=o?e:r,s=_m(n);return[i,v.useCallback((t=>{if(o){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)}),[o,e,a,s])]}function See({defaultProp:e,onChange:t}){const n=v.useState(e),[r]=n,a=v.useRef(r),o=_m(t);return v.useEffect((()=>{a.current!==r&&(o(r),a.current=r)}),[r,a,o]),n}function eL(e){const t=Eee(e),n=v.forwardRef(((e,n)=>{const{children:r,...a}=e,o=v.Children.toArray(r),i=o.find(Ree);if(i){const e=i.props.children,r=o.map((t=>t===i?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t));return B.jsx(t,{...a,ref:n,children:v.isValidElement(e)?v.cloneElement(e,void 0,r):null})}return B.jsx(t,{...a,ref:n,children:r})}));return n.displayName=`${e}.Slot`,n}function Eee(e){const t=v.forwardRef(((e,t)=>{const{children:n,...r}=e;if(v.isValidElement(n)){const e=Tee(n),a=Aee(r,n.props);return n.type!==v.Fragment&&(a.ref=t?J5(t,e):e),v.cloneElement(n,a)}return v.Children.count(n)>1?v.Children.only(null):null}));return t.displayName=`${e}.SlotClone`,t}var Cee=Symbol("radix.slottable");function Ree(e){return v.isValidElement(e)&&"function"==typeof e.type&&"__radixId"in e.type&&e.type.__radixId===Cee}function Aee(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}function Tee(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;return a?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}var Iee=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],Eu=Iee.reduce(((e,t)=>{const n=eL(`Primitive.${t}`),r=v.forwardRef(((e,r)=>{const{asChild:a,...o}=e,i=a?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),B.jsx(i,{...o,ref:r})}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function Pee(e,t){e&&Zl.flushSync((()=>e.dispatchEvent(t)))}function $ee(e,t=(null==globalThis?void 0:globalThis.document)){const n=_m(e);v.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 pz,Oee="DismissableLayer",IC="dismissableLayer.update",zee="dismissableLayer.pointerDownOutside",Mee="dismissableLayer.focusOutside",tL=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),nL=v.forwardRef(((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,onDismiss:s,...c}=e,l=v.useContext(tL),[u,f]=v.useState(null),d=(null==u?void 0:u.ownerDocument)??(null==globalThis?void 0:globalThis.document),[,p]=v.useState({}),h=Im(t,(e=>f(e))),m=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),g=m.indexOf(y),b=u?m.indexOf(u):-1,_=l.layersWithOutsidePointerEventsDisabled.size>0,w=b>=g,k=Lee((e=>{const t=e.target,n=[...l.branches].some((e=>e.contains(t)));!w||n||(null==a||a(e),null==i||i(e),e.defaultPrevented||null==s||s())}),d),x=jee((e=>{const t=e.target;[...l.branches].some((e=>e.contains(t)))||(null==o||o(e),null==i||i(e),e.defaultPrevented||null==s||s())}),d);return $ee((e=>{b===l.layers.size-1&&(null==r||r(e),!e.defaultPrevented&&s&&(e.preventDefault(),s()))}),d),v.useEffect((()=>{if(u)return n&&(0===l.layersWithOutsidePointerEventsDisabled.size&&(pz=d.body.style.pointerEvents,d.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),hz(),()=>{n&&1===l.layersWithOutsidePointerEventsDisabled.size&&(d.body.style.pointerEvents=pz)}}),[u,d,n,l]),v.useEffect((()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),hz())}),[u,l]),v.useEffect((()=>{const e=()=>p({});return document.addEventListener(IC,e),()=>document.removeEventListener(IC,e)}),[]),B.jsx(Eu.div,{...c,ref:h,style:{pointerEvents:_?w?"auto":"none":void 0,...e.style},onFocusCapture:gp(e.onFocusCapture,x.onFocusCapture),onBlurCapture:gp(e.onBlurCapture,x.onBlurCapture),onPointerDownCapture:gp(e.onPointerDownCapture,k.onPointerDownCapture)})}));nL.displayName=Oee;var Dee="DismissableLayerBranch",Nee=v.forwardRef(((e,t)=>{const n=v.useContext(tL),r=v.useRef(null),a=Im(t,r);return v.useEffect((()=>{const e=r.current;if(e)return n.branches.add(e),()=>{n.branches.delete(e)}}),[n.branches]),B.jsx(Eu.div,{...e,ref:a})}));function Lee(e,t=(null==globalThis?void 0:globalThis.document)){const n=_m(e),r=v.useRef(!1),a=v.useRef((()=>{}));return v.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){rL(zee,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}else t.removeEventListener("click",a.current);r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function jee(e,t=(null==globalThis?void 0:globalThis.document)){const n=_m(e),r=v.useRef(!1);return v.useEffect((()=>{const e=e=>{e.target&&!r.current&&rL(Mee,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 hz(){const e=new CustomEvent(IC);document.dispatchEvent(e)}function rL(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?Pee(a,o):a.dispatchEvent(o)}Nee.displayName=Dee;var PE="focusScope.autoFocusOnMount",$E="focusScope.autoFocusOnUnmount",mz={bubbles:!1,cancelable:!0},Fee="FocusScope",aL=v.forwardRef(((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:a,onUnmountAutoFocus:o,...i}=e,[s,c]=v.useState(null),l=_m(a),u=_m(o),f=v.useRef(null),d=Im(t,(e=>c(e))),p=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect((()=>{if(r){let e=function(e){if(p.paused||!s)return;const t=e.target;s.contains(t)?f.current=t:ip(f.current,{select:!0})},t=function(e){if(p.paused||!s)return;const t=e.relatedTarget;null!==t&&(s.contains(t)||ip(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&ip(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]),v.useEffect((()=>{if(s){yz.add(p);const e=document.activeElement;if(!s.contains(e)){const t=new CustomEvent(PE,mz);s.addEventListener(PE,l),s.dispatchEvent(t),t.defaultPrevented||(Bee(Hee(oL(s)),{select:!0}),document.activeElement===e&&ip(s))}return()=>{s.removeEventListener(PE,l),setTimeout((()=>{const t=new CustomEvent($E,mz);s.addEventListener($E,u),s.dispatchEvent(t),t.defaultPrevented||ip(e??document.body,{select:!0}),s.removeEventListener($E,u),yz.remove(p)}),0)}}}),[s,l,u,p]);const h=v.useCallback((e=>{if(!n&&!r||p.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,a=document.activeElement;if(t&&a){const t=e.currentTarget,[r,o]=Vee(t);r&&o?e.shiftKey||a!==o?e.shiftKey&&a===r&&(e.preventDefault(),n&&ip(o,{select:!0})):(e.preventDefault(),n&&ip(r,{select:!0})):a===t&&e.preventDefault()}}),[n,r,p.paused]);return B.jsx(Eu.div,{tabIndex:-1,...i,ref:d,onKeyDown:h})}));function Bee(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ip(r,{select:t}),document.activeElement!==n)return}function Vee(e){const t=oL(e);return[gz(t,e),gz(t.reverse(),e)]}function oL(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 gz(e,t){for(const n of e)if(!Uee(n,{upTo:t}))return n}function Uee(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 qee(e){return e instanceof HTMLInputElement&&"select"in e}function ip(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&qee(e)&&t&&e.select()}}aL.displayName=Fee;var yz=Wee();function Wee(){let e=[];return{add(t){const n=e[0];t!==n&&(null==n||n.pause()),e=_z(e,t),e.unshift(t)},remove(t){var n;e=_z(e,t),null==(n=e[0])||n.resume()}}}function _z(e,t){const n=[...e],r=n.indexOf(t);return-1!==r&&n.splice(r,1),n}function Hee(e){return e.filter((e=>"A"!==e.tagName))}var Gee="Portal",iL=v.forwardRef(((e,t)=>{var n;const{container:r,...a}=e,[o,i]=v.useState(!1);ew((()=>i(!0)),[]);const s=r||o&&(null==(n=null==globalThis?void 0:globalThis.document)?void 0:n.body);return s?u7.createPortal(B.jsx(Eu.div,{...a,ref:t}),s):null}));function Kee(e,t){return v.useReducer(((e,n)=>t[e][n]??e),e)}iL.displayName=Gee;var bk=e=>{const{present:t,children:n}=e,r=Qee(t),a="function"==typeof n?n({present:r.isPresent}):v.Children.only(n),o=Im(r.ref,Yee(a));return"function"==typeof n||r.isPresent?v.cloneElement(a,{ref:o}):null};function Qee(e){const[t,n]=v.useState(),r=v.useRef({}),a=v.useRef(e),o=v.useRef("none"),i=e?"mounted":"unmounted",[s,c]=Kee(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect((()=>{const e=Xv(r.current);o.current="mounted"===s?e:"none"}),[s]),ew((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=Xv(t);e?c("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?c("UNMOUNT"):c(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),a.current=e}}),[e,c]),ew((()=>{if(t){let e;const n=t.ownerDocument.defaultView??window,i=o=>{const i=Xv(r.current).includes(o.animationName);if(o.target===t&&i&&(c("ANIMATION_END"),!a.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&&(o.current=Xv(r.current))};return t.addEventListener("animationstart",s),t.addEventListener("animationcancel",i),t.addEventListener("animationend",i),()=>{n.clearTimeout(e),t.removeEventListener("animationstart",s),t.removeEventListener("animationcancel",i),t.removeEventListener("animationend",i)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function Xv(e){return(null==e?void 0:e.animationName)||"none"}function Yee(e){var t,n;let r=null==(t=Object.getOwnPropertyDescriptor(e.props,"ref"))?void 0:t.get,a=r&&"isReactWarning"in r&&r.isReactWarning;return a?e.ref:(r=null==(n=Object.getOwnPropertyDescriptor(e,"ref"))?void 0:n.get,a=r&&"isReactWarning"in r&&r.isReactWarning,a?e.props.ref:e.props.ref||e.ref)}bk.displayName="Presence";var OE=0;function Zee(){v.useEffect((()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??vz()),document.body.insertAdjacentElement("beforeend",e[1]??vz()),OE++,()=>{1===OE&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),OE--}}),[])}function vz(){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 sL=y7(),zE=function(){},wk=v.forwardRef((function(e,t){var n=v.useRef(null),r=v.useState({onScrollCapture:zE,onWheelCapture:zE,onTouchMoveCapture:zE}),a=r[0],o=r[1],i=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,f=e.shards,d=e.sideCar,p=e.noIsolation,h=e.inert,m=e.allowPinchZoom,y=e.as,g=void 0===y?"div":y,b=e.gapMode,_=lA(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),w=d,k=g7([n,t]),x=Oo(Oo({},_),a);return v.createElement(v.Fragment,null,u&&v.createElement(w,{sideCar:sL,removeScrollBar:l,shards:f,noIsolation:p,inert:h,setCallbacks:o,allowPinchZoom:!!m,lockRef:n,gapMode:b}),i?v.cloneElement(v.Children.only(s),Oo(Oo({},x),{ref:k})):v.createElement(g,Oo({},x,{className:c,ref:k}),s))}));wk.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},wk.classNames={fullWidth:Iy,zeroRight:Ty};var PC=!1;if(typeof window<"u")try{var Jv=Object.defineProperty({},"passive",{get:function(){return PC=!0,!0}});window.addEventListener("test",Jv,Jv),window.removeEventListener("test",Jv,Jv)}catch{PC=!1}var Jg=!!PC&&{passive:!1},Xee=function(e){return"TEXTAREA"===e.tagName},cL=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return"hidden"!==n[t]&&!(n.overflowY===n.overflowX&&!Xee(e)&&"visible"===n[t])},Jee=function(e){return cL(e,"overflowY")},ete=function(e){return cL(e,"overflowX")},bz=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host),lL(e,r)){var a=fL(e,r);if(a[1]>a[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},tte=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},nte=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},lL=function(e,t){return"v"===e?Jee(t):ete(t)},fL=function(e,t){return"v"===e?tte(t):nte(t)},rte=function(e,t){return"h"===e&&"rtl"===t?-1:1},ate=function(e,t,n,r,a){var o=rte(e,window.getComputedStyle(t).direction),i=o*r,s=n.target,c=t.contains(s),l=!1,u=i>0,f=0,d=0;do{var p=fL(e,s),h=p[0],m=p[1]-p[2]-o*h;(h||m)&&lL(e,s)&&(f+=m,d+=h),s=s instanceof ShadowRoot?s.host:s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(Math.abs(f)<1||!a)||!u&&(Math.abs(d)<1||!a))&&(l=!0),l},eb=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},wz=function(e){return[e.deltaX,e.deltaY]},kz=function(e){return e&&"current"in e?e.current:e},ote=function(e,t){return e[0]===t[0]&&e[1]===t[1]},ite=function(e){return"\n .block-interactivity-".concat(e," {pointer-events: none;}\n .allow-interactivity-").concat(e," {pointer-events: all;}\n")},ste=0,e1=[];function cte(e){var t=v.useRef([]),n=v.useRef([0,0]),r=v.useRef(),a=v.useState(ste++)[0],o=v.useState(fA)[0],i=v.useRef(e);v.useEffect((function(){i.current=e}),[e]),v.useEffect((function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(a));var t=m7([e.lockRef.current],(e.shards||[]).map(kz),!0).filter(Boolean);return t.forEach((function(e){return e.classList.add("allow-interactivity-".concat(a))})),function(){document.body.classList.remove("block-interactivity-".concat(a)),t.forEach((function(e){return e.classList.remove("allow-interactivity-".concat(a))}))}}}),[e.inert,e.lockRef.current,e.shards]);var s=v.useCallback((function(e,t){if("touches"in e&&2===e.touches.length||"wheel"===e.type&&e.ctrlKey)return!i.current.allowPinchZoom;var a,o=eb(e),s=n.current,c="deltaX"in e?e.deltaX:s[0]-o[0],l="deltaY"in e?e.deltaY:s[1]-o[1],u=e.target,f=Math.abs(c)>Math.abs(l)?"h":"v";if("touches"in e&&"h"===f&&"range"===u.type)return!1;var d=bz(f,u);if(!d)return!0;if(d?a=f:(a="v"===f?"h":"v",d=bz(f,u)),!d)return!1;if(!r.current&&"changedTouches"in e&&(c||l)&&(r.current=a),!a)return!0;var p=r.current||a;return ate(p,t,e,"h"===p?c:l,!0)}),[]),c=v.useCallback((function(e){var n=e;if(e1.length&&e1[e1.length-1]===o){var r="deltaY"in n?wz(n):eb(n),a=t.current.filter((function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&ote(e.delta,r)}))[0];if(a&&a.should)return void(n.cancelable&&n.preventDefault());if(!a){var c=(i.current.shards||[]).map(kz).filter(Boolean).filter((function(e){return e.contains(n.target)}));(c.length>0?s(n,c[0]):!i.current.noIsolation)&&n.cancelable&&n.preventDefault()}}}),[]),l=v.useCallback((function(e,n,r,a){var o={name:e,delta:n,target:r,should:a,shadowParent:lte(r)};t.current.push(o),setTimeout((function(){t.current=t.current.filter((function(e){return e!==o}))}),1)}),[]),u=v.useCallback((function(e){n.current=eb(e),r.current=void 0}),[]),f=v.useCallback((function(t){l(t.type,wz(t),t.target,s(t,e.lockRef.current))}),[]),d=v.useCallback((function(t){l(t.type,eb(t),t.target,s(t,e.lockRef.current))}),[]);v.useEffect((function(){return e1.push(o),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:d}),document.addEventListener("wheel",c,Jg),document.addEventListener("touchmove",c,Jg),document.addEventListener("touchstart",u,Jg),function(){e1=e1.filter((function(e){return e!==o})),document.removeEventListener("wheel",c,Jg),document.removeEventListener("touchmove",c,Jg),document.removeEventListener("touchstart",u,Jg)}}),[]);var p=e.removeScrollBar,h=e.inert;return v.createElement(v.Fragment,null,h?v.createElement(o,{styles:ite(a)}):null,p?v.createElement(w7,{gapMode:e.gapMode}):null)}function lte(e){for(var t=null;null!==e;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const fte=v7(sL,cte);var uL=v.forwardRef((function(e,t){return v.createElement(wk,Oo({},e,{ref:t,sideCar:fte}))}));uL.classNames=wk.classNames;var jA="Dialog",[dL,VWe]=vee(jA),[ute,Uc]=dL(jA),pL=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:a,onOpenChange:o,modal:i=!0}=e,s=v.useRef(null),c=v.useRef(null),[l=!1,u]=xee({prop:r,defaultProp:a,onChange:o});return B.jsx(ute,{scope:t,triggerRef:s,contentRef:c,contentId:IE(),titleId:IE(),descriptionId:IE(),open:l,onOpenChange:u,onOpenToggle:v.useCallback((()=>u((e=>!e))),[u]),modal:i,children:n})};pL.displayName=jA;var hL="DialogTrigger",mL=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uc(hL,n),o=Im(t,a.triggerRef);return B.jsx(Eu.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":VA(a.open),...r,ref:o,onClick:gp(e.onClick,a.onOpenToggle)})}));mL.displayName=hL;var FA="DialogPortal",[dte,gL]=dL(FA,{forceMount:void 0}),yL=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:a}=e,o=Uc(FA,t);return B.jsx(dte,{scope:t,forceMount:n,children:v.Children.map(r,(e=>B.jsx(bk,{present:n||o.open,children:B.jsx(iL,{asChild:!0,container:a,children:e})})))})};yL.displayName=FA;var tw="DialogOverlay",_L=v.forwardRef(((e,t)=>{const n=gL(tw,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Uc(tw,e.__scopeDialog);return o.modal?B.jsx(bk,{present:r||o.open,children:B.jsx(hte,{...a,ref:t})}):null}));_L.displayName=tw;var pte=eL("DialogOverlay.RemoveScroll"),hte=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uc(tw,n);return B.jsx(uL,{as:pte,allowPinchZoom:!0,shards:[a.contentRef],children:B.jsx(Eu.div,{"data-state":VA(a.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})})),vm="DialogContent",vL=v.forwardRef(((e,t)=>{const n=gL(vm,e.__scopeDialog),{forceMount:r=n.forceMount,...a}=e,o=Uc(vm,e.__scopeDialog);return B.jsx(bk,{present:r||o.open,children:o.modal?B.jsx(mte,{...a,ref:t}):B.jsx(gte,{...a,ref:t})})}));vL.displayName=vm;var mte=v.forwardRef(((e,t)=>{const n=Uc(vm,e.__scopeDialog),r=v.useRef(null),a=Im(t,n.contentRef,r);return v.useEffect((()=>{const e=r.current;if(e)return ak(e)}),[]),B.jsx(bL,{...e,ref:a,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:gp(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null==(t=n.triggerRef.current)||t.focus()})),onPointerDownOutside:gp(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey;(2===t.button||n)&&e.preventDefault()})),onFocusOutside:gp(e.onFocusOutside,(e=>e.preventDefault()))})})),gte=v.forwardRef(((e,t)=>{const n=Uc(vm,e.__scopeDialog),r=v.useRef(!1),a=v.useRef(!1);return B.jsx(bL,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var o,i;null==(o=e.onCloseAutoFocus)||o.call(e,t),t.defaultPrevented||(r.current||null==(i=n.triggerRef.current)||i.focus(),t.preventDefault()),r.current=!1,a.current=!1},onInteractOutside:t=>{var o,i;null==(o=e.onInteractOutside)||o.call(e,t),t.defaultPrevented||(r.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null==(i=n.triggerRef.current)?void 0:i.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}})})),bL=v.forwardRef(((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:a,onCloseAutoFocus:o,...i}=e,s=Uc(vm,n),c=v.useRef(null),l=Im(t,c);return Zee(),B.jsxs(B.Fragment,{children:[B.jsx(aL,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:a,onUnmountAutoFocus:o,children:B.jsx(nL,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":VA(s.open),...i,ref:l,onDismiss:()=>s.onOpenChange(!1)})}),B.jsxs(B.Fragment,{children:[B.jsx(yte,{titleId:s.titleId}),B.jsx(vte,{contentRef:c,descriptionId:s.descriptionId})]})]})})),BA="DialogTitle",wL=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uc(BA,n);return B.jsx(Eu.h2,{id:a.titleId,...r,ref:t})}));wL.displayName=BA;var kL="DialogDescription",xL=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uc(kL,n);return B.jsx(Eu.p,{id:a.descriptionId,...r,ref:t})}));xL.displayName=kL;var SL="DialogClose",EL=v.forwardRef(((e,t)=>{const{__scopeDialog:n,...r}=e,a=Uc(SL,n);return B.jsx(Eu.button,{type:"button",...r,ref:t,onClick:gp(e.onClick,(()=>a.onOpenChange(!1)))})}));function VA(e){return e?"open":"closed"}EL.displayName=SL;var CL="DialogTitleWarning",[UWe,RL]=_ee(CL,{contentName:vm,titleName:BA,docsSlug:"dialog"}),yte=({titleId:e})=>{const t=RL(CL),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 v.useEffect((()=>{e&&(document.getElementById(e)||console.error(n))}),[n,e]),null},_te="DialogDescriptionWarning",vte=({contentRef:e,descriptionId:t})=>{const n=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${RL(_te).contentName}}.`;return v.useEffect((()=>{var r;const a=null==(r=e.current)?void 0:r.getAttribute("aria-describedby");t&&a&&(document.getElementById(t)||console.warn(n))}),[n,e,t]),null},bte=pL,wte=mL,kte=yL,xte=_L,Ste=vL,Ete=wL,Cte=xL,Rte=EL;function Ate(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 AL=ze.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}),G1=()=>{const e=ze.useContext(AL);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};Ate("[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 Tte=24,Ite=typeof window<"u"?v.useLayoutEffect:v.useEffect;function xz(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}function Pte(){return UA(/^Mac/)}function $te(){return UA(/^iPhone/)}function Sz(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Ote(){return UA(/^iPad/)||Pte()&&navigator.maxTouchPoints>1}function TL(){return $te()||Ote()}function UA(e){return typeof window<"u"&&null!=window.navigator?e.test(window.navigator.platform):void 0}const ME=typeof document<"u"&&window.visualViewport;function Ez(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function IL(e){for(Ez(e)&&(e=e.parentElement);e&&!Ez(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const zte=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let DE,tb=0;function Mte(e={}){let{isDisabled:t}=e;Ite((()=>{if(!t)return tb++,1===tb&&TL()&&(DE=Dte()),()=>{tb--,0===tb&&(null==DE||DE())}}),[t])}function Dte(){let e,t=0,n=window.pageXOffset,r=window.pageYOffset,a=xz(Nte(document.documentElement,"paddingRight",window.innerWidth-document.documentElement.clientWidth+"px"));window.scrollTo(0,0);let o=xz(ay(document,"touchstart",(n=>{e=IL(n.target),(e!==document.documentElement||e!==document.body)&&(t=n.changedTouches[0].pageY)}),{passive:!1,capture:!0}),ay(document,"touchmove",(n=>{if(!e||e===document.documentElement||e===document.body)return void n.preventDefault();let r=n.changedTouches[0].pageY,a=e.scrollTop,o=e.scrollHeight-e.clientHeight;0!==o&&((a<=0&&r>t||a>=o&&r<t)&&n.preventDefault(),t=r)}),{passive:!1,capture:!0}),ay(document,"touchend",(e=>{let t=e.target;$C(t)&&t!==document.activeElement&&(e.preventDefault(),t.style.transform="translateY(-2000px)",t.focus(),requestAnimationFrame((()=>{t.style.transform=""})))}),{passive:!1,capture:!0}),ay(document,"focus",(e=>{let t=e.target;$C(t)&&(t.style.transform="translateY(-2000px)",requestAnimationFrame((()=>{t.style.transform="",ME&&(ME.height<window.innerHeight?requestAnimationFrame((()=>{Cz(t)})):ME.addEventListener("resize",(()=>Cz(t)),{once:!0}))})))}),!0),ay(window,"scroll",(()=>{window.scrollTo(0,0)})));return()=>{a(),o(),window.scrollTo(n,r)}}function Nte(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function ay(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Cz(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let t=IL(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 $C(e){return e instanceof HTMLInputElement&&!zte.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function Lte(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function jte(...e){return t=>e.forEach((e=>Lte(e,t)))}function PL(...e){return v.useCallback(jte(...e),e)}const $L=new WeakMap;function Sa(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&&$L.set(e,r)}function Fte(e,t){if(!(e&&e instanceof HTMLElement))return;let n=$L.get(e);n&&(e.style[t]=n[t])}const Ea=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function nb(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let a=r.match(/^matrix3d\((.+)\)$/);return a?parseFloat(a[1].split(", ")[Ea(t)?13:12]):(a=r.match(/^matrix\((.+)\)$/),a?parseFloat(a[1].split(", ")[Ea(t)?5:4]):null)}function Bte(e){return 8*(Math.log(e+1)-2)}function NE(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function Vte(...e){return(...t)=>{for(const n of e)"function"==typeof n&&n(...t)}}const _r={DURATION:.5,EASE:[.32,.72,0,1]},OL=.4,Ute=.25,qte=100,zL=8,Kh=16,OC=26,LE="vaul-dragging";function ML(e){const t=ze.useRef(e);return ze.useEffect((()=>{t.current=e})),ze.useMemo((()=>(...e)=>null==t.current?void 0:t.current.call(t,...e)),[])}function Wte({defaultProp:e,onChange:t}){const n=ze.useState(e),[r]=n,a=ze.useRef(r),o=ML(t);return ze.useEffect((()=>{a.current!==r&&(o(r),a.current=r)}),[r,a,o]),n}function DL({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,a]=Wte({defaultProp:t,onChange:n}),o=void 0!==e,i=o?e:r,s=ML(n);return[i,ze.useCallback((t=>{if(o){const n="function"==typeof t?t(e):t;n!==e&&s(n)}else a(t)}),[o,e,a,s])]}function Hte({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:a,fadeFromIndex:o,onSnapPointChange:i,direction:s="bottom",container:c,snapToSequentialPoint:l}){const[u,f]=DL({prop:e,defaultProp:null==n?void 0:n[0],onChange:t}),[d,p]=ze.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);ze.useEffect((()=>{function e(){p({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]);const h=ze.useMemo((()=>u===(null==n?void 0:n[n.length-1])||null),[n,u]),m=ze.useMemo((()=>null==n?void 0:n.findIndex((e=>e===u))),[n,u]),y=n&&n.length>0&&(o||0===o)&&!Number.isNaN(o)&&n[o]===u||!n,g=ze.useMemo((()=>{const e=c?{width:c.getBoundingClientRect().width,height:c.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)),Ea(s)){const a=n?r:d?t*e.height:0;return d?"bottom"===s?e.height-a:-e.height+a:a}const a=n?r:d?t*e.width:0;return d?"right"===s?e.width-a:-e.width+a:a})))?t:[]}),[n,d,c]),v=ze.useMemo((()=>null!==m?null==g?void 0:g[m]:null),[g,m]),b=ze.useCallback((e=>{var t;const c=null!=(t=null==g?void 0:g.findIndex((t=>t===e)))?t:null;i(c),Sa(r.current,{transition:`transform ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`,transform:Ea(s)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`}),g&&c!==g.length-1&&c!==o&&c<o?Sa(a.current,{transition:`opacity ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`,opacity:"0"}):Sa(a.current,{transition:`opacity ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`,opacity:"1"}),f(null==n?void 0:n[Math.max(c,0)])}),[r.current,n,g,o,a,f]);return ze.useEffect((()=>{if(u||e){var t;const r=null!=(t=null==n?void 0:n.findIndex((t=>t===e||t===u)))?t:-1;g&&-1!==r&&"number"==typeof g[r]&&b(g[r])}}),[u,e,n,g,b]),{isLastSnapPoint:h,activeSnapPoint:u,shouldFade:y,getPercentageDragged:function(e,t){if(!n||"number"!=typeof m||!g||void 0===o)return null;const r=m===o-1;if(m>=o&&t)return 0;if(r&&!t)return 1;if(!y&&!r)return null;const a=r?m+1:m-1,i=r?g[a]-g[a-1]:g[a+1]-g[a],s=e/Math.abs(i);return r?1-s:s},setActiveSnapPoint:f,activeSnapPointIndex:m,onRelease:function({draggedDistance:e,closeDrawer:t,velocity:r,dismissible:i}){if(void 0===o)return;const c="bottom"===s||"right"===s?(v??0)-e:(v??0)+e,u=0===m,f=e>0;if(m===o-1&&Sa(a.current,{transition:`opacity ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`}),!l&&r>2&&!f)return void(i?t():b(g[0]));if(!l&&r>2&&f&&g&&n)return void b(g[n.length-1]);const d=null==g?void 0:g.reduce(((e,t)=>"number"!=typeof e||"number"!=typeof t?e:Math.abs(t-c)<Math.abs(e-c)?t:e)),p=Ea(s)?window.innerHeight:window.innerWidth;if(r>OL&&Math.abs(e)<.4*p){const e=f?1:-1;if(e>0&&h)return void b(g[n.length-1]);if(u&&e<0&&i&&t(),null===m)return;b(g[m+e])}else b(d)},onDrag:function({draggedDistance:e}){if(null===v)return;const t="bottom"===s||"right"===s?v-e:v+e;("bottom"===s||"right"===s)&&t<g[g.length-1]||("top"===s||"left"===s)&&t>g[g.length-1]||Sa(r.current,{transform:Ea(s)?`translate3d(0, ${t}px, 0)`:`translate3d(${t}px, 0, 0)`})},snapPointsOffset:g}}const Gte=()=>()=>{};function Kte(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:a}=G1(),o=ze.useRef(null),i=v.useMemo((()=>document.body.style.backgroundColor),[]);function s(){return(window.innerWidth-26)/window.innerWidth}ze.useEffect((()=>{if(t&&n){o.current&&clearTimeout(o.current);const t=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!t)return;Vte(r&&!a?NE(document.body,{background:"black"}):Gte,NE(t,{transformOrigin:Ea(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${_r.DURATION}s`,transitionTimingFunction:`cubic-bezier(${_r.EASE.join(",")})`}));const n=NE(t,{borderRadius:"8px",overflow:"hidden",...Ea(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(),o.current=window.setTimeout((()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")}),1e3*_r.DURATION)}}}),[t,n,i])}let oy=null;function Qte({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:a,noBodyStyles:o}){const[i,s]=ze.useState((()=>typeof window<"u"?window.location.href:"")),c=ze.useRef(0),l=ze.useCallback((()=>{if(Sz()&&null===oy&&e&&!o){oy={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:-c.current+"px",left:-e+"px",right:"0px",height:"auto"}),window.setTimeout((()=>window.requestAnimationFrame((()=>{const e=t-window.innerHeight;e&&c.current>=t&&(document.body.style.top=-(c.current+e)+"px")}))),300)}}),[e]),u=ze.useCallback((()=>{if(Sz()&&null!==oy&&!o){const e=-parseInt(document.body.style.top,10),t=-parseInt(document.body.style.left,10);Object.assign(document.body.style,oy),window.requestAnimationFrame((()=>{a&&i!==window.location.href?s(window.location.href):window.scrollTo(t,e)})),oy=null}}),[i]);return ze.useEffect((()=>{function e(){c.current=window.scrollY}return e(),window.addEventListener("scroll",e),()=>{window.removeEventListener("scroll",e)}}),[]),ze.useEffect((()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&l(),t||window.setTimeout((()=>{u()}),500)):u())}),[e,r,i,t,n,l,u]),{restorePositionSetting:u}}function NL({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:a,snapPoints:o,shouldScaleBackground:i=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=Ute,scrollLockTimeout:l=100,dismissible:u=!0,handleOnly:f=!1,fadeFromIndex:d=o&&o.length-1,activeSnapPoint:p,setActiveSnapPoint:h,fixed:m,modal:y=!0,onClose:g,nested:v,noBodyStyles:b,direction:_="bottom",defaultOpen:w=!1,disablePreventScroll:k=!0,snapToSequentialPoint:x=!1,preventScrollRestoration:S=!1,repositionInputs:E=!0,onAnimationEnd:A,container:z,autoFocus:C=!1}){var I,T;const[R=!1,P]=DL({defaultProp:w,prop:e,onChange:e=>{null==t||t(e),!e&&!v&&ce(),setTimeout((()=>{null==A||A(e)}),1e3*_r.DURATION),e&&!y&&typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),e||(document.body.style.pointerEvents="auto")}}),[j,O]=ze.useState(!1),[N,M]=ze.useState(!1),[D,B]=ze.useState(!1),L=ze.useRef(null),V=ze.useRef(null),q=ze.useRef(null),F=ze.useRef(null),U=ze.useRef(null),$=ze.useRef(!1),W=ze.useRef(null),H=ze.useRef(0),G=ze.useRef(!1),Q=ze.useRef(0),K=ze.useRef(null),Y=ze.useRef((null==(I=K.current)?void 0:I.getBoundingClientRect().height)||0),Z=ze.useRef((null==(T=K.current)?void 0:T.getBoundingClientRect().width)||0),X=ze.useRef(0),J=ze.useCallback((e=>{o&&e===ae.length-1&&(V.current=new Date)}),[]),{activeSnapPoint:ee,activeSnapPointIndex:te,setActiveSnapPoint:ne,onRelease:re,snapPointsOffset:ae,onDrag:oe,shouldFade:ie,getPercentageDragged:se}=Hte({snapPoints:o,activeSnapPointProp:p,setActiveSnapPointProp:h,drawerRef:K,fadeFromIndex:d,overlayRef:L,onSnapPointChange:J,direction:_,container:z,snapToSequentialPoint:x});Mte({isDisabled:!R||N||!y||D||!j||!E||!k});const{restorePositionSetting:ce}=Qte({isOpen:R,modal:y,nested:v,hasBeenOpened:j,preventScrollRestoration:S,noBodyStyles:b});function le(){return(window.innerWidth-26)/window.innerWidth}function ue(e,t){var n,r;let a=e;const o=null==(n=window.getSelection())?void 0:n.toString(),i=K.current?nb(K.current,_):null,s=new Date;if(a.hasAttribute("data-vaul-no-drag")||a.closest("[data-vaul-no-drag]"))return!1;if("right"===_||"left"===_)return!0;if(V.current&&s.getTime()-V.current.getTime()<500)return!1;if(null!==i&&("bottom"===_?i>0:i<0))return!0;if(o&&o.length>0)return!1;if(s.getTime()-(null==(r=U.current)?void 0:r.getTime())<l&&0===i||t)return U.current=s,!1;for(;a;){if(a.scrollHeight>a.clientHeight){if(0!==a.scrollTop)return U.current=new Date,!1;if("dialog"===a.getAttribute("role"))return!0}a=a.parentNode}return!0}function fe(e){!N||!K.current||(K.current.classList.remove(LE),$.current=!1,M(!1),F.current=new Date),null==g||g(),e||P(!1),setTimeout((()=>{o&&ne(o[0])}),1e3*_r.DURATION)}function de(){if(!K.current)return;const e=document.querySelector("[data-vaul-drawer-wrapper]"),t=nb(K.current,_);Sa(K.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`}),Sa(L.current,{transition:`opacity ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`,opacity:"1"}),i&&t&&t>0&&R&&Sa(e,{borderRadius:"8px",overflow:"hidden",...Ea(_)?{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:`${_r.DURATION}s`,transitionTimingFunction:`cubic-bezier(${_r.EASE.join(",")})`},!0)}return ze.useEffect((()=>{var e;function t(){if(!K.current||!E)return;if($C(document.activeElement)||G.current){var e;const t=(null==(e=window.visualViewport)?void 0:e.height)||0,n=window.innerHeight;let r=n-t;const a=K.current.getBoundingClientRect().height||0,i=a>.8*n;X.current||(X.current=a);const s=K.current.getBoundingClientRect().top;if(Math.abs(Q.current-r)>60&&(G.current=!G.current),o&&o.length>0&&ae&&te){r+=ae[te]||0}if(Q.current=r,a>t||G.current){const e=K.current.getBoundingClientRect().height;let n=e;e>t&&(n=t-(i?s:26)),K.current.style.height=m?e-Math.max(r,0)+"px":`${Math.max(n,t-s)}px`}else K.current.style.height=`${X.current}px`;o&&o.length>0&&!G.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,o,ae]),ze.useEffect((()=>(R&&(Sa(document.documentElement,{scrollBehavior:"auto"}),V.current=new Date),()=>{Fte(document.documentElement,"scrollBehavior")})),[R]),ze.createElement(bte,{defaultOpen:w,onOpenChange:e=>{!u&&!e||(e?O(!0):fe(!0),P(e))},open:R},ze.createElement(AL.Provider,{value:{activeSnapPoint:ee,snapPoints:o,setActiveSnapPoint:ne,drawerRef:K,overlayRef:L,onOpenChange:t,onPress:function(e){var t,n;!u&&!o||K.current&&!K.current.contains(e.target)||(Y.current=(null==(t=K.current)?void 0:t.getBoundingClientRect().height)||0,Z.current=(null==(n=K.current)?void 0:n.getBoundingClientRect().width)||0,M(!0),q.current=new Date,TL()&&window.addEventListener("touchend",(()=>$.current=!1),{once:!0}),e.target.setPointerCapture(e.pointerId),H.current=Ea(_)?e.pageY:e.pageX)},onRelease:function(e){if(!N||!K.current)return;K.current.classList.remove(LE),$.current=!1,M(!1),F.current=new Date;const t=nb(K.current,_);if(!ue(e.target,!1)||!t||Number.isNaN(t)||null===q.current)return;const n=F.current.getTime()-q.current.getTime(),r=H.current-(Ea(_)?e.pageY:e.pageX),i=Math.abs(r)/n;if(i>.05&&(B(!0),setTimeout((()=>{B(!1)}),200)),o)return re({draggedDistance:r*("bottom"===_||"right"===_?1:-1),closeDrawer:fe,velocity:i,dismissible:u}),void(null==a||a(e,!0));if("bottom"===_||"right"===_?r>0:r<0)return de(),void(null==a||a(e,!0));if(i>OL)return fe(),void(null==a||a(e,!1));var s;const l=Math.min(null!=(s=K.current.getBoundingClientRect().height)?s:0,window.innerHeight);var f;const d=Math.min(null!=(f=K.current.getBoundingClientRect().width)?f:0,window.innerWidth),p="left"===_||"right"===_;if(Math.abs(t)>=(p?d:l)*c)return fe(),void(null==a||a(e,!1));null==a||a(e,!0),de()},onDrag:function(e){if(K.current&&N){const t="bottom"===_||"right"===_?1:-1,n=(H.current-(Ea(_)?e.pageY:e.pageX))*t,a=n>0,s=o&&!u&&!a;if(s&&0===te)return;const c=Math.abs(n),l=document.querySelector("[data-vaul-drawer-wrapper]");let f=c/("bottom"===_||"top"===_?Y.current:Z.current);const p=se(c,a);if(null!==p&&(f=p),s&&f>=1||!$.current&&!ue(e.target,a))return;if(K.current.classList.add(LE),$.current=!0,Sa(K.current,{transition:"none"}),Sa(L.current,{transition:"none"}),o&&oe({draggedDistance:n}),a&&!o){const e=Bte(n),r=Math.min(-1*e,0)*t;return void Sa(K.current,{transform:Ea(_)?`translate3d(0, ${r}px, 0)`:`translate3d(${r}px, 0, 0)`})}const h=1-f;if((ie||d&&te===d-1)&&(null==r||r(e,f),Sa(L.current,{opacity:`${h}`,transition:"none"},!0)),l&&L.current&&i){const e=Math.min(le()+f*(1-le()),1),t=8-8*f,n=Math.max(0,14-14*f);Sa(l,{borderRadius:`${t}px`,transform:Ea(_)?`scale(${e}) translate3d(0, ${n}px, 0)`:`scale(${e}) translate3d(${n}px, 0, 0)`,transition:"none"},!0)}if(!o){const e=c*t;Sa(K.current,{transform:Ea(_)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}}},dismissible:u,handleOnly:f,isOpen:R,isDragging:N,shouldFade:ie,closeDrawer:fe,onNestedDrag:function(e,t){if(t<0)return;const n=(window.innerWidth-16)/window.innerWidth,r=n+t*(1-n),a=16*t-16;Sa(K.current,{transform:Ea(_)?`scale(${r}) translate3d(0, ${a}px, 0)`:`scale(${r}) translate3d(${a}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),Sa(K.current,{transition:`transform ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`,transform:`scale(${t}) translate3d(0, ${n}px, 0)`}),!e&&K.current&&(W.current=setTimeout((()=>{const e=nb(K.current,_);Sa(K.current,{transition:"none",transform:Ea(_)?`translate3d(0, ${e}px, 0)`:`translate3d(${e}px, 0, 0)`})}),500))},onNestedRelease:function(e,t){const n=Ea(_)?window.innerHeight:window.innerWidth,r=t?(n-16)/n:1,a=t?-16:0;t&&Sa(K.current,{transition:`transform ${_r.DURATION}s cubic-bezier(${_r.EASE.join(",")})`,transform:Ea(_)?`scale(${r}) translate3d(0, ${a}px, 0)`:`scale(${r}) translate3d(${a}px, 0, 0)`})},keyboardIsOpen:G,modal:y,snapPointsOffset:ae,direction:_,shouldScaleBackground:i,setBackgroundColorOnScale:s,noBodyStyles:b,container:z,autoFocus:C}},n))}const LL=ze.forwardRef((function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:a,shouldFade:o,isOpen:i,modal:s}=G1(),c=PL(t,n),l=r&&r.length>0;return s?ze.createElement(xte,{onMouseUp:a,ref:c,"data-vaul-overlay":"","data-vaul-snap-points":i&&l?"true":"false","data-vaul-snap-points-overlay":i&&o?"true":"false",...e}):(typeof window<"u"&&window.requestAnimationFrame((()=>{document.body.style.pointerEvents="auto"})),null)}));LL.displayName="Drawer.Overlay";const jL=ze.forwardRef((function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},a){const{drawerRef:o,onPress:i,onRelease:s,onDrag:c,keyboardIsOpen:l,snapPointsOffset:u,modal:f,isOpen:d,direction:p,snapPoints:h,container:m,handleOnly:y,autoFocus:g}=G1(),[v,b]=ze.useState(!1),_=PL(a,o),w=ze.useRef(null),k=ze.useRef(null),x=ze.useRef(!1),S=h&&h.length>0;Kte();function E(e){w.current=null,x.current=!1,s(e)}return ze.useEffect((()=>{S&&window.requestAnimationFrame((()=>{b(!0)}))}),[]),ze.createElement(Ste,{"data-vaul-drawer-direction":p,"data-vaul-drawer":"","data-vaul-delayed-snap-points":v?"true":"false","data-vaul-snap-points":d&&S?"true":"false","data-vaul-custom-container":m?"true":"false",...r,ref:_,style:u&&u.length>0?{"--snap-point-height":`${u[0]}px`,...t}:t,onPointerDown:e=>{y||(null==r.onPointerDown||r.onPointerDown.call(r,e),w.current={x:e.pageX,y:e.pageY},i(e))},onOpenAutoFocus:e=>{null==n||n(e),g||e.preventDefault()},onPointerDownOutside:t=>{null==e||e(t),f&&!t.defaultPrevented?l.current&&(l.current=!1):t.preventDefault()},onFocusOutside:e=>{f||e.preventDefault()},onPointerMove:e=>{if(k.current=e,y||(null==r.onPointerMove||r.onPointerMove.call(r,e),!w.current))return;const t=e.pageY-w.current.y,n=e.pageX-w.current.x,a="touch"===e.pointerType?10:2;((e,t,n=0)=>{if(x.current)return!0;const r=Math.abs(e.y),a=Math.abs(e.x),o=a>r,i=["bottom","right"].includes(t)?1:-1;if("left"===t||"right"===t){if(!(e.x*i<0)&&a>=0&&a<=n)return o}else if(!(e.y*i<0)&&r>=0&&r<=n)return!o;return x.current=!0,!0})({x:n,y:t},p,a)?c(e):(Math.abs(n)>a||Math.abs(t)>a)&&(w.current=null)},onPointerUp:e=>{null==r.onPointerUp||r.onPointerUp.call(r,e),w.current=null,x.current=!1,s(e)},onPointerOut:e=>{null==r.onPointerOut||r.onPointerOut.call(r,e),E(k.current)},onContextMenu:e=>{null==r.onContextMenu||r.onContextMenu.call(r,e),E(k.current)}})}));jL.displayName="Drawer.Content";const Yte=250,Zte=120,FL=ze.forwardRef((function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:a,isDragging:o,snapPoints:i,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:l,handleOnly:u,isOpen:f,onPress:d,onDrag:p}=G1(),h=ze.useRef(null),m=ze.useRef(!1);function y(){window.clearTimeout(h.current),m.current=!1}return ze.createElement("div",{onClick:function(){m.current?y():window.setTimeout((()=>{!function(){if(o||e||m.current)return void y();if(y(),(!i||0===i.length)&&l)return void a();if(s===i[i.length-1]&&l)return void a();const t=i.findIndex((e=>e===s));if(-1===t)return;const n=i[t+1];c(n)}()}),120)},onPointerCancel:y,onPointerDown:e=>{u&&d(e),h.current=window.setTimeout((()=>{m.current=!0}),250)},onPointerMove:e=>{u&&p(e)},ref:r,"data-vaul-drawer-visible":f?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},ze.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))}));function Xte({onDrag:e,onOpenChange:t,...n}){const{onNestedDrag:r,onNestedOpenChange:a,onNestedRelease:o}=G1();if(!r)throw new Error("Drawer.NestedRoot must be placed in another drawer");return ze.createElement(NL,{nested:!0,onClose:()=>{a(!1)},onDrag:(t,n)=>{r(t,n),null==e||e(t,n)},onOpenChange:e=>{e&&a(e)},onRelease:o,...n})}function Jte(e){const t=G1(),{container:n=t.container,...r}=e;return ze.createElement(kte,{container:n,...r})}FL.displayName="Drawer.Handle";const zp={Root:NL,NestedRoot:Xte,Content:jL,Overlay:LL,Trigger:wte,Portal:Jte,Handle:FL,Close:Rte,Title:Ete,Description:Cte},ene=zp.Portal,BL=v.forwardRef((({className:e,...t},n)=>B.jsx(zp.Overlay,{ref:n,className:$e("fixed inset-0 z-50 bg-black/5",e),...t})));BL.displayName=zp.Overlay.displayName;const tne=v.forwardRef((({className:e,children:t,direction:n="bottom",...r},a)=>B.jsxs(ene,{children:[B.jsx(BL,{}),B.jsxs(zp.Content,{ref:a,className:$e("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&&B.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]})));tne.displayName="DrawerContent";const nne=v.forwardRef((({className:e,...t},n)=>B.jsx(zp.Title,{ref:n,className:$e("text-lg font-semibold leading-none tracking-tight",e),...t})));nne.displayName=zp.Title.displayName;const rne=v.forwardRef((({className:e,...t},n)=>B.jsx(zp.Description,{ref:n,className:$e("text-sm text-muted-foreground",e),...t})));function qA(e){const t=e+"CollectionProvider",[n,r]=ii(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=e+"CollectionSlot",s=e+"CollectionItemSlot",c="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:n}=e,r=ze.useRef(null),o=ze.useRef(new Map).current;return ze.createElement(a,{scope:t,itemMap:o,collectionRef:r},n)},Slot:ze.forwardRef(((e,t)=>{const{scope:n,children:r}=e,a=yn(t,o(i,n).collectionRef);return ze.createElement(hm,{ref:a},r)})),ItemSlot:ze.forwardRef(((e,t)=>{const{scope:n,children:r,...a}=e,i=ze.useRef(null),l=yn(t,i),u=o(s,n);return ze.useEffect((()=>(u.itemMap.set(i,{ref:i,...a}),()=>{u.itemMap.delete(i)}))),ze.createElement(hm,{[c]:"",ref:l},r)}))},function(t){const n=o(e+"CollectionConsumer",t);return ze.useCallback((()=>{const e=n.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${c}]`));return Array.from(n.itemMap.values()).sort(((e,n)=>t.indexOf(e.ref.current)-t.indexOf(n.ref.current)))}),[n.collectionRef,n.itemMap])},r]}rne.displayName=zp.Description.displayName;const ane=v.createContext(void 0);function WA(e){const t=v.useContext(ane);return e||t||"ltr"}const one=["top","right","bottom","left"],xp=Math.min,ts=Math.max,nw=Math.round,rb=Math.floor,Sp=e=>({x:e,y:e}),ine={left:"right",right:"left",bottom:"top",top:"bottom"},sne={start:"end",end:"start"};function zC(e,t,n){return ts(e,xp(t,n))}function vu(e,t){return"function"==typeof e?e(t):e}function bu(e){return e.split("-")[0]}function K1(e){return e.split("-")[1]}function HA(e){return"x"===e?"y":"x"}function GA(e){return"y"===e?"height":"width"}function Ep(e){return["top","bottom"].includes(bu(e))?"y":"x"}function KA(e){return HA(Ep(e))}function cne(e,t,n){void 0===n&&(n=!1);const r=K1(e),a=KA(e),o=GA(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=rw(i)),[i,rw(i)]}function lne(e){const t=rw(e);return[MC(e),t,MC(t)]}function MC(e){return e.replace(/start|end/g,(e=>sne[e]))}function fne(e,t,n){const r=["left","right"],a=["right","left"],o=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?a:r:t?r:a;case"left":case"right":return t?o:i;default:return[]}}function une(e,t,n,r){const a=K1(e);let o=fne(bu(e),"start"===n,r);return a&&(o=o.map((e=>e+"-"+a)),t&&(o=o.concat(o.map(MC)))),o}function rw(e){return e.replace(/left|right|bottom|top/g,(e=>ine[e]))}function dne(e){return{top:0,right:0,bottom:0,left:0,...e}}function VL(e){return"number"!=typeof e?dne(e):{top:e,right:e,bottom:e,left:e}}function aw(e){const{x:t,y:n,width:r,height:a}=e;return{width:r,height:a,top:n,left:t,right:t+r,bottom:n+a,x:t,y:n}}function Rz(e,t,n){let{reference:r,floating:a}=e;const o=Ep(t),i=KA(t),s=GA(i),c=bu(t),l="y"===o,u=r.x+r.width/2-a.width/2,f=r.y+r.height/2-a.height/2,d=r[s]/2-a[s]/2;let p;switch(c){case"top":p={x:u,y:r.y-a.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:f};break;case"left":p={x:r.x-a.width,y:f};break;default:p={x:r.x,y:r.y}}switch(K1(t)){case"start":p[i]-=d*(n&&l?-1:1);break;case"end":p[i]+=d*(n&&l?-1:1)}return p}const pne=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=o.filter(Boolean),c=await(null==i.isRTL?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:u,y:f}=Rz(l,r,c),d=r,p={},h=0;for(let n=0;n<s.length;n++){const{name:o,fn:m}=s[n],{x:y,y:g,data:v,reset:b}=await m({x:u,y:f,initialPlacement:r,placement:d,strategy:a,middlewareData:p,rects:l,platform:i,elements:{reference:e,floating:t}});u=y??u,f=g??f,p={...p,[o]:{...p[o],...v}},b&&h<=50&&(h++,"object"==typeof b&&(b.placement&&(d=b.placement),b.rects&&(l=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:u,y:f}=Rz(l,d,c))),n=-1)}return{x:u,y:f,placement:d,strategy:a,middlewareData:p}};async function n_(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=vu(t,e),h=VL(p),m=s[d?"floating"===f?"reference":"floating":f],y=aw(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),g="floating"===f?{x:r,y:a,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),b=await(null==o.isElement?void 0:o.isElement(v))&&await(null==o.getScale?void 0:o.getScale(v))||{x:1,y:1},_=aw(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:g,offsetParent:v,strategy:c}):g);return{top:(y.top-_.top+h.top)/b.y,bottom:(_.bottom-y.bottom+h.bottom)/b.y,left:(y.left-_.left+h.left)/b.x,right:(_.right-y.right+h.right)/b.x}}const hne=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:a,rects:o,platform:i,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=vu(e,t)||{};if(null==l)return{};const f=VL(u),d={x:n,y:r},p=KA(a),h=GA(p),m=await i.getDimensions(l),y="y"===p,g=y?"top":"left",v=y?"bottom":"right",b=y?"clientHeight":"clientWidth",_=o.reference[h]+o.reference[p]-d[p]-o.floating[h],w=d[p]-o.reference[p],k=await(null==i.getOffsetParent?void 0:i.getOffsetParent(l));let x=k?k[b]:0;(!x||!await(null==i.isElement?void 0:i.isElement(k)))&&(x=s.floating[b]||o.floating[h]);const S=_/2-w/2,E=x/2-m[h]/2-1,A=xp(f[g],E),z=xp(f[v],E),C=A,I=x-m[h]-z,T=x/2-m[h]/2+S,R=zC(C,T,I),P=!c.arrow&&null!=K1(a)&&T!==R&&o.reference[h]/2-(T<C?A:z)-m[h]/2<0,j=P?T<C?T-C:T-I:0;return{[p]:d[p]+j,data:{[p]:R,centerOffset:T-R-j,...P&&{alignmentOffset:j}},reset:P}}}),mne=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:a,middlewareData:o,rects:i,initialPlacement:s,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:d,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...y}=vu(e,t);if(null!=(n=o.arrow)&&n.alignmentOffset)return{};const g=bu(a),v=Ep(s),b=bu(s)===s,_=await(null==c.isRTL?void 0:c.isRTL(l.floating)),w=d||(b||!m?[rw(s)]:lne(s)),k="none"!==h;!d&&k&&w.push(...une(s,m,h,_));const x=[s,...w],S=await n_(t,y),E=[];let A=(null==(r=o.flip)?void 0:r.overflows)||[];if(u&&E.push(S[g]),f){const e=cne(a,i,_);E.push(S[e[0]],S[e[1]])}if(A=[...A,{placement:a,overflows:E}],!E.every((e=>e<=0))){var z,C;const e=((null==(z=o.flip)?void 0:z.index)||0)+1,t=x[e];if(t)return{data:{index:e,overflows:A},reset:{placement:t}};let n=null==(C=A.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:C.placement;if(!n)switch(p){case"bestFit":{var I;const e=null==(I=A.filter((e=>{if(k){const t=Ep(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:I[0];e&&(n=e);break}case"initialPlacement":n=s}if(a!==n)return{reset:{placement:n}}}return{}}}};function Az(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Tz(e){return one.some((t=>e[t]>=0))}const gne=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...a}=vu(e,t);switch(r){case"referenceHidden":{const e=Az(await n_(t,{...a,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Tz(e)}}}case"escaped":{const e=Az(await n_(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Tz(e)}}}default:return{}}}}};async function yne(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=bu(n),s=K1(n),c="y"===Ep(n),l=["left","top"].includes(i)?-1:1,u=o&&c?-1:1,f=vu(t,e);let{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),c?{x:p*u,y:d*l}:{x:d*l,y:p*u}}const _ne=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:a,y:o,placement:i,middlewareData:s}=t,c=await yne(t,e);return i===(null==(n=s.offset)?void 0:n.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:a+c.x,y:o+c.y,data:{...c,placement:i}}}}},vne=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=vu(e,t),l={x:n,y:r},u=await n_(t,c),f=Ep(bu(a)),d=HA(f);let p=l[d],h=l[f];if(o){const e="y"===d?"bottom":"right";p=zC(p+u["y"===d?"top":"left"],p,p-u[e])}if(i){const e="y"===f?"bottom":"right";h=zC(h+u["y"===f?"top":"left"],h,h-u[e])}const m=s.fn({...t,[d]:p,[f]:h});return{...m,data:{x:m.x-n,y:m.y-r,enabled:{[d]:o,[f]:i}}}}}},bne=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=vu(e,t),u={x:n,y:r},f=Ep(a),d=HA(f);let p=u[d],h=u[f];const m=vu(s,t),y="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const e="y"===d?"height":"width",t=o.reference[d]-o.floating[e]+y.mainAxis,n=o.reference[d]+o.reference[e]-y.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var g,v;const e="y"===d?"width":"height",t=["top","left"].includes(bu(a)),n=o.reference[f]-o.floating[e]+(t&&(null==(g=i.offset)?void 0:g[f])||0)+(t?0:y.crossAxis),r=o.reference[f]+o.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[f])||0)-(t?y.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[d]:p,[f]:h}}}},wne=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:a,rects:o,platform:i,elements:s}=t,{apply:c=()=>{},...l}=vu(e,t),u=await n_(t,l),f=bu(a),d=K1(a),p="y"===Ep(a),{width:h,height:m}=o.floating;let y,g;"top"===f||"bottom"===f?(y=f,g=d===(await(null==i.isRTL?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(g=f,y="end"===d?"top":"bottom");const v=m-u.top-u.bottom,b=h-u.left-u.right,_=xp(m-u[y],v),w=xp(h-u[g],b),k=!t.middlewareData.shift;let x=_,S=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(S=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(x=v),k&&!d){const e=ts(u.left,0),t=ts(u.right,0),n=ts(u.top,0),r=ts(u.bottom,0);p?S=h-2*(0!==e||0!==t?e+t:ts(u.left,u.right)):x=m-2*(0!==n||0!==r?n+r:ts(u.top,u.bottom))}await c({...t,availableWidth:S,availableHeight:x});const E=await i.getDimensions(s.floating);return h!==E.width||m!==E.height?{reset:{rects:!0}}:{}}}};function kk(){return typeof window<"u"}function Cp(e){return UL(e)?(e.nodeName||"").toLowerCase():"#document"}function ns(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function Cu(e){var t;return null==(t=(UL(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function UL(e){return!!kk()&&(e instanceof Node||e instanceof ns(e).Node)}function Ul(e){return!!kk()&&(e instanceof Element||e instanceof ns(e).Element)}function ql(e){return!!kk()&&(e instanceof HTMLElement||e instanceof ns(e).HTMLElement)}function Iz(e){return!(!kk()||typeof ShadowRoot>"u")&&(e instanceof ShadowRoot||e instanceof ns(e).ShadowRoot)}function q_(e){const{overflow:t,overflowX:n,overflowY:r,display:a}=Us(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(a)}function kne(e){return["table","td","th"].includes(Cp(e))}function xne(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch{return!1}}))}function QA(e){const t=YA(),n=Ul(e)?Us(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 qL(e){let t=R1(e);for(;ql(t)&&!xk(t);){if(QA(t))return t;if(xne(t))return null;t=R1(t)}return null}function YA(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function xk(e){return["html","body","#document"].includes(Cp(e))}function Us(e){return ns(e).getComputedStyle(e)}function Sk(e){return Ul(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function R1(e){if("html"===Cp(e))return e;const t=e.assignedSlot||e.parentNode||Iz(e)&&e.host||Cu(e);return Iz(t)?t.host:t}function WL(e){const t=R1(e);return xk(t)?e.ownerDocument?e.ownerDocument.body:e.body:ql(t)&&q_(t)?t:WL(t)}function r_(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const a=WL(e),o=a===(null==(r=e.ownerDocument)?void 0:r.body),i=ns(a);if(o){const e=Sne(i);return t.concat(i,i.visualViewport||[],q_(a)?a:[],e&&n?r_(e):[])}return t.concat(a,r_(a,[],n))}function Sne(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function HL(e){const t=Us(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const a=ql(e),o=a?e.offsetWidth:n,i=a?e.offsetHeight:r,s=nw(n)!==o||nw(r)!==i;return s&&(n=o,r=i),{width:n,height:r,$:s}}function ZA(e){return Ul(e)?e:e.contextElement}function v1(e){const t=ZA(e);if(!ql(t))return Sp(1);const n=t.getBoundingClientRect(),{width:r,height:a,$:o}=HL(t);let i=(o?nw(n.width):n.width)/r,s=(o?nw(n.height):n.height)/a;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Ene=Sp(0);function GL(e){const t=ns(e);return YA()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Ene}function Cne(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==ns(e))&&t}function bm(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const a=e.getBoundingClientRect(),o=ZA(e);let i=Sp(1);t&&(r?Ul(r)&&(i=v1(r)):i=v1(e));const s=Cne(o,n,r)?GL(o):Sp(0);let c=(a.left+s.x)/i.x,l=(a.top+s.y)/i.y,u=a.width/i.x,f=a.height/i.y;if(o){const e=ns(o),t=r&&Ul(r)?ns(r):r;let n=e.frameElement;for(;n&&r&&t!==e;){const e=v1(n),t=n.getBoundingClientRect(),r=Us(n),a=t.left+(n.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(n.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,f*=e.y,c+=a,l+=o,n=ns(n).frameElement}}return aw({width:u,height:f,x:c,y:l})}const Rne=[":popover-open",":modal"];function KL(e){let t=!1,n=0,r=0;if(Rne.forEach((n=>{!function(n){try{t=t||e.matches(n)}catch{}}(n)})),t){const t=qL(e);if(t){const e=t.getBoundingClientRect();n=e.x,r=e.y}}return[t,n,r]}function Ane(e){let{elements:t,rect:n,offsetParent:r,strategy:a}=e;const o=Cu(r),[i]=t?KL(t.floating):[!1];if(r===o||i)return n;let s={scrollLeft:0,scrollTop:0},c=Sp(1);const l=Sp(0),u=ql(r);if((u||!u&&"fixed"!==a)&&(("body"!==Cp(r)||q_(o))&&(s=Sk(r)),ql(r))){const e=bm(r);c=v1(r),l.x=e.x+r.clientLeft,l.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-s.scrollLeft*c.x+l.x,y:n.y*c.y-s.scrollTop*c.y+l.y}}function Tne(e){return Array.from(e.getClientRects())}function QL(e){return bm(Cu(e)).left+Sk(e).scrollLeft}function Ine(e){const t=Cu(e),n=Sk(e),r=e.ownerDocument.body,a=ts(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=ts(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+QL(e);const s=-n.scrollTop;return"rtl"===Us(r).direction&&(i+=ts(t.clientWidth,r.clientWidth)-a),{width:a,height:o,x:i,y:s}}function Pne(e,t){const n=ns(e),r=Cu(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,c=0;if(a){o=a.width,i=a.height;const e=YA();(!e||e&&"fixed"===t)&&(s=a.offsetLeft,c=a.offsetTop)}return{width:o,height:i,x:s,y:c}}function $ne(e,t){const n=bm(e,!0,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft,o=ql(e)?v1(e):Sp(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:a*o.x,y:r*o.y}}function Pz(e,t,n){let r;if("viewport"===t)r=Pne(e,n);else if("document"===t)r=Ine(Cu(e));else if(Ul(t))r=$ne(t,n);else{const n=GL(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return aw(r)}function YL(e,t){const n=R1(e);return!(n===t||!Ul(n)||xk(n))&&("fixed"===Us(n).position||YL(n,t))}function One(e,t){const n=t.get(e);if(n)return n;let r=r_(e,[],!1).filter((e=>Ul(e)&&"body"!==Cp(e))),a=null;const o="fixed"===Us(e).position;let i=o?R1(e):e;for(;Ul(i)&&!xk(i);){const t=Us(i),n=QA(i);!n&&"fixed"===t.position&&(a=null),(o?!n&&!a:!n&&"static"===t.position&&a&&["absolute","fixed"].includes(a.position)||q_(i)&&!n&&YL(e,i))?r=r.filter((e=>e!==i)):a=t,i=R1(i)}return t.set(e,r),r}function zne(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?One(t,this._c):[].concat(n),r],i=o[0],s=o.reduce(((e,n)=>{const r=Pz(t,n,a);return e.top=ts(r.top,e.top),e.right=xp(r.right,e.right),e.bottom=xp(r.bottom,e.bottom),e.left=ts(r.left,e.left),e}),Pz(t,i,a));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function Mne(e){const{width:t,height:n}=HL(e);return{width:t,height:n}}function Dne(e,t,n,r){const a=ql(t),o=Cu(t),i="fixed"===n,s=bm(e,!0,i,t);let c={scrollLeft:0,scrollTop:0};const l=Sp(0);if(a||!a&&!i)if(("body"!==Cp(t)||q_(o))&&(c=Sk(t)),a){const e=bm(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=QL(o));let u=s.left+c.scrollLeft-l.x,f=s.top+c.scrollTop-l.y;const[d,p,h]=KL(r);return d&&(u+=p,f+=h,a&&(u+=t.clientLeft,f+=t.clientTop)),{x:u,y:f,width:s.width,height:s.height}}function $z(e,t){return ql(e)&&"fixed"!==Us(e).position?t?t(e):e.offsetParent:null}function ZL(e,t){const n=ns(e);if(!ql(e))return n;let r=$z(e,t);for(;r&&kne(r)&&"static"===Us(r).position;)r=$z(r,t);return r&&("html"===Cp(r)||"body"===Cp(r)&&"static"===Us(r).position&&!QA(r))?n:r||qL(e)||n}const Nne=async function(e){const t=this.getOffsetParent||ZL,n=this.getDimensions;return{reference:Dne(e.reference,await t(e.floating),e.strategy,e.floating),floating:{x:0,y:0,...await n(e.floating)}}};function Lne(e){return"rtl"===Us(e).direction}const jne={convertOffsetParentRelativeRectToViewportRelativeRect:Ane,getDocumentElement:Cu,getClippingRect:zne,getOffsetParent:ZL,getElementRects:Nne,getClientRects:Tne,getDimensions:Mne,getScale:v1,isElement:Ul,isRTL:Lne};function Fne(e,t){let n,r=null;const a=Cu(e);function o(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(s,c){void 0===s&&(s=!1),void 0===c&&(c=1),o();const{left:l,top:u,width:f,height:d}=e.getBoundingClientRect();if(s||t(),!f||!d)return;const p={rootMargin:-rb(u)+"px "+-rb(a.clientWidth-(l+f))+"px "+-rb(a.clientHeight-(u+d))+"px "+-rb(l)+"px",threshold:ts(0,xp(1,c))||1};let h=!0;function m(e){const t=e[0].intersectionRatio;if(t!==c){if(!h)return i();t?i(!1,t):n=setTimeout((()=>{i(!1,1e-7)}),100)}h=!1}try{r=new IntersectionObserver(m,{...p,root:a.ownerDocument})}catch{r=new IntersectionObserver(m,p)}r.observe(e)}(!0),o}function Bne(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i="function"==typeof ResizeObserver,layoutShift:s="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,l=ZA(e),u=a||o?[...l?r_(l):[],...r_(t)]:[];u.forEach((e=>{a&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)}));const f=l&&s?Fne(l,n):null;let d=-1,p=null;i&&(p=new ResizeObserver((e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(d),d=requestAnimationFrame((()=>{var e;null==(e=p)||e.observe(t)}))),n()})),l&&!c&&p.observe(l),p.observe(t));let h,m=c?bm(e):null;return c&&function t(){const r=bm(e);m&&(r.x!==m.x||r.y!==m.y||r.width!==m.width||r.height!==m.height)&&n(),m=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{a&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)})),null==f||f(),null==(e=p)||e.disconnect(),p=null,c&&cancelAnimationFrame(h)}}const Vne=vne,Une=mne,qne=wne,Wne=gne,Oz=hne,Hne=bne,Gne=(e,t,n)=>{const r=new Map,a={platform:jne,...n},o={...a.platform,_c:r};return pne(e,t,{...a,platform:o})};var Mb=typeof document<"u"?v.useLayoutEffect:v.useEffect;function ow(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,a;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(!ow(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!{}.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){const n=a[r];if(!("_owner"===n&&e.$$typeof||ow(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function XL(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function zz(e,t){const n=XL(e);return Math.round(t*n)/n}function jE(e){const t=v.useRef(e);return Mb((()=>{t.current=e})),t}function Kne(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:a,elements:{reference:o,floating:i}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,f]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[d,p]=v.useState(r);ow(d,r)||p(r);const[h,m]=v.useState(null),[y,g]=v.useState(null),b=v.useCallback((e=>{e!==x.current&&(x.current=e,m(e))}),[]),_=v.useCallback((e=>{e!==S.current&&(S.current=e,g(e))}),[]),w=o||h,k=i||y,x=v.useRef(null),S=v.useRef(null),E=v.useRef(u),A=null!=c,z=jE(c),C=jE(a),I=jE(l),T=v.useCallback((()=>{if(!x.current||!S.current)return;const e={placement:t,strategy:n,middleware:d};C.current&&(e.platform=C.current),Gne(x.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==I.current};R.current&&!ow(E.current,t)&&(E.current=t,Zl.flushSync((()=>{f(t)})))}))}),[d,t,n,C,I]);Mb((()=>{!1===l&&E.current.isPositioned&&(E.current.isPositioned=!1,f((e=>({...e,isPositioned:!1}))))}),[l]);const R=v.useRef(!1);Mb((()=>(R.current=!0,()=>{R.current=!1})),[]),Mb((()=>{if(w&&(x.current=w),k&&(S.current=k),w&&k){if(z.current)return z.current(w,k,T);T()}}),[w,k,T,z,A]);const P=v.useMemo((()=>({reference:x,floating:S,setReference:b,setFloating:_})),[b,_]),j=v.useMemo((()=>({reference:w,floating:k})),[w,k]),O=v.useMemo((()=>{const e={position:n,left:0,top:0};if(!j.floating)return e;const t=zz(j.floating,u.x),r=zz(j.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...XL(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,s,j.floating,u.x,u.y]);return v.useMemo((()=>({...u,update:T,refs:P,elements:j,floatingStyles:O})),[u,T,P,j,O])}const Qne=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?Oz({element:n.current,padding:r}).fn(t):{}:n?Oz({element:n,padding:r}).fn(t):{}}}),Yne=(e,t)=>({..._ne(e),options:[e,t]}),Zne=(e,t)=>({...Vne(e),options:[e,t]}),Xne=(e,t)=>({...Hne(e),options:[e,t]}),Jne=(e,t)=>({...Une(e),options:[e,t]}),ere=(e,t)=>({...qne(e),options:[e,t]}),tre=(e,t)=>({...Wne(e),options:[e,t]}),nre=(e,t)=>({...Qne(e),options:[e,t]}),JL="Popper",[ej,Q1]=ii(JL),[rre,tj]=ej(JL),are=e=>{const{__scopePopper:t,children:n}=e,[r,a]=v.useState(null);return v.createElement(rre,{scope:t,anchor:r,onAnchorChange:a},n)},ore="PopperAnchor",ire=v.forwardRef(((e,t)=>{const{__scopePopper:n,virtualRef:r,...a}=e,o=tj(ore,n),i=v.useRef(null),s=yn(t,i);return v.useEffect((()=>{o.onAnchorChange((null==r?void 0:r.current)||i.current)})),r?null:v.createElement(St.div,Le({},a,{ref:s}))})),nj="PopperContent",[sre,qWe]=ej(nj),cre=v.forwardRef(((e,t)=>{var n,r,a,o,i,s,c,l;const{__scopePopper:u,side:f="bottom",sideOffset:d=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,avoidCollisions:y=!0,collisionBoundary:g=[],collisionPadding:b=0,sticky:_="partial",hideWhenDetached:w=!1,updatePositionStrategy:k="optimized",onPlaced:x,...S}=e,E=tj(nj,u),[A,z]=v.useState(null),C=yn(t,(e=>z(e))),[I,T]=v.useState(null),R=_k(I),P=null!==(n=null==R?void 0:R.width)&&void 0!==n?n:0,j=null!==(r=null==R?void 0:R.height)&&void 0!==r?r:0,O=f+("center"!==p?"-"+p:""),N="number"==typeof b?b:{top:0,right:0,bottom:0,left:0,...b},M=Array.isArray(g)?g:[g],D=M.length>0,B={padding:N,boundary:M.filter(lre),altBoundary:D},{refs:L,floatingStyles:V,placement:q,isPositioned:F,middlewareData:U}=Kne({strategy:"fixed",placement:O,whileElementsMounted:(...e)=>Bne(...e,{animationFrame:"always"===k}),elements:{reference:E.anchor},middleware:[Yne({mainAxis:d+j,alignmentAxis:h}),y&&Zne({mainAxis:!0,crossAxis:!1,limiter:"partial"===_?Xne():void 0,...B}),y&&Jne({...B}),ere({...B,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{const{width:a,height:o}=t.reference,i=e.floating.style;i.setProperty("--radix-popper-available-width",`${n}px`),i.setProperty("--radix-popper-available-height",`${r}px`),i.setProperty("--radix-popper-anchor-width",`${a}px`),i.setProperty("--radix-popper-anchor-height",`${o}px`)}}),I&&nre({element:I,padding:m}),fre({arrowWidth:P,arrowHeight:j}),w&&tre({strategy:"referenceHidden",...B})]}),[$,W]=rj(q),H=Fc(x);Mo((()=>{F&&(null==H||H())}),[F,H]);const G=null===(a=U.arrow)||void 0===a?void 0:a.x,Q=null===(o=U.arrow)||void 0===o?void 0:o.y,K=0!==(null===(i=U.arrow)||void 0===i?void 0:i.centerOffset),[Y,Z]=v.useState();return Mo((()=>{A&&Z(window.getComputedStyle(A).zIndex)}),[A]),v.createElement("div",{ref:L.setFloating,"data-radix-popper-content-wrapper":"",style:{...V,transform:F?V.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Y,"--radix-popper-transform-origin":[null===(s=U.transformOrigin)||void 0===s?void 0:s.x,null===(c=U.transformOrigin)||void 0===c?void 0:c.y].join(" ")},dir:e.dir},v.createElement(sre,{scope:u,placedSide:$,onArrowChange:T,arrowX:G,arrowY:Q,shouldHideArrow:K},v.createElement(St.div,Le({"data-side":$,"data-align":W},S,{ref:C,style:{...S.style,animation:F?void 0:"none",opacity:null!==(l=U.hide)&&void 0!==l&&l.referenceHidden?0:void 0}}))))}));function lre(e){return null!==e}const fre=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a,o,i;const{placement:s,rects:c,middlewareData:l}=t,u=0!==(null===(n=l.arrow)||void 0===n?void 0:n.centerOffset),f=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[p,h]=rj(s),m={start:"0%",center:"50%",end:"100%"}[h],y=(null!==(r=null===(a=l.arrow)||void 0===a?void 0:a.x)&&void 0!==r?r:0)+f/2,g=(null!==(o=null===(i=l.arrow)||void 0===i?void 0:i.y)&&void 0!==o?o:0)+d/2;let v="",b="";return"bottom"===p?(v=u?m:`${y}px`,b=-d+"px"):"top"===p?(v=u?m:`${y}px`,b=`${c.floating.height+d}px`):"right"===p?(v=-d+"px",b=u?m:`${g}px`):"left"===p&&(v=`${c.floating.width+d}px`,b=u?m:`${g}px`),{data:{x:v,y:b}}}});function rj(e){const[t,n="center"]=e.split("-");return[t,n]}const aj=are,XA=ire,JA=cre,FE="rovingFocusGroup.onEntryFocus",ure={bubbles:!1,cancelable:!0},eT="RovingFocusGroup",[DC,oj,dre]=qA(eT),[pre,Y1]=ii(eT,[dre]),[hre,mre]=pre(eT),gre=v.forwardRef(((e,t)=>v.createElement(DC.Provider,{scope:e.__scopeRovingFocusGroup},v.createElement(DC.Slot,{scope:e.__scopeRovingFocusGroup},v.createElement(yre,Le({},e,{ref:t})))))),yre=v.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:l,...u}=e,f=v.useRef(null),d=yn(t,f),p=WA(o),[h=null,m]=kp({prop:i,defaultProp:s,onChange:c}),[y,g]=v.useState(!1),b=Fc(l),_=oj(n),w=v.useRef(!1),[k,x]=v.useState(0);return v.useEffect((()=>{const e=f.current;if(e)return e.addEventListener(FE,b),()=>e.removeEventListener(FE,b)}),[b]),v.createElement(hre,{scope:n,orientation:r,dir:p,loop:a,currentTabStopId:h,onItemFocus:v.useCallback((e=>m(e)),[m]),onItemShiftTab:v.useCallback((()=>g(!0)),[]),onFocusableItemAdd:v.useCallback((()=>x((e=>e+1))),[]),onFocusableItemRemove:v.useCallback((()=>x((e=>e-1))),[])},v.createElement(St.div,Le({tabIndex:y||0===k?-1:0,"data-orientation":r},u,{ref:d,style:{outline:"none",...e.style},onMouseDown:lt(e.onMouseDown,(()=>{w.current=!0})),onFocus:lt(e.onFocus,(e=>{const t=!w.current;if(e.target===e.currentTarget&&t&&!y){const t=new CustomEvent(FE,ure);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=_().filter((e=>e.focusable));ij([e.find((e=>e.active)),e.find((e=>e.id===h)),...e].filter(Boolean).map((e=>e.ref.current)))}}w.current=!1})),onBlur:lt(e.onBlur,(()=>g(!1)))})))})),_re="RovingFocusGroupItem",vre=v.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,...i}=e,s=mp(),c=o||s,l=mre(_re,n),u=l.currentTabStopId===c,f=oj(n),{onFocusableItemAdd:d,onFocusableItemRemove:p}=l;return v.useEffect((()=>{if(r)return d(),()=>p()}),[r,d,p]),v.createElement(DC.ItemSlot,{scope:n,id:c,focusable:r,active:a},v.createElement(St.span,Le({tabIndex:u?0:-1,"data-orientation":l.orientation},i,{ref:t,onMouseDown:lt(e.onMouseDown,(e=>{r?l.onItemFocus(c):e.preventDefault()})),onFocus:lt(e.onFocus,(()=>l.onItemFocus(c))),onKeyDown:lt(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void l.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=kre(e,l.orientation,l.dir);if(void 0!==t){e.preventDefault();let n=f().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?xre(n,r+1):n.slice(r+1)}setTimeout((()=>ij(n)))}}))})))})),bre={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function wre(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}function kre(e,t,n){const r=wre(e.key,n);if(!("vertical"===t&&["ArrowLeft","ArrowRight"].includes(r)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(r)))return bre[r]}function ij(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function xre(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}const tT=gre,nT=vre,NC=["Enter"," "],Sre=["ArrowDown","PageUp","Home"],sj=["ArrowUp","PageDown","End"],Ere=[...Sre,...sj],Cre={ltr:[...NC,"ArrowRight"],rtl:[...NC,"ArrowLeft"]},Rre={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ek="Menu",[a_,Are,Tre]=qA(Ek),[Pm,cj]=ii(Ek,[Tre,Q1,Y1]),lj=Q1(),fj=Y1(),[WWe,$m]=Pm(Ek),[HWe,W_]=Pm(Ek),Ire=v.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e,a=lj(n);return v.createElement(XA,Le({},a,r,{ref:t}))})),uj="MenuPortal",[Pre,dj]=Pm(uj,{forceMount:void 0}),$re=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:a}=e,o=$m(uj,t);return v.createElement(Pre,{scope:t,forceMount:n},v.createElement(Ws,{present:n||o.open},v.createElement(sA,{asChild:!0,container:a},r)))},zc="MenuContent",[Ore,rT]=Pm(zc),zre=v.forwardRef(((e,t)=>{const n=dj(zc,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=$m(zc,e.__scopeMenu),i=W_(zc,e.__scopeMenu);return v.createElement(a_.Provider,{scope:e.__scopeMenu},v.createElement(Ws,{present:r||o.open},v.createElement(a_.Slot,{scope:e.__scopeMenu},i.modal?v.createElement(Mre,Le({},a,{ref:t})):v.createElement(Dre,Le({},a,{ref:t})))))})),Mre=v.forwardRef(((e,t)=>{const n=$m(zc,e.__scopeMenu),r=v.useRef(null),a=yn(t,r);return v.useEffect((()=>{const e=r.current;if(e)return ak(e)}),[]),v.createElement(aT,Le({},e,{ref:a,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:lt(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)}))})),Dre=v.forwardRef(((e,t)=>{const n=$m(zc,e.__scopeMenu);return v.createElement(aT,Le({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)}))})),aT=v.forwardRef(((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:a,onOpenAutoFocus:o,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:p,disableOutsideScroll:h,...m}=e,y=$m(zc,n),g=W_(zc,n),b=lj(n),_=fj(n),w=Are(n),[k,x]=v.useState(null),S=v.useRef(null),E=yn(t,S,y.onContentChange),A=v.useRef(0),z=v.useRef(""),C=v.useRef(0),I=v.useRef(null),T=v.useRef("right"),R=v.useRef(0),P=h?rk:v.Fragment,j=h?{as:hm,allowPinchZoom:!0}:void 0;v.useEffect((()=>()=>window.clearTimeout(A.current)),[]),cA();const O=v.useCallback((e=>{var t,n;return T.current===(null===(t=I.current)||void 0===t?void 0:t.side)&&eae(e,null===(n=I.current)||void 0===n?void 0:n.area)}),[]);return v.createElement(Ore,{scope:n,searchRef:z,onItemEnter:v.useCallback((e=>{O(e)&&e.preventDefault()}),[O]),onItemLeave:v.useCallback((e=>{var t;O(e)||(null===(t=S.current)||void 0===t||t.focus(),x(null))}),[O]),onTriggerLeave:v.useCallback((e=>{O(e)&&e.preventDefault()}),[O]),pointerGraceTimerRef:C,onPointerGraceIntentChange:v.useCallback((e=>{I.current=e}),[])},v.createElement(P,j,v.createElement(iA,{asChild:!0,trapped:a,onMountAutoFocus:lt(o,(e=>{var t;e.preventDefault(),null===(t=S.current)||void 0===t||t.focus()})),onUnmountAutoFocus:i},v.createElement(tk,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:d,onDismiss:p},v.createElement(tT,Le({asChild:!0},_,{dir:g.dir,orientation:"vertical",loop:r,currentTabStopId:k,onCurrentTabStopIdChange:x,onEntryFocus:lt(c,(e=>{g.isUsingKeyboardRef.current||e.preventDefault()}))}),v.createElement(JA,Le({role:"menu","aria-orientation":"vertical","data-state":yj(y.open),"data-radix-menu-content":"",dir:g.dir},b,m,{ref:E,style:{outline:"none",...m.style},onKeyDown:lt(m.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=z.current+e,a=w().filter((e=>!e.disabled)),o=document.activeElement,i=null===(t=a.find((e=>e.ref.current===o)))||void 0===t?void 0:t.textValue,s=Xre(a.map((e=>e.textValue)),r,i),c=null===(n=a.find((e=>e.textValue===s)))||void 0===n?void 0:n.ref.current;(function e(t){z.current=t,window.clearTimeout(A.current),""!==t&&(A.current=window.setTimeout((()=>e("")),1e3))})(r),c&&setTimeout((()=>c.focus()))})(e.key));const a=S.current;if(e.target!==a||!Ere.includes(e.key))return;e.preventDefault();const o=w().filter((e=>!e.disabled)).map((e=>e.ref.current));sj.includes(e.key)&&o.reverse(),Yre(o)})),onBlur:lt(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(A.current),z.current="")})),onPointerMove:lt(e.onPointerMove,o_((e=>{const t=e.target,n=R.current!==e.clientX;if(e.currentTarget.contains(t)&&n){const t=e.clientX>R.current?"right":"left";T.current=t,R.current=e.clientX}})))})))))))})),Nre=v.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return v.createElement(St.div,Le({},r,{ref:t}))})),LC="MenuItem",Mz="menu.itemSelect",oT=v.forwardRef(((e,t)=>{const{disabled:n=!1,onSelect:r,...a}=e,o=v.useRef(null),i=W_(LC,e.__scopeMenu),s=rT(LC,e.__scopeMenu),c=yn(t,o),l=v.useRef(!1);return v.createElement(pj,Le({},a,{ref:c,disabled:n,onClick:lt(e.onClick,(()=>{const e=o.current;if(!n&&e){const t=new CustomEvent(Mz,{bubbles:!0,cancelable:!0});e.addEventListener(Mz,(e=>null==r?void 0:r(e)),{once:!0}),d7(e,t),t.defaultPrevented?l.current=!1:i.onClose()}})),onPointerDown:t=>{var n;null===(n=e.onPointerDown)||void 0===n||n.call(e,t),l.current=!0},onPointerUp:lt(e.onPointerUp,(e=>{var t;l.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:lt(e.onKeyDown,(e=>{const t=""!==s.searchRef.current;n||t&&" "===e.key||NC.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),pj=v.forwardRef(((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:a,...o}=e,i=rT(LC,n),s=fj(n),c=v.useRef(null),l=yn(t,c),[u,f]=v.useState(!1),[d,p]=v.useState("");return v.useEffect((()=>{const e=c.current;var t;e&&p((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[o.children]),v.createElement(a_.ItemSlot,{scope:n,disabled:r,textValue:a??d},v.createElement(nT,Le({asChild:!0},s,{focusable:!r}),v.createElement(St.div,Le({role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0},o,{ref:l,onPointerMove:lt(e.onPointerMove,o_((e=>{r?i.onItemLeave(e):(i.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:lt(e.onPointerLeave,o_((e=>i.onItemLeave(e)))),onFocus:lt(e.onFocus,(()=>f(!0))),onBlur:lt(e.onBlur,(()=>f(!1)))}))))})),Lre=v.forwardRef(((e,t)=>{const{checked:n=!1,onCheckedChange:r,...a}=e;return v.createElement(mj,{scope:e.__scopeMenu,checked:n},v.createElement(oT,Le({role:"menuitemcheckbox","aria-checked":iw(n)?"mixed":n},a,{ref:t,"data-state":iT(n),onSelect:lt(a.onSelect,(()=>null==r?void 0:r(!!iw(n)||!n)),{checkForDefaultPrevented:!1})})))})),jre="MenuRadioGroup",[GWe,Fre]=Pm(jre,{value:void 0,onValueChange:()=>{}}),Bre="MenuRadioItem",Vre=v.forwardRef(((e,t)=>{const{value:n,...r}=e,a=Fre(Bre,e.__scopeMenu),o=n===a.value;return v.createElement(mj,{scope:e.__scopeMenu,checked:o},v.createElement(oT,Le({role:"menuitemradio","aria-checked":o},r,{ref:t,"data-state":iT(o),onSelect:lt(r.onSelect,(()=>{var e;return null===(e=a.onValueChange)||void 0===e?void 0:e.call(a,n)}),{checkForDefaultPrevented:!1})})))})),hj="MenuItemIndicator",[mj,Ure]=Pm(hj,{checked:!1}),qre=v.forwardRef(((e,t)=>{const{__scopeMenu:n,forceMount:r,...a}=e,o=Ure(hj,n);return v.createElement(Ws,{present:r||iw(o.checked)||!0===o.checked},v.createElement(St.span,Le({},a,{ref:t,"data-state":iT(o.checked)})))})),Wre=v.forwardRef(((e,t)=>{const{__scopeMenu:n,...r}=e;return v.createElement(St.div,Le({role:"separator","aria-orientation":"horizontal"},r,{ref:t}))})),Hre="MenuSub",[KWe,gj]=Pm(Hre),ab="MenuSubTrigger",Gre=v.forwardRef(((e,t)=>{const n=$m(ab,e.__scopeMenu),r=W_(ab,e.__scopeMenu),a=gj(ab,e.__scopeMenu),o=rT(ab,e.__scopeMenu),i=v.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=o,l={__scopeMenu:e.__scopeMenu},u=v.useCallback((()=>{i.current&&window.clearTimeout(i.current),i.current=null}),[]);return v.useEffect((()=>u),[u]),v.useEffect((()=>{const e=s.current;return()=>{window.clearTimeout(e),c(null)}}),[s,c]),v.createElement(Ire,Le({asChild:!0},l),v.createElement(pj,Le({id:a.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":a.contentId,"data-state":yj(n.open)},e,{ref:aA(t,a.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:lt(e.onPointerMove,o_((t=>{o.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(o.onPointerGraceIntentChange(null),i.current=window.setTimeout((()=>{n.onOpenChange(!0),u()}),100))}))),onPointerLeave:lt(e.onPointerLeave,o_((e=>{var t;u();const r=null===(t=n.content)||void 0===t?void 0:t.getBoundingClientRect();if(r){var a;const t=null===(a=n.content)||void 0===a?void 0:a.dataset.side,i="right"===t,c=i?-5:5,l=r[i?"left":"right"],u=r[i?"right":"left"];o.onPointerGraceIntentChange({area:[{x:e.clientX+c,y:e.clientY},{x:l,y:r.top},{x:u,y:r.top},{x:u,y:r.bottom},{x:l,y:r.bottom}],side:t}),window.clearTimeout(s.current),s.current=window.setTimeout((()=>o.onPointerGraceIntentChange(null)),300)}else{if(o.onTriggerLeave(e),e.defaultPrevented)return;o.onPointerGraceIntentChange(null)}}))),onKeyDown:lt(e.onKeyDown,(t=>{const a=""!==o.searchRef.current;var i;e.disabled||a&&" "===t.key||!Cre[r.dir].includes(t.key)||(n.onOpenChange(!0),null===(i=n.content)||void 0===i||i.focus(),t.preventDefault())}))})))})),Kre="MenuSubContent",Qre=v.forwardRef(((e,t)=>{const n=dj(zc,e.__scopeMenu),{forceMount:r=n.forceMount,...a}=e,o=$m(zc,e.__scopeMenu),i=W_(zc,e.__scopeMenu),s=gj(Kre,e.__scopeMenu),c=v.useRef(null),l=yn(t,c);return v.createElement(a_.Provider,{scope:e.__scopeMenu},v.createElement(Ws,{present:r||o.open},v.createElement(a_.Slot,{scope:e.__scopeMenu},v.createElement(aT,Le({id:s.contentId,"aria-labelledby":s.triggerId},a,{ref:l,align:"start",side:"rtl"===i.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;i.isUsingKeyboardRef.current&&(null===(t=c.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:lt(e.onFocusOutside,(e=>{e.target!==s.trigger&&o.onOpenChange(!1)})),onEscapeKeyDown:lt(e.onEscapeKeyDown,(e=>{i.onClose(),e.preventDefault()})),onKeyDown:lt(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),n=Rre[i.dir].includes(e.key);var r;t&&n&&(o.onOpenChange(!1),null===(r=s.trigger)||void 0===r||r.focus(),e.preventDefault())}))})))))}));function yj(e){return e?"open":"closed"}function iw(e){return"indeterminate"===e}function iT(e){return iw(e)?"indeterminate":e?"checked":"unchecked"}function Yre(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Zre(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}function Xre(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,a=n?e.indexOf(n):-1;let o=Zre(e,Math.max(a,0));1===r.length&&(o=o.filter((e=>e!==n)));const i=o.find((e=>e.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function Jre(e,t){const{x:n,y:r}=e;let a=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){const i=t[e].x,s=t[e].y,c=t[o].x,l=t[o].y;s>r!=l>r&&n<(c-i)*(r-s)/(l-s)+i&&(a=!a)}return a}function eae(e,t){if(!t)return!1;return Jre({x:e.clientX,y:e.clientY},t)}function o_(e){return t=>"mouse"===t.pointerType?e(t):void 0}const tae=$re,nae=zre,rae=Nre,aae=oT,oae=Lre,iae=Vre,sae=qre,cae=Wre,lae=Gre,fae=Qre,_j="DropdownMenu",[uae,QWe]=ii(_j,[cj]),Jl=cj(),[YWe,dae]=uae(_j),pae=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Jl(t);return v.createElement(tae,Le({},r,n))},hae="DropdownMenuContent",mae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=dae(hae,n),o=Jl(n),i=v.useRef(!1);return v.createElement(nae,Le({id:a.contentId,"aria-labelledby":a.triggerId},o,r,{ref:t,onCloseAutoFocus:lt(e.onCloseAutoFocus,(e=>{var t;i.current||null===(t=a.triggerRef.current)||void 0===t||t.focus(),i.current=!1,e.preventDefault()})),onInteractOutside:lt(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,n=0===t.button&&!0===t.ctrlKey,r=2===t.button||n;(!a.modal||r)&&(i.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)"}}))})),gae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(rae,Le({},a,r,{ref:t}))})),yae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(aae,Le({},a,r,{ref:t}))})),_ae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(oae,Le({},a,r,{ref:t}))})),vae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(iae,Le({},a,r,{ref:t}))})),bae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(sae,Le({},a,r,{ref:t}))})),wae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(cae,Le({},a,r,{ref:t}))})),kae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(lae,Le({},a,r,{ref:t}))})),xae=v.forwardRef(((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,a=Jl(n);return v.createElement(fae,Le({},a,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)"}}))})),Sae=pae,vj=mae,bj=gae,wj=yae,kj=_ae,xj=vae,Sj=bae,sT=wae,Ej=kae,Cj=xae,Eae=v.forwardRef((({className:e,inset:t,children:n,...r},a)=>B.jsxs(Ej,{ref:a,className:$e("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,B.jsx(e7,{className:"ml-auto h-4 w-4"})]})));Eae.displayName=Ej.displayName;const Cae=v.forwardRef((({className:e,...t},n)=>B.jsx(Cj,{ref:n,className:$e("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})));Cae.displayName=Cj.displayName;const Rae=v.forwardRef((({className:e,sideOffset:t=4,...n},r)=>B.jsx(Sae,{children:B.jsx(vj,{ref:r,sideOffset:t,className:$e("z-[101] min-w-[8rem] overflow-hidden rounded-md border bg-popover p-[8px] text-popover-foreground shadow-md 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),...n})})));Rae.displayName=vj.displayName;const Aae=v.forwardRef((({className:e,inset:t,...n},r)=>B.jsx(wj,{ref:r,className:$e("relative flex cursor-default select-none items-center rounded-xs px-2 py-1.5 text-sm outline-none transition-colors hover:bg-accent data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n})));Aae.displayName=wj.displayName;const Tae=v.forwardRef((({className:e,children:t,checked:n,...r},a)=>B.jsxs(kj,{ref:a,className:$e("relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[B.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:B.jsx(Sj,{children:B.jsx(tA,{className:"h-4 w-4"})})}),t]})));Tae.displayName=kj.displayName;const Iae=v.forwardRef((({className:e,children:t,...n},r)=>B.jsxs(xj,{ref:r,className:$e("relative flex cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[B.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:B.jsx(Sj,{children:B.jsx(t7,{className:"h-2 w-2 fill-current"})})}),t]})));Iae.displayName=xj.displayName;const Pae=v.forwardRef((({className:e,inset:t,...n},r)=>B.jsx(bj,{ref:r,className:$e("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n})));Pae.displayName=bj.displayName;const $ae=v.forwardRef((({className:e,...t},n)=>B.jsx(sT,{ref:n,className:$e("-mx-1 my-1 h-px bg-muted",e),...t})));$ae.displayName=sT.displayName;var H_=e=>"checkbox"===e.type,d1=e=>e instanceof Date,ti=e=>null==e;const Rj=e=>"object"==typeof e;var da=e=>!ti(e)&&!Array.isArray(e)&&Rj(e)&&!d1(e),Oae=e=>da(e)&&e.target?H_(e.target)?e.target.checked:e.target.value:e,zae=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Mae=(e,t)=>e.has(zae(t)),Dae=e=>{const t=e.constructor&&e.constructor.prototype;return da(t)&&t.hasOwnProperty("isPrototypeOf")},cT=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function Ns(e){let t;const n=Array.isArray(e);if(e instanceof Date)t=new Date(e);else if(e instanceof Set)t=new Set(e);else{if(cT&&(e instanceof Blob||e instanceof FileList)||!n&&!da(e))return e;if(t=n?[]:{},n||Dae(e))for(const n in e)e.hasOwnProperty(n)&&(t[n]=Ns(e[n]));else t=e}return t}var G_=e=>Array.isArray(e)?e.filter(Boolean):[],Fr=e=>void 0===e,dt=(e,t,n)=>{if(!t||!da(e))return n;const r=G_(t.split(/[,[\].]+?/)).reduce(((e,t)=>ti(e)?e:e[t]),e);return Fr(r)||r===e?Fr(e[t])?n:e[t]:r},du=e=>"boolean"==typeof e;const Dz={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Ic={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},nu={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Aj=ze.createContext(null),Nae=()=>ze.useContext(Aj),Lae=e=>{const{children:t,...n}=e;return ze.createElement(Aj.Provider,{value:n},t)};var jae=(e,t,n,r=!0)=>{const a={defaultValues:t._defaultValues};for(const n in e)Object.defineProperty(a,n,{get:()=>{const a=n;return t._proxyFormState[a]!==Ic.all&&(t._proxyFormState[a]=!r||Ic.all),e[a]}});return a},Ls=e=>da(e)&&!Object.keys(e).length,Fae=(e,t,n,r)=>{n(e);const{name:a,...o}=e;return Ls(o)||Object.keys(o).length>=Object.keys(t).length||Object.keys(o).find((e=>t[e]===Ic.all))},BE=e=>Array.isArray(e)?e:[e];function Bae(e){const t=ze.useRef(e);t.current=e,ze.useEffect((()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}}),[e.disabled])}var Nl=e=>"string"==typeof e,Vae=(e,t,n,r,a)=>Nl(e)?(r&&t.watch.add(e),dt(n,e,a)):Array.isArray(e)?e.map((e=>(r&&t.watch.add(e),dt(n,e)))):(r&&(t.watchAll=!0),n),lT=e=>/^\w*$/.test(e),Tj=e=>G_(e.replace(/["|']|\]/g,"").split(/\.|\[/)),or=(e,t,n)=>{let r=-1;const a=lT(t)?[t]:Tj(t),o=a.length,i=o-1;for(;++r<o;){const t=a[r];let o=n;if(r!==i){const n=e[t];o=da(n)||Array.isArray(n)?n:isNaN(+a[r+1])?{}:[]}e[t]=o,e=e[t]}return e},Uae=(e,t,n,r,a)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:a||!0}}:{},Nz=e=>({isOnSubmit:!e||e===Ic.onSubmit,isOnBlur:e===Ic.onBlur,isOnChange:e===Ic.onChange,isOnAll:e===Ic.all,isOnTouch:e===Ic.onTouched}),Lz=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some((t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length)))));const $y=(e,t,n,r)=>{for(const a of n||Object.keys(e)){const n=dt(e,a);if(n){const{_f:e,...o}=n;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],a)&&!r)break;if(e.ref&&t(e.ref,e.name)&&!r)break;$y(o,t)}else da(o)&&$y(o,t)}}};var qae=(e,t,n)=>{const r=G_(dt(e,n));return or(r,"root",t[n]),or(e,n,r),e},fT=e=>"file"===e.type,hp=e=>"function"==typeof e,sw=e=>{if(!cT)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Db=e=>Nl(e),uT=e=>"radio"===e.type,cw=e=>e instanceof RegExp;const jz={value:!1,isValid:!1},Fz={value:!0,isValid:!0};var Ij=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter((e=>e&&e.checked&&!e.disabled)).map((e=>e.value));return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!Fr(e[0].attributes.value)?Fr(e[0].value)||""===e[0].value?Fz:{value:e[0].value,isValid:!0}:Fz:jz}return jz};const Bz={isValid:!1,value:null};var Pj=e=>Array.isArray(e)?e.reduce(((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e),Bz):Bz;function Vz(e,t,n="validate"){if(Db(e)||Array.isArray(e)&&e.every(Db)||du(e)&&!e)return{type:n,message:Db(e)?e:"",ref:t}}var t1=e=>da(e)&&!cw(e)?e:{value:e,message:""},Uz=async(e,t,n,r,a)=>{const{ref:o,refs:i,required:s,maxLength:c,minLength:l,min:u,max:f,pattern:d,validate:p,name:h,valueAsNumber:m,mount:y,disabled:g}=e._f,v=dt(t,h);if(!y||g)return{};const b=i?i[0]:o,_=e=>{r&&b.reportValidity&&(b.setCustomValidity(du(e)?"":e||""),b.reportValidity())},w={},k=uT(o),x=H_(o),S=k||x,E=(m||fT(o))&&Fr(o.value)&&Fr(v)||sw(o)&&""===o.value||""===v||Array.isArray(v)&&!v.length,A=Uae.bind(null,h,n,w),z=(e,t,n,r=nu.maxLength,a=nu.minLength)=>{const i=e?t:n;w[h]={type:e?r:a,message:i,ref:o,...A(e?r:a,i)}};if(a?!Array.isArray(v)||!v.length:s&&(!S&&(E||ti(v))||du(v)&&!v||x&&!Ij(i).isValid||k&&!Pj(i).isValid)){const{value:e,message:t}=Db(s)?{value:!!s,message:s}:t1(s);if(e&&(w[h]={type:nu.required,message:t,ref:b,...A(nu.required,t)},!n))return _(t),w}if(!(E||ti(u)&&ti(f))){let e,t;const r=t1(f),a=t1(u);if(ti(v)||isNaN(v)){const n=o.valueAsDate||new Date(v),i=e=>new Date((new Date).toDateString()+" "+e),s="time"==o.type,c="week"==o.type;Nl(r.value)&&v&&(e=s?i(v)>i(r.value):c?v>r.value:n>new Date(r.value)),Nl(a.value)&&v&&(t=s?i(v)<i(a.value):c?v<a.value:n<new Date(a.value))}else{const n=o.valueAsNumber||v&&+v;ti(r.value)||(e=n>r.value),ti(a.value)||(t=n<a.value)}if((e||t)&&(z(!!e,r.message,a.message,nu.max,nu.min),!n))return _(w[h].message),w}if((c||l)&&!E&&(Nl(v)||a&&Array.isArray(v))){const e=t1(c),t=t1(l),r=!ti(e.value)&&v.length>+e.value,a=!ti(t.value)&&v.length<+t.value;if((r||a)&&(z(r,e.message,t.message),!n))return _(w[h].message),w}if(d&&!E&&Nl(v)){const{value:e,message:t}=t1(d);if(cw(e)&&!v.match(e)&&(w[h]={type:nu.pattern,message:t,ref:o,...A(nu.pattern,t)},!n))return _(t),w}if(p)if(hp(p)){const e=Vz(await p(v,t),b);if(e&&(w[h]={...e,...A(nu.validate,e.message)},!n))return _(e.message),w}else if(da(p)){let e={};for(const r in p){if(!Ls(e)&&!n)break;const a=Vz(await p[r](v,t),b,r);a&&(e={...a,...A(r,a.message)},_(a.message),n&&(w[h]=e))}if(!Ls(e)&&(w[h]={ref:b,...e},!n))return w}return _(!0),w};function Wae(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=Fr(e)?r++:e[t[r++]];return e}function Hae(e){for(const t in e)if(e.hasOwnProperty(t)&&!Fr(e[t]))return!1;return!0}function Va(e,t){const n=Array.isArray(t)?t:lT(t)?[t]:Tj(t),r=1===n.length?e:Wae(e,n),a=n.length-1,o=n[a];return r&&delete r[o],0!==a&&(da(r)&&Ls(r)||Array.isArray(r)&&Hae(r))&&Va(e,n.slice(0,-1)),e}var VE=()=>{let e=[];return{get observers(){return e},next:t=>{for(const n of e)n.next&&n.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter((e=>e!==t))}}),unsubscribe:()=>{e=[]}}},lw=e=>ti(e)||!Rj(e);function rm(e,t){if(lw(e)||lw(t))return e===t;if(d1(e)&&d1(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const a of n){const n=e[a];if(!r.includes(a))return!1;if("ref"!==a){const e=t[a];if(d1(n)&&d1(e)||da(n)&&da(e)||Array.isArray(n)&&Array.isArray(e)?!rm(n,e):n!==e)return!1}}return!0}var $j=e=>"select-multiple"===e.type,Gae=e=>uT(e)||H_(e),UE=e=>sw(e)&&e.isConnected,Kae=e=>da(e)&&Object.values(e).some((e=>e)),Oj=e=>{for(const t in e)if(hp(e[t]))return!0;return!1};function fw(e,t={}){const n=Array.isArray(e);if(da(e)||n)for(const n in e)Array.isArray(e[n])||da(e[n])&&!Oj(e[n])?(t[n]=Array.isArray(e[n])?[]:{},fw(e[n],t[n])):ti(e[n])||(t[n]=!0);return t}function zj(e,t,n){const r=Array.isArray(e);if(da(e)||r)for(const r in e)Array.isArray(e[r])||da(e[r])&&!Oj(e[r])?Fr(t)||lw(n[r])?n[r]=Array.isArray(e[r])?fw(e[r],[]):{...fw(e[r])}:zj(e[r],ti(t)?{}:t[r],n[r]):n[r]=!rm(e[r],t[r]);return n}var ob=(e,t)=>zj(e,t,fw(t)),Mj=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Fr(e)?e:t?""===e?NaN:e&&+e:n&&Nl(e)?new Date(e):r?r(e):e;function qE(e){const t=e.ref;if(!(e.refs?e.refs.every((e=>e.disabled)):t.disabled))return fT(t)?t.files:uT(t)?Pj(e.refs).value:$j(t)?[...t.selectedOptions].map((({value:e})=>e)):H_(t)?Ij(e.refs).value:Mj(Fr(t.value)?e.ref.value:t.value,e)}var Qae=(e,t,n,r)=>{const a={};for(const n of e){const e=dt(t,n);e&&or(a,n,e._f)}return{criteriaMode:n,names:[...e],fields:a,shouldUseNativeValidation:r}},iy=e=>Fr(e)?e:cw(e)?e.source:da(e)?cw(e.value)?e.value.source:e.value:e,Yae=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function qz(e,t,n){const r=dt(e,n);if(r||lT(n))return{error:r,name:n};const a=n.split(".");for(;a.length;){const r=a.join("."),o=dt(t,r),i=dt(e,r);if(o&&!Array.isArray(o)&&n!==r)return{name:n};if(i&&i.type)return{name:r,error:i};a.pop()}return{name:n}}var Zae=(e,t,n,r,a)=>!a.isOnAll&&(!n&&a.isOnTouch?!(t||e):(n?r.isOnBlur:a.isOnBlur)?!e:!(n?r.isOnChange:a.isOnChange)||e),Xae=(e,t)=>!G_(dt(e,t)).length&&Va(e,t);const Jae={mode:Ic.onSubmit,reValidateMode:Ic.onChange,shouldFocusError:!0};function eoe(e={}){let t,n={...Jae,...e},r={submitCount:0,isDirty:!1,isLoading:hp(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:n.errors||{},disabled:n.disabled||!1},a={},o=(da(n.defaultValues)||da(n.values))&&Ns(n.defaultValues||n.values)||{},i=n.shouldUnregister?{}:Ns(o),s={action:!1,mount:!1,watch:!1},c={mount:new Set,unMount:new Set,array:new Set,watch:new Set},l=0;const u={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},f={values:VE(),array:VE(),state:VE()},d=Nz(n.mode),p=Nz(n.reValidateMode),h=n.criteriaMode===Ic.all,m=async e=>{if(u.isValid||e){const e=n.resolver?Ls((await _()).errors):await w(a,!0);e!==r.isValid&&f.state.next({isValid:e})}},y=(e,t)=>{(u.isValidating||u.validatingFields)&&(t.forEach((t=>{or(r.validatingFields,t,e)})),r.isValidating=Kae(r.validatingFields),f.state.next({validatingFields:r.validatingFields,isValidating:r.isValidating}))},g=(e,t,n,r)=>{const c=dt(a,e);if(c){const a=dt(i,e,Fr(n)?dt(o,e):n);Fr(a)||r&&r.defaultChecked||t?or(i,e,t?a:qE(c._f)):S(e,a),s.mount&&m()}},v=(e,t,n,i,s)=>{let c=!1,l=!1;const d={name:e},p=!(!dt(a,e)||!dt(a,e)._f.disabled);if(!n||i){u.isDirty&&(l=r.isDirty,r.isDirty=d.isDirty=k(),c=l!==d.isDirty);const n=p||rm(dt(o,e),t);l=!(p||!dt(r.dirtyFields,e)),n||p?Va(r.dirtyFields,e):or(r.dirtyFields,e,!0),d.dirtyFields=r.dirtyFields,c=c||u.dirtyFields&&l!==!n}if(n){const t=dt(r.touchedFields,e);t||(or(r.touchedFields,e,n),d.touchedFields=r.touchedFields,c=c||u.touchedFields&&t!==n)}return c&&s&&f.state.next(d),c?d:{}},b=(n,a,o,i)=>{const s=dt(r.errors,n),c=u.isValid&&du(a)&&r.isValid!==a;if(e.delayError&&o?(t=(e=>t=>{clearTimeout(l),l=setTimeout(e,t)})((()=>((e,t)=>{or(r.errors,e,t),f.state.next({errors:r.errors})})(n,o))),t(e.delayError)):(clearTimeout(l),t=null,o?or(r.errors,n,o):Va(r.errors,n)),(o?!rm(s,o):s)||!Ls(i)||c){const e={...i,...c&&du(a)?{isValid:a}:{},errors:r.errors,name:n};r={...r,...e},f.state.next(e)}y(!1,Object.keys(r.validatingFields).filter((e=>e===n)))},_=async e=>n.resolver(i,n.context,Qae(e||c.mount,a,n.criteriaMode,n.shouldUseNativeValidation)),w=async(e,t,a={valid:!0})=>{for(const o in e){const s=e[o];if(s){const{_f:e,...o}=s;if(e){const o=c.array.has(e.name),l=await Uz(s,i,h,n.shouldUseNativeValidation&&!t,o);if(l[e.name]&&(a.valid=!1,t))break;!t&&(dt(l,e.name)?o?qae(r.errors,l,e.name):or(r.errors,e.name,l[e.name]):Va(r.errors,e.name))}o&&await w(o,t,a)}}return a.valid},k=(e,t)=>(e&&t&&or(i,e,t),!rm(T(),o)),x=(e,t,n)=>Vae(e,c,{...s.mount?i:Fr(t)?o:Nl(e)?{[e]:t}:t},n,t),S=(e,t,n={})=>{const r=dt(a,e);let o=t;if(r){const n=r._f;n&&(!n.disabled&&or(i,e,Mj(t,n)),o=sw(n.ref)&&ti(t)?"":t,$j(n.ref)?[...n.ref.options].forEach((e=>e.selected=o.includes(e.value))):n.refs?H_(n.ref)?n.refs.length>1?n.refs.forEach((e=>(!e.defaultChecked||!e.disabled)&&(e.checked=Array.isArray(o)?!!o.find((t=>t===e.value)):o===e.value))):n.refs[0]&&(n.refs[0].checked=!!o):n.refs.forEach((e=>e.checked=e.value===o)):fT(n.ref)?n.ref.value="":(n.ref.value=o,n.ref.type||f.values.next({name:e,values:{...i}})))}(n.shouldDirty||n.shouldTouch)&&v(e,o,n.shouldTouch,n.shouldDirty,!0),n.shouldValidate&&I(e)},E=(e,t,n)=>{for(const r in t){const o=t[r],i=`${e}.${r}`,s=dt(a,i);!c.array.has(e)&&lw(o)&&(!s||s._f)||d1(o)?S(i,o,n):E(i,o,n)}},A=(e,t,n={})=>{const l=dt(a,e),d=c.array.has(e),p=Ns(t);or(i,e,p),d?(f.array.next({name:e,values:{...i}}),(u.isDirty||u.dirtyFields)&&n.shouldDirty&&f.state.next({name:e,dirtyFields:ob(o,i),isDirty:k(e,p)})):!l||l._f||ti(p)?S(e,p,n):E(e,p,n),Lz(e,c)&&f.state.next({...r}),f.values.next({name:s.mount?e:void 0,values:{...i}})},z=async e=>{const o=e.target;let s=o.name,l=!0;const g=dt(a,s),k=e=>{l=Number.isNaN(e)||e===dt(i,s,e)};if(g){let x,S;const E=o.type?qE(g._f):Oae(e),A=e.type===Dz.BLUR||e.type===Dz.FOCUS_OUT,z=!Yae(g._f)&&!n.resolver&&!dt(r.errors,s)&&!g._f.deps||Zae(A,dt(r.touchedFields,s),r.isSubmitted,p,d),C=Lz(s,c,A);or(i,s,E),A?(g._f.onBlur&&g._f.onBlur(e),t&&t(0)):g._f.onChange&&g._f.onChange(e);const T=v(s,E,A,!1),R=!Ls(T)||C;if(!A&&f.values.next({name:s,type:e.type,values:{...i}}),z)return u.isValid&&m(),R&&f.state.next({name:s,...C?{}:T});if(!A&&C&&f.state.next({...r}),y(!0,[s]),n.resolver){const{errors:e}=await _([s]);if(k(E),l){const t=qz(r.errors,a,s),n=qz(e,a,t.name||s);x=n.error,s=n.name,S=Ls(e)}}else x=(await Uz(g,i,h,n.shouldUseNativeValidation))[s],k(E),l&&(x?S=!1:u.isValid&&(S=await w(a,!0)));l&&(g._f.deps&&I(g._f.deps),b(s,S,x,T))}},C=(e,t)=>{if(dt(r.errors,t)&&e.focus)return e.focus(),1},I=async(e,t={})=>{let o,i;const s=BE(e);if(y(!0,s),n.resolver){const t=await(async e=>{const{errors:t}=await _(e);if(e)for(const n of e){const e=dt(t,n);e?or(r.errors,n,e):Va(r.errors,n)}else r.errors=t;return t})(Fr(e)?e:s);o=Ls(t),i=e?!s.some((e=>dt(t,e))):o}else e?(i=(await Promise.all(s.map((async e=>{const t=dt(a,e);return await w(t&&t._f?{[e]:t}:t)})))).every(Boolean),(i||r.isValid)&&m()):i=o=await w(a);return f.state.next({...!Nl(e)||u.isValid&&o!==r.isValid?{}:{name:e},...n.resolver||!e?{isValid:o}:{},errors:r.errors,isValidating:!1}),t.shouldFocus&&!i&&$y(a,C,e?s:c.mount),i},T=e=>{const t={...o,...s.mount?i:{}};return Fr(e)?t:Nl(e)?dt(t,e):e.map((e=>dt(t,e)))},R=(e,t)=>({invalid:!!dt((t||r).errors,e),isDirty:!!dt((t||r).dirtyFields,e),isTouched:!!dt((t||r).touchedFields,e),isValidating:!!dt((t||r).validatingFields,e),error:dt((t||r).errors,e)}),P=(e,t,n)=>{const o=(dt(a,e,{_f:{}})._f||{}).ref;or(r.errors,e,{...t,ref:o}),f.state.next({name:e,errors:r.errors,isValid:!1}),n&&n.shouldFocus&&o&&o.focus&&o.focus()},j=(e,t={})=>{for(const s of e?BE(e):c.mount)c.mount.delete(s),c.array.delete(s),t.keepValue||(Va(a,s),Va(i,s)),!t.keepError&&Va(r.errors,s),!t.keepDirty&&Va(r.dirtyFields,s),!t.keepTouched&&Va(r.touchedFields,s),!t.keepIsValidating&&Va(r.validatingFields,s),!n.shouldUnregister&&!t.keepDefaultValue&&Va(o,s);f.values.next({values:{...i}}),f.state.next({...r,...t.keepDirty?{isDirty:k()}:{}}),!t.keepIsValid&&m()},O=({disabled:e,name:t,field:n,fields:r,value:a})=>{if(du(e)){const o=e?void 0:Fr(a)?qE(n?n._f:dt(r,t)._f):a;or(i,t,o),v(t,o,!1,!1,!0)}},N=(e,t={})=>{let r=dt(a,e);const i=du(t.disabled);return or(a,e,{...r||{},_f:{...r&&r._f?r._f:{ref:{name:e}},name:e,mount:!0,...t}}),c.mount.add(e),r?O({field:r,disabled:t.disabled,name:e,value:t.value}):g(e,!0,t.value),{...i?{disabled:t.disabled}:{},...n.progressive?{required:!!t.required,min:iy(t.min),max:iy(t.max),minLength:iy(t.minLength),maxLength:iy(t.maxLength),pattern:iy(t.pattern)}:{},name:e,onChange:z,onBlur:z,ref:i=>{if(i){N(e,t),r=dt(a,e);const n=Fr(i.value)&&i.querySelectorAll&&i.querySelectorAll("input,select,textarea")[0]||i,s=Gae(n),c=r._f.refs||[];if(s?c.find((e=>e===n)):n===r._f.ref)return;or(a,e,{_f:{...r._f,...s?{refs:[...c.filter(UE),n,...Array.isArray(dt(o,e))?[{}]:[]],ref:{type:n.type,name:e}}:{ref:n}}}),g(e,!1,void 0,n)}else r=dt(a,e,{}),r._f&&(r._f.mount=!1),(n.shouldUnregister||t.shouldUnregister)&&(!Mae(c.array,e)||!s.action)&&c.unMount.add(e)}}},M=()=>n.shouldFocusError&&$y(a,C,c.mount),D=(e,t)=>async o=>{let s;o&&(o.preventDefault&&o.preventDefault(),o.persist&&o.persist());let c=Ns(i);if(f.state.next({isSubmitting:!0}),n.resolver){const{errors:e,values:t}=await _();r.errors=e,c=t}else await w(a);if(Va(r.errors,"root"),Ls(r.errors)){f.state.next({errors:{}});try{await e(c,o)}catch(e){s=e}}else t&&await t({...r.errors},o),M(),setTimeout(M);if(f.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ls(r.errors)&&!s,submitCount:r.submitCount+1,errors:r.errors}),s)throw s},B=(t,n={})=>{const l=t?Ns(t):o,d=Ns(l),p=Ls(t),h=p?o:d;if(n.keepDefaultValues||(o=l),!n.keepValues){if(n.keepDirtyValues)for(const e of c.mount)dt(r.dirtyFields,e)?or(h,e,dt(i,e)):A(e,dt(h,e));else{if(cT&&Fr(t))for(const e of c.mount){const t=dt(a,e);if(t&&t._f){const e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(sw(e)){const t=e.closest("form");if(t){t.reset();break}}}}a={}}i=e.shouldUnregister?n.keepDefaultValues?Ns(o):{}:Ns(h),f.array.next({values:{...h}}),f.values.next({values:{...h}})}c={mount:n.keepDirtyValues?c.mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},s.mount=!u.isValid||!!n.keepIsValid||!!n.keepDirtyValues,s.watch=!!e.shouldUnregister,f.state.next({submitCount:n.keepSubmitCount?r.submitCount:0,isDirty:!p&&(n.keepDirty?r.isDirty:!(!n.keepDefaultValues||rm(t,o))),isSubmitted:!!n.keepIsSubmitted&&r.isSubmitted,dirtyFields:p?[]:n.keepDirtyValues?n.keepDefaultValues&&i?ob(o,i):r.dirtyFields:n.keepDefaultValues&&t?ob(o,t):{},touchedFields:n.keepTouched?r.touchedFields:{},errors:n.keepErrors?r.errors:{},isSubmitSuccessful:!!n.keepIsSubmitSuccessful&&r.isSubmitSuccessful,isSubmitting:!1})},L=(e,t)=>B(hp(e)?e(i):e,t);return{control:{register:N,unregister:j,getFieldState:R,handleSubmit:D,setError:P,_executeSchema:_,_getWatch:x,_getDirty:k,_updateValid:m,_removeUnmounted:()=>{for(const e of c.unMount){const t=dt(a,e);t&&(t._f.refs?t._f.refs.every((e=>!UE(e))):!UE(t._f.ref))&&j(e)}c.unMount=new Set},_updateFieldArray:(e,t=[],n,c,l=!0,d=!0)=>{if(c&&n){if(s.action=!0,d&&Array.isArray(dt(a,e))){const t=n(dt(a,e),c.argA,c.argB);l&&or(a,e,t)}if(d&&Array.isArray(dt(r.errors,e))){const t=n(dt(r.errors,e),c.argA,c.argB);l&&or(r.errors,e,t),Xae(r.errors,e)}if(u.touchedFields&&d&&Array.isArray(dt(r.touchedFields,e))){const t=n(dt(r.touchedFields,e),c.argA,c.argB);l&&or(r.touchedFields,e,t)}u.dirtyFields&&(r.dirtyFields=ob(o,i)),f.state.next({name:e,isDirty:k(e,t),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else or(i,e,t)},_updateDisabledField:O,_getFieldArray:t=>G_(dt(s.mount?i:o,t,e.shouldUnregister?dt(o,t,[]):[])),_reset:B,_resetDefaultValues:()=>hp(n.defaultValues)&&n.defaultValues().then((e=>{L(e,n.resetOptions),f.state.next({isLoading:!1})})),_updateFormState:e=>{r={...r,...e}},_disableForm:e=>{du(e)&&(f.state.next({disabled:e}),$y(a,((t,n)=>{let r=e;const o=dt(a,n);o&&du(o._f.disabled)&&(r||(r=o._f.disabled)),t.disabled=r}),0,!1))},_subjects:f,_proxyFormState:u,_setErrors:e=>{r.errors=e,f.state.next({errors:r.errors,isValid:!1})},get _fields(){return a},get _formValues(){return i},get _state(){return s},set _state(e){s=e},get _defaultValues(){return o},get _names(){return c},set _names(e){c=e},get _formState(){return r},set _formState(e){r=e},get _options(){return n},set _options(e){n={...n,...e}}},trigger:I,register:N,handleSubmit:D,watch:(e,t)=>hp(e)?f.values.subscribe({next:n=>e(x(void 0,t),n)}):x(e,t,!0),setValue:A,getValues:T,reset:L,resetField:(e,t={})=>{dt(a,e)&&(Fr(t.defaultValue)?A(e,Ns(dt(o,e))):(A(e,t.defaultValue),or(o,e,Ns(t.defaultValue))),t.keepTouched||Va(r.touchedFields,e),t.keepDirty||(Va(r.dirtyFields,e),r.isDirty=t.defaultValue?k(e,Ns(dt(o,e))):k()),t.keepError||(Va(r.errors,e),u.isValid&&m()),f.state.next({...r}))},clearErrors:e=>{e&&BE(e).forEach((e=>Va(r.errors,e))),f.state.next({errors:e?r.errors:{}})},unregister:j,setError:P,setFocus:(e,t={})=>{const n=dt(a,e),r=n&&n._f;if(r){const e=r.refs?r.refs[0]:r.ref;e.focus&&(e.focus(),t.shouldSelect&&e.select())}},getFieldState:R}}function toe(e={}){const t=ze.useRef(),n=ze.useRef(),[r,a]=ze.useState({isDirty:!1,isValidating:!1,isLoading:hp(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,defaultValues:hp(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...eoe(e),formState:r});const o=t.current.control;return o._options=e,Bae({subject:o._subjects.state,next:e=>{Fae(e,o._proxyFormState,o._updateFormState)&&a({...o._formState})}}),ze.useEffect((()=>o._disableForm(e.disabled)),[o,e.disabled]),ze.useEffect((()=>{if(o._proxyFormState.isDirty){const e=o._getDirty();e!==r.isDirty&&o._subjects.state.next({isDirty:e})}}),[o,r.isDirty]),ze.useEffect((()=>{e.values&&!rm(e.values,n.current)?(o._reset(e.values,o._options.resetOptions),n.current=e.values,a((e=>({...e})))):o._resetDefaultValues()}),[e.values,o]),ze.useEffect((()=>{e.errors&&o._setErrors(e.errors)}),[e.errors,o]),ze.useEffect((()=>{o._state.mount||(o._updateValid(),o._state.mount=!0),o._state.watch&&(o._state.watch=!1,o._subjects.state.next({...o._formState})),o._removeUnmounted()})),ze.useEffect((()=>{e.shouldUnregister&&o._subjects.values.next({values:o._getWatch()})}),[e.shouldUnregister,o]),t.current.formState=jae(r,o),t.current}function Wz(e,[t,n]){return Math.min(n,Math.max(t,e))}const Dj=v.forwardRef(((e,t)=>v.createElement(St.span,Le({},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}})))),noe=Dj,roe=[" ","Enter","ArrowUp","ArrowDown"],aoe=[" ","Enter"],Ck="Select",[Rk,Ak,ooe]=qA(Ck),[Z1,ZWe]=ii(Ck,[ooe,Q1]),dT=Q1(),[ioe,Om]=Z1(Ck),[soe,coe]=Z1(Ck),loe=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:a,onOpenChange:o,value:i,defaultValue:s,onValueChange:c,dir:l,name:u,autoComplete:f,disabled:d,required:p}=e,h=dT(t),[m,y]=v.useState(null),[g,b]=v.useState(null),[_,w]=v.useState(!1),k=WA(l),[x=!1,S]=kp({prop:r,defaultProp:a,onChange:o}),[E,A]=kp({prop:i,defaultProp:s,onChange:c}),z=v.useRef(null),C=!m||!!m.closest("form"),[I,T]=v.useState(new Set),R=Array.from(I).map((e=>e.props.value)).join(";");return v.createElement(aj,h,v.createElement(ioe,{required:p,scope:t,trigger:m,onTriggerChange:y,valueNode:g,onValueNodeChange:b,valueNodeHasChildren:_,onValueNodeHasChildrenChange:w,contentId:mp(),value:E,onValueChange:A,open:x,onOpenChange:S,dir:k,triggerPointerDownPosRef:z,disabled:d},v.createElement(Rk.Provider,{scope:t},v.createElement(soe,{scope:e.__scopeSelect,onNativeOptionAdd:v.useCallback((e=>{T((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:v.useCallback((e=>{T((t=>{const n=new Set(t);return n.delete(e),n}))}),[])},n)),C?v.createElement(Bj,{key:R,"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:f,value:E,onChange:e=>A(e.target.value),disabled:d},void 0===E?v.createElement("option",{value:""}):null,Array.from(I)):null))},foe="SelectTrigger",uoe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...a}=e,o=dT(n),i=Om(foe,n),s=i.disabled||r,c=yn(t,i.onTriggerChange),l=Ak(n),[u,f,d]=Vj((e=>{const t=l().filter((e=>!e.disabled)),n=t.find((e=>e.value===i.value)),r=Uj(t,e,n);void 0!==r&&i.onValueChange(r.value)})),p=()=>{s||(i.onOpenChange(!0),d())};return v.createElement(XA,Le({asChild:!0},o),v.createElement(St.button,Le({type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Fj(i.value)?"":void 0},a,{ref:c,onClick:lt(a.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:lt(a.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(p(),i.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:lt(a.onKeyDown,(e=>{const t=""!==u.current;!(e.ctrlKey||e.altKey||e.metaKey)&&1===e.key.length&&f(e.key),(!t||" "!==e.key)&&roe.includes(e.key)&&(p(),e.preventDefault())}))})))})),doe="SelectValue",poe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,children:o,placeholder:i="",...s}=e,c=Om(doe,n),{onValueNodeHasChildrenChange:l}=c,u=void 0!==o,f=yn(t,c.onValueNodeChange);return Mo((()=>{l(u)}),[l,u]),v.createElement(St.span,Le({},s,{ref:f,style:{pointerEvents:"none"}}),Fj(c.value)?v.createElement(v.Fragment,null,i):o)})),hoe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,children:r,...a}=e;return v.createElement(St.span,Le({"aria-hidden":!0},a,{ref:t}),r||"▼")})),moe=e=>v.createElement(sA,Le({asChild:!0},e)),A1="SelectContent",goe=v.forwardRef(((e,t)=>{const n=Om(A1,e.__scopeSelect),[r,a]=v.useState();if(Mo((()=>{a(new DocumentFragment)}),[]),!n.open){const t=r;return t?Zl.createPortal(v.createElement(Nj,{scope:e.__scopeSelect},v.createElement(Rk.Slot,{scope:e.__scopeSelect},v.createElement("div",null,e.children))),t):null}return v.createElement(yoe,Le({},e,{ref:t}))})),su=10,[Nj,zm]=Z1(A1),yoe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:o,onPointerDownOutside:i,side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:y,...g}=e,b=Om(A1,n),[_,w]=v.useState(null),[k,x]=v.useState(null),S=yn(t,(e=>w(e))),[E,A]=v.useState(null),[z,C]=v.useState(null),I=Ak(n),[T,R]=v.useState(!1),P=v.useRef(!1);v.useEffect((()=>{if(_)return ak(_)}),[_]),cA();const j=v.useCallback((e=>{const[t,...n]=I().map((e=>e.ref.current)),[r]=n.slice(-1),a=document.activeElement;for(const n of e)if(n===a||(null==n||n.scrollIntoView({block:"nearest"}),n===t&&k&&(k.scrollTop=0),n===r&&k&&(k.scrollTop=k.scrollHeight),null==n||n.focus(),document.activeElement!==a))return}),[I,k]),O=v.useCallback((()=>j([E,_])),[j,E,_]);v.useEffect((()=>{T&&O()}),[T,O]);const{onOpenChange:N,triggerPointerDownPosRef:M}=b;v.useEffect((()=>{if(_){let e={x:0,y:0};const t=t=>{var n,r,a,o;e={x:Math.abs(Math.round(t.pageX)-(null!==(n=null===(r=M.current)||void 0===r?void 0:r.x)&&void 0!==n?n:0)),y:Math.abs(Math.round(t.pageY)-(null!==(a=null===(o=M.current)||void 0===o?void 0:o.y)&&void 0!==a?a:0))}},n=n=>{e.x<=10&&e.y<=10?n.preventDefault():_.contains(n.target)||N(!1),document.removeEventListener("pointermove",t),M.current=null};return null!==M.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",n,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",n,{capture:!0})}}}),[_,N,M]),v.useEffect((()=>{const e=()=>N(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[N]);const[D,B]=Vj((e=>{const t=I().filter((e=>!e.disabled)),n=t.find((e=>e.ref.current===document.activeElement)),r=Uj(t,e,n);r&&setTimeout((()=>r.ref.current.focus()))})),L=v.useCallback(((e,t,n)=>{const r=!P.current&&!n;(void 0!==b.value&&b.value===t||r)&&(A(e),r&&(P.current=!0))}),[b.value]),V=v.useCallback((()=>null==_?void 0:_.focus()),[_]),q=v.useCallback(((e,t,n)=>{const r=!P.current&&!n;(void 0!==b.value&&b.value===t||r)&&C(e)}),[b.value]),F="popper"===r?Hz:_oe,U=F===Hz?{side:s,sideOffset:c,align:l,alignOffset:u,arrowPadding:f,collisionBoundary:d,collisionPadding:p,sticky:h,hideWhenDetached:m,avoidCollisions:y}:{};return v.createElement(Nj,{scope:n,content:_,viewport:k,onViewportChange:x,itemRefCallback:L,selectedItem:E,onItemLeave:V,itemTextRefCallback:q,focusSelectedItem:O,selectedItemText:z,position:r,isPositioned:T,searchRef:D},v.createElement(rk,{as:hm,allowPinchZoom:!0},v.createElement(iA,{asChild:!0,trapped:b.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:lt(a,(e=>{var t;null===(t=b.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},v.createElement(tk,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>b.onOpenChange(!1)},v.createElement(F,Le({role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:e=>e.preventDefault()},g,U,{onPlaced:()=>R(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...g.style},onKeyDown:lt(g.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),!t&&1===e.key.length&&B(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=I().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((()=>j(t))),e.preventDefault()}}))}))))))})),_oe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,onPlaced:r,...a}=e,o=Om(A1,n),i=zm(A1,n),[s,c]=v.useState(null),[l,u]=v.useState(null),f=yn(t,(e=>u(e))),d=Ak(n),p=v.useRef(!1),h=v.useRef(!0),{viewport:m,selectedItem:y,selectedItemText:g,focusSelectedItem:b}=i,_=v.useCallback((()=>{if(o.trigger&&o.valueNode&&s&&l&&m&&y&&g){const e=o.trigger.getBoundingClientRect(),t=l.getBoundingClientRect(),n=o.valueNode.getBoundingClientRect(),a=g.getBoundingClientRect();if("rtl"!==o.dir){const r=a.left-t.left,o=n.left-r,i=e.left-o,c=e.width+i,l=Math.max(c,t.width),u=window.innerWidth-su,f=Wz(o,[su,u-l]);s.style.minWidth=c+"px",s.style.left=f+"px"}else{const r=t.right-a.right,o=window.innerWidth-n.right-r,i=window.innerWidth-e.right-o,c=e.width+i,l=Math.max(c,t.width),u=window.innerWidth-su,f=Wz(o,[su,u-l]);s.style.minWidth=c+"px",s.style.right=f+"px"}const i=d(),c=window.innerHeight-2*su,u=m.scrollHeight,f=window.getComputedStyle(l),h=parseInt(f.borderTopWidth,10),v=parseInt(f.paddingTop,10),b=parseInt(f.borderBottomWidth,10),_=h+v+u+parseInt(f.paddingBottom,10)+b,w=Math.min(5*y.offsetHeight,_),k=window.getComputedStyle(m),x=parseInt(k.paddingTop,10),S=parseInt(k.paddingBottom,10),E=e.top+e.height/2-su,A=c-E,z=y.offsetHeight/2,C=h+v+(y.offsetTop+z),I=_-C;if(C<=E){const e=y===i[i.length-1].ref.current;s.style.bottom="0px";const t=l.clientHeight-m.offsetTop-m.offsetHeight,n=C+Math.max(A,z+(e?S:0)+t+b);s.style.height=n+"px"}else{const e=y===i[0].ref.current;s.style.top="0px";const t=Math.max(E,h+m.offsetTop+(e?x:0)+z)+I;s.style.height=t+"px",m.scrollTop=C-E+m.offsetTop}s.style.margin=`${su}px 0`,s.style.minHeight=w+"px",s.style.maxHeight=c+"px",null==r||r(),requestAnimationFrame((()=>p.current=!0))}}),[d,o.trigger,o.valueNode,s,l,m,y,g,o.dir,r]);Mo((()=>_()),[_]);const[w,k]=v.useState();Mo((()=>{l&&k(window.getComputedStyle(l).zIndex)}),[l]);const x=v.useCallback((e=>{e&&!0===h.current&&(_(),null==b||b(),h.current=!1)}),[_,b]);return v.createElement(voe,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:p,onScrollButtonChange:x},v.createElement("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:w}},v.createElement(St.div,Le({},a,{ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...a.style}}))))})),Hz=v.forwardRef(((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:a=su,...o}=e,i=dT(n);return v.createElement(JA,Le({},i,o,{ref:t,align:r,collisionPadding:a,style:{boxSizing:"border-box",...o.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)"}}))})),[voe,pT]=Z1(A1,{}),Gz="SelectViewport",boe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=zm(Gz,n),o=pT(Gz,n),i=yn(t,a.onViewportChange),s=v.useRef(0);return v.createElement(v.Fragment,null,v.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}"}}),v.createElement(Rk.Slot,{scope:n},v.createElement(St.div,Le({"data-radix-select-viewport":"",role:"presentation"},r,{ref:i,style:{position:"relative",flex:1,overflow:"auto",...r.style},onScroll:lt(r.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:n,shouldExpandOnScrollRef:r}=o;if(null!=r&&r.current&&n){const e=Math.abs(s.current-t.scrollTop);if(e>0){const r=window.innerHeight-2*su,a=parseFloat(n.style.minHeight),o=parseFloat(n.style.height),i=Math.max(a,o);if(i<r){const a=i+e,o=Math.min(r,a),s=a-o;n.style.height=o+"px","0px"===n.style.bottom&&(t.scrollTop=s>0?s:0,n.style.justifyContent="flex-end")}}}s.current=t.scrollTop}))}))))})),woe="SelectGroup",[koe,xoe]=Z1(woe),Soe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=mp();return v.createElement(koe,{scope:n,id:a},v.createElement(St.div,Le({role:"group","aria-labelledby":a},r,{ref:t})))})),Eoe="SelectLabel",Coe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e,a=xoe(Eoe,n);return v.createElement(St.div,Le({id:a.id},r,{ref:t}))})),jC="SelectItem",[Roe,Lj]=Z1(jC),Aoe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,value:r,disabled:a=!1,textValue:o,...i}=e,s=Om(jC,n),c=zm(jC,n),l=s.value===r,[u,f]=v.useState(o??""),[d,p]=v.useState(!1),h=yn(t,(e=>{var t;return null===(t=c.itemRefCallback)||void 0===t?void 0:t.call(c,e,r,a)})),m=mp(),y=()=>{a||(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 v.createElement(Roe,{scope:n,value:r,disabled:a,textId:m,isSelected:l,onItemTextChange:v.useCallback((e=>{f((t=>{var n;return t||(null!==(n=null==e?void 0:e.textContent)&&void 0!==n?n:"").trim()}))}),[])},v.createElement(Rk.ItemSlot,{scope:n,value:r,disabled:a,textValue:u},v.createElement(St.div,Le({role:"option","aria-labelledby":m,"data-highlighted":d?"":void 0,"aria-selected":l&&d,"data-state":l?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1},i,{ref:h,onFocus:lt(i.onFocus,(()=>p(!0))),onBlur:lt(i.onBlur,(()=>p(!1))),onPointerUp:lt(i.onPointerUp,y),onPointerMove:lt(i.onPointerMove,(e=>{var t;a?null===(t=c.onItemLeave)||void 0===t||t.call(c):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:lt(i.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=c.onItemLeave)||void 0===t||t.call(c))})),onKeyDown:lt(i.onKeyDown,(e=>{var t;""!==(null===(t=c.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(aoe.includes(e.key)&&y()," "===e.key&&e.preventDefault())}))}))))})),ib="SelectItemText",Toe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,className:r,style:a,...o}=e,i=Om(ib,n),s=zm(ib,n),c=Lj(ib,n),l=coe(ib,n),[u,f]=v.useState(null),d=yn(t,(e=>f(e)),c.onItemTextChange,(e=>{var t;return null===(t=s.itemTextRefCallback)||void 0===t?void 0:t.call(s,e,c.value,c.disabled)})),p=null==u?void 0:u.textContent,h=v.useMemo((()=>v.createElement("option",{key:c.value,value:c.value,disabled:c.disabled},p)),[c.disabled,c.value,p]),{onNativeOptionAdd:m,onNativeOptionRemove:y}=l;return Mo((()=>(m(h),()=>y(h))),[m,y,h]),v.createElement(v.Fragment,null,v.createElement(St.span,Le({id:c.textId},o,{ref:d})),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Zl.createPortal(o.children,i.valueNode):null)})),Ioe="SelectItemIndicator",Poe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return Lj(Ioe,n).isSelected?v.createElement(St.span,Le({"aria-hidden":!0},r,{ref:t})):null})),Kz="SelectScrollUpButton",$oe=v.forwardRef(((e,t)=>{const n=zm(Kz,e.__scopeSelect),r=pT(Kz,e.__scopeSelect),[a,o]=v.useState(!1),i=yn(t,r.onScrollButtonChange);return Mo((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollTop>0;o(e)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?v.createElement(jj,Le({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),Qz="SelectScrollDownButton",Ooe=v.forwardRef(((e,t)=>{const n=zm(Qz,e.__scopeSelect),r=pT(Qz,e.__scopeSelect),[a,o]=v.useState(!1),i=yn(t,r.onScrollButtonChange);return Mo((()=>{if(n.viewport&&n.isPositioned){let e=function(){const e=t.scrollHeight-t.clientHeight,n=Math.ceil(t.scrollTop)<e;o(n)};const t=n.viewport;return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[n.viewport,n.isPositioned]),a?v.createElement(jj,Le({},e,{ref:i,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=n;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),jj=v.forwardRef(((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...a}=e,o=zm("SelectScrollButton",n),i=v.useRef(null),s=Ak(n),c=v.useCallback((()=>{null!==i.current&&(window.clearInterval(i.current),i.current=null)}),[]);return v.useEffect((()=>()=>c()),[c]),Mo((()=>{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]),v.createElement(St.div,Le({"aria-hidden":!0},a,{ref:t,style:{flexShrink:0,...a.style},onPointerDown:lt(a.onPointerDown,(()=>{null===i.current&&(i.current=window.setInterval(r,50))})),onPointerMove:lt(a.onPointerMove,(()=>{var e;null===(e=o.onItemLeave)||void 0===e||e.call(o),null===i.current&&(i.current=window.setInterval(r,50))})),onPointerLeave:lt(a.onPointerLeave,(()=>{c()}))}))})),zoe=v.forwardRef(((e,t)=>{const{__scopeSelect:n,...r}=e;return v.createElement(St.div,Le({"aria-hidden":!0},r,{ref:t}))}));function Fj(e){return""===e||void 0===e}const Bj=v.forwardRef(((e,t)=>{const{value:n,...r}=e,a=v.useRef(null),o=yn(t,a),i=yk(n);return v.useEffect((()=>{const e=a.current,t=window.HTMLSelectElement.prototype,r=Object.getOwnPropertyDescriptor(t,"value").set;if(i!==n&&r){const t=new Event("change",{bubbles:!0});r.call(e,n),e.dispatchEvent(t)}}),[i,n]),v.createElement(Dj,{asChild:!0},v.createElement("select",Le({},r,{ref:o,defaultValue:n})))}));function Vj(e){const t=Fc(e),n=v.useRef(""),r=v.useRef(0),a=v.useCallback((e=>{const a=n.current+e;t(a),function e(t){n.current=t,window.clearTimeout(r.current),""!==t&&(r.current=window.setTimeout((()=>e("")),1e3))}(a)}),[t]),o=v.useCallback((()=>{n.current="",window.clearTimeout(r.current)}),[]);return v.useEffect((()=>()=>window.clearTimeout(r.current)),[]),[n,a,o]}function Uj(e,t,n){const r=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,a=n?e.indexOf(n):-1;let o=Moe(e,Math.max(a,0));1===r.length&&(o=o.filter((e=>e!==n)));const i=o.find((e=>e.textValue.toLowerCase().startsWith(r.toLowerCase())));return i!==n?i:void 0}function Moe(e,t){return e.map(((n,r)=>e[(t+r)%e.length]))}Bj.displayName="BubbleSelect";const qj=loe,Wj=uoe,Hj=poe,Doe=hoe,Noe=moe,Gj=goe,Loe=boe,Kj=Soe,Qj=Coe,Yj=Aoe,joe=Toe,Foe=Poe,Zj=$oe,Xj=Ooe,Jj=zoe,Boe=qj,hT=v.forwardRef((({...e},t)=>B.jsx(Boe,{ref:t,...e})));hT.displayName=qj.displayName;const mT=v.forwardRef(((e,t)=>B.jsx(Kj,{ref:t,...e})));mT.displayName=Kj.displayName;const gT=v.forwardRef(((e,t)=>B.jsx(Hj,{ref:t,...e})));gT.displayName=Hj.displayName;const yT=v.forwardRef((({className:e,children:t,...n},r)=>B.jsxs(Wj,{ref:r,className:$e("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus-visible:ring-1 focus-visible:ring-slate-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 [&>span]:text-left",e),...n,children:[t,B.jsx(Doe,{asChild:!0,children:B.jsx(X8,{className:"h-4 w-4 opacity-50"})})]})));yT.displayName=Wj.displayName;const eF=v.forwardRef((({className:e,...t},n)=>B.jsx(Zj,{ref:n,className:$e("flex cursor-default items-center justify-center py-1",e),...t,children:B.jsx(bG,{className:"h-4 w-4"})})));eF.displayName=Zj.displayName;const tF=v.forwardRef((({className:e,...t},n)=>B.jsx(Xj,{ref:n,className:$e("flex cursor-default items-center justify-center py-1",e),...t,children:B.jsx(X8,{className:"h-4 w-4"})})));tF.displayName=Xj.displayName;const _T=v.forwardRef((({className:e,children:t,position:n="popper",...r},a)=>B.jsx(Noe,{children:B.jsxs(Gj,{ref:a,className:$e("relative z-[150] max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md 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","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:[B.jsx(eF,{}),B.jsx(Loe,{className:$e("p-1","popper"===n&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),B.jsx(tF,{})]})})));_T.displayName=Gj.displayName;const nF=v.forwardRef((({className:e,...t},n)=>B.jsx(Qj,{ref:n,className:$e("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t})));nF.displayName=Qj.displayName;const vT=v.forwardRef((({className:e,showCheck:t=!0,children:n,...r},a)=>B.jsxs(Yj,{ref:a,className:$e("relative flex w-full cursor-default select-none items-center rounded-xs py-1.5 pl-8 pr-2 text-base outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[t&&B.jsx("span",{className:"absolute left-2 flex size-3.5 items-center justify-center",children:B.jsx(Foe,{children:B.jsx(tA,{className:"size-4"})})}),B.jsx(joe,{children:n})]})));vT.displayName=Yj.displayName;const rF=v.forwardRef((({className:e,...t},n)=>B.jsx(Jj,{ref:n,className:$e("-mx-1 my-1 h-px bg-muted",e),...t})));rF.displayName=Jj.displayName;const Voe=v.createContext({}),Mp=()=>{const e=v.useContext(Voe),t=v.useContext(aF),n=Nae();e||console.error("useFormContext must be used within a FormProvider");const{getFieldState:r,formState:a}=n,o=r(e.name,a);if(!e)throw new Error("useFormField should be used within <FormField>");const{id:i}=t;return{id:i,name:e.name,formItemId:`${i}-form-item`,formDescriptionId:`${i}-form-item-description`,formMessageId:`${i}-form-item-message`,...o}},aF=v.createContext({}),Uoe=v.forwardRef((({className:e,...t},n)=>{const r=v.useId();return B.jsx(aF.Provider,{value:{id:r},children:B.jsx("div",{ref:n,className:$e("mt-[8px]",e),...t})})}));Uoe.displayName="FormItem";const qoe=v.forwardRef((({className:e,isRequired:t,...n},r)=>{var a;const{formItemId:o}=Mp();return B.jsx(ST,{ref:r,className:$e("mb-2 text-sm font-medium",e),htmlFor:o,...n,children:t?`*${null==(a=n.children)?void 0:a.toString()}`:n.children})}));qoe.displayName="FormLabel";const Woe=v.forwardRef((({...e},t)=>{const{error:n,formItemId:r,formDescriptionId:a,formMessageId:o}=Mp();return B.jsx(Op,{ref:t,id:r,"aria-describedby":n?`${a} ${o}`:`${a}`,"aria-invalid":!!n,...e})}));Woe.displayName="FormControl";const Hoe=v.forwardRef((({className:e,...t},n)=>{const{formDescriptionId:r}=Mp();return B.jsx("p",{ref:n,id:r,className:$e("text-sm text-muted-foreground",e),...t})}));Hoe.displayName="FormDescription";const Goe=v.forwardRef((({className:e,children:t,...n},r)=>{const{error:a,formMessageId:o}=Mp(),i=a?String(null==a?void 0:a.message):t;return i?B.jsxs("p",{ref:r,id:o,className:$e("flex items-center gap-0.5 pt-1 text-sm font-medium text-destructive",e),...n,children:[B.jsx(UG,{size:16,className:"text-red-dark"})," ",i]}):null}));Goe.displayName="FormMessage";const Koe=v.forwardRef((({...e},t)=>{const{name:n}=Mp();return B.jsx(hT,{ref:t,name:n,...e})}));Koe.displayName="FormSelect";const Qoe=v.forwardRef((({className:e,children:t,...n},r)=>{const{formItemId:a}=Mp();return B.jsx(yT,{ref:r,id:a,className:e,...n,children:t})}));Qoe.displayName="FormSelectTrigger";const Yoe=v.forwardRef(((e,t)=>B.jsx(_T,{ref:t,...e})));Yoe.displayName="FormSelectContent";const Zoe=v.forwardRef(((e,t)=>B.jsx(vT,{ref:t,...e})));Zoe.displayName="FormSelectItem";const Xoe=v.forwardRef(((e,t)=>B.jsx(mT,{ref:t,...e})));Xoe.displayName="FormSelectGroup";const Joe=v.forwardRef(((e,t)=>B.jsx(nF,{ref:t,...e})));Joe.displayName="FormSelectLabel";const eie=v.forwardRef(((e,t)=>B.jsx(rF,{ref:t,...e})));eie.displayName="FormSelectSeparator";const tie=v.forwardRef(((e,t)=>B.jsx(gT,{ref:t,...e})));function cm(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 oF(e,t=[]){let n=[];const r=()=>{const t=n.map((e=>v.createContext(e)));return function(n){const r=(null==n?void 0:n[e])||t;return v.useMemo((()=>({[`__scope${e}`]:{...n,[e]:r}})),[n,r])}};return r.scopeName=e,[function(t,r){const a=v.createContext(r),o=n.length;function i(t){const{scope:n,children:r,...i}=t,s=(null==n?void 0:n[e][o])||a,c=v.useMemo((()=>i),Object.values(i));return v.createElement(s.Provider,{value:c},r)}return n=[...n,r],i.displayName=t+"Provider",[i,function(n,i){const s=(null==i?void 0:i[e][o])||a,c=v.useContext(s);if(c)return c;if(void 0!==r)return r;throw new Error(`\`${n}\` must be used within \`${t}\``)}]},nie(r,...t)]}function nie(...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 v.useMemo((()=>({[`__scope${t.scopeName}`]:r})),[r])}};return n.scopeName=t.scopeName,n}function Tk(e){const t=v.useRef(e);return v.useEffect((()=>{t.current=e})),v.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function rie(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function aie(...e){return t=>e.forEach((e=>rie(e,t)))}function oie(...e){return v.useCallback(aie(...e),e)}function Mm(e){return e.split("-")[0]}function K_(e){return e.split("-")[1]}function X1(e){return["top","bottom"].includes(Mm(e))?"x":"y"}function bT(e){return"y"===e?"height":"width"}function Yz(e,t,n){let{reference:r,floating:a}=e;const o=r.x+r.width/2-a.width/2,i=r.y+r.height/2-a.height/2,s=X1(t),c=bT(s),l=r[c]/2-a[c]/2,u="x"===s;let f;switch(Mm(t)){case"top":f={x:o,y:r.y-a.height};break;case"bottom":f={x:o,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:i};break;case"left":f={x:r.x-a.width,y:i};break;default:f={x:r.x,y:r.y}}switch(K_(t)){case"start":f[s]-=l*(n&&u?-1:1);break;case"end":f[s]+=l*(n&&u?-1:1)}return f}tie.displayName="FormSelectValue";const iie=async(e,t,n)=>{const{placement:r="bottom",strategy:a="absolute",middleware:o=[],platform:i}=n,s=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:a}),{x:l,y:u}=Yz(c,r,s),f=r,d={},p=0;for(let n=0;n<o.length;n++){const{name:h,fn:m}=o[n],{x:y,y:g,data:v,reset:b}=await m({x:l,y:u,initialPlacement:r,placement:f,strategy:a,middlewareData:d,rects:c,platform:i,elements:{reference:e,floating:t}});l=y??l,u=g??u,d={...d,[h]:{...d[h],...v}},b&&p<=50&&(p++,"object"==typeof b&&(b.placement&&(f=b.placement),b.rects&&(c=!0===b.rects?await i.getElementRects({reference:e,floating:t,strategy:a}):b.rects),({x:l,y:u}=Yz(c,f,s))),n=-1)}return{x:l,y:u,placement:f,strategy:a,middlewareData:d}};function iF(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 uw(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function i_(e,t){var n;void 0===t&&(t={});const{x:r,y:a,platform:o,rects:i,elements:s,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:d=!1,padding:p=0}=t,h=iF(p),m=s[d?"floating"===f?"reference":"floating":f],y=uw(await o.getClippingRect({element:null==(n=await(null==o.isElement?void 0:o.isElement(m)))||n?m:m.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(s.floating)),boundary:l,rootBoundary:u,strategy:c})),g=uw(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({rect:"floating"===f?{...i.floating,x:r,y:a}:i.reference,offsetParent:await(null==o.getOffsetParent?void 0:o.getOffsetParent(s.floating)),strategy:c}):i[f]);return{top:y.top-g.top+h.top,bottom:g.bottom-y.bottom+h.bottom,left:y.left-g.left+h.left,right:g.right-y.right+h.right}}const sie=Math.min,Jh=Math.max;function FC(e,t,n){return Jh(e,sie(t,n))}const Zz=e=>({name:"arrow",options:e,async fn(t){const{element:n,padding:r=0}=e??{},{x:a,y:o,placement:i,rects:s,platform:c}=t;if(null==n)return{};const l=iF(r),u={x:a,y:o},f=X1(i),d=K_(i),p=bT(f),h=await c.getDimensions(n),m="y"===f?"top":"left",y="y"===f?"bottom":"right",g=s.reference[p]+s.reference[f]-u[f]-s.floating[p],v=u[f]-s.reference[f],b=await(null==c.getOffsetParent?void 0:c.getOffsetParent(n));let _=b?"y"===f?b.clientHeight||0:b.clientWidth||0:0;0===_&&(_=s.floating[p]);const w=g/2-v/2,k=l[m],x=_-h[p]-l[y],S=_/2-h[p]/2+w,E=FC(k,S,x),A=("start"===d?l[m]:l[y])>0&&S!==E&&s.reference[p]<=s.floating[p];return{[f]:u[f]-(A?S<k?k-S:x-S:0),data:{[f]:E,centerOffset:S-E}}}}),cie={left:"right",right:"left",bottom:"top",top:"bottom"};function dw(e){return e.replace(/left|right|bottom|top/g,(e=>cie[e]))}function lie(e,t,n){void 0===n&&(n=!1);const r=K_(e),a=X1(e),o=bT(a);let i="x"===a?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=dw(i)),{main:i,cross:dw(i)}}const fie={start:"end",end:"start"};function Xz(e){return e.replace(/start|end/g,(e=>fie[e]))}const sF=["top","right","bottom","left"];sF.reduce(((e,t)=>e.concat(t,t+"-start",t+"-end")),[]);const uie=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:a,rects:o,initialPlacement:i,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:f,fallbackStrategy:d="bestFit",flipAlignment:p=!0,...h}=e,m=Mm(r),y=[i,...f||(m!==i&&p?function(e){const t=dw(e);return[Xz(e),t,Xz(t)]}(i):[dw(i)])],g=await i_(t,h),v=[];let b=(null==(n=a.flip)?void 0:n.overflows)||[];if(l&&v.push(g[m]),u){const{main:e,cross:t}=lie(r,o,await(null==s.isRTL?void 0:s.isRTL(c.floating)));v.push(g[e],g[t])}if(b=[...b,{placement:r,overflows:v}],!v.every((e=>e<=0))){var _,w;const e=(null!=(_=null==(w=a.flip)?void 0:w.index)?_:0)+1,t=y[e];if(t)return{data:{index:e,overflows:b},reset:{placement:t}};let n="bottom";switch(d){case"bestFit":{var k;const e=null==(k=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:k[0].placement;e&&(n=e);break}case"initialPlacement":n=i}if(r!==n)return{reset:{placement:n}}}return{}}}};function Jz(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function eM(e){return sF.some((t=>e[t]>=0))}const die=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=Jz(await i_(e,{...n,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:t,referenceHidden:eM(t)}}}case"escaped":{const t=Jz(await i_(e,{...n,altBoundary:!0}),r.floating);return{data:{escapedOffsets:t,escaped:eM(t)}}}default:return{}}}}},pie=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,a=await async function(e,t){const{placement:n,platform:r,elements:a}=e,o=await(null==r.isRTL?void 0:r.isRTL(a.floating)),i=Mm(n),s=K_(n),c="x"===X1(n),l=["left","top"].includes(i)?-1:1,u=o&&c?-1:1,f="function"==typeof t?t(e):t;let{mainAxis:d,crossAxis:p,alignmentAxis:h}="number"==typeof f?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...f};return s&&"number"==typeof h&&(p="end"===s?-1*h:h),c?{x:p*u,y:d*l}:{x:d*l,y:p*u}}(t,e);return{x:n+a.x,y:r+a.y,data:a}}}};function cF(e){return"x"===e?"y":"x"}const hie=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:a}=t,{mainAxis:o=!0,crossAxis:i=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=e,l={x:n,y:r},u=await i_(t,c),f=X1(Mm(a)),d=cF(f);let p=l[f],h=l[d];if(o){const e="y"===f?"bottom":"right";p=FC(p+u["y"===f?"top":"left"],p,p-u[e])}if(i){const e="y"===d?"bottom":"right";h=FC(h+u["y"===d?"top":"left"],h,h-u[e])}const m=s.fn({...t,[f]:p,[d]:h});return{...m,data:{x:m.x-n,y:m.y-r}}}}},mie=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:a,rects:o,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=e,u={x:n,y:r},f=X1(a),d=cF(f);let p=u[f],h=u[d];const m="function"==typeof s?s({...o,placement:a}):s,y="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(c){const e="y"===f?"height":"width",t=o.reference[f]-o.floating[e]+y.mainAxis,n=o.reference[f]+o.reference[e]-y.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){var g,v,b,_;const e="y"===f?"width":"height",t=["top","left"].includes(Mm(a)),n=o.reference[d]-o.floating[e]+(t&&null!=(g=null==(v=i.offset)?void 0:v[d])?g:0)+(t?0:y.crossAxis),r=o.reference[d]+o.reference[e]+(t?0:null!=(b=null==(_=i.offset)?void 0:_[d])?b:0)-(t?y.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},gie=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:a,elements:o}=t,{apply:i,...s}=e,c=await i_(t,s),l=Mm(n),u=K_(n);let f,d;"top"===l||"bottom"===l?(f=l,d=u===(await(null==a.isRTL?void 0:a.isRTL(o.floating))?"start":"end")?"left":"right"):(d=l,f="end"===u?"top":"bottom");const p=Jh(c.left,0),h=Jh(c.right,0),m=Jh(c.top,0),y=Jh(c.bottom,0),g={availableHeight:r.floating.height-(["left","right"].includes(n)?2*(0!==m||0!==y?m+y:Jh(c.top,c.bottom)):c[f]),availableWidth:r.floating.width-(["top","bottom"].includes(n)?2*(0!==p||0!==h?p+h:Jh(c.left,c.right)):c[d])},v=await a.getDimensions(o.floating);null==i||i({...t,...g});const b=await a.getDimensions(o.floating);return v.width!==b.width||v.height!==b.height?{reset:{rects:!0}}:{}}}};function lF(e){return e&&e.document&&e.location&&e.alert&&e.setInterval}function Ru(e){if(null==e)return window;if(!lF(e)){const t=e.ownerDocument;return t&&t.defaultView||window}return e}function Q_(e){return Ru(e).getComputedStyle(e)}function mu(e){return lF(e)?"":e?(e.nodeName||"").toLowerCase():""}function fF(){const e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((e=>e.brand+"/"+e.version)).join(" "):navigator.userAgent}function Wl(e){return e instanceof Ru(e).HTMLElement}function Rp(e){return e instanceof Ru(e).Element}function wT(e){return!(typeof ShadowRoot>"u")&&(e instanceof Ru(e).ShadowRoot||e instanceof ShadowRoot)}function Ik(e){const{overflow:t,overflowX:n,overflowY:r}=Q_(e);return/auto|scroll|overlay|hidden/.test(t+r+n)}function yie(e){return["table","td","th"].includes(mu(e))}function tM(e){const t=/firefox/i.test(fF()),n=Q_(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 uF(){return!/^((?!chrome|android).)*safari/i.test(fF())}const nM=Math.min,Oy=Math.max,pw=Math.round;function gu(e,t,n){var r,a,o,i;void 0===t&&(t=!1),void 0===n&&(n=!1);const s=e.getBoundingClientRect();let c=1,l=1;t&&Wl(e)&&(c=e.offsetWidth>0&&pw(s.width)/e.offsetWidth||1,l=e.offsetHeight>0&&pw(s.height)/e.offsetHeight||1);const u=Rp(e)?Ru(e):window,f=!uF()&&n,d=(s.left+(f&&null!=(r=null==(a=u.visualViewport)?void 0:a.offsetLeft)?r:0))/c,p=(s.top+(f&&null!=(o=null==(i=u.visualViewport)?void 0:i.offsetTop)?o:0))/l,h=s.width/c,m=s.height/l;return{width:h,height:m,top:p,right:d+h,bottom:p+m,left:d,x:d,y:p}}function yp(e){return(t=e,(t instanceof Ru(t).Node?e.ownerDocument:e.document)||window.document).documentElement;var t}function Pk(e){return Rp(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function dF(e){return gu(yp(e)).left+Pk(e).scrollLeft}function _ie(e,t,n){const r=Wl(t),a=yp(t),o=gu(e,r&&function(e){const t=gu(e);return pw(t.width)!==e.offsetWidth||pw(t.height)!==e.offsetHeight}(t),"fixed"===n);let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if(r||!r&&"fixed"!==n)if(("body"!==mu(t)||Ik(a))&&(i=Pk(t)),Wl(t)){const e=gu(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else a&&(s.x=dF(a));return{x:o.left+i.scrollLeft-s.x,y:o.top+i.scrollTop-s.y,width:o.width,height:o.height}}function pF(e){return"html"===mu(e)?e:e.assignedSlot||e.parentNode||(wT(e)?e.host:null)||yp(e)}function rM(e){return Wl(e)&&"fixed"!==getComputedStyle(e).position?e.offsetParent:null}function BC(e){const t=Ru(e);let n=rM(e);for(;n&&yie(n)&&"static"===getComputedStyle(n).position;)n=rM(n);return n&&("html"===mu(n)||"body"===mu(n)&&"static"===getComputedStyle(n).position&&!tM(n))?t:n||function(e){let t=pF(e);for(wT(t)&&(t=t.host);Wl(t)&&!["html","body"].includes(mu(t));){if(tM(t))return t;t=t.parentNode}return null}(e)||t}function aM(e){if(Wl(e))return{width:e.offsetWidth,height:e.offsetHeight};const t=gu(e);return{width:t.width,height:t.height}}function hF(e){const t=pF(e);return["html","body","#document"].includes(mu(t))?e.ownerDocument.body:Wl(t)&&Ik(t)?t:hF(t)}function hw(e,t){var n;void 0===t&&(t=[]);const r=hF(e),a=r===(null==(n=e.ownerDocument)?void 0:n.body),o=Ru(r),i=a?[o].concat(o.visualViewport||[],Ik(r)?r:[]):r,s=t.concat(i);return a?s:s.concat(hw(i))}function oM(e,t,n){return"viewport"===t?uw(function(e,t){const n=Ru(e),r=yp(e),a=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,s=0,c=0;if(a){o=a.width,i=a.height;const e=uF();(e||!e&&"fixed"===t)&&(s=a.offsetLeft,c=a.offsetTop)}return{width:o,height:i,x:s,y:c}}(e,n)):Rp(t)?function(e,t){const n=gu(e,!1,"fixed"===t),r=n.top+e.clientTop,a=n.left+e.clientLeft;return{top:r,left:a,x:a,y:r,right:a+e.clientWidth,bottom:r+e.clientHeight,width:e.clientWidth,height:e.clientHeight}}(t,n):uw(function(e){var t;const n=yp(e),r=Pk(e),a=null==(t=e.ownerDocument)?void 0:t.body,o=Oy(n.scrollWidth,n.clientWidth,a?a.scrollWidth:0,a?a.clientWidth:0),i=Oy(n.scrollHeight,n.clientHeight,a?a.scrollHeight:0,a?a.clientHeight:0);let s=-r.scrollLeft+dF(e);const c=-r.scrollTop;return"rtl"===Q_(a||n).direction&&(s+=Oy(n.clientWidth,a?a.clientWidth:0)-o),{width:o,height:i,x:s,y:c}}(yp(e)))}function vie(e){const t=hw(e),n=["absolute","fixed"].includes(Q_(e).position)&&Wl(e)?BC(e):e;return Rp(n)?t.filter((e=>Rp(e)&&function(e,t){const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&wT(n)){let n=t;do{if(n&&e===n)return!0;n=n.parentNode||n.host}while(n)}return!1}(e,n)&&"body"!==mu(e))):[]}const bie={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:a}=e;const o=[..."clippingAncestors"===n?vie(t):[].concat(n),r],i=o[0],s=o.reduce(((e,n)=>{const r=oM(t,n,a);return e.top=Oy(r.top,e.top),e.right=nM(r.right,e.right),e.bottom=nM(r.bottom,e.bottom),e.left=Oy(r.left,e.left),e}),oM(t,i,a));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 a=Wl(n),o=yp(n);if(n===o)return t;let i={scrollLeft:0,scrollTop:0};const s={x:0,y:0};if((a||!a&&"fixed"!==r)&&(("body"!==mu(n)||Ik(o))&&(i=Pk(n)),Wl(n))){const e=gu(n,!0);s.x=e.x+n.clientLeft,s.y=e.y+n.clientTop}return{...t,x:t.x-i.scrollLeft+s.x,y:t.y-i.scrollTop+s.y}},isElement:Rp,getDimensions:aM,getOffsetParent:BC,getDocumentElement:yp,getElementRects:e=>{let{reference:t,floating:n,strategy:r}=e;return{reference:_ie(t,BC(n),r),floating:{...aM(n),x:0,y:0}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>"rtl"===Q_(e).direction};function wie(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:a=!0,ancestorResize:o=!0,elementResize:i=!0,animationFrame:s=!1}=r,c=a&&!s,l=o&&!s,u=c||l?[...Rp(e)?hw(e):[],...hw(t)]:[];u.forEach((e=>{c&&e.addEventListener("scroll",n,{passive:!0}),l&&e.addEventListener("resize",n)}));let f,d=null;if(i){let r=!0;d=new ResizeObserver((()=>{r||n(),r=!1})),Rp(e)&&!s&&d.observe(e),d.observe(t)}let p=s?gu(e):null;return s&&function t(){const r=gu(e);!p||r.x===p.x&&r.y===p.y&&r.width===p.width&&r.height===p.height||n(),p=r,f=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{c&&e.removeEventListener("scroll",n),l&&e.removeEventListener("resize",n)})),null==(e=d)||e.disconnect(),d=null,s&&cancelAnimationFrame(f)}}const kie=(e,t,n)=>iie(e,t,{platform:bie,...n});var VC=typeof document<"u"?v.useLayoutEffect:v.useEffect;function UC(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,a;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(!UC(e[r],t[r]))return!1;return!0}if(a=Object.keys(e),n=a.length,n!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!Object.prototype.hasOwnProperty.call(t,a[r]))return!1;for(r=n;0!=r--;){const n=a[r];if(!("_owner"===n&&e.$$typeof||UC(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function xie(e){const t=v.useRef(e);return VC((()=>{t.current=e})),t}function Sie(e){let{middleware:t,placement:n="bottom",strategy:r="absolute",whileElementsMounted:a}=void 0===e?{}:e;const o=v.useRef(null),i=v.useRef(null),s=xie(a),c=v.useRef(null),[l,u]=v.useState({x:null,y:null,strategy:r,placement:n,middlewareData:{}}),[f,d]=v.useState(t);UC(null==f?void 0:f.map((e=>{let{options:t}=e;return t})),null==t?void 0:t.map((e=>{let{options:t}=e;return t})))||d(t);const p=v.useCallback((()=>{!o.current||!i.current||kie(o.current,i.current,{middleware:f,placement:n,strategy:r}).then((e=>{h.current&&Zl.flushSync((()=>{u(e)}))}))}),[f,n,r]);VC((()=>{h.current&&p()}),[p]);const h=v.useRef(!1);VC((()=>(h.current=!0,()=>{h.current=!1})),[]);const m=v.useCallback((()=>{if("function"==typeof c.current&&(c.current(),c.current=null),o.current&&i.current)if(s.current){const e=s.current(o.current,i.current,p);c.current=e}else p()}),[p,s]),y=v.useCallback((e=>{o.current=e,m()}),[m]),g=v.useCallback((e=>{i.current=e,m()}),[m]),b=v.useMemo((()=>({reference:o,floating:i})),[]);return v.useMemo((()=>({...l,update:p,refs:b,reference:y,floating:g})),[l,p,b,y,g])}const Eie=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?Zz({element:t.current,padding:n}).fn(e):{}:t?Zz({element:t,padding:n}).fn(e):{}}};function Cie(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Rie(...e){return t=>e.forEach((e=>Cie(e,t)))}const mF=v.forwardRef(((e,t)=>{const{children:n,...r}=e,a=v.Children.toArray(n),o=a.find(Tie);if(o){const e=o.props.children,n=a.map((t=>t===o?v.Children.count(e)>1?v.Children.only(null):v.isValidElement(e)?e.props.children:null:t));return v.createElement(qC,Le({},r,{ref:t}),v.isValidElement(e)?v.cloneElement(e,void 0,n):null)}return v.createElement(qC,Le({},r,{ref:t}),n)}));mF.displayName="Slot";const qC=v.forwardRef(((e,t)=>{const{children:n,...r}=e;return v.isValidElement(n)?v.cloneElement(n,{...Iie(r,n.props),ref:Rie(t,n.ref)}):v.Children.count(n)>1?v.Children.only(null):null}));qC.displayName="SlotClone";const Aie=({children:e})=>v.createElement(v.Fragment,null,e);function Tie(e){return v.isValidElement(e)&&e.type===Aie}function Iie(e,t){const n={...t};for(const r in t){const a=e[r],o=t[r];/^on[A-Z]/.test(r)?a&&o?n[r]=(...e)=>{o(...e),a(...e)}:a&&(n[r]=a):"style"===r?n[r]={...a,...o}:"className"===r&&(n[r]=[a,o].filter(Boolean).join(" "))}return{...e,...n}}const Pie=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"],WC=Pie.reduce(((e,t)=>{const n=v.forwardRef(((e,n)=>{const{asChild:r,...a}=e,o=r?mF:t;return v.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),v.createElement(o,Le({},a,{ref:n}))}));return n.displayName=`Primitive.${t}`,{...e,[t]:n}}),{});function $ie(e,t){e&&Zl.flushSync((()=>e.dispatchEvent(t)))}function Oie(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function zie(...e){return t=>e.forEach((e=>Oie(e,t)))}function Mie(...e){return v.useCallback(zie(...e),e)}const am=null!=globalThis&&globalThis.document?v.useLayoutEffect:()=>{};function Die(e){const[t,n]=v.useState(void 0);return am((()=>{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 a,o;if("borderBoxSize"in r){const e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;a=t.inlineSize,o=t.blockSize}else a=e.offsetWidth,o=e.offsetHeight;n({width:a,height:o})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}n(void 0)}),[e]),t}const gF="Popper",[kT,yF]=oF(gF),[XWe,Nie]=kT(gF),mw="PopperContent",[Lie,JWe]=kT(mw),[jie,Fie]=kT(mw,{hasParent:!1,positionUpdateFns:new Set}),Bie=v.forwardRef(((e,t)=>{var n,r,a,o,i,s,c,l;const{__scopePopper:u,side:f="bottom",sideOffset:d=0,align:p="center",alignOffset:h=0,arrowPadding:m=0,collisionBoundary:y=[],collisionPadding:g=0,sticky:b="partial",hideWhenDetached:_=!1,avoidCollisions:w=!0,onPlaced:k,...x}=e,S=Nie(mw,u),[E,A]=v.useState(null),z=Mie(t,(e=>A(e))),[C,I]=v.useState(null),T=Die(C),R=null!==(n=null==T?void 0:T.width)&&void 0!==n?n:0,P=null!==(r=null==T?void 0:T.height)&&void 0!==r?r:0,j=f+("center"!==p?"-"+p:""),O="number"==typeof g?g:{top:0,right:0,bottom:0,left:0,...g},N=Array.isArray(y)?y:[y],M=N.length>0,D={padding:O,boundary:N.filter(Uie),altBoundary:M},{reference:B,floating:L,strategy:V,x:q,y:F,placement:U,middlewareData:$,update:W}=Sie({strategy:"fixed",placement:j,whileElementsMounted:wie,middleware:[qie(),pie({mainAxis:d+P,alignmentAxis:h}),w?hie({mainAxis:!0,crossAxis:!1,limiter:"partial"===b?mie():void 0,...D}):void 0,C?Eie({element:C,padding:m}):void 0,w?uie({...D}):void 0,gie({...D,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`)}}),Wie({arrowWidth:R,arrowHeight:P}),_?die({strategy:"referenceHidden"}):void 0].filter(Vie)});am((()=>{B(S.anchor)}),[B,S.anchor]);const H=null!==q&&null!==F,[G,Q]=_F(U),K=Tk(k);am((()=>{H&&(null==K||K())}),[H,K]);const Y=null===(a=$.arrow)||void 0===a?void 0:a.x,Z=null===(o=$.arrow)||void 0===o?void 0:o.y,X=0!==(null===(i=$.arrow)||void 0===i?void 0:i.centerOffset),[J,ee]=v.useState();am((()=>{E&&ee(window.getComputedStyle(E).zIndex)}),[E]);const{hasParent:te,positionUpdateFns:ne}=Fie(mw,u),re=!te;v.useLayoutEffect((()=>{if(!re)return ne.add(W),()=>{ne.delete(W)}}),[re,ne,W]),am((()=>{re&&H&&Array.from(ne).reverse().forEach((e=>requestAnimationFrame(e)))}),[re,H,ne]);const ae={"data-side":G,"data-align":Q,...x,ref:z,style:{...x.style,animation:H?void 0:"none",opacity:null!==(s=$.hide)&&void 0!==s&&s.referenceHidden?0:void 0}};return v.createElement("div",{ref:L,"data-radix-popper-content-wrapper":"",style:{position:V,left:0,top:0,transform:H?`translate3d(${Math.round(q)}px, ${Math.round(F)}px, 0)`:"translate3d(0, -200%, 0)",minWidth:"max-content",zIndex:J,"--radix-popper-transform-origin":[null===(c=$.transformOrigin)||void 0===c?void 0:c.x,null===(l=$.transformOrigin)||void 0===l?void 0:l.y].join(" ")},dir:e.dir},v.createElement(Lie,{scope:u,placedSide:G,onArrowChange:I,arrowX:Y,arrowY:Z,shouldHideArrow:X},re?v.createElement(jie,{scope:u,hasParent:!0,positionUpdateFns:ne},v.createElement(WC.div,ae)):v.createElement(WC.div,ae)))}));function Vie(e){return void 0!==e}function Uie(e){return null!==e}const qie=()=>({name:"anchorCssProperties",fn(e){const{rects:t,elements:n}=e,{width:r,height:a}=t.reference;return n.floating.style.setProperty("--radix-popper-anchor-width",`${r}px`),n.floating.style.setProperty("--radix-popper-anchor-height",`${a}px`),{}}}),Wie=e=>({name:"transformOrigin",options:e,fn(t){var n,r,a,o,i;const{placement:s,rects:c,middlewareData:l}=t,u=0!==(null===(n=l.arrow)||void 0===n?void 0:n.centerOffset),f=u?0:e.arrowWidth,d=u?0:e.arrowHeight,[p,h]=_F(s),m={start:"0%",center:"50%",end:"100%"}[h],y=(null!==(r=null===(a=l.arrow)||void 0===a?void 0:a.x)&&void 0!==r?r:0)+f/2,g=(null!==(o=null===(i=l.arrow)||void 0===i?void 0:i.y)&&void 0!==o?o:0)+d/2;let v="",b="";return"bottom"===p?(v=u?m:`${y}px`,b=-d+"px"):"top"===p?(v=u?m:`${y}px`,b=`${c.floating.height+d}px`):"right"===p?(v=-d+"px",b=u?m:`${g}px`):"left"===p&&(v=`${c.floating.width+d}px`,b=u?m:`${g}px`),{data:{x:v,y:b}}}});function _F(e){const[t,n="center"]=e.split("-");return[t,n]}const Hie=Bie;function Gie(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Kie(...e){return t=>e.forEach((e=>Gie(e,t)))}function Qie(...e){return v.useCallback(Kie(...e),e)}function Yie(e,t){return v.useReducer(((e,n)=>t[e][n]??e),e)}const vF=e=>{const{present:t,children:n}=e,r=Zie(t),a="function"==typeof n?n({present:r.isPresent}):v.Children.only(n),o=Qie(r.ref,a.ref);return"function"==typeof n||r.isPresent?v.cloneElement(a,{ref:o}):null};function Zie(e){const[t,n]=v.useState(),r=v.useRef({}),a=v.useRef(e),o=v.useRef("none"),i=e?"mounted":"unmounted",[s,c]=Yie(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect((()=>{const e=sb(r.current);o.current="mounted"===s?e:"none"}),[s]),am((()=>{const t=r.current,n=a.current;if(n!==e){const r=o.current,i=sb(t);e?c("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?c("UNMOUNT"):c(n&&r!==i?"ANIMATION_OUT":"UNMOUNT"),a.current=e}}),[e,c]),am((()=>{if(t){const e=e=>{const n=sb(r.current).includes(e.animationName);e.target===t&&n&&Zl.flushSync((()=>c("ANIMATION_END")))},n=e=>{e.target===t&&(o.current=sb(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)}}c("ANIMATION_END")}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:v.useCallback((e=>{e&&(r.current=getComputedStyle(e)),n(e)}),[])}}function sb(e){return(null==e?void 0:e.animationName)||"none"}function Xie(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}function Jie(...e){return t=>e.forEach((e=>Xie(e,t)))}function ese(...e){return v.useCallback(Jie(...e),e)}function tse(e,t=(null==globalThis?void 0:globalThis.document)){const n=Tk(e);v.useEffect((()=>{const e=e=>{"Escape"===e.key&&n(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[n,t])}vF.displayName="Presence";const HC="dismissableLayer.update",nse="dismissableLayer.pointerDownOutside",rse="dismissableLayer.focusOutside";let iM;const ase=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ose=v.forwardRef(((e,t)=>{var n;const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:a,onPointerDownOutside:o,onFocusOutside:i,onInteractOutside:s,onDismiss:c,...l}=e,u=v.useContext(ase),[f,d]=v.useState(null),p=null!==(n=null==f?void 0:f.ownerDocument)&&void 0!==n?n:null==globalThis?void 0:globalThis.document,[,h]=v.useState({}),m=ese(t,(e=>d(e))),y=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=y.indexOf(g),_=f?y.indexOf(f):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,k=_>=b,x=ise((e=>{const t=e.target,n=[...u.branches].some((e=>e.contains(t)));!k||n||(null==o||o(e),null==s||s(e),e.defaultPrevented||null==c||c())}),p),S=sse((e=>{const t=e.target;[...u.branches].some((e=>e.contains(t)))||(null==i||i(e),null==s||s(e),e.defaultPrevented||null==c||c())}),p);return tse((e=>{_===u.layers.size-1&&(null==a||a(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))}),p),v.useEffect((()=>{if(f)return r&&(0===u.layersWithOutsidePointerEventsDisabled.size&&(iM=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),sM(),()=>{r&&1===u.layersWithOutsidePointerEventsDisabled.size&&(p.body.style.pointerEvents=iM)}}),[f,p,r,u]),v.useEffect((()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),sM())}),[f,u]),v.useEffect((()=>{const e=()=>h({});return document.addEventListener(HC,e),()=>document.removeEventListener(HC,e)}),[]),v.createElement(WC.div,Le({},l,{ref:m,style:{pointerEvents:w?k?"auto":"none":void 0,...e.style},onFocusCapture:cm(e.onFocusCapture,S.onFocusCapture),onBlurCapture:cm(e.onBlurCapture,S.onBlurCapture),onPointerDownCapture:cm(e.onPointerDownCapture,x.onPointerDownCapture)}))}));function ise(e,t=(null==globalThis?void 0:globalThis.document)){const n=Tk(e),r=v.useRef(!1),a=v.useRef((()=>{}));return v.useEffect((()=>{const e=e=>{if(e.target&&!r.current){let r=function(){bF(nse,n,o,{discrete:!0})};const o={originalEvent:e};"touch"===e.pointerType?(t.removeEventListener("click",a.current),a.current=r,t.addEventListener("click",a.current,{once:!0})):r()}r.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",a.current)}}),[t,n]),{onPointerDownCapture:()=>r.current=!0}}function sse(e,t=(null==globalThis?void 0:globalThis.document)){const n=Tk(e),r=v.useRef(!1);return v.useEffect((()=>{const e=e=>{e.target&&!r.current&&bF(rse,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 sM(){const e=new CustomEvent(HC);document.dispatchEvent(e)}function bF(e,t,n,{discrete:r}){const a=n.originalEvent.target,o=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&a.addEventListener(e,t,{once:!0}),r?$ie(a,o):a.dispatchEvent(o)}let WE;const wF="HoverCard",[kF,eHe]=oF(wF,[yF]),cse=yF(),[tHe,xF]=kF(wF),lse="HoverCardPortal",[nHe,fse]=kF(lse,{forceMount:void 0}),GC="HoverCardContent",use=v.forwardRef(((e,t)=>{const n=fse(GC,e.__scopeHoverCard),{forceMount:r=n.forceMount,...a}=e,o=xF(GC,e.__scopeHoverCard);return v.createElement(vF,{present:r||o.open},v.createElement(dse,Le({"data-state":o.open?"open":"closed"},a,{onPointerEnter:cm(e.onPointerEnter,cM(o.onOpen)),onPointerLeave:cm(e.onPointerLeave,cM(o.onClose)),ref:t})))})),dse=v.forwardRef(((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:i,...s}=e,c=xF(GC,n),l=cse(n),u=v.useRef(null),f=oie(t,u),[d,p]=v.useState(!1);return v.useEffect((()=>{if(d){const e=document.body;return WE=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=WE,e.style.webkitUserSelect=WE}}}),[d]),v.useEffect((()=>{if(u.current){const e=()=>{p(!1),c.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(c.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!1}}}),[c.isPointerDownOnContentRef,c.hasSelectionRef]),v.useEffect((()=>{u.current&&pse(u.current).forEach((e=>e.setAttribute("tabindex","-1")))})),v.createElement(ose,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:a,onFocusOutside:cm(o,(e=>{e.preventDefault()})),onDismiss:c.onDismiss},v.createElement(Hie,Le({},l,s,{onPointerDown:cm(s.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&p(!0),c.hasSelectionRef.current=!1,c.isPointerDownOnContentRef.current=!0})),ref:f,style:{...s.style,userSelect:d?"text":void 0,WebkitUserSelect:d?"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 cM(e){return t=>"touch"===t.pointerType?void 0:e()}function pse(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 SF=use,hse=v.forwardRef((({className:e,align:t="center",sideOffset:n=4,...r},a)=>B.jsx(SF,{ref:a,align:t,sideOffset:n,className:$e("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})));hse.displayName=SF.displayName;const xT=v.forwardRef((({className:e,type:t,...n},r)=>{const{error:a}=Mp();return B.jsx("input",{type:t,className:$e("flex h-9 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-base placeholder:text-muted-foreground placeholder:text-slate-400 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-slate-700 focus-visible:ring-offset-1 disabled:cursor-not-allowed disabled:opacity-50",{"border-red-dark focus-visible:border-input focus-visible:ring-red-dark":!!a},e),ref:r,...n})}));xT.displayName="Input";const mse=v.forwardRef(((e,t)=>v.createElement(St.label,Le({},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()}})))),EF=mse,gse=Yl("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ST=v.forwardRef((({className:e,...t},n)=>B.jsx(EF,{ref:n,className:$e(gse(),e),...t})));ST.displayName=EF.displayName;const CF="Radio",[yse,RF]=ii(CF),[_se,vse]=yse(CF),bse=v.forwardRef(((e,t)=>{const{__scopeRadio:n,name:r,checked:a=!1,required:o,disabled:i,value:s="on",onCheck:c,...l}=e,[u,f]=v.useState(null),d=yn(t,(e=>f(e))),p=v.useRef(!1),h=!u||!!u.closest("form");return v.createElement(_se,{scope:n,checked:a,disabled:i},v.createElement(St.button,Le({type:"button",role:"radio","aria-checked":a,"data-state":AF(a),"data-disabled":i?"":void 0,disabled:i,value:s},l,{ref:d,onClick:lt(e.onClick,(e=>{a||null==c||c(),h&&(p.current=e.isPropagationStopped(),p.current||e.stopPropagation())}))})),h&&v.createElement(xse,{control:u,bubbles:!p.current,name:r,value:s,checked:a,required:o,disabled:i,style:{transform:"translateX(-100%)"}}))})),wse="RadioIndicator",kse=v.forwardRef(((e,t)=>{const{__scopeRadio:n,forceMount:r,...a}=e,o=vse(wse,n);return v.createElement(Ws,{present:r||o.checked},v.createElement(St.span,Le({"data-state":AF(o.checked),"data-disabled":o.disabled?"":void 0},a,{ref:t})))})),xse=e=>{const{control:t,checked:n,bubbles:r=!0,...a}=e,o=v.useRef(null),i=yk(n),s=_k(t);return v.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&a){const t=new Event("click",{bubbles:r});a.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),v.createElement("input",Le({type:"radio","aria-hidden":!0,defaultChecked:n},a,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function AF(e){return e?"checked":"unchecked"}const Sse=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],TF="RadioGroup",[Ese,rHe]=ii(TF,[Y1,RF]),IF=Y1(),PF=RF(),[Cse,Rse]=Ese(TF),Ase=v.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:a,value:o,required:i=!1,disabled:s=!1,orientation:c,dir:l,loop:u=!0,onValueChange:f,...d}=e,p=IF(n),h=WA(l),[m,y]=kp({prop:o,defaultProp:a,onChange:f});return v.createElement(Cse,{scope:n,name:r,required:i,disabled:s,value:m,onValueChange:y},v.createElement(tT,Le({asChild:!0},p,{orientation:c,dir:h,loop:u}),v.createElement(St.div,Le({role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":s?"":void 0,dir:h},d,{ref:t}))))})),Tse="RadioGroupItem",Ise=v.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...a}=e,o=Rse(Tse,n),i=o.disabled||r,s=IF(n),c=PF(n),l=v.useRef(null),u=yn(t,l),f=o.value===a.value,d=v.useRef(!1);return v.useEffect((()=>{const e=e=>{Sse.includes(e.key)&&(d.current=!0)},t=()=>d.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),v.createElement(nT,Le({asChild:!0},s,{focusable:!i,active:f}),v.createElement(bse,Le({disabled:i,required:o.required,checked:f},c,a,{name:o.name,ref:u,onCheck:()=>o.onValueChange(a.value),onKeyDown:lt((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:lt(a.onFocus,(()=>{var e;d.current&&(null===(e=l.current)||void 0===e||e.click())}))})))})),Pse=v.forwardRef(((e,t)=>{const{__scopeRadioGroup:n,...r}=e,a=PF(n);return v.createElement(kse,Le({},a,r,{ref:t}))})),$F=Ase,OF=Ise,$se=Pse,zF=v.forwardRef((({className:e,...t},n)=>B.jsx($F,{className:$e("grid gap-2",e),...t,ref:n})));zF.displayName=$F.displayName;const MF=v.forwardRef((({className:e,...t},n)=>B.jsx(OF,{ref:n,className:$e("aspect-square size-6 rounded-full border border-slate-300 hover:border-2 disabled:cursor-not-allowed disabled:border-slate-100 disabled:bg-slate-100 data-[state=checked]:border-blue_100 data-[state=checked]:bg-blue_100",e),...t,children:B.jsx($se,{className:"flex items-center justify-center",children:B.jsx(t7,{className:"stack-animate size-2 border-none",style:{fill:t.disabled?"var(--slate-300)":"white",color:t.disabled?"var(--slate-300)":"white"}})})})));MF.displayName=OF.displayName;const Ose=z7,zse=ok,DF=v.forwardRef((({className:e,...t},n)=>B.jsx(q1,{className:$e("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})));DF.displayName=q1.displayName;const Mse=Yl("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"}}),NF=v.forwardRef((({side:e="right",className:t,overlayClassName:n,children:r,...a},o)=>B.jsxs(zse,{children:[B.jsx(DF,{className:$e("bg-slate-900/70",n)}),B.jsxs(W1,{ref:o,className:$e(Mse({side:e}),t),...a,children:[r,B.jsxs(ik,{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:[B.jsx(n7,{className:"h-4 w-4"}),B.jsx("span",{className:"sr-only",children:"Close"})]})]})]})));NF.displayName=W1.displayName;const LF=({className:e,...t})=>B.jsx("div",{className:$e("flex flex-col space-y-2 text-center sm:text-left",e),...t});LF.displayName="SheetHeader";const jF=v.forwardRef((({className:e,...t},n)=>B.jsx(N_,{ref:n,className:$e("text-lg font-semibold text-foreground",e),...t})));jF.displayName=N_.displayName;const FF=v.forwardRef((({className:e,...t},n)=>B.jsx(L_,{ref:n,className:$e("text-sm text-muted-foreground",e),...t})));FF.displayName=L_.displayName;const[$k,aHe]=ii("Tooltip",[Q1]),ET=Q1(),Dse="TooltipProvider",Nse=700,KC="tooltip.open",[Lse,CT]=$k(Dse),BF=e=>{const{__scopeTooltip:t,delayDuration:n=Nse,skipDelayDuration:r=300,disableHoverableContent:a=!1,children:o}=e,[i,s]=v.useState(!0),c=v.useRef(!1),l=v.useRef(0);return v.useEffect((()=>{const e=l.current;return()=>window.clearTimeout(e)}),[]),v.createElement(Lse,{scope:t,isOpenDelayed:i,delayDuration:n,onOpen:v.useCallback((()=>{window.clearTimeout(l.current),s(!1)}),[]),onClose:v.useCallback((()=>{window.clearTimeout(l.current),l.current=window.setTimeout((()=>s(!0)),r)}),[r]),isPointerInTransitRef:c,onPointerInTransitChange:v.useCallback((e=>{c.current=e}),[]),disableHoverableContent:a},o)},RT="Tooltip",[jse,Ok]=$k(RT),VF=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:a=!1,onOpenChange:o,disableHoverableContent:i,delayDuration:s}=e,c=CT(RT,e.__scopeTooltip),l=ET(t),[u,f]=v.useState(null),d=mp(),p=v.useRef(0),h=i??c.disableHoverableContent,m=s??c.delayDuration,y=v.useRef(!1),[g=!1,b]=kp({prop:r,defaultProp:a,onChange:e=>{e?(c.onOpen(),document.dispatchEvent(new CustomEvent(KC))):c.onClose(),null==o||o(e)}}),_=v.useMemo((()=>g?y.current?"delayed-open":"instant-open":"closed"),[g]),w=v.useCallback((()=>{window.clearTimeout(p.current),y.current=!1,b(!0)}),[b]),k=v.useCallback((()=>{window.clearTimeout(p.current),b(!1)}),[b]),x=v.useCallback((()=>{window.clearTimeout(p.current),p.current=window.setTimeout((()=>{y.current=!0,b(!0)}),m)}),[m,b]);return v.useEffect((()=>()=>window.clearTimeout(p.current)),[]),v.createElement(aj,l,v.createElement(jse,{scope:t,contentId:d,open:g,stateAttribute:_,trigger:u,onTriggerChange:f,onTriggerEnter:v.useCallback((()=>{c.isOpenDelayed?x():w()}),[c.isOpenDelayed,x,w]),onTriggerLeave:v.useCallback((()=>{h?k():window.clearTimeout(p.current)}),[k,h]),onOpen:w,onClose:k,disableHoverableContent:h},n))},lM="TooltipTrigger",UF=v.forwardRef(((e,t)=>{const{__scopeTooltip:n,...r}=e,a=Ok(lM,n),o=CT(lM,n),i=ET(n),s=yn(t,v.useRef(null),a.onTriggerChange),c=v.useRef(!1),l=v.useRef(!1),u=v.useCallback((()=>c.current=!1),[]);return v.useEffect((()=>()=>document.removeEventListener("pointerup",u)),[u]),v.createElement(XA,Le({asChild:!0},i),v.createElement(St.button,Le({"aria-describedby":a.open?a.contentId:void 0,"data-state":a.stateAttribute},r,{ref:s,onPointerMove:lt(e.onPointerMove,(e=>{"touch"!==e.pointerType&&!l.current&&!o.isPointerInTransitRef.current&&(a.onTriggerEnter(),l.current=!0)})),onPointerLeave:lt(e.onPointerLeave,(()=>{a.onTriggerLeave(),l.current=!1})),onPointerDown:lt(e.onPointerDown,(()=>{c.current=!0,document.addEventListener("pointerup",u,{once:!0})})),onFocus:lt(e.onFocus,(()=>{c.current||a.onOpen()})),onBlur:lt(e.onBlur,a.onClose),onClick:lt(e.onClick,a.onClose)})))})),Fse="TooltipPortal",[oHe,Bse]=$k(Fse,{forceMount:void 0}),s_="TooltipContent",qF=v.forwardRef(((e,t)=>{const n=Bse(s_,e.__scopeTooltip),{forceMount:r=n.forceMount,side:a="top",...o}=e,i=Ok(s_,e.__scopeTooltip);return v.createElement(Ws,{present:r||i.open},i.disableHoverableContent?v.createElement(WF,Le({side:a},o,{ref:t})):v.createElement(Vse,Le({side:a},o,{ref:t})))})),Vse=v.forwardRef(((e,t)=>{const n=Ok(s_,e.__scopeTooltip),r=CT(s_,e.__scopeTooltip),a=v.useRef(null),o=yn(t,a),[i,s]=v.useState(null),{trigger:c,onClose:l}=n,u=a.current,{onPointerInTransitChange:f}=r,d=v.useCallback((()=>{s(null),f(!1)}),[f]),p=v.useCallback(((e,t)=>{const n=e.currentTarget,r={x:e.clientX,y:e.clientY},a=Kse([...Wse(r,qse(r,n.getBoundingClientRect())),...Hse(t.getBoundingClientRect())]);s(a),f(!0)}),[f]);return v.useEffect((()=>()=>d()),[d]),v.useEffect((()=>{if(c&&u){const e=e=>p(e,u),t=e=>p(e,c);return c.addEventListener("pointerleave",e),u.addEventListener("pointerleave",t),()=>{c.removeEventListener("pointerleave",e),u.removeEventListener("pointerleave",t)}}}),[c,u,p,d]),v.useEffect((()=>{if(i){const e=e=>{const t=e.target,n={x:e.clientX,y:e.clientY},r=(null==c?void 0:c.contains(t))||(null==u?void 0:u.contains(t)),a=!Gse(n,i);r?d():a&&(d(),l())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[c,u,i,l,d]),v.createElement(WF,Le({},e,{ref:o}))})),[Use,iHe]=$k(RT,{isInside:!1}),WF=v.forwardRef(((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":a,onEscapeKeyDown:o,onPointerDownOutside:i,...s}=e,c=Ok(s_,n),l=ET(n),{onClose:u}=c;return v.useEffect((()=>(document.addEventListener(KC,u),()=>document.removeEventListener(KC,u))),[u]),v.useEffect((()=>{if(c.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(c.trigger)&&u()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[c.trigger,u]),v.createElement(tk,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:o,onPointerDownOutside:i,onFocusOutside:e=>e.preventDefault(),onDismiss:u},v.createElement(JA,Le({"data-state":c.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)"}}),v.createElement(oA,null,r),v.createElement(Use,{scope:n,isInside:!0},v.createElement(noe,{id:c.contentId,role:"tooltip"},a||r))))}));function qse(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),a=Math.abs(t.right-e.x),o=Math.abs(t.left-e.x);switch(Math.min(n,r,a,o)){case o:return"left";case a:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function Wse(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 Hse(e){const{top:t,right:n,bottom:r,left:a}=e;return[{x:a,y:t},{x:n,y:t},{x:n,y:r},{x:a,y:r}]}function Gse(e,t){const{x:n,y:r}=e;let a=!1;for(let e=0,o=t.length-1;e<t.length;o=e++){const i=t[e].x,s=t[e].y,c=t[o].x,l=t[o].y;s>r!=l>r&&n<(c-i)*(r-s)/(l-s)+i&&(a=!a)}return a}function Kse(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)),Qse(t)}function Qse(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 Yse=BF,Zse=VF,Xse=UF,HF=qF,Jse=()=>{const e=window.innerWidth;return e<768?"mobile":e<1024?"tablet":"desktop"},ece={deviceType:Jse()},AT=ua({name:"ui",initialState:ece,reducers:{setDeviceType:(e,{payload:t})=>{e.deviceType=t}},selectors:{selectDeviceType:e=>e.deviceType,selectIsMobile:e=>"mobile"===e.deviceType,selectIsTablet:e=>"tablet"===e.deviceType,selectIsDesktop:e=>"desktop"===e.deviceType}});var HE,fM,GE,uM,KE,dM,QE,pM,YE,hM,ZE,mM,XE,gM,JE,yM,e4,_M,t4,vM,n4,bM,r4,wM,a4,kM,o4,xM,i4,SM,s4,EM,c4,CM,l4,RM,f4,AM,u4,TM,d4,IM,p4,PM,h4,$M,m4,OM,g4,zM,y4,MM,_4,DM,v4,NM,b4,LM,w4,jM,k4,FM,x4,BM,S4,VM,E4,UM,C4,qM,R4,WM,A4,HM,T4,GM,I4,KM,P4,QM,$4,YM;function GF(){if(fM)return HE;fM=1;var e=w5(),t=e&&new e;return HE=t}function KF(){if(uM)return GE;uM=1;var e=PA(),t=GF();return GE=t?function(e,n){return t.set(e,n),e}:e}function zk(){if(dM)return KE;dM=1;var e=gk(),t=Vc();return KE=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 a=e(n.prototype),o=n.apply(a,r);return t(o)?o:a}},KE}function tce(){if(pM)return QE;pM=1;var e=zk(),t=si();return QE=function(n,r,a){var o=1&r,i=e(n);return function e(){return(this&&this!==t&&this instanceof e?i:n).apply(o?a:this,arguments)}},QE}function QF(){if(hM)return YE;hM=1;var e=Math.max;return YE=function(t,n,r,a){for(var o=-1,i=t.length,s=r.length,c=-1,l=n.length,u=e(i-s,0),f=Array(l+u),d=!a;++c<l;)f[c]=n[c];for(;++o<s;)(d||o<i)&&(f[r[o]]=t[o]);for(;u--;)f[c++]=t[o++];return f}}function YF(){if(mM)return ZE;mM=1;var e=Math.max;return ZE=function(t,n,r,a){for(var o=-1,i=t.length,s=-1,c=r.length,l=-1,u=n.length,f=e(i-c,0),d=Array(f+u),p=!a;++o<f;)d[o]=t[o];for(var h=o;++l<u;)d[h+l]=n[l];for(;++s<c;)(p||o<i)&&(d[h+r[s]]=t[o++]);return d}}function nce(){if(gM)return XE;return gM=1,XE=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}}function TT(){if(yM)return JE;return yM=1,JE=function(){}}function IT(){if(_M)return e4;_M=1;var e=gk(),t=TT();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,e4=n}function ZF(){if(vM)return t4;vM=1;var e=GF(),t=E5();return t4=e?function(t){return e.get(t)}:t}function rce(){if(bM)return n4;bM=1;return n4={}}function ace(){if(wM)return r4;wM=1;var e=rce(),t=Object.prototype.hasOwnProperty;return r4=function(n){for(var r=n.name+"",a=e[r],o=t.call(e,r)?a.length:0;o--;){var i=a[o],s=i.func;if(null==s||s==n)return i.name}return r}}function XF(){if(kM)return a4;kM=1;var e=gk(),t=TT();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,a4=n}function oce(){if(xM)return o4;xM=1;var e=IT(),t=XF(),n=mk();return o4=function(r){if(r instanceof e)return r.clone();var a=new t(r.__wrapped__,r.__chain__);return a.__actions__=n(r.__actions__),a.__index__=r.__index__,a.__values__=r.__values__,a}}function ice(){if(SM)return i4;SM=1;var e=IT(),t=XF(),n=TT(),r=Ai(),a=os(),o=oce(),i=Object.prototype.hasOwnProperty;function s(n){if(a(n)&&!r(n)&&!(n instanceof e)){if(n instanceof t)return n;if(i.call(n,"__wrapped__"))return o(n)}return new t(n)}return s.prototype=n.prototype,s.prototype.constructor=s,i4=s}function sce(){if(EM)return s4;EM=1;var e=IT(),t=ZF(),n=ace(),r=ice();return s4=function(a){var o=n(a),i=r[o];if("function"!=typeof i||!(o in e.prototype))return!1;if(a===i)return!0;var s=t(i);return!!s&&a===s[0]}}function JF(){if(CM)return c4;CM=1;var e=KF(),t=R5()(e);return c4=t}function cce(){if(RM)return l4;RM=1;var e=/\{\n\/\* \[wrapped with (.+)\] \*/,t=/,? & /;return l4=function(n){var r=n.match(e);return r?r[1].split(t):[]}}function lce(){if(AM)return f4;AM=1;var e=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;return f4=function(t,n){var r=n.length;if(!r)return t;var a=r-1;return n[a]=(r>1?"& ":"")+n[a],n=n.join(r>2?", ":" "),t.replace(e,"{\n/* [wrapped with "+n+"] */\n")}}function fce(){if(TM)return u4;TM=1;var e=zA(),t=MX(),n=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];return u4=function(r,a){return e(n,(function(e){var n="_."+e[0];a&e[1]&&!t(r,n)&&r.push(n)})),r.sort()}}function eB(){if(IM)return d4;IM=1;var e=cce(),t=lce(),n=A5(),r=fce();return d4=function(a,o,i){var s=o+"";return n(a,t(s,r(e(s),i)))}}function tB(){if(PM)return p4;PM=1;var e=sce(),t=JF(),n=eB();return p4=function(r,a,o,i,s,c,l,u,f,d){var p=8&a;a|=p?32:64,4&(a&=~(p?64:32))||(a&=-4);var h=[r,a,s,p?c:void 0,p?l:void 0,p?void 0:c,p?void 0:l,u,f,d],m=o.apply(void 0,h);return e(r)&&t(m,h),m.placeholder=i,n(m,r,a)}}function nB(){if($M)return h4;return $M=1,h4=function(e){return e.placeholder}}function uce(){if(OM)return m4;OM=1;var e=mk(),t=CA(),n=Math.min;return m4=function(r,a){for(var o=r.length,i=n(a.length,o),s=e(r);i--;){var c=a[i];r[i]=t(c,o)?s[c]:void 0}return r}}function PT(){if(zM)return g4;zM=1;var e="__lodash_placeholder__";return g4=function(t,n){for(var r=-1,a=t.length,o=0,i=[];++r<a;){var s=t[r];(s===n||s===e)&&(t[r]=e,i[o++]=r)}return i}}function rB(){if(MM)return y4;MM=1;var e=QF(),t=YF(),n=nce(),r=zk(),a=tB(),o=nB(),i=uce(),s=PT(),c=si();return y4=function l(u,f,d,p,h,m,y,g,v,b){var _=128&f,w=1&f,k=2&f,x=24&f,S=512&f,E=k?void 0:r(u);return function A(){for(var z=arguments.length,C=Array(z),I=z;I--;)C[I]=arguments[I];if(x)var T=o(A),R=n(C,T);if(p&&(C=e(C,p,h,x)),m&&(C=t(C,m,y,x)),z-=R,x&&z<b){var P=s(C,T);return a(u,f,l,A.placeholder,d,C,P,g,v,b-z)}var j=w?d:this,O=k?j[u]:u;return z=C.length,g?C=i(C,g):S&&z>1&&C.reverse(),_&&v<z&&(C.length=v),this&&this!==c&&this instanceof A&&(O=E||r(O)),O.apply(j,C)}},y4}function dce(){if(DM)return _4;DM=1;var e=$A(),t=zk(),n=rB(),r=tB(),a=nB(),o=PT(),i=si();return _4=function(s,c,l){var u=t(s);return function t(){for(var f=arguments.length,d=Array(f),p=f,h=a(t);p--;)d[p]=arguments[p];var m=f<3&&d[0]!==h&&d[f-1]!==h?[]:o(d,h);return(f-=m.length)<l?r(s,c,n,t.placeholder,void 0,d,m,void 0,void 0,l-f):e(this&&this!==i&&this instanceof t?u:s,this,d)}},_4}function pce(){if(NM)return v4;NM=1;var e=$A(),t=zk(),n=si();return v4=function(r,a,o,i){var s=1&a,c=t(r);return function t(){for(var a=-1,l=arguments.length,u=-1,f=i.length,d=Array(f+l),p=this&&this!==n&&this instanceof t?c:r;++u<f;)d[u]=i[u];for(;l--;)d[u++]=arguments[++a];return e(p,s?o:this,d)}},v4}function hce(){if(LM)return b4;LM=1;var e=QF(),t=YF(),n=PT(),r="__lodash_placeholder__",a=128,o=Math.min;return b4=function(i,s){var c=i[1],l=s[1],u=c|l,f=u<131,d=l==a&&8==c||l==a&&256==c&&i[7].length<=s[8]||384==l&&s[7].length<=s[8]&&8==c;if(!f&&!d)return i;1&l&&(i[2]=s[2],u|=1&c?0:4);var p=s[3];if(p){var h=i[3];i[3]=h?e(h,p,s[4]):p,i[4]=h?n(i[3],r):s[4]}return(p=s[5])&&(h=i[5],i[5]=h?t(h,p,s[6]):p,i[6]=h?n(i[5],r):s[6]),(p=s[7])&&(i[7]=p),l&a&&(i[8]=null==i[8]?s[8]:o(i[8],s[8])),null==i[9]&&(i[9]=s[9]),i[0]=s[0],i[1]=u,i}}function $T(){if(jM)return w4;jM=1;var e=KF(),t=tce(),n=dce(),r=rB(),a=pce(),o=ZF(),i=hce(),s=JF(),c=eB(),l=$5(),u=Math.max;return w4=function(f,d,p,h,m,y,g,v){var b=2&d;if(!b&&"function"!=typeof f)throw new TypeError("Expected a function");var _=h?h.length:0;if(_||(d&=-97,h=m=void 0),g=void 0===g?g:u(l(g),0),v=void 0===v?v:l(v),_-=m?m.length:0,64&d){var w=h,k=m;h=m=void 0}var x=b?void 0:o(f),S=[f,d,p,h,m,w,k,y,g,v];if(x&&i(S,x),f=S[0],d=S[1],p=S[2],h=S[3],m=S[4],!(v=S[9]=void 0===S[9]?b?0:f.length:u(S[9]-_,0))&&24&d&&(d&=-25),d&&1!=d)E=8==d||16==d?n(f,d,v):32!=d&&33!=d||m.length?r.apply(void 0,S):a(f,d,p,h);else var E=t(f,d,p);return c((x?e:s)(E,S),f,d)}}function mce(){if(FM)return k4;FM=1;var e=$T();return k4=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 gce(){if(BM)return x4;BM=1;var e=D5();return x4=function(t){return e(t,4)}}function yce(){if(VM)return S4;VM=1;var e=$T();function t(n,r,a){var o=e(n,8,void 0,void 0,void 0,void 0,void 0,r=a?void 0:r);return o.placeholder=t.placeholder,o}return t.placeholder={},S4=t}function _ce(){if(UM)return E4;UM=1;var e=Su(),t=os(),n=nJ();return E4=function(r){if(!t(r))return!1;var a=e(r);return"[object Error]"==a||"[object DOMException]"==a||"string"==typeof r.message&&"string"==typeof r.name&&!n(r)}}function vce(){if(qM)return C4;qM=1;var e=V_(),t=os();return C4=function(n){return t(n)&&"[object WeakMap]"==e(n)}}function bce(){if(WM)return R4;WM=1;var e=D5(),t=IX();return R4=function(n){return t("function"==typeof n?n:e(n,1))}}function wce(){if(HM)return A4;HM=1;var e=$T(),t=xJ(),n=t((function(t,n){return e(t,256,void 0,void 0,void 0,n)}));return A4=n}function kce(){if(GM)return T4;GM=1;var e=o5(),t=mk(),n=Ai(),r=F_(),a=a5(),o=B_(),i=i5();return T4=function(s){return n(s)?e(s,o):r(s)?[s]:t(a(i(s)))}}function xce(){return KM||(KM=1,I4={ary:mce(),assign:z5(),clone:gce(),curry:yce(),forEach:zA(),isArray:Ai(),isError:_ce(),isFunction:ck(),isWeakMap:vce(),iteratee:bce(),keys:_5(),rearg:wce(),toInteger:$5(),toPath:kce()}),I4}function aB(){if(QM)return P4;QM=1;var e=Y8(),t=xce();return P4=function(n,r,a){return e(t,n,r,a)}}function Sce(){if(YM)return $4;YM=1;var e=aB()("debounce",I5());return e.placeholder=eA(),$4=e}function Ece(e,t,n=window){const r=v.useRef(t);v.useEffect((()=>{r.current=t}),[t]),v.useEffect((()=>{if(!n)return;const t=e=>r.current(e);return n.addEventListener(e,t),()=>{n.removeEventListener(e,t)}}),[e,n])}Sce();var ZM,XM,O4={exports:{}},z4={};
79
79
  /**
80
80
  * @license React
81
81
  * use-sync-external-store-with-selector.production.min.js
@@ -84,7 +84,7 @@ var AW=Object.defineProperty,TW=(e,t,n)=>t in e?AW(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 Cce(){if(ZM)return z4;ZM=1;var e=Jw();var t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useSyncExternalStore,r=e.useRef,a=e.useEffect,o=e.useMemo,i=e.useDebugValue;return z4.useSyncExternalStoreWithSelector=function(e,s,c,l,u){var f=r(null);if(null===f.current){var d={hasValue:!1,value:null};f.current=d}else d=f.current;f=o((function(){function e(e){if(!a){if(a=!0,n=e,e=l(e),void 0!==u&&d.hasValue){var o=d.value;if(u(o,e))return r=o}return r=e}if(o=r,t(n,e))return o;var i=l(e);return void 0!==u&&u(o,i)?o:(n=e,r=i)}var n,r,a=!1,o=void 0===c?null:c;return[function(){return e(s())},null===o?void 0:function(){return e(o())}]}),[s,c,l,u]);var p=n(e,f[0],f[1]);return a((function(){d.hasValue=!0,d.value=p}),[p]),i(p),p},z4}function Rce(){return XM||(XM=1,O4.exports=Cce()),O4.exports}var Ace=Rce(),Ll="default"in Xb?ze:Xb,JM=Symbol.for("react-redux-context"),eD=typeof globalThis<"u"?globalThis:{};function Tce(){if(!Ll.createContext)return{};const e=eD[JM]??(eD[JM]=new Map);let t=e.get(Ll.createContext);return t||(t=Ll.createContext(null),e.set(Ll.createContext,t)),t}var wm=Tce(),Ice=()=>{throw new Error("uSES not initialized!")};function OT(e=wm){return function(){return Ll.useContext(e)}}var oB=OT(),iB=Ice,Pce=e=>{iB=e},$ce=(e,t)=>e===t;function Oce(e=wm){const t=e===wm?oB:OT(e),n=(e,n={})=>{const{equalityFn:r=$ce,devModeChecks:a={}}="function"==typeof n?{equalityFn:n}:n,{store:o,subscription:i,getServerState:s,stabilityCheck:c,identityFunctionCheck:l}=t();Ll.useRef(!0);const u=Ll.useCallback({[e.name]:t=>e(t)}[e.name],[e,c,a.stabilityCheck]),f=iB(i.addNestedSub,o.getState,s||o.getState,u,r);return Ll.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var qa=Oce();function zce(e){e()}var Mce=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function tD(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function zy(e,t){if(tD(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!tD(e[n[r]],t[n[r]]))return!1;return!0}function sB(e=wm){const t=e===wm?oB:OT(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}Mce?Ll.useLayoutEffect:Ll.useEffect;var cB=sB();function Dce(e=wm){const t=e===wm?cB:sB(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Mk=Dce(),Nce=zce;Pce(Ace.useSyncExternalStoreWithSelector);const Lce=()=>qa(AT.selectors.selectIsMobile);function nD({className:e,...t}){return B.jsx("div",{className:$e("animate-pulse rounded-md bg-muted",e),...t})}const jce="sidebar_state",Fce=604800,Bce="14rem",Vce="18rem",Uce="3rem",qce="b",lB=v.createContext(null);function Dk(){const e=v.useContext(lB);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Wce=v.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...i},s)=>{const c=Lce(),[l,u]=v.useState(!1),[f,d]=v.useState(e),p=t??f,h=v.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):d(t),document.cookie=`${jce}=${t}; path=/; max-age=604800`}),[n,p]),m=v.useCallback((()=>c?u((e=>!e)):h((e=>!e))),[c,h,u]);v.useEffect((()=>{const e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[m]);const y=p?"expanded":"collapsed",g=v.useMemo((()=>({state:y,open:p,setOpen:h,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:m})),[y,p,h,c,l,u,m]);return B.jsx(lB.Provider,{value:g,children:B.jsx(BF,{delayDuration:0,children:B.jsx("div",{style:{"--sidebar-width":Bce,"--sidebar-width-icon":Uce,...a},className:$e("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:s,...i,children:o})})})}));Wce.displayName="SidebarProvider";const Hce=v.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:a,...o},i)=>{const{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=Dk();return"none"===n?B.jsx("div",{className:$e("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...o,children:a}):s?B.jsx(Ose,{open:l,onOpenChange:u,children:B.jsxs(NF,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Vce},side:e,children:[B.jsxs(LF,{className:"sr-only",children:[B.jsx(jF,{children:"Sidebar"}),B.jsx(FF,{children:"Displays the mobile sidebar."})]}),B.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):B.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":c,"data-collapsible":"collapsed"===c?n:"","data-variant":t,"data-side":e,children:[B.jsx("div",{className:$e("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]")}),B.jsx("div",{className:$e("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),...o,children:B.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:a})})]})}));Hce.displayName="Sidebar";const Gce=v.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:a,open:o}=Dk();return B.jsx(ek,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:$e("size-6 text-slate-900",e),onClick:e=>{null==t||t(e),a()},...n,children:o?B.jsx(MG,{size:16}):B.jsx(OG,{size:16})})}));Gce.displayName="SidebarTrigger";const Kce=v.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=Dk();return B.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:$e("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})}));Kce.displayName="SidebarRail";const Qce=v.forwardRef((({className:e,...t},n)=>B.jsx("main",{ref:n,className:$e("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})));Qce.displayName="SidebarInset";const Yce=v.forwardRef((({className:e,...t},n)=>B.jsx(xT,{ref:n,"data-sidebar":"input",className:$e("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));Yce.displayName="SidebarInput";const Zce=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{ref:n,"data-sidebar":"header",className:$e("flex flex-col gap-2 p-2",e),...t})));Zce.displayName="SidebarHeader";const Xce=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{ref:n,"data-sidebar":"footer",className:$e("flex flex-col gap-2 p-2",e),...t})));Xce.displayName="SidebarFooter";const Jce=v.forwardRef((({className:e,...t},n)=>B.jsx(sT,{ref:n,"data-sidebar":"separator",className:$e("mx-2 w-auto bg-sidebar-border",e),...t})));Jce.displayName="SidebarSeparator";const ele=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{ref:n,"data-sidebar":"content",className:$e("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));ele.displayName="SidebarContent";const tle=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{ref:n,"data-sidebar":"group",className:$e("relative flex w-full min-w-0 flex-col px-xxs pt-xs",e),...t})));tle.displayName="SidebarGroup";const nle=v.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const a=t?Op:"div";return B.jsx(a,{ref:r,"data-sidebar":"group-label",className:$e("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-slate-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})}));nle.displayName="SidebarGroupLabel";const rle=v.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const a=t?Op:"button";return B.jsx(a,{ref:r,"data-sidebar":"group-action",className:$e("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})}));rle.displayName="SidebarGroupAction";const ale=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{ref:n,"data-sidebar":"group-content",className:$e("w-full text-sm",e),...t})));ale.displayName="SidebarGroupContent";const ole=v.forwardRef((({className:e,...t},n)=>B.jsx("ul",{ref:n,"data-sidebar":"menu",className:$e("flex w-full min-w-0 flex-col p-xs font-semibold text-slate-700 [&_svg]:size-4",e),...t})));ole.displayName="SidebarMenu";const ile=v.forwardRef((({className:e,...t},n)=>B.jsx("li",{ref:n,"data-sidebar":"menu-item",className:$e("group/menu-item relative",e),...t})));ile.displayName="SidebarMenuItem";const sle=Yl("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"}}),cle=v.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:a,className:o,...i},s)=>{const c=e?Op:"button",{isMobile:l,state:u}=Dk(),f=B.jsx(c,{ref:s,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:$e(sle({variant:n,size:r}),o),...i});return a?("string"==typeof a&&(a={children:a}),B.jsxs(VF,{children:[B.jsx(UF,{asChild:!0,children:f}),B.jsx(qF,{side:"right",align:"center",hidden:"collapsed"!==u||l,...a})]})):f}));cle.displayName="SidebarMenuButton";const lle=v.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},a)=>{const o=t?Op:"button";return B.jsx(o,{ref:a,"data-sidebar":"menu-action",className:$e("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})}));lle.displayName="SidebarMenuAction";const fle=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:$e("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})));fle.displayName="SidebarMenuBadge";const ule=v.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const a=v.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return B.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:$e("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&B.jsx(nD,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),B.jsx(nD,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})}));ule.displayName="SidebarMenuSkeleton";const dle=v.forwardRef((({className:e,...t},n)=>B.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:$e("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));dle.displayName="SidebarMenuSub";const ple=v.forwardRef((({...e},t)=>B.jsx("li",{ref:t,...e})));ple.displayName="SidebarMenuSubItem";const hle=v.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...a},o)=>{const i=e?Op:"a";return B.jsx(i,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:$e("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-slate-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),...a})}));hle.displayName="SidebarMenuSubButton";const fB="Switch",[mle,sHe]=ii(fB),[gle,yle]=mle(fB),_le=v.forwardRef(((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:o,required:i,disabled:s,value:c="on",onCheckedChange:l,...u}=e,[f,d]=v.useState(null),p=yn(t,(e=>d(e))),h=v.useRef(!1),m=!f||!!f.closest("form"),[y=!1,g]=kp({prop:a,defaultProp:o,onChange:l});return v.createElement(gle,{scope:n,checked:y,disabled:s},v.createElement(St.button,Le({type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":uB(y),"data-disabled":s?"":void 0,disabled:s,value:c},u,{ref:p,onClick:lt(e.onClick,(e=>{g((e=>!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&v.createElement(wle,{control:f,bubbles:!h.current,name:r,value:c,checked:y,required:i,disabled:s,style:{transform:"translateX(-100%)"}}))})),vle="SwitchThumb",ble=v.forwardRef(((e,t)=>{const{__scopeSwitch:n,...r}=e,a=yle(vle,n);return v.createElement(St.span,Le({"data-state":uB(a.checked),"data-disabled":a.disabled?"":void 0},r,{ref:t}))})),wle=e=>{const{control:t,checked:n,bubbles:r=!0,...a}=e,o=v.useRef(null),i=yk(n),s=_k(t);return v.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&a){const t=new Event("click",{bubbles:r});a.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),v.createElement("input",Le({type:"checkbox","aria-hidden":!0,defaultChecked:n},a,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function uB(e){return e?"checked":"unchecked"}const dB=_le,kle=ble,pB=v.forwardRef((({className:e,...t},n)=>B.jsx(dB,{className:$e("peer inline-flex h-6 w-11 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 disabled:cursor-not-allowed disabled:!bg-slate-100 data-[state=checked]:bg-slate-700 data-[state=unchecked]:bg-input md:h-[18px] md:w-8",e),...t,ref:n,children:B.jsx(kle,{className:$e("pointer-events-none block size-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 md:size-[14px] md:data-[state=checked]:translate-x-[14px]")})})));pB.displayName=dB.displayName;const hB="Tabs",[xle,cHe]=ii(hB,[Y1]),mB=Y1(),[lHe,zT]=xle(hB),Sle="TabsList",Ele=v.forwardRef(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,o=zT(Sle,n),i=mB(n);return v.createElement(tT,Le({asChild:!0},i,{orientation:o.orientation,dir:o.dir,loop:r}),v.createElement(St.div,Le({role:"tablist","aria-orientation":o.orientation},a,{ref:t})))})),Cle="TabsTrigger",Rle=v.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...o}=e,i=zT(Cle,n),s=mB(n),c=gB(i.baseId,r),l=yB(i.baseId,r),u=r===i.value;return v.createElement(nT,Le({asChild:!0},s,{focusable:!a,active:u}),v.createElement(St.button,Le({type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c},o,{ref:t,onMouseDown:lt(e.onMouseDown,(e=>{a||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)})),onKeyDown:lt(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)})),onFocus:lt(e.onFocus,(()=>{const e="manual"!==i.activationMode;!u&&!a&&e&&i.onValueChange(r)}))})))})),Ale="TabsContent",Tle=v.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:o,...i}=e,s=zT(Ale,n),c=gB(s.baseId,r),l=yB(s.baseId,r),u=r===s.value,f=v.useRef(u);return v.useEffect((()=>{const e=requestAnimationFrame((()=>f.current=!1));return()=>cancelAnimationFrame(e)}),[]),v.createElement(Ws,{present:a||u},(({present:n})=>v.createElement(St.div,Le({"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!n,id:l,tabIndex:0},i,{ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0}}),n&&o)))}));function gB(e,t){return`${e}-trigger-${t}`}function yB(e,t){return`${e}-content-${t}`}const _B=Ele,vB=Rle,bB=Tle,Ile=v.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>B.jsx(_B,{ref:r,"data-testid":"tabsList",className:t?$e("inline-flex items-center justify-center gap-xxs border-b border-slate-200 p-none text-muted-foreground",e):e,...n})));Ile.displayName=_B.displayName;const Ple=v.forwardRef((({className:e,useDefaults:t=!0,children:n,...r},a)=>B.jsx(vB,{ref:a,className:t?$e("inline-flex items-center justify-center whitespace-nowrap p-xxs pb-[calc(theme(spacing.xxs)-2px)] pt-xxs text-basering-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring border-b-2 border-transparent font-semibold focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-slate-900","group relative before:absolute before:inset-xxxs before:rounded-sm before:bg-transparent before:transition-colors hover:before:bg-slate-50",e):e,...r,children:B.jsx("span",{className:"relative text-slate-500 group-hover:text-slate-900 group-data-[state=active]:text-slate-900",children:n})})));Ple.displayName=vB.displayName;const $le=v.forwardRef((({className:e,...t},n)=>B.jsx(bB,{ref:n,className:$e("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));$le.displayName=bB.displayName;const Ole=v.forwardRef((({className:e,...t},n)=>B.jsx("table",{ref:n,className:$e("w-full caption-bottom text-sm",e),...t})));Ole.displayName="Table";const zle=v.forwardRef((({className:e,...t},n)=>B.jsx("thead",{ref:n,className:$e("[&_tr]:border-b",e),...t})));zle.displayName="TableHeader";const Mle=v.forwardRef((({className:e,...t},n)=>B.jsx("tbody",{ref:n,className:$e("[&_tr:last-child]:border-0",e),...t})));Mle.displayName="TableBody";const Dle=v.forwardRef((({className:e,...t},n)=>B.jsx("tfoot",{ref:n,className:$e("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));Dle.displayName="TableFooter";const Nle=v.forwardRef((({className:e,...t},n)=>B.jsx("tr",{ref:n,className:$e("border-b bg-background transition-colors hover:bg-gray-100 data-[state=selected]:bg-gray-200 dark:hover:bg-muted dark:data-[state=selected]:bg-muted",e),...t})));Nle.displayName="TableRow";const Lle=v.forwardRef((({className:e,...t},n)=>B.jsx("th",{ref:n,className:$e("h-m bg-inherit px-xs py-xxs text-left align-middle font-normal text-muted-foreground","whitespace-nowrap border-slate-200 text-sm text-slate-500 [&:not(:last-child)]:border-r",e),...t})));Lle.displayName="TableHead";const jle=v.forwardRef((({className:e,...t},n)=>B.jsx("td",{ref:n,className:$e("bg-inherit p-xs py-xxs align-middle","overflow-hidden truncate text-ellipsis border-slate-200 text-base text-slate-700 [&:not(:last-child)]:border-r",e),...t})));jle.displayName="TableCell";const Fle=v.forwardRef((({className:e,...t},n)=>B.jsx("caption",{ref:n,className:$e("mt-s text-sm text-muted-foreground",e),...t})));Fle.displayName="TableCaption";const wB=v.forwardRef((({className:e,...t},n)=>{const{error:r}=Mp();return B.jsx("textarea",{className:$e(`flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-400 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${!!r&&"border-rose-600 focus-visible:ring-rose-600"}`,e),ref:n,...t})}));wB.displayName="Textarea";const Ble=Yse,QC=Zse,YC=Xse,Vle=Yl("z-50 overflow-hidden shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{size:{default:"rounded-md border text-sm px-3 py-1.5",small:"rounded-md border px-[11px] py-[3px] text-base leading-[16px]"},theme:{default:"bg-popover text-popover-foreground",dark:"bg-slate-900_90 text-slate-50"},defaultVariants:{size:"small",theme:"dark"}}}),gw=v.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,...a},o)=>B.jsx(HF,{ref:o,sideOffset:t,className:$e(Vle({size:n,theme:r,className:e})),...a})));gw.displayName=HF.displayName;const Ule=({value:e,readonly:t,onChange:n})=>B.jsx(V5,{size:24,disabled:t,checked:JSON.parse(e),onCheckedChange:e=>n(String(e))}),qle=({readonly:e,value:t,options:n,onChange:r})=>B.jsx(zF,{disabled:e,value:t,onValueChange:r,children:n.map((({id:e,title:t,value:n,description:r})=>B.jsxs("div",{className:"flex items-center space-x-2",children:[B.jsx(MF,{value:n,id:e}),B.jsx(Ble,{children:B.jsxs(QC,{children:[B.jsx(YC,{asChild:!0,children:B.jsx(ST,{htmlFor:"r1",children:t})}),B.jsx(gw,{children:B.jsx("p",{children:r})})]})})]},e)))}),Wle=({options:e,value:t,readonly:n,onChange:r})=>B.jsxs(hT,{disabled:n,value:t,onValueChange:r,children:[B.jsx(yT,{className:"w-[180px]",children:B.jsx(gT,{})}),B.jsx(_T,{children:B.jsx(mT,{children:e.map((({id:e,title:t,value:n})=>B.jsx(vT,{value:n||"",children:t},e)))})})]}),Hle=({value:e,readonly:t,onChange:n})=>B.jsx(pB,{disabled:t,checked:e&&JSON.parse(e)||!1,onCheckedChange:e=>n(String(e))}),Gle=({readonly:e,value:t,onChange:n})=>{const[r,a]=v.useState(t);v.useEffect((()=>{a(t)}),[t]);return B.jsx(xT,{disabled:e,type:"text",value:r,onChange:({target:e})=>{a(e.value),n(e.value)}})},Kle=({inputType:e,...t})=>{switch(e){case"text":return B.jsx(Gle,{...t});case"check":return B.jsx(Ule,{...t});case"switch":return B.jsx(Hle,{...t});case"options":return t.options&&t.options.length>3?B.jsx(Wle,{...t}):B.jsx(qle,{...t})}},Qle=({id:e,readonly:t,title:n,type:r,value:a,description:o,options:i,onChange:s})=>B.jsxs("div",{className:"mb-3 flex flex-row items-center justify-between rounded-sm border p-4",children:[B.jsxs("div",{className:"mr-2 space-y-0.5",children:[B.jsx("div",{className:"text-base",children:n}),B.jsx("div",{className:"text-muted-foreground text-sm",children:o})]}),B.jsx("div",{children:B.jsx(Kle,{inputType:r,options:i,readonly:t,value:a,onChange:t=>s({id:e,value:t})})})]}),fHe=({list:e,onChange:t})=>{const n=toe();return B.jsx(Lae,{...n,children:e.map((({id:e,...n})=>B.jsx(Qle,{id:e,...n,onChange:t},e)))})},uHe=e=>{const t=[],n=(e,r="")=>Object.keys(e).flatMap((a=>{const o=r?`${r}.${a}`:a,i=e[a],s=void 0!==i.value;return s&&t.push({...e[a],id:o}),"object"!=typeof i||Array.isArray(i)||s?o:n(i,o)}));return n(e),t},dHe=({list:e,data:t={}})=>e.reduce(((e,n)=>{const r=n.id;return t&&hu.has(r,t)?e:hu.set(r,n.value)(e)}),{}),Yle={[bt.openaiConfigApiKey]:{title:"Openai config api key",type:"text",value:"",readonly:!1},[bt.mediacacheEnabled]:{title:"Media cache",type:"switch",value:"",readonly:!1},[bt.mediacacheSingleRun]:{title:"Mediacache single run",type:"switch",value:"",readonly:!1},[bt.uploadsPolicyVideoKeepOriginal]:{title:"Uploads policy video keep original",type:"switch",value:"",readonly:!1},[bt.uploadsPolicyImageKeepOriginal]:{title:"Uploads policy image keep original",type:"switch",value:"",readonly:!1},[bt.uploadsPolicyAudioKeepOriginal]:{title:"Uploads policy audio keep original",type:"switch",value:"",readonly:!1},[bt.uploadsProvider]:{title:"Upload provider",description:"",type:"text",value:"",readonly:!1},[bt.uploadsPolicyVideoMaxSize]:{title:"Upload video max size",description:"",type:"text",value:"",readonly:!0},[bt.mediacacheCheckInterval]:{title:"Media cache check interval",description:"",type:"text",value:"",readonly:!0},[bt.mediacacheLimitPerRun]:{title:"Media cache limit per run",description:"",type:"text",value:"",readonly:!0},[bt.registrationReasonToJoin]:{title:"Require Approval Reason on Sign Up",description:"",type:"switch",value:"",readonly:!1},[bt.registrationMode]:{title:"Registration Mode",description:"",type:"options",options:[{id:"open",title:"Open",value:"OPEN"},{id:"approval",title:"Approval",value:"APPROVAL"},{id:"approval",title:"Closed",value:"CLOSED"}],value:"",readonly:!1},[bt.registrationShowCaptcha]:{title:"Require Captcha on Sign Up",description:"",type:"switch",value:"",readonly:!1},[bt.captchaVerifyUrl]:{title:"Captcha - Verify Url",description:"",type:"text",value:"",readonly:!1},[bt.captchaSecretKey]:{title:"Captcha - Secret Key",description:"",type:"text",value:"",readonly:!1},[bt.captchaSiteKey]:{title:"Captcha - Site Key",description:"",type:"text",value:"",readonly:!1},[bt.confirmationCodeCodeExpirationMinutes]:{title:"Confirmation Code - Expiration Minutes",description:"It is life time of the code",type:"text",value:"",readonly:!1},[bt.confirmationCodeCounterExpirationMinutes]:{title:"Confirmation Code - Counter Expiration Minutes",description:"The time duration after which the counter for unsuccessful attempts will be reset, allowing user to request a new code",type:"text",value:"",readonly:!1},[bt.confirmationCodeLimitStoreAttempts]:{title:"Confirmation Code - Limit Store Attempts",description:"The maximum number of attempts a user is allowed to request a new code",type:"text",value:"",readonly:!1},[bt.confirmationCodeLimitCheckAttempts]:{title:"Confirmation Code - Limit Check Attempts",description:"The maximum number of attempts a user is allowed to verify a code",type:"text",value:"",readonly:!1}},MT=e=>"number"==typeof e&&!isNaN(e),My=e=>"string"==typeof e,kB=e=>"function"==typeof e,Zle=e=>v.isValidElement(e)||My(e)||kB(e)||MT(e),Dl=new Map;let ZC=[];const rD=new Set,xB=()=>Dl.size>0;function Xle(e,t){var n;if(t)return!(null==(n=Dl.get(t))||!n.isToastActive(e));let r=!1;return Dl.forEach((t=>{t.isToastActive(e)&&(r=!0)})),r}function Jle(e,t){Zle(e)&&(xB()||ZC.push({content:e,options:t}),Dl.forEach((n=>{n.buildToast(e,t)})))}function aD(e,t){Dl.forEach((n=>{null!=t&&null!=t&&t.containerId?(null==t?void 0:t.containerId)===n.id&&n.toggle(e,null==t?void 0:t.id):n.toggle(e,null==t?void 0:t.id)}))}let efe=1;const SB=()=>""+efe++;function tfe(e){return e&&(My(e.toastId)||MT(e.toastId))?e.toastId:SB()}function Dy(e,t){return Jle(e,t),t.toastId}function yw(e,t){return{...t,type:t&&t.type||e,toastId:tfe(t)}}function cb(e){return(t,n)=>Dy(t,yw(e,n))}function Bt(e,t){return Dy(e,yw("default",t))}Bt.loading=(e,t)=>Dy(e,yw("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Bt.promise=function(e,t,n){let r,{pending:a,error:o,success:i}=t;a&&(r=My(a)?Bt.loading(a,n):Bt.loading(a.render,{...n,...a}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(e,t,a)=>{if(null==t)return void Bt.dismiss(r);const o={type:e,...s,...n,data:a},i=My(t)?{render:t}:t;return r?Bt.update(r,{...o,...i}):Bt(i.render,{...o,...i}),a},l=kB(e)?e():e;return l.then((e=>c("success",i,e))).catch((e=>c("error",o,e))),l},Bt.success=cb("success"),Bt.info=cb("info"),Bt.error=cb("error"),Bt.warning=cb("warning"),Bt.warn=Bt.warning,Bt.dark=(e,t)=>Dy(e,yw("default",{theme:"dark",...t})),Bt.dismiss=function(e){!function(e){var t;if(xB()){if(null==e||My(t=e)||MT(t))Dl.forEach((t=>{t.removeToast(e)}));else if(e&&("containerId"in e||"id"in e)){const t=Dl.get(e.containerId);t?t.removeToast(e.id):Dl.forEach((t=>{t.removeToast(e.id)}))}}else ZC=ZC.filter((t=>null!=e&&t.options.toastId!==e))}(e)},Bt.clearWaitingQueue=function(e){void 0===e&&(e={}),Dl.forEach((t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()}))},Bt.isActive=Xle,Bt.update=function(e,t){void 0===t&&(t={});const n=((e,t)=>{var n;let{containerId:r}=t;return null==(n=Dl.get(r||1))?void 0:n.toasts.get(e)})(e,t);if(n){const{props:r,content:a}=n,o={delay:100,...r,...t,toastId:t.toastId||e,updateId:SB()};o.toastId!==e&&(o.staleId=e);const i=o.render||a;delete o.render,Dy(i,o)}},Bt.done=e=>{Bt.update(e,{progress:1})},Bt.onChange=function(e){return rD.add(e),()=>{rD.delete(e)}},Bt.play=e=>aD(!0,e),Bt.pause=e=>aD(!1,e);const DT=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ny="8.48.0",Do=globalThis;function Nk(e,t,n){const r=Do,a=r.__SENTRY__=r.__SENTRY__||{},o=a[Ny]=a[Ny]||{};return o[e]||(o[e]=t())}const Y_=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,nfe="Sentry Logger ",oD=["debug","info","warn","error","log","assert","trace"],iD={};function NT(e){if(!("console"in Do))return e();const t=Do.console,n={},r=Object.keys(iD);r.forEach((e=>{const r=iD[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function rfe(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Y_?oD.forEach((n=>{t[n]=(...t)=>{e&&NT((()=>{Do.console[n](`${nfe}[${n}]:`,...t)}))}})):oD.forEach((e=>{t[e]=()=>{}})),t}const ri=Nk("logger",rfe),M4="<anonymous>";function wu(e){try{return e&&"function"==typeof e&&e.name||M4}catch{return M4}}function sD(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch{return}}}const Nb={},cD={};function EB(e,t){Nb[e]=Nb[e]||[],Nb[e].push(t)}function CB(e,t){if(!cD[e]){cD[e]=!0;try{t()}catch(t){Y_&&ri.error(`Error while instrumenting ${e}`,t)}}}function XC(e,t){const n=e&&Nb[e];if(n)for(const r of n)try{r(t)}catch(t){Y_&&ri.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${wu(r)}\nError:`,t)}}function Z_(){return LT(Do),Do}function LT(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ny,t[Ny]=t[Ny]||{}}const RB=Object.prototype.toString;function afe(e){switch(RB.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Lk(e,Error)}}function jT(e,t){return RB.call(e)===`[object ${t}]`}function _w(e){return jT(e,"String")}function FT(e){return jT(e,"Object")}function ofe(e){return typeof Event<"u"&&Lk(e,Event)}function ife(e){return typeof Element<"u"&&Lk(e,Element)}function sfe(e){return jT(e,"RegExp")}function BT(e){return!(!e||!e.then||"function"!=typeof e.then)}function cfe(e){return FT(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Lk(e,t){try{return e instanceof t}catch{return!1}}function lfe(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const AB=Do,ffe=80;function VT(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,a=[];let o=0,i=0;const s=" > ",c=s.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(l=ufe(n,u),!("html"===l||o>1&&i+a.length*c+l.length>=f));)a.push(l),i+=l.length,n=n.parentNode;return a.reverse().join(s)}catch{return"<unknown>"}}function ufe(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(AB.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const a=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(a&&a.length)a.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&_w(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const o=["aria-label","type","name","title","alt"];for(const e of o){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function dfe(){try{return AB.document.location.href}catch{return""}}function D4(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function pfe(e,t,n=!1){return!!_w(e)&&(sfe(t)?t.test(e):!!_w(t)&&(n?e===t:e.includes(t)))}function hfe(e,t=[],n=!1){return t.some((t=>pfe(e,t,n)))}function Fs(e,t,n){if(!(t in e))return;const r=e[t],a=n(r);"function"==typeof a&&TB(a,r);try{e[t]=a}catch{Y_&&ri.log(`Failed to replace method "${t}" in object`,e)}}function c_(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Y_&&ri.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function TB(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,c_(e,"__sentry_original__",t)}catch{}}function IB(e){return e.__sentry_original__}function mfe(e){if(afe(e))return{message:e.message,name:e.name,stack:e.stack,...fD(e)};if(ofe(e)){const t={type:e.type,target:lD(e.target),currentTarget:lD(e.currentTarget),...fD(e)};return typeof CustomEvent<"u"&&Lk(e,CustomEvent)&&(t.detail=e.detail),t}return e}function lD(e){try{return ife(e)?VT(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function fD(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function Pc(e){return JC(e,new Map)}function JC(e,t){if(gfe(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.getOwnPropertyNames(e))typeof e[n]<"u"&&(r[n]=JC(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(JC(e,t))})),r}return e}function gfe(e){if(!FT(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch{return!0}}const PB=1e3;function jk(){return Date.now()/PB}function yfe(){const{performance:e}=Do;if(!e||!e.now)return jk;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/PB}const $B=yfe(),_fe=(()=>{const{performance:e}=Do;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=a<t,i=e.timing&&e.timing.navigationStart,s="number"==typeof i?Math.abs(i+n-r):t;return o||s<t?a<=s?e.timeOrigin:i:r})();function yu(){const e=Do,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function vfe(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function bfe(e,t,n){const r=e.exception=e.exception||{},a=r.values=r.values||[],o=a[0]=a[0]||{};o.value||(o.value=""),o.type||(o.type="Error")}function OB(e,t){const n=vfe(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}var cu;function uD(e){return new pu((t=>{t(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(cu||(cu={}));class pu{constructor(e){pu.prototype.__init.call(this),pu.prototype.__init2.call(this),pu.prototype.__init3.call(this),pu.prototype.__init4.call(this),this._state=cu.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new pu(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new pu(((t,n)=>{let r,a;return this.then((t=>{a=!1,r=t,e&&e()}),(t=>{a=!0,r=t,e&&e()})).then((()=>{a?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(cu.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(cu.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===cu.PENDING){if(BT(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===cu.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===cu.RESOLVED&&e[1](this._value),this._state===cu.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function wfe(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||$B(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:yu()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function dD(){return yu()}function eR(){return yu().substring(16)}function Fk(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Fk(r[e],t[e],n-1));return r}const tR="_sentrySpan";function pD(e,t){t?c_(e,tR,t):delete e[tR]}function nR(e){return e[tR]}const kfe=100;class UT{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:dD(),spanId:eR()}}clone(){const e=new UT;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,pD(e,nR(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&wfe(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof km?[t.getScopeData(),t.getRequestSession()]:FT(t)?[e,e.requestSession]:[],{tags:a,extra:o,user:i,contexts:s,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...a},this._extra={...this._extra,...o},this._contexts={...this._contexts,...s},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,pD(this,void 0),this._attachments=[],this.setPropagationContext({traceId:dD()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:jk(),...e},a=this._breadcrumbs;return a.push(r),this._breadcrumbs=a.length>n?a.slice(-n):a,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:nR(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Fk(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:eR(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:yu();if(!this._client)return ri.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:yu();if(!this._client)return ri.warn("No client configured on scope - will not capture message!"),r;const a=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:a,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:yu();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(ri.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const km=UT;function xfe(){return Nk("defaultCurrentScope",(()=>new km))}function Sfe(){return Nk("defaultIsolationScope",(()=>new km))}class Efe{constructor(e,t){let n,r;n=e||new km,r=t||new km,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return BT(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function T1(){const e=LT(Z_());return e.stack=e.stack||new Efe(xfe(),Sfe())}function Cfe(e){return T1().withScope(e)}function Rfe(e,t){const n=T1();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function hD(e){return T1().withScope((()=>e(T1().getIsolationScope())))}function Afe(){return{withIsolationScope:hD,withScope:Cfe,withSetScope:Rfe,withSetIsolationScope:(e,t)=>hD(t),getCurrentScope:()=>T1().getScope(),getIsolationScope:()=>T1().getIsolationScope()}}function Bk(e){const t=LT(e);return t.acs?t.acs:Afe()}function J1(){return Bk(Z_()).getCurrentScope()}function X_(){return Bk(Z_()).getIsolationScope()}function Tfe(){return Nk("globalScope",(()=>new km))}function Ife(...e){const t=Bk(Z_());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function ef(){return J1().getClient()}const Pfe="_sentryMetrics";function $fe(e){const t=e[Pfe];if(!t)return;const n={};for(const[,[e,r]]of t)(n[e]||(n[e]=[])).push(Pc(r));return n}const zB="sentry.source",Ofe="sentry.sample_rate",zfe="sentry.op",Mfe="sentry.origin",Dfe=0,Nfe=1,Lfe="sentry-",jfe=/^sentry-/;function Ffe(e){const t=Bfe(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(jfe)){e[t.slice(7)]=n}return e}),{});return Object.keys(n).length>0?n:void 0}function Bfe(e){if(e&&(_w(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{const n=mD(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{}):mD(e)}function mD(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}const Vfe=1;function Ufe(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return Pc({parent_span_id:r?t:l_(e).parent_span_id,span_id:r?eR():t,trace_id:n})}function gD(e){return"number"==typeof e?yD(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?yD(e.getTime()):$B()}function yD(e){return e>9999999999?e/1e3:e}function l_(e){if(Wfe(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(qfe(e)){const{attributes:r,startTime:a,name:o,endTime:i,parentSpanId:s,status:c}=e;return Pc({span_id:t,trace_id:n,data:r,description:o,parent_span_id:s,start_timestamp:gD(a),timestamp:gD(i)||void 0,status:Gfe(c),op:r[zfe],origin:r[Mfe],_metrics_summary:$fe(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function qfe(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function Wfe(e){return"function"==typeof e.getSpanJSON}function Hfe(e){const{traceFlags:t}=e.spanContext();return 1===t}function Gfe(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const Kfe="_sentryRootSpan";function qT(e){return e[Kfe]||e}function MB(){const e=Bk(Z_());return e.getActiveSpan?e.getActiveSpan():nR(J1())}function Qfe(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=ef(),n=t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}const DB="production",Yfe="_frozenDsc";function Zfe(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},a=Pc({environment:n.environment||DB,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",a),a}function NB(e){const t=ef();if(!t)return{};const n=qT(e),r=n[Yfe];if(r)return r;const a=n.spanContext().traceState,o=a&&a.get("sentry.dsc"),i=o&&Ffe(o);if(i)return i;const s=Zfe(e.spanContext().traceId,t),c=l_(n),l=c.data||{},u=l[Ofe];null!=u&&(s.sample_rate=`${u}`);const f=l[zB],d=c.description;return"url"!==f&&d&&(s.transaction=d),Qfe()&&(s.sampled=String(Hfe(n))),t.emit("createDsc",s,n),s}function _D(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;DT&&ri.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}function Xfe(e,t=!1){const{host:n,path:r,pass:a,port:o,projectId:i,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&a?`:${a}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function Jfe(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}function lu(e,t=100,n=1/0){try{return rR("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function rR(e,t,n=1/0,r=1/0,a=Jfe()){const[o,i]=a;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const s=eue(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return s.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return rR("",l.toJSON(),c-1,r,a)}catch{}const u=Array.isArray(t)?[]:{};let f=0;const d=mfe(t);for(const e in d){if(!Object.prototype.hasOwnProperty.call(d,e))continue;if(f>=r){u[e]="[MaxProperties ~]";break}const t=d[e];u[e]=rR(e,t,c-1,r,a),f++}return i(t),u}function eue(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(lfe(t))return"[VueViewModel]";if(cfe(t))return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${wu(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const n=tue(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function tue(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function nue(e,t=[]){return[e,t]}function rue(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function aue(e,t,n,r){const a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Xfe(r)},...a&&{trace:Pc({...a})}}}function aR(e,t,n,r=0){return new pu(((a,o)=>{const i=e[r];if(null===t||"function"!=typeof i)a(t);else{const s=i({...t},n);DT&&i.id&&null===s&&ri.log(`Event processor "${i.id}" dropped event`),BT(s)?s.then((t=>aR(e,t,n,r+1).then(a))).then(null,o):aR(e,s,n,r+1).then(a).then(null,o)}}))}let lb,vD,fb;function oue(e){const t=Do._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return fb&&n.length===vD||(vD=n.length,fb=n.reduce(((n,r)=>{lb||(lb={});const a=lb[r];if(a)n[a[0]]=a[1];else{const a=e(r);for(let e=a.length-1;e>=0;e--){const o=a[e],i=o&&o.filename,s=t[r];if(i&&s){n[i]=s,lb[r]=[i,s];break}}}return n}),{})),fb}function iue(e,t){const{fingerprint:n,span:r,breadcrumbs:a,sdkProcessingMetadata:o}=t;sue(e,t),r&&fue(e,r),uue(e,n),cue(e,a),lue(e,o)}function bD(e,t){const{extra:n,tags:r,user:a,contexts:o,level:i,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:f,propagationContext:d,transactionName:p,span:h}=t;ub(e,"extra",n),ub(e,"tags",r),ub(e,"user",a),ub(e,"contexts",o),e.sdkProcessingMetadata=Fk(e.sdkProcessingMetadata,s,2),i&&(e.level=i),p&&(e.transactionName=p),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...d}}function ub(e,t,n){e[t]=Fk(e[t],n,1)}function sue(e,t){const{extra:n,tags:r,user:a,contexts:o,level:i,transactionName:s}=t,c=Pc(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=Pc(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=Pc(a);u&&Object.keys(u).length&&(e.user={...u,...e.user});const f=Pc(o);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),i&&(e.level=i),s&&"transaction"!==e.type&&(e.transaction=s)}function cue(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function lue(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function fue(e,t){e.contexts={trace:Ufe(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:NB(t),...e.sdkProcessingMetadata};const n=l_(qT(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}function uue(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function due(e,t,n,r,a,o){const{normalizeDepth:i=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||yu(),timestamp:t.timestamp||jk()},l=n.integrations||e.integrations.map((e=>e.name));pue(c,e),gue(c,l),a&&a.emit("applyFrameMetadata",t),void 0===t.type&&hue(c,e.stackParser);const u=_ue(r,n.captureContext);n.mechanism&&OB(c,n.mechanism);const f=a?a.getEventProcessors():[],d=Tfe().getScopeData();if(o){bD(d,o.getScopeData())}if(u){bD(d,u.getScopeData())}const p=[...n.attachments||[],...d.attachments];p.length&&(n.attachments=p),iue(c,d);return aR([...f,...d.eventProcessors],c,n).then((e=>(e&&mue(e),"number"==typeof i&&i>0?yue(e,i,s):e)))}function pue(e,t){const{environment:n,release:r,dist:a,maxValueLength:o=250}=t;e.environment=e.environment||n||DB,!e.release&&r&&(e.release=r),!e.dist&&a&&(e.dist=a),e.message&&(e.message=D4(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=D4(i.value,o));const s=e.request;s&&s.url&&(s.url=D4(s.url,o))}function hue(e,t){const n=oue(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{n&&e.filename&&(e.debug_id=n[e.filename])}))}))}catch{}}function mue(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch{}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}function gue(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function yue(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:lu(e.data,t,n)}})))},...e.user&&{user:lu(e.user,t,n)},...e.contexts&&{contexts:lu(e.contexts,t,n)},...e.extra&&{extra:lu(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=lu(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:lu(e.data,t,n)}})))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=lu(e.contexts.flags,3,n)),r}function _ue(e,t){if(!t)return e;const n=e?e.clone():new km;return n.update(t),n}function WT(e,t){return J1().captureException(e,void 0)}function vue(e,t){const n={captureContext:t};return J1().captureMessage(e,void 0,n)}function bue(e,t){X_().setContext(e,t)}function wue(e,t){X_().setExtra(e,t)}function kue(e){X_().addEventProcessor(e)}const xue=6e4;function Sue(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?xue:r-t}function Eue(e,t){return e[t]||e.all||0}function Cue(e,t,n=Date.now()){return Eue(e,t)>n}function Rue(e,{statusCode:t,headers:n},r=Date.now()){const a={...e},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),i=parseInt(t,10),s=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e?(!o||o.split(";").includes("custom"))&&(a[e]=r+s):a[e]=r+s;else a.all=r+s}else i?a.all=r+Sue(i,r):429===t&&(a.all=r+6e4);return a}function Aue(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return Iue(e,n)||Tue(e,r)}function Tue(e,t){return!!t&&wD(e)===wD(t)}function Iue(e,t){return!!t&&e.includes(t.host)}function wD(e){return"/"===e[e.length-1]?e.slice(0,-1):e}const Pue=100;function $ue(e,t){const n=ef(),r=X_();if(!n)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:o=Pue}=n.getOptions();if(o<=0)return;const i={timestamp:jk(),...e},s=a?NT((()=>a(i,t))):i;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,o))}function Oue(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const zue="Dedupe",Mue=()=>{let e;return{name:zue,processEvent(t){if(t.type)return t;try{if(Nue(t,e))return DT&&ri.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Due=Mue;function Nue(e,t){return!!t&&!(!Lue(e,t)&&!jue(e,t))}function Lue(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!jB(e,t)||!LB(e,t))}function jue(e,t){const n=kD(t),r=kD(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&jB(e,t)&&LB(e,t))}function LB(e,t){let n=sD(e),r=sD(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],a=n[e];if(t.filename!==a.filename||t.lineno!==a.lineno||t.colno!==a.colno||t.function!==a.function)return!1}return!0}function jB(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function kD(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Fue(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Bue(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Vue(){return!Bue()&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function xD(){return typeof window<"u"&&(!Vue()||Uue())}function Uue(){const e=Do.process;return!!e&&"renderer"===e.type}const db=Do;function que(){const e=db.chrome,t=e&&e.app&&e.app.runtime,n="history"in db&&!!db.history.pushState&&!!db.history.replaceState;return!t&&n}function Wue(e,t){return e??t()}function Lb(e){let t,n=e[0],r=1;for(;r<e.length;){const a=e[r],o=e[r+1];if(r+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return;"access"===a||"optionalAccess"===a?(t=n,n=o(n)):("call"===a||"optionalCall"===a)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const vy=Do;function Hue(){setTimeout((()=>{}))}function I1(e,t={}){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(IB(e))return e}catch{return e}const n=function(...n){try{const r=n.map((e=>I1(e,t)));return e.apply(this,r)}catch(e){throw Hue(),Ife((r=>{r.addEventProcessor((e=>(t.mechanism&&(bfe(e),OB(e,t.mechanism)),e.extra={...e.extra,arguments:n},e))),WT(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}TB(n,e),c_(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}const FB=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Gue=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",J_=(e,t,n,r)=>{let a,o;return i=>{t.value>=0&&(i||r)&&(o=t.value-(a||0),(o||void 0===a)&&(a=t.value,t.delta=o,t.rating=Gue(t.value,n),e(t)))}},rn=Do,Kue=()=>`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,BB=(e=!0)=>{const t=rn.performance&&rn.performance.getEntriesByType&&rn.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},HT=()=>{const e=BB();return e&&e.activationStart||0},ev=(e,t)=>{const n=BB();let r="navigate";return n&&(rn.document&&rn.document.prerendering||HT()>0?r="prerender":rn.document&&rn.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Kue(),navigationType:r}},Dm=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},tv=e=>{const t=t=>{("pagehide"===t.type||rn.document&&"hidden"===rn.document.visibilityState)&&e(t)};rn.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Vk=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Ly=-1;const Que=()=>"hidden"!==rn.document.visibilityState||rn.document.prerendering?1/0:0,vw=e=>{"hidden"===rn.document.visibilityState&&Ly>-1&&(Ly="visibilitychange"===e.type?e.timeStamp:0,Zue())},Yue=()=>{addEventListener("visibilitychange",vw,!0),addEventListener("prerenderingchange",vw,!0)},Zue=()=>{removeEventListener("visibilitychange",vw,!0),removeEventListener("prerenderingchange",vw,!0)},GT=()=>(rn.document&&Ly<0&&(Ly=Que(),Yue()),{get firstHiddenTime(){return Ly}}),Uk=e=>{rn.document&&rn.document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},Xue=[1800,3e3],Jue=(e,t={})=>{Uk((()=>{const n=GT(),r=ev("FCP");let a;const o=Dm("paint",(e=>{e.forEach((e=>{"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-HT(),0),r.entries.push(e),a(!0)))}))}));o&&(a=J_(e,r,Xue,t.reportAllChanges))}))},ede=[.1,.25],tde=(e,t={})=>{Jue(Vk((()=>{const n=ev("CLS",0);let r,a=0,o=[];const i=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=o[0],n=o[o.length-1];a&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e])}})),a>n.value&&(n.value=a,n.entries=o,r())},s=Dm("layout-shift",i);s&&(r=J_(e,n,ede,t.reportAllChanges),tv((()=>{i(s.takeRecords()),r(!0)})),setTimeout(r,0))})))},nde=[100,300],rde=(e,t={})=>{Uk((()=>{const n=GT(),r=ev("FID");let a;const o=e=>{e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),a(!0))},i=e=>{e.forEach(o)},s=Dm("first-input",i);a=J_(e,r,nde,t.reportAllChanges),s&&tv(Vk((()=>{i(s.takeRecords()),s.disconnect()})))}))};let VB=0,N4=1/0,pb=0;const ade=e=>{e.forEach((e=>{e.interactionId&&(N4=Math.min(N4,e.interactionId),pb=Math.max(pb,e.interactionId),VB=pb?(pb-N4)/7+1:0)}))};let oR;const ode=()=>oR?VB:performance.interactionCount||0,ide=()=>{"interactionCount"in performance||oR||(oR=Dm("event",ade,{type:"event",buffered:!0,durationThreshold:0}))},fu=[],L4=new Map,sde=40;let cde=0;const lde=()=>ode()-cde,fde=()=>{const e=Math.min(fu.length-1,Math.floor(lde()/50));return fu[e]},j4=10,ude=[],dde=e=>{if(ude.forEach((t=>t(e))),!e.interactionId&&"first-input"!==e.entryType)return;const t=fu[fu.length-1],n=L4.get(e.interactionId);if(n||fu.length<10||t&&e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===(n.entries[0]&&n.entries[0].startTime)&&n.entries.push(e);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};L4.set(t.id,t),fu.push(t)}fu.sort(((e,t)=>t.latency-e.latency)),fu.length>10&&fu.splice(10).forEach((e=>L4.delete(e.id)))}},UB=e=>{const t=rn.requestIdleCallback||rn.setTimeout;let n=-1;return e=Vk(e),rn.document&&"hidden"===rn.document.visibilityState?e():(n=t(e),tv(e)),n},pde=[200,500],hde=(e,t={})=>{"PerformanceEventTiming"in rn&&"interactionId"in PerformanceEventTiming.prototype&&Uk((()=>{ide();const n=ev("INP");let r;const a=e=>{UB((()=>{e.forEach(dde);const t=fde();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())}))},o=Dm("event",a,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});r=J_(e,n,pde,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),tv((()=>{a(o.takeRecords()),r(!0)})))}))},mde=[2500,4e3],SD={},gde=(e,t={})=>{Uk((()=>{const n=GT(),r=ev("LCP");let a;const o=e=>{t.reportAllChanges||(e=e.slice(-1)),e.forEach((e=>{e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-HT(),0),r.entries=[e],a())}))},i=Dm("largest-contentful-paint",o);if(i){a=J_(e,r,mde,t.reportAllChanges);const n=Vk((()=>{SD[r.id]||(o(i.takeRecords()),i.disconnect(),SD[r.id]=!0,a(!0))}));["keydown","click"].forEach((e=>{rn.document&&addEventListener(e,(()=>UB(n)),{once:!0,capture:!0})})),tv(n)}}))},jy={},bw={};let qB,WB,HB,GB;function yde(e,t=!1){return qk("cls",e,kde,qB,t)}function _de(e,t=!1){return qk("lcp",e,Sde,HB,t)}function vde(e){return qk("fid",e,xde,WB)}function bde(e){return qk("inp",e,Ede,GB)}function wde(e,t){return KB(e,t),bw[e]||(Cde(e),bw[e]=!0),QB(e,t)}function nv(e,t){const n=jy[e];if(n&&n.length)for(const r of n)try{r(t)}catch(t){FB&&ri.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${wu(r)}\nError:`,t)}}function kde(){return tde((e=>{nv("cls",{metric:e}),qB=e}),{reportAllChanges:!0})}function xde(){return rde((e=>{nv("fid",{metric:e}),WB=e}))}function Sde(){return gde((e=>{nv("lcp",{metric:e}),HB=e}),{reportAllChanges:!0})}function Ede(){return hde((e=>{nv("inp",{metric:e}),GB=e}))}function qk(e,t,n,r,a=!1){let o;return KB(e,t),bw[e]||(o=n(),bw[e]=!0),r&&t({metric:r}),QB(e,t,a?o:void 0)}function Cde(e){const t={};"event"===e&&(t.durationThreshold=0),Dm(e,(t=>{nv(e,{entries:t})}),t)}function KB(e,t){jy[e]=jy[e]||[],jy[e].push(t)}function QB(e,t,n){return()=>{n&&n();const r=jy[e];if(!r)return;const a=r.indexOf(t);-1!==a&&r.splice(a,1)}}const Rde=1e3;let ED,iR,sR,hb;function Ade(e){EB("dom",e),CB("dom",Tde)}function Tde(){if(!rn.document)return;const e=XC.bind(null,"dom"),t=CD(e,!0);rn.document.addEventListener("click",t,!1),rn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=rn[t],r=n&&n.prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Fs(r,"addEventListener",(function(t){return function(n,r,a){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){const r=CD(e);o.handler=r,t.call(this,n,r,a)}o.refCount++}catch{}return t.call(this,n,r,a)}})),Fs(r,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},a=n[t];a&&(a.refCount--,a.refCount<=0&&(e.call(this,t,a.handler,r),a.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}})))}))}function Ide(e){if(e.type!==iR)return!1;try{if(!e.target||e.target._sentryId!==sR)return!1}catch{}return!0}function Pde(e,t){return"keypress"===e&&(!t||!t.tagName||!("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable))}function CD(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=$de(n);if(Pde(n.type,r))return;c_(n,"_sentryCaptured",!0),r&&!r._sentryId&&c_(r,"_sentryId",yu());const a="keypress"===n.type?"input":n.type;Ide(n)||(e({event:n,name:a,global:t}),iR=n.type,sR=r?r._sentryId:void 0),clearTimeout(ED),ED=rn.setTimeout((()=>{sR=void 0,iR=void 0}),Rde)}}function $de(e){try{return e.target}catch{return null}}function Ode(e){const t="history";EB(t,e),CB(t,zde)}function zde(){if(!que())return;const e=rn.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=hb,t=String(n);hb=t,XC("history",{from:e,to:t})}return e.apply(this,t)}}rn.onpopstate=function(...t){const n=rn.location.href,r=hb;if(hb=n,XC("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},Fs(rn.history,"pushState",t),Fs(rn.history,"replaceState",t)}const F4={};function Mde(e){const t=F4[e];if(t)return t;let n=rn[e];if(Fue(n))return F4[e]=n.bind(rn);const r=rn.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const a=t.contentWindow;a&&a[e]&&(n=a[e]),r.head.removeChild(t)}catch(t){FB&&ri.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(F4[e]=n.bind(rn))}function P1(...e){return Mde("setTimeout")(...e)}const Dde="__sentry_xhr_v3__",Nde=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Lde="BrowserApiErrors",jde=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Lde,setupOnce(){t.setTimeout&&Fs(vy,"setTimeout",RD),t.setInterval&&Fs(vy,"setInterval",RD),t.requestAnimationFrame&&Fs(vy,"requestAnimationFrame",Bde),t.XMLHttpRequest&&"XMLHttpRequest"in vy&&Fs(XMLHttpRequest.prototype,"send",Vde);const e=t.eventTarget;e&&(Array.isArray(e)?e:Nde).forEach(Ude)}}},Fde=jde;function RD(e){return function(...t){const n=t[0];return t[0]=I1(n,{mechanism:{data:{function:wu(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Bde(e){return function(t){return e.apply(this,[I1(t,{mechanism:{data:{function:"requestAnimationFrame",handler:wu(e)},handled:!1,type:"instrument"}})])}}function Vde(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&Fs(n,e,(function(t){const n={mechanism:{data:{function:e,handler:wu(t)},handled:!1,type:"instrument"}},r=IB(t);return r&&(n.mechanism.data.handler=wu(r)),I1(t,n)}))})),e.apply(this,t)}}function Ude(e){const t=vy[e],n=t&&t.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Fs(n,"addEventListener",(function(t){return function(n,r,a){try{qde(r)&&(r.handleEvent=I1(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:wu(r),target:e},handled:!1,type:"instrument"}}))}catch{}return t.apply(this,[n,I1(r,{mechanism:{data:{function:"addEventListener",handler:wu(r),target:e},handled:!1,type:"instrument"}}),a])}})),Fs(n,"removeEventListener",(function(e){return function(t,n,r){try{const a=n.__sentry_wrapped__;a&&e.call(this,t,a,r)}catch{}return e.call(this,t,n,r)}})))}function qde(e){return"function"==typeof e.handleEvent}const Xn=Do,KT="sentryReplaySession",Wde="replay_event",QT="Unable to send Replay",Hde=3e5,Gde=9e5,Kde=5e3,Qde=5500,Yde=6e4,Zde=5e3,Xde=3,AD=15e4,mb=5e3,Jde=3e3,epe=300,YT=2e7,tpe=4999,npe=15e3,TD=36e5;function cR(e,t){return e??t()}function f_(e){let t,n=e[0],r=1;for(;r<e.length;){const a=e[r],o=e[r+1];if(r+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return;"access"===a||"optionalAccess"===a?(t=n,n=o(n)):("call"===a||"optionalCall"===a)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}var Ca;function rpe(e){return e.nodeType===e.ELEMENT_NODE}function Fy(e){const t=f_([e,"optionalAccess",e=>e.host]);return f_([t,"optionalAccess",e=>e.shadowRoot])===e}function By(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function ape(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function ope(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function ww(e){try{const t=e.rules||e.cssRules;return t?ape(Array.from(t,YB).join("")):null}catch{return null}}function ipe(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,a=r[n],o=r.getPropertyPriority(a);t+=`${a}:${r.getPropertyValue(a)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function YB(e){let t;if(cpe(e))try{t=ww(e.styleSheet)||ope(e)}catch{}else if(lpe(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=ipe(e)),n&&(t=spe(t)),n||r)return t}return t||e.cssText}function spe(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function cpe(e){return"styleSheet"in e}function lpe(e){return"selectorText"in e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Ca||(Ca={}));class ZB{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;return cR(f_([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]),(()=>-1))}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function fpe(){return new ZB}function Wk({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function u_({isMasked:e,element:t,value:n,maskInputFn:r}){let a=n||"";return e?(r&&(a=r(a,t)),"*".repeat(a.length)):a}function $1(e){return e.toLowerCase()}function lR(e){return e.toUpperCase()}const ID="__rrweb_original__";function upe(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const a=t.getImageData,o=ID in a?a[ID]:a;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0}function ZT(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?$1(t):null}function kw(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function XB(e,t){let n;try{n=new URL(e,cR(t,(()=>window.location.href)))}catch{return null}return cR(f_([n.pathname.match(/\.([0-9a-z]+)(?:$)/i),"optionalAccess",e=>e[1]]),(()=>null))}const PD={};function JB(e){const t=PD[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const a=t.contentWindow;a&&a[e]&&(r=a[e]),n.head.removeChild(t)}catch{}return PD[e]=r.bind(window)}function fR(...e){return JB("setTimeout")(...e)}function eV(...e){return JB("clearTimeout")(...e)}function tV(e){try{return e.contentDocument}catch{}}let dpe=1;const ppe=new RegExp("[^a-z0-9-_:]"),d_=-2;function XT(){return dpe++}function hpe(e){if(e instanceof HTMLFormElement)return"form";const t=$1(e.tagName);return ppe.test(t)?"div":t}function mpe(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}let n1,$D;const gpe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ype=/^(?:[a-z+]+:)?\/\//i,_pe=/^www\..*/i,vpe=/^(data:)([^,]*),(.*)/i;function xw(e,t){return(e||"").replace(gpe,((e,n,r,a,o,i)=>{const s=r||o||i,c=n||a||"";if(!s)return e;if(ype.test(s)||_pe.test(s))return`url(${c}${s}${c})`;if(vpe.test(s))return`url(${c}${s}${c})`;if("/"===s[0])return`url(${c}${mpe(t)+s}${c})`;const l=t.split("/"),u=s.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`}))}const bpe=/^[^ \t\n\r\u000c]+/,wpe=/^[, \t\n\r\u000c]+/;function kpe(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const a=e.exec(t.substring(n));return a?(r=a[0],n+=r.length,r):""}const a=[];for(;r(wpe),!(n>=t.length);){let o=r(bpe);if(","===o.slice(-1))o=p1(e,o.substring(0,o.length-1)),a.push(o);else{let r="";o=p1(e,o);let i=!1;for(;;){const e=t.charAt(n);if(""===e){a.push((o+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,a.push((o+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return a.join(", ")}const OD=new WeakMap;function p1(e,t){return t&&""!==t.trim()?Hk(e,t):t}function xpe(e){return!("svg"!==e.tagName&&!e.ownerSVGElement)}function Hk(e,t){let n=OD.get(e);if(n||(n=e.createElement("a"),OD.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function nV(e,t,n,r,a,o){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&("table"===t||"td"===t||"th"===t)?p1(e,r):"srcset"===n?kpe(e,r):"style"===n?xw(r,Hk(e)):"object"===t&&"data"===n?p1(e,r):"function"==typeof o?o(n,r,a):r)}function rV(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function Spe(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function Epe(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function om(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:om(e.parentNode,t,n,r+1)}function h1(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(Epe(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function O1(e,t,n,r,a,o){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let s=-1,c=-1;if(o){if(c=om(i,h1(r,a)),c<0)return!0;s=om(i,h1(t,n),c>=0?c:1/0)}else{if(s=om(i,h1(t,n)),s<0)return!1;c=om(i,h1(r,a),s>=0?s:1/0)}return s>=0?!(c>=0)||s<=c:!(c>=0)&&!!o}catch{}return!!o}function Cpe(e,t,n){const r=e.contentWindow;if(!r)return;let a,o=!1;try{a=r.document.readyState}catch{return}if("complete"!==a){const r=fR((()=>{o||(t(),o=!0)}),n);return void e.addEventListener("load",(()=>{eV(r),o=!0,t()}))}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return fR(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Rpe(e,t,n){let r,a=!1;try{r=e.sheet}catch{return}if(r)return;const o=fR((()=>{a||(t(),a=!0)}),n);e.addEventListener("load",(()=>{eV(o),a=!0,t()}))}function Ape(e,t){const{doc:n,mirror:r,blockClass:a,blockSelector:o,unblockSelector:i,maskAllText:s,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:m,maskInputFn:y,dataURLOptions:g={},inlineImages:v,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:w=!1}=t,k=Tpe(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Ca.Document,childNodes:[],compatMode:e.compatMode}:{type:Ca.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ca.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return Ppe(e,{doc:n,blockClass:a,blockSelector:o,unblockSelector:i,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:h,maskInputFn:y,dataURLOptions:g,inlineImages:v,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:w,rootId:k,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:d});case e.TEXT_NODE:return Ipe(e,{doc:n,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:d,maskTextFn:m,maskInputOptions:h,maskInputFn:y,rootId:k});case e.CDATA_SECTION_NODE:return{type:Ca.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:Ca.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function Tpe(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}function Ipe(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:a,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:s,maskInputOptions:c,maskInputFn:l,rootId:u}=t,f=e.parentNode&&e.parentNode.tagName;let d=e.textContent;const p="STYLE"===f||void 0,h="SCRIPT"===f||void 0,m="TEXTAREA"===f||void 0;if(p&&d){try{e.nextSibling||e.previousSibling||f_([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(d=ww(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}d=xw(d,Hk(t.doc))}h&&(d="SCRIPT_PLACEHOLDER");const y=O1(e,r,o,a,i,n);if(!p&&!h&&!m&&d&&y&&(d=s?s(d,e.parentElement):d.replace(/[\S]/g,"*")),m&&d&&(c.textarea||y)&&(d=l?l(d,e.parentNode):d.replace(/[\S]/g,"*")),"OPTION"===f&&d){d=u_({isMasked:O1(e,r,o,a,i,Wk({type:null,tagName:f,maskInputOptions:c})),element:e,value:d,maskInputFn:l})}return{type:Ca.Text,textContent:d||"",isStyle:p,rootId:u}}function Ppe(e,t){const{doc:n,blockClass:r,blockSelector:a,unblockSelector:o,inlineStylesheet:i,maskInputOptions:s={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m,maskAllText:y,maskTextClass:g,unmaskTextClass:v,maskTextSelector:b,unmaskTextSelector:_}=t,w=Spe(e,r,a,o),k=hpe(e);let x={};const S=e.attributes.length;for(let t=0;t<S;t++){const r=e.attributes[t];r.name&&!rV(k,r.name,r.value)&&(x[r.name]=nV(n,k,$1(r.name),r.value,e,c))}if("link"===k&&i){const t=Array.from(n.styleSheets).find((t=>t.href===e.href));let r=null;t&&(r=ww(t)),r&&(x.rel=null,x.href=null,x.crossorigin=null,x._cssText=xw(r,t.href))}if("style"===k&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=ww(e.sheet);t&&(x._cssText=xw(t,Hk(n)))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const t=e,n=ZT(t),r=kw(t,lR(k),n),a=t.checked;if("submit"!==n&&"button"!==n&&r){const e=O1(t,g,b,v,_,Wk({type:n,tagName:lR(k),maskInputOptions:s}));x.value=u_({isMasked:e,element:t,value:r,maskInputFn:l})}a&&(x.checked=a)}if("option"===k&&(e.selected&&!s.select?x.selected=!0:delete x.selected),"canvas"===k&&d)if("2d"===e.__context)upe(e)||(x.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const t=e.toDataURL(u.type,u.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(u.type,u.quality)&&(x.rr_dataURL=t)}if("img"===k&&f){n1||(n1=n.createElement("canvas"),$D=n1.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",a=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{n1.width=t.naturalWidth,n1.height=t.naturalHeight,$D.drawImage(t,0,0),x.rr_dataURL=n1.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(a?x.crossOrigin=a:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if(("audio"===k||"video"===k)&&(x.rr_mediaState=e.paused?"paused":"played",x.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(x.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(x.rr_scrollTop=e.scrollTop)),w){const{width:t,height:n}=e.getBoundingClientRect();x={class:x.class,rr_width:`${t}px`,rr_height:`${n}px`}}let E;"iframe"===k&&!p(x.src)&&(!w&&!tV(e)&&(x.rr_src=x.src),delete x.src);try{customElements.get(k)&&(E=!0)}catch{}return{type:Ca.Element,tagName:k,attributes:x,childNodes:[],isSVG:xpe(e)||void 0,needBlock:w,rootId:m,isCustom:E}}function Zn(e){return null==e?"":e.toLowerCase()}function $pe(e,t){if(t.comment&&e.type===Ca.Comment)return!0;if(e.type===Ca.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===XB(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Zn(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Zn(e.attributes.name)||"icon"===Zn(e.attributes.rel)||"apple-touch-icon"===Zn(e.attributes.rel)||"shortcut icon"===Zn(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Zn(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Zn(e.attributes.property).match(/^(og|twitter|fb):/)||Zn(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Zn(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Zn(e.attributes.name)||"googlebot"===Zn(e.attributes.name)||"bingbot"===Zn(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Zn(e.attributes.name)||"generator"===Zn(e.attributes.name)||"framework"===Zn(e.attributes.name)||"publisher"===Zn(e.attributes.name)||"progid"===Zn(e.attributes.name)||Zn(e.attributes.property).match(/^article:/)||Zn(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Zn(e.attributes.name)||"yandex-verification"===Zn(e.attributes.name)||"csrf-token"===Zn(e.attributes.name)||"p:domain_verify"===Zn(e.attributes.name)||"verify-v1"===Zn(e.attributes.name)||"verification"===Zn(e.attributes.name)||"shopify-checkout-api-token"===Zn(e.attributes.name)))return!0}}return!1}function m1(e,t){const{doc:n,mirror:r,blockClass:a,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:f,skipChild:d=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b={},inlineImages:_=!1,recordCanvas:w=!1,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:S=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:z=()=>!1,newlyAddedElement:C=!1}=t;let{preserveWhiteSpace:I=!0}=t;const T=Ape(e,{doc:n,mirror:r,blockClass:a,blockSelector:o,maskAllText:s,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,dataURLOptions:b,inlineImages:_,recordCanvas:w,keepIframeSrcFn:z,newlyAddedElement:C});if(!T)return console.warn(e,"not serialized"),null;let R;R=r.hasNode(e)?r.getId(e):$pe(T,v)||!I&&T.type===Ca.Text&&!T.isStyle&&!T.textContent.replace(/^\s+|\s+$/gm,"").length?-2:XT();const P=Object.assign(T,{id:R});if(r.add(e,P),-2===R)return null;k&&k(e);let j=!d;if(P.type===Ca.Element){j=j&&!P.needBlock,delete P.needBlock;const t=e.shadowRoot;t&&By(t)&&(P.isShadowHost=!0)}if((P.type===Ca.Document||P.type===Ca.Element)&&j){v.headWhitespace&&P.type===Ca.Element&&"head"===P.tagName&&(I=!1);const t={doc:n,mirror:r,blockClass:a,blockSelector:o,maskAllText:s,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:f,skipChild:d,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:w,preserveWhiteSpace:I,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:z};for(const n of Array.from(e.childNodes)){const e=m1(n,t);e&&P.childNodes.push(e)}if(rpe(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=m1(n,t);r&&(By(e.shadowRoot)&&(r.isShadow=!0),P.childNodes.push(r))}}return e.parentNode&&Fy(e.parentNode)&&By(e.parentNode)&&(P.isShadow=!0),P.type===Ca.Element&&"iframe"===P.tagName&&Cpe(e,(()=>{const t=tV(e);if(t&&x){const n=m1(t,{doc:t,mirror:r,blockClass:a,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:w,preserveWhiteSpace:I,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:z});n&&x(e,n)}}),S),P.type===Ca.Element&&"link"===P.tagName&&"string"==typeof P.attributes.rel&&("stylesheet"===P.attributes.rel||"preload"===P.attributes.rel&&"string"==typeof P.attributes.href&&"css"===XB(P.attributes.href))&&Rpe(e,(()=>{if(E){const t=m1(e,{doc:n,mirror:r,blockClass:a,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:w,preserveWhiteSpace:I,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:z});t&&E(e,t)}}),A),P}function Ope(e,t){const{mirror:n=new ZB,blockClass:r="rr-block",blockSelector:a=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:s="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:f=!0,inlineImages:d=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOM:v=!1,dataURLOptions:b,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:x,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:A=()=>!1}=t;return m1(e,{doc:e,mirror:n,blockClass:r,blockSelector:a,unblockSelector:o,maskAllText:i,maskTextClass:s,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===h?{}:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===v,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===v?{}:v,dataURLOptions:b,inlineImages:d,recordCanvas:p,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:x,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:A,newlyAddedElement:!1})}function sp(e){let t,n=e[0],r=1;for(;r<e.length;){const a=e[r],o=e[r+1];if(r+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return;"access"===a||"optionalAccess"===a?(t=n,n=o(n)):("call"===a||"optionalCall"===a)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function ni(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const l1="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let zD={map:{},getId:()=>(console.error(l1),-1),getNode:()=>(console.error(l1),null),removeNodeFromMap(){console.error(l1)},has:()=>(console.error(l1),!1),reset(){console.error(l1)}};function p_(e,t,n={}){let r=null,a=0;return function(...o){const i=Date.now();!a&&!1===n.leading&&(a=i);const s=t-(i-a),c=this;s<=0||s>t?(r&&(Fpe(r),r=null),a=i,e.apply(c,o)):!r&&!1!==n.trailing&&(r=Gk((()=>{a=!1===n.leading?0:Date.now(),r=null,e.apply(c,o)}),s))}}function aV(e,t,n,r,a=window){const o=a.Object.getOwnPropertyDescriptor(e,t);return a.Object.defineProperty(e,t,r?n:{set(e){Gk((()=>{n.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>aV(e,t,o||{},!0)}function JT(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],a=n(r);return"function"==typeof a&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=a,()=>{e[t]=r}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(zD=new Proxy(zD,{get:(e,t,n)=>("map"===t&&console.error(l1),Reflect.get(e,t,n))}));let Sw=Date.now;function oV(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:sp([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||sp([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||sp([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:sp([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||sp([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||sp([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function iV(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function sV(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function cV(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function es(e,t,n,r,a){if(!e)return!1;const o=cV(e);if(!o)return!1;const i=h1(t,n);if(!a){const e=r&&o.matches(r);return i(o)&&!e}const s=om(o,i);let c=-1;return!(s<0)&&(r&&(c=om(o,h1(null,r))),s>-1&&c<0||s<c)}function zpe(e,t){return-1!==t.getId(e)}function B4(e,t){return-2===t.getId(e)}function lV(e,t){if(Fy(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||lV(e.parentNode,t))}function uR(e){return!!e.changedTouches}function Mpe(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}function fV(e,t){return!("IFRAME"!==e.nodeName||!t.getMeta(e))}function uV(e,t){return!("LINK"!==e.nodeName||e.nodeType!==e.ELEMENT_NODE||!e.getAttribute||"stylesheet"!==e.getAttribute("rel")||!t.getMeta(e))}function dR(e){return!!sp([e,"optionalAccess",e=>e.shadowRoot])}/[1-9][0-9]{12}/.test(Date.now().toString())||(Sw=()=>(new Date).getTime());class Dpe{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return Wue(this.styleIDMap.get(e),(()=>-1))}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function dV(e){let t=null;return sp([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Npe(e){let t,n=e;for(;t=dV(n);)n=t;return n}function Lpe(e){const t=e.ownerDocument;if(!t)return!1;const n=Npe(e);return t.contains(n)}function pV(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||Lpe(e))}const MD={};function eI(e){const t=MD[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const a=t.contentWindow;a&&a[e]&&(r=a[e]),n.head.removeChild(t)}catch{}return MD[e]=r.bind(window)}function jpe(...e){return eI("requestAnimationFrame")(...e)}function Gk(...e){return eI("setTimeout")(...e)}function Fpe(...e){return eI("clearTimeout")(...e)}var DD,ND,Gt=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Gt||{}),zt=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(zt||{}),ei=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ei||{}),ou=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ou||{});function tI(e){try{return e.contentDocument}catch{}}function Bpe(e){try{return e.contentWindow}catch{}}function Vpe(e){let t,n=e[0],r=1;for(;r<e.length;){const a=e[r],o=e[r+1];if(r+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return;"access"===a||"optionalAccess"===a?(t=n,n=o(n)):("call"===a||"optionalCall"===a)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function LD(e){return"__ln"in e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(DD||(DD={})),function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(ND||(ND={}));class Upe{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=Vpe([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&LD(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&LD(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const jD=(e,t)=>`${e}@${t}`;class qpe{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new Upe,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},a=a=>{if(!a.parentNode||!pV(a))return;const o=Fy(a.parentNode)?this.mirror.getId(dV(a)):this.mirror.getId(a.parentNode),i=r(a);if(-1===o||-1===i)return n.addNode(a);const s=m1(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{fV(e,this.mirror)&&!es(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),uV(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),dR(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{es(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});s&&(e.push({parentId:o,nextId:i,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)FD(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||a(e);for(const e of this.addedSet)!BD(this.droppedSet,e)&&!FD(this.removes,e,this.mirror)||BD(this.movedSet,e)?a(e):this.droppedSet.add(e);let o=null;for(;n.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),n=r(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),a(e.value)}const i={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};!i.texts.length&&!i.attributes.length&&!i.removes.length&&!i.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(i))},this.processMutation=e=>{if(!B4(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;!es(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:O1(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,cV(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=ZT(t),a=t.tagName;r=kw(t,a,n);const o=Wk({maskInputOptions:this.maskInputOptions,tagName:a,type:n});r=u_({isMasked:O1(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:t,value:r,maskInputFn:this.maskInputFn})}if(es(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let a=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(tI(t))return;n="rr_src"}if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!rV(t.tagName,n)&&(a.attributes[n]=nV(this.doc,$1(t.tagName),$1(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||o!==n.style.getPropertyPriority(e)?a.styleDiff[e]=""===o?r:[r,o]:a._unchangedStyles[e]=[r,o]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(a.styleDiff[e]=!1)}break}case"childList":if(es(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=Fy(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);es(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||B4(t,this.mirror)||!zpe(t,this.mirror)||(this.addedSet.has(t)?(pR(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||lV(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[jD(n,r)]?pR(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!Fy(e.target)||!By(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(B4(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[jD(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);es(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),dR(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function pR(e,t){e.delete(t),t.childNodes.forEach((t=>pR(e,t)))}function FD(e,t,n){return 0!==e.length&&Wpe(e,t,n)}function Wpe(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some((e=>e.id===t)))return!0;r=r.parentNode}return!1}function BD(e,t){return 0!==e.size&&hV(e,t)}function hV(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||hV(e,n))}let Vy;function Hpe(e){Vy=e}function Gpe(){Vy=void 0}const pn=e=>Vy?(...t)=>{try{return e(...t)}catch(e){if(Vy&&!0===Vy(e))return()=>{};throw e}}:e;function Tc(e){let t,n=e[0],r=1;for(;r<e.length;){const a=e[r],o=e[r+1];if(r+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return;"access"===a||"optionalAccess"===a?(t=n,n=o(n)):("call"===a||"optionalCall"===a)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const g1=[];function rv(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function mV(e,t){const n=new qpe;g1.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const a=Tc([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);a&&window[a]&&(r=window[a]);const o=new r(pn((t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)})));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Kpe({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const a="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,s=[];const c=p_(pn((t=>{const n=Date.now()-i;e(s.map((e=>(e.timeOffset-=n,e))),t),s=[],i=null})),o),l=pn(p_(pn((e=>{const t=rv(e),{clientX:n,clientY:a}=uR(e)?e.changedTouches[0]:e;i||(i=Sw()),s.push({x:n,y:a,id:r.getId(t),timeOffset:Sw()-i}),c(typeof DragEvent<"u"&&e instanceof DragEvent?zt.Drag:e instanceof MouseEvent?zt.MouseMove:zt.TouchMove)})),a,{trailing:!1})),u=[ni("mousemove",l,n),ni("touchmove",l,n),ni("drag",l,n)];return pn((()=>{u.forEach((e=>e()))}))}function Qpe({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:a,unblockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const s=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let l=null;return Object.keys(ei).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e])).forEach((i=>{let s=$1(i);const u=(t=>i=>{const s=rv(i);if(es(s,r,a,o,!0))return;let c=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=ou.Mouse;break;case"touch":c=ou.Touch;break;case"pen":c=ou.Pen}c===ou.Touch?ei[t]===ei.MouseDown?u="TouchStart":ei[t]===ei.MouseUp&&(u="TouchEnd"):ou.Pen}else uR(i)&&(c=ou.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===ou.Touch||u.startsWith("Mouse")&&c===ou.Mouse)&&(c=null)):ei[t]===ei.Click&&(c=l,l=null);const f=uR(i)?i.changedTouches[0]:i;if(!f)return;const d=n.getId(s),{clientX:p,clientY:h}=f;pn(e)({type:ei[u],id:d,x:p,y:h,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(ei[i]){case ei.MouseDown:case ei.MouseUp:s=s.replace("mouse","pointer");break;case ei.TouchStart:case ei.TouchEnd:return}c.push(ni(s,u,t))})),pn((()=>{c.forEach((e=>e()))}))}function gV({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:a,unblockSelector:o,sampling:i}){return ni("scroll",pn(p_(pn((i=>{const s=rv(i);if(!s||es(s,r,a,o,!0))return;const c=n.getId(s);if(s===t&&t.defaultView){const n=oV(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:s.scrollLeft,y:s.scrollTop})})),i.scroll||100)),t)}function Ype({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return ni("resize",pn(p_(pn((()=>{const t=iV(),a=sV();(n!==t||r!==a)&&(e({width:Number(a),height:Number(t)}),n=t,r=a)})),200)),t)}const Zpe=["INPUT","TEXTAREA","SELECT"],VD=new WeakMap;function Xpe({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:a,unblockSelector:o,ignoreClass:i,ignoreSelector:s,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:f,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:m}){function y(e){let n=rv(e);const u=e.isTrusted,y=n&&lR(n.tagName);if("OPTION"===y&&(n=n.parentElement),!n||!y||Zpe.indexOf(y)<0||es(n,r,a,o,!0))return;const v=n;if(v.classList.contains(i)||s&&v.matches(s))return;const b=ZT(n);let _=kw(v,y,b),w=!1;const k=Wk({maskInputOptions:c,tagName:y,type:b}),x=O1(n,d,h,p,m,k);("radio"===b||"checkbox"===b)&&(w=n.checked),_=u_({isMasked:x,element:n,value:_,maskInputFn:l}),g(n,f?{text:_,isChecked:w,userTriggered:u}:{text:_,isChecked:w});const S=n.name;"radio"===b&&S&&w&&t.querySelectorAll(`input[type="radio"][name="${S}"]`).forEach((e=>{if(e!==n){const t=u_({isMasked:x,element:e,value:kw(e,y,b),maskInputFn:l});g(e,f?{text:t,isChecked:!w,userTriggered:!1}:{text:t,isChecked:!w})}}))}function g(t,r){const a=VD.get(t);if(!a||a.text!==r.text||a.isChecked!==r.isChecked){VD.set(t,r);const a=n.getId(t);pn(e)({...r,id:a})}}const v=("last"===u.input?["change"]:["input","change"]).map((e=>ni(e,pn(y),t))),b=t.defaultView;if(!b)return()=>{v.forEach((e=>e()))};const _=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),w=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return _&&_.set&&v.push(...w.map((e=>aV(e[0],e[1],{set(){pn(y)({target:this,isTrusted:!1})}},!1,b)))),pn((()=>{v.forEach((e=>e()))}))}function Ew(e){return function(e,t){if(gb("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||gb("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||gb("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||gb("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function cp(e,t,n){let r,a;return e?(e.ownerNode?r=t.getId(e.ownerNode):a=n.getId(e),{styleId:a,id:r}):{}}function Jpe({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const a=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:pn(((r,a,o)=>{const[i,s]=o,{id:c,styleId:l}=cp(a,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:s}]}),r.apply(a,o)}))});const o=r.CSSStyleSheet.prototype.deleteRule;let i,s;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:pn(((r,a,o)=>{const[i]=o,{id:s,styleId:c}=cp(a,t,n.styleMirror);return(s&&-1!==s||c&&-1!==c)&&e({id:s,styleId:c,removes:[{index:i}]}),r.apply(a,o)}))}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:pn(((r,a,o)=>{const[i]=o,{id:s,styleId:c}=cp(a,t,n.styleMirror);return(s&&-1!==s||c&&-1!==c)&&e({id:s,styleId:c,replace:i}),r.apply(a,o)}))})),r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:pn(((r,a,o)=>{const[i]=o,{id:s,styleId:c}=cp(a,t,n.styleMirror);return(s&&-1!==s||c&&-1!==c)&&e({id:s,styleId:c,replaceSync:i}),r.apply(a,o)}))}));const c={};yb("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(yb("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),yb("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),yb("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach((([r,a])=>{l[r]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=new Proxy(l[r].insertRule,{apply:pn(((r,a,o)=>{const[i,s]=o,{id:c,styleId:l}=cp(a.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:[...Ew(a),s||0]}]}),r.apply(a,o)}))}),a.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:pn(((r,a,o)=>{const[i]=o,{id:s,styleId:c}=cp(a.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||c&&-1!==c)&&e({id:s,styleId:c,removes:[{index:[...Ew(a),i]}]}),r.apply(a,o)}))})})),pn((()=>{r.CSSStyleSheet.prototype.insertRule=a,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach((([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule}))}))}function yV({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const a="#document"===n.nodeName?Tc([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):Tc([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),o=Tc([a,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(Tc([a,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&a&&o?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return Tc([o,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=Tc([o,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch{}return n}}),pn((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))):()=>{}}function ehe({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:a}){const o=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:pn(((a,i,s)=>{const[c,l,u]=s;if(n.has(c))return o.apply(i,[c,l,u]);const{id:f,styleId:d}=cp(Tc([i,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(f&&-1!==f||d&&-1!==d)&&e({id:f,styleId:d,set:{property:c,value:l,priority:u},index:Ew(i.parentRule)}),a.apply(i,s)}))});const i=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:pn(((a,o,s)=>{const[c]=s;if(n.has(c))return i.apply(o,[c]);const{id:l,styleId:u}=cp(Tc([o,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,remove:{property:c},index:Ew(o.parentRule)}),a.apply(o,s)}))}),pn((()=>{a.CSSStyleDeclaration.prototype.setProperty=o,a.CSSStyleDeclaration.prototype.removeProperty=i}))}function the({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:a,sampling:o,doc:i}){const s=pn((i=>p_(pn((o=>{const s=rv(o);if(!s||es(s,t,n,r,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:f}=s;e({type:i,id:a.getId(s),currentTime:c,volume:l,muted:u,playbackRate:f})})),o.media||500))),c=[ni("play",s(0),i),ni("pause",s(1),i),ni("seeked",s(2),i),ni("volumechange",s(3),i),ni("ratechange",s(4),i)];return pn((()=>{c.forEach((e=>e()))}))}function nhe({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],a=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){const r=new o(e,t,n);return a.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=JT(t.fonts,"add",(function(t){return function(n){return Gk(pn((()=>{const t=a.get(n);t&&(e(t),a.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=o})),r.push(i),pn((()=>{r.forEach((e=>e()))}))}function rhe(e){const{doc:t,mirror:n,blockClass:r,blockSelector:a,unblockSelector:o,selectionCb:i}=e;let s=!0;const c=pn((()=>{const e=t.getSelection();if(!e||s&&Tc([e,"optionalAccess",e=>e.isCollapsed]))return;s=e.isCollapsed||!1;const c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:s,startOffset:l,endContainer:u,endOffset:f}=i;es(s,r,a,o,!0)||es(u,r,a,o,!0)||c.push({start:n.getId(s),startOffset:l,end:n.getId(u),endOffset:f})}i({ranges:c})}));return c(),ni("selectionchange",c)}function ahe({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?JT(n.customElements,"define",(function(e){return function(n,r,a){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,a])}})):()=>{}}function ohe(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=mV(e,e.doc));const a=Kpe(e),o=Qpe(e),i=gV(e),s=Ype(e,{win:n}),c=Xpe(e),l=the(e);let u=()=>{},f=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(u=Jpe(e,{win:n}),f=yV(e,e.doc),d=ehe(e,{win:n}),e.collectFonts&&(p=nhe(e)));const h=rhe(e),m=ahe(e),y=[];for(const t of e.plugins)y.push(t.observer(t.callback,n,t.options));return pn((()=>{g1.forEach((e=>e.reset())),Tc([r,"optionalAccess",e=>e.disconnect,"call",e=>e()]),a(),o(),i(),s(),c(),l(),u(),f(),d(),p(),h(),m(),y.forEach((e=>e()))}))}function gb(e){return typeof window[e]<"u"}function yb(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class hR{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const a=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e);let i=a.get(t);return i||(i=this.generateIdFn(),a.set(t,i),o.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return r.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function UD(e){let t,n=e[0],r=1;for(;r<e.length;){const a=e[r],o=e[r+1];if(r+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return;"access"===a||"optionalAccess"===a?(t=n,n=o(n)):("call"===a||"optionalCall"===a)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}class ihe{constructor(){this.crossOriginIframeMirror=new hR(XT),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class she{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new hR(XT),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new hR(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),UD([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]);const n=tI(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case Gt.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Gt.IncrementalSnapshot,data:{source:zt.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Gt.Meta:case Gt.Load:case Gt.DomContentLoaded:return!1;case Gt.Plugin:return t;case Gt.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Gt.IncrementalSnapshot:switch(t.data.source){case zt.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case zt.Drag:case zt.TouchMove:case zt.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case zt.ViewportResize:return!1;case zt.MediaInteraction:case zt.MouseInteraction:case zt.Scroll:case zt.CanvasMutation:case zt.Input:return this.replaceIds(t.data,e,["id"]),t;case zt.StyleSheetRule:case zt.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case zt.Font:return t;case zt.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case zt.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),UD([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t((t=>{this.replaceStyleIds(t,e,["styleId"])}))]),t}}return!1}replace(e,t,n,r){for(const a of r)!Array.isArray(t[a])&&"number"!=typeof t[a]||(Array.isArray(t[a])?t[a]=e.getIds(n,t[a]):t[a]=e.getId(n,t[a]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type!==Ca.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class che{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class lhe{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!By(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=mV({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(gV({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),Gk((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(yV({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){const t=tI(e),n=Bpe(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(JT(e.prototype,"attachShadow",(function(e){return function(r){const a=e.call(this,r);return this.shadowRoot&&pV(this)&&n.addShadowRoot(this.shadowRoot,t),a}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch{}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class qD{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class fhe{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Dpe,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,t)=>({rule:YB(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class uhe{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,jpe((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let Tr,Cw;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Lb([e,"access",e=>e.contentWindow,"optionalAccess",e=>e.Array,"access",e=>e.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Rc=fpe();function _u(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:a="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:s="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:f=null,maskTextSelector:d=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,maxCanvasSize:w=null,packFn:k,sampling:x={},dataURLOptions:S={},mousemoveWait:E,recordDOM:A=!0,recordCanvas:z=!1,recordCrossOriginIframes:C=!1,recordAfter:I=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:T=!1,collectFonts:R=!1,inlineImages:P=!1,plugins:j,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:N=new Set([]),errorHandler:M,onMutation:D,getCanvasManager:B}=e;Hpe(M);const L=!C||window.parent===window;let V=!1;if(!L)try{window.parent.document&&(V=!1)}catch{V=!0}if(L&&!t)throw new Error("emit function is required");if(!L&&!V)return()=>{};void 0!==E&&void 0===x.mousemove&&(x.mousemove=E),Rc.reset();const q=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==y?y:{},F=!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===g,headMetaDescKeywords:"all"===g}:g||{};Mpe();let U,$=0;const W=e=>{for(const t of j||[])t.eventProcessor&&(e=t.eventProcessor(e));return k&&!V&&(e=k(e)),e};Tr=(e,a)=>{const o=e;if(o.timestamp=Sw(),Lb([g1,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])&&o.type!==Gt.FullSnapshot&&!(o.type===Gt.IncrementalSnapshot&&o.data.source===zt.Mutation)&&g1.forEach((e=>e.unfreeze())),L)Lb([t,"optionalCall",e=>e(W(o),a)]);else if(V){const e={type:"rrweb",event:W(o),origin:window.location.origin,isCheckout:a};window.parent.postMessage(e,"*")}if(o.type===Gt.FullSnapshot)U=o,$=0;else if(o.type===Gt.IncrementalSnapshot){if(o.data.source===zt.Mutation&&o.data.isAttachIframe)return;$++;const e=r&&$>=r,t=n&&U&&o.timestamp-U.timestamp>n;(e||t)&&ee(!0)}};const H=e=>{Tr({type:Gt.IncrementalSnapshot,data:{source:zt.Mutation,...e}})},G=e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.Scroll,...e}}),Q=e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.CanvasMutation,...e}}),K=new fhe({mutationCb:H,adoptedStyleSheetCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.AdoptedStyleSheet,...e}})}),Y="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new ihe:new she({mirror:Rc,mutationCb:H,stylesheetManager:K,recordCrossOriginIframes:C,wrappedEmit:Tr});for(const e of j||[])e.getMirror&&e.getMirror({nodeMirror:Rc,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});const Z=new uhe,X=phe(B,{mirror:Rc,win:window,mutationCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.CanvasMutation,...e}}),recordCanvas:z,blockClass:a,blockSelector:o,unblockSelector:i,maxCanvasSize:w,sampling:x.canvas,dataURLOptions:S,errorHandler:M}),J="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new che:new lhe({mutationCb:H,scrollCb:G,bypassOptions:{onMutation:D,blockClass:a,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:q,dataURLOptions:S,maskAttributeFn:v,maskTextFn:_,maskInputFn:b,recordCanvas:z,inlineImages:P,sampling:x,slimDOMOptions:F,iframeManager:Y,stylesheetManager:K,canvasManager:X,keepIframeSrcFn:O,processedNodeManager:Z},mirror:Rc}),ee=(e=!1)=>{if(!A)return;Tr({type:Gt.Meta,data:{href:window.location.href,width:sV(),height:iV()}},e),K.reset(),J.init(),g1.forEach((e=>e.lock()));const t=Ope(document,{mirror:Rc,blockClass:a,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:q,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,slimDOM:F,dataURLOptions:S,recordCanvas:z,inlineImages:P,onSerialize:e=>{fV(e,Rc)&&Y.addIframe(e),uV(e,Rc)&&K.trackLinkElement(e),dR(e)&&J.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Y.attachIframe(e,t),e.contentWindow&&X.addWindow(e.contentWindow),J.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{K.attachLinkElement(e,t)},keepIframeSrcFn:O});if(!t)return console.warn("Failed to snapshot the document");Tr({type:Gt.FullSnapshot,data:{node:t,initialOffset:oV(window)}}),g1.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&K.adoptStyleSheets(document.adoptedStyleSheets,Rc.getId(document))};Cw=ee;try{const e=[],t=e=>pn(ohe)({onMutation:D,mutationCb:H,mousemoveCb:(e,t)=>Tr({type:Gt.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.MouseInteraction,...e}}),scrollCb:G,viewportResizeCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.ViewportResize,...e}}),inputCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.Input,...e}}),mediaInteractionCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.MediaInteraction,...e}}),styleSheetRuleCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.StyleSheetRule,...e}}),styleDeclarationCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.StyleDeclaration,...e}}),canvasMutationCb:Q,fontCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.Font,...e}}),selectionCb:e=>{Tr({type:Gt.IncrementalSnapshot,data:{source:zt.Selection,...e}})},customElementCb:e=>{Tr({type:Gt.IncrementalSnapshot,data:{source:zt.CustomElement,...e}})},blockClass:a,ignoreClass:s,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,maskInputOptions:q,inlineStylesheet:h,sampling:x,recordDOM:A,recordCanvas:z,inlineImages:P,userTriggeredOnInput:T,collectFonts:R,doc:e,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,keepIframeSrcFn:O,blockSelector:o,unblockSelector:i,slimDOMOptions:F,dataURLOptions:S,mirror:Rc,iframeManager:Y,stylesheetManager:K,shadowDomManager:J,processedNodeManager:Z,canvasManager:X,ignoreCSSAttributes:N,plugins:Lb([j,"optionalAccess",e=>e.filter,"call",e=>e((e=>e.observer)),"optionalAccess",e=>e.map,"call",e=>e((e=>({observer:e.observer,options:e.options,callback:t=>Tr({type:Gt.Plugin,data:{plugin:e.name,payload:t}})})))])||[]},{});Y.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{ee(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(ni("DOMContentLoaded",(()=>{Tr({type:Gt.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&n()}))),e.push(ni("load",(()=>{Tr({type:Gt.Load,data:{}}),"load"===I&&n()}),window))),()=>{e.forEach((e=>e())),Z.destroy(),Cw=void 0,Gpe()}}catch(e){console.warn(e)}}function dhe(e){if(!Cw)throw new Error("please take full snapshot after start recording");Cw(e)}function phe(e,t){try{return e?e(t):new qD}catch{return console.warn("Unable to initialize CanvasManager"),new qD}}_u.mirror=Rc,_u.takeFullSnapshot=dhe;const hhe=3,mhe=5;function nI(e){return e>9999999999?e:1e3*e}function V4(e){return e>9999999999?e/1e3:e}function av(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:Gt.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:lu(t,10,1e3)}}),"console"===t.category))))}const ghe="button,a";function _V(e){return e.closest(ghe)||e}function vV(e){const t=bV(e);return t&&t instanceof Element?_V(t):t}function bV(e){return yhe(e)?e.target:e}function yhe(e){return"object"==typeof e&&!!e&&"target"in e}let lp;function _he(e){return lp||(lp=[],vhe()),lp.push(e),()=>{const t=lp?lp.indexOf(e):-1;t>-1&&lp.splice(t,1)}}function vhe(){Fs(Xn,"open",(function(e){return function(...t){if(lp)try{lp.forEach((e=>e()))}catch{}return e.apply(Xn,t)}}))}const bhe=new Set([zt.Mutation,zt.StyleSheetRule,zt.StyleDeclaration,zt.AdoptedStyleSheet,zt.CanvasMutation,zt.Selection,zt.MediaInteraction]);function whe(e,t,n){e.handleClick(t,n)}class khe{constructor(e,t,n=av){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=_he((()=>{this._lastMutation=WD()}));this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(She(t,this._ignoreSelector)||!Ehe(e))return;const n={timestamp:V4(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=V4(e)}registerScroll(e=Date.now()){this._lastScroll=V4(e)}registerClick(e){const t=_V(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=WD();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,a=!n&&!r,{clickCount:o,clickBreadcrumb:i}=e;if(a){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",a={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:Xn.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:o||1}};this._addBreadcrumbEvent(t,a)}else if(o>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:Xn.location.href,route:t.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=P1((()=>this._checkClicks()),1e3)}}const xhe=["A","BUTTON","INPUT"];function She(e,t){return!!(!xhe.includes(e.tagName)||"INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||"A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target"))||t&&e.matches(t))}function Ehe(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}function WD(){return Date.now()/1e3}function Che(e,t){try{if(!Rhe(t))return;const{source:n}=t.data;if(bhe.has(n)&&e.registerMutation(t.timestamp),n===zt.Scroll&&e.registerScroll(t.timestamp),Ahe(t)){const{type:n,id:r}=t.data,a=_u.mirror.getNode(r);a instanceof HTMLElement&&n===ei.Click&&e.registerClick(a)}}catch{}}function Rhe(e){return 3===e.type}function Ahe(e){return e.data.source===zt.MouseInteraction}function jl(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Rw;!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Rw||(Rw={}));const The=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Ihe(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(The.has(n)){let r=n;("data-testid"===n||"data-test-id"===n)&&(r="testId"),t[r]=e[n]}return t}const Phe=e=>t=>{if(!e.isEnabled())return;const n=$he(t);if(!n)return;const r="click"===t.name,a=r?t.event:void 0;r&&e.clickDetector&&a&&a.target&&!a.altKey&&!a.metaKey&&!a.ctrlKey&&!a.shiftKey&&whe(e.clickDetector,n,vV(t.event)),av(e,n)};function wV(e,t){const n=_u.mirror.getId(e),r=n&&_u.mirror.getNode(n),a=r&&_u.mirror.getMeta(r),o=a&&zhe(a)?a:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map((e=>e.type===Rw.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:Ihe(o.attributes)}}:{}}}function $he(e){const{target:t,message:n}=Ohe(e);return jl({category:`ui.${e.name}`,...wV(t,n)})}function Ohe(e){const t="click"===e.name;let n,r=null;try{r=t?vV(e.event):bV(e.event),n=VT(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function zhe(e){return e.type===Rw.Element}function Mhe(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=Dhe(t);n&&av(e,n)}function Dhe(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:a,key:o,target:i}=e;if(!i||Nhe(i)||!o)return null;const s=t||r||a,c=1===o.length;if(!s&&c)return null;const l=VT(i,{maxStringLength:200})||"<unknown>";return jl({category:"ui.keyDown",message:l,data:{...wV(i,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:a,key:o}})}function Nhe(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}const Lhe={resource:Uhe,paint:Bhe,navigation:Vhe};function _b(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function jhe(e){return e.map(Fhe).filter(Boolean)}function Fhe(e){const t=Lhe[e.entryType];return t?t(e):null}function z1(e){return((_fe||Xn.performance.timeOrigin)+e)/1e3}function Bhe(e){const{duration:t,entryType:n,name:r,startTime:a}=e,o=z1(a);return{type:n,name:r,start:o,end:o+t,data:void 0}}function Vhe(e){const{entryType:t,name:n,decodedBodySize:r,duration:a,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:f,redirectCount:d,startTime:p,transferSize:h,type:m}=e;return 0===a?null:{type:`${t}.${m}`,start:z1(p),end:z1(o),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:a,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:f,domComplete:o,redirectCount:d}}}function Uhe(e){const{entryType:t,initiatorType:n,name:r,responseEnd:a,startTime:o,decodedBodySize:i,encodedBodySize:s,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:z1(o),end:z1(a),name:r,data:{size:l,statusCode:c,decodedBodySize:i,encodedBodySize:s}}}function qhe(e){const t=e.entries[e.entries.length-1];return Kk(e,"largest-contentful-paint",t&&t.element?[t.element]:void 0)}function Whe(e){return void 0!==e.sources}function Hhe(e){const t=[],n=[];for(const r of e.entries)if(Whe(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=_u.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return Kk(e,"cumulative-layout-shift",n,t)}function Ghe(e){const t=e.entries[e.entries.length-1];return Kk(e,"first-input-delay",t&&t.target?[t.target]:void 0)}function Khe(e){const t=e.entries[e.entries.length-1];return Kk(e,"interaction-to-next-paint",t&&t.target?[t.target]:void 0)}function Kk(e,t,n,r){const a=e.value,o=e.rating,i=z1(a);return{type:"web-vital",name:t,start:i,end:i,data:{value:a,size:a,rating:o,nodeIds:n?n.map((e=>_u.mirror.getId(e))):void 0,attributions:r}}}function Qhe(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push(wde(e,n))})),r.push(_de(_b(qhe,e)),yde(_b(Hhe,e)),vde(_b(Ghe,e)),bde(_b(Khe,e))),()=>{r.forEach((e=>e()))}}const At=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Yhe='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(a[t]^a[t+1]<<A^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=U(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Zhe(){const e=new Blob([Yhe]);return URL.createObjectURL(e)}const HD=["info","warn","error","log"],jb="[Replay] ";function U4(e,t="info"){$ue({category:"console",data:{logger:"replay"},level:t,message:`${jb}${e}`},{level:t})}function Xhe(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=n.captureExceptions,t=n.traceInternals}};return At?(HD.forEach((e=>{n[e]=(...n)=>{ri[e](jb,...n),t&&U4(n.join(""),Oue(e))}})),n.exception=(r,...a)=>{a.length&&n.error&&n.error(...a),ri.error(jb,r),e?WT(r):t&&U4(r,"error")},n.infoTick=(...e)=>{ri.info(jb,...e),t&&setTimeout((()=>U4(e[0])),0)}):HD.forEach((e=>{n[e]=()=>{}})),n}const Pt=Xhe();class rI extends Error{constructor(){super(`Event buffer exceeded maximum size of ${YT}.`)}}class kV{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>YT)throw new rI;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?nI(e):null}}class Jhe{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){At&&Pt.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,a)=>{const o=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",o),!i.success)return At&&Pt.error("Error in compression worker: ",i.response),void a(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class eme{constructor(e){this._worker=new Jhe(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=nI(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>YT?Promise.reject(new rI):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{At&&Pt.exception(e,'Sending "clear" message to worker failed',e)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class tme{constructor(e){this._fallback=new kV,this._compression=new eme(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(At&&Pt.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){At&&Pt.exception(e,"Failed to add events when switching buffers.")}}}function nme({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=rme(t);if(e)return e}return At&&Pt.info("Using simple buffer"),new kV}function rme(e){try{const t=e||ame();if(!t)return;At&&Pt.info("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new tme(n)}catch(e){At&&Pt.exception(e,"Failed to create compression worker")}}function ame(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Zhe():""}function aI(){try{return"sessionStorage"in Xn&&!!Xn.sessionStorage}catch{return!1}}function ome(e){ime(),e.session=void 0}function ime(){if(aI())try{Xn.sessionStorage.removeItem(KT)}catch{}}function xV(e){return void 0!==e&&Math.random()<e}function SV(e){const t=Date.now();return{id:e.id||yu(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function oI(e){if(aI())try{Xn.sessionStorage.setItem(KT,JSON.stringify(e))}catch{}}function sme(e,t){return xV(e)?"session":!!t&&"buffer"}function GD({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const a=SV({sampled:sme(e,t),previousSessionId:r});return n&&oI(a),a}function cme(){if(!aI())return null;try{const e=Xn.sessionStorage.getItem(KT);if(!e)return null;const t=JSON.parse(e);return At&&Pt.infoTick("Loading existing session"),SV(t)}catch{return null}}function mR(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function EV(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return mR(e.started,t,r)||mR(e.lastActivity,n,r)}function CV(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!EV(e,{sessionIdleExpire:t,maxReplayDuration:n})||"buffer"===e.sampled&&0===e.segmentId)}function q4({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const a=r.stickySession&&cme();return a?CV(a,{sessionIdleExpire:e,maxReplayDuration:t})?(At&&Pt.infoTick("Session in sessionStorage is expired, creating new one..."),GD(r,{previousSessionId:a.id})):a:(At&&Pt.infoTick("Creating new session"),GD(r,{previousSessionId:n}))}function lme(e){return e.type===Gt.Custom}function iI(e,t,n){return!!AV(e,t)&&(RV(e,t,n),!0)}function fme(e,t,n){return AV(e,t)?RV(e,t,n):Promise.resolve(null)}async function RV(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const a="buffer"===e.recordingMode;try{n&&a&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=ume(t,e.getOptions().beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(t){const n=t&&t instanceof rI,o=n?"addEventSizeExceeded":"addEvent";if(n&&a)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:o});const i=ef();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function AV(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=nI(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(At&&Pt.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function ume(e,t){try{if("function"==typeof t&&lme(e))return t(e)}catch(e){return At&&Pt.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function sI(e){return!e.type}function gR(e){return"transaction"===e.type}function dme(e){return"replay_event"===e.type}function KD(e){return"feedback"===e.type}function pme(e){return(t,n)=>{if(!e.isEnabled()||!sI(t)&&!gR(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(gR(t))return void hme(e,t);mme(e,t)}}}function hme(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function mme(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();"function"==typeof r&&!r(t)||P1((async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}}))}function gme(e){return t=>{!e.isEnabled()||!sI(t)||yme(e,t)}}function yme(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if("string"==typeof n&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){av(e,jl({category:"replay.hydrate-error",data:{url:dfe()}}))}}function _me(e){const t=ef();t&&t.on("beforeAddBreadcrumb",(t=>vme(e,t)))}function vme(e,t){if(!e.isEnabled()||!TV(t))return;const n=bme(t);n&&av(e,n)}function bme(e){return!TV(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?wme(e):jl(e)}function wme(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return jl(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>mb?(n=!0,`${e.slice(0,mb)}…`):e;if("object"==typeof e)try{const t=lu(e,7);return JSON.stringify(t).length>mb?(n=!0,`${JSON.stringify(t,null,2).slice(0,mb)}…`):t}catch{}return e}));return jl({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function TV(e){return!!e.category}function kme(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length)&&!(!t.originalException||!t.originalException.__rrweb__)}function IV(){const e=J1().getPropagationContext().dsc;e&&delete e.replay_id;const t=MB();if(t){delete NB(t).replay_id}}function xme(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:Gt.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}function Sme(e,t){return!("buffer"!==e.recordingMode||t.message===QT||!t.exception||t.type)&&xV(e.getOptions().errorSampleRate)}function Eme(e){return Object.assign(((t,n)=>!e.isEnabled()||e.isPaused()?t:dme(t)?(delete t.breadcrumbs,t):sI(t)||gR(t)||KD(t)?e.checkAndHandleExpiredSession()?KD(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),xme(e,t),t):kme(t,n)&&!e.getOptions()._experiments.captureExceptions?(At&&Pt.log("Ignoring error from rrweb internals",t),null):((Sme(e,t)||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(IV(),t):t),{id:"Replay"})}function Qk(e,t){return t.map((({type:t,start:n,end:r,name:a,data:o})=>{const i=e.throttledAddEvent({type:Gt.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:a,startTimestamp:n,endTimestamp:r,data:o}}});return"string"==typeof i?Promise.resolve(null):i}))}function Cme(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Rme(e){return t=>{if(!e.isEnabled())return;const n=Cme(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(Qk(e,[n]),!1))))}}function Ame(e,t){return(!At||!e.getOptions()._experiments.traceInternals)&&Aue(t,ef())}function PV(e,t){e.isEnabled()&&null!==t&&(Ame(e,t.name)||e.addUpdate((()=>(Qk(e,[t]),!0))))}function Yk(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=MV(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function $V(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function OV(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[MV(e)];if(!e)return[void 0]}catch(t){return At&&Pt.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return At&&Pt.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Aw(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function zV(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:a,method:o,statusCode:i,request:s,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:a,data:Pc({method:o,statusCode:i,request:s,response:c})}}function h_(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function _p(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:a,warnings:o}=Tme(n);return r.body=a,o&&o.length>0&&(r._meta={warnings:o}),r}function yR(e,t){return Object.entries(e).reduce(((n,[r,a])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=a),n}),{})}function MV(e){return new URLSearchParams(e).toString()}function Tme(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>AD,n=Ime(e);if(t){const t=e.slice(0,AD);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Ime(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}function Tw(e,t){return hfe(Pme(e),t)}function Pme(e,t=Xn.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Xn.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function $me(e,t,n){try{const r=zV("resource.fetch",await zme(e,t,n));PV(n.replay,r)}catch(e){At&&Pt.exception(e,"Failed to capture fetch breadcrumb")}}function Ome(e,t){const{input:n,response:r}=t,a=Yk(n?DV(n):void 0),o=r?$V(r.headers.get("content-length")):void 0;void 0!==a&&(e.data.request_body_size=a),void 0!==o&&(e.data.response_body_size=o)}async function zme(e,t,n){const r=Date.now(),{startTimestamp:a=r,endTimestamp:o=r}=t,{url:i,method:s,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,f=Tw(i,n.networkDetailAllowUrls)&&!Tw(i,n.networkDetailDenyUrls);return{startTimestamp:a,endTimestamp:o,url:i,method:s,statusCode:c,request:f?Mme(n,t.input,l):h_(l),response:await Dme(f,n,t.response,u)}}function Mme({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const a=n?jme(n,t):{};if(!e)return _p(a,r,void 0);const o=DV(n),[i,s]=OV(o),c=_p(a,r,i);return s?Aw(c,s):c}async function Dme(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,a){if(!e&&void 0!==a)return h_(a);const o=r?NV(r.headers,n):{};if(!r||!t&&void 0!==a)return _p(o,a,void 0);const[i,s]=await Lme(r),c=Nme(i,{networkCaptureBodies:t,responseBodySize:a,captureDetails:e,headers:o});return s?Aw(c,s):c}function Nme(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:a}){try{const o=e&&e.length&&void 0===n?Yk(e):n;return r?_p(a,o,t?e:void 0):h_(o)}catch(e){return At&&Pt.exception(e,"Failed to serialize response body"),_p(a,n,void 0)}}async function Lme(e){const t=Fme(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Bme(t)]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(At&&Pt.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(At&&Pt.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function DV(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function NV(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function jme(e,t){return 1===e.length&&"string"!=typeof e[0]?QD(e[0],t):2===e.length?QD(e[1],t):{}}function QD(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?NV(n,t):Array.isArray(n)?{}:yR(n,t):{}}function Fme(e){try{return e.clone()}catch(e){At&&Pt.exception(e,"Failed to clone response body")}}function Bme(e){return new Promise(((t,n)=>{const r=P1((()=>n(new Error("Timeout while trying to read response body"))),500);Vme(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}async function Vme(e){return await e.text()}async function Ume(e,t,n){try{const r=zV("resource.xhr",Wme(e,t,n));PV(n.replay,r)}catch(e){At&&Pt.exception(e,"Failed to capture xhr breadcrumb")}}function qme(e,t){const{xhr:n,input:r}=t;if(!n)return;const a=Yk(r),o=n.getResponseHeader("content-length")?$V(n.getResponseHeader("content-length")):Qme(n.response,n.responseType);void 0!==a&&(e.data.request_body_size=a),void 0!==o&&(e.data.response_body_size=o)}function Wme(e,t,n){const r=Date.now(),{startTimestamp:a=r,endTimestamp:o=r,input:i,xhr:s}=t,{url:c,method:l,status_code:u=0,request_body_size:f,response_body_size:d}=e.data;if(!c)return null;if(!s||!Tw(c,n.networkDetailAllowUrls)||Tw(c,n.networkDetailDenyUrls)){return{startTimestamp:a,endTimestamp:o,url:c,method:l,statusCode:u,request:h_(f),response:h_(d)}}const p=s[Dde],h=p?yR(p.request_headers,n.networkRequestHeaders):{},m=yR(Hme(s),n.networkResponseHeaders),[y,g]=n.networkCaptureBodies?OV(i):[void 0],[v,b]=n.networkCaptureBodies?Gme(s):[void 0],_=_p(h,f,y),w=_p(m,d,v);return{startTimestamp:a,endTimestamp:o,url:c,method:l,statusCode:u,request:g?Aw(_,g):_,response:b?Aw(w,b):w}}function Hme(e){const t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e}),{}):{}}function Gme(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return Kme(e.response,e.responseType)}catch(e){t.push(e)}return At&&Pt.warn("Failed to get xhr response body",...t),[void 0]}function Kme(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return At&&Pt.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return At&&Pt.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Qme(e,t){try{return Yk("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}function Yme(e){const t=ef();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:a,networkRequestHeaders:o,networkResponseHeaders:i}=e.getOptions(),s={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:a,networkRequestHeaders:o,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",((e,t)=>Zme(s,e,t)))}catch{}}function Zme(e,t,n){if(t.data)try{Xme(t)&&ege(n)&&(qme(t,n),Ume(t,n,e)),Jme(t)&&tge(n)&&(Ome(t,n),$me(t,n,e))}catch(e){At&&Pt.exception(e,"Error when enriching network breadcrumb")}}function Xme(e){return"xhr"===e.category}function Jme(e){return"fetch"===e.category}function ege(e){return e&&e.xhr}function tge(e){return e&&e.response}function nge(e){const t=ef();Ade(Phe(e)),Ode(Rme(e)),_me(e),Yme(e);kue(Eme(e)),t&&(t.on("beforeSendEvent",gme(e)),t.on("afterSendEvent",pme(e)),t.on("createDsc",(t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)})),t.on("spanStart",(t=>{e.lastActiveSpan=t})),t.on("spanEnd",(t=>{e.lastActiveSpan=t})),t.on("beforeSendFeedback",((t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)})))}async function rge(e){try{return Promise.all(Qk(e,[age(Xn.performance.memory)]))}catch{return[]}}function age(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,a=Date.now()/1e3;return{type:"memory",name:"memory",start:a,end:a,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function oge(e,t,n){let r,a,o;const i=n.maxWait?Math.max(n.maxWait,t):0;function s(){return c(),r=e(),r}function c(){void 0!==a&&clearTimeout(a),void 0!==o&&clearTimeout(o),a=o=void 0}function l(){return a&&clearTimeout(a),a=P1(s,t),i&&void 0===o&&(o=P1(s,i)),r}return l.cancel=c,l.flush=function(){return void 0!==a||void 0!==o?s():r},l}function ige(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(At&&Pt.warn("Received replay event after session expired."));const a=r||!t;t=!0,e.clickDetector&&Che(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&a&&e.setInitialState(),!iI(e,n,a))return!0;if(!a)return!1;const t=e.session;if(cge(e,a),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(At&&Pt.info(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&oI(t))}return t&&t.previousSessionId||"session"===e.recordingMode&&e.flush(),!0}))}}function sge(e){const t=e.getOptions();return{type:Gt.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function cge(e,t){!t||!e.session||0!==e.session.segmentId||iI(e,sge(e),!1)}function lge(e,t,n,r){return nue(aue(e,rue(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}function fge({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function uge({client:e,scope:t,replayId:n,event:r}){const a={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,a);const o=await due(e.getOptions(),r,a,t,e,X_());if(!o)return null;o.platform=o.platform||"javascript";const i=e.getSdkMetadata(),{name:s,version:c}=i&&i.sdk||{};return o.sdk={...o.sdk,name:s||"sentry.javascript.unknown",version:c||"0.0.0"},o}async function dge({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:a,session:o}){const i=fge({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:c,traceIds:l,initialTimestamp:u}=r,f=ef(),d=J1(),p=f&&f.getTransport(),h=f&&f.getDsn();if(!(f&&p&&h&&o.sampled))return uD({});const m={type:Wde,replay_start_timestamp:u/1e3,timestamp:a/1e3,error_ids:c,trace_ids:l,urls:s,replay_id:t,segment_id:n,replay_type:o.sampled},y=await uge({scope:d,client:f,replayId:t,event:m});if(!y)return f.recordDroppedEvent("event_processor","replay",m),At&&Pt.info("An event processor returned `null`, will not send event."),uD({});delete y.sdkProcessingMetadata;const g=lge(y,i,h,f.getOptions().tunnel);let v;try{v=await p.send(g)}catch(e){const t=new Error(QT);try{t.cause=e}catch{}throw t}if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new LV(v.statusCode);const b=Rue({},v);if(Cue(b,"replay"))throw new cI(b);return v}class LV extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class cI extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function jV(e,t={count:0,interval:Zde}){const{recordingData:n,onError:r}=e;if(n.length)try{return await dge(e),!0}catch(n){if(n instanceof LV||n instanceof cI)throw n;if(bue("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${QT} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{P1((async()=>{try{await jV(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}const FV="__THROTTLED",pge="__SKIPPED";function hge(e,t,n){const r=new Map;let a=!1;return(...o)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{n<t&&r.delete(n)}))})(i),[...r.values()].reduce(((e,t)=>e+t),0)>=t){const e=a;return a=!0,e?pge:FV}a=!1;const s=r.get(i)||0;return r.set(i,s+1),e(...o)}}class fp{constructor({options:e,recordingOptions:t}){fp.prototype.__init.call(this),fp.prototype.__init2.call(this),fp.prototype.__init3.call(this),fp.prototype.__init4.call(this),fp.prototype.__init5.call(this),fp.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Hde,sessionIdleExpire:Gde},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=oge((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=hge(((e,t)=>fme(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),a=n?{threshold:Math.min(Jde,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;if(a&&(this.clickDetector=new khe(this,a)),At){const t=e._experiments;Pt.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){At&&Pt.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session)return void(At&&Pt.exception(new Error("Unable to initialize and create session")));!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",At&&Pt.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(At&&Pt.info("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(At&&Pt.info("Buffering is in progress, call `flush()` to save the replay"));At&&Pt.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=q4({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(At&&Pt.info("Buffering is in progress, call `flush()` to save the replay"));At&&Pt.infoTick("Starting replay in buffer mode");const e=q4({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=_u({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:Yde}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:ige(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{At&&Pt.info("Stopping Replay"+(t?` triggered by ${t}`:"")),IV(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,ome(this)}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),At&&Pt.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),At&&Pt.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();At&&Pt.info("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();!e||!n||"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&mR(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${Xn.location.pathname}${Xn.location.hash}${Xn.location.search}`,t=`${Xn.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===FV){const e=jl({category:"replay.throttled"});this.addUpdate((()=>!iI(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastActiveSpan||MB(),t=e&&qT(e),n=(t&&l_(t).data||{})[zB];if(t&&n&&["route","custom"].includes(n))return l_(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=nme({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=q4({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!CV(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{Xn.document.addEventListener("visibilitychange",this._handleVisibilityChange),Xn.addEventListener("blur",this._handleWindowBlur),Xn.addEventListener("focus",this._handleWindowFocus),Xn.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(nge(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=Qhe(this)}_removeListeners(){try{Xn.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Xn.removeEventListener("blur",this._handleWindowBlur),Xn.removeEventListener("focus",this._handleWindowFocus),Xn.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===Xn.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=jl({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=jl({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{Mhe(this,e)}}_doChangeToBackgroundTasks(e){!this.session||EV(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):At&&Pt.info("Document has become active, but session has expired"))}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:Gt.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){let e=jhe(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter((e=>e.start>=t))}return Promise.all(Qk(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await rge(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const a=await this.eventBuffer.finish();await jV({replayId:e,recordingData:a,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=ef();if(t){const n=e instanceof cI?"ratelimit_backoff":"send_error";t.recordDroppedEvent(n,"replay")}}}else At&&Pt.error("No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(At&&Pt.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,a=n>this._options.maxReplayDuration+5e3;if(r||a)return At&&Pt.info(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&At&&Pt.info("Flushing initial segment without checkout.");const i=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,i&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&oI(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=jl({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function sy(e,t){return[...e,...t].join(",")}function mge({mask:e,unmask:t,block:n,unblock:r,ignore:a}){return{maskTextSelector:sy(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:sy(t,[]),blockSelector:sy(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:sy(r,[]),ignoreSelector:sy(a,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function gge({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:a,value:o}){return!r||a.unmaskTextSelector&&e.matches(a.unmaskTextSelector)?o:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const YD='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',yge=["content-length","content-type","accept"];let ZD=!1;const _ge=e=>new Zk(e);class Zk{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=Kde,flushMaxDelay:t=Qde,minReplayDuration:n=tpe,maxReplayDuration:r=TD,stickySession:a=!0,useCompression:o=!0,workerUrl:i,_experiments:s={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:f=750,mutationLimit:d=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:h=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:y=[],networkCaptureBodies:g=!0,networkRequestHeaders:v=[],networkResponseHeaders:b=[],mask:_=[],maskAttributes:w=["title","placeholder"],unmask:k=[],block:x=[],unblock:S=[],ignore:E=[],maskFn:A,beforeAddRecordingEvent:z,beforeErrorSampling:C,onError:I}={}){this.name=Zk.id;const T=mge({mask:_,unmask:k,block:x,unblock:S,ignore:E});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:A,maskInputFn:A,maskAttributeFn:(e,t,n)=>gge({maskAttributes:w,maskAllText:c,privacyOptions:T,key:e,value:t,el:n}),...T,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,npe),maxReplayDuration:Math.min(r,TD),stickySession:a,useCompression:o,workerUrl:i,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:f,mutationLimit:d,slowClickTimeout:p,slowClickIgnoreSelectors:h,networkDetailAllowUrls:m,networkDetailDenyUrls:y,networkCaptureBodies:g,networkRequestHeaders:XD(v),networkResponseHeaders:XD(b),beforeAddRecordingEvent:z,beforeErrorSampling:C,onError:I,_experiments:s},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${YD}`:YD),this._isInitialized&&xD())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return ZD}set _isInitialized(e){ZD=e}afterAllSetup(e){!xD()||this._replay||(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay&&this._replay.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=vge(this._initialOptions,e);this._replay=new fp({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function vge(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Pc(e)},a=_D(n.replaysSessionSampleRate),o=_D(n.replaysOnErrorSampleRate);return null==a&&null==o&&NT((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")})),null!=a&&(r.sessionSampleRate=a),null!=o&&(r.errorSampleRate=o),r}function XD(e){return[...yge,...e.map((e=>e.toLowerCase()))]}Zk.__initStatic();const BV=()=>"object"!=typeof window;var bge={USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.16.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.0",npm_config_npm_version:"10.9.2",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.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.16.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.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/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.16.0/bin",TURBO_HASH:"2ec5ae70fa15de8b",NODE:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_package_name:"@wellesley/settings",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:"tsc && vite build",SHELL:"/bin/bash",npm_package_version:"1.0.172",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.16.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",EDITOR:"vi",NODE_ENV:"production",APP_NAME:"@wellesley/settings"};BV()||(window.build=bge.BUILD_NUMBER),_ge(),Fde(),Due();const JD={data:null,isError:!1,isPending:!1,isSuccess:!1},fa=ua({name:"user",initialState:JD,reducers:{reset:e=>{Object.assign(e,JD)},setData:(e,{payload:t})=>{e.data=t},updateData:(e,{payload:t})=>{e.data&&Object.assign(e.data,t)},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setPending:(e,{payload:t})=>{e.isPending=t},setIsError:(e,{payload:t})=>{e.isError=t},setError:(e,{payload:t})=>{e.error=t},updateUser:(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,selectIsAdmin:e=>{var t;return"ADMIN"===(null==(t=e.data)?void 0:t.account.role)}}}),wge=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return wue("exceptionMessage",t),void WT(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}vue(t)},eN=["debug","info","warn","error"],kge=(e,t)=>{const n=eN.indexOf(e);return eN.indexOf(t)>=n},vb=(e,t,n,...r)=>{kge(t,e)&&console.log(`[${e}] ${n}`,...r)},xge=()=>null==window?void 0:window.localStorage.getItem("logger_lvl"),Sge=(e=!BV()&&xge()||"warn")=>{let t=e;return{debug:(e,...n)=>vb("debug",t,e,...n),info:(e,...n)=>vb("info",t,e,...n),warn:(e,...n)=>vb("warn",t,e,...n),error:(e,...n)=>(wge(e,...n),vb("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}},ku=Sge();var Ege={USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.16.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.0",npm_config_npm_version:"10.9.2",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.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.16.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.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/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.16.0/bin",TURBO_HASH:"2ec5ae70fa15de8b",NODE:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_package_name:"@wellesley/settings",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:"tsc && vite build",SHELL:"/bin/bash",npm_package_version:"1.0.172",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.16.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",EDITOR:"vi",NODE_ENV:"production",APP_NAME:"@wellesley/settings"},VV=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(VV||{});function Cge(e){return{status:e,isUninitialized:"uninitialized"===e,isLoading:"pending"===e,isSuccess:"fulfilled"===e,isError:"rejected"===e}}function Rge(e){return new RegExp("(^|:)//").test(e)}var Age=e=>e.replace(/\/$/,""),Tge=e=>e.replace(/^\//,"");function Ige(e,t){if(!e)return t;if(!t)return e;if(Rge(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return`${e=Age(e)}${n}${t=Tge(t)}`}var tN=e=>[].concat(...e);function Pge(){return typeof navigator>"u"||void 0===navigator.onLine||navigator.onLine}function $ge(){return typeof document>"u"||"hidden"!==document.visibilityState}var nN=Vl;function UV(e,t){if(e===t||!(nN(e)&&nN(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let a=n.length===r.length;const o=Array.isArray(t)?[]:{};for(const r of n)o[r]=UV(e[r],t[r]),a&&(a=e[r]===o[r]);return a?e:o}var rN=(...e)=>fetch(...e),Oge=e=>e.status>=200&&e.status<=299,zge=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function aN(e){if(!Vl(e))return e;const t={...e};for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}function Mge({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:n=rN,paramsSerializer:r,isJsonContentType:a=zge,jsonContentType:o="application/json",jsonReplacer:i,timeout:s,responseHandler:c,validateStatus:l,...u}={}){return typeof fetch>"u"&&n===rN&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(d,p)=>{const{signal:h,getState:m,extra:y,endpoint:g,forced:v,type:b}=p;let _,{url:w,headers:k=new Headers(u.headers),params:x,responseHandler:S=c??"json",validateStatus:E=l??Oge,timeout:A=s,...z}="string"==typeof d?{url:d}:d,C={...u,signal:h,...z};k=new Headers(aN(k)),C.headers=await t(k,{getState:m,extra:y,endpoint:g,forced:v,type:b})||k;const I=e=>"object"==typeof e&&(Vl(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!C.headers.has("content-type")&&I(C.body)&&C.headers.set("content-type",o),I(C.body)&&a(C.headers)&&(C.body=JSON.stringify(C.body,i)),x){const e=~w.indexOf("?")?"&":"?";w+=e+(r?r(x):new URLSearchParams(aN(x)))}w=Ige(e,w);const T=new Request(w,C);_={request:new Request(w,C)};let R,P=!1,j=A&&setTimeout((()=>{P=!0,p.abort()}),A);try{R=await n(T)}catch(e){return{error:{status:P?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:_}}finally{j&&clearTimeout(j)}const O=R.clone();_.response=O;let N,M="";try{let e;if(await Promise.all([f(R,S).then((e=>N=e),(t=>e=t)),O.text().then((e=>M=e),(()=>{}))]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:R.status,data:M,error:String(e)},meta:_}}return E(R,N)?{data:N,meta:_}:{error:{status:R.status,data:N},meta:_}};async function f(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=a(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var oN=class{constructor(e,t=void 0){this.value=e,this.meta=t}},lI=Ir("__rtkq/focused"),qV=Ir("__rtkq/unfocused"),fI=Ir("__rtkq/online"),WV=Ir("__rtkq/offline");function HV(e){return"query"===e.type}function Dge(e){return"mutation"===e.type}function uI(e,t,n,r,a,o){return Nge(e)?e(t,n,r,a).map(_R).map(o):Array.isArray(e)?e.map(_R).map(o):[]}function Nge(e){return"function"==typeof e}function _R(e){return"string"==typeof e?{type:e}:e}function iN(e){return null!=e}function b1(e){let t=0;for(const n in e)t++;return t}function Lge(e,t){return e.catch(t)}var m_=Symbol("forceQueryFn"),vR=e=>"function"==typeof e[m_];function jge({serializeQueryArgs:e,queryThunk:t,mutationThunk:n,api:r,context:a}){const o=new Map,i=new Map,{unsubscribeQueryResult:s,removeMutationResult:c,updateSubscriptionOptions:l}=r.internalActions;return{buildInitiateQuery:function(n,a){const i=(c,{subscribe:u=!0,forceRefetch:f,subscriptionOptions:d,[m_]:p,...h}={})=>(m,y)=>{var g;const v=e({queryArgs:c,endpointDefinition:a,endpointName:n}),b=t({...h,type:"query",subscribe:u,forceRefetch:f,subscriptionOptions:d,endpointName:n,originalArgs:c,queryCacheKey:v,[m_]:p}),_=r.endpoints[n].select(c),w=m(b),k=_(y()),{requestId:x,abort:S}=w,E=k.requestId!==x,A=null==(g=o.get(m))?void 0:g[v],z=()=>_(y()),C=Object.assign(p?w.then(z):E&&!A?Promise.resolve(k):Promise.all([A,w]).then(z),{arg:c,requestId:x,subscriptionOptions:d,queryCacheKey:v,abort:S,async unwrap(){const e=await C;if(e.isError)throw e.error;return e.data},refetch:()=>m(i(c,{subscribe:!1,forceRefetch:!0})),unsubscribe(){u&&m(s({queryCacheKey:v,requestId:x}))},updateSubscriptionOptions(e){C.subscriptionOptions=e,m(l({endpointName:n,requestId:x,queryCacheKey:v,options:e}))}});if(!A&&!E&&!p){const e=o.get(m)||{};e[v]=C,o.set(m,e),C.then((()=>{delete e[v],b1(e)||o.delete(m)}))}return C};return i},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:a}={})=>(o,s)=>{const l=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:a}),u=o(l),{requestId:f,abort:d,unwrap:p}=u,h=Lge(u.unwrap().then((e=>({data:e}))),(e=>({error:e}))),m=Object.assign(h,{arg:u.arg,requestId:f,abort:d,unwrap:p,reset:()=>{o(c({requestId:f,fixedCacheKey:a}))}}),y=i.get(o)||{};return i.set(o,y),y[f]=m,m.then((()=>{delete y[f],b1(y)||i.delete(o)})),a&&(y[a]=m,m.then((()=>{y[a]===m&&(delete y[a],b1(y)||i.delete(o))}))),m}},getRunningQueryThunk:function(t,n){return r=>{var i;const s=a.endpointDefinitions[t],c=e({queryArgs:n,endpointDefinition:s,endpointName:t});return null==(i=o.get(r))?void 0:i[c]}},getRunningMutationThunk:function(e,t){return e=>{var n;return null==(n=i.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return e=>Object.values(o.get(e)||{}).filter(iN)},getRunningMutationsThunk:function(){return e=>Object.values(i.get(e)||{}).filter(iN)}}}function sN(e){return e}function Fge({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:a,assertTagType:o}){const i=async(e,{signal:r,abort:a,rejectWithValue:o,fulfillWithValue:i,dispatch:c,getState:l,extra:u})=>{const f=n[e.endpointName];try{let n,o=sN;const d={signal:r,abort:a,dispatch:c,getState:l,extra:u,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?s(e,l()):void 0},p="query"===e.type?e[m_]:void 0;if(p?n=p():f.query?(n=await t(f.query(e.originalArgs),d,f.extraOptions),f.transformResponse&&(o=f.transformResponse)):n=await f.queryFn(e.originalArgs,d,f.extraOptions,(e=>t(e,d,f.extraOptions))),typeof process<"u"&&Ege.NODE_ENV,n.error)throw new oN(n.error,n.meta);return i(await o(n.data,n.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:n.meta,[u1]:!0})}catch(t){let n=t;if(n instanceof oN){let t=sN;f.query&&f.transformErrorResponse&&(t=f.transformErrorResponse);try{return o(await t(n.value,n.meta,e.originalArgs),{baseQueryMeta:n.meta,[u1]:!0})}catch(e){n=e}}throw console.error(n),n}};function s(t,n){var r,a,o;const i=null==(a=null==(r=n[e])?void 0:r.queries)?void 0:a[t.queryCacheKey],s=null==(o=n[e])?void 0:o.config.refetchOnMountOrArgChange,c=null==i?void 0:i.fulfilledTimeStamp,l=t.forceRefetch??(t.subscribe&&s);return!!l&&(!0===l||(Number(new Date)-Number(c))/1e3>=l)}const c=d9(`${e}/executeQuery`,i,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[u1]:!0}),condition(t,{getState:r}){var a,o,i;const c=r(),l=null==(o=null==(a=c[e])?void 0:a.queries)?void 0:o[t.queryCacheKey],u=null==l?void 0:l.fulfilledTimeStamp,f=t.originalArgs,d=null==l?void 0:l.originalArgs,p=n[t.endpointName];return!!vR(t)||"pending"!==(null==l?void 0:l.status)&&(!!(s(t,c)||HV(p)&&null!=(i=null==p?void 0:p.forceRefetch)&&i.call(p,{currentArg:f,previousArg:d,endpointState:l,state:c}))||!u)},dispatchConditionRejection:!0}),l=d9(`${e}/executeMutation`,i,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[u1]:!0})});function u(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:c,mutationThunk:l,prefetch:(e,t,n)=>(r,o)=>{const i=(e=>"force"in e)(n)&&n.force,s=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,c=(n=!0)=>{const r={forceRefetch:n,isPrefetch:!0};return a.endpoints[e].initiate(t,r)},l=a.endpoints[e].select(t)(o());if(i)r(c());else if(s){const e=null==l?void 0:l.fulfilledTimeStamp;if(!e)return void r(c());(Number(new Date)-Number(new Date(e)))/1e3>=s&&r(c())}else r(c(!1))},updateQueryData:(e,t,n,r=!0)=>(o,i)=>{const s=a.endpoints[e].select(t)(i());let c,l={patches:[],inversePatches:[],undo:()=>o(a.util.patchQueryData(e,t,l.inversePatches,r))};if("uninitialized"===s.status)return l;if("data"in s)if(jc(s.data)){const[e,t,r]=L8(s.data,n);l.patches.push(...t),l.inversePatches.push(...r),c=e}else c=n(s.data),l.patches.push({op:"replace",path:[],value:c}),l.inversePatches.push({op:"replace",path:[],value:s.data});return o(a.util.patchQueryData(e,t,l.patches,r)),l},upsertQueryData:(e,t,n)=>r=>r(a.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[m_]:()=>({data:n})})),patchQueryData:(e,t,i,s)=>(c,l)=>{const u=n[e],f=r({queryArgs:t,endpointDefinition:u,endpointName:e});if(c(a.internalActions.queryResultPatched({queryCacheKey:f,patches:i})),!s)return;const d=a.endpoints[e].select(t)(l()),p=uI(u.providesTags,d.data,void 0,t,{},o);c(a.internalActions.updateProvidedBy({queryCacheKey:f,providedTags:p}))},buildMatchThunkActions:function(e,t){return{matchPending:Ry(ZR(e),u(t)),matchFulfilled:Ry(wp(e),u(t)),matchRejected:Ry(E1(e),u(t))}}}}function GV(e,t,n,r){return uI(n[e.meta.arg.endpointName][t],wp(e)?e.payload:void 0,Xw(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function bb(e,t,n){const r=e[t];r&&n(r)}function g_(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function cN(e,t,n){const r=e[g_(t)];r&&n(r)}var cy={};function Bge({reducerPath:e,queryThunk:t,mutationThunk:n,context:{endpointDefinitions:r,apiUid:a,extractRehydrationInfo:o,hasRehydrationInfo:i},assertTagType:s,config:c}){const l=Ir(`${e}/resetApiState`),u=ua({name:`${e}/queries`,initialState:cy,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:X0()},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:n}}){bb(e,t,(e=>{e.data=s9(e.data,n.concat())}))},prepare:X0()}},extraReducers(e){e.addCase(t.pending,((e,{meta:t,meta:{arg:n}})=>{var r;const a=vR(n);e[r=n.queryCacheKey]??(e[r]={status:"uninitialized",endpointName:n.endpointName}),bb(e,n.queryCacheKey,(e=>{e.status="pending",e.requestId=a&&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})=>{bb(e,t.arg.queryCacheKey,(e=>{if(e.requestId!==t.requestId&&!vR(t.arg))return;const{merge:a}=r[t.arg.endpointName];if(e.status="fulfilled",a)if(void 0!==e.data){const{fulfilledTimeStamp:r,arg:o,baseQueryMeta:i,requestId:s}=t;let c=M_(e.data,(e=>a(e,n,{arg:o.originalArgs,baseQueryMeta:i,fulfilledTimeStamp:r,requestId:s})));e.data=c}else e.data=n;else e.data=r[t.arg.endpointName].structuralSharing??1?UV(Lc(e.data)?DW(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:a,payload:o})=>{bb(e,n.queryCacheKey,(e=>{if(!t){if(e.requestId!==r)return;e.status="rejected",e.error=o??a}}))})).addMatcher(i,((e,t)=>{const{queries:n}=o(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)}))}}),f=ua({name:`${e}/mutations`,initialState:cy,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=g_(t);n in e&&delete e[n]},prepare:X0()}},extraReducers(e){e.addCase(n.pending,((e,{meta:t,meta:{requestId:n,arg:r,startedTimeStamp:a}})=>{r.track&&(e[g_(t)]={requestId:n,status:"pending",endpointName:r.endpointName,startedTimeStamp:a})})).addCase(n.fulfilled,((e,{payload:t,meta:n})=>{n.arg.track&&cN(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&&cN(e,r,(e=>{e.requestId===r.requestId&&(e.status="rejected",e.error=t??n)}))})).addMatcher(i,((e,t)=>{const{mutations:n}=o(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)}))}}),d=ua({name:`${e}/invalidation`,initialState:cy,reducers:{updateProvidedBy:{reducer(e,t){var n,r;const{queryCacheKey:a,providedTags:o}=t.payload;for(const t of Object.values(e))for(const e of Object.values(t)){const t=e.indexOf(a);-1!==t&&e.splice(t,1)}for(const{type:t,id:i}of o){const o=(n=e[t]??(e[t]={}))[r=i||"__internal_without_id"]??(n[r]=[]);o.includes(a)||o.push(a)}},prepare:X0()}},extraReducers(e){e.addCase(u.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(i,((e,t)=>{var n,r;const{provided:a}=o(t);for(const[t,o]of Object.entries(a))for(const[a,i]of Object.entries(o)){const o=(n=e[t]??(e[t]={}))[r=a||"__internal_without_id"]??(n[r]=[]);for(const e of i)o.includes(e)||o.push(e)}})).addMatcher(bp(wp(t),Xw(t)),((e,t)=>{const n=GV(t,"providesTags",r,s),{queryCacheKey:a}=t.meta.arg;d.caseReducers.updateProvidedBy(e,d.actions.updateProvidedBy({queryCacheKey:a,providedTags:n}))}))}}),p=ua({name:`${e}/subscriptions`,initialState:cy,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),h=ua({name:`${e}/internalSubscriptions`,initialState:cy,reducers:{subscriptionsUpdated:{reducer:(e,t)=>s9(e,t.payload),prepare:X0()}}}),m=ua({name:`${e}/config`,initialState:{online:Pge(),focused:$ge(),middlewareRegistered:!1,...c},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&a===t||"conflict"}},extraReducers:e=>{e.addCase(fI,(e=>{e.online=!0})).addCase(WV,(e=>{e.online=!1})).addCase(lI,(e=>{e.focused=!0})).addCase(qV,(e=>{e.focused=!1})).addMatcher(i,(e=>({...e})))}}),y=GR({queries:u.reducer,mutations:f.reducer,provided:d.reducer,subscriptions:h.reducer,config:m.reducer});return{reducer:(e,t)=>y(l.match(t)?void 0:e,t),actions:{...m.actions,...u.actions,...p.actions,...h.actions,...f.actions,...d.actions,resetApiState:l}}}var im=Symbol.for("RTKQ/skipToken"),KV={status:"uninitialized"},lN=M_(KV,(()=>{})),fN=M_(KV,(()=>{}));function Vge({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=e=>lN,a=e=>fN;return{buildQuerySelector:function(t,a){return s=>{const c=e({queryArgs:s,endpointDefinition:a,endpointName:t});return n(s===im?r:e=>{var t,n;return(null==(n=null==(t=i(e))?void 0:t.queries)?void 0:n[c])??lN},o)}},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?g_(e)??im:e,n(t===im?a:e=>{var n,r;return(null==(r=null==(n=i(e))?void 0:n.mutations)?void 0:r[t])??fN},o)}},selectInvalidatedBy:function(e,n){const r=e[t],a=new Set;for(const e of n.map(_R)){const t=r.provided[e.type];if(!t)continue;let n=(void 0!==e.id?t[e.id]:tN(Object.values(t)))??[];for(const e of n)a.add(e)}return tN(Array.from(a.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 o(e){return{...e,...Cge(e.status)}}function i(e){return e[t]}}var r1=WeakMap?new WeakMap:void 0,uN=({endpointName:e,queryArgs:t})=>{let n="";const r=null==r1?void 0:r1.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,((e,t)=>Vl(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t));Vl(t)&&(null==r1||r1.set(t,e)),n=e}return`${e}(${n})`};function Uge(...e){return function(t){const n=Qy((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=uN;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:uN({...e,queryArgs:n})}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},a={endpointDefinitions:{},batch(e){e()},apiUid:Yw(),extractRehydrationInfo:n,hasRehydrationInfo:Qy((e=>null!=n(e)))},o={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 a.endpointDefinitions){if("throw"===e.overrideExisting)throw new Error(Ha(39))}else{a.endpointDefinitions[n]=r;for(const e of i)e.injectEndpoint(n,r)}return o},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(a.endpointDefinitions[e]):Object.assign(a.endpointDefinitions[e]||{},n);return o}},i=e.map((e=>e.init(o,r,a)));return o.injectEndpoints({endpoints:t.endpoints})}}function qge(e){for(let t in e)return!1;return!0}var Wge=2147482.647,Hge=({reducerPath:e,api:t,context:n,internalState:r})=>{const{removeQueryResult:a,unsubscribeQueryResult:o}=t.internalActions;function i(e){const t=r.currentSubscriptions[e];return!!t&&!qge(t)}const s={};function c(e,t,r,o){const c=n.endpointDefinitions[t],l=(null==c?void 0:c.keepUnusedDataFor)??o.keepUnusedDataFor;if(l===1/0)return;const u=Math.max(0,Math.min(l,Wge));if(!i(e)){const t=s[e];t&&clearTimeout(t),s[e]=setTimeout((()=>{i(e)||r.dispatch(a({queryCacheKey:e})),delete s[e]}),1e3*u)}}return(r,a,i)=>{var l;if(o.match(r)){const t=a.getState()[e],{queryCacheKey:n}=r.payload;c(n,null==(l=t.queries[n])?void 0:l.endpointName,a,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=a.getState()[e],{queries:o}=n.extractRehydrationInfo(r);for(const[e,n]of Object.entries(o))c(e,null==n?void 0:n.endpointName,a,t.config)}}},Gge=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:a,api:o,assertTagType:i,refetchQuery:s,internalState:c})=>{const{removeQueryResult:l}=o.internalActions,u=bp(wp(r),Xw(r)),f=bp(wp(r,a),E1(r,a));let d=[];function p(n,r){const a=r.getState(),i=a[e];if(d.push(...n),"delayed"===i.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}(i))return;const u=d;if(d=[],0===u.length)return;const f=o.util.selectInvalidatedBy(a,u);t.batch((()=>{const e=Array.from(f.values());for(const{queryCacheKey:t}of e){const e=i.queries[t],n=c.currentSubscriptions[t]??{};e&&(0===b1(n)?r.dispatch(l({queryCacheKey:t})):"uninitialized"!==e.status&&r.dispatch(s(e,t)))}}))}return(e,t)=>{u(e)?p(GV(e,"invalidatesTags",n,i),t):f(e)?p([],t):o.util.invalidateTags.match(e)&&p(uI(e.payload,void 0,void 0,void 0,void 0,i),t)}},Kge=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:a})=>{const o={};function i({queryCacheKey:t},n){const s=n.getState()[e],c=s.queries[t],u=a.currentSubscriptions[t];if(!c||"uninitialized"===c.status)return;const{lowestPollingInterval:f,skipPollingIfUnfocused:d}=l(u);if(!Number.isFinite(f))return;const p=o[t];null!=p&&p.timeout&&(clearTimeout(p.timeout),p.timeout=void 0);const h=Date.now()+f;o[t]={nextPollTimestamp:h,pollingInterval:f,timeout:setTimeout((()=>{(s.config.focused||!d)&&n.dispatch(r(c,t)),i({queryCacheKey:t},n)}),f)}}function s({queryCacheKey:t},n){const r=n.getState()[e].queries[t],s=a.currentSubscriptions[t];if(!r||"uninitialized"===r.status)return;const{lowestPollingInterval:u}=l(s);if(!Number.isFinite(u))return void c(t);const f=o[t],d=Date.now()+u;(!f||d<f.nextPollTimestamp)&&i({queryCacheKey:t},n)}function c(e){const t=o[e];null!=t&&t.timeout&&clearTimeout(t.timeout),delete o[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)&&i(e.meta.arg,r),n.util.resetApiState.match(e)&&function(){for(const e of Object.keys(o))c(e)}()}},Qge=({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:a})=>{const{removeQueryResult:o}=n.internalActions;function i(n,i){const s=n.getState()[e],c=s.queries,l=a.currentSubscriptions;t.batch((()=>{for(const e of Object.keys(l)){const t=c[e],a=l[e];a&&t&&((Object.values(a).some((e=>!0===e[i]))||Object.values(a).every((e=>void 0===e[i]))&&s.config[i])&&(0===b1(a)?n.dispatch(o({queryCacheKey:e})):"uninitialized"!==t.status&&n.dispatch(r(t,e))))}}))}return(e,t)=>{lI.match(e)&&i(t,"refetchOnFocus"),fI.match(e)&&i(t,"refetchOnReconnect")}},dN=new Error("Promise never resolved before cacheEntryRemoved."),Yge=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:a,internalState:o})=>{const i=vC(r),s=vC(a),c=wp(r,a),l={};function u(t,r,a,o,i){const s=n.endpointDefinitions[t],c=null==s?void 0:s.onCacheEntryAdded;if(!c)return;let u={};const f=new Promise((e=>{u.cacheEntryRemoved=e})),d=Promise.race([new Promise((e=>{u.valueResolved=e})),f.then((()=>{throw dN}))]);d.catch((()=>{})),l[a]=u;const p=e.endpoints[t].select("query"===s.type?r:a),h=o.dispatch(((e,t,n)=>n)),m={...o,getCacheEntry:()=>p(o.getState()),requestId:i,extra:h,updateCachedData:"query"===s.type?n=>o.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:d,cacheEntryRemoved:f},y=c(r,m);Promise.resolve(y).catch((e=>{if(e!==dN)throw e}))}return(n,o,f)=>{const d=function(t){return i(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)?g_(t.payload):""}(n);if(r.pending.match(n)){const e=f[t].queries[d],r=o.getState()[t].queries[d];!e&&r&&u(n.meta.arg.endpointName,n.meta.arg.originalArgs,d,o,n.meta.requestId)}else if(a.pending.match(n))o.getState()[t].mutations[d]&&u(n.meta.arg.endpointName,n.meta.arg.originalArgs,d,o,n.meta.requestId);else if(c(n)){const e=l[d];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[d];e&&(delete l[d],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(n))for(const[e,t]of Object.entries(l))delete l[e],t.cacheEntryRemoved()}},Zge=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const a=ZR(n,r),o=E1(n,r),i=wp(n,r),s={};return(n,r)=>{var c,l;if(a(n)){const{requestId:a,arg:{endpointName:o,originalArgs:i}}=n.meta,c=t.endpointDefinitions[o],l=null==c?void 0:c.onQueryStarted;if(l){const t={},n=new Promise(((e,n)=>{t.resolve=e,t.reject=n}));n.catch((()=>{})),s[a]=t;const u=e.endpoints[o].select("query"===c.type?i:a),f=r.dispatch(((e,t,n)=>n)),d={...r,getCacheEntry:()=>u(r.getState()),requestId:a,extra:f,updateCachedData:"query"===c.type?t=>r.dispatch(e.util.updateQueryData(o,i,t)):void 0,queryFulfilled:n};l(i,d)}}else if(i(n)){const{requestId:e,baseQueryMeta:t}=n.meta;null==(c=s[e])||c.resolve({data:n.payload,meta:t}),delete s[e]}else if(o(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]}}},Xge=({api:e,context:{apiUid:t},reducerPath:n})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t))},Jge=({api:e,queryThunk:t,internalState:n})=>{const r=`${e.reducerPath}/subscriptions`;let a=null,o=null;const{updateSubscriptionOptions:i,unsubscribeQueryResult:s}=e.internalActions,c=()=>n.currentSubscriptions,l={getSubscriptions:c,getSubscriptionCount:e=>b1(c()[e]??{}),isRequestSubscribed:(e,t)=>{var n;const r=c();return!(null==(n=null==r?void 0:r[e])||!n[t])}};return(c,u)=>{if(a||(a=JSON.parse(JSON.stringify(n.currentSubscriptions))),e.util.resetApiState.match(c))return a=n.currentSubscriptions={},o=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(c))return[!1,l];const f=((n,r)=>{var a,o,c;if(i.match(r)){const{queryCacheKey:e,requestId:t,options:o}=r.payload;return null!=(a=null==n?void 0:n[e])&&a[t]&&(n[e][t]=o),!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,a=n[o=e.queryCacheKey]??(n[o]={});return a[`${t}_running`]={},e.subscribe&&(a[t]=e.subscriptionOptions??a[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:a}}=r;if(e&&t.subscribe){const e=n[c=t.queryCacheKey]??(n[c]={});e[a]=t.subscriptionOptions??e[a]??{},l=!0}}return l})(n.currentSubscriptions,c);let d=!0;if(f){o||(o=setTimeout((()=>{const t=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,r]=L8(a,(()=>t));u.next(e.internalActions.subscriptionsUpdated(r)),a=t,o=null}),500));const i="string"==typeof c.type&&!!c.type.startsWith(r),s=t.rejected.match(c)&&c.meta.condition&&!!c.meta.arg.subscribe;d=!i&&!s}return[d,!1]}};function e1e(e){const{reducerPath:t,queryThunk:n,api:r,context:a}=e,{apiUid:o}=a,i={invalidateTags:Ir(`${t}/invalidateTags`)},s=e=>e.type.startsWith(`${t}/`),c=[Xge,Hge,Gge,Kge,Yge,Zge];return{middleware:n=>{let i=!1;const u={...e,internalState:{currentSubscriptions:{}},refetchQuery:l,isThisApiSliceAction:s},f=c.map((e=>e(u))),d=Jge(u),p=Qge(u);return e=>c=>{if(!P8(c))return e(c);i||(i=!0,n.dispatch(r.internalActions.middlewareRegistered(o)));const l={...n,next:e},u=n.getState(),[h,m]=d(c,l,u);let y;if(y=h?e(c):m,n.getState()[t]&&(p(c,l,u),s(c)||a.hasRehydrationInfo(c)))for(let e of f)e(c,l,u);return y}},actions:i};function l(e,t,r={}){return n({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t,...r})}}function np(e,...t){return Object.assign(e,...t)}var pN=Symbol(),t1e=({createSelector:e=go}={})=>({name:pN,init(t,{baseQuery:n,tagTypes:r,reducerPath:a,serializeQueryArgs:o,keepUnusedDataFor:i,refetchOnMountOrArgChange:s,refetchOnFocus:c,refetchOnReconnect:l,invalidationBehavior:u},f){WW();const d=e=>e;Object.assign(t,{reducerPath:a,endpoints:{},internalActions:{onOnline:fI,onOffline:WV,onFocus:lI,onFocusLost:qV},util:{}});const{queryThunk:p,mutationThunk:h,patchQueryData:m,updateQueryData:y,upsertQueryData:g,prefetch:v,buildMatchThunkActions:b}=Fge({baseQuery:n,reducerPath:a,context:f,api:t,serializeQueryArgs:o,assertTagType:d}),{reducer:_,actions:w}=Bge({context:f,queryThunk:p,mutationThunk:h,reducerPath:a,assertTagType:d,config:{refetchOnFocus:c,refetchOnReconnect:l,refetchOnMountOrArgChange:s,keepUnusedDataFor:i,reducerPath:a,invalidationBehavior:u}});np(t.util,{patchQueryData:m,updateQueryData:y,upsertQueryData:g,prefetch:v,resetApiState:w.resetApiState}),np(t.internalActions,w);const{middleware:k,actions:x}=e1e({reducerPath:a,context:f,queryThunk:p,mutationThunk:h,api:t,assertTagType:d});np(t.util,x),np(t,{reducer:_,middleware:k});const{buildQuerySelector:S,buildMutationSelector:E,selectInvalidatedBy:A,selectCachedArgsForQuery:z}=Vge({serializeQueryArgs:o,reducerPath:a,createSelector:e});np(t.util,{selectInvalidatedBy:A,selectCachedArgsForQuery:z});const{buildInitiateQuery:C,buildInitiateMutation:I,getRunningMutationThunk:T,getRunningMutationsThunk:R,getRunningQueriesThunk:P,getRunningQueryThunk:j}=jge({queryThunk:p,mutationThunk:h,api:t,serializeQueryArgs:o,context:f});return np(t.util,{getRunningMutationThunk:T,getRunningMutationsThunk:R,getRunningQueryThunk:j,getRunningQueriesThunk:P}),{name:pN,injectEndpoint(e,n){var r;const a=t;(r=a.endpoints)[e]??(r[e]={}),HV(n)?np(a.endpoints[e],{name:e,select:S(e,n),initiate:C(e,n)},b(p,e)):Dge(n)&&np(a.endpoints[e],{name:e,select:E(),initiate:I(e)},b(h,e))}}}});function n1e(e){return"query"===e.type}function r1e(e){return"mutation"===e.type}function wb(e,...t){return Object.assign(e,...t)}function W4(e){return e.replace(e[0],e[0].toUpperCase())}var a1=WeakMap?new WeakMap:void 0,a1e=({endpointName:e,queryArgs:t})=>{let n="";const r=null==a1?void 0:a1.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,((e,t)=>Vl(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t));Vl(t)&&(null==a1||a1.set(t,e)),n=e}return`${e}(${n})`},H4=Symbol();function hN(e,t,n,r){const a=v.useMemo((()=>({queryArgs:e,serialized:"object"==typeof e?t({queryArgs:e,endpointDefinition:n,endpointName:r}):e})),[e,t,n,r]),o=v.useRef(a);return v.useEffect((()=>{o.current.serialized!==a.serialized&&(o.current=a)}),[a]),o.current.serialized===a.serialized?o.current.queryArgs:e}function G4(e){const t=v.useRef(e);return v.useEffect((()=>{zy(t.current,e)||(t.current=e)}),[e]),zy(t.current,e)?t.current:e}var o1e=typeof window<"u"&&window.document&&window.document.createElement?v.useLayoutEffect:v.useEffect,i1e=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:VV.pending}:e;function s1e({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:a},unstable__sideEffectsInRender:o,createSelector:i},serializeQueryArgs:s,context:c}){const l=o?e=>e():v.useEffect;return{buildQueryHooks:function(o){const f=(t,{refetchOnReconnect:r,refetchOnFocus:a,refetchOnMountOrArgChange:i,skip:s=!1,pollingInterval:u=0,skipPollingIfUnfocused:f=!1}={})=>{const{initiate:d}=e.endpoints[o],p=n(),h=v.useRef();if(!h.current){const t=p(e.internalActions.internal_getRTKQSubscriptions());h.current=t}const m=hN(s?im:t,a1e,c.endpointDefinitions[o],o),y=G4({refetchOnReconnect:r,refetchOnFocus:a,pollingInterval:u,skipPollingIfUnfocused:f}),g=v.useRef(!1),b=v.useRef();let{queryCacheKey:_,requestId:w}=b.current||{},k=!1;_&&w&&(k=h.current.isRequestSubscribed(_,w));const x=!k&&g.current;return l((()=>{g.current=k})),l((()=>{x&&(b.current=void 0)}),[x]),l((()=>{var e;const t=b.current;if(m===im)return null==t||t.unsubscribe(),void(b.current=void 0);const n=null==(e=b.current)?void 0:e.subscriptionOptions;if(t&&t.arg===m)y!==n&&t.updateSubscriptionOptions(y);else{null==t||t.unsubscribe();const e=p(d(m,{subscriptionOptions:y,forceRefetch:i}));b.current=e}}),[p,d,i,m,y,x]),v.useEffect((()=>()=>{var e;null==(e=b.current)||e.unsubscribe(),b.current=void 0}),[]),v.useMemo((()=>({refetch:()=>{var e;if(!b.current)throw new Error(Ha(38));return null==(e=b.current)?void 0:e.refetch()}})),[])},d=({refetchOnReconnect:r,refetchOnFocus:a,pollingInterval:i=0,skipPollingIfUnfocused:s=!1}={})=>{const{initiate:c}=e.endpoints[o],u=n(),[f,d]=v.useState(H4),p=v.useRef(),h=G4({refetchOnReconnect:r,refetchOnFocus:a,pollingInterval:i,skipPollingIfUnfocused:s});l((()=>{var e,t;const n=null==(e=p.current)?void 0:e.subscriptionOptions;h!==n&&(null==(t=p.current)||t.updateSubscriptionOptions(h))}),[h]);const m=v.useRef(h);l((()=>{m.current=h}),[h]);const y=v.useCallback((function(e,n=!1){let r;return t((()=>{var t;null==(t=p.current)||t.unsubscribe(),p.current=r=u(c(e,{subscriptionOptions:m.current,forceRefetch:!n})),d(e)})),r}),[u,c]);return v.useEffect((()=>()=>{var e;null==(e=null==p?void 0:p.current)||e.unsubscribe()}),[]),v.useEffect((()=>{f!==H4&&!p.current&&y(f,!0)}),[f,y]),v.useMemo((()=>[y,f]),[y,f])},p=(t,{skip:n=!1,selectFromResult:l}={})=>{const{select:f}=e.endpoints[o],d=hN(n?im:t,s,c.endpointDefinitions[o],o),p=v.useRef(),h=v.useMemo((()=>i([f(d),(e,t)=>t,e=>d],u,{memoizeOptions:{resultEqualityCheck:zy}})),[f,d]),m=v.useMemo((()=>l?i([h],l,{devModeChecks:{identityFunctionCheck:"never"}}):h),[h,l]),y=r((e=>m(e,p.current)),zy),g=a(),b=h(g.getState(),p.current);return o1e((()=>{p.current=b}),[b]),y};return{useQueryState:p,useQuerySubscription:f,useLazyQuerySubscription:d,useLazyQuery(e){const[t,n]=d(e),r=p(n,{...e,skip:n===H4}),a=v.useMemo((()=>({lastArg:n})),[n]);return v.useMemo((()=>[t,r,a]),[t,r,a])},useQuery(e,t){const n=f(e,t),r=p(e,{selectFromResult:e===im||null!=t&&t.skip?void 0:i1e,...t}),{data:a,status:o,isLoading:i,isSuccess:s,isError:c,error:l}=r;return v.useDebugValue({data:a,status:o,isLoading:i,isSuccess:s,isError:c,error:l}),v.useMemo((()=>({...r,...n})),[r,n])}}},buildMutationHook:function(a){return({selectFromResult:o,fixedCacheKey:s}={})=>{const{select:c,initiate:l}=e.endpoints[a],u=n(),[f,d]=v.useState();v.useEffect((()=>()=>{null!=f&&f.arg.fixedCacheKey||null==f||f.reset()}),[f]);const p=v.useCallback((function(e){const t=u(l(e,{fixedCacheKey:s}));return d(t),t}),[u,l,s]),{requestId:h}=f||{},m=v.useMemo((()=>c({fixedCacheKey:s,requestId:null==f?void 0:f.requestId})),[s,f,c]),y=v.useMemo((()=>o?i([m],o):m),[o,m]),g=r(y,zy),b=null==s?null==f?void 0:f.arg.originalArgs:void 0,_=v.useCallback((()=>{t((()=>{f&&d(void 0),s&&u(e.internalActions.removeMutationResult({requestId:h,fixedCacheKey:s}))}))}),[u,s,f,h]),{endpointName:w,data:k,status:x,isLoading:S,isSuccess:E,isError:A,error:z}=g;v.useDebugValue({endpointName:w,data:k,status:x,isLoading:S,isSuccess:E,isError:A,error:z});const C=v.useMemo((()=>({...g,originalArgs:b,reset:_})),[g,b,_]);return v.useMemo((()=>[p,C]),[p,C])}},usePrefetch:function(t,r){const a=n(),o=G4(r);return v.useCallback(((n,r)=>a(e.util.prefetch(t,n,{...o,...r}))),[t,a,o])}};function u(e,t,n){if(null!=t&&t.endpointName&&e.isUninitialized){const{endpointName:e}=t,r=c.endpointDefinitions[e];s({queryArgs:t.originalArgs,endpointDefinition:r,endpointName:e})===s({queryArgs:n,endpointDefinition:r,endpointName:e})&&(t=void 0)}let r=e.isSuccess?e.data:null==t?void 0:t.data;void 0===r&&(r=e.data);const a=void 0!==r,o=e.isLoading,i=!a&&o,l=e.isSuccess||o&&a;return{...e,data:r,currentData:e.data,isFetching:o,isLoading:i,isSuccess:l}}}var c1e=Symbol(),l1e=({batch:e=Nce,hooks:t={useDispatch:Mk,useSelector:qa,useStore:cB},createSelector:n=go,unstable__sideEffectsInRender:r=!1,...a}={})=>({name:c1e,init(a,{serializeQueryArgs:o},i){const s=a,{buildQueryHooks:c,buildMutationHook:l,usePrefetch:u}=s1e({api:a,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:o,context:i});return wb(s,{usePrefetch:u}),wb(i,{batch:e}),{injectEndpoint(e,t){if(n1e(t)){const{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:o,useQuerySubscription:i}=c(e);wb(s.endpoints[e],{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:o,useQuerySubscription:i}),a[`use${W4(e)}Query`]=t,a[`useLazy${W4(e)}Query`]=n}else if(r1e(t)){const t=l(e);wb(s.endpoints[e],{useMutation:t}),a[`use${W4(e)}Mutation`]=t}}}}}),f1e=Uge(t1e(),l1e());const dI="auth_token",QV=()=>localStorage.getItem(dI)||void 0,u1e=e=>localStorage.setItem(dI,e),d1e=()=>localStorage.removeItem(dI),p1e=()=>!!QV(),xm={getToken:QV,setToken:u1e,removeToken:d1e,hasToken:p1e},h1e="remote-ready",YV=Ir("reselectUser"),pI=Ir("requestLogin"),ZV=Ir("requestLogout"),m1e="host-store-connect",XV=Ir("remoteLogin"),hI=Ir("remoteLogout"),mN=Ir("requestMicroFrontendFetch"),g1e=Ir("sendMicroFrontendFetchResponse"),y1e=e=>{xm.removeToken(),e(hI())},_1e=e=>async(t,n,r)=>{const a=await e(t,n,r);return a.error&&[401].includes(a.error.status)&&y1e(n.dispatch),a},v1e=async(e,t=2e3)=>{for(;!e();)await new Promise((e=>setTimeout(e,t)))},b1e=5,w1e=e=>t=>!!e&&t.includes(e.status),gN=e=>new Promise((t=>setTimeout(t,1e3*e))),k1e=e=>async(t,n,r)=>{const a=(null==r?void 0:r.maxRetries)??5;await v1e((()=>n.getState().network.isOnline));let o=0;const i=async()=>{var s,c,l,u;const f=await e(t,n,r),d=f.error;if(o>=a)return f;o>0&&await gN(Math.pow(2,o)),o++;const p=w1e(d);switch(!0){case"mutation"===n.type:return f;case!navigator.onLine:case p([408,404]):case d&&"FETCH_ERROR"===(null==d?void 0:d.status):case d&&d.status>=500:return await i();case 429===(null==(s=null==f?void 0:f.error)?void 0:s.status):{const e=null==(u=null==(l=null==(c=f.meta)?void 0:c.response)?void 0:l.headers)?void 0:u.get("Retry-After");return await gN(+(e||"0")),await i()}default:return f}};return await i()};var Iw=(e=>(e.SERVER_RULES="serverRules",e.EVENT_ATTENDEES="eventAttendees",e))(Iw||{});const Xk="staticState",Fb={path:"",baseUrl:"",search:""},x1e=e=>{if(!e)return Fb;try{return JSON.parse(decodeURIComponent(e))||Fb}catch(e){return ku.error("Error parsing static state",e),Fb}},JV=()=>new URLSearchParams(window.location.search).get(Xk),S1e=({path:e,baseUrl:t,search:n}={})=>{const{pathname:r,origin:a,search:o}=window.location;return`${Xk}=${encodeURIComponent(JSON.stringify({path:e||r,baseUrl:t||a,search:n||o}))}`},E1e=()=>{const e=JV();return e&&localStorage.setItem(Xk,e),eU()},eU=()=>{try{const e=localStorage.getItem(Xk)||JV();return x1e(e)}catch(e){return ku.error("Error parsing static state",e),Fb}},tU={create:S1e,init:E1e,get:eU},C1e=e=>{try{const{type:t,payload:n}=e,r={type:t};return void 0!==n&&(r.payload=JSON.parse(JSON.stringify(n))),r}catch(t){return ku.warn(`Could not serialize action type: ${e.type}`,t),{type:e.type,payload:`[Non-serializable payload for action: ${e.type}]`}}},R1e=({action:e,windowElement:t,whitelist:n})=>{if(t)try{const{type:r}=e;if(!n.some((({type:e})=>e===r||"*"===e)))return;const a=C1e(e);t.postMessage(a,"*")}catch(e){ku.error("Failed to process or send message:",e)}},A1e=({onMessage:e,whitelist:t})=>{const n=n=>{const r=n.origin!==window.location.origin,a=n.data&&"object"==typeof n.data&&"type"in n.data,o=t.some((({type:e})=>e===n.data.type||"*"===e));r&&a&&o&&e(n.data)};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},T1e=async e=>{const t={};e.headers.forEach(((e,n)=>{t[n]=e}));return{body:["get","head"].includes(e.method.toLowerCase())?null:await(async()=>{try{return await e.text()}catch(e){return ku.error("No body or error reading body:",e),null}})(),headers:t,url:e.url,method:e.method,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity}},I1e=e=>{const{url:t,status:n,statusText:r,headers:a,body:o}=e,i=new Response(JSON.stringify(o),{status:n,statusText:r,headers:a});return Object.defineProperty(i,"url",{value:t}),i},P1e=async e=>{const t=crypto.randomUUID();return R1e({action:mN({id:t,options:await T1e(e)}),windowElement:window.parent,whitelist:[mN]}),new Promise((e=>{const n=A1e({onMessage:({payload:{id:r,response:a}})=>{t===r&&(n(),e(I1e(a)))},whitelist:[g1e]})}))},$1e=()=>{try{return window.self!==window.top}catch{return!0}},O1e=()=>e=>$1e()?P1e(e):fetch(e),z1e=tU.get().baseUrl,M1e=z1e||"",D1e=Mge({fetchFn:O1e(),baseUrl:M1e,responseHandler:e=>{const t=e.headers.get("content-type");return(null==t?void 0:t.startsWith("application/json"))?e.json():e.text()},prepareHeaders:e=>{const t=xm.getToken();return t&&e.set("authorization",`Bearer ${t}`),e}}),N1e=_1e(k1e(D1e)),L1e=f1e({tagTypes:["Secure","Post","Follow","Like","Settings","Rbac_Config","Admin_Apps","Admin_Users","Admin_Audit_Logs","Admin_Reports","Admin_Signup_Requests","Admin_Posts","Admin_Uploads","Admin_Roles","Admin_Jobs_Stats","Admin_Federation","Admin_Domain_Block","Group_Apps","User_Apps","Account","Profile","UserNoHtml","Relationship","Bookmarks",...Object.values(Iw)],reducerPath:"openapi",baseQuery:N1e,endpoints:()=>({})}),lr=L1e.injectEndpoints({endpoints:e=>({postApiV1AccountsAddReason:e.mutation({query:e=>({url:"/api/v1/accounts/add-reason",method:"POST",body:e.signupReasonParams})}),postApiV1AccountsAuthenticateEmail:e.mutation({query:e=>({url:"/api/v1/accounts/authenticate/email",method:"POST",body:e.authRequest})}),postApiV1AccountsAuthenticatePhone:e.mutation({query:e=>({url:"/api/v1/accounts/authenticate/phone",method:"POST",body:e.authPhoneRequest})}),putApiV1AccountsChangeName:e.mutation({query:e=>({url:"/api/v1/accounts/change/name",method:"PUT",params:{id:e.id,name:e.name,username:e.username}})}),postApiV1AccountsCheckCaptcha:e.mutation({query:e=>({url:"/api/v1/accounts/check-captcha",method:"POST",body:e.captchaVerificationParams})}),postApiV1AccountsConfirmEmail:e.mutation({query:e=>({url:"/api/v1/accounts/confirm-email",method:"POST",body:e.codeVerificationParams})}),postApiV1AccountsConfirmPhone:e.mutation({query:e=>({url:"/api/v1/accounts/confirm-phone",method:"POST",body:e.codeVerificationParams})}),deleteApiV1AccountsDelete:e.mutation({query:()=>({url:"/api/v1/accounts/delete",method:"DELETE"})}),postApiV1AccountsEmailChangeConfirm:e.mutation({query:e=>({url:"/api/v1/accounts/email/change/confirm",method:"POST",body:e.body})}),postApiV1AccountsEmailChangeRequest:e.mutation({query:e=>({url:"/api/v1/accounts/email/change/request",method:"POST",body:e.emailChangeRequest})}),putApiV1AccountsEmailChangeResendCode:e.mutation({query:()=>({url:"/api/v1/accounts/email/change/resend-code",method:"PUT"})}),postApiV1AccountsFinishCreating:e.mutation({query:e=>({url:"/api/v1/accounts/finish-creating",method:"POST",body:e.finishCreatingAccountParams,params:{htmlContent:e.htmlContent}})}),putApiV1AccountsGetTokenByHash:e.mutation({query:e=>({url:`/api/v1/accounts/get-token/${e.hash}`,method:"PUT"})}),postApiV1AccountsLoginsAddEmailPassword:e.mutation({query:e=>({url:"/api/v1/accounts/logins/add-email-password",method:"POST",body:e.addEmailRequest})}),postApiV1AccountsLoginsAddEmailPasswordConfirm:e.mutation({query:e=>({url:"/api/v1/accounts/logins/add-email-password/confirm",method:"POST",body:e.body})}),putApiV1AccountsLoginsAddEmailPasswordResendCode:e.mutation({query:()=>({url:"/api/v1/accounts/logins/add-email-password/resend-code",method:"PUT"})}),postApiV1AccountsLoginsAddPhone:e.mutation({query:e=>({url:"/api/v1/accounts/logins/add-phone",method:"POST",body:e.addPhoneRequest})}),deleteApiV1AccountsLoginsRemoveEmailPassword:e.mutation({query:()=>({url:"/api/v1/accounts/logins/remove-email-password",method:"DELETE"})}),deleteApiV1AccountsLoginsRemovePhone:e.mutation({query:()=>({url:"/api/v1/accounts/logins/remove-phone",method:"DELETE"})}),postApiV1AccountsPasswordChangeConfirm:e.mutation({query:e=>({url:"/api/v1/accounts/password/change/confirm",method:"POST",body:e.body})}),postApiV1AccountsPasswordChangeRequest:e.mutation({query:e=>({url:"/api/v1/accounts/password/change/request",method:"POST",body:e.passwordChangeRequest})}),putApiV1AccountsPasswordChangeResendCode:e.mutation({query:()=>({url:"/api/v1/accounts/password/change/resend-code",method:"PUT"})}),postApiV1AccountsPasswordRecover:e.mutation({query:e=>({url:"/api/v1/accounts/password/recover",method:"POST",body:e.passwordRecoveryRequest})}),postApiV1AccountsPasswordRecoverChange:e.mutation({query:e=>({url:"/api/v1/accounts/password/recover/change",method:"POST",body:e.passwordRecoveryChange})}),postApiV1AccountsPasswordRecoverCheckCode:e.mutation({query:e=>({url:"/api/v1/accounts/password/recover/check-code",method:"POST",body:e.passwordRecoveryCode})}),postApiV1AccountsPhoneChangeConfirmAuth:e.mutation({query:e=>({url:"/api/v1/accounts/phone/change/confirm/auth",method:"POST",body:e.body})}),postApiV1AccountsPhoneChangeConfirmNewPhone:e.mutation({query:e=>({url:"/api/v1/accounts/phone/change/confirm/new-phone",method:"POST",body:e.body})}),postApiV1AccountsPhoneChangeNewPhone:e.mutation({query:e=>({url:"/api/v1/accounts/phone/change/new-phone",method:"POST",body:e.addPhoneRequest})}),putApiV1AccountsPhoneChangeRequest:e.mutation({query:()=>({url:"/api/v1/accounts/phone/change/request",method:"PUT"})}),putApiV1AccountsPhoneChangeResendCodeAuth:e.mutation({query:()=>({url:"/api/v1/accounts/phone/change/resend-code/auth",method:"PUT"})}),putApiV1AccountsPhoneChangeResendCodeNewPhone:e.mutation({query:()=>({url:"/api/v1/accounts/phone/change/resend-code/new-phone",method:"PUT"})}),getApiV1AccountsProfile:e.query({query:e=>({url:"/api/v1/accounts/profile",params:{htmlContent:e.htmlContent}})}),postApiV1AccountsReselectUser:e.mutation({query:e=>({url:"/api/v1/accounts/reselect-user",method:"POST",params:{userId:e.userId,userName:e.userName,htmlContent:e.htmlContent}})}),putApiV1AccountsResendCodeByHash:e.mutation({query:e=>({url:`/api/v1/accounts/resend-code/${e.hash}`,method:"PUT"})}),putApiV1AccountsResendEmailByHash:e.mutation({query:e=>({url:`/api/v1/accounts/resend-email/${e.hash}`,method:"PUT"})}),postApiV1AccountsSignup:e.mutation({query:e=>({url:"/api/v1/accounts/signup",method:"POST",body:e.accountCreate})}),postApiV1AccountsSignupPhone:e.mutation({query:e=>({url:"/api/v1/accounts/signup-phone",method:"POST",body:e.phoneSignup})}),postApiV1AccountsUserReselectUser:e.mutation({query:e=>({url:"/api/v1/accounts/user/reselect-user",method:"POST",params:{userId:e.userId,userName:e.userName}})}),getApiV1AccountsById:e.query({query:e=>({url:`/api/v1/accounts/${e.id}`,params:{htmlContent:e.htmlContent}})}),getApiV1AddressesSuggest:e.query({query:e=>({url:"/api/v1/addresses/suggest",params:{text:e.text}})}),getApiV1AdminAccountByAccountId:e.query({query:e=>({url:`/api/v1/admin/account/${e.accountId}`,params:{htmlContent:e.htmlContent}})}),getApiV1AdminAuditLog:e.query({query:e=>({url:"/api/v1/admin/audit_log",params:{accountId:e.accountId,action:e.action,appId:e.appId,domain:e.domain,email:e.email,group:e.group,lastId:e.lastId,limit:e.limit,offset:e.offset,ruleId:e.ruleId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId,username:e.username}})}),putApiV1AdminChangeEmail:e.mutation({query:e=>({url:"/api/v1/admin/change/email",method:"PUT",params:{email:e.email,id:e.id,username:e.username}})}),putApiV1AdminChangePassword:e.mutation({query:e=>({url:"/api/v1/admin/change/password",method:"PUT",params:{id:e.id,password:e.password,username:e.username}})}),putApiV1AdminChangeRole:e.mutation({query:e=>({url:"/api/v1/admin/change/role",method:"PUT",params:{id:e.id,role:e.role,username:e.username,htmlContent:e.htmlContent}})}),postApiV1AdminClearApErrors:e.mutation({query:e=>({url:"/api/v1/admin/clear-ap-errors",method:"POST",params:{domain:e.domain}})}),postApiV1AdminCreateAccount:e.mutation({query:e=>({url:"/api/v1/admin/create-account",method:"POST",body:e.accountCreate,params:{htmlContent:e.htmlContent}})}),deleteApiV1AdminDelete:e.mutation({query:e=>({url:"/api/v1/admin/delete",method:"DELETE",params:{email:e.email,id:e.id,username:e.username}})}),getApiV1AdminDomainAllow:e.query({query:e=>({url:"/api/v1/admin/domain-allow",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1AdminDomainAllow:e.mutation({query:e=>({url:"/api/v1/admin/domain-allow",method:"POST",body:e.allowedDomainReq})}),deleteApiV1AdminDomainAllowByDomain:e.mutation({query:e=>({url:`/api/v1/admin/domain-allow/${e.domain}`,method:"DELETE"})}),putApiV1AdminDomainBlock:e.mutation({query:e=>({url:"/api/v1/admin/domain-block",method:"PUT",body:e.blockDomainReq})}),getApiV1AdminDomainBlock:e.query({query:e=>({url:"/api/v1/admin/domain-block",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1AdminDomainBlock:e.mutation({query:e=>({url:"/api/v1/admin/domain-block",method:"POST",body:e.blockDomainReq})}),getApiV1AdminDomainBlockList:e.query({query:e=>({url:"/api/v1/admin/domain-block/list",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1AdminDomainBlockByDomain:e.mutation({query:e=>({url:`/api/v1/admin/domain-block/${e.domain}`,method:"DELETE"})}),getApiV1AdminFederation:e.query({query:e=>({url:"/api/v1/admin/federation",params:{blockState:e.blockState,lastId:e.lastId,limit:e.limit,offset:e.offset,search:e.search,sortBy:e.sortBy,sortOrder:e.sortOrder,unavailable:e.unavailable,untilId:e.untilId,warning:e.warning}})}),getApiV1AdminFederationMetricsOperations:e.query({query:e=>({url:"/api/v1/admin/federation/metrics/operations",params:{window:e.window}})}),getApiV1AdminFederationMetricsRunningAverageSingle:e.query({query:e=>({url:"/api/v1/admin/federation/metrics/running-average-single",params:{operation:e.operation,window:e.window}})}),getApiV1AdminFederationMetricsRunningAveragesAll:e.query({query:e=>({url:"/api/v1/admin/federation/metrics/running-averages-all",params:{operations:e.operations,window:e.window}})}),getApiV1AdminFederationByDomain:e.query({query:e=>({url:`/api/v1/admin/federation/${e.domain}`})}),postApiV1AdminFeedClearUserFeed:e.mutation({query:e=>({url:"/api/v1/admin/feed/clear-user-feed",method:"POST",params:{ownerType:e.ownerType,userId:e.userId,username:e.username}})}),getApiV1AdminFeedMetricsGlobalAllOperation:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/global-all-operation",params:{ownerType:e.ownerType,window:e.window}})}),getApiV1AdminFeedMetricsGlobalAllOwners:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/global-all-owners",params:{operation:e.operation,window:e.window}})}),getApiV1AdminFeedMetricsGlobalSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/global-single",params:{operation:e.operation,ownerType:e.ownerType,window:e.window}})}),getApiV1AdminFeedMetricsHistory:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/history",params:{limit:e.limit,operation:e.operation,ownerType:e.ownerType,userId:e.userId}})}),getApiV1AdminFeedMetricsHistoryAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/history/all",params:{limit:e.limit,userId:e.userId}})}),getApiV1AdminFeedMetricsHistoryAllSingleOwner:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/history/all-single-owner",params:{limit:e.limit,ownerType:e.ownerType,userId:e.userId}})}),getApiV1AdminFeedMetricsHistoryByOwnerType:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/history/by-owner-type",params:{limit:e.limit,operation:e.operation,userId:e.userId}})}),getApiV1AdminFeedMetricsRunningAverageSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/running-average-single",params:{operation:e.operation,ownerType:e.ownerType,userId:e.userId,window:e.window}})}),getApiV1AdminFeedMetricsRunningAveragesAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/running-averages-all",params:{ownerType:e.ownerType,userId:e.userId,window:e.window}})}),getApiV1AdminFeedMetricsSlowestOperations:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-operations",params:{limit:e.limit,ownerType:e.ownerType,window:e.window}})}),getApiV1AdminFeedMetricsSlowestUsers:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-users",params:{limit:e.limit,operation:e.operation,ownerType:e.ownerType,window:e.window}})}),getApiV1AdminFeedMetricsSlowestUsersAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-users-all",params:{limit:e.limit,ownerType:e.ownerType,sortDesc:e.sortDesc,window:e.window}})}),getApiV1AdminFeedMetricsSlowestUsersSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-users-single",params:{limit:e.limit,operation:e.operation,ownerType:e.ownerType,sortDesc:e.sortDesc,window:e.window}})}),getApiV1AdminFeedMetricsSummary:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/summary",params:{includeUserCounts:e.includeUserCounts,window:e.window}})}),getApiV1AdminFeedMetricsUserCountAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/user-count-all",params:{ownerType:e.ownerType,window:e.window}})}),getApiV1AdminFeedMetricsUserCountSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/user-count-single",params:{operation:e.operation,ownerType:e.ownerType,window:e.window}})}),postApiV1AdminFeedRegenerateUserFeed:e.mutation({query:e=>({url:"/api/v1/admin/feed/regenerate-user-feed",method:"POST",params:{ownerType:e.ownerType,userId:e.userId,username:e.username}})}),postApiV1AdminPostsDelete:e.mutation({query:e=>({url:"/api/v1/admin/posts/delete",method:"POST",body:e.postDelete})}),deleteApiV1AdminPurge:e.mutation({query:e=>({url:"/api/v1/admin/purge",method:"DELETE",params:{id:e.id}})}),postApiV1AdminRegenerateKeys:e.mutation({query:e=>({url:"/api/v1/admin/regenerate-keys",method:"POST",params:{userId:e.userId,username:e.username}})}),postApiV1AdminRegenerateKeysAll:e.mutation({query:e=>({url:"/api/v1/admin/regenerate-keys-all",method:"POST",params:{batch:e.batch}})}),postApiV1AdminReportsDeletePosts:e.mutation({query:e=>({url:"/api/v1/admin/reports/delete-posts",method:"POST",body:e.body})}),getApiV1AdminReportsList:e.query({query:e=>({url:"/api/v1/admin/reports/list",params:{groupId:e.groupId,lastId:e.lastId,limit:e.limit,offset:e.offset,open:e.open,postId:e.postId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId}})}),getApiV1AdminReportsByReportId:e.query({query:e=>({url:`/api/v1/admin/reports/${e.reportId}`})}),postApiV1AdminReportsByReportIdAddNote:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/add-note`,method:"POST",body:e.body})}),postApiV1AdminReportsByReportIdAssignToSelf:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/assign-to-self`,method:"POST"})}),deleteApiV1AdminReportsByReportIdDelete:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/delete`,method:"DELETE"})}),postApiV1AdminReportsByReportIdRemoveNote:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/remove-note`,method:"POST",params:{index:e.index}})}),postApiV1AdminReportsByReportIdReopen:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/reopen`,method:"POST"})}),postApiV1AdminReportsByReportIdResolve:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/resolve`,method:"POST"})}),postApiV1AdminReportsByReportIdUnassign:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/unassign`,method:"POST"})}),postApiV1AdminRestartApDelivery:e.mutation({query:e=>({url:"/api/v1/admin/restart-ap-delivery",method:"POST",params:{domain:e.domain}})}),getApiV1AdminSearch:e.query({query:e=>({url:"/api/v1/admin/search",params:{accountId:e.accountId,country:e.country,displayName:e.displayName,domain:e.domain,email:e.email,ip:e.ip,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,state:e.state,untilId:e.untilId,userId:e.userId,username:e.username}})}),putApiV1AdminSignupRequestsApproveByHash:e.mutation({query:e=>({url:`/api/v1/admin/signup_requests/approve/${e.hash}`,method:"PUT"})}),deleteApiV1AdminSignupRequestsDeleteByHash:e.mutation({query:e=>({url:`/api/v1/admin/signup_requests/delete/${e.hash}`,method:"DELETE"})}),getApiV1AdminSignupRequestsList:e.query({query:e=>({url:"/api/v1/admin/signup_requests/list",params:{email:e.email,hash:e.hash,ip:e.ip,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),putApiV1AdminSignupRequestsRejectByHash:e.mutation({query:e=>({url:`/api/v1/admin/signup_requests/reject/${e.hash}`,method:"PUT",params:{reason:e.reason}})}),getApiV1AdminUploadsJobsQueueByQueueName:e.query({query:e=>({url:`/api/v1/admin/uploads/jobs/queue/${e.queueName}`,params:{limit:e.limit,page:e.page,sortBy:e.sortBy,sortOrder:e.sortOrder,uploadType:e.uploadType}})}),getApiV1AdminUploadsJobsSummary:e.query({query:()=>({url:"/api/v1/admin/uploads/jobs/summary"})}),getApiV1AdminUploadsSearch:e.query({query:e=>({url:"/api/v1/admin/uploads/search",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,tag:e.tag,untilId:e.untilId,uploadType:e.uploadType,userId:e.userId}})}),getApiV1AdminUploadsStorageByUserId:e.query({query:e=>({url:`/api/v1/admin/uploads/storage/${e.userId}`})}),postApiV1AdminUserChangeState:e.mutation({query:e=>({url:"/api/v1/admin/user/change-state",method:"POST",body:e.changeUserState})}),getApiV1AdminUserByUserId:e.query({query:e=>({url:`/api/v1/admin/user/${e.userId}`})}),postApiV1Apps:e.mutation({query:e=>({url:"/api/v1/apps",method:"POST",body:e.body,params:{enable:e.enable}})}),getApiV1Apps:e.query({query:()=>({url:"/api/v1/apps"})}),getApiV1AppsEnabled:e.query({query:()=>({url:"/api/v1/apps/enabled"})}),getApiV1AppsGroupByGroupId:e.query({query:e=>({url:`/api/v1/apps/group/${e.groupId}`})}),deleteApiV1AppsGroupByGroupIdAndAppId:e.mutation({query:e=>({url:`/api/v1/apps/group/${e.groupId}/${e.appId}`,method:"DELETE"})}),putApiV1AppsGroupByGroupIdAndAppId:e.mutation({query:e=>({url:`/api/v1/apps/group/${e.groupId}/${e.appId}`,method:"PUT"})}),getApiV1AppsInstalled:e.query({query:()=>({url:"/api/v1/apps/installed"})}),getApiV1AppsUser:e.query({query:()=>({url:"/api/v1/apps/user"})}),deleteApiV1AppsUserByAppId:e.mutation({query:e=>({url:`/api/v1/apps/user/${e.appId}`,method:"DELETE"})}),putApiV1AppsUserByAppId:e.mutation({query:e=>({url:`/api/v1/apps/user/${e.appId}`,method:"PUT"})}),putApiV1AppsByAppId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}`,method:"PUT",body:e.body,params:{enable:e.enable}})}),getApiV1AppsByAppId:e.query({query:e=>({url:`/api/v1/apps/${e.appId}`})}),deleteApiV1AppsByAppId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}`,method:"DELETE"})}),getApiV1AppsByAppIdData:e.query({query:e=>({url:`/api/v1/apps/${e.appId}/data`,params:{owner:e.owner,tags:e.tags,type:e.type}})}),postApiV1AppsByAppIdData:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/data`,method:"POST",body:e.dataCreate})}),putApiV1AppsByAppIdDataAndId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/data/${e.id}`,method:"PUT",body:e.dataCreate})}),deleteApiV1AppsByAppIdDataAndId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/data/${e.id}`,method:"DELETE"})}),putApiV1AppsByAppIdDefault:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/default`,method:"PUT"})}),putApiV1AppsByAppIdDisable:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/disable`,method:"PUT"})}),putApiV1AppsByAppIdEnable:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/enable`,method:"PUT"})}),getApiV1AppsByAppIdStats:e.query({query:e=>({url:`/api/v1/apps/${e.appId}/stats`})}),putApiV1AppsByAppIdUserDefault:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/user-default`,method:"PUT"})}),deleteApiV1AppsByAppIdUserDefault:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/user-default`,method:"DELETE"})}),getApiV1Block:e.query({query:e=>({url:"/api/v1/block",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1BlockBy:e.query({query:e=>({url:"/api/v1/block/by",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1BlockByUserId:e.mutation({query:e=>({url:`/api/v1/block/${e.userId}`,method:"DELETE"})}),postApiV1BlockByUserId:e.mutation({query:e=>({url:`/api/v1/block/${e.userId}`,method:"POST"})}),postApiV1Categories:e.mutation({query:e=>({url:"/api/v1/categories",method:"POST",body:e.categoryCreate})}),getApiV1CategoriesNameByCategoryName:e.query({query:e=>({url:`/api/v1/categories/name/${e.categoryName}`})}),putApiV1CategoriesByCategoryId:e.mutation({query:e=>({url:`/api/v1/categories/${e.categoryId}`,method:"PUT",body:e.categoryUpdate})}),getApiV1CategoriesByCategoryId:e.query({query:e=>({url:`/api/v1/categories/${e.categoryId}`})}),deleteApiV1CategoriesByCategoryId:e.mutation({query:e=>({url:`/api/v1/categories/${e.categoryId}`,method:"DELETE"})}),getApiV1CustomEmojis:e.query({query:e=>({url:"/api/v1/custom_emojis",params:{shortcode:e.shortcode}})}),deleteApiV1CustomEmojis:e.mutation({query:e=>({url:"/api/v1/custom_emojis",method:"DELETE",params:{shortcode:e.shortcode,category:e.category}})}),postApiV1CustomEmojis:e.mutation({query:e=>({url:"/api/v1/custom_emojis",method:"POST",body:e.emoji,params:{overwrite:e.overwrite}})}),getApiV1CustomEmojisExport:e.query({query:e=>({url:"/api/v1/custom_emojis/export",params:{category:e.category}})}),postApiV1CustomEmojisImport:e.mutation({query:e=>({url:"/api/v1/custom_emojis/import",method:"POST",body:e.body,params:{visible:e.visible,category:e.category,overwrite:e.overwrite,domain:e.domain}})}),getApiV1CustomEmojisSearch:e.query({query:e=>({url:"/api/v1/custom_emojis/search",params:{shortcode:e.shortcode}})}),postApiV1CustomEmojisUpload:e.mutation({query:e=>({url:"/api/v1/custom_emojis/upload",method:"POST",body:e.body,params:{shortcode:e.shortcode,visible:e.visible,category:e.category,overwrite:e.overwrite,domain:e.domain}})}),getApiV1Data:e.query({query:e=>({url:"/api/v1/data",params:{owner:e.owner,tags:e.tags,type:e.type}})}),postApiV1Data:e.mutation({query:e=>({url:"/api/v1/data",method:"POST",body:e.dataCreate})}),putApiV1DataById:e.mutation({query:e=>({url:`/api/v1/data/${e.id}`,method:"PUT",body:e.dataCreate})}),deleteApiV1DataById:e.mutation({query:e=>({url:`/api/v1/data/${e.id}`,method:"DELETE"})}),getApiV1Events:e.query({query:e=>({url:"/api/v1/events",params:{limit:e.limit,offset:e.offset,organizerId:e.organizerId,ownerId:e.ownerId,username:e.username}})}),postApiV1Events:e.mutation({query:e=>({url:"/api/v1/events",method:"POST",body:e.createEvent})}),getApiV1EventsFollowing:e.query({query:e=>({url:"/api/v1/events/following",params:{limit:e.limit,offset:e.offset}})}),getApiV1EventsMy:e.query({query:e=>({url:"/api/v1/events/my",params:{limit:e.limit,notRespondedOnly:e.notRespondedOnly,offset:e.offset,organizedOnly:e.organizedOnly,past:e.past}})}),putApiV1EventsByEventId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}`,method:"PUT",body:e.updateEvent})}),getApiV1EventsByEventId:e.query({query:e=>({url:`/api/v1/events/${e.eventId}`})}),deleteApiV1EventsByEventId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}`,method:"DELETE"})}),postApiV1EventsByEventIdAccept:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/accept`,method:"POST"})}),getApiV1EventsByEventIdAttendees:e.query({query:e=>({url:`/api/v1/events/${e.eventId}/attendees`,params:{limit:e.limit,offset:e.offset}})}),deleteApiV1EventsByEventIdAttendeesAndUserId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/attendees/${e.userId}`,method:"DELETE"})}),postApiV1EventsByEventIdAttendeesAndUserId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/attendees/${e.userId}`,method:"POST"})}),postApiV1EventsByEventIdCancel:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/cancel`,method:"POST"})}),postApiV1EventsByEventIdInterested:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/interested`,method:"POST"})}),postApiV1EventsByEventIdJoin:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/join`,method:"POST"})}),deleteApiV1EventsByEventIdLeave:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/leave`,method:"DELETE"})}),postApiV1EventsByEventIdMaybe:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/maybe`,method:"POST"})}),getApiV1EventsByEventIdMutual:e.query({query:e=>({url:`/api/v1/events/${e.eventId}/mutual`,params:{limit:e.limit,offset:e.offset}})}),postApiV1EventsByEventIdReject:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/reject`,method:"POST"})}),postApiV1FaspClear:e.mutation({query:()=>({url:"/api/v1/fasp/clear",method:"POST"})}),getApiV1FaspDebugV0CallbackCallbacks:e.query({query:()=>({url:"/api/v1/fasp/debug/v0/callback/callbacks"})}),deleteApiV1FaspDebugV0CallbackCallbacksById:e.mutation({query:e=>({url:`/api/v1/fasp/debug/v0/callback/callbacks/${e.id}`,method:"DELETE"})}),postApiV1FaspRegistration:e.mutation({query:e=>({url:"/api/v1/fasp/registration",method:"POST",body:e.registrationRequest})}),postApiV1FaspByProviderIdCapabilities:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/capabilities`,method:"POST",body:e.body})}),postApiV1FaspByProviderIdDebugCall:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/debug-call`,method:"POST",body:e.body})}),getApiV1FaspByProviderIdRegistrationFinish:e.query({query:e=>({url:`/api/v1/fasp/${e.providerId}/registration-finish`})}),postApiV1FaspByProviderIdRegistrationFinish:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/registration-finish`,method:"POST"})}),postApiV1FaspByProviderIdRequestBackfill:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/request_backfill`,method:"POST",params:{category:e.category}})}),putApiV1ForumsByForumId:e.mutation({query:e=>({url:`/api/v1/forums/${e.forumId}`,method:"PUT",body:e.createForum})}),getApiV1ForumsByForumId:e.query({query:e=>({url:`/api/v1/forums/${e.forumId}`})}),deleteApiV1ForumsByForumId:e.mutation({query:e=>({url:`/api/v1/forums/${e.forumId}`,method:"DELETE"})}),getApiV1ForumsByForumIdCategories:e.query({query:e=>({url:`/api/v1/forums/${e.forumId}/categories`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1ForumsByForumIdPosts:e.query({query:e=>({url:`/api/v1/forums/${e.forumId}/posts`,params:{forumTag:e.forumTag,includeBookmarkStatus:e.includeBookmarkStatus,includeFollowStatus:e.includeFollowStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withTranslation:e.withTranslation,htmlContent:e.htmlContent}})}),getApiV1ForumsByForumIdTags:e.query({query:e=>({url:`/api/v1/forums/${e.forumId}/tags`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1ForumsByForumIdTagsSearch:e.query({query:e=>({url:`/api/v1/forums/${e.forumId}/tags/search`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,q:e.q,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1Geo:e.query({query:e=>({url:"/api/v1/geo",params:{latitude:e.latitude,longitude:e.longitude}})}),getApiV1Groups:e.query({query:e=>({url:"/api/v1/groups",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1Groups:e.mutation({query:e=>({url:"/api/v1/groups",method:"POST",body:e.groupCreate})}),getApiV1GroupsAccount:e.query({query:e=>({url:"/api/v1/groups/account",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsMemberByUserId:e.query({query:e=>({url:`/api/v1/groups/member/${e.userId}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsMemberByUserIdGroups:e.query({query:e=>({url:`/api/v1/groups/member/${e.userId}/groups`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsNameByGroupname:e.query({query:e=>({url:`/api/v1/groups/name/${e.groupname}`})}),getApiV1GroupsSearch:e.query({query:e=>({url:"/api/v1/groups/search",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,substring:e.substring,untilId:e.untilId}})}),putApiV1GroupsByGroupId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}`,method:"PUT",body:e.groupUpdate})}),getApiV1GroupsByGroupId:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}`})}),deleteApiV1GroupsByGroupId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}`,method:"DELETE"})}),getApiV1GroupsByGroupIdForum:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/forum`})}),postApiV1GroupsByGroupIdForum:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/forum`,method:"POST"})}),postApiV1GroupsByGroupIdJoin:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/join`,method:"POST"})}),putApiV1GroupsByGroupIdMedia:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/media`,method:"PUT",body:e.groupMediaUpdate})}),putApiV1GroupsByGroupIdMembers:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/members`,method:"PUT",body:e.groupMemberUpdate})}),getApiV1GroupsByGroupIdMembers:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/members`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1GroupsByGroupIdMembers:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/members`,method:"POST",body:e.groupMemberCreate})}),deleteApiV1GroupsByGroupIdMembersAndMemberId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/members/${e.memberId}`,method:"DELETE"})}),getApiV1GroupsByGroupIdUsers:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/users`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1Import:e.query({query:()=>({url:"/api/v1/import"})}),postApiV1Import:e.mutation({query:e=>({url:"/api/v1/import",method:"POST",body:e.body,params:{overwrite:e.overwrite,type:e.type}})}),postApiV1ImportStartById:e.mutation({query:e=>({url:`/api/v1/import/start/${e.id}`,method:"POST"})}),getApiV1ImportById:e.query({query:e=>({url:`/api/v1/import/${e.id}`})}),getApiV1Instance:e.query({query:()=>({url:"/api/v1/instance"})}),getApiV1InstanceCountries:e.query({query:()=>({url:"/api/v1/instance/countries"})}),getApiV1InstanceDomains:e.query({query:e=>({url:"/api/v1/instance/domains",params:{domain:e.domain,limit:e.limit,software:e.software}})}),getApiV1InstanceExtendedDescription:e.query({query:()=>({url:"/api/v1/instance/extended_description"})}),getApiV1InstanceSupportedLanguages:e.query({query:()=>({url:"/api/v1/instance/supported_languages"})}),getApiV1InstanceTimezones:e.query({query:()=>({url:"/api/v1/instance/timezones"})}),getApiV1JobsListJobs:e.query({query:e=>({url:"/api/v1/jobs/list-jobs",params:{limit:e.limit,offset:e.offset}})}),getApiV1JobsListStats:e.query({query:e=>({url:"/api/v1/jobs/list-stats",params:{queue:e.queue}})}),getApiV1JobsListStatsAll:e.query({query:()=>({url:"/api/v1/jobs/list-stats-all"})}),getApiV1JobsLists:e.query({query:e=>({url:"/api/v1/jobs/lists",params:{limit:e.limit,listKind:e.listKind,offset:e.offset,queue:e.queue}})}),getApiV1JobsStats:e.query({query:()=>({url:"/api/v1/jobs/stats"})}),getApiV1JobsStatsPerDay:e.query({query:e=>({url:"/api/v1/jobs/stats-per-day",params:{lastDays:e.lastDays,queue:e.queue}})}),getApiV1Links:e.query({query:e=>({url:"/api/v1/links",params:{url:e.url}})}),getApiV1Lists:e.query({query:()=>({url:"/api/v1/lists"})}),postApiV1Lists:e.mutation({query:e=>({url:"/api/v1/lists",method:"POST",body:e.userListCreate})}),putApiV1ListsByListId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}`,method:"PUT",body:e.userListCreate})}),getApiV1ListsByListId:e.query({query:e=>({url:`/api/v1/lists/${e.listId}`})}),deleteApiV1ListsByListId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}`,method:"DELETE"})}),getApiV1ListsByListIdUsers:e.query({query:e=>({url:`/api/v1/lists/${e.listId}/users`})}),deleteApiV1ListsByListIdUsersAndUserId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}/users/${e.userId}`,method:"DELETE"})}),postApiV1ListsByListIdUsersAndUserId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}/users/${e.userId}`,method:"POST"})}),getApiV1Metrics:e.query({query:e=>({url:"/api/v1/metrics",params:{from:e.from,period:e.period,to:e.to}})}),getApiV1MetricsTotals:e.query({query:()=>({url:"/api/v1/metrics/totals"})}),getApiV1Mute:e.query({query:e=>({url:"/api/v1/mute",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1MuteByUserId:e.mutation({query:e=>({url:`/api/v1/mute/${e.userId}`,method:"DELETE"})}),postApiV1MuteByUserId:e.mutation({query:e=>({url:`/api/v1/mute/${e.userId}`,method:"POST",params:{duration:e.duration}})}),putApiV1Notes:e.mutation({query:e=>({url:"/api/v1/notes",method:"PUT",body:e.noteUpdate})}),getApiV1Notes:e.query({query:e=>({url:"/api/v1/notes",params:{userIds:e.userIds}})}),deleteApiV1NotesByUserId:e.mutation({query:e=>({url:`/api/v1/notes/${e.userId}`,method:"DELETE"})}),getApiV1Notifications:e.query({query:e=>({url:"/api/v1/notifications",params:{excludeTypes:e.excludeTypes,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,types:e.types,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1NotificationsCount:e.query({query:e=>({url:"/api/v1/notifications/count",params:{excludeTypes:e.excludeTypes,status:e.status,types:e.types}})}),postApiV1NotificationsMarkAll:e.mutation({query:e=>({url:"/api/v1/notifications/mark-all",method:"POST",params:{status:e.status}})}),getApiV1NotificationsById:e.query({query:e=>({url:`/api/v1/notifications/${e.id}`,params:{htmlContent:e.htmlContent}})}),postApiV1NotificationsByIdMark:e.mutation({query:e=>({url:`/api/v1/notifications/${e.id}/mark`,method:"POST",params:{status:e.status,htmlContent:e.htmlContent}})}),postApiV1PollsByPollIdRefresh:e.mutation({query:e=>({url:`/api/v1/polls/${e.pollId}/refresh`,method:"POST"})}),postApiV1PollsByPollIdVote:e.mutation({query:e=>({url:`/api/v1/polls/${e.pollId}/vote`,method:"POST",body:e.body})}),getApiV1Posts:e.query({query:e=>({url:"/api/v1/posts",params:{bookmarkedOnly:e.bookmarkedOnly,forumTag:e.forumTag,includeBookmarkStatus:e.includeBookmarkStatus,includeComments:e.includeComments,includeFollowStatus:e.includeFollowStatus,includeReply:e.includeReply,lastId:e.lastId,limit:e.limit,limitFirstLevelComments:e.limitFirstLevelComments,limitSecondLevelComments:e.limitSecondLevelComments,listId:e.listId,maxLevel:e.maxLevel,minLevel:e.minLevel,offset:e.offset,ownerId:e.ownerId,ownerType:e.ownerType,pinned:e.pinned,repostKind:e.repostKind,repostOf:e.repostOf,repostsOnly:e.repostsOnly,search:e.search,skipReposts:e.skipReposts,sortBy:e.sortBy,sortOrder:e.sortOrder,tag:e.tag,untilId:e.untilId,userId:e.userId,username:e.username,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,withTrends:e.withTrends,htmlContent:e.htmlContent}})}),postApiV1Posts:e.mutation({query:e=>({url:"/api/v1/posts",method:"POST",body:e.createPost,params:{htmlContent:e.htmlContent}})}),getApiV1PostsBookmarks:e.query({query:()=>({url:"/api/v1/posts/bookmarks"})}),getApiV1PostsFollowing:e.query({query:e=>({url:"/api/v1/posts/following",params:{ignoreCache:e.ignoreCache,includeBookmarkStatus:e.includeBookmarkStatus,includeFollowStatus:e.includeFollowStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,ownerType:e.ownerType,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,htmlContent:e.htmlContent}})}),getApiV1PostsLiked:e.query({query:e=>({url:"/api/v1/posts/liked",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,ownerType:e.ownerType,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1PostsMentioned:e.query({query:e=>({url:"/api/v1/posts/mentioned",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,ownerType:e.ownerType,private:e.private,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1PostsMy:e.query({query:e=>({url:"/api/v1/posts/my",params:{bookmarkedOnly:e.bookmarkedOnly,includeBookmarkStatus:e.includeBookmarkStatus,includeComments:e.includeComments,lastId:e.lastId,limit:e.limit,offset:e.offset,repostsOnly:e.repostsOnly,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1PostsPins:e.query({query:e=>({url:"/api/v1/posts/pins",params:{postOnly:e.postOnly}})}),deleteApiV1PostsPinsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/pins/${e.postId}`,method:"DELETE"})}),postApiV1PostsPinsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/pins/${e.postId}`,method:"POST"})}),getApiV1PostsPublic:e.query({query:e=>({url:"/api/v1/posts/public",params:{includeBookmarkStatus:e.includeBookmarkStatus,includeFollowStatus:e.includeFollowStatus,lastId:e.lastId,limit:e.limit,local:e.local,offset:e.offset,ownerType:e.ownerType,skipReposts:e.skipReposts,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,withTrends:e.withTrends,htmlContent:e.htmlContent}})}),getApiV1PostsReplies:e.query({query:e=>({url:"/api/v1/posts/replies",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId,username:e.username,htmlContent:e.htmlContent}})}),getApiV1PostsSubscribe:e.query({query:e=>({url:"/api/v1/posts/subscribe",params:{htmlContent:e.htmlContent}})}),putApiV1PostsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}`,method:"PUT",body:e.createPost,params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostId:e.query({query:e=>({url:`/api/v1/posts/${e.postId}`,params:{includeBookmarkStatus:e.includeBookmarkStatus,limitFirstLevelComments:e.limitFirstLevelComments,limitSecondLevelComments:e.limitSecondLevelComments,maxLevel:e.maxLevel,minLevel:e.minLevel,withComments:e.withComments,withParents:e.withParents,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,withTrends:e.withTrends,htmlContent:e.htmlContent}})}),deleteApiV1PostsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}`,method:"DELETE"})}),deleteApiV1PostsByPostIdBookmark:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/bookmark`,method:"DELETE"})}),postApiV1PostsByPostIdBookmark:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/bookmark`,method:"POST"})}),getApiV1PostsByPostIdComments:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/comments`,params:{lastId:e.lastId,limit:e.limit,limitFirstLevelComments:e.limitFirstLevelComments,limitSecondLevelComments:e.limitSecondLevelComments,maxLevel:e.maxLevel,minLevel:e.minLevel,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),postApiV1PostsByPostIdComments:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/comments`,method:"POST",body:e.createPost,params:{htmlContent:e.htmlContent}})}),putApiV1PostsByPostIdCommentsAndCommentId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/comments/${e.commentId}`,method:"PUT",body:e.createPost,params:{htmlContent:e.htmlContent}})}),deleteApiV1PostsByPostIdCommentsAndCommentId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/comments/${e.commentId}`,method:"DELETE"})}),postApiV1PostsByPostIdDetach:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/detach`,method:"POST"})}),getApiV1PostsByPostIdEdits:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/edits`,params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostIdLikes:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/likes`,params:{includeFollowedStatus:e.includeFollowedStatus,includeFollowingStatus:e.includeFollowingStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),deleteApiV1PostsByPostIdLikes:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/likes`,method:"DELETE"})}),postApiV1PostsByPostIdLikes:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/likes`,method:"POST"})}),postApiV1PostsByPostIdRefreshCard:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/refresh-card`,method:"POST"})}),deleteApiV1PostsByPostIdRepost:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/repost`,method:"DELETE"})}),postApiV1PostsByPostIdRepost:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/repost`,method:"POST",body:e.createPost,params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostIdReposts:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/reposts`,params:{includeFollowedStatus:e.includeFollowedStatus,includeFollowingStatus:e.includeFollowingStatus,kind:e.kind,lastId:e.lastId,limit:e.limit,offset:e.offset,skipDuplicates:e.skipDuplicates,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),postApiV1PostsByPostIdSubscribe:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/subscribe`,method:"POST"})}),deleteApiV1PostsByPostIdSubscribe:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/subscribe`,method:"DELETE"})}),postApiV1PostsByPostIdTranslate:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/translate`,method:"POST",params:{htmlContent:e.htmlContent,lang:e.lang}})}),getApiV1Rbac:e.query({query:()=>({url:"/api/v1/rbac"})}),getApiV1RbacActorsByActorIdPermissions:e.query({query:e=>({url:`/api/v1/rbac/actors/${e.actorId}/permissions`,params:{scope:e.scope}})}),getApiV1RbacActorsByActorIdRoles:e.query({query:e=>({url:`/api/v1/rbac/actors/${e.actorId}/roles`,params:{scope:e.scope}})}),putApiV1RbacRolesByRoleId:e.mutation({query:e=>({url:`/api/v1/rbac/roles/${e.roleId}`,method:"PUT",body:e.rbacRoleTemplate})}),getApiV1RbacScopesByScopeRoles:e.query({query:e=>({url:`/api/v1/rbac/scopes/${e.scope}/roles`})}),postApiV1RbacScopesByScopeRoles:e.mutation({query:e=>({url:`/api/v1/rbac/scopes/${e.scope}/roles`,method:"POST",body:e.rbacRoleTemplate})}),deleteApiV1RbacScopesByScopeRolesAndRoleName:e.mutation({query:e=>({url:`/api/v1/rbac/scopes/${e.scope}/roles/${e.roleName}`,method:"DELETE"})}),getApiV1RbacByResource:e.query({query:e=>({url:`/api/v1/rbac/${e.resource}`})}),postApiV1Reports:e.mutation({query:e=>({url:"/api/v1/reports",method:"POST",body:e.createReport})}),putApiV1Rules:e.mutation({query:e=>({url:"/api/v1/rules",method:"PUT",body:e.rule})}),getApiV1Rules:e.query({query:()=>({url:"/api/v1/rules"})}),postApiV1Rules:e.mutation({query:e=>({url:"/api/v1/rules",method:"POST",params:{hint:e.hint,ordering:e.ordering,text:e.text}})}),postApiV1RulesReorder:e.mutation({query:e=>({url:"/api/v1/rules/reorder",method:"POST",body:e.body})}),deleteApiV1RulesById:e.mutation({query:e=>({url:`/api/v1/rules/${e.id}`,method:"DELETE"})}),getApiV1Search:e.query({query:e=>({url:"/api/v1/search",params:{actorType:e.actorType,fasp:e.fasp,filter:e.filter,followStatus:e.followStatus,followers:e.followers,following:e.following,lastId:e.lastId,limit:e.limit,offset:e.offset,ownerType:e.ownerType,q:e.q,resolve:e.resolve,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withComments:e.withComments,withParent:e.withParent,htmlContent:e.htmlContent}})}),deleteApiV1SessionsAll:e.mutation({query:()=>({url:"/api/v1/sessions/all",method:"DELETE"})}),getApiV1SessionsList:e.query({query:()=>({url:"/api/v1/sessions/list"})}),putApiV1SessionsRevokeAll:e.mutation({query:()=>({url:"/api/v1/sessions/revoke/all",method:"PUT"})}),putApiV1SessionsRevokeBySessionKey:e.mutation({query:e=>({url:`/api/v1/sessions/revoke/${e.sessionKey}`,method:"PUT"})}),deleteApiV1SessionsBySessionKey:e.mutation({query:e=>({url:`/api/v1/sessions/${e.sessionKey}`,method:"DELETE"})}),putApiV1Settings:e.mutation({query:e=>({url:"/api/v1/settings",method:"PUT",body:e.platformSettings})}),getApiV1Settings:e.query({query:e=>({url:"/api/v1/settings",params:{keys:e.keys}})}),deleteApiV1Settings:e.mutation({query:e=>({url:"/api/v1/settings",method:"DELETE",params:{keys:e.keys}})}),putApiV1SettingsUser:e.mutation({query:e=>({url:"/api/v1/settings/user",method:"PUT",body:e.userSettings})}),getApiV1SettingsUser:e.query({query:e=>({url:"/api/v1/settings/user",params:{keys:e.keys}})}),deleteApiV1SettingsUser:e.mutation({query:e=>({url:"/api/v1/settings/user",method:"DELETE",params:{keys:e.keys}})}),getApiV1TagsFeatured:e.query({query:e=>({url:"/api/v1/tags/featured",params:{userId:e.userId}})}),deleteApiV1TagsFeaturedByName:e.mutation({query:e=>({url:`/api/v1/tags/featured/${e.name}`,method:"DELETE"})}),postApiV1TagsFeaturedByName:e.mutation({query:e=>({url:`/api/v1/tags/featured/${e.name}`,method:"POST"})}),postApiV1TagsFollowByName:e.mutation({query:e=>({url:`/api/v1/tags/follow/${e.name}`,method:"POST"})}),getApiV1TagsFollowed:e.query({query:()=>({url:"/api/v1/tags/followed"})}),getApiV1TagsTrending:e.query({query:()=>({url:"/api/v1/tags/trending"})}),postApiV1TagsUnfollowByName:e.mutation({query:e=>({url:`/api/v1/tags/unfollow/${e.name}`,method:"POST"})}),getApiV1TagsByName:e.query({query:e=>({url:`/api/v1/tags/${e.name}`,params:{historySince:e.historySince}})}),postApiV1TranslateText:e.mutation({query:e=>({url:"/api/v1/translate/text",method:"POST",body:e.translationRequest})}),getApiV1TrendsLinks:e.query({query:()=>({url:"/api/v1/trends/links"})}),getApiV1TrendsPosts:e.query({query:e=>({url:"/api/v1/trends/posts",params:{htmlContent:e.htmlContent}})}),getApiV1TrendsTags:e.query({query:()=>({url:"/api/v1/trends/tags"})}),postApiV1Uploads:e.mutation({query:e=>({url:"/api/v1/uploads",method:"POST",body:e.createUpload})}),postApiV1UploadsBatch:e.mutation({query:e=>({url:"/api/v1/uploads/batch",method:"POST",body:e.body})}),postApiV1UploadsList:e.mutation({query:e=>({url:"/api/v1/uploads/list",method:"POST",body:e.uploadList})}),getApiV1UploadsSearch:e.query({query:e=>({url:"/api/v1/uploads/search",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,tag:e.tag,untilId:e.untilId,uploadType:e.uploadType}})}),getApiV1UploadsUsages:e.query({query:e=>({url:"/api/v1/uploads/usages",params:{ids:e.ids}})}),getApiV1UploadsById:e.query({query:e=>({url:`/api/v1/uploads/${e.id}`})}),deleteApiV1UploadsById:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}`,method:"DELETE"})}),postApiV1UploadsByIdMeta:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/meta`,method:"POST",body:e.body})}),putApiV1UploadsByIdMeta:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/meta`,method:"PUT",body:e.body})}),postApiV1UploadsByIdTags:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/tags`,method:"POST",body:e.body})}),putApiV1UploadsByIdTags:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/tags`,method:"PUT",body:e.body})}),postApiV1UploadsByIdThumbnail:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/thumbnail`,method:"POST",body:e.changeVideoThumbnail})}),getApiV1UserAlias:e.query({query:()=>({url:"/api/v1/user-alias"})}),deleteApiV1UserAlias:e.mutation({query:e=>({url:"/api/v1/user-alias",method:"DELETE",params:{uri:e.uri}})}),postApiV1UserAlias:e.mutation({query:e=>({url:"/api/v1/user-alias",method:"POST",params:{acct:e.acct}})}),getApiV1UserDomainBlock:e.query({query:()=>({url:"/api/v1/user-domain-block"})}),deleteApiV1UserDomainBlockByDomain:e.mutation({query:e=>({url:`/api/v1/user-domain-block/${e.domain}`,method:"DELETE"})}),postApiV1UserDomainBlockByDomain:e.mutation({query:e=>({url:`/api/v1/user-domain-block/${e.domain}`,method:"POST"})}),deleteApiV1Users:e.mutation({query:e=>({url:"/api/v1/users",method:"DELETE",params:{id:e.id,name:e.name}})}),postApiV1Users:e.mutation({query:e=>({url:"/api/v1/users",method:"POST",body:e.userCreate,params:{account_id:e.accountId,email:e.email,htmlContent:e.htmlContent}})}),getApiV1Users:e.query({query:e=>({url:"/api/v1/users",params:{full:e.full,username:e.username,htmlContent:e.htmlContent}})}),getApiV1UsersCheck:e.query({query:e=>({url:"/api/v1/users/check",params:{username:e.username}})}),getApiV1UsersConnections:e.query({query:e=>({url:"/api/v1/users/connections",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),postApiV1UsersFollowByUsername:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}`,method:"POST",params:{domain:e.domain,mutual:e.mutual,scheme:e.scheme}})}),postApiV1UsersFollowByUsernameAccept:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/accept`,method:"POST"})}),postApiV1UsersFollowByUsernamePend:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/pend`,method:"POST"})}),postApiV1UsersFollowByUsernameReject:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/reject`,method:"POST"})}),postApiV1UsersFollowByUsernameUndo:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/undo`,method:"POST",params:{domain:e.domain,mutual:e.mutual,scheme:e.scheme}})}),getApiV1UsersFollowees:e.query({query:e=>({url:"/api/v1/users/followees",params:{anyStatus:e.anyStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersFollowers:e.query({query:e=>({url:"/api/v1/users/followers",params:{anyStatus:e.anyStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),postApiV1UsersInvite:e.mutation({query:e=>({url:"/api/v1/users/invite",method:"POST",params:{entity:e.entity,invitee:e.invitee,scheme:e.scheme}})}),postApiV1UsersInviteAccept:e.mutation({query:e=>({url:"/api/v1/users/invite/accept",method:"POST",params:{entity:e.entity,inviter:e.inviter,scheme:e.scheme}})}),getApiV1UsersInviteInviteeEntities:e.query({query:e=>({url:"/api/v1/users/invite/invitee/entities",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteInviteeEntitiesByInviterUser:e.query({query:e=>({url:`/api/v1/users/invite/invitee/entities/${e.inviterUser}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,scheme:e.scheme,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteInviteeInviters:e.query({query:e=>({url:"/api/v1/users/invite/invitee/inviters",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteInviteeInvitersByEntityUser:e.query({query:e=>({url:`/api/v1/users/invite/invitee/inviters/${e.entityUser}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,scheme:e.scheme,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteInviterEntities:e.query({query:e=>({url:"/api/v1/users/invite/inviter/entities",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteInviterInvitees:e.query({query:e=>({url:"/api/v1/users/invite/inviter/invitees",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteInviterInviteesByEntityUser:e.query({query:e=>({url:`/api/v1/users/invite/inviter/invitees/${e.entityUser}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,scheme:e.scheme,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),postApiV1UsersInviteReject:e.mutation({query:e=>({url:"/api/v1/users/invite/reject",method:"POST",params:{entity:e.entity,inviter:e.inviter,scheme:e.scheme}})}),postApiV1UsersInviteUndo:e.mutation({query:e=>({url:"/api/v1/users/invite/undo",method:"POST",params:{entity:e.entity,invitee:e.invitee,scheme:e.scheme}})}),getApiV1UsersRelationships:e.query({query:e=>({url:"/api/v1/users/relationships",params:{filter:e.filter,targets:e.targets}})}),getApiV1UsersRemoteByUserNameFullFollowers:e.query({query:e=>({url:`/api/v1/users/remote/${e.userNameFull}/followers`,params:{limit:e.limit,offset:e.offset}})}),getApiV1UsersRemoteByUserNameFullFollowing:e.query({query:e=>({url:`/api/v1/users/remote/${e.userNameFull}/following`,params:{limit:e.limit,offset:e.offset}})}),getApiV1UsersRenameHistory:e.query({query:()=>({url:"/api/v1/users/rename-history"})}),putApiV1UsersByUserId:e.mutation({query:e=>({url:`/api/v1/users/${e.userId}`,method:"PUT",body:e.userUpdate,params:{htmlContent:e.htmlContent}})}),getApiV1UsersByUserId:e.query({query:e=>({url:`/api/v1/users/${e.userId}`,params:{allowDeleted:e.allowDeleted,full:e.full,htmlContent:e.htmlContent}})}),getApiV1UsersByUserIdFollowers:e.query({query:e=>({url:`/api/v1/users/${e.userId}/followers`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1UsersByUserIdFollowing:e.query({query:e=>({url:`/api/v1/users/${e.userId}/following`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),putApiV1UsersByUserIdMedia:e.mutation({query:e=>({url:`/api/v1/users/${e.userId}/media`,method:"PUT",body:e.userUpdateMedia,params:{htmlContent:e.htmlContent}})})}),overrideExisting:!1}),{usePostApiV1AccountsAddReasonMutation:pHe,usePostApiV1AccountsAuthenticateEmailMutation:hHe,usePostApiV1AccountsAuthenticatePhoneMutation:mHe,usePutApiV1AccountsChangeNameMutation:gHe,usePostApiV1AccountsCheckCaptchaMutation:yHe,usePostApiV1AccountsConfirmEmailMutation:_He,usePostApiV1AccountsConfirmPhoneMutation:vHe,useDeleteApiV1AccountsDeleteMutation:bHe,usePostApiV1AccountsEmailChangeConfirmMutation:wHe,usePostApiV1AccountsEmailChangeRequestMutation:kHe,usePutApiV1AccountsEmailChangeResendCodeMutation:xHe,usePostApiV1AccountsFinishCreatingMutation:SHe,usePutApiV1AccountsGetTokenByHashMutation:EHe,usePostApiV1AccountsLoginsAddEmailPasswordMutation:CHe,usePostApiV1AccountsLoginsAddEmailPasswordConfirmMutation:RHe,usePutApiV1AccountsLoginsAddEmailPasswordResendCodeMutation:AHe,usePostApiV1AccountsLoginsAddPhoneMutation:THe,useDeleteApiV1AccountsLoginsRemoveEmailPasswordMutation:IHe,useDeleteApiV1AccountsLoginsRemovePhoneMutation:PHe,usePostApiV1AccountsPasswordChangeConfirmMutation:$He,usePostApiV1AccountsPasswordChangeRequestMutation:OHe,usePutApiV1AccountsPasswordChangeResendCodeMutation:zHe,usePostApiV1AccountsPasswordRecoverMutation:MHe,usePostApiV1AccountsPasswordRecoverChangeMutation:DHe,usePostApiV1AccountsPasswordRecoverCheckCodeMutation:NHe,usePostApiV1AccountsPhoneChangeConfirmAuthMutation:LHe,usePostApiV1AccountsPhoneChangeConfirmNewPhoneMutation:jHe,usePostApiV1AccountsPhoneChangeNewPhoneMutation:FHe,usePutApiV1AccountsPhoneChangeRequestMutation:BHe,usePutApiV1AccountsPhoneChangeResendCodeAuthMutation:VHe,usePutApiV1AccountsPhoneChangeResendCodeNewPhoneMutation:UHe,useGetApiV1AccountsProfileQuery:qHe,usePostApiV1AccountsReselectUserMutation:WHe,usePutApiV1AccountsResendCodeByHashMutation:HHe,usePutApiV1AccountsResendEmailByHashMutation:GHe,usePostApiV1AccountsSignupMutation:KHe,usePostApiV1AccountsSignupPhoneMutation:QHe,usePostApiV1AccountsUserReselectUserMutation:YHe,useGetApiV1AccountsByIdQuery:ZHe,useGetApiV1AddressesSuggestQuery:XHe,useGetApiV1AdminAccountByAccountIdQuery:JHe,useGetApiV1AdminAuditLogQuery:eGe,usePutApiV1AdminChangeEmailMutation:tGe,usePutApiV1AdminChangePasswordMutation:nGe,usePutApiV1AdminChangeRoleMutation:rGe,usePostApiV1AdminClearApErrorsMutation:aGe,usePostApiV1AdminCreateAccountMutation:oGe,useDeleteApiV1AdminDeleteMutation:iGe,useGetApiV1AdminDomainAllowQuery:sGe,usePostApiV1AdminDomainAllowMutation:cGe,useDeleteApiV1AdminDomainAllowByDomainMutation:lGe,usePutApiV1AdminDomainBlockMutation:fGe,useGetApiV1AdminDomainBlockQuery:uGe,usePostApiV1AdminDomainBlockMutation:dGe,useGetApiV1AdminDomainBlockListQuery:pGe,useDeleteApiV1AdminDomainBlockByDomainMutation:hGe,useGetApiV1AdminFederationQuery:mGe,useGetApiV1AdminFederationMetricsOperationsQuery:gGe,useGetApiV1AdminFederationMetricsRunningAverageSingleQuery:yGe,useGetApiV1AdminFederationMetricsRunningAveragesAllQuery:_Ge,useGetApiV1AdminFederationByDomainQuery:vGe,usePostApiV1AdminFeedClearUserFeedMutation:bGe,useGetApiV1AdminFeedMetricsGlobalAllOperationQuery:wGe,useGetApiV1AdminFeedMetricsGlobalAllOwnersQuery:kGe,useGetApiV1AdminFeedMetricsGlobalSingleQuery:xGe,useGetApiV1AdminFeedMetricsHistoryQuery:SGe,useGetApiV1AdminFeedMetricsHistoryAllQuery:EGe,useGetApiV1AdminFeedMetricsHistoryAllSingleOwnerQuery:CGe,useGetApiV1AdminFeedMetricsHistoryByOwnerTypeQuery:RGe,useGetApiV1AdminFeedMetricsRunningAverageSingleQuery:AGe,useGetApiV1AdminFeedMetricsRunningAveragesAllQuery:TGe,useGetApiV1AdminFeedMetricsSlowestOperationsQuery:IGe,useGetApiV1AdminFeedMetricsSlowestUsersQuery:PGe,useGetApiV1AdminFeedMetricsSlowestUsersAllQuery:$Ge,useGetApiV1AdminFeedMetricsSlowestUsersSingleQuery:OGe,useGetApiV1AdminFeedMetricsSummaryQuery:zGe,useGetApiV1AdminFeedMetricsUserCountAllQuery:MGe,useGetApiV1AdminFeedMetricsUserCountSingleQuery:DGe,usePostApiV1AdminFeedRegenerateUserFeedMutation:NGe,usePostApiV1AdminPostsDeleteMutation:LGe,useDeleteApiV1AdminPurgeMutation:jGe,usePostApiV1AdminRegenerateKeysMutation:FGe,usePostApiV1AdminRegenerateKeysAllMutation:BGe,usePostApiV1AdminReportsDeletePostsMutation:VGe,useGetApiV1AdminReportsListQuery:UGe,useGetApiV1AdminReportsByReportIdQuery:qGe,usePostApiV1AdminReportsByReportIdAddNoteMutation:WGe,usePostApiV1AdminReportsByReportIdAssignToSelfMutation:HGe,useDeleteApiV1AdminReportsByReportIdDeleteMutation:GGe,usePostApiV1AdminReportsByReportIdRemoveNoteMutation:KGe,usePostApiV1AdminReportsByReportIdReopenMutation:QGe,usePostApiV1AdminReportsByReportIdResolveMutation:YGe,usePostApiV1AdminReportsByReportIdUnassignMutation:ZGe,usePostApiV1AdminRestartApDeliveryMutation:XGe,useGetApiV1AdminSearchQuery:JGe,usePutApiV1AdminSignupRequestsApproveByHashMutation:eKe,useDeleteApiV1AdminSignupRequestsDeleteByHashMutation:tKe,useGetApiV1AdminSignupRequestsListQuery:nKe,usePutApiV1AdminSignupRequestsRejectByHashMutation:rKe,useGetApiV1AdminUploadsJobsQueueByQueueNameQuery:aKe,useGetApiV1AdminUploadsJobsSummaryQuery:oKe,useGetApiV1AdminUploadsSearchQuery:iKe,useGetApiV1AdminUploadsStorageByUserIdQuery:sKe,usePostApiV1AdminUserChangeStateMutation:cKe,useGetApiV1AdminUserByUserIdQuery:lKe,usePostApiV1AppsMutation:fKe,useGetApiV1AppsQuery:uKe,useGetApiV1AppsEnabledQuery:dKe,useGetApiV1AppsGroupByGroupIdQuery:pKe,useDeleteApiV1AppsGroupByGroupIdAndAppIdMutation:hKe,usePutApiV1AppsGroupByGroupIdAndAppIdMutation:mKe,useGetApiV1AppsInstalledQuery:gKe,useGetApiV1AppsUserQuery:yKe,useDeleteApiV1AppsUserByAppIdMutation:_Ke,usePutApiV1AppsUserByAppIdMutation:vKe,usePutApiV1AppsByAppIdMutation:bKe,useGetApiV1AppsByAppIdQuery:wKe,useDeleteApiV1AppsByAppIdMutation:kKe,useGetApiV1AppsByAppIdDataQuery:xKe,usePostApiV1AppsByAppIdDataMutation:SKe,usePutApiV1AppsByAppIdDataAndIdMutation:EKe,useDeleteApiV1AppsByAppIdDataAndIdMutation:CKe,usePutApiV1AppsByAppIdDefaultMutation:RKe,usePutApiV1AppsByAppIdDisableMutation:AKe,usePutApiV1AppsByAppIdEnableMutation:TKe,useGetApiV1AppsByAppIdStatsQuery:IKe,usePutApiV1AppsByAppIdUserDefaultMutation:PKe,useDeleteApiV1AppsByAppIdUserDefaultMutation:$Ke,useGetApiV1BlockQuery:OKe,useGetApiV1BlockByQuery:zKe,useDeleteApiV1BlockByUserIdMutation:MKe,usePostApiV1BlockByUserIdMutation:DKe,usePostApiV1CategoriesMutation:NKe,useGetApiV1CategoriesNameByCategoryNameQuery:LKe,usePutApiV1CategoriesByCategoryIdMutation:jKe,useGetApiV1CategoriesByCategoryIdQuery:FKe,useDeleteApiV1CategoriesByCategoryIdMutation:BKe,useGetApiV1CustomEmojisQuery:VKe,useDeleteApiV1CustomEmojisMutation:UKe,usePostApiV1CustomEmojisMutation:qKe,useGetApiV1CustomEmojisExportQuery:WKe,usePostApiV1CustomEmojisImportMutation:HKe,useGetApiV1CustomEmojisSearchQuery:GKe,usePostApiV1CustomEmojisUploadMutation:KKe,useGetApiV1DataQuery:QKe,usePostApiV1DataMutation:YKe,usePutApiV1DataByIdMutation:ZKe,useDeleteApiV1DataByIdMutation:XKe,useGetApiV1EventsQuery:JKe,usePostApiV1EventsMutation:eQe,useGetApiV1EventsFollowingQuery:tQe,useGetApiV1EventsMyQuery:nQe,usePutApiV1EventsByEventIdMutation:rQe,useGetApiV1EventsByEventIdQuery:aQe,useDeleteApiV1EventsByEventIdMutation:oQe,usePostApiV1EventsByEventIdAcceptMutation:iQe,useGetApiV1EventsByEventIdAttendeesQuery:sQe,useDeleteApiV1EventsByEventIdAttendeesAndUserIdMutation:cQe,usePostApiV1EventsByEventIdAttendeesAndUserIdMutation:lQe,usePostApiV1EventsByEventIdCancelMutation:fQe,usePostApiV1EventsByEventIdInterestedMutation:uQe,usePostApiV1EventsByEventIdJoinMutation:dQe,useDeleteApiV1EventsByEventIdLeaveMutation:pQe,usePostApiV1EventsByEventIdMaybeMutation:hQe,useGetApiV1EventsByEventIdMutualQuery:mQe,usePostApiV1EventsByEventIdRejectMutation:gQe,usePostApiV1FaspClearMutation:yQe,useGetApiV1FaspDebugV0CallbackCallbacksQuery:_Qe,useDeleteApiV1FaspDebugV0CallbackCallbacksByIdMutation:vQe,usePostApiV1FaspRegistrationMutation:bQe,usePostApiV1FaspByProviderIdCapabilitiesMutation:wQe,usePostApiV1FaspByProviderIdDebugCallMutation:kQe,useGetApiV1FaspByProviderIdRegistrationFinishQuery:xQe,usePostApiV1FaspByProviderIdRegistrationFinishMutation:SQe,usePostApiV1FaspByProviderIdRequestBackfillMutation:EQe,usePutApiV1ForumsByForumIdMutation:CQe,useGetApiV1ForumsByForumIdQuery:RQe,useDeleteApiV1ForumsByForumIdMutation:AQe,useGetApiV1ForumsByForumIdCategoriesQuery:TQe,useGetApiV1ForumsByForumIdPostsQuery:IQe,useGetApiV1ForumsByForumIdTagsQuery:PQe,useGetApiV1ForumsByForumIdTagsSearchQuery:$Qe,useGetApiV1GeoQuery:OQe,useGetApiV1GroupsQuery:zQe,usePostApiV1GroupsMutation:MQe,useGetApiV1GroupsAccountQuery:DQe,useGetApiV1GroupsMemberByUserIdQuery:NQe,useGetApiV1GroupsMemberByUserIdGroupsQuery:LQe,useGetApiV1GroupsNameByGroupnameQuery:jQe,useGetApiV1GroupsSearchQuery:FQe,usePutApiV1GroupsByGroupIdMutation:BQe,useGetApiV1GroupsByGroupIdQuery:VQe,useDeleteApiV1GroupsByGroupIdMutation:UQe,useGetApiV1GroupsByGroupIdForumQuery:qQe,usePostApiV1GroupsByGroupIdForumMutation:WQe,usePostApiV1GroupsByGroupIdJoinMutation:HQe,usePutApiV1GroupsByGroupIdMediaMutation:GQe,usePutApiV1GroupsByGroupIdMembersMutation:KQe,useGetApiV1GroupsByGroupIdMembersQuery:QQe,usePostApiV1GroupsByGroupIdMembersMutation:YQe,useDeleteApiV1GroupsByGroupIdMembersAndMemberIdMutation:ZQe,useGetApiV1GroupsByGroupIdUsersQuery:XQe,useGetApiV1ImportQuery:JQe,usePostApiV1ImportMutation:eYe,usePostApiV1ImportStartByIdMutation:tYe,useGetApiV1ImportByIdQuery:nYe,useGetApiV1InstanceQuery:rYe,useGetApiV1InstanceCountriesQuery:aYe,useGetApiV1InstanceDomainsQuery:oYe,useGetApiV1InstanceExtendedDescriptionQuery:iYe,useGetApiV1InstanceSupportedLanguagesQuery:sYe,useGetApiV1InstanceTimezonesQuery:cYe,useGetApiV1JobsListJobsQuery:lYe,useGetApiV1JobsListStatsQuery:fYe,useGetApiV1JobsListStatsAllQuery:uYe,useGetApiV1JobsListsQuery:dYe,useGetApiV1JobsStatsQuery:pYe,useGetApiV1JobsStatsPerDayQuery:hYe,useGetApiV1LinksQuery:mYe,useGetApiV1ListsQuery:gYe,usePostApiV1ListsMutation:yYe,usePutApiV1ListsByListIdMutation:_Ye,useGetApiV1ListsByListIdQuery:vYe,useDeleteApiV1ListsByListIdMutation:bYe,useGetApiV1ListsByListIdUsersQuery:wYe,useDeleteApiV1ListsByListIdUsersAndUserIdMutation:kYe,usePostApiV1ListsByListIdUsersAndUserIdMutation:xYe,useGetApiV1MetricsQuery:SYe,useGetApiV1MetricsTotalsQuery:EYe,useGetApiV1MuteQuery:CYe,useDeleteApiV1MuteByUserIdMutation:RYe,usePostApiV1MuteByUserIdMutation:AYe,usePutApiV1NotesMutation:TYe,useGetApiV1NotesQuery:IYe,useDeleteApiV1NotesByUserIdMutation:PYe,useGetApiV1NotificationsQuery:$Ye,useGetApiV1NotificationsCountQuery:OYe,usePostApiV1NotificationsMarkAllMutation:zYe,useGetApiV1NotificationsByIdQuery:MYe,usePostApiV1NotificationsByIdMarkMutation:DYe,usePostApiV1PollsByPollIdRefreshMutation:NYe,usePostApiV1PollsByPollIdVoteMutation:LYe,useGetApiV1PostsQuery:jYe,usePostApiV1PostsMutation:FYe,useGetApiV1PostsBookmarksQuery:BYe,useGetApiV1PostsFollowingQuery:VYe,useGetApiV1PostsLikedQuery:UYe,useGetApiV1PostsMentionedQuery:qYe,useGetApiV1PostsMyQuery:WYe,useGetApiV1PostsPinsQuery:HYe,useDeleteApiV1PostsPinsByPostIdMutation:GYe,usePostApiV1PostsPinsByPostIdMutation:KYe,useGetApiV1PostsPublicQuery:QYe,useGetApiV1PostsRepliesQuery:YYe,useGetApiV1PostsSubscribeQuery:ZYe,usePutApiV1PostsByPostIdMutation:XYe,useGetApiV1PostsByPostIdQuery:JYe,useDeleteApiV1PostsByPostIdMutation:eZe,useDeleteApiV1PostsByPostIdBookmarkMutation:tZe,usePostApiV1PostsByPostIdBookmarkMutation:nZe,useGetApiV1PostsByPostIdCommentsQuery:rZe,usePostApiV1PostsByPostIdCommentsMutation:aZe,usePutApiV1PostsByPostIdCommentsAndCommentIdMutation:oZe,useDeleteApiV1PostsByPostIdCommentsAndCommentIdMutation:iZe,usePostApiV1PostsByPostIdDetachMutation:sZe,useGetApiV1PostsByPostIdEditsQuery:cZe,useGetApiV1PostsByPostIdLikesQuery:lZe,useDeleteApiV1PostsByPostIdLikesMutation:fZe,usePostApiV1PostsByPostIdLikesMutation:uZe,usePostApiV1PostsByPostIdRefreshCardMutation:dZe,useDeleteApiV1PostsByPostIdRepostMutation:pZe,usePostApiV1PostsByPostIdRepostMutation:hZe,useGetApiV1PostsByPostIdRepostsQuery:mZe,usePostApiV1PostsByPostIdSubscribeMutation:gZe,useDeleteApiV1PostsByPostIdSubscribeMutation:yZe,usePostApiV1PostsByPostIdTranslateMutation:_Ze,useGetApiV1RbacQuery:vZe,useGetApiV1RbacActorsByActorIdPermissionsQuery:bZe,useGetApiV1RbacActorsByActorIdRolesQuery:wZe,usePutApiV1RbacRolesByRoleIdMutation:kZe,useGetApiV1RbacScopesByScopeRolesQuery:xZe,usePostApiV1RbacScopesByScopeRolesMutation:SZe,useDeleteApiV1RbacScopesByScopeRolesAndRoleNameMutation:EZe,useGetApiV1RbacByResourceQuery:CZe,usePostApiV1ReportsMutation:RZe,usePutApiV1RulesMutation:AZe,useGetApiV1RulesQuery:TZe,usePostApiV1RulesMutation:IZe,usePostApiV1RulesReorderMutation:PZe,useDeleteApiV1RulesByIdMutation:$Ze,useGetApiV1SearchQuery:j1e,useDeleteApiV1SessionsAllMutation:OZe,useGetApiV1SessionsListQuery:zZe,usePutApiV1SessionsRevokeAllMutation:MZe,usePutApiV1SessionsRevokeBySessionKeyMutation:DZe,useDeleteApiV1SessionsBySessionKeyMutation:NZe,usePutApiV1SettingsMutation:LZe,useGetApiV1SettingsQuery:jZe,useDeleteApiV1SettingsMutation:FZe,usePutApiV1SettingsUserMutation:BZe,useGetApiV1SettingsUserQuery:VZe,useDeleteApiV1SettingsUserMutation:UZe,useGetApiV1TagsFeaturedQuery:qZe,useDeleteApiV1TagsFeaturedByNameMutation:WZe,usePostApiV1TagsFeaturedByNameMutation:HZe,usePostApiV1TagsFollowByNameMutation:GZe,useGetApiV1TagsFollowedQuery:KZe,useGetApiV1TagsTrendingQuery:QZe,usePostApiV1TagsUnfollowByNameMutation:YZe,useGetApiV1TagsByNameQuery:ZZe,usePostApiV1TranslateTextMutation:XZe,useGetApiV1TrendsLinksQuery:JZe,useGetApiV1TrendsPostsQuery:eXe,useGetApiV1TrendsTagsQuery:tXe,usePostApiV1UploadsMutation:nXe,usePostApiV1UploadsBatchMutation:rXe,usePostApiV1UploadsListMutation:aXe,useGetApiV1UploadsSearchQuery:oXe,useGetApiV1UploadsUsagesQuery:iXe,useGetApiV1UploadsByIdQuery:sXe,useDeleteApiV1UploadsByIdMutation:cXe,usePostApiV1UploadsByIdMetaMutation:lXe,usePutApiV1UploadsByIdMetaMutation:fXe,usePostApiV1UploadsByIdTagsMutation:uXe,usePutApiV1UploadsByIdTagsMutation:dXe,usePostApiV1UploadsByIdThumbnailMutation:pXe,useGetApiV1UserAliasQuery:hXe,useDeleteApiV1UserAliasMutation:mXe,usePostApiV1UserAliasMutation:gXe,useGetApiV1UserDomainBlockQuery:yXe,useDeleteApiV1UserDomainBlockByDomainMutation:_Xe,usePostApiV1UserDomainBlockByDomainMutation:vXe,useDeleteApiV1UsersMutation:bXe,usePostApiV1UsersMutation:wXe,useGetApiV1UsersQuery:kXe,useGetApiV1UsersCheckQuery:xXe,useGetApiV1UsersConnectionsQuery:SXe,usePostApiV1UsersFollowByUsernameMutation:EXe,usePostApiV1UsersFollowByUsernameAcceptMutation:CXe,usePostApiV1UsersFollowByUsernamePendMutation:RXe,usePostApiV1UsersFollowByUsernameRejectMutation:AXe,usePostApiV1UsersFollowByUsernameUndoMutation:TXe,useGetApiV1UsersFolloweesQuery:IXe,useGetApiV1UsersFollowersQuery:PXe,usePostApiV1UsersInviteMutation:$Xe,usePostApiV1UsersInviteAcceptMutation:OXe,useGetApiV1UsersInviteInviteeEntitiesQuery:zXe,useGetApiV1UsersInviteInviteeEntitiesByInviterUserQuery:MXe,useGetApiV1UsersInviteInviteeInvitersQuery:DXe,useGetApiV1UsersInviteInviteeInvitersByEntityUserQuery:NXe,useGetApiV1UsersInviteInviterEntitiesQuery:LXe,useGetApiV1UsersInviteInviterInviteesQuery:jXe,useGetApiV1UsersInviteInviterInviteesByEntityUserQuery:FXe,usePostApiV1UsersInviteRejectMutation:BXe,usePostApiV1UsersInviteUndoMutation:VXe,useGetApiV1UsersRelationshipsQuery:UXe,useGetApiV1UsersRemoteByUserNameFullFollowersQuery:qXe,useGetApiV1UsersRemoteByUserNameFullFollowingQuery:WXe,useGetApiV1UsersRenameHistoryQuery:HXe,usePutApiV1UsersByUserIdMutation:GXe,useGetApiV1UsersByUserIdQuery:KXe,useGetApiV1UsersByUserIdFollowersQuery:QXe,useGetApiV1UsersByUserIdFollowingQuery:YXe,usePutApiV1UsersByUserIdMediaMutation:ZXe}=lr,yN={400:{title:"",description:"You have no permission ..."},401:{title:"Unauthorized",description:"Your access is restricted. Please ensure you have the correct login details"},404:{title:"Oh no, bad luck!",description:"Looks like the page you were looking for has been removed. Just in case, please make sure to check your spelling."},user404:{title:"We could not find the user you were looking for",description:"Check the username and try one more time",links:[{text:"To the Wellsley account",link:"/account"},{text:"To account settings",link:"/account/settings"}]},page404:{title:"We could not find the page you were looking for",description:"Check the address and try one more time"},post404:{title:"We could not find the post you were looking for",description:"Check the address and try one more time"},403:{title:"",description:"Your session has been expired. Please re-login again."},440:{title:"",description:"You have reached maximum allowed number of concurrent sessions."},460:{title:"",description:"Please re-login again."},498:{title:"Expired",description:"The link was expired or invalid. Please try again."},500:{title:"Oops, something went wrong!",description:'We are already on it. Please try again later or contact us at <a href="mailto:support@wave.video">support@wave.video</a>'}},K4=e=>yN[e]||yN[500],Fl=e=>{var t,n;if(!e)return K4(500).description;if(hu.isString(e))return e;if("data"in e&&hu.isString(e.data))return e.data;if("data"in e&&null!=(t=e.data)&&t.errorCode)return null==(n=e.data)?void 0:n.message;if("isUnhandledError"in e&&!e.isUnhandledError){const{status:t,data:n}=null==e?void 0:e.error;return(hu.isString(n)?n:null==n?void 0:n.message)||K4(t||500).description}return"message"in e&&e.message?e.message:"error"in e?e.error:"status"in e?K4(e.status).description:void 0},jt=async(e,t,n)=>{try{return await e,t&&Bt.success(t),e}catch(e){null==n||n(),Bt.error(Fl(e))}};
87
+ */function Cce(){if(ZM)return z4;ZM=1;var e=Jw();var t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},n=e.useSyncExternalStore,r=e.useRef,a=e.useEffect,o=e.useMemo,i=e.useDebugValue;return z4.useSyncExternalStoreWithSelector=function(e,s,c,l,u){var f=r(null);if(null===f.current){var d={hasValue:!1,value:null};f.current=d}else d=f.current;f=o((function(){function e(e){if(!a){if(a=!0,n=e,e=l(e),void 0!==u&&d.hasValue){var o=d.value;if(u(o,e))return r=o}return r=e}if(o=r,t(n,e))return o;var i=l(e);return void 0!==u&&u(o,i)?o:(n=e,r=i)}var n,r,a=!1,o=void 0===c?null:c;return[function(){return e(s())},null===o?void 0:function(){return e(o())}]}),[s,c,l,u]);var p=n(e,f[0],f[1]);return a((function(){d.hasValue=!0,d.value=p}),[p]),i(p),p},z4}function Rce(){return XM||(XM=1,O4.exports=Cce()),O4.exports}var Ace=Rce(),Ll="default"in Xb?ze:Xb,JM=Symbol.for("react-redux-context"),eD=typeof globalThis<"u"?globalThis:{};function Tce(){if(!Ll.createContext)return{};const e=eD[JM]??(eD[JM]=new Map);let t=e.get(Ll.createContext);return t||(t=Ll.createContext(null),e.set(Ll.createContext,t)),t}var wm=Tce(),Ice=()=>{throw new Error("uSES not initialized!")};function OT(e=wm){return function(){return Ll.useContext(e)}}var oB=OT(),iB=Ice,Pce=e=>{iB=e},$ce=(e,t)=>e===t;function Oce(e=wm){const t=e===wm?oB:OT(e),n=(e,n={})=>{const{equalityFn:r=$ce,devModeChecks:a={}}="function"==typeof n?{equalityFn:n}:n,{store:o,subscription:i,getServerState:s,stabilityCheck:c,identityFunctionCheck:l}=t();Ll.useRef(!0);const u=Ll.useCallback({[e.name]:t=>e(t)}[e.name],[e,c,a.stabilityCheck]),f=iB(i.addNestedSub,o.getState,s||o.getState,u,r);return Ll.useDebugValue(f),f};return Object.assign(n,{withTypes:()=>n}),n}var qa=Oce();function zce(e){e()}var Mce=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function tD(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function zy(e,t){if(tD(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!tD(e[n[r]],t[n[r]]))return!1;return!0}function sB(e=wm){const t=e===wm?oB:OT(e),n=()=>{const{store:e}=t();return e};return Object.assign(n,{withTypes:()=>n}),n}Mce?Ll.useLayoutEffect:Ll.useEffect;var cB=sB();function Dce(e=wm){const t=e===wm?cB:sB(e),n=()=>t().dispatch;return Object.assign(n,{withTypes:()=>n}),n}var Mk=Dce(),Nce=zce;Pce(Ace.useSyncExternalStoreWithSelector);const Lce=()=>qa(AT.selectors.selectIsMobile);function nD({className:e,...t}){return B.jsx("div",{className:$e("animate-pulse rounded-md bg-muted",e),...t})}const jce="sidebar_state",Fce=604800,Bce="14rem",Vce="18rem",Uce="3rem",qce="b",lB=v.createContext(null);function Dk(){const e=v.useContext(lB);if(!e)throw new Error("useSidebar must be used within a SidebarProvider.");return e}const Wce=v.forwardRef((({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...i},s)=>{const c=Lce(),[l,u]=v.useState(!1),[f,d]=v.useState(e),p=t??f,h=v.useCallback((e=>{const t="function"==typeof e?e(p):e;n?n(t):d(t),document.cookie=`${jce}=${t}; path=/; max-age=604800`}),[n,p]),m=v.useCallback((()=>c?u((e=>!e)):h((e=>!e))),[c,h,u]);v.useEffect((()=>{const e=e=>{"b"===e.key&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),m())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[m]);const y=p?"expanded":"collapsed",g=v.useMemo((()=>({state:y,open:p,setOpen:h,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:m})),[y,p,h,c,l,u,m]);return B.jsx(lB.Provider,{value:g,children:B.jsx(BF,{delayDuration:0,children:B.jsx("div",{style:{"--sidebar-width":Bce,"--sidebar-width-icon":Uce,...a},className:$e("group/sidebar-wrapper flex min-h-svh w-full has-[[data-variant=inset]]:bg-sidebar",r),ref:s,...i,children:o})})})}));Wce.displayName="SidebarProvider";const Hce=v.forwardRef((({side:e="left",variant:t="sidebar",collapsible:n="offcanvas",className:r,children:a,...o},i)=>{const{isMobile:s,state:c,openMobile:l,setOpenMobile:u}=Dk();return"none"===n?B.jsx("div",{className:$e("flex h-full w-[--sidebar-width] flex-col bg-sidebar text-sidebar-foreground",r),ref:i,...o,children:a}):s?B.jsx(Ose,{open:l,onOpenChange:u,children:B.jsxs(NF,{"data-sidebar":"sidebar","data-mobile":"true",className:"w-[--sidebar-width] bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden",style:{"--sidebar-width":Vce},side:e,children:[B.jsxs(LF,{className:"sr-only",children:[B.jsx(jF,{children:"Sidebar"}),B.jsx(FF,{children:"Displays the mobile sidebar."})]}),B.jsx("div",{className:"flex h-full w-full flex-col",children:a})]})}):B.jsxs("div",{ref:i,className:"group peer hidden text-sidebar-foreground md:block","data-state":c,"data-collapsible":"collapsed"===c?n:"","data-variant":t,"data-side":e,children:[B.jsx("div",{className:$e("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]")}),B.jsx("div",{className:$e("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),...o,children:B.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:a})})]})}));Hce.displayName="Sidebar";const Gce=v.forwardRef((({className:e,onClick:t,...n},r)=>{const{toggleSidebar:a,open:o}=Dk();return B.jsx(ek,{ref:r,"data-sidebar":"trigger",variant:"tertiary",size:"icon_m",className:$e("size-6 text-slate-900",e),onClick:e=>{null==t||t(e),a()},...n,children:o?B.jsx(MG,{size:16}):B.jsx(OG,{size:16})})}));Gce.displayName="SidebarTrigger";const Kce=v.forwardRef((({className:e,...t},n)=>{const{toggleSidebar:r}=Dk();return B.jsx("button",{ref:n,"data-sidebar":"rail","aria-label":"Toggle Sidebar",tabIndex:-1,onClick:r,title:"Toggle Sidebar",className:$e("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})}));Kce.displayName="SidebarRail";const Qce=v.forwardRef((({className:e,...t},n)=>B.jsx("main",{ref:n,className:$e("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})));Qce.displayName="SidebarInset";const Yce=v.forwardRef((({className:e,...t},n)=>B.jsx(xT,{ref:n,"data-sidebar":"input",className:$e("h-8 w-full bg-background shadow-none focus-visible:ring-2 focus-visible:ring-sidebar-ring",e),...t})));Yce.displayName="SidebarInput";const Zce=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{ref:n,"data-sidebar":"header",className:$e("flex flex-col gap-2 p-2",e),...t})));Zce.displayName="SidebarHeader";const Xce=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{ref:n,"data-sidebar":"footer",className:$e("flex flex-col gap-2 p-2",e),...t})));Xce.displayName="SidebarFooter";const Jce=v.forwardRef((({className:e,...t},n)=>B.jsx(sT,{ref:n,"data-sidebar":"separator",className:$e("mx-2 w-auto bg-sidebar-border",e),...t})));Jce.displayName="SidebarSeparator";const ele=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{ref:n,"data-sidebar":"content",className:$e("flex min-h-0 flex-1 flex-col gap-xxxs overflow-auto group-data-[collapsible=icon]:overflow-hidden",e),...t})));ele.displayName="SidebarContent";const tle=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{ref:n,"data-sidebar":"group",className:$e("relative flex w-full min-w-0 flex-col px-xxs pt-xs",e),...t})));tle.displayName="SidebarGroup";const nle=v.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const a=t?Op:"div";return B.jsx(a,{ref:r,"data-sidebar":"group-label",className:$e("flex h-s shrink-0 items-center rounded-md px-xxs py-xxs text-xs font-semibold text-slate-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})}));nle.displayName="SidebarGroupLabel";const rle=v.forwardRef((({className:e,asChild:t=!1,...n},r)=>{const a=t?Op:"button";return B.jsx(a,{ref:r,"data-sidebar":"group-action",className:$e("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})}));rle.displayName="SidebarGroupAction";const ale=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{ref:n,"data-sidebar":"group-content",className:$e("w-full text-sm",e),...t})));ale.displayName="SidebarGroupContent";const ole=v.forwardRef((({className:e,...t},n)=>B.jsx("ul",{ref:n,"data-sidebar":"menu",className:$e("flex w-full min-w-0 flex-col p-xs font-semibold text-slate-700 [&_svg]:size-4",e),...t})));ole.displayName="SidebarMenu";const ile=v.forwardRef((({className:e,...t},n)=>B.jsx("li",{ref:n,"data-sidebar":"menu-item",className:$e("group/menu-item relative",e),...t})));ile.displayName="SidebarMenuItem";const sle=Yl("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"}}),cle=v.forwardRef((({asChild:e=!1,isActive:t=!1,variant:n="default",size:r="default",tooltip:a,className:o,...i},s)=>{const c=e?Op:"button",{isMobile:l,state:u}=Dk(),f=B.jsx(c,{ref:s,"data-sidebar":"menu-button","data-size":r,"data-active":t,className:$e(sle({variant:n,size:r}),o),...i});return a?("string"==typeof a&&(a={children:a}),B.jsxs(VF,{children:[B.jsx(UF,{asChild:!0,children:f}),B.jsx(qF,{side:"right",align:"center",hidden:"collapsed"!==u||l,...a})]})):f}));cle.displayName="SidebarMenuButton";const lle=v.forwardRef((({className:e,asChild:t=!1,showOnHover:n=!1,...r},a)=>{const o=t?Op:"button";return B.jsx(o,{ref:a,"data-sidebar":"menu-action",className:$e("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})}));lle.displayName="SidebarMenuAction";const fle=v.forwardRef((({className:e,...t},n)=>B.jsx("div",{ref:n,"data-sidebar":"menu-badge",className:$e("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})));fle.displayName="SidebarMenuBadge";const ule=v.forwardRef((({className:e,showIcon:t=!1,...n},r)=>{const a=v.useMemo((()=>`${Math.floor(40*Math.random())+50}%`),[]);return B.jsxs("div",{ref:r,"data-sidebar":"menu-skeleton",className:$e("flex h-8 items-center gap-xxs rounded-md px-xxs",e),...n,children:[t&&B.jsx(nD,{className:"size-4 rounded-md","data-sidebar":"menu-skeleton-icon"}),B.jsx(nD,{className:"h-xxxs max-w-[--skeleton-width] flex-1","data-sidebar":"menu-skeleton-text",style:{"--skeleton-width":a}})]})}));ule.displayName="SidebarMenuSkeleton";const dle=v.forwardRef((({className:e,...t},n)=>B.jsx("ul",{ref:n,"data-sidebar":"menu-sub",className:$e("flex min-w-0 translate-x-px flex-col gap-xxxs border-l border-sidebar-border","group-data-[collapsible=icon]:hidden",e),...t})));dle.displayName="SidebarMenuSub";const ple=v.forwardRef((({...e},t)=>B.jsx("li",{ref:t,...e})));ple.displayName="SidebarMenuSubItem";const hle=v.forwardRef((({asChild:e=!1,size:t="md",isActive:n,className:r,...a},o)=>{const i=e?Op:"a";return B.jsx(i,{ref:o,"data-sidebar":"menu-sub-button","data-size":t,"data-active":n,className:$e("flex h-s min-w-0 -translate-x-px items-center gap-xxs overflow-hidden rounded-sm px-xxs text-sm text-slate-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),...a})}));hle.displayName="SidebarMenuSubButton";const fB="Switch",[mle,sHe]=ii(fB),[gle,yle]=mle(fB),_le=v.forwardRef(((e,t)=>{const{__scopeSwitch:n,name:r,checked:a,defaultChecked:o,required:i,disabled:s,value:c="on",onCheckedChange:l,...u}=e,[f,d]=v.useState(null),p=yn(t,(e=>d(e))),h=v.useRef(!1),m=!f||!!f.closest("form"),[y=!1,g]=kp({prop:a,defaultProp:o,onChange:l});return v.createElement(gle,{scope:n,checked:y,disabled:s},v.createElement(St.button,Le({type:"button",role:"switch","aria-checked":y,"aria-required":i,"data-state":uB(y),"data-disabled":s?"":void 0,disabled:s,value:c},u,{ref:p,onClick:lt(e.onClick,(e=>{g((e=>!e)),m&&(h.current=e.isPropagationStopped(),h.current||e.stopPropagation())}))})),m&&v.createElement(wle,{control:f,bubbles:!h.current,name:r,value:c,checked:y,required:i,disabled:s,style:{transform:"translateX(-100%)"}}))})),vle="SwitchThumb",ble=v.forwardRef(((e,t)=>{const{__scopeSwitch:n,...r}=e,a=yle(vle,n);return v.createElement(St.span,Le({"data-state":uB(a.checked),"data-disabled":a.disabled?"":void 0},r,{ref:t}))})),wle=e=>{const{control:t,checked:n,bubbles:r=!0,...a}=e,o=v.useRef(null),i=yk(n),s=_k(t);return v.useEffect((()=>{const e=o.current,t=window.HTMLInputElement.prototype,a=Object.getOwnPropertyDescriptor(t,"checked").set;if(i!==n&&a){const t=new Event("click",{bubbles:r});a.call(e,n),e.dispatchEvent(t)}}),[i,n,r]),v.createElement("input",Le({type:"checkbox","aria-hidden":!0,defaultChecked:n},a,{tabIndex:-1,ref:o,style:{...e.style,...s,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function uB(e){return e?"checked":"unchecked"}const dB=_le,kle=ble,pB=v.forwardRef((({className:e,...t},n)=>B.jsx(dB,{className:$e("peer inline-flex h-6 w-11 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 disabled:cursor-not-allowed disabled:!bg-slate-100 data-[state=checked]:bg-slate-700 data-[state=unchecked]:bg-input md:h-[18px] md:w-8",e),...t,ref:n,children:B.jsx(kle,{className:$e("pointer-events-none block size-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0 md:size-[14px] md:data-[state=checked]:translate-x-[14px]")})})));pB.displayName=dB.displayName;const hB="Tabs",[xle,cHe]=ii(hB,[Y1]),mB=Y1(),[lHe,zT]=xle(hB),Sle="TabsList",Ele=v.forwardRef(((e,t)=>{const{__scopeTabs:n,loop:r=!0,...a}=e,o=zT(Sle,n),i=mB(n);return v.createElement(tT,Le({asChild:!0},i,{orientation:o.orientation,dir:o.dir,loop:r}),v.createElement(St.div,Le({role:"tablist","aria-orientation":o.orientation},a,{ref:t})))})),Cle="TabsTrigger",Rle=v.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,disabled:a=!1,...o}=e,i=zT(Cle,n),s=mB(n),c=gB(i.baseId,r),l=yB(i.baseId,r),u=r===i.value;return v.createElement(nT,Le({asChild:!0},s,{focusable:!a,active:u}),v.createElement(St.button,Le({type:"button",role:"tab","aria-selected":u,"aria-controls":l,"data-state":u?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:c},o,{ref:t,onMouseDown:lt(e.onMouseDown,(e=>{a||0!==e.button||!1!==e.ctrlKey?e.preventDefault():i.onValueChange(r)})),onKeyDown:lt(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&i.onValueChange(r)})),onFocus:lt(e.onFocus,(()=>{const e="manual"!==i.activationMode;!u&&!a&&e&&i.onValueChange(r)}))})))})),Ale="TabsContent",Tle=v.forwardRef(((e,t)=>{const{__scopeTabs:n,value:r,forceMount:a,children:o,...i}=e,s=zT(Ale,n),c=gB(s.baseId,r),l=yB(s.baseId,r),u=r===s.value,f=v.useRef(u);return v.useEffect((()=>{const e=requestAnimationFrame((()=>f.current=!1));return()=>cancelAnimationFrame(e)}),[]),v.createElement(Ws,{present:a||u},(({present:n})=>v.createElement(St.div,Le({"data-state":u?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!n,id:l,tabIndex:0},i,{ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0}}),n&&o)))}));function gB(e,t){return`${e}-trigger-${t}`}function yB(e,t){return`${e}-content-${t}`}const _B=Ele,vB=Rle,bB=Tle,Ile=v.forwardRef((({className:e,useDefaults:t=!0,...n},r)=>B.jsx(_B,{ref:r,"data-testid":"tabsList",className:t?$e("inline-flex items-center justify-center gap-xxs border-b border-slate-200 p-none text-muted-foreground",e):e,...n})));Ile.displayName=_B.displayName;const Ple=v.forwardRef((({className:e,useDefaults:t=!0,children:n,...r},a)=>B.jsx(vB,{ref:a,className:t?$e("inline-flex items-center justify-center whitespace-nowrap p-xxs pb-[calc(theme(spacing.xxs)-2px)] pt-xxs text-basering-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring border-b-2 border-transparent font-semibold focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border-slate-900","group relative before:absolute before:inset-xxxs before:rounded-sm before:bg-transparent before:transition-colors hover:before:bg-slate-50",e):e,...r,children:B.jsx("span",{className:"relative text-slate-500 group-hover:text-slate-900 group-data-[state=active]:text-slate-900",children:n})})));Ple.displayName=vB.displayName;const $le=v.forwardRef((({className:e,...t},n)=>B.jsx(bB,{ref:n,className:$e("ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t})));$le.displayName=bB.displayName;const Ole=v.forwardRef((({className:e,...t},n)=>B.jsx("table",{ref:n,className:$e("w-full caption-bottom text-sm",e),...t})));Ole.displayName="Table";const zle=v.forwardRef((({className:e,...t},n)=>B.jsx("thead",{ref:n,className:$e("[&_tr]:border-b",e),...t})));zle.displayName="TableHeader";const Mle=v.forwardRef((({className:e,...t},n)=>B.jsx("tbody",{ref:n,className:$e("[&_tr:last-child]:border-0",e),...t})));Mle.displayName="TableBody";const Dle=v.forwardRef((({className:e,...t},n)=>B.jsx("tfoot",{ref:n,className:$e("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0",e),...t})));Dle.displayName="TableFooter";const Nle=v.forwardRef((({className:e,...t},n)=>B.jsx("tr",{ref:n,className:$e("border-b bg-background transition-colors hover:bg-gray-100 data-[state=selected]:bg-gray-200 dark:hover:bg-muted dark:data-[state=selected]:bg-muted",e),...t})));Nle.displayName="TableRow";const Lle=v.forwardRef((({className:e,...t},n)=>B.jsx("th",{ref:n,className:$e("h-m bg-inherit px-xs py-xxs text-left align-middle font-normal text-muted-foreground","whitespace-nowrap border-slate-200 text-sm text-slate-500 [&:not(:last-child)]:border-r",e),...t})));Lle.displayName="TableHead";const jle=v.forwardRef((({className:e,...t},n)=>B.jsx("td",{ref:n,className:$e("bg-inherit p-xs py-xxs align-middle","overflow-hidden truncate text-ellipsis border-slate-200 text-base text-slate-700 [&:not(:last-child)]:border-r",e),...t})));jle.displayName="TableCell";const Fle=v.forwardRef((({className:e,...t},n)=>B.jsx("caption",{ref:n,className:$e("mt-s text-sm text-muted-foreground",e),...t})));Fle.displayName="TableCaption";const wB=v.forwardRef((({className:e,...t},n)=>{const{error:r}=Mp();return B.jsx("textarea",{className:$e(`flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-gray-400 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 ${!!r&&"border-rose-600 focus-visible:ring-rose-600"}`,e),ref:n,...t})}));wB.displayName="Textarea";const Ble=Yse,QC=Zse,YC=Xse,Vle=Yl("z-50 overflow-hidden shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",{variants:{size:{default:"rounded-md border text-sm px-3 py-1.5",small:"rounded-md border px-[11px] py-[3px] text-base leading-[16px]"},theme:{default:"bg-popover text-popover-foreground",dark:"bg-slate-900_90 text-slate-50"},defaultVariants:{size:"small",theme:"dark"}}}),gw=v.forwardRef((({className:e,sideOffset:t=1,size:n,theme:r,...a},o)=>B.jsx(HF,{ref:o,sideOffset:t,className:$e(Vle({size:n,theme:r,className:e})),...a})));gw.displayName=HF.displayName;const Ule=({value:e,readonly:t,onChange:n})=>B.jsx(V5,{size:24,disabled:t,checked:JSON.parse(e),onCheckedChange:e=>n(String(e))}),qle=({readonly:e,value:t,options:n,onChange:r})=>B.jsx(zF,{disabled:e,value:t,onValueChange:r,children:n.map((({id:e,title:t,value:n,description:r})=>B.jsxs("div",{className:"flex items-center space-x-2",children:[B.jsx(MF,{value:n,id:e}),B.jsx(Ble,{children:B.jsxs(QC,{children:[B.jsx(YC,{asChild:!0,children:B.jsx(ST,{htmlFor:"r1",children:t})}),B.jsx(gw,{children:B.jsx("p",{children:r})})]})})]},e)))}),Wle=({options:e,value:t,readonly:n,onChange:r})=>B.jsxs(hT,{disabled:n,value:t,onValueChange:r,children:[B.jsx(yT,{className:"w-[180px]",children:B.jsx(gT,{})}),B.jsx(_T,{children:B.jsx(mT,{children:e.map((({id:e,title:t,value:n})=>B.jsx(vT,{value:n||"",children:t},e)))})})]}),Hle=({value:e,readonly:t,onChange:n})=>B.jsx(pB,{disabled:t,checked:e&&JSON.parse(e)||!1,onCheckedChange:e=>n(String(e))}),Gle=({readonly:e,value:t,onChange:n})=>{const[r,a]=v.useState(t);v.useEffect((()=>{a(t)}),[t]);return B.jsx(xT,{disabled:e,type:"text",value:r,onChange:({target:e})=>{a(e.value),n(e.value)}})},Kle=({inputType:e,...t})=>{switch(e){case"text":return B.jsx(Gle,{...t});case"check":return B.jsx(Ule,{...t});case"switch":return B.jsx(Hle,{...t});case"options":return t.options&&t.options.length>3?B.jsx(Wle,{...t}):B.jsx(qle,{...t})}},Qle=({id:e,readonly:t,title:n,type:r,value:a,description:o,options:i,onChange:s})=>B.jsxs("div",{className:"mb-3 flex flex-row items-center justify-between rounded-sm border p-4",children:[B.jsxs("div",{className:"mr-2 space-y-0.5",children:[B.jsx("div",{className:"text-base",children:n}),B.jsx("div",{className:"text-muted-foreground text-sm",children:o})]}),B.jsx("div",{children:B.jsx(Kle,{inputType:r,options:i,readonly:t,value:a,onChange:t=>s({id:e,value:t})})})]}),fHe=({list:e,onChange:t})=>{const n=toe();return B.jsx(Lae,{...n,children:e.map((({id:e,...n})=>B.jsx(Qle,{id:e,...n,onChange:t},e)))})},uHe=e=>{const t=[],n=(e,r="")=>Object.keys(e).flatMap((a=>{const o=r?`${r}.${a}`:a,i=e[a],s=void 0!==i.value;return s&&t.push({...e[a],id:o}),"object"!=typeof i||Array.isArray(i)||s?o:n(i,o)}));return n(e),t},dHe=({list:e,data:t={}})=>e.reduce(((e,n)=>{const r=n.id;return t&&hu.has(r,t)?e:hu.set(r,n.value)(e)}),{}),Yle={[bt.openaiConfigApiKey]:{title:"Openai config api key",type:"text",value:"",readonly:!1},[bt.mediacacheEnabled]:{title:"Media cache",type:"switch",value:"",readonly:!1},[bt.mediacacheSingleRun]:{title:"Mediacache single run",type:"switch",value:"",readonly:!1},[bt.uploadsPolicyVideoKeepOriginal]:{title:"Uploads policy video keep original",type:"switch",value:"",readonly:!1},[bt.uploadsPolicyImageKeepOriginal]:{title:"Uploads policy image keep original",type:"switch",value:"",readonly:!1},[bt.uploadsPolicyAudioKeepOriginal]:{title:"Uploads policy audio keep original",type:"switch",value:"",readonly:!1},[bt.uploadsProvider]:{title:"Upload provider",description:"",type:"text",value:"",readonly:!1},[bt.uploadsPolicyVideoMaxSize]:{title:"Upload video max size",description:"",type:"text",value:"",readonly:!0},[bt.mediacacheCheckInterval]:{title:"Media cache check interval",description:"",type:"text",value:"",readonly:!0},[bt.mediacacheLimitPerRun]:{title:"Media cache limit per run",description:"",type:"text",value:"",readonly:!0},[bt.registrationReasonToJoin]:{title:"Require Approval Reason on Sign Up",description:"",type:"switch",value:"",readonly:!1},[bt.registrationMode]:{title:"Registration Mode",description:"",type:"options",options:[{id:"open",title:"Open",value:"OPEN"},{id:"approval",title:"Approval",value:"APPROVAL"},{id:"approval",title:"Closed",value:"CLOSED"}],value:"",readonly:!1},[bt.registrationShowCaptcha]:{title:"Require Captcha on Sign Up",description:"",type:"switch",value:"",readonly:!1},[bt.captchaVerifyUrl]:{title:"Captcha - Verify Url",description:"",type:"text",value:"",readonly:!1},[bt.captchaSecretKey]:{title:"Captcha - Secret Key",description:"",type:"text",value:"",readonly:!1},[bt.captchaSiteKey]:{title:"Captcha - Site Key",description:"",type:"text",value:"",readonly:!1},[bt.confirmationCodeCodeExpirationMinutes]:{title:"Confirmation Code - Expiration Minutes",description:"It is life time of the code",type:"text",value:"",readonly:!1},[bt.confirmationCodeCounterExpirationMinutes]:{title:"Confirmation Code - Counter Expiration Minutes",description:"The time duration after which the counter for unsuccessful attempts will be reset, allowing user to request a new code",type:"text",value:"",readonly:!1},[bt.confirmationCodeLimitStoreAttempts]:{title:"Confirmation Code - Limit Store Attempts",description:"The maximum number of attempts a user is allowed to request a new code",type:"text",value:"",readonly:!1},[bt.confirmationCodeLimitCheckAttempts]:{title:"Confirmation Code - Limit Check Attempts",description:"The maximum number of attempts a user is allowed to verify a code",type:"text",value:"",readonly:!1}},MT=e=>"number"==typeof e&&!isNaN(e),My=e=>"string"==typeof e,kB=e=>"function"==typeof e,Zle=e=>v.isValidElement(e)||My(e)||kB(e)||MT(e),Dl=new Map;let ZC=[];const rD=new Set,xB=()=>Dl.size>0;function Xle(e,t){var n;if(t)return!(null==(n=Dl.get(t))||!n.isToastActive(e));let r=!1;return Dl.forEach((t=>{t.isToastActive(e)&&(r=!0)})),r}function Jle(e,t){Zle(e)&&(xB()||ZC.push({content:e,options:t}),Dl.forEach((n=>{n.buildToast(e,t)})))}function aD(e,t){Dl.forEach((n=>{null!=t&&null!=t&&t.containerId?(null==t?void 0:t.containerId)===n.id&&n.toggle(e,null==t?void 0:t.id):n.toggle(e,null==t?void 0:t.id)}))}let efe=1;const SB=()=>""+efe++;function tfe(e){return e&&(My(e.toastId)||MT(e.toastId))?e.toastId:SB()}function Dy(e,t){return Jle(e,t),t.toastId}function yw(e,t){return{...t,type:t&&t.type||e,toastId:tfe(t)}}function cb(e){return(t,n)=>Dy(t,yw(e,n))}function Bt(e,t){return Dy(e,yw("default",t))}Bt.loading=(e,t)=>Dy(e,yw("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),Bt.promise=function(e,t,n){let r,{pending:a,error:o,success:i}=t;a&&(r=My(a)?Bt.loading(a,n):Bt.loading(a.render,{...n,...a}));const s={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},c=(e,t,a)=>{if(null==t)return void Bt.dismiss(r);const o={type:e,...s,...n,data:a},i=My(t)?{render:t}:t;return r?Bt.update(r,{...o,...i}):Bt(i.render,{...o,...i}),a},l=kB(e)?e():e;return l.then((e=>c("success",i,e))).catch((e=>c("error",o,e))),l},Bt.success=cb("success"),Bt.info=cb("info"),Bt.error=cb("error"),Bt.warning=cb("warning"),Bt.warn=Bt.warning,Bt.dark=(e,t)=>Dy(e,yw("default",{theme:"dark",...t})),Bt.dismiss=function(e){!function(e){var t;if(xB()){if(null==e||My(t=e)||MT(t))Dl.forEach((t=>{t.removeToast(e)}));else if(e&&("containerId"in e||"id"in e)){const t=Dl.get(e.containerId);t?t.removeToast(e.id):Dl.forEach((t=>{t.removeToast(e.id)}))}}else ZC=ZC.filter((t=>null!=e&&t.options.toastId!==e))}(e)},Bt.clearWaitingQueue=function(e){void 0===e&&(e={}),Dl.forEach((t=>{!t.props.limit||e.containerId&&t.id!==e.containerId||t.clearQueue()}))},Bt.isActive=Xle,Bt.update=function(e,t){void 0===t&&(t={});const n=((e,t)=>{var n;let{containerId:r}=t;return null==(n=Dl.get(r||1))?void 0:n.toasts.get(e)})(e,t);if(n){const{props:r,content:a}=n,o={delay:100,...r,...t,toastId:t.toastId||e,updateId:SB()};o.toastId!==e&&(o.staleId=e);const i=o.render||a;delete o.render,Dy(i,o)}},Bt.done=e=>{Bt.update(e,{progress:1})},Bt.onChange=function(e){return rD.add(e),()=>{rD.delete(e)}},Bt.play=e=>aD(!0,e),Bt.pause=e=>aD(!1,e);const DT=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Ny="8.48.0",Do=globalThis;function Nk(e,t,n){const r=Do,a=r.__SENTRY__=r.__SENTRY__||{},o=a[Ny]=a[Ny]||{};return o[e]||(o[e]=t())}const Y_=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,nfe="Sentry Logger ",oD=["debug","info","warn","error","log","assert","trace"],iD={};function NT(e){if(!("console"in Do))return e();const t=Do.console,n={},r=Object.keys(iD);r.forEach((e=>{const r=iD[e];n[e]=t[e],t[e]=r}));try{return e()}finally{r.forEach((e=>{t[e]=n[e]}))}}function rfe(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return Y_?oD.forEach((n=>{t[n]=(...t)=>{e&&NT((()=>{Do.console[n](`${nfe}[${n}]:`,...t)}))}})):oD.forEach((e=>{t[e]=()=>{}})),t}const ri=Nk("logger",rfe),M4="<anonymous>";function wu(e){try{return e&&"function"==typeof e&&e.name||M4}catch{return M4}}function sD(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch{return}}}const Nb={},cD={};function EB(e,t){Nb[e]=Nb[e]||[],Nb[e].push(t)}function CB(e,t){if(!cD[e]){cD[e]=!0;try{t()}catch(t){Y_&&ri.error(`Error while instrumenting ${e}`,t)}}}function XC(e,t){const n=e&&Nb[e];if(n)for(const r of n)try{r(t)}catch(t){Y_&&ri.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${wu(r)}\nError:`,t)}}function Z_(){return LT(Do),Do}function LT(e){const t=e.__SENTRY__=e.__SENTRY__||{};return t.version=t.version||Ny,t[Ny]=t[Ny]||{}}const RB=Object.prototype.toString;function afe(e){switch(RB.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return Lk(e,Error)}}function jT(e,t){return RB.call(e)===`[object ${t}]`}function _w(e){return jT(e,"String")}function FT(e){return jT(e,"Object")}function ofe(e){return typeof Event<"u"&&Lk(e,Event)}function ife(e){return typeof Element<"u"&&Lk(e,Element)}function sfe(e){return jT(e,"RegExp")}function BT(e){return!(!e||!e.then||"function"!=typeof e.then)}function cfe(e){return FT(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function Lk(e,t){try{return e instanceof t}catch{return!1}}function lfe(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)}const AB=Do,ffe=80;function VT(e,t={}){if(!e)return"<unknown>";try{let n=e;const r=5,a=[];let o=0,i=0;const s=" > ",c=s.length;let l;const u=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||80;for(;n&&o++<r&&(l=ufe(n,u),!("html"===l||o>1&&i+a.length*c+l.length>=f));)a.push(l),i+=l.length,n=n.parentNode;return a.reverse().join(s)}catch{return"<unknown>"}}function ufe(e,t){const n=e,r=[];if(!n||!n.tagName)return"";if(AB.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const a=t&&t.length?t.filter((e=>n.getAttribute(e))).map((e=>[e,n.getAttribute(e)])):null;if(a&&a.length)a.forEach((e=>{r.push(`[${e[0]}="${e[1]}"]`)}));else{n.id&&r.push(`#${n.id}`);const e=n.className;if(e&&_w(e)){const t=e.split(/\s+/);for(const e of t)r.push(`.${e}`)}}const o=["aria-label","type","name","title","alt"];for(const e of o){const t=n.getAttribute(e);t&&r.push(`[${e}="${t}"]`)}return r.join("")}function dfe(){try{return AB.document.location.href}catch{return""}}function D4(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`}function pfe(e,t,n=!1){return!!_w(e)&&(sfe(t)?t.test(e):!!_w(t)&&(n?e===t:e.includes(t)))}function hfe(e,t=[],n=!1){return t.some((t=>pfe(e,t,n)))}function Fs(e,t,n){if(!(t in e))return;const r=e[t],a=n(r);"function"==typeof a&&TB(a,r);try{e[t]=a}catch{Y_&&ri.log(`Failed to replace method "${t}" in object`,e)}}function c_(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{Y_&&ri.log(`Failed to add non-enumerable property "${t}" to object`,e)}}function TB(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,c_(e,"__sentry_original__",t)}catch{}}function IB(e){return e.__sentry_original__}function mfe(e){if(afe(e))return{message:e.message,name:e.name,stack:e.stack,...fD(e)};if(ofe(e)){const t={type:e.type,target:lD(e.target),currentTarget:lD(e.currentTarget),...fD(e)};return typeof CustomEvent<"u"&&Lk(e,CustomEvent)&&(t.detail=e.detail),t}return e}function lD(e){try{return ife(e)?VT(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function fD(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function Pc(e){return JC(e,new Map)}function JC(e,t){if(gfe(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.getOwnPropertyNames(e))typeof e[n]<"u"&&(r[n]=JC(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(JC(e,t))})),r}return e}function gfe(e){if(!FT(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch{return!0}}const PB=1e3;function jk(){return Date.now()/PB}function yfe(){const{performance:e}=Do;if(!e||!e.now)return jk;const t=Date.now()-e.now(),n=null==e.timeOrigin?t:e.timeOrigin;return()=>(n+e.now())/PB}const $B=yfe(),_fe=(()=>{const{performance:e}=Do;if(!e||!e.now)return;const t=36e5,n=e.now(),r=Date.now(),a=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,o=a<t,i=e.timing&&e.timing.navigationStart,s="number"==typeof i?Math.abs(i+n-r):t;return o||s<t?a<=s?e.timeOrigin:i:r})();function yu(){const e=Do,t=e.crypto||e.msCrypto;let n=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch{}return"10000000100040008000100000000000".replace(/[018]/g,(e=>(e^(15&n())>>e/4).toString(16)))}function vfe(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function bfe(e,t,n){const r=e.exception=e.exception||{},a=r.values=r.values||[],o=a[0]=a[0]||{};o.value||(o.value=""),o.type||(o.type="Error")}function OB(e,t){const n=vfe(e);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...t},t&&"data"in t){const e={...r&&r.data,...t.data};n.mechanism.data=e}}var cu;function uD(e){return new pu((t=>{t(e)}))}!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(cu||(cu={}));class pu{constructor(e){pu.prototype.__init.call(this),pu.prototype.__init2.call(this),pu.prototype.__init3.call(this),pu.prototype.__init4.call(this),this._state=cu.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new pu(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new pu(((t,n)=>{let r,a;return this.then((t=>{a=!1,r=t,e&&e()}),(t=>{a=!0,r=t,e&&e()})).then((()=>{a?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(cu.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(cu.REJECTED,e)}}__init3(){this._setResult=(e,t)=>{if(this._state===cu.PENDING){if(BT(t))return void t.then(this._resolve,this._reject);this._state=e,this._value=t,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===cu.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===cu.RESOLVED&&e[1](this._value),this._state===cu.REJECTED&&e[2](this._value),e[0]=!0)}))}}}function wfe(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||$B(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=32===t.sid.length?t.sid:yu()),void 0!==t.init&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),"number"==typeof t.started&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof t.duration)e.duration=t.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),"number"==typeof t.errors&&(e.errors=t.errors),t.status&&(e.status=t.status)}function dD(){return yu()}function eR(){return yu().substring(16)}function Fk(e,t,n=2){if(!t||"object"!=typeof t||n<=0)return t;if(e&&t&&0===Object.keys(t).length)return e;const r={...e};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=Fk(r[e],t[e],n-1));return r}const tR="_sentrySpan";function pD(e,t){t?c_(e,tR,t):delete e[tR]}function nR(e){return e[tR]}const kfe=100;class UT{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:dD(),spanId:eR()}}clone(){const e=new UT;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,pD(e,nR(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(e){return this._user=e||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&wfe(this._session,{user:e}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const t="function"==typeof e?e(this):e,[n,r]=t instanceof km?[t.getScopeData(),t.getRequestSession()]:FT(t)?[e,e.requestSession]:[],{tags:a,extra:o,user:i,contexts:s,level:c,fingerprint:l=[],propagationContext:u}=n||{};return this._tags={...this._tags,...a},this._extra={...this._extra,...o},this._contexts={...this._contexts,...s},i&&Object.keys(i).length&&(this._user=i),c&&(this._level=c),l.length&&(this._fingerprint=l),u&&(this._propagationContext=u),r&&(this._requestSession=r),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,pD(this,void 0),this._attachments=[],this.setPropagationContext({traceId:dD()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:jk(),...e},a=this._breadcrumbs;return a.push(r),this._breadcrumbs=a.length>n?a.slice(-n):a,this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:nR(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=Fk(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:eR(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const n=t&&t.event_id?t.event_id:yu();if(!this._client)return ri.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:r,...t,event_id:n},this),n}captureMessage(e,t,n){const r=n&&n.event_id?n.event_id:yu();if(!this._client)return ri.warn("No client configured on scope - will not capture message!"),r;const a=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:a,...n,event_id:r},this),r}captureEvent(e,t){const n=t&&t.event_id?t.event_id:yu();return this._client?(this._client.captureEvent(e,{...t,event_id:n},this),n):(ri.warn("No client configured on scope - will not capture event!"),n)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const km=UT;function xfe(){return Nk("defaultCurrentScope",(()=>new km))}function Sfe(){return Nk("defaultIsolationScope",(()=>new km))}class Efe{constructor(e,t){let n,r;n=e||new km,r=t||new km,this._stack=[{scope:n}],this._isolationScope=r}withScope(e){const t=this._pushScope();let n;try{n=e(t)}catch(e){throw this._popScope(),e}return BT(n)?n.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function T1(){const e=LT(Z_());return e.stack=e.stack||new Efe(xfe(),Sfe())}function Cfe(e){return T1().withScope(e)}function Rfe(e,t){const n=T1();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function hD(e){return T1().withScope((()=>e(T1().getIsolationScope())))}function Afe(){return{withIsolationScope:hD,withScope:Cfe,withSetScope:Rfe,withSetIsolationScope:(e,t)=>hD(t),getCurrentScope:()=>T1().getScope(),getIsolationScope:()=>T1().getIsolationScope()}}function Bk(e){const t=LT(e);return t.acs?t.acs:Afe()}function J1(){return Bk(Z_()).getCurrentScope()}function X_(){return Bk(Z_()).getIsolationScope()}function Tfe(){return Nk("globalScope",(()=>new km))}function Ife(...e){const t=Bk(Z_());if(2===e.length){const[n,r]=e;return n?t.withSetScope(n,r):t.withScope(r)}return t.withScope(e[0])}function ef(){return J1().getClient()}const Pfe="_sentryMetrics";function $fe(e){const t=e[Pfe];if(!t)return;const n={};for(const[,[e,r]]of t)(n[e]||(n[e]=[])).push(Pc(r));return n}const zB="sentry.source",Ofe="sentry.sample_rate",zfe="sentry.op",Mfe="sentry.origin",Dfe=0,Nfe=1,Lfe="sentry-",jfe=/^sentry-/;function Ffe(e){const t=Bfe(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(jfe)){e[t.slice(7)]=n}return e}),{});return Object.keys(n).length>0?n:void 0}function Bfe(e){if(e&&(_w(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{const n=mD(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{}):mD(e)}function mD(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}const Vfe=1;function Ufe(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext();return Pc({parent_span_id:r?t:l_(e).parent_span_id,span_id:r?eR():t,trace_id:n})}function gD(e){return"number"==typeof e?yD(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?yD(e.getTime()):$B()}function yD(e){return e>9999999999?e/1e3:e}function l_(e){if(Wfe(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(qfe(e)){const{attributes:r,startTime:a,name:o,endTime:i,parentSpanId:s,status:c}=e;return Pc({span_id:t,trace_id:n,data:r,description:o,parent_span_id:s,start_timestamp:gD(a),timestamp:gD(i)||void 0,status:Gfe(c),op:r[zfe],origin:r[Mfe],_metrics_summary:$fe(e)})}return{span_id:t,trace_id:n}}catch{return{}}}function qfe(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}function Wfe(e){return"function"==typeof e.getSpanJSON}function Hfe(e){const{traceFlags:t}=e.spanContext();return 1===t}function Gfe(e){if(e&&0!==e.code)return 1===e.code?"ok":e.message||"unknown_error"}const Kfe="_sentryRootSpan";function qT(e){return e[Kfe]||e}function MB(){const e=Bk(Z_());return e.getActiveSpan?e.getActiveSpan():nR(J1())}function Qfe(e){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const t=ef(),n=t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}const DB="production",Yfe="_frozenDsc";function Zfe(e,t){const n=t.getOptions(),{publicKey:r}=t.getDsn()||{},a=Pc({environment:n.environment||DB,release:n.release,public_key:r,trace_id:e});return t.emit("createDsc",a),a}function NB(e){const t=ef();if(!t)return{};const n=qT(e),r=n[Yfe];if(r)return r;const a=n.spanContext().traceState,o=a&&a.get("sentry.dsc"),i=o&&Ffe(o);if(i)return i;const s=Zfe(e.spanContext().traceId,t),c=l_(n),l=c.data||{},u=l[Ofe];null!=u&&(s.sample_rate=`${u}`);const f=l[zB],d=c.description;return"url"!==f&&d&&(s.transaction=d),Qfe()&&(s.sampled=String(Hfe(n))),t.emit("createDsc",s,n),s}function _D(e){if("boolean"==typeof e)return Number(e);const t="string"==typeof e?parseFloat(e):e;if(!("number"!=typeof t||isNaN(t)||t<0||t>1))return t;DT&&ri.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`)}function Xfe(e,t=!1){const{host:n,path:r,pass:a,port:o,projectId:i,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&a?`:${a}`:""}@${n}${o?`:${o}`:""}/${r&&`${r}/`}${i}`}function Jfe(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++)if(t[e]===n)return!0;return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]}function lu(e,t=100,n=1/0){try{return rR("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function rR(e,t,n=1/0,r=1/0,a=Jfe()){const[o,i]=a;if(null==t||["boolean","string"].includes(typeof t)||"number"==typeof t&&Number.isFinite(t))return t;const s=eue(e,t);if(!s.startsWith("[object "))return s;if(t.__sentry_skip_normalization__)return t;const c="number"==typeof t.__sentry_override_normalization_depth__?t.__sentry_override_normalization_depth__:n;if(0===c)return s.replace("object ","");if(o(t))return"[Circular ~]";const l=t;if(l&&"function"==typeof l.toJSON)try{return rR("",l.toJSON(),c-1,r,a)}catch{}const u=Array.isArray(t)?[]:{};let f=0;const d=mfe(t);for(const e in d){if(!Object.prototype.hasOwnProperty.call(d,e))continue;if(f>=r){u[e]="[MaxProperties ~]";break}const t=d[e];u[e]=rR(e,t,c-1,r,a),f++}return i(t),u}function eue(e,t){try{if("domain"===e&&t&&"object"==typeof t&&t._events)return"[Domain]";if("domainEmitter"===e)return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(lfe(t))return"[VueViewModel]";if(cfe(t))return"[SyntheticEvent]";if("number"==typeof t&&!Number.isFinite(t))return`[${t}]`;if("function"==typeof t)return`[Function: ${wu(t)}]`;if("symbol"==typeof t)return`[${String(t)}]`;if("bigint"==typeof t)return`[BigInt: ${String(t)}]`;const n=tue(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(e){return`**non-serializable** (${e})`}}function tue(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function nue(e,t=[]){return[e,t]}function rue(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function aue(e,t,n,r){const a=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:(new Date).toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Xfe(r)},...a&&{trace:Pc({...a})}}}function aR(e,t,n,r=0){return new pu(((a,o)=>{const i=e[r];if(null===t||"function"!=typeof i)a(t);else{const s=i({...t},n);DT&&i.id&&null===s&&ri.log(`Event processor "${i.id}" dropped event`),BT(s)?s.then((t=>aR(e,t,n,r+1).then(a))).then(null,o):aR(e,s,n,r+1).then(a).then(null,o)}}))}let lb,vD,fb;function oue(e){const t=Do._sentryDebugIds;if(!t)return{};const n=Object.keys(t);return fb&&n.length===vD||(vD=n.length,fb=n.reduce(((n,r)=>{lb||(lb={});const a=lb[r];if(a)n[a[0]]=a[1];else{const a=e(r);for(let e=a.length-1;e>=0;e--){const o=a[e],i=o&&o.filename,s=t[r];if(i&&s){n[i]=s,lb[r]=[i,s];break}}}return n}),{})),fb}function iue(e,t){const{fingerprint:n,span:r,breadcrumbs:a,sdkProcessingMetadata:o}=t;sue(e,t),r&&fue(e,r),uue(e,n),cue(e,a),lue(e,o)}function bD(e,t){const{extra:n,tags:r,user:a,contexts:o,level:i,sdkProcessingMetadata:s,breadcrumbs:c,fingerprint:l,eventProcessors:u,attachments:f,propagationContext:d,transactionName:p,span:h}=t;ub(e,"extra",n),ub(e,"tags",r),ub(e,"user",a),ub(e,"contexts",o),e.sdkProcessingMetadata=Fk(e.sdkProcessingMetadata,s,2),i&&(e.level=i),p&&(e.transactionName=p),h&&(e.span=h),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),l.length&&(e.fingerprint=[...e.fingerprint,...l]),u.length&&(e.eventProcessors=[...e.eventProcessors,...u]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...d}}function ub(e,t,n){e[t]=Fk(e[t],n,1)}function sue(e,t){const{extra:n,tags:r,user:a,contexts:o,level:i,transactionName:s}=t,c=Pc(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});const l=Pc(r);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const u=Pc(a);u&&Object.keys(u).length&&(e.user={...u,...e.user});const f=Pc(o);f&&Object.keys(f).length&&(e.contexts={...f,...e.contexts}),i&&(e.level=i),s&&"transaction"!==e.type&&(e.transaction=s)}function cue(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function lue(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function fue(e,t){e.contexts={trace:Ufe(t),...e.contexts},e.sdkProcessingMetadata={dynamicSamplingContext:NB(t),...e.sdkProcessingMetadata};const n=l_(qT(t)).description;n&&!e.transaction&&"transaction"===e.type&&(e.transaction=n)}function uue(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}function due(e,t,n,r,a,o){const{normalizeDepth:i=3,normalizeMaxBreadth:s=1e3}=e,c={...t,event_id:t.event_id||n.event_id||yu(),timestamp:t.timestamp||jk()},l=n.integrations||e.integrations.map((e=>e.name));pue(c,e),gue(c,l),a&&a.emit("applyFrameMetadata",t),void 0===t.type&&hue(c,e.stackParser);const u=_ue(r,n.captureContext);n.mechanism&&OB(c,n.mechanism);const f=a?a.getEventProcessors():[],d=Tfe().getScopeData();if(o){bD(d,o.getScopeData())}if(u){bD(d,u.getScopeData())}const p=[...n.attachments||[],...d.attachments];p.length&&(n.attachments=p),iue(c,d);return aR([...f,...d.eventProcessors],c,n).then((e=>(e&&mue(e),"number"==typeof i&&i>0?yue(e,i,s):e)))}function pue(e,t){const{environment:n,release:r,dist:a,maxValueLength:o=250}=t;e.environment=e.environment||n||DB,!e.release&&r&&(e.release=r),!e.dist&&a&&(e.dist=a),e.message&&(e.message=D4(e.message,o));const i=e.exception&&e.exception.values&&e.exception.values[0];i&&i.value&&(i.value=D4(i.value,o));const s=e.request;s&&s.url&&(s.url=D4(s.url,o))}function hue(e,t){const n=oue(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{n&&e.filename&&(e.debug_id=n[e.filename])}))}))}catch{}}function mue(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch{}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}function gue(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function yue(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:lu(e.data,t,n)}})))},...e.user&&{user:lu(e.user,t,n)},...e.contexts&&{contexts:lu(e.contexts,t,n)},...e.extra&&{extra:lu(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=lu(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:lu(e.data,t,n)}})))),e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=lu(e.contexts.flags,3,n)),r}function _ue(e,t){if(!t)return e;const n=e?e.clone():new km;return n.update(t),n}function WT(e,t){return J1().captureException(e,void 0)}function vue(e,t){const n={captureContext:t};return J1().captureMessage(e,void 0,n)}function bue(e,t){X_().setContext(e,t)}function wue(e,t){X_().setExtra(e,t)}function kue(e){X_().addEventProcessor(e)}const xue=6e4;function Sue(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?xue:r-t}function Eue(e,t){return e[t]||e.all||0}function Cue(e,t,n=Date.now()){return Eue(e,t)>n}function Rue(e,{statusCode:t,headers:n},r=Date.now()){const a={...e},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const e of o.trim().split(",")){const[t,n,,,o]=e.split(":",5),i=parseInt(t,10),s=1e3*(isNaN(i)?60:i);if(n)for(const e of n.split(";"))"metric_bucket"===e?(!o||o.split(";").includes("custom"))&&(a[e]=r+s):a[e]=r+s;else a.all=r+s}else i?a.all=r+Sue(i,r):429===t&&(a.all=r+6e4);return a}function Aue(e,t){const n=t&&t.getDsn(),r=t&&t.getOptions().tunnel;return Iue(e,n)||Tue(e,r)}function Tue(e,t){return!!t&&wD(e)===wD(t)}function Iue(e,t){return!!t&&e.includes(t.host)}function wD(e){return"/"===e[e.length-1]?e.slice(0,-1):e}const Pue=100;function $ue(e,t){const n=ef(),r=X_();if(!n)return;const{beforeBreadcrumb:a=null,maxBreadcrumbs:o=Pue}=n.getOptions();if(o<=0)return;const i={timestamp:jk(),...e},s=a?NT((()=>a(i,t))):i;null!==s&&(n.emit&&n.emit("beforeAddBreadcrumb",s,t),r.addBreadcrumb(s,o))}function Oue(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"}const zue="Dedupe",Mue=()=>{let e;return{name:zue,processEvent(t){if(t.type)return t;try{if(Nue(t,e))return DT&&ri.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Due=Mue;function Nue(e,t){return!!t&&!(!Lue(e,t)&&!jue(e,t))}function Lue(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!jB(e,t)||!LB(e,t))}function jue(e,t){const n=kD(t),r=kD(e);return!!(n&&r&&n.type===r.type&&n.value===r.value&&jB(e,t)&&LB(e,t))}function LB(e,t){let n=sD(e),r=sD(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||r.length!==n.length)return!1;for(let e=0;e<r.length;e++){const t=r[e],a=n[e];if(t.filename!==a.filename||t.lineno!==a.lineno||t.colno!==a.colno||t.function!==a.function)return!1}return!0}function jB(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return n.join("")===r.join("")}catch{return!1}}function kD(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Fue(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Bue(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function Vue(){return!Bue()&&"[object process]"===Object.prototype.toString.call(typeof process<"u"?process:0)}function xD(){return typeof window<"u"&&(!Vue()||Uue())}function Uue(){const e=Do.process;return!!e&&"renderer"===e.type}const db=Do;function que(){const e=db.chrome,t=e&&e.app&&e.app.runtime,n="history"in db&&!!db.history.pushState&&!!db.history.replaceState;return!t&&n}function Wue(e,t){return e??t()}function Lb(e){let t,n=e[0],r=1;for(;r<e.length;){const a=e[r],o=e[r+1];if(r+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return;"access"===a||"optionalAccess"===a?(t=n,n=o(n)):("call"===a||"optionalCall"===a)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const vy=Do;function Hue(){setTimeout((()=>{}))}function I1(e,t={}){if("function"!=typeof e)return e;try{const t=e.__sentry_wrapped__;if(t)return"function"==typeof t?t:e;if(IB(e))return e}catch{return e}const n=function(...n){try{const r=n.map((e=>I1(e,t)));return e.apply(this,r)}catch(e){throw Hue(),Ife((r=>{r.addEventProcessor((e=>(t.mechanism&&(bfe(e),OB(e,t.mechanism)),e.extra={...e.extra,arguments:n},e))),WT(e)})),e}};try{for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(n[t]=e[t])}catch{}TB(n,e),c_(e,"__sentry_wrapped__",n);try{Object.getOwnPropertyDescriptor(n,"name").configurable&&Object.defineProperty(n,"name",{get:()=>e.name})}catch{}return n}const FB=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Gue=(e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good",J_=(e,t,n,r)=>{let a,o;return i=>{t.value>=0&&(i||r)&&(o=t.value-(a||0),(o||void 0===a)&&(a=t.value,t.delta=o,t.rating=Gue(t.value,n),e(t)))}},rn=Do,Kue=()=>`v4-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,BB=(e=!0)=>{const t=rn.performance&&rn.performance.getEntriesByType&&rn.performance.getEntriesByType("navigation")[0];if(!e||t&&t.responseStart>0&&t.responseStart<performance.now())return t},HT=()=>{const e=BB();return e&&e.activationStart||0},ev=(e,t)=>{const n=BB();let r="navigate";return n&&(rn.document&&rn.document.prerendering||HT()>0?r="prerender":rn.document&&rn.document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:Kue(),navigationType:r}},Dm=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},tv=e=>{const t=t=>{("pagehide"===t.type||rn.document&&"hidden"===rn.document.visibilityState)&&e(t)};rn.document&&(addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0))},Vk=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Ly=-1;const Que=()=>"hidden"!==rn.document.visibilityState||rn.document.prerendering?1/0:0,vw=e=>{"hidden"===rn.document.visibilityState&&Ly>-1&&(Ly="visibilitychange"===e.type?e.timeStamp:0,Zue())},Yue=()=>{addEventListener("visibilitychange",vw,!0),addEventListener("prerenderingchange",vw,!0)},Zue=()=>{removeEventListener("visibilitychange",vw,!0),removeEventListener("prerenderingchange",vw,!0)},GT=()=>(rn.document&&Ly<0&&(Ly=Que(),Yue()),{get firstHiddenTime(){return Ly}}),Uk=e=>{rn.document&&rn.document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},Xue=[1800,3e3],Jue=(e,t={})=>{Uk((()=>{const n=GT(),r=ev("FCP");let a;const o=Dm("paint",(e=>{e.forEach((e=>{"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-HT(),0),r.entries.push(e),a(!0)))}))}));o&&(a=J_(e,r,Xue,t.reportAllChanges))}))},ede=[.1,.25],tde=(e,t={})=>{Jue(Vk((()=>{const n=ev("CLS",0);let r,a=0,o=[];const i=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=o[0],n=o[o.length-1];a&&t&&n&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e])}})),a>n.value&&(n.value=a,n.entries=o,r())},s=Dm("layout-shift",i);s&&(r=J_(e,n,ede,t.reportAllChanges),tv((()=>{i(s.takeRecords()),r(!0)})),setTimeout(r,0))})))},nde=[100,300],rde=(e,t={})=>{Uk((()=>{const n=GT(),r=ev("FID");let a;const o=e=>{e.startTime<n.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),a(!0))},i=e=>{e.forEach(o)},s=Dm("first-input",i);a=J_(e,r,nde,t.reportAllChanges),s&&tv(Vk((()=>{i(s.takeRecords()),s.disconnect()})))}))};let VB=0,N4=1/0,pb=0;const ade=e=>{e.forEach((e=>{e.interactionId&&(N4=Math.min(N4,e.interactionId),pb=Math.max(pb,e.interactionId),VB=pb?(pb-N4)/7+1:0)}))};let oR;const ode=()=>oR?VB:performance.interactionCount||0,ide=()=>{"interactionCount"in performance||oR||(oR=Dm("event",ade,{type:"event",buffered:!0,durationThreshold:0}))},fu=[],L4=new Map,sde=40;let cde=0;const lde=()=>ode()-cde,fde=()=>{const e=Math.min(fu.length-1,Math.floor(lde()/50));return fu[e]},j4=10,ude=[],dde=e=>{if(ude.forEach((t=>t(e))),!e.interactionId&&"first-input"!==e.entryType)return;const t=fu[fu.length-1],n=L4.get(e.interactionId);if(n||fu.length<10||t&&e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===(n.entries[0]&&n.entries[0].startTime)&&n.entries.push(e);else{const t={id:e.interactionId,latency:e.duration,entries:[e]};L4.set(t.id,t),fu.push(t)}fu.sort(((e,t)=>t.latency-e.latency)),fu.length>10&&fu.splice(10).forEach((e=>L4.delete(e.id)))}},UB=e=>{const t=rn.requestIdleCallback||rn.setTimeout;let n=-1;return e=Vk(e),rn.document&&"hidden"===rn.document.visibilityState?e():(n=t(e),tv(e)),n},pde=[200,500],hde=(e,t={})=>{"PerformanceEventTiming"in rn&&"interactionId"in PerformanceEventTiming.prototype&&Uk((()=>{ide();const n=ev("INP");let r;const a=e=>{UB((()=>{e.forEach(dde);const t=fde();t&&t.latency!==n.value&&(n.value=t.latency,n.entries=t.entries,r())}))},o=Dm("event",a,{durationThreshold:null!=t.durationThreshold?t.durationThreshold:40});r=J_(e,n,pde,t.reportAllChanges),o&&(o.observe({type:"first-input",buffered:!0}),tv((()=>{a(o.takeRecords()),r(!0)})))}))},mde=[2500,4e3],SD={},gde=(e,t={})=>{Uk((()=>{const n=GT(),r=ev("LCP");let a;const o=e=>{t.reportAllChanges||(e=e.slice(-1)),e.forEach((e=>{e.startTime<n.firstHiddenTime&&(r.value=Math.max(e.startTime-HT(),0),r.entries=[e],a())}))},i=Dm("largest-contentful-paint",o);if(i){a=J_(e,r,mde,t.reportAllChanges);const n=Vk((()=>{SD[r.id]||(o(i.takeRecords()),i.disconnect(),SD[r.id]=!0,a(!0))}));["keydown","click"].forEach((e=>{rn.document&&addEventListener(e,(()=>UB(n)),{once:!0,capture:!0})})),tv(n)}}))},jy={},bw={};let qB,WB,HB,GB;function yde(e,t=!1){return qk("cls",e,kde,qB,t)}function _de(e,t=!1){return qk("lcp",e,Sde,HB,t)}function vde(e){return qk("fid",e,xde,WB)}function bde(e){return qk("inp",e,Ede,GB)}function wde(e,t){return KB(e,t),bw[e]||(Cde(e),bw[e]=!0),QB(e,t)}function nv(e,t){const n=jy[e];if(n&&n.length)for(const r of n)try{r(t)}catch(t){FB&&ri.error(`Error while triggering instrumentation handler.\nType: ${e}\nName: ${wu(r)}\nError:`,t)}}function kde(){return tde((e=>{nv("cls",{metric:e}),qB=e}),{reportAllChanges:!0})}function xde(){return rde((e=>{nv("fid",{metric:e}),WB=e}))}function Sde(){return gde((e=>{nv("lcp",{metric:e}),HB=e}),{reportAllChanges:!0})}function Ede(){return hde((e=>{nv("inp",{metric:e}),GB=e}))}function qk(e,t,n,r,a=!1){let o;return KB(e,t),bw[e]||(o=n(),bw[e]=!0),r&&t({metric:r}),QB(e,t,a?o:void 0)}function Cde(e){const t={};"event"===e&&(t.durationThreshold=0),Dm(e,(t=>{nv(e,{entries:t})}),t)}function KB(e,t){jy[e]=jy[e]||[],jy[e].push(t)}function QB(e,t,n){return()=>{n&&n();const r=jy[e];if(!r)return;const a=r.indexOf(t);-1!==a&&r.splice(a,1)}}const Rde=1e3;let ED,iR,sR,hb;function Ade(e){EB("dom",e),CB("dom",Tde)}function Tde(){if(!rn.document)return;const e=XC.bind(null,"dom"),t=CD(e,!0);rn.document.addEventListener("click",t,!1),rn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach((t=>{const n=rn[t],r=n&&n.prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Fs(r,"addEventListener",(function(t){return function(n,r,a){if("click"===n||"keypress"==n)try{const r=this.__sentry_instrumentation_handlers__=this.__sentry_instrumentation_handlers__||{},o=r[n]=r[n]||{refCount:0};if(!o.handler){const r=CD(e);o.handler=r,t.call(this,n,r,a)}o.refCount++}catch{}return t.call(this,n,r,a)}})),Fs(r,"removeEventListener",(function(e){return function(t,n,r){if("click"===t||"keypress"==t)try{const n=this.__sentry_instrumentation_handlers__||{},a=n[t];a&&(a.refCount--,a.refCount<=0&&(e.call(this,t,a.handler,r),a.handler=void 0,delete n[t]),0===Object.keys(n).length&&delete this.__sentry_instrumentation_handlers__)}catch{}return e.call(this,t,n,r)}})))}))}function Ide(e){if(e.type!==iR)return!1;try{if(!e.target||e.target._sentryId!==sR)return!1}catch{}return!0}function Pde(e,t){return"keypress"===e&&(!t||!t.tagName||!("INPUT"===t.tagName||"TEXTAREA"===t.tagName||t.isContentEditable))}function CD(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=$de(n);if(Pde(n.type,r))return;c_(n,"_sentryCaptured",!0),r&&!r._sentryId&&c_(r,"_sentryId",yu());const a="keypress"===n.type?"input":n.type;Ide(n)||(e({event:n,name:a,global:t}),iR=n.type,sR=r?r._sentryId:void 0),clearTimeout(ED),ED=rn.setTimeout((()=>{sR=void 0,iR=void 0}),Rde)}}function $de(e){try{return e.target}catch{return null}}function Ode(e){const t="history";EB(t,e),CB(t,zde)}function zde(){if(!que())return;const e=rn.onpopstate;function t(e){return function(...t){const n=t.length>2?t[2]:void 0;if(n){const e=hb,t=String(n);hb=t,XC("history",{from:e,to:t})}return e.apply(this,t)}}rn.onpopstate=function(...t){const n=rn.location.href,r=hb;if(hb=n,XC("history",{from:r,to:n}),e)try{return e.apply(this,t)}catch{}},Fs(rn.history,"pushState",t),Fs(rn.history,"replaceState",t)}const F4={};function Mde(e){const t=F4[e];if(t)return t;let n=rn[e];if(Fue(n))return F4[e]=n.bind(rn);const r=rn.document;if(r&&"function"==typeof r.createElement)try{const t=r.createElement("iframe");t.hidden=!0,r.head.appendChild(t);const a=t.contentWindow;a&&a[e]&&(n=a[e]),r.head.removeChild(t)}catch(t){FB&&ri.warn(`Could not create sandbox iframe for ${e} check, bailing to window.${e}: `,t)}return n&&(F4[e]=n.bind(rn))}function P1(...e){return Mde("setTimeout")(...e)}const Dde="__sentry_xhr_v3__",Nde=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],Lde="BrowserApiErrors",jde=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:Lde,setupOnce(){t.setTimeout&&Fs(vy,"setTimeout",RD),t.setInterval&&Fs(vy,"setInterval",RD),t.requestAnimationFrame&&Fs(vy,"requestAnimationFrame",Bde),t.XMLHttpRequest&&"XMLHttpRequest"in vy&&Fs(XMLHttpRequest.prototype,"send",Vde);const e=t.eventTarget;e&&(Array.isArray(e)?e:Nde).forEach(Ude)}}},Fde=jde;function RD(e){return function(...t){const n=t[0];return t[0]=I1(n,{mechanism:{data:{function:wu(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function Bde(e){return function(t){return e.apply(this,[I1(t,{mechanism:{data:{function:"requestAnimationFrame",handler:wu(e)},handled:!1,type:"instrument"}})])}}function Vde(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((e=>{e in n&&"function"==typeof n[e]&&Fs(n,e,(function(t){const n={mechanism:{data:{function:e,handler:wu(t)},handled:!1,type:"instrument"}},r=IB(t);return r&&(n.mechanism.data.handler=wu(r)),I1(t,n)}))})),e.apply(this,t)}}function Ude(e){const t=vy[e],n=t&&t.prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Fs(n,"addEventListener",(function(t){return function(n,r,a){try{qde(r)&&(r.handleEvent=I1(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:wu(r),target:e},handled:!1,type:"instrument"}}))}catch{}return t.apply(this,[n,I1(r,{mechanism:{data:{function:"addEventListener",handler:wu(r),target:e},handled:!1,type:"instrument"}}),a])}})),Fs(n,"removeEventListener",(function(e){return function(t,n,r){try{const a=n.__sentry_wrapped__;a&&e.call(this,t,a,r)}catch{}return e.call(this,t,n,r)}})))}function qde(e){return"function"==typeof e.handleEvent}const Xn=Do,KT="sentryReplaySession",Wde="replay_event",QT="Unable to send Replay",Hde=3e5,Gde=9e5,Kde=5e3,Qde=5500,Yde=6e4,Zde=5e3,Xde=3,AD=15e4,mb=5e3,Jde=3e3,epe=300,YT=2e7,tpe=4999,npe=15e3,TD=36e5;function cR(e,t){return e??t()}function f_(e){let t,n=e[0],r=1;for(;r<e.length;){const a=e[r],o=e[r+1];if(r+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return;"access"===a||"optionalAccess"===a?(t=n,n=o(n)):("call"===a||"optionalCall"===a)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}var Ca;function rpe(e){return e.nodeType===e.ELEMENT_NODE}function Fy(e){const t=f_([e,"optionalAccess",e=>e.host]);return f_([t,"optionalAccess",e=>e.shadowRoot])===e}function By(e){return"[object ShadowRoot]"===Object.prototype.toString.call(e)}function ape(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(/\sbackground-clip:\s*text;/g," -webkit-background-clip: text; background-clip: text;")),e}function ope(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const n=["@import",`url(${JSON.stringify(e.href)})`];return""===e.layerName?n.push("layer"):e.layerName&&n.push(`layer(${e.layerName})`),e.supportsText&&n.push(`supports(${e.supportsText})`),e.media.length&&n.push(e.media.mediaText),n.join(" ")+";"}function ww(e){try{const t=e.rules||e.cssRules;return t?ape(Array.from(t,YB).join("")):null}catch{return null}}function ipe(e){let t="";for(let n=0;n<e.style.length;n++){const r=e.style,a=r[n],o=r.getPropertyPriority(a);t+=`${a}:${r.getPropertyValue(a)}${o?" !important":""};`}return`${e.selectorText} { ${t} }`}function YB(e){let t;if(cpe(e))try{t=ww(e.styleSheet)||ope(e)}catch{}else if(lpe(e)){let t=e.cssText;const n=e.selectorText.includes(":"),r="string"==typeof e.style.all&&e.style.all;if(r&&(t=ipe(e)),n&&(t=spe(t)),n||r)return t}return t||e.cssText}function spe(e){return e.replace(/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm,"$1\\$2")}function cpe(e){return"styleSheet"in e}function lpe(e){return"selectorText"in e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Ca||(Ca={}));class ZB{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(e){if(!e)return-1;return cR(f_([this,"access",e=>e.getMeta,"call",t=>t(e),"optionalAccess",e=>e.id]),(()=>-1))}getNode(e){return this.idNodeMap.get(e)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(e){return this.nodeMetaMap.get(e)||null}removeNodeFromMap(e){const t=this.getId(e);this.idNodeMap.delete(t),e.childNodes&&e.childNodes.forEach((e=>this.removeNodeFromMap(e)))}has(e){return this.idNodeMap.has(e)}hasNode(e){return this.nodeMetaMap.has(e)}add(e,t){const n=t.id;this.idNodeMap.set(n,e),this.nodeMetaMap.set(e,t)}replace(e,t){const n=this.getNode(e);if(n){const e=this.nodeMetaMap.get(n);e&&this.nodeMetaMap.set(t,e)}this.idNodeMap.set(e,t)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function fpe(){return new ZB}function Wk({maskInputOptions:e,tagName:t,type:n}){return"OPTION"===t&&(t="SELECT"),!!(e[t.toLowerCase()]||n&&e[n]||"password"===n||"INPUT"===t&&!n&&e.text)}function u_({isMasked:e,element:t,value:n,maskInputFn:r}){let a=n||"";return e?(r&&(a=r(a,t)),"*".repeat(a.length)):a}function $1(e){return e.toLowerCase()}function lR(e){return e.toUpperCase()}const ID="__rrweb_original__";function upe(e){const t=e.getContext("2d");if(!t)return!0;for(let n=0;n<e.width;n+=50)for(let r=0;r<e.height;r+=50){const a=t.getImageData,o=ID in a?a[ID]:a;if(new Uint32Array(o.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((e=>0!==e)))return!1}return!0}function ZT(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?$1(t):null}function kw(e,t,n){return"INPUT"!==t||"radio"!==n&&"checkbox"!==n?e.value:e.getAttribute("value")||""}function XB(e,t){let n;try{n=new URL(e,cR(t,(()=>window.location.href)))}catch{return null}return cR(f_([n.pathname.match(/\.([0-9a-z]+)(?:$)/i),"optionalAccess",e=>e[1]]),(()=>null))}const PD={};function JB(e){const t=PD[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const a=t.contentWindow;a&&a[e]&&(r=a[e]),n.head.removeChild(t)}catch{}return PD[e]=r.bind(window)}function fR(...e){return JB("setTimeout")(...e)}function eV(...e){return JB("clearTimeout")(...e)}function tV(e){try{return e.contentDocument}catch{}}let dpe=1;const ppe=new RegExp("[^a-z0-9-_:]"),d_=-2;function XT(){return dpe++}function hpe(e){if(e instanceof HTMLFormElement)return"form";const t=$1(e.tagName);return ppe.test(t)?"div":t}function mpe(e){let t="";return t=e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0],t=t.split("?")[0],t}let n1,$D;const gpe=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,ype=/^(?:[a-z+]+:)?\/\//i,_pe=/^www\..*/i,vpe=/^(data:)([^,]*),(.*)/i;function xw(e,t){return(e||"").replace(gpe,((e,n,r,a,o,i)=>{const s=r||o||i,c=n||a||"";if(!s)return e;if(ype.test(s)||_pe.test(s))return`url(${c}${s}${c})`;if(vpe.test(s))return`url(${c}${s}${c})`;if("/"===s[0])return`url(${c}${mpe(t)+s}${c})`;const l=t.split("/"),u=s.split("/");l.pop();for(const e of u)"."!==e&&(".."===e?l.pop():l.push(e));return`url(${c}${l.join("/")}${c})`}))}const bpe=/^[^ \t\n\r\u000c]+/,wpe=/^[, \t\n\r\u000c]+/;function kpe(e,t){if(""===t.trim())return t;let n=0;function r(e){let r;const a=e.exec(t.substring(n));return a?(r=a[0],n+=r.length,r):""}const a=[];for(;r(wpe),!(n>=t.length);){let o=r(bpe);if(","===o.slice(-1))o=p1(e,o.substring(0,o.length-1)),a.push(o);else{let r="";o=p1(e,o);let i=!1;for(;;){const e=t.charAt(n);if(""===e){a.push((o+r).trim());break}if(i)")"===e&&(i=!1);else{if(","===e){n+=1,a.push((o+r).trim());break}"("===e&&(i=!0)}r+=e,n+=1}}}return a.join(", ")}const OD=new WeakMap;function p1(e,t){return t&&""!==t.trim()?Hk(e,t):t}function xpe(e){return!("svg"!==e.tagName&&!e.ownerSVGElement)}function Hk(e,t){let n=OD.get(e);if(n||(n=e.createElement("a"),OD.set(e,n)),t){if(t.startsWith("blob:")||t.startsWith("data:"))return t}else t="";return n.setAttribute("href",t),n.href}function nV(e,t,n,r,a,o){return r&&("src"===n||"href"===n&&("use"!==t||"#"!==r[0])||"xlink:href"===n&&"#"!==r[0]||"background"===n&&("table"===t||"td"===t||"th"===t)?p1(e,r):"srcset"===n?kpe(e,r):"style"===n?xw(r,Hk(e)):"object"===t&&"data"===n?p1(e,r):"function"==typeof o?o(n,r,a):r)}function rV(e,t,n){return("video"===e||"audio"===e)&&"autoplay"===t}function Spe(e,t,n,r){try{if(r&&e.matches(r))return!1;if("string"==typeof t){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}if(n)return e.matches(n)}catch{}return!1}function Epe(e,t){for(let n=e.classList.length;n--;){const r=e.classList[n];if(t.test(r))return!0}return!1}function om(e,t,n=1/0,r=0){return!e||e.nodeType!==e.ELEMENT_NODE||r>n?-1:t(e)?r:om(e.parentNode,t,n,r+1)}function h1(e,t){return n=>{const r=n;if(null===r)return!1;try{if(e)if("string"==typeof e){if(r.matches(`.${e}`))return!0}else if(Epe(r,e))return!0;return!(!t||!r.matches(t))}catch{return!1}}}function O1(e,t,n,r,a,o){try{const i=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(null===i)return!1;if("INPUT"===i.tagName){const e=i.getAttribute("autocomplete");if(["current-password","new-password","cc-number","cc-exp","cc-exp-month","cc-exp-year","cc-csc"].includes(e))return!0}let s=-1,c=-1;if(o){if(c=om(i,h1(r,a)),c<0)return!0;s=om(i,h1(t,n),c>=0?c:1/0)}else{if(s=om(i,h1(t,n)),s<0)return!1;c=om(i,h1(r,a),s>=0?s:1/0)}return s>=0?!(c>=0)||s<=c:!(c>=0)&&!!o}catch{}return!!o}function Cpe(e,t,n){const r=e.contentWindow;if(!r)return;let a,o=!1;try{a=r.document.readyState}catch{return}if("complete"!==a){const r=fR((()=>{o||(t(),o=!0)}),n);return void e.addEventListener("load",(()=>{eV(r),o=!0,t()}))}const i="about:blank";if(r.location.href!==i||e.src===i||""===e.src)return fR(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function Rpe(e,t,n){let r,a=!1;try{r=e.sheet}catch{return}if(r)return;const o=fR((()=>{a||(t(),a=!0)}),n);e.addEventListener("load",(()=>{eV(o),a=!0,t()}))}function Ape(e,t){const{doc:n,mirror:r,blockClass:a,blockSelector:o,unblockSelector:i,maskAllText:s,maskAttributeFn:c,maskTextClass:l,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:d,inlineStylesheet:p,maskInputOptions:h={},maskTextFn:m,maskInputFn:y,dataURLOptions:g={},inlineImages:v,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:w=!1}=t,k=Tpe(n,r);switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:Ca.Document,childNodes:[],compatMode:e.compatMode}:{type:Ca.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ca.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:k};case e.ELEMENT_NODE:return Ppe(e,{doc:n,blockClass:a,blockSelector:o,unblockSelector:i,inlineStylesheet:p,maskAttributeFn:c,maskInputOptions:h,maskInputFn:y,dataURLOptions:g,inlineImages:v,recordCanvas:b,keepIframeSrcFn:_,newlyAddedElement:w,rootId:k,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:d});case e.TEXT_NODE:return Ipe(e,{doc:n,maskAllText:s,maskTextClass:l,unmaskTextClass:u,maskTextSelector:f,unmaskTextSelector:d,maskTextFn:m,maskInputOptions:h,maskInputFn:y,rootId:k});case e.CDATA_SECTION_NODE:return{type:Ca.CDATA,textContent:"",rootId:k};case e.COMMENT_NODE:return{type:Ca.Comment,textContent:e.textContent||"",rootId:k};default:return!1}}function Tpe(e,t){if(!t.hasNode(e))return;const n=t.getId(e);return 1===n?void 0:n}function Ipe(e,t){const{maskAllText:n,maskTextClass:r,unmaskTextClass:a,maskTextSelector:o,unmaskTextSelector:i,maskTextFn:s,maskInputOptions:c,maskInputFn:l,rootId:u}=t,f=e.parentNode&&e.parentNode.tagName;let d=e.textContent;const p="STYLE"===f||void 0,h="SCRIPT"===f||void 0,m="TEXTAREA"===f||void 0;if(p&&d){try{e.nextSibling||e.previousSibling||f_([e,"access",e=>e.parentNode,"access",e=>e.sheet,"optionalAccess",e=>e.cssRules])&&(d=ww(e.parentNode.sheet))}catch(t){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${t}`,e)}d=xw(d,Hk(t.doc))}h&&(d="SCRIPT_PLACEHOLDER");const y=O1(e,r,o,a,i,n);if(!p&&!h&&!m&&d&&y&&(d=s?s(d,e.parentElement):d.replace(/[\S]/g,"*")),m&&d&&(c.textarea||y)&&(d=l?l(d,e.parentNode):d.replace(/[\S]/g,"*")),"OPTION"===f&&d){d=u_({isMasked:O1(e,r,o,a,i,Wk({type:null,tagName:f,maskInputOptions:c})),element:e,value:d,maskInputFn:l})}return{type:Ca.Text,textContent:d||"",isStyle:p,rootId:u}}function Ppe(e,t){const{doc:n,blockClass:r,blockSelector:a,unblockSelector:o,inlineStylesheet:i,maskInputOptions:s={},maskAttributeFn:c,maskInputFn:l,dataURLOptions:u={},inlineImages:f,recordCanvas:d,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:m,maskAllText:y,maskTextClass:g,unmaskTextClass:v,maskTextSelector:b,unmaskTextSelector:_}=t,w=Spe(e,r,a,o),k=hpe(e);let x={};const S=e.attributes.length;for(let t=0;t<S;t++){const r=e.attributes[t];r.name&&!rV(k,r.name,r.value)&&(x[r.name]=nV(n,k,$1(r.name),r.value,e,c))}if("link"===k&&i){const t=Array.from(n.styleSheets).find((t=>t.href===e.href));let r=null;t&&(r=ww(t)),r&&(x.rel=null,x.href=null,x.crossorigin=null,x._cssText=xw(r,t.href))}if("style"===k&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const t=ww(e.sheet);t&&(x._cssText=xw(t,Hk(n)))}if("input"===k||"textarea"===k||"select"===k||"option"===k){const t=e,n=ZT(t),r=kw(t,lR(k),n),a=t.checked;if("submit"!==n&&"button"!==n&&r){const e=O1(t,g,b,v,_,Wk({type:n,tagName:lR(k),maskInputOptions:s}));x.value=u_({isMasked:e,element:t,value:r,maskInputFn:l})}a&&(x.checked=a)}if("option"===k&&(e.selected&&!s.select?x.selected=!0:delete x.selected),"canvas"===k&&d)if("2d"===e.__context)upe(e)||(x.rr_dataURL=e.toDataURL(u.type,u.quality));else if(!("__context"in e)){const t=e.toDataURL(u.type,u.quality),r=n.createElement("canvas");r.width=e.width,r.height=e.height;t!==r.toDataURL(u.type,u.quality)&&(x.rr_dataURL=t)}if("img"===k&&f){n1||(n1=n.createElement("canvas"),$D=n1.getContext("2d"));const t=e,r=t.currentSrc||t.getAttribute("src")||"<unknown-src>",a=t.crossOrigin,o=()=>{t.removeEventListener("load",o);try{n1.width=t.naturalWidth,n1.height=t.naturalHeight,$D.drawImage(t,0,0),x.rr_dataURL=n1.toDataURL(u.type,u.quality)}catch(e){if("anonymous"!==t.crossOrigin)return t.crossOrigin="anonymous",void(t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o));console.warn(`Cannot inline img src=${r}! Error: ${e}`)}"anonymous"===t.crossOrigin&&(a?x.crossOrigin=a:t.removeAttribute("crossorigin"))};t.complete&&0!==t.naturalWidth?o():t.addEventListener("load",o)}if(("audio"===k||"video"===k)&&(x.rr_mediaState=e.paused?"paused":"played",x.rr_mediaCurrentTime=e.currentTime),h||(e.scrollLeft&&(x.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(x.rr_scrollTop=e.scrollTop)),w){const{width:t,height:n}=e.getBoundingClientRect();x={class:x.class,rr_width:`${t}px`,rr_height:`${n}px`}}let E;"iframe"===k&&!p(x.src)&&(!w&&!tV(e)&&(x.rr_src=x.src),delete x.src);try{customElements.get(k)&&(E=!0)}catch{}return{type:Ca.Element,tagName:k,attributes:x,childNodes:[],isSVG:xpe(e)||void 0,needBlock:w,rootId:m,isCustom:E}}function Zn(e){return null==e?"":e.toLowerCase()}function $pe(e,t){if(t.comment&&e.type===Ca.Comment)return!0;if(e.type===Ca.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&("preload"===e.attributes.rel||"modulepreload"===e.attributes.rel)||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&"js"===XB(e.attributes.href)))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(Zn(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===Zn(e.attributes.name)||"icon"===Zn(e.attributes.rel)||"apple-touch-icon"===Zn(e.attributes.rel)||"shortcut icon"===Zn(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&Zn(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(Zn(e.attributes.property).match(/^(og|twitter|fb):/)||Zn(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===Zn(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===Zn(e.attributes.name)||"googlebot"===Zn(e.attributes.name)||"bingbot"===Zn(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===Zn(e.attributes.name)||"generator"===Zn(e.attributes.name)||"framework"===Zn(e.attributes.name)||"publisher"===Zn(e.attributes.name)||"progid"===Zn(e.attributes.name)||Zn(e.attributes.property).match(/^article:/)||Zn(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===Zn(e.attributes.name)||"yandex-verification"===Zn(e.attributes.name)||"csrf-token"===Zn(e.attributes.name)||"p:domain_verify"===Zn(e.attributes.name)||"verify-v1"===Zn(e.attributes.name)||"verification"===Zn(e.attributes.name)||"shopify-checkout-api-token"===Zn(e.attributes.name)))return!0}}return!1}function m1(e,t){const{doc:n,mirror:r,blockClass:a,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:f,skipChild:d=!1,inlineStylesheet:p=!0,maskInputOptions:h={},maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b={},inlineImages:_=!1,recordCanvas:w=!1,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:S=5e3,onStylesheetLoad:E,stylesheetLoadTimeout:A=5e3,keepIframeSrcFn:z=()=>!1,newlyAddedElement:C=!1}=t;let{preserveWhiteSpace:I=!0}=t;const T=Ape(e,{doc:n,mirror:r,blockClass:a,blockSelector:o,maskAllText:s,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:f,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,dataURLOptions:b,inlineImages:_,recordCanvas:w,keepIframeSrcFn:z,newlyAddedElement:C});if(!T)return console.warn(e,"not serialized"),null;let R;R=r.hasNode(e)?r.getId(e):$pe(T,v)||!I&&T.type===Ca.Text&&!T.isStyle&&!T.textContent.replace(/^\s+|\s+$/gm,"").length?-2:XT();const P=Object.assign(T,{id:R});if(r.add(e,P),-2===R)return null;k&&k(e);let j=!d;if(P.type===Ca.Element){j=j&&!P.needBlock,delete P.needBlock;const t=e.shadowRoot;t&&By(t)&&(P.isShadowHost=!0)}if((P.type===Ca.Document||P.type===Ca.Element)&&j){v.headWhitespace&&P.type===Ca.Element&&"head"===P.tagName&&(I=!1);const t={doc:n,mirror:r,blockClass:a,blockSelector:o,maskAllText:s,unblockSelector:i,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:f,skipChild:d,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:w,preserveWhiteSpace:I,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:z};for(const n of Array.from(e.childNodes)){const e=m1(n,t);e&&P.childNodes.push(e)}if(rpe(e)&&e.shadowRoot)for(const n of Array.from(e.shadowRoot.childNodes)){const r=m1(n,t);r&&(By(e.shadowRoot)&&(r.isShadow=!0),P.childNodes.push(r))}}return e.parentNode&&Fy(e.parentNode)&&By(e.parentNode)&&(P.isShadow=!0),P.type===Ca.Element&&"iframe"===P.tagName&&Cpe(e,(()=>{const t=tV(e);if(t&&x){const n=m1(t,{doc:t,mirror:r,blockClass:a,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:w,preserveWhiteSpace:I,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:z});n&&x(e,n)}}),S),P.type===Ca.Element&&"link"===P.tagName&&"string"==typeof P.attributes.rel&&("stylesheet"===P.attributes.rel||"preload"===P.attributes.rel&&"string"==typeof P.attributes.href&&"css"===XB(P.attributes.href))&&Rpe(e,(()=>{if(E){const t=m1(e,{doc:n,mirror:r,blockClass:a,blockSelector:o,unblockSelector:i,maskAllText:s,maskTextClass:c,unmaskTextClass:l,maskTextSelector:u,unmaskTextSelector:f,skipChild:!1,inlineStylesheet:p,maskInputOptions:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:v,dataURLOptions:b,inlineImages:_,recordCanvas:w,preserveWhiteSpace:I,onSerialize:k,onIframeLoad:x,iframeLoadTimeout:S,onStylesheetLoad:E,stylesheetLoadTimeout:A,keepIframeSrcFn:z});t&&E(e,t)}}),A),P}function Ope(e,t){const{mirror:n=new ZB,blockClass:r="rr-block",blockSelector:a=null,unblockSelector:o=null,maskAllText:i=!1,maskTextClass:s="rr-mask",unmaskTextClass:c=null,maskTextSelector:l=null,unmaskTextSelector:u=null,inlineStylesheet:f=!0,inlineImages:d=!1,recordCanvas:p=!1,maskAllInputs:h=!1,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOM:v=!1,dataURLOptions:b,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:x,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:A=()=>!1}=t;return m1(e,{doc:e,mirror:n,blockClass:r,blockSelector:a,unblockSelector:o,maskAllText:i,maskTextClass:s,unmaskTextClass:c,maskTextSelector:l,unmaskTextSelector:u,skipChild:!1,inlineStylesheet:f,maskInputOptions:!0===h?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===h?{}:h,maskAttributeFn:m,maskTextFn:y,maskInputFn:g,slimDOMOptions:!0===v||"all"===v?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===v,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===v?{}:v,dataURLOptions:b,inlineImages:d,recordCanvas:p,preserveWhiteSpace:_,onSerialize:w,onIframeLoad:k,iframeLoadTimeout:x,onStylesheetLoad:S,stylesheetLoadTimeout:E,keepIframeSrcFn:A,newlyAddedElement:!1})}function sp(e){let t,n=e[0],r=1;for(;r<e.length;){const a=e[r],o=e[r+1];if(r+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return;"access"===a||"optionalAccess"===a?(t=n,n=o(n)):("call"===a||"optionalCall"===a)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function ni(e,t,n=document){const r={capture:!0,passive:!0};return n.addEventListener(e,t,r),()=>n.removeEventListener(e,t,r)}const l1="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let zD={map:{},getId:()=>(console.error(l1),-1),getNode:()=>(console.error(l1),null),removeNodeFromMap(){console.error(l1)},has:()=>(console.error(l1),!1),reset(){console.error(l1)}};function p_(e,t,n={}){let r=null,a=0;return function(...o){const i=Date.now();!a&&!1===n.leading&&(a=i);const s=t-(i-a),c=this;s<=0||s>t?(r&&(Fpe(r),r=null),a=i,e.apply(c,o)):!r&&!1!==n.trailing&&(r=Gk((()=>{a=!1===n.leading?0:Date.now(),r=null,e.apply(c,o)}),s))}}function aV(e,t,n,r,a=window){const o=a.Object.getOwnPropertyDescriptor(e,t);return a.Object.defineProperty(e,t,r?n:{set(e){Gk((()=>{n.set.call(this,e)}),0),o&&o.set&&o.set.call(this,e)}}),()=>aV(e,t,o||{},!0)}function JT(e,t,n){try{if(!(t in e))return()=>{};const r=e[t],a=n(r);return"function"==typeof a&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=a,()=>{e[t]=r}}catch{return()=>{}}}typeof window<"u"&&window.Proxy&&window.Reflect&&(zD=new Proxy(zD,{get:(e,t,n)=>("map"===t&&console.error(l1),Reflect.get(e,t,n))}));let Sw=Date.now;function oV(e){const t=e.document;return{left:t.scrollingElement?t.scrollingElement.scrollLeft:void 0!==e.pageXOffset?e.pageXOffset:sp([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollLeft])||sp([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollLeft])||sp([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollLeft])||0,top:t.scrollingElement?t.scrollingElement.scrollTop:void 0!==e.pageYOffset?e.pageYOffset:sp([t,"optionalAccess",e=>e.documentElement,"access",e=>e.scrollTop])||sp([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.parentElement,"optionalAccess",e=>e.scrollTop])||sp([t,"optionalAccess",e=>e.body,"optionalAccess",e=>e.scrollTop])||0}}function iV(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function sV(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function cV(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function es(e,t,n,r,a){if(!e)return!1;const o=cV(e);if(!o)return!1;const i=h1(t,n);if(!a){const e=r&&o.matches(r);return i(o)&&!e}const s=om(o,i);let c=-1;return!(s<0)&&(r&&(c=om(o,h1(null,r))),s>-1&&c<0||s<c)}function zpe(e,t){return-1!==t.getId(e)}function B4(e,t){return-2===t.getId(e)}function lV(e,t){if(Fy(e))return!1;const n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||lV(e.parentNode,t))}function uR(e){return!!e.changedTouches}function Mpe(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...e)=>{let t=e[0];if(!(0 in e))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}function fV(e,t){return!("IFRAME"!==e.nodeName||!t.getMeta(e))}function uV(e,t){return!("LINK"!==e.nodeName||e.nodeType!==e.ELEMENT_NODE||!e.getAttribute||"stylesheet"!==e.getAttribute("rel")||!t.getMeta(e))}function dR(e){return!!sp([e,"optionalAccess",e=>e.shadowRoot])}/[1-9][0-9]{12}/.test(Date.now().toString())||(Sw=()=>(new Date).getTime());class Dpe{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(e){return Wue(this.styleIDMap.get(e),(()=>-1))}has(e){return this.styleIDMap.has(e)}add(e,t){if(this.has(e))return this.getId(e);let n;return n=void 0===t?this.id++:t,this.styleIDMap.set(e,n),this.idStyleMap.set(n,e),n}getStyle(e){return this.idStyleMap.get(e)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function dV(e){let t=null;return sp([e,"access",e=>e.getRootNode,"optionalCall",e=>e(),"optionalAccess",e=>e.nodeType])===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(t=e.getRootNode().host),t}function Npe(e){let t,n=e;for(;t=dV(n);)n=t;return n}function Lpe(e){const t=e.ownerDocument;if(!t)return!1;const n=Npe(e);return t.contains(n)}function pV(e){const t=e.ownerDocument;return!!t&&(t.contains(e)||Lpe(e))}const MD={};function eI(e){const t=MD[e];if(t)return t;const n=window.document;let r=window[e];if(n&&"function"==typeof n.createElement)try{const t=n.createElement("iframe");t.hidden=!0,n.head.appendChild(t);const a=t.contentWindow;a&&a[e]&&(r=a[e]),n.head.removeChild(t)}catch{}return MD[e]=r.bind(window)}function jpe(...e){return eI("requestAnimationFrame")(...e)}function Gk(...e){return eI("setTimeout")(...e)}function Fpe(...e){return eI("clearTimeout")(...e)}var DD,ND,Gt=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(Gt||{}),zt=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(zt||{}),ei=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(ei||{}),ou=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(ou||{});function tI(e){try{return e.contentDocument}catch{}}function Bpe(e){try{return e.contentWindow}catch{}}function Vpe(e){let t,n=e[0],r=1;for(;r<e.length;){const a=e[r],o=e[r+1];if(r+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return;"access"===a||"optionalAccess"===a?(t=n,n=o(n)):("call"===a||"optionalCall"===a)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}function LD(e){return"__ln"in e}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(DD||(DD={})),function(e){e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE"}(ND||(ND={}));class Upe{constructor(){this.length=0,this.head=null,this.tail=null}get(e){if(e>=this.length)throw new Error("Position outside of list range");let t=this.head;for(let n=0;n<e;n++)t=Vpe([t,"optionalAccess",e=>e.next])||null;return t}addNode(e){const t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&LD(e.previousSibling)){const n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&LD(e.nextSibling)&&e.nextSibling.__ln.previous){const n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;null===t.next&&(this.tail=t),this.length++}removeNode(e){const t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next?t.next.previous=t.previous:this.tail=t.previous):(this.head=t.next,this.head?this.head.previous=null:this.tail=null),e.__ln&&delete e.__ln,this.length--)}}const jD=(e,t)=>`${e}@${t}`;class qpe{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=e=>{e.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const e=[],t=new Set,n=new Upe,r=e=>{let t=e,n=-2;for(;-2===n;)t=t&&t.nextSibling,n=t&&this.mirror.getId(t);return n},a=a=>{if(!a.parentNode||!pV(a))return;const o=Fy(a.parentNode)?this.mirror.getId(dV(a)):this.mirror.getId(a.parentNode),i=r(a);if(-1===o||-1===i)return n.addNode(a);const s=m1(a,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskAllText:this.maskAllText,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,unmaskTextClass:this.unmaskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskAttributeFn:this.maskAttributeFn,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:e=>{fV(e,this.mirror)&&!es(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&this.iframeManager.addIframe(e),uV(e,this.mirror)&&this.stylesheetManager.trackLinkElement(e),dR(a)&&this.shadowDomManager.addShadowRoot(a.shadowRoot,this.doc)},onIframeLoad:(e,t)=>{es(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(this.iframeManager.attachIframe(e,t),e.contentWindow&&this.canvasManager.addWindow(e.contentWindow),this.shadowDomManager.observeAttachShadow(e))},onStylesheetLoad:(e,t)=>{this.stylesheetManager.attachLinkElement(e,t)}});s&&(e.push({parentId:o,nextId:i,node:s}),t.add(s.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const e of this.movedSet)FD(this.removes,e,this.mirror)&&!this.movedSet.has(e.parentNode)||a(e);for(const e of this.addedSet)!BD(this.droppedSet,e)&&!FD(this.removes,e,this.mirror)||BD(this.movedSet,e)?a(e):this.droppedSet.add(e);let o=null;for(;n.length;){let e=null;if(o){const t=this.mirror.getId(o.value.parentNode),n=r(o.value);-1!==t&&-1!==n&&(e=o)}if(!e){let t=n.tail;for(;t;){const n=t;if(t=t.previous,n){const t=this.mirror.getId(n.value.parentNode);if(-1===r(n.value))continue;if(-1!==t){e=n;break}{const t=n.value;if(t.parentNode&&t.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const r=t.parentNode.host;if(-1!==this.mirror.getId(r)){e=n;break}}}}}}if(!e){for(;n.head;)n.removeNode(n.head.value);break}o=e.previous,n.removeNode(e.value),a(e.value)}const i={texts:this.texts.map((e=>({id:this.mirror.getId(e.node),value:e.value}))).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),attributes:this.attributes.map((e=>{const{attributes:t}=e;if("string"==typeof t.style){const n=JSON.stringify(e.styleDiff),r=JSON.stringify(e._unchangedStyles);n.length<t.style.length&&(n+r).split("var(").length===t.style.split("var(").length&&(t.style=e.styleDiff)}return{id:this.mirror.getId(e.node),attributes:t}})).filter((e=>!t.has(e.id))).filter((e=>this.mirror.has(e.id))),removes:this.removes,adds:e};!i.texts.length&&!i.attributes.length&&!i.removes.length&&!i.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(i))},this.processMutation=e=>{if(!B4(e.target,this.mirror))switch(e.type){case"characterData":{const t=e.target.textContent;!es(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)&&t!==e.oldValue&&this.texts.push({value:O1(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,this.maskAllText)&&t?this.maskTextFn?this.maskTextFn(t,cV(e.target)):t.replace(/[\S]/g,"*"):t,node:e.target});break}case"attributes":{const t=e.target;let n=e.attributeName,r=e.target.getAttribute(n);if("value"===n){const n=ZT(t),a=t.tagName;r=kw(t,a,n);const o=Wk({maskInputOptions:this.maskInputOptions,tagName:a,type:n});r=u_({isMasked:O1(e.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextClass,this.unmaskTextSelector,o),element:t,value:r,maskInputFn:this.maskInputFn})}if(es(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||r===e.oldValue)return;let a=this.attributeMap.get(e.target);if("IFRAME"===t.tagName&&"src"===n&&!this.keepIframeSrcFn(r)){if(tI(t))return;n="rr_src"}if(a||(a={node:e.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(a),this.attributeMap.set(e.target,a)),"type"===n&&"INPUT"===t.tagName&&"password"===(e.oldValue||"").toLowerCase()&&t.setAttribute("data-rr-is-password","true"),!rV(t.tagName,n)&&(a.attributes[n]=nV(this.doc,$1(t.tagName),$1(n),r,t,this.maskAttributeFn),"style"===n)){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const n=this.unattachedDoc.createElement("span");e.oldValue&&n.setAttribute("style",e.oldValue);for(const e of Array.from(t.style)){const r=t.style.getPropertyValue(e),o=t.style.getPropertyPriority(e);r!==n.style.getPropertyValue(e)||o!==n.style.getPropertyPriority(e)?a.styleDiff[e]=""===o?r:[r,o]:a._unchangedStyles[e]=[r,o]}for(const e of Array.from(n.style))""===t.style.getPropertyValue(e)&&(a.styleDiff[e]=!1)}break}case"childList":if(es(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!0))return;e.addedNodes.forEach((t=>this.genAdds(t,e.target))),e.removedNodes.forEach((t=>{const n=this.mirror.getId(t),r=Fy(e.target)?this.mirror.getId(e.target.host):this.mirror.getId(e.target);es(e.target,this.blockClass,this.blockSelector,this.unblockSelector,!1)||B4(t,this.mirror)||!zpe(t,this.mirror)||(this.addedSet.has(t)?(pR(this.addedSet,t),this.droppedSet.add(t)):this.addedSet.has(e.target)&&-1===n||lV(e.target,this.mirror)||(this.movedSet.has(t)&&this.movedMap[jD(n,r)]?pR(this.movedSet,t):this.removes.push({parentId:r,id:n,isShadow:!(!Fy(e.target)||!By(e.target))||void 0})),this.mapRemoves.push(t))}))}},this.genAdds=(e,t)=>{if(!this.processedNodeManager.inOtherBuffer(e,this)&&!this.addedSet.has(e)&&!this.movedSet.has(e)){if(this.mirror.hasNode(e)){if(B4(e,this.mirror))return;this.movedSet.add(e);let n=null;t&&this.mirror.hasNode(t)&&(n=this.mirror.getId(t)),n&&-1!==n&&(this.movedMap[jD(this.mirror.getId(e),n)]=!0)}else this.addedSet.add(e),this.droppedSet.delete(e);es(e,this.blockClass,this.blockSelector,this.unblockSelector,!1)||(e.childNodes.forEach((e=>this.genAdds(e))),dR(e)&&e.shadowRoot.childNodes.forEach((t=>{this.processedNodeManager.add(t,this),this.genAdds(t,e)})))}}}init(e){["mutationCb","blockClass","blockSelector","unblockSelector","maskAllText","maskTextClass","unmaskTextClass","maskTextSelector","unmaskTextSelector","inlineStylesheet","maskInputOptions","maskAttributeFn","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach((t=>{this[t]=e[t]}))}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function pR(e,t){e.delete(t),t.childNodes.forEach((t=>pR(e,t)))}function FD(e,t,n){return 0!==e.length&&Wpe(e,t,n)}function Wpe(e,t,n){let r=t.parentNode;for(;r;){const t=n.getId(r);if(e.some((e=>e.id===t)))return!0;r=r.parentNode}return!1}function BD(e,t){return 0!==e.size&&hV(e,t)}function hV(e,t){const{parentNode:n}=t;return!!n&&(!!e.has(n)||hV(e,n))}let Vy;function Hpe(e){Vy=e}function Gpe(){Vy=void 0}const pn=e=>Vy?(...t)=>{try{return e(...t)}catch(e){if(Vy&&!0===Vy(e))return()=>{};throw e}}:e;function Tc(e){let t,n=e[0],r=1;for(;r<e.length;){const a=e[r],o=e[r+1];if(r+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return;"access"===a||"optionalAccess"===a?(t=n,n=o(n)):("call"===a||"optionalCall"===a)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}const g1=[];function rv(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function mV(e,t){const n=new qpe;g1.push(n),n.init(e);let r=window.MutationObserver||window.__rrMutationObserver;const a=Tc([window,"optionalAccess",e=>e.Zone,"optionalAccess",e=>e.__symbol__,"optionalCall",e=>e("MutationObserver")]);a&&window[a]&&(r=window[a]);const o=new r(pn((t=>{e.onMutation&&!1===e.onMutation(t)||n.processMutations.bind(n)(t)})));return o.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function Kpe({mousemoveCb:e,sampling:t,doc:n,mirror:r}){if(!1===t.mousemove)return()=>{};const a="number"==typeof t.mousemove?t.mousemove:50,o="number"==typeof t.mousemoveCallback?t.mousemoveCallback:500;let i,s=[];const c=p_(pn((t=>{const n=Date.now()-i;e(s.map((e=>(e.timeOffset-=n,e))),t),s=[],i=null})),o),l=pn(p_(pn((e=>{const t=rv(e),{clientX:n,clientY:a}=uR(e)?e.changedTouches[0]:e;i||(i=Sw()),s.push({x:n,y:a,id:r.getId(t),timeOffset:Sw()-i}),c(typeof DragEvent<"u"&&e instanceof DragEvent?zt.Drag:e instanceof MouseEvent?zt.MouseMove:zt.TouchMove)})),a,{trailing:!1})),u=[ni("mousemove",l,n),ni("touchmove",l,n),ni("drag",l,n)];return pn((()=>{u.forEach((e=>e()))}))}function Qpe({mouseInteractionCb:e,doc:t,mirror:n,blockClass:r,blockSelector:a,unblockSelector:o,sampling:i}){if(!1===i.mouseInteraction)return()=>{};const s=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,c=[];let l=null;return Object.keys(ei).filter((e=>Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==s[e])).forEach((i=>{let s=$1(i);const u=(t=>i=>{const s=rv(i);if(es(s,r,a,o,!0))return;let c=null,u=t;if("pointerType"in i){switch(i.pointerType){case"mouse":c=ou.Mouse;break;case"touch":c=ou.Touch;break;case"pen":c=ou.Pen}c===ou.Touch?ei[t]===ei.MouseDown?u="TouchStart":ei[t]===ei.MouseUp&&(u="TouchEnd"):ou.Pen}else uR(i)&&(c=ou.Touch);null!==c?(l=c,(u.startsWith("Touch")&&c===ou.Touch||u.startsWith("Mouse")&&c===ou.Mouse)&&(c=null)):ei[t]===ei.Click&&(c=l,l=null);const f=uR(i)?i.changedTouches[0]:i;if(!f)return;const d=n.getId(s),{clientX:p,clientY:h}=f;pn(e)({type:ei[u],id:d,x:p,y:h,...null!==c&&{pointerType:c}})})(i);if(window.PointerEvent)switch(ei[i]){case ei.MouseDown:case ei.MouseUp:s=s.replace("mouse","pointer");break;case ei.TouchStart:case ei.TouchEnd:return}c.push(ni(s,u,t))})),pn((()=>{c.forEach((e=>e()))}))}function gV({scrollCb:e,doc:t,mirror:n,blockClass:r,blockSelector:a,unblockSelector:o,sampling:i}){return ni("scroll",pn(p_(pn((i=>{const s=rv(i);if(!s||es(s,r,a,o,!0))return;const c=n.getId(s);if(s===t&&t.defaultView){const n=oV(t.defaultView);e({id:c,x:n.left,y:n.top})}else e({id:c,x:s.scrollLeft,y:s.scrollTop})})),i.scroll||100)),t)}function Ype({viewportResizeCb:e},{win:t}){let n=-1,r=-1;return ni("resize",pn(p_(pn((()=>{const t=iV(),a=sV();(n!==t||r!==a)&&(e({width:Number(a),height:Number(t)}),n=t,r=a)})),200)),t)}const Zpe=["INPUT","TEXTAREA","SELECT"],VD=new WeakMap;function Xpe({inputCb:e,doc:t,mirror:n,blockClass:r,blockSelector:a,unblockSelector:o,ignoreClass:i,ignoreSelector:s,maskInputOptions:c,maskInputFn:l,sampling:u,userTriggeredOnInput:f,maskTextClass:d,unmaskTextClass:p,maskTextSelector:h,unmaskTextSelector:m}){function y(e){let n=rv(e);const u=e.isTrusted,y=n&&lR(n.tagName);if("OPTION"===y&&(n=n.parentElement),!n||!y||Zpe.indexOf(y)<0||es(n,r,a,o,!0))return;const v=n;if(v.classList.contains(i)||s&&v.matches(s))return;const b=ZT(n);let _=kw(v,y,b),w=!1;const k=Wk({maskInputOptions:c,tagName:y,type:b}),x=O1(n,d,h,p,m,k);("radio"===b||"checkbox"===b)&&(w=n.checked),_=u_({isMasked:x,element:n,value:_,maskInputFn:l}),g(n,f?{text:_,isChecked:w,userTriggered:u}:{text:_,isChecked:w});const S=n.name;"radio"===b&&S&&w&&t.querySelectorAll(`input[type="radio"][name="${S}"]`).forEach((e=>{if(e!==n){const t=u_({isMasked:x,element:e,value:kw(e,y,b),maskInputFn:l});g(e,f?{text:t,isChecked:!w,userTriggered:!1}:{text:t,isChecked:!w})}}))}function g(t,r){const a=VD.get(t);if(!a||a.text!==r.text||a.isChecked!==r.isChecked){VD.set(t,r);const a=n.getId(t);pn(e)({...r,id:a})}}const v=("last"===u.input?["change"]:["input","change"]).map((e=>ni(e,pn(y),t))),b=t.defaultView;if(!b)return()=>{v.forEach((e=>e()))};const _=b.Object.getOwnPropertyDescriptor(b.HTMLInputElement.prototype,"value"),w=[[b.HTMLInputElement.prototype,"value"],[b.HTMLInputElement.prototype,"checked"],[b.HTMLSelectElement.prototype,"value"],[b.HTMLTextAreaElement.prototype,"value"],[b.HTMLSelectElement.prototype,"selectedIndex"],[b.HTMLOptionElement.prototype,"selected"]];return _&&_.set&&v.push(...w.map((e=>aV(e[0],e[1],{set(){pn(y)({target:this,isTrusted:!1})}},!1,b)))),pn((()=>{v.forEach((e=>e()))}))}function Ew(e){return function(e,t){if(gb("CSSGroupingRule")&&e.parentRule instanceof CSSGroupingRule||gb("CSSMediaRule")&&e.parentRule instanceof CSSMediaRule||gb("CSSSupportsRule")&&e.parentRule instanceof CSSSupportsRule||gb("CSSConditionRule")&&e.parentRule instanceof CSSConditionRule){const n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else if(e.parentStyleSheet){const n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function cp(e,t,n){let r,a;return e?(e.ownerNode?r=t.getId(e.ownerNode):a=n.getId(e),{styleId:a,id:r}):{}}function Jpe({styleSheetRuleCb:e,mirror:t,stylesheetManager:n},{win:r}){if(!r.CSSStyleSheet||!r.CSSStyleSheet.prototype)return()=>{};const a=r.CSSStyleSheet.prototype.insertRule;r.CSSStyleSheet.prototype.insertRule=new Proxy(a,{apply:pn(((r,a,o)=>{const[i,s]=o,{id:c,styleId:l}=cp(a,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:s}]}),r.apply(a,o)}))});const o=r.CSSStyleSheet.prototype.deleteRule;let i,s;r.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:pn(((r,a,o)=>{const[i]=o,{id:s,styleId:c}=cp(a,t,n.styleMirror);return(s&&-1!==s||c&&-1!==c)&&e({id:s,styleId:c,removes:[{index:i}]}),r.apply(a,o)}))}),r.CSSStyleSheet.prototype.replace&&(i=r.CSSStyleSheet.prototype.replace,r.CSSStyleSheet.prototype.replace=new Proxy(i,{apply:pn(((r,a,o)=>{const[i]=o,{id:s,styleId:c}=cp(a,t,n.styleMirror);return(s&&-1!==s||c&&-1!==c)&&e({id:s,styleId:c,replace:i}),r.apply(a,o)}))})),r.CSSStyleSheet.prototype.replaceSync&&(s=r.CSSStyleSheet.prototype.replaceSync,r.CSSStyleSheet.prototype.replaceSync=new Proxy(s,{apply:pn(((r,a,o)=>{const[i]=o,{id:s,styleId:c}=cp(a,t,n.styleMirror);return(s&&-1!==s||c&&-1!==c)&&e({id:s,styleId:c,replaceSync:i}),r.apply(a,o)}))}));const c={};yb("CSSGroupingRule")?c.CSSGroupingRule=r.CSSGroupingRule:(yb("CSSMediaRule")&&(c.CSSMediaRule=r.CSSMediaRule),yb("CSSConditionRule")&&(c.CSSConditionRule=r.CSSConditionRule),yb("CSSSupportsRule")&&(c.CSSSupportsRule=r.CSSSupportsRule));const l={};return Object.entries(c).forEach((([r,a])=>{l[r]={insertRule:a.prototype.insertRule,deleteRule:a.prototype.deleteRule},a.prototype.insertRule=new Proxy(l[r].insertRule,{apply:pn(((r,a,o)=>{const[i,s]=o,{id:c,styleId:l}=cp(a.parentStyleSheet,t,n.styleMirror);return(c&&-1!==c||l&&-1!==l)&&e({id:c,styleId:l,adds:[{rule:i,index:[...Ew(a),s||0]}]}),r.apply(a,o)}))}),a.prototype.deleteRule=new Proxy(l[r].deleteRule,{apply:pn(((r,a,o)=>{const[i]=o,{id:s,styleId:c}=cp(a.parentStyleSheet,t,n.styleMirror);return(s&&-1!==s||c&&-1!==c)&&e({id:s,styleId:c,removes:[{index:[...Ew(a),i]}]}),r.apply(a,o)}))})})),pn((()=>{r.CSSStyleSheet.prototype.insertRule=a,r.CSSStyleSheet.prototype.deleteRule=o,i&&(r.CSSStyleSheet.prototype.replace=i),s&&(r.CSSStyleSheet.prototype.replaceSync=s),Object.entries(c).forEach((([e,t])=>{t.prototype.insertRule=l[e].insertRule,t.prototype.deleteRule=l[e].deleteRule}))}))}function yV({mirror:e,stylesheetManager:t},n){let r=null;r="#document"===n.nodeName?e.getId(n):e.getId(n.host);const a="#document"===n.nodeName?Tc([n,"access",e=>e.defaultView,"optionalAccess",e=>e.Document]):Tc([n,"access",e=>e.ownerDocument,"optionalAccess",e=>e.defaultView,"optionalAccess",e=>e.ShadowRoot]),o=Tc([a,"optionalAccess",e=>e.prototype])?Object.getOwnPropertyDescriptor(Tc([a,"optionalAccess",e=>e.prototype]),"adoptedStyleSheets"):void 0;return null!==r&&-1!==r&&a&&o?(Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get(){return Tc([o,"access",e=>e.get,"optionalAccess",e=>e.call,"call",e=>e(this)])},set(e){const n=Tc([o,"access",e=>e.set,"optionalAccess",e=>e.call,"call",t=>t(this,e)]);if(null!==r&&-1!==r)try{t.adoptStyleSheets(e,r)}catch{}return n}}),pn((()=>{Object.defineProperty(n,"adoptedStyleSheets",{configurable:o.configurable,enumerable:o.enumerable,get:o.get,set:o.set})}))):()=>{}}function ehe({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:n,stylesheetManager:r},{win:a}){const o=a.CSSStyleDeclaration.prototype.setProperty;a.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:pn(((a,i,s)=>{const[c,l,u]=s;if(n.has(c))return o.apply(i,[c,l,u]);const{id:f,styleId:d}=cp(Tc([i,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(f&&-1!==f||d&&-1!==d)&&e({id:f,styleId:d,set:{property:c,value:l,priority:u},index:Ew(i.parentRule)}),a.apply(i,s)}))});const i=a.CSSStyleDeclaration.prototype.removeProperty;return a.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:pn(((a,o,s)=>{const[c]=s;if(n.has(c))return i.apply(o,[c]);const{id:l,styleId:u}=cp(Tc([o,"access",e=>e.parentRule,"optionalAccess",e=>e.parentStyleSheet]),t,r.styleMirror);return(l&&-1!==l||u&&-1!==u)&&e({id:l,styleId:u,remove:{property:c},index:Ew(o.parentRule)}),a.apply(o,s)}))}),pn((()=>{a.CSSStyleDeclaration.prototype.setProperty=o,a.CSSStyleDeclaration.prototype.removeProperty=i}))}function the({mediaInteractionCb:e,blockClass:t,blockSelector:n,unblockSelector:r,mirror:a,sampling:o,doc:i}){const s=pn((i=>p_(pn((o=>{const s=rv(o);if(!s||es(s,t,n,r,!0))return;const{currentTime:c,volume:l,muted:u,playbackRate:f}=s;e({type:i,id:a.getId(s),currentTime:c,volume:l,muted:u,playbackRate:f})})),o.media||500))),c=[ni("play",s(0),i),ni("pause",s(1),i),ni("seeked",s(2),i),ni("volumechange",s(3),i),ni("ratechange",s(4),i)];return pn((()=>{c.forEach((e=>e()))}))}function nhe({fontCb:e,doc:t}){const n=t.defaultView;if(!n)return()=>{};const r=[],a=new WeakMap,o=n.FontFace;n.FontFace=function(e,t,n){const r=new o(e,t,n);return a.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};const i=JT(t.fonts,"add",(function(t){return function(n){return Gk(pn((()=>{const t=a.get(n);t&&(e(t),a.delete(n))})),0),t.apply(this,[n])}}));return r.push((()=>{n.FontFace=o})),r.push(i),pn((()=>{r.forEach((e=>e()))}))}function rhe(e){const{doc:t,mirror:n,blockClass:r,blockSelector:a,unblockSelector:o,selectionCb:i}=e;let s=!0;const c=pn((()=>{const e=t.getSelection();if(!e||s&&Tc([e,"optionalAccess",e=>e.isCollapsed]))return;s=e.isCollapsed||!1;const c=[],l=e.rangeCount||0;for(let t=0;t<l;t++){const i=e.getRangeAt(t),{startContainer:s,startOffset:l,endContainer:u,endOffset:f}=i;es(s,r,a,o,!0)||es(u,r,a,o,!0)||c.push({start:n.getId(s),startOffset:l,end:n.getId(u),endOffset:f})}i({ranges:c})}));return c(),ni("selectionchange",c)}function ahe({doc:e,customElementCb:t}){const n=e.defaultView;return n&&n.customElements?JT(n.customElements,"define",(function(e){return function(n,r,a){try{t({define:{name:n}})}catch{}return e.apply(this,[n,r,a])}})):()=>{}}function ohe(e,t={}){const n=e.doc.defaultView;if(!n)return()=>{};let r;e.recordDOM&&(r=mV(e,e.doc));const a=Kpe(e),o=Qpe(e),i=gV(e),s=Ype(e,{win:n}),c=Xpe(e),l=the(e);let u=()=>{},f=()=>{},d=()=>{},p=()=>{};e.recordDOM&&(u=Jpe(e,{win:n}),f=yV(e,e.doc),d=ehe(e,{win:n}),e.collectFonts&&(p=nhe(e)));const h=rhe(e),m=ahe(e),y=[];for(const t of e.plugins)y.push(t.observer(t.callback,n,t.options));return pn((()=>{g1.forEach((e=>e.reset())),Tc([r,"optionalAccess",e=>e.disconnect,"call",e=>e()]),a(),o(),i(),s(),c(),l(),u(),f(),d(),p(),h(),m(),y.forEach((e=>e()))}))}function gb(e){return typeof window[e]<"u"}function yb(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class hR{constructor(e){this.generateIdFn=e,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(e,t,n,r){const a=n||this.getIdToRemoteIdMap(e),o=r||this.getRemoteIdToIdMap(e);let i=a.get(t);return i||(i=this.generateIdFn(),a.set(t,i),o.set(i,t)),i}getIds(e,t){const n=this.getIdToRemoteIdMap(e),r=this.getRemoteIdToIdMap(e);return t.map((t=>this.getId(e,t,n,r)))}getRemoteId(e,t,n){const r=n||this.getRemoteIdToIdMap(e);if("number"!=typeof t)return t;return r.get(t)||-1}getRemoteIds(e,t){const n=this.getRemoteIdToIdMap(e);return t.map((t=>this.getRemoteId(e,t,n)))}reset(e){if(!e)return this.iframeIdToRemoteIdMap=new WeakMap,void(this.iframeRemoteIdToIdMap=new WeakMap);this.iframeIdToRemoteIdMap.delete(e),this.iframeRemoteIdToIdMap.delete(e)}getIdToRemoteIdMap(e){let t=this.iframeIdToRemoteIdMap.get(e);return t||(t=new Map,this.iframeIdToRemoteIdMap.set(e,t)),t}getRemoteIdToIdMap(e){let t=this.iframeRemoteIdToIdMap.get(e);return t||(t=new Map,this.iframeRemoteIdToIdMap.set(e,t)),t}}function UD(e){let t,n=e[0],r=1;for(;r<e.length;){const a=e[r],o=e[r+1];if(r+=2,("optionalAccess"===a||"optionalCall"===a)&&null==n)return;"access"===a||"optionalAccess"===a?(t=n,n=o(n)):("call"===a||"optionalCall"===a)&&(n=o(((...e)=>n.call(t,...e))),t=void 0)}return n}class ihe{constructor(){this.crossOriginIframeMirror=new hR(XT),this.crossOriginIframeRootIdMap=new WeakMap}addIframe(){}addLoadListener(){}attachIframe(){}}class she{constructor(e){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new hR(XT),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=e.mutationCb,this.wrappedEmit=e.wrappedEmit,this.stylesheetManager=e.stylesheetManager,this.recordCrossOriginIframes=e.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new hR(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=e.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(e){this.iframes.set(e,!0),e.contentWindow&&this.crossOriginIframeMap.set(e.contentWindow,e)}addLoadListener(e){this.loadListener=e}attachIframe(e,t){this.mutationCb({adds:[{parentId:this.mirror.getId(e),nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),UD([this,"access",e=>e.loadListener,"optionalCall",t=>t(e)]);const n=tI(e);n&&n.adoptedStyleSheets&&n.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(n.adoptedStyleSheets,this.mirror.getId(n))}handleMessage(e){const t=e;if("rrweb"!==t.data.type||t.origin!==t.data.origin||!e.source)return;const n=this.crossOriginIframeMap.get(e.source);if(!n)return;const r=this.transformCrossOriginEvent(n,t.data.event);r&&this.wrappedEmit(r,t.data.isCheckout)}transformCrossOriginEvent(e,t){switch(t.type){case Gt.FullSnapshot:{this.crossOriginIframeMirror.reset(e),this.crossOriginIframeStyleMirror.reset(e),this.replaceIdOnNode(t.data.node,e);const n=t.data.node.id;return this.crossOriginIframeRootIdMap.set(e,n),this.patchRootIdOnNode(t.data.node,n),{timestamp:t.timestamp,type:Gt.IncrementalSnapshot,data:{source:zt.Mutation,adds:[{parentId:this.mirror.getId(e),nextId:null,node:t.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case Gt.Meta:case Gt.Load:case Gt.DomContentLoaded:return!1;case Gt.Plugin:return t;case Gt.Custom:return this.replaceIds(t.data.payload,e,["id","parentId","previousId","nextId"]),t;case Gt.IncrementalSnapshot:switch(t.data.source){case zt.Mutation:return t.data.adds.forEach((t=>{this.replaceIds(t,e,["parentId","nextId","previousId"]),this.replaceIdOnNode(t.node,e);const n=this.crossOriginIframeRootIdMap.get(e);n&&this.patchRootIdOnNode(t.node,n)})),t.data.removes.forEach((t=>{this.replaceIds(t,e,["parentId","id"])})),t.data.attributes.forEach((t=>{this.replaceIds(t,e,["id"])})),t.data.texts.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case zt.Drag:case zt.TouchMove:case zt.MouseMove:return t.data.positions.forEach((t=>{this.replaceIds(t,e,["id"])})),t;case zt.ViewportResize:return!1;case zt.MediaInteraction:case zt.MouseInteraction:case zt.Scroll:case zt.CanvasMutation:case zt.Input:return this.replaceIds(t.data,e,["id"]),t;case zt.StyleSheetRule:case zt.StyleDeclaration:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleId"]),t;case zt.Font:return t;case zt.Selection:return t.data.ranges.forEach((t=>{this.replaceIds(t,e,["start","end"])})),t;case zt.AdoptedStyleSheet:return this.replaceIds(t.data,e,["id"]),this.replaceStyleIds(t.data,e,["styleIds"]),UD([t,"access",e=>e.data,"access",e=>e.styles,"optionalAccess",e=>e.forEach,"call",t=>t((t=>{this.replaceStyleIds(t,e,["styleId"])}))]),t}}return!1}replace(e,t,n,r){for(const a of r)!Array.isArray(t[a])&&"number"!=typeof t[a]||(Array.isArray(t[a])?t[a]=e.getIds(n,t[a]):t[a]=e.getId(n,t[a]));return t}replaceIds(e,t,n){return this.replace(this.crossOriginIframeMirror,e,t,n)}replaceStyleIds(e,t,n){return this.replace(this.crossOriginIframeStyleMirror,e,t,n)}replaceIdOnNode(e,t){this.replaceIds(e,t,["id","rootId"]),"childNodes"in e&&e.childNodes.forEach((e=>{this.replaceIdOnNode(e,t)}))}patchRootIdOnNode(e,t){e.type!==Ca.Document&&!e.rootId&&(e.rootId=t),"childNodes"in e&&e.childNodes.forEach((e=>{this.patchRootIdOnNode(e,t)}))}}class che{init(){}addShadowRoot(){}observeAttachShadow(){}reset(){}}class lhe{constructor(e){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(e,t){if(!By(e)||this.shadowDoms.has(e))return;this.shadowDoms.add(e),this.bypassOptions.canvasManager.addShadowRoot(e);const n=mV({...this.bypassOptions,doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this},e);this.restoreHandlers.push((()=>n.disconnect())),this.restoreHandlers.push(gV({...this.bypassOptions,scrollCb:this.scrollCb,doc:e,mirror:this.mirror})),Gk((()=>{e.adoptedStyleSheets&&e.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(e.adoptedStyleSheets,this.mirror.getId(e.host)),this.restoreHandlers.push(yV({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},e))}),0)}observeAttachShadow(e){const t=tI(e),n=Bpe(e);!t||!n||this.patchAttachShadow(n.Element,t)}patchAttachShadow(e,t){const n=this;this.restoreHandlers.push(JT(e.prototype,"attachShadow",(function(e){return function(r){const a=e.call(this,r);return this.shadowRoot&&pV(this)&&n.addShadowRoot(this.shadowRoot,t),a}})))}reset(){this.restoreHandlers.forEach((e=>{try{e()}catch{}})),this.restoreHandlers=[],this.shadowDoms=new WeakSet,this.bypassOptions.canvasManager.resetShadowRoots()}}class qD{reset(){}freeze(){}unfreeze(){}lock(){}unlock(){}snapshot(){}addWindow(){}addShadowRoot(){}resetShadowRoots(){}}class fhe{constructor(e){this.trackedLinkElements=new WeakSet,this.styleMirror=new Dpe,this.mutationCb=e.mutationCb,this.adoptedStyleSheetCb=e.adoptedStyleSheetCb}attachLinkElement(e,t){"_cssText"in t.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:t.id,attributes:t.attributes}]}),this.trackLinkElement(e)}trackLinkElement(e){this.trackedLinkElements.has(e)||(this.trackedLinkElements.add(e),this.trackStylesheetInLinkElement(e))}adoptStyleSheets(e,t){if(0===e.length)return;const n={id:t,styleIds:[]},r=[];for(const t of e){let e;this.styleMirror.has(t)?e=this.styleMirror.getId(t):(e=this.styleMirror.add(t),r.push({styleId:e,rules:Array.from(t.rules||CSSRule,((e,t)=>({rule:YB(e),index:t})))})),n.styleIds.push(e)}r.length>0&&(n.styles=r),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(e){}}class uhe{constructor(){this.nodeMap=new WeakMap,this.active=!1}inOtherBuffer(e,t){const n=this.nodeMap.get(e);return n&&Array.from(n).some((e=>e!==t))}add(e,t){this.active||(this.active=!0,jpe((()=>{this.nodeMap=new WeakMap,this.active=!1}))),this.nodeMap.set(e,(this.nodeMap.get(e)||new Set).add(t))}destroy(){}}let Tr,Cw;try{if(2!==Array.from([1],(e=>2*e))[0]){const e=document.createElement("iframe");document.body.appendChild(e),Array.from=Lb([e,"access",e=>e.contentWindow,"optionalAccess",e=>e.Array,"access",e=>e.from])||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}const Rc=fpe();function _u(e={}){const{emit:t,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:a="rr-block",blockSelector:o=null,unblockSelector:i=null,ignoreClass:s="rr-ignore",ignoreSelector:c=null,maskAllText:l=!1,maskTextClass:u="rr-mask",unmaskTextClass:f=null,maskTextSelector:d=null,unmaskTextSelector:p=null,inlineStylesheet:h=!0,maskAllInputs:m,maskInputOptions:y,slimDOMOptions:g,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,maxCanvasSize:w=null,packFn:k,sampling:x={},dataURLOptions:S={},mousemoveWait:E,recordDOM:A=!0,recordCanvas:z=!1,recordCrossOriginIframes:C=!1,recordAfter:I=("DOMContentLoaded"===e.recordAfter?e.recordAfter:"load"),userTriggeredOnInput:T=!1,collectFonts:R=!1,inlineImages:P=!1,plugins:j,keepIframeSrcFn:O=()=>!1,ignoreCSSAttributes:N=new Set([]),errorHandler:M,onMutation:D,getCanvasManager:B}=e;Hpe(M);const L=!C||window.parent===window;let V=!1;if(!L)try{window.parent.document&&(V=!1)}catch{V=!0}if(L&&!t)throw new Error("emit function is required");if(!L&&!V)return()=>{};void 0!==E&&void 0===x.mousemove&&(x.mousemove=E),Rc.reset();const q=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==y?y:{},F=!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===g,headMetaDescKeywords:"all"===g}:g||{};Mpe();let U,$=0;const W=e=>{for(const t of j||[])t.eventProcessor&&(e=t.eventProcessor(e));return k&&!V&&(e=k(e)),e};Tr=(e,a)=>{const o=e;if(o.timestamp=Sw(),Lb([g1,"access",e=>e[0],"optionalAccess",e=>e.isFrozen,"call",e=>e()])&&o.type!==Gt.FullSnapshot&&!(o.type===Gt.IncrementalSnapshot&&o.data.source===zt.Mutation)&&g1.forEach((e=>e.unfreeze())),L)Lb([t,"optionalCall",e=>e(W(o),a)]);else if(V){const e={type:"rrweb",event:W(o),origin:window.location.origin,isCheckout:a};window.parent.postMessage(e,"*")}if(o.type===Gt.FullSnapshot)U=o,$=0;else if(o.type===Gt.IncrementalSnapshot){if(o.data.source===zt.Mutation&&o.data.isAttachIframe)return;$++;const e=r&&$>=r,t=n&&U&&o.timestamp-U.timestamp>n;(e||t)&&ee(!0)}};const H=e=>{Tr({type:Gt.IncrementalSnapshot,data:{source:zt.Mutation,...e}})},G=e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.Scroll,...e}}),Q=e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.CanvasMutation,...e}}),K=new fhe({mutationCb:H,adoptedStyleSheetCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.AdoptedStyleSheet,...e}})}),Y="boolean"==typeof __RRWEB_EXCLUDE_IFRAME__&&__RRWEB_EXCLUDE_IFRAME__?new ihe:new she({mirror:Rc,mutationCb:H,stylesheetManager:K,recordCrossOriginIframes:C,wrappedEmit:Tr});for(const e of j||[])e.getMirror&&e.getMirror({nodeMirror:Rc,crossOriginIframeMirror:Y.crossOriginIframeMirror,crossOriginIframeStyleMirror:Y.crossOriginIframeStyleMirror});const Z=new uhe,X=phe(B,{mirror:Rc,win:window,mutationCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.CanvasMutation,...e}}),recordCanvas:z,blockClass:a,blockSelector:o,unblockSelector:i,maxCanvasSize:w,sampling:x.canvas,dataURLOptions:S,errorHandler:M}),J="boolean"==typeof __RRWEB_EXCLUDE_SHADOW_DOM__&&__RRWEB_EXCLUDE_SHADOW_DOM__?new che:new lhe({mutationCb:H,scrollCb:G,bypassOptions:{onMutation:D,blockClass:a,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskInputOptions:q,dataURLOptions:S,maskAttributeFn:v,maskTextFn:_,maskInputFn:b,recordCanvas:z,inlineImages:P,sampling:x,slimDOMOptions:F,iframeManager:Y,stylesheetManager:K,canvasManager:X,keepIframeSrcFn:O,processedNodeManager:Z},mirror:Rc}),ee=(e=!1)=>{if(!A)return;Tr({type:Gt.Meta,data:{href:window.location.href,width:sV(),height:iV()}},e),K.reset(),J.init(),g1.forEach((e=>e.lock()));const t=Ope(document,{mirror:Rc,blockClass:a,blockSelector:o,unblockSelector:i,maskAllText:l,maskTextClass:u,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,inlineStylesheet:h,maskAllInputs:q,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,slimDOM:F,dataURLOptions:S,recordCanvas:z,inlineImages:P,onSerialize:e=>{fV(e,Rc)&&Y.addIframe(e),uV(e,Rc)&&K.trackLinkElement(e),dR(e)&&J.addShadowRoot(e.shadowRoot,document)},onIframeLoad:(e,t)=>{Y.attachIframe(e,t),e.contentWindow&&X.addWindow(e.contentWindow),J.observeAttachShadow(e)},onStylesheetLoad:(e,t)=>{K.attachLinkElement(e,t)},keepIframeSrcFn:O});if(!t)return console.warn("Failed to snapshot the document");Tr({type:Gt.FullSnapshot,data:{node:t,initialOffset:oV(window)}}),g1.forEach((e=>e.unlock())),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&K.adoptStyleSheets(document.adoptedStyleSheets,Rc.getId(document))};Cw=ee;try{const e=[],t=e=>pn(ohe)({onMutation:D,mutationCb:H,mousemoveCb:(e,t)=>Tr({type:Gt.IncrementalSnapshot,data:{source:t,positions:e}}),mouseInteractionCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.MouseInteraction,...e}}),scrollCb:G,viewportResizeCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.ViewportResize,...e}}),inputCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.Input,...e}}),mediaInteractionCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.MediaInteraction,...e}}),styleSheetRuleCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.StyleSheetRule,...e}}),styleDeclarationCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.StyleDeclaration,...e}}),canvasMutationCb:Q,fontCb:e=>Tr({type:Gt.IncrementalSnapshot,data:{source:zt.Font,...e}}),selectionCb:e=>{Tr({type:Gt.IncrementalSnapshot,data:{source:zt.Selection,...e}})},customElementCb:e=>{Tr({type:Gt.IncrementalSnapshot,data:{source:zt.CustomElement,...e}})},blockClass:a,ignoreClass:s,ignoreSelector:c,maskAllText:l,maskTextClass:u,unmaskTextClass:f,maskTextSelector:d,unmaskTextSelector:p,maskInputOptions:q,inlineStylesheet:h,sampling:x,recordDOM:A,recordCanvas:z,inlineImages:P,userTriggeredOnInput:T,collectFonts:R,doc:e,maskAttributeFn:v,maskInputFn:b,maskTextFn:_,keepIframeSrcFn:O,blockSelector:o,unblockSelector:i,slimDOMOptions:F,dataURLOptions:S,mirror:Rc,iframeManager:Y,stylesheetManager:K,shadowDomManager:J,processedNodeManager:Z,canvasManager:X,ignoreCSSAttributes:N,plugins:Lb([j,"optionalAccess",e=>e.filter,"call",e=>e((e=>e.observer)),"optionalAccess",e=>e.map,"call",e=>e((e=>({observer:e.observer,options:e.options,callback:t=>Tr({type:Gt.Plugin,data:{plugin:e.name,payload:t}})})))])||[]},{});Y.addLoadListener((n=>{try{e.push(t(n.contentDocument))}catch(e){console.warn(e)}}));const n=()=>{ee(),e.push(t(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():(e.push(ni("DOMContentLoaded",(()=>{Tr({type:Gt.DomContentLoaded,data:{}}),"DOMContentLoaded"===I&&n()}))),e.push(ni("load",(()=>{Tr({type:Gt.Load,data:{}}),"load"===I&&n()}),window))),()=>{e.forEach((e=>e())),Z.destroy(),Cw=void 0,Gpe()}}catch(e){console.warn(e)}}function dhe(e){if(!Cw)throw new Error("please take full snapshot after start recording");Cw(e)}function phe(e,t){try{return e?e(t):new qD}catch{return console.warn("Unable to initialize CanvasManager"),new qD}}_u.mirror=Rc,_u.takeFullSnapshot=dhe;const hhe=3,mhe=5;function nI(e){return e>9999999999?e:1e3*e}function V4(e){return e>9999999999?e/1e3:e}function av(e,t){"sentry.transaction"!==t.category&&(["ui.click","ui.input"].includes(t.category)?e.triggerUserActivity():e.checkAndHandleExpiredSession(),e.addUpdate((()=>(e.throttledAddEvent({type:Gt.Custom,timestamp:1e3*(t.timestamp||0),data:{tag:"breadcrumb",payload:lu(t,10,1e3)}}),"console"===t.category))))}const ghe="button,a";function _V(e){return e.closest(ghe)||e}function vV(e){const t=bV(e);return t&&t instanceof Element?_V(t):t}function bV(e){return yhe(e)?e.target:e}function yhe(e){return"object"==typeof e&&!!e&&"target"in e}let lp;function _he(e){return lp||(lp=[],vhe()),lp.push(e),()=>{const t=lp?lp.indexOf(e):-1;t>-1&&lp.splice(t,1)}}function vhe(){Fs(Xn,"open",(function(e){return function(...t){if(lp)try{lp.forEach((e=>e()))}catch{}return e.apply(Xn,t)}}))}const bhe=new Set([zt.Mutation,zt.StyleSheetRule,zt.StyleDeclaration,zt.AdoptedStyleSheet,zt.CanvasMutation,zt.Selection,zt.MediaInteraction]);function whe(e,t,n){e.handleClick(t,n)}class khe{constructor(e,t,n=av){this._lastMutation=0,this._lastScroll=0,this._clicks=[],this._timeout=t.timeout/1e3,this._threshold=t.threshold/1e3,this._scrollTimeout=t.scrollTimeout/1e3,this._replay=e,this._ignoreSelector=t.ignoreSelector,this._addBreadcrumbEvent=n}addListeners(){const e=_he((()=>{this._lastMutation=WD()}));this._teardown=()=>{e(),this._clicks=[],this._lastMutation=0,this._lastScroll=0}}removeListeners(){this._teardown&&this._teardown(),this._checkClickTimeout&&clearTimeout(this._checkClickTimeout)}handleClick(e,t){if(She(t,this._ignoreSelector)||!Ehe(e))return;const n={timestamp:V4(e.timestamp),clickBreadcrumb:e,clickCount:0,node:t};this._clicks.some((e=>e.node===n.node&&Math.abs(e.timestamp-n.timestamp)<1))||(this._clicks.push(n),1===this._clicks.length&&this._scheduleCheckClicks())}registerMutation(e=Date.now()){this._lastMutation=V4(e)}registerScroll(e=Date.now()){this._lastScroll=V4(e)}registerClick(e){const t=_V(e);this._handleMultiClick(t)}_handleMultiClick(e){this._getClicks(e).forEach((e=>{e.clickCount++}))}_getClicks(e){return this._clicks.filter((t=>t.node===e))}_checkClicks(){const e=[],t=WD();this._clicks.forEach((n=>{!n.mutationAfter&&this._lastMutation&&(n.mutationAfter=n.timestamp<=this._lastMutation?this._lastMutation-n.timestamp:void 0),!n.scrollAfter&&this._lastScroll&&(n.scrollAfter=n.timestamp<=this._lastScroll?this._lastScroll-n.timestamp:void 0),n.timestamp+this._timeout<=t&&e.push(n)}));for(const t of e){const e=this._clicks.indexOf(t);e>-1&&(this._generateBreadcrumbs(t),this._clicks.splice(e,1))}this._clicks.length&&this._scheduleCheckClicks()}_generateBreadcrumbs(e){const t=this._replay,n=e.scrollAfter&&e.scrollAfter<=this._scrollTimeout,r=e.mutationAfter&&e.mutationAfter<=this._threshold,a=!n&&!r,{clickCount:o,clickBreadcrumb:i}=e;if(a){const n=1e3*Math.min(e.mutationAfter||this._timeout,this._timeout),r=n<1e3*this._timeout?"mutation":"timeout",a={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.slowClickDetected",data:{...i.data,url:Xn.location.href,route:t.getCurrentRoute(),timeAfterClickMs:n,endReason:r,clickCount:o||1}};this._addBreadcrumbEvent(t,a)}else if(o>1){const e={type:"default",message:i.message,timestamp:i.timestamp,category:"ui.multiClick",data:{...i.data,url:Xn.location.href,route:t.getCurrentRoute(),clickCount:o,metric:!0}};this._addBreadcrumbEvent(t,e)}}_scheduleCheckClicks(){this._checkClickTimeout&&clearTimeout(this._checkClickTimeout),this._checkClickTimeout=P1((()=>this._checkClicks()),1e3)}}const xhe=["A","BUTTON","INPUT"];function She(e,t){return!!(!xhe.includes(e.tagName)||"INPUT"===e.tagName&&!["submit","button"].includes(e.getAttribute("type")||"")||"A"===e.tagName&&(e.hasAttribute("download")||e.hasAttribute("target")&&"_self"!==e.getAttribute("target"))||t&&e.matches(t))}function Ehe(e){return!(!e.data||"number"!=typeof e.data.nodeId||!e.timestamp)}function WD(){return Date.now()/1e3}function Che(e,t){try{if(!Rhe(t))return;const{source:n}=t.data;if(bhe.has(n)&&e.registerMutation(t.timestamp),n===zt.Scroll&&e.registerScroll(t.timestamp),Ahe(t)){const{type:n,id:r}=t.data,a=_u.mirror.getNode(r);a instanceof HTMLElement&&n===ei.Click&&e.registerClick(a)}}catch{}}function Rhe(e){return 3===e.type}function Ahe(e){return e.data.source===zt.MouseInteraction}function jl(e){return{timestamp:Date.now()/1e3,type:"default",...e}}var Rw;!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(Rw||(Rw={}));const The=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid","disabled","aria-disabled","data-sentry-component"]);function Ihe(e){const t={};!e["data-sentry-component"]&&e["data-sentry-element"]&&(e["data-sentry-component"]=e["data-sentry-element"]);for(const n in e)if(The.has(n)){let r=n;("data-testid"===n||"data-test-id"===n)&&(r="testId"),t[r]=e[n]}return t}const Phe=e=>t=>{if(!e.isEnabled())return;const n=$he(t);if(!n)return;const r="click"===t.name,a=r?t.event:void 0;r&&e.clickDetector&&a&&a.target&&!a.altKey&&!a.metaKey&&!a.ctrlKey&&!a.shiftKey&&whe(e.clickDetector,n,vV(t.event)),av(e,n)};function wV(e,t){const n=_u.mirror.getId(e),r=n&&_u.mirror.getNode(n),a=r&&_u.mirror.getMeta(r),o=a&&zhe(a)?a:null;return{message:t,data:o?{nodeId:n,node:{id:n,tagName:o.tagName,textContent:Array.from(o.childNodes).map((e=>e.type===Rw.Text&&e.textContent)).filter(Boolean).map((e=>e.trim())).join(""),attributes:Ihe(o.attributes)}}:{}}}function $he(e){const{target:t,message:n}=Ohe(e);return jl({category:`ui.${e.name}`,...wV(t,n)})}function Ohe(e){const t="click"===e.name;let n,r=null;try{r=t?vV(e.event):bV(e.event),n=VT(r,{maxStringLength:200})||"<unknown>"}catch{n="<unknown>"}return{target:r,message:n}}function zhe(e){return e.type===Rw.Element}function Mhe(e,t){if(!e.isEnabled())return;e.updateUserActivity();const n=Dhe(t);n&&av(e,n)}function Dhe(e){const{metaKey:t,shiftKey:n,ctrlKey:r,altKey:a,key:o,target:i}=e;if(!i||Nhe(i)||!o)return null;const s=t||r||a,c=1===o.length;if(!s&&c)return null;const l=VT(i,{maxStringLength:200})||"<unknown>";return jl({category:"ui.keyDown",message:l,data:{...wV(i,l).data,metaKey:t,shiftKey:n,ctrlKey:r,altKey:a,key:o}})}function Nhe(e){return"INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable}const Lhe={resource:Uhe,paint:Bhe,navigation:Vhe};function _b(e,t){return({metric:n})=>{t.replayPerformanceEntries.push(e(n))}}function jhe(e){return e.map(Fhe).filter(Boolean)}function Fhe(e){const t=Lhe[e.entryType];return t?t(e):null}function z1(e){return((_fe||Xn.performance.timeOrigin)+e)/1e3}function Bhe(e){const{duration:t,entryType:n,name:r,startTime:a}=e,o=z1(a);return{type:n,name:r,start:o,end:o+t,data:void 0}}function Vhe(e){const{entryType:t,name:n,decodedBodySize:r,duration:a,domComplete:o,encodedBodySize:i,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:f,redirectCount:d,startTime:p,transferSize:h,type:m}=e;return 0===a?null:{type:`${t}.${m}`,start:z1(p),end:z1(o),name:n,data:{size:h,decodedBodySize:r,encodedBodySize:i,duration:a,domInteractive:l,domContentLoadedEventStart:s,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:f,domComplete:o,redirectCount:d}}}function Uhe(e){const{entryType:t,initiatorType:n,name:r,responseEnd:a,startTime:o,decodedBodySize:i,encodedBodySize:s,responseStatus:c,transferSize:l}=e;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${t}.${n}`,start:z1(o),end:z1(a),name:r,data:{size:l,statusCode:c,decodedBodySize:i,encodedBodySize:s}}}function qhe(e){const t=e.entries[e.entries.length-1];return Kk(e,"largest-contentful-paint",t&&t.element?[t.element]:void 0)}function Whe(e){return void 0!==e.sources}function Hhe(e){const t=[],n=[];for(const r of e.entries)if(Whe(r)){const e=[];for(const t of r.sources)if(t.node){n.push(t.node);const r=_u.mirror.getId(t.node);r&&e.push(r)}t.push({value:r.value,nodeIds:e.length?e:void 0})}return Kk(e,"cumulative-layout-shift",n,t)}function Ghe(e){const t=e.entries[e.entries.length-1];return Kk(e,"first-input-delay",t&&t.target?[t.target]:void 0)}function Khe(e){const t=e.entries[e.entries.length-1];return Kk(e,"interaction-to-next-paint",t&&t.target?[t.target]:void 0)}function Kk(e,t,n,r){const a=e.value,o=e.rating,i=z1(a);return{type:"web-vital",name:t,start:i,end:i,data:{value:a,size:a,rating:o,nodeIds:n?n.map((e=>_u.mirror.getId(e))):void 0,attributions:r}}}function Qhe(e){function t(t){e.performanceEntries.includes(t)||e.performanceEntries.push(t)}function n({entries:e}){e.forEach(t)}const r=[];return["navigation","paint","resource"].forEach((e=>{r.push(wde(e,n))})),r.push(_de(_b(qhe,e)),yde(_b(Hhe,e)),vde(_b(Ghe,e)),bde(_b(Khe,e))),()=>{r.forEach((e=>e()))}}const At=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__,Yhe='var t=Uint8Array,n=Uint16Array,r=Int32Array,e=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,e){for(var i=new n(31),a=0;a<31;++a)i[a]=e+=1<<t[a-1];var s=new r(i[30]);for(a=1;a<30;++a)for(var o=i[a];o<i[a+1];++o)s[o]=o-i[a]<<5|a;return{b:i,r:s}},o=s(e,2),f=o.b,h=o.r;f[28]=258,h[258]=28;for(var l=s(i,0).r,u=new n(32768),c=0;c<32768;++c){var v=(43690&c)>>1|(21845&c)<<1;v=(61680&(v=(52428&v)>>2|(13107&v)<<2))>>4|(3855&v)<<4,u[c]=((65280&v)>>8|(255&v)<<8)>>1}var d=function(t,r,e){for(var i=t.length,a=0,s=new n(r);a<i;++a)t[a]&&++s[t[a]-1];var o,f=new n(r);for(a=1;a<r;++a)f[a]=f[a-1]+s[a-1]<<1;if(e){o=new n(1<<r);var h=15-r;for(a=0;a<i;++a)if(t[a])for(var l=a<<4|t[a],c=r-t[a],v=f[t[a]-1]++<<c,d=v|(1<<c)-1;v<=d;++v)o[u[v]>>h]=l}else for(o=new n(i),a=0;a<i;++a)t[a]&&(o[a]=u[f[t[a]-1]++]>>15-t[a]);return o},g=new t(288);for(c=0;c<144;++c)g[c]=8;for(c=144;c<256;++c)g[c]=9;for(c=256;c<280;++c)g[c]=7;for(c=280;c<288;++c)g[c]=8;var w=new t(32);for(c=0;c<32;++c)w[c]=5;var p=d(g,9,0),y=d(w,5,0),m=function(t){return(t+7)/8|0},b=function(n,r,e){return(null==e||e>n.length)&&(e=n.length),new t(n.subarray(r,e))},M=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],E=function(t,n,r){var e=new Error(n||M[t]);if(e.code=t,Error.captureStackTrace&&Error.captureStackTrace(e,E),!r)throw e;return e},z=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8},_=function(t,n,r){r<<=7&n;var e=n/8|0;t[e]|=r,t[e+1]|=r>>8,t[e+2]|=r>>16},x=function(r,e){for(var i=[],a=0;a<r.length;++a)r[a]&&i.push({s:a,f:r[a]});var s=i.length,o=i.slice();if(!s)return{t:F,l:0};if(1==s){var f=new t(i[0].s+1);return f[i[0].s]=1,{t:f,l:1}}i.sort((function(t,n){return t.f-n.f})),i.push({s:-1,f:25001});var h=i[0],l=i[1],u=0,c=1,v=2;for(i[0]={s:-1,f:h.f+l.f,l:h,r:l};c!=s-1;)h=i[i[u].f<i[v].f?u++:v++],l=i[u!=c&&i[u].f<i[v].f?u++:v++],i[c++]={s:-1,f:h.f+l.f,l:h,r:l};var d=o[0].s;for(a=1;a<s;++a)o[a].s>d&&(d=o[a].s);var g=new n(d+1),w=A(i[c-1],g,0);if(w>e){a=0;var p=0,y=w-e,m=1<<y;for(o.sort((function(t,n){return g[n.s]-g[t.s]||t.f-n.f}));a<s;++a){var b=o[a].s;if(!(g[b]>e))break;p+=m-(1<<w-g[b]),g[b]=e}for(p>>=y;p>0;){var M=o[a].s;g[M]<e?p-=1<<e-g[M]++-1:++a}for(;a>=0&&p;--a){var E=o[a].s;g[E]==e&&(--g[E],++p)}w=e}return{t:new t(g),l:w}},A=function(t,n,r){return-1==t.s?Math.max(A(t.l,n,r+1),A(t.r,n,r+1)):n[t.s]=r},D=function(t){for(var r=t.length;r&&!t[--r];);for(var e=new n(++r),i=0,a=t[0],s=1,o=function(t){e[i++]=t},f=1;f<=r;++f)if(t[f]==a&&f!=r)++s;else{if(!a&&s>2){for(;s>138;s-=138)o(32754);s>2&&(o(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(o(a),--s;s>6;s-=6)o(8304);s>2&&(o(s-3<<5|8208),s=0)}for(;s--;)o(a);s=1,a=t[f]}return{c:e.subarray(0,i),n:r}},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},k=function(t,n,r){var e=r.length,i=m(n+2);t[i]=255&e,t[i+1]=e>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var a=0;a<e;++a)t[i+a+4]=r[a];return 8*(i+4+e)},U=function(t,r,s,o,f,h,l,u,c,v,m){z(r,m++,s),++f[256];for(var b=x(f,15),M=b.t,E=b.l,A=x(h,15),U=A.t,C=A.l,F=D(M),I=F.c,S=F.n,L=D(U),O=L.c,j=L.n,q=new n(19),B=0;B<I.length;++B)++q[31&I[B]];for(B=0;B<O.length;++B)++q[31&O[B]];for(var G=x(q,7),H=G.t,J=G.l,K=19;K>4&&!H[a[K-1]];--K);var N,P,Q,R,V=v+5<<3,W=T(f,g)+T(h,w)+l,X=T(f,M)+T(h,U)+l+14+3*K+T(q,H)+2*q[16]+3*q[17]+7*q[18];if(c>=0&&V<=W&&V<=X)return k(r,m,t.subarray(c,c+v));if(z(r,m,1+(X<W)),m+=2,X<W){N=d(M,E,0),P=M,Q=d(U,C,0),R=U;var Y=d(H,J,0);z(r,m,S-257),z(r,m+5,j-1),z(r,m+10,K-4),m+=14;for(B=0;B<K;++B)z(r,m+3*B,H[a[B]]);m+=3*K;for(var Z=[I,O],$=0;$<2;++$){var tt=Z[$];for(B=0;B<tt.length;++B){var nt=31&tt[B];z(r,m,Y[nt]),m+=H[nt],nt>15&&(z(r,m,tt[B]>>5&127),m+=tt[B]>>12)}}}else N=p,P=g,Q=y,R=w;for(B=0;B<u;++B){var rt=o[B];if(rt>255){_(r,m,N[(nt=rt>>18&31)+257]),m+=P[nt+257],nt>7&&(z(r,m,rt>>23&31),m+=e[nt]);var et=31&rt;_(r,m,Q[et]),m+=R[et],et>3&&(_(r,m,rt>>5&8191),m+=i[et])}else _(r,m,N[rt]),m+=P[rt]}return _(r,m,N[256]),m+P[256]},C=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),I=function(){for(var t=new Int32Array(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&-306674912)^r>>>1;t[n]=r}return t}(),S=function(){var t=-1;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=I[255&r^n[e]]^r>>>8;t=r},d:function(){return~t}}},L=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,a=0|r.length,s=0;s!=a;){for(var o=Math.min(s+2655,a);s<o;++s)i+=e+=r[s];e=(65535&e)+15*(e>>16),i=(65535&i)+15*(i>>16)}t=e,n=i},d:function(){return(255&(t%=65521))<<24|(65280&t)<<8|(255&(n%=65521))<<8|n>>8}}},O=function(a,s,o,f,u){if(!u&&(u={l:1},s.dictionary)){var c=s.dictionary.subarray(-32768),v=new t(c.length+a.length);v.set(c),v.set(a,c.length),a=v,u.w=c.length}return function(a,s,o,f,u,c){var v=c.z||a.length,d=new t(f+v+5*(1+Math.ceil(v/7e3))+u),g=d.subarray(f,d.length-u),w=c.l,p=7&(c.r||0);if(s){p&&(g[0]=c.r>>3);for(var y=C[s-1],M=y>>13,E=8191&y,z=(1<<o)-1,_=c.p||new n(32768),x=c.h||new n(z+1),A=Math.ceil(o/3),D=2*A,T=function(t){return(a[t]^a[t+1]<<A^a[t+2]<<D)&z},F=new r(25e3),I=new n(288),S=new n(32),L=0,O=0,j=c.i||0,q=0,B=c.w||0,G=0;j+2<v;++j){var H=T(j),J=32767&j,K=x[H];if(_[J]=K,x[H]=J,B<=j){var N=v-j;if((L>7e3||q>24576)&&(N>423||!w)){p=U(a,g,0,F,I,S,O,q,G,j-G,p),q=L=O=0,G=j;for(var P=0;P<286;++P)I[P]=0;for(P=0;P<30;++P)S[P]=0}var Q=2,R=0,V=E,W=J-K&32767;if(N>2&&H==T(j-W))for(var X=Math.min(M,N)-1,Y=Math.min(32767,j),Z=Math.min(258,N);W<=Y&&--V&&J!=K;){if(a[j+Q]==a[j+Q-W]){for(var $=0;$<Z&&a[j+$]==a[j+$-W];++$);if($>Q){if(Q=$,R=W,$>X)break;var tt=Math.min(W,$-2),nt=0;for(P=0;P<tt;++P){var rt=j-W+P&32767,et=rt-_[rt]&32767;et>nt&&(nt=et,K=rt)}}}W+=(J=K)-(K=_[J])&32767}if(R){F[q++]=268435456|h[Q]<<18|l[R];var it=31&h[Q],at=31&l[R];O+=e[it]+i[at],++I[257+it],++S[at],B=j+Q,++L}else F[q++]=a[j],++I[a[j]]}}for(j=Math.max(j,B);j<v;++j)F[q++]=a[j],++I[a[j]];p=U(a,g,w,F,I,S,O,q,G,j-G,p),w||(c.r=7&p|g[p/8|0]<<3,p-=7,c.h=x,c.p=_,c.i=j,c.w=B)}else{for(j=c.w||0;j<v+w;j+=65535){var st=j+65535;st>=v&&(g[p/8|0]=w,st=v),p=k(g,p+1,a.subarray(j,st))}c.i=v}return b(d,0,f+m(p)+u)}(a,null==s.level?6:s.level,null==s.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(a.length)))):12+s.mem,o,f,u)},j=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},q=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&&j(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},B=function(t){return 10+(t.filename?t.filename.length+1:0)},G=function(){function n(n,r){if("function"==typeof n&&(r=n,n={}),this.ondata=r,this.o=n||{},this.s={l:0,i:32768,w:32768,z:32768},this.b=new t(98304),this.o.dictionary){var e=this.o.dictionary.subarray(-32768);this.b.set(e,32768-e.length),this.s.i=32768-e.length}}return n.prototype.p=function(t,n){this.ondata(O(t,this.o,0,0,this.s),n)},n.prototype.push=function(n,r){this.ondata||E(5),this.s.l&&E(4);var e=n.length+this.s.z;if(e>this.b.length){if(e>2*this.b.length-32768){var i=new t(-32768&e);i.set(this.b.subarray(0,this.s.z)),this.b=i}var a=this.b.length-this.s.z;a&&(this.b.set(n.subarray(0,a),this.s.z),this.s.z=this.b.length,this.p(this.b,!1)),this.b.set(this.b.subarray(-32768)),this.b.set(n.subarray(a),32768),this.s.z=n.length-a+32768,this.s.i=32766,this.s.w=32768}else this.b.set(n,this.s.z),this.s.z+=n.length;this.s.l=1&r,(this.s.z>this.s.w+8191||r)&&(this.p(this.b,r||!1),this.s.w=this.s.i,this.s.i-=2)},n}();var H=function(){function t(t,n){this.c=L(),this.v=1,G.call(this,t,n)}return t.prototype.push=function(t,n){this.c.p(t),G.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){var r=O(t,this.o,this.v&&(this.o.dictionary?6:2),n&&4,this.s);this.v&&(function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;if(t[0]=120,t[1]=e<<6|(n.dictionary&&32),t[1]|=31-(t[0]<<8|t[1])%31,n.dictionary){var i=L();i.p(n.dictionary),j(t,2,i.d())}}(r,this.o),this.v=0),n&&j(r,r.length-4,this.c.d()),this.ondata(r,n)},t}(),J="undefined"!=typeof TextEncoder&&new TextEncoder,K="undefined"!=typeof TextDecoder&&new TextDecoder;try{K.decode(F,{stream:!0})}catch(t){}var N=function(){function t(t){this.ondata=t}return t.prototype.push=function(t,n){this.ondata||E(5),this.d&&E(4),this.ondata(P(t),this.d=n||!1)},t}();function P(n,r){if(J)return J.encode(n);for(var e=n.length,i=new t(n.length+(n.length>>1)),a=0,s=function(t){i[a++]=t},o=0;o<e;++o){if(a+5>i.length){var f=new t(a+8+(e-o<<1));f.set(i),i=f}var h=n.charCodeAt(o);h<128||r?s(h):h<2048?(s(192|h>>6),s(128|63&h)):h>55295&&h<57344?(s(240|(h=65536+(1047552&h)|1023&n.charCodeAt(++o))>>18),s(128|h>>12&63),s(128|h>>6&63),s(128|63&h)):(s(224|h>>12),s(128|h>>6&63),s(128|63&h))}return b(i,0,a)}function Q(t){return function(t,n){n||(n={});var r=S(),e=t.length;r.p(t);var i=O(t,n,B(n),8),a=i.length;return q(i,n),j(i,a-8,r.d()),j(i,a-4,e),i}(P(t))}const R=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const n=this._hasEvents?",":"";this.stream.push(n+t),this._hasEvents=!0}finish(){this.stream.push("]",!0);const t=function(t){let n=0;for(const r of t)n+=r.length;const r=new Uint8Array(n);for(let n=0,e=0,i=t.length;n<i;n++){const i=t[n];r.set(i,e),e+=i.length}return r}(this._deflatedData);return this._init(),t}_init(){this._hasEvents=!1,this._deflatedData=[],this.deflate=new H,this.deflate.ondata=(t,n)=>{this._deflatedData.push(t)},this.stream=new N(((t,n)=>{this.deflate.push(t,n)})),this.stream.push("[")}},V={clear:()=>{R.clear()},addEvent:t=>R.addEvent(t),finish:()=>R.finish(),compress:t=>Q(t)};addEventListener("message",(function(t){const n=t.data.method,r=t.data.id,e=t.data.arg;if(n in V&&"function"==typeof V[n])try{const t=V[n](e);postMessage({id:r,method:n,success:!0,response:t})}catch(t){postMessage({id:r,method:n,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});';function Zhe(){const e=new Blob([Yhe]);return URL.createObjectURL(e)}const HD=["info","warn","error","log"],jb="[Replay] ";function U4(e,t="info"){$ue({category:"console",data:{logger:"replay"},level:t,message:`${jb}${e}`},{level:t})}function Xhe(){let e=!1,t=!1;const n={exception:()=>{},infoTick:()=>{},setConfig:n=>{e=n.captureExceptions,t=n.traceInternals}};return At?(HD.forEach((e=>{n[e]=(...n)=>{ri[e](jb,...n),t&&U4(n.join(""),Oue(e))}})),n.exception=(r,...a)=>{a.length&&n.error&&n.error(...a),ri.error(jb,r),e?WT(r):t&&U4(r,"error")},n.infoTick=(...e)=>{ri.info(jb,...e),t&&setTimeout((()=>U4(e[0])),0)}):HD.forEach((e=>{n[e]=()=>{}})),n}const Pt=Xhe();class rI extends Error{constructor(){super(`Event buffer exceeded maximum size of ${YT}.`)}}class kV{constructor(){this.events=[],this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return this.events.length>0}get type(){return"sync"}destroy(){this.events=[]}async addEvent(e){const t=JSON.stringify(e).length;if(this._totalSize+=t,this._totalSize>YT)throw new rI;this.events.push(e)}finish(){return new Promise((e=>{const t=this.events;this.clear(),e(JSON.stringify(t))}))}clear(){this.events=[],this._totalSize=0,this.hasCheckout=!1}getEarliestTimestamp(){const e=this.events.map((e=>e.timestamp)).sort()[0];return e?nI(e):null}}class Jhe{constructor(e){this._worker=e,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise(((e,t)=>{this._worker.addEventListener("message",(({data:n})=>{n.success?e():t()}),{once:!0}),this._worker.addEventListener("error",(e=>{t(e)}),{once:!0})}))),this._ensureReadyPromise}destroy(){At&&Pt.info("Destroying compression worker"),this._worker.terminate()}postMessage(e,t){const n=this._getAndIncrementId();return new Promise(((r,a)=>{const o=({data:t})=>{const i=t;if(i.method===e&&i.id===n){if(this._worker.removeEventListener("message",o),!i.success)return At&&Pt.error("Error in compression worker: ",i.response),void a(new Error("Error in compression worker"));r(i.response)}};this._worker.addEventListener("message",o),this._worker.postMessage({id:n,method:e,arg:t})}))}_getAndIncrementId(){return this._id++}}class eme{constructor(e){this._worker=new Jhe(e),this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this.waitForCheckout=!1}get hasEvents(){return!!this._earliestTimestamp}get type(){return"worker"}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}addEvent(e){const t=nI(e.timestamp);(!this._earliestTimestamp||t<this._earliestTimestamp)&&(this._earliestTimestamp=t);const n=JSON.stringify(e);return this._totalSize+=n.length,this._totalSize>YT?Promise.reject(new rI):this._sendEventToWorker(n)}finish(){return this._finishRequest()}clear(){this._earliestTimestamp=null,this._totalSize=0,this.hasCheckout=!1,this._worker.postMessage("clear").then(null,(e=>{At&&Pt.exception(e,'Sending "clear" message to worker failed',e)}))}getEarliestTimestamp(){return this._earliestTimestamp}_sendEventToWorker(e){return this._worker.postMessage("addEvent",e)}async _finishRequest(){const e=await this._worker.postMessage("finish");return this._earliestTimestamp=null,this._totalSize=0,e}}class tme{constructor(e){this._fallback=new kV,this._compression=new eme(e),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get waitForCheckout(){return this._used.waitForCheckout}get type(){return this._used.type}get hasEvents(){return this._used.hasEvents}get hasCheckout(){return this._used.hasCheckout}set hasCheckout(e){this._used.hasCheckout=e}set waitForCheckout(e){this._used.waitForCheckout=e}destroy(){this._fallback.destroy(),this._compression.destroy()}clear(){return this._used.clear()}getEarliestTimestamp(){return this._used.getEarliestTimestamp()}addEvent(e){return this._used.addEvent(e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(e){return void(At&&Pt.exception(e,"Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:e,hasCheckout:t,waitForCheckout:n}=this._fallback,r=[];for(const t of e)r.push(this._compression.addEvent(t));this._compression.hasCheckout=t,this._compression.waitForCheckout=n,this._used=this._compression;try{await Promise.all(r),this._fallback.clear()}catch(e){At&&Pt.exception(e,"Failed to add events when switching buffers.")}}}function nme({useCompression:e,workerUrl:t}){if(e&&window.Worker){const e=rme(t);if(e)return e}return At&&Pt.info("Using simple buffer"),new kV}function rme(e){try{const t=e||ame();if(!t)return;At&&Pt.info("Using compression worker"+(e?` from ${e}`:""));const n=new Worker(t);return new tme(n)}catch(e){At&&Pt.exception(e,"Failed to create compression worker")}}function ame(){return typeof __SENTRY_EXCLUDE_REPLAY_WORKER__>"u"||!__SENTRY_EXCLUDE_REPLAY_WORKER__?Zhe():""}function aI(){try{return"sessionStorage"in Xn&&!!Xn.sessionStorage}catch{return!1}}function ome(e){ime(),e.session=void 0}function ime(){if(aI())try{Xn.sessionStorage.removeItem(KT)}catch{}}function xV(e){return void 0!==e&&Math.random()<e}function SV(e){const t=Date.now();return{id:e.id||yu(),started:e.started||t,lastActivity:e.lastActivity||t,segmentId:e.segmentId||0,sampled:e.sampled,previousSessionId:e.previousSessionId}}function oI(e){if(aI())try{Xn.sessionStorage.setItem(KT,JSON.stringify(e))}catch{}}function sme(e,t){return xV(e)?"session":!!t&&"buffer"}function GD({sessionSampleRate:e,allowBuffering:t,stickySession:n=!1},{previousSessionId:r}={}){const a=SV({sampled:sme(e,t),previousSessionId:r});return n&&oI(a),a}function cme(){if(!aI())return null;try{const e=Xn.sessionStorage.getItem(KT);if(!e)return null;const t=JSON.parse(e);return At&&Pt.infoTick("Loading existing session"),SV(t)}catch{return null}}function mR(e,t,n=+new Date){return null===e||void 0===t||t<0||0!==t&&e+t<=n}function EV(e,{maxReplayDuration:t,sessionIdleExpire:n,targetTime:r=Date.now()}){return mR(e.started,t,r)||mR(e.lastActivity,n,r)}function CV(e,{sessionIdleExpire:t,maxReplayDuration:n}){return!(!EV(e,{sessionIdleExpire:t,maxReplayDuration:n})||"buffer"===e.sampled&&0===e.segmentId)}function q4({sessionIdleExpire:e,maxReplayDuration:t,previousSessionId:n},r){const a=r.stickySession&&cme();return a?CV(a,{sessionIdleExpire:e,maxReplayDuration:t})?(At&&Pt.infoTick("Session in sessionStorage is expired, creating new one..."),GD(r,{previousSessionId:a.id})):a:(At&&Pt.infoTick("Creating new session"),GD(r,{previousSessionId:n}))}function lme(e){return e.type===Gt.Custom}function iI(e,t,n){return!!AV(e,t)&&(RV(e,t,n),!0)}function fme(e,t,n){return AV(e,t)?RV(e,t,n):Promise.resolve(null)}async function RV(e,t,n){const{eventBuffer:r}=e;if(!r||r.waitForCheckout&&!n)return null;const a="buffer"===e.recordingMode;try{n&&a&&r.clear(),n&&(r.hasCheckout=!0,r.waitForCheckout=!1);const o=ume(t,e.getOptions().beforeAddRecordingEvent);return o?await r.addEvent(o):void 0}catch(t){const n=t&&t instanceof rI,o=n?"addEventSizeExceeded":"addEvent";if(n&&a)return r.clear(),r.waitForCheckout=!0,null;e.handleException(t),await e.stop({reason:o});const i=ef();i&&i.recordDroppedEvent("internal_sdk_error","replay")}}function AV(e,t){if(!e.eventBuffer||e.isPaused()||!e.isEnabled())return!1;const n=nI(t.timestamp);return!(n+e.timeouts.sessionIdlePause<Date.now())&&(!(n>e.getContext().initialTimestamp+e.getOptions().maxReplayDuration)||(At&&Pt.infoTick(`Skipping event with timestamp ${n} because it is after maxReplayDuration`),!1))}function ume(e,t){try{if("function"==typeof t&&lme(e))return t(e)}catch(e){return At&&Pt.exception(e,"An error occurred in the `beforeAddRecordingEvent` callback, skipping the event..."),null}return e}function sI(e){return!e.type}function gR(e){return"transaction"===e.type}function dme(e){return"replay_event"===e.type}function KD(e){return"feedback"===e.type}function pme(e){return(t,n)=>{if(!e.isEnabled()||!sI(t)&&!gR(t))return;const r=n&&n.statusCode;if(!(!r||r<200||r>=300)){if(gR(t))return void hme(e,t);mme(e,t)}}}function hme(e,t){const n=e.getContext();t.contexts&&t.contexts.trace&&t.contexts.trace.trace_id&&n.traceIds.size<100&&n.traceIds.add(t.contexts.trace.trace_id)}function mme(e,t){const n=e.getContext();if(t.event_id&&n.errorIds.size<100&&n.errorIds.add(t.event_id),"buffer"!==e.recordingMode||!t.tags||!t.tags.replayId)return;const{beforeErrorSampling:r}=e.getOptions();"function"==typeof r&&!r(t)||P1((async()=>{try{await e.sendBufferedReplayOrFlush()}catch(t){e.handleException(t)}}))}function gme(e){return t=>{!e.isEnabled()||!sI(t)||yme(e,t)}}function yme(e,t){const n=t.exception&&t.exception.values&&t.exception.values[0]&&t.exception.values[0].value;if("string"==typeof n&&(n.match(/(reactjs\.org\/docs\/error-decoder\.html\?invariant=|react\.dev\/errors\/)(418|419|422|423|425)/)||n.match(/(does not match server-rendered HTML|Hydration failed because)/i))){av(e,jl({category:"replay.hydrate-error",data:{url:dfe()}}))}}function _me(e){const t=ef();t&&t.on("beforeAddBreadcrumb",(t=>vme(e,t)))}function vme(e,t){if(!e.isEnabled()||!TV(t))return;const n=bme(t);n&&av(e,n)}function bme(e){return!TV(e)||["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui.")?null:"console"===e.category?wme(e):jl(e)}function wme(e){const t=e.data&&e.data.arguments;if(!Array.isArray(t)||0===t.length)return jl(e);let n=!1;const r=t.map((e=>{if(!e)return e;if("string"==typeof e)return e.length>mb?(n=!0,`${e.slice(0,mb)}…`):e;if("object"==typeof e)try{const t=lu(e,7);return JSON.stringify(t).length>mb?(n=!0,`${JSON.stringify(t,null,2).slice(0,mb)}…`):t}catch{}return e}));return jl({...e,data:{...e.data,arguments:r,...n?{_meta:{warnings:["CONSOLE_ARG_TRUNCATED"]}}:{}}})}function TV(e){return!!e.category}function kme(e,t){return!(e.type||!e.exception||!e.exception.values||!e.exception.values.length)&&!(!t.originalException||!t.originalException.__rrweb__)}function IV(){const e=J1().getPropagationContext().dsc;e&&delete e.replay_id;const t=MB();if(t){delete NB(t).replay_id}}function xme(e,t){e.triggerUserActivity(),e.addUpdate((()=>!t.timestamp||(e.throttledAddEvent({type:Gt.Custom,timestamp:1e3*t.timestamp,data:{tag:"breadcrumb",payload:{timestamp:t.timestamp,type:"default",category:"sentry.feedback",data:{feedbackId:t.event_id}}}}),!1)))}function Sme(e,t){return!("buffer"!==e.recordingMode||t.message===QT||!t.exception||t.type)&&xV(e.getOptions().errorSampleRate)}function Eme(e){return Object.assign(((t,n)=>!e.isEnabled()||e.isPaused()?t:dme(t)?(delete t.breadcrumbs,t):sI(t)||gR(t)||KD(t)?e.checkAndHandleExpiredSession()?KD(t)?(e.flush(),t.contexts.feedback.replay_id=e.getSessionId(),xme(e,t),t):kme(t,n)&&!e.getOptions()._experiments.captureExceptions?(At&&Pt.log("Ignoring error from rrweb internals",t),null):((Sme(e,t)||"session"===e.recordingMode)&&(t.tags={...t.tags,replayId:e.getSessionId()}),t):(IV(),t):t),{id:"Replay"})}function Qk(e,t){return t.map((({type:t,start:n,end:r,name:a,data:o})=>{const i=e.throttledAddEvent({type:Gt.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:t,description:a,startTimestamp:n,endTimestamp:r,data:o}}});return"string"==typeof i?Promise.resolve(null):i}))}function Cme(e){const{from:t,to:n}=e,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:t}}}function Rme(e){return t=>{if(!e.isEnabled())return;const n=Cme(t);null!==n&&(e.getContext().urls.push(n.name),e.triggerUserActivity(),e.addUpdate((()=>(Qk(e,[n]),!1))))}}function Ame(e,t){return(!At||!e.getOptions()._experiments.traceInternals)&&Aue(t,ef())}function PV(e,t){e.isEnabled()&&null!==t&&(Ame(e,t.name)||e.addUpdate((()=>(Qk(e,[t]),!0))))}function Yk(e){if(!e)return;const t=new TextEncoder;try{if("string"==typeof e)return t.encode(e).length;if(e instanceof URLSearchParams)return t.encode(e.toString()).length;if(e instanceof FormData){const n=MV(e);return t.encode(n).length}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength}catch{}}function $V(e){if(!e)return;const t=parseInt(e,10);return isNaN(t)?void 0:t}function OV(e){try{if("string"==typeof e)return[e];if(e instanceof URLSearchParams)return[e.toString()];if(e instanceof FormData)return[MV(e)];if(!e)return[void 0]}catch(t){return At&&Pt.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return At&&Pt.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Aw(e,t){if(!e)return{headers:{},size:void 0,_meta:{warnings:[t]}};const n={...e._meta},r=n.warnings||[];return n.warnings=[...r,t],e._meta=n,e}function zV(e,t){if(!t)return null;const{startTimestamp:n,endTimestamp:r,url:a,method:o,statusCode:i,request:s,response:c}=t;return{type:e,start:n/1e3,end:r/1e3,name:a,data:Pc({method:o,statusCode:i,request:s,response:c})}}function h_(e){return{headers:{},size:e,_meta:{warnings:["URL_SKIPPED"]}}}function _p(e,t,n){if(!t&&0===Object.keys(e).length)return;if(!t)return{headers:e};if(!n)return{headers:e,size:t};const r={headers:e,size:t},{body:a,warnings:o}=Tme(n);return r.body=a,o&&o.length>0&&(r._meta={warnings:o}),r}function yR(e,t){return Object.entries(e).reduce(((n,[r,a])=>{const o=r.toLowerCase();return t.includes(o)&&e[r]&&(n[o]=a),n}),{})}function MV(e){return new URLSearchParams(e).toString()}function Tme(e){if(!e||"string"!=typeof e)return{body:e};const t=e.length>AD,n=Ime(e);if(t){const t=e.slice(0,AD);return n?{body:t,warnings:["MAYBE_JSON_TRUNCATED"]}:{body:`${t}…`,warnings:["TEXT_TRUNCATED"]}}if(n)try{return{body:JSON.parse(e)}}catch{}return{body:e}}function Ime(e){const t=e[0],n=e[e.length-1];return"["===t&&"]"===n||"{"===t&&"}"===n}function Tw(e,t){return hfe(Pme(e),t)}function Pme(e,t=Xn.document.baseURI){if(e.startsWith("http://")||e.startsWith("https://")||e.startsWith(Xn.location.origin))return e;const n=new URL(e,t);if(n.origin!==new URL(t).origin)return e;const r=n.href;return!e.endsWith("/")&&r.endsWith("/")?r.slice(0,-1):r}async function $me(e,t,n){try{const r=zV("resource.fetch",await zme(e,t,n));PV(n.replay,r)}catch(e){At&&Pt.exception(e,"Failed to capture fetch breadcrumb")}}function Ome(e,t){const{input:n,response:r}=t,a=Yk(n?DV(n):void 0),o=r?$V(r.headers.get("content-length")):void 0;void 0!==a&&(e.data.request_body_size=a),void 0!==o&&(e.data.response_body_size=o)}async function zme(e,t,n){const r=Date.now(),{startTimestamp:a=r,endTimestamp:o=r}=t,{url:i,method:s,status_code:c=0,request_body_size:l,response_body_size:u}=e.data,f=Tw(i,n.networkDetailAllowUrls)&&!Tw(i,n.networkDetailDenyUrls);return{startTimestamp:a,endTimestamp:o,url:i,method:s,statusCode:c,request:f?Mme(n,t.input,l):h_(l),response:await Dme(f,n,t.response,u)}}function Mme({networkCaptureBodies:e,networkRequestHeaders:t},n,r){const a=n?jme(n,t):{};if(!e)return _p(a,r,void 0);const o=DV(n),[i,s]=OV(o),c=_p(a,r,i);return s?Aw(c,s):c}async function Dme(e,{networkCaptureBodies:t,networkResponseHeaders:n},r,a){if(!e&&void 0!==a)return h_(a);const o=r?NV(r.headers,n):{};if(!r||!t&&void 0!==a)return _p(o,a,void 0);const[i,s]=await Lme(r),c=Nme(i,{networkCaptureBodies:t,responseBodySize:a,captureDetails:e,headers:o});return s?Aw(c,s):c}function Nme(e,{networkCaptureBodies:t,responseBodySize:n,captureDetails:r,headers:a}){try{const o=e&&e.length&&void 0===n?Yk(e):n;return r?_p(a,o,t?e:void 0):h_(o)}catch(e){return At&&Pt.exception(e,"Failed to serialize response body"),_p(a,n,void 0)}}async function Lme(e){const t=Fme(e);if(!t)return[void 0,"BODY_PARSE_ERROR"];try{return[await Bme(t)]}catch(e){return e instanceof Error&&e.message.indexOf("Timeout")>-1?(At&&Pt.warn("Parsing text body from response timed out"),[void 0,"BODY_PARSE_TIMEOUT"]):(At&&Pt.exception(e,"Failed to get text body from response"),[void 0,"BODY_PARSE_ERROR"])}}function DV(e=[]){if(2===e.length&&"object"==typeof e[1])return e[1].body}function NV(e,t){const n={};return t.forEach((t=>{e.get(t)&&(n[t]=e.get(t))})),n}function jme(e,t){return 1===e.length&&"string"!=typeof e[0]?QD(e[0],t):2===e.length?QD(e[1],t):{}}function QD(e,t){if(!e)return{};const n=e.headers;return n?n instanceof Headers?NV(n,t):Array.isArray(n)?{}:yR(n,t):{}}function Fme(e){try{return e.clone()}catch(e){At&&Pt.exception(e,"Failed to clone response body")}}function Bme(e){return new Promise(((t,n)=>{const r=P1((()=>n(new Error("Timeout while trying to read response body"))),500);Vme(e).then((e=>t(e)),(e=>n(e))).finally((()=>clearTimeout(r)))}))}async function Vme(e){return await e.text()}async function Ume(e,t,n){try{const r=zV("resource.xhr",Wme(e,t,n));PV(n.replay,r)}catch(e){At&&Pt.exception(e,"Failed to capture xhr breadcrumb")}}function qme(e,t){const{xhr:n,input:r}=t;if(!n)return;const a=Yk(r),o=n.getResponseHeader("content-length")?$V(n.getResponseHeader("content-length")):Qme(n.response,n.responseType);void 0!==a&&(e.data.request_body_size=a),void 0!==o&&(e.data.response_body_size=o)}function Wme(e,t,n){const r=Date.now(),{startTimestamp:a=r,endTimestamp:o=r,input:i,xhr:s}=t,{url:c,method:l,status_code:u=0,request_body_size:f,response_body_size:d}=e.data;if(!c)return null;if(!s||!Tw(c,n.networkDetailAllowUrls)||Tw(c,n.networkDetailDenyUrls)){return{startTimestamp:a,endTimestamp:o,url:c,method:l,statusCode:u,request:h_(f),response:h_(d)}}const p=s[Dde],h=p?yR(p.request_headers,n.networkRequestHeaders):{},m=yR(Hme(s),n.networkResponseHeaders),[y,g]=n.networkCaptureBodies?OV(i):[void 0],[v,b]=n.networkCaptureBodies?Gme(s):[void 0],_=_p(h,f,y),w=_p(m,d,v);return{startTimestamp:a,endTimestamp:o,url:c,method:l,statusCode:u,request:g?Aw(_,g):_,response:b?Aw(w,b):w}}function Hme(e){const t=e.getAllResponseHeaders();return t?t.split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return r&&(e[n.toLowerCase()]=r),e}),{}):{}}function Gme(e){const t=[];try{return[e.responseText]}catch(e){t.push(e)}try{return Kme(e.response,e.responseType)}catch(e){t.push(e)}return At&&Pt.warn("Failed to get xhr response body",...t),[void 0]}function Kme(e,t){try{if("string"==typeof e)return[e];if(e instanceof Document)return[e.body.outerHTML];if("json"===t&&e&&"object"==typeof e)return[JSON.stringify(e)];if(!e)return[void 0]}catch(t){return At&&Pt.exception(t,"Failed to serialize body",e),[void 0,"BODY_PARSE_ERROR"]}return At&&Pt.info("Skipping network body because of body type",e),[void 0,"UNPARSEABLE_BODY_TYPE"]}function Qme(e,t){try{return Yk("json"===t&&e&&"object"==typeof e?JSON.stringify(e):e)}catch{return}}function Yme(e){const t=ef();try{const{networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:a,networkRequestHeaders:o,networkResponseHeaders:i}=e.getOptions(),s={replay:e,networkDetailAllowUrls:n,networkDetailDenyUrls:r,networkCaptureBodies:a,networkRequestHeaders:o,networkResponseHeaders:i};t&&t.on("beforeAddBreadcrumb",((e,t)=>Zme(s,e,t)))}catch{}}function Zme(e,t,n){if(t.data)try{Xme(t)&&ege(n)&&(qme(t,n),Ume(t,n,e)),Jme(t)&&tge(n)&&(Ome(t,n),$me(t,n,e))}catch(e){At&&Pt.exception(e,"Error when enriching network breadcrumb")}}function Xme(e){return"xhr"===e.category}function Jme(e){return"fetch"===e.category}function ege(e){return e&&e.xhr}function tge(e){return e&&e.response}function nge(e){const t=ef();Ade(Phe(e)),Ode(Rme(e)),_me(e),Yme(e);kue(Eme(e)),t&&(t.on("beforeSendEvent",gme(e)),t.on("afterSendEvent",pme(e)),t.on("createDsc",(t=>{const n=e.getSessionId();n&&e.isEnabled()&&"session"===e.recordingMode&&e.checkAndHandleExpiredSession()&&(t.replay_id=n)})),t.on("spanStart",(t=>{e.lastActiveSpan=t})),t.on("spanEnd",(t=>{e.lastActiveSpan=t})),t.on("beforeSendFeedback",((t,n)=>{const r=e.getSessionId();n&&n.includeReplay&&e.isEnabled()&&r&&t.contexts&&t.contexts.feedback&&(t.contexts.feedback.replay_id=r)})))}async function rge(e){try{return Promise.all(Qk(e,[age(Xn.performance.memory)]))}catch{return[]}}function age(e){const{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}=e,a=Date.now()/1e3;return{type:"memory",name:"memory",start:a,end:a,data:{memory:{jsHeapSizeLimit:t,totalJSHeapSize:n,usedJSHeapSize:r}}}}function oge(e,t,n){let r,a,o;const i=n.maxWait?Math.max(n.maxWait,t):0;function s(){return c(),r=e(),r}function c(){void 0!==a&&clearTimeout(a),void 0!==o&&clearTimeout(o),a=o=void 0}function l(){return a&&clearTimeout(a),a=P1(s,t),i&&void 0===o&&(o=P1(s,i)),r}return l.cancel=c,l.flush=function(){return void 0!==a||void 0!==o?s():r},l}function ige(e){let t=!1;return(n,r)=>{if(!e.checkAndHandleExpiredSession())return void(At&&Pt.warn("Received replay event after session expired."));const a=r||!t;t=!0,e.clickDetector&&Che(e.clickDetector,n),e.addUpdate((()=>{if("buffer"===e.recordingMode&&a&&e.setInitialState(),!iI(e,n,a))return!0;if(!a)return!1;const t=e.session;if(cge(e,a),"buffer"===e.recordingMode&&t&&e.eventBuffer){const n=e.eventBuffer.getEarliestTimestamp();n&&(At&&Pt.info(`Updating session start time to earliest event in buffer to ${new Date(n)}`),t.started=n,e.getOptions().stickySession&&oI(t))}return t&&t.previousSessionId||"session"===e.recordingMode&&e.flush(),!0}))}}function sge(e){const t=e.getOptions();return{type:Gt.Custom,timestamp:Date.now(),data:{tag:"options",payload:{shouldRecordCanvas:e.isRecordingCanvas(),sessionSampleRate:t.sessionSampleRate,errorSampleRate:t.errorSampleRate,useCompressionOption:t.useCompression,blockAllMedia:t.blockAllMedia,maskAllText:t.maskAllText,maskAllInputs:t.maskAllInputs,useCompression:!!e.eventBuffer&&"worker"===e.eventBuffer.type,networkDetailHasUrls:t.networkDetailAllowUrls.length>0,networkCaptureBodies:t.networkCaptureBodies,networkRequestHasHeaders:t.networkRequestHeaders.length>0,networkResponseHasHeaders:t.networkResponseHeaders.length>0}}}}function cge(e,t){!t||!e.session||0!==e.session.segmentId||iI(e,sge(e),!1)}function lge(e,t,n,r){return nue(aue(e,rue(e),r,n),[[{type:"replay_event"},e],[{type:"replay_recording",length:"string"==typeof t?(new TextEncoder).encode(t).length:t.length},t]])}function fge({recordingData:e,headers:t}){let n;const r=`${JSON.stringify(t)}\n`;if("string"==typeof e)n=`${r}${e}`;else{const t=(new TextEncoder).encode(r);n=new Uint8Array(t.length+e.length),n.set(t),n.set(e,t.length)}return n}async function uge({client:e,scope:t,replayId:n,event:r}){const a={event_id:n,integrations:"object"!=typeof e._integrations||null===e._integrations||Array.isArray(e._integrations)?void 0:Object.keys(e._integrations)};e.emit("preprocessEvent",r,a);const o=await due(e.getOptions(),r,a,t,e,X_());if(!o)return null;o.platform=o.platform||"javascript";const i=e.getSdkMetadata(),{name:s,version:c}=i&&i.sdk||{};return o.sdk={...o.sdk,name:s||"sentry.javascript.unknown",version:c||"0.0.0"},o}async function dge({recordingData:e,replayId:t,segmentId:n,eventContext:r,timestamp:a,session:o}){const i=fge({recordingData:e,headers:{segment_id:n}}),{urls:s,errorIds:c,traceIds:l,initialTimestamp:u}=r,f=ef(),d=J1(),p=f&&f.getTransport(),h=f&&f.getDsn();if(!(f&&p&&h&&o.sampled))return uD({});const m={type:Wde,replay_start_timestamp:u/1e3,timestamp:a/1e3,error_ids:c,trace_ids:l,urls:s,replay_id:t,segment_id:n,replay_type:o.sampled},y=await uge({scope:d,client:f,replayId:t,event:m});if(!y)return f.recordDroppedEvent("event_processor","replay",m),At&&Pt.info("An event processor returned `null`, will not send event."),uD({});delete y.sdkProcessingMetadata;const g=lge(y,i,h,f.getOptions().tunnel);let v;try{v=await p.send(g)}catch(e){const t=new Error(QT);try{t.cause=e}catch{}throw t}if("number"==typeof v.statusCode&&(v.statusCode<200||v.statusCode>=300))throw new LV(v.statusCode);const b=Rue({},v);if(Cue(b,"replay"))throw new cI(b);return v}class LV extends Error{constructor(e){super(`Transport returned status code ${e}`)}}class cI extends Error{constructor(e){super("Rate limit hit"),this.rateLimits=e}}async function jV(e,t={count:0,interval:Zde}){const{recordingData:n,onError:r}=e;if(n.length)try{return await dge(e),!0}catch(n){if(n instanceof LV||n instanceof cI)throw n;if(bue("Replays",{_retryCount:t.count}),r&&r(n),t.count>=3){const e=new Error(`${QT} - max retries exceeded`);try{e.cause=n}catch{}throw e}return t.interval*=++t.count,new Promise(((n,r)=>{P1((async()=>{try{await jV(e,t),n(!0)}catch(e){r(e)}}),t.interval)}))}}const FV="__THROTTLED",pge="__SKIPPED";function hge(e,t,n){const r=new Map;let a=!1;return(...o)=>{const i=Math.floor(Date.now()/1e3);if((e=>{const t=e-n;r.forEach(((e,n)=>{n<t&&r.delete(n)}))})(i),[...r.values()].reduce(((e,t)=>e+t),0)>=t){const e=a;return a=!0,e?pge:FV}a=!1;const s=r.get(i)||0;return r.set(i,s+1),e(...o)}}class fp{constructor({options:e,recordingOptions:t}){fp.prototype.__init.call(this),fp.prototype.__init2.call(this),fp.prototype.__init3.call(this),fp.prototype.__init4.call(this),fp.prototype.__init5.call(this),fp.prototype.__init6.call(this),this.eventBuffer=null,this.performanceEntries=[],this.replayPerformanceEntries=[],this.recordingMode="session",this.timeouts={sessionIdlePause:Hde,sessionIdleExpire:Gde},this._lastActivity=Date.now(),this._isEnabled=!1,this._isPaused=!1,this._requiresManualStart=!1,this._hasInitializedCoreListeners=!1,this._context={errorIds:new Set,traceIds:new Set,urls:[],initialTimestamp:Date.now(),initialUrl:""},this._recordingOptions=t,this._options=e,this._debouncedFlush=oge((()=>this._flush()),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._throttledAddEvent=hge(((e,t)=>fme(this,e,t)),300,5);const{slowClickTimeout:n,slowClickIgnoreSelectors:r}=this.getOptions(),a=n?{threshold:Math.min(Jde,n),timeout:n,scrollTimeout:300,ignoreSelector:r?r.join(","):""}:void 0;if(a&&(this.clickDetector=new khe(this,a)),At){const t=e._experiments;Pt.setConfig({captureExceptions:!!t.captureExceptions,traceInternals:!!t.traceInternals})}}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}isRecordingCanvas(){return!!this._canvas}getOptions(){return this._options}handleException(e){At&&Pt.exception(e),this._options.onError&&this._options.onError(e)}initializeSampling(e){const{errorSampleRate:t,sessionSampleRate:n}=this._options,r=t<=0&&n<=0;if(this._requiresManualStart=r,!r){if(this._initializeSessionForSampling(e),!this.session)return void(At&&Pt.exception(new Error("Unable to initialize and create session")));!1!==this.session.sampled&&(this.recordingMode="buffer"===this.session.sampled&&0===this.session.segmentId?"buffer":"session",At&&Pt.infoTick(`Starting replay in ${this.recordingMode} mode`),this._initializeRecording())}}start(){if(this._isEnabled&&"session"===this.recordingMode)return void(At&&Pt.info("Recording is already in progress"));if(this._isEnabled&&"buffer"===this.recordingMode)return void(At&&Pt.info("Buffering is in progress, call `flush()` to save the replay"));At&&Pt.infoTick("Starting replay in session mode"),this._updateUserActivity();const e=q4({maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire},{stickySession:this._options.stickySession,sessionSampleRate:1,allowBuffering:!1});this.session=e,this._initializeRecording()}startBuffering(){if(this._isEnabled)return void(At&&Pt.info("Buffering is in progress, call `flush()` to save the replay"));At&&Pt.infoTick("Starting replay in buffer mode");const e=q4({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration},{stickySession:this._options.stickySession,sessionSampleRate:0,allowBuffering:!0});this.session=e,this.recordingMode="buffer",this._initializeRecording()}startRecording(){try{const e=this._canvas;this._stopRecording=_u({...this._recordingOptions,..."buffer"===this.recordingMode?{checkoutEveryNms:Yde}:this._options._experiments.continuousCheckout&&{checkoutEveryNms:Math.max(36e4,this._options._experiments.continuousCheckout)},emit:ige(this),onMutation:this._onMutationHandler,...e?{recordCanvas:e.recordCanvas,getCanvasManager:e.getCanvasManager,sampling:e.sampling,dataURLOptions:e.dataURLOptions}:{}})}catch(e){this.handleException(e)}}stopRecording(){try{return this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0),!0}catch(e){return this.handleException(e),!1}}async stop({forceFlush:e=!1,reason:t}={}){if(this._isEnabled){this._isEnabled=!1;try{At&&Pt.info("Stopping Replay"+(t?` triggered by ${t}`:"")),IV(),this._removeListeners(),this.stopRecording(),this._debouncedFlush.cancel(),e&&await this._flush({force:!0}),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,ome(this)}catch(e){this.handleException(e)}}}pause(){this._isPaused||(this._isPaused=!0,this.stopRecording(),At&&Pt.info("Pausing replay"))}resume(){!this._isPaused||!this._checkSession()||(this._isPaused=!1,this.startRecording(),At&&Pt.info("Resuming replay"))}async sendBufferedReplayOrFlush({continueRecording:e=!0}={}){if("session"===this.recordingMode)return this.flushImmediate();const t=Date.now();At&&Pt.info("Converting buffer to session"),await this.flushImmediate();const n=this.stopRecording();!e||!n||"session"!==this.recordingMode&&(this.recordingMode="session",this.session&&(this._updateUserActivity(t),this._updateSessionActivity(t),this._maybeSaveSession()),this.startRecording())}addUpdate(e){const t=e();"buffer"!==this.recordingMode&&!0!==t&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._checkSession())return;this.resume()}}updateUserActivity(){this._updateUserActivity(),this._updateSessionActivity()}conditionalFlush(){return"buffer"===this.recordingMode?Promise.resolve():this.flushImmediate()}flush(){return this._debouncedFlush()}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}cancelFlush(){this._debouncedFlush.cancel()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){if(!(this._lastActivity&&mR(this._lastActivity,this.timeouts.sessionIdlePause)&&this.session&&"session"===this.session.sampled))return!!this._checkSession();this.pause()}setInitialState(){const e=`${Xn.location.pathname}${Xn.location.hash}${Xn.location.search}`,t=`${Xn.location.origin}${e}`;this.performanceEntries=[],this.replayPerformanceEntries=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}throttledAddEvent(e,t){const n=this._throttledAddEvent(e,t);if(n===FV){const e=jl({category:"replay.throttled"});this.addUpdate((()=>!iI(this,{type:5,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e,metric:!0}})))}return n}getCurrentRoute(){const e=this.lastActiveSpan||MB(),t=e&&qT(e),n=(t&&l_(t).data||{})[zB];if(t&&n&&["route","custom"].includes(n))return l_(t).description}_initializeRecording(){this.setInitialState(),this._updateSessionActivity(),this.eventBuffer=nme({useCompression:this._options.useCompression,workerUrl:this._options.workerUrl}),this._removeListeners(),this._addListeners(),this._isEnabled=!0,this._isPaused=!1,this.startRecording()}_initializeSessionForSampling(e){const t=this._options.errorSampleRate>0,n=q4({sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration,previousSessionId:e},{stickySession:this._options.stickySession,sessionSampleRate:this._options.sessionSampleRate,allowBuffering:t});this.session=n}_checkSession(){if(!this.session)return!1;const e=this.session;return!CV(e,{sessionIdleExpire:this.timeouts.sessionIdleExpire,maxReplayDuration:this._options.maxReplayDuration})||(this._refreshSession(e),!1)}async _refreshSession(e){this._isEnabled&&(await this.stop({reason:"refresh session"}),this.initializeSampling(e.id))}_addListeners(){try{Xn.document.addEventListener("visibilitychange",this._handleVisibilityChange),Xn.addEventListener("blur",this._handleWindowBlur),Xn.addEventListener("focus",this._handleWindowFocus),Xn.addEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.addListeners(),this._hasInitializedCoreListeners||(nge(this),this._hasInitializedCoreListeners=!0)}catch(e){this.handleException(e)}this._performanceCleanupCallback=Qhe(this)}_removeListeners(){try{Xn.document.removeEventListener("visibilitychange",this._handleVisibilityChange),Xn.removeEventListener("blur",this._handleWindowBlur),Xn.removeEventListener("focus",this._handleWindowFocus),Xn.removeEventListener("keydown",this._handleKeyboardEvent),this.clickDetector&&this.clickDetector.removeListeners(),this._performanceCleanupCallback&&this._performanceCleanupCallback()}catch(e){this.handleException(e)}}__init(){this._handleVisibilityChange=()=>{"visible"===Xn.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init2(){this._handleWindowBlur=()=>{const e=jl({category:"ui.blur"});this._doChangeToBackgroundTasks(e)}}__init3(){this._handleWindowFocus=()=>{const e=jl({category:"ui.focus"});this._doChangeToForegroundTasks(e)}}__init4(){this._handleKeyboardEvent=e=>{Mhe(this,e)}}_doChangeToBackgroundTasks(e){!this.session||EV(this.session,{maxReplayDuration:this._options.maxReplayDuration,sessionIdleExpire:this.timeouts.sessionIdleExpire})||(e&&this._createCustomBreadcrumb(e),this.conditionalFlush())}_doChangeToForegroundTasks(e){this.session&&(this.checkAndHandleExpiredSession()?e&&this._createCustomBreadcrumb(e):At&&Pt.info("Document has become active, but session has expired"))}_updateUserActivity(e=Date.now()){this._lastActivity=e}_updateSessionActivity(e=Date.now()){this.session&&(this.session.lastActivity=e,this._maybeSaveSession())}_createCustomBreadcrumb(e){this.addUpdate((()=>{this.throttledAddEvent({type:Gt.Custom,timestamp:e.timestamp||0,data:{tag:"breadcrumb",payload:e}})}))}_addPerformanceEntries(){let e=jhe(this.performanceEntries).concat(this.replayPerformanceEntries);if(this.performanceEntries=[],this.replayPerformanceEntries=[],this._requiresManualStart){const t=this._context.initialTimestamp/1e3;e=e.filter((e=>e.start>=t))}return Promise.all(Qk(this,e))}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[]}_updateInitialTimestampFromEventBuffer(){const{session:e,eventBuffer:t}=this;if(!e||!t||this._requiresManualStart||e.segmentId)return;const n=t.getEarliestTimestamp();n&&n<this._context.initialTimestamp&&(this._context.initialTimestamp=n)}_popEventContext(){const e={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds),traceIds:Array.from(this._context.traceIds),urls:this._context.urls};return this._clearContext(),e}async _runFlush(){const e=this.getSessionId();if(this.session&&this.eventBuffer&&e){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await rge(this),this.eventBuffer&&e===this.getSessionId()))try{this._updateInitialTimestampFromEventBuffer();const t=Date.now();if(t-this._context.initialTimestamp>this._options.maxReplayDuration+3e4)throw new Error("Session is too long, not sending replay");const n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession();const a=await this.eventBuffer.finish();await jV({replayId:e,recordingData:a,segmentId:r,eventContext:n,session:this.session,timestamp:t,onError:e=>this.handleException(e)})}catch(e){this.handleException(e),this.stop({reason:"sendReplay"});const t=ef();if(t){const n=e instanceof cI?"ratelimit_backoff":"send_error";t.recordDroppedEvent(n,"replay")}}}else At&&Pt.error("No session or eventBuffer found to flush.")}__init5(){this._flush=async({force:e=!1}={})=>{if(!this._isEnabled&&!e)return;if(!this.checkAndHandleExpiredSession())return void(At&&Pt.error("Attempting to finish replay event after session expired."));if(!this.session)return;const t=this.session.started,n=Date.now()-t;this._debouncedFlush.cancel();const r=n<this._options.minReplayDuration,a=n>this._options.maxReplayDuration+5e3;if(r||a)return At&&Pt.info(`Session duration (${Math.floor(n/1e3)}s) is too ${r?"short":"long"}, not sending replay.`),void(r&&this._debouncedFlush());const o=this.eventBuffer;o&&0===this.session.segmentId&&!o.hasCheckout&&At&&Pt.info("Flushing initial segment without checkout.");const i=!!this._flushLock;this._flushLock||(this._flushLock=this._runFlush());try{await this._flushLock}catch(e){this.handleException(e)}finally{this._flushLock=void 0,i&&this._debouncedFlush()}}}_maybeSaveSession(){this.session&&this._options.stickySession&&oI(this.session)}__init6(){this._onMutationHandler=e=>{const t=e.length,n=this._options.mutationLimit,r=n&&t>n;if(t>this._options.mutationBreadcrumbLimit||r){const e=jl({category:"replay.mutations",data:{count:t,limit:r}});this._createCustomBreadcrumb(e)}return!r||(this.stop({reason:"mutationLimit",forceFlush:"session"===this.recordingMode}),!1)}}}function sy(e,t){return[...e,...t].join(",")}function mge({mask:e,unmask:t,block:n,unblock:r,ignore:a}){return{maskTextSelector:sy(e,[".sentry-mask","[data-sentry-mask]"]),unmaskTextSelector:sy(t,[]),blockSelector:sy(n,[".sentry-block","[data-sentry-block]","base","iframe[srcdoc]:not([src])"]),unblockSelector:sy(r,[]),ignoreSelector:sy(a,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'])}}function gge({el:e,key:t,maskAttributes:n,maskAllText:r,privacyOptions:a,value:o}){return!r||a.unmaskTextSelector&&e.matches(a.unmaskTextSelector)?o:n.includes(t)||"value"===t&&"INPUT"===e.tagName&&["submit","button"].includes(e.getAttribute("type")||"")?o.replace(/[\S]/g,"*"):o}const YD='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]',yge=["content-length","content-type","accept"];let ZD=!1;const _ge=e=>new Zk(e);class Zk{static __initStatic(){this.id="Replay"}constructor({flushMinDelay:e=Kde,flushMaxDelay:t=Qde,minReplayDuration:n=tpe,maxReplayDuration:r=TD,stickySession:a=!0,useCompression:o=!0,workerUrl:i,_experiments:s={},maskAllText:c=!0,maskAllInputs:l=!0,blockAllMedia:u=!0,mutationBreadcrumbLimit:f=750,mutationLimit:d=1e4,slowClickTimeout:p=7e3,slowClickIgnoreSelectors:h=[],networkDetailAllowUrls:m=[],networkDetailDenyUrls:y=[],networkCaptureBodies:g=!0,networkRequestHeaders:v=[],networkResponseHeaders:b=[],mask:_=[],maskAttributes:w=["title","placeholder"],unmask:k=[],block:x=[],unblock:S=[],ignore:E=[],maskFn:A,beforeAddRecordingEvent:z,beforeErrorSampling:C,onError:I}={}){this.name=Zk.id;const T=mge({mask:_,unmask:k,block:x,unblock:S,ignore:E});if(this._recordingOptions={maskAllInputs:l,maskAllText:c,maskInputOptions:{password:!0},maskTextFn:A,maskInputFn:A,maskAttributeFn:(e,t,n)=>gge({maskAttributes:w,maskAllText:c,privacyOptions:T,key:e,value:t,el:n}),...T,slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0,errorHandler:e=>{try{e.__rrweb__=!0}catch{}}},this._initialOptions={flushMinDelay:e,flushMaxDelay:t,minReplayDuration:Math.min(n,npe),maxReplayDuration:Math.min(r,TD),stickySession:a,useCompression:o,workerUrl:i,blockAllMedia:u,maskAllInputs:l,maskAllText:c,mutationBreadcrumbLimit:f,mutationLimit:d,slowClickTimeout:p,slowClickIgnoreSelectors:h,networkDetailAllowUrls:m,networkDetailDenyUrls:y,networkCaptureBodies:g,networkRequestHeaders:XD(v),networkResponseHeaders:XD(b),beforeAddRecordingEvent:z,beforeErrorSampling:C,onError:I,_experiments:s},this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${YD}`:YD),this._isInitialized&&xD())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return ZD}set _isInitialized(e){ZD=e}afterAllSetup(e){!xD()||this._replay||(this._setup(e),this._initialize(e))}start(){this._replay&&this._replay.start()}startBuffering(){this._replay&&this._replay.startBuffering()}stop(){return this._replay?this._replay.stop({forceFlush:"session"===this._replay.recordingMode}):Promise.resolve()}flush(e){return this._replay?this._replay.isEnabled()?this._replay.sendBufferedReplayOrFlush(e):(this._replay.start(),Promise.resolve()):Promise.resolve()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}getRecordingMode(){if(this._replay&&this._replay.isEnabled())return this._replay.recordingMode}_initialize(e){this._replay&&(this._maybeLoadFromReplayCanvasIntegration(e),this._replay.initializeSampling())}_setup(e){const t=vge(this._initialOptions,e);this._replay=new fp({options:t,recordingOptions:this._recordingOptions})}_maybeLoadFromReplayCanvasIntegration(e){try{const t=e.getIntegrationByName("ReplayCanvas");if(!t)return;this._replay._canvas=t.getOptions()}catch{}}}function vge(e,t){const n=t.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...Pc(e)},a=_D(n.replaysSessionSampleRate),o=_D(n.replaysOnErrorSampleRate);return null==a&&null==o&&NT((()=>{console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set.")})),null!=a&&(r.sessionSampleRate=a),null!=o&&(r.errorSampleRate=o),r}function XD(e){return[...yge,...e.map((e=>e.toLowerCase()))]}Zk.__initStatic();const BV=()=>"object"!=typeof window;var bge={USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.16.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.0",npm_config_npm_version:"10.9.2",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.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.16.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.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/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.16.0/bin",TURBO_HASH:"e4a68314798a2e38",NODE:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_package_name:"@wellesley/settings",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:"tsc && vite build",SHELL:"/bin/bash",npm_package_version:"1.0.173",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.16.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",EDITOR:"vi",NODE_ENV:"production",APP_NAME:"@wellesley/settings"};BV()||(window.build=bge.BUILD_NUMBER),_ge(),Fde(),Due();const JD={data:null,isError:!1,isPending:!1,isSuccess:!1},fa=ua({name:"user",initialState:JD,reducers:{reset:e=>{Object.assign(e,JD)},setData:(e,{payload:t})=>{e.data=t},updateData:(e,{payload:t})=>{e.data&&Object.assign(e.data,t)},setSuccess:(e,{payload:t})=>{e.isSuccess=t},setPending:(e,{payload:t})=>{e.isPending=t},setIsError:(e,{payload:t})=>{e.isError=t},setError:(e,{payload:t})=>{e.error=t},updateUser:(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,selectIsAdmin:e=>{var t;return"ADMIN"===(null==(t=e.data)?void 0:t.account.role)}}}),wge=(...e)=>{let t="";for(const n of e){if(n instanceof Error){const e=n;return wue("exceptionMessage",t),void WT(e)}if("object"!=typeof n)t+=n;else try{t+=" "+JSON.stringify(n)}catch{t+=" "+n}}vue(t)},eN=["debug","info","warn","error"],kge=(e,t)=>{const n=eN.indexOf(e);return eN.indexOf(t)>=n},vb=(e,t,n,...r)=>{kge(t,e)&&console.log(`[${e}] ${n}`,...r)},xge=()=>null==window?void 0:window.localStorage.getItem("logger_lvl"),Sge=(e=!BV()&&xge()||"warn")=>{let t=e;return{debug:(e,...n)=>vb("debug",t,e,...n),info:(e,...n)=>vb("info",t,e,...n),warn:(e,...n)=>vb("warn",t,e,...n),error:(e,...n)=>(wge(e,...n),vb("error",t,e,...n)),setLevel:e=>{t=e},getLevel:()=>t}},ku=Sge();var Ege={USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.16.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.0",npm_config_npm_version:"10.9.2",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.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.16.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.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/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.16.0/bin",TURBO_HASH:"e4a68314798a2e38",NODE:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_package_name:"@wellesley/settings",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:"tsc && vite build",SHELL:"/bin/bash",npm_package_version:"1.0.173",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.16.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",EDITOR:"vi",NODE_ENV:"production",APP_NAME:"@wellesley/settings"},VV=(e=>(e.uninitialized="uninitialized",e.pending="pending",e.fulfilled="fulfilled",e.rejected="rejected",e))(VV||{});function Cge(e){return{status:e,isUninitialized:"uninitialized"===e,isLoading:"pending"===e,isSuccess:"fulfilled"===e,isError:"rejected"===e}}function Rge(e){return new RegExp("(^|:)//").test(e)}var Age=e=>e.replace(/\/$/,""),Tge=e=>e.replace(/^\//,"");function Ige(e,t){if(!e)return t;if(!t)return e;if(Rge(t))return t;const n=e.endsWith("/")||!t.startsWith("?")?"/":"";return`${e=Age(e)}${n}${t=Tge(t)}`}var tN=e=>[].concat(...e);function Pge(){return typeof navigator>"u"||void 0===navigator.onLine||navigator.onLine}function $ge(){return typeof document>"u"||"hidden"!==document.visibilityState}var nN=Vl;function UV(e,t){if(e===t||!(nN(e)&&nN(t)||Array.isArray(e)&&Array.isArray(t)))return t;const n=Object.keys(t),r=Object.keys(e);let a=n.length===r.length;const o=Array.isArray(t)?[]:{};for(const r of n)o[r]=UV(e[r],t[r]),a&&(a=e[r]===o[r]);return a?e:o}var rN=(...e)=>fetch(...e),Oge=e=>e.status>=200&&e.status<=299,zge=e=>/ion\/(vnd\.api\+)?json/.test(e.get("content-type")||"");function aN(e){if(!Vl(e))return e;const t={...e};for(const[e,n]of Object.entries(t))void 0===n&&delete t[e];return t}function Mge({baseUrl:e,prepareHeaders:t=e=>e,fetchFn:n=rN,paramsSerializer:r,isJsonContentType:a=zge,jsonContentType:o="application/json",jsonReplacer:i,timeout:s,responseHandler:c,validateStatus:l,...u}={}){return typeof fetch>"u"&&n===rN&&console.warn("Warning: `fetch` is not available. Please supply a custom `fetchFn` property to use `fetchBaseQuery` on SSR environments."),async(d,p)=>{const{signal:h,getState:m,extra:y,endpoint:g,forced:v,type:b}=p;let _,{url:w,headers:k=new Headers(u.headers),params:x,responseHandler:S=c??"json",validateStatus:E=l??Oge,timeout:A=s,...z}="string"==typeof d?{url:d}:d,C={...u,signal:h,...z};k=new Headers(aN(k)),C.headers=await t(k,{getState:m,extra:y,endpoint:g,forced:v,type:b})||k;const I=e=>"object"==typeof e&&(Vl(e)||Array.isArray(e)||"function"==typeof e.toJSON);if(!C.headers.has("content-type")&&I(C.body)&&C.headers.set("content-type",o),I(C.body)&&a(C.headers)&&(C.body=JSON.stringify(C.body,i)),x){const e=~w.indexOf("?")?"&":"?";w+=e+(r?r(x):new URLSearchParams(aN(x)))}w=Ige(e,w);const T=new Request(w,C);_={request:new Request(w,C)};let R,P=!1,j=A&&setTimeout((()=>{P=!0,p.abort()}),A);try{R=await n(T)}catch(e){return{error:{status:P?"TIMEOUT_ERROR":"FETCH_ERROR",error:String(e)},meta:_}}finally{j&&clearTimeout(j)}const O=R.clone();_.response=O;let N,M="";try{let e;if(await Promise.all([f(R,S).then((e=>N=e),(t=>e=t)),O.text().then((e=>M=e),(()=>{}))]),e)throw e}catch(e){return{error:{status:"PARSING_ERROR",originalStatus:R.status,data:M,error:String(e)},meta:_}}return E(R,N)?{data:N,meta:_}:{error:{status:R.status,data:N},meta:_}};async function f(e,t){if("function"==typeof t)return t(e);if("content-type"===t&&(t=a(e.headers)?"json":"text"),"json"===t){const t=await e.text();return t.length?JSON.parse(t):null}return e.text()}}var oN=class{constructor(e,t=void 0){this.value=e,this.meta=t}},lI=Ir("__rtkq/focused"),qV=Ir("__rtkq/unfocused"),fI=Ir("__rtkq/online"),WV=Ir("__rtkq/offline");function HV(e){return"query"===e.type}function Dge(e){return"mutation"===e.type}function uI(e,t,n,r,a,o){return Nge(e)?e(t,n,r,a).map(_R).map(o):Array.isArray(e)?e.map(_R).map(o):[]}function Nge(e){return"function"==typeof e}function _R(e){return"string"==typeof e?{type:e}:e}function iN(e){return null!=e}function b1(e){let t=0;for(const n in e)t++;return t}function Lge(e,t){return e.catch(t)}var m_=Symbol("forceQueryFn"),vR=e=>"function"==typeof e[m_];function jge({serializeQueryArgs:e,queryThunk:t,mutationThunk:n,api:r,context:a}){const o=new Map,i=new Map,{unsubscribeQueryResult:s,removeMutationResult:c,updateSubscriptionOptions:l}=r.internalActions;return{buildInitiateQuery:function(n,a){const i=(c,{subscribe:u=!0,forceRefetch:f,subscriptionOptions:d,[m_]:p,...h}={})=>(m,y)=>{var g;const v=e({queryArgs:c,endpointDefinition:a,endpointName:n}),b=t({...h,type:"query",subscribe:u,forceRefetch:f,subscriptionOptions:d,endpointName:n,originalArgs:c,queryCacheKey:v,[m_]:p}),_=r.endpoints[n].select(c),w=m(b),k=_(y()),{requestId:x,abort:S}=w,E=k.requestId!==x,A=null==(g=o.get(m))?void 0:g[v],z=()=>_(y()),C=Object.assign(p?w.then(z):E&&!A?Promise.resolve(k):Promise.all([A,w]).then(z),{arg:c,requestId:x,subscriptionOptions:d,queryCacheKey:v,abort:S,async unwrap(){const e=await C;if(e.isError)throw e.error;return e.data},refetch:()=>m(i(c,{subscribe:!1,forceRefetch:!0})),unsubscribe(){u&&m(s({queryCacheKey:v,requestId:x}))},updateSubscriptionOptions(e){C.subscriptionOptions=e,m(l({endpointName:n,requestId:x,queryCacheKey:v,options:e}))}});if(!A&&!E&&!p){const e=o.get(m)||{};e[v]=C,o.set(m,e),C.then((()=>{delete e[v],b1(e)||o.delete(m)}))}return C};return i},buildInitiateMutation:function(e){return(t,{track:r=!0,fixedCacheKey:a}={})=>(o,s)=>{const l=n({type:"mutation",endpointName:e,originalArgs:t,track:r,fixedCacheKey:a}),u=o(l),{requestId:f,abort:d,unwrap:p}=u,h=Lge(u.unwrap().then((e=>({data:e}))),(e=>({error:e}))),m=Object.assign(h,{arg:u.arg,requestId:f,abort:d,unwrap:p,reset:()=>{o(c({requestId:f,fixedCacheKey:a}))}}),y=i.get(o)||{};return i.set(o,y),y[f]=m,m.then((()=>{delete y[f],b1(y)||i.delete(o)})),a&&(y[a]=m,m.then((()=>{y[a]===m&&(delete y[a],b1(y)||i.delete(o))}))),m}},getRunningQueryThunk:function(t,n){return r=>{var i;const s=a.endpointDefinitions[t],c=e({queryArgs:n,endpointDefinition:s,endpointName:t});return null==(i=o.get(r))?void 0:i[c]}},getRunningMutationThunk:function(e,t){return e=>{var n;return null==(n=i.get(e))?void 0:n[t]}},getRunningQueriesThunk:function(){return e=>Object.values(o.get(e)||{}).filter(iN)},getRunningMutationsThunk:function(){return e=>Object.values(i.get(e)||{}).filter(iN)}}}function sN(e){return e}function Fge({reducerPath:e,baseQuery:t,context:{endpointDefinitions:n},serializeQueryArgs:r,api:a,assertTagType:o}){const i=async(e,{signal:r,abort:a,rejectWithValue:o,fulfillWithValue:i,dispatch:c,getState:l,extra:u})=>{const f=n[e.endpointName];try{let n,o=sN;const d={signal:r,abort:a,dispatch:c,getState:l,extra:u,endpoint:e.endpointName,type:e.type,forced:"query"===e.type?s(e,l()):void 0},p="query"===e.type?e[m_]:void 0;if(p?n=p():f.query?(n=await t(f.query(e.originalArgs),d,f.extraOptions),f.transformResponse&&(o=f.transformResponse)):n=await f.queryFn(e.originalArgs,d,f.extraOptions,(e=>t(e,d,f.extraOptions))),typeof process<"u"&&Ege.NODE_ENV,n.error)throw new oN(n.error,n.meta);return i(await o(n.data,n.meta,e.originalArgs),{fulfilledTimeStamp:Date.now(),baseQueryMeta:n.meta,[u1]:!0})}catch(t){let n=t;if(n instanceof oN){let t=sN;f.query&&f.transformErrorResponse&&(t=f.transformErrorResponse);try{return o(await t(n.value,n.meta,e.originalArgs),{baseQueryMeta:n.meta,[u1]:!0})}catch(e){n=e}}throw console.error(n),n}};function s(t,n){var r,a,o;const i=null==(a=null==(r=n[e])?void 0:r.queries)?void 0:a[t.queryCacheKey],s=null==(o=n[e])?void 0:o.config.refetchOnMountOrArgChange,c=null==i?void 0:i.fulfilledTimeStamp,l=t.forceRefetch??(t.subscribe&&s);return!!l&&(!0===l||(Number(new Date)-Number(c))/1e3>=l)}const c=d9(`${e}/executeQuery`,i,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[u1]:!0}),condition(t,{getState:r}){var a,o,i;const c=r(),l=null==(o=null==(a=c[e])?void 0:a.queries)?void 0:o[t.queryCacheKey],u=null==l?void 0:l.fulfilledTimeStamp,f=t.originalArgs,d=null==l?void 0:l.originalArgs,p=n[t.endpointName];return!!vR(t)||"pending"!==(null==l?void 0:l.status)&&(!!(s(t,c)||HV(p)&&null!=(i=null==p?void 0:p.forceRefetch)&&i.call(p,{currentArg:f,previousArg:d,endpointState:l,state:c}))||!u)},dispatchConditionRejection:!0}),l=d9(`${e}/executeMutation`,i,{getPendingMeta:()=>({startedTimeStamp:Date.now(),[u1]:!0})});function u(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:c,mutationThunk:l,prefetch:(e,t,n)=>(r,o)=>{const i=(e=>"force"in e)(n)&&n.force,s=(e=>"ifOlderThan"in e)(n)&&n.ifOlderThan,c=(n=!0)=>{const r={forceRefetch:n,isPrefetch:!0};return a.endpoints[e].initiate(t,r)},l=a.endpoints[e].select(t)(o());if(i)r(c());else if(s){const e=null==l?void 0:l.fulfilledTimeStamp;if(!e)return void r(c());(Number(new Date)-Number(new Date(e)))/1e3>=s&&r(c())}else r(c(!1))},updateQueryData:(e,t,n,r=!0)=>(o,i)=>{const s=a.endpoints[e].select(t)(i());let c,l={patches:[],inversePatches:[],undo:()=>o(a.util.patchQueryData(e,t,l.inversePatches,r))};if("uninitialized"===s.status)return l;if("data"in s)if(jc(s.data)){const[e,t,r]=L8(s.data,n);l.patches.push(...t),l.inversePatches.push(...r),c=e}else c=n(s.data),l.patches.push({op:"replace",path:[],value:c}),l.inversePatches.push({op:"replace",path:[],value:s.data});return o(a.util.patchQueryData(e,t,l.patches,r)),l},upsertQueryData:(e,t,n)=>r=>r(a.endpoints[e].initiate(t,{subscribe:!1,forceRefetch:!0,[m_]:()=>({data:n})})),patchQueryData:(e,t,i,s)=>(c,l)=>{const u=n[e],f=r({queryArgs:t,endpointDefinition:u,endpointName:e});if(c(a.internalActions.queryResultPatched({queryCacheKey:f,patches:i})),!s)return;const d=a.endpoints[e].select(t)(l()),p=uI(u.providesTags,d.data,void 0,t,{},o);c(a.internalActions.updateProvidedBy({queryCacheKey:f,providedTags:p}))},buildMatchThunkActions:function(e,t){return{matchPending:Ry(ZR(e),u(t)),matchFulfilled:Ry(wp(e),u(t)),matchRejected:Ry(E1(e),u(t))}}}}function GV(e,t,n,r){return uI(n[e.meta.arg.endpointName][t],wp(e)?e.payload:void 0,Xw(e)?e.payload:void 0,e.meta.arg.originalArgs,"baseQueryMeta"in e.meta?e.meta.baseQueryMeta:void 0,r)}function bb(e,t,n){const r=e[t];r&&n(r)}function g_(e){return("arg"in e?e.arg.fixedCacheKey:e.fixedCacheKey)??e.requestId}function cN(e,t,n){const r=e[g_(t)];r&&n(r)}var cy={};function Bge({reducerPath:e,queryThunk:t,mutationThunk:n,context:{endpointDefinitions:r,apiUid:a,extractRehydrationInfo:o,hasRehydrationInfo:i},assertTagType:s,config:c}){const l=Ir(`${e}/resetApiState`),u=ua({name:`${e}/queries`,initialState:cy,reducers:{removeQueryResult:{reducer(e,{payload:{queryCacheKey:t}}){delete e[t]},prepare:X0()},queryResultPatched:{reducer(e,{payload:{queryCacheKey:t,patches:n}}){bb(e,t,(e=>{e.data=s9(e.data,n.concat())}))},prepare:X0()}},extraReducers(e){e.addCase(t.pending,((e,{meta:t,meta:{arg:n}})=>{var r;const a=vR(n);e[r=n.queryCacheKey]??(e[r]={status:"uninitialized",endpointName:n.endpointName}),bb(e,n.queryCacheKey,(e=>{e.status="pending",e.requestId=a&&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})=>{bb(e,t.arg.queryCacheKey,(e=>{if(e.requestId!==t.requestId&&!vR(t.arg))return;const{merge:a}=r[t.arg.endpointName];if(e.status="fulfilled",a)if(void 0!==e.data){const{fulfilledTimeStamp:r,arg:o,baseQueryMeta:i,requestId:s}=t;let c=M_(e.data,(e=>a(e,n,{arg:o.originalArgs,baseQueryMeta:i,fulfilledTimeStamp:r,requestId:s})));e.data=c}else e.data=n;else e.data=r[t.arg.endpointName].structuralSharing??1?UV(Lc(e.data)?DW(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:a,payload:o})=>{bb(e,n.queryCacheKey,(e=>{if(!t){if(e.requestId!==r)return;e.status="rejected",e.error=o??a}}))})).addMatcher(i,((e,t)=>{const{queries:n}=o(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)}))}}),f=ua({name:`${e}/mutations`,initialState:cy,reducers:{removeMutationResult:{reducer(e,{payload:t}){const n=g_(t);n in e&&delete e[n]},prepare:X0()}},extraReducers(e){e.addCase(n.pending,((e,{meta:t,meta:{requestId:n,arg:r,startedTimeStamp:a}})=>{r.track&&(e[g_(t)]={requestId:n,status:"pending",endpointName:r.endpointName,startedTimeStamp:a})})).addCase(n.fulfilled,((e,{payload:t,meta:n})=>{n.arg.track&&cN(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&&cN(e,r,(e=>{e.requestId===r.requestId&&(e.status="rejected",e.error=t??n)}))})).addMatcher(i,((e,t)=>{const{mutations:n}=o(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)}))}}),d=ua({name:`${e}/invalidation`,initialState:cy,reducers:{updateProvidedBy:{reducer(e,t){var n,r;const{queryCacheKey:a,providedTags:o}=t.payload;for(const t of Object.values(e))for(const e of Object.values(t)){const t=e.indexOf(a);-1!==t&&e.splice(t,1)}for(const{type:t,id:i}of o){const o=(n=e[t]??(e[t]={}))[r=i||"__internal_without_id"]??(n[r]=[]);o.includes(a)||o.push(a)}},prepare:X0()}},extraReducers(e){e.addCase(u.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(i,((e,t)=>{var n,r;const{provided:a}=o(t);for(const[t,o]of Object.entries(a))for(const[a,i]of Object.entries(o)){const o=(n=e[t]??(e[t]={}))[r=a||"__internal_without_id"]??(n[r]=[]);for(const e of i)o.includes(e)||o.push(e)}})).addMatcher(bp(wp(t),Xw(t)),((e,t)=>{const n=GV(t,"providesTags",r,s),{queryCacheKey:a}=t.meta.arg;d.caseReducers.updateProvidedBy(e,d.actions.updateProvidedBy({queryCacheKey:a,providedTags:n}))}))}}),p=ua({name:`${e}/subscriptions`,initialState:cy,reducers:{updateSubscriptionOptions(e,t){},unsubscribeQueryResult(e,t){},internal_getRTKQSubscriptions(){}}}),h=ua({name:`${e}/internalSubscriptions`,initialState:cy,reducers:{subscriptionsUpdated:{reducer:(e,t)=>s9(e,t.payload),prepare:X0()}}}),m=ua({name:`${e}/config`,initialState:{online:Pge(),focused:$ge(),middlewareRegistered:!1,...c},reducers:{middlewareRegistered(e,{payload:t}){e.middlewareRegistered="conflict"!==e.middlewareRegistered&&a===t||"conflict"}},extraReducers:e=>{e.addCase(fI,(e=>{e.online=!0})).addCase(WV,(e=>{e.online=!1})).addCase(lI,(e=>{e.focused=!0})).addCase(qV,(e=>{e.focused=!1})).addMatcher(i,(e=>({...e})))}}),y=GR({queries:u.reducer,mutations:f.reducer,provided:d.reducer,subscriptions:h.reducer,config:m.reducer});return{reducer:(e,t)=>y(l.match(t)?void 0:e,t),actions:{...m.actions,...u.actions,...p.actions,...h.actions,...f.actions,...d.actions,resetApiState:l}}}var im=Symbol.for("RTKQ/skipToken"),KV={status:"uninitialized"},lN=M_(KV,(()=>{})),fN=M_(KV,(()=>{}));function Vge({serializeQueryArgs:e,reducerPath:t,createSelector:n}){const r=e=>lN,a=e=>fN;return{buildQuerySelector:function(t,a){return s=>{const c=e({queryArgs:s,endpointDefinition:a,endpointName:t});return n(s===im?r:e=>{var t,n;return(null==(n=null==(t=i(e))?void 0:t.queries)?void 0:n[c])??lN},o)}},buildMutationSelector:function(){return e=>{let t;return t="object"==typeof e?g_(e)??im:e,n(t===im?a:e=>{var n,r;return(null==(r=null==(n=i(e))?void 0:n.mutations)?void 0:r[t])??fN},o)}},selectInvalidatedBy:function(e,n){const r=e[t],a=new Set;for(const e of n.map(_R)){const t=r.provided[e.type];if(!t)continue;let n=(void 0!==e.id?t[e.id]:tN(Object.values(t)))??[];for(const e of n)a.add(e)}return tN(Array.from(a.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 o(e){return{...e,...Cge(e.status)}}function i(e){return e[t]}}var r1=WeakMap?new WeakMap:void 0,uN=({endpointName:e,queryArgs:t})=>{let n="";const r=null==r1?void 0:r1.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,((e,t)=>Vl(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t));Vl(t)&&(null==r1||r1.set(t,e)),n=e}return`${e}(${n})`};function Uge(...e){return function(t){const n=Qy((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=uN;if("serializeQueryArgs"in e.endpointDefinition){const t=e.endpointDefinition.serializeQueryArgs;n=e=>{const n=t(e);return"string"==typeof n?n:uN({...e,queryArgs:n})}}else t.serializeQueryArgs&&(n=t.serializeQueryArgs);return n(e)},tagTypes:[...t.tagTypes||[]]},a={endpointDefinitions:{},batch(e){e()},apiUid:Yw(),extractRehydrationInfo:n,hasRehydrationInfo:Qy((e=>null!=n(e)))},o={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 a.endpointDefinitions){if("throw"===e.overrideExisting)throw new Error(Ha(39))}else{a.endpointDefinitions[n]=r;for(const e of i)e.injectEndpoint(n,r)}return o},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(a.endpointDefinitions[e]):Object.assign(a.endpointDefinitions[e]||{},n);return o}},i=e.map((e=>e.init(o,r,a)));return o.injectEndpoints({endpoints:t.endpoints})}}function qge(e){for(let t in e)return!1;return!0}var Wge=2147482.647,Hge=({reducerPath:e,api:t,context:n,internalState:r})=>{const{removeQueryResult:a,unsubscribeQueryResult:o}=t.internalActions;function i(e){const t=r.currentSubscriptions[e];return!!t&&!qge(t)}const s={};function c(e,t,r,o){const c=n.endpointDefinitions[t],l=(null==c?void 0:c.keepUnusedDataFor)??o.keepUnusedDataFor;if(l===1/0)return;const u=Math.max(0,Math.min(l,Wge));if(!i(e)){const t=s[e];t&&clearTimeout(t),s[e]=setTimeout((()=>{i(e)||r.dispatch(a({queryCacheKey:e})),delete s[e]}),1e3*u)}}return(r,a,i)=>{var l;if(o.match(r)){const t=a.getState()[e],{queryCacheKey:n}=r.payload;c(n,null==(l=t.queries[n])?void 0:l.endpointName,a,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=a.getState()[e],{queries:o}=n.extractRehydrationInfo(r);for(const[e,n]of Object.entries(o))c(e,null==n?void 0:n.endpointName,a,t.config)}}},Gge=({reducerPath:e,context:t,context:{endpointDefinitions:n},mutationThunk:r,queryThunk:a,api:o,assertTagType:i,refetchQuery:s,internalState:c})=>{const{removeQueryResult:l}=o.internalActions,u=bp(wp(r),Xw(r)),f=bp(wp(r,a),E1(r,a));let d=[];function p(n,r){const a=r.getState(),i=a[e];if(d.push(...n),"delayed"===i.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}(i))return;const u=d;if(d=[],0===u.length)return;const f=o.util.selectInvalidatedBy(a,u);t.batch((()=>{const e=Array.from(f.values());for(const{queryCacheKey:t}of e){const e=i.queries[t],n=c.currentSubscriptions[t]??{};e&&(0===b1(n)?r.dispatch(l({queryCacheKey:t})):"uninitialized"!==e.status&&r.dispatch(s(e,t)))}}))}return(e,t)=>{u(e)?p(GV(e,"invalidatesTags",n,i),t):f(e)?p([],t):o.util.invalidateTags.match(e)&&p(uI(e.payload,void 0,void 0,void 0,void 0,i),t)}},Kge=({reducerPath:e,queryThunk:t,api:n,refetchQuery:r,internalState:a})=>{const o={};function i({queryCacheKey:t},n){const s=n.getState()[e],c=s.queries[t],u=a.currentSubscriptions[t];if(!c||"uninitialized"===c.status)return;const{lowestPollingInterval:f,skipPollingIfUnfocused:d}=l(u);if(!Number.isFinite(f))return;const p=o[t];null!=p&&p.timeout&&(clearTimeout(p.timeout),p.timeout=void 0);const h=Date.now()+f;o[t]={nextPollTimestamp:h,pollingInterval:f,timeout:setTimeout((()=>{(s.config.focused||!d)&&n.dispatch(r(c,t)),i({queryCacheKey:t},n)}),f)}}function s({queryCacheKey:t},n){const r=n.getState()[e].queries[t],s=a.currentSubscriptions[t];if(!r||"uninitialized"===r.status)return;const{lowestPollingInterval:u}=l(s);if(!Number.isFinite(u))return void c(t);const f=o[t],d=Date.now()+u;(!f||d<f.nextPollTimestamp)&&i({queryCacheKey:t},n)}function c(e){const t=o[e];null!=t&&t.timeout&&clearTimeout(t.timeout),delete o[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)&&i(e.meta.arg,r),n.util.resetApiState.match(e)&&function(){for(const e of Object.keys(o))c(e)}()}},Qge=({reducerPath:e,context:t,api:n,refetchQuery:r,internalState:a})=>{const{removeQueryResult:o}=n.internalActions;function i(n,i){const s=n.getState()[e],c=s.queries,l=a.currentSubscriptions;t.batch((()=>{for(const e of Object.keys(l)){const t=c[e],a=l[e];a&&t&&((Object.values(a).some((e=>!0===e[i]))||Object.values(a).every((e=>void 0===e[i]))&&s.config[i])&&(0===b1(a)?n.dispatch(o({queryCacheKey:e})):"uninitialized"!==t.status&&n.dispatch(r(t,e))))}}))}return(e,t)=>{lI.match(e)&&i(t,"refetchOnFocus"),fI.match(e)&&i(t,"refetchOnReconnect")}},dN=new Error("Promise never resolved before cacheEntryRemoved."),Yge=({api:e,reducerPath:t,context:n,queryThunk:r,mutationThunk:a,internalState:o})=>{const i=vC(r),s=vC(a),c=wp(r,a),l={};function u(t,r,a,o,i){const s=n.endpointDefinitions[t],c=null==s?void 0:s.onCacheEntryAdded;if(!c)return;let u={};const f=new Promise((e=>{u.cacheEntryRemoved=e})),d=Promise.race([new Promise((e=>{u.valueResolved=e})),f.then((()=>{throw dN}))]);d.catch((()=>{})),l[a]=u;const p=e.endpoints[t].select("query"===s.type?r:a),h=o.dispatch(((e,t,n)=>n)),m={...o,getCacheEntry:()=>p(o.getState()),requestId:i,extra:h,updateCachedData:"query"===s.type?n=>o.dispatch(e.util.updateQueryData(t,r,n)):void 0,cacheDataLoaded:d,cacheEntryRemoved:f},y=c(r,m);Promise.resolve(y).catch((e=>{if(e!==dN)throw e}))}return(n,o,f)=>{const d=function(t){return i(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)?g_(t.payload):""}(n);if(r.pending.match(n)){const e=f[t].queries[d],r=o.getState()[t].queries[d];!e&&r&&u(n.meta.arg.endpointName,n.meta.arg.originalArgs,d,o,n.meta.requestId)}else if(a.pending.match(n))o.getState()[t].mutations[d]&&u(n.meta.arg.endpointName,n.meta.arg.originalArgs,d,o,n.meta.requestId);else if(c(n)){const e=l[d];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[d];e&&(delete l[d],e.cacheEntryRemoved())}else if(e.util.resetApiState.match(n))for(const[e,t]of Object.entries(l))delete l[e],t.cacheEntryRemoved()}},Zge=({api:e,context:t,queryThunk:n,mutationThunk:r})=>{const a=ZR(n,r),o=E1(n,r),i=wp(n,r),s={};return(n,r)=>{var c,l;if(a(n)){const{requestId:a,arg:{endpointName:o,originalArgs:i}}=n.meta,c=t.endpointDefinitions[o],l=null==c?void 0:c.onQueryStarted;if(l){const t={},n=new Promise(((e,n)=>{t.resolve=e,t.reject=n}));n.catch((()=>{})),s[a]=t;const u=e.endpoints[o].select("query"===c.type?i:a),f=r.dispatch(((e,t,n)=>n)),d={...r,getCacheEntry:()=>u(r.getState()),requestId:a,extra:f,updateCachedData:"query"===c.type?t=>r.dispatch(e.util.updateQueryData(o,i,t)):void 0,queryFulfilled:n};l(i,d)}}else if(i(n)){const{requestId:e,baseQueryMeta:t}=n.meta;null==(c=s[e])||c.resolve({data:n.payload,meta:t}),delete s[e]}else if(o(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]}}},Xge=({api:e,context:{apiUid:t},reducerPath:n})=>(n,r)=>{e.util.resetApiState.match(n)&&r.dispatch(e.internalActions.middlewareRegistered(t))},Jge=({api:e,queryThunk:t,internalState:n})=>{const r=`${e.reducerPath}/subscriptions`;let a=null,o=null;const{updateSubscriptionOptions:i,unsubscribeQueryResult:s}=e.internalActions,c=()=>n.currentSubscriptions,l={getSubscriptions:c,getSubscriptionCount:e=>b1(c()[e]??{}),isRequestSubscribed:(e,t)=>{var n;const r=c();return!(null==(n=null==r?void 0:r[e])||!n[t])}};return(c,u)=>{if(a||(a=JSON.parse(JSON.stringify(n.currentSubscriptions))),e.util.resetApiState.match(c))return a=n.currentSubscriptions={},o=null,[!0,!1];if(e.internalActions.internal_getRTKQSubscriptions.match(c))return[!1,l];const f=((n,r)=>{var a,o,c;if(i.match(r)){const{queryCacheKey:e,requestId:t,options:o}=r.payload;return null!=(a=null==n?void 0:n[e])&&a[t]&&(n[e][t]=o),!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,a=n[o=e.queryCacheKey]??(n[o]={});return a[`${t}_running`]={},e.subscribe&&(a[t]=e.subscriptionOptions??a[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:a}}=r;if(e&&t.subscribe){const e=n[c=t.queryCacheKey]??(n[c]={});e[a]=t.subscriptionOptions??e[a]??{},l=!0}}return l})(n.currentSubscriptions,c);let d=!0;if(f){o||(o=setTimeout((()=>{const t=JSON.parse(JSON.stringify(n.currentSubscriptions)),[,r]=L8(a,(()=>t));u.next(e.internalActions.subscriptionsUpdated(r)),a=t,o=null}),500));const i="string"==typeof c.type&&!!c.type.startsWith(r),s=t.rejected.match(c)&&c.meta.condition&&!!c.meta.arg.subscribe;d=!i&&!s}return[d,!1]}};function e1e(e){const{reducerPath:t,queryThunk:n,api:r,context:a}=e,{apiUid:o}=a,i={invalidateTags:Ir(`${t}/invalidateTags`)},s=e=>e.type.startsWith(`${t}/`),c=[Xge,Hge,Gge,Kge,Yge,Zge];return{middleware:n=>{let i=!1;const u={...e,internalState:{currentSubscriptions:{}},refetchQuery:l,isThisApiSliceAction:s},f=c.map((e=>e(u))),d=Jge(u),p=Qge(u);return e=>c=>{if(!P8(c))return e(c);i||(i=!0,n.dispatch(r.internalActions.middlewareRegistered(o)));const l={...n,next:e},u=n.getState(),[h,m]=d(c,l,u);let y;if(y=h?e(c):m,n.getState()[t]&&(p(c,l,u),s(c)||a.hasRehydrationInfo(c)))for(let e of f)e(c,l,u);return y}},actions:i};function l(e,t,r={}){return n({type:"query",endpointName:e.endpointName,originalArgs:e.originalArgs,subscribe:!1,forceRefetch:!0,queryCacheKey:t,...r})}}function np(e,...t){return Object.assign(e,...t)}var pN=Symbol(),t1e=({createSelector:e=go}={})=>({name:pN,init(t,{baseQuery:n,tagTypes:r,reducerPath:a,serializeQueryArgs:o,keepUnusedDataFor:i,refetchOnMountOrArgChange:s,refetchOnFocus:c,refetchOnReconnect:l,invalidationBehavior:u},f){WW();const d=e=>e;Object.assign(t,{reducerPath:a,endpoints:{},internalActions:{onOnline:fI,onOffline:WV,onFocus:lI,onFocusLost:qV},util:{}});const{queryThunk:p,mutationThunk:h,patchQueryData:m,updateQueryData:y,upsertQueryData:g,prefetch:v,buildMatchThunkActions:b}=Fge({baseQuery:n,reducerPath:a,context:f,api:t,serializeQueryArgs:o,assertTagType:d}),{reducer:_,actions:w}=Bge({context:f,queryThunk:p,mutationThunk:h,reducerPath:a,assertTagType:d,config:{refetchOnFocus:c,refetchOnReconnect:l,refetchOnMountOrArgChange:s,keepUnusedDataFor:i,reducerPath:a,invalidationBehavior:u}});np(t.util,{patchQueryData:m,updateQueryData:y,upsertQueryData:g,prefetch:v,resetApiState:w.resetApiState}),np(t.internalActions,w);const{middleware:k,actions:x}=e1e({reducerPath:a,context:f,queryThunk:p,mutationThunk:h,api:t,assertTagType:d});np(t.util,x),np(t,{reducer:_,middleware:k});const{buildQuerySelector:S,buildMutationSelector:E,selectInvalidatedBy:A,selectCachedArgsForQuery:z}=Vge({serializeQueryArgs:o,reducerPath:a,createSelector:e});np(t.util,{selectInvalidatedBy:A,selectCachedArgsForQuery:z});const{buildInitiateQuery:C,buildInitiateMutation:I,getRunningMutationThunk:T,getRunningMutationsThunk:R,getRunningQueriesThunk:P,getRunningQueryThunk:j}=jge({queryThunk:p,mutationThunk:h,api:t,serializeQueryArgs:o,context:f});return np(t.util,{getRunningMutationThunk:T,getRunningMutationsThunk:R,getRunningQueryThunk:j,getRunningQueriesThunk:P}),{name:pN,injectEndpoint(e,n){var r;const a=t;(r=a.endpoints)[e]??(r[e]={}),HV(n)?np(a.endpoints[e],{name:e,select:S(e,n),initiate:C(e,n)},b(p,e)):Dge(n)&&np(a.endpoints[e],{name:e,select:E(),initiate:I(e)},b(h,e))}}}});function n1e(e){return"query"===e.type}function r1e(e){return"mutation"===e.type}function wb(e,...t){return Object.assign(e,...t)}function W4(e){return e.replace(e[0],e[0].toUpperCase())}var a1=WeakMap?new WeakMap:void 0,a1e=({endpointName:e,queryArgs:t})=>{let n="";const r=null==a1?void 0:a1.get(t);if("string"==typeof r)n=r;else{const e=JSON.stringify(t,((e,t)=>Vl(t)?Object.keys(t).sort().reduce(((e,n)=>(e[n]=t[n],e)),{}):t));Vl(t)&&(null==a1||a1.set(t,e)),n=e}return`${e}(${n})`},H4=Symbol();function hN(e,t,n,r){const a=v.useMemo((()=>({queryArgs:e,serialized:"object"==typeof e?t({queryArgs:e,endpointDefinition:n,endpointName:r}):e})),[e,t,n,r]),o=v.useRef(a);return v.useEffect((()=>{o.current.serialized!==a.serialized&&(o.current=a)}),[a]),o.current.serialized===a.serialized?o.current.queryArgs:e}function G4(e){const t=v.useRef(e);return v.useEffect((()=>{zy(t.current,e)||(t.current=e)}),[e]),zy(t.current,e)?t.current:e}var o1e=typeof window<"u"&&window.document&&window.document.createElement?v.useLayoutEffect:v.useEffect,i1e=e=>e.isUninitialized?{...e,isUninitialized:!1,isFetching:!0,isLoading:void 0===e.data,status:VV.pending}:e;function s1e({api:e,moduleOptions:{batch:t,hooks:{useDispatch:n,useSelector:r,useStore:a},unstable__sideEffectsInRender:o,createSelector:i},serializeQueryArgs:s,context:c}){const l=o?e=>e():v.useEffect;return{buildQueryHooks:function(o){const f=(t,{refetchOnReconnect:r,refetchOnFocus:a,refetchOnMountOrArgChange:i,skip:s=!1,pollingInterval:u=0,skipPollingIfUnfocused:f=!1}={})=>{const{initiate:d}=e.endpoints[o],p=n(),h=v.useRef();if(!h.current){const t=p(e.internalActions.internal_getRTKQSubscriptions());h.current=t}const m=hN(s?im:t,a1e,c.endpointDefinitions[o],o),y=G4({refetchOnReconnect:r,refetchOnFocus:a,pollingInterval:u,skipPollingIfUnfocused:f}),g=v.useRef(!1),b=v.useRef();let{queryCacheKey:_,requestId:w}=b.current||{},k=!1;_&&w&&(k=h.current.isRequestSubscribed(_,w));const x=!k&&g.current;return l((()=>{g.current=k})),l((()=>{x&&(b.current=void 0)}),[x]),l((()=>{var e;const t=b.current;if(m===im)return null==t||t.unsubscribe(),void(b.current=void 0);const n=null==(e=b.current)?void 0:e.subscriptionOptions;if(t&&t.arg===m)y!==n&&t.updateSubscriptionOptions(y);else{null==t||t.unsubscribe();const e=p(d(m,{subscriptionOptions:y,forceRefetch:i}));b.current=e}}),[p,d,i,m,y,x]),v.useEffect((()=>()=>{var e;null==(e=b.current)||e.unsubscribe(),b.current=void 0}),[]),v.useMemo((()=>({refetch:()=>{var e;if(!b.current)throw new Error(Ha(38));return null==(e=b.current)?void 0:e.refetch()}})),[])},d=({refetchOnReconnect:r,refetchOnFocus:a,pollingInterval:i=0,skipPollingIfUnfocused:s=!1}={})=>{const{initiate:c}=e.endpoints[o],u=n(),[f,d]=v.useState(H4),p=v.useRef(),h=G4({refetchOnReconnect:r,refetchOnFocus:a,pollingInterval:i,skipPollingIfUnfocused:s});l((()=>{var e,t;const n=null==(e=p.current)?void 0:e.subscriptionOptions;h!==n&&(null==(t=p.current)||t.updateSubscriptionOptions(h))}),[h]);const m=v.useRef(h);l((()=>{m.current=h}),[h]);const y=v.useCallback((function(e,n=!1){let r;return t((()=>{var t;null==(t=p.current)||t.unsubscribe(),p.current=r=u(c(e,{subscriptionOptions:m.current,forceRefetch:!n})),d(e)})),r}),[u,c]);return v.useEffect((()=>()=>{var e;null==(e=null==p?void 0:p.current)||e.unsubscribe()}),[]),v.useEffect((()=>{f!==H4&&!p.current&&y(f,!0)}),[f,y]),v.useMemo((()=>[y,f]),[y,f])},p=(t,{skip:n=!1,selectFromResult:l}={})=>{const{select:f}=e.endpoints[o],d=hN(n?im:t,s,c.endpointDefinitions[o],o),p=v.useRef(),h=v.useMemo((()=>i([f(d),(e,t)=>t,e=>d],u,{memoizeOptions:{resultEqualityCheck:zy}})),[f,d]),m=v.useMemo((()=>l?i([h],l,{devModeChecks:{identityFunctionCheck:"never"}}):h),[h,l]),y=r((e=>m(e,p.current)),zy),g=a(),b=h(g.getState(),p.current);return o1e((()=>{p.current=b}),[b]),y};return{useQueryState:p,useQuerySubscription:f,useLazyQuerySubscription:d,useLazyQuery(e){const[t,n]=d(e),r=p(n,{...e,skip:n===H4}),a=v.useMemo((()=>({lastArg:n})),[n]);return v.useMemo((()=>[t,r,a]),[t,r,a])},useQuery(e,t){const n=f(e,t),r=p(e,{selectFromResult:e===im||null!=t&&t.skip?void 0:i1e,...t}),{data:a,status:o,isLoading:i,isSuccess:s,isError:c,error:l}=r;return v.useDebugValue({data:a,status:o,isLoading:i,isSuccess:s,isError:c,error:l}),v.useMemo((()=>({...r,...n})),[r,n])}}},buildMutationHook:function(a){return({selectFromResult:o,fixedCacheKey:s}={})=>{const{select:c,initiate:l}=e.endpoints[a],u=n(),[f,d]=v.useState();v.useEffect((()=>()=>{null!=f&&f.arg.fixedCacheKey||null==f||f.reset()}),[f]);const p=v.useCallback((function(e){const t=u(l(e,{fixedCacheKey:s}));return d(t),t}),[u,l,s]),{requestId:h}=f||{},m=v.useMemo((()=>c({fixedCacheKey:s,requestId:null==f?void 0:f.requestId})),[s,f,c]),y=v.useMemo((()=>o?i([m],o):m),[o,m]),g=r(y,zy),b=null==s?null==f?void 0:f.arg.originalArgs:void 0,_=v.useCallback((()=>{t((()=>{f&&d(void 0),s&&u(e.internalActions.removeMutationResult({requestId:h,fixedCacheKey:s}))}))}),[u,s,f,h]),{endpointName:w,data:k,status:x,isLoading:S,isSuccess:E,isError:A,error:z}=g;v.useDebugValue({endpointName:w,data:k,status:x,isLoading:S,isSuccess:E,isError:A,error:z});const C=v.useMemo((()=>({...g,originalArgs:b,reset:_})),[g,b,_]);return v.useMemo((()=>[p,C]),[p,C])}},usePrefetch:function(t,r){const a=n(),o=G4(r);return v.useCallback(((n,r)=>a(e.util.prefetch(t,n,{...o,...r}))),[t,a,o])}};function u(e,t,n){if(null!=t&&t.endpointName&&e.isUninitialized){const{endpointName:e}=t,r=c.endpointDefinitions[e];s({queryArgs:t.originalArgs,endpointDefinition:r,endpointName:e})===s({queryArgs:n,endpointDefinition:r,endpointName:e})&&(t=void 0)}let r=e.isSuccess?e.data:null==t?void 0:t.data;void 0===r&&(r=e.data);const a=void 0!==r,o=e.isLoading,i=!a&&o,l=e.isSuccess||o&&a;return{...e,data:r,currentData:e.data,isFetching:o,isLoading:i,isSuccess:l}}}var c1e=Symbol(),l1e=({batch:e=Nce,hooks:t={useDispatch:Mk,useSelector:qa,useStore:cB},createSelector:n=go,unstable__sideEffectsInRender:r=!1,...a}={})=>({name:c1e,init(a,{serializeQueryArgs:o},i){const s=a,{buildQueryHooks:c,buildMutationHook:l,usePrefetch:u}=s1e({api:a,moduleOptions:{batch:e,hooks:t,unstable__sideEffectsInRender:r,createSelector:n},serializeQueryArgs:o,context:i});return wb(s,{usePrefetch:u}),wb(i,{batch:e}),{injectEndpoint(e,t){if(n1e(t)){const{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:o,useQuerySubscription:i}=c(e);wb(s.endpoints[e],{useQuery:t,useLazyQuery:n,useLazyQuerySubscription:r,useQueryState:o,useQuerySubscription:i}),a[`use${W4(e)}Query`]=t,a[`useLazy${W4(e)}Query`]=n}else if(r1e(t)){const t=l(e);wb(s.endpoints[e],{useMutation:t}),a[`use${W4(e)}Mutation`]=t}}}}}),f1e=Uge(t1e(),l1e());const dI="auth_token",QV=()=>localStorage.getItem(dI)||void 0,u1e=e=>localStorage.setItem(dI,e),d1e=()=>localStorage.removeItem(dI),p1e=()=>!!QV(),xm={getToken:QV,setToken:u1e,removeToken:d1e,hasToken:p1e},h1e="remote-ready",YV=Ir("reselectUser"),pI=Ir("requestLogin"),ZV=Ir("requestLogout"),m1e="host-store-connect",XV=Ir("remoteLogin"),hI=Ir("remoteLogout"),mN=Ir("requestMicroFrontendFetch"),g1e=Ir("sendMicroFrontendFetchResponse"),y1e=e=>{xm.removeToken(),e(hI())},_1e=e=>async(t,n,r)=>{const a=await e(t,n,r);return a.error&&[401].includes(a.error.status)&&y1e(n.dispatch),a},v1e=async(e,t=2e3)=>{for(;!e();)await new Promise((e=>setTimeout(e,t)))},b1e=5,w1e=e=>t=>!!e&&t.includes(e.status),gN=e=>new Promise((t=>setTimeout(t,1e3*e))),k1e=e=>async(t,n,r)=>{const a=(null==r?void 0:r.maxRetries)??5;await v1e((()=>n.getState().network.isOnline));let o=0;const i=async()=>{var s,c,l,u;const f=await e(t,n,r),d=f.error;if(o>=a)return f;o>0&&await gN(Math.pow(2,o)),o++;const p=w1e(d);switch(!0){case"mutation"===n.type:return f;case!navigator.onLine:case p([408,404]):case d&&"FETCH_ERROR"===(null==d?void 0:d.status):case d&&d.status>=500:return await i();case 429===(null==(s=null==f?void 0:f.error)?void 0:s.status):{const e=null==(u=null==(l=null==(c=f.meta)?void 0:c.response)?void 0:l.headers)?void 0:u.get("Retry-After");return await gN(+(e||"0")),await i()}default:return f}};return await i()};var Iw=(e=>(e.SERVER_RULES="serverRules",e.EVENT_ATTENDEES="eventAttendees",e))(Iw||{});const Xk="staticState",Fb={path:"",baseUrl:"",search:""},x1e=e=>{if(!e)return Fb;try{return JSON.parse(decodeURIComponent(e))||Fb}catch(e){return ku.error("Error parsing static state",e),Fb}},JV=()=>new URLSearchParams(window.location.search).get(Xk),S1e=({path:e,baseUrl:t,search:n}={})=>{const{pathname:r,origin:a,search:o}=window.location;return`${Xk}=${encodeURIComponent(JSON.stringify({path:e||r,baseUrl:t||a,search:n||o}))}`},E1e=()=>{const e=JV();return e&&localStorage.setItem(Xk,e),eU()},eU=()=>{try{const e=localStorage.getItem(Xk)||JV();return x1e(e)}catch(e){return ku.error("Error parsing static state",e),Fb}},tU={create:S1e,init:E1e,get:eU},C1e=e=>{try{const{type:t,payload:n}=e,r={type:t};return void 0!==n&&(r.payload=JSON.parse(JSON.stringify(n))),r}catch(t){return ku.warn(`Could not serialize action type: ${e.type}`,t),{type:e.type,payload:`[Non-serializable payload for action: ${e.type}]`}}},R1e=({action:e,windowElement:t,whitelist:n})=>{if(t)try{const{type:r}=e;if(!n.some((({type:e})=>e===r||"*"===e)))return;const a=C1e(e);t.postMessage(a,"*")}catch(e){ku.error("Failed to process or send message:",e)}},A1e=({onMessage:e,whitelist:t})=>{const n=n=>{const r=n.origin!==window.location.origin,a=n.data&&"object"==typeof n.data&&"type"in n.data,o=t.some((({type:e})=>e===n.data.type||"*"===e));r&&a&&o&&e(n.data)};return window.addEventListener("message",n),()=>{window.removeEventListener("message",n)}},T1e=async e=>{const t={};e.headers.forEach(((e,n)=>{t[n]=e}));return{body:["get","head"].includes(e.method.toLowerCase())?null:await(async()=>{try{return await e.text()}catch(e){return ku.error("No body or error reading body:",e),null}})(),headers:t,url:e.url,method:e.method,mode:e.mode,credentials:e.credentials,cache:e.cache,redirect:e.redirect,referrer:e.referrer,integrity:e.integrity}},I1e=e=>{const{url:t,status:n,statusText:r,headers:a,body:o}=e,i=new Response(JSON.stringify(o),{status:n,statusText:r,headers:a});return Object.defineProperty(i,"url",{value:t}),i},P1e=async e=>{const t=crypto.randomUUID();return R1e({action:mN({id:t,options:await T1e(e)}),windowElement:window.parent,whitelist:[mN]}),new Promise((e=>{const n=A1e({onMessage:({payload:{id:r,response:a}})=>{t===r&&(n(),e(I1e(a)))},whitelist:[g1e]})}))},$1e=()=>{try{return window.self!==window.top}catch{return!0}},O1e=()=>e=>$1e()?P1e(e):fetch(e),z1e=tU.get().baseUrl,M1e=z1e||"",D1e=Mge({fetchFn:O1e(),baseUrl:M1e,responseHandler:e=>{const t=e.headers.get("content-type");return(null==t?void 0:t.startsWith("application/json"))?e.json():e.text()},prepareHeaders:e=>{const t=xm.getToken();return t&&e.set("authorization",`Bearer ${t}`),e}}),N1e=_1e(k1e(D1e)),L1e=f1e({tagTypes:["Secure","Post","Follow","Like","Settings","Rbac_Config","Admin_Apps","Admin_Users","Admin_Audit_Logs","Admin_Reports","Admin_Signup_Requests","Admin_Posts","Admin_Uploads","Admin_Roles","Admin_Jobs_Stats","Admin_Federation","Admin_Domain_Block","Group_Apps","User_Apps","Account","Profile","UserNoHtml","Relationship","Bookmarks",...Object.values(Iw)],reducerPath:"openapi",baseQuery:N1e,endpoints:()=>({})}),lr=L1e.injectEndpoints({endpoints:e=>({postApiV1AccountsAddReason:e.mutation({query:e=>({url:"/api/v1/accounts/add-reason",method:"POST",body:e.signupReasonParams})}),postApiV1AccountsAuthenticateEmail:e.mutation({query:e=>({url:"/api/v1/accounts/authenticate/email",method:"POST",body:e.authRequest})}),postApiV1AccountsAuthenticatePhone:e.mutation({query:e=>({url:"/api/v1/accounts/authenticate/phone",method:"POST",body:e.authPhoneRequest})}),putApiV1AccountsChangeName:e.mutation({query:e=>({url:"/api/v1/accounts/change/name",method:"PUT",params:{id:e.id,name:e.name,username:e.username}})}),postApiV1AccountsCheckCaptcha:e.mutation({query:e=>({url:"/api/v1/accounts/check-captcha",method:"POST",body:e.captchaVerificationParams})}),postApiV1AccountsConfirmEmail:e.mutation({query:e=>({url:"/api/v1/accounts/confirm-email",method:"POST",body:e.codeVerificationParams})}),postApiV1AccountsConfirmPhone:e.mutation({query:e=>({url:"/api/v1/accounts/confirm-phone",method:"POST",body:e.codeVerificationParams})}),deleteApiV1AccountsDelete:e.mutation({query:()=>({url:"/api/v1/accounts/delete",method:"DELETE"})}),postApiV1AccountsEmailChangeConfirm:e.mutation({query:e=>({url:"/api/v1/accounts/email/change/confirm",method:"POST",body:e.body})}),postApiV1AccountsEmailChangeRequest:e.mutation({query:e=>({url:"/api/v1/accounts/email/change/request",method:"POST",body:e.emailChangeRequest})}),putApiV1AccountsEmailChangeResendCode:e.mutation({query:()=>({url:"/api/v1/accounts/email/change/resend-code",method:"PUT"})}),postApiV1AccountsFinishCreating:e.mutation({query:e=>({url:"/api/v1/accounts/finish-creating",method:"POST",body:e.finishCreatingAccountParams,params:{htmlContent:e.htmlContent}})}),putApiV1AccountsGetTokenByHash:e.mutation({query:e=>({url:`/api/v1/accounts/get-token/${e.hash}`,method:"PUT"})}),postApiV1AccountsLoginsAddEmailPassword:e.mutation({query:e=>({url:"/api/v1/accounts/logins/add-email-password",method:"POST",body:e.addEmailRequest})}),postApiV1AccountsLoginsAddEmailPasswordConfirm:e.mutation({query:e=>({url:"/api/v1/accounts/logins/add-email-password/confirm",method:"POST",body:e.body})}),putApiV1AccountsLoginsAddEmailPasswordResendCode:e.mutation({query:()=>({url:"/api/v1/accounts/logins/add-email-password/resend-code",method:"PUT"})}),postApiV1AccountsLoginsAddPhone:e.mutation({query:e=>({url:"/api/v1/accounts/logins/add-phone",method:"POST",body:e.addPhoneRequest})}),deleteApiV1AccountsLoginsRemoveEmailPassword:e.mutation({query:()=>({url:"/api/v1/accounts/logins/remove-email-password",method:"DELETE"})}),deleteApiV1AccountsLoginsRemovePhone:e.mutation({query:()=>({url:"/api/v1/accounts/logins/remove-phone",method:"DELETE"})}),postApiV1AccountsPasswordChangeConfirm:e.mutation({query:e=>({url:"/api/v1/accounts/password/change/confirm",method:"POST",body:e.body})}),postApiV1AccountsPasswordChangeRequest:e.mutation({query:e=>({url:"/api/v1/accounts/password/change/request",method:"POST",body:e.passwordChangeRequest})}),putApiV1AccountsPasswordChangeResendCode:e.mutation({query:()=>({url:"/api/v1/accounts/password/change/resend-code",method:"PUT"})}),postApiV1AccountsPasswordRecover:e.mutation({query:e=>({url:"/api/v1/accounts/password/recover",method:"POST",body:e.passwordRecoveryRequest})}),postApiV1AccountsPasswordRecoverChange:e.mutation({query:e=>({url:"/api/v1/accounts/password/recover/change",method:"POST",body:e.passwordRecoveryChange})}),postApiV1AccountsPasswordRecoverCheckCode:e.mutation({query:e=>({url:"/api/v1/accounts/password/recover/check-code",method:"POST",body:e.passwordRecoveryCode})}),postApiV1AccountsPhoneChangeConfirmAuth:e.mutation({query:e=>({url:"/api/v1/accounts/phone/change/confirm/auth",method:"POST",body:e.body})}),postApiV1AccountsPhoneChangeConfirmNewPhone:e.mutation({query:e=>({url:"/api/v1/accounts/phone/change/confirm/new-phone",method:"POST",body:e.body})}),postApiV1AccountsPhoneChangeNewPhone:e.mutation({query:e=>({url:"/api/v1/accounts/phone/change/new-phone",method:"POST",body:e.addPhoneRequest})}),putApiV1AccountsPhoneChangeRequest:e.mutation({query:()=>({url:"/api/v1/accounts/phone/change/request",method:"PUT"})}),putApiV1AccountsPhoneChangeResendCodeAuth:e.mutation({query:()=>({url:"/api/v1/accounts/phone/change/resend-code/auth",method:"PUT"})}),putApiV1AccountsPhoneChangeResendCodeNewPhone:e.mutation({query:()=>({url:"/api/v1/accounts/phone/change/resend-code/new-phone",method:"PUT"})}),getApiV1AccountsProfile:e.query({query:e=>({url:"/api/v1/accounts/profile",params:{htmlContent:e.htmlContent}})}),postApiV1AccountsReselectUser:e.mutation({query:e=>({url:"/api/v1/accounts/reselect-user",method:"POST",params:{userId:e.userId,userName:e.userName,htmlContent:e.htmlContent}})}),putApiV1AccountsResendCodeByHash:e.mutation({query:e=>({url:`/api/v1/accounts/resend-code/${e.hash}`,method:"PUT"})}),putApiV1AccountsResendEmailByHash:e.mutation({query:e=>({url:`/api/v1/accounts/resend-email/${e.hash}`,method:"PUT"})}),postApiV1AccountsSignup:e.mutation({query:e=>({url:"/api/v1/accounts/signup",method:"POST",body:e.accountCreate})}),postApiV1AccountsSignupPhone:e.mutation({query:e=>({url:"/api/v1/accounts/signup-phone",method:"POST",body:e.phoneSignup})}),postApiV1AccountsUserReselectUser:e.mutation({query:e=>({url:"/api/v1/accounts/user/reselect-user",method:"POST",params:{userId:e.userId,userName:e.userName}})}),getApiV1AccountsById:e.query({query:e=>({url:`/api/v1/accounts/${e.id}`,params:{htmlContent:e.htmlContent}})}),getApiV1AddressesSuggest:e.query({query:e=>({url:"/api/v1/addresses/suggest",params:{text:e.text}})}),getApiV1AdminAccountByAccountId:e.query({query:e=>({url:`/api/v1/admin/account/${e.accountId}`,params:{htmlContent:e.htmlContent}})}),getApiV1AdminAuditLog:e.query({query:e=>({url:"/api/v1/admin/audit_log",params:{accountId:e.accountId,action:e.action,appId:e.appId,domainSearch:e.domainSearch,email:e.email,group:e.group,lastId:e.lastId,limit:e.limit,offset:e.offset,ruleId:e.ruleId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId,username:e.username}})}),putApiV1AdminChangeEmail:e.mutation({query:e=>({url:"/api/v1/admin/change/email",method:"PUT",params:{email:e.email,id:e.id,username:e.username}})}),putApiV1AdminChangePassword:e.mutation({query:e=>({url:"/api/v1/admin/change/password",method:"PUT",params:{id:e.id,password:e.password,username:e.username}})}),putApiV1AdminChangeRole:e.mutation({query:e=>({url:"/api/v1/admin/change/role",method:"PUT",params:{id:e.id,role:e.role,username:e.username,htmlContent:e.htmlContent}})}),postApiV1AdminClearApErrors:e.mutation({query:e=>({url:"/api/v1/admin/clear-ap-errors",method:"POST",params:{domain:e.domain}})}),postApiV1AdminCreateAccount:e.mutation({query:e=>({url:"/api/v1/admin/create-account",method:"POST",body:e.accountCreate,params:{htmlContent:e.htmlContent}})}),deleteApiV1AdminDelete:e.mutation({query:e=>({url:"/api/v1/admin/delete",method:"DELETE",params:{email:e.email,id:e.id,username:e.username}})}),getApiV1AdminDomainAllow:e.query({query:e=>({url:"/api/v1/admin/domain-allow",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1AdminDomainAllow:e.mutation({query:e=>({url:"/api/v1/admin/domain-allow",method:"POST",body:e.allowedDomainReq})}),deleteApiV1AdminDomainAllowByDomain:e.mutation({query:e=>({url:`/api/v1/admin/domain-allow/${e.domain}`,method:"DELETE"})}),putApiV1AdminDomainBlock:e.mutation({query:e=>({url:"/api/v1/admin/domain-block",method:"PUT",body:e.blockDomainReq})}),getApiV1AdminDomainBlock:e.query({query:e=>({url:"/api/v1/admin/domain-block",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1AdminDomainBlock:e.mutation({query:e=>({url:"/api/v1/admin/domain-block",method:"POST",body:e.blockDomainReq})}),getApiV1AdminDomainBlockList:e.query({query:e=>({url:"/api/v1/admin/domain-block/list",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1AdminDomainBlockByDomain:e.mutation({query:e=>({url:`/api/v1/admin/domain-block/${e.domain}`,method:"DELETE"})}),getApiV1AdminFederation:e.query({query:e=>({url:"/api/v1/admin/federation",params:{blockState:e.blockState,lastId:e.lastId,limit:e.limit,offset:e.offset,search:e.search,sortBy:e.sortBy,sortOrder:e.sortOrder,unavailable:e.unavailable,untilId:e.untilId,warning:e.warning}})}),getApiV1AdminFederationMetricsOperations:e.query({query:e=>({url:"/api/v1/admin/federation/metrics/operations",params:{window:e.window}})}),getApiV1AdminFederationMetricsRunningAverageSingle:e.query({query:e=>({url:"/api/v1/admin/federation/metrics/running-average-single",params:{operation:e.operation,window:e.window}})}),getApiV1AdminFederationMetricsRunningAveragesAll:e.query({query:e=>({url:"/api/v1/admin/federation/metrics/running-averages-all",params:{operations:e.operations,window:e.window}})}),getApiV1AdminFederationByDomain:e.query({query:e=>({url:`/api/v1/admin/federation/${e.domain}`})}),postApiV1AdminFeedClearUserFeed:e.mutation({query:e=>({url:"/api/v1/admin/feed/clear-user-feed",method:"POST",params:{ownerType:e.ownerType,userId:e.userId,username:e.username}})}),getApiV1AdminFeedMetricsGlobalAllOperation:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/global-all-operation",params:{ownerType:e.ownerType,window:e.window}})}),getApiV1AdminFeedMetricsGlobalAllOwners:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/global-all-owners",params:{operation:e.operation,window:e.window}})}),getApiV1AdminFeedMetricsGlobalSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/global-single",params:{operation:e.operation,ownerType:e.ownerType,window:e.window}})}),getApiV1AdminFeedMetricsHistory:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/history",params:{limit:e.limit,operation:e.operation,ownerType:e.ownerType,userId:e.userId}})}),getApiV1AdminFeedMetricsHistoryAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/history/all",params:{limit:e.limit,userId:e.userId}})}),getApiV1AdminFeedMetricsHistoryAllSingleOwner:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/history/all-single-owner",params:{limit:e.limit,ownerType:e.ownerType,userId:e.userId}})}),getApiV1AdminFeedMetricsHistoryByOwnerType:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/history/by-owner-type",params:{limit:e.limit,operation:e.operation,userId:e.userId}})}),getApiV1AdminFeedMetricsRunningAverageSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/running-average-single",params:{operation:e.operation,ownerType:e.ownerType,userId:e.userId,window:e.window}})}),getApiV1AdminFeedMetricsRunningAveragesAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/running-averages-all",params:{ownerType:e.ownerType,userId:e.userId,window:e.window}})}),getApiV1AdminFeedMetricsSlowestOperations:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-operations",params:{limit:e.limit,ownerType:e.ownerType,window:e.window}})}),getApiV1AdminFeedMetricsSlowestUsers:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-users",params:{limit:e.limit,operation:e.operation,ownerType:e.ownerType,window:e.window}})}),getApiV1AdminFeedMetricsSlowestUsersAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-users-all",params:{limit:e.limit,ownerType:e.ownerType,sortDesc:e.sortDesc,window:e.window}})}),getApiV1AdminFeedMetricsSlowestUsersSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/slowest-users-single",params:{limit:e.limit,operation:e.operation,ownerType:e.ownerType,sortDesc:e.sortDesc,window:e.window}})}),getApiV1AdminFeedMetricsSummary:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/summary",params:{includeUserCounts:e.includeUserCounts,window:e.window}})}),getApiV1AdminFeedMetricsUserCountAll:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/user-count-all",params:{ownerType:e.ownerType,window:e.window}})}),getApiV1AdminFeedMetricsUserCountSingle:e.query({query:e=>({url:"/api/v1/admin/feed/metrics/user-count-single",params:{operation:e.operation,ownerType:e.ownerType,window:e.window}})}),postApiV1AdminFeedRegenerateUserFeed:e.mutation({query:e=>({url:"/api/v1/admin/feed/regenerate-user-feed",method:"POST",params:{ownerType:e.ownerType,userId:e.userId,username:e.username}})}),postApiV1AdminPostsDelete:e.mutation({query:e=>({url:"/api/v1/admin/posts/delete",method:"POST",body:e.postDelete})}),deleteApiV1AdminPurge:e.mutation({query:e=>({url:"/api/v1/admin/purge",method:"DELETE",params:{id:e.id}})}),postApiV1AdminRegenerateKeys:e.mutation({query:e=>({url:"/api/v1/admin/regenerate-keys",method:"POST",params:{userId:e.userId,username:e.username}})}),postApiV1AdminRegenerateKeysAll:e.mutation({query:e=>({url:"/api/v1/admin/regenerate-keys-all",method:"POST",params:{batch:e.batch}})}),postApiV1AdminReportsDeletePosts:e.mutation({query:e=>({url:"/api/v1/admin/reports/delete-posts",method:"POST",body:e.body})}),getApiV1AdminReportsList:e.query({query:e=>({url:"/api/v1/admin/reports/list",params:{groupId:e.groupId,lastId:e.lastId,limit:e.limit,offset:e.offset,open:e.open,postId:e.postId,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId}})}),getApiV1AdminReportsByReportId:e.query({query:e=>({url:`/api/v1/admin/reports/${e.reportId}`})}),postApiV1AdminReportsByReportIdAddNote:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/add-note`,method:"POST",body:e.body})}),postApiV1AdminReportsByReportIdAssignToSelf:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/assign-to-self`,method:"POST"})}),deleteApiV1AdminReportsByReportIdDelete:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/delete`,method:"DELETE"})}),postApiV1AdminReportsByReportIdRemoveNote:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/remove-note`,method:"POST",params:{index:e.index}})}),postApiV1AdminReportsByReportIdReopen:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/reopen`,method:"POST"})}),postApiV1AdminReportsByReportIdResolve:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/resolve`,method:"POST"})}),postApiV1AdminReportsByReportIdUnassign:e.mutation({query:e=>({url:`/api/v1/admin/reports/${e.reportId}/unassign`,method:"POST"})}),postApiV1AdminRestartApDelivery:e.mutation({query:e=>({url:"/api/v1/admin/restart-ap-delivery",method:"POST",params:{domain:e.domain}})}),getApiV1AdminSearch:e.query({query:e=>({url:"/api/v1/admin/search",params:{accountId:e.accountId,country:e.country,displayName:e.displayName,domain:e.domain,email:e.email,ip:e.ip,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,state:e.state,untilId:e.untilId,userId:e.userId,username:e.username}})}),putApiV1AdminSignupRequestsApproveByHash:e.mutation({query:e=>({url:`/api/v1/admin/signup_requests/approve/${e.hash}`,method:"PUT"})}),deleteApiV1AdminSignupRequestsDeleteByHash:e.mutation({query:e=>({url:`/api/v1/admin/signup_requests/delete/${e.hash}`,method:"DELETE"})}),getApiV1AdminSignupRequestsList:e.query({query:e=>({url:"/api/v1/admin/signup_requests/list",params:{email:e.email,hash:e.hash,ip:e.ip,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),putApiV1AdminSignupRequestsRejectByHash:e.mutation({query:e=>({url:`/api/v1/admin/signup_requests/reject/${e.hash}`,method:"PUT",params:{reason:e.reason}})}),getApiV1AdminUploadsJobsQueueByQueueName:e.query({query:e=>({url:`/api/v1/admin/uploads/jobs/queue/${e.queueName}`,params:{limit:e.limit,page:e.page,sortBy:e.sortBy,sortOrder:e.sortOrder,uploadType:e.uploadType}})}),getApiV1AdminUploadsJobsSummary:e.query({query:()=>({url:"/api/v1/admin/uploads/jobs/summary"})}),getApiV1AdminUploadsSearch:e.query({query:e=>({url:"/api/v1/admin/uploads/search",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,tag:e.tag,untilId:e.untilId,uploadType:e.uploadType,userId:e.userId}})}),getApiV1AdminUploadsStorageByUserId:e.query({query:e=>({url:`/api/v1/admin/uploads/storage/${e.userId}`})}),postApiV1AdminUserChangeState:e.mutation({query:e=>({url:"/api/v1/admin/user/change-state",method:"POST",body:e.changeUserState})}),getApiV1AdminUserByUserId:e.query({query:e=>({url:`/api/v1/admin/user/${e.userId}`})}),postApiV1Apps:e.mutation({query:e=>({url:"/api/v1/apps",method:"POST",body:e.body,params:{enable:e.enable}})}),getApiV1Apps:e.query({query:()=>({url:"/api/v1/apps"})}),getApiV1AppsEnabled:e.query({query:()=>({url:"/api/v1/apps/enabled"})}),getApiV1AppsGroupByGroupId:e.query({query:e=>({url:`/api/v1/apps/group/${e.groupId}`})}),deleteApiV1AppsGroupByGroupIdAndAppId:e.mutation({query:e=>({url:`/api/v1/apps/group/${e.groupId}/${e.appId}`,method:"DELETE"})}),putApiV1AppsGroupByGroupIdAndAppId:e.mutation({query:e=>({url:`/api/v1/apps/group/${e.groupId}/${e.appId}`,method:"PUT"})}),getApiV1AppsInstalled:e.query({query:()=>({url:"/api/v1/apps/installed"})}),getApiV1AppsUser:e.query({query:()=>({url:"/api/v1/apps/user"})}),deleteApiV1AppsUserByAppId:e.mutation({query:e=>({url:`/api/v1/apps/user/${e.appId}`,method:"DELETE"})}),putApiV1AppsUserByAppId:e.mutation({query:e=>({url:`/api/v1/apps/user/${e.appId}`,method:"PUT"})}),putApiV1AppsByAppId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}`,method:"PUT",body:e.body,params:{enable:e.enable}})}),getApiV1AppsByAppId:e.query({query:e=>({url:`/api/v1/apps/${e.appId}`})}),deleteApiV1AppsByAppId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}`,method:"DELETE"})}),getApiV1AppsByAppIdData:e.query({query:e=>({url:`/api/v1/apps/${e.appId}/data`,params:{owner:e.owner,tags:e.tags,type:e.type}})}),postApiV1AppsByAppIdData:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/data`,method:"POST",body:e.dataCreate})}),putApiV1AppsByAppIdDataAndId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/data/${e.id}`,method:"PUT",body:e.dataCreate})}),deleteApiV1AppsByAppIdDataAndId:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/data/${e.id}`,method:"DELETE"})}),putApiV1AppsByAppIdDefault:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/default`,method:"PUT"})}),putApiV1AppsByAppIdDisable:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/disable`,method:"PUT"})}),putApiV1AppsByAppIdEnable:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/enable`,method:"PUT"})}),getApiV1AppsByAppIdStats:e.query({query:e=>({url:`/api/v1/apps/${e.appId}/stats`})}),putApiV1AppsByAppIdUserDefault:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/user-default`,method:"PUT"})}),deleteApiV1AppsByAppIdUserDefault:e.mutation({query:e=>({url:`/api/v1/apps/${e.appId}/user-default`,method:"DELETE"})}),getApiV1Block:e.query({query:e=>({url:"/api/v1/block",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1BlockBy:e.query({query:e=>({url:"/api/v1/block/by",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1BlockByUserId:e.mutation({query:e=>({url:`/api/v1/block/${e.userId}`,method:"DELETE"})}),postApiV1BlockByUserId:e.mutation({query:e=>({url:`/api/v1/block/${e.userId}`,method:"POST"})}),postApiV1Categories:e.mutation({query:e=>({url:"/api/v1/categories",method:"POST",body:e.categoryCreate})}),getApiV1CategoriesNameByCategoryName:e.query({query:e=>({url:`/api/v1/categories/name/${e.categoryName}`})}),putApiV1CategoriesByCategoryId:e.mutation({query:e=>({url:`/api/v1/categories/${e.categoryId}`,method:"PUT",body:e.categoryUpdate})}),getApiV1CategoriesByCategoryId:e.query({query:e=>({url:`/api/v1/categories/${e.categoryId}`})}),deleteApiV1CategoriesByCategoryId:e.mutation({query:e=>({url:`/api/v1/categories/${e.categoryId}`,method:"DELETE"})}),getApiV1CustomEmojis:e.query({query:e=>({url:"/api/v1/custom_emojis",params:{shortcode:e.shortcode}})}),deleteApiV1CustomEmojis:e.mutation({query:e=>({url:"/api/v1/custom_emojis",method:"DELETE",params:{shortcode:e.shortcode,category:e.category}})}),postApiV1CustomEmojis:e.mutation({query:e=>({url:"/api/v1/custom_emojis",method:"POST",body:e.emoji,params:{overwrite:e.overwrite}})}),getApiV1CustomEmojisExport:e.query({query:e=>({url:"/api/v1/custom_emojis/export",params:{category:e.category}})}),postApiV1CustomEmojisImport:e.mutation({query:e=>({url:"/api/v1/custom_emojis/import",method:"POST",body:e.body,params:{visible:e.visible,category:e.category,overwrite:e.overwrite,domain:e.domain}})}),getApiV1CustomEmojisSearch:e.query({query:e=>({url:"/api/v1/custom_emojis/search",params:{shortcode:e.shortcode}})}),postApiV1CustomEmojisUpload:e.mutation({query:e=>({url:"/api/v1/custom_emojis/upload",method:"POST",body:e.body,params:{shortcode:e.shortcode,visible:e.visible,category:e.category,overwrite:e.overwrite,domain:e.domain}})}),getApiV1Data:e.query({query:e=>({url:"/api/v1/data",params:{owner:e.owner,tags:e.tags,type:e.type}})}),postApiV1Data:e.mutation({query:e=>({url:"/api/v1/data",method:"POST",body:e.dataCreate})}),putApiV1DataById:e.mutation({query:e=>({url:`/api/v1/data/${e.id}`,method:"PUT",body:e.dataCreate})}),deleteApiV1DataById:e.mutation({query:e=>({url:`/api/v1/data/${e.id}`,method:"DELETE"})}),getApiV1Events:e.query({query:e=>({url:"/api/v1/events",params:{limit:e.limit,offset:e.offset,organizerId:e.organizerId,ownerId:e.ownerId,username:e.username}})}),postApiV1Events:e.mutation({query:e=>({url:"/api/v1/events",method:"POST",body:e.createEvent})}),getApiV1EventsFollowing:e.query({query:e=>({url:"/api/v1/events/following",params:{limit:e.limit,offset:e.offset}})}),getApiV1EventsMy:e.query({query:e=>({url:"/api/v1/events/my",params:{limit:e.limit,notRespondedOnly:e.notRespondedOnly,offset:e.offset,organizedOnly:e.organizedOnly,past:e.past}})}),putApiV1EventsByEventId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}`,method:"PUT",body:e.updateEvent})}),getApiV1EventsByEventId:e.query({query:e=>({url:`/api/v1/events/${e.eventId}`})}),deleteApiV1EventsByEventId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}`,method:"DELETE"})}),postApiV1EventsByEventIdAccept:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/accept`,method:"POST"})}),getApiV1EventsByEventIdAttendees:e.query({query:e=>({url:`/api/v1/events/${e.eventId}/attendees`,params:{limit:e.limit,offset:e.offset}})}),deleteApiV1EventsByEventIdAttendeesAndUserId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/attendees/${e.userId}`,method:"DELETE"})}),postApiV1EventsByEventIdAttendeesAndUserId:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/attendees/${e.userId}`,method:"POST"})}),postApiV1EventsByEventIdCancel:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/cancel`,method:"POST"})}),postApiV1EventsByEventIdInterested:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/interested`,method:"POST"})}),postApiV1EventsByEventIdJoin:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/join`,method:"POST"})}),deleteApiV1EventsByEventIdLeave:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/leave`,method:"DELETE"})}),postApiV1EventsByEventIdMaybe:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/maybe`,method:"POST"})}),getApiV1EventsByEventIdMutual:e.query({query:e=>({url:`/api/v1/events/${e.eventId}/mutual`,params:{limit:e.limit,offset:e.offset}})}),postApiV1EventsByEventIdReject:e.mutation({query:e=>({url:`/api/v1/events/${e.eventId}/reject`,method:"POST"})}),postApiV1FaspClear:e.mutation({query:()=>({url:"/api/v1/fasp/clear",method:"POST"})}),getApiV1FaspDebugV0CallbackCallbacks:e.query({query:()=>({url:"/api/v1/fasp/debug/v0/callback/callbacks"})}),deleteApiV1FaspDebugV0CallbackCallbacksById:e.mutation({query:e=>({url:`/api/v1/fasp/debug/v0/callback/callbacks/${e.id}`,method:"DELETE"})}),postApiV1FaspRegistration:e.mutation({query:e=>({url:"/api/v1/fasp/registration",method:"POST",body:e.registrationRequest})}),postApiV1FaspByProviderIdCapabilities:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/capabilities`,method:"POST",body:e.body})}),postApiV1FaspByProviderIdDebugCall:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/debug-call`,method:"POST",body:e.body})}),getApiV1FaspByProviderIdRegistrationFinish:e.query({query:e=>({url:`/api/v1/fasp/${e.providerId}/registration-finish`})}),postApiV1FaspByProviderIdRegistrationFinish:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/registration-finish`,method:"POST"})}),postApiV1FaspByProviderIdRequestBackfill:e.mutation({query:e=>({url:`/api/v1/fasp/${e.providerId}/request_backfill`,method:"POST",params:{category:e.category}})}),putApiV1ForumsByForumId:e.mutation({query:e=>({url:`/api/v1/forums/${e.forumId}`,method:"PUT",body:e.createForum})}),getApiV1ForumsByForumId:e.query({query:e=>({url:`/api/v1/forums/${e.forumId}`})}),deleteApiV1ForumsByForumId:e.mutation({query:e=>({url:`/api/v1/forums/${e.forumId}`,method:"DELETE"})}),getApiV1ForumsByForumIdCategories:e.query({query:e=>({url:`/api/v1/forums/${e.forumId}/categories`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1ForumsByForumIdPosts:e.query({query:e=>({url:`/api/v1/forums/${e.forumId}/posts`,params:{forumTag:e.forumTag,includeBookmarkStatus:e.includeBookmarkStatus,includeFollowStatus:e.includeFollowStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withTranslation:e.withTranslation,htmlContent:e.htmlContent}})}),getApiV1ForumsByForumIdTags:e.query({query:e=>({url:`/api/v1/forums/${e.forumId}/tags`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1ForumsByForumIdTagsSearch:e.query({query:e=>({url:`/api/v1/forums/${e.forumId}/tags/search`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,q:e.q,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1Geo:e.query({query:e=>({url:"/api/v1/geo",params:{latitude:e.latitude,longitude:e.longitude}})}),getApiV1Groups:e.query({query:e=>({url:"/api/v1/groups",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1Groups:e.mutation({query:e=>({url:"/api/v1/groups",method:"POST",body:e.groupCreate})}),getApiV1GroupsAccount:e.query({query:e=>({url:"/api/v1/groups/account",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsMemberByUserId:e.query({query:e=>({url:`/api/v1/groups/member/${e.userId}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsMemberByUserIdGroups:e.query({query:e=>({url:`/api/v1/groups/member/${e.userId}/groups`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1GroupsNameByGroupname:e.query({query:e=>({url:`/api/v1/groups/name/${e.groupname}`})}),getApiV1GroupsSearch:e.query({query:e=>({url:"/api/v1/groups/search",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,substring:e.substring,untilId:e.untilId}})}),putApiV1GroupsByGroupId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}`,method:"PUT",body:e.groupUpdate})}),getApiV1GroupsByGroupId:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}`})}),deleteApiV1GroupsByGroupId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}`,method:"DELETE"})}),getApiV1GroupsByGroupIdForum:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/forum`})}),postApiV1GroupsByGroupIdForum:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/forum`,method:"POST"})}),postApiV1GroupsByGroupIdJoin:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/join`,method:"POST"})}),putApiV1GroupsByGroupIdMedia:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/media`,method:"PUT",body:e.groupMediaUpdate})}),putApiV1GroupsByGroupIdMembers:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/members`,method:"PUT",body:e.groupMemberUpdate})}),getApiV1GroupsByGroupIdMembers:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/members`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),postApiV1GroupsByGroupIdMembers:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/members`,method:"POST",body:e.groupMemberCreate})}),deleteApiV1GroupsByGroupIdMembersAndMemberId:e.mutation({query:e=>({url:`/api/v1/groups/${e.groupId}/members/${e.memberId}`,method:"DELETE"})}),getApiV1GroupsByGroupIdUsers:e.query({query:e=>({url:`/api/v1/groups/${e.groupId}/users`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1Import:e.query({query:()=>({url:"/api/v1/import"})}),postApiV1Import:e.mutation({query:e=>({url:"/api/v1/import",method:"POST",body:e.body,params:{overwrite:e.overwrite,type:e.type}})}),postApiV1ImportStartById:e.mutation({query:e=>({url:`/api/v1/import/start/${e.id}`,method:"POST"})}),getApiV1ImportById:e.query({query:e=>({url:`/api/v1/import/${e.id}`})}),getApiV1Instance:e.query({query:()=>({url:"/api/v1/instance"})}),getApiV1InstanceCountries:e.query({query:()=>({url:"/api/v1/instance/countries"})}),getApiV1InstanceDomains:e.query({query:e=>({url:"/api/v1/instance/domains",params:{domain:e.domain,limit:e.limit,software:e.software}})}),getApiV1InstanceExtendedDescription:e.query({query:()=>({url:"/api/v1/instance/extended_description"})}),getApiV1InstanceSupportedLanguages:e.query({query:()=>({url:"/api/v1/instance/supported_languages"})}),getApiV1InstanceTimezones:e.query({query:()=>({url:"/api/v1/instance/timezones"})}),getApiV1JobsListJobs:e.query({query:e=>({url:"/api/v1/jobs/list-jobs",params:{limit:e.limit,offset:e.offset}})}),getApiV1JobsListStats:e.query({query:e=>({url:"/api/v1/jobs/list-stats",params:{queue:e.queue}})}),getApiV1JobsListStatsAll:e.query({query:()=>({url:"/api/v1/jobs/list-stats-all"})}),getApiV1JobsLists:e.query({query:e=>({url:"/api/v1/jobs/lists",params:{limit:e.limit,listKind:e.listKind,offset:e.offset,queue:e.queue}})}),getApiV1JobsStats:e.query({query:()=>({url:"/api/v1/jobs/stats"})}),getApiV1JobsStatsPerDay:e.query({query:e=>({url:"/api/v1/jobs/stats-per-day",params:{lastDays:e.lastDays,queue:e.queue}})}),getApiV1Links:e.query({query:e=>({url:"/api/v1/links",params:{url:e.url}})}),getApiV1Lists:e.query({query:()=>({url:"/api/v1/lists"})}),postApiV1Lists:e.mutation({query:e=>({url:"/api/v1/lists",method:"POST",body:e.userListCreate})}),putApiV1ListsByListId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}`,method:"PUT",body:e.userListCreate})}),getApiV1ListsByListId:e.query({query:e=>({url:`/api/v1/lists/${e.listId}`})}),deleteApiV1ListsByListId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}`,method:"DELETE"})}),getApiV1ListsByListIdUsers:e.query({query:e=>({url:`/api/v1/lists/${e.listId}/users`})}),deleteApiV1ListsByListIdUsersAndUserId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}/users/${e.userId}`,method:"DELETE"})}),postApiV1ListsByListIdUsersAndUserId:e.mutation({query:e=>({url:`/api/v1/lists/${e.listId}/users/${e.userId}`,method:"POST"})}),getApiV1Metrics:e.query({query:e=>({url:"/api/v1/metrics",params:{from:e.from,period:e.period,to:e.to}})}),getApiV1MetricsTotals:e.query({query:()=>({url:"/api/v1/metrics/totals"})}),getApiV1Mute:e.query({query:e=>({url:"/api/v1/mute",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),deleteApiV1MuteByUserId:e.mutation({query:e=>({url:`/api/v1/mute/${e.userId}`,method:"DELETE"})}),postApiV1MuteByUserId:e.mutation({query:e=>({url:`/api/v1/mute/${e.userId}`,method:"POST",params:{duration:e.duration}})}),putApiV1Notes:e.mutation({query:e=>({url:"/api/v1/notes",method:"PUT",body:e.noteUpdate})}),getApiV1Notes:e.query({query:e=>({url:"/api/v1/notes",params:{userIds:e.userIds}})}),deleteApiV1NotesByUserId:e.mutation({query:e=>({url:`/api/v1/notes/${e.userId}`,method:"DELETE"})}),getApiV1Notifications:e.query({query:e=>({url:"/api/v1/notifications",params:{excludeTypes:e.excludeTypes,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,types:e.types,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1NotificationsCount:e.query({query:e=>({url:"/api/v1/notifications/count",params:{excludeTypes:e.excludeTypes,status:e.status,types:e.types}})}),postApiV1NotificationsMarkAll:e.mutation({query:e=>({url:"/api/v1/notifications/mark-all",method:"POST",params:{status:e.status}})}),getApiV1NotificationsById:e.query({query:e=>({url:`/api/v1/notifications/${e.id}`,params:{htmlContent:e.htmlContent}})}),postApiV1NotificationsByIdMark:e.mutation({query:e=>({url:`/api/v1/notifications/${e.id}/mark`,method:"POST",params:{status:e.status,htmlContent:e.htmlContent}})}),postApiV1PollsByPollIdRefresh:e.mutation({query:e=>({url:`/api/v1/polls/${e.pollId}/refresh`,method:"POST"})}),postApiV1PollsByPollIdVote:e.mutation({query:e=>({url:`/api/v1/polls/${e.pollId}/vote`,method:"POST",body:e.body})}),getApiV1Posts:e.query({query:e=>({url:"/api/v1/posts",params:{bookmarkedOnly:e.bookmarkedOnly,forumTag:e.forumTag,includeBookmarkStatus:e.includeBookmarkStatus,includeComments:e.includeComments,includeFollowStatus:e.includeFollowStatus,includeReply:e.includeReply,lastId:e.lastId,limit:e.limit,limitFirstLevelComments:e.limitFirstLevelComments,limitSecondLevelComments:e.limitSecondLevelComments,listId:e.listId,maxLevel:e.maxLevel,minLevel:e.minLevel,offset:e.offset,ownerId:e.ownerId,ownerType:e.ownerType,pinned:e.pinned,repostKind:e.repostKind,repostOf:e.repostOf,repostsOnly:e.repostsOnly,search:e.search,skipReposts:e.skipReposts,sortBy:e.sortBy,sortOrder:e.sortOrder,tag:e.tag,untilId:e.untilId,userId:e.userId,username:e.username,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,withTrends:e.withTrends,htmlContent:e.htmlContent}})}),postApiV1Posts:e.mutation({query:e=>({url:"/api/v1/posts",method:"POST",body:e.createPost,params:{htmlContent:e.htmlContent}})}),getApiV1PostsBookmarks:e.query({query:()=>({url:"/api/v1/posts/bookmarks"})}),getApiV1PostsFollowing:e.query({query:e=>({url:"/api/v1/posts/following",params:{ignoreCache:e.ignoreCache,includeBookmarkStatus:e.includeBookmarkStatus,includeFollowStatus:e.includeFollowStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,ownerType:e.ownerType,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,htmlContent:e.htmlContent}})}),getApiV1PostsLiked:e.query({query:e=>({url:"/api/v1/posts/liked",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,ownerType:e.ownerType,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1PostsMentioned:e.query({query:e=>({url:"/api/v1/posts/mentioned",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,ownerType:e.ownerType,private:e.private,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1PostsMy:e.query({query:e=>({url:"/api/v1/posts/my",params:{bookmarkedOnly:e.bookmarkedOnly,includeBookmarkStatus:e.includeBookmarkStatus,includeComments:e.includeComments,lastId:e.lastId,limit:e.limit,offset:e.offset,repostsOnly:e.repostsOnly,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),getApiV1PostsPins:e.query({query:e=>({url:"/api/v1/posts/pins",params:{postOnly:e.postOnly}})}),deleteApiV1PostsPinsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/pins/${e.postId}`,method:"DELETE"})}),postApiV1PostsPinsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/pins/${e.postId}`,method:"POST"})}),getApiV1PostsPublic:e.query({query:e=>({url:"/api/v1/posts/public",params:{includeBookmarkStatus:e.includeBookmarkStatus,includeFollowStatus:e.includeFollowStatus,lastId:e.lastId,limit:e.limit,local:e.local,offset:e.offset,ownerType:e.ownerType,skipReposts:e.skipReposts,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,withTrends:e.withTrends,htmlContent:e.htmlContent}})}),getApiV1PostsReplies:e.query({query:e=>({url:"/api/v1/posts/replies",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,userId:e.userId,username:e.username,htmlContent:e.htmlContent}})}),getApiV1PostsSubscribe:e.query({query:e=>({url:"/api/v1/posts/subscribe",params:{htmlContent:e.htmlContent}})}),putApiV1PostsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}`,method:"PUT",body:e.createPost,params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostId:e.query({query:e=>({url:`/api/v1/posts/${e.postId}`,params:{includeBookmarkStatus:e.includeBookmarkStatus,limitFirstLevelComments:e.limitFirstLevelComments,limitSecondLevelComments:e.limitSecondLevelComments,maxLevel:e.maxLevel,minLevel:e.minLevel,withComments:e.withComments,withParents:e.withParents,withRepostedBy:e.withRepostedBy,withTranslation:e.withTranslation,withTrends:e.withTrends,htmlContent:e.htmlContent}})}),deleteApiV1PostsByPostId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}`,method:"DELETE"})}),deleteApiV1PostsByPostIdBookmark:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/bookmark`,method:"DELETE"})}),postApiV1PostsByPostIdBookmark:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/bookmark`,method:"POST"})}),getApiV1PostsByPostIdComments:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/comments`,params:{lastId:e.lastId,limit:e.limit,limitFirstLevelComments:e.limitFirstLevelComments,limitSecondLevelComments:e.limitSecondLevelComments,maxLevel:e.maxLevel,minLevel:e.minLevel,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),postApiV1PostsByPostIdComments:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/comments`,method:"POST",body:e.createPost,params:{htmlContent:e.htmlContent}})}),putApiV1PostsByPostIdCommentsAndCommentId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/comments/${e.commentId}`,method:"PUT",body:e.createPost,params:{htmlContent:e.htmlContent}})}),deleteApiV1PostsByPostIdCommentsAndCommentId:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/comments/${e.commentId}`,method:"DELETE"})}),postApiV1PostsByPostIdDetach:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/detach`,method:"POST"})}),getApiV1PostsByPostIdEdits:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/edits`,params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostIdLikes:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/likes`,params:{includeFollowedStatus:e.includeFollowedStatus,includeFollowingStatus:e.includeFollowingStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),deleteApiV1PostsByPostIdLikes:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/likes`,method:"DELETE"})}),postApiV1PostsByPostIdLikes:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/likes`,method:"POST"})}),postApiV1PostsByPostIdRefreshCard:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/refresh-card`,method:"POST"})}),deleteApiV1PostsByPostIdRepost:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/repost`,method:"DELETE"})}),postApiV1PostsByPostIdRepost:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/repost`,method:"POST",body:e.createPost,params:{htmlContent:e.htmlContent}})}),getApiV1PostsByPostIdReposts:e.query({query:e=>({url:`/api/v1/posts/${e.postId}/reposts`,params:{includeFollowedStatus:e.includeFollowedStatus,includeFollowingStatus:e.includeFollowingStatus,kind:e.kind,lastId:e.lastId,limit:e.limit,offset:e.offset,skipDuplicates:e.skipDuplicates,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,htmlContent:e.htmlContent}})}),postApiV1PostsByPostIdSubscribe:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/subscribe`,method:"POST"})}),deleteApiV1PostsByPostIdSubscribe:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/subscribe`,method:"DELETE"})}),postApiV1PostsByPostIdTranslate:e.mutation({query:e=>({url:`/api/v1/posts/${e.postId}/translate`,method:"POST",params:{htmlContent:e.htmlContent,lang:e.lang}})}),getApiV1Rbac:e.query({query:()=>({url:"/api/v1/rbac"})}),getApiV1RbacActorsByActorIdPermissions:e.query({query:e=>({url:`/api/v1/rbac/actors/${e.actorId}/permissions`,params:{scope:e.scope}})}),getApiV1RbacActorsByActorIdRoles:e.query({query:e=>({url:`/api/v1/rbac/actors/${e.actorId}/roles`,params:{scope:e.scope}})}),putApiV1RbacRolesByRoleId:e.mutation({query:e=>({url:`/api/v1/rbac/roles/${e.roleId}`,method:"PUT",body:e.rbacRoleTemplate})}),getApiV1RbacScopesByScopeRoles:e.query({query:e=>({url:`/api/v1/rbac/scopes/${e.scope}/roles`})}),postApiV1RbacScopesByScopeRoles:e.mutation({query:e=>({url:`/api/v1/rbac/scopes/${e.scope}/roles`,method:"POST",body:e.rbacRoleTemplate})}),deleteApiV1RbacScopesByScopeRolesAndRoleName:e.mutation({query:e=>({url:`/api/v1/rbac/scopes/${e.scope}/roles/${e.roleName}`,method:"DELETE"})}),getApiV1RbacByResource:e.query({query:e=>({url:`/api/v1/rbac/${e.resource}`})}),postApiV1Reports:e.mutation({query:e=>({url:"/api/v1/reports",method:"POST",body:e.createReport})}),putApiV1Rules:e.mutation({query:e=>({url:"/api/v1/rules",method:"PUT",body:e.rule})}),getApiV1Rules:e.query({query:()=>({url:"/api/v1/rules"})}),postApiV1Rules:e.mutation({query:e=>({url:"/api/v1/rules",method:"POST",params:{hint:e.hint,ordering:e.ordering,text:e.text}})}),postApiV1RulesReorder:e.mutation({query:e=>({url:"/api/v1/rules/reorder",method:"POST",body:e.body})}),deleteApiV1RulesById:e.mutation({query:e=>({url:`/api/v1/rules/${e.id}`,method:"DELETE"})}),getApiV1Search:e.query({query:e=>({url:"/api/v1/search",params:{actorType:e.actorType,fasp:e.fasp,filter:e.filter,followStatus:e.followStatus,followers:e.followers,following:e.following,lastId:e.lastId,limit:e.limit,offset:e.offset,ownerType:e.ownerType,q:e.q,resolve:e.resolve,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId,withComments:e.withComments,withParent:e.withParent,htmlContent:e.htmlContent}})}),deleteApiV1SessionsAll:e.mutation({query:()=>({url:"/api/v1/sessions/all",method:"DELETE"})}),getApiV1SessionsList:e.query({query:()=>({url:"/api/v1/sessions/list"})}),putApiV1SessionsRevokeAll:e.mutation({query:()=>({url:"/api/v1/sessions/revoke/all",method:"PUT"})}),putApiV1SessionsRevokeBySessionKey:e.mutation({query:e=>({url:`/api/v1/sessions/revoke/${e.sessionKey}`,method:"PUT"})}),deleteApiV1SessionsBySessionKey:e.mutation({query:e=>({url:`/api/v1/sessions/${e.sessionKey}`,method:"DELETE"})}),putApiV1Settings:e.mutation({query:e=>({url:"/api/v1/settings",method:"PUT",body:e.platformSettings})}),getApiV1Settings:e.query({query:e=>({url:"/api/v1/settings",params:{keys:e.keys}})}),deleteApiV1Settings:e.mutation({query:e=>({url:"/api/v1/settings",method:"DELETE",params:{keys:e.keys}})}),putApiV1SettingsUser:e.mutation({query:e=>({url:"/api/v1/settings/user",method:"PUT",body:e.userSettings})}),getApiV1SettingsUser:e.query({query:e=>({url:"/api/v1/settings/user",params:{keys:e.keys}})}),deleteApiV1SettingsUser:e.mutation({query:e=>({url:"/api/v1/settings/user",method:"DELETE",params:{keys:e.keys}})}),getApiV1TagsFeatured:e.query({query:e=>({url:"/api/v1/tags/featured",params:{userId:e.userId}})}),deleteApiV1TagsFeaturedByName:e.mutation({query:e=>({url:`/api/v1/tags/featured/${e.name}`,method:"DELETE"})}),postApiV1TagsFeaturedByName:e.mutation({query:e=>({url:`/api/v1/tags/featured/${e.name}`,method:"POST"})}),postApiV1TagsFollowByName:e.mutation({query:e=>({url:`/api/v1/tags/follow/${e.name}`,method:"POST"})}),getApiV1TagsFollowed:e.query({query:()=>({url:"/api/v1/tags/followed"})}),getApiV1TagsTrending:e.query({query:()=>({url:"/api/v1/tags/trending"})}),postApiV1TagsUnfollowByName:e.mutation({query:e=>({url:`/api/v1/tags/unfollow/${e.name}`,method:"POST"})}),getApiV1TagsByName:e.query({query:e=>({url:`/api/v1/tags/${e.name}`,params:{historySince:e.historySince}})}),postApiV1TranslateText:e.mutation({query:e=>({url:"/api/v1/translate/text",method:"POST",body:e.translationRequest})}),getApiV1TrendsLinks:e.query({query:()=>({url:"/api/v1/trends/links"})}),getApiV1TrendsPosts:e.query({query:e=>({url:"/api/v1/trends/posts",params:{htmlContent:e.htmlContent}})}),getApiV1TrendsTags:e.query({query:()=>({url:"/api/v1/trends/tags"})}),postApiV1Uploads:e.mutation({query:e=>({url:"/api/v1/uploads",method:"POST",body:e.createUpload})}),postApiV1UploadsBatch:e.mutation({query:e=>({url:"/api/v1/uploads/batch",method:"POST",body:e.body})}),postApiV1UploadsList:e.mutation({query:e=>({url:"/api/v1/uploads/list",method:"POST",body:e.uploadList})}),getApiV1UploadsSearch:e.query({query:e=>({url:"/api/v1/uploads/search",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,tag:e.tag,untilId:e.untilId,uploadType:e.uploadType}})}),getApiV1UploadsUsages:e.query({query:e=>({url:"/api/v1/uploads/usages",params:{ids:e.ids}})}),getApiV1UploadsById:e.query({query:e=>({url:`/api/v1/uploads/${e.id}`})}),deleteApiV1UploadsById:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}`,method:"DELETE"})}),postApiV1UploadsByIdMeta:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/meta`,method:"POST",body:e.body})}),putApiV1UploadsByIdMeta:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/meta`,method:"PUT",body:e.body})}),postApiV1UploadsByIdTags:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/tags`,method:"POST",body:e.body})}),putApiV1UploadsByIdTags:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/tags`,method:"PUT",body:e.body})}),postApiV1UploadsByIdThumbnail:e.mutation({query:e=>({url:`/api/v1/uploads/${e.id}/thumbnail`,method:"POST",body:e.changeVideoThumbnail})}),getApiV1UserAlias:e.query({query:()=>({url:"/api/v1/user-alias"})}),deleteApiV1UserAlias:e.mutation({query:e=>({url:"/api/v1/user-alias",method:"DELETE",params:{uri:e.uri}})}),postApiV1UserAlias:e.mutation({query:e=>({url:"/api/v1/user-alias",method:"POST",params:{acct:e.acct}})}),getApiV1UserDomainBlock:e.query({query:()=>({url:"/api/v1/user-domain-block"})}),deleteApiV1UserDomainBlockByDomain:e.mutation({query:e=>({url:`/api/v1/user-domain-block/${e.domain}`,method:"DELETE"})}),postApiV1UserDomainBlockByDomain:e.mutation({query:e=>({url:`/api/v1/user-domain-block/${e.domain}`,method:"POST"})}),deleteApiV1Users:e.mutation({query:e=>({url:"/api/v1/users",method:"DELETE",params:{id:e.id,name:e.name}})}),postApiV1Users:e.mutation({query:e=>({url:"/api/v1/users",method:"POST",body:e.userCreate,params:{account_id:e.accountId,email:e.email,htmlContent:e.htmlContent}})}),getApiV1Users:e.query({query:e=>({url:"/api/v1/users",params:{full:e.full,username:e.username,htmlContent:e.htmlContent}})}),getApiV1UsersCheck:e.query({query:e=>({url:"/api/v1/users/check",params:{username:e.username}})}),getApiV1UsersConnections:e.query({query:e=>({url:"/api/v1/users/connections",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),postApiV1UsersFollowByUsername:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}`,method:"POST",params:{domain:e.domain,mutual:e.mutual,scheme:e.scheme}})}),postApiV1UsersFollowByUsernameAccept:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/accept`,method:"POST"})}),postApiV1UsersFollowByUsernamePend:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/pend`,method:"POST"})}),postApiV1UsersFollowByUsernameReject:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/reject`,method:"POST"})}),postApiV1UsersFollowByUsernameUndo:e.mutation({query:e=>({url:`/api/v1/users/follow/${e.username}/undo`,method:"POST",params:{domain:e.domain,mutual:e.mutual,scheme:e.scheme}})}),getApiV1UsersFollowees:e.query({query:e=>({url:"/api/v1/users/followees",params:{anyStatus:e.anyStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersFollowers:e.query({query:e=>({url:"/api/v1/users/followers",params:{anyStatus:e.anyStatus,lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),postApiV1UsersInvite:e.mutation({query:e=>({url:"/api/v1/users/invite",method:"POST",params:{entity:e.entity,invitee:e.invitee,scheme:e.scheme}})}),postApiV1UsersInviteAccept:e.mutation({query:e=>({url:"/api/v1/users/invite/accept",method:"POST",params:{entity:e.entity,inviter:e.inviter,scheme:e.scheme}})}),getApiV1UsersInviteInviteeEntities:e.query({query:e=>({url:"/api/v1/users/invite/invitee/entities",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteInviteeEntitiesByInviterUser:e.query({query:e=>({url:`/api/v1/users/invite/invitee/entities/${e.inviterUser}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,scheme:e.scheme,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteInviteeInviters:e.query({query:e=>({url:"/api/v1/users/invite/invitee/inviters",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteInviteeInvitersByEntityUser:e.query({query:e=>({url:`/api/v1/users/invite/invitee/inviters/${e.entityUser}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,scheme:e.scheme,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteInviterEntities:e.query({query:e=>({url:"/api/v1/users/invite/inviter/entities",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteInviterInvitees:e.query({query:e=>({url:"/api/v1/users/invite/inviter/invitees",params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),getApiV1UsersInviteInviterInviteesByEntityUser:e.query({query:e=>({url:`/api/v1/users/invite/inviter/invitees/${e.entityUser}`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,scheme:e.scheme,sortBy:e.sortBy,sortOrder:e.sortOrder,status:e.status,untilId:e.untilId}})}),postApiV1UsersInviteReject:e.mutation({query:e=>({url:"/api/v1/users/invite/reject",method:"POST",params:{entity:e.entity,inviter:e.inviter,scheme:e.scheme}})}),postApiV1UsersInviteUndo:e.mutation({query:e=>({url:"/api/v1/users/invite/undo",method:"POST",params:{entity:e.entity,invitee:e.invitee,scheme:e.scheme}})}),getApiV1UsersRelationships:e.query({query:e=>({url:"/api/v1/users/relationships",params:{filter:e.filter,targets:e.targets}})}),getApiV1UsersRemoteByUserNameFullFollowers:e.query({query:e=>({url:`/api/v1/users/remote/${e.userNameFull}/followers`,params:{limit:e.limit,offset:e.offset}})}),getApiV1UsersRemoteByUserNameFullFollowing:e.query({query:e=>({url:`/api/v1/users/remote/${e.userNameFull}/following`,params:{limit:e.limit,offset:e.offset}})}),getApiV1UsersRenameHistory:e.query({query:()=>({url:"/api/v1/users/rename-history"})}),putApiV1UsersByUserId:e.mutation({query:e=>({url:`/api/v1/users/${e.userId}`,method:"PUT",body:e.userUpdate,params:{htmlContent:e.htmlContent}})}),getApiV1UsersByUserId:e.query({query:e=>({url:`/api/v1/users/${e.userId}`,params:{allowDeleted:e.allowDeleted,full:e.full,htmlContent:e.htmlContent}})}),getApiV1UsersByUserIdFollowers:e.query({query:e=>({url:`/api/v1/users/${e.userId}/followers`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),getApiV1UsersByUserIdFollowing:e.query({query:e=>({url:`/api/v1/users/${e.userId}/following`,params:{lastId:e.lastId,limit:e.limit,offset:e.offset,sortBy:e.sortBy,sortOrder:e.sortOrder,untilId:e.untilId}})}),putApiV1UsersByUserIdMedia:e.mutation({query:e=>({url:`/api/v1/users/${e.userId}/media`,method:"PUT",body:e.userUpdateMedia,params:{htmlContent:e.htmlContent}})})}),overrideExisting:!1}),{usePostApiV1AccountsAddReasonMutation:pHe,usePostApiV1AccountsAuthenticateEmailMutation:hHe,usePostApiV1AccountsAuthenticatePhoneMutation:mHe,usePutApiV1AccountsChangeNameMutation:gHe,usePostApiV1AccountsCheckCaptchaMutation:yHe,usePostApiV1AccountsConfirmEmailMutation:_He,usePostApiV1AccountsConfirmPhoneMutation:vHe,useDeleteApiV1AccountsDeleteMutation:bHe,usePostApiV1AccountsEmailChangeConfirmMutation:wHe,usePostApiV1AccountsEmailChangeRequestMutation:kHe,usePutApiV1AccountsEmailChangeResendCodeMutation:xHe,usePostApiV1AccountsFinishCreatingMutation:SHe,usePutApiV1AccountsGetTokenByHashMutation:EHe,usePostApiV1AccountsLoginsAddEmailPasswordMutation:CHe,usePostApiV1AccountsLoginsAddEmailPasswordConfirmMutation:RHe,usePutApiV1AccountsLoginsAddEmailPasswordResendCodeMutation:AHe,usePostApiV1AccountsLoginsAddPhoneMutation:THe,useDeleteApiV1AccountsLoginsRemoveEmailPasswordMutation:IHe,useDeleteApiV1AccountsLoginsRemovePhoneMutation:PHe,usePostApiV1AccountsPasswordChangeConfirmMutation:$He,usePostApiV1AccountsPasswordChangeRequestMutation:OHe,usePutApiV1AccountsPasswordChangeResendCodeMutation:zHe,usePostApiV1AccountsPasswordRecoverMutation:MHe,usePostApiV1AccountsPasswordRecoverChangeMutation:DHe,usePostApiV1AccountsPasswordRecoverCheckCodeMutation:NHe,usePostApiV1AccountsPhoneChangeConfirmAuthMutation:LHe,usePostApiV1AccountsPhoneChangeConfirmNewPhoneMutation:jHe,usePostApiV1AccountsPhoneChangeNewPhoneMutation:FHe,usePutApiV1AccountsPhoneChangeRequestMutation:BHe,usePutApiV1AccountsPhoneChangeResendCodeAuthMutation:VHe,usePutApiV1AccountsPhoneChangeResendCodeNewPhoneMutation:UHe,useGetApiV1AccountsProfileQuery:qHe,usePostApiV1AccountsReselectUserMutation:WHe,usePutApiV1AccountsResendCodeByHashMutation:HHe,usePutApiV1AccountsResendEmailByHashMutation:GHe,usePostApiV1AccountsSignupMutation:KHe,usePostApiV1AccountsSignupPhoneMutation:QHe,usePostApiV1AccountsUserReselectUserMutation:YHe,useGetApiV1AccountsByIdQuery:ZHe,useGetApiV1AddressesSuggestQuery:XHe,useGetApiV1AdminAccountByAccountIdQuery:JHe,useGetApiV1AdminAuditLogQuery:eGe,usePutApiV1AdminChangeEmailMutation:tGe,usePutApiV1AdminChangePasswordMutation:nGe,usePutApiV1AdminChangeRoleMutation:rGe,usePostApiV1AdminClearApErrorsMutation:aGe,usePostApiV1AdminCreateAccountMutation:oGe,useDeleteApiV1AdminDeleteMutation:iGe,useGetApiV1AdminDomainAllowQuery:sGe,usePostApiV1AdminDomainAllowMutation:cGe,useDeleteApiV1AdminDomainAllowByDomainMutation:lGe,usePutApiV1AdminDomainBlockMutation:fGe,useGetApiV1AdminDomainBlockQuery:uGe,usePostApiV1AdminDomainBlockMutation:dGe,useGetApiV1AdminDomainBlockListQuery:pGe,useDeleteApiV1AdminDomainBlockByDomainMutation:hGe,useGetApiV1AdminFederationQuery:mGe,useGetApiV1AdminFederationMetricsOperationsQuery:gGe,useGetApiV1AdminFederationMetricsRunningAverageSingleQuery:yGe,useGetApiV1AdminFederationMetricsRunningAveragesAllQuery:_Ge,useGetApiV1AdminFederationByDomainQuery:vGe,usePostApiV1AdminFeedClearUserFeedMutation:bGe,useGetApiV1AdminFeedMetricsGlobalAllOperationQuery:wGe,useGetApiV1AdminFeedMetricsGlobalAllOwnersQuery:kGe,useGetApiV1AdminFeedMetricsGlobalSingleQuery:xGe,useGetApiV1AdminFeedMetricsHistoryQuery:SGe,useGetApiV1AdminFeedMetricsHistoryAllQuery:EGe,useGetApiV1AdminFeedMetricsHistoryAllSingleOwnerQuery:CGe,useGetApiV1AdminFeedMetricsHistoryByOwnerTypeQuery:RGe,useGetApiV1AdminFeedMetricsRunningAverageSingleQuery:AGe,useGetApiV1AdminFeedMetricsRunningAveragesAllQuery:TGe,useGetApiV1AdminFeedMetricsSlowestOperationsQuery:IGe,useGetApiV1AdminFeedMetricsSlowestUsersQuery:PGe,useGetApiV1AdminFeedMetricsSlowestUsersAllQuery:$Ge,useGetApiV1AdminFeedMetricsSlowestUsersSingleQuery:OGe,useGetApiV1AdminFeedMetricsSummaryQuery:zGe,useGetApiV1AdminFeedMetricsUserCountAllQuery:MGe,useGetApiV1AdminFeedMetricsUserCountSingleQuery:DGe,usePostApiV1AdminFeedRegenerateUserFeedMutation:NGe,usePostApiV1AdminPostsDeleteMutation:LGe,useDeleteApiV1AdminPurgeMutation:jGe,usePostApiV1AdminRegenerateKeysMutation:FGe,usePostApiV1AdminRegenerateKeysAllMutation:BGe,usePostApiV1AdminReportsDeletePostsMutation:VGe,useGetApiV1AdminReportsListQuery:UGe,useGetApiV1AdminReportsByReportIdQuery:qGe,usePostApiV1AdminReportsByReportIdAddNoteMutation:WGe,usePostApiV1AdminReportsByReportIdAssignToSelfMutation:HGe,useDeleteApiV1AdminReportsByReportIdDeleteMutation:GGe,usePostApiV1AdminReportsByReportIdRemoveNoteMutation:KGe,usePostApiV1AdminReportsByReportIdReopenMutation:QGe,usePostApiV1AdminReportsByReportIdResolveMutation:YGe,usePostApiV1AdminReportsByReportIdUnassignMutation:ZGe,usePostApiV1AdminRestartApDeliveryMutation:XGe,useGetApiV1AdminSearchQuery:JGe,usePutApiV1AdminSignupRequestsApproveByHashMutation:eKe,useDeleteApiV1AdminSignupRequestsDeleteByHashMutation:tKe,useGetApiV1AdminSignupRequestsListQuery:nKe,usePutApiV1AdminSignupRequestsRejectByHashMutation:rKe,useGetApiV1AdminUploadsJobsQueueByQueueNameQuery:aKe,useGetApiV1AdminUploadsJobsSummaryQuery:oKe,useGetApiV1AdminUploadsSearchQuery:iKe,useGetApiV1AdminUploadsStorageByUserIdQuery:sKe,usePostApiV1AdminUserChangeStateMutation:cKe,useGetApiV1AdminUserByUserIdQuery:lKe,usePostApiV1AppsMutation:fKe,useGetApiV1AppsQuery:uKe,useGetApiV1AppsEnabledQuery:dKe,useGetApiV1AppsGroupByGroupIdQuery:pKe,useDeleteApiV1AppsGroupByGroupIdAndAppIdMutation:hKe,usePutApiV1AppsGroupByGroupIdAndAppIdMutation:mKe,useGetApiV1AppsInstalledQuery:gKe,useGetApiV1AppsUserQuery:yKe,useDeleteApiV1AppsUserByAppIdMutation:_Ke,usePutApiV1AppsUserByAppIdMutation:vKe,usePutApiV1AppsByAppIdMutation:bKe,useGetApiV1AppsByAppIdQuery:wKe,useDeleteApiV1AppsByAppIdMutation:kKe,useGetApiV1AppsByAppIdDataQuery:xKe,usePostApiV1AppsByAppIdDataMutation:SKe,usePutApiV1AppsByAppIdDataAndIdMutation:EKe,useDeleteApiV1AppsByAppIdDataAndIdMutation:CKe,usePutApiV1AppsByAppIdDefaultMutation:RKe,usePutApiV1AppsByAppIdDisableMutation:AKe,usePutApiV1AppsByAppIdEnableMutation:TKe,useGetApiV1AppsByAppIdStatsQuery:IKe,usePutApiV1AppsByAppIdUserDefaultMutation:PKe,useDeleteApiV1AppsByAppIdUserDefaultMutation:$Ke,useGetApiV1BlockQuery:OKe,useGetApiV1BlockByQuery:zKe,useDeleteApiV1BlockByUserIdMutation:MKe,usePostApiV1BlockByUserIdMutation:DKe,usePostApiV1CategoriesMutation:NKe,useGetApiV1CategoriesNameByCategoryNameQuery:LKe,usePutApiV1CategoriesByCategoryIdMutation:jKe,useGetApiV1CategoriesByCategoryIdQuery:FKe,useDeleteApiV1CategoriesByCategoryIdMutation:BKe,useGetApiV1CustomEmojisQuery:VKe,useDeleteApiV1CustomEmojisMutation:UKe,usePostApiV1CustomEmojisMutation:qKe,useGetApiV1CustomEmojisExportQuery:WKe,usePostApiV1CustomEmojisImportMutation:HKe,useGetApiV1CustomEmojisSearchQuery:GKe,usePostApiV1CustomEmojisUploadMutation:KKe,useGetApiV1DataQuery:QKe,usePostApiV1DataMutation:YKe,usePutApiV1DataByIdMutation:ZKe,useDeleteApiV1DataByIdMutation:XKe,useGetApiV1EventsQuery:JKe,usePostApiV1EventsMutation:eQe,useGetApiV1EventsFollowingQuery:tQe,useGetApiV1EventsMyQuery:nQe,usePutApiV1EventsByEventIdMutation:rQe,useGetApiV1EventsByEventIdQuery:aQe,useDeleteApiV1EventsByEventIdMutation:oQe,usePostApiV1EventsByEventIdAcceptMutation:iQe,useGetApiV1EventsByEventIdAttendeesQuery:sQe,useDeleteApiV1EventsByEventIdAttendeesAndUserIdMutation:cQe,usePostApiV1EventsByEventIdAttendeesAndUserIdMutation:lQe,usePostApiV1EventsByEventIdCancelMutation:fQe,usePostApiV1EventsByEventIdInterestedMutation:uQe,usePostApiV1EventsByEventIdJoinMutation:dQe,useDeleteApiV1EventsByEventIdLeaveMutation:pQe,usePostApiV1EventsByEventIdMaybeMutation:hQe,useGetApiV1EventsByEventIdMutualQuery:mQe,usePostApiV1EventsByEventIdRejectMutation:gQe,usePostApiV1FaspClearMutation:yQe,useGetApiV1FaspDebugV0CallbackCallbacksQuery:_Qe,useDeleteApiV1FaspDebugV0CallbackCallbacksByIdMutation:vQe,usePostApiV1FaspRegistrationMutation:bQe,usePostApiV1FaspByProviderIdCapabilitiesMutation:wQe,usePostApiV1FaspByProviderIdDebugCallMutation:kQe,useGetApiV1FaspByProviderIdRegistrationFinishQuery:xQe,usePostApiV1FaspByProviderIdRegistrationFinishMutation:SQe,usePostApiV1FaspByProviderIdRequestBackfillMutation:EQe,usePutApiV1ForumsByForumIdMutation:CQe,useGetApiV1ForumsByForumIdQuery:RQe,useDeleteApiV1ForumsByForumIdMutation:AQe,useGetApiV1ForumsByForumIdCategoriesQuery:TQe,useGetApiV1ForumsByForumIdPostsQuery:IQe,useGetApiV1ForumsByForumIdTagsQuery:PQe,useGetApiV1ForumsByForumIdTagsSearchQuery:$Qe,useGetApiV1GeoQuery:OQe,useGetApiV1GroupsQuery:zQe,usePostApiV1GroupsMutation:MQe,useGetApiV1GroupsAccountQuery:DQe,useGetApiV1GroupsMemberByUserIdQuery:NQe,useGetApiV1GroupsMemberByUserIdGroupsQuery:LQe,useGetApiV1GroupsNameByGroupnameQuery:jQe,useGetApiV1GroupsSearchQuery:FQe,usePutApiV1GroupsByGroupIdMutation:BQe,useGetApiV1GroupsByGroupIdQuery:VQe,useDeleteApiV1GroupsByGroupIdMutation:UQe,useGetApiV1GroupsByGroupIdForumQuery:qQe,usePostApiV1GroupsByGroupIdForumMutation:WQe,usePostApiV1GroupsByGroupIdJoinMutation:HQe,usePutApiV1GroupsByGroupIdMediaMutation:GQe,usePutApiV1GroupsByGroupIdMembersMutation:KQe,useGetApiV1GroupsByGroupIdMembersQuery:QQe,usePostApiV1GroupsByGroupIdMembersMutation:YQe,useDeleteApiV1GroupsByGroupIdMembersAndMemberIdMutation:ZQe,useGetApiV1GroupsByGroupIdUsersQuery:XQe,useGetApiV1ImportQuery:JQe,usePostApiV1ImportMutation:eYe,usePostApiV1ImportStartByIdMutation:tYe,useGetApiV1ImportByIdQuery:nYe,useGetApiV1InstanceQuery:rYe,useGetApiV1InstanceCountriesQuery:aYe,useGetApiV1InstanceDomainsQuery:oYe,useGetApiV1InstanceExtendedDescriptionQuery:iYe,useGetApiV1InstanceSupportedLanguagesQuery:sYe,useGetApiV1InstanceTimezonesQuery:cYe,useGetApiV1JobsListJobsQuery:lYe,useGetApiV1JobsListStatsQuery:fYe,useGetApiV1JobsListStatsAllQuery:uYe,useGetApiV1JobsListsQuery:dYe,useGetApiV1JobsStatsQuery:pYe,useGetApiV1JobsStatsPerDayQuery:hYe,useGetApiV1LinksQuery:mYe,useGetApiV1ListsQuery:gYe,usePostApiV1ListsMutation:yYe,usePutApiV1ListsByListIdMutation:_Ye,useGetApiV1ListsByListIdQuery:vYe,useDeleteApiV1ListsByListIdMutation:bYe,useGetApiV1ListsByListIdUsersQuery:wYe,useDeleteApiV1ListsByListIdUsersAndUserIdMutation:kYe,usePostApiV1ListsByListIdUsersAndUserIdMutation:xYe,useGetApiV1MetricsQuery:SYe,useGetApiV1MetricsTotalsQuery:EYe,useGetApiV1MuteQuery:CYe,useDeleteApiV1MuteByUserIdMutation:RYe,usePostApiV1MuteByUserIdMutation:AYe,usePutApiV1NotesMutation:TYe,useGetApiV1NotesQuery:IYe,useDeleteApiV1NotesByUserIdMutation:PYe,useGetApiV1NotificationsQuery:$Ye,useGetApiV1NotificationsCountQuery:OYe,usePostApiV1NotificationsMarkAllMutation:zYe,useGetApiV1NotificationsByIdQuery:MYe,usePostApiV1NotificationsByIdMarkMutation:DYe,usePostApiV1PollsByPollIdRefreshMutation:NYe,usePostApiV1PollsByPollIdVoteMutation:LYe,useGetApiV1PostsQuery:jYe,usePostApiV1PostsMutation:FYe,useGetApiV1PostsBookmarksQuery:BYe,useGetApiV1PostsFollowingQuery:VYe,useGetApiV1PostsLikedQuery:UYe,useGetApiV1PostsMentionedQuery:qYe,useGetApiV1PostsMyQuery:WYe,useGetApiV1PostsPinsQuery:HYe,useDeleteApiV1PostsPinsByPostIdMutation:GYe,usePostApiV1PostsPinsByPostIdMutation:KYe,useGetApiV1PostsPublicQuery:QYe,useGetApiV1PostsRepliesQuery:YYe,useGetApiV1PostsSubscribeQuery:ZYe,usePutApiV1PostsByPostIdMutation:XYe,useGetApiV1PostsByPostIdQuery:JYe,useDeleteApiV1PostsByPostIdMutation:eZe,useDeleteApiV1PostsByPostIdBookmarkMutation:tZe,usePostApiV1PostsByPostIdBookmarkMutation:nZe,useGetApiV1PostsByPostIdCommentsQuery:rZe,usePostApiV1PostsByPostIdCommentsMutation:aZe,usePutApiV1PostsByPostIdCommentsAndCommentIdMutation:oZe,useDeleteApiV1PostsByPostIdCommentsAndCommentIdMutation:iZe,usePostApiV1PostsByPostIdDetachMutation:sZe,useGetApiV1PostsByPostIdEditsQuery:cZe,useGetApiV1PostsByPostIdLikesQuery:lZe,useDeleteApiV1PostsByPostIdLikesMutation:fZe,usePostApiV1PostsByPostIdLikesMutation:uZe,usePostApiV1PostsByPostIdRefreshCardMutation:dZe,useDeleteApiV1PostsByPostIdRepostMutation:pZe,usePostApiV1PostsByPostIdRepostMutation:hZe,useGetApiV1PostsByPostIdRepostsQuery:mZe,usePostApiV1PostsByPostIdSubscribeMutation:gZe,useDeleteApiV1PostsByPostIdSubscribeMutation:yZe,usePostApiV1PostsByPostIdTranslateMutation:_Ze,useGetApiV1RbacQuery:vZe,useGetApiV1RbacActorsByActorIdPermissionsQuery:bZe,useGetApiV1RbacActorsByActorIdRolesQuery:wZe,usePutApiV1RbacRolesByRoleIdMutation:kZe,useGetApiV1RbacScopesByScopeRolesQuery:xZe,usePostApiV1RbacScopesByScopeRolesMutation:SZe,useDeleteApiV1RbacScopesByScopeRolesAndRoleNameMutation:EZe,useGetApiV1RbacByResourceQuery:CZe,usePostApiV1ReportsMutation:RZe,usePutApiV1RulesMutation:AZe,useGetApiV1RulesQuery:TZe,usePostApiV1RulesMutation:IZe,usePostApiV1RulesReorderMutation:PZe,useDeleteApiV1RulesByIdMutation:$Ze,useGetApiV1SearchQuery:j1e,useDeleteApiV1SessionsAllMutation:OZe,useGetApiV1SessionsListQuery:zZe,usePutApiV1SessionsRevokeAllMutation:MZe,usePutApiV1SessionsRevokeBySessionKeyMutation:DZe,useDeleteApiV1SessionsBySessionKeyMutation:NZe,usePutApiV1SettingsMutation:LZe,useGetApiV1SettingsQuery:jZe,useDeleteApiV1SettingsMutation:FZe,usePutApiV1SettingsUserMutation:BZe,useGetApiV1SettingsUserQuery:VZe,useDeleteApiV1SettingsUserMutation:UZe,useGetApiV1TagsFeaturedQuery:qZe,useDeleteApiV1TagsFeaturedByNameMutation:WZe,usePostApiV1TagsFeaturedByNameMutation:HZe,usePostApiV1TagsFollowByNameMutation:GZe,useGetApiV1TagsFollowedQuery:KZe,useGetApiV1TagsTrendingQuery:QZe,usePostApiV1TagsUnfollowByNameMutation:YZe,useGetApiV1TagsByNameQuery:ZZe,usePostApiV1TranslateTextMutation:XZe,useGetApiV1TrendsLinksQuery:JZe,useGetApiV1TrendsPostsQuery:eXe,useGetApiV1TrendsTagsQuery:tXe,usePostApiV1UploadsMutation:nXe,usePostApiV1UploadsBatchMutation:rXe,usePostApiV1UploadsListMutation:aXe,useGetApiV1UploadsSearchQuery:oXe,useGetApiV1UploadsUsagesQuery:iXe,useGetApiV1UploadsByIdQuery:sXe,useDeleteApiV1UploadsByIdMutation:cXe,usePostApiV1UploadsByIdMetaMutation:lXe,usePutApiV1UploadsByIdMetaMutation:fXe,usePostApiV1UploadsByIdTagsMutation:uXe,usePutApiV1UploadsByIdTagsMutation:dXe,usePostApiV1UploadsByIdThumbnailMutation:pXe,useGetApiV1UserAliasQuery:hXe,useDeleteApiV1UserAliasMutation:mXe,usePostApiV1UserAliasMutation:gXe,useGetApiV1UserDomainBlockQuery:yXe,useDeleteApiV1UserDomainBlockByDomainMutation:_Xe,usePostApiV1UserDomainBlockByDomainMutation:vXe,useDeleteApiV1UsersMutation:bXe,usePostApiV1UsersMutation:wXe,useGetApiV1UsersQuery:kXe,useGetApiV1UsersCheckQuery:xXe,useGetApiV1UsersConnectionsQuery:SXe,usePostApiV1UsersFollowByUsernameMutation:EXe,usePostApiV1UsersFollowByUsernameAcceptMutation:CXe,usePostApiV1UsersFollowByUsernamePendMutation:RXe,usePostApiV1UsersFollowByUsernameRejectMutation:AXe,usePostApiV1UsersFollowByUsernameUndoMutation:TXe,useGetApiV1UsersFolloweesQuery:IXe,useGetApiV1UsersFollowersQuery:PXe,usePostApiV1UsersInviteMutation:$Xe,usePostApiV1UsersInviteAcceptMutation:OXe,useGetApiV1UsersInviteInviteeEntitiesQuery:zXe,useGetApiV1UsersInviteInviteeEntitiesByInviterUserQuery:MXe,useGetApiV1UsersInviteInviteeInvitersQuery:DXe,useGetApiV1UsersInviteInviteeInvitersByEntityUserQuery:NXe,useGetApiV1UsersInviteInviterEntitiesQuery:LXe,useGetApiV1UsersInviteInviterInviteesQuery:jXe,useGetApiV1UsersInviteInviterInviteesByEntityUserQuery:FXe,usePostApiV1UsersInviteRejectMutation:BXe,usePostApiV1UsersInviteUndoMutation:VXe,useGetApiV1UsersRelationshipsQuery:UXe,useGetApiV1UsersRemoteByUserNameFullFollowersQuery:qXe,useGetApiV1UsersRemoteByUserNameFullFollowingQuery:WXe,useGetApiV1UsersRenameHistoryQuery:HXe,usePutApiV1UsersByUserIdMutation:GXe,useGetApiV1UsersByUserIdQuery:KXe,useGetApiV1UsersByUserIdFollowersQuery:QXe,useGetApiV1UsersByUserIdFollowingQuery:YXe,usePutApiV1UsersByUserIdMediaMutation:ZXe}=lr,yN={400:{title:"",description:"You have no permission ..."},401:{title:"Unauthorized",description:"Your access is restricted. Please ensure you have the correct login details"},404:{title:"Oh no, bad luck!",description:"Looks like the page you were looking for has been removed. Just in case, please make sure to check your spelling."},user404:{title:"We could not find the user you were looking for",description:"Check the username and try one more time",links:[{text:"To the Wellsley account",link:"/account"},{text:"To account settings",link:"/account/settings"}]},page404:{title:"We could not find the page you were looking for",description:"Check the address and try one more time"},post404:{title:"We could not find the post you were looking for",description:"Check the address and try one more time"},403:{title:"",description:"Your session has been expired. Please re-login again."},440:{title:"",description:"You have reached maximum allowed number of concurrent sessions."},460:{title:"",description:"Please re-login again."},498:{title:"Expired",description:"The link was expired or invalid. Please try again."},500:{title:"Oops, something went wrong!",description:'We are already on it. Please try again later or contact us at <a href="mailto:support@wave.video">support@wave.video</a>'}},K4=e=>yN[e]||yN[500],Fl=e=>{var t,n;if(!e)return K4(500).description;if(hu.isString(e))return e;if("data"in e&&hu.isString(e.data))return e.data;if("data"in e&&null!=(t=e.data)&&t.errorCode)return null==(n=e.data)?void 0:n.message;if("isUnhandledError"in e&&!e.isUnhandledError){const{status:t,data:n}=null==e?void 0:e.error;return(hu.isString(n)?n:null==n?void 0:n.message)||K4(t||500).description}return"message"in e&&e.message?e.message:"error"in e?e.error:"status"in e?K4(e.status).description:void 0},jt=async(e,t,n)=>{try{return await e,t&&Bt.success(t),e}catch(e){null==n||n(),Bt.error(Fl(e))}};
88
88
  /**
89
89
  * @remix-run/router v1.15.2
90
90
  *
@@ -94,7 +94,7 @@ var AW=Object.defineProperty,TW=(e,t,n)=>t in e?AW(e,t,{enumerable:!0,configurab
94
94
  * LICENSE.md file in the root directory of this source tree.
95
95
  *
96
96
  * @license MIT
97
- */function bR(){return bR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bR.apply(this,arguments)}var _N,vN;function vp(e,t){if(!1===e||null===e||typeof e>"u")throw new Error(t)}function nU(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function F1e(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"==typeof e?nU(e):e;return{pathname:n?n.startsWith("/")?n:B1e(n,t):t,search:H1e(r),hash:G1e(a)}}function B1e(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function Q4(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function V1e(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function U1e(e,t){let n=V1e(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function q1e(e,t,n,r){let a;void 0===r&&(r=!1),"string"==typeof e?a=nU(e):(a=bR({},e),vp(!a.pathname||!a.pathname.includes("?"),Q4("?","pathname","search",a)),vp(!a.pathname||!a.pathname.includes("#"),Q4("#","pathname","hash",a)),vp(!a.search||!a.search.includes("#"),Q4("#","search","hash",a)));let o,i=""===e||""===a.pathname,s=i?"/":a.pathname;if(null==s)o=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let c=F1e(a,o),l=s&&"/"!==s&&s.endsWith("/"),u=(i||"."===s)&&n.endsWith("/");return!c.pathname.endsWith("/")&&(l||u)&&(c.pathname+="/"),c}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(_N||(_N={})),function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(vN||(vN={}));const W1e=e=>e.join("/").replace(/\/\/+/g,"/"),H1e=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",G1e=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",rU=["post","put","patch","delete"];new Set(rU);const K1e=["get",...rU];function wR(){return wR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wR.apply(this,arguments)}new Set(K1e);const aU=v.createContext(null),oU=v.createContext(null),iU=v.createContext(null),mI=v.createContext({outlet:null,matches:[],isDataRoute:!1});function sU(){return null!=v.useContext(iU)}function Jk(){return sU()||vp(!1),v.useContext(iU).location}function cU(e){v.useContext(oU).static||v.useLayoutEffect(e)}function gI(){let{isDataRoute:e}=v.useContext(mI);return e?J1e():Q1e()}function Q1e(){sU()||vp(!1);let e=v.useContext(aU),{basename:t,future:n,navigator:r}=v.useContext(oU),{matches:a}=v.useContext(mI),{pathname:o}=Jk(),i=JSON.stringify(U1e(a,n.v7_relativeSplatPath)),s=v.useRef(!1);return cU((()=>{s.current=!0})),v.useCallback((function(n,a){if(void 0===a&&(a={}),!s.current)return;if("number"==typeof n)return void r.go(n);let c=q1e(n,JSON.parse(i),o,"path"===a.relative);null==e&&"/"!==t&&(c.pathname="/"===c.pathname?t:W1e([t,c.pathname])),(a.replace?r.replace:r.push)(c,a.state,a)}),[t,r,i,o,e])}var lU=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(lU||{}),fU=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fU||{});function Y1e(e){let t=v.useContext(aU);return t||vp(!1),t}function Z1e(e){let t=v.useContext(mI);return t||vp(!1),t}function X1e(e){let t=Z1e(),n=t.matches[t.matches.length-1];return n.route.id||vp(!1),n.route.id}function J1e(){let{router:e}=Y1e(lU.UseNavigateStable),t=X1e(fU.UseNavigateStable),n=v.useRef(!1);return cU((()=>{n.current=!0})),v.useCallback((function(r,a){void 0===a&&(a={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,wR({fromRouteId:t},a)))}),[e,t])}new Promise((()=>{}));const bN={forgotPasswordStep:"request",forgotPasswordFields:null,signupStep:"rules",signupFields:null,token:null,newEmail:null,isAuthBlockVisible:!0,isPending:!!xm.getToken(),isAuthenticated:!1},Hl=ua({name:"auth",initialState:bN,reducers:{login:(e,t)=>{e.isAuthenticated=!0,e.token=t.payload||null,e.isPending=!1},logout:()=>({...bN,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},showAuthBlock:(e,t)=>{e.isAuthBlockVisible=t.payload}},selectors:{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,selectAuthBlockVisible:e=>e.isAuthBlockVisible,selectIsAuthenticated:e=>e.isAuthenticated}}),e0e={data:null,isPending:!1,isSuccess:!1},Jo=ua({name:"userNoHTML",initialState:e0e,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}});var wN,Y4={};function t0e(){return wN||(wN=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=[],n=[],r=[],a=[],o=(e,t)=>{if("function"!=typeof e)throw new Error("Expected the listener to be a function.");return t.push(e),()=>{const n=t.indexOf(e);t.splice(n,1)}};e.subscribeBefore=e=>o(e,t),e.subscribeAfter=e=>o(e,n);const i=(e,t)=>{if(!e.action)throw new Error("Expected the action to be a string.");if("function"!=typeof e.listener)throw new Error("Expected the listener to be a function.");return t.push(e),()=>{const n=t.indexOf(e);t.splice(n,1)}};e.subscribeActionBefore=(e,t)=>i({action:e,listener:t},r),e.subscribeActionAfter=(e,t)=>i({action:e,listener:t},a),e.unsubscribeBefore=()=>{t.length=0},e.unsubscribeActionsBefore=()=>{r.length=0},e.unsubscribeAfter=()=>{n.length=0},e.unsubscribeActionsAfter=()=>{a.length=0},e.unsubscribeAll=()=>{e.unsubscribeBefore(),e.unsubscribeActionsBefore(),e.unsubscribeAfter(),e.unsubscribeActionsAfter()};const s=(e,t)=>{const n=e.filter((({action:e})=>e!==t));e.length=0,e.concat(n)};e.unsubscribeActionBefore=e=>{s(r,e)},e.unsubscribeActionAfter=e=>{s(a,e)},e.unsubscribeActionAll=t=>{e.unsubscribeActionBefore(t),e.unsubscribeActionAfter(t)};const c=(e,t)=>{for(let n=t.length-1;n>=0;n--){const r=t[n];"object"==typeof e&&r(e)}},l=(e,t)=>{for(let n=t.length-1;n>=0;n--){const r=t[n];"object"==typeof e&&r.action===e.type&&r.listener(e)}};e.subscribeActionMiddleware=e=>e=>o=>{c(o,t),l(o,r);const i=e(o);return c(o,n),l(o,a),i},e.default=e.subscribeActionMiddleware}(Y4)),Y4}var n0e=t0e();const r0e=Ql(n0e),yI=e=>e,uU=go(yI,(e=>e.data)),a0e=go(yI,(e=>e.error)),o0e=go(yI,(e=>e.isPending)),i0e=go(uU,(e=>null==e?void 0:e.rules)),s0e={data:null,isPending:!1},Bb=ua({name:"instanceInfo",initialState:s0e,reducers:{setInfo:(e,t)=>{e.data=t.payload},setError:(e,t)=>{e.error=t.payload},setPending:(e,t)=>{e.isPending=t.payload}},selectors:{selectInstanceInfo:uU,selectInstanceInfoError:a0e,selectInstanceInfoPending:o0e,selectPlatformRules:i0e,selectRegistrations:e=>{var t;return null==(t=e.data)?void 0:t.configuration.registrations}}}),kN={data:{userId:"",list:[]},count:{},isPending:!1},c0e=e=>e,l0e=e=>e.error,f0e=e=>e.isPending,u0e=e=>{var t;return null==(t=e.count)?void 0:t.total},d0e=e=>{var t;return null==(t=e.count)?void 0:t.unread},p0e=e=>e.data.userId,_I=go(c0e,(e=>e.data.list)),h0e=go(_I,(e=>null==e?void 0:e.filter((e=>"UNREAD"===e.status)))),m0e=go(_I,(e=>null==e?void 0:e.at(-1))),zl=ua({name:"notifications",initialState:kN,reducers:{setPending:(e,t)=>{e.isPending=t.payload},setError:(e,t)=>{e.error=t.payload},setNotifications:(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)))}))]}},addNotification:(e,t)=>{e.count.unread=(e.count.unread||0)+1,e.data.list&&(e.data.list=[t.payload,...e.data.list||[]])},markNotification:(e,t)=>{e.data.list&&(e.data.list=e.data.list.map((e=>e.id===t.payload.id?{...e,status:t.payload.status}:e)))},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))},setTotalCount:(e,t)=>{e.count.total=t.payload},setUnreadCount:(e,t)=>{e.count.unread=t.payload},readAll:e=>{var t;e.data.list&&(e.data.list=null==(t=e.data.list)?void 0:t.map((e=>({...e,status:"READ"}))))},resetState:()=>kN,undoNotitication:(e,t)=>{var n,r,a;const o=t.payload;"UNREAD"===(null==(r=null==(n=e.data.list)?void 0:n.find((e=>e.id===o)))?void 0:r.status)&&e.count.unread&&(e.count.unread-=1),e.data.list=(null==(a=e.data.list)?void 0:a.filter((e=>e.id!==o)))||[]}},selectors:{selectError:l0e,selectIsPending:f0e,selectTotalCount:u0e,selectUnreadCount:d0e,selectNotifications:_I,selectUnreadNotifications:h0e,selectLastNotification:m0e,selectNotificationsOwner:p0e}});function g0e(){return!(typeof navigator<"u"&&"boolean"==typeof navigator.onLine)||navigator.onLine}const y0e={isOnline:g0e()},_0e=ua({name:"network",initialState:y0e,reducers:{setOnline:(e,{payload:t})=>{e.isOnline=t}},selectors:{selectOnline:e=>e.isOnline}});var v0e={USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.16.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.0",npm_config_npm_version:"10.9.2",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.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.16.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.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/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.16.0/bin",TURBO_HASH:"2ec5ae70fa15de8b",NODE:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_package_name:"@wellesley/settings",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:"tsc && vite build",SHELL:"/bin/bash",npm_package_version:"1.0.172",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.16.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",EDITOR:"vi",NODE_ENV:"production",APP_NAME:"@wellesley/settings"};const e0=VH(lr,_0e,AT,Hl,fa,Jo,Bb,zl,Yy,Ay);let by;const b0e=e=>{const t=pH({devTools:{name:v0e.APP_NAME},reducer:e0,preloadedState:e,middleware:e=>e().concat(lr.middleware,r0e)});return by=t,t},y_=e=>by||(by=b0e(e),by),w0e={path:"",transitionPath:""},Vs=ua({name:"router",initialState:w0e,reducers:{setPath:(e,{payload:t})=>{t!==e.path&&(e.path=t)},requestChangePath:(e,{payload:t})=>{t!==e.transitionPath&&(e.transitionPath=t)}},selectors:{selectPath:e=>e.path,selectTransitionPath:e=>e.transitionPath}}).injectInto(e0);var xN,wy={exports:{}},k0e=wy.exports;
97
+ */function bR(){return bR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bR.apply(this,arguments)}var _N,vN;function vp(e,t){if(!1===e||null===e||typeof e>"u")throw new Error(t)}function nU(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function F1e(e,t){void 0===t&&(t="/");let{pathname:n,search:r="",hash:a=""}="string"==typeof e?nU(e):e;return{pathname:n?n.startsWith("/")?n:B1e(n,t):t,search:H1e(r),hash:G1e(a)}}function B1e(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?n.length>1&&n.pop():"."!==e&&n.push(e)})),n.length>1?n.join("/"):"/"}function Q4(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the `to."+n+'` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.'}function V1e(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}function U1e(e,t){let n=V1e(e);return t?n.map(((t,n)=>n===e.length-1?t.pathname:t.pathnameBase)):n.map((e=>e.pathnameBase))}function q1e(e,t,n,r){let a;void 0===r&&(r=!1),"string"==typeof e?a=nU(e):(a=bR({},e),vp(!a.pathname||!a.pathname.includes("?"),Q4("?","pathname","search",a)),vp(!a.pathname||!a.pathname.includes("#"),Q4("#","pathname","hash",a)),vp(!a.search||!a.search.includes("#"),Q4("#","search","hash",a)));let o,i=""===e||""===a.pathname,s=i?"/":a.pathname;if(null==s)o=n;else{let e=t.length-1;if(!r&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let c=F1e(a,o),l=s&&"/"!==s&&s.endsWith("/"),u=(i||"."===s)&&n.endsWith("/");return!c.pathname.endsWith("/")&&(l||u)&&(c.pathname+="/"),c}!function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"}(_N||(_N={})),function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(vN||(vN={}));const W1e=e=>e.join("/").replace(/\/\/+/g,"/"),H1e=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",G1e=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",rU=["post","put","patch","delete"];new Set(rU);const K1e=["get",...rU];function wR(){return wR=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},wR.apply(this,arguments)}new Set(K1e);const aU=v.createContext(null),oU=v.createContext(null),iU=v.createContext(null),mI=v.createContext({outlet:null,matches:[],isDataRoute:!1});function sU(){return null!=v.useContext(iU)}function Jk(){return sU()||vp(!1),v.useContext(iU).location}function cU(e){v.useContext(oU).static||v.useLayoutEffect(e)}function gI(){let{isDataRoute:e}=v.useContext(mI);return e?J1e():Q1e()}function Q1e(){sU()||vp(!1);let e=v.useContext(aU),{basename:t,future:n,navigator:r}=v.useContext(oU),{matches:a}=v.useContext(mI),{pathname:o}=Jk(),i=JSON.stringify(U1e(a,n.v7_relativeSplatPath)),s=v.useRef(!1);return cU((()=>{s.current=!0})),v.useCallback((function(n,a){if(void 0===a&&(a={}),!s.current)return;if("number"==typeof n)return void r.go(n);let c=q1e(n,JSON.parse(i),o,"path"===a.relative);null==e&&"/"!==t&&(c.pathname="/"===c.pathname?t:W1e([t,c.pathname])),(a.replace?r.replace:r.push)(c,a.state,a)}),[t,r,i,o,e])}var lU=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(lU||{}),fU=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(fU||{});function Y1e(e){let t=v.useContext(aU);return t||vp(!1),t}function Z1e(e){let t=v.useContext(mI);return t||vp(!1),t}function X1e(e){let t=Z1e(),n=t.matches[t.matches.length-1];return n.route.id||vp(!1),n.route.id}function J1e(){let{router:e}=Y1e(lU.UseNavigateStable),t=X1e(fU.UseNavigateStable),n=v.useRef(!1);return cU((()=>{n.current=!0})),v.useCallback((function(r,a){void 0===a&&(a={}),n.current&&("number"==typeof r?e.navigate(r):e.navigate(r,wR({fromRouteId:t},a)))}),[e,t])}new Promise((()=>{}));const bN={forgotPasswordStep:"request",forgotPasswordFields:null,signupStep:"rules",signupFields:null,token:null,newEmail:null,isAuthBlockVisible:!0,isPending:!!xm.getToken(),isAuthenticated:!1},Hl=ua({name:"auth",initialState:bN,reducers:{login:(e,t)=>{e.isAuthenticated=!0,e.token=t.payload||null,e.isPending=!1},logout:()=>({...bN,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},showAuthBlock:(e,t)=>{e.isAuthBlockVisible=t.payload}},selectors:{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,selectAuthBlockVisible:e=>e.isAuthBlockVisible,selectIsAuthenticated:e=>e.isAuthenticated}}),e0e={data:null,isPending:!1,isSuccess:!1},Jo=ua({name:"userNoHTML",initialState:e0e,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}});var wN,Y4={};function t0e(){return wN||(wN=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=[],n=[],r=[],a=[],o=(e,t)=>{if("function"!=typeof e)throw new Error("Expected the listener to be a function.");return t.push(e),()=>{const n=t.indexOf(e);t.splice(n,1)}};e.subscribeBefore=e=>o(e,t),e.subscribeAfter=e=>o(e,n);const i=(e,t)=>{if(!e.action)throw new Error("Expected the action to be a string.");if("function"!=typeof e.listener)throw new Error("Expected the listener to be a function.");return t.push(e),()=>{const n=t.indexOf(e);t.splice(n,1)}};e.subscribeActionBefore=(e,t)=>i({action:e,listener:t},r),e.subscribeActionAfter=(e,t)=>i({action:e,listener:t},a),e.unsubscribeBefore=()=>{t.length=0},e.unsubscribeActionsBefore=()=>{r.length=0},e.unsubscribeAfter=()=>{n.length=0},e.unsubscribeActionsAfter=()=>{a.length=0},e.unsubscribeAll=()=>{e.unsubscribeBefore(),e.unsubscribeActionsBefore(),e.unsubscribeAfter(),e.unsubscribeActionsAfter()};const s=(e,t)=>{const n=e.filter((({action:e})=>e!==t));e.length=0,e.concat(n)};e.unsubscribeActionBefore=e=>{s(r,e)},e.unsubscribeActionAfter=e=>{s(a,e)},e.unsubscribeActionAll=t=>{e.unsubscribeActionBefore(t),e.unsubscribeActionAfter(t)};const c=(e,t)=>{for(let n=t.length-1;n>=0;n--){const r=t[n];"object"==typeof e&&r(e)}},l=(e,t)=>{for(let n=t.length-1;n>=0;n--){const r=t[n];"object"==typeof e&&r.action===e.type&&r.listener(e)}};e.subscribeActionMiddleware=e=>e=>o=>{c(o,t),l(o,r);const i=e(o);return c(o,n),l(o,a),i},e.default=e.subscribeActionMiddleware}(Y4)),Y4}var n0e=t0e();const r0e=Ql(n0e),yI=e=>e,uU=go(yI,(e=>e.data)),a0e=go(yI,(e=>e.error)),o0e=go(yI,(e=>e.isPending)),i0e=go(uU,(e=>null==e?void 0:e.rules)),s0e={data:null,isPending:!1},Bb=ua({name:"instanceInfo",initialState:s0e,reducers:{setInfo:(e,t)=>{e.data=t.payload},setError:(e,t)=>{e.error=t.payload},setPending:(e,t)=>{e.isPending=t.payload}},selectors:{selectInstanceInfo:uU,selectInstanceInfoError:a0e,selectInstanceInfoPending:o0e,selectPlatformRules:i0e,selectRegistrations:e=>{var t;return null==(t=e.data)?void 0:t.configuration.registrations}}}),kN={data:{userId:"",list:[]},count:{},isPending:!1},c0e=e=>e,l0e=e=>e.error,f0e=e=>e.isPending,u0e=e=>{var t;return null==(t=e.count)?void 0:t.total},d0e=e=>{var t;return null==(t=e.count)?void 0:t.unread},p0e=e=>e.data.userId,_I=go(c0e,(e=>e.data.list)),h0e=go(_I,(e=>null==e?void 0:e.filter((e=>"UNREAD"===e.status)))),m0e=go(_I,(e=>null==e?void 0:e.at(-1))),zl=ua({name:"notifications",initialState:kN,reducers:{setPending:(e,t)=>{e.isPending=t.payload},setError:(e,t)=>{e.error=t.payload},setNotifications:(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)))}))]}},addNotification:(e,t)=>{e.count.unread=(e.count.unread||0)+1,e.data.list&&(e.data.list=[t.payload,...e.data.list||[]])},markNotification:(e,t)=>{e.data.list&&(e.data.list=e.data.list.map((e=>e.id===t.payload.id?{...e,status:t.payload.status}:e)))},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))},setTotalCount:(e,t)=>{e.count.total=t.payload},setUnreadCount:(e,t)=>{e.count.unread=t.payload},readAll:e=>{var t;e.data.list&&(e.data.list=null==(t=e.data.list)?void 0:t.map((e=>({...e,status:"READ"}))))},resetState:()=>kN,undoNotitication:(e,t)=>{var n,r,a;const o=t.payload;"UNREAD"===(null==(r=null==(n=e.data.list)?void 0:n.find((e=>e.id===o)))?void 0:r.status)&&e.count.unread&&(e.count.unread-=1),e.data.list=(null==(a=e.data.list)?void 0:a.filter((e=>e.id!==o)))||[]}},selectors:{selectError:l0e,selectIsPending:f0e,selectTotalCount:u0e,selectUnreadCount:d0e,selectNotifications:_I,selectUnreadNotifications:h0e,selectLastNotification:m0e,selectNotificationsOwner:p0e}});function g0e(){return!(typeof navigator<"u"&&"boolean"==typeof navigator.onLine)||navigator.onLine}const y0e={isOnline:g0e()},_0e=ua({name:"network",initialState:y0e,reducers:{setOnline:(e,{payload:t})=>{e.isOnline=t}},selectors:{selectOnline:e=>e.isOnline}});var v0e={USER:"teamcity",npm_config_user_agent:"npm/10.9.2 node/v22.16.0 linux x64 workspaces/true",npm_node_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_config_noproxy:"",HOME:"/home/teamcity",npm_package_json:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.0",npm_config_npm_version:"10.9.2",npm_config_cache:"/home/teamcity/.npm",npm_config_node_gyp:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js",PATH:"/mnt/agent/work/70fcd8585843667f/packages/settings/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.16.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.16.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.7/bin:/home/teamcity/.rvm/gems/ruby-3.3.7@global/bin:/home/teamcity/.rvm/rubies/ruby-3.3.7/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.16.0/bin",TURBO_HASH:"e4a68314798a2e38",NODE:"/home/teamcity/.nvm/versions/node/v22.16.0/bin/node",npm_package_name:"@wellesley/settings",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:"tsc && vite build",SHELL:"/bin/bash",npm_package_version:"1.0.173",npm_lifecycle_event:"build",TURBO_CACHE:"remote:rw",npm_config_globalconfig:"/home/teamcity/.nvm/versions/node/v22.16.0/etc/npmrc",npm_config_init_module:"/home/teamcity/.npm-init.js",PWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",npm_execpath:"/home/teamcity/.nvm/versions/node/v22.16.0/lib/node_modules/npm/bin/npm-cli.js",npm_config_global_prefix:"/home/teamcity/.nvm/versions/node/v22.16.0",npm_command:"run-script",TURBO_TOKEN:"wellesley-turbo-token",INIT_CWD:"/mnt/agent/work/70fcd8585843667f/packages/settings",EDITOR:"vi",NODE_ENV:"production",APP_NAME:"@wellesley/settings"};const e0=VH(lr,_0e,AT,Hl,fa,Jo,Bb,zl,Yy,Ay);let by;const b0e=e=>{const t=pH({devTools:{name:v0e.APP_NAME},reducer:e0,preloadedState:e,middleware:e=>e().concat(lr.middleware,r0e)});return by=t,t},y_=e=>by||(by=b0e(e),by),w0e={path:"",transitionPath:""},Vs=ua({name:"router",initialState:w0e,reducers:{setPath:(e,{payload:t})=>{t!==e.path&&(e.path=t)},requestChangePath:(e,{payload:t})=>{t!==e.transitionPath&&(e.transitionPath=t)}},selectors:{selectPath:e=>e.path,selectTransitionPath:e=>e.transitionPath}}).injectInto(e0);var xN,wy={exports:{}},k0e=wy.exports;
98
98
  /**
99
99
  * @license
100
100
  * Lodash <https://lodash.com/>