var zN=Object.defineProperty;var VN=(e,t,n)=>t in e?zN(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Ne=(e,t,n)=>(VN(e,typeof t!="symbol"?t+"":t,n),n),Yp=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)};var O=(e,t,n)=>(Yp(e,t,"read from private field"),n?n.call(e):t.get(e)),se=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},J=(e,t,n,r)=>(Yp(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n);var Zc=(e,t,n,r)=>({set _(s){J(e,t,s,n)},get _(){return O(e,t,r)}}),pe=(e,t,n)=>(Yp(e,t,"access private method"),n);function BN(e,t){for(var n=0;nr[s]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Sg=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Nr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a2={exports:{}},Ih={},l2={exports:{}},be={};/** * @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 vc=Symbol.for("react.element"),HN=Symbol.for("react.portal"),qN=Symbol.for("react.fragment"),WN=Symbol.for("react.strict_mode"),KN=Symbol.for("react.profiler"),GN=Symbol.for("react.provider"),QN=Symbol.for("react.context"),YN=Symbol.for("react.forward_ref"),XN=Symbol.for("react.suspense"),JN=Symbol.for("react.memo"),ZN=Symbol.for("react.lazy"),rb=Symbol.iterator;function eO(e){return e===null||typeof e!="object"?null:(e=rb&&e[rb]||e["@@iterator"],typeof e=="function"?e:null)}var u2={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},c2=Object.assign,f2={};function il(e,t,n){this.props=e,this.context=t,this.refs=f2,this.updater=n||u2}il.prototype.isReactComponent={};il.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")};il.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function d2(){}d2.prototype=il.prototype;function e0(e,t,n){this.props=e,this.context=t,this.refs=f2,this.updater=n||u2}var t0=e0.prototype=new d2;t0.constructor=e0;c2(t0,il.prototype);t0.isPureReactComponent=!0;var sb=Array.isArray,h2=Object.prototype.hasOwnProperty,n0={current:null},p2={key:!0,ref:!0,__self:!0,__source:!0};function m2(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)h2.call(t,r)&&!p2.hasOwnProperty(r)&&(s[r]=t[r]);var a=arguments.length-2;if(a===1)s.children=n;else if(1>>1,q=C[I];if(0>>1;Is(xe,$))Xs(ue,xe)?(C[I]=ue,C[X]=$,I=X):(C[I]=xe,C[te]=$,I=te);else if(Xs(ue,$))C[I]=ue,C[X]=$,I=X;else break e}}return D}function s(C,D){var $=C.sortIndex-D.sortIndex;return $!==0?$:C.id-D.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=[],f=1,d=null,h=3,p=!1,g=!1,w=!1,b=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 v(C){for(var D=n(c);D!==null;){if(D.callback===null)r(c);else if(D.startTime<=C)r(c),D.sortIndex=D.expirationTime,t(l,D);else break;D=n(c)}}function _(C){if(w=!1,v(C),!g)if(n(l)!==null)g=!0,P(S);else{var D=n(c);D!==null&&T(_,D.startTime-C)}}function S(C,D){g=!1,w&&(w=!1,y(R),R=-1),p=!0;var $=h;try{for(v(D),d=n(l);d!==null&&(!(d.expirationTime>D)||C&&!z());){var I=d.callback;if(typeof I=="function"){d.callback=null,h=d.priorityLevel;var q=I(d.expirationTime<=D);D=e.unstable_now(),typeof q=="function"?d.callback=q:d===n(l)&&r(l),v(D)}else r(l);d=n(l)}if(d!==null)var ie=!0;else{var te=n(c);te!==null&&T(_,te.startTime-D),ie=!1}return ie}finally{d=null,h=$,p=!1}}var E=!1,j=null,R=-1,M=5,L=-1;function z(){return!(e.unstable_now()-LC||125I?(C.sortIndex=$,t(c,C),n(l)===null&&C===n(c)&&(w?(y(R),R=-1):w=!0,T(_,$-I))):(C.sortIndex=q,t(l,C),g||p||(g=!0,P(S))),C},e.unstable_shouldYield=z,e.unstable_wrapCallback=function(C){var D=h;return function(){var $=h;h=D;try{return C.apply(this,arguments)}finally{h=$}}}})(x2);v2.exports=x2;var dO=v2.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 b2=x,xn=dO;function W(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Eg=Object.prototype.hasOwnProperty,hO=/^[: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]*$/,ob={},ab={};function pO(e){return Eg.call(ab,e)?!0:Eg.call(ob,e)?!1:hO.test(e)?ab[e]=!0:(ob[e]=!0,!1)}function mO(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 gO(e,t,n,r){if(t===null||typeof t>"u"||mO(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 Wt(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 Tt={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Tt[e]=new Wt(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Tt[t]=new Wt(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Tt[e]=new Wt(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Tt[e]=new Wt(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){Tt[e]=new Wt(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Tt[e]=new Wt(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Tt[e]=new Wt(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Tt[e]=new Wt(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Tt[e]=new Wt(e,5,!1,e.toLowerCase(),null,!1,!1)});var s0=/[\-:]([a-z])/g;function i0(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(s0,i0);Tt[t]=new Wt(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(s0,i0);Tt[t]=new Wt(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(s0,i0);Tt[t]=new Wt(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Tt[e]=new Wt(e,1,!1,e.toLowerCase(),null,!1,!1)});Tt.xlinkHref=new Wt("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Tt[e]=new Wt(e,1,!1,e.toLowerCase(),null,!0,!0)});function o0(e,t,n,r){var s=Tt.hasOwnProperty(t)?Tt[t]:null;(s!==null?s.type!==0:r||!(2a||s[o]!==i[a]){var l=` `+s[o].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=o&&0<=a);break}}}finally{Zp=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ql(e):""}function yO(e){switch(e.tag){case 5:return Ql(e.type);case 16:return Ql("Lazy");case 13:return Ql("Suspense");case 19:return Ql("SuspenseList");case 0:case 2:case 15:return e=em(e.type,!1),e;case 11:return e=em(e.type.render,!1),e;case 1:return e=em(e.type,!0),e;default:return""}}function kg(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 Ro:return"Fragment";case Po:return"Portal";case Cg:return"Profiler";case a0:return"StrictMode";case Tg:return"Suspense";case jg:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case S2:return(e.displayName||"Context")+".Consumer";case _2:return(e._context.displayName||"Context")+".Provider";case l0:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case u0:return t=e.displayName||null,t!==null?t:kg(e.type)||"Memo";case ws:t=e._payload,e=e._init;try{return kg(e(t))}catch{}}return null}function vO(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 kg(t);case 8:return t===a0?"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 Xs(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function C2(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xO(e){var t=C2(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 nf(e){e._valueTracker||(e._valueTracker=xO(e))}function T2(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=C2(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function yd(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 Pg(e,t){var n=t.checked;return Ke({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function ub(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=Xs(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 j2(e,t){t=t.checked,t!=null&&o0(e,"checked",t,!1)}function Rg(e,t){j2(e,t);var n=Xs(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")?Ng(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ng(e,t.type,Xs(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function cb(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 Ng(e,t,n){(t!=="number"||yd(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Yl=Array.isArray;function Ko(e,t,n,r){if(e=e.options,t){t={};for(var s=0;s"+t.valueOf().toString()+"",t=rf.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function bu(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var iu={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},bO=["Webkit","ms","Moz","O"];Object.keys(iu).forEach(function(e){bO.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),iu[t]=iu[e]})});function N2(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||iu.hasOwnProperty(e)&&iu[e]?(""+t).trim():t+"px"}function O2(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,s=N2(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,s):e[n]=s}}var wO=Ke({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 Ig(e,t){if(t){if(wO[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(W(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(W(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(W(61))}if(t.style!=null&&typeof t.style!="object")throw Error(W(62))}}function Dg(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 $g=null;function c0(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Lg=null,Go=null,Qo=null;function hb(e){if(e=wc(e)){if(typeof Lg!="function")throw Error(W(280));var t=e.stateNode;t&&(t=Fh(t),Lg(e.stateNode,e.type,t))}}function A2(e){Go?Qo?Qo.push(e):Qo=[e]:Go=e}function I2(){if(Go){var e=Go,t=Qo;if(Qo=Go=null,hb(e),t)for(e=0;e>>=0,e===0?32:31-(OO(e)/AO|0)|0}var sf=64,of=4194304;function Xl(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 wd(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=Xl(a):(i&=o,i!==0&&(r=Xl(i)))}else o=n&~s,o!==0?r=Xl(o):i!==0&&(r=Xl(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;0n;n++)t.push(e);return t}function xc(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Zn(t),e[t]=n}function LO(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=au),_b=String.fromCharCode(32),Sb=!1;function eC(e,t){switch(e){case"keyup":return f3.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var No=!1;function h3(e,t){switch(e){case"compositionend":return tC(t);case"keypress":return t.which!==32?null:(Sb=!0,_b);case"textInput":return e=t.data,e===_b&&Sb?null:e;default:return null}}function p3(e,t){if(No)return e==="compositionend"||!v0&&eC(e,t)?(e=J2(),qf=m0=Ds=null,No=!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)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=jb(n)}}function iC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?iC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function oC(){for(var e=window,t=yd();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=yd(e.document)}return t}function x0(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 S3(e){var t=oC(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&iC(n.ownerDocument.documentElement,n)){if(r!==null&&x0(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=kb(n,i);var o=kb(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=document.documentMode,Oo=null,Bg=null,uu=null,Hg=!1;function Pb(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Hg||Oo==null||Oo!==yd(r)||(r=Oo,"selectionStart"in r&&x0(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}),uu&&Tu(uu,r)||(uu=r,r=Ed(Bg,"onSelect"),0Do||(e.current=Yg[Do],Yg[Do]=null,Do--)}function Me(e,t){Do++,Yg[Do]=e.current,e.current=t}var Js={},Ft=ai(Js),Zt=ai(!1),Mi=Js;function Ca(e,t){var n=e.type.contextTypes;if(!n)return Js;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 en(e){return e=e.childContextTypes,e!=null}function Td(){ze(Zt),ze(Ft)}function $b(e,t,n){if(Ft.current!==Js)throw Error(W(168));Me(Ft,t),Me(Zt,n)}function mC(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(W(108,vO(e)||"Unknown",s));return Ke({},n,r)}function jd(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Js,Mi=Ft.current,Me(Ft,e),Me(Zt,Zt.current),!0}function Lb(e,t,n){var r=e.stateNode;if(!r)throw Error(W(169));n?(e=mC(e,t,Mi),r.__reactInternalMemoizedMergedChildContext=e,ze(Zt),ze(Ft),Me(Ft,e)):ze(Zt),Me(Zt,n)}var Hr=null,Uh=!1,pm=!1;function gC(e){Hr===null?Hr=[e]:Hr.push(e)}function D3(e){Uh=!0,gC(e)}function li(){if(!pm&&Hr!==null){pm=!0;var e=0,t=Re;try{var n=Hr;for(Re=1;e>=o,s-=o,Yr=1<<32-Zn(t)+s|n<R?(M=j,j=null):M=j.sibling;var L=h(y,j,v[R],_);if(L===null){j===null&&(j=M);break}e&&j&&L.alternate===null&&t(y,j),m=i(L,m,R),E===null?S=L:E.sibling=L,E=L,j=M}if(R===v.length)return n(y,j),Ve&&di(y,R),S;if(j===null){for(;RR?(M=j,j=null):M=j.sibling;var z=h(y,j,L.value,_);if(z===null){j===null&&(j=M);break}e&&j&&z.alternate===null&&t(y,j),m=i(z,m,R),E===null?S=z:E.sibling=z,E=z,j=M}if(L.done)return n(y,j),Ve&&di(y,R),S;if(j===null){for(;!L.done;R++,L=v.next())L=d(y,L.value,_),L!==null&&(m=i(L,m,R),E===null?S=L:E.sibling=L,E=L);return Ve&&di(y,R),S}for(j=r(y,j);!L.done;R++,L=v.next())L=p(j,y,R,L.value,_),L!==null&&(e&&L.alternate!==null&&j.delete(L.key===null?R:L.key),m=i(L,m,R),E===null?S=L:E.sibling=L,E=L);return e&&j.forEach(function(H){return t(y,H)}),Ve&&di(y,R),S}function b(y,m,v,_){if(typeof v=="object"&&v!==null&&v.type===Ro&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case tf:e:{for(var S=v.key,E=m;E!==null;){if(E.key===S){if(S=v.type,S===Ro){if(E.tag===7){n(y,E.sibling),m=s(E,v.props.children),m.return=y,y=m;break e}}else if(E.elementType===S||typeof S=="object"&&S!==null&&S.$$typeof===ws&&Hb(S)===E.type){n(y,E.sibling),m=s(E,v.props),m.ref=Ml(y,E,v),m.return=y,y=m;break e}n(y,E);break}else t(y,E);E=E.sibling}v.type===Ro?(m=Ii(v.props.children,y.mode,_,v.key),m.return=y,y=m):(_=Zf(v.type,v.key,v.props,null,y.mode,_),_.ref=Ml(y,m,v),_.return=y,y=_)}return o(y);case Po:e:{for(E=v.key;m!==null;){if(m.key===E)if(m.tag===4&&m.stateNode.containerInfo===v.containerInfo&&m.stateNode.implementation===v.implementation){n(y,m.sibling),m=s(m,v.children||[]),m.return=y,y=m;break e}else{n(y,m);break}else t(y,m);m=m.sibling}m=_m(v,y.mode,_),m.return=y,y=m}return o(y);case ws:return E=v._init,b(y,m,E(v._payload),_)}if(Yl(v))return g(y,m,v,_);if(Al(v))return w(y,m,v,_);hf(y,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,m!==null&&m.tag===6?(n(y,m.sibling),m=s(m,v),m.return=y,y=m):(n(y,m),m=wm(v,y.mode,_),m.return=y,y=m),o(y)):n(y,m)}return b}var ja=EC(!0),CC=EC(!1),_c={},Tr=ai(_c),Ru=ai(_c),Nu=ai(_c);function yi(e){if(e===_c)throw Error(W(174));return e}function k0(e,t){switch(Me(Nu,t),Me(Ru,e),Me(Tr,_c),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Ag(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Ag(t,e)}ze(Tr),Me(Tr,t)}function ka(){ze(Tr),ze(Ru),ze(Nu)}function TC(e){yi(Nu.current);var t=yi(Tr.current),n=Ag(t,e.type);t!==n&&(Me(Ru,e),Me(Tr,n))}function P0(e){Ru.current===e&&(ze(Tr),ze(Ru))}var He=ai(0);function Ad(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 mm=[];function R0(){for(var e=0;en?n:4,e(!0);var r=gm.transition;gm.transition={};try{e(!1),t()}finally{Re=n,gm.transition=r}}function VC(){return zn().memoizedState}function F3(e,t,n){var r=qs(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},BC(e))HC(t,n);else if(n=bC(e,t,n,r),n!==null){var s=Ht();er(n,e,r,s),qC(n,t,r)}}function U3(e,t,n){var r=qs(e),s={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(BC(e))HC(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,nr(a,o)){var l=t.interleaved;l===null?(s.next=s,T0(t)):(s.next=l.next,l.next=s),t.interleaved=s;return}}catch{}finally{}n=bC(e,t,s,r),n!==null&&(s=Ht(),er(n,e,r,s),qC(n,t,r))}}function BC(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function HC(e,t){cu=Id=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qC(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,d0(e,n)}}var Dd={readContext:Un,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useInsertionEffect:Pt,useLayoutEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useMutableSource:Pt,useSyncExternalStore:Pt,useId:Pt,unstable_isNewReconciler:!1},z3={readContext:Un,useCallback:function(e,t){return pr().memoizedState=[e,t===void 0?null:t],e},useContext:Un,useEffect:Wb,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Qf(4194308,4,LC.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Qf(4194308,4,e,t)},useInsertionEffect:function(e,t){return Qf(4,2,e,t)},useMemo:function(e,t){var n=pr();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=pr();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=F3.bind(null,qe,e),[r.memoizedState,e]},useRef:function(e){var t=pr();return e={current:e},t.memoizedState=e},useState:qb,useDebugValue:D0,useDeferredValue:function(e){return pr().memoizedState=e},useTransition:function(){var e=qb(!1),t=e[0];return e=M3.bind(null,e[1]),pr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=qe,s=pr();if(Ve){if(n===void 0)throw Error(W(407));n=n()}else{if(n=t(),vt===null)throw Error(W(349));Ui&30||PC(r,t,n)}s.memoizedState=n;var i={value:n,getSnapshot:t};return s.queue=i,Wb(NC.bind(null,r,i,e),[e]),r.flags|=2048,Iu(9,RC.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=pr(),t=vt.identifierPrefix;if(Ve){var n=Xr,r=Yr;n=(r&~(1<<32-Zn(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Ou++,0<\/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[wr]=t,e[Pu]=r,eT(e,t,!1,!1),t.stateNode=e;e:{switch(o=Dg(n,r),n){case"dialog":Fe("cancel",e),Fe("close",e),s=r;break;case"iframe":case"object":case"embed":Fe("load",e),s=r;break;case"video":case"audio":for(s=0;sRa&&(t.flags|=128,r=!0,Fl(i,!1),t.lanes=4194304)}else{if(!r)if(e=Ad(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Fl(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!Ve)return Rt(t),null}else 2*Je()-i.renderingStartTime>Ra&&n!==1073741824&&(t.flags|=128,r=!0,Fl(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=Je(),t.sibling=null,n=He.current,Me(He,r?n&1|2:n&1),t):(Rt(t),null);case 22:case 23:return z0(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?ln&1073741824&&(Rt(t),t.subtreeFlags&6&&(t.flags|=8192)):Rt(t),null;case 24:return null;case 25:return null}throw Error(W(156,t.tag))}function Q3(e,t){switch(w0(t),t.tag){case 1:return en(t.type)&&Td(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ka(),ze(Zt),ze(Ft),R0(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return P0(t),null;case 13:if(ze(He),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(W(340));Ta()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ze(He),null;case 4:return ka(),null;case 10:return C0(t.type._context),null;case 22:case 23:return z0(),null;case 24:return null;default:return null}}var mf=!1,It=!1,Y3=typeof WeakSet=="function"?WeakSet:Set,ne=null;function Fo(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Qe(e,t,r)}else n.current=null}function ly(e,t,n){try{n()}catch(r){Qe(e,t,r)}}var tw=!1;function X3(e,t){if(qg=_d,e=oC(),x0(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,f=0,d=e,h=null;t:for(;;){for(var p;d!==n||s!==0&&d.nodeType!==3||(a=o+s),d!==i||r!==0&&d.nodeType!==3||(l=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++c===s&&(a=o),h===i&&++f===r&&(l=o),(p=d.nextSibling)!==null)break;d=h,h=d.parentNode}d=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Wg={focusedElem:e,selectionRange:n},_d=!1,ne=t;ne!==null;)if(t=ne,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ne=e;else for(;ne!==null;){t=ne;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 w=g.memoizedProps,b=g.memoizedState,y=t.stateNode,m=y.getSnapshotBeforeUpdate(t.elementType===t.type?w:Qn(t.type,w),b);y.__reactInternalSnapshotBeforeUpdate=m}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(W(163))}}catch(_){Qe(t,t.return,_)}if(e=t.sibling,e!==null){e.return=t.return,ne=e;break}ne=t.return}return g=tw,tw=!1,g}function fu(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&&ly(t,n,i)}s=s.next}while(s!==r)}}function Bh(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 uy(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 rT(e){var t=e.alternate;t!==null&&(e.alternate=null,rT(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[wr],delete t[Pu],delete t[Qg],delete t[A3],delete t[I3])),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 sT(e){return e.tag===5||e.tag===3||e.tag===4}function nw(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||sT(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 cy(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=Cd));else if(r!==4&&(e=e.child,e!==null))for(cy(e,t,n),e=e.sibling;e!==null;)cy(e,t,n),e=e.sibling}function fy(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(fy(e,t,n),e=e.sibling;e!==null;)fy(e,t,n),e=e.sibling}var wt=null,Xn=!1;function ys(e,t,n){for(n=n.child;n!==null;)iT(e,t,n),n=n.sibling}function iT(e,t,n){if(Cr&&typeof Cr.onCommitFiberUnmount=="function")try{Cr.onCommitFiberUnmount(Dh,n)}catch{}switch(n.tag){case 5:It||Fo(n,t);case 6:var r=wt,s=Xn;wt=null,ys(e,t,n),wt=r,Xn=s,wt!==null&&(Xn?(e=wt,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):wt.removeChild(n.stateNode));break;case 18:wt!==null&&(Xn?(e=wt,n=n.stateNode,e.nodeType===8?hm(e.parentNode,n):e.nodeType===1&&hm(e,n),Eu(e)):hm(wt,n.stateNode));break;case 4:r=wt,s=Xn,wt=n.stateNode.containerInfo,Xn=!0,ys(e,t,n),wt=r,Xn=s;break;case 0:case 11:case 14:case 15:if(!It&&(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)&&ly(n,t,o),s=s.next}while(s!==r)}ys(e,t,n);break;case 1:if(!It&&(Fo(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Qe(n,t,a)}ys(e,t,n);break;case 21:ys(e,t,n);break;case 22:n.mode&1?(It=(r=It)||n.memoizedState!==null,ys(e,t,n),It=r):ys(e,t,n);break;default:ys(e,t,n)}}function rw(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Y3),t.forEach(function(r){var s=oA.bind(null,e,r);n.has(r)||(n.add(r),r.then(s,s))})}}function Gn(e,t){var n=t.deletions;if(n!==null)for(var r=0;rs&&(s=o),r&=~i}if(r=s,r=Je()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Z3(r/1960))-r,10e?16:e,$s===null)var r=!1;else{if(e=$s,$s=null,Md=0,_e&6)throw Error(W(331));var s=_e;for(_e|=4,ne=e.current;ne!==null;){var i=ne,o=i.child;if(ne.flags&16){var a=i.deletions;if(a!==null){for(var l=0;lJe()-F0?Ai(e,0):M0|=n),tn(e,t)}function hT(e,t){t===0&&(e.mode&1?(t=of,of<<=1,!(of&130023424)&&(of=4194304)):t=1);var n=Ht();e=ss(e,t),e!==null&&(xc(e,t,n),tn(e,n))}function iA(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),hT(e,n)}function oA(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(W(314))}r!==null&&r.delete(t),hT(e,n)}var pT;pT=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Zt.current)Jt=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Jt=!1,K3(e,t,n);Jt=!!(e.flags&131072)}else Jt=!1,Ve&&t.flags&1048576&&yC(t,Pd,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Yf(e,t),e=t.pendingProps;var s=Ca(t,Ft.current);Xo(t,n),s=O0(null,t,r,e,s,n);var i=A0();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,en(r)?(i=!0,jd(t)):i=!1,t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,j0(t),s.updater=zh,t.stateNode=s,s._reactInternals=t,ty(t,r,e,n),t=sy(null,t,r,!0,i,n)):(t.tag=0,Ve&&i&&b0(t),Vt(null,t,s,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Yf(e,t),e=t.pendingProps,s=r._init,r=s(r._payload),t.type=r,s=t.tag=lA(r),e=Qn(r,e),s){case 0:t=ry(null,t,r,e,n);break e;case 1:t=Jb(null,t,r,e,n);break e;case 11:t=Yb(null,t,r,e,n);break e;case 14:t=Xb(null,t,r,Qn(r.type,e),n);break e}throw Error(W(306,r,""))}return t;case 0:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Qn(r,s),ry(e,t,r,s,n);case 1:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Qn(r,s),Jb(e,t,r,s,n);case 3:e:{if(XC(t),e===null)throw Error(W(387));r=t.pendingProps,i=t.memoizedState,s=i.element,wC(e,t),Od(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=Pa(Error(W(423)),t),t=Zb(e,t,r,n,s);break e}else if(r!==s){s=Pa(Error(W(424)),t),t=Zb(e,t,r,n,s);break e}else for(dn=Vs(t.stateNode.containerInfo.firstChild),gn=t,Ve=!0,Jn=null,n=CC(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Ta(),r===s){t=is(e,t,n);break e}Vt(e,t,r,n)}t=t.child}return t;case 5:return TC(t),e===null&&Jg(t),r=t.type,s=t.pendingProps,i=e!==null?e.memoizedProps:null,o=s.children,Kg(r,s)?o=null:i!==null&&Kg(r,i)&&(t.flags|=32),YC(e,t),Vt(e,t,o,n),t.child;case 6:return e===null&&Jg(t),null;case 13:return JC(e,t,n);case 4:return k0(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ja(t,null,r,n):Vt(e,t,r,n),t.child;case 11:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Qn(r,s),Yb(e,t,r,s,n);case 7:return Vt(e,t,t.pendingProps,n),t.child;case 8:return Vt(e,t,t.pendingProps.children,n),t.child;case 12:return Vt(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,Me(Rd,r._currentValue),r._currentValue=o,i!==null)if(nr(i.value,o)){if(i.children===s.children&&!Zt.current){t=is(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=es(-1,n&-n),l.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var f=c.pending;f===null?l.next=l:(l.next=f.next,f.next=l),c.pending=l}}i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Zg(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(W(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Zg(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}Vt(e,t,s.children,n),t=t.child}return t;case 9:return s=t.type,r=t.pendingProps.children,Xo(t,n),s=Un(s),r=r(s),t.flags|=1,Vt(e,t,r,n),t.child;case 14:return r=t.type,s=Qn(r,t.pendingProps),s=Qn(r.type,s),Xb(e,t,r,s,n);case 15:return GC(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,s=t.pendingProps,s=t.elementType===r?s:Qn(r,s),Yf(e,t),t.tag=1,en(r)?(e=!0,jd(t)):e=!1,Xo(t,n),SC(t,r,s),ty(t,r,s,n),sy(null,t,r,!0,e,n);case 19:return ZC(e,t,n);case 22:return QC(e,t,n)}throw Error(W(156,t.tag))};function mT(e,t){return z2(e,t)}function aA(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 $n(e,t,n,r){return new aA(e,t,n,r)}function B0(e){return e=e.prototype,!(!e||!e.isReactComponent)}function lA(e){if(typeof e=="function")return B0(e)?1:0;if(e!=null){if(e=e.$$typeof,e===l0)return 11;if(e===u0)return 14}return 2}function Ws(e,t){var n=e.alternate;return n===null?(n=$n(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 Zf(e,t,n,r,s,i){var o=2;if(r=e,typeof e=="function")B0(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Ro:return Ii(n.children,s,i,t);case a0:o=8,s|=8;break;case Cg:return e=$n(12,n,t,s|2),e.elementType=Cg,e.lanes=i,e;case Tg:return e=$n(13,n,t,s),e.elementType=Tg,e.lanes=i,e;case jg:return e=$n(19,n,t,s),e.elementType=jg,e.lanes=i,e;case E2:return qh(n,s,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _2:o=10;break e;case S2:o=9;break e;case l0:o=11;break e;case u0:o=14;break e;case ws:o=16,r=null;break e}throw Error(W(130,e==null?e:typeof e,""))}return t=$n(o,n,t,s),t.elementType=e,t.type=r,t.lanes=i,t}function Ii(e,t,n,r){return e=$n(7,e,r,t),e.lanes=n,e}function qh(e,t,n,r){return e=$n(22,e,r,t),e.elementType=E2,e.lanes=n,e.stateNode={isHidden:!1},e}function wm(e,t,n){return e=$n(6,e,null,t),e.lanes=n,e}function _m(e,t,n){return t=$n(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function uA(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=nm(0),this.expirationTimes=nm(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nm(0),this.identifierPrefix=r,this.onRecoverableError=s,this.mutableSourceEagerHydrationData=null}function H0(e,t,n,r,s,i,o,a,l){return e=new uA(e,t,n,a,l),t===1?(t=1,i===!0&&(t|=8)):t=0,i=$n(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},j0(i),e}function cA(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(xT)}catch(e){console.error(e)}}xT(),y2.exports=Sn;var ll=y2.exports;const gZ=Nr(ll);var bT,wT,fw=ll;wT=fw.createRoot,bT=fw.hydrateRoot;var ul=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Na=typeof window>"u"||"Deno"in window;function Pn(){}function mA(e,t){return typeof e=="function"?e(t):e}function gy(e){return typeof e=="number"&&e>=0&&e!==1/0}function _T(e,t){return Math.max(e+(t||0)-Date.now(),0)}function dw(e,t){const{type:n="all",exact:r,fetchStatus:s,predicate:i,queryKey:o,stale:a}=e;if(o){if(r){if(t.queryHash!==G0(o,t.options))return!1}else if(!$u(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 hw(e,t){const{exact:n,status:r,predicate:s,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(n){if(Bi(t.options.mutationKey)!==Bi(i))return!1}else if(!$u(t.options.mutationKey,i))return!1}return!(r&&t.state.status!==r||s&&!s(t))}function G0(e,t){return((t==null?void 0:t.queryKeyHashFn)||Bi)(e)}function Bi(e){return JSON.stringify(e,(t,n)=>yy(n)?Object.keys(n).sort().reduce((r,s)=>(r[s]=n[s],r),{}):n)}function $u(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!$u(e[n],t[n])):!1}function Q0(e,t){if(e===t)return e;const n=pw(e)&&pw(t);if(n||yy(e)&&yy(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"u")return!0;const n=t.prototype;return!(!mw(n)||!n.hasOwnProperty("isPrototypeOf"))}function mw(e){return Object.prototype.toString.call(e)==="[object Object]"}function gA(e){return new Promise(t=>{setTimeout(t,e)})}function vy(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Q0(e,t):t}function ST(e){return e}function yA(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function vA(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ei,js,la,XE,xA=(XE=class extends ul{constructor(){super();se(this,Ei,void 0);se(this,js,void 0);se(this,la,void 0);J(this,la,t=>{if(!Na&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){O(this,js)||this.setEventListener(O(this,la))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,js))==null||t.call(this),J(this,js,void 0))}setEventListener(t){var n;J(this,la,t),(n=O(this,js))==null||n.call(this),J(this,js,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){O(this,Ei)!==t&&(J(this,Ei,t),this.onFocus())}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){var t;return typeof O(this,Ei)=="boolean"?O(this,Ei):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},Ei=new WeakMap,js=new WeakMap,la=new WeakMap,XE),Vd=new xA,ua,ks,ca,JE,bA=(JE=class extends ul{constructor(){super();se(this,ua,!0);se(this,ks,void 0);se(this,ca,void 0);J(this,ca,t=>{if(!Na&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){O(this,ks)||this.setEventListener(O(this,ca))}onUnsubscribe(){var t;this.hasListeners()||((t=O(this,ks))==null||t.call(this),J(this,ks,void 0))}setEventListener(t){var n;J(this,ca,t),(n=O(this,ks))==null||n.call(this),J(this,ks,t(this.setOnline.bind(this)))}setOnline(t){O(this,ua)!==t&&(J(this,ua,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return O(this,ua)}},ua=new WeakMap,ks=new WeakMap,ca=new WeakMap,JE),Bd=new bA;function wA(e){return Math.min(1e3*2**e,3e4)}function Yh(e){return(e??"online")==="online"?Bd.isOnline():!0}var ET=class{constructor(e){this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function Sm(e){return e instanceof ET}function CT(e){let t=!1,n=0,r=!1,s,i,o;const a=new Promise((b,y)=>{i=b,o=y}),l=b=>{var y;r||(p(new ET(b)),(y=e.abort)==null||y.call(e))},c=()=>{t=!0},f=()=>{t=!1},d=()=>!Vd.isFocused()||e.networkMode!=="always"&&!Bd.isOnline(),h=b=>{var y;r||(r=!0,(y=e.onSuccess)==null||y.call(e,b),s==null||s(),i(b))},p=b=>{var y;r||(r=!0,(y=e.onError)==null||y.call(e,b),s==null||s(),o(b))},g=()=>new Promise(b=>{var y;s=m=>{const v=r||!d();return v&&b(m),v},(y=e.onPause)==null||y.call(e)}).then(()=>{var b;s=void 0,r||(b=e.onContinue)==null||b.call(e)}),w=()=>{if(r)return;let b;try{b=e.fn()}catch(y){b=Promise.reject(y)}Promise.resolve(b).then(h).catch(y=>{var E;if(r)return;const m=e.retry??(Na?0:3),v=e.retryDelay??wA,_=typeof v=="function"?v(n,y):v,S=m===!0||typeof m=="number"&&n{if(d())return g()}).then(()=>{t?p(y):w()})})};return Yh(e.networkMode)?w():g().then(w),{promise:a,cancel:l,continue:()=>(s==null?void 0:s())?a:Promise.resolve(),cancelRetry:c,continueRetry:f}}function _A(){let e=[],t=0,n=h=>{h()},r=h=>{h()},s=h=>setTimeout(h,0);const i=h=>{s=h},o=h=>{let p;t++;try{p=h()}finally{t--,t||c()}return p},a=h=>{t?e.push(h):s(()=>{n(h)})},l=h=>(...p)=>{a(()=>{h(...p)})},c=()=>{const h=e;e=[],h.length&&s(()=>{r(()=>{h.forEach(p=>{n(p)})})})};return{batch:o,batchCalls:l,schedule:a,setNotifyFunction:h=>{n=h},setBatchNotifyFunction:h=>{r=h},setScheduler:i}}var Ze=_A(),Ci,ZE,TT=(ZE=class{constructor(){se(this,Ci,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gy(this.gcTime)&&J(this,Ci,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Na?1/0:5*60*1e3))}clearGcTimeout(){O(this,Ci)&&(clearTimeout(O(this,Ci)),J(this,Ci,void 0))}},Ci=new WeakMap,ZE),fa,da,Tn,Ps,jn,mt,oc,Ti,ha,ed,Yn,Ur,e2,SA=(e2=class extends TT{constructor(t){super();se(this,ha);se(this,Yn);se(this,fa,void 0);se(this,da,void 0);se(this,Tn,void 0);se(this,Ps,void 0);se(this,jn,void 0);se(this,mt,void 0);se(this,oc,void 0);se(this,Ti,void 0);J(this,Ti,!1),J(this,oc,t.defaultOptions),pe(this,ha,ed).call(this,t.options),J(this,mt,[]),J(this,Tn,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,J(this,fa,t.state||EA(this.options)),this.state=O(this,fa),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!O(this,mt).length&&this.state.fetchStatus==="idle"&&O(this,Tn).remove(this)}setData(t,n){const r=vy(this.state.data,t,this.options);return pe(this,Yn,Ur).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){pe(this,Yn,Ur).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r;const n=O(this,Ps);return(r=O(this,jn))==null||r.cancel(t),n?n.then(Pn).catch(Pn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(O(this,fa))}isActive(){return O(this,mt).some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||O(this,mt).some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!_T(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=O(this,mt).find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,jn))==null||n.continue()}onOnline(){var n;const t=O(this,mt).find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=O(this,jn))==null||n.continue()}addObserver(t){O(this,mt).includes(t)||(O(this,mt).push(t),this.clearGcTimeout(),O(this,Tn).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){O(this,mt).includes(t)&&(J(this,mt,O(this,mt).filter(n=>n!==t)),O(this,mt).length||(O(this,jn)&&(O(this,Ti)?O(this,jn).cancel({revert:!0}):O(this,jn).cancelRetry()),this.scheduleGc()),O(this,Tn).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return O(this,mt).length}invalidate(){this.state.isInvalidated||pe(this,Yn,Ur).call(this,{type:"invalidate"})}fetch(t,n){var c,f,d,h;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(O(this,Ps))return(c=O(this,jn))==null||c.continueRetry(),O(this,Ps)}if(t&&pe(this,ha,ed).call(this,t),!this.options.queryFn){const p=O(this,mt).find(g=>g.options.queryFn);p&&pe(this,ha,ed).call(this,p.options)}const r=new AbortController,s={queryKey:this.queryKey,meta:this.meta},i=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(J(this,Ti,!0),r.signal)})};i(s);const o=()=>this.options.queryFn?(J(this,Ti,!1),this.options.persister?this.options.persister(this.options.queryFn,s,this):this.options.queryFn(s)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),a={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:o};i(a),(f=this.options.behavior)==null||f.onFetch(a,this),J(this,da,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=a.fetchOptions)==null?void 0:d.meta))&&pe(this,Yn,Ur).call(this,{type:"fetch",meta:(h=a.fetchOptions)==null?void 0:h.meta});const l=p=>{var g,w,b,y;Sm(p)&&p.silent||pe(this,Yn,Ur).call(this,{type:"error",error:p}),Sm(p)||((w=(g=O(this,Tn).config).onError)==null||w.call(g,p,this),(y=(b=O(this,Tn).config).onSettled)==null||y.call(b,this.state.data,p,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return J(this,jn,CT({fn:a.fetchFn,abort:r.abort.bind(r),onSuccess:p=>{var g,w,b,y;if(typeof p>"u"){l(new Error(`${this.queryHash} data is undefined`));return}this.setData(p),(w=(g=O(this,Tn).config).onSuccess)==null||w.call(g,p,this),(y=(b=O(this,Tn).config).onSettled)==null||y.call(b,p,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(p,g)=>{pe(this,Yn,Ur).call(this,{type:"failed",failureCount:p,error:g})},onPause:()=>{pe(this,Yn,Ur).call(this,{type:"pause"})},onContinue:()=>{pe(this,Yn,Ur).call(this,{type:"continue"})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode})),J(this,Ps,O(this,jn).promise),O(this,Ps)}},fa=new WeakMap,da=new WeakMap,Tn=new WeakMap,Ps=new WeakMap,jn=new WeakMap,mt=new WeakMap,oc=new WeakMap,Ti=new WeakMap,ha=new WeakSet,ed=function(t){this.options={...O(this,oc),...t},this.updateGcTime(this.options.gcTime)},Yn=new WeakSet,Ur=function(t){const n=r=>{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:t.meta??null,fetchStatus:Yh(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const s=t.error;return Sm(s)&&s.revert&&O(this,da)?{...O(this,da),fetchStatus:"idle"}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),Ze.batch(()=>{O(this,mt).forEach(r=>{r.onQueryUpdate()}),O(this,Tn).notify({query:this,type:"updated",action:t})})},e2);function EA(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":"pending",fetchStatus:"idle"}}var gr,t2,CA=(t2=class extends ul{constructor(t={}){super();se(this,gr,void 0);this.config=t,J(this,gr,new Map)}build(t,n,r){const s=n.queryKey,i=n.queryHash??G0(s,n);let o=this.get(i);return o||(o=new SA({cache:this,queryKey:s,queryHash:i,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){O(this,gr).has(t.queryHash)||(O(this,gr).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=O(this,gr).get(t.queryHash);n&&(t.destroy(),n===t&&O(this,gr).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){Ze.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return O(this,gr).get(t)}getAll(){return[...O(this,gr).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>dw(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>dw(t,r)):n}notify(t){Ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){Ze.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},gr=new WeakMap,t2),yr,ac,on,pa,vr,xs,n2,TA=(n2=class extends TT{constructor(t){super();se(this,vr);se(this,yr,void 0);se(this,ac,void 0);se(this,on,void 0);se(this,pa,void 0);this.mutationId=t.mutationId,J(this,ac,t.defaultOptions),J(this,on,t.mutationCache),J(this,yr,[]),this.state=t.state||jT(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options={...O(this,ac),...t},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){O(this,yr).includes(t)||(O(this,yr).push(t),this.clearGcTimeout(),O(this,on).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){J(this,yr,O(this,yr).filter(n=>n!==t)),this.scheduleGc(),O(this,on).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){O(this,yr).length||(this.state.status==="pending"?this.scheduleGc():O(this,on).remove(this))}continue(){var t;return((t=O(this,pa))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,i,o,a,l,c,f,d,h,p,g,w,b,y,m,v,_,S,E,j;const n=()=>(J(this,pa,CT({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(R,M)=>{pe(this,vr,xs).call(this,{type:"failed",failureCount:R,error:M})},onPause:()=>{pe(this,vr,xs).call(this,{type:"pause"})},onContinue:()=>{pe(this,vr,xs).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),O(this,pa).promise),r=this.state.status==="pending";try{if(!r){pe(this,vr,xs).call(this,{type:"pending",variables:t}),await((i=(s=O(this,on).config).onMutate)==null?void 0:i.call(s,t,this));const M=await((a=(o=this.options).onMutate)==null?void 0:a.call(o,t));M!==this.state.context&&pe(this,vr,xs).call(this,{type:"pending",context:M,variables:t})}const R=await n();return await((c=(l=O(this,on).config).onSuccess)==null?void 0:c.call(l,R,t,this.state.context,this)),await((d=(f=this.options).onSuccess)==null?void 0:d.call(f,R,t,this.state.context)),await((p=(h=O(this,on).config).onSettled)==null?void 0:p.call(h,R,null,this.state.variables,this.state.context,this)),await((w=(g=this.options).onSettled)==null?void 0:w.call(g,R,null,t,this.state.context)),pe(this,vr,xs).call(this,{type:"success",data:R}),R}catch(R){try{throw await((y=(b=O(this,on).config).onError)==null?void 0:y.call(b,R,t,this.state.context,this)),await((v=(m=this.options).onError)==null?void 0:v.call(m,R,t,this.state.context)),await((S=(_=O(this,on).config).onSettled)==null?void 0:S.call(_,void 0,R,this.state.variables,this.state.context,this)),await((j=(E=this.options).onSettled)==null?void 0:j.call(E,void 0,R,t,this.state.context)),R}finally{pe(this,vr,xs).call(this,{type:"error",error:R})}}}},yr=new WeakMap,ac=new WeakMap,on=new WeakMap,pa=new WeakMap,vr=new WeakSet,xs=function(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"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!Yh(this.options.networkMode),status:"pending",variables:t.variables,submittedAt:Date.now()};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"}}};this.state=n(this.state),Ze.batch(()=>{O(this,yr).forEach(r=>{r.onMutationUpdate(t)}),O(this,on).notify({mutation:this,type:"updated",action:t})})},n2);function jT(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var kn,lc,ji,r2,jA=(r2=class extends ul{constructor(t={}){super();se(this,kn,void 0);se(this,lc,void 0);se(this,ji,void 0);this.config=t,J(this,kn,[]),J(this,lc,0)}build(t,n,r){const s=new TA({mutationCache:this,mutationId:++Zc(this,lc)._,options:t.defaultMutationOptions(n),state:r});return this.add(s),s}add(t){O(this,kn).push(t),this.notify({type:"added",mutation:t})}remove(t){J(this,kn,O(this,kn).filter(n=>n!==t)),this.notify({type:"removed",mutation:t})}clear(){Ze.batch(()=>{O(this,kn).forEach(t=>{this.remove(t)})})}getAll(){return O(this,kn)}find(t){const n={exact:!0,...t};return O(this,kn).find(r=>hw(n,r))}findAll(t={}){return O(this,kn).filter(n=>hw(t,n))}notify(t){Ze.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){return J(this,ji,(O(this,ji)??Promise.resolve()).then(()=>{const t=O(this,kn).filter(n=>n.state.isPaused);return Ze.batch(()=>t.reduce((n,r)=>n.then(()=>r.continue().catch(Pn)),Promise.resolve()))}).then(()=>{J(this,ji,void 0)})),O(this,ji)}},kn=new WeakMap,lc=new WeakMap,ji=new WeakMap,r2);function kA(e){return{onFetch:(t,n)=>{const r=async()=>{var g,w,b,y,m;const s=t.options,i=(b=(w=(g=t.fetchOptions)==null?void 0:g.meta)==null?void 0:w.fetchMore)==null?void 0:b.direction,o=((y=t.state.data)==null?void 0:y.pages)||[],a=((m=t.state.data)==null?void 0:m.pageParams)||[],l={pages:[],pageParams:[]};let c=!1;const f=v=>{Object.defineProperty(v,"signal",{enumerable:!0,get:()=>(t.signal.aborted?c=!0:t.signal.addEventListener("abort",()=>{c=!0}),t.signal)})},d=t.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${t.options.queryHash}'`))),h=async(v,_,S)=>{if(c)return Promise.reject();if(_==null&&v.pages.length)return Promise.resolve(v);const E={queryKey:t.queryKey,pageParam:_,direction:S?"backward":"forward",meta:t.options.meta};f(E);const j=await d(E),{maxPages:R}=t.options,M=S?vA:yA;return{pages:M(v.pages,j,R),pageParams:M(v.pageParams,_,R)}};let p;if(i&&o.length){const v=i==="backward",_=v?kT:xy,S={pages:o,pageParams:a},E=_(s,S);p=await h(S,E,v)}else{p=await h(l,a[0]??s.initialPageParam);const v=e??o.length;for(let _=1;_{var s,i;return(i=(s=t.options).persister)==null?void 0:i.call(s,r,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=r}}}function xy(e,{pages:t,pageParams:n}){const r=t.length-1;return e.getNextPageParam(t[r],t,n[r],n)}function kT(e,{pages:t,pageParams:n}){var r;return(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n)}function yZ(e,t){return t?xy(e,t)!=null:!1}function vZ(e,t){return!t||!e.getPreviousPageParam?!1:kT(e,t)!=null}var ot,Rs,Ns,ma,ga,Os,ya,va,s2,PA=(s2=class{constructor(e={}){se(this,ot,void 0);se(this,Rs,void 0);se(this,Ns,void 0);se(this,ma,void 0);se(this,ga,void 0);se(this,Os,void 0);se(this,ya,void 0);se(this,va,void 0);J(this,ot,e.queryCache||new CA),J(this,Rs,e.mutationCache||new jA),J(this,Ns,e.defaultOptions||{}),J(this,ma,new Map),J(this,ga,new Map),J(this,Os,0)}mount(){Zc(this,Os)._++,O(this,Os)===1&&(J(this,ya,Vd.subscribe(()=>{Vd.isFocused()&&(this.resumePausedMutations(),O(this,ot).onFocus())})),J(this,va,Bd.subscribe(()=>{Bd.isOnline()&&(this.resumePausedMutations(),O(this,ot).onOnline())})))}unmount(){var e,t;Zc(this,Os)._--,O(this,Os)===0&&((e=O(this,ya))==null||e.call(this),J(this,ya,void 0),(t=O(this,va))==null||t.call(this),J(this,va,void 0))}isFetching(e){return O(this,ot).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return O(this,Rs).findAll({...e,status:"pending"}).length}getQueryData(e){var t;return(t=O(this,ot).find({queryKey:e}))==null?void 0:t.state.data}ensureQueryData(e){const t=this.getQueryData(e.queryKey);return t!==void 0?Promise.resolve(t):this.fetchQuery(e)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=O(this,ot).find({queryKey:e}),s=r==null?void 0:r.state.data,i=mA(t,s);if(typeof i>"u")return;const o=this.defaultQueryOptions({queryKey:e});return O(this,ot).build(this,o).setData(i,{...n,manual:!0})}setQueriesData(e,t,n){return Ze.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var t;return(t=O(this,ot).find({queryKey:e}))==null?void 0:t.state}removeQueries(e){const t=O(this,ot);Ze.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=O(this,ot),r={type:"active",...e};return Ze.batch(()=>(n.findAll(e).forEach(s=>{s.reset()}),this.refetchQueries(r,t)))}cancelQueries(e={},t={}){const n={revert:!0,...t},r=Ze.batch(()=>O(this,ot).findAll(e).map(s=>s.cancel(n)));return Promise.all(r).then(Pn).catch(Pn)}invalidateQueries(e={},t={}){return Ze.batch(()=>{if(O(this,ot).findAll(e).forEach(r=>{r.invalidate()}),e.refetchType==="none")return Promise.resolve();const n={...e,type:e.refetchType??e.type??"active"};return this.refetchQueries(n,t)})}refetchQueries(e={},t){const n={...t,cancelRefetch:(t==null?void 0:t.cancelRefetch)??!0},r=Ze.batch(()=>O(this,ot).findAll(e).filter(s=>!s.isDisabled()).map(s=>{let i=s.fetch(void 0,n);return n.throwOnError||(i=i.catch(Pn)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(Pn)}fetchQuery(e){const t=this.defaultQueryOptions(e);typeof t.retry>"u"&&(t.retry=!1);const n=O(this,ot).build(this,t);return n.isStaleByTime(t.staleTime)?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Pn).catch(Pn)}fetchInfiniteQuery(e){return e.behavior=kA(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Pn).catch(Pn)}resumePausedMutations(){return O(this,Rs).resumePausedMutations()}getQueryCache(){return O(this,ot)}getMutationCache(){return O(this,Rs)}getDefaultOptions(){return O(this,Ns)}setDefaultOptions(e){J(this,Ns,e)}setQueryDefaults(e,t){O(this,ma).set(Bi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...O(this,ma).values()];let n={};return t.forEach(r=>{$u(e,r.queryKey)&&(n={...n,...r.defaultOptions})}),n}setMutationDefaults(e,t){O(this,ga).set(Bi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...O(this,ga).values()];let n={};return t.forEach(r=>{$u(e,r.mutationKey)&&(n={...n,...r.defaultOptions})}),n}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const t={...O(this,Ns).queries,...(e==null?void 0:e.queryKey)&&this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=G0(t.queryKey,t)),typeof t.refetchOnReconnect>"u"&&(t.refetchOnReconnect=t.networkMode!=="always"),typeof t.throwOnError>"u"&&(t.throwOnError=!!t.suspense),typeof t.networkMode>"u"&&t.persister&&(t.networkMode="offlineFirst"),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...O(this,Ns).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){O(this,ot).clear(),O(this,Rs).clear()}},ot=new WeakMap,Rs=new WeakMap,Ns=new WeakMap,ma=new WeakMap,ga=new WeakMap,Os=new WeakMap,ya=new WeakMap,va=new WeakMap,s2),Gt,$e,xa,Ot,ki,ba,xr,uc,wa,_a,Pi,Ri,As,Ni,Oi,Zl,cc,by,fc,wy,dc,_y,hc,Sy,pc,Ey,mc,Cy,gc,Ty,Ah,PT,i2,RA=(i2=class extends ul{constructor(t,n){super();se(this,Oi);se(this,cc);se(this,fc);se(this,dc);se(this,hc);se(this,pc);se(this,mc);se(this,gc);se(this,Ah);se(this,Gt,void 0);se(this,$e,void 0);se(this,xa,void 0);se(this,Ot,void 0);se(this,ki,void 0);se(this,ba,void 0);se(this,xr,void 0);se(this,uc,void 0);se(this,wa,void 0);se(this,_a,void 0);se(this,Pi,void 0);se(this,Ri,void 0);se(this,As,void 0);se(this,Ni,void 0);J(this,$e,void 0),J(this,xa,void 0),J(this,Ot,void 0),J(this,Ni,new Set),J(this,Gt,t),this.options=n,J(this,xr,null),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(O(this,$e).addObserver(this),gw(O(this,$e),this.options)?pe(this,Oi,Zl).call(this):this.updateResult(),pe(this,hc,Sy).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return jy(O(this,$e),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return jy(O(this,$e),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,pe(this,pc,Ey).call(this),pe(this,mc,Cy).call(this),O(this,$e).removeObserver(this)}setOptions(t,n){const r=this.options,s=O(this,$e);if(this.options=O(this,Gt).defaultQueryOptions(t),zd(r,this.options)||O(this,Gt).getQueryCache().notify({type:"observerOptionsUpdated",query:O(this,$e),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),pe(this,gc,Ty).call(this);const i=this.hasListeners();i&&yw(O(this,$e),s,this.options,r)&&pe(this,Oi,Zl).call(this),this.updateResult(n),i&&(O(this,$e)!==s||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&pe(this,cc,by).call(this);const o=pe(this,fc,wy).call(this);i&&(O(this,$e)!==s||this.options.enabled!==r.enabled||o!==O(this,As))&&pe(this,dc,_y).call(this,o)}getOptimisticResult(t){const n=O(this,Gt).getQueryCache().build(O(this,Gt),t),r=this.createResult(n,t);return OA(this,r)&&(J(this,Ot,r),J(this,ba,this.options),J(this,ki,O(this,$e).state)),r}getCurrentResult(){return O(this,Ot)}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(O(this,Ni).add(r),t[r])})}),n}getCurrentQuery(){return O(this,$e)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=O(this,Gt).defaultQueryOptions(t),r=O(this,Gt).getQueryCache().build(O(this,Gt),n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){return pe(this,Oi,Zl).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),O(this,Ot)))}createResult(t,n){var E;const r=O(this,$e),s=this.options,i=O(this,Ot),o=O(this,ki),a=O(this,ba),c=t!==r?t.state:O(this,xa),{state:f}=t;let{error:d,errorUpdatedAt:h,fetchStatus:p,status:g}=f,w=!1,b;if(n._optimisticResults){const j=this.hasListeners(),R=!j&&gw(t,n),M=j&&yw(t,r,n,s);(R||M)&&(p=Yh(t.options.networkMode)?"fetching":"paused",f.dataUpdatedAt||(g="pending")),n._optimisticResults==="isRestoring"&&(p="idle")}if(n.select&&typeof f.data<"u")if(i&&f.data===(o==null?void 0:o.data)&&n.select===O(this,uc))b=O(this,wa);else try{J(this,uc,n.select),b=n.select(f.data),b=vy(i==null?void 0:i.data,b,n),J(this,wa,b),J(this,xr,null)}catch(j){J(this,xr,j)}else b=f.data;if(typeof n.placeholderData<"u"&&typeof b>"u"&&g==="pending"){let j;if(i!=null&&i.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))j=i.data;else if(j=typeof n.placeholderData=="function"?n.placeholderData((E=O(this,_a))==null?void 0:E.state.data,O(this,_a)):n.placeholderData,n.select&&typeof j<"u")try{j=n.select(j),J(this,xr,null)}catch(R){J(this,xr,R)}typeof j<"u"&&(g="success",b=vy(i==null?void 0:i.data,j,n),w=!0)}O(this,xr)&&(d=O(this,xr),b=O(this,wa),h=Date.now(),g="error");const y=p==="fetching",m=g==="pending",v=g==="error",_=m&&y;return{status:g,fetchStatus:p,isPending:m,isSuccess:g==="success",isError:v,isInitialLoading:_,isLoading:_,data:b,dataUpdatedAt:f.dataUpdatedAt,error:d,errorUpdatedAt:h,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:y,isRefetching:y&&!m,isLoadingError:v&&f.dataUpdatedAt===0,isPaused:p==="paused",isPlaceholderData:w,isRefetchError:v&&f.dataUpdatedAt!==0,isStale:Y0(t,n),refetch:this.refetch}}updateResult(t){const n=O(this,Ot),r=this.createResult(O(this,$e),this.options);if(J(this,ki,O(this,$e).state),J(this,ba,this.options),O(this,ki).data!==void 0&&J(this,_a,O(this,$e)),zd(r,n))return;J(this,Ot,r);const s={},i=()=>{if(!n)return!0;const{notifyOnChangeProps:o}=this.options,a=typeof o=="function"?o():o;if(a==="all"||!a&&!O(this,Ni).size)return!0;const l=new Set(a??O(this,Ni));return this.options.throwOnError&&l.add("error"),Object.keys(O(this,Ot)).some(c=>{const f=c;return O(this,Ot)[f]!==n[f]&&l.has(f)})};(t==null?void 0:t.listeners)!==!1&&i()&&(s.listeners=!0),pe(this,Ah,PT).call(this,{...s,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&pe(this,hc,Sy).call(this)}},Gt=new WeakMap,$e=new WeakMap,xa=new WeakMap,Ot=new WeakMap,ki=new WeakMap,ba=new WeakMap,xr=new WeakMap,uc=new WeakMap,wa=new WeakMap,_a=new WeakMap,Pi=new WeakMap,Ri=new WeakMap,As=new WeakMap,Ni=new WeakMap,Oi=new WeakSet,Zl=function(t){pe(this,gc,Ty).call(this);let n=O(this,$e).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Pn)),n},cc=new WeakSet,by=function(){if(pe(this,pc,Ey).call(this),Na||O(this,Ot).isStale||!gy(this.options.staleTime))return;const n=_T(O(this,Ot).dataUpdatedAt,this.options.staleTime)+1;J(this,Pi,setTimeout(()=>{O(this,Ot).isStale||this.updateResult()},n))},fc=new WeakSet,wy=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(O(this,$e)):this.options.refetchInterval)??!1},dc=new WeakSet,_y=function(t){pe(this,mc,Cy).call(this),J(this,As,t),!(Na||this.options.enabled===!1||!gy(O(this,As))||O(this,As)===0)&&J(this,Ri,setInterval(()=>{(this.options.refetchIntervalInBackground||Vd.isFocused())&&pe(this,Oi,Zl).call(this)},O(this,As)))},hc=new WeakSet,Sy=function(){pe(this,cc,by).call(this),pe(this,dc,_y).call(this,pe(this,fc,wy).call(this))},pc=new WeakSet,Ey=function(){O(this,Pi)&&(clearTimeout(O(this,Pi)),J(this,Pi,void 0))},mc=new WeakSet,Cy=function(){O(this,Ri)&&(clearInterval(O(this,Ri)),J(this,Ri,void 0))},gc=new WeakSet,Ty=function(){const t=O(this,Gt).getQueryCache().build(O(this,Gt),this.options);if(t===O(this,$e))return;const n=O(this,$e);J(this,$e,t),J(this,xa,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Ah=new WeakSet,PT=function(t){Ze.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(O(this,Ot))}),O(this,Gt).getQueryCache().notify({query:O(this,$e),type:"observerResultsUpdated"})})},i2);function NA(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function gw(e,t){return NA(e,t)||e.state.dataUpdatedAt>0&&jy(e,t,t.refetchOnMount)}function jy(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Y0(e,t)}return!1}function yw(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&Y0(e,n)}function Y0(e,t){return e.isStaleByTime(t.staleTime)}function OA(e,t){return!zd(e.getCurrentResult(),t)}var Is,Kr,an,Gr,Sa,td,yc,ky,o2,AA=(o2=class extends ul{constructor(n,r){super();se(this,Sa);se(this,yc);se(this,Is,void 0);se(this,Kr,void 0);se(this,an,void 0);se(this,Gr,void 0);J(this,Kr,void 0),J(this,Is,n),this.setOptions(r),this.bindMethods(),pe(this,Sa,td).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const r=this.options;this.options=O(this,Is).defaultMutationOptions(n),zd(r,this.options)||O(this,Is).getMutationCache().notify({type:"observerOptionsUpdated",mutation:O(this,an),observer:this}),(s=O(this,an))==null||s.setOptions(this.options),r!=null&&r.mutationKey&&this.options.mutationKey&&Bi(r.mutationKey)!==Bi(this.options.mutationKey)&&this.reset()}onUnsubscribe(){var n;this.hasListeners()||(n=O(this,an))==null||n.removeObserver(this)}onMutationUpdate(n){pe(this,Sa,td).call(this),pe(this,yc,ky).call(this,n)}getCurrentResult(){return O(this,Kr)}reset(){var n;(n=O(this,an))==null||n.removeObserver(this),J(this,an,void 0),pe(this,Sa,td).call(this),pe(this,yc,ky).call(this)}mutate(n,r){var s;return J(this,Gr,r),(s=O(this,an))==null||s.removeObserver(this),J(this,an,O(this,Is).getMutationCache().build(O(this,Is),this.options)),O(this,an).addObserver(this),O(this,an).execute(n)}},Is=new WeakMap,Kr=new WeakMap,an=new WeakMap,Gr=new WeakMap,Sa=new WeakSet,td=function(){var r;const n=((r=O(this,an))==null?void 0:r.state)??jT();J(this,Kr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},yc=new WeakSet,ky=function(n){Ze.batch(()=>{var r,s,i,o,a,l,c,f;if(O(this,Gr)&&this.hasListeners()){const d=O(this,Kr).variables,h=O(this,Kr).context;(n==null?void 0:n.type)==="success"?((s=(r=O(this,Gr)).onSuccess)==null||s.call(r,n.data,d,h),(o=(i=O(this,Gr)).onSettled)==null||o.call(i,n.data,null,d,h)):(n==null?void 0:n.type)==="error"&&((l=(a=O(this,Gr)).onError)==null||l.call(a,n.error,d,h),(f=(c=O(this,Gr)).onSettled)==null||f.call(c,void 0,n.error,d,h))}this.listeners.forEach(d=>{d(O(this,Kr))})})},o2),RT=x.createContext(void 0),Sc=e=>{const t=x.useContext(RT);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},IA=({client:e,children:t})=>(x.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),x.createElement(RT.Provider,{value:e},t)),NT=x.createContext(!1),DA=()=>x.useContext(NT);NT.Provider;function $A(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var LA=x.createContext($A()),MA=()=>x.useContext(LA);function OT(e,t){return typeof e=="function"?e(...t):!!e}var FA=(e,t)=>{(e.suspense||e.throwOnError)&&(t.isReset()||(e.retryOnMount=!1))},UA=e=>{x.useEffect(()=>{e.clearReset()},[e])},zA=({result:e,errorResetBoundary:t,throwOnError:n,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&OT(n,[e.error,r]),VA=e=>{e.suspense&&typeof e.staleTime!="number"&&(e.staleTime=1e3)},BA=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,HA=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function qA(e,t,n){const r=Sc(n),s=DA(),i=MA(),o=r.defaultQueryOptions(e);o._optimisticResults=s?"isRestoring":"optimistic",VA(o),FA(o,i),UA(i);const[a]=x.useState(()=>new t(r,o)),l=a.getOptimisticResult(o);if(x.useSyncExternalStore(x.useCallback(c=>{const f=s?()=>{}:a.subscribe(Ze.batchCalls(c));return a.updateResult(),f},[a,s]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),x.useEffect(()=>{a.setOptions(o,{listeners:!1})},[o,a]),BA(o,l))throw HA(o,a,i);if(zA({result:l,errorResetBoundary:i,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw l.error;return o.notifyOnChangeProps?l:a.trackResult(l)}function or(e,t){return qA(e,RA,t)}function WA(e,t){const n=Sc(t),r=n.getQueryCache();return x.useSyncExternalStore(x.useCallback(s=>r.subscribe(Ze.batchCalls(s)),[r]),()=>n.isFetching(e),()=>n.isFetching(e))}function KA(e,t){const n=Sc(t);return GA({filters:{...e,status:"pending"}},n).length}function vw(e,t){return e.findAll(t.filters).map(n=>t.select?t.select(n):n.state)}function GA(e={},t){const n=Sc(t).getMutationCache(),r=x.useRef(e),s=x.useRef();return s.current||(s.current=vw(n,e)),x.useEffect(()=>{r.current=e}),x.useSyncExternalStore(x.useCallback(i=>n.subscribe(()=>{const o=Q0(s.current,vw(n,r.current));s.current!==o&&(s.current=o,Ze.schedule(i))}),[n]),()=>s.current,()=>s.current)}function Pe(e,t){const n=Sc(t),[r]=x.useState(()=>new AA(n,e));x.useEffect(()=>{r.setOptions(e)},[r,e]);const s=x.useSyncExternalStore(x.useCallback(o=>r.subscribe(Ze.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=x.useCallback((o,a)=>{r.mutate(o,a).catch(QA)},[r]);if(s.error&&OT(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}function QA(){}const AT=x.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),Xh=x.createContext({}),X0=x.createContext(null),Jh=typeof document<"u",J0=Jh?x.useLayoutEffect:x.useEffect,Z0=x.createContext({strict:!1}),e1=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),YA="framerAppearId",IT="data-"+e1(YA);function XA(e,t,n,r){const{visualElement:s}=x.useContext(Xh),i=x.useContext(Z0),o=x.useContext(X0),a=x.useContext(AT).reducedMotion,l=x.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;x.useInsertionEffect(()=>{c&&c.update(n,o)});const f=x.useRef(!!(n[IT]&&!window.HandoffComplete));return J0(()=>{c&&(c.render(),f.current&&c.animationState&&c.animationState.animateChanges())}),x.useEffect(()=>{c&&(c.updateFeatures(),!f.current&&c.animationState&&c.animationState.animateChanges(),f.current&&(f.current=!1,window.HandoffComplete=!0))}),c}function DT(e){return typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function JA(e,t,n){return x.useCallback(r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):DT(n)&&(n.current=r))},[t])}function Lu(e){return typeof e=="string"||Array.isArray(e)}function Zh(e){return typeof e=="object"&&typeof e.start=="function"}const t1=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],n1=["initial",...t1];function ep(e){return Zh(e.animate)||n1.some(t=>Lu(e[t]))}function $T(e){return!!(ep(e)||e.variants)}function ZA(e,t){if(ep(e)){const{initial:n,animate:r}=e;return{initial:n===!1||Lu(n)?n:void 0,animate:Lu(r)?r:void 0}}return e.inherit!==!1?t:{}}function eI(e){const{initial:t,animate:n}=ZA(e,x.useContext(Xh));return x.useMemo(()=>({initial:t,animate:n}),[xw(t),xw(n)])}function xw(e){return Array.isArray(e)?e.join(" "):e}const bw={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"]},Mu={};for(const e in bw)Mu[e]={isEnabled:t=>bw[e].some(n=>!!t[n])};function Py(e){for(const t in e)Mu[t]={...Mu[t],...e[t]}}const LT=x.createContext({}),tI=x.createContext({}),nI=Symbol.for("motionComponentSymbol");function rI({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:s}){e&&Py(e);function i(a,l){let c;const f={...x.useContext(AT),...a,layoutId:sI(a)},{isStatic:d}=f,h=eI(a),p=r(a,d);if(!d&&Jh){h.visualElement=XA(s,p,f,t);const g=x.useContext(tI),w=x.useContext(Z0).strict;h.visualElement&&(c=h.visualElement.loadFeatures(f,w,e,g))}return x.createElement(Xh.Provider,{value:h},c&&h.visualElement?x.createElement(c,{visualElement:h.visualElement,...f}):null,n(s,a,JA(p,h.visualElement,l),p,d,h.visualElement))}const o=x.forwardRef(i);return o[nI]=s,o}function sI({layoutId:e}){const t=x.useContext(LT).id;return t&&e!==void 0?t+"-"+e:e}function iI(e){function t(r,s={}){return rI(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 oI=["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 r1(e){return typeof e!="string"||e.includes("-")?!1:!!(oI.indexOf(e)>-1||/[A-Z]/.test(e))}const aI={},Ec=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],oo=new Set(Ec);function MT(e,{layout:t,layoutId:n}){return oo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!aI[e]||e==="opacity")}const bn=e=>!!(e&&e.getVelocity),lI={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},uI=Ec.length;function cI(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,s){let i="";for(let o=0;ot=>typeof t=="string"&&t.startsWith(e),UT=FT("--"),Ry=FT("var(--"),fI=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,dI=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Oa=(e,t,n)=>Math.min(Math.max(n,e),t),ao={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},pu={...ao,transform:e=>Oa(0,1,e)},vf={...ao,default:1},mu=e=>Math.round(e*1e5)/1e5,tp=/(-)?([\d]*\.?[\d])+/g,zT=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,hI=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Cc(e){return typeof e=="string"}const Tc=e=>({test:t=>Cc(t)&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),bs=Tc("deg"),Zo=Tc("%"),he=Tc("px"),pI=Tc("vh"),mI=Tc("vw"),ww={...Zo,parse:e=>Zo.parse(e)/100,transform:e=>Zo.transform(e*100)},_w={...ao,transform:Math.round},VT={borderWidth:he,borderTopWidth:he,borderRightWidth:he,borderBottomWidth:he,borderLeftWidth:he,borderRadius:he,radius:he,borderTopLeftRadius:he,borderTopRightRadius:he,borderBottomRightRadius:he,borderBottomLeftRadius:he,width:he,maxWidth:he,height:he,maxHeight:he,size:he,top:he,right:he,bottom:he,left:he,padding:he,paddingTop:he,paddingRight:he,paddingBottom:he,paddingLeft:he,margin:he,marginTop:he,marginRight:he,marginBottom:he,marginLeft:he,rotate:bs,rotateX:bs,rotateY:bs,rotateZ:bs,scale:vf,scaleX:vf,scaleY:vf,scaleZ:vf,skew:bs,skewX:bs,skewY:bs,distance:he,translateX:he,translateY:he,translateZ:he,x:he,y:he,z:he,perspective:he,transformPerspective:he,opacity:pu,originX:ww,originY:ww,originZ:he,zIndex:_w,fillOpacity:pu,strokeOpacity:pu,numOctaves:_w};function s1(e,t,n,r){const{style:s,vars:i,transform:o,transformOrigin:a}=e;let l=!1,c=!1,f=!0;for(const d in t){const h=t[d];if(UT(d)){i[d]=h;continue}const p=VT[d],g=dI(h,p);if(oo.has(d)){if(l=!0,o[d]=g,!f)continue;h!==(p.default||0)&&(f=!1)}else d.startsWith("origin")?(c=!0,a[d]=g):s[d]=g}if(t.transform||(l||r?s.transform=cI(e.transform,n,f,r):s.transform&&(s.transform="none")),c){const{originX:d="50%",originY:h="50%",originZ:p=0}=a;s.transformOrigin=`${d} ${h} ${p}`}}const i1=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function BT(e,t,n){for(const r in t)!bn(t[r])&&!MT(r,n)&&(e[r]=t[r])}function gI({transformTemplate:e},t,n){return x.useMemo(()=>{const r=i1();return s1(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)},[t])}function yI(e,t,n){const r=e.style||{},s={};return BT(s,r,e),Object.assign(s,gI(e,t,n)),e.transformValues?e.transformValues(s):s}function vI(e,t,n){const r={},s=yI(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 xI=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 Hd(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||xI.has(e)}let HT=e=>!Hd(e);function bI(e){e&&(HT=t=>t.startsWith("on")?!Hd(t):e(t))}try{bI(require("@emotion/is-prop-valid").default)}catch{}function wI(e,t,n){const r={};for(const s in e)s==="values"&&typeof e.values=="object"||(HT(s)||n===!0&&Hd(s)||!t&&!Hd(s)||e.draggable&&s.startsWith("onDrag"))&&(r[s]=e[s]);return r}function Sw(e,t,n){return typeof e=="string"?e:he.transform(t+n*e)}function _I(e,t,n){const r=Sw(t,e.x,e.width),s=Sw(n,e.y,e.height);return`${r} ${s}`}const SI={offset:"stroke-dashoffset",array:"stroke-dasharray"},EI={offset:"strokeDashoffset",array:"strokeDasharray"};function CI(e,t,n=1,r=0,s=!0){e.pathLength=1;const i=s?SI:EI;e[i.offset]=he.transform(-r);const o=he.transform(t),a=he.transform(n);e[i.array]=`${o} ${a}`}function o1(e,{attrX:t,attrY:n,attrScale:r,originX:s,originY:i,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...c},f,d,h){if(s1(e,c,f,h),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:p,style:g,dimensions:w}=e;p.transform&&(w&&(g.transform=p.transform),delete p.transform),w&&(s!==void 0||i!==void 0||g.transform)&&(g.transformOrigin=_I(w,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&&CI(p,o,a,l,!1)}const qT=()=>({...i1(),attrs:{}}),a1=e=>typeof e=="string"&&e.toLowerCase()==="svg";function TI(e,t,n,r){const s=x.useMemo(()=>{const i=qT();return o1(i,t,{enableHardwareAcceleration:!1},a1(r),e.transformTemplate),{...i.attrs,style:{...i.style}}},[t]);if(e.style){const i={};BT(i,e.style,e),s.style={...i,...s.style}}return s}function jI(e=!1){return(n,r,s,{latestValues:i},o)=>{const l=(r1(n)?TI:vI)(r,i,o,n),f={...wI(r,typeof n=="string",e),...l,ref:s},{children:d}=r,h=x.useMemo(()=>bn(d)?d.get():d,[d]);return x.createElement(n,{...f,children:h})}}function WT(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 KT=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 GT(e,t,n,r){WT(e,t,void 0,r);for(const s in t.attrs)e.setAttribute(KT.has(s)?s:e1(s),t.attrs[s])}function l1(e,t){const{style:n}=e,r={};for(const s in n)(bn(n[s])||t.style&&bn(t.style[s])||MT(s,e))&&(r[s]=n[s]);return r}function QT(e,t){const n=l1(e,t);for(const r in e)if(bn(e[r])||bn(t[r])){const s=Ec.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;n[s]=e[r]}return n}function u1(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 YT(e){const t=x.useRef(null);return t.current===null&&(t.current=e()),t.current}const qd=e=>Array.isArray(e),kI=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),PI=e=>qd(e)?e[e.length-1]||0:e;function RI(e){const t=bn(e)?e.get():e;return kI(t)?t.toValue():t}function NI({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,s,i){const o={latestValues:OI(r,s,i,e),renderState:t()};return n&&(o.mount=a=>n(r,a,o)),o}const XT=e=>(t,n)=>{const r=x.useContext(Xh),s=x.useContext(X0),i=()=>NI(e,t,r,s);return n?i():YT(i)};function OI(e,t,n,r){const s={},i=r(e,{});for(const h in i)s[h]=RI(i[h]);let{initial:o,animate:a}=e;const l=ep(e),c=$T(e);t&&c&&!l&&e.inherit!==!1&&(o===void 0&&(o=t.initial),a===void 0&&(a=t.animate));let f=n?n.initial===!1:!1;f=f||o===!1;const d=f?a:o;return d&&typeof d!="boolean"&&!Zh(d)&&(Array.isArray(d)?d:[d]).forEach(p=>{const g=u1(e,p);if(!g)return;const{transitionEnd:w,transition:b,...y}=g;for(const m in y){let v=y[m];if(Array.isArray(v)){const _=f?v.length-1:0;v=v[_]}v!==null&&(s[m]=v)}for(const m in w)s[m]=w[m]}),s}const Dt=e=>e;class Ew{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const n=this.order.indexOf(t);n!==-1&&(this.order.splice(n,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}function AI(e){let t=new Ew,n=new Ew,r=0,s=!1,i=!1;const o=new WeakSet,a={schedule:(l,c=!1,f=!1)=>{const d=f&&s,h=d?t:n;return c&&o.add(l),h.add(l)&&d&&s&&(r=t.order.length),l},cancel:l=>{n.remove(l),o.delete(l)},process:l=>{if(s){i=!0;return}if(s=!0,[t,n]=[n,t],n.clear(),r=t.order.length,r)for(let c=0;c(d[h]=AI(()=>n=!0),d),{}),o=d=>i[d].process(s),a=()=>{const d=performance.now();n=!1,s.delta=r?1e3/60:Math.max(Math.min(d-s.timestamp,II),1),s.timestamp=d,s.isProcessing=!0,xf.forEach(o),s.isProcessing=!1,n&&t&&(r=!1,e(a))},l=()=>{n=!0,r=!0,s.isProcessing||e(a)};return{schedule:xf.reduce((d,h)=>{const p=i[h];return d[h]=(g,w=!1,b=!1)=>(n||l(),p.schedule(g,w,b)),d},{}),cancel:d=>xf.forEach(h=>i[h].cancel(d)),state:s,steps:i}}const{schedule:Lt,cancel:Wd,state:Ny,steps:bZ}=DI(typeof requestAnimationFrame<"u"?requestAnimationFrame:Dt,!0),$I={useVisualState:XT({scrapeMotionValuesFromProps:QT,createRenderState:qT,onMount:(e,t,{renderState:n,latestValues:r})=>{Lt.read(()=>{try{n.dimensions=typeof t.getBBox=="function"?t.getBBox():t.getBoundingClientRect()}catch{n.dimensions={x:0,y:0,width:0,height:0}}}),Lt.render(()=>{o1(n,r,{enableHardwareAcceleration:!1},a1(t.tagName),e.transformTemplate),GT(t,n)})}})},LI={useVisualState:XT({scrapeMotionValuesFromProps:l1,createRenderState:i1})};function MI(e,{forwardMotionProps:t=!1},n,r){return{...r1(e)?$I:LI,preloadedFeatures:n,useRender:jI(t),createVisualElement:r,Component:e}}function vi(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const FI=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function JT(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const UI=e=>t=>FI(t)&&e(t,JT(t));function nd(e,t,n,r){return vi(e,t,UI(n),r)}const zI=(e,t)=>n=>t(e(n)),Di=(...e)=>e.reduce(zI);function ZT(e){let t=null;return()=>{const n=()=>{t=null};return t===null?(t=e,n):!1}}const Cw=ZT("dragHorizontal"),Tw=ZT("dragVertical");function VI(e){let t=!1;if(e==="y")t=Tw();else if(e==="x")t=Cw();else{const n=Cw(),r=Tw();n&&r?t=()=>{n(),r()}:(n&&n(),r&&r())}return t}function ej(){const e=VI(!0);return e?(e(),!1):!0}class cl{constructor(t){this.isMounted=!1,this.node=t}update(){}}function jw(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End"),s=(i,o)=>{if(i.type==="touch"||ej())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&Lt.update(()=>a[r](i,o))};return nd(e.current,n,s,{passive:!e.getProps()[r]})}class BI extends cl{mount(){this.unmount=Di(jw(this.node,!0),jw(this.node,!1))}unmount(){}}class HI extends cl{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=Di(vi(this.node.current,"focus",()=>this.onFocus()),vi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const tj=(e,t)=>t?e===t?!0:tj(e,t.parentElement):!1;function Em(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,JT(n))}class qI extends cl{constructor(){super(...arguments),this.removeStartListeners=Dt,this.removeEndListeners=Dt,this.removeAccessibleListeners=Dt,this.startPointerPress=(t,n)=>{if(this.removeEndListeners(),this.isPressing)return;const r=this.node.getProps(),i=nd(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:c,onTapCancel:f}=this.node.getProps();Lt.update(()=>{tj(this.node.current,a.target)?c&&c(a,l):f&&f(a,l)})},{passive:!(r.onTap||r.onPointerUp)}),o=nd(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(r.onTapCancel||r.onPointerCancel)});this.removeEndListeners=Di(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()||Em("up",(l,c)=>{const{onTap:f}=this.node.getProps();f&&Lt.update(()=>f(l,c))})};this.removeEndListeners(),this.removeEndListeners=vi(this.node.current,"keyup",o),Em("down",(a,l)=>{this.startPress(a,l)})},n=vi(this.node.current,"keydown",t),r=()=>{this.isPressing&&Em("cancel",(i,o)=>this.cancelPress(i,o))},s=vi(this.node.current,"blur",r);this.removeAccessibleListeners=Di(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&&Lt.update(()=>r(t,n))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ej()}cancelPress(t,n){if(!this.checkPressEnd())return;const{onTapCancel:r}=this.node.getProps();r&&Lt.update(()=>r(t,n))}mount(){const t=this.node.getProps(),n=nd(this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),r=vi(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Di(n,r)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Oy=new WeakMap,Cm=new WeakMap,WI=e=>{const t=Oy.get(e.target);t&&t(e)},KI=e=>{e.forEach(WI)};function GI({root:e,...t}){const n=e||document;Cm.has(n)||Cm.set(n,{});const r=Cm.get(n),s=JSON.stringify(t);return r[s]||(r[s]=new IntersectionObserver(KI,{root:e,...t})),r[s]}function QI(e,t,n){const r=GI(t);return Oy.set(e,n),r.observe(e),()=>{Oy.delete(e),r.unobserve(e)}}const YI={some:0,all:1};class XI extends cl{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:YI[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:f,onViewportLeave:d}=this.node.getProps(),h=c?f:d;h&&h(l)};return QI(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(JI(t,n))&&this.startObserver()}unmount(){}}function JI({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const ZI={inView:{Feature:XI},tap:{Feature:qI},focus:{Feature:HI},hover:{Feature:BI}};function nj(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;rt[r]=n.get()),t}function t5(e){const t={};return e.values.forEach((n,r)=>t[r]=n.getVelocity()),t}function np(e,t,n){const r=e.getProps();return u1(r,t,n!==void 0?n:r.custom,e5(e),t5(e))}let n5=Dt,c1=Dt;const $i=e=>e*1e3,Ks=e=>e/1e3,r5={current:!1},rj=e=>Array.isArray(e)&&typeof e[0]=="number";function sj(e){return!!(!e||typeof e=="string"&&ij[e]||rj(e)||Array.isArray(e)&&e.every(sj))}const eu=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ij={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:eu([0,.65,.55,1]),circOut:eu([.55,0,1,.45]),backIn:eu([.31,.01,.66,-.59]),backOut:eu([.33,1.53,.69,.99])};function oj(e){if(e)return rj(e)?eu(e):Array.isArray(e)?e.map(oj):ij[e]}function s5(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 f=oj(a);return Array.isArray(f)&&(c.easing=f),e.animate(c,{delay:r,duration:s,easing:Array.isArray(f)?"linear":f,fill:"both",iterations:i+1,direction:o==="reverse"?"alternate":"normal"})}function i5(e,{repeat:t,repeatType:n="loop"}){const r=t&&n!=="loop"&&t%2===1?0:e.length-1;return e[r]}const aj=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,o5=1e-7,a5=12;function l5(e,t,n,r,s){let i,o,a=0;do o=t+(n-t)/2,i=aj(o,r,s)-e,i>0?n=o:t=o;while(Math.abs(i)>o5&&++al5(i,0,1,e,n);return i=>i===0||i===1?i:aj(s(i),t,r)}const u5=jc(.42,0,1,1),c5=jc(0,0,.58,1),lj=jc(.42,0,.58,1),f5=e=>Array.isArray(e)&&typeof e[0]!="number",uj=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,cj=e=>t=>1-e(1-t),f1=e=>1-Math.sin(Math.acos(e)),d5=cj(f1),h5=uj(f1),fj=jc(.33,1.53,.69,.99),d1=cj(fj),p5=uj(d1),m5=e=>(e*=2)<1?.5*d1(e):.5*(2-Math.pow(2,-10*(e-1))),g5={linear:Dt,easeIn:u5,easeInOut:lj,easeOut:c5,circIn:f1,circInOut:h5,circOut:d5,backIn:d1,backInOut:p5,backOut:fj,anticipate:m5},kw=e=>{if(Array.isArray(e)){c1(e.length===4);const[t,n,r,s]=e;return jc(t,n,r,s)}else if(typeof e=="string")return g5[e];return e},h1=(e,t)=>n=>!!(Cc(n)&&hI.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),dj=(e,t,n)=>r=>{if(!Cc(r))return r;const[s,i,o,a]=r.match(tp);return{[e]:parseFloat(s),[t]:parseFloat(i),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},y5=e=>Oa(0,255,e),Tm={...ao,transform:e=>Math.round(y5(e))},xi={test:h1("rgb","red"),parse:dj("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Tm.transform(e)+", "+Tm.transform(t)+", "+Tm.transform(n)+", "+mu(pu.transform(r))+")"};function v5(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 Ay={test:h1("#"),parse:v5,transform:xi.transform},zo={test:h1("hsl","hue"),parse:dj("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Zo.transform(mu(t))+", "+Zo.transform(mu(n))+", "+mu(pu.transform(r))+")"},zt={test:e=>xi.test(e)||Ay.test(e)||zo.test(e),parse:e=>xi.test(e)?xi.parse(e):zo.test(e)?zo.parse(e):Ay.parse(e),transform:e=>Cc(e)?e:e.hasOwnProperty("red")?xi.transform(e):zo.transform(e)},rp=(e,t,n)=>-n*e+n*t+e;function jm(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 x5({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=jm(l,a,e+1/3),i=jm(l,a,e),o=jm(l,a,e-1/3)}return{red:Math.round(s*255),green:Math.round(i*255),blue:Math.round(o*255),alpha:r}}const km=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},b5=[Ay,xi,zo],w5=e=>b5.find(t=>t.test(e));function Pw(e){const t=w5(e);let n=t.parse(e);return t===zo&&(n=x5(n)),n}const hj=(e,t)=>{const n=Pw(e),r=Pw(t),s={...n};return i=>(s.red=km(n.red,r.red,i),s.green=km(n.green,r.green,i),s.blue=km(n.blue,r.blue,i),s.alpha=rp(n.alpha,r.alpha,i),xi.transform(s))};function _5(e){var t,n;return isNaN(e)&&Cc(e)&&(((t=e.match(tp))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(zT))===null||n===void 0?void 0:n.length)||0)>0}const pj={regex:fI,countKey:"Vars",token:"${v}",parse:Dt},mj={regex:zT,countKey:"Colors",token:"${c}",parse:zt.parse},gj={regex:tp,countKey:"Numbers",token:"${n}",parse:ao.parse};function Pm(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 Kd(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Pm(n,pj),Pm(n,mj),Pm(n,gj),n}function yj(e){return Kd(e).values}function vj(e){const{values:t,numColors:n,numVars:r,tokenised:s}=Kd(e),i=t.length;return o=>{let a=s;for(let l=0;ltypeof e=="number"?0:e;function E5(e){const t=yj(e);return vj(e)(t.map(S5))}const fl={test:_5,parse:yj,createTransformer:vj,getAnimatableNone:E5},xj=(e,t)=>n=>`${n>0?t:e}`;function bj(e,t){return typeof e=="number"?n=>rp(e,t,n):zt.test(e)?hj(e,t):e.startsWith("var(")?xj(e,t):_j(e,t)}const wj=(e,t)=>{const n=[...e],r=n.length,s=e.map((i,o)=>bj(i,t[o]));return i=>{for(let o=0;o{const n={...e,...t},r={};for(const s in n)e[s]!==void 0&&t[s]!==void 0&&(r[s]=bj(e[s],t[s]));return s=>{for(const i in r)n[i]=r[i](s);return n}},_j=(e,t)=>{const n=fl.createTransformer(t),r=Kd(e),s=Kd(t);return r.numVars===s.numVars&&r.numColors===s.numColors&&r.numNumbers>=s.numNumbers?Di(wj(r.values,s.values),n):xj(e,t)},Sj=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},Rw=(e,t)=>n=>rp(e,t,n);function T5(e){return typeof e=="number"?Rw:typeof e=="string"?zt.test(e)?hj:_j:Array.isArray(e)?wj:typeof e=="object"?C5:Rw}function j5(e,t,n){const r=[],s=n||T5(e[0]),i=e.length-1;for(let o=0;ot[0];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const o=j5(t,r,s),a=o.length,l=c=>{let f=0;if(a>1)for(;fl(Oa(e[0],e[i-1],c)):l}function k5(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const s=Sj(0,t,r);e.push(rp(n,1,s))}}function P5(e){const t=[0];return k5(t,e.length-1),t}function R5(e,t){return e.map(n=>n*t)}function N5(e,t){return e.map(()=>t||lj).splice(0,e.length-1)}function Gd({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const s=f5(r)?r.map(kw):kw(r),i={done:!1,value:t[0]},o=R5(n&&n.length===t.length?n:P5(t),e),a=Ej(o,t,{ease:Array.isArray(s)?s:N5(t,s)});return{calculatedDuration:e,next:l=>(i.value=a(l),i.done=l>=e,i)}}function Cj(e,t){return t?e*(1e3/t):0}const O5=5;function Tj(e,t,n){const r=Math.max(t-O5,0);return Cj(n-e(r),t-r)}const Rm=.001,A5=.01,Nw=10,I5=.05,D5=1;function $5({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let s,i;n5(e<=$i(Nw));let o=1-t;o=Oa(I5,D5,o),e=Oa(A5,Nw,Ks(e)),o<1?(s=c=>{const f=c*o,d=f*e,h=f-n,p=Iy(c,o),g=Math.exp(-d);return Rm-h/p*g},i=c=>{const d=c*o*e,h=d*n+n,p=Math.pow(o,2)*Math.pow(c,2)*e,g=Math.exp(-d),w=Iy(Math.pow(c,2),o);return(-s(c)+Rm>0?-1:1)*((h-p)*g)/w}):(s=c=>{const f=Math.exp(-c*e),d=(c-n)*e+1;return-Rm+f*d},i=c=>{const f=Math.exp(-c*e),d=(n-c)*(e*e);return f*d});const a=5/e,l=M5(s,i,a);if(e=$i(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 L5=12;function M5(e,t,n){let r=n;for(let s=1;se[n]!==void 0)}function z5(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Ow(e,U5)&&Ow(e,F5)){const n=$5(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}function jj({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:f,duration:d,isResolvedFromDuration:h}=z5(r),p=f?-Ks(f):0,g=l/(2*Math.sqrt(a*c)),w=i-s,b=Ks(Math.sqrt(a/c)),y=Math.abs(w)<5;n||(n=y?.01:2),t||(t=y?.005:.5);let m;if(g<1){const v=Iy(b,g);m=_=>{const S=Math.exp(-g*b*_);return i-S*((p+g*b*w)/v*Math.sin(v*_)+w*Math.cos(v*_))}}else if(g===1)m=v=>i-Math.exp(-b*v)*(w+(p+b*w)*v);else{const v=b*Math.sqrt(g*g-1);m=_=>{const S=Math.exp(-g*b*_),E=Math.min(v*_,300);return i-S*((p+g*b*w)*Math.sinh(E)+v*w*Math.cosh(E))/v}}return{calculatedDuration:h&&d||null,next:v=>{const _=m(v);if(h)o.done=v>=d;else{let S=p;v!==0&&(g<1?S=Tj(m,v,_):S=0);const E=Math.abs(S)<=n,j=Math.abs(i-_)<=t;o.done=E&&j}return o.value=o.done?i:_,o}}}function Aw({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:f}){const d=e[0],h={done:!1,value:d},p=R=>a!==void 0&&Rl,g=R=>a===void 0?l:l===void 0||Math.abs(a-R)-w*Math.exp(-R/r),v=R=>y+m(R),_=R=>{const M=m(R),L=v(R);h.done=Math.abs(M)<=c,h.value=h.done?y:L};let S,E;const j=R=>{p(h.value)&&(S=R,E=jj({keyframes:[h.value,g(h.value)],velocity:Tj(v,R,h.value),damping:s,stiffness:i,restDelta:c,restSpeed:f}))};return j(0),{calculatedDuration:null,next:R=>{let M=!1;return!E&&S===void 0&&(M=!0,_(R),j(R)),S!==void 0&&R>S?E.next(R-S):(!M&&_(R),h)}}}const V5=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Lt.update(t,!0),stop:()=>Wd(t),now:()=>Ny.isProcessing?Ny.timestamp:performance.now()}},Iw=2e4;function Dw(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t=Iw?1/0:t}const B5={decay:Aw,inertia:Aw,tween:Gd,keyframes:Gd,spring:jj};function Qd({autoplay:e=!0,delay:t=0,driver:n=V5,keyframes:r,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:c,onComplete:f,onUpdate:d,...h}){let p=1,g=!1,w,b;const y=()=>{b=new Promise(I=>{w=I})};y();let m;const v=B5[s]||Gd;let _;v!==Gd&&typeof r[0]!="number"&&(_=Ej([0,100],r,{clamp:!1}),r=[0,100]);const S=v({...h,keyframes:r});let E;a==="mirror"&&(E=v({...h,keyframes:[...r].reverse(),velocity:-(h.velocity||0)}));let j="idle",R=null,M=null,L=null;S.calculatedDuration===null&&i&&(S.calculatedDuration=Dw(S));const{calculatedDuration:z}=S;let H=1/0,Y=1/0;z!==null&&(H=z+o,Y=H*(i+1)-o);let V=0;const K=I=>{if(M===null)return;p>0&&(M=Math.min(M,I)),p<0&&(M=Math.min(I-Y/p,M)),R!==null?V=R:V=Math.round(I-M)*p;const q=V-t*(p>=0?1:-1),ie=p>=0?q<0:q>Y;V=Math.max(q,0),j==="finished"&&R===null&&(V=Y);let te=V,xe=S;if(i){const it=V/H;let dt=Math.floor(it),Ce=it%1;!Ce&&it>=1&&(Ce=1),Ce===1&&dt--,dt=Math.min(dt,i+1);const Xe=!!(dt%2);Xe&&(a==="reverse"?(Ce=1-Ce,o&&(Ce-=o/H)):a==="mirror"&&(xe=E));let Ut=Oa(0,1,Ce);V>Y&&(Ut=a==="reverse"&&Xe?1:0),te=Ut*H}const X=ie?{done:!1,value:r[0]}:xe.next(te);_&&(X.value=_(X.value));let{done:ue}=X;!ie&&z!==null&&(ue=p>=0?V>=Y:V<=0);const ge=R===null&&(j==="finished"||j==="running"&&ue);return d&&d(X.value),ge&&C(),X},P=()=>{m&&m.stop(),m=void 0},T=()=>{j="idle",P(),w(),y(),M=L=null},C=()=>{j="finished",f&&f(),P(),w()},D=()=>{if(g)return;m||(m=n(K));const I=m.now();l&&l(),R!==null?M=I-R:(!M||j==="finished")&&(M=I),j==="finished"&&y(),L=M,R=null,j="running",m.start()};e&&D();const $={then(I,q){return b.then(I,q)},get time(){return Ks(V)},set time(I){I=$i(I),V=I,R!==null||!m||p===0?R=I:M=m.now()-I/p},get duration(){const I=S.calculatedDuration===null?Dw(S):S.calculatedDuration;return Ks(I)},get speed(){return p},set speed(I){I===p||!m||(p=I,$.time=Ks(V))},get state(){return j},play:D,pause:()=>{j="paused",R=V},stop:()=>{g=!0,j!=="idle"&&(j="idle",c&&c(),T())},cancel:()=>{L!==null&&K(L),T()},complete:()=>{j="finished"},sample:I=>(M=0,K(I))};return $}function H5(e){let t;return()=>(t===void 0&&(t=e()),t)}const q5=H5(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),W5=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),bf=10,K5=2e4,G5=(e,t)=>t.type==="spring"||e==="backgroundColor"||!sj(t.ease);function Q5(e,t,{onUpdate:n,onComplete:r,...s}){if(!(q5()&&W5.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(m=>{a=m})};c();let{keyframes:f,duration:d=300,ease:h,times:p}=s;if(G5(t,s)){const m=Qd({...s,repeat:0,delay:0});let v={done:!1,value:f[0]};const _=[];let S=0;for(;!v.done&&Sg.cancel(),b=()=>{Lt.update(w),a(),c()};return g.onfinish=()=>{e.set(i5(f,s)),r&&r(),b()},{then(m,v){return l.then(m,v)},attachTimeline(m){return g.timeline=m,g.onfinish=null,Dt},get time(){return Ks(g.currentTime||0)},set time(m){g.currentTime=$i(m)},get speed(){return g.playbackRate},set speed(m){g.playbackRate=m},get duration(){return Ks(d)},play:()=>{o||(g.play(),Wd(w))},pause:()=>g.pause(),stop:()=>{if(o=!0,g.playState==="idle")return;const{currentTime:m}=g;if(m){const v=Qd({...s,autoplay:!1});e.setWithVelocity(v.sample(m-bf).value,v.sample(m).value,bf)}b()},complete:()=>g.finish(),cancel:b}}function Y5({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:Dt,pause:Dt,stop:Dt,then:i=>(i(),Promise.resolve()),cancel:Dt,complete:Dt});return t?Qd({keyframes:[0,1],duration:0,delay:t,onComplete:s}):s()}const X5={type:"spring",stiffness:500,damping:25,restSpeed:10},J5=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),Z5={type:"keyframes",duration:.8},eD={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},tD=(e,{keyframes:t})=>t.length>2?Z5:oo.has(e)?e.startsWith("scale")?J5(t[1]):X5:eD,Dy=(e,t)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(fl.test(t)||t==="0")&&!t.startsWith("url(")),nD=new Set(["brightness","contrast","saturate","opacity"]);function rD(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(tp)||[];if(!r)return e;const s=n.replace(r,"");let i=nD.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+s+")"}const sD=/([a-z-]*)\(.*?\)/g,$y={...fl,getAnimatableNone:e=>{const t=e.match(sD);return t?t.map(rD).join(" "):e}},iD={...VT,color:zt,backgroundColor:zt,outlineColor:zt,fill:zt,stroke:zt,borderColor:zt,borderTopColor:zt,borderRightColor:zt,borderBottomColor:zt,borderLeftColor:zt,filter:$y,WebkitFilter:$y},p1=e=>iD[e];function kj(e,t){let n=p1(e);return n!==$y&&(n=fl),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const Pj=e=>/^0[^.\s]+$/.test(e);function oD(e){if(typeof e=="number")return e===0;if(e!==null)return e==="none"||e==="0"||Pj(e)}function aD(e,t,n,r){const s=Dy(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;cs=>{const i=Rj(r,e)||{},o=i.delay||r.delay||0;let{elapsed:a=0}=r;a=a-$i(o);const l=aD(t,e,n,i),c=l[0],f=l[l.length-1],d=Dy(e,c),h=Dy(e,f);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(lD(i)||(p={...p,...tD(e,p)}),p.duration&&(p.duration=$i(p.duration)),p.repeatDelay&&(p.repeatDelay=$i(p.repeatDelay)),!d||!h||r5.current||i.type===!1)return Y5(p);if(!r.isHandoff&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const g=Q5(t,e,p);if(g)return g}return Qd(p)};function Yd(e){return!!(bn(e)&&e.add)}const Nj=e=>/^\-?\d*\.?\d+$/.test(e);function cD(e,t){e.indexOf(t)===-1&&e.push(t)}function fD(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Oj{constructor(){this.subscriptions=[]}add(t){return cD(this.subscriptions,t),()=>fD(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!isNaN(parseFloat(e));class hD{constructor(t,n={}){this.version="10.16.16",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}=Ny;this.lastUpdated!==o&&(this.timeDelta=i,this.lastUpdated=o,Lt.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=()=>Lt.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=dD(this.current),this.owner=n.owner}onChange(t){return this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Oj);const r=this.events[t].add(n);return t==="change"?()=>{r(),Lt.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?Cj(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 Fu(e,t){return new hD(e,t)}const Aj=e=>t=>t.test(e),pD={test:e=>e==="auto",parse:e=>e},Ij=[ao,he,Zo,bs,mI,pI,pD],zl=e=>Ij.find(Aj(e)),mD=[...Ij,zt,fl],gD=e=>mD.find(Aj(e));function yD(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Fu(n))}function vD(e,t){const n=np(e,t);let{transitionEnd:r={},transition:s={},...i}=n?e.makeTargetAnimatable(n,!1):{};i={...i,...r};for(const o in i){const a=PI(i[o]);yD(e,o,a)}}function xD(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;al.remove(d))),c.push(b)}return o&&Promise.all(c).then(()=>{o&&vD(e,o)}),c}function Ly(e,t,n={}){const r=np(e,t,n.custom);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const i=r?()=>Promise.all(Dj(e,r,n)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:f,staggerDirection:d}=s;return ED(e,t,c+l,f,d,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 ED(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(CD).forEach((c,f)=>{c.notify("AnimationStart",t),o.push(Ly(c,t,{...i,delay:n+l(f)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(o)}function CD(e,t){return e.sortNodePosition(t)}function TD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const s=t.map(i=>Ly(e,i,n));r=Promise.all(s)}else if(typeof t=="string")r=Ly(e,t,n);else{const s=typeof t=="function"?np(e,t,n.custom):t;r=Promise.all(Dj(e,s,n))}return r.then(()=>e.notify("AnimationComplete",t))}const jD=[...t1].reverse(),kD=t1.length;function PD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>TD(e,n,r)))}function RD(e){let t=PD(e);const n=OD();let r=!0;const s=(l,c)=>{const f=np(e,c);if(f){const{transition:d,transitionEnd:h,...p}=f;l={...l,...p,...h}}return l};function i(l){t=l(e)}function o(l,c){const f=e.getProps(),d=e.getVariantContext(!0)||{},h=[],p=new Set;let g={},w=1/0;for(let y=0;yw&&S;const L=Array.isArray(_)?_:[_];let z=L.reduce(s,{});E===!1&&(z={});const{prevResolvedValues:H={}}=v,Y={...H,...z},V=K=>{M=!0,p.delete(K),v.needsAnimating[K]=!0};for(const K in Y){const P=z[K],T=H[K];g.hasOwnProperty(K)||(P!==T?qd(P)&&qd(T)?!nj(P,T)||R?V(K):v.protectedKeys[K]=!0:P!==void 0?V(K):p.add(K):P!==void 0&&p.has(K)?V(K):v.protectedKeys[K]=!0)}v.prevProp=_,v.prevResolvedValues=z,v.isActive&&(g={...g,...z}),r&&e.blockInitialAnimation&&(M=!1),M&&!j&&h.push(...L.map(K=>({animation:K,options:{type:m,...l}})))}if(p.size){const y={};p.forEach(m=>{const v=e.getBaseTarget(m);v!==void 0&&(y[m]=v)}),h.push({animation:y})}let b=!!h.length;return r&&(f.initial===!1||f.initial===f.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(h):Promise.resolve()}function a(l,c,f){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.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(f,l);for(const p in n)n[p].protectedKeys={};return h}return{animateChanges:o,setActive:a,setAnimateFunction:i,getState:()=>n}}function ND(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!nj(t,e):!1}function ci(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function OD(){return{animate:ci(!0),whileInView:ci(),whileHover:ci(),whileTap:ci(),whileDrag:ci(),whileFocus:ci(),exit:ci()}}class AD extends cl{constructor(t){super(t),t.animationState||(t.animationState=RD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),Zh(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 ID=0;class DD extends cl{constructor(){super(...arguments),this.id=ID++}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 $D={animation:{Feature:AD},exit:{Feature:DD}},$w=()=>({min:0,max:0}),$j=()=>({x:$w(),y:$w()});function LD({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function MD(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 FD(e,t){return LD(MD(e.getBoundingClientRect(),t))}const UD=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function zD(e){const t=UD.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}function My(e,t,n=1){const[r,s]=zD(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const o=i.trim();return Nj(o)?parseFloat(o):o}else return Ry(s)?My(s,t,n+1):s}function VD(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(!Ry(i))return;const o=My(i,r);o&&s.set(o)});for(const s in t){const i=t[s];if(!Ry(i))continue;const o=My(i,r);o&&(t[s]=o,n||(n={}),n[s]===void 0&&(n[s]=i))}return{target:t,transitionEnd:n}}const BD=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Lj=e=>BD.has(e),HD=e=>Object.keys(e).some(Lj),Lw=e=>e===ao||e===he,Mw=(e,t)=>parseFloat(e.split(", ")[t]),Fw=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const s=r.match(/^matrix3d\((.+)\)$/);if(s)return Mw(s[1],t);{const i=r.match(/^matrix\((.+)\)$/);return i?Mw(i[1],e):0}},qD=new Set(["x","y","z"]),WD=Ec.filter(e=>!qD.has(e));function KD(e){const t=[];return WD.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 Aa={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:Fw(4,13),y:Fw(5,14)};Aa.translateX=Aa.x;Aa.translateY=Aa.y;const GD=(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]=Aa[c](r,i)}),t.render();const l=t.measureViewportBox();return n.forEach(c=>{const f=t.getValue(c);f&&f.jump(a[c]),e[c]=Aa[c](l,i)}),e},QD=(e,t,n={},r={})=>{t={...t},r={...r};const s=Object.keys(t).filter(Lj);let i=[],o=!1;const a=[];if(s.forEach(l=>{const c=e.getValue(l);if(!e.hasValue(l))return;let f=n[l],d=zl(f);const h=t[l];let p;if(qd(h)){const g=h.length,w=h[0]===null?1:0;f=h[w],d=zl(f);for(let b=w;b=0?window.pageYOffset:null,c=GD(t,e,a);return i.length&&i.forEach(([f,d])=>{e.getValue(f).set(d)}),e.render(),Jh&&l!==null&&window.scrollTo({top:l}),{target:c,transitionEnd:r}}else return{target:t,transitionEnd:r}};function YD(e,t,n,r){return HD(t)?QD(e,t,n,r):{target:t,transitionEnd:r}}const XD=(e,t,n,r)=>{const s=VD(e,t,r);return t=s.target,r=s.transitionEnd,YD(e,t,n,r)},Fy={current:null},Mj={current:!1};function JD(){if(Mj.current=!0,!!Jh)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fy.current=e.matches;e.addListener(t),t()}else Fy.current=!1}function ZD(e,t,n){const{willChange:r}=t;for(const s in t){const i=t[s],o=n[s];if(bn(i))e.addValue(s,i),Yd(r)&&r.add(s);else if(bn(o))e.addValue(s,Fu(i,{owner:e})),Yd(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,Fu(a!==void 0?a:i,{owner:e}))}}for(const s in n)t[s]===void 0&&e.removeValue(s);return t}const Uw=new WeakMap,Fj=Object.keys(Mu),e$=Fj.length,zw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],t$=n1.length;class n${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=()=>Lt.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=ep(n),this.isVariantNode=$T(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:c,...f}=this.scrapeMotionValuesFromProps(n,{});for(const d in f){const h=f[d];a[d]!==void 0&&bn(h)&&(h.set(a[d],!1),Yd(c)&&c.add(d))}}scrapeMotionValuesFromProps(t,n){return{}}mount(t){this.current=t,Uw.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)),Mj.current||JD(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Fy.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Uw.delete(this.current),this.projection&&this.projection.unmount(),Wd(this.notifyUpdate),Wd(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=oo.has(t),s=n.on("change",o=>{this.latestValues[t]=o,this.props.onUpdate&&Lt.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;lthis.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):$j()}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;rn.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=Fu(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=u1(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&&!bn(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 Oj),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Uj extends n${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=wD(r,t||{},this);if(s&&(n&&(n=s(n)),r&&(r=s(r)),o&&(o=s(o))),i){xD(this,r,o);const a=XD(this,r,o,n);n=a.transitionEnd,r=a.target}return{transition:t,transitionEnd:n,...r}}}function r$(e){return window.getComputedStyle(e)}class s$ extends Uj{readValueFromInstance(t,n){if(oo.has(n)){const r=p1(n);return r&&r.default||0}else{const r=r$(t),s=(UT(n)?r.getPropertyValue(n):r[n])||0;return typeof s=="string"?s.trim():s}}measureInstanceViewportBox(t,{transformPagePoint:n}){return FD(t,n)}build(t,n,r,s){s1(t,n,r,s.transformTemplate)}scrapeMotionValuesFromProps(t,n){return l1(t,n)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;bn(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}renderInstance(t,n,r,s){WT(t,n,r,s)}}class i$ extends Uj{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(oo.has(n)){const r=p1(n);return r&&r.default||0}return n=KT.has(n)?n:e1(n),t.getAttribute(n)}measureInstanceViewportBox(){return $j()}scrapeMotionValuesFromProps(t,n){return QT(t,n)}build(t,n,r,s){o1(t,n,r,this.isSVGTag,s.transformTemplate)}renderInstance(t,n,r,s){GT(t,n,r,s)}mount(t){this.isSVGTag=a1(t.tagName),super.mount(t)}}const o$=(e,t)=>r1(e)?new i$(t,{enableHardwareAcceleration:!1}):new s$(t,{enableHardwareAcceleration:!0}),cs=iI(MI);function zj(){const e=x.useRef(!1);return J0(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function a$(){const e=zj(),[t,n]=x.useState(0),r=x.useCallback(()=>{e.current&&n(t+1)},[t]);return[x.useCallback(()=>Lt.postRender(r),[r]),t]}class l$ extends x.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 u$({children:e,isPresent:t}){const n=x.useId(),r=x.useRef(null),s=x.useRef({width:0,height:0,top:0,left:0});return x.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]),x.createElement(l$,{isPresent:t,childRef:r,sizeRef:s},x.cloneElement(e,{ref:r}))}const Nm=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:s,presenceAffectsLayout:i,mode:o})=>{const a=YT(c$),l=x.useId(),c=x.useMemo(()=>({id:l,initial:t,isPresent:n,custom:s,onExitComplete:f=>{a.set(f,!0);for(const d of a.values())if(!d)return;r&&r()},register:f=>(a.set(f,!1),()=>a.delete(f))}),i?void 0:[n]);return x.useMemo(()=>{a.forEach((f,d)=>a.set(d,!1))},[n]),x.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),o==="popLayout"&&(e=x.createElement(u$,{isPresent:n},e)),x.createElement(X0.Provider,{value:c},e)};function c$(){return new Map}function f$(e){return x.useEffect(()=>()=>e(),[])}const pi=e=>e.key||"";function d$(e,t){e.forEach(n=>{const r=pi(n);t.set(r,n)})}function h$(e){const t=[];return x.Children.forEach(e,n=>{x.isValidElement(n)&&t.push(n)}),t}const dl=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:s,presenceAffectsLayout:i=!0,mode:o="sync"})=>{const a=x.useContext(LT).forceRender||a$()[0],l=zj(),c=h$(e);let f=c;const d=x.useRef(new Map).current,h=x.useRef(f),p=x.useRef(new Map).current,g=x.useRef(!0);if(J0(()=>{g.current=!1,d$(c,p),h.current=f}),f$(()=>{g.current=!0,p.clear(),d.clear()}),g.current)return x.createElement(x.Fragment,null,f.map(m=>x.createElement(Nm,{key:pi(m),isPresent:!0,initial:n?void 0:!1,presenceAffectsLayout:i,mode:o},m)));f=[...f];const w=h.current.map(pi),b=c.map(pi),y=w.length;for(let m=0;m{if(b.indexOf(v)!==-1)return;const _=p.get(v);if(!_)return;const S=w.indexOf(v);let E=m;if(!E){const j=()=>{d.delete(v);const R=Array.from(p.keys()).filter(M=>!b.includes(M));if(R.forEach(M=>p.delete(M)),h.current=c.filter(M=>{const L=pi(M);return L===v||R.includes(L)}),!d.size){if(l.current===!1)return;a(),r&&r()}};E=x.createElement(Nm,{key:pi(_),isPresent:!1,onExitComplete:j,custom:t,presenceAffectsLayout:i,mode:o},_),d.set(v,E)}f.splice(S,0,E)}),f=f.map(m=>{const v=m.key;return d.has(v)?m:x.createElement(Nm,{key:pi(m),isPresent:!0,presenceAffectsLayout:i,mode:o},m)}),x.createElement(x.Fragment,null,d.size?f:f.map(m=>x.cloneElement(m)))};function p$({children:e,features:t,strict:n=!1}){const[,r]=x.useState(!Om(t)),s=x.useRef(void 0);if(!Om(t)){const{renderer:i,...o}=t;s.current=i,Py(o)}return x.useEffect(()=>{Om(t)&&t().then(({renderer:i,...o})=>{Py(o),s.current=i,r(!0)})},[]),x.createElement(Z0.Provider,{value:{renderer:s.current,strict:n}},e)}function Om(e){return typeof e=="function"}const m$={renderer:o$,...$D,...ZI};function Vj(e,t){return function(){return e.apply(t,arguments)}}const{toString:g$}=Object.prototype,{getPrototypeOf:Ia}=Object,{iterator:kc,toStringTag:Bj}=Symbol,Xd=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Uu=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Xd(n,t))return!0;n=Ia(n)}return!1},y$=(e,t)=>e!=null&&Uu(e,t)?e[t]:void 0,m1=(e=>t=>{const n=g$.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),ar=e=>(e=e.toLowerCase(),t=>m1(t)===e),sp=e=>t=>typeof t===e,{isArray:Hi}=Array,Da=sp("undefined");function hl(e){return e!==null&&!Da(e)&&e.constructor!==null&&!Da(e.constructor)&&nn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Hj=ar("ArrayBuffer");function v$(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Hj(e.buffer),t}const x$=sp("string"),nn=sp("function"),qj=sp("number"),pl=e=>e!==null&&typeof e=="object",b$=e=>e===!0||e===!1,rd=e=>{if(!pl(e))return!1;const t=Ia(e);return(t===null||t===Object.prototype||Ia(t)===null)&&!Uu(e,Bj)&&!Uu(e,kc)},w$=e=>{if(!pl(e)||hl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},_$=ar("Date"),S$=ar("File"),E$=e=>!!(e&&typeof e.uri<"u"),C$=e=>e&&typeof e.getParts<"u",T$=ar("Blob"),j$=ar("FileList"),k$=e=>pl(e)&&nn(e.pipe);function P$(){return typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:{}}const Vw=P$(),Bw=typeof Vw.FormData<"u"?Vw.FormData:void 0,R$=e=>{if(!e)return!1;if(Bw&&e instanceof Bw)return!0;const t=Ia(e);if(!t||t===Object.prototype||!nn(e.append))return!1;const n=m1(e);return n==="formdata"||n==="object"&&nn(e.toString)&&e.toString()==="[object FormData]"},N$=ar("URLSearchParams"),[O$,A$,I$,D$]=["ReadableStream","Request","Response","Headers"].map(ar),$$=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Pc(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,s;if(typeof e!="object"&&(e=[e]),Hi(e))for(r=0,s=e.length;r0;)if(s=n[r],t===s.toLowerCase())return s;return null}const bi=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Kj=e=>!Da(e)&&e!==bi;function Uy(...e){const{caseless:t,skipUndefined:n}=Kj(this)&&this||{},r={},s=(i,o)=>{if(o==="__proto__"||o==="constructor"||o==="prototype")return;const a=t&&typeof o=="string"&&Wj(r,o)||o,l=Xd(r,a)?r[a]:void 0;rd(l)&&rd(i)?r[a]=Uy(l,i):rd(i)?r[a]=Uy({},i):Hi(i)?r[a]=i.slice():(!n||!Da(i))&&(r[a]=i)};for(let i=0,o=e.length;i(Pc(t,(s,i)=>{n&&nn(s)?Object.defineProperty(e,i,{__proto__:null,value:Vj(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,i,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),M$=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),F$=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},U$=(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&&Ia(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},z$=(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},V$=e=>{if(!e)return null;if(Hi(e))return e;let t=e.length;if(!qj(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},B$=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Ia(Uint8Array)),H$=(e,t)=>{const r=(e&&e[kc]).call(e);let s;for(;(s=r.next())&&!s.done;){const i=s.value;t.call(e,i[0],i[1])}},q$=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},W$=ar("HTMLFormElement"),K$=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:G$}=Object.prototype,Q$=ar("RegExp"),Gj=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Pc(n,(s,i)=>{let o;(o=t(s,i,e))!==!1&&(r[i]=o||s)}),Object.defineProperties(e,r)},Y$=e=>{Gj(e,(t,n)=>{if(nn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(nn(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+"'")})}})},X$=(e,t)=>{const n={},r=s=>{s.forEach(i=>{n[i]=!0})};return Hi(e)?r(e):r(String(e).split(t)),n},J$=()=>{},Z$=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function eL(e){return!!(e&&nn(e.append)&&e[Bj]==="FormData"&&e[kc])}const tL=e=>{const t=new WeakSet,n=r=>{if(pl(r)){if(t.has(r))return;if(hl(r))return r;if(!("toJSON"in r)){t.add(r);const s=Hi(r)?[]:{};return Pc(r,(i,o)=>{const a=n(i);!Da(a)&&(s[o]=a)}),t.delete(r),s}}return r};return n(e)},nL=ar("AsyncFunction"),rL=e=>e&&(pl(e)||nn(e))&&nn(e.then)&&nn(e.catch),Qj=((e,t)=>e?setImmediate:t?((n,r)=>(bi.addEventListener("message",({source:s,data:i})=>{s===bi&&i===n&&r.length&&r.shift()()},!1),s=>{r.push(s),bi.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",nn(bi.postMessage)),sL=typeof queueMicrotask<"u"?queueMicrotask.bind(bi):typeof process<"u"&&process.nextTick||Qj,Yj=e=>e!=null&&nn(e[kc]),iL=e=>e!=null&&Uu(e,kc)&&Yj(e),A={isArray:Hi,isArrayBuffer:Hj,isBuffer:hl,isFormData:R$,isArrayBufferView:v$,isString:x$,isNumber:qj,isBoolean:b$,isObject:pl,isPlainObject:rd,isEmptyObject:w$,isReadableStream:O$,isRequest:A$,isResponse:I$,isHeaders:D$,isUndefined:Da,isDate:_$,isFile:S$,isReactNativeBlob:E$,isReactNative:C$,isBlob:T$,isRegExp:Q$,isFunction:nn,isStream:k$,isURLSearchParams:N$,isTypedArray:B$,isFileList:j$,forEach:Pc,merge:Uy,extend:L$,trim:$$,stripBOM:M$,inherits:F$,toFlatObject:U$,kindOf:m1,kindOfTest:ar,endsWith:z$,toArray:V$,forEachEntry:H$,matchAll:q$,isHTMLForm:W$,hasOwnProperty:Xd,hasOwnProp:Xd,hasOwnInPrototypeChain:Uu,getSafeProp:y$,reduceDescriptors:Gj,freezeMethods:Y$,toObjectSet:X$,toCamelCase:K$,noop:J$,toFiniteNumber:Z$,findKey:Wj,global:bi,isContextDefined:Kj,isSpecCompliantForm:eL,toJSONObject:tL,isAsyncFn:nL,isThenable:rL,setImmediate:Qj,asap:sL,isIterable:Yj,isSafeIterable:iL},oL=A.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"]),aL=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]&&oL[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function lL(e){let t=0,n=e.length;for(;tt;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const uL=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),cL=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function g1(e,t){return A.isArray(e)?e.map(n=>g1(n,t)):lL(String(e).replace(t,""))}const fL=e=>g1(e,uL),dL=e=>g1(e,cL);function Xj(e){const t=Object.create(null);return A.forEach(e.toJSON(),(n,r)=>{t[r]=dL(n)}),t}const Hw=Symbol("internals");function Vl(e){return e&&String(e).trim().toLowerCase()}function sd(e){return e===!1||e==null?e:A.isArray(e)?e.map(sd):fL(String(e))}function hL(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 pL=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Am(e,t,n,r,s){if(A.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!A.isString(t)){if(A.isString(r))return t.indexOf(r)!==-1;if(A.isRegExp(r))return r.test(t)}}function mL(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function gL(e,t){const n=A.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,i,o){return this[r].call(this,t,s,i,o)},configurable:!0})})}class ip{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function i(a,l,c){const f=Vl(l);if(!f)return;const d=A.findKey(s,f);(!d||s[d]===void 0||c===!0||c===void 0&&s[d]!==!1)&&(s[d||l]=sd(a))}const o=(a,l)=>A.forEach(a,(c,f)=>i(c,f,l));if(A.isPlainObject(t)||t instanceof this.constructor)o(t,n);else if(A.isString(t)&&(t=t.trim())&&!pL(t))o(aL(t),n);else if(A.isObject(t)&&A.isSafeIterable(t)){let a=Object.create(null),l,c;for(const f of t){if(!A.isArray(f))throw new TypeError("Object iterator must return a key-value pair");c=f[0],A.hasOwnProp(a,c)?(l=a[c],a[c]=A.isArray(l)?[...l,f[1]]:[l,f[1]]):a[c]=f[1]}o(a,n)}else t!=null&&i(n,t,r);return this}get(t,n){if(t=Vl(t),t){const r=A.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return hL(s);if(A.isFunction(n))return n.call(this,s,r);if(A.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Vl(t),t){const r=A.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Am(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function i(o){if(o=Vl(o),o){const a=A.findKey(r,o);a&&(!n||Am(r,r[a],a,n))&&(delete r[a],s=!0)}}return A.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||Am(this,this[i],i,t,!0))&&(delete this[i],s=!0)}return s}normalize(t){const n=this,r={};return A.forEach(this,(s,i)=>{const o=A.findKey(r,i);if(o){n[o]=sd(s),delete n[i];return}const a=t?mL(i):String(i).trim();a!==i&&delete n[i],n[a]=sd(s),r[a]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return A.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&A.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(` `)}getSetCookie(){return this.get("set-cookie")||[]}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[Hw]=this[Hw]={accessors:{}}).accessors,s=this.prototype;function i(o){const a=Vl(o);r[a]||(gL(s,o),r[a]=!0)}return A.isArray(t)?t.forEach(i):i(t),this}}ip.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);A.reduceDescriptors(ip.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}});A.freezeMethods(ip);const yn=ip,yL="[REDACTED ****]";function vL(e){if(A.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(A.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function xL(e,t){const n=new Set(t.map(i=>String(i).toLowerCase())),r=[],s=i=>{if(i===null||typeof i!="object"||A.isBuffer(i))return i;if(r.indexOf(i)!==-1)return;i instanceof yn&&(i=i.toJSON()),r.push(i);let o;if(A.isArray(i))o=[],i.forEach((a,l)=>{const c=s(a);A.isUndefined(c)||(o[l]=c)});else{if(!A.isPlainObject(i)&&vL(i))return r.pop(),i;o=Object.create(null);for(const[a,l]of Object.entries(i)){const c=n.has(a.toLowerCase())?yL:s(l);A.isUndefined(c)||(o[a]=c)}}return r.pop(),o};return s(e)}class jt extends Error{static from(t,n,r,s,i,o){const a=new jt(t.message,n||t.code,r,s,i);return Object.defineProperty(a,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),a.name=t.name,t.status!=null&&a.status==null&&(a.status=t.status),o&&Object.assign(a,o),a}constructor(t,n,r,s,i){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i,this.status=i.status)}toJSON(){const t=this.config,n=t&&A.hasOwnProp(t,"redact")?t.redact:void 0,r=A.isArray(n)&&n.length>0?xL(t,n):A.toJSONObject(t);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:r,code:this.code,status:this.status}}}jt.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";jt.ERR_BAD_OPTION="ERR_BAD_OPTION";jt.ECONNABORTED="ECONNABORTED";jt.ETIMEDOUT="ETIMEDOUT";jt.ECONNREFUSED="ECONNREFUSED";jt.ERR_NETWORK="ERR_NETWORK";jt.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";jt.ERR_DEPRECATED="ERR_DEPRECATED";jt.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";jt.ERR_BAD_REQUEST="ERR_BAD_REQUEST";jt.ERR_CANCELED="ERR_CANCELED";jt.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";jt.ERR_INVALID_URL="ERR_INVALID_URL";jt.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const oe=jt,bL=null,Jj=100;function zy(e){return A.isPlainObject(e)||A.isArray(e)}function Zj(e){return A.endsWith(e,"[]")?e.slice(0,-2):e}function Im(e,t,n){return e?e.concat(t).map(function(s,i){return s=Zj(s),!n&&i?"["+s+"]":s}).join(n?".":""):t}function wL(e){return A.isArray(e)&&!e.some(zy)}const _L=A.toFlatObject(A,{},null,function(t){return/^is[A-Z]/.test(t)});function op(e,t,n){if(!A.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=A.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,v){return!A.isUndefined(v[m])});const r=n.metaTokens,s=n.visitor||g,i=n.dots,o=n.indexes,a=n.Blob||typeof Blob<"u"&&Blob,l=n.maxDepth===void 0?Jj:n.maxDepth,c=a&&A.isSpecCompliantForm(t),f=[];if(!A.isFunction(s))throw new TypeError("visitor must be a function");function d(y){if(y===null)return"";if(A.isDate(y))return y.toISOString();if(A.isBoolean(y))return y.toString();if(!c&&A.isBlob(y))throw new oe("Blob is not supported. Use a Buffer instead.");if(A.isArrayBuffer(y)||A.isTypedArray(y)){if(c&&typeof a=="function")return new a([y]);if(typeof Buffer<"u")return Buffer.from(y);throw new oe("Blob is not supported. Use a Buffer instead.",oe.ERR_NOT_SUPPORT)}return y}function h(y){if(y>l)throw new oe("Object is too deeply nested ("+y+" levels). Max depth: "+l,oe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function p(y,m){if(l===1/0)return JSON.stringify(y);const v=[];return JSON.stringify(y,function(S,E){if(!A.isObject(E))return E;for(;v.length&&v[v.length-1]!==this;)v.pop();return v.push(E),h(m+v.length-1),E})}function g(y,m,v){let _=y;if(A.isReactNative(t)&&A.isReactNativeBlob(y))return t.append(Im(v,m,i),d(y)),!1;if(y&&!v&&typeof y=="object"){if(A.endsWith(m,"{}"))m=r?m:m.slice(0,-2),y=p(y,1);else if(A.isArray(y)&&wL(y)||(A.isFileList(y)||A.endsWith(m,"[]"))&&(_=A.toArray(y)))return m=Zj(m),_.forEach(function(E,j){!(A.isUndefined(E)||E===null)&&t.append(o===!0?Im([m],j,i):o===null?m:m+"[]",d(E))}),!1}return zy(y)?!0:(t.append(Im(v,m,i),d(y)),!1)}const w=Object.assign(_L,{defaultVisitor:g,convertValue:d,isVisitable:zy});function b(y,m,v=0){if(!A.isUndefined(y)){if(h(v),f.indexOf(y)!==-1)throw new Error("Circular reference detected in "+m.join("."));f.push(y),A.forEach(y,function(S,E){(!(A.isUndefined(S)||S===null)&&s.call(t,S,A.isString(E)?E.trim():E,m,w))===!0&&b(S,m?m.concat(E):[E],v+1)}),f.pop()}}if(!A.isObject(e))throw new TypeError("data must be an object");return b(e),t}function qw(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function y1(e,t){this._pairs=[],e&&op(e,this,t)}const ek=y1.prototype;ek.append=function(t,n){this._pairs.push([t,n])};ek.toString=function(t){const n=t?r=>t.call(this,r,qw):qw;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function SL(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function tk(e,t,n){if(!t)return e;e=e||"";const r=A.isFunction(n)?{serialize:n}:n,s=A.getSafeProp(r,"encode")||SL,i=A.getSafeProp(r,"serialize");let o;if(i?o=i(t,r):o=A.isURLSearchParams(t)?t.toString():new y1(t,r).toString(s),o){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class EL{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){A.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Ww=EL,v1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},CL=typeof URLSearchParams<"u"?URLSearchParams:y1,TL=typeof FormData<"u"?FormData:null,jL=typeof Blob<"u"?Blob:null,kL={isBrowser:!0,classes:{URLSearchParams:CL,FormData:TL,Blob:jL},protocols:["http","https","file","blob","url","data"]},x1=typeof window<"u"&&typeof document<"u",Vy=typeof navigator=="object"&&navigator||void 0,PL=x1&&(!Vy||["ReactNative","NativeScript","NS"].indexOf(Vy.product)<0),RL=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),NL=x1&&window.location.href||"http://localhost",OL=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:x1,hasStandardBrowserEnv:PL,hasStandardBrowserWebWorkerEnv:RL,navigator:Vy,origin:NL},Symbol.toStringTag,{value:"Module"})),St={...OL,...kL};function AL(e,t){return op(e,new St.classes.URLSearchParams,{visitor:function(n,r,s,i){return St.isNode&&A.isBuffer(n)?(this.append(r,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...t})}const Kw=Jj;function nk(e){if(e>Kw)throw new oe("FormData field is too deeply nested ("+e+" levels). Max depth: "+Kw,oe.ERR_FORM_DATA_DEPTH_EXCEEDED)}function IL(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)nk(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function DL(e){const t={},n=Object.keys(e);let r;const s=n.length;let i;for(r=0;r=n.length;return o=!o&&A.isArray(s)?s.length:o,l?(A.hasOwnProp(s,o)?s[o]=A.isArray(s[o])?s[o].concat(r):[s[o],r]:s[o]=r,!a):((!A.hasOwnProp(s,o)||!A.isObject(s[o]))&&(s[o]=[]),t(n,r,s[o],i)&&A.isArray(s[o])&&(s[o]=DL(s[o])),!a)}if(A.isFormData(e)&&A.isFunction(e.entries)){const n={};return A.forEachEntry(e,(r,s)=>{t(IL(r),s,n,0)}),n}return null}const wo=(e,t)=>e!=null&&A.hasOwnProp(e,t)?e[t]:void 0;function $L(e,t,n){if(A.isString(e))try{return(t||JSON.parse)(e),A.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const b1={transitional:v1,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,i=A.isObject(t);if(i&&A.isHTMLForm(t)&&(t=new FormData(t)),A.isFormData(t))return s?JSON.stringify(rk(t)):t;if(A.isArrayBuffer(t)||A.isBuffer(t)||A.isStream(t)||A.isFile(t)||A.isBlob(t)||A.isReadableStream(t))return t;if(A.isArrayBufferView(t))return t.buffer;if(A.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let a;if(i){const l=wo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return AL(t,l).toString();if((a=A.isFileList(t))||r.indexOf("multipart/form-data")>-1){const c=wo(this,"env"),f=c&&c.FormData;return op(a?{"files[]":t}:t,f&&new f,l)}}return i||s?(n.setContentType("application/json",!1),$L(t)):t}],transformResponse:[function(t){const n=wo(this,"transitional")||b1.transitional,r=n&&n.forcedJSONParsing,s=wo(this,"responseType"),i=s==="json";if(A.isResponse(t)||A.isReadableStream(t))return t;if(t&&A.isString(t)&&(r&&!s||i)){const a=!(n&&n.silentJSONParsing)&&i;try{return JSON.parse(t,wo(this,"parseReviver"))}catch(l){if(a)throw l.name==="SyntaxError"?oe.from(l,oe.ERR_BAD_RESPONSE,this,null,wo(this,"response")):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:St.classes.FormData,Blob:St.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};A.forEach(["delete","get","head","post","put","patch","query"],e=>{b1.headers[e]={}});const w1=b1;function Dm(e,t){const n=this||w1,r=t||n,s=yn.from(r.headers);let i=r.data;return A.forEach(e,function(a){i=a.call(n,i,s.normalize(),t?t.status:void 0)}),s.normalize(),i}function sk(e){return!!(e&&e.__CANCEL__)}class LL extends oe{constructor(t,n,r){super(t??"canceled",oe.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}}const Rc=LL;function ik(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new oe("Request failed with status code "+n.status,n.status>=400&&n.status<500?oe.ERR_BAD_REQUEST:oe.ERR_BAD_RESPONSE,n.config,n.request,n))}function ML(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function FL(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(),f=r[i];o||(o=c),n[s]=l,r[s]=c;let d=i,h=0;for(;d!==s;)h+=n[d++],d=d%e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o{n=f,s=null,i&&(clearTimeout(i),i=null),e(...c)};return[(...c)=>{const f=Date.now(),d=f-n;d>=r?o(c,f):(s=c,i||(i=setTimeout(()=>{i=null,o(s)},r-d)))},()=>s&&o(s)]}const Jd=(e,t,n=3)=>{let r=0;const s=FL(50,250);return UL(i=>{if(!i||typeof i.loaded!="number")return;const o=i.loaded,a=i.lengthComputable?i.total:void 0,l=a!=null?Math.min(o,a):o,c=Math.max(0,l-r),f=s(c);r=Math.max(r,l);const d={loaded:l,total:a,progress:a?l/a:void 0,bytes:c,rate:f||void 0,estimated:f&&a?(a-l)/f:void 0,event:i,lengthComputable:a!=null,[t?"download":"upload"]:!0};e(d)},n)},Gw=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Qw=e=>(...t)=>A.asap(()=>e(...t)),zL=St.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,St.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(St.origin),St.navigator&&/(msie|trident)/i.test(St.navigator.userAgent)):()=>!0,VL=St.hasStandardBrowserEnv?{write(e,t,n,r,s,i,o){if(typeof document>"u")return;const a=[`${e}=${encodeURIComponent(t)}`];A.isNumber(n)&&a.push(`expires=${new Date(n).toUTCString()}`),A.isString(r)&&a.push(`path=${r}`),A.isString(s)&&a.push(`domain=${s}`),i===!0&&a.push("secure"),A.isString(o)&&a.push(`SameSite=${o}`),document.cookie=a.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.split(";");for(let n=0;ne instanceof yn?{...e}:e;function qi(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(f,d,h,p){return A.isPlainObject(f)&&A.isPlainObject(d)?A.merge.call({caseless:p},f,d):A.isPlainObject(d)?A.merge({},d):A.isArray(d)?d.slice():d}function s(f,d,h,p){if(A.isUndefined(d)){if(!A.isUndefined(f))return r(void 0,f,h,p)}else return r(f,d,h,p)}function i(f,d){if(!A.isUndefined(d))return r(void 0,d)}function o(f,d){if(A.isUndefined(d)){if(!A.isUndefined(f))return r(void 0,f)}else return r(void 0,d)}function a(f){const d=A.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!A.isUndefined(d))if(A.isPlainObject(d)){if(A.hasOwnProp(d,f))return d[f]}else return;const h=A.hasOwnProp(e,"transitional")?e.transitional:void 0;if(A.isPlainObject(h)&&A.hasOwnProp(h,f))return h[f]}function l(f,d,h){if(A.hasOwnProp(t,h))return r(f,d);if(A.hasOwnProp(e,h))return r(void 0,f)}const c={url:i,method:i,data:i,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,withXSRFToken: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,allowedSocketPaths:o,responseEncoding:o,validateStatus:l,headers:(f,d,h)=>s(Xw(f),Xw(d),h,!0)};return A.forEach(Object.keys({...e,...t}),function(d){if(d==="__proto__"||d==="constructor"||d==="prototype")return;const h=A.hasOwnProp(c,d)?c[d]:s,p=A.hasOwnProp(e,d)?e[d]:void 0,g=A.hasOwnProp(t,d)?t[d]:void 0,w=h(p,g,d);A.isUndefined(w)&&h!==l||(n[d]=w)}),A.hasOwnProp(t,"validateStatus")&&A.isUndefined(t.validateStatus)&&a("validateStatusUndefinedResolves")===!1&&(A.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const QL=["content-type","content-length"];function YL(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{QL.includes(r.toLowerCase())&&e.set(r,s)})}const XL=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function ak(e){const t=qi({},e),n=h=>A.hasOwnProp(t,h)?t[h]:void 0,r=n("data");let s=n("withXSRFToken");const i=n("xsrfHeaderName"),o=n("xsrfCookieName");let a=n("headers");const l=n("auth"),c=n("baseURL"),f=n("allowAbsoluteUrls"),d=n("url");if(t.headers=a=yn.from(a),t.url=tk(ok(c,d,f,t),n("params"),n("paramsSerializer")),l){const h=A.getSafeProp(l,"username")||"",p=A.getSafeProp(l,"password")||"";try{a.set("Authorization","Basic "+btoa(h+":"+(p?XL(p):"")))}catch(g){throw oe.from(g,oe.ERR_BAD_OPTION_VALUE,e)}}if(A.isFormData(r)&&(St.hasStandardBrowserEnv||St.hasStandardBrowserWebWorkerEnv||A.isReactNative(r)?a.setContentType(void 0):A.isFunction(r.getHeaders)&&YL(a,r.getHeaders(),n("formDataHeaderPolicy"))),St.hasStandardBrowserEnv&&(A.isFunction(s)&&(s=s(t)),s===!0||s==null&&zL(t.url))){const p=i&&o&&VL.read(o);p&&a.set(i,p)}return t}const JL=typeof XMLHttpRequest<"u",ZL=JL&&function(e){return new Promise(function(n,r){const s=ak(e);let i=s.data;const o=yn.from(s.headers).normalize();let{responseType:a,onUploadProgress:l,onDownloadProgress:c}=s,f,d,h,p,g;function w(){p&&p(),g&&g(),s.cancelToken&&s.cancelToken.unsubscribe(f),s.signal&&s.signal.removeEventListener("abort",f)}let b=new XMLHttpRequest;b.open(s.method.toUpperCase(),s.url,!0),b.timeout=s.timeout;function y(){if(!b)return;const v=yn.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),S={data:!a||a==="text"||a==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:v,config:e,request:b};ik(function(j){n(j),w()},function(j){r(j),w()},S),b=null}"onloadend"in b?b.onloadend=y:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.startsWith("file:"))||setTimeout(y)},b.onabort=function(){b&&(r(new oe("Request aborted",oe.ECONNABORTED,e,b)),w(),b=null)},b.onerror=function(_){const S=_&&_.message?_.message:"Network Error",E=new oe(S,oe.ERR_NETWORK,e,b);E.event=_||null,r(E),w(),b=null},b.ontimeout=function(){let _=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const S=s.transitional||v1;s.timeoutErrorMessage&&(_=s.timeoutErrorMessage),r(new oe(_,S.clarifyTimeoutError?oe.ETIMEDOUT:oe.ECONNABORTED,e,b)),w(),b=null},i===void 0&&o.setContentType(null),"setRequestHeader"in b&&A.forEach(Xj(o),function(_,S){b.setRequestHeader(S,_)}),A.isUndefined(s.withCredentials)||(b.withCredentials=!!s.withCredentials),a&&a!=="json"&&(b.responseType=s.responseType),c&&([h,g]=Jd(c,!0),b.addEventListener("progress",h)),l&&b.upload&&([d,p]=Jd(l),b.upload.addEventListener("progress",d),b.upload.addEventListener("loadend",p)),(s.cancelToken||s.signal)&&(f=v=>{b&&(r(!v||v.type?new Rc(null,e,b):v),b.abort(),w(),b=null)},s.cancelToken&&s.cancelToken.subscribe(f),s.signal&&(s.signal.aborted?f():s.signal.addEventListener("abort",f)));const m=ML(s.url);if(m&&!St.protocols.includes(m)){r(new oe("Unsupported protocol "+m+":",oe.ERR_BAD_REQUEST,e)),w();return}b.send(i||null)})},eM=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(l){if(!r){r=!0,o();const c=l instanceof Error?l:this.reason;n.abort(c instanceof oe?c:new Rc(c instanceof Error?c.message:c))}};let i=t&&setTimeout(()=>{i=null,s(new oe(`timeout of ${t}ms exceeded`,oe.ETIMEDOUT))},t);const o=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s,{once:!0}));const{signal:a}=n;return a.unsubscribe=()=>A.asap(o),a},tM=eM,nM=function*(e,t){let n=e.byteLength;if(!t||n{const s=rM(e,t);let i=0,o,a=l=>{o||(o=!0,r&&r(l))};return new ReadableStream({async pull(l){try{const{done:c,value:f}=await s.next();if(c){a(),l.close();return}let d=f.byteLength;if(n){let h=i+=d;n(h)}l.enqueue(new Uint8Array(f))}catch(c){throw a(c),c}},cancel(l){return a(l),s.return()}},{highWaterMark:2})},Zd=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,iM=(e,t,n)=>t+2p>=2&&r.charCodeAt(p-2)===37&&r.charCodeAt(p-1)===51&&(r.charCodeAt(p)===68||r.charCodeAt(p)===100);c>=0&&(r.charCodeAt(c)===61?(l++,c--):f(c)&&(l++,c-=3)),l===1&&c>=0&&(r.charCodeAt(c)===61||f(c))&&l++;const h=Math.floor(o/4)*3-(l||0);return h>0?h:0}let i=0;for(let o=0,a=r.length;o=55296&&l<=56319&&o+1=56320&&c<=57343?(i+=4,o++):i+=3}else i+=3}return i}const _1="1.18.1",Zw=64*1024,{isFunction:wf}=A,aM=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),e_=e=>{if(!A.isString(e))return e;try{return decodeURIComponent(e)}catch{return e}},t_=(e,...t)=>{try{return!!e(...t)}catch{return!1}},lM=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},uM=e=>{const t=A.global!==void 0&&A.global!==null?A.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=A.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:i,Response:o}=e,a=s?wf(s):typeof fetch=="function",l=wf(i),c=wf(o);if(!a)return!1;const f=a&&wf(n),d=a&&(typeof r=="function"?(y=>m=>y.encode(m))(new r):async y=>new Uint8Array(await new i(y).arrayBuffer())),h=l&&f&&t_(()=>{let y=!1;const m=new i(St.origin,{body:new n,method:"POST",get duplex(){return y=!0,"half"}}),v=m.headers.has("Content-Type");return m.body!=null&&m.body.cancel(),y&&!v}),p=c&&f&&t_(()=>A.isReadableStream(new o("").body)),g={stream:p&&(y=>y.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(y=>{!g[y]&&(g[y]=(m,v)=>{let _=m&&m[y];if(_)return _.call(m);throw new oe(`Response type '${y}' is not supported`,oe.ERR_NOT_SUPPORT,v)})});const w=async y=>{if(y==null)return 0;if(A.isBlob(y))return y.size;if(A.isSpecCompliantForm(y))return(await new i(St.origin,{method:"POST",body:y}).arrayBuffer()).byteLength;if(A.isArrayBufferView(y)||A.isArrayBuffer(y))return y.byteLength;if(A.isURLSearchParams(y)&&(y=y+""),A.isString(y))return(await d(y)).byteLength},b=async(y,m)=>{const v=A.toFiniteNumber(y.getContentLength());return v??w(m)};return async y=>{let{url:m,method:v,data:_,signal:S,cancelToken:E,timeout:j,onDownloadProgress:R,onUploadProgress:M,responseType:L,headers:z,withCredentials:H="same-origin",fetchOptions:Y,maxContentLength:V,maxBodyLength:K}=ak(y);const P=A.isNumber(V)&&V>-1,T=A.isNumber(K)&&K>-1,C=X=>A.hasOwnProp(y,X)?y[X]:void 0;let D=s||fetch;L=L?(L+"").toLowerCase():"text";let $=tM([S,E&&E.toAbortSignal()],j),I=null;const q=$&&$.unsubscribe&&(()=>{$.unsubscribe()});let ie,te=null;const xe=()=>new oe("Request body larger than maxBodyLength limit",oe.ERR_BAD_REQUEST,y,I);try{let X;const ue=C("auth");if(ue){const de=A.getSafeProp(ue,"username")||"",kt=A.getSafeProp(ue,"password")||"";X={username:de,password:kt}}if(lM(m)){const de=new URL(m,St.origin);if(!X&&(de.username||de.password)){const kt=e_(de.username),Wn=e_(de.password);X={username:kt,password:Wn}}(de.username||de.password)&&(de.username="",de.password="",m=de.href)}if(X&&(z.delete("authorization"),z.set("Authorization","Basic "+btoa(aM((X.username||"")+":"+(X.password||""))))),P&&typeof m=="string"&&m.startsWith("data:")&&oM(m)>V)throw new oe("maxContentLength size of "+V+" exceeded",oe.ERR_BAD_RESPONSE,y,I);if(T&&v!=="get"&&v!=="head"){const de=await w(_);if(typeof de=="number"&&isFinite(de)&&(ie=de,de>K))throw xe()}const ge=T&&(A.isReadableStream(_)||A.isStream(_)),it=(de,kt,Wn)=>Jw(de,Zw,Kn=>{if(T&&Kn>K)throw te=xe();kt&&kt(Kn)},Wn);if(h&&v!=="get"&&v!=="head"&&(M||ge)){if(ie=ie??await b(z,_),ie!==0||ge){let de=new i(m,{method:"POST",body:_,duplex:"half"}),kt;if(A.isFormData(_)&&(kt=de.headers.get("content-type"))&&z.setContentType(kt),de.body){const[Wn,Kn]=M&&Gw(ie,Jd(Qw(M)))||[];_=it(de.body,Wn,Kn)}}}else if(ge&&!l&&f&&v!=="get"&&v!=="head")_=it(_);else if(ge&&l&&!h&&v!=="get"&&v!=="head")throw new oe("Stream request bodies are not supported by the current fetch implementation",oe.ERR_NOT_SUPPORT,y,I);A.isString(H)||(H=H?"include":"omit");const dt=l&&"credentials"in i.prototype;if(A.isFormData(_)){const de=z.getContentType();de&&/^multipart\/form-data/i.test(de)&&!/boundary=/i.test(de)&&z.delete("content-type")}z.set("User-Agent","axios/"+_1,!1);const Ce={...Y,signal:$,method:v.toUpperCase(),headers:Xj(z.normalize()),body:_,duplex:"half",credentials:dt?H:void 0};I=l&&new i(m,Ce);let Xe=await(l?D(I,Y):D(m,Ce));const Ut=yn.from(Xe.headers);if(P){const de=A.toFiniteNumber(Ut.getContentLength());if(de!=null&&de>V)throw new oe("maxContentLength size of "+V+" exceeded",oe.ERR_BAD_RESPONSE,y,I)}const Ie=p&&(L==="stream"||L==="response");if(p&&Xe.body&&(R||P||Ie&&q)){const de={};["status","statusText","headers"].forEach(U=>{de[U]=Xe[U]});const kt=A.toFiniteNumber(Ut.getContentLength()),[Wn,Kn]=R&&Gw(kt,Jd(Qw(R),!0))||[];let N=0;const F=U=>{if(P&&(N=U,N>V))throw new oe("maxContentLength size of "+V+" exceeded",oe.ERR_BAD_RESPONSE,y,I);Wn&&Wn(U)};Xe=new o(Jw(Xe.body,Zw,F,()=>{Kn&&Kn(),q&&q()}),de)}L=L||"text";let Se=await g[A.findKey(g,L)||"text"](Xe,y);if(P&&!p&&!Ie){let de;if(Se!=null&&(typeof Se.byteLength=="number"?de=Se.byteLength:typeof Se.size=="number"?de=Se.size:typeof Se=="string"&&(de=typeof r=="function"?new r().encode(Se).byteLength:Se.length)),typeof de=="number"&&de>V)throw new oe("maxContentLength size of "+V+" exceeded",oe.ERR_BAD_RESPONSE,y,I)}return!Ie&&q&&q(),await new Promise((de,kt)=>{ik(de,kt,{data:Se,headers:yn.from(Xe.headers),status:Xe.status,statusText:Xe.statusText,config:y,request:I})})}catch(X){if(q&&q(),$&&$.aborted&&$.reason instanceof oe){const ue=$.reason;throw ue.config=y,I&&(ue.request=I),X!==ue&&Object.defineProperty(ue,"cause",{__proto__:null,value:X,writable:!0,enumerable:!1,configurable:!0}),ue}if(te)throw I&&!te.request&&(te.request=I),te;if(X instanceof oe)throw I&&!X.request&&(X.request=I),X;if(X&&X.name==="TypeError"&&/Load failed|fetch/i.test(X.message)){const ue=new oe("Network Error",oe.ERR_NETWORK,y,I,X&&X.response);throw Object.defineProperty(ue,"cause",{__proto__:null,value:X.cause||X,writable:!0,enumerable:!1,configurable:!0}),ue}throw oe.from(X,X&&X.code,y,I,X&&X.response)}}},cM=new Map,lk=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,i=[r,s,n];let o=i.length,a=o,l,c,f=cM;for(;a--;)l=i[a],c=f.get(l),c===void 0&&f.set(l,c=a?new Map:uM(t)),f=c;return c};lk();const S1={http:bL,xhr:ZL,fetch:{get:lk}};A.forEach(S1,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch{}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const n_=e=>`- ${e}`,fM=e=>A.isFunction(e)||e===null||e===!1;function dM(e,t){e=A.isArray(e)?e:[e];const{length:n}=e;let r,s;const i={};for(let o=0;o`adapter ${l} `+(c===!1?"is not supported by the environment":"is not available in the build"));let a=n?o.length>1?`since : `+o.map(n_).join(` `):" "+n_(o[0]):"as no adapter specified";throw new oe("There is no suitable adapter to dispatch the request "+a,oe.ERR_NOT_SUPPORT)}return s}const uk={getAdapter:dM,adapters:S1};function $m(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Rc(null,e)}function r_(e){return $m(e),e.headers=yn.from(e.headers),e.data=Dm.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),uk.getAdapter(e.adapter||w1.adapter,e)(e).then(function(r){$m(e),e.response=r;try{r.data=Dm.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=yn.from(r.headers),r},function(r){if(!sk(r)&&($m(e),r&&r.response)){e.response=r.response;try{r.response.data=Dm.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=yn.from(r.response.headers)}return Promise.reject(r)})}const ap={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ap[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const s_={};ap.transitional=function(t,n,r){function s(i,o){return"[Axios v"+_1+"] Transitional option '"+i+"'"+o+(r?". "+r:"")}return(i,o,a)=>{if(t===!1)throw new oe(s(o," has been removed"+(n?" in "+n:"")),oe.ERR_DEPRECATED);return n&&!s_[o]&&(s_[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}};ap.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function hM(e,t,n){if(typeof e!="object"||e===null)throw new oe("options must be an object",oe.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const i=r[s],o=Object.prototype.hasOwnProperty.call(t,i)?t[i]:void 0;if(o){const a=e[i],l=a===void 0||o(a,i,e);if(l!==!0)throw new oe("option "+i+" must be "+l,oe.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new oe("Unknown option "+i,oe.ERR_BAD_OPTION)}}const id={assertOptions:hM,validators:ap},Nt=id.validators;class eh{constructor(t){this.defaults=t||{},this.interceptors={request:new Ww,response:new Ww}}async request(t,n){try{return await this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const i=(()=>{if(!s.stack)return"";const o=s.stack.indexOf(` `);return o===-1?"":s.stack.slice(o+1)})();try{if(!r.stack)r.stack=i;else if(i){const o=i.indexOf(` `),a=o===-1?-1:i.indexOf(` `,o+1),l=a===-1?"":i.slice(a+1);String(r.stack).endsWith(l)||(r.stack+=` `+i)}}catch{}}throw r}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=qi(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:i}=n;r!==void 0&&id.assertOptions(r,{silentJSONParsing:Nt.transitional(Nt.boolean),forcedJSONParsing:Nt.transitional(Nt.boolean),clarifyTimeoutError:Nt.transitional(Nt.boolean),legacyInterceptorReqResOrdering:Nt.transitional(Nt.boolean),advertiseZstdAcceptEncoding:Nt.transitional(Nt.boolean),validateStatusUndefinedResolves:Nt.transitional(Nt.boolean)},!1),s!=null&&(A.isFunction(s)?n.paramsSerializer={serialize:s}:id.assertOptions(s,{encode:Nt.function,serialize:Nt.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),id.assertOptions(n,{baseUrl:Nt.spelling("baseURL"),withXsrfToken:Nt.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let o=i&&A.merge(i.common,i[n.method]);i&&A.forEach(["delete","get","head","post","put","patch","query","common"],g=>{delete i[g]}),n.headers=yn.concat(o,i);const a=[];let l=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen=="function"&&w.runWhen(n)===!1)return;l=l&&w.synchronous;const b=n.transitional||v1;b&&b.legacyInterceptorReqResOrdering?a.unshift(w.fulfilled,w.rejected):a.push(w.fulfilled,w.rejected)});const c=[];this.interceptors.response.forEach(function(w){c.push(w.fulfilled,w.rejected)});let f,d=0,h;if(!l){const g=[r_.bind(this),void 0];for(g.unshift(...a),g.push(...c),h=g.length,f=Promise.resolve(n);d{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 Rc(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)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new E1(function(s){t=s}),cancel:t}}}const pM=E1;function mM(e){return function(n){return e.apply(null,n)}}function gM(e){return A.isObject(e)&&e.isAxiosError===!0}const By={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(By).forEach(([e,t])=>{By[t]=e});const yM=By;function ck(e){const t=new od(e),n=Vj(od.prototype.request,t);return A.extend(n,od.prototype,t,{allOwnKeys:!0}),A.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return ck(qi(e,s))},n}const st=ck(w1);st.Axios=od;st.CanceledError=Rc;st.CancelToken=pM;st.isCancel=sk;st.VERSION=_1;st.toFormData=op;st.AxiosError=oe;st.Cancel=st.CanceledError;st.all=function(t){return Promise.all(t)};st.spread=mM;st.isAxiosError=gM;st.mergeConfig=qi;st.AxiosHeaders=yn;st.formToJSON=e=>rk(A.isHTMLForm(e)?new FormData(e):e);st.getAdapter=uk.getAdapter;st.HttpStatusCode=yM;st.default=st;const Or=st;let fk=0;function dk(){return fk}function i_(e){fk=e}function ml(e){return e?/^[a-zA-Z][a-zA-Z\d+\-.]*?:/.test(e):!1}function ea(e,t){var n;return Or.isAxiosError(e)&&((n=e.response)==null?void 0:n.status)==t}const Ye=new PA({defaultOptions:{queries:{staleTime:3e4,retry:(e,t)=>!ea(t,401)&&!ea(t,403)&&!ea(t,404)&&e<2}}}),ae=Or.create();ae.defaults.withCredentials=!0;ae.defaults.responseType="json";ae.defaults.headers={common:{Accept:"application/json"}};const vM=["auth","secure","log-viewer","horizon"];ae.interceptors.request.use(e=>{var r,s,i,o,a;!vM.some(l=>{var c;return(c=e.url)==null?void 0:c.startsWith(l)})&&!ml(e==null?void 0:e.url)&&(e.url=`api/v1/${e.url}`);const t=(r=e.method)==null?void 0:r.toUpperCase();t==="GET"&&Array.isArray((s=e.params)==null?void 0:s.with)&&(e.params.with=e.params.with.join(",")),t==="GET"&&Array.isArray((i=e.params)==null?void 0:i.load)&&(e.params.load=e.params.load.join(",")),t==="GET"&&Array.isArray((o=e.params)==null?void 0:o.loadCount)&&(e.params.loadCount=e.params.loadCount.join(","));const n=dk();if(n){const l=(a=e.method)==null?void 0:a.toLowerCase();["get","post","put"].includes(l)&&(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 fs=G.createContext(null);function ye(e,t){return{...t,message:e}}const xM=""+new URL("dashboard-top-361aea8c.webp",import.meta.url).href,bM=""+new URL("dashboard-bottom-8e75da45.webp",import.meta.url).href,wM={auth:{redirectUri:"/dashboard",adminRedirectUri:"/admin"},homepage:{options:[{label:ye("Landing page"),value:"landingPage"}]},admin:{ads:[{slot:"ads.dashboard_top",description:ye("This ad will appear at the top of user dashboard."),image:xM},{slot:"ads.dashboard_bottom",description:ye("This ad will appear at the bottom of user dashboard."),image:bM}]}};var _M=function(t){return SM(t)&&!EM(t)};function SM(e){return!!e&&typeof e=="object"}function EM(e){var t=Object.prototype.toString.call(e);return t==="[object RegExp]"||t==="[object Date]"||jM(e)}var CM=typeof Symbol=="function"&&Symbol.for,TM=CM?Symbol.for("react.element"):60103;function jM(e){return e.$$typeof===TM}function kM(e){return Array.isArray(e)?[]:{}}function zu(e,t){return t.clone!==!1&&t.isMergeableObject(e)?$a(kM(e),e,t):e}function PM(e,t,n){return e.concat(t).map(function(r){return zu(r,n)})}function RM(e,t){if(!t.customMerge)return $a;var n=t.customMerge(e);return typeof n=="function"?n:$a}function NM(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function o_(e){return Object.keys(e).concat(NM(e))}function hk(e,t){try{return t in e}catch{return!1}}function OM(e,t){return hk(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function AM(e,t,n){var r={};return n.isMergeableObject(e)&&o_(e).forEach(function(s){r[s]=zu(e[s],n)}),o_(t).forEach(function(s){OM(e,s)||(hk(e,s)&&n.isMergeableObject(t[s])?r[s]=RM(s,n)(e[s],t[s],n):r[s]=zu(t[s],n))}),r}function $a(e,t,n){n=n||{},n.arrayMerge=n.arrayMerge||PM,n.isMergeableObject=n.isMergeableObject||_M,n.cloneUnlessOtherwiseSpecified=zu;var r=Array.isArray(t),s=Array.isArray(e),i=r===s;return i?r?n.arrayMerge(e,t,n):AM(e,t,n):zu(t,n)}$a.all=function(t,n){if(!Array.isArray(t))throw new Error("first argument should be an array");return t.reduce(function(r,s){return $a(r,s,n)},{})};var IM=$a,DM=IM;const $M=Nr(DM);function pk(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t{const{attr:n,size:r,title:s,className:i,color:o,style:a,children:l,viewBox:c,width:f,height:d,...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:B("svg-icon",i,MM(r)),style:{color:o,...a},ref:t,height:d||"1em",width:f||"1em",children:[s&&u.jsx("title",{children:s}),l]})});function MM(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 fe(e,t="",n){const r=(s,i)=>u.jsx(LM,{"data-testid":`${t}Icon`,ref:i,viewBox:n,...s,size:s.size||"md",children:e});return G.memo(G.forwardRef(r))}function lp(e,t=""){const n=mk(e);return fe(n,t)}function mk(e){return(e==null?void 0:e.map)&&e.map((t,n)=>G.createElement(t.tag,{key:n,...t.attr},mk(t.child)))}function FM(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=>FM(r))),n}const UM=fe(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"),zM=fe(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"),VM=fe(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"),Nc=["bootstrapData"];function rr(){return Ye.getQueryData(Nc)}function BM(){Ye.invalidateQueries({queryKey:Nc})}function gk(e){Ye.setQueryData(Nc,typeof e=="string"?C1(e):e)}function HM(e){gk({...rr(),...e})}const yk=typeof window<"u"&&window.bootstrapData?C1(window.bootstrapData):void 0;Ye.setQueryData(Nc,yk);function qM(){return or({queryKey:Nc,queryFn:()=>WM(),staleTime:1/0,placeholderData:ST,initialData:yk})}const WM=async()=>ae.get("bootstrap-data").then(e=>C1(e.data.data));function C1(e){return typeof e=="string"?JSON.parse(e):e}function KM(e){if(ml(e))return e;const t=rr().settings.asset_url||rr().settings.base_url;return e=e.replace(/^\/+/g,""),e.startsWith("assets/")?`${t}/build/${e}`:`${t}/${e}`}const T1=x.memo(({src:e,className:t,height:n="h-full"})=>{const{data:r}=GM(e);return u.jsx("div",{className:B("svg-image-container inline-block bg-no-repeat",n,t),dangerouslySetInnerHTML:r})});function GM(e){return or({queryKey:["svgImage",KM(e)],queryFn:()=>QM(e),refetchOnMount:!1,refetchOnReconnect:!1,refetchOnWindowFocus:!1,staleTime:1/0,enabled:!!e})}function QM(e){return Or.get(e,{responseType:"text"}).then(t=>({__html:t.data}))}const j1=x.memo(({src:e,className:t,...n})=>{let r=null;if(e?typeof e=="object"?r="icon":e.endsWith(".svg")&&!ml(e)?r="svg":r="image":r=null,r==="svg")return u.jsx(T1,{...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 k1(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 YM(e){const{variant:t,shadow:n,whitespace:r="whitespace-nowrap",display:s="inline-flex"}=e,i={...e,border:e.border||"border"};let o=[];return t==="outline"?o=XM(i):t==="text"?o=JM(i):t==="flat"||t==="raised"?o=eF(i):t==="link"&&(o=ZM(i)),[...o,n||t==="raised"&&"shadow-md",r,s,t&&"align-middle 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 XM({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"positive":return[`text-positive bg-transparent ${t} border-positive/50`,"hover:bg-positive/4 hover:border-positive",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 JM({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"positive":return["text-positive bg-transparent border-transparent","hover:bg-positive/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 ZM({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 eF({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 On(e){return e&&(t=>{t.currentTarget.contains(t.target)&&e(t)})}const up=x.forwardRef((e,t)=>{const{children:n,color:r=null,variant:s,radius:i,shadow:o,whitespace:a,justify:l="justify-center",className:c,href:f,form:d,border:h,elementType:p,to:g,relative:w,replace:b,end:y,display:m,type:v="button",onClick:_,onPointerDown:S,onPointerUp:E,onKeyDown:j,...R}=e,M=p||(f?"a":"button"),L=M==="a";return u.jsx(M,{ref:t,form:L?void 0:d,href:f,to:g,relative:w,type:L?void 0:v,replace:b,end:y,onPointerDown:On(S),onPointerUp:On(E),onClick:On(_),onKeyDown:On(j),className:B("focus-visible:ring",YM({variant:s,color:r,border:h,whitespace:a,display:m}),i,l,c),...R,children:n})}),le=G.forwardRef(({children:e,startIcon:t,endIcon:n,size:r="sm",sizeClassName:s,className:i,equalWidth:o=!1,radius:a="rounded-button",variant:l="text",disabled:c,elementType:f,to:d,replace:h,href:p,download:g,...w},b)=>{const y=B("font-semibold",s||k1(r,{equalWidth:o,variant:l}),i);return u.jsxs(up,{className:y,ref:b,radius:a,variant:l,disabled:c,to:c?void 0:d,href:c?void 0:p,download:c?void 0:g,elementType:c?void 0:f,replace:c?void 0:h,...w,children:[t&&u.jsx(a_,{position:"start",icon:t,size:r}),e,n&&u.jsx(a_,{position:"end",icon:n,size:r})]})});function a_({icon:e,position:t,size:n}){const r=B("m-auto",{"-ml-4 mr-8":t==="start","-mr-4 ml-8":t==="end"},e.props.className);return G.cloneElement(e,{className:r,size:n})}function tF(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function P1(e,t,n){tF(e,t),t.set(e,n)}function Lm(e,t){return e-t*Math.floor(e/t)}const vk=1721426;function _f(e,t,n,r){t=R1(e,t);let s=t-1,i=-2;return n<=2?i=0:ad(t)&&(i=-1),vk-1+365*s+Math.floor(s/4)-Math.floor(s/100)+Math.floor(s/400)+Math.floor((367*n-362)/12+i+r)}function ad(e){return e%4===0&&(e%100!==0||e%400===0)}function R1(e,t){return e==="BC"?1-t:t}function nF(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}const rF={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 La{fromJulianDay(t){let n=t,r=n-vk,s=Math.floor(r/146097),i=Lm(r,146097),o=Math.floor(i/36524),a=Lm(i,36524),l=Math.floor(a/1461),c=Lm(a,1461),f=Math.floor(c/365),d=s*400+o*100+l*4+f+(o!==4&&f!==4?1:0),[h,p]=nF(d),g=n-_f(h,p,1,1),w=2;n<_f(h,p,3,1)?w=0:ad(p)&&(w=1);let b=Math.floor(((g+w)*12+373)/367),y=n-_f(h,p,b,1)+1;return new Vu(h,p,b,y)}toJulianDay(t){return _f(t.era,t.year,t.month,t.day)}getDaysInMonth(t){return rF[ad(t.year)?"leapyear":"standard"][t.month-1]}getMonthsInYear(t){return 12}getDaysInYear(t){return ad(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 sF={"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 iF(e,t){return t=Ln(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function wZ(e,t){return t=Ln(t,e.calendar),e=th(e),t=th(t),e.era===t.era&&e.year===t.year&&e.month===t.month}function _Z(e,t){return iF(e,aF(t))}function xk(e,t){let n=e.calendar.toJulianDay(e),r=Math.ceil(n+1-dF(t))%7;return r<0&&(r+=7),r}function oF(e){return Jr(Date.now(),e)}function aF(e){return mF(oF(e))}function bk(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function lF(e,t){return l_(e)-l_(t)}function l_(e){return e.hour*36e5+e.minute*6e4+e.second*1e3+e.millisecond}let Mm=null;function Oc(){return Mm==null&&(Mm=new Intl.DateTimeFormat().resolvedOptions().timeZone),Mm}function th(e){return e.subtract({days:e.day-1})}function uF(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function SZ(e){return th(e.subtract({months:e.month-1}))}function EZ(e){return uF(e.add({months:e.calendar.getMonthsInYear(e)-e.month}))}function CZ(e){return e.calendar.getMinimumMonthInYear?e.calendar.getMinimumMonthInYear(e):1}function TZ(e){return e.calendar.getMinimumDayInMonth?e.calendar.getMinimumDayInMonth(e):1}function cF(e,t){let n=xk(e,t);return e.subtract({days:n})}function jZ(e,t){return cF(e,t).add({days:6})}const u_=new Map;function fF(e){if(Intl.Locale){let n=u_.get(e);return n||(n=new Intl.Locale(e).maximize().region,n&&u_.set(e,n)),n}let t=e.split("-")[1];return t==="u"?void 0:t}function dF(e){let t=fF(e);return t&&sF[t]||0}function kZ(e,t){let n=e.calendar.getDaysInMonth(e);return Math.ceil((xk(th(e),t)+n)/7)}function PZ(e,t){return e&&t?e.compare(t)<=0?e:t:e||t}function RZ(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function Ma(e){e=Ln(e,new La);let t=R1(e.era,e.year);return wk(t,e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function wk(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 Hy(e,t){if(t==="UTC")return 0;if(e>0&&t===Oc())return new Date(e).getTimezoneOffset()*-6e4;let{year:n,month:r,day:s,hour:i,minute:o,second:a}=_k(e,t);return wk(n,r,s,i,o,a,0)-Math.floor(e/1e3)*1e3}const c_=new Map;function _k(e,t){let n=c_.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"}),c_.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 f_=864e5;function hF(e,t,n,r){return(n===r?[n]:[n,r]).filter(i=>pF(e,t,i))}function pF(e,t,n){let r=_k(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 Qr(e,t,n="compatible"){let r=Fa(e);if(t==="UTC")return Ma(r);if(t===Oc()&&n==="compatible"){r=Ln(r,new La);let l=new Date,c=R1(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=Ma(r),i=Hy(s-f_,t),o=Hy(s+f_,t),a=hF(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 Sk(e,t,n="compatible"){return new Date(Qr(e,t,n))}function Jr(e,t){let n=Hy(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(),f=r.getUTCMilliseconds();return new Ua(s,i,o,t,n,a,l,c,f)}function mF(e){return new Vu(e.calendar,e.era,e.year,e.month,e.day)}function Fa(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 rh(e.calendar,e.era,e.year,e.month,e.day,n,r,s,i)}function Ln(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,Wi(r),r}function gF(e,t,n){if(e instanceof Ua)return e.timeZone===t?e:Ek(e,t);let r=Qr(e,t,n);return Jr(r,t)}function yF(e){let t=Ma(e)-e.offset;return new Date(t)}function Ek(e,t){let n=Ma(e)-e.offset;return Ln(Jr(n,t),e.calendar)}const Bl=36e5;function cp(e,t){let n=e.copy(),r="hour"in n?wF(n,t):0;qy(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,Wy(n),Ck(n),n.day+=(t.weeks||0)*7,n.day+=t.days||0,n.day+=r,vF(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=(i=(o=n.calendar).isInverseEra)===null||i===void 0?void 0:i.call(o,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 qy(e,t){var n,r;!((n=(r=e.calendar).isInverseEra)===null||n===void 0)&&n.call(r,e)&&(t=-t),e.year+=t}function Wy(e){for(;e.month<1;)qy(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,qy(e,1)}function vF(e){for(;e.day<1;)e.month--,Wy(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,Wy(e)}function Ck(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 Wi(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),Ck(e)}function Tk(e){let t={};for(let n in e)typeof e[n]=="number"&&(t[n]=-e[n]);return t}function jk(e,t){return cp(e,Tk(t))}function N1(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),Wi(n),n}function nh(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),bF(n),n}function xF(e){e.second+=Math.floor(e.millisecond/1e3),e.millisecond=Sf(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=Sf(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=Sf(e.minute,60);let t=Math.floor(e.hour/24);return e.hour=Sf(e.hour,24),t}function bF(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 Sf(e,t){let n=e%t;return n<0&&(n+=t),n}function wF(e,t){return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,xF(e)}function O1(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=Zr(l,n,0,a.length-1,r==null?void 0:r.round),s.era=a[l],Wi(s);break}case"year":var i,o;!((i=(o=s.calendar).isInverseEra)===null||i===void 0)&&i.call(o,s)&&(n=-n),s.year=Zr(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=Zr(e.month,n,1,e.calendar.getMonthsInYear(e),r==null?void 0:r.round);break;case"day":s.day=Zr(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),Wi(s),s}function kk(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=Zr(i,n,o,a,r==null?void 0:r.round);break}case"minute":s.minute=Zr(e.minute,n,0,59,r==null?void 0:r.round);break;case"second":s.second=Zr(e.second,n,0,59,r==null?void 0:r.round);break;case"millisecond":s.millisecond=Zr(e.millisecond,n,0,999,r==null?void 0:r.round);break;default:throw new Error("Unsupported field "+t)}return s}function Zr(e,t,n,r,s=!1){if(s){e+=Math.sign(t),e0?e=Math.ceil(e/i)*i:e=Math.floor(e/i)*i,e>r&&(e=n)}else e+=t,er&&(e=n+(e-r-1));return e}function Pk(e,t){let n;if(t.years!=null&&t.years!==0||t.months!=null&&t.months!==0||t.weeks!=null&&t.weeks!==0||t.days!=null&&t.days!==0){let s=cp(Fa(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days});n=Qr(s,e.timeZone)}else n=Ma(e)-e.offset;n+=t.milliseconds||0,n+=(t.seconds||0)*1e3,n+=(t.minutes||0)*6e4,n+=(t.hours||0)*36e5;let r=Jr(n,e.timeZone);return Ln(r,e.calendar)}function _F(e,t){return Pk(e,Tk(t))}function SF(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=Fa(e),a=Ln(nh(o,{hour:s}),new La),l=[Qr(a,e.timeZone,"earlier"),Qr(a,e.timeZone,"later")].filter(g=>Jr(g,e.timeZone).day===a.day)[0],c=Ln(nh(o,{hour:i}),new La),f=[Qr(c,e.timeZone,"earlier"),Qr(c,e.timeZone,"later")].filter(g=>Jr(g,e.timeZone).day===c.day).pop(),d=Ma(e)-e.offset,h=Math.floor(d/Bl),p=d%Bl;return d=Zr(h,n,Math.floor(l/Bl),Math.floor(f/Bl),r==null?void 0:r.round)*Bl+p,Ln(Jr(d,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return kk(e,t,n,r);case"era":case"year":case"month":case"day":{let s=O1(Fa(e),t,n,r),i=Qr(s,e.timeZone);return Ln(Jr(i,e.timeZone),e.calendar)}default:throw new Error("Unsupported field "+t)}}function EF(e,t,n){let r=Fa(e),s=nh(N1(r,t),t);if(s.compare(r)===0)return e;let i=Qr(s,e.timeZone,n);return Ln(Jr(i,e.timeZone),e.calendar)}const CF=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}))?(?::(\d{2}))?(?::(\d{2}))?(\.\d+)?(?:(?:([+-]\d{2})(?::?(\d{2}))?)|Z)$/;function TF(e,t){let n=e.match(CF);if(!n)throw new Error("Invalid ISO 8601 date time string: "+e);let r=new Ua($r(n[1],1,9999),$r(n[2],1,12),1,t,0,n[4]?$r(n[4],0,23):0,n[5]?$r(n[5],0,59):0,n[6]?$r(n[6],0,59):0,n[7]?$r(n[7],0,1/0)*1e3:0);r.day=$r(n[3],0,r.calendar.getDaysInMonth(r));var s;return n[8]&&(r.offset=$r(n[8],-23,23)*36e5+$r((s=n[9])!==null&&s!==void 0?s:"0",0,59)*6e4),Ek(r,t)}function Rk(e){return TF(e,Oc())}function $r(e,t,n){let r=Number(e);if(rn)throw new RangeError(`Value out of range: ${t} <= ${r} <= ${n}`);return r}function jF(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 Nk(e){let t=Ln(e,new La);return`${String(t.year).padStart(4,"0")}-${String(t.month).padStart(2,"0")}-${String(t.day).padStart(2,"0")}`}function Ok(e){return`${Nk(e)}T${jF(e)}`}function kF(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 PF(e){return`${Ok(e)}${kF(e.offset)}[${e.timeZone}]`}function A1(e){let t=typeof e[0]=="object"?e.shift():new La,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 RF=new WeakMap;class Vu{copy(){return this.era?new Vu(this.calendar,this.era,this.year,this.month,this.day):new Vu(this.calendar,this.year,this.month,this.day)}add(t){return cp(this,t)}subtract(t){return jk(this,t)}set(t){return N1(this,t)}cycle(t,n,r){return O1(this,t,n,r)}toDate(t){return Sk(this,t)}toString(){return Nk(this)}compare(t){return bk(this,t)}constructor(...t){P1(this,RF,{writable:!0,value:void 0});let[n,r,s,i,o]=A1(t);this.calendar=n,this.era=r,this.year=s,this.month=i,this.day=o,Wi(this)}}var NF=new WeakMap;class rh{copy(){return this.era?new rh(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new rh(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return cp(this,t)}subtract(t){return jk(this,t)}set(t){return N1(nh(this,t),t)}cycle(t,n,r){switch(t){case"era":case"year":case"month":case"day":return O1(this,t,n,r);default:return kk(this,t,n,r)}}toDate(t,n){return Sk(this,t,n)}toString(){return Ok(this)}compare(t){let n=bk(this,t);return n===0?lF(this,Fa(t)):n}constructor(...t){P1(this,NF,{writable:!0,value:void 0});let[n,r,s,i,o]=A1(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,Wi(this)}}var OF=new WeakMap;class Ua{copy(){return this.era?new Ua(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new Ua(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(t){return Pk(this,t)}subtract(t){return _F(this,t)}set(t,n){return EF(this,t,n)}cycle(t,n,r){return SF(this,t,n,r)}toDate(){return yF(this)}toString(){return PF(this)}toAbsoluteString(){return this.toDate().toISOString()}compare(t){return this.toDate().getTime()-gF(t,this.timeZone).toDate().getTime()}constructor(...t){P1(this,OF,{writable:!0,value:void 0});let[n,r,s,i,o]=A1(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,Wi(this)}}let Fm=new Map;class AF{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= 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= 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 $F()&&(this.resolvedHourCycle||(this.resolvedHourCycle=LF(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=Ak(t,n),this.options=n}}const IF={true:{ja:"h11"},false:{}};function Ak(e,t={}){if(typeof t.hour12=="boolean"&&DF()){t={...t};let s=IF[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.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 Ki(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!r||r==="auto"?Oc():r,[r])}var Dk={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=0&&(o=0)}function r(s,i){i||(i={});var o=i.vargs||n(s),a=Object.create(null),l=[],c=[],f,d=new WeakMap,h=function(v,_,S){return setTimeout(function(){if(S){_.splice(v,1),S.splice(v,1);return}_ instanceof WeakMap?_.delete(v):delete _[v]},i.maxAge)},p=i.maxAge>0&&i.maxAge<1/0?h:0,g=i.equals?i.equals:function(v,_){return v===_},w=i.maxArgs,b=i.serializer,y,m;return s.length===1&&!i.equals&&!o?(y=(function(v){var _=typeof v;if(!b&&(_==="object"&&v||_==="function")){var S;return d.get(v)||(!p||p(v,d),d.set(v,S=s.call(this,v)),S)}var E=_==="number"||_==="boolean"||v==null?v:_==="string"?JSON.stringify(v):b(v);return a[E]||(!p||p(E,a),a[E]=s.call(this,v))}).bind(this),m=1):y=(function(){var v=arguments.length;if(!v&&f!=null)return c[f];var _=w||v,S;for(S=l.length-1;S>=0;S--)if(!(!w&&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),!v&&f==null&&(f=S),!p||p(S,c,l),c[S]=s.apply(this,l[S]=arguments)}).bind(this),y.clear=function(){d=new WeakMap,a=Object.create(null),l=[],c=[],f=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:d}:null},y}e.exports=r,typeof window<"u"&&(window.nanomemoize=r)}).call(Sg)})(Dk);var MF=Dk.exports;const Ac=Nr(MF);function $k(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=FF(e).select(s);let f=a.find(h=>h.startsWith(c));f||(f=a[0]);const d=f.substring(f.indexOf(" ")+1);return t.replace(i,d)}return t}const FF=Ac(e=>new Intl.PluralRules(e));function d_(e,t){return e==null?!1:Object.hasOwn!==void 0?Object.hasOwn(e,t):Object.hasOwnProperty(t)}const k=x.memo(e=>{const{message:t,values:n}=e,{lines:r,localeCode:s}=lo();let i;if(d_(r,t)?i=r==null?void 0:r[t]:d_(r,t==null?void 0:t.toLowerCase())?i=r==null?void 0:r[t.toLowerCase()]:i=t,!n||!i)return u.jsx(x.Fragment,{children:i});i=$k(s,{message:i,values:n});const o=[],a=[];if(Object.entries(n).forEach(([l,c])=>{typeof c=="function"?a.push(l):x.isValidElement(c)?o.push(l):c!=null&&(i=i==null?void 0: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"),d=i.split(c).filter(Boolean).map((h,p)=>{if(h.startsWith("<")&&h.endsWith(">")){const g=h.match(/<([a-z]+)>(.+?)<\/([a-z]+)>/);if(g){const[,w,b]=g,y=n==null?void 0:n[w];if(typeof y=="function"){const m=y(b);return x.cloneElement(m,{key:p})}}}if(h.startsWith(":")){const g=h.replace(":",""),w=n==null?void 0:n[g];if(x.isValidElement(w))return x.cloneElement(w,{key:p})}return h});return u.jsx(x.Fragment,{children:d})}return u.jsx(x.Fragment,{children:i})},UF);function UF(e,t){const{values:n,...r}=e,{values:s,...i}=t;return Ki(s,n)&&Ki(r,i)}const h_=[{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"}],Lk=x.memo(({date:e,style:t})=>{const{localeCode:n}=lo(),r=Ik(),s=x.useMemo(()=>new Intl.RelativeTimeFormat(n,{numeric:"auto",style:t}),[n,t]);if(!e)return null;try{typeof e=="string"?e=Rk(e).toDate():"toDate"in e&&(e=e.toDate(r))}catch{return null}let i=(e.getTime()-Date.now())/1e3;for(let o=0;o<=h_.length;o++){const a=h_[o];if(Math.abs(i)BF(e)})}function BF(e){return ae.get(Mk,{params:e}).then(t=>t.data)}sr.key=[Mk];const p_=e=>{let t;const n=new Set,r=(l,c)=>{const f=typeof l=="function"?l(t):l;if(!Object.is(f,t)){const d=t;t=c??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(h=>h(t,d))}},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},HF=e=>e?p_(e):p_;var Fk={exports:{}},Uk={},zk={exports:{}},Vk={};/** * @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 za=x;function qF(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var WF=typeof Object.is=="function"?Object.is:qF,KF=za.useState,GF=za.useEffect,QF=za.useLayoutEffect,YF=za.useDebugValue;function XF(e,t){var n=t(),r=KF({inst:{value:n,getSnapshot:t}}),s=r[0].inst,i=r[1];return QF(function(){s.value=n,s.getSnapshot=t,Vm(s)&&i({inst:s})},[e,n,t]),GF(function(){return Vm(s)&&i({inst:s}),e(function(){Vm(s)&&i({inst:s})})},[e]),YF(n),n}function Vm(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!WF(e,n)}catch{return!0}}function JF(e,t){return t()}var ZF=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?JF:XF;Vk.useSyncExternalStore=za.useSyncExternalStore!==void 0?za.useSyncExternalStore:ZF;zk.exports=Vk;var e6=zk.exports;/** * @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 fp=x,t6=e6;function n6(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var r6=typeof Object.is=="function"?Object.is:n6,s6=t6.useSyncExternalStore,i6=fp.useRef,o6=fp.useEffect,a6=fp.useMemo,l6=fp.useDebugValue;Uk.useSyncExternalStoreWithSelector=function(e,t,n,r,s){var i=i6(null);if(i.current===null){var o={hasValue:!1,value:null};i.current=o}else o=i.current;i=a6(function(){function l(p){if(!c){if(c=!0,f=p,p=r(p),s!==void 0&&o.hasValue){var g=o.value;if(s(g,p))return d=g}return d=p}if(g=d,r6(f,p))return g;var w=r(p);return s!==void 0&&s(g,w)?g:(f=p,d=w)}var c=!1,f,d,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=s6(e,i[0],i[1]);return o6(function(){o.hasValue=!0,o.value=a},[a]),l6(a),a};Fk.exports=Uk;var u6=Fk.exports;const c6=Nr(u6),{useDebugValue:f6}=G,{useSyncExternalStoreWithSelector:d6}=c6;function Bk(e,t=e.getState,n){const r=d6(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return f6(r),r}const m_=e=>{const t=typeof e=="function"?HF(e):e,n=(r,s)=>Bk(t,r,s);return Object.assign(n,t),n},D1=e=>e?m_(e):m_;var Hk=Symbol.for("immer-nothing"),g_=Symbol.for("immer-draftable"),Te=Symbol.for("immer-state");function In(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Va=Object.getPrototypeOf;function Ba(e){return!!e&&!!e[Te]}function os(e){var t;return e?qk(e)||Array.isArray(e)||!!e[g_]||!!((t=e.constructor)!=null&&t[g_])||hp(e)||pp(e):!1}var h6=Object.prototype.constructor.toString();function qk(e){if(!e||typeof e!="object")return!1;const t=Va(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)===h6}function Ha(e,t){dp(e)===0?Object.entries(e).forEach(([n,r])=>{t(n,r,e)}):e.forEach((n,r)=>t(r,n,e))}function dp(e){const t=e[Te];return t?t.type_:Array.isArray(e)?1:hp(e)?2:pp(e)?3:0}function Ky(e,t){return dp(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Wk(e,t,n){const r=dp(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function p6(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function hp(e){return e instanceof Map}function pp(e){return e instanceof Set}function gt(e){return e.copy_||e.base_}function Gy(e,t){if(hp(e))return new Map(e);if(pp(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);if(!t&&qk(e))return Va(e)?{...e}:Object.assign(Object.create(null),e);const n=Object.getOwnPropertyDescriptors(e);delete n[Te];let r=Reflect.ownKeys(n);for(let s=0;s1&&(e.set=e.add=e.clear=e.delete=m6),Object.freeze(e),t&&Ha(e,(n,r)=>$1(r,!0))),e}function m6(){In(2)}function mp(e){return Object.isFrozen(e)}var Qy={};function Gi(e){const t=Qy[e];return t||In(0,e),t}function g6(e,t){Qy[e]||(Qy[e]=t)}var Bu;function sh(){return Bu}function y6(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function y_(e,t){t&&(Gi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Yy(e){Xy(e),e.drafts_.forEach(v6),e.drafts_=null}function Xy(e){e===Bu&&(Bu=e.parent_)}function v_(e){return Bu=y6(Bu,e)}function v6(e){const t=e[Te];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function x_(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[Te].modified_&&(Yy(t),In(4)),os(e)&&(e=ih(t,e),t.parent_||oh(t,e)),t.patches_&&Gi("Patches").generateReplacementPatches_(n[Te].base_,e,t.patches_,t.inversePatches_)):e=ih(t,n,[]),Yy(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Hk?e:void 0}function ih(e,t,n){if(mp(t))return t;const r=t[Te];if(!r)return Ha(t,(s,i)=>b_(e,r,t,s,i,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return oh(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),Ha(i,(a,l)=>b_(e,r,s,a,l,n,o)),oh(e,s,!1),n&&e.patches_&&Gi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function b_(e,t,n,r,s,i,o){if(Ba(s)){const a=i&&t&&t.type_!==3&&!Ky(t.assigned_,r)?i.concat(r):void 0,l=ih(e,s,a);if(Wk(n,r,l),Ba(l))e.canAutoFreeze_=!1;else return}else o&&n.add(s);if(os(s)&&!mp(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ih(e,s),(!t||!t.scope_.parent_)&&oh(e,s)}}function oh(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&$1(t,n)}function x6(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:sh(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,i=L1;n&&(s=[r],i=Hu);const{revoke:o,proxy:a}=Proxy.revocable(s,i);return r.draft_=a,r.revoke_=o,a}var L1={get(e,t){if(t===Te)return e;const n=gt(e);if(!Ky(n,t))return b6(e,n,t);const r=n[t];return e.finalized_||!os(r)?r:r===Bm(e.base_,t)?(Hm(e),e.copy_[t]=qu(r,e)):r},has(e,t){return t in gt(e)},ownKeys(e){return Reflect.ownKeys(gt(e))},set(e,t,n){const r=Kk(gt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Bm(gt(e),t),i=s==null?void 0:s[Te];if(i&&i.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(p6(n,s)&&(n!==void 0||Ky(e.base_,t)))return!0;Hm(e),qr(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 Bm(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Hm(e),qr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=gt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){In(11)},getPrototypeOf(e){return Va(e.base_)},setPrototypeOf(){In(12)}},Hu={};Ha(L1,(e,t)=>{Hu[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}});Hu.deleteProperty=function(e,t){return Hu.set.call(this,e,t,void 0)};Hu.set=function(e,t,n){return L1.set.call(this,e[0],t,n,e[0])};function Bm(e,t){const n=e[Te];return(n?gt(n):e)[t]}function b6(e,t,n){var s;const r=Kk(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function Kk(e,t){if(!(t in e))return;let n=Va(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Va(n)}}function qr(e){e.modified_||(e.modified_=!0,e.parent_&&qr(e.parent_))}function Hm(e){e.copy_||(e.copy_=Gy(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var w6=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,f=>n.call(this,f,...c))}}typeof n!="function"&&In(6),r!==void 0&&typeof r!="function"&&In(7);let s;if(os(t)){const i=v_(this),o=qu(t,void 0);let a=!0;try{s=n(o),a=!1}finally{a?Yy(i):Xy(i)}return y_(i,r),x_(s,i)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===Hk&&(s=void 0),this.autoFreeze_&&$1(s,!0),r){const i=[],o=[];Gi("Patches").generateReplacementPatches_(t,s,i,o),r(i,o)}return s}else In(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){os(e)||In(8),Ba(e)&&(e=_6(e));const t=v_(this),n=qu(e,void 0);return n[Te].isManual_=!0,Xy(t),n}finishDraft(e,t){const n=e&&e[Te];(!n||!n.isManual_)&&In(9);const{scope_:r}=n;return y_(r,t),x_(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=Gi("Patches").applyPatches_;return Ba(e)?r(e,t):this.produce(e,s=>r(s,t))}};function qu(e,t){const n=hp(e)?Gi("MapSet").proxyMap_(e,t):pp(e)?Gi("MapSet").proxySet_(e,t):x6(e,t);return(t?t.scope_:sh()).drafts_.push(n),n}function _6(e){return Ba(e)||In(10,e),Gk(e)}function Gk(e){if(!os(e)||mp(e))return e;const t=e[Te];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Gy(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Gy(e,!0);return Ha(n,(r,s)=>{Wk(n,r,Gk(s))}),t&&(t.finalized_=!1),n}function S6(){class e extends Map{constructor(l,c){super(),this[Te]={type_:2,parent_:c,scope_:c?c.scope_:sh(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:l,draft_:this,isManual_:!1,revoked_:!1}}get size(){return gt(this[Te]).size}has(l){return gt(this[Te]).has(l)}set(l,c){const f=this[Te];return o(f),(!gt(f).has(l)||gt(f).get(l)!==c)&&(n(f),qr(f),f.assigned_.set(l,!0),f.copy_.set(l,c),f.assigned_.set(l,!0)),this}delete(l){if(!this.has(l))return!1;const c=this[Te];return o(c),n(c),qr(c),c.base_.has(l)?c.assigned_.set(l,!1):c.assigned_.delete(l),c.copy_.delete(l),!0}clear(){const l=this[Te];o(l),gt(l).size&&(n(l),qr(l),l.assigned_=new Map,Ha(l.base_,c=>{l.assigned_.set(c,!1)}),l.copy_.clear())}forEach(l,c){const f=this[Te];gt(f).forEach((d,h,p)=>{l.call(c,this.get(h),h,this)})}get(l){const c=this[Te];o(c);const f=gt(c).get(l);if(c.finalized_||!os(f)||f!==c.base_.get(l))return f;const d=qu(f,c);return n(c),c.copy_.set(l,d),d}keys(){return gt(this[Te]).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 f=this.get(c.value);return{done:!1,value:[c.value,f]}}}}[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[Te]={type_:3,parent_:c,scope_:c?c.scope_:sh(),modified_:!1,finalized_:!1,copy_:void 0,base_:l,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return gt(this[Te]).size}has(l){const c=this[Te];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[Te];return o(c),this.has(l)||(i(c),qr(c),c.copy_.add(l)),this}delete(l){if(!this.has(l))return!1;const c=this[Te];return o(c),i(c),qr(c),c.copy_.delete(l)||(c.drafts_.has(l)?c.copy_.delete(c.drafts_.get(l)):!1)}clear(){const l=this[Te];o(l),gt(l).size&&(i(l),qr(l),l.copy_.clear())}values(){const l=this[Te];return o(l),i(l),l.copy_.values()}entries(){const l=this[Te];return o(l),i(l),l.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(l,c){const f=this.values();let d=f.next();for(;!d.done;)l.call(c,d.value,d.value,this),d=f.next()}}function s(a,l){return new r(a,l)}function i(a){a.copy_||(a.copy_=new Set,a.base_.forEach(l=>{if(os(l)){const c=qu(l,a);a.drafts_.set(l,c),a.copy_.add(c)}else a.copy_.add(l)}))}function o(a){a.revoked_&&In(3,JSON.stringify(gt(a)))}g6("MapSet",{proxyMap_:t,proxySet_:s})}var wn=new w6,M1=wn.produce;wn.produceWithPatches.bind(wn);wn.setAutoFreeze.bind(wn);wn.setUseStrictShallowCopy.bind(wn);wn.applyPatches.bind(wn);wn.createDraft.bind(wn);wn.finishDraft.bind(wn);const E6=e=>(t,n,r)=>(r.setState=(s,i,...o)=>{const a=typeof s=="function"?M1(s):s;return t(a,i,...o)},e(r.setState,n,r)),F1=E6;let C6="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict",Qk=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e|=0));for(;e--;)t+=C6[n[e]&63];return t};class T6{constructor(t,n){Ne(this,"timerId");Ne(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 j6=1;function k6(e){switch(e){case"danger":return 8e3;case"loading":return 0;default:return 3e3}}const Yk=D1()(F1((e,t)=>({toasts:[],add:(n,r)=>{const s=t().toasts.length+1-j6;s>0&&e(f=>{f.toasts.splice(0,s)});const i=(r==null?void 0:r.id)||Qk(6),o=(r==null?void 0:r.type)||"positive",a=(r==null?void 0:r.duration)??k6(o),l={timer:a>0?new T6(()=>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(f=>f.id===l.id);c>-1?e(f=>{f.toasts[c]=l}):e(f=>{f.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 qa(){return Yk.getState()}function ke(e,t){qa().add(e,t)}ke.danger=(e,t)=>{qa().add(e,{...t,type:"danger"})};ke.positive=(e,t)=>{qa().add(e,{...t,type:"positive"})};ke.loading=(e,t)=>{qa().add(e,{...t,type:"loading"})};function Gs(e,t){var n;if(Or.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 U1=D1()(F1((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})}}))),Xk=U1.getState().openDialog,P6=e=>{U1.getState().closeActiveDialog(e)};function Wa(e,t,n){let[r,s]=x.useState(e||t),i=x.useRef(e!==void 0),o=e!==void 0;x.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=x.useCallback((c,...f)=>{let d=(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 w=c(o?a:p,...g);return d(w,...f),o?p:w})):(o||s(c),d(c,...f))},[o,a,n]);return[a,l]}function NZ(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function OZ(e,t,n,r){t=Number(t),n=Number(n);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):in&&(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 AZ(e,t,n=10){const r=Math.pow(n,t);return Math.round(e*r)/r}const ah={prefix:String(Math.round(Math.random()*1e10)),current:0},Jk=G.createContext(ah),R6=G.createContext(!1);let N6=!!(typeof window<"u"&&window.document&&window.document.createElement),qm=new WeakMap;function O6(e=!1){let t=x.useContext(Jk),n=x.useRef(null);if(n.current===null&&!e){var r,s;let i=(s=G.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||s===void 0||(r=s.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(i){let o=qm.get(i);o==null?qm.set(i,{id:t.current,state:i.memoizedState}):i.memoizedState!==o.state&&(t.current=o.id,qm.delete(i))}n.current=++t.current}return n.current}function A6(e){let t=x.useContext(Jk);t===ah&&!N6&&console.warn("When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.");let n=O6(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`}function I6(e){let t=G.useId(),[n]=x.useState(z1()),r=n?"react-aria":`react-aria${ah.prefix}`;return e||`${r}-${t}`}G.useId;function D6(){return!1}function $6(){return!0}function L6(e){return()=>{}}function z1(){return typeof G.useSyncExternalStore=="function"?G.useSyncExternalStore(L6,D6,$6):x.useContext(R6)}const hn=typeof document<"u"?G.useLayoutEffect:()=>{};function lh(e){const t=x.useRef(null);return hn(()=>{t.current=e},[e]),x.useCallback((...n)=>{const r=t.current;return r(...n)},[])}function IZ(e){let[t,n]=x.useState(e),r=x.useRef(null),s=lh(()=>{let o=r.current.next();if(o.done){r.current=null;return}t===o.value?s():n(o.value)});hn(()=>{r.current&&s()});let i=lh(o=>{r.current=o(t),s()});return[t,i]}let w_=new Map;function M6(e,t){if(e===t)return e;let n=w_.get(e);if(n)return n(t),t;let r=w_.get(t);return r?(r(e),e):t}function F6(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Mt=e=>{var t;return(t=e==null?void 0:e.ownerDocument)!==null&&t!==void 0?t:document},U6=e=>e&&"window"in e&&e.window===e?e:Mt(e).defaultView||window;function ds(...e){let t={...e[0]};for(let n=1;n=65&&s.charCodeAt(2)<=90?t[s]=F6(i,o):(s==="className"||s==="UNSAFE_className")&&typeof i=="string"&&typeof o=="string"?t[s]=B(i,o):s==="id"&&i&&o?t.id=M6(i,o):t[s]=o!==void 0?o:i}}return t}function __(e){if(z6())e.focus({preventScroll:!0});else{let t=V6(e);e.focus(),B6(t)}}let Ef=null;function z6(){if(Ef==null){Ef=!1;try{var e=document.createElement("div");e.focus({get preventScroll(){return Ef=!0,!0}})}catch{}}return Ef}function V6(e){for(var t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;t instanceof HTMLElement&&t!==r;)(t.offsetHeight"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 q6(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 W6(){return q6(/^Mac/i)}function K6(){return H6(/Android/i)}let To=new Map,Jy=new Set;function S_(){if(typeof window>"u")return;let e=n=>{let r=To.get(n.target);r||(r=new Set,To.set(n.target,r),n.target.addEventListener("transitioncancel",t)),r.add(n.propertyName)},t=n=>{let r=To.get(n.target);if(r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",t),To.delete(n.target)),To.size===0)){for(let s of Jy)s();Jy.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",t)}typeof document<"u"&&(document.readyState!=="loading"?S_():document.addEventListener("DOMContentLoaded",S_));function G6(e){requestAnimationFrame(()=>{To.size===0?e():Jy.add(e)})}function DZ(){let e=x.useRef(new Map),t=x.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=x.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=x.useCallback(()=>{e.current.forEach((s,i)=>{n(s.eventTarget,s.type,i,s.options)})},[n]);return x.useEffect(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}function gl(e){const t=x.useRef();return x.useMemo(()=>({get current(){return t.current},set current(n){t.current=n,typeof e=="function"?e(n):e&&(e.current=n)}}),[e])}function Q6(){return typeof window.ResizeObserver<"u"}function $Z(e){const{ref:t,onResize:n}=e;x.useEffect(()=>{let r=t==null?void 0:t.current;if(r)if(Q6()){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 LZ(e,t){for(E_(e,t)&&(e=e.parentElement);e&&!E_(e,t);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}function E_(e,t){let n=window.getComputedStyle(e),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&t&&(r=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),r}let br=typeof document<"u"&&window.visualViewport;function Y6(){let e=z1(),[t,n]=x.useState(()=>e?{width:0,height:0}:C_());return x.useEffect(()=>{let r=()=>{n(s=>{let i=C_();return i.width===s.width&&i.height===s.height?s:i})};return br?br.addEventListener("resize",r):window.addEventListener("resize",r),()=>{br?br.removeEventListener("resize",r):window.removeEventListener("resize",r)}},[]),t}function C_(){return{width:(br==null?void 0:br.width)||window.innerWidth,height:(br==null?void 0:br.height)||window.innerHeight}}function X6(e){return e.mozInputSource===0&&e.isTrusted?!0:K6()&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}const gp=G.createContext(null);function Ic(){return x.useContext(gp)}function lr(){const{lines:e,localeCode:t}=lo();return{trans:x.useCallback(r=>J6({...r,lines:e,localeCode:t}),[e,t])}}const J6=Ac(e=>{let{lines:t,message:n,values:r,localeCode:s}=e;return n==null?"":(n=(t==null?void 0:t[n])||(t==null?void 0:t[n.toLowerCase()])||n,r&&(n=$k(s,e),Object.entries(r).forEach(([i,o])=>{n=n.replace(`:${i}`,`${o}`)})),n)},{equals:Ki,callTimeout:0});function Z6({onDismiss:e}){const{trans:t}=lr(),n=()=>{e&&e()};return u.jsx("button",{className:"sr-only","aria-label":t(ye("Dismiss")),tabIndex:-1,onClick:n})}function yl(e){const{type:t="modal",dialogProps:n,...r}=x.useContext(gp),{children:s,className:i,size:o="md",background:a,radius:l="rounded",maxWidth:c="max-w-dialog",...f}=e;let d=null;(t==="popover"||t==="tray")&&(d=u.jsx(Z6,{onDismiss:r.close}));const h=o==="fullscreenTakeover"||t==="tray",p=B("mx-auto pointer-events-auto outline-none flex flex-col overflow-hidden",a||"bg",t!=="tray"&&e8(o),t==="tray"&&"rounded-t border-b-bg",o!=="fullscreenTakeover"&&"shadow-2xl border max-h-dialog",!h&&`${l} ${c}`,i);return u.jsxs("div",{...ds({role:"dialog",tabIndex:-1},n,f),style:{...e.style,"--be-dialog-padding":"24px"},"aria-modal":!0,className:p,children:[x.Children.toArray(s).map(g=>x.isValidElement(g)?x.cloneElement(g,{size:g.props.size??o}):g),d]})}function e8(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}}const ir=x.forwardRef(({children:e,size:t="md",iconSize:n=t&&t.length<=3?t:"md",variant:r="text",radius:s="rounded-button",className:i,padding:o,equalWidth:a=!0,badge:l,...c},f)=>{const d=B(k1(t,{padding:o,equalWidth:a,variant:r}),i,l&&"relative");return u.jsxs(up,{...c,ref:f,radius:s,variant:r,className:d,children:[x.cloneElement(e,{size:n}),l]})}),Zk=fe(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 vl(e){const{children:t,className:n,color:r,onDismiss:s,leftAdornment:i,rightAdornment:o,hideDismissButton:a=!1,size:l,showDivider:c,justify:f="justify-between",titleFontWeight:d="font-semibold",titleTextSize:h=l==="xs"?"text-xs":"text-sm",closeButtonSize:p=l==="xs"?"xs":"sm",actions:g}=e,{labelId:w,isDismissable:b,close:y}=x.useContext(gp);return u.jsxs("div",{className:B(n,"flex flex-shrink-0 items-center gap-10",d,c&&"border-b",t8(e),r||"text-main",f),children:[i,u.jsx("h3",{id:w,className:B(h,"mr-auto leading-5 opacity-90"),children:t}),o,g,b&&!a&&u.jsx(ir,{"aria-label":"Dismiss",onClick:()=>{s?s():y()},size:p,className:B("-mr-8 text-muted",o&&"sr-only"),children:u.jsx(Zk,{})})]})}function t8({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 xl=x.forwardRef((e,t)=>{const{children:n,className:r,padding:s,size:i,...o}=e;return u.jsx("div",{...o,ref:t,className:B(r,n8(e),"overflow-y-auto overflow-x-hidden overscroll-contain text-sm flex-auto"),children:n})});function n8({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"}}const r8=G.createContext({register:()=>{}});r8.displayName="PressResponderContext";let Dc=null,s8=new Set,T_=!1,Qi=!1,Zy=!1;function V1(e,t){for(let n of s8)n(e,t)}function i8(e){return!(e.metaKey||!W6()&&e.altKey||e.ctrlKey||e.key==="Control"||e.key==="Shift"||e.key==="Meta")}function j_(e){Qi=!0,i8(e)&&(Dc="keyboard",V1("keyboard",e))}function _o(e){Dc="pointer",(e.type==="mousedown"||e.type==="pointerdown")&&(Qi=!0,V1("pointer",e))}function o8(e){X6(e)&&(Qi=!0,Dc="virtual")}function a8(e){e.target===window||e.target===document||(!Qi&&!Zy&&(Dc="virtual",V1("virtual",e)),Qi=!1,Zy=!1)}function l8(){Qi=!1,Zy=!0}function k_(){if(typeof window>"u"||T_)return;let e=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){Qi=!0,e.apply(this,arguments)},document.addEventListener("keydown",j_,!0),document.addEventListener("keyup",j_,!0),document.addEventListener("click",o8,!0),window.addEventListener("focus",a8,!0),window.addEventListener("blur",l8,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",_o,!0),document.addEventListener("pointermove",_o,!0),document.addEventListener("pointerup",_o,!0)):(document.addEventListener("mousedown",_o,!0),document.addEventListener("mousemove",_o,!0),document.addEventListener("mouseup",_o,!0)),T_=!0}typeof document<"u"&&(document.readyState!=="loading"?k_():document.addEventListener("DOMContentLoaded",k_));function u8(){return Dc}function MZ(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:s}=e,i=x.useRef({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),o=lh(l=>{n&&Cf(l,t)&&(s&&s(l),i.current.isPointerDown=!0)}),a=lh(l=>{n&&n(l)});x.useEffect(()=>{let l=i.current;if(r)return;const c=t.current,f=Mt(c);if(typeof PointerEvent<"u"){let d=h=>{l.isPointerDown&&Cf(h,t)&&a(h),l.isPointerDown=!1};return f.addEventListener("pointerdown",o,!0),f.addEventListener("pointerup",d,!0),()=>{f.removeEventListener("pointerdown",o,!0),f.removeEventListener("pointerup",d,!0)}}else{let d=p=>{l.ignoreEmulatedMouseEvents?l.ignoreEmulatedMouseEvents=!1:l.isPointerDown&&Cf(p,t)&&a(p),l.isPointerDown=!1},h=p=>{l.ignoreEmulatedMouseEvents=!0,l.isPointerDown&&Cf(p,t)&&a(p),l.isPointerDown=!1};return f.addEventListener("mousedown",o,!0),f.addEventListener("mouseup",d,!0),f.addEventListener("touchstart",o,!0),f.addEventListener("touchend",h,!0),()=>{f.removeEventListener("mousedown",o,!0),f.removeEventListener("mouseup",d,!0),f.removeEventListener("touchstart",o,!0),f.removeEventListener("touchend",h,!0)}}},[t,r,o,a])}function Cf(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 c8(e){const t=Mt(e);if(u8()==="virtual"){let n=t.activeElement;G6(()=>{t.activeElement===n&&e.isConnected&&__(e)})}else __(e)}function f8(e){const t=U6(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,s=n!=="none"&&r!=="hidden"&&r!=="collapse";if(s){const{getComputedStyle:i}=e.ownerDocument.defaultView;let{display:o,visibility:a}=i(e);s=o!=="none"&&a!=="hidden"&&a!=="collapse"}return s}function d8(e,t){return!e.hasAttribute("hidden")&&(e.nodeName==="DETAILS"&&t&&t.nodeName!=="SUMMARY"?e.hasAttribute("open"):!0)}function eP(e,t){return e.nodeName!=="#comment"&&f8(e)&&d8(e,t)&&(!e.parentElement||eP(e.parentElement,e))}const ev=G.createContext(null);let Ue=null;function yp(e){let{children:t,contain:n,restoreFocus:r,autoFocus:s}=e,i=x.useRef(null),o=x.useRef(null),a=x.useRef([]),{parentNode:l}=x.useContext(ev)||{},c=x.useMemo(()=>new nv({scopeRef:a}),[a]);hn(()=>{let h=l||nt.root;if(nt.getTreeNode(h.scopeRef)&&Ue&&!uh(Ue,h.scopeRef)){let p=nt.getTreeNode(Ue);p&&(h=p)}h.addChild(c),nt.addNode(c)},[c,l]),hn(()=>{let h=nt.getTreeNode(a);h&&(h.contain=!!n)},[n]),hn(()=>{var h;let p=(h=i.current)===null||h===void 0?void 0:h.nextSibling,g=[];for(;p&&p!==o.current;)g.push(p),p=p.nextSibling;a.current=g},[t]),v8(a,r,n),g8(a,n),b8(a,r,n),y8(a,s),x.useEffect(()=>{const h=Mt(a.current?a.current[0]:void 0).activeElement;let p=null;if($t(h,a.current)){for(let g of nt.traverse())g.scopeRef&&$t(h,g.scopeRef.current)&&(p=g);p===nt.getTreeNode(a)&&(Ue=p.scopeRef)}},[a]),hn(()=>()=>{var h,p,g;let w=(g=(p=nt.getTreeNode(a))===null||p===void 0||(h=p.parent)===null||h===void 0?void 0:h.scopeRef)!==null&&g!==void 0?g:null;(a===Ue||uh(a,Ue))&&(!w||nt.getTreeNode(w))&&(Ue=w),nt.removeTreeNode(a)},[a]);let f=x.useMemo(()=>h8(a),[]),d=x.useMemo(()=>({focusManager:f,parentNode:c}),[c,f]);return G.createElement(ev.Provider,{value:d},G.createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:i}),t,G.createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:o}))}function tP(){var e;return(e=x.useContext(ev))===null||e===void 0?void 0:e.focusManager}function h8(e){return{focusNext(t={}){let n=e.current,{from:r,tabbable:s,wrap:i,accept:o}=t,a=r||Mt(n[0]).activeElement,l=n[0].previousElementSibling,c=wi(n),f=Mn(c,{tabbable:s,accept:o},n);f.currentNode=$t(a,n)?a:l;let d=f.nextNode();return!d&&i&&(f.currentNode=l,d=f.nextNode()),d&&Xt(d,!0),d},focusPrevious(t={}){let n=e.current,{from:r,tabbable:s,wrap:i,accept:o}=t,a=r||Mt(n[0]).activeElement,l=n[n.length-1].nextElementSibling,c=wi(n),f=Mn(c,{tabbable:s,accept:o},n);f.currentNode=$t(a,n)?a:l;let d=f.previousNode();return!d&&i&&(f.currentNode=l,d=f.previousNode()),d&&Xt(d,!0),d},focusFirst(t={}){let n=e.current,{tabbable:r,accept:s}=t,i=wi(n),o=Mn(i,{tabbable:r,accept:s},n);o.currentNode=n[0].previousElementSibling;let a=o.nextNode();return a&&Xt(a,!0),a},focusLast(t={}){let n=e.current,{tabbable:r,accept:s}=t,i=wi(n),o=Mn(i,{tabbable:r,accept:s},n);o.currentNode=n[n.length-1].nextElementSibling;let a=o.previousNode();return a&&Xt(a,!0),a}}}const B1=["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]"],p8=B1.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";B1.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const m8=B1.join(':not([hidden]):not([tabindex="-1"]),');function wi(e){return e[0].parentElement}function tu(e){let t=nt.getTreeNode(Ue);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function g8(e,t){let n=x.useRef(),r=x.useRef();hn(()=>{let s=e.current;if(!t){r.current&&(cancelAnimationFrame(r.current),r.current=void 0);return}const i=Mt(s?s[0]:void 0);let o=c=>{if(c.key!=="Tab"||c.altKey||c.ctrlKey||c.metaKey||!tu(e))return;let f=i.activeElement,d=e.current;if(!d||!$t(f,d))return;let h=wi(d),p=Mn(h,{tabbable:!0},d);if(!f)return;p.currentNode=f;let g=c.shiftKey?p.previousNode():p.nextNode();g||(p.currentNode=c.shiftKey?d[d.length-1].nextElementSibling:d[0].previousElementSibling,g=c.shiftKey?p.previousNode():p.nextNode()),c.preventDefault(),g&&Xt(g,!0)},a=c=>{(!Ue||uh(Ue,e))&&$t(c.target,e.current)?(Ue=e,n.current=c.target):tu(e)&&!tv(c.target,e)?n.current?n.current.focus():Ue&&Ue.current&&ch(Ue.current):tu(e)&&(n.current=c.target)},l=c=>{r.current&&cancelAnimationFrame(r.current),r.current=requestAnimationFrame(()=>{if(i.activeElement&&tu(e)&&!tv(i.activeElement,e))if(Ue=e,i.body.contains(c.target)){var f;n.current=c.target,(f=n.current)===null||f===void 0||f.focus()}else Ue.current&&ch(Ue.current)})};return i.addEventListener("keydown",o,!1),i.addEventListener("focusin",a,!1),s==null||s.forEach(c=>c.addEventListener("focusin",a,!1)),s==null||s.forEach(c=>c.addEventListener("focusout",l,!1)),()=>{i.removeEventListener("keydown",o,!1),i.removeEventListener("focusin",a,!1),s==null||s.forEach(c=>c.removeEventListener("focusin",a,!1)),s==null||s.forEach(c=>c.removeEventListener("focusout",l,!1))}},[e,t]),hn(()=>()=>{r.current&&cancelAnimationFrame(r.current)},[r])}function nP(e){return tv(e)}function $t(e,t){return!e||!t?!1:t.some(n=>n.contains(e))}function tv(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of nt.traverse(nt.getTreeNode(t)))if(n&&$t(e,n.current))return!0;return!1}function uh(e,t){var n;let r=(n=nt.getTreeNode(t))===null||n===void 0?void 0:n.parent;for(;r;){if(r.scopeRef===e)return!0;r=r.parent}return!1}function Xt(e,t=!1){if(e!=null&&!t)try{c8(e)}catch{}else if(e!=null)try{e.focus()}catch{}}function ch(e,t=!0){let n=e[0].previousElementSibling,r=wi(e),s=Mn(r,{tabbable:t},e);s.currentNode=n;let i=s.nextNode();t&&!i&&(r=wi(e),s=Mn(r,{tabbable:!1},e),s.currentNode=n,i=s.nextNode()),Xt(i)}function y8(e,t){const n=G.useRef(t);x.useEffect(()=>{if(n.current){Ue=e;const r=Mt(e.current?e.current[0]:void 0);!$t(r.activeElement,Ue.current)&&e.current&&ch(e.current)}n.current=!1},[e])}function v8(e,t,n){hn(()=>{if(t||n)return;let r=e.current;const s=Mt(r?r[0]:void 0);let i=o=>{let a=o.target;$t(a,e.current)?Ue=e:nP(a)||(Ue=null)};return s.addEventListener("focusin",i,!1),r==null||r.forEach(o=>o.addEventListener("focusin",i,!1)),()=>{s.removeEventListener("focusin",i,!1),r==null||r.forEach(o=>o.removeEventListener("focusin",i,!1))}},[e,t,n])}function x8(e){let t=nt.getTreeNode(Ue);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return(t==null?void 0:t.scopeRef)===e}function b8(e,t,n){const r=x.useRef(typeof document<"u"?Mt(e.current?e.current[0]:void 0).activeElement:null);hn(()=>{let s=e.current;const i=Mt(s?s[0]:void 0);if(!t||n)return;let o=()=>{(!Ue||uh(Ue,e))&&$t(i.activeElement,e.current)&&(Ue=e)};return i.addEventListener("focusin",o,!1),s==null||s.forEach(a=>a.addEventListener("focusin",o,!1)),()=>{i.removeEventListener("focusin",o,!1),s==null||s.forEach(a=>a.removeEventListener("focusin",o,!1))}},[e,n]),hn(()=>{const s=Mt(e.current?e.current[0]:void 0);if(!t)return;let i=o=>{if(o.key!=="Tab"||o.altKey||o.ctrlKey||o.metaKey||!tu(e))return;let a=s.activeElement;if(!$t(a,e.current))return;let l=nt.getTreeNode(e);if(!l)return;let c=l.nodeToRestore,f=Mn(s.body,{tabbable:!0});f.currentNode=a;let d=o.shiftKey?f.previousNode():f.nextNode();if((!c||!s.body.contains(c)||c===s.body)&&(c=void 0,l.nodeToRestore=void 0),(!d||!$t(d,e.current))&&c){f.currentNode=c;do d=o.shiftKey?f.previousNode():f.nextNode();while($t(d,e.current));o.preventDefault(),o.stopPropagation(),d?Xt(d,!0):nP(c)?Xt(c,!0):a.blur()}};return n||s.addEventListener("keydown",i,!0),()=>{n||s.removeEventListener("keydown",i,!0)}},[e,t,n]),hn(()=>{const s=Mt(e.current?e.current[0]:void 0);if(!t)return;let i=nt.getTreeNode(e);if(i){var o;return i.nodeToRestore=(o=r.current)!==null&&o!==void 0?o:void 0,()=>{let a=nt.getTreeNode(e);if(!a)return;let l=a.nodeToRestore;if(t&&l&&($t(s.activeElement,e.current)||s.activeElement===s.body&&x8(e))){let c=nt.clone();requestAnimationFrame(()=>{if(s.activeElement===s.body){let f=c.getTreeNode(e);for(;f;){if(f.nodeToRestore&&f.nodeToRestore.isConnected){Xt(f.nodeToRestore);return}f=f.parent}for(f=c.getTreeNode(e);f;){if(f.scopeRef&&f.scopeRef.current&&nt.getTreeNode(f.scopeRef)){ch(f.scopeRef.current,!0);return}f=f.parent}}})}}}},[e,t])}function Mn(e,t,n){let r=t!=null&&t.tabbable?m8:p8,s=Mt(e).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)&&eP(i)&&(!n||$t(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 FZ(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:s,tabbable:i=t.tabbable,wrap:o=t.wrap,accept:a=t.accept}=n,l=s||Mt(r).activeElement,c=Mn(r,{tabbable:i,accept:a});r.contains(l)&&(c.currentNode=l);let f=c.nextNode();return!f&&o&&(c.currentNode=r,f=c.nextNode()),f&&Xt(f,!0),f},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:s,tabbable:i=t.tabbable,wrap:o=t.wrap,accept:a=t.accept}=n,l=s||Mt(r).activeElement,c=Mn(r,{tabbable:i,accept:a});if(r.contains(l))c.currentNode=l;else{let d=Wm(c);return d&&Xt(d,!0),d??null}let f=c.previousNode();if(!f&&o){c.currentNode=r;let d=Wm(c);if(!d)return null;f=d}return f&&Xt(f,!0),f??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:s=t.tabbable,accept:i=t.accept}=n,a=Mn(r,{tabbable:s,accept:i}).nextNode();return a&&Xt(a,!0),a},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:s=t.tabbable,accept:i=t.accept}=n,o=Mn(r,{tabbable:s,accept:i}),a=Wm(o);return a&&Xt(a,!0),a??null}}}function Wm(e){let t,n;do n=e.lastChild(),n&&(t=n);while(n);return t}class H1{get size(){return this.fastMap.size}getTreeNode(t){return this.fastMap.get(t)}addTreeNode(t,n,r){let s=this.fastMap.get(n??null);if(!s)return;let i=new nv({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);if(!n)return;let r=n.parent;for(let i of this.traverse())i!==n&&n.nodeToRestore&&i.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&$t(i.nodeToRestore,n.scopeRef.current)&&(i.nodeToRestore=n.nodeToRestore);let s=n.children;r&&(r.removeChild(n),s.size>0&&s.forEach(i=>r&&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(){var t;let n=new H1;var r;for(let s of this.traverse())n.addTreeNode(s.scopeRef,(r=(t=s.parent)===null||t===void 0?void 0:t.scopeRef)!==null&&r!==void 0?r:null,s.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new nv({scopeRef:null}),this.fastMap.set(null,this.root)}}class nv{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 nt=new H1;const w8=fe(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"})),_8=fe(u.jsx("path",{d:"M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"}),"WarningOutlined"),rP={initial:{opacity:0,y:5},animate:{opacity:1,y:0},exit:{opacity:0,y:5},transition:{type:"tween",duration:.125}},S8=["top","right","bottom","left"],Zs=Math.min,cn=Math.max,fh=Math.round,Tf=Math.floor,ei=e=>({x:e,y:e}),E8={left:"right",right:"left",bottom:"top",top:"bottom"},C8={start:"end",end:"start"};function rv(e,t,n){return cn(e,Zs(t,n))}function uo(e,t){return typeof e=="function"?e(t):e}function ti(e){return e.split("-")[0]}function bl(e){return e.split("-")[1]}function sP(e){return e==="x"?"y":"x"}function q1(e){return e==="y"?"height":"width"}function $c(e){return["top","bottom"].includes(ti(e))?"y":"x"}function W1(e){return sP($c(e))}function T8(e,t,n){n===void 0&&(n=!1);const r=bl(e),s=W1(e),i=q1(s);let o=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[i]>t.floating[i]&&(o=dh(o)),[o,dh(o)]}function j8(e){const t=dh(e);return[sv(e),t,sv(t)]}function sv(e){return e.replace(/start|end/g,t=>C8[t])}function k8(e,t,n){const r=["left","right"],s=["right","left"],i=["top","bottom"],o=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:r:t?r:s;case"left":case"right":return t?i:o;default:return[]}}function P8(e,t,n,r){const s=bl(e);let i=k8(ti(e),n==="start",r);return s&&(i=i.map(o=>o+"-"+s),t&&(i=i.concat(i.map(sv)))),i}function dh(e){return e.replace(/left|right|bottom|top/g,t=>E8[t])}function R8(e){return{top:0,right:0,bottom:0,left:0,...e}}function iP(e){return typeof e!="number"?R8(e):{top:e,right:e,bottom:e,left:e}}function hh(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function P_(e,t,n){let{reference:r,floating:s}=e;const i=$c(t),o=W1(t),a=q1(o),l=ti(t),c=i==="y",f=r.x+r.width/2-s.width/2,d=r.y+r.height/2-s.height/2,h=r[a]/2-s[a]/2;let p;switch(l){case"top":p={x:f,y:r.y-s.height};break;case"bottom":p={x:f,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-s.width,y:d};break;default:p={x:r.x,y:r.y}}switch(bl(t)){case"start":p[o]-=h*(n&&c?-1:1);break;case"end":p[o]+=h*(n&&c?-1:1);break}return p}const N8=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:f,y:d}=P_(c,r,l),h=r,p={},g=0;for(let w=0;w({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:s,rects:i,platform:o,elements:a,middlewareData:l}=t,{element:c,padding:f=0}=uo(e,t)||{};if(c==null)return{};const d=iP(f),h={x:n,y:r},p=W1(s),g=q1(p),w=await o.getDimensions(c),b=p==="y",y=b?"top":"left",m=b?"bottom":"right",v=b?"clientHeight":"clientWidth",_=i.reference[g]+i.reference[p]-h[p]-i.floating[g],S=h[p]-i.reference[p],E=await(o.getOffsetParent==null?void 0:o.getOffsetParent(c));let j=E?E[v]:0;(!j||!await(o.isElement==null?void 0:o.isElement(E)))&&(j=a.floating[v]||i.floating[g]);const R=_/2-S/2,M=j/2-w[g]/2-1,L=Zs(d[y],M),z=Zs(d[m],M),H=L,Y=j-w[g]-z,V=j/2-w[g]/2+R,K=rv(H,V,Y),P=!l.arrow&&bl(s)!=null&&V!=K&&i.reference[g]/2-(VH<=0)){var M,L;const H=(((M=i.flip)==null?void 0:M.index)||0)+1,Y=S[H];if(Y)return{data:{index:H,overflows:R},reset:{placement:Y}};let V=(L=R.filter(K=>K.overflows[0]<=0).sort((K,P)=>K.overflows[1]-P.overflows[1])[0])==null?void 0:L.placement;if(!V)switch(p){case"bestFit":{var z;const K=(z=R.map(P=>[P.placement,P.overflows.filter(T=>T>0).reduce((T,C)=>T+C,0)]).sort((P,T)=>P[1]-T[1])[0])==null?void 0:z[0];K&&(V=K);break}case"initialPlacement":V=a;break}if(s!==V)return{reset:{placement:V}}}return{}}}};function N_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function O_(e){return S8.some(t=>e[t]>=0)}const UZ=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...s}=uo(e,t);switch(r){case"referenceHidden":{const i=await Wu(t,{...s,elementContext:"reference"}),o=N_(i,n.reference);return{data:{referenceHiddenOffsets:o,referenceHidden:O_(o)}}}case"escaped":{const i=await Wu(t,{...s,altBoundary:!0}),o=N_(i,n.floating);return{data:{escapedOffsets:o,escaped:O_(o)}}}default:return{}}}}};async function A8(e,t){const{placement:n,platform:r,elements:s}=e,i=await(r.isRTL==null?void 0:r.isRTL(s.floating)),o=ti(n),a=bl(n),l=$c(n)==="y",c=["left","top"].includes(o)?-1:1,f=i&&l?-1:1,d=uo(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:g}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&typeof g=="number"&&(p=a==="end"?g*-1:g),l?{x:p*f,y:h*c}:{x:h*c,y:p*f}}const I8=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:s,y:i,placement:o,middlewareData:a}=t,l=await A8(t,e);return o===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:s+l.x,y:i+l.y,data:{...l,placement:o}}}}},D8=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:b=>{let{x:y,y:m}=b;return{x:y,y:m}}},...l}=uo(e,t),c={x:n,y:r},f=await Wu(t,l),d=$c(ti(s)),h=sP(d);let p=c[h],g=c[d];if(i){const b=h==="y"?"top":"left",y=h==="y"?"bottom":"right",m=p+f[b],v=p-f[y];p=rv(m,p,v)}if(o){const b=d==="y"?"top":"left",y=d==="y"?"bottom":"right",m=g+f[b],v=g-f[y];g=rv(m,g,v)}const w=a.fn({...t,[h]:p,[d]:g});return{...w,data:{x:w.x-n,y:w.y-r}}}}},$8=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}=uo(e,t),l=await Wu(t,a),c=ti(n),f=bl(n),d=$c(n)==="y",{width:h,height:p}=r.floating;let g,w;c==="top"||c==="bottom"?(g=c,w=f===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(w=c,g=f==="end"?"top":"bottom");const b=p-l[g],y=h-l[w],m=!t.middlewareData.shift;let v=b,_=y;if(d){const E=h-l.left-l.right;_=f||m?Zs(y,E):E}else{const E=p-l.top-l.bottom;v=f||m?Zs(b,E):E}if(m&&!f){const E=cn(l.left,0),j=cn(l.right,0),R=cn(l.top,0),M=cn(l.bottom,0);d?_=h-2*(E!==0||j!==0?E+j:cn(l.left,l.right)):v=p-2*(R!==0||M!==0?R+M:cn(l.top,l.bottom))}await o({...t,availableWidth:_,availableHeight:v});const S=await s.getDimensions(i.floating);return h!==S.width||p!==S.height?{reset:{rects:!0}}:{}}}};function ni(e){return oP(e)?(e.nodeName||"").toLowerCase():"#document"}function vn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hs(e){var t;return(t=(oP(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function oP(e){return e instanceof Node||e instanceof vn(e).Node}function as(e){return e instanceof Element||e instanceof vn(e).Element}function Pr(e){return e instanceof HTMLElement||e instanceof vn(e).HTMLElement}function A_(e){return typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof vn(e).ShadowRoot}function Lc(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=Vn(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(s)}function L8(e){return["table","td","th"].includes(ni(e))}function K1(e){const t=G1(),n=Vn(e);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function M8(e){let t=Ka(e);for(;Pr(t)&&!vp(t);){if(K1(t))return t;t=Ka(t)}return null}function G1(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function vp(e){return["html","body","#document"].includes(ni(e))}function Vn(e){return vn(e).getComputedStyle(e)}function xp(e){return as(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function Ka(e){if(ni(e)==="html")return e;const t=e.assignedSlot||e.parentNode||A_(e)&&e.host||hs(e);return A_(t)?t.host:t}function aP(e){const t=Ka(e);return vp(t)?e.ownerDocument?e.ownerDocument.body:e.body:Pr(t)&&Lc(t)?t:aP(t)}function Ku(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=aP(e),i=s===((r=e.ownerDocument)==null?void 0:r.body),o=vn(s);return i?t.concat(o,o.visualViewport||[],Lc(s)?s:[],o.frameElement&&n?Ku(o.frameElement):[]):t.concat(s,Ku(s,[],n))}function lP(e){const t=Vn(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Pr(e),i=s?e.offsetWidth:n,o=s?e.offsetHeight:r,a=fh(n)!==i||fh(r)!==o;return a&&(n=i,r=o),{width:n,height:r,$:a}}function Q1(e){return as(e)?e:e.contextElement}function ta(e){const t=Q1(e);if(!Pr(t))return ei(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:i}=lP(t);let o=(i?fh(n.width):n.width)/r,a=(i?fh(n.height):n.height)/s;return(!o||!Number.isFinite(o))&&(o=1),(!a||!Number.isFinite(a))&&(a=1),{x:o,y:a}}const F8=ei(0);function uP(e){const t=vn(e);return!G1()||!t.visualViewport?F8:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function U8(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==vn(e)?!1:t}function Yi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),i=Q1(e);let o=ei(1);t&&(r?as(r)&&(o=ta(r)):o=ta(e));const a=U8(i,n,r)?uP(i):ei(0);let l=(s.left+a.x)/o.x,c=(s.top+a.y)/o.y,f=s.width/o.x,d=s.height/o.y;if(i){const h=vn(i),p=r&&as(r)?vn(r):r;let g=h.frameElement;for(;g&&r&&p!==h;){const w=ta(g),b=g.getBoundingClientRect(),y=Vn(g),m=b.left+(g.clientLeft+parseFloat(y.paddingLeft))*w.x,v=b.top+(g.clientTop+parseFloat(y.paddingTop))*w.y;l*=w.x,c*=w.y,f*=w.x,d*=w.y,l+=m,c+=v,g=vn(g).frameElement}}return hh({width:f,height:d,x:l,y:c})}function z8(e){let{rect:t,offsetParent:n,strategy:r}=e;const s=Pr(n),i=hs(n);if(n===i)return t;let o={scrollLeft:0,scrollTop:0},a=ei(1);const l=ei(0);if((s||!s&&r!=="fixed")&&((ni(n)!=="body"||Lc(i))&&(o=xp(n)),Pr(n))){const c=Yi(n);a=ta(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}}function V8(e){return Array.from(e.getClientRects())}function cP(e){return Yi(hs(e)).left+xp(e).scrollLeft}function B8(e){const t=hs(e),n=xp(e),r=e.ownerDocument.body,s=cn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=cn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let o=-n.scrollLeft+cP(e);const a=-n.scrollTop;return Vn(r).direction==="rtl"&&(o+=cn(t.clientWidth,r.clientWidth)-s),{width:s,height:i,x:o,y:a}}function H8(e,t){const n=vn(e),r=hs(e),s=n.visualViewport;let i=r.clientWidth,o=r.clientHeight,a=0,l=0;if(s){i=s.width,o=s.height;const c=G1();(!c||c&&t==="fixed")&&(a=s.offsetLeft,l=s.offsetTop)}return{width:i,height:o,x:a,y:l}}function q8(e,t){const n=Yi(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,i=Pr(e)?ta(e):ei(1),o=e.clientWidth*i.x,a=e.clientHeight*i.y,l=s*i.x,c=r*i.y;return{width:o,height:a,x:l,y:c}}function I_(e,t,n){let r;if(t==="viewport")r=H8(e,n);else if(t==="document")r=B8(hs(e));else if(as(t))r=q8(t,n);else{const s=uP(e);r={...t,x:t.x-s.x,y:t.y-s.y}}return hh(r)}function fP(e,t){const n=Ka(e);return n===t||!as(n)||vp(n)?!1:Vn(n).position==="fixed"||fP(n,t)}function W8(e,t){const n=t.get(e);if(n)return n;let r=Ku(e,[],!1).filter(a=>as(a)&&ni(a)!=="body"),s=null;const i=Vn(e).position==="fixed";let o=i?Ka(e):e;for(;as(o)&&!vp(o);){const a=Vn(o),l=K1(o);!l&&a.position==="fixed"&&(s=null),(i?!l&&!s:!l&&a.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||Lc(o)&&!l&&fP(e,o))?r=r.filter(f=>f!==o):s=a,o=Ka(o)}return t.set(e,r),r}function K8(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const o=[...n==="clippingAncestors"?W8(t,this._c):[].concat(n),r],a=o[0],l=o.reduce((c,f)=>{const d=I_(t,f,s);return c.top=cn(d.top,c.top),c.right=Zs(d.right,c.right),c.bottom=Zs(d.bottom,c.bottom),c.left=cn(d.left,c.left),c},I_(t,a,s));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function G8(e){return lP(e)}function Q8(e,t,n){const r=Pr(t),s=hs(t),i=n==="fixed",o=Yi(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=ei(0);if(r||!r&&!i)if((ni(t)!=="body"||Lc(s))&&(a=xp(t)),r){const c=Yi(t,!0,i,t);l.x=c.x+t.clientLeft,l.y=c.y+t.clientTop}else s&&(l.x=cP(s));return{x:o.left+a.scrollLeft-l.x,y:o.top+a.scrollTop-l.y,width:o.width,height:o.height}}function D_(e,t){return!Pr(e)||Vn(e).position==="fixed"?null:t?t(e):e.offsetParent}function dP(e,t){const n=vn(e);if(!Pr(e))return n;let r=D_(e,t);for(;r&&L8(r)&&Vn(r).position==="static";)r=D_(r,t);return r&&(ni(r)==="html"||ni(r)==="body"&&Vn(r).position==="static"&&!K1(r))?n:r||M8(e)||n}const Y8=async function(e){let{reference:t,floating:n,strategy:r}=e;const s=this.getOffsetParent||dP,i=this.getDimensions;return{reference:Q8(t,await s(n),r),floating:{x:0,y:0,...await i(n)}}};function X8(e){return Vn(e).direction==="rtl"}const J8={convertOffsetParentRelativeRectToViewportRelativeRect:z8,getDocumentElement:hs,getClippingRect:K8,getOffsetParent:dP,getElementRects:Y8,getClientRects:V8,getDimensions:G8,getScale:ta,isElement:as,isRTL:X8};function Z8(e,t){let n=null,r;const s=hs(e);function i(){clearTimeout(r),n&&n.disconnect(),n=null}function o(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),i();const{left:c,top:f,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p=Tf(f),g=Tf(s.clientWidth-(c+d)),w=Tf(s.clientHeight-(f+h)),b=Tf(c),m={rootMargin:-p+"px "+-g+"px "+-w+"px "+-b+"px",threshold:cn(0,Zs(1,l))||1};let v=!0;function _(S){const E=S[0].intersectionRatio;if(E!==l){if(!v)return o();E?o(!1,E):r=setTimeout(()=>{o(!1,1e-7)},100)}v=!1}try{n=new IntersectionObserver(_,{...m,root:s.ownerDocument})}catch{n=new IntersectionObserver(_,m)}n.observe(e)}return o(!0),i}function e7(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:i=!0,elementResize:o=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,c=Q1(e),f=s||i?[...c?Ku(c):[],...Ku(t)]:[];f.forEach(y=>{s&&y.addEventListener("scroll",n,{passive:!0}),i&&y.addEventListener("resize",n)});const d=c&&a?Z8(c,n):null;let h=-1,p=null;o&&(p=new ResizeObserver(y=>{let[m]=y;m&&m.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{p&&p.observe(t)})),n()}),c&&!l&&p.observe(c),p.observe(t));let g,w=l?Yi(e):null;l&&b();function b(){const y=Yi(e);w&&(y.x!==w.x||y.y!==w.y||y.width!==w.width||y.height!==w.height)&&n(),w=y,g=requestAnimationFrame(b)}return n(),()=>{f.forEach(y=>{s&&y.removeEventListener("scroll",n),i&&y.removeEventListener("resize",n)}),d&&d(),p&&p.disconnect(),p=null,l&&cancelAnimationFrame(g)}}const t7=(e,t,n)=>{const r=new Map,s={platform:J8,...n},i={...s.platform,_c:r};return N8(e,t,{...s,platform:i})},n7=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?R_({element:r.current,padding:s}).fn(n):{}:r?R_({element:r,padding:s}).fn(n):{}}}};var ld=typeof document<"u"?x.useLayoutEffect:x.useEffect;function ph(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(!ph(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)&&!ph(e[i],t[i]))return!1}return!0}return e!==e&&t!==t}function hP(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $_(e,t){const n=hP(e);return Math.round(t*n)/n}function L_(e){const t=x.useRef(e);return ld(()=>{t.current=e}),t}function r7(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,[f,d]=x.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=x.useState(r);ph(h,r)||p(r);const[g,w]=x.useState(null),[b,y]=x.useState(null),m=x.useCallback(P=>{P!=E.current&&(E.current=P,w(P))},[w]),v=x.useCallback(P=>{P!==j.current&&(j.current=P,y(P))},[y]),_=i||g,S=o||b,E=x.useRef(null),j=x.useRef(null),R=x.useRef(f),M=L_(l),L=L_(s),z=x.useCallback(()=>{if(!E.current||!j.current)return;const P={placement:t,strategy:n,middleware:h};L.current&&(P.platform=L.current),t7(E.current,j.current,P).then(T=>{const C={...T,isPositioned:!0};H.current&&!ph(R.current,C)&&(R.current=C,ll.flushSync(()=>{d(C)}))})},[h,t,n,L]);ld(()=>{c===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[c]);const H=x.useRef(!1);ld(()=>(H.current=!0,()=>{H.current=!1}),[]),ld(()=>{if(_&&(E.current=_),S&&(j.current=S),_&&S){if(M.current)return M.current(_,S,z);z()}},[_,S,z,M]);const Y=x.useMemo(()=>({reference:E,floating:j,setReference:m,setFloating:v}),[m,v]),V=x.useMemo(()=>({reference:_,floating:S}),[_,S]),K=x.useMemo(()=>{const P={position:n,left:0,top:0};if(!V.floating)return P;const T=$_(V.floating,f.x),C=$_(V.floating,f.y);return a?{...P,transform:"translate("+T+"px, "+C+"px)",...hP(V.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:T,top:C}},[n,a,V.floating,f.x,f.y]);return x.useMemo(()=>({...f,update:z,refs:Y,elements:V,floatingStyles:K}),[f,z,Y,V,K])}function s7(e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}function Y1({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=x.useRef(null),f={placement:r,strategy:"fixed"};n||(f.whileElementsMounted=e7,f.middleware=[I8(s),D8({padding:16,crossAxis:a,mainAxis:!0}),O8({padding:16,fallbackPlacements:l}),$8({apply({rects:y,availableHeight:m,availableWidth:v,elements:_}){e==="matchTrigger"&&o!=null?Object.assign(_.floating.style,{width:`${y.reference.width}px`,maxWidth:`${v}`,maxHeight:`${Math.min(m,o)}px`}):o!=null&&Object.assign(_.floating.style,{maxHeight:`${Math.min(m,o)}px`})},padding:16})],i&&f.middleware.push(n7({element:c})));const d=r7(f),h=x.useMemo(()=>s7([t,d.refs.setReference]),[d.refs.setReference,t]),{x:p,y:g}=d.middlewareData.arrow||{},w={top:"bottom",right:"left",bottom:"top",left:"right"}[d.placement.split("-")[0]],b={left:p,top:g,right:"",bottom:"",[w]:"-4px"};return{...d,reference:h,arrowRef:c,arrowStyle:b}}let ri=typeof document<"u"?document.getElementById("root")??document.body:void 0,Qs=typeof document<"u"?document.documentElement:void 0;const M_=500,_r={};let Hl=!1,Lr=null,fi=null;const F_=e=>{var t;for(const n in _r)n!==e&&((t=_r[n])==null||t.call(_r,!0),delete _r[n])},i7=x.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:f,y:d,reference:h,strategy:p,arrowRef:g,arrowStyle:w,refs:b}=Y1({placement:n,offset:r,ref:c,showArrow:!0}),[y,m]=x.useState(!1),v=x.useId(),_=x.useRef(),S=()=>{clearTimeout(_.current),_.current=void 0,F_(v),_r[v]=E,Hl=!0,m(!0),Lr&&(clearTimeout(Lr),Lr=null),fi&&(clearTimeout(fi),fi=null)},E=x.useCallback(L=>{L?(clearTimeout(_.current),_.current=void 0,m(!1)):_.current||(_.current=setTimeout(()=>{_.current=void 0,m(!1)},M_)),Lr&&(clearTimeout(Lr),Lr=null),Hl&&(fi&&clearTimeout(fi),fi=setTimeout(()=>{delete _r[v],fi=null,Hl=!1},M_))},[v]),j=()=>{F_(v),_r[v]=E,!y&&!Lr&&!Hl?Lr=setTimeout(()=>{Lr=null,Hl=!0,S()},i):y||S()},R=L=>{!L&&i>0&&!_.current?j():S()};x.useEffect(()=>()=>{clearTimeout(_.current),_r[v]&&delete _r[v]},[v]),x.useEffect(()=>{const L=z=>{z.key==="Escape"&&E(!0)};if(y)return document.addEventListener("keydown",L,!0),()=>{document.removeEventListener("keydown",L,!0)}},[y,E]);const M=u.jsx(dl,{children:y&&u.jsxs(cs.div,{...rP,ref:b.setFloating,id:v,role:"tooltip",onPointerEnter:()=>{R(!0)},onPointerLeave:()=>{E()},className:B("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:d??"",left:f??""},children:[u.jsx("div",{ref:g,className:"absolute h-8 w-8 rotate-45 bg-inherit",style:w}),t]})});return u.jsxs(x.Fragment,{children:[x.cloneElement(e,ds({"aria-describedby":y?v:void 0,ref:h,onPointerEnter:L=>{L.pointerType==="mouse"&&R()},onFocus:L=>{L.target.matches(":focus-visible")&&R(!0)},onPointerLeave:L=>{L.pointerType==="mouse"&&E()},onPointerDown:()=>{E(!0)},onBlur:()=>{E()},"aria-label":typeof t=="string"?t:t.props.message},l)),a?ri&&ll.createPortal(M,ri):M]})});function pP(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:f,onClick:d}=e,h=x.useRef(null),p=x.useRef(null),g=tP(),w=_=>{switch(_.key){case"ArrowRight":case"ArrowDown":g==null||g.focusNext({tabbable:!0});break;case"ArrowLeft":case"ArrowUp":g==null||g.focusPrevious({tabbable:!0});break;case"Backspace":case"Delete":h.current===document.activeElement&&(t==null||t());break}},b=_=>{_.stopPropagation(),d?d(_):h.current.focus()},y=o7(e);let m=r||s!=null?u.jsx(_8,{className:"text-danger",size:"sm"}):e.adornment&&x.cloneElement(e.adornment,{size:y.adornment.size,circle:!0,className:B(e.adornment.props.className,y.adornment.margin)});s&&m&&(m=u.jsx(i7,{label:s,variant:"danger",children:m}));const v=c;return u.jsxs(v,{tabIndex:a?0:void 0,ref:h,to:f,onKeyDown:a?w:void 0,onClick:a?b:void 0,className:B("relative flex flex-shrink-0 items-center justify-center gap-10 overflow-hidden whitespace-nowrap outline-none","min-w-0 max-w-full after:pointer-events-none after:absolute after:inset-0",d&&"cursor-pointer",l,a7(e),y.chip,!n&&a&&"hover:after:bg-black/5 focus:after:bg-black/10",o),children:[m,u.jsx("div",{className:"flex-auto overflow-hidden overflow-ellipsis",children:i}),t&&u.jsx(up,{ref:p,className:B("text-black/30 dark:text-white/50",y.closeButton),onClick:_=>{_.stopPropagation(),t()},tabIndex:-1,children:u.jsx(w8,{className:"block",width:"100%",height:"100%"})})]})}function o7({size:e,onRemove:t}){switch(e){case"xs":return{adornment:{size:"xs",margin:"-ml-3"},chip:B("pl-8 h-20 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:B("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:B("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:B("pl-12 h-32 text-sm",!t&&"pr-12"),closeButton:"mr-6 w-22 h-22"}}}function a7({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 X1=fe(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"),l7="modulepreload",u7=function(e,t){return new URL(e,t).href},U_={},co=function(t,n,r){if(!n||n.length===0)return t();const s=document.getElementsByTagName("link");return Promise.all(n.map(i=>{if(i=u7(i,r),i in U_)return;U_[i]=!0;const o=i.endsWith(".css"),a=o?'[rel="stylesheet"]':"";if(!!r)for(let f=s.length-1;f>=0;f--){const d=s[f];if(d.href===i&&(!o||d.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${a}`))return;const c=document.createElement("link");if(c.rel=o?"stylesheet":l7,o||(c.as="script",c.crossOrigin=""),c.href=i,document.head.appendChild(c),o)return new Promise((f,d)=>{c.addEventListener("load",f),c.addEventListener("error",()=>d(new Error(`Unable to preload CSS for ${i}`)))})})).then(()=>t()).catch(i=>{const o=new Event("vite:preloadError",{cancelable:!0});if(o.payload=i,window.dispatchEvent(o),!o.defaultPrevented)throw i})};function c7(e,t="dark"){e.querySelectorAll("pre code").forEach(n=>{mP(n,t)})}async function mP(e,t="dark"){const{hljs:n}=await co(()=>import("./highlight-ae97bfae.js"),["./highlight-ae97bfae.js","./c-6a5a5183.js","./highlight-b5e2c008.css"],import.meta.url);e.dataset.highlighted||(e.classList.add(t==="dark"?"hljs-dark":"hljs-light"),n.highlightElement(e))}const J1=fe(u.jsx("path",{d:"M7.41 8.59 12 13.17l4.59-4.58L18 10l-6 6-6-6 1.41-1.41z"}),"KeyboardArrowDownOutlined"),f7=fe(u.jsx("path",{d:"M12 5.83 15.17 9l1.41-1.41L12 3 7.41 7.59 8.83 9 12 5.83zm0 12.34L8.83 15l-1.41 1.41L12 21l4.59-4.59L15.17 15 12 18.17z"}),"UnfoldMoreOutlined"),d7=fe(u.jsx("path",{d:"M7.41 18.59 8.83 20 12 16.83 15.17 20l1.41-1.41L12 14l-4.59 4.59zm9.18-13.18L15.17 4 12 7.17 8.83 4 7.41 5.41 12 10l4.59-4.59z"}),"UnfoldLessOutlined");function h7({trace:e,onSelectedIndexChange:t,selectedIndex:n,totalVendorGroups:r}){const[s,i]=x.useState([]),o=s.length===r;return u.jsxs("div",{className:"max-w-440 border-r text-sm",children:[u.jsx("div",{className:"border-b px-30 py-16",children:u.jsx(le,{variant:"outline",size:"2xs",startIcon:o?u.jsx(d7,{}):u.jsx(f7,{}),onClick:()=>{i(o?[]:e.map((a,l)=>"vendorGroup"in a?l:-1).filter(a=>a!==-1))},children:o?u.jsx(k,{message:"Collapse vendor frames"}):u.jsx(k,{message:"Expand vendor frames"})})}),e.map((a,l)=>"vendorGroup"in a?s.includes(l)?u.jsx(x.Fragment,{children:a.items.map((c,f)=>u.jsx(z_,{frame:c,onClick:()=>t(c.flatIndex),isSelected:n===c.flatIndex},`vendor-${f}`))},l):u.jsxs("div",{className:"flex cursor-pointer items-center gap-4 border-b px-30 py-16 hover:bg-hover",onClick:()=>i(c=>[...c,l]),children:[u.jsx(k,{message:":count vendor [one frame|other frames]",values:{count:a.items.length}}),u.jsx(J1,{className:"text-muted"})]},l):u.jsx(z_,{frame:a,onClick:()=>t(a.flatIndex),isSelected:n===a.flatIndex},l))]})}function z_({frame:e,onClick:t,isSelected:n}){return u.jsxs("div",{onClick:t,className:B("cursor-pointer border-b px-30 py-16",n?"bg-danger text-on-primary":"hover:bg-danger/10"),children:[u.jsx(gP,{frame:e}),u.jsx("div",{className:"font-semibold",children:e.method})]})}function gP({frame:e}){return u.jsxs("div",{className:"inline-flex flex-wrap items-baseline",children:[e.path.map((t,n)=>e.path.length-1===n?u.jsx("div",{className:"font-semibold",children:t},n):u.jsxs("div",{children:[t,"/"]},n)),u.jsxs("div",{children:[":",e.lineNumber]})]})}function p7({error:e}){const[t,n]=x.useState(()=>{for(const s of e.trace)if(!("vendorGroup"in s))return s.flatIndex;return 0}),r=x.useMemo(()=>{for(const s of e.trace)if("vendorGroup"in s){for(const i of s.items)if(i.flatIndex===t)return i}else if(s.flatIndex===t)return s},[e,t]);return u.jsxs(yl,{size:"fullscreen",children:[u.jsx(vl,{showDivider:!0,leftAdornment:u.jsx(X1,{}),color:"text-danger",actions:u.jsx(y7,{}),children:u.jsx(k,{message:"An error occured"})}),u.jsxs(xl,{padding:"p-0 stack",children:[u.jsxs("div",{className:"sticky top-0 z-10 border-b bg p-24",children:[u.jsx(pP,{className:"w-max",radius:"rounded-panel",children:e.exception}),u.jsx("div",{className:"mt-16 line-clamp-2 text-lg font-semibold leading-snug",children:e.message})]}),u.jsxs("div",{className:"flex items-stretch gap-10",children:[u.jsx(h7,{trace:e.trace,onSelectedIndexChange:n,selectedIndex:t,totalVendorGroups:e.totalVendorGroups}),r&&u.jsx(m7,{frame:r})]})]})]})}function m7({frame:e}){const t=x.useRef(null),n=Object.keys(e.codeSnippet).map(Number),r=n.indexOf(e.lineNumber),s=Object.values(e.codeSnippet);return u.jsxs("div",{className:"sticky top-120 flex-auto",children:[u.jsx("div",{className:"px-30 py-16 text-right text-muted",children:u.jsx(gP,{frame:e})}),u.jsxs("div",{className:"flex",children:[u.jsx("div",{className:"mr-8 select-none text-right",children:n.map((i,o)=>u.jsx("div",{className:B("px-8 font-mono leading-loose text-muted",o==r&&"bg-danger/30"),children:i},o))}),u.jsx("div",{className:"compact-scrollbar flex-grow overflow-x-auto",children:u.jsx("pre",{children:u.jsx("code",{className:"language-php",ref:t,children:s.map((i,o)=>u.jsx(g7,{isHighlighted:r===o,line:i},`${e.path}.${o}`))})})})]})]})}const g7=x.memo(({line:e,isHighlighted:t})=>{const n=x.useRef(null);return x.useEffect(()=>{const r=n.current;return mP(r,"light"),()=>{delete r.dataset.highlighted}},[]),u.jsx("span",{className:B("block leading-loose",t&&"bg-danger/20"),children:u.jsx("span",{className:"language-php",ref:n,children:e+` `})})});function y7(){return u.jsx(le,{variant:"outline",className:"text-main",elementType:"a",download:!0,href:"api/v1/logs/error/download-latest",size:"2xs",children:u.jsx(k,{message:"Download log"})})}const v7=ye("There was an issue. Please try again.");function xt(e,t=v7,n,r){var s,i,o,a;Or.isAxiosError(e)&&((i=(s=e.response)==null?void 0:s.data)!=null&&i.ignitionTrace)?Xk(p7,{error:e.response.data}):ke.danger(Gs(e,n)||t,{action:(a=(o=e.response)==null?void 0:o.data)==null?void 0:a.action,...r})}function Z1(){const{data:e,mergeBootstrapData:t}=Kt();return Pe({mutationFn:n=>x7(n),onSuccess:n=>{Ye.invalidateQueries({queryKey:sr.key}),n.unreadCount===0&&t({user:{...e.user,unread_notifications_count:0}})},onError:n=>xt(n)})}function x7(e){return ae.post("notifications/mark-as-read",e).then(t=>t.data)}/** * @remix-run/router v1.23.3 * * 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 Gu(){return Gu=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function ex(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function w7(){return Math.random().toString(36).substr(2,8)}function B_(e,t){return{usr:e.state,key:e.key,idx:t}}function iv(e,t,n,r){return n===void 0&&(n=null),Gu({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?wl(t):t,{state:n,key:t&&t.key||r||w7()})}function Ga(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 wl(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 _7(e,t,n,r){r===void 0&&(r={});let{window:s=document.defaultView,v5Compat:i=!1}=r,o=s.history,a=Ls.Pop,l=null,c=f();c==null&&(c=0,o.replaceState(Gu({},o.state,{idx:c}),""));function f(){return(o.state||{idx:null}).idx}function d(){a=Ls.Pop;let b=f(),y=b==null?null:b-c;c=b,l&&l({action:a,location:w.location,delta:y})}function h(b,y){a=Ls.Push;let m=iv(w.location,b,y);n&&n(m,b),c=f()+1;let v=B_(m,c),_=w.createHref(m);try{o.pushState(v,"",_)}catch(S){if(S instanceof DOMException&&S.name==="DataCloneError")throw S;s.location.assign(_)}i&&l&&l({action:a,location:w.location,delta:1})}function p(b,y){a=Ls.Replace;let m=iv(w.location,b,y);n&&n(m,b),c=f();let v=B_(m,c),_=w.createHref(m);o.replaceState(v,"",_),i&&l&&l({action:a,location:w.location,delta:0})}function g(b){let y=s.location.origin!=="null"?s.location.origin:s.location.href,m=typeof b=="string"?b:Ga(b);return m=m.replace(/ $/,"%20"),We(y,"No window.location.(origin|href) available to create URL for href: "+m),new URL(m,y)}let w={get action(){return a},get location(){return e(s,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return s.addEventListener(V_,d),l=b,()=>{s.removeEventListener(V_,d),l=null}},createHref(b){return t(s,b)},createURL:g,encodeLocation(b){let y=g(b);return{pathname:y.pathname,search:y.search,hash:y.hash}},push:h,replace:p,go(b){return o.go(b)}};return w}var H_;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(H_||(H_={}));function S7(e,t,n){return n===void 0&&(n="/"),E7(e,t,n,!1)}function E7(e,t,n,r){let s=typeof t=="string"?wl(t):t,i=Qa(s.pathname||"/",n);if(i==null)return null;let o=yP(e);C7(o);let a=null,l=$7(i);for(let c=0;a==null&&c{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=Ys([r,l.relativePath]),f=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+'".')),yP(i.children,t,f,c)),!(i.path==null&&!i.index)&&t.push({path:c,score:O7(c,i.index),routesMeta:f})};return e.forEach((i,o)=>{var a;if(i.path===""||!((a=i.path)!=null&&a.includes("?")))s(i,o);else for(let l of vP(i.path))s(i,o,l)}),t}function vP(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=vP(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 C7(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:A7(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const T7=/^:[\w-]+$/,j7=3,k7=2,P7=1,R7=10,N7=-2,q_=e=>e==="*";function O7(e,t){let n=e.split("/"),r=n.length;return n.some(q_)&&(r+=N7),t&&(r+=k7),n.filter(s=>!q_(s)).reduce((s,i)=>s+(T7.test(i)?j7:i===""?P7:R7),r)}function A7(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 I7(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,s={},i="/",o=[];for(let a=0;a{let{paramName:h,isOptional:p}=f;if(h==="*"){let w=a[d]||"";o=i.slice(0,i.length-w.length).replace(/(.)\/+$/,"$1")}const g=a[d];return p&&!g?c[h]=void 0:c[h]=(g||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:e}}function D7(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),ex(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,l)=>(r.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),r]}function $7(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ex(!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 Qa(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)||"/"}const L7=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,M7=e=>L7.test(e);function xP(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:s=""}=typeof e=="string"?wl(e):e,i;if(n)if(M7(n))i=n;else{if(n.includes("//")){let o=n;n=bP(n),ex(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=W_(n.substring(1),"/"):i=W_(n,t)}else i=t;return{pathname:i,search:z7(r),hash:V7(s)}}function W_(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 Km(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 and the router will parse it for you.'}function F7(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function tx(e,t){let n=F7(e);return t?n.map((r,s)=>s===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function nx(e,t,n,r){r===void 0&&(r=!1);let s;typeof e=="string"?s=wl(e):(s=Gu({},e),We(!s.pathname||!s.pathname.includes("?"),Km("?","pathname","search",s)),We(!s.pathname||!s.pathname.includes("#"),Km("#","pathname","hash",s)),We(!s.search||!s.search.includes("#"),Km("#","search","hash",s)));let i=e===""||s.pathname==="",o=i?"/":s.pathname,a;if(o==null)a=n;else{let d=t.length-1;if(!r&&o.startsWith("..")){let h=o.split("/");for(;h[0]==="..";)h.shift(),d-=1;s.pathname=h.join("/")}a=d>=0?t[d]:"/"}let l=xP(s,a),c=o&&o!=="/"&&o.endsWith("/"),f=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||f)&&(l.pathname+="/"),l}const bP=e=>e.replace(/\/\/+/g,"/"),Ys=e=>bP(e.join("/")),U7=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),z7=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,V7=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function B7(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const wP=["post","put","patch","delete"];new Set(wP);const H7=["get",...wP];new Set(H7);/** * React Router v6.30.4 * * 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 Qu(){return Qu=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),x.useCallback(function(c,f){if(f===void 0&&(f={}),!a.current)return;if(typeof c=="number"){r.go(c);return}let d=nx(c,JSON.parse(o),i,f.relative==="path");e==null&&t!=="/"&&(d.pathname=d.pathname==="/"?t:Ys([t,d.pathname])),(f.replace?r.replace:r.push)(d,f.state,f)},[t,r,o,i,e])}const K7=x.createContext(null);function G7(e){let t=x.useContext(Ar).outlet;return t&&x.createElement(K7.Provider,{value:e},t)}function rx(){let{matches:e}=x.useContext(Ar),t=e[e.length-1];return t?t.params:{}}function _p(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=x.useContext(ps),{matches:s}=x.useContext(Ar),{pathname:i}=ur(),o=JSON.stringify(tx(s,r.v7_relativeSplatPath));return x.useMemo(()=>nx(e,JSON.parse(o),i,n==="path"),[e,o,i,n])}function Q7(e,t){return Y7(e,t)}function Y7(e,t,n,r){_l()||We(!1);let{navigator:s}=x.useContext(ps),{matches:i}=x.useContext(Ar),o=i[i.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=ur(),f;if(t){var d;let b=typeof t=="string"?wl(t):t;l==="/"||(d=b.pathname)!=null&&d.startsWith(l)||We(!1),f=b}else f=c;let h=f.pathname||"/",p=h;if(l!=="/"){let b=l.replace(/^\//,"").split("/");p="/"+h.replace(/^\//,"").split("/").slice(b.length).join("/")}let g=S7(e,{pathname:p}),w=t9(g&&g.map(b=>Object.assign({},b,{params:Object.assign({},a,b.params),pathname:Ys([l,s.encodeLocation?s.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:Ys([l,s.encodeLocation?s.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r);return t&&w?x.createElement(wp.Provider,{value:{location:Qu({pathname:"/",search:"",hash:"",state:null,key:"default"},f),navigationType:Ls.Pop}},w):w}function X7(){let e=i9(),t=B7(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 x.createElement(x.Fragment,null,x.createElement("h2",null,"Unexpected Application Error!"),x.createElement("h3",{style:{fontStyle:"italic"}},t),n?x.createElement("pre",{style:s},n):null,i)}const J7=x.createElement(X7,null);class Z7 extends x.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!==void 0?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!==void 0?x.createElement(Ar.Provider,{value:this.props.routeContext},x.createElement(SP.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function e9(e){let{routeContext:t,match:n,children:r}=e,s=x.useContext(bp);return s&&s.static&&s.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(s.staticContext._deepestRenderedBoundaryId=n.route.id),x.createElement(Ar.Provider,{value:t},r)}function t9(e,t,n,r){var s;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if(!n)return null;if(n.errors)e=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let o=e,a=(s=n)==null?void 0:s.errors;if(a!=null){let f=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);f>=0||We(!1),o=o.slice(0,Math.min(o.length,f+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((f,d,h)=>{let p,g=!1,w=null,b=null;n&&(p=a&&d.route.id?a[d.route.id]:void 0,w=d.route.errorElement||J7,l&&(c<0&&h===0?(a9("route-fallback",!1),g=!0,b=null):c===h&&(g=!0,b=d.route.hydrateFallbackElement||null)));let y=t.concat(o.slice(0,h+1)),m=()=>{let v;return p?v=w:g?v=b:d.route.Component?v=x.createElement(d.route.Component,null):d.route.element?v=d.route.element:v=f,x.createElement(e9,{match:d,routeContext:{outlet:f,matches:y,isDataRoute:n!=null},children:v})};return n&&(d.route.ErrorBoundary||d.route.errorElement||h===0)?x.createElement(Z7,{location:n.location,revalidation:n.revalidation,component:w,error:p,children:m(),routeContext:{outlet:null,matches:y,isDataRoute:!0}}):m()},null)}var CP=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(CP||{}),gh=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(gh||{});function n9(e){let t=x.useContext(bp);return t||We(!1),t}function r9(e){let t=x.useContext(_P);return t||We(!1),t}function s9(e){let t=x.useContext(Ar);return t||We(!1),t}function TP(e){let t=s9(),n=t.matches[t.matches.length-1];return n.route.id||We(!1),n.route.id}function i9(){var e;let t=x.useContext(SP),n=r9(gh.UseRouteError),r=TP(gh.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function o9(){let{router:e}=n9(CP.UseNavigateStable),t=TP(gh.UseNavigateStable),n=x.useRef(!1);return EP(()=>{n.current=!0}),x.useCallback(function(s,i){i===void 0&&(i={}),n.current&&(typeof s=="number"?e.navigate(s):e.navigate(s,Qu({fromRouteId:t},i)))},[e,t])}const K_={};function a9(e,t,n){!t&&!K_[e]&&(K_[e]=!0)}function l9(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function si(e){let{to:t,replace:n,state:r,relative:s}=e;_l()||We(!1);let{future:i,static:o}=x.useContext(ps),{matches:a}=x.useContext(Ar),{pathname:l}=ur(),c=Mc(),f=nx(t,tx(a,i.v7_relativeSplatPath),l,s==="path"),d=JSON.stringify(f);return x.useEffect(()=>c(JSON.parse(d),{replace:n,state:r,relative:s}),[c,d,s,n,r]),null}function jP(e){return G7(e.context)}function Be(e){We(!1)}function u9(e){let{basename:t="/",children:n=null,location:r,navigationType:s=Ls.Pop,navigator:i,static:o=!1,future:a}=e;_l()&&We(!1);let l=t.replace(/^\/*/,"/"),c=x.useMemo(()=>({basename:l,navigator:i,static:o,future:Qu({v7_relativeSplatPath:!1},a)}),[l,a,i,o]);typeof r=="string"&&(r=wl(r));let{pathname:f="/",search:d="",hash:h="",state:p=null,key:g="default"}=r,w=x.useMemo(()=>{let b=Qa(f,l);return b==null?null:{location:{pathname:b,search:d,hash:h,state:p,key:g},navigationType:s}},[l,f,d,h,p,g,s]);return w==null?null:x.createElement(ps.Provider,{value:c},x.createElement(wp.Provider,{children:n,value:w}))}function G_(e){let{children:t,location:n}=e;return Q7(ov(t),n)}new Promise(()=>{});function ov(e,t){t===void 0&&(t=[]);let n=[];return x.Children.forEach(e,(r,s)=>{if(!x.isValidElement(r))return;let i=[...t,s];if(r.type===x.Fragment){n.push.apply(n,ov(r.props.children,i));return}r.type!==Be&&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=ov(r.props.children,i)),n.push(o)}),n}/** * React Router DOM v6.30.4 * * 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 yh(){return yh=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r=e[n];return t.concat(Array.isArray(r)?r.map(s=>[n,s]):[[n,r]])},[]))}function d9(e,t){let n=av(e);return t&&t.forEach((r,s)=>{n.has(s)||t.getAll(s).forEach(i=>{n.append(s,i)})}),n}const h9=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],p9=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],m9="6";try{window.__reactRouterVersion=m9}catch{}const g9=x.createContext({isTransitioning:!1}),y9="startTransition",Q_=iO[y9];function v9(e){let{basename:t,children:n,future:r,window:s}=e,i=x.useRef();i.current==null&&(i.current=b7({window:s,v5Compat:!0}));let o=i.current,[a,l]=x.useState({action:o.action,location:o.location}),{v7_startTransition:c}=r||{},f=x.useCallback(d=>{c&&Q_?Q_(()=>l(d)):l(d)},[l,c]);return x.useLayoutEffect(()=>o.listen(f),[o,f]),x.useEffect(()=>l9(r),[r]),x.createElement(u9,{basename:t,children:n,location:a.location,navigationType:a.action,navigator:o,future:r})}const x9=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",b9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,tt=x.forwardRef(function(t,n){let{onClick:r,relative:s,reloadDocument:i,replace:o,state:a,target:l,to:c,preventScrollReset:f,viewTransition:d}=t,h=kP(t,h9),{basename:p}=x.useContext(ps),g,w=!1;if(typeof c=="string"&&b9.test(c)&&(g=c,x9))try{let v=new URL(window.location.href),_=c.startsWith("//")?new URL(v.protocol+c):new URL(c),S=Qa(_.pathname,p);_.origin===v.origin&&S!=null?c=S+_.search+_.hash:w=!0}catch{}let b=q7(c,{relative:s}),y=S9(c,{replace:o,state:a,target:l,preventScrollReset:f,relative:s,viewTransition:d});function m(v){r&&r(v),v.defaultPrevented||y(v)}return x.createElement("a",yh({},h,{href:g||b,onClick:w||i?r:m,ref:n,target:l}))}),w9=x.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:s=!1,className:i="",end:o=!1,style:a,to:l,viewTransition:c,children:f}=t,d=kP(t,p9),h=_p(l,{relative:d.relative}),p=ur(),g=x.useContext(_P),{navigator:w,basename:b}=x.useContext(ps),y=g!=null&&E9(h)&&c===!0,m=w.encodeLocation?w.encodeLocation(h).pathname:h.pathname,v=p.pathname,_=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;s||(v=v.toLowerCase(),_=_?_.toLowerCase():null,m=m.toLowerCase()),_&&b&&(_=Qa(_,b)||_);const S=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let E=v===m||!o&&v.startsWith(m)&&v.charAt(S)==="/",j=_!=null&&(_===m||!o&&_.startsWith(m)&&_.charAt(m.length)==="/"),R={isActive:E,isPending:j,isTransitioning:y},M=E?r:void 0,L;typeof i=="function"?L=i(R):L=[i,E?"active":null,j?"pending":null,y?"transitioning":null].filter(Boolean).join(" ");let z=typeof a=="function"?a(R):a;return x.createElement(tt,yh({},d,{"aria-current":M,className:L,ref:n,style:z,to:l,viewTransition:c}),typeof f=="function"?f(R):f)});var lv;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(lv||(lv={}));var Y_;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Y_||(Y_={}));function _9(e){let t=x.useContext(bp);return t||We(!1),t}function S9(e,t){let{target:n,replace:r,state:s,preventScrollReset:i,relative:o,viewTransition:a}=t===void 0?{}:t,l=Mc(),c=ur(),f=_p(e,{relative:o});return x.useCallback(d=>{if(f9(d,n)){d.preventDefault();let h=r!==void 0?r:Ga(c)===Ga(f);l(e,{replace:h,state:s,preventScrollReset:i,relative:o,viewTransition:a})}},[c,l,f,r,s,n,e,i,o,a])}function sx(e){let t=x.useRef(av(e)),n=x.useRef(!1),r=ur(),s=x.useMemo(()=>d9(r.search,n.current?null:t.current),[r.search]),i=Mc(),o=x.useCallback((a,l)=>{const c=av(typeof a=="function"?a(s):a);n.current=!0,i("?"+c,l)},[i,s]);return[s,o]}function E9(e,t){t===void 0&&(t={});let n=x.useContext(g9);n==null&&We(!1);let{basename:r}=_9(lv.useViewTransitionState),s=_p(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=Qa(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=Qa(n.nextLocation.pathname,r)||n.nextLocation.pathname;return mh(s.pathname,o)!=null||mh(s.pathname,i)!=null}function Hn(){const e=Mc(),t=ur();return x.useCallback((n,r)=>{const s=Ga(t)===Ga(xP(n,t.pathname));e(n,{...r,replace:(r==null?void 0:r.replace)!==!1&&s})},[e,t])}function ve(){const{data:{settings:e}}=Kt();return e}const C9={"group-add":UM,people:zM,"export-csv":VM};function PP({notifications:e,className:t}){const{notifications:n}=x.useContext(fs);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])||RP;return u.jsx(o,{notification:r,isLast:i},r.id)})})}function RP({notification:e,onActionButtonClick:t,lineIconRenderer:n,isLast:r}){const s=Z1(),i=Hn(),o=e.data.mainAction,a=!e.data.image&&!e.read_at;return u.jsxs("div",{onClick:()=>{var l;!s.isPending&&!e.read_at&&s.mutate({ids:[e.id]}),o!=null&&o.action&&(ml(o.action)?(l=window.open(o.action,"_blank"))==null||l.focus():i(o.action))},className:B("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(j1,{className:"w-24 h-24 flex-shrink-0 text-muted",src:C9[e.data.image]||e.data.image}),u.jsxs("div",{className:"min-w-0",children:[e.data.lines.map((l,c)=>u.jsx(zF,{iconRenderer:n,notification:e,line:l,index:c},c)),u.jsx(T9,{onActionClick:t,notification:e})]})]})}function T9({notification:e,onActionClick:t}){const{base_url:n}=ve();return e.data.buttonActions?u.jsx("div",{className:"mt-12 flex items-center gap-12",children:e.data.buttonActions.map((r,s)=>u.jsx(le,{size:"xs",variant:s===0?"flat":"outline",color:s===0?"primary":null,elementType:t?void 0:tt,to:t?void 0:r.action.replace(n,""),onClick:i=>{t==null||t(i,r)},children:r.label},s))}):null}const j9={fetchUserWorkspaces:["user-workspaces"],workspaceWithMembers:e=>["workspace-with-members",e]},k9={name:"Default",default:!0,id:0,members_count:1},uv=new Set,P9=(e,t)=>{const n={name:e,callback:t};return uv.add(n),()=>{uv.delete(n)}};function R9(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 N9=(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+R9(r),uv.forEach(i=>{i.name===e&&i.callback(t)})};function O9(e,t=""){return document.cookie&&document.cookie.split("; ").reduce((n,r)=>{const s=r.split("=");return s[0]===e?decodeURIComponent(s[1]):n},"")||t}function ix(e,t){const[n,r]=x.useState(()=>O9(e,t));x.useEffect(()=>P9(e,i=>{r(i)}),[e]);const s=x.useCallback((i,o)=>{r(i),N9(e,i,o)},[e]);return[n,s]}const NP=G.createContext({workspaceId:null,setWorkspaceId:()=>{}});function A9(){return x.useContext(NP)}function I9({children:e}){const[t,n]=ix("activeWorkspaceId",`${k9.id}`);x.useEffect(()=>(i_(parseInt(t)),()=>{i_(0)}),[t]);const r=x.useMemo(()=>({workspaceId:parseInt(t),setWorkspaceId:s=>{n(`${s}`)}}),[t,n]);return u.jsx(NP.Provider,{value:r,children:e})}function D9(){const{setWorkspaceId:e}=A9()||{};return Pe({mutationFn:t=>$9(t),onSuccess:t=>{ke(ye("Joined workspace")),e(t.workspace.id),Ye.invalidateQueries({queryKey:j9.fetchUserWorkspaces}),Ye.invalidateQueries({queryKey:sr.key})},onError:t=>{Or.isAxiosError(t)&&t.response&&t.response.status===404?(Ye.invalidateQueries({queryKey:sr.key}),ke.danger(ye("This invite is no longer valid"))):xt(t)}})}function $9({inviteId:e}){return ae.get(`workspace/join/${e}`).then(t=>t.data)}function L9({inviteId:e}){return ae.delete(`workspace/invite/${e}`).then(t=>t.data)}function M9(){return Pe({mutationFn:e=>L9(e),onSuccess:()=>{Ye.invalidateQueries({queryKey:sr.key}),ke(ye("Declined workspace invitation"))},onError:e=>{Or.isAxiosError(e)&&e.response&&e.response.status===404?(Ye.invalidateQueries({queryKey:sr.key}),ke.danger(ye("This invite is no longer valid"))):xt(e)}})}function F9(e){const{notification:t}=e,n=D9(),r=M9(),s=Ic();return u.jsx(RP,{...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 U9="Common\\Workspaces\\Notifications\\WorkspaceInvitation",z9={auth:{redirectUri:"/",adminRedirectUri:"/admin"},tags:{types:[{name:"custom"}]},customPages:{types:[{type:"default",label:ye("Default")}]},notifications:{renderMap:{[U9]:F9}},admin:{ads:[]},demo:{loginPageDefaults:"singleAccount"},homepage:{options:[{label:ye("Login page"),value:"loginPage"},{label:ye("Registration page"),value:"registerPage"}]}};function cv(e,t){Qs==null||Qs.style.setProperty(e,t)}function V9(e){Qs==null||Qs.style.removeProperty(e)}function OP(e){Object.entries(e.values).forEach(([t,n])=>{cv(t,n)}),e.is_dark?Qs.classList.add("dark"):Qs.classList.remove("dark")}const AP=x.createContext(null);function Sp(){return x.useContext(AP)}const B9="be-active-theme";function H9({children:e}){const{themes:t}=ve(),n=t==null?void 0:t.user_change,{data:r}=Kt(),s=x.useMemo(()=>r.themes.all||[],[r.themes.all]),i=r.themes.selectedThemeId||void 0,[o,a]=ix(B9,`${i}`);let l=n?s.find(f=>f.id==o):s.find(f=>f.id==(t==null?void 0:t.default_id));l||(l=s[0]);const c=x.useMemo(()=>({allThemes:s,selectedTheme:l,selectTheme:f=>{if(!n)return;const d=q9(s,f);d&&(a(`${d.id}`),OP(d))}}),[s,l,a,n]);return u.jsx(AP.Provider,{value:c,children:e})}function q9(e,t){return e.find(n=>t==="light"?n.default_light===!0:t==="dark"?n.default_dark===!0:n.id===t)}function W9({children:e}){const{data:t}=qM(),n=x.useMemo(()=>({data:t,setBootstrapData:gk,mergeBootstrapData:HM,invalidateBootstrapData:BM}),[t]);return u.jsx(I1.Provider,{value:n,children:e})}function IP(e,t,n){return Math.min(Math.max(e,t),n)}let Gm=new Map,fv=!1;try{fv=new Intl.NumberFormat("de-DE",{signDisplay:"exceptZero"}).resolvedOptions().signDisplay==="exceptZero"}catch{}let vh=!1;try{vh=new Intl.NumberFormat("de-DE",{style:"unit",unit:"degree"}).resolvedOptions().style==="unit"}catch{}const DP={degree:{narrow:{default:"°","ja-JP":" 度","zh-TW":"度","sl-SI":" °"}}};class $P{format(t){let n="";if(!fv&&this.options.signDisplay!=null?n=G9(this.numberFormatter,this.options.signDisplay,t):n=this.numberFormatter.format(t),this.options.style==="unit"&&!vh){var r;let{unit:s,unitDisplay:i="short",locale:o}=this.resolvedOptions();if(!s)return n;let a=(r=DP[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= 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= 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!fv&&this.options.signDisplay!=null&&(t={...t,signDisplay:this.options.signDisplay}),!vh&&this.options.style==="unit"&&(t={...t,style:"unit",unit:this.options.unit,unitDisplay:this.options.unitDisplay}),t}constructor(t,n={}){this.numberFormatter=K9(t,n),this.options=n}}function K9(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes("-nu-")&&(e.includes("-u-")||(e+="-u-"),e+=`-nu-${n}`),t.style==="unit"&&!vh){var r;let{unit:o,unitDisplay:a="short"}=t;if(!o)throw new Error('unit option must be provided with style: "unit"');if(!(!((r=DP[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]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 Q9=new RegExp("^.*\\(.*\\).*$"),Y9=["latn","arab","hanidec"];class X9{parse(t){return Qm(this.locale,this.options,t).parse(t)}isValidPartialNumber(t,n,r){return Qm(this.locale,this.options,t).isValidPartialNumber(t,n,r)}getNumberingSystem(t){return Qm(this.locale,this.options,t).options.numberingSystem}constructor(t,n={}){this.locale=t,this.options=n}}const X_=new Map;function Qm(e,t,n){let r=J_(e,t);if(!e.includes("-nu-")&&!r.isValidPartialNumber(n)){for(let s of Y9)if(s!==r.options.numberingSystem){let i=J_(e+(e.includes("-u-")?"-nu-":"-u-nu-")+s,t);if(i.isValidPartialNumber(n))return i}}return r}function J_(e,t){let n=e+(t?Object.entries(t).sort((s,i)=>s[0]-1&&(n=`-${n}`)}let r=n?+n:NaN;if(isNaN(r))return NaN;if(this.options.style==="percent"){let s={...this.options,style:"decimal",minimumFractionDigits:Math.min(this.options.minimumFractionDigits+2,20),maximumFractionDigits:Math.min(this.options.maximumFractionDigits+2,20)};return new X9(this.locale,s).parse(new $P(this.locale,s).format(r))}return this.options.currencySign==="accounting"&&Q9.test(t)&&(r=-1*r),r}sanitize(t){return t=t.replace(this.symbols.literals,""),this.symbols.minusSign&&(t=t.replace("-",this.symbols.minusSign)),this.options.numberingSystem==="arab"&&(this.symbols.decimal&&(t=t.replace(",",this.symbols.decimal),t=t.replace(String.fromCharCode(1548),this.symbols.decimal)),this.symbols.group&&(t=jf(t,".",this.symbols.group))),this.options.locale==="fr-FR"&&(t=jf(t,".",String.fromCharCode(8239))),t}isValidPartialNumber(t,n=-1/0,r=1/0){return t=this.sanitize(t),this.symbols.minusSign&&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)),this.symbols.group&&t.startsWith(this.symbols.group)||this.symbols.decimal&&t.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(t=jf(t,this.symbols.group,"")),t=t.replace(this.symbols.numeral,""),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,"")),t.length===0)}constructor(t,n={}){this.locale=t,this.formatter=new Intl.NumberFormat(t,n),this.options=this.formatter.resolvedOptions(),this.symbols=eU(t,this.formatter,this.options,n);var r,s;this.options.style==="percent"&&(((r=this.options.minimumFractionDigits)!==null&&r!==void 0?r:0)>18||((s=this.options.maximumFractionDigits)!==null&&s!==void 0?s:0)>18)&&console.warn("NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.")}}const Z_=new Set(["decimal","fraction","integer","minusSign","plusSign","group"]),Z9=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function eU(e,t,n,r){var s,i,o,a;let l=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21}),c=l.formatToParts(-10000.111),f=l.formatToParts(10000.111),d=Z9.map(L=>l.formatToParts(L));var h;let p=(h=(s=c.find(L=>L.type==="minusSign"))===null||s===void 0?void 0:s.value)!==null&&h!==void 0?h:"-",g=(i=f.find(L=>L.type==="plusSign"))===null||i===void 0?void 0:i.value;!g&&((r==null?void 0:r.signDisplay)==="exceptZero"||(r==null?void 0:r.signDisplay)==="always")&&(g="+");let b=(o=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(L=>L.type==="decimal"))===null||o===void 0?void 0:o.value,y=(a=c.find(L=>L.type==="group"))===null||a===void 0?void 0:a.value,m=c.filter(L=>!Z_.has(L.type)).map(L=>eS(L.value)),v=d.flatMap(L=>L.filter(z=>!Z_.has(z.type)).map(z=>eS(z.value))),_=[...new Set([...m,...v])].sort((L,z)=>z.length-L.length),S=_.length===0?new RegExp("[\\p{White_Space}]","gu"):new RegExp(`${_.join("|")}|[\\p{White_Space}]`,"gu"),E=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),j=new Map(E.map((L,z)=>[L,z])),R=new RegExp(`[${E.join("")}]`,"g");return{minusSign:p,plusSign:g,decimal:b,group:y,literals:S,numeral:R,index:L=>String(j.get(L))}}function jf(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function eS(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function ox(e={}){const{localeCode:t}=lo();return x.useMemo(()=>new $P(t,e),[t,e])}const ms=G.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:f="border-primary",...d}=e;n=IP(n,r,s);const h=tU(i),p=(n-r)/(s-r),g=ox({style:"percent"});let w="";!o&&!w&&(w=g.format(p));const b={},y={};if(!o){const m=(n-r)/(s-r)*100;let v;m>0&&m<=50?(v=-180+m/50*180,b.transform=`rotate(${v}deg)`,y.transform="rotate(-180deg)"):m>50&&(v=-180+(m-50)/50*180,b.transform="rotate(0deg)",y.transform=`rotate(${v}deg)`)}return u.jsxs("div",{...d,"aria-valuenow":o?void 0:n,"aria-valuemin":r,"aria-valuemax":s,"aria-valuetext":o?void 0:w,role:"progressbar",ref:t,className:B("progress-circle",l,h,o&&"indeterminate",a),children:[u.jsx("div",{className:B(h,c,"rounded-full border-4")}),u.jsxs("div",{className:B("fills absolute left-0 top-0 h-full w-full",o&&"progress-circle-fills-animate"),children:[u.jsx(tS,{circleSize:h,subMaskStyle:b,isIndeterminate:o,className:"rotate-180",fillColor:f,subMaskClassName:B(o&&"progress-circle-fill-submask-1-animate")}),u.jsx(tS,{circleSize:h,subMaskStyle:y,isIndeterminate:o,fillColor:f,subMaskClassName:B(o&&"progress-circle-fill-submask-2-animate")})]})]})});function tS({subMaskStyle:e,subMaskClassName:t,className:n,circleSize:r,isIndeterminate:s,fillColor:i}){return u.jsx("div",{className:B("absolute h-full w-1/2 origin-[100%] overflow-hidden",n),children:u.jsx("div",{className:B("h-full w-full origin-[100%] rotate-180 overflow-hidden",!s&&"transition-transform duration-100",t),style:e,children:u.jsx("div",{className:B(r,i,"rounded-full border-4")})})})}function tU(e){switch(e){case"xs":return"w-20 h-20";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 nU={delay:500,minDuration:200};function LP(e,t){t=Object.assign({},nU,t);const[n,r]=x.useState("IDLE"),s=x.useRef(null);return x.useEffect(()=>{e&&n==="IDLE"&&(clearTimeout(s.current),s.current=setTimeout(()=>{if(!e)return r("IDLE");s.current=setTimeout(()=>{r("EXPIRE")},t==null?void 0:t.minDuration),r("DISPLAY")},t==null?void 0:t.delay),r("DELAY")),!e&&n!=="DISPLAY"&&(clearTimeout(s.current),r("IDLE"))},[e,n,t.delay,t.minDuration]),x.useEffect(()=>()=>clearTimeout(s.current),[]),n==="DISPLAY"||n==="EXPIRE"}function rU(){const e=WA(),t=KA(),n=e+t>0;return LP(n,{delay:450,minDuration:350})?u.jsx("div",{className:`fixed inset-0 z-[9999] grid place-items-center ${t?"pointer-events-auto bg-black/20":"pointer-events-none"}`,"aria-live":"polite","aria-busy":"true",children:u.jsxs("div",{className:"rounded-lg border border-slate-200 bg-white px-24 py-20 text-center shadow-2xl",children:[u.jsx("div",{className:"mx-auto grid h-54 w-54 place-items-center rounded-full bg-blue-50",children:u.jsx(ms,{isIndeterminate:!0,size:"lg","aria-label":"A carregar",fillColor:"border-[#084cb6]"})}),u.jsx("div",{className:"mt-12 text-sm font-bold text-slate-900",children:"A processar..."}),u.jsx("div",{className:"mt-4 text-xs text-slate-500",children:"Aguarde enquanto concluimos a acao."})]})}):null}const sU=$M(z9,wM);function iU({children:e}){return u.jsx(IA,{client:Ye,children:u.jsx(p$,{features:m$,children:u.jsx(fs.Provider,{value:sU,children:u.jsx(W9,{children:u.jsxs(H9,{children:[e,u.jsx(rU,{})]})})})})})}const MP=Object.prototype.toString;function FP(e){switch(MP.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return ls(e,Error)}}function Sl(e,t){return MP.call(e)===`[object ${t}]`}function ax(e){return Sl(e,"ErrorEvent")}function nS(e){return Sl(e,"DOMError")}function oU(e){return Sl(e,"DOMException")}function jr(e){return Sl(e,"String")}function lx(e){return typeof e=="object"&&e!==null&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function ux(e){return e===null||lx(e)||typeof e!="object"&&typeof e!="function"}function Ya(e){return Sl(e,"Object")}function Ep(e){return typeof Event<"u"&&ls(e,Event)}function aU(e){return typeof Element<"u"&&ls(e,Element)}function lU(e){return Sl(e,"RegExp")}function Cp(e){return!!(e&&e.then&&typeof e.then=="function")}function uU(e){return Ya(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e}function UP(e){return typeof e=="number"&&e!==e}function ls(e,t){try{return e instanceof t}catch{return!1}}function zP(e){return!!(typeof e=="object"&&e!==null&&(e.__isVue||e._isVue))}function na(e,t=0){return typeof e!="string"||t===0||e.length<=t?e:`${e.slice(0,t)}...`}function rS(e,t){if(!Array.isArray(e))return"";const n=[];for(let r=0;rcU(e,r,n))}function fU(e,t,n=250,r,s,i,o){if(!i.exception||!i.exception.values||!o||!ls(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=dU(dv(e,t,s,o.originalException,r,i.exception.values,a,0),n))}function dv(e,t,n,r,s,i,o,a){if(i.length>=n+1)return i;let l=[...i];if(ls(r[s],Error)){sS(o,a);const c=e(t,r[s]),f=l.length;iS(c,s,f,a),l=dv(e,t,n,r[s],s,[c,...l],c,f)}return Array.isArray(r.errors)&&r.errors.forEach((c,f)=>{if(ls(c,Error)){sS(o,a);const d=e(t,c),h=l.length;iS(d,`errors[${f}]`,h,a),l=dv(e,t,n,c,s,[d,...l],d,h)}}),l}function sS(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,...e.type==="AggregateError"&&{is_exception_group:!0},exception_id:t}}function iS(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 dU(e,t){return e.map(n=>(n.value&&(n.value=na(n.value,t)),n))}function kf(e){return e&&e.Math==Math?e:void 0}const je=typeof globalThis=="object"&&kf(globalThis)||typeof window=="object"&&kf(window)||typeof self=="object"&&kf(self)||typeof global=="object"&&kf(global)||function(){return this}()||{};function cx(){return je}function VP(e,t,n){const r=n||je,s=r.__SENTRY__=r.__SENTRY__||{};return s[e]||(s[e]=t())}const ra=cx(),hU=80;function Xa(e,t={}){if(!e)return"";try{let n=e;const r=5,s=[];let i=0,o=0;const a=" > ",l=a.length;let c;const f=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||hU;for(;n&&i++1&&o+s.length*l+c.length>=d));)s.push(c),o+=c.length,n=n.parentNode;return s.reverse().join(a)}catch{return""}}function pU(e,t){const n=e,r=[];let s,i,o,a,l;if(!n||!n.tagName)return"";if(ra.HTMLElement&&n instanceof HTMLElement&&n.dataset&&n.dataset.sentryComponent)return n.dataset.sentryComponent;r.push(n.tagName.toLowerCase());const c=t&&t.length?t.filter(d=>n.getAttribute(d)).map(d=>[d,n.getAttribute(d)]):null;if(c&&c.length)c.forEach(d=>{r.push(`[${d[0]}="${d[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&jr(s))for(i=s.split(/\s+/),l=0;l{const i=xh[s];n[s]=t[s],t[s]=i});try{return e()}finally{r.forEach(s=>{t[s]=n[s]})}}function yU(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return HP.forEach(n=>{t[n]=()=>{}}),t}const ud=yU(),vU=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function El(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 xU(e){const t=vU.exec(e);if(!t){fx(()=>{console.error(`Invalid Sentry Dsn: ${e}`)});return}const[n,r,s="",i,o="",a]=t.slice(1);let l="",c=a;const f=c.split("/");if(f.length>1&&(l=f.slice(0,-1).join("/"),c=f.pop()),c){const d=c.match(/^\d+/);d&&(c=d[0])}return qP({host:i,pass:s,path:l,projectId:c,port:o,protocol:n,publicKey:r})}function qP(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}function bU(e){return!0}function wU(e){const t=typeof e=="string"?xU(e):qP(e);if(!(!t||!bU()))return t}class Sr 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 Et(e,t,n){if(!(t in e))return;const r=e[t],s=n(r);typeof s=="function"&&WP(s,r),e[t]=s}function Xi(e,t,n){try{Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0})}catch{}}function WP(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,Xi(e,"__sentry_original__",t)}catch{}}function dx(e){return e.__sentry_original__}function _U(e){return Object.keys(e).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&")}function KP(e){if(FP(e))return{message:e.message,name:e.name,stack:e.stack,...aS(e)};if(Ep(e)){const t={type:e.type,target:oS(e.target),currentTarget:oS(e.currentTarget),...aS(e)};return typeof CustomEvent<"u"&&ls(e,CustomEvent)&&(t.detail=e.detail),t}else return e}function oS(e){try{return aU(e)?Xa(e):Object.prototype.toString.call(e)}catch{return""}}function aS(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 SU(e,t=40){const n=Object.keys(KP(e));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=t)return na(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:na(s,t)}return""}function pn(e){return hv(e,new Map)}function hv(e,t){if(EU(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]=hv(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(hv(s,t))}),r}return e}function EU(e){if(!Ya(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||t==="Object"}catch{return!0}}const GP=50,lS=/\(error: (.*)\)/,uS=/captureMessage|captureException/;function QP(...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;o1024)continue;const l=lS.test(a)?a.replace(lS,"$1"):a;if(!l.match(/\S*Error: /)){for(const c of t){const f=c(l);if(f){s.push(f);break}}if(s.length>=GP)break}}return TU(s)}}function CU(e){return Array.isArray(e)?QP(...e):e}function TU(e){if(!e.length)return[];const t=Array.from(e);return/sentryWrapped/.test(t[t.length-1].function||"")&&t.pop(),t.reverse(),uS.test(t[t.length-1].function||"")&&(t.pop(),uS.test(t[t.length-1].function||"")&&t.pop()),t.slice(0,GP).map(n=>({...n,filename:n.filename||t[t.length-1].filename,function:n.function||"?"}))}const Ym="";function Ji(e){try{return!e||typeof e!="function"?Ym:e.name||Ym}catch{return Ym}}const cd={},cS={};function fo(e,t){cd[e]=cd[e]||[],cd[e].push(t)}function ho(e,t){cS[e]||(t(),cS[e]=!0)}function tr(e,t){const n=e&&cd[e];if(n)for(const r of n)try{r(t)}catch{}}function jU(e){const t="console";fo(t,e),ho(t,kU)}function kU(){"console"in je&&HP.forEach(function(e){e in je.console&&Et(je.console,e,function(t){return xh[e]=t,function(...n){tr("console",{args:n,level:e});const s=xh[e];s&&s.apply(je.console,n)}})})}function et(){const e=je,t=e.crypto||e.msCrypto;let n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{const r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function YP(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function PU(e){const{message:t,event_id:n}=e;if(t)return t;const r=YP(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"":n||""}function pv(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 Yu(e,t){const n=YP(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 fS(e){if(e&&e.__sentry_captured__)return!0;try{Xi(e,"__sentry_captured__",!0)}catch{}return!1}function XP(e){return Array.isArray(e)?e:[e]}const jo=je,RU=1e3;let dS,mv,gv;function NU(e){const t="dom";fo(t,e),ho(t,OU)}function OU(){if(!jo.document)return;const e=tr.bind(null,"dom"),t=hS(e,!0);jo.document.addEventListener("click",t,!1),jo.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{const r=jo[n]&&jo[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Et(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__||{},f=c[i]=c[i]||{refCount:0};if(!f.handler){const d=hS(e);f.handler=d,s.call(this,i,d,a)}f.refCount++}catch{}return s.call(this,i,o,a)}}),Et(r,"removeEventListener",function(s){return function(i,o,a){if(i==="click"||i=="keypress")try{const l=this,c=l.__sentry_instrumentation_handlers__||{},f=c[i];f&&(f.refCount--,f.refCount<=0&&(s.call(this,i,f.handler,a),f.handler=void 0,delete c[i]),Object.keys(c).length===0&&delete l.__sentry_instrumentation_handlers__)}catch{}return s.call(this,i,o,a)}}))})}function AU(e){if(e.type!==mv)return!1;try{if(!e.target||e.target._sentryId!==gv)return!1}catch{}return!0}function IU(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function hS(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;const r=DU(n);if(IU(n.type,r))return;Xi(n,"_sentryCaptured",!0),r&&!r._sentryId&&Xi(r,"_sentryId",et());const s=n.type==="keypress"?"input":n.type;AU(n)||(e({event:n,name:s,global:t}),mv=n.type,gv=r?r._sentryId:void 0),clearTimeout(dS),dS=jo.setTimeout(()=>{gv=void 0,mv=void 0},RU)}}function DU(e){try{return e.target}catch{return null}}const yv=cx();function JP(){if(!("fetch"in yv))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function vv(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function $U(){if(typeof EdgeRuntime=="string")return!0;if(!JP())return!1;if(vv(yv.fetch))return!0;let e=!1;const t=yv.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=vv(n.contentWindow.fetch)),t.head.removeChild(n)}catch{}return e}function ZP(e){const t="fetch";fo(t,e),ho(t,LU)}function LU(){$U()&&Et(je,"fetch",function(e){return function(...t){const{method:n,url:r}=MU(t),s={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return tr("fetch",{...s}),e.apply(je,t).then(i=>{const o={...s,endTimestamp:Date.now(),response:i};return tr("fetch",o),i},i=>{const o={...s,endTimestamp:Date.now(),error:i};throw tr("fetch",o),i})}})}function xv(e,t){return!!e&&typeof e=="object"&&!!e[t]}function pS(e){return typeof e=="string"?e:e?xv(e,"url")?e.url:e.toString?e.toString():"":""}function MU(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){const[n,r]=e;return{url:pS(n),method:xv(r,"method")?String(r.method).toUpperCase():"GET"}}const t=e[0];return{url:pS(t),method:xv(t,"method")?String(t.method).toUpperCase():"GET"}}let Pf=null;function e4(e){const t="error";fo(t,e),ho(t,FU)}function FU(){Pf=je.onerror,je.onerror=function(e,t,n,r,s){return tr("error",{column:r,error:s,line:n,msg:e,url:t}),Pf&&!Pf.__SENTRY_LOADER__?Pf.apply(this,arguments):!1},je.onerror.__SENTRY_INSTRUMENTED__=!0}let Rf=null;function t4(e){const t="unhandledrejection";fo(t,e),ho(t,UU)}function UU(){Rf=je.onunhandledrejection,je.onunhandledrejection=function(e){return tr("unhandledrejection",e),Rf&&!Rf.__SENTRY_LOADER__?Rf.apply(this,arguments):!0},je.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}const Nf=cx();function zU(){const e=Nf.chrome,t=e&&e.app&&e.app.runtime,n="history"in Nf&&!!Nf.history.pushState&&!!Nf.history.replaceState;return!t&&n}const ql=je;let Of;function hx(e){const t="history";fo(t,e),ho(t,VU)}function VU(){if(!zU())return;const e=ql.onpopstate;ql.onpopstate=function(...n){const r=ql.location.href,s=Of;if(Of=r,tr("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=Of,o=String(s);Of=o,tr("history",{from:i,to:o})}return n.apply(this,r)}}Et(ql.history,"pushState",t),Et(ql.history,"replaceState",t)}const BU=je,Vo="__sentry_xhr_v3__";function n4(e){const t="xhr";fo(t,e),ho(t,HU)}function HU(){if(!BU.XMLHttpRequest)return;const e=XMLHttpRequest.prototype;Et(e,"open",function(t){return function(...n){const r=Date.now(),s=jr(n[0])?n[0].toUpperCase():void 0,i=qU(n[1]);if(!s||!i)return t.apply(this,n);this[Vo]={method:s,url:i,request_headers:{}},s==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const o=()=>{const a=this[Vo];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}const l={args:[s,i],endTimestamp:Date.now(),startTimestamp:r,xhr:this};tr("xhr",l)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Et(this,"onreadystatechange",function(a){return function(...l){return o(),a.apply(this,l)}}):this.addEventListener("readystatechange",o),Et(this,"setRequestHeader",function(a){return function(...l){const[c,f]=l,d=this[Vo];return d&&jr(c)&&jr(f)&&(d.request_headers[c.toLowerCase()]=f),a.apply(this,l)}}),t.apply(this,n)}}),Et(e,"send",function(t){return function(...n){const r=this[Vo];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);const s={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return tr("xhr",s),t.apply(this,n)}})}function qU(e){if(jr(e))return e;try{return e.toString()}catch{}}function WU(){return"npm"}function KU(){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;in?r4(e,t-1,n):r}function bv(e,t,n=1/0,r=1/0,s=KU()){const[i,o]=s;if(t==null||["number","boolean","string"].includes(typeof t)&&!UP(t))return t;const a=GU(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 bv("",p,l-1,r,s)}catch{}const f=Array.isArray(t)?[]:{};let d=0;const h=KP(t);for(const p in h){if(!Object.prototype.hasOwnProperty.call(h,p))continue;if(d>=r){f[p]="[MaxProperties ~]";break}const g=h[p];f[p]=bv(p,g,l-1,r,s),d++}return o(t),f}function GU(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(zP(t))return"[VueViewModel]";if(uU(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Ji(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;const n=QU(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function QU(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function YU(e){return~-encodeURI(e).split(/%..|./).length}function XU(e){return YU(JSON.stringify(e))}var Vr;(function(e){e[e.PENDING=0]="PENDING";const n=1;e[e.RESOLVED=n]="RESOLVED";const r=2;e[e.REJECTED=r]="REJECTED"})(Vr||(Vr={}));function Ja(e){return new fn(t=>{t(e)})}function px(e){return new fn((t,n)=>{n(e)})}class fn{constructor(t){fn.prototype.__init.call(this),fn.prototype.__init2.call(this),fn.prototype.__init3.call(this),fn.prototype.__init4.call(this),this._state=Vr.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new fn((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 fn((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)})})}__init(){this._resolve=t=>{this._setResult(Vr.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(Vr.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===Vr.PENDING){if(Cp(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===Vr.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===Vr.RESOLVED&&n[1](this._value),this._state===Vr.REJECTED&&n[2](this._value),n[0]=!0)})}}}function JU(e){const t=[];function n(){return e===void 0||t.lengthr(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(o){return new fn((a,l)=>{let c=t.length;if(!c)return a(!0);const f=setTimeout(()=>{o&&o>0&&a(!1)},o);t.forEach(d=>{Ja(d).then(()=>{--c||(clearTimeout(f),a(!0))},l)})})}return{$:t,add:s,drain:i}}function Li(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 ZU=["fatal","error","warning","log","info","debug"];function ez(e){return e==="warn"?"warning":ZU.includes(e)?e:"log"}const s4=1e3;function Uc(){return Date.now()/s4}function tz(){const{performance:e}=je;if(!e||!e.now)return Uc;const t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/s4}const zc=tz(),Bn=(()=>{const{performance:e}=je;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{const i=mS(s);for(const o of Object.keys(i))r[o]=i[o];return r},{});else{if(!e)return;t=mS(e)}const n=Object.entries(t).reduce((r,[s,i])=>{if(s.match(nz)){const o=s.slice(i4.length);r[o]=i}return r},{});if(Object.keys(n).length>0)return n}function o4(e){if(!e)return;const t=Object.entries(e).reduce((n,[r,s])=>(s&&(n[`${i4}${r}`]=s),n),{});return iz(t)}function mS(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(t[n]=r,t),{})}function iz(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>rz?t:o},"")}const oz=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function az(e){if(!e)return;const t=e.match(oz);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 lz(e,t){const n=az(e),r=sz(t),{traceId:s,parentSpanId:i,parentSampled:o}=n||{};return n?{traceId:s||et(),parentSpanId:i||et().substring(16),spanId:et().substring(16),sampled:o,dsc:r||{}}:{traceId:s||et(),spanId:et().substring(16)}}function mx(e=et(),t=et().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}function po(e,t=[]){return[e,t]}function uz(e,t){const[n,r]=e;return[n,[...r,t]]}function gS(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 _v(e,t){return(t||new TextEncoder).encode(e)}function cz(e,t){const[n,r]=e;let s=JSON.stringify(n);function i(o){typeof s=="string"?s=typeof o=="string"?s+o:[_v(s,t),o]:s.push(typeof o=="string"?_v(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(Ss(l))}i(c)}}return typeof s=="string"?s:fz(s)}function fz(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 dz(e,t){const n=typeof e.data=="string"?_v(e.data,t):e.data;return[pn({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}const hz={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",feedback:"feedback",span:"span",statsd:"metric_bucket"};function yS(e){return hz[e]}function a4(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}}function pz(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&&r&&{dsn:El(r)},...s&&{trace:pn({...s})}}}function mz(e,t,n){const r=[{type:"client_report"},{timestamp:n||Uc(),discarded_events:e}];return po(t?{dsn:t}:{},[r])}const gz=60*1e3;function yz(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;const r=Date.parse(`${e}`);return isNaN(r)?gz:r-t}function vz(e,t){return e[t]||e.all||0}function xz(e,t,n=Date.now()){return vz(e,t)>n}function bz(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,,,f]=a.split(":",5),d=parseInt(l,10),h=(isNaN(d)?60:d)*1e3;if(!c)s.all=r+h;else for(const p of c.split(";"))p==="metric_bucket"?(!f||f.split(";").includes("custom"))&&(s[p]=r+h):s[p]=r+h}else o?s.all=r+yz(o,r):t===429&&(s.all=r+60*1e3);return s}const Tp="production";function gx(){return VP("globalEventProcessors",()=>[])}function wz(e){gx().push(e)}function bh(e,t,n,r=0){return new fn((s,i)=>{const o=e[r];if(t===null||typeof o!="function")s(t);else{const a=o({...t},n);Cp(a)?a.then(l=>bh(e,l,n,r+1).then(s)).then(null,i):bh(e,a,n,r+1).then(s).then(null,i)}})}function l4(e){const t=zc(),n={sid:et(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>_z(n)};return e&&Zi(n,e),n}function Zi(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||zc(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:et()),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 u4(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),Zi(e,n)}function _z(e){return pn({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,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}const Sz=0,c4=1;function yx(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:s,parent_span_id:i,status:o,tags:a,origin:l}=_n(e);return pn({data:r,op:s,parent_span_id:i,span_id:t,status:o,tags:a,trace_id:n,origin:l})}function jp(e){const{traceId:t,spanId:n}=e.spanContext(),r=vx(e);return mx(t,n,r)}function kp(e){return typeof e=="number"?vS(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?vS(e.getTime()):zc()}function vS(e){return e>9999999999?e/1e3:e}function _n(e){return Ez(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function Ez(e){return typeof e.getSpanJSON=="function"}function vx(e){const{traceFlags:t}=e.spanContext();return!!(t&c4)}function Cz(e,t,n,r,s,i){const{normalizeDepth:o=3,normalizeMaxBreadth:a=1e3}=e,l={...t,event_id:t.event_id||n.event_id||et(),timestamp:t.timestamp||Uc()},c=n.integrations||e.integrations.map(b=>b.name);Tz(l,e),Pz(l,c),t.type===void 0&&jz(l,e.stackParser);const f=Nz(r,n.captureContext);n.mechanism&&Yu(l,n.mechanism);const d=s&&s.getEventProcessors?s.getEventProcessors():[],h=Hz().getScopeData();if(i){const b=i.getScopeData();_S(h,b)}if(f){const b=f.getScopeData();_S(h,b)}const p=[...n.attachments||[],...h.attachments];p.length&&(n.attachments=p),p4(l,h);const g=[...d,...gx(),...h.eventProcessors];return bh(g,l,n).then(b=>(b&&kz(b),typeof o=="number"&&o>0?Rz(b,o,a):b))}function Tz(e,t){const{environment:n,release:r,dist:s,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:Tp),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=na(e.message,i));const o=e.exception&&e.exception.values&&e.exception.values[0];o&&o.value&&(o.value=na(o.value,i));const a=e.request;a&&a.url&&(a.url=na(a.url,i))}const xS=new WeakMap;function jz(e,t){const n=je._sentryDebugIds;if(!n)return;let r;const s=xS.get(t);s?r=s:(r=new Map,xS.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 f=l.length-1;f>=0;f--){const d=l[f];if(d.filename){o[d.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 kz(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 Pz(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Rz(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(s=>({...s,...s.data&&{data:Ss(s.data,t,n)}}))},...e.user&&{user:Ss(e.user,t,n)},...e.contexts&&{contexts:Ss(e.contexts,t,n)},...e.extra&&{extra:Ss(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=Ss(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(s=>{const i=_n(s).data;return i&&(s.data=Ss(i,t,n)),s})),r}function Nz(e,t){if(!t)return e;const n=e?e.clone():new ts;return n.update(t),n}function Oz(e){if(e)return Az(e)?{captureContext:e}:Dz(e)?{captureContext:e}:e}function Az(e){return e instanceof ts||typeof e=="function"}const Iz=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function Dz(e){return Object.keys(e).some(t=>Iz.includes(t))}function $z(e,t){return qn().captureException(e,Oz(t))}function f4(e,t){return qn().captureEvent(e,t)}function eo(e,t){qn().addBreadcrumb(e,t)}function Lz(...e){const t=qn();if(e.length===2){const[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function ft(){return qn().getClient()}function Ir(){return qn().getScope()}function bS(e){const t=ft(),n=mo(),r=Ir(),{release:s,environment:i=Tp}=t&&t.getOptions()||{},{userAgent:o}=je.navigator||{},a=l4({release:s,environment:i,user:r.getUser()||n.getUser(),...o&&{userAgent:o},...e}),l=n.getSession();return l&&l.status==="ok"&&Zi(l,{status:"exited"}),d4(),n.setSession(a),r.setSession(a),a}function d4(){const e=mo(),t=Ir(),n=t.getSession()||e.getSession();n&&u4(n),h4(),e.setSession(),t.setSession()}function h4(){const e=mo(),t=Ir(),n=ft(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function wS(e=!1){if(e){d4();return}h4()}function wh(e){return e.transaction}function Pp(e,t,n){const r=t.getOptions(),{publicKey:s}=t.getDsn()||{},{segment:i}=n&&n.getUser()||{},o=pn({environment:r.environment||Tp,release:r.release,user_segment:i,public_key:s,trace_id:e});return t.emit&&t.emit("createDsc",o),o}function Za(e){const t=ft();if(!t)return{};const n=Pp(_n(e).trace_id||"",t,Ir()),r=wh(e);if(!r)return n;const s=r&&r._frozenDynamicSamplingContext;if(s)return s;const{sampleRate:i,source:o}=r.metadata;i!=null&&(n.sample_rate=`${i}`);const a=_n(r);return o&&o!=="url"&&(n.transaction=a.description),n.sampled=String(vx(r)),t.emit&&t.emit("createDsc",n),n}function p4(e,t){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:i}=t;Mz(e,t),r&&zz(e,r),Vz(e,n),Fz(e,s),Uz(e,i)}function _S(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,sdkProcessingMetadata:a,breadcrumbs:l,fingerprint:c,eventProcessors:f,attachments:d,propagationContext:h,transactionName:p,span:g}=t;Wl(e,"extra",n),Wl(e,"tags",r),Wl(e,"user",s),Wl(e,"contexts",i),Wl(e,"sdkProcessingMetadata",a),o&&(e.level=o),p&&(e.transactionName=p),g&&(e.span=g),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),c.length&&(e.fingerprint=[...e.fingerprint,...c]),f.length&&(e.eventProcessors=[...e.eventProcessors,...f]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...h}}function Wl(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(const r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function Mz(e,t){const{extra:n,tags:r,user:s,contexts:i,level:o,transactionName:a}=t,l=pn(n);l&&Object.keys(l).length&&(e.extra={...l,...e.extra});const c=pn(r);c&&Object.keys(c).length&&(e.tags={...c,...e.tags});const f=pn(s);f&&Object.keys(f).length&&(e.user={...f,...e.user});const d=pn(i);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),o&&(e.level=o),a&&(e.transaction=a)}function Fz(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function Uz(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function zz(e,t){e.contexts={trace:yx(t),...e.contexts};const n=wh(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:Za(t),...e.sdkProcessingMetadata};const r=_n(n).description;r&&(e.tags={transaction:r,...e.tags})}}function Vz(e,t){e.fingerprint=e.fingerprint?XP(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}const Bz=100;let Xm;class ts{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=SS()}static clone(t){return t?t.clone():new ts}clone(){const t=new ts;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&Zi(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._span;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;const n=typeof t=="function"?t(this):t;if(n instanceof ts){const r=n.getScopeData();this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&Object.keys(r.user).length&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint.length&&(this._fingerprint=r.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),r.propagationContext&&(this._propagationContext=r.propagationContext)}else if(Ya(n)){const r=t;this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession),r.propagationContext&&(this._propagationContext=r.propagationContext)}return 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=SS(),this}addBreadcrumb(t,n){const r=typeof n=="number"?n:Bz;if(r<=0)return this;const s={timestamp:Uc(),...t},i=this._breadcrumbs;return i.push(s),this._breadcrumbs=i.length>r?i.slice(-r):i,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.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){const{_breadcrumbs:t,_attachments:n,_contexts:r,_tags:s,_extra:i,_user:o,_level:a,_fingerprint:l,_eventProcessors:c,_propagationContext:f,_sdkProcessingMetadata:d,_transactionName:h,_span:p}=this;return{breadcrumbs:t,attachments:n,contexts:r,tags:s,extra:i,user:o,level:a,fingerprint:l||[],eventProcessors:c,propagationContext:f,sdkProcessingMetadata:d,transactionName:h,span:p}}applyToEvent(t,n={},r=[]){p4(t,this.getScopeData());const s=[...r,...gx(),...this._eventProcessors];return bh(s,t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){const r=n&&n.event_id?n.event_id:et();if(!this._client)return ud.warn("No client configured on scope - will not capture exception!"),r;const s=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureMessage(t,n,r){const s=r&&r.event_id?r.event_id:et();if(!this._client)return ud.warn("No client configured on scope - will not capture message!"),s;const i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s},this),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:et();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(ud.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}}function Hz(){return Xm||(Xm=new ts),Xm}function SS(){return{traceId:et(),spanId:et().substring(16)}}const Sv="7.120.4",m4=parseFloat(Sv),qz=100;class g4{constructor(t,n,r,s=m4){this._version=s;let i;n?i=n:(i=new ts,i.setClient(t));let o;r?o=r:(o=new ts,o.setClient(t)),this._stack=[{scope:i}],t&&this.bindClient(t),this._isolationScope=o}isOlderThan(t){return this._version(this.popScope(),s),s=>{throw this.popScope(),s}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}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:et(),s=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:s,...n,event_id:r}),r}captureMessage(t,n,r){const s=this._lastEventId=r&&r.event_id?r.event_id:et(),i=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:s}),s}captureEvent(t,n){const r=n&&n.event_id?n.event_id:et();return t.type||(this._lastEventId=r),this.getScope().captureEvent(t,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){const{scope:r,client:s}=this.getStackTop();if(!s)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:o=qz}=s.getOptions&&s.getOptions()||{};if(o<=0)return;const l={timestamp:Uc(),...t},c=i?fx(()=>i(l,n)):l;c!==null&&(s.emit&&s.emit("beforeAddBreadcrumb",c,n),r.addBreadcrumb(c,o))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){const{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){const n=ES(this);try{t(this)}finally{ES(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&&u4(r),this._sendSessionUpdate(),n.setSession()}startSession(t){const{scope:n,client:r}=this.getStackTop(),{release:s,environment:i=Tp}=r&&r.getOptions()||{},{userAgent:o}=je.navigator||{},a=l4({release:s,environment:i,user:n.getUser(),...o&&{userAgent:o},...t}),l=n.getSession&&n.getSession();return l&&l.status==="ok"&&Zi(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)}_callExtensionMethod(t,...n){const s=Vc().__SENTRY__;if(s&&s.extensions&&typeof s.extensions[t]=="function")return s.extensions[t].apply(this,n)}}function Vc(){return je.__SENTRY__=je.__SENTRY__||{extensions:{},hub:void 0},je}function ES(e){const t=Vc(),n=Ev(t);return y4(t,e),n}function qn(){const e=Vc();if(e.__SENTRY__&&e.__SENTRY__.acs){const t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return Wz(e)}function mo(){return qn().getIsolationScope()}function Wz(e=Vc()){return(!Kz(e)||Ev(e).isOlderThan(m4))&&y4(e,new g4),Ev(e)}function Kz(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Ev(e){return VP("hub",()=>new g4,e)}function y4(e,t){if(!e)return!1;const n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}function to(e){return(e||qn()).getScope().getTransaction()}let CS=!1;function Gz(){CS||(CS=!0,e4(Cv),t4(Cv))}function Cv(){const e=to();if(e){const t="internal_error";e.setStatus(t)}}Cv.tag="sentry_tracingErrorCallback";var TS;(function(e){const t="ok";e.Ok=t;const n="deadline_exceeded";e.DeadlineExceeded=n;const r="unauthenticated";e.Unauthenticated=r;const s="permission_denied";e.PermissionDenied=s;const i="not_found";e.NotFound=i;const o="resource_exhausted";e.ResourceExhausted=o;const a="invalid_argument";e.InvalidArgument=a;const l="unimplemented";e.Unimplemented=l;const c="unavailable";e.Unavailable=c;const f="internal_error";e.InternalError=f;const d="unknown_error";e.UnknownError=d;const h="cancelled";e.Cancelled=h;const p="already_exists";e.AlreadyExists=p;const g="failed_precondition";e.FailedPrecondition=g;const w="aborted";e.Aborted=w;const b="out_of_range";e.OutOfRange=b;const y="data_loss";e.DataLoss=y})(TS||(TS={}));function Qz(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 xx(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);const n=Qz(t);n!=="unknown_error"&&e.setStatus(n)}function Cl(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;const t=ft(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function v4(e){if(!Cl())return;const t=Jz(e),n=qn(),r=e.scope?e.scope.getSpan():Yz();if(e.onlyIfParent&&!r)return;const o=(e.scope||Ir()).clone();return Xz(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:o})}function Yz(){return Ir().getSpan()}function Xz(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:s}){if(!Cl())return;const i=mo();let o;if(t&&!r)o=t.startChild(n);else if(t){const a=Za(t),{traceId:l,spanId:c}=t.spanContext(),f=vx(t);o=e.startTransaction({traceId:l,parentSpanId:c,parentSampled:f,...n,metadata:{dynamicSamplingContext:a,...n.metadata}})}else{const{traceId:a,dsc:l,parentSpanId:c,sampled:f}={...i.getPropagationContext(),...s.getPropagationContext()};o=e.startTransaction({traceId:a,parentSpanId:c,parentSampled:f,...n,metadata:{dynamicSamplingContext:l,...n.metadata}})}return s.setSpan(o),Zz(o,s,i),o}function Jz(e){if(e.startTime){const t={...e};return t.startTimestamp=kp(e.startTime),delete t.startTime,t}return e}const x4="_sentryScope",b4="_sentryIsolationScope";function Zz(e,t,n){e&&(Xi(e,b4,n),Xi(e,x4,t))}function eV(e){return{scope:e[x4],isolationScope:e[b4]}}const sa="sentry.source",Bo="sentry.sample_rate",Af="sentry.op",Ho="sentry.origin",tV="profile_id";class w4{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class Rp{constructor(t={}){this._traceId=t.traceId||et(),this._spanId=t.spanId||et().substring(16),this._startTime=t.startTimestamp||zc(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[Ho]:t.origin||"manual",[Af]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp),t.exclusiveTime!==void 0&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?{...t.measurements}:{}}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[Af]}set op(t){this.setAttribute(Af,t)}get origin(){return this._attributes[Ho]}set origin(t){this.setAttribute(Ho,t)}spanContext(){const{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?c4:Sz}}startChild(t){const n=new Rp({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);const r=wh(this);return n.transaction=r,n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setAttribute(t,n){n===void 0?delete this._attributes[t]:this._attributes[t]=n}setAttributes(t){Object.keys(t).forEach(n=>this.setAttribute(n,t[n]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return xx(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){this._endTime||(wh(this),this._endTime=kp(t))}toTraceparent(){return jp(this)}toContext(){return pn({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return yx(this)}getSpanJSON(){return pn({data:this._getData(),description:this._name,op:this._attributes[Af],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[Ho],_metrics_summary:void 0,profile_id:this._attributes[tV],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){const{data:t,_attributes:n}=this,r=Object.keys(t).length>0,s=Object.keys(n).length>0;if(!(!r&&!s))return r&&s?{...t,...n}:r?t:n}}class _4 extends Rp{constructor(t,n){super(t),this._contexts={},this._hub=n||qn(),this._name=t.name||"",this._metadata={...t.metadata},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)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[sa]&&{source:this._attributes[sa]},...this._attributes[Bo]&&{sampleRate:this._attributes[Bo]}}}set metadata(t){this._metadata=t}setName(t,n="custom"){this._name=t,this.setAttribute(sa,n)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new w4(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}}end(t){const n=kp(t),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){const t=super.toContext();return pn({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return Za(this)}setHub(t){this._hub=t}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(this._name=""),super.end(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(f=>f!==this&&_n(f).timestamp):[];if(this._trimEnd&&r.length>0){const f=r.map(d=>_n(d).timestamp).filter(Boolean);this._endTime=f.reduce((d,h)=>d>h?d:h)}const{scope:s,isolationScope:i}=eV(this),{metadata:o}=this,{source:a}=o,l={contexts:{...this._contexts,trace:yx(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...o,capturedSpanScope:s,capturedSpanIsolationScope:i,...pn({dynamicSamplingContext:Za(this)})},_metrics_summary:void 0,...a&&{transaction_info:{source:a}}};return Object.keys(this._measurements).length>0&&(l.measurements=this._measurements),l}}const fd={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},nV="finishReason",So=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class rV extends w4{constructor(t,n,r,s){super(s),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=r}add(t){if(t.spanContext().spanId!==this.transactionSpanId){const n=t.end;t.end=(...r)=>(this._popActivity(t.spanContext().spanId),n.apply(t,r)),_n(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}}class sV extends _4{constructor(t,n,r=fd.idleTimeout,s=fd.finalTimeout,i=fd.heartbeatInterval,o=!1,a=!1){super(t,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=s,this._heartbeatInterval=i,this._onScope=o,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=So[4],this._autoFinishAllowed=!a,o&&n.getScope().setSpan(this),a||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=So[3],this.end())},this._finalTimeout)}end(t){const n=kp(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(nV,this._finishReason),this.spanRecorder){for(const r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;_n(r).timestamp||(r.setStatus("cancelled"),r.end(n));const{start_timestamp:s,timestamp:i}=_n(r),o=s&&s{this._finished||this._pushActivity(s)},r=s=>{this._finished||this._popActivity(s)};this.spanRecorder=new rV(n,r,this.spanContext().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=So[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=So[1],this.end(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=zc();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=So[5],this.end(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._autoFinishAllowed&&(this.setStatus("deadline_exceeded"),this._finishReason=So[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function S4(e,t,n){if(!Cl(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(Bo,Number(e.sampled)),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setAttribute(Bo,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setAttribute(Bo,Number(r))):(r=1,e.setAttribute(Bo,r)),!E4(r)||!r?(e.sampled=!1,e):(e.sampled=Math.random()1)}function iV(){const t=this.getScope().getSpan();return t?{"sentry-trace":jp(t)}:{}}function oV(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 _4(e,this);return o=S4(o,r,{name:e.name,parentSampled:e.parentSampled,transactionContext:e,attributes:{...e.data,...e.attributes},...t}),o.isRecording()&&o.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",o),o}function jS(e,t,n,r,s,i,o,a=!1){const l=e.getClient(),c=l&&l.getOptions()||{};let f=new sV(t,e,n,r,o,s,a);return f=S4(f,c,{name:t.name,parentSampled:t.parentSampled,transactionContext:t,attributes:{...t.data,...t.attributes},...i}),f.isRecording()&&f.initSpanRecorder(c._experiments&&c._experiments.maxSpans),l&&l.emit&&l.emit("startTransaction",f),f}function aV(){const e=Vc();e.__SENTRY__&&(e.__SENTRY__.extensions=e.__SENTRY__.extensions||{},e.__SENTRY__.extensions.startTransaction||(e.__SENTRY__.extensions.startTransaction=oV),e.__SENTRY__.extensions.traceHeaders||(e.__SENTRY__.extensions.traceHeaders=iV),Gz())}function lV(e,t,n){const r=to();r&&r.setMeasurement(e,t,n)}function uV(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 cV(e,t,n,r){const s=a4(n),i={sent_at:new Date().toISOString(),...s&&{sdk:s},...!!r&&t&&{dsn:El(t)}},o="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return po(i,[o])}function fV(e,t,n,r){const s=a4(n),i=e.type&&e.type!=="replay_event"?e.type:"event";uV(e,n&&n.sdk);const o=pz(e,s,r,t);return delete e.sdkProcessingMetadata,po(o,[[{type:i},e]])}const dV="7";function hV(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}function pV(e){return`${hV(e)}${e.projectId}/envelope/`}function mV(e,t){return _U({sentry_key:e.publicKey,sentry_version:dV,...t&&{sentry_client:`${t.name}/${t.version}`}})}function gV(e,t={}){const n=typeof t=="string"?t:t.tunnel,r=typeof t=="string"||!t._metadata?void 0:t._metadata.sdk;return n||`${pV(e)}?${mV(e,r)}`}const kS=[];function yV(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 vV(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=XP(n(t)):r=t;const s=yV(r),i=bV(s,o=>o.name==="Debug");if(i!==-1){const[o]=s.splice(i,1);s.push(o)}return s}function xV(e,t){const n={};return t.forEach(r=>{r&&C4(e,r,n)}),n}function PS(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)}function C4(e,t,n){if(!n[t.name]){if(n[t.name]=t,kS.indexOf(t.name)===-1&&(t.setupOnce(wz,qn),kS.push(t.name)),t.setup&&typeof t.setup=="function"&&t.setup(e),e.on&&typeof t.preprocessEvent=="function"){const r=t.preprocessEvent.bind(t);e.on("preprocessEvent",(s,i)=>r(s,i,e))}if(e.addEventProcessor&&typeof t.processEvent=="function"){const r=t.processEvent.bind(t),s=(i,o)=>r(i,o,e);s.id=t.name,e.addEventProcessor(s)}}}function bV(e,t){for(let n=0;n0?`|#${r.map(([i,o])=>`${i}:${o}`).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${s}|T${n.timestamp} `}return t}function _V(e,t,n,r){const s={sent_at:new Date().toISOString()};n&&n.sdk&&(s.sdk={name:n.sdk.name,version:n.sdk.version}),r&&t&&(s.dsn=El(t));const i=SV(e);return po(s,[i])}function SV(e){const t=wV(e);return[{type:"statsd",length:t.length},t]}class EV{constructor(t){if(this._options=t,this._integrations={},this._integrationsInitialized=!1,this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn&&(this._dsn=wU(t.dsn)),this._dsn){const n=gV(this._dsn,t);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}}captureException(t,n,r){if(fS(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=lx(t)?t:String(t),a=ux(t)?this.eventFromMessage(o,n,r):this.eventFromException(t,r);return this._process(a.then(l=>this._captureEvent(l,r,s)).then(l=>{i=l})),i}captureEvent(t,n,r){if(n&&n.originalException&&fS(n.originalException))return;let s=n&&n.event_id;const o=(t.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(t,n,o||r).then(a=>{s=a})),s}captureSession(t){typeof t.release!="string"||(this.sendSession(t),Zi(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.metricsAggregator&&this.metricsAggregator.flush(),this._isClientDoneProcessing(t).then(r=>n.flush(t).then(s=>r&&s))):Ja(!0)}close(t){return this.flush(t).then(n=>(this.getOptions().enabled=!1,this.metricsAggregator&&this.metricsAggregator.close(),n))}getEventProcessors(){return this._eventProcessors}addEventProcessor(t){this._eventProcessors.push(t)}setupIntegrations(t){(t&&!this._integrationsInitialized||this._isEnabled()&&!this._integrationsInitialized)&&this._setupIntegrations()}init(){this._isEnabled()&&this._setupIntegrations()}getIntegrationById(t){return this.getIntegrationByName(t)}getIntegrationByName(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch{return null}}addIntegration(t){const n=this._integrations[t.name];C4(this,t,this._integrations),n||PS(this,[t])}sendEvent(t,n={}){this.emit("beforeSendEvent",t,n);let r=fV(t,this._dsn,this._options._metadata,this._options.tunnel);for(const i of n.attachments||[])r=uz(r,dz(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){const n=cV(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}recordDroppedEvent(t,n,r){if(this._options.sendClientReports){const s=typeof r=="number"?r:1,i=`${t}:${n}`;this._outcomes[i]=(this._outcomes[i]||0)+s}}captureAggregateMetrics(t){const n=_V(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(n)}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))}_setupIntegrations(){const{integrations:t}=this._options;this._integrations=xV(this,t),PS(this,t),this._integrationsInitialized=!0}_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)&&(Zi(t,{...r&&{status:"crashed"},errors:t.errors||Number(s||r)}),this.captureSession(t))}_isClientDoneProcessing(t){return new fn(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._transport!==void 0}_prepareEvent(t,n,r,s=mo()){const i=this.getOptions(),o=Object.keys(this._integrations);return!n.integrations&&o.length>0&&(n.integrations=o),this.emit("preprocessEvent",t,n),Cz(i,t,n,r,this,s).then(a=>{if(a===null)return a;const l={...s.getPropagationContext(),...r?r.getPropagationContext():void 0};if(!(a.contexts&&a.contexts.trace)&&l){const{traceId:f,spanId:d,parentSpanId:h,dsc:p}=l;a.contexts={trace:{trace_id:f,span_id:d,parent_span_id:h},...a.contexts};const g=p||Pp(f,this,r);a.sdkProcessingMetadata={dynamicSamplingContext:g,...a.sdkProcessingMetadata}}return a})}_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,o=j4(t),a=T4(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),px(new Sr(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const f=l==="replay_event"?"replay":l,h=(t.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(t,n,r,h).then(p=>{if(p===null)throw this.recordDroppedEvent("event_processor",f,t),new Sr("An event processor returned `null`, will not send event.","log");if(n.data&&n.data.__sentry__===!0)return p;const w=TV(s,p,n);return CV(w,c)}).then(p=>{if(p===null){if(this.recordDroppedEvent("before_send",f,t),o){const y=1+(t.spans||[]).length;this.recordDroppedEvent("before_send","span",y)}throw new Sr(`${c} returned \`null\`, will not send event.`,"log")}const g=r&&r.getSession();if(!o&&g&&this._updateSessionFromEvent(g,p),o){const b=p.sdkProcessingMetadata&&p.sdkProcessingMetadata.spanCountBeforeProcessing||0,y=p.spans?p.spans.length:0,m=b-y;m>0&&this.recordDroppedEvent("before_send","span",m)}const w=p.transaction_info;if(o&&w&&p.transaction!==t.transaction){const b="custom";p.transaction_info={...w,source:b}}return this.sendEvent(p,n),p}).then(null,p=>{throw p instanceof Sr?p:(this.captureException(p,{data:{__sentry__:!0},originalException:p}),new Sr(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event. Reason: ${p}`))})}_process(t){this._numProcessing++,t.then(n=>(this._numProcessing--,n),n=>(this._numProcessing--,n))}_sendEnvelope(t){if(this.emit("beforeEnvelope",t),this._isEnabled()&&this._transport)return 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 CV(e,t){const n=`${t} must return \`null\` or a valid event.`;if(Cp(e))return e.then(r=>{if(!Ya(r)&&r!==null)throw new Sr(n);return r},r=>{throw new Sr(`${t} rejected with ${r}`)});if(!Ya(e)&&e!==null)throw new Sr(n);return e}function TV(e,t,n){const{beforeSend:r,beforeSendTransaction:s}=e;if(T4(t)&&r)return r(t,n);if(j4(t)&&s){if(t.spans){const i=t.spans.length;t.sdkProcessingMetadata={...t.sdkProcessingMetadata,spanCountBeforeProcessing:i}}return s(t,n)}return t}function T4(e){return e.type===void 0}function j4(e){return e.type==="transaction"}function jV(e,t){t.debug===!0&&fx(()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}),Ir().update(t.initialScope);const r=new e(t);kV(r),PV(r)}function kV(e){const n=qn().getStackTop();n.client=e,n.scope.setClient(e)}function PV(e){e.init?e.init():e.setupIntegrations&&e.setupIntegrations()}const RV=30;function k4(e,t,n=JU(e.bufferSize||RV)){let r={};const s=o=>n.drain(o);function i(o){const a=[];if(gS(o,(d,h)=>{const p=yS(h);if(xz(r,p)){const g=RS(d,h);e.recordDroppedEvent("ratelimit_backoff",p,g)}else a.push(d)}),a.length===0)return Ja();const l=po(o[0],a),c=d=>{gS(l,(h,p)=>{const g=RS(h,p);e.recordDroppedEvent(d,yS(p),g)})},f=()=>t({body:cz(l,e.textEncoder)}).then(d=>(d.statusCode!==void 0&&(d.statusCode<200||d.statusCode>=300),r=bz(r,d),d),d=>{throw c("network_error"),d});return n.add(f).then(d=>d,d=>{if(d instanceof Sr)return c("queue_overflow"),Ja();throw d})}return i.__sentry__baseTransport__=!0,{send:i,flush:s}}function RS(e,t){if(!(t!=="event"&&t!=="transaction"))return Array.isArray(e)?e[1]:void 0}function NV(e,t){const n={sent_at:new Date().toISOString()};t&&(n.dsn=El(t));const r=e.map(OV);return po(n,r)}function OV(e){return[{type:"span"},e]}function AV(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:Sv})),version:Sv}),e._metadata=s}const IV=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/],DV=[/^.*\/healthcheck$/,/^.*\/healthy$/,/^.*\/live$/,/^.*\/ready$/,/^.*\/heartbeat$/,/^.*\/health$/,/^.*\/healthz$/],$V="InboundFilters",LV=(e={})=>({name:$V,setupOnce(){},processEvent(t,n,r){const s=r.getOptions(),i=FV(e,s);return UV(t,i)?null:t}}),MV=LV;function FV(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:IV],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[],...e.disableTransactionDefaults?[]:DV],ignoreInternal:e.ignoreInternal!==void 0?e.ignoreInternal:!0}}function UV(e,t){return!!(t.ignoreInternal&&WV(e)||zV(e,t.ignoreErrors)||VV(e,t.ignoreTransactions)||BV(e,t.denyUrls)||!HV(e,t.allowUrls))}function zV(e,t){return e.type||!t||!t.length?!1:qV(e).some(n=>Fc(n,t))}function VV(e,t){if(e.type!=="transaction"||!t||!t.length)return!1;const n=e.transaction;return n?Fc(n,t):!1}function BV(e,t){if(!t||!t.length)return!1;const n=P4(e);return n?Fc(n,t):!1}function HV(e,t){if(!t||!t.length)return!0;const n=P4(e);return n?Fc(n,t):!0}function qV(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch{}return n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`)),t}function WV(e){try{return e.exception.values[0].type==="SentryError"}catch{}return!1}function KV(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&n.filename!==""&&n.filename!=="[native code]")return n.filename||null}return null}function P4(e){try{let t;try{t=e.exception.values[0].stacktrace.frames}catch{}return t?KV(t):null}catch{return null}}let NS;const GV="FunctionToString",OS=new WeakMap,QV=()=>({name:GV,setupOnce(){NS=Function.prototype.toString;try{Function.prototype.toString=function(...e){const t=dx(this),n=OS.has(ft())&&t!==void 0?t:this;return NS.apply(n,e)}}catch{}},setup(e){OS.set(e,!0)}}),YV=QV,me=je;function XV(){me.document&&me.document.addEventListener("visibilitychange",()=>{const e=to();if(me.document.hidden&&e){const t="cancelled",{op:n,status:r}=_n(e);r||e.setStatus(t),e.setTag("visibilitychange","document.hidden"),e.end()}})}const Bc=(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)))}},JV=()=>`v3-${Date.now()}-${Math.floor(Math.random()*(9e12-1))+1e12}`,ZV=()=>{const e=me.performance.timing,t=me.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},Np=()=>me.__WEB_VITALS_POLYFILL__?me.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||ZV()):me.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],bx=()=>{const e=Np();return e&&e.activationStart||0},Hc=(e,t)=>{const n=Np();let r="navigate";return n&&(me.document&&me.document.prerendering||bx()>0?r="prerender":r=n.type.replace(/_/g,"-")),{name:e,value:typeof t>"u"?-1:t,rating:"good",delta:0,entries:[],id:JV(),navigationType:r}},Tl=(e,t,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver(s=>{t(s.getEntries())});return r.observe({type:e,buffered:!0,...n}),r}}catch{}},qc=(e,t)=>{const n=r=>{(r.type==="pagehide"||me.document.visibilityState==="hidden")&&(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};me.document&&(addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0))},eB=(e,t={})=>{const n=Hc("CLS",0);let r,s=0,i=[];const o=l=>{l.forEach(c=>{if(!c.hadRecentInput){const f=i[0],d=i[i.length-1];s&&i.length!==0&&c.startTime-d.startTime<1e3&&c.startTime-f.startTime<5e3?(s+=c.value,i.push(c)):(s=c.value,i=[c]),s>n.value&&(n.value=s,n.entries=i,r&&r())}})},a=Tl("layout-shift",o);if(a){r=Bc(e,n,t.reportAllChanges);const l=()=>{o(a.takeRecords()),r(!0)};return qc(l),l}};let _h=-1;const tB=()=>{me.document&&me.document.visibilityState&&(_h=me.document.visibilityState==="hidden"&&!me.document.prerendering?0:1/0)},nB=()=>{qc(({timeStamp:e})=>{_h=e},!0)},wx=()=>(_h<0&&(tB(),nB()),{get firstHiddenTime(){return _h}}),rB=e=>{const t=wx(),n=Hc("FID");let r;const s=a=>{a.startTime{a.forEach(s)},o=Tl("first-input",i);r=Bc(e,n),o&&qc(()=>{i(o.takeRecords()),o.disconnect()},!0)};let R4=0,Jm=1/0,If=0;const sB=e=>{e.forEach(t=>{t.interactionId&&(Jm=Math.min(Jm,t.interactionId),If=Math.max(If,t.interactionId),R4=If?(If-Jm)/7+1:0)})};let Tv;const iB=()=>Tv?R4:performance.interactionCount||0,oB=()=>{"interactionCount"in performance||Tv||(Tv=Tl("event",sB,{type:"event",buffered:!0,durationThreshold:0}))},N4=()=>iB(),AS=10,Wr=[],Zm={},IS=e=>{const t=Wr[Wr.length-1],n=Zm[e.interactionId];if(n||Wr.lengtht.latency){if(n)n.entries.push(e),n.latency=Math.max(n.latency,e.duration);else{const r={id:e.interactionId,latency:e.duration,entries:[e]};Zm[r.id]=r,Wr.push(r)}Wr.sort((r,s)=>s.latency-r.latency),Wr.splice(AS).forEach(r=>{delete Zm[r.id]})}},aB=()=>{const e=Math.min(Wr.length-1,Math.floor(N4()/50));return Wr[e]},lB=(e,t)=>{t=t||{},oB();const n=Hc("INP");let r;const s=o=>{o.forEach(l=>{l.interactionId&&IS(l),l.entryType==="first-input"&&!Wr.some(f=>f.entries.some(d=>l.duration===d.duration&&l.startTime===d.startTime))&&IS(l)});const a=aB();a&&a.latency!==n.value&&(n.value=a.latency,n.entries=a.entries,r())},i=Tl("event",s,{durationThreshold:t.durationThreshold||40});r=Bc(e,n,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),qc(()=>{s(i.takeRecords()),n.value<0&&N4()>0&&(n.value=0,n.entries=[]),r(!0)}))},DS={},uB=e=>{const t=wx(),n=Hc("LCP");let r;const s=o=>{const a=o[o.length-1];if(a){const l=Math.max(a.startTime-bx(),0);l{DS[n.id]||(s(i.takeRecords()),i.disconnect(),DS[n.id]=!0,r(!0))};return["keydown","click"].forEach(a=>{me.document&&addEventListener(a,o,{once:!0,capture:!0})}),qc(o,!0),o}},jv=e=>{me.document&&(me.document.prerendering?addEventListener("prerenderingchange",()=>jv(e),!0):me.document.readyState!=="complete"?addEventListener("load",()=>jv(e),!0):setTimeout(e,0))},cB=(e,t)=>{t=t||{};const n=Hc("TTFB"),r=Bc(e,n,t.reportAllChanges);jv(()=>{const s=Np();if(s){if(n.value=Math.max(s.responseStart-bx(),0),n.value<0||n.value>performance.now())return;n.entries=[s],r(!0)}})},gu={},Sh={};let O4,A4,I4,D4,$4;function fB(e,t=!1){return Wc("cls",e,gB,O4,t)}function dB(e,t=!1){return Wc("lcp",e,vB,I4,t)}function hB(e){return Wc("ttfb",e,xB,D4)}function pB(e){return Wc("fid",e,yB,A4)}function mB(e){return Wc("inp",e,bB,$4)}function Xu(e,t){return L4(e,t),Sh[e]||(wB(e),Sh[e]=!0),M4(e,t)}function jl(e,t){const n=gu[e];if(!(!n||!n.length))for(const r of n)try{r(t)}catch{}}function gB(){return eB(e=>{jl("cls",{metric:e}),O4=e},{reportAllChanges:!0})}function yB(){return rB(e=>{jl("fid",{metric:e}),A4=e})}function vB(){return uB(e=>{jl("lcp",{metric:e}),I4=e})}function xB(){return cB(e=>{jl("ttfb",{metric:e}),D4=e})}function bB(){return lB(e=>{jl("inp",{metric:e}),$4=e})}function Wc(e,t,n,r,s=!1){L4(e,t);let i;return Sh[e]||(i=n(),Sh[e]=!0),r&&t({metric:r}),M4(e,t,s?i:void 0)}function wB(e){const t={};e==="event"&&(t.durationThreshold=0),Tl(e,n=>{jl(e,{entries:n})},t)}function L4(e,t){gu[e]=gu[e]||[],gu[e].push(t)}function M4(e,t,n){return()=>{n&&n();const r=gu[e];if(!r)return;const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}function eg(e){return typeof e=="number"&&isFinite(e)}function el(e,{startTimestamp:t,...n}){return t&&e.startTimestamp>t&&(e.startTimestamp=t),e.startChild({startTimestamp:t,...n})}const _B=2147483647;function lt(e){return e/1e3}function _x(){return me&&me.addEventListener&&me.performance}let $S=0,Ge={},mr,yu;function SB(){const e=_x();if(e&&Bn){e.mark&&me.performance.mark("sentry-tracing-init");const t=PB(),n=jB(),r=kB(),s=RB();return()=>{t(),n(),r(),s()}}return()=>{}}function EB(){Xu("longtask",({entries:e})=>{for(const t of e){const n=to();if(!n)return;const r=lt(Bn+t.startTime),s=lt(t.duration);n.startChild({description:"Main UI thread blocked",op:"ui.long-task",origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s})}})}function CB(){Xu("event",({entries:e})=>{for(const t of e){const n=to();if(!n)return;if(t.name==="click"){const r=lt(Bn+t.startTime),s=lt(t.duration),i={description:Xa(t.target),op:`ui.interaction.${t.name}`,origin:"auto.ui.browser.metrics",startTimestamp:r,endTimestamp:r+s},o=BP(t.target);o&&(i.attributes={"ui.component_name":o}),n.startChild(i)}}})}function TB(e,t){if(_x()&&Bn){const r=NB(e,t);return()=>{r()}}return()=>{}}function jB(){return fB(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ge.cls={value:e.value,unit:""},yu=t)},!0)}function kB(){return dB(({metric:e})=>{const t=e.entries[e.entries.length-1];t&&(Ge.lcp={value:e.value,unit:"millisecond"},mr=t)},!0)}function PB(){return pB(({metric:e})=>{const t=e.entries[e.entries.length-1];if(!t)return;const n=lt(Bn),r=lt(t.startTime);Ge.fid={value:e.value,unit:"millisecond"},Ge["mark.fid"]={value:n+r,unit:"second"}})}function RB(){return hB(({metric:e})=>{e.entries[e.entries.length-1]&&(Ge.ttfb={value:e.value,unit:"millisecond"})})}const LS={click:"click",pointerdown:"click",pointerup:"click",mousedown:"click",mouseup:"click",touchstart:"click",touchend:"click",mouseover:"hover",mouseout:"hover",mouseenter:"hover",mouseleave:"hover",pointerover:"hover",pointerout:"hover",pointerenter:"hover",pointerleave:"hover",dragstart:"drag",dragend:"drag",drag:"drag",dragenter:"drag",dragleave:"drag",dragover:"drag",drop:"drag",keydown:"press",keyup:"press",keypress:"press",input:"press"};function NB(e,t){return mB(({metric:n})=>{if(n.value===void 0)return;const r=n.entries.find(v=>v.duration===n.value&&LS[v.name]!==void 0),s=ft();if(!r||!s)return;const i=LS[r.name],o=s.getOptions(),a=lt(Bn+r.startTime),l=lt(n.value),c=r.interactionId!==void 0?e[r.interactionId]:void 0;if(c===void 0)return;const{routeName:f,parentContext:d,activeTransaction:h,user:p,replayId:g}=c,w=p!==void 0?p.email||p.id||p.ip_address:void 0,b=h!==void 0?h.getProfileId():void 0,y=new Rp({startTimestamp:a,endTimestamp:a+l,op:`ui.interaction.${i}`,name:Xa(r.target),attributes:{release:o.release,environment:o.environment,transaction:f,...w!==void 0&&w!==""?{user:w}:{},...b!==void 0?{profile_id:b}:{},...g!==void 0?{replay_id:g}:{}},exclusiveTime:n.value,measurements:{inp:{value:n.value,unit:"millisecond"}}}),m=UB(d,o,t);if(m&&Math.random(){});return}})}function OB(e){const t=_x();if(!t||!me.performance.getEntries||!Bn)return;const n=lt(Bn),r=t.getEntries(),{op:s,start_timestamp:i}=_n(e);if(r.slice($S).forEach(o=>{const a=lt(o.startTime),l=lt(o.duration);if(!(e.op==="navigation"&&i&&n+a{if(!Ge[a]||!i||n>=i)return;const l=Ge[a].value,c=n+lt(l),f=Math.abs((c-i)*1e3);Ge[a].value=f});const o=Ge["mark.fid"];o&&Ge.fid&&(el(e,{description:"first input delay",endTimestamp:o.value+lt(Ge.fid.value),op:"ui.action",origin:"auto.ui.browser.metrics",startTimestamp:o.value}),delete Ge["mark.fid"]),"fcp"in Ge||delete Ge.cls,Object.keys(Ge).forEach(a=>{lV(a,Ge[a].value,Ge[a].unit)}),MB(e)}mr=void 0,yu=void 0,Ge={}}function AB(e,t,n,r,s){const i=s+n,o=i+r;return el(e,{description:t.name,endTimestamp:o,op:t.entryType,origin:"auto.resource.browser.metrics",startTimestamp:i}),i}function IB(e,t,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{Df(e,t,r,n)}),Df(e,t,"secureConnection",n,"TLS/SSL","connectEnd"),Df(e,t,"fetch",n,"cache","domainLookupStart"),Df(e,t,"domainLookup",n,"DNS"),DB(e,t,n)}function Df(e,t,n,r,s,i){const o=i?t[i]:t[`${n}End`],a=t[`${n}Start`];!a||!o||el(e,{op:"browser",origin:"auto.browser.browser.metrics",description:s||n,startTimestamp:r+lt(a),endTimestamp:r+lt(o)})}function DB(e,t,n){t.responseEnd&&(el(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"request",startTimestamp:n+lt(t.requestStart),endTimestamp:n+lt(t.responseEnd)}),el(e,{op:"browser",origin:"auto.browser.browser.metrics",description:"response",startTimestamp:n+lt(t.responseStart),endTimestamp:n+lt(t.responseEnd)}))}function $B(e,t,n,r,s,i){if(t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch")return;const o=Li(n),a={};tg(a,t,"transferSize","http.response_transfer_size"),tg(a,t,"encodedBodySize","http.response_content_length"),tg(a,t,"decodedBodySize","http.decoded_response_content_length"),"renderBlockingStatus"in t&&(a["resource.render_blocking_status"]=t.renderBlockingStatus),o.protocol&&(a["url.scheme"]=o.protocol.split(":").pop()),o.host&&(a["server.address"]=o.host),a["url.same_origin"]=n.includes(me.location.origin);const l=i+r,c=l+s;el(e,{description:n.replace(me.location.origin,""),endTimestamp:c,op:t.initiatorType?`resource.${t.initiatorType}`:"resource.other",origin:"auto.resource.browser.metrics",startTimestamp:l,data:a})}function LB(e){const t=me.navigator;if(!t)return;const n=t.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),eg(n.rtt)&&(Ge["connection.rtt"]={value:n.rtt,unit:"millisecond"})),eg(t.deviceMemory)&&e.setTag("deviceMemory",`${t.deviceMemory} GB`),eg(t.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(t.hardwareConcurrency))}function MB(e){mr&&(mr.element&&e.setTag("lcp.element",Xa(mr.element)),mr.id&&e.setTag("lcp.id",mr.id),mr.url&&e.setTag("lcp.url",mr.url.trim().slice(0,200)),e.setTag("lcp.size",mr.size)),yu&&yu.sources&&yu.sources.forEach((t,n)=>e.setTag(`cls.source.${n+1}`,Xa(t.node)))}function tg(e,t,n,r){const s=t[n];s!=null&&s<_B&&(e[r]=s)}function FB(e){const t=Np();if(!t)return;const{responseStart:n,requestStart:r}=t;r<=n&&(e["ttfb.requestTime"]={value:n-r,unit:"millisecond"})}function UB(e,t,n){if(!Cl(t))return!1;let r;return e!==void 0&&typeof t.tracesSampler=="function"?r=t.tracesSampler({transactionContext:e,name:e.name,parentSampled:e.parentSampled,attributes:{...e.data,...e.attributes},location:me.location}):e!==void 0&&e.sampled!==void 0?r=e.sampled:typeof t.tracesSampleRate<"u"?r=t.tracesSampleRate:r=1,E4(r)?r===!0?n:r===!1?0:r*n:!1}function zB(e,t,n,r,s="auto.http.browser"){if(!Cl()||!e.fetchData)return;const i=t(e.fetchData.url);if(e.endTimestamp&&i){const p=e.fetchData.__span;if(!p)return;const g=r[p];g&&(HB(g,e),delete r[p]);return}const o=Ir(),a=ft(),{method:l,url:c}=e.fetchData,f=BB(c),d=f?Li(f).host:void 0,h=i?v4({name:`${l} ${c}`,onlyIfParent:!0,attributes:{url:c,type:"fetch","http.method":l,"http.url":f,"server.address":d,[Ho]:s},op:"http.client"}):void 0;if(h&&(e.fetchData.__span=h.spanContext().spanId,r[h.spanContext().spanId]=h),n(e.fetchData.url)&&a){const p=e.args[0];e.args[1]=e.args[1]||{};const g=e.args[1];g.headers=VB(p,a,o,g,h)}return h}function VB(e,t,n,r,s){const i=s||n.getSpan(),o=mo(),{traceId:a,spanId:l,sampled:c,dsc:f}={...o.getPropagationContext(),...n.getPropagationContext()},d=i?jp(i):mx(a,l,c),h=o4(f||(i?Za(i):Pp(a,t,n))),p=r.headers||(typeof Request<"u"&&ls(e,Request)?e.headers:void 0);if(p)if(typeof Headers<"u"&&ls(p,Headers)){const g=new Headers(p);return g.append("sentry-trace",d),h&&g.append(wv,h),g}else if(Array.isArray(p)){const g=[...p,["sentry-trace",d]];return h&&g.push([wv,h]),g}else{const g="baggage"in p?p.baggage:void 0,w=[];return Array.isArray(g)?w.push(...g):g&&w.push(g),h&&w.push(h),{...p,"sentry-trace":d,baggage:w.length>0?w.join(","):void 0}}else return{"sentry-trace":d,baggage:h}}function BB(e){try{return new URL(e).href}catch{return}}function HB(e,t){if(t.response){xx(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const r=parseInt(n);r>0&&e.setAttribute("http.response_content_length",r)}}else t.error&&e.setStatus("internal_error");e.end()}const kv=["localhost",/^\/(?!\/)/],Pv={traceFetch:!0,traceXHR:!0,enableHTTPTimings:!0,tracingOrigins:kv,tracePropagationTargets:kv};function qB(e){const{traceFetch:t,traceXHR:n,tracePropagationTargets:r,tracingOrigins:s,shouldCreateSpanForRequest:i,enableHTTPTimings:o}={traceFetch:Pv.traceFetch,traceXHR:Pv.traceXHR,...e},a=typeof i=="function"?i:f=>!0,l=f=>QB(f,r||s),c={};t&&ZP(f=>{const d=zB(f,a,l,c);if(d){const h=F4(f.fetchData.url),p=h?Li(h).host:void 0;d.setAttributes({"http.url":h,"server.address":p})}o&&d&&MS(d)}),n&&n4(f=>{const d=YB(f,a,l,c);o&&d&&MS(d)})}function WB(e){return e.entryType==="resource"&&"initiatorType"in e&&typeof e.nextHopProtocol=="string"&&(e.initiatorType==="fetch"||e.initiatorType==="xmlhttprequest")}function MS(e){const{url:t}=_n(e).data||{};if(!t||typeof t!="string")return;const n=Xu("resource",({entries:r})=>{r.forEach(s=>{WB(s)&&s.name.endsWith(t)&&(GB(s).forEach(o=>e.setAttribute(...o)),setTimeout(n))})})}function KB(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 hr(e=0){return((Bn||performance.timeOrigin)+e)/1e3}function GB(e){const{name:t,version:n}=KB(e.nextHopProtocol),r=[];return r.push(["network.protocol.version",n],["network.protocol.name",t]),Bn?[...r,["http.request.redirect_start",hr(e.redirectStart)],["http.request.fetch_start",hr(e.fetchStart)],["http.request.domain_lookup_start",hr(e.domainLookupStart)],["http.request.domain_lookup_end",hr(e.domainLookupEnd)],["http.request.connect_start",hr(e.connectStart)],["http.request.secure_connection_start",hr(e.secureConnectionStart)],["http.request.connection_end",hr(e.connectEnd)],["http.request.request_start",hr(e.requestStart)],["http.request.response_start",hr(e.responseStart)],["http.request.response_end",hr(e.responseEnd)]]:r}function QB(e,t){return Fc(e,t||kv)}function YB(e,t,n,r){const s=e.xhr,i=s&&s[Vo];if(!Cl()||!s||s.__sentry_own_request__||!i)return;const o=t(i.url);if(e.endTimestamp&&o){const p=s.__sentry_xhr_span_id__;if(!p)return;const g=r[p];g&&i.status_code!==void 0&&(xx(g,i.status_code),g.end(),delete r[p]);return}const a=Ir(),l=mo(),c=F4(i.url),f=c?Li(c).host:void 0,d=o?v4({name:`${i.method} ${i.url}`,onlyIfParent:!0,attributes:{type:"xhr","http.method":i.method,"http.url":c,url:i.url,"server.address":f,[Ho]:"auto.http.browser"},op:"http.client"}):void 0;d&&(s.__sentry_xhr_span_id__=d.spanContext().spanId,r[s.__sentry_xhr_span_id__]=d);const h=ft();if(s.setRequestHeader&&n(i.url)&&h){const{traceId:p,spanId:g,sampled:w,dsc:b}={...l.getPropagationContext(),...a.getPropagationContext()},y=d?jp(d):mx(p,g,w),m=o4(b||(d?Za(d):Pp(p,h,a)));XB(s,y,m)}return d}function XB(e,t,n){try{e.setRequestHeader("sentry-trace",t),n&&e.setRequestHeader(wv,n)}catch{}}function F4(e){try{return new URL(e,me.location.origin).href}catch{return}}function JB(e,t=!0,n=!0){if(!me||!me.location)return;let r=me.location.href,s;t&&(s=e({name:me.location.pathname,startTimestamp:Bn?Bn/1e3:void 0,op:"pageload",origin:"auto.pageload.browser",metadata:{source:"url"}})),n&&hx(({to:i,from:o})=>{if(o===void 0&&r&&r.indexOf(i)!==-1){r=void 0;return}o!==i&&(r=void 0,s&&s.end(),s=e({name:me.location.pathname,op:"navigation",origin:"auto.navigation.browser",metadata:{source:"url"}}))})}const ZB="BrowserTracing",eH={...fd,markBackgroundTransactions:!0,routingInstrumentation:JB,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,enableInp:!1,interactionsSampleRate:1,_experiments:{},...Pv},FS=10;class tH{constructor(t){this.name=ZB,this._hasSetTracePropagationTargets=!1,aV(),this.options={...eH,...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=SB(),this._interactionIdToRouteNameMapping={},this.options.enableInp&&TB(this._interactionIdToRouteNameMapping,this.options.interactionsSampleRate),this.options.enableLongTask&&EB(),this.options._experiments.enableInteractions&&CB(),this._latestRoute={name:void 0,context:void 0}}setupOnce(t,n){this._getCurrentHub=n;const s=n().getClient(),i=s&&s.getOptions(),{routingInstrumentation:o,startTransactionOnLocationChange:a,startTransactionOnPageLoad:l,markBackgroundTransactions:c,traceFetch:f,traceXHR:d,shouldCreateSpanForRequest:h,enableHTTPTimings:p,_experiments:g}=this.options,b=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&&XV(),g.enableInteractions&&this._registerInteractionListener(),this.options.enableInp&&this._registerInpInteractionListener(),qB({traceFetch:f,traceXHR:d,tracePropagationTargets:b,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";let l;if(a){const p=a?US("sentry-trace"):"",g=a?US("baggage"):void 0,{traceId:w,dsc:b,parentSpanId:y,sampled:m}=lz(p,g);l={traceId:w,parentSpanId:y,parentSampled:m,...t,metadata:{...t.metadata,dynamicSamplingContext:b},trimEnd:!0}}else l={trimEnd:!0,...t};const c=typeof r=="function"?r(l):l,f=c===void 0?{...l,sampled:!1}:c;f.metadata=f.name!==l.name?{...f.metadata,source:"custom"}:f.metadata,this._latestRoute.name=f.name,this._latestRoute.context=f,f.sampled;const{location:d}=me,h=jS(n,f,s,i,!0,{location:d},o,a);return a&&me.document&&(me.document.addEventListener("readystatechange",()=>{["interactive","complete"].includes(me.document.readyState)&&h.sendAutoFinishSignal()}),["interactive","complete"].includes(me.document.readyState)&&h.sendAutoFinishSignal()),h.registerBeforeFinishCallback(p=>{this._collectWebVitals(),OB(p)}),h}_registerInteractionListener(){let t;const n=()=>{const{idleTimeout:r,finalTimeout:s,heartbeatInterval:i}=this.options,o="ui.action.click",a=to();if(a&&a.op&&["navigation","pageload"].includes(a.op)||(t&&(t.setFinishReason("interactionInterrupted"),t.end(),t=void 0),!this._getCurrentHub)||!this._latestRoute.name)return;const l=this._getCurrentHub(),{location:c}=me,f={name:this._latestRoute.name,op:o,trimEnd:!0,data:{[sa]:this._latestRoute.context?nH(this._latestRoute.context):"url"}};t=jS(l,f,r,s,!0,{location:c},i)};["click"].forEach(r=>{me.document&&addEventListener(r,n,{once:!1,capture:!0})})}_registerInpInteractionListener(){const t=({entries:n})=>{const r=ft(),s=r!==void 0&&r.getIntegrationByName!==void 0?r.getIntegrationByName("Replay"):void 0,i=s!==void 0?s.getReplayId():void 0,o=to(),a=Ir(),l=a!==void 0?a.getUser():void 0;n.forEach(c=>{if(rH(c)){const f=c.interactionId;if(f===void 0)return;const d=this._interactionIdToRouteNameMapping[f],h=c.duration,p=c.startTime,g=Object.keys(this._interactionIdToRouteNameMapping),w=g.length>0?g.reduce((b,y)=>this._interactionIdToRouteNameMapping[b].durationthis._interactionIdToRouteNameMapping[y]).some(y=>y.duration===h&&y.startTime===p)||!f)return;if(d)d.duration=Math.max(d.duration,h);else if(g.lengththis._interactionIdToRouteNameMapping[w].duration){const b=this._latestRoute.name,y=this._latestRoute.context;b&&y&&(w&&Object.keys(this._interactionIdToRouteNameMapping).length>=FS&&delete this._interactionIdToRouteNameMapping[w],this._interactionIdToRouteNameMapping[f]={routeName:b,duration:h,parentContext:y,user:l,activeTransaction:o,replayId:i,startTime:p})}}})};Xu("event",t),Xu("first-input",t)}}function US(e){const t=gU(`meta[name=${e}]`);return t?t.getAttribute("content"):void 0}function nH(e){const t=e.attributes&&e.attributes[sa],n=e.data&&e.data[sa],r=e.metadata&&e.metadata.source;return t||n||r}function rH(e){return"duration"in e}const Ae=je;let Rv=0;function U4(){return Rv>0}function sH(){Rv++,setTimeout(()=>{Rv--})}function tl(e,t={},n){if(typeof e!="function")return e;try{const s=e.__sentry_wrapped__;if(s)return typeof s=="function"?s:e;if(dx(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=>tl(o,t));return e.apply(this,i)}catch(i){throw sH(),Lz(o=>{o.addEventProcessor(a=>(t.mechanism&&(pv(a,void 0,void 0),Yu(a,t.mechanism)),a.extra={...a.extra,arguments:s},a)),$z(i)}),i}};try{for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=e[s])}catch{}WP(r,e),Xi(e,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return e.name}})}catch{}return r}const iH=!1;function z4(e,t){const n=Sx(e,t),r={type:t&&t.name,value:uH(t)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function oH(e,t,n,r){const s=ft(),i=s&&s.getOptions().normalizeDepth,o={exception:{values:[{type:Ep(t)?t.constructor.name:r?"UnhandledRejection":"Error",value:dH(t,{isUnhandledRejection:r})}]},extra:{__serialized__:r4(t,i)}};if(n){const a=Sx(e,n);a.length&&(o.exception.values[0].stacktrace={frames:a})}return o}function ng(e,t){return{exception:{values:[z4(e,t)]}}}function Sx(e,t){const n=t.stacktrace||t.stack||"",r=lH(t);try{return e(n,r)}catch{}return[]}const aH=/Minified React error #\d+;/i;function lH(e){if(e){if(typeof e.framesToPop=="number")return e.framesToPop;if(aH.test(e.message))return 1}return 0}function uH(e){const t=e&&e.message;return t?t.error&&typeof t.error.message=="string"?t.error.message:t:"No error message"}function cH(e,t,n,r){const s=n&&n.syntheticException||void 0,i=Ex(e,t,s,r);return Yu(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Ja(i)}function fH(e,t,n="info",r,s){const i=r&&r.syntheticException||void 0,o=Nv(e,t,i,s);return o.level=n,r&&r.event_id&&(o.event_id=r.event_id),Ja(o)}function Ex(e,t,n,r,s){let i;if(ax(t)&&t.error)return ng(e,t.error);if(nS(t)||oU(t)){const o=t;if("stack"in t)i=ng(e,t);else{const a=o.name||(nS(o)?"DOMError":"DOMException"),l=o.message?`${a}: ${o.message}`:a;i=Nv(e,l,n,r),pv(i,l)}return"code"in o&&(i.tags={...i.tags,"DOMException.code":`${o.code}`}),i}return FP(t)?ng(e,t):Ya(t)||Ep(t)?(i=oH(e,t,n,s),Yu(i,{synthetic:!0}),i):(i=Nv(e,t,n,r),pv(i,`${t}`,void 0),Yu(i,{synthetic:!0}),i)}function Nv(e,t,n,r){const s={};if(r&&n){const i=Sx(e,n);i.length&&(s.exception={values:[{value:t,stacktrace:{frames:i}}]})}if(lx(t)){const{__sentry_template_string__:i,__sentry_template_values__:o}=t;return s.logentry={message:i,params:o},s}return s.message=t,s}function dH(e,{isUnhandledRejection:t}){const n=SU(e),r=t?"promise rejection":"exception";return ax(e)?`Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\``:Ep(e)?`Event \`${hH(e)}\` (type=${e.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function hH(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{}}function pH(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:El(r)}},i=mH(e);return po(s,[i])}function mH(e){return[{type:"user_report"},e]}class gH extends EV{constructor(t){const n=Ae.SENTRY_SDK_SOURCE||WU();AV(t,"browser",["browser"],n),super(t),t.sendClientReports&&Ae.document&&Ae.document.addEventListener("visibilitychange",()=>{Ae.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(t,n){return cH(this._options.stackParser,t,n,this._options.attachStacktrace)}eventFromMessage(t,n="info",r){return fH(this._options.stackParser,t,n,r,this._options.attachStacktrace)}captureUserFeedback(t){if(!this._isEnabled())return;const n=pH(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=mz(t,this._options.tunnel&&El(this._dsn));this._sendEnvelope(n)}}let nu;function yH(){if(nu)return nu;if(vv(Ae.fetch))return nu=Ae.fetch.bind(Ae);const e=Ae.document;let t=Ae.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 nu=t.bind(Ae)}function vH(){nu=void 0}function xH(e,t=yH()){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 vH(),n-=o,r--,px(l)}}return k4(e,s)}const bH=4;function wH(e){function t(n){return new fn((r,s)=>{const i=new XMLHttpRequest;i.onerror=s,i.onreadystatechange=()=>{i.readyState===bH&&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 k4(e,t)}const Op="?",_H=30,SH=40,EH=50;function Cx(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 CH=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,TH=/\((\S*)(?::(\d+))(?::(\d+))\)/,jH=e=>{const t=CH.exec(e);if(t){if(t[2]&&t[2].indexOf("eval")===0){const i=TH.exec(t[2]);i&&(t[2]=i[1],t[3]=i[2],t[4]=i[3])}const[r,s]=V4(t[1]||Op,t[2]);return Cx(s,r,t[3]?+t[3]:void 0,t[4]?+t[4]:void 0)}},kH=[_H,jH],PH=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,RH=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,NH=e=>{const t=PH.exec(e);if(t){if(t[3]&&t[3].indexOf(" > eval")>-1){const i=RH.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]||Op;return[s,r]=V4(s,r),Cx(r,s,t[4]?+t[4]:void 0,t[5]?+t[5]:void 0)}},OH=[EH,NH],AH=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,IH=e=>{const t=AH.exec(e);return t?Cx(t[2],t[1]||Op,+t[3],t[4]?+t[4]:void 0):void 0},DH=[SH,IH],$H=[kH,OH,DH],LH=QP(...$H),V4=(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]:Op,n?`safari-extension:${t}`:`safari-web-extension:${t}`]:[e,t]},zS=1024,MH="Breadcrumbs",FH=(e={})=>{const t={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e};return{name:MH,setupOnce(){},setup(n){t.console&&jU(BH(n)),t.dom&&NU(VH(n,t.dom)),t.xhr&&n4(HH(n)),t.fetch&&ZP(qH(n)),t.history&&hx(WH(n)),t.sentry&&n.on&&n.on("beforeSendEvent",zH(n))}}},UH=FH;function zH(e){return function(n){ft()===e&&eo({category:`sentry.${n.type==="transaction"?"transaction":"event"}`,event_id:n.event_id,level:n.level,message:PU(n)},{event:n})}}function VH(e,t){return function(r){if(ft()!==e)return;let s,i,o=typeof t=="object"?t.serializeAttribute:void 0,a=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;a&&a>zS&&(a=zS),typeof o=="string"&&(o=[o]);try{const c=r.event,f=KH(c)?c.target:c;s=Xa(f,{keyAttrs:o,maxStringLength:a}),i=BP(f)}catch{s=""}if(s.length===0)return;const l={category:`ui.${r.name}`,message:s};i&&(l.data={"ui.component_name":i}),eo(l,{event:r.event,name:r.name,global:r.global})}}function BH(e){return function(n){if(ft()!==e)return;const r={category:"console",data:{arguments:n.args,logger:"console"},level:ez(n.level),message:rS(n.args," ")};if(n.level==="assert")if(n.args[0]===!1)r.message=`Assertion failed: ${rS(n.args.slice(1)," ")||"console.assert"}`,r.data.arguments=n.args.slice(1);else return;eo(r,{input:n.args,level:n.level})}}function HH(e){return function(n){if(ft()!==e)return;const{startTimestamp:r,endTimestamp:s}=n,i=n.xhr[Vo];if(!r||!s||!i)return;const{method:o,url:a,status_code:l,body:c}=i,f={method:o,url:a,status_code:l},d={xhr:n.xhr,input:c,startTimestamp:r,endTimestamp:s};eo({category:"xhr",data:f,type:"http"},d)}}function qH(e){return function(n){if(ft()!==e)return;const{startTimestamp:r,endTimestamp:s}=n;if(s&&!(n.fetchData.url.match(/sentry_key/)&&n.fetchData.method==="POST"))if(n.error){const i=n.fetchData,o={data:n.error,input:n.args,startTimestamp:r,endTimestamp:s};eo({category:"fetch",data:i,level:"error",type:"http"},o)}else{const i=n.response,o={...n.fetchData,status_code:i&&i.status},a={input:n.args,response:i,startTimestamp:r,endTimestamp:s};eo({category:"fetch",data:o,type:"http"},a)}}}function WH(e){return function(n){if(ft()!==e)return;let r=n.from,s=n.to;const i=Li(Ae.location.href);let o=r?Li(r):void 0;const a=Li(s);(!o||!o.path)&&(o=i),i.protocol===a.protocol&&i.host===a.host&&(s=a.relative),i.protocol===o.protocol&&i.host===o.host&&(r=o.relative),eo({category:"navigation",data:{from:r,to:s}})}}function KH(e){return!!e&&!!e.target}const GH="Dedupe",QH=()=>{let e;return{name:GH,setupOnce(){},processEvent(t){if(t.type)return t;try{if(XH(t,e))return iH&&ud.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},YH=QH;function XH(e,t){return t?!!(JH(e,t)||ZH(e,t)):!1}function JH(e,t){const n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!H4(e,t)||!B4(e,t))}function ZH(e,t){const n=VS(t),r=VS(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!H4(e,t)||!B4(e,t))}function B4(e,t){let n=BS(e),r=BS(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{const t={onerror:!0,onunhandledrejection:!0,...e};return{name:eq,setupOnce(){Error.stackTraceLimit=50},setup(n){t.onerror&&rq(n),t.onunhandledrejection&&sq(n)}}},nq=tq;function rq(e){e4(t=>{const{stackParser:n,attachStacktrace:r}=W4();if(ft()!==e||U4())return;const{msg:s,url:i,line:o,column:a,error:l}=t,c=l===void 0&&jr(s)?aq(s,i,o,a):q4(Ex(n,l||s,void 0,r,!1),i,o,a);c.level="error",f4(c,{originalException:l,mechanism:{handled:!1,type:"onerror"}})})}function sq(e){t4(t=>{const{stackParser:n,attachStacktrace:r}=W4();if(ft()!==e||U4())return;const s=iq(t),i=ux(s)?oq(s):Ex(n,s,void 0,r,!0);i.level="error",f4(i,{originalException:s,mechanism:{handled:!1,type:"onunhandledrejection"}})})}function iq(e){if(ux(e))return e;const t=e;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return e}function oq(e){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(e)}`}]}}}function aq(e,t,n,r){const s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;let i=ax(e)?e.message:e,o="Error";const a=i.match(s);return a&&(o=a[1],i=a[2]),q4({exception:{values:[{type:o,value:i}]}},t,n,r)}function q4(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,f=isNaN(parseInt(n,10))?void 0:n,d=jr(t)&&t.length>0?t:mU();return l.length===0&&l.push({colno:c,filename:d,function:"?",in_app:!0,lineno:f}),e}function W4(){const e=ft();return e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1}}const lq="HttpContext",uq=()=>({name:lq,setupOnce(){},preprocessEvent(e){if(!Ae.navigator&&!Ae.location&&!Ae.document)return;const t=e.request&&e.request.url||Ae.location&&Ae.location.href,{referrer:n}=Ae.document||{},{userAgent:r}=Ae.navigator||{},s={...e.request&&e.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},i={...e.request,...t&&{url:t},headers:s};e.request=i}}),cq=uq,fq="cause",dq=5,hq="LinkedErrors",pq=(e={})=>{const t=e.limit||dq,n=e.key||fq;return{name:hq,setupOnce(){},preprocessEvent(r,s,i){const o=i.getOptions();fU(z4,o.stackParser,o.maxValueLength,n,t,r,s)}}},mq=pq,gq=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],yq="TryCatch",vq=(e={})=>{const t={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e};return{name:yq,setupOnce(){t.setTimeout&&Et(Ae,"setTimeout",HS),t.setInterval&&Et(Ae,"setInterval",HS),t.requestAnimationFrame&&Et(Ae,"requestAnimationFrame",bq),t.XMLHttpRequest&&"XMLHttpRequest"in Ae&&Et(XMLHttpRequest.prototype,"send",wq);const n=t.eventTarget;n&&(Array.isArray(n)?n:gq).forEach(_q)}}},xq=vq;function HS(e){return function(...t){const n=t[0];return t[0]=tl(n,{mechanism:{data:{function:Ji(e)},handled:!1,type:"instrument"}}),e.apply(this,t)}}function bq(e){return function(t){return e.apply(this,[tl(t,{mechanism:{data:{function:"requestAnimationFrame",handler:Ji(e)},handled:!1,type:"instrument"}})])}}function wq(e){return function(...t){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(s=>{s in n&&typeof n[s]=="function"&&Et(n,s,function(i){const o={mechanism:{data:{function:s,handler:Ji(i)},handled:!1,type:"instrument"}},a=dx(i);return a&&(o.mechanism.data.handler=Ji(a)),tl(i,o)})}),e.apply(this,t)}}function _q(e){const t=Ae,n=t[e]&&t[e].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(Et(n,"addEventListener",function(r){return function(s,i,o){try{typeof i.handleEvent=="function"&&(i.handleEvent=tl(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:Ji(i),target:e},handled:!1,type:"instrument"}}))}catch{}return r.apply(this,[s,tl(i,{mechanism:{data:{function:"addEventListener",handler:Ji(i),target:e},handled:!1,type:"instrument"}}),o])}}),Et(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 Sq=[MV(),YV(),xq(),UH(),nq(),mq(),YH(),cq()];function Eq(e){return[...Sq]}function Cq(e={}){e.defaultIntegrations===void 0&&(e.defaultIntegrations=Eq()),e.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(e.release=__SENTRY_RELEASE__),Ae.SENTRY_RELEASE&&Ae.SENTRY_RELEASE.id&&(e.release=Ae.SENTRY_RELEASE.id)),e.autoSessionTracking===void 0&&(e.autoSessionTracking=!0),e.sendClientReports===void 0&&(e.sendClientReports=!0);const t={...e,stackParser:CU(e.stackParser||LH),integrations:vV(e),transport:e.transport||(JP()?xH:wH)};jV(gH,t),e.autoSessionTracking&&Tq()}function Tq(){typeof Ae.document>"u"||(bS({ignoreDuration:!0}),wS(),hx(({from:e,to:t})=>{e!==void 0&&e!==t&&(bS({ignoreDuration:!0}),wS())}))}const qS="7.120.4";function jq(e,t,n=[t],r="npm"){const s=e._metadata||{};s.sdk||(s.sdk={name:`sentry.javascript.${t}`,packages:n.map(i=>({name:`${r}:@sentry/${i}`,version:qS})),version:qS}),e._metadata=s}function kq(e){const t={...e};jq(t,"react"),Cq(t)}const Pq=["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.","chrome-extension://","AbortError: Share canceled"];function zZ(e,t=null){const[n,r]=x.useState(()=>Eh(e,t)),s=i=>{const o=i instanceof Function?i(n):i;r(o),Tx(e,o)};return x.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 Eh(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 Tx(e,t){try{typeof window<"u"&&(window.localStorage.setItem(e,JSON.stringify(t)),window.dispatchEvent(new CustomEvent("storage",{detail:{key:e,newValue:t}})))}catch{}}function rg(e){try{typeof window<"u"&&window.localStorage.removeItem(e)}catch{}}function bt(){var f;const{data:{user:e,guest_role:t}}=Kt(),{auth:{redirectUri:n="/"}}=x.useContext(fs),r=x.useCallback(d=>{const h=(e==null?void 0:e.permissions)||(t==null?void 0:t.permissions);if(h)return h.find(p=>p.name===d)},[e==null?void 0:e.permissions,t==null?void 0:t.permissions]),s=x.useCallback((d,h)=>{const p=r(d);let g=null;if(p){const w=p.restrictions.find(b=>b.name===h);g=w?w.value:void 0}return g},[r]),i=x.useCallback(d=>{const h=(e==null?void 0:e.permissions)||(t==null?void 0:t.permissions);return(h==null?void 0:h.find(g=>g.name==="admin"))!=null||r(d)!=null},[e==null?void 0:e.permissions,t==null?void 0:t.permissions,r]),o=x.useCallback((d,h,p)=>{const g=!i(d),w=s(d,h),b=w!=null&&p>=w;return{overQuota:w!=null&&p>=w,noPermission:g,overQuotaOrNoPermission:b||g}},[s,i]),a=((f=e==null?void 0:e.subscriptions)==null?void 0:f.find(d=>d.valid))!=null,l=x.useCallback(()=>{const d=Eh("be.onboarding.selected");if(d)return`/checkout/${d.productId}/${d.priceId}`;const h=Eh("logins.selectedTemplateFlow");if(h!=null&&h.template){const p=new URLSearchParams({template:h.template});return h.plan&&p.set("plan",h.plan),h.domain&&p.set("domain",h.domain),h.domain_mode&&p.set("domain_mode",h.domain_mode),h.intent&&p.set("intent",h.intent),`/dashboard/templates?${p.toString()}`}return n},[n]),c=x.useCallback(d=>{var h;return((h=e==null?void 0:e.roles)==null?void 0:h.find(p=>p.id===d))!=null},[e]);return{user:e,hasPermission:i,getPermission:r,getRestrictionValue:s,checkOverQuotaOrNoPermission:o,isLoggedIn:!!e,isSubscribed:a,hasRole:c,getRedirectUri:l}}function WS({value:e}){return e?typeof e=="string"?u.jsx(x.Fragment,{children:e}):u.jsx(k,{...e}):null}const K4=fe(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"),Rq=fe(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"),Nq={opacity:0,y:50,scale:.3},Oq={opacity:1,y:0,scale:1},Aq={opacity:0,scale:.5};function KS(){const e=Yk(t=>t.toasts);return u.jsx("div",{className:"relative pointer-events-none",children:u.jsx(dl,{initial:!1,children:e.map(t=>u.jsx("div",{className:B("fixed mx-auto p-20 z-toast",t.position==="bottom-center"?"left-0 right-0 bottom-0":"right-0 bottom-0"),children:u.jsxs(cs.div,{initial:t.disableEnterAnimation?void 0:Nq,animate:t.disableEnterAnimation?void 0:Oq,exit:t.disableExitAnimation?void 0:Aq,className:B("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(K4,{className:"text-danger flex-shrink-0",size:"md"}),t.type==="loading"&&u.jsx(ms,{size:"sm",className:"flex-shrink-0",isIndeterminate:!0}),t.type==="positive"&&u.jsx(Rq,{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(WS,{value:t.message})}),t.action&&u.jsx(le,{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:()=>qa().remove(t.id),elementType:tt,to:t.action.action,children:u.jsx(WS,{value:t.action.label})}),t.type!=="loading"&&u.jsx(ir,{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:()=>{qa().remove(t.id)},size:"sm",children:u.jsx(Zk,{})})]})},t.id))})})}class Iq{constructor(){Ne(this,"loadedAssets",{})}loadAsset(t,n={type:"js"}){var i;const r=(i=this.loadedAssets[t])==null?void 0:i.state;return r==="loaded"&&!n.force?new Promise(o=>o()):!r||this.loadedAssets[t].doc!==n.document||n.force&&r==="loaded"?(this.loadedAssets[t]={state:new Promise(o=>{const a=ml(t)?t:`assets/${t}`,l=sg(t,n.id),c={url:a,id:l,resolve:o,parentEl:n.parentEl,document:n.document};n.type==="css"?this.loadStyleAsset(c):this.loadScriptAsset(c)}),doc:n.document},this.loadedAssets[t].state):this.loadedAssets[t].state}isLoadingOrLoaded(t){return this.loadedAssets[t]!=null}loadStyleAsset(t){var o;const n=t.document||document,r=t.parentEl||n.head,s=n.createElement("link"),i=sg(t.url,t.id);s.rel="stylesheet",s.id=i,s.href=t.url;try{r.querySelector(`#${i}`)&&((o=r.querySelector(`#${i}`))==null||o.remove())}catch{}s.onload=()=>{this.loadedAssets[t.url].state="loaded",t.resolve()},r.appendChild(s)}loadScriptAsset(t){var o;const n=t.document||document,r=t.parentEl||n.body,s=n.createElement("script"),i=sg(t.url,t.id);s.async=!0,s.id=i,s.src=t.url;try{r.querySelector(`#${i}`)&&((o=r.querySelector(`#${i}`))==null||o.remove())}catch{}s.onload=()=>{this.loadedAssets[t.url].state="loaded",t.resolve()},(r||r).appendChild(s)}}function sg(e,t){return t||btoa(e.split("/").pop())}const G4=new Iq;function Dq(e){return`be-fonts-${e}`}function $q(e,t){const n=t.document||document,r=[],s=[];let i=[];if(e.forEach(o=>{"google"in o&&o.google?r.push(o):"src"in o&&s.push(o)}),r!=null&&r.length){const o=t.weights||[400],a=e.map(c=>`${c.family}:${o.join(",")}`).join("|"),l=G4.loadAsset(`https://fonts.googleapis.com/css?family=${a}&display=swap`,{type:"css",id:Dq(t.id),force:t.forceAssetLoad,document:n});i.push(l)}if(s!=null&&s.length){const o=s.map(async a=>{const l=Array.from(n.fonts.values()).find(f=>f.family===a.family);if(l)return l.loaded;const c=new FontFace(a.family,`url(${t!=null&&t.prefixSrc?t.prefixSrc(a.src):a.src})`,a.descriptors);return n.fonts.add(c),c.load()});i=i.concat(o)}return Promise.all(i)}function Lq(){const e=Mc(),{mergeBootstrapData:t,data:n}=Kt(),r=x.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"setThemeFont":s.value?(cv("--be-font-family",s.value.family),$q([s.value],{id:"be-primary-font",forceAssetLoad:!0})):V9("--be-font-family");return;case"setThemeValue":return cv(s.name,s.value);case"setActiveTheme":const i=n.themes.all.find(o=>o.id===s.themeId);i&&OP(i);return;case"setCustomCode":return Uq(s.mode,s.value)}},[n,t,e]);return x.useEffect(()=>{const s=i=>{Mq(i)&&Fq(i)&&r(i.data)};return window.addEventListener("message",s),()=>{window.removeEventListener("message",s)}},[e,r]),null}function Mq(e){var t;return((t=e.data)==null?void 0:t.source)==="be-appearance-editor"}function Fq(e){return new URL(e.origin).hostname===window.location.hostname}function Uq(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 go(e,t){var n,r;if(typeof t=="function")r=t(e),r!==void 0&&(e=r);else if(Array.isArray(t))for(n=0;n=0&&(e=e.replace(/\[/g,t).replace(/]/g,""));var n=e.split(t),r=n.filter(Hq);if(r.length!==n.length)throw Error("Refusing to update blacklisted property "+e);return n}var GS=Object.prototype.hasOwnProperty;function we(e,t,n,r){if(!(this instanceof we))return new we(e,t,n,r);typeof t>"u"&&(t=!1),typeof n>"u"&&(n=!0),typeof r>"u"&&(r=!0),this.separator=e||".",this.override=t,this.useArray=n,this.useBrackets=r,this.keepArray=!1,this.cleanup=[]}var nl=new we(".",!1,!0,!0);function cr(e){return function(){return nl[e].apply(nl,arguments)}}we.prototype._fill=function(e,t,n,r){var s=e.shift();if(e.length>0){if(t[s]=t[s]||(this.useArray&&Vq(e[0])?[]:{}),!ru(t[s]))if(this.override)t[s]={};else{if(!(ru(n)&&hd(n)))throw new Error("Trying to redefine `"+s+"` which is a "+typeof t[s]);return}this._fill(e,t[s],n,r)}else{if(!this.override&&ru(t[s])&&!hd(t[s])){if(!(ru(n)&&hd(n)))throw new Error("Trying to redefine non-empty obj['"+s+"']");return}t[s]=go(n,r)}};we.prototype.object=function(e,t){var n=this;return Object.keys(e).forEach(function(r){var s=t===void 0?null:t[r],i=Ap(r,n.separator).join(n.separator);i.indexOf(n.separator)!==-1?(n._fill(i.split(n.separator),e,e[r],s),delete e[r]):e[r]=go(e[r],s)}),e};we.prototype.str=function(e,t,n,r){var s=Ap(e,this.separator).join(this.separator);return e.indexOf(this.separator)!==-1?this._fill(s.split(this.separator),n,t,r):n[e]=go(t,r),n};we.prototype.pick=function(e,t,n,r){var s,i,o,a,l;for(i=Ap(e,this.separator),s=0;s"u")return n;for(o=Ap(e,this.separator),s=0;s{var i;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(f=>n==null?void 0:n.roles.find(d=>d.id===f)),l=(o.permissions||[]).every(f=>r(f)),c=!o.settings||Object.entries(o.settings).every(([f,d])=>Wq.pick(f,t)==d);return o.action&&a&&l&&c})),s},[r,t,e,n])}function Ch({className:e,iconClassName:t,itemClassName:n,gap:r="gap-30",menu:s,orientation:i="horizontal",children:o,matchDescendants:a,onlyShowIcons:l,iconSize:c,unstyled:f=!1}){const d=jx(s);return d?u.jsx("div",{className:B("flex",r,i==="vertical"?"flex-col items-start":"items-center",e),"data-menu-id":d.id,children:d.items.map(h=>o?o(h):u.jsx(kx,{unstyled:f,onlyShowIcon:l,matchDescendants:a,iconClassName:t,iconSize:c,className:p=>typeof n=="function"?n({...p,item:h}):n,item:h},h.id))}):null}const kx=x.forwardRef(({item:e,className:t,matchDescendants:n,unstyled:r,onlyShowIcon:s,iconClassName:i,iconSize:o="sm",...a},l)=>{const c=u.jsx(k,{message:e.label}),f=e.icon&&lp(e.icon),d=u.jsxs(x.Fragment,{children:[f&&u.jsx(f,{size:o,className:i}),(!f||!s)&&c]}),h=!r&&"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:B(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:d}):u.jsx(w9,{end:typeof n=="function"?n(e.action):n,className:g=>B(h,t==null?void 0:t(g),p),to:e.action,target:e.target,"data-menu-item-id":e.id,ref:l,...a,children:d})});function Kq(){const{cookie_notice:e}=ve(),[,t]=ix("cookie_notice"),[n,r]=x.useState(()=>!rr().show_cookie_notice);return!(e!=null&&e.enable)||n?null:u.jsxs("div",{className:B("fixed z-50 flex w-full justify-center gap-14 bg-toast p-14 text-sm text-white shadow max-md:flex-col md:items-center md:gap-30",(e==null?void 0:e.position)=="top"?"top-0":"bottom-0"),children:[u.jsx(k,{message:`We use cookies to optimize site functionality and provide you with the best possible experience.`}),u.jsx(Gq,{}),u.jsx(le,{variant:"flat",color:"primary",size:"xs",className:"max-w-100",onClick:()=>{t("true",{days:30,path:"/"}),r(!0)},children:u.jsx(k,{message:"OK"})})]})}function Gq(){var t;const{cookie_notice:e}=ve();return(t=e==null?void 0:e.button)!=null&&t.label?u.jsx(kx,{className:()=>"text-primary-light hover:underline",item:e==null?void 0:e.button}):null}const Qq=""+new URL("404-1-176145e9.png",import.meta.url).href,Yq=""+new URL("404-2-14c4a897.png",import.meta.url).href;function Px(){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(k,{message:"Looks like you've found the doorway to the great nothing"})}),u.jsx("p",{className:"my-16 text-main",children:u.jsx(k,{message:`Sorry about that! Please visit our homepage to get where you need to go.`})}),u.jsx(le,{className:"my-8",elementType:tt,size:"lg",to:"/",variant:"flat",color:"primary",children:u.jsx(k,{message:"Take me there!"})})]})}),u.jsx("div",{className:"dark:opacity-5",children:u.jsx("img",{src:Yq,alt:""})})]})}),u.jsx("div",{className:"dark:opacity-80",children:u.jsx("img",{src:Qq,alt:""})})]})}function ia({children:e,permission:t,requireLogin:n=!0}){const{isLoggedIn:r,hasPermission:s,isSubscribed:i}=bt(),{billing:o}=ve(),a=Array.isArray(t)?t.some(l=>s(l)):t?s(t):!0;return n&&!r||!a?r?o.enable&&!i?u.jsx(si,{to:"/pricing",replace:!0}):u.jsx(Px,{}):u.jsx(si,{to:"/login",replace:!0}):e||u.jsx(jP,{})}function Q4(){var e;return{isAppearanceEditorActive:(e=window.frameElement||void 0)==null?void 0:e.src.includes("appearanceEditor=true")}}function Ts({children:e}){const{isLoggedIn:t,getRedirectUri:n}=bt(),{isAppearanceEditorActive:r}=Q4(),s=n(),{auth:i}=x.useContext(fs),{pathname:o}=ur();if(t&&!r){if(s!==o)return u.jsx(si,{to:s,replace:!0});if(i.secondaryRedirectUri)return u.jsx(si,{to:i.secondaryRedirectUri,replace:!0})}return e||u.jsx(jP,{})}var Kc=e=>e.type==="checkbox",qo=e=>e instanceof Date,Bt=e=>e==null;const Y4=e=>typeof e=="object";var ct=e=>!Bt(e)&&!Array.isArray(e)&&Y4(e)&&!qo(e),X4=e=>ct(e)&&e.target?Kc(e.target)?e.target.checked:e.target.value:e,Xq=e=>e.substring(0,e.search(/\.\d+(\.|$)/))||e,J4=(e,t)=>e.has(Xq(t)),Jq=e=>{const t=e.constructor&&e.constructor.prototype;return ct(t)&&t.hasOwnProperty("isPrototypeOf")},Rx=typeof window<"u"&&typeof window.HTMLElement<"u"&&typeof document<"u";function At(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(!(Rx&&(e instanceof Blob||e instanceof FileList))&&(n||ct(e)))if(t=n?[]:{},!n&&!Jq(e))t=e;else for(const r in e)e.hasOwnProperty(r)&&(t[r]=At(e[r]));else return e;return t}var kl=e=>Array.isArray(e)?e.filter(Boolean):[],Le=e=>e===void 0,Z=(e,t,n)=>{if(!t||!ct(e))return n;const r=kl(t.split(/[,[\].]+?/)).reduce((s,i)=>Bt(s)?s:s[i],e);return Le(r)||r===e?Le(e[t])?n:e[t]:r},An=e=>typeof e=="boolean";const Th={BLUR:"blur",FOCUS_OUT:"focusout",CHANGE:"change"},Dn={onBlur:"onBlur",onChange:"onChange",onSubmit:"onSubmit",onTouched:"onTouched",all:"all"},Mr={max:"max",min:"min",maxLength:"maxLength",minLength:"minLength",pattern:"pattern",required:"required",validate:"validate"},Z4=G.createContext(null),Ip=()=>G.useContext(Z4),Zq=e=>{const{children:t,...n}=e;return G.createElement(Z4.Provider,{value:n},t)};var eR=(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]!==Dn.all&&(t._proxyFormState[o]=!r||Dn.all),n&&(n[o]=!0),e[o]}});return s},un=e=>ct(e)&&!Object.keys(e).length,tR=(e,t,n,r)=>{n(e);const{name:s,...i}=e;return un(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(o=>t[o]===(!r||Dn.all))},mn=e=>Array.isArray(e)?e:[e],nR=(e,t,n)=>!e||!t||e===t||mn(e).some(r=>r&&(n?r===t:r.startsWith(t)||t.startsWith(r)));function Dp(e){const t=G.useRef(e);t.current=e,G.useEffect(()=>{const n=!e.disabled&&t.current.subject&&t.current.subject.subscribe({next:t.current.next});return()=>{n&&n.unsubscribe()}},[e.disabled])}function eW(e){const t=Ip(),{control:n=t.control,disabled:r,name:s,exact:i}=e||{},[o,a]=G.useState(n._formState),l=G.useRef(!0),c=G.useRef({isDirty:!1,isLoading:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1}),f=G.useRef(s);return f.current=s,Dp({disabled:r,next:d=>l.current&&nR(f.current,d.name,i)&&tR(d,c.current,n._updateFormState)&&a({...n._formState,...d}),subject:n._subjects.state}),G.useEffect(()=>(l.current=!0,c.current.isValid&&n._updateValid(!0),()=>{l.current=!1}),[n]),eR(o,n,c.current,!1)}var Er=e=>typeof e=="string",rR=(e,t,n,r,s)=>Er(e)?(r&&t.watch.add(e),Z(n,e,s)):Array.isArray(e)?e.map(i=>(r&&t.watch.add(i),Z(n,i))):(r&&(t.watchAll=!0),n);function tW(e){const t=Ip(),{control:n=t.control,name:r,defaultValue:s,disabled:i,exact:o}=e||{},a=G.useRef(r);a.current=r,Dp({disabled:i,subject:n._subjects.values,next:f=>{nR(a.current,f.name,o)&&c(At(rR(a.current,n._names,f.values||n._formValues,!1,s)))}});const[l,c]=G.useState(n._getWatch(r,s));return G.useEffect(()=>n._removeUnmounted()),l}var Nx=e=>/^\w*$/.test(e),sR=e=>kl(e.replace(/["|']|\]/g,"").split(/\.|\[/)),Oe=(e,t,n)=>{let r=-1;const s=Nx(t)?[t]:sR(t),i=s.length,o=i-1;for(;++r{const f=s._options.shouldUnregister||i,d=(h,p)=>{const g=Z(s._fields,h);g&&(g._f.mount=p)};if(d(n,!0),f){const h=At(Z(s._options.defaultValues,n));Oe(s._defaultValues,n,h),Le(Z(s._formValues,n))&&Oe(s._formValues,n,h)}return()=>{(o?f&&!s._state.action:f)?s.unregister(n):d(n,!1)}},[n,s,o,i]),G.useEffect(()=>{Z(s._fields,n)&&s._updateDisabledField({disabled:r,fields:s._fields,name:n,value:Z(s._fields,n)._f.value})},[r,n,s]),{field:{name:n,value:a,...An(r)||An(l.disabled)?{disabled:l.disabled||r}:{},onChange:G.useCallback(f=>c.current.onChange({target:{value:X4(f),name:n},type:Th.CHANGE}),[n]),onBlur:G.useCallback(()=>c.current.onBlur({target:{value:Z(s._formValues,n),name:n},type:Th.BLUR}),[n,s]),ref:f=>{const d=Z(s._fields,n);d&&f&&(d._f.ref={focus:()=>f.focus(),select:()=>f.select(),setCustomValidity:h=>f.setCustomValidity(h),reportValidity:()=>f.reportValidity()})}},formState:l,fieldState:Object.defineProperties({},{invalid:{enumerable:!0,get:()=>!!Z(l.errors,n)},isDirty:{enumerable:!0,get:()=>!!Z(l.dirtyFields,n)},isTouched:{enumerable:!0,get:()=>!!Z(l.touchedFields,n)},error:{enumerable:!0,get:()=>Z(l.errors,n)}})}}var nW=(e,t,n,r,s)=>t?{...n[e],types:{...n[e]&&n[e].types?n[e].types:{},[r]:s||!0}}:{},vs=()=>{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)})},ig=(e,t,n={})=>n.shouldFocus||Le(n.shouldFocus)?n.focusName||`${e}.${Le(n.focusIndex)?t:n.focusIndex}.`:"",Ov=e=>({isOnSubmit:!e||e===Dn.onSubmit,isOnBlur:e===Dn.onBlur,isOnChange:e===Dn.onChange,isOnAll:e===Dn.all,isOnTouch:e===Dn.onTouched}),Av=(e,t,n)=>!n&&(t.watchAll||t.watch.has(e)||[...t.watch].some(r=>e.startsWith(r)&&/^\.\w+/.test(e.slice(r.length))));const oa=(e,t,n,r)=>{for(const s of n||Object.keys(e)){const i=Z(e,s);if(i){const{_f:o,...a}=i;if(o){if(o.refs&&o.refs[0]&&t(o.refs[0],s)&&!r)break;if(o.ref&&t(o.ref,o.name)&&!r)break;oa(a,t)}else ct(a)&&oa(a,t)}}};var iR=(e,t,n)=>{const r=kl(Z(e,n));return Oe(r,"root",t[n]),Oe(e,n,r),e},Ox=e=>e.type==="file",Ms=e=>typeof e=="function",jh=e=>{if(!Rx)return!1;const t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},pd=e=>Er(e),Ax=e=>e.type==="radio",kh=e=>e instanceof RegExp;const QS={value:!1,isValid:!1},YS={value:!0,isValid:!0};var oR=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&&!Le(e[0].attributes.value)?Le(e[0].value)||e[0].value===""?YS:{value:e[0].value,isValid:!0}:YS:QS}return QS};const XS={isValid:!1,value:null};var aR=e=>Array.isArray(e)?e.reduce((t,n)=>n&&n.checked&&!n.disabled?{isValid:!0,value:n.value}:t,XS):XS;function JS(e,t,n="validate"){if(pd(e)||Array.isArray(e)&&e.every(pd)||An(e)&&!e)return{type:n,message:pd(e)?e:"",ref:t}}var Eo=e=>ct(e)&&!kh(e)?e:{value:e,message:""},Iv=async(e,t,n,r,s)=>{const{ref:i,refs:o,required:a,maxLength:l,minLength:c,min:f,max:d,pattern:h,validate:p,name:g,valueAsNumber:w,mount:b,disabled:y}=e._f,m=Z(t,g);if(!b||y)return{};const v=o?o[0]:i,_=H=>{r&&v.reportValidity&&(v.setCustomValidity(An(H)?"":H||""),v.reportValidity())},S={},E=Ax(i),j=Kc(i),R=E||j,M=(w||Ox(i))&&Le(i.value)&&Le(m)||jh(i)&&i.value===""||m===""||Array.isArray(m)&&!m.length,L=nW.bind(null,g,n,S),z=(H,Y,V,K=Mr.maxLength,P=Mr.minLength)=>{const T=H?Y:V;S[g]={type:H?K:P,message:T,ref:i,...L(H?K:P,T)}};if(s?!Array.isArray(m)||!m.length:a&&(!R&&(M||Bt(m))||An(m)&&!m||j&&!oR(o).isValid||E&&!aR(o).isValid)){const{value:H,message:Y}=pd(a)?{value:!!a,message:a}:Eo(a);if(H&&(S[g]={type:Mr.required,message:Y,ref:v,...L(Mr.required,Y)},!n))return _(Y),S}if(!M&&(!Bt(f)||!Bt(d))){let H,Y;const V=Eo(d),K=Eo(f);if(!Bt(m)&&!isNaN(m)){const P=i.valueAsNumber||m&&+m;Bt(V.value)||(H=P>V.value),Bt(K.value)||(Y=Pnew Date(new Date().toDateString()+" "+$),C=i.type=="time",D=i.type=="week";Er(V.value)&&m&&(H=C?T(m)>T(V.value):D?m>V.value:P>new Date(V.value)),Er(K.value)&&m&&(Y=C?T(m)+H.value,K=!Bt(Y.value)&&m.length<+Y.value;if((V||K)&&(z(V,H.message,Y.message),!n))return _(S[g].message),S}if(h&&!M&&Er(m)){const{value:H,message:Y}=Eo(h);if(kh(H)&&!m.match(H)&&(S[g]={type:Mr.pattern,message:Y,ref:i,...L(Mr.pattern,Y)},!n))return _(Y),S}if(p){if(Ms(p)){const H=await p(m,t),Y=JS(H,v);if(Y&&(S[g]={...Y,...L(Mr.validate,Y.message)},!n))return _(Y.message),S}else if(ct(p)){let H={};for(const Y in p){if(!un(H)&&!n)break;const V=JS(await p[Y](m,t),v,Y);V&&(H={...V,...L(Y,V.message)},_(V.message),n&&(S[g]=H))}if(!un(H)&&(S[g]={ref:v,...H},!n))return S}}return _(!0),S},og=(e,t)=>[...e,...mn(t)],ag=e=>Array.isArray(e)?e.map(()=>{}):void 0;function lg(e,t,n){return[...e.slice(0,t),...mn(n),...e.slice(t)]}var ug=(e,t,n)=>Array.isArray(e)?(Le(e[n])&&(e[n]=void 0),e.splice(n,0,e.splice(t,1)[0]),e):[],cg=(e,t)=>[...mn(t),...mn(e)];function rW(e,t){let n=0;const r=[...e];for(const s of t)r.splice(s-n,1),n++;return kl(r).length?r:[]}var fg=(e,t)=>Le(t)?[]:rW(e,mn(t).sort((n,r)=>n-r)),dg=(e,t,n)=>{[e[t],e[n]]=[e[n],e[t]]};function sW(e,t){const n=t.slice(0,-1).length;let r=0;for(;r(e[t]=n,e);function VZ(e){const t=Ip(),{control:n=t.control,name:r,keyName:s="id",shouldUnregister:i}=e,[o,a]=G.useState(n._getFieldArray(r)),l=G.useRef(n._getFieldArray(r).map(vs)),c=G.useRef(o),f=G.useRef(r),d=G.useRef(!1);f.current=r,c.current=o,n._names.array.add(r),e.rules&&n.register(r,e.rules),Dp({next:({values:S,name:E})=>{if(E===f.current||!E){const j=Z(S,f.current);Array.isArray(j)&&(a(j),l.current=j.map(vs))}},subject:n._subjects.array});const h=G.useCallback(S=>{d.current=!0,n._updateFieldArray(r,S)},[n,r]),p=(S,E)=>{const j=mn(At(S)),R=og(n._getFieldArray(r),j);n._names.focus=ig(r,R.length-1,E),l.current=og(l.current,j.map(vs)),h(R),a(R),n._updateFieldArray(r,R,og,{argA:ag(S)})},g=(S,E)=>{const j=mn(At(S)),R=cg(n._getFieldArray(r),j);n._names.focus=ig(r,0,E),l.current=cg(l.current,j.map(vs)),h(R),a(R),n._updateFieldArray(r,R,cg,{argA:ag(S)})},w=S=>{const E=fg(n._getFieldArray(r),S);l.current=fg(l.current,S),h(E),a(E),n._updateFieldArray(r,E,fg,{argA:S})},b=(S,E,j)=>{const R=mn(At(E)),M=lg(n._getFieldArray(r),S,R);n._names.focus=ig(r,S,j),l.current=lg(l.current,S,R.map(vs)),h(M),a(M),n._updateFieldArray(r,M,lg,{argA:S,argB:ag(E)})},y=(S,E)=>{const j=n._getFieldArray(r);dg(j,S,E),dg(l.current,S,E),h(j),a(j),n._updateFieldArray(r,j,dg,{argA:S,argB:E},!1)},m=(S,E)=>{const j=n._getFieldArray(r);ug(j,S,E),ug(l.current,S,E),h(j),a(j),n._updateFieldArray(r,j,ug,{argA:S,argB:E},!1)},v=(S,E)=>{const j=At(E),R=ZS(n._getFieldArray(r),S,j);l.current=[...R].map((M,L)=>!M||L===S?vs():l.current[L]),h(R),a([...R]),n._updateFieldArray(r,R,ZS,{argA:S,argB:j},!0,!1)},_=S=>{const E=mn(At(S));l.current=E.map(vs),h([...E]),a([...E]),n._updateFieldArray(r,[...E],j=>j,{},!0,!1)};return G.useEffect(()=>{if(n._state.action=!1,Av(r,n._names)&&n._subjects.state.next({...n._formState}),d.current&&(!Ov(n._options.mode).isOnSubmit||n._formState.isSubmitted))if(n._options.resolver)n._executeSchema([r]).then(S=>{const E=Z(S.errors,r),j=Z(n._formState.errors,r);(j?!E&&j.type||E&&(j.type!==E.type||j.message!==E.message):E&&E.type)&&(E?Oe(n._formState.errors,r,E):pt(n._formState.errors,r),n._subjects.state.next({errors:n._formState.errors}))});else{const S=Z(n._fields,r);S&&S._f&&Iv(S,n._formValues,n._options.criteriaMode===Dn.all,n._options.shouldUseNativeValidation,!0).then(E=>!un(E)&&n._subjects.state.next({errors:iR(n._formState.errors,E,r)}))}n._subjects.values.next({name:r,values:{...n._formValues}}),n._names.focus&&oa(n._fields,(S,E)=>{if(n._names.focus&&E.startsWith(n._names.focus)&&S.focus)return S.focus(),1}),n._names.focus="",n._updateValid(),d.current=!1},[o,r,n]),G.useEffect(()=>(!Z(n._formValues,r)&&n._updateFieldArray(r),()=>{(n._options.shouldUnregister||i)&&n.unregister(r)}),[r,n,s,i]),{swap:G.useCallback(y,[h,r,n]),move:G.useCallback(m,[h,r,n]),prepend:G.useCallback(g,[h,r,n]),append:G.useCallback(p,[h,r,n]),remove:G.useCallback(w,[h,r,n]),insert:G.useCallback(b,[h,r,n]),update:G.useCallback(v,[h,r,n]),replace:G.useCallback(_,[h,r,n]),fields:G.useMemo(()=>o.map((S,E)=>({...S,[s]:l.current[E]||vs()})),[o,s])}}var hg=()=>{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=[]}}},Ph=e=>Bt(e)||!Y4(e);function _i(e,t){if(Ph(e)||Ph(t))return e===t;if(qo(e)&&qo(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(qo(i)&&qo(o)||ct(i)&&ct(o)||Array.isArray(i)&&Array.isArray(o)?!_i(i,o):i!==o)return!1}}return!0}var lR=e=>e.type==="select-multiple",oW=e=>Ax(e)||Kc(e),pg=e=>jh(e)&&e.isConnected,uR=e=>{for(const t in e)if(Ms(e[t]))return!0;return!1};function Rh(e,t={}){const n=Array.isArray(e);if(ct(e)||n)for(const r in e)Array.isArray(e[r])||ct(e[r])&&!uR(e[r])?(t[r]=Array.isArray(e[r])?[]:{},Rh(e[r],t[r])):Bt(e[r])||(t[r]=!0);return t}function cR(e,t,n){const r=Array.isArray(e);if(ct(e)||r)for(const s in e)Array.isArray(e[s])||ct(e[s])&&!uR(e[s])?Le(t)||Ph(n[s])?n[s]=Array.isArray(e[s])?Rh(e[s],[]):{...Rh(e[s])}:cR(e[s],Bt(t)?{}:t[s],n[s]):n[s]=!_i(e[s],t[s]);return n}var mg=(e,t)=>cR(e,t,Rh(t)),fR=(e,{valueAsNumber:t,valueAsDate:n,setValueAs:r})=>Le(e)?e:t?e===""?NaN:e&&+e:n&&Er(e)?new Date(e):r?r(e):e;function gg(e){const t=e.ref;if(!(e.refs?e.refs.every(n=>n.disabled):t.disabled))return Ox(t)?t.files:Ax(t)?aR(e.refs).value:lR(t)?[...t.selectedOptions].map(({value:n})=>n):Kc(t)?oR(e.refs).value:fR(Le(t.value)?e.ref.value:t.value,e)}var aW=(e,t,n,r)=>{const s={};for(const i of e){const o=Z(t,i);o&&Oe(s,i,o._f)}return{criteriaMode:n,names:[...e],fields:s,shouldUseNativeValidation:r}},Kl=e=>Le(e)?e:kh(e)?e.source:ct(e)?kh(e.value)?e.value.source:e.value:e,lW=e=>e.mount&&(e.required||e.min||e.max||e.maxLength||e.minLength||e.pattern||e.validate);function eE(e,t,n){const r=Z(e,n);if(r||Nx(n))return{error:r,name:n};const s=n.split(".");for(;s.length;){const i=s.join("."),o=Z(t,i),a=Z(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 uW=(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,cW=(e,t)=>!kl(Z(e,t)).length&&pt(e,t);const fW={mode:Dn.onSubmit,reValidateMode:Dn.onChange,shouldFocusError:!0};function dW(e={},t){let n={...fW,...e},r={submitCount:0,isDirty:!1,isLoading:Ms(n.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},errors:n.errors||{},disabled:!1},s={},i=ct(n.defaultValues)||ct(n.values)?At(n.defaultValues||n.values)||{}:{},o=n.shouldUnregister?{}:At(i),a={action:!1,mount:!1,watch:!1},l={mount:new Set,unMount:new Set,array:new Set,watch:new Set},c,f=0;const d={isDirty:!1,dirtyFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},h={values:hg(),array:hg(),state:hg()},p=e.resetOptions&&e.resetOptions.keepDirtyValues,g=Ov(n.mode),w=Ov(n.reValidateMode),b=n.criteriaMode===Dn.all,y=N=>F=>{clearTimeout(f),f=setTimeout(N,F)},m=async N=>{if(d.isValid||N){const F=n.resolver?un((await L()).errors):await H(s,!0);F!==r.isValid&&h.state.next({isValid:F})}},v=N=>d.isValidating&&h.state.next({isValidating:N}),_=(N,F=[],U,re,ee=!0,Q=!0)=>{if(re&&U){if(a.action=!0,Q&&Array.isArray(Z(s,N))){const ce=U(Z(s,N),re.argA,re.argB);ee&&Oe(s,N,ce)}if(Q&&Array.isArray(Z(r.errors,N))){const ce=U(Z(r.errors,N),re.argA,re.argB);ee&&Oe(r.errors,N,ce),cW(r.errors,N)}if(d.touchedFields&&Q&&Array.isArray(Z(r.touchedFields,N))){const ce=U(Z(r.touchedFields,N),re.argA,re.argB);ee&&Oe(r.touchedFields,N,ce)}d.dirtyFields&&(r.dirtyFields=mg(i,o)),h.state.next({name:N,isDirty:V(N,F),dirtyFields:r.dirtyFields,errors:r.errors,isValid:r.isValid})}else Oe(o,N,F)},S=(N,F)=>{Oe(r.errors,N,F),h.state.next({errors:r.errors})},E=N=>{r.errors=N,h.state.next({errors:r.errors,isValid:!1})},j=(N,F,U,re)=>{const ee=Z(s,N);if(ee){const Q=Z(o,N,Le(U)?Z(i,N):U);Le(Q)||re&&re.defaultChecked||F?Oe(o,N,F?Q:gg(ee._f)):T(N,Q),a.mount&&m()}},R=(N,F,U,re,ee)=>{let Q=!1,ce=!1;const De={name:N},ht=!!(Z(s,N)&&Z(s,N)._f.disabled);if(!U||re){d.isDirty&&(ce=r.isDirty,r.isDirty=De.isDirty=V(),Q=ce!==De.isDirty);const fr=ht||_i(Z(i,N),F);ce=!!(!ht&&Z(r.dirtyFields,N)),fr||ht?pt(r.dirtyFields,N):Oe(r.dirtyFields,N,!0),De.dirtyFields=r.dirtyFields,Q=Q||d.dirtyFields&&ce!==!fr}if(U){const fr=Z(r.touchedFields,N);fr||(Oe(r.touchedFields,N,U),De.touchedFields=r.touchedFields,Q=Q||d.touchedFields&&fr!==U)}return Q&&ee&&h.state.next(De),Q?De:{}},M=(N,F,U,re)=>{const ee=Z(r.errors,N),Q=d.isValid&&An(F)&&r.isValid!==F;if(e.delayError&&U?(c=y(()=>S(N,U)),c(e.delayError)):(clearTimeout(f),c=null,U?Oe(r.errors,N,U):pt(r.errors,N)),(U?!_i(ee,U):ee)||!un(re)||Q){const ce={...re,...Q&&An(F)?{isValid:F}:{},errors:r.errors,name:N};r={...r,...ce},h.state.next(ce)}v(!1)},L=async N=>n.resolver(o,n.context,aW(N||l.mount,s,n.criteriaMode,n.shouldUseNativeValidation)),z=async N=>{const{errors:F}=await L(N);if(N)for(const U of N){const re=Z(F,U);re?Oe(r.errors,U,re):pt(r.errors,U)}else r.errors=F;return F},H=async(N,F,U={valid:!0})=>{for(const re in N){const ee=N[re];if(ee){const{_f:Q,...ce}=ee;if(Q){const De=l.array.has(Q.name),ht=await Iv(ee,o,b,n.shouldUseNativeValidation&&!F,De);if(ht[Q.name]&&(U.valid=!1,F))break;!F&&(Z(ht,Q.name)?De?iR(r.errors,ht,Q.name):Oe(r.errors,Q.name,ht[Q.name]):pt(r.errors,Q.name))}ce&&await H(ce,F,U)}}return U.valid},Y=()=>{for(const N of l.unMount){const F=Z(s,N);F&&(F._f.refs?F._f.refs.every(U=>!pg(U)):!pg(F._f.ref))&&ge(N)}l.unMount=new Set},V=(N,F)=>(N&&F&&Oe(o,N,F),!_i(ie(),i)),K=(N,F,U)=>rR(N,l,{...a.mount?o:Le(F)?i:Er(N)?{[N]:F}:F},U,F),P=N=>kl(Z(a.mount?o:i,N,e.shouldUnregister?Z(i,N,[]):[])),T=(N,F,U={})=>{const re=Z(s,N);let ee=F;if(re){const Q=re._f;Q&&(!Q.disabled&&Oe(o,N,fR(F,Q)),ee=jh(Q.ref)&&Bt(F)?"":F,lR(Q.ref)?[...Q.ref.options].forEach(ce=>ce.selected=ee.includes(ce.value)):Q.refs?Kc(Q.ref)?Q.refs.length>1?Q.refs.forEach(ce=>(!ce.defaultChecked||!ce.disabled)&&(ce.checked=Array.isArray(ee)?!!ee.find(De=>De===ce.value):ee===ce.value)):Q.refs[0]&&(Q.refs[0].checked=!!ee):Q.refs.forEach(ce=>ce.checked=ce.value===ee):Ox(Q.ref)?Q.ref.value="":(Q.ref.value=ee,Q.ref.type||h.values.next({name:N,values:{...o}})))}(U.shouldDirty||U.shouldTouch)&&R(N,ee,U.shouldTouch,U.shouldDirty,!0),U.shouldValidate&&q(N)},C=(N,F,U)=>{for(const re in F){const ee=F[re],Q=`${N}.${re}`,ce=Z(s,Q);(l.array.has(N)||!Ph(ee)||ce&&!ce._f)&&!qo(ee)?C(Q,ee,U):T(Q,ee,U)}},D=(N,F,U={})=>{const re=Z(s,N),ee=l.array.has(N),Q=At(F);Oe(o,N,Q),ee?(h.array.next({name:N,values:{...o}}),(d.isDirty||d.dirtyFields)&&U.shouldDirty&&h.state.next({name:N,dirtyFields:mg(i,o),isDirty:V(N,Q)})):re&&!re._f&&!Bt(Q)?C(N,Q,U):T(N,Q,U),Av(N,l)&&h.state.next({...r}),h.values.next({name:N,values:{...o}}),!a.mount&&t()},$=async N=>{const F=N.target;let U=F.name,re=!0;const ee=Z(s,U),Q=()=>F.type?gg(ee._f):X4(N),ce=De=>{re=Number.isNaN(De)||De===Z(o,U,De)};if(ee){let De,ht;const fr=Q(),xo=N.type===Th.BLUR||N.type===Th.FOCUS_OUT,MN=!lW(ee._f)&&!n.resolver&&!Z(r.errors,U)&&!ee._f.deps||uW(xo,Z(r.touchedFields,U),r.isSubmitted,w,g),Gp=Av(U,l,xo);Oe(o,U,fr),xo?(ee._f.onBlur&&ee._f.onBlur(N),c&&c(0)):ee._f.onChange&&ee._f.onChange(N);const Qp=R(U,fr,xo,!1),FN=!un(Qp)||Gp;if(!xo&&h.values.next({name:U,type:N.type,values:{...o}}),MN)return d.isValid&&m(),FN&&h.state.next({name:U,...Gp?{}:Qp});if(!xo&&Gp&&h.state.next({...r}),v(!0),n.resolver){const{errors:tb}=await L([U]);if(ce(fr),re){const UN=eE(r.errors,s,U),nb=eE(tb,s,UN.name||U);De=nb.error,U=nb.name,ht=un(tb)}}else De=(await Iv(ee,o,b,n.shouldUseNativeValidation))[U],ce(fr),re&&(De?ht=!1:d.isValid&&(ht=await H(s,!0)));re&&(ee._f.deps&&q(ee._f.deps),M(U,ht,De,Qp))}},I=(N,F)=>{if(Z(r.errors,F)&&N.focus)return N.focus(),1},q=async(N,F={})=>{let U,re;const ee=mn(N);if(v(!0),n.resolver){const Q=await z(Le(N)?N:ee);U=un(Q),re=N?!ee.some(ce=>Z(Q,ce)):U}else N?(re=(await Promise.all(ee.map(async Q=>{const ce=Z(s,Q);return await H(ce&&ce._f?{[Q]:ce}:ce)}))).every(Boolean),!(!re&&!r.isValid)&&m()):re=U=await H(s);return h.state.next({...!Er(N)||d.isValid&&U!==r.isValid?{}:{name:N},...n.resolver||!N?{isValid:U}:{},errors:r.errors,isValidating:!1}),F.shouldFocus&&!re&&oa(s,I,N?ee:l.mount),re},ie=N=>{const F={...i,...a.mount?o:{}};return Le(N)?F:Er(N)?Z(F,N):N.map(U=>Z(F,U))},te=(N,F)=>({invalid:!!Z((F||r).errors,N),isDirty:!!Z((F||r).dirtyFields,N),isTouched:!!Z((F||r).touchedFields,N),error:Z((F||r).errors,N)}),xe=N=>{N&&mn(N).forEach(F=>pt(r.errors,F)),h.state.next({errors:N?r.errors:{}})},X=(N,F,U)=>{const re=(Z(s,N,{_f:{}})._f||{}).ref;Oe(r.errors,N,{...F,ref:re}),h.state.next({name:N,errors:r.errors,isValid:!1}),U&&U.shouldFocus&&re&&re.focus&&re.focus()},ue=(N,F)=>Ms(N)?h.values.subscribe({next:U=>N(K(void 0,F),U)}):K(N,F,!0),ge=(N,F={})=>{for(const U of N?mn(N):l.mount)l.mount.delete(U),l.array.delete(U),F.keepValue||(pt(s,U),pt(o,U)),!F.keepError&&pt(r.errors,U),!F.keepDirty&&pt(r.dirtyFields,U),!F.keepTouched&&pt(r.touchedFields,U),!n.shouldUnregister&&!F.keepDefaultValue&&pt(i,U);h.values.next({values:{...o}}),h.state.next({...r,...F.keepDirty?{isDirty:V()}:{}}),!F.keepIsValid&&m()},it=({disabled:N,name:F,field:U,fields:re,value:ee})=>{if(An(N)){const Q=N?void 0:Le(ee)?gg(U?U._f:Z(re,F)._f):ee;Oe(o,F,Q),R(F,Q,!1,!1,!0)}},dt=(N,F={})=>{let U=Z(s,N);const re=An(F.disabled);return Oe(s,N,{...U||{},_f:{...U&&U._f?U._f:{ref:{name:N}},name:N,mount:!0,...F}}),l.mount.add(N),U?it({field:U,disabled:F.disabled,name:N,value:F.value}):j(N,!0,F.value),{...re?{disabled:F.disabled}:{},...n.progressive?{required:!!F.required,min:Kl(F.min),max:Kl(F.max),minLength:Kl(F.minLength),maxLength:Kl(F.maxLength),pattern:Kl(F.pattern)}:{},name:N,onChange:$,onBlur:$,ref:ee=>{if(ee){dt(N,F),U=Z(s,N);const Q=Le(ee.value)&&ee.querySelectorAll&&ee.querySelectorAll("input,select,textarea")[0]||ee,ce=oW(Q),De=U._f.refs||[];if(ce?De.find(ht=>ht===Q):Q===U._f.ref)return;Oe(s,N,{_f:{...U._f,...ce?{refs:[...De.filter(pg),Q,...Array.isArray(Z(i,N))?[{}]:[]],ref:{type:Q.type,name:N}}:{ref:Q}}}),j(N,!1,void 0,Q)}else U=Z(s,N,{}),U._f&&(U._f.mount=!1),(n.shouldUnregister||F.shouldUnregister)&&!(J4(l.array,N)&&a.action)&&l.unMount.add(N)}}},Ce=()=>n.shouldFocusError&&oa(s,I,l.mount),Xe=N=>{An(N)&&(h.state.next({disabled:N}),oa(s,(F,U)=>{let re=N;const ee=Z(s,U);ee&&An(ee._f.disabled)&&(re||(re=ee._f.disabled)),F.disabled=re},0,!1))},Ut=(N,F)=>async U=>{U&&(U.preventDefault&&U.preventDefault(),U.persist&&U.persist());let re=At(o);if(h.state.next({isSubmitting:!0}),n.resolver){const{errors:ee,values:Q}=await L();r.errors=ee,re=Q}else await H(s);pt(r.errors,"root"),un(r.errors)?(h.state.next({errors:{}}),await N(re,U)):(F&&await F({...r.errors},U),Ce(),setTimeout(Ce)),h.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:un(r.errors),submitCount:r.submitCount+1,errors:r.errors})},Ie=(N,F={})=>{Z(s,N)&&(Le(F.defaultValue)?D(N,Z(i,N)):(D(N,F.defaultValue),Oe(i,N,F.defaultValue)),F.keepTouched||pt(r.touchedFields,N),F.keepDirty||(pt(r.dirtyFields,N),r.isDirty=F.defaultValue?V(N,Z(i,N)):V()),F.keepError||(pt(r.errors,N),d.isValid&&m()),h.state.next({...r}))},Se=(N,F={})=>{const U=N?At(N):i,re=At(U),ee=N&&!un(N)?re:i;if(F.keepDefaultValues||(i=U),!F.keepValues){if(F.keepDirtyValues||p)for(const Q of l.mount)Z(r.dirtyFields,Q)?Oe(ee,Q,Z(o,Q)):D(Q,Z(ee,Q));else{if(Rx&&Le(N))for(const Q of l.mount){const ce=Z(s,Q);if(ce&&ce._f){const De=Array.isArray(ce._f.refs)?ce._f.refs[0]:ce._f.ref;if(jh(De)){const ht=De.closest("form");if(ht){ht.reset();break}}}}s={}}o=e.shouldUnregister?F.keepDefaultValues?At(i):{}:At(ee),h.array.next({values:{...ee}}),h.values.next({values:{...ee}})}l={mount:new Set,unMount:new Set,array:new Set,watch:new Set,watchAll:!1,focus:""},!a.mount&&t(),a.mount=!d.isValid||!!F.keepIsValid,a.watch=!!e.shouldUnregister,h.state.next({submitCount:F.keepSubmitCount?r.submitCount:0,isDirty:F.keepDirty?r.isDirty:!!(F.keepDefaultValues&&!_i(N,i)),isSubmitted:F.keepIsSubmitted?r.isSubmitted:!1,dirtyFields:F.keepDirtyValues?r.dirtyFields:F.keepDefaultValues&&N?mg(i,N):{},touchedFields:F.keepTouched?r.touchedFields:{},errors:F.keepErrors?r.errors:{},isSubmitSuccessful:F.keepIsSubmitSuccessful?r.isSubmitSuccessful:!1,isSubmitting:!1})},de=(N,F)=>Se(Ms(N)?N(o):N,F);return{control:{register:dt,unregister:ge,getFieldState:te,handleSubmit:Ut,setError:X,_executeSchema:L,_getWatch:K,_getDirty:V,_updateValid:m,_removeUnmounted:Y,_updateFieldArray:_,_updateDisabledField:it,_getFieldArray:P,_reset:Se,_resetDefaultValues:()=>Ms(n.defaultValues)&&n.defaultValues().then(N=>{de(N,n.resetOptions),h.state.next({isLoading:!1})}),_updateFormState:N=>{r={...r,...N}},_disableForm:Xe,_subjects:h,_proxyFormState:d,_setErrors:E,get _fields(){return s},get _formValues(){return o},get _state(){return a},set _state(N){a=N},get _defaultValues(){return i},get _names(){return l},set _names(N){l=N},get _formState(){return r},set _formState(N){r=N},get _options(){return n},set _options(N){n={...n,...N}}},trigger:q,register:dt,handleSubmit:Ut,watch:ue,setValue:D,getValues:ie,reset:de,resetField:Ie,clearErrors:xe,unregister:ge,setError:X,setFocus:(N,F={})=>{const U=Z(s,N),re=U&&U._f;if(re){const ee=re.refs?re.refs[0]:re.ref;ee.focus&&(ee.focus(),F.shouldSelect&&ee.select())}},getFieldState:te}}function rn(e={}){const t=G.useRef(),n=G.useRef(),[r,s]=G.useState({isDirty:!1,isValidating:!1,isLoading:Ms(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},errors:e.errors||{},disabled:!1,defaultValues:Ms(e.defaultValues)?void 0:e.defaultValues});t.current||(t.current={...dW(e,()=>s(o=>({...o}))),formState:r});const i=t.current.control;return i._options=e,Dp({subject:i._subjects.state,next:o=>{tR(o,i._proxyFormState,i._updateFormState,!0)&&s({...i._formState})}}),G.useEffect(()=>i._disableForm(e.disabled),[i,e.disabled]),G.useEffect(()=>{if(i._proxyFormState.isDirty){const o=i._getDirty();o!==r.isDirty&&i._subjects.state.next({isDirty:o})}},[i,r.isDirty]),G.useEffect(()=>{e.values&&!_i(e.values,n.current)?(i._reset(e.values,i._options.resetOptions),n.current=e.values,s(o=>({...o}))):i._resetDefaultValues()},[e.values,i]),G.useEffect(()=>{e.errors&&i._setErrors(e.errors)},[e.errors,i]),G.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=eR(r,i),t.current}function Rl(e={}){const{size:t="md",startAppend:n,endAppend:r,className:s,labelPosition:i,labelDisplay:o="block",inputClassName:a,inputWrapperClassName:l,unstyled:c,invalid:f,disabled:d,background:h="bg-transparent",flexibleHeight:p,inputShadow:g="shadow-sm",descriptionPosition:w="bottom",inputRing:b,inputFontSize:y,labelSuffix:m}={...e};if(c)return{label:"",input:a||"",wrapper:s||"",inputWrapper:l||"",adornment:"",append:{size:"",radius:""},size:{font:"",height:""},description:"",error:""};const v=gW({size:e.size,flexibleHeight:p});y&&(v.font=y);const _=n||r,E=b||`focus:ring ${f?"focus:ring-danger/focus focus:border-danger/60":"focus:ring-primary/focus focus:border-primary/60"}`,j=mW(e);return{label:B(o,"first-letter:capitalize text-left whitespace-nowrap",d&&"text-disabled",v.font,m?"":i==="side"?"mr-16":"mb-4"),input:B("block text-left relative w-full appearance-none transition-shadow text",h,j.input,hW(e),!d&&`${E} focus:outline-none ${g}`,d&&"text-disabled cursor-not-allowed",a,v.font,v.height,pW(e)),adornment:yW(t),append:{size:k1(t),radius:j.append},wrapper:B(s,v.font,{"flex items-center":i==="side"}),inputWrapper:B("isolate relative",l,_&&"flex items-stretch"),size:v,description:`text-muted ${w==="bottom"?"pt-10":"pb-10"} text-xs`,error:"text-danger pt-10 text-xs"}}function hW({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 pW({startAdornment:e,endAdornment:t,inputRadius:n}){return n==="rounded-full"?B(e?"pl-54":"pl-28",t?"pr-54":"pr-28"):B(e?"pl-46":"pl-12",t?"pr-46":"pr-12")}function mW(e){const{startAppend:t,endAppend:n,inputRadius:r}=e,s=t||n;return r==="rounded-full"?{input:B(!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:B(!s&&"rounded-input",t&&"rounded-r-input rounded-l-none",n&&"rounded-l-input rounded-r-none"),append:t?"rounded-l-input":"rounded-r-input"}}function gW({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 yW(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 tE({children:e,direction:t,className:n,position:r=t==="start"?"left-0":"right-0"}){return e?u.jsx("div",{className:B("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 dR(e,t){const n=(t==null?void 0:t.copy)??!0,r=n?{...e}:e;return Object.keys(r).forEach(s=>{const i=s;t!=null&&t.arrays&&Array.isArray(r[i])&&r[i].length===0?delete r[i]:t!=null&&t.deep&&r[i]&&typeof r[i]=="object"?(r[i]=dR(r[i],t),Object.keys(r[i]).length===0&&delete r[i]):(r[i]==null||r[i]==="")&&delete r[i]}),n?r:e}const Ix=G.forwardRef((e,t)=>{const{children:n,description:r,errorMessage:s,descriptionProps:i={},errorMessageProps:o={},startAdornment:a,endAdornment:l,adornmentPosition:c,startAppend:f,endAppend:d,fieldClassNames:h,disabled:p,wrapperProps:g}=e;return u.jsxs("div",{className:h.wrapper,ref:t,...g,children:[u.jsx(vW,{...e}),u.jsxs("div",{className:h.inputWrapper,children:[u.jsx(tE,{direction:"start",className:h.adornment,position:c,children:a}),f&&u.jsx(nE,{style:h.append,disabled:p,children:f}),n,d&&u.jsx(nE,{style:h.append,disabled:p,children:d}),u.jsx(tE,{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 vW({labelElementType:e,fieldClassNames:t,labelProps:n,label:r,labelSuffix:s,labelSuffixPosition:i="spaced",required:o}){if(!r)return null;const a=e||"label",l=u.jsxs(a,{className:t.label,...n,children:[r,o&&u.jsx("span",{className:"text-danger",children:" *"})]});return s?u.jsxs("div",{className:B("mb-4 flex w-full gap-4",i==="spaced"?"items-end":"items-center"),children:[l,u.jsx("div",{className:B("text-xs text-muted",i==="spaced"?"ml-auto":""),children:s})]}):l}function nE({children:e,style:t,disabled:n}){return G.cloneElement(e,{...e.props,disabled:e.props.disabled||n,...dR(t)})}function $p({autoFocus:e,autoSelectText:t},n){const r=x.useRef(e);x.useEffect(()=>{r.current&&n.current&&requestAnimationFrame(()=>{var s,i;(s=n.current)==null||s.focus(),t&&((i=n.current)==null?void 0:i.nodeName.toLowerCase())==="input"&&n.current.select()}),r.current=!1},[n,t])}function hR(e){const{focusRef:t,labelElementType:n="label",label:r,labelSuffix:s,labelSuffixPosition:i,autoFocus:o,autoSelectText:a,labelPosition:l,descriptionPosition:c,size:f,errorMessage:d,description:h,flexibleHeight:p,startAdornment:g,endAdornment:w,startAppend:b,adornmentPosition:y,endAppend:m,className:v,inputClassName:_,inputWrapperClassName:S,unstyled:E,background:j,invalid:R,disabled:M,id:L,inputRadius:z,inputBorder:H,inputShadow:Y,inputRing:V,inputFontSize:K,...P}=e;$p(e,t);const T=x.useId(),C=L||T,D=`${C}-label`,$=`${C}-description`,I=`${C}-error`,q={id:D,htmlFor:n==="label"?C:void 0},ie={id:$},te={id:I},X={"aria-label":!e.label&&!e["aria-label"]&&e.placeholder?e.placeholder:e["aria-label"],"aria-invalid":R||void 0,id:C,disabled:M,...P},ue=[];r&&ue.push(q.id),X["aria-labelledby"]&&ue.push(X["aria-labelledby"]),X["aria-labelledby"]=ue.length?ue.join(" "):void 0;const ge=[];return h&&ge.push(ie.id),d&&ge.push(te.id),X["aria-describedby"]&&ge.push(X["aria-describedby"]),X["aria-describedby"]=ge.length?ge.join(" "):void 0,{fieldProps:{errorMessageProps:te,descriptionProps:ie,labelProps:q,disabled:M,label:r,labelSuffix:s,labelSuffixPosition:i,autoFocus:o,autoSelectText:a,labelPosition:l,descriptionPosition:c,size:f,errorMessage:d,description:h,flexibleHeight:p,startAdornment:g,endAdornment:w,startAppend:b,adornmentPosition:y,endAppend:m,className:v,inputClassName:_,inputWrapperClassName:S,unstyled:E,background:j,invalid:R},inputProps:X}}const Gc=x.forwardRef(({inputElementType:e="input",flexibleHeight:t,inputRef:n,inputTestId:r,...s},i)=>{const o=gl(n),{fieldProps:a,inputProps:l}=hR({...s,focusRef:o}),c=e==="textarea",f=c?"textarea":"input",d=Rl({...s,flexibleHeight:t||e==="textarea"});return e==="textarea"&&!s.unstyled&&(d.input=`${d.input} py-12`),u.jsx(Ix,{ref:i,fieldClassNames:d,...a,children:u.jsx(f,{"data-testid":r,ref:o,...l,rows:c?l.rows||4:void 0,className:d.input})})}),Ee=G.forwardRef(({name:e,...t},n)=>{const{field:{onChange:r,onBlur:s,value:i="",ref:o},fieldState:{invalid:a,error:l}}=Pl({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(Gc,{ref:n,...ds(c,t)})});function sn({children:e,onBeforeSubmit:t,onSubmit:n,form:r,className:s,id:i,onBlur:o}){return u.jsx(Zq,{...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 ii="text-link hover:underline hover:text-primary-dark focus-visible:ring focus-visible:ring-2 focus-visible:ring-offset-2 outline-none rounded transition-colors";function BZ({children:e,className:t,target:n="_blank",...r}){return u.jsx("a",{className:ii,target:n,...r,children:e})}function Cn(e,t){if(t&&Or.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})})}):xt(e)}}function xW(e){const t=Hn(),{getRedirectUri:n}=bt(),{setBootstrapData:r}=Kt();return Pe({mutationFn:bW,onSuccess:s=>{r(s.bootstrapData),s.status==="needs_email_verification"?t("/"):t(n(),{replace:!0})},onError:s=>Cn(s,e)})}function bW(e){return ae.post("auth/register",e).then(t=>t.data)}function wW(e){const t=Hn(),{getRedirectUri:n}=bt(),{setBootstrapData:r}=Kt();return Pe({mutationFn:_W,onSuccess:s=>{r(s.bootstrapData),t(n(),{replace:!0})},onError:s=>Cn(s,e)})}function _W(e){return ae.post("secure/auth/social/connect",e).then(t=>t.data)}function Lp(e){const{children:t,startAction:n,className:r,dividerTop:s,padding:i,size:o}=e;return u.jsxs("div",{className:B(r,s&&"border-t",SW(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 SW({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 EW(){return Pe({mutationFn:CW,onError:e=>xt(e)})}function CW(e){return ae.post(`secure/auth/social/${e.service}/disconnect`,e).then(t=>t.data)}function pR(){const{trans:e}=lr(),{setBootstrapData:t}=Kt(),n=EW(),[r,s]=x.useState(!1),i=x.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 ke.danger(c),o;default:return o}},[e,t]);return{requestingPassword:r,setIsRequestingPassword:s,loginWithSocial:async o=>{const a=await iE(`secure/auth/social/${o}/login`);return i(a)},connectSocial:async o=>{const a=o.includes("/")?o:`secure/auth/social/${o}/connect`,l=await iE(a);return i(l)},disconnectSocial:n}}const rE=550,sE=650;let yg;function iE(e){const t=window.screen.width/2-sE/2,n=window.screen.height/2-rE/2;return new Promise(r=>{yg=window.open(e,"Authenticate Account",`menubar=0, location=0, toolbar=0, titlebar=0, status=0, scrollbars=1, width=${sE}, height=${rE}, left=${t}, top=${n}`);const s=o=>{const a=rr().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(()=>{(!yg||yg.closed)&&(clearInterval(i),r({}),window.removeEventListener("message",s))},1e3)})}const mR=fe(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"})]})),gR=fe(u.jsx("path",{d:"M48 24C48 10.7452 37.2548 0 24 0C10.7452 0 0 10.7452 0 24C0 35.9789 8.77641 45.908 20.25 47.7084V30.9375H14.1562V24H20.25V18.7125C20.25 12.6975 23.8331 9.375 29.3152 9.375C31.9402 9.375 34.6875 9.84375 34.6875 9.84375V15.75H31.6613C28.68 15.75 27.75 17.6002 27.75 19.5V24H34.4062L33.3422 30.9375H27.75V47.7084C39.2236 45.908 48 35.9789 48 24Z"}),"FacebookIcon","0 0 48 48"),yR=fe(u.jsx("path",{d:"M14.095479,10.316482L22.286354,1h-1.940718l-7.115352,8.087682L7.551414,1H1l8.589488,12.231093L1,23h1.940717 l7.509372-8.542861L16.448587,23H23L14.095479,10.316482z M11.436522,13.338465l-0.871624-1.218704l-6.924311-9.68815h2.981339 l5.58978,7.82155l0.867949,1.218704l7.26506,10.166271h-2.981339L11.436522,13.338465z"}),"TwitterIcon");function TW(e,{noSSR:t}={noSSR:!0}){const n=typeof window<"u"&&typeof window.matchMedia=="function",[r,s]=x.useState(t?()=>n?window.matchMedia(e).matches:!1:null);return x.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 Dx(e){return TW("(max-width: 768px)",e)}function $x(){const{width:e,height:t}=Y6();return{"--be-viewport-height":`${t}px`,"--be-viewport-width":`${e}px`}}const vu=x.forwardRef(({children:e,style:t,autoFocus:n=!1,restoreFocus:r=!0,isDismissable:s,isContextMenu:i,isOpen:o,onClose:a,triggerRef:l,arrowRef:c,arrowStyle:f,onPointerLeave:d,onPointerEnter:h},p)=>{const g=$x(),w=gl(p),{domProps:b}=jW({isDismissable:s,isOpen:o,onClose:a,triggerRef:l,isContextMenu:i},w);return u.jsx(cs.div,{className:"isolate z-popover",role:"presentation",ref:w,style:{...g,...t,position:"fixed"},...rP,...ds(b,{onPointerLeave:d,onPointerEnter:h}),children:u.jsx(yp,{restoreFocus:r,autoFocus:n,contain:!1,children:e})})}),Gl=[];function jW({onClose:e,isDismissable:t=!0,triggerRef:n,isContextMenu:r=!1},s){const i=x.useRef({isPointerDown:!1,isContextMenu:r,onClose:e}),o=i.current;o.isContextMenu=r,o.onClose=e;const a=x.useCallback(g=>{const w=g.target;if(w){const b=w.ownerDocument;if(!b||!b.documentElement.contains(w))return!1}return s.current&&!s.current.contains(w)},[s]),l=x.useCallback(()=>Gl[Gl.length-1]===s,[s]),c=x.useCallback(()=>{l()&&o.onClose()},[l,o]),f=x.useCallback(g=>{var w,b;return n.current&&"contains"in n.current?(b=(w=n.current).contains)==null?void 0:b.call(w,g):!1},[n]),d=x.useCallback(g=>{f(g.target)||l()&&(g.stopPropagation(),g.preventDefault())},[f,l]),h=x.useCallback(g=>{f(g.target)||(l()&&(g.stopPropagation(),g.preventDefault()),(!o.isContextMenu||g.button!==2)&&c())},[f,c,o,l]);return x.useEffect(()=>{Gl.push(s);const g=m=>{a(m)&&(d(m),i.current.isPointerDown=!0)},w=m=>{i.current.isPointerDown&&a(m)&&(i.current.isPointerDown=!1,h(m))},b=m=>{m.preventDefault(),a(m)&&c()},y=m=>{if(!n.current)return;const v=m.target;let _;n.current instanceof Node?_=n.current:"contextElement"in n.current&&(_=n.current.contextElement),(!(v instanceof Node)||!_||v.contains(_))&&o.onClose()};return document.addEventListener("pointerdown",g,!0),document.addEventListener("pointerup",w,!0),document.addEventListener("contextmenu",b,!0),document.addEventListener("scroll",y,!0),()=>{const m=Gl.indexOf(s);m>=0&&Gl.splice(m,1),document.removeEventListener("pointerdown",g,!0),document.removeEventListener("pointerup",w,!0),document.removeEventListener("contextmenu",b,!0),document.removeEventListener("scroll",y,!0)}},[s,a,o,h,d,n,f,c]),{domProps:{onKeyDown:g=>{g.key==="Escape"&&(g.stopPropagation(),g.preventDefault(),c())}}}}const Mp={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.2}};function vR({position:e="absolute",className:t,isTransparent:n=!1,disableInitialTransition:r,...s}){return u.jsx(cs.div,{...s,className:B(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},...Mp,transition:{duration:.15}})}const xR=x.forwardRef(({children:e,autoFocus:t=!1,restoreFocus:n=!0,isDismissable:r,isOpen:s,onClose:i},o)=>{const a=$x(),l=gl(o);return u.jsxs("div",{className:"isolate z-tray fixed inset-0",style:a,children:[u.jsx(vR,{onClick:()=>{r&&i()}},"tray-underlay"),u.jsx(cs.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(yp,{restoreFocus:n,autoFocus:t,contain:!0,children:e})})]})}),kW=x.forwardRef(({children:e,autoFocus:t=!1,restoreFocus:n=!0,isDismissable:r=!0,isOpen:s=!1,placement:i="center",onClose:o},a)=>{const l=$x(),c=gl(a);return u.jsxs("div",{className:"fixed inset-0 isolate z-modal",style:l,onKeyDown:f=>{f.key==="Escape"&&(f.stopPropagation(),f.preventDefault(),o())},children:[u.jsx(vR,{onClick:()=>{r&&o()}},"modal-underlay"),u.jsx(cs.div,{ref:c,className:B("pointer-events-none absolute inset-0 z-20 flex h-full w-full",i==="center"&&"items-center justify-center",i==="top"&&"items-start justify-center pt-40"),role:"presentation",initial:{opacity:0,scale:i==="top"?1:.7},animate:{opacity:1,scale:1},exit:{opacity:0,scale:1},transition:{duration:.1},children:u.jsx(yp,{restoreFocus:n,autoFocus:t,contain:!0,children:e})})]})});function bR({children:e,label:t,index:n}){const r=x.useId();return u.jsxs("div",{role:"group",className:B(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 PW=Ac(({maxItems:e,children:t,items:n,inputValue:r})=>{let s=NW({children:t,items:n}),i=RW({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}}),RW=Ac(({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}),NW=Ac(({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 f=s++,d=a?t==null?void 0:t[l].items[c]:t==null?void 0:t[f];r.set(o.props.value,{index:f,element:o,textLabel:OW(o),item:d,section:a,isDisabled:o.props.isDisabled,value:o.props.value})};return x.Children.forEach(n,(o,a)=>{x.isValidElement(o)&&(o.type===bR?x.Children.forEach(o.props.children,(l,c)=>{i(l,o,a,c)}):i(o))}),r});function OW(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 Fp(e,t){const{children:n,items:r,role:s="listbox",virtualFocus:i,focusLoopingMode:o="stay",autoFocusFirstItem:a=!0,onItemSelected:l,clearInputOnItemSelection:c,blurReferenceOnItemSelection:f,floatingWidth:d="matchTrigger",floatingMinWidth:h,floatingMaxHeight:p,offset:g,placement:w,showCheckmark:b,showEmptyMessage:y,maxItems:m,isAsync:v,allowCustomValue:_,clearSelectionOnInputClear:S}=e,E=e.selectionMode||"none",R=`${x.useId()}-listbox`,[M,L]=Wa(e.inputValue,e.defaultInputValue||"",e.onInputValueChange),[z,H]=x.useState("all"),Y=PW({children:n,items:r,inputValue:v?void 0:M,maxItems:m}),V=z==="all"?Y.collection:Y.filteredCollection,K=x.useRef([]),P=x.useMemo(()=>[...V.values()].map(Ie=>Ie.isDisabled?null:Ie.textLabel),[V]),{selectedValues:T,selectValues:C}=IW(e),[D,$]=Wa(e.isOpen,e.defaultIsOpen,e.onOpenChange),[I,q]=x.useState(null),ie=Y1({floatingWidth:d,ref:t,placement:w,offset:g,maxHeight:p??420,shiftCrossAxis:!i}),{refs:te,strategy:xe,x:X,y:ue}=ie,ge=E==="none"?void 0:V.get(T[0]),it=E==="none"||ge==null?void 0:ge.index,dt=Ie=>{if(E!=="none"){const Se=[...V.values()][Ie];Se&&C(Se.value)}},Ce=x.useCallback((Ie,Se)=>{var Kn,N;const de=[...V.values()],kt=!de.find(F=>!F.isDisabled),Wn=V.size-1;if(Se==null||!V.size||Se>Wn||Se<0||kt){q(null);return}Se=AW(de,Se,o,Ie),q(Se),Se!=null&&(i?(Kn=K.current[Se])==null||Kn.scrollIntoView({block:"nearest"}):(N=K.current[Se])==null||N.focus())},[V,i,o]),Xe=x.useCallback(Ie=>{L(Ie.target.value),H(Ie.target.value.trim()?"filtered":"all"),Ie.target.value?$(!0):S&&C(""),a&&I==null?Ce("increment",0):q(null)},[L,$,H,C,S,Ce,a,I]);return{handleItemSelection:Ie=>{const Se=te.reference.current;E!=="none"?C(Ie):Se&&"focus"in Se&&Se.focus(),i&&(L(c?"":`${Ie}`),f&&Se&&"blur"in Se&&Se.blur()),H("all"),$(!1),l==null||l(Ie),q(null)},onInputChange:Xe,focusLoopingMode:o,floatingWidth:d,floatingMinWidth:h,floatingMaxHeight:p,showCheckmark:b,collection:V,collections:Y,virtualFocus:i,focusItem:Ce,showEmptyMessage:y&&!!M,allowCustomValue:_,refs:te,reference:ie.reference,floating:te.setFloating,positionStyle:{position:xe,top:ue??"",left:X??""},listContent:P,listItemsRef:K,listboxId:R,role:s,state:{activeIndex:I,setActiveIndex:q,selectedIndex:it,setSelectedIndex:dt,selectionMode:E,selectedValues:T,selectValues:C,inputValue:M,setInputValue:L,isOpen:D,setIsOpen:$,setActiveCollection:H}}}function AW(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==="loop")t=0;else return n==="stay"?t-1:null}else if(t--,t<0)if(n==="loop")t=s;else return n==="stay"?t+1:null;return t}function IW(e){const{selectionMode:t,allowEmptySelection:n}=e,r=t==="single"||t==="multiple",[s,i]=Wa(r?e.selectedValue:void 0,r?e.defaultSelectedValue:void 0,r?e.onSelectionChange:void 0),o=x.useMemo(()=>typeof s>"u"?[]:Array.isArray(s)?s:[s],[s]),a=x.useCallback(l=>{const c=Array.isArray(l)?l:[l];t==="single"?i(c[0]):c.forEach(f=>{const d=o.indexOf(f);d===-1?(o.push(f),i([...o])):(o.length>1||n)&&(o.splice(d,1),i([...o]))})},[n,o,t,i]);return{selectedValues:o,selectValues:a}}const wR=x.createContext(null);function Lx(){return x.useContext(wR)}const DW=768;function $W(){return z1()||typeof window>"u"?rr().is_mobile_device:window.screen.width<=DW}function Up({listbox:e,children:t,isLoading:n,mobileOverlay:r=xR,searchField:s,onClose:i,prepend:o,className:a,...l}){const c=$W(),{floatingWidth:f,floatingMinWidth:d="min-w-180",collection:h,showEmptyMessage:p,state:{isOpen:g,setIsOpen:w},positionStyle:b,floating:y,refs:m}=e,v=!o&&c?r:vu,_=B("text-base sm:text-sm outline-none bg max-h-inherit flex flex-col",!o&&"shadow-xl border py-4",a,v===vu&&"rounded-panel",v===vu&&f==="auto"?`max-w-288 ${d}`:""),S=x.useMemo(()=>{let R=0;const M=[];return[...h.values()].reduce((L,z)=>{if(!z.section)L.push(x.cloneElement(z.element,{key:z.element.key||z.element.props.value}));else if(!M.includes(z.section)){const H=x.cloneElement(z.section,{key:z.section.key||R,index:R});L.push(H),M.push(z.section),R++}return L},[])},[h]),E=S.length>0||p&&!n,j=E?u.jsxs("div",{className:_,role:"presentation",children:[s,u.jsx(LW,{isLoading:n,...l,children:S})]}):null;return u.jsxs(wR.Provider,{value:e,children:[t,o?j:ri&&ll.createPortal(u.jsx(dl,{children:g&&E&&u.jsx(v,{triggerRef:m.reference,restoreFocus:!0,isOpen:g,onClose:()=>{i==null||i(),w(!1)},isDismissable:!0,style:b,ref:y,children:j})}),ri)]})}function LW({className:e,children:t,isLoading:n,...r}){const{role:s,listboxId:i,virtualFocus:o,focusItem:a,state:{activeIndex:l,setActiveIndex:c,selectedIndex:f}}=Lx(),d=x.useRef(!0),h=x.useRef(null);return x.useEffect(()=>()=>c(null),[c]),x.useEffect(()=>{if(d.current){const p=l??f;p==null&&!o?requestAnimationFrame(()=>{var g;(g=h.current)==null||g.focus({preventScroll:!0})}):p!=null&&requestAnimationFrame(()=>{a("increment",p)})}d.current=!1},[l,f,a,o]),u.jsx("div",{tabIndex:o?void 0:-1,role:s,id:i,className:"flex-auto overflow-y-auto overscroll-contain outline-none",ref:h,...r,children:t.length?t:u.jsx(MW,{})})}function MW(){return u.jsx("div",{className:"px-8 py-4 text-sm italic text-muted",children:u.jsx(k,{message:"There are no items matching your query"})})}const _R=fe(u.jsx("path",{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"}),"CheckOutlined"),SR=G.forwardRef((e,t)=>{let{startIcon:n,capitalizeFirst:r,children:s,description:i,endIcon:o,endSection:a,isDisabled:l,isActive:c,isSelected:f,showCheckmark:d,elementType:h="div",radius:p,padding:g,...w}=e;!n&&d&&(n=u.jsx(_R,{size:"sm",className:B("text-primary",!f&&"invisible")}));const b=B("icon-sm rounded overflow-hidden flex-shrink-0",!l&&"text-muted"),y=B(!l&&"text-muted"),m=h;return u.jsxs(m,{...w,"aria-disabled":l,className:FW(e),ref:t,children:[n&&u.jsx("div",{className:b,children:n}),u.jsxs("div",{className:B("min-w-auto mr-auto w-full overflow-hidden overflow-ellipsis",r&&"first-letter:capitalize"),children:[s,i&&u.jsx("div",{className:B("mt-4 whitespace-normal text-xs",l?"text-disabled":"text-muted"),children:i})]}),(o||a)&&u.jsx("div",{className:o?b:y,children:o||a})]})});function FW({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 f;return l?f=l:s?i||o?f="pl-8 pr-8 py-8":f="pl-8 pr-24 py-8":f="px-20 py-8",B("w-full select-none outline-none cursor-pointer","text-sm truncate flex items-center gap-10",!r&&"text-main",f,c,e,a)}function Qt({children:e,value:t,startIcon:n,endIcon:r,endSection:s,description:i,capitalizeFirst:o,textLabel:a,isDisabled:l,onSelected:c,onClick:f,...d}){var L;const{collection:h,showCheckmark:p,virtualFocus:g,listboxId:w,role:b,listItemsRef:y,handleItemSelection:m,state:{selectedValues:v,activeIndex:_,setActiveIndex:S}}=Lx(),E=v.includes(t),j=(L=h.get(t))==null?void 0:L.index,R=_===j;if(j==null)return null;const M=R&&!l?-1:0;return u.jsx(SR,{...d,onFocus:()=>{g||S(j)},onPointerEnter:z=>{S(j),g||z.currentTarget.focus()},onPointerDown:z=>{g&&z.preventDefault()},onKeyDown:z=>{(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),m(t),c==null||c())},onClick:z=>{m(t),c==null||c(),f==null||f(z)},ref:z=>y.current[j]=z,id:`${w}-${j}`,role:b==="menu"?"menuitem":"option",tabIndex:g?void 0:M,"aria-selected":R&&E,showCheckmark:p,isDisabled:l,isActive:R,isSelected:E,startIcon:n,description:i,endIcon:r,endSection:s,capitalizeFirst:o,"data-value":t,children:e})}function zp({state:{isOpen:e,setIsOpen:t,selectedIndex:n,activeIndex:r,setInputValue:s,setActiveIndex:i},focusLoopingMode:o,collection:a,focusItem:l,handleItemSelection:c,allowCustomValue:f}){const d=g=>{if(!(e||!g.currentTarget.contains(g.target))){if(g.key==="ArrowDown")return g.preventDefault(),t(!0),l("increment",n??0),!0;if(g.key==="ArrowUp")return g.preventDefault(),t(!0),l("decrement",n??a.size-1),!0;if(g.key==="Enter"||g.key==="Space")return g.preventDefault(),t(!0),l("increment",n??0),!0}},h=g=>{const w=Math.max(0,a.size-1);if(!(!e||!g.currentTarget.contains(g.target)))switch(g.key){case"ArrowDown":return g.preventDefault(),r==null?l("increment",0):r>=w?o==="loop"?l("increment",0):o==="deselect"&&i(null):l("increment",r+1),!0;case"ArrowUp":return g.preventDefault(),r==null?l("decrement",w):r<=0?o==="loop"?l("decrement",w):o==="deselect"&&i(null):l("decrement",r-1),!0;case"Home":return g.preventDefault(),l("increment",0),!0;case"End":return g.preventDefault(),l("decrement",w),!0;case"Tab":return t(!1),!0}};return{handleTriggerKeyDown:d,handleListboxKeyboardNavigation:h,handleListboxSearchFieldKeydown:g=>{var b,y;if(g.key==="Enter"&&r!=null&&a.size){g.preventDefault();const[m,v]=[...a.entries()][r];m&&(c(m),(y=(b=v.element.props).onSelected)==null||y.call(b));return}g.key==="Escape"&&e&&(t(!1),f||s("")),d(g)||h(g)}}}const vg=new Map;function UW(e){const{localeCode:t}=lo(),n=t+(e?Object.entries(e).sort((s,i)=>s[0]{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{const a=zW(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 zW(e){return e.length===1||!/^[A-Z]/i.test(e)?e:""}const ER=fe(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"),Vp=x.forwardRef((e,t)=>{const{searchPlaceholder:n,showSearchField:r,children:[s,i],floatingWidth:o="auto",isLoading:a}=e,l=x.useId(),c=Dx(),f=Fp({...e,clearInputOnItemSelection:!0,showEmptyMessage:r,floatingWidth:c?"auto":o,virtualFocus:r,role:r?"listbox":"menu",focusLoopingMode:r?"stay":"loop",children:i.props.children},t),{state:{isOpen:d,setIsOpen:h,activeIndex:p,inputValue:g,setInputValue:w},listboxId:b,focusItem:y,listContent:m,reference:v,onInputChange:_}=f,{handleTriggerKeyDown:S,handleListboxKeyboardNavigation:E,handleListboxSearchFieldKeydown:j}=zp(f),{findMatchingItem:R}=Mx(),M=L=>{if(!d)return;const z=R(L,m,p);z!=null&&y("increment",z)};return u.jsx(Up,{onClick:L=>L.stopPropagation(),listbox:f,onKeyDownCapture:r?void 0:M,onKeyDown:E,onClose:r?()=>w(""):void 0,"aria-labelledby":l,isLoading:a,searchField:r?u.jsx(Gc,{size:"sm",placeholder:n,startAdornment:u.jsx(ER,{}),className:"flex-shrink-0 px-8 pb-8 pt-4",autoFocus:!0,"aria-expanded":d?"true":"false","aria-haspopup":"listbox","aria-controls":d?b:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",value:g,onChange:_,onKeyDown:L=>{j(L)}}):null,children:x.cloneElement(s,{id:l,"aria-expanded":d?"true":"false","aria-haspopup":"menu","aria-controls":d?b:void 0,ref:v,onKeyDown:S,onClick:On(L=>{var z,H;(H=(z=s.props)==null?void 0:z.onClick)==null||H.call(z,L),h(!d)})})})});function Qc({children:e}){return e}const oE=e=>{e.preventDefault()};function HZ({position:e,children:t,...n}){const r=Fp({...n,isOpen:n.isOpen&&!!e,placement:"right-start",floatingWidth:"auto",role:"menu",focusLoopingMode:"loop",children:(t==null?void 0:t.type)===Qc?t.props.children:t}),{reference:s,refs:i,state:{isOpen:o,setIsOpen:a,activeIndex:l},focusItem:c,listContent:f}=r;x.useEffect(()=>{if(i.floating.current)return i.floating.current.addEventListener("contextmenu",oE),()=>{var p;(p=i.floating.current)==null||p.removeEventListener("contextmenu",oE)}},[i.floating]),x.useEffect(()=>{e?(s(CR(e)),a(!0)):a(!1)},[e,s,a]);const{handleListboxKeyboardNavigation:d}=zp(r),{findMatchingItem:h}=Mx();return u.jsx(Up,{listbox:r,onKeyDownCapture:p=>{if(!o)return;const g=h(p,f,l);g&&c("increment",g)},onKeyDown:d})}function CR({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 VW(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Nl(e){let{children:t,type:n,disableInitialTransition:r,isDismissable:s=!0,moveFocusToDialog:i=!0,returnFocusToTrigger:o=!0,triggerOnHover:a=!1,triggerOnContextMenu:l=!1,usePortal:c=!0,mobileType:f,alwaysReturnCurrentValueOnClose:d}=e;const h=x.useRef(null),p=l&&!e.triggerRef?h:e.triggerRef,g=x.useRef(e.value),[w,b]=Wa(e.isOpen,e.defaultIsOpen,e.onOpenChange),[y,m]=Wa(e.value,e.defaultValue,e.onValueChange);Dx()&&n==="popover"&&(n=f||"modal");const _=x.useRef(null),{x:S,y:E,reference:j,strategy:R,refs:M}=Y1({...e,disablePositioning:n==="modal"}),L=n==="popover"?{position:R,top:E??"",left:S??""}:{},z=x.useId(),H=`${z}-label`,Y=`${z}-description`,V=`${z}-form`,K=VW(e.onClose),P=x.useCallback(ge=>{typeof ge>"u"&&d&&(ge=y);const it=typeof ge<"u"?ge:g.current;K==null||K(it,{initialValue:g.current,valueChanged:it!==g.current}),b(!1)},[K,b,y,d]),T=x.useCallback(()=>{b(!0),g.current=e.value},[e.value,b]);hn(()=>{p!=null&&p.current&&M.reference.current!==p.current&&j(p.current)},[j,p==null?void 0:p.current,M]);const C=x.useMemo(()=>({"aria-labelledby":H,"aria-describedby":Y}),[H,Y]);let D;n==="modal"?D=kW:n==="tray"?D=xR:D=vu;const $=x.useMemo(()=>({dialogProps:C,type:n,labelId:H,descriptionId:Y,isDismissable:s,close:P,value:y,initialValue:g.current,setValue:m,formId:V}),[P,Y,C,V,H,n,s,y,m]);a=a&&n==="popover";const I={onPointerEnter:On(ge=>{T()}),onPointerLeave:On(ge=>{_.current=setTimeout(()=>{P()},150)})},q={onPointerEnter:On(ge=>{_.current&&clearTimeout(_.current)}),onPointerLeave:On(ge=>{P()})},ie={onContextMenu:On(ge=>{ge.preventDefault(),h.current=CR({x:ge.clientX,y:ge.clientY},ge.currentTarget),T()})},te={onClick:On(ge=>{ge.stopPropagation(),w?P():T()})},{dialogTrigger:xe,dialog:X}=BW(t,$),ue=u.jsx(dl,{initial:!r,children:w&&u.jsx(gp.Provider,{value:$,children:u.jsx(D,{...a?q:{},ref:M.setFloating,triggerRef:M.reference,style:L,restoreFocus:o,autoFocus:i,isOpen:w,onClose:P,isDismissable:s,isContextMenu:l,placement:e.placement,children:X})})});return u.jsxs(x.Fragment,{children:[xe&&x.cloneElement(xe,ds({...!p&&!l?{ref:j}:{},...l?{}:te,...a?I:{},...l?ie:{}},{...xe.props})),c?ri&&ll.createPortal(ue,ri):ue]})}function BW(e,t){const n=Array.isArray(e)?e:x.Children.toArray(e);let r=n.length===2?n[1]:n[0];return r=typeof r=="function"?r(t):r,n.length===2?{dialogTrigger:n[0],dialog:r}:{dialog:r}}const TR=fe(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 "})),HW=ye("Continue with google"),qW=ye("Continue with facebook"),WW=ye("Continue with twitter"),KW=ye("Continue with envato");function jR({dividerMessage:e}){var c,f,d,h,p,g,w,b;const{social:t}=ve(),n=Hn(),{getRedirectUri:r}=bt(),{loginWithSocial:s,requestingPassword:i,setIsRequestingPassword:o}=pR();if(!((c=t==null?void 0:t.google)!=null&&c.enable)&&!((f=t==null?void 0:t.facebook)!=null&&f.enable)&&!((d=t==null?void 0:t.twitter)!=null&&d.enable)&&!((h=t==null?void 0:t.envato)!=null&&h.enable))return null;const l=async y=>{const m=await s(y);((m==null?void 0:m.status)==="SUCCESS"||(m==null?void 0:m.status)==="ALREADY_LOGGED_IN")&&n(r(),{replace:!0})};return u.jsxs(x.Fragment,{children:[u.jsx("div",{className:"relative my-20 text-center before:absolute before:left-0 before:top-1/2 before:h-1 before:w-full before:-translate-y-1/2 before:bg-divider",children:u.jsx("span",{className:"relative z-10 bg-paper px-10 text-sm text-muted",children:e})}),u.jsxs("div",{className:B("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($f,{label:HW,icon:u.jsx(mR,{viewBox:"0 0 48 48"}),onClick:()=>l("google")}):null,(g=t==null?void 0:t.facebook)!=null&&g.enable?u.jsx($f,{label:qW,icon:u.jsx(gR,{className:"text-facebook"}),onClick:()=>l("facebook")}):null,(w=t==null?void 0:t.twitter)!=null&&w.enable?u.jsx($f,{label:WW,icon:u.jsx(yR,{className:"text-twitter"}),onClick:()=>l("twitter")}):null,(b=t==null?void 0:t.envato)!=null&&b.enable?u.jsx($f,{label:KW,icon:u.jsx(TR,{viewBox:"0 0 50 50",className:"text-envato"}),onClick:()=>l("envato")}):null]}),u.jsx(Nl,{type:"modal",isOpen:i,onOpenChange:o,children:u.jsx(GW,{})})]})}function GW(){const e=rn(),{formId:t}=Ic(),n=wW(e);return u.jsxs(yl,{children:[u.jsx(vl,{children:u.jsx(k,{message:"Password required"})}),u.jsxs(xl,{children:[u.jsx("div",{className:"mb-30 text-sm text-muted",children:u.jsx(k,{message:"An account with this email address already exists. If you want to connect the two accounts, enter existing account password."})}),u.jsx(sn,{form:e,id:t,onSubmit:r=>{n.mutate(r)},children:u.jsx(Ee,{autoFocus:!0,name:"password",type:"password",required:!0,label:u.jsx(k,{message:"Password"})})})]}),u.jsxs(Lp,{children:[u.jsx(le,{variant:"text",children:u.jsx(k,{message:"Cancel"})}),u.jsx(le,{type:"submit",form:t,variant:"flat",color:"primary",disabled:n.isPending,children:u.jsx(k,{message:"Connect"})})]})]})}function $f({onClick:e,label:t,icon:n}){const{trans:r}=lr(),{social:{compact_buttons:s}}=ve();return s?u.jsx(ir,{variant:"outline","aria-label":r(t),onClick:e,children:n}):u.jsx(le,{variant:"outline",startIcon:n,onClick:e,className:"min-h-42 w-full",children:u.jsx("span",{className:"min-w-160 text-start",children:u.jsx(k,{...t})})})}function QW(){const{branding:e}=ve();return u.jsxs("div",{className:"pt-42 pb-32 flex items-center gap-30 text-sm text-muted mt-auto",children:[u.jsxs(tt,{className:"hover:text-fg-base transition-colors",to:"/",children:["© ",e.site_name]}),u.jsx(Ch,{menu:"auth-page-footer",orientation:"horizontal",itemClassName:"hover:text-fg-base transition-colors"})]})}function Bp(){const{selectedTheme:e}=Sp();return e.is_dark??!1}const YW=""+new URL("auth-bg-8529ec0e.svg",import.meta.url).href;function Yc({heading:e,children:t,message:n}){const{branding:r}=ve(),s=Bp(),{trans:i}=lr();return u.jsxs("main",{className:"logins-auth flex min-h-screen flex-col items-center overflow-y-auto px-16 py-32 md:px-10vw md:py-56",style:{backgroundImage:s?void 0:`url("${YW}")`},children:[u.jsx(tt,{to:"/",className:"mb-32 block flex-shrink-0 rounded-md p-4 focus-visible:outline focus-visible:outline-3 focus-visible:outline-offset-4 focus-visible:outline-primary","aria-label":i({message:"Go to homepage"}),children:u.jsx("img",{src:s?r.logo_light:r==null?void 0:r.logo_dark,className:"m-auto block h-44 w-auto",alt:""})}),u.jsxs("div",{className:"logins-auth-card mx-auto w-full max-w-460 rounded-lg bg px-24 pb-28 pt-30 sm:px-40 sm:pb-34 sm:pt-38",children:[u.jsx("div",{className:"mb-22 h-4 w-52 rounded-full bg-primary","aria-hidden":"true"}),e&&u.jsx("h1",{className:"mb-22 text-2xl font-semibold text-[#102033]",children:e}),t]}),n&&u.jsx("div",{className:"mt-28 text-sm text-[#607086]",children:n}),u.jsx(QW,{})]})}const XW=fe(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"),JW=fe(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"),aE=fe(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"),Fx=x.forwardRef((e,t)=>{const{size:n="md",children:r,className:s,icon:i,checkedIcon:o,disabled:a,isIndeterminate:l,errorMessage:c,invalid:f,orientation:d="horizontal",onChange:h,autoFocus:p,required:g,value:w,name:b,inputTestId:y}=e,m=Rl({...e,label:r}),v=i||XW,_=o||(l?aE:JW),S=gl(t);$p({autoFocus:p},S),x.useEffect(()=>{S.current&&(S.current.indeterminate=l||!1)});const[E,j]=Wa(e.checked,e.defaultChecked||!1),R=x.useCallback(H=>{h==null||h(H),j(H.target.checked)},[h,j]),M=B("select-none",s,f&&"text-danger",!f&&a&&"text-disabled");let L,z=f?"text-danger":null;return l?(L=aE,z=z||"text-primary"):E?(L=_,z=z||"text-primary"):(L=v,z=z||"text-muted"),u.jsxs("div",{children:[u.jsx("label",{className:M,children:u.jsxs("div",{className:B("relative flex items-center",d==="vertical"&&"flex-col flex-col-reverse"),children:[u.jsx("input",{className:"absolute left-0 top-0 h-24 w-24 appearance-none overflow-hidden rounded outline-none ring-inset transition-shadow focus-visible:ring",type:"checkbox","aria-checked":l?"mixed":E,"aria-invalid":f||void 0,onChange:R,ref:S,required:g,disabled:a,value:w,name:b,"data-testid":y}),u.jsx(L,{size:n,className:B("pointer-events-none",a?"text-disabled":z)}),r&&u.jsx("div",{className:B("first-letter:capitalize",m.size.font,d==="vertical"?"mb-6":"ml-6"),children:r})]})}),c&&u.jsx("div",{className:m.error,children:c})]})});function kR(e){const{field:{onChange:t,onBlur:n,value:r=!1,ref:s},fieldState:{invalid:i,error:o}}=Pl({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(Fx,{ref:s,...ds(a,e)})}function PR(e){const{recaptcha:{site_key:t,enable:n}={}}=ve(),r=t&&(n==null?void 0:n[e]),[s,i]=x.useState(!1);return x.useEffect(()=>{r&&RR(t)},[r,t]),{verify:x.useCallback(async()=>{if(!r)return!0;i(!0);const a=await ZW(t,e);return a||ke.danger(ye("Could not verify you are human.")),i(!1),a},[r,t,e]),isVerifying:s}}async function ZW(e,t){return await RR(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=ae.post("recaptcha/verify",{token:s}).then(a=>a.data.success).catch(()=>!1);n(i??!1)})})}function RR(e){return G4.loadAsset(`https://www.google.com/recaptcha/api.js?render=${e}`,{id:"recaptcha-js"})}const eK=window.requestAnimationFrame,tK=window.cancelAnimationFrame,NR="data-be-helmet";let Lf;const Ux=x.memo(({children:e,tags:t})=>{const{trans:n}=lr();return!t&&e&&(t=nK(e,n)),sK(t),null},Ki);function nK(e,t){return x.Children.map(e,n=>{switch(n.type){case"title":return{nodeName:"title",_text:OR(n.props.children,t)};case"meta":return{...n.props,nodeName:"meta"}}})}function OR(e,t){return e==null?"":typeof e=="string"?e:Array.isArray(e)?e.map(n=>OR(n,t)).join(""):"message"in e?t(e):t(e.props)}function rK(){document.head.querySelectorAll('meta:not([data-keep]), script[type="application/ld+json"]:not([data-keep]), title, link[rel="canonical"]').forEach(e=>{document.head.removeChild(e)})}function sK(e){Lf&&tK(Lf),Lf=eK(()=>{if(rK(),typeof e=="string"){const t=document.createElement("template");t.innerHTML=e,t.content.childNodes.forEach(n=>{n instanceof HTMLElement&&(n.setAttribute(NR,"true"),document.head.prepend(n))})}else e==null||e.forEach(t=>{iK(t)});Lf=null})}function iK(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(NR,"true"),document.head.prepend(t)}function gs({children:e}){const{branding:{site_name:t}}=ve();return u.jsx(Ux,{children:e?u.jsxs("title",{children:[e," - ",t]}):void 0})}function Dv(){const{branding:e,registration:{disable:t},social:n}=ve(),{auth:r}=x.useContext(fs),{verify:s,isVerifying:i}=PR("register"),{pathname:o}=ur(),[a]=sx(),l=o.includes("workspace"),c=a.get("redirectFrom")==="pricing",f=a.get("email")||void 0,d=a.get("plan")||void 0,h=a.get("intent")||void 0,p=a.get("template")||void 0,g=a.get("domain")||void 0,w=a.get("domain_mode")||void 0,b=rn({defaultValues:{email:f}}),y=xW(b);if(t)return u.jsx(si,{to:"/login",replace:!0});let m=u.jsx(k,{message:"Create a new account"});l?m=u.jsx(k,{values:{siteName:e==null?void 0:e.site_name},message:"To join your team on :siteName, create an account"}):c&&(m=u.jsx(k,{message:"First, let's create your account"}));const v=u.jsx(k,{values:{a:_=>u.jsx(tt,{className:ii,to:"/login",children:_})},message:"Already have an account? Sign in."});return u.jsxs(Yc,{heading:m,message:v,children:[u.jsx(gs,{children:u.jsx(k,{message:"Register"})}),u.jsxs(sn,{form:b,onSubmit:async _=>{await s()&&y.mutate({..._,plan:d,intent:h,template:p,domain:g,domain_mode:w})},children:[u.jsx(Ee,{className:"mb-32",name:"email",type:"email",autoComplete:"email",disabled:!!f,label:u.jsx(k,{message:"Email"}),required:!0}),u.jsx(Ee,{className:"mb-32",name:"password",type:"password",autoComplete:"new-password",label:u.jsx(k,{message:"Password"}),required:!0}),u.jsx(Ee,{className:"mb-32",name:"password_confirmation",type:"password",autoComplete:"new-password",label:u.jsx(k,{message:"Confirm password"}),required:!0}),r!=null&&r.registerFields?u.jsx(r.registerFields,{}):null,u.jsx(oK,{}),u.jsx(le,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:y.isPending||i,children:u.jsx(k,{message:"Create account"})}),u.jsx(jR,{dividerMessage:n.compact_buttons?u.jsx(k,{message:"Or sign up with"}):u.jsx(k,{message:"OR"})})]})]})}function oK(){const{registration:{policies:e}}=ve();return e?u.jsx("div",{className:"mb-32",children:e.map(t=>u.jsx(kR,{name:t.id,className:"mb-4 block",required:!0,children:u.jsx(k,{message:"I accept the :name",values:{name:u.jsx(kx,{unstyled:!0,className:()=>ii,item:t})}})},t.id))}):null}const AR=e=>`custom-pages/${e}`;function aK(e){const t=rx();return e||(e=t.pageId),or({queryKey:[AR(e)],queryFn:()=>lK(e),initialData:()=>{var r;const n=(r=rr().loaders)==null?void 0:r.customPage;if(n!=null&&n.page&&(n.page.id==e||n.page.slug==e))return n}})}function lK(e){return ae.get(AR(e)).then(t=>t.data)}const IR=fe(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 DR({children:e,className:t,withBorder:n=!0,top:r="top-2",right:s="right-4"}){return u.jsx("span",{className:B("absolute 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,r,s),children:e})}const $R=fe(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 zx({image:e,title:t,description:n,action:r,className:s,size:i="md",imageHeight:o,imageMargin:a="mb-24"}){const l=uK(i,o);return u.jsxs("div",{className:B("text-center",s),children:[e&&u.jsx("div",{className:B(l.image,a),children:e}),t&&u.jsx("div",{className:B(l.title,"mb-2 text-main"),children:t}),n&&u.jsx("div",{className:B(l.description,"text-muted"),children:n}),r&&u.jsx("div",{className:"mt-20",children:r})]})}function uK(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 cK=""+new URL("notify-d1de4ec3.svg",import.meta.url).href;function LR(){const{notif:e}=ve();return u.jsx(zx,{size:"sm",image:u.jsx(T1,{src:cK}),title:u.jsx(k,{message:"Hang tight!"}),description:u.jsx(k,{message:"Notifications will start showing up here soon."}),action:e.subs.integrated&&u.jsx(le,{elementType:tt,variant:"outline",to:"/notifications/settings",size:"xs",color:"primary",children:u.jsx(k,{message:"Notification settings"})})})}const MR=fe(u.jsx("path",{d:"M19.43 12.98c.04-.32.07-.64.07-.98 0-.34-.03-.66-.07-.98l2.11-1.65c.19-.15.24-.42.12-.64l-2-3.46c-.09-.16-.26-.25-.44-.25-.06 0-.12.01-.17.03l-2.49 1c-.52-.4-1.08-.73-1.69-.98l-.38-2.65C14.46 2.18 14.25 2 14 2h-4c-.25 0-.46.18-.49.42l-.38 2.65c-.61.25-1.17.59-1.69.98l-2.49-1c-.06-.02-.12-.03-.18-.03-.17 0-.34.09-.43.25l-2 3.46c-.13.22-.07.49.12.64l2.11 1.65c-.04.32-.07.65-.07.98 0 .33.03.66.07.98l-2.11 1.65c-.19.15-.24.42-.12.64l2 3.46c.09.16.26.25.44.25.06 0 .12-.01.17-.03l2.49-1c.52.4 1.08.73 1.69.98l.38 2.65c.03.24.24.42.49.42h4c.25 0 .46-.18.49-.42l.38-2.65c.61-.25 1.17-.59 1.69-.98l2.49 1c.06.02.12.03.18.03.17 0 .34-.09.43-.25l2-3.46c.12-.22.07-.49-.12-.64l-2.11-1.65zm-1.98-1.71c.04.31.05.52.05.73 0 .21-.02.43-.05.73l-.14 1.13.89.7 1.08.84-.7 1.21-1.27-.51-1.04-.42-.9.68c-.43.32-.84.56-1.25.73l-1.06.43-.16 1.13-.2 1.35h-1.4l-.19-1.35-.16-1.13-1.06-.43c-.43-.18-.83-.41-1.23-.71l-.91-.7-1.06.43-1.27.51-.7-1.21 1.08-.84.89-.7-.14-1.13c-.03-.31-.05-.54-.05-.74s.02-.43.05-.73l.14-1.13-.89-.7-1.08-.84.7-1.21 1.27.51 1.04.42.9-.68c.43-.32.84-.56 1.25-.73l1.06-.43.16-1.13.2-1.35h1.39l.19 1.35.16 1.13 1.06.43c.43.18.83.41 1.23.71l.91.7 1.06-.43 1.27-.51.7 1.21-1.07.85-.89.7.14 1.13zM12 8c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm0 6c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2z"}),"SettingsOutlined");function fK({className:e}){const{user:t}=bt(),{notif:n}=ve(),r=sr(),s=Z1(),i=!!(t!=null&&t.unread_notifications_count),o=()=>{r.data&&s.mutate({markAllAsUnread:!0})};return u.jsxs(Nl,{type:"popover",children:[u.jsx(ir,{size:"md",className:e,badge:i?u.jsx(DR,{className:"max-md:hidden",children:t==null?void 0:t.unread_notifications_count}):void 0,children:u.jsx(IR,{})}),u.jsxs(yl,{children:[u.jsx(vl,{showDivider:!0,actions:!i&&n.subs.integrated&&u.jsx(ir,{className:"text-muted",size:"sm",elementType:tt,to:"/notifications/settings",target:"_blank",children:u.jsx(MR,{})}),rightAdornment:i&&u.jsx(le,{variant:"text",color:"primary",size:"xs",startIcon:u.jsx($R,{}),onClick:o,disabled:s.isPending,className:"max-md:hidden",children:u.jsx(k,{message:"Mark all as read"})}),children:u.jsx(k,{message:"Notifications"})}),u.jsx(xl,{padding:"p-0",children:u.jsx(dK,{})})]})]})}function dK(){const{data:e,isLoading:t}=sr();return t?u.jsx("div",{className:"flex items-center justify-center px-24 py-20",children:u.jsx(ms,{"aria-label":"Loading notifications...",isIndeterminate:!0})}):e!=null&&e.pagination.data.length?u.jsx("div",{children:u.jsx(PP,{notifications:e.pagination.data})}):u.jsx("div",{className:"px-24 py-20",children:u.jsx(LR,{})})}const hK=fe(u.jsx("path",{d:"M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z"}),"MenuOutlined"),Vx=fe(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"),pK=fe(u.jsx("path",{d:"m7 10 5 5 5-5H7z"}),"ArrowDropDownOutlined"),FR="Can't logout while in appearance editor.";function Bx(){const e=Hn(),{isAppearanceEditorActive:t}=Q4(),{setBootstrapData:n}=Kt();return Pe({mutationFn:()=>t?gK():mK(),onSuccess:r=>{n(r.bootstrapData),Ye.clear(),e("/login"),Ye.clear(),n(r.bootstrapData)},onError:r=>xt(r,t?ye(FR):void 0)})}function mK(){return ae.post("auth/logout").then(e=>e.data)}function gK(){return Promise.reject(FR)}const yK=fe(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"),vK=fe(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"),UR=fe(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"),xK=fe(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"),bK=fe(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 wK({children:e,items:t}){const{auth:n}=x.useContext(fs),r=Bx(),s=jx("auth-dropdown"),{notifications:i,themes:o}=ve(),{user:a,isSubscribed:l}=bt(),c=Hn(),{selectedTheme:f,selectTheme:d}=Sp();if(!f||!a)return null;const h=!!a.unread_notifications_count,p=u.jsxs(Qt,{className:"md:hidden",value:"notifications",startIcon:u.jsx(IR,{}),onSelected:()=>{c("/notifications")},children:[u.jsx(k,{message:"Notifications"}),h?` (${a.unread_notifications_count})`:void 0]}),g=u.jsx(Qt,{value:"billing",startIcon:u.jsx(yK,{}),onSelected:()=>{c("/billing")},children:u.jsx(k,{message:"Billing"})});return u.jsxs(Vp,{children:[e,u.jsxs(Qc,{children:[s&&s.items.map(w=>{const b=w.icon&&lp(w.icon);return u.jsx(Qt,{value:w.id,startIcon:b&&u.jsx(b,{}),onSelected:()=>{w.type==="link"?window.open(w.action,"_blank"):c(w.action)},children:u.jsx(k,{message:w.label})},w.id)}),n.getUserProfileLink&&u.jsx(Qt,{value:"profile",startIcon:u.jsx(vK,{}),onSelected:()=>{c(n.getUserProfileLink(a))},children:u.jsx(k,{message:"Profile page"})}),t==null?void 0:t.map(w=>w),i!=null&&i.integrated?p:void 0,l&&g,(o==null?void 0:o.user_change)&&!f.is_dark&&u.jsx(Qt,{value:"light",startIcon:u.jsx(UR,{}),onSelected:()=>{d("dark")},children:u.jsx(k,{message:"Dark mode"})}),(o==null?void 0:o.user_change)&&f.is_dark&&u.jsx(Qt,{value:"dark",startIcon:u.jsx(xK,{}),onSelected:()=>{d("light")},children:u.jsx(k,{message:"Light mode"})}),u.jsx(Qt,{value:"logout",startIcon:u.jsx(bK,{}),onSelected:()=>{r.mutate()},children:u.jsx(k,{message:"Log out"})})]})]})}function _K({items:e=[]}){const{user:t}=bt(),{selectedTheme:n}=Sp();if(!n||!t)return null;const r=!!t.unread_notifications_count,s=u.jsx(ir,{size:"md",className:"md:hidden",role:"presentation","aria-label":"toggle authentication menu",badge:r?u.jsx(DR,{children:t.unread_notifications_count}):void 0,children:u.jsx(Vx,{})}),i=u.jsxs(up,{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(pK,{className:"block icon-sm"})]});return u.jsx(wK,{items:e,children:u.jsxs("span",{role:"button",children:[s,i]})})}function SK({primaryButtonColor:e,navbarColor:t}){return e||(e=t==="primary"?"paper":"primary"),u.jsxs(x.Fragment,{children:[u.jsx(CK,{}),u.jsx(EK,{primaryButtonColor:e})]})}function EK({primaryButtonColor:e}){const{registration:t}=ve();return u.jsxs("div",{className:"text-sm max-md:hidden",children:[!t.disable&&u.jsx(le,{elementType:tt,to:"/register",variant:"text",className:"mr-10",children:u.jsx(k,{message:"Register"})}),u.jsx(le,{elementType:tt,to:"/login",variant:"raised",color:e,children:u.jsx(k,{message:"Login"})})]})}function CK(){const{registration:e}=ve(),t=Hn();return u.jsxs(Vp,{children:[u.jsx(ir,{size:"md",className:"md:hidden",children:u.jsx(Vx,{})}),u.jsxs(Qc,{children:[u.jsx(Qt,{value:"login",onSelected:()=>t("/login"),children:u.jsx(k,{message:"Login"})}),!e.disable&&u.jsx(Qt,{value:"register",onSelected:()=>t("/register"),children:u.jsx(k,{message:"Register"})})]})]})}function TK(){var n;const{data:e}=Kt();if(!Bp())return(n=e.themes.all.find(r=>r.is_dark&&r.default_dark))==null?void 0:n.values}function jK({color:e,logoColor:t,isDarkMode:n,className:r}){const{trans:s}=lr(),{branding:i}=ve();let o,a;return n||!i.logo_dark||t!=="dark"&&e!=="bg"&&e!=="bg-alt"?(o=i.logo_light,a=i.logo_light_mobile):(o=i.logo_dark,a=i.logo_dark_mobile),!a&&!o?null:u.jsx(tt,{to:"/",className:B("mr-4 block h-full max-h-26 flex-shrink-0 md:mr-24 md:max-h-36",r),"aria-label":s({message:"Go to homepage"}),children:u.jsxs("picture",{children:[u.jsx("source",{srcSet:a||o,media:"(max-width: 768px)"}),u.jsx("source",{srcSet:o,media:"(min-width: 768px)"}),u.jsx("img",{className:"block h-full max-h-26 w-auto md:max-h-36",alt:s({message:"Site logo"})})]})})}function kK(){var t;const{data:e}=Kt();return(t=e.themes.all.find(n=>!n.is_dark&&n.default_light))==null?void 0:t.values}function yo(e){let{hideLogo:t,toggleButton:n,children:r,className:s,border:i,size:o="md",color:a,textColor:l,darkModeColor:c,rightChildren:f,menuPosition:d,logoColor:h,primaryButtonColor:p,authMenuItems:g,alwaysDarkMode:w=!1,wrapInContainer:b=!1}=e;const y=Bp()||w,{notifications:m}=ve(),{isLoggedIn:v}=bt(),_=TK(),S=kK(),E=v&&(m==null?void 0:m.integrated);return a=a??(S==null?void 0:S["--be-navbar-color"])??"primary",c=c??(_==null?void 0:_["--be-navbar-color"])??"bg-alt",y&&(a=c),u.jsx("div",{style:w?_:void 0,className:B(NK(a,l),o==="md"&&"h-64 py-8",o==="sm"&&"h-54 py-4",o==="xs"&&"h-48 py-4",i,s),children:u.jsxs("div",{className:B("flex h-full items-center justify-end gap-10 pl-14 pr-8 md:pl-20 md:pr-20",b&&"container mx-auto"),children:[!t&&u.jsx(jK,{isDarkMode:y,color:a,logoColor:h}),n,r,u.jsx(RK,{position:d}),u.jsx(PK,{position:d}),u.jsxs("div",{className:"ml-auto flex items-center gap-4 md:gap-14",children:[f,E&&u.jsx(fK,{}),v?u.jsx(_K,{items:g}):u.jsx(SK,{navbarColor:a,primaryButtonColor:p})]})]})})}function PK({position:e}){return u.jsx(Ch,{className:"mx-14 text-sm max-md:hidden",itemClassName:t=>B("opacity-90 hover:underline hover:opacity-100",t&&"opacity-100"),menu:e})}function RK({position:e}){const t=Hn(),n=jx(e);if(!(n!=null&&n.items.length))return null;const r=s=>{var i;ml(s.action)?(i=window.open(s.action,s.target))==null||i.focus():t(s.action)};return u.jsxs(Vp,{children:[u.jsx(ir,{className:"md:hidden","aria-label":"Toggle menu",children:u.jsx(hK,{})}),u.jsx(Qc,{children:n.items.map(s=>{const i=s.icon&&lp(s.icon);return u.jsx(Qt,{value:s.action,onSelected:()=>r(s),startIcon:i&&u.jsx(i,{}),children:u.jsx(k,{message:s.label})},s.id)})})]})}function NK(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 zR(e,t,n={}){return or({queryKey:["value-lists",e,t],queryFn:()=>OK(e,t),staleTime:t?void 0:1/0,placeholderData:ST,enabled:!n.disabled,initialData:()=>{const r=Ye.getQueriesData({queryKey:["ValueLists"]}).find(([,s])=>s&&e.every(i=>s[i])?s:null);if(r)return r[1]}})}function OK(e,t){return ae.get(`value-lists/${e}`,{params:t}).then(n=>n.data)}const VR=fe(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");function BR(){const{mergeBootstrapData:e}=Kt();return Pe({mutationFn:t=>AK(t),onSuccess:t=>{e({i18n:t.locale})},onError:t=>xt(t)})}function AK(e){return ae.post("users/me/locale",e).then(t=>t.data)}function IK(){const{locale:e}=lo(),t=BR(),{data:n}=zR(["localizations"]),{i18n:r}=ve();return!(n!=null&&n.localizations)||!e||!r.enable?null:u.jsxs(Vp,{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(le,{disabled:t.isPending,className:"capitalize",startIcon:u.jsx(VR,{}),endIcon:u.jsx(J1,{}),children:e.name}),u.jsx(Qc,{children:n.localizations.map(s=>u.jsx(Qt,{value:s.language,className:"capitalize",children:s.name},s.language))})]})}const DK=fe(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 Xc({className:e,padding:t}){const n=new Date().getFullYear(),{branding:r}=ve();return u.jsxs("footer",{className:B("text-sm",t||"pb-28 pt-54 md:pb-54",e),children:[u.jsx($K,{}),u.jsxs("div",{className:"items-center justify-between gap-30 text-center text-muted md:flex md:text-left",children:[u.jsx(k,{message:"Copyright © :year :name, All Rights Reserved",values:{year:n,name:r.site_name}}),u.jsxs("div",{children:[u.jsx(LK,{}),u.jsx(IK,{})]})]})]})}function $K(){const e=ve(),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:"mb-14 items-center justify-between gap-30 overflow-x-auto border-b pb-14 md:flex",children:[t&&u.jsx(Ch,{menu:t,className:"text-primary"}),n&&u.jsx(Ch,{menu:n,className:"mb:mt-0 mt-14 text-muted"})]})}function LK(){const{themes:e}=ve(),{selectedTheme:t,selectTheme:n}=Sp();return!t||!(e!=null&&e.user_change)?null:u.jsx(le,{variant:"text",startIcon:t.is_dark?u.jsx(UR,{}):u.jsx(DK,{}),onClick:()=>{t.is_dark?n("light"):n("dark")},children:t.is_dark?u.jsx(k,{message:"Light mode"}):u.jsx(k,{message:"Dark mode"})})}function MK({page:e}){const t=x.useRef(null);return x.useEffect(()=>{t.current&&c7(t.current)},[]),u.jsx("div",{className:"px-16 md:px-24",children:u.jsxs("div",{className:"custom-page-body prose mx-auto my-50 dark:prose-invert",children:[u.jsx("h1",{children:e.title}),u.jsx("div",{ref:t,className:"whitespace-pre-wrap break-words",dangerouslySetInnerHTML:{__html:e.body}})]})})}function HR(){const{data:{default_meta_tags:e}}=Kt();return u.jsx(Ux,{tags:e})}function FK({query:e}){var t,n;return(t=e.data)!=null&&t.set_seo?null:(n=e.data)!=null&&n.seo?u.jsx(Ux,{tags:e.data.seo}):u.jsx(HR,{})}function Si({className:e,screen:t}){return u.jsx("div",{className:B("flex items-center justify-center flex-auto",t?"h-screen w-screen":"h-full w-full",e),children:u.jsx(ms,{isIndeterminate:!0,"aria-label":"Loading page..."})})}function UK(){return u.jsx(zx,{className:"mt-40",image:u.jsx("div",{children:u.jsx(X1,{size:"xl"})}),imageHeight:"h-auto",title:u.jsx(k,{message:"There was an issue loading this page"}),description:u.jsx(k,{message:"Please try again later"})})}function zK({query:e,show404:t=!0,loader:n,loaderClassName:r,loaderIsScreen:s=!0,delayedSpinner:i=!0,redirectOn404:o}){const{isLoggedIn:a}=bt(),l=LP(e.isLoading,{delay:500,minDuration:200});return e.isLoading?!l&&i?null:n||u.jsx(Si,{className:r,screen:s}):e.isError&&(ea(e.error,401)||ea(e.error,403))&&!a?u.jsx(si,{to:"/login",replace:!0}):t&&e.isError&&ea(e.error,404)?o?u.jsx(si,{to:o,replace:!0}):u.jsx(Px,{}):u.jsx(UK,{})}function $v({slug:e}){const{pageSlug:t}=rx(),n=aK(e||t);return x.useEffect(()=>{var r;(r=n.data)!=null&&r.page&&window.scrollTo(0,0)},[n]),u.jsxs("div",{className:"flex flex-col min-h-screen bg",children:[u.jsx(FK,{query:n}),u.jsx(yo,{menuPosition:"custom-page-navbar",className:"flex-shrink-0 sticky top-0"}),u.jsx("div",{className:"flex-auto",children:n.data?u.jsx(MK,{page:n.data.page}):u.jsx(zK,{query:n,loaderClassName:"mt-80"})}),u.jsx(Xc,{className:"mx-14 md:mx-40"})]})}function VK(e){const t=qR();return Pe({mutationFn:BK,onSuccess:n=>{n.two_factor||t(n)},onError:n=>Cn(n,e)})}function qR(){const e=Hn(),{getRedirectUri:t}=bt(),{setBootstrapData:n}=Kt();return x.useCallback(r=>{n(r.bootstrapData),e(t(),{replace:!0})},[e,n,t])}function BK(e){return ae.post("auth/login",{...e,token_name:e.token_name||"browser"}).then(t=>t.data.bootstrapData?t.data:{...t.data,bootstrapData:t.data,two_factor:!1})}function HK(e){const t=qR();return Pe({mutationFn:n=>qK(n),onSuccess:n=>{t(n)},onError:n=>Cn(n,e)})}function qK(e){return ae.post("auth/two-factor-challenge",e).then(t=>t.data)}function WK(){const[e,t]=x.useState(!1),n=rn(),r=HK(n);return u.jsxs(Yc,{children:[u.jsx(gs,{children:u.jsx(k,{message:"Two factor authentication"})}),u.jsxs(sn,{form:n,onSubmit:s=>{r.mutate(s)},children:[u.jsx("div",{className:"mb-32 text-sm",children:u.jsx(k,{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(Ee,{name:"recovery_code",minLength:21,maxLength:21,autoComplete:"off",autoCorrect:"off",spellCheck:"false",label:u.jsx(k,{message:"Recovery code"}),autoFocus:!0,required:!0}):u.jsx(Ee,{name:"code",minLength:6,maxLength:6,autoComplete:"off",autoCorrect:"off",spellCheck:"false",label:u.jsx(k,{message:"Code"}),autoFocus:!0,required:!0})}),u.jsx("div",{className:"mb-32",children:u.jsx(le,{variant:"link",color:"primary",size:"sm",onClick:()=>t(!e),children:u.jsx(k,{message:"Use recovery code instead"})})}),u.jsx(le,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:r.isPending,children:u.jsx(k,{message:"Continue"})})]})]})}function KK({onTwoFactorChallenge:e}){const[t]=sx(),{pathname:n}=ur(),r=n.includes("workspace"),s=t.get("email")||void 0,{branding:i,registration:o,site:a,social:l}=ve(),c=x.useContext(fs),f=a.demo&&!s?GK(c):{},d=rn({defaultValues:{remember:!0,email:s,...f}}),h=VK(d),p=r?u.jsx(k,{values:{siteName:i==null?void 0:i.site_name},message:"To join your team on :siteName, login to your account"}):u.jsx(k,{message:"Sign in to your account"}),g=!o.disable&&u.jsx(k,{values:{a:b=>u.jsx(tt,{className:ii,to:"/register",children:b})},message:"Don't have an account? Sign up."}),w=!!Object.keys(d.formState.errors).length;return u.jsxs(Yc,{heading:p,message:g,children:[u.jsx(gs,{children:u.jsx(k,{message:"Login"})}),u.jsxs(sn,{form:d,onSubmit:b=>{h.mutate(b,{onSuccess:y=>{y.two_factor&&e()}})},children:[u.jsx(Ee,{className:"mb-32",name:"email",type:"email",autoComplete:"email",label:u.jsx(k,{message:"Email"}),disabled:!!s,invalid:w,required:!0}),u.jsx(Ee,{className:"mb-12",name:"password",type:"password",autoComplete:"current-password",label:u.jsx(k,{message:"Password"}),invalid:w,labelSuffix:u.jsx(tt,{className:ii,to:"/forgot-password",tabIndex:-1,children:u.jsx(k,{message:"Forgot your password?"})}),required:!0}),u.jsx(kR,{name:"remember",className:"mb-32 block",children:u.jsx(k,{message:"Stay signed in for a month"})}),u.jsx(le,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:h.isPending,children:u.jsx(k,{message:"Continue"})})]}),u.jsx(jR,{dividerMessage:l.compact_buttons?u.jsx(k,{message:"Or sign in with"}):u.jsx(k,{message:"OR"})})]})}function GK(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:e.demo.email??"admin@admin.com",password:e.demo.password??"admin"}}function Lv(){const[e,t]=x.useState(!1);return e?u.jsx(WK,{}):u.jsx(KK,{onTwoFactorChallenge:()=>t(!0)})}function QK({homepageResolver:e}){const{homepage:t}=ve();return(t==null?void 0:t.type)==="loginPage"?u.jsx(Ts,{children:u.jsx(Lv,{})}):(t==null?void 0:t.type)==="registerPage"?u.jsx(Ts,{children:u.jsx(Dv,{})}):(t==null?void 0:t.type)==="customPage"?u.jsx($v,{slug:t.value}):(e==null?void 0:e(t==null?void 0:t.type))||null}const YK=(e,t)=>{const n=["users",`${e}`];return t&&n.push(t),n};function WR(e,t){return or({queryKey:YK(e,t),queryFn:()=>XK(e,t)})}function XK(e,t){return ae.get(`users/${e}`,{params:t}).then(n=>n.data)}function ui({id:e,title:t,titleSuffix:n,children:r,actions:s}){return u.jsxs("section",{id:e,className:"mb-24 w-full rounded-panel border bg px-24 py-20",children:[u.jsxs("div",{className:"flex items-center gap-14 border-b pb-10",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:"mt-36 flex justify-end border-t pt-10",children:s})]})}function JK({children:e,className:t,padding:n,dataTestId:r}){return u.jsx(yp,{children:u.jsx("ul",{"data-testid":r,className:B("text-base outline-none sm:text-sm",t,n??"py-4"),children:e})})}const ZK=x.forwardRef(({children:e,onSelected:t,borderRadius:n="rounded",className:r,...s},i)=>{const o=tP(),a=!!t,[l,c]=x.useState(!1),f=d=>{switch(d.key){case"ArrowDown":d.preventDefault(),o==null||o.focusNext();break;case"ArrowUp":d.preventDefault(),o==null||o.focusPrevious();break;case"Home":d.preventDefault(),o==null||o.focusFirst();break;case"End":d.preventDefault(),o==null||o.focusLast();break;case"Enter":case"Space":d.preventDefault(),t==null||t();break}};return u.jsx("li",{children:u.jsx(SR,{className:B(r,n),isActive:l,isDisabled:s.isDisabled,...s,onFocus:d=>{c(d.target.matches(":focus-visible"))},onBlur:()=>{c(!1)},onClick:()=>{t==null||t()},ref:i,role:a?"button":void 0,onKeyDown:a?f:void 0,tabIndex:a&&!s.isDisabled?0:void 0,children:e})})}),eG=fe(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"),tG=fe(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"),nG=fe(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"),rG=fe(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"),sG=fe(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"),iG=fe(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 Dr=(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))(Dr||{});function oG(){var o;const e=Dr,{hasPermission:t}=bt(),{api:n,social:r}=ve(),{auth:s}=x.useContext(fs),i=(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:"sticky top-10 hidden flex-shrink-0 lg:block",children:u.jsxs(JK,{padding:"p-0",children:[(o=s.accountSettingsPanels)==null?void 0:o.map(a=>u.jsx(Fr,{icon:u.jsx(a.icon,{viewBox:"0 0 50 50"}),panel:a.id,children:u.jsx(k,{...a.label})},a.id)),u.jsx(Fr,{icon:u.jsx(Vx,{}),panel:e.AccountDetails,children:u.jsx(k,{message:"Account details"})}),i&&u.jsx(Fr,{icon:u.jsx(eG,{}),panel:e.SocialLogin,children:u.jsx(k,{message:"Social login"})}),u.jsx(Fr,{icon:u.jsx(tG,{}),panel:e.Password,children:u.jsx(k,{message:"Password"})}),u.jsx(Fr,{icon:u.jsx(nG,{}),panel:e.TwoFactor,children:u.jsx(k,{message:"Two factor authentication"})}),u.jsx(Fr,{icon:u.jsx(iG,{}),panel:e.Sessions,children:u.jsx(k,{message:"Active sessions"})}),u.jsx(Fr,{icon:u.jsx(VR,{}),panel:e.LocationAndLanguage,children:u.jsx(k,{message:"Location and language"})}),n!=null&&n.integrated&&t("api.access")?u.jsx(Fr,{icon:u.jsx(rG,{}),panel:e.Developers,children:u.jsx(k,{message:"Developers"})}):null,u.jsx(Fr,{icon:u.jsx(sG,{}),panel:e.DeleteAccount,children:u.jsx(k,{message:"Delete account"})})]})})}function Fr({children:e,icon:t,isLast:n,panel:r}){return u.jsx(ZK,{startIcon:t,className:n?void 0:"mb-10",onSelected:()=>{const s=document.querySelector(`#${r}`);s&&s.scrollIntoView({behavior:"smooth",block:"start"})},children:e})}function aG({user:e}){var n,r,s,i;const{social:t}=ve();return!((n=t.envato)!=null&&n.enable)&&!((r=t.google)!=null&&r.enable)&&!((s=t.facebook)!=null&&s.enable)&&!((i=t.twitter)!=null&&i.enable)?null:u.jsxs(ui,{id:Dr.SocialLogin,title:u.jsx(k,{message:"Manage social login"}),children:[u.jsx(Mf,{icon:u.jsx(TR,{viewBox:"0 0 50 50",className:"border-envato bg-envato text-white"}),service:"envato",user:e}),u.jsx(Mf,{icon:u.jsx(mR,{viewBox:"0 0 48 48"}),service:"google",user:e}),u.jsx(Mf,{icon:u.jsx(gR,{className:"text-facebook"}),service:"facebook",user:e}),u.jsx(Mf,{icon:u.jsx(yR,{className:"text-twitter"}),service:"twitter",user:e}),u.jsx("div",{className:"pb-6 pt-16 text-sm text-muted",children:u.jsx(k,{message:"If you disable social logins, you'll still be able to log in using your email and password."})})]})}function Mf({service:e,user:t,className:n,icon:r}){var l,c,f;const{social:s}=ve(),{connectSocial:i,disconnectSocial:o}=pR(),a=(c=(l=t==null?void 0:t.social_profiles)==null?void 0:l.find(d=>d.service_name===e))==null?void 0:c.username;return(f=s==null?void 0:s[e])!=null&&f.enable?u.jsxs("div",{className:B("flex items-center gap-14 border-b px-10 py-20",n),children:[x.cloneElement(r,{size:"xl",className:B(r.props.className,"border p-8 rounded")}),u.jsxs("div",{className:"mr-auto overflow-hidden text-ellipsis whitespace-nowrap",children:[u.jsx("div",{className:"overflow-hidden text-ellipsis text-sm font-bold first-letter:capitalize",children:u.jsx(k,{message:":service account",values:{service:e}})}),u.jsx("div",{className:"mt-2 text-xs",children:a||u.jsx(k,{message:"Disabled"})})]}),u.jsx(le,{disabled:o.isPending,size:"xs",variant:"outline",color:a?"danger":"primary",onClick:async()=>{if(a)o.mutate({service:e},{onSuccess:()=>{Ye.invalidateQueries({queryKey:["users"]}),ke(ye("Disabled :service account",{values:{service:e}}))}});else{const d=await i(e);(d==null?void 0:d.status)==="SUCCESS"&&(Ye.invalidateQueries({queryKey:["users"]}),ke(ye("Enabled :service account",{values:{service:e}})))}},children:a?u.jsx(k,{message:"Disable"}):u.jsx(k,{message:"Enable"})})]}):null}function KR(e){return Pe({mutationFn:t=>lG(t),onSuccess:()=>{ke(ye("Updated account details"))},onError:t=>Cn(t,e)})}function lG(e){return ae.put("users/me",e).then(t=>t.data)}function uG({file:e,url:t},n){const r=new FormData;return e?r.set("file",e.native):r.set("url",t),ae.post(`users/${n.id}/avatar`,r,{headers:{"Content-Type":"multipart/form-data"}}).then(s=>s.data)}function cG({user:e}){return Pe({mutationFn:t=>uG(t,e),onSuccess:()=>{ke(ye("Uploaded avatar"))},onError:t=>{const n=Gs(t,"file");n?ke.danger(n):xt(t)}})}function fG(e){return ae.delete(`users/${e.id}/avatar`).then(t=>t.data)}function dG({user:e}){return Pe({mutationFn:()=>fG(e),onSuccess:()=>{ke(ye("Removed avatar"))},onError:t=>xt(t)})}const hG=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 pG=e=>!hG.has(e&&e.code);const mG=Nr(pG);function lE(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 GR(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function o(l){lE(i,r,s,o,a,"next",l)}function a(l){lE(i,r,s,o,a,"throw",l)}o(void 0)})}}function uE(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 xg(e){for(var t=1;t=500&&e.response.status<=599)}function vG(e){return e.config?Hx(e)&&XR.indexOf(e.config.method)!==-1:!1}function JR(e){return e.config?Hx(e)&&yG.indexOf(e.config.method)!==-1:!1}function ZR(e){return YR(e)||JR(e)}function xG(){return 0}function bG(){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}var wG={retries:3,retryCondition:ZR,retryDelay:xG,shouldResetTimeout:!1,onRetry:()=>{}};function _G(e,t){return xg(xg(xg({},wG),t),e[QR])}function cE(e,t){var n=_G(e,t);return n.retryCount=n.retryCount||0,e[QR]=n,n}function SG(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 EG(e,t){return Mv.apply(this,arguments)}function Mv(){return Mv=GR(function*(e,t){var{retries:n,retryCondition:r}=e,s=e.retryCount{var i=cE(s,t);return i.lastRequestTime=Date.now(),s}),r=e.interceptors.response.use(null,function(){var s=GR(function*(i){var{config:o}=i;if(!o)return Promise.reject(i);var a=cE(o,t);if(yield EG(a,i)){a.retryCount+=1;var{retryDelay:l,shouldResetTimeout:c,onRetry:f}=a,d=l(a.retryCount,i);if(SG(e,o),!c&&o.timeout&&a.lastRequestTime){var h=Date.now()-a.lastRequestTime,p=o.timeout-h-d;if(p<=0)return Promise.reject(i);o.timeout=p}return o.transformRequest=[g=>g],yield f(a.retryCount,i,o),new Promise(g=>setTimeout(()=>g(e(o)),d))}return Promise.reject(i)});return function(i){return s.apply(this,arguments)}}());return{requestInterceptorId:n,responseInterceptorId:r}}vo.isNetworkError=YR;vo.isSafeRequestError=vG;vo.isIdempotentRequestError=JR;vo.isNetworkOrIdempotentRequestError=ZR;vo.exponentialDelay=bG;vo.isRetryableError=Hx;const eN=1024*1024,CG=20*eN,TG=10,jG=5;class Hp{constructor(t,n){Ne(this,"abortController");Ne(this,"chunks",[]);Ne(this,"uploadId");Ne(this,"fileKey");Ne(this,"chunkAxios");Ne(this,"abortedByUser",!1);Ne(this,"uploadedParts");this.file=t,this.config=n,this.abortController=new AbortController,this.chunkAxios=Or.create(),vo(this.chunkAxios,{retries:3})}get storageKey(){return`s3-multipart::${this.file.fingerprint}`}async start(){var r,s,i,o,a;const t=Eh(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),rg(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,TG));if(n){for(;n.length;){const s=n.splice(0,jG).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 ae.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,Gs(n),this.file))});t&&(this.uploadId=t.uploadId,this.fileKey=t.key,Tx(this.storageKey,{createdAt:new Date().toISOString(),fileKey:this.fileKey,uploadId:this.uploadId}))}async getUploadedParts({fileKey:t,uploadId:n}){var s;const r=await ae.post("s3/multipart/get-uploaded-parts",{key:t,uploadId:n}).then(i=>i.data).catch(()=>(rg(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 ae.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(()=>{rg(this.storageKey)})}async createFileEntry(){return await ae.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*eN,Math.ceil(this.file.size/1e4)),n=Math.max(CG,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;il.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 ae.post("s3/multipart/abort",{key:this.fileKey,uploadId:this.uploadId})}static async create(t,n){return new Hp(t,n)}}const tN="3.7.5",kG=tN,PG=typeof atob=="function",RG=typeof btoa=="function",Ol=typeof Buffer=="function",fE=typeof TextDecoder=="function"?new TextDecoder:void 0,dE=typeof TextEncoder=="function"?new TextEncoder:void 0,NG="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",su=Array.prototype.slice.call(NG),Ff=(e=>{let t={};return e.forEach((n,r)=>t[n]=r),t})(su),OG=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,_t=String.fromCharCode.bind(String),hE=typeof Uint8Array.from=="function"?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),nN=e=>e.replace(/=/g,"").replace(/[+\/]/g,t=>t=="+"?"-":"_"),rN=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),sN=e=>{let t,n,r,s,i="";const o=e.length%3;for(let a=0;a255||(r=e.charCodeAt(a++))>255||(s=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=n<<16|r<<8|s,i+=su[t>>18&63]+su[t>>12&63]+su[t>>6&63]+su[t&63]}return o?i.slice(0,o-3)+"===".substring(o):i},qx=RG?e=>btoa(e):Ol?e=>Buffer.from(e,"binary").toString("base64"):sN,Fv=Ol?e=>Buffer.from(e).toString("base64"):e=>{let n=[];for(let r=0,s=e.length;rt?nN(Fv(e)):Fv(e),AG=e=>{if(e.length<2){var t=e.charCodeAt(0);return t<128?e:t<2048?_t(192|t>>>6)+_t(128|t&63):_t(224|t>>>12&15)+_t(128|t>>>6&63)+_t(128|t&63)}else{var t=65536+(e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320);return _t(240|t>>>18&7)+_t(128|t>>>12&63)+_t(128|t>>>6&63)+_t(128|t&63)}},IG=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,iN=e=>e.replace(IG,AG),pE=Ol?e=>Buffer.from(e,"utf8").toString("base64"):dE?e=>Fv(dE.encode(e)):e=>qx(iN(e)),aa=(e,t=!1)=>t?nN(pE(e)):pE(e),mE=e=>aa(e,!0),DG=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,$G=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 _t((n>>>10)+55296)+_t((n&1023)+56320);case 3:return _t((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return _t((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},oN=e=>e.replace(DG,$G),aN=e=>{if(e=e.replace(/\s+/g,""),!OG.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(e.length&3));let t,n="",r,s;for(let i=0;i>16&255):s===64?_t(t>>16&255,t>>8&255):_t(t>>16&255,t>>8&255,t&255);return n},Wx=PG?e=>atob(rN(e)):Ol?e=>Buffer.from(e,"base64").toString("binary"):aN,lN=Ol?e=>hE(Buffer.from(e,"base64")):e=>hE(Wx(e).split("").map(t=>t.charCodeAt(0))),uN=e=>lN(cN(e)),LG=Ol?e=>Buffer.from(e,"base64").toString("utf8"):fE?e=>fE.decode(lN(e)):e=>oN(Wx(e)),cN=e=>rN(e.replace(/[-_]/g,t=>t=="-"?"+":"/")),Uv=e=>LG(cN(e)),MG=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)},fN=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),dN=function(){const e=(t,n)=>Object.defineProperty(String.prototype,t,fN(n));e("fromBase64",function(){return Uv(this)}),e("toBase64",function(t){return aa(this,t)}),e("toBase64URI",function(){return aa(this,!0)}),e("toBase64URL",function(){return aa(this,!0)}),e("toUint8Array",function(){return uN(this)})},hN=function(){const e=(t,n)=>Object.defineProperty(Uint8Array.prototype,t,fN(n));e("toBase64",function(t){return md(this,t)}),e("toBase64URI",function(){return md(this,!0)}),e("toBase64URL",function(){return md(this,!0)})},FG=()=>{dN(),hN()},UG={version:tN,VERSION:kG,atob:Wx,atobPolyfill:aN,btoa:qx,btoaPolyfill:sN,fromBase64:Uv,toBase64:aa,encode:aa,encodeURI:mE,encodeURL:mE,utob:iN,btou:oN,decode:Uv,isValid:MG,fromUint8Array:md,toUint8Array:uN,extendString:dN,extendUint8Array:hN,extendBuiltins:FG};var zG=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},Kx={},VG=Object.prototype.hasOwnProperty,BG;function gE(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch{return null}}function yE(e){try{return encodeURIComponent(e)}catch{return null}}function HG(e){for(var t=/([^=?#&]+)=?([^&]*)/g,n={},r;r=t.exec(e);){var s=gE(r[1]),i=gE(r[2]);s===null||i===null||s in n||(n[s]=i)}return n}function qG(e,t){t=t||"";var n=[],r,s;typeof t!="string"&&(t="?");for(s in e)if(VG.call(e,s)){if(r=e[s],!r&&(r===null||r===BG||isNaN(r))&&(r=""),s=yE(s),r=yE(r),s===null||r===null)continue;n.push(s+"="+r)}return n.length?t+n.join("&"):""}Kx.stringify=qG;Kx.parse=HG;var pN=zG,qp=Kx,WG=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,mN=/[\n\r\t]/g,KG=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,gN=/:\d+$/,GG=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,QG=/^[a-zA-Z]:/;function Gx(e){return(e||"").toString().replace(WG,"")}var zv=[["#","hash"],["?","query"],function(t,n){return kr(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]],vE={hash:1,query:1};function yN(e){var t;typeof window<"u"?t=window:typeof Sg<"u"?t=Sg: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 Rr(unescape(e.pathname),{});else if(s==="string"){r=new Rr(e,{});for(i in vE)delete r[i]}else if(s==="object"){for(i in e)i in vE||(r[i]=e[i]);r.slashes===void 0&&(r.slashes=KG.test(e.href))}return r}function kr(e){return e==="file:"||e==="ftp:"||e==="http:"||e==="https:"||e==="ws:"||e==="wss:"}function vN(e,t){e=Gx(e),e=e.replace(mN,""),t=t||{};var n=GG.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)):kr(r)?a=n[4]:r?s&&(a=a.slice(2)):o>=2&&kr(t.protocol)&&(a=n[4]),{protocol:r,slashes:s||kr(r),slashesCount:o,rest:a}}function YG(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 Rr(e,t,n){if(e=Gx(e),e=e.replace(mN,""),!(this instanceof Rr))return new Rr(e,t,n);var r,s,i,o,a,l,c=zv.slice(),f=typeof t,d=this,h=0;for(f!=="object"&&f!=="string"&&(n=t,t=null),n&&typeof n!="function"&&(n=qp.parse),t=yN(t),s=vN(e||"",t),r=!s.protocol&&!s.slashes,d.slashes=s.slashes||r&&t.slashes,d.protocol=s.protocol||t.protocol||"",e=s.rest,(s.protocol==="file:"&&(s.slashesCount!==2||QG.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!kr(d.protocol)))&&(c[3]=[/(.*)/,"pathname"]);h"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 uQ(e){try{return Function.toString.call(e).indexOf("[native code]")!==-1}catch{return typeof e=="function"}}function Ju(e,t){return Ju=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(r,s){return r.__proto__=s,r},Ju(e,t)}function Zu(e){return Zu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Zu(e)}var Uf=function(e){iQ(n,e);var t=oQ(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(sQ(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(),f=o.getURL(),d=a?a.getStatus():"n/a",h=a?a.getBody()||"":"n/a";r+=", originated from request (method: ".concat(c,", url: ").concat(f,", response code: ").concat(d,", response text: ").concat(h,", request id: ").concat(l,")")}return s.message=r,s}return tQ(n)}(Vv(Error));function cQ(){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 Bv(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Bv=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,s=Object.defineProperty||function(P,T,C){P[T]=C.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(P,T,C){return Object.defineProperty(P,T,{value:C,enumerable:!0,configurable:!0,writable:!0}),P[T]}try{c({},"")}catch{c=function(C,D,$){return C[D]=$}}function f(P,T,C,D){var $=T&&T.prototype instanceof y?T:y,I=Object.create($.prototype),q=new V(D||[]);return s(I,"_invoke",{value:L(P,C,q)}),I}function d(P,T,C){try{return{type:"normal",arg:P.call(T,C)}}catch(D){return{type:"throw",arg:D}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",g="executing",w="completed",b={};function y(){}function m(){}function v(){}var _={};c(_,o,function(){return this});var S=Object.getPrototypeOf,E=S&&S(S(K([])));E&&E!==n&&r.call(E,o)&&(_=E);var j=v.prototype=y.prototype=Object.create(_);function R(P){["next","throw","return"].forEach(function(T){c(P,T,function(C){return this._invoke(T,C)})})}function M(P,T){function C($,I,q,ie){var te=d(P[$],P,I);if(te.type!=="throw"){var xe=te.arg,X=xe.value;return X&&no(X)=="object"&&r.call(X,"__await")?T.resolve(X.__await).then(function(ue){C("next",ue,q,ie)},function(ue){C("throw",ue,q,ie)}):T.resolve(X).then(function(ue){xe.value=ue,q(xe)},function(ue){return C("throw",ue,q,ie)})}ie(te.arg)}var D;s(this,"_invoke",{value:function(I,q){function ie(){return new T(function(te,xe){C(I,q,te,xe)})}return D=D?D.then(ie,ie):ie()}})}function L(P,T,C){var D=h;return function($,I){if(D===g)throw new Error("Generator is already running");if(D===w){if($==="throw")throw I;return{value:e,done:!0}}for(C.method=$,C.arg=I;;){var q=C.delegate;if(q){var ie=z(q,C);if(ie){if(ie===b)continue;return ie}}if(C.method==="next")C.sent=C._sent=C.arg;else if(C.method==="throw"){if(D===h)throw D=w,C.arg;C.dispatchException(C.arg)}else C.method==="return"&&C.abrupt("return",C.arg);D=g;var te=d(P,T,C);if(te.type==="normal"){if(D=C.done?w:p,te.arg===b)continue;return{value:te.arg,done:C.done}}te.type==="throw"&&(D=w,C.method="throw",C.arg=te.arg)}}}function z(P,T){var C=T.method,D=P.iterator[C];if(D===e)return T.delegate=null,C==="throw"&&P.iterator.return&&(T.method="return",T.arg=e,z(P,T),T.method==="throw")||C!=="return"&&(T.method="throw",T.arg=new TypeError("The iterator does not provide a '"+C+"' method")),b;var $=d(D,P.iterator,T.arg);if($.type==="throw")return T.method="throw",T.arg=$.arg,T.delegate=null,b;var I=$.arg;return I?I.done?(T[P.resultName]=I.value,T.next=P.nextLoc,T.method!=="return"&&(T.method="next",T.arg=e),T.delegate=null,b):I:(T.method="throw",T.arg=new TypeError("iterator result is not an object"),T.delegate=null,b)}function H(P){var T={tryLoc:P[0]};1 in P&&(T.catchLoc=P[1]),2 in P&&(T.finallyLoc=P[2],T.afterLoc=P[3]),this.tryEntries.push(T)}function Y(P){var T=P.completion||{};T.type="normal",delete T.arg,P.completion=T}function V(P){this.tryEntries=[{tryLoc:"root"}],P.forEach(H,this),this.reset(!0)}function K(P){if(P||P===""){var T=P[o];if(T)return T.call(P);if(typeof P.next=="function")return P;if(!isNaN(P.length)){var C=-1,D=function $(){for(;++C=0;--$){var I=this.tryEntries[$],q=I.completion;if(I.tryLoc==="root")return D("end");if(I.tryLoc<=this.prev){var ie=r.call(I,"catchLoc"),te=r.call(I,"finallyLoc");if(ie&&te){if(this.prev=0;--D){var $=this.tryEntries[D];if($.tryLoc<=this.prev&&r.call($,"finallyLoc")&&this.prev<$.finallyLoc){var I=$;break}}I&&(T==="break"||T==="continue")&&I.tryLoc<=C&&C<=I.finallyLoc&&(I=null);var q=I?I.completion:{};return q.type=T,q.arg=C,I?(this.method="next",this.next=I.finallyLoc,b):this.complete(q)},complete:function(T,C){if(T.type==="throw")throw T.arg;return T.type==="break"||T.type==="continue"?this.next=T.arg:T.type==="return"?(this.rval=this.arg=T.arg,this.method="return",this.next="end"):T.type==="normal"&&C&&(this.next=C),b},finish:function(T){for(var C=this.tryEntries.length-1;C>=0;--C){var D=this.tryEntries[C];if(D.finallyLoc===T)return this.complete(D.completion,D.afterLoc),Y(D),b}},catch:function(T){for(var C=this.tryEntries.length-1;C>=0;--C){var D=this.tryEntries[C];if(D.tryLoc===T){var $=D.completion;if($.type==="throw"){var I=$.arg;Y(D)}return I}}throw new Error("illegal catch attempt")},delegateYield:function(T,C,D){return this.delegate={iterator:K(T),resultName:C,nextLoc:D},this.method==="next"&&(this.arg=e),b}},t}function bE(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 fQ(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function o(l){bE(i,r,s,o,a,"next",l)}function a(l){bE(i,r,s,o,a,"throw",l)}o(void 0)})}}function bN(e,t){return mQ(e)||pQ(e,t)||hQ(e,t)||dQ()}function dQ(){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 hQ(e,t){if(e){if(typeof e=="string")return wE(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 wE(e,t)}}function wE(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1)for(var i=0,o=["uploadUrl","uploadSize","uploadLengthDeferred"];i1||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:_Q(this._source.size,o);this._parallelUploadUrls&&a.forEach(function(f,d){f.uploadUrl=r._parallelUploadUrls[d]||null}),this._parallelUploadUrls=new Array(a.length);var l=a.map(function(f,d){var h=0;return r._source.slice(f.start,f.end).then(function(p){var g=p.value;return new Promise(function(w,b){var y=Co(Co({},r.options),{},{uploadUrl:f.uploadUrl||null,storeFingerprintForResuming:!1,removeFingerprintOnSuccess:!1,parallelUploads:1,parallelUploadBoundaries:null,metadata:{},headers:Co(Co({},r.options.headers),{},{"Upload-Concat":"partial"}),onSuccess:w,onError:b,onProgress:function(_){i=i-h+_,h=_,r._emitProgress(i,s)},onUploadUrlAvailable:function(){r._parallelUploadUrls[d]=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 f=EE(r.options.metadata);return f!==""&&c.setHeader("Upload-Metadata",f),r._sendRequest(c,null)}).then(function(f){if(!ko(f.getStatus(),200)){r._emitHttpError(c,f,"tus: unexpected response while creating upload");return}var d=f.getHeader("Location");if(d==null){r._emitHttpError(c,f,"tus: invalid or missing Location header");return}r.url=kE(r.options.endpoint,d),"Created upload at ".concat(r.url),r._emitSuccess()}).catch(function(f){r._emitError(f)})}},{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 Uf(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),jE(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=EE(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(!ko(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=kE(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(!ko(o,200)){if(o===423){n._emitHttpError(r,i,"tus: upload is currently locked; retry later");return}if(ko(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(!ko(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,c=a&&a.size?a.size:0;r.options.uploadLengthDeferred&&l&&(r._size=r._offset+c,n.setHeader("Upload-Length",r._size));var f=r._offset+c;return!r.options.uploadLengthDeferred&&l&&f!==r._size?Promise.reject(new Error("upload was configured with a size of ".concat(r._size," bytes, but the source is done after ").concat(f," bytes"))):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=CE(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 TE(n,r,this.options)}}],[{key:"terminate",value:function(n){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=CE("DELETE",n,r);return TE(s,null,r).then(function(i){if(i.getStatus()!==204)throw new Uf("tus: unexpected response while terminating upload",null,s,i)}).catch(function(i){if(i instanceof Uf||(i=new Uf("tus: failed to terminate upload",i,s,null)),!jE(i,0,r))throw i;var o=r.retryDelays[0],a=r.retryDelays.slice(1),l=Co(Co({},r),{},{retryDelays:a});return new Promise(function(c){return setTimeout(c,o)}).then(function(){return e.terminate(n,l)})})}}]),e}();function EE(e){return Object.entries(e).map(function(t){var n=bN(t,2),r=n[0],s=n[1];return"".concat(r," ").concat(UG.encode(String(s)))}).join(",")}function ko(e,t){return e>=t&&e=n.retryDelays.length||e.originalRequest==null?!1:n&&typeof n.onShouldRetry=="function"?n.onShouldRetry(e,t,n):_N(e)}function _N(e){var t=e.originalResponse?e.originalResponse.getStatus():0;return(!ko(t,400)||t===409||t===423)&&wQ()}function kE(e,t){return new eQ(t,e).toString()}function _Q(e,t){for(var n=Math.floor(e/t),r=[],s=0;s0&&arguments[0]!==void 0?arguments[0]:null;return new Promise(function(s,i){n._xhr.onload=function(){s(new MQ(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}(),MQ=function(){function e(t){Qx(this,e),this._xhr=t}return Yx(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}(),SN=function(){return typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative"};function FQ(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 UQ=function(){return typeof window<"u"&&(typeof window.PhoneGap<"u"||typeof window.Cordova<"u"||typeof window.cordova<"u")};function zQ(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 rc(e){"@babel/helpers - typeof";return rc=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},rc(e)}function VQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function AE(e,t){for(var n=0;n=this.size;return Promise.resolve({value:s,done:i})}},{key:"close",value:function(){}}]),e}();function sc(e){"@babel/helpers - typeof";return sc=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},sc(e)}function WQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function DE(e,t){for(var n=0;nthis._bufferOffset&&(this._buffer=this._buffer.slice(n-this._bufferOffset),this._bufferOffset=n);var s=$E(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 ro(e){"@babel/helpers - typeof";return ro=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},ro(e)}function Wv(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */Wv=function(){return t};var e,t={},n=Object.prototype,r=n.hasOwnProperty,s=Object.defineProperty||function(P,T,C){P[T]=C.value},i=typeof Symbol=="function"?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function c(P,T,C){return Object.defineProperty(P,T,{value:C,enumerable:!0,configurable:!0,writable:!0}),P[T]}try{c({},"")}catch{c=function(C,D,$){return C[D]=$}}function f(P,T,C,D){var $=T&&T.prototype instanceof y?T:y,I=Object.create($.prototype),q=new V(D||[]);return s(I,"_invoke",{value:L(P,C,q)}),I}function d(P,T,C){try{return{type:"normal",arg:P.call(T,C)}}catch(D){return{type:"throw",arg:D}}}t.wrap=f;var h="suspendedStart",p="suspendedYield",g="executing",w="completed",b={};function y(){}function m(){}function v(){}var _={};c(_,o,function(){return this});var S=Object.getPrototypeOf,E=S&&S(S(K([])));E&&E!==n&&r.call(E,o)&&(_=E);var j=v.prototype=y.prototype=Object.create(_);function R(P){["next","throw","return"].forEach(function(T){c(P,T,function(C){return this._invoke(T,C)})})}function M(P,T){function C($,I,q,ie){var te=d(P[$],P,I);if(te.type!=="throw"){var xe=te.arg,X=xe.value;return X&&ro(X)=="object"&&r.call(X,"__await")?T.resolve(X.__await).then(function(ue){C("next",ue,q,ie)},function(ue){C("throw",ue,q,ie)}):T.resolve(X).then(function(ue){xe.value=ue,q(xe)},function(ue){return C("throw",ue,q,ie)})}ie(te.arg)}var D;s(this,"_invoke",{value:function(I,q){function ie(){return new T(function(te,xe){C(I,q,te,xe)})}return D=D?D.then(ie,ie):ie()}})}function L(P,T,C){var D=h;return function($,I){if(D===g)throw new Error("Generator is already running");if(D===w){if($==="throw")throw I;return{value:e,done:!0}}for(C.method=$,C.arg=I;;){var q=C.delegate;if(q){var ie=z(q,C);if(ie){if(ie===b)continue;return ie}}if(C.method==="next")C.sent=C._sent=C.arg;else if(C.method==="throw"){if(D===h)throw D=w,C.arg;C.dispatchException(C.arg)}else C.method==="return"&&C.abrupt("return",C.arg);D=g;var te=d(P,T,C);if(te.type==="normal"){if(D=C.done?w:p,te.arg===b)continue;return{value:te.arg,done:C.done}}te.type==="throw"&&(D=w,C.method="throw",C.arg=te.arg)}}}function z(P,T){var C=T.method,D=P.iterator[C];if(D===e)return T.delegate=null,C==="throw"&&P.iterator.return&&(T.method="return",T.arg=e,z(P,T),T.method==="throw")||C!=="return"&&(T.method="throw",T.arg=new TypeError("The iterator does not provide a '"+C+"' method")),b;var $=d(D,P.iterator,T.arg);if($.type==="throw")return T.method="throw",T.arg=$.arg,T.delegate=null,b;var I=$.arg;return I?I.done?(T[P.resultName]=I.value,T.next=P.nextLoc,T.method!=="return"&&(T.method="next",T.arg=e),T.delegate=null,b):I:(T.method="throw",T.arg=new TypeError("iterator result is not an object"),T.delegate=null,b)}function H(P){var T={tryLoc:P[0]};1 in P&&(T.catchLoc=P[1]),2 in P&&(T.finallyLoc=P[2],T.afterLoc=P[3]),this.tryEntries.push(T)}function Y(P){var T=P.completion||{};T.type="normal",delete T.arg,P.completion=T}function V(P){this.tryEntries=[{tryLoc:"root"}],P.forEach(H,this),this.reset(!0)}function K(P){if(P||P===""){var T=P[o];if(T)return T.call(P);if(typeof P.next=="function")return P;if(!isNaN(P.length)){var C=-1,D=function $(){for(;++C=0;--$){var I=this.tryEntries[$],q=I.completion;if(I.tryLoc==="root")return D("end");if(I.tryLoc<=this.prev){var ie=r.call(I,"catchLoc"),te=r.call(I,"finallyLoc");if(ie&&te){if(this.prev=0;--D){var $=this.tryEntries[D];if($.tryLoc<=this.prev&&r.call($,"finallyLoc")&&this.prev<$.finallyLoc){var I=$;break}}I&&(T==="break"||T==="continue")&&I.tryLoc<=C&&C<=I.finallyLoc&&(I=null);var q=I?I.completion:{};return q.type=T,q.arg=C,I?(this.method="next",this.next=I.finallyLoc,b):this.complete(q)},complete:function(T,C){if(T.type==="throw")throw T.arg;return T.type==="break"||T.type==="continue"?this.next=T.arg:T.type==="return"?(this.rval=this.arg=T.arg,this.method="return",this.next="end"):T.type==="normal"&&C&&(this.next=C),b},finish:function(T){for(var C=this.tryEntries.length-1;C>=0;--C){var D=this.tryEntries[C];if(D.finallyLoc===T)return this.complete(D.completion,D.afterLoc),Y(D),b}},catch:function(T){for(var C=this.tryEntries.length-1;C>=0;--C){var D=this.tryEntries[C];if(D.tryLoc===T){var $=D.completion;if($.type==="throw"){var I=$.arg;Y(D)}return I}}throw new Error("illegal catch attempt")},delegateYield:function(T,C,D){return this.delegate={iterator:K(T),resultName:C,nextLoc:D},this.method==="next"&&(this.arg=e),b}},t}function LE(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 JQ(e){return function(){var t=this,n=arguments;return new Promise(function(r,s){var i=e.apply(t,n);function o(l){LE(i,r,s,o,a,"next",l)}function a(l){LE(i,r,s,o,a,"throw",l)}o(void 0)})}}function ZQ(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ME(e,t){for(var n=0;n"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 Oh(e){return Oh=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Oh(e)}function UE(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 Wo(e){for(var t=1;t0&&arguments[0]!==void 0?arguments[0]:null,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return aY(this,n),s=Wo(Wo({},zE),s),t.call(this,r,s)}return lY(n,null,[{key:"terminate",value:function(s){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return i=Wo(Wo({},zE),i),Nh.terminate(s,i)}}]),n}(Nh),CN={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=w,e.setCookie=e.getCookie=void 0,e.stringifyOptions=h;var t=x;function n(b,y){return a(b)||o(b,y)||s(b,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(b,y){if(b){if(typeof b=="string")return i(b,y);var m=Object.prototype.toString.call(b).slice(8,-1);if(m==="Object"&&b.constructor&&(m=b.constructor.name),m==="Map"||m==="Set")return Array.from(b);if(m==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(m))return i(b,y)}}function i(b,y){(y==null||y>b.length)&&(y=b.length);for(var m=0,v=new Array(y);mPromise.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":CN.getCookie("XSRF-TOKEN")},onError:d=>{var h;if("originalResponse"in d&&d.originalResponse)try{const p=(h=JSON.parse(d.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(d,h){n==null||n({bytesUploaded:d,bytesTotal:h})},onSuccess:async()=>{var h;const d=(h=c.url)==null?void 0:h.split("/").pop();try{if(d){const p=await yY(d);r==null||r(p.fileEntry,t)}}catch(p){localStorage.removeItem(l),s==null||s(Gs(p),t)}}}),f=await c.findPreviousUploads();return f.length&&c.resumeFromPreviousUpload(f[0]),new Wp(c)}}function yY(e){return ae.post("tus/entries",{uploadKey:e}).then(t=>t.data)}var ic=(e=>(e.public="public",e.uploads="uploads",e))(ic||{});class Xx{constructor(t,n){Ne(this,"abortController");Ne(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 ae.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,Gs(n),this.file))})}uploadFileToS3(){const{url:t,acl:n}=this.presignedRequest;return Or.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,Gs(r),this.file))})}async createFileEntry(){return await ae.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,Gs(t),this.file))})}static async create(t,n){return new Xx(t,n)}}class Jx{constructor(t,n){Ne(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),t.set("workspaceId","12"),i&&Object.entries(i).forEach(([a,l])=>{t.set(a,`${l}`)});const o=await ae.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(Gs(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 Jx(t,n)}}function vY(e,t=1){if(e==null||Number.isNaN(e))return"";const n=e<0,r=["B","KB","MB","GB","TB","PB","EB","ZB","YB"];if(n&&(e=-e),e<1)return`${(n?"-":"")+e} B`;const s=Math.min(Math.floor(Math.log(e)/Math.log(1024)),r.length-1);e=Number(e/Math.pow(1024,s));const i=r[s];return e>=10||e%1===0?`${(n?"-":"")+e.toFixed(0)} ${i}`:`${(n?"-":"")+e.toFixed(t)} ${i}`}function TN(e,t){this.text=e=e||"",this.hasWild=~e.indexOf("*"),this.separator=t,this.parts=e.split(t)}TN.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=2}return t?n(t.split(";")[0]):n};const SY=Nr(_Y);function EY(e,t){if(!t)return;const{maxFileSize:n,allowedFileTypes:r,blockedFileTypes:s}=t;if(n&&e.size!=null&&e.size>n)return ye("`:file` exceeds maximum allowed size of :size",{values:{file:e.name,size:vY(n)}});if(r!=null&&r.length&&!VE(e,r)||s!=null&&s.length&&VE(e,s))return ye("This file type is not allowed")}function VE(e,t){return t.map(n=>n.split(",")).flat().some(n=>{if(n.includes("/"))return e.mime?SY(e.mime.replace(/;.*?$/,""),n):!1;const r=n.replace(".","").toLowerCase();return r&&e.extension?e.extension.toLowerCase()===r:!1})}class CY{constructor(){Ne(this,"aliveTimer");Ne(this,"isDone",!1);Ne(this,"timeout",3e4);Ne(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 TY(e,t){var c,f;const n=rr().settings,r=e.options,s=e.file;if(r!=null&&r.restrictions){const d=EY(s,r.restrictions);if(d)return t.updateFileUpload(s.id,{errorMessage:d,status:"failed",request:void 0,timer:void 0}),r.showToastOnRestrictionFail&&ke.danger(d),t.runQueue(),null}const i=new CY,o={metadata:{...r==null?void 0:r.metadata,relativePath:s.relativePath,disk:((c=r==null?void 0:r.metadata)==null?void 0:c.disk)||ic.uploads,parentId:((f=r==null?void 0:r.metadata)==null?void 0:f.parentId)||""},chunkSize:n.uploads.chunk_size,baseUrl:n.base_url,onError:d=>{var h;t.updateFileUpload(s.id,{errorMessage:d,status:"failed"}),t.runQueue(),i.done(),(h=r==null?void 0:r.onError)==null||h.call(r,d,s)},onSuccess:d=>{var h;t.updateFileUpload(s.id,{status:"completed",entry:d}),t.runQueue(),i.done(),(h=r==null?void 0:r.onSuccess)==null||h.call(r,d,s)},onProgress:({bytesUploaded:d,bytesTotal:h})=>{var g;const p=d/h*100;t.updateFileUpload(s.id,{percentage:p,bytesUploaded:d}),i.progress(),(g=r==null?void 0:r.onProgress)==null||g.call(r,{bytesUploaded:d,bytesTotal:h})}},l=await PY(s,o).create(s,o);return i.timeoutHandler=()=>{l.abort(),t.updateFileUpload(s.id,{status:"failed",errorMessage:ye("Upload timed out")}),t.runQueue()},t.updateFileUpload(s.id,{status:"inProgress",request:l}),l.start(),l}const jN=1024*1024,jY=4*jN,kY=100*jN,PY=(e,t)=>{var i;const n=rr().settings,s=(((i=t.metadata)==null?void 0:i.disk)||ic.uploads)===ic.uploads?n.uploads.uploads_driver:n.uploads.public_driver;return s!=null&&s.endsWith("s3")&&n.uploads.s3_direct_upload?e.size>=kY?Hp:Xx:e.size>=jY&&!n.uploads.disable_tus?Wp:Jx};function kN(e){var n;return((n=/(?:\.([^.]+))?$/.exec(e))==null?void 0:n[1])||""}function RY(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?kN(e.name):null;return e.type?e.type:n&&n in t?t[n]:"application/octet-stream"}class Gv{constructor(t,n){Ne(this,"id");Ne(this,"fingerprint");Ne(this,"name");Ne(this,"relativePath","");Ne(this,"size");Ne(this,"mime","");Ne(this,"extension","");Ne(this,"native");Ne(this,"lastModified");Ne(this,"cachedData");this.id=Qk(),this.name=t.name,this.size=t.size,this.mime=RY(t),this.lastModified=t.lastModified,this.extension=kN(t.name)||"bin",this.native=t,n=n||t.webkitRelativePath||"",n=n.replace(/^\/+/g,""),n&&n.split("/").length>1&&(this.relativePath=n),this.fingerprint=NY({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 NY({name:e,mime:t,size:n,relativePath:r,lastModified:s}){let i="be";return typeof e=="string"&&(i+=`-${BE(e.toLowerCase())}`),t&&(i+=`-${t}`),typeof r=="string"&&(i+=`-${BE(r.toLowerCase())}`),n!==void 0&&(i+=`-${n}`),s!==void 0&&(i+=`-${s}`),i+=`${dk()}`,`${i}-v1`}function OY(e){return e.charCodeAt(0).toString(32)}function BE(e){let t="";return e.replace(/[^A-Z0-9]/gi,n=>(t+=`-${OY(n)}`,"/"))+t}function HE(e,t){return{file:e instanceof Gv?e:new Gv(e),percentage:0,bytesUploaded:0,status:"pending",options:t||{}}}S6();const qE={concurrency:3,fileUploads:new Map,activeUploadsCount:0,completedUploadsCount:0},AY=({settings:e})=>D1()(F1((t,n)=>({...qE,reset:()=>{t(qE)},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&&wg(i))})},uploadSingle:(r,s)=>{const i=HE(r,s),o=new Map(n().fileUploads);return o.set(i.file.id,i),t(a=>{wg(a),a.fileUploads=o}),n().runQueue(),i.file.id},uploadMultiple:(r,s)=>{const i=new Map(n().fileUploads);return[...r].forEach(o=>{const a=HE(o,s);i.set(a.file.id,a)}),t(o=>{wg(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 Hp||o.request instanceof Wp&&e.uploads.chunk_size&&o.file.size>e.uploads.chunk_size).length&&(i=1),s.lengtha.status==="pending");o&&await TY(o,n())}}}))),wg=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},PN=x.createContext(null),zf=(e,t)=>{const n=x.useContext(PN);return Bk(n,e,t)};function IY({children:e}){const t=ve(),[n]=x.useState(()=>AY({settings:t}));return u.jsx(PN.Provider,{value:n,children:e})}function DY(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=$Y(e),e.directory&&(n.webkitdirectory=!0),document.body.appendChild(n),n}function $Y({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 LY(e={}){return new Promise(t=>{const n=DY(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 Gv(o));t(i),n.remove()},document.body.appendChild(n),n.click()})}function MY(e){return ae.post("file-entries/delete",e).then(t=>t.data)}function FY(){return Pe({mutationFn:e=>MY(e),onError:e=>xt(e)})}function UY(){const e=FY(),t=x.useRef(),n=zf(f=>f.uploadSingle),r=zf(f=>f.abortUpload),s=zf(f=>f.updateFileUpload),i=zf(f=>t.current?f.fileUploads.get(t.current):null),o=x.useCallback((f,d)=>{t.current=n(f,d)},[n]),a=x.useCallback(async f=>{var h;const d=await LY({types:(h=f==null?void 0:f.restrictions)==null?void 0:h.allowedFileTypes});return o(d[0],f),d[0]},[o]),l=x.useCallback(({onSuccess:f,entryPath:d})=>{var p,g,w;const h=()=>{i&&s(i.file.id,{...i,entry:void 0}),f()};if(!d&&!((p=i==null?void 0:i.entry)!=null&&p.id)){h();return}e.mutate({paths:d?[d]:void 0,entryIds:(g=i==null?void 0:i.entry)!=null&&g.id?[(w=i==null?void 0:i.entry)==null?void 0:w.id]:void 0,deleteForever:!0},{onSuccess:h})},[e,i,s]),c=x.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.isPending,activeUpload:i,abortUpload:c}}var Qv=(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))(Qv||{});function zY(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:f,formatOptions:d={style:"percent"},radius:h="rounded",trackColor:p="bg-primary-light",progressColor:g="bg-primary",trackHeight:w=VY(s)}=e;const b=x.useId();t=IP(t,n,r);const y=(t-n)/(r-n),m=ox(d);let v="";if(!a&&o){const j=d.style==="percent"?y:t;v=m.format(j)}const _={};a||(_.width=`${Math.round(y*100)}%`);const S=Rl({size:s}),E=(i||v)&&u.jsxs("div",{className:B("flex gap-10 justify-between my-4",S.label),children:[i&&u.jsx("span",{id:b,children:i}),v&&u.jsx("div",{children:v})]});return u.jsxs("div",{"aria-valuenow":a?void 0:t,"aria-valuemin":n,"aria-valuemax":r,"aria-valuetext":a?void 0:v,"aria-labelledby":i?b:void 0,role:f||"progressbar",className:B(c,"min-w-42"),children:[l==="top"&&E,u.jsx("div",{className:`${w} ${h} ${p} overflow-hidden`,children:u.jsx("div",{className:B(g,"fill h-full transition-width duration-200 rounded-l",a&&"progress-bar-indeterminate-animate"),style:_})}),l==="bottom"&&E]})}function VY(e){switch(e){case"sm":return"h-6";case"xs":return"h-4";default:return"h-8"}}function BY(e){return u.jsx(zY,{...e})}const HY=fe(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"),qY=fe(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"})),WY=2*1024*1024;function KY({className:e,label:t,description:n,value:r,onChange:s,defaultValue:i,diskPrefix:o,showRemoveButton:a,showEditButtonOnHover:l=!1,invalid:c,errorMessage:f,required:d,autoFocus:h,variant:p="input",previewSize:g="h-80",placeholderIcon:w,stretchPreview:b=!1,previewRadius:y,disabled:m}){const{uploadFile:v,entry:_,uploadStatus:S,deleteEntry:E,isDeletingEntry:j,percentage:R}=UY(),M=x.useRef(null);$p({autoFocus:h},M);const L=x.useId(),z=t?`${L}-label`:void 0,H=n?`${L}-description`:void 0,Y=r||(_==null?void 0:_.url),V={showToastOnRestrictionFail:!0,restrictions:{allowedFileTypes:[Qv.image],maxFileSize:WY},metadata:{diskPrefix:o,disk:ic.public},onSuccess:$=>{s==null||s($.url)},onError:$=>{$&&ke.danger($)}},K=Rl({description:n,descriptionPosition:"top",invalid:c});let P;p==="avatar"?P=YY:p==="square"?P=QY:P=GY;const T=a?u.jsx(le,{variant:"link",color:"danger",size:"xs",disabled:j||!Y||m,onClick:()=>{E({onSuccess:()=>s==null?void 0:s("")})},children:u.jsx(k,{message:"Remove image"})}):null,C=i!=null&&r!==i?u.jsx(le,{variant:"outline",color:"primary",size:"xs",disabled:m,onClick:()=>{s==null||s(i)},children:u.jsx(k,{message:"Use default"})}):null,D=x.useCallback(()=>{var $;($=M.current)==null||$.click()},[]);return u.jsxs("div",{className:B("text-sm",e),children:[t&&u.jsx("div",{id:z,className:K.label,children:t}),n&&u.jsx("div",{className:K.description,children:n}),u.jsx("div",{"aria-labelledby":z,"aria-describedby":H,children:u.jsxs(Ix,{fieldClassNames:K,errorMessage:f,invalid:c,children:[u.jsx(P,{inputFieldClassNames:K,placeholderIcon:w,previewSize:g,isLoading:S==="inProgress",imageUrl:Y,removeButton:T,useDefaultButton:C,showEditButtonOnHover:l,stretchPreview:b,previewRadius:y,handleUpload:D,disabled:m,children:u.jsx("input",{ref:M,"aria-labelledby":z,"aria-describedby":H,required:Y?!1:d,accept:Qv.image,type:"file",disabled:S==="inProgress",className:"sr-only",onChange:$=>{var I;(I=$.target.files)!=null&&I.length&&v($.target.files[0],V)}})}),S==="inProgress"&&u.jsx(BY,{className:"absolute left-0 right-0 top-0",size:"xs",value:R})]})})]})}function GY({children:e,inputFieldClassNames:t,imageUrl:n,previewSize:r,stretchPreview:s,isLoading:i,handleUpload:o,removeButton:a,useDefaultButton:l,disabled:c}){return n?u.jsxs(x.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:B("mx-auto h-full rounded",s?"object-cover":"object-contain"),onClick:()=>o(),src:n,alt:""}),e]}),u.jsx(le,{onClick:()=>o(),disabled:i||c,className:"mr-10",variant:"outline",color:"primary",size:"xs",children:u.jsx(k,{message:"Replace"})}),a&&x.cloneElement(a,{variant:"outline"}),l&&x.cloneElement(l,{variant:"outline"})]}):x.cloneElement(e,{className:B(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 QY({children:e,placeholderIcon:t,previewSize:n,imageUrl:r,stretchPreview:s,handleUpload:i,removeButton:o,useDefaultButton:a,previewRadius:l="rounded",showEditButtonOnHover:c=!1,disabled:f}){return u.jsxs("div",{children:[u.jsxs("div",{className:B(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&&x.cloneElement(t,{size:"lg"}),u.jsx(le,{variant:"raised",color:"white",size:"xs",className:B(c&&"invisible group-hover:visible"),disabled:f,children:r?u.jsx(k,{message:"Replace image"}):u.jsx(k,{message:"Upload image"})})]}),e,(o||a)&&u.jsxs("div",{className:"mt-8",children:[o&&x.cloneElement(o,{variant:"link"}),a&&x.cloneElement(a,{variant:"link"})]})]})}function YY({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(qY,{viewBox:"0 0 48 48",className:B("h-full w-full bg-primary-light/40 text-primary/40",l)})),u.jsxs("div",{children:[u.jsxs("div",{className:B("relative",n),onClick:()=>a(),children:[s?u.jsx("img",{src:s,className:B("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(ir,{disabled:r||c,type:"button",variant:"outline",size:"sm",color:"primary",radius:"rounded-full",children:u.jsx(HY,{})})})]}),e,(i||o)&&u.jsxs("div",{className:"mt-14",children:[i&&x.cloneElement(i,{variant:"link"}),o&&x.cloneElement(o,{variant:"link"})]})]})}function XY(e){const{field:{onChange:t,value:n=null},fieldState:{error:r}}=Pl({name:e.name}),s={onChange:t,value:n,invalid:r!=null,errorMessage:r?u.jsx(k,{message:"Please select an image."}):null};return u.jsx(KY,{...ds(s,e)})}function JY({user:e}){const t=cG({user:e}),n=dG({user:e}),r=x.useId(),s=rn({defaultValues:{first_name:e.first_name||"",last_name:e.last_name||"",country:e.country||"PT",domain_phone:e.domain_phone||"",domain_tax_id:e.domain_tax_id||"",domain_organization:e.domain_organization||"",domain_address:e.domain_address||"",domain_city:e.domain_city||"",domain_postal_code:e.domain_postal_code||"",avatar:e.avatar}}),i=KR(s);return u.jsx(ui,{id:Dr.AccountDetails,title:u.jsx(k,{message:"Dados pessoais e titular de dominios"}),actions:u.jsx(le,{type:"submit",variant:"flat",color:"primary",form:r,disabled:i.isPending||!s.formState.isValid,children:u.jsx(k,{message:"Save"})}),children:u.jsxs(sn,{form:s,className:"flex flex-col-reverse items-start gap-40 md:flex-row md:gap-60",onSubmit:o=>{i.mutate(o)},id:r,children:[u.jsxs("div",{className:"flex-auto w-full",children:[u.jsx(Ee,{className:"mb-24",name:"first_name",label:u.jsx(k,{message:"First name"})}),u.jsx(Ee,{name:"last_name",label:u.jsx(k,{message:"Last name"})}),u.jsxs("div",{className:"my-24 border-t border-slate-200 pt-20",children:[u.jsx("h3",{className:"text-base font-semibold text-slate-900",children:"Dados obrigatorios para registar dominios"}),u.jsx("p",{className:"mt-4 text-sm text-slate-500",children:"Estes dados sao enviados ao fornecedor apenas quando comprar um dominio."})]}),u.jsxs("div",{className:"grid gap-16 md:grid-cols-2",children:[u.jsx(Ee,{name:"domain_phone",label:"Telefone"}),u.jsx(Ee,{name:"domain_tax_id",label:"NIF / identificacao fiscal"}),u.jsx(Ee,{name:"domain_organization",label:"Empresa (opcional)"}),u.jsx(Ee,{name:"country",label:"Pais (codigo ISO, ex. PT)"}),u.jsx(Ee,{className:"md:col-span-2",name:"domain_address",label:"Morada"}),u.jsx(Ee,{name:"domain_city",label:"Cidade"}),u.jsx(Ee,{name:"domain_postal_code",label:"Codigo postal"})]})]}),u.jsx(IY,{children:u.jsx(XY,{className:"md:mr-80",variant:"avatar",previewSize:"w-90 h-90",showRemoveButton:!0,name:"avatar",diskPrefix:"avatars",label:u.jsx(k,{message:"Profile image"}),onChange:o=>{o?t.mutate({url:o}):n.mutate()}})})]})})}function ZY(e){return Pe({mutationFn:t=>eX(t),onSuccess:()=>{ke(ye("Password changed"))},onError:t=>Cn(t,e)})}function eX(e){return ae.put("auth/user/password",e).then(t=>t.data)}function tX(){const e=rn(),t=x.useId(),n=ZY(e);return u.jsx(ui,{id:Dr.Password,title:u.jsx(k,{message:"Update password"}),actions:u.jsx(le,{type:"submit",form:t,variant:"flat",color:"primary",disabled:!e.formState.isValid||n.isPending,children:u.jsx(k,{message:"Update password"})}),children:u.jsxs(sn,{form:e,id:t,onSubmit:r=>{n.mutate(r,{onSuccess:()=>{e.reset()}})},children:[u.jsx(Ee,{className:"mb-24",name:"current_password",label:u.jsx(k,{message:"Current password"}),type:"password",autoComplete:"current-password",required:!0}),u.jsx(Ee,{className:"mb-24",name:"password",label:u.jsx(k,{message:"New password"}),type:"password",autoComplete:"new-password",required:!0}),u.jsx(Ee,{name:"password_confirmation",label:u.jsx(k,{message:"Confirm password"}),type:"password",autoComplete:"new-password",required:!0})]})})}function RN({isLoading:e,icon:t}){const n=x.useRef(null),{trans:r}=lr(),[s,i]=x.useState(!1),{state:{isOpen:o,inputValue:a}}=Lx(),l=x.useRef(a);return x.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(ms,{"aria-label":r({message:"Loading"}),size:"sm",isIndeterminate:!0}):t||u.jsx(J1,{})}function nX(e,t){var dt;const{children:n,items:r,isAsync:s,isLoading:i,openMenuOnFocus:o=!0,endAdornmentIcon:a,onItemSelected:l,maxItems:c,clearInputOnItemSelection:f,inputValue:d,selectedValue:h,onSelectionChange:p,allowCustomValue:g=!1,onInputValueChange:w,defaultInputValue:b,selectionMode:y="single",useOptionLabelAsInputValue:m,showEmptyMessage:v,floatingMaxHeight:_,hideEndAdornment:S=!1,blurReferenceOnItemSelection:E,isOpen:j,onOpenChange:R,prependListbox:M,listboxClassName:L,onEndAdornmentClick:z,autoFocusFirstItem:H=!0,focusLoopingMode:Y,...V}=e,K=Fp({...e,floatingMaxHeight:_,blurReferenceOnItemSelection:E,selectionMode:y,role:"listbox",virtualFocus:!0,clearSelectionOnInputClear:!0},t),{reference:P,listboxId:T,onInputChange:C,state:{isOpen:D,setIsOpen:$,inputValue:I,setInputValue:q,selectValues:ie,selectedValues:te,setActiveCollection:xe},collection:X}=K,ue=te[0]?(dt=X.get(te[0]))==null?void 0:dt.textLabel:void 0,{handleListboxSearchFieldKeydown:ge}=zp(K),it=On(Ce=>{o&&!D&&$(!0),Ce.target.select()});return u.jsx(Up,{prepend:M,className:L,listbox:K,mobileOverlay:vu,isLoading:i,onPointerDown:Ce=>{Ce.preventDefault()},children:u.jsx(Gc,{inputRef:P,...V,endAdornment:S?null:u.jsx(ir,{size:"md",tabIndex:-1,disabled:V.disabled,className:"pointer-events-auto",onPointerDown:Ce=>{Ce.preventDefault(),Ce.stopPropagation(),z?z():(xe("all"),$(!D))},children:u.jsx(RN,{isLoading:i,icon:a})}),"aria-expanded":D?"true":"false","aria-haspopup":"listbox","aria-controls":D?T:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",onChange:C,value:m&&ue?ue:I,onBlur:Ce=>{if(g)ie(Ce.target.value);else if(!f){const Xe=te[0];q(ie.length&&Xe!=null?`${Xe}`:"")}},onFocus:it,onClick:it,onKeyDown:Ce=>ge(Ce)})})}G.forwardRef(nX);function rX(e,t){const n=Dx(),{hideCaret:r,placeholder:s=u.jsx(k,{message:"Select an option..."}),selectedValue:i,onItemSelected:o,onOpenChange:a,onInputValueChange:l,onSelectionChange:c,selectionMode:f,minWidth:d="min-w-128",children:h,searchPlaceholder:p,showEmptyMessage:g,showSearchField:w,defaultInputValue:b,inputValue:y,isLoading:m,isAsync:v,valueClassName:_,floatingWidth:S=n?"auto":"matchTrigger",...E}=e,j=Fp({...e,clearInputOnItemSelection:!0,showEmptyMessage:g||w,floatingWidth:S,selectionMode:"single",role:"listbox",virtualFocus:w},t),{state:{selectedValues:R,isOpen:M,setIsOpen:L,activeIndex:z,setSelectedIndex:H,inputValue:Y,setInputValue:V},collections:K,focusItem:P,listboxId:T,reference:C,refs:D,listContent:$,onInputChange:I}=j,{fieldProps:q,inputProps:ie}=hR({...E,focusRef:D.reference}),te=K.collection.get(R[0]),xe=te?u.jsxs("span",{className:"flex items-center gap-10",children:[te.element.props.startIcon,u.jsx("span",{className:B("overflow-hidden overflow-ellipsis whitespace-nowrap",_),children:te.element.props.children})]}):u.jsx("span",{className:"italic",children:s}),X=Rl({...e,endAdornment:!0}),{handleTriggerKeyDown:ue,handleListboxKeyboardNavigation:ge,handleListboxSearchFieldKeydown:it}=zp(j),{findMatchingItem:dt}=Mx(),Ce=Ut=>{if(!M)return;const Ie=dt(Ut,$,z);Ie!=null&&P("increment",Ie)},Xe=Ut=>{if(M)return;const Ie=dt(Ut,$,z);Ie!=null&&H(Ie)};return u.jsx(Up,{listbox:j,onKeyDownCapture:w?void 0:Ce,onKeyDown:ge,onClose:w?()=>V(""):void 0,isLoading:m,searchField:w&&u.jsx(Gc,{size:e.size==="xs"||e.size==="sm"?"xs":"sm",placeholder:p,startAdornment:u.jsx(ER,{}),className:"flex-shrink-0 px-8 pb-8 pt-4",autoFocus:!0,"aria-expanded":M?"true":"false","aria-haspopup":"listbox","aria-controls":M?T:void 0,"aria-autocomplete":"list",autoComplete:"off",autoCorrect:"off",spellCheck:"false",value:Y,onChange:I,onKeyDown:Ut=>{it(Ut)}}),children:u.jsx(Ix,{fieldClassNames:X,...q,endAdornment:!r&&u.jsx(RN,{isLoading:m}),children:u.jsx("button",{...ie,type:"button","data-selected-value":te==null?void 0:te.value,"aria-expanded":M?"true":"false","aria-haspopup":"listbox","aria-controls":M?T:void 0,ref:C,onKeyDown:ue,onKeyDownCapture:w?void 0:Xe,disabled:E.disabled,onClick:()=>{L(!M)},className:B(X.input,!q.unstyled&&d),children:xe})})})}const sX=G.forwardRef(rX);function Yv({children:e,...t}){const{field:{onChange:n,onBlur:r,value:s=null,ref:i},fieldState:{invalid:o,error:a}}=Pl({name:t.name}),l={onSelectionChange:n,onBlur:r,selectedValue:s,invalid:o,errorMessage:a==null?void 0:a.message,name:t.name},c=t.errorMessage||(a==null?void 0:a.message);return u.jsx(sX,{ref:i,...ds(l,t,{errorMessage:c}),children:e})}function iX({name:e,size:t,timezones:n,label:r,...s}){const{trans:i}=lr();return u.jsx(Yv,{selectionMode:"single",name:e,size:t,label:r,showSearchField:!0,searchPlaceholder:i(ye("Search timezones")),...s,children:Object.entries(n).map(([o,a])=>u.jsx(bR,{label:o,children:a.map(l=>u.jsx(Qt,{value:l.value,children:l.text},l.value))},o))})}function oX({user:e}){const t=x.useId(),{trans:n}=lr(),r=rn({defaultValues:{language:e.language||"",country:e.country||"",timezone:e.timezone||Oc()}}),s=KR(r),i=BR(),{data:o}=zR(["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(ui,{id:Dr.LocationAndLanguage,title:u.jsx(k,{message:"Date, time and language"}),actions:u.jsx(le,{type:"submit",variant:"flat",color:"primary",form:t,disabled:s.isPending||!r.formState.isValid,children:u.jsx(k,{message:"Save"})}),children:u.jsxs(sn,{form:r,onSubmit:f=>{s.mutate(f),i.mutate({locale:f.language})},id:t,children:[u.jsx(Yv,{className:"mb-24",selectionMode:"single",name:"language",label:u.jsx(k,{message:"Language"}),children:l.map(f=>u.jsx(Qt,{value:f.language,children:f.name},f.language))}),u.jsx(Yv,{className:"mb-24",selectionMode:"single",name:"country",label:u.jsx(k,{message:"Country"}),showSearchField:!0,searchPlaceholder:n(ye("Search countries")),children:a.map(f=>u.jsx(Qt,{value:f.code,children:f.name},f.code))}),u.jsx(iX,{label:u.jsx(k,{message:"Timezone"}),name:"timezone",timezones:c})]})})}function aX(e){const t=x.useRef(null);e&&t.current&&Ki(e,t.current)&&(e=t.current),t.current=e;const{localeCode:n}=lo();return x.useMemo(()=>new AF(n,e),[n,e])}const lX={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"},timestamp:{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"}},uX=x.memo(({date:e,options:t,preset:n})=>{const{dates:r}=ve(),s=Ik(),i=aX(t||lX[n||(r==null?void 0:r.format)]);if(!e)return null;try{typeof e=="string"?e=Rk(e).toDate():"toDate"in e&&(e=e.toDate(s))}catch{return null}return u.jsx(x.Fragment,{children:i.format(e)})},Ki);function NN({className:e,title:t,body:n,confirm:r,isDanger:s,isLoading:i,onConfirm:o}){const{close:a}=Ic();return u.jsxs(yl,{className:e,size:"sm",role:"alertdialog",children:[u.jsx(vl,{color:s?"text-danger":null,leftAdornment:u.jsx(K4,{className:"icon-sm"}),children:t}),u.jsx(xl,{children:n}),u.jsxs(Lp,{children:[u.jsx(le,{variant:"text",onClick:()=>{a(!1)},children:u.jsx(k,{message:"Cancel"})}),u.jsx(le,{disabled:i,variant:"flat",color:s?"danger":"primary",onClick:()=>{o==null||o(),o||a(!0)},children:r})]})]})}function cX({id:e}){return ae.delete(`access-tokens/${e}`).then(t=>t.data)}function fX(){return Pe({mutationFn:e=>cX(e),onSuccess:()=>{ke(ye("Token deleted"))},onError:e=>xt(e)})}var dX=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r"u"){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var d=WE[t.format]||WE.default;window.clipboardData.setData(d,e)}else f.clipboardData.clearData(),f.clipboardData.setData(t.format,e);t.onCopy&&(f.preventDefault(),t.onCopy(f.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(f){n&&console.error("unable to copy using execCommand: ",f),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(d){n&&console.error("unable to copy using clipboardData: ",d),n&&console.error("falling back to prompt"),r=mX("message"in t?t.message:pX),window.prompt(r,e)}}finally{o&&(typeof o.removeRange=="function"?o.removeRange(i):o.removeAllRanges()),a&&document.body.removeChild(a),s()}return l}var yX=gX;const vX=Nr(yX);function xX(e,t){var n=x.useState(!1),r=n[0],s=n[1],i=t&&t.successDuration;return x.useEffect(function(){if(r&&i){var o=setTimeout(function(){s(!1)},i);return function(){clearTimeout(o)}}},[r,i]),[r,function(){var o=vX(e);s(o)}]}function bX(e){return ae.post("access-tokens",e).then(t=>t.data)}function wX(e){return Pe({mutationFn:t=>bX(t),onSuccess:()=>{ke(ye("Token create"))},onError:t=>Cn(t,e)})}function _X(){const e=rn(),{formId:t,close:n}=Ic(),r=wX(e),[s,i]=x.useState(),o=u.jsx(sn,{form:e,id:t,onSubmit:a=>{r.mutate(a,{onSuccess:l=>{i(l.plainTextToken),Ye.invalidateQueries({queryKey:["users"]})}})},children:u.jsx(Ee,{name:"tokenName",label:u.jsx(k,{message:"Token name"}),required:!0,autoFocus:!0})});return u.jsxs(yl,{children:[u.jsx(vl,{children:u.jsx(k,{message:"Create new token"})}),u.jsx(xl,{children:s?u.jsx(SX,{plainTextToken:s}):o}),u.jsxs(Lp,{children:[u.jsx(le,{variant:"text",onClick:n,children:u.jsx(k,{message:"Done"})}),!s&&u.jsx(le,{variant:"flat",color:"primary",type:"submit",form:t,disabled:r.isPending,children:u.jsx(k,{message:"Create"})})]})]})}function SX({plainTextToken:e}){const[t,n]=xX(e||"",{successDuration:1e3});return u.jsxs(u.Fragment,{children:[u.jsx(Gc,{readOnly:!0,value:e,autoFocus:!0,onClick:r=>{r.currentTarget.focus(),r.currentTarget.select()},endAppend:u.jsx(le,{variant:"flat",color:"primary",onClick:n,children:t?u.jsx(k,{message:"Copied!"}):u.jsx(k,{message:"Copy"})})}),u.jsxs("div",{className:"flex items-center gap-10 mt-14 text-sm",children:[u.jsx(X1,{size:"sm",className:"text-danger"}),u.jsx(k,{message:"Make sure to store the token in a safe place. After this dialog is closed, token will not be viewable anymore."})]})]})}const EX=""+new URL("secure-files-17b4728d.svg",import.meta.url).href;function CX({user:e}){const t=e.tokens||[],{hasPermission:n}=bt(),{api:r}=ve();return!(r!=null&&r.integrated)||!n("api.access")?null:u.jsx(ui,{id:Dr.Developers,title:u.jsx(k,{message:"API access tokens"}),titleSuffix:u.jsx(tt,{className:ii,to:"/api-docs",target:"_blank",children:u.jsx(k,{message:"Documentation"})}),actions:u.jsx(jX,{}),children:t.length?t.map((s,i)=>u.jsx(TX,{token:s,isLast:i===t.length-1},s.id)):u.jsx(zx,{className:"py-40",image:u.jsx(T1,{src:EX}),title:u.jsx(k,{message:"You have no personal access tokens yet"})})})}function TX({token:e,isLast:t}){return u.jsxs("div",{className:B("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(k,{message:"Name"})}),u.jsx("div",{children:e.name}),u.jsx("div",{className:"font-semibold mt-10",children:u.jsx(k,{message:"Last used"})}),u.jsx("div",{children:e.last_used_at?u.jsx(uX,{date:e.last_used_at}):u.jsx(k,{message:"Never"})})]}),u.jsx(kX,{token:e})]})}function jX(){return u.jsxs(Nl,{type:"modal",children:[u.jsx(le,{variant:"flat",color:"primary",children:u.jsx(k,{message:"Create token"})}),u.jsx(_X,{})]})}function kX({token:e}){const t=fX();return u.jsxs(Nl,{type:"modal",onClose:n=>{n&&t.mutate({id:e.id},{onSuccess:()=>Ye.invalidateQueries({queryKey:["users"]})})},children:[u.jsx(le,{size:"xs",variant:"outline",color:"danger",className:"flex-shrink-0 ml-auto",children:u.jsx(k,{message:"Delete"})}),u.jsx(NN,{isDanger:!0,title:u.jsx(k,{message:"Delete token?"}),body:u.jsx(k,{message:"This token will be deleted immediately and permanently. Once deleted, it can no longer be used to make API requests."}),confirm:u.jsx(k,{message:"Delete"})})]})}function PX(){const{user:e}=bt(),t=Bx();return Pe({mutationFn:()=>RX(e.id),onSuccess:()=>{ke("Account deleted"),t.mutate()},onError:n=>xt(n)})}function RX(e){return ae.delete(`users/${e}`,{params:{deleteCurrentUser:!0}}).then(t=>t.data)}function NX(){return or({queryKey:["password-confirmation-status"],queryFn:()=>OX()})}function OX(){return ae.get("auth/user/confirmed-password-status",{params:{seconds:9e3}}).then(e=>e.data)}function AX(e){Ye.setQueryData(["password-confirmation-status"],{confirmed:e})}function IX(e){return Pe({mutationFn:t=>DX(t),onError:t=>Cn(t,e)})}function DX(e){return ae.post("auth/user/confirm-password",e).then(t=>t.data)}function $X(){const{close:e,formId:t}=Ic(),n=rn(),r=IX(n);return u.jsxs(yl,{children:[u.jsx(vl,{children:u.jsx(k,{message:"Confirm password"})}),u.jsxs(xl,{children:[u.jsx("p",{className:"text-sm mb-16",children:u.jsx(k,{message:"For your security, please confirm your password to continue."})}),u.jsx(sn,{id:t,form:n,onSubmit:s=>r.mutate(s,{onSuccess:()=>e(s.password)}),children:u.jsx(Ee,{name:"password",label:u.jsx(k,{message:"Password"}),type:"password",required:!0,autoFocus:!0})})]}),u.jsxs(Lp,{children:[u.jsx(le,{onClick:()=>e(),children:u.jsx(k,{message:"Cancel"})}),u.jsx(le,{type:"submit",variant:"flat",color:"primary",form:t,disabled:r.isPending,children:u.jsx(k,{message:"Confirm"})})]})]})}function Jc({needsPassword:e}={}){const{data:t,isLoading:n}=NX(),r=x.useRef(),s=x.useCallback(async i=>{if(t!=null&&t.confirmed&&(r.current||!e))i(r.current);else{const o=await Xk($X);o&&(r.current=o,AX(!0),i(r.current))}},[t==null?void 0:t.confirmed,e]);return{isLoading:n,withConfirmedPassword:s}}function LX(){const e=PX(),{withConfirmedPassword:t,isLoading:n}=Jc(),[r,s]=x.useState(!1);return u.jsxs(ui,{id:Dr.DeleteAccount,title:u.jsx(k,{message:"Danger zone"}),children:[u.jsx(Nl,{type:"modal",isOpen:r,onOpenChange:s,onClose:i=>{i&&e.mutate()},children:u.jsx(NN,{isDanger:!0,title:u.jsx(k,{message:"Delete account?"}),body:u.jsx(k,{message:"Your account will be deleted immediately and permanently. Once deleted, accounts can not be restored."}),confirm:u.jsx(k,{message:"Delete"})})}),u.jsx(le,{variant:"flat",color:"danger",disabled:n||e.isPending,onClick:()=>{t(()=>{s(!0)})},children:u.jsx(k,{message:"Delete account"})})]})}function MX(){return Pe({mutationFn:FX,onError:e=>xt(e)})}function FX(){return ae.post("auth/user/two-factor-authentication").then(e=>e.data)}function Zx({title:e,subtitle:t,description:n,actions:r,children:s}){return t||(t=u.jsx(k,{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(x.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 UX({onEnabled:e}){const t=MX(),{withConfirmedPassword:n,isLoading:r}=Jc(),s=t.isPending||r;return u.jsx(Zx,{title:u.jsx(k,{message:"You have not enabled two factor authentication."}),actions:u.jsx(le,{variant:"flat",color:"primary",disabled:s,onClick:()=>{n(()=>{t.mutate(void 0,{onSuccess:e})})},children:u.jsx(k,{message:"Enable"})})})}function zX(){return or({queryKey:["two-factor-qr-code"],queryFn:()=>VX()})}function VX(){return ae.get("auth/user/two-factor/qr-code").then(e=>e.data)}function BX(e){return Pe({mutationFn:t=>HX(t),onError:t=>Cn(t,e)})}function HX(e){return ae.post("auth/user/confirmed-two-factor-authentication",e).then(t=>t.data)}function Br({variant:e="text",animation:t="wave",size:n,className:r,display:s="block",radius:i="rounded",style:o}){return u.jsx("span",{style:o,className:B("skeleton relative overflow-hidden bg-fg-base/4 bg-no-repeat will-change-transform",i,qX({variant:e,size:n}),s,e==="text"&&"origin-[0_55%] scale-y-[0.6]",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 qX({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"}}function ON(){return Pe({mutationFn:WX,onError:e=>xt(e)})}function WX(){return ae.delete("auth/user/two-factor-authentication").then(e=>e.data)}function KX(e){const{data:t}=zX();return u.jsxs(Zx,{title:u.jsx(k,{message:"Finish enabling two factor authentication."}),description:u.jsx(k,{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(dl,{initial:!1,children:t?u.jsx(KE,{animationKey:"real-svg",svg:u.jsx("div",{dangerouslySetInnerHTML:{__html:t.svg}}),secret:u.jsx(k,{message:"Setup key: :key",values:{key:t.secret}})}):u.jsx(KE,{animationKey:"svg-skeleton",svg:u.jsx(Br,{variant:"rect",size:"w-full h-full"}),secret:u.jsx(Br,{variant:"text",className:"max-w-224"})})}),u.jsx(GX,{...e})]})}function GX({onCancel:e,onConfirmed:t}){const n=rn(),r=BX(n),s=ON(),{withConfirmedPassword:i,isLoading:o}=Jc(),a=r.isPending||s.isPending||o;return u.jsxs(sn,{form:n,onSubmit:l=>i(()=>{r.mutate(l,{onSuccess:()=>{Ye.invalidateQueries({queryKey:["users"]}),t()}})}),children:[u.jsx(Ee,{required:!0,name:"code",label:u.jsx(k,{message:"Code"}),autoFocus:!0}),u.jsxs("div",{className:"flex items-center gap-12 mt-24",children:[u.jsx(le,{type:"button",variant:"outline",disabled:a,onClick:()=>{i(()=>{s.mutate(void 0,{onSuccess:e})})},children:u.jsx(k,{message:"Cancel"})}),u.jsx(le,{type:"submit",variant:"flat",color:"primary",disabled:a,children:u.jsx(k,{message:"Confirm"})})]})]})}function KE({animationKey:e,svg:t,secret:n}){return u.jsxs(cs.div,{...Mp,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 QX(){return Pe({mutationFn:()=>YX(),onError:e=>xt(e)})}function YX(){return ae.post("auth/user/two-factor-recovery-codes").then(e=>e.data)}function XX({user:e,onDisabled:t}){var l;const n=ON(),r=QX(),{withConfirmedPassword:s,isLoading:i}=Jc(),o=n.isPending||r.isPending||i,a=u.jsxs(x.Fragment,{children:[u.jsx(le,{type:"button",onClick:()=>s(()=>{r.mutate(void 0,{onSuccess:()=>{Ye.invalidateQueries({queryKey:["users"]})}})}),variant:"outline",disabled:o,className:"mr-12",children:u.jsx(k,{message:"Regenerate recovery codes"})}),u.jsx(le,{type:"submit",variant:"flat",color:"danger",disabled:o,onClick:()=>{s(()=>{n.mutate(void 0,{onSuccess:()=>{ke(ye("Two factor authentication has been disabled.")),t()}})})},children:u.jsx(k,{message:"Disable"})})]});return u.jsx(Zx,{title:u.jsx(k,{message:"You have enabled two factor authentication."}),description:u.jsx(k,{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 JX({user:e}){const[t,n]=x.useState(ZX(e));switch(t){case 0:return u.jsx(UX,{onEnabled:()=>n(1)});case 1:return u.jsx(KX,{onCancel:()=>{n(0)},onConfirmed:()=>{n(2)}});case 2:return u.jsx(XX,{user:e,onDisabled:()=>n(0)})}}function ZX(e){return e.two_factor_confirmed_at?2:e.two_factor_recovery_codes?1:0}function eJ(){return or({queryKey:["user-sessions"],queryFn:()=>tJ()})}function tJ(){return ae.get("user-sessions").then(e=>e.data)}const nJ=fe(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"),rJ=fe(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"),sJ=fe(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 iJ(){return Pe({mutationFn:e=>oJ(e),onError:e=>xt(e)})}function oJ(e){return ae.post("user-sessions/logout-other",e).then(t=>t.data)}function aJ({user:e}){var a;const{data:t,isLoading:n}=eJ(),r=iJ(),{withConfirmedPassword:s,isLoading:i}=Jc({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(lJ,{session:l},l.id))});return u.jsxs(ui,{id:Dr.Sessions,title:u.jsx(k,{message:"Active sessions"}),children:[u.jsx("p",{className:"text-sm",children:u.jsx(k,{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(ms,{isIndeterminate:!0})}):o}),u.jsx(le,{variant:"outline",color:"primary",disabled:i||r.isPending,onClick:()=>{s(l=>{r.mutate({password:l},{onSuccess:()=>{ke(ye("Logged out other sessions."))}})})},children:u.jsx(k,{message:"Logout other sessions"})})]})}function lJ({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(uJ,{device:e.device_type,size:"lg"})}),u.jsxs("div",{className:"flex-auto",children:[u.jsxs("div",{children:[u.jsx(GE,{children:e.platform})," -"," ",u.jsx(GE,{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(fJ,{session:e})," - ",u.jsx(cJ,{session:e})]})]})]})}function uJ({device:e,size:t}){switch(e){case"mobile":return u.jsx(rJ,{size:t});case"tablet":return u.jsx(sJ,{size:t});default:return u.jsx(nJ,{size:t})}}function cJ({session:e}){return e.is_current_device?u.jsx("span",{className:"text-positive",children:u.jsx(k,{message:"This device"})}):u.jsx(Lk,{date:e.last_active})}function fJ({session:e}){return e.ip_address?u.jsx("span",{children:e.ip_address}):e.token?u.jsx(k,{message:"API Token"}):u.jsx(k,{message:"Unknown IP"})}function GE({children:e}){return e?u.jsx(x.Fragment,{children:e}):u.jsx(k,{message:"Unknown"})}function dJ(){var r;const{auth:e}=x.useContext(fs),{data:t,isLoading:n}=WR("me",{with:["roles","social_profiles","tokens"]});return u.jsxs("div",{className:"min-h-screen bg-alt",children:[u.jsx(gs,{children:u.jsx(k,{message:"Account Settings"})}),u.jsx(yo,{menuPosition:"account-settings-page"}),u.jsx("div",{children:u.jsxs("div",{className:"container mx-auto px-24 py-24",children:[u.jsx("h1",{className:"text-3xl",children:u.jsx(k,{message:"Account settings"})}),u.jsx("div",{className:"mb-40 text-base text-muted",children:u.jsx(k,{message:"View and update your account details, profile and more."})}),n||!t?u.jsx(ms,{className:"my-80","aria-label":"Loading user..",isIndeterminate:!0}):u.jsxs("div",{className:"flex items-start gap-24",children:[u.jsx(oG,{}),u.jsxs("main",{className:"flex-auto",children:[(r=e.accountSettingsPanels)==null?void 0:r.map(s=>u.jsx(s.component,{user:t.user},s.id)),u.jsx(JY,{user:t.user}),u.jsx(aG,{user:t.user}),u.jsx(tX,{}),u.jsx(ui,{id:Dr.TwoFactor,title:u.jsx(k,{message:"Two factor authentication"}),children:u.jsx("div",{className:"max-w-580",children:u.jsx(JX,{user:t.user})})}),u.jsx(aJ,{user:t.user}),u.jsx(oX,{user:t.user}),u.jsx(CX,{user:t.user}),u.jsx(LX,{})]})]})]})})]})}function hJ(e){const t=Hn();return Pe({mutationFn:pJ,onSuccess:n=>{ke(n.message),t("/login")},onError:n=>Cn(n,e)})}function pJ(e){return ae.post("auth/forgot-password",e).then(t=>t.data)}function mJ(){const{registration:e}=ve(),[t]=sx(),n=t.get("email")||void 0,r=rn({defaultValues:{email:n}}),s=hJ(r),i=!e.disable&&u.jsx(k,{values:{a:o=>u.jsx(tt,{className:ii,to:"/register",children:o})},message:"Don't have an account? Sign up."});return u.jsxs(Yc,{message:i,children:[u.jsx(gs,{children:u.jsx(k,{message:"Forgot Password"})}),u.jsxs(sn,{form:r,onSubmit:o=>{s.mutate(o)},children:[u.jsx("div",{className:"mb-32 text-sm",children:u.jsx(k,{message:"Enter your email address below and we will send you a link to reset or create your password."})}),u.jsx(Ee,{disabled:!!n,className:"mb-32",name:"email",type:"email",autoComplete:"off",autoCorrect:"off",spellCheck:"false",label:u.jsx(k,{message:"Email"}),required:!0}),u.jsx(le,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:s.isPending,children:u.jsx(k,{message:"Continue"})})]})]})}function gJ(e){return ae.post("auth/reset-password",e).then(t=>t.data)}function yJ(e){const t=Hn();return Pe({mutationFn:gJ,onSuccess:()=>{t("/login",{replace:!0}),ke(ye("Your password has been reset!"))},onError:n=>Cn(n,e)})}function vJ(){const{token:e}=rx(),t=rn({defaultValues:{token:e}}),n=yJ(t),r=u.jsx(k,{message:"Reset your account password"}),s=u.jsx(k,{values:{a:i=>u.jsx(tt,{className:ii,to:"/register",children:i})},message:"Don't have an account? Sign up."});return u.jsxs(Yc,{heading:r,message:s,children:[u.jsx(gs,{children:u.jsx(k,{message:"Reset Password"})}),u.jsxs(sn,{form:t,onSubmit:i=>{n.mutate(i)},children:[u.jsx(Ee,{className:"mb-32",name:"email",type:"email",label:u.jsx(k,{message:"Email"}),required:!0}),u.jsx(Ee,{className:"mb-32",name:"password",type:"password",label:u.jsx(k,{message:"New password"}),required:!0}),u.jsx(Ee,{className:"mb-32",name:"password_confirmation",type:"password",label:u.jsx(k,{message:"Confirm password"}),required:!0}),u.jsx(le,{className:"block w-full",type:"submit",variant:"flat",color:"primary",size:"md",disabled:n.isPending,children:u.jsx(k,{message:"Reset password"})})]})]})}const xJ=u.jsxs(x.Fragment,{children:[u.jsx(Be,{path:"/register",element:u.jsx(Dv,{})}),u.jsx(Be,{path:"/account-settings",element:u.jsx(ia,{children:u.jsx(dJ,{})})}),u.jsx(Be,{path:"login",element:u.jsx(Ts,{children:u.jsx(Lv,{})})}),u.jsx(Be,{path:"/workspace/join/register",element:u.jsx(Ts,{children:u.jsx(Dv,{})})}),u.jsx(Be,{path:"/workspace/join/login",element:u.jsx(Ts,{children:u.jsx(Lv,{})})}),u.jsx(Be,{path:"forgot-password",element:u.jsx(Ts,{children:u.jsx(mJ,{})})}),u.jsx(Be,{path:"/password/reset/:token",element:u.jsx(Ts,{children:u.jsx(vJ,{})})})]}),AN="billing/products";function eb(e){return or({queryKey:[AN],queryFn:()=>bJ(),initialData:()=>{var t;if(e)return(t=rr().loaders)==null?void 0:t[e]}})}function bJ(){return ae.get(AN).then(e=>({products:e.data.pagination.data}))}const wJ=fe(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"),Xv=x.forwardRef((e,t)=>{const{children:n,autoFocus:r,size:s,invalid:i,isFirst:o,...a}=e,l=gl(t);$p({autoFocus:r},l);const c=_J(s);return u.jsxs("label",{className:B("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:B("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 qZ(e){const{field:{onChange:t,onBlur:n,value:r,ref:s},fieldState:{invalid:i}}=Pl({name:e.name}),o={onChange:t,onBlur:n,checked:e.value===r,invalid:e.invalid||i};return u.jsx(Xv,{ref:s,...ds(o,e)})}function _J(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 IN=x.forwardRef((e,t)=>{const n=Rl(e),{label:r,children:s,size:i,className:o,orientation:a="horizontal",disabled:l,required:c,invalid:f,errorMessage:d,description:h}=e,p={},g=x.useId(),w=e.name||g;return u.jsxs("fieldset",{"aria-describedby":h?`${g}-description`:void 0,ref:t,className:B("text-left",o),children:[r&&u.jsx("legend",{className:n.label,...p,children:r}),u.jsx("div",{className:B("flex",r?"mt-6":"mt-0",a==="vertical"?"flex-col gap-10":"flex-row gap-16"),children:x.Children.map(s,b=>{if(x.isValidElement(b))return x.cloneElement(b,{name:w,size:i,invalid:b.props.invalid||f||void 0,disabled:b.props.disabled||l,required:b.props.required||c})})}),h&&!d&&u.jsx("div",{className:n.description,id:`${g}-description`,children:h}),d&&u.jsx("div",{className:n.error,children:d})]})});function WZ({children:e,...t}){const{fieldState:{error:n}}=Pl({name:t.name});return u.jsx(IN,{errorMessage:n==null?void 0:n.message,...t,children:e})}function Jv(e,t){if(e==="monthly"){const n=EJ(t);if(n)return n}if(e==="yearly"){const n=SJ(t);if(n)return n}return t[0]}function SJ(e){return e.find(t=>{if(t.interval==="month"&&t.interval_count>=12||t.interval==="year"&&t.interval_count>=1)return t})}function EJ(e){return e.find(t=>{if(t.interval==="day"&&t.interval_count>=30||t.interval==="month"&&t.interval_count>=1)return t})}const CJ=x.memo(({products:e})=>{const t=TJ(e);return t<=0?null:u.jsx(x.Fragment,{children:u.jsxs("span",{className:"font-medium text-positive-darker",children:[" ","(",u.jsx(k,{message:"Save up to :percentage%",values:{percentage:t}}),")"]})})});function TJ(e){if(!(e!=null&&e.length))return 0;const t=e.map(n=>{if(n.hidden)return 0;const r=Jv("monthly",n.prices),s=Jv("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 DN({selectedCycle:e,onChange:t,products:n,...r}){return u.jsxs(IN,{...r,children:[u.jsxs(Xv,{value:"yearly",checked:e==="yearly",onChange:s=>{t(s.target.value)},children:[u.jsx(k,{message:"Annual"}),u.jsx(CJ,{products:n})]}),u.jsx(Xv,{value:"monthly",checked:e==="monthly",onChange:s=>{t(s.target.value)},children:u.jsx(k,{message:"Monthly"})})]})}const jJ=x.memo(({value:e,currency:t})=>{const n=ox({style:"currency",currency:t,currencyDisplay:"narrowSymbol"});return isNaN(e)&&(e=0),u.jsx(x.Fragment,{children:n.format(e)})});function kJ({price:e,variant:t="slash",className:n,priceClassName:r,periodClassName:s}){if(!e)return null;const i=u.jsx(k,{message:e.interval});return u.jsxs("div",{className:B("flex gap-6 items-center",n),children:[u.jsx("div",{className:r,children:u.jsx(jJ,{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(k,{message:"per"})," ",u.jsx("br",{})," ",i]})]})}function PJ({product:e}){return e.feature_list.length?u.jsxs("div",{className:"mt-32 border-t pt-24",children:[u.jsx("div",{className:"mb-10 text-sm font-semibold",children:u.jsx(k,{message:"What's included"})}),e.feature_list.map(t=>u.jsxs("div",{className:"flex items-center gap-10 py-6 text-sm",children:[u.jsx(_R,{className:"text-primary",size:"sm"}),u.jsx(k,{message:t})]},t))]}):null}function $N({selectedCycle:e,className:t,productLoader:n}){const r=eb(n);return u.jsx("div",{className:B("flex flex-col items-stretch gap-24 overflow-x-auto overflow-y-visible pb-20 md:flex-row md:justify-center",t),children:u.jsx(dl,{initial:!1,mode:"wait",children:r.data?u.jsx(RJ,{plans:r.data.products,selectedPeriod:e},"plan-list"):u.jsx(NJ,{},"skeleton-loader")})})}function RJ({plans:e,selectedPeriod:t}){const{isLoggedIn:n,isSubscribed:r}=bt(),s=e.filter(i=>!i.hidden);return u.jsx(x.Fragment,{children:s.map((i,o)=>{const a=o===0,l=o===s.length-1,c=Jv(t,i.prices);let f;return n||(f="/register?redirectFrom=pricing"),r&&(f=`/change-plan/${i.id}/${c==null?void 0:c.id}/confirm`),n&&!i.free&&(f=`/checkout/${i.id}/${c==null?void 0:c.id}`),u.jsxs(cs.div,{...Mp,className:B("w-full rounded-panel border bg px-28 py-28 shadow-lg md:min-w-240 md:max-w-350",a&&"ml-auto",l&&"mr-auto"),children:[u.jsxs("div",{className:"mb-32",children:[u.jsx(pP,{radius:"rounded",size:"sm",className:B("mb-20 w-min",!i.recommended&&"invisible"),children:u.jsx(k,{message:"Most popular"})}),u.jsx("div",{className:"mb-12 text-xl font-semibold",children:u.jsx(k,{message:i.name})}),u.jsx("div",{className:"text-sm text-muted",children:u.jsx(k,{message:i.description})})]}),u.jsxs("div",{children:[c?u.jsx(kJ,{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(k,{message:"Free"})}),u.jsx("div",{className:"mt-60",children:u.jsx(le,{variant:i.recommended?"flat":"outline",color:"primary",className:"w-full",size:"md",elementType:f?tt:void 0,disabled:!f,onClick:()=>{n||!c||!i||Tx("be.onboarding.selected",{productId:i.id,priceId:c.id})},to:f,children:i.free?u.jsx(k,{message:"Get started"}):u.jsx(k,{message:"Upgrade"})})}),u.jsx(PJ,{product:i})]})]},i.id)})})}function NJ(){return u.jsxs(x.Fragment,{children:[u.jsx(_g,{},"skeleton-1"),u.jsx(_g,{},"skeleton-2"),u.jsx(_g,{},"skeleton-3")]})}function _g(){return u.jsxs(cs.div,{...Mp,className:"w-full rounded-lg border px-28 py-90 shadow-lg md:max-w-350",children:[u.jsx(Br,{className:"my-10"}),u.jsx(Br,{className:"mb-40"}),u.jsx(Br,{className:"mb-40 h-30"}),u.jsx(Br,{className:"mb-40 h-40"}),u.jsx(Br,{className:"mb-20"}),u.jsx(Br,{}),u.jsx(Br,{})]})}function OJ(){var r;const e=eb("pricingPage"),[t,n]=x.useState("yearly");return u.jsxs(x.Fragment,{children:[u.jsx(gs,{children:u.jsx(k,{message:"Pricing"})}),u.jsx(yo,{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(k,{message:"Choose the right plan for you"})}),u.jsx(DN,{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($N,{selectedCycle:t,productLoader:"pricingPage"}),u.jsx(AJ,{})]}),u.jsx(Xc,{className:"container mx-auto flex-shrink-0 px-24"})]})}function AJ(){return u.jsxs("div",{className:"my-20 p-24 text-center md:my-80",children:[u.jsx(wJ,{size:"xl",className:"text-muted"}),u.jsx("div",{className:"my-8 md:text-lg",children:u.jsx(k,{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(k,{message:"Our support team will be happy to assist you."})}),u.jsx(le,{variant:"flat",color:"primary",elementType:tt,to:"/contact",children:u.jsx(k,{message:"Contact us"})})]})}const IJ=G.lazy(()=>co(()=>import("./billing-page-routes-de1b7624.js"),["./billing-page-routes-de1b7624.js","./use-resume-subscription-af152952.js","./section-helper-fc669f0d.js","./billing-redirect-message-1eee2256.js","./TaskAlt-bd5698f5.js","./use-billing-user-3031ab82.js","./CalendarToday-5f53caba.js","./Edit-1f4792b7.js","./OpenInNew-d22aad8d.js"],import.meta.url)),DJ=G.lazy(()=>co(()=>import("./checkout-routes-324ca5bd.js"),["./checkout-routes-324ca5bd.js","./billing-redirect-message-1eee2256.js","./TaskAlt-bd5698f5.js"],import.meta.url)),$J=u.jsxs(x.Fragment,{children:[u.jsx(Be,{path:"/pricing",element:u.jsx(OJ,{})}),u.jsx(Be,{path:"checkout/*",element:u.jsx(G.Suspense,{fallback:u.jsx(Si,{screen:!0}),children:u.jsx(DJ,{})})}),u.jsx(Be,{path:"billing/*",element:u.jsx(G.Suspense,{fallback:u.jsx(Si,{screen:!0}),children:u.jsx(IJ,{})})})]});function LJ(){const{user:e}=bt(),{data:t,isLoading:n}=sr({perPage:30}),r=!!(e!=null&&e.unread_notifications_count),s=Z1(),{notif:i}=ve(),o=()=>{t&&s.mutate({markAllAsUnread:!0})},a=u.jsx(le,{variant:"outline",color:"primary",size:"xs",startIcon:u.jsx($R,{}),onClick:o,disabled:s.isPending||n,className:"ml-auto",children:u.jsx(k,{message:"Mark all as read"})});return u.jsxs(x.Fragment,{children:[u.jsx(gs,{children:u.jsx(k,{message:"Notifications"})}),u.jsx(yo,{menuPosition:"notifications-page"}),u.jsxs("div",{className:"container mx-auto min-h-[1000px] p-16 md:p-24",children:[u.jsxs("div",{className:"mb-30 flex items-center gap-24",children:[u.jsx("h1",{className:"text-3xl",children:u.jsx(k,{message:"Notifications"})}),r&&a,i.subs.integrated&&u.jsx(ir,{className:"ml-auto text-muted",elementType:tt,to:"/notifications/settings",target:"_blank",children:u.jsx(MR,{})})]}),u.jsx(MJ,{})]}),u.jsx(Xc,{className:"container mx-auto mt-48 p-16 md:p-24"})]})}function MJ(){const{data:e,isLoading:t}=sr({perPage:30});return t?u.jsx("div",{className:"flex items-center justify-center py-10",children:u.jsx(ms,{"aria-label":"Loading notifications...",isIndeterminate:!0})}):e!=null&&e.pagination.data.length?u.jsx(PP,{className:"rounded border",notifications:e.pagination.data}):u.jsx(LR,{})}function FJ(){return ae.get("notifications/me/subscriptions").then(e=>e.data)}function UJ(){return or({queryKey:["notification-subscriptions"],queryFn:()=>FJ(),staleTime:1/0})}function zJ(e){return ae.put("notifications/me/subscriptions",{selections:e}).then(t=>t.data)}function VJ(){return Pe({mutationFn:e=>zJ(e),onSuccess:()=>{ke(ye("Updated preferences")),Ye.invalidateQueries({queryKey:["notification-subscriptions"]})},onError:e=>xt(e)})}function BJ(){const{notif:e}=ve(),t=VJ(),{data:n,isFetched:r}=UJ(),[s,i]=x.useState();return x.useEffect(()=>{if(n&&!s){const o={},a={};n.available_channels.forEach(l=>{a[l]=!1}),n.subscriptions.forEach(l=>{l.subscriptions.forEach(c=>{const f=n.user_selections.find(d=>d.notif_id===c.notif_id);o[c.notif_id]=(f==null?void 0:f.channels)||{...a}})}),i(o)}},[n,s]),!e.subs.integrated||n&&n.subscriptions.length===0?u.jsx(si,{to:"/",replace:!0}):u.jsxs("div",{className:"min-h-screen bg-alt",children:[u.jsx(yo,{menuPosition:"notifications-page"}),!r||!n||!s?u.jsx("div",{className:"container mx-auto my-100 flex justify-center",children:u.jsx(ms,{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:[n.subscriptions.map(o=>u.jsxs("div",{className:"mb-10 text-sm",children:[u.jsx(HJ,{group:o,allChannels:n==null?void 0:n.available_channels,selection:s,setSelection:i},o.group_name),o.subscriptions.map(a=>u.jsx(qJ,{subscription:a,selection:s,setSelection:i,allChannels:n==null?void 0:n.available_channels},a.notif_id))]},o.group_name)),u.jsx(le,{className:"ml-10 mt-20",variant:"flat",color:"primary",disabled:t.isPending,onClick:()=>{t.mutate(Object.entries(s).map(([o,a])=>({notif_id:o,channels:a})))},children:u.jsx(k,{message:"Update preferences"})})]})})]})}function HJ({group:e,allChannels:t,selection:n,setSelection:r}){const s=(o,a)=>{const l=M1(n,c=>{Object.keys(n).forEach(f=>{c[f][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(Fx,{orientation:"vertical",isIndeterminate:l,checked:a,onChange:async c=>{if(o==="browser"){const f=await LN();s(o,f?!a:!1)}else s(o,!a)},children:u.jsx(k,{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(k,{message:e.group_name})}),i]})}function qJ({subscription:e,allChannels:t,selection:n,setSelection:r}){const s=e.notif_id,i=(o,a)=>{const l=M1(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(k,{message:e.name})}),u.jsx("div",{className:"ml-auto flex items-center gap-40",children:t.map(o=>u.jsx(Fx,{orientation:"vertical",checked:n[s][o],onChange:async a=>{const l=!n[s][o];if(o==="browser"){const c=await LN();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(k,{message:o})})},o))})]})}function LN(){return Notification.permission==="granted"?Promise.resolve(!0):Notification.permission==="denied"?(ke.danger(ye("Notifications blocked. Please enable them for this site from browser settings.")),Promise.resolve(!1)):Notification.requestPermission().then(e=>e==="granted")}const WJ=u.jsxs(x.Fragment,{children:[u.jsx(Be,{path:"/notifications",element:u.jsx(ia,{children:u.jsx(I9,{children:u.jsx(LJ,{})})})}),u.jsx(Be,{path:"/notifications/settings",element:u.jsx(ia,{children:u.jsx(BJ,{})})})]});function KJ(e){const{trans:t}=lr(),n=Hn();return Pe({mutationFn:r=>GJ(r),onSuccess:()=>{ke(t(ye("Your message has been submitted."))),n("/")},onError:r=>Cn(r,e)})}function GJ(e){return ae.post("contact-page",e).then(t=>t.data)}function QJ(){const e=rn(),t=KJ(e),{verify:n,isVerifying:r}=PR("contact");return u.jsxs("div",{className:"flex flex-col bg-alt min-h-screen",children:[u.jsx(gs,{children:u.jsx(k,{message:"Contact us"})}),u.jsx(yo,{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(k,{message:"Contact us"})}),u.jsx("p",{className:"text-sm mt-4 mb-30",children:u.jsx(k,{message:"Please use the form below to send us a message and we'll get back to you as soon as possible."})}),u.jsxs(sn,{form:e,onSubmit:async s=>{await n()&&t.mutate(s)},children:[u.jsx(Ee,{label:u.jsx(k,{message:"Name"}),name:"name",required:!0,className:"mb-20"}),u.jsx(Ee,{label:u.jsx(k,{message:"Email"}),name:"email",required:!0,type:"email",className:"mb-20"}),u.jsx(Ee,{label:u.jsx(k,{message:"Message"}),name:"message",required:!0,inputElementType:"textarea",className:"mb-20",rows:8}),u.jsx(le,{type:"submit",variant:"flat",color:"primary",disabled:t.isPending||r,children:u.jsx(k,{message:"Send"})})]})]})}),u.jsx(Xc,{className:"container mx-auto px-24 flex-shrink-0"})]})}function YJ(){const{dialog:e,data:t}=U1();return u.jsx(Nl,{type:"modal",isOpen:e!=null,onClose:n=>{P6(n)},children:e?u.jsx(e,{...t}):null})}function XJ(){return Pe({mutationFn:e=>JJ(e),onSuccess:()=>{ke(ye("Email sent"))},onError:e=>xt(e)})}function JJ(e){return ae.post("resend-email-verification",e).then(t=>t.data)}const ZJ=fe(u.jsx("path",{d:"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z"}),"KeyboardArrowLeftOutlined");function eZ(e){return Pe({mutationFn:t=>tZ(t),onSuccess:()=>{window.location.reload()},onError:t=>Cn(t,e)})}function tZ(e){return ae.post("validate-email-verification-otp",e).then(t=>t.data)}function nZ(){const{trans:e}=lr(),{data:t}=WR("me"),n=XJ(),{branding:{logo_light:r,logo_dark:s}}=ve(),o=Bp()?r:s,a=Bx(),l=rn(),c=eZ(l);return u.jsx("div",{className:"flex min-h-screen w-screen bg-alt p-24",children:u.jsxs("div",{className:"mx-auto mt-40 max-w-440",children:[u.jsx(le,{variant:"outline",onClick:()=>a.mutate(),startIcon:u.jsx(ZJ,{}),size:"xs",className:"mb-54 mr-auto",children:u.jsx(k,{message:"Logout"})}),o&&u.jsx("img",{src:o,alt:"Site logo",className:"mx-auto mb-44 block h-42 w-auto"}),u.jsxs("div",{className:"text-center",children:[u.jsx("h1",{className:"mb-24 text-3xl",children:u.jsx(k,{message:"Verify your email"})}),u.jsx("h2",{className:"text-lg",children:u.jsx(k,{message:"Enter the verification code we sent to :email",values:{email:rZ(t==null?void 0:t.user.email)}})}),u.jsxs(sn,{form:l,onSubmit:f=>c.mutate(f),className:"my-16",children:[u.jsx(Ee,{name:"code",label:u.jsx(k,{message:"Code"}),placeholder:e(ye("Enter your verification code")),autoFocus:!0,autoComplete:"one-time-code",autoCorrect:"off",autoCapitalize:"off",maxLength:6,inputMode:"numeric",required:!0}),u.jsx(le,{type:"submit",variant:"flat",color:"primary",size:"md",className:"mt-24 w-full",disabled:c.isPending,children:u.jsx(k,{message:"Next"})})]}),u.jsx("div",{className:"mb-24 text-sm",children:u.jsx(k,{message:"If you don't see the email in your inbox, check your spam folder and promotions tab. If you still don't see it, request a resend.",values:{a:f=>u.jsx(le,{variant:"link",color:"primary",disabled:n.isPending||!(t!=null&&t.user.email),onClick:()=>{n.mutate({email:t.user.email})},children:f})}})})]})]})})}function rZ(e){if(!e)return"*******************";const[t,n]=e.split("@");return`${t.slice(0,2)}****@${n}`}function sZ(){const e=ve(),t=e.homepage,n=t.appearance.showPricing&&e.billing.enable;return u.jsxs(x.Fragment,{children:[u.jsx(HR,{}),u.jsxs(x.Fragment,{children:[u.jsx(iZ,{content:t.appearance}),u.jsx(oZ,{content:t.appearance}),u.jsx("div",{className:"mt-100 h-1 bg-divider"}),u.jsx(aZ,{content:t.appearance}),u.jsx(uZ,{content:t.appearance}),n&&u.jsx(lZ,{content:t.appearance}),u.jsx(Xc,{className:"landing-container"})]})]})}function iZ({content:e}){const{headerTitle:t,headerSubtitle:n,headerImage:r,headerImageOpacity:s,actions:i,headerOverlayColor1:o,headerOverlayColor2:a}=e;let l;return o&&a?l=`linear-gradient(45deg, ${o} 0%, ${a} 100%)`:o?l=o:a&&(l=a),u.jsxs("header",{className:"relative isolate mb-14 overflow-hidden md:mb-60",children:[u.jsx("img",{"data-testid":"headerImage",src:r,style:{opacity:s},alt:"",width:"2347",height:"1244",decoding:"async",loading:"lazy",className:"absolute left-1/2 top-1/2 z-20 max-w-none -translate-x-1/2 -translate-y-1/2"}),u.jsx("div",{className:"absolute z-10 h-full w-full bg-[rgb(49,67,80)]",style:{background:l}}),u.jsxs("div",{className:"relative z-30 flex h-full flex-col",children:[u.jsx(yo,{color:"transparent",className:"flex-shrink-0",menuPosition:"homepage-navbar",primaryButtonColor:"paper"}),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-90",children:[t&&u.jsx("h1",{className:"text-3xl font-normal md:text-5xl","data-testid":"headerTitle",children:u.jsx(k,{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(k,{message:n})}),u.jsxs("div",{className:"flex min-h-50 gap-20 pb-30 pt-70 empty:min-h-0 md:pb-50 md:pt-90",children:[u.jsx(Zv,{item:i.cta1,variant:"raised",color:"white",size:"lg",radius:"rounded-full","data-testid":"cta1",className:"min-w-180"}),u.jsx(Zv,{item:i.cta2,variant:"text",color:"paper",size:"lg",radius:"rounded-full","data-testid":"cta2"})]})]})]}),u.jsx("div",{className:"absolute bottom-0 z-20 h-[6vw] w-full translate-y-1/2 -skew-y-3 transform bg"})]})}function Zv({item:e,...t}){if(!(e!=null&&e.label)||!(e!=null&&e.action))return null;const n=e.icon?lp(e.icon):void 0;return u.jsx(le,{elementType:e.type==="route"?tt:"a",href:e.action,to:e.action,startIcon:n?u.jsx(n,{}):void 0,...t,children:u.jsx(k,{message:e.label})})}function oZ({content:e}){return u.jsx("div",{className:"landing-container z-20 items-stretch gap-26 md:flex",id:"primary-features",children:e.primaryFeatures.map((t,n)=>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)] md:mb-0 dark:bg-alt","data-testid":`primary-root-${n}`,children:[u.jsx(j1,{className:"mx-auto mb-30 h-128","data-testid":`primary-image-${n}`,src:t.image}),u.jsx("h2",{className:"my-16 text-lg font-medium","data-testid":`primary-title-${n}`,children:u.jsx(k,{message:t.title})}),u.jsx("div",{className:"text-md text-[0.938rem]","data-testid":`primary-subtitle-${n}`,children:u.jsx(k,{message:t.subtitle})})]},n))})}function aZ({content:e}){return u.jsx("div",{className:"relative overflow-hidden pt-100",children:u.jsx("div",{className:"landing-container relative",id:"features",children:e.secondaryFeatures.map((t,n)=>{const r=n%2===0;return u.jsxs("div",{"data-testid":`secondary-root-${n}`,className:B("relative z-20 mb-14 py-16 md:mb-80 md:flex",r&&"flex-row-reverse"),children:[u.jsx("img",{src:t.image,className:"mr-auto w-580 max-w-full rounded-lg shadow-[0_10px_30px_rgba(0,0,0,0.08)]","data-testid":`secondary-image-${n}`,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-${n}`,children:u.jsx(k,{message:t.subtitle})}),u.jsx("h3",{className:"py-16 text-3xl","data-testid":`secondary-title-${n}`,children:u.jsx(k,{message:t.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-${n}`,children:u.jsx(k,{message:t.description})})]})]},n)})})})}function lZ({content:e}){var s;const t=eb("landingPage"),[n,r]=x.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:"md:text-center",children:[u.jsx("h2",{className:"font-display text-3xl tracking-tight sm:text-4xl","data-testid":"pricingTitle",children:u.jsx(k,{message:e.pricingTitle})}),u.jsx("p",{className:"mt-16 text-lg text-muted","data-testid":"pricingSubtitle",children:u.jsx(k,{message:e.pricingSubtitle})})]}),u.jsx(DN,{products:(s=t.data)==null?void 0:s.products,selectedCycle:n,onChange:r,className:"my-50 flex justify-center",size:"lg"}),u.jsx($N,{selectedCycle:n,productLoader:"landingPage"})]})})}function uZ({content:e}){return u.jsxs("div",{className:"relative overflow-hidden bg-[rgb(37,99,235)] py-90 text-white md:py-128","data-testid":"footerImage",children:[u.jsx("img",{src:e.footerImage,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"}),u.jsx("div",{className:"relative 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:[u.jsx("h2",{className:" font-display text-3xl tracking-tight sm:text-4xl","data-testid":"footerTitle",children:u.jsx(k,{message:e.footerTitle})}),e.footerSubtitle&&u.jsx("p",{className:"mt-16 text-lg tracking-tight","data-testid":"footerSubtitle",children:u.jsx(k,{message:e.footerSubtitle})}),u.jsx(Zv,{item:e.actions.cta3,size:"lg",radius:"rounded-full",variant:"outline",color:"paper",className:"mt-40 block","data-testid":"cta3"})]})})]})}const cZ=G.lazy(()=>co(()=>import("./dashboard-routes-95c0f08e.js"),["./dashboard-routes-95c0f08e.js","./Delete-760133eb.js","./Report-ec54f109.js","./use-custom-domains-1fb68950.js","./Reply-2dc221dd.js","./CheckBox-7e7869e9.js","./use-billing-user-3031ab82.js","./Edit-1f4792b7.js","./OpenInNew-d22aad8d.js"],import.meta.url)),fZ=G.lazy(()=>co(()=>import("./editor-page-b9ebf2c0.js"),["./editor-page-b9ebf2c0.js","./DragIndicator-d316e761.js","./Description-84dcfa32.js","./CheckBox-7e7869e9.js","./Delete-760133eb.js","./section-helper-fc669f0d.js","./Edit-1f4792b7.js","./use-custom-domains-1fb68950.js","./info-dialog-trigger-bb8ca310.js"],import.meta.url)),dZ=G.lazy(()=>co(()=>import("./admin-routes-79741b8f.js").then(e=>e.q),["./admin-routes-79741b8f.js","./Report-ec54f109.js","./Delete-760133eb.js","./section-helper-fc669f0d.js","./DragIndicator-d316e761.js","./Edit-1f4792b7.js","./OpenInNew-d22aad8d.js","./use-resume-subscription-af152952.js"],import.meta.url)),hZ=G.lazy(()=>co(()=>import("./swagger-api-docs-page-cc1ae619.js"),["./swagger-api-docs-page-cc1ae619.js","./index-771dd321.js","./swagger-api-docs-page-34ffaf07.css"],import.meta.url));function pZ(){const{billing:e,notifications:t,require_email_confirmation:n,api:r}=ve(),{user:s,hasPermission:i}=bt();return s!=null&&n&&!s.email_verified_at?u.jsxs(x.Fragment,{children:[u.jsx(KS,{}),u.jsx(G_,{children:u.jsx(Be,{path:"*",element:u.jsx(nZ,{})})})]}):u.jsxs(x.Fragment,{children:[u.jsx(Lq,{}),u.jsx(Kq,{}),u.jsx(KS,{}),u.jsxs(G_,{children:[u.jsx(Be,{path:"/",element:u.jsx(QK,{homepageResolver:()=>u.jsx(Ts,{children:u.jsx(sZ,{})})})}),u.jsx(Be,{path:"/admin/*",element:u.jsx(ia,{permission:"admin.access",children:u.jsx(G.Suspense,{fallback:u.jsx(Si,{screen:!0}),children:u.jsx(dZ,{})})})}),u.jsx(Be,{path:"/dashboard/*",element:u.jsx(ia,{permission:["projects.create","admin.access"],children:u.jsx(G.Suspense,{fallback:u.jsx(Si,{screen:!0}),children:u.jsx(cZ,{})})})}),u.jsx(Be,{path:"/editor/:projectId",element:u.jsx(ia,{permission:["projects.create","admin.access"],children:u.jsx(G.Suspense,{fallback:u.jsx(Si,{screen:!0}),children:u.jsx(fZ,{})})})}),xJ,e.enable&&$J,t.integrated&&WJ,(r==null?void 0:r.integrated)&&i("api.access")&&u.jsx(Be,{path:"api-docs",element:u.jsx(G.Suspense,{fallback:u.jsx(Si,{screen:!0}),children:u.jsx(hZ,{})})}),u.jsx(Be,{path:"contact",element:u.jsx(QJ,{})}),u.jsx(Be,{path:"pages/:pageSlug",element:u.jsx($v,{})}),u.jsx(Be,{path:"pages/:pageId/:pageSlug",element:u.jsx($v,{})}),u.jsx(Be,{path:"*",element:u.jsx(Px,{})})]}),u.jsx(YJ,{})]})}const Kp=rr(),QE=Kp.settings.logging.sentry_public;QE&&kq({dsn:QE,integrations:[new tH],tracesSampleRate:.2,ignoreErrors:Pq,release:Kp.sentry_release});const YE=u.jsx(v9,{basename:Kp.settings.html_base_uri,children:u.jsx(iU,{children:u.jsx(pZ,{})})});Kp.rendered_ssr?bT(ri,YE):wT(ri).render(YE);export{zx as $,pK as A,up as B,Zk as C,Ic as D,rn as E,yl as F,vl as G,xl as H,Qt as I,sn as J,Ee as K,tt as L,Vp as M,IR as N,Lp as O,ms as P,ve as Q,Ye as R,gs as S,k as T,ke as U,xt as V,BY as W,Gc as X,Nl as Y,sX as Z,eb as _,or as a,e7 as a$,T1 as a0,UK as a1,rx as a2,Si as a3,jK as a4,ir as a5,XW as a6,sx as a7,Q7 as a8,I9 as a9,iG as aA,Cn as aB,i7 as aC,VW as aD,J1 as aE,gl as aF,$p as aG,Wa as aH,IY as aI,XY as aJ,ii as aK,GA as aL,Ip as aM,zR as aN,tG as aO,JK as aP,ZK as aQ,NN as aR,P6 as aS,ZJ as aT,HZ as aU,G4 as aV,r7 as aW,I8 as aX,O8 as aY,D8 as aZ,UZ as a_,jP as aa,Px as ab,Qk as ac,G as ad,Xk as ae,D1 as af,fe as ag,IN as ah,Xv as ai,Yv as aj,WZ as ak,qZ as al,AY as am,rr as an,LY as ao,Qv as ap,ic as aq,ml as ar,d7 as as,hK as at,Vx as au,co as av,ll as aw,ri as ax,lp as ay,$q as az,ae as b,F1 as b$,Ch as b0,TW as b1,Eh as b2,Tx as b3,vR as b4,yo as b5,zZ as b6,X1 as b7,Oc as b8,oF as b9,CZ as bA,xk as bB,_Z as bC,kZ as bD,lX as bE,Ki as bF,TF as bG,Pl as bH,Rk as bI,Mn as bJ,__ as bK,Bp as bL,On as bM,Fx as bN,MZ as bO,ox as bP,ST as bQ,ea as bR,pP as bS,_R as bT,uX as bU,eG as bV,$R as bW,M1 as bX,bR as bY,VZ as bZ,$M as b_,Ik as ba,cF as bb,jZ as bc,th as bd,uF as be,SZ as bf,EZ as bg,Rl as bh,hR as bi,Ix as bj,ds as bk,FZ as bl,Vu as bm,gF as bn,RZ as bo,PZ as bp,iF as bq,mF as br,wZ as bs,Dx as bt,lo as bu,tP as bv,aX as bw,X9 as bx,aF as by,TZ as bz,Sc as c,PJ as c$,WS as c0,Q4 as c1,si as c2,Kt as c3,w9 as c4,fs as c5,Wq as c6,BZ as c7,Ac as c8,vY as c9,DZ as cA,IP as cB,OZ as cC,NZ as cD,AZ as cE,$P as cF,qY as cG,Fp as cH,hn as cI,Up as cJ,vu as cK,zp as cL,Gv as cM,LZ as cN,e6 as cO,yX as cP,gZ as cQ,eQ as cR,Xc as cS,DN as cT,Jv as cU,jJ as cV,G_ as cW,Be as cX,IZ as cY,$Z as cZ,rg as c_,pR as ca,XJ as cb,WR as cc,cG as cd,dG as ce,Sg as cf,Nr as cg,kJ as ch,UY as ci,_8 as cj,W6 as ck,f7 as cl,aK as cm,FK as cn,zK as co,Zq as cp,Lk as cq,ia as cr,RA as cs,kA as ct,yZ as cu,vZ as cv,qA as cw,Bi as cx,UW as cy,yp as cz,ur as d,AF as d0,Sp as d1,HY as d2,rG as d3,Rq as d4,nJ as d5,sG as d6,UR as d7,K4 as d8,bK as d9,VM as da,wJ as db,UM as dc,xK as dd,DK as de,yK as df,zM as dg,nG as dh,rJ as di,sJ as dj,FM as dk,TR as dl,gR as dm,yR as dn,bt as e,Hn as f,Bx as g,lr as h,ER as i,u as j,IK as k,Qc as l,ye as m,vK as n,le as o,VR as p,MR as q,x as r,Pe as s,Mc as t,A9 as u,B as v,dl as w,cs as x,Mp as y,Br as z}; //# sourceMappingURL=main-9c8146fd.js.map