File "main-a8767cd0-20250922104152.js"

Full Path: /home/filmgtex/hdfilmcehennemi.website/public/build/assets/main-a8767cd0-20250922104152.js
File size: 724.58 KB
MIME-type: text/plain
Charset: utf-8

var FT=Object.defineProperty;var UT=(e,t,n)=>t in e?FT(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var ye=(e,t,n)=>(UT(e,typeof t!="symbol"?t+"":t,n),n);function zT(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const s in r)if(s!=="default"&&!(s in e)){const i=Object.getOwnPropertyDescriptor(r,s);i&&Object.defineProperty(e,s,i.get?i:{enumerable:!0,get:()=>r[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var rc=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qq(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){if(this instanceof r){var s=[null];s.push.apply(s,arguments);var i=Function.bind.apply(t,s);return new i}return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,s.get?s:{enumerable:!0,get:function(){return e[r]}})}),n}var Uw={exports:{}},pd={},zw={exports:{}},ae={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var hl=Symbol.for("react.element"),VT=Symbol.for("react.portal"),BT=Symbol.for("react.fragment"),HT=Symbol.for("react.strict_mode"),qT=Symbol.for("react.profiler"),WT=Symbol.for("react.provider"),KT=Symbol.for("react.context"),QT=Symbol.for("react.forward_ref"),GT=Symbol.for("react.suspense"),YT=Symbol.for("react.memo"),XT=Symbol.for("react.lazy"),p0=Symbol.iterator;function JT(e){return e===null||typeof e!="object"?null:(e=p0&&e[p0]||e["@@iterator"],typeof e=="function"?e:null)}var Vw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Bw=Object.assign,Hw={};function wo(e,t,n){this.props=e,this.context=t,this.refs=Hw,this.updater=n||Vw}wo.prototype.isReactComponent={};wo.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};wo.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function qw(){}qw.prototype=wo.prototype;function wg(e,t,n){this.props=e,this.context=t,this.refs=Hw,this.updater=n||Vw}var _g=wg.prototype=new qw;_g.constructor=wg;Bw(_g,wo.prototype);_g.isPureReactComponent=!0;var m0=Array.isArray,Ww=Object.prototype.hasOwnProperty,Sg={current:null},Kw={key:!0,ref:!0,__self:!0,__source:!0};function Qw(e,t,n){var r,s={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)Ww.call(t,r)&&!Kw.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];s.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)s[r]===void 0&&(s[r]=a[r]);return{$$typeof:hl,type:e,key:i,ref:o,props:s,_owner:Sg.current}}function ZT(e,t){return{$$typeof:hl,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function Eg(e){return typeof e=="object"&&e!==null&&e.$$typeof===hl}function e4(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var g0=/\/+/g;function Nf(e,t){return typeof e=="object"&&e!==null&&e.key!=null?e4(""+e.key):t.toString(36)}function Nu(e,t,n,r,s){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var o=!1;if(e===null)o=!0;else switch(i){case"string":case"number":o=!0;break;case"object":switch(e.$$typeof){case hl:case VT:o=!0}}if(o)return o=e,s=s(o),e=r===""?"."+Nf(o,0):r,m0(s)?(n="",e!=null&&(n=e.replace(g0,"$&/")+"/"),Nu(s,t,n,"",function(c){return c})):s!=null&&(Eg(s)&&(s=ZT(s,n+(!s.key||o&&o.key===s.key?"":(""+s.key).replace(g0,"$&/")+"/")+e)),t.push(s)),1;if(o=0,r=r===""?".":r+":",m0(e))for(var a=0;a<e.length;a++){i=e[a];var l=r+Nf(i,a);o+=Nu(i,t,n,l,s)}else if(l=JT(e),typeof l=="function")for(e=l.call(e),a=0;!(i=e.next()).done;)i=i.value,l=r+Nf(i,a++),o+=Nu(i,t,n,l,s);else if(i==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return o}function Wl(e,t,n){if(e==null)return e;var r=[],s=0;return Nu(e,r,"","",function(i){return t.call(n,i,s++)}),r}function t4(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var jt={current:null},Ou={transition:null},n4={ReactCurrentDispatcher:jt,ReactCurrentBatchConfig:Ou,ReactCurrentOwner:Sg};ae.Children={map:Wl,forEach:function(e,t,n){Wl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Wl(e,function(){t++}),t},toArray:function(e){return Wl(e,function(t){return t})||[]},only:function(e){if(!Eg(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ae.Component=wo;ae.Fragment=BT;ae.Profiler=qT;ae.PureComponent=wg;ae.StrictMode=HT;ae.Suspense=GT;ae.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=n4;ae.cloneElement=function(e,t,n){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var r=Bw({},e.props),s=e.key,i=e.ref,o=e._owner;if(t!=null){if(t.ref!==void 0&&(i=t.ref,o=Sg.current),t.key!==void 0&&(s=""+t.key),e.type&&e.type.defaultProps)var a=e.type.defaultProps;for(l in t)Ww.call(t,l)&&!Kw.hasOwnProperty(l)&&(r[l]=t[l]===void 0&&a!==void 0?a[l]:t[l])}var l=arguments.length-2;if(l===1)r.children=n;else if(1<l){a=Array(l);for(var c=0;c<l;c++)a[c]=arguments[c+2];r.children=a}return{$$typeof:hl,type:e.type,key:s,ref:i,props:r,_owner:o}};ae.createContext=function(e){return e={$$typeof:KT,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:WT,_context:e},e.Consumer=e};ae.createElement=Qw;ae.createFactory=function(e){var t=Qw.bind(null,e);return t.type=e,t};ae.createRef=function(){return{current:null}};ae.forwardRef=function(e){return{$$typeof:QT,render:e}};ae.isValidElement=Eg;ae.lazy=function(e){return{$$typeof:XT,_payload:{_status:-1,_result:e},_init:t4}};ae.memo=function(e,t){return{$$typeof:YT,type:e,compare:t===void 0?null:t}};ae.startTransition=function(e){var t=Ou.transition;Ou.transition={};try{e()}finally{Ou.transition=t}};ae.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};ae.useCallback=function(e,t){return jt.current.useCallback(e,t)};ae.useContext=function(e){return jt.current.useContext(e)};ae.useDebugValue=function(){};ae.useDeferredValue=function(e){return jt.current.useDeferredValue(e)};ae.useEffect=function(e,t){return jt.current.useEffect(e,t)};ae.useId=function(){return jt.current.useId()};ae.useImperativeHandle=function(e,t,n){return jt.current.useImperativeHandle(e,t,n)};ae.useInsertionEffect=function(e,t){return jt.current.useInsertionEffect(e,t)};ae.useLayoutEffect=function(e,t){return jt.current.useLayoutEffect(e,t)};ae.useMemo=function(e,t){return jt.current.useMemo(e,t)};ae.useReducer=function(e,t,n){return jt.current.useReducer(e,t,n)};ae.useRef=function(e){return jt.current.useRef(e)};ae.useState=function(e){return jt.current.useState(e)};ae.useSyncExternalStore=function(e,t,n){return jt.current.useSyncExternalStore(e,t,n)};ae.useTransition=function(){return jt.current.useTransition()};ae.version="18.2.0";zw.exports=ae;var v=zw.exports;const V=Qn(v),r4=zT({__proto__:null,default:V},[v]);/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var s4=v,i4=Symbol.for("react.element"),o4=Symbol.for("react.fragment"),a4=Object.prototype.hasOwnProperty,l4=s4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u4={key:!0,ref:!0,__self:!0,__source:!0};function Gw(e,t,n){var r,s={},i=null,o=null;n!==void 0&&(i=""+n),t.key!==void 0&&(i=""+t.key),t.ref!==void 0&&(o=t.ref);for(r in t)a4.call(t,r)&&!u4.hasOwnProperty(r)&&(s[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)s[r]===void 0&&(s[r]=t[r]);return{$$typeof:i4,type:e,key:i,ref:o,props:s,_owner:l4.current}}pd.Fragment=o4;pd.jsx=Gw;pd.jsxs=Gw;Uw.exports=pd;var u=Uw.exports;var Yw={exports:{}},Qt={},Xw={exports:{}},Jw={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(e){function t(I,G){var W=I.length;I.push(G);e:for(;0<W;){var Q=W-1>>>1,se=I[Q];if(0<s(se,G))I[Q]=G,I[W]=se,W=Q;else break e}}function n(I){return I.length===0?null:I[0]}function r(I){if(I.length===0)return null;var G=I[0],W=I.pop();if(W!==G){I[0]=W;e:for(var Q=0,se=I.length,he=se>>>1;Q<he;){var Re=2*(Q+1)-1,oe=I[Re],ge=Re+1,we=I[ge];if(0>s(oe,W))ge<se&&0>s(we,oe)?(I[Q]=we,I[ge]=W,Q=ge):(I[Q]=oe,I[Re]=W,Q=Re);else if(ge<se&&0>s(we,W))I[Q]=we,I[ge]=W,Q=ge;else break e}}return G}function s(I,G){var W=I.sortIndex-G.sortIndex;return W!==0?W:I.id-G.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,a=o.now();e.unstable_now=function(){return o.now()-a}}var l=[],c=[],d=1,f=null,h=3,p=!1,g=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,m=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function x(I){for(var G=n(c);G!==null;){if(G.callback===null)r(c);else if(G.startTime<=I)r(c),G.sortIndex=G.expirationTime,t(l,G);else break;G=n(c)}}function _(I){if(b=!1,x(I),!g)if(n(l)!==null)g=!0,B(S);else{var G=n(c);G!==null&&J(_,G.startTime-I)}}function S(I,G){g=!1,b&&(b=!1,y(k),k=-1),p=!0;var W=h;try{for(x(G),f=n(l);f!==null&&(!(f.expirationTime>G)||I&&!$());){var Q=f.callback;if(typeof Q=="function"){f.callback=null,h=f.priorityLevel;var se=Q(f.expirationTime<=G);G=e.unstable_now(),typeof se=="function"?f.callback=se:f===n(l)&&r(l),x(G)}else r(l);f=n(l)}if(f!==null)var he=!0;else{var Re=n(c);Re!==null&&J(_,Re.startTime-G),he=!1}return he}finally{f=null,h=W,p=!1}}var E=!1,C=null,k=-1,P=5,O=-1;function $(){return!(e.unstable_now()-O<P)}function F(){if(C!==null){var I=e.unstable_now();O=I;var G=!0;try{G=C(!0,I)}finally{G?M():(E=!1,C=null)}}else E=!1}var M;if(typeof m=="function")M=function(){m(F)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,q=z.port2;z.port1.onmessage=F,M=function(){q.postMessage(null)}}else M=function(){w(F,0)};function B(I){C=I,E||(E=!0,M())}function J(I,G){k=w(function(){I(e.unstable_now())},G)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(I){I.callback=null},e.unstable_continueExecution=function(){g||p||(g=!0,B(S))},e.unstable_forceFrameRate=function(I){0>I||125<I?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<I?Math.floor(1e3/I):5},e.unstable_getCurrentPriorityLevel=function(){return h},e.unstable_getFirstCallbackNode=function(){return n(l)},e.unstable_next=function(I){switch(h){case 1:case 2:case 3:var G=3;break;default:G=h}var W=h;h=G;try{return I()}finally{h=W}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(I,G){switch(I){case 1:case 2:case 3:case 4:case 5:break;default:I=3}var W=h;h=I;try{return G()}finally{h=W}},e.unstable_scheduleCallback=function(I,G,W){var Q=e.unstable_now();switch(typeof W=="object"&&W!==null?(W=W.delay,W=typeof W=="number"&&0<W?Q+W:Q):W=Q,I){case 1:var se=-1;break;case 2:se=250;break;case 5:se=1073741823;break;case 4:se=1e4;break;default:se=5e3}return se=W+se,I={id:d++,callback:G,priorityLevel:I,startTime:W,expirationTime:se,sortIndex:-1},W>Q?(I.sortIndex=W,t(c,I),n(l)===null&&I===n(c)&&(b?(y(k),k=-1):b=!0,J(_,W-Q))):(I.sortIndex=se,t(l,I),g||p||(g=!0,B(S))),I},e.unstable_shouldYield=$,e.unstable_wrapCallback=function(I){var G=h;return function(){var W=h;h=G;try{return I.apply(this,arguments)}finally{h=W}}}})(Jw);Xw.exports=Jw;var c4=Xw.exports;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Zw=v,qt=c4;function L(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var e_=new Set,ja={};function Gs(e,t){Ki(e,t),Ki(e+"Capture",t)}function Ki(e,t){for(ja[e]=t,e=0;e<t.length;e++)e_.add(t[e])}var gr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),np=Object.prototype.hasOwnProperty,d4=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,y0={},v0={};function f4(e){return np.call(v0,e)?!0:np.call(y0,e)?!1:d4.test(e)?v0[e]=!0:(y0[e]=!0,!1)}function h4(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function p4(e,t,n,r){if(t===null||typeof t>"u"||h4(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function kt(e,t,n,r,s,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=s,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var ct={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ct[e]=new kt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ct[t]=new kt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ct[e]=new kt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ct[e]=new kt(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ct[e]=new kt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ct[e]=new kt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ct[e]=new kt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ct[e]=new kt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ct[e]=new kt(e,5,!1,e.toLowerCase(),null,!1,!1)});var Cg=/[\-:]([a-z])/g;function jg(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Cg,jg);ct[t]=new kt(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Cg,jg);ct[t]=new kt(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Cg,jg);ct[t]=new kt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ct[e]=new kt(e,1,!1,e.toLowerCase(),null,!1,!1)});ct.xlinkHref=new kt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ct[e]=new kt(e,1,!1,e.toLowerCase(),null,!0,!0)});function kg(e,t,n,r){var s=ct.hasOwnProperty(t)?ct[t]:null;(s!==null?s.type!==0:r||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(p4(t,n,s,r)&&(n=null),r||s===null?f4(t)&&(n===null?e.removeAttribute(t):e.setAttribute(t,""+n)):s.mustUseProperty?e[s.propertyName]=n===null?s.type===3?!1:"":n:(t=s.attributeName,r=s.attributeNamespace,n===null?e.removeAttribute(t):(s=s.type,n=s===3||s===4&&n===!0?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}var _r=Zw.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Kl=Symbol.for("react.element"),fi=Symbol.for("react.portal"),hi=Symbol.for("react.fragment"),Tg=Symbol.for("react.strict_mode"),rp=Symbol.for("react.profiler"),t_=Symbol.for("react.provider"),n_=Symbol.for("react.context"),Pg=Symbol.for("react.forward_ref"),sp=Symbol.for("react.suspense"),ip=Symbol.for("react.suspense_list"),Rg=Symbol.for("react.memo"),Ar=Symbol.for("react.lazy"),r_=Symbol.for("react.offscreen"),x0=Symbol.iterator;function Vo(e){return e===null||typeof e!="object"?null:(e=x0&&e[x0]||e["@@iterator"],typeof e=="function"?e:null)}var $e=Object.assign,Of;function na(e){if(Of===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Of=t&&t[1]||""}return`
`+Of+e}var Af=!1;function $f(e,t){if(!e||Af)return"";Af=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(c){var r=c}Reflect.construct(e,[],t)}else{try{t.call()}catch(c){r=c}e.call(t.prototype)}else{try{throw Error()}catch(c){r=c}e()}}catch(c){if(c&&r&&typeof c.stack=="string"){for(var s=c.stack.split(`
`),i=r.stack.split(`
`),o=s.length-1,a=i.length-1;1<=o&&0<=a&&s[o]!==i[a];)a--;for(;1<=o&&0<=a;o--,a--)if(s[o]!==i[a]){if(o!==1||a!==1)do if(o--,a--,0>a||s[o]!==i[a]){var l=`
`+s[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Af=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?na(e):""}function m4(e){switch(e.tag){case 5:return na(e.type);case 16:return na("Lazy");case 13:return na("Suspense");case 19:return na("SuspenseList");case 0:case 2:case 15:return e=$f(e.type,!1),e;case 11:return e=$f(e.type.render,!1),e;case 1:return e=$f(e.type,!0),e;default:return""}}function op(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case hi:return"Fragment";case fi:return"Portal";case rp:return"Profiler";case Tg:return"StrictMode";case sp:return"Suspense";case ip:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case n_:return(e.displayName||"Context")+".Consumer";case t_:return(e._context.displayName||"Context")+".Provider";case Pg:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Rg:return t=e.displayName||null,t!==null?t:op(e.type)||"Memo";case Ar:t=e._payload,e=e._init;try{return op(e(t))}catch{}}return null}function g4(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return op(t);case 8:return t===Tg?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function ss(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function s_(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function y4(e){var t=s_(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var s=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return s.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Ql(e){e._valueTracker||(e._valueTracker=y4(e))}function i_(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=s_(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function sc(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ap(e,t){var n=t.checked;return $e({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function b0(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=ss(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function o_(e,t){t=t.checked,t!=null&&kg(e,"checked",t,!1)}function lp(e,t){o_(e,t);var n=ss(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?up(e,t.type,n):t.hasOwnProperty("defaultValue")&&up(e,t.type,ss(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function w0(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function up(e,t,n){(t!=="number"||sc(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ra=Array.isArray;function Ti(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s<n.length;s++)t["$"+n[s]]=!0;for(n=0;n<e.length;n++)s=t.hasOwnProperty("$"+e[n].value),e[n].selected!==s&&(e[n].selected=s),s&&r&&(e[n].defaultSelected=!0)}else{for(n=""+ss(n),t=null,s=0;s<e.length;s++){if(e[s].value===n){e[s].selected=!0,r&&(e[s].defaultSelected=!0);return}t!==null||e[s].disabled||(t=e[s])}t!==null&&(t.selected=!0)}}function cp(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(L(91));return $e({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function _0(e,t){var n=t.value;if(n==null){if(n=t.children,t=t.defaultValue,n!=null){if(t!=null)throw Error(L(92));if(ra(n)){if(1<n.length)throw Error(L(93));n=n[0]}t=n}t==null&&(t=""),n=t}e._wrapperState={initialValue:ss(n)}}function a_(e,t){var n=ss(t.value),r=ss(t.defaultValue);n!=null&&(n=""+n,n!==e.value&&(e.value=n),t.defaultValue==null&&e.defaultValue!==n&&(e.defaultValue=n)),r!=null&&(e.defaultValue=""+r)}function S0(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function l_(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function dp(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?l_(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var Gl,u_=function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,n,r,s){MSApp.execUnsafeLocalFunction(function(){return e(t,n,r,s)})}:e}(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(Gl=Gl||document.createElement("div"),Gl.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=Gl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ka(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var da={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},v4=["Webkit","ms","Moz","O"];Object.keys(da).forEach(function(e){v4.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),da[t]=da[e]})});function c_(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||da.hasOwnProperty(e)&&da[e]?(""+t).trim():t+"px"}function d_(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=c_(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var x4=$e({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fp(e,t){if(t){if(x4[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(L(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(L(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(L(61))}if(t.style!=null&&typeof t.style!="object")throw Error(L(62))}}function hp(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var pp=null;function Ng(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mp=null,Pi=null,Ri=null;function E0(e){if(e=gl(e)){if(typeof mp!="function")throw Error(L(280));var t=e.stateNode;t&&(t=xd(t),mp(e.stateNode,e.type,t))}}function f_(e){Pi?Ri?Ri.push(e):Ri=[e]:Pi=e}function h_(){if(Pi){var e=Pi,t=Ri;if(Ri=Pi=null,E0(e),t)for(e=0;e<t.length;e++)E0(t[e])}}function p_(e,t){return e(t)}function m_(){}var If=!1;function g_(e,t,n){if(If)return e(t,n);If=!0;try{return p_(e,t,n)}finally{If=!1,(Pi!==null||Ri!==null)&&(m_(),h_())}}function Ta(e,t){var n=e.stateNode;if(n===null)return null;var r=xd(n);if(r===null)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(L(231,t,typeof n));return n}var gp=!1;if(gr)try{var Bo={};Object.defineProperty(Bo,"passive",{get:function(){gp=!0}}),window.addEventListener("test",Bo,Bo),window.removeEventListener("test",Bo,Bo)}catch{gp=!1}function b4(e,t,n,r,s,i,o,a,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(d){this.onError(d)}}var fa=!1,ic=null,oc=!1,yp=null,w4={onError:function(e){fa=!0,ic=e}};function _4(e,t,n,r,s,i,o,a,l){fa=!1,ic=null,b4.apply(w4,arguments)}function S4(e,t,n,r,s,i,o,a,l){if(_4.apply(this,arguments),fa){if(fa){var c=ic;fa=!1,ic=null}else throw Error(L(198));oc||(oc=!0,yp=c)}}function Ys(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function y_(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function C0(e){if(Ys(e)!==e)throw Error(L(188))}function E4(e){var t=e.alternate;if(!t){if(t=Ys(e),t===null)throw Error(L(188));return t!==e?null:e}for(var n=e,r=t;;){var s=n.return;if(s===null)break;var i=s.alternate;if(i===null){if(r=s.return,r!==null){n=r;continue}break}if(s.child===i.child){for(i=s.child;i;){if(i===n)return C0(s),e;if(i===r)return C0(s),t;i=i.sibling}throw Error(L(188))}if(n.return!==r.return)n=s,r=i;else{for(var o=!1,a=s.child;a;){if(a===n){o=!0,n=s,r=i;break}if(a===r){o=!0,r=s,n=i;break}a=a.sibling}if(!o){for(a=i.child;a;){if(a===n){o=!0,n=i,r=s;break}if(a===r){o=!0,r=i,n=s;break}a=a.sibling}if(!o)throw Error(L(189))}}if(n.alternate!==r)throw Error(L(190))}if(n.tag!==3)throw Error(L(188));return n.stateNode.current===n?e:t}function v_(e){return e=E4(e),e!==null?x_(e):null}function x_(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=x_(e);if(t!==null)return t;e=e.sibling}return null}var b_=qt.unstable_scheduleCallback,j0=qt.unstable_cancelCallback,C4=qt.unstable_shouldYield,j4=qt.unstable_requestPaint,qe=qt.unstable_now,k4=qt.unstable_getCurrentPriorityLevel,Og=qt.unstable_ImmediatePriority,w_=qt.unstable_UserBlockingPriority,ac=qt.unstable_NormalPriority,T4=qt.unstable_LowPriority,__=qt.unstable_IdlePriority,md=null,Bn=null;function P4(e){if(Bn&&typeof Bn.onCommitFiberRoot=="function")try{Bn.onCommitFiberRoot(md,e,void 0,(e.current.flags&128)===128)}catch{}}var En=Math.clz32?Math.clz32:O4,R4=Math.log,N4=Math.LN2;function O4(e){return e>>>=0,e===0?32:31-(R4(e)/N4|0)|0}var Yl=64,Xl=4194304;function sa(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function lc(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,s=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~s;a!==0?r=sa(a):(i&=o,i!==0&&(r=sa(i)))}else o=n&~s,o!==0?r=sa(o):i!==0&&(r=sa(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&s)&&(s=r&-r,i=t&-t,s>=i||s===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0<t;)n=31-En(t),s=1<<n,r|=e[n],t&=~s;return r}function A4(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function $4(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,s=e.expirationTimes,i=e.pendingLanes;0<i;){var o=31-En(i),a=1<<o,l=s[o];l===-1?(!(a&n)||a&r)&&(s[o]=A4(a,t)):l<=t&&(e.expiredLanes|=a),i&=~a}}function vp(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function S_(){var e=Yl;return Yl<<=1,!(Yl&4194240)&&(Yl=64),e}function Df(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function pl(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-En(t),e[t]=n}function I4(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var s=31-En(n),i=1<<s;t[s]=0,r[s]=-1,e[s]=-1,n&=~i}}function Ag(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-En(n),s=1<<r;s&t|e[r]&t&&(e[r]|=t),n&=~s}}var pe=0;function E_(e){return e&=-e,1<e?4<e?e&268435455?16:536870912:4:1}var C_,$g,j_,k_,T_,xp=!1,Jl=[],Hr=null,qr=null,Wr=null,Pa=new Map,Ra=new Map,Lr=[],D4="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function k0(e,t){switch(e){case"focusin":case"focusout":Hr=null;break;case"dragenter":case"dragleave":qr=null;break;case"mouseover":case"mouseout":Wr=null;break;case"pointerover":case"pointerout":Pa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ra.delete(t.pointerId)}}function Ho(e,t,n,r,s,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[s]},t!==null&&(t=gl(t),t!==null&&$g(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,s!==null&&t.indexOf(s)===-1&&t.push(s),e)}function M4(e,t,n,r,s){switch(t){case"focusin":return Hr=Ho(Hr,e,t,n,r,s),!0;case"dragenter":return qr=Ho(qr,e,t,n,r,s),!0;case"mouseover":return Wr=Ho(Wr,e,t,n,r,s),!0;case"pointerover":var i=s.pointerId;return Pa.set(i,Ho(Pa.get(i)||null,e,t,n,r,s)),!0;case"gotpointercapture":return i=s.pointerId,Ra.set(i,Ho(Ra.get(i)||null,e,t,n,r,s)),!0}return!1}function P_(e){var t=_s(e.target);if(t!==null){var n=Ys(t);if(n!==null){if(t=n.tag,t===13){if(t=y_(n),t!==null){e.blockedOn=t,T_(e.priority,function(){j_(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Au(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bp(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);pp=r,n.target.dispatchEvent(r),pp=null}else return t=gl(n),t!==null&&$g(t),e.blockedOn=n,!1;t.shift()}return!0}function T0(e,t,n){Au(e)&&n.delete(t)}function L4(){xp=!1,Hr!==null&&Au(Hr)&&(Hr=null),qr!==null&&Au(qr)&&(qr=null),Wr!==null&&Au(Wr)&&(Wr=null),Pa.forEach(T0),Ra.forEach(T0)}function qo(e,t){e.blockedOn===t&&(e.blockedOn=null,xp||(xp=!0,qt.unstable_scheduleCallback(qt.unstable_NormalPriority,L4)))}function Na(e){function t(s){return qo(s,e)}if(0<Jl.length){qo(Jl[0],e);for(var n=1;n<Jl.length;n++){var r=Jl[n];r.blockedOn===e&&(r.blockedOn=null)}}for(Hr!==null&&qo(Hr,e),qr!==null&&qo(qr,e),Wr!==null&&qo(Wr,e),Pa.forEach(t),Ra.forEach(t),n=0;n<Lr.length;n++)r=Lr[n],r.blockedOn===e&&(r.blockedOn=null);for(;0<Lr.length&&(n=Lr[0],n.blockedOn===null);)P_(n),n.blockedOn===null&&Lr.shift()}var Ni=_r.ReactCurrentBatchConfig,uc=!0;function F4(e,t,n,r){var s=pe,i=Ni.transition;Ni.transition=null;try{pe=1,Ig(e,t,n,r)}finally{pe=s,Ni.transition=i}}function U4(e,t,n,r){var s=pe,i=Ni.transition;Ni.transition=null;try{pe=4,Ig(e,t,n,r)}finally{pe=s,Ni.transition=i}}function Ig(e,t,n,r){if(uc){var s=bp(e,t,n,r);if(s===null)Wf(e,t,r,cc,n),k0(e,r);else if(M4(s,e,t,n,r))r.stopPropagation();else if(k0(e,r),t&4&&-1<D4.indexOf(e)){for(;s!==null;){var i=gl(s);if(i!==null&&C_(i),i=bp(e,t,n,r),i===null&&Wf(e,t,r,cc,n),i===s)break;s=i}s!==null&&r.stopPropagation()}else Wf(e,t,r,null,n)}}var cc=null;function bp(e,t,n,r){if(cc=null,e=Ng(r),e=_s(e),e!==null)if(t=Ys(e),t===null)e=null;else if(n=t.tag,n===13){if(e=y_(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return cc=e,null}function R_(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(k4()){case Og:return 1;case w_:return 4;case ac:case T4:return 16;case __:return 536870912;default:return 16}default:return 16}}var Ur=null,Dg=null,$u=null;function N_(){if($u)return $u;var e,t=Dg,n=t.length,r,s="value"in Ur?Ur.value:Ur.textContent,i=s.length;for(e=0;e<n&&t[e]===s[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===s[i-r];r++);return $u=s.slice(e,1<r?1-r:void 0)}function Iu(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Zl(){return!0}function P0(){return!1}function Gt(e){function t(n,r,s,i,o){this._reactName=n,this._targetInst=s,this.type=r,this.nativeEvent=i,this.target=o,this.currentTarget=null;for(var a in e)e.hasOwnProperty(a)&&(n=e[a],this[a]=n?n(i):i[a]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Zl:P0,this.isPropagationStopped=P0,this}return $e(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Zl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Zl)},persist:function(){},isPersistent:Zl}),t}var _o={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Mg=Gt(_o),ml=$e({},_o,{view:0,detail:0}),z4=Gt(ml),Mf,Lf,Wo,gd=$e({},ml,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Lg,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Wo&&(Wo&&e.type==="mousemove"?(Mf=e.screenX-Wo.screenX,Lf=e.screenY-Wo.screenY):Lf=Mf=0,Wo=e),Mf)},movementY:function(e){return"movementY"in e?e.movementY:Lf}}),R0=Gt(gd),V4=$e({},gd,{dataTransfer:0}),B4=Gt(V4),H4=$e({},ml,{relatedTarget:0}),Ff=Gt(H4),q4=$e({},_o,{animationName:0,elapsedTime:0,pseudoElement:0}),W4=Gt(q4),K4=$e({},_o,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Q4=Gt(K4),G4=$e({},_o,{data:0}),N0=Gt(G4),Y4={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},X4={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},J4={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Z4(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=J4[e])?!!t[e]:!1}function Lg(){return Z4}var eP=$e({},ml,{key:function(e){if(e.key){var t=Y4[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Iu(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?X4[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Lg,charCode:function(e){return e.type==="keypress"?Iu(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Iu(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),tP=Gt(eP),nP=$e({},gd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),O0=Gt(nP),rP=$e({},ml,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Lg}),sP=Gt(rP),iP=$e({},_o,{propertyName:0,elapsedTime:0,pseudoElement:0}),oP=Gt(iP),aP=$e({},gd,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),lP=Gt(aP),uP=[9,13,27,32],Fg=gr&&"CompositionEvent"in window,ha=null;gr&&"documentMode"in document&&(ha=document.documentMode);var cP=gr&&"TextEvent"in window&&!ha,O_=gr&&(!Fg||ha&&8<ha&&11>=ha),A0=String.fromCharCode(32),$0=!1;function A_(e,t){switch(e){case"keyup":return uP.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $_(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var pi=!1;function dP(e,t){switch(e){case"compositionend":return $_(t);case"keypress":return t.which!==32?null:($0=!0,A0);case"textInput":return e=t.data,e===A0&&$0?null:e;default:return null}}function fP(e,t){if(pi)return e==="compositionend"||!Fg&&A_(e,t)?(e=N_(),$u=Dg=Ur=null,pi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return O_&&t.locale!=="ko"?null:t.data;default:return null}}var hP={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function I0(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!hP[e.type]:t==="textarea"}function I_(e,t,n,r){f_(r),t=dc(t,"onChange"),0<t.length&&(n=new Mg("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var pa=null,Oa=null;function pP(e){W_(e,0)}function yd(e){var t=yi(e);if(i_(t))return e}function mP(e,t){if(e==="change")return t}var D_=!1;if(gr){var Uf;if(gr){var zf="oninput"in document;if(!zf){var D0=document.createElement("div");D0.setAttribute("oninput","return;"),zf=typeof D0.oninput=="function"}Uf=zf}else Uf=!1;D_=Uf&&(!document.documentMode||9<document.documentMode)}function M0(){pa&&(pa.detachEvent("onpropertychange",M_),Oa=pa=null)}function M_(e){if(e.propertyName==="value"&&yd(Oa)){var t=[];I_(t,Oa,e,Ng(e)),g_(pP,t)}}function gP(e,t,n){e==="focusin"?(M0(),pa=t,Oa=n,pa.attachEvent("onpropertychange",M_)):e==="focusout"&&M0()}function yP(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return yd(Oa)}function vP(e,t){if(e==="click")return yd(t)}function xP(e,t){if(e==="input"||e==="change")return yd(t)}function bP(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Tn=typeof Object.is=="function"?Object.is:bP;function Aa(e,t){if(Tn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var s=n[r];if(!np.call(t,s)||!Tn(e[s],t[s]))return!1}return!0}function L0(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function F0(e,t){var n=L0(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=L0(n)}}function L_(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?L_(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function F_(){for(var e=window,t=sc();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=sc(e.document)}return t}function Ug(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function wP(e){var t=F_(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&L_(n.ownerDocument.documentElement,n)){if(r!==null&&Ug(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var s=n.textContent.length,i=Math.min(r.start,s);r=r.end===void 0?i:Math.min(r.end,s),!e.extend&&i>r&&(s=r,r=i,i=s),s=F0(n,i);var o=F0(n,r);s&&o&&(e.rangeCount!==1||e.anchorNode!==s.node||e.anchorOffset!==s.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(s.node,s.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n<t.length;n++)e=t[n],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var _P=gr&&"documentMode"in document&&11>=document.documentMode,mi=null,wp=null,ma=null,_p=!1;function U0(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;_p||mi==null||mi!==sc(r)||(r=mi,"selectionStart"in r&&Ug(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ma&&Aa(ma,r)||(ma=r,r=dc(wp,"onSelect"),0<r.length&&(t=new Mg("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=mi)))}function eu(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var gi={animationend:eu("Animation","AnimationEnd"),animationiteration:eu("Animation","AnimationIteration"),animationstart:eu("Animation","AnimationStart"),transitionend:eu("Transition","TransitionEnd")},Vf={},U_={};gr&&(U_=document.createElement("div").style,"AnimationEvent"in window||(delete gi.animationend.animation,delete gi.animationiteration.animation,delete gi.animationstart.animation),"TransitionEvent"in window||delete gi.transitionend.transition);function vd(e){if(Vf[e])return Vf[e];if(!gi[e])return e;var t=gi[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in U_)return Vf[e]=t[n];return e}var z_=vd("animationend"),V_=vd("animationiteration"),B_=vd("animationstart"),H_=vd("transitionend"),q_=new Map,z0="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function cs(e,t){q_.set(e,t),Gs(t,[e])}for(var Bf=0;Bf<z0.length;Bf++){var Hf=z0[Bf],SP=Hf.toLowerCase(),EP=Hf[0].toUpperCase()+Hf.slice(1);cs(SP,"on"+EP)}cs(z_,"onAnimationEnd");cs(V_,"onAnimationIteration");cs(B_,"onAnimationStart");cs("dblclick","onDoubleClick");cs("focusin","onFocus");cs("focusout","onBlur");cs(H_,"onTransitionEnd");Ki("onMouseEnter",["mouseout","mouseover"]);Ki("onMouseLeave",["mouseout","mouseover"]);Ki("onPointerEnter",["pointerout","pointerover"]);Ki("onPointerLeave",["pointerout","pointerover"]);Gs("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gs("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gs("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gs("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gs("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gs("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ia="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),CP=new Set("cancel close invalid load scroll toggle".split(" ").concat(ia));function V0(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,S4(r,t,void 0,e),e.currentTarget=null}function W_(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],s=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var o=r.length-1;0<=o;o--){var a=r[o],l=a.instance,c=a.currentTarget;if(a=a.listener,l!==i&&s.isPropagationStopped())break e;V0(s,a,c),i=l}else for(o=0;o<r.length;o++){if(a=r[o],l=a.instance,c=a.currentTarget,a=a.listener,l!==i&&s.isPropagationStopped())break e;V0(s,a,c),i=l}}}if(oc)throw e=yp,oc=!1,yp=null,e}function Ee(e,t){var n=t[kp];n===void 0&&(n=t[kp]=new Set);var r=e+"__bubble";n.has(r)||(K_(t,e,2,!1),n.add(r))}function qf(e,t,n){var r=0;t&&(r|=4),K_(n,e,r,t)}var tu="_reactListening"+Math.random().toString(36).slice(2);function $a(e){if(!e[tu]){e[tu]=!0,e_.forEach(function(n){n!=="selectionchange"&&(CP.has(n)||qf(n,!1,e),qf(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[tu]||(t[tu]=!0,qf("selectionchange",!1,t))}}function K_(e,t,n,r){switch(R_(t)){case 1:var s=F4;break;case 4:s=U4;break;default:s=Ig}n=s.bind(null,t,n,e),s=void 0,!gp||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(s=!0),r?s!==void 0?e.addEventListener(t,n,{capture:!0,passive:s}):e.addEventListener(t,n,!0):s!==void 0?e.addEventListener(t,n,{passive:s}):e.addEventListener(t,n,!1)}function Wf(e,t,n,r,s){var i=r;if(!(t&1)&&!(t&2)&&r!==null)e:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var a=r.stateNode.containerInfo;if(a===s||a.nodeType===8&&a.parentNode===s)break;if(o===4)for(o=r.return;o!==null;){var l=o.tag;if((l===3||l===4)&&(l=o.stateNode.containerInfo,l===s||l.nodeType===8&&l.parentNode===s))return;o=o.return}for(;a!==null;){if(o=_s(a),o===null)return;if(l=o.tag,l===5||l===6){r=i=o;continue e}a=a.parentNode}}r=r.return}g_(function(){var c=i,d=Ng(n),f=[];e:{var h=q_.get(e);if(h!==void 0){var p=Mg,g=e;switch(e){case"keypress":if(Iu(n)===0)break e;case"keydown":case"keyup":p=tP;break;case"focusin":g="focus",p=Ff;break;case"focusout":g="blur",p=Ff;break;case"beforeblur":case"afterblur":p=Ff;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=R0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=B4;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=sP;break;case z_:case V_:case B_:p=W4;break;case H_:p=oP;break;case"scroll":p=z4;break;case"wheel":p=lP;break;case"copy":case"cut":case"paste":p=Q4;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=O0}var b=(t&4)!==0,w=!b&&e==="scroll",y=b?h!==null?h+"Capture":null:h;b=[];for(var m=c,x;m!==null;){x=m;var _=x.stateNode;if(x.tag===5&&_!==null&&(x=_,y!==null&&(_=Ta(m,y),_!=null&&b.push(Ia(m,_,x)))),w)break;m=m.return}0<b.length&&(h=new p(h,g,null,n,d),f.push({event:h,listeners:b}))}}if(!(t&7)){e:{if(h=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",h&&n!==pp&&(g=n.relatedTarget||n.fromElement)&&(_s(g)||g[yr]))break e;if((p||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,p?(g=n.relatedTarget||n.toElement,p=c,g=g?_s(g):null,g!==null&&(w=Ys(g),g!==w||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=c),p!==g)){if(b=R0,_="onMouseLeave",y="onMouseEnter",m="mouse",(e==="pointerout"||e==="pointerover")&&(b=O0,_="onPointerLeave",y="onPointerEnter",m="pointer"),w=p==null?h:yi(p),x=g==null?h:yi(g),h=new b(_,m+"leave",p,n,d),h.target=w,h.relatedTarget=x,_=null,_s(d)===c&&(b=new b(y,m+"enter",g,n,d),b.target=x,b.relatedTarget=w,_=b),w=_,p&&g)t:{for(b=p,y=g,m=0,x=b;x;x=si(x))m++;for(x=0,_=y;_;_=si(_))x++;for(;0<m-x;)b=si(b),m--;for(;0<x-m;)y=si(y),x--;for(;m--;){if(b===y||y!==null&&b===y.alternate)break t;b=si(b),y=si(y)}b=null}else b=null;p!==null&&B0(f,h,p,b,!1),g!==null&&w!==null&&B0(f,w,g,b,!0)}}e:{if(h=c?yi(c):window,p=h.nodeName&&h.nodeName.toLowerCase(),p==="select"||p==="input"&&h.type==="file")var S=mP;else if(I0(h))if(D_)S=xP;else{S=yP;var E=gP}else(p=h.nodeName)&&p.toLowerCase()==="input"&&(h.type==="checkbox"||h.type==="radio")&&(S=vP);if(S&&(S=S(e,c))){I_(f,S,n,d);break e}E&&E(e,h,c),e==="focusout"&&(E=h._wrapperState)&&E.controlled&&h.type==="number"&&up(h,"number",h.value)}switch(E=c?yi(c):window,e){case"focusin":(I0(E)||E.contentEditable==="true")&&(mi=E,wp=c,ma=null);break;case"focusout":ma=wp=mi=null;break;case"mousedown":_p=!0;break;case"contextmenu":case"mouseup":case"dragend":_p=!1,U0(f,n,d);break;case"selectionchange":if(_P)break;case"keydown":case"keyup":U0(f,n,d)}var C;if(Fg)e:{switch(e){case"compositionstart":var k="onCompositionStart";break e;case"compositionend":k="onCompositionEnd";break e;case"compositionupdate":k="onCompositionUpdate";break e}k=void 0}else pi?A_(e,n)&&(k="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(k="onCompositionStart");k&&(O_&&n.locale!=="ko"&&(pi||k!=="onCompositionStart"?k==="onCompositionEnd"&&pi&&(C=N_()):(Ur=d,Dg="value"in Ur?Ur.value:Ur.textContent,pi=!0)),E=dc(c,k),0<E.length&&(k=new N0(k,e,null,n,d),f.push({event:k,listeners:E}),C?k.data=C:(C=$_(n),C!==null&&(k.data=C)))),(C=cP?dP(e,n):fP(e,n))&&(c=dc(c,"onBeforeInput"),0<c.length&&(d=new N0("onBeforeInput","beforeinput",null,n,d),f.push({event:d,listeners:c}),d.data=C))}W_(f,t)})}function Ia(e,t,n){return{instance:e,listener:t,currentTarget:n}}function dc(e,t){for(var n=t+"Capture",r=[];e!==null;){var s=e,i=s.stateNode;s.tag===5&&i!==null&&(s=i,i=Ta(e,n),i!=null&&r.unshift(Ia(e,i,s)),i=Ta(e,t),i!=null&&r.push(Ia(e,i,s))),e=e.return}return r}function si(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function B0(e,t,n,r,s){for(var i=t._reactName,o=[];n!==null&&n!==r;){var a=n,l=a.alternate,c=a.stateNode;if(l!==null&&l===r)break;a.tag===5&&c!==null&&(a=c,s?(l=Ta(n,i),l!=null&&o.unshift(Ia(n,l,a))):s||(l=Ta(n,i),l!=null&&o.push(Ia(n,l,a)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var jP=/\r\n?/g,kP=/\u0000|\uFFFD/g;function H0(e){return(typeof e=="string"?e:""+e).replace(jP,`
`).replace(kP,"")}function nu(e,t,n){if(t=H0(t),H0(e)!==t&&n)throw Error(L(425))}function fc(){}var Sp=null,Ep=null;function Cp(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var jp=typeof setTimeout=="function"?setTimeout:void 0,TP=typeof clearTimeout=="function"?clearTimeout:void 0,q0=typeof Promise=="function"?Promise:void 0,PP=typeof queueMicrotask=="function"?queueMicrotask:typeof q0<"u"?function(e){return q0.resolve(null).then(e).catch(RP)}:jp;function RP(e){setTimeout(function(){throw e})}function Kf(e,t){var n=t,r=0;do{var s=n.nextSibling;if(e.removeChild(n),s&&s.nodeType===8)if(n=s.data,n==="/$"){if(r===0){e.removeChild(s),Na(t);return}r--}else n!=="$"&&n!=="$?"&&n!=="$!"||r++;n=s}while(n);Na(t)}function Kr(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function W0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}var So=Math.random().toString(36).slice(2),Fn="__reactFiber$"+So,Da="__reactProps$"+So,yr="__reactContainer$"+So,kp="__reactEvents$"+So,NP="__reactListeners$"+So,OP="__reactHandles$"+So;function _s(e){var t=e[Fn];if(t)return t;for(var n=e.parentNode;n;){if(t=n[yr]||n[Fn]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=W0(e);e!==null;){if(n=e[Fn])return n;e=W0(e)}return t}e=n,n=e.parentNode}return null}function gl(e){return e=e[Fn]||e[yr],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function yi(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(L(33))}function xd(e){return e[Da]||null}var Tp=[],vi=-1;function ds(e){return{current:e}}function Ce(e){0>vi||(e.current=Tp[vi],Tp[vi]=null,vi--)}function Se(e,t){vi++,Tp[vi]=e.current,e.current=t}var is={},yt=ds(is),$t=ds(!1),Is=is;function Qi(e,t){var n=e.type.contextTypes;if(!n)return is;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var s={},i;for(i in n)s[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=s),s}function It(e){return e=e.childContextTypes,e!=null}function hc(){Ce($t),Ce(yt)}function K0(e,t,n){if(yt.current!==is)throw Error(L(168));Se(yt,t),Se($t,n)}function Q_(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var s in r)if(!(s in t))throw Error(L(108,g4(e)||"Unknown",s));return $e({},n,r)}function pc(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||is,Is=yt.current,Se(yt,e),Se($t,$t.current),!0}function Q0(e,t,n){var r=e.stateNode;if(!r)throw Error(L(169));n?(e=Q_(e,t,Is),r.__reactInternalMemoizedMergedChildContext=e,Ce($t),Ce(yt),Se(yt,e)):Ce($t),Se($t,n)}var ir=null,bd=!1,Qf=!1;function G_(e){ir===null?ir=[e]:ir.push(e)}function AP(e){bd=!0,G_(e)}function fs(){if(!Qf&&ir!==null){Qf=!0;var e=0,t=pe;try{var n=ir;for(pe=1;e<n.length;e++){var r=n[e];do r=r(!0);while(r!==null)}ir=null,bd=!1}catch(s){throw ir!==null&&(ir=ir.slice(e+1)),b_(Og,fs),s}finally{pe=t,Qf=!1}}return null}var xi=[],bi=0,mc=null,gc=0,en=[],tn=0,Ds=null,lr=1,ur="";function ys(e,t){xi[bi++]=gc,xi[bi++]=mc,mc=e,gc=t}function Y_(e,t,n){en[tn++]=lr,en[tn++]=ur,en[tn++]=Ds,Ds=e;var r=lr;e=ur;var s=32-En(r)-1;r&=~(1<<s),n+=1;var i=32-En(t)+s;if(30<i){var o=s-s%5;i=(r&(1<<o)-1).toString(32),r>>=o,s-=o,lr=1<<32-En(t)+s|n<<s|r,ur=i+e}else lr=1<<i|n<<s|r,ur=e}function zg(e){e.return!==null&&(ys(e,1),Y_(e,1,0))}function Vg(e){for(;e===mc;)mc=xi[--bi],xi[bi]=null,gc=xi[--bi],xi[bi]=null;for(;e===Ds;)Ds=en[--tn],en[tn]=null,ur=en[--tn],en[tn]=null,lr=en[--tn],en[tn]=null}var Ht=null,Vt=null,Te=!1,_n=null;function X_(e,t){var n=on(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)}function G0(e,t){switch(e.tag){case 5:var n=e.type;return t=t.nodeType!==1||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,Ht=e,Vt=Kr(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,Ht=e,Vt=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(n=Ds!==null?{id:lr,overflow:ur}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},n=on(18,null,null,0),n.stateNode=t,n.return=e,e.child=n,Ht=e,Vt=null,!0):!1;default:return!1}}function Pp(e){return(e.mode&1)!==0&&(e.flags&128)===0}function Rp(e){if(Te){var t=Vt;if(t){var n=t;if(!G0(e,t)){if(Pp(e))throw Error(L(418));t=Kr(n.nextSibling);var r=Ht;t&&G0(e,t)?X_(r,n):(e.flags=e.flags&-4097|2,Te=!1,Ht=e)}}else{if(Pp(e))throw Error(L(418));e.flags=e.flags&-4097|2,Te=!1,Ht=e}}}function Y0(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;Ht=e}function ru(e){if(e!==Ht)return!1;if(!Te)return Y0(e),Te=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!Cp(e.type,e.memoizedProps)),t&&(t=Vt)){if(Pp(e))throw J_(),Error(L(418));for(;t;)X_(e,t),t=Kr(t.nextSibling)}if(Y0(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(L(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"){if(t===0){Vt=Kr(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++}e=e.nextSibling}Vt=null}}else Vt=Ht?Kr(e.stateNode.nextSibling):null;return!0}function J_(){for(var e=Vt;e;)e=Kr(e.nextSibling)}function Gi(){Vt=Ht=null,Te=!1}function Bg(e){_n===null?_n=[e]:_n.push(e)}var $P=_r.ReactCurrentBatchConfig;function bn(e,t){if(e&&e.defaultProps){t=$e({},t),e=e.defaultProps;for(var n in e)t[n]===void 0&&(t[n]=e[n]);return t}return t}var yc=ds(null),vc=null,wi=null,Hg=null;function qg(){Hg=wi=vc=null}function Wg(e){var t=yc.current;Ce(yc),e._currentValue=t}function Np(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Oi(e,t){vc=e,Hg=wi=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Ot=!0),e.firstContext=null)}function pn(e){var t=e._currentValue;if(Hg!==e)if(e={context:e,memoizedValue:t,next:null},wi===null){if(vc===null)throw Error(L(308));wi=e,vc.dependencies={lanes:0,firstContext:e}}else wi=wi.next=e;return t}var Ss=null;function Kg(e){Ss===null?Ss=[e]:Ss.push(e)}function Z_(e,t,n,r){var s=t.interleaved;return s===null?(n.next=n,Kg(t)):(n.next=s.next,s.next=n),t.interleaved=n,vr(e,r)}function vr(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var $r=!1;function Qg(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function eS(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function fr(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Qr(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ue&2){var s=r.pending;return s===null?t.next=t:(t.next=s.next,s.next=t),r.pending=t,vr(e,n)}return s=r.interleaved,s===null?(t.next=t,Kg(r)):(t.next=s.next,s.next=t),r.interleaved=t,vr(e,n)}function Du(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ag(e,n)}}function X0(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var s=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};i===null?s=i=o:i=i.next=o,n=n.next}while(n!==null);i===null?s=i=t:i=i.next=t}else s=i=t;n={baseState:r.baseState,firstBaseUpdate:s,lastBaseUpdate:i,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function xc(e,t,n,r){var s=e.updateQueue;$r=!1;var i=s.firstBaseUpdate,o=s.lastBaseUpdate,a=s.shared.pending;if(a!==null){s.shared.pending=null;var l=a,c=l.next;l.next=null,o===null?i=c:o.next=c,o=l;var d=e.alternate;d!==null&&(d=d.updateQueue,a=d.lastBaseUpdate,a!==o&&(a===null?d.firstBaseUpdate=c:a.next=c,d.lastBaseUpdate=l))}if(i!==null){var f=s.baseState;o=0,d=c=l=null,a=i;do{var h=a.lane,p=a.eventTime;if((r&h)===h){d!==null&&(d=d.next={eventTime:p,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var g=e,b=a;switch(h=t,p=n,b.tag){case 1:if(g=b.payload,typeof g=="function"){f=g.call(p,f,h);break e}f=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=b.payload,h=typeof g=="function"?g.call(p,f,h):g,h==null)break e;f=$e({},f,h);break e;case 2:$r=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,h=s.effects,h===null?s.effects=[a]:h.push(a))}else p={eventTime:p,lane:h,tag:a.tag,payload:a.payload,callback:a.callback,next:null},d===null?(c=d=p,l=f):d=d.next=p,o|=h;if(a=a.next,a===null){if(a=s.shared.pending,a===null)break;h=a,a=h.next,h.next=null,s.lastBaseUpdate=h,s.shared.pending=null}}while(1);if(d===null&&(l=f),s.baseState=l,s.firstBaseUpdate=c,s.lastBaseUpdate=d,t=s.shared.interleaved,t!==null){s=t;do o|=s.lane,s=s.next;while(s!==t)}else i===null&&(s.shared.lanes=0);Ls|=o,e.lanes=o,e.memoizedState=f}}function J0(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var r=e[t],s=r.callback;if(s!==null){if(r.callback=null,r=n,typeof s!="function")throw Error(L(191,s));s.call(r)}}}var tS=new Zw.Component().refs;function Op(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:$e({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var wd={isMounted:function(e){return(e=e._reactInternals)?Ys(e)===e:!1},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Ct(),s=Yr(e),i=fr(r,s);i.payload=t,n!=null&&(i.callback=n),t=Qr(e,i,s),t!==null&&(Cn(t,e,s,r),Du(t,e,s))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Ct(),s=Yr(e),i=fr(r,s);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Qr(e,i,s),t!==null&&(Cn(t,e,s,r),Du(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Ct(),r=Yr(e),s=fr(n,r);s.tag=2,t!=null&&(s.callback=t),t=Qr(e,s,r),t!==null&&(Cn(t,e,r,n),Du(t,e,r))}};function Z0(e,t,n,r,s,i,o){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,i,o):t.prototype&&t.prototype.isPureReactComponent?!Aa(n,r)||!Aa(s,i):!0}function nS(e,t,n){var r=!1,s=is,i=t.contextType;return typeof i=="object"&&i!==null?i=pn(i):(s=It(t)?Is:yt.current,r=t.contextTypes,i=(r=r!=null)?Qi(e,s):is),t=new t(n,i),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=wd,e.stateNode=t,t._reactInternals=e,r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=s,e.__reactInternalMemoizedMaskedChildContext=i),t}function e1(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&wd.enqueueReplaceState(t,t.state,null)}function Ap(e,t,n,r){var s=e.stateNode;s.props=n,s.state=e.memoizedState,s.refs=tS,Qg(e);var i=t.contextType;typeof i=="object"&&i!==null?s.context=pn(i):(i=It(t)?Is:yt.current,s.context=Qi(e,i)),s.state=e.memoizedState,i=t.getDerivedStateFromProps,typeof i=="function"&&(Op(e,t,i,n),s.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(t=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),t!==s.state&&wd.enqueueReplaceState(s,s.state,null),xc(e,n,s,r),s.state=e.memoizedState),typeof s.componentDidMount=="function"&&(e.flags|=4194308)}function Ko(e,t,n){if(e=n.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(L(309));var r=n.stateNode}if(!r)throw Error(L(147,e));var s=r,i=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===i?t.ref:(t=function(o){var a=s.refs;a===tS&&(a=s.refs={}),o===null?delete a[i]:a[i]=o},t._stringRef=i,t)}if(typeof e!="string")throw Error(L(284));if(!n._owner)throw Error(L(290,e))}return e}function su(e,t){throw e=Object.prototype.toString.call(t),Error(L(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function t1(e){var t=e._init;return t(e._payload)}function rS(e){function t(y,m){if(e){var x=y.deletions;x===null?(y.deletions=[m],y.flags|=16):x.push(m)}}function n(y,m){if(!e)return null;for(;m!==null;)t(y,m),m=m.sibling;return null}function r(y,m){for(y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function s(y,m){return y=Xr(y,m),y.index=0,y.sibling=null,y}function i(y,m,x){return y.index=x,e?(x=y.alternate,x!==null?(x=x.index,x<m?(y.flags|=2,m):x):(y.flags|=2,m)):(y.flags|=1048576,m)}function o(y){return e&&y.alternate===null&&(y.flags|=2),y}function a(y,m,x,_){return m===null||m.tag!==6?(m=th(x,y.mode,_),m.return=y,m):(m=s(m,x),m.return=y,m)}function l(y,m,x,_){var S=x.type;return S===hi?d(y,m,x.props.children,_,x.key):m!==null&&(m.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ar&&t1(S)===m.type)?(_=s(m,x.props),_.ref=Ko(y,m,x),_.return=y,_):(_=Vu(x.type,x.key,x.props,null,y.mode,_),_.ref=Ko(y,m,x),_.return=y,_)}function c(y,m,x,_){return m===null||m.tag!==4||m.stateNode.containerInfo!==x.containerInfo||m.stateNode.implementation!==x.implementation?(m=nh(x,y.mode,_),m.return=y,m):(m=s(m,x.children||[]),m.return=y,m)}function d(y,m,x,_,S){return m===null||m.tag!==7?(m=Ns(x,y.mode,_,S),m.return=y,m):(m=s(m,x),m.return=y,m)}function f(y,m,x){if(typeof m=="string"&&m!==""||typeof m=="number")return m=th(""+m,y.mode,x),m.return=y,m;if(typeof m=="object"&&m!==null){switch(m.$$typeof){case Kl:return x=Vu(m.type,m.key,m.props,null,y.mode,x),x.ref=Ko(y,null,m),x.return=y,x;case fi:return m=nh(m,y.mode,x),m.return=y,m;case Ar:var _=m._init;return f(y,_(m._payload),x)}if(ra(m)||Vo(m))return m=Ns(m,y.mode,x,null),m.return=y,m;su(y,m)}return null}function h(y,m,x,_){var S=m!==null?m.key:null;if(typeof x=="string"&&x!==""||typeof x=="number")return S!==null?null:a(y,m,""+x,_);if(typeof x=="object"&&x!==null){switch(x.$$typeof){case Kl:return x.key===S?l(y,m,x,_):null;case fi:return x.key===S?c(y,m,x,_):null;case Ar:return S=x._init,h(y,m,S(x._payload),_)}if(ra(x)||Vo(x))return S!==null?null:d(y,m,x,_,null);su(y,x)}return null}function p(y,m,x,_,S){if(typeof _=="string"&&_!==""||typeof _=="number")return y=y.get(x)||null,a(m,y,""+_,S);if(typeof _=="object"&&_!==null){switch(_.$$typeof){case Kl:return y=y.get(_.key===null?x:_.key)||null,l(m,y,_,S);case fi:return y=y.get(_.key===null?x:_.key)||null,c(m,y,_,S);case Ar:var E=_._init;return p(y,m,x,E(_._payload),S)}if(ra(_)||Vo(_))return y=y.get(x)||null,d(m,y,_,S,null);su(m,_)}return null}function g(y,m,x,_){for(var S=null,E=null,C=m,k=m=0,P=null;C!==null&&k<x.length;k++){C.index>k?(P=C,C=null):P=C.sibling;var O=h(y,C,x[k],_);if(O===null){C===null&&(C=P);break}e&&C&&O.alternate===null&&t(y,C),m=i(O,m,k),E===null?S=O:E.sibling=O,E=O,C=P}if(k===x.length)return n(y,C),Te&&ys(y,k),S;if(C===null){for(;k<x.length;k++)C=f(y,x[k],_),C!==null&&(m=i(C,m,k),E===null?S=C:E.sibling=C,E=C);return Te&&ys(y,k),S}for(C=r(y,C);k<x.length;k++)P=p(C,y,k,x[k],_),P!==null&&(e&&P.alternate!==null&&C.delete(P.key===null?k:P.key),m=i(P,m,k),E===null?S=P:E.sibling=P,E=P);return e&&C.forEach(function($){return t(y,$)}),Te&&ys(y,k),S}function b(y,m,x,_){var S=Vo(x);if(typeof S!="function")throw Error(L(150));if(x=S.call(x),x==null)throw Error(L(151));for(var E=S=null,C=m,k=m=0,P=null,O=x.next();C!==null&&!O.done;k++,O=x.next()){C.index>k?(P=C,C=null):P=C.sibling;var $=h(y,C,O.value,_);if($===null){C===null&&(C=P);break}e&&C&&$.alternate===null&&t(y,C),m=i($,m,k),E===null?S=$:E.sibling=$,E=$,C=P}if(O.done)return n(y,C),Te&&ys(y,k),S;if(C===null){for(;!O.done;k++,O=x.next())O=f(y,O.value,_),O!==null&&(m=i(O,m,k),E===null?S=O:E.sibling=O,E=O);return Te&&ys(y,k),S}for(C=r(y,C);!O.done;k++,O=x.next())O=p(C,y,k,O.value,_),O!==null&&(e&&O.alternate!==null&&C.delete(O.key===null?k:O.key),m=i(O,m,k),E===null?S=O:E.sibling=O,E=O);return e&&C.forEach(function(F){return t(y,F)}),Te&&ys(y,k),S}function w(y,m,x,_){if(typeof x=="object"&&x!==null&&x.type===hi&&x.key===null&&(x=x.props.children),typeof x=="object"&&x!==null){switch(x.$$typeof){case Kl:e:{for(var S=x.key,E=m;E!==null;){if(E.key===S){if(S=x.type,S===hi){if(E.tag===7){n(y,E.sibling),m=s(E,x.props.children),m.return=y,y=m;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===Ar&&t1(S)===E.type){n(y,E.sibling),m=s(E,x.props),m.ref=Ko(y,E,x),m.return=y,y=m;break e}n(y,E);break}else t(y,E);E=E.sibling}x.type===hi?(m=Ns(x.props.children,y.mode,_,x.key),m.return=y,y=m):(_=Vu(x.type,x.key,x.props,null,y.mode,_),_.ref=Ko(y,m,x),_.return=y,y=_)}return o(y);case fi:e:{for(E=x.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===x.containerInfo&&m.stateNode.implementation===x.implementation){n(y,m.sibling),m=s(m,x.children||[]),m.return=y,y=m;break e}else{n(y,m);break}else t(y,m);m=m.sibling}m=nh(x,y.mode,_),m.return=y,y=m}return o(y);case Ar:return E=x._init,w(y,m,E(x._payload),_)}if(ra(x))return g(y,m,x,_);if(Vo(x))return b(y,m,x,_);su(y,x)}return typeof x=="string"&&x!==""||typeof x=="number"?(x=""+x,m!==null&&m.tag===6?(n(y,m.sibling),m=s(m,x),m.return=y,y=m):(n(y,m),m=th(x,y.mode,_),m.return=y,y=m),o(y)):n(y,m)}return w}var Yi=rS(!0),sS=rS(!1),yl={},Hn=ds(yl),Ma=ds(yl),La=ds(yl);function Es(e){if(e===yl)throw Error(L(174));return e}function Gg(e,t){switch(Se(La,t),Se(Ma,e),Se(Hn,yl),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:dp(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=dp(t,e)}Ce(Hn),Se(Hn,t)}function Xi(){Ce(Hn),Ce(Ma),Ce(La)}function iS(e){Es(La.current);var t=Es(Hn.current),n=dp(t,e.type);t!==n&&(Se(Ma,e),Se(Hn,n))}function Yg(e){Ma.current===e&&(Ce(Hn),Ce(Ma))}var Ne=ds(0);function bc(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Gf=[];function Xg(){for(var e=0;e<Gf.length;e++)Gf[e]._workInProgressVersionPrimary=null;Gf.length=0}var Mu=_r.ReactCurrentDispatcher,Yf=_r.ReactCurrentBatchConfig,Ms=0,Oe=null,Ge=null,st=null,wc=!1,ga=!1,Fa=0,IP=0;function ft(){throw Error(L(321))}function Jg(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Tn(e[n],t[n]))return!1;return!0}function Zg(e,t,n,r,s,i){if(Ms=i,Oe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Mu.current=e===null||e.memoizedState===null?FP:UP,e=n(r,s),ga){i=0;do{if(ga=!1,Fa=0,25<=i)throw Error(L(301));i+=1,st=Ge=null,t.updateQueue=null,Mu.current=zP,e=n(r,s)}while(ga)}if(Mu.current=_c,t=Ge!==null&&Ge.next!==null,Ms=0,st=Ge=Oe=null,wc=!1,t)throw Error(L(300));return e}function ey(){var e=Fa!==0;return Fa=0,e}function Dn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return st===null?Oe.memoizedState=st=e:st=st.next=e,st}function mn(){if(Ge===null){var e=Oe.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var t=st===null?Oe.memoizedState:st.next;if(t!==null)st=t,Ge=e;else{if(e===null)throw Error(L(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},st===null?Oe.memoizedState=st=e:st=st.next=e}return st}function Ua(e,t){return typeof t=="function"?t(e):t}function Xf(e){var t=mn(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=Ge,s=r.baseQueue,i=n.pending;if(i!==null){if(s!==null){var o=s.next;s.next=i.next,i.next=o}r.baseQueue=s=i,n.pending=null}if(s!==null){i=s.next,r=r.baseState;var a=o=null,l=null,c=i;do{var d=c.lane;if((Ms&d)===d)l!==null&&(l=l.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};l===null?(a=l=f,o=r):l=l.next=f,Oe.lanes|=d,Ls|=d}c=c.next}while(c!==null&&c!==i);l===null?o=r:l.next=a,Tn(r,t.memoizedState)||(Ot=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=l,n.lastRenderedState=r}if(e=n.interleaved,e!==null){s=e;do i=s.lane,Oe.lanes|=i,Ls|=i,s=s.next;while(s!==e)}else s===null&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Jf(e){var t=mn(),n=t.queue;if(n===null)throw Error(L(311));n.lastRenderedReducer=e;var r=n.dispatch,s=n.pending,i=t.memoizedState;if(s!==null){n.pending=null;var o=s=s.next;do i=e(i,o.action),o=o.next;while(o!==s);Tn(i,t.memoizedState)||(Ot=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,r]}function oS(){}function aS(e,t){var n=Oe,r=mn(),s=t(),i=!Tn(r.memoizedState,s);if(i&&(r.memoizedState=s,Ot=!0),r=r.queue,ty(cS.bind(null,n,r,e),[e]),r.getSnapshot!==t||i||st!==null&&st.memoizedState.tag&1){if(n.flags|=2048,za(9,uS.bind(null,n,r,s,t),void 0,null),it===null)throw Error(L(349));Ms&30||lS(n,t,s)}return s}function lS(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Oe.updateQueue,t===null?(t={lastEffect:null,stores:null},Oe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function uS(e,t,n,r){t.value=n,t.getSnapshot=r,dS(t)&&fS(e)}function cS(e,t,n){return n(function(){dS(t)&&fS(e)})}function dS(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Tn(e,n)}catch{return!0}}function fS(e){var t=vr(e,1);t!==null&&Cn(t,e,1,-1)}function n1(e){var t=Dn();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ua,lastRenderedState:e},t.queue=e,e=e.dispatch=LP.bind(null,Oe,e),[t.memoizedState,e]}function za(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},t=Oe.updateQueue,t===null?(t={lastEffect:null,stores:null},Oe.updateQueue=t,t.lastEffect=e.next=e):(n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e)),e}function hS(){return mn().memoizedState}function Lu(e,t,n,r){var s=Dn();Oe.flags|=e,s.memoizedState=za(1|t,n,void 0,r===void 0?null:r)}function _d(e,t,n,r){var s=mn();r=r===void 0?null:r;var i=void 0;if(Ge!==null){var o=Ge.memoizedState;if(i=o.destroy,r!==null&&Jg(r,o.deps)){s.memoizedState=za(t,n,i,r);return}}Oe.flags|=e,s.memoizedState=za(1|t,n,i,r)}function r1(e,t){return Lu(8390656,8,e,t)}function ty(e,t){return _d(2048,8,e,t)}function pS(e,t){return _d(4,2,e,t)}function mS(e,t){return _d(4,4,e,t)}function gS(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function yS(e,t,n){return n=n!=null?n.concat([e]):null,_d(4,4,gS.bind(null,t,e),n)}function ny(){}function vS(e,t){var n=mn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Jg(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function xS(e,t){var n=mn();t=t===void 0?null:t;var r=n.memoizedState;return r!==null&&t!==null&&Jg(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function bS(e,t,n){return Ms&21?(Tn(n,t)||(n=S_(),Oe.lanes|=n,Ls|=n,e.baseState=!0),t):(e.baseState&&(e.baseState=!1,Ot=!0),e.memoizedState=n)}function DP(e,t){var n=pe;pe=n!==0&&4>n?n:4,e(!0);var r=Yf.transition;Yf.transition={};try{e(!1),t()}finally{pe=n,Yf.transition=r}}function wS(){return mn().memoizedState}function MP(e,t,n){var r=Yr(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},_S(e))SS(t,n);else if(n=Z_(e,t,n,r),n!==null){var s=Ct();Cn(n,e,r,s),ES(n,t,r)}}function LP(e,t,n){var r=Yr(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(_S(e))SS(t,s);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,a=i(o,n);if(s.hasEagerState=!0,s.eagerState=a,Tn(a,o)){var l=t.interleaved;l===null?(s.next=s,Kg(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=Z_(e,t,s,r),n!==null&&(s=Ct(),Cn(n,e,r,s),ES(n,t,r))}}function _S(e){var t=e.alternate;return e===Oe||t!==null&&t===Oe}function SS(e,t){ga=wc=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ES(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,Ag(e,n)}}var _c={readContext:pn,useCallback:ft,useContext:ft,useEffect:ft,useImperativeHandle:ft,useInsertionEffect:ft,useLayoutEffect:ft,useMemo:ft,useReducer:ft,useRef:ft,useState:ft,useDebugValue:ft,useDeferredValue:ft,useTransition:ft,useMutableSource:ft,useSyncExternalStore:ft,useId:ft,unstable_isNewReconciler:!1},FP={readContext:pn,useCallback:function(e,t){return Dn().memoizedState=[e,t===void 0?null:t],e},useContext:pn,useEffect:r1,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Lu(4194308,4,gS.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Lu(4194308,4,e,t)},useInsertionEffect:function(e,t){return Lu(4,2,e,t)},useMemo:function(e,t){var n=Dn();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Dn();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=MP.bind(null,Oe,e),[r.memoizedState,e]},useRef:function(e){var t=Dn();return e={current:e},t.memoizedState=e},useState:n1,useDebugValue:ny,useDeferredValue:function(e){return Dn().memoizedState=e},useTransition:function(){var e=n1(!1),t=e[0];return e=DP.bind(null,e[1]),Dn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Oe,s=Dn();if(Te){if(n===void 0)throw Error(L(407));n=n()}else{if(n=t(),it===null)throw Error(L(349));Ms&30||lS(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,r1(cS.bind(null,r,i,e),[e]),r.flags|=2048,za(9,uS.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=Dn(),t=it.identifierPrefix;if(Te){var n=ur,r=lr;n=(r&~(1<<32-En(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Fa++,0<n&&(t+="H"+n.toString(32)),t+=":"}else n=IP++,t=":"+t+"r"+n.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},UP={readContext:pn,useCallback:vS,useContext:pn,useEffect:ty,useImperativeHandle:yS,useInsertionEffect:pS,useLayoutEffect:mS,useMemo:xS,useReducer:Xf,useRef:hS,useState:function(){return Xf(Ua)},useDebugValue:ny,useDeferredValue:function(e){var t=mn();return bS(t,Ge.memoizedState,e)},useTransition:function(){var e=Xf(Ua)[0],t=mn().memoizedState;return[e,t]},useMutableSource:oS,useSyncExternalStore:aS,useId:wS,unstable_isNewReconciler:!1},zP={readContext:pn,useCallback:vS,useContext:pn,useEffect:ty,useImperativeHandle:yS,useInsertionEffect:pS,useLayoutEffect:mS,useMemo:xS,useReducer:Jf,useRef:hS,useState:function(){return Jf(Ua)},useDebugValue:ny,useDeferredValue:function(e){var t=mn();return Ge===null?t.memoizedState=e:bS(t,Ge.memoizedState,e)},useTransition:function(){var e=Jf(Ua)[0],t=mn().memoizedState;return[e,t]},useMutableSource:oS,useSyncExternalStore:aS,useId:wS,unstable_isNewReconciler:!1};function Ji(e,t){try{var n="",r=t;do n+=m4(r),r=r.return;while(r);var s=n}catch(i){s=`
Error generating stack: `+i.message+`
`+i.stack}return{value:e,source:t,stack:s,digest:null}}function Zf(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function $p(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var VP=typeof WeakMap=="function"?WeakMap:Map;function CS(e,t,n){n=fr(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ec||(Ec=!0,Hp=r),$p(e,t)},n}function jS(e,t,n){n=fr(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var s=t.value;n.payload=function(){return r(s)},n.callback=function(){$p(e,t)}}var i=e.stateNode;return i!==null&&typeof i.componentDidCatch=="function"&&(n.callback=function(){$p(e,t),typeof r!="function"&&(Gr===null?Gr=new Set([this]):Gr.add(this));var o=t.stack;this.componentDidCatch(t.value,{componentStack:o!==null?o:""})}),n}function s1(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new VP;var s=new Set;r.set(t,s)}else s=r.get(t),s===void 0&&(s=new Set,r.set(t,s));s.has(n)||(s.add(n),e=nR.bind(null,e,t,n),t.then(e,e))}function i1(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function o1(e,t,n,r,s){return e.mode&1?(e.flags|=65536,e.lanes=s,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=fr(-1,1),t.tag=2,Qr(n,t,1))),n.lanes|=1),e)}var BP=_r.ReactCurrentOwner,Ot=!1;function bt(e,t,n,r){t.child=e===null?sS(t,null,n,r):Yi(t,e.child,n,r)}function a1(e,t,n,r,s){n=n.render;var i=t.ref;return Oi(t,s),r=Zg(e,t,n,r,i,s),n=ey(),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,xr(e,t,s)):(Te&&n&&zg(t),t.flags|=1,bt(e,t,r,s),t.child)}function l1(e,t,n,r,s){if(e===null){var i=n.type;return typeof i=="function"&&!cy(i)&&i.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=i,kS(e,t,i,r,s)):(e=Vu(n.type,null,r,t,t.mode,s),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!(e.lanes&s)){var o=i.memoizedProps;if(n=n.compare,n=n!==null?n:Aa,n(o,r)&&e.ref===t.ref)return xr(e,t,s)}return t.flags|=1,e=Xr(i,r),e.ref=t.ref,e.return=t,t.child=e}function kS(e,t,n,r,s){if(e!==null){var i=e.memoizedProps;if(Aa(i,r)&&e.ref===t.ref)if(Ot=!1,t.pendingProps=r=i,(e.lanes&s)!==0)e.flags&131072&&(Ot=!0);else return t.lanes=e.lanes,xr(e,t,s)}return Ip(e,t,n,r,s)}function TS(e,t,n){var r=t.pendingProps,s=r.children,i=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Se(Si,Ft),Ft|=n;else{if(!(n&1073741824))return e=i!==null?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Se(Si,Ft),Ft|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=i!==null?i.baseLanes:n,Se(Si,Ft),Ft|=r}else i!==null?(r=i.baseLanes|n,t.memoizedState=null):r=n,Se(Si,Ft),Ft|=r;return bt(e,t,s,n),t.child}function PS(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ip(e,t,n,r,s){var i=It(n)?Is:yt.current;return i=Qi(t,i),Oi(t,s),n=Zg(e,t,n,r,i,s),r=ey(),e!==null&&!Ot?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~s,xr(e,t,s)):(Te&&r&&zg(t),t.flags|=1,bt(e,t,n,s),t.child)}function u1(e,t,n,r,s){if(It(n)){var i=!0;pc(t)}else i=!1;if(Oi(t,s),t.stateNode===null)Fu(e,t),nS(t,n,r),Ap(t,n,r,s),r=!0;else if(e===null){var o=t.stateNode,a=t.memoizedProps;o.props=a;var l=o.context,c=n.contextType;typeof c=="object"&&c!==null?c=pn(c):(c=It(n)?Is:yt.current,c=Qi(t,c));var d=n.getDerivedStateFromProps,f=typeof d=="function"||typeof o.getSnapshotBeforeUpdate=="function";f||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==r||l!==c)&&e1(t,o,r,c),$r=!1;var h=t.memoizedState;o.state=h,xc(t,r,o,s),l=t.memoizedState,a!==r||h!==l||$t.current||$r?(typeof d=="function"&&(Op(t,n,d,r),l=t.memoizedState),(a=$r||Z0(t,n,a,r,h,l,c))?(f||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=a):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,eS(e,t),a=t.memoizedProps,c=t.type===t.elementType?a:bn(t.type,a),o.props=c,f=t.pendingProps,h=o.context,l=n.contextType,typeof l=="object"&&l!==null?l=pn(l):(l=It(n)?Is:yt.current,l=Qi(t,l));var p=n.getDerivedStateFromProps;(d=typeof p=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==f||h!==l)&&e1(t,o,r,l),$r=!1,h=t.memoizedState,o.state=h,xc(t,r,o,s);var g=t.memoizedState;a!==f||h!==g||$t.current||$r?(typeof p=="function"&&(Op(t,n,p,r),g=t.memoizedState),(c=$r||Z0(t,n,c,r,h,g,l)||!1)?(d||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,g,l),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,g,l)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=g),o.props=r,o.state=g,o.context=l,r=c):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Dp(e,t,n,r,i,s)}function Dp(e,t,n,r,s,i){PS(e,t);var o=(t.flags&128)!==0;if(!r&&!o)return s&&Q0(t,n,!1),xr(e,t,i);r=t.stateNode,BP.current=t;var a=o&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&o?(t.child=Yi(t,e.child,null,i),t.child=Yi(t,null,a,i)):bt(e,t,a,i),t.memoizedState=r.state,s&&Q0(t,n,!0),t.child}function RS(e){var t=e.stateNode;t.pendingContext?K0(e,t.pendingContext,t.pendingContext!==t.context):t.context&&K0(e,t.context,!1),Gg(e,t.containerInfo)}function c1(e,t,n,r,s){return Gi(),Bg(s),t.flags|=256,bt(e,t,n,r),t.child}var Mp={dehydrated:null,treeContext:null,retryLane:0};function Lp(e){return{baseLanes:e,cachePool:null,transitions:null}}function NS(e,t,n){var r=t.pendingProps,s=Ne.current,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(s&2)!==0),a?(i=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(s|=1),Se(Ne,s&1),e===null)return Rp(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(o=r.children,e=r.fallback,i?(r=t.mode,i=t.child,o={mode:"hidden",children:o},!(r&1)&&i!==null?(i.childLanes=0,i.pendingProps=o):i=Cd(o,r,0,null),e=Ns(e,r,n,null),i.return=t,e.return=t,i.sibling=e,t.child=i,t.child.memoizedState=Lp(n),t.memoizedState=Mp,e):ry(t,o));if(s=e.memoizedState,s!==null&&(a=s.dehydrated,a!==null))return HP(e,t,o,r,a,s,n);if(i){i=r.fallback,o=t.mode,s=e.child,a=s.sibling;var l={mode:"hidden",children:r.children};return!(o&1)&&t.child!==s?(r=t.child,r.childLanes=0,r.pendingProps=l,t.deletions=null):(r=Xr(s,l),r.subtreeFlags=s.subtreeFlags&14680064),a!==null?i=Xr(a,i):(i=Ns(i,o,n,null),i.flags|=2),i.return=t,r.return=t,r.sibling=i,t.child=r,r=i,i=t.child,o=e.child.memoizedState,o=o===null?Lp(n):{baseLanes:o.baseLanes|n,cachePool:null,transitions:o.transitions},i.memoizedState=o,i.childLanes=e.childLanes&~n,t.memoizedState=Mp,r}return i=e.child,e=i.sibling,r=Xr(i,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function ry(e,t){return t=Cd({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function iu(e,t,n,r){return r!==null&&Bg(r),Yi(t,e.child,null,n),e=ry(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function HP(e,t,n,r,s,i,o){if(n)return t.flags&256?(t.flags&=-257,r=Zf(Error(L(422))),iu(e,t,o,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(i=r.fallback,s=t.mode,r=Cd({mode:"visible",children:r.children},s,0,null),i=Ns(i,s,o,null),i.flags|=2,r.return=t,i.return=t,r.sibling=i,t.child=r,t.mode&1&&Yi(t,e.child,null,o),t.child.memoizedState=Lp(o),t.memoizedState=Mp,i);if(!(t.mode&1))return iu(e,t,o,null);if(s.data==="$!"){if(r=s.nextSibling&&s.nextSibling.dataset,r)var a=r.dgst;return r=a,i=Error(L(419)),r=Zf(i,r,void 0),iu(e,t,o,r)}if(a=(o&e.childLanes)!==0,Ot||a){if(r=it,r!==null){switch(o&-o){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}s=s&(r.suspendedLanes|o)?0:s,s!==0&&s!==i.retryLane&&(i.retryLane=s,vr(e,s),Cn(r,e,s,-1))}return uy(),r=Zf(Error(L(421))),iu(e,t,o,r)}return s.data==="$?"?(t.flags|=128,t.child=e.child,t=rR.bind(null,e),s._reactRetry=t,null):(e=i.treeContext,Vt=Kr(s.nextSibling),Ht=t,Te=!0,_n=null,e!==null&&(en[tn++]=lr,en[tn++]=ur,en[tn++]=Ds,lr=e.id,ur=e.overflow,Ds=t),t=ry(t,r.children),t.flags|=4096,t)}function d1(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Np(e.return,t,n)}function eh(e,t,n,r,s){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:s}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=s)}function OS(e,t,n){var r=t.pendingProps,s=r.revealOrder,i=r.tail;if(bt(e,t,r.children,n),r=Ne.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&d1(e,n,t);else if(e.tag===19)d1(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Se(Ne,r),!(t.mode&1))t.memoizedState=null;else switch(s){case"forwards":for(n=t.child,s=null;n!==null;)e=n.alternate,e!==null&&bc(e)===null&&(s=n),n=n.sibling;n=s,n===null?(s=t.child,t.child=null):(s=n.sibling,n.sibling=null),eh(t,!1,s,n,i);break;case"backwards":for(n=null,s=t.child,t.child=null;s!==null;){if(e=s.alternate,e!==null&&bc(e)===null){t.child=s;break}e=s.sibling,s.sibling=n,n=s,s=e}eh(t,!0,n,null,i);break;case"together":eh(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Fu(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function xr(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ls|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(L(153));if(t.child!==null){for(e=t.child,n=Xr(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Xr(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function qP(e,t,n){switch(t.tag){case 3:RS(t),Gi();break;case 5:iS(t);break;case 1:It(t.type)&&pc(t);break;case 4:Gg(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,s=t.memoizedProps.value;Se(yc,r._currentValue),r._currentValue=s;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(Se(Ne,Ne.current&1),t.flags|=128,null):n&t.child.childLanes?NS(e,t,n):(Se(Ne,Ne.current&1),e=xr(e,t,n),e!==null?e.sibling:null);Se(Ne,Ne.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return OS(e,t,n);t.flags|=128}if(s=t.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),Se(Ne,Ne.current),r)break;return null;case 22:case 23:return t.lanes=0,TS(e,t,n)}return xr(e,t,n)}var AS,Fp,$S,IS;AS=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};Fp=function(){};$S=function(e,t,n,r){var s=e.memoizedProps;if(s!==r){e=t.stateNode,Es(Hn.current);var i=null;switch(n){case"input":s=ap(e,s),r=ap(e,r),i=[];break;case"select":s=$e({},s,{value:void 0}),r=$e({},r,{value:void 0}),i=[];break;case"textarea":s=cp(e,s),r=cp(e,r),i=[];break;default:typeof s.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=fc)}fp(n,r);var o;n=null;for(c in s)if(!r.hasOwnProperty(c)&&s.hasOwnProperty(c)&&s[c]!=null)if(c==="style"){var a=s[c];for(o in a)a.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(ja.hasOwnProperty(c)?i||(i=[]):(i=i||[]).push(c,null));for(c in r){var l=r[c];if(a=s!=null?s[c]:void 0,r.hasOwnProperty(c)&&l!==a&&(l!=null||a!=null))if(c==="style")if(a){for(o in a)!a.hasOwnProperty(o)||l&&l.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in l)l.hasOwnProperty(o)&&a[o]!==l[o]&&(n||(n={}),n[o]=l[o])}else n||(i||(i=[]),i.push(c,n)),n=l;else c==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,a=a?a.__html:void 0,l!=null&&a!==l&&(i=i||[]).push(c,l)):c==="children"?typeof l!="string"&&typeof l!="number"||(i=i||[]).push(c,""+l):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(ja.hasOwnProperty(c)?(l!=null&&c==="onScroll"&&Ee("scroll",e),i||a===l||(i=[])):(i=i||[]).push(c,l))}n&&(i=i||[]).push("style",n);var c=i;(t.updateQueue=c)&&(t.flags|=4)}};IS=function(e,t,n,r){n!==r&&(t.flags|=4)};function Qo(e,t){if(!Te)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags&14680064,r|=s.flags&14680064,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)n|=s.lanes|s.childLanes,r|=s.subtreeFlags,r|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function WP(e,t,n){var r=t.pendingProps;switch(Vg(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return It(t.type)&&hc(),ht(t),null;case 3:return r=t.stateNode,Xi(),Ce($t),Ce(yt),Xg(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(ru(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,_n!==null&&(Kp(_n),_n=null))),Fp(e,t),ht(t),null;case 5:Yg(t);var s=Es(La.current);if(n=t.type,e!==null&&t.stateNode!=null)$S(e,t,n,r,s),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(L(166));return ht(t),null}if(e=Es(Hn.current),ru(t)){r=t.stateNode,n=t.type;var i=t.memoizedProps;switch(r[Fn]=t,r[Da]=i,e=(t.mode&1)!==0,n){case"dialog":Ee("cancel",r),Ee("close",r);break;case"iframe":case"object":case"embed":Ee("load",r);break;case"video":case"audio":for(s=0;s<ia.length;s++)Ee(ia[s],r);break;case"source":Ee("error",r);break;case"img":case"image":case"link":Ee("error",r),Ee("load",r);break;case"details":Ee("toggle",r);break;case"input":b0(r,i),Ee("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!i.multiple},Ee("invalid",r);break;case"textarea":_0(r,i),Ee("invalid",r)}fp(n,i),s=null;for(var o in i)if(i.hasOwnProperty(o)){var a=i[o];o==="children"?typeof a=="string"?r.textContent!==a&&(i.suppressHydrationWarning!==!0&&nu(r.textContent,a,e),s=["children",a]):typeof a=="number"&&r.textContent!==""+a&&(i.suppressHydrationWarning!==!0&&nu(r.textContent,a,e),s=["children",""+a]):ja.hasOwnProperty(o)&&a!=null&&o==="onScroll"&&Ee("scroll",r)}switch(n){case"input":Ql(r),w0(r,i,!0);break;case"textarea":Ql(r),S0(r);break;case"select":case"option":break;default:typeof i.onClick=="function"&&(r.onclick=fc)}r=s,t.updateQueue=r,r!==null&&(t.flags|=4)}else{o=s.nodeType===9?s:s.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=l_(n)),e==="http://www.w3.org/1999/xhtml"?n==="script"?(e=o.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Fn]=t,e[Da]=r,AS(e,t,!1,!1),t.stateNode=e;e:{switch(o=hp(n,r),n){case"dialog":Ee("cancel",e),Ee("close",e),s=r;break;case"iframe":case"object":case"embed":Ee("load",e),s=r;break;case"video":case"audio":for(s=0;s<ia.length;s++)Ee(ia[s],e);s=r;break;case"source":Ee("error",e),s=r;break;case"img":case"image":case"link":Ee("error",e),Ee("load",e),s=r;break;case"details":Ee("toggle",e),s=r;break;case"input":b0(e,r),s=ap(e,r),Ee("invalid",e);break;case"option":s=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},s=$e({},r,{value:void 0}),Ee("invalid",e);break;case"textarea":_0(e,r),s=cp(e,r),Ee("invalid",e);break;default:s=r}fp(n,s),a=s;for(i in a)if(a.hasOwnProperty(i)){var l=a[i];i==="style"?d_(e,l):i==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&u_(e,l)):i==="children"?typeof l=="string"?(n!=="textarea"||l!=="")&&ka(e,l):typeof l=="number"&&ka(e,""+l):i!=="suppressContentEditableWarning"&&i!=="suppressHydrationWarning"&&i!=="autoFocus"&&(ja.hasOwnProperty(i)?l!=null&&i==="onScroll"&&Ee("scroll",e):l!=null&&kg(e,i,l,o))}switch(n){case"input":Ql(e),w0(e,r,!1);break;case"textarea":Ql(e),S0(e);break;case"option":r.value!=null&&e.setAttribute("value",""+ss(r.value));break;case"select":e.multiple=!!r.multiple,i=r.value,i!=null?Ti(e,!!r.multiple,i,!1):r.defaultValue!=null&&Ti(e,!!r.multiple,r.defaultValue,!0);break;default:typeof s.onClick=="function"&&(e.onclick=fc)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return ht(t),null;case 6:if(e&&t.stateNode!=null)IS(e,t,e.memoizedProps,r);else{if(typeof r!="string"&&t.stateNode===null)throw Error(L(166));if(n=Es(La.current),Es(Hn.current),ru(t)){if(r=t.stateNode,n=t.memoizedProps,r[Fn]=t,(i=r.nodeValue!==n)&&(e=Ht,e!==null))switch(e.tag){case 3:nu(r.nodeValue,n,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&nu(r.nodeValue,n,(e.mode&1)!==0)}i&&(t.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Fn]=t,t.stateNode=r}return ht(t),null;case 13:if(Ce(Ne),r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Te&&Vt!==null&&t.mode&1&&!(t.flags&128))J_(),Gi(),t.flags|=98560,i=!1;else if(i=ru(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(L(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(L(317));i[Fn]=t}else Gi(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;ht(t),i=!1}else _n!==null&&(Kp(_n),_n=null),i=!0;if(!i)return t.flags&65536?t:null}return t.flags&128?(t.lanes=n,t):(r=r!==null,r!==(e!==null&&e.memoizedState!==null)&&r&&(t.child.flags|=8192,t.mode&1&&(e===null||Ne.current&1?Xe===0&&(Xe=3):uy())),t.updateQueue!==null&&(t.flags|=4),ht(t),null);case 4:return Xi(),Fp(e,t),e===null&&$a(t.stateNode.containerInfo),ht(t),null;case 10:return Wg(t.type._context),ht(t),null;case 17:return It(t.type)&&hc(),ht(t),null;case 19:if(Ce(Ne),i=t.memoizedState,i===null)return ht(t),null;if(r=(t.flags&128)!==0,o=i.rendering,o===null)if(r)Qo(i,!1);else{if(Xe!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=bc(e),o!==null){for(t.flags|=128,Qo(i,!1),r=o.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;n!==null;)i=n,e=r,i.flags&=14680066,o=i.alternate,o===null?(i.childLanes=0,i.lanes=e,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=o.childLanes,i.lanes=o.lanes,i.child=o.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=o.memoizedProps,i.memoizedState=o.memoizedState,i.updateQueue=o.updateQueue,i.type=o.type,e=o.dependencies,i.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Se(Ne,Ne.current&1|2),t.child}e=e.sibling}i.tail!==null&&qe()>Zi&&(t.flags|=128,r=!0,Qo(i,!1),t.lanes=4194304)}else{if(!r)if(e=bc(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Qo(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Te)return ht(t),null}else 2*qe()-i.renderingStartTime>Zi&&n!==1073741824&&(t.flags|=128,r=!0,Qo(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=qe(),t.sibling=null,n=Ne.current,Se(Ne,r?n&1|2:n&1),t):(ht(t),null);case 22:case 23:return ly(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Ft&1073741824&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),null;case 24:return null;case 25:return null}throw Error(L(156,t.tag))}function KP(e,t){switch(Vg(t),t.tag){case 1:return It(t.type)&&hc(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Xi(),Ce($t),Ce(yt),Xg(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Yg(t),null;case 13:if(Ce(Ne),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(L(340));Gi()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Ce(Ne),null;case 4:return Xi(),null;case 10:return Wg(t.type._context),null;case 22:case 23:return ly(),null;case 24:return null;default:return null}}var ou=!1,mt=!1,QP=typeof WeakSet=="function"?WeakSet:Set,Y=null;function _i(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Le(e,t,r)}else n.current=null}function Up(e,t,n){try{n()}catch(r){Le(e,t,r)}}var f1=!1;function GP(e,t){if(Sp=uc,e=F_(),Ug(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var s=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,a=-1,l=-1,c=0,d=0,f=e,h=null;t:for(;;){for(var p;f!==n||s!==0&&f.nodeType!==3||(a=o+s),f!==i||r!==0&&f.nodeType!==3||(l=o+r),f.nodeType===3&&(o+=f.nodeValue.length),(p=f.firstChild)!==null;)h=f,f=p;for(;;){if(f===e)break t;if(h===n&&++c===s&&(a=o),h===i&&++d===r&&(l=o),(p=f.nextSibling)!==null)break;f=h,h=f.parentNode}f=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ep={focusedElem:e,selectionRange:n},uc=!1,Y=t;Y!==null;)if(t=Y,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Y=e;else for(;Y!==null;){t=Y;try{var g=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var b=g.memoizedProps,w=g.memoizedState,y=t.stateNode,m=y.getSnapshotBeforeUpdate(t.elementType===t.type?b:bn(t.type,b),w);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var x=t.stateNode.containerInfo;x.nodeType===1?x.textContent="":x.nodeType===9&&x.documentElement&&x.removeChild(x.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(L(163))}}catch(_){Le(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,Y=e;break}Y=t.return}return g=f1,f1=!1,g}function ya(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var s=r=r.next;do{if((s.tag&e)===e){var i=s.destroy;s.destroy=void 0,i!==void 0&&Up(t,n,i)}s=s.next}while(s!==r)}}function Sd(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function zp(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function DS(e){var t=e.alternate;t!==null&&(e.alternate=null,DS(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Fn],delete t[Da],delete t[kp],delete t[NP],delete t[OP])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function MS(e){return e.tag===5||e.tag===3||e.tag===4}function h1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||MS(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Vp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=fc));else if(r!==4&&(e=e.child,e!==null))for(Vp(e,t,n),e=e.sibling;e!==null;)Vp(e,t,n),e=e.sibling}function Bp(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Bp(e,t,n),e=e.sibling;e!==null;)Bp(e,t,n),e=e.sibling}var ot=null,wn=!1;function Tr(e,t,n){for(n=n.child;n!==null;)LS(e,t,n),n=n.sibling}function LS(e,t,n){if(Bn&&typeof Bn.onCommitFiberUnmount=="function")try{Bn.onCommitFiberUnmount(md,n)}catch{}switch(n.tag){case 5:mt||_i(n,t);case 6:var r=ot,s=wn;ot=null,Tr(e,t,n),ot=r,wn=s,ot!==null&&(wn?(e=ot,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ot.removeChild(n.stateNode));break;case 18:ot!==null&&(wn?(e=ot,n=n.stateNode,e.nodeType===8?Kf(e.parentNode,n):e.nodeType===1&&Kf(e,n),Na(e)):Kf(ot,n.stateNode));break;case 4:r=ot,s=wn,ot=n.stateNode.containerInfo,wn=!0,Tr(e,t,n),ot=r,wn=s;break;case 0:case 11:case 14:case 15:if(!mt&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){s=r=r.next;do{var i=s,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Up(n,t,o),s=s.next}while(s!==r)}Tr(e,t,n);break;case 1:if(!mt&&(_i(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Le(n,t,a)}Tr(e,t,n);break;case 21:Tr(e,t,n);break;case 22:n.mode&1?(mt=(r=mt)||n.memoizedState!==null,Tr(e,t,n),mt=r):Tr(e,t,n);break;default:Tr(e,t,n)}}function p1(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new QP),t.forEach(function(r){var s=sR.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function xn(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var s=n[r];try{var i=e,o=t,a=o;e:for(;a!==null;){switch(a.tag){case 5:ot=a.stateNode,wn=!1;break e;case 3:ot=a.stateNode.containerInfo,wn=!0;break e;case 4:ot=a.stateNode.containerInfo,wn=!0;break e}a=a.return}if(ot===null)throw Error(L(160));LS(i,o,s),ot=null,wn=!1;var l=s.alternate;l!==null&&(l.return=null),s.return=null}catch(c){Le(s,t,c)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)FS(t,e),t=t.sibling}function FS(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(xn(t,e),$n(e),r&4){try{ya(3,e,e.return),Sd(3,e)}catch(b){Le(e,e.return,b)}try{ya(5,e,e.return)}catch(b){Le(e,e.return,b)}}break;case 1:xn(t,e),$n(e),r&512&&n!==null&&_i(n,n.return);break;case 5:if(xn(t,e),$n(e),r&512&&n!==null&&_i(n,n.return),e.flags&32){var s=e.stateNode;try{ka(s,"")}catch(b){Le(e,e.return,b)}}if(r&4&&(s=e.stateNode,s!=null)){var i=e.memoizedProps,o=n!==null?n.memoizedProps:i,a=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{a==="input"&&i.type==="radio"&&i.name!=null&&o_(s,i),hp(a,o);var c=hp(a,i);for(o=0;o<l.length;o+=2){var d=l[o],f=l[o+1];d==="style"?d_(s,f):d==="dangerouslySetInnerHTML"?u_(s,f):d==="children"?ka(s,f):kg(s,d,f,c)}switch(a){case"input":lp(s,i);break;case"textarea":a_(s,i);break;case"select":var h=s._wrapperState.wasMultiple;s._wrapperState.wasMultiple=!!i.multiple;var p=i.value;p!=null?Ti(s,!!i.multiple,p,!1):h!==!!i.multiple&&(i.defaultValue!=null?Ti(s,!!i.multiple,i.defaultValue,!0):Ti(s,!!i.multiple,i.multiple?[]:"",!1))}s[Da]=i}catch(b){Le(e,e.return,b)}}break;case 6:if(xn(t,e),$n(e),r&4){if(e.stateNode===null)throw Error(L(162));s=e.stateNode,i=e.memoizedProps;try{s.nodeValue=i}catch(b){Le(e,e.return,b)}}break;case 3:if(xn(t,e),$n(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Na(t.containerInfo)}catch(b){Le(e,e.return,b)}break;case 4:xn(t,e),$n(e);break;case 13:xn(t,e),$n(e),s=e.child,s.flags&8192&&(i=s.memoizedState!==null,s.stateNode.isHidden=i,!i||s.alternate!==null&&s.alternate.memoizedState!==null||(oy=qe())),r&4&&p1(e);break;case 22:if(d=n!==null&&n.memoizedState!==null,e.mode&1?(mt=(c=mt)||d,xn(t,e),mt=c):xn(t,e),$n(e),r&8192){if(c=e.memoizedState!==null,(e.stateNode.isHidden=c)&&!d&&e.mode&1)for(Y=e,d=e.child;d!==null;){for(f=Y=d;Y!==null;){switch(h=Y,p=h.child,h.tag){case 0:case 11:case 14:case 15:ya(4,h,h.return);break;case 1:_i(h,h.return);var g=h.stateNode;if(typeof g.componentWillUnmount=="function"){r=h,n=h.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(b){Le(r,n,b)}}break;case 5:_i(h,h.return);break;case 22:if(h.memoizedState!==null){g1(f);continue}}p!==null?(p.return=h,Y=p):g1(f)}d=d.sibling}e:for(d=null,f=e;;){if(f.tag===5){if(d===null){d=f;try{s=f.stateNode,c?(i=s.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none"):(a=f.stateNode,l=f.memoizedProps.style,o=l!=null&&l.hasOwnProperty("display")?l.display:null,a.style.display=c_("display",o))}catch(b){Le(e,e.return,b)}}}else if(f.tag===6){if(d===null)try{f.stateNode.nodeValue=c?"":f.memoizedProps}catch(b){Le(e,e.return,b)}}else if((f.tag!==22&&f.tag!==23||f.memoizedState===null||f===e)&&f.child!==null){f.child.return=f,f=f.child;continue}if(f===e)break e;for(;f.sibling===null;){if(f.return===null||f.return===e)break e;d===f&&(d=null),f=f.return}d===f&&(d=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:xn(t,e),$n(e),r&4&&p1(e);break;case 21:break;default:xn(t,e),$n(e)}}function $n(e){var t=e.flags;if(t&2){try{e:{for(var n=e.return;n!==null;){if(MS(n)){var r=n;break e}n=n.return}throw Error(L(160))}switch(r.tag){case 5:var s=r.stateNode;r.flags&32&&(ka(s,""),r.flags&=-33);var i=h1(e);Bp(e,i,s);break;case 3:case 4:var o=r.stateNode.containerInfo,a=h1(e);Vp(e,a,o);break;default:throw Error(L(161))}}catch(l){Le(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function YP(e,t,n){Y=e,US(e)}function US(e,t,n){for(var r=(e.mode&1)!==0;Y!==null;){var s=Y,i=s.child;if(s.tag===22&&r){var o=s.memoizedState!==null||ou;if(!o){var a=s.alternate,l=a!==null&&a.memoizedState!==null||mt;a=ou;var c=mt;if(ou=o,(mt=l)&&!c)for(Y=s;Y!==null;)o=Y,l=o.child,o.tag===22&&o.memoizedState!==null?y1(s):l!==null?(l.return=o,Y=l):y1(s);for(;i!==null;)Y=i,US(i),i=i.sibling;Y=s,ou=a,mt=c}m1(e)}else s.subtreeFlags&8772&&i!==null?(i.return=s,Y=i):m1(e)}}function m1(e){for(;Y!==null;){var t=Y;if(t.flags&8772){var n=t.alternate;try{if(t.flags&8772)switch(t.tag){case 0:case 11:case 15:mt||Sd(5,t);break;case 1:var r=t.stateNode;if(t.flags&4&&!mt)if(n===null)r.componentDidMount();else{var s=t.elementType===t.type?n.memoizedProps:bn(t.type,n.memoizedProps);r.componentDidUpdate(s,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var i=t.updateQueue;i!==null&&J0(t,i,r);break;case 3:var o=t.updateQueue;if(o!==null){if(n=null,t.child!==null)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}J0(t,o,n)}break;case 5:var a=t.stateNode;if(n===null&&t.flags&4){n=a;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break;case"img":l.src&&(n.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var c=t.alternate;if(c!==null){var d=c.memoizedState;if(d!==null){var f=d.dehydrated;f!==null&&Na(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(L(163))}mt||t.flags&512&&zp(t)}catch(h){Le(t,t.return,h)}}if(t===e){Y=null;break}if(n=t.sibling,n!==null){n.return=t.return,Y=n;break}Y=t.return}}function g1(e){for(;Y!==null;){var t=Y;if(t===e){Y=null;break}var n=t.sibling;if(n!==null){n.return=t.return,Y=n;break}Y=t.return}}function y1(e){for(;Y!==null;){var t=Y;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Sd(4,t)}catch(l){Le(t,n,l)}break;case 1:var r=t.stateNode;if(typeof r.componentDidMount=="function"){var s=t.return;try{r.componentDidMount()}catch(l){Le(t,s,l)}}var i=t.return;try{zp(t)}catch(l){Le(t,i,l)}break;case 5:var o=t.return;try{zp(t)}catch(l){Le(t,o,l)}}}catch(l){Le(t,t.return,l)}if(t===e){Y=null;break}var a=t.sibling;if(a!==null){a.return=t.return,Y=a;break}Y=t.return}}var XP=Math.ceil,Sc=_r.ReactCurrentDispatcher,sy=_r.ReactCurrentOwner,un=_r.ReactCurrentBatchConfig,ue=0,it=null,Ke=null,ut=0,Ft=0,Si=ds(0),Xe=0,Va=null,Ls=0,Ed=0,iy=0,va=null,Rt=null,oy=0,Zi=1/0,tr=null,Ec=!1,Hp=null,Gr=null,au=!1,zr=null,Cc=0,xa=0,qp=null,Uu=-1,zu=0;function Ct(){return ue&6?qe():Uu!==-1?Uu:Uu=qe()}function Yr(e){return e.mode&1?ue&2&&ut!==0?ut&-ut:$P.transition!==null?(zu===0&&(zu=S_()),zu):(e=pe,e!==0||(e=window.event,e=e===void 0?16:R_(e.type)),e):1}function Cn(e,t,n,r){if(50<xa)throw xa=0,qp=null,Error(L(185));pl(e,n,r),(!(ue&2)||e!==it)&&(e===it&&(!(ue&2)&&(Ed|=n),Xe===4&&Fr(e,ut)),Dt(e,r),n===1&&ue===0&&!(t.mode&1)&&(Zi=qe()+500,bd&&fs()))}function Dt(e,t){var n=e.callbackNode;$4(e,t);var r=lc(e,e===it?ut:0);if(r===0)n!==null&&j0(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(n!=null&&j0(n),t===1)e.tag===0?AP(v1.bind(null,e)):G_(v1.bind(null,e)),PP(function(){!(ue&6)&&fs()}),n=null;else{switch(E_(r)){case 1:n=Og;break;case 4:n=w_;break;case 16:n=ac;break;case 536870912:n=__;break;default:n=ac}n=QS(n,zS.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function zS(e,t){if(Uu=-1,zu=0,ue&6)throw Error(L(327));var n=e.callbackNode;if(Ai()&&e.callbackNode!==n)return null;var r=lc(e,e===it?ut:0);if(r===0)return null;if(r&30||r&e.expiredLanes||t)t=jc(e,r);else{t=r;var s=ue;ue|=2;var i=BS();(it!==e||ut!==t)&&(tr=null,Zi=qe()+500,Rs(e,t));do try{eR();break}catch(a){VS(e,a)}while(1);qg(),Sc.current=i,ue=s,Ke!==null?t=0:(it=null,ut=0,t=Xe)}if(t!==0){if(t===2&&(s=vp(e),s!==0&&(r=s,t=Wp(e,s))),t===1)throw n=Va,Rs(e,0),Fr(e,r),Dt(e,qe()),n;if(t===6)Fr(e,r);else{if(s=e.current.alternate,!(r&30)&&!JP(s)&&(t=jc(e,r),t===2&&(i=vp(e),i!==0&&(r=i,t=Wp(e,i))),t===1))throw n=Va,Rs(e,0),Fr(e,r),Dt(e,qe()),n;switch(e.finishedWork=s,e.finishedLanes=r,t){case 0:case 1:throw Error(L(345));case 2:vs(e,Rt,tr);break;case 3:if(Fr(e,r),(r&130023424)===r&&(t=oy+500-qe(),10<t)){if(lc(e,0)!==0)break;if(s=e.suspendedLanes,(s&r)!==r){Ct(),e.pingedLanes|=e.suspendedLanes&s;break}e.timeoutHandle=jp(vs.bind(null,e,Rt,tr),t);break}vs(e,Rt,tr);break;case 4:if(Fr(e,r),(r&4194240)===r)break;for(t=e.eventTimes,s=-1;0<r;){var o=31-En(r);i=1<<o,o=t[o],o>s&&(s=o),r&=~i}if(r=s,r=qe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*XP(r/1960))-r,10<r){e.timeoutHandle=jp(vs.bind(null,e,Rt,tr),r);break}vs(e,Rt,tr);break;case 5:vs(e,Rt,tr);break;default:throw Error(L(329))}}}return Dt(e,qe()),e.callbackNode===n?zS.bind(null,e):null}function Wp(e,t){var n=va;return e.current.memoizedState.isDehydrated&&(Rs(e,t).flags|=256),e=jc(e,t),e!==2&&(t=Rt,Rt=n,t!==null&&Kp(t)),e}function Kp(e){Rt===null?Rt=e:Rt.push.apply(Rt,e)}function JP(e){for(var t=e;;){if(t.flags&16384){var n=t.updateQueue;if(n!==null&&(n=n.stores,n!==null))for(var r=0;r<n.length;r++){var s=n[r],i=s.getSnapshot;s=s.value;try{if(!Tn(i(),s))return!1}catch{return!1}}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Fr(e,t){for(t&=~iy,t&=~Ed,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-En(t),r=1<<n;e[n]=-1,t&=~r}}function v1(e){if(ue&6)throw Error(L(327));Ai();var t=lc(e,0);if(!(t&1))return Dt(e,qe()),null;var n=jc(e,t);if(e.tag!==0&&n===2){var r=vp(e);r!==0&&(t=r,n=Wp(e,r))}if(n===1)throw n=Va,Rs(e,0),Fr(e,t),Dt(e,qe()),n;if(n===6)throw Error(L(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,vs(e,Rt,tr),Dt(e,qe()),null}function ay(e,t){var n=ue;ue|=1;try{return e(t)}finally{ue=n,ue===0&&(Zi=qe()+500,bd&&fs())}}function Fs(e){zr!==null&&zr.tag===0&&!(ue&6)&&Ai();var t=ue;ue|=1;var n=un.transition,r=pe;try{if(un.transition=null,pe=1,e)return e()}finally{pe=r,un.transition=n,ue=t,!(ue&6)&&fs()}}function ly(){Ft=Si.current,Ce(Si)}function Rs(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==-1&&(e.timeoutHandle=-1,TP(n)),Ke!==null)for(n=Ke.return;n!==null;){var r=n;switch(Vg(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&&hc();break;case 3:Xi(),Ce($t),Ce(yt),Xg();break;case 5:Yg(r);break;case 4:Xi();break;case 13:Ce(Ne);break;case 19:Ce(Ne);break;case 10:Wg(r.type._context);break;case 22:case 23:ly()}n=n.return}if(it=e,Ke=e=Xr(e.current,null),ut=Ft=t,Xe=0,Va=null,iy=Ed=Ls=0,Rt=va=null,Ss!==null){for(t=0;t<Ss.length;t++)if(n=Ss[t],r=n.interleaved,r!==null){n.interleaved=null;var s=r.next,i=n.pending;if(i!==null){var o=i.next;i.next=s,r.next=o}n.pending=r}Ss=null}return e}function VS(e,t){do{var n=Ke;try{if(qg(),Mu.current=_c,wc){for(var r=Oe.memoizedState;r!==null;){var s=r.queue;s!==null&&(s.pending=null),r=r.next}wc=!1}if(Ms=0,st=Ge=Oe=null,ga=!1,Fa=0,sy.current=null,n===null||n.return===null){Xe=1,Va=t,Ke=null;break}e:{var i=e,o=n.return,a=n,l=t;if(t=ut,a.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var c=l,d=a,f=d.tag;if(!(d.mode&1)&&(f===0||f===11||f===15)){var h=d.alternate;h?(d.updateQueue=h.updateQueue,d.memoizedState=h.memoizedState,d.lanes=h.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=i1(o);if(p!==null){p.flags&=-257,o1(p,o,a,i,t),p.mode&1&&s1(i,c,t),t=p,l=c;var g=t.updateQueue;if(g===null){var b=new Set;b.add(l),t.updateQueue=b}else g.add(l);break e}else{if(!(t&1)){s1(i,c,t),uy();break e}l=Error(L(426))}}else if(Te&&a.mode&1){var w=i1(o);if(w!==null){!(w.flags&65536)&&(w.flags|=256),o1(w,o,a,i,t),Bg(Ji(l,a));break e}}i=l=Ji(l,a),Xe!==4&&(Xe=2),va===null?va=[i]:va.push(i),i=o;do{switch(i.tag){case 3:i.flags|=65536,t&=-t,i.lanes|=t;var y=CS(i,l,t);X0(i,y);break e;case 1:a=l;var m=i.type,x=i.stateNode;if(!(i.flags&128)&&(typeof m.getDerivedStateFromError=="function"||x!==null&&typeof x.componentDidCatch=="function"&&(Gr===null||!Gr.has(x)))){i.flags|=65536,t&=-t,i.lanes|=t;var _=jS(i,a,t);X0(i,_);break e}}i=i.return}while(i!==null)}qS(n)}catch(S){t=S,Ke===n&&n!==null&&(Ke=n=n.return);continue}break}while(1)}function BS(){var e=Sc.current;return Sc.current=_c,e===null?_c:e}function uy(){(Xe===0||Xe===3||Xe===2)&&(Xe=4),it===null||!(Ls&268435455)&&!(Ed&268435455)||Fr(it,ut)}function jc(e,t){var n=ue;ue|=2;var r=BS();(it!==e||ut!==t)&&(tr=null,Rs(e,t));do try{ZP();break}catch(s){VS(e,s)}while(1);if(qg(),ue=n,Sc.current=r,Ke!==null)throw Error(L(261));return it=null,ut=0,Xe}function ZP(){for(;Ke!==null;)HS(Ke)}function eR(){for(;Ke!==null&&!C4();)HS(Ke)}function HS(e){var t=KS(e.alternate,e,Ft);e.memoizedProps=e.pendingProps,t===null?qS(e):Ke=t,sy.current=null}function qS(e){var t=e;do{var n=t.alternate;if(e=t.return,t.flags&32768){if(n=KP(n,t),n!==null){n.flags&=32767,Ke=n;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Xe=6,Ke=null;return}}else if(n=WP(n,t,Ft),n!==null){Ke=n;return}if(t=t.sibling,t!==null){Ke=t;return}Ke=t=e}while(t!==null);Xe===0&&(Xe=5)}function vs(e,t,n){var r=pe,s=un.transition;try{un.transition=null,pe=1,tR(e,t,n,r)}finally{un.transition=s,pe=r}return null}function tR(e,t,n,r){do Ai();while(zr!==null);if(ue&6)throw Error(L(327));n=e.finishedWork;var s=e.finishedLanes;if(n===null)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(L(177));e.callbackNode=null,e.callbackPriority=0;var i=n.lanes|n.childLanes;if(I4(e,i),e===it&&(Ke=it=null,ut=0),!(n.subtreeFlags&2064)&&!(n.flags&2064)||au||(au=!0,QS(ac,function(){return Ai(),null})),i=(n.flags&15990)!==0,n.subtreeFlags&15990||i){i=un.transition,un.transition=null;var o=pe;pe=1;var a=ue;ue|=4,sy.current=null,GP(e,n),FS(n,e),wP(Ep),uc=!!Sp,Ep=Sp=null,e.current=n,YP(n),j4(),ue=a,pe=o,un.transition=i}else e.current=n;if(au&&(au=!1,zr=e,Cc=s),i=e.pendingLanes,i===0&&(Gr=null),P4(n.stateNode),Dt(e,qe()),t!==null)for(r=e.onRecoverableError,n=0;n<t.length;n++)s=t[n],r(s.value,{componentStack:s.stack,digest:s.digest});if(Ec)throw Ec=!1,e=Hp,Hp=null,e;return Cc&1&&e.tag!==0&&Ai(),i=e.pendingLanes,i&1?e===qp?xa++:(xa=0,qp=e):xa=0,fs(),null}function Ai(){if(zr!==null){var e=E_(Cc),t=un.transition,n=pe;try{if(un.transition=null,pe=16>e?16:e,zr===null)var r=!1;else{if(e=zr,zr=null,Cc=0,ue&6)throw Error(L(331));var s=ue;for(ue|=4,Y=e.current;Y!==null;){var i=Y,o=i.child;if(Y.flags&16){var a=i.deletions;if(a!==null){for(var l=0;l<a.length;l++){var c=a[l];for(Y=c;Y!==null;){var d=Y;switch(d.tag){case 0:case 11:case 15:ya(8,d,i)}var f=d.child;if(f!==null)f.return=d,Y=f;else for(;Y!==null;){d=Y;var h=d.sibling,p=d.return;if(DS(d),d===c){Y=null;break}if(h!==null){h.return=p,Y=h;break}Y=p}}}var g=i.alternate;if(g!==null){var b=g.child;if(b!==null){g.child=null;do{var w=b.sibling;b.sibling=null,b=w}while(b!==null)}}Y=i}}if(i.subtreeFlags&2064&&o!==null)o.return=i,Y=o;else e:for(;Y!==null;){if(i=Y,i.flags&2048)switch(i.tag){case 0:case 11:case 15:ya(9,i,i.return)}var y=i.sibling;if(y!==null){y.return=i.return,Y=y;break e}Y=i.return}}var m=e.current;for(Y=m;Y!==null;){o=Y;var x=o.child;if(o.subtreeFlags&2064&&x!==null)x.return=o,Y=x;else e:for(o=m;Y!==null;){if(a=Y,a.flags&2048)try{switch(a.tag){case 0:case 11:case 15:Sd(9,a)}}catch(S){Le(a,a.return,S)}if(a===o){Y=null;break e}var _=a.sibling;if(_!==null){_.return=a.return,Y=_;break e}Y=a.return}}if(ue=s,fs(),Bn&&typeof Bn.onPostCommitFiberRoot=="function")try{Bn.onPostCommitFiberRoot(md,e)}catch{}r=!0}return r}finally{pe=n,un.transition=t}}return!1}function x1(e,t,n){t=Ji(n,t),t=CS(e,t,1),e=Qr(e,t,1),t=Ct(),e!==null&&(pl(e,1,t),Dt(e,t))}function Le(e,t,n){if(e.tag===3)x1(e,e,n);else for(;t!==null;){if(t.tag===3){x1(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Gr===null||!Gr.has(r))){e=Ji(n,e),e=jS(t,e,1),t=Qr(t,e,1),e=Ct(),t!==null&&(pl(t,1,e),Dt(t,e));break}}t=t.return}}function nR(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),t=Ct(),e.pingedLanes|=e.suspendedLanes&n,it===e&&(ut&n)===n&&(Xe===4||Xe===3&&(ut&130023424)===ut&&500>qe()-oy?Rs(e,0):iy|=n),Dt(e,t)}function WS(e,t){t===0&&(e.mode&1?(t=Xl,Xl<<=1,!(Xl&130023424)&&(Xl=4194304)):t=1);var n=Ct();e=vr(e,t),e!==null&&(pl(e,t,n),Dt(e,n))}function rR(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),WS(e,n)}function sR(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,s=e.memoizedState;s!==null&&(n=s.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(L(314))}r!==null&&r.delete(t),WS(e,n)}var KS;KS=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||$t.current)Ot=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ot=!1,qP(e,t,n);Ot=!!(e.flags&131072)}else Ot=!1,Te&&t.flags&1048576&&Y_(t,gc,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Fu(e,t),e=t.pendingProps;var s=Qi(t,yt.current);Oi(t,n),s=Zg(null,t,r,e,s,n);var i=ey();return t.flags|=1,typeof s=="object"&&s!==null&&typeof s.render=="function"&&s.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,It(r)?(i=!0,pc(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,Qg(t),s.updater=wd,t.stateNode=s,s._reactInternals=t,Ap(t,r,e,n),t=Dp(null,t,r,!0,i,n)):(t.tag=0,Te&&i&&zg(t),bt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Fu(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=oR(r),e=bn(r,e),s){case 0:t=Ip(null,t,r,e,n);break e;case 1:t=u1(null,t,r,e,n);break e;case 11:t=a1(null,t,r,e,n);break e;case 14:t=l1(null,t,r,bn(r.type,e),n);break e}throw Error(L(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:bn(r,s),Ip(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:bn(r,s),u1(e,t,r,s,n);case 3:e:{if(RS(t),e===null)throw Error(L(387));r=t.pendingProps,i=t.memoizedState,s=i.element,eS(e,t),xc(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){s=Ji(Error(L(423)),t),t=c1(e,t,r,n,s);break e}else if(r!==s){s=Ji(Error(L(424)),t),t=c1(e,t,r,n,s);break e}else for(Vt=Kr(t.stateNode.containerInfo.firstChild),Ht=t,Te=!0,_n=null,n=sS(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Gi(),r===s){t=xr(e,t,n);break e}bt(e,t,r,n)}t=t.child}return t;case 5:return iS(t),e===null&&Rp(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Cp(r,s)?o=null:i!==null&&Cp(r,i)&&(t.flags|=32),PS(e,t),bt(e,t,o,n),t.child;case 6:return e===null&&Rp(t),null;case 13:return NS(e,t,n);case 4:return Gg(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yi(t,null,r,n):bt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:bn(r,s),a1(e,t,r,s,n);case 7:return bt(e,t,t.pendingProps,n),t.child;case 8:return bt(e,t,t.pendingProps.children,n),t.child;case 12:return bt(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,s=t.pendingProps,i=t.memoizedProps,o=s.value,Se(yc,r._currentValue),r._currentValue=o,i!==null)if(Tn(i.value,o)){if(i.children===s.children&&!$t.current){t=xr(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var a=i.dependencies;if(a!==null){o=i.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(i.tag===1){l=fr(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var d=c.pending;d===null?l.next=l:(l.next=d.next,d.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Np(i.return,n,t),a.lanes|=n;break}l=l.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(L(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Np(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}bt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Oi(t,n),s=pn(s),r=r(s),t.flags|=1,bt(e,t,r,n),t.child;case 14:return r=t.type,s=bn(r,t.pendingProps),s=bn(r.type,s),l1(e,t,r,s,n);case 15:return kS(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:bn(r,s),Fu(e,t),t.tag=1,It(r)?(e=!0,pc(t)):e=!1,Oi(t,n),nS(t,r,s),Ap(t,r,s,n),Dp(null,t,r,!0,e,n);case 19:return OS(e,t,n);case 22:return TS(e,t,n)}throw Error(L(156,t.tag))};function QS(e,t){return b_(e,t)}function iR(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function on(e,t,n,r){return new iR(e,t,n,r)}function cy(e){return e=e.prototype,!(!e||!e.isReactComponent)}function oR(e){if(typeof e=="function")return cy(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Pg)return 11;if(e===Rg)return 14}return 2}function Xr(e,t){var n=e.alternate;return n===null?(n=on(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Vu(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")cy(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case hi:return Ns(n.children,s,i,t);case Tg:o=8,s|=8;break;case rp:return e=on(12,n,t,s|2),e.elementType=rp,e.lanes=i,e;case sp:return e=on(13,n,t,s),e.elementType=sp,e.lanes=i,e;case ip:return e=on(19,n,t,s),e.elementType=ip,e.lanes=i,e;case r_:return Cd(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case t_:o=10;break e;case n_:o=9;break e;case Pg:o=11;break e;case Rg:o=14;break e;case Ar:o=16,r=null;break e}throw Error(L(130,e==null?e:typeof e,""))}return t=on(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Ns(e,t,n,r){return e=on(7,e,r,t),e.lanes=n,e}function Cd(e,t,n,r){return e=on(22,e,r,t),e.elementType=r_,e.lanes=n,e.stateNode={isHidden:!1},e}function th(e,t,n){return e=on(6,e,null,t),e.lanes=n,e}function nh(e,t,n){return t=on(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function aR(e,t,n,r,s){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Df(0),this.expirationTimes=Df(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Df(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function dy(e,t,n,r,s,i,o,a,l){return e=new aR(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=on(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qg(i),e}function lR(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:fi,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}function GS(e){if(!e)return is;e=e._reactInternals;e:{if(Ys(e)!==e||e.tag!==1)throw Error(L(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(It(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(L(171))}if(e.tag===1){var n=e.type;if(It(n))return Q_(e,n,t)}return t}function YS(e,t,n,r,s,i,o,a,l){return e=dy(n,r,!0,e,s,i,o,a,l),e.context=GS(null),n=e.current,r=Ct(),s=Yr(n),i=fr(r,s),i.callback=t??null,Qr(n,i,s),e.current.lanes=s,pl(e,s,r),Dt(e,r),e}function jd(e,t,n,r){var s=t.current,i=Ct(),o=Yr(s);return n=GS(n),t.context===null?t.context=n:t.pendingContext=n,t=fr(i,o),t.payload={element:e},r=r===void 0?null:r,r!==null&&(t.callback=r),e=Qr(s,t,o),e!==null&&(Cn(e,s,o,i),Du(e,s,o)),o}function kc(e){if(e=e.current,!e.child)return null;switch(e.child.tag){case 5:return e.child.stateNode;default:return e.child.stateNode}}function b1(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function fy(e,t){b1(e,t),(e=e.alternate)&&b1(e,t)}function uR(){return null}var XS=typeof reportError=="function"?reportError:function(e){console.error(e)};function hy(e){this._internalRoot=e}kd.prototype.render=hy.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(L(409));jd(e,t,null,null)};kd.prototype.unmount=hy.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Fs(function(){jd(null,e,null,null)}),t[yr]=null}};function kd(e){this._internalRoot=e}kd.prototype.unstable_scheduleHydration=function(e){if(e){var t=k_();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Lr.length&&t!==0&&t<Lr[n].priority;n++);Lr.splice(n,0,e),n===0&&P_(e)}};function py(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Td(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function w1(){}function cR(e,t,n,r,s){if(s){if(typeof r=="function"){var i=r;r=function(){var c=kc(o);i.call(c)}}var o=YS(t,r,e,0,null,!1,!1,"",w1);return e._reactRootContainer=o,e[yr]=o.current,$a(e.nodeType===8?e.parentNode:e),Fs(),o}for(;s=e.lastChild;)e.removeChild(s);if(typeof r=="function"){var a=r;r=function(){var c=kc(l);a.call(c)}}var l=dy(e,0,!1,null,null,!1,!1,"",w1);return e._reactRootContainer=l,e[yr]=l.current,$a(e.nodeType===8?e.parentNode:e),Fs(function(){jd(t,l,n,r)}),l}function Pd(e,t,n,r,s){var i=n._reactRootContainer;if(i){var o=i;if(typeof s=="function"){var a=s;s=function(){var l=kc(o);a.call(l)}}jd(t,o,e,s)}else o=cR(n,t,e,s,r);return kc(o)}C_=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=sa(t.pendingLanes);n!==0&&(Ag(t,n|1),Dt(t,qe()),!(ue&6)&&(Zi=qe()+500,fs()))}break;case 13:Fs(function(){var r=vr(e,1);if(r!==null){var s=Ct();Cn(r,e,1,s)}}),fy(e,1)}};$g=function(e){if(e.tag===13){var t=vr(e,134217728);if(t!==null){var n=Ct();Cn(t,e,134217728,n)}fy(e,134217728)}};j_=function(e){if(e.tag===13){var t=Yr(e),n=vr(e,t);if(n!==null){var r=Ct();Cn(n,e,t,r)}fy(e,t)}};k_=function(){return pe};T_=function(e,t){var n=pe;try{return pe=e,t()}finally{pe=n}};mp=function(e,t,n){switch(t){case"input":if(lp(e,n),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var s=xd(r);if(!s)throw Error(L(90));i_(r),lp(r,s)}}}break;case"textarea":a_(e,n);break;case"select":t=n.value,t!=null&&Ti(e,!!n.multiple,t,!1)}};p_=ay;m_=Fs;var dR={usingClientEntryPoint:!1,Events:[gl,yi,xd,f_,h_,ay]},Go={findFiberByHostInstance:_s,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},fR={bundleType:Go.bundleType,version:Go.version,rendererPackageName:Go.rendererPackageName,rendererConfig:Go.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_r.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=v_(e),e===null?null:e.stateNode},findFiberByHostInstance:Go.findFiberByHostInstance||uR,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var lu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!lu.isDisabled&&lu.supportsFiber)try{md=lu.inject(fR),Bn=lu}catch{}}Qt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=dR;Qt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!py(t))throw Error(L(200));return lR(e,t,null,n)};Qt.createRoot=function(e,t){if(!py(e))throw Error(L(299));var n=!1,r="",s=XS;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onRecoverableError!==void 0&&(s=t.onRecoverableError)),t=dy(e,1,!1,null,null,n,!1,r,s),e[yr]=t.current,$a(e.nodeType===8?e.parentNode:e),new hy(t)};Qt.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(L(188)):(e=Object.keys(e).join(","),Error(L(268,e)));return e=v_(t),e=e===null?null:e.stateNode,e};Qt.flushSync=function(e){return Fs(e)};Qt.hydrate=function(e,t,n){if(!Td(t))throw Error(L(200));return Pd(null,e,t,!0,n)};Qt.hydrateRoot=function(e,t,n){if(!py(e))throw Error(L(405));var r=n!=null&&n.hydratedSources||null,s=!1,i="",o=XS;if(n!=null&&(n.unstable_strictMode===!0&&(s=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onRecoverableError!==void 0&&(o=n.onRecoverableError)),t=YS(t,null,e,1,n??null,s,!1,i,o),e[yr]=t.current,$a(e),r)for(e=0;e<r.length;e++)n=r[e],s=n._getVersion,s=s(n._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[n,s]:t.mutableSourceEagerHydrationData.push(n,s);return new kd(t)};Qt.render=function(e,t,n){if(!Td(t))throw Error(L(200));return Pd(null,e,t,!1,n)};Qt.unmountComponentAtNode=function(e){if(!Td(e))throw Error(L(40));return e._reactRootContainer?(Fs(function(){Pd(null,null,e,!1,function(){e._reactRootContainer=null,e[yr]=null})}),!0):!1};Qt.unstable_batchedUpdates=ay;Qt.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Td(n))throw Error(L(200));if(e==null||e._reactInternals===void 0)throw Error(L(38));return Pd(e,t,n,!1,r)};Qt.version="18.2.0-next-9e3b772b8-20220608";function JS(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(JS)}catch(e){console.error(e)}}JS(),Yw.exports=Qt;var Eo=Yw.exports;const Wq=Qn(Eo);var ZS,e2,_1=Eo;e2=_1.createRoot,ZS=_1.hydrateRoot;class Co{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){const n={listener:t};return this.listeners.add(n),this.onSubscribe(),()=>{this.listeners.delete(n),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const Ba=typeof window>"u"||"Deno"in window;function Zt(){}function hR(e,t){return typeof e=="function"?e(t):e}function Qp(e){return typeof e=="number"&&e>=0&&e!==1/0}function t2(e,t){return Math.max(e+(t||0)-Date.now(),0)}function oa(e,t,n){return vl(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function pR(e,t,n){return vl(e)?typeof t=="function"?{...n,mutationKey:e,mutationFn:t}:{...t,mutationKey:e}:typeof e=="function"?{...t,mutationFn:e}:{...e}}function Ir(e,t,n){return vl(e)?[{...t,queryKey:e},n]:[e||{},t]}function S1(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(vl(o)){if(r){if(t.queryHash!==my(o,t.options))return!1}else if(!Tc(t.queryKey,o))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof s<"u"&&s!==t.state.fetchStatus||i&&!i(t))}function E1(e,t){const{exact:n,fetching:r,predicate:s,mutationKey:i}=e;if(vl(i)){if(!t.options.mutationKey)return!1;if(n){if(Cs(t.options.mutationKey)!==Cs(i))return!1}else if(!Tc(t.options.mutationKey,i))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||s&&!s(t))}function my(e,t){return((t==null?void 0:t.queryKeyHashFn)||Cs)(e)}function Cs(e){return JSON.stringify(e,(t,n)=>Yp(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function Tc(e,t){return n2(e,t)}function n2(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!n2(e[n],t[n])):!1}function r2(e,t){if(e===t)return e;const n=C1(e)&&C1(t);if(n||Yp(e)&&Yp(t)){const r=n?e.length:Object.keys(e).length,s=n?t:Object.keys(t),i=s.length,o=n?[]:{};let a=0;for(let l=0;l<i;l++){const c=n?l:s[l];o[c]=r2(e[c],t[c]),o[c]===e[c]&&a++}return r===i&&a===r?e:o}return t}function Gp(e,t){if(e&&!t||t&&!e)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function C1(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Yp(e){if(!j1(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!j1(n)||!n.hasOwnProperty("isPrototypeOf"))}function j1(e){return Object.prototype.toString.call(e)==="[object Object]"}function vl(e){return Array.isArray(e)}function s2(e){return new Promise(t=>{setTimeout(t,e)})}function k1(e){s2(0).then(e)}function mR(){if(typeof AbortController=="function")return new AbortController}function Xp(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?r2(e,t):t}class gR extends Co{constructor(){super(),this.setup=t=>{if(!Ba&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused!==t&&(this.focused=t,this.onFocus())}onFocus(){this.listeners.forEach(({listener:t})=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Pc=new gR,T1=["online","offline"];class yR extends Co{constructor(){super(),this.setup=t=>{if(!Ba&&window.addEventListener){const n=()=>t();return T1.forEach(r=>{window.addEventListener(r,n,!1)}),()=>{T1.forEach(r=>{window.removeEventListener(r,n)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online!==t&&(this.online=t,this.onOnline())}onOnline(){this.listeners.forEach(({listener:t})=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const Rc=new yR;function vR(e){return Math.min(1e3*2**e,3e4)}function Rd(e){return(e??"online")==="online"?Rc.isOnline():!0}class i2{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function Bu(e){return e instanceof i2}function o2(e){let t=!1,n=0,r=!1,s,i,o;const a=new Promise((w,y)=>{i=w,o=y}),l=w=>{r||(p(new i2(w)),e.abort==null||e.abort())},c=()=>{t=!0},d=()=>{t=!1},f=()=>!Pc.isFocused()||e.networkMode!=="always"&&!Rc.isOnline(),h=w=>{r||(r=!0,e.onSuccess==null||e.onSuccess(w),s==null||s(),i(w))},p=w=>{r||(r=!0,e.onError==null||e.onError(w),s==null||s(),o(w))},g=()=>new Promise(w=>{s=y=>{const m=r||!f();return m&&w(y),m},e.onPause==null||e.onPause()}).then(()=>{s=void 0,r||e.onContinue==null||e.onContinue()}),b=()=>{if(r)return;let w;try{w=e.fn()}catch(y){w=Promise.reject(y)}Promise.resolve(w).then(h).catch(y=>{var m,x;if(r)return;const _=(m=e.retry)!=null?m:3,S=(x=e.retryDelay)!=null?x:vR,E=typeof S=="function"?S(n,y):S,C=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,y);if(t||!C){p(y);return}n++,e.onFail==null||e.onFail(n,y),s2(E).then(()=>{if(f())return g()}).then(()=>{t?p(y):b()})})};return Rd(e.networkMode)?b():g().then(b),{promise:a,cancel:l,continue:()=>(s==null?void 0:s())?a:Promise.resolve(),cancelRetry:c,continueRetry:d}}const gy=console;function xR(){let e=[],t=0,n=d=>{d()},r=d=>{d()};const s=d=>{let f;t++;try{f=d()}finally{t--,t||a()}return f},i=d=>{t?e.push(d):k1(()=>{n(d)})},o=d=>(...f)=>{i(()=>{d(...f)})},a=()=>{const d=e;e=[],d.length&&k1(()=>{r(()=>{d.forEach(f=>{n(f)})})})};return{batch:s,batchCalls:o,schedule:i,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{r=d}}}const Ue=xR();class a2{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Qp(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t??(Ba?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class bR extends a2{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||gy,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||wR(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=Xp(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(Zt).catch(Zt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!t2(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,s;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(g=>g.options.queryFn);p&&this.setOptions(p.options)}Array.isArray(this.options.queryKey);const o=mR(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>{if(o)return this.abortSignalConsumed=!0,o.signal}})};l(a);const c=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),d={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:c};if(l(d),(r=this.options.behavior)==null||r.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((s=d.fetchOptions)==null?void 0:s.meta)){var f;this.dispatch({type:"fetch",meta:(f=d.fetchOptions)==null?void 0:f.meta})}const h=p=>{if(Bu(p)&&p.silent||this.dispatch({type:"error",error:p}),!Bu(p)){var g,b,w,y;(g=(b=this.cache.config).onError)==null||g.call(b,p,this),(w=(y=this.cache.config).onSettled)==null||w.call(y,this.state.data,p,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=o2({fn:d.fetchFn,abort:o==null?void 0:o.abort.bind(o),onSuccess:p=>{var g,b,w,y;if(typeof p>"u"){h(new Error(this.queryHash+" data is undefined"));return}this.setData(p),(g=(b=this.cache.config).onSuccess)==null||g.call(b,p,this),(w=(y=this.cache.config).onSettled)==null||w.call(y,p,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:h,onFail:(p,g)=>{this.dispatch({type:"failed",failureCount:p,error:g})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var s,i;switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(s=t.meta)!=null?s:null,fetchStatus:Rd(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(i=t.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const o=t.error;return Bu(o)&&o.revert&&this.revertState?{...this.revertState}:{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ue.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function wR(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=typeof t<"u",r=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"loading",fetchStatus:"idle"}}class _R extends Co{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var s;const i=n.queryKey,o=(s=n.queryHash)!=null?s:my(i,n);let a=this.get(o);return a||(a=new bR({cache:this,logger:t.getLogger(),queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){Ue.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=Ir(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(s=>S1(r,s))}findAll(t,n){const[r]=Ir(t,n);return Object.keys(r).length>0?this.queries.filter(s=>S1(r,s)):this.queries}notify(t){Ue.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}onFocus(){Ue.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){Ue.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class SR extends a2{constructor(t){super(),this.defaultOptions=t.defaultOptions,this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||gy,this.observers=[],this.state=t.state||l2(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...this.defaultOptions,...t},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var t,n;return(t=(n=this.retryer)==null?void 0:n.continue())!=null?t:this.execute()}async execute(){const t=()=>{var C;return this.retryer=o2({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(k,P)=>{this.dispatch({type:"failed",failureCount:k,error:P})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(C=this.options.retry)!=null?C:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,s,i,o,a,l,c,d;if(!n){var f,h,p,g;this.dispatch({type:"loading",variables:this.options.variables}),await((f=(h=this.mutationCache.config).onMutate)==null?void 0:f.call(h,this.state.variables,this));const k=await((p=(g=this.options).onMutate)==null?void 0:p.call(g,this.state.variables));k!==this.state.context&&this.dispatch({type:"loading",context:k,variables:this.state.variables})}const C=await t();return await((r=(s=this.mutationCache.config).onSuccess)==null?void 0:r.call(s,C,this.state.variables,this.state.context,this)),await((i=(o=this.options).onSuccess)==null?void 0:i.call(o,C,this.state.variables,this.state.context)),await((a=(l=this.mutationCache.config).onSettled)==null?void 0:a.call(l,C,null,this.state.variables,this.state.context,this)),await((c=(d=this.options).onSettled)==null?void 0:c.call(d,C,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:C}),C}catch(C){try{var b,w,y,m,x,_,S,E;throw await((b=(w=this.mutationCache.config).onError)==null?void 0:b.call(w,C,this.state.variables,this.state.context,this)),await((y=(m=this.options).onError)==null?void 0:y.call(m,C,this.state.variables,this.state.context)),await((x=(_=this.mutationCache.config).onSettled)==null?void 0:x.call(_,void 0,C,this.state.variables,this.state.context,this)),await((S=(E=this.options).onSettled)==null?void 0:S.call(E,void 0,C,this.state.variables,this.state.context)),C}finally{this.dispatch({type:"error",error:C})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Rd(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ue.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function l2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class ER extends Co{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const s=new SR({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0});return this.add(s),s}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){Ue.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>E1(t,n))}findAll(t){return this.mutations.filter(n=>E1(t,n))}notify(t){Ue.batch(()=>{this.listeners.forEach(({listener:n})=>{n(t)})})}resumePausedMutations(){var t;return this.resuming=((t=this.resuming)!=null?t:Promise.resolve()).then(()=>{const n=this.mutations.filter(r=>r.state.isPaused);return Ue.batch(()=>n.reduce((r,s)=>r.then(()=>s.continue().catch(Zt)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function CR(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,s,i,o;const a=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,l=(r=e.fetchOptions)==null||(s=r.meta)==null?void 0:s.fetchMore,c=l==null?void 0:l.pageParam,d=(l==null?void 0:l.direction)==="forward",f=(l==null?void 0:l.direction)==="backward",h=((i=e.state.data)==null?void 0:i.pages)||[],p=((o=e.state.data)==null?void 0:o.pageParams)||[];let g=p,b=!1;const w=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>{var C;if((C=e.signal)!=null&&C.aborted)b=!0;else{var k;(k=e.signal)==null||k.addEventListener("abort",()=>{b=!0})}return e.signal}})},y=e.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+e.options.queryHash+"'")),m=(E,C,k,P)=>(g=P?[C,...g]:[...g,C],P?[k,...E]:[...E,k]),x=(E,C,k,P)=>{if(b)return Promise.reject("Cancelled");if(typeof k>"u"&&!C&&E.length)return Promise.resolve(E);const O={queryKey:e.queryKey,pageParam:k,meta:e.options.meta};w(O);const $=y(O);return Promise.resolve($).then(M=>m(E,k,M,P))};let _;if(!h.length)_=x([]);else if(d){const E=typeof c<"u",C=E?c:Jp(e.options,h);_=x(h,E,C)}else if(f){const E=typeof c<"u",C=E?c:u2(e.options,h);_=x(h,E,C,!0)}else{g=[];const E=typeof e.options.getNextPageParam>"u";_=(a&&h[0]?a(h[0],0,h):!0)?x([],E,p[0]):Promise.resolve(m([],p[0],h[0]));for(let k=1;k<h.length;k++)_=_.then(P=>{if(a&&h[k]?a(h[k],k,h):!0){const $=E?p[k]:Jp(e.options,P);return x(P,E,$)}return Promise.resolve(m(P,p[k],h[k]))})}return _.then(E=>({pages:E,pageParams:g}))}}}}function Jp(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function u2(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}function Kq(e,t){if(e.getNextPageParam&&Array.isArray(t)){const n=Jp(e,t);return typeof n<"u"&&n!==null&&n!==!1}}function Qq(e,t){if(e.getPreviousPageParam&&Array.isArray(t)){const n=u2(e,t);return typeof n<"u"&&n!==null&&n!==!1}}class jR{constructor(t={}){this.queryCache=t.queryCache||new _R,this.mutationCache=t.mutationCache||new ER,this.logger=t.logger||gy,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=Pc.subscribe(()=>{Pc.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=Rc.subscribe(()=>{Rc.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var t,n;this.mountCount--,this.mountCount===0&&((t=this.unsubscribeFocus)==null||t.call(this),this.unsubscribeFocus=void 0,(n=this.unsubscribeOnline)==null||n.call(this),this.unsubscribeOnline=void 0)}isFetching(t,n){const[r]=Ir(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}ensureQueryData(t,n,r){const s=oa(t,n,r),i=this.getQueryData(s.queryKey);return i?Promise.resolve(i):this.fetchQuery(s)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const s=r.data;return[n,s]})}setQueryData(t,n,r){const s=this.queryCache.find(t),i=s==null?void 0:s.state.data,o=hR(n,i);if(typeof o>"u")return;const a=oa(t),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(o,{...r,manual:!0})}setQueriesData(t,n,r){return Ue.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=Ir(t,n),s=this.queryCache;Ue.batch(()=>{s.findAll(r).forEach(i=>{s.remove(i)})})}resetQueries(t,n,r){const[s,i]=Ir(t,n,r),o=this.queryCache,a={type:"active",...s};return Ue.batch(()=>(o.findAll(s).forEach(l=>{l.reset()}),this.refetchQueries(a,i)))}cancelQueries(t,n,r){const[s,i={}]=Ir(t,n,r);typeof i.revert>"u"&&(i.revert=!0);const o=Ue.batch(()=>this.queryCache.findAll(s).map(a=>a.cancel(i)));return Promise.all(o).then(Zt).catch(Zt)}invalidateQueries(t,n,r){const[s,i]=Ir(t,n,r);return Ue.batch(()=>{var o,a;if(this.queryCache.findAll(s).forEach(c=>{c.invalidate()}),s.refetchType==="none")return Promise.resolve();const l={...s,type:(o=(a=s.refetchType)!=null?a:s.type)!=null?o:"active"};return this.refetchQueries(l,i)})}refetchQueries(t,n,r){const[s,i]=Ir(t,n,r),o=Ue.batch(()=>this.queryCache.findAll(s).filter(l=>!l.isDisabled()).map(l=>{var c;return l.fetch(void 0,{...i,cancelRefetch:(c=i==null?void 0:i.cancelRefetch)!=null?c:!0,meta:{refetchPage:s.refetchPage}})}));let a=Promise.all(o).then(Zt);return i!=null&&i.throwOnError||(a=a.catch(Zt)),a}fetchQuery(t,n,r){const s=oa(t,n,r),i=this.defaultQueryOptions(s);typeof i.retry>"u"&&(i.retry=!1);const o=this.queryCache.build(this,i);return o.isStaleByTime(i.staleTime)?o.fetch(i):Promise.resolve(o.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(Zt).catch(Zt)}fetchInfiniteQuery(t,n,r){const s=oa(t,n,r);return s.behavior=CR(),this.fetchQuery(s)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(Zt).catch(Zt)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(s=>Cs(t)===Cs(s.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>Tc(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(s=>Cs(t)===Cs(s.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>Tc(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=my(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class kR extends Co{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),P1(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Zp(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Zp(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,s=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),Gp(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const i=this.hasListeners();i&&R1(this.currentQuery,s,this.options,r)&&this.executeFetch(),this.updateResult(n),i&&(this.currentQuery!==s||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const o=this.computeRefetchInterval();i&&(this.currentQuery!==s||this.options.enabled!==r.enabled||o!==this.currentRefetchInterval)&&this.updateRefetchInterval(o)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t),r=this.createResult(n,t);return PR(this,r,t)&&(this.currentResult=r,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),r}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Zt)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),Ba||this.currentResult.isStale||!Qp(this.options.staleTime))return;const n=t2(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(Ba||this.options.enabled===!1||!Qp(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Pc.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,s=this.options,i=this.currentResult,o=this.currentResultState,a=this.currentResultOptions,l=t!==r,c=l?t.state:this.currentQueryInitialState,d=l?this.currentResult:this.previousQueryResult,{state:f}=t;let{dataUpdatedAt:h,error:p,errorUpdatedAt:g,fetchStatus:b,status:w}=f,y=!1,m=!1,x;if(n._optimisticResults){const k=this.hasListeners(),P=!k&&P1(t,n),O=k&&R1(t,r,n,s);(P||O)&&(b=Rd(t.options.networkMode)?"fetching":"paused",h||(w="loading")),n._optimisticResults==="isRestoring"&&(b="idle")}if(n.keepPreviousData&&!f.dataUpdatedAt&&d!=null&&d.isSuccess&&w!=="error")x=d.data,h=d.dataUpdatedAt,w=d.status,y=!0;else if(n.select&&typeof f.data<"u")if(i&&f.data===(o==null?void 0:o.data)&&n.select===this.selectFn)x=this.selectResult;else try{this.selectFn=n.select,x=n.select(f.data),x=Xp(i==null?void 0:i.data,x,n),this.selectResult=x,this.selectError=null}catch(k){this.selectError=k}else x=f.data;if(typeof n.placeholderData<"u"&&typeof x>"u"&&w==="loading"){let k;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))k=i.data;else if(k=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof k<"u")try{k=n.select(k),this.selectError=null}catch(P){this.selectError=P}typeof k<"u"&&(w="success",x=Xp(i==null?void 0:i.data,k,n),m=!0)}this.selectError&&(p=this.selectError,x=this.selectResult,g=Date.now(),w="error");const _=b==="fetching",S=w==="loading",E=w==="error";return{status:w,fetchStatus:b,isLoading:S,isSuccess:w==="success",isError:E,isInitialLoading:S&&_,data:x,dataUpdatedAt:h,error:p,errorUpdatedAt:g,failureCount:f.fetchFailureCount,failureReason:f.fetchFailureReason,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>c.dataUpdateCount||f.errorUpdateCount>c.errorUpdateCount,isFetching:_,isRefetching:_&&!S,isLoadingError:E&&f.dataUpdatedAt===0,isPaused:b==="paused",isPlaceholderData:m,isPreviousData:y,isRefetchError:E&&f.dataUpdatedAt!==0,isStale:yy(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,Gp(r,n))return;this.currentResult=r;const s={cache:!0},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!this.trackedProps.size)return!0;const l=new Set(a??this.trackedProps);return this.options.useErrorBoundary&&l.add("error"),Object.keys(this.currentResult).some(c=>{const d=c;return this.currentResult[d]!==n[d]&&l.has(d)})};(t==null?void 0:t.listeners)!==!1&&i()&&(s.listeners=!0),this.notify({...s,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!Bu(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){Ue.batch(()=>{if(t.onSuccess){var n,r,s,i;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(s=(i=this.options).onSettled)==null||s.call(i,this.currentResult.data,null)}else if(t.onError){var o,a,l,c;(o=(a=this.options).onError)==null||o.call(a,this.currentResult.error),(l=(c=this.options).onSettled)==null||l.call(c,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function TR(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function P1(e,t){return TR(e,t)||e.state.dataUpdatedAt>0&&Zp(e,t,t.refetchOnMount)}function Zp(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&yy(e,t)}return!1}function R1(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&yy(e,n)}function yy(e,t){return e.isStaleByTime(t.staleTime)}function PR(e,t,n){return n.keepPreviousData?!1:n.placeholderData!==void 0?t.isPlaceholderData:e.getCurrentResult()!==t}let RR=class extends Co{constructor(t,n){super(),this.client=t,this.setOptions(n),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var n;const r=this.options;this.options=this.client.defaultMutationOptions(t),Gp(r,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(n=this.currentMutation)==null||n.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.currentMutation)==null||t.removeObserver(this)}}onMutationUpdate(t){this.updateResult();const n={listeners:!0};t.type==="success"?n.onSuccess=!0:t.type==="error"&&(n.onError=!0),this.notify(n)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(t,n){return this.mutateOptions=n,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof t<"u"?t:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const t=this.currentMutation?this.currentMutation.state:l2(),n={...t,isLoading:t.status==="loading",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=n}notify(t){Ue.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(t.onSuccess){var n,r,s,i;(n=(r=this.mutateOptions).onSuccess)==null||n.call(r,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(s=(i=this.mutateOptions).onSettled)==null||s.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(t.onError){var o,a,l,c;(o=(a=this.mutateOptions).onError)==null||o.call(a,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(l=(c=this.mutateOptions).onSettled)==null||l.call(c,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}t.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)})})}};var c2={exports:{}},d2={};/**
 * @license React
 * use-sync-external-store-shim.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var eo=v;function NR(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var OR=typeof Object.is=="function"?Object.is:NR,AR=eo.useState,$R=eo.useEffect,IR=eo.useLayoutEffect,DR=eo.useDebugValue;function MR(e,t){var n=t(),r=AR({inst:{value:n,getSnapshot:t}}),s=r[0].inst,i=r[1];return IR(function(){s.value=n,s.getSnapshot=t,rh(s)&&i({inst:s})},[e,n,t]),$R(function(){return rh(s)&&i({inst:s}),e(function(){rh(s)&&i({inst:s})})},[e]),DR(n),n}function rh(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!OR(e,n)}catch{return!0}}function LR(e,t){return t()}var FR=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?LR:MR;d2.useSyncExternalStore=eo.useSyncExternalStore!==void 0?eo.useSyncExternalStore:FR;c2.exports=d2;var f2=c2.exports;const h2=f2.useSyncExternalStore,N1=v.createContext(void 0),p2=v.createContext(!1);function m2(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=N1),window.ReactQueryClientContext):N1)}const g2=({context:e}={})=>{const t=v.useContext(m2(e,v.useContext(p2)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},UR=({client:e,children:t,context:n,contextSharing:r=!1})=>{v.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const s=m2(n,r);return v.createElement(p2.Provider,{value:!n&&r},v.createElement(s.Provider,{value:e},t))},y2=v.createContext(!1),zR=()=>v.useContext(y2);y2.Provider;function VR(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const BR=v.createContext(VR()),HR=()=>v.useContext(BR);function v2(e,t){return typeof e=="function"?e(...t):!!e}const qR=(e,t)=>{(e.suspense||e.useErrorBoundary)&&(t.isReset()||(e.retryOnMount=!1))},WR=e=>{v.useEffect(()=>{e.clearReset()},[e])},KR=({result:e,errorResetBoundary:t,useErrorBoundary:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&v2(n,[e.error,r]),QR=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},GR=(e,t)=>e.isLoading&&e.isFetching&&!t,YR=(e,t,n)=>(e==null?void 0:e.suspense)&&GR(t,n),XR=(e,t,n)=>t.fetchOptimistic(e).then(({data:r})=>{e.onSuccess==null||e.onSuccess(r),e.onSettled==null||e.onSettled(r,null)}).catch(r=>{n.clearReset(),e.onError==null||e.onError(r),e.onSettled==null||e.onSettled(void 0,r)});function JR(e,t){const n=g2({context:e.context}),r=zR(),s=HR(),i=n.defaultQueryOptions(e);i._optimisticResults=r?"isRestoring":"optimistic",i.onError&&(i.onError=Ue.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=Ue.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=Ue.batchCalls(i.onSettled)),QR(i),qR(i,s),WR(s);const[o]=v.useState(()=>new t(n,i)),a=o.getOptimisticResult(i);if(h2(v.useCallback(l=>{const c=r?()=>{}:o.subscribe(Ue.batchCalls(l));return o.updateResult(),c},[o,r]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),v.useEffect(()=>{o.setOptions(i,{listeners:!1})},[i,o]),YR(i,a,r))throw XR(i,o,s);if(KR({result:a,errorResetBoundary:s,useErrorBoundary:i.useErrorBoundary,query:o.getCurrentQuery()}))throw a.error;return i.notifyOnChangeProps?a:o.trackResult(a)}function On(e,t,n){const r=oa(e,t,n);return JR(r,kR)}function me(e,t,n){const r=pR(e,t,n),s=g2({context:r.context}),[i]=v.useState(()=>new RR(s,r));v.useEffect(()=>{i.setOptions(r)},[i,r]);const o=h2(v.useCallback(l=>i.subscribe(Ue.batchCalls(l)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),a=v.useCallback((l,c)=>{i.mutate(l,c).catch(ZR)},[i]);if(o.error&&v2(i.options.useErrorBoundary,[o.error]))throw o.error;return{...o,mutate:a,mutateAsync:o.mutate}}function ZR(){}const x2=v.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Nd=v.createContext({}),vy=v.createContext(null),Od=typeof document<"u",Nc=Od?v.useLayoutEffect:v.useEffect,xy=v.createContext({strict:!1});function e3(e,t,n,r){const{visualElement:s}=v.useContext(Nd),i=v.useContext(xy),o=v.useContext(vy),a=v.useContext(x2).reducedMotion,l=v.useRef();r=r||i.renderer,!l.current&&r&&(l.current=r(e,{visualState:t,parent:s,props:n,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const c=l.current;return v.useInsertionEffect(()=>{c&&c.update(n,o)}),Nc(()=>{c&&c.render()}),v.useEffect(()=>{c&&c.updateFeatures()}),(window.HandoffAppearAnimations?Nc:v.useEffect)(()=>{c&&c.animationState&&c.animationState.animateChanges()}),c}function b2(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function t3(e,t,n){return v.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):b2(n)&&(n.current=r))},[t])}function Ha(e){return typeof e=="string"||Array.isArray(e)}function Ad(e){return typeof e=="object"&&typeof e.start=="function"}const by=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wy=["initial",...by];function $d(e){return Ad(e.animate)||wy.some(t=>Ha(e[t]))}function w2(e){return!!($d(e)||e.variants)}function n3(e,t){if($d(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Ha(n)?n:void 0,animate:Ha(r)?r:void 0}}return e.inherit!==!1?t:{}}function r3(e){const{initial:t,animate:n}=n3(e,v.useContext(Nd));return v.useMemo(()=>({initial:t,animate:n}),[O1(t),O1(n)])}function O1(e){return Array.isArray(e)?e.join(" "):e}const A1={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},qa={};for(const e in A1)qa[e]={isEnabled:t=>A1[e].some(n=>!!t[n])};function em(e){for(const t in e)qa[t]={...qa[t],...e[t]}}const _2=v.createContext({}),s3=v.createContext({}),i3=Symbol.for("motionComponentSymbol");function o3({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){e&&em(e);function i(a,l){let c;const d={...v.useContext(x2),...a,layoutId:a3(a)},{isStatic:f}=d,h=r3(a),p=r(a,f);if(!f&&Od){h.visualElement=e3(s,p,d,t);const g=v.useContext(s3),b=v.useContext(xy).strict;h.visualElement&&(c=h.visualElement.loadFeatures(d,b,e,g))}return v.createElement(Nd.Provider,{value:h},c&&h.visualElement?v.createElement(c,{visualElement:h.visualElement,...d}):null,n(s,a,t3(p,h.visualElement,l),p,f,h.visualElement))}const o=v.forwardRef(i);return o[i3]=s,o}function a3({layoutId:e}){const t=v.useContext(_2).id;return t&&e!==void 0?t+"-"+e:e}function l3(e){function t(r,s={}){return o3(e(r,s))}if(typeof Proxy>"u")return t;const n=new Map;return new Proxy(t,{get:(r,s)=>(n.has(s)||n.set(s,t(s)),n.get(s))})}const u3=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function _y(e){return typeof e!="string"||e.includes("-")?!1:!!(u3.indexOf(e)>-1||/[A-Z]/.test(e))}const c3={},xl=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Xs=new Set(xl);function S2(e,{layout:t,layoutId:n}){return Xs.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!c3[e]||e==="opacity")}const Wt=e=>!!(e&&e.getVelocity),d3={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},f3=xl.length;function h3(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,s){let i="";for(let o=0;o<f3;o++){const a=xl[o];if(e[a]!==void 0){const l=d3[a]||a;i+=`${l}(${e[a]}) `}}return t&&!e.z&&(i+="translateZ(0)"),i=i.trim(),s?i=s(e,r?"":i):n&&r&&(i="none"),i}const E2=e=>t=>typeof t=="string"&&t.startsWith(e),C2=E2("--"),tm=E2("var(--"),p3=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,m3=(e,t)=>t&&typeof e=="number"?t.transform(e):e,to=(e,t,n)=>Math.min(Math.max(n,e),t),Js={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ba={...Js,transform:e=>to(0,1,e)},uu={...Js,default:1},wa=e=>Math.round(e*1e5)/1e5,Id=/(-)?([\d]*\.?[\d])+/g,j2=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,g3=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function bl(e){return typeof e=="string"}const wl=e=>({test:t=>bl(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Or=wl("deg"),$i=wl("%"),ne=wl("px"),y3=wl("vh"),v3=wl("vw"),$1={...$i,parse:e=>$i.parse(e)/100,transform:e=>$i.transform(e*100)},I1={...Js,transform:Math.round},k2={borderWidth:ne,borderTopWidth:ne,borderRightWidth:ne,borderBottomWidth:ne,borderLeftWidth:ne,borderRadius:ne,radius:ne,borderTopLeftRadius:ne,borderTopRightRadius:ne,borderBottomRightRadius:ne,borderBottomLeftRadius:ne,width:ne,maxWidth:ne,height:ne,maxHeight:ne,size:ne,top:ne,right:ne,bottom:ne,left:ne,padding:ne,paddingTop:ne,paddingRight:ne,paddingBottom:ne,paddingLeft:ne,margin:ne,marginTop:ne,marginRight:ne,marginBottom:ne,marginLeft:ne,rotate:Or,rotateX:Or,rotateY:Or,rotateZ:Or,scale:uu,scaleX:uu,scaleY:uu,scaleZ:uu,skew:Or,skewX:Or,skewY:Or,distance:ne,translateX:ne,translateY:ne,translateZ:ne,x:ne,y:ne,z:ne,perspective:ne,transformPerspective:ne,opacity:ba,originX:$1,originY:$1,originZ:ne,zIndex:I1,fillOpacity:ba,strokeOpacity:ba,numOctaves:I1};function Sy(e,t,n,r){const{style:s,vars:i,transform:o,transformOrigin:a}=e;let l=!1,c=!1,d=!0;for(const f in t){const h=t[f];if(C2(f)){i[f]=h;continue}const p=k2[f],g=m3(h,p);if(Xs.has(f)){if(l=!0,o[f]=g,!d)continue;h!==(p.default||0)&&(d=!1)}else f.startsWith("origin")?(c=!0,a[f]=g):s[f]=g}if(t.transform||(l||r?s.transform=h3(e.transform,n,d,r):s.transform&&(s.transform="none")),c){const{originX:f="50%",originY:h="50%",originZ:p=0}=a;s.transformOrigin=`${f} ${h} ${p}`}}const Ey=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function T2(e,t,n){for(const r in t)!Wt(t[r])&&!S2(r,n)&&(e[r]=t[r])}function x3({transformTemplate:e},t,n){return v.useMemo(()=>{const r=Ey();return Sy(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function b3(e,t,n){const r=e.style||{},s={};return T2(s,r,e),Object.assign(s,x3(e,t,n)),e.transformValues?e.transformValues(s):s}function w3(e,t,n){const r={},s=b3(e,t,n);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=s,r}const _3=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","ignoreStrict","viewport"]);function Oc(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||_3.has(e)}let P2=e=>!Oc(e);function S3(e){e&&(P2=t=>t.startsWith("on")?!Oc(t):e(t))}try{S3(require("@emotion/is-prop-valid").default)}catch{}function E3(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(P2(s)||n===!0&&Oc(s)||!t&&!Oc(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function D1(e,t,n){return typeof e=="string"?e:ne.transform(t+n*e)}function C3(e,t,n){const r=D1(t,e.x,e.width),s=D1(n,e.y,e.height);return`${r} ${s}`}const j3={offset:"stroke-dashoffset",array:"stroke-dasharray"},k3={offset:"strokeDashoffset",array:"strokeDasharray"};function T3(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?j3:k3;e[i.offset]=ne.transform(-r);const o=ne.transform(t),a=ne.transform(n);e[i.array]=`${o} ${a}`}function Cy(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},d,f,h){if(Sy(e,c,d,h),f){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g,dimensions:b}=e;p.transform&&(b&&(g.transform=p.transform),delete p.transform),b&&(s!==void 0||i!==void 0||g.transform)&&(g.transformOrigin=C3(b,s!==void 0?s:.5,i!==void 0?i:.5)),t!==void 0&&(p.x=t),n!==void 0&&(p.y=n),r!==void 0&&(p.scale=r),o!==void 0&&T3(p,o,a,l,!1)}const R2=()=>({...Ey(),attrs:{}}),jy=e=>typeof e=="string"&&e.toLowerCase()==="svg";function P3(e,t,n,r){const s=v.useMemo(()=>{const i=R2();return Cy(i,t,{enableHardwareAcceleration:!1},jy(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};T2(i,e.style,e),s.style={...i,...s.style}}return s}function R3(e=!1){return(n,r,s,{latestValues:i},o)=>{const l=(_y(n)?P3:w3)(r,i,o,n),d={...E3(r,typeof n=="string",e),...l,ref:s},{children:f}=r,h=v.useMemo(()=>Wt(f)?f.get():f,[f]);return v.createElement(n,{...d,children:h})}}const ky=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function N2(e,{style:t,vars:n},r,s){Object.assign(e.style,t,s&&s.getProjectionStyles(r));for(const i in n)e.style.setProperty(i,n[i])}const O2=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function A2(e,t,n,r){N2(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(O2.has(s)?s:ky(s),t.attrs[s])}function Ty(e,t){const{style:n}=e,r={};for(const s in n)(Wt(n[s])||t.style&&Wt(t.style[s])||S2(s,e))&&(r[s]=n[s]);return r}function $2(e,t){const n=Ty(e,t);for(const r in e)if(Wt(e[r])||Wt(t[r])){const s=xl.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[s]=e[r]}return n}function Py(e,t,n,r={},s={}){return typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,s)),typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"&&(t=t(n!==void 0?n:e.custom,r,s)),t}function I2(e){const t=v.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ac=e=>Array.isArray(e),N3=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),O3=e=>Ac(e)?e[e.length-1]||0:e;function A3(e){const t=Wt(e)?e.get():e;return N3(t)?t.toValue():t}function $3({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,s,i){const o={latestValues:I3(r,s,i,e),renderState:t()};return n&&(o.mount=a=>n(r,a,o)),o}const D2=e=>(t,n)=>{const r=v.useContext(Nd),s=v.useContext(vy),i=()=>$3(e,t,r,s);return n?i():I2(i)};function I3(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=A3(i[h]);let{initial:o,animate:a}=e;const l=$d(e),c=w2(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||o===!1;const f=d?a:o;return f&&typeof f!="boolean"&&!Ad(f)&&(Array.isArray(f)?f:[f]).forEach(p=>{const g=Py(e,p);if(!g)return;const{transitionEnd:b,transition:w,...y}=g;for(const m in y){let x=y[m];if(Array.isArray(x)){const _=d?x.length-1:0;x=x[_]}x!==null&&(s[m]=x)}for(const m in b)s[m]=b[m]}),s}const D3={useVisualState:D2({scrapeMotionValuesFromProps:$2,createRenderState:R2,onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}Cy(n,r,{enableHardwareAcceleration:!1},jy(t.tagName),e.transformTemplate),A2(t,n)}})},M3={useVisualState:D2({scrapeMotionValuesFromProps:Ty,createRenderState:Ey})};function L3(e,{forwardMotionProps:t=!1},n,r){return{..._y(e)?D3:M3,preloadedFeatures:n,useRender:R3(t),createVisualElement:r,Component:e}}function js(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const F3=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function M2(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const U3=e=>t=>F3(t)&&e(t,M2(t));function Hu(e,t,n,r){return js(e,t,U3(n),r)}const z3=(e,t)=>n=>t(e(n)),Os=(...e)=>e.reduce(z3);function L2(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const M1=L2("dragHorizontal"),L1=L2("dragVertical");function V3(e){let t=!1;if(e==="y")t=L1();else if(e==="x")t=M1();else{const n=M1(),r=L1();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function F2(){const e=V3(!0);return e?(e(),!1):!0}class jo{constructor(t){this.isMounted=!1,this.node=t}update(){}}const Et=e=>e;function B3(e){let t=[],n=[],r=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(l,c=!1,d=!1)=>{const f=d&&s,h=f?t:n;return c&&o.add(l),h.indexOf(l)===-1&&(h.push(l),f&&s&&(r=t.length)),l},cancel:l=>{const c=n.indexOf(l);c!==-1&&n.splice(c,1),o.delete(l)},process:l=>{if(s){i=!0;return}if(s=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let c=0;c<r;c++){const d=t[c];d(l),o.has(d)&&(a.schedule(d),e())}s=!1,i&&(i=!1,a.process(l))}};return a}const cu=["prepare","read","update","preRender","render","postRender"],H3=40;function q3(e,t){let n=!1,r=!0;const s={delta:0,timestamp:0,isProcessing:!1},i=cu.reduce((f,h)=>(f[h]=B3(()=>n=!0),f),{}),o=f=>i[f].process(s),a=f=>{n=!1,s.delta=r?1e3/60:Math.max(Math.min(f-s.timestamp,H3),1),s.timestamp=f,s.isProcessing=!0,cu.forEach(o),s.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,s.isProcessing||e(a)};return{schedule:cu.reduce((f,h)=>{const p=i[h];return f[h]=(g,b=!1,w=!1)=>(n||l(),p.schedule(g,b,w)),f},{}),cancel:f=>cu.forEach(h=>i[h].cancel(f)),state:s,steps:i}}const{schedule:At,cancel:$c,state:nm,steps:Yq}=q3(typeof requestAnimationFrame<"u"?requestAnimationFrame:Et,!0);function F1(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),s=(i,o)=>{if(i.type==="touch"||F2())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&At.update(()=>a[r](i,o))};return Hu(e.current,n,s,{passive:!e.getProps()[r]})}class W3 extends jo{mount(){this.unmount=Os(F1(this.node,!0),F1(this.node,!1))}unmount(){}}class K3 extends jo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Os(js(this.node.current,"focus",()=>this.onFocus()),js(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const U2=(e,t)=>t?e===t?!0:U2(e,t.parentElement):!1;function sh(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,M2(n))}class Q3 extends jo{constructor(){super(...arguments),this.removeStartListeners=Et,this.removeEndListeners=Et,this.removeAccessibleListeners=Et,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),i=Hu(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:d}=this.node.getProps();At.update(()=>{U2(this.node.current,a.target)?c&&c(a,l):d&&d(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),o=Hu(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Os(i,o),this.startPress(t,n)},this.startAccessiblePress=()=>{const t=i=>{if(i.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||sh("up",(l,c)=>{const{onTap:d}=this.node.getProps();d&&At.update(()=>d(l,c))})};this.removeEndListeners(),this.removeEndListeners=js(this.node.current,"keyup",o),sh("down",(a,l)=>{this.startPress(a,l)})},n=js(this.node.current,"keydown",t),r=()=>{this.isPressing&&sh("cancel",(i,o)=>this.cancelPress(i,o))},s=js(this.node.current,"blur",r);this.removeAccessibleListeners=Os(n,s)}}startPress(t,n){this.isPressing=!0;const{onTapStart:r,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&At.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!F2()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&At.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=Hu(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=js(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Os(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const rm=new WeakMap,ih=new WeakMap,G3=e=>{const t=rm.get(e.target);t&&t(e)},Y3=e=>{e.forEach(G3)};function X3({root:e,...t}){const n=e||document;ih.has(n)||ih.set(n,{});const r=ih.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(Y3,{root:e,...t})),r[s]}function J3(e,t,n){const r=X3(t);return rm.set(e,n),r.observe(e),()=>{rm.delete(e),r.unobserve(e)}}const Z3={some:0,all:1};class eN extends jo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:s="some",once:i}=t,o={root:n?n.current:void 0,rootMargin:r,threshold:typeof s=="number"?s:Z3[s]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,i&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=c?d:f;h&&h(l)};return J3(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(tN(t,n))&&this.startObserver()}unmount(){}}function tN({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const nN={inView:{Feature:eN},tap:{Feature:Q3},focus:{Feature:K3},hover:{Feature:W3}};function z2(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function rN(e){const t={};return e.values.forEach((n,r)=>t[r]=n.get()),t}function sN(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function Dd(e,t,n){const r=e.getProps();return Py(r,t,n!==void 0?n:r.custom,rN(e),sN(e))}const iN="framerAppearId",oN="data-"+ky(iN);let aN=Et,Ry=Et;const As=e=>e*1e3,Jr=e=>e/1e3,lN={current:!1},V2=e=>Array.isArray(e)&&typeof e[0]=="number";function B2(e){return!!(!e||typeof e=="string"&&H2[e]||V2(e)||Array.isArray(e)&&e.every(B2))}const aa=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,H2={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:aa([0,.65,.55,1]),circOut:aa([.55,0,1,.45]),backIn:aa([.31,.01,.66,-.59]),backOut:aa([.33,1.53,.69,.99])};function q2(e){if(e)return V2(e)?aa(e):Array.isArray(e)?e.map(q2):H2[e]}function uN(e,t,n,{delay:r=0,duration:s,repeat:i=0,repeatType:o="loop",ease:a,times:l}={}){const c={[t]:n};l&&(c.offset=l);const d=q2(a);return Array.isArray(d)&&(c.easing=d),e.animate(c,{delay:r,duration:s,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}function cN(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const W2=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,dN=1e-7,fN=12;function hN(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=W2(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>dN&&++a<fN);return o}function _l(e,t,n,r){if(e===t&&n===r)return Et;const s=i=>hN(i,0,1,e,n);return i=>i===0||i===1?i:W2(s(i),t,r)}const pN=_l(.42,0,1,1),mN=_l(0,0,.58,1),K2=_l(.42,0,.58,1),gN=e=>Array.isArray(e)&&typeof e[0]!="number",Q2=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,G2=e=>t=>1-e(1-t),Y2=e=>1-Math.sin(Math.acos(e)),X2=G2(Y2),yN=Q2(X2),J2=_l(.33,1.53,.69,.99),Ny=G2(J2),vN=Q2(Ny),xN=e=>(e*=2)<1?.5*Ny(e):.5*(2-Math.pow(2,-10*(e-1))),bN={linear:Et,easeIn:pN,easeInOut:K2,easeOut:mN,circIn:Y2,circInOut:yN,circOut:X2,backIn:Ny,backInOut:vN,backOut:J2,anticipate:xN},U1=e=>{if(Array.isArray(e)){Ry(e.length===4);const[t,n,r,s]=e;return _l(t,n,r,s)}else if(typeof e=="string")return bN[e];return e},Oy=(e,t)=>n=>!!(bl(n)&&g3.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Z2=(e,t,n)=>r=>{if(!bl(r))return r;const[s,i,o,a]=r.match(Id);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},wN=e=>to(0,255,e),oh={...Js,transform:e=>Math.round(wN(e))},ks={test:Oy("rgb","red"),parse:Z2("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+oh.transform(e)+", "+oh.transform(t)+", "+oh.transform(n)+", "+wa(ba.transform(r))+")"};function _N(e){let t="",n="",r="",s="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),s=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),s=e.substring(4,5),t+=t,n+=n,r+=r,s+=s),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:s?parseInt(s,16)/255:1}}const sm={test:Oy("#"),parse:_N,transform:ks.transform},Ei={test:Oy("hsl","hue"),parse:Z2("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+$i.transform(wa(t))+", "+$i.transform(wa(n))+", "+wa(ba.transform(r))+")"},xt={test:e=>ks.test(e)||sm.test(e)||Ei.test(e),parse:e=>ks.test(e)?ks.parse(e):Ei.test(e)?Ei.parse(e):sm.parse(e),transform:e=>bl(e)?e:e.hasOwnProperty("red")?ks.transform(e):Ei.transform(e)},Md=(e,t,n)=>-n*e+n*t+e;function ah(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function SN({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let s=0,i=0,o=0;if(!t)s=i=o=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;s=ah(l,a,e+1/3),i=ah(l,a,e),o=ah(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}const lh=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},EN=[sm,ks,Ei],CN=e=>EN.find(t=>t.test(e));function z1(e){const t=CN(e);let n=t.parse(e);return t===Ei&&(n=SN(n)),n}const eE=(e,t)=>{const n=z1(e),r=z1(t),s={...n};return i=>(s.red=lh(n.red,r.red,i),s.green=lh(n.green,r.green,i),s.blue=lh(n.blue,r.blue,i),s.alpha=Md(n.alpha,r.alpha,i),ks.transform(s))};function jN(e){var t,n;return isNaN(e)&&bl(e)&&(((t=e.match(Id))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(j2))===null||n===void 0?void 0:n.length)||0)>0}const tE={regex:p3,countKey:"Vars",token:"${v}",parse:Et},nE={regex:j2,countKey:"Colors",token:"${c}",parse:xt.parse},rE={regex:Id,countKey:"Numbers",token:"${n}",parse:Js.parse};function uh(e,{regex:t,countKey:n,token:r,parse:s}){const i=e.tokenised.match(t);i&&(e["num"+n]=i.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...i.map(s)))}function Ic(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&uh(n,tE),uh(n,nE),uh(n,rE),n}function sE(e){return Ic(e).values}function iE(e){const{values:t,numColors:n,numVars:r,tokenised:s}=Ic(e),i=t.length;return o=>{let a=s;for(let l=0;l<i;l++)l<r?a=a.replace(tE.token,o[l]):l<r+n?a=a.replace(nE.token,xt.transform(o[l])):a=a.replace(rE.token,wa(o[l]));return a}}const kN=e=>typeof e=="number"?0:e;function TN(e){const t=sE(e);return iE(e)(t.map(kN))}const ko={test:jN,parse:sE,createTransformer:iE,getAnimatableNone:TN},oE=(e,t)=>n=>`${n>0?t:e}`;function aE(e,t){return typeof e=="number"?n=>Md(e,t,n):xt.test(e)?eE(e,t):e.startsWith("var(")?oE(e,t):uE(e,t)}const lE=(e,t)=>{const n=[...e],r=n.length,s=e.map((i,o)=>aE(i,t[o]));return i=>{for(let o=0;o<r;o++)n[o]=s[o](i);return n}},PN=(e,t)=>{const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=aE(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}},uE=(e,t)=>{const n=ko.createTransformer(t),r=Ic(e),s=Ic(t);return r.numVars===s.numVars&&r.numColors===s.numColors&&r.numNumbers>=s.numNumbers?Os(lE(r.values,s.values),n):oE(e,t)},cE=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},V1=(e,t)=>n=>Md(e,t,n);function RN(e){return typeof e=="number"?V1:typeof e=="string"?xt.test(e)?eE:uE:Array.isArray(e)?lE:typeof e=="object"?PN:V1}function NN(e,t,n){const r=[],s=n||RN(e[0]),i=e.length-1;for(let o=0;o<i;o++){let a=s(e[o],e[o+1]);if(t){const l=Array.isArray(t)?t[o]||Et:t;a=Os(l,a)}r.push(a)}return r}function dE(e,t,{clamp:n=!0,ease:r,mixer:s}={}){const i=e.length;if(Ry(i===t.length),i===1)return()=>t[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=NN(t,r,s),a=o.length,l=c=>{let d=0;if(a>1)for(;d<e.length-2&&!(c<e[d+1]);d++);const f=cE(e[d],e[d+1],c);return o[d](f)};return n?c=>l(to(e[0],e[i-1],c)):l}function ON(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=cE(0,t,r);e.push(Md(n,1,s))}}function AN(e){const t=[0];return ON(t,e.length-1),t}function $N(e,t){return e.map(n=>n*t)}function IN(e,t){return e.map(()=>t||K2).splice(0,e.length-1)}function Dc({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=gN(r)?r.map(U1):U1(r),i={done:!1,value:t[0]},o=$N(n&&n.length===t.length?n:AN(t),e),a=dE(o,t,{ease:Array.isArray(s)?s:IN(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}function fE(e,t){return t?e*(1e3/t):0}const DN=5;function hE(e,t,n){const r=Math.max(t-DN,0);return fE(n-e(r),t-r)}const ch=.001,MN=.01,B1=10,LN=.05,FN=1;function UN({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let s,i;aN(e<=As(B1));let o=1-t;o=to(LN,FN,o),e=to(MN,B1,Jr(e)),o<1?(s=c=>{const d=c*o,f=d*e,h=d-n,p=im(c,o),g=Math.exp(-f);return ch-h/p*g},i=c=>{const f=c*o*e,h=f*n+n,p=Math.pow(o,2)*Math.pow(c,2)*e,g=Math.exp(-f),b=im(Math.pow(c,2),o);return(-s(c)+ch>0?-1:1)*((h-p)*g)/b}):(s=c=>{const d=Math.exp(-c*e),f=(c-n)*e+1;return-ch+d*f},i=c=>{const d=Math.exp(-c*e),f=(n-c)*(e*e);return d*f});const a=5/e,l=VN(s,i,a);if(e=As(e),isNaN(l))return{stiffness:100,damping:10,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:o*2*Math.sqrt(r*c),duration:e}}}const zN=12;function VN(e,t,n){let r=n;for(let s=1;s<zN;s++)r=r-e(r)/t(r);return r}function im(e,t){return e*Math.sqrt(1-t*t)}const BN=["duration","bounce"],HN=["stiffness","damping","mass"];function H1(e,t){return t.some(n=>e[n]!==void 0)}function qN(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!H1(e,HN)&&H1(e,BN)){const n=UN(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function pE({keyframes:e,restDelta:t,restSpeed:n,...r}){const s=e[0],i=e[e.length-1],o={done:!1,value:s},{stiffness:a,damping:l,mass:c,velocity:d,duration:f,isResolvedFromDuration:h}=qN(r),p=d?-Jr(d):0,g=l/(2*Math.sqrt(a*c)),b=i-s,w=Jr(Math.sqrt(a/c)),y=Math.abs(b)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let m;if(g<1){const x=im(w,g);m=_=>{const S=Math.exp(-g*w*_);return i-S*((p+g*w*b)/x*Math.sin(x*_)+b*Math.cos(x*_))}}else if(g===1)m=x=>i-Math.exp(-w*x)*(b+(p+w*b)*x);else{const x=w*Math.sqrt(g*g-1);m=_=>{const S=Math.exp(-g*w*_),E=Math.min(x*_,300);return i-S*((p+g*w*b)*Math.sinh(E)+x*b*Math.cosh(E))/x}}return{calculatedDuration:h&&f||null,next:x=>{const _=m(x);if(h)o.done=x>=f;else{let S=p;x!==0&&(g<1?S=hE(m,x,_):S=0);const E=Math.abs(S)<=n,C=Math.abs(i-_)<=t;o.done=E&&C}return o.value=o.done?i:_,o}}}function q1({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:s=10,bounceStiffness:i=500,modifyTarget:o,min:a,max:l,restDelta:c=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},p=k=>a!==void 0&&k<a||l!==void 0&&k>l,g=k=>a===void 0?l:l===void 0||Math.abs(a-k)<Math.abs(l-k)?a:l;let b=n*t;const w=f+b,y=o===void 0?w:o(w);y!==w&&(b=y-f);const m=k=>-b*Math.exp(-k/r),x=k=>y+m(k),_=k=>{const P=m(k),O=x(k);h.done=Math.abs(P)<=c,h.value=h.done?y:O};let S,E;const C=k=>{p(h.value)&&(S=k,E=pE({keyframes:[h.value,g(h.value)],velocity:hE(x,k,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:d}))};return C(0),{calculatedDuration:null,next:k=>{let P=!1;return!E&&S===void 0&&(P=!0,_(k),C(k)),S!==void 0&&k>S?E.next(k-S):(!P&&_(k),h)}}}const WN=e=>{const t=({timestamp:n})=>e(n);return{start:()=>At.update(t,!0),stop:()=>$c(t),now:()=>nm.isProcessing?nm.timestamp:performance.now()}},W1=2e4;function K1(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<W1;)t+=n,r=e.next(t);return t>=W1?1/0:t}const KN={decay:q1,inertia:q1,tween:Dc,keyframes:Dc,spring:pE};function Mc({autoplay:e=!0,delay:t=0,driver:n=WN,keyframes:r,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:d,onUpdate:f,...h}){let p=1,g=!1,b,w;const y=()=>{w=new Promise(Q=>{b=Q})};y();let m;const x=KN[s]||Dc;let _;x!==Dc&&typeof r[0]!="number"&&(_=dE([0,100],r,{clamp:!1}),r=[0,100]);const S=x({...h,keyframes:r});let E;a==="mirror"&&(E=x({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let C="idle",k=null,P=null,O=null;S.calculatedDuration===null&&i&&(S.calculatedDuration=K1(S));const{calculatedDuration:$}=S;let F=1/0,M=1/0;$!==null&&(F=$+o,M=F*(i+1)-o);let z=0;const q=Q=>{if(P===null)return;p>0&&(P=Math.min(P,Q)),p<0&&(P=Math.min(Q-M/p,P)),k!==null?z=k:z=Math.round(Q-P)*p;const se=z-t*(p>=0?1:-1),he=p>=0?se<0:se>M;z=Math.max(se,0),C==="finished"&&k===null&&(z=M);let Re=z,oe=S;if(i){const Ie=z/F;let vt=Math.floor(Ie),Tt=Ie%1;!Tt&&Ie>=1&&(Tt=1),Tt===1&&vt--,vt=Math.min(vt,i+1);const Jt=!!(vt%2);Jt&&(a==="reverse"?(Tt=1-Tt,o&&(Tt-=o/F)):a==="mirror"&&(oe=E));let je=to(0,1,Tt);z>M&&(je=a==="reverse"&&Jt?1:0),Re=je*F}const ge=he?{done:!1,value:r[0]}:oe.next(Re);_&&(ge.value=_(ge.value));let{done:we}=ge;!he&&$!==null&&(we=p>=0?z>=M:z<=0);const vn=k===null&&(C==="finished"||C==="running"&&we);return f&&f(ge.value),vn&&I(),ge},B=()=>{m&&m.stop(),m=void 0},J=()=>{C="idle",B(),b(),y(),P=O=null},I=()=>{C="finished",d&&d(),B(),b()},G=()=>{if(g)return;m||(m=n(q));const Q=m.now();l&&l(),k!==null?P=Q-k:(!P||C==="finished")&&(P=Q),C==="finished"&&y(),O=P,k=null,C="running",m.start()};e&&G();const W={then(Q,se){return w.then(Q,se)},get time(){return Jr(z)},set time(Q){Q=As(Q),z=Q,k!==null||!m||p===0?k=Q:P=m.now()-Q/p},get duration(){const Q=S.calculatedDuration===null?K1(S):S.calculatedDuration;return Jr(Q)},get speed(){return p},set speed(Q){Q===p||!m||(p=Q,W.time=Jr(z))},get state(){return C},play:G,pause:()=>{C="paused",k=z},stop:()=>{g=!0,C!=="idle"&&(C="idle",c&&c(),J())},cancel:()=>{O!==null&&q(O),J()},complete:()=>{C="finished"},sample:Q=>(P=0,q(Q))};return W}function QN(e){let t;return()=>(t===void 0&&(t=e()),t)}const GN=QN(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),YN=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),du=10,XN=2e4,JN=(e,t)=>t.type==="spring"||e==="backgroundColor"||!B2(t.ease);function ZN(e,t,{onUpdate:n,onComplete:r,...s}){if(!(GN()&&YN.has(t)&&!s.repeatDelay&&s.repeatType!=="mirror"&&s.damping!==0&&s.type!=="inertia"))return!1;let o=!1,a,l;const c=()=>{l=new Promise(y=>{a=y})};c();let{keyframes:d,duration:f=300,ease:h,times:p}=s;if(JN(t,s)){const y=Mc({...s,repeat:0,delay:0});let m={done:!1,value:d[0]};const x=[];let _=0;for(;!m.done&&_<XN;)m=y.sample(_),x.push(m.value),_+=du;p=void 0,d=x,f=_-du,h="linear"}const g=uN(e.owner.current,t,d,{...s,duration:f,ease:h,times:p}),b=()=>g.cancel(),w=()=>{At.update(b),a(),c()};return g.onfinish=()=>{e.set(cN(d,s)),r&&r(),w()},{then(y,m){return l.then(y,m)},get timeline(){return g.timeline},set timeline(y){g.timeline=y,g.onfinish=null},get time(){return Jr(g.currentTime||0)},set time(y){g.currentTime=As(y)},get speed(){return g.playbackRate},set speed(y){g.playbackRate=y},get duration(){return Jr(f)},play:()=>{o||(g.play(),$c(b))},pause:()=>g.pause(),stop:()=>{if(o=!0,g.playState==="idle")return;const{currentTime:y}=g;if(y){const m=Mc({...s,autoplay:!1});e.setWithVelocity(m.sample(y-du).value,m.sample(y).value,du)}w()},complete:()=>g.finish(),cancel:w}}function eO({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const s=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:Et,pause:Et,stop:Et,then:i=>(i(),Promise.resolve()),cancel:Et,complete:Et});return t?Mc({keyframes:[0,1],duration:0,delay:t,onComplete:s}):s()}const tO={type:"spring",stiffness:500,damping:25,restSpeed:10},nO=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),rO={type:"keyframes",duration:.8},sO={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},iO=(e,{keyframes:t})=>t.length>2?rO:Xs.has(e)?e.startsWith("scale")?nO(t[1]):tO:sO,om=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(ko.test(t)||t==="0")&&!t.startsWith("url(")),oO=new Set(["brightness","contrast","saturate","opacity"]);function aO(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Id)||[];if(!r)return e;const s=n.replace(r,"");let i=oO.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const lO=/([a-z-]*)\(.*?\)/g,am={...ko,getAnimatableNone:e=>{const t=e.match(lO);return t?t.map(aO).join(" "):e}},uO={...k2,color:xt,backgroundColor:xt,outlineColor:xt,fill:xt,stroke:xt,borderColor:xt,borderTopColor:xt,borderRightColor:xt,borderBottomColor:xt,borderLeftColor:xt,filter:am,WebkitFilter:am},Ay=e=>uO[e];function mE(e,t){let n=Ay(e);return n!==am&&(n=ko),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const gE=e=>/^0[^.\s]+$/.test(e);function cO(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||gE(e)}function dO(e,t,n,r){const s=om(t,n);let i;Array.isArray(n)?i=[...n]:i=[null,n];const o=r.from!==void 0?r.from:e.get();let a;const l=[];for(let c=0;c<i.length;c++)i[c]===null&&(i[c]=c===0?o:i[c-1]),cO(i[c])&&l.push(c),typeof i[c]=="string"&&i[c]!=="none"&&i[c]!=="0"&&(a=i[c]);if(s&&l.length&&a)for(let c=0;c<l.length;c++){const d=l[c];i[d]=mE(t,a)}return i}function fO({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:s,repeat:i,repeatType:o,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}function hO(e,t){return e[t]||e.default||e}const pO=(e,t,n,r={})=>s=>{const i=hO(r,e)||{},o=i.delay||r.delay||0;let{elapsed:a=0}=r;a=a-As(o);const l=dO(t,e,n,i),c=l[0],d=l[l.length-1],f=om(e,c),h=om(e,d);let p={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...i,delay:-a,onUpdate:g=>{t.set(g),i.onUpdate&&i.onUpdate(g)},onComplete:()=>{s(),i.onComplete&&i.onComplete()}};if(fO(i)||(p={...p,...iO(e,p)}),p.duration&&(p.duration=As(p.duration)),p.repeatDelay&&(p.repeatDelay=As(p.repeatDelay)),!f||!h||lN.current||i.type===!1)return eO(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const g=ZN(t,e,p);if(g)return g}return Mc(p)};function Lc(e){return!!(Wt(e)&&e.add)}const mO=e=>/^\-?\d*\.?\d+$/.test(e);function gO(e,t){e.indexOf(t)===-1&&e.push(t)}function yO(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class yE{constructor(){this.subscriptions=[]}add(t){return gO(this.subscriptions,t),()=>yO(this.subscriptions,t)}notify(t,n,r){const s=this.subscriptions.length;if(s)if(s===1)this.subscriptions[0](t,n,r);else for(let i=0;i<s;i++){const o=this.subscriptions[i];o&&o(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const vO=e=>!isNaN(parseFloat(e));class xO{constructor(t,n={}){this.version="10.13.1",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(r,s=!0)=>{this.prev=this.current,this.current=r;const{delta:i,timestamp:o}=nm;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,At.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),s&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>At.postRender(this.velocityCheck),this.velocityCheck=({timestamp:r})=>{r!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=t,this.canTrackVelocity=vO(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new yE);const r=this.events[t].add(n);return t==="change"?()=>{r(),At.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=t,this.timeDelta=r}jump(t){this.updateAndNotify(t),this.prev=t,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?fE(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Wa(e,t){return new xO(e,t)}const vE=e=>t=>t.test(e),bO={test:e=>e==="auto",parse:e=>e},xE=[Js,ne,$i,Or,v3,y3,bO],Yo=e=>xE.find(vE(e)),wO=[...xE,xt,ko],_O=e=>wO.find(vE(e));function SO(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Wa(n))}function EO(e,t){const n=Dd(e,t);let{transitionEnd:r={},transition:s={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const o in i){const a=O3(i[o]);SO(e,o,a)}}function CO(e,t,n){var r,s;const i=Object.keys(t).filter(a=>!e.hasValue(a)),o=i.length;if(o)for(let a=0;a<o;a++){const l=i[a],c=t[l];let d=null;Array.isArray(c)&&(d=c[0]),d===null&&(d=(s=(r=n[l])!==null&&r!==void 0?r:e.readValue(l))!==null&&s!==void 0?s:t[l]),d!=null&&(typeof d=="string"&&(mO(d)||gE(d))?d=parseFloat(d):!_O(d)&&ko.test(c)&&(d=mE(l,c)),e.addValue(l,Wa(d,{owner:e})),n[l]===void 0&&(n[l]=d),d!==null&&e.setBaseTarget(l,d))}}function jO(e,t){return t?(t[e]||t.default||t).from:void 0}function kO(e,t,n){const r={};for(const s in e){const i=jO(s,t);if(i!==void 0)r[s]=i;else{const o=n.getValue(s);o&&(r[s]=o.get())}}return r}function TO({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function bE(e,t,{delay:n=0,transitionOverride:r,type:s}={}){let{transition:i=e.getDefaultTransition(),transitionEnd:o,...a}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(i=r);const c=[],d=s&&e.animationState&&e.animationState.getState()[s];for(const f in a){const h=e.getValue(f),p=a[f];if(!h||p===void 0||d&&TO(d,f))continue;const g={delay:n,elapsed:0,...i};if(window.HandoffAppearAnimations&&!h.hasAnimated){const w=e.getProps()[oN];w&&(g.elapsed=window.HandoffAppearAnimations(w,f,h,At))}h.start(pO(f,h,p,e.shouldReduceMotion&&Xs.has(f)?{type:!1}:g));const b=h.animation;Lc(l)&&(l.add(f),b.then(()=>l.remove(f))),c.push(b)}return o&&Promise.all(c).then(()=>{o&&EO(e,o)}),c}function lm(e,t,n={}){const r=Dd(e,t,n.custom);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(bE(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:d,staggerDirection:f}=s;return PO(e,t,c+l,d,f,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[l,c]=a==="beforeChildren"?[i,o]:[o,i];return l().then(()=>c())}else return Promise.all([i(),o(n.delay)])}function PO(e,t,n=0,r=0,s=1,i){const o=[],a=(e.variantChildren.size-1)*r,l=s===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(RO).forEach((c,d)=>{c.notify("AnimationStart",t),o.push(lm(c,t,{...i,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function RO(e,t){return e.sortNodePosition(t)}function NO(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>lm(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=lm(e,t,n);else{const s=typeof t=="function"?Dd(e,t,n.custom):t;r=Promise.all(bE(e,s,n))}return r.then(()=>e.notify("AnimationComplete",t))}const OO=[...by].reverse(),AO=by.length;function $O(e){return t=>Promise.all(t.map(({animation:n,options:r})=>NO(e,n,r)))}function IO(e){let t=$O(e);const n=MO();let r=!0;const s=(l,c)=>{const d=Dd(e,c);if(d){const{transition:f,transitionEnd:h,...p}=d;l={...l,...p,...h}}return l};function i(l){t=l(e)}function o(l,c){const d=e.getProps(),f=e.getVariantContext(!0)||{},h=[],p=new Set;let g={},b=1/0;for(let y=0;y<AO;y++){const m=OO[y],x=n[m],_=d[m]!==void 0?d[m]:f[m],S=Ha(_),E=m===c?x.isActive:null;E===!1&&(b=y);let C=_===f[m]&&_!==d[m]&&S;if(C&&r&&e.manuallyAnimateOnMount&&(C=!1),x.protectedKeys={...g},!x.isActive&&E===null||!_&&!x.prevProp||Ad(_)||typeof _=="boolean")continue;const k=DO(x.prevProp,_);let P=k||m===c&&x.isActive&&!C&&S||y>b&&S;const O=Array.isArray(_)?_:[_];let $=O.reduce(s,{});E===!1&&($={});const{prevResolvedValues:F={}}=x,M={...F,...$},z=q=>{P=!0,p.delete(q),x.needsAnimating[q]=!0};for(const q in M){const B=$[q],J=F[q];g.hasOwnProperty(q)||(B!==J?Ac(B)&&Ac(J)?!z2(B,J)||k?z(q):x.protectedKeys[q]=!0:B!==void 0?z(q):p.add(q):B!==void 0&&p.has(q)?z(q):x.protectedKeys[q]=!0)}x.prevProp=_,x.prevResolvedValues=$,x.isActive&&(g={...g,...$}),r&&e.blockInitialAnimation&&(P=!1),P&&!C&&h.push(...O.map(q=>({animation:q,options:{type:m,...l}})))}if(p.size){const y={};p.forEach(m=>{const x=e.getBaseTarget(m);x!==void 0&&(y[m]=x)}),h.push({animation:y})}let w=!!h.length;return r&&d.initial===!1&&!e.manuallyAnimateOnMount&&(w=!1),r=!1,w?t(h):Promise.resolve()}function a(l,c,d){var f;if(n[l].isActive===c)return Promise.resolve();(f=e.variantChildren)===null||f===void 0||f.forEach(p=>{var g;return(g=p.animationState)===null||g===void 0?void 0:g.setActive(l,c)}),n[l].isActive=c;const h=o(d,l);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n}}function DO(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!z2(t,e):!1}function ms(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function MO(){return{animate:ms(!0),whileInView:ms(),whileHover:ms(),whileTap:ms(),whileDrag:ms(),whileFocus:ms(),exit:ms()}}class LO extends jo{constructor(t){super(t),t.animationState||(t.animationState=IO(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Ad(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){}}let FO=0;class UO extends jo{constructor(){super(...arguments),this.id=FO++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n,custom:r}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t,{custom:r??this.node.getProps().custom});n&&!t&&i.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const zO={animation:{Feature:LO},exit:{Feature:UO}},Q1=()=>({min:0,max:0}),wE=()=>({x:Q1(),y:Q1()});function VO({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function BO(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function HO(e,t){return VO(BO(e.getBoundingClientRect(),t))}const qO=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function WO(e){const t=qO.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function um(e,t,n=1){const[r,s]=WO(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);return i?i.trim():tm(s)?um(s,t,n+1):s}function KO(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach(s=>{const i=s.get();if(!tm(i))return;const o=um(i,r);o&&s.set(o)});for(const s in t){const i=t[s];if(!tm(i))continue;const o=um(i,r);o&&(t[s]=o,n||(n={}),n[s]===void 0&&(n[s]=i))}return{target:t,transitionEnd:n}}const QO=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),_E=e=>QO.has(e),GO=e=>Object.keys(e).some(_E),G1=e=>e===Js||e===ne,Y1=(e,t)=>parseFloat(e.split(", ")[t]),X1=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/);if(s)return Y1(s[1],t);{const i=r.match(/^matrix\((.+)\)$/);return i?Y1(i[1],e):0}},YO=new Set(["x","y","z"]),XO=xl.filter(e=>!YO.has(e));function JO(e){const t=[];return XO.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t.length&&e.render(),t}const no={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:X1(4,13),y:X1(5,14)};no.translateX=no.x;no.translateY=no.y;const ZO=(e,t,n)=>{const r=t.measureViewportBox(),s=t.current,i=getComputedStyle(s),{display:o}=i,a={};o==="none"&&t.setStaticValue("display",e.display||"block"),n.forEach(c=>{a[c]=no[c](r,i)}),t.render();const l=t.measureViewportBox();return n.forEach(c=>{const d=t.getValue(c);d&&d.jump(a[c]),e[c]=no[c](l,i)}),e},eA=(e,t,n={},r={})=>{t={...t},r={...r};const s=Object.keys(t).filter(_E);let i=[],o=!1;const a=[];if(s.forEach(l=>{const c=e.getValue(l);if(!e.hasValue(l))return;let d=n[l],f=Yo(d);const h=t[l];let p;if(Ac(h)){const g=h.length,b=h[0]===null?1:0;d=h[b],f=Yo(d);for(let w=b;w<g&&h[w]!==null;w++)p?Ry(Yo(h[w])===p):p=Yo(h[w])}else p=Yo(h);if(f!==p)if(G1(f)&&G1(p)){const g=c.get();typeof g=="string"&&c.set(parseFloat(g)),typeof h=="string"?t[l]=parseFloat(h):Array.isArray(h)&&p===ne&&(t[l]=h.map(parseFloat))}else f!=null&&f.transform&&(p!=null&&p.transform)&&(d===0||h===0)?d===0?c.set(p.transform(d)):t[l]=f.transform(h):(o||(i=JO(e),o=!0),a.push(l),r[l]=r[l]!==void 0?r[l]:t[l],c.jump(h))}),a.length){const l=a.indexOf("height")>=0?window.pageYOffset:null,c=ZO(t,e,a);return i.length&&i.forEach(([d,f])=>{e.getValue(d).set(f)}),e.render(),Od&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function tA(e,t,n,r){return GO(t)?eA(e,t,n,r):{target:t,transitionEnd:r}}const nA=(e,t,n,r)=>{const s=KO(e,t,r);return t=s.target,r=s.transitionEnd,tA(e,t,n,r)},cm={current:null},SE={current:!1};function rA(){if(SE.current=!0,!!Od)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>cm.current=e.matches;e.addListener(t),t()}else cm.current=!1}function sA(e,t,n){const{willChange:r}=t;for(const s in t){const i=t[s],o=n[s];if(Wt(i))e.addValue(s,i),Lc(r)&&r.add(s);else if(Wt(o))e.addValue(s,Wa(i,{owner:e})),Lc(r)&&r.remove(s);else if(o!==i)if(e.hasValue(s)){const a=e.getValue(s);!a.hasAnimated&&a.set(i)}else{const a=e.getStaticValue(s);e.addValue(s,Wa(a!==void 0?a:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const J1=new WeakMap,EE=Object.keys(qa),iA=EE.length,Z1=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],oA=wy.length;class aA{constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:s,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>At.render(this.render,!1,!0);const{latestValues:a,renderState:l}=i;this.latestValues=a,this.baseTarget={...a},this.initialValues=n.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=$d(n),this.isVariantNode=w2(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...d}=this.scrapeMotionValuesFromProps(n,{});for(const f in d){const h=d[f];a[f]!==void 0&&Wt(h)&&(h.set(a[f],!1),Lc(c)&&c.add(f))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,J1.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),SE.current||rA(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:cm.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){J1.delete(this.current),this.projection&&this.projection.unmount(),$c(this.notifyUpdate),$c(this.render),this.valueSubscriptions.forEach(t=>t()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features)this.features[t].unmount();this.current=null}bindToMotionValue(t,n){const r=Xs.has(t),s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&At.update(this.notifyUpdate,!1,!0),r&&this.projection&&(this.projection.isTransformDirty=!0)}),i=n.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,()=>{s(),i()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}loadFeatures({children:t,...n},r,s,i){let o,a;for(let l=0;l<iA;l++){const c=EE[l],{isEnabled:d,Feature:f,ProjectionNode:h,MeasureLayout:p}=qa[c];h&&(o=h),d(n)&&(!this.features[c]&&f&&(this.features[c]=new f(this)),p&&(a=p))}if(!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:l,layout:c,drag:d,dragConstraints:f,layoutScroll:h,layoutRoot:p}=n;this.projection.setOptions({layoutId:l,layout:c,alwaysMeasureLayout:!!d||f&&b2(f),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:typeof c=="string"?c:"both",initialPromotionConfig:i,layoutScroll:h,layoutRoot:p})}return a}updateFeatures(){for(const t in this.features){const n=this.features[t];n.isMounted?n.update():(n.mount(),n.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):wE()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}makeTargetAnimatable(t,n=!0){return this.makeTargetAnimatableFromInstance(t,this.props,n)}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Z1.length;r++){const s=Z1[r];this.propEventSubscriptions[s]&&(this.propEventSubscriptions[s](),delete this.propEventSubscriptions[s]);const i=t["on"+s];i&&(this.propEventSubscriptions[s]=this.on(s,i))}this.prevMotionValues=sA(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const r=this.parent?this.parent.getVariantContext()||{}:{};return this.props.initial!==void 0&&(r.initial=this.props.initial),r}const n={};for(let r=0;r<oA;r++){const s=wy[r],i=this.props[s];(Ha(i)||i===!1)&&(n[s]=i)}return n}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){n!==this.values.get(t)&&(this.removeValue(t),this.bindToMotionValue(t,n)),this.values.set(t,n),this.latestValues[t]=n.get()}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=Wa(n,{owner:this}),this.addValue(t,r)),r}readValue(t){var n;return this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(n=this.getBaseTargetFromProps(this.props,t))!==null&&n!==void 0?n:this.readValueFromInstance(this.current,t,this.options)}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props,s=typeof r=="string"||typeof r=="object"?(n=Py(this.props,r))===null||n===void 0?void 0:n[t]:void 0;if(r&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,t);return i!==void 0&&!Wt(i)?i:this.initialValues[t]!==void 0&&s===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new yE),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class CE extends aA{sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:n,...r},{transformValues:s},i){let o=kO(r,t||{},this);if(s&&(n&&(n=s(n)),r&&(r=s(r)),o&&(o=s(o))),i){CO(this,r,o);const a=nA(this,r,o,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function lA(e){return window.getComputedStyle(e)}class uA extends CE{readValueFromInstance(t,n){if(Xs.has(n)){const r=Ay(n);return r&&r.default||0}else{const r=lA(t),s=(C2(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return HO(t,n)}build(t,n,r,s){Sy(t,n,r,s.transformTemplate)}scrapeMotionValuesFromProps(t,n){return Ty(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Wt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,s){N2(t,n,r,s)}}class cA extends CE{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Xs.has(n)){const r=Ay(n);return r&&r.default||0}return n=O2.has(n)?n:ky(n),t.getAttribute(n)}measureInstanceViewportBox(){return wE()}scrapeMotionValuesFromProps(t,n){return $2(t,n)}build(t,n,r,s){Cy(t,n,r,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,r,s){A2(t,n,r,s)}mount(t){this.isSVGTag=jy(t.tagName),super.mount(t)}}const dA=(e,t)=>_y(e)?new cA(t,{enableHardwareAcceleration:!1}):new uA(t,{enableHardwareAcceleration:!0}),Sr=l3(L3);function jE(){const e=v.useRef(!1);return Nc(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function fA(){const e=jE(),[t,n]=v.useState(0),r=v.useCallback(()=>{e.current&&n(t+1)},[t]);return[v.useCallback(()=>At.postRender(r),[r]),t]}class hA extends v.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function pA({children:e,isPresent:t}){const n=v.useId(),r=v.useRef(null),s=v.useRef({width:0,height:0,top:0,left:0});return v.useInsertionEffect(()=>{const{width:i,height:o,top:a,left:l}=s.current;if(t||!r.current||!i||!o)return;r.current.dataset.motionPopId=n;const c=document.createElement("style");return document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`
          [data-motion-pop-id="${n}"] {
            position: absolute !important;
            width: ${i}px !important;
            height: ${o}px !important;
            top: ${a}px !important;
            left: ${l}px !important;
          }
        `),()=>{document.head.removeChild(c)}},[t]),v.createElement(hA,{isPresent:t,childRef:r,sizeRef:s},v.cloneElement(e,{ref:r}))}const dh=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=I2(mA),l=v.useId(),c=v.useMemo(()=>({id:l,initial:t,isPresent:n,custom:s,onExitComplete:d=>{a.set(d,!0);for(const f of a.values())if(!f)return;r&&r()},register:d=>(a.set(d,!1),()=>a.delete(d))}),i?void 0:[n]);return v.useMemo(()=>{a.forEach((d,f)=>a.set(f,!1))},[n]),v.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=v.createElement(pA,{isPresent:n},e)),v.createElement(vy.Provider,{value:c},e)};function mA(){return new Map}function gA(e){return v.useEffect(()=>()=>e(),[])}const ui=e=>e.key||"";function yA(e,t){e.forEach(n=>{const r=ui(n);t.set(r,n)})}function vA(e){const t=[];return v.Children.forEach(e,n=>{v.isValidElement(n)&&t.push(n)}),t}const To=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{const a=v.useContext(_2).forceRender||fA()[0],l=jE(),c=vA(e);let d=c;const f=v.useRef(new Map).current,h=v.useRef(d),p=v.useRef(new Map).current,g=v.useRef(!0);if(Nc(()=>{g.current=!1,yA(c,p),h.current=d}),gA(()=>{g.current=!0,p.clear(),f.clear()}),g.current)return v.createElement(v.Fragment,null,d.map(m=>v.createElement(dh,{key:ui(m),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:o},m)));d=[...d];const b=h.current.map(ui),w=c.map(ui),y=b.length;for(let m=0;m<y;m++){const x=b[m];w.indexOf(x)===-1&&!f.has(x)&&f.set(x,void 0)}return o==="wait"&&f.size&&(d=[]),f.forEach((m,x)=>{if(w.indexOf(x)!==-1)return;const _=p.get(x);if(!_)return;const S=b.indexOf(x);let E=m;if(!E){const C=()=>{p.delete(x),f.delete(x);const k=h.current.findIndex(P=>P.key===x);if(h.current.splice(k,1),!f.size){if(h.current=c,l.current===!1)return;a(),r&&r()}};E=v.createElement(dh,{key:ui(_),isPresent:!1,onExitComplete:C,custom:t,presenceAffectsLayout:i,mode:o},_),f.set(x,E)}d.splice(S,0,E)}),d=d.map(m=>{const x=m.key;return f.has(x)?m:v.createElement(dh,{key:ui(m),isPresent:!0,presenceAffectsLayout:i,mode:o},m)}),v.createElement(v.Fragment,null,f.size?d:d.map(m=>v.cloneElement(m)))};function xA({children:e,features:t,strict:n=!1}){const[,r]=v.useState(!fh(t)),s=v.useRef(void 0);if(!fh(t)){const{renderer:i,...o}=t;s.current=i,em(o)}return v.useEffect(()=>{fh(t)&&t().then(({renderer:i,...o})=>{em(o),s.current=i,r(!0)})},[]),v.createElement(xy.Provider,{value:{renderer:s.current,strict:n}},e)}function fh(e){return typeof e=="function"}const bA={renderer:dA,...zO,...nN};function kE(e,t){return function(){return e.apply(t,arguments)}}const{toString:wA}=Object.prototype,{getPrototypeOf:$y}=Object,Ld=(e=>t=>{const n=wA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Gn=e=>(e=e.toLowerCase(),t=>Ld(t)===e),Fd=e=>t=>typeof t===e,{isArray:Po}=Array,Ka=Fd("undefined");function _A(e){return e!==null&&!Ka(e)&&e.constructor!==null&&!Ka(e.constructor)&&cn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const TE=Gn("ArrayBuffer");function SA(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&TE(e.buffer),t}const EA=Fd("string"),cn=Fd("function"),PE=Fd("number"),Ud=e=>e!==null&&typeof e=="object",CA=e=>e===!0||e===!1,qu=e=>{if(Ld(e)!=="object")return!1;const t=$y(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},jA=Gn("Date"),kA=Gn("File"),TA=Gn("Blob"),PA=Gn("FileList"),RA=e=>Ud(e)&&cn(e.pipe),NA=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||cn(e.append)&&((t=Ld(e))==="formdata"||t==="object"&&cn(e.toString)&&e.toString()==="[object FormData]"))},OA=Gn("URLSearchParams"),AA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Sl(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Po(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{const i=n?Object.getOwnPropertyNames(e):Object.keys(e),o=i.length;let a;for(r=0;r<o;r++)a=i[r],t.call(null,e[a],a,e)}}function RE(e,t){t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const NE=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),OE=e=>!Ka(e)&&e!==NE;function dm(){const{caseless:e}=OE(this)&&this||{},t={},n=(r,s)=>{const i=e&&RE(t,s)||s;qu(t[i])&&qu(r)?t[i]=dm(t[i],r):qu(r)?t[i]=dm({},r):Po(r)?t[i]=r.slice():t[i]=r};for(let r=0,s=arguments.length;r<s;r++)arguments[r]&&Sl(arguments[r],n);return t}const $A=(e,t,n,{allOwnKeys:r}={})=>(Sl(t,(s,i)=>{n&&cn(s)?e[i]=kE(s,n):e[i]=s},{allOwnKeys:r}),e),IA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),DA=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},MA=(e,t,n,r)=>{let s,i,o;const a={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),i=s.length;i-- >0;)o=s[i],(!r||r(o,e,t))&&!a[o]&&(t[o]=e[o],a[o]=!0);e=n!==!1&&$y(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},LA=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},FA=e=>{if(!e)return null;if(Po(e))return e;let t=e.length;if(!PE(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},UA=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&$y(Uint8Array)),zA=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},VA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},BA=Gn("HTMLFormElement"),HA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),ex=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),qA=Gn("RegExp"),AE=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Sl(n,(s,i)=>{t(s,i,e)!==!1&&(r[i]=s)}),Object.defineProperties(e,r)},WA=e=>{AE(e,(t,n)=>{if(cn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(cn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},KA=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Po(e)?r(e):r(String(e).split(t)),n},QA=()=>{},GA=(e,t)=>(e=+e,Number.isFinite(e)?e:t),hh="abcdefghijklmnopqrstuvwxyz",tx="0123456789",$E={DIGIT:tx,ALPHA:hh,ALPHA_DIGIT:hh+hh.toUpperCase()+tx},YA=(e=16,t=$E.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function XA(e){return!!(e&&cn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const JA=e=>{const t=new Array(10),n=(r,s)=>{if(Ud(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[s]=r;const i=Po(r)?[]:{};return Sl(r,(o,a)=>{const l=n(o,s+1);!Ka(l)&&(i[a]=l)}),t[s]=void 0,i}}return r};return n(e,0)},ZA=Gn("AsyncFunction"),e5=e=>e&&(Ud(e)||cn(e))&&cn(e.then)&&cn(e.catch),N={isArray:Po,isArrayBuffer:TE,isBuffer:_A,isFormData:NA,isArrayBufferView:SA,isString:EA,isNumber:PE,isBoolean:CA,isObject:Ud,isPlainObject:qu,isUndefined:Ka,isDate:jA,isFile:kA,isBlob:TA,isRegExp:qA,isFunction:cn,isStream:RA,isURLSearchParams:OA,isTypedArray:UA,isFileList:PA,forEach:Sl,merge:dm,extend:$A,trim:AA,stripBOM:IA,inherits:DA,toFlatObject:MA,kindOf:Ld,kindOfTest:Gn,endsWith:LA,toArray:FA,forEachEntry:zA,matchAll:VA,isHTMLForm:BA,hasOwnProperty:ex,hasOwnProp:ex,reduceDescriptors:AE,freezeMethods:WA,toObjectSet:KA,toCamelCase:HA,noop:QA,toFiniteNumber:GA,findKey:RE,global:NE,isContextDefined:OE,ALPHABET:$E,generateString:YA,isSpecCompliantForm:XA,toJSONObject:JA,isAsyncFn:ZA,isThenable:e5};function le(e,t,n,r,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),s&&(this.response=s)}N.inherits(le,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:N.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const IE=le.prototype,DE={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{DE[e]={value:e}});Object.defineProperties(le,DE);Object.defineProperty(IE,"isAxiosError",{value:!0});le.from=(e,t,n,r,s,i)=>{const o=Object.create(IE);return N.toFlatObject(e,o,function(l){return l!==Error.prototype},a=>a!=="isAxiosError"),le.call(o,e.message,t,n,r,s),o.cause=e,o.name=e.name,i&&Object.assign(o,i),o};const t5=null;function fm(e){return N.isPlainObject(e)||N.isArray(e)}function ME(e){return N.endsWith(e,"[]")?e.slice(0,-2):e}function nx(e,t,n){return e?e.concat(t).map(function(s,i){return s=ME(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function n5(e){return N.isArray(e)&&!e.some(fm)}const r5=N.toFlatObject(N,{},null,function(t){return/^is[A-Z]/.test(t)});function zd(e,t,n){if(!N.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=N.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,w){return!N.isUndefined(w[b])});const r=n.metaTokens,s=n.visitor||d,i=n.dots,o=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(t);if(!N.isFunction(s))throw new TypeError("visitor must be a function");function c(g){if(g===null)return"";if(N.isDate(g))return g.toISOString();if(!l&&N.isBlob(g))throw new le("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(g)||N.isTypedArray(g)?l&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function d(g,b,w){let y=g;if(g&&!w&&typeof g=="object"){if(N.endsWith(b,"{}"))b=r?b:b.slice(0,-2),g=JSON.stringify(g);else if(N.isArray(g)&&n5(g)||(N.isFileList(g)||N.endsWith(b,"[]"))&&(y=N.toArray(g)))return b=ME(b),y.forEach(function(x,_){!(N.isUndefined(x)||x===null)&&t.append(o===!0?nx([b],_,i):o===null?b:b+"[]",c(x))}),!1}return fm(g)?!0:(t.append(nx(w,b,i),c(g)),!1)}const f=[],h=Object.assign(r5,{defaultVisitor:d,convertValue:c,isVisitable:fm});function p(g,b){if(!N.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+b.join("."));f.push(g),N.forEach(g,function(y,m){(!(N.isUndefined(y)||y===null)&&s.call(t,y,N.isString(m)?m.trim():m,b,h))===!0&&p(y,b?b.concat(m):[m])}),f.pop()}}if(!N.isObject(e))throw new TypeError("data must be an object");return p(e),t}function rx(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Iy(e,t){this._pairs=[],e&&zd(e,this,t)}const LE=Iy.prototype;LE.append=function(t,n){this._pairs.push([t,n])};LE.toString=function(t){const n=t?function(r){return t.call(this,r,rx)}:rx;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function s5(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function FE(e,t,n){if(!t)return e;const r=n&&n.encode||s5,s=n&&n.serialize;let i;if(s?i=s(t,n):i=N.isURLSearchParams(t)?t.toString():new Iy(t,n).toString(r),i){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+i}return e}class i5{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){N.forEach(this.handlers,function(r){r!==null&&t(r)})}}const sx=i5,UE={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},o5=typeof URLSearchParams<"u"?URLSearchParams:Iy,a5=typeof FormData<"u"?FormData:null,l5=typeof Blob<"u"?Blob:null,u5=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),c5=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),zn={isBrowser:!0,classes:{URLSearchParams:o5,FormData:a5,Blob:l5},isStandardBrowserEnv:u5,isStandardBrowserWebWorkerEnv:c5,protocols:["http","https","file","blob","url","data"]};function d5(e,t){return zd(e,new zn.classes.URLSearchParams,Object.assign({visitor:function(n,r,s,i){return zn.isNode&&N.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)}},t))}function f5(e){return N.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function h5(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r<s;r++)i=n[r],t[i]=e[i];return t}function zE(e){function t(n,r,s,i){let o=n[i++];const a=Number.isFinite(+o),l=i>=n.length;return o=!o&&N.isArray(s)?s.length:o,l?(N.hasOwnProp(s,o)?s[o]=[s[o],r]:s[o]=r,!a):((!s[o]||!N.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&N.isArray(s[o])&&(s[o]=h5(s[o])),!a)}if(N.isFormData(e)&&N.isFunction(e.entries)){const n={};return N.forEachEntry(e,(r,s)=>{t(f5(r),s,n,0)}),n}return null}const p5={"Content-Type":void 0};function m5(e,t,n){if(N.isString(e))try{return(t||JSON.parse)(e),N.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Vd={transitional:UE,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=N.isObject(t);if(i&&N.isHTMLForm(t)&&(t=new FormData(t)),N.isFormData(t))return s&&s?JSON.stringify(zE(t)):t;if(N.isArrayBuffer(t)||N.isBuffer(t)||N.isStream(t)||N.isFile(t)||N.isBlob(t))return t;if(N.isArrayBufferView(t))return t.buffer;if(N.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){if(r.indexOf("application/x-www-form-urlencoded")>-1)return d5(t,this.formSerializer).toString();if((a=N.isFileList(t))||r.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return zd(a?{"files[]":t}:t,l&&new l,this.formSerializer)}}return i||s?(n.setContentType("application/json",!1),m5(t)):t}],transformResponse:[function(t){const n=this.transitional||Vd.transitional,r=n&&n.forcedJSONParsing,s=this.responseType==="json";if(t&&N.isString(t)&&(r&&!this.responseType||s)){const o=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t)}catch(a){if(o)throw a.name==="SyntaxError"?le.from(a,le.ERR_BAD_RESPONSE,this,null,this.response):a}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:zn.classes.FormData,Blob:zn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};N.forEach(["delete","get","head"],function(t){Vd.headers[t]={}});N.forEach(["post","put","patch"],function(t){Vd.headers[t]=N.merge(p5)});const Dy=Vd,g5=N.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),y5=e=>{const t={};let n,r,s;return e&&e.split(`
`).forEach(function(o){s=o.indexOf(":"),n=o.substring(0,s).trim().toLowerCase(),r=o.substring(s+1).trim(),!(!n||t[n]&&g5[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},ix=Symbol("internals");function Xo(e){return e&&String(e).trim().toLowerCase()}function Wu(e){return e===!1||e==null?e:N.isArray(e)?e.map(Wu):String(e)}function v5(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const x5=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ph(e,t,n,r,s){if(N.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!N.isString(t)){if(N.isString(r))return t.indexOf(r)!==-1;if(N.isRegExp(r))return r.test(t)}}function b5(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function w5(e,t){const n=N.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}class Bd{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,c){const d=Xo(l);if(!d)throw new Error("header name must be a non-empty string");const f=N.findKey(s,d);(!f||s[f]===void 0||c===!0||c===void 0&&s[f]!==!1)&&(s[f||l]=Wu(a))}const o=(a,l)=>N.forEach(a,(c,d)=>i(c,d,l));return N.isPlainObject(t)||t instanceof this.constructor?o(t,n):N.isString(t)&&(t=t.trim())&&!x5(t)?o(y5(t),n):t!=null&&i(n,t,r),this}get(t,n){if(t=Xo(t),t){const r=N.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return v5(s);if(N.isFunction(n))return n.call(this,s,r);if(N.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Xo(t),t){const r=N.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ph(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=Xo(o),o){const a=N.findKey(r,o);a&&(!n||ph(r,r[a],a,n))&&(delete r[a],s=!0)}}return N.isArray(t)?t.forEach(i):i(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const i=n[r];(!t||ph(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return N.forEach(this,(s,i)=>{const o=N.findKey(r,i);if(o){n[o]=Wu(s),delete n[i];return}const a=t?b5(i):String(i).trim();a!==i&&delete n[i],n[a]=Wu(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return N.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&N.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(s=>r.set(s)),r}static accessor(t){const r=(this[ix]=this[ix]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Xo(o);r[a]||(w5(s,o),r[a]=!0)}return N.isArray(t)?t.forEach(i):i(t),this}}Bd.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);N.freezeMethods(Bd.prototype);N.freezeMethods(Bd);const hr=Bd;function mh(e,t){const n=this||Dy,r=t||n,s=hr.from(r.headers);let i=r.data;return N.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function VE(e){return!!(e&&e.__CANCEL__)}function El(e,t,n){le.call(this,e??"canceled",le.ERR_CANCELED,t,n),this.name="CanceledError"}N.inherits(El,le,{__CANCEL__:!0});function _5(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new le("Request failed with status code "+n.status,[le.ERR_BAD_REQUEST,le.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const S5=zn.isStandardBrowserEnv?function(){return{write:function(n,r,s,i,o,a){const l=[];l.push(n+"="+encodeURIComponent(r)),N.isNumber(s)&&l.push("expires="+new Date(s).toGMTString()),N.isString(i)&&l.push("path="+i),N.isString(o)&&l.push("domain="+o),a===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function E5(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function C5(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function BE(e,t){return e&&!E5(t)?C5(e,t):t}const j5=zn.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function s(i){let o=i;return t&&(n.setAttribute("href",o),o=n.href),n.setAttribute("href",o),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=s(window.location.href),function(o){const a=N.isString(o)?s(o):o;return a.protocol===r.protocol&&a.host===r.host}}():function(){return function(){return!0}}();function k5(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function T5(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,i=0,o;return t=t!==void 0?t:1e3,function(l){const c=Date.now(),d=r[i];o||(o=c),n[s]=l,r[s]=c;let f=i,h=0;for(;f!==s;)h+=n[f++],f=f%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o<t)return;const p=d&&c-d;return p?Math.round(h*1e3/p):void 0}}function ox(e,t){let n=0;const r=T5(50,250);return s=>{const i=s.loaded,o=s.lengthComputable?s.total:void 0,a=i-n,l=r(a),c=i<=o;n=i;const d={loaded:i,total:o,progress:o?i/o:void 0,bytes:a,rate:l||void 0,estimated:l&&o&&c?(o-i)/l:void 0,event:s};d[t?"download":"upload"]=!0,e(d)}}const P5=typeof XMLHttpRequest<"u",R5=P5&&function(e){return new Promise(function(n,r){let s=e.data;const i=hr.from(e.headers).normalize(),o=e.responseType;let a;function l(){e.cancelToken&&e.cancelToken.unsubscribe(a),e.signal&&e.signal.removeEventListener("abort",a)}N.isFormData(s)&&(zn.isStandardBrowserEnv||zn.isStandardBrowserWebWorkerEnv?i.setContentType(!1):i.setContentType("multipart/form-data;",!1));let c=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";i.set("Authorization","Basic "+btoa(p+":"+g))}const d=BE(e.baseURL,e.url);c.open(e.method.toUpperCase(),FE(d,e.params,e.paramsSerializer),!0),c.timeout=e.timeout;function f(){if(!c)return;const p=hr.from("getAllResponseHeaders"in c&&c.getAllResponseHeaders()),b={data:!o||o==="text"||o==="json"?c.responseText:c.response,status:c.status,statusText:c.statusText,headers:p,config:e,request:c};_5(function(y){n(y),l()},function(y){r(y),l()},b),c=null}if("onloadend"in c?c.onloadend=f:c.onreadystatechange=function(){!c||c.readyState!==4||c.status===0&&!(c.responseURL&&c.responseURL.indexOf("file:")===0)||setTimeout(f)},c.onabort=function(){c&&(r(new le("Request aborted",le.ECONNABORTED,e,c)),c=null)},c.onerror=function(){r(new le("Network Error",le.ERR_NETWORK,e,c)),c=null},c.ontimeout=function(){let g=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const b=e.transitional||UE;e.timeoutErrorMessage&&(g=e.timeoutErrorMessage),r(new le(g,b.clarifyTimeoutError?le.ETIMEDOUT:le.ECONNABORTED,e,c)),c=null},zn.isStandardBrowserEnv){const p=(e.withCredentials||j5(d))&&e.xsrfCookieName&&S5.read(e.xsrfCookieName);p&&i.set(e.xsrfHeaderName,p)}s===void 0&&i.setContentType(null),"setRequestHeader"in c&&N.forEach(i.toJSON(),function(g,b){c.setRequestHeader(b,g)}),N.isUndefined(e.withCredentials)||(c.withCredentials=!!e.withCredentials),o&&o!=="json"&&(c.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&c.addEventListener("progress",ox(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&c.upload&&c.upload.addEventListener("progress",ox(e.onUploadProgress)),(e.cancelToken||e.signal)&&(a=p=>{c&&(r(!p||p.type?new El(null,e,c):p),c.abort(),c=null)},e.cancelToken&&e.cancelToken.subscribe(a),e.signal&&(e.signal.aborted?a():e.signal.addEventListener("abort",a)));const h=k5(d);if(h&&zn.protocols.indexOf(h)===-1){r(new le("Unsupported protocol "+h+":",le.ERR_BAD_REQUEST,e));return}c.send(s||null)})},Ku={http:t5,xhr:R5};N.forEach(Ku,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const N5={getAdapter:e=>{e=N.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let s=0;s<t&&(n=e[s],!(r=N.isString(n)?Ku[n.toLowerCase()]:n));s++);if(!r)throw r===!1?new le(`Adapter ${n} is not supported by the environment`,"ERR_NOT_SUPPORT"):new Error(N.hasOwnProp(Ku,n)?`Adapter '${n}' is not available in the build`:`Unknown adapter '${n}'`);if(!N.isFunction(r))throw new TypeError("adapter is not a function");return r},adapters:Ku};function gh(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new El(null,e)}function ax(e){return gh(e),e.headers=hr.from(e.headers),e.data=mh.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),N5.getAdapter(e.adapter||Dy.adapter)(e).then(function(r){return gh(e),r.data=mh.call(e,e.transformResponse,r),r.headers=hr.from(r.headers),r},function(r){return VE(r)||(gh(e),r&&r.response&&(r.response.data=mh.call(e,e.transformResponse,r.response),r.response.headers=hr.from(r.response.headers))),Promise.reject(r)})}const lx=e=>e instanceof hr?e.toJSON():e;function ro(e,t){t=t||{};const n={};function r(c,d,f){return N.isPlainObject(c)&&N.isPlainObject(d)?N.merge.call({caseless:f},c,d):N.isPlainObject(d)?N.merge({},d):N.isArray(d)?d.slice():d}function s(c,d,f){if(N.isUndefined(d)){if(!N.isUndefined(c))return r(void 0,c,f)}else return r(c,d,f)}function i(c,d){if(!N.isUndefined(d))return r(void 0,d)}function o(c,d){if(N.isUndefined(d)){if(!N.isUndefined(c))return r(void 0,c)}else return r(void 0,d)}function a(c,d,f){if(f in t)return r(c,d);if(f in e)return r(void 0,c)}const l={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:a,headers:(c,d)=>s(lx(c),lx(d),!0)};return N.forEach(Object.keys(Object.assign({},e,t)),function(d){const f=l[d]||s,h=f(e[d],t[d],d);N.isUndefined(h)&&f!==a||(n[d]=h)}),n}const HE="1.4.0",My={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{My[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const ux={};My.transitional=function(t,n,r){function s(i,o){return"[Axios v"+HE+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new le(s(o," has been removed"+(n?" in "+n:"")),le.ERR_DEPRECATED);return n&&!ux[o]&&(ux[o]=!0,console.warn(s(o," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(i,o,a):!0}};function O5(e,t,n){if(typeof e!="object")throw new le("options must be an object",le.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=t[i];if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new le("option "+i+" must be "+l,le.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new le("Unknown option "+i,le.ERR_BAD_OPTION)}}const hm={assertOptions:O5,validators:My},Pr=hm.validators;class Fc{constructor(t){this.defaults=t,this.interceptors={request:new sx,response:new sx}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ro(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&hm.assertOptions(r,{silentJSONParsing:Pr.transitional(Pr.boolean),forcedJSONParsing:Pr.transitional(Pr.boolean),clarifyTimeoutError:Pr.transitional(Pr.boolean)},!1),s!=null&&(N.isFunction(s)?n.paramsSerializer={serialize:s}:hm.assertOptions(s,{encode:Pr.function,serialize:Pr.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o;o=i&&N.merge(i.common,i[n.method]),o&&N.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=hr.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(n)===!1||(l=l&&b.synchronous,a.unshift(b.fulfilled,b.rejected))});const c=[];this.interceptors.response.forEach(function(b){c.push(b.fulfilled,b.rejected)});let d,f=0,h;if(!l){const g=[ax.bind(this),void 0];for(g.unshift.apply(g,a),g.push.apply(g,c),h=g.length,d=Promise.resolve(n);f<h;)d=d.then(g[f++],g[f++]);return d}h=a.length;let p=n;for(f=0;f<h;){const g=a[f++],b=a[f++];try{p=g(p)}catch(w){b.call(this,w);break}}try{d=ax.call(this,p)}catch(g){return Promise.reject(g)}for(f=0,h=c.length;f<h;)d=d.then(c[f++],c[f++]);return d}getUri(t){t=ro(this.defaults,t);const n=BE(t.baseURL,t.url);return FE(n,t.params,t.paramsSerializer)}}N.forEach(["delete","get","head","options"],function(t){Fc.prototype[t]=function(n,r){return this.request(ro(r||{},{method:t,url:n,data:(r||{}).data}))}});N.forEach(["post","put","patch"],function(t){function n(r){return function(i,o,a){return this.request(ro(a||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:i,data:o}))}}Fc.prototype[t]=n(),Fc.prototype[t+"Form"]=n(!0)});const Qu=Fc;class Ly{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const r=this;this.promise.then(s=>{if(!r._listeners)return;let i=r._listeners.length;for(;i-- >0;)r._listeners[i](s);r._listeners=null}),this.promise.then=s=>{let i;const o=new Promise(a=>{r.subscribe(a),i=a}).then(s);return o.cancel=function(){r.unsubscribe(i)},o},t(function(i,o,a){r.reason||(r.reason=new El(i,o,a),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Ly(function(s){t=s}),cancel:t}}}const A5=Ly;function $5(e){return function(n){return e.apply(null,n)}}function I5(e){return N.isObject(e)&&e.isAxiosError===!0}const pm={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(pm).forEach(([e,t])=>{pm[t]=e});const D5=pm;function qE(e){const t=new Qu(e),n=kE(Qu.prototype.request,t);return N.extend(n,Qu.prototype,t,{allOwnKeys:!0}),N.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return qE(ro(e,s))},n}const Je=qE(Dy);Je.Axios=Qu;Je.CanceledError=El;Je.CancelToken=A5;Je.isCancel=VE;Je.VERSION=HE;Je.toFormData=zd;Je.AxiosError=le;Je.Cancel=Je.CanceledError;Je.all=function(t){return Promise.all(t)};Je.spread=$5;Je.isAxiosError=I5;Je.mergeConfig=ro;Je.AxiosHeaders=hr;Je.formToJSON=e=>zE(N.isHTMLForm(e)?new FormData(e):e);Je.HttpStatusCode=D5;Je.default=Je;const Er=Je;let WE=0;function KE(){return WE}function cx(e){WE=e}function Cl(e){return e?/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(e):!1}function Ii(e,t){var n;return Er.isAxiosError(e)&&((n=e.response)==null?void 0:n.status)==t}const ze=new jR({defaultOptions:{queries:{staleTime:3e4,retry:(e,t)=>!Ii(t,401)&&!Ii(t,403)&&!Ii(t,404)&&e<2}}}),Z=Er.create();Z.defaults.withCredentials=!0;Z.defaults.responseType="json";Z.defaults.headers={common:{Accept:"application/json"}};Z.interceptors.request.use(e=>{var r,s,i,o,a,l,c;!((r=e.url)!=null&&r.startsWith("auth"))&&!((s=e.url)!=null&&s.startsWith("secure"))&&!Cl(e==null?void 0:e.url)&&(e.url=`api/v1/${e.url}`);const t=(i=e.method)==null?void 0:i.toUpperCase();t==="GET"&&Array.isArray((o=e.params)==null?void 0:o.with)&&(e.params.with=e.params.with.join(",")),t==="GET"&&Array.isArray((a=e.params)==null?void 0:a.load)&&(e.params.load=e.params.load.join(",")),t==="GET"&&Array.isArray((l=e.params)==null?void 0:l.loadCount)&&(e.params.loadCount=e.params.loadCount.join(","));const n=KE();if(n){const d=(c=e.method)==null?void 0:c.toLowerCase();["get","post","put"].includes(d)&&(e.params={...e.params,workspaceId:n})}return(t==="PUT"||t==="DELETE"||t==="PATCH")&&(e.headers={...e.headers,"X-HTTP-Method-Override":t},e.method="POST",e.params={...e.params,_method:t}),e});const jl=V.createContext(null);function ie(e,t){return{...t,message:e}}const M5=""+new URL("general_top-26f8c7f2.jpg",import.meta.url).href,L5=""+new URL("title_top-10fd7c9b.jpg",import.meta.url).href,F5=""+new URL("person_top-57e57d80.jpg",import.meta.url).href,U5=""+new URL("general_bottom-e27cf306.jpg",import.meta.url).href,z5=""+new URL("watch_top-6272eec3.jpg",import.meta.url).href;var QE={exports:{}};(function(e,t){(function(n,r,s){e.exports=s(),e.exports.default=s()})("slugify",rc,function(){var n=JSON.parse(`{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","¢":"cent","£":"pound","¤":"currency","¥":"yen","©":"(c)","ª":"a","®":"(r)","º":"o","À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","Æ":"AE","Ç":"C","È":"E","É":"E","Ê":"E","Ë":"E","Ì":"I","Í":"I","Î":"I","Ï":"I","Ð":"D","Ñ":"N","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","Ù":"U","Ú":"U","Û":"U","Ü":"U","Ý":"Y","Þ":"TH","ß":"ss","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","æ":"ae","ç":"c","è":"e","é":"e","ê":"e","ë":"e","ì":"i","í":"i","î":"i","ï":"i","ð":"d","ñ":"n","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","ù":"u","ú":"u","û":"u","ü":"u","ý":"y","þ":"th","ÿ":"y","Ā":"A","ā":"a","Ă":"A","ă":"a","Ą":"A","ą":"a","Ć":"C","ć":"c","Č":"C","č":"c","Ď":"D","ď":"d","Đ":"DJ","đ":"dj","Ē":"E","ē":"e","Ė":"E","ė":"e","Ę":"e","ę":"e","Ě":"E","ě":"e","Ğ":"G","ğ":"g","Ģ":"G","ģ":"g","Ĩ":"I","ĩ":"i","Ī":"i","ī":"i","Į":"I","į":"i","İ":"I","ı":"i","Ķ":"k","ķ":"k","Ļ":"L","ļ":"l","Ľ":"L","ľ":"l","Ł":"L","ł":"l","Ń":"N","ń":"n","Ņ":"N","ņ":"n","Ň":"N","ň":"n","Ō":"O","ō":"o","Ő":"O","ő":"o","Œ":"OE","œ":"oe","Ŕ":"R","ŕ":"r","Ř":"R","ř":"r","Ś":"S","ś":"s","Ş":"S","ş":"s","Š":"S","š":"s","Ţ":"T","ţ":"t","Ť":"T","ť":"t","Ũ":"U","ũ":"u","Ū":"u","ū":"u","Ů":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","ź":"z","Ż":"Z","ż":"z","Ž":"Z","ž":"z","Ə":"E","ƒ":"f","Ơ":"O","ơ":"o","Ư":"U","ư":"u","Lj":"LJ","lj":"lj","Nj":"NJ","nj":"nj","Ș":"S","ș":"s","Ț":"T","ț":"t","ə":"e","˚":"o","Ά":"A","Έ":"E","Ή":"H","Ί":"I","Ό":"O","Ύ":"Y","Ώ":"W","ΐ":"i","Α":"A","Β":"B","Γ":"G","Δ":"D","Ε":"E","Ζ":"Z","Η":"H","Θ":"8","Ι":"I","Κ":"K","Λ":"L","Μ":"M","Ν":"N","Ξ":"3","Ο":"O","Π":"P","Ρ":"R","Σ":"S","Τ":"T","Υ":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","έ":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","π":"p","ρ":"r","ς":"s","σ":"s","τ":"t","υ":"y","φ":"f","χ":"x","ψ":"ps","ω":"w","ϊ":"i","ϋ":"y","ό":"o","ύ":"y","ώ":"w","Ё":"Yo","Ђ":"DJ","Є":"Ye","І":"I","Ї":"Yi","Ј":"J","Љ":"LJ","Њ":"NJ","Ћ":"C","Џ":"DZ","А":"A","Б":"B","В":"V","Г":"G","Д":"D","Е":"E","Ж":"Zh","З":"Z","И":"I","Й":"J","К":"K","Л":"L","М":"M","Н":"N","О":"O","П":"P","Р":"R","С":"S","Т":"T","У":"U","Ф":"F","Х":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Э":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","р":"r","с":"s","т":"t","у":"u","ф":"f","х":"h","ц":"c","ч":"ch","ш":"sh","щ":"sh","ъ":"u","ы":"y","ь":"","э":"e","ю":"yu","я":"ya","ё":"yo","ђ":"dj","є":"ye","і":"i","ї":"yi","ј":"j","љ":"lj","њ":"nj","ћ":"c","ѝ":"u","џ":"dz","Ґ":"G","ґ":"g","Ғ":"GH","ғ":"gh","Қ":"KH","қ":"kh","Ң":"NG","ң":"ng","Ү":"UE","ү":"ue","Ұ":"U","ұ":"u","Һ":"H","һ":"h","Ә":"AE","ә":"ae","Ө":"OE","ө":"oe","Ա":"A","Բ":"B","Գ":"G","Դ":"D","Ե":"E","Զ":"Z","Է":"E'","Ը":"Y'","Թ":"T'","Ժ":"JH","Ի":"I","Լ":"L","Խ":"X","Ծ":"C'","Կ":"K","Հ":"H","Ձ":"D'","Ղ":"GH","Ճ":"TW","Մ":"M","Յ":"Y","Ն":"N","Շ":"SH","Չ":"CH","Պ":"P","Ջ":"J","Ռ":"R'","Ս":"S","Վ":"V","Տ":"T","Ր":"R","Ց":"C","Փ":"P'","Ք":"Q'","Օ":"O''","Ֆ":"F","և":"EV","ء":"a","آ":"aa","أ":"a","ؤ":"u","إ":"i","ئ":"e","ا":"a","ب":"b","ة":"h","ت":"t","ث":"th","ج":"j","ح":"h","خ":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","ش":"sh","ص":"s","ض":"dh","ط":"t","ظ":"z","ع":"a","غ":"gh","ف":"f","ق":"q","ك":"k","ل":"l","م":"m","ن":"n","ه":"h","و":"w","ى":"a","ي":"y","ً":"an","ٌ":"on","ٍ":"en","َ":"a","ُ":"u","ِ":"e","ْ":"","٠":"0","١":"1","٢":"2","٣":"3","٤":"4","٥":"5","٦":"6","٧":"7","٨":"8","٩":"9","پ":"p","چ":"ch","ژ":"zh","ک":"k","گ":"g","ی":"y","۰":"0","۱":"1","۲":"2","۳":"3","۴":"4","۵":"5","۶":"6","۷":"7","۸":"8","۹":"9","฿":"baht","ა":"a","ბ":"b","გ":"g","დ":"d","ე":"e","ვ":"v","ზ":"z","თ":"t","ი":"i","კ":"k","ლ":"l","მ":"m","ნ":"n","ო":"o","პ":"p","ჟ":"zh","რ":"r","ს":"s","ტ":"t","უ":"u","ფ":"f","ქ":"k","ღ":"gh","ყ":"q","შ":"sh","ჩ":"ch","ც":"ts","ძ":"dz","წ":"ts","ჭ":"ch","ხ":"kh","ჯ":"j","ჰ":"h","Ṣ":"S","ṣ":"s","Ẁ":"W","ẁ":"w","Ẃ":"W","ẃ":"w","Ẅ":"W","ẅ":"w","ẞ":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","ậ":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","Ề":"E","ề":"e","Ể":"E","ể":"e","Ễ":"E","ễ":"e","Ệ":"E","ệ":"e","Ỉ":"I","ỉ":"i","Ị":"I","ị":"i","Ọ":"O","ọ":"o","Ỏ":"O","ỏ":"o","Ố":"O","ố":"o","Ồ":"O","ồ":"o","Ổ":"O","ổ":"o","Ỗ":"O","ỗ":"o","Ộ":"O","ộ":"o","Ớ":"O","ớ":"o","Ờ":"O","ờ":"o","Ở":"O","ở":"o","Ỡ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","ủ":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","ử":"u","Ữ":"U","ữ":"u","Ự":"U","ự":"u","Ỳ":"Y","ỳ":"y","Ỵ":"Y","ỵ":"y","Ỷ":"Y","ỷ":"y","Ỹ":"Y","ỹ":"y","–":"-","‘":"'","’":"'","“":"\\"","”":"\\"","„":"\\"","†":"+","•":"*","…":"...","₠":"ecu","₢":"cruzeiro","₣":"french franc","₤":"lira","₥":"mill","₦":"naira","₧":"peseta","₨":"rupee","₩":"won","₪":"new shequel","₫":"dong","€":"euro","₭":"kip","₮":"tugrik","₯":"drachma","₰":"penny","₱":"peso","₲":"guarani","₳":"austral","₴":"hryvnia","₵":"cedi","₸":"kazakhstani tenge","₹":"indian rupee","₺":"turkish lira","₽":"russian ruble","₿":"bitcoin","℠":"sm","™":"tm","∂":"d","∆":"delta","∑":"sum","∞":"infinity","♥":"love","元":"yuan","円":"yen","﷼":"rial","ﻵ":"laa","ﻷ":"laa","ﻹ":"lai","ﻻ":"la"}`),r=JSON.parse('{"bg":{"Й":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","ц":"ts","щ":"sht","ъ":"a","ь":"y"},"de":{"Ä":"AE","ä":"ae","Ö":"OE","ö":"oe","Ü":"UE","ü":"ue","ß":"ss","%":"prozent","&":"und","|":"oder","∑":"summe","∞":"unendlich","♥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","¢":"centavos","£":"libras","¤":"moneda","₣":"francos","∑":"suma","∞":"infinito","♥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","¢":"centime","£":"livre","¤":"devise","₣":"franc","∑":"somme","∞":"infini","♥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","¢":"centavo","∑":"soma","£":"libra","∞":"infinito","♥":"amor"},"uk":{"И":"Y","и":"y","Й":"Y","й":"y","Ц":"Ts","ц":"ts","Х":"Kh","х":"kh","Щ":"Shch","щ":"shch","Г":"H","г":"h"},"vi":{"Đ":"D","đ":"d"},"da":{"Ø":"OE","ø":"oe","Å":"AA","å":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"større end"},"nb":{"&":"og","Å":"AA","Æ":"AE","Ø":"OE","å":"aa","æ":"ae","ø":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","Å":"AA","Ä":"AE","Ö":"OE","å":"aa","ä":"ae","ö":"oe"}}');function s(i,o){if(typeof i!="string")throw new Error("slugify: string argument expected");o=typeof o=="string"?{replacement:o}:o||{};var a=r[o.locale]||{},l=o.replacement===void 0?"-":o.replacement,c=o.trim===void 0?!0:o.trim,d=i.normalize().split("").reduce(function(f,h){var p=a[h];return p===void 0&&(p=n[h]),p===void 0&&(p=h),p===l&&(p=" "),f+p.replace(o.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return o.strict&&(d=d.replace(/[^A-Za-z0-9\s]/g,"")),c&&(d=d.trim()),d=d.replace(/\s+/g,l),o.lower&&(d=d.toLowerCase()),d}return s.extend=function(i){Object.assign(n,i)},s})})(QE);var V5=QE.exports;const B5=Qn(V5);function H5(e,t="-",n=!1){if(!e)return e;let r=B5(e,{lower:!0,replacement:t,strict:n,remove:/[*+~.()'"!:@?\|/\\]/g});return r||(r=e.replace(/\s+/g,"-").toLowerCase()),r}function q5(e){return`/user/${e.id}/${H5(e.display_name)}`}const W5={homepage:{options:[{label:ie("Landing page"),value:"landingPage"}]},auth:{redirectUri:"/",adminRedirectUri:"/admin",getUserProfileLink:q5},admin:{ads:[{image:M5,slot:"ads.general_top",description:ie("Appears at the top of most pages. Best size <= 150px height or responsive.")},{image:U5,slot:"ads.general_bottom",description:ie("Appears at the bottom of most pages. Best size <= 150px height or responsive.")},{image:L5,slot:"ads.title_top",description:ie("Appears in title page only (after plot summary). Best size <= 850px width or responsive.")},{image:F5,slot:"ads.person_top",description:ie("Appears in person page only (after biography). Best size <= 850px width or responsive.")},{image:z5,slot:"ads.watch_top",description:ie("Appears in watch page only (below video player). Best size is as wide as possible or responsive.")}]}};var K5=function(t){return Q5(t)&&!G5(t)};function Q5(e){return!!e&&typeof e=="object"}function G5(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||J5(e)}var Y5=typeof Symbol=="function"&&Symbol.for,X5=Y5?Symbol.for("react.element"):60103;function J5(e){return e.$$typeof===X5}function Z5(e){return Array.isArray(e)?[]:{}}function Qa(e,t){return t.clone!==!1&&t.isMergeableObject(e)?so(Z5(e),e,t):e}function e$(e,t,n){return e.concat(t).map(function(r){return Qa(r,n)})}function t$(e,t){if(!t.customMerge)return so;var n=t.customMerge(e);return typeof n=="function"?n:so}function n$(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function dx(e){return Object.keys(e).concat(n$(e))}function GE(e,t){try{return t in e}catch{return!1}}function r$(e,t){return GE(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function s$(e,t,n){var r={};return n.isMergeableObject(e)&&dx(e).forEach(function(s){r[s]=Qa(e[s],n)}),dx(t).forEach(function(s){r$(e,s)||(GE(e,s)&&n.isMergeableObject(t[s])?r[s]=t$(s,n)(e[s],t[s],n):r[s]=Qa(t[s],n))}),r}function so(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||e$,n.isMergeableObject=n.isMergeableObject||K5,n.cloneUnlessOtherwiseSpecified=Qa;var r=Array.isArray(t),s=Array.isArray(e),i=r===s;return i?r?n.arrayMerge(e,t,n):s$(e,t,n):Qa(t,n)}so.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,s){return so(r,s,n)},{})};var i$=so,o$=i$;const a$=Qn(o$);function YE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=YE(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function D(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=YE(e))&&(r&&(r+=" "),r+=t);return r}const l$=v.forwardRef((e,t)=>{const{attr:n,size:r,title:s,className:i,color:o,style:a,children:l,viewBox:c,width:d,height:f,...h}=e;return u.jsxs("svg",{"aria-hidden":!s,focusable:!1,xmlns:"http://www.w3.org/2000/svg",viewBox:c||"0 0 24 24",...n,...h,className:D("svg-icon",i,u$(r)),style:{color:o,...a},ref:t,height:f||"1em",width:d||"1em",children:[s&&u.jsx("title",{children:s}),l]})});function u$(e){switch(e){case"2xs":return"icon-2xs";case"xs":return"icon-xs";case"sm":return"icon-sm";case"md":return"icon-md";case"lg":return"icon-lg";case"xl":return"icon-xl";default:return e}}function re(e,t="",n){const r=(s,i)=>u.jsx(l$,{"data-testid":`${t}Icon`,ref:i,viewBox:n,...s,size:s.size||"md",children:e});return V.memo(V.forwardRef(r))}function Hd(e,t=""){const n=XE(e);return re(n,t)}function XE(e){return(e==null?void 0:e.map)&&e.map((t,n)=>V.createElement(t.tag,{key:n,...t.attr},XE(t.child)))}function c$(e){const t={},n={tag:e.tagName,attr:t};return Array.from(e.attributes).forEach(r=>{t[r.name]=r.value}),e.children.length&&(n.child=Array.from(e.children).map(r=>c$(r))),n}const d$=re(u.jsx("path",{d:"M22 9V7h-2v2h-2v2h2v2h2v-2h2V9zM8 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zm0 7c-2.67 0-8 1.34-8 4v3h16v-3c0-2.66-5.33-4-8-4zm6 5H2v-.99C2.2 16.29 5.3 15 8 15s5.8 1.29 6 2v1zM12.51 4.05C13.43 5.11 14 6.49 14 8s-.57 2.89-1.49 3.95C14.47 11.7 16 10.04 16 8s-1.53-3.7-3.49-3.95zm4.02 9.78C17.42 14.66 18 15.7 18 17v3h2v-3c0-1.45-1.59-2.51-3.47-3.17z"}),"GroupAddOutlined"),f$=re(u.jsx("path",{d:"M9 13.75c-2.34 0-7 1.17-7 3.5V19h14v-1.75c0-2.33-4.66-3.5-7-3.5zM4.34 17c.84-.58 2.87-1.25 4.66-1.25s3.82.67 4.66 1.25H4.34zM9 12c1.93 0 3.5-1.57 3.5-3.5S10.93 5 9 5 5.5 6.57 5.5 8.5 7.07 12 9 12zm0-5c.83 0 1.5.67 1.5 1.5S9.83 10 9 10s-1.5-.67-1.5-1.5S8.17 7 9 7zm7.04 6.81c1.16.84 1.96 1.96 1.96 3.44V19h4v-1.75c0-2.02-3.5-3.17-5.96-3.44zM15 12c1.93 0 3.5-1.57 3.5-3.5S16.93 5 15 5c-.54 0-1.04.13-1.5.35.63.89 1 1.98 1 3.15s-.37 2.26-1 3.15c.46.22.96.35 1.5.35z"}),"PeopleOutlined"),h$=re(u.jsx("path",{d:"M20.13 5.41 18.72 4l-9.19 9.19-4.25-4.24-1.41 1.41 5.66 5.66zM5 18h14v2H5z"}),"FileDownloadDoneOutlined"),kl=["bootstrapData"];function Pn(){return ze.getQueryData(kl)}function p$(){ze.invalidateQueries(kl)}function JE(e){ze.setQueryData(kl,typeof e=="string"?Fy(e):e)}function m$(e){JE({...Pn(),...e})}const ZE=typeof window<"u"&&window.bootstrapData?Fy(window.bootstrapData):void 0;ze.setQueryData(kl,ZE);function g$(){return On(kl,()=>y$(),{staleTime:1/0,keepPreviousData:!0,initialData:ZE})}const y$=async()=>Z.get("http://bedesk.test/api/v1/bootstrap-data").then(e=>Fy(e.data.data));function Fy(e){return typeof e=="string"?JSON.parse(e):e}function eC(e){if(Cl(e))return e;const t=Pn().settings.asset_url||Pn().settings.base_url;return e=e.replace(/^\/+/g,""),e.startsWith("assets/")?`${t}/build/${e}`:`${t}/${e}`}const qd=v.memo(({src:e,className:t,height:n="h-full"})=>{const{data:r}=v$(e);return u.jsx("div",{className:D("svg-image-container inline-block bg-no-repeat",n,t),dangerouslySetInnerHTML:r})});function v$(e){return On(["svgImage",eC(e)],()=>x$(e),{refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,staleTime:1/0,enabled:!!e})}function x$(e){return Er.get(e,{responseType:"text"}).then(t=>({__html:t.data}))}const Uy=v.memo(({src:e,className:t,...n})=>{let r=null;if(e?typeof e=="object"?r="icon":e.endsWith(".svg")&&!Cl(e)?r="svg":r="image":r=null,r==="svg")return u.jsx(qd,{...n,className:t,src:e,height:!1});if(r==="image")return u.jsx("img",{...n,className:t,src:e,alt:""});if(r==="icon"){const s=e;return u.jsx(s,{...n,className:t})}return null});function zy(e,{padding:t,equalWidth:n,variant:r}={}){switch(e){case"2xs":return r==="link"?"text-xs":`text-xs h-24 ${n?"w-24":t||"px-10"}`;case"xs":return r==="link"?"text-xs":`text-xs h-30 ${n?"w-30":t||"px-14"}`;case"sm":return r==="link"?"text-sm":`text-sm h-36 ${n?"w-36":t||"px-18"}`;case"md":return r==="link"?"text-base":`text-base h-42 ${n?"w-42":t||"px-22"}`;case"lg":return r==="link"?"text-lg":`text-base h-50 ${n?"w-50":t||"px-26"}`;case"xl":return r==="link"?"text-xl":`text-lg h-60 ${n?"w-60":t||"px-32"}`;default:return e||""}}function b$(e){const{variant:t,shadow:n,whitespace:r="whitespace-nowrap"}=e,s={...e,border:e.border||"border"};let i=[];return t==="outline"?i=w$(s):t==="text"?i=_$(s):t==="flat"||t==="raised"?i=E$(s):t==="link"&&(i=S$(s)),[...i,n||t==="raised"&&"shadow-md",r,t&&"align-middle inline-flex flex-shrink-0 items-center transition-button duration-200","select-none appearance-none no-underline outline-none disabled:pointer-events-none disabled:cursor-default"]}function w$({color:e,border:t}){const n="disabled:text-disabled disabled:bg-transparent disabled:border-disabled-bg";switch(e){case"primary":return[`text-primary bg-transparent ${t} border-primary/50`,"hover:bg-primary/hover hover:border-primary",n];case"danger":return[`text-danger bg-transparent ${t} border-danger/50`,"hover:bg-danger/4 hover:border-danger",n];case"paper":return[`text bg-paper ${t}`,"hover:bg-hover",n];case"white":return["text-white bg-transparent border border-white","hover:bg-white/20","disabled:text-white/70 disabled:border-white/70 disabled:bg-transparent"];default:return[`bg-transparent ${t}`,"hover:bg-hover",n]}}function _$({color:e}){const t="disabled:text-disabled disabled:bg-transparent";switch(e){case"primary":return["text-primary bg-transparent border-transparent","hover:bg-primary/4",t];case"danger":return["text-danger bg-transparent border-transparent","hover:bg-danger/4",t];case"white":return["text-white bg-transparent border-transparent","hover:bg-white/20","disabled:text-white/70 disabled:bg-transparent"];default:return["bg-transparent border-transparent","hover:bg-hover",t]}}function S$({color:e}){switch(e){case"primary":return["text-primary","hover:underline","disabled:text-disabled"];case"danger":return["text-danger","hover:underline","disabled:text-disabled"];default:return["text-main","hover:underline","disabled:text-disabled"]}}function E$({color:e,border:t}){const n="disabled:text-disabled disabled:bg-disabled disabled:border-transparent disabled:shadow-none";switch(e){case"primary":return[`text-on-primary bg-primary ${t} border-primary`,"hover:bg-primary-dark hover:border-primary-dark",n];case"danger":return[`text-white bg-danger ${t} border-danger`,"hover:bg-danger/90 hover:border-danger/90",n];case"chip":return[`text-main bg-chip ${t} border-chip`,"hover:bg-chip/90 hover:border-chip/90",n];case"paper":return[`text-main bg-paper ${t} border-paper`,"hover:bg-paper/90 hover:border-paper/90",n];case"white":return[`text-black bg-white ${t} border-white`,"hover:bg-white",n];default:return[`bg ${t} border-background`,"hover:bg-hover",n]}}function nn(e){return e&&(t=>{t.currentTarget.contains(t.target)&&e(t)})}const Wd=v.forwardRef((e,t)=>{const{children:n,color:r=null,variant:s,radius:i,shadow:o,whitespace:a,justify:l="justify-center",className:c,href:d,form:f,border:h,elementType:p,to:g,relative:b,replace:w,end:y,type:m="button",onClick:x,onPointerDown:_,onPointerUp:S,onKeyDown:E,...C}=e,k=p||(d?"a":"button"),P=k==="a";return u.jsx(k,{ref:t,form:P?void 0:f,href:d,to:g,relative:b,type:P?void 0:m,replace:w,end:y,onPointerDown:nn(_),onPointerUp:nn(S),onClick:nn(x),onKeyDown:nn(E),className:D("focus-visible:ring",b$({variant:s,color:r,border:h,whitespace:a}),i,l,c),...C,children:n})}),te=V.forwardRef(({children:e,startIcon:t,endIcon:n,size:r="sm",sizeClassName:s,className:i,equalWidth:o=!1,radius:a="rounded",variant:l="text",...c},d)=>{const f=D("font-semibold",s||zy(r,{equalWidth:o,variant:l}),i);return u.jsxs(Wd,{className:f,ref:d,radius:a,variant:l,...c,children:[t&&u.jsx(fx,{position:"start",icon:t,size:r}),e,n&&u.jsx(fx,{position:"end",icon:n,size:r})]})});function fx({icon:e,position:t,size:n}){const r=D("m-auto",{"-ml-4 mr-8":t==="start","-mr-4 ml-8":t==="end"},e.props.className);return V.cloneElement(e,{className:r,size:n})}function C$(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Vy(e,t,n){C$(e,t),t.set(e,n)}function yh(e,t){return e-t*Math.floor(e/t)}const tC=1721426;function fu(e,t,n,r){t=By(e,t);let s=t-1,i=-2;return n<=2?i=0:Gu(t)&&(i=-1),tC-1+365*s+Math.floor(s/4)-Math.floor(s/100)+Math.floor(s/400)+Math.floor((367*n-362)/12+i+r)}function Gu(e){return e%4===0&&(e%100!==0||e%400===0)}function By(e,t){return e==="BC"?1-t:t}function j$(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const k$={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class io{fromJulianDay(t){let n=t,r=n-tC,s=Math.floor(r/146097),i=yh(r,146097),o=Math.floor(i/36524),a=yh(i,36524),l=Math.floor(a/1461),c=yh(a,1461),d=Math.floor(c/365),f=s*400+o*100+l*4+d+(o!==4&&d!==4?1:0),[h,p]=j$(f),g=n-fu(h,p,1,1),b=2;n<fu(h,p,3,1)?b=0:Gu(p)&&(b=1);let w=Math.floor(((g+b)*12+373)/367),y=n-fu(h,p,w,1)+1;return new Ga(h,p,w,y)}toJulianDay(t){return fu(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return k$[Gu(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return Gu(t.year)?366:365}getYearsInEra(t){return 9999}getEras(){return["BC","AD"]}isInverseEra(t){return t.era==="BC"}balanceDate(t){t.year<=0&&(t.era=t.era==="BC"?"AD":"BC",t.year=1-t.year)}constructor(){this.identifier="gregory"}}const T$={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function P$(e,t){return t=an(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function Xq(e,t){return t=an(t,e.calendar),e=Uc(e),t=Uc(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function Jq(e,t){return P$(e,N$(t))}function nC(e,t){let n=e.calendar.toJulianDay(e),r=Math.ceil(n+1-D$(t))%7;return r<0&&(r+=7),r}function R$(e){return cr(Date.now(),e)}function N$(e){return F$(R$(e))}function rC(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function O$(e,t){return hx(e)-hx(t)}function hx(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let vh=null;function Tl(){return vh==null&&(vh=new Intl.DateTimeFormat().resolvedOptions().timeZone),vh}function Uc(e){return e.subtract({days:e.day-1})}function A$(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function Zq(e){return Uc(e.subtract({months:e.month-1}))}function eW(e){return A$(e.add({months:e.calendar.getMonthsInYear(e)-e.month}))}function tW(e){return e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1}function nW(e){return e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1}function $$(e,t){let n=nC(e,t);return e.subtract({days:n})}function rW(e,t){return $$(e,t).add({days:6})}const px=new Map;function I$(e){if(Intl.Locale){let n=px.get(e);return n||(n=new Intl.Locale(e).maximize().region,px.set(e,n)),n}let t=e.split("-")[1];return t==="u"?null:t}function D$(e){let t=I$(e);return T$[t]||0}function sW(e,t){let n=e.calendar.getDaysInMonth(e);return Math.ceil((nC(Uc(e),t)+n)/7)}function iW(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function oW(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function oo(e){e=an(e,new io);let t=By(e.era,e.year);return sC(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function sC(e,t,n,r,s,i,o){let a=new Date;return a.setUTCHours(r,s,i,o),a.setUTCFullYear(e,t-1,n),a.getTime()}function mm(e,t){if(t==="UTC")return 0;if(e>0&&t===Tl())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:s,hour:i,minute:o,second:a}=iC(e,t);return sC(n,r,s,i,o,a,0)-Math.floor(e/1e3)*1e3}const mx=new Map;function iC(e,t){let n=mx.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),mx.set(t,n));let r=n.formatToParts(new Date(e)),s={};for(let i of r)i.type!=="literal"&&(s[i.type]=i.value);return{year:s.era==="BC"||s.era==="B"?-s.year+1:+s.year,month:+s.month,day:+s.day,hour:s.hour==="24"?0:+s.hour,minute:+s.minute,second:+s.second}}const gx=864e5;function M$(e,t,n,r){return(n===r?[n]:[n,r]).filter(i=>L$(e,t,i))}function L$(e,t,n){let r=iC(n,t);return e.year===r.year&&e.month===r.month&&e.day===r.day&&e.hour===r.hour&&e.minute===r.minute&&e.second===r.second}function ar(e,t,n="compatible"){let r=ao(e);if(t==="UTC")return oo(r);if(t===Tl()&&n==="compatible"){r=an(r,new io);let l=new Date,c=By(r.era,r.year);return l.setFullYear(c,r.month-1,r.day),l.setHours(r.hour,r.minute,r.second,r.millisecond),l.getTime()}let s=oo(r),i=mm(s-gx,t),o=mm(s+gx,t),a=M$(r,t,s-i,s-o);if(a.length===1)return a[0];if(a.length>1)switch(n){case"compatible":case"earlier":return a[0];case"later":return a[a.length-1];case"reject":throw new RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(s-i,s-o);case"compatible":case"later":return Math.max(s-i,s-o);case"reject":throw new RangeError("No such absolute time found")}}function oC(e,t,n="compatible"){return new Date(ar(e,t,n))}function cr(e,t){let n=mm(e,t),r=new Date(e+n),s=r.getUTCFullYear(),i=r.getUTCMonth()+1,o=r.getUTCDate(),a=r.getUTCHours(),l=r.getUTCMinutes(),c=r.getUTCSeconds(),d=r.getUTCMilliseconds();return new lo(s,i,o,t,n,a,l,c,d)}function F$(e){return new Ga(e.calendar,e.era,e.year,e.month,e.day)}function ao(e,t){let n=0,r=0,s=0,i=0;if("timeZone"in e)({hour:n,minute:r,second:s,millisecond:i}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:s,millisecond:i}=t),new Ya(e.calendar,e.era,e.year,e.month,e.day,n,r,s,i)}function an(e,t){if(e.calendar.identifier===t.identifier)return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,Us(r),r}function U$(e,t,n){if(e instanceof lo)return e.timeZone===t?e:aC(e,t);let r=ar(e,t,n);return cr(r,t)}function z$(e){let t=oo(e)-e.offset;return new Date(t)}function aC(e,t){let n=oo(e)-e.offset;return an(cr(n,t),e.calendar)}const Jo=36e5;function Kd(e,t){let n=e.copy(),r="hour"in n?q$(n,t):0;gm(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,ym(n),lC(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,V$(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let s=n.calendar.getYearsInEra(n);if(n.year>s){var i,o;let l=(o=(i=n.calendar).isInverseEra)===null||o===void 0?void 0:o.call(i,n);n.year=s,n.month=l?1:n.calendar.getMonthsInYear(n),n.day=l?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let a=n.calendar.getMonthsInYear(n);return n.month>a&&(n.month=a,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function gm(e,t){var n,r;!((r=(n=e.calendar).isInverseEra)===null||r===void 0)&&r.call(n,e)&&(t=-t),e.year+=t}function ym(e){for(;e.month<1;)gm(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,gm(e,1)}function V$(e){for(;e.day<1;)e.month--,ym(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,ym(e)}function lC(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function Us(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),lC(e)}function uC(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function cC(e,t){return Kd(e,uC(t))}function Hy(e,t){let n=e.copy();return t.era!=null&&(n.era=t.era),t.year!=null&&(n.year=t.year),t.month!=null&&(n.month=t.month),t.day!=null&&(n.day=t.day),Us(n),n}function zc(e,t){let n=e.copy();return t.hour!=null&&(n.hour=t.hour),t.minute!=null&&(n.minute=t.minute),t.second!=null&&(n.second=t.second),t.millisecond!=null&&(n.millisecond=t.millisecond),H$(n),n}function B$(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=hu(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=hu(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=hu(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=hu(e.hour,24),t}function H$(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function hu(e,t){let n=e%t;return n<0&&(n+=t),n}function q$(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,B$(e)}function qy(e,t,n,r){let s=e.copy();switch(t){case"era":{let a=e.calendar.getEras(),l=a.indexOf(e.era);if(l<0)throw new Error("Invalid era: "+e.era);l=dr(l,n,0,a.length-1,r==null?void 0:r.round),s.era=a[l],Us(s);break}case"year":var i,o;!((o=(i=s.calendar).isInverseEra)===null||o===void 0)&&o.call(i,s)&&(n=-n),s.year=dr(e.year,n,-1/0,9999,r==null?void 0:r.round),s.year===-1/0&&(s.year=1),s.calendar.balanceYearMonth&&s.calendar.balanceYearMonth(s,e);break;case"month":s.month=dr(e.month,n,1,e.calendar.getMonthsInYear(e),r==null?void 0:r.round);break;case"day":s.day=dr(e.day,n,1,e.calendar.getDaysInMonth(e),r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(s),Us(s),s}function dC(e,t,n,r){let s=e.copy();switch(t){case"hour":{let i=e.hour,o=0,a=23;if((r==null?void 0:r.hourCycle)===12){let l=i>=12;o=l?12:0,a=l?23:11}s.hour=dr(i,n,o,a,r==null?void 0:r.round);break}case"minute":s.minute=dr(e.minute,n,0,59,r==null?void 0:r.round);break;case"second":s.second=dr(e.second,n,0,59,r==null?void 0:r.round);break;case"millisecond":s.millisecond=dr(e.millisecond,n,0,999,r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return s}function dr(e,t,n,r,s=!1){if(s){e+=Math.sign(t),e<n&&(e=r);let i=Math.abs(t);t>0?e=Math.ceil(e/i)*i:e=Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,e<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function fC(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.days!=null&&t.days!==0){let s=Kd(ao(e),{years:t.years,months:t.months,days:t.days});n=ar(s,e.timeZone)}else n=oo(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=cr(n,e.timeZone);return an(r,e.calendar)}function W$(e,t){return fC(e,uC(t))}function K$(e,t,n,r){switch(t){case"hour":{let s=0,i=23;if((r==null?void 0:r.hourCycle)===12){let g=e.hour>=12;s=g?12:0,i=g?23:11}let o=ao(e),a=an(zc(o,{hour:s}),new io),l=[ar(a,e.timeZone,"earlier"),ar(a,e.timeZone,"later")].filter(g=>cr(g,e.timeZone).day===a.day)[0],c=an(zc(o,{hour:i}),new io),d=[ar(c,e.timeZone,"earlier"),ar(c,e.timeZone,"later")].filter(g=>cr(g,e.timeZone).day===c.day).pop(),f=oo(e)-e.offset,h=Math.floor(f/Jo),p=f%Jo;return f=dr(h,n,Math.floor(l/Jo),Math.floor(d/Jo),r==null?void 0:r.round)*Jo+p,an(cr(f,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return dC(e,t,n,r);case"era":case"year":case"month":case"day":{let s=qy(ao(e),t,n,r),i=ar(s,e.timeZone);return an(cr(i,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function Q$(e,t,n){let r=ao(e),s=zc(Hy(r,t),t);if(s.compare(r)===0)return e;let i=ar(s,e.timeZone,n);return an(cr(i,e.timeZone),e.calendar)}const G$=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?$/,Y$=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function aW(e){let t=e.match(G$);if(!t)throw new Error("Invalid ISO 8601 date time string: "+e);let n=new Ya(pt(t[1],1,9999),pt(t[2],1,12),1,t[4]?pt(t[4],0,23):0,t[5]?pt(t[5],0,59):0,t[6]?pt(t[6],0,59):0,t[7]?pt(t[7],0,1/0)*1e3:0);return n.day=pt(t[3],0,n.calendar.getDaysInMonth(n)),n}function X$(e,t){let n=e.match(Y$);if(!n)throw new Error("Invalid ISO 8601 date time string: "+e);let r=new lo(pt(n[1],1,9999),pt(n[2],1,12),1,t,0,n[4]?pt(n[4],0,23):0,n[5]?pt(n[5],0,59):0,n[6]?pt(n[6],0,59):0,n[7]?pt(n[7],0,1/0)*1e3:0);r.day=pt(n[3],0,r.calendar.getDaysInMonth(r));var s;return n[8]&&(r.offset=pt(n[8],-23,23)*36e5+pt((s=n[9])!==null&&s!==void 0?s:"0",0,59)*6e4),aC(r,t)}function hC(e){return X$(e,Tl())}function pt(e,t,n){let r=Number(e);if(r<t||r>n)throw new RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function J$(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function pC(e){let t=an(e,new io);return`${String(t.year).padStart(4,"0")}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function mC(e){return`${pC(e)}T${J$(e)}`}function Z$(e){let t=Math.sign(e)<0?"-":"+";e=Math.abs(e);let n=Math.floor(e/36e5),r=e%36e5/6e4;return`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`}function eI(e){return`${mC(e)}${Z$(e.offset)}[${e.timeZone}]`}function Wy(e){let t=typeof e[0]=="object"?e.shift():new io,n;if(typeof e[0]=="string")n=e.shift();else{let o=t.getEras();n=o[o.length-1]}let r=e.shift(),s=e.shift(),i=e.shift();return[t,n,r,s,i]}var tI=new WeakMap;class Ga{copy(){return this.era?new Ga(this.calendar,this.era,this.year,this.month,this.day):new Ga(this.calendar,this.year,this.month,this.day)}add(t){return Kd(this,t)}subtract(t){return cC(this,t)}set(t){return Hy(this,t)}cycle(t,n,r){return qy(this,t,n,r)}toDate(t){return oC(this,t)}toString(){return pC(this)}compare(t){return rC(this,t)}constructor(...t){Vy(this,tI,{writable:!0,value:void 0});let[n,r,s,i,o]=Wy(t);this.calendar=n,this.era=r,this.year=s,this.month=i,this.day=o,Us(this)}}var nI=new WeakMap;class Ya{copy(){return this.era?new Ya(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new Ya(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return Kd(this,t)}subtract(t){return cC(this,t)}set(t){return Hy(zc(this,t),t)}cycle(t,n,r){switch(t){case"era":case"year":case"month":case"day":return qy(this,t,n,r);default:return dC(this,t,n,r)}}toDate(t,n){return oC(this,t,n)}toString(){return mC(this)}compare(t){let n=rC(this,t);return n===0?O$(this,ao(t)):n}constructor(...t){Vy(this,nI,{writable:!0,value:void 0});let[n,r,s,i,o]=Wy(t);this.calendar=n,this.era=r,this.year=s,this.month=i,this.day=o,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Us(this)}}var rI=new WeakMap;class lo{copy(){return this.era?new lo(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new lo(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return fC(this,t)}subtract(t){return W$(this,t)}set(t,n){return Q$(this,t,n)}cycle(t,n,r){return K$(this,t,n,r)}toDate(){return z$(this)}toString(){return eI(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-U$(t,this.timeZone).toDate().getTime()}constructor(...t){Vy(this,rI,{writable:!0,value:void 0});let[n,r,s,i,o]=Wy(t),a=t.shift(),l=t.shift();this.calendar=n,this.era=r,this.year=s,this.month=i,this.day=o,this.timeZone=a,this.offset=l,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,Us(this)}}let xh=new Map;class sI{format(t){return this.formatter.format(t)}formatToParts(t){return this.formatter.formatToParts(t)}formatRange(t,n){if(typeof this.formatter.formatRange=="function")return this.formatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.formatter.format(t)} – ${this.formatter.format(n)}`}formatRangeToParts(t,n){if(typeof this.formatter.formatRangeToParts=="function")return this.formatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.formatter.formatToParts(t),s=this.formatter.formatToParts(n);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...s.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.formatter.resolvedOptions();return aI()&&(this.resolvedHourCycle||(this.resolvedHourCycle=lI(t.locale,this.options)),t.hourCycle=this.resolvedHourCycle,t.hour12=this.resolvedHourCycle==="h11"||this.resolvedHourCycle==="h12"),t.calendar==="ethiopic-amete-alem"&&(t.calendar="ethioaa"),t}constructor(t,n={}){this.formatter=gC(t,n),this.options=n}}const iI={true:{ja:"h11"},false:{}};function gC(e,t={}){if(typeof t.hour12=="boolean"&&oI()){t={...t};let s=iI[String(t.hour12)][e.split("-")[0]],i=t.hour12?"h12":"h23";t.hourCycle=s??i,delete t.hour12}let n=e+(t?Object.entries(t).sort((s,i)=>s[0]<i[0]?-1:1).join():"");if(xh.has(n))return xh.get(n);let r=new Intl.DateTimeFormat(e,t);return xh.set(n,r),r}let bh=null;function oI(){return bh==null&&(bh=new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))==="24"),bh}let wh=null;function aI(){return wh==null&&(wh=new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle==="h12"),wh}function lI(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,""),e+=(e.includes("-u-")?"":"-u")+"-nu-latn";let n=gC(e,{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(i=>i.type==="hour").value,10),s=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(i=>i.type==="hour").value,10);if(r===0&&s===23)return"h23";if(r===24&&s===23)return"h24";if(r===0&&s===11)return"h11";if(r===12&&s===11)return"h12";throw new Error("Unexpected hour cycle result")}function zs(e,t){if(e===t)return!0;if(!e||!t)return!1;const n=Object.keys(e),r=Object.keys(t),s=n.length;if(r.length!==s)return!1;for(let i=0;i<s;i++){const o=n[i];if(e[o]!==t[o]||!Object.prototype.hasOwnProperty.call(t,o))return!1}return!0}const Ky=v.createContext(null);function Lt(){return v.useContext(Ky)}function Zs(){const{data:{i18n:e}}=Lt();return{locale:e,localeCode:(e==null?void 0:e.language)||"en",lines:e==null?void 0:e.lines}}function yC(){const{data:{user:e,settings:t}}=v.useContext(Ky),n=t.dates.default_timezone,r=(e==null?void 0:e.timezone)||n||"auto";return v.useMemo(()=>!r||r==="auto"?Tl():r,[r])}var vC={exports:{}};(function(e){(function(){var t=Object.assign;typeof t!="function"&&(t=function(){var s=arguments,i=arguments[0];if(i==null)throw new TypeError("Cannot convert undefined or null to object");i=Object(i);for(var o=1;o<s.length;o++)if(s[o]&&typeof s[o]=="object")for(var a in s[o])i[a]=s[o][a];return i});function n(s){var i=s+"",o=i.indexOf("...");return o>=0&&(o<i.indexOf(")")||i.indexOf("arguments")>=0)}function r(s,i){i||(i={});var o=i.vargs||n(s),a=Object.create(null),l=[],c=[],d,f=new WeakMap,h=function(x,_,S){return setTimeout(function(){if(S){_.splice(x,1),S.splice(x,1);return}_ instanceof WeakMap?_.delete(x):delete _[x]},i.maxAge)},p=i.maxAge>0&&i.maxAge<1/0?h:0,g=i.equals?i.equals:function(x,_){return x===_},b=i.maxArgs,w=i.serializer,y,m;return s.length===1&&!i.equals&&!o?(y=function(x){var _=typeof x;if(!w&&(_==="object"&&x||_==="function")){var S;return f.get(x)||(!p||p(x,f),f.set(x,S=s.call(this,x)),S)}var E=_==="number"||_==="boolean"||x==null?x:_==="string"?JSON.stringify(x):w(x);return a[E]||(!p||p(E,a),a[E]=s.call(this,x))}.bind(this),m=1):y=function(){var x=arguments.length;if(!x&&d!=null)return c[d];var _=b||x,S;for(S=l.length-1;S>=0;S--)if(!(!b&&l[S].length!==_)){for(var E=_-1;E>=0&&g(l[S][E],arguments[E]);E--)if(E===0)return c[S]}return S=l.length-(S+1),!x&&d==null&&(d=S),!p||p(S,c,l),c[S]=s.apply(this,l[S]=arguments)}.bind(this),y.clear=function(){f=new WeakMap,a=Object.create(null),l=[],c=[],d=void 0},y.keys=function(){return m?null:l.slice()},y.values=function(){return m?null:c.slice()},y.keyValues=function(){return m?{primitives:t({},a),objects:f}:null},y}e.exports=r,typeof window<"u"&&(window.nanomemoize=r)}).call(rc)})(vC);var uI=vC.exports;const Pl=Qn(uI);function xC(e,{message:t,values:n}){const r=t.match(/\[(.+?)]/),s=n==null?void 0:n.count;if(r&&r[1]&&!Number.isNaN(s)){const[i,o]=r,a=o.split("|");if(!a.length)return t;const c=cI(e).select(s);let d=a.find(h=>h.startsWith(c));d||(d=a[0]);const f=d.substring(d.indexOf(" ")+1);return t.replace(i,f)}return t}const cI=Pl(e=>new Intl.PluralRules(e)),j=v.memo(e=>{const{message:t,values:n}=e,{lines:r,localeCode:s}=Zs();let i=(r==null?void 0:r[t])||t;if(!n)return u.jsx(v.Fragment,{children:i});i=xC(s,{message:i,values:n});const o=[],a=[];if(Object.entries(n).forEach(([l,c])=>{typeof c=="function"?a.push(l):v.isValidElement(c)?o.push(l):c!=null&&(i=i.replace(`:${l}`,`${c}`))}),a.length||o.length){const l=[];if(a.length){const h=a.join("");l.push(`(<[${h}]>.+?<\\/[${h}]>)`)}if(o.length){const h=o.join("|");l.push(`(:(?:${h}))`)}const c=new RegExp(l.join("|"),"gm"),f=i.split(c).filter(Boolean).map((h,p)=>{if(h.startsWith("<")&&h.endsWith(">")){const g=h.match(/<([a-z]+)>(.+?)<\/([a-z]+)>/);if(g){const[,b,w]=g,y=n==null?void 0:n[b];if(typeof y=="function"){const m=y(w);return v.cloneElement(m,{key:p})}}}if(h.startsWith(":")){const g=h.replace(":",""),b=n==null?void 0:n[g];if(v.isValidElement(b))return v.cloneElement(b,{key:p})}return h});return u.jsx(v.Fragment,{children:f})}return u.jsx(v.Fragment,{children:i})},dI);function dI(e,t){const{values:n,...r}=e,{values:s,...i}=t;return zs(s,n)&&zs(r,i)}const yx=[{amount:60,name:"seconds"},{amount:60,name:"minutes"},{amount:24,name:"hours"},{amount:7,name:"days"},{amount:4.34524,name:"weeks"},{amount:12,name:"months"},{amount:Number.POSITIVE_INFINITY,name:"years"}],bC=v.memo(({date:e,style:t})=>{const{localeCode:n}=Zs(),r=yC(),s=v.useMemo(()=>new Intl.RelativeTimeFormat(n,{numeric:"auto",style:t}),[n,t]);if(!e)return null;try{typeof e=="string"?e=hC(e).toDate():"toDate"in e&&(e=e.toDate(r))}catch{return null}let i=(e.getTime()-Date.now())/1e3;for(let o=0;o<=yx.length;o++){const a=yx[o];if(Math.abs(i)<a.amount)return a.name==="seconds"?u.jsx(j,{message:"a few seconds ago"}):u.jsx(v.Fragment,{children:s.format(Math.round(i),a.name)});i/=a.amount}return u.jsx(v.Fragment,{children:s.format(Math.round(i),"day")})},zs);function fI({notification:e,line:t,index:n,iconRenderer:r}){var a,l;const s=t.type==="primary"||n===0,i=r||hI,o=t.action?"a":"div";return u.jsxs(u.Fragment,{children:[u.jsxs(o,{className:D("flex items-center gap-8",t.action&&"hover:underline",s?"text-sm mnarktext-main whitespace-nowrap":"text-xs text-muted mt-6"),href:(a=t.action)==null?void 0:a.action,title:(l=t.action)==null?void 0:l.label,children:[t.icon&&u.jsx(i,{icon:t.icon}),u.jsx("div",{className:"overflow-hidden text-ellipsis",dangerouslySetInnerHTML:{__html:t.content}})]},n),n===0&&u.jsx("time",{className:"text-xs text-muted",children:u.jsx(bC,{date:e.created_at})})]})}function hI({icon:e}){return u.jsx(Uy,{src:e})}const wC="notifications";function Rn(e){return On(Rn.key,()=>pI(e))}function pI(e){return Z.get(wC,{params:e}).then(t=>t.data)}Rn.key=[wC];const vx=e=>{let t;const n=new Set,r=(l,c)=>{const d=typeof l=="function"?l(t):l;if(!Object.is(d,t)){const f=t;t=c??typeof d!="object"?d:Object.assign({},t,d),n.forEach(h=>h(t,f))}},s=()=>t,a={setState:r,getState:s,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>{n.clear()}};return t=e(r,s,a),a},mI=e=>e?vx(e):vx;var _C={exports:{}},SC={};/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Qd=v,gI=f2;function yI(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var vI=typeof Object.is=="function"?Object.is:yI,xI=gI.useSyncExternalStore,bI=Qd.useRef,wI=Qd.useEffect,_I=Qd.useMemo,SI=Qd.useDebugValue;SC.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var i=bI(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=_I(function(){function l(p){if(!c){if(c=!0,d=p,p=r(p),s!==void 0&&o.hasValue){var g=o.value;if(s(g,p))return f=g}return f=p}if(g=f,vI(d,p))return g;var b=r(p);return s!==void 0&&s(g,b)?g:(d=p,f=b)}var c=!1,d,f,h=n===void 0?null:n;return[function(){return l(t())},h===null?void 0:function(){return l(h())}]},[t,n,r,s]);var a=xI(e,i[0],i[1]);return wI(function(){o.hasValue=!0,o.value=a},[a]),SI(a),a};_C.exports=SC;var EI=_C.exports;const CI=Qn(EI),{useSyncExternalStoreWithSelector:jI}=CI;function EC(e,t=e.getState,n){const r=jI(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return v.useDebugValue(r),r}const xx=e=>{const t=typeof e=="function"?mI(e):e,n=(r,s)=>EC(t,r,s);return Object.assign(n,t),n},Qy=e=>e?xx(e):xx;var CC=Symbol.for("immer-nothing"),bx=Symbol.for("immer-draftable"),fe=Symbol.for("immer-state");function rn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var uo=Object.getPrototypeOf;function co(e){return!!e&&!!e[fe]}function br(e){var t;return e?jC(e)||Array.isArray(e)||!!e[bx]||!!((t=e.constructor)!=null&&t[bx])||Yd(e)||Xd(e):!1}var kI=Object.prototype.constructor.toString();function jC(e){if(!e||typeof e!="object")return!1;const t=uo(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===kI}function fo(e,t){Gd(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function Gd(e){const t=e[fe];return t?t.type_:Array.isArray(e)?1:Yd(e)?2:Xd(e)?3:0}function vm(e,t){return Gd(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function kC(e,t,n){const r=Gd(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function TI(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Yd(e){return e instanceof Map}function Xd(e){return e instanceof Set}function rt(e){return e.copy_||e.base_}function xm(e,t){if(Yd(e))return new Map(e);if(Xd(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&jC(e))return uo(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[fe];let r=Reflect.ownKeys(n);for(let s=0;s<r.length;s++){const i=r[s],o=n[i];o.writable===!1&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(n[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:e[i]})}return Object.create(uo(e),n)}function Gy(e,t=!1){return Jd(e)||co(e)||!br(e)||(Gd(e)>1&&(e.set=e.add=e.clear=e.delete=PI),Object.freeze(e),t&&fo(e,(n,r)=>Gy(r,!0))),e}function PI(){rn(2)}function Jd(e){return Object.isFrozen(e)}var bm={};function Vs(e){const t=bm[e];return t||rn(0,e),t}function RI(e,t){bm[e]||(bm[e]=t)}var Xa;function Vc(){return Xa}function NI(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function wx(e,t){t&&(Vs("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function wm(e){_m(e),e.drafts_.forEach(OI),e.drafts_=null}function _m(e){e===Xa&&(Xa=e.parent_)}function _x(e){return Xa=NI(Xa,e)}function OI(e){const t=e[fe];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function Sx(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[fe].modified_&&(wm(t),rn(4)),br(e)&&(e=Bc(t,e),t.parent_||Hc(t,e)),t.patches_&&Vs("Patches").generateReplacementPatches_(n[fe].base_,e,t.patches_,t.inversePatches_)):e=Bc(t,n,[]),wm(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==CC?e:void 0}function Bc(e,t,n){if(Jd(t))return t;const r=t[fe];if(!r)return fo(t,(s,i)=>Ex(e,r,t,s,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Hc(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let i=s,o=!1;r.type_===3&&(i=new Set(s),s.clear(),o=!0),fo(i,(a,l)=>Ex(e,r,s,a,l,n,o)),Hc(e,s,!1),n&&e.patches_&&Vs("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function Ex(e,t,n,r,s,i,o){if(co(s)){const a=i&&t&&t.type_!==3&&!vm(t.assigned_,r)?i.concat(r):void 0,l=Bc(e,s,a);if(kC(n,r,l),co(l))e.canAutoFreeze_=!1;else return}else o&&n.add(s);if(br(s)&&!Jd(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Bc(e,s),(!t||!t.scope_.parent_)&&Hc(e,s)}}function Hc(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Gy(t,n)}function AI(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Vc(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,i=Yy;n&&(s=[r],i=Ja);const{revoke:o,proxy:a}=Proxy.revocable(s,i);return r.draft_=a,r.revoke_=o,a}var Yy={get(e,t){if(t===fe)return e;const n=rt(e);if(!vm(n,t))return $I(e,n,t);const r=n[t];return e.finalized_||!br(r)?r:r===_h(e.base_,t)?(Sh(e),e.copy_[t]=Za(r,e)):r},has(e,t){return t in rt(e)},ownKeys(e){return Reflect.ownKeys(rt(e))},set(e,t,n){const r=TC(rt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=_h(rt(e),t),i=s==null?void 0:s[fe];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(TI(n,s)&&(n!==void 0||vm(e.base_,t)))return!0;Sh(e),or(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return _h(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Sh(e),or(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=rt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){rn(11)},getPrototypeOf(e){return uo(e.base_)},setPrototypeOf(){rn(12)}},Ja={};fo(Yy,(e,t)=>{Ja[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Ja.deleteProperty=function(e,t){return Ja.set.call(this,e,t,void 0)};Ja.set=function(e,t,n){return Yy.set.call(this,e[0],t,n,e[0])};function _h(e,t){const n=e[fe];return(n?rt(n):e)[t]}function $I(e,t,n){var s;const r=TC(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function TC(e,t){if(!(t in e))return;let n=uo(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=uo(n)}}function or(e){e.modified_||(e.modified_=!0,e.parent_&&or(e.parent_))}function Sh(e){e.copy_||(e.copy_=xm(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var II=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const i=n;n=t;const o=this;return function(l=i,...c){return o.produce(l,d=>n.call(this,d,...c))}}typeof n!="function"&&rn(6),r!==void 0&&typeof r!="function"&&rn(7);let s;if(br(t)){const i=_x(this),o=Za(t,void 0);let a=!0;try{s=n(o),a=!1}finally{a?wm(i):_m(i)}return wx(i,r),Sx(s,i)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===CC&&(s=void 0),this.autoFreeze_&&Gy(s,!0),r){const i=[],o=[];Vs("Patches").generateReplacementPatches_(t,s,i,o),r(i,o)}return s}else rn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(o,...a)=>this.produceWithPatches(o,l=>t(l,...a));let r,s;return[this.produce(t,n,(o,a)=>{r=o,s=a}),r,s]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){br(e)||rn(8),co(e)&&(e=DI(e));const t=_x(this),n=Za(e,void 0);return n[fe].isManual_=!0,_m(t),n}finishDraft(e,t){const n=e&&e[fe];(!n||!n.isManual_)&&rn(9);const{scope_:r}=n;return wx(r,t),Sx(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 s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Vs("Patches").applyPatches_;return co(e)?r(e,t):this.produce(e,s=>r(s,t))}};function Za(e,t){const n=Yd(e)?Vs("MapSet").proxyMap_(e,t):Xd(e)?Vs("MapSet").proxySet_(e,t):AI(e,t);return(t?t.scope_:Vc()).drafts_.push(n),n}function DI(e){return co(e)||rn(10,e),PC(e)}function PC(e){if(!br(e)||Jd(e))return e;const t=e[fe];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=xm(e,t.scope_.immer_.useStrictShallowCopy_)}else n=xm(e,!0);return fo(n,(r,s)=>{kC(n,r,PC(s))}),t&&(t.finalized_=!1),n}function MI(){class e extends Map{constructor(l,c){super(),this[fe]={type_:2,parent_:c,scope_:c?c.scope_:Vc(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:l,draft_:this,isManual_:!1,revoked_:!1}}get size(){return rt(this[fe]).size}has(l){return rt(this[fe]).has(l)}set(l,c){const d=this[fe];return o(d),(!rt(d).has(l)||rt(d).get(l)!==c)&&(n(d),or(d),d.assigned_.set(l,!0),d.copy_.set(l,c),d.assigned_.set(l,!0)),this}delete(l){if(!this.has(l))return!1;const c=this[fe];return o(c),n(c),or(c),c.base_.has(l)?c.assigned_.set(l,!1):c.assigned_.delete(l),c.copy_.delete(l),!0}clear(){const l=this[fe];o(l),rt(l).size&&(n(l),or(l),l.assigned_=new Map,fo(l.base_,c=>{l.assigned_.set(c,!1)}),l.copy_.clear())}forEach(l,c){const d=this[fe];rt(d).forEach((f,h,p)=>{l.call(c,this.get(h),h,this)})}get(l){const c=this[fe];o(c);const d=rt(c).get(l);if(c.finalized_||!br(d)||d!==c.base_.get(l))return d;const f=Za(d,c);return n(c),c.copy_.set(l,f),f}keys(){return rt(this[fe]).keys()}values(){const l=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const c=l.next();return c.done?c:{done:!1,value:this.get(c.value)}}}}entries(){const l=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const c=l.next();if(c.done)return c;const d=this.get(c.value);return{done:!1,value:[c.value,d]}}}}[Symbol.iterator](){return this.entries()}}function t(a,l){return new e(a,l)}function n(a){a.copy_||(a.assigned_=new Map,a.copy_=new Map(a.base_))}class r extends Set{constructor(l,c){super(),this[fe]={type_:3,parent_:c,scope_:c?c.scope_:Vc(),modified_:!1,finalized_:!1,copy_:void 0,base_:l,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return rt(this[fe]).size}has(l){const c=this[fe];return o(c),c.copy_?!!(c.copy_.has(l)||c.drafts_.has(l)&&c.copy_.has(c.drafts_.get(l))):c.base_.has(l)}add(l){const c=this[fe];return o(c),this.has(l)||(i(c),or(c),c.copy_.add(l)),this}delete(l){if(!this.has(l))return!1;const c=this[fe];return o(c),i(c),or(c),c.copy_.delete(l)||(c.drafts_.has(l)?c.copy_.delete(c.drafts_.get(l)):!1)}clear(){const l=this[fe];o(l),rt(l).size&&(i(l),or(l),l.copy_.clear())}values(){const l=this[fe];return o(l),i(l),l.copy_.values()}entries(){const l=this[fe];return o(l),i(l),l.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(l,c){const d=this.values();let f=d.next();for(;!f.done;)l.call(c,f.value,f.value,this),f=d.next()}}function s(a,l){return new r(a,l)}function i(a){a.copy_||(a.copy_=new Set,a.base_.forEach(l=>{if(br(l)){const c=Za(l,a);a.drafts_.set(l,c),a.copy_.add(c)}else a.copy_.add(l)}))}function o(a){a.revoked_&&rn(3,JSON.stringify(rt(a)))}RI("MapSet",{proxyMap_:t,proxySet_:s})}var Kt=new II,Xy=Kt.produce;Kt.produceWithPatches.bind(Kt);Kt.setAutoFreeze.bind(Kt);Kt.setUseStrictShallowCopy.bind(Kt);Kt.applyPatches.bind(Kt);Kt.createDraft.bind(Kt);Kt.finishDraft.bind(Kt);const LI=e=>(t,n,r)=>(r.setState=(s,i,...o)=>{const a=typeof s=="function"?Xy(s):s;return t(a,i,...o)},e(r.setState,n,r)),Jy=LI;let RC=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,n)=>(n&=63,n<36?t+=n.toString(36):n<62?t+=(n-26).toString(36).toUpperCase():n>62?t+="-":t+="_",t),"");class FI{constructor(t,n){ye(this,"timerId");ye(this,"createdAt",0);this.callback=t,this.remaining=n,this.resume()}pause(){clearTimeout(this.timerId),this.remaining-=Date.now()-this.createdAt}resume(){this.createdAt=Date.now(),this.timerId&&clearTimeout(this.timerId),this.timerId=setTimeout(this.callback,this.remaining)}clear(){clearTimeout(this.timerId)}}const UI=1;function zI(e){switch(e){case"danger":return 8e3;case"loading":return 0;default:return 3e3}}const NC=Qy()(Jy((e,t)=>({toasts:[],add:(n,r)=>{const s=t().toasts.length+1-UI;s>0&&e(d=>{d.toasts.splice(0,s)});const i=(r==null?void 0:r.id)||RC(6),o=(r==null?void 0:r.type)||"positive",a=(r==null?void 0:r.duration)??zI(o),l={timer:a>0?new FI(()=>t().remove(i),a):null,message:n,...r,id:i,type:o,position:(r==null?void 0:r.position)||"bottom-center",duration:a,disableExitAnimation:r==null?void 0:r.disableExitAnimation,disableEnterAnimation:r==null?void 0:r.disableEnterAnimation},c=t().toasts.findIndex(d=>d.id===l.id);c>-1?e(d=>{d.toasts[c]=l}):e(d=>{d.toasts.push(l)})},remove:n=>{const r=t().toasts.filter(s=>{var i;return n===s.id?((i=s.timer)==null||i.clear(),!1):!0});e(s=>{s.toasts=r})}})));function ho(){return NC.getState()}function de(e,t){ho().add(e,t)}de.danger=(e,t)=>{ho().add(e,{...t,type:"danger"})};de.positive=(e,t)=>{ho().add(e,{...t,type:"positive"})};de.loading=(e,t)=>{ho().add(e,{...t,type:"loading"})};function Zr(e,t){var n;if(Er.isAxiosError(e)&&e.response){const r=e.response.data;if(t!=null){const s=(n=r.errors)==null?void 0:n[t];return Array.isArray(s)?s[0]:s}return r==null?void 0:r.message}}const VI=ie("There was an issue. Please try again.");function dt(e,t=VI,n,r){var s,i;de.danger(Zr(e,n)||t,{action:(i=(s=e.response)==null?void 0:s.data)==null?void 0:i.action,...r})}function Zy(){const{data:e,mergeBootstrapData:t}=Lt();return me(n=>BI(n),{onSuccess:n=>{ze.invalidateQueries(Rn.key),n.unreadCount===0&&t({user:{...e.user,unread_notifications_count:0}})},onError:n=>dt(n)})}function BI(e){return Z.post("notifications/mark-as-read",e).then(t=>t.data)}/**
 * @remix-run/router v1.7.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function el(){return el=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},el.apply(this,arguments)}var Vr;(function(e){e.Pop="POP",e.Push="PUSH",e.Replace="REPLACE"})(Vr||(Vr={}));const Cx="popstate";function HI(e){e===void 0&&(e={});function t(r,s){let{pathname:i,search:o,hash:a}=r.location;return Sm("",{pathname:i,search:o,hash:a},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function n(r,s){return typeof s=="string"?s:po(s)}return WI(t,n,null,e)}function We(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ev(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function qI(){return Math.random().toString(36).substr(2,8)}function jx(e,t){return{usr:e.state,key:e.key,idx:t}}function Sm(e,t,n,r){return n===void 0&&(n=null),el({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Ro(t):t,{state:n,key:t&&t.key||r||qI()})}function po(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Ro(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 WI(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Vr.Pop,l=null,c=d();c==null&&(c=0,o.replaceState(el({},o.state,{idx:c}),""));function d(){return(o.state||{idx:null}).idx}function f(){a=Vr.Pop;let w=d(),y=w==null?null:w-c;c=w,l&&l({action:a,location:b.location,delta:y})}function h(w,y){a=Vr.Push;let m=Sm(b.location,w,y);n&&n(m,w),c=d()+1;let x=jx(m,c),_=b.createHref(m);try{o.pushState(x,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}i&&l&&l({action:a,location:b.location,delta:1})}function p(w,y){a=Vr.Replace;let m=Sm(b.location,w,y);n&&n(m,w),c=d();let x=jx(m,c),_=b.createHref(m);o.replaceState(x,"",_),i&&l&&l({action:a,location:b.location,delta:0})}function g(w){let y=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof w=="string"?w:po(w);return We(y,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,y)}let b={get action(){return a},get location(){return e(s,o)},listen(w){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(Cx,f),l=w,()=>{s.removeEventListener(Cx,f),l=null}},createHref(w){return t(s,w)},createURL:g,encodeLocation(w){let y=g(w);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(w){return o.go(w)}};return b}var kx;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(kx||(kx={}));function KI(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Ro(t):t,s=tv(r.pathname||"/",n);if(s==null)return null;let i=OC(e);QI(i);let o=null;for(let a=0;o==null&&a<i.length;++a)o=rD(i[a],oD(s));return o}function OC(e,t,n,r){t===void 0&&(t=[]),n===void 0&&(n=[]),r===void 0&&(r="");let s=(i,o,a)=>{let l={relativePath:a===void 0?i.path||"":a,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&(We(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=es([r,l.relativePath]),d=n.concat(l);i.children&&i.children.length>0&&(We(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),OC(i.children,t,d,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:tD(c,i.index),routesMeta:d})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of AC(i.path))s(i,o,l)}),t}function AC(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,s=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return s?[i,""]:[i];let o=AC(r.join("/")),a=[];return a.push(...o.map(l=>l===""?i:[i,l].join("/"))),s&&a.push(...o),a.map(l=>e.startsWith("/")&&l===""?"/":l)}function QI(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:nD(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const GI=/^:\w+$/,YI=3,XI=2,JI=1,ZI=10,eD=-2,Tx=e=>e==="*";function tD(e,t){let n=e.split("/"),r=n.length;return n.some(Tx)&&(r+=eD),t&&(r+=XI),n.filter(s=>!Tx(s)).reduce((s,i)=>s+(GI.test(i)?YI:i===""?JI:ZI),r)}function nD(e,t){return e.length===t.length&&e.slice(0,-1).every((r,s)=>r===t[s])?e[e.length-1]-t[t.length-1]:0}function rD(e,t){let{routesMeta:n}=e,r={},s="/",i=[];for(let o=0;o<n.length;++o){let a=n[o],l=o===n.length-1,c=s==="/"?t:t.slice(s.length)||"/",d=sD({path:a.relativePath,caseSensitive:a.caseSensitive,end:l},c);if(!d)return null;Object.assign(r,d.params);let f=a.route;i.push({params:r,pathname:es([s,d.pathname]),pathnameBase:uD(es([s,d.pathnameBase])),route:f}),d.pathnameBase!=="/"&&(s=es([s,d.pathnameBase]))}return i}function sD(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=iD(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let i=s[0],o=i.replace(/(.)\/+$/,"$1"),a=s.slice(1);return{params:r.reduce((c,d,f)=>{if(d==="*"){let h=a[f]||"";o=i.slice(0,i.length-h.length).replace(/(.)\/+$/,"$1")}return c[d]=aD(a[f]||"",d),c},{}),pathname:i,pathnameBase:o,pattern:e}}function iD(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ev(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,a)=>(r.push(a),"/([^\\/]+)"));return e.endsWith("*")?(r.push("*"),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function oD(e){try{return decodeURI(e)}catch(t){return ev(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function aD(e,t){try{return decodeURIComponent(e)}catch(n){return ev(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+n+").")),e}}function tv(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function $C(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?Ro(e):e;return{pathname:n?n.startsWith("/")?n:lD(n,t):t,search:cD(r),hash:dD(s)}}function lD(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function Eh(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 nv(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function rv(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=Ro(e):(s=el({},e),We(!s.pathname||!s.pathname.includes("?"),Eh("?","pathname","search",s)),We(!s.pathname||!s.pathname.includes("#"),Eh("#","pathname","hash",s)),We(!s.search||!s.search.includes("#"),Eh("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(r||o==null)a=n;else{let f=t.length-1;if(o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),f-=1;s.pathname=h.join("/")}a=f>=0?t[f]:"/"}let l=$C(s,a),c=o&&o!=="/"&&o.endsWith("/"),d=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||d)&&(l.pathname+="/"),l}const es=e=>e.join("/").replace(/\/\/+/g,"/"),uD=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),cD=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,dD=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function fD(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const IC=["post","put","patch","delete"];new Set(IC);const hD=["get",...IC];new Set(hD);/**
 * React Router v6.14.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function qc(){return qc=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},qc.apply(this,arguments)}const sv=v.createContext(null),DC=v.createContext(null),ei=v.createContext(null),Zd=v.createContext(null),Yn=v.createContext({outlet:null,matches:[],isDataRoute:!1}),MC=v.createContext(null);function pD(e,t){let{relative:n}=t===void 0?{}:t;No()||We(!1);let{basename:r,navigator:s}=v.useContext(ei),{hash:i,pathname:o,search:a}=ov(e,{relative:n}),l=o;return r!=="/"&&(l=o==="/"?r:es([r,o])),s.createHref({pathname:l,search:a,hash:i})}function No(){return v.useContext(Zd)!=null}function An(){return No()||We(!1),v.useContext(Zd).location}function LC(e){v.useContext(ei).static||v.useLayoutEffect(e)}function Rl(){let{isDataRoute:e}=v.useContext(Yn);return e?TD():mD()}function mD(){No()||We(!1);let e=v.useContext(sv),{basename:t,navigator:n}=v.useContext(ei),{matches:r}=v.useContext(Yn),{pathname:s}=An(),i=JSON.stringify(nv(r).map(l=>l.pathnameBase)),o=v.useRef(!1);return LC(()=>{o.current=!0}),v.useCallback(function(l,c){if(c===void 0&&(c={}),!o.current)return;if(typeof l=="number"){n.go(l);return}let d=rv(l,JSON.parse(i),s,c.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:es([t,d.pathname])),(c.replace?n.replace:n.push)(d,c.state,c)},[t,n,i,s,e])}const FC=v.createContext(null);function lW(){return v.useContext(FC)}function gD(e){let t=v.useContext(Yn).outlet;return t&&v.createElement(FC.Provider,{value:e},t)}function iv(){let{matches:e}=v.useContext(Yn),t=e[e.length-1];return t?t.params:{}}function ov(e,t){let{relative:n}=t===void 0?{}:t,{matches:r}=v.useContext(Yn),{pathname:s}=An(),i=JSON.stringify(nv(r).map(o=>o.pathnameBase));return v.useMemo(()=>rv(e,JSON.parse(i),s,n==="path"),[e,i,s,n])}function yD(e,t){return vD(e,t)}function vD(e,t,n){No()||We(!1);let{navigator:r}=v.useContext(ei),{matches:s}=v.useContext(Yn),i=s[s.length-1],o=i?i.params:{};i&&i.pathname;let a=i?i.pathnameBase:"/";i&&i.route;let l=An(),c;if(t){var d;let b=typeof t=="string"?Ro(t):t;a==="/"||(d=b.pathname)!=null&&d.startsWith(a)||We(!1),c=b}else c=l;let f=c.pathname||"/",h=a==="/"?f:f.slice(a.length)||"/",p=KI(e,{pathname:h}),g=SD(p&&p.map(b=>Object.assign({},b,{params:Object.assign({},o,b.params),pathname:es([a,r.encodeLocation?r.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?a:es([a,r.encodeLocation?r.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),s,n);return t&&g?v.createElement(Zd.Provider,{value:{location:qc({pathname:"/",search:"",hash:"",state:null,key:"default"},c),navigationType:Vr.Pop}},g):g}function xD(){let e=kD(),t=fD(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,s={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},i=null;return v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),n?v.createElement("pre",{style:s},n):null,i)}const bD=v.createElement(xD,null);class wD extends v.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error||n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error?v.createElement(Yn.Provider,{value:this.props.routeContext},v.createElement(MC.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function _D(e){let{routeContext:t,match:n,children:r}=e,s=v.useContext(sv);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(Yn.Provider,{value:t},r)}function SD(e,t,n){var r;if(t===void 0&&(t=[]),n===void 0&&(n=null),e==null){var s;if((s=n)!=null&&s.errors)e=n.matches;else return null}let i=e,o=(r=n)==null?void 0:r.errors;if(o!=null){let a=i.findIndex(l=>l.route.id&&(o==null?void 0:o[l.route.id]));a>=0||We(!1),i=i.slice(0,Math.min(i.length,a+1))}return i.reduceRight((a,l,c)=>{let d=l.route.id?o==null?void 0:o[l.route.id]:null,f=null;n&&(f=l.route.errorElement||bD);let h=t.concat(i.slice(0,c+1)),p=()=>{let g;return d?g=f:l.route.Component?g=v.createElement(l.route.Component,null):l.route.element?g=l.route.element:g=a,v.createElement(_D,{match:l,routeContext:{outlet:a,matches:h,isDataRoute:n!=null},children:g})};return n&&(l.route.ErrorBoundary||l.route.errorElement||c===0)?v.createElement(wD,{location:n.location,revalidation:n.revalidation,component:f,error:d,children:p(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):p()},null)}var Em;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate"})(Em||(Em={}));var tl;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId"})(tl||(tl={}));function ED(e){let t=v.useContext(sv);return t||We(!1),t}function CD(e){let t=v.useContext(DC);return t||We(!1),t}function jD(e){let t=v.useContext(Yn);return t||We(!1),t}function UC(e){let t=jD(),n=t.matches[t.matches.length-1];return n.route.id||We(!1),n.route.id}function kD(){var e;let t=v.useContext(MC),n=CD(tl.UseRouteError),r=UC(tl.UseRouteError);return t||((e=n.errors)==null?void 0:e[r])}function TD(){let{router:e}=ED(Em.UseNavigateStable),t=UC(tl.UseNavigateStable),n=v.useRef(!1);return LC(()=>{n.current=!0}),v.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,qc({fromRouteId:t},i)))},[e,t])}function ef(e){let{to:t,replace:n,state:r,relative:s}=e;No()||We(!1);let{matches:i}=v.useContext(Yn),{pathname:o}=An(),a=Rl(),l=rv(t,nv(i).map(d=>d.pathnameBase),o,s==="path"),c=JSON.stringify(l);return v.useEffect(()=>a(JSON.parse(c),{replace:n,state:r,relative:s}),[a,c,s,n,r]),null}function zC(e){return gD(e.context)}function Fe(e){We(!1)}function PD(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Vr.Pop,navigator:i,static:o=!1}=e;No()&&We(!1);let a=t.replace(/^\/*/,"/"),l=v.useMemo(()=>({basename:a,navigator:i,static:o}),[a,i,o]);typeof r=="string"&&(r=Ro(r));let{pathname:c="/",search:d="",hash:f="",state:h=null,key:p="default"}=r,g=v.useMemo(()=>{let b=tv(c,a);return b==null?null:{location:{pathname:b,search:d,hash:f,state:h,key:p},navigationType:s}},[a,c,d,f,h,p,s]);return g==null?null:v.createElement(ei.Provider,{value:l},v.createElement(Zd.Provider,{children:n,value:g}))}function Px(e){let{children:t,location:n}=e;return yD(Cm(t),n)}var Rx;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Rx||(Rx={}));new Promise(()=>{});function Cm(e,t){t===void 0&&(t=[]);let n=[];return v.Children.forEach(e,(r,s)=>{if(!v.isValidElement(r))return;let i=[...t,s];if(r.type===v.Fragment){n.push.apply(n,Cm(r.props.children,i));return}r.type!==Fe&&We(!1),!r.props.index||!r.props.children||We(!1);let o={id:r.props.id||i.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(o.children=Cm(r.props.children,i)),n.push(o)}),n}/**
 * React Router DOM v6.14.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function Wc(){return Wc=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},Wc.apply(this,arguments)}function VC(e,t){if(e==null)return{};var n={},r=Object.keys(e),s,i;for(i=0;i<r.length;i++)s=r[i],!(t.indexOf(s)>=0)&&(n[s]=e[s]);return n}function RD(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function ND(e,t){return e.button===0&&(!t||t==="_self")&&!RD(e)}function jm(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function OD(e,t){let n=jm(e);if(t)for(let r of t.keys())n.has(r)||t.getAll(r).forEach(s=>{n.append(r,s)});return n}const AD=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],$D=["aria-current","caseSensitive","className","end","style","to","children"],ID="startTransition",Nx=r4[ID];function DD(e){let{basename:t,children:n,future:r,window:s}=e,i=v.useRef();i.current==null&&(i.current=HI({window:s,v5Compat:!0}));let o=i.current,[a,l]=v.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},d=v.useCallback(f=>{c&&Nx?Nx(()=>l(f)):l(f)},[l,c]);return v.useLayoutEffect(()=>o.listen(d),[o,d]),v.createElement(PD,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o})}const MD=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",LD=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ze=v.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:d}=t,f=VC(t,AD),{basename:h}=v.useContext(ei),p,g=!1;if(typeof c=="string"&&LD.test(c)&&(p=c,MD))try{let m=new URL(window.location.href),x=c.startsWith("//")?new URL(m.protocol+c):new URL(c),_=tv(x.pathname,h);x.origin===m.origin&&_!=null?c=_+x.search+x.hash:g=!0}catch{}let b=pD(c,{relative:s}),w=UD(c,{replace:o,state:a,target:l,preventScrollReset:d,relative:s});function y(m){r&&r(m),m.defaultPrevented||w(m)}return v.createElement("a",Wc({},f,{href:p||b,onClick:g||i?r:y,ref:n,target:l}))}),FD=v.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:a,to:l,children:c}=t,d=VC(t,$D),f=ov(l,{relative:d.relative}),h=An(),p=v.useContext(DC),{navigator:g}=v.useContext(ei),b=g.encodeLocation?g.encodeLocation(f).pathname:f.pathname,w=h.pathname,y=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;s||(w=w.toLowerCase(),y=y?y.toLowerCase():null,b=b.toLowerCase());let m=w===b||!o&&w.startsWith(b)&&w.charAt(b.length)==="/",x=y!=null&&(y===b||!o&&y.startsWith(b)&&y.charAt(b.length)==="/"),_=m?r:void 0,S;typeof i=="function"?S=i({isActive:m,isPending:x}):S=[i,m?"active":null,x?"pending":null].filter(Boolean).join(" ");let E=typeof a=="function"?a({isActive:m,isPending:x}):a;return v.createElement(Ze,Wc({},d,{"aria-current":_,className:S,ref:n,style:E,to:l}),typeof c=="function"?c({isActive:m,isPending:x}):c)});var Ox;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(Ox||(Ox={}));var Ax;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ax||(Ax={}));function UD(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o}=t===void 0?{}:t,a=Rl(),l=An(),c=ov(e,{relative:o});return v.useCallback(d=>{if(ND(d,n)){d.preventDefault();let f=r!==void 0?r:po(l)===po(c);a(e,{replace:f,state:s,preventScrollReset:i,relative:o})}},[l,a,c,r,s,n,e,i,o])}function av(e){let t=v.useRef(jm(e)),n=v.useRef(!1),r=An(),s=v.useMemo(()=>OD(r.search,n.current?null:t.current),[r.search]),i=Rl(),o=v.useCallback((a,l)=>{const c=jm(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,l)},[i,s]);return[s,o]}function gn(){const e=Rl(),t=An();return v.useCallback((n,r)=>{const s=po(t)===po($C(n,t.pathname));e(n,{...r,replace:(r==null?void 0:r.replace)!==!1&&s})},[e,t])}function ce(){const{data:{settings:e}}=Lt();return e}const zD={"group-add":d$,people:f$,"export-csv":h$};function BC({notifications:e,className:t}){const{notifications:n}=v.useContext(jl);return u.jsx("div",{className:t,children:e.map((r,s)=>{var a;const i=e.length-1===s,o=((a=n==null?void 0:n.renderMap)==null?void 0:a[r.type])||HC;return u.jsx(o,{notification:r,isLast:i},r.id)})})}function HC({notification:e,onActionButtonClick:t,lineIconRenderer:n,isLast:r}){const s=Zy(),i=gn(),o=e.data.mainAction,a=!e.data.image&&!e.read_at;return u.jsxs("div",{onClick:()=>{var l;!s.isLoading&&!e.read_at&&s.mutate({ids:[e.id]}),o!=null&&o.action&&(Cl(o.action)?(l=window.open(o.action,"_blank"))==null||l.focus():i(o.action))},className:D("flex items-start gap-14 px-32 py-20 bg-alt relative",!r&&"border-b",(o==null?void 0:o.action)&&"cursor-pointer",e.read_at?"hover:bg-hover":"bg-paper hover:bg-primary/10"),title:o!=null&&o.label?o.label:void 0,children:[a&&u.jsx("div",{className:"absolute left-16 top-26 w-8 h-8 shadow rounded-full bg-primary flex-shrink-0"}),e.data.image&&u.jsx(Uy,{className:"w-24 h-24 flex-shrink-0 text-muted",src:zD[e.data.image]||e.data.image}),u.jsxs("div",{className:"min-w-0",children:[e.data.lines.map((l,c)=>u.jsx(fI,{iconRenderer:n,notification:e,line:l,index:c},c)),u.jsx(VD,{onActionClick:t,notification:e})]})]})}function VD({notification:e,onActionClick:t}){const{base_url:n}=ce();return e.data.buttonActions?u.jsx("div",{className:"mt-12 flex items-center gap-12",children:e.data.buttonActions.map((r,s)=>u.jsx(te,{size:"xs",variant:s===0?"flat":"outline",color:s===0?"primary":null,elementType:t?void 0:Ze,to:t?void 0:r.action.replace(n,""),onClick:i=>{t==null||t(i,r)},children:r.label},s))}):null}const BD={fetchUserWorkspaces:["user-workspaces"],workspaceWithMembers:e=>["workspace-with-members",e]},HD={name:"Default",default:!0,id:0,members_count:1},km=new Set,qD=(e,t)=>{const n={name:e,callback:t};return km.add(n),()=>{km.delete(n)}};function WD(e){return Object.keys(e).reduce((t,n)=>{const r=n;return r==="days"||e[r]===!1?t:e[r]===!0?`${t}; ${r}`:`${t}; ${r}=${e[r]}`},"")}const KD=(e,t,n)=>{const r={days:7,path:"/",...n},s=new Date(Date.now()+r.days*864e5).toUTCString();document.cookie=e+"="+encodeURIComponent(t)+"; expires="+s+WD(r),km.forEach(i=>{i.name===e&&i.callback(t)})},QD=(e,t="")=>document.cookie.split("; ").reduce((n,r)=>{const s=r.split("=");return s[0]===e?decodeURIComponent(s[1]):n},"")||t;function lv(e,t){const[n,r]=v.useState(()=>QD(e,t));v.useEffect(()=>qD(e,i=>{r(i)}),[e]);const s=v.useCallback((i,o)=>{r(i),KD(e,i,o)},[e]);return[n,s]}const qC=V.createContext({workspaceId:null,setWorkspaceId:()=>{}});function GD(){return v.useContext(qC)}function YD({children:e}){const[t,n]=lv("activeWorkspaceId",`${HD.id}`);v.useEffect(()=>(cx(parseInt(t)),()=>{cx(0)}),[t]);const r=v.useMemo(()=>({workspaceId:parseInt(t),setWorkspaceId:s=>{n(`${s}`)}}),[t,n]);return u.jsx(qC.Provider,{value:r,children:e})}function XD(){const{setWorkspaceId:e}=GD()||{};return me(t=>JD(t),{onSuccess:t=>{de(ie("Joined workspace")),e(t.workspace.id),ze.invalidateQueries(BD.fetchUserWorkspaces),ze.invalidateQueries(Rn.key)},onError:t=>{Er.isAxiosError(t)&&t.response&&t.response.status===404?(ze.invalidateQueries(Rn.key),de.danger(ie("This invite is no longer valid"))):dt(t)}})}function JD({inviteId:e}){return Z.get(`workspace/join/${e}`).then(t=>t.data)}function ZD({inviteId:e}){return Z.delete(`workspace/invite/${e}`).then(t=>t.data)}function eM(){return me(e=>ZD(e),{onSuccess:()=>{ze.invalidateQueries(Rn.key),de(ie("Declined workspace invitation"))},onError:e=>{Er.isAxiosError(e)&&e.response&&e.response.status===404?(ze.invalidateQueries(Rn.key),de.danger(ie("This invite is no longer valid"))):dt(e)}})}const tf=V.createContext(null);function Nl(){return v.useContext(tf)}function tM(e){const{notification:t}=e,n=XD(),r=eM(),s=Nl();return u.jsx(HC,{...e,onActionButtonClick:(i,{action:o})=>{const a=t.data;o==="join"&&n.mutate({inviteId:a.inviteId}),o==="decline"&&r.mutate({inviteId:a.inviteId}),s==null||s.close()}})}const nM="Common\\Workspaces\\Notifications\\WorkspaceInvitation",rM={auth:{redirectUri:"/",adminRedirectUri:"/admin"},tags:{types:[{name:"custom"}]},customPages:{types:[{type:"default",label:ie("Default")}]},notifications:{renderMap:{[nM]:tM}},admin:{ads:[]},demo:{loginPageDefaults:"singleAccount"},homepage:{options:[{label:ie("Login page"),value:"loginPage"},{label:ie("Registration page"),value:"registerPage"}]}};let os=typeof document<"u"?document.getElementById("root")??document.body:void 0,_a=typeof document<"u"?document.documentElement:void 0;function WC(e,t){_a==null||_a.style.setProperty(e,t)}function KC(e){Object.entries(e.colors).forEach(([t,n])=>{WC(t,n)}),e.is_dark?_a.classList.add("dark"):_a.classList.remove("dark")}const QC=v.createContext(null);function nf(){return v.useContext(QC)}const sM="be-active-theme";function iM({children:e}){const{themes:{user_change:t,default_id:n}}=ce(),{data:r}=Lt(),s=v.useMemo(()=>r.themes.all||[],[r.themes.all]),i=r.themes.selectedThemeId||void 0,[o,a]=lv(sM,`${i}`);let l=t?s.find(d=>d.id==o):s.find(d=>d.id==n);l||(l=s[0]);const c=v.useMemo(()=>({allThemes:s,selectedTheme:l,selectTheme:d=>{if(!t)return;const f=oM(s,d);f&&(a(`${f.id}`),KC(f))}}),[s,l,a,t]);return u.jsx(QC.Provider,{value:c,children:e})}function oM(e,t){return e.find(n=>t==="light"?n.default_light===!0:t==="dark"?n.default_dark===!0:n.id===t)}function aM({children:e}){const{data:t}=g$(),n=v.useMemo(()=>({data:t,setBootstrapData:JE,mergeBootstrapData:m$,invalidateBootstrapData:p$}),[t]);return u.jsx(Ky.Provider,{value:n,children:e})}const lM=a$(rM,W5);function uM({children:e}){return u.jsx(v.StrictMode,{children:u.jsx(UR,{client:ze,children:u.jsx(xA,{features:bA,children:u.jsx(jl.Provider,{value:lM,children:u.jsx(aM,{children:u.jsx(iM,{children:e})})})})})})}const GC=Object.prototype.toString;function YC(e){switch(GC.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return wr(e,Error)}}function Oo(e,t){return GC.call(e)===`[object ${t}]`}function uv(e){return Oo(e,"ErrorEvent")}function $x(e){return Oo(e,"DOMError")}function cM(e){return Oo(e,"DOMException")}function as(e){return Oo(e,"String")}function XC(e){return e===null||typeof e!="object"&&typeof e!="function"}function mo(e){return Oo(e,"Object")}function rf(e){return typeof Event<"u"&&wr(e,Event)}function dM(e){return typeof Element<"u"&&wr(e,Element)}function fM(e){return Oo(e,"RegExp")}function cv(e){return!!(e&&e.then&&typeof e.then=="function")}function hM(e){return mo(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function JC(e){return typeof e=="number"&&e!==e}function wr(e,t){try{return e instanceof t}catch{return!1}}function Di(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function Ix(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;r<e.length;r++){const s=e[r];try{n.push(String(s))}catch{n.push("[value cannot be serialized]")}}return n.join(t)}function pM(e,t,n=!1){return as(e)?fM(t)?t.test(e):as(t)?n?e===t:e.includes(t):!1:!1}function Ol(e,t=[],n=!1){return t.some(r=>pM(e,r,n))}function mM(e,t,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!wr(o.originalException,Error))return;const a=i.exception.values.length>0?i.exception.values[i.exception.values.length-1]:void 0;a&&(i.exception.values=gM(Tm(e,t,s,o.originalException,r,i.exception.values,a,0),n))}function Tm(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let l=[...i];if(wr(r[s],Error)){Dx(o,a);const c=e(t,r[s]),d=l.length;Mx(c,s,d,a),l=Tm(e,t,n,r[s],s,[c,...l],c,d)}return Array.isArray(r.errors)&&r.errors.forEach((c,d)=>{if(wr(c,Error)){Dx(o,a);const f=e(t,c),h=l.length;Mx(f,`errors[${d}]`,h,a),l=Tm(e,t,n,c,s,[f,...l],f,h)}}),l}function Dx(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,is_exception_group:!0,exception_id:t}}function Mx(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}function gM(e,t){return e.map(n=>(n.value&&(n.value=Di(n.value,t)),n))}function pu(e){return e&&e.Math==Math?e:void 0}const dn=typeof globalThis=="object"&&pu(globalThis)||typeof window=="object"&&pu(window)||typeof self=="object"&&pu(self)||typeof global=="object"&&pu(global)||function(){return this}()||{};function Al(){return dn}function ZC(e,t,n){const r=n||dn,s=r.__SENTRY__=r.__SENTRY__||{};return s[e]||(s[e]=t())}const Yu=Al(),yM=80;function go(e,t={}){try{let n=e;const r=5,s=[];let i=0,o=0;const a=" > ",l=a.length;let c;const d=Array.isArray(t)?t:t.keyAttrs,f=!Array.isArray(t)&&t.maxStringLength||yM;for(;n&&i++<r&&(c=vM(n,d),!(c==="html"||i>1&&o+s.length*l+c.length>=f));)s.push(c),o+=c.length,n=n.parentNode;return s.reverse().join(a)}catch{return"<unknown>"}}function vM(e,t){const n=e,r=[];let s,i,o,a,l;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const c=t&&t.length?t.filter(f=>n.getAttribute(f)).map(f=>[f,n.getAttribute(f)]):null;if(c&&c.length)c.forEach(f=>{r.push(`[${f[0]}="${f[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&as(s))for(i=s.split(/\s+/),l=0;l<i.length;l++)r.push(`.${i[l]}`);const d=["aria-label","type","name","title","alt"];for(l=0;l<d.length;l++)o=d[l],a=n.getAttribute(o),a&&r.push(`[${o}="${a}"]`);return r.join("")}function xM(){try{return Yu.document.location.href}catch{return""}}function bM(e){return Yu.document&&Yu.document.querySelector?Yu.document.querySelector(e):null}const dv=["debug","info","warn","error","log","assert","trace"];function wM(e){if(!("console"in dn))return e();const t=dn.console,n={};dv.forEach(r=>{const s=t[r]&&t[r].__sentry_original__;r in t&&s&&(n[r]=t[r],t[r]=s)});try{return e()}finally{Object.keys(n).forEach(r=>{t[r]=n[r]})}}function _M(){const e={enable:()=>{},disable:()=>{}};return dv.forEach(t=>{e[t]=()=>{}}),e}let SM;SM=_M();const EM=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function sf(e,t=!1){const{host:n,path:r,pass:s,port:i,projectId:o,protocol:a,publicKey:l}=e;return`${a}://${l}${t&&s?`:${s}`:""}@${n}${i?`:${i}`:""}/${r&&`${r}/`}${o}`}function CM(e){const t=EM.exec(e);if(!t){console.error(`Invalid Sentry Dsn: ${e}`);return}const[n,r,s="",i,o="",a]=t.slice(1);let l="",c=a;const d=c.split("/");if(d.length>1&&(l=d.slice(0,-1).join("/"),c=d.pop()),c){const f=c.match(/^\d+/);f&&(c=f[0])}return ej({host:i,pass:s,path:l,projectId:c,port:o,protocol:n,publicKey:r})}function ej(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function jM(e){return!0}function kM(e){const t=typeof e=="string"?CM(e):ej(e);if(!(!t||!jM()))return t}class Sn extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function lt(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);if(typeof s=="function")try{tj(s,r)}catch{}e[t]=s}function fv(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}function tj(e,t){const n=t.prototype||{};e.prototype=t.prototype=n,fv(e,"__sentry_original__",t)}function hv(e){return e.__sentry_original__}function TM(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function nj(e){if(YC(e))return{message:e.message,name:e.name,stack:e.stack,...Fx(e)};if(rf(e)){const t={type:e.type,target:Lx(e.target),currentTarget:Lx(e.currentTarget),...Fx(e)};return typeof CustomEvent<"u"&&wr(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function Lx(e){try{return dM(e)?go(e):Object.prototype.toString.call(e)}catch{return"<unknown>"}}function Fx(e){if(typeof e=="object"&&e!==null){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}else return{}}function PM(e,t=40){const n=Object.keys(nj(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return Di(n[0],t);for(let r=n.length;r>0;r--){const s=n.slice(0,r).join(", ");if(!(s.length>t))return r===n.length?s:Di(s,t)}return""}function ts(e){return Pm(e,new Map)}function Pm(e,t){if(mo(e)){const n=t.get(e);if(n!==void 0)return n;const r={};t.set(e,r);for(const s of Object.keys(e))typeof e[s]<"u"&&(r[s]=Pm(e[s],t));return r}if(Array.isArray(e)){const n=t.get(e);if(n!==void 0)return n;const r=[];return t.set(e,r),e.forEach(s=>{r.push(Pm(s,t))}),r}return e}const rj=50,Ux=/\(error: (.*)\)/;function sj(...e){const t=e.sort((n,r)=>n[0]-r[0]).map(n=>n[1]);return(n,r=0)=>{const s=[],i=n.split(`
`);for(let o=r;o<i.length;o++){const a=i[o];if(a.length>1024)continue;const l=Ux.test(a)?a.replace(Ux,"$1"):a;if(!l.match(/\S*Error: /)){for(const c of t){const d=c(l);if(d){s.push(d);break}}if(s.length>=rj)break}}return NM(s)}}function RM(e){return Array.isArray(e)?sj(...e):e}function NM(e){if(!e.length)return[];const t=e.slice(0,rj),n=t[t.length-1].function;n&&/sentryWrapped/.test(n)&&t.pop(),t.reverse();const r=t[t.length-1].function;return r&&/captureMessage|captureException/.test(r)&&t.pop(),t.map(s=>({...s,filename:s.filename||t[t.length-1].filename,function:s.function||"?"}))}const Ch="<anonymous>";function Bs(e){try{return!e||typeof e!="function"?Ch:e.name||Ch}catch{return Ch}}const Rm=Al();function ij(){if(!("fetch"in Rm))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Nm(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function OM(){if(!ij())return!1;if(Nm(Rm.fetch))return!0;let e=!1;const t=Rm.document;if(t&&typeof t.createElement=="function")try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Nm(n.contentWindow.fetch)),t.head.removeChild(n)}catch{}return e}const mu=Al();function AM(){const e=mu.chrome,t=e&&e.app&&e.app.runtime,n="history"in mu&&!!mu.history.pushState&&!!mu.history.replaceState;return!t&&n}const Pe=Al(),Ci="__sentry_xhr_v2__",Sa={},zx={};function $M(e){if(!zx[e])switch(zx[e]=!0,e){case"console":IM();break;case"dom":BM();break;case"xhr":LM();break;case"fetch":DM();break;case"history":FM();break;case"error":HM();break;case"unhandledrejection":qM();break;default:return}}function zt(e,t){Sa[e]=Sa[e]||[],Sa[e].push(t),$M(e)}function jn(e,t){if(!(!e||!Sa[e]))for(const n of Sa[e]||[])try{n(t)}catch{}}function IM(){"console"in Pe&&dv.forEach(function(e){e in Pe.console&&lt(Pe.console,e,function(t){return function(...n){jn("console",{args:n,level:e}),t&&t.apply(Pe.console,n)}})})}function DM(){OM()&&lt(Pe,"fetch",function(e){return function(...t){const{method:n,url:r}=MM(t),s={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return jn("fetch",{...s}),e.apply(Pe,t).then(i=>(jn("fetch",{...s,endTimestamp:Date.now(),response:i}),i),i=>{throw jn("fetch",{...s,endTimestamp:Date.now(),error:i}),i})}})}function Om(e,t){return!!e&&typeof e=="object"&&!!e[t]}function Vx(e){return typeof e=="string"?e:e?Om(e,"url")?e.url:e.toString?e.toString():"":""}function MM(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:Vx(n),method:Om(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:Vx(t),method:Om(t,"method")?String(t.method).toUpperCase():"GET"}}function LM(){if(!("XMLHttpRequest"in Pe))return;const e=XMLHttpRequest.prototype;lt(e,"open",function(t){return function(...n){const r=n[1],s=this[Ci]={method:as(n[0])?n[0].toUpperCase():n[0],url:n[1],request_headers:{}};as(r)&&s.method==="POST"&&r.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const o=this[Ci];if(o&&this.readyState===4){try{o.status_code=this.status}catch{}jn("xhr",{args:n,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?lt(this,"onreadystatechange",function(o){return function(...a){return i(),o.apply(this,a)}}):this.addEventListener("readystatechange",i),lt(this,"setRequestHeader",function(o){return function(...a){const[l,c]=a,d=this[Ci];return d&&(d.request_headers[l.toLowerCase()]=c),o.apply(this,a)}}),t.apply(this,n)}}),lt(e,"send",function(t){return function(...n){const r=this[Ci];return r&&n[0]!==void 0&&(r.body=n[0]),jn("xhr",{args:n,startTimestamp:Date.now(),xhr:this}),t.apply(this,n)}})}let gu;function FM(){if(!AM())return;const e=Pe.onpopstate;Pe.onpopstate=function(...n){const r=Pe.location.href,s=gu;if(gu=r,jn("history",{from:s,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){const s=r.length>2?r[2]:void 0;if(s){const i=gu,o=String(s);gu=o,jn("history",{from:i,to:o})}return n.apply(this,r)}}lt(Pe.history,"pushState",t),lt(Pe.history,"replaceState",t)}const UM=1e3;let yu,vu;function zM(e,t){if(!e||e.type!==t.type)return!0;try{if(e.target!==t.target)return!0}catch{}return!1}function VM(e){if(e.type!=="keypress")return!1;try{const t=e.target;if(!t||!t.tagName)return!0;if(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)return!1}catch{}return!0}function Bx(e,t=!1){return n=>{if(!n||vu===n||VM(n))return;const r=n.type==="keypress"?"input":n.type;yu===void 0?(e({event:n,name:r,global:t}),vu=n):zM(vu,n)&&(e({event:n,name:r,global:t}),vu=n),clearTimeout(yu),yu=Pe.setTimeout(()=>{yu=void 0},UM)}}function BM(){if(!("document"in Pe))return;const e=jn.bind(null,"dom"),t=Bx(e,!0);Pe.document.addEventListener("click",t,!1),Pe.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=Pe[n]&&Pe[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(lt(r,"addEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const l=this,c=l.__sentry_instrumentation_handlers__=l.__sentry_instrumentation_handlers__||{},d=c[i]=c[i]||{refCount:0};if(!d.handler){const f=Bx(e);d.handler=f,s.call(this,i,f,a)}d.refCount++}catch{}return s.call(this,i,o,a)}}),lt(r,"removeEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const l=this,c=l.__sentry_instrumentation_handlers__||{},d=c[i];d&&(d.refCount--,d.refCount<=0&&(s.call(this,i,d.handler,a),d.handler=void 0,delete c[i]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,o,a)}}))})}let xu=null;function HM(){xu=Pe.onerror,Pe.onerror=function(e,t,n,r,s){return jn("error",{column:r,error:s,line:n,msg:e,url:t}),xu&&!xu.__SENTRY_LOADER__?xu.apply(this,arguments):!1},Pe.onerror.__SENTRY_INSTRUMENTED__=!0}let bu=null;function qM(){bu=Pe.onunhandledrejection,Pe.onunhandledrejection=function(e){return jn("unhandledrejection",e),bu&&!bu.__SENTRY_LOADER__?bu.apply(this,arguments):!0},Pe.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}function WM(){const e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(s){if(e)return t.has(s)?!0:(t.add(s),!1);for(let i=0;i<t.length;i++)if(t[i]===s)return!0;return t.push(s),!1}function r(s){if(e)t.delete(s);else for(let i=0;i<t.length;i++)if(t[i]===s){t.splice(i,1);break}}return[n,r]}function Mt(){const e=dn,t=e.crypto||e.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const n=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>Math.random()*16;return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function oj(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function KM(e){const{message:t,event_id:n}=e;if(t)return t;const r=oj(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Am(e,t,n){const r=e.exception=e.exception||{},s=r.values=r.values||[],i=s[0]=s[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function nl(e,t){const n=oj(e);if(!n)return;const r={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism={...r,...s,...t},t&&"data"in t){const i={...s&&s.data,...t.data};n.mechanism.data=i}}function Hx(e){if(e&&e.__sentry_captured__)return!0;try{fv(e,"__sentry_captured__",!0)}catch{}return!1}function aj(e){return Array.isArray(e)?e:[e]}function QM(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function GM(){return"npm"}function YM(){return!QM()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function XM(e,t){return e.require(t)}function Dr(e,t=100,n=1/0){try{return $m("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function lj(e,t=3,n=100*1024){const r=Dr(e,t);return tL(r)>n?lj(e,t-1,n):r}function $m(e,t,n=1/0,r=1/0,s=WM()){const[i,o]=s;if(t==null||["number","boolean","string"].includes(typeof t)&&!JC(t))return t;const a=JM(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;const l=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(l===0)return a.replace("object ","");if(i(t))return"[Circular ~]";const c=t;if(c&&typeof c.toJSON=="function")try{const p=c.toJSON();return $m("",p,l-1,r,s)}catch{}const d=Array.isArray(t)?[]:{};let f=0;const h=nj(t);for(const p in h){if(!Object.prototype.hasOwnProperty.call(h,p))continue;if(f>=r){d[p]="[MaxProperties ~]";break}const g=h[p];d[p]=$m(p,g,l-1,r,s),f++}return o(t),d}function JM(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")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(hM(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Bs(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=ZM(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function ZM(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function eL(e){return~-encodeURI(e).split(/%..|./).length}function tL(e){return eL(JSON.stringify(e))}var nr;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(nr||(nr={}));function Hs(e){return new wt(t=>{t(e)})}function Kc(e){return new wt((t,n)=>{n(e)})}class wt{__init(){this._state=nr.PENDING}__init2(){this._handlers=[]}constructor(t){wt.prototype.__init.call(this),wt.prototype.__init2.call(this),wt.prototype.__init3.call(this),wt.prototype.__init4.call(this),wt.prototype.__init5.call(this),wt.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new wt((r,s)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(o){s(o)}},i=>{if(!n)s(i);else try{r(n(i))}catch(o){s(o)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new wt((n,r)=>{let s,i;return this.then(o=>{i=!1,s=o,t&&t()},o=>{i=!0,s=o,t&&t()}).then(()=>{if(i){r(s);return}n(s)})})}__init3(){this._resolve=t=>{this._setResult(nr.RESOLVED,t)}}__init4(){this._reject=t=>{this._setResult(nr.REJECTED,t)}}__init5(){this._setResult=(t,n)=>{if(this._state===nr.PENDING){if(cv(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init6(){this._executeHandlers=()=>{if(this._state===nr.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===nr.RESOLVED&&n[1](this._value),this._state===nr.REJECTED&&n[2](this._value),n[0]=!0)})}}}function nL(e){const t=[];function n(){return e===void 0||t.length<e}function r(o){return t.splice(t.indexOf(o),1)[0]}function s(o){if(!n())return Kc(new Sn("Not adding Promise because buffer limit was reached."));const a=o();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new wt((a,l)=>{let c=t.length;if(!c)return a(!0);const d=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(f=>{Hs(f).then(()=>{--c||(clearTimeout(d),a(!0))},l)})})}return{$:t,add:s,drain:i}}function jh(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}const rL=["fatal","error","warning","log","info","debug"];function sL(e){return e==="warn"?"warning":rL.includes(e)?e:"log"}const uj=Al(),Im={nowSeconds:()=>Date.now()/1e3};function iL(){const{performance:e}=uj;if(!e||!e.now)return;const t=Date.now()-e.now();return{now:()=>e.now(),timeOrigin:t}}function oL(){try{return XM(module,"perf_hooks").performance}catch{return}}const kh=YM()?oL():iL(),qx=kh===void 0?Im:{nowSeconds:()=>(kh.timeOrigin+kh.now())/1e3},of=Im.nowSeconds.bind(Im),qs=qx.nowSeconds.bind(qx),Wn=(()=>{const{performance:e}=uj;if(!e||!e.now)return;const t=3600*1e3,n=e.now(),r=Date.now(),s=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=s<t,o=e.timing&&e.timing.navigationStart,l=typeof o=="number"?Math.abs(o+n-r):t,c=l<t;return i||c?s<=l?e.timeOrigin:o:r})(),Dm="baggage",cj="sentry-",aL=/^sentry-/,lL=8192;function uL(e){if(!as(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((r,s)=>{const i=Wx(s);return{...r,...i}},{});else{if(!e)return;t=Wx(e)}const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(aL)){const o=s.slice(cj.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function Mm(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${cj}${r}`]=s),n),{});return cL(t)}function Wx(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(t[n]=r,t),{})}function cL(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],s)=>{const i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,o=s===0?i:`${t},${i}`;return o.length>lL?t:o},"")}const dL=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function fL(e){if(!e)return;const t=e.match(dL);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function hL(e,t){const n=fL(e),r=uL(t),{traceId:s,parentSpanId:i,parentSampled:o}=n||{},a={traceId:s||Mt(),spanId:Mt().substring(16),sampled:o===void 0?!1:o};return i&&(a.parentSpanId=i),r&&(a.dsc=r),{traceparentData:n,dynamicSamplingContext:r,propagationContext:a}}function pv(e=Mt(),t=Mt().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function $l(e,t=[]){return[e,t]}function pL(e,t){const[n,r]=e;return[n,[...r,t]]}function Kx(e,t){const n=e[1];for(const r of n){const s=r[0].type;if(t(r,s))return!0}return!1}function Lm(e,t){return(t||new TextEncoder).encode(e)}function mL(e,t){const[n,r]=e;let s=JSON.stringify(n);function i(o){typeof s=="string"?s=typeof o=="string"?s+o:[Lm(s,t),o]:s.push(typeof o=="string"?Lm(o,t):o)}for(const o of r){const[a,l]=o;if(i(`
${JSON.stringify(a)}
`),typeof l=="string"||l instanceof Uint8Array)i(l);else{let c;try{c=JSON.stringify(l)}catch{c=JSON.stringify(Dr(l))}i(c)}}return typeof s=="string"?s:gL(s)}function gL(e){const t=e.reduce((s,i)=>s+i.length,0),n=new Uint8Array(t);let r=0;for(const s of e)n.set(s,r),r+=s.length;return n}function yL(e,t){const n=typeof e.data=="string"?Lm(e.data,t):e.data;return[ts({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const vL={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function Qx(e){return vL[e]}function dj(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function xL(e,t,n,r){const s=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&{dsn:sf(r)},...s&&{trace:ts({...s})}}}function bL(e,t,n){const r=[{type:"client_report"},{timestamp:n||of(),discarded_events:e}];return $l(t?{dsn:t}:{},[r])}const wL=60*1e3;function _L(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?wL:r-t}function SL(e,t){return e[t]||e.all||0}function EL(e,t,n=Date.now()){return SL(e,t)>n}function CL(e,{statusCode:t,headers:n},r=Date.now()){const s={...e},i=n&&n["x-sentry-rate-limits"],o=n&&n["retry-after"];if(i)for(const a of i.trim().split(",")){const[l,c]=a.split(":",2),d=parseInt(l,10),f=(isNaN(d)?60:d)*1e3;if(!c)s.all=r+f;else for(const h of c.split(";"))s[h]=r+f}else o?s.all=r+_L(o,r):t===429&&(s.all=r+60*1e3);return s}const mv="production";function jL(e){const t=qs(),n={sid:Mt(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>TL(n)};return e&&yo(n,e),n}function yo(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||qs(),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:Mt()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{const n=e.timestamp-e.started;e.duration=n>=0?n: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),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function kL(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),yo(e,n)}function TL(e){return ts({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const PL=100;class $s{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=Gx()}static clone(t){const n=new $s;return t&&(n._breadcrumbs=[...t._breadcrumbs],n._tags={...t._tags},n._extra={...t._extra},n._contexts={...t._contexts},n._user=t._user,n._level=t._level,n._span=t._span,n._session=t._session,n._transactionName=t._transactionName,n._fingerprint=t._fingerprint,n._eventProcessors=[...t._eventProcessors],n._requestSession=t._requestSession,n._attachments=[...t._attachments],n._sdkProcessingMetadata={...t._sdkProcessingMetadata},n._propagationContext={...t._propagationContext}),n}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&yo(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if(typeof t=="function"){const n=t(this);return n instanceof $s?n:this}return t instanceof $s?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...this._contexts,...t._contexts},t._user&&Object.keys(t._user).length&&(this._user=t._user),t._level&&(this._level=t._level),t._fingerprint&&(this._fingerprint=t._fingerprint),t._requestSession&&(this._requestSession=t._requestSession),t._propagationContext&&(this._propagationContext=t._propagationContext)):mo(t)&&(t=t,this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...this._contexts,...t.contexts},t.user&&(this._user=t.user),t.level&&(this._level=t.level),t.fingerprint&&(this._fingerprint=t.fingerprint),t.requestSession&&(this._requestSession=t.requestSession),t.propagationContext&&(this._propagationContext=t.propagationContext)),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._span=void 0,this._session=void 0,this._notifyScopeListeners(),this._attachments=[],this._propagationContext=Gx(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:PL;if(r<=0)return this;const s={timestamp:of(),...t};return this._breadcrumbs=[...this._breadcrumbs,s].slice(-r),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,n={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};const r=this._span.transaction;if(r){t.sdkProcessingMetadata={dynamicSamplingContext:r.getDynamicSamplingContext(),...t.sdkProcessingMetadata};const s=r.name;s&&(t.tags={transaction:s,...t.tags})}}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata,propagationContext:this._propagationContext},this._notifyEventProcessors([...fj(),...this._eventProcessors],t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}_notifyEventProcessors(t,n,r,s=0){return new wt((i,o)=>{const a=t[s];if(n===null||typeof a!="function")i(n);else{const l=a({...n},r);cv(l)?l.then(c=>this._notifyEventProcessors(t,c,r,s+1).then(i)).then(null,o):this._notifyEventProcessors(t,l,r,s+1).then(i).then(null,o)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?aj(t.fingerprint):[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function fj(){return ZC("globalEventProcessors",()=>[])}function hj(e){fj().push(e)}function Gx(){return{traceId:Mt(),spanId:Mt().substring(16),sampled:!1}}const pj=4,RL=100;class mj{constructor(t,n=new $s,r=pj){this._version=r,this._stack=[{scope:n}],t&&this.bindClient(t)}isOlderThan(t){return this._version<t}bindClient(t){const n=this.getStackTop();n.client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=$s.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){const n=this.pushScope();try{t(n)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){const r=this._lastEventId=n&&n.event_id?n.event_id:Mt(),s=new Error("Sentry syntheticException");return this._withClient((i,o)=>{i.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},o)}),r}captureMessage(t,n,r){const s=this._lastEventId=r&&r.event_id?r.event_id:Mt(),i=new Error(t);return this._withClient((o,a)=>{o.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},a)}),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:Mt();return t.type||(this._lastEventId=r),this._withClient((s,i)=>{s.captureEvent(t,{...n,event_id:r},i)}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){const{scope:r,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=RL}=s.getOptions&&s.getOptions()||{};if(o<=0)return;const l={timestamp:of(),...t},c=i?wM(()=>i(l,n)):l;c!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",c,n),r.addBreadcrumb(c,o))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n)}configureScope(t){const{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){const n=Yx(this);try{t(this)}finally{Yx(n)}}getIntegration(t){const n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return null}}startTransaction(t,n){return this._callExtensionMethod("startTransaction",t,n)}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const n=this.getStackTop().scope,r=n.getSession();r&&kL(r),this._sendSessionUpdate(),n.setSession()}startSession(t){const{scope:n,client:r}=this.getStackTop(),{release:s,environment:i=mv}=r&&r.getOptions()||{},{userAgent:o}=dn.navigator||{},a=jL({release:s,environment:i,user:n.getUser(),...o&&{userAgent:o},...t}),l=n.getSession&&n.getSession();return l&&l.status==="ok"&&yo(l,{status:"exited"}),this.endSession(),n.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:n}=this.getStackTop(),r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_withClient(t){const{scope:n,client:r}=this.getStackTop();r&&t(r,n)}_callExtensionMethod(t,...n){const s=Il().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[t]=="function")return s.extensions[t].apply(this,n)}}function Il(){return dn.__SENTRY__=dn.__SENTRY__||{extensions:{},hub:void 0},dn}function Yx(e){const t=Il(),n=Fm(t);return gj(t,e),n}function Ve(){const e=Il();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return NL(e)}function NL(e=Il()){return(!OL(e)||Fm(e).isOlderThan(pj))&&gj(e,new mj),Fm(e)}function OL(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Fm(e){return ZC("hub",()=>new mj,e)}function gj(e,t){if(!e)return!1;const n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function gv(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=Ve().getClient(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Dl(e){return(e||Ve()).getScope().getTransaction()}let Xx=!1;function AL(){Xx||(Xx=!0,zt("error",Um),zt("unhandledrejection",Um))}function Um(){const e=Dl();if(e){const t="internal_error";e.setStatus(t)}}Um.tag="sentry_tracingErrorCallback";class af{__init(){this.spans=[]}constructor(t=1e3){af.prototype.__init.call(this),this._maxlen=t}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class rr{__init2(){this.traceId=Mt()}__init3(){this.spanId=Mt().substring(16)}__init4(){this.startTimestamp=qs()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(t){if(rr.prototype.__init2.call(this),rr.prototype.__init3.call(this),rr.prototype.__init4.call(this),rr.prototype.__init5.call(this),rr.prototype.__init6.call(this),rr.prototype.__init7.call(this),!t)return this;t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp),t.instrumenter&&(this.instrumenter=t.instrumenter)}startChild(t){const n=new rr({...t,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});return n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n),n.transaction=this.transaction,n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setStatus(t){return this.status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t)),this.setData("http.response.status_code",t);const n=$L(t);return n!=="unknown_error"&&this.setStatus(n),this}isSuccess(){return this.status==="ok"}finish(t){this.endTimestamp=typeof t=="number"?t:qs()}toTraceparent(){return pv(this.traceId,this.spanId,this.sampled)}toContext(){return ts({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(t){return this.data=t.data||{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=t.spanId||this.spanId,this.startTimestamp=t.startTimestamp||this.startTimestamp,this.status=t.status,this.tags=t.tags||{},this.traceId=t.traceId||this.traceId,this}getTraceContext(){return ts({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return ts({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}function $L(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}function lf(e,t,n){const r=t.getOptions(),{publicKey:s}=t.getDsn()||{},{segment:i}=n&&n.getUser()||{},o=ts({environment:r.environment||mv,release:r.release,user_segment:i,public_key:s,trace_id:e});return t.emit&&t.emit("createDsc",o),o}class Mi extends rr{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(t,n){super(t),Mi.prototype.__init.call(this),Mi.prototype.__init2.call(this),Mi.prototype.__init3.call(this),this._hub=n||Ve(),this._name=t.name||"",this.metadata={source:"custom",...t.metadata,spanMetadata:{}},this._trimEnd=t.trimEnd,this.transaction=this;const r=this.metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(t){this.setName(t)}setName(t,n="custom"){this._name=t,this.metadata.source=n}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new af(t)),this.spanRecorder.add(this)}setContext(t,n){n===null?delete this._contexts[t]:this._contexts[t]=n}setMeasurement(t,n,r=""){this._measurements[t]={value:n,unit:r}}setMetadata(t){this.metadata={...this.metadata,...t}}finish(t){if(this.endTimestamp!==void 0)return;this.name||(this.name="<unlabeled transaction>"),super.finish(t);const n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this.sampled!==!0){n&&n.recordDroppedEvent("sample_rate","transaction");return}const r=this.spanRecorder?this.spanRecorder.spans.filter(a=>a!==this&&a.endTimestamp):[];this._trimEnd&&r.length>0&&(this.endTimestamp=r.reduce((a,l)=>a.endTimestamp&&l.endTimestamp?a.endTimestamp>l.endTimestamp?a:l:a).endTimestamp);const s=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:r,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...s,dynamicSamplingContext:this.getDynamicSamplingContext()},...s.source&&{transaction_info:{source:s.source}}};return Object.keys(this._measurements).length>0&&(i.measurements=this._measurements),this._hub.captureEvent(i)}toContext(){const t=super.toContext();return ts({...t,name:this.name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this.name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const t=this._hub||Ve(),n=t.getClient();if(!n)return{};const r=t.getScope(),s=lf(this.traceId,n,r),i=this.metadata.sampleRate;i!==void 0&&(s.sample_rate=`${i}`);const o=this.metadata.source;return o&&o!=="url"&&(s.transaction=this.name),this.sampled!==void 0&&(s.sampled=String(this.sampled)),s}setHub(t){this._hub=t}}const Xu={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},IL="finishReason",ii=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class DL extends af{constructor(t,n,r,s){super(s),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=r}add(t){t.spanId!==this.transactionSpanId&&(t.finish=n=>{t.endTimestamp=typeof n=="number"?n:qs(),this._popActivity(t.spanId)},t.endTimestamp===void 0&&this._pushActivity(t.spanId)),super.add(t)}}class Mr extends Mi{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=ii[4]}constructor(t,n,r=Xu.idleTimeout,s=Xu.finalTimeout,i=Xu.heartbeatInterval,o=!1){super(t,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=s,this._heartbeatInterval=i,this._onScope=o,Mr.prototype.__init.call(this),Mr.prototype.__init2.call(this),Mr.prototype.__init3.call(this),Mr.prototype.__init4.call(this),Mr.prototype.__init5.call(this),Mr.prototype.__init6.call(this),o&&n.configureScope(a=>a.setSpan(this)),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=ii[3],this.finish())},this._finalTimeout)}finish(t=qs()){if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setTag(IL,this._finishReason),this.spanRecorder){for(const n of this._beforeFinishCallbacks)n(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(n=>n.spanId===this.spanId?!0:(n.endTimestamp||(n.endTimestamp=t,n.setStatus("cancelled")),n.startTimestamp<t))}if(this._onScope){const n=this._idleHub.getScope();n.getTransaction()===this&&n.setSpan(void 0)}return super.finish(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){const n=s=>{this._finished||this._pushActivity(s)},r=s=>{this._finished||this._popActivity(s)};this.spanRecorder=new DL(n,r,this.spanId,t),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=ii[5],this.finish(t)))}setFinishReason(t){this._finishReason=t}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=ii[1],this.finish(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),this.activities[t]=!0}_popActivity(t){if(this.activities[t]&&delete this.activities[t],Object.keys(this.activities).length===0){const n=qs();this._idleTimeoutCanceledPermanently?(this._finishReason=ii[5],this.finish(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(this.setStatus("deadline_exceeded"),this._finishReason=ii[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function ML(){const t=this.getScope().getSpan();return t?{"sentry-trace":t.toTraceparent()}:{}}function yj(e,t,n){if(!gv(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setMetadata({sampleRate:Number(e.sampled)}),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setMetadata({sampleRate:Number(r)})):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setMetadata({sampleRate:Number(r)})):(r=1,e.setMetadata({sampleRate:r})),!LL(r)||!r?(e.sampled=!1,e):(e.sampled=Math.random()<r,e.sampled,e)}function LL(e){return!(JC(e)||!(typeof e=="number"||typeof e=="boolean")||e<0||e>1)}function FL(e,t){const n=this.getClient(),r=n&&n.getOptions()||{},s=r.instrumenter||"sentry",i=e.instrumenter||"sentry";s!==i&&(e.sampled=!1);let o=new Mi(e,this);return o=yj(o,r,{parentSampled:e.parentSampled,transactionContext:e,...t}),o.sampled&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",o),o}function Jx(e,t,n,r,s,i,o){const a=e.getClient(),l=a&&a.getOptions()||{};let c=new Mr(t,e,n,r,o,s);return c=yj(c,l,{parentSampled:t.parentSampled,transactionContext:t,...i}),c.sampled&&c.initSpanRecorder(l._experiments&&l._experiments.maxSpans),a&&a.emit&&a.emit("startTransaction",c),c}function UL(){const e=Il();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=FL),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=ML),AL())}function zL(e,t){return Ve().captureException(e,{captureContext:t})}function VL(e){Ve().withScope(e)}const BL="7";function HL(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function qL(e){return`${HL(e)}${e.projectId}/envelope/`}function WL(e,t){return TM({sentry_key:e.publicKey,sentry_version:BL,...t&&{sentry_client:`${t.name}/${t.version}`}})}function KL(e,t={}){const n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${qL(e)}?${WL(e,r)}`}function QL(e,t){return t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]]),e}function GL(e,t,n,r){const s=dj(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&{dsn:sf(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return $l(i,[o])}function YL(e,t,n,r){const s=dj(n),i=e.type&&e.type!=="replay_event"?e.type:"event";QL(e,n&&n.sdk);const o=xL(e,s,r,t);return delete e.sdkProcessingMetadata,$l(o,[[{type:i},e]])}const Zx=[];function XL(e){const t={};return e.forEach(n=>{const{name:r}=n,s=t[r];s&&!s.isDefaultInstance&&n.isDefaultInstance||(t[r]=n)}),Object.keys(t).map(n=>t[n])}function JL(e){const t=e.defaultIntegrations||[],n=e.integrations;t.forEach(o=>{o.isDefaultInstance=!0});let r;Array.isArray(n)?r=[...t,...n]:typeof n=="function"?r=aj(n(t)):r=t;const s=XL(r),i=e6(s,o=>o.name==="Debug");if(i!==-1){const[o]=s.splice(i,1);s.push(o)}return s}function ZL(e){const t={};return e.forEach(n=>{n&&vj(n,t)}),t}function vj(e,t){t[e.name]=e,Zx.indexOf(e.name)===-1&&(e.setupOnce(hj,Ve),Zx.push(e.name))}function e6(e,t){for(let n=0;n<e.length;n++)if(t(e[n])===!0)return n;return-1}function t6(e,t,n,r){const{normalizeDepth:s=3,normalizeMaxBreadth:i=1e3}=e,o={...t,event_id:t.event_id||n.event_id||Mt(),timestamp:t.timestamp||of()},a=n.integrations||e.integrations.map(d=>d.name);n6(o,e),i6(o,a),t.type===void 0&&r6(o,e.stackParser);let l=r;n.captureContext&&(l=$s.clone(l).update(n.captureContext));let c=Hs(o);if(l){if(l.getAttachments){const d=[...n.attachments||[],...l.getAttachments()];d.length&&(n.attachments=d)}c=l.applyToEvent(o,n)}return c.then(d=>(d&&s6(d),typeof s=="number"&&s>0?o6(d,s,i):d))}function n6(e,t){const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:mv),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=Di(e.message,i));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=Di(o.value,i));const a=e.request;a&&a.url&&(a.url=Di(a.url,i))}const eb=new WeakMap;function r6(e,t){const n=dn._sentryDebugIds;if(!n)return;let r;const s=eb.get(t);s?r=s:(r=new Map,eb.set(t,r));const i=Object.keys(n).reduce((o,a)=>{let l;const c=r.get(a);c?l=c:(l=t(a),r.set(a,l));for(let d=l.length-1;d>=0;d--){const f=l[d];if(f.filename){o[f.filename]=n[a];break}}return o},{});try{e.exception.values.forEach(o=>{o.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function s6(e){const t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(s=>{s.debug_id&&(s.abs_path?t[s.abs_path]=s.debug_id:s.filename&&(t[s.filename]=s.debug_id),delete s.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function i6(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function o6(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:Dr(s.data,t,n)}}))},...e.user&&{user:Dr(e.user,t,n)},...e.contexts&&{contexts:Dr(e.contexts,t,n)},...e.extra&&{extra:Dr(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=Dr(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>(s.data&&(s.data=Dr(s.data,t,n)),s))),r}class bs{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(t){if(bs.prototype.__init.call(this),bs.prototype.__init2.call(this),bs.prototype.__init3.call(this),bs.prototype.__init4.call(this),bs.prototype.__init5.call(this),this._options=t,t.dsn&&(this._dsn=kM(t.dsn)),this._dsn){const n=KL(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){if(Hx(t))return;let s=n&&n.event_id;return this._process(this.eventFromException(t,n).then(i=>this._captureEvent(i,n,r)).then(i=>{s=i})),s}captureMessage(t,n,r,s){let i=r&&r.event_id;const o=XC(t)?this.eventFromMessage(String(t),n,r):this.eventFromException(t,r);return this._process(o.then(a=>this._captureEvent(a,r,s)).then(a=>{i=a})),i}captureEvent(t,n,r){if(n&&n.originalException&&Hx(n.originalException))return;let s=n&&n.event_id;return this._process(this._captureEvent(t,n,r).then(i=>{s=i})),s}captureSession(t){this._isEnabled()&&(typeof t.release!="string"||(this.sendSession(t),yo(t,{init:!1})))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const n=this._transport;return n?this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s)):Hs(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,n))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=ZL(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return null}}addIntegration(t){vj(t,this._integrations)}sendEvent(t,n={}){if(this._dsn){let r=YL(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=pL(r,yL(i,this._options.transportOptions&&this._options.transportOptions.textEncoder));const s=this._sendEnvelope(r);s&&s.then(i=>this.emit("afterSendEvent",t,i),null)}}sendSession(t){if(this._dsn){const n=GL(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=`${t}:${n}`;this._outcomes[s]=this._outcomes[s]+1||1}}on(t,n){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(n)}emit(t,...n){this._hooks[t]&&this._hooks[t].forEach(r=>r(...n))}_updateSessionFromEvent(t,n){let r=!1,s=!1;const i=n.exception&&n.exception.values;if(i){s=!0;for(const l of i){const c=l.mechanism;if(c&&c.handled===!1){r=!0;break}}}const o=t.status==="ok";(o&&t.errors===0||o&&r)&&(yo(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new wt(n=>{let r=0;const s=1,i=setInterval(()=>{this._numProcessing==0?(clearInterval(i),n(!0)):(r+=s,t&&r>=t&&(clearInterval(i),n(!1)))},s)})}_isEnabled(){return this.getOptions().enabled!==!1&&this._dsn!==void 0}_prepareEvent(t,n,r){const s=this.getOptions(),i=Object.keys(this._integrations);return!n.integrations&&i.length>0&&(n.integrations=i),t6(s,t,n,r).then(o=>{if(o===null)return o;const{propagationContext:a}=o.sdkProcessingMetadata||{};if(!(o.contexts&&o.contexts.trace)&&a){const{traceId:c,spanId:d,parentSpanId:f,dsc:h}=a;o.contexts={trace:{trace_id:c,span_id:d,parent_span_id:f},...o.contexts};const p=h||lf(c,this,r);o.sdkProcessingMetadata={dynamicSamplingContext:p,...o.sdkProcessingMetadata}}return o})}_captureEvent(t,n={},r){return this._processEvent(t,n,r).then(s=>s.event_id,s=>{})}_processEvent(t,n,r){const s=this.getOptions(),{sampleRate:i}=s;if(!this._isEnabled())return Kc(new Sn("SDK not enabled, will not capture event.","log"));const o=bj(t),a=xj(t),l=t.type||"error",c=`before send for type \`${l}\``;if(a&&typeof i=="number"&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),Kc(new Sn(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const d=l==="replay_event"?"replay":l;return this._prepareEvent(t,n,r).then(f=>{if(f===null)throw this.recordDroppedEvent("event_processor",d,t),new Sn("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return f;const p=l6(s,f,n);return a6(p,c)}).then(f=>{if(f===null)throw this.recordDroppedEvent("before_send",d,t),new Sn(`${c} returned \`null\`, will not send event.`,"log");const h=r&&r.getSession();!o&&h&&this._updateSessionFromEvent(h,f);const p=f.transaction_info;if(o&&p&&f.transaction!==t.transaction){const g="custom";f.transaction_info={...p,source:g}}return this.sendEvent(f,n),f}).then(null,f=>{throw f instanceof Sn?f:(this.captureException(f,{data:{__sentry__:!0},originalException:f}),new Sn(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
Reason: ${f}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",t),this._transport.send(t).then(null,n=>{})}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(n=>{const[r,s]=n.split(":");return{reason:r,category:s,quantity:t[n]}})}}function a6(e,t){const n=`${t} must return \`null\` or a valid event.`;if(cv(e))return e.then(r=>{if(!mo(r)&&r!==null)throw new Sn(n);return r},r=>{throw new Sn(`${t} rejected with ${r}`)});if(!mo(e)&&e!==null)throw new Sn(n);return e}function l6(e,t,n){const{beforeSend:r,beforeSendTransaction:s}=e;return xj(t)&&r?r(t,n):bj(t)&&s?s(t,n):t}function xj(e){return e.type===void 0}function bj(e){return e.type==="transaction"}function u6(e,t){t.debug===!0&&console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.");const n=Ve();n.getScope().update(t.initialScope);const s=new e(t);n.bindClient(s)}const c6=30;function wj(e,t,n=nL(e.bufferSize||c6)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(Kx(o,(f,h)=>{const p=Qx(h);if(EL(r,p)){const g=tb(f,h);e.recordDroppedEvent("ratelimit_backoff",p,g)}else a.push(f)}),a.length===0)return Hs();const l=$l(o[0],a),c=f=>{Kx(l,(h,p)=>{const g=tb(h,p);e.recordDroppedEvent(f,Qx(p),g)})},d=()=>t({body:mL(l,e.textEncoder)}).then(f=>(f.statusCode!==void 0&&(f.statusCode<200||f.statusCode>=300),r=CL(r,f),f),f=>{throw c("network_error"),f});return n.add(d).then(f=>f,f=>{if(f instanceof Sn)return c("queue_overflow"),Hs();throw f})}return i.__sentry__baseTransport__=!0,{send:i,flush:s}}function tb(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}const Qc="7.60.0";let nb;class rl{constructor(){rl.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=rl.id}setupOnce(){nb=Function.prototype.toString;try{Function.prototype.toString=function(...t){const n=hv(this)||this;return nb.apply(n,t)}}catch{}}}rl.__initStatic();const d6=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],f6=[/^.*healthcheck.*$/,/^.*healthy.*$/,/^.*live.*$/,/^.*ready.*$/,/^.*heartbeat.*$/,/^.*\/health$/,/^.*\/healthz$/];class Li{static __initStatic(){this.id="InboundFilters"}__init(){this.name=Li.id}constructor(t={}){this._options=t,Li.prototype.__init.call(this)}setupOnce(t,n){const r=s=>{const i=n();if(i){const o=i.getIntegration(Li);if(o){const a=i.getClient(),l=a?a.getOptions():{},c=h6(o._options,l);return p6(s,c)?null:s}}return s};r.id=this.name,t(r)}}Li.__initStatic();function h6(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:d6],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:f6],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function p6(e,t){return!!(t.ignoreInternal&&b6(e)||m6(e,t.ignoreErrors)||g6(e,t.ignoreTransactions)||y6(e,t.denyUrls)||!v6(e,t.allowUrls))}function m6(e,t){return e.type||!t||!t.length?!1:x6(e).some(n=>Ol(n,t))}function g6(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Ol(n,t):!1}function y6(e,t){if(!t||!t.length)return!1;const n=_j(e);return n?Ol(n,t):!1}function v6(e,t){if(!t||!t.length)return!0;const n=_j(e);return n?Ol(n,t):!0}function x6(e){if(e.message)return[e.message];if(e.exception){const{values:t}=e.exception;try{const{type:n="",value:r=""}=t&&t[t.length-1]||{};return[`${r}`,`${n}: ${r}`]}catch{return[]}}return[]}function b6(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function w6(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function _j(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?w6(t):null}catch{return null}}const xe=dn;let zm=0;function Sj(){return zm>0}function _6(){zm++,setTimeout(()=>{zm--})}function vo(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return s;if(hv(e))return e}catch{return e}const r=function(){const s=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);const i=s.map(o=>vo(o,t));return e.apply(this,i)}catch(i){throw _6(),VL(o=>{o.addEventProcessor(a=>(t.mechanism&&(Am(a,void 0,void 0),nl(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),zL(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}tj(r,e),fv(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}function Ej(e,t){const n=yv(e,t),r={type:t&&t.name,value:j6(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function S6(e,t,n,r){const i=Ve().getClient(),o=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:rf(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:P6(t,{isUnhandledRejection:r})}]},extra:{__serialized__:lj(t,o)}};if(n){const l=yv(e,n);l.length&&(a.exception.values[0].stacktrace={frames:l})}return a}function Th(e,t){return{exception:{values:[Ej(e,t)]}}}function yv(e,t){const n=t.stacktrace||t.stack||"",r=C6(t);try{return e(n,r)}catch{}return[]}const E6=/Minified React error #\d+;/i;function C6(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(E6.test(e.message))return 1}return 0}function j6(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function k6(e,t,n,r){const s=n&&n.syntheticException||void 0,i=vv(e,t,s,r);return nl(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Hs(i)}function T6(e,t,n="info",r,s){const i=r&&r.syntheticException||void 0,o=Vm(e,t,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Hs(o)}function vv(e,t,n,r,s){let i;if(uv(t)&&t.error)return Th(e,t.error);if($x(t)||cM(t)){const o=t;if("stack"in t)i=Th(e,t);else{const a=o.name||($x(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;i=Vm(e,l,n,r),Am(i,l)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return YC(t)?Th(e,t):mo(t)||rf(t)?(i=S6(e,t,n,s),nl(i,{synthetic:!0}),i):(i=Vm(e,t,n,r),Am(i,`${t}`,void 0),nl(i,{synthetic:!0}),i)}function Vm(e,t,n,r){const s={message:t};if(r&&n){const i=yv(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]})}return s}function P6(e,{isUnhandledRejection:t}){const n=PM(e),r=t?"promise rejection":"exception";return uv(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:rf(e)?`Event \`${R6(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function R6(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}const rb=1024,Cj="Breadcrumbs";class sl{static __initStatic(){this.id=Cj}__init(){this.name=sl.id}constructor(t){sl.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){this.options.console&&zt("console",O6),this.options.dom&&zt("dom",N6(this.options.dom)),this.options.xhr&&zt("xhr",A6),this.options.fetch&&zt("fetch",$6),this.options.history&&zt("history",I6)}addSentryBreadcrumb(t){this.options.sentry&&Ve().addBreadcrumb({category:`sentry.${t.type==="transaction"?"transaction":"event"}`,event_id:t.event_id,level:t.level,message:KM(t)},{event:t})}}sl.__initStatic();function N6(e){function t(n){let r,s=typeof e=="object"?e.serializeAttribute:void 0,i=typeof e=="object"&&typeof e.maxStringLength=="number"?e.maxStringLength:void 0;i&&i>rb&&(i=rb),typeof s=="string"&&(s=[s]);try{const o=n.event;r=D6(o)?go(o.target,{keyAttrs:s,maxStringLength:i}):go(o,{keyAttrs:s,maxStringLength:i})}catch{r="<unknown>"}r.length!==0&&Ve().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return t}function O6(e){for(let n=0;n<e.args.length;n++)if(e.args[n]==="ref=Ref<"){e.args[n+1]="viewRef";break}const t={category:"console",data:{arguments:e.args,logger:"console"},level:sL(e.level),message:Ix(e.args," ")};if(e.level==="assert")if(e.args[0]===!1)t.message=`Assertion failed: ${Ix(e.args.slice(1)," ")||"console.assert"}`,t.data.arguments=e.args.slice(1);else return;Ve().addBreadcrumb(t,{input:e.args,level:e.level})}function A6(e){const{startTimestamp:t,endTimestamp:n}=e,r=e.xhr[Ci];if(!t||!n||!r)return;const{method:s,url:i,status_code:o,body:a}=r,l={method:s,url:i,status_code:o},c={xhr:e.xhr,input:a,startTimestamp:t,endTimestamp:n};Ve().addBreadcrumb({category:"xhr",data:l,type:"http"},c)}function $6(e){const{startTimestamp:t,endTimestamp:n}=e;if(n&&!(e.fetchData.url.match(/sentry_key/)&&e.fetchData.method==="POST"))if(e.error){const r=e.fetchData,s={data:e.error,input:e.args,startTimestamp:t,endTimestamp:n};Ve().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},s)}else{const r={...e.fetchData,status_code:e.response&&e.response.status},s={input:e.args,response:e.response,startTimestamp:t,endTimestamp:n};Ve().addBreadcrumb({category:"fetch",data:r,type:"http"},s)}}function I6(e){let t=e.from,n=e.to;const r=jh(xe.location.href);let s=jh(t);const i=jh(n);s.path||(s=r),r.protocol===i.protocol&&r.host===i.host&&(n=i.relative),r.protocol===s.protocol&&r.host===s.host&&(t=s.relative),Ve().addBreadcrumb({category:"navigation",data:{from:t,to:n}})}function D6(e){return!!e&&!!e.target}function M6(e,{metadata:t,tunnel:n,dsn:r}){const s={event_id:e.event_id,sent_at:new Date().toISOString(),...t&&t.sdk&&{sdk:{name:t.sdk.name,version:t.sdk.version}},...!!n&&!!r&&{dsn:sf(r)}},i=L6(e);return $l(s,[i])}function L6(e){return[{type:"user_report"},e]}class F6 extends bs{constructor(t){const n=xe.SENTRY_SDK_SOURCE||GM();t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${n}:@sentry/browser`,version:Qc}],version:Qc},super(t),t.sendClientReports&&xe.document&&xe.document.addEventListener("visibilitychange",()=>{xe.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return k6(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return T6(this._options.stackParser,t,n,r,this._options.attachStacktrace)}sendEvent(t,n){const r=this.getIntegrationById(Cj);r&&r.addSentryBreadcrumb&&r.addSentryBreadcrumb(t),super.sendEvent(t,n)}captureUserFeedback(t){if(!this._isEnabled())return;const n=M6(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(t,n,r){return t.platform=t.platform||"javascript",super._prepareEvent(t,n,r)}_flushOutcomes(){const t=this._clearOutcomes();if(t.length===0||!this._dsn)return;const n=bL(t,this._options.tunnel&&sf(this._dsn));this._sendEnvelope(n)}}let la;function U6(){if(la)return la;if(Nm(xe.fetch))return la=xe.fetch.bind(xe);const e=xe.document;let t=xe.fetch;if(e&&typeof e.createElement=="function")try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(t=r.fetch),e.head.removeChild(n)}catch{}return la=t.bind(xe)}function z6(){la=void 0}function V6(e,t=U6()){let n=0,r=0;function s(i){const o=i.body.length;n+=o,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:e.headers,keepalive:n<=6e4&&r<15,...e.fetchOptions};try{return t(e.url,a).then(l=>(n-=o,r--,{statusCode:l.status,headers:{"x-sentry-rate-limits":l.headers.get("X-Sentry-Rate-Limits"),"retry-after":l.headers.get("Retry-After")}}))}catch(l){return z6(),n-=o,r--,Kc(l)}}return wj(e,s)}const B6=4;function H6(e){function t(n){return new wt((r,s)=>{const i=new XMLHttpRequest;i.onerror=s,i.onreadystatechange=()=>{i.readyState===B6&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",e.url);for(const o in e.headers)Object.prototype.hasOwnProperty.call(e.headers,o)&&i.setRequestHeader(o,e.headers[o]);i.send(n.body)})}return wj(e,t)}const uf="?",q6=30,W6=40,K6=50;function xv(e,t,n,r){const s={filename:e,function:t,in_app:!0};return n!==void 0&&(s.lineno=n),r!==void 0&&(s.colno=r),s}const Q6=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,G6=/\((\S*)(?::(\d+))(?::(\d+))\)/,Y6=e=>{const t=Q6.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const i=G6.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}const[r,s]=jj(t[1]||uf,t[2]);return xv(s,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},X6=[q6,Y6],J6=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Z6=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,eF=e=>{const t=J6.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=Z6.exec(t[3]);i&&(t[1]=t[1]||"eval",t[3]=i[1],t[4]=i[2],t[5]="")}let r=t[3],s=t[1]||uf;return[s,r]=jj(s,r),xv(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},tF=[K6,eF],nF=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,rF=e=>{const t=nF.exec(e);return t?xv(t[2],t[1]||uf,+t[3],t[4]?+t[4]:void 0):void 0},sF=[W6,rF],iF=[X6,tF,sF],oF=sj(...iF),jj=(e,t)=>{const n=e.indexOf("safari-extension")!==-1,r=e.indexOf("safari-web-extension")!==-1;return n||r?[e.indexOf("@")!==-1?e.split("@")[0]:uf,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]};class ns{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=ns.id}__init2(){this._installFunc={onerror:aF,onunhandledrejection:lF}}constructor(t){ns.prototype.__init.call(this),ns.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){Error.stackTraceLimit=50;const t=this._options;for(const n in t){const r=this._installFunc[n];r&&t[n]&&(r(),this._installFunc[n]=void 0)}}}ns.__initStatic();function aF(){zt("error",e=>{const[t,n,r]=Pj();if(!t.getIntegration(ns))return;const{msg:s,url:i,line:o,column:a,error:l}=e;if(Sj()||l&&l.__sentry_own_request__)return;const c=l===void 0&&as(s)?cF(s,i,o,a):kj(vv(n,l||s,void 0,r,!1),i,o,a);c.level="error",Tj(t,l,c,"onerror")})}function lF(){zt("unhandledrejection",e=>{const[t,n,r]=Pj();if(!t.getIntegration(ns))return;let s=e;try{"reason"in e?s=e.reason:"detail"in e&&"reason"in e.detail&&(s=e.detail.reason)}catch{}if(Sj()||s&&s.__sentry_own_request__)return!0;const i=XC(s)?uF(s):vv(n,s,void 0,r,!0);i.level="error",Tj(t,s,i,"onunhandledrejection")})}function uF(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function cF(e,t,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=uv(e)?e.message:e,o="Error";const a=i.match(s);return a&&(o=a[1],i=a[2]),kj({exception:{values:[{type:o,value:i}]}},t,n,r)}function kj(e,t,n,r){const s=e.exception=e.exception||{},i=s.values=s.values||[],o=i[0]=i[0]||{},a=o.stacktrace=o.stacktrace||{},l=a.frames=a.frames||[],c=isNaN(parseInt(r,10))?void 0:r,d=isNaN(parseInt(n,10))?void 0:n,f=as(t)&&t.length>0?t:xM();return l.length===0&&l.push({colno:c,filename:f,function:"?",in_app:!0,lineno:d}),e}function Tj(e,t,n,r){nl(n,{handled:!1,type:r}),e.captureEvent(n,{originalException:t})}function Pj(){const e=Ve(),t=e.getClient(),n=t&&t.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[e,n.stackParser,n.attachStacktrace]}const dF=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class il{static __initStatic(){this.id="TryCatch"}__init(){this.name=il.id}constructor(t){il.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){this._options.setTimeout&&lt(xe,"setTimeout",sb),this._options.setInterval&&lt(xe,"setInterval",sb),this._options.requestAnimationFrame&&lt(xe,"requestAnimationFrame",fF),this._options.XMLHttpRequest&&"XMLHttpRequest"in xe&&lt(XMLHttpRequest.prototype,"send",hF);const t=this._options.eventTarget;t&&(Array.isArray(t)?t:dF).forEach(pF)}}il.__initStatic();function sb(e){return function(...t){const n=t[0];return t[0]=vo(n,{mechanism:{data:{function:Bs(e)},handled:!0,type:"instrument"}}),e.apply(this,t)}}function fF(e){return function(t){return e.apply(this,[vo(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Bs(e)},handled:!0,type:"instrument"}})])}}function hF(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&lt(n,s,function(i){const o={mechanism:{data:{function:s,handler:Bs(i)},handled:!0,type:"instrument"}},a=hv(i);return a&&(o.mechanism.data.handler=Bs(a)),vo(i,o)})}),e.apply(this,t)}}function pF(e){const t=xe,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(lt(n,"addEventListener",function(r){return function(s,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=vo(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Bs(i),target:e},handled:!0,type:"instrument"}}))}catch{}return r.apply(this,[s,vo(i,{mechanism:{data:{function:"addEventListener",handler:Bs(i),target:e},handled:!0,type:"instrument"}}),o])}}),lt(n,"removeEventListener",function(r){return function(s,i,o){const a=i;try{const l=a&&a.__sentry_wrapped__;l&&r.call(this,s,l,o)}catch{}return r.call(this,s,a,o)}}))}const mF="cause",gF=5;class Fi{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=Fi.id}constructor(t={}){Fi.prototype.__init.call(this),this._key=t.key||mF,this._limit=t.limit||gF}setupOnce(t,n){t((r,s)=>{const i=n(),o=i.getClient(),a=i.getIntegration(Fi);if(!o||!a)return r;const l=o.getOptions();return mM(Ej,l.stackParser,l.maxValueLength,a._key,a._limit,r,s),r})}}Fi.__initStatic();class Ui{constructor(){Ui.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Ui.id}setupOnce(){hj(t=>{if(Ve().getIntegration(Ui)){if(!xe.navigator&&!xe.location&&!xe.document)return t;const n=t.request&&t.request.url||xe.location&&xe.location.href,{referrer:r}=xe.document||{},{userAgent:s}=xe.navigator||{},i={...t.request&&t.request.headers,...r&&{Referer:r},...s&&{"User-Agent":s}},o={...t.request,...n&&{url:n},headers:i};return{...t,request:o}}return t})}}Ui.__initStatic();class zi{constructor(){zi.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=zi.id}setupOnce(t,n){const r=s=>{if(s.type)return s;const i=n().getIntegration(zi);if(i){try{if(yF(s,i._previousEvent))return null}catch{return i._previousEvent=s}return i._previousEvent=s}return s};r.id=this.name,t(r)}}zi.__initStatic();function yF(e,t){return t?!!(vF(e,t)||xF(e,t)):!1}function vF(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Nj(e,t)||!Rj(e,t))}function xF(e,t){const n=ib(t),r=ib(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Nj(e,t)||!Rj(e,t))}function Rj(e,t){let n=ob(e),r=ob(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let s=0;s<r.length;s++){const i=r[s],o=n[s];if(i.filename!==o.filename||i.lineno!==o.lineno||i.colno!==o.colno||i.function!==o.function)return!1}return!0}function Nj(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function ib(e){return e.exception&&e.exception.values&&e.exception.values[0]}function ob(e){const t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}const bF=[new Li,new rl,new il,new sl,new ns,new Fi,new zi,new Ui];function wF(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=bF),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),xe.SENTRY_RELEASE&&xe.SENTRY_RELEASE.id&&(e.release=xe.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:RM(e.stackParser||oF),integrations:JL(e),transport:e.transport||(ij()?V6:H6)};u6(F6,t),e.autoSessionTracking&&_F()}function ab(e){e.startSession({ignoreDuration:!0}),e.captureSession()}function _F(){if(typeof xe.document>"u")return;const e=Ve();e.captureSession&&(ab(e),zt("history",({from:t,to:n})=>{t===void 0||t===n||ab(Ve())}))}const be=dn;function SF(){be&&be.document&&be.document.addEventListener("visibilitychange",()=>{const e=Dl();if(be.document.hidden&&e){const t="cancelled";e.status||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.finish()}})}const bv=(e,t,n)=>{let r,s;return i=>{t.value>=0&&(i||n)&&(s=t.value-(r||0),(s||r===void 0)&&(r=t.value,t.delta=s,e(t)))}},EF=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,CF=()=>{const e=be.performance.timing,t=be.performance.navigation.type,n={entryType:"navigation",startTime:0,type:t==2?"back_forward":t===1?"reload":"navigate"};for(const r in e)r!=="navigationStart"&&r!=="toJSON"&&(n[r]=Math.max(e[r]-e.navigationStart,0));return n},Oj=()=>be.__WEB_VITALS_POLYFILL__?be.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||CF()):be.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Aj=()=>{const e=Oj();return e&&e.activationStart||0},wv=(e,t)=>{const n=Oj();let r="navigate";return n&&(be.document.prerendering||Aj()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:EF(),navigationType:r}},Ml=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{t(s.getEntries())});return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch{}},cf=(e,t)=>{const n=r=>{(r.type==="pagehide"||be.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},jF=e=>{const t=wv("CLS",0);let n,r=0,s=[];const i=a=>{a.forEach(l=>{if(!l.hadRecentInput){const c=s[0],d=s[s.length-1];r&&s.length!==0&&l.startTime-d.startTime<1e3&&l.startTime-c.startTime<5e3?(r+=l.value,s.push(l)):(r=l.value,s=[l]),r>t.value&&(t.value=r,t.entries=s,n&&n())}})},o=Ml("layout-shift",i);if(o){n=bv(e,t);const a=()=>{i(o.takeRecords()),n(!0)};return cf(a),a}};let Ju=-1;const kF=()=>be.document.visibilityState==="hidden"&&!be.document.prerendering?0:1/0,TF=()=>{cf(({timeStamp:e})=>{Ju=e},!0)},_v=()=>(Ju<0&&(Ju=kF(),TF()),{get firstHiddenTime(){return Ju}}),PF=e=>{const t=_v(),n=wv("FID");let r;const s=a=>{a.startTime<t.firstHiddenTime&&(n.value=a.processingStart-a.startTime,n.entries.push(a),r(!0))},i=a=>{a.forEach(s)},o=Ml("first-input",i);r=bv(e,n),o&&cf(()=>{i(o.takeRecords()),o.disconnect()},!0)},lb={},RF=e=>{const t=_v(),n=wv("LCP");let r;const s=o=>{const a=o[o.length-1];if(a){const l=Math.max(a.startTime-Aj(),0);l<t.firstHiddenTime&&(n.value=l,n.entries=[a],r())}},i=Ml("largest-contentful-paint",s);if(i){r=bv(e,n);const o=()=>{lb[n.id]||(s(i.takeRecords()),i.disconnect(),lb[n.id]=!0,r(!0))};return["keydown","click"].forEach(a=>{addEventListener(a,o,{once:!0,capture:!0})}),cf(o,!0),o}};function Ph(e){return typeof e=="number"&&isFinite(e)}function xo(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}function Ye(e){return e/1e3}function $j(){return be&&be.addEventListener&&be.performance}let ub=0,Me={},Mn,Ea;function NF(){const e=$j();if(e&&Wn){e.mark&&be.performance.mark("sentry-tracing-init"),DF();const t=$F(),n=IF();return()=>{t&&t(),n&&n()}}return()=>{}}function OF(){Ml("longtask",t=>{for(const n of t){const r=Dl();if(!r)return;const s=Ye(Wn+n.startTime),i=Ye(n.duration);r.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:s,endTimestamp:s+i})}})}function AF(){Ml("event",t=>{for(const n of t){const r=Dl();if(!r)return;if(n.name==="click"){const s=Ye(Wn+n.startTime),i=Ye(n.duration);r.startChild({description:go(n.target),op:`ui.interaction.${n.name}`,startTimestamp:s,endTimestamp:s+i})}}},{durationThreshold:0})}function $F(){return jF(e=>{const t=e.entries.pop();t&&(Me.cls={value:e.value,unit:""},Ea=t)})}function IF(){return RF(e=>{const t=e.entries.pop();t&&(Me.lcp={value:e.value,unit:"millisecond"},Mn=t)})}function DF(){PF(e=>{const t=e.entries.pop();if(!t)return;const n=Ye(Wn),r=Ye(t.startTime);Me.fid={value:e.value,unit:"millisecond"},Me["mark.fid"]={value:n+r,unit:"second"}})}function MF(e){const t=$j();if(!t||!be.performance.getEntries||!Wn)return;const n=Ye(Wn),r=t.getEntries();let s,i;if(r.slice(ub).forEach(o=>{const a=Ye(o.startTime),l=Ye(o.duration);if(!(e.op==="navigation"&&n+a<e.startTimestamp))switch(o.entryType){case"navigation":{FF(e,o,n),s=n+Ye(o.responseStart),i=n+Ye(o.requestStart);break}case"mark":case"paint":case"measure":{LF(e,o,a,l,n);const c=_v(),d=o.startTime<c.firstHiddenTime;o.name==="first-paint"&&d&&(Me.fp={value:o.startTime,unit:"millisecond"}),o.name==="first-contentful-paint"&&d&&(Me.fcp={value:o.startTime,unit:"millisecond"});break}case"resource":{const c=o.name.replace(be.location.origin,"");zF(e,o,c,a,l,n);break}}}),ub=Math.max(r.length-1,0),VF(e),e.op==="pageload"){typeof s=="number"&&(Me.ttfb={value:(s-e.startTimestamp)*1e3,unit:"millisecond"},typeof i=="number"&&i<=s&&(Me["ttfb.requestTime"]={value:(s-i)*1e3,unit:"millisecond"})),["fcp","fp","lcp"].forEach(a=>{if(!Me[a]||n>=e.startTimestamp)return;const l=Me[a].value,c=n+Ye(l),d=Math.abs((c-e.startTimestamp)*1e3);Me[a].value=d});const o=Me["mark.fid"];o&&Me.fid&&(xo(e,{description:"first input delay",endTimestamp:o.value+Ye(Me.fid.value),op:"ui.action",startTimestamp:o.value}),delete Me["mark.fid"]),"fcp"in Me||delete Me.cls,Object.keys(Me).forEach(a=>{e.setMeasurement(a,Me[a].value,Me[a].unit)}),BF(e)}Mn=void 0,Ea=void 0,Me={}}function LF(e,t,n,r,s){const i=s+n,o=i+r;return xo(e,{description:t.name,endTimestamp:o,op:t.entryType,startTimestamp:i}),i}function FF(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{wu(e,t,r,n)}),wu(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),wu(e,t,"fetch",n,"cache","domainLookupStart"),wu(e,t,"domainLookup",n,"DNS"),UF(e,t,n)}function wu(e,t,n,r,s,i){const o=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!o||xo(e,{op:"browser",description:s||n,startTimestamp:r+Ye(a),endTimestamp:r+Ye(o)})}function UF(e,t,n){xo(e,{op:"browser",description:"request",startTimestamp:n+Ye(t.requestStart),endTimestamp:n+Ye(t.responseEnd)}),xo(e,{op:"browser",description:"response",startTimestamp:n+Ye(t.responseStart),endTimestamp:n+Ye(t.responseEnd)})}function zF(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o={};"transferSize"in t&&(o["http.response_transfer_size"]=t.transferSize),"encodedBodySize"in t&&(o["http.response_content_length"]=t.encodedBodySize),"decodedBodySize"in t&&(o["http.decoded_response_content_length"]=t.decodedBodySize),"renderBlockingStatus"in t&&(o["resource.render_blocking_status"]=t.renderBlockingStatus);const a=i+r,l=a+s;xo(e,{description:n,endTimestamp:l,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",startTimestamp:a,data:o})}function VF(e){const t=be.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Ph(n.rtt)&&(Me["connection.rtt"]={value:n.rtt,unit:"millisecond"})),Ph(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),Ph(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function BF(e){Mn&&(Mn.element&&e.setTag("lcp.element",go(Mn.element)),Mn.id&&e.setTag("lcp.id",Mn.id),Mn.url&&e.setTag("lcp.url",Mn.url.trim().slice(0,200)),e.setTag("lcp.size",Mn.size)),Ea&&Ea.sources&&Ea.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,go(t.node)))}const Bm=["localhost",/^\/(?!\/)/],Hm={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:Bm,tracePropagationTargets:Bm};function HF(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o}={traceFetch:Hm.traceFetch,traceXHR:Hm.traceXHR,...e},a=typeof i=="function"?i:d=>!0,l=d=>KF(d,r||s),c={};t&&zt("fetch",d=>{const f=QF(d,a,l,c);o&&f&&cb(f)}),n&&zt("xhr",d=>{const f=YF(d,a,l,c);o&&f&&cb(f)})}function cb(e){const t=e.data.url,n=new PerformanceObserver(r=>{r.getEntries().forEach(i=>{(i.initiatorType==="fetch"||i.initiatorType==="xmlhttprequest")&&i.name.endsWith(t)&&(WF(i).forEach(a=>e.setData(...a)),n.disconnect())})});n.observe({entryTypes:["resource"]})}function qF(e){let t="unknown",n="unknown",r="";for(const s of e){if(s==="/"){[t,n]=e.split("/");break}if(!isNaN(Number(s))){t=r==="h"?"http":r,n=e.split(r)[1];break}r+=s}return r===e&&(t=r),{name:t,version:n}}function In(e){return((Wn||performance.timeOrigin)+e)/1e3}function WF(e){const{name:t,version:n}=qF(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),Wn?[...r,["http.request.redirect_start",In(e.redirectStart)],["http.request.fetch_start",In(e.fetchStart)],["http.request.domain_lookup_start",In(e.domainLookupStart)],["http.request.domain_lookup_end",In(e.domainLookupEnd)],["http.request.connect_start",In(e.connectStart)],["http.request.secure_connection_start",In(e.secureConnectionStart)],["http.request.connection_end",In(e.connectEnd)],["http.request.request_start",In(e.requestStart)],["http.request.response_start",In(e.responseStart)],["http.request.response_end",In(e.responseEnd)]]:r}function KF(e,t){return Ol(e,t||Bm)}function QF(e,t,n,r){if(!gv()||!e.fetchData)return;const s=t(e.fetchData.url);if(e.endTimestamp&&s){const h=e.fetchData.__span;if(!h)return;const p=r[h];if(p){if(e.response){p.setHttpStatus(e.response.status);const g=e.response&&e.response.headers&&e.response.headers.get("content-length"),b=parseInt(g);b>0&&p.setData("http.response_content_length",b)}else e.error&&p.setStatus("internal_error");p.finish(),delete r[h]}return}const i=Ve(),o=i.getScope(),a=i.getClient(),l=o.getSpan(),{method:c,url:d}=e.fetchData,f=s&&l?l.startChild({data:{url:d,type:"fetch","http.method":c},description:`${c} ${d}`,op:"http.client"}):void 0;if(f&&(e.fetchData.__span=f.spanId,r[f.spanId]=f),n(e.fetchData.url)&&a){const h=e.args[0];e.args[1]=e.args[1]||{};const p=e.args[1];p.headers=GF(h,a,o,p)}return f}function GF(e,t,n,r){const s=n.getSpan(),i=s&&s.transaction,{traceId:o,sampled:a,dsc:l}=n.getPropagationContext(),c=s?s.toTraceparent():pv(o,void 0,a),d=i?i.getDynamicSamplingContext():l||lf(o,t,n),f=Mm(d),h=typeof Request<"u"&&wr(e,Request)?e.headers:r.headers;if(h)if(typeof Headers<"u"&&wr(h,Headers)){const p=new Headers(h);return p.append("sentry-trace",c),f&&p.append(Dm,f),p}else if(Array.isArray(h)){const p=[...h,["sentry-trace",c]];return f&&p.push([Dm,f]),p}else{const p="baggage"in h?h.baggage:void 0,g=[];return Array.isArray(p)?g.push(...p):p&&g.push(p),f&&g.push(f),{...h,"sentry-trace":c,baggage:g.length>0?g.join(","):void 0}}else return{"sentry-trace":c,baggage:f}}function YF(e,t,n,r){const s=e.xhr,i=s&&s[Ci];if(!gv()||s&&s.__sentry_own_request__||!s||!i)return;const o=t(i.url);if(e.endTimestamp&&o){const f=s.__sentry_xhr_span_id__;if(!f)return;const h=r[f];h&&(h.setHttpStatus(i.status_code),h.finish(),delete r[f]);return}const a=Ve(),l=a.getScope(),c=l.getSpan(),d=o&&c?c.startChild({data:{...i.data,type:"xhr","http.method":i.method,url:i.url},description:`${i.method} ${i.url}`,op:"http.client"}):void 0;if(d&&(s.__sentry_xhr_span_id__=d.spanId,r[s.__sentry_xhr_span_id__]=d),s.setRequestHeader&&n(i.url))if(d){const f=d&&d.transaction,h=f&&f.getDynamicSamplingContext(),p=Mm(h);db(s,d.toTraceparent(),p)}else{const f=a.getClient(),{traceId:h,sampled:p,dsc:g}=l.getPropagationContext(),b=pv(h,void 0,p),w=g||(f?lf(h,f,l):void 0),y=Mm(w);db(s,b,y)}return d}function db(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(Dm,n)}catch{}}function XF(e,t=!0,n=!0){if(!be||!be.location)return;let r=be.location.href,s;t&&(s=e({name:be.location.pathname,startTimestamp:Wn?Wn/1e3:void 0,op:"pageload",metadata:{source:"url"}})),n&&zt("history",({to:i,from:o})=>{if(o===void 0&&r&&r.indexOf(i)!==-1){r=void 0;return}o!==i&&(r=void 0,s&&s.finish(),s=e({name:be.location.pathname,op:"navigation",metadata:{source:"url"}}))})}const JF="BrowserTracing",ZF={...Xu,markBackgroundTransactions:!0,routingInstrumentation:XF,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...Hm};class Gc{__init(){this.name=JF}__init2(){this._hasSetTracePropagationTargets=!1}constructor(t){Gc.prototype.__init.call(this),Gc.prototype.__init2.call(this),UL(),this.options={...ZF,...t},this.options._experiments.enableLongTask!==void 0&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=NF(),this.options.enableLongTask&&OF(),this.options._experiments.enableInteractions&&AF()}setupOnce(t,n){this._getCurrentHub=n;const s=n().getClient(),i=s&&s.getOptions(),{routingInstrumentation:o,startTransactionOnLocationChange:a,startTransactionOnPageLoad:l,markBackgroundTransactions:c,traceFetch:d,traceXHR:f,shouldCreateSpanForRequest:h,enableHTTPTimings:p,_experiments:g}=this.options,w=i&&i.tracePropagationTargets||this.options.tracePropagationTargets;o(y=>{const m=this._createRouteTransaction(y);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(m,y,n),m},l,a),c&&SF(),g.enableInteractions&&this._registerInteractionListener(),HF({traceFetch:d,traceXHR:f,tracePropagationTargets:w,shouldCreateSpanForRequest:h,enableHTTPTimings:p})}_createRouteTransaction(t){if(!this._getCurrentHub)return;const n=this._getCurrentHub(),{beforeNavigate:r,idleTimeout:s,finalTimeout:i,heartbeatInterval:o}=this.options,a=t.op==="pageload",l=a?fb("sentry-trace"):"",c=a?fb("baggage"):"",{traceparentData:d,dynamicSamplingContext:f,propagationContext:h}=hL(l,c),p={...t,...d,metadata:{...t.metadata,dynamicSamplingContext:d&&!f?{}:f},trimEnd:!0},g=typeof r=="function"?r(p):p,b=g===void 0?{...p,sampled:!1}:g;b.metadata=b.name!==p.name?{...b.metadata,source:"custom"}:b.metadata,this._latestRouteName=b.name,this._latestRouteSource=b.metadata&&b.metadata.source,b.sampled;const{location:w}=be,y=Jx(n,b,s,i,!0,{location:w},o),m=n.getScope();return a&&d?m.setPropagationContext(h):m.setPropagationContext({traceId:y.traceId,spanId:y.spanId,parentSpanId:y.parentSpanId,sampled:!!y.sampled}),y.registerBeforeFinishCallback(x=>{this._collectWebVitals(),MF(x)}),y}_registerInteractionListener(){let t;const n=()=>{const{idleTimeout:r,finalTimeout:s,heartbeatInterval:i}=this.options,o="ui.action.click",a=Dl();if(a&&a.op&&["navigation","pageload"].includes(a.op)||(t&&(t.setFinishReason("interactionInterrupted"),t.finish(),t=void 0),!this._getCurrentHub)||!this._latestRouteName)return;const l=this._getCurrentHub(),{location:c}=be,d={name:this._latestRouteName,op:o,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}};t=Jx(l,d,r,s,!0,{location:c},i)};["click"].forEach(r=>{addEventListener(r,n,{once:!1,capture:!0})})}}function fb(e){const t=bM(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function e8(e){e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:Qc}],version:Qc},wF(e)}const t8=["Failed to fetch dynamically imported module","Failed to execute 'removeChild' on 'Node'","Failed to execute 'insertBefore' on 'Node'","ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications","Importing a module script failed."],n8="modulepreload",r8=function(e,t){return new URL(e,t).href},hb={},Ll=function(t,n,r){if(!n||n.length===0)return t();const s=document.getElementsByTagName("link");return Promise.all(n.map(i=>{if(i=r8(i,r),i in hb)return;hb[i]=!0;const o=i.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!r)for(let d=s.length-1;d>=0;d--){const f=s[d];if(f.href===i&&(!o||f.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":n8,o||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),o)return new Promise((d,f)=>{c.addEventListener("load",d),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t())};function Sv(){var e;return{isAppearanceEditorActive:(e=window.frameElement||void 0)==null?void 0:e.src.includes("appearanceEditor=true")}}function uW(e,t=null){const[n,r]=v.useState(()=>Ev(e,t)),s=i=>{const o=i instanceof Function?i(n):i;r(o),Cv(e,o),window.dispatchEvent(new CustomEvent("storage",{detail:{key:e,newValue:o}}))};return v.useEffect(()=>{const i=o=>{var a;((a=o.detail)==null?void 0:a.key)===e&&r(o.detail.newValue)};return window.addEventListener("storage",i),()=>window.removeEventListener("storage",i)},[e]),[n,s]}function Ev(e,t=null){if(typeof window>"u")return t;try{const n=window.localStorage.getItem(e);return n!=null?JSON.parse(n):t}catch{return t}}function Cv(e,t){try{typeof window<"u"&&window.localStorage.setItem(e,JSON.stringify(t))}catch{}}function Rh(e){try{typeof window<"u"&&window.localStorage.removeItem(e)}catch{}}function tt(){var l;const{data:{user:e,guest_role:t}}=Lt(),{auth:{redirectUri:n="/"}}=v.useContext(jl),r=v.useCallback(c=>{const d=(e==null?void 0:e.permissions)||(t==null?void 0:t.permissions);if(d)return d.find(f=>f.name===c)},[e==null?void 0:e.permissions,t==null?void 0:t.permissions]),s=v.useCallback((c,d)=>{const f=r(c);let h=null;if(f){const p=f.restrictions.find(g=>g.name===d);h=p?p.value:void 0}return h},[r]),i=v.useCallback(c=>{const d=(e==null?void 0:e.permissions)||(t==null?void 0:t.permissions);return(d==null?void 0:d.find(h=>h.name==="admin"))!=null||r(c)!=null},[e==null?void 0:e.permissions,t==null?void 0:t.permissions,r]),o=((l=e==null?void 0:e.subscriptions)==null?void 0:l.find(c=>c.valid))!=null,a=v.useCallback(()=>{const c=Ev("be.onboarding.selected");return c?`/checkout/${c.productId}/${c.priceId}`:n},[n]);return{user:e,hasPermission:i,getPermission:r,getRestrictionValue:s,isLoggedIn:!!e,isSubscribed:o,getRedirectUri:a}}const Cr=v.forwardRef(({children:e,size:t="md",iconSize:n=t&&t.length<=3?t:"md",variant:r="text",radius:s="rounded-full",className:i,padding:o,equalWidth:a=!0,badge:l,...c},d)=>{const f=D(zy(t,{padding:o,equalWidth:a,variant:r}),i,l&&"relative");return u.jsxs(Wd,{...c,ref:d,radius:s,variant:r,className:f,children:[v.cloneElement(e,{size:n}),l]})}),Ij=re(u.jsx("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"}),"CloseOutlined");function pb({value:e}){return e?typeof e=="string"?u.jsx(v.Fragment,{children:e}):u.jsx(j,{...e}):null}const Dj=re(u.jsx("path",{d:"M11 15h2v2h-2v-2zm0-8h2v6h-2V7zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutlineOutlined"),s8=re(u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm4.59-12.42L10 14.17l-2.59-2.58L6 13l4 4 8-8z"}),"CheckCircleOutlined");function Mj(e,t,n){return Math.min(Math.max(e,t),n)}let Nh=new Map,qm=!1;try{qm=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let Yc=!1;try{Yc=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const Lj={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class i8{format(t){let n="";if(!qm&&this.options.signDisplay!=null?n=a8(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!Yc){var r;let{unit:s,unitDisplay:i="short",locale:o}=this.resolvedOptions(),a=(r=Lj[s])===null||r===void 0?void 0:r[i];n+=a[o]||a.default}return n}formatToParts(t){return this.numberFormatter.formatToParts(t)}formatRange(t,n){if(typeof this.numberFormatter.formatRange=="function")return this.numberFormatter.formatRange(t,n);if(n<t)throw new RangeError("End date must be >= start date");return`${this.format(t)} – ${this.format(n)}`}formatRangeToParts(t,n){if(typeof this.numberFormatter.formatRangeToParts=="function")return this.numberFormatter.formatRangeToParts(t,n);if(n<t)throw new RangeError("End date must be >= start date");let r=this.numberFormatter.formatToParts(t),s=this.numberFormatter.formatToParts(n);return[...r.map(i=>({...i,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...s.map(i=>({...i,source:"endRange"}))]}resolvedOptions(){let t=this.numberFormatter.resolvedOptions();return!qm&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!Yc&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=o8(t,n),this.options=n}}function o8(e,t={}){let{numberingSystem:n}=t;if(n&&e.indexOf("-u-nu-")===-1&&(e=`${e}-u-nu-${n}`),t.style==="unit"&&!Yc){var r;let{unit:o,unitDisplay:a="short"}=t;if(!o)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=Lj[o])===null||r===void 0)&&r[a]))throw new Error(`Unsupported unit ${o} with unitDisplay = ${a}`);t={...t,style:"decimal"}}let s=e+(t?Object.entries(t).sort((o,a)=>o[0]<a[0]?-1:1).join():"");if(Nh.has(s))return Nh.get(s);let i=new Intl.NumberFormat(e,t);return Nh.set(s,i),i}function a8(e,t,n){if(t==="auto")return e.format(n);if(t==="never")return e.format(Math.abs(n));{let r=!1;if(t==="always"?r=n>0||Object.is(n,0):t==="exceptZero"&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let s=e.format(-n),i=e.format(n),o=s.replace(i,"").replace(/\u200e|\u061C/,"");return[...o].length!==1&&console.warn("@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case"),s.replace(i,"!!!").replace(o,"+").replace("!!!",i)}else return e.format(n)}}const l8=new RegExp("^.*\\(.*\\).*$"),u8=["latn","arab","hanidec"];class cW{parse(t){return Oh(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,r){return Oh(this.locale,this.options,t).isValidPartialNumber(t,n,r)}getNumberingSystem(t){return Oh(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}}const mb=new Map;function Oh(e,t,n){let r=gb(e,t);if(!e.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let s of u8)if(s!==r.options.numberingSystem){let i=gb(e+(e.includes("-u-")?"-nu-":"-u-nu-")+s,t);if(i.isValidPartialNumber(n))return i}}return r}function gb(e,t){let n=e+(t?Object.entries(t).sort((s,i)=>s[0]<i[0]?-1:1).join():""),r=mb.get(n);return r||(r=new c8(e,t),mb.set(n,r)),r}class c8{parse(t){let n=this.sanitize(t);n=_u(n,this.symbols.group,"").replace(this.symbols.decimal,".").replace(this.symbols.minusSign,"-").replace(this.symbols.numeral,this.symbols.index);let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.currencySign==="accounting"&&l8.test(t)&&(r=-1*r),this.options.style==="percent"){r/=100;var s;r=+r.toFixed(((s=this.options.maximumFractionDigits)!==null&&s!==void 0?s:0)+2)}return r}sanitize(t){return t=t.replace(this.symbols.literals,""),t=t.replace("-",this.symbols.minusSign),this.options.numberingSystem==="arab"&&(t=t.replace(",",this.symbols.decimal),t=t.replace(String.fromCharCode(1548),this.symbols.decimal),t=_u(t,".",this.symbols.group)),this.options.locale==="fr-FR"&&(t=_u(t,".",String.fromCharCode(8239))),t}isValidPartialNumber(t,n=-1/0,r=1/0){return t=this.sanitize(t),t.startsWith(this.symbols.minusSign)&&n<0?t=t.slice(this.symbols.minusSign.length):this.symbols.plusSign&&t.startsWith(this.symbols.plusSign)&&r>0&&(t=t.slice(this.symbols.plusSign.length)),t.startsWith(this.symbols.group)?!1:(t=_u(t,this.symbols.group,"").replace(this.symbols.numeral,"").replace(this.symbols.decimal,""),t.length===0)}constructor(t,n={}){this.formatter=new Intl.NumberFormat(t,n),this.options=this.formatter.resolvedOptions(),this.symbols=d8(this.formatter,this.options,n)}}const yb=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]);function d8(e,t,n){var r,s,i,o;let a=e.formatToParts(-10000.111),l=e.formatToParts(10000.111),c=e.formatToParts(1);var d;let f=(d=(r=a.find(C=>C.type==="minusSign"))===null||r===void 0?void 0:r.value)!==null&&d!==void 0?d:"-",h=(s=l.find(C=>C.type==="plusSign"))===null||s===void 0?void 0:s.value;!h&&((n==null?void 0:n.signDisplay)==="exceptZero"||(n==null?void 0:n.signDisplay)==="always")&&(h="+");let p=(i=a.find(C=>C.type==="decimal"))===null||i===void 0?void 0:i.value,g=(o=a.find(C=>C.type==="group"))===null||o===void 0?void 0:o.value,b=a.filter(C=>!yb.has(C.type)).map(C=>vb(C.value)),w=c.filter(C=>!yb.has(C.type)).map(C=>vb(C.value)),y=[...new Set([...w,...b])].sort((C,k)=>k.length-C.length),m=y.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${y.join("|")}|[\\p{White_Space}]`,"gu"),x=[...new Intl.NumberFormat(t.locale,{useGrouping:!1}).format(9876543210)].reverse(),_=new Map(x.map((C,k)=>[C,k])),S=new RegExp(`[${x.join("")}]`,"g");return{minusSign:f,plusSign:h,decimal:p,group:g,literals:m,numeral:S,index:C=>String(_.get(C))}}function _u(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function vb(e){return e.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&")}function jv(e={}){const{localeCode:t}=Zs();return v.useMemo(()=>new i8(t,e),[t,e])}const hs=V.forwardRef((e,t)=>{let{value:n=0,minValue:r=0,maxValue:s=100,size:i="md",isIndeterminate:o=!1,className:a,position:l="relative",trackColor:c,fillColor:d="border-primary",...f}=e;n=Mj(n,r,s);const h=f8(i),p=(n-r)/(s-r),g=jv({style:"percent"});let b="";!o&&!b&&(b=g.format(p));const w={},y={};if(!o){const m=(n-r)/(s-r)*100;let x;m>0&&m<=50?(x=-180+m/50*180,w.transform=`rotate(${x}deg)`,y.transform="rotate(-180deg)"):m>50&&(x=-180+(m-50)/50*180,w.transform="rotate(0deg)",y.transform=`rotate(${x}deg)`)}return u.jsxs("div",{...f,"aria-valuenow":o?void 0:n,"aria-valuemin":r,"aria-valuemax":s,"aria-valuetext":o?void 0:b,role:"progressbar",ref:t,className:D("progress-circle",l,h,o&&"indeterminate",a),children:[u.jsx("div",{className:D(h,c,"border-4 rounded-full")}),u.jsxs("div",{className:D("fills absolute w-full h-full top-0 left-0",o&&"progress-circle-fills-animate"),children:[u.jsx(xb,{circleSize:h,subMaskStyle:w,isIndeterminate:o,className:"rotate-180",fillColor:d,subMaskClassName:D(o&&"progress-circle-fill-submask-1-animate")}),u.jsx(xb,{circleSize:h,subMaskStyle:y,isIndeterminate:o,fillColor:d,subMaskClassName:D(o&&"progress-circle-fill-submask-2-animate")})]})]})});function xb({subMaskStyle:e,subMaskClassName:t,className:n,circleSize:r,isIndeterminate:s,fillColor:i}){return u.jsx("div",{className:D("w-1/2 h-full origin-[100%] absolute overflow-hidden",n),children:u.jsx("div",{className:D("w-full h-full origin-[100%] overflow-hidden rotate-180",!s&&"transition-transform duration-100",t),style:e,children:u.jsx("div",{className:D(r,i,"rounded-full border-4")})})})}function f8(e){switch(e){case"sm":return"w-24 h-24";case"md":return"w-32 h-32";case"lg":return"w-42 h-42";default:return e}}const h8={opacity:0,y:50,scale:.3},p8={opacity:1,y:0,scale:1},m8={opacity:0,scale:.5};function bb(){const e=NC(t=>t.toasts);return u.jsx("div",{className:"relative pointer-events-none",children:u.jsx(To,{initial:!1,children:e.map(t=>u.jsx("div",{className:D("fixed mx-auto p-20 z-toast",t.position==="bottom-center"?"left-0 right-0 bottom-0":"right-0 bottom-0"),children:u.jsxs(Sr.div,{initial:t.disableEnterAnimation?void 0:h8,animate:t.disableEnterAnimation?void 0:p8,exit:t.disableExitAnimation?void 0:m8,className:D("flex items-center gap-10 min-w-288 max-w-500 shadow-lg w-min rounded-lg pl-16 pr-6 py-6 text-sm pointer-events-auto max-h-100 bg-paper text-main bg-paper border mx-auto min-h-50"),onPointerEnter:()=>{var n;return(n=t.timer)==null?void 0:n.pause()},onPointerLeave:()=>{var n;return(n=t.timer)==null?void 0:n.resume()},role:"alert","aria-live":t.type==="danger"?"assertive":"polite",children:[t.type==="danger"&&u.jsx(Dj,{className:"text-danger flex-shrink-0",size:"md"}),t.type==="loading"&&u.jsx(hs,{size:"sm",className:"flex-shrink-0",isIndeterminate:!0}),t.type==="positive"&&u.jsx(s8,{className:"text-positive flex-shrink-0",size:"md"}),u.jsx("div",{className:"overflow-hidden overflow-ellipsis w-max mr-auto","data-testid":"toast-message",children:u.jsx(pb,{value:t.message})}),t.action&&u.jsx(te,{variant:"text",color:"primary",size:"sm",className:"flex-shrink-0",onFocus:()=>{var n;return(n=t.timer)==null?void 0:n.pause()},onBlur:()=>{var n;return(n=t.timer)==null?void 0:n.resume()},onClick:()=>ho().remove(t.id),elementType:Ze,to:t.action.action,children:u.jsx(pb,{value:t.action.label})}),t.type!=="loading"&&u.jsx(Cr,{onFocus:()=>{var n;return(n=t.timer)==null?void 0:n.pause()},onBlur:()=>{var n;return(n=t.timer)==null?void 0:n.resume()},type:"button",className:"flex-shrink-0",onClick:()=>{ho().remove(t.id)},size:"sm",children:u.jsx(Ij,{})})]})},t.id))})})}const g8=(e,t)=>{const n=["users",`${e}`];return t&&n.push(t),n};function Fj(e,t){return On(g8(e,t),()=>y8(e,t))}function y8(e,t){return Z.get(`users/${e}`,{params:t}).then(n=>n.data)}const v8=""+new URL("mail-sent-c2a25732.svg",import.meta.url).href;function x8(){return me(b8,{onSuccess:()=>{de(ie("Email sent"))},onError:e=>dt(e)})}function b8(e){return Z.post("auth/email/verification-notification",e).then(t=>t.data)}function df(){const{selectedTheme:e}=nf();return e.is_dark??!1}function w8(){const{data:e}=Fj("me"),t=x8(),{branding:{logo_light:n,logo_dark:r}}=ce(),i=df()?n:r;return u.jsxs("div",{className:"flex flex-col items-center p-24 bg-alt w-screen min-h-screen",children:[i&&u.jsx("img",{src:i,alt:"Site logo",className:"my-60 block h-42 w-auto"}),u.jsxs("div",{className:"bg-paper px-14 py-28 rounded shadow border max-w-580 flex flex-col items-center text-center",children:[u.jsx(qd,{src:v8,className:"h-144"}),u.jsx("h1",{className:"text-3xl mt-40 mb-20",children:u.jsx(j,{message:"Verify your email"})}),u.jsx("div",{className:"mb-24 text-sm",children:u.jsx(j,{message:"We've sent an email to “:email“ to verify your email address and activate your account. The link in the the email will expire in 24 hours.",values:{email:e==null?void 0:e.user.email}})}),u.jsx("div",{className:"text-sm",children:u.jsx(j,{message:"If you did not receive an email, click the button below and we will send you another one."})}),u.jsx(te,{className:"mt-30",variant:"flat",color:"primary",disabled:t.isLoading||!(e!=null&&e.user.email),onClick:()=>{t.mutate({email:e.user.email})},children:u.jsx(j,{message:"Resend email"})})]})]})}function _8(){const e=Rl(),{mergeBootstrapData:t,data:n}=Lt(),r=v.useCallback(s=>{switch(s.type){case"navigate":return e(s.to);case"setValues":return t({themes:{...n.themes,all:s.values.appearance.themes.all},settings:{...n.settings,...s.values.settings}});case"setThemeColor":return WC(s.name,s.value);case"setActiveTheme":const i=n.themes.all.find(o=>o.id===s.themeId);i&&KC(i);return;case"setCustomCode":return C8(s.mode,s.value)}},[n,t,e]);return v.useEffect(()=>{const s=i=>{S8(i)&&E8(i)&&r(i.data)};return window.addEventListener("message",s),()=>{window.removeEventListener("message",s)}},[e,r]),null}function S8(e){var t;return((t=e.data)==null?void 0:t.source)==="be-appearance-editor"}function E8(e){return new URL(e.origin).hostname===window.location.hostname}function C8(e,t){const n=e==="html"?document.body:document.head,r=e==="html"?"div":"style";let s=n.querySelector("#be-custom-code");t?(s||(s=document.createElement(r),s.id="be-custom-code",n.appendChild(s)),s.innerHTML=t):s&&s.remove()}function kv(e){var i;const t=ce(),{user:n,hasPermission:r}=tt();if(!e)return null;const s=typeof e=="string"?(i=t.menus)==null?void 0:i.find(o=>{var a;return(a=o.positions)==null?void 0:a.includes(e)}):e;return s&&(s.items=s.items.filter(o=>{const a=(o.roles||[]).every(c=>n==null?void 0:n.roles.find(d=>d.id===c)),l=(o.permissions||[]).every(c=>r(c));return o.action&&a&&l})),s}function Xc({className:e,iconClassName:t,itemClassName:n,gap:r="gap-30",menu:s,orientation:i="horizontal",children:o,matchDescendants:a,onlyShowIcons:l,iconSize:c,unstyled:d=!1}){const f=kv(s);return f?u.jsx("div",{className:D("flex",r,i==="vertical"?"flex-col items-start":"items-center",e),"data-menu-id":f.id,children:f.items.map(h=>o?o(h):u.jsx(Tv,{unstyled:d,onlyShowIcon:l,matchDescendants:a,iconClassName:t,iconSize:c,className:p=>typeof n=="function"?n({...p,item:h}):n,item:h},h.id))}):null}const Tv=v.forwardRef(({item:e,className:t,matchDescendants:n,unstyled:r,onlyShowIcon:s,iconClassName:i,iconSize:o="sm",...a},l)=>{const c=u.jsx(j,{message:e.label}),d=e.icon&&Hd(e.icon),f=u.jsxs(v.Fragment,{children:[d&&u.jsx(d,{size:o,className:i}),(!d||!s)&&c]}),h=!r&&"block whitespace-nowrap flex items-center justify-start gap-10",p=!r&&"outline-none focus-visible:ring-2";return e.type==="link"?u.jsx("a",{className:D(h,t==null?void 0:t({isActive:!1}),p),href:e.action,target:e.target,"data-menu-item-id":e.id,ref:l,...a,children:f}):u.jsx(FD,{end:typeof n=="function"?n(e.action):n,className:g=>D(h,t==null?void 0:t(g),p),to:e.action,target:e.target,"data-menu-item-id":e.id,ref:l,...a,children:f})});function j8(){const{cookie_notice:{position:e,enable:t}}=ce(),[,n]=lv("cookie_notice"),[r,s]=v.useState(()=>!Pn().show_cookie_notice);return!t||r?null:u.jsxs("div",{className:D("fixed z-50 flex w-full items-center justify-center gap-30 bg-toast p-14 text-sm text-white shadow",e=="top"?"top-0":"bottom-0"),children:[u.jsx(j,{message:`We use cookies to optimize site functionality and provide you with the
      best possible experience.`}),u.jsx(k8,{}),u.jsx(te,{variant:"flat",color:"primary",size:"xs",onClick:()=>{n("true",{days:30,path:"/"}),s(!0)},children:u.jsx(j,{message:"OK"})})]})}function k8(){const{cookie_notice:{button:e}}=ce();return e!=null&&e.label?u.jsx(Tv,{className:()=>"text-primary-light hover:underline",item:e}):null}const T8=""+new URL("404-1-176145e9.png",import.meta.url).href,P8=""+new URL("404-2-14c4a897.png",import.meta.url).href;function Pv(){return u.jsxs("div",{className:"lg:px-96 lg:py-96 md:py-80 md:px-176 px-16 py-96 items-center flex justify-center flex-col-reverse lg:flex-row md:gap-112 gap-64",children:[u.jsx("div",{className:"xl:pt-96 w-full xl:w-1/2 relative pb-48 lg:pb-0",children:u.jsxs("div",{className:"relative",children:[u.jsx("div",{className:"absolute",children:u.jsxs("div",{className:"relative z-10",children:[u.jsx("h1",{className:"my-8 text-main font-bold text-2xl",children:u.jsx(j,{message:"Looks like you've found the doorway to the great nothing"})}),u.jsx("p",{className:"my-16 text-main",children:u.jsx(j,{message:`Sorry about that! Please visit our homepage to get where you need
                to go.`})}),u.jsx(te,{className:"my-8",elementType:Ze,size:"lg",to:"/",variant:"flat",color:"primary",children:u.jsx(j,{message:"Take me there!"})})]})}),u.jsx("div",{className:"dark:opacity-5",children:u.jsx("img",{src:P8,alt:""})})]})}),u.jsx("div",{className:"dark:opacity-80",children:u.jsx("img",{src:T8,alt:""})})]})}function ol({children:e,permission:t,requireLogin:n=!0}){const{isLoggedIn:r,hasPermission:s}=tt();return n&&!r||t&&!s(t)?r?u.jsx(Pv,{}):u.jsx(ef,{to:"/login",replace:!0}):e||u.jsx(zC,{})}function Vi({className:e,screen:t}){return u.jsx("div",{className:D("flex items-center justify-center flex-auto",t?"h-screen w-screen":"h-full w-full",e),children:u.jsx(hs,{isIndeterminate:!0,"aria-label":"Loading page..."})})}function ws({children:e}){const{isLoggedIn:t,getRedirectUri:n}=tt(),{isAppearanceEditorActive:r}=Sv(),s=n(),{pathname:i}=An();return t&&!r&&s!==i?u.jsx(ef,{to:s,replace:!0}):e||u.jsx(zC,{})}var Fl=e=>e.type==="checkbox",ji=e=>e instanceof Date,_t=e=>e==null;const Uj=e=>typeof e=="object";var et=e=>!_t(e)&&!Array.isArray(e)&&Uj(e)&&!ji(e),zj=e=>et(e)&&e.target?Fl(e.target)?e.target.checked:e.target.value:e,R8=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,Vj=(e,t)=>e.has(R8(t)),N8=e=>{const t=e.constructor&&e.constructor.prototype;return et(t)&&t.hasOwnProperty("isPrototypeOf")},Rv=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function St(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(!(Rv&&(e instanceof Blob||e instanceof FileList))&&(n||et(e)))if(t=n?[]:{},!n&&!N8(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=St(e[r]));else return e;return t}var Ao=e=>Array.isArray(e)?e.filter(Boolean):[],_e=e=>e===void 0,H=(e,t,n)=>{if(!t||!et(e))return n;const r=Ao(t.split(/[,[\].]+?/)).reduce((s,i)=>_t(s)?s:s[i],e);return _e(r)||r===e?_e(e[t])?n:e[t]:r};const Jc={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},sn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Zn={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Bj=V.createContext(null),ff=()=>V.useContext(Bj),O8=e=>{const{children:t,...n}=e;return V.createElement(Bj.Provider,{value:n},t)};var Hj=(e,t,n,r=!0)=>{const s={defaultValues:t._defaultValues};for(const i in e)Object.defineProperty(s,i,{get:()=>{const o=i;return t._proxyFormState[o]!==sn.all&&(t._proxyFormState[o]=!r||sn.all),n&&(n[o]=!0),e[o]}});return s},Ut=e=>et(e)&&!Object.keys(e).length,qj=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return Ut(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||sn.all))},Bt=e=>Array.isArray(e)?e:[e],Wj=(e,t,n)=>n&&t?e===t:!e||!t||e===t||Bt(e).some(r=>r&&(r.startsWith(t)||t.startsWith(r)));function hf(e){const t=V.useRef(e);t.current=e,V.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function A8(e){const t=ff(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=V.useState(n._formState),l=V.useRef(!0),c=V.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),d=V.useRef(s);return d.current=s,hf({disabled:r,next:f=>l.current&&Wj(d.current,f.name,i)&&qj(f,c.current,n._updateFormState)&&a({...n._formState,...f}),subject:n._subjects.state}),V.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),Hj(o,n,c.current,!1)}var Vn=e=>typeof e=="string",Kj=(e,t,n,r,s)=>Vn(e)?(r&&t.watch.add(e),H(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),H(n,i))):(r&&(t.watchAll=!0),n);function $8(e){const t=ff(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=V.useRef(r);a.current=r,hf({disabled:i,subject:n._subjects.values,next:d=>{Wj(a.current,d.name,o)&&c(St(Kj(a.current,n._names,d.values||n._formValues,!1,s)))}});const[l,c]=V.useState(n._getWatch(r,s));return V.useEffect(()=>n._removeUnmounted()),l}var Nv=e=>/^\w*$/.test(e),Qj=e=>Ao(e.replace(/["|']|\]/g,"").split(/\.|\[/));function ve(e,t,n){let r=-1;const s=Nv(t)?[t]:Qj(t),i=s.length,o=i-1;for(;++r<i;){const a=s[r];let l=n;if(r!==o){const c=e[a];l=et(c)||Array.isArray(c)?c:isNaN(+s[r+1])?{}:[]}e[a]=l,e=e[a]}return e}function $o(e){const t=ff(),{name:n,control:r=t.control,shouldUnregister:s}=e,i=Vj(r._names.array,n),o=$8({control:r,name:n,defaultValue:H(r._formValues,n,H(r._defaultValues,n,e.defaultValue)),exact:!0}),a=A8({control:r,name:n}),l=V.useRef(r.register(n,{...e.rules,value:o}));return l.current=r.register(n,e.rules),V.useEffect(()=>{const c=r._options.shouldUnregister||s,d=(f,h)=>{const p=H(r._fields,f);p&&(p._f.mount=h)};if(d(n,!0),c){const f=St(H(r._options.defaultValues,n));ve(r._defaultValues,n,f),_e(H(r._formValues,n))&&ve(r._formValues,n,f)}return()=>{(i?c&&!r._state.action:c)?r.unregister(n):d(n,!1)}},[n,r,i,s]),{field:{name:n,value:o,onChange:V.useCallback(c=>l.current.onChange({target:{value:zj(c),name:n},type:Jc.CHANGE}),[n]),onBlur:V.useCallback(()=>l.current.onBlur({target:{value:H(r._formValues,n),name:n},type:Jc.BLUR}),[n,r]),ref:c=>{const d=H(r._fields,n);d&&c&&(d._f.ref={focus:()=>c.focus(),select:()=>c.select(),setCustomValidity:f=>c.setCustomValidity(f),reportValidity:()=>c.reportValidity()})}},formState:a,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!H(a.errors,n)},isDirty:{enumerable:!0,get:()=>!!H(a.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!H(a.touchedFields,n)},error:{enumerable:!0,get:()=>H(a.errors,n)}})}}var I8=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{};const Zc=(e,t,n)=>{for(const r of n||Object.keys(e)){const s=H(e,r);if(s){const{_f:i,...o}=s;if(i&&t(i.name)){if(i.ref.focus){i.ref.focus();break}else if(i.refs&&i.refs[0].focus){i.refs[0].focus();break}}else et(o)&&Zc(o,t)}}};var Rr=()=>{const e=typeof performance>"u"?Date.now():performance.now()*1e3;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,t=>{const n=(Math.random()*16+e)%16|0;return(t=="x"?n:n&3|8).toString(16)})},Ah=(e,t,n={})=>n.shouldFocus||_e(n.shouldFocus)?n.focusName||`${e}.${_e(n.focusIndex)?t:n.focusIndex}.`:"",Wm=e=>({isOnSubmit:!e||e===sn.onSubmit,isOnBlur:e===sn.onBlur,isOnChange:e===sn.onChange,isOnAll:e===sn.all,isOnTouch:e===sn.onTouched}),Km=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length)))),Gj=(e,t,n)=>{const r=Ao(H(e,n));return ve(r,"root",t[n]),ve(e,n,r),e},Bi=e=>typeof e=="boolean",Ov=e=>e.type==="file",Br=e=>typeof e=="function",ed=e=>{if(!Rv)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},Zu=e=>Vn(e),Av=e=>e.type==="radio",td=e=>e instanceof RegExp;const wb={value:!1,isValid:!1},_b={value:!0,isValid:!0};var Yj=e=>{if(Array.isArray(e)){if(e.length>1){const t=e.filter(n=>n&&n.checked&&!n.disabled).map(n=>n.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!_e(e[0].attributes.value)?_e(e[0].value)||e[0].value===""?_b:{value:e[0].value,isValid:!0}:_b:wb}return wb};const Sb={isValid:!1,value:null};var Xj=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,Sb):Sb;function Eb(e,t,n="validate"){if(Zu(e)||Array.isArray(e)&&e.every(Zu)||Bi(e)&&!e)return{type:n,message:Zu(e)?e:"",ref:t}}var oi=e=>et(e)&&!td(e)?e:{value:e,message:""},Qm=async(e,t,n,r,s)=>{const{ref:i,refs:o,required:a,maxLength:l,minLength:c,min:d,max:f,pattern:h,validate:p,name:g,valueAsNumber:b,mount:w,disabled:y}=e._f,m=H(t,g);if(!w||y)return{};const x=o?o[0]:i,_=F=>{r&&x.reportValidity&&(x.setCustomValidity(Bi(F)?"":F||""),x.reportValidity())},S={},E=Av(i),C=Fl(i),k=E||C,P=(b||Ov(i))&&_e(i.value)&&_e(m)||ed(i)&&i.value===""||m===""||Array.isArray(m)&&!m.length,O=I8.bind(null,g,n,S),$=(F,M,z,q=Zn.maxLength,B=Zn.minLength)=>{const J=F?M:z;S[g]={type:F?q:B,message:J,ref:i,...O(F?q:B,J)}};if(s?!Array.isArray(m)||!m.length:a&&(!k&&(P||_t(m))||Bi(m)&&!m||C&&!Yj(o).isValid||E&&!Xj(o).isValid)){const{value:F,message:M}=Zu(a)?{value:!!a,message:a}:oi(a);if(F&&(S[g]={type:Zn.required,message:M,ref:x,...O(Zn.required,M)},!n))return _(M),S}if(!P&&(!_t(d)||!_t(f))){let F,M;const z=oi(f),q=oi(d);if(!_t(m)&&!isNaN(m)){const B=i.valueAsNumber||m&&+m;_t(z.value)||(F=B>z.value),_t(q.value)||(M=B<q.value)}else{const B=i.valueAsDate||new Date(m),J=W=>new Date(new Date().toDateString()+" "+W),I=i.type=="time",G=i.type=="week";Vn(z.value)&&m&&(F=I?J(m)>J(z.value):G?m>z.value:B>new Date(z.value)),Vn(q.value)&&m&&(M=I?J(m)<J(q.value):G?m<q.value:B<new Date(q.value))}if((F||M)&&($(!!F,z.message,q.message,Zn.max,Zn.min),!n))return _(S[g].message),S}if((l||c)&&!P&&(Vn(m)||s&&Array.isArray(m))){const F=oi(l),M=oi(c),z=!_t(F.value)&&m.length>+F.value,q=!_t(M.value)&&m.length<+M.value;if((z||q)&&($(z,F.message,M.message),!n))return _(S[g].message),S}if(h&&!P&&Vn(m)){const{value:F,message:M}=oi(h);if(td(F)&&!m.match(F)&&(S[g]={type:Zn.pattern,message:M,ref:i,...O(Zn.pattern,M)},!n))return _(M),S}if(p){if(Br(p)){const F=await p(m,t),M=Eb(F,x);if(M&&(S[g]={...M,...O(Zn.validate,M.message)},!n))return _(M.message),S}else if(et(p)){let F={};for(const M in p){if(!Ut(F)&&!n)break;const z=Eb(await p[M](m,t),x,M);z&&(F={...z,...O(M,z.message)},_(z.message),n&&(S[g]=F))}if(!Ut(F)&&(S[g]={ref:x,...F},!n))return S}}return _(!0),S};function $h(e,t){return[...e,...Bt(t)]}var Ih=e=>Array.isArray(e)?e.map(()=>{}):void 0;function Dh(e,t,n){return[...e.slice(0,t),...Bt(n),...e.slice(t)]}var Mh=(e,t,n)=>Array.isArray(e)?(_e(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[];function Lh(e,t){return[...Bt(t),...Bt(e)]}function D8(e,t){let n=0;const r=[...e];for(const s of t)r.splice(s-n,1),n++;return Ao(r).length?r:[]}var Fh=(e,t)=>_e(t)?[]:D8(e,Bt(t).sort((n,r)=>n-r)),Uh=(e,t,n)=>{e[t]=[e[n],e[n]=e[t]][0]};function M8(e,t){const n=t.slice(0,-1).length;let r=0;for(;r<n;)e=_e(e)?r++:e[t[r++]];return e}function L8(e){for(const t in e)if(e.hasOwnProperty(t)&&!_e(e[t]))return!1;return!0}function nt(e,t){const n=Array.isArray(t)?t:Nv(t)?[t]:Qj(t),r=n.length===1?e:M8(e,n),s=n.length-1,i=n[s];return r&&delete r[i],s!==0&&(et(r)&&Ut(r)||Array.isArray(r)&&L8(r))&&nt(e,n.slice(0,-1)),e}var Cb=(e,t,n)=>(e[t]=n,e);function dW(e){const t=ff(),{control:n=t.control,name:r,keyName:s="id",shouldUnregister:i}=e,[o,a]=V.useState(n._getFieldArray(r)),l=V.useRef(n._getFieldArray(r).map(Rr)),c=V.useRef(o),d=V.useRef(r),f=V.useRef(!1);d.current=r,c.current=o,n._names.array.add(r),e.rules&&n.register(r,e.rules),hf({next:({values:S,name:E})=>{if(E===d.current||!E){const C=H(S,d.current);Array.isArray(C)&&(a(C),l.current=C.map(Rr))}},subject:n._subjects.array});const h=V.useCallback(S=>{f.current=!0,n._updateFieldArray(r,S)},[n,r]),p=(S,E)=>{const C=Bt(St(S)),k=$h(n._getFieldArray(r),C);n._names.focus=Ah(r,k.length-1,E),l.current=$h(l.current,C.map(Rr)),h(k),a(k),n._updateFieldArray(r,k,$h,{argA:Ih(S)})},g=(S,E)=>{const C=Bt(St(S)),k=Lh(n._getFieldArray(r),C);n._names.focus=Ah(r,0,E),l.current=Lh(l.current,C.map(Rr)),h(k),a(k),n._updateFieldArray(r,k,Lh,{argA:Ih(S)})},b=S=>{const E=Fh(n._getFieldArray(r),S);l.current=Fh(l.current,S),h(E),a(E),n._updateFieldArray(r,E,Fh,{argA:S})},w=(S,E,C)=>{const k=Bt(St(E)),P=Dh(n._getFieldArray(r),S,k);n._names.focus=Ah(r,S,C),l.current=Dh(l.current,S,k.map(Rr)),h(P),a(P),n._updateFieldArray(r,P,Dh,{argA:S,argB:Ih(E)})},y=(S,E)=>{const C=n._getFieldArray(r);Uh(C,S,E),Uh(l.current,S,E),h(C),a(C),n._updateFieldArray(r,C,Uh,{argA:S,argB:E},!1)},m=(S,E)=>{const C=n._getFieldArray(r);Mh(C,S,E),Mh(l.current,S,E),h(C),a(C),n._updateFieldArray(r,C,Mh,{argA:S,argB:E},!1)},x=(S,E)=>{const C=St(E),k=Cb(n._getFieldArray(r),S,C);l.current=[...k].map((P,O)=>!P||O===S?Rr():l.current[O]),h(k),a([...k]),n._updateFieldArray(r,k,Cb,{argA:S,argB:C},!0,!1)},_=S=>{const E=Bt(St(S));l.current=E.map(Rr),h([...E]),a([...E]),n._updateFieldArray(r,[...E],C=>C,{},!0,!1)};return V.useEffect(()=>{if(n._state.action=!1,Km(r,n._names)&&n._subjects.state.next({...n._formState}),f.current&&(!Wm(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then(S=>{const E=H(S.errors,r),C=H(n._formState.errors,r);(C?!E&&C.type||E&&(C.type!==E.type||C.message!==E.message):E&&E.type)&&(E?ve(n._formState.errors,r,E):nt(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const S=H(n._fields,r);S&&S._f&&Qm(S,n._formValues,n._options.criteriaMode===sn.all,n._options.shouldUseNativeValidation,!0).then(E=>!Ut(E)&&n._subjects.state.next({errors:Gj(n._formState.errors,E,r)}))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&Zc(n._fields,S=>!!S&&S.startsWith(n._names.focus||"")),n._names.focus="",n._updateValid()},[o,r,n]),V.useEffect(()=>(!H(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||i)&&n.unregister(r)}),[r,n,s,i]),{swap:V.useCallback(y,[h,r,n]),move:V.useCallback(m,[h,r,n]),prepend:V.useCallback(g,[h,r,n]),append:V.useCallback(p,[h,r,n]),remove:V.useCallback(b,[h,r,n]),insert:V.useCallback(w,[h,r,n]),update:V.useCallback(x,[h,r,n]),replace:V.useCallback(_,[h,r,n]),fields:V.useMemo(()=>o.map((S,E)=>({...S,[s]:l.current[E]||Rr()})),[o,s])}}function zh(){let e=[];return{get observers(){return e},next:s=>{for(const i of e)i.next&&i.next(s)},subscribe:s=>(e.push(s),{unsubscribe:()=>{e=e.filter(i=>i!==s)}}),unsubscribe:()=>{e=[]}}}var nd=e=>_t(e)||!Uj(e);function Ts(e,t){if(nd(e)||nd(t))return e===t;if(ji(e)&&ji(t))return e.getTime()===t.getTime();const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(const s of n){const i=e[s];if(!r.includes(s))return!1;if(s!=="ref"){const o=t[s];if(ji(i)&&ji(o)||et(i)&&et(o)||Array.isArray(i)&&Array.isArray(o)?!Ts(i,o):i!==o)return!1}}return!0}var Jj=e=>e.type==="select-multiple",F8=e=>Av(e)||Fl(e),Vh=e=>ed(e)&&e.isConnected,Zj=e=>{for(const t in e)if(Br(e[t]))return!0;return!1};function rd(e,t={}){const n=Array.isArray(e);if(et(e)||n)for(const r in e)Array.isArray(e[r])||et(e[r])&&!Zj(e[r])?(t[r]=Array.isArray(e[r])?[]:{},rd(e[r],t[r])):_t(e[r])||(t[r]=!0);return t}function ek(e,t,n){const r=Array.isArray(e);if(et(e)||r)for(const s in e)Array.isArray(e[s])||et(e[s])&&!Zj(e[s])?_e(t)||nd(n[s])?n[s]=Array.isArray(e[s])?rd(e[s],[]):{...rd(e[s])}:ek(e[s],_t(t)?{}:t[s],n[s]):n[s]=!Ts(e[s],t[s]);return n}var Bh=(e,t)=>ek(e,t,rd(t)),tk=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>_e(e)?e:t?e===""?NaN:e&&+e:n&&Vn(e)?new Date(e):r?r(e):e;function Hh(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Ov(t)?t.files:Av(t)?Xj(e.refs).value:Jj(t)?[...t.selectedOptions].map(({value:n})=>n):Fl(t)?Yj(e.refs).value:tk(_e(t.value)?e.ref.value:t.value,e)}var U8=(e,t,n,r)=>{const s={};for(const i of e){const o=H(t,i);o&&ve(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},Zo=e=>_e(e)?e:td(e)?e.source:et(e)?td(e.value)?e.value.source:e.value:e,z8=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function jb(e,t,n){const r=H(e,n);if(r||Nv(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=H(t,i),a=H(e,i);if(o&&!Array.isArray(o)&&n!==i)return{name:n};if(a&&a.type)return{name:i,error:a};s.pop()}return{name:n}}var V8=(e,t,n,r,s)=>s.isOnAll?!1:!n&&s.isOnTouch?!(t||e):(n?r.isOnBlur:s.isOnBlur)?!e:(n?r.isOnChange:s.isOnChange)?e:!0,B8=(e,t)=>!Ao(H(e,t)).length&&nt(e,t);const H8={mode:sn.onSubmit,reValidateMode:sn.onChange,shouldFocusError:!0};function q8(e={},t){let n={...H8,...e},r={submitCount:0,isDirty:!1,isLoading:Br(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:{}},s={},i=et(n.defaultValues)||et(n.values)?St(n.defaultValues||n.values)||{}:{},o=n.shouldUnregister?{}:St(i),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,d=0;const f={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={values:zh(),array:zh(),state:zh()},p=e.resetOptions&&e.resetOptions.keepDirtyValues,g=Wm(n.mode),b=Wm(n.reValidateMode),w=n.criteriaMode===sn.all,y=T=>R=>{clearTimeout(d),d=setTimeout(T,R)},m=async T=>{if(f.isValid||T){const R=n.resolver?Ut((await P()).errors):await $(s,!0);R!==r.isValid&&h.state.next({isValid:R})}},x=T=>f.isValidating&&h.state.next({isValidating:T}),_=(T,R=[],A,X,K=!0,U=!0)=>{if(X&&A){if(a.action=!0,U&&Array.isArray(H(s,T))){const ee=A(H(s,T),X.argA,X.argB);K&&ve(s,T,ee)}if(U&&Array.isArray(H(r.errors,T))){const ee=A(H(r.errors,T),X.argA,X.argB);K&&ve(r.errors,T,ee),B8(r.errors,T)}if(f.touchedFields&&U&&Array.isArray(H(r.touchedFields,T))){const ee=A(H(r.touchedFields,T),X.argA,X.argB);K&&ve(r.touchedFields,T,ee)}f.dirtyFields&&(r.dirtyFields=Bh(i,o)),h.state.next({name:T,isDirty:M(T,R),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else ve(o,T,R)},S=(T,R)=>{ve(r.errors,T,R),h.state.next({errors:r.errors})},E=(T,R,A,X)=>{const K=H(s,T);if(K){const U=H(o,T,_e(A)?H(i,T):A);_e(U)||X&&X.defaultChecked||R?ve(o,T,R?U:Hh(K._f)):B(T,U),a.mount&&m()}},C=(T,R,A,X,K)=>{let U=!1,ee=!1;const De={name:T};if(!A||X){f.isDirty&&(ee=r.isDirty,r.isDirty=De.isDirty=M(),U=ee!==De.isDirty);const Be=Ts(H(i,T),R);ee=H(r.dirtyFields,T),Be?nt(r.dirtyFields,T):ve(r.dirtyFields,T,!0),De.dirtyFields=r.dirtyFields,U=U||f.dirtyFields&&ee!==!Be}if(A){const Be=H(r.touchedFields,T);Be||(ve(r.touchedFields,T,A),De.touchedFields=r.touchedFields,U=U||f.touchedFields&&Be!==A)}return U&&K&&h.state.next(De),U?De:{}},k=(T,R,A,X)=>{const K=H(r.errors,T),U=f.isValid&&Bi(R)&&r.isValid!==R;if(e.delayError&&A?(c=y(()=>S(T,A)),c(e.delayError)):(clearTimeout(d),c=null,A?ve(r.errors,T,A):nt(r.errors,T)),(A?!Ts(K,A):K)||!Ut(X)||U){const ee={...X,...U&&Bi(R)?{isValid:R}:{},errors:r.errors,name:T};r={...r,...ee},h.state.next(ee)}x(!1)},P=async T=>n.resolver(o,n.context,U8(T||l.mount,s,n.criteriaMode,n.shouldUseNativeValidation)),O=async T=>{const{errors:R}=await P();if(T)for(const A of T){const X=H(R,A);X?ve(r.errors,A,X):nt(r.errors,A)}else r.errors=R;return R},$=async(T,R,A={valid:!0})=>{for(const X in T){const K=T[X];if(K){const{_f:U,...ee}=K;if(U){const De=l.array.has(U.name),Be=await Qm(K,o,w,n.shouldUseNativeValidation&&!R,De);if(Be[U.name]&&(A.valid=!1,R))break;!R&&(H(Be,U.name)?De?Gj(r.errors,Be,U.name):ve(r.errors,U.name,Be[U.name]):nt(r.errors,U.name))}ee&&await $(ee,R,A)}}return A.valid},F=()=>{for(const T of l.unMount){const R=H(s,T);R&&(R._f.refs?R._f.refs.every(A=>!Vh(A)):!Vh(R._f.ref))&&ge(T)}l.unMount=new Set},M=(T,R)=>(T&&R&&ve(o,T,R),!Ts(Q(),i)),z=(T,R,A)=>Kj(T,l,{...a.mount?o:_e(R)?i:Vn(T)?{[T]:R}:R},A,R),q=T=>Ao(H(a.mount?o:i,T,e.shouldUnregister?H(i,T,[]):[])),B=(T,R,A={})=>{const X=H(s,T);let K=R;if(X){const U=X._f;U&&(!U.disabled&&ve(o,T,tk(R,U)),K=ed(U.ref)&&_t(R)?"":R,Jj(U.ref)?[...U.ref.options].forEach(ee=>ee.selected=K.includes(ee.value)):U.refs?Fl(U.ref)?U.refs.length>1?U.refs.forEach(ee=>(!ee.defaultChecked||!ee.disabled)&&(ee.checked=Array.isArray(K)?!!K.find(De=>De===ee.value):K===ee.value)):U.refs[0]&&(U.refs[0].checked=!!K):U.refs.forEach(ee=>ee.checked=ee.value===K):Ov(U.ref)?U.ref.value="":(U.ref.value=K,U.ref.type||h.values.next({name:T,values:{...o}})))}(A.shouldDirty||A.shouldTouch)&&C(T,K,A.shouldTouch,A.shouldDirty,!0),A.shouldValidate&&W(T)},J=(T,R,A)=>{for(const X in R){const K=R[X],U=`${T}.${X}`,ee=H(s,U);(l.array.has(T)||!nd(K)||ee&&!ee._f)&&!ji(K)?J(U,K,A):B(U,K,A)}},I=(T,R,A={})=>{const X=H(s,T),K=l.array.has(T),U=St(R);ve(o,T,U),K?(h.array.next({name:T,values:{...o}}),(f.isDirty||f.dirtyFields)&&A.shouldDirty&&h.state.next({name:T,dirtyFields:Bh(i,o),isDirty:M(T,U)})):X&&!X._f&&!_t(U)?J(T,U,A):B(T,U,A),Km(T,l)&&h.state.next({...r}),h.values.next({name:T,values:{...o}}),!a.mount&&t()},G=async T=>{const R=T.target;let A=R.name,X=!0;const K=H(s,A),U=()=>R.type?Hh(K._f):zj(T);if(K){let ee,De;const Be=U(),ri=T.type===Jc.BLUR||T.type===Jc.FOCUS_OUT,DT=!z8(K._f)&&!n.resolver&&!H(r.errors,A)&&!K._f.deps||V8(ri,H(r.touchedFields,A),r.isSubmitted,b,g),Pf=Km(A,l,ri);ve(o,A,Be),ri?(K._f.onBlur&&K._f.onBlur(T),c&&c(0)):K._f.onChange&&K._f.onChange(T);const Rf=C(A,Be,ri,!1),MT=!Ut(Rf)||Pf;if(!ri&&h.values.next({name:A,type:T.type,values:{...o}}),DT)return f.isValid&&m(),MT&&h.state.next({name:A,...Pf?{}:Rf});if(!ri&&Pf&&h.state.next({...r}),x(!0),n.resolver){const{errors:f0}=await P([A]),LT=jb(r.errors,s,A),h0=jb(f0,s,LT.name||A);ee=h0.error,A=h0.name,De=Ut(f0)}else ee=(await Qm(K,o,w,n.shouldUseNativeValidation))[A],X=isNaN(Be)||Be===H(o,A,Be),X&&(ee?De=!1:f.isValid&&(De=await $(s,!0)));X&&(K._f.deps&&W(K._f.deps),k(A,De,ee,Rf))}},W=async(T,R={})=>{let A,X;const K=Bt(T);if(x(!0),n.resolver){const U=await O(_e(T)?T:K);A=Ut(U),X=T?!K.some(ee=>H(U,ee)):A}else T?(X=(await Promise.all(K.map(async U=>{const ee=H(s,U);return await $(ee&&ee._f?{[U]:ee}:ee)}))).every(Boolean),!(!X&&!r.isValid)&&m()):X=A=await $(s);return h.state.next({...!Vn(T)||f.isValid&&A!==r.isValid?{}:{name:T},...n.resolver||!T?{isValid:A}:{},errors:r.errors,isValidating:!1}),R.shouldFocus&&!X&&Zc(s,U=>U&&H(r.errors,U),T?K:l.mount),X},Q=T=>{const R={...i,...a.mount?o:{}};return _e(T)?R:Vn(T)?H(R,T):T.map(A=>H(R,A))},se=(T,R)=>({invalid:!!H((R||r).errors,T),isDirty:!!H((R||r).dirtyFields,T),isTouched:!!H((R||r).touchedFields,T),error:H((R||r).errors,T)}),he=T=>{T&&Bt(T).forEach(R=>nt(r.errors,R)),h.state.next({errors:T?r.errors:{}})},Re=(T,R,A)=>{const X=(H(s,T,{_f:{}})._f||{}).ref;ve(r.errors,T,{...R,ref:X}),h.state.next({name:T,errors:r.errors,isValid:!1}),A&&A.shouldFocus&&X&&X.focus&&X.focus()},oe=(T,R)=>Br(T)?h.values.subscribe({next:A=>T(z(void 0,R),A)}):z(T,R,!0),ge=(T,R={})=>{for(const A of T?Bt(T):l.mount)l.mount.delete(A),l.array.delete(A),R.keepValue||(nt(s,A),nt(o,A)),!R.keepError&&nt(r.errors,A),!R.keepDirty&&nt(r.dirtyFields,A),!R.keepTouched&&nt(r.touchedFields,A),!n.shouldUnregister&&!R.keepDefaultValue&&nt(i,A);h.values.next({values:{...o}}),h.state.next({...r,...R.keepDirty?{isDirty:M()}:{}}),!R.keepIsValid&&m()},we=(T,R={})=>{let A=H(s,T);const X=Bi(R.disabled);return ve(s,T,{...A||{},_f:{...A&&A._f?A._f:{ref:{name:T}},name:T,mount:!0,...R}}),l.mount.add(T),_e(R.value)||ve(o,T,R.value),A?X&&ve(o,T,R.disabled?void 0:H(o,T,Hh(A._f))):E(T,!0,R.value),{...X?{disabled:R.disabled}:{},...n.progressive?{required:!!R.required,min:Zo(R.min),max:Zo(R.max),minLength:Zo(R.minLength),maxLength:Zo(R.maxLength),pattern:Zo(R.pattern)}:{},name:T,onChange:G,onBlur:G,ref:K=>{if(K){we(T,R),A=H(s,T);const U=_e(K.value)&&K.querySelectorAll&&K.querySelectorAll("input,select,textarea")[0]||K,ee=F8(U),De=A._f.refs||[];if(ee?De.find(Be=>Be===U):U===A._f.ref)return;ve(s,T,{_f:{...A._f,...ee?{refs:[...De.filter(Vh),U,...Array.isArray(H(i,T))?[{}]:[]],ref:{type:U.type,name:T}}:{ref:U}}}),E(T,!1,void 0,U)}else A=H(s,T,{}),A._f&&(A._f.mount=!1),(n.shouldUnregister||R.shouldUnregister)&&!(Vj(l.array,T)&&a.action)&&l.unMount.add(T)}}},vn=()=>n.shouldFocusError&&Zc(s,T=>T&&H(r.errors,T),l.mount),Ie=(T,R)=>async A=>{A&&(A.preventDefault&&A.preventDefault(),A.persist&&A.persist());let X=St(o);if(h.state.next({isSubmitting:!0}),n.resolver){const{errors:K,values:U}=await P();r.errors=K,X=U}else await $(s);nt(r.errors,"root"),Ut(r.errors)?(h.state.next({errors:{}}),await T(X,A)):(R&&await R({...r.errors},A),vn(),setTimeout(vn)),h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:Ut(r.errors),submitCount:r.submitCount+1,errors:r.errors})},vt=(T,R={})=>{H(s,T)&&(_e(R.defaultValue)?I(T,H(i,T)):(I(T,R.defaultValue),ve(i,T,R.defaultValue)),R.keepTouched||nt(r.touchedFields,T),R.keepDirty||(nt(r.dirtyFields,T),r.isDirty=R.defaultValue?M(T,H(i,T)):M()),R.keepError||(nt(r.errors,T),f.isValid&&m()),h.state.next({...r}))},Tt=(T,R={})=>{const A=T||i,X=St(A),K=T&&!Ut(T)?X:i;if(R.keepDefaultValues||(i=A),!R.keepValues){if(R.keepDirtyValues||p)for(const U of l.mount)H(r.dirtyFields,U)?ve(K,U,H(o,U)):I(U,H(K,U));else{if(Rv&&_e(T))for(const U of l.mount){const ee=H(s,U);if(ee&&ee._f){const De=Array.isArray(ee._f.refs)?ee._f.refs[0]:ee._f.ref;if(ed(De)){const Be=De.closest("form");if(Be){Be.reset();break}}}}s={}}o=e.shouldUnregister?R.keepDefaultValues?St(i):{}:St(K),h.array.next({values:{...K}}),h.values.next({values:{...K}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!f.isValid||!!R.keepIsValid,a.watch=!!e.shouldUnregister,h.state.next({submitCount:R.keepSubmitCount?r.submitCount:0,isDirty:R.keepDirty?r.isDirty:!!(R.keepDefaultValues&&!Ts(T,i)),isSubmitted:R.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:R.keepDirtyValues?r.dirtyFields:R.keepDefaultValues&&T?Bh(i,T):{},touchedFields:R.keepTouched?r.touchedFields:{},errors:R.keepErrors?r.errors:{},isSubmitting:!1,isSubmitSuccessful:!1})},Jt=(T,R)=>Tt(Br(T)?T(o):T,R);return{control:{register:we,unregister:ge,getFieldState:se,handleSubmit:Ie,setError:Re,_executeSchema:P,_getWatch:z,_getDirty:M,_updateValid:m,_removeUnmounted:F,_updateFieldArray:_,_getFieldArray:q,_reset:Tt,_resetDefaultValues:()=>Br(n.defaultValues)&&n.defaultValues().then(T=>{Jt(T,n.resetOptions),h.state.next({isLoading:!1})}),_updateFormState:T=>{r={...r,...T}},_subjects:h,_proxyFormState:f,get _fields(){return s},get _formValues(){return o},get _state(){return a},set _state(T){a=T},get _defaultValues(){return i},get _names(){return l},set _names(T){l=T},get _formState(){return r},set _formState(T){r=T},get _options(){return n},set _options(T){n={...n,...T}}},trigger:W,register:we,handleSubmit:Ie,watch:oe,setValue:I,getValues:Q,reset:Jt,resetField:vt,clearErrors:he,unregister:ge,setError:Re,setFocus:(T,R={})=>{const A=H(s,T),X=A&&A._f;if(X){const K=X.refs?X.refs[0]:X.ref;K.focus&&(K.focus(),R.shouldSelect&&K.select())}},getFieldState:se}}function Yt(e={}){const t=V.useRef(),n=V.useRef(),[r,s]=V.useState({isDirty:!1,isValidating:!1,isLoading:Br(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:{},defaultValues:Br(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...q8(e,()=>s(o=>({...o}))),formState:r});const i=t.current.control;return i._options=e,hf({subject:i._subjects.state,next:o=>{qj(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),V.useEffect(()=>{e.values&&!Ts(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values):i._resetDefaultValues()},[e.values,i]),V.useEffect(()=>{i._state.mount||(i._updateValid(),i._state.mount=!0),i._state.watch&&(i._state.watch=!1,i._subjects.state.next({...i._formState})),i._removeUnmounted()}),t.current.formState=Hj(r,i),t.current}function al(e,t,n){let[r,s]=v.useState(e||t),i=v.useRef(e!==void 0),o=e!==void 0;v.useEffect(()=>{let c=i.current;c!==o&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),i.current=o},[o]);let a=o?e:r,l=v.useCallback((c,...d)=>{let f=(h,...p)=>{n&&(Object.is(a,h)||n(h,...p)),o||(a=h)};typeof c=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),s((p,...g)=>{let b=c(o?a:p,...g);return f(b,...d),o?p:b})):(o||s(c),f(c,...d))},[o,a,n]);return[a,l]}function fW(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function hW(e,t,n,r){let s=(e-(isNaN(t)?0:t))%r,i=Math.abs(s)*2>=r?e+Math.sign(s)*(r-Math.abs(s)):e-s;isNaN(t)?!isNaN(n)&&i>n&&(i=Math.floor(n/r)*r):i<t?i=t:!isNaN(n)&&i>n&&(i=t+Math.floor((n-t)/r)*r);let o=r.toString(),a=o.indexOf("."),l=a>=0?o.length-a:0;if(l>0){let c=Math.pow(10,l);i=Math.round(i*c)/c}return i}function pW(e,t,n=10){const r=Math.pow(n,t);return Math.round(e*r)/r}const sd={prefix:String(Math.round(Math.random()*1e10)),current:0,isSSR:!1},$v=V.createContext(sd);let W8=!!(typeof window<"u"&&window.document&&window.document.createElement),qh=new WeakMap;function K8(e=!1){let t=v.useContext($v),n=v.useRef(null);if(n.current===null&&!e){var r,s;let i=(r=V.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||r===void 0||(s=r.ReactCurrentOwner)===null||s===void 0?void 0:s.current;if(i){let o=qh.get(i);o==null?qh.set(i,{id:t.current,state:i.memoizedState}):i.memoizedState!==o.state&&(t.current=o.id,qh.delete(i))}n.current=++t.current}return n.current}function Q8(e){let t=v.useContext($v);t===sd&&!W8&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=K8(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function G8(e){let t=V.useId(),[n]=v.useState(nk()),r=n?"react-aria":`react-aria${sd.prefix}`;return e||`${r}-${t}`}V.useId;function Y8(){return!1}function X8(){return!0}function J8(e){return()=>{}}function nk(){return typeof V.useSyncExternalStore=="function"?V.useSyncExternalStore(J8,Y8,X8):v.useContext($v).isSSR}function rk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=rk(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}function Z8(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=rk(e))&&(r&&(r+=" "),r+=t);return r}const fn=typeof document<"u"?V.useLayoutEffect:()=>{};function mW(e){let[t,n]=v.useState(e),r=v.useRef(t),s=v.useRef(null),i=v.useCallback(()=>{let a=s.current.next();for(;!a.done&&r.current===a.value;)a=s.current.next();if(a.done){s.current=null;return}n(a.value),r.current=a.value},[n,r,s]);fn(()=>{s.current&&i()});let o=v.useCallback(a=>{s.current=a(r.current),i()},[i,s,r]);return[t,o]}let kb=new Map;function e7(e,t){if(e===t)return e;let n=kb.get(e);if(n)return n(t),t;let r=kb.get(t);return r?(r(e),e):t}function t7(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}function jr(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let s in r){let i=t[s],o=r[s];typeof i=="function"&&typeof o=="function"&&s[0]==="o"&&s[1]==="n"&&s.charCodeAt(2)>=65&&s.charCodeAt(2)<=90?t[s]=t7(i,o):(s==="className"||s==="UNSAFE_className")&&typeof i=="string"&&typeof o=="string"?t[s]=Z8(i,o):s==="id"&&i&&o?t.id=e7(i,o):t[s]=o!==void 0?o:i}}return t}function Tb(e){if(n7())e.focus({preventScroll:!0});else{let t=r7(e);e.focus(),s7(t)}}let Su=null;function n7(){if(Su==null){Su=!1;try{var e=document.createElement("div");e.focus({get preventScroll(){return Su=!0,!0}})}catch{}}return Su}function r7(e){for(var t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function s7(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}let ci=new Map,Gm=new Set;function Pb(){if(typeof window>"u")return;let e=n=>{let r=ci.get(n.target);r||(r=new Set,ci.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{let r=ci.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),ci.delete(n.target)),ci.size===0)){for(let s of Gm)s();Gm.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?Pb():document.addEventListener("DOMContentLoaded",Pb));function i7(e){requestAnimationFrame(()=>{ci.size===0?e():Gm.add(e)})}function gW(){let e=v.useRef(new Map),t=v.useCallback((s,i,o,a)=>{let l=a!=null&&a.once?(...c)=>{e.current.delete(o),o(...c)}:o;e.current.set(o,{type:i,eventTarget:s,fn:l,options:a}),s.addEventListener(i,o,a)},[]),n=v.useCallback((s,i,o,a)=>{var l;let c=((l=e.current.get(o))===null||l===void 0?void 0:l.fn)||o;s.removeEventListener(i,c,a),e.current.delete(o)},[]),r=v.useCallback(()=>{e.current.forEach((s,i)=>{n(s.eventTarget,s.type,i,s.options)})},[n]);return v.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function Io(e){const t=v.useRef();return v.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,typeof e=="function"?e(n):e&&(e.current=n)}}),[e])}function o7(){return typeof window.ResizeObserver<"u"}function yW(e){const{ref:t,onResize:n}=e;v.useEffect(()=>{let r=t==null?void 0:t.current;if(r)if(o7()){const s=new window.ResizeObserver(i=>{i.length&&n()});return s.observe(r),()=>{r&&s.unobserve(r)}}else return window.addEventListener("resize",n,!1),()=>{window.removeEventListener("resize",n,!1)}},[n,t])}function vW(e){for(Rb(e)&&(e=e.parentElement);e&&!Rb(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function Rb(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}let Ln=typeof document<"u"&&window.visualViewport;function a7(){let[e,t]=v.useState(()=>Nb());return v.useEffect(()=>{let n=()=>{t(r=>{let s=Nb();return s.width===r.width&&s.height===r.height?r:s})};return Ln?Ln.addEventListener("resize",n):window.addEventListener("resize",n),()=>{Ln?Ln.removeEventListener("resize",n):window.removeEventListener("resize",n)}},[]),e}function Nb(){return{width:(Ln==null?void 0:Ln.width)||window.innerWidth,height:(Ln==null?void 0:Ln.height)||window.innerHeight}}function l7(e){var t;return typeof window>"u"||window.navigator==null?!1:((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.brands.some(n=>e.test(n.brand)))||e.test(window.navigator.userAgent)}function u7(e){var t;return typeof window<"u"&&window.navigator!=null?e.test(((t=window.navigator.userAgentData)===null||t===void 0?void 0:t.platform)||window.navigator.platform):!1}function c7(){return u7(/^Mac/i)}function d7(){return l7(/Android/i)}function Ob(e){const t=v.useRef(null);return fn(()=>{t.current=e},[e]),v.useCallback((...n)=>{const r=t.current;return r(...n)},[])}function f7(e){return e.mozInputSource===0&&e.isTrusted?!0:d7()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function Do(e={}){const{size:t="md",startAppend:n,endAppend:r,className:s,labelPosition:i,labelDisplay:o="block",inputClassName:a,inputWrapperClassName:l,unstyled:c,invalid:d,disabled:f,background:h="bg-transparent",flexibleHeight:p,inputShadow:g="shadow-sm",descriptionPosition:b="bottom",inputRing:w,inputFontSize:y}={...e};if(c)return{label:"",input:a||"",wrapper:s||"",inputWrapper:l||"",adornment:"",append:{size:"",radius:""},size:{font:"",height:""},description:"",error:""};const m=g7({size:e.size,flexibleHeight:p});y&&(m.font=y);const x=n||r,S=w||`focus:ring ${d?"focus:ring-danger/focus focus:border-danger/60":"focus:ring-primary/focus focus:border-primary/60"}`,E=m7(e);return{label:D(o,"first-letter:capitalize text-left whitespace-nowrap",f&&"text-disabled",m.font,i==="side"?"mr-16":"mb-4"),input:D("block text-left relative w-full appearance-none transition-shadow text",h,E.input,h7(e),!f&&`${S} focus:outline-none ${g}`,f&&"text-disabled cursor-not-allowed",a,m.font,m.height,p7(e)),adornment:y7(t),append:{size:zy(t),radius:E.append},wrapper:D(s,m.font,{"flex items-center":i==="side"}),inputWrapper:D("isolate relative",l,x&&"flex items-stretch"),size:m,description:`text-muted ${b==="bottom"?"pt-10":"pb-10"} text-xs`,error:"text-danger pt-10 text-xs"}}function h7({startAppend:e,endAppend:t,inputBorder:n,invalid:r}){if(n)return n;const s=e||t,i=r?"border-danger":"border-divider";return s?e?`${i} border-y border-r`:`${i} border-y border-l`:`${i} border`}function p7({startAdornment:e,endAdornment:t,inputRadius:n}){return n==="rounded-full"?D(e?"pl-54":"pl-28",t?"pr-54":"pr-28"):D(e?"pl-46":"pl-12",t?"pr-46":"pr-12")}function m7(e){const{startAppend:t,endAppend:n,inputRadius:r}=e,s=t||n;return r==="rounded-full"?{input:D(!s&&"rounded-full",t&&"rounded-r-full rounded-l-none",n&&"rounded-l-full rounded-r-none"),append:t?"rounded-l-full":"rounded-r-full"}:r==="rounded-none"?{input:"",append:""}:r?{input:r,append:r}:{input:D(!s&&"rounded",t&&"rounded-r rounded-l-none",n&&"rounded-l rounded-r-none"),append:t?"rounded-l":"rounded-r"}}function g7({size:e,flexibleHeight:t}){switch(e){case"2xs":return{font:"text-xs",height:t?"min-h-24":"h-24"};case"xs":return{font:"text-xs",height:t?"min-h-30":"h-30"};case"sm":return{font:"text-sm",height:t?"min-h-36":"h-36"};case"lg":return{font:"text-md md:text-lg",height:t?"min-h-50":"h-50"};case"xl":return{font:"text-xl",height:t?"min-h-60":"h-60"};default:return{font:"text-sm",height:t?"min-h-42":"h-42"}}}function y7(e){switch(e){case"2xs":return"icon-2xs";case"xs":return"icon-xs";case"sm":return"icon-sm";case"md":return"icon-sm";case"lg":return"icon-lg";case"xl":return"icon-xl";default:return""}}function Ab({children:e,direction:t,className:n,position:r=t==="start"?"left-0":"right-0"}){return e?u.jsx("div",{className:D("pointer-events-none absolute top-0 z-10 flex h-full min-w-42 items-center justify-center text-muted",r,n),children:e}):null}function v7(e){const t={...e};return Object.keys(t).forEach(n=>{(t[n]==null||t[n]==="")&&delete t[n]}),t}const Iv=V.forwardRef((e,t)=>{const{children:n,description:r,errorMessage:s,descriptionProps:i={},errorMessageProps:o={},startAdornment:a,endAdornment:l,adornmentPosition:c,startAppend:d,endAppend:f,fieldClassNames:h,disabled:p,wrapperProps:g}=e;return u.jsxs("div",{className:h.wrapper,ref:t,...g,children:[u.jsx(x7,{...e}),u.jsxs("div",{className:h.inputWrapper,children:[u.jsx(Ab,{direction:"start",className:h.adornment,position:c,children:a}),d&&u.jsx($b,{style:h.append,disabled:p,children:d}),n,f&&u.jsx($b,{style:h.append,disabled:p,children:f}),u.jsx(Ab,{direction:"end",className:h.adornment,position:c,children:l})]}),r&&!s&&u.jsx("div",{className:h.description,...i,children:r}),s&&u.jsx("div",{className:h.error,...o,children:s})]})});function x7({labelElementType:e,fieldClassNames:t,labelProps:n,label:r,labelSuffix:s,required:i}){if(!r)return null;const o=e||"label",a=u.jsxs(o,{className:t.label,...n,children:[r,i&&u.jsx("span",{className:"text-danger",children:" *"})]});return s?u.jsxs("div",{className:"flex w-full items-center gap-14",children:[a,u.jsx("div",{className:"mb-4 ml-auto text-xs text-muted",children:s})]}):a}function $b({children:e,style:t,disabled:n}){return V.cloneElement(e,{...e.props,disabled:e.props.disabled||n,...v7(t)})}function pf({autoFocus:e,autoSelectText:t},n){const r=v.useRef(e);v.useEffect(()=>{var s;r.current&&n.current&&((s=n.current)==null||s.focus(),t&&n.current.nodeName.toLowerCase()==="input"&&requestAnimationFrame(()=>{n.current.select()})),r.current=!1},[n,t])}function sk(e){const{focusRef:t,labelElementType:n="label",label:r,labelSuffix:s,autoFocus:i,autoSelectText:o,labelPosition:a,descriptionPosition:l,size:c,errorMessage:d,description:f,flexibleHeight:h,startAdornment:p,endAdornment:g,startAppend:b,adornmentPosition:w,endAppend:y,className:m,inputClassName:x,inputWrapperClassName:_,unstyled:S,background:E,invalid:C,disabled:k,id:P,inputRadius:O,inputBorder:$,inputShadow:F,inputRing:M,inputFontSize:z,...q}=e;pf(e,t);const B=v.useId(),J=P||B,I=`${J}-label`,G=`${J}-description`,W=`${J}-error`,Q={id:I,htmlFor:n==="label"?J:void 0},se={id:G},he={id:W},oe={"aria-label":!e.label&&!e["aria-label"]&&e.placeholder?e.placeholder:e["aria-label"],"aria-invalid":C||void 0,id:J,disabled:k,...q},ge=[];r&&ge.push(Q.id),oe["aria-labelledby"]&&ge.push(oe["aria-labelledby"]),oe["aria-labelledby"]=ge.length?ge.join(" "):void 0;const we=[];return f&&we.push(se.id),d&&we.push(he.id),oe["aria-describedby"]&&we.push(oe["aria-describedby"]),oe["aria-describedby"]=we.length?we.join(" "):void 0,{fieldProps:{errorMessageProps:he,descriptionProps:se,labelProps:Q,disabled:k,label:r,labelSuffix:s,autoFocus:i,autoSelectText:o,labelPosition:a,descriptionPosition:l,size:c,errorMessage:d,description:f,flexibleHeight:h,startAdornment:p,endAdornment:g,startAppend:b,adornmentPosition:w,endAppend:y,className:m,inputClassName:x,inputWrapperClassName:_,unstyled:S,background:E,invalid:C},inputProps:oe}}const mf=v.forwardRef(({inputElementType:e="input",flexibleHeight:t,inputRef:n,inputTestId:r,...s},i)=>{const o=Io(n),{fieldProps:a,inputProps:l}=sk({...s,focusRef:o}),c=e==="textarea",d=c?"textarea":"input",f=Do({...s,flexibleHeight:t||e==="textarea"});return e==="textarea"&&!s.unstyled&&(f.input=`${f.input} py-12`),u.jsx(Iv,{ref:i,fieldClassNames:f,...a,children:u.jsx(d,{"data-testid":r,ref:o,...l,rows:c?l.rows||4:void 0,className:f.input})})}),Ae=V.forwardRef(({name:e,...t},n)=>{const{field:{onChange:r,onBlur:s,value:i="",ref:o},fieldState:{invalid:a,error:l}}=$o({name:e}),c={onChange:r,onBlur:s,value:i??"",invalid:a,errorMessage:l==null?void 0:l.message,inputRef:o,name:e};return u.jsx(mf,{ref:n,...jr(c,t)})});function Xt({children:e,onBeforeSubmit:t,onSubmit:n,form:r,className:s,id:i,onBlur:o}){return u.jsx(O8,{...r,children:u.jsx("form",{id:i,onBlur:o,className:s,onSubmit:a=>{a.stopPropagation(),t==null||t(),r.handleSubmit(n)(a)},children:e})})}const ls="text-primary hover:underline hover:text-primary-dark focus-visible:ring focus-visible:ring-2 focus-visible:ring-offset-2 outline-none rounded transition-colors";function xW({children:e,className:t,target:n="_blank",...r}){return u.jsx("a",{className:ls,target:n,...r,children:e})}function yn(e,t){if(t&&Er.isAxiosError(e)&&e.response){const n=e.response.data;n.errors?Object.entries(n.errors||{}).forEach(([r,s],i)=>{typeof s=="string"?t.setError(r,{message:s},{shouldFocus:i===0}):s.forEach((o,a)=>{t.setError(r,{message:o},{shouldFocus:i===0&&a===0})})}):de.danger(n.message??ie("There was an issue. Please try again later."))}}function b7(e){const t=gn(),{getRedirectUri:n}=tt(),{setBootstrapData:r}=Lt();return me(w7,{onSuccess:s=>{r(s.bootstrapData),s.status==="needs_email_verification"?t("/"):t(n(),{replace:!0})},onError:s=>yn(s,e)})}function w7(e){return Z.post("auth/register",e).then(t=>t.data)}function _7(e){const t=gn(),{getRedirectUri:n}=tt(),{setBootstrapData:r}=Lt();return me(S7,{onSuccess:s=>{r(s.bootstrapData),t(n(),{replace:!0})},onError:s=>yn(s,e)})}function S7(e){return Z.post("secure/auth/social/connect",e).then(t=>t.data)}function Xn(){const{lines:e,localeCode:t}=Zs();return{trans:v.useCallback(r=>E7({...r,lines:e,localeCode:t}),[e,t])}}const E7=Pl(e=>{let{lines:t,message:n,values:r,localeCode:s}=e;return n=(t==null?void 0:t[n])||n,r&&(n=xC(s,e),Object.entries(r).forEach(([i,o])=>{n=n.replace(`:${i}`,`${o}`)})),n},{equals:zs,callTimeout:0});function C7({onDismiss:e}){const{trans:t}=Xn(),n=()=>{e&&e()};return u.jsx("button",{className:"sr-only","aria-label":t(ie("Dismiss")),tabIndex:-1,onClick:n})}function Ul(e){const{type:t="modal",dialogProps:n,...r}=v.useContext(tf),{children:s,className:i,size:o="md",background:a,radius:l="rounded",maxWidth:c="max-w-dialog",...d}=e;let f=null;(t==="popover"||t==="tray")&&(f=u.jsx(C7,{onDismiss:r.close}));const h=o==="fullscreenTakeover"||t==="tray",p=D("mx-auto pointer-events-auto outline-none flex flex-col overflow-hidden",a||"bg-paper",t!=="tray"&&j7(o),t==="tray"&&"rounded-t",o!=="fullscreenTakeover"&&"shadow-2xl border max-h-dialog",!h&&`${l} ${c}`,i);return u.jsxs("div",{...jr({role:"dialog",tabIndex:-1},n,d),style:{...e.style,"--be-dialog-padding":"24px"},"aria-modal":!0,className:p,children:[v.Children.toArray(s).map(g=>v.isValidElement(g)?v.cloneElement(g,{size:g.props.size??o}):g),f]})}function j7(e){switch(e){case"2xs":return"w-256";case"xs":return"w-320";case"sm":return"w-384";case"md":return"w-440";case"lg":return"w-620";case"xl":return"w-780";case"2xl":return"w-850";case"fullscreen":return"w-1280";case"fullscreenTakeover":return"w-full h-full";default:return e}}function zl(e){const{children:t,className:n,color:r,onDismiss:s,leftAdornment:i,rightAdornment:o,hideDismissButton:a=!1,size:l,showDivider:c,titleTextSize:d=l==="xs"?"text-xs":"text-sm",closeButtonSize:f=l==="xs"?"xs":"sm"}=e,{labelId:h,isDismissable:p,close:g}=v.useContext(tf);return u.jsxs("div",{className:D(n,"flex items-center justify-between gap-10 flex-shrink-0",c&&"border-b",k7(e),r||"text-main"),children:[i,u.jsx("h3",{id:h,className:D(d,"font-semibold leading-5 opacity-90"),children:t}),o,p&&!a&&u.jsx(Cr,{"aria-label":"Dismiss",onClick:()=>{s?s():g()},size:f,className:D("text-muted ml-auto -mr-8",o&&"sr-only"),children:u.jsx(Ij,{})})]})}function k7({size:e,padding:t}){if(t)return t;switch(e){case"2xs":case"xs":return"px-14 py-4";case"sm":return"px-18 py-4";default:return"px-24 py-6"}}const Vl=v.forwardRef((e,t)=>{const{children:n,className:r,padding:s,size:i,...o}=e;return u.jsx("div",{...o,ref:t,className:D(r,T7(e),"overflow-y-auto overflow-x-hidden overscroll-contain text-sm flex-auto"),children:n})});function T7({size:e,padding:t}){if(t)return t;switch(e){case"xs":return"p-14";case"sm":return"p-18";default:return"px-24 py-20"}}function gf(e){const{children:t,startAction:n,className:r,dividerTop:s,padding:i,size:o}=e;return u.jsxs("div",{className:D(r,s&&"border-t",P7(e),"flex items-center gap-10 flex-shrink-0"),children:[u.jsx("div",{children:n}),u.jsx("div",{className:"ml-auto flex items-center gap-10",children:t})]})}function P7({padding:e,size:t}){if(e)return e;switch(t){case"xs":return"p-14";case"sm":return"p-18";default:return"px-24 py-20"}}function R7(){return me(N7,{onError:e=>dt(e)})}function N7(e){return Z.post(`secure/auth/social/${e.service}/disconnect`,e).then(t=>t.data)}function ik(){const{trans:e}=Xn(),{setBootstrapData:t}=Lt(),n=R7(),[r,s]=v.useState(!1),i=v.useCallback(o=>{const{status:a,callbackData:l}=o;if(a)switch(a.toUpperCase()){case"SUCCESS":return l!=null&&l.bootstrapData&&t(l.bootstrapData),o;case"REQUEST_PASSWORD":return s(!0),o;case"ERROR":const c=(l==null?void 0:l.errorMessage)||e({message:"An error occurred. Please try again later"});return de.danger(c),o;default:return o}},[e,t]);return{requestingPassword:r,setIsRequestingPassword:s,loginWithSocial:async o=>{const a=await Mb(`secure/auth/social/${o}/login`);return i(a)},connectSocial:async o=>{const a=o.includes("/")?o:`secure/auth/social/${o}/connect`,l=await Mb(a);return i(l)},disconnectSocial:n}}const Ib=550,Db=650;let Wh;function Mb(e){const t=window.screen.width/2-Db/2,n=window.screen.height/2-Ib/2;return new Promise(r=>{Wh=window.open(e,"Authenticate Account",`menubar=0, location=0, toolbar=0, titlebar=0, status=0, scrollbars=1, width=${Db}, height=${Ib}, left=${t}, top=${n}`);const s=o=>{const a=Pn().settings.base_url;o.data.type==="social-auth"&&a.indexOf(o.origin)>-1&&(r(o.data),window.removeEventListener("message",s))};window.addEventListener("message",s);const i=setInterval(()=>{(!Wh||Wh.closed)&&(clearInterval(i),r({}),window.removeEventListener("message",s))},1e3)})}const ok=re(u.jsxs("g",{children:[u.jsx("path",{fill:"#EA4335",d:"M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"}),u.jsx("path",{fill:"#4285F4",d:"M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"}),u.jsx("path",{fill:"#FBBC05",d:"M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"}),u.jsx("path",{fill:"#34A853",d:"M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"}),u.jsx("path",{fill:"none",d:"M0 0h48v48H0z"})]})),ak=re(u.jsx("path",{d:"M5 3h14a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2m13 2h-2.5A3.5 3.5 0 0 0 12 8.5V11h-2v3h2v7h3v-7h3v-3h-3V9a1 1 0 0 1 1-1h2V5z"})),lk=re(u.jsx("path",{d:"M22.46 6c-.77.35-1.6.58-2.46.69.88-.53 1.56-1.37 1.88-2.38-.83.5-1.75.85-2.72 1.05C18.37 4.5 17.26 4 16 4c-2.35 0-4.27 1.92-4.27 4.29 0 .34.04.67.11.98C8.28 9.09 5.11 7.38 3 4.79c-.37.63-.58 1.37-.58 2.15 0 1.49.75 2.81 1.91 3.56-.71 0-1.37-.2-1.95-.5v.03c0 2.08 1.48 3.82 3.44 4.21a4.22 4.22 0 0 1-1.93.07 4.28 4.28 0 0 0 4 2.98 8.521 8.521 0 0 1-5.33 1.84c-.34 0-.68-.02-1.02-.06C3.44 20.29 5.7 21 8.12 21 16 21 20.33 14.46 20.33 8.79c0-.19 0-.37-.01-.56.84-.6 1.56-1.36 2.14-2.23z"}));function Mo(e){return e.split("-")[1]}function Dv(e){return e==="y"?"height":"width"}function rs(e){return e.split("-")[0]}function Lo(e){return["top","bottom"].includes(rs(e))?"x":"y"}function Lb(e,t,n){let{reference:r,floating:s}=e;const i=r.x+r.width/2-s.width/2,o=r.y+r.height/2-s.height/2,a=Lo(t),l=Dv(a),c=r[l]/2-s[l]/2,d=a==="x";let f;switch(rs(t)){case"top":f={x:i,y:r.y-s.height};break;case"bottom":f={x:i,y:r.y+r.height};break;case"right":f={x:r.x+r.width,y:o};break;case"left":f={x:r.x-s.width,y:o};break;default:f={x:r.x,y:r.y}}switch(Mo(t)){case"start":f[a]-=c*(n&&d?-1:1);break;case"end":f[a]+=c*(n&&d?-1:1)}return f}const O7=async(e,t,n)=>{const{placement:r="bottom",strategy:s="absolute",middleware:i=[],platform:o}=n,a=i.filter(Boolean),l=await(o.isRTL==null?void 0:o.isRTL(t));let c=await o.getElementRects({reference:e,floating:t,strategy:s}),{x:d,y:f}=Lb(c,r,l),h=r,p={},g=0;for(let b=0;b<a.length;b++){const{name:w,fn:y}=a[b],{x:m,y:x,data:_,reset:S}=await y({x:d,y:f,initialPlacement:r,placement:h,strategy:s,middlewareData:p,rects:c,platform:o,elements:{reference:e,floating:t}});d=m??d,f=x??f,p={...p,[w]:{...p[w],..._}},S&&g<=50&&(g++,typeof S=="object"&&(S.placement&&(h=S.placement),S.rects&&(c=S.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:s}):S.rects),{x:d,y:f}=Lb(c,h,l)),b=-1)}return{x:d,y:f,placement:h,strategy:s,middlewareData:p}};function Fo(e,t){return typeof e=="function"?e(t):e}function uk(e){return typeof e!="number"?function(t){return{top:0,right:0,bottom:0,left:0,...t}}(e):{top:e,right:e,bottom:e,left:e}}function id(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}async function Mv(e,t){var n;t===void 0&&(t={});const{x:r,y:s,platform:i,rects:o,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:p=0}=Fo(t,e),g=uk(p),b=a[h?f==="floating"?"reference":"floating":f],w=id(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(b)))==null||n?b:b.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),y=f==="floating"?{...o.floating,x:r,y:s}:o.reference,m=await(i.getOffsetParent==null?void 0:i.getOffsetParent(a.floating)),x=await(i.isElement==null?void 0:i.isElement(m))&&await(i.getScale==null?void 0:i.getScale(m))||{x:1,y:1},_=id(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({rect:y,offsetParent:m,strategy:l}):y);return{top:(w.top-_.top+g.top)/x.y,bottom:(_.bottom-w.bottom+g.bottom)/x.y,left:(w.left-_.left+g.left)/x.x,right:(_.right-w.right+g.right)/x.x}}const ll=Math.min,xs=Math.max;function Ym(e,t,n){return xs(e,ll(t,n))}const Fb=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a}=t,{element:l,padding:c=0}=Fo(e,t)||{};if(l==null)return{};const d=uk(c),f={x:n,y:r},h=Lo(s),p=Dv(h),g=await o.getDimensions(l),b=h==="y",w=b?"top":"left",y=b?"bottom":"right",m=b?"clientHeight":"clientWidth",x=i.reference[p]+i.reference[h]-f[h]-i.floating[p],_=f[h]-i.reference[h],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l));let E=S?S[m]:0;E&&await(o.isElement==null?void 0:o.isElement(S))||(E=a.floating[m]||i.floating[p]);const C=x/2-_/2,k=E/2-g[p]/2-1,P=ll(d[w],k),O=ll(d[y],k),$=P,F=E-g[p]-O,M=E/2-g[p]/2+C,z=Ym($,M,F),q=Mo(s)!=null&&M!=z&&i.reference[p]/2-(M<$?P:O)-g[p]/2<0?M<$?$-M:F-M:0;return{[h]:f[h]-q,data:{[h]:z,centerOffset:M-z+q}}}}),A7=["top","right","bottom","left"];A7.reduce((e,t)=>e.concat(t,t+"-start",t+"-end"),[]);const $7={left:"right",right:"left",bottom:"top",top:"bottom"};function od(e){return e.replace(/left|right|bottom|top/g,t=>$7[t])}function I7(e,t,n){n===void 0&&(n=!1);const r=Mo(e),s=Lo(e),i=Dv(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=od(o)),{main:o,cross:od(o)}}const D7={start:"end",end:"start"};function Kh(e){return e.replace(/start|end/g,t=>D7[t])}const M7=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n;const{placement:r,middlewareData:s,rects:i,initialPlacement:o,platform:a,elements:l}=t,{mainAxis:c=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:g=!0,...b}=Fo(e,t),w=rs(r),y=rs(o)===o,m=await(a.isRTL==null?void 0:a.isRTL(l.floating)),x=f||(y||!g?[od(o)]:function($){const F=od($);return[Kh($),F,Kh(F)]}(o));f||p==="none"||x.push(...function($,F,M,z){const q=Mo($);let B=function(J,I,G){const W=["left","right"],Q=["right","left"],se=["top","bottom"],he=["bottom","top"];switch(J){case"top":case"bottom":return G?I?Q:W:I?W:Q;case"left":case"right":return I?se:he;default:return[]}}(rs($),M==="start",z);return q&&(B=B.map(J=>J+"-"+q),F&&(B=B.concat(B.map(Kh)))),B}(o,g,p,m));const _=[o,...x],S=await Mv(t,b),E=[];let C=((n=s.flip)==null?void 0:n.overflows)||[];if(c&&E.push(S[w]),d){const{main:$,cross:F}=I7(r,i,m);E.push(S[$],S[F])}if(C=[...C,{placement:r,overflows:E}],!E.every($=>$<=0)){var k,P;const $=(((k=s.flip)==null?void 0:k.index)||0)+1,F=_[$];if(F)return{data:{index:$,overflows:C},reset:{placement:F}};let M=(P=C.filter(z=>z.overflows[0]<=0).sort((z,q)=>z.overflows[1]-q.overflows[1])[0])==null?void 0:P.placement;if(!M)switch(h){case"bestFit":{var O;const z=(O=C.map(q=>[q.placement,q.overflows.filter(B=>B>0).reduce((B,J)=>B+J,0)]).sort((q,B)=>q[1]-B[1])[0])==null?void 0:O[0];z&&(M=z);break}case"initialPlacement":M=o}if(r!==M)return{reset:{placement:M}}}return{}}}},L7=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){const{x:n,y:r}=t,s=await async function(i,o){const{placement:a,platform:l,elements:c}=i,d=await(l.isRTL==null?void 0:l.isRTL(c.floating)),f=rs(a),h=Mo(a),p=Lo(a)==="x",g=["left","top"].includes(f)?-1:1,b=d&&p?-1:1,w=Fo(o,i);let{mainAxis:y,crossAxis:m,alignmentAxis:x}=typeof w=="number"?{mainAxis:w,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...w};return h&&typeof x=="number"&&(m=h==="end"?-1*x:x),p?{x:m*b,y:y*g}:{x:y*g,y:m*b}}(t,e);return{x:n+s.x,y:r+s.y,data:s}}}};function F7(e){return e==="x"?"y":"x"}const U7=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:s}=t,{mainAxis:i=!0,crossAxis:o=!1,limiter:a={fn:w=>{let{x:y,y:m}=w;return{x:y,y:m}}},...l}=Fo(e,t),c={x:n,y:r},d=await Mv(t,l),f=Lo(rs(s)),h=F7(f);let p=c[f],g=c[h];if(i){const w=f==="y"?"bottom":"right";p=Ym(p+d[f==="y"?"top":"left"],p,p-d[w])}if(o){const w=h==="y"?"bottom":"right";g=Ym(g+d[h==="y"?"top":"left"],g,g-d[w])}const b=a.fn({...t,[f]:p,[h]:g});return{...b,data:{x:b.x-n,y:b.y-r}}}}},z7=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){const{placement:n,rects:r,platform:s,elements:i}=t,{apply:o=()=>{},...a}=Fo(e,t),l=await Mv(t,a),c=rs(n),d=Mo(n),f=Lo(n)==="x",{width:h,height:p}=r.floating;let g,b;c==="top"||c==="bottom"?(g=c,b=d===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=c,g=d==="end"?"top":"bottom");const w=p-l[g],y=h-l[b],m=!t.middlewareData.shift;let x=w,_=y;if(f){const E=h-l.left-l.right;_=d||m?ll(y,E):E}else{const E=p-l.top-l.bottom;x=d||m?ll(w,E):E}if(m&&!d){const E=xs(l.left,0),C=xs(l.right,0),k=xs(l.top,0),P=xs(l.bottom,0);f?_=h-2*(E!==0||C!==0?E+C:xs(l.left,l.right)):x=p-2*(k!==0||P!==0?k+P:xs(l.top,l.bottom))}await o({...t,availableWidth:_,availableHeight:x});const S=await s.getDimensions(i.floating);return h!==S.width||p!==S.height?{reset:{rects:!0}}:{}}}};function hn(e){var t;return((t=e.ownerDocument)==null?void 0:t.defaultView)||window}function kn(e){return hn(e).getComputedStyle(e)}function ck(e){return e instanceof hn(e).Node}function us(e){return ck(e)?(e.nodeName||"").toLowerCase():"#document"}function Nn(e){return e instanceof hn(e).HTMLElement}function pr(e){return e instanceof hn(e).Element}function Ub(e){return typeof ShadowRoot<"u"&&(e instanceof hn(e).ShadowRoot||e instanceof ShadowRoot)}function ul(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=kn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function V7(e){return["table","td","th"].includes(us(e))}function Xm(e){const t=Lv(),n=kn(e);return n.transform!=="none"||n.perspective!=="none"||!t&&!!n.backdropFilter&&n.backdropFilter!=="none"||!t&&!!n.filter&&n.filter!=="none"||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Lv(){return!(typeof CSS>"u"||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function yf(e){return["html","body","#document"].includes(us(e))}const Jm=Math.min,Hi=Math.max,ad=Math.round,Eu=Math.floor,Ws=e=>({x:e,y:e});function dk(e){const t=kn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Nn(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=ad(n)!==i||ad(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function Fv(e){return pr(e)?e:e.contextElement}function qi(e){const t=Fv(e);if(!Nn(t))return Ws(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=dk(t);let o=(i?ad(n.width):n.width)/r,a=(i?ad(n.height):n.height)/s;return o&&Number.isFinite(o)||(o=1),a&&Number.isFinite(a)||(a=1),{x:o,y:a}}const zb=Ws(0);function fk(e,t,n){var r,s;if(t===void 0&&(t=!0),!Lv())return zb;const i=e?hn(e):window;return!n||t&&n!==i?zb:{x:((r=i.visualViewport)==null?void 0:r.offsetLeft)||0,y:((s=i.visualViewport)==null?void 0:s.offsetTop)||0}}function Ks(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Fv(e);let o=Ws(1);t&&(r?pr(r)&&(o=qi(r)):o=qi(e));const a=fk(i,n,r);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,d=s.width/o.x,f=s.height/o.y;if(i){const h=hn(i),p=r&&pr(r)?hn(r):r;let g=h.frameElement;for(;g&&r&&p!==h;){const b=qi(g),w=g.getBoundingClientRect(),y=getComputedStyle(g),m=w.left+(g.clientLeft+parseFloat(y.paddingLeft))*b.x,x=w.top+(g.clientTop+parseFloat(y.paddingTop))*b.y;l*=b.x,c*=b.y,d*=b.x,f*=b.y,l+=m,c+=x,g=hn(g).frameElement}}return id({width:d,height:f,x:l,y:c})}function mr(e){return((ck(e)?e.ownerDocument:e.document)||window.document).documentElement}function vf(e){return pr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function hk(e){return Ks(mr(e)).left+vf(e).scrollLeft}function bo(e){if(us(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Ub(e)&&e.host||mr(e);return Ub(t)?t.host:t}function pk(e){const t=bo(e);return yf(t)?e.ownerDocument?e.ownerDocument.body:e.body:Nn(t)&&ul(t)?t:pk(t)}function ld(e,t){var n;t===void 0&&(t=[]);const r=pk(e),s=r===((n=e.ownerDocument)==null?void 0:n.body),i=hn(r);return s?t.concat(i,i.visualViewport||[],ul(r)?r:[]):t.concat(r,ld(r))}function Vb(e,t,n){let r;if(t==="viewport")r=function(s,i){const o=hn(s),a=mr(s),l=o.visualViewport;let c=a.clientWidth,d=a.clientHeight,f=0,h=0;if(l){c=l.width,d=l.height;const p=Lv();(!p||p&&i==="fixed")&&(f=l.offsetLeft,h=l.offsetTop)}return{width:c,height:d,x:f,y:h}}(e,n);else if(t==="document")r=function(s){const i=mr(s),o=vf(s),a=s.ownerDocument.body,l=Hi(i.scrollWidth,i.clientWidth,a.scrollWidth,a.clientWidth),c=Hi(i.scrollHeight,i.clientHeight,a.scrollHeight,a.clientHeight);let d=-o.scrollLeft+hk(s);const f=-o.scrollTop;return kn(a).direction==="rtl"&&(d+=Hi(i.clientWidth,a.clientWidth)-l),{width:l,height:c,x:d,y:f}}(mr(e));else if(pr(t))r=function(s,i){const o=Ks(s,!0,i==="fixed"),a=o.top+s.clientTop,l=o.left+s.clientLeft,c=Nn(s)?qi(s):Ws(1);return{width:s.clientWidth*c.x,height:s.clientHeight*c.y,x:l*c.x,y:a*c.y}}(t,n);else{const s=fk(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return id(r)}function mk(e,t){const n=bo(e);return!(n===t||!pr(n)||yf(n))&&(kn(n).position==="fixed"||mk(n,t))}function Bb(e,t){return Nn(e)&&kn(e).position!=="fixed"?t?t(e):e.offsetParent:null}function Hb(e,t){const n=hn(e);if(!Nn(e))return n;let r=Bb(e,t);for(;r&&V7(r)&&kn(r).position==="static";)r=Bb(r,t);return r&&(us(r)==="html"||us(r)==="body"&&kn(r).position==="static"&&!Xm(r))?n:r||function(s){let i=bo(s);for(;Nn(i)&&!yf(i);){if(Xm(i))return i;i=bo(i)}return null}(e)||n}function B7(e,t,n){const r=Nn(t),s=mr(t),i=n==="fixed",o=Ks(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=Ws(0);if(r||!r&&!i)if((us(t)!=="body"||ul(s))&&(a=vf(t)),Nn(t)){const c=Ks(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else s&&(l.x=hk(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}const H7={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const i=n==="clippingAncestors"?function(c,d){const f=d.get(c);if(f)return f;let h=ld(c).filter(w=>pr(w)&&us(w)!=="body"),p=null;const g=kn(c).position==="fixed";let b=g?bo(c):c;for(;pr(b)&&!yf(b);){const w=kn(b),y=Xm(b);y||w.position!=="fixed"||(p=null),(g?!y&&!p:!y&&w.position==="static"&&p&&["absolute","fixed"].includes(p.position)||ul(b)&&!y&&mk(c,b))?h=h.filter(m=>m!==b):p=w,b=bo(b)}return d.set(c,h),h}(t,this._c):[].concat(n),o=[...i,r],a=o[0],l=o.reduce((c,d)=>{const f=Vb(t,d,s);return c.top=Hi(f.top,c.top),c.right=Jm(f.right,c.right),c.bottom=Jm(f.bottom,c.bottom),c.left=Hi(f.left,c.left),c},Vb(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e;const s=Nn(n),i=mr(n);if(n===i)return t;let o={scrollLeft:0,scrollTop:0},a=Ws(1);const l=Ws(0);if((s||!s&&r!=="fixed")&&((us(n)!=="body"||ul(i))&&(o=vf(n)),Nn(n))){const c=Ks(n);a=qi(n),l.x=c.x+n.clientLeft,l.y=c.y+n.clientTop}return{width:t.width*a.x,height:t.height*a.y,x:t.x*a.x-o.scrollLeft*a.x+l.x,y:t.y*a.y-o.scrollTop*a.y+l.y}},isElement:pr,getDimensions:function(e){return dk(e)},getOffsetParent:Hb,getDocumentElement:mr,getScale:qi,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e;const s=this.getOffsetParent||Hb,i=this.getDimensions;return{reference:B7(t,await s(n),r),floating:{x:0,y:0,...await i(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>kn(e).direction==="rtl"};function q7(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=!0,layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Fv(e),d=s||i?[...c?ld(c):[],...ld(t)]:[];d.forEach(b=>{s&&b.addEventListener("scroll",n,{passive:!0}),i&&b.addEventListener("resize",n)});const f=c&&a?function(b,w){let y,m=null;const x=mr(b);function _(){clearTimeout(y),m&&m.disconnect(),m=null}return function S(E,C){E===void 0&&(E=!1),C===void 0&&(C=1),_();const{left:k,top:P,width:O,height:$}=b.getBoundingClientRect();if(E||w(),!O||!$)return;const F=Eu(P),M=Eu(x.clientWidth-(k+O)),z=Eu(x.clientHeight-(P+$)),q=Eu(k);let B=!0;m=new IntersectionObserver(J=>{const I=J[0].intersectionRatio;if(I!==C){if(!B)return S();I?S(!1,I):y=setTimeout(()=>{S(!1,1e-7)},100)}B=!1},{rootMargin:-F+"px "+-M+"px "+-z+"px "+-q+"px",threshold:Hi(0,Jm(1,C))||1}),m.observe(b)}(!0),_}(c,n):null;let h,p=null;o&&(p=new ResizeObserver(n),c&&!l&&p.observe(c),p.observe(t));let g=l?Ks(e):null;return l&&function b(){const w=Ks(e);!g||w.x===g.x&&w.y===g.y&&w.width===g.width&&w.height===g.height||n(),g=w,h=requestAnimationFrame(b)}(),n(),()=>{d.forEach(b=>{s&&b.removeEventListener("scroll",n),i&&b.removeEventListener("resize",n)}),f&&f(),p&&p.disconnect(),p=null,l&&cancelAnimationFrame(h)}}const W7=(e,t,n)=>{const r=new Map,s={platform:H7,...n},i={...s.platform,_c:r};return O7(e,t,{...s,platform:i})},K7=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:s}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Fb({element:r.current,padding:s}).fn(n):{}:r?Fb({element:r,padding:s}).fn(n):{}}}};var ec=typeof document<"u"?v.useLayoutEffect:v.useEffect;function ud(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,s;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!=t.length)return!1;for(r=n;r--!==0;)if(!ud(e[r],t[r]))return!1;return!0}if(s=Object.keys(e),n=s.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,s[r]))return!1;for(r=n;r--!==0;){const i=s[r];if(!(i==="_owner"&&e.$$typeof)&&!ud(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function gk(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function qb(e,t){const n=gk(e);return Math.round(t*n)/n}function Wb(e){const t=v.useRef(e);return ec(()=>{t.current=e}),t}function Q7(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:s,elements:{reference:i,floating:o}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[d,f]=v.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=v.useState(r);ud(h,r)||p(r);const[g,b]=v.useState(null),[w,y]=v.useState(null),m=v.useCallback(B=>{B!=E.current&&(E.current=B,b(B))},[b]),x=v.useCallback(B=>{B!==C.current&&(C.current=B,y(B))},[y]),_=i||g,S=o||w,E=v.useRef(null),C=v.useRef(null),k=v.useRef(d),P=Wb(l),O=Wb(s),$=v.useCallback(()=>{if(!E.current||!C.current)return;const B={placement:t,strategy:n,middleware:h};O.current&&(B.platform=O.current),W7(E.current,C.current,B).then(J=>{const I={...J,isPositioned:!0};F.current&&!ud(k.current,I)&&(k.current=I,Eo.flushSync(()=>{f(I)}))})},[h,t,n,O]);ec(()=>{c===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,f(B=>({...B,isPositioned:!1})))},[c]);const F=v.useRef(!1);ec(()=>(F.current=!0,()=>{F.current=!1}),[]),ec(()=>{if(_&&(E.current=_),S&&(C.current=S),_&&S){if(P.current)return P.current(_,S,$);$()}},[_,S,$,P]);const M=v.useMemo(()=>({reference:E,floating:C,setReference:m,setFloating:x}),[m,x]),z=v.useMemo(()=>({reference:_,floating:S}),[_,S]),q=v.useMemo(()=>{const B={position:n,left:0,top:0};if(!z.floating)return B;const J=qb(z.floating,d.x),I=qb(z.floating,d.y);return a?{...B,transform:"translate("+J+"px, "+I+"px)",...gk(z.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:J,top:I}},[n,a,z.floating,d.x,d.y]);return v.useMemo(()=>({...d,update:$,refs:M,elements:z,floatingStyles:q}),[d,$,M,z,q])}function G7(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Uv({floatingWidth:e,ref:t,disablePositioning:n=!1,placement:r="bottom",offset:s=2,showArrow:i=!1,maxHeight:o,shiftCrossAxis:a=!0,fallbackPlacements:l}){const c=v.useRef(null),d={placement:r,strategy:"fixed"};n||(d.whileElementsMounted=q7,d.middleware=[L7(s),U7({padding:16,crossAxis:a,mainAxis:!0}),M7({padding:16,fallbackPlacements:l}),z7({apply({rects:y,availableHeight:m,availableWidth:x,elements:_}){e==="matchTrigger"&&o!=null&&Object.assign(_.floating.style,{width:`${y.reference.width}px`,maxWidth:`${x}`,maxHeight:`${Math.min(m,o)}px`})},padding:16})],i&&d.middleware.push(K7({element:c})));const f=Q7(d),h=v.useMemo(()=>G7([t,f.refs.setReference]),[f.refs.setReference,t]),{x:p,y:g}=f.middlewareData.arrow||{},b={top:"bottom",right:"left",bottom:"top",left:"right"}[f.placement.split("-")[0]],w={left:p,top:g,right:"",bottom:"",[b]:"-4px"};return{...f,reference:h,arrowRef:c,arrowStyle:w}}function Y7(e,{noSSR:t}={noSSR:!0}){const n=typeof window<"u"&&typeof window.matchMedia=="function",[r,s]=v.useState(t?()=>n?window.matchMedia(e).matches:!1:null);return v.useEffect(()=>{if(!n)return;const i=window.matchMedia(e),o=()=>{s(i.matches)};return i.addEventListener("change",o),t||o(),()=>{i.removeEventListener("change",o)}},[n,e,t]),typeof window>"u"?null:r}function zv(e){return Y7("(max-width: 768px)",e)}const yk={initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},transition:{type:"tween",duration:.125}};function Vv(){const{width:e,height:t}=a7();return{"--be-viewport-height":`${t}px`,"--be-viewport-width":`${e}px`}}const X7=V.createContext(null);X7.displayName="PressResponderContext";let Bl=null,J7=new Set,Kb=!1,Qs=!1,Zm=!1;function Bv(e,t){for(let n of J7)n(e,t)}function Z7(e){return!(e.metaKey||!c7()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function Qb(e){Qs=!0,Z7(e)&&(Bl="keyboard",Bv("keyboard",e))}function ai(e){Bl="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Qs=!0,Bv("pointer",e))}function e9(e){f7(e)&&(Qs=!0,Bl="virtual")}function t9(e){e.target===window||e.target===document||(!Qs&&!Zm&&(Bl="virtual",Bv("virtual",e)),Qs=!1,Zm=!1)}function n9(){Qs=!1,Zm=!0}function Gb(){if(typeof window>"u"||Kb)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){Qs=!0,e.apply(this,arguments)},document.addEventListener("keydown",Qb,!0),document.addEventListener("keyup",Qb,!0),document.addEventListener("click",e9,!0),window.addEventListener("focus",t9,!0),window.addEventListener("blur",n9,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",ai,!0),document.addEventListener("pointermove",ai,!0),document.addEventListener("pointerup",ai,!0)):(document.addEventListener("mousedown",ai,!0),document.addEventListener("mousemove",ai,!0),document.addEventListener("mouseup",ai,!0)),Kb=!0}typeof document<"u"&&(document.readyState!=="loading"?Gb():document.addEventListener("DOMContentLoaded",Gb));function r9(){return Bl}function bW(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:s}=e,i=v.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=Ob(l=>{n&&Cu(l,t)&&(s&&s(l),i.current.isPointerDown=!0)}),a=Ob(l=>{n&&n(l)});v.useEffect(()=>{let l=i.current;if(!r)if(typeof PointerEvent<"u"){let c=d=>{l.isPointerDown&&Cu(d,t)&&a(d),l.isPointerDown=!1};return document.addEventListener("pointerdown",o,!0),document.addEventListener("pointerup",c,!0),()=>{document.removeEventListener("pointerdown",o,!0),document.removeEventListener("pointerup",c,!0)}}else{let c=f=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&Cu(f,t)&&a(f),l.isPointerDown=!1},d=f=>{l.ignoreEmulatedMouseEvents=!0,l.isPointerDown&&Cu(f,t)&&a(f),l.isPointerDown=!1};return document.addEventListener("mousedown",o,!0),document.addEventListener("mouseup",c,!0),document.addEventListener("touchstart",o,!0),document.addEventListener("touchend",d,!0),()=>{document.removeEventListener("mousedown",o,!0),document.removeEventListener("mouseup",c,!0),document.removeEventListener("touchstart",o,!0),document.removeEventListener("touchend",d,!0)}}},[t,r,o,a])}function Cu(e,t){if(e.button>0)return!1;if(e.target){const n=e.target.ownerDocument;if(!n||!n.documentElement.contains(e.target)||e.target.closest("[data-react-aria-top-layer]"))return!1}return t.current&&!t.current.contains(e.target)}function s9(e){if(r9()==="virtual"){let t=document.activeElement;i7(()=>{document.activeElement===t&&document.contains(e)&&Tb(e)})}else Tb(e)}function i9(e){if(!(e instanceof HTMLElement)&&!(e instanceof SVGElement))return!1;let{display:t,visibility:n}=e.style,r=t!=="none"&&n!=="hidden"&&n!=="collapse";if(r){const{getComputedStyle:s}=e.ownerDocument.defaultView;let{display:i,visibility:o}=s(e);r=i!=="none"&&o!=="hidden"&&o!=="collapse"}return r}function o9(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function vk(e,t){return e.nodeName!=="#comment"&&i9(e)&&o9(e,t)&&(!e.parentElement||vk(e.parentElement,e))}const eg=V.createContext(null);let ke=null;function xf(e){let{children:t,contain:n,restoreFocus:r,autoFocus:s}=e,i=v.useRef(),o=v.useRef(),a=v.useRef([]),{parentNode:l}=v.useContext(eg)||{},c=v.useMemo(()=>new ng({scopeRef:a}),[a]);fn(()=>{let h=l||He.root;if(He.getTreeNode(h.scopeRef)&&ke&&!cd(ke,h.scopeRef)){let p=He.getTreeNode(ke);p&&(h=p)}h.addChild(c),He.addNode(c)},[c,l]),fn(()=>{let h=He.getTreeNode(a);h.contain=n},[n]),fn(()=>{let h=i.current.nextSibling,p=[];for(;h&&h!==o.current;)p.push(h),h=h.nextSibling;a.current=p},[t]),f9(a,r,n),c9(a,n),p9(a,r,n),d9(a,s),v.useEffect(()=>{if(a){let h=document.activeElement,p=null;if(gt(h,a.current)){for(let g of He.traverse())gt(h,g.scopeRef.current)&&(p=g);p===He.getTreeNode(a)&&(ke=p.scopeRef)}return()=>{let g=He.getTreeNode(a).parent.scopeRef;(a===ke||cd(a,ke))&&(!g||He.getTreeNode(g))&&(ke=g),He.removeTreeNode(a)}}},[a]);let d=v.useMemo(()=>a9(a),[]),f=v.useMemo(()=>({focusManager:d,parentNode:c}),[c,d]);return V.createElement(eg.Provider,{value:f},V.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),t,V.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:o}))}function xk(){var e;return(e=v.useContext(eg))===null||e===void 0?void 0:e.focusManager}function a9(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:s,wrap:i,accept:o}=t,a=r||document.activeElement,l=n[0].previousElementSibling,c=ln(Ps(n),{tabbable:s,accept:o},n);c.currentNode=gt(a,n)?a:l;let d=c.nextNode();return!d&&i&&(c.currentNode=l,d=c.nextNode()),d&&Nt(d,!0),d},focusPrevious(t={}){let n=e.current,{from:r,tabbable:s,wrap:i,accept:o}=t,a=r||document.activeElement,l=n[n.length-1].nextElementSibling,c=ln(Ps(n),{tabbable:s,accept:o},n);c.currentNode=gt(a,n)?a:l;let d=c.previousNode();return!d&&i&&(c.currentNode=l,d=c.previousNode()),d&&Nt(d,!0),d},focusFirst(t={}){let n=e.current,{tabbable:r,accept:s}=t,i=ln(Ps(n),{tabbable:r,accept:s},n);i.currentNode=n[0].previousElementSibling;let o=i.nextNode();return o&&Nt(o,!0),o},focusLast(t={}){let n=e.current,{tabbable:r,accept:s}=t,i=ln(Ps(n),{tabbable:r,accept:s},n);i.currentNode=n[n.length-1].nextElementSibling;let o=i.previousNode();return o&&Nt(o,!0),o}}}const Hv=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],l9=Hv.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Hv.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const u9=Hv.join(':not([hidden]):not([tabindex="-1"]),');function Ps(e){return e[0].parentElement}function ua(e){let t=He.getTreeNode(ke);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function c9(e,t){let n=v.useRef(),r=v.useRef(null);fn(()=>{let s=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=null);return}let i=l=>{if(l.key!=="Tab"||l.altKey||l.ctrlKey||l.metaKey||!ua(e))return;let c=document.activeElement,d=e.current;if(!gt(c,d))return;let f=ln(Ps(d),{tabbable:!0},d);f.currentNode=c;let h=l.shiftKey?f.previousNode():f.nextNode();h||(f.currentNode=l.shiftKey?d[d.length-1].nextElementSibling:d[0].previousElementSibling,h=l.shiftKey?f.previousNode():f.nextNode()),l.preventDefault(),h&&Nt(h,!0)},o=l=>{(!ke||cd(ke,e))&&gt(l.target,e.current)?(ke=e,n.current=l.target):ua(e)&&!tg(l.target,e)?n.current?n.current.focus():ke&&dd(ke.current):ua(e)&&(n.current=l.target)},a=l=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{ua(e)&&!tg(document.activeElement,e)&&(ke=e,document.body.contains(l.target)?(n.current=l.target,n.current.focus()):ke&&dd(ke.current))})};return document.addEventListener("keydown",i,!1),document.addEventListener("focusin",o,!1),s.forEach(l=>l.addEventListener("focusin",o,!1)),s.forEach(l=>l.addEventListener("focusout",a,!1)),()=>{document.removeEventListener("keydown",i,!1),document.removeEventListener("focusin",o,!1),s.forEach(l=>l.removeEventListener("focusin",o,!1)),s.forEach(l=>l.removeEventListener("focusout",a,!1))}},[e,t]),fn(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function bk(e){return tg(e)}function gt(e,t){return t.some(n=>n.contains(e))}function tg(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of He.traverse(He.getTreeNode(t)))if(gt(e,n.current))return!0;return!1}function cd(e,t){var n;let r=(n=He.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Nt(e,t=!1){if(e!=null&&!t)try{s9(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function dd(e,t=!0){let n=e[0].previousElementSibling,r=ln(Ps(e),{tabbable:t},e);r.currentNode=n;let s=r.nextNode();t&&!s&&(r=ln(Ps(e),{tabbable:!1},e),r.currentNode=n,s=r.nextNode()),Nt(s)}function d9(e,t){const n=V.useRef(t);v.useEffect(()=>{n.current&&(ke=e,gt(document.activeElement,ke.current)||dd(e.current)),n.current=!1},[e])}function f9(e,t,n){fn(()=>{if(t||n)return;let r=e.current,s=i=>{let o=i.target;gt(o,e.current)?ke=e:bk(o)||(ke=null)};return document.addEventListener("focusin",s,!1),r.forEach(i=>i.addEventListener("focusin",s,!1)),()=>{document.removeEventListener("focusin",s,!1),r.forEach(i=>i.removeEventListener("focusin",s,!1))}},[e,t,n])}function h9(e){let t=He.getTreeNode(ke);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function p9(e,t,n){const r=v.useRef(typeof document<"u"?document.activeElement:null);fn(()=>{let s=e.current;if(!t||n)return;let i=()=>{(!ke||cd(ke,e))&&gt(document.activeElement,e.current)&&(ke=e)};return document.addEventListener("focusin",i,!1),s.forEach(o=>o.addEventListener("focusin",i,!1)),()=>{document.removeEventListener("focusin",i,!1),s.forEach(o=>o.removeEventListener("focusin",i,!1))}},[e,n]),fn(()=>{if(!t)return;let s=i=>{if(i.key!=="Tab"||i.altKey||i.ctrlKey||i.metaKey||!ua(e))return;let o=document.activeElement;if(!gt(o,e.current))return;let a=He.getTreeNode(e).nodeToRestore,l=ln(document.body,{tabbable:!0});l.currentNode=o;let c=i.shiftKey?l.previousNode():l.nextNode();if((!document.body.contains(a)||a===document.body)&&(a=null,He.getTreeNode(e).nodeToRestore=null),(!c||!gt(c,e.current))&&a){l.currentNode=a;do c=i.shiftKey?l.previousNode():l.nextNode();while(gt(c,e.current));i.preventDefault(),i.stopPropagation(),c?Nt(c,!0):bk(a)?Nt(a,!0):o.blur()}};return n||document.addEventListener("keydown",s,!0),()=>{n||document.removeEventListener("keydown",s,!0)}},[e,t,n]),fn(()=>{if(t)return He.getTreeNode(e).nodeToRestore=r.current,()=>{let s=He.getTreeNode(e).nodeToRestore;if(t&&s&&(gt(document.activeElement,e.current)||document.activeElement===document.body&&h9(e))){let i=He.clone();requestAnimationFrame(()=>{if(document.activeElement===document.body){let o=i.getTreeNode(e);for(;o;){if(o.nodeToRestore&&document.body.contains(o.nodeToRestore)){Nt(o.nodeToRestore);return}o=o.parent}for(o=i.getTreeNode(e);o;){if(o.scopeRef&&He.getTreeNode(o.scopeRef)){dd(o.scopeRef.current,!0);return}o=o.parent}}})}}},[e,t])}function ln(e,t,n){let r=t!=null&&t.tabbable?u9:l9,s=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode(i){var o;return!(t==null||(o=t.from)===null||o===void 0)&&o.contains(i)?NodeFilter.FILTER_REJECT:i.matches(r)&&vk(i)&&(!n||gt(i,n))&&(!(t!=null&&t.accept)||t.accept(i))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return t!=null&&t.from&&(s.currentNode=t.from),s}function wW(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return;let{from:s,tabbable:i=t.tabbable,wrap:o=t.wrap,accept:a=t.accept}=n,l=s||document.activeElement,c=ln(r,{tabbable:i,accept:a});r.contains(l)&&(c.currentNode=l);let d=c.nextNode();return!d&&o&&(c.currentNode=r,d=c.nextNode()),d&&Nt(d,!0),d},focusPrevious(n=t){let r=e.current;if(!r)return;let{from:s,tabbable:i=t.tabbable,wrap:o=t.wrap,accept:a=t.accept}=n,l=s||document.activeElement,c=ln(r,{tabbable:i,accept:a});if(r.contains(l))c.currentNode=l;else{let f=Qh(c);return f&&Nt(f,!0),f}let d=c.previousNode();return!d&&o&&(c.currentNode=r,d=Qh(c)),d&&Nt(d,!0),d},focusFirst(n=t){let r=e.current;if(!r)return;let{tabbable:s=t.tabbable,accept:i=t.accept}=n,a=ln(r,{tabbable:s,accept:i}).nextNode();return a&&Nt(a,!0),a},focusLast(n=t){let r=e.current;if(!r)return;let{tabbable:s=t.tabbable,accept:i=t.accept}=n,o=ln(r,{tabbable:s,accept:i}),a=Qh(o);return a&&Nt(a,!0),a}}}function Qh(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}class qv{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let s=this.fastMap.get(n??null),i=new ng({scopeRef:t});s.addChild(i),i.parent=s,this.fastMap.set(t,i),r&&(i.nodeToRestore=r)}addNode(t){this.fastMap.set(t.scopeRef,t)}removeTreeNode(t){if(t===null)return;let n=this.fastMap.get(t),r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef.current&&gt(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let s=n.children;r.removeChild(n),s.size>0&&s.forEach(i=>r.addChild(i)),this.fastMap.delete(n.scopeRef)}*traverse(t=this.root){if(t.scopeRef!=null&&(yield t),t.children.size>0)for(let n of t.children)yield*this.traverse(n)}clone(){let t=new qv;for(let n of this.traverse())t.addTreeNode(n.scopeRef,n.parent.scopeRef,n.nodeToRestore);return t}constructor(){this.fastMap=new Map,this.root=new ng({scopeRef:null}),this.fastMap.set(null,this.root)}}class ng{addChild(t){this.children.add(t),t.parent=this}removeChild(t){this.children.delete(t),t.parent=void 0}constructor(t){this.children=new Set,this.contain=!1,this.scopeRef=t.scopeRef}}let He=new qv;const Ca=v.forwardRef(({children:e,style:t,autoFocus:n=!1,restoreFocus:r=!0,isDismissable:s,isContextMenu:i,isOpen:o,onClose:a,triggerRef:l,arrowRef:c,arrowStyle:d,onPointerLeave:f,onPointerEnter:h},p)=>{const g=Vv(),b=Io(p),{domProps:w}=m9({isDismissable:s,isOpen:o,onClose:a,triggerRef:l,isContextMenu:i},b);return u.jsx(Sr.div,{className:"z-popover isolate",role:"presentation",ref:b,style:{...g,...t,position:"fixed"},...yk,...jr(w,{onPointerLeave:f,onPointerEnter:h}),children:u.jsx(xf,{restoreFocus:r,autoFocus:n,contain:!1,children:e})})}),ea=[];function m9({onClose:e,isDismissable:t=!0,triggerRef:n,isContextMenu:r=!1},s){const i=v.useRef({isPointerDown:!1,isContextMenu:r,onClose:e}),o=i.current;o.isContextMenu=r,o.onClose=e;const a=v.useCallback(g=>{const b=g.target;if(b){const w=b.ownerDocument;if(!w||!w.documentElement.contains(b))return!1}return s.current&&!s.current.contains(b)},[s]),l=v.useCallback(()=>ea[ea.length-1]===s,[s]),c=v.useCallback(()=>{l()&&o.onClose()},[l,o]),d=v.useCallback(g=>{var b,w;return n.current&&"contains"in n.current?(w=(b=n.current).contains)==null?void 0:w.call(b,g):!1},[n]),f=v.useCallback(g=>{d(g.target)||l()&&(g.stopPropagation(),g.preventDefault())},[d,l]),h=v.useCallback(g=>{d(g.target)||(l()&&(g.stopPropagation(),g.preventDefault()),(!o.isContextMenu||g.button!==2)&&c())},[d,c,o,l]);return v.useEffect(()=>{ea.push(s);const g=m=>{a(m)&&(f(m),i.current.isPointerDown=!0)},b=m=>{i.current.isPointerDown&&a(m)&&(i.current.isPointerDown=!1,h(m))},w=m=>{m.preventDefault(),a(m)&&c()},y=m=>{if(!n.current)return;const x=m.target;let _;n.current instanceof Node?_=n.current:"contextElement"in n.current&&(_=n.current.contextElement),(!(x instanceof Node)||!_||x.contains(_))&&o.onClose()};return document.addEventListener("pointerdown",g,!0),document.addEventListener("pointerup",b,!0),document.addEventListener("contextmenu",w,!0),document.addEventListener("scroll",y,!0),()=>{const m=ea.indexOf(s);m>=0&&ea.splice(m,1),document.removeEventListener("pointerdown",g,!0),document.removeEventListener("pointerup",b,!0),document.removeEventListener("contextmenu",w,!0),document.removeEventListener("scroll",y,!0)}},[s,a,o,h,f,n,d,c]),{domProps:{onKeyDown:g=>{g.key==="Escape"&&(g.stopPropagation(),g.preventDefault(),c())}}}}const bf={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}};function wk({position:e="absolute",className:t,isTransparent:n=!1,disableInitialTransition:r,...s}){return u.jsx(Sr.div,{...s,className:D(t,!n&&"bg-background/80","inset-0 z-10 h-full w-full",e,"backdrop-blur-sm"),"aria-hidden":!0,initial:r?void 0:{opacity:0},animate:{opacity:1},exit:{opacity:0},...bf,transition:{duration:.15}})}const _k=v.forwardRef(({children:e,autoFocus:t=!1,restoreFocus:n=!0,isDismissable:r,isOpen:s,onClose:i},o)=>{const a=Vv(),l=Io(o);return u.jsxs("div",{className:"isolate z-tray fixed inset-0",style:a,children:[u.jsx(wk,{onClick:()=>{r&&i()}},"tray-underlay"),u.jsx(Sr.div,{ref:l,className:"absolute bottom-0 left-0 right-0 w-full z-20 rounded-t overflow-hidden max-w-375 max-h-tray mx-auto pb-safe-area",role:"presentation",initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0,y:"100%"},transition:{type:"tween",duration:.2},children:u.jsx(xf,{restoreFocus:n,autoFocus:t,contain:!0,children:e})})]})}),g9=v.forwardRef(({children:e,autoFocus:t=!1,restoreFocus:n=!0,isDismissable:r=!0,isOpen:s=!1,onClose:i},o)=>{const a=Vv(),l=Io(o);return u.jsxs("div",{className:"fixed inset-0 isolate z-modal",style:a,children:[u.jsx(wk,{onClick:()=>{r&&i()}},"modal-underlay"),u.jsx(Sr.div,{ref:l,className:"pointer-events-none absolute inset-0 z-20 flex h-full w-full items-center justify-center",role:"presentation",initial:{opacity:0,scale:.7},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1},transition:{duration:.1},children:u.jsx(xf,{restoreFocus:n,autoFocus:t,contain:!0,children:e})})]})});function Sk({children:e,label:t,index:n}){const r=v.useId();return u.jsxs("div",{role:"group",className:D(n!==0&&"border-t my-4"),"aria-labelledby":t?`be-select-${r}`:void 0,children:[t&&u.jsx("div",{className:"block uppercase text-muted text-xs px-16 py-10",role:"presentation",id:`be-select-${r}`,"aria-hidden":"true",children:t}),e]})}const y9=Pl(({maxItems:e,children:t,items:n,inputValue:r})=>{let s=x9({children:t,items:n}),i=v9({collection:s,inputValue:r});return e&&(s=new Map([...s.entries()].slice(0,e)),i=new Map([...i.entries()].slice(0,e))),{collection:s,filteredCollection:i}}),v9=Pl(({collection:e,inputValue:t})=>{let n=new Map;const r=t?`${t}`.toLowerCase().trim():"";if(!r)n=e;else{let s=0;e.forEach((i,o)=>{(i.item?JSON.stringify(i.item):i.textLabel).toLowerCase().trim().includes(r)&&n.set(o,{...i,index:s++})})}return n}),x9=Pl(({children:e,items:t})=>{let n;t&&typeof e=="function"?n=t.map(o=>e(o)):n=e;const r=new Map;let s=0;const i=(o,a,l,c)=>{const d=s++,f=a?t==null?void 0:t[l].items[c]:t==null?void 0:t[d];r.set(o.props.value,{index:d,element:o,textLabel:b9(o),item:f,section:a,isDisabled:o.props.isDisabled,value:o.props.value})};return v.Children.forEach(n,(o,a)=>{v.isValidElement(o)&&(o.type===Sk?v.Children.forEach(o.props.children,(l,c)=>{i(l,o,a,c)}):i(o))}),r});function b9(e){var n;const t=e.props.children;return e.props.textLabel?e.props.textLabel:(n=t==null?void 0:t.props)!=null&&n.message?t.props.message:`${t}`||""}function Wv(e,t){const{children:n,items:r,role:s="listbox",virtualFocus:i,loopFocus:o=!1,onItemSelected:a,clearInputOnItemSelection:l,blurReferenceOnItemSelection:c,floatingWidth:d="matchTrigger",floatingMinWidth:f,floatingMaxHeight:h,offset:p,placement:g,showCheckmark:b,showEmptyMessage:w,maxItems:y,isAsync:m,allowCustomValue:x,clearSelectionOnInputClear:_}=e,S=e.selectionMode||"none",C=`${v.useId()}-listbox`,[k,P]=al(e.inputValue,e.defaultInputValue||"",e.onInputValueChange),[O,$]=v.useState("all"),F=y9({children:n,items:r,inputValue:m?void 0:k,maxItems:y}),M=O==="all"?F.collection:F.filteredCollection,z=v.useRef([]),q=v.useMemo(()=>[...M.values()].map(je=>je.isDisabled?null:je.textLabel),[M]),{selectedValues:B,selectValues:J}=_9(e),[I,G]=al(e.isOpen,e.defaultIsOpen,e.onOpenChange),[W,Q]=v.useState(null),se=Uv({floatingWidth:d,ref:t,placement:g,offset:p,maxHeight:h??420,shiftCrossAxis:!i}),{refs:he,strategy:Re,x:oe,y:ge}=se,we=S==="none"?void 0:M.get(B[0]),vn=S==="none"||we==null?void 0:we.index,Ie=je=>{if(S!=="none"){const Qe=[...M.values()][je];Qe&&J(Qe.value)}},vt=v.useCallback((je,Qe)=>{var A,X;const Tf=[...M.values()],T=!Tf.find(K=>!K.isDisabled),R=M.size-1;if(Qe==null||!M.size||Qe>R||Qe<0||T){Q(null);return}Qe=w9(Tf,Qe,o,je),Q(Qe),i?(A=z.current[Qe])==null||A.scrollIntoView({block:"nearest"}):(X=z.current[Qe])==null||X.focus()},[M,i,o]),Tt=v.useCallback(je=>{P(je.target.value),$(je.target.value.trim()?"filtered":"all"),je.target.value?G(!0):_&&J(""),vt("increment",0)},[P,G,$,J,m,_,vt]);return{handleItemSelection:je=>{const Qe=he.reference.current;S!=="none"?J(je):Qe&&"focus"in Qe&&Qe.focus(),i&&(P(l?"":`${je}`),c&&Qe&&"blur"in Qe&&Qe.blur()),$("all"),G(!1),a==null||a(je),Q(null)},onInputChange:Tt,loopFocus:o,floatingWidth:d,floatingMinWidth:f,floatingMaxHeight:h,showCheckmark:b,collection:M,collections:F,virtualFocus:i,focusItem:vt,showEmptyMessage:w&&!!k,allowCustomValue:x,refs:he,reference:se.reference,floating:he.setFloating,positionStyle:{position:Re,top:ge??"",left:oe??""},listContent:q,listItemsRef:z,listboxId:C,role:s,state:{activeIndex:W,setActiveIndex:Q,selectedIndex:vn,setSelectedIndex:Ie,selectionMode:S,selectedValues:B,selectValues:J,inputValue:k,setInputValue:P,isOpen:I,setIsOpen:G,setActiveCollection:$}}}function w9(e,t,n,r){var i;const s=e.length-1;for(;(i=e[t])!=null&&i.isDisabled;)if(r==="increment"){if(t++,t>=s)if(n)t=0;else return t-1}else if(t--,t<0)if(n)t=s;else return t+1;return t}function _9(e){const{selectionMode:t,allowEmptySelection:n}=e,r=t==="single"||t==="multiple",[s,i]=al(r?e.selectedValue:void 0,r?e.defaultSelectedValue:void 0,r?e.onSelectionChange:void 0),o=v.useMemo(()=>s==null?[]:Array.isArray(s)?s:[s],[s]),a=v.useCallback(l=>{const c=Array.isArray(l)?l:[l];t==="single"?i(c[0]):c.forEach(d=>{const f=o.indexOf(d);f===-1?(o.push(d),i([...o])):(o.length>1||n)&&(o.splice(f,1),i([...o]))})},[n,o,t,i]);return{selectedValues:o,selectValues:a}}const Ek=v.createContext(null);function Kv(){return v.useContext(Ek)}const S9=768;function E9(){return nk()||typeof window>"u"?!1:window.screen.width<=S9}function Qv({listbox:e,children:t,isLoading:n,mobileOverlay:r=_k,searchField:s,onClose:i,prepend:o,className:a,...l}){const c=E9(),{floatingWidth:d,floatingMinWidth:f="min-w-180",collection:h,showEmptyMessage:p,state:{isOpen:g,setIsOpen:b},positionStyle:w,floating:y,refs:m}=e,x=!o&&c?r:Ca,_=D("text-base sm:text-sm outline-none bg-paper max-h-inherit flex flex-col",!o&&"shadow-xl border py-4",a,x===Ca&&"rounded",x===Ca&&d==="auto"?`max-w-288 ${f}`:""),S=v.useMemo(()=>{let k=0;const P=[];return[...h.values()].reduce((O,$)=>{if(!$.section)O.push(v.cloneElement($.element,{key:$.element.key||$.element.props.value}));else if(!P.includes($.section)){const F=v.cloneElement($.section,{key:$.section.key||k,index:k});O.push(F),P.push($.section),k++}return O},[])},[h]),E=S.length>0||p,C=E?u.jsxs("div",{className:_,role:"presentation",children:[s,u.jsx(C9,{isLoading:n,...l,children:S})]}):null;return u.jsxs(Ek.Provider,{value:e,children:[t,o?C:os&&Eo.createPortal(u.jsx(To,{children:g&&E&&u.jsx(x,{triggerRef:m.reference,restoreFocus:!0,isOpen:g,onClose:()=>{i==null||i(),b(!1)},isDismissable:!0,style:w,ref:y,children:C})}),os)]})}function C9({className:e,children:t,isLoading:n,...r}){const{role:s,listboxId:i,virtualFocus:o,focusItem:a,state:{activeIndex:l,setActiveIndex:c,selectedIndex:d}}=Kv(),f=v.useRef(!0),h=v.useRef(null);return v.useEffect(()=>()=>c(null),[c]),v.useEffect(()=>{if(f.current){const p=l??d;p==null&&!o?requestAnimationFrame(()=>{var g;(g=h.current)==null||g.focus({preventScroll:!0})}):p!=null&&requestAnimationFrame(()=>{a("increment",p)})}f.current=!1},[l,d,a,o]),u.jsx("div",{tabIndex:o?void 0:-1,role:s,id:i,className:"flex-auto overflow-y-auto overscroll-contain",ref:h,...r,children:t.length?t:u.jsx(j9,{isLoading:n})})}function j9({isLoading:e}){return u.jsx("div",{className:"px-8 py-4 text-sm italic text-muted",children:e?u.jsx(j,{message:"Loading..."}):u.jsx(j,{message:"There are no items matching your query"})})}const Ck=re(u.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"}),"CheckOutlined"),jk=V.forwardRef((e,t)=>{let{startIcon:n,capitalizeFirst:r,children:s,description:i,endIcon:o,endSection:a,isDisabled:l,isActive:c,isSelected:d,showCheckmark:f,elementType:h="div",radius:p,padding:g,...b}=e;!n&&f&&(n=u.jsx(Ck,{size:"sm",className:D("text-primary",!d&&"invisible")}));const w=D("icon-sm rounded overflow-hidden flex-shrink-0",!l&&"text-muted"),y=D(!l&&"text-muted"),m=h;return u.jsxs(m,{...b,"aria-disabled":l,className:k9(e),ref:t,children:[n&&u.jsx("div",{className:w,children:n}),u.jsxs("div",{className:D("mr-auto w-full",r&&"first-letter:capitalize"),children:[s,i&&u.jsx("div",{className:D("mt-4 whitespace-normal text-xs",l?"text-disabled":"text-muted"),children:i})]}),(o||a)&&u.jsx("div",{className:o?w:y,children:o||a})]})});function k9({className:e,isSelected:t,isActive:n,isDisabled:r,showCheckmark:s,endIcon:i,endSection:o,radius:a,padding:l}){let c="";r?c="text-disabled pointer-events-none":t?n?c="bg-primary/focus":c="bg-primary/selected hover:bg-primary/focus":n?c="hover:bg-fg-base/15 bg-focus":c="hover:bg-hover";let d;return l?d=l:s?i||o?d="pl-8 pr-8":d="pl-8 pr-24":d="px-20",D("w-full select-none outline-none cursor-pointer","py-8 text-sm truncate flex items-center gap-10",!r&&"text-main",d,c,e,a)}function Pt({children:e,value:t,startIcon:n,endIcon:r,endSection:s,description:i,capitalizeFirst:o,textLabel:a,isDisabled:l,onSelected:c,onClick:d,...f}){var O;const{collection:h,showCheckmark:p,virtualFocus:g,listboxId:b,role:w,listItemsRef:y,handleItemSelection:m,state:{selectedValues:x,activeIndex:_,setActiveIndex:S}}=Kv(),E=x.includes(t),C=(O=h.get(t))==null?void 0:O.index,k=_===C;if(C==null)return null;const P=k&&!l?-1:0;return u.jsx(jk,{...f,onFocus:()=>{g||S(C)},onPointerEnter:$=>{S(C),g||$.currentTarget.focus()},onPointerDown:$=>{g&&$.preventDefault()},onKeyDown:$=>{($.key==="Enter"||$.key===" ")&&($.preventDefault(),m(t),c==null||c())},onClick:$=>{m(t),c==null||c(),d==null||d($)},ref:$=>y.current[C]=$,id:`${b}-${C}`,role:w==="menu"?"menuitem":"option",tabIndex:g?void 0:P,"aria-selected":k&&E,showCheckmark:p,isDisabled:l,isActive:k,isSelected:E,startIcon:n,description:i,endIcon:r,endSection:s,capitalizeFirst:o,"data-value":t,children:e})}function Gv({state:{isOpen:e,setIsOpen:t,selectedIndex:n,activeIndex:r,setInputValue:s},loopFocus:i,collection:o,focusItem:a,handleItemSelection:l,allowCustomValue:c}){const d=p=>{if(!(e||!p.currentTarget.contains(p.target))){if(p.key==="ArrowDown")return p.preventDefault(),t(!0),a("increment",n??0),!0;if(p.key==="ArrowUp")return p.preventDefault(),t(!0),a("decrement",n??o.size-1),!0;if(p.key==="Enter"||p.key==="Space")return p.preventDefault(),t(!0),a("increment",n??0),!0}},f=p=>{const g=Math.max(0,o.size-1);if(!(!e||!p.currentTarget.contains(p.target)))switch(p.key){case"ArrowDown":return p.preventDefault(),r==null?a("increment",0):r>=g?i&&a("increment",0):a("increment",r+1),!0;case"ArrowUp":return p.preventDefault(),r==null?a("decrement",g):r<=0?i&&a("decrement",g):a("decrement",r-1),!0;case"Home":return p.preventDefault(),a("increment",0),!0;case"End":return p.preventDefault(),a("decrement",g),!0;case"Tab":return t(!1),!0}};return{handleTriggerKeyDown:d,handleListboxKeyboardNavigation:f,handleListboxSearchFieldKeydown:p=>{var b,w;if(p.key==="Enter"&&r!=null&&o.size){p.preventDefault();const[y,m]=[...o.entries()][r];y&&(l(y),(w=(b=m.element.props).onSelected)==null||w.call(b));return}p.key==="Escape"&&e&&(t(!1),c||s("")),d(p)||f(p)}}}const Gh=new Map;function T9(e){const{localeCode:t}=Zs(),n=t+(e?Object.entries(e).sort((s,i)=>s[0]<i[0]?-1:1).join():"");if(Gh.has(n))return Gh.get(n);const r=new Intl.Collator(t,e);return Gh.set(n,r),r}function kk(){const e=T9({usage:"search",sensitivity:"base"}),t=v.useRef({search:"",timeout:void 0}).current,n=(s,i)=>{let o=i??0;for(;o!=null;){const a=s[o],l=a==null?void 0:a.slice(0,t.search.length);if(l&&e.compare(l,t.search)===0)return o;if(o<s.length-1)o++;else return null}return null};return{findMatchingItem:(s,i,o=0)=>{const a=P9(s.key);if(!a||s.ctrlKey||s.metaKey)return null;a===" "&&t.search.trim().length>0&&(s.preventDefault(),s.stopPropagation()),t.search+=a;let l=n(i,o);return l==null&&(l=n(i,0)),clearTimeout(t.timeout),t.timeout=setTimeout(()=>{t.search=""},500),l??null}}}function P9(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}const wf=v.forwardRef((e,t)=>{const{children:[n,r],floatingWidth:s="auto"}=e,i=v.useId(),o=zv(),a=Wv({...e,floatingWidth:o?"auto":s,role:"menu",loopFocus:!0,children:r.props.children},t),{state:{isOpen:l,setIsOpen:c,activeIndex:d},listboxId:f,focusItem:h,listContent:p,reference:g}=a,{handleTriggerKeyDown:b,handleListboxKeyboardNavigation:w}=Gv(a),{findMatchingItem:y}=kk();return u.jsx(Qv,{listbox:a,"aria-labelledby":i,onKeyDownCapture:m=>{if(!l)return;const x=y(m,p,d);x&&h("increment",x)},onKeyDown:w,children:v.cloneElement(n,{id:i,"aria-expanded":l?"true":"false","aria-haspopup":"menu","aria-controls":l?f:void 0,ref:g,onKeyDown:b,onClick:nn(m=>{var x,_;(_=(x=n.props)==null?void 0:x.onClick)==null||_.call(x,m),c(!l)})})})});function _f({children:e}){return e}function R9({x:e,y:t},n){return{getBoundingClientRect(){return{x:e,y:t,width:0,height:0,top:t,right:e,bottom:t,left:e}},contextElement:n}}function Uo(e){let{children:t,type:n,disableInitialTransition:r,onClose:s,isDismissable:i=!0,moveFocusToDialog:o=!0,returnFocusToTrigger:a=!0,triggerOnHover:l=!1,currentValue:c,triggerOnContextMenu:d=!1,usePortal:f=!0}=e;const h=v.useRef(null),p=d&&!e.triggerRef?h:e.triggerRef,g=v.useRef(c),[b,w]=al(e.isOpen,e.defaultIsOpen,e.onOpenChange),{dialogTrigger:y,dialog:m}=N9(t);zv()&&n==="popover"&&(n="modal");const _=v.useRef(null),{x:S,y:E,reference:C,strategy:k,refs:P}=Uv({...e,disablePositioning:n==="modal"}),O=n==="popover"?{position:k,top:E??"",left:S??""}:{},$=v.useId(),F=`${$}-label`,M=`${$}-description`,z=`${$}-form`,q=v.useCallback(oe=>{s==null||s(oe??g.current),w(!1)},[s,w]),B=v.useCallback(()=>{w(!0),g.current=c},[c,w]);fn(()=>{p!=null&&p.current&&P.reference.current!==p.current&&C(p.current)},[C,p==null?void 0:p.current,P]);const J=v.useMemo(()=>({"aria-labelledby":F,"aria-describedby":M}),[F,M]);let I;n==="modal"?I=g9:n==="tray"?I=_k:I=Ca;const G=v.useMemo(()=>({dialogProps:J,type:n,labelId:F,descriptionId:M,isDismissable:i,close:q,formId:z}),[q,M,J,z,F,n,i]);l=l&&n==="popover";const W={onPointerEnter:nn(oe=>{B()}),onPointerLeave:nn(oe=>{_.current=setTimeout(()=>{q()},150)})},Q={onPointerEnter:nn(oe=>{_.current&&clearTimeout(_.current)}),onPointerLeave:nn(oe=>{q()})},se={onContextMenu:nn(oe=>{oe.preventDefault(),h.current=R9({x:oe.clientX,y:oe.clientY},oe.currentTarget),B()})},he={onClick:nn(oe=>{oe.stopPropagation(),b?q():B()})},Re=u.jsx(To,{initial:!r,children:b&&u.jsx(tf.Provider,{value:G,children:u.jsx(I,{...l?Q:{},ref:P.setFloating,triggerRef:P.reference,style:O,restoreFocus:a,autoFocus:o,isOpen:b,onClose:q,isDismissable:i,isContextMenu:d,children:m})})});return u.jsxs(v.Fragment,{children:[y&&v.cloneElement(y,jr({...!p&&!d?{ref:C}:{},...d?{}:he,...l?W:{},...d?se:{}},{...y.props})),f?os&&Eo.createPortal(Re,os):Re]})}function N9(e){const t=V.Children.toArray(e);return t&&t.length===2?{dialogTrigger:t[0],dialog:t[1]}:{dialog:t[0]}}const O9=ie("Continue with google"),A9=ie("Continue with facebook"),$9=ie("Continue with twitter");function Tk({dividerMessage:e}){var d,f,h,p,g,b;const{social:t,registration:n}=ce(),r=gn(),{getRedirectUri:s}=tt(),{loginWithSocial:i,requestingPassword:o,setIsRequestingPassword:a}=ik(),l=!((d=t==null?void 0:t.google)!=null&&d.enable)&&!((f=t==null?void 0:t.facebook)!=null&&f.enable)&&!((h=t==null?void 0:t.twitter)!=null&&h.enable);if(n.disable||l)return null;const c=async w=>{const y=await i(w);((y==null?void 0:y.status)==="SUCCESS"||(y==null?void 0:y.status)==="ALREADY_LOGGED_IN")&&r(s(),{replace:!0})};return u.jsxs(v.Fragment,{children:[u.jsx("div",{className:"relative text-center my-20 before:absolute before:left-0 before:top-1/2 before:-translate-y-1/2 before:h-1 before:w-full before:bg-divider",children:u.jsx("span",{className:"bg-paper relative z-10 px-10 text-sm text-muted",children:e})}),u.jsxs("div",{className:D("flex items-center justify-center gap-14",!t.compact_buttons&&"flex-col"),children:[(p=t==null?void 0:t.google)!=null&&p.enable?u.jsx(Yh,{label:O9,icon:u.jsx(ok,{viewBox:"0 0 48 48"}),onClick:()=>c("google")}):null,(g=t==null?void 0:t.facebook)!=null&&g.enable?u.jsx(Yh,{label:A9,icon:u.jsx(ak,{className:"text-facebook"}),onClick:()=>c("facebook")}):null,(b=t==null?void 0:t.twitter)!=null&&b.enable?u.jsx(Yh,{label:$9,icon:u.jsx(lk,{className:"text-twitter"}),onClick:()=>c("twitter")}):null]}),u.jsx(Uo,{type:"modal",isOpen:o,onOpenChange:a,children:u.jsx(I9,{})})]})}function I9(){const e=Yt(),{formId:t}=Nl(),n=_7(e);return u.jsxs(Ul,{children:[u.jsx(zl,{children:u.jsx(j,{message:"Password required"})}),u.jsxs(Vl,{children:[u.jsx("div",{className:"text-sm text-muted mb-30",children:u.jsx(j,{message:"An account with this email address already exists. If you want to connect the two accounts, enter existing account password."})}),u.jsx(Xt,{form:e,id:t,onSubmit:r=>{n.mutate(r)},children:u.jsx(Ae,{autoFocus:!0,name:"password",type:"password",required:!0,label:u.jsx(j,{message:"Password"})})})]}),u.jsxs(gf,{children:[u.jsx(te,{variant:"text",children:u.jsx(j,{message:"Cancel"})}),u.jsx(te,{type:"submit",form:t,variant:"flat",color:"primary",disabled:n.isLoading,children:u.jsx(j,{message:"Connect"})})]})]})}function Yh({onClick:e,label:t,icon:n}){const{trans:r}=Xn(),{social:{compact_buttons:s}}=ce();return s?u.jsx(Cr,{variant:"outline",radius:"rounded","aria-label":r(t),onClick:e,children:n}):u.jsx(te,{variant:"outline",startIcon:n,onClick:e,className:"w-full min-h-42",children:u.jsx("span",{className:"min-w-160 text-start",children:u.jsx(j,{...t})})})}function D9(){const{branding:e}=ce();return u.jsxs("div",{className:"pt-42 pb-32 flex items-center gap-30 text-sm text-muted mt-auto",children:[u.jsxs(Ze,{className:"hover:text-fg-base transition-colors",to:"/",children:["© ",e.site_name]}),u.jsx(Xc,{menu:"auth-page-footer",orientation:"horizontal",itemClassName:"hover:text-fg-base transition-colors"})]})}const M9=""+new URL("auth-bg-8529ec0e.svg",import.meta.url).href;function Hl({heading:e,children:t,message:n}){const{branding:r}=ce(),s=df(),{trans:i}=Xn();return u.jsxs("main",{className:"h-screen flex flex-col items-center bg-alt dark:bg-none pt-70 px-14 md:px-10vw overflow-y-auto",style:{backgroundImage:s?void 0:`url("${M9}")`},children:[u.jsx(Ze,{to:"/",className:"block flex-shrink-0 mb-40","aria-label":i({message:"Go to homepage"}),children:u.jsx("img",{src:s?r.logo_light:r==null?void 0:r.logo_dark,className:"block h-42 w-auto m-auto",alt:""})}),u.jsxs("div",{className:"rounded-lg max-w-440 px-40 pt-40 pb-32 w-full mx-auto bg-paper shadow md:shadow-xl",children:[e&&u.jsx("h1",{className:"mb-20 text-xl",children:e}),t]}),n&&u.jsx("div",{className:"mt-36 text-sm",children:n}),u.jsx(D9,{})]})}const L9=re(u.jsx("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlankOutlined"),F9=re(u.jsx("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),Yb=re(u.jsx("path",{d:"M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3z M17,13H7v-2h10V13z"}),"CheckBox"),Yv=v.forwardRef((e,t)=>{const{size:n="md",children:r,className:s,icon:i,checkedIcon:o,disabled:a,isIndeterminate:l,errorMessage:c,invalid:d,orientation:f="horizontal",onChange:h,autoFocus:p,required:g,value:b,name:w,inputTestId:y}=e,m=Do({...e,label:r}),x=i||L9,_=o||(l?Yb:F9),S=Io(t);pf({autoFocus:p},S),v.useEffect(()=>{S.current&&(S.current.indeterminate=l||!1)});const[E,C]=al(e.checked,e.defaultChecked||!1),k=v.useCallback(F=>{h==null||h(F),C(F.target.checked)},[h,C]),P=D("select-none",s,d&&"text-danger",!d&&a&&"text-disabled");let O,$=d?"text-danger":null;return l?(O=Yb,$=$||"text-primary"):E?(O=_,$=$||"text-primary"):(O=x,$=$||"text-muted"),u.jsxs("div",{children:[u.jsx("label",{className:P,children:u.jsxs("div",{className:D("relative flex items-center",f==="vertical"&&"flex-col flex-col-reverse"),children:[u.jsx("input",{className:"focus-visible:ring ring-inset transition-shadow outline-none absolute left-0 top-0 w-24 h-24 rounded appearance-none",type:"checkbox","aria-checked":l?"mixed":E,"aria-invalid":d||void 0,onChange:k,ref:S,required:g,disabled:a,value:b,name:w,"data-testid":y}),u.jsx(O,{size:n,className:D("pointer-events-none",a?"text-disabled":$)}),r&&u.jsx("div",{className:D("first-letter:capitalize",m.size.font,f==="vertical"?"mb-6":"ml-6"),children:r})]})}),c&&u.jsx("div",{className:m.error,children:c})]})});function Pk(e){const{field:{onChange:t,onBlur:n,value:r=!1,ref:s},fieldState:{invalid:i,error:o}}=$o({name:e.name}),a={onChange:t,onBlur:n,checked:r,invalid:i,errorMessage:o==null?void 0:o.message,name:e.name};return u.jsx(Yv,{ref:s,...jr(a,e)})}class U9{constructor(){ye(this,"loadedAssets",{})}loadAsset(t,n={type:"js"}){return this.loadedAssets[t]==="loaded"&&!n.force?new Promise(r=>r()):!this.loadedAssets[t]||n.force&&this.loadedAssets[t]==="loaded"?(this.loadedAssets[t]=new Promise(r=>{const s=Cl(t)?t:`assets/${t}`,i=Xh(t,n.id);n.type==="css"?this.loadStyleAsset(s,i,r):this.loadScriptAsset(s,i,r,n.parentEl)}),this.loadedAssets[t]):this.loadedAssets[t]}isLoadingOrLoaded(t){return this.loadedAssets[t]!=null}loadStyleAsset(t,n,r){const s=document.createElement("link");s.rel="stylesheet",s.id=Xh(t,n),s.href=t,s.onload=()=>{this.loadedAssets[t]="loaded",r()},document.head.appendChild(s)}loadScriptAsset(t,n,r,s){const i=document.createElement("script");i.async=!0,i.id=Xh(t,n),i.src=t,i.onload=()=>{this.loadedAssets[t]="loaded",r()},(s||document.body).appendChild(i)}}function Xh(e,t){return t||e.split("/").pop()}const z9=new U9;function Rk(e){const{recaptcha:{site_key:t,enable:n}={}}=ce(),r=t&&(n==null?void 0:n[e]),[s,i]=v.useState(!1);return v.useEffect(()=>{r&&Nk(t)},[r,t]),{verify:v.useCallback(async()=>{if(!r)return!0;i(!0);const a=await V9(t,e);return a||de.danger(ie("Could not verify you are human.")),i(!1),a},[r,t,e]),isVerifying:s}}async function V9(e,t){return await Nk(e),new Promise(n=>{var r;(r=window.grecaptcha)==null||r.ready(async()=>{var o;const s=await((o=window.grecaptcha)==null?void 0:o.execute(e,{action:t})),i=Z.post("recaptcha/verify",{token:s}).then(a=>a.data.success).catch(()=>!1);n(i??!1)})})}function Nk(e){return z9.loadAsset(`https://www.google.com/recaptcha/api.js?render=${e}`)}const B9=window.requestAnimationFrame,H9=window.cancelAnimationFrame,Ok="data-be-helmet";let ju;const Xv=v.memo(({children:e,tags:t})=>{const{trans:n}=Xn();return!t&&e&&(t=q9(e,n)),K9(t),null},zs);function q9(e,t){return v.Children.map(e,n=>{switch(n.type){case"title":return{nodeName:"title",_text:Ak(n.props.children,t)};case"meta":return{...n.props,nodeName:"meta"}}})}function Ak(e,t){return e==null?"":typeof e=="string"?e:Array.isArray(e)?e.map(n=>Ak(n,t)).join(""):"message"in e?t(e):t(e.props)}function W9(){document.head.querySelectorAll('meta:not([data-keep]), title, link[rel="canonical"]').forEach(e=>{document.head.removeChild(e)})}function K9(e){ju&&H9(ju),ju=B9(()=>{if(W9(),typeof e=="string"){const t=document.createElement("template");t.innerHTML=e,t.content.childNodes.forEach(n=>{n instanceof HTMLElement&&(n.setAttribute(Ok,"true"),document.head.prepend(n))})}else e==null||e.forEach(t=>{Q9(t)});ju=null})}function Q9(e){if(e.nodeName==="title"){typeof e._text<"u"&&document.title!==e._text&&(document.title=e._text);return}const t=document.createElement(e.nodeName);for(const n in e){const r=n;if(r!=="nodeName")if(r==="_text")t.textContent=typeof e._text=="string"?e._text:JSON.stringify(e._text);else{const s=e[r]==null?"":e[r];t.setAttribute(r,s)}}t.setAttribute(Ok,"true"),document.head.prepend(t)}function kr({children:e}){const{branding:{site_name:t}}=ce();return u.jsx(Xv,{children:e?u.jsxs("title",{children:[e," - ",t]}):void 0})}function rg(){const{branding:e,registration:{disable:t},social:n}=ce(),{verify:r,isVerifying:s}=Rk("register"),{pathname:i}=An(),[o]=av(),a=i.includes("workspace"),l=o.get("redirectFrom")==="pricing",c=o.get("email")||void 0,d=Yt({defaultValues:{email:c}}),f=b7(d);if(t)return u.jsx(ef,{to:"/login",replace:!0});let h=u.jsx(j,{message:"Create a new account"});a?h=u.jsx(j,{values:{siteName:e==null?void 0:e.site_name},message:"To join your team on :siteName, create an account"}):l&&(h=u.jsx(j,{message:"First, let's create your account"}));const p=u.jsx(j,{values:{a:g=>u.jsx(Ze,{className:ls,to:"/login",children:g})},message:"Already have an account? <a>Sign in.</a>"});return u.jsxs(Hl,{heading:h,message:p,children:[u.jsx(kr,{children:u.jsx(j,{message:"Register"})}),u.jsxs(Xt,{form:d,onSubmit:async g=>{await r()&&f.mutate(g)},children:[u.jsx(Ae,{className:"mb-32",name:"email",type:"email",disabled:!!c,label:u.jsx(j,{message:"Email"}),required:!0}),u.jsx(Ae,{className:"mb-32",name:"password",type:"password",label:u.jsx(j,{message:"Password"}),required:!0}),u.jsx(Ae,{className:"mb-32",name:"password_confirmation",type:"password",label:u.jsx(j,{message:"Confirm password"}),required:!0}),u.jsx(G9,{}),u.jsx(te,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:f.isLoading||s,children:u.jsx(j,{message:"Create account"})}),u.jsx(Tk,{dividerMessage:n.compact_buttons?u.jsx(j,{message:"Or sign up with"}):u.jsx(j,{message:"OR"})})]})]})}function G9(){const{registration:{policies:e}}=ce();return e?u.jsx("div",{className:"mb-32",children:e.map(t=>u.jsx(Pk,{name:t.id,className:"block mb-4",required:!0,children:u.jsx(j,{message:"I accept the :name",values:{name:u.jsx(Tv,{unstyled:!0,className:()=>ls,item:t})}})},t.id))}):null}const $k=e=>`custom-pages/${e}`;function Y9(e){const t=iv();return e||(e=t.pageId),On([$k(e)],()=>X9(e),{initialData:()=>{var r;const n=(r=Pn().loaders)==null?void 0:r.customPage;if(n!=null&&n.page&&(n.page.id==e||n.page.slug==e))return n}})}function X9(e){return Z.get($k(e)).then(t=>t.data)}const Ik=re(u.jsx("path",{d:"M12 22c1.1 0 2-.9 2-2h-4c0 1.1.9 2 2 2zm6-6v-5c0-3.07-1.63-5.64-4.5-6.32V4c0-.83-.67-1.5-1.5-1.5s-1.5.67-1.5 1.5v.68C7.64 5.36 6 7.92 6 11v5l-2 2v1h16v-1l-2-2zm-2 1H8v-6c0-2.48 1.51-4.5 4-4.5s4 2.02 4 4.5v6z"}),"NotificationsOutlined");function Dk({children:e,className:t,withBorder:n=!0}){return u.jsx("span",{className:D("absolute right-4 top-2 flex items-center justify-center whitespace-nowrap rounded-full bg-warning text-xs font-bold text-white shadow",n&&"border-2 border-white",e?"h-18 w-18":"h-12 w-12",t),children:e})}const Mk=re(u.jsx("path",{d:"m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"}),"DoneAllOutlined");function Jv({image:e,title:t,description:n,action:r,className:s,size:i="md",imageHeight:o,imageMargin:a="mb-24"}){const l=J9(i,o);return u.jsxs("div",{className:D("text-center",s),children:[e&&u.jsx("div",{className:D(l.image,a),children:e}),t&&u.jsx("div",{className:D(l.title,"mb-2 text-main"),children:t}),n&&u.jsx("div",{className:D(l.description,"text-muted"),children:n}),r&&u.jsx("div",{className:"mt-20",children:r})]})}function J9(e,t){switch(e){case"xs":return{image:t||"h-60",title:"text-sm",description:"text-xs"};case"sm":return{image:t||"h-80",title:"text-base",description:"text-sm"};default:return{image:t||"h-128",title:"text-lg",description:"text-base"}}}const Z9=""+new URL("notify-d1de4ec3.svg",import.meta.url).href;function Lk(){const{notif:e}=ce();return u.jsx(Jv,{size:"sm",image:u.jsx(qd,{src:Z9}),title:u.jsx(j,{message:"Hang tight!"}),description:u.jsx(j,{message:"Notifications will start showing up here soon."}),action:e.subs.integrated&&u.jsx(te,{elementType:Ze,variant:"outline",to:"/notifications/settings",size:"xs",color:"primary",children:u.jsx(j,{message:"Notification settings"})})})}function eU({className:e}){const{user:t}=tt(),n=Rn(),r=Zy(),s=!!(t!=null&&t.unread_notifications_count),i=()=>{n.data&&r.mutate({ids:n.data.pagination.data.map(o=>o.id)})};return u.jsxs(Uo,{type:"popover",children:[u.jsx(Cr,{size:"md",className:e,badge:s?u.jsx(Dk,{className:"max-md:hidden",children:t==null?void 0:t.unread_notifications_count}):void 0,children:u.jsx(Ik,{})}),u.jsxs(Ul,{children:[u.jsx(zl,{showDivider:!0,rightAdornment:s&&u.jsx(te,{variant:"text",color:"primary",size:"xs",startIcon:u.jsx(Mk,{}),onClick:i,disabled:r.isLoading,className:"max-md:hidden",children:u.jsx(j,{message:"Mark all as read"})}),children:u.jsx(j,{message:"Notifications"})}),u.jsx(Vl,{padding:"p-0",children:u.jsx(tU,{})})]})]})}function tU(){const{data:e,isLoading:t}=Rn();return t?u.jsx("div",{className:"flex items-center justify-center px-24 py-20",children:u.jsx(hs,{"aria-label":"Loading notifications...",isIndeterminate:!0})}):e!=null&&e.pagination.data.length?u.jsx("div",{children:u.jsx(BC,{notifications:e.pagination.data})}):u.jsx("div",{className:"px-24 py-20",children:u.jsx(Lk,{})})}const nU=re(u.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"MenuOutlined"),Zv=re(u.jsx("path",{d:"M12 6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2m0 10c2.7 0 5.8 1.29 6 2H6c.23-.72 3.31-2 6-2m0-12C9.79 4 8 5.79 8 8s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 10c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z"}),"PersonOutlined"),rU=re(u.jsx("path",{d:"m7 10 5 5 5-5H7z"}),"ArrowDropDownOutlined"),Fk="Can't logout while in appearance editor.";function Uk(){const e=gn(),{isAppearanceEditorActive:t}=Sv(),{setBootstrapData:n}=Lt();return me(()=>t?iU():sU(),{onSuccess:r=>{n(r.bootstrapData),ze.clear(),e("/login"),ze.clear(),n(r.bootstrapData)},onError:r=>dt(r,t?ie(Fk):void 0)})}function sU(){return Z.post("auth/logout").then(e=>e.data)}function iU(){return Promise.reject(Fk)}const oU=re(u.jsx("path",{d:"M19 14V6c0-1.1-.9-2-2-2H3c-1.1 0-2 .9-2 2v8c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zm-2 0H3V6h14v8zm-7-7c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3zm13 0v11c0 1.1-.9 2-2 2H4v-2h17V7h2z"}),"PaymentsOutlined"),aU=re(u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zM7.07 18.28c.43-.9 3.05-1.78 4.93-1.78s4.51.88 4.93 1.78C15.57 19.36 13.86 20 12 20s-3.57-.64-4.93-1.72zm11.29-1.45c-1.43-1.74-4.9-2.33-6.36-2.33s-4.93.59-6.36 2.33C4.62 15.49 4 13.82 4 12c0-4.41 3.59-8 8-8s8 3.59 8 8c0 1.82-.62 3.49-1.64 4.83zM12 6c-1.94 0-3.5 1.56-3.5 3.5S10.06 13 12 13s3.5-1.56 3.5-3.5S13.94 6 12 6zm0 5c-.83 0-1.5-.67-1.5-1.5S11.17 8 12 8s1.5.67 1.5 1.5S12.83 11 12 11z"}),"AccountCircleOutlined"),zk=re(u.jsx("path",{d:"M9.37 5.51c-.18.64-.27 1.31-.27 1.99 0 4.08 3.32 7.4 7.4 7.4.68 0 1.35-.09 1.99-.27C17.45 17.19 14.93 19 12 19c-3.86 0-7-3.14-7-7 0-2.93 1.81-5.45 4.37-6.49zM12 3c-4.97 0-9 4.03-9 9s4.03 9 9 9 9-4.03 9-9c0-.46-.04-.92-.1-1.36-.98 1.37-2.58 2.26-4.4 2.26-2.98 0-5.4-2.42-5.4-5.4 0-1.81.89-3.42 2.26-4.4-.44-.06-.9-.1-1.36-.1z"}),"DarkModeOutlined"),lU=re(u.jsx("path",{d:"M12 9c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5zM2 13h2c.55 0 1-.45 1-1s-.45-1-1-1H2c-.55 0-1 .45-1 1s.45 1 1 1zm18 0h2c.55 0 1-.45 1-1s-.45-1-1-1h-2c-.55 0-1 .45-1 1s.45 1 1 1zM11 2v2c0 .55.45 1 1 1s1-.45 1-1V2c0-.55-.45-1-1-1s-1 .45-1 1zm0 18v2c0 .55.45 1 1 1s1-.45 1-1v-2c0-.55-.45-1-1-1s-1 .45-1 1zM5.99 4.58c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0s.39-1.03 0-1.41L5.99 4.58zm12.37 12.37c-.39-.39-1.03-.39-1.41 0-.39.39-.39 1.03 0 1.41l1.06 1.06c.39.39 1.03.39 1.41 0 .39-.39.39-1.03 0-1.41l-1.06-1.06zm1.06-10.96c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06zM7.05 18.36c.39-.39.39-1.03 0-1.41-.39-.39-1.03-.39-1.41 0l-1.06 1.06c-.39.39-.39 1.03 0 1.41s1.03.39 1.41 0l1.06-1.06z"}),"LightModeOutlined"),uU=re(u.jsx("path",{d:"M10.09 15.59 11.5 17l5-5-5-5-1.41 1.41L12.67 11H3v2h9.67l-2.58 2.59zM19 3H5c-1.11 0-2 .9-2 2v4h2V5h14v14H5v-4H3v4c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"ExitToAppOutlined");function cU({children:e,items:t}){const{auth:n}=v.useContext(jl),r=Uk(),s=kv("auth-dropdown"),{notifications:i,themes:o}=ce(),{user:a,isSubscribed:l}=tt(),c=gn(),{selectedTheme:d,selectTheme:f}=nf();if(!d||!a)return null;const h=!!a.unread_notifications_count,p=u.jsxs(Pt,{className:"md:hidden",value:"notifications",startIcon:u.jsx(Ik,{}),onSelected:()=>{c("/notifications")},children:[u.jsx(j,{message:"Notifications"}),h?` (${a.unread_notifications_count})`:void 0]}),g=u.jsx(Pt,{value:"billing",startIcon:u.jsx(oU,{}),onSelected:()=>{c("/billing")},children:u.jsx(j,{message:"Billing"})});return u.jsxs(wf,{children:[e,u.jsxs(_f,{children:[s&&s.items.map(b=>{const w=b.icon&&Hd(b.icon);return u.jsx(Pt,{value:b.id,startIcon:w&&u.jsx(w,{}),onSelected:()=>{b.type==="link"?window.open(b.action,"_blank"):c(b.action)},children:u.jsx(j,{message:b.label})},b.id)}),n.getUserProfileLink&&u.jsx(Pt,{value:"profile",startIcon:u.jsx(aU,{}),onSelected:()=>{c(n.getUserProfileLink(a))},children:u.jsx(j,{message:"Profile page"})}),t==null?void 0:t.map(b=>b),i!=null&&i.integrated?p:void 0,l&&g,(o==null?void 0:o.user_change)&&!d.is_dark&&u.jsx(Pt,{value:"light",startIcon:u.jsx(zk,{}),onSelected:()=>{f("dark")},children:u.jsx(j,{message:"Dark mode"})}),(o==null?void 0:o.user_change)&&d.is_dark&&u.jsx(Pt,{value:"dark",startIcon:u.jsx(lU,{}),onSelected:()=>{f("light")},children:u.jsx(j,{message:"Light mode"})}),u.jsx(Pt,{value:"logout",startIcon:u.jsx(uU,{}),onSelected:()=>{r.mutate()},children:u.jsx(j,{message:"Log out"})})]})]})}function dU({items:e=[]}){const{user:t}=tt(),{selectedTheme:n}=nf();if(!n||!t)return null;const r=!!t.unread_notifications_count,s=u.jsx(Cr,{size:"md",className:"md:hidden",role:"presentation","aria-label":"toggle authentication menu",badge:r?u.jsx(Dk,{children:t.unread_notifications_count}):void 0,children:u.jsx(Zv,{})}),i=u.jsxs(Wd,{className:"flex items-center max-md:hidden",role:"presentation",children:[u.jsx("img",{className:"mr-12 h-32 w-32 flex-shrink-0 rounded object-cover",src:t.avatar,alt:""}),u.jsx("span",{className:"mr-2 block max-w-124 overflow-x-hidden overflow-ellipsis text-sm",children:t.display_name}),u.jsx(rU,{className:"block icon-sm"})]});return u.jsx(cU,{items:e,children:u.jsxs("span",{role:"button",children:[s,i]})})}function fU({primaryButtonColor:e,navbarColor:t}){return e||(e=t==="primary"?"paper":"primary"),u.jsxs(v.Fragment,{children:[u.jsx(pU,{}),u.jsx(hU,{primaryButtonColor:e})]})}function hU({primaryButtonColor:e}){const{registration:t}=ce();return u.jsxs("div",{className:"text-sm max-md:hidden",children:[!t.disable&&u.jsx(te,{elementType:Ze,to:"/register",variant:"text",className:"mr-10",children:u.jsx(j,{message:"Register"})}),u.jsx(te,{elementType:Ze,to:"/login",variant:"raised",color:e,children:u.jsx(j,{message:"Login"})})]})}function pU(){const{registration:e}=ce(),t=gn();return u.jsxs(wf,{children:[u.jsx(Cr,{size:"md",className:"md:hidden",children:u.jsx(Zv,{})}),u.jsxs(_f,{children:[u.jsx(Pt,{value:"login",onSelected:()=>t("/login"),children:u.jsx(j,{message:"Login"})}),!e.disable&&u.jsx(Pt,{value:"register",onSelected:()=>t("/register"),children:u.jsx(j,{message:"Register"})})]})]})}function mU(){var n;const{data:e}=Lt();if(!df())return(n=e.themes.all.find(r=>r.is_dark&&r.default_dark))==null?void 0:n.colors}function gU({color:e,logoColor:t,isDarkMode:n}){const{trans:r}=Xn(),{branding:s}=ce();let i,o;return n||!s.logo_dark||t!=="dark"&&e!=="bg"&&e!=="bg-alt"?(i=s.logo_light,o=s.logo_light_mobile):(i=s.logo_dark,o=s.logo_dark_mobile),!o&&!i?null:u.jsx(Ze,{to:"/",className:"mr-4 block h-full max-h-26 flex-shrink-0 md:mr-24 md:max-h-36","aria-label":r({message:"Go to homepage"}),children:u.jsxs("picture",{children:[u.jsx("source",{srcSet:o||i,media:"(max-width: 768px)"}),u.jsx("source",{srcSet:i,media:"(min-width: 768px)"}),u.jsx("img",{className:"block h-full max-h-26 w-auto md:max-h-36",alt:r({message:"Site logo"})})]})})}function ti(e){let{hideLogo:t,toggleButton:n,children:r,className:s,border:i,size:o="md",color:a="primary",textColor:l,darkModeColor:c="bg-alt",rightChildren:d,menuPosition:f,logoColor:h,primaryButtonColor:p,authMenuItems:g,alwaysDarkMode:b=!1}=e;const w=df()||b,{notifications:y}=ce(),{isLoggedIn:m}=tt(),x=mU(),_=m&&(y==null?void 0:y.integrated);return w&&(a=c),u.jsxs("div",{style:b?x:void 0,className:D("flex items-center justify-end gap-10 py-8 pl-14 pr-8 md:pl-20 md:pr-20",xU(a,l),o==="md"&&"h-64 py-8",o==="sm"&&"h-54 py-4",o==="xs"&&"h-48 py-4",i,s),children:[!t&&u.jsx(gU,{isDarkMode:w,color:a,logoColor:h}),n,r,u.jsx(vU,{position:f}),u.jsx(yU,{position:f}),u.jsxs("div",{className:"ml-auto flex items-center gap-4 md:gap-14",children:[d,_&&u.jsx(eU,{}),m?u.jsx(dU,{items:g}):u.jsx(fU,{navbarColor:a,primaryButtonColor:p})]})]})}function yU({position:e}){return u.jsx(Xc,{className:"mx-14 text-sm max-md:hidden",itemClassName:t=>D("opacity-90 hover:underline hover:opacity-100",t&&"opacity-100"),menu:e})}function vU({position:e}){const t=gn(),n=kv(e);if(!(n!=null&&n.items.length))return null;const r=s=>{var i;s.type==="route"?t(s.action):(i=window.open(s.action,s.target))==null||i.focus()};return u.jsxs(wf,{children:[u.jsx(Cr,{className:"md:hidden","aria-label":"Toggle menu",children:u.jsx(nU,{})}),u.jsx(_f,{children:n.items.map(s=>{const i=s.icon&&Hd(s.icon);return u.jsx(Pt,{value:s.action,onSelected:()=>r(s),startIcon:i&&u.jsx(i,{}),children:u.jsx(j,{message:s.label})},s.id)})})]})}function xU(e,t){switch(e){case"primary":return`bg-primary ${t||"text-on-primary"} border-b-primary`;case"bg":return`bg ${t||"text-main"} border-b`;case"bg-alt":return`bg-alt ${t||"text-main"} border-b`;case"transparent":return`bg-transparent ${t||"text-white"}`;default:return`${e} ${t}`}}function Vk(e,t,n={}){return On(["value-lists",e,t],()=>bU(e,t),{staleTime:t?void 0:1/0,keepPreviousData:!0,enabled:!n.disabled,initialData:()=>{const r=ze.getQueriesData(["ValueLists"]).find(([,s])=>s&&e.every(i=>s[i])?s:null);if(r)return r[1]}})}function bU(e,t){return Z.get(`value-lists/${e}`,{params:t}).then(n=>n.data)}const Bk=re(u.jsx("path",{d:"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zm6.93 6h-2.95c-.32-1.25-.78-2.45-1.38-3.56 1.84.63 3.37 1.91 4.33 3.56zM12 4.04c.83 1.2 1.48 2.53 1.91 3.96h-3.82c.43-1.43 1.08-2.76 1.91-3.96zM4.26 14C4.1 13.36 4 12.69 4 12s.1-1.36.26-2h3.38c-.08.66-.14 1.32-.14 2s.06 1.34.14 2H4.26zm.82 2h2.95c.32 1.25.78 2.45 1.38 3.56-1.84-.63-3.37-1.9-4.33-3.56zm2.95-8H5.08c.96-1.66 2.49-2.93 4.33-3.56C8.81 5.55 8.35 6.75 8.03 8zM12 19.96c-.83-1.2-1.48-2.53-1.91-3.96h3.82c-.43 1.43-1.08 2.76-1.91 3.96zM14.34 14H9.66c-.09-.66-.16-1.32-.16-2s.07-1.35.16-2h4.68c.09.65.16 1.32.16 2s-.07 1.34-.16 2zm.25 5.56c.6-1.11 1.06-2.31 1.38-3.56h2.95c-.96 1.65-2.49 2.93-4.33 3.56zM16.36 14c.08-.66.14-1.32.14-2s-.06-1.34-.14-2h3.38c.16.64.26 1.31.26 2s-.1 1.36-.26 2h-3.38z"}),"LanguageOutlined"),Hk=re(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined");function qk(){const{mergeBootstrapData:e}=Lt();return me(t=>wU(t),{onSuccess:t=>{e({i18n:t.locale})},onError:t=>dt(t)})}function wU(e){return Z.post("users/me/locale",e).then(t=>t.data)}function _U(){const{locale:e}=Zs(),t=qk(),{data:n}=Vk(["localizations"]),{i18n:r}=ce();return!(n!=null&&n.localizations)||!e||!r.enable?null:u.jsxs(wf,{floatingWidth:"matchTrigger",selectionMode:"single",selectedValue:e.language,onSelectionChange:s=>{const i=s;i!==(e==null?void 0:e.language)&&t.mutate({locale:i})},children:[u.jsx(te,{disabled:t.isLoading,className:"capitalize",startIcon:u.jsx(Bk,{}),endIcon:u.jsx(Hk,{}),children:e.name}),u.jsx(_f,{children:n.localizations.map(s=>u.jsx(Pt,{value:s.language,className:"capitalize",children:s.name},s.language))})]})}const SU=re(u.jsx("path",{d:"M9 21c0 .55.45 1 1 1h4c.55 0 1-.45 1-1v-1H9v1zm3-19C8.14 2 5 5.14 5 9c0 2.38 1.19 4.47 3 5.74V17c0 .55.45 1 1 1h6c.55 0 1-.45 1-1v-2.26c1.81-1.27 3-3.36 3-5.74 0-3.86-3.14-7-7-7zm2.85 11.1-.85.6V16h-4v-2.3l-.85-.6C7.8 12.16 7 10.63 7 9c0-2.76 2.24-5 5-5s5 2.24 5 5c0 1.63-.8 3.16-2.15 4.1z"}),"LightbulbOutlined");function ql({className:e,padding:t}){const n=new Date().getFullYear();return u.jsxs("footer",{className:D("text-sm",t||"pt-54 pb-28 md:pb-54",e),children:[u.jsx(EU,{}),u.jsxs("div",{className:"md:flex md:text-left text-center items-center gap-30 justify-between text-muted",children:[u.jsx(j,{message:"Copyright © :year, All Rights Reserved",values:{year:n}}),u.jsxs("div",{children:[u.jsx(CU,{}),u.jsx(_U,{})]})]})]})}function EU(){const e=ce(),t=e.menus.find(r=>{var s;return(s=r.positions)==null?void 0:s.includes("footer")}),n=e.menus.find(r=>{var s;return(s=r.positions)==null?void 0:s.includes("footer-secondary")});return!t&&!n?null:u.jsxs("div",{className:"md:flex items-center justify-between overflow-x-auto border-b pb-14 mb-14 gap-30",children:[t&&u.jsx(Xc,{menu:t,className:"text-primary"}),n&&u.jsx(Xc,{menu:n,className:"text-muted mt-14 mb:mt-0"})]})}function CU(){const{themes:e}=ce(),{selectedTheme:t,selectTheme:n}=nf();return!t||!(e!=null&&e.user_change)?null:u.jsx(te,{variant:"text",startIcon:t.is_dark?u.jsx(zk,{}):u.jsx(SU,{}),onClick:()=>{t.is_dark?n("light"):n("dark")},children:t.is_dark?u.jsx(j,{message:"Dark mode"}):u.jsx(j,{message:"Light mode"})})}function jU({page:e}){return u.jsx("div",{className:"px-16 md:px-24",children:u.jsxs("div",{className:"prose dark:prose-invert mx-auto my-50",children:[u.jsx("h1",{children:e.title}),u.jsx("div",{className:"break-words whitespace-pre-wrap",dangerouslySetInnerHTML:{__html:e.body}})]})})}function Wk(){const{data:{default_meta_tags:e}}=Lt();return u.jsx(Xv,{tags:e})}function kU({query:e}){var t,n;return(t=e.data)!=null&&t.set_seo?null:(n=e.data)!=null&&n.seo?u.jsx(Xv,{tags:e.data.seo}):u.jsx(Wk,{})}const Kk=re(u.jsx("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z"}),"ErrorOutlined");function TU(){return u.jsx(Jv,{className:"mt-40",image:u.jsx("div",{children:u.jsx(Kk,{size:"xl"})}),imageHeight:"h-auto",title:u.jsx(j,{message:"There was an issue loading this page"}),description:u.jsx(j,{message:"Please try again later"})})}function PU({query:e,show404:t=!0,loaderClassName:n}){const{isLoggedIn:r}=tt();return e.isLoading?u.jsx(Vi,{className:n}):e.isError&&(Ii(e.error,401)||Ii(e.error,403))&&!r?u.jsx(ef,{to:"/login",replace:!0}):t&&e.isError&&Ii(e.error,404)?u.jsx(Pv,{}):u.jsx(TU,{})}function sg({slug:e}){const{pageSlug:t}=iv(),n=Y9(e||t);return u.jsxs("div",{className:"flex flex-col min-h-screen bg",children:[u.jsx(kU,{query:n}),u.jsx(ti,{menuPosition:"custom-page-navbar",className:"flex-shrink-0 sticky top-0"}),u.jsx("div",{className:"flex-auto",children:n.data?u.jsx(jU,{page:n.data.page}):u.jsx(PU,{query:n,loaderClassName:"mt-80"})}),u.jsx(ql,{className:"mx-14 md:mx-40"})]})}function RU(e){const t=Qk();return me(NU,{onSuccess:n=>{n.two_factor||t(n)},onError:n=>yn(n,e)})}function Qk(){const e=gn(),{getRedirectUri:t}=tt(),{setBootstrapData:n}=Lt();return v.useCallback(r=>{n(r.bootstrapData),e(t(),{replace:!0})},[e,n,t])}function NU(e){return Z.post("auth/login",e).then(t=>t.data)}function OU(e){const t=Qk();return me(n=>AU(n),{onSuccess:n=>{t(n)},onError:n=>yn(n,e)})}function AU(e){return Z.post("auth/two-factor-challenge",e).then(t=>t.data)}function $U(){const[e,t]=v.useState(!1),n=Yt(),r=OU(n);return u.jsxs(Hl,{children:[u.jsx(kr,{children:u.jsx(j,{message:"Two factor authentication"})}),u.jsxs(Xt,{form:n,onSubmit:s=>{r.mutate(s)},children:[u.jsx("div",{className:"mb-32 text-sm",children:u.jsx(j,{message:"Confirm access to your account by entering the authentication code provided by your authenticator application."})}),u.jsx("div",{className:"mb-4",children:e?u.jsx(Ae,{name:"recovery_code",minLength:21,maxLength:21,autoComplete:"off",autoCorrect:"off",spellCheck:"false",label:u.jsx(j,{message:"Recovery code"}),autoFocus:!0,required:!0}):u.jsx(Ae,{name:"code",minLength:6,maxLength:6,autoComplete:"off",autoCorrect:"off",spellCheck:"false",label:u.jsx(j,{message:"Code"}),autoFocus:!0,required:!0})}),u.jsx("div",{className:"mb-32",children:u.jsx(te,{variant:"link",color:"primary",size:"sm",onClick:()=>t(!e),children:u.jsx(j,{message:"Use recovery code instead"})})}),u.jsx(te,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:r.isLoading,children:u.jsx(j,{message:"Continue"})})]})]})}function IU({onTwoFactorChallenge:e}){const[t]=av(),{pathname:n}=An(),r=n.includes("workspace"),s=t.get("email")||void 0,{branding:i,registration:o,site:a,social:l}=ce(),c=v.useContext(jl),d=a.demo&&!s?DU(c):{},f=Yt({defaultValues:{remember:!0,email:s,...d}}),h=RU(f),p=r?u.jsx(j,{values:{siteName:i==null?void 0:i.site_name},message:"To join your team on :siteName, login to your account"}):u.jsx(j,{message:"Sign in to your account"}),g=!o.disable&&u.jsx(j,{values:{a:w=>u.jsx(Ze,{className:ls,to:"/register",children:w})},message:"Don't have an account? <a>Sign up.</a>"}),b=!!Object.keys(f.formState.errors).length;return u.jsxs(Hl,{heading:p,message:g,children:[u.jsx(kr,{children:u.jsx(j,{message:"Login"})}),u.jsxs(Xt,{form:f,onSubmit:w=>{h.mutate(w,{onSuccess:y=>{y.two_factor&&e()}})},children:[u.jsx(Ae,{className:"mb-32",name:"email",type:"email",label:u.jsx(j,{message:"Email"}),disabled:!!s,invalid:b,required:!0}),u.jsx(Ae,{className:"mb-12",name:"password",type:"password",label:u.jsx(j,{message:"Password"}),invalid:b,labelSuffix:u.jsx(Ze,{className:ls,to:"/forgot-password",tabIndex:-1,children:u.jsx(j,{message:"Forgot your password?"})}),required:!0}),u.jsx(Pk,{name:"remember",className:"block mb-32",children:u.jsx(j,{message:"Stay signed in for a month"})}),u.jsx(te,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:h.isLoading,children:u.jsx(j,{message:"Continue"})})]}),u.jsx(Tk,{dividerMessage:l.compact_buttons?u.jsx(j,{message:"Or sign in with"}):u.jsx(j,{message:"OR"})})]})}function DU(e){if(e.demo.loginPageDefaults==="randomAccount"){const t=Math.floor(Math.random()*100)+1;return{email:`admin@demo${String(t).padStart(3,"0")}.com`,password:"admin"}}else return{email:"[email protected]",password:"admin"}}function ig(){const[e,t]=v.useState(!1);return e?u.jsx($U,{}):u.jsx(IU,{onTwoFactorChallenge:()=>t(!0)})}function MU({homepageResolver:e}){const{homepage:t}=ce();return(t==null?void 0:t.type)==="loginPage"?u.jsx(ws,{children:u.jsx(ig,{})}):(t==null?void 0:t.type)==="registerPage"?u.jsx(ws,{children:u.jsx(rg,{})}):(t==null?void 0:t.type)==="customPage"?u.jsx(sg,{slug:t.value}):(e==null?void 0:e(t==null?void 0:t.type))||null}function sr({variant:e="text",animation:t="wave",size:n,className:r,display:s="block",radius:i="rounded"}){return u.jsx("span",{className:D("overflow-hidden relative bg-fg-base/4 bg-no-repeat will-change-transform skeleton",i,LU({variant:e,size:n}),s,e==="text"&&"scale-y-[0.6] origin-[0_55%]",e==="avatar"&&"flex-shrink-0",e==="icon"&&"mx-8 flex-shrink-0",t==="wave"&&"skeleton-wave",t==="pulsate"&&"skeleton-pulsate",r),"aria-busy":!0,"aria-live":"polite"})}function LU({variant:e,size:t}){if(t)return t;switch(e){case"avatar":return"h-40 w-40";case"icon":return"h-24 h-24";case"rect":return"h-full w-full";default:return"w-full"}}const Gk="billing/products";function e0(e){return On([Gk],()=>FU(),{initialData:()=>{var t;if(e)return(t=Pn().loaders)==null?void 0:t[e]}})}function FU(){return Z.get(Gk).then(e=>({products:e.data.pagination.data}))}function og(e,t){if(e==="monthly"){const n=zU(t);if(n)return n}if(e==="yearly"){const n=UU(t);if(n)return n}return t[0]}function UU(e){return e.find(t=>{if(t.interval==="month"&&t.interval_count>=12||t.interval==="year"&&t.interval_count>=1)return t})}function zU(e){return e.find(t=>{if(t.interval==="day"&&t.interval_count>=30||t.interval==="month"&&t.interval_count>=1)return t})}const VU=re(u.jsx("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"})),BU=re(u.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"WarningOutlined"),Xb=500,Un={};let ta=!1,er=null,gs=null;const Jb=e=>{var t;for(const n in Un)n!==e&&((t=Un[n])==null||t.call(Un,!0),delete Un[n])},HU=v.forwardRef(({children:e,label:t,placement:n="top",offset:r=10,variant:s="neutral",delay:i=1500,isDisabled:o,usePortal:a=!0,...l},c)=>{const{x:d,y:f,reference:h,strategy:p,arrowRef:g,arrowStyle:b,refs:w}=Uv({placement:n,offset:r,ref:c,showArrow:!0}),[y,m]=v.useState(!1),x=v.useId(),_=v.useRef(),S=()=>{clearTimeout(_.current),_.current=void 0,Jb(x),Un[x]=E,ta=!0,m(!0),er&&(clearTimeout(er),er=null),gs&&(clearTimeout(gs),gs=null)},E=v.useCallback(O=>{O?(clearTimeout(_.current),_.current=void 0,m(!1)):_.current||(_.current=setTimeout(()=>{_.current=void 0,m(!1)},Xb)),er&&(clearTimeout(er),er=null),ta&&(gs&&clearTimeout(gs),gs=setTimeout(()=>{delete Un[x],gs=null,ta=!1},Xb))},[x]),C=()=>{Jb(x),Un[x]=E,!y&&!er&&!ta?er=setTimeout(()=>{er=null,ta=!0,S()},i):y||S()},k=O=>{!O&&i>0&&!_.current?C():S()};v.useEffect(()=>()=>{clearTimeout(_.current),Un[x]&&delete Un[x]},[x]),v.useEffect(()=>{const O=$=>{$.key==="Escape"&&E(!0)};if(y)return document.addEventListener("keydown",O,!0),()=>{document.removeEventListener("keydown",O,!0)}},[y,E]);const P=u.jsx(To,{children:y&&u.jsxs(Sr.div,{...yk,ref:w.setFloating,id:x,role:"tooltip",onPointerEnter:()=>{k(!0)},onPointerLeave:()=>{E()},className:D("z-tooltip my-4 max-w-240 break-words rounded px-8 py-4 text-xs text-white shadow",s==="positive"&&"bg-positive",s==="danger"&&"bg-danger",s==="neutral"&&"bg-toast"),style:{position:p,top:f??"",left:d??""},children:[u.jsx("div",{ref:g,className:"absolute h-8 w-8 rotate-45 bg-inherit",style:b}),t]})});return u.jsxs(v.Fragment,{children:[v.cloneElement(e,jr({"aria-describedby":y?x:void 0,ref:h,onPointerEnter:O=>{O.pointerType==="mouse"&&k()},onFocus:O=>{O.target.matches(":focus-visible")&&k(!0)},onPointerLeave:O=>{O.pointerType==="mouse"&&E()},onPointerDown:()=>{E(!0)},onBlur:()=>{E()},"aria-label":typeof t=="string"?t:t.props.message},l)),a?os&&Eo.createPortal(P,os):P]})});function qU(e){const{onRemove:t,disabled:n,invalid:r,errorMessage:s,children:i,className:o,selectable:a=!1,radius:l="rounded-full",elementType:c="div",to:d,onClick:f}=e,h=v.useRef(null),p=v.useRef(null),g=xk(),b=_=>{switch(_.key){case"ArrowRight":case"ArrowDown":g.focusNext({tabbable:!0});break;case"ArrowLeft":case"ArrowUp":g.focusPrevious({tabbable:!0});break;case"Backspace":case"Delete":h.current===document.activeElement&&(t==null||t());break}},w=_=>{_.stopPropagation(),f?f(_):h.current.focus()},y=WU(e);let m=r||s!=null?u.jsx(BU,{className:"text-danger",size:"sm"}):e.adornment&&v.cloneElement(e.adornment,{size:y.adornment.size,circle:!0,className:D(e.adornment.props,y.adornment.margin)});s&&m&&(m=u.jsx(HU,{label:s,variant:"danger",children:m}));const x=c;return u.jsxs(x,{tabIndex:a?0:void 0,ref:h,to:d,onKeyDown:a?b:void 0,onClick:a?w:void 0,className:D("relative flex flex-shrink-0 items-center justify-center gap-10 overflow-hidden whitespace-nowrap outline-none","after:pointer-events-none after:absolute after:inset-0",f&&"cursor-pointer",l,KU(e),y.chip,!n&&a&&"hover:after:bg-black/5 focus:after:bg-black/10",o),children:[m,i,t&&u.jsx(Wd,{ref:p,className:D("text-black/30 dark:text-white/50",y.closeButton),onClick:_=>{_.stopPropagation(),t()},tabIndex:-1,children:u.jsx(VU,{className:"block",width:"100%",height:"100%"})})]})}function WU({size:e,onRemove:t}){switch(e){case"xs":return{adornment:{size:"xs",margin:"-ml-3"},chip:D("pl-8 h-18 text-xs font-medium w-max",!t&&"pr-8"),closeButton:"mr-4 w-14 h-14"};case"sm":return{adornment:{size:"xs",margin:"-ml-3"},chip:D("pl-8 h-26 text-xs",!t&&"pr-8"),closeButton:"mr-4 w-18 h-18"};case"lg":return{adornment:{size:"md",margin:"-ml-12"},chip:D("pl-18 h-38 text-base",!t&&"pr-18"),closeButton:"mr-6 w-24 h-24"};default:return{adornment:{size:"sm",margin:"-ml-6"},chip:D("pl-12 h-32 text-sm",!t&&"pr-12"),closeButton:"mr-6 w-22 h-22"}}}function KU({color:e}){switch(e){case"primary":return"bg-primary text-on-primary";case"positive":return"bg-positive-lighter text-positive-darker";case"danger":return"bg-danger-lighter text-danger-darker";default:return"bg-chip text-main"}}const QU=v.memo(({value:e,currency:t})=>{const n=jv({style:"currency",currency:t,currencyDisplay:"narrowSymbol"});return isNaN(e)&&(e=0),u.jsx(v.Fragment,{children:n.format(e)})});function GU({price:e,variant:t="slash",className:n,priceClassName:r,periodClassName:s}){if(!e)return null;const i=u.jsx(j,{message:e.interval});return u.jsxs("div",{className:D("flex gap-6 items-center",n),children:[u.jsx("div",{className:r,children:u.jsx(QU,{value:e.amount/(e.interval_count??1),currency:e.currency})}),t==="slash"?u.jsxs("div",{className:s,children:[" / ",i]}):u.jsxs("div",{className:s,children:[u.jsx(j,{message:"per"})," ",u.jsx("br",{})," ",i]})]})}function YU({product:e}){return e.feature_list.length?u.jsxs("div",{className:"border-t pt-24 mt-32",children:[u.jsx("div",{className:"text-sm mb-10 font-semibold",children:u.jsx(j,{message:"What's included"})}),e.feature_list.map(t=>u.jsxs("div",{className:"flex items-center gap-10 text-sm py-6",children:[u.jsx(Ck,{className:"text-positive",size:"sm"}),u.jsx(j,{message:t})]},t))]}):null}function Yk({selectedCycle:e,className:t,productLoader:n}){const r=e0(n);return u.jsx("div",{className:D("flex flex-col items-center gap-24 overflow-x-auto overflow-y-visible pb-20 md:flex-row md:justify-center",t),children:u.jsx(To,{initial:!1,mode:"wait",children:r.data?u.jsx(XU,{plans:r.data.products,selectedPeriod:e},"plan-list"):u.jsx(ZU,{},"skeleton-loader")})})}function XU({plans:e,selectedPeriod:t}){const{isLoggedIn:n,isSubscribed:r}=tt(),s=e.filter(i=>!i.hidden);return u.jsx(v.Fragment,{children:s.map((i,o)=>{const a=o===0,l=o===s.length-1,c=og(t,i.prices);let d;return n||(d="/register?redirectFrom=pricing"),r&&(d=`/change-plan/${i.id}/${c==null?void 0:c.id}/confirm`),n&&!i.free&&(d=`/checkout/${i.id}/${c==null?void 0:c.id}`),u.jsxs(Sr.div,{...bf,className:D("w-full rounded-lg border bg-paper px-28 shadow-lg md:min-w-240 md:max-w-350",i.recommended?"py-56":"py-28",a&&"ml-auto",l&&"mr-auto"),children:[u.jsxs("div",{className:"mb-32",children:[u.jsx(qU,{radius:"rounded",size:"sm",className:D("mb-20 w-min",!i.recommended&&"invisible"),children:u.jsx(j,{message:"Most popular"})}),u.jsx("div",{className:"mb-12 text-xl font-semibold",children:u.jsx(j,{message:i.name})}),u.jsx("div",{className:"text-sm text-muted",children:u.jsx(j,{message:i.description})})]}),u.jsxs("div",{children:[c?u.jsx(GU,{priceClassName:"font-bold text-4xl",periodClassName:"text-muted text-xs",variant:"separateLine",price:c}):u.jsx("div",{className:"text-4xl font-bold",children:u.jsx(j,{message:"Free"})}),u.jsx("div",{className:"mt-60",children:u.jsx(te,{variant:"flat",color:"primary",className:"w-full",size:"md",elementType:d?Ze:void 0,disabled:!d,onClick:()=>{n||!c||!i||Cv("be.onboarding.selected",{productId:i.id,priceId:c.id})},to:d,children:u.jsx(JU,{product:i})})}),u.jsx(YU,{product:i})]})]},i.id)})})}function JU({product:e}){const{isLoggedIn:t}=tt();return e.free&&t?u.jsx(j,{message:"You're on :plan",values:{plan:e.name}}):e.free||!t?u.jsx(j,{message:"Get started"}):u.jsx(j,{message:"Upgrade"})}function ZU(){return u.jsxs(v.Fragment,{children:[u.jsx(Jh,{},"skeleton-1"),u.jsx(Jh,{},"skeleton-2"),u.jsx(Jh,{},"skeleton-3")]})}function Jh(){return u.jsxs(Sr.div,{...bf,className:"w-full rounded-lg border px-28 py-90 shadow-lg md:max-w-350",children:[u.jsx(sr,{className:"my-10"}),u.jsx(sr,{className:"mb-40"}),u.jsx(sr,{className:"mb-40 h-30"}),u.jsx(sr,{className:"mb-40 h-40"}),u.jsx(sr,{className:"mb-20"}),u.jsx(sr,{}),u.jsx(sr,{})]})}const ag=v.forwardRef((e,t)=>{const{children:n,autoFocus:r,size:s,invalid:i,isFirst:o,...a}=e,l=Io(t);pf({autoFocus:r},l);const c=ez(s);return u.jsxs("label",{className:D("inline-flex gap-8 select-none items-center whitespace-nowrap align-middle",c.label,e.disabled&&"text-disabled pointer-events-none",e.invalid&&"text-danger"),children:[u.jsx("input",{type:"radio",className:D("focus-visible:ring outline-none","rounded-full transition-button border-2 appearance-none","border-text-muted disabled:border-disabled-fg checked:border-primary checked:hover:border-primary-dark","before:bg-primary disabled:before:bg-disabled-fg before:hover:bg-primary-dark","before:h-full before:w-full before:block before:rounded-full before:scale-10 before:opacity-0 before:transition before:duration-200","checked:before:scale-[.65] checked:before:opacity-100",c.circle),ref:l,...a}),n&&u.jsx("span",{children:n})]})});function _W(e){const{field:{onChange:t,onBlur:n,value:r,ref:s},fieldState:{invalid:i}}=$o({name:e.name}),o={onChange:t,onBlur:n,checked:e.value===r,invalid:e.invalid||i};return u.jsx(ag,{ref:s,...jr(o,e)})}function ez(e){switch(e){case"xs":return{circle:"h-12 w-12",label:"text-xs"};case"sm":return{circle:"h-16 w-16",label:"text-sm"};case"lg":return{circle:"h-24 w-24",label:"text-lg"};default:return{circle:"h-20 w-20",label:"text-base"}}}const Xk=v.forwardRef((e,t)=>{const n=Do(e),{label:r,children:s,size:i,className:o,orientation:a="horizontal",disabled:l,required:c,invalid:d,errorMessage:f,description:h}=e,p={},g=v.useId(),b=e.name||g;return u.jsxs("fieldset",{"aria-describedby":h?`${g}-description`:void 0,ref:t,className:D("text-left",o),children:[r&&u.jsx("legend",{className:n.label,...p,children:r}),u.jsx("div",{className:D("flex",r?"mt-6":"mt-0",a==="vertical"?"flex-col gap-10":"flex-row gap-16"),children:v.Children.map(s,w=>{if(v.isValidElement(w))return v.cloneElement(w,{name:b,size:i,invalid:w.props.invalid||d||void 0,disabled:w.props.disabled||l,required:w.props.required||c})})}),h&&!f&&u.jsx("div",{className:n.description,id:`${g}-description`,children:h}),f&&u.jsx("div",{className:n.error,children:f})]})});function SW({children:e,...t}){const{fieldState:{error:n}}=$o({name:t.name});return u.jsx(Xk,{errorMessage:n==null?void 0:n.message,...t,children:e})}const tz=v.memo(({products:e})=>{const t=nz(e);return t<=0?null:u.jsx(v.Fragment,{children:u.jsxs("span",{className:"text-positive-darker font-medium",children:[" ","(",u.jsx(j,{message:"Save up to :percentage%",values:{percentage:t}}),")"]})})});function nz(e){if(!(e!=null&&e.length))return 0;const t=e.map(n=>{const r=og("monthly",n.prices),s=og("yearly",n.prices);if(!r||!s)return 0;const i=r.amount*12,o=s.amount,a=Math.round((i-o)/i*100);return a>0&&a<=200?a:0});return Math.max(Math.max(...t),0)}function Jk({selectedCycle:e,onChange:t,products:n,...r}){return u.jsxs(Xk,{...r,children:[u.jsxs(ag,{value:"yearly",checked:e==="yearly",onChange:s=>{t(s.target.value)},children:[u.jsx(j,{message:"Annual"}),u.jsx(tz,{products:n})]}),u.jsx(ag,{value:"monthly",checked:e==="monthly",onChange:s=>{t(s.target.value)},children:u.jsx(j,{message:"Monthly"})})]})}function rz(e,{size:t}={}){if(e)return t||(t="original"),e.includes("image.tmdb")?sz(e,t):`${iz(eC(e),t)}`}function EW(e){if(e)return e.includes("image.tmdb")?`${e.replace(/original|w1280/,"w300")} 768w, ${e.replace(/original|w1280/,"w780")} 1024w, ${e.replace(/original|w1280/,"w1280")} 1280w`:`${e.replace(/original/,"small")} 768w, ${e.replace(/original/,"medium")} 1024w, ${e.replace(/original/,"large")} 1280w`}function sz(e,t){switch(t){case"sm":return e.replace(/original|w1280/,"w92");case"md":return e.replace(/original|w1280/,"w300");case"lg":return e.replace(/original|w1280/,"w500");default:return e}}function iz(e,t){switch(t){case"sm":return e.replace("original","small");case"md":return e.replace("original","medium");case"lg":return e.replace("original","large");default:return e}}const oz=re(u.jsx("path",{d:"M4 6.47 5.76 10H20v8H4V6.47M22 4h-4l2 4h-3l-2-4h-2l2 4h-3l-2-4H8l2 4H7L5 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4z"}),"MovieOutlined");function az(){var t,n;const e=(n=(t=Pn().loaders)==null?void 0:t.landingPage)==null?void 0:n.trendingTitles;return e!=null&&e.length?u.jsxs("div",{className:"landing-container mb-48 md:mb-80",children:[u.jsx("div",{className:"mb-48 mt-14 h-1 bg-divider md:mb-80"}),u.jsx("h2",{className:"mb-34 text-center text-4xl",children:u.jsx(j,{message:"See what's currently trending."})}),u.jsx("div",{className:"grid grid-cols-3 gap-24",children:e.map(r=>u.jsx(lz,{title:r},r.id))})]}):null}function lz({title:e}){const t=rz(e==null?void 0:e.backdrop,{size:"lg"}),{trans:n}=Xn(),r=D("h-full w-full rounded bg-fg-base/4 object-cover",t?"block":"flex items-center justify-center"),s=t?u.jsx("img",{className:r,draggable:!1,loading:"lazy",src:t,alt:n(ie("Poster for :name",{values:{name:e.name}}))}):u.jsx("span",{className:r,children:u.jsx(oz,{className:"max-w-[60%] text-divider",size:"text-6xl"})});return u.jsxs("div",{children:[u.jsx("div",{className:"relative",children:s}),u.jsx("div",{className:"mt-10 text-center text-base font-medium",children:e.name})]})}function uz(){var s,i,o;const e=ce(),t=(s=e.homepage)==null?void 0:s.appearance,n=((i=e.homepage)==null?void 0:i.pricing)&&e.billing.enable,r=(o=e.homepage)==null?void 0:o.trending;return t?u.jsxs(v.Fragment,{children:[u.jsx(Wk,{}),u.jsx(cz,{content:t}),u.jsx(dz,{content:t}),u.jsx(fz,{content:t}),r&&u.jsx(az,{}),u.jsx(pz,{content:t}),n&&u.jsx(hz,{content:t}),u.jsx(ql,{className:"landing-container"})]}):null}function cz({content:e}){const{headerTitle:t,headerSubtitle:n,headerImage:r,headerImageOpacity:s,actions:i,headerOverlayColor1:o,headerOverlayColor2:a,blurHeaderImage:l}=e;let c;return o&&a?c=`linear-gradient(45deg, ${o} 0%, ${a} 100%)`:o?c=o:a&&(c=a),u.jsxs("header",{className:"relative isolate mb-14 overflow-hidden md:mb-60",children:[u.jsx("img",{src:r,style:{opacity:s},alt:"",width:"2347",height:"1244",decoding:"async",loading:"lazy",className:D("absolute left-1/2 top-1/2 z-20 max-w-none -translate-x-1/2 -translate-y-1/2",l&&"blur-sm")}),c&&u.jsx("div",{className:"absolute z-10 h-full w-full bg-alt",style:{background:c}}),u.jsx("div",{className:"gradient absolute inset-0 z-30 m-auto"}),u.jsxs("div",{className:"relative z-30 flex h-full flex-col",children:[u.jsx(ti,{color:"transparent",darkModeColor:"transparent",className:"flex-shrink-0",menuPosition:"landing-page-navbar",primaryButtonColor:"white"}),u.jsxs("div",{className:"mx-auto flex max-w-850 flex-auto flex-col items-center justify-center px-14 py-50 text-center text-white lg:py-140",children:[t&&u.jsx("h1",{className:"text-3xl font-normal md:text-5xl","data-testid":"headerTitle",children:u.jsx(j,{message:t})}),n&&u.jsx("div",{className:"max-auto mt-24 max-w-640 text-lg tracking-tight md:text-xl","data-testid":"headerSubtitle",children:u.jsx(j,{message:n})}),u.jsxs("div",{className:"flex min-h-50 gap-20 pb-30 pt-40 empty:min-h-0 md:pb-50 md:pt-60",children:[u.jsx(lg,{item:i.cta1,variant:"raised",color:"white",size:"lg",radius:"rounded-full",className:"min-w-180"}),u.jsx(lg,{item:i.cta2,variant:"text",color:"paper",size:"lg",radius:"rounded-full"})]})]})]}),u.jsx("div",{className:"absolute bottom-0 z-20 h-[6vw] w-full translate-y-1/2 -skew-y-3 transform bg"})]})}function lg({item:e,...t}){if(!(e!=null&&e.label)||!(e!=null&&e.action))return null;const n=e.icon?Hd(e.icon):void 0;return u.jsx(te,{elementType:e.type==="route"?Ze:"a",href:e.action,to:e.action,startIcon:n?u.jsx(n,{}):void 0,...t,children:u.jsx(j,{message:e.label})})}function dz({content:e}){var t;return(t=e.primaryFeatures)!=null&&t.length?u.jsxs(v.Fragment,{children:[u.jsx("div",{className:"landing-container z-20 items-stretch gap-26 md:flex",id:"primary-features",children:e.primaryFeatures.map((n,r)=>u.jsxs("div",{className:"mb-14 flex-1 rounded-2xl px-24 py-36 text-center shadow-[0_10px_30px_rgba(0,0,0,0.08)] dark:bg-alt md:mb-0","data-testid":`primary-root-${r}`,children:[u.jsx(Uy,{className:"mx-auto mb-30 h-128","data-testid":`primary-image-${r}`,src:n.image}),u.jsx("h2",{className:"my-16 text-lg font-medium","data-testid":`primary-title-${r}`,children:u.jsx(j,{message:n.title})}),u.jsx("div",{className:"text-md text-[0.938rem]","data-testid":`primary-subtitle-${r}`,children:u.jsx(j,{message:n.subtitle})})]},r))}),u.jsx("div",{className:"mt-100 h-1 bg-divider"})]}):null}function fz({content:e}){var t;return u.jsx("div",{className:D("relative overflow-hidden",((t=e.primaryFeatures)==null?void 0:t.length)&&"pt-100"),children:u.jsx("div",{className:"landing-container relative",id:"features",children:e.secondaryFeatures.map((n,r)=>{const s=r%2===0;return u.jsxs("div",{"data-testid":`secondary-root-${r}`,className:D("relative z-20 mb-14 py-16 md:mb-80 md:flex",s&&"flex-row-reverse"),children:[u.jsx("img",{src:n.image,className:"mr-auto aspect-[600/382] w-580 max-w-full rounded-lg shadow-lg dark:border",alt:""}),u.jsxs("div",{className:"ml-30 mr-auto max-w-350 pt-30",children:[u.jsx("small",{className:"mb-16 text-xs font-medium uppercase tracking-widest text-muted","data-testid":`secondary-subtitle-${r}`,children:u.jsx(j,{message:n.subtitle})}),u.jsx("h3",{className:"py-16 text-3xl","data-testid":`secondary-title-${r}`,children:u.jsx(j,{message:n.title})}),u.jsx("div",{className:"h-2 w-50 bg-black/90 dark:bg-divider"}),u.jsx("div",{className:"my-20 text-[0.938rem]","data-testid":`secondary-description-${r}`,children:u.jsx(j,{message:n.description})})]})]},r)})})})}function hz({content:e}){var s;const t=e0("landingPage"),[n,r]=v.useState("yearly");return u.jsx("div",{className:"py-80 sm:py-128",id:"pricing",children:u.jsxs("div",{className:"mx-auto max-w-1280 px-24 lg:px-32",children:[u.jsxs("div",{className:"text-center",children:[e.pricingTitle&&u.jsx("h2",{className:"font-display text-3xl tracking-tight sm:text-4xl","data-testid":"pricingTitle",children:u.jsx(j,{message:e.pricingTitle})}),e.pricingSubtitle&&u.jsx("p",{className:"mt-16 text-lg text-muted","data-testid":"pricingSubtitle",children:u.jsx(j,{message:e.pricingSubtitle})})]}),u.jsx(Jk,{products:(s=t.data)==null?void 0:s.products,selectedCycle:n,onChange:r,className:"my-50 flex justify-center",size:"lg"}),u.jsx(Yk,{selectedCycle:n,productLoader:"landingPage"})]})})}function pz({content:{footerSubtitle:e,footerImage:t,footerTitle:n,actions:r}}){return!n&&!e?null:u.jsxs("div",{className:"relative overflow-hidden bg-black py-90 text-white before:pointer-events-none before:absolute before:inset-0 before:z-10 before:bg-gradient-to-r before:from-black before:to-transparent md:py-128","data-testid":"footerImage",children:[t&&u.jsx("img",{draggable:!1,src:t,alt:"",width:"2347",height:"1244",decoding:"async",loading:"lazy",className:"absolute left-1/2 top-1/2 max-w-none -translate-x-1/2 -translate-y-1/2 blur-sm"}),u.jsx("div",{className:"relative z-20 mx-auto max-w-1280 px-24 text-center sm:px-16 lg:px-32",children:u.jsxs("div",{className:"mx-auto max-w-512 text-center",children:[n&&u.jsx("h2",{className:" font-display text-3xl tracking-tight sm:text-4xl","data-testid":"footerTitle",children:u.jsx(j,{message:n})}),e&&u.jsx("p",{className:"mt-16 text-lg tracking-tight","data-testid":"footerSubtitle",children:u.jsx(j,{message:e})}),u.jsx(lg,{item:r.cta3,size:"lg",radius:"rounded-full",variant:"flat",color:"white",className:"mt-40 block","data-testid":"cta3"})]})})]})}const mz=re(u.jsx("path",{d:"M 23.898438 47 C 13.65625 47 5.003906 38.355469 5.003906 28.125 L 5.003906 28 C 4.929688 23.074219 6.558594 19.714844 7.261719 18.5 C 8.621094 16.152344 10.296875 14.410156 10.8125 14.136719 C 11.566406 13.734375 12.121094 14.332031 12.363281 14.585938 C 12.832031 15.085938 12.597656 15.695313 12.507813 15.925781 C 11.613281 18.265625 10.929688 20.28125 11.003906 23.097656 C 11.097656 26.90625 12.488281 28.699219 13.085938 29.292969 C 13.460938 29.671875 13.769531 29.847656 14.015625 29.933594 C 14.054688 28.671875 14.203125 26.148438 14.773438 23.304688 C 15.113281 21.589844 16.28125 17.085938 19.6875 12.296875 C 23.714844 6.632813 28.449219 4.273438 29.214844 4.042969 C 30.570313 3.636719 33.535156 3.128906 35.957031 3.019531 C 38.53125 2.910156 39.160156 3.574219 39.921875 5.035156 L 40.046875 5.277344 C 41.820313 8.613281 45.03125 18.832031 43.65625 29.132813 C 42.011719 39.992188 34.257813 47 23.898438 47 Z M 14.648438 30 C 14.640625 30 14.632813 30 14.628906 30 L 14.652344 30 C 14.648438 30 14.648438 30 14.648438 30 Z "}));function ps({id:e,title:t,titleSuffix:n,children:r,actions:s}){return u.jsxs("section",{id:e,className:"bg-paper rounded border px-24 py-20 mb-24 w-full",children:[u.jsxs("div",{className:"border-b pb-10 flex items-center gap-14",children:[u.jsx("div",{className:"text-lg font-light",children:t}),n&&u.jsx("div",{className:"ml-auto",children:n})]}),u.jsx("div",{className:"pt-24",children:r}),s&&u.jsx("div",{className:"pt-10 mt-36 border-t flex justify-end",children:s})]})}function gz({children:e,className:t,padding:n,dataTestId:r}){return u.jsx(xf,{children:u.jsx("ul",{"data-testid":r,className:D("text-base sm:text-sm outline-none",t,n??"py-4"),children:e})})}const yz=v.forwardRef(({children:e,onSelected:t,borderRadius:n="rounded",className:r,...s},i)=>{const o=xk(),a=!!t,[l,c]=v.useState(!1),d=f=>{switch(f.key){case"ArrowDown":f.preventDefault(),o.focusNext();break;case"ArrowUp":f.preventDefault(),o.focusPrevious();break;case"Home":f.preventDefault(),o.focusFirst();break;case"End":f.preventDefault(),o.focusLast();break;case"Enter":case"Space":f.preventDefault(),t==null||t();break}};return u.jsx("li",{children:u.jsx(jk,{className:D(r,n),isActive:l,isDisabled:s.isDisabled,...s,onFocus:f=>{c(f.target.matches(":focus-visible"))},onBlur:()=>{c(!1)},onClick:()=>{t==null||t()},ref:i,role:a?"button":void 0,onKeyDown:a?d:void 0,tabIndex:a&&!s.isDisabled?0:void 0,children:e})})}),vz=re(u.jsx("path",{d:"M11 7 9.6 8.4l2.6 2.6H2v2h10.2l-2.6 2.6L11 17l5-5-5-5zm9 12h-8v2h8c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-8v2h8v14z"}),"LoginOutlined"),xz=re(u.jsx("path",{d:"M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zM9 6c0-1.66 1.34-3 3-3s3 1.34 3 3v2H9V6zm9 14H6V10h12v10zm-6-3c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"}),"LockOutlined"),bz=re(u.jsx("path",{d:"M19 1H9c-1.1 0-2 .9-2 2v3h2V4h10v16H9v-2H7v3c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-2-2-2zm-8.2 10V9.5C10.8 8.1 9.4 7 8 7S5.2 8.1 5.2 9.5V11c-.6 0-1.2.6-1.2 1.2v3.5c0 .7.6 1.3 1.2 1.3h5.5c.7 0 1.3-.6 1.3-1.2v-3.5c0-.7-.6-1.3-1.2-1.3zm-1.3 0h-3V9.5c0-.8.7-1.3 1.5-1.3s1.5.5 1.5 1.3V11z"}),"PhonelinkLockOutlined"),wz=re(u.jsx("path",{d:"m14 12-2 2-2-2 2-2 2 2zm-2-6 2.12 2.12 2.5-2.5L12 1 7.38 5.62l2.5 2.5L12 6zm-6 6 2.12-2.12-2.5-2.5L1 12l4.62 4.62 2.5-2.5L6 12zm12 0-2.12 2.12 2.5 2.5L23 12l-4.62-4.62-2.5 2.5L18 12zm-6 6-2.12-2.12-2.5 2.5L12 23l4.62-4.62-2.5-2.5L12 18z"}),"ApiOutlined"),_z=re(u.jsx("path",{d:"M15.73 3H8.27L3 8.27v7.46L8.27 21h7.46L21 15.73V8.27L15.73 3zM19 14.9 14.9 19H9.1L5 14.9V9.1L9.1 5h5.8L19 9.1v5.8zm-4.17-7.14L12 10.59 9.17 7.76 7.76 9.17 10.59 12l-2.83 2.83 1.41 1.41L12 13.41l2.83 2.83 1.41-1.41L13.41 12l2.83-2.83-1.41-1.41z"}),"DangerousOutlined"),Sz=re(u.jsx("path",{d:"M4 6h18V4H4c-1.1 0-2 .9-2 2v11H0v3h14v-3H4V6zm19 2h-6c-.55 0-1 .45-1 1v10c0 .55.45 1 1 1h6c.55 0 1-.45 1-1V9c0-.55-.45-1-1-1zm-1 9h-4v-7h4v7z"}),"DevicesOutlined");var Jn=(e=>(e.AccountDetails="account-details",e.SocialLogin="social-login",e.Password="password",e.TwoFactor="two-factor",e.LocationAndLanguage="location-and-language",e.Developers="developers",e.DeleteAccount="delete-account",e.Sessions="sessions",e))(Jn||{});function Ez(){const e=Jn,{hasPermission:t}=tt(),{api:n,social:r}=ce(),s=(r==null?void 0:r.envato)||(r==null?void 0:r.google)||(r==null?void 0:r.facebook)||(r==null?void 0:r.twitter);return u.jsx("aside",{className:"flex-shrink-0 sticky top-10 hidden lg:block",children:u.jsxs(gz,{padding:"p-0",children:[u.jsx(Nr,{icon:u.jsx(Zv,{}),panel:e.AccountDetails,children:u.jsx(j,{message:"Account details"})}),s&&u.jsx(Nr,{icon:u.jsx(vz,{}),panel:e.SocialLogin,children:u.jsx(j,{message:"Social login"})}),u.jsx(Nr,{icon:u.jsx(xz,{}),panel:e.Password,children:u.jsx(j,{message:"Password"})}),u.jsx(Nr,{icon:u.jsx(bz,{}),panel:e.TwoFactor,children:u.jsx(j,{message:"Two factor authentication"})}),u.jsx(Nr,{icon:u.jsx(Sz,{}),panel:e.Sessions,children:u.jsx(j,{message:"Active sessions"})}),u.jsx(Nr,{icon:u.jsx(Bk,{}),panel:e.LocationAndLanguage,children:u.jsx(j,{message:"Location and language"})}),n!=null&&n.integrated&&t("api.access")?u.jsx(Nr,{icon:u.jsx(wz,{}),panel:e.Developers,children:u.jsx(j,{message:"Developers"})}):null,u.jsx(Nr,{icon:u.jsx(_z,{}),panel:e.DeleteAccount,children:u.jsx(j,{message:"Delete account"})})]})})}function Nr({children:e,icon:t,isLast:n,panel:r}){return u.jsx(yz,{startIcon:t,className:n?void 0:"mb-10",onSelected:()=>{const s=document.querySelector(`#${r}`);s&&s.scrollIntoView({behavior:"smooth",block:"start"})},children:e})}function Cz({user:e}){return u.jsxs(ps,{id:Jn.SocialLogin,title:u.jsx(j,{message:"Manage social login"}),children:[u.jsx(ku,{icon:u.jsx(mz,{viewBox:"0 0 50 50",className:"bg-envato"}),service:"envato",user:e}),u.jsx(ku,{icon:u.jsx(ok,{viewBox:"0 0 48 48"}),service:"google",user:e}),u.jsx(ku,{icon:u.jsx(ak,{className:"text-facebook"}),service:"facebook",user:e}),u.jsx(ku,{icon:u.jsx(lk,{className:"text-twitter"}),service:"twitter",user:e}),u.jsx("div",{className:"text-muted text-sm pt-16 pb-6",children:u.jsx(j,{message:"If you disable social logins, you'll still be able to log in using your email and password."})})]})}function ku({service:e,user:t,className:n,icon:r}){var l,c,d;const{social:s}=ce(),{connectSocial:i,disconnectSocial:o}=ik(),a=(c=(l=t==null?void 0:t.social_profiles)==null?void 0:l.find(f=>f.service_name===e))==null?void 0:c.username;return(d=s==null?void 0:s[e])!=null&&d.enable?u.jsxs("div",{className:D("flex items-center gap-14 px-10 py-20 border-b",n),children:[v.cloneElement(r,{size:"xl",className:D(r.props.className,"border p-8 rounded")}),u.jsxs("div",{className:"mr-auto whitespace-nowrap overflow-hidden text-ellipsis",children:[u.jsx("div",{className:"first-letter:capitalize text-sm font-bold overflow-hidden text-ellipsis",children:u.jsx(j,{message:":service account",values:{service:e}})}),u.jsx("div",{className:"text-xs mt-2",children:a||u.jsx(j,{message:"Disabled"})})]}),u.jsx(te,{disabled:o.isLoading,size:"xs",variant:"outline",color:a?"danger":"primary",onClick:async()=>{if(a)o.mutate({service:e},{onSuccess:()=>{ze.invalidateQueries(["users"]),de(ie("Disabled :service account",{values:{service:e}}))}});else{const f=await i(e);(f==null?void 0:f.status)==="SUCCESS"&&(ze.invalidateQueries(["users"]),de(ie("Enabled :service account",{values:{service:e}})))}},children:a?u.jsx(j,{message:"Disable"}):u.jsx(j,{message:"Enable"})})]}):null}function Zk(e){return me(t=>jz(t),{onSuccess:()=>{de(ie("Updated account details"))},onError:t=>yn(t,e)})}function jz(e){return Z.put("users/me",e).then(t=>t.data)}function kz({file:e,url:t},n){const r=new FormData;return e?r.set("file",e.native):r.set("url",t),Z.post(`users/${n.id}/avatar`,r,{headers:{"Content-Type":"multipart/form-data"}}).then(s=>s.data)}function Tz({user:e}){return me(t=>kz(t,e),{onSuccess:()=>{de(ie("Uploaded avatar"))},onError:t=>{const n=Zr(t,"file");n?de.danger(n):dt(t)}})}function Pz(e){return Z.delete(`users/${e.id}/avatar`).then(t=>t.data)}function Rz({user:e}){return me(()=>Pz(e),{onSuccess:()=>{de(ie("Removed avatar"))},onError:t=>dt(t)})}const Nz=new Set(["ENOTFOUND","ENETUNREACH","UNABLE_TO_GET_ISSUER_CERT","UNABLE_TO_GET_CRL","UNABLE_TO_DECRYPT_CERT_SIGNATURE","UNABLE_TO_DECRYPT_CRL_SIGNATURE","UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY","CERT_SIGNATURE_FAILURE","CRL_SIGNATURE_FAILURE","CERT_NOT_YET_VALID","CERT_HAS_EXPIRED","CRL_NOT_YET_VALID","CRL_HAS_EXPIRED","ERROR_IN_CERT_NOT_BEFORE_FIELD","ERROR_IN_CERT_NOT_AFTER_FIELD","ERROR_IN_CRL_LAST_UPDATE_FIELD","ERROR_IN_CRL_NEXT_UPDATE_FIELD","OUT_OF_MEM","DEPTH_ZERO_SELF_SIGNED_CERT","SELF_SIGNED_CERT_IN_CHAIN","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_CHAIN_TOO_LONG","CERT_REVOKED","INVALID_CA","PATH_LENGTH_EXCEEDED","INVALID_PURPOSE","CERT_UNTRUSTED","CERT_REJECTED","HOSTNAME_MISMATCH"]);var Oz=e=>!Nz.has(e&&e.code);const Az=Qn(Oz);function Zb(e,t,n,r,s,i,o){try{var a=e[i](o),l=a.value}catch(c){n(c);return}a.done?t(l):Promise.resolve(l).then(r,s)}function eT(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function o(l){Zb(i,r,s,o,a,"next",l)}function a(l){Zb(i,r,s,o,a,"throw",l)}o(void 0)})}}function ew(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function tw(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?ew(Object(n),!0).forEach(function(r){$z(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ew(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function $z(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ug="axios-retry";function tT(e){return!e.response&&!!e.code&&e.code!=="ECONNABORTED"&&Az(e)}var nT=["get","head","options"],Iz=nT.concat(["put","delete"]);function t0(e){return e.code!=="ECONNABORTED"&&(!e.response||e.response.status>=500&&e.response.status<=599)}function Dz(e){return e.config?t0(e)&&nT.indexOf(e.config.method)!==-1:!1}function rT(e){return e.config?t0(e)&&Iz.indexOf(e.config.method)!==-1:!1}function sT(e){return tT(e)||rT(e)}function Mz(){return 0}function Lz(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:100,n=Math.pow(2,e)*t,r=n*.2*Math.random();return n+r}function nw(e){var t=e[ug]||{};return t.retryCount=t.retryCount||0,e[ug]=t,t}function Fz(e,t){return tw(tw({},t),e[ug])}function Uz(e,t){e.defaults.agent===t.agent&&delete t.agent,e.defaults.httpAgent===t.httpAgent&&delete t.httpAgent,e.defaults.httpsAgent===t.httpsAgent&&delete t.httpsAgent}function zz(e,t,n,r){return cg.apply(this,arguments)}function cg(){return cg=eT(function*(e,t,n,r){var s=n.retryCount<e&&t(r);if(typeof s=="object")try{var i=yield s;return i!==!1}catch{return!1}return s}),cg.apply(this,arguments)}function ni(e,t){e.interceptors.request.use(n=>{var r=nw(n);return r.lastRequestTime=Date.now(),n}),e.interceptors.response.use(null,function(){var n=eT(function*(r){var{config:s}=r;if(!s)return Promise.reject(r);var{retries:i=3,retryCondition:o=sT,retryDelay:a=Mz,shouldResetTimeout:l=!1,onRetry:c=()=>{}}=Fz(s,t),d=nw(s);if(yield zz(i,o,d,r)){d.retryCount+=1;var f=a(d.retryCount,r);if(Uz(e,s),!l&&s.timeout&&d.lastRequestTime){var h=Date.now()-d.lastRequestTime,p=s.timeout-h-f;if(p<=0)return Promise.reject(r);s.timeout=p}return s.transformRequest=[g=>g],c(d.retryCount,r,s),new Promise(g=>setTimeout(()=>g(e(s)),f))}return Promise.reject(r)});return function(r){return n.apply(this,arguments)}}())}ni.isNetworkError=tT;ni.isSafeRequestError=Dz;ni.isIdempotentRequestError=rT;ni.isNetworkOrIdempotentRequestError=sT;ni.exponentialDelay=Lz;ni.isRetryableError=t0;const iT=1024*1024,Vz=20*iT,Bz=10,Hz=5;class Sf{constructor(t,n){ye(this,"abortController");ye(this,"chunks",[]);ye(this,"uploadId");ye(this,"fileKey");ye(this,"chunkAxios");ye(this,"abortedByUser",!1);ye(this,"uploadedParts");this.file=t,this.config=n,this.abortController=new AbortController,this.chunkAxios=Er.create(),ni(this.chunkAxios,{retries:3})}get storageKey(){return`s3-multipart::${this.file.fingerprint}`}async start(){var r,s,i,o,a;const t=Ev(this.storageKey);if(t&&await this.getUploadedParts(t),!((r=this.uploadedParts)!=null&&r.length)&&(await this.createMultipartUpload(),!this.uploadId))return;if(this.prepareChunks(),await this.uploadParts()==="done"){if(!await this.completeMultipartUpload())return;try{const c=await this.createFileEntry();if(c!=null&&c.fileEntry){(i=(s=this.config).onSuccess)==null||i.call(s,c==null?void 0:c.fileEntry,this.file),Rh(this.storageKey);return}}catch{}}this.abortController.signal.aborted||this.abortController.abort(),this.abortedByUser||(a=(o=this.config).onError)==null||a.call(o,null,this.file)}async abort(){this.abortedByUser=!0,this.abortController.abort(),await this.abortUploadOnS3()}async uploadParts(){const t=this.chunks.filter(r=>!r.done);if(!t.length)return Promise.resolve("done");const n=await this.batchSignUrls(t.slice(0,Bz));if(n){for(;n.length;){const s=n.splice(0,Hz).map(o=>this.uploadPartToS3(o));if(!(await Promise.all(s)).every(o=>o))return}return await this.uploadParts()}}async batchSignUrls(t){const n=await this.chunkAxios.post("api/v1/s3/multipart/batch-sign-part-urls",{partNumbers:t.map(r=>r.partNumber),uploadId:this.uploadId,key:this.fileKey},{signal:this.abortController.signal}).then(r=>r.data).catch(r=>{this.abortController.signal.aborted||this.abortController.abort()});return n==null?void 0:n.urls}async uploadPartToS3({url:t,partNumber:n}){const r=this.chunks.find(s=>s.partNumber===n);if(r)return this.chunkAxios.put(t,r.blob,{withCredentials:!1,signal:this.abortController.signal,onUploadProgress:s=>{var o,a;if(!s.event.lengthComputable)return;r.bytesUploaded=s.loaded;const i=this.chunks.reduce((l,c)=>l+c.bytesUploaded,0);(a=(o=this.config).onProgress)==null||a.call(o,{bytesUploaded:i,bytesTotal:this.file.size})}}).then(s=>{const i=s.headers.etag;if(i)return r.done=!0,r.etag=i,!0}).catch(s=>{!this.abortController.signal.aborted&&s!==void 0&&this.abortController.abort()})}async createMultipartUpload(){const t=await Z.post("s3/multipart/create",{filename:this.file.name,mime:this.file.mime,size:this.file.size,extension:this.file.extension,...this.config.metadata}).then(n=>n.data).catch(n=>{var r,s;n.code!=="ERR_CANCELED"&&((s=(r=this.config).onError)==null||s.call(r,Zr(n),this.file))});t&&(this.uploadId=t.uploadId,this.fileKey=t.key,Cv(this.storageKey,{createdAt:new Date().toISOString(),fileKey:this.fileKey,uploadId:this.uploadId}))}async getUploadedParts({fileKey:t,uploadId:n}){var s;const r=await Z.post("s3/multipart/get-uploaded-parts",{key:t,uploadId:n}).then(i=>i.data).catch(()=>(Rh(this.storageKey),null));(s=r==null?void 0:r.parts)!=null&&s.length&&(this.uploadedParts=r.parts,this.uploadId=n,this.fileKey=t)}async completeMultipartUpload(){return Z.post("s3/multipart/complete",{key:this.fileKey,uploadId:this.uploadId,parts:this.chunks.map(t=>({ETag:t.etag,PartNumber:t.partNumber}))}).then(t=>t.data).catch(()=>{var t,n;(n=(t=this.config).onError)==null||n.call(t,null,this.file),this.abortUploadOnS3()}).finally(()=>{Rh(this.storageKey)})}async createFileEntry(){return await Z.post("s3/entries",{...this.config.metadata,clientMime:this.file.mime,clientName:this.file.name,filename:this.fileKey.split("/").pop(),size:this.file.size,clientExtension:this.file.extension}).then(t=>t.data).catch()}prepareChunks(){var r;this.chunks=[];const t=Math.max(5*iT,Math.ceil(this.file.size/1e4)),n=Math.max(Vz,t);if(this.file.size===0)this.chunks.push({blob:this.file.native,done:!1,partNumber:1,bytesUploaded:0});else{let s=1;for(let i=0;i<this.file.size;i+=n){const o=Math.min(this.file.size,i+n),a=(r=this.uploadedParts)==null?void 0:r.find(l=>l.PartNumber===s);this.chunks.push({blob:this.file.native.slice(i,o),done:!!a,partNumber:s,etag:a?a.ETag:void 0,bytesUploaded:a!=null&&a.Size?parseInt(a==null?void 0:a.Size):0}),s++}}}abortUploadOnS3(){return Z.post("s3/multipart/abort",{key:this.fileKey,uploadId:this.uploadId})}static async create(t,n){return new Sf(t,n)}}const oT="3.7.5",qz=oT,Wz=typeof atob=="function",Kz=typeof btoa=="function",zo=typeof Buffer=="function",rw=typeof TextDecoder=="function"?new TextDecoder:void 0,sw=typeof TextEncoder=="function"?new TextEncoder:void 0,Qz="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",ca=Array.prototype.slice.call(Qz),Tu=(e=>{let t={};return e.forEach((n,r)=>t[n]=r),t})(ca),Gz=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,at=String.fromCharCode.bind(String),iw=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),aT=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),lT=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),uT=e=>{let t,n,r,s,i="";const o=e.length%3;for(let a=0;a<e.length;){if((n=e.charCodeAt(a++))>255||(r=e.charCodeAt(a++))>255||(s=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|s,i+=ca[t>>18&63]+ca[t>>12&63]+ca[t>>6&63]+ca[t&63]}return o?i.slice(0,o-3)+"===".substring(o):i},n0=Kz?e=>btoa(e):zo?e=>Buffer.from(e,"binary").toString("base64"):uT,dg=zo?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let r=0,s=e.length;r<s;r+=4096)n.push(at.apply(null,e.subarray(r,r+4096)));return n0(n.join(""))},tc=(e,t=!1)=>t?aT(dg(e)):dg(e),Yz=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?at(192|t>>>6)+at(128|t&63):at(224|t>>>12&15)+at(128|t>>>6&63)+at(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return at(240|t>>>18&7)+at(128|t>>>12&63)+at(128|t>>>6&63)+at(128|t&63)}},Xz=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,cT=e=>e.replace(Xz,Yz),ow=zo?e=>Buffer.from(e,"utf8").toString("base64"):sw?e=>dg(sw.encode(e)):e=>n0(cT(e)),Wi=(e,t=!1)=>t?aT(ow(e)):ow(e),aw=e=>Wi(e,!0),Jz=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Zz=e=>{switch(e.length){case 4:var t=(7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3),n=t-65536;return at((n>>>10)+55296)+at((n&1023)+56320);case 3:return at((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return at((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},dT=e=>e.replace(Jz,Zz),fT=e=>{if(e=e.replace(/\s+/g,""),!Gz.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,n="",r,s;for(let i=0;i<e.length;)t=Tu[e.charAt(i++)]<<18|Tu[e.charAt(i++)]<<12|(r=Tu[e.charAt(i++)])<<6|(s=Tu[e.charAt(i++)]),n+=r===64?at(t>>16&255):s===64?at(t>>16&255,t>>8&255):at(t>>16&255,t>>8&255,t&255);return n},r0=Wz?e=>atob(lT(e)):zo?e=>Buffer.from(e,"base64").toString("binary"):fT,hT=zo?e=>iw(Buffer.from(e,"base64")):e=>iw(r0(e).split("").map(t=>t.charCodeAt(0))),pT=e=>hT(mT(e)),eV=zo?e=>Buffer.from(e,"base64").toString("utf8"):rw?e=>rw.decode(hT(e)):e=>dT(r0(e)),mT=e=>lT(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),fg=e=>eV(mT(e)),tV=e=>{if(typeof e!="string")return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},gT=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),yT=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,gT(n));e("fromBase64",function(){return fg(this)}),e("toBase64",function(t){return Wi(this,t)}),e("toBase64URI",function(){return Wi(this,!0)}),e("toBase64URL",function(){return Wi(this,!0)}),e("toUint8Array",function(){return pT(this)})},vT=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,gT(n));e("toBase64",function(t){return tc(this,t)}),e("toBase64URI",function(){return tc(this,!0)}),e("toBase64URL",function(){return tc(this,!0)})},nV=()=>{yT(),vT()},rV={version:oT,VERSION:qz,atob:r0,atobPolyfill:fT,btoa:n0,btoaPolyfill:uT,fromBase64:fg,toBase64:Wi,encode:Wi,encodeURI:aw,encodeURL:aw,utob:cT,btou:dT,decode:fg,isValid:tV,fromUint8Array:tc,toUint8Array:pT,extendString:yT,extendUint8Array:vT,extendBuiltins:nV};var sV=function(t,n){if(n=n.split(":")[0],t=+t,!t)return!1;switch(n){case"http":case"ws":return t!==80;case"https":case"wss":return t!==443;case"ftp":return t!==21;case"gopher":return t!==70;case"file":return!1}return t!==0},s0={},iV=Object.prototype.hasOwnProperty,oV;function lw(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function uw(e){try{return encodeURIComponent(e)}catch{return null}}function aV(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var s=lw(r[1]),i=lw(r[2]);s===null||i===null||s in n||(n[s]=i)}return n}function lV(e,t){t=t||"";var n=[],r,s;typeof t!="string"&&(t="?");for(s in e)if(iV.call(e,s)){if(r=e[s],!r&&(r===null||r===oV||isNaN(r))&&(r=""),s=uw(s),r=uw(r),s===null||r===null)continue;n.push(s+"="+r)}return n.length?t+n.join("&"):""}s0.stringify=lV;s0.parse=aV;var xT=sV,Ef=s0,uV=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,bT=/[\n\r\t]/g,cV=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,wT=/:\d+$/,dV=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,fV=/^[a-zA-Z]:/;function i0(e){return(e||"").toString().replace(uV,"")}var hg=[["#","hash"],["?","query"],function(t,n){return qn(n.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],cw={hash:1,query:1};function _T(e){var t;typeof window<"u"?t=window:typeof rc<"u"?t=rc:typeof self<"u"?t=self:t={};var n=t.location||{};e=e||n;var r={},s=typeof e,i;if(e.protocol==="blob:")r=new Kn(unescape(e.pathname),{});else if(s==="string"){r=new Kn(e,{});for(i in cw)delete r[i]}else if(s==="object"){for(i in e)i in cw||(r[i]=e[i]);r.slashes===void 0&&(r.slashes=cV.test(e.href))}return r}function qn(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function ST(e,t){e=i0(e),e=e.replace(bT,""),t=t||{};var n=dV.exec(e),r=n[1]?n[1].toLowerCase():"",s=!!n[2],i=!!n[3],o=0,a;return s?i?(a=n[2]+n[3]+n[4],o=n[2].length+n[3].length):(a=n[2]+n[4],o=n[2].length):i?(a=n[3]+n[4],o=n[3].length):a=n[4],r==="file:"?o>=2&&(a=a.slice(2)):qn(r)?a=n[4]:r?s&&(a=a.slice(2)):o>=2&&qn(t.protocol)&&(a=n[4]),{protocol:r,slashes:s||qn(r),slashesCount:o,rest:a}}function hV(e,t){if(e==="")return t;for(var n=(t||"/").split("/").slice(0,-1).concat(e.split("/")),r=n.length,s=n[r-1],i=!1,o=0;r--;)n[r]==="."?n.splice(r,1):n[r]===".."?(n.splice(r,1),o++):o&&(r===0&&(i=!0),n.splice(r,1),o--);return i&&n.unshift(""),(s==="."||s==="..")&&n.push(""),n.join("/")}function Kn(e,t,n){if(e=i0(e),e=e.replace(bT,""),!(this instanceof Kn))return new Kn(e,t,n);var r,s,i,o,a,l,c=hg.slice(),d=typeof t,f=this,h=0;for(d!=="object"&&d!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=Ef.parse),t=_T(t),s=ST(e||"",t),r=!s.protocol&&!s.slashes,f.slashes=s.slashes||r&&t.slashes,f.protocol=s.protocol||t.protocol||"",e=s.rest,(s.protocol==="file:"&&(s.slashesCount!==2||fV.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!qn(f.protocol)))&&(c[3]=[/(.*)/,"pathname"]);h<c.length;h++){if(o=c[h],typeof o=="function"){e=o(e,f);continue}i=o[0],l=o[1],i!==i?f[l]=e:typeof i=="string"?(a=i==="@"?e.lastIndexOf(i):e.indexOf(i),~a&&(typeof o[2]=="number"?(f[l]=e.slice(0,a),e=e.slice(a+o[2])):(f[l]=e.slice(a),e=e.slice(0,a)))):(a=i.exec(e))&&(f[l]=a[1],e=e.slice(0,a.index)),f[l]=f[l]||r&&o[3]&&t[l]||"",o[4]&&(f[l]=f[l].toLowerCase())}n&&(f.query=n(f.query)),r&&t.slashes&&f.pathname.charAt(0)!=="/"&&(f.pathname!==""||t.pathname!=="")&&(f.pathname=hV(f.pathname,t.pathname)),f.pathname.charAt(0)!=="/"&&qn(f.protocol)&&(f.pathname="/"+f.pathname),xT(f.port,f.protocol)||(f.host=f.hostname,f.port=""),f.username=f.password="",f.auth&&(a=f.auth.indexOf(":"),~a?(f.username=f.auth.slice(0,a),f.username=encodeURIComponent(decodeURIComponent(f.username)),f.password=f.auth.slice(a+1),f.password=encodeURIComponent(decodeURIComponent(f.password))):f.username=encodeURIComponent(decodeURIComponent(f.auth)),f.auth=f.password?f.username+":"+f.password:f.username),f.origin=f.protocol!=="file:"&&qn(f.protocol)&&f.host?f.protocol+"//"+f.host:"null",f.href=f.toString()}function pV(e,t,n){var r=this;switch(e){case"query":typeof t=="string"&&t.length&&(t=(n||Ef.parse)(t)),r[e]=t;break;case"port":r[e]=t,xT(t,r.protocol)?t&&(r.host=r.hostname+":"+t):(r.host=r.hostname,r[e]="");break;case"hostname":r[e]=t,r.port&&(t+=":"+r.port),r.host=t;break;case"host":r[e]=t,wT.test(t)?(t=t.split(":"),r.port=t.pop(),r.hostname=t.join(":")):(r.hostname=t,r.port="");break;case"protocol":r.protocol=t.toLowerCase(),r.slashes=!n;break;case"pathname":case"hash":if(t){var s=e==="pathname"?"/":"#";r[e]=t.charAt(0)!==s?s+t:t}else r[e]=t;break;case"username":case"password":r[e]=encodeURIComponent(t);break;case"auth":var i=t.indexOf(":");~i?(r.username=t.slice(0,i),r.username=encodeURIComponent(decodeURIComponent(r.username)),r.password=t.slice(i+1),r.password=encodeURIComponent(decodeURIComponent(r.password))):r.username=encodeURIComponent(decodeURIComponent(t))}for(var o=0;o<hg.length;o++){var a=hg[o];a[4]&&(r[a[1]]=r[a[1]].toLowerCase())}return r.auth=r.password?r.username+":"+r.password:r.username,r.origin=r.protocol!=="file:"&&qn(r.protocol)&&r.host?r.protocol+"//"+r.host:"null",r.href=r.toString(),r}function mV(e){(!e||typeof e!="function")&&(e=Ef.stringify);var t,n=this,r=n.host,s=n.protocol;s&&s.charAt(s.length-1)!==":"&&(s+=":");var i=s+(n.protocol&&n.slashes||qn(n.protocol)?"//":"");return n.username?(i+=n.username,n.password&&(i+=":"+n.password),i+="@"):n.password?(i+=":"+n.password,i+="@"):n.protocol!=="file:"&&qn(n.protocol)&&!r&&n.pathname!=="/"&&(i+="@"),(r[r.length-1]===":"||wT.test(n.hostname)&&!n.port)&&(r+=":"),i+=r+n.pathname,t=typeof n.query=="object"?e(n.query):n.query,t&&(i+=t.charAt(0)!=="?"?"?"+t:t),n.hash&&(i+=n.hash),i}Kn.prototype={set:pV,toString:mV};Kn.extractProtocol=ST;Kn.location=_T;Kn.trimLeft=i0;Kn.qs=Ef;var gV=Kn;const yV=Qn(gV);function pg(e){"@babel/helpers - typeof";return pg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pg(e)}function dw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function vV(e,t,n){return t&&dw(e.prototype,t),n&&dw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function xV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bV(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&cl(e,t)}function wV(e){var t=ET();return function(){var r=dl(e),s;if(t){var i=dl(this).constructor;s=Reflect.construct(r,arguments,i)}else s=r.apply(this,arguments);return _V(this,s)}}function _V(e,t){if(t&&(pg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return SV(e)}function SV(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function mg(e){var t=typeof Map=="function"?new Map:void 0;return mg=function(r){if(r===null||!EV(r))return r;if(typeof r!="function")throw new TypeError("Super expression must either be null or a function");if(typeof t<"u"){if(t.has(r))return t.get(r);t.set(r,s)}function s(){return nc(r,arguments,dl(this).constructor)}return s.prototype=Object.create(r.prototype,{constructor:{value:s,enumerable:!1,writable:!0,configurable:!0}}),cl(s,r)},mg(e)}function nc(e,t,n){return ET()?nc=Reflect.construct.bind():nc=function(s,i,o){var a=[null];a.push.apply(a,i);var l=Function.bind.apply(s,a),c=new l;return o&&cl(c,o.prototype),c},nc.apply(null,arguments)}function ET(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function EV(e){return Function.toString.call(e).indexOf("[native code]")!==-1}function cl(e,t){return cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},cl(e,t)}function dl(e){return dl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},dl(e)}var Pu=function(e){bV(n,e);var t=wV(n);function n(r){var s,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;if(xV(this,n),s=t.call(this,r),s.originalRequest=o,s.originalResponse=a,s.causingError=i,i!=null&&(r+=", caused by ".concat(i.toString())),o!=null){var l=o.getHeader("X-Request-ID")||"n/a",c=o.getMethod(),d=o.getURL(),f=a?a.getStatus():"n/a",h=a?a.getBody()||"":"n/a";r+=", originated from request (method: ".concat(c,", url: ").concat(d,", response code: ").concat(f,", response text: ").concat(h,", request id: ").concat(l,")")}return s.message=r,s}return vV(n)}(mg(Error));function CV(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=Math.random()*16|0,n=e==="x"?t:t&3|8;return n.toString(16)})}function CT(e,t){return PV(e)||TV(e,t)||kV(e,t)||jV()}function jV(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function kV(e,t){if(e){if(typeof e=="string")return fw(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);if(n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set")return Array.from(e);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fw(e,t)}}function fw(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function TV(e,t){var n=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r=[],s=!0,i=!1,o,a;try{for(n=n.call(e);!(s=(o=n.next()).done)&&(r.push(o.value),!(t&&r.length===t));s=!0);}catch(l){i=!0,a=l}finally{try{!s&&n.return!=null&&n.return()}finally{if(i)throw a}}return r}}function PV(e){if(Array.isArray(e))return e}function hw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function li(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?hw(Object(n),!0).forEach(function(r){RV(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):hw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function RV(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function OV(e,t,n){return t&&pw(e.prototype,t),n&&pw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var AV={endpoint:null,uploadUrl:null,metadata:{},fingerprint:null,uploadSize:null,onProgress:null,onChunkComplete:null,onSuccess:null,onError:null,onUploadUrlAvailable:null,overridePatchMethod:!1,headers:{},addRequestId:!1,onBeforeRequest:null,onAfterResponse:null,onShouldRetry:null,chunkSize:1/0,retryDelays:[0,1e3,3e3,5e3],parallelUploads:1,parallelUploadBoundaries:null,storeFingerprintForResuming:!0,removeFingerprintOnSuccess:!1,uploadLengthDeferred:!1,uploadDataDuringCreation:!1,urlStorage:null,fileReader:null,httpStack:null},fd=function(){function e(t,n){NV(this,e),"resume"in n&&console.log("tus: The `resume` option has been removed in tus-js-client v2. Please use the URL storage API instead."),this.options=n,this.options.chunkSize=Number(this.options.chunkSize),this._urlStorage=this.options.urlStorage,this.file=t,this.url=null,this._req=null,this._fingerprint=null,this._urlStorageKey=null,this._offset=null,this._aborted=!1,this._size=null,this._source=null,this._retryAttempt=0,this._retryTimeout=null,this._offsetBeforeRetry=0,this._parallelUploads=null,this._parallelUploadUrls=null}return OV(e,[{key:"findPreviousUploads",value:function(){var n=this;return this.options.fingerprint(this.file,this.options).then(function(r){return n._urlStorage.findUploadsByFingerprint(r)})}},{key:"resumeFromPreviousUpload",value:function(n){this.url=n.uploadUrl||null,this._parallelUploadUrls=n.parallelUploadUrls||null,this._urlStorageKey=n.urlStorageKey}},{key:"start",value:function(){var n=this,r=this.file;if(!r){this._emitError(new Error("tus: no file or stream to upload provided"));return}if(!this.options.endpoint&&!this.options.uploadUrl&&!this.url){this._emitError(new Error("tus: neither an endpoint or an upload URL is provided"));return}var s=this.options.retryDelays;if(s!=null&&Object.prototype.toString.call(s)!=="[object Array]"){this._emitError(new Error("tus: the `retryDelays` option must either be an array or null"));return}if(this.options.parallelUploads>1)for(var i=0,o=["uploadUrl","uploadSize","uploadLengthDeferred"];i<o.length;i++){var a=o[i];if(this.options[a]){this._emitError(new Error("tus: cannot use the ".concat(a," option when parallelUploads is enabled")));return}}if(this.options.parallelUploadBoundaries){if(this.options.parallelUploads<=1){this._emitError(new Error("tus: cannot use the `parallelUploadBoundaries` option when `parallelUploads` is disabled"));return}if(this.options.parallelUploads!==this.options.parallelUploadBoundaries.length){this._emitError(new Error("tus: the `parallelUploadBoundaries` must have the same length as the value of `parallelUploads`"));return}}this.options.fingerprint(r,this.options).then(function(l){return n._fingerprint=l,n._source?n._source:n.options.fileReader.openFile(r,n.options.chunkSize)}).then(function(l){if(n._source=l,n.options.uploadLengthDeferred)n._size=null;else if(n.options.uploadSize!=null){if(n._size=Number(n.options.uploadSize),Number.isNaN(n._size)){n._emitError(new Error("tus: cannot convert `uploadSize` option into a number"));return}}else if(n._size=n._source.size,n._size==null){n._emitError(new Error("tus: cannot automatically derive upload's size from input. Specify it manually using the `uploadSize` option or use the `uploadLengthDeferred` option"));return}n.options.parallelUploads>1||n._parallelUploadUrls!=null?n._startParallelUpload():n._startSingleUpload()}).catch(function(l){n._emitError(l)})}},{key:"_startParallelUpload",value:function(){var n,r=this,s=this._size,i=0;this._parallelUploads=[];var o=this._parallelUploadUrls!=null?this._parallelUploadUrls.length:this.options.parallelUploads,a=(n=this.options.parallelUploadBoundaries)!==null&&n!==void 0?n:IV(this._source.size,o);this._parallelUploadUrls&&a.forEach(function(d,f){d.uploadUrl=r._parallelUploadUrls[f]||null}),this._parallelUploadUrls=new Array(a.length);var l=a.map(function(d,f){var h=0;return r._source.slice(d.start,d.end).then(function(p){var g=p.value;return new Promise(function(b,w){var y=li(li({},r.options),{},{uploadUrl:d.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:{},headers:li(li({},r.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:b,onError:w,onProgress:function(_){i=i-h+_,h=_,r._emitProgress(i,s)},onUploadUrlAvailable:function(){r._parallelUploadUrls[f]=m.url,r._parallelUploadUrls.filter(function(_){return!!_}).length===a.length&&r._saveUploadInUrlStorage()}}),m=new e(g,y);m.start(),r._parallelUploads.push(m)})})}),c;Promise.all(l).then(function(){c=r._openRequest("POST",r.options.endpoint),c.setHeader("Upload-Concat","final;".concat(r._parallelUploadUrls.join(" ")));var d=mw(r.options.metadata);return d!==""&&c.setHeader("Upload-Metadata",d),r._sendRequest(c,null)}).then(function(d){if(!di(d.getStatus(),200)){r._emitHttpError(c,d,"tus: unexpected response while creating upload");return}var f=d.getHeader("Location");if(f==null){r._emitHttpError(c,d,"tus: invalid or missing Location header");return}r.url=xw(r.options.endpoint,f),"Created upload at ".concat(r.url),r._emitSuccess()}).catch(function(d){r._emitError(d)})}},{key:"_startSingleUpload",value:function(){if(this._aborted=!1,this.url!=null){"Resuming upload from previous URL: ".concat(this.url),this._resumeUpload();return}if(this.options.uploadUrl!=null){"Resuming upload from provided URL: ".concat(this.options.uploadUrl),this.url=this.options.uploadUrl,this._resumeUpload();return}this._createUpload()}},{key:"abort",value:function(n){var r=this;return this._parallelUploads!=null&&this._parallelUploads.forEach(function(s){s.abort(n)}),this._req!==null&&this._req.abort(),this._aborted=!0,this._retryTimeout!=null&&(clearTimeout(this._retryTimeout),this._retryTimeout=null),!n||this.url==null?Promise.resolve():e.terminate(this.url,this.options).then(function(){return r._removeFromUrlStorage()})}},{key:"_emitHttpError",value:function(n,r,s,i){this._emitError(new Pu(s,i,n,r))}},{key:"_emitError",value:function(n){var r=this;if(!this._aborted){if(this.options.retryDelays!=null){var s=this._offset!=null&&this._offset>this._offsetBeforeRetry;if(s&&(this._retryAttempt=0),vw(n,this._retryAttempt,this.options)){var i=this.options.retryDelays[this._retryAttempt++];this._offsetBeforeRetry=this._offset,this._retryTimeout=setTimeout(function(){r.start()},i);return}}if(typeof this.options.onError=="function")this.options.onError(n);else throw n}}},{key:"_emitSuccess",value:function(){this.options.removeFingerprintOnSuccess&&this._removeFromUrlStorage(),typeof this.options.onSuccess=="function"&&this.options.onSuccess()}},{key:"_emitProgress",value:function(n,r){typeof this.options.onProgress=="function"&&this.options.onProgress(n,r)}},{key:"_emitChunkComplete",value:function(n,r,s){typeof this.options.onChunkComplete=="function"&&this.options.onChunkComplete(n,r,s)}},{key:"_createUpload",value:function(){var n=this;if(!this.options.endpoint){this._emitError(new Error("tus: unable to create upload because no endpoint is provided"));return}var r=this._openRequest("POST",this.options.endpoint);this.options.uploadLengthDeferred?r.setHeader("Upload-Defer-Length",1):r.setHeader("Upload-Length",this._size);var s=mw(this.options.metadata);s!==""&&r.setHeader("Upload-Metadata",s);var i;this.options.uploadDataDuringCreation&&!this.options.uploadLengthDeferred?(this._offset=0,i=this._addChunkToRequest(r)):i=this._sendRequest(r,null),i.then(function(o){if(!di(o.getStatus(),200)){n._emitHttpError(r,o,"tus: unexpected response while creating upload");return}var a=o.getHeader("Location");if(a==null){n._emitHttpError(r,o,"tus: invalid or missing Location header");return}if(n.url=xw(n.options.endpoint,a),"Created upload at ".concat(n.url),typeof n.options.onUploadUrlAvailable=="function"&&n.options.onUploadUrlAvailable(),n._size===0){n._emitSuccess(),n._source.close();return}n._saveUploadInUrlStorage().then(function(){n.options.uploadDataDuringCreation?n._handleUploadResponse(r,o):(n._offset=0,n._performUpload())})}).catch(function(o){n._emitHttpError(r,null,"tus: failed to create upload",o)})}},{key:"_resumeUpload",value:function(){var n=this,r=this._openRequest("HEAD",this.url),s=this._sendRequest(r,null);s.then(function(i){var o=i.getStatus();if(!di(o,200)){if(o===423){n._emitHttpError(r,i,"tus: upload is currently locked; retry later");return}if(di(o,400)&&n._removeFromUrlStorage(),!n.options.endpoint){n._emitHttpError(r,i,"tus: unable to resume upload (new upload cannot be created without an endpoint)");return}n.url=null,n._createUpload();return}var a=parseInt(i.getHeader("Upload-Offset"),10);if(Number.isNaN(a)){n._emitHttpError(r,i,"tus: invalid or missing offset value");return}var l=parseInt(i.getHeader("Upload-Length"),10);if(Number.isNaN(l)&&!n.options.uploadLengthDeferred){n._emitHttpError(r,i,"tus: invalid or missing length value");return}typeof n.options.onUploadUrlAvailable=="function"&&n.options.onUploadUrlAvailable(),n._saveUploadInUrlStorage().then(function(){if(a===l){n._emitProgress(l,l),n._emitSuccess();return}n._offset=a,n._performUpload()})}).catch(function(i){n._emitHttpError(r,null,"tus: failed to resume upload",i)})}},{key:"_performUpload",value:function(){var n=this;if(!this._aborted){var r;this.options.overridePatchMethod?(r=this._openRequest("POST",this.url),r.setHeader("X-HTTP-Method-Override","PATCH")):r=this._openRequest("PATCH",this.url),r.setHeader("Upload-Offset",this._offset);var s=this._addChunkToRequest(r);s.then(function(i){if(!di(i.getStatus(),200)){n._emitHttpError(r,i,"tus: unexpected response while uploading chunk");return}n._handleUploadResponse(r,i)}).catch(function(i){n._aborted||n._emitHttpError(r,null,"tus: failed to upload chunk at offset ".concat(n._offset),i)})}}},{key:"_addChunkToRequest",value:function(n){var r=this,s=this._offset,i=this._offset+this.options.chunkSize;return n.setProgressHandler(function(o){r._emitProgress(s+o,r._size)}),n.setHeader("Content-Type","application/offset+octet-stream"),(i===1/0||i>this._size)&&!this.options.uploadLengthDeferred&&(i=this._size),this._source.slice(s,i).then(function(o){var a=o.value,l=o.done;return r.options.uploadLengthDeferred&&l&&(r._size=r._offset+(a&&a.size?a.size:0),n.setHeader("Upload-Length",r._size)),a===null?r._sendRequest(n):(r._emitProgress(r._offset,r._size),r._sendRequest(n,a))})}},{key:"_handleUploadResponse",value:function(n,r){var s=parseInt(r.getHeader("Upload-Offset"),10);if(Number.isNaN(s)){this._emitHttpError(n,r,"tus: invalid or missing offset value");return}if(this._emitProgress(s,this._size),this._emitChunkComplete(s-this._offset,s,this._size),this._offset=s,s===this._size){this._emitSuccess(),this._source.close();return}this._performUpload()}},{key:"_openRequest",value:function(n,r){var s=gw(n,r,this.options);return this._req=s,s}},{key:"_removeFromUrlStorage",value:function(){var n=this;this._urlStorageKey&&(this._urlStorage.removeUpload(this._urlStorageKey).catch(function(r){n._emitError(r)}),this._urlStorageKey=null)}},{key:"_saveUploadInUrlStorage",value:function(){var n=this;if(!this.options.storeFingerprintForResuming||!this._fingerprint||this._urlStorageKey!==null)return Promise.resolve();var r={size:this._size,metadata:this.options.metadata,creationTime:new Date().toString()};return this._parallelUploads?r.parallelUploadUrls=this._parallelUploadUrls:r.uploadUrl=this.url,this._urlStorage.addUpload(this._fingerprint,r).then(function(s){n._urlStorageKey=s})}},{key:"_sendRequest",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return yw(n,r,this.options)}}],[{key:"terminate",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=gw("DELETE",n,r);return yw(s,null,r).then(function(i){if(i.getStatus()!==204)throw new Pu("tus: unexpected response while terminating upload",null,s,i)}).catch(function(i){if(i instanceof Pu||(i=new Pu("tus: failed to terminate upload",i,s,null)),!vw(i,0,r))throw i;var o=r.retryDelays[0],a=r.retryDelays.slice(1),l=li(li({},r),{},{retryDelays:a});return new Promise(function(c){return setTimeout(c,o)}).then(function(){return e.terminate(n,l)})})}}]),e}();function mw(e){return Object.entries(e).map(function(t){var n=CT(t,2),r=n[0],s=n[1];return"".concat(r," ").concat(rV.encode(String(s)))}).join(",")}function di(e,t){return e>=t&&e<t+100}function gw(e,t,n){var r=n.httpStack.createRequest(e,t);r.setHeader("Tus-Resumable","1.0.0");var s=n.headers||{};if(Object.entries(s).forEach(function(o){var a=CT(o,2),l=a[0],c=a[1];r.setHeader(l,c)}),n.addRequestId){var i=CV();r.setHeader("X-Request-ID",i)}return r}function yw(e,t,n){var r=typeof n.onBeforeRequest=="function"?Promise.resolve(n.onBeforeRequest(e)):Promise.resolve();return r.then(function(){return e.send(t).then(function(s){var i=typeof n.onAfterResponse=="function"?Promise.resolve(n.onAfterResponse(e,s)):Promise.resolve();return i.then(function(){return s})})})}function $V(){var e=!0;return typeof window<"u"&&"navigator"in window&&window.navigator.onLine===!1&&(e=!1),e}function vw(e,t,n){if(n.retryDelays==null||t>=n.retryDelays.length||e.originalRequest==null)return!1;if(n&&typeof n.onShouldRetry=="function")return n.onShouldRetry(e,t,n);var r=e.originalResponse?e.originalResponse.getStatus():0;return(!di(r,400)||r===409||r===423)&&$V()}function xw(e,t){return new yV(t,e).toString()}function IV(e,t){for(var n=Math.floor(e/t),r=[],s=0;s<t;s++)r.push({start:n*s,end:n*(s+1)});return r[t-1].end=e,r}fd.defaultOptions=AV;function DV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function bw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function MV(e,t,n){return t&&bw(e.prototype,t),n&&bw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var LV=function(){function e(){DV(this,e)}return MV(e,[{key:"listAllUploads",value:function(){return Promise.resolve([])}},{key:"findUploadsByFingerprint",value:function(n){return Promise.resolve([])}},{key:"removeUpload",value:function(n){return Promise.resolve()}},{key:"addUpload",value:function(n,r){return Promise.resolve(null)}}]),e}();function FV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ww(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function UV(e,t,n){return t&&ww(e.prototype,t),n&&ww(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var gg=!1;try{gg="localStorage"in window;var Zh="tusSupport",_w=localStorage.getItem(Zh);localStorage.setItem(Zh,_w),_w===null&&localStorage.removeItem(Zh)}catch(e){if(e.code===e.SECURITY_ERR||e.code===e.QUOTA_EXCEEDED_ERR)gg=!1;else throw e}var zV=gg,VV=function(){function e(){FV(this,e)}return UV(e,[{key:"findAllUploads",value:function(){var n=this._findEntries("tus::");return Promise.resolve(n)}},{key:"findUploadsByFingerprint",value:function(n){var r=this._findEntries("tus::".concat(n,"::"));return Promise.resolve(r)}},{key:"removeUpload",value:function(n){return localStorage.removeItem(n),Promise.resolve()}},{key:"addUpload",value:function(n,r){var s=Math.round(Math.random()*1e12),i="tus::".concat(n,"::").concat(s);return localStorage.setItem(i,JSON.stringify(r)),Promise.resolve(i)}},{key:"_findEntries",value:function(n){for(var r=[],s=0;s<localStorage.length;s++){var i=localStorage.key(s);if(i.indexOf(n)===0)try{var o=JSON.parse(localStorage.getItem(i));o.urlStorageKey=i,r.push(o)}catch{}}return r}}]),e}();function o0(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Sw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function a0(e,t,n){return t&&Sw(e.prototype,t),n&&Sw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var BV=function(){function e(){o0(this,e)}return a0(e,[{key:"createRequest",value:function(n,r){return new HV(n,r)}},{key:"getName",value:function(){return"XHRHttpStack"}}]),e}(),HV=function(){function e(t,n){o0(this,e),this._xhr=new XMLHttpRequest,this._xhr.open(t,n,!0),this._method=t,this._url=n,this._headers={}}return a0(e,[{key:"getMethod",value:function(){return this._method}},{key:"getURL",value:function(){return this._url}},{key:"setHeader",value:function(n,r){this._xhr.setRequestHeader(n,r),this._headers[n]=r}},{key:"getHeader",value:function(n){return this._headers[n]}},{key:"setProgressHandler",value:function(n){"upload"in this._xhr&&(this._xhr.upload.onprogress=function(r){r.lengthComputable&&n(r.loaded)})}},{key:"send",value:function(){var n=this,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null;return new Promise(function(s,i){n._xhr.onload=function(){s(new qV(n._xhr))},n._xhr.onerror=function(o){i(o)},n._xhr.send(r)})}},{key:"abort",value:function(){return this._xhr.abort(),Promise.resolve()}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}(),qV=function(){function e(t){o0(this,e),this._xhr=t}return a0(e,[{key:"getStatus",value:function(){return this._xhr.status}},{key:"getHeader",value:function(n){return this._xhr.getResponseHeader(n)}},{key:"getBody",value:function(){return this._xhr.responseText}},{key:"getUnderlyingObject",value:function(){return this._xhr}}]),e}(),jT=function(){return typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative"};function WV(e){return new Promise(function(t,n){var r=new XMLHttpRequest;r.responseType="blob",r.onload=function(){var s=r.response;t(s)},r.onerror=function(s){n(s)},r.open("GET",e),r.send()})}var KV=function(){return typeof window<"u"&&(typeof window.PhoneGap<"u"||typeof window.Cordova<"u"||typeof window.cordova<"u")};function QV(e){return new Promise(function(t,n){var r=new FileReader;r.onload=function(){var s=new Uint8Array(r.result);t({value:s})},r.onerror=function(s){n(s)},r.readAsArrayBuffer(e)})}function GV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Ew(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function YV(e,t,n){return t&&Ew(e.prototype,t),n&&Ew(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var Cw=function(){function e(t){GV(this,e),this._file=t,this.size=t.size}return YV(e,[{key:"slice",value:function(n,r){if(KV())return QV(this._file.slice(n,r));var s=this._file.slice(n,r);return Promise.resolve({value:s})}},{key:"close",value:function(){}}]),e}();function XV(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function JV(e,t,n){return t&&jw(e.prototype,t),n&&jw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function kw(e){return e===void 0?0:e.size!==void 0?e.size:e.length}function ZV(e,t){if(e.concat)return e.concat(t);if(e instanceof Blob)return new Blob([e,t],{type:e.type});if(e.set){var n=new e.constructor(e.length+t.length);return n.set(e),n.set(t,e.length),n}throw new Error("Unknown data type")}var eB=function(){function e(t){XV(this,e),this._buffer=void 0,this._bufferOffset=0,this._reader=t,this._done=!1}return JV(e,[{key:"slice",value:function(n,r){return n<this._bufferOffset?Promise.reject(new Error("Requested data is before the reader's current offset")):this._readUntilEnoughDataOrDone(n,r)}},{key:"_readUntilEnoughDataOrDone",value:function(n,r){var s=this,i=r<=this._bufferOffset+kw(this._buffer);if(this._done||i){var o=this._getDataFromBuffer(n,r),a=o==null?this._done:!1;return Promise.resolve({value:o,done:a})}return this._reader.read().then(function(l){var c=l.value,d=l.done;return d?s._done=!0:s._buffer===void 0?s._buffer=c:s._buffer=ZV(s._buffer,c),s._readUntilEnoughDataOrDone(n,r)})}},{key:"_getDataFromBuffer",value:function(n,r){n>this._bufferOffset&&(this._buffer=this._buffer.slice(n-this._bufferOffset),this._bufferOffset=n);var s=kw(this._buffer)===0;return this._done&&s?null:this._buffer.slice(0,r-n)}},{key:"close",value:function(){this._reader.cancel&&this._reader.cancel()}}]),e}();function tB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Tw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function nB(e,t,n){return t&&Tw(e.prototype,t),n&&Tw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}var rB=function(){function e(){tB(this,e)}return nB(e,[{key:"openFile",value:function(n,r){return jT()&&n&&typeof n.uri<"u"?WV(n.uri).then(function(s){return new Cw(s)}).catch(function(s){throw new Error("tus: cannot fetch `file.uri` as Blob, make sure the uri is correct and accessible. ".concat(s))}):typeof n.slice=="function"&&typeof n.size<"u"?Promise.resolve(new Cw(n)):typeof n.read=="function"?(r=Number(r),Number.isFinite(r)?Promise.resolve(new eB(n,r)):Promise.reject(new Error("cannot create source for stream without a finite value for the `chunkSize` option"))):Promise.reject(new Error("source object may only be an instance of File, Blob, or Reader in this environment"))}}]),e}();function sB(e,t){return jT()?Promise.resolve(iB(e,t)):Promise.resolve(["tus-br",e.name,e.type,e.size,e.lastModified,t.endpoint].join("-"))}function iB(e,t){var n=e.exif?oB(JSON.stringify(e.exif)):"noexif";return["tus-rn",e.name||"noname",e.size||"nosize",n,t.endpoint].join("/")}function oB(e){var t=0;if(e.length===0)return t;for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);t=(t<<5)-t+r,t&=t}return t}function yg(e){"@babel/helpers - typeof";return yg=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yg(e)}function aB(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Pw(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function lB(e,t,n){return t&&Pw(e.prototype,t),n&&Pw(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function uB(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&vg(e,t)}function vg(e,t){return vg=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},vg(e,t)}function cB(e){var t=hB();return function(){var r=hd(e),s;if(t){var i=hd(this).constructor;s=Reflect.construct(r,arguments,i)}else s=r.apply(this,arguments);return dB(this,s)}}function dB(e,t){if(t&&(yg(t)==="object"||typeof t=="function"))return t;if(t!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return fB(e)}function fB(e){if(e===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function hB(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function hd(e){return hd=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},hd(e)}function Rw(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function ki(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?Rw(Object(n),!0).forEach(function(r){pB(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Rw(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function pB(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Nw=ki(ki({},fd.defaultOptions),{},{httpStack:new BV,fileReader:new rB,urlStorage:zV?new VV:new LV,fingerprint:sB}),mB=function(e){uB(n,e);var t=cB(n);function n(){var r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:null,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return aB(this,n),s=ki(ki({},Nw),s),t.call(this,r,s)}return lB(n,null,[{key:"terminate",value:function(s){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return i=ki(ki({},Nw),i),fd.terminate(s,i)}}]),n}(fd),kT={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=b,e.setCookie=e.getCookie=void 0,e.stringifyOptions=h;var t=v;function n(w,y){return a(w)||o(w,y)||s(w,y)||r()}function r(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function s(w,y){if(w){if(typeof w=="string")return i(w,y);var m=Object.prototype.toString.call(w).slice(8,-1);if(m==="Object"&&w.constructor&&(m=w.constructor.name),m==="Map"||m==="Set")return Array.from(w);if(m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m))return i(w,y)}}function i(w,y){(y==null||y>w.length)&&(y=w.length);for(var m=0,x=new Array(y);m<y;m++)x[m]=w[m];return x}function o(w,y){var m=w==null?null:typeof Symbol<"u"&&w[Symbol.iterator]||w["@@iterator"];if(m!=null){var x=[],_=!0,S=!1,E,C;try{for(m=m.call(w);!(_=(E=m.next()).done)&&(x.push(E.value),!(y&&x.length===y));_=!0);}catch(k){S=!0,C=k}finally{try{!_&&m.return!=null&&m.return()}finally{if(S)throw C}}return x}}function a(w){if(Array.isArray(w))return w}function l(w,y){var m=Object.keys(w);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(w);y&&(x=x.filter(function(_){return Object.getOwnPropertyDescriptor(w,_).enumerable})),m.push.apply(m,x)}return m}function c(w){for(var y=1;y<arguments.length;y++){var m=arguments[y]!=null?arguments[y]:{};y%2?l(Object(m),!0).forEach(function(x){d(w,x,m[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(w,Object.getOwnPropertyDescriptors(m)):l(Object(m)).forEach(function(x){Object.defineProperty(w,x,Object.getOwnPropertyDescriptor(m,x))})}return w}function d(w,y,m){return y in w?Object.defineProperty(w,y,{value:m,enumerable:!0,configurable:!0,writable:!0}):w[y]=m,w}var f=typeof window<"u";function h(w){return Object.keys(w).reduce(function(y,m){return m==="days"||w[m]===!1?y:w[m]===!0?"".concat(y,"; ").concat(m):"".concat(y,"; ").concat(m,"=").concat(w[m])},"")}var p=function(y,m,x){if(f){var _=c({days:7,path:"/"},x),S=new Date(Date.now()+_.days*864e5).toUTCString();document.cookie=y+"="+encodeURIComponent(m)+"; expires="+S+h(_)}};e.setCookie=p;var g=function(y){var m=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return f&&document.cookie.split("; ").reduce(function(x,_){var S=_.split("=");return S[0]===y?decodeURIComponent(S[1]):x},"")||m};e.getCookie=g;function b(w,y){var m=(0,t.useState)(function(){return g(w,y)}),x=n(m,2),_=x[0],S=x[1],E=function(k,P){S(k),p(w,k,P)};return[_,E]}})(kT);class Cf{constructor(t){this.upload=t}start(){this.upload.start()}abort(){return this.upload.abort(!0)}static async create(t,{onProgress:n,onSuccess:r,onError:s,metadata:i,chunkSize:o,baseUrl:a}){const l=["tus",t.fingerprint,"drive"].join("-"),c=new mB(t.native,{fingerprint:()=>Promise.resolve(l),removeFingerprintOnSuccess:!0,endpoint:`${a}/api/v1/tus/upload`,chunkSize:o,retryDelays:[0,3e3,5e3,1e4,2e4],overridePatchMethod:!0,metadata:{name:window.btoa(t.id),clientName:t.name,clientExtension:t.extension,clientMime:t.mime||"",clientSize:`${t.size}`,...i},headers:{"X-XSRF-TOKEN":kT.getCookie("XSRF-TOKEN")},onError:f=>{var h;if("originalResponse"in f&&f.originalResponse)try{const p=(h=JSON.parse(f.originalResponse.getBody()))==null?void 0:h.message;s==null||s(p,t)}catch{s==null||s(null,t)}else s==null||s(null,t)},onProgress(f,h){n==null||n({bytesUploaded:f,bytesTotal:h})},onSuccess:async()=>{var h;const f=(h=c.url)==null?void 0:h.split("/").pop();try{if(f){const p=await gB(f);r==null||r(p.fileEntry,t)}}catch(p){localStorage.removeItem(l),s==null||s(Zr(p),t)}}}),d=await c.findPreviousUploads();return d.length&&c.resumeFromPreviousUpload(d[0]),new Cf(c)}}function gB(e){return Z.post("tus/entries",{uploadKey:e}).then(t=>t.data)}var fl=(e=>(e.public="public",e.uploads="uploads",e))(fl||{});class l0{constructor(t,n){ye(this,"abortController");ye(this,"presignedRequest");this.file=t,this.config=n,this.abortController=new AbortController}async start(){var r,s,i,o;if(this.presignedRequest=await this.presignPostUrl(),!this.presignedRequest||await this.uploadFileToS3()!=="uploaded")return;const n=await this.createFileEntry();n!=null&&n.fileEntry?(s=(r=this.config).onSuccess)==null||s.call(r,n.fileEntry,this.file):this.abortController.signal||(o=(i=this.config).onError)==null||o.call(i,null,this.file)}abort(){return this.abortController.abort(),Promise.resolve()}presignPostUrl(){var t;return Z.post("s3/simple/presign",{filename:this.file.name,mime:this.file.mime,disk:(t=this.config.metadata)==null?void 0:t.disk,size:this.file.size,extension:this.file.extension,...this.config.metadata},{signal:this.abortController.signal}).then(n=>n.data).catch(n=>{var r,s;n.code!=="ERR_CANCELED"&&((s=(r=this.config).onError)==null||s.call(r,Zr(n),this.file))})}uploadFileToS3(){const{url:t,acl:n}=this.presignedRequest;return Er.put(t,this.file.native,{signal:this.abortController.signal,withCredentials:!1,headers:{"Content-Type":this.file.mime,"x-amz-acl":n},onUploadProgress:r=>{var s,i;r.event.lengthComputable&&((i=(s=this.config).onProgress)==null||i.call(s,{bytesUploaded:r.loaded,bytesTotal:r.total||0}))}}).then(()=>"uploaded").catch(r=>{var s,i;r.code!=="ERR_CANCELED"&&((i=(s=this.config).onError)==null||i.call(s,Zr(r),this.file))})}async createFileEntry(){return await Z.post("s3/entries",{...this.config.metadata,clientMime:this.file.mime,clientName:this.file.name,filename:this.presignedRequest.key.split("/").pop(),size:this.file.size,clientExtension:this.file.extension}).then(t=>t.data).catch(t=>{var n,r;t.code!=="ERR_CANCELED"&&((r=(n=this.config).onError)==null||r.call(n,Zr(t),this.file))})}static async create(t,n){return new l0(t,n)}}class u0{constructor(t,n){ye(this,"abortController");this.file=t,this.config=n,this.abortController=new AbortController}async start(){const t=new FormData,{onSuccess:n,onError:r,onProgress:s,metadata:i}=this.config;t.set("file",this.file.native),i&&Object.entries(i).forEach(([a,l])=>{t.set(a,`${l}`)});const o=await Z.post("file-entries",t,{onUploadProgress:a=>{a.event.lengthComputable&&(s==null||s({bytesUploaded:a.loaded,bytesTotal:a.total||0}))},signal:this.abortController.signal,headers:{"Content-Type":"multipart/form-data"}}).catch(a=>{a.code!=="ERR_CANCELED"&&(r==null||r(Zr(a),this.file))});this.abortController.signal.aborted||o&&o.data.fileEntry&&(n==null||n(o.data.fileEntry,this.file))}abort(){return this.abortController.abort(),Promise.resolve()}static async create(t,n){return new u0(t,n)}}function yB(e){if(e==null||Number.isNaN(e))return"";const t=e<0,n=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(t&&(e=-e),e<1)return`${(t?"-":"")+e} B`;const r=Math.min(Math.floor(Math.log(e)/Math.log(1024)),n.length-1);e=Number(e/Math.pow(1024,r));const s=n[r];return e>=10||e%1===0?`${(t?"-":"")+e.toFixed(0)} ${s}`:`${(t?"-":"")+e.toFixed(1)} ${s}`}function TT(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}TT.prototype.match=function(e){var t=!0,n=this.parts,r,s=n.length,i;if(typeof e=="string"||e instanceof String)if(!this.hasWild&&this.text!=e)t=!1;else{for(i=(e||"").split(this.separator),r=0;t&&r<s;r++)n[r]!=="*"&&(r<i.length?t=n[r]===i[r]:t=!1);t=t&&i}else if(typeof e.splice=="function")for(t=[],r=e.length;r--;)this.match(e[r])&&(t[t.length]=e[r]);else if(typeof e=="object"){t={};for(var o in e)this.match(o)&&(t[o]=e[o])}return t};var vB=function(e,t,n){var r=new TT(e,n||/[\/\.]/);return typeof t<"u"?r.match(t):r},xB=vB,bB=/[\/\+\.]/,wB=function(e,t){function n(r){var s=xB(r,e,bB);return s&&s.length>=2}return t?n(t.split(";")[0]):n};const _B=Qn(wB);function SB(e,t){if(!t)return;const{maxFileSize:n,allowedFileTypes:r,blockedFileTypes:s}=t;if(n&&e.size!=null&&e.size>n)return ie("`:file` exceeds maximum allowed size of :size",{values:{file:e.name,size:yB(n)}});if(r!=null&&r.length&&!Ow(e,r)||s!=null&&s.length&&Ow(e,s))return ie("This file type is not allowed")}function Ow(e,t){return t.map(n=>n.split(",")).flat().some(n=>{if(n.includes("/"))return e.mime?_B(e.mime.replace(/;.*?$/,""),n):!1;const r=n.replace(".","").toLowerCase();return r&&e.extension?e.extension.toLowerCase()===r:!1})}class EB{constructor(){ye(this,"aliveTimer");ye(this,"isDone",!1);ye(this,"timeout",3e4);ye(this,"timeoutHandler",null)}progress(){this.isDone||!this.timeoutHandler||this.timeout>0&&(clearTimeout(this.aliveTimer),this.aliveTimer=setTimeout(this.timeoutHandler,this.timeout))}done(){this.isDone||(clearTimeout(this.aliveTimer),this.aliveTimer=null,this.isDone=!0)}}async function CB(e,t){var c,d;const n=Pn().settings,r=e.options,s=e.file;if(r!=null&&r.restrictions){const f=SB(s,r.restrictions);if(f)return t.updateFileUpload(s.id,{errorMessage:f,status:"failed",request:void 0,timer:void 0}),r.showToastOnRestrictionFail&&de.danger(f),t.runQueue(),null}const i=new EB,o={metadata:{...r==null?void 0:r.metadata,relativePath:s.relativePath,disk:((c=r==null?void 0:r.metadata)==null?void 0:c.disk)||fl.uploads,parentId:((d=r==null?void 0:r.metadata)==null?void 0:d.parentId)||""},chunkSize:n.uploads.chunk_size,baseUrl:n.base_url,onError:f=>{var h;t.updateFileUpload(s.id,{errorMessage:f,status:"failed"}),t.runQueue(),i.done(),(h=r==null?void 0:r.onError)==null||h.call(r,f,s)},onSuccess:f=>{var h;t.updateFileUpload(s.id,{status:"completed",entry:f}),t.runQueue(),i.done(),(h=r==null?void 0:r.onSuccess)==null||h.call(r,f,s)},onProgress:({bytesUploaded:f,bytesTotal:h})=>{var g;const p=f/h*100;t.updateFileUpload(s.id,{percentage:p,bytesUploaded:f}),i.progress(),(g=r==null?void 0:r.onProgress)==null||g.call(r,{bytesUploaded:f,bytesTotal:h})}},l=await TB(s,o).create(s,o);return i.timeoutHandler=()=>{l.abort(),t.updateFileUpload(s.id,{status:"failed",errorMessage:ie("Upload timed out")}),t.runQueue()},t.updateFileUpload(s.id,{status:"inProgress",request:l}),l.start(),l}const PT=1024*1024,jB=4*PT,kB=100*PT,TB=(e,t)=>{var i;const n=Pn().settings,s=(((i=t.metadata)==null?void 0:i.disk)||fl.uploads)===fl.uploads?n.uploads.uploads_driver:n.uploads.public_driver;return s!=null&&s.endsWith("s3")&&n.uploads.s3_direct_upload?e.size>=kB?Sf:l0:e.size>=jB&&!n.uploads.disable_tus?Cf:u0};function RT(e){var n;return((n=/(?:\.([^.]+))?$/.exec(e))==null?void 0:n[1])||""}function PB(e){const t={md:"text/markdown",markdown:"text/markdown",mp4:"video/mp4",mp3:"audio/mp3",svg:"image/svg+xml",jpg:"image/jpeg",png:"image/png",gif:"image/gif",yaml:"text/yaml",yml:"text/yaml"},n=e.name?RT(e.name):null;return e.type?e.type:n&&n in t?t[n]:"application/octet-stream"}class xg{constructor(t,n){ye(this,"id");ye(this,"fingerprint");ye(this,"name");ye(this,"relativePath","");ye(this,"size");ye(this,"mime","");ye(this,"extension","");ye(this,"native");ye(this,"lastModified");ye(this,"cachedData");this.id=RC(),this.name=t.name,this.size=t.size,this.mime=PB(t),this.lastModified=t.lastModified,this.extension=RT(t.name)||"bin",this.native=t,n=n||t.webkitRelativePath||"",n=n.replace(/^\/+/g,""),n&&n.split("/").length>1&&(this.relativePath=n),this.fingerprint=RB({name:this.name,size:this.size,mime:this.mime,lastModified:this.lastModified})}get data(){return new Promise(t=>{this.cachedData&&t(this.cachedData);const n=new FileReader;n.addEventListener("load",()=>{this.cachedData=n.result,t(this.cachedData)}),this.extension==="json"?n.readAsText(this.native):n.readAsDataURL(this.native)})}}function RB({name:e,mime:t,size:n,relativePath:r,lastModified:s}){let i="be";return typeof e=="string"&&(i+=`-${Aw(e.toLowerCase())}`),t&&(i+=`-${t}`),typeof r=="string"&&(i+=`-${Aw(r.toLowerCase())}`),n!==void 0&&(i+=`-${n}`),s!==void 0&&(i+=`-${s}`),i+=`${KE()}`,`${i}-v1`}function NB(e){return e.charCodeAt(0).toString(32)}function Aw(e){let t="";return e.replace(/[^A-Z0-9]/gi,n=>(t+=`-${NB(n)}`,"/"))+t}function $w(e,t){return{file:e instanceof xg?e:new xg(e),percentage:0,bytesUploaded:0,status:"pending",options:t||{}}}MI();const OB=({settings:e})=>Qy()(Jy((t,n)=>({concurrency:3,fileUploads:new Map,activeUploadsCount:0,completedUploadsCount:0,getUpload:r=>n().fileUploads.get(r),clearInactive:()=>{t(r=>{r.fileUploads.forEach((s,i)=>{s.status!=="inProgress"&&r.fileUploads.delete(i)})}),n().runQueue()},abortUpload:r=>{var i;const s=n().fileUploads.get(r);s&&((i=s.request)==null||i.abort(),n().updateFileUpload(r,{status:"aborted",percentage:0}),n().runQueue())},updateFileUpload:(r,s)=>{t(i=>{const o=i.fileUploads.get(r);o&&(i.fileUploads.set(r,{...o,...s}),"status"in s&&ep(i))})},uploadSingle:(r,s)=>{const i=$w(r,s),o=new Map(n().fileUploads);return o.set(i.file.id,i),t(a=>{ep(a),a.fileUploads=o}),n().runQueue(),i.file.id},uploadMultiple:(r,s)=>{const i=new Map(n().fileUploads);return[...r].forEach(o=>{const a=$w(o,s);i.set(a.file.id,a)}),t(o=>{ep(o),o.fileUploads=i}),n().runQueue(),[...i.keys()]},runQueue:async()=>{const r=[...n().fileUploads.values()],s=r.filter(o=>o.status==="inProgress");let i=n().concurrency;if(s.filter(o=>o.file.relativePath||o.request instanceof Sf||o.request instanceof Cf&&e.uploads.chunk_size&&o.file.size>e.uploads.chunk_size).length&&(i=1),s.length<i){const o=r.find(a=>a.status==="pending");o&&await CB(o,n())}}}))),ep=e=>{e.completedUploadsCount=[...e.fileUploads.values()].filter(t=>t.status==="completed").length,e.activeUploadsCount=[...e.fileUploads.values()].filter(t=>t.status==="inProgress"||t.status==="pending").length},NT=v.createContext(null),Ru=(e,t)=>{const n=v.useContext(NT);return EC(n,e,t)};function AB({children:e}){const t=ce(),[n]=v.useState(()=>OB({settings:t}));return u.jsx(NT.Provider,{value:n,children:e})}function $B(e={}){const t=document.querySelector("#hidden-file-upload-input");t&&t.remove();const n=document.createElement("input");return n.type="file",n.multiple=e.multiple??!1,n.classList.add("hidden"),n.style.display="none",n.style.visibility="hidden",n.id="hidden-file-upload-input",n.accept=IB(e),e.directory&&(n.webkitdirectory=!0),document.body.appendChild(n),n}function IB({extensions:e=[],types:t=[]}){const n=[];return e!=null&&e.length&&(e=e.map(r=>r.startsWith(".")?r:`.${r}`),n.push(e.join(","))),t!=null&&t.length&&n.push(t.join(",")),n.join(",")}function DB(e={}){return new Promise(t=>{const n=$B(e);n.onchange=r=>{const s=r.target.files;if(!s)return t([]);const i=Array.from(s).filter(o=>o.name!==".DS_Store").map(o=>new xg(o));t(i),n.remove()},document.body.appendChild(n),n.click()})}function MB(e){return Z.post("file-entries/delete",e).then(t=>t.data)}function LB(){return me(e=>MB(e),{onError:e=>dt(e)})}function FB(){const e=LB(),t=v.useRef(),n=Ru(d=>d.uploadSingle),r=Ru(d=>d.abortUpload),s=Ru(d=>d.updateFileUpload),i=Ru(d=>t.current?d.fileUploads.get(t.current):null),o=v.useCallback((d,f)=>{t.current=n(d,f)},[n]),a=v.useCallback(async d=>{var h;const f=await DB({types:(h=d==null?void 0:d.restrictions)==null?void 0:h.allowedFileTypes});return o(f[0],d),f[0]},[o]),l=v.useCallback(({onSuccess:d,entryPath:f})=>{var p,g,b;const h=()=>{i&&s(i.file.id,{...i,entry:void 0}),d()};if(!f&&!((p=i==null?void 0:i.entry)!=null&&p.id)){h();return}e.mutate({paths:f?[f]:void 0,entryIds:(g=i==null?void 0:i.entry)!=null&&g.id?[(b=i==null?void 0:i.entry)==null?void 0:b.id]:void 0,deleteForever:!0},{onSuccess:h})},[e,i,s]),c=v.useCallback(()=>{i&&r(i.file.id)},[i,r]);return{uploadFile:o,selectAndUploadFile:a,percentage:(i==null?void 0:i.percentage)||0,uploadStatus:i==null?void 0:i.status,entry:i==null?void 0:i.entry,deleteEntry:l,isDeletingEntry:e.isLoading,activeUpload:i,abortUpload:c}}var bg=(e=>(e.image="image/*",e.audio="audio/*",e.text="text/*",e.json="application/json",e.video="video/mp4,video/mpeg,video/x-m4v,video/*",e))(bg||{});function UB(e){let{value:t=0,minValue:n=0,maxValue:r=100,size:s="md",label:i,showValueLabel:o=!!i,isIndeterminate:a=!1,labelPosition:l="top",className:c,role:d,formatOptions:f={style:"percent"},radius:h="rounded",trackColor:p="bg-primary-light",progressColor:g="bg-primary",trackHeight:b=zB(s)}=e;const w=v.useId();t=Mj(t,n,r);const y=(t-n)/(r-n),m=jv(f);let x="";if(!a&&o){const C=f.style==="percent"?y:t;x=m.format(C)}const _={};a||(_.width=`${Math.round(y*100)}%`);const S=Do({size:s}),E=(i||x)&&u.jsxs("div",{className:D("flex gap-10 justify-between my-4",S.label),children:[i&&u.jsx("span",{id:w,children:i}),x&&u.jsx("div",{children:x})]});return u.jsxs("div",{"aria-valuenow":a?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":a?void 0:x,"aria-labelledby":i?w:void 0,role:d||"progressbar",className:D(c,"min-w-42"),children:[l==="top"&&E,u.jsx("div",{className:`${b} ${h} ${p} overflow-hidden`,children:u.jsx("div",{className:D(g,"fill h-full transition-width duration-200 rounded-l",a&&"progress-bar-indeterminate-animate"),style:_})}),l==="bottom"&&E]})}function zB(e){switch(e){case"sm":return"h-6";case"xs":return"h-4";default:return"h-8"}}function VB(e){return u.jsx(UB,{...e})}const BB=re(u.jsx("path",{d:"M21 6h-3.17L16 4h-6v2h5.12l1.83 2H21v12H5v-9H3v9c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zM8 14c0 2.76 2.24 5 5 5s5-2.24 5-5-2.24-5-5-5-5 2.24-5 5zm5-3c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3zM5 6h3V4H5V1H3v3H0v2h3v3h2z"}),"AddAPhotoOutlined"),HB=re(u.jsx("path",{d:"M24,12 C28.418278,12 32,15.581722 32,20 L32,22 C32,26.418278 28.418278,30 24,30 C19.581722,30 16,26.418278 16,22 L16,20 C16,15.581722 19.581722,12 24,12 Z M24,32 C33.8734019,32 42.1092023,38.8710577 44,48 L4,48 C5.89079771,38.8710577 14.1265981,32 24,32 Z"})),qB=2*1024*1024;function WB({className:e,label:t,description:n,value:r,onChange:s,defaultValue:i,diskPrefix:o,showRemoveButton:a,showEditButtonOnHover:l=!1,invalid:c,errorMessage:d,required:f,autoFocus:h,variant:p="input",previewSize:g="h-80",placeholderIcon:b,stretchPreview:w=!1,previewRadius:y,disabled:m}){const{uploadFile:x,entry:_,uploadStatus:S,deleteEntry:E,isDeletingEntry:C,percentage:k}=FB(),P=v.useRef(null);pf({autoFocus:h},P);const O=v.useId(),$=t?`${O}-label`:void 0,F=n?`${O}-description`:void 0,M=r||(_==null?void 0:_.url),z={showToastOnRestrictionFail:!0,restrictions:{allowedFileTypes:[bg.image],maxFileSize:qB},metadata:{diskPrefix:o,disk:fl.public},onSuccess:W=>{s==null||s(W.url)},onError:W=>{W&&de.danger(W)}},q=Do({description:n,descriptionPosition:"top",invalid:c});let B;p==="avatar"?B=GB:p==="square"?B=QB:B=KB;const J=a?u.jsx(te,{variant:"link",color:"danger",size:"xs",disabled:C||!M||m,onClick:()=>{E({onSuccess:()=>s==null?void 0:s("")})},children:u.jsx(j,{message:"Remove image"})}):null,I=i&&r!==i?u.jsx(te,{variant:"outline",color:"primary",size:"xs",disabled:m,onClick:()=>{s==null||s(i)},children:u.jsx(j,{message:"Use default"})}):null,G=v.useCallback(()=>{var W;(W=P.current)==null||W.click()},[]);return u.jsxs("div",{className:D("text-sm",e),children:[t&&u.jsx("div",{id:$,className:q.label,children:t}),n&&u.jsx("div",{className:q.description,children:n}),u.jsx("div",{"aria-labelledby":$,"aria-describedby":F,children:u.jsxs(Iv,{fieldClassNames:q,errorMessage:d,invalid:c,children:[u.jsx(B,{inputFieldClassNames:q,placeholderIcon:b,previewSize:g,isLoading:S==="inProgress",imageUrl:M,removeButton:J,useDefaultButton:I,showEditButtonOnHover:l,stretchPreview:w,previewRadius:y,handleUpload:G,disabled:m,children:u.jsx("input",{ref:P,"aria-labelledby":$,"aria-describedby":F,required:M?!1:f,accept:bg.image,type:"file",disabled:S==="inProgress",className:"sr-only",onChange:W=>{var Q;(Q=W.target.files)!=null&&Q.length&&x(W.target.files[0],z)}})}),S==="inProgress"&&u.jsx(VB,{className:"absolute left-0 right-0 top-0",size:"xs",value:k})]})})]})}function KB({children:e,inputFieldClassNames:t,imageUrl:n,previewSize:r,stretchPreview:s,isLoading:i,handleUpload:o,removeButton:a,useDefaultButton:l,disabled:c}){return n?u.jsxs(v.Fragment,{children:[u.jsxs("div",{className:`${r} relative mb-10 overflow-hidden rounded border bg-fg-base/8 p-6`,children:[u.jsx("img",{className:D("mx-auto h-full rounded",s?"object-cover":"object-contain"),onClick:()=>o(),src:n,alt:""}),e]}),u.jsx(te,{onClick:()=>o(),disabled:i||c,className:"mr-10",variant:"outline",color:"primary",size:"xs",children:u.jsx(j,{message:"Replace"})}),a&&v.cloneElement(a,{variant:"outline"}),l&&v.cloneElement(l,{variant:"outline"})]}):v.cloneElement(e,{className:D(t.input,"py-8","file:bg-primary file:text-on-primary file:border-none file:rounded file:text-sm file:font-semibold file:px-10 file:h-24 file:mr-10")})}function QB({children:e,placeholderIcon:t,previewSize:n,imageUrl:r,stretchPreview:s,handleUpload:i,removeButton:o,useDefaultButton:a,previewRadius:l="rounded",showEditButtonOnHover:c=!1,disabled:d}){return u.jsxs("div",{children:[u.jsxs("div",{className:D(n,l,!r&&"border","group z-20 flex flex-col items-center justify-center gap-14 bg-fg-base/8 bg-center bg-no-repeat",s?"bg-cover":"bg-contain p-6"),style:r?{backgroundImage:`url(${r})`}:void 0,onClick:()=>i(),children:[t&&!r&&v.cloneElement(t,{size:"lg"}),u.jsx(te,{variant:"raised",color:"white",size:"xs",className:D(c&&"invisible group-hover:visible"),disabled:d,children:r?u.jsx(j,{message:"Replace image"}):u.jsx(j,{message:"Upload image"})})]}),e,(o||a)&&u.jsxs("div",{className:"mt-8",children:[o&&v.cloneElement(o,{variant:"link"}),a&&v.cloneElement(a,{variant:"link"})]})]})}function GB({children:e,placeholderIcon:t,previewSize:n,isLoading:r,imageUrl:s,removeButton:i,useDefaultButton:o,handleUpload:a,previewRadius:l="rounded-full",disabled:c}){return t||(t=u.jsx(HB,{viewBox:"0 0 48 48",className:D("h-full w-full bg-primary-light/40 text-primary/40",l)})),u.jsxs("div",{children:[u.jsxs("div",{className:D("relative",n),onClick:()=>a(),children:[s?u.jsx("img",{src:s,className:D("h-full w-full object-cover",l),alt:""}):t,u.jsx("div",{className:"absolute -bottom-6 -right-6 rounded-full bg-paper shadow-xl",children:u.jsx(Cr,{disabled:r||c,type:"button",variant:"outline",size:"sm",color:"primary",children:u.jsx(BB,{})})})]}),e,(i||o)&&u.jsxs("div",{className:"mt-14",children:[i&&v.cloneElement(i,{variant:"link"}),o&&v.cloneElement(o,{variant:"link"})]})]})}function YB(e){const{field:{onChange:t,value:n=null},fieldState:{error:r}}=$o({name:e.name}),s={onChange:t,value:n,invalid:r!=null,errorMessage:r?u.jsx(j,{message:"Please select an image."}):null};return u.jsx(WB,{...jr(s,e)})}function XB({user:e}){const t=Tz({user:e}),n=Rz({user:e}),r=v.useId(),s=Yt({defaultValues:{first_name:e.first_name||"",last_name:e.last_name||"",avatar:e.avatar}}),i=Zk(s);return u.jsx(ps,{id:Jn.AccountDetails,title:u.jsx(j,{message:"Update name and profile image"}),actions:u.jsx(te,{type:"submit",variant:"flat",color:"primary",form:r,disabled:i.isLoading||!s.formState.isValid,children:u.jsx(j,{message:"Save"})}),children:u.jsxs(Xt,{form:s,className:"flex flex-col flex-col-reverse md:flex-row items-center gap-40 md:gap-80",onSubmit:o=>{i.mutate(o)},id:r,children:[u.jsxs("div",{className:"flex-auto w-full",children:[u.jsx(Ae,{className:"mb-24",name:"first_name",label:u.jsx(j,{message:"First name"})}),u.jsx(Ae,{name:"last_name",label:u.jsx(j,{message:"Last name"})})]}),u.jsx(AB,{children:u.jsx(YB,{className:"md:mr-80",variant:"avatar",previewSize:"w-90 h-90",showRemoveButton:!0,name:"avatar",diskPrefix:"avatars",label:u.jsx(j,{message:"Profile image"}),onChange:o=>{o?t.mutate({url:o}):n.mutate()}})})]})})}function JB(e){return me(t=>ZB(t),{onSuccess:()=>{de(ie("Password changed"))},onError:t=>yn(t,e)})}function ZB(e){return Z.put("auth/user/password",e).then(t=>t.data)}function eH(){const e=Yt(),t=v.useId(),n=JB(e);return u.jsx(ps,{id:Jn.Password,title:u.jsx(j,{message:"Update password"}),actions:u.jsx(te,{type:"submit",form:t,variant:"flat",color:"primary",disabled:!e.formState.isValid||n.isLoading,children:u.jsx(j,{message:"Update password"})}),children:u.jsxs(Xt,{form:e,id:t,onSubmit:r=>{n.mutate(r,{onSuccess:()=>{e.reset()}})},children:[u.jsx(Ae,{className:"mb-24",name:"current_password",label:u.jsx(j,{message:"Current password"}),type:"password",autoComplete:"current-password",required:!0}),u.jsx(Ae,{className:"mb-24",name:"password",label:u.jsx(j,{message:"New password"}),type:"password",autoComplete:"new-password",required:!0}),u.jsx(Ae,{name:"password_confirmation",label:u.jsx(j,{message:"Confirm password"}),type:"password",autoComplete:"new-password",required:!0})]})})}function OT({isLoading:e,icon:t}){const n=v.useRef(null),{trans:r}=Xn(),[s,i]=v.useState(!1),{state:{isOpen:o,inputValue:a}}=Kv(),l=v.useRef(a);return v.useEffect(()=>{e&&!s?(n.current===null&&(n.current=setTimeout(()=>{i(!0)},500)),a!==l.current&&(clearTimeout(n.current),n.current=setTimeout(()=>{i(!0)},500))):e||(i(!1),clearTimeout(n.current),n.current=null),l.current=a},[e,s,a]),s&&(o||e)?u.jsx(hs,{"aria-label":r({message:"Loading"}),size:"sm",isIndeterminate:!0}):t||u.jsx(Hk,{})}function tH(e,t){var vn;const{children:n,items:r,isAsync:s,isLoading:i,openMenuOnFocus:o=!0,endAdornmentIcon:a,onItemSelected:l,maxItems:c,clearInputOnItemSelection:d,inputValue:f,selectedValue:h,onSelectionChange:p,allowCustomValue:g=!1,onInputValueChange:b,defaultInputValue:w,selectionMode:y="single",useOptionLabelAsInputValue:m,showEmptyMessage:x,floatingMaxHeight:_,hideEndAdornment:S=!1,blurReferenceOnItemSelection:E,isOpen:C,onOpenChange:k,prependListbox:P,listboxClassName:O,onEndAdornmentClick:$,...F}=e,M=Wv({...e,floatingMaxHeight:_,blurReferenceOnItemSelection:E,selectionMode:y,role:"listbox",virtualFocus:!0,clearSelectionOnInputClear:!0},t),{reference:z,listboxId:q,onInputChange:B,state:{isOpen:J,setIsOpen:I,inputValue:G,setInputValue:W,selectValues:Q,selectedValues:se,setActiveCollection:he},collection:Re}=M,oe=se[0]?(vn=Re.get(se[0]))==null?void 0:vn.textLabel:void 0,{handleListboxSearchFieldKeydown:ge}=Gv(M),we=nn(Ie=>{o&&!J&&I(!0),Ie.target.select()});return u.jsx(Qv,{prepend:P,className:O,listbox:M,mobileOverlay:Ca,onPointerDown:Ie=>{Ie.preventDefault()},children:u.jsx(mf,{inputRef:z,...F,endAdornment:S?null:u.jsx(Cr,{radius:"rounded",size:"md",tabIndex:-1,disabled:F.disabled,className:"pointer-events-auto",onPointerDown:Ie=>{Ie.preventDefault(),Ie.stopPropagation(),$?$():(he("all"),I(!J))},children:u.jsx(OT,{isLoading:i,icon:a})}),"aria-expanded":J?"true":"false","aria-haspopup":"listbox","aria-controls":J?q:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",onChange:B,value:m&&oe?oe:G,onBlur:Ie=>{if(g)Q(Ie.target.value);else if(!d){const vt=se[0];W(Q.length&&vt!=null?`${vt}`:"")}},onFocus:we,onClick:we,onKeyDown:Ie=>ge(Ie)})})}const CW=V.forwardRef(tH),nH=re(u.jsx("path",{d:"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"}),"SearchOutlined");function rH(e,t){const{hideCaret:n,placeholder:r=u.jsx(j,{message:"Select an option..."}),selectedValue:s,onItemSelected:i,onOpenChange:o,onInputValueChange:a,onSelectionChange:l,selectionMode:c,minWidth:d="min-w-128",children:f,searchPlaceholder:h,showEmptyMessage:p,showSearchField:g,defaultInputValue:b,inputValue:w,isLoading:y,isAsync:m,valueClassName:x,..._}=e,S=zv(),E=Wv({...e,clearInputOnItemSelection:!0,showEmptyMessage:p||g,floatingWidth:S?"auto":"matchTrigger",selectionMode:"single",role:"listbox",virtualFocus:g},t),{state:{selectedValues:C,isOpen:k,setIsOpen:P,activeIndex:O,setSelectedIndex:$,inputValue:F,setInputValue:M},collections:z,focusItem:q,listboxId:B,reference:J,refs:I,listContent:G,onInputChange:W}=E,{fieldProps:Q,inputProps:se}=sk({..._,focusRef:I.reference}),he=z.collection.get(C[0]),Re=he?u.jsxs("span",{className:"flex items-center gap-10",children:[he.element.props.startIcon,u.jsx("span",{className:D("overflow-hidden overflow-ellipsis whitespace-nowrap",x),children:he.element.props.children})]}):u.jsx("span",{className:"italic",children:r}),oe=Do({...e,endAdornment:!0}),{handleTriggerKeyDown:ge,handleListboxKeyboardNavigation:we,handleListboxSearchFieldKeydown:vn}=Gv(E),{findMatchingItem:Ie}=kk(),vt=Jt=>{if(!k)return;const je=Ie(Jt,G,O);je!=null&&q("increment",je)},Tt=Jt=>{if(k)return;const je=Ie(Jt,G,O);je!=null&&$(je)};return u.jsx(Qv,{listbox:E,onKeyDownCapture:g?void 0:vt,onKeyDown:we,onClose:g?()=>M(""):void 0,isLoading:y,searchField:g&&u.jsx(mf,{size:"sm",placeholder:h,startAdornment:u.jsx(nH,{}),className:"flex-shrink-0 px-8 pb-8 pt-4",autoFocus:!0,"aria-expanded":k?"true":"false","aria-haspopup":"listbox","aria-controls":k?B:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",value:F,onChange:W,onKeyDown:Jt=>{vn(Jt)}}),children:u.jsx(Iv,{fieldClassNames:oe,...Q,endAdornment:u.jsx(OT,{isLoading:y}),children:u.jsx("button",{...se,type:"button","data-selected-value":he==null?void 0:he.value,"aria-expanded":k?"true":"false","aria-haspopup":"listbox","aria-controls":k?B:void 0,ref:J,onKeyDown:ge,onKeyDownCapture:g?void 0:Tt,disabled:_.disabled,onClick:()=>{P(!k)},className:D(oe.input,!Q.unstyled&&d),children:Re})})})}const sH=V.forwardRef(rH);function tp({children:e,...t}){const{field:{onChange:n,onBlur:r,value:s=null,ref:i},fieldState:{invalid:o,error:a}}=$o({name:t.name}),l={onSelectionChange:n,onBlur:r,selectedValue:s,invalid:o,errorMessage:a==null?void 0:a.message,name:t.name};return u.jsx(sH,{ref:i,...jr(l,t),children:e})}function iH({user:e}){const t=v.useId(),{trans:n}=Xn(),r=Yt({defaultValues:{language:e.language||"",country:e.country||"",timezone:e.timezone||Tl()}}),s=Zk(r),i=qk(),{data:o}=Vk(["timezones","countries","localizations"]),a=(o==null?void 0:o.countries)||[],l=(o==null?void 0:o.localizations)||[],c=(o==null?void 0:o.timezones)||{};return u.jsx(ps,{id:Jn.LocationAndLanguage,title:u.jsx(j,{message:"Date, time and language"}),actions:u.jsx(te,{type:"submit",variant:"flat",color:"primary",form:t,disabled:s.isLoading||!r.formState.isValid,children:u.jsx(j,{message:"Save"})}),children:u.jsxs(Xt,{form:r,onSubmit:d=>{s.mutate(d),i.mutate({locale:d.language})},id:t,children:[u.jsx(tp,{className:"mb-24",selectionMode:"single",name:"language",label:u.jsx(j,{message:"Language"}),children:l.map(d=>u.jsx(Pt,{value:d.language,children:d.name},d.language))}),u.jsx(tp,{className:"mb-24",selectionMode:"single",name:"country",label:u.jsx(j,{message:"Country"}),showSearchField:!0,searchPlaceholder:n(ie("Search countries")),children:a.map(d=>u.jsx(Pt,{value:d.code,children:d.name},d.code))}),u.jsx(tp,{selectionMode:"single",name:"timezone",label:u.jsx(j,{message:"Timezone"}),showSearchField:!0,searchPlaceholder:n(ie("Search timezones")),children:Object.entries(c).map(([d,f])=>u.jsx(Sk,{label:d,children:f.map(h=>u.jsx(Pt,{value:h.value,children:h.text},h.value))},d))})]})})}function oH(e){const t=v.useRef(null);e&&t.current&&zs(e,t.current)&&(e=t.current),t.current=e;const{localeCode:n}=Zs();return v.useMemo(()=>new sI(n,e),[n,e])}const aH={numeric:{year:"numeric",month:"2-digit",day:"2-digit"},short:{year:"numeric",month:"short",day:"2-digit"},long:{month:"long",day:"2-digit",year:"numeric"}},lH=v.memo(({date:e,options:t,preset:n})=>{const{dates:r}=ce(),s=yC(),i=oH(t||aH[n||(r==null?void 0:r.format)]);if(!e)return null;try{typeof e=="string"?e=hC(e).toDate():"toDate"in e&&(e=e.toDate(s))}catch{return null}return u.jsx(v.Fragment,{children:i.format(e)})},zs);function AT({className:e,title:t,body:n,confirm:r,isDanger:s,isLoading:i,onConfirm:o}){const{close:a}=Nl();return u.jsxs(Ul,{className:e,size:"sm",role:"alertdialog",children:[u.jsx(zl,{color:s?"text-danger":null,leftAdornment:u.jsx(Dj,{className:"icon-sm"}),children:t}),u.jsx(Vl,{children:n}),u.jsxs(gf,{children:[u.jsx(te,{variant:"text",onClick:()=>{a(!1)},children:u.jsx(j,{message:"Cancel"})}),u.jsx(te,{disabled:i,variant:"flat",color:s?"danger":"primary",onClick:()=>{o==null||o(),o||a(!0)},children:r})]})]})}function uH({id:e}){return Z.delete(`access-tokens/${e}`).then(t=>t.data)}function cH(){return me(e=>uH(e),{onSuccess:()=>{de(ie("Token deleted"))},onError:e=>dt(e)})}var dH=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null;break}return e.removeAllRanges(),function(){e.type==="Caret"&&e.removeAllRanges(),e.rangeCount||n.forEach(function(s){e.addRange(s)}),t&&t.focus()}},fH=dH,Iw={"text/plain":"Text","text/html":"Url",default:"Text"},hH="Copy to clipboard: #{key}, Enter";function pH(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}function mH(e,t){var n,r,s,i,o,a,l=!1;t||(t={}),n=t.debug||!1;try{s=fH(),i=document.createRange(),o=document.getSelection(),a=document.createElement("span"),a.textContent=e,a.ariaHidden="true",a.style.all="unset",a.style.position="fixed",a.style.top=0,a.style.clip="rect(0, 0, 0, 0)",a.style.whiteSpace="pre",a.style.webkitUserSelect="text",a.style.MozUserSelect="text",a.style.msUserSelect="text",a.style.userSelect="text",a.addEventListener("copy",function(d){if(d.stopPropagation(),t.format)if(d.preventDefault(),typeof d.clipboardData>"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var f=Iw[t.format]||Iw.default;window.clipboardData.setData(f,e)}else d.clipboardData.clearData(),d.clipboardData.setData(t.format,e);t.onCopy&&(d.preventDefault(),t.onCopy(d.clipboardData))}),document.body.appendChild(a),i.selectNodeContents(a),o.addRange(i);var c=document.execCommand("copy");if(!c)throw new Error("copy command was unsuccessful");l=!0}catch(d){n&&console.error("unable to copy using execCommand: ",d),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(f){n&&console.error("unable to copy using clipboardData: ",f),n&&console.error("falling back to prompt"),r=pH("message"in t?t.message:hH),window.prompt(r,e)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(i):o.removeAllRanges()),a&&document.body.removeChild(a),s()}return l}var gH=mH;const yH=Qn(gH);function vH(e,t){var n=v.useState(!1),r=n[0],s=n[1],i=t&&t.successDuration;return v.useEffect(function(){if(r&&i){var o=setTimeout(function(){s(!1)},i);return function(){clearTimeout(o)}}},[r,i]),[r,function(){var o=yH(e);s(o)}]}function xH(e){return Z.post("access-tokens",e).then(t=>t.data)}function bH(e){return me(t=>xH(t),{onSuccess:()=>{de(ie("Token create"))},onError:t=>yn(t,e)})}function wH(){const e=Yt(),{formId:t,close:n}=Nl(),r=bH(e),[s,i]=v.useState(),o=u.jsx(Xt,{form:e,id:t,onSubmit:a=>{r.mutate(a,{onSuccess:l=>{i(l.plainTextToken),ze.invalidateQueries(["users"])}})},children:u.jsx(Ae,{name:"tokenName",label:u.jsx(j,{message:"Token name"}),required:!0,autoFocus:!0})});return u.jsxs(Ul,{children:[u.jsx(zl,{children:u.jsx(j,{message:"Create new token"})}),u.jsx(Vl,{children:s?u.jsx(_H,{plainTextToken:s}):o}),u.jsxs(gf,{children:[u.jsx(te,{variant:"text",onClick:n,children:u.jsx(j,{message:"Done"})}),!s&&u.jsx(te,{variant:"flat",color:"primary",type:"submit",form:t,disabled:r.isLoading,children:u.jsx(j,{message:"Create"})})]})]})}function _H({plainTextToken:e}){const[t,n]=vH(e||"",{successDuration:1e3});return u.jsxs(u.Fragment,{children:[u.jsx(mf,{readOnly:!0,value:e,autoFocus:!0,onClick:r=>{r.currentTarget.focus(),r.currentTarget.select()},endAppend:u.jsx(te,{variant:"flat",color:"primary",onClick:n,children:t?u.jsx(j,{message:"Copied!"}):u.jsx(j,{message:"Copy"})})}),u.jsxs("div",{className:"flex items-center gap-10 mt-14 text-sm",children:[u.jsx(Kk,{size:"sm",className:"text-danger"}),u.jsx(j,{message:"Make sure to store the token in a safe place. After this dialog is closed, token will not be viewable anymore."})]})]})}const SH=""+new URL("secure-files-17b4728d.svg",import.meta.url).href;function EH({user:e}){const t=e.tokens||[],{hasPermission:n}=tt(),{api:r}=ce();return!(r!=null&&r.integrated)||!n("api.access")?null:u.jsx(ps,{id:Jn.Developers,title:u.jsx(j,{message:"API access tokens"}),titleSuffix:u.jsx(Ze,{className:ls,to:"/api-docs",target:"_blank",children:u.jsx(j,{message:"Documentation"})}),actions:u.jsx(jH,{}),children:t.length?t.map((s,i)=>u.jsx(CH,{token:s,isLast:i===t.length-1},s.id)):u.jsx(Jv,{className:"py-40",image:u.jsx(qd,{src:SH}),title:u.jsx(j,{message:"You have no personal access tokens yet"})})})}function CH({token:e,isLast:t}){return u.jsxs("div",{className:D("flex items-center gap-24",!t&&"mb-12 pb-12 border-b"),children:[u.jsxs("div",{className:"text-sm",children:[u.jsx("div",{className:"font-semibold",children:u.jsx(j,{message:"Name"})}),u.jsx("div",{children:e.name}),u.jsx("div",{className:"font-semibold mt-10",children:u.jsx(j,{message:"Last used"})}),u.jsx("div",{children:e.last_used_at?u.jsx(lH,{date:e.last_used_at}):u.jsx(j,{message:"Never"})})]}),u.jsx(kH,{token:e})]})}function jH(){return u.jsxs(Uo,{type:"modal",children:[u.jsx(te,{variant:"flat",color:"primary",children:u.jsx(j,{message:"Create token"})}),u.jsx(wH,{})]})}function kH({token:e}){const t=cH();return u.jsxs(Uo,{type:"modal",onClose:n=>{n&&t.mutate({id:e.id},{onSuccess:()=>ze.invalidateQueries(["users"])})},children:[u.jsx(te,{size:"xs",variant:"outline",color:"danger",className:"flex-shrink-0 ml-auto",children:u.jsx(j,{message:"Delete"})}),u.jsx(AT,{isDanger:!0,title:u.jsx(j,{message:"Delete token?"}),body:u.jsx(j,{message:"This token will be deleted immediately and permanently. Once deleted, it can no longer be used to make API requests."}),confirm:u.jsx(j,{message:"Delete"})})]})}function TH(e){return Z.delete(`users/${e}`,{params:{deleteCurrentUser:!0}}).then(t=>t.data)}function PH(){const{user:e}=tt(),t=Uk();return me(()=>TH(e.id),{onSuccess:()=>{de("Account deleted"),t.mutate()},onError:n=>dt(n)})}function RH(){const e=PH();return u.jsx(ps,{id:Jn.DeleteAccount,title:u.jsx(j,{message:"Danger zone"}),children:u.jsxs(Uo,{type:"modal",onClose:t=>{t&&e.mutate()},children:[u.jsx(te,{variant:"flat",color:"danger",children:u.jsx(j,{message:"Delete account"})}),u.jsx(AT,{isDanger:!0,title:u.jsx(j,{message:"Delete account?"}),body:u.jsx(j,{message:"Your account will be deleted immediately and permanently. Once deleted, accounts can not be restored."}),confirm:u.jsx(j,{message:"Delete"})})]})})}function NH(){return me(OH,{onError:e=>dt(e)})}function OH(){return Z.post("auth/user/two-factor-authentication").then(e=>e.data)}function c0({title:e,subtitle:t,description:n,actions:r,children:s}){return t||(t=u.jsx(j,{message:"When two factor authentication is enabled, you will be prompted for a secure, random token during authentication. You may retrieve this token from your phone's Google Authenticator application."})),u.jsxs(v.Fragment,{children:[u.jsx("div",{className:"text-base font-medium mb-16",children:e}),u.jsx("div",{className:"text-sm mb-24",children:t}),u.jsx("p",{className:"text-sm font-medium my-16",children:n}),s,u.jsx("div",{className:"flex items-center gap-12",children:r})]})}function AH(){return On(["password-confirmation-status"],()=>$H())}function $H(){return Z.get("auth/user/confirmed-password-status",{params:{seconds:9e3}}).then(e=>e.data)}function IH(e){ze.setQueryData(["password-confirmation-status"],{confirmed:e})}const d0=Qy()(Jy((e,t)=>({dialog:null,data:void 0,resolveClosePromise:null,openDialog:(n,r)=>new Promise(s=>{e(i=>{i.dialog=n,i.data=r,i.resolveClosePromise=s})}),closeActiveDialog:n=>{var r,s;(s=(r=t()).resolveClosePromise)==null||s.call(r,n),e(i=>{i.dialog=null,i.data=void 0,i.resolveClosePromise=null})}}))),DH=d0.getState().openDialog,MH=e=>{d0.getState().closeActiveDialog(e)};function LH(e){return me(t=>FH(t),{onError:t=>yn(t,e)})}function FH(e){return Z.post("auth/user/confirm-password",e).then(t=>t.data)}function UH(){const{close:e,formId:t}=Nl(),n=Yt(),r=LH(n);return u.jsxs(Ul,{children:[u.jsx(zl,{children:u.jsx(j,{message:"Confirm password"})}),u.jsxs(Vl,{children:[u.jsx("p",{className:"text-sm mb-16",children:u.jsx(j,{message:"For your security, please confirm your password to continue."})}),u.jsx(Xt,{id:t,form:n,onSubmit:s=>r.mutate(s,{onSuccess:()=>e(s.password)}),children:u.jsx(Ae,{name:"password",label:u.jsx(j,{message:"Password"}),type:"password",required:!0,autoFocus:!0})})]}),u.jsxs(gf,{children:[u.jsx(te,{onClick:()=>e(),children:u.jsx(j,{message:"Cancel"})}),u.jsx(te,{type:"submit",variant:"flat",color:"primary",form:t,disabled:r.isLoading,children:u.jsx(j,{message:"Confirm"})})]})]})}function jf({needsPassword:e}={}){const{data:t,isLoading:n}=AH(),r=v.useRef(),s=v.useCallback(async i=>{if(t!=null&&t.confirmed&&(r.current||!e))i(r.current);else{const o=await DH(UH);o&&(r.current=o,IH(!0),i(r.current))}},[t==null?void 0:t.confirmed,e]);return{isLoading:n,withConfirmedPassword:s}}function zH({onEnabled:e}){const t=NH(),{withConfirmedPassword:n,isLoading:r}=jf(),s=t.isLoading||r;return u.jsx(c0,{title:u.jsx(j,{message:"You have not enabled two factor authentication."}),actions:u.jsx(te,{variant:"flat",color:"primary",disabled:s,onClick:()=>{n(()=>{t.mutate(void 0,{onSuccess:e})})},children:u.jsx(j,{message:"Enable"})})})}function VH(){return On(["two-factor-qr-code"],()=>BH())}function BH(){return Z.get("auth/user/two-factor/qr-code").then(e=>e.data)}function HH(e){return me(t=>qH(t),{onError:t=>yn(t,e)})}function qH(e){return Z.post("auth/user/confirmed-two-factor-authentication",e).then(t=>t.data)}function $T(){return me(WH,{onError:e=>dt(e)})}function WH(){return Z.delete("auth/user/two-factor-authentication").then(e=>e.data)}function KH(e){const{data:t}=VH();return u.jsxs(c0,{title:u.jsx(j,{message:"Finish enabling two factor authentication."}),description:u.jsx(j,{message:"To finish enabling two factor authentication, scan the following QR code using your phone's authenticator application or enter the setup key and provide the generated OTP code."}),children:[u.jsx(To,{initial:!1,children:t?u.jsx(Dw,{animationKey:"real-svg",svg:u.jsx("div",{dangerouslySetInnerHTML:{__html:t.svg}}),secret:u.jsx(j,{message:"Setup key: :key",values:{key:t.secret}})}):u.jsx(Dw,{animationKey:"svg-skeleton",svg:u.jsx(sr,{variant:"rect",size:"w-full h-full"}),secret:u.jsx(sr,{variant:"text",className:"max-w-224"})})}),u.jsx(QH,{...e})]})}function QH({onCancel:e,onConfirmed:t}){const n=Yt(),r=HH(n),s=$T(),{withConfirmedPassword:i,isLoading:o}=jf(),a=r.isLoading||s.isLoading||o;return u.jsxs(Xt,{form:n,onSubmit:l=>i(()=>{r.mutate(l,{onSuccess:()=>{ze.invalidateQueries(["users"]),t()}})}),children:[u.jsx(Ae,{required:!0,name:"code",label:u.jsx(j,{message:"Code"}),autoFocus:!0}),u.jsxs("div",{className:"flex items-center gap-12 mt-24",children:[u.jsx(te,{type:"button",variant:"outline",disabled:a,onClick:()=>{i(()=>{s.mutate(void 0,{onSuccess:e})})},children:u.jsx(j,{message:"Cancel"})}),u.jsx(te,{type:"submit",variant:"flat",color:"primary",disabled:a,children:u.jsx(j,{message:"Confirm"})})]})]})}function Dw({animationKey:e,svg:t,secret:n}){return u.jsxs(Sr.div,{...bf,children:[u.jsx("div",{className:"w-192 h-192 mb-16",children:t}),u.jsx("div",{className:"text-sm font-medium mb-16",children:n})]},e)}function GH(){return me(()=>YH(),{onError:e=>dt(e)})}function YH(){return Z.post("auth/user/two-factor-recovery-codes").then(e=>e.data)}function XH({user:e,onDisabled:t}){var l;const n=$T(),r=GH(),{withConfirmedPassword:s,isLoading:i}=jf(),o=n.isLoading||r.isLoading||i,a=u.jsxs(v.Fragment,{children:[u.jsx(te,{type:"button",onClick:()=>s(()=>{r.mutate(void 0,{onSuccess:()=>{ze.invalidateQueries(["users"])}})}),variant:"outline",disabled:o,className:"mr-12",children:u.jsx(j,{message:"Regenerate recovery codes"})}),u.jsx(te,{type:"submit",variant:"flat",color:"danger",disabled:o,onClick:()=>{s(()=>{n.mutate(void 0,{onSuccess:()=>{de(ie("Two factor authentication has been disabled.")),t()}})})},children:u.jsx(j,{message:"Disable"})})]});return u.jsx(c0,{title:u.jsx(j,{message:"You have enabled two factor authentication."}),description:u.jsx(j,{message:"Store these recovery codes in a secure password manager. They can be used to recover access to your account if your two factor authentication device is lost."}),actions:a,children:u.jsx("div",{className:"bg-alt p-14 font-mono text-sm mb-16 rounded",children:(l=e.two_factor_recovery_codes)==null?void 0:l.map(c=>u.jsx("div",{className:"mb-4",children:c},c))})})}function JH({user:e}){const[t,n]=v.useState(ZH(e));switch(t){case 0:return u.jsx(zH,{onEnabled:()=>n(1)});case 1:return u.jsx(KH,{onCancel:()=>{n(0)},onConfirmed:()=>{n(2)}});case 2:return u.jsx(XH,{user:e,onDisabled:()=>n(0)})}}function ZH(e){return e.two_factor_confirmed_at?2:e.two_factor_recovery_codes?1:0}function eq(){return On(["user-sessions"],()=>tq())}function tq(){return Z.get("user-sessions").then(e=>e.data)}const nq=re(u.jsx("path",{d:"M20 18c1.1 0 1.99-.9 1.99-2L22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2H0v2h24v-2h-4zM4 6h16v10H4V6z"}),"ComputerOutlined"),rq=re(u.jsx("path",{d:"M17 1.01 7 1c-1.1 0-2 .9-2 2v18c0 1.1.9 2 2 2h10c1.1 0 2-.9 2-2V3c0-1.1-.9-1.99-2-1.99zM17 19H7V5h10v14z"}),"SmartphoneOutlined"),sq=re(u.jsx("path",{d:"M21 4H3c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h18c1.1 0 1.99-.9 1.99-2L23 6c0-1.1-.9-2-2-2zm-2 14H5V6h14v12z"}),"TabletOutlined");function iq(){return me(e=>oq(e),{onError:e=>dt(e)})}function oq(e){return Z.post("user-sessions/logout-other",e).then(t=>t.data)}function aq({user:e}){var a;const{data:t,isLoading:n}=eq(),r=iq(),{withConfirmedPassword:s,isLoading:i}=jf({needsPassword:!0}),o=u.jsx("div",{className:"max-h-400 overflow-y-auto",children:(a=t==null?void 0:t.sessions)==null?void 0:a.map(l=>u.jsx(lq,{session:l},l.id))});return u.jsxs(ps,{id:Jn.Sessions,title:u.jsx(j,{message:"Active sessions"}),children:[u.jsx("p",{className:"text-sm",children:u.jsx(j,{message:"If necessary, you may log out of all of your other browser sessions across all of your devices. Your recent sessions are listed below. If you feel your account has been compromised, you should also update your password."})}),u.jsx("div",{className:"my-30",children:n?u.jsx("div",{className:"min-h-60",children:u.jsx(hs,{isIndeterminate:!0})}):o}),u.jsx(te,{variant:"outline",color:"primary",disabled:i||r.isLoading,onClick:()=>{s(l=>{r.mutate({password:l},{onSuccess:()=>{de(ie("Logged out other sessions."))}})})},children:u.jsx(j,{message:"Logout other sessions"})})]})}function lq({session:e}){return u.jsxs("div",{className:"flex items-start gap-14 text-sm mb-14",children:[u.jsx("div",{className:"flex-shrink-0 text-muted",children:u.jsx(uq,{device:e.device_type,size:"lg"})}),u.jsxs("div",{className:"flex-auto",children:[u.jsxs("div",{children:[u.jsx(Mw,{children:e.platform})," -"," ",u.jsx(Mw,{children:e.browser})]}),u.jsxs("div",{className:"text-xs my-4",children:[e.city,", ",e.country]}),u.jsxs("div",{className:"text-xs",children:[u.jsx(dq,{session:e})," - ",u.jsx(cq,{session:e})]})]})]})}function uq({device:e,size:t}){switch(e){case"mobile":return u.jsx(rq,{size:t});case"tablet":return u.jsx(sq,{size:t});default:return u.jsx(nq,{size:t})}}function cq({session:e}){return e.is_current_device?u.jsx("span",{className:"text-positive",children:u.jsx(j,{message:"This device"})}):u.jsx(bC,{date:e.last_active})}function dq({session:e}){return e.ip_address?u.jsx("span",{children:e.ip_address}):e.token?u.jsx(j,{message:"API Token"}):u.jsx(j,{message:"Unknown IP"})}function Mw({children:e}){return e?u.jsx(v.Fragment,{children:e}):u.jsx(j,{message:"Unknown"})}function fq(){const{data:e,isLoading:t}=Fj("me",{with:["roles","social_profiles","tokens"]});return u.jsxs("div",{className:"bg-alt min-h-screen",children:[u.jsx(kr,{children:u.jsx(j,{message:"Account Settings"})}),u.jsx(ti,{menuPosition:"account-settings-page"}),u.jsx("div",{children:u.jsxs("div",{className:"container mx-auto my-24 px-24",children:[u.jsx("h1",{className:"text-3xl",children:u.jsx(j,{message:"Account settings"})}),u.jsx("div",{className:"mb-40 text-muted text-base",children:u.jsx(j,{message:"View and update your account details, profile and more."})}),t||!e?u.jsx(hs,{className:"my-80","aria-label":"Loading user..",isIndeterminate:!0}):u.jsxs("div",{className:"flex items-start gap-24",children:[u.jsx(Ez,{}),u.jsxs("main",{className:"flex-auto",children:[u.jsx(XB,{user:e.user}),u.jsx(Cz,{user:e.user}),u.jsx(eH,{}),u.jsx(ps,{id:Jn.TwoFactor,title:u.jsx(j,{message:"Two factor authentication"}),children:u.jsx("div",{className:"max-w-580",children:u.jsx(JH,{user:e.user})})}),u.jsx(aq,{user:e.user}),u.jsx(iH,{user:e.user}),u.jsx(EH,{user:e.user}),u.jsx(RH,{})]})]})]})})]})}function hq(e){const t=gn();return me(pq,{onSuccess:n=>{de(n.message),t("/login")},onError:n=>yn(n,e)})}function pq(e){return Z.post("auth/forgot-password",e).then(t=>t.data)}function mq(){const{registration:e}=ce(),[t]=av(),n=t.get("email")||void 0,r=Yt({defaultValues:{email:n}}),s=hq(r),i=!e.disable&&u.jsx(j,{values:{a:o=>u.jsx(Ze,{className:ls,to:"/register",children:o})},message:"Don't have an account? <a>Sign up.</a>"});return u.jsxs(Hl,{message:i,children:[u.jsx(kr,{children:u.jsx(j,{message:"Forgot Password"})}),u.jsxs(Xt,{form:r,onSubmit:o=>{s.mutate(o)},children:[u.jsx("div",{className:"mb-32 text-sm",children:u.jsx(j,{message:"Enter your email address below and we will send you a link to reset or create your password."})}),u.jsx(Ae,{disabled:!!n,className:"mb-32",name:"email",type:"email",autoComplete:"off",autoCorrect:"off",spellCheck:"false",label:u.jsx(j,{message:"Email"}),required:!0}),u.jsx(te,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:s.isLoading,children:u.jsx(j,{message:"Continue"})})]})]})}function gq(e){return Z.post("auth/reset-password",e).then(t=>t.data)}function yq(e){const t=gn();return me(gq,{onSuccess:()=>{t("/login",{replace:!0}),de(ie("Your password has been reset!"))},onError:n=>yn(n,e)})}function vq(){const{token:e}=iv(),t=Yt({defaultValues:{token:e}}),n=yq(t),r=u.jsx(j,{message:"Reset your account password"}),s=u.jsx(j,{values:{a:i=>u.jsx(Ze,{className:ls,to:"/register",children:i})},message:"Don't have an account? <a>Sign up.</a>"});return u.jsxs(Hl,{heading:r,message:s,children:[u.jsx(kr,{children:u.jsx(j,{message:"Reset Password"})}),u.jsxs(Xt,{form:t,onSubmit:i=>{n.mutate(i)},children:[u.jsx(Ae,{className:"mb-32",name:"email",type:"email",label:u.jsx(j,{message:"Email"}),required:!0}),u.jsx(Ae,{className:"mb-32",name:"password",type:"password",label:u.jsx(j,{message:"New password"}),required:!0}),u.jsx(Ae,{className:"mb-32",name:"password_confirmation",type:"password",label:u.jsx(j,{message:"Confirm password"}),required:!0}),u.jsx(te,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:n.isLoading,children:u.jsx(j,{message:"Reset password"})})]})]})}const xq=u.jsxs(v.Fragment,{children:[u.jsx(Fe,{path:"/register",element:u.jsx(rg,{})}),u.jsx(Fe,{path:"/account-settings",element:u.jsx(ol,{children:u.jsx(fq,{})})}),u.jsx(Fe,{path:"login",element:u.jsx(ws,{children:u.jsx(ig,{})})}),u.jsx(Fe,{path:"/workspace/join/register",element:u.jsx(ws,{children:u.jsx(rg,{})})}),u.jsx(Fe,{path:"/workspace/join/login",element:u.jsx(ws,{children:u.jsx(ig,{})})}),u.jsx(Fe,{path:"forgot-password",element:u.jsx(ws,{children:u.jsx(mq,{})})}),u.jsx(Fe,{path:"/password/reset/:token",element:u.jsx(ws,{children:u.jsx(vq,{})})})]}),bq=re(u.jsx("path",{d:"M15 4v7H5.17L4 12.17V4h11m1-2H3c-.55 0-1 .45-1 1v14l4-4h10c.55 0 1-.45 1-1V3c0-.55-.45-1-1-1zm5 4h-2v9H6v2c0 .55.45 1 1 1h11l4 4V7c0-.55-.45-1-1-1z"}),"ForumOutlined");function wq(){var r;const e=e0("pricingPage"),[t,n]=v.useState("yearly");return u.jsxs(v.Fragment,{children:[u.jsx(kr,{children:u.jsx(j,{message:"Pricing"})}),u.jsx(ti,{color:"bg",darkModeColor:"transparent",border:"border-b",menuPosition:"pricing-table-page"}),u.jsxs("div",{className:"container mx-auto px-24",children:[u.jsx("h1",{className:"mb-30 mt-30 text-center text-3xl font-normal md:mt-60 md:text-4xl md:font-medium",children:u.jsx(j,{message:"Choose the right plan for you"})}),u.jsx(Jk,{products:(r=e.data)==null?void 0:r.products,selectedCycle:t,onChange:n,className:"mb-40 flex justify-center md:mb-70",size:"lg"}),u.jsx(Yk,{selectedCycle:t,productLoader:"pricingPage"}),u.jsx(_q,{})]}),u.jsx(ql,{className:"container mx-auto flex-shrink-0 px-24"})]})}function _q(){return u.jsxs("div",{className:"my-20 p-24 text-center md:my-80",children:[u.jsx(bq,{size:"xl",className:"text-muted"}),u.jsx("div",{className:"my-8 md:text-lg",children:u.jsx(j,{message:"Do you have any questions about PRO accounts?"})}),u.jsx("div",{className:"mb-24 mt-20 text-sm md:mt-0 md:text-base",children:u.jsx(j,{message:"Our support team will be happy to assist you."})}),u.jsx(te,{variant:"flat",color:"primary",elementType:Ze,to:"/contact",children:u.jsx(j,{message:"Contact us"})})]})}const Sq=V.lazy(()=>Ll(()=>import("./billing-page-routes-c2cfda4f.js"),["./billing-page-routes-c2cfda4f.js","./OpenInNew-a6691840.js","./billing-redirect-message-e23b0354.js","./TaskAlt-a220d1ec.js","./use-resume-subscription-0d036444.js","./CalendarToday-5a6bc8f6.js"],import.meta.url)),Eq=V.lazy(()=>Ll(()=>import("./checkout-routes-80fb97ff.js"),["./checkout-routes-80fb97ff.js","./billing-redirect-message-e23b0354.js","./TaskAlt-a220d1ec.js"],import.meta.url)),Cq=u.jsxs(v.Fragment,{children:[u.jsx(Fe,{path:"/pricing",element:u.jsx(wq,{})}),u.jsx(Fe,{path:"checkout/*",element:u.jsx(V.Suspense,{fallback:u.jsx(Vi,{screen:!0}),children:u.jsx(Eq,{})})}),u.jsx(Fe,{path:"billing/*",element:u.jsx(V.Suspense,{fallback:u.jsx(Vi,{screen:!0}),children:u.jsx(Sq,{})})})]});function jq(){const{user:e}=tt(),{data:t,isLoading:n}=Rn({perPage:30}),r=!!(e!=null&&e.unread_notifications_count),s=Zy(),i=()=>{t&&s.mutate({ids:t.pagination.data.map(a=>a.id)})},o=u.jsx(te,{variant:"outline",color:"primary",size:"xs",startIcon:u.jsx(Mk,{}),onClick:i,disabled:s.isLoading||n,className:"ml-auto",children:u.jsx(j,{message:"Mark all as read"})});return u.jsxs(v.Fragment,{children:[u.jsx(kr,{children:u.jsx(j,{message:"Notifications"})}),u.jsx(ti,{menuPosition:"notifications-page"}),u.jsxs("div",{className:"container mx-auto p-16 md:p-24 min-h-[1000px]",children:[u.jsxs("div",{className:"flex items-center gap-24 mb-30",children:[u.jsx("h1",{className:"text-3xl",children:u.jsx(j,{message:"Notifications"})}),r&&o]}),u.jsx(kq,{})]}),u.jsx(ql,{className:"container mx-auto mt-48 p-16 md:p-24"})]})}function kq(){const{data:e,isLoading:t}=Rn({perPage:30});return t?u.jsx("div",{className:"flex items-center justify-center py-10",children:u.jsx(hs,{"aria-label":"Loading notifications...",isIndeterminate:!0})}):e!=null&&e.pagination.data.length?u.jsx(BC,{className:"rounded border",notifications:e.pagination.data}):u.jsx(Lk,{})}function Tq(){return Z.get("notifications/me/subscriptions").then(e=>e.data)}function Pq(){return On(["notification-subscriptions"],()=>Tq(),{staleTime:1/0})}function Rq(e){return Z.put("notifications/me/subscriptions",{selections:e}).then(t=>t.data)}function Nq(){return me(e=>Rq(e),{onSuccess:()=>{de(ie("Updated preferences")),ze.invalidateQueries(["notification-subscriptions"])},onError:e=>dt(e)})}function Oq(){const e=Nq(),{data:t,isFetched:n}=Pq(),[r,s]=v.useState();return v.useEffect(()=>{if(t&&!r){const i={},o={};t.available_channels.forEach(a=>{o[a]=!1}),t.subscriptions.forEach(a=>{a.subscriptions.forEach(l=>{const c=t.user_selections.find(d=>d.notif_id===l.notif_id);i[l.notif_id]=(c==null?void 0:c.channels)||{...o}})}),s(i)}},[t,r]),u.jsxs("div",{className:"min-h-screen bg-alt",children:[u.jsx(ti,{menuPosition:"notifications-page"}),!n||!t||!r?u.jsx("div",{className:"container mx-auto my-100 flex justify-center",children:u.jsx(hs,{size:"md",isIndeterminate:!0,"aria-label":"Loading subscriptions..."})}):u.jsx("div",{className:"container mx-auto my-20 px-10 md:my-40 md:px-20",children:u.jsxs("div",{className:"rounded border bg-paper px-20 pb-30 pt-20",children:[t.subscriptions.map(i=>u.jsxs("div",{className:"mb-10 text-sm",children:[u.jsx(Aq,{group:i,allChannels:t==null?void 0:t.available_channels,selection:r,setSelection:s},i.group_name),i.subscriptions.map(o=>u.jsx($q,{subscription:o,selection:r,setSelection:s,allChannels:t==null?void 0:t.available_channels},o.notif_id))]},i.group_name)),u.jsx(te,{className:"ml-10 mt-20",variant:"flat",color:"primary",disabled:e.isLoading,onClick:()=>{e.mutate(Object.entries(r).map(([i,o])=>({notif_id:i,channels:o})))},children:u.jsx(j,{message:"Update preferences"})})]})})]})}function Aq({group:e,allChannels:t,selection:n,setSelection:r}){const s=(o,a)=>{const l=Xy(n,c=>{Object.keys(n).forEach(d=>{c[d][o]=a})});r(l)},i=u.jsx("div",{className:"ml-auto flex items-center gap-40 max-md:hidden",children:t.map(o=>{const a=Object.values(n).every(c=>c[o]),l=!a&&Object.values(n).some(c=>c[o]);return u.jsx(Yv,{orientation:"vertical",isIndeterminate:l,checked:a,onChange:async c=>{if(o==="browser"){const d=await IT();s(o,d?!a:!1)}else s(o,!a)},children:u.jsx(j,{message:o})},o)})});return u.jsxs("div",{className:"flex items-center border-b p-10",children:[u.jsx("div",{className:"font-medium",children:u.jsx(j,{message:e.group_name})}),i]})}function $q({subscription:e,allChannels:t,selection:n,setSelection:r}){const s=e.notif_id,i=(o,a)=>{const l=Xy(n,c=>{c[e.notif_id][o]=a});r(l)};return u.jsxs("div",{className:"items-center border-b py-10 pl-8 pr-10 md:flex md:pl-20",children:[u.jsx("div",{className:"pb-14 font-semibold md:pb-0 md:font-normal",children:u.jsx(j,{message:e.name})}),u.jsx("div",{className:"ml-auto flex items-center gap-40",children:t.map(o=>u.jsx(Yv,{orientation:"vertical",checked:n[s][o],onChange:async a=>{const l=!n[s][o];if(o==="browser"){const c=await IT();i(o,c?l:!1)}else i(o,l)},"aria-label":o,children:u.jsx("div",{className:"md:invisible md:h-0",children:u.jsx(j,{message:o})})},o))})]})}function IT(){return Notification.permission==="granted"?Promise.resolve(!0):Notification.permission==="denied"?(de.danger(ie("Notifications blocked. Please enable them for this site from browser settings.")),Promise.resolve(!1)):Notification.requestPermission().then(e=>e==="granted")}const Iq=u.jsxs(v.Fragment,{children:[u.jsx(Fe,{path:"/notifications",element:u.jsx(ol,{children:u.jsx(YD,{children:u.jsx(jq,{})})})}),u.jsx(Fe,{path:"/notifications/settings",element:u.jsx(ol,{children:u.jsx(Oq,{})})})]});function Dq(e){const{trans:t}=Xn(),n=gn();return me(r=>Mq(r),{onSuccess:()=>{de(t(ie("Your message has been submitted."))),n("/")},onError:r=>yn(r,e)})}function Mq(e){return Z.post("contact-page",e).then(t=>t.data)}function Lq(){const e=Yt(),t=Dq(e),{verify:n,isVerifying:r}=Rk("contact");return u.jsxs("div",{className:"flex flex-col bg-alt min-h-screen",children:[u.jsx(kr,{children:u.jsx(j,{message:"Contact us"})}),u.jsx(ti,{className:"flex-shrink-0 sticky top-0",menuPosition:"contact-us-page"}),u.jsx("div",{className:"container p-24 md:p-40 mx-auto flex-auto flex items-center justify-center",children:u.jsxs("div",{className:"border rounded bg-paper p-24 max-w-620",children:[u.jsx("h1",{className:"text-2xl",children:u.jsx(j,{message:"Contact us"})}),u.jsx("p",{className:"text-sm mt-4 mb-30",children:u.jsx(j,{message:"Please use the form below to send us a message and we'll get back to you as soon as possible."})}),u.jsxs(Xt,{form:e,onSubmit:async s=>{await n()&&t.mutate(s)},children:[u.jsx(Ae,{label:u.jsx(j,{message:"Name"}),name:"name",required:!0,className:"mb-20"}),u.jsx(Ae,{label:u.jsx(j,{message:"Email"}),name:"email",required:!0,type:"email",className:"mb-20"}),u.jsx(Ae,{label:u.jsx(j,{message:"Message"}),name:"message",required:!0,inputElementType:"textarea",className:"mb-20",rows:8}),u.jsx(te,{type:"submit",variant:"flat",color:"primary",disabled:t.isLoading||r,children:u.jsx(j,{message:"Send"})})]})]})}),u.jsx(ql,{className:"container mx-auto px-24 flex-shrink-0"})]})}function Fq(){const{dialog:e,data:t}=d0();return u.jsx(Uo,{type:"modal",isOpen:e!=null,onClose:n=>{MH(n)},children:e?u.jsx(e,{...t}):null})}const Uq=V.lazy(()=>Ll(()=>import("./admin-routes-9d21ca72.js").then(e=>e.X),["./admin-routes-9d21ca72.js","./user-profile-link-bc31d40d.js","./OpenInNew-a6691840.js","./use-resume-subscription-0d036444.js"],import.meta.url)),zq=V.lazy(()=>Ll(()=>import("./swagger-api-docs-page-5526957e.js"),["./swagger-api-docs-page-5526957e.js","./index-f3ff7ee6.js","./format-759fee02.js","./swagger-api-docs-page-34ffaf07.css"],import.meta.url)),Vq=V.lazy(()=>Ll(()=>import("./site-routes-1101dbb3.js"),["./site-routes-1101dbb3.js","./user-profile-link-bc31d40d.js","./OpenInNew-a6691840.js","./BookmarkBorder-2abfb8d0.js","./linkify.es-03432d4a.js"],import.meta.url));function Bq(){var l;const{homepage:e,billing:t,notifications:n,require_email_confirmation:r,api:s}=ce(),{isAppearanceEditorActive:i}=Sv(),{user:o,hasPermission:a}=tt();return o!=null&&r&&!o.email_verified_at?u.jsxs(v.Fragment,{children:[u.jsx(bb,{}),u.jsx(Px,{children:u.jsx(Fe,{path:"*",element:u.jsx(w8,{})})})]}):u.jsxs(v.Fragment,{children:[u.jsx(_8,{}),u.jsx(j8,{}),u.jsx(bb,{}),u.jsxs(Px,{children:[u.jsx(Fe,{path:"/*",element:u.jsx(ol,{requireLogin:!1,permission:"titles.view",children:u.jsx(V.Suspense,{fallback:u.jsx(Vi,{screen:!0}),children:u.jsx(Vq,{})})})}),!((l=e==null?void 0:e.type)!=null&&l.startsWith("channel"))&&(o==null||i)&&u.jsx(Fe,{path:"/",element:u.jsx(MU,{homepageResolver:()=>u.jsx(uz,{})})}),u.jsx(Fe,{path:"/admin/*",element:u.jsx(ol,{permission:"admin.access",children:u.jsx(V.Suspense,{fallback:u.jsx(Vi,{screen:!0}),children:u.jsx(Uq,{})})})}),xq,t.enable&&Cq,n.integrated&&Iq,(s==null?void 0:s.integrated)&&a("api.access")&&u.jsx(Fe,{path:"api-docs",element:u.jsx(V.Suspense,{fallback:u.jsx(Vi,{screen:!0}),children:u.jsx(zq,{})})}),u.jsx(Fe,{path:"contact",element:u.jsx(Lq,{})}),u.jsx(Fe,{path:"pages/:pageSlug",element:u.jsx(sg,{})}),u.jsx(Fe,{path:"pages/:pageId/:pageSlug",element:u.jsx(sg,{})}),u.jsx(Fe,{path:"*",element:u.jsx(Pv,{})})]}),u.jsx(Fq,{})]})}const kf=Pn(),Lw=kf.settings.logging.sentry_public;Lw&&e8({dsn:Lw,integrations:[new Gc],tracesSampleRate:.2,ignoreErrors:t8,release:kf.sentry_release});const Fw=u.jsx(DD,{basename:kf.settings.html_base_uri,children:u.jsx(uM,{children:u.jsx(Bq,{})})});kf.rendered_ssr?ZS(os,Fw):e2(os).render(Fw);export{al as $,To as A,te as B,Xc as C,Uo as D,qd as E,Ul as F,zl as G,Vl as H,Cr as I,gf as J,yn as K,F$ as L,U$ as M,ti as N,zC as O,VB as P,P$ as Q,V as R,sH as S,j as T,wk as U,oH as V,$o as W,hC as X,jr as Y,Yt as Z,Xt as _,Y7 as a,Rz as a$,Ae as a0,Ze as a1,Ck as a2,Ij as a3,qU as a4,lH as a5,HU as a6,Wd as a7,fW as a8,pW as a9,RC as aA,iv as aB,gn as aC,Lt as aD,FD as aE,g2 as aF,Vi as aG,ls as aH,jl as aI,xW as aJ,wf as aK,_f as aL,fn as aM,ln as aN,Yv as aO,SW as aP,_W as aQ,aH as aR,Pl as aS,yB as aT,ik as aU,Io as aV,sk as aW,Iv as aX,x8 as aY,Fj as aZ,Tz as a_,i8 as aa,Do as ab,YB as ac,ff as ad,Vk as ae,Mk as af,gz as ag,yz as ah,Xy as ai,Ll as aj,sr as ak,Hd as al,tp as am,Sk as an,dW as ao,a$ as ap,Qy as aq,Jy as ar,On as as,An as at,pb as au,Sv as av,ef as aw,AB as ax,hs as ay,Rl as az,re as b,$$ as b$,Cl as b0,e0 as b1,GU as b2,PU as b3,H5 as b4,bC as b5,FB as b6,pf as b7,SB as b8,xg as b9,qq as bA,f2 as bB,Eo as bC,gH as bD,Wq as bE,yV as bF,ql as bG,av as bH,lv as bI,vH as bJ,ak as bK,lk as bL,xz as bM,Cs as bN,tt as bO,rz as bP,uW as bQ,QU as bR,mU as bS,kR as bT,CR as bU,Kq as bV,Qq as bW,oa as bX,JR as bY,Tl as bZ,R$ as b_,fl as ba,Xk as bb,ag as bc,DH as bd,lW as be,TU as bf,CW as bg,DB as bh,bg as bi,kU as bj,BU as bk,c7 as bl,Hk as bm,O8 as bn,sI as bo,zs as bp,Pn as bq,Zs as br,nf as bs,z9 as bt,ol as bu,Y9 as bv,yD as bw,Pv as bx,Qn as by,rc as bz,D as c,uU as c$,rW as c0,Zq as c1,eW as c2,xf as c3,wW as c4,Ga as c5,yC as c6,oW as c7,iW as c8,Uc as c9,mI as cA,EC as cB,EW as cC,kT as cD,aW as cE,Zv as cF,Jk as cG,og as cH,Px as cI,Fe as cJ,mW as cK,yW as cL,Rh as cM,_U as cN,YU as cO,Kk as cP,aU as cQ,BB as cR,wz as cS,rU as cT,L9 as cU,s8 as cV,nq as cW,_z as cX,zk as cY,Sz as cZ,Dj as c_,A$ as ca,Xq as cb,xk as cc,cW as cd,N$ as ce,nW as cf,tW as cg,nC as ch,Jq as ci,sW as cj,X$ as ck,HB as cl,Tb as cm,gW as cn,nn as co,df as cp,bW as cq,Wv as cr,Qv as cs,Ca as ct,Gv as cu,Mj as cv,hW as cw,vW as cx,os as cy,oz as cz,ie as d,h$ as d0,bq as d1,d$ as d2,Bk as d3,lU as d4,SU as d5,vz as d6,nU as d7,Ik as d8,oU as d9,f$ as da,bz as db,rq as dc,sq as dd,T9 as de,c$ as df,zv as e,jv as f,Ev as g,Pt as h,Xn as i,u as j,mf as k,nH as l,Sr as m,kr as n,bf as o,me as p,ze as q,v as r,Cv as s,de as t,ce as u,dt as v,Z as w,Nl as x,AT as y,Jv as z};
//# sourceMappingURL=main-a8767cd0.js.map