var $m=t=>{throw TypeError(t)};var ld=(t,e,r)=>e.has(t)||$m("Cannot "+r);var R=(t,e,r)=>(ld(t,e,"read from private field"),r?r.call(t):e.get(t)),ve=(t,e,r)=>e.has(t)?$m("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,r),ce=(t,e,r,s)=>(ld(t,e,"write to private field"),s?s.call(t,r):e.set(t,r),r),Te=(t,e,r)=>(ld(t,e,"access private method"),r);var Sl=(t,e,r,s)=>({set _(i){ce(t,e,i,r)},get _(){return R(t,e,s)}});function t1(t,e){for(var r=0;rs[i]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const l of i)if(l.type==="childList")for(const u of l.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&s(u)}).observe(document,{childList:!0,subtree:!0});function r(i){const l={};return i.integrity&&(l.integrity=i.integrity),i.referrerPolicy&&(l.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?l.credentials="include":i.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function s(i){if(i.ep)return;i.ep=!0;const l=r(i);fetch(i.href,l)}})();function bf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var cd={exports:{}},Di={},ud={exports:{}},je={};/** * @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 Um;function n1(){if(Um)return je;Um=1;var t=Symbol.for("react.element"),e=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.iterator;function C(P){return P===null||typeof P!="object"?null:(P=v&&P[v]||P["@@iterator"],typeof P=="function"?P:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,b={};function k(P,M,ie){this.props=P,this.context=M,this.refs=b,this.updater=ie||w}k.prototype.isReactComponent={},k.prototype.setState=function(P,M){if(typeof P!="object"&&typeof P!="function"&&P!=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,P,M,"setState")},k.prototype.forceUpdate=function(P){this.updater.enqueueForceUpdate(this,P,"forceUpdate")};function T(){}T.prototype=k.prototype;function j(P,M,ie){this.props=P,this.context=M,this.refs=b,this.updater=ie||w}var _=j.prototype=new T;_.constructor=j,E(_,k.prototype),_.isPureReactComponent=!0;var A=Array.isArray,F=Object.prototype.hasOwnProperty,V={current:null},B={key:!0,ref:!0,__self:!0,__source:!0};function te(P,M,ie){var ae,me={},be=null,ee=null;if(M!=null)for(ae in M.ref!==void 0&&(ee=M.ref),M.key!==void 0&&(be=""+M.key),M)F.call(M,ae)&&!B.hasOwnProperty(ae)&&(me[ae]=M[ae]);var ye=arguments.length-2;if(ye===1)me.children=ie;else if(1>>1,M=$[P];if(0>>1;Pi(me,Q))bei(ee,me)?($[P]=ee,$[be]=Q,P=be):($[P]=me,$[ae]=Q,P=ae);else if(bei(ee,Q))$[P]=ee,$[be]=Q,P=be;else break e}}return H}function i($,H){var Q=$.sortIndex-H.sortIndex;return Q!==0?Q:$.id-H.id}if(typeof performance=="object"&&typeof performance.now=="function"){var l=performance;t.unstable_now=function(){return l.now()}}else{var u=Date,d=u.now();t.unstable_now=function(){return u.now()-d}}var h=[],p=[],y=1,v=null,C=3,w=!1,E=!1,b=!1,k=typeof setTimeout=="function"?setTimeout:null,T=typeof clearTimeout=="function"?clearTimeout:null,j=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function _($){for(var H=r(p);H!==null;){if(H.callback===null)s(p);else if(H.startTime<=$)s(p),H.sortIndex=H.expirationTime,e(h,H);else break;H=r(p)}}function A($){if(b=!1,_($),!E)if(r(h)!==null)E=!0,ne(F);else{var H=r(p);H!==null&&se(A,H.startTime-$)}}function F($,H){E=!1,b&&(b=!1,T(te),te=-1),w=!0;var Q=C;try{for(_(H),v=r(h);v!==null&&(!(v.expirationTime>H)||$&&!le());){var P=v.callback;if(typeof P=="function"){v.callback=null,C=v.priorityLevel;var M=P(v.expirationTime<=H);H=t.unstable_now(),typeof M=="function"?v.callback=M:v===r(h)&&s(h),_(H)}else s(h);v=r(h)}if(v!==null)var ie=!0;else{var ae=r(p);ae!==null&&se(A,ae.startTime-H),ie=!1}return ie}finally{v=null,C=Q,w=!1}}var V=!1,B=null,te=-1,G=5,W=-1;function le(){return!(t.unstable_now()-W$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):G=0<$?Math.floor(1e3/$):5},t.unstable_getCurrentPriorityLevel=function(){return C},t.unstable_getFirstCallbackNode=function(){return r(h)},t.unstable_next=function($){switch(C){case 1:case 2:case 3:var H=3;break;default:H=C}var Q=C;C=H;try{return $()}finally{C=Q}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function($,H){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var Q=C;C=$;try{return H()}finally{C=Q}},t.unstable_scheduleCallback=function($,H,Q){var P=t.unstable_now();switch(typeof Q=="object"&&Q!==null?(Q=Q.delay,Q=typeof Q=="number"&&0P?($.sortIndex=Q,e(p,$),r(h)===null&&$===r(p)&&(b?(T(te),te=-1):b=!0,se(A,Q-P))):($.sortIndex=M,e(h,$),E||w||(E=!0,ne(F))),$},t.unstable_shouldYield=le,t.unstable_wrapCallback=function($){var H=C;return function(){var Q=C;C=H;try{return $.apply(this,arguments)}finally{C=Q}}}})(hd)),hd}var Km;function i1(){return Km||(Km=1,fd.exports=s1()),fd.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 qm;function a1(){if(qm)return $t;qm=1;var t=ac(),e=i1();function r(n){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+n,a=1;a"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),h=Object.prototype.hasOwnProperty,p=/^[: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]*$/,y={},v={};function C(n){return h.call(v,n)?!0:h.call(y,n)?!1:p.test(n)?v[n]=!0:(y[n]=!0,!1)}function w(n,o,a,c){if(a!==null&&a.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return c?!1:a!==null?!a.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function E(n,o,a,c){if(o===null||typeof o>"u"||w(n,o,a,c))return!0;if(c)return!1;if(a!==null)switch(a.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function b(n,o,a,c,f,m,S){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=c,this.attributeNamespace=f,this.mustUseProperty=a,this.propertyName=n,this.type=o,this.sanitizeURL=m,this.removeEmptyString=S}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){k[n]=new b(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var o=n[0];k[o]=new b(o,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){k[n]=new b(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){k[n]=new b(n,2,!1,n,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(n){k[n]=new b(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){k[n]=new b(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){k[n]=new b(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){k[n]=new b(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){k[n]=new b(n,5,!1,n.toLowerCase(),null,!1,!1)});var T=/[\-:]([a-z])/g;function j(n){return n[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(n){var o=n.replace(T,j);k[o]=new b(o,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var o=n.replace(T,j);k[o]=new b(o,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var o=n.replace(T,j);k[o]=new b(o,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){k[n]=new b(n,1,!1,n.toLowerCase(),null,!1,!1)}),k.xlinkHref=new b("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){k[n]=new b(n,1,!1,n.toLowerCase(),null,!0,!0)});function _(n,o,a,c){var f=k.hasOwnProperty(o)?k[o]:null;(f!==null?f.type!==0:c||!(2N||f[S]!==m[N]){var O=` `+f[S].replace(" at new "," at ");return n.displayName&&O.includes("")&&(O=O.replace("",n.displayName)),O}while(1<=S&&0<=N);break}}}finally{ie=!1,Error.prepareStackTrace=a}return(n=n?n.displayName||n.name:"")?M(n):""}function me(n){switch(n.tag){case 5:return M(n.type);case 16:return M("Lazy");case 13:return M("Suspense");case 19:return M("SuspenseList");case 0:case 2:case 15:return n=ae(n.type,!1),n;case 11:return n=ae(n.type.render,!1),n;case 1:return n=ae(n.type,!0),n;default:return""}}function be(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case B:return"Fragment";case V:return"Portal";case G:return"Profiler";case te:return"StrictMode";case Z:return"Suspense";case J:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case le:return(n.displayName||"Context")+".Consumer";case W:return(n._context.displayName||"Context")+".Provider";case K:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case de:return o=n.displayName||null,o!==null?o:be(n.type)||"Memo";case ne:o=n._payload,n=n._init;try{return be(n(o))}catch{}}return null}function ee(n){var o=n.type;switch(n.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=o.render,n=n.displayName||n.name||"",o.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return be(o);case 8:return o===te?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function ye(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function Se(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Ne(n){var o=Se(n)?"checked":"value",a=Object.getOwnPropertyDescriptor(n.constructor.prototype,o),c=""+n[o];if(!n.hasOwnProperty(o)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var f=a.get,m=a.set;return Object.defineProperty(n,o,{configurable:!0,get:function(){return f.call(this)},set:function(S){c=""+S,m.call(this,S)}}),Object.defineProperty(n,o,{enumerable:a.enumerable}),{getValue:function(){return c},setValue:function(S){c=""+S},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function Oe(n){n._valueTracker||(n._valueTracker=Ne(n))}function _e(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var a=o.getValue(),c="";return n&&(c=Se(n)?n.checked?"true":"false":n.value),n=c,n!==a?(o.setValue(n),!0):!1}function et(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function gt(n,o){var a=o.checked;return Q({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:a??n._wrapperState.initialChecked})}function On(n,o){var a=o.defaultValue==null?"":o.defaultValue,c=o.checked!=null?o.checked:o.defaultChecked;a=ye(o.value!=null?o.value:a),n._wrapperState={initialChecked:c,initialValue:a,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function dn(n,o){o=o.checked,o!=null&&_(n,"checked",o,!1)}function fn(n,o){dn(n,o);var a=ye(o.value),c=o.type;if(a!=null)c==="number"?(a===0&&n.value===""||n.value!=a)&&(n.value=""+a):n.value!==""+a&&(n.value=""+a);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}o.hasOwnProperty("value")?jn(n,o.type,a):o.hasOwnProperty("defaultValue")&&jn(n,o.type,ye(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(n.defaultChecked=!!o.defaultChecked)}function wr(n,o,a){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var c=o.type;if(!(c!=="submit"&&c!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+n._wrapperState.initialValue,a||o===n.value||(n.value=o),n.defaultValue=o}a=n.name,a!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,a!==""&&(n.name=a)}function jn(n,o,a){(o!=="number"||et(n.ownerDocument)!==n)&&(a==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+a&&(n.defaultValue=""+a))}var br=Array.isArray;function en(n,o,a,c){if(n=n.options,o){o={};for(var f=0;f"+o.valueOf().toString()+"",o=qo.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;o.firstChild;)n.appendChild(o.firstChild)}});function Ln(n,o){if(o){var a=n.firstChild;if(a&&a===n.lastChild&&a.nodeType===3){a.nodeValue=o;return}}n.textContent=o}var ao={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},fa=["Webkit","ms","Moz","O"];Object.keys(ao).forEach(function(n){fa.forEach(function(o){o=o+n.charAt(0).toUpperCase()+n.substring(1),ao[o]=ao[n]})});function Qo(n,o,a){return o==null||typeof o=="boolean"||o===""?"":a||typeof o!="number"||o===0||ao.hasOwnProperty(n)&&ao[n]?(""+o).trim():o+"px"}function tr(n,o){n=n.style;for(var a in o)if(o.hasOwnProperty(a)){var c=a.indexOf("--")===0,f=Qo(a,o[a],c);a==="float"&&(a="cssFloat"),c?n.setProperty(a,f):n[a]=f}}var ha=Q({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 In(n,o){if(o){if(ha[n]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(r(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(r(61))}if(o.style!=null&&typeof o.style!="object")throw Error(r(62))}}function ei(n,o){if(n.indexOf("-")===-1)return typeof o.is=="string";switch(n){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 ti=null;function Yo(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Go=null,Sr=null,Dn=null;function hn(n){if(n=bi(n)){if(typeof Go!="function")throw Error(r(280));var o=n.stateNode;o&&(o=Ma(o),Go(n.stateNode,n.type,o))}}function pa(n){Sr?Dn?Dn.push(n):Dn=[n]:Sr=n}function Ee(){if(Sr){var n=Sr,o=Dn;if(Dn=Sr=null,hn(n),o)for(n=0;n>>=0,n===0?32:31-(yw(n)/vw|0)|0}var xa=64,wa=4194304;function ri(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function ba(n,o){var a=n.pendingLanes;if(a===0)return 0;var c=0,f=n.suspendedLanes,m=n.pingedLanes,S=a&268435455;if(S!==0){var N=S&~f;N!==0?c=ri(N):(m&=S,m!==0&&(c=ri(m)))}else S=a&~f,S!==0?c=ri(S):m!==0&&(c=ri(m));if(c===0)return 0;if(o!==0&&o!==c&&(o&f)===0&&(f=c&-c,m=o&-o,f>=m||f===16&&(m&4194240)!==0))return o;if((c&4)!==0&&(c|=a&16),o=n.entangledLanes,o!==0)for(n=n.entanglements,o&=c;0a;a++)o.push(n);return o}function oi(n,o,a){n.pendingLanes|=o,o!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,o=31-mn(o),n[o]=a}function Sw(n,o){var a=n.pendingLanes&~o;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=o,n.mutableReadLanes&=o,n.entangledLanes&=o,o=n.entanglements;var c=n.eventTimes;for(n=n.expirationTimes;0=fi),Ah=" ",Lh=!1;function Ih(n,o){switch(n){case"keyup":return Gw.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Dh(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Zo=!1;function Jw(n,o){switch(n){case"compositionend":return Dh(o);case"keypress":return o.which!==32?null:(Lh=!0,Ah);case"textInput":return n=o.data,n===Ah&&Lh?null:n;default:return null}}function Zw(n,o){if(Zo)return n==="compositionend"||!Bc&&Ih(n,o)?(n=Rh(),Na=Dc=Rr=null,Zo=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1=o)return{node:a,offset:o-n};n=c}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Hh(a)}}function Wh(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?Wh(n,o.parentNode):"contains"in n?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function Kh(){for(var n=window,o=et();o instanceof n.HTMLIFrameElement;){try{var a=typeof o.contentWindow.location.href=="string"}catch{a=!1}if(a)n=o.contentWindow;else break;o=et(n.document)}return o}function Wc(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o&&(o==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||o==="textarea"||n.contentEditable==="true")}function lb(n){var o=Kh(),a=n.focusedElem,c=n.selectionRange;if(o!==a&&a&&a.ownerDocument&&Wh(a.ownerDocument.documentElement,a)){if(c!==null&&Wc(a)){if(o=c.start,n=c.end,n===void 0&&(n=o),"selectionStart"in a)a.selectionStart=o,a.selectionEnd=Math.min(n,a.value.length);else if(n=(o=a.ownerDocument||document)&&o.defaultView||window,n.getSelection){n=n.getSelection();var f=a.textContent.length,m=Math.min(c.start,f);c=c.end===void 0?m:Math.min(c.end,f),!n.extend&&m>c&&(f=c,c=m,m=f),f=Vh(a,m);var S=Vh(a,c);f&&S&&(n.rangeCount!==1||n.anchorNode!==f.node||n.anchorOffset!==f.offset||n.focusNode!==S.node||n.focusOffset!==S.offset)&&(o=o.createRange(),o.setStart(f.node,f.offset),n.removeAllRanges(),m>c?(n.addRange(o),n.extend(S.node,S.offset)):(o.setEnd(S.node,S.offset),n.addRange(o)))}}for(o=[],n=a;n=n.parentNode;)n.nodeType===1&&o.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof a.focus=="function"&&a.focus(),a=0;a=document.documentMode,es=null,Kc=null,gi=null,qc=!1;function qh(n,o,a){var c=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;qc||es==null||es!==et(c)||(c=es,"selectionStart"in c&&Wc(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),gi&&mi(gi,c)||(gi=c,c=La(Kc,"onSelect"),0ss||(n.current=su[ss],su[ss]=null,ss--)}function We(n,o){ss++,su[ss]=n.current,n.current=o}var jr={},yt=Or(jr),It=Or(!1),uo=jr;function is(n,o){var a=n.type.contextTypes;if(!a)return jr;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===o)return c.__reactInternalMemoizedMaskedChildContext;var f={},m;for(m in a)f[m]=o[m];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=o,n.__reactInternalMemoizedMaskedChildContext=f),f}function Dt(n){return n=n.childContextTypes,n!=null}function Fa(){qe(It),qe(yt)}function lp(n,o,a){if(yt.current!==jr)throw Error(r(168));We(yt,o),We(It,a)}function cp(n,o,a){var c=n.stateNode;if(o=o.childContextTypes,typeof c.getChildContext!="function")return a;c=c.getChildContext();for(var f in c)if(!(f in o))throw Error(r(108,ee(n)||"Unknown",f));return Q({},a,c)}function za(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||jr,uo=yt.current,We(yt,n),We(It,It.current),!0}function up(n,o,a){var c=n.stateNode;if(!c)throw Error(r(169));a?(n=cp(n,o,uo),c.__reactInternalMemoizedMergedChildContext=n,qe(It),qe(yt),We(yt,n)):qe(It),We(It,a)}var rr=null,$a=!1,iu=!1;function dp(n){rr===null?rr=[n]:rr.push(n)}function wb(n){$a=!0,dp(n)}function _r(){if(!iu&&rr!==null){iu=!0;var n=0,o=Ue;try{var a=rr;for(Ue=1;n>=S,f-=S,or=1<<32-mn(o)+f|a<Ce?(ut=we,we=null):ut=we.sibling;var De=q(I,we,D[Ce],re);if(De===null){we===null&&(we=ut);break}n&&we&&De.alternate===null&&o(I,we),L=m(De,L,Ce),xe===null?ge=De:xe.sibling=De,xe=De,we=ut}if(Ce===D.length)return a(I,we),Ye&&ho(I,Ce),ge;if(we===null){for(;CeCe?(ut=we,we=null):ut=we.sibling;var Ur=q(I,we,De.value,re);if(Ur===null){we===null&&(we=ut);break}n&&we&&Ur.alternate===null&&o(I,we),L=m(Ur,L,Ce),xe===null?ge=Ur:xe.sibling=Ur,xe=Ur,we=ut}if(De.done)return a(I,we),Ye&&ho(I,Ce),ge;if(we===null){for(;!De.done;Ce++,De=D.next())De=X(I,De.value,re),De!==null&&(L=m(De,L,Ce),xe===null?ge=De:xe.sibling=De,xe=De);return Ye&&ho(I,Ce),ge}for(we=c(I,we);!De.done;Ce++,De=D.next())De=ue(we,I,Ce,De.value,re),De!==null&&(n&&De.alternate!==null&&we.delete(De.key===null?Ce:De.key),L=m(De,L,Ce),xe===null?ge=De:xe.sibling=De,xe=De);return n&&we.forEach(function(e1){return o(I,e1)}),Ye&&ho(I,Ce),ge}function nt(I,L,D,re){if(typeof D=="object"&&D!==null&&D.type===B&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case F:e:{for(var ge=D.key,xe=L;xe!==null;){if(xe.key===ge){if(ge=D.type,ge===B){if(xe.tag===7){a(I,xe.sibling),L=f(xe,D.props.children),L.return=I,I=L;break e}}else if(xe.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===ne&&yp(ge)===xe.type){a(I,xe.sibling),L=f(xe,D.props),L.ref=Si(I,xe,D),L.return=I,I=L;break e}a(I,xe);break}else o(I,xe);xe=xe.sibling}D.type===B?(L=bo(D.props.children,I.mode,re,D.key),L.return=I,I=L):(re=pl(D.type,D.key,D.props,null,I.mode,re),re.ref=Si(I,L,D),re.return=I,I=re)}return S(I);case V:e:{for(xe=D.key;L!==null;){if(L.key===xe)if(L.tag===4&&L.stateNode.containerInfo===D.containerInfo&&L.stateNode.implementation===D.implementation){a(I,L.sibling),L=f(L,D.children||[]),L.return=I,I=L;break e}else{a(I,L);break}else o(I,L);L=L.sibling}L=rd(D,I.mode,re),L.return=I,I=L}return S(I);case ne:return xe=D._init,nt(I,L,xe(D._payload),re)}if(br(D))return he(I,L,D,re);if(H(D))return pe(I,L,D,re);Va(I,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,L!==null&&L.tag===6?(a(I,L.sibling),L=f(L,D),L.return=I,I=L):(a(I,L),L=nd(D,I.mode,re),L.return=I,I=L),S(I)):a(I,L)}return nt}var us=vp(!0),xp=vp(!1),Wa=Or(null),Ka=null,ds=null,fu=null;function hu(){fu=ds=Ka=null}function pu(n){var o=Wa.current;qe(Wa),n._currentValue=o}function mu(n,o,a){for(;n!==null;){var c=n.alternate;if((n.childLanes&o)!==o?(n.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),n===a)break;n=n.return}}function fs(n,o){Ka=n,fu=ds=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&o)!==0&&(Mt=!0),n.firstContext=null)}function rn(n){var o=n._currentValue;if(fu!==n)if(n={context:n,memoizedValue:o,next:null},ds===null){if(Ka===null)throw Error(r(308));ds=n,Ka.dependencies={lanes:0,firstContext:n}}else ds=ds.next=n;return o}var po=null;function gu(n){po===null?po=[n]:po.push(n)}function wp(n,o,a,c){var f=o.interleaved;return f===null?(a.next=a,gu(o)):(a.next=f.next,f.next=a),o.interleaved=a,ir(n,c)}function ir(n,o){n.lanes|=o;var a=n.alternate;for(a!==null&&(a.lanes|=o),a=n,n=n.return;n!==null;)n.childLanes|=o,a=n.alternate,a!==null&&(a.childLanes|=o),a=n,n=n.return;return a.tag===3?a.stateNode:null}var Ar=!1;function yu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function bp(n,o){n=n.updateQueue,o.updateQueue===n&&(o.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function ar(n,o){return{eventTime:n,lane:o,tag:0,payload:null,callback:null,next:null}}function Lr(n,o,a){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(Le&2)!==0){var f=c.pending;return f===null?o.next=o:(o.next=f.next,f.next=o),c.pending=o,ir(n,a)}return f=c.interleaved,f===null?(o.next=o,gu(c)):(o.next=f.next,f.next=o),c.interleaved=o,ir(n,a)}function qa(n,o,a){if(o=o.updateQueue,o!==null&&(o=o.shared,(a&4194240)!==0)){var c=o.lanes;c&=n.pendingLanes,a|=c,o.lanes=a,jc(n,a)}}function Sp(n,o){var a=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,a===c)){var f=null,m=null;if(a=a.firstBaseUpdate,a!==null){do{var S={eventTime:a.eventTime,lane:a.lane,tag:a.tag,payload:a.payload,callback:a.callback,next:null};m===null?f=m=S:m=m.next=S,a=a.next}while(a!==null);m===null?f=m=o:m=m.next=o}else f=m=o;a={baseState:c.baseState,firstBaseUpdate:f,lastBaseUpdate:m,shared:c.shared,effects:c.effects},n.updateQueue=a;return}n=a.lastBaseUpdate,n===null?a.firstBaseUpdate=o:n.next=o,a.lastBaseUpdate=o}function Qa(n,o,a,c){var f=n.updateQueue;Ar=!1;var m=f.firstBaseUpdate,S=f.lastBaseUpdate,N=f.shared.pending;if(N!==null){f.shared.pending=null;var O=N,z=O.next;O.next=null,S===null?m=z:S.next=z,S=O;var Y=n.alternate;Y!==null&&(Y=Y.updateQueue,N=Y.lastBaseUpdate,N!==S&&(N===null?Y.firstBaseUpdate=z:N.next=z,Y.lastBaseUpdate=O))}if(m!==null){var X=f.baseState;S=0,Y=z=O=null,N=m;do{var q=N.lane,ue=N.eventTime;if((c&q)===q){Y!==null&&(Y=Y.next={eventTime:ue,lane:0,tag:N.tag,payload:N.payload,callback:N.callback,next:null});e:{var he=n,pe=N;switch(q=o,ue=a,pe.tag){case 1:if(he=pe.payload,typeof he=="function"){X=he.call(ue,X,q);break e}X=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=pe.payload,q=typeof he=="function"?he.call(ue,X,q):he,q==null)break e;X=Q({},X,q);break e;case 2:Ar=!0}}N.callback!==null&&N.lane!==0&&(n.flags|=64,q=f.effects,q===null?f.effects=[N]:q.push(N))}else ue={eventTime:ue,lane:q,tag:N.tag,payload:N.payload,callback:N.callback,next:null},Y===null?(z=Y=ue,O=X):Y=Y.next=ue,S|=q;if(N=N.next,N===null){if(N=f.shared.pending,N===null)break;q=N,N=q.next,q.next=null,f.lastBaseUpdate=q,f.shared.pending=null}}while(!0);if(Y===null&&(O=X),f.baseState=O,f.firstBaseUpdate=z,f.lastBaseUpdate=Y,o=f.shared.interleaved,o!==null){f=o;do S|=f.lane,f=f.next;while(f!==o)}else m===null&&(f.shared.lanes=0);yo|=S,n.lanes=S,n.memoizedState=X}}function Cp(n,o,a){if(n=o.effects,o.effects=null,n!==null)for(o=0;oa?a:4,n(!0);var c=Su.transition;Su.transition={};try{n(!1),o()}finally{Ue=a,Su.transition=c}}function Bp(){return on().memoizedState}function Eb(n,o,a){var c=Fr(n);if(a={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null},Hp(n))Vp(o,a);else if(a=wp(n,o,a,c),a!==null){var f=Rt();bn(a,n,c,f),Wp(a,o,c)}}function kb(n,o,a){var c=Fr(n),f={lane:c,action:a,hasEagerState:!1,eagerState:null,next:null};if(Hp(n))Vp(o,f);else{var m=n.alternate;if(n.lanes===0&&(m===null||m.lanes===0)&&(m=o.lastRenderedReducer,m!==null))try{var S=o.lastRenderedState,N=m(S,a);if(f.hasEagerState=!0,f.eagerState=N,gn(N,S)){var O=o.interleaved;O===null?(f.next=f,gu(o)):(f.next=O.next,O.next=f),o.interleaved=f;return}}catch{}finally{}a=wp(n,o,f,c),a!==null&&(f=Rt(),bn(a,n,c,f),Wp(a,o,c))}}function Hp(n){var o=n.alternate;return n===Xe||o!==null&&o===Xe}function Vp(n,o){Ni=Xa=!0;var a=n.pending;a===null?o.next=o:(o.next=a.next,a.next=o),n.pending=o}function Wp(n,o,a){if((a&4194240)!==0){var c=o.lanes;c&=n.pendingLanes,a|=c,o.lanes=a,jc(n,a)}}var el={readContext:rn,useCallback:vt,useContext:vt,useEffect:vt,useImperativeHandle:vt,useInsertionEffect:vt,useLayoutEffect:vt,useMemo:vt,useReducer:vt,useRef:vt,useState:vt,useDebugValue:vt,useDeferredValue:vt,useTransition:vt,useMutableSource:vt,useSyncExternalStore:vt,useId:vt,unstable_isNewReconciler:!1},Nb={readContext:rn,useCallback:function(n,o){return Un().memoizedState=[n,o===void 0?null:o],n},useContext:rn,useEffect:Lp,useImperativeHandle:function(n,o,a){return a=a!=null?a.concat([n]):null,Ja(4194308,4,Mp.bind(null,o,n),a)},useLayoutEffect:function(n,o){return Ja(4194308,4,n,o)},useInsertionEffect:function(n,o){return Ja(4,2,n,o)},useMemo:function(n,o){var a=Un();return o=o===void 0?null:o,n=n(),a.memoizedState=[n,o],n},useReducer:function(n,o,a){var c=Un();return o=a!==void 0?a(o):o,c.memoizedState=c.baseState=o,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:o},c.queue=n,n=n.dispatch=Eb.bind(null,Xe,n),[c.memoizedState,n]},useRef:function(n){var o=Un();return n={current:n},o.memoizedState=n},useState:_p,useDebugValue:Tu,useDeferredValue:function(n){return Un().memoizedState=n},useTransition:function(){var n=_p(!1),o=n[0];return n=Cb.bind(null,n[1]),Un().memoizedState=n,[o,n]},useMutableSource:function(){},useSyncExternalStore:function(n,o,a){var c=Xe,f=Un();if(Ye){if(a===void 0)throw Error(r(407));a=a()}else{if(a=o(),ct===null)throw Error(r(349));(go&30)!==0||Rp(c,o,a)}f.memoizedState=a;var m={value:a,getSnapshot:o};return f.queue=m,Lp(Tp.bind(null,c,m,n),[n]),c.flags|=2048,Ti(9,Pp.bind(null,c,m,a,o),void 0,null),a},useId:function(){var n=Un(),o=ct.identifierPrefix;if(Ye){var a=sr,c=or;a=(c&~(1<<32-mn(c)-1)).toString(32)+a,o=":"+o+"R"+a,a=Ri++,0<\/script>",n=n.removeChild(n.firstChild)):typeof c.is=="string"?n=S.createElement(a,{is:c.is}):(n=S.createElement(a),a==="select"&&(S=n,c.multiple?S.multiple=!0:c.size&&(S.size=c.size))):n=S.createElementNS(n,a),n[zn]=o,n[wi]=c,dm(n,o,!1,!1),o.stateNode=n;e:{switch(S=ei(a,c),a){case"dialog":Ke("cancel",n),Ke("close",n),f=c;break;case"iframe":case"object":case"embed":Ke("load",n),f=c;break;case"video":case"audio":for(f=0;fys&&(o.flags|=128,c=!0,Oi(m,!1),o.lanes=4194304)}else{if(!c)if(n=Ya(S),n!==null){if(o.flags|=128,c=!0,a=n.updateQueue,a!==null&&(o.updateQueue=a,o.flags|=4),Oi(m,!0),m.tail===null&&m.tailMode==="hidden"&&!S.alternate&&!Ye)return xt(o),null}else 2*tt()-m.renderingStartTime>ys&&a!==1073741824&&(o.flags|=128,c=!0,Oi(m,!1),o.lanes=4194304);m.isBackwards?(S.sibling=o.child,o.child=S):(a=m.last,a!==null?a.sibling=S:o.child=S,m.last=S)}return m.tail!==null?(o=m.tail,m.rendering=o,m.tail=o.sibling,m.renderingStartTime=tt(),o.sibling=null,a=Ge.current,We(Ge,c?a&1|2:a&1),o):(xt(o),null);case 22:case 23:return Zu(),c=o.memoizedState!==null,n!==null&&n.memoizedState!==null!==c&&(o.flags|=8192),c&&(o.mode&1)!==0?(Gt&1073741824)!==0&&(xt(o),o.subtreeFlags&6&&(o.flags|=8192)):xt(o),null;case 24:return null;case 25:return null}throw Error(r(156,o.tag))}function Lb(n,o){switch(lu(o),o.tag){case 1:return Dt(o.type)&&Fa(),n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 3:return hs(),qe(It),qe(yt),bu(),n=o.flags,(n&65536)!==0&&(n&128)===0?(o.flags=n&-65537|128,o):null;case 5:return xu(o),null;case 13:if(qe(Ge),n=o.memoizedState,n!==null&&n.dehydrated!==null){if(o.alternate===null)throw Error(r(340));cs()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 19:return qe(Ge),null;case 4:return hs(),null;case 10:return pu(o.type._context),null;case 22:case 23:return Zu(),null;case 24:return null;default:return null}}var ol=!1,wt=!1,Ib=typeof WeakSet=="function"?WeakSet:Set,fe=null;function ms(n,o){var a=n.ref;if(a!==null)if(typeof a=="function")try{a(null)}catch(c){Je(n,o,c)}else a.current=null}function Uu(n,o,a){try{a()}catch(c){Je(n,o,c)}}var pm=!1;function Db(n,o){if(Zc=Ea,n=Kh(),Wc(n)){if("selectionStart"in n)var a={start:n.selectionStart,end:n.selectionEnd};else e:{a=(a=n.ownerDocument)&&a.defaultView||window;var c=a.getSelection&&a.getSelection();if(c&&c.rangeCount!==0){a=c.anchorNode;var f=c.anchorOffset,m=c.focusNode;c=c.focusOffset;try{a.nodeType,m.nodeType}catch{a=null;break e}var S=0,N=-1,O=-1,z=0,Y=0,X=n,q=null;t:for(;;){for(var ue;X!==a||f!==0&&X.nodeType!==3||(N=S+f),X!==m||c!==0&&X.nodeType!==3||(O=S+c),X.nodeType===3&&(S+=X.nodeValue.length),(ue=X.firstChild)!==null;)q=X,X=ue;for(;;){if(X===n)break t;if(q===a&&++z===f&&(N=S),q===m&&++Y===c&&(O=S),(ue=X.nextSibling)!==null)break;X=q,q=X.parentNode}X=ue}a=N===-1||O===-1?null:{start:N,end:O}}else a=null}a=a||{start:0,end:0}}else a=null;for(eu={focusedElem:n,selectionRange:a},Ea=!1,fe=o;fe!==null;)if(o=fe,n=o.child,(o.subtreeFlags&1028)!==0&&n!==null)n.return=o,fe=n;else for(;fe!==null;){o=fe;try{var he=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(he!==null){var pe=he.memoizedProps,nt=he.memoizedState,I=o.stateNode,L=I.getSnapshotBeforeUpdate(o.elementType===o.type?pe:vn(o.type,pe),nt);I.__reactInternalSnapshotBeforeUpdate=L}break;case 3:var D=o.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(re){Je(o,o.return,re)}if(n=o.sibling,n!==null){n.return=o.return,fe=n;break}fe=o.return}return he=pm,pm=!1,he}function ji(n,o,a){var c=o.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var f=c=c.next;do{if((f.tag&n)===n){var m=f.destroy;f.destroy=void 0,m!==void 0&&Uu(o,a,m)}f=f.next}while(f!==c)}}function sl(n,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var a=o=o.next;do{if((a.tag&n)===n){var c=a.create;a.destroy=c()}a=a.next}while(a!==o)}}function Bu(n){var o=n.ref;if(o!==null){var a=n.stateNode;switch(n.tag){case 5:n=a;break;default:n=a}typeof o=="function"?o(n):o.current=n}}function mm(n){var o=n.alternate;o!==null&&(n.alternate=null,mm(o)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(o=n.stateNode,o!==null&&(delete o[zn],delete o[wi],delete o[ou],delete o[vb],delete o[xb])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function gm(n){return n.tag===5||n.tag===3||n.tag===4}function ym(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||gm(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Hu(n,o,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,o?a.nodeType===8?a.parentNode.insertBefore(n,o):a.insertBefore(n,o):(a.nodeType===8?(o=a.parentNode,o.insertBefore(n,a)):(o=a,o.appendChild(n)),a=a._reactRootContainer,a!=null||o.onclick!==null||(o.onclick=Da));else if(c!==4&&(n=n.child,n!==null))for(Hu(n,o,a),n=n.sibling;n!==null;)Hu(n,o,a),n=n.sibling}function Vu(n,o,a){var c=n.tag;if(c===5||c===6)n=n.stateNode,o?a.insertBefore(n,o):a.appendChild(n);else if(c!==4&&(n=n.child,n!==null))for(Vu(n,o,a),n=n.sibling;n!==null;)Vu(n,o,a),n=n.sibling}var ht=null,xn=!1;function Ir(n,o,a){for(a=a.child;a!==null;)vm(n,o,a),a=a.sibling}function vm(n,o,a){if(Fn&&typeof Fn.onCommitFiberUnmount=="function")try{Fn.onCommitFiberUnmount(va,a)}catch{}switch(a.tag){case 5:wt||ms(a,o);case 6:var c=ht,f=xn;ht=null,Ir(n,o,a),ht=c,xn=f,ht!==null&&(xn?(n=ht,a=a.stateNode,n.nodeType===8?n.parentNode.removeChild(a):n.removeChild(a)):ht.removeChild(a.stateNode));break;case 18:ht!==null&&(xn?(n=ht,a=a.stateNode,n.nodeType===8?ru(n.parentNode,a):n.nodeType===1&&ru(n,a),ci(n)):ru(ht,a.stateNode));break;case 4:c=ht,f=xn,ht=a.stateNode.containerInfo,xn=!0,Ir(n,o,a),ht=c,xn=f;break;case 0:case 11:case 14:case 15:if(!wt&&(c=a.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){f=c=c.next;do{var m=f,S=m.destroy;m=m.tag,S!==void 0&&((m&2)!==0||(m&4)!==0)&&Uu(a,o,S),f=f.next}while(f!==c)}Ir(n,o,a);break;case 1:if(!wt&&(ms(a,o),c=a.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=a.memoizedProps,c.state=a.memoizedState,c.componentWillUnmount()}catch(N){Je(a,o,N)}Ir(n,o,a);break;case 21:Ir(n,o,a);break;case 22:a.mode&1?(wt=(c=wt)||a.memoizedState!==null,Ir(n,o,a),wt=c):Ir(n,o,a);break;default:Ir(n,o,a)}}function xm(n){var o=n.updateQueue;if(o!==null){n.updateQueue=null;var a=n.stateNode;a===null&&(a=n.stateNode=new Ib),o.forEach(function(c){var f=Wb.bind(null,n,c);a.has(c)||(a.add(c),c.then(f,f))})}}function wn(n,o){var a=o.deletions;if(a!==null)for(var c=0;cf&&(f=S),c&=~m}if(c=f,c=tt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*Fb(c/1960))-c,10n?16:n,Mr===null)var c=!1;else{if(n=Mr,Mr=null,ul=0,(Le&6)!==0)throw Error(r(331));var f=Le;for(Le|=4,fe=n.current;fe!==null;){var m=fe,S=m.child;if((fe.flags&16)!==0){var N=m.deletions;if(N!==null){for(var O=0;Ott()-qu?xo(n,0):Ku|=a),zt(n,o)}function _m(n,o){o===0&&((n.mode&1)===0?o=1:(o=wa,wa<<=1,(wa&130023424)===0&&(wa=4194304)));var a=Rt();n=ir(n,o),n!==null&&(oi(n,o,a),zt(n,a))}function Vb(n){var o=n.memoizedState,a=0;o!==null&&(a=o.retryLane),_m(n,a)}function Wb(n,o){var a=0;switch(n.tag){case 13:var c=n.stateNode,f=n.memoizedState;f!==null&&(a=f.retryLane);break;case 19:c=n.stateNode;break;default:throw Error(r(314))}c!==null&&c.delete(o),_m(n,a)}var Am;Am=function(n,o,a){if(n!==null)if(n.memoizedProps!==o.pendingProps||It.current)Mt=!0;else{if((n.lanes&a)===0&&(o.flags&128)===0)return Mt=!1,_b(n,o,a);Mt=(n.flags&131072)!==0}else Mt=!1,Ye&&(o.flags&1048576)!==0&&fp(o,Ba,o.index);switch(o.lanes=0,o.tag){case 2:var c=o.type;rl(n,o),n=o.pendingProps;var f=is(o,yt.current);fs(o,a),f=Eu(null,o,c,n,f,a);var m=ku();return o.flags|=1,typeof f=="object"&&f!==null&&typeof f.render=="function"&&f.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Dt(c)?(m=!0,za(o)):m=!1,o.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,yu(o),f.updater=tl,o.stateNode=f,f._reactInternals=o,ju(o,c,n,a),o=Iu(null,o,c,!0,m,a)):(o.tag=0,Ye&&m&&au(o),Nt(null,o,f,a),o=o.child),o;case 16:c=o.elementType;e:{switch(rl(n,o),n=o.pendingProps,f=c._init,c=f(c._payload),o.type=c,f=o.tag=qb(c),n=vn(c,n),f){case 0:o=Lu(null,o,c,n,a);break e;case 1:o=sm(null,o,c,n,a);break e;case 11:o=em(null,o,c,n,a);break e;case 14:o=tm(null,o,c,vn(c.type,n),a);break e}throw Error(r(306,c,""))}return o;case 0:return c=o.type,f=o.pendingProps,f=o.elementType===c?f:vn(c,f),Lu(n,o,c,f,a);case 1:return c=o.type,f=o.pendingProps,f=o.elementType===c?f:vn(c,f),sm(n,o,c,f,a);case 3:e:{if(im(o),n===null)throw Error(r(387));c=o.pendingProps,m=o.memoizedState,f=m.element,bp(n,o),Qa(o,c,null,a);var S=o.memoizedState;if(c=S.element,m.isDehydrated)if(m={element:c,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},o.updateQueue.baseState=m,o.memoizedState=m,o.flags&256){f=ps(Error(r(423)),o),o=am(n,o,c,a,f);break e}else if(c!==f){f=ps(Error(r(424)),o),o=am(n,o,c,a,f);break e}else for(Yt=Tr(o.stateNode.containerInfo.firstChild),Qt=o,Ye=!0,yn=null,a=xp(o,null,c,a),o.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(cs(),c===f){o=lr(n,o,a);break e}Nt(n,o,c,a)}o=o.child}return o;case 5:return Ep(o),n===null&&uu(o),c=o.type,f=o.pendingProps,m=n!==null?n.memoizedProps:null,S=f.children,tu(c,f)?S=null:m!==null&&tu(c,m)&&(o.flags|=32),om(n,o),Nt(n,o,S,a),o.child;case 6:return n===null&&uu(o),null;case 13:return lm(n,o,a);case 4:return vu(o,o.stateNode.containerInfo),c=o.pendingProps,n===null?o.child=us(o,null,c,a):Nt(n,o,c,a),o.child;case 11:return c=o.type,f=o.pendingProps,f=o.elementType===c?f:vn(c,f),em(n,o,c,f,a);case 7:return Nt(n,o,o.pendingProps,a),o.child;case 8:return Nt(n,o,o.pendingProps.children,a),o.child;case 12:return Nt(n,o,o.pendingProps.children,a),o.child;case 10:e:{if(c=o.type._context,f=o.pendingProps,m=o.memoizedProps,S=f.value,We(Wa,c._currentValue),c._currentValue=S,m!==null)if(gn(m.value,S)){if(m.children===f.children&&!It.current){o=lr(n,o,a);break e}}else for(m=o.child,m!==null&&(m.return=o);m!==null;){var N=m.dependencies;if(N!==null){S=m.child;for(var O=N.firstContext;O!==null;){if(O.context===c){if(m.tag===1){O=ar(-1,a&-a),O.tag=2;var z=m.updateQueue;if(z!==null){z=z.shared;var Y=z.pending;Y===null?O.next=O:(O.next=Y.next,Y.next=O),z.pending=O}}m.lanes|=a,O=m.alternate,O!==null&&(O.lanes|=a),mu(m.return,a,o),N.lanes|=a;break}O=O.next}}else if(m.tag===10)S=m.type===o.type?null:m.child;else if(m.tag===18){if(S=m.return,S===null)throw Error(r(341));S.lanes|=a,N=S.alternate,N!==null&&(N.lanes|=a),mu(S,a,o),S=m.sibling}else S=m.child;if(S!==null)S.return=m;else for(S=m;S!==null;){if(S===o){S=null;break}if(m=S.sibling,m!==null){m.return=S.return,S=m;break}S=S.return}m=S}Nt(n,o,f.children,a),o=o.child}return o;case 9:return f=o.type,c=o.pendingProps.children,fs(o,a),f=rn(f),c=c(f),o.flags|=1,Nt(n,o,c,a),o.child;case 14:return c=o.type,f=vn(c,o.pendingProps),f=vn(c.type,f),tm(n,o,c,f,a);case 15:return nm(n,o,o.type,o.pendingProps,a);case 17:return c=o.type,f=o.pendingProps,f=o.elementType===c?f:vn(c,f),rl(n,o),o.tag=1,Dt(c)?(n=!0,za(o)):n=!1,fs(o,a),qp(o,c,f),ju(o,c,f,a),Iu(null,o,c,!0,n,a);case 19:return um(n,o,a);case 22:return rm(n,o,a)}throw Error(r(156,o.tag))};function Lm(n,o){return hh(n,o)}function Kb(n,o,a,c){this.tag=n,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function an(n,o,a,c){return new Kb(n,o,a,c)}function td(n){return n=n.prototype,!(!n||!n.isReactComponent)}function qb(n){if(typeof n=="function")return td(n)?1:0;if(n!=null){if(n=n.$$typeof,n===K)return 11;if(n===de)return 14}return 2}function $r(n,o){var a=n.alternate;return a===null?(a=an(n.tag,o,n.key,n.mode),a.elementType=n.elementType,a.type=n.type,a.stateNode=n.stateNode,a.alternate=n,n.alternate=a):(a.pendingProps=o,a.type=n.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=n.flags&14680064,a.childLanes=n.childLanes,a.lanes=n.lanes,a.child=n.child,a.memoizedProps=n.memoizedProps,a.memoizedState=n.memoizedState,a.updateQueue=n.updateQueue,o=n.dependencies,a.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},a.sibling=n.sibling,a.index=n.index,a.ref=n.ref,a}function pl(n,o,a,c,f,m){var S=2;if(c=n,typeof n=="function")td(n)&&(S=1);else if(typeof n=="string")S=5;else e:switch(n){case B:return bo(a.children,f,m,o);case te:S=8,f|=8;break;case G:return n=an(12,a,o,f|2),n.elementType=G,n.lanes=m,n;case Z:return n=an(13,a,o,f),n.elementType=Z,n.lanes=m,n;case J:return n=an(19,a,o,f),n.elementType=J,n.lanes=m,n;case se:return ml(a,f,m,o);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case W:S=10;break e;case le:S=9;break e;case K:S=11;break e;case de:S=14;break e;case ne:S=16,c=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return o=an(S,a,o,f),o.elementType=n,o.type=c,o.lanes=m,o}function bo(n,o,a,c){return n=an(7,n,c,o),n.lanes=a,n}function ml(n,o,a,c){return n=an(22,n,c,o),n.elementType=se,n.lanes=a,n.stateNode={isHidden:!1},n}function nd(n,o,a){return n=an(6,n,null,o),n.lanes=a,n}function rd(n,o,a){return o=an(4,n.children!==null?n.children:[],n.key,o),o.lanes=a,o.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},o}function Qb(n,o,a,c,f){this.tag=o,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Oc(0),this.expirationTimes=Oc(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Oc(0),this.identifierPrefix=c,this.onRecoverableError=f,this.mutableSourceEagerHydrationData=null}function od(n,o,a,c,f,m,S,N,O){return n=new Qb(n,o,a,N,O),o===1?(o=1,m===!0&&(o|=8)):o=0,m=an(3,null,null,o),n.current=m,m.stateNode=n,m.memoizedState={element:c,isDehydrated:a,cache:null,transitions:null,pendingSuspenseBoundaries:null},yu(m),n}function Yb(n,o,a){var c=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),dd.exports=a1(),dd.exports}var Ym;function l1(){if(Ym)return Cl;Ym=1;var t=Fy();return Cl.createRoot=t.createRoot,Cl.hydrateRoot=t.hydrateRoot,Cl}var c1=l1();const u1=bf(c1);var Ks=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},d1={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},Kr,wf,Ry,f1=(Ry=class{constructor(){ve(this,Kr,d1);ve(this,wf,!1)}setTimeoutProvider(t){ce(this,Kr,t)}setTimeout(t,e){return R(this,Kr).setTimeout(t,e)}clearTimeout(t){R(this,Kr).clearTimeout(t)}setInterval(t,e){return R(this,Kr).setInterval(t,e)}clearInterval(t){R(this,Kr).clearInterval(t)}},Kr=new WeakMap,wf=new WeakMap,Ry),Co=new f1;function h1(t){setTimeout(t,0)}var Fo=typeof window>"u"||"Deno"in globalThis;function Ot(){}function p1(t,e){return typeof t=="function"?t(e):t}function Id(t){return typeof t=="number"&&t>=0&&t!==1/0}function zy(t,e){return Math.max(t+(e||0)-Date.now(),0)}function to(t,e){return typeof t=="function"?t(e):t}function cn(t,e){return typeof t=="function"?t(e):t}function Gm(t,e){const{type:r="all",exact:s,fetchStatus:i,predicate:l,queryKey:u,stale:d}=t;if(u){if(s){if(e.queryHash!==Cf(u,e.options))return!1}else if(!Wi(e.queryKey,u))return!1}if(r!=="all"){const h=e.isActive();if(r==="active"&&!h||r==="inactive"&&h)return!1}return!(typeof d=="boolean"&&e.isStale()!==d||i&&i!==e.state.fetchStatus||l&&!l(e))}function Xm(t,e){const{exact:r,status:s,predicate:i,mutationKey:l}=t;if(l){if(!e.options.mutationKey)return!1;if(r){if(zo(e.options.mutationKey)!==zo(l))return!1}else if(!Wi(e.options.mutationKey,l))return!1}return!(s&&e.state.status!==s||i&&!i(e))}function Cf(t,e){return((e==null?void 0:e.queryKeyHashFn)||zo)(t)}function zo(t){return JSON.stringify(t,(e,r)=>Dd(r)?Object.keys(r).sort().reduce((s,i)=>(s[i]=r[i],s),{}):r)}function Wi(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(r=>Wi(t[r],e[r])):!1}var m1=Object.prototype.hasOwnProperty;function $y(t,e){if(t===e)return t;const r=Jm(t)&&Jm(e);if(!r&&!(Dd(t)&&Dd(e)))return e;const i=(r?t:Object.keys(t)).length,l=r?e:Object.keys(e),u=l.length,d=r?new Array(u):{};let h=0;for(let p=0;p{Co.setTimeout(e,t)})}function Md(t,e,r){return typeof r.structuralSharing=="function"?r.structuralSharing(t,e):r.structuralSharing!==!1?$y(t,e):e}function y1(t,e,r=0){const s=[...t,e];return r&&s.length>r?s.slice(1):s}function v1(t,e,r=0){const s=[e,...t];return r&&s.length>r?s.slice(0,-1):s}var Ef=Symbol();function Uy(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===Ef?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function By(t,e){return typeof t=="function"?t(...e):!!t}var Po,qr,js,Py,x1=(Py=class extends Ks{constructor(){super();ve(this,Po);ve(this,qr);ve(this,js);ce(this,js,e=>{if(!Fo&&window.addEventListener){const r=()=>e();return window.addEventListener("visibilitychange",r,!1),()=>{window.removeEventListener("visibilitychange",r)}}})}onSubscribe(){R(this,qr)||this.setEventListener(R(this,js))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,qr))==null||e.call(this),ce(this,qr,void 0))}setEventListener(e){var r;ce(this,js,e),(r=R(this,qr))==null||r.call(this),ce(this,qr,e(s=>{typeof s=="boolean"?this.setFocused(s):this.onFocus()}))}setFocused(e){R(this,Po)!==e&&(ce(this,Po,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(r=>{r(e)})}isFocused(){var e;return typeof R(this,Po)=="boolean"?R(this,Po):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Po=new WeakMap,qr=new WeakMap,js=new WeakMap,Py),kf=new x1;function Fd(){let t,e;const r=new Promise((i,l)=>{t=i,e=l});r.status="pending",r.catch(()=>{});function s(i){Object.assign(r,i),delete r.resolve,delete r.reject}return r.resolve=i=>{s({status:"fulfilled",value:i}),t(i)},r.reject=i=>{s({status:"rejected",reason:i}),e(i)},r}var w1=h1;function b1(){let t=[],e=0,r=d=>{d()},s=d=>{d()},i=w1;const l=d=>{e?t.push(d):i(()=>{r(d)})},u=()=>{const d=t;t=[],d.length&&i(()=>{s(()=>{d.forEach(h=>{r(h)})})})};return{batch:d=>{let h;e++;try{h=d()}finally{e--,e||u()}return h},batchCalls:d=>(...h)=>{l(()=>{d(...h)})},schedule:l,setNotifyFunction:d=>{r=d},setBatchNotifyFunction:d=>{s=d},setScheduler:d=>{i=d}}}var at=b1(),_s,Qr,As,Ty,S1=(Ty=class extends Ks{constructor(){super();ve(this,_s,!0);ve(this,Qr);ve(this,As);ce(this,As,e=>{if(!Fo&&window.addEventListener){const r=()=>e(!0),s=()=>e(!1);return window.addEventListener("online",r,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",r),window.removeEventListener("offline",s)}}})}onSubscribe(){R(this,Qr)||this.setEventListener(R(this,As))}onUnsubscribe(){var e;this.hasListeners()||((e=R(this,Qr))==null||e.call(this),ce(this,Qr,void 0))}setEventListener(e){var r;ce(this,As,e),(r=R(this,Qr))==null||r.call(this),ce(this,Qr,e(this.setOnline.bind(this)))}setOnline(e){R(this,_s)!==e&&(ce(this,_s,e),this.listeners.forEach(s=>{s(e)}))}isOnline(){return R(this,_s)}},_s=new WeakMap,Qr=new WeakMap,As=new WeakMap,Ty),Wl=new S1;function C1(t){return Math.min(1e3*2**t,3e4)}function Hy(t){return(t??"online")==="online"?Wl.isOnline():!0}var zd=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Vy(t){let e=!1,r=0,s;const i=Fd(),l=()=>i.status!=="pending",u=b=>{var k;if(!l()){const T=new zd(b);C(T),(k=t.onCancel)==null||k.call(t,T)}},d=()=>{e=!0},h=()=>{e=!1},p=()=>kf.isFocused()&&(t.networkMode==="always"||Wl.isOnline())&&t.canRun(),y=()=>Hy(t.networkMode)&&t.canRun(),v=b=>{l()||(s==null||s(),i.resolve(b))},C=b=>{l()||(s==null||s(),i.reject(b))},w=()=>new Promise(b=>{var k;s=T=>{(l()||p())&&b(T)},(k=t.onPause)==null||k.call(t)}).then(()=>{var b;s=void 0,l()||(b=t.onContinue)==null||b.call(t)}),E=()=>{if(l())return;let b;const k=r===0?t.initialPromise:void 0;try{b=k??t.fn()}catch(T){b=Promise.reject(T)}Promise.resolve(b).then(v).catch(T=>{var V;if(l())return;const j=t.retry??(Fo?0:3),_=t.retryDelay??C1,A=typeof _=="function"?_(r,T):_,F=j===!0||typeof j=="number"&&rp()?void 0:w()).then(()=>{e?C(T):E()})})};return{promise:i,status:()=>i.status,cancel:u,continue:()=>(s==null||s(),i),cancelRetry:d,continueRetry:h,canStart:y,start:()=>(y()?E():w().then(E),i)}}var To,Oy,Wy=(Oy=class{constructor(){ve(this,To)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Id(this.gcTime)&&ce(this,To,Co.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Fo?1/0:300*1e3))}clearGcTimeout(){R(this,To)&&(Co.clearTimeout(R(this,To)),ce(this,To,void 0))}},To=new WeakMap,Oy),Oo,Ls,ln,jo,dt,Gi,_o,En,fr,jy,E1=(jy=class extends Wy{constructor(e){super();ve(this,En);ve(this,Oo);ve(this,Ls);ve(this,ln);ve(this,jo);ve(this,dt);ve(this,Gi);ve(this,_o);ce(this,_o,!1),ce(this,Gi,e.defaultOptions),this.setOptions(e.options),this.observers=[],ce(this,jo,e.client),ce(this,ln,R(this,jo).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,ce(this,Oo,tg(this.options)),this.state=e.state??R(this,Oo),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=R(this,dt))==null?void 0:e.promise}setOptions(e){if(this.options={...R(this,Gi),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const r=tg(this.options);r.data!==void 0&&(this.setState(eg(r.data,r.dataUpdatedAt)),ce(this,Oo,r))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&R(this,ln).remove(this)}setData(e,r){const s=Md(this.state.data,e,this.options);return Te(this,En,fr).call(this,{data:s,type:"success",dataUpdatedAt:r==null?void 0:r.updatedAt,manual:r==null?void 0:r.manual}),s}setState(e,r){Te(this,En,fr).call(this,{type:"setState",state:e,setStateOptions:r})}cancel(e){var s,i;const r=(s=R(this,dt))==null?void 0:s.promise;return(i=R(this,dt))==null||i.cancel(e),r?r.then(Ot).catch(Ot):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(R(this,Oo))}isActive(){return this.observers.some(e=>cn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ef||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>to(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!zy(this.state.dataUpdatedAt,e)}onFocus(){var r;const e=this.observers.find(s=>s.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(r=R(this,dt))==null||r.continue()}onOnline(){var r;const e=this.observers.find(s=>s.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(r=R(this,dt))==null||r.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),R(this,ln).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(r=>r!==e),this.observers.length||(R(this,dt)&&(R(this,_o)?R(this,dt).cancel({revert:!0}):R(this,dt).cancelRetry()),this.scheduleGc()),R(this,ln).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Te(this,En,fr).call(this,{type:"invalidate"})}async fetch(e,r){var h,p,y,v,C,w,E,b,k,T,j,_;if(this.state.fetchStatus!=="idle"&&((h=R(this,dt))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(r!=null&&r.cancelRefetch))this.cancel({silent:!0});else if(R(this,dt))return R(this,dt).continueRetry(),R(this,dt).promise}if(e&&this.setOptions(e),!this.options.queryFn){const A=this.observers.find(F=>F.options.queryFn);A&&this.setOptions(A.options)}const s=new AbortController,i=A=>{Object.defineProperty(A,"signal",{enumerable:!0,get:()=>(ce(this,_o,!0),s.signal)})},l=()=>{const A=Uy(this.options,r),V=(()=>{const B={client:R(this,jo),queryKey:this.queryKey,meta:this.meta};return i(B),B})();return ce(this,_o,!1),this.options.persister?this.options.persister(A,V,this):A(V)},d=(()=>{const A={fetchOptions:r,options:this.options,queryKey:this.queryKey,client:R(this,jo),state:this.state,fetchFn:l};return i(A),A})();(p=this.options.behavior)==null||p.onFetch(d,this),ce(this,Ls,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((y=d.fetchOptions)==null?void 0:y.meta))&&Te(this,En,fr).call(this,{type:"fetch",meta:(v=d.fetchOptions)==null?void 0:v.meta}),ce(this,dt,Vy({initialPromise:r==null?void 0:r.initialPromise,fn:d.fetchFn,onCancel:A=>{A instanceof zd&&A.revert&&this.setState({...R(this,Ls),fetchStatus:"idle"}),s.abort()},onFail:(A,F)=>{Te(this,En,fr).call(this,{type:"failed",failureCount:A,error:F})},onPause:()=>{Te(this,En,fr).call(this,{type:"pause"})},onContinue:()=>{Te(this,En,fr).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const A=await R(this,dt).start();if(A===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(A),(w=(C=R(this,ln).config).onSuccess)==null||w.call(C,A,this),(b=(E=R(this,ln).config).onSettled)==null||b.call(E,A,this.state.error,this),A}catch(A){if(A instanceof zd){if(A.silent)return R(this,dt).promise;if(A.revert){if(this.state.data===void 0)throw A;return this.state.data}}throw Te(this,En,fr).call(this,{type:"error",error:A}),(T=(k=R(this,ln).config).onError)==null||T.call(k,A,this),(_=(j=R(this,ln).config).onSettled)==null||_.call(j,this.state.data,A,this),A}finally{this.scheduleGc()}}},Oo=new WeakMap,Ls=new WeakMap,ln=new WeakMap,jo=new WeakMap,dt=new WeakMap,Gi=new WeakMap,_o=new WeakMap,En=new WeakSet,fr=function(e){const r=s=>{switch(e.type){case"failed":return{...s,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...Ky(s.data,this.options),fetchMeta:e.meta??null};case"success":const i={...s,...eg(e.data,e.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ce(this,Ls,e.manual?i:void 0),i;case"error":const l=e.error;return{...s,error:l,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:l,fetchStatus:"idle",status:"error"};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...e.state}}};this.state=r(this.state),at.batch(()=>{this.observers.forEach(s=>{s.onQueryUpdate()}),R(this,ln).notify({query:this,type:"updated",action:e})})},jy);function Ky(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Hy(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function eg(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function tg(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,r=e!==void 0,s=r?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:r?s??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}var Ut,Ae,Xi,Pt,Ao,Is,hr,Yr,Ji,Ds,Ms,Lo,Io,Gr,Fs,$e,Ui,$d,Ud,Bd,Hd,Vd,Wd,Kd,qy,_y,k1=(_y=class extends Ks{constructor(e,r){super();ve(this,$e);ve(this,Ut);ve(this,Ae);ve(this,Xi);ve(this,Pt);ve(this,Ao);ve(this,Is);ve(this,hr);ve(this,Yr);ve(this,Ji);ve(this,Ds);ve(this,Ms);ve(this,Lo);ve(this,Io);ve(this,Gr);ve(this,Fs,new Set);this.options=r,ce(this,Ut,e),ce(this,Yr,null),ce(this,hr,Fd()),this.bindMethods(),this.setOptions(r)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(R(this,Ae).addObserver(this),ng(R(this,Ae),this.options)?Te(this,$e,Ui).call(this):this.updateResult(),Te(this,$e,Hd).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return qd(R(this,Ae),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return qd(R(this,Ae),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Te(this,$e,Vd).call(this),Te(this,$e,Wd).call(this),R(this,Ae).removeObserver(this)}setOptions(e){const r=this.options,s=R(this,Ae);if(this.options=R(this,Ut).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof cn(this.options.enabled,R(this,Ae))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Te(this,$e,Kd).call(this),R(this,Ae).setOptions(this.options),r._defaulted&&!Vl(this.options,r)&&R(this,Ut).getQueryCache().notify({type:"observerOptionsUpdated",query:R(this,Ae),observer:this});const i=this.hasListeners();i&&rg(R(this,Ae),s,this.options,r)&&Te(this,$e,Ui).call(this),this.updateResult(),i&&(R(this,Ae)!==s||cn(this.options.enabled,R(this,Ae))!==cn(r.enabled,R(this,Ae))||to(this.options.staleTime,R(this,Ae))!==to(r.staleTime,R(this,Ae)))&&Te(this,$e,$d).call(this);const l=Te(this,$e,Ud).call(this);i&&(R(this,Ae)!==s||cn(this.options.enabled,R(this,Ae))!==cn(r.enabled,R(this,Ae))||l!==R(this,Gr))&&Te(this,$e,Bd).call(this,l)}getOptimisticResult(e){const r=R(this,Ut).getQueryCache().build(R(this,Ut),e),s=this.createResult(r,e);return R1(this,s)&&(ce(this,Pt,s),ce(this,Is,this.options),ce(this,Ao,R(this,Ae).state)),s}getCurrentResult(){return R(this,Pt)}trackResult(e,r){return new Proxy(e,{get:(s,i)=>(this.trackProp(i),r==null||r(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&R(this,hr).status==="pending"&&R(this,hr).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,i))})}trackProp(e){R(this,Fs).add(e)}getCurrentQuery(){return R(this,Ae)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const r=R(this,Ut).defaultQueryOptions(e),s=R(this,Ut).getQueryCache().build(R(this,Ut),r);return s.fetch().then(()=>this.createResult(s,r))}fetch(e){return Te(this,$e,Ui).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),R(this,Pt)))}createResult(e,r){var G;const s=R(this,Ae),i=this.options,l=R(this,Pt),u=R(this,Ao),d=R(this,Is),p=e!==s?e.state:R(this,Xi),{state:y}=e;let v={...y},C=!1,w;if(r._optimisticResults){const W=this.hasListeners(),le=!W&&ng(e,r),K=W&&rg(e,s,r,i);(le||K)&&(v={...v,...Ky(y.data,e.options)}),r._optimisticResults==="isRestoring"&&(v.fetchStatus="idle")}let{error:E,errorUpdatedAt:b,status:k}=v;w=v.data;let T=!1;if(r.placeholderData!==void 0&&w===void 0&&k==="pending"){let W;l!=null&&l.isPlaceholderData&&r.placeholderData===(d==null?void 0:d.placeholderData)?(W=l.data,T=!0):W=typeof r.placeholderData=="function"?r.placeholderData((G=R(this,Ms))==null?void 0:G.state.data,R(this,Ms)):r.placeholderData,W!==void 0&&(k="success",w=Md(l==null?void 0:l.data,W,r),C=!0)}if(r.select&&w!==void 0&&!T)if(l&&w===(u==null?void 0:u.data)&&r.select===R(this,Ji))w=R(this,Ds);else try{ce(this,Ji,r.select),w=r.select(w),w=Md(l==null?void 0:l.data,w,r),ce(this,Ds,w),ce(this,Yr,null)}catch(W){ce(this,Yr,W)}R(this,Yr)&&(E=R(this,Yr),w=R(this,Ds),b=Date.now(),k="error");const j=v.fetchStatus==="fetching",_=k==="pending",A=k==="error",F=_&&j,V=w!==void 0,te={status:k,fetchStatus:v.fetchStatus,isPending:_,isSuccess:k==="success",isError:A,isInitialLoading:F,isLoading:F,data:w,dataUpdatedAt:v.dataUpdatedAt,error:E,errorUpdatedAt:b,failureCount:v.fetchFailureCount,failureReason:v.fetchFailureReason,errorUpdateCount:v.errorUpdateCount,isFetched:v.dataUpdateCount>0||v.errorUpdateCount>0,isFetchedAfterMount:v.dataUpdateCount>p.dataUpdateCount||v.errorUpdateCount>p.errorUpdateCount,isFetching:j,isRefetching:j&&!_,isLoadingError:A&&!V,isPaused:v.fetchStatus==="paused",isPlaceholderData:C,isRefetchError:A&&V,isStale:Nf(e,r),refetch:this.refetch,promise:R(this,hr),isEnabled:cn(r.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const W=Z=>{te.status==="error"?Z.reject(te.error):te.data!==void 0&&Z.resolve(te.data)},le=()=>{const Z=ce(this,hr,te.promise=Fd());W(Z)},K=R(this,hr);switch(K.status){case"pending":e.queryHash===s.queryHash&&W(K);break;case"fulfilled":(te.status==="error"||te.data!==K.value)&&le();break;case"rejected":(te.status!=="error"||te.error!==K.reason)&&le();break}}return te}updateResult(){const e=R(this,Pt),r=this.createResult(R(this,Ae),this.options);if(ce(this,Ao,R(this,Ae).state),ce(this,Is,this.options),R(this,Ao).data!==void 0&&ce(this,Ms,R(this,Ae)),Vl(r,e))return;ce(this,Pt,r);const s=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,l=typeof i=="function"?i():i;if(l==="all"||!l&&!R(this,Fs).size)return!0;const u=new Set(l??R(this,Fs));return this.options.throwOnError&&u.add("error"),Object.keys(R(this,Pt)).some(d=>{const h=d;return R(this,Pt)[h]!==e[h]&&u.has(h)})};Te(this,$e,qy).call(this,{listeners:s()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Te(this,$e,Hd).call(this)}},Ut=new WeakMap,Ae=new WeakMap,Xi=new WeakMap,Pt=new WeakMap,Ao=new WeakMap,Is=new WeakMap,hr=new WeakMap,Yr=new WeakMap,Ji=new WeakMap,Ds=new WeakMap,Ms=new WeakMap,Lo=new WeakMap,Io=new WeakMap,Gr=new WeakMap,Fs=new WeakMap,$e=new WeakSet,Ui=function(e){Te(this,$e,Kd).call(this);let r=R(this,Ae).fetch(this.options,e);return e!=null&&e.throwOnError||(r=r.catch(Ot)),r},$d=function(){Te(this,$e,Vd).call(this);const e=to(this.options.staleTime,R(this,Ae));if(Fo||R(this,Pt).isStale||!Id(e))return;const s=zy(R(this,Pt).dataUpdatedAt,e)+1;ce(this,Lo,Co.setTimeout(()=>{R(this,Pt).isStale||this.updateResult()},s))},Ud=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(R(this,Ae)):this.options.refetchInterval)??!1},Bd=function(e){Te(this,$e,Wd).call(this),ce(this,Gr,e),!(Fo||cn(this.options.enabled,R(this,Ae))===!1||!Id(R(this,Gr))||R(this,Gr)===0)&&ce(this,Io,Co.setInterval(()=>{(this.options.refetchIntervalInBackground||kf.isFocused())&&Te(this,$e,Ui).call(this)},R(this,Gr)))},Hd=function(){Te(this,$e,$d).call(this),Te(this,$e,Bd).call(this,Te(this,$e,Ud).call(this))},Vd=function(){R(this,Lo)&&(Co.clearTimeout(R(this,Lo)),ce(this,Lo,void 0))},Wd=function(){R(this,Io)&&(Co.clearInterval(R(this,Io)),ce(this,Io,void 0))},Kd=function(){const e=R(this,Ut).getQueryCache().build(R(this,Ut),this.options);if(e===R(this,Ae))return;const r=R(this,Ae);ce(this,Ae,e),ce(this,Xi,e.state),this.hasListeners()&&(r==null||r.removeObserver(this),e.addObserver(this))},qy=function(e){at.batch(()=>{e.listeners&&this.listeners.forEach(r=>{r(R(this,Pt))}),R(this,Ut).getQueryCache().notify({query:R(this,Ae),type:"observerResultsUpdated"})})},_y);function N1(t,e){return cn(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function ng(t,e){return N1(t,e)||t.state.data!==void 0&&qd(t,e,e.refetchOnMount)}function qd(t,e,r){if(cn(e.enabled,t)!==!1&&to(e.staleTime,t)!=="static"){const s=typeof r=="function"?r(t):r;return s==="always"||s!==!1&&Nf(t,e)}return!1}function rg(t,e,r,s){return(t!==e||cn(s.enabled,t)===!1)&&(!r.suspense||t.state.status!=="error")&&Nf(t,r)}function Nf(t,e){return cn(e.enabled,t)!==!1&&t.isStaleByTime(to(e.staleTime,t))}function R1(t,e){return!Vl(t.getCurrentResult(),e)}function og(t){return{onFetch:(e,r)=>{var y,v,C,w,E;const s=e.options,i=(C=(v=(y=e.fetchOptions)==null?void 0:y.meta)==null?void 0:v.fetchMore)==null?void 0:C.direction,l=((w=e.state.data)==null?void 0:w.pages)||[],u=((E=e.state.data)==null?void 0:E.pageParams)||[];let d={pages:[],pageParams:[]},h=0;const p=async()=>{let b=!1;const k=_=>{Object.defineProperty(_,"signal",{enumerable:!0,get:()=>(e.signal.aborted?b=!0:e.signal.addEventListener("abort",()=>{b=!0}),e.signal)})},T=Uy(e.options,e.fetchOptions),j=async(_,A,F)=>{if(b)return Promise.reject();if(A==null&&_.pages.length)return Promise.resolve(_);const B=(()=>{const le={client:e.client,queryKey:e.queryKey,pageParam:A,direction:F?"backward":"forward",meta:e.options.meta};return k(le),le})(),te=await T(B),{maxPages:G}=e.options,W=F?v1:y1;return{pages:W(_.pages,te,G),pageParams:W(_.pageParams,A,G)}};if(i&&l.length){const _=i==="backward",A=_?P1:sg,F={pages:l,pageParams:u},V=A(s,F);d=await j(F,V,_)}else{const _=t??l.length;do{const A=h===0?u[0]??s.initialPageParam:sg(s,d);if(h>0&&A==null)break;d=await j(d,A),h++}while(h<_)}return d};e.options.persister?e.fetchFn=()=>{var b,k;return(k=(b=e.options).persister)==null?void 0:k.call(b,p,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},r)}:e.fetchFn=p}}}function sg(t,{pages:e,pageParams:r}){const s=e.length-1;return e.length>0?t.getNextPageParam(e[s],e,r[s],r):void 0}function P1(t,{pages:e,pageParams:r}){var s;return e.length>0?(s=t.getPreviousPageParam)==null?void 0:s.call(t,e[0],e,r[0],r):void 0}var Zi,Vn,Tt,Do,Wn,Vr,Ay,T1=(Ay=class extends Wy{constructor(e){super();ve(this,Wn);ve(this,Zi);ve(this,Vn);ve(this,Tt);ve(this,Do);ce(this,Zi,e.client),this.mutationId=e.mutationId,ce(this,Tt,e.mutationCache),ce(this,Vn,[]),this.state=e.state||Qy(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){R(this,Vn).includes(e)||(R(this,Vn).push(e),this.clearGcTimeout(),R(this,Tt).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){ce(this,Vn,R(this,Vn).filter(r=>r!==e)),this.scheduleGc(),R(this,Tt).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){R(this,Vn).length||(this.state.status==="pending"?this.scheduleGc():R(this,Tt).remove(this))}continue(){var e;return((e=R(this,Do))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var u,d,h,p,y,v,C,w,E,b,k,T,j,_,A,F,V,B,te,G;const r=()=>{Te(this,Wn,Vr).call(this,{type:"continue"})},s={client:R(this,Zi),meta:this.options.meta,mutationKey:this.options.mutationKey};ce(this,Do,Vy({fn:()=>this.options.mutationFn?this.options.mutationFn(e,s):Promise.reject(new Error("No mutationFn found")),onFail:(W,le)=>{Te(this,Wn,Vr).call(this,{type:"failed",failureCount:W,error:le})},onPause:()=>{Te(this,Wn,Vr).call(this,{type:"pause"})},onContinue:r,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>R(this,Tt).canRun(this)}));const i=this.state.status==="pending",l=!R(this,Do).canStart();try{if(i)r();else{Te(this,Wn,Vr).call(this,{type:"pending",variables:e,isPaused:l}),await((d=(u=R(this,Tt).config).onMutate)==null?void 0:d.call(u,e,this,s));const le=await((p=(h=this.options).onMutate)==null?void 0:p.call(h,e,s));le!==this.state.context&&Te(this,Wn,Vr).call(this,{type:"pending",context:le,variables:e,isPaused:l})}const W=await R(this,Do).start();return await((v=(y=R(this,Tt).config).onSuccess)==null?void 0:v.call(y,W,e,this.state.context,this,s)),await((w=(C=this.options).onSuccess)==null?void 0:w.call(C,W,e,this.state.context,s)),await((b=(E=R(this,Tt).config).onSettled)==null?void 0:b.call(E,W,null,this.state.variables,this.state.context,this,s)),await((T=(k=this.options).onSettled)==null?void 0:T.call(k,W,null,e,this.state.context,s)),Te(this,Wn,Vr).call(this,{type:"success",data:W}),W}catch(W){try{throw await((_=(j=R(this,Tt).config).onError)==null?void 0:_.call(j,W,e,this.state.context,this,s)),await((F=(A=this.options).onError)==null?void 0:F.call(A,W,e,this.state.context,s)),await((B=(V=R(this,Tt).config).onSettled)==null?void 0:B.call(V,void 0,W,this.state.variables,this.state.context,this,s)),await((G=(te=this.options).onSettled)==null?void 0:G.call(te,void 0,W,e,this.state.context,s)),W}finally{Te(this,Wn,Vr).call(this,{type:"error",error:W})}}finally{R(this,Tt).runNext(this)}}},Zi=new WeakMap,Vn=new WeakMap,Tt=new WeakMap,Do=new WeakMap,Wn=new WeakSet,Vr=function(e){const r=s=>{switch(e.type){case"failed":return{...s,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...s,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:e.error,failureCount:s.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=r(this.state),at.batch(()=>{R(this,Vn).forEach(s=>{s.onMutationUpdate(e)}),R(this,Tt).notify({mutation:this,type:"updated",action:e})})},Ay);function Qy(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var pr,kn,ea,Ly,O1=(Ly=class extends Ks{constructor(e={}){super();ve(this,pr);ve(this,kn);ve(this,ea);this.config=e,ce(this,pr,new Set),ce(this,kn,new Map),ce(this,ea,0)}build(e,r,s){const i=new T1({client:e,mutationCache:this,mutationId:++Sl(this,ea)._,options:e.defaultMutationOptions(r),state:s});return this.add(i),i}add(e){R(this,pr).add(e);const r=El(e);if(typeof r=="string"){const s=R(this,kn).get(r);s?s.push(e):R(this,kn).set(r,[e])}this.notify({type:"added",mutation:e})}remove(e){if(R(this,pr).delete(e)){const r=El(e);if(typeof r=="string"){const s=R(this,kn).get(r);if(s)if(s.length>1){const i=s.indexOf(e);i!==-1&&s.splice(i,1)}else s[0]===e&&R(this,kn).delete(r)}}this.notify({type:"removed",mutation:e})}canRun(e){const r=El(e);if(typeof r=="string"){const s=R(this,kn).get(r),i=s==null?void 0:s.find(l=>l.state.status==="pending");return!i||i===e}else return!0}runNext(e){var s;const r=El(e);if(typeof r=="string"){const i=(s=R(this,kn).get(r))==null?void 0:s.find(l=>l!==e&&l.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){at.batch(()=>{R(this,pr).forEach(e=>{this.notify({type:"removed",mutation:e})}),R(this,pr).clear(),R(this,kn).clear()})}getAll(){return Array.from(R(this,pr))}find(e){const r={exact:!0,...e};return this.getAll().find(s=>Xm(r,s))}findAll(e={}){return this.getAll().filter(r=>Xm(e,r))}notify(e){at.batch(()=>{this.listeners.forEach(r=>{r(e)})})}resumePausedMutations(){const e=this.getAll().filter(r=>r.state.isPaused);return at.batch(()=>Promise.all(e.map(r=>r.continue().catch(Ot))))}},pr=new WeakMap,kn=new WeakMap,ea=new WeakMap,Ly);function El(t){var e;return(e=t.options.scope)==null?void 0:e.id}var mr,Xr,Bt,gr,yr,Dl,Qd,Iy,j1=(Iy=class extends Ks{constructor(r,s){super();ve(this,yr);ve(this,mr);ve(this,Xr);ve(this,Bt);ve(this,gr);ce(this,mr,r),this.setOptions(s),this.bindMethods(),Te(this,yr,Dl).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(r){var i;const s=this.options;this.options=R(this,mr).defaultMutationOptions(r),Vl(this.options,s)||R(this,mr).getMutationCache().notify({type:"observerOptionsUpdated",mutation:R(this,Bt),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&zo(s.mutationKey)!==zo(this.options.mutationKey)?this.reset():((i=R(this,Bt))==null?void 0:i.state.status)==="pending"&&R(this,Bt).setOptions(this.options)}onUnsubscribe(){var r;this.hasListeners()||(r=R(this,Bt))==null||r.removeObserver(this)}onMutationUpdate(r){Te(this,yr,Dl).call(this),Te(this,yr,Qd).call(this,r)}getCurrentResult(){return R(this,Xr)}reset(){var r;(r=R(this,Bt))==null||r.removeObserver(this),ce(this,Bt,void 0),Te(this,yr,Dl).call(this),Te(this,yr,Qd).call(this)}mutate(r,s){var i;return ce(this,gr,s),(i=R(this,Bt))==null||i.removeObserver(this),ce(this,Bt,R(this,mr).getMutationCache().build(R(this,mr),this.options)),R(this,Bt).addObserver(this),R(this,Bt).execute(r)}},mr=new WeakMap,Xr=new WeakMap,Bt=new WeakMap,gr=new WeakMap,yr=new WeakSet,Dl=function(){var s;const r=((s=R(this,Bt))==null?void 0:s.state)??Qy();ce(this,Xr,{...r,isPending:r.status==="pending",isSuccess:r.status==="success",isError:r.status==="error",isIdle:r.status==="idle",mutate:this.mutate,reset:this.reset})},Qd=function(r){at.batch(()=>{var s,i,l,u,d,h,p,y;if(R(this,gr)&&this.hasListeners()){const v=R(this,Xr).variables,C=R(this,Xr).context,w={client:R(this,mr),meta:this.options.meta,mutationKey:this.options.mutationKey};(r==null?void 0:r.type)==="success"?((i=(s=R(this,gr)).onSuccess)==null||i.call(s,r.data,v,C,w),(u=(l=R(this,gr)).onSettled)==null||u.call(l,r.data,null,v,C,w)):(r==null?void 0:r.type)==="error"&&((h=(d=R(this,gr)).onError)==null||h.call(d,r.error,v,C,w),(y=(p=R(this,gr)).onSettled)==null||y.call(p,void 0,r.error,v,C,w))}this.listeners.forEach(v=>{v(R(this,Xr))})})},Iy),Kn,Dy,_1=(Dy=class extends Ks{constructor(e={}){super();ve(this,Kn);this.config=e,ce(this,Kn,new Map)}build(e,r,s){const i=r.queryKey,l=r.queryHash??Cf(i,r);let u=this.get(l);return u||(u=new E1({client:e,queryKey:i,queryHash:l,options:e.defaultQueryOptions(r),state:s,defaultOptions:e.getQueryDefaults(i)}),this.add(u)),u}add(e){R(this,Kn).has(e.queryHash)||(R(this,Kn).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const r=R(this,Kn).get(e.queryHash);r&&(e.destroy(),r===e&&R(this,Kn).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){at.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return R(this,Kn).get(e)}getAll(){return[...R(this,Kn).values()]}find(e){const r={exact:!0,...e};return this.getAll().find(s=>Gm(r,s))}findAll(e={}){const r=this.getAll();return Object.keys(e).length>0?r.filter(s=>Gm(e,s)):r}notify(e){at.batch(()=>{this.listeners.forEach(r=>{r(e)})})}onFocus(){at.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){at.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Kn=new WeakMap,Dy),Ze,Jr,Zr,zs,$s,eo,Us,Bs,My,A1=(My=class{constructor(t={}){ve(this,Ze);ve(this,Jr);ve(this,Zr);ve(this,zs);ve(this,$s);ve(this,eo);ve(this,Us);ve(this,Bs);ce(this,Ze,t.queryCache||new _1),ce(this,Jr,t.mutationCache||new O1),ce(this,Zr,t.defaultOptions||{}),ce(this,zs,new Map),ce(this,$s,new Map),ce(this,eo,0)}mount(){Sl(this,eo)._++,R(this,eo)===1&&(ce(this,Us,kf.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,Ze).onFocus())})),ce(this,Bs,Wl.subscribe(async t=>{t&&(await this.resumePausedMutations(),R(this,Ze).onOnline())})))}unmount(){var t,e;Sl(this,eo)._--,R(this,eo)===0&&((t=R(this,Us))==null||t.call(this),ce(this,Us,void 0),(e=R(this,Bs))==null||e.call(this),ce(this,Bs,void 0))}isFetching(t){return R(this,Ze).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return R(this,Jr).findAll({...t,status:"pending"}).length}getQueryData(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=R(this,Ze).get(e.queryHash))==null?void 0:r.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),r=R(this,Ze).build(this,e),s=r.state.data;return s===void 0?this.fetchQuery(t):(t.revalidateIfStale&&r.isStaleByTime(to(e.staleTime,r))&&this.prefetchQuery(e),Promise.resolve(s))}getQueriesData(t){return R(this,Ze).findAll(t).map(({queryKey:e,state:r})=>{const s=r.data;return[e,s]})}setQueryData(t,e,r){const s=this.defaultQueryOptions({queryKey:t}),i=R(this,Ze).get(s.queryHash),l=i==null?void 0:i.state.data,u=p1(e,l);if(u!==void 0)return R(this,Ze).build(this,s).setData(u,{...r,manual:!0})}setQueriesData(t,e,r){return at.batch(()=>R(this,Ze).findAll(t).map(({queryKey:s})=>[s,this.setQueryData(s,e,r)]))}getQueryState(t){var r;const e=this.defaultQueryOptions({queryKey:t});return(r=R(this,Ze).get(e.queryHash))==null?void 0:r.state}removeQueries(t){const e=R(this,Ze);at.batch(()=>{e.findAll(t).forEach(r=>{e.remove(r)})})}resetQueries(t,e){const r=R(this,Ze);return at.batch(()=>(r.findAll(t).forEach(s=>{s.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const r={revert:!0,...e},s=at.batch(()=>R(this,Ze).findAll(t).map(i=>i.cancel(r)));return Promise.all(s).then(Ot).catch(Ot)}invalidateQueries(t,e={}){return at.batch(()=>(R(this,Ze).findAll(t).forEach(r=>{r.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const r={...e,cancelRefetch:e.cancelRefetch??!0},s=at.batch(()=>R(this,Ze).findAll(t).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let l=i.fetch(void 0,r);return r.throwOnError||(l=l.catch(Ot)),i.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(s).then(Ot)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const r=R(this,Ze).build(this,e);return r.isStaleByTime(to(e.staleTime,r))?r.fetch(e):Promise.resolve(r.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Ot).catch(Ot)}fetchInfiniteQuery(t){return t.behavior=og(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Ot).catch(Ot)}ensureInfiniteQueryData(t){return t.behavior=og(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Wl.isOnline()?R(this,Jr).resumePausedMutations():Promise.resolve()}getQueryCache(){return R(this,Ze)}getMutationCache(){return R(this,Jr)}getDefaultOptions(){return R(this,Zr)}setDefaultOptions(t){ce(this,Zr,t)}setQueryDefaults(t,e){R(this,zs).set(zo(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...R(this,zs).values()],r={};return e.forEach(s=>{Wi(t,s.queryKey)&&Object.assign(r,s.defaultOptions)}),r}setMutationDefaults(t,e){R(this,$s).set(zo(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...R(this,$s).values()],r={};return e.forEach(s=>{Wi(t,s.mutationKey)&&Object.assign(r,s.defaultOptions)}),r}defaultQueryOptions(t){if(t._defaulted)return t;const e={...R(this,Zr).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Cf(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===Ef&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...R(this,Zr).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){R(this,Ze).clear(),R(this,Jr).clear()}},Ze=new WeakMap,Jr=new WeakMap,Zr=new WeakMap,zs=new WeakMap,$s=new WeakMap,eo=new WeakMap,Us=new WeakMap,Bs=new WeakMap,My),Yy=x.createContext(void 0),lc=t=>{const e=x.useContext(Yy);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},L1=({client:t,children:e})=>(x.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),g.jsx(Yy.Provider,{value:t,children:e})),Gy=x.createContext(!1),I1=()=>x.useContext(Gy);Gy.Provider;function D1(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var M1=x.createContext(D1()),F1=()=>x.useContext(M1),z1=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},$1=t=>{x.useEffect(()=>{t.clearReset()},[t])},U1=({result:t,errorResetBoundary:e,throwOnError:r,query:s,suspense:i})=>t.isError&&!e.isReset()&&!t.isFetching&&s&&(i&&t.data===void 0||By(r,[t.error,s])),B1=t=>{if(t.suspense){const r=i=>i==="static"?i:Math.max(i??1e3,1e3),s=t.staleTime;t.staleTime=typeof s=="function"?(...i)=>r(s(...i)):r(s),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},H1=(t,e)=>t.isLoading&&t.isFetching&&!e,V1=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,ig=(t,e,r)=>e.fetchOptimistic(t).catch(()=>{r.clearReset()});function W1(t,e,r){var v,C,w,E,b;const s=I1(),i=F1(),l=lc(),u=l.defaultQueryOptions(t);(C=(v=l.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||C.call(v,u),u._optimisticResults=s?"isRestoring":"optimistic",B1(u),z1(u,i),$1(i);const d=!l.getQueryCache().get(u.queryHash),[h]=x.useState(()=>new e(l,u)),p=h.getOptimisticResult(u),y=!s&&t.subscribed!==!1;if(x.useSyncExternalStore(x.useCallback(k=>{const T=y?h.subscribe(at.batchCalls(k)):Ot;return h.updateResult(),T},[h,y]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),x.useEffect(()=>{h.setOptions(u)},[u,h]),V1(u,p))throw ig(u,h,i);if(U1({result:p,errorResetBoundary:i,throwOnError:u.throwOnError,query:l.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw p.error;if((E=(w=l.getDefaultOptions().queries)==null?void 0:w._experimental_afterQuery)==null||E.call(w,u,p),u.experimental_prefetchInRender&&!Fo&&H1(p,s)){const k=d?ig(u,h,i):(b=l.getQueryCache().get(u.queryHash))==null?void 0:b.promise;k==null||k.catch(Ot).finally(()=>{h.updateResult()})}return u.notifyOnChangeProps?p:h.trackResult(p)}function ta(t,e){return W1(t,k1)}function Xy(t,e){const r=lc(),[s]=x.useState(()=>new j1(r,t));x.useEffect(()=>{s.setOptions(t)},[s,t]);const i=x.useSyncExternalStore(x.useCallback(u=>s.subscribe(at.batchCalls(u)),[s]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),l=x.useCallback((u,d)=>{s.mutate(u,d).catch(Ot)},[s]);if(i.error&&By(s.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:l,mutateAsync:i.mutate}}var na=Fy();const Jy=bf(na);var K1=t=>{switch(t){case"success":return Y1;case"info":return X1;case"warning":return G1;case"error":return J1;default:return null}},q1=Array(12).fill(0),Q1=({visible:t,className:e})=>oe.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},oe.createElement("div",{className:"sonner-spinner"},q1.map((r,s)=>oe.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),Y1=oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},oe.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),G1=oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},oe.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),X1=oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},oe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),J1=oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},oe.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),Z1=oe.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},oe.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),oe.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),eS=()=>{let[t,e]=oe.useState(document.hidden);return oe.useEffect(()=>{let r=()=>{e(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),t},Yd=1,tS=class{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{let e=this.subscribers.indexOf(t);this.subscribers.splice(e,1)}),this.publish=t=>{this.subscribers.forEach(e=>e(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var e;let{message:r,...s}=t,i=typeof(t==null?void 0:t.id)=="number"||((e=t.id)==null?void 0:e.length)>0?t.id:Yd++,l=this.toasts.find(d=>d.id===i),u=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(i)&&this.dismissedToasts.delete(i),l?this.toasts=this.toasts.map(d=>d.id===i?(this.publish({...d,...t,id:i,title:r}),{...d,...t,id:i,dismissible:u,title:r}):d):this.addToast({title:r,...s,dismissible:u,id:i}),i},this.dismiss=t=>(this.dismissedToasts.add(t),t||this.toasts.forEach(e=>{this.subscribers.forEach(r=>r({id:e.id,dismiss:!0}))}),this.subscribers.forEach(e=>e({id:t,dismiss:!0})),t),this.message=(t,e)=>this.create({...e,message:t}),this.error=(t,e)=>this.create({...e,message:t,type:"error"}),this.success=(t,e)=>this.create({...e,type:"success",message:t}),this.info=(t,e)=>this.create({...e,type:"info",message:t}),this.warning=(t,e)=>this.create({...e,type:"warning",message:t}),this.loading=(t,e)=>this.create({...e,type:"loading",message:t}),this.promise=(t,e)=>{if(!e)return;let r;e.loading!==void 0&&(r=this.create({...e,promise:t,type:"loading",message:e.loading,description:typeof e.description!="function"?e.description:void 0}));let s=t instanceof Promise?t:t(),i=r!==void 0,l,u=s.then(async h=>{if(l=["resolve",h],oe.isValidElement(h))i=!1,this.create({id:r,type:"default",message:h});else if(rS(h)&&!h.ok){i=!1;let p=typeof e.error=="function"?await e.error(`HTTP error! status: ${h.status}`):e.error,y=typeof e.description=="function"?await e.description(`HTTP error! status: ${h.status}`):e.description;this.create({id:r,type:"error",message:p,description:y})}else if(e.success!==void 0){i=!1;let p=typeof e.success=="function"?await e.success(h):e.success,y=typeof e.description=="function"?await e.description(h):e.description;this.create({id:r,type:"success",message:p,description:y})}}).catch(async h=>{if(l=["reject",h],e.error!==void 0){i=!1;let p=typeof e.error=="function"?await e.error(h):e.error,y=typeof e.description=="function"?await e.description(h):e.description;this.create({id:r,type:"error",message:p,description:y})}}).finally(()=>{var h;i&&(this.dismiss(r),r=void 0),(h=e.finally)==null||h.call(e)}),d=()=>new Promise((h,p)=>u.then(()=>l[0]==="reject"?p(l[1]):h(l[1])).catch(p));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})},this.custom=(t,e)=>{let r=(e==null?void 0:e.id)||Yd++;return this.create({jsx:t(r),id:r,...e}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},Ht=new tS,nS=(t,e)=>{let r=(e==null?void 0:e.id)||Yd++;return Ht.addToast({title:t,...e,id:r}),r},rS=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",oS=nS,sS=()=>Ht.toasts,iS=()=>Ht.getActiveToasts(),Kl=Object.assign(oS,{success:Ht.success,info:Ht.info,warning:Ht.warning,error:Ht.error,custom:Ht.custom,message:Ht.message,promise:Ht.promise,dismiss:Ht.dismiss,loading:Ht.loading},{getHistory:sS,getToasts:iS});function aS(t,{insertAt:e}={}){if(typeof document>"u")return;let r=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css",e==="top"&&r.firstChild?r.insertBefore(s,r.firstChild):r.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}aS(`:where(html[dir="ltr"]),:where([data-sonner-toaster][dir="ltr"]){--toast-icon-margin-start: -3px;--toast-icon-margin-end: 4px;--toast-svg-margin-start: -1px;--toast-svg-margin-end: 0px;--toast-button-margin-start: auto;--toast-button-margin-end: 0;--toast-close-button-start: 0;--toast-close-button-end: unset;--toast-close-button-transform: translate(-35%, -35%)}:where(html[dir="rtl"]),:where([data-sonner-toaster][dir="rtl"]){--toast-icon-margin-start: 4px;--toast-icon-margin-end: -3px;--toast-svg-margin-start: 0px;--toast-svg-margin-end: -1px;--toast-button-margin-start: 0;--toast-button-margin-end: auto;--toast-close-button-start: unset;--toast-close-button-end: 0;--toast-close-button-transform: translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1: hsl(0, 0%, 99%);--gray2: hsl(0, 0%, 97.3%);--gray3: hsl(0, 0%, 95.1%);--gray4: hsl(0, 0%, 93%);--gray5: hsl(0, 0%, 90.9%);--gray6: hsl(0, 0%, 88.7%);--gray7: hsl(0, 0%, 85.8%);--gray8: hsl(0, 0%, 78%);--gray9: hsl(0, 0%, 56.1%);--gray10: hsl(0, 0%, 52.3%);--gray11: hsl(0, 0%, 43.5%);--gray12: hsl(0, 0%, 9%);--border-radius: 8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:none;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted="true"]){transform:translateY(-10px)}@media (hover: none) and (pointer: coarse){:where([data-sonner-toaster][data-lifted="true"]){transform:none}}:where([data-sonner-toaster][data-x-position="right"]){right:var(--offset-right)}:where([data-sonner-toaster][data-x-position="left"]){left:var(--offset-left)}:where([data-sonner-toaster][data-x-position="center"]){left:50%;transform:translate(-50%)}:where([data-sonner-toaster][data-y-position="top"]){top:var(--offset-top)}:where([data-sonner-toaster][data-y-position="bottom"]){bottom:var(--offset-bottom)}:where([data-sonner-toast]){--y: translateY(100%);--lift-amount: calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:none;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled="true"]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px #0000001a;width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast][data-y-position="top"]){top:0;--y: translateY(-100%);--lift: 1;--lift-amount: calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position="bottom"]){bottom:0;--y: translateY(100%);--lift: -1;--lift-amount: calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise="true"]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:none;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px #0006}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme="dark"]) :where([data-cancel]){background:rgba(255,255,255,.3)}:where([data-sonner-toast]) :where([data-close-button]){position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px #0000001a,0 0 0 2px #0003}:where([data-sonner-toast]) :where([data-disabled="true"]){cursor:not-allowed}:where([data-sonner-toast]):hover :where([data-close-button]):hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping="true"]):before{content:"";position:absolute;left:-50%;right:-50%;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position="top"][data-swiping="true"]):before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position="bottom"][data-swiping="true"]):before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping="false"][data-removed="true"]):before{content:"";position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast]):after{content:"";position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted="true"]){--y: translateY(0);opacity:1}:where([data-sonner-toast][data-expanded="false"][data-front="false"]){--scale: var(--toasts-before) * .05 + 1;--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded="false"][data-front="false"][data-styled="true"])>*{opacity:0}:where([data-sonner-toast][data-visible="false"]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted="true"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed="true"][data-front="true"][data-swipe-out="false"]){--y: translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="true"]){--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed="true"][data-front="false"][data-swipe-out="false"][data-expanded="false"]){--y: translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed="true"][data-front="false"]):before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y, 0px)) translate(var(--swipe-amount-x, 0px));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{0%{transform:var(--y) translate(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translate(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{0%{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width: 600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg: #fff;--normal-border: var(--gray4);--normal-text: var(--gray12);--success-bg: hsl(143, 85%, 96%);--success-border: hsl(145, 92%, 91%);--success-text: hsl(140, 100%, 27%);--info-bg: hsl(208, 100%, 97%);--info-border: hsl(221, 91%, 91%);--info-text: hsl(210, 92%, 45%);--warning-bg: hsl(49, 100%, 97%);--warning-border: hsl(49, 91%, 91%);--warning-text: hsl(31, 92%, 45%);--error-bg: hsl(359, 100%, 97%);--error-border: hsl(359, 100%, 94%);--error-text: hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg: #000;--normal-border: hsl(0, 0%, 20%);--normal-text: var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg: #fff;--normal-border: var(--gray3);--normal-text: var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg: #000;--normal-bg-hover: hsl(0, 0%, 12%);--normal-border: hsl(0, 0%, 20%);--normal-border-hover: hsl(0, 0%, 25%);--normal-text: var(--gray1);--success-bg: hsl(150, 100%, 6%);--success-border: hsl(147, 100%, 12%);--success-text: hsl(150, 86%, 65%);--info-bg: hsl(215, 100%, 6%);--info-border: hsl(223, 100%, 12%);--info-text: hsl(216, 87%, 65%);--warning-bg: hsl(64, 100%, 6%);--warning-border: hsl(60, 100%, 12%);--warning-text: hsl(46, 87%, 65%);--error-bg: hsl(358, 76%, 10%);--error-border: hsl(357, 89%, 16%);--error-text: hsl(358, 100%, 81%)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success],[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info],[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning],[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error],[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size: 16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:nth-child(1){animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}to{opacity:.15}}@media (prefers-reduced-motion){[data-sonner-toast],[data-sonner-toast]>*,.sonner-loading-bar{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)} `);function kl(t){return t.label!==void 0}var lS=3,cS="32px",uS="16px",ag=4e3,dS=356,fS=14,hS=20,pS=200;function Sn(...t){return t.filter(Boolean).join(" ")}function mS(t){let[e,r]=t.split("-"),s=[];return e&&s.push(e),r&&s.push(r),s}var gS=t=>{var e,r,s,i,l,u,d,h,p,y,v;let{invert:C,toast:w,unstyled:E,interacting:b,setHeights:k,visibleToasts:T,heights:j,index:_,toasts:A,expanded:F,removeToast:V,defaultRichColors:B,closeButton:te,style:G,cancelButtonStyle:W,actionButtonStyle:le,className:K="",descriptionClassName:Z="",duration:J,position:de,gap:ne,loadingIcon:se,expandByDefault:$,classNames:H,icons:Q,closeButtonAriaLabel:P="Close toast",pauseWhenPageIsHidden:M}=t,[ie,ae]=oe.useState(null),[me,be]=oe.useState(null),[ee,ye]=oe.useState(!1),[Se,Ne]=oe.useState(!1),[Oe,_e]=oe.useState(!1),[et,gt]=oe.useState(!1),[On,dn]=oe.useState(!1),[fn,wr]=oe.useState(0),[jn,br]=oe.useState(0),en=oe.useRef(w.duration||J||ag),Ko=oe.useRef(null),_n=oe.useRef(null),ca=_===0,ua=_+1<=T,Et=w.type,An=w.dismissible!==!1,qo=w.className||"",da=w.descriptionClassName||"",Ln=oe.useMemo(()=>j.findIndex(Ee=>Ee.toastId===w.id)||0,[j,w.id]),ao=oe.useMemo(()=>{var Ee;return(Ee=w.closeButton)!=null?Ee:te},[w.closeButton,te]),fa=oe.useMemo(()=>w.duration||J||ag,[w.duration,J]),Qo=oe.useRef(0),tr=oe.useRef(0),ha=oe.useRef(0),In=oe.useRef(null),[ei,ti]=de.split("-"),Yo=oe.useMemo(()=>j.reduce((Ee,Fe,He)=>He>=Ln?Ee:Ee+Fe.height,0),[j,Ln]),Go=eS(),Sr=w.invert||C,Dn=Et==="loading";tr.current=oe.useMemo(()=>Ln*ne+Yo,[Ln,Yo]),oe.useEffect(()=>{en.current=fa},[fa]),oe.useEffect(()=>{ye(!0)},[]),oe.useEffect(()=>{let Ee=_n.current;if(Ee){let Fe=Ee.getBoundingClientRect().height;return br(Fe),k(He=>[{toastId:w.id,height:Fe,position:w.position},...He]),()=>k(He=>He.filter(kt=>kt.toastId!==w.id))}},[k,w.id]),oe.useLayoutEffect(()=>{if(!ee)return;let Ee=_n.current,Fe=Ee.style.height;Ee.style.height="auto";let He=Ee.getBoundingClientRect().height;Ee.style.height=Fe,br(He),k(kt=>kt.find(At=>At.toastId===w.id)?kt.map(At=>At.toastId===w.id?{...At,height:He}:At):[{toastId:w.id,height:He,position:w.position},...kt])},[ee,w.title,w.description,k,w.id]);let hn=oe.useCallback(()=>{Ne(!0),wr(tr.current),k(Ee=>Ee.filter(Fe=>Fe.toastId!==w.id)),setTimeout(()=>{V(w)},pS)},[w,V,k,tr]);oe.useEffect(()=>{if(w.promise&&Et==="loading"||w.duration===1/0||w.type==="loading")return;let Ee;return F||b||M&&Go?(()=>{if(ha.current{var Fe;(Fe=w.onAutoClose)==null||Fe.call(w,w),hn()},en.current)),()=>clearTimeout(Ee)},[F,b,w,Et,M,Go,hn]),oe.useEffect(()=>{w.delete&&hn()},[hn,w.delete]);function pa(){var Ee,Fe,He;return Q!=null&&Q.loading?oe.createElement("div",{className:Sn(H==null?void 0:H.loader,(Ee=w==null?void 0:w.classNames)==null?void 0:Ee.loader,"sonner-loader"),"data-visible":Et==="loading"},Q.loading):se?oe.createElement("div",{className:Sn(H==null?void 0:H.loader,(Fe=w==null?void 0:w.classNames)==null?void 0:Fe.loader,"sonner-loader"),"data-visible":Et==="loading"},se):oe.createElement(Q1,{className:Sn(H==null?void 0:H.loader,(He=w==null?void 0:w.classNames)==null?void 0:He.loader),visible:Et==="loading"})}return oe.createElement("li",{tabIndex:0,ref:_n,className:Sn(K,qo,H==null?void 0:H.toast,(e=w==null?void 0:w.classNames)==null?void 0:e.toast,H==null?void 0:H.default,H==null?void 0:H[Et],(r=w==null?void 0:w.classNames)==null?void 0:r[Et]),"data-sonner-toast":"","data-rich-colors":(s=w.richColors)!=null?s:B,"data-styled":!(w.jsx||w.unstyled||E),"data-mounted":ee,"data-promise":!!w.promise,"data-swiped":On,"data-removed":Se,"data-visible":ua,"data-y-position":ei,"data-x-position":ti,"data-index":_,"data-front":ca,"data-swiping":Oe,"data-dismissible":An,"data-type":Et,"data-invert":Sr,"data-swipe-out":et,"data-swipe-direction":me,"data-expanded":!!(F||$&&ee),style:{"--index":_,"--toasts-before":_,"--z-index":A.length-_,"--offset":`${Se?fn:tr.current}px`,"--initial-height":$?"auto":`${jn}px`,...G,...w.style},onDragEnd:()=>{_e(!1),ae(null),In.current=null},onPointerDown:Ee=>{Dn||!An||(Ko.current=new Date,wr(tr.current),Ee.target.setPointerCapture(Ee.pointerId),Ee.target.tagName!=="BUTTON"&&(_e(!0),In.current={x:Ee.clientX,y:Ee.clientY}))},onPointerUp:()=>{var Ee,Fe,He,kt;if(et||!An)return;In.current=null;let At=Number(((Ee=_n.current)==null?void 0:Ee.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Lt=Number(((Fe=_n.current)==null?void 0:Fe.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),pn=new Date().getTime()-((He=Ko.current)==null?void 0:He.getTime()),ft=ie==="x"?At:Lt,Mn=Math.abs(ft)/pn;if(Math.abs(ft)>=hS||Mn>.11){wr(tr.current),(kt=w.onDismiss)==null||kt.call(w,w),be(ie==="x"?At>0?"right":"left":Lt>0?"down":"up"),hn(),gt(!0),dn(!1);return}_e(!1),ae(null)},onPointerMove:Ee=>{var Fe,He,kt,At;if(!In.current||!An||((Fe=window.getSelection())==null?void 0:Fe.toString().length)>0)return;let Lt=Ee.clientY-In.current.y,pn=Ee.clientX-In.current.x,ft=(He=t.swipeDirections)!=null?He:mS(de);!ie&&(Math.abs(pn)>1||Math.abs(Lt)>1)&&ae(Math.abs(pn)>Math.abs(Lt)?"x":"y");let Mn={x:0,y:0};ie==="y"?(ft.includes("top")||ft.includes("bottom"))&&(ft.includes("top")&&Lt<0||ft.includes("bottom")&&Lt>0)&&(Mn.y=Lt):ie==="x"&&(ft.includes("left")||ft.includes("right"))&&(ft.includes("left")&&pn<0||ft.includes("right")&&pn>0)&&(Mn.x=pn),(Math.abs(Mn.x)>0||Math.abs(Mn.y)>0)&&dn(!0),(kt=_n.current)==null||kt.style.setProperty("--swipe-amount-x",`${Mn.x}px`),(At=_n.current)==null||At.style.setProperty("--swipe-amount-y",`${Mn.y}px`)}},ao&&!w.jsx?oe.createElement("button",{"aria-label":P,"data-disabled":Dn,"data-close-button":!0,onClick:Dn||!An?()=>{}:()=>{var Ee;hn(),(Ee=w.onDismiss)==null||Ee.call(w,w)},className:Sn(H==null?void 0:H.closeButton,(i=w==null?void 0:w.classNames)==null?void 0:i.closeButton)},(l=Q==null?void 0:Q.close)!=null?l:Z1):null,w.jsx||x.isValidElement(w.title)?w.jsx?w.jsx:typeof w.title=="function"?w.title():w.title:oe.createElement(oe.Fragment,null,Et||w.icon||w.promise?oe.createElement("div",{"data-icon":"",className:Sn(H==null?void 0:H.icon,(u=w==null?void 0:w.classNames)==null?void 0:u.icon)},w.promise||w.type==="loading"&&!w.icon?w.icon||pa():null,w.type!=="loading"?w.icon||(Q==null?void 0:Q[Et])||K1(Et):null):null,oe.createElement("div",{"data-content":"",className:Sn(H==null?void 0:H.content,(d=w==null?void 0:w.classNames)==null?void 0:d.content)},oe.createElement("div",{"data-title":"",className:Sn(H==null?void 0:H.title,(h=w==null?void 0:w.classNames)==null?void 0:h.title)},typeof w.title=="function"?w.title():w.title),w.description?oe.createElement("div",{"data-description":"",className:Sn(Z,da,H==null?void 0:H.description,(p=w==null?void 0:w.classNames)==null?void 0:p.description)},typeof w.description=="function"?w.description():w.description):null),x.isValidElement(w.cancel)?w.cancel:w.cancel&&kl(w.cancel)?oe.createElement("button",{"data-button":!0,"data-cancel":!0,style:w.cancelButtonStyle||W,onClick:Ee=>{var Fe,He;kl(w.cancel)&&An&&((He=(Fe=w.cancel).onClick)==null||He.call(Fe,Ee),hn())},className:Sn(H==null?void 0:H.cancelButton,(y=w==null?void 0:w.classNames)==null?void 0:y.cancelButton)},w.cancel.label):null,x.isValidElement(w.action)?w.action:w.action&&kl(w.action)?oe.createElement("button",{"data-button":!0,"data-action":!0,style:w.actionButtonStyle||le,onClick:Ee=>{var Fe,He;kl(w.action)&&((He=(Fe=w.action).onClick)==null||He.call(Fe,Ee),!Ee.defaultPrevented&&hn())},className:Sn(H==null?void 0:H.actionButton,(v=w==null?void 0:w.classNames)==null?void 0:v.actionButton)},w.action.label):null))};function lg(){if(typeof window>"u"||typeof document>"u")return"ltr";let t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function yS(t,e){let r={};return[t,e].forEach((s,i)=>{let l=i===1,u=l?"--mobile-offset":"--offset",d=l?uS:cS;function h(p){["top","right","bottom","left"].forEach(y=>{r[`${u}-${y}`]=typeof p=="number"?`${p}px`:p})}typeof s=="number"||typeof s=="string"?h(s):typeof s=="object"?["top","right","bottom","left"].forEach(p=>{s[p]===void 0?r[`${u}-${p}`]=d:r[`${u}-${p}`]=typeof s[p]=="number"?`${s[p]}px`:s[p]}):h(d)}),r}var vS=x.forwardRef(function(t,e){let{invert:r,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:l,closeButton:u,className:d,offset:h,mobileOffset:p,theme:y="light",richColors:v,duration:C,style:w,visibleToasts:E=lS,toastOptions:b,dir:k=lg(),gap:T=fS,loadingIcon:j,icons:_,containerAriaLabel:A="Notifications",pauseWhenPageIsHidden:F}=t,[V,B]=oe.useState([]),te=oe.useMemo(()=>Array.from(new Set([s].concat(V.filter(M=>M.position).map(M=>M.position)))),[V,s]),[G,W]=oe.useState([]),[le,K]=oe.useState(!1),[Z,J]=oe.useState(!1),[de,ne]=oe.useState(y!=="system"?y:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),se=oe.useRef(null),$=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),H=oe.useRef(null),Q=oe.useRef(!1),P=oe.useCallback(M=>{B(ie=>{var ae;return(ae=ie.find(me=>me.id===M.id))!=null&&ae.delete||Ht.dismiss(M.id),ie.filter(({id:me})=>me!==M.id)})},[]);return oe.useEffect(()=>Ht.subscribe(M=>{if(M.dismiss){B(ie=>ie.map(ae=>ae.id===M.id?{...ae,delete:!0}:ae));return}setTimeout(()=>{Jy.flushSync(()=>{B(ie=>{let ae=ie.findIndex(me=>me.id===M.id);return ae!==-1?[...ie.slice(0,ae),{...ie[ae],...M},...ie.slice(ae+1)]:[M,...ie]})})})}),[]),oe.useEffect(()=>{if(y!=="system"){ne(y);return}if(y==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?ne("dark"):ne("light")),typeof window>"u")return;let M=window.matchMedia("(prefers-color-scheme: dark)");try{M.addEventListener("change",({matches:ie})=>{ne(ie?"dark":"light")})}catch{M.addListener(({matches:ae})=>{try{ne(ae?"dark":"light")}catch(me){console.error(me)}})}},[y]),oe.useEffect(()=>{V.length<=1&&K(!1)},[V]),oe.useEffect(()=>{let M=ie=>{var ae,me;i.every(be=>ie[be]||ie.code===be)&&(K(!0),(ae=se.current)==null||ae.focus()),ie.code==="Escape"&&(document.activeElement===se.current||(me=se.current)!=null&&me.contains(document.activeElement))&&K(!1)};return document.addEventListener("keydown",M),()=>document.removeEventListener("keydown",M)},[i]),oe.useEffect(()=>{if(se.current)return()=>{H.current&&(H.current.focus({preventScroll:!0}),H.current=null,Q.current=!1)}},[se.current]),oe.createElement("section",{ref:e,"aria-label":`${A} ${$}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},te.map((M,ie)=>{var ae;let[me,be]=M.split("-");return V.length?oe.createElement("ol",{key:M,dir:k==="auto"?lg():k,tabIndex:-1,ref:se,className:d,"data-sonner-toaster":!0,"data-theme":de,"data-y-position":me,"data-lifted":le&&V.length>1&&!l,"data-x-position":be,style:{"--front-toast-height":`${((ae=G[0])==null?void 0:ae.height)||0}px`,"--width":`${dS}px`,"--gap":`${T}px`,...w,...yS(h,p)},onBlur:ee=>{Q.current&&!ee.currentTarget.contains(ee.relatedTarget)&&(Q.current=!1,H.current&&(H.current.focus({preventScroll:!0}),H.current=null))},onFocus:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||Q.current||(Q.current=!0,H.current=ee.relatedTarget)},onMouseEnter:()=>K(!0),onMouseMove:()=>K(!0),onMouseLeave:()=>{Z||K(!1)},onDragEnd:()=>K(!1),onPointerDown:ee=>{ee.target instanceof HTMLElement&&ee.target.dataset.dismissible==="false"||J(!0)},onPointerUp:()=>J(!1)},V.filter(ee=>!ee.position&&ie===0||ee.position===M).map((ee,ye)=>{var Se,Ne;return oe.createElement(gS,{key:ee.id,icons:_,index:ye,toast:ee,defaultRichColors:v,duration:(Se=b==null?void 0:b.duration)!=null?Se:C,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:r,visibleToasts:E,closeButton:(Ne=b==null?void 0:b.closeButton)!=null?Ne:u,interacting:Z,position:M,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,removeToast:P,toasts:V.filter(Oe=>Oe.position==ee.position),heights:G.filter(Oe=>Oe.position==ee.position),setHeights:W,expandByDefault:l,gap:T,loadingIcon:j,expanded:le,pauseWhenPageIsHidden:F,swipeDirections:t.swipeDirections})})):null}))});/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const xS=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Zy=(...t)=>t.filter((e,r,s)=>!!e&&e.trim()!==""&&s.indexOf(e)===r).join(" ").trim();/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */var wS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const bS=x.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:s,className:i="",children:l,iconNode:u,...d},h)=>x.createElement("svg",{ref:h,...wS,width:e,height:e,stroke:t,strokeWidth:s?Number(r)*24/Number(e):r,className:Zy("lucide",i),...d},[...u.map(([p,y])=>x.createElement(p,y)),...Array.isArray(l)?l:[l]]));/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Ie=(t,e)=>{const r=x.forwardRef(({className:s,...i},l)=>x.createElement(bS,{ref:l,iconNode:e,className:Zy(`lucide-${xS(t)}`,s),...i}));return r.displayName=`${t}`,r};/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const SS=Ie("Bug",[["path",{d:"m8 2 1.88 1.88",key:"fmnt4t"}],["path",{d:"M14.12 3.88 16 2",key:"qol33r"}],["path",{d:"M9 7.13v-1a3.003 3.003 0 1 1 6 0v1",key:"d7y7pr"}],["path",{d:"M12 20c-3.3 0-6-2.7-6-6v-3a4 4 0 0 1 4-4h4a4 4 0 0 1 4 4v3c0 3.3-2.7 6-6 6",key:"xs1cw7"}],["path",{d:"M12 20v-9",key:"1qisl0"}],["path",{d:"M6.53 9C4.6 8.8 3 7.1 3 5",key:"32zzws"}],["path",{d:"M6 13H2",key:"82j7cp"}],["path",{d:"M3 21c0-2.1 1.7-3.9 3.8-4",key:"4p0ekp"}],["path",{d:"M20.97 5c0 2.1-1.6 3.8-3.5 4",key:"18gb23"}],["path",{d:"M22 13h-4",key:"1jl80f"}],["path",{d:"M17.2 17c2.1.1 3.8 1.9 3.8 4",key:"k3fwyw"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Rf=Ie("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Pf=Ie("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ev=Ie("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const CS=Ie("CircleCheckBig",[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const ES=Ie("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const tv=Ie("Database",[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const nv=Ie("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const kS=Ie("ExternalLink",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const NS=Ie("Eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const RS=Ie("FileJson",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const pd=Ie("FileSpreadsheet",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const PS=Ie("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const TS=Ie("FolderOpen",[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const OS=Ie("Github",[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const rv=Ie("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jS=Ie("Heart",[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z",key:"c3ymky"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const _S=Ie("KeyRound",[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const AS=Ie("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const LS=Ie("MessageSquare",[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const IS=Ie("Monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const DS=Ie("Moon",[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const MS=Ie("Play",[["polygon",{points:"6 3 20 12 6 21 6 3",key:"1oa8hb"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Tf=Ie("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const FS=Ie("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const zS=Ie("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const $S=Ie("Sparkles",[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z",key:"4pj2yx"}],["path",{d:"M20 3v4",key:"1olli1"}],["path",{d:"M22 5h-4",key:"1gvqau"}],["path",{d:"M4 17v2",key:"vumght"}],["path",{d:"M5 18H3",key:"zchphs"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const US=Ie("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const BS=Ie("Sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const HS=Ie("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const Of=Ie("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const VS=Ie("Wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);/** * @license lucide-react v0.468.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */const jf=Ie("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ke=t=>typeof t=="string",Mi=()=>{let t,e;const r=new Promise((s,i)=>{t=s,e=i});return r.resolve=t,r.reject=e,r},cg=t=>t==null?"":""+t,WS=(t,e,r)=>{t.forEach(s=>{e[s]&&(r[s]=e[s])})},KS=/###/g,ug=t=>t&&t.indexOf("###")>-1?t.replace(KS,"."):t,dg=t=>!t||ke(t),Hi=(t,e,r)=>{const s=ke(e)?e.split("."):e;let i=0;for(;i{const{obj:s,k:i}=Hi(t,e,Object);if(s!==void 0||e.length===1){s[i]=r;return}let l=e[e.length-1],u=e.slice(0,e.length-1),d=Hi(t,u,Object);for(;d.obj===void 0&&u.length;)l=`${u[u.length-1]}.${l}`,u=u.slice(0,u.length-1),d=Hi(t,u,Object),d!=null&&d.obj&&typeof d.obj[`${d.k}.${l}`]<"u"&&(d.obj=void 0);d.obj[`${d.k}.${l}`]=r},qS=(t,e,r,s)=>{const{obj:i,k:l}=Hi(t,e,Object);i[l]=i[l]||[],i[l].push(r)},ql=(t,e)=>{const{obj:r,k:s}=Hi(t,e);if(r&&Object.prototype.hasOwnProperty.call(r,s))return r[s]},QS=(t,e,r)=>{const s=ql(t,r);return s!==void 0?s:ql(e,r)},ov=(t,e,r)=>{for(const s in e)s!=="__proto__"&&s!=="constructor"&&(s in t?ke(t[s])||t[s]instanceof String||ke(e[s])||e[s]instanceof String?r&&(t[s]=e[s]):ov(t[s],e[s],r):t[s]=e[s]);return t},xs=t=>t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var YS={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};const GS=t=>ke(t)?t.replace(/[&<>"'\/]/g,e=>YS[e]):t;class XS{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){const r=this.regExpMap.get(e);if(r!==void 0)return r;const s=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,s),this.regExpQueue.push(e),s}}const JS=[" ",",","?","!",";"],ZS=new XS(20),eC=(t,e,r)=>{e=e||"",r=r||"";const s=JS.filter(u=>e.indexOf(u)<0&&r.indexOf(u)<0);if(s.length===0)return!0;const i=ZS.getRegExp(`(${s.map(u=>u==="?"?"\\?":u).join("|")})`);let l=!i.test(t);if(!l){const u=t.indexOf(r);u>0&&!i.test(t.substring(0,u))&&(l=!0)}return l},Gd=(t,e,r=".")=>{if(!t)return;if(t[e])return Object.prototype.hasOwnProperty.call(t,e)?t[e]:void 0;const s=e.split(r);let i=t;for(let l=0;l-1&&ht==null?void 0:t.replace("_","-"),tC={type:"logger",log(t){this.output("log",t)},warn(t){this.output("warn",t)},error(t){this.output("error",t)},output(t,e){var r,s;(s=(r=console==null?void 0:console[t])==null?void 0:r.apply)==null||s.call(r,console,e)}};class Ql{constructor(e,r={}){this.init(e,r)}init(e,r={}){this.prefix=r.prefix||"i18next:",this.logger=e||tC,this.options=r,this.debug=r.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,r,s,i){return i&&!this.debug?null:(ke(e[0])&&(e[0]=`${s}${this.prefix} ${e[0]}`),this.logger[r](e))}create(e){return new Ql(this.logger,{prefix:`${this.prefix}:${e}:`,...this.options})}clone(e){return e=e||this.options,e.prefix=e.prefix||this.prefix,new Ql(this.logger,e)}}var Qn=new Ql;class cc{constructor(){this.observers={}}on(e,r){return e.split(" ").forEach(s=>{this.observers[s]||(this.observers[s]=new Map);const i=this.observers[s].get(r)||0;this.observers[s].set(r,i+1)}),this}off(e,r){if(this.observers[e]){if(!r){delete this.observers[e];return}this.observers[e].delete(r)}}emit(e,...r){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([i,l])=>{for(let u=0;u{for(let u=0;u-1&&this.options.ns.splice(r,1)}getResource(e,r,s,i={}){var p,y;const l=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,u=i.ignoreJSONStructure!==void 0?i.ignoreJSONStructure:this.options.ignoreJSONStructure;let d;e.indexOf(".")>-1?d=e.split("."):(d=[e,r],s&&(Array.isArray(s)?d.push(...s):ke(s)&&l?d.push(...s.split(l)):d.push(s)));const h=ql(this.data,d);return!h&&!r&&!s&&e.indexOf(".")>-1&&(e=d[0],r=d[1],s=d.slice(2).join(".")),h||!u||!ke(s)?h:Gd((y=(p=this.data)==null?void 0:p[e])==null?void 0:y[r],s,l)}addResource(e,r,s,i,l={silent:!1}){const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let d=[e,r];s&&(d=d.concat(u?s.split(u):s)),e.indexOf(".")>-1&&(d=e.split("."),i=r,r=d[1]),this.addNamespaces(r),fg(this.data,d,i),l.silent||this.emit("added",e,r,s,i)}addResources(e,r,s,i={silent:!1}){for(const l in s)(ke(s[l])||Array.isArray(s[l]))&&this.addResource(e,r,l,s[l],{silent:!0});i.silent||this.emit("added",e,r,s)}addResourceBundle(e,r,s,i,l,u={silent:!1,skipCopy:!1}){let d=[e,r];e.indexOf(".")>-1&&(d=e.split("."),i=s,s=r,r=d[1]),this.addNamespaces(r);let h=ql(this.data,d)||{};u.skipCopy||(s=JSON.parse(JSON.stringify(s))),i?ov(h,s,l):h={...h,...s},fg(this.data,d,h),u.silent||this.emit("added",e,r,s)}removeResourceBundle(e,r){this.hasResourceBundle(e,r)&&delete this.data[e][r],this.removeNamespaces(r),this.emit("removed",e,r)}hasResourceBundle(e,r){return this.getResource(e,r)!==void 0}getResourceBundle(e,r){return r||(r=this.options.defaultNS),this.getResource(e,r)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){const r=this.getDataByLanguage(e);return!!(r&&Object.keys(r)||[]).find(i=>r[i]&&Object.keys(r[i]).length>0)}toJSON(){return this.data}}var sv={processors:{},addPostProcessor(t){this.processors[t.name]=t},handle(t,e,r,s,i){return t.forEach(l=>{var u;e=((u=this.processors[l])==null?void 0:u.process(e,r,s,i))??e}),e}};const iv=Symbol("i18next/PATH_KEY");function nC(){const t=[],e=Object.create(null);let r;return e.get=(s,i)=>{var l;return(l=r==null?void 0:r.revoke)==null||l.call(r),i===iv?t:(t.push(i),r=Proxy.revocable(s,e),r.proxy)},Proxy.revocable(Object.create(null),e).proxy}function Xd(t,e){const{[iv]:r}=t(nC());return r.join((e==null?void 0:e.keySeparator)??".")}const pg={},md=t=>!ke(t)&&typeof t!="boolean"&&typeof t!="number";class Yl extends cc{constructor(e,r={}){super(),WS(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=r,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Qn.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,r={interpolation:{}}){const s={...r};if(e==null)return!1;const i=this.resolve(e,s);if((i==null?void 0:i.res)===void 0)return!1;const l=md(i.res);return!(s.returnObjects===!1&&l)}extractFromKey(e,r){let s=r.nsSeparator!==void 0?r.nsSeparator:this.options.nsSeparator;s===void 0&&(s=":");const i=r.keySeparator!==void 0?r.keySeparator:this.options.keySeparator;let l=r.ns||this.options.defaultNS||[];const u=s&&e.indexOf(s)>-1,d=!this.options.userDefinedKeySeparator&&!r.keySeparator&&!this.options.userDefinedNsSeparator&&!r.nsSeparator&&!eC(e,s,i);if(u&&!d){const h=e.match(this.interpolator.nestingRegexp);if(h&&h.length>0)return{key:e,namespaces:ke(l)?[l]:l};const p=e.split(s);(s!==i||s===i&&this.options.ns.indexOf(p[0])>-1)&&(l=p.shift()),e=p.join(i)}return{key:e,namespaces:ke(l)?[l]:l}}translate(e,r,s){let i=typeof r=="object"?{...r}:r;if(typeof i!="object"&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i=="object"&&(i={...i}),i||(i={}),e==null)return"";typeof e=="function"&&(e=Xd(e,{...this.options,...i})),Array.isArray(e)||(e=[String(e)]);const l=i.returnDetails!==void 0?i.returnDetails:this.options.returnDetails,u=i.keySeparator!==void 0?i.keySeparator:this.options.keySeparator,{key:d,namespaces:h}=this.extractFromKey(e[e.length-1],i),p=h[h.length-1];let y=i.nsSeparator!==void 0?i.nsSeparator:this.options.nsSeparator;y===void 0&&(y=":");const v=i.lng||this.language,C=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if((v==null?void 0:v.toLowerCase())==="cimode")return C?l?{res:`${p}${y}${d}`,usedKey:d,exactUsedKey:d,usedLng:v,usedNS:p,usedParams:this.getUsedParamsDetails(i)}:`${p}${y}${d}`:l?{res:d,usedKey:d,exactUsedKey:d,usedLng:v,usedNS:p,usedParams:this.getUsedParamsDetails(i)}:d;const w=this.resolve(e,i);let E=w==null?void 0:w.res;const b=(w==null?void 0:w.usedKey)||d,k=(w==null?void 0:w.exactUsedKey)||d,T=["[object Number]","[object Function]","[object RegExp]"],j=i.joinArrays!==void 0?i.joinArrays:this.options.joinArrays,_=!this.i18nFormat||this.i18nFormat.handleAsObject,A=i.count!==void 0&&!ke(i.count),F=Yl.hasDefaultValue(i),V=A?this.pluralResolver.getSuffix(v,i.count,i):"",B=i.ordinal&&A?this.pluralResolver.getSuffix(v,i.count,{ordinal:!1}):"",te=A&&!i.ordinal&&i.count===0,G=te&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${V}`]||i[`defaultValue${B}`]||i.defaultValue;let W=E;_&&!E&&F&&(W=G);const le=md(W),K=Object.prototype.toString.apply(W);if(_&&W&&le&&T.indexOf(K)<0&&!(ke(j)&&Array.isArray(W))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const Z=this.options.returnedObjectHandler?this.options.returnedObjectHandler(b,W,{...i,ns:h}):`key '${d} (${this.language})' returned an object instead of string.`;return l?(w.res=Z,w.usedParams=this.getUsedParamsDetails(i),w):Z}if(u){const Z=Array.isArray(W),J=Z?[]:{},de=Z?k:b;for(const ne in W)if(Object.prototype.hasOwnProperty.call(W,ne)){const se=`${de}${u}${ne}`;F&&!E?J[ne]=this.translate(se,{...i,defaultValue:md(G)?G[ne]:void 0,joinArrays:!1,ns:h}):J[ne]=this.translate(se,{...i,joinArrays:!1,ns:h}),J[ne]===se&&(J[ne]=W[ne])}E=J}}else if(_&&ke(j)&&Array.isArray(E))E=E.join(j),E&&(E=this.extendTranslation(E,e,i,s));else{let Z=!1,J=!1;!this.isValidLookup(E)&&F&&(Z=!0,E=G),this.isValidLookup(E)||(J=!0,E=d);const ne=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&J?void 0:E,se=F&&G!==E&&this.options.updateMissing;if(J||Z||se){if(this.logger.log(se?"updateKey":"missingKey",v,p,d,se?G:E),u){const P=this.resolve(d,{...i,keySeparator:!1});P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let $=[];const H=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo==="fallback"&&H&&H[0])for(let P=0;P{var me;const ae=F&&ie!==E?ie:ne;this.options.missingKeyHandler?this.options.missingKeyHandler(P,p,M,ae,se,i):(me=this.backendConnector)!=null&&me.saveMissing&&this.backendConnector.saveMissing(P,p,M,ae,se,i),this.emit("missingKey",P,p,M,E)};this.options.saveMissing&&(this.options.saveMissingPlurals&&A?$.forEach(P=>{const M=this.pluralResolver.getSuffixes(P,i);te&&i[`defaultValue${this.options.pluralSeparator}zero`]&&M.indexOf(`${this.options.pluralSeparator}zero`)<0&&M.push(`${this.options.pluralSeparator}zero`),M.forEach(ie=>{Q([P],d+ie,i[`defaultValue${ie}`]||G)})}):Q($,d,G))}E=this.extendTranslation(E,e,i,w,s),J&&E===d&&this.options.appendNamespaceToMissingKey&&(E=`${p}${y}${d}`),(J||Z)&&this.options.parseMissingKeyHandler&&(E=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${p}${y}${d}`:d,Z?E:void 0,i))}return l?(w.res=E,w.usedParams=this.getUsedParamsDetails(i),w):E}extendTranslation(e,r,s,i,l){var h,p;if((h=this.i18nFormat)!=null&&h.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...s},s.lng||this.language||i.usedLng,i.usedNS,i.usedKey,{resolved:i});else if(!s.skipInterpolation){s.interpolation&&this.interpolator.init({...s,interpolation:{...this.options.interpolation,...s.interpolation}});const y=ke(e)&&(((p=s==null?void 0:s.interpolation)==null?void 0:p.skipOnVariables)!==void 0?s.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let v;if(y){const w=e.match(this.interpolator.nestingRegexp);v=w&&w.length}let C=s.replace&&!ke(s.replace)?s.replace:s;if(this.options.interpolation.defaultVariables&&(C={...this.options.interpolation.defaultVariables,...C}),e=this.interpolator.interpolate(e,C,s.lng||this.language||i.usedLng,s),y){const w=e.match(this.interpolator.nestingRegexp),E=w&&w.length;v(l==null?void 0:l[0])===w[0]&&!s.context?(this.logger.warn(`It seems you are nesting recursively key: ${w[0]} in key: ${r[0]}`),null):this.translate(...w,r),s)),s.interpolation&&this.interpolator.reset()}const u=s.postProcess||this.options.postProcess,d=ke(u)?[u]:u;return e!=null&&(d!=null&&d.length)&&s.applyPostProcessor!==!1&&(e=sv.handle(d,e,r,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...i,usedParams:this.getUsedParamsDetails(s)},...s}:s,this)),e}resolve(e,r={}){let s,i,l,u,d;return ke(e)&&(e=[e]),e.forEach(h=>{if(this.isValidLookup(s))return;const p=this.extractFromKey(h,r),y=p.key;i=y;let v=p.namespaces;this.options.fallbackNS&&(v=v.concat(this.options.fallbackNS));const C=r.count!==void 0&&!ke(r.count),w=C&&!r.ordinal&&r.count===0,E=r.context!==void 0&&(ke(r.context)||typeof r.context=="number")&&r.context!=="",b=r.lngs?r.lngs:this.languageUtils.toResolveHierarchy(r.lng||this.language,r.fallbackLng);v.forEach(k=>{var T,j;this.isValidLookup(s)||(d=k,!pg[`${b[0]}-${k}`]&&((T=this.utils)!=null&&T.hasLoadedNamespace)&&!((j=this.utils)!=null&&j.hasLoadedNamespace(d))&&(pg[`${b[0]}-${k}`]=!0,this.logger.warn(`key "${i}" for languages "${b.join(", ")}" won't get resolved as namespace "${d}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),b.forEach(_=>{var V;if(this.isValidLookup(s))return;u=_;const A=[y];if((V=this.i18nFormat)!=null&&V.addLookupKeys)this.i18nFormat.addLookupKeys(A,y,_,k,r);else{let B;C&&(B=this.pluralResolver.getSuffix(_,r.count,r));const te=`${this.options.pluralSeparator}zero`,G=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(C&&(r.ordinal&&B.indexOf(G)===0&&A.push(y+B.replace(G,this.options.pluralSeparator)),A.push(y+B),w&&A.push(y+te)),E){const W=`${y}${this.options.contextSeparator||"_"}${r.context}`;A.push(W),C&&(r.ordinal&&B.indexOf(G)===0&&A.push(W+B.replace(G,this.options.pluralSeparator)),A.push(W+B),w&&A.push(W+te))}}let F;for(;F=A.pop();)this.isValidLookup(s)||(l=F,s=this.getResource(_,k,F,r))}))})}),{res:s,usedKey:i,exactUsedKey:l,usedLng:u,usedNS:d}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e==="")}getResource(e,r,s,i={}){var l;return(l=this.i18nFormat)!=null&&l.getResource?this.i18nFormat.getResource(e,r,s,i):this.resourceStore.getResource(e,r,s,i)}getUsedParamsDetails(e={}){const r=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],s=e.replace&&!ke(e.replace);let i=s?e.replace:e;if(s&&typeof e.count<"u"&&(i.count=e.count),this.options.interpolation.defaultVariables&&(i={...this.options.interpolation.defaultVariables,...i}),!s){i={...i};for(const l of r)delete i[l]}return i}static hasDefaultValue(e){const r="defaultValue";for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)&&r===s.substring(0,r.length)&&e[s]!==void 0)return!0;return!1}}class mg{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Qn.create("languageUtils")}getScriptPartFromCode(e){if(e=Ki(e),!e||e.indexOf("-")<0)return null;const r=e.split("-");return r.length===2||(r.pop(),r[r.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(r.join("-"))}getLanguagePartFromCode(e){if(e=Ki(e),!e||e.indexOf("-")<0)return e;const r=e.split("-");return this.formatLanguageCode(r[0])}formatLanguageCode(e){if(ke(e)&&e.indexOf("-")>-1){let r;try{r=Intl.getCanonicalLocales(e)[0]}catch{}return r&&this.options.lowerCaseLng&&(r=r.toLowerCase()),r||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){if(!e)return null;let r;return e.forEach(s=>{if(r)return;const i=this.formatLanguageCode(s);(!this.options.supportedLngs||this.isSupportedCode(i))&&(r=i)}),!r&&this.options.supportedLngs&&e.forEach(s=>{if(r)return;const i=this.getScriptPartFromCode(s);if(this.isSupportedCode(i))return r=i;const l=this.getLanguagePartFromCode(s);if(this.isSupportedCode(l))return r=l;r=this.options.supportedLngs.find(u=>{if(u===l)return u;if(!(u.indexOf("-")<0&&l.indexOf("-")<0)&&(u.indexOf("-")>0&&l.indexOf("-")<0&&u.substring(0,u.indexOf("-"))===l||u.indexOf(l)===0&&l.length>1))return u})}),r||(r=this.getFallbackCodes(this.options.fallbackLng)[0]),r}getFallbackCodes(e,r){if(!e)return[];if(typeof e=="function"&&(e=e(r)),ke(e)&&(e=[e]),Array.isArray(e))return e;if(!r)return e.default||[];let s=e[r];return s||(s=e[this.getScriptPartFromCode(r)]),s||(s=e[this.formatLanguageCode(r)]),s||(s=e[this.getLanguagePartFromCode(r)]),s||(s=e.default),s||[]}toResolveHierarchy(e,r){const s=this.getFallbackCodes((r===!1?[]:r)||this.options.fallbackLng||[],e),i=[],l=u=>{u&&(this.isSupportedCode(u)?i.push(u):this.logger.warn(`rejecting language code not found in supportedLngs: ${u}`))};return ke(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&l(this.formatLanguageCode(e)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&l(this.getScriptPartFromCode(e)),this.options.load!=="currentOnly"&&l(this.getLanguagePartFromCode(e))):ke(e)&&l(this.formatLanguageCode(e)),s.forEach(u=>{i.indexOf(u)<0&&l(this.formatLanguageCode(u))}),i}}const gg={zero:0,one:1,two:2,few:3,many:4,other:5},yg={select:t=>t===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class rC{constructor(e,r={}){this.languageUtils=e,this.options=r,this.logger=Qn.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,r){this.rules[e]=r}clearCache(){this.pluralRulesCache={}}getRule(e,r={}){const s=Ki(e==="dev"?"en":e),i=r.ordinal?"ordinal":"cardinal",l=JSON.stringify({cleanedCode:s,type:i});if(l in this.pluralRulesCache)return this.pluralRulesCache[l];let u;try{u=new Intl.PluralRules(s,{type:i})}catch{if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),yg;if(!e.match(/-|_/))return yg;const h=this.languageUtils.getLanguagePartFromCode(e);u=this.getRule(h,r)}return this.pluralRulesCache[l]=u,u}needsPlural(e,r={}){let s=this.getRule(e,r);return s||(s=this.getRule("dev",r)),(s==null?void 0:s.resolvedOptions().pluralCategories.length)>1}getPluralFormsOfKey(e,r,s={}){return this.getSuffixes(e,s).map(i=>`${r}${i}`)}getSuffixes(e,r={}){let s=this.getRule(e,r);return s||(s=this.getRule("dev",r)),s?s.resolvedOptions().pluralCategories.sort((i,l)=>gg[i]-gg[l]).map(i=>`${this.options.prepend}${r.ordinal?`ordinal${this.options.prepend}`:""}${i}`):[]}getSuffix(e,r,s={}){const i=this.getRule(e,s);return i?`${this.options.prepend}${s.ordinal?`ordinal${this.options.prepend}`:""}${i.select(r)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",r,s))}}const vg=(t,e,r,s=".",i=!0)=>{let l=QS(t,e,r);return!l&&i&&ke(r)&&(l=Gd(t,r,s),l===void 0&&(l=Gd(e,r,s))),l},gd=t=>t.replace(/\$/g,"$$$$");class xg{constructor(e={}){var r;this.logger=Qn.create("interpolator"),this.options=e,this.format=((r=e==null?void 0:e.interpolation)==null?void 0:r.format)||(s=>s),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});const{escape:r,escapeValue:s,useRawValueToEscape:i,prefix:l,prefixEscaped:u,suffix:d,suffixEscaped:h,formatSeparator:p,unescapeSuffix:y,unescapePrefix:v,nestingPrefix:C,nestingPrefixEscaped:w,nestingSuffix:E,nestingSuffixEscaped:b,nestingOptionsSeparator:k,maxReplaces:T,alwaysFormat:j}=e.interpolation;this.escape=r!==void 0?r:GS,this.escapeValue=s!==void 0?s:!0,this.useRawValueToEscape=i!==void 0?i:!1,this.prefix=l?xs(l):u||"{{",this.suffix=d?xs(d):h||"}}",this.formatSeparator=p||",",this.unescapePrefix=y?"":v||"-",this.unescapeSuffix=this.unescapePrefix?"":y||"",this.nestingPrefix=C?xs(C):w||xs("$t("),this.nestingSuffix=E?xs(E):b||xs(")"),this.nestingOptionsSeparator=k||",",this.maxReplaces=T||1e3,this.alwaysFormat=j!==void 0?j:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const e=(r,s)=>(r==null?void 0:r.source)===s?(r.lastIndex=0,r):new RegExp(s,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,r,s,i){var w;let l,u,d;const h=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},p=E=>{if(E.indexOf(this.formatSeparator)<0){const j=vg(r,h,E,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(j,void 0,s,{...i,...r,interpolationkey:E}):j}const b=E.split(this.formatSeparator),k=b.shift().trim(),T=b.join(this.formatSeparator).trim();return this.format(vg(r,h,k,this.options.keySeparator,this.options.ignoreJSONStructure),T,s,{...i,...r,interpolationkey:k})};this.resetRegExp();const y=(i==null?void 0:i.missingInterpolationHandler)||this.options.missingInterpolationHandler,v=((w=i==null?void 0:i.interpolation)==null?void 0:w.skipOnVariables)!==void 0?i.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:E=>gd(E)},{regex:this.regexp,safeValue:E=>this.escapeValue?gd(this.escape(E)):gd(E)}].forEach(E=>{for(d=0;l=E.regex.exec(e);){const b=l[1].trim();if(u=p(b),u===void 0)if(typeof y=="function"){const T=y(e,l,i);u=ke(T)?T:""}else if(i&&Object.prototype.hasOwnProperty.call(i,b))u="";else if(v){u=l[0];continue}else this.logger.warn(`missed to pass in variable ${b} for interpolating ${e}`),u="";else!ke(u)&&!this.useRawValueToEscape&&(u=cg(u));const k=E.safeValue(u);if(e=e.replace(l[0],k),v?(E.regex.lastIndex+=u.length,E.regex.lastIndex-=l[0].length):E.regex.lastIndex=0,d++,d>=this.maxReplaces)break}}),e}nest(e,r,s={}){let i,l,u;const d=(h,p)=>{const y=this.nestingOptionsSeparator;if(h.indexOf(y)<0)return h;const v=h.split(new RegExp(`${y}[ ]*{`));let C=`{${v[1]}`;h=v[0],C=this.interpolate(C,u);const w=C.match(/'/g),E=C.match(/"/g);(((w==null?void 0:w.length)??0)%2===0&&!E||E.length%2!==0)&&(C=C.replace(/'/g,'"'));try{u=JSON.parse(C),p&&(u={...p,...u})}catch(b){return this.logger.warn(`failed parsing options string in nesting for key ${h}`,b),`${h}${y}${C}`}return u.defaultValue&&u.defaultValue.indexOf(this.prefix)>-1&&delete u.defaultValue,h};for(;i=this.nestingRegexp.exec(e);){let h=[];u={...s},u=u.replace&&!ke(u.replace)?u.replace:u,u.applyPostProcessor=!1,delete u.defaultValue;const p=/{.*}/.test(i[1])?i[1].lastIndexOf("}")+1:i[1].indexOf(this.formatSeparator);if(p!==-1&&(h=i[1].slice(p).split(this.formatSeparator).map(y=>y.trim()).filter(Boolean),i[1]=i[1].slice(0,p)),l=r(d.call(this,i[1].trim(),u),u),l&&i[0]===e&&!ke(l))return l;ke(l)||(l=cg(l)),l||(this.logger.warn(`missed to resolve ${i[1]} for nesting ${e}`),l=""),h.length&&(l=h.reduce((y,v)=>this.format(y,v,s.lng,{...s,interpolationkey:i[1].trim()}),l.trim())),e=e.replace(i[0],l),this.regexp.lastIndex=0}return e}}const oC=t=>{let e=t.toLowerCase().trim();const r={};if(t.indexOf("(")>-1){const s=t.split("(");e=s[0].toLowerCase().trim();const i=s[1].substring(0,s[1].length-1);e==="currency"&&i.indexOf(":")<0?r.currency||(r.currency=i.trim()):e==="relativetime"&&i.indexOf(":")<0?r.range||(r.range=i.trim()):i.split(";").forEach(u=>{if(u){const[d,...h]=u.split(":"),p=h.join(":").trim().replace(/^'+|'+$/g,""),y=d.trim();r[y]||(r[y]=p),p==="false"&&(r[y]=!1),p==="true"&&(r[y]=!0),isNaN(p)||(r[y]=parseInt(p,10))}})}return{formatName:e,formatOptions:r}},wg=t=>{const e={};return(r,s,i)=>{let l=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(l={...l,[i.interpolationkey]:void 0});const u=s+JSON.stringify(l);let d=e[u];return d||(d=t(Ki(s),i),e[u]=d),d(r)}},sC=t=>(e,r,s)=>t(Ki(r),s)(e);class iC{constructor(e={}){this.logger=Qn.create("formatter"),this.options=e,this.init(e)}init(e,r={interpolation:{}}){this.formatSeparator=r.interpolation.formatSeparator||",";const s=r.cacheInBuiltFormats?wg:sC;this.formats={number:s((i,l)=>{const u=new Intl.NumberFormat(i,{...l});return d=>u.format(d)}),currency:s((i,l)=>{const u=new Intl.NumberFormat(i,{...l,style:"currency"});return d=>u.format(d)}),datetime:s((i,l)=>{const u=new Intl.DateTimeFormat(i,{...l});return d=>u.format(d)}),relativetime:s((i,l)=>{const u=new Intl.RelativeTimeFormat(i,{...l});return d=>u.format(d,l.range||"day")}),list:s((i,l)=>{const u=new Intl.ListFormat(i,{...l});return d=>u.format(d)})}}add(e,r){this.formats[e.toLowerCase().trim()]=r}addCached(e,r){this.formats[e.toLowerCase().trim()]=wg(r)}format(e,r,s,i={}){const l=r.split(this.formatSeparator);if(l.length>1&&l[0].indexOf("(")>1&&l[0].indexOf(")")<0&&l.find(d=>d.indexOf(")")>-1)){const d=l.findIndex(h=>h.indexOf(")")>-1);l[0]=[l[0],...l.splice(1,d)].join(this.formatSeparator)}return l.reduce((d,h)=>{var v;const{formatName:p,formatOptions:y}=oC(h);if(this.formats[p]){let C=d;try{const w=((v=i==null?void 0:i.formatParams)==null?void 0:v[i.interpolationkey])||{},E=w.locale||w.lng||i.locale||i.lng||s;C=this.formats[p](d,E,{...y,...i,...w})}catch(w){this.logger.warn(w)}return C}else this.logger.warn(`there was no format function for ${p}`);return d},e)}}const aC=(t,e)=>{t.pending[e]!==void 0&&(delete t.pending[e],t.pendingCount--)};class lC extends cc{constructor(e,r,s,i={}){var l,u;super(),this.backend=e,this.store=r,this.services=s,this.languageUtils=s.languageUtils,this.options=i,this.logger=Qn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=i.maxParallelReads||10,this.readingCalls=0,this.maxRetries=i.maxRetries>=0?i.maxRetries:5,this.retryTimeout=i.retryTimeout>=1?i.retryTimeout:350,this.state={},this.queue=[],(u=(l=this.backend)==null?void 0:l.init)==null||u.call(l,s,i.backend,i)}queueLoad(e,r,s,i){const l={},u={},d={},h={};return e.forEach(p=>{let y=!0;r.forEach(v=>{const C=`${p}|${v}`;!s.reload&&this.store.hasResourceBundle(p,v)?this.state[C]=2:this.state[C]<0||(this.state[C]===1?u[C]===void 0&&(u[C]=!0):(this.state[C]=1,y=!1,u[C]===void 0&&(u[C]=!0),l[C]===void 0&&(l[C]=!0),h[v]===void 0&&(h[v]=!0)))}),y||(d[p]=!0)}),(Object.keys(l).length||Object.keys(u).length)&&this.queue.push({pending:u,pendingCount:Object.keys(u).length,loaded:{},errors:[],callback:i}),{toLoad:Object.keys(l),pending:Object.keys(u),toLoadLanguages:Object.keys(d),toLoadNamespaces:Object.keys(h)}}loaded(e,r,s){const i=e.split("|"),l=i[0],u=i[1];r&&this.emit("failedLoading",l,u,r),!r&&s&&this.store.addResourceBundle(l,u,s,void 0,void 0,{skipCopy:!0}),this.state[e]=r?-1:2,r&&s&&(this.state[e]=0);const d={};this.queue.forEach(h=>{qS(h.loaded,[l],u),aC(h,e),r&&h.errors.push(r),h.pendingCount===0&&!h.done&&(Object.keys(h.loaded).forEach(p=>{d[p]||(d[p]={});const y=h.loaded[p];y.length&&y.forEach(v=>{d[p][v]===void 0&&(d[p][v]=!0)})}),h.done=!0,h.errors.length?h.callback(h.errors):h.callback())}),this.emit("loaded",d),this.queue=this.queue.filter(h=>!h.done)}read(e,r,s,i=0,l=this.retryTimeout,u){if(!e.length)return u(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:r,fcName:s,tried:i,wait:l,callback:u});return}this.readingCalls++;const d=(p,y)=>{if(this.readingCalls--,this.waitingReads.length>0){const v=this.waitingReads.shift();this.read(v.lng,v.ns,v.fcName,v.tried,v.wait,v.callback)}if(p&&y&&i{this.read.call(this,e,r,s,i+1,l*2,u)},l);return}u(p,y)},h=this.backend[s].bind(this.backend);if(h.length===2){try{const p=h(e,r);p&&typeof p.then=="function"?p.then(y=>d(null,y)).catch(d):d(null,p)}catch(p){d(p)}return}return h(e,r,d)}prepareLoading(e,r,s={},i){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),i&&i();ke(e)&&(e=this.languageUtils.toResolveHierarchy(e)),ke(r)&&(r=[r]);const l=this.queueLoad(e,r,s,i);if(!l.toLoad.length)return l.pending.length||i(),null;l.toLoad.forEach(u=>{this.loadOne(u)})}load(e,r,s){this.prepareLoading(e,r,{},s)}reload(e,r,s){this.prepareLoading(e,r,{reload:!0},s)}loadOne(e,r=""){const s=e.split("|"),i=s[0],l=s[1];this.read(i,l,"read",void 0,void 0,(u,d)=>{u&&this.logger.warn(`${r}loading namespace ${l} for language ${i} failed`,u),!u&&d&&this.logger.log(`${r}loaded namespace ${l} for language ${i}`,d),this.loaded(e,u,d)})}saveMissing(e,r,s,i,l,u={},d=()=>{}){var h,p,y,v,C;if((p=(h=this.services)==null?void 0:h.utils)!=null&&p.hasLoadedNamespace&&!((v=(y=this.services)==null?void 0:y.utils)!=null&&v.hasLoadedNamespace(r))){this.logger.warn(`did not save key "${s}" as the namespace "${r}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(s==null||s==="")){if((C=this.backend)!=null&&C.create){const w={...u,isUpdate:l},E=this.backend.create.bind(this.backend);if(E.length<6)try{let b;E.length===5?b=E(e,r,s,i,w):b=E(e,r,s,i),b&&typeof b.then=="function"?b.then(k=>d(null,k)).catch(d):d(null,b)}catch(b){d(b)}else E(e,r,s,i,d,w)}!e||!e[0]||this.store.addResource(e[0],r,s,i)}}}const bg=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:t=>{let e={};if(typeof t[1]=="object"&&(e=t[1]),ke(t[1])&&(e.defaultValue=t[1]),ke(t[2])&&(e.tDescription=t[2]),typeof t[2]=="object"||typeof t[3]=="object"){const r=t[3]||t[2];Object.keys(r).forEach(s=>{e[s]=r[s]})}return e},interpolation:{escapeValue:!0,format:t=>t,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),Sg=t=>{var e,r;return ke(t.ns)&&(t.ns=[t.ns]),ke(t.fallbackLng)&&(t.fallbackLng=[t.fallbackLng]),ke(t.fallbackNS)&&(t.fallbackNS=[t.fallbackNS]),((r=(e=t.supportedLngs)==null?void 0:e.indexOf)==null?void 0:r.call(e,"cimode"))<0&&(t.supportedLngs=t.supportedLngs.concat(["cimode"])),typeof t.initImmediate=="boolean"&&(t.initAsync=t.initImmediate),t},Nl=()=>{},cC=t=>{Object.getOwnPropertyNames(Object.getPrototypeOf(t)).forEach(r=>{typeof t[r]=="function"&&(t[r]=t[r].bind(t))})};class Vi extends cc{constructor(e={},r){if(super(),this.options=Sg(e),this.services={},this.logger=Qn,this.modules={external:[]},cC(this),r&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,r),this;setTimeout(()=>{this.init(e,r)},0)}}init(e={},r){this.isInitializing=!0,typeof e=="function"&&(r=e,e={}),e.defaultNS==null&&e.ns&&(ke(e.ns)?e.defaultNS=e.ns:e.ns.indexOf("translation")<0&&(e.defaultNS=e.ns[0]));const s=bg();this.options={...s,...this.options,...Sg(e)},this.options.interpolation={...s.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=s.overloadTranslationOptionHandler);const i=p=>p?typeof p=="function"?new p:p:null;if(!this.options.isClone){this.modules.logger?Qn.init(i(this.modules.logger),this.options):Qn.init(null,this.options);let p;this.modules.formatter?p=this.modules.formatter:p=iC;const y=new mg(this.options);this.store=new hg(this.options.resources,this.options);const v=this.services;v.logger=Qn,v.resourceStore=this.store,v.languageUtils=y,v.pluralResolver=new rC(y,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==s.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),p&&(!this.options.interpolation.format||this.options.interpolation.format===s.interpolation.format)&&(v.formatter=i(p),v.formatter.init&&v.formatter.init(v,this.options),this.options.interpolation.format=v.formatter.format.bind(v.formatter)),v.interpolator=new xg(this.options),v.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},v.backendConnector=new lC(i(this.modules.backend),v.resourceStore,v,this.options),v.backendConnector.on("*",(w,...E)=>{this.emit(w,...E)}),this.modules.languageDetector&&(v.languageDetector=i(this.modules.languageDetector),v.languageDetector.init&&v.languageDetector.init(v,this.options.detection,this.options)),this.modules.i18nFormat&&(v.i18nFormat=i(this.modules.i18nFormat),v.i18nFormat.init&&v.i18nFormat.init(this)),this.translator=new Yl(this.services,this.options),this.translator.on("*",(w,...E)=>{this.emit(w,...E)}),this.modules.external.forEach(w=>{w.init&&w.init(this)})}if(this.format=this.options.interpolation.format,r||(r=Nl),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const p=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);p.length>0&&p[0]!=="dev"&&(this.options.lng=p[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(p=>{this[p]=(...y)=>this.store[p](...y)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(p=>{this[p]=(...y)=>(this.store[p](...y),this)});const d=Mi(),h=()=>{const p=(y,v)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),d.resolve(v),r(y,v)};if(this.languages&&!this.isInitialized)return p(null,this.t.bind(this));this.changeLanguage(this.options.lng,p)};return this.options.resources||!this.options.initAsync?h():setTimeout(h,0),d}loadResources(e,r=Nl){var l,u;let s=r;const i=ke(e)?e:this.language;if(typeof e=="function"&&(s=e),!this.options.resources||this.options.partialBundledLanguages){if((i==null?void 0:i.toLowerCase())==="cimode"&&(!this.options.preload||this.options.preload.length===0))return s();const d=[],h=p=>{if(!p||p==="cimode")return;this.services.languageUtils.toResolveHierarchy(p).forEach(v=>{v!=="cimode"&&d.indexOf(v)<0&&d.push(v)})};i?h(i):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(y=>h(y)),(u=(l=this.options.preload)==null?void 0:l.forEach)==null||u.call(l,p=>h(p)),this.services.backendConnector.load(d,this.options.ns,p=>{!p&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),s(p)})}else s(null)}reloadResources(e,r,s){const i=Mi();return typeof e=="function"&&(s=e,e=void 0),typeof r=="function"&&(s=r,r=void 0),e||(e=this.languages),r||(r=this.options.ns),s||(s=Nl),this.services.backendConnector.reload(e,r,l=>{i.resolve(),s(l)}),i}use(e){if(!e)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return e.type==="backend"&&(this.modules.backend=e),(e.type==="logger"||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type==="languageDetector"&&(this.modules.languageDetector=e),e.type==="i18nFormat"&&(this.modules.i18nFormat=e),e.type==="postProcessor"&&sv.addPostProcessor(e),e.type==="formatter"&&(this.modules.formatter=e),e.type==="3rdParty"&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&!(["cimode","dev"].indexOf(e)>-1)){for(let r=0;r-1)&&this.store.hasLanguageSomeTranslations(s)){this.resolvedLanguage=s;break}}!this.resolvedLanguage&&this.languages.indexOf(e)<0&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,r){this.isLanguageChangingTo=e;const s=Mi();this.emit("languageChanging",e);const i=d=>{this.language=d,this.languages=this.services.languageUtils.toResolveHierarchy(d),this.resolvedLanguage=void 0,this.setResolvedLanguage(d)},l=(d,h)=>{h?this.isLanguageChangingTo===e&&(i(h),this.translator.changeLanguage(h),this.isLanguageChangingTo=void 0,this.emit("languageChanged",h),this.logger.log("languageChanged",h)):this.isLanguageChangingTo=void 0,s.resolve((...p)=>this.t(...p)),r&&r(d,(...p)=>this.t(...p))},u=d=>{var y,v;!e&&!d&&this.services.languageDetector&&(d=[]);const h=ke(d)?d:d&&d[0],p=this.store.hasLanguageSomeTranslations(h)?h:this.services.languageUtils.getBestMatchFromCodes(ke(d)?[d]:d);p&&(this.language||i(p),this.translator.language||this.translator.changeLanguage(p),(v=(y=this.services.languageDetector)==null?void 0:y.cacheUserLanguage)==null||v.call(y,p)),this.loadResources(p,C=>{l(C,p)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?u(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(u):this.services.languageDetector.detect(u):u(e),s}getFixedT(e,r,s){const i=(l,u,...d)=>{let h;typeof u!="object"?h=this.options.overloadTranslationOptionHandler([l,u].concat(d)):h={...u},h.lng=h.lng||i.lng,h.lngs=h.lngs||i.lngs,h.ns=h.ns||i.ns,h.keyPrefix!==""&&(h.keyPrefix=h.keyPrefix||s||i.keyPrefix);const p=this.options.keySeparator||".";let y;return h.keyPrefix&&Array.isArray(l)?y=l.map(v=>(typeof v=="function"&&(v=Xd(v,{...this.options,...u})),`${h.keyPrefix}${p}${v}`)):(typeof l=="function"&&(l=Xd(l,{...this.options,...u})),y=h.keyPrefix?`${h.keyPrefix}${p}${l}`:l),this.t(y,h)};return ke(e)?i.lng=e:i.lngs=e,i.ns=r,i.keyPrefix=s,i}t(...e){var r;return(r=this.translator)==null?void 0:r.translate(...e)}exists(...e){var r;return(r=this.translator)==null?void 0:r.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,r={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const s=r.lng||this.resolvedLanguage||this.languages[0],i=this.options?this.options.fallbackLng:!1,l=this.languages[this.languages.length-1];if(s.toLowerCase()==="cimode")return!0;const u=(d,h)=>{const p=this.services.backendConnector.state[`${d}|${h}`];return p===-1||p===0||p===2};if(r.precheck){const d=r.precheck(this,u);if(d!==void 0)return d}return!!(this.hasResourceBundle(s,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||u(s,e)&&(!i||u(l,e)))}loadNamespaces(e,r){const s=Mi();return this.options.ns?(ke(e)&&(e=[e]),e.forEach(i=>{this.options.ns.indexOf(i)<0&&this.options.ns.push(i)}),this.loadResources(i=>{s.resolve(),r&&r(i)}),s):(r&&r(),Promise.resolve())}loadLanguages(e,r){const s=Mi();ke(e)&&(e=[e]);const i=this.options.preload||[],l=e.filter(u=>i.indexOf(u)<0&&this.services.languageUtils.isSupportedCode(u));return l.length?(this.options.preload=i.concat(l),this.loadResources(u=>{s.resolve(),r&&r(u)}),s):(r&&r(),Promise.resolve())}dir(e){var i,l;if(e||(e=this.resolvedLanguage||(((i=this.languages)==null?void 0:i.length)>0?this.languages[0]:this.language)),!e)return"rtl";try{const u=new Intl.Locale(e);if(u&&u.getTextInfo){const d=u.getTextInfo();if(d&&d.direction)return d.direction}}catch{}const r=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],s=((l=this.services)==null?void 0:l.languageUtils)||new mg(bg());return e.toLowerCase().indexOf("-latn")>1?"ltr":r.indexOf(s.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},r){const s=new Vi(e,r);return s.createInstance=Vi.createInstance,s}cloneInstance(e={},r=Nl){const s=e.forkResourceStore;s&&delete e.forkResourceStore;const i={...this.options,...e,isClone:!0},l=new Vi(i);if((e.debug!==void 0||e.prefix!==void 0)&&(l.logger=l.logger.clone(e)),["store","services","language"].forEach(d=>{l[d]=this[d]}),l.services={...this.services},l.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},s){const d=Object.keys(this.store.data).reduce((h,p)=>(h[p]={...this.store.data[p]},h[p]=Object.keys(h[p]).reduce((y,v)=>(y[v]={...h[p][v]},y),h[p]),h),{});l.store=new hg(d,i),l.services.resourceStore=l.store}return e.interpolation&&(l.services.interpolator=new xg(i)),l.translator=new Yl(l.services,i),l.translator.on("*",(d,...h)=>{l.emit(d,...h)}),l.init(i,r),l.translator.options=i,l.translator.backendConnector.services.utils={hasLoadedNamespace:l.hasLoadedNamespace.bind(l)},l}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const _t=Vi.createInstance();_t.createInstance;_t.dir;_t.init;_t.loadResources;_t.reloadResources;_t.use;_t.changeLanguage;_t.getFixedT;_t.t;_t.exists;_t.setDefaultNamespace;_t.hasLoadedNamespace;_t.loadNamespaces;_t.loadLanguages;const uC=(t,e,r,s)=>{var l,u,d,h;const i=[r,{code:e,...s||{}}];if((u=(l=t==null?void 0:t.services)==null?void 0:l.logger)!=null&&u.forward)return t.services.logger.forward(i,"warn","react-i18next::",!0);$o(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),(h=(d=t==null?void 0:t.services)==null?void 0:d.logger)!=null&&h.warn?t.services.logger.warn(...i):console!=null&&console.warn&&console.warn(...i)},Cg={},av=(t,e,r,s)=>{$o(r)&&Cg[r]||($o(r)&&(Cg[r]=new Date),uC(t,e,r,s))},lv=(t,e)=>()=>{if(t.isInitialized)e();else{const r=()=>{setTimeout(()=>{t.off("initialized",r)},0),e()};t.on("initialized",r)}},Jd=(t,e,r)=>{t.loadNamespaces(e,lv(t,r))},Eg=(t,e,r,s)=>{if($o(r)&&(r=[r]),t.options.preload&&t.options.preload.indexOf(e)>-1)return Jd(t,r,s);r.forEach(i=>{t.options.ns.indexOf(i)<0&&t.options.ns.push(i)}),t.loadLanguages(e,lv(t,s))},dC=(t,e,r={})=>!e.languages||!e.languages.length?(av(e,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:e.languages}),!0):e.hasLoadedNamespace(t,{lng:r.lng,precheck:(s,i)=>{if(r.bindI18n&&r.bindI18n.indexOf("languageChanging")>-1&&s.services.backendConnector.backend&&s.isLanguageChangingTo&&!i(s.isLanguageChangingTo,t))return!1}}),$o=t=>typeof t=="string",fC=t=>typeof t=="object"&&t!==null,hC=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,pC={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},mC=t=>pC[t],gC=t=>t.replace(hC,mC);let Zd={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:gC,transDefaultProps:void 0};const yC=(t={})=>{Zd={...Zd,...t}},vC=()=>Zd;let cv;const xC=t=>{cv=t},wC=()=>cv,bC={type:"3rdParty",init(t){yC(t.options.react),xC(t)}},SC=x.createContext();class CC{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(r=>{this.usedNamespaces[r]||(this.usedNamespaces[r]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var yd={exports:{}},vd={};/** * @license React * use-sync-external-store-shim.production.js * * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var kg;function EC(){if(kg)return vd;kg=1;var t=ac();function e(v,C){return v===C&&(v!==0||1/v===1/C)||v!==v&&C!==C}var r=typeof Object.is=="function"?Object.is:e,s=t.useState,i=t.useEffect,l=t.useLayoutEffect,u=t.useDebugValue;function d(v,C){var w=C(),E=s({inst:{value:w,getSnapshot:C}}),b=E[0].inst,k=E[1];return l(function(){b.value=w,b.getSnapshot=C,h(b)&&k({inst:b})},[v,w,C]),i(function(){return h(b)&&k({inst:b}),v(function(){h(b)&&k({inst:b})})},[v]),u(w),w}function h(v){var C=v.getSnapshot;v=v.value;try{var w=C();return!r(v,w)}catch{return!0}}function p(v,C){return C()}var y=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:d;return vd.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:y,vd}var Ng;function kC(){return Ng||(Ng=1,yd.exports=EC()),yd.exports}var NC=kC();const RC=(t,e)=>$o(e)?e:fC(e)&&$o(e.defaultValue)?e.defaultValue:Array.isArray(t)?t[t.length-1]:t,PC={t:RC,ready:!1},TC=()=>()=>{},Zt=(t,e={})=>{var G,W,le;const{i18n:r}=e,{i18n:s,defaultNS:i}=x.useContext(SC)||{},l=r||s||wC();l&&!l.reportNamespaces&&(l.reportNamespaces=new CC),l||av(l,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const u=x.useMemo(()=>{var K;return{...vC(),...(K=l==null?void 0:l.options)==null?void 0:K.react,...e}},[l,e]),{useSuspense:d,keyPrefix:h}=u,p=t||i||((G=l==null?void 0:l.options)==null?void 0:G.defaultNS),y=$o(p)?[p]:p||["translation"],v=x.useMemo(()=>y,y);(le=(W=l==null?void 0:l.reportNamespaces)==null?void 0:W.addUsedNamespaces)==null||le.call(W,v);const C=x.useRef(0),w=x.useCallback(K=>{if(!l)return TC;const{bindI18n:Z,bindI18nStore:J}=u,de=()=>{C.current+=1,K()};return Z&&l.on(Z,de),J&&l.store.on(J,de),()=>{Z&&Z.split(" ").forEach(ne=>l.off(ne,de)),J&&J.split(" ").forEach(ne=>l.store.off(ne,de))}},[l,u]),E=x.useRef(),b=x.useCallback(()=>{if(!l)return PC;const K=!!(l.isInitialized||l.initializedStoreOnce)&&v.every($=>dC($,l,u)),Z=e.lng||l.language,J=C.current,de=E.current;if(de&&de.ready===K&&de.lng===Z&&de.keyPrefix===h&&de.revision===J)return de;const se={t:l.getFixedT(Z,u.nsMode==="fallback"?v:v[0],h),ready:K,lng:Z,keyPrefix:h,revision:J};return E.current=se,se},[l,v,h,u,e.lng]),[k,T]=x.useState(0),{t:j,ready:_}=NC.useSyncExternalStore(w,b,b);x.useEffect(()=>{if(l&&!_&&!d){const K=()=>T(Z=>Z+1);e.lng?Eg(l,e.lng,v,K):Jd(l,v,K)}},[l,e.lng,v,_,d,k]);const A=l||{},F=x.useRef(null),V=x.useRef(),B=K=>{const Z=Object.getOwnPropertyDescriptors(K);Z.__original&&delete Z.__original;const J=Object.create(Object.getPrototypeOf(K),Z);if(!Object.prototype.hasOwnProperty.call(J,"__original"))try{Object.defineProperty(J,"__original",{value:K,writable:!1,enumerable:!1,configurable:!1})}catch{}return J},te=x.useMemo(()=>{const K=A,Z=K==null?void 0:K.language;let J=K;K&&(F.current&&F.current.__original===K?V.current!==Z?(J=B(K),F.current=J,V.current=Z):J=F.current:(J=B(K),F.current=J,V.current=Z));const de=[j,J,_];return de.t=j,de.i18n=J,de.ready=_,de},[j,A,_,A.resolvedLanguage,A.language,A.languages]);if(l&&d&&!_)throw new Promise(K=>{const Z=()=>K();e.lng?Eg(l,e.lng,v,Z):Jd(l,v,Z)});return te};function uv(t){var e,r,s="";if(typeof t=="string"||typeof t=="number")s+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;etypeof t=="boolean"?`${t}`:t===0?"0":t,Pg=dv,_f=(t,e)=>r=>{var s;if((e==null?void 0:e.variants)==null)return Pg(t,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:i,defaultVariants:l}=e,u=Object.keys(i).map(p=>{const y=r==null?void 0:r[p],v=l==null?void 0:l[p];if(y===null)return null;const C=Rg(y)||Rg(v);return i[p][C]}),d=r&&Object.entries(r).reduce((p,y)=>{let[v,C]=y;return C===void 0||(p[v]=C),p},{}),h=e==null||(s=e.compoundVariants)===null||s===void 0?void 0:s.reduce((p,y)=>{let{class:v,className:C,...w}=y;return Object.entries(w).every(E=>{let[b,k]=E;return Array.isArray(k)?k.includes({...l,...d}[b]):{...l,...d}[b]===k})?[...p,v,C]:p},[]);return Pg(t,u,h,r==null?void 0:r.class,r==null?void 0:r.className)},Af="-",OC=t=>{const e=_C(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:s}=t;return{getClassGroupId:u=>{const d=u.split(Af);return d[0]===""&&d.length!==1&&d.shift(),fv(d,e)||jC(u)},getConflictingClassGroupIds:(u,d)=>{const h=r[u]||[];return d&&s[u]?[...h,...s[u]]:h}}},fv=(t,e)=>{var u;if(t.length===0)return e.classGroupId;const r=t[0],s=e.nextPart.get(r),i=s?fv(t.slice(1),s):void 0;if(i)return i;if(e.validators.length===0)return;const l=t.join(Af);return(u=e.validators.find(({validator:d})=>d(l)))==null?void 0:u.classGroupId},Tg=/^\[(.+)\]$/,jC=t=>{if(Tg.test(t)){const e=Tg.exec(t)[1],r=e==null?void 0:e.substring(0,e.indexOf(":"));if(r)return"arbitrary.."+r}},_C=t=>{const{theme:e,prefix:r}=t,s={nextPart:new Map,validators:[]};return LC(Object.entries(t.classGroups),r).forEach(([l,u])=>{ef(u,s,l,e)}),s},ef=(t,e,r,s)=>{t.forEach(i=>{if(typeof i=="string"){const l=i===""?e:Og(e,i);l.classGroupId=r;return}if(typeof i=="function"){if(AC(i)){ef(i(s),e,r,s);return}e.validators.push({validator:i,classGroupId:r});return}Object.entries(i).forEach(([l,u])=>{ef(u,Og(e,l),r,s)})})},Og=(t,e)=>{let r=t;return e.split(Af).forEach(s=>{r.nextPart.has(s)||r.nextPart.set(s,{nextPart:new Map,validators:[]}),r=r.nextPart.get(s)}),r},AC=t=>t.isThemeGetter,LC=(t,e)=>e?t.map(([r,s])=>{const i=s.map(l=>typeof l=="string"?e+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([u,d])=>[e+u,d])):l);return[r,i]}):t,IC=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=new Map,s=new Map;const i=(l,u)=>{r.set(l,u),e++,e>t&&(e=0,s=r,r=new Map)};return{get(l){let u=r.get(l);if(u!==void 0)return u;if((u=s.get(l))!==void 0)return i(l,u),u},set(l,u){r.has(l)?r.set(l,u):i(l,u)}}},hv="!",DC=t=>{const{separator:e,experimentalParseClassName:r}=t,s=e.length===1,i=e[0],l=e.length,u=d=>{const h=[];let p=0,y=0,v;for(let k=0;ky?v-y:void 0;return{modifiers:h,hasImportantModifier:w,baseClassName:E,maybePostfixModifierPosition:b}};return r?d=>r({className:d,parseClassName:u}):u},MC=t=>{if(t.length<=1)return t;const e=[];let r=[];return t.forEach(s=>{s[0]==="["?(e.push(...r.sort(),s),r=[]):r.push(s)}),e.push(...r.sort()),e},FC=t=>({cache:IC(t.cacheSize),parseClassName:DC(t),...OC(t)}),zC=/\s+/,$C=(t,e)=>{const{parseClassName:r,getClassGroupId:s,getConflictingClassGroupIds:i}=e,l=[],u=t.trim().split(zC);let d="";for(let h=u.length-1;h>=0;h-=1){const p=u[h],{modifiers:y,hasImportantModifier:v,baseClassName:C,maybePostfixModifierPosition:w}=r(p);let E=!!w,b=s(E?C.substring(0,w):C);if(!b){if(!E){d=p+(d.length>0?" "+d:d);continue}if(b=s(C),!b){d=p+(d.length>0?" "+d:d);continue}E=!1}const k=MC(y).join(":"),T=v?k+hv:k,j=T+b;if(l.includes(j))continue;l.push(j);const _=i(b,E);for(let A=0;A<_.length;++A){const F=_[A];l.push(T+F)}d=p+(d.length>0?" "+d:d)}return d};function UC(){let t=0,e,r,s="";for(;t{if(typeof t=="string")return t;let e,r="";for(let s=0;sv(y),t());return r=FC(p),s=r.cache.get,i=r.cache.set,l=d,d(h)}function d(h){const p=s(h);if(p)return p;const y=$C(h,r);return i(h,y),y}return function(){return l(UC.apply(null,arguments))}}const Qe=t=>{const e=r=>r[t]||[];return e.isThemeGetter=!0,e},mv=/^\[(?:([a-z-]+):)?(.+)\]$/i,HC=/^\d+\/\d+$/,VC=new Set(["px","full","screen"]),WC=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,KC=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,qC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,QC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,YC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ur=t=>Rs(t)||VC.has(t)||HC.test(t),Br=t=>qs(t,"length",rE),Rs=t=>!!t&&!Number.isNaN(Number(t)),xd=t=>qs(t,"number",Rs),Fi=t=>!!t&&Number.isInteger(Number(t)),GC=t=>t.endsWith("%")&&Rs(t.slice(0,-1)),Pe=t=>mv.test(t),Hr=t=>WC.test(t),XC=new Set(["length","size","percentage"]),JC=t=>qs(t,XC,gv),ZC=t=>qs(t,"position",gv),eE=new Set(["image","url"]),tE=t=>qs(t,eE,sE),nE=t=>qs(t,"",oE),zi=()=>!0,qs=(t,e,r)=>{const s=mv.exec(t);return s?s[1]?typeof e=="string"?s[1]===e:e.has(s[1]):r(s[2]):!1},rE=t=>KC.test(t)&&!qC.test(t),gv=()=>!1,oE=t=>QC.test(t),sE=t=>YC.test(t),iE=()=>{const t=Qe("colors"),e=Qe("spacing"),r=Qe("blur"),s=Qe("brightness"),i=Qe("borderColor"),l=Qe("borderRadius"),u=Qe("borderSpacing"),d=Qe("borderWidth"),h=Qe("contrast"),p=Qe("grayscale"),y=Qe("hueRotate"),v=Qe("invert"),C=Qe("gap"),w=Qe("gradientColorStops"),E=Qe("gradientColorStopPositions"),b=Qe("inset"),k=Qe("margin"),T=Qe("opacity"),j=Qe("padding"),_=Qe("saturate"),A=Qe("scale"),F=Qe("sepia"),V=Qe("skew"),B=Qe("space"),te=Qe("translate"),G=()=>["auto","contain","none"],W=()=>["auto","hidden","clip","visible","scroll"],le=()=>["auto",Pe,e],K=()=>[Pe,e],Z=()=>["",ur,Br],J=()=>["auto",Rs,Pe],de=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],ne=()=>["solid","dashed","dotted","double","none"],se=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>["start","end","center","between","around","evenly","stretch"],H=()=>["","0",Pe],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],P=()=>[Rs,Pe];return{cacheSize:500,separator:":",theme:{colors:[zi],spacing:[ur,Br],blur:["none","",Hr,Pe],brightness:P(),borderColor:[t],borderRadius:["none","","full",Hr,Pe],borderSpacing:K(),borderWidth:Z(),contrast:P(),grayscale:H(),hueRotate:P(),invert:H(),gap:K(),gradientColorStops:[t],gradientColorStopPositions:[GC,Br],inset:le(),margin:le(),opacity:P(),padding:K(),saturate:P(),scale:P(),sepia:H(),skew:P(),space:K(),translate:K()},classGroups:{aspect:[{aspect:["auto","square","video",Pe]}],container:["container"],columns:[{columns:[Hr]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...de(),Pe]}],overflow:[{overflow:W()}],"overflow-x":[{"overflow-x":W()}],"overflow-y":[{"overflow-y":W()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[b]}],"inset-x":[{"inset-x":[b]}],"inset-y":[{"inset-y":[b]}],start:[{start:[b]}],end:[{end:[b]}],top:[{top:[b]}],right:[{right:[b]}],bottom:[{bottom:[b]}],left:[{left:[b]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Fi,Pe]}],basis:[{basis:le()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Pe]}],grow:[{grow:H()}],shrink:[{shrink:H()}],order:[{order:["first","last","none",Fi,Pe]}],"grid-cols":[{"grid-cols":[zi]}],"col-start-end":[{col:["auto",{span:["full",Fi,Pe]},Pe]}],"col-start":[{"col-start":J()}],"col-end":[{"col-end":J()}],"grid-rows":[{"grid-rows":[zi]}],"row-start-end":[{row:["auto",{span:[Fi,Pe]},Pe]}],"row-start":[{"row-start":J()}],"row-end":[{"row-end":J()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Pe]}],gap:[{gap:[C]}],"gap-x":[{"gap-x":[C]}],"gap-y":[{"gap-y":[C]}],"justify-content":[{justify:["normal",...$()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[j]}],px:[{px:[j]}],py:[{py:[j]}],ps:[{ps:[j]}],pe:[{pe:[j]}],pt:[{pt:[j]}],pr:[{pr:[j]}],pb:[{pb:[j]}],pl:[{pl:[j]}],m:[{m:[k]}],mx:[{mx:[k]}],my:[{my:[k]}],ms:[{ms:[k]}],me:[{me:[k]}],mt:[{mt:[k]}],mr:[{mr:[k]}],mb:[{mb:[k]}],ml:[{ml:[k]}],"space-x":[{"space-x":[B]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[B]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Pe,e]}],"min-w":[{"min-w":[Pe,e,"min","max","fit"]}],"max-w":[{"max-w":[Pe,e,"none","full","min","max","fit","prose",{screen:[Hr]},Hr]}],h:[{h:[Pe,e,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Pe,e,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Pe,e,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Pe,e,"auto","min","max","fit"]}],"font-size":[{text:["base",Hr,Br]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",xd]}],"font-family":[{font:[zi]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Pe]}],"line-clamp":[{"line-clamp":["none",Rs,xd]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ur,Pe]}],"list-image":[{"list-image":["none",Pe]}],"list-style-type":[{list:["none","disc","decimal",Pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[t]}],"placeholder-opacity":[{"placeholder-opacity":[T]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[t]}],"text-opacity":[{"text-opacity":[T]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ur,Br]}],"underline-offset":[{"underline-offset":["auto",ur,Pe]}],"text-decoration-color":[{decoration:[t]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:K()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Pe]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[T]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...de(),ZC]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",JC]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},tE]}],"bg-color":[{bg:[t]}],"gradient-from-pos":[{from:[E]}],"gradient-via-pos":[{via:[E]}],"gradient-to-pos":[{to:[E]}],"gradient-from":[{from:[w]}],"gradient-via":[{via:[w]}],"gradient-to":[{to:[w]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[d]}],"border-w-x":[{"border-x":[d]}],"border-w-y":[{"border-y":[d]}],"border-w-s":[{"border-s":[d]}],"border-w-e":[{"border-e":[d]}],"border-w-t":[{"border-t":[d]}],"border-w-r":[{"border-r":[d]}],"border-w-b":[{"border-b":[d]}],"border-w-l":[{"border-l":[d]}],"border-opacity":[{"border-opacity":[T]}],"border-style":[{border:[...ne(),"hidden"]}],"divide-x":[{"divide-x":[d]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[d]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[T]}],"divide-style":[{divide:ne()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...ne()]}],"outline-offset":[{"outline-offset":[ur,Pe]}],"outline-w":[{outline:[ur,Br]}],"outline-color":[{outline:[t]}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[t]}],"ring-opacity":[{"ring-opacity":[T]}],"ring-offset-w":[{"ring-offset":[ur,Br]}],"ring-offset-color":[{"ring-offset":[t]}],shadow:[{shadow:["","inner","none",Hr,nE]}],"shadow-color":[{shadow:[zi]}],opacity:[{opacity:[T]}],"mix-blend":[{"mix-blend":[...se(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":se()}],filter:[{filter:["","none"]}],blur:[{blur:[r]}],brightness:[{brightness:[s]}],contrast:[{contrast:[h]}],"drop-shadow":[{"drop-shadow":["","none",Hr,Pe]}],grayscale:[{grayscale:[p]}],"hue-rotate":[{"hue-rotate":[y]}],invert:[{invert:[v]}],saturate:[{saturate:[_]}],sepia:[{sepia:[F]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[r]}],"backdrop-brightness":[{"backdrop-brightness":[s]}],"backdrop-contrast":[{"backdrop-contrast":[h]}],"backdrop-grayscale":[{"backdrop-grayscale":[p]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[y]}],"backdrop-invert":[{"backdrop-invert":[v]}],"backdrop-opacity":[{"backdrop-opacity":[T]}],"backdrop-saturate":[{"backdrop-saturate":[_]}],"backdrop-sepia":[{"backdrop-sepia":[F]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[u]}],"border-spacing-x":[{"border-spacing-x":[u]}],"border-spacing-y":[{"border-spacing-y":[u]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Pe]}],duration:[{duration:P()}],ease:[{ease:["linear","in","out","in-out",Pe]}],delay:[{delay:P()}],animate:[{animate:["none","spin","ping","pulse","bounce",Pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[A]}],"scale-x":[{"scale-x":[A]}],"scale-y":[{"scale-y":[A]}],rotate:[{rotate:[Fi,Pe]}],"translate-x":[{"translate-x":[te]}],"translate-y":[{"translate-y":[te]}],"skew-x":[{"skew-x":[V]}],"skew-y":[{"skew-y":[V]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Pe]}],accent:[{accent:["auto",t]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Pe]}],"caret-color":[{caret:[t]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":K()}],"scroll-mx":[{"scroll-mx":K()}],"scroll-my":[{"scroll-my":K()}],"scroll-ms":[{"scroll-ms":K()}],"scroll-me":[{"scroll-me":K()}],"scroll-mt":[{"scroll-mt":K()}],"scroll-mr":[{"scroll-mr":K()}],"scroll-mb":[{"scroll-mb":K()}],"scroll-ml":[{"scroll-ml":K()}],"scroll-p":[{"scroll-p":K()}],"scroll-px":[{"scroll-px":K()}],"scroll-py":[{"scroll-py":K()}],"scroll-ps":[{"scroll-ps":K()}],"scroll-pe":[{"scroll-pe":K()}],"scroll-pt":[{"scroll-pt":K()}],"scroll-pr":[{"scroll-pr":K()}],"scroll-pb":[{"scroll-pb":K()}],"scroll-pl":[{"scroll-pl":K()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Pe]}],fill:[{fill:[t,"none"]}],"stroke-w":[{stroke:[ur,Br,xd]}],stroke:[{stroke:[t,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},aE=BC(iE);function Be(...t){return aE(dv(t))}function lE(t){if(t===0)return"0 B";const e=1024,r=["B","KB","MB","GB","TB"],s=Math.floor(Math.log(t)/Math.log(e));return parseFloat((t/Math.pow(e,s)).toFixed(2))+" "+r[s]}function cE(t){return(typeof t=="string"?new Date(t):typeof t=="number"?new Date(t*1e3):t).toLocaleString("zh-CN",{year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"})}const uE=_f("inline-flex items-center rounded-sm border px-2 py-0.5 text-xs font-mono transition-colors focus:outline-none",{variants:{variant:{default:"border-cyber-neon-cyan/30 bg-cyber-neon-cyan/10 text-cyber-neon-cyan",secondary:"border-cyber-border-DEFAULT bg-cyber-bg-tertiary text-cyber-text-secondary",destructive:"border-cyber-neon-pink/30 bg-cyber-neon-pink/10 text-cyber-neon-pink",outline:"border-cyber-border-DEFAULT text-cyber-text-primary",success:"border-cyber-neon-green/30 bg-cyber-neon-green/10 text-cyber-neon-green shadow-glow-green-sm",warning:"border-cyber-neon-orange/30 bg-cyber-neon-orange/10 text-cyber-neon-orange",idle:"border-cyber-border-DEFAULT bg-cyber-bg-tertiary text-cyber-text-muted",running:"border-cyber-neon-green/50 bg-cyber-neon-green/20 text-cyber-neon-green shadow-glow-green-sm animate-pulse-fast"}},defaultVariants:{variant:"default"}});function qi({className:t,variant:e,...r}){return g.jsx("div",{className:Be(uE({variant:e}),t),...r})}const jg=t=>{let e;const r=new Set,s=(p,y)=>{const v=typeof p=="function"?p(e):p;if(!Object.is(v,e)){const C=e;e=y??(typeof v!="object"||v===null)?v:Object.assign({},e,v),r.forEach(w=>w(e,C))}},i=()=>e,d={setState:s,getState:i,getInitialState:()=>h,subscribe:p=>(r.add(p),()=>r.delete(p))},h=e=t(s,i,d);return d},dE=(t=>t?jg(t):jg),fE=t=>t;function hE(t,e=fE){const r=oe.useSyncExternalStore(t.subscribe,oe.useCallback(()=>e(t.getState()),[t,e]),oe.useCallback(()=>e(t.getInitialState()),[t,e]));return oe.useDebugValue(r),r}const _g=t=>{const e=dE(t),r=s=>hE(e,s);return Object.assign(r,e),r},yv=(t=>t?_g(t):_g),tf="mediacrawler_cleared_log_id";function pE(){const t=localStorage.getItem(tf);if(t===null)return null;const e=parseInt(t,10);return isNaN(e)?null:e}function Rl(t){t===null?localStorage.removeItem(tf):localStorage.setItem(tf,t.toString())}const mE={platform:"bili",login_type:"qrcode",crawler_type:"search",keywords:"",specified_ids:"",creator_ids:"",start_page:1,enable_comments:!0,enable_sub_comments:!1,save_option:"json",cookies:"",headless:!1},jt=yv((t,e)=>({status:"idle",platform:null,crawlerType:null,startedAt:null,logs:[],clearedAfterLogId:pE(),config:mE,setStatus:r=>{t({status:r}),r==="running"&&e().clearedAfterLogId!==null&&(t({clearedAfterLogId:null}),Rl(null))},setRunningInfo:(r,s,i)=>{t({platform:r,crawlerType:s,startedAt:i}),i!==null&&e().clearedAfterLogId!==null&&(t({clearedAfterLogId:null}),Rl(null))},addLog:r=>{const{clearedAfterLogId:s,logs:i}=e();s!==null&&r.id<=s||i.length>0&&i[i.length-1].id===r.id||i.some(l=>l.id===r.id)||t(l=>({logs:[...l.logs.slice(-499),r]}))},setLogs:r=>{const{clearedAfterLogId:s}=e(),i=s!==null?r.filter(l=>l.id>s):r;t({logs:i})},clearLogs:()=>{const{logs:r}=e(),s=r.length>0?Math.max(...r.map(i=>i.id)):0;t({logs:[],clearedAfterLogId:s}),Rl(s)},restoreLogs:()=>{t({clearedAfterLogId:null}),Rl(null),window.location.reload()},updateConfig:r=>t(s=>({config:{...s.config,...r}})),reset:()=>t({status:"idle",platform:null,crawlerType:null,startedAt:null})}));function vv(t,e){return function(){return t.apply(e,arguments)}}const{toString:gE}=Object.prototype,{getPrototypeOf:Lf}=Object,{iterator:uc,toStringTag:xv}=Symbol,dc=(t=>e=>{const r=gE.call(e);return t[r]||(t[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Pn=t=>(t=t.toLowerCase(),e=>dc(e)===t),fc=t=>e=>typeof e===t,{isArray:Qs}=Array,Hs=fc("undefined");function ra(t){return t!==null&&!Hs(t)&&t.constructor!==null&&!Hs(t.constructor)&&Wt(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const wv=Pn("ArrayBuffer");function yE(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&wv(t.buffer),e}const vE=fc("string"),Wt=fc("function"),bv=fc("number"),oa=t=>t!==null&&typeof t=="object",xE=t=>t===!0||t===!1,Ml=t=>{if(dc(t)!=="object")return!1;const e=Lf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(xv in t)&&!(uc in t)},wE=t=>{if(!oa(t)||ra(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},bE=Pn("Date"),SE=Pn("File"),CE=Pn("Blob"),EE=Pn("FileList"),kE=t=>oa(t)&&Wt(t.pipe),NE=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||Wt(t.append)&&((e=dc(t))==="formdata"||e==="object"&&Wt(t.toString)&&t.toString()==="[object FormData]"))},RE=Pn("URLSearchParams"),[PE,TE,OE,jE]=["ReadableStream","Request","Response","Headers"].map(Pn),_E=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function sa(t,e,{allOwnKeys:r=!1}={}){if(t===null||typeof t>"u")return;let s,i;if(typeof t!="object"&&(t=[t]),Qs(t))for(s=0,i=t.length;s0;)if(i=r[s],e===i.toLowerCase())return i;return null}const Eo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Cv=t=>!Hs(t)&&t!==Eo;function nf(){const{caseless:t,skipUndefined:e}=Cv(this)&&this||{},r={},s=(i,l)=>{const u=t&&Sv(r,l)||l;Ml(r[u])&&Ml(i)?r[u]=nf(r[u],i):Ml(i)?r[u]=nf({},i):Qs(i)?r[u]=i.slice():(!e||!Hs(i))&&(r[u]=i)};for(let i=0,l=arguments.length;i(sa(e,(i,l)=>{r&&Wt(i)?t[l]=vv(i,r):t[l]=i},{allOwnKeys:s}),t),LE=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),IE=(t,e,r,s)=>{t.prototype=Object.create(e.prototype,s),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),r&&Object.assign(t.prototype,r)},DE=(t,e,r,s)=>{let i,l,u;const d={};if(e=e||{},t==null)return e;do{for(i=Object.getOwnPropertyNames(t),l=i.length;l-- >0;)u=i[l],(!s||s(u,t,e))&&!d[u]&&(e[u]=t[u],d[u]=!0);t=r!==!1&&Lf(t)}while(t&&(!r||r(t,e))&&t!==Object.prototype);return e},ME=(t,e,r)=>{t=String(t),(r===void 0||r>t.length)&&(r=t.length),r-=e.length;const s=t.indexOf(e,r);return s!==-1&&s===r},FE=t=>{if(!t)return null;if(Qs(t))return t;let e=t.length;if(!bv(e))return null;const r=new Array(e);for(;e-- >0;)r[e]=t[e];return r},zE=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Lf(Uint8Array)),$E=(t,e)=>{const s=(t&&t[uc]).call(t);let i;for(;(i=s.next())&&!i.done;){const l=i.value;e.call(t,l[0],l[1])}},UE=(t,e)=>{let r;const s=[];for(;(r=t.exec(e))!==null;)s.push(r);return s},BE=Pn("HTMLFormElement"),HE=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,s,i){return s.toUpperCase()+i}),Ag=(({hasOwnProperty:t})=>(e,r)=>t.call(e,r))(Object.prototype),VE=Pn("RegExp"),Ev=(t,e)=>{const r=Object.getOwnPropertyDescriptors(t),s={};sa(r,(i,l)=>{let u;(u=e(i,l,t))!==!1&&(s[l]=u||i)}),Object.defineProperties(t,s)},WE=t=>{Ev(t,(e,r)=>{if(Wt(t)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const s=t[r];if(Wt(s)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},KE=(t,e)=>{const r={},s=i=>{i.forEach(l=>{r[l]=!0})};return Qs(t)?s(t):s(String(t).split(e)),r},qE=()=>{},QE=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function YE(t){return!!(t&&Wt(t.append)&&t[xv]==="FormData"&&t[uc])}const GE=t=>{const e=new Array(10),r=(s,i)=>{if(oa(s)){if(e.indexOf(s)>=0)return;if(ra(s))return s;if(!("toJSON"in s)){e[i]=s;const l=Qs(s)?[]:{};return sa(s,(u,d)=>{const h=r(u,i+1);!Hs(h)&&(l[d]=h)}),e[i]=void 0,l}}return s};return r(t,0)},XE=Pn("AsyncFunction"),JE=t=>t&&(oa(t)||Wt(t))&&Wt(t.then)&&Wt(t.catch),kv=((t,e)=>t?setImmediate:e?((r,s)=>(Eo.addEventListener("message",({source:i,data:l})=>{i===Eo&&l===r&&s.length&&s.shift()()},!1),i=>{s.push(i),Eo.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Wt(Eo.postMessage)),ZE=typeof queueMicrotask<"u"?queueMicrotask.bind(Eo):typeof process<"u"&&process.nextTick||kv,ek=t=>t!=null&&Wt(t[uc]),U={isArray:Qs,isArrayBuffer:wv,isBuffer:ra,isFormData:NE,isArrayBufferView:yE,isString:vE,isNumber:bv,isBoolean:xE,isObject:oa,isPlainObject:Ml,isEmptyObject:wE,isReadableStream:PE,isRequest:TE,isResponse:OE,isHeaders:jE,isUndefined:Hs,isDate:bE,isFile:SE,isBlob:CE,isRegExp:VE,isFunction:Wt,isStream:kE,isURLSearchParams:RE,isTypedArray:zE,isFileList:EE,forEach:sa,merge:nf,extend:AE,trim:_E,stripBOM:LE,inherits:IE,toFlatObject:DE,kindOf:dc,kindOfTest:Pn,endsWith:ME,toArray:FE,forEachEntry:$E,matchAll:UE,isHTMLForm:BE,hasOwnProperty:Ag,hasOwnProp:Ag,reduceDescriptors:Ev,freezeMethods:WE,toObjectSet:KE,toCamelCase:HE,noop:qE,toFiniteNumber:QE,findKey:Sv,global:Eo,isContextDefined:Cv,isSpecCompliantForm:YE,toJSONObject:GE,isAsyncFn:XE,isThenable:JE,setImmediate:kv,asap:ZE,isIterable:ek};function Re(t,e,r,s,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),r&&(this.config=r),s&&(this.request=s),i&&(this.response=i,this.status=i.status?i.status:null)}U.inherits(Re,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:U.toJSONObject(this.config),code:this.code,status:this.status}}});const Nv=Re.prototype,Rv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{Rv[t]={value:t}});Object.defineProperties(Re,Rv);Object.defineProperty(Nv,"isAxiosError",{value:!0});Re.from=(t,e,r,s,i,l)=>{const u=Object.create(Nv);U.toFlatObject(t,u,function(y){return y!==Error.prototype},p=>p!=="isAxiosError");const d=t&&t.message?t.message:"Error",h=e==null&&t?t.code:e;return Re.call(u,d,h,r,s,i),t&&u.cause==null&&Object.defineProperty(u,"cause",{value:t,configurable:!0}),u.name=t&&t.name||"Error",l&&Object.assign(u,l),u};const tk=null;function rf(t){return U.isPlainObject(t)||U.isArray(t)}function Pv(t){return U.endsWith(t,"[]")?t.slice(0,-2):t}function Lg(t,e,r){return t?t.concat(e).map(function(i,l){return i=Pv(i),!r&&l?"["+i+"]":i}).join(r?".":""):e}function nk(t){return U.isArray(t)&&!t.some(rf)}const rk=U.toFlatObject(U,{},null,function(e){return/^is[A-Z]/.test(e)});function hc(t,e,r){if(!U.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,r=U.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(b,k){return!U.isUndefined(k[b])});const s=r.metaTokens,i=r.visitor||y,l=r.dots,u=r.indexes,h=(r.Blob||typeof Blob<"u"&&Blob)&&U.isSpecCompliantForm(e);if(!U.isFunction(i))throw new TypeError("visitor must be a function");function p(E){if(E===null)return"";if(U.isDate(E))return E.toISOString();if(U.isBoolean(E))return E.toString();if(!h&&U.isBlob(E))throw new Re("Blob is not supported. Use a Buffer instead.");return U.isArrayBuffer(E)||U.isTypedArray(E)?h&&typeof Blob=="function"?new Blob([E]):Buffer.from(E):E}function y(E,b,k){let T=E;if(E&&!k&&typeof E=="object"){if(U.endsWith(b,"{}"))b=s?b:b.slice(0,-2),E=JSON.stringify(E);else if(U.isArray(E)&&nk(E)||(U.isFileList(E)||U.endsWith(b,"[]"))&&(T=U.toArray(E)))return b=Pv(b),T.forEach(function(_,A){!(U.isUndefined(_)||_===null)&&e.append(u===!0?Lg([b],A,l):u===null?b:b+"[]",p(_))}),!1}return rf(E)?!0:(e.append(Lg(k,b,l),p(E)),!1)}const v=[],C=Object.assign(rk,{defaultVisitor:y,convertValue:p,isVisitable:rf});function w(E,b){if(!U.isUndefined(E)){if(v.indexOf(E)!==-1)throw Error("Circular reference detected in "+b.join("."));v.push(E),U.forEach(E,function(T,j){(!(U.isUndefined(T)||T===null)&&i.call(e,T,U.isString(j)?j.trim():j,b,C))===!0&&w(T,b?b.concat(j):[j])}),v.pop()}}if(!U.isObject(t))throw new TypeError("data must be an object");return w(t),e}function Ig(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(s){return e[s]})}function If(t,e){this._pairs=[],t&&hc(t,this,e)}const Tv=If.prototype;Tv.append=function(e,r){this._pairs.push([e,r])};Tv.toString=function(e){const r=e?function(s){return e.call(this,s,Ig)}:Ig;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function ok(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Ov(t,e,r){if(!e)return t;const s=r&&r.encode||ok;U.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let l;if(i?l=i(e,r):l=U.isURLSearchParams(e)?e.toString():new If(e,r).toString(s),l){const u=t.indexOf("#");u!==-1&&(t=t.slice(0,u)),t+=(t.indexOf("?")===-1?"?":"&")+l}return t}class Dg{constructor(){this.handlers=[]}use(e,r,s){return this.handlers.push({fulfilled:e,rejected:r,synchronous:s?s.synchronous:!1,runWhen:s?s.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){U.forEach(this.handlers,function(s){s!==null&&e(s)})}}const jv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},sk=typeof URLSearchParams<"u"?URLSearchParams:If,ik=typeof FormData<"u"?FormData:null,ak=typeof Blob<"u"?Blob:null,lk={isBrowser:!0,classes:{URLSearchParams:sk,FormData:ik,Blob:ak},protocols:["http","https","file","blob","url","data"]},Df=typeof window<"u"&&typeof document<"u",of=typeof navigator=="object"&&navigator||void 0,ck=Df&&(!of||["ReactNative","NativeScript","NS"].indexOf(of.product)<0),uk=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dk=Df&&window.location.href||"http://localhost",fk=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Df,hasStandardBrowserEnv:ck,hasStandardBrowserWebWorkerEnv:uk,navigator:of,origin:dk},Symbol.toStringTag,{value:"Module"})),St={...fk,...lk};function hk(t,e){return hc(t,new St.classes.URLSearchParams,{visitor:function(r,s,i,l){return St.isNode&&U.isBuffer(r)?(this.append(s,r.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...e})}function pk(t){return U.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function mk(t){const e={},r=Object.keys(t);let s;const i=r.length;let l;for(s=0;s=r.length;return u=!u&&U.isArray(i)?i.length:u,h?(U.hasOwnProp(i,u)?i[u]=[i[u],s]:i[u]=s,!d):((!i[u]||!U.isObject(i[u]))&&(i[u]=[]),e(r,s,i[u],l)&&U.isArray(i[u])&&(i[u]=mk(i[u])),!d)}if(U.isFormData(t)&&U.isFunction(t.entries)){const r={};return U.forEachEntry(t,(s,i)=>{e(pk(s),i,r,0)}),r}return null}function gk(t,e,r){if(U.isString(t))try{return(e||JSON.parse)(t),U.trim(t)}catch(s){if(s.name!=="SyntaxError")throw s}return(r||JSON.stringify)(t)}const ia={transitional:jv,adapter:["xhr","http","fetch"],transformRequest:[function(e,r){const s=r.getContentType()||"",i=s.indexOf("application/json")>-1,l=U.isObject(e);if(l&&U.isHTMLForm(e)&&(e=new FormData(e)),U.isFormData(e))return i?JSON.stringify(_v(e)):e;if(U.isArrayBuffer(e)||U.isBuffer(e)||U.isStream(e)||U.isFile(e)||U.isBlob(e)||U.isReadableStream(e))return e;if(U.isArrayBufferView(e))return e.buffer;if(U.isURLSearchParams(e))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let d;if(l){if(s.indexOf("application/x-www-form-urlencoded")>-1)return hk(e,this.formSerializer).toString();if((d=U.isFileList(e))||s.indexOf("multipart/form-data")>-1){const h=this.env&&this.env.FormData;return hc(d?{"files[]":e}:e,h&&new h,this.formSerializer)}}return l||i?(r.setContentType("application/json",!1),gk(e)):e}],transformResponse:[function(e){const r=this.transitional||ia.transitional,s=r&&r.forcedJSONParsing,i=this.responseType==="json";if(U.isResponse(e)||U.isReadableStream(e))return e;if(e&&U.isString(e)&&(s&&!this.responseType||i)){const u=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(e,this.parseReviver)}catch(d){if(u)throw d.name==="SyntaxError"?Re.from(d,Re.ERR_BAD_RESPONSE,this,null,this.response):d}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:St.classes.FormData,Blob:St.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};U.forEach(["delete","get","head","post","put","patch"],t=>{ia.headers[t]={}});const yk=U.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"]),vk=t=>{const e={};let r,s,i;return t&&t.split(` `).forEach(function(u){i=u.indexOf(":"),r=u.substring(0,i).trim().toLowerCase(),s=u.substring(i+1).trim(),!(!r||e[r]&&yk[r])&&(r==="set-cookie"?e[r]?e[r].push(s):e[r]=[s]:e[r]=e[r]?e[r]+", "+s:s)}),e},Mg=Symbol("internals");function $i(t){return t&&String(t).trim().toLowerCase()}function Fl(t){return t===!1||t==null?t:U.isArray(t)?t.map(Fl):String(t)}function xk(t){const e=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let s;for(;s=r.exec(t);)e[s[1]]=s[2];return e}const wk=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function wd(t,e,r,s,i){if(U.isFunction(s))return s.call(this,e,r);if(i&&(e=r),!!U.isString(e)){if(U.isString(s))return e.indexOf(s)!==-1;if(U.isRegExp(s))return s.test(e)}}function bk(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,r,s)=>r.toUpperCase()+s)}function Sk(t,e){const r=U.toCamelCase(" "+e);["get","set","has"].forEach(s=>{Object.defineProperty(t,s+r,{value:function(i,l,u){return this[s].call(this,e,i,l,u)},configurable:!0})})}let Kt=class{constructor(e){e&&this.set(e)}set(e,r,s){const i=this;function l(d,h,p){const y=$i(h);if(!y)throw new Error("header name must be a non-empty string");const v=U.findKey(i,y);(!v||i[v]===void 0||p===!0||p===void 0&&i[v]!==!1)&&(i[v||h]=Fl(d))}const u=(d,h)=>U.forEach(d,(p,y)=>l(p,y,h));if(U.isPlainObject(e)||e instanceof this.constructor)u(e,r);else if(U.isString(e)&&(e=e.trim())&&!wk(e))u(vk(e),r);else if(U.isObject(e)&&U.isIterable(e)){let d={},h,p;for(const y of e){if(!U.isArray(y))throw TypeError("Object iterator must return a key-value pair");d[p=y[0]]=(h=d[p])?U.isArray(h)?[...h,y[1]]:[h,y[1]]:y[1]}u(d,r)}else e!=null&&l(r,e,s);return this}get(e,r){if(e=$i(e),e){const s=U.findKey(this,e);if(s){const i=this[s];if(!r)return i;if(r===!0)return xk(i);if(U.isFunction(r))return r.call(this,i,s);if(U.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,r){if(e=$i(e),e){const s=U.findKey(this,e);return!!(s&&this[s]!==void 0&&(!r||wd(this,this[s],s,r)))}return!1}delete(e,r){const s=this;let i=!1;function l(u){if(u=$i(u),u){const d=U.findKey(s,u);d&&(!r||wd(s,s[d],d,r))&&(delete s[d],i=!0)}}return U.isArray(e)?e.forEach(l):l(e),i}clear(e){const r=Object.keys(this);let s=r.length,i=!1;for(;s--;){const l=r[s];(!e||wd(this,this[l],l,e,!0))&&(delete this[l],i=!0)}return i}normalize(e){const r=this,s={};return U.forEach(this,(i,l)=>{const u=U.findKey(s,l);if(u){r[u]=Fl(i),delete r[l];return}const d=e?bk(l):String(l).trim();d!==l&&delete r[l],r[d]=Fl(i),s[d]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const r=Object.create(null);return U.forEach(this,(s,i)=>{s!=null&&s!==!1&&(r[i]=e&&U.isArray(s)?s.join(", "):s)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,r])=>e+": "+r).join(` `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...r){const s=new this(e);return r.forEach(i=>s.set(i)),s}static accessor(e){const s=(this[Mg]=this[Mg]={accessors:{}}).accessors,i=this.prototype;function l(u){const d=$i(u);s[d]||(Sk(i,u),s[d]=!0)}return U.isArray(e)?e.forEach(l):l(e),this}};Kt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);U.reduceDescriptors(Kt.prototype,({value:t},e)=>{let r=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(s){this[r]=s}}});U.freezeMethods(Kt);function bd(t,e){const r=this||ia,s=e||r,i=Kt.from(s.headers);let l=s.data;return U.forEach(t,function(d){l=d.call(r,l,i.normalize(),e?e.status:void 0)}),i.normalize(),l}function Av(t){return!!(t&&t.__CANCEL__)}function Ys(t,e,r){Re.call(this,t??"canceled",Re.ERR_CANCELED,e,r),this.name="CanceledError"}U.inherits(Ys,Re,{__CANCEL__:!0});function Lv(t,e,r){const s=r.config.validateStatus;!r.status||!s||s(r.status)?t(r):e(new Re("Request failed with status code "+r.status,[Re.ERR_BAD_REQUEST,Re.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ck(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function Ek(t,e){t=t||10;const r=new Array(t),s=new Array(t);let i=0,l=0,u;return e=e!==void 0?e:1e3,function(h){const p=Date.now(),y=s[l];u||(u=p),r[i]=h,s[i]=p;let v=l,C=0;for(;v!==i;)C+=r[v++],v=v%t;if(i=(i+1)%t,i===l&&(l=(l+1)%t),p-u{r=y,i=null,l&&(clearTimeout(l),l=null),t(...p)};return[(...p)=>{const y=Date.now(),v=y-r;v>=s?u(p,y):(i=p,l||(l=setTimeout(()=>{l=null,u(i)},s-v)))},()=>i&&u(i)]}const Gl=(t,e,r=3)=>{let s=0;const i=Ek(50,250);return kk(l=>{const u=l.loaded,d=l.lengthComputable?l.total:void 0,h=u-s,p=i(h),y=u<=d;s=u;const v={loaded:u,total:d,progress:d?u/d:void 0,bytes:h,rate:p||void 0,estimated:p&&d&&y?(d-u)/p:void 0,event:l,lengthComputable:d!=null,[e?"download":"upload"]:!0};t(v)},r)},Fg=(t,e)=>{const r=t!=null;return[s=>e[0]({lengthComputable:r,total:t,loaded:s}),e[1]]},zg=t=>(...e)=>U.asap(()=>t(...e)),Nk=St.hasStandardBrowserEnv?((t,e)=>r=>(r=new URL(r,St.origin),t.protocol===r.protocol&&t.host===r.host&&(e||t.port===r.port)))(new URL(St.origin),St.navigator&&/(msie|trident)/i.test(St.navigator.userAgent)):()=>!0,Rk=St.hasStandardBrowserEnv?{write(t,e,r,s,i,l,u){if(typeof document>"u")return;const d=[`${t}=${encodeURIComponent(e)}`];U.isNumber(r)&&d.push(`expires=${new Date(r).toUTCString()}`),U.isString(s)&&d.push(`path=${s}`),U.isString(i)&&d.push(`domain=${i}`),l===!0&&d.push("secure"),U.isString(u)&&d.push(`SameSite=${u}`),document.cookie=d.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Pk(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function Tk(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function Iv(t,e,r){let s=!Pk(e);return t&&(s||r==!1)?Tk(t,e):e}const $g=t=>t instanceof Kt?{...t}:t;function Uo(t,e){e=e||{};const r={};function s(p,y,v,C){return U.isPlainObject(p)&&U.isPlainObject(y)?U.merge.call({caseless:C},p,y):U.isPlainObject(y)?U.merge({},y):U.isArray(y)?y.slice():y}function i(p,y,v,C){if(U.isUndefined(y)){if(!U.isUndefined(p))return s(void 0,p,v,C)}else return s(p,y,v,C)}function l(p,y){if(!U.isUndefined(y))return s(void 0,y)}function u(p,y){if(U.isUndefined(y)){if(!U.isUndefined(p))return s(void 0,p)}else return s(void 0,y)}function d(p,y,v){if(v in e)return s(p,y);if(v in t)return s(void 0,p)}const h={url:l,method:l,data:l,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:d,headers:(p,y,v)=>i($g(p),$g(y),v,!0)};return U.forEach(Object.keys({...t,...e}),function(y){const v=h[y]||i,C=v(t[y],e[y],y);U.isUndefined(C)&&v!==d||(r[y]=C)}),r}const Dv=t=>{const e=Uo({},t);let{data:r,withXSRFToken:s,xsrfHeaderName:i,xsrfCookieName:l,headers:u,auth:d}=e;if(e.headers=u=Kt.from(u),e.url=Ov(Iv(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),d&&u.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),U.isFormData(r)){if(St.hasStandardBrowserEnv||St.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(U.isFunction(r.getHeaders)){const h=r.getHeaders(),p=["content-type","content-length"];Object.entries(h).forEach(([y,v])=>{p.includes(y.toLowerCase())&&u.set(y,v)})}}if(St.hasStandardBrowserEnv&&(s&&U.isFunction(s)&&(s=s(e)),s||s!==!1&&Nk(e.url))){const h=i&&l&&Rk.read(l);h&&u.set(i,h)}return e},Ok=typeof XMLHttpRequest<"u",jk=Ok&&function(t){return new Promise(function(r,s){const i=Dv(t);let l=i.data;const u=Kt.from(i.headers).normalize();let{responseType:d,onUploadProgress:h,onDownloadProgress:p}=i,y,v,C,w,E;function b(){w&&w(),E&&E(),i.cancelToken&&i.cancelToken.unsubscribe(y),i.signal&&i.signal.removeEventListener("abort",y)}let k=new XMLHttpRequest;k.open(i.method.toUpperCase(),i.url,!0),k.timeout=i.timeout;function T(){if(!k)return;const _=Kt.from("getAllResponseHeaders"in k&&k.getAllResponseHeaders()),F={data:!d||d==="text"||d==="json"?k.responseText:k.response,status:k.status,statusText:k.statusText,headers:_,config:t,request:k};Lv(function(B){r(B),b()},function(B){s(B),b()},F),k=null}"onloadend"in k?k.onloadend=T:k.onreadystatechange=function(){!k||k.readyState!==4||k.status===0&&!(k.responseURL&&k.responseURL.indexOf("file:")===0)||setTimeout(T)},k.onabort=function(){k&&(s(new Re("Request aborted",Re.ECONNABORTED,t,k)),k=null)},k.onerror=function(A){const F=A&&A.message?A.message:"Network Error",V=new Re(F,Re.ERR_NETWORK,t,k);V.event=A||null,s(V),k=null},k.ontimeout=function(){let A=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const F=i.transitional||jv;i.timeoutErrorMessage&&(A=i.timeoutErrorMessage),s(new Re(A,F.clarifyTimeoutError?Re.ETIMEDOUT:Re.ECONNABORTED,t,k)),k=null},l===void 0&&u.setContentType(null),"setRequestHeader"in k&&U.forEach(u.toJSON(),function(A,F){k.setRequestHeader(F,A)}),U.isUndefined(i.withCredentials)||(k.withCredentials=!!i.withCredentials),d&&d!=="json"&&(k.responseType=i.responseType),p&&([C,E]=Gl(p,!0),k.addEventListener("progress",C)),h&&k.upload&&([v,w]=Gl(h),k.upload.addEventListener("progress",v),k.upload.addEventListener("loadend",w)),(i.cancelToken||i.signal)&&(y=_=>{k&&(s(!_||_.type?new Ys(null,t,k):_),k.abort(),k=null)},i.cancelToken&&i.cancelToken.subscribe(y),i.signal&&(i.signal.aborted?y():i.signal.addEventListener("abort",y)));const j=Ck(i.url);if(j&&St.protocols.indexOf(j)===-1){s(new Re("Unsupported protocol "+j+":",Re.ERR_BAD_REQUEST,t));return}k.send(l||null)})},_k=(t,e)=>{const{length:r}=t=t?t.filter(Boolean):[];if(e||r){let s=new AbortController,i;const l=function(p){if(!i){i=!0,d();const y=p instanceof Error?p:this.reason;s.abort(y instanceof Re?y:new Ys(y instanceof Error?y.message:y))}};let u=e&&setTimeout(()=>{u=null,l(new Re(`timeout ${e} of ms exceeded`,Re.ETIMEDOUT))},e);const d=()=>{t&&(u&&clearTimeout(u),u=null,t.forEach(p=>{p.unsubscribe?p.unsubscribe(l):p.removeEventListener("abort",l)}),t=null)};t.forEach(p=>p.addEventListener("abort",l));const{signal:h}=s;return h.unsubscribe=()=>U.asap(d),h}},Ak=function*(t,e){let r=t.byteLength;if(r{const i=Lk(t,e);let l=0,u,d=h=>{u||(u=!0,s&&s(h))};return new ReadableStream({async pull(h){try{const{done:p,value:y}=await i.next();if(p){d(),h.close();return}let v=y.byteLength;if(r){let C=l+=v;r(C)}h.enqueue(new Uint8Array(y))}catch(p){throw d(p),p}},cancel(h){return d(h),i.return()}},{highWaterMark:2})},Bg=64*1024,{isFunction:Pl}=U,Dk=(({Request:t,Response:e})=>({Request:t,Response:e}))(U.global),{ReadableStream:Hg,TextEncoder:Vg}=U.global,Wg=(t,...e)=>{try{return!!t(...e)}catch{return!1}},Mk=t=>{t=U.merge.call({skipUndefined:!0},Dk,t);const{fetch:e,Request:r,Response:s}=t,i=e?Pl(e):typeof fetch=="function",l=Pl(r),u=Pl(s);if(!i)return!1;const d=i&&Pl(Hg),h=i&&(typeof Vg=="function"?(E=>b=>E.encode(b))(new Vg):async E=>new Uint8Array(await new r(E).arrayBuffer())),p=l&&d&&Wg(()=>{let E=!1;const b=new r(St.origin,{body:new Hg,method:"POST",get duplex(){return E=!0,"half"}}).headers.has("Content-Type");return E&&!b}),y=u&&d&&Wg(()=>U.isReadableStream(new s("").body)),v={stream:y&&(E=>E.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(E=>{!v[E]&&(v[E]=(b,k)=>{let T=b&&b[E];if(T)return T.call(b);throw new Re(`Response type '${E}' is not supported`,Re.ERR_NOT_SUPPORT,k)})});const C=async E=>{if(E==null)return 0;if(U.isBlob(E))return E.size;if(U.isSpecCompliantForm(E))return(await new r(St.origin,{method:"POST",body:E}).arrayBuffer()).byteLength;if(U.isArrayBufferView(E)||U.isArrayBuffer(E))return E.byteLength;if(U.isURLSearchParams(E)&&(E=E+""),U.isString(E))return(await h(E)).byteLength},w=async(E,b)=>{const k=U.toFiniteNumber(E.getContentLength());return k??C(b)};return async E=>{let{url:b,method:k,data:T,signal:j,cancelToken:_,timeout:A,onDownloadProgress:F,onUploadProgress:V,responseType:B,headers:te,withCredentials:G="same-origin",fetchOptions:W}=Dv(E),le=e||fetch;B=B?(B+"").toLowerCase():"text";let K=_k([j,_&&_.toAbortSignal()],A),Z=null;const J=K&&K.unsubscribe&&(()=>{K.unsubscribe()});let de;try{if(V&&p&&k!=="get"&&k!=="head"&&(de=await w(te,T))!==0){let P=new r(b,{method:"POST",body:T,duplex:"half"}),M;if(U.isFormData(T)&&(M=P.headers.get("content-type"))&&te.setContentType(M),P.body){const[ie,ae]=Fg(de,Gl(zg(V)));T=Ug(P.body,Bg,ie,ae)}}U.isString(G)||(G=G?"include":"omit");const ne=l&&"credentials"in r.prototype,se={...W,signal:K,method:k.toUpperCase(),headers:te.normalize().toJSON(),body:T,duplex:"half",credentials:ne?G:void 0};Z=l&&new r(b,se);let $=await(l?le(Z,W):le(b,se));const H=y&&(B==="stream"||B==="response");if(y&&(F||H&&J)){const P={};["status","statusText","headers"].forEach(me=>{P[me]=$[me]});const M=U.toFiniteNumber($.headers.get("content-length")),[ie,ae]=F&&Fg(M,Gl(zg(F),!0))||[];$=new s(Ug($.body,Bg,ie,()=>{ae&&ae(),J&&J()}),P)}B=B||"text";let Q=await v[U.findKey(v,B)||"text"]($,E);return!H&&J&&J(),await new Promise((P,M)=>{Lv(P,M,{data:Q,headers:Kt.from($.headers),status:$.status,statusText:$.statusText,config:E,request:Z})})}catch(ne){throw J&&J(),ne&&ne.name==="TypeError"&&/Load failed|fetch/i.test(ne.message)?Object.assign(new Re("Network Error",Re.ERR_NETWORK,E,Z),{cause:ne.cause||ne}):Re.from(ne,ne&&ne.code,E,Z)}}},Fk=new Map,Mv=t=>{let e=t&&t.env||{};const{fetch:r,Request:s,Response:i}=e,l=[s,i,r];let u=l.length,d=u,h,p,y=Fk;for(;d--;)h=l[d],p=y.get(h),p===void 0&&y.set(h,p=d?new Map:Mk(e)),y=p;return p};Mv();const Mf={http:tk,xhr:jk,fetch:{get:Mv}};U.forEach(Mf,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const Kg=t=>`- ${t}`,zk=t=>U.isFunction(t)||t===null||t===!1;function $k(t,e){t=U.isArray(t)?t:[t];const{length:r}=t;let s,i;const l={};for(let u=0;u`adapter ${h} `+(p===!1?"is not supported by the environment":"is not available in the build"));let d=r?u.length>1?`since : `+u.map(Kg).join(` `):" "+Kg(u[0]):"as no adapter specified";throw new Re("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return i}const Fv={getAdapter:$k,adapters:Mf};function Sd(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new Ys(null,t)}function qg(t){return Sd(t),t.headers=Kt.from(t.headers),t.data=bd.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),Fv.getAdapter(t.adapter||ia.adapter,t)(t).then(function(s){return Sd(t),s.data=bd.call(t,t.transformResponse,s),s.headers=Kt.from(s.headers),s},function(s){return Av(s)||(Sd(t),s&&s.response&&(s.response.data=bd.call(t,t.transformResponse,s.response),s.response.headers=Kt.from(s.response.headers))),Promise.reject(s)})}const zv="1.13.2",pc={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{pc[t]=function(s){return typeof s===t||"a"+(e<1?"n ":" ")+t}});const Qg={};pc.transitional=function(e,r,s){function i(l,u){return"[Axios v"+zv+"] Transitional option '"+l+"'"+u+(s?". "+s:"")}return(l,u,d)=>{if(e===!1)throw new Re(i(u," has been removed"+(r?" in "+r:"")),Re.ERR_DEPRECATED);return r&&!Qg[u]&&(Qg[u]=!0,console.warn(i(u," has been deprecated since v"+r+" and will be removed in the near future"))),e?e(l,u,d):!0}};pc.spelling=function(e){return(r,s)=>(console.warn(`${s} is likely a misspelling of ${e}`),!0)};function Uk(t,e,r){if(typeof t!="object")throw new Re("options must be an object",Re.ERR_BAD_OPTION_VALUE);const s=Object.keys(t);let i=s.length;for(;i-- >0;){const l=s[i],u=e[l];if(u){const d=t[l],h=d===void 0||u(d,l,t);if(h!==!0)throw new Re("option "+l+" must be "+h,Re.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Re("Unknown option "+l,Re.ERR_BAD_OPTION)}}const zl={assertOptions:Uk,validators:pc},Hn=zl.validators;let Mo=class{constructor(e){this.defaults=e||{},this.interceptors={request:new Dg,response:new Dg}}async request(e,r){try{return await this._request(e,r)}catch(s){if(s instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const l=i.stack?i.stack.replace(/^.+\n/,""):"";try{s.stack?l&&!String(s.stack).endsWith(l.replace(/^.+\n.+\n/,""))&&(s.stack+=` `+l):s.stack=l}catch{}}throw s}}_request(e,r){typeof e=="string"?(r=r||{},r.url=e):r=e||{},r=Uo(this.defaults,r);const{transitional:s,paramsSerializer:i,headers:l}=r;s!==void 0&&zl.assertOptions(s,{silentJSONParsing:Hn.transitional(Hn.boolean),forcedJSONParsing:Hn.transitional(Hn.boolean),clarifyTimeoutError:Hn.transitional(Hn.boolean)},!1),i!=null&&(U.isFunction(i)?r.paramsSerializer={serialize:i}:zl.assertOptions(i,{encode:Hn.function,serialize:Hn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),zl.assertOptions(r,{baseUrl:Hn.spelling("baseURL"),withXsrfToken:Hn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=l&&U.merge(l.common,l[r.method]);l&&U.forEach(["delete","get","head","post","put","patch","common"],E=>{delete l[E]}),r.headers=Kt.concat(u,l);const d=[];let h=!0;this.interceptors.request.forEach(function(b){typeof b.runWhen=="function"&&b.runWhen(r)===!1||(h=h&&b.synchronous,d.unshift(b.fulfilled,b.rejected))});const p=[];this.interceptors.response.forEach(function(b){p.push(b.fulfilled,b.rejected)});let y,v=0,C;if(!h){const E=[qg.bind(this),void 0];for(E.unshift(...d),E.push(...p),C=E.length,y=Promise.resolve(r);v{if(!s._listeners)return;let l=s._listeners.length;for(;l-- >0;)s._listeners[l](i);s._listeners=null}),this.promise.then=i=>{let l;const u=new Promise(d=>{s.subscribe(d),l=d}).then(i);return u.cancel=function(){s.unsubscribe(l)},u},e(function(l,u,d){s.reason||(s.reason=new Ys(l,u,d),r(s.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const r=this._listeners.indexOf(e);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const e=new AbortController,r=s=>{e.abort(s)};return this.subscribe(r),e.signal.unsubscribe=()=>this.unsubscribe(r),e.signal}static source(){let e;return{token:new $v(function(i){e=i}),cancel:e}}};function Hk(t){return function(r){return t.apply(null,r)}}function Vk(t){return U.isObject(t)&&t.isAxiosError===!0}const sf={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(sf).forEach(([t,e])=>{sf[e]=t});function Uv(t){const e=new Mo(t),r=vv(Mo.prototype.request,e);return U.extend(r,Mo.prototype,e,{allOwnKeys:!0}),U.extend(r,e,null,{allOwnKeys:!0}),r.create=function(i){return Uv(Uo(t,i))},r}const rt=Uv(ia);rt.Axios=Mo;rt.CanceledError=Ys;rt.CancelToken=Bk;rt.isCancel=Av;rt.VERSION=zv;rt.toFormData=hc;rt.AxiosError=Re;rt.Cancel=rt.CanceledError;rt.all=function(e){return Promise.all(e)};rt.spread=Hk;rt.isAxiosError=Vk;rt.mergeConfig=Uo;rt.AxiosHeaders=Kt;rt.formToJSON=t=>_v(U.isHTMLForm(t)?new FormData(t):t);rt.getAdapter=Fv.getAdapter;rt.HttpStatusCode=sf;rt.default=rt;const{Axios:t_,AxiosError:n_,CanceledError:r_,isCancel:o_,CancelToken:s_,VERSION:i_,all:a_,Cancel:l_,isAxiosError:c_,spread:u_,toFormData:d_,AxiosHeaders:f_,HttpStatusCode:h_,formToJSON:p_,getAdapter:m_,mergeConfig:g_}=rt,Yn=rt.create({baseURL:"/api",timeout:3e4,headers:{"Content-Type":"application/json"}}),Ff={start:t=>Yn.post("/crawler/start",t),stop:()=>Yn.post("/crawler/stop"),getStatus:()=>Yn.get("/crawler/status"),getLogs:(t=100)=>Yn.get("/crawler/logs",{params:{limit:t}})},Xl={getFiles:(t,e)=>Yn.get("/data/files",{params:{platform:t,file_type:e}}),getFileContent:(t,e=100)=>Yn.get("/data/files/"+t,{params:{preview:!0,limit:e}}),getStats:()=>Yn.get("/data/stats"),getDownloadUrl:t=>`/api/data/download/${t}`},Bv={getPlatforms:()=>Yn.get("/config/platforms"),getOptions:()=>Yn.get("/config/options")},Wk={check:()=>Yn.get("/env/check")};function Kk(){const t=jt(r=>r.setStatus),e=jt(r=>r.setRunningInfo);return ta({queryKey:["crawlerStatus"],queryFn:async()=>{const{data:r}=await Ff.getStatus();return t(r.status),e(r.platform,r.crawler_type,r.started_at),r},refetchInterval:2e3})}function qk(){const t=lc(),e=jt(s=>s.setStatus),r=jt(s=>s.clearLogs);return Xy({mutationFn:s=>Ff.start(s),onMutate:()=>{r(),e("running")},onSuccess:()=>{Kl.success("Crawler started successfully"),t.invalidateQueries({queryKey:["crawlerStatus"]})},onError:s=>{e("idle"),Kl.error(`Failed to start crawler: ${s.message}`)}})}function Qk(){const t=lc(),e=jt(r=>r.setStatus);return Xy({mutationFn:()=>Ff.stop(),onMutate:()=>{e("stopping")},onSuccess:()=>{Kl.success("Crawler stopped"),e("idle"),t.invalidateQueries({queryKey:["crawlerStatus"]})},onError:r=>{Kl.error(`Failed to stop crawler: ${r.message}`)}})}function Yk(){return ta({queryKey:["platforms"],queryFn:async()=>{const{data:t}=await Bv.getPlatforms();return t.platforms},staleTime:1/0})}function Gk(){return ta({queryKey:["configOptions"],queryFn:async()=>{const{data:t}=await Bv.getOptions();return t},staleTime:1/0})}function af(t,[e,r]){return Math.min(r,Math.max(e,t))}function Me(t,e,{checkForDefaultPrevented:r=!0}={}){return function(i){if(t==null||t(i),r===!1||!i.defaultPrevented)return e==null?void 0:e(i)}}function Xk(t,e){const r=x.createContext(e),s=l=>{const{children:u,...d}=l,h=x.useMemo(()=>d,Object.values(d));return g.jsx(r.Provider,{value:h,children:u})};s.displayName=t+"Provider";function i(l){const u=x.useContext(r);if(u)return u;if(e!==void 0)return e;throw new Error(`\`${l}\` must be used within \`${t}\``)}return[s,i]}function aa(t,e=[]){let r=[];function s(l,u){const d=x.createContext(u),h=r.length;r=[...r,u];const p=v=>{var T;const{scope:C,children:w,...E}=v,b=((T=C==null?void 0:C[t])==null?void 0:T[h])||d,k=x.useMemo(()=>E,Object.values(E));return g.jsx(b.Provider,{value:k,children:w})};p.displayName=l+"Provider";function y(v,C){var b;const w=((b=C==null?void 0:C[t])==null?void 0:b[h])||d,E=x.useContext(w);if(E)return E;if(u!==void 0)return u;throw new Error(`\`${v}\` must be used within \`${l}\``)}return[p,y]}const i=()=>{const l=r.map(u=>x.createContext(u));return function(d){const h=(d==null?void 0:d[t])||l;return x.useMemo(()=>({[`__scope${t}`]:{...d,[t]:h}}),[d,h])}};return i.scopeName=t,[s,Jk(i,...e)]}function Jk(...t){const e=t[0];if(t.length===1)return e;const r=()=>{const s=t.map(i=>({useScope:i(),scopeName:i.scopeName}));return function(l){const u=s.reduce((d,{useScope:h,scopeName:p})=>{const v=h(l)[`__scope${p}`];return{...d,...v}},{});return x.useMemo(()=>({[`__scope${e.scopeName}`]:u}),[u])}};return r.scopeName=e.scopeName,r}function Yg(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function Gs(...t){return e=>{let r=!1;const s=t.map(i=>{const l=Yg(i,e);return!r&&typeof l=="function"&&(r=!0),l});if(r)return()=>{for(let i=0;i{const{children:l,...u}=s,d=x.Children.toArray(l),h=d.find(tN);if(h){const p=h.props.children,y=d.map(v=>v===h?x.Children.count(p)>1?x.Children.only(null):x.isValidElement(p)?p.props.children:null:v);return g.jsx(e,{...u,ref:i,children:x.isValidElement(p)?x.cloneElement(p,void 0,y):null})}return g.jsx(e,{...u,ref:i,children:l})});return r.displayName=`${t}.Slot`,r}function Zk(t){const e=x.forwardRef((r,s)=>{const{children:i,...l}=r;if(x.isValidElement(i)){const u=rN(i),d=nN(l,i.props);return i.type!==x.Fragment&&(d.ref=s?Gs(s,u):u),x.cloneElement(i,d)}return x.Children.count(i)>1?x.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var eN=Symbol("radix.slottable");function tN(t){return x.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===eN}function nN(t,e){const r={...e};for(const s in e){const i=t[s],l=e[s];/^on[A-Z]/.test(s)?i&&l?r[s]=(...d)=>{const h=l(...d);return i(...d),h}:i&&(r[s]=i):s==="style"?r[s]={...i,...l}:s==="className"&&(r[s]=[i,l].filter(Boolean).join(" "))}return{...t,...r}}function rN(t){var s,i;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function oN(t){const e=t+"CollectionProvider",[r,s]=aa(e),[i,l]=r(e,{collectionRef:{current:null},itemMap:new Map}),u=b=>{const{scope:k,children:T}=b,j=oe.useRef(null),_=oe.useRef(new Map).current;return g.jsx(i,{scope:k,itemMap:_,collectionRef:j,children:T})};u.displayName=e;const d=t+"CollectionSlot",h=Gg(d),p=oe.forwardRef((b,k)=>{const{scope:T,children:j}=b,_=l(d,T),A=Ve(k,_.collectionRef);return g.jsx(h,{ref:A,children:j})});p.displayName=d;const y=t+"CollectionItemSlot",v="data-radix-collection-item",C=Gg(y),w=oe.forwardRef((b,k)=>{const{scope:T,children:j,..._}=b,A=oe.useRef(null),F=Ve(k,A),V=l(y,T);return oe.useEffect(()=>(V.itemMap.set(A,{ref:A,..._}),()=>void V.itemMap.delete(A))),g.jsx(C,{[v]:"",ref:F,children:j})});w.displayName=y;function E(b){const k=l(t+"CollectionConsumer",b);return oe.useCallback(()=>{const j=k.collectionRef.current;if(!j)return[];const _=Array.from(j.querySelectorAll(`[${v}]`));return Array.from(k.itemMap.values()).sort((V,B)=>_.indexOf(V.ref.current)-_.indexOf(B.ref.current))},[k.collectionRef,k.itemMap])}return[{Provider:u,Slot:p,ItemSlot:w},E,s]}var sN=x.createContext(void 0);function Hv(t){const e=x.useContext(sN);return t||e||"ltr"}function iN(t){const e=aN(t),r=x.forwardRef((s,i)=>{const{children:l,...u}=s,d=x.Children.toArray(l),h=d.find(cN);if(h){const p=h.props.children,y=d.map(v=>v===h?x.Children.count(p)>1?x.Children.only(null):x.isValidElement(p)?p.props.children:null:v);return g.jsx(e,{...u,ref:i,children:x.isValidElement(p)?x.cloneElement(p,void 0,y):null})}return g.jsx(e,{...u,ref:i,children:l})});return r.displayName=`${t}.Slot`,r}function aN(t){const e=x.forwardRef((r,s)=>{const{children:i,...l}=r;if(x.isValidElement(i)){const u=dN(i),d=uN(l,i.props);return i.type!==x.Fragment&&(d.ref=s?Gs(s,u):u),x.cloneElement(i,d)}return x.Children.count(i)>1?x.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var lN=Symbol("radix.slottable");function cN(t){return x.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===lN}function uN(t,e){const r={...e};for(const s in e){const i=t[s],l=e[s];/^on[A-Z]/.test(s)?i&&l?r[s]=(...d)=>{const h=l(...d);return i(...d),h}:i&&(r[s]=i):s==="style"?r[s]={...i,...l}:s==="className"&&(r[s]=[i,l].filter(Boolean).join(" "))}return{...t,...r}}function dN(t){var s,i;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var fN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ze=fN.reduce((t,e)=>{const r=iN(`Primitive.${e}`),s=x.forwardRef((i,l)=>{const{asChild:u,...d}=i,h=u?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(h,{...d,ref:l})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{});function hN(t,e){t&&na.flushSync(()=>t.dispatchEvent(e))}function Vt(t){const e=x.useRef(t);return x.useEffect(()=>{e.current=t}),x.useMemo(()=>(...r)=>{var s;return(s=e.current)==null?void 0:s.call(e,...r)},[])}function pN(t,e=globalThis==null?void 0:globalThis.document){const r=Vt(t);x.useEffect(()=>{const s=i=>{i.key==="Escape"&&r(i)};return e.addEventListener("keydown",s,{capture:!0}),()=>e.removeEventListener("keydown",s,{capture:!0})},[r,e])}var mN="DismissableLayer",lf="dismissableLayer.update",gN="dismissableLayer.pointerDownOutside",yN="dismissableLayer.focusOutside",Xg,Vv=x.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),zf=x.forwardRef((t,e)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:l,onInteractOutside:u,onDismiss:d,...h}=t,p=x.useContext(Vv),[y,v]=x.useState(null),C=(y==null?void 0:y.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=x.useState({}),E=Ve(e,B=>v(B)),b=Array.from(p.layers),[k]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),T=b.indexOf(k),j=y?b.indexOf(y):-1,_=p.layersWithOutsidePointerEventsDisabled.size>0,A=j>=T,F=wN(B=>{const te=B.target,G=[...p.branches].some(W=>W.contains(te));!A||G||(i==null||i(B),u==null||u(B),B.defaultPrevented||d==null||d())},C),V=bN(B=>{const te=B.target;[...p.branches].some(W=>W.contains(te))||(l==null||l(B),u==null||u(B),B.defaultPrevented||d==null||d())},C);return pN(B=>{j===p.layers.size-1&&(s==null||s(B),!B.defaultPrevented&&d&&(B.preventDefault(),d()))},C),x.useEffect(()=>{if(y)return r&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(Xg=C.body.style.pointerEvents,C.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(y)),p.layers.add(y),Jg(),()=>{r&&p.layersWithOutsidePointerEventsDisabled.size===1&&(C.body.style.pointerEvents=Xg)}},[y,C,r,p]),x.useEffect(()=>()=>{y&&(p.layers.delete(y),p.layersWithOutsidePointerEventsDisabled.delete(y),Jg())},[y,p]),x.useEffect(()=>{const B=()=>w({});return document.addEventListener(lf,B),()=>document.removeEventListener(lf,B)},[]),g.jsx(ze.div,{...h,ref:E,style:{pointerEvents:_?A?"auto":"none":void 0,...t.style},onFocusCapture:Me(t.onFocusCapture,V.onFocusCapture),onBlurCapture:Me(t.onBlurCapture,V.onBlurCapture),onPointerDownCapture:Me(t.onPointerDownCapture,F.onPointerDownCapture)})});zf.displayName=mN;var vN="DismissableLayerBranch",xN=x.forwardRef((t,e)=>{const r=x.useContext(Vv),s=x.useRef(null),i=Ve(e,s);return x.useEffect(()=>{const l=s.current;if(l)return r.branches.add(l),()=>{r.branches.delete(l)}},[r.branches]),g.jsx(ze.div,{...t,ref:i})});xN.displayName=vN;function wN(t,e=globalThis==null?void 0:globalThis.document){const r=Vt(t),s=x.useRef(!1),i=x.useRef(()=>{});return x.useEffect(()=>{const l=d=>{if(d.target&&!s.current){let h=function(){Wv(gN,r,p,{discrete:!0})};const p={originalEvent:d};d.pointerType==="touch"?(e.removeEventListener("click",i.current),i.current=h,e.addEventListener("click",i.current,{once:!0})):h()}else e.removeEventListener("click",i.current);s.current=!1},u=window.setTimeout(()=>{e.addEventListener("pointerdown",l)},0);return()=>{window.clearTimeout(u),e.removeEventListener("pointerdown",l),e.removeEventListener("click",i.current)}},[e,r]),{onPointerDownCapture:()=>s.current=!0}}function bN(t,e=globalThis==null?void 0:globalThis.document){const r=Vt(t),s=x.useRef(!1);return x.useEffect(()=>{const i=l=>{l.target&&!s.current&&Wv(yN,r,{originalEvent:l},{discrete:!1})};return e.addEventListener("focusin",i),()=>e.removeEventListener("focusin",i)},[e,r]),{onFocusCapture:()=>s.current=!0,onBlurCapture:()=>s.current=!1}}function Jg(){const t=new CustomEvent(lf);document.dispatchEvent(t)}function Wv(t,e,r,{discrete:s}){const i=r.originalEvent.target,l=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:r});e&&i.addEventListener(t,e,{once:!0}),s?hN(i,l):i.dispatchEvent(l)}var Cd=0;function Kv(){x.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??Zg()),document.body.insertAdjacentElement("beforeend",t[1]??Zg()),Cd++,()=>{Cd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(e=>e.remove()),Cd--}},[])}function Zg(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Ed="focusScope.autoFocusOnMount",kd="focusScope.autoFocusOnUnmount",ey={bubbles:!1,cancelable:!0},SN="FocusScope",$f=x.forwardRef((t,e)=>{const{loop:r=!1,trapped:s=!1,onMountAutoFocus:i,onUnmountAutoFocus:l,...u}=t,[d,h]=x.useState(null),p=Vt(i),y=Vt(l),v=x.useRef(null),C=Ve(e,b=>h(b)),w=x.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;x.useEffect(()=>{if(s){let b=function(_){if(w.paused||!d)return;const A=_.target;d.contains(A)?v.current=A:Wr(v.current,{select:!0})},k=function(_){if(w.paused||!d)return;const A=_.relatedTarget;A!==null&&(d.contains(A)||Wr(v.current,{select:!0}))},T=function(_){if(document.activeElement===document.body)for(const F of _)F.removedNodes.length>0&&Wr(d)};document.addEventListener("focusin",b),document.addEventListener("focusout",k);const j=new MutationObserver(T);return d&&j.observe(d,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",b),document.removeEventListener("focusout",k),j.disconnect()}}},[s,d,w.paused]),x.useEffect(()=>{if(d){ny.add(w);const b=document.activeElement;if(!d.contains(b)){const T=new CustomEvent(Ed,ey);d.addEventListener(Ed,p),d.dispatchEvent(T),T.defaultPrevented||(CN(PN(qv(d)),{select:!0}),document.activeElement===b&&Wr(d))}return()=>{d.removeEventListener(Ed,p),setTimeout(()=>{const T=new CustomEvent(kd,ey);d.addEventListener(kd,y),d.dispatchEvent(T),T.defaultPrevented||Wr(b??document.body,{select:!0}),d.removeEventListener(kd,y),ny.remove(w)},0)}}},[d,p,y,w]);const E=x.useCallback(b=>{if(!r&&!s||w.paused)return;const k=b.key==="Tab"&&!b.altKey&&!b.ctrlKey&&!b.metaKey,T=document.activeElement;if(k&&T){const j=b.currentTarget,[_,A]=EN(j);_&&A?!b.shiftKey&&T===A?(b.preventDefault(),r&&Wr(_,{select:!0})):b.shiftKey&&T===_&&(b.preventDefault(),r&&Wr(A,{select:!0})):T===j&&b.preventDefault()}},[r,s,w.paused]);return g.jsx(ze.div,{tabIndex:-1,...u,ref:C,onKeyDown:E})});$f.displayName=SN;function CN(t,{select:e=!1}={}){const r=document.activeElement;for(const s of t)if(Wr(s,{select:e}),document.activeElement!==r)return}function EN(t){const e=qv(t),r=ty(e,t),s=ty(e.reverse(),t);return[r,s]}function qv(t){const e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:s=>{const i=s.tagName==="INPUT"&&s.type==="hidden";return s.disabled||s.hidden||i?NodeFilter.FILTER_SKIP:s.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)e.push(r.currentNode);return e}function ty(t,e){for(const r of t)if(!kN(r,{upTo:e}))return r}function kN(t,{upTo:e}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(e!==void 0&&t===e)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function NN(t){return t instanceof HTMLInputElement&&"select"in t}function Wr(t,{select:e=!1}={}){if(t&&t.focus){const r=document.activeElement;t.focus({preventScroll:!0}),t!==r&&NN(t)&&e&&t.select()}}var ny=RN();function RN(){let t=[];return{add(e){const r=t[0];e!==r&&(r==null||r.pause()),t=ry(t,e),t.unshift(e)},remove(e){var r;t=ry(t,e),(r=t[0])==null||r.resume()}}}function ry(t,e){const r=[...t],s=r.indexOf(e);return s!==-1&&r.splice(s,1),r}function PN(t){return t.filter(e=>e.tagName!=="A")}var mt=globalThis!=null&&globalThis.document?x.useLayoutEffect:()=>{},TN=Sf[" useId ".trim().toString()]||(()=>{}),ON=0;function Ps(t){const[e,r]=x.useState(TN());return mt(()=>{r(s=>s??String(ON++))},[t]),e?`radix-${e}`:""}const jN=["top","right","bottom","left"],no=Math.min,Xt=Math.max,Jl=Math.round,Tl=Math.floor,Xn=t=>({x:t,y:t}),_N={left:"right",right:"left",bottom:"top",top:"bottom"},AN={start:"end",end:"start"};function cf(t,e,r){return Xt(t,no(e,r))}function vr(t,e){return typeof t=="function"?t(e):t}function xr(t){return t.split("-")[0]}function Xs(t){return t.split("-")[1]}function Uf(t){return t==="x"?"y":"x"}function Bf(t){return t==="y"?"height":"width"}const LN=new Set(["top","bottom"]);function Gn(t){return LN.has(xr(t))?"y":"x"}function Hf(t){return Uf(Gn(t))}function IN(t,e,r){r===void 0&&(r=!1);const s=Xs(t),i=Hf(t),l=Bf(i);let u=i==="x"?s===(r?"end":"start")?"right":"left":s==="start"?"bottom":"top";return e.reference[l]>e.floating[l]&&(u=Zl(u)),[u,Zl(u)]}function DN(t){const e=Zl(t);return[uf(t),e,uf(e)]}function uf(t){return t.replace(/start|end/g,e=>AN[e])}const oy=["left","right"],sy=["right","left"],MN=["top","bottom"],FN=["bottom","top"];function zN(t,e,r){switch(t){case"top":case"bottom":return r?e?sy:oy:e?oy:sy;case"left":case"right":return e?MN:FN;default:return[]}}function $N(t,e,r,s){const i=Xs(t);let l=zN(xr(t),r==="start",s);return i&&(l=l.map(u=>u+"-"+i),e&&(l=l.concat(l.map(uf)))),l}function Zl(t){return t.replace(/left|right|bottom|top/g,e=>_N[e])}function UN(t){return{top:0,right:0,bottom:0,left:0,...t}}function Qv(t){return typeof t!="number"?UN(t):{top:t,right:t,bottom:t,left:t}}function ec(t){const{x:e,y:r,width:s,height:i}=t;return{width:s,height:i,top:r,left:e,right:e+s,bottom:r+i,x:e,y:r}}function iy(t,e,r){let{reference:s,floating:i}=t;const l=Gn(e),u=Hf(e),d=Bf(u),h=xr(e),p=l==="y",y=s.x+s.width/2-i.width/2,v=s.y+s.height/2-i.height/2,C=s[d]/2-i[d]/2;let w;switch(h){case"top":w={x:y,y:s.y-i.height};break;case"bottom":w={x:y,y:s.y+s.height};break;case"right":w={x:s.x+s.width,y:v};break;case"left":w={x:s.x-i.width,y:v};break;default:w={x:s.x,y:s.y}}switch(Xs(e)){case"start":w[u]-=C*(r&&p?-1:1);break;case"end":w[u]+=C*(r&&p?-1:1);break}return w}const BN=async(t,e,r)=>{const{placement:s="bottom",strategy:i="absolute",middleware:l=[],platform:u}=r,d=l.filter(Boolean),h=await(u.isRTL==null?void 0:u.isRTL(e));let p=await u.getElementRects({reference:t,floating:e,strategy:i}),{x:y,y:v}=iy(p,s,h),C=s,w={},E=0;for(let b=0;b({name:"arrow",options:t,async fn(e){const{x:r,y:s,placement:i,rects:l,platform:u,elements:d,middlewareData:h}=e,{element:p,padding:y=0}=vr(t,e)||{};if(p==null)return{};const v=Qv(y),C={x:r,y:s},w=Hf(i),E=Bf(w),b=await u.getDimensions(p),k=w==="y",T=k?"top":"left",j=k?"bottom":"right",_=k?"clientHeight":"clientWidth",A=l.reference[E]+l.reference[w]-C[w]-l.floating[E],F=C[w]-l.reference[w],V=await(u.getOffsetParent==null?void 0:u.getOffsetParent(p));let B=V?V[_]:0;(!B||!await(u.isElement==null?void 0:u.isElement(V)))&&(B=d.floating[_]||l.floating[E]);const te=A/2-F/2,G=B/2-b[E]/2-1,W=no(v[T],G),le=no(v[j],G),K=W,Z=B-b[E]-le,J=B/2-b[E]/2+te,de=cf(K,J,Z),ne=!h.arrow&&Xs(i)!=null&&J!==de&&l.reference[E]/2-(JJ<=0)){var le,K;const J=(((le=l.flip)==null?void 0:le.index)||0)+1,de=B[J];if(de&&(!(v==="alignment"?j!==Gn(de):!1)||W.every($=>Gn($.placement)===j?$.overflows[0]>0:!0)))return{data:{index:J,overflows:W},reset:{placement:de}};let ne=(K=W.filter(se=>se.overflows[0]<=0).sort((se,$)=>se.overflows[1]-$.overflows[1])[0])==null?void 0:K.placement;if(!ne)switch(w){case"bestFit":{var Z;const se=(Z=W.filter($=>{if(V){const H=Gn($.placement);return H===j||H==="y"}return!0}).map($=>[$.placement,$.overflows.filter(H=>H>0).reduce((H,Q)=>H+Q,0)]).sort(($,H)=>$[1]-H[1])[0])==null?void 0:Z[0];se&&(ne=se);break}case"initialPlacement":ne=d;break}if(i!==ne)return{reset:{placement:ne}}}return{}}}};function ay(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function ly(t){return jN.some(e=>t[e]>=0)}const WN=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:r}=e,{strategy:s="referenceHidden",...i}=vr(t,e);switch(s){case"referenceHidden":{const l=await Qi(e,{...i,elementContext:"reference"}),u=ay(l,r.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:ly(u)}}}case"escaped":{const l=await Qi(e,{...i,altBoundary:!0}),u=ay(l,r.floating);return{data:{escapedOffsets:u,escaped:ly(u)}}}default:return{}}}}},Yv=new Set(["left","top"]);async function KN(t,e){const{placement:r,platform:s,elements:i}=t,l=await(s.isRTL==null?void 0:s.isRTL(i.floating)),u=xr(r),d=Xs(r),h=Gn(r)==="y",p=Yv.has(u)?-1:1,y=l&&h?-1:1,v=vr(e,t);let{mainAxis:C,crossAxis:w,alignmentAxis:E}=typeof v=="number"?{mainAxis:v,crossAxis:0,alignmentAxis:null}:{mainAxis:v.mainAxis||0,crossAxis:v.crossAxis||0,alignmentAxis:v.alignmentAxis};return d&&typeof E=="number"&&(w=d==="end"?E*-1:E),h?{x:w*y,y:C*p}:{x:C*p,y:w*y}}const qN=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var r,s;const{x:i,y:l,placement:u,middlewareData:d}=e,h=await KN(e,t);return u===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:i+h.x,y:l+h.y,data:{...h,placement:u}}}}},QN=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:r,y:s,placement:i}=e,{mainAxis:l=!0,crossAxis:u=!1,limiter:d={fn:k=>{let{x:T,y:j}=k;return{x:T,y:j}}},...h}=vr(t,e),p={x:r,y:s},y=await Qi(e,h),v=Gn(xr(i)),C=Uf(v);let w=p[C],E=p[v];if(l){const k=C==="y"?"top":"left",T=C==="y"?"bottom":"right",j=w+y[k],_=w-y[T];w=cf(j,w,_)}if(u){const k=v==="y"?"top":"left",T=v==="y"?"bottom":"right",j=E+y[k],_=E-y[T];E=cf(j,E,_)}const b=d.fn({...e,[C]:w,[v]:E});return{...b,data:{x:b.x-r,y:b.y-s,enabled:{[C]:l,[v]:u}}}}}},YN=function(t){return t===void 0&&(t={}),{options:t,fn(e){const{x:r,y:s,placement:i,rects:l,middlewareData:u}=e,{offset:d=0,mainAxis:h=!0,crossAxis:p=!0}=vr(t,e),y={x:r,y:s},v=Gn(i),C=Uf(v);let w=y[C],E=y[v];const b=vr(d,e),k=typeof b=="number"?{mainAxis:b,crossAxis:0}:{mainAxis:0,crossAxis:0,...b};if(h){const _=C==="y"?"height":"width",A=l.reference[C]-l.floating[_]+k.mainAxis,F=l.reference[C]+l.reference[_]-k.mainAxis;wF&&(w=F)}if(p){var T,j;const _=C==="y"?"width":"height",A=Yv.has(xr(i)),F=l.reference[v]-l.floating[_]+(A&&((T=u.offset)==null?void 0:T[v])||0)+(A?0:k.crossAxis),V=l.reference[v]+l.reference[_]+(A?0:((j=u.offset)==null?void 0:j[v])||0)-(A?k.crossAxis:0);EV&&(E=V)}return{[C]:w,[v]:E}}}},GN=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var r,s;const{placement:i,rects:l,platform:u,elements:d}=e,{apply:h=()=>{},...p}=vr(t,e),y=await Qi(e,p),v=xr(i),C=Xs(i),w=Gn(i)==="y",{width:E,height:b}=l.floating;let k,T;v==="top"||v==="bottom"?(k=v,T=C===(await(u.isRTL==null?void 0:u.isRTL(d.floating))?"start":"end")?"left":"right"):(T=v,k=C==="end"?"top":"bottom");const j=b-y.top-y.bottom,_=E-y.left-y.right,A=no(b-y[k],j),F=no(E-y[T],_),V=!e.middlewareData.shift;let B=A,te=F;if((r=e.middlewareData.shift)!=null&&r.enabled.x&&(te=_),(s=e.middlewareData.shift)!=null&&s.enabled.y&&(B=j),V&&!C){const W=Xt(y.left,0),le=Xt(y.right,0),K=Xt(y.top,0),Z=Xt(y.bottom,0);w?te=E-2*(W!==0||le!==0?W+le:Xt(y.left,y.right)):B=b-2*(K!==0||Z!==0?K+Z:Xt(y.top,y.bottom))}await h({...e,availableWidth:te,availableHeight:B});const G=await u.getDimensions(d.floating);return E!==G.width||b!==G.height?{reset:{rects:!0}}:{}}}};function mc(){return typeof window<"u"}function Js(t){return Gv(t)?(t.nodeName||"").toLowerCase():"#document"}function Jt(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Zn(t){var e;return(e=(Gv(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function Gv(t){return mc()?t instanceof Node||t instanceof Jt(t).Node:!1}function Nn(t){return mc()?t instanceof Element||t instanceof Jt(t).Element:!1}function Jn(t){return mc()?t instanceof HTMLElement||t instanceof Jt(t).HTMLElement:!1}function cy(t){return!mc()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Jt(t).ShadowRoot}const XN=new Set(["inline","contents"]);function la(t){const{overflow:e,overflowX:r,overflowY:s,display:i}=Rn(t);return/auto|scroll|overlay|hidden|clip/.test(e+s+r)&&!XN.has(i)}const JN=new Set(["table","td","th"]);function ZN(t){return JN.has(Js(t))}const e2=[":popover-open",":modal"];function gc(t){return e2.some(e=>{try{return t.matches(e)}catch{return!1}})}const t2=["transform","translate","scale","rotate","perspective"],n2=["transform","translate","scale","rotate","perspective","filter"],r2=["paint","layout","strict","content"];function Vf(t){const e=Wf(),r=Nn(t)?Rn(t):t;return t2.some(s=>r[s]?r[s]!=="none":!1)||(r.containerType?r.containerType!=="normal":!1)||!e&&(r.backdropFilter?r.backdropFilter!=="none":!1)||!e&&(r.filter?r.filter!=="none":!1)||n2.some(s=>(r.willChange||"").includes(s))||r2.some(s=>(r.contain||"").includes(s))}function o2(t){let e=ro(t);for(;Jn(e)&&!Vs(e);){if(Vf(e))return e;if(gc(e))return null;e=ro(e)}return null}function Wf(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const s2=new Set(["html","body","#document"]);function Vs(t){return s2.has(Js(t))}function Rn(t){return Jt(t).getComputedStyle(t)}function yc(t){return Nn(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ro(t){if(Js(t)==="html")return t;const e=t.assignedSlot||t.parentNode||cy(t)&&t.host||Zn(t);return cy(e)?e.host:e}function Xv(t){const e=ro(t);return Vs(e)?t.ownerDocument?t.ownerDocument.body:t.body:Jn(e)&&la(e)?e:Xv(e)}function Yi(t,e,r){var s;e===void 0&&(e=[]),r===void 0&&(r=!0);const i=Xv(t),l=i===((s=t.ownerDocument)==null?void 0:s.body),u=Jt(i);if(l){const d=df(u);return e.concat(u,u.visualViewport||[],la(i)?i:[],d&&r?Yi(d):[])}return e.concat(i,Yi(i,[],r))}function df(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Jv(t){const e=Rn(t);let r=parseFloat(e.width)||0,s=parseFloat(e.height)||0;const i=Jn(t),l=i?t.offsetWidth:r,u=i?t.offsetHeight:s,d=Jl(r)!==l||Jl(s)!==u;return d&&(r=l,s=u),{width:r,height:s,$:d}}function Kf(t){return Nn(t)?t:t.contextElement}function Ts(t){const e=Kf(t);if(!Jn(e))return Xn(1);const r=e.getBoundingClientRect(),{width:s,height:i,$:l}=Jv(e);let u=(l?Jl(r.width):r.width)/s,d=(l?Jl(r.height):r.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!d||!Number.isFinite(d))&&(d=1),{x:u,y:d}}const i2=Xn(0);function Zv(t){const e=Jt(t);return!Wf()||!e.visualViewport?i2:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function a2(t,e,r){return e===void 0&&(e=!1),!r||e&&r!==Jt(t)?!1:e}function Bo(t,e,r,s){e===void 0&&(e=!1),r===void 0&&(r=!1);const i=t.getBoundingClientRect(),l=Kf(t);let u=Xn(1);e&&(s?Nn(s)&&(u=Ts(s)):u=Ts(t));const d=a2(l,r,s)?Zv(l):Xn(0);let h=(i.left+d.x)/u.x,p=(i.top+d.y)/u.y,y=i.width/u.x,v=i.height/u.y;if(l){const C=Jt(l),w=s&&Nn(s)?Jt(s):s;let E=C,b=df(E);for(;b&&s&&w!==E;){const k=Ts(b),T=b.getBoundingClientRect(),j=Rn(b),_=T.left+(b.clientLeft+parseFloat(j.paddingLeft))*k.x,A=T.top+(b.clientTop+parseFloat(j.paddingTop))*k.y;h*=k.x,p*=k.y,y*=k.x,v*=k.y,h+=_,p+=A,E=Jt(b),b=df(E)}}return ec({width:y,height:v,x:h,y:p})}function vc(t,e){const r=yc(t).scrollLeft;return e?e.left+r:Bo(Zn(t)).left+r}function ex(t,e){const r=t.getBoundingClientRect(),s=r.left+e.scrollLeft-vc(t,r),i=r.top+e.scrollTop;return{x:s,y:i}}function l2(t){let{elements:e,rect:r,offsetParent:s,strategy:i}=t;const l=i==="fixed",u=Zn(s),d=e?gc(e.floating):!1;if(s===u||d&&l)return r;let h={scrollLeft:0,scrollTop:0},p=Xn(1);const y=Xn(0),v=Jn(s);if((v||!v&&!l)&&((Js(s)!=="body"||la(u))&&(h=yc(s)),Jn(s))){const w=Bo(s);p=Ts(s),y.x=w.x+s.clientLeft,y.y=w.y+s.clientTop}const C=u&&!v&&!l?ex(u,h):Xn(0);return{width:r.width*p.x,height:r.height*p.y,x:r.x*p.x-h.scrollLeft*p.x+y.x+C.x,y:r.y*p.y-h.scrollTop*p.y+y.y+C.y}}function c2(t){return Array.from(t.getClientRects())}function u2(t){const e=Zn(t),r=yc(t),s=t.ownerDocument.body,i=Xt(e.scrollWidth,e.clientWidth,s.scrollWidth,s.clientWidth),l=Xt(e.scrollHeight,e.clientHeight,s.scrollHeight,s.clientHeight);let u=-r.scrollLeft+vc(t);const d=-r.scrollTop;return Rn(s).direction==="rtl"&&(u+=Xt(e.clientWidth,s.clientWidth)-i),{width:i,height:l,x:u,y:d}}const uy=25;function d2(t,e){const r=Jt(t),s=Zn(t),i=r.visualViewport;let l=s.clientWidth,u=s.clientHeight,d=0,h=0;if(i){l=i.width,u=i.height;const y=Wf();(!y||y&&e==="fixed")&&(d=i.offsetLeft,h=i.offsetTop)}const p=vc(s);if(p<=0){const y=s.ownerDocument,v=y.body,C=getComputedStyle(v),w=y.compatMode==="CSS1Compat"&&parseFloat(C.marginLeft)+parseFloat(C.marginRight)||0,E=Math.abs(s.clientWidth-v.clientWidth-w);E<=uy&&(l-=E)}else p<=uy&&(l+=p);return{width:l,height:u,x:d,y:h}}const f2=new Set(["absolute","fixed"]);function h2(t,e){const r=Bo(t,!0,e==="fixed"),s=r.top+t.clientTop,i=r.left+t.clientLeft,l=Jn(t)?Ts(t):Xn(1),u=t.clientWidth*l.x,d=t.clientHeight*l.y,h=i*l.x,p=s*l.y;return{width:u,height:d,x:h,y:p}}function dy(t,e,r){let s;if(e==="viewport")s=d2(t,r);else if(e==="document")s=u2(Zn(t));else if(Nn(e))s=h2(e,r);else{const i=Zv(t);s={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return ec(s)}function tx(t,e){const r=ro(t);return r===e||!Nn(r)||Vs(r)?!1:Rn(r).position==="fixed"||tx(r,e)}function p2(t,e){const r=e.get(t);if(r)return r;let s=Yi(t,[],!1).filter(d=>Nn(d)&&Js(d)!=="body"),i=null;const l=Rn(t).position==="fixed";let u=l?ro(t):t;for(;Nn(u)&&!Vs(u);){const d=Rn(u),h=Vf(u);!h&&d.position==="fixed"&&(i=null),(l?!h&&!i:!h&&d.position==="static"&&!!i&&f2.has(i.position)||la(u)&&!h&&tx(t,u))?s=s.filter(y=>y!==u):i=d,u=ro(u)}return e.set(t,s),s}function m2(t){let{element:e,boundary:r,rootBoundary:s,strategy:i}=t;const u=[...r==="clippingAncestors"?gc(e)?[]:p2(e,this._c):[].concat(r),s],d=u[0],h=u.reduce((p,y)=>{const v=dy(e,y,i);return p.top=Xt(v.top,p.top),p.right=no(v.right,p.right),p.bottom=no(v.bottom,p.bottom),p.left=Xt(v.left,p.left),p},dy(e,d,i));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function g2(t){const{width:e,height:r}=Jv(t);return{width:e,height:r}}function y2(t,e,r){const s=Jn(e),i=Zn(e),l=r==="fixed",u=Bo(t,!0,l,e);let d={scrollLeft:0,scrollTop:0};const h=Xn(0);function p(){h.x=vc(i)}if(s||!s&&!l)if((Js(e)!=="body"||la(i))&&(d=yc(e)),s){const w=Bo(e,!0,l,e);h.x=w.x+e.clientLeft,h.y=w.y+e.clientTop}else i&&p();l&&!s&&i&&p();const y=i&&!s&&!l?ex(i,d):Xn(0),v=u.left+d.scrollLeft-h.x-y.x,C=u.top+d.scrollTop-h.y-y.y;return{x:v,y:C,width:u.width,height:u.height}}function Nd(t){return Rn(t).position==="static"}function fy(t,e){if(!Jn(t)||Rn(t).position==="fixed")return null;if(e)return e(t);let r=t.offsetParent;return Zn(t)===r&&(r=r.ownerDocument.body),r}function nx(t,e){const r=Jt(t);if(gc(t))return r;if(!Jn(t)){let i=ro(t);for(;i&&!Vs(i);){if(Nn(i)&&!Nd(i))return i;i=ro(i)}return r}let s=fy(t,e);for(;s&&ZN(s)&&Nd(s);)s=fy(s,e);return s&&Vs(s)&&Nd(s)&&!Vf(s)?r:s||o2(t)||r}const v2=async function(t){const e=this.getOffsetParent||nx,r=this.getDimensions,s=await r(t.floating);return{reference:y2(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:s.width,height:s.height}}};function x2(t){return Rn(t).direction==="rtl"}const w2={convertOffsetParentRelativeRectToViewportRelativeRect:l2,getDocumentElement:Zn,getClippingRect:m2,getOffsetParent:nx,getElementRects:v2,getClientRects:c2,getDimensions:g2,getScale:Ts,isElement:Nn,isRTL:x2};function rx(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function b2(t,e){let r=null,s;const i=Zn(t);function l(){var d;clearTimeout(s),(d=r)==null||d.disconnect(),r=null}function u(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),l();const p=t.getBoundingClientRect(),{left:y,top:v,width:C,height:w}=p;if(d||e(),!C||!w)return;const E=Tl(v),b=Tl(i.clientWidth-(y+C)),k=Tl(i.clientHeight-(v+w)),T=Tl(y),_={rootMargin:-E+"px "+-b+"px "+-k+"px "+-T+"px",threshold:Xt(0,no(1,h))||1};let A=!0;function F(V){const B=V[0].intersectionRatio;if(B!==h){if(!A)return u();B?u(!1,B):s=setTimeout(()=>{u(!1,1e-7)},1e3)}B===1&&!rx(p,t.getBoundingClientRect())&&u(),A=!1}try{r=new IntersectionObserver(F,{..._,root:i.ownerDocument})}catch{r=new IntersectionObserver(F,_)}r.observe(t)}return u(!0),l}function S2(t,e,r,s){s===void 0&&(s={});const{ancestorScroll:i=!0,ancestorResize:l=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=s,p=Kf(t),y=i||l?[...p?Yi(p):[],...Yi(e)]:[];y.forEach(T=>{i&&T.addEventListener("scroll",r,{passive:!0}),l&&T.addEventListener("resize",r)});const v=p&&d?b2(p,r):null;let C=-1,w=null;u&&(w=new ResizeObserver(T=>{let[j]=T;j&&j.target===p&&w&&(w.unobserve(e),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var _;(_=w)==null||_.observe(e)})),r()}),p&&!h&&w.observe(p),w.observe(e));let E,b=h?Bo(t):null;h&&k();function k(){const T=Bo(t);b&&!rx(b,T)&&r(),b=T,E=requestAnimationFrame(k)}return r(),()=>{var T;y.forEach(j=>{i&&j.removeEventListener("scroll",r),l&&j.removeEventListener("resize",r)}),v==null||v(),(T=w)==null||T.disconnect(),w=null,h&&cancelAnimationFrame(E)}}const C2=qN,E2=QN,k2=VN,N2=GN,R2=WN,hy=HN,P2=YN,T2=(t,e,r)=>{const s=new Map,i={platform:w2,...r},l={...i.platform,_c:s};return BN(t,e,{...i,platform:l})};var O2=typeof document<"u",j2=function(){},$l=O2?x.useLayoutEffect:j2;function tc(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let r,s,i;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(r=t.length,r!==e.length)return!1;for(s=r;s--!==0;)if(!tc(t[s],e[s]))return!1;return!0}if(i=Object.keys(t),r=i.length,r!==Object.keys(e).length)return!1;for(s=r;s--!==0;)if(!{}.hasOwnProperty.call(e,i[s]))return!1;for(s=r;s--!==0;){const l=i[s];if(!(l==="_owner"&&t.$$typeof)&&!tc(t[l],e[l]))return!1}return!0}return t!==t&&e!==e}function ox(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function py(t,e){const r=ox(t);return Math.round(e*r)/r}function Rd(t){const e=x.useRef(t);return $l(()=>{e.current=t}),e}function _2(t){t===void 0&&(t={});const{placement:e="bottom",strategy:r="absolute",middleware:s=[],platform:i,elements:{reference:l,floating:u}={},transform:d=!0,whileElementsMounted:h,open:p}=t,[y,v]=x.useState({x:0,y:0,strategy:r,placement:e,middlewareData:{},isPositioned:!1}),[C,w]=x.useState(s);tc(C,s)||w(s);const[E,b]=x.useState(null),[k,T]=x.useState(null),j=x.useCallback($=>{$!==V.current&&(V.current=$,b($))},[]),_=x.useCallback($=>{$!==B.current&&(B.current=$,T($))},[]),A=l||E,F=u||k,V=x.useRef(null),B=x.useRef(null),te=x.useRef(y),G=h!=null,W=Rd(h),le=Rd(i),K=Rd(p),Z=x.useCallback(()=>{if(!V.current||!B.current)return;const $={placement:e,strategy:r,middleware:C};le.current&&($.platform=le.current),T2(V.current,B.current,$).then(H=>{const Q={...H,isPositioned:K.current!==!1};J.current&&!tc(te.current,Q)&&(te.current=Q,na.flushSync(()=>{v(Q)}))})},[C,e,r,le,K]);$l(()=>{p===!1&&te.current.isPositioned&&(te.current.isPositioned=!1,v($=>({...$,isPositioned:!1})))},[p]);const J=x.useRef(!1);$l(()=>(J.current=!0,()=>{J.current=!1}),[]),$l(()=>{if(A&&(V.current=A),F&&(B.current=F),A&&F){if(W.current)return W.current(A,F,Z);Z()}},[A,F,Z,W,G]);const de=x.useMemo(()=>({reference:V,floating:B,setReference:j,setFloating:_}),[j,_]),ne=x.useMemo(()=>({reference:A,floating:F}),[A,F]),se=x.useMemo(()=>{const $={position:r,left:0,top:0};if(!ne.floating)return $;const H=py(ne.floating,y.x),Q=py(ne.floating,y.y);return d?{...$,transform:"translate("+H+"px, "+Q+"px)",...ox(ne.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:H,top:Q}},[r,d,ne.floating,y.x,y.y]);return x.useMemo(()=>({...y,update:Z,refs:de,elements:ne,floatingStyles:se}),[y,Z,de,ne,se])}const A2=t=>{function e(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:t,fn(r){const{element:s,padding:i}=typeof t=="function"?t(r):t;return s&&e(s)?s.current!=null?hy({element:s.current,padding:i}).fn(r):{}:s?hy({element:s,padding:i}).fn(r):{}}}},L2=(t,e)=>({...C2(t),options:[t,e]}),I2=(t,e)=>({...E2(t),options:[t,e]}),D2=(t,e)=>({...P2(t),options:[t,e]}),M2=(t,e)=>({...k2(t),options:[t,e]}),F2=(t,e)=>({...N2(t),options:[t,e]}),z2=(t,e)=>({...R2(t),options:[t,e]}),$2=(t,e)=>({...A2(t),options:[t,e]});var U2="Arrow",sx=x.forwardRef((t,e)=>{const{children:r,width:s=10,height:i=5,...l}=t;return g.jsx(ze.svg,{...l,ref:e,width:s,height:i,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:t.asChild?r:g.jsx("polygon",{points:"0,0 30,0 15,10"})})});sx.displayName=U2;var B2=sx;function H2(t){const[e,r]=x.useState(void 0);return mt(()=>{if(t){r({width:t.offsetWidth,height:t.offsetHeight});const s=new ResizeObserver(i=>{if(!Array.isArray(i)||!i.length)return;const l=i[0];let u,d;if("borderBoxSize"in l){const h=l.borderBoxSize,p=Array.isArray(h)?h[0]:h;u=p.inlineSize,d=p.blockSize}else u=t.offsetWidth,d=t.offsetHeight;r({width:u,height:d})});return s.observe(t,{box:"border-box"}),()=>s.unobserve(t)}else r(void 0)},[t]),e}var qf="Popper",[ix,ax]=aa(qf),[V2,lx]=ix(qf),cx=t=>{const{__scopePopper:e,children:r}=t,[s,i]=x.useState(null);return g.jsx(V2,{scope:e,anchor:s,onAnchorChange:i,children:r})};cx.displayName=qf;var ux="PopperAnchor",dx=x.forwardRef((t,e)=>{const{__scopePopper:r,virtualRef:s,...i}=t,l=lx(ux,r),u=x.useRef(null),d=Ve(e,u),h=x.useRef(null);return x.useEffect(()=>{const p=h.current;h.current=(s==null?void 0:s.current)||u.current,p!==h.current&&l.onAnchorChange(h.current)}),s?null:g.jsx(ze.div,{...i,ref:d})});dx.displayName=ux;var Qf="PopperContent",[W2,K2]=ix(Qf),fx=x.forwardRef((t,e)=>{var ee,ye,Se,Ne,Oe,_e;const{__scopePopper:r,side:s="bottom",sideOffset:i=0,align:l="center",alignOffset:u=0,arrowPadding:d=0,avoidCollisions:h=!0,collisionBoundary:p=[],collisionPadding:y=0,sticky:v="partial",hideWhenDetached:C=!1,updatePositionStrategy:w="optimized",onPlaced:E,...b}=t,k=lx(Qf,r),[T,j]=x.useState(null),_=Ve(e,et=>j(et)),[A,F]=x.useState(null),V=H2(A),B=(V==null?void 0:V.width)??0,te=(V==null?void 0:V.height)??0,G=s+(l!=="center"?"-"+l:""),W=typeof y=="number"?y:{top:0,right:0,bottom:0,left:0,...y},le=Array.isArray(p)?p:[p],K=le.length>0,Z={padding:W,boundary:le.filter(Q2),altBoundary:K},{refs:J,floatingStyles:de,placement:ne,isPositioned:se,middlewareData:$}=_2({strategy:"fixed",placement:G,whileElementsMounted:(...et)=>S2(...et,{animationFrame:w==="always"}),elements:{reference:k.anchor},middleware:[L2({mainAxis:i+te,alignmentAxis:u}),h&&I2({mainAxis:!0,crossAxis:!1,limiter:v==="partial"?D2():void 0,...Z}),h&&M2({...Z}),F2({...Z,apply:({elements:et,rects:gt,availableWidth:On,availableHeight:dn})=>{const{width:fn,height:wr}=gt.reference,jn=et.floating.style;jn.setProperty("--radix-popper-available-width",`${On}px`),jn.setProperty("--radix-popper-available-height",`${dn}px`),jn.setProperty("--radix-popper-anchor-width",`${fn}px`),jn.setProperty("--radix-popper-anchor-height",`${wr}px`)}}),A&&$2({element:A,padding:d}),Y2({arrowWidth:B,arrowHeight:te}),C&&z2({strategy:"referenceHidden",...Z})]}),[H,Q]=mx(ne),P=Vt(E);mt(()=>{se&&(P==null||P())},[se,P]);const M=(ee=$.arrow)==null?void 0:ee.x,ie=(ye=$.arrow)==null?void 0:ye.y,ae=((Se=$.arrow)==null?void 0:Se.centerOffset)!==0,[me,be]=x.useState();return mt(()=>{T&&be(window.getComputedStyle(T).zIndex)},[T]),g.jsx("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...de,transform:se?de.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:me,"--radix-popper-transform-origin":[(Ne=$.transformOrigin)==null?void 0:Ne.x,(Oe=$.transformOrigin)==null?void 0:Oe.y].join(" "),...((_e=$.hide)==null?void 0:_e.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:t.dir,children:g.jsx(W2,{scope:r,placedSide:H,onArrowChange:F,arrowX:M,arrowY:ie,shouldHideArrow:ae,children:g.jsx(ze.div,{"data-side":H,"data-align":Q,...b,ref:_,style:{...b.style,animation:se?void 0:"none"}})})})});fx.displayName=Qf;var hx="PopperArrow",q2={top:"bottom",right:"left",bottom:"top",left:"right"},px=x.forwardRef(function(e,r){const{__scopePopper:s,...i}=e,l=K2(hx,s),u=q2[l.placedSide];return g.jsx("span",{ref:l.onArrowChange,style:{position:"absolute",left:l.arrowX,top:l.arrowY,[u]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[l.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[l.placedSide],visibility:l.shouldHideArrow?"hidden":void 0},children:g.jsx(B2,{...i,ref:r,style:{...i.style,display:"block"}})})});px.displayName=hx;function Q2(t){return t!==null}var Y2=t=>({name:"transformOrigin",options:t,fn(e){var k,T,j;const{placement:r,rects:s,middlewareData:i}=e,u=((k=i.arrow)==null?void 0:k.centerOffset)!==0,d=u?0:t.arrowWidth,h=u?0:t.arrowHeight,[p,y]=mx(r),v={start:"0%",center:"50%",end:"100%"}[y],C=(((T=i.arrow)==null?void 0:T.x)??0)+d/2,w=(((j=i.arrow)==null?void 0:j.y)??0)+h/2;let E="",b="";return p==="bottom"?(E=u?v:`${C}px`,b=`${-h}px`):p==="top"?(E=u?v:`${C}px`,b=`${s.floating.height+h}px`):p==="right"?(E=`${-h}px`,b=u?v:`${w}px`):p==="left"&&(E=`${s.floating.width+h}px`,b=u?v:`${w}px`),{data:{x:E,y:b}}}});function mx(t){const[e,r="center"]=t.split("-");return[e,r]}var G2=cx,X2=dx,J2=fx,Z2=px,eR="Portal",Yf=x.forwardRef((t,e)=>{var d;const{container:r,...s}=t,[i,l]=x.useState(!1);mt(()=>l(!0),[]);const u=r||i&&((d=globalThis==null?void 0:globalThis.document)==null?void 0:d.body);return u?Jy.createPortal(g.jsx(ze.div,{...s,ref:e}),u):null});Yf.displayName=eR;function tR(t){const e=nR(t),r=x.forwardRef((s,i)=>{const{children:l,...u}=s,d=x.Children.toArray(l),h=d.find(oR);if(h){const p=h.props.children,y=d.map(v=>v===h?x.Children.count(p)>1?x.Children.only(null):x.isValidElement(p)?p.props.children:null:v);return g.jsx(e,{...u,ref:i,children:x.isValidElement(p)?x.cloneElement(p,void 0,y):null})}return g.jsx(e,{...u,ref:i,children:l})});return r.displayName=`${t}.Slot`,r}function nR(t){const e=x.forwardRef((r,s)=>{const{children:i,...l}=r;if(x.isValidElement(i)){const u=iR(i),d=sR(l,i.props);return i.type!==x.Fragment&&(d.ref=s?Gs(s,u):u),x.cloneElement(i,d)}return x.Children.count(i)>1?x.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var rR=Symbol("radix.slottable");function oR(t){return x.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===rR}function sR(t,e){const r={...e};for(const s in e){const i=t[s],l=e[s];/^on[A-Z]/.test(s)?i&&l?r[s]=(...d)=>{const h=l(...d);return i(...d),h}:i&&(r[s]=i):s==="style"?r[s]={...i,...l}:s==="className"&&(r[s]=[i,l].filter(Boolean).join(" "))}return{...t,...r}}function iR(t){var s,i;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var aR=Sf[" useInsertionEffect ".trim().toString()]||mt;function ff({prop:t,defaultProp:e,onChange:r=()=>{},caller:s}){const[i,l,u]=lR({defaultProp:e,onChange:r}),d=t!==void 0,h=d?t:i;{const y=x.useRef(t!==void 0);x.useEffect(()=>{const v=y.current;v!==d&&console.warn(`${s} is changing from ${v?"controlled":"uncontrolled"} to ${d?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),y.current=d},[d,s])}const p=x.useCallback(y=>{var v;if(d){const C=cR(y)?y(t):y;C!==t&&((v=u.current)==null||v.call(u,C))}else l(y)},[d,t,l,u]);return[h,p]}function lR({defaultProp:t,onChange:e}){const[r,s]=x.useState(t),i=x.useRef(r),l=x.useRef(e);return aR(()=>{l.current=e},[e]),x.useEffect(()=>{var u;i.current!==r&&((u=l.current)==null||u.call(l,r),i.current=r)},[r,i]),[r,s,l]}function cR(t){return typeof t=="function"}function uR(t){const e=x.useRef({value:t,previous:t});return x.useMemo(()=>(e.current.value!==t&&(e.current.previous=e.current.value,e.current.value=t),e.current.previous),[t])}var gx=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),dR="VisuallyHidden",fR=x.forwardRef((t,e)=>g.jsx(ze.span,{...t,ref:e,style:{...gx,...t.style}}));fR.displayName=dR;var hR=function(t){if(typeof document>"u")return null;var e=Array.isArray(t)?t[0]:t;return e.ownerDocument.body},ws=new WeakMap,Ol=new WeakMap,jl={},Pd=0,yx=function(t){return t&&(t.host||yx(t.parentNode))},pR=function(t,e){return e.map(function(r){if(t.contains(r))return r;var s=yx(r);return s&&t.contains(s)?s:(console.error("aria-hidden",r,"in not contained inside",t,". Doing nothing"),null)}).filter(function(r){return!!r})},mR=function(t,e,r,s){var i=pR(e,Array.isArray(t)?t:[t]);jl[r]||(jl[r]=new WeakMap);var l=jl[r],u=[],d=new Set,h=new Set(i),p=function(v){!v||d.has(v)||(d.add(v),p(v.parentNode))};i.forEach(p);var y=function(v){!v||h.has(v)||Array.prototype.forEach.call(v.children,function(C){if(d.has(C))y(C);else try{var w=C.getAttribute(s),E=w!==null&&w!=="false",b=(ws.get(C)||0)+1,k=(l.get(C)||0)+1;ws.set(C,b),l.set(C,k),u.push(C),b===1&&E&&Ol.set(C,!0),k===1&&C.setAttribute(r,"true"),E||C.setAttribute(s,"true")}catch(T){console.error("aria-hidden: cannot operate on ",C,T)}})};return y(e),d.clear(),Pd++,function(){u.forEach(function(v){var C=ws.get(v)-1,w=l.get(v)-1;ws.set(v,C),l.set(v,w),C||(Ol.has(v)||v.removeAttribute(s),Ol.delete(v)),w||v.removeAttribute(r)}),Pd--,Pd||(ws=new WeakMap,ws=new WeakMap,Ol=new WeakMap,jl={})}},vx=function(t,e,r){r===void 0&&(r="data-aria-hidden");var s=Array.from(Array.isArray(t)?t:[t]),i=hR(t);return i?(s.push.apply(s,Array.from(i.querySelectorAll("[aria-live], script"))),mR(s,i,r,"aria-hidden")):function(){return null}},qn=function(){return qn=Object.assign||function(e){for(var r,s=1,i=arguments.length;s"u")return _R;var e=AR(t),r=document.documentElement.clientWidth,s=window.innerWidth;return{left:e[0],top:e[1],right:e[2],gap:Math.max(0,s-r+e[2]-e[0])}},IR=Sx(),Os="data-scroll-locked",DR=function(t,e,r,s){var i=t.left,l=t.top,u=t.right,d=t.gap;return r===void 0&&(r="margin"),` .`.concat(yR,` { overflow: hidden `).concat(s,`; padding-right: `).concat(d,"px ").concat(s,`; } body[`).concat(Os,`] { overflow: hidden `).concat(s,`; overscroll-behavior: contain; `).concat([e&&"position: relative ".concat(s,";"),r==="margin"&&` padding-left: `.concat(i,`px; padding-top: `).concat(l,`px; padding-right: `).concat(u,`px; margin-left:0; margin-top:0; margin-right: `).concat(d,"px ").concat(s,`; `),r==="padding"&&"padding-right: ".concat(d,"px ").concat(s,";")].filter(Boolean).join(""),` } .`).concat(Ul,` { right: `).concat(d,"px ").concat(s,`; } .`).concat(Bl,` { margin-right: `).concat(d,"px ").concat(s,`; } .`).concat(Ul," .").concat(Ul,` { right: 0 `).concat(s,`; } .`).concat(Bl," .").concat(Bl,` { margin-right: 0 `).concat(s,`; } body[`).concat(Os,`] { `).concat(vR,": ").concat(d,`px; } `)},gy=function(){var t=parseInt(document.body.getAttribute(Os)||"0",10);return isFinite(t)?t:0},MR=function(){x.useEffect(function(){return document.body.setAttribute(Os,(gy()+1).toString()),function(){var t=gy()-1;t<=0?document.body.removeAttribute(Os):document.body.setAttribute(Os,t.toString())}},[])},FR=function(t){var e=t.noRelative,r=t.noImportant,s=t.gapMode,i=s===void 0?"margin":s;MR();var l=x.useMemo(function(){return LR(i)},[i]);return x.createElement(IR,{styles:DR(l,!e,i,r?"":"!important")})},hf=!1;if(typeof window<"u")try{var _l=Object.defineProperty({},"passive",{get:function(){return hf=!0,!0}});window.addEventListener("test",_l,_l),window.removeEventListener("test",_l,_l)}catch{hf=!1}var bs=hf?{passive:!1}:!1,zR=function(t){return t.tagName==="TEXTAREA"},Cx=function(t,e){if(!(t instanceof Element))return!1;var r=window.getComputedStyle(t);return r[e]!=="hidden"&&!(r.overflowY===r.overflowX&&!zR(t)&&r[e]==="visible")},$R=function(t){return Cx(t,"overflowY")},UR=function(t){return Cx(t,"overflowX")},yy=function(t,e){var r=e.ownerDocument,s=e;do{typeof ShadowRoot<"u"&&s instanceof ShadowRoot&&(s=s.host);var i=Ex(t,s);if(i){var l=kx(t,s),u=l[1],d=l[2];if(u>d)return!0}s=s.parentNode}while(s&&s!==r.body);return!1},BR=function(t){var e=t.scrollTop,r=t.scrollHeight,s=t.clientHeight;return[e,r,s]},HR=function(t){var e=t.scrollLeft,r=t.scrollWidth,s=t.clientWidth;return[e,r,s]},Ex=function(t,e){return t==="v"?$R(e):UR(e)},kx=function(t,e){return t==="v"?BR(e):HR(e)},VR=function(t,e){return t==="h"&&e==="rtl"?-1:1},WR=function(t,e,r,s,i){var l=VR(t,window.getComputedStyle(e).direction),u=l*s,d=r.target,h=e.contains(d),p=!1,y=u>0,v=0,C=0;do{if(!d)break;var w=kx(t,d),E=w[0],b=w[1],k=w[2],T=b-k-l*E;(E||T)&&Ex(t,d)&&(v+=T,C+=E);var j=d.parentNode;d=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!h&&d!==document.body||h&&(e.contains(d)||e===d));return(y&&Math.abs(v)<1||!y&&Math.abs(C)<1)&&(p=!0),p},Al=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},vy=function(t){return[t.deltaX,t.deltaY]},xy=function(t){return t&&"current"in t?t.current:t},KR=function(t,e){return t[0]===e[0]&&t[1]===e[1]},qR=function(t){return` .block-interactivity-`.concat(t,` {pointer-events: none;} .allow-interactivity-`).concat(t,` {pointer-events: all;} `)},QR=0,Ss=[];function YR(t){var e=x.useRef([]),r=x.useRef([0,0]),s=x.useRef(),i=x.useState(QR++)[0],l=x.useState(Sx)[0],u=x.useRef(t);x.useEffect(function(){u.current=t},[t]),x.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(i));var b=gR([t.lockRef.current],(t.shards||[]).map(xy),!0).filter(Boolean);return b.forEach(function(k){return k.classList.add("allow-interactivity-".concat(i))}),function(){document.body.classList.remove("block-interactivity-".concat(i)),b.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(i))})}}},[t.inert,t.lockRef.current,t.shards]);var d=x.useCallback(function(b,k){if("touches"in b&&b.touches.length===2||b.type==="wheel"&&b.ctrlKey)return!u.current.allowPinchZoom;var T=Al(b),j=r.current,_="deltaX"in b?b.deltaX:j[0]-T[0],A="deltaY"in b?b.deltaY:j[1]-T[1],F,V=b.target,B=Math.abs(_)>Math.abs(A)?"h":"v";if("touches"in b&&B==="h"&&V.type==="range")return!1;var te=window.getSelection(),G=te&&te.anchorNode,W=G?G===V||G.contains(V):!1;if(W)return!1;var le=yy(B,V);if(!le)return!0;if(le?F=B:(F=B==="v"?"h":"v",le=yy(B,V)),!le)return!1;if(!s.current&&"changedTouches"in b&&(_||A)&&(s.current=F),!F)return!0;var K=s.current||F;return WR(K,k,b,K==="h"?_:A)},[]),h=x.useCallback(function(b){var k=b;if(!(!Ss.length||Ss[Ss.length-1]!==l)){var T="deltaY"in k?vy(k):Al(k),j=e.current.filter(function(F){return F.name===k.type&&(F.target===k.target||k.target===F.shadowParent)&&KR(F.delta,T)})[0];if(j&&j.should){k.cancelable&&k.preventDefault();return}if(!j){var _=(u.current.shards||[]).map(xy).filter(Boolean).filter(function(F){return F.contains(k.target)}),A=_.length>0?d(k,_[0]):!u.current.noIsolation;A&&k.cancelable&&k.preventDefault()}}},[]),p=x.useCallback(function(b,k,T,j){var _={name:b,delta:k,target:T,should:j,shadowParent:GR(T)};e.current.push(_),setTimeout(function(){e.current=e.current.filter(function(A){return A!==_})},1)},[]),y=x.useCallback(function(b){r.current=Al(b),s.current=void 0},[]),v=x.useCallback(function(b){p(b.type,vy(b),b.target,d(b,t.lockRef.current))},[]),C=x.useCallback(function(b){p(b.type,Al(b),b.target,d(b,t.lockRef.current))},[]);x.useEffect(function(){return Ss.push(l),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:C}),document.addEventListener("wheel",h,bs),document.addEventListener("touchmove",h,bs),document.addEventListener("touchstart",y,bs),function(){Ss=Ss.filter(function(b){return b!==l}),document.removeEventListener("wheel",h,bs),document.removeEventListener("touchmove",h,bs),document.removeEventListener("touchstart",y,bs)}},[]);var w=t.removeScrollBar,E=t.inert;return x.createElement(x.Fragment,null,E?x.createElement(l,{styles:qR(i)}):null,w?x.createElement(FR,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function GR(t){for(var e=null;t!==null;)t instanceof ShadowRoot&&(e=t.host,t=t.host),t=t.parentNode;return e}const XR=kR(bx,YR);var Gf=x.forwardRef(function(t,e){return x.createElement(xc,qn({},t,{ref:e,sideCar:XR}))});Gf.classNames=xc.classNames;var JR=[" ","Enter","ArrowUp","ArrowDown"],ZR=[" ","Enter"],Ho="Select",[wc,bc,eP]=oN(Ho),[Zs]=aa(Ho,[eP,ax]),Sc=ax(),[tP,oo]=Zs(Ho),[nP,rP]=Zs(Ho),Nx=t=>{const{__scopeSelect:e,children:r,open:s,defaultOpen:i,onOpenChange:l,value:u,defaultValue:d,onValueChange:h,dir:p,name:y,autoComplete:v,disabled:C,required:w,form:E}=t,b=Sc(e),[k,T]=x.useState(null),[j,_]=x.useState(null),[A,F]=x.useState(!1),V=Hv(p),[B,te]=ff({prop:s,defaultProp:i??!1,onChange:l,caller:Ho}),[G,W]=ff({prop:u,defaultProp:d,onChange:h,caller:Ho}),le=x.useRef(null),K=k?E||!!k.closest("form"):!0,[Z,J]=x.useState(new Set),de=Array.from(Z).map(ne=>ne.props.value).join(";");return g.jsx(G2,{...b,children:g.jsxs(tP,{required:w,scope:e,trigger:k,onTriggerChange:T,valueNode:j,onValueNodeChange:_,valueNodeHasChildren:A,onValueNodeHasChildrenChange:F,contentId:Ps(),value:G,onValueChange:W,open:B,onOpenChange:te,dir:V,triggerPointerDownPosRef:le,disabled:C,children:[g.jsx(wc.Provider,{scope:e,children:g.jsx(nP,{scope:t.__scopeSelect,onNativeOptionAdd:x.useCallback(ne=>{J(se=>new Set(se).add(ne))},[]),onNativeOptionRemove:x.useCallback(ne=>{J(se=>{const $=new Set(se);return $.delete(ne),$})},[]),children:r})}),K?g.jsxs(Gx,{"aria-hidden":!0,required:w,tabIndex:-1,name:y,autoComplete:v,value:G,onChange:ne=>W(ne.target.value),disabled:C,form:E,children:[G===void 0?g.jsx("option",{value:""}):null,Array.from(Z)]},de):null]})})};Nx.displayName=Ho;var Rx="SelectTrigger",Px=x.forwardRef((t,e)=>{const{__scopeSelect:r,disabled:s=!1,...i}=t,l=Sc(r),u=oo(Rx,r),d=u.disabled||s,h=Ve(e,u.onTriggerChange),p=bc(r),y=x.useRef("touch"),[v,C,w]=Jx(b=>{const k=p().filter(_=>!_.disabled),T=k.find(_=>_.value===u.value),j=Zx(k,b,T);j!==void 0&&u.onValueChange(j.value)}),E=b=>{d||(u.onOpenChange(!0),w()),b&&(u.triggerPointerDownPosRef.current={x:Math.round(b.pageX),y:Math.round(b.pageY)})};return g.jsx(X2,{asChild:!0,...l,children:g.jsx(ze.button,{type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":Xx(u.value)?"":void 0,...i,ref:h,onClick:Me(i.onClick,b=>{b.currentTarget.focus(),y.current!=="mouse"&&E(b)}),onPointerDown:Me(i.onPointerDown,b=>{y.current=b.pointerType;const k=b.target;k.hasPointerCapture(b.pointerId)&&k.releasePointerCapture(b.pointerId),b.button===0&&b.ctrlKey===!1&&b.pointerType==="mouse"&&(E(b),b.preventDefault())}),onKeyDown:Me(i.onKeyDown,b=>{const k=v.current!=="";!(b.ctrlKey||b.altKey||b.metaKey)&&b.key.length===1&&C(b.key),!(k&&b.key===" ")&&JR.includes(b.key)&&(E(),b.preventDefault())})})})});Px.displayName=Rx;var Tx="SelectValue",Ox=x.forwardRef((t,e)=>{const{__scopeSelect:r,className:s,style:i,children:l,placeholder:u="",...d}=t,h=oo(Tx,r),{onValueNodeHasChildrenChange:p}=h,y=l!==void 0,v=Ve(e,h.onValueNodeChange);return mt(()=>{p(y)},[p,y]),g.jsx(ze.span,{...d,ref:v,style:{pointerEvents:"none"},children:Xx(h.value)?g.jsx(g.Fragment,{children:u}):l})});Ox.displayName=Tx;var oP="SelectIcon",jx=x.forwardRef((t,e)=>{const{__scopeSelect:r,children:s,...i}=t;return g.jsx(ze.span,{"aria-hidden":!0,...i,ref:e,children:s||"▼"})});jx.displayName=oP;var sP="SelectPortal",_x=t=>g.jsx(Yf,{asChild:!0,...t});_x.displayName=sP;var Vo="SelectContent",Ax=x.forwardRef((t,e)=>{const r=oo(Vo,t.__scopeSelect),[s,i]=x.useState();if(mt(()=>{i(new DocumentFragment)},[]),!r.open){const l=s;return l?na.createPortal(g.jsx(Lx,{scope:t.__scopeSelect,children:g.jsx(wc.Slot,{scope:t.__scopeSelect,children:g.jsx("div",{children:t.children})})}),l):null}return g.jsx(Ix,{...t,ref:e})});Ax.displayName=Vo;var Cn=10,[Lx,so]=Zs(Vo),iP="SelectContentImpl",aP=tR("SelectContent.RemoveScroll"),Ix=x.forwardRef((t,e)=>{const{__scopeSelect:r,position:s="item-aligned",onCloseAutoFocus:i,onEscapeKeyDown:l,onPointerDownOutside:u,side:d,sideOffset:h,align:p,alignOffset:y,arrowPadding:v,collisionBoundary:C,collisionPadding:w,sticky:E,hideWhenDetached:b,avoidCollisions:k,...T}=t,j=oo(Vo,r),[_,A]=x.useState(null),[F,V]=x.useState(null),B=Ve(e,ee=>A(ee)),[te,G]=x.useState(null),[W,le]=x.useState(null),K=bc(r),[Z,J]=x.useState(!1),de=x.useRef(!1);x.useEffect(()=>{if(_)return vx(_)},[_]),Kv();const ne=x.useCallback(ee=>{const[ye,...Se]=K().map(_e=>_e.ref.current),[Ne]=Se.slice(-1),Oe=document.activeElement;for(const _e of ee)if(_e===Oe||(_e==null||_e.scrollIntoView({block:"nearest"}),_e===ye&&F&&(F.scrollTop=0),_e===Ne&&F&&(F.scrollTop=F.scrollHeight),_e==null||_e.focus(),document.activeElement!==Oe))return},[K,F]),se=x.useCallback(()=>ne([te,_]),[ne,te,_]);x.useEffect(()=>{Z&&se()},[Z,se]);const{onOpenChange:$,triggerPointerDownPosRef:H}=j;x.useEffect(()=>{if(_){let ee={x:0,y:0};const ye=Ne=>{var Oe,_e;ee={x:Math.abs(Math.round(Ne.pageX)-(((Oe=H.current)==null?void 0:Oe.x)??0)),y:Math.abs(Math.round(Ne.pageY)-(((_e=H.current)==null?void 0:_e.y)??0))}},Se=Ne=>{ee.x<=10&&ee.y<=10?Ne.preventDefault():_.contains(Ne.target)||$(!1),document.removeEventListener("pointermove",ye),H.current=null};return H.current!==null&&(document.addEventListener("pointermove",ye),document.addEventListener("pointerup",Se,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ye),document.removeEventListener("pointerup",Se,{capture:!0})}}},[_,$,H]),x.useEffect(()=>{const ee=()=>$(!1);return window.addEventListener("blur",ee),window.addEventListener("resize",ee),()=>{window.removeEventListener("blur",ee),window.removeEventListener("resize",ee)}},[$]);const[Q,P]=Jx(ee=>{const ye=K().filter(Oe=>!Oe.disabled),Se=ye.find(Oe=>Oe.ref.current===document.activeElement),Ne=Zx(ye,ee,Se);Ne&&setTimeout(()=>Ne.ref.current.focus())}),M=x.useCallback((ee,ye,Se)=>{const Ne=!de.current&&!Se;(j.value!==void 0&&j.value===ye||Ne)&&(G(ee),Ne&&(de.current=!0))},[j.value]),ie=x.useCallback(()=>_==null?void 0:_.focus(),[_]),ae=x.useCallback((ee,ye,Se)=>{const Ne=!de.current&&!Se;(j.value!==void 0&&j.value===ye||Ne)&&le(ee)},[j.value]),me=s==="popper"?pf:Dx,be=me===pf?{side:d,sideOffset:h,align:p,alignOffset:y,arrowPadding:v,collisionBoundary:C,collisionPadding:w,sticky:E,hideWhenDetached:b,avoidCollisions:k}:{};return g.jsx(Lx,{scope:r,content:_,viewport:F,onViewportChange:V,itemRefCallback:M,selectedItem:te,onItemLeave:ie,itemTextRefCallback:ae,focusSelectedItem:se,selectedItemText:W,position:s,isPositioned:Z,searchRef:Q,children:g.jsx(Gf,{as:aP,allowPinchZoom:!0,children:g.jsx($f,{asChild:!0,trapped:j.open,onMountAutoFocus:ee=>{ee.preventDefault()},onUnmountAutoFocus:Me(i,ee=>{var ye;(ye=j.trigger)==null||ye.focus({preventScroll:!0}),ee.preventDefault()}),children:g.jsx(zf,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:ee=>ee.preventDefault(),onDismiss:()=>j.onOpenChange(!1),children:g.jsx(me,{role:"listbox",id:j.contentId,"data-state":j.open?"open":"closed",dir:j.dir,onContextMenu:ee=>ee.preventDefault(),...T,...be,onPlaced:()=>J(!0),ref:B,style:{display:"flex",flexDirection:"column",outline:"none",...T.style},onKeyDown:Me(T.onKeyDown,ee=>{const ye=ee.ctrlKey||ee.altKey||ee.metaKey;if(ee.key==="Tab"&&ee.preventDefault(),!ye&&ee.key.length===1&&P(ee.key),["ArrowUp","ArrowDown","Home","End"].includes(ee.key)){let Ne=K().filter(Oe=>!Oe.disabled).map(Oe=>Oe.ref.current);if(["ArrowUp","End"].includes(ee.key)&&(Ne=Ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(ee.key)){const Oe=ee.target,_e=Ne.indexOf(Oe);Ne=Ne.slice(_e+1)}setTimeout(()=>ne(Ne)),ee.preventDefault()}})})})})})})});Ix.displayName=iP;var lP="SelectItemAlignedPosition",Dx=x.forwardRef((t,e)=>{const{__scopeSelect:r,onPlaced:s,...i}=t,l=oo(Vo,r),u=so(Vo,r),[d,h]=x.useState(null),[p,y]=x.useState(null),v=Ve(e,B=>y(B)),C=bc(r),w=x.useRef(!1),E=x.useRef(!0),{viewport:b,selectedItem:k,selectedItemText:T,focusSelectedItem:j}=u,_=x.useCallback(()=>{if(l.trigger&&l.valueNode&&d&&p&&b&&k&&T){const B=l.trigger.getBoundingClientRect(),te=p.getBoundingClientRect(),G=l.valueNode.getBoundingClientRect(),W=T.getBoundingClientRect();if(l.dir!=="rtl"){const Oe=W.left-te.left,_e=G.left-Oe,et=B.left-_e,gt=B.width+et,On=Math.max(gt,te.width),dn=window.innerWidth-Cn,fn=af(_e,[Cn,Math.max(Cn,dn-On)]);d.style.minWidth=gt+"px",d.style.left=fn+"px"}else{const Oe=te.right-W.right,_e=window.innerWidth-G.right-Oe,et=window.innerWidth-B.right-_e,gt=B.width+et,On=Math.max(gt,te.width),dn=window.innerWidth-Cn,fn=af(_e,[Cn,Math.max(Cn,dn-On)]);d.style.minWidth=gt+"px",d.style.right=fn+"px"}const le=C(),K=window.innerHeight-Cn*2,Z=b.scrollHeight,J=window.getComputedStyle(p),de=parseInt(J.borderTopWidth,10),ne=parseInt(J.paddingTop,10),se=parseInt(J.borderBottomWidth,10),$=parseInt(J.paddingBottom,10),H=de+ne+Z+$+se,Q=Math.min(k.offsetHeight*5,H),P=window.getComputedStyle(b),M=parseInt(P.paddingTop,10),ie=parseInt(P.paddingBottom,10),ae=B.top+B.height/2-Cn,me=K-ae,be=k.offsetHeight/2,ee=k.offsetTop+be,ye=de+ne+ee,Se=H-ye;if(ye<=ae){const Oe=le.length>0&&k===le[le.length-1].ref.current;d.style.bottom="0px";const _e=p.clientHeight-b.offsetTop-b.offsetHeight,et=Math.max(me,be+(Oe?ie:0)+_e+se),gt=ye+et;d.style.height=gt+"px"}else{const Oe=le.length>0&&k===le[0].ref.current;d.style.top="0px";const et=Math.max(ae,de+b.offsetTop+(Oe?M:0)+be)+Se;d.style.height=et+"px",b.scrollTop=ye-ae+b.offsetTop}d.style.margin=`${Cn}px 0`,d.style.minHeight=Q+"px",d.style.maxHeight=K+"px",s==null||s(),requestAnimationFrame(()=>w.current=!0)}},[C,l.trigger,l.valueNode,d,p,b,k,T,l.dir,s]);mt(()=>_(),[_]);const[A,F]=x.useState();mt(()=>{p&&F(window.getComputedStyle(p).zIndex)},[p]);const V=x.useCallback(B=>{B&&E.current===!0&&(_(),j==null||j(),E.current=!1)},[_,j]);return g.jsx(uP,{scope:r,contentWrapper:d,shouldExpandOnScrollRef:w,onScrollButtonChange:V,children:g.jsx("div",{ref:h,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:A},children:g.jsx(ze.div,{...i,ref:v,style:{boxSizing:"border-box",maxHeight:"100%",...i.style}})})})});Dx.displayName=lP;var cP="SelectPopperPosition",pf=x.forwardRef((t,e)=>{const{__scopeSelect:r,align:s="start",collisionPadding:i=Cn,...l}=t,u=Sc(r);return g.jsx(J2,{...u,...l,ref:e,align:s,collisionPadding:i,style:{boxSizing:"border-box",...l.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});pf.displayName=cP;var[uP,Xf]=Zs(Vo,{}),mf="SelectViewport",Mx=x.forwardRef((t,e)=>{const{__scopeSelect:r,nonce:s,...i}=t,l=so(mf,r),u=Xf(mf,r),d=Ve(e,l.onViewportChange),h=x.useRef(0);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:s}),g.jsx(wc.Slot,{scope:r,children:g.jsx(ze.div,{"data-radix-select-viewport":"",role:"presentation",...i,ref:d,style:{position:"relative",flex:1,overflow:"hidden auto",...i.style},onScroll:Me(i.onScroll,p=>{const y=p.currentTarget,{contentWrapper:v,shouldExpandOnScrollRef:C}=u;if(C!=null&&C.current&&v){const w=Math.abs(h.current-y.scrollTop);if(w>0){const E=window.innerHeight-Cn*2,b=parseFloat(v.style.minHeight),k=parseFloat(v.style.height),T=Math.max(b,k);if(T0?A:0,v.style.justifyContent="flex-end")}}}h.current=y.scrollTop})})})]})});Mx.displayName=mf;var Fx="SelectGroup",[dP,fP]=Zs(Fx),hP=x.forwardRef((t,e)=>{const{__scopeSelect:r,...s}=t,i=Ps();return g.jsx(dP,{scope:r,id:i,children:g.jsx(ze.div,{role:"group","aria-labelledby":i,...s,ref:e})})});hP.displayName=Fx;var zx="SelectLabel",$x=x.forwardRef((t,e)=>{const{__scopeSelect:r,...s}=t,i=fP(zx,r);return g.jsx(ze.div,{id:i.id,...s,ref:e})});$x.displayName=zx;var nc="SelectItem",[pP,Ux]=Zs(nc),Bx=x.forwardRef((t,e)=>{const{__scopeSelect:r,value:s,disabled:i=!1,textValue:l,...u}=t,d=oo(nc,r),h=so(nc,r),p=d.value===s,[y,v]=x.useState(l??""),[C,w]=x.useState(!1),E=Ve(e,j=>{var _;return(_=h.itemRefCallback)==null?void 0:_.call(h,j,s,i)}),b=Ps(),k=x.useRef("touch"),T=()=>{i||(d.onValueChange(s),d.onOpenChange(!1))};if(s==="")throw new Error("A must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return g.jsx(pP,{scope:r,value:s,disabled:i,textId:b,isSelected:p,onItemTextChange:x.useCallback(j=>{v(_=>_||((j==null?void 0:j.textContent)??"").trim())},[]),children:g.jsx(wc.ItemSlot,{scope:r,value:s,disabled:i,textValue:y,children:g.jsx(ze.div,{role:"option","aria-labelledby":b,"data-highlighted":C?"":void 0,"aria-selected":p&&C,"data-state":p?"checked":"unchecked","aria-disabled":i||void 0,"data-disabled":i?"":void 0,tabIndex:i?void 0:-1,...u,ref:E,onFocus:Me(u.onFocus,()=>w(!0)),onBlur:Me(u.onBlur,()=>w(!1)),onClick:Me(u.onClick,()=>{k.current!=="mouse"&&T()}),onPointerUp:Me(u.onPointerUp,()=>{k.current==="mouse"&&T()}),onPointerDown:Me(u.onPointerDown,j=>{k.current=j.pointerType}),onPointerMove:Me(u.onPointerMove,j=>{var _;k.current=j.pointerType,i?(_=h.onItemLeave)==null||_.call(h):k.current==="mouse"&&j.currentTarget.focus({preventScroll:!0})}),onPointerLeave:Me(u.onPointerLeave,j=>{var _;j.currentTarget===document.activeElement&&((_=h.onItemLeave)==null||_.call(h))}),onKeyDown:Me(u.onKeyDown,j=>{var A;((A=h.searchRef)==null?void 0:A.current)!==""&&j.key===" "||(ZR.includes(j.key)&&T(),j.key===" "&&j.preventDefault())})})})})});Bx.displayName=nc;var Bi="SelectItemText",Hx=x.forwardRef((t,e)=>{const{__scopeSelect:r,className:s,style:i,...l}=t,u=oo(Bi,r),d=so(Bi,r),h=Ux(Bi,r),p=rP(Bi,r),[y,v]=x.useState(null),C=Ve(e,T=>v(T),h.onItemTextChange,T=>{var j;return(j=d.itemTextRefCallback)==null?void 0:j.call(d,T,h.value,h.disabled)}),w=y==null?void 0:y.textContent,E=x.useMemo(()=>g.jsx("option",{value:h.value,disabled:h.disabled,children:w},h.value),[h.disabled,h.value,w]),{onNativeOptionAdd:b,onNativeOptionRemove:k}=p;return mt(()=>(b(E),()=>k(E)),[b,k,E]),g.jsxs(g.Fragment,{children:[g.jsx(ze.span,{id:h.textId,...l,ref:C}),h.isSelected&&u.valueNode&&!u.valueNodeHasChildren?na.createPortal(l.children,u.valueNode):null]})});Hx.displayName=Bi;var Vx="SelectItemIndicator",Wx=x.forwardRef((t,e)=>{const{__scopeSelect:r,...s}=t;return Ux(Vx,r).isSelected?g.jsx(ze.span,{"aria-hidden":!0,...s,ref:e}):null});Wx.displayName=Vx;var gf="SelectScrollUpButton",Kx=x.forwardRef((t,e)=>{const r=so(gf,t.__scopeSelect),s=Xf(gf,t.__scopeSelect),[i,l]=x.useState(!1),u=Ve(e,s.onScrollButtonChange);return mt(()=>{if(r.viewport&&r.isPositioned){let d=function(){const p=h.scrollTop>0;l(p)};const h=r.viewport;return d(),h.addEventListener("scroll",d),()=>h.removeEventListener("scroll",d)}},[r.viewport,r.isPositioned]),i?g.jsx(Qx,{...t,ref:u,onAutoScroll:()=>{const{viewport:d,selectedItem:h}=r;d&&h&&(d.scrollTop=d.scrollTop-h.offsetHeight)}}):null});Kx.displayName=gf;var yf="SelectScrollDownButton",qx=x.forwardRef((t,e)=>{const r=so(yf,t.__scopeSelect),s=Xf(yf,t.__scopeSelect),[i,l]=x.useState(!1),u=Ve(e,s.onScrollButtonChange);return mt(()=>{if(r.viewport&&r.isPositioned){let d=function(){const p=h.scrollHeight-h.clientHeight,y=Math.ceil(h.scrollTop)h.removeEventListener("scroll",d)}},[r.viewport,r.isPositioned]),i?g.jsx(Qx,{...t,ref:u,onAutoScroll:()=>{const{viewport:d,selectedItem:h}=r;d&&h&&(d.scrollTop=d.scrollTop+h.offsetHeight)}}):null});qx.displayName=yf;var Qx=x.forwardRef((t,e)=>{const{__scopeSelect:r,onAutoScroll:s,...i}=t,l=so("SelectScrollButton",r),u=x.useRef(null),d=bc(r),h=x.useCallback(()=>{u.current!==null&&(window.clearInterval(u.current),u.current=null)},[]);return x.useEffect(()=>()=>h(),[h]),mt(()=>{var y;const p=d().find(v=>v.ref.current===document.activeElement);(y=p==null?void 0:p.ref.current)==null||y.scrollIntoView({block:"nearest"})},[d]),g.jsx(ze.div,{"aria-hidden":!0,...i,ref:e,style:{flexShrink:0,...i.style},onPointerDown:Me(i.onPointerDown,()=>{u.current===null&&(u.current=window.setInterval(s,50))}),onPointerMove:Me(i.onPointerMove,()=>{var p;(p=l.onItemLeave)==null||p.call(l),u.current===null&&(u.current=window.setInterval(s,50))}),onPointerLeave:Me(i.onPointerLeave,()=>{h()})})}),mP="SelectSeparator",Yx=x.forwardRef((t,e)=>{const{__scopeSelect:r,...s}=t;return g.jsx(ze.div,{"aria-hidden":!0,...s,ref:e})});Yx.displayName=mP;var vf="SelectArrow",gP=x.forwardRef((t,e)=>{const{__scopeSelect:r,...s}=t,i=Sc(r),l=oo(vf,r),u=so(vf,r);return l.open&&u.position==="popper"?g.jsx(Z2,{...i,...s,ref:e}):null});gP.displayName=vf;var yP="SelectBubbleInput",Gx=x.forwardRef(({__scopeSelect:t,value:e,...r},s)=>{const i=x.useRef(null),l=Ve(s,i),u=uR(e);return x.useEffect(()=>{const d=i.current;if(!d)return;const h=window.HTMLSelectElement.prototype,y=Object.getOwnPropertyDescriptor(h,"value").set;if(u!==e&&y){const v=new Event("change",{bubbles:!0});y.call(d,e),d.dispatchEvent(v)}},[u,e]),g.jsx(ze.select,{...r,style:{...gx,...r.style},ref:l,defaultValue:e})});Gx.displayName=yP;function Xx(t){return t===""||t===void 0}function Jx(t){const e=Vt(t),r=x.useRef(""),s=x.useRef(0),i=x.useCallback(u=>{const d=r.current+u;e(d),(function h(p){r.current=p,window.clearTimeout(s.current),p!==""&&(s.current=window.setTimeout(()=>h(""),1e3))})(d)},[e]),l=x.useCallback(()=>{r.current="",window.clearTimeout(s.current)},[]);return x.useEffect(()=>()=>window.clearTimeout(s.current),[]),[r,i,l]}function Zx(t,e,r){const i=e.length>1&&Array.from(e).every(p=>p===e[0])?e[0]:e,l=r?t.indexOf(r):-1;let u=vP(t,Math.max(l,0));i.length===1&&(u=u.filter(p=>p!==r));const h=u.find(p=>p.textValue.toLowerCase().startsWith(i.toLowerCase()));return h!==r?h:void 0}function vP(t,e){return t.map((r,s)=>t[(e+s)%t.length])}var xP=Nx,e0=Px,wP=Ox,bP=jx,SP=_x,t0=Ax,CP=Mx,n0=$x,r0=Bx,EP=Hx,kP=Wx,o0=Kx,s0=qx,i0=Yx;const ks=xP,Ns=wP,ko=x.forwardRef(({className:t,children:e,...r},s)=>g.jsxs(e0,{ref:s,className:Be("flex h-9 w-full items-center justify-between rounded-md border border-cyber-border-DEFAULT bg-cyber-bg-tertiary px-3 py-2 text-sm font-mono text-cyber-text-primary ring-offset-background placeholder:text-cyber-text-muted focus:outline-none focus:border-cyber-neon-cyan focus:shadow-[0_0_10px_rgb(var(--cyber-neon-cyan)/0.2)] disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1 transition-all",t),...r,children:[e,g.jsx(bP,{asChild:!0,children:g.jsx(Pf,{className:"h-4 w-4 text-cyber-text-muted"})})]}));ko.displayName=e0.displayName;const a0=x.forwardRef(({className:t,...e},r)=>g.jsx(o0,{ref:r,className:Be("flex cursor-default items-center justify-center py-1 text-cyber-text-muted",t),...e,children:g.jsx(ev,{className:"h-4 w-4"})}));a0.displayName=o0.displayName;const l0=x.forwardRef(({className:t,...e},r)=>g.jsx(s0,{ref:r,className:Be("flex cursor-default items-center justify-center py-1 text-cyber-text-muted",t),...e,children:g.jsx(Pf,{className:"h-4 w-4"})}));l0.displayName=s0.displayName;const No=x.forwardRef(({className:t,children:e,position:r="popper",...s},i)=>g.jsx(SP,{children:g.jsxs(t0,{ref:i,className:Be("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border border-cyber-border-DEFAULT bg-cyber-bg-panel text-cyber-text-primary shadow-[0_0_20px_rgba(0,0,0,0.5)] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t),position:r,...s,children:[g.jsx(a0,{}),g.jsx(CP,{className:Be("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:e}),g.jsx(l0,{})]})}));No.displayName=t0.displayName;const NP=x.forwardRef(({className:t,...e},r)=>g.jsx(n0,{ref:r,className:Be("py-1.5 pl-8 pr-2 text-sm font-semibold text-cyber-neon-cyan",t),...e}));NP.displayName=n0.displayName;const Ro=x.forwardRef(({className:t,children:e,...r},s)=>g.jsxs(r0,{ref:s,className:Be("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm font-mono outline-none focus:bg-cyber-neon-cyan/20 focus:text-cyber-neon-cyan data-[disabled]:pointer-events-none data-[disabled]:opacity-50 transition-colors",t),...r,children:[g.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:g.jsx(kP,{children:g.jsx(Rf,{className:"h-4 w-4 text-cyber-neon-cyan"})})}),g.jsx(EP,{children:e})]}));Ro.displayName=r0.displayName;const RP=x.forwardRef(({className:t,...e},r)=>g.jsx(i0,{ref:r,className:Be("-mx-1 my-1 h-px bg-cyber-border-DEFAULT",t),...e}));RP.displayName=i0.displayName;const _d=[{code:"zh-CN",label:"中文"},{code:"en-US",label:"EN"}];function PP(){const{i18n:t}=Zt(),e=_d.find(r=>r.code===t.language)||_d[0];return g.jsxs(ks,{value:t.language,onValueChange:r=>t.changeLanguage(r),children:[g.jsxs(ko,{className:"w-20 h-7 text-xs font-mono border-cyber-border-subtle bg-cyber-bg-tertiary/50 hover:border-cyber-neon-cyan/50 transition-colors",children:[g.jsx(rv,{className:"w-3 h-3 mr-1 text-cyber-text-secondary"}),g.jsx(Ns,{children:e.label})]}),g.jsx(No,{children:_d.map(r=>g.jsx(Ro,{value:r.code,className:"text-xs font-mono",children:r.label},r.code))})]})}const c0="mediacrawler_theme";function TP(){return typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function OP(){if(typeof window>"u")return"light";const t=localStorage.getItem(c0);return t&&["light","dark","system"].includes(t)?t:"light"}function Jf(t){const e=document.documentElement;t==="dark"?e.classList.add("dark"):e.classList.remove("dark")}function u0(t){return t==="system"?TP():t}const d0=OP(),f0=u0(d0);typeof window<"u"&&Jf(f0);const xf=yv(t=>({theme:d0,resolvedTheme:f0,setTheme:e=>{const r=u0(e);localStorage.setItem(c0,e),Jf(r),t({theme:e,resolvedTheme:r})}}));typeof window<"u"&&window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",t=>{if(xf.getState().theme==="system"){const r=t.matches?"dark":"light";Jf(r),xf.setState({resolvedTheme:r})}});const Ad=[{value:"light",label:"Light",icon:BS},{value:"dark",label:"Dark",icon:DS},{value:"system",label:"Auto",icon:IS}];function jP(){const{theme:t,setTheme:e}=xf(),r=Ad.find(i=>i.value===t)||Ad[0],s=r.icon;return g.jsxs(ks,{value:t,onValueChange:i=>e(i),children:[g.jsxs(ko,{className:"w-20 h-7 text-xs font-mono border-cyber-border-subtle bg-cyber-bg-tertiary/50 hover:border-cyber-neon-cyan/50 transition-colors",children:[g.jsx(s,{className:"w-3 h-3 mr-1 text-cyber-text-secondary"}),g.jsx(Ns,{children:r.label})]}),g.jsx(No,{children:Ad.map(({value:i,label:l,icon:u})=>g.jsx(Ro,{value:i,className:"text-xs font-mono",children:g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(u,{className:"w-3 h-3"}),l]})},i))})]})}function _P({onShowDisclaimer:t}){const{t:e}=Zt(),{t:r}=Zt("license"),s=jt(l=>l.status);Kk();const i=s==="running";return g.jsx("header",{className:"h-14 flex-shrink-0 glass-panel border-b border-cyber-border-subtle relative z-10",children:g.jsxs("div",{className:"h-full px-4 flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(SS,{className:"w-5 h-5 text-cyber-neon-cyan"}),g.jsx("span",{className:"font-mono font-bold text-cyber-text-primary tracking-wider text-sm",children:"MediaCrawler"}),g.jsxs("a",{href:"https://github.com/NanmiCoder/MediaCrawler",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 px-2 py-1 rounded-md border border-cyber-border-subtle hover:border-cyber-neon-cyan hover:shadow-glow-cyan-sm transition-all bg-cyber-bg-tertiary",children:[g.jsx(OS,{className:"w-4 h-4 text-cyber-text-secondary"}),g.jsx("span",{className:"text-xs font-mono text-cyber-text-secondary",children:"Star"})]}),i&&g.jsx(qi,{variant:"running",className:"text-[10px]",children:e("status.active")}),i&&g.jsx("span",{className:"w-2 h-2 bg-cyber-neon-green rounded-full shadow-glow-green-sm animate-pulse-fast"})]}),g.jsxs("button",{onClick:t,className:"flex items-center gap-3 px-4 py-1.5 rounded-lg border border-cyber-neon-orange/50 bg-cyber-neon-orange/10 hover:bg-cyber-neon-orange/20 transition-all cursor-pointer",children:[g.jsx(Of,{className:"w-4 h-4 text-cyber-neon-orange flex-shrink-0"}),g.jsxs("div",{className:"flex items-center gap-4 text-xs font-mono",children:[g.jsxs("span",{className:"text-cyber-neon-orange",children:[g.jsx("span",{className:"text-cyber-neon-pink font-bold",children:"1."})," ",r("content.line1")]}),g.jsxs("span",{className:"text-cyber-neon-orange",children:[g.jsx("span",{className:"text-cyber-neon-pink font-bold",children:"2."})," ",r("content.line2")]})]})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(jP,{}),g.jsx(PP,{}),g.jsxs("div",{className:"hidden lg:flex items-center gap-2 text-xs font-mono",children:[g.jsxs("span",{className:"text-cyber-text-muted",children:[e("sidebar.api"),":"]}),g.jsx("span",{className:"text-cyber-neon-green",children:"v1.0.0"}),g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx(VS,{className:"w-3 h-3 text-cyber-text-secondary"}),g.jsx("span",{className:"text-cyber-text-secondary",children:e("sidebar.local")}),g.jsx("span",{className:"status-dot status-dot-online"})]})]})]})]})})}const wy={info:{text:"text-cyber-neon-cyan",bg:"bg-cyber-neon-cyan/10",glow:"shadow-[0_0_3px_rgba(0,255,255,0.3)]"},success:{text:"text-cyber-neon-green",bg:"bg-cyber-neon-green/10",glow:"shadow-[0_0_3px_rgba(0,255,65,0.3)]"},warning:{text:"text-cyber-neon-orange",bg:"bg-cyber-neon-orange/10",glow:"shadow-[0_0_3px_rgba(255,152,0,0.3)]"},error:{text:"text-cyber-neon-pink",bg:"bg-cyber-neon-pink/10",glow:"shadow-[0_0_3px_rgba(255,0,128,0.3)]"},debug:{text:"text-[#8b949e]",bg:"bg-[#21262d]",glow:""}},AP={info:"DATA",success:"OK",warning:"WARN",error:"ERR",debug:"DBG"};function LP({log:t}){const e=wy[t.level]||wy.info;return g.jsxs("div",{className:"flex gap-2 text-xs leading-relaxed font-mono group hover:bg-[#21262d]/50 px-1 -mx-1 rounded transition-colors",children:[g.jsxs("span",{className:"text-[#8b949e] flex-shrink-0 opacity-60 group-hover:opacity-100 transition-opacity",children:["[",t.timestamp,"]"]}),g.jsxs("span",{className:Be("flex-shrink-0 w-14 px-1 rounded text-center",e.bg,e.text,e.glow),children:["[",AP[t.level],"]"]}),g.jsx("span",{className:Be("break-all",e.text),children:t.message})]})}var IP=Symbol.for("react.lazy"),rc=Sf[" use ".trim().toString()];function DP(t){return typeof t=="object"&&t!==null&&"then"in t}function h0(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===IP&&"_payload"in t&&DP(t._payload)}function p0(t){const e=FP(t),r=x.forwardRef((s,i)=>{let{children:l,...u}=s;h0(l)&&typeof rc=="function"&&(l=rc(l._payload));const d=x.Children.toArray(l),h=d.find($P);if(h){const p=h.props.children,y=d.map(v=>v===h?x.Children.count(p)>1?x.Children.only(null):x.isValidElement(p)?p.props.children:null:v);return g.jsx(e,{...u,ref:i,children:x.isValidElement(p)?x.cloneElement(p,void 0,y):null})}return g.jsx(e,{...u,ref:i,children:l})});return r.displayName=`${t}.Slot`,r}var MP=p0("Slot");function FP(t){const e=x.forwardRef((r,s)=>{let{children:i,...l}=r;if(h0(i)&&typeof rc=="function"&&(i=rc(i._payload)),x.isValidElement(i)){const u=BP(i),d=UP(l,i.props);return i.type!==x.Fragment&&(d.ref=s?Gs(s,u):u),x.cloneElement(i,d)}return x.Children.count(i)>1?x.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var zP=Symbol("radix.slottable");function $P(t){return x.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===zP}function UP(t,e){const r={...e};for(const s in e){const i=t[s],l=e[s];/^on[A-Z]/.test(s)?i&&l?r[s]=(...d)=>{const h=l(...d);return i(...d),h}:i&&(r[s]=i):s==="style"?r[s]={...i,...l}:s==="className"&&(r[s]=[i,l].filter(Boolean).join(" "))}return{...t,...r}}function BP(t){var s,i;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}const HP=_f("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-cyber-neon-cyan disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-cyber-neon-cyan/20 text-cyber-neon-cyan border border-cyber-neon-cyan/50 hover:bg-cyber-neon-cyan/30 hover:shadow-glow-cyan-sm active:scale-95",destructive:"bg-cyber-neon-pink/20 text-cyber-neon-pink border border-cyber-neon-pink/50 hover:bg-cyber-neon-pink/30 hover:shadow-glow-pink-sm active:scale-95",outline:"border border-cyber-border-DEFAULT bg-transparent hover:bg-cyber-bg-tertiary hover:border-cyber-neon-cyan/50 hover:text-cyber-neon-cyan",secondary:"bg-cyber-neon-green/20 text-cyber-neon-green border border-cyber-neon-green/50 hover:bg-cyber-neon-green/30 hover:shadow-glow-green-sm active:scale-95",ghost:"hover:bg-cyber-bg-tertiary hover:text-cyber-neon-cyan",link:"text-cyber-neon-cyan underline-offset-4 hover:underline",glow:"bg-cyber-neon-cyan/20 text-cyber-neon-cyan border border-cyber-neon-cyan/50 shadow-glow-cyan-sm hover:shadow-glow-cyan hover:bg-cyber-neon-cyan/30 active:scale-95"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-12 rounded-md px-8 text-base",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ct=x.forwardRef(({className:t,variant:e,size:r,asChild:s=!1,...i},l)=>{const u=s?MP:"button";return g.jsx(u,{className:Be(HP({variant:e,size:r,className:t})),ref:l,...i})});Ct.displayName="Button";function VP(t,e){return x.useReducer((r,s)=>e[r][s]??r,t)}var io=t=>{const{present:e,children:r}=t,s=WP(e),i=typeof r=="function"?r({present:s.isPresent}):x.Children.only(r),l=Ve(s.ref,KP(i));return typeof r=="function"||s.isPresent?x.cloneElement(i,{ref:l}):null};io.displayName="Presence";function WP(t){const[e,r]=x.useState(),s=x.useRef(null),i=x.useRef(t),l=x.useRef("none"),u=t?"mounted":"unmounted",[d,h]=VP(u,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return x.useEffect(()=>{const p=Ll(s.current);l.current=d==="mounted"?p:"none"},[d]),mt(()=>{const p=s.current,y=i.current;if(y!==t){const C=l.current,w=Ll(p);t?h("MOUNT"):w==="none"||(p==null?void 0:p.display)==="none"?h("UNMOUNT"):h(y&&C!==w?"ANIMATION_OUT":"UNMOUNT"),i.current=t}},[t,h]),mt(()=>{if(e){let p;const y=e.ownerDocument.defaultView??window,v=w=>{const b=Ll(s.current).includes(CSS.escape(w.animationName));if(w.target===e&&b&&(h("ANIMATION_END"),!i.current)){const k=e.style.animationFillMode;e.style.animationFillMode="forwards",p=y.setTimeout(()=>{e.style.animationFillMode==="forwards"&&(e.style.animationFillMode=k)})}},C=w=>{w.target===e&&(l.current=Ll(s.current))};return e.addEventListener("animationstart",C),e.addEventListener("animationcancel",v),e.addEventListener("animationend",v),()=>{y.clearTimeout(p),e.removeEventListener("animationstart",C),e.removeEventListener("animationcancel",v),e.removeEventListener("animationend",v)}}else h("ANIMATION_END")},[e,h]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:x.useCallback(p=>{s.current=p?getComputedStyle(p):null,r(p)},[])}}function Ll(t){return(t==null?void 0:t.animationName)||"none"}function KP(t){var s,i;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}function qP(t){const e=QP(t),r=x.forwardRef((s,i)=>{const{children:l,...u}=s,d=x.Children.toArray(l),h=d.find(GP);if(h){const p=h.props.children,y=d.map(v=>v===h?x.Children.count(p)>1?x.Children.only(null):x.isValidElement(p)?p.props.children:null:v);return g.jsx(e,{...u,ref:i,children:x.isValidElement(p)?x.cloneElement(p,void 0,y):null})}return g.jsx(e,{...u,ref:i,children:l})});return r.displayName=`${t}.Slot`,r}function QP(t){const e=x.forwardRef((r,s)=>{const{children:i,...l}=r;if(x.isValidElement(i)){const u=JP(i),d=XP(l,i.props);return i.type!==x.Fragment&&(d.ref=s?Gs(s,u):u),x.cloneElement(i,d)}return x.Children.count(i)>1?x.Children.only(null):null});return e.displayName=`${t}.SlotClone`,e}var YP=Symbol("radix.slottable");function GP(t){return x.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===YP}function XP(t,e){const r={...e};for(const s in e){const i=t[s],l=e[s];/^on[A-Z]/.test(s)?i&&l?r[s]=(...d)=>{const h=l(...d);return i(...d),h}:i&&(r[s]=i):s==="style"?r[s]={...i,...l}:s==="className"&&(r[s]=[i,l].filter(Boolean).join(" "))}return{...t,...r}}function JP(t){var s,i;let e=(s=Object.getOwnPropertyDescriptor(t.props,"ref"))==null?void 0:s.get,r=e&&"isReactWarning"in e&&e.isReactWarning;return r?t.ref:(e=(i=Object.getOwnPropertyDescriptor(t,"ref"))==null?void 0:i.get,r=e&&"isReactWarning"in e&&e.isReactWarning,r?t.props.ref:t.props.ref||t.ref)}var Cc="Dialog",[m0]=aa(Cc),[ZP,Tn]=m0(Cc),g0=t=>{const{__scopeDialog:e,children:r,open:s,defaultOpen:i,onOpenChange:l,modal:u=!0}=t,d=x.useRef(null),h=x.useRef(null),[p,y]=ff({prop:s,defaultProp:i??!1,onChange:l,caller:Cc});return g.jsx(ZP,{scope:e,triggerRef:d,contentRef:h,contentId:Ps(),titleId:Ps(),descriptionId:Ps(),open:p,onOpenChange:y,onOpenToggle:x.useCallback(()=>y(v=>!v),[y]),modal:u,children:r})};g0.displayName=Cc;var y0="DialogTrigger",v0=x.forwardRef((t,e)=>{const{__scopeDialog:r,...s}=t,i=Tn(y0,r),l=Ve(e,i.triggerRef);return g.jsx(ze.button,{type:"button","aria-haspopup":"dialog","aria-expanded":i.open,"aria-controls":i.contentId,"data-state":th(i.open),...s,ref:l,onClick:Me(t.onClick,i.onOpenToggle)})});v0.displayName=y0;var Zf="DialogPortal",[eT,x0]=m0(Zf,{forceMount:void 0}),w0=t=>{const{__scopeDialog:e,forceMount:r,children:s,container:i}=t,l=Tn(Zf,e);return g.jsx(eT,{scope:e,forceMount:r,children:x.Children.map(s,u=>g.jsx(io,{present:r||l.open,children:g.jsx(Yf,{asChild:!0,container:i,children:u})}))})};w0.displayName=Zf;var oc="DialogOverlay",b0=x.forwardRef((t,e)=>{const r=x0(oc,t.__scopeDialog),{forceMount:s=r.forceMount,...i}=t,l=Tn(oc,t.__scopeDialog);return l.modal?g.jsx(io,{present:s||l.open,children:g.jsx(nT,{...i,ref:e})}):null});b0.displayName=oc;var tT=qP("DialogOverlay.RemoveScroll"),nT=x.forwardRef((t,e)=>{const{__scopeDialog:r,...s}=t,i=Tn(oc,r);return g.jsx(Gf,{as:tT,allowPinchZoom:!0,shards:[i.contentRef],children:g.jsx(ze.div,{"data-state":th(i.open),...s,ref:e,style:{pointerEvents:"auto",...s.style}})})}),Wo="DialogContent",S0=x.forwardRef((t,e)=>{const r=x0(Wo,t.__scopeDialog),{forceMount:s=r.forceMount,...i}=t,l=Tn(Wo,t.__scopeDialog);return g.jsx(io,{present:s||l.open,children:l.modal?g.jsx(rT,{...i,ref:e}):g.jsx(oT,{...i,ref:e})})});S0.displayName=Wo;var rT=x.forwardRef((t,e)=>{const r=Tn(Wo,t.__scopeDialog),s=x.useRef(null),i=Ve(e,r.contentRef,s);return x.useEffect(()=>{const l=s.current;if(l)return vx(l)},[]),g.jsx(C0,{...t,ref:i,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Me(t.onCloseAutoFocus,l=>{var u;l.preventDefault(),(u=r.triggerRef.current)==null||u.focus()}),onPointerDownOutside:Me(t.onPointerDownOutside,l=>{const u=l.detail.originalEvent,d=u.button===0&&u.ctrlKey===!0;(u.button===2||d)&&l.preventDefault()}),onFocusOutside:Me(t.onFocusOutside,l=>l.preventDefault())})}),oT=x.forwardRef((t,e)=>{const r=Tn(Wo,t.__scopeDialog),s=x.useRef(!1),i=x.useRef(!1);return g.jsx(C0,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:l=>{var u,d;(u=t.onCloseAutoFocus)==null||u.call(t,l),l.defaultPrevented||(s.current||(d=r.triggerRef.current)==null||d.focus(),l.preventDefault()),s.current=!1,i.current=!1},onInteractOutside:l=>{var h,p;(h=t.onInteractOutside)==null||h.call(t,l),l.defaultPrevented||(s.current=!0,l.detail.originalEvent.type==="pointerdown"&&(i.current=!0));const u=l.target;((p=r.triggerRef.current)==null?void 0:p.contains(u))&&l.preventDefault(),l.detail.originalEvent.type==="focusin"&&i.current&&l.preventDefault()}})}),C0=x.forwardRef((t,e)=>{const{__scopeDialog:r,trapFocus:s,onOpenAutoFocus:i,onCloseAutoFocus:l,...u}=t,d=Tn(Wo,r),h=x.useRef(null),p=Ve(e,h);return Kv(),g.jsxs(g.Fragment,{children:[g.jsx($f,{asChild:!0,loop:!0,trapped:s,onMountAutoFocus:i,onUnmountAutoFocus:l,children:g.jsx(zf,{role:"dialog",id:d.contentId,"aria-describedby":d.descriptionId,"aria-labelledby":d.titleId,"data-state":th(d.open),...u,ref:p,onDismiss:()=>d.onOpenChange(!1)})}),g.jsxs(g.Fragment,{children:[g.jsx(sT,{titleId:d.titleId}),g.jsx(aT,{contentRef:h,descriptionId:d.descriptionId})]})]})}),eh="DialogTitle",E0=x.forwardRef((t,e)=>{const{__scopeDialog:r,...s}=t,i=Tn(eh,r);return g.jsx(ze.h2,{id:i.titleId,...s,ref:e})});E0.displayName=eh;var k0="DialogDescription",N0=x.forwardRef((t,e)=>{const{__scopeDialog:r,...s}=t,i=Tn(k0,r);return g.jsx(ze.p,{id:i.descriptionId,...s,ref:e})});N0.displayName=k0;var R0="DialogClose",P0=x.forwardRef((t,e)=>{const{__scopeDialog:r,...s}=t,i=Tn(R0,r);return g.jsx(ze.button,{type:"button",...s,ref:e,onClick:Me(t.onClick,()=>i.onOpenChange(!1))})});P0.displayName=R0;function th(t){return t?"open":"closed"}var T0="DialogTitleWarning",[y_,O0]=Xk(T0,{contentName:Wo,titleName:eh,docsSlug:"dialog"}),sT=({titleId:t})=>{const e=O0(T0),r=`\`${e.contentName}\` requires a \`${e.titleName}\` for the component to be accessible for screen reader users. If you want to hide the \`${e.titleName}\`, you can wrap it with our VisuallyHidden component. For more information, see https://radix-ui.com/primitives/docs/components/${e.docsSlug}`;return x.useEffect(()=>{t&&(document.getElementById(t)||console.error(r))},[r,t]),null},iT="DialogDescriptionWarning",aT=({contentRef:t,descriptionId:e})=>{const s=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${O0(iT).contentName}}.`;return x.useEffect(()=>{var l;const i=(l=t.current)==null?void 0:l.getAttribute("aria-describedby");e&&i&&(document.getElementById(e)||console.warn(s))},[s,t,e]),null},lT=g0,cT=v0,uT=w0,j0=b0,_0=S0,A0=E0,L0=N0,dT=P0;const I0=lT,fT=cT,hT=uT,D0=x.forwardRef(({className:t,...e},r)=>g.jsx(j0,{ref:r,className:Be("fixed inset-0 z-50 bg-black/60 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",t),...e}));D0.displayName=j0.displayName;const nh=x.forwardRef(({className:t,children:e,...r},s)=>g.jsxs(hT,{children:[g.jsx(D0,{}),g.jsxs(_0,{ref:s,className:Be("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 glass-panel-dark float-panel rounded-lg p-6 duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",t),...r,children:[e,g.jsxs(dT,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 hover:text-cyber-neon-cyan focus:outline-none focus:ring-2 focus:ring-cyber-neon-cyan focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[g.jsx(jf,{className:"h-4 w-4"}),g.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));nh.displayName=_0.displayName;const rh=({className:t,...e})=>g.jsx("div",{className:Be("flex flex-col space-y-1.5 text-center sm:text-left",t),...e});rh.displayName="DialogHeader";const oh=x.forwardRef(({className:t,...e},r)=>g.jsx(A0,{ref:r,className:Be("text-lg font-semibold leading-none tracking-tight text-cyber-neon-cyan font-mono",t),...e}));oh.displayName=A0.displayName;const pT=x.forwardRef(({className:t,...e},r)=>g.jsx(L0,{ref:r,className:Be("text-sm text-cyber-text-secondary",t),...e}));pT.displayName=L0.displayName;const M0=x.forwardRef(({className:t,...e},r)=>g.jsx("div",{ref:r,className:Be("rounded-lg border border-cyber-border-DEFAULT bg-cyber-bg-tertiary text-cyber-text-primary shadow-cyber-card transition-all hover:border-cyber-neon-cyan/30",t),...e}));M0.displayName="Card";const mT=x.forwardRef(({className:t,...e},r)=>g.jsx("div",{ref:r,className:Be("flex flex-col space-y-1.5 p-6",t),...e}));mT.displayName="CardHeader";const gT=x.forwardRef(({className:t,...e},r)=>g.jsx("h3",{ref:r,className:Be("text-2xl font-semibold leading-none tracking-tight text-cyber-neon-cyan",t),...e}));gT.displayName="CardTitle";const yT=x.forwardRef(({className:t,...e},r)=>g.jsx("p",{ref:r,className:Be("text-sm text-cyber-text-muted",t),...e}));yT.displayName="CardDescription";const F0=x.forwardRef(({className:t,...e},r)=>g.jsx("div",{ref:r,className:Be("p-6 pt-0",t),...e}));F0.displayName="CardContent";const vT=x.forwardRef(({className:t,...e},r)=>g.jsx("div",{ref:r,className:Be("flex items-center p-6 pt-0",t),...e}));vT.displayName="CardFooter";function xT(t,e){return x.useReducer((r,s)=>e[r][s]??r,t)}var sh="ScrollArea",[z0]=aa(sh),[wT,un]=z0(sh),$0=x.forwardRef((t,e)=>{const{__scopeScrollArea:r,type:s="hover",dir:i,scrollHideDelay:l=600,...u}=t,[d,h]=x.useState(null),[p,y]=x.useState(null),[v,C]=x.useState(null),[w,E]=x.useState(null),[b,k]=x.useState(null),[T,j]=x.useState(0),[_,A]=x.useState(0),[F,V]=x.useState(!1),[B,te]=x.useState(!1),G=Ve(e,le=>h(le)),W=Hv(i);return g.jsx(wT,{scope:r,type:s,dir:W,scrollHideDelay:l,scrollArea:d,viewport:p,onViewportChange:y,content:v,onContentChange:C,scrollbarX:w,onScrollbarXChange:E,scrollbarXEnabled:F,onScrollbarXEnabledChange:V,scrollbarY:b,onScrollbarYChange:k,scrollbarYEnabled:B,onScrollbarYEnabledChange:te,onCornerWidthChange:j,onCornerHeightChange:A,children:g.jsx(ze.div,{dir:W,...u,ref:G,style:{position:"relative","--radix-scroll-area-corner-width":T+"px","--radix-scroll-area-corner-height":_+"px",...t.style}})})});$0.displayName=sh;var U0="ScrollAreaViewport",B0=x.forwardRef((t,e)=>{const{__scopeScrollArea:r,children:s,nonce:i,...l}=t,u=un(U0,r),d=x.useRef(null),h=Ve(e,d,u.onViewportChange);return g.jsxs(g.Fragment,{children:[g.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:i}),g.jsx(ze.div,{"data-radix-scroll-area-viewport":"",...l,ref:h,style:{overflowX:u.scrollbarXEnabled?"scroll":"hidden",overflowY:u.scrollbarYEnabled?"scroll":"hidden",...t.style},children:g.jsx("div",{ref:u.onContentChange,style:{minWidth:"100%",display:"table"},children:s})})]})});B0.displayName=U0;var er="ScrollAreaScrollbar",ih=x.forwardRef((t,e)=>{const{forceMount:r,...s}=t,i=un(er,t.__scopeScrollArea),{onScrollbarXEnabledChange:l,onScrollbarYEnabledChange:u}=i,d=t.orientation==="horizontal";return x.useEffect(()=>(d?l(!0):u(!0),()=>{d?l(!1):u(!1)}),[d,l,u]),i.type==="hover"?g.jsx(bT,{...s,ref:e,forceMount:r}):i.type==="scroll"?g.jsx(ST,{...s,ref:e,forceMount:r}):i.type==="auto"?g.jsx(H0,{...s,ref:e,forceMount:r}):i.type==="always"?g.jsx(ah,{...s,ref:e}):null});ih.displayName=er;var bT=x.forwardRef((t,e)=>{const{forceMount:r,...s}=t,i=un(er,t.__scopeScrollArea),[l,u]=x.useState(!1);return x.useEffect(()=>{const d=i.scrollArea;let h=0;if(d){const p=()=>{window.clearTimeout(h),u(!0)},y=()=>{h=window.setTimeout(()=>u(!1),i.scrollHideDelay)};return d.addEventListener("pointerenter",p),d.addEventListener("pointerleave",y),()=>{window.clearTimeout(h),d.removeEventListener("pointerenter",p),d.removeEventListener("pointerleave",y)}}},[i.scrollArea,i.scrollHideDelay]),g.jsx(io,{present:r||l,children:g.jsx(H0,{"data-state":l?"visible":"hidden",...s,ref:e})})}),ST=x.forwardRef((t,e)=>{const{forceMount:r,...s}=t,i=un(er,t.__scopeScrollArea),l=t.orientation==="horizontal",u=kc(()=>h("SCROLL_END"),100),[d,h]=xT("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return x.useEffect(()=>{if(d==="idle"){const p=window.setTimeout(()=>h("HIDE"),i.scrollHideDelay);return()=>window.clearTimeout(p)}},[d,i.scrollHideDelay,h]),x.useEffect(()=>{const p=i.viewport,y=l?"scrollLeft":"scrollTop";if(p){let v=p[y];const C=()=>{const w=p[y];v!==w&&(h("SCROLL"),u()),v=w};return p.addEventListener("scroll",C),()=>p.removeEventListener("scroll",C)}},[i.viewport,l,h,u]),g.jsx(io,{present:r||d!=="hidden",children:g.jsx(ah,{"data-state":d==="hidden"?"hidden":"visible",...s,ref:e,onPointerEnter:Me(t.onPointerEnter,()=>h("POINTER_ENTER")),onPointerLeave:Me(t.onPointerLeave,()=>h("POINTER_LEAVE"))})})}),H0=x.forwardRef((t,e)=>{const r=un(er,t.__scopeScrollArea),{forceMount:s,...i}=t,[l,u]=x.useState(!1),d=t.orientation==="horizontal",h=kc(()=>{if(r.viewport){const p=r.viewport.offsetWidth{const{orientation:r="vertical",...s}=t,i=un(er,t.__scopeScrollArea),l=x.useRef(null),u=x.useRef(0),[d,h]=x.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),p=Q0(d.viewport,d.content),y={...s,sizes:d,onSizesChange:h,hasThumb:p>0&&p<1,onThumbChange:C=>l.current=C,onThumbPointerUp:()=>u.current=0,onThumbPointerDown:C=>u.current=C};function v(C,w){return PT(C,u.current,d,w)}return r==="horizontal"?g.jsx(CT,{...y,ref:e,onThumbPositionChange:()=>{if(i.viewport&&l.current){const C=i.viewport.scrollLeft,w=by(C,d,i.dir);l.current.style.transform=`translate3d(${w}px, 0, 0)`}},onWheelScroll:C=>{i.viewport&&(i.viewport.scrollLeft=C)},onDragScroll:C=>{i.viewport&&(i.viewport.scrollLeft=v(C,i.dir))}}):r==="vertical"?g.jsx(ET,{...y,ref:e,onThumbPositionChange:()=>{if(i.viewport&&l.current){const C=i.viewport.scrollTop,w=by(C,d);l.current.style.transform=`translate3d(0, ${w}px, 0)`}},onWheelScroll:C=>{i.viewport&&(i.viewport.scrollTop=C)},onDragScroll:C=>{i.viewport&&(i.viewport.scrollTop=v(C))}}):null}),CT=x.forwardRef((t,e)=>{const{sizes:r,onSizesChange:s,...i}=t,l=un(er,t.__scopeScrollArea),[u,d]=x.useState(),h=x.useRef(null),p=Ve(e,h,l.onScrollbarXChange);return x.useEffect(()=>{h.current&&d(getComputedStyle(h.current))},[h]),g.jsx(W0,{"data-orientation":"horizontal",...i,ref:p,sizes:r,style:{bottom:0,left:l.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:l.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Ec(r)+"px",...t.style},onThumbPointerDown:y=>t.onThumbPointerDown(y.x),onDragScroll:y=>t.onDragScroll(y.x),onWheelScroll:(y,v)=>{if(l.viewport){const C=l.viewport.scrollLeft+y.deltaX;t.onWheelScroll(C),G0(C,v)&&y.preventDefault()}},onResize:()=>{h.current&&l.viewport&&u&&s({content:l.viewport.scrollWidth,viewport:l.viewport.offsetWidth,scrollbar:{size:h.current.clientWidth,paddingStart:ic(u.paddingLeft),paddingEnd:ic(u.paddingRight)}})}})}),ET=x.forwardRef((t,e)=>{const{sizes:r,onSizesChange:s,...i}=t,l=un(er,t.__scopeScrollArea),[u,d]=x.useState(),h=x.useRef(null),p=Ve(e,h,l.onScrollbarYChange);return x.useEffect(()=>{h.current&&d(getComputedStyle(h.current))},[h]),g.jsx(W0,{"data-orientation":"vertical",...i,ref:p,sizes:r,style:{top:0,right:l.dir==="ltr"?0:void 0,left:l.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Ec(r)+"px",...t.style},onThumbPointerDown:y=>t.onThumbPointerDown(y.y),onDragScroll:y=>t.onDragScroll(y.y),onWheelScroll:(y,v)=>{if(l.viewport){const C=l.viewport.scrollTop+y.deltaY;t.onWheelScroll(C),G0(C,v)&&y.preventDefault()}},onResize:()=>{h.current&&l.viewport&&u&&s({content:l.viewport.scrollHeight,viewport:l.viewport.offsetHeight,scrollbar:{size:h.current.clientHeight,paddingStart:ic(u.paddingTop),paddingEnd:ic(u.paddingBottom)}})}})}),[kT,V0]=z0(er),W0=x.forwardRef((t,e)=>{const{__scopeScrollArea:r,sizes:s,hasThumb:i,onThumbChange:l,onThumbPointerUp:u,onThumbPointerDown:d,onThumbPositionChange:h,onDragScroll:p,onWheelScroll:y,onResize:v,...C}=t,w=un(er,r),[E,b]=x.useState(null),k=Ve(e,G=>b(G)),T=x.useRef(null),j=x.useRef(""),_=w.viewport,A=s.content-s.viewport,F=Vt(y),V=Vt(h),B=kc(v,10);function te(G){if(T.current){const W=G.clientX-T.current.left,le=G.clientY-T.current.top;p({x:W,y:le})}}return x.useEffect(()=>{const G=W=>{const le=W.target;(E==null?void 0:E.contains(le))&&F(W,A)};return document.addEventListener("wheel",G,{passive:!1}),()=>document.removeEventListener("wheel",G,{passive:!1})},[_,E,A,F]),x.useEffect(V,[s,V]),Ws(E,B),Ws(w.content,B),g.jsx(kT,{scope:r,scrollbar:E,hasThumb:i,onThumbChange:Vt(l),onThumbPointerUp:Vt(u),onThumbPositionChange:V,onThumbPointerDown:Vt(d),children:g.jsx(ze.div,{...C,ref:k,style:{position:"absolute",...C.style},onPointerDown:Me(t.onPointerDown,G=>{G.button===0&&(G.target.setPointerCapture(G.pointerId),T.current=E.getBoundingClientRect(),j.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",w.viewport&&(w.viewport.style.scrollBehavior="auto"),te(G))}),onPointerMove:Me(t.onPointerMove,te),onPointerUp:Me(t.onPointerUp,G=>{const W=G.target;W.hasPointerCapture(G.pointerId)&&W.releasePointerCapture(G.pointerId),document.body.style.webkitUserSelect=j.current,w.viewport&&(w.viewport.style.scrollBehavior=""),T.current=null})})})}),sc="ScrollAreaThumb",K0=x.forwardRef((t,e)=>{const{forceMount:r,...s}=t,i=V0(sc,t.__scopeScrollArea);return g.jsx(io,{present:r||i.hasThumb,children:g.jsx(NT,{ref:e,...s})})}),NT=x.forwardRef((t,e)=>{const{__scopeScrollArea:r,style:s,...i}=t,l=un(sc,r),u=V0(sc,r),{onThumbPositionChange:d}=u,h=Ve(e,v=>u.onThumbChange(v)),p=x.useRef(void 0),y=kc(()=>{p.current&&(p.current(),p.current=void 0)},100);return x.useEffect(()=>{const v=l.viewport;if(v){const C=()=>{if(y(),!p.current){const w=TT(v,d);p.current=w,d()}};return d(),v.addEventListener("scroll",C),()=>v.removeEventListener("scroll",C)}},[l.viewport,y,d]),g.jsx(ze.div,{"data-state":u.hasThumb?"visible":"hidden",...i,ref:h,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...s},onPointerDownCapture:Me(t.onPointerDownCapture,v=>{const w=v.target.getBoundingClientRect(),E=v.clientX-w.left,b=v.clientY-w.top;u.onThumbPointerDown({x:E,y:b})}),onPointerUp:Me(t.onPointerUp,u.onThumbPointerUp)})});K0.displayName=sc;var lh="ScrollAreaCorner",q0=x.forwardRef((t,e)=>{const r=un(lh,t.__scopeScrollArea),s=!!(r.scrollbarX&&r.scrollbarY);return r.type!=="scroll"&&s?g.jsx(RT,{...t,ref:e}):null});q0.displayName=lh;var RT=x.forwardRef((t,e)=>{const{__scopeScrollArea:r,...s}=t,i=un(lh,r),[l,u]=x.useState(0),[d,h]=x.useState(0),p=!!(l&&d);return Ws(i.scrollbarX,()=>{var v;const y=((v=i.scrollbarX)==null?void 0:v.offsetHeight)||0;i.onCornerHeightChange(y),h(y)}),Ws(i.scrollbarY,()=>{var v;const y=((v=i.scrollbarY)==null?void 0:v.offsetWidth)||0;i.onCornerWidthChange(y),u(y)}),p?g.jsx(ze.div,{...s,ref:e,style:{width:l,height:d,position:"absolute",right:i.dir==="ltr"?0:void 0,left:i.dir==="rtl"?0:void 0,bottom:0,...t.style}}):null});function ic(t){return t?parseInt(t,10):0}function Q0(t,e){const r=t/e;return isNaN(r)?0:r}function Ec(t){const e=Q0(t.viewport,t.content),r=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=(t.scrollbar.size-r)*e;return Math.max(s,18)}function PT(t,e,r,s="ltr"){const i=Ec(r),l=i/2,u=e||l,d=i-u,h=r.scrollbar.paddingStart+u,p=r.scrollbar.size-r.scrollbar.paddingEnd-d,y=r.content-r.viewport,v=s==="ltr"?[0,y]:[y*-1,0];return Y0([h,p],v)(t)}function by(t,e,r="ltr"){const s=Ec(e),i=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,l=e.scrollbar.size-i,u=e.content-e.viewport,d=l-s,h=r==="ltr"?[0,u]:[u*-1,0],p=af(t,h);return Y0([0,u],[0,d])(p)}function Y0(t,e){return r=>{if(t[0]===t[1]||e[0]===e[1])return e[0];const s=(e[1]-e[0])/(t[1]-t[0]);return e[0]+s*(r-t[0])}}function G0(t,e){return t>0&&t{})=>{let r={left:t.scrollLeft,top:t.scrollTop},s=0;return(function i(){const l={left:t.scrollLeft,top:t.scrollTop},u=r.left!==l.left,d=r.top!==l.top;(u||d)&&e(),r=l,s=window.requestAnimationFrame(i)})(),()=>window.cancelAnimationFrame(s)};function kc(t,e){const r=Vt(t),s=x.useRef(0);return x.useEffect(()=>()=>window.clearTimeout(s.current),[]),x.useCallback(()=>{window.clearTimeout(s.current),s.current=window.setTimeout(r,e)},[r,e])}function Ws(t,e){const r=Vt(e);mt(()=>{let s=0;if(t){const i=new ResizeObserver(()=>{cancelAnimationFrame(s),s=window.requestAnimationFrame(r)});return i.observe(t),()=>{window.cancelAnimationFrame(s),i.unobserve(t)}}},[t,r])}var X0=$0,OT=B0,jT=q0;const J0=x.forwardRef(({className:t,children:e,...r},s)=>g.jsxs(X0,{ref:s,className:Be("relative overflow-hidden",t),...r,children:[g.jsx(OT,{className:"h-full w-full rounded-[inherit]",children:e}),g.jsx(Z0,{}),g.jsx(jT,{})]}));J0.displayName=X0.displayName;const Z0=x.forwardRef(({className:t,orientation:e="vertical",...r},s)=>g.jsx(ih,{ref:s,orientation:e,className:Be("flex touch-none select-none transition-colors",e==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",e==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-[1px]",t),...r,children:g.jsx(K0,{className:"relative flex-1 rounded-full bg-border"})}));Z0.displayName=ih.displayName;const Nc=x.forwardRef(({className:t,type:e,...r},s)=>g.jsx("input",{type:e,className:Be("flex h-9 w-full rounded-md border border-cyber-border-DEFAULT bg-cyber-bg-tertiary px-3 py-2 text-sm font-mono text-cyber-text-primary ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-cyber-text-muted focus-visible:outline-none focus-visible:border-cyber-neon-cyan focus-visible:shadow-[0_0_10px_rgb(var(--cyber-neon-cyan)/0.2)] disabled:cursor-not-allowed disabled:opacity-50 transition-all",t),ref:s,...r}));Nc.displayName="Input";function _T({data:t,columns:e}){const{t:r}=Zt("data"),[s,i]=x.useState(""),l=x.useMemo(()=>e&&e.length>0?e:t.length===0?[]:Object.keys(t[0]),[t,e]),u=x.useMemo(()=>{if(!s)return t;const h=s.toLowerCase();return t.filter(p=>Object.values(p).some(y=>String(y??"").toLowerCase().includes(h)))},[t,s]),d=h=>h==null?"-":typeof h=="object"?JSON.stringify(h):String(h);return g.jsxs("div",{className:"h-full flex flex-col",children:[g.jsx("div",{className:"flex-shrink-0 mb-3",children:g.jsxs("div",{className:"relative",children:[g.jsx(FS,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-cyber-text-muted"}),g.jsx(Nc,{placeholder:r("preview.searchPlaceholder"),value:s,onChange:h=>i(h.target.value),className:"pl-9 h-9 text-xs font-mono"})]})}),g.jsx(J0,{className:"flex-1 border border-cyber-border-DEFAULT rounded-lg",children:g.jsx("div",{className:"min-w-full",children:g.jsxs("table",{className:"w-full text-xs font-mono",children:[g.jsx("thead",{className:"sticky top-0 bg-cyber-bg-tertiary border-b border-cyber-border-DEFAULT",children:g.jsxs("tr",{children:[g.jsx("th",{className:"px-3 py-2 text-left text-cyber-text-muted w-12",children:"#"}),l.map(h=>g.jsx("th",{className:"px-3 py-2 text-left text-cyber-neon-cyan whitespace-nowrap",children:h},h))]})}),g.jsx("tbody",{children:u.map((h,p)=>g.jsxs("tr",{className:"border-b border-cyber-border-subtle hover:bg-cyber-bg-elevated/50 transition-colors",children:[g.jsx("td",{className:"px-3 py-2 text-cyber-text-muted",children:p+1}),l.map(y=>g.jsx("td",{className:"px-3 py-2 text-cyber-text-primary max-w-xs truncate",title:d(h[y]),children:d(h[y])},y))]},p))})]})})}),s&&g.jsx("div",{className:"flex-shrink-0 mt-2 text-xs text-cyber-text-muted font-mono",children:r("preview.showing",{filtered:u.length,total:t.length})})]})}function AT({file:t,open:e,onOpenChange:r}){const{t:s}=Zt("data"),{data:i,isLoading:l,error:u}=ta({queryKey:["filePreview",t.path],queryFn:async()=>{const{data:h}=await Xl.getFileContent(t.path,100);return h},enabled:e}),d=()=>{const h=Xl.getDownloadUrl(t.path);window.open(h,"_blank")};return g.jsx(I0,{open:e,onOpenChange:r,children:g.jsxs(nh,{className:"max-w-6xl max-h-[85vh] flex flex-col",children:[g.jsx(rh,{className:"flex-shrink-0",children:g.jsxs("div",{className:"flex items-center justify-between",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx(oh,{className:"font-mono text-cyber-neon-cyan",children:t.name}),g.jsxs(qi,{variant:"outline",className:"font-mono text-[10px]",children:[".",t.type.toUpperCase()]}),i&&g.jsx(qi,{variant:"default",className:"font-mono text-[10px]",children:s("preview.records",{count:i.total})})]}),g.jsxs(Ct,{variant:"outline",size:"sm",onClick:d,className:"font-mono text-xs",children:[g.jsx(nv,{className:"w-3 h-3 mr-1"}),s("preview.download")]})]})}),g.jsx("div",{className:"flex-1 overflow-hidden min-h-0 mt-4",children:l?g.jsx("div",{className:"flex items-center justify-center h-full",children:g.jsx("div",{className:"text-cyber-text-muted font-mono animate-pulse",children:s("preview.loading")})}):u?g.jsx("div",{className:"flex items-center justify-center h-full",children:g.jsx("div",{className:"text-cyber-neon-pink font-mono",children:s("preview.error")})}):i?g.jsx(_T,{data:i.data,columns:i.columns}):null})]})})}const LT={json:RS,csv:pd,xlsx:pd,xls:pd},IT={json:{icon:"text-cyber-neon-yellow",border:"hover:border-cyber-neon-yellow/50",badge:"border-cyber-neon-yellow/30 bg-cyber-neon-yellow/10 text-cyber-neon-yellow"},csv:{icon:"text-cyber-neon-green",border:"hover:border-cyber-neon-green/50",badge:"border-cyber-neon-green/30 bg-cyber-neon-green/10 text-cyber-neon-green"},xlsx:{icon:"text-cyber-neon-cyan",border:"hover:border-cyber-neon-cyan/50",badge:"border-cyber-neon-cyan/30 bg-cyber-neon-cyan/10 text-cyber-neon-cyan"},xls:{icon:"text-cyber-neon-cyan",border:"hover:border-cyber-neon-cyan/50",badge:"border-cyber-neon-cyan/30 bg-cyber-neon-cyan/10 text-cyber-neon-cyan"}};function DT({file:t}){const{t:e}=Zt("data"),[r,s]=x.useState(!1),i=LT[t.type]||PS,l=IT[t.type]||{icon:"text-cyber-text-muted",border:"hover:border-cyber-neon-cyan/50",badge:"border-cyber-border-DEFAULT bg-cyber-bg-tertiary text-cyber-text-secondary"},u=["json","csv","xlsx","xls"].includes(t.type.toLowerCase()),d=()=>{const h=Xl.getDownloadUrl(t.path);window.open(h,"_blank")};return g.jsxs(g.Fragment,{children:[g.jsxs(M0,{className:`relative overflow-hidden card-scan group transition-all ${l.border} hover:shadow-[0_0_15px_rgb(var(--cyber-neon-cyan)/0.15)]`,children:[g.jsx("div",{className:"absolute inset-0 bg-gradient-to-r from-transparent via-cyber-neon-cyan/5 to-transparent -translate-x-full group-hover:translate-x-full transition-transform duration-700 pointer-events-none"}),g.jsxs(F0,{className:"p-4 relative",children:[g.jsxs("div",{className:"flex items-start gap-3",children:[g.jsx("div",{className:`p-2 rounded bg-cyber-bg-panel border border-cyber-border-DEFAULT ${l.icon}`,children:g.jsx(i,{className:"w-6 h-6"})}),g.jsxs("div",{className:"flex-1 min-w-0",children:[g.jsx("h3",{className:"font-mono font-medium text-sm text-cyber-text-primary truncate",title:t.name,children:t.name}),g.jsxs("p",{className:"text-xs text-cyber-text-muted mt-1 font-mono",children:[lE(t.size),t.record_count!==null&&g.jsxs("span",{className:"text-cyber-neon-green",children:[" | ",e("file.entries",{count:t.record_count})]})]}),g.jsx("p",{className:"text-xs text-cyber-text-muted mt-1 font-mono",children:cE(t.modified_at)})]})]}),g.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t border-cyber-border-subtle",children:[g.jsxs(qi,{variant:"outline",className:`text-[10px] font-mono ${l.badge}`,children:[".",t.type.toUpperCase()]}),g.jsxs("div",{className:"flex gap-1 opacity-0 group-hover:opacity-100 transition-opacity",children:[u&&g.jsxs(Ct,{variant:"ghost",size:"sm",className:"h-7 px-2 font-mono text-cyber-neon-cyan hover:text-cyber-neon-cyan hover:bg-cyber-neon-cyan/10",onClick:()=>s(!0),children:[g.jsx(NS,{className:"w-3 h-3 mr-1"}),e("file.preview")]}),g.jsxs(Ct,{variant:"ghost",size:"sm",className:"h-7 px-2 font-mono text-cyber-neon-cyan hover:text-cyber-neon-cyan hover:bg-cyber-neon-cyan/10",onClick:d,children:[g.jsx(nv,{className:"w-3 h-3 mr-1"}),e("file.extract")]})]})]})]})]}),u&&g.jsx(AT,{file:t,open:r,onOpenChange:s})]})}function MT(t){const e=t.match(/^(search_\w+?)_/);if(e)return e[1];const r=t.split("_");return r.length>=2?`${r[0]}_${r[1]}`:"other"}function FT(t){return{search_comments:"Comments",search_creators:"Creators",search_videos:"Videos",search_contents:"Contents",search_notes:"Notes",other:"Other"}[t]||t.replace(/_/g," ").replace(/\b\w/g,r=>r.toUpperCase())}function zT(){const{t}=Zt("data"),[e,r]=x.useState("all"),{data:s,isLoading:i,refetch:l,isRefetching:u}=ta({queryKey:["dataFiles"],queryFn:async()=>{const{data:v}=await Xl.getFiles();return v.files}}),d=s||[],{categories:h,groupedFiles:p}=x.useMemo(()=>{const v={};return d.forEach(w=>{const E=MT(w.name);v[E]||(v[E]=[]),v[E].push(w)}),{categories:Object.keys(v).sort((w,E)=>v[E].length-v[w].length),groupedFiles:v}},[d]),y=e==="all"?d:p[e]||[];return g.jsxs("div",{className:"h-full flex flex-col",children:[g.jsxs("div",{className:"flex items-center justify-between mb-4",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("h2",{className:"text-lg font-mono font-bold text-cyber-neon-cyan glow-text-cyan tracking-wider",children:t("explorer.title")}),g.jsx(qi,{variant:"default",className:"font-mono",children:t("explorer.records",{count:d.length})})]}),g.jsxs(Ct,{variant:"outline",size:"sm",onClick:()=>l(),disabled:u,className:"font-mono",children:[g.jsx(Tf,{className:`w-4 h-4 ${u?"animate-spin":""}`}),t("explorer.rescan")]})]}),d.length>0&&h.length>1&&g.jsxs("div",{className:"flex items-center gap-2 mb-4 flex-wrap",children:[g.jsxs("button",{onClick:()=>r("all"),className:`px-3 py-1.5 rounded-md text-xs font-mono transition-all ${e==="all"?"bg-cyber-neon-cyan text-black font-bold":"bg-cyber-bg-tertiary text-cyber-text-secondary hover:text-cyber-text-primary border border-cyber-border-subtle hover:border-cyber-neon-cyan/50"}`,children:[t("explorer.allCategories")," (",d.length,")"]}),h.map(v=>g.jsxs("button",{onClick:()=>r(v),className:`px-3 py-1.5 rounded-md text-xs font-mono transition-all ${e===v?"bg-cyber-neon-cyan text-black font-bold":"bg-cyber-bg-tertiary text-cyber-text-secondary hover:text-cyber-text-primary border border-cyber-border-subtle hover:border-cyber-neon-cyan/50"}`,children:[FT(v)," (",p[v].length,")"]},v))]}),i?g.jsx("div",{className:"flex-1 flex items-center justify-center",children:g.jsx("div",{className:"text-cyber-text-muted font-mono animate-pulse",children:t("explorer.loading")})}):d.length===0?g.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center text-center",children:[g.jsxs("div",{className:"relative",children:[g.jsx(TS,{className:"w-16 h-16 text-cyber-neon-cyan/30 mb-4"}),g.jsx("div",{className:"absolute inset-0 blur-xl bg-cyber-neon-cyan/10"})]}),g.jsx("h3",{className:"text-lg font-mono font-medium text-cyber-neon-cyan mb-2",children:t("explorer.noData")}),g.jsx("p",{className:"text-sm text-cyber-text-muted max-w-md font-mono",children:t("explorer.noDataHint")})]}):g.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 gap-4",children:y.map(v=>g.jsx(DT,{file:v},v.path))})]})}function $T(){const{t}=Zt("data");return g.jsxs(I0,{children:[g.jsx(fT,{asChild:!0,children:g.jsxs(Ct,{variant:"outline",size:"sm",className:"font-mono text-xs text-[#c9d1d9] border-[#30363d] bg-transparent hover:bg-[#21262d] hover:text-[#00ffff] hover:border-[#00ffff]/50",children:[g.jsx(tv,{className:"w-3.5 h-3.5"}),t("dialog.button")]})}),g.jsxs(nh,{className:"max-w-5xl max-h-[85vh] overflow-hidden",children:[g.jsx(rh,{children:g.jsx(oh,{children:t("dialog.title")})}),g.jsx("div",{className:"overflow-auto max-h-[calc(85vh-100px)] pr-2",children:g.jsx(zT,{})})]})]})}function UT(){const{t}=Zt("terminal"),[e,r]=x.useState(!1),s=jt(p=>p.logs),i=jt(p=>p.clearLogs),l=jt(p=>p.restoreLogs),u=jt(p=>p.clearedAfterLogId),d=jt(p=>p.status),h=x.useRef(null);return x.useEffect(()=>{h.current&&!e&&(h.current.scrollTop=h.current.scrollHeight)},[s,e]),g.jsxs("div",{className:`flex flex-col rounded-lg overflow-hidden transition-all duration-300 border border-cyber-border-subtle bg-[#0d1117] ${e?"h-12":"h-full"}`,children:[g.jsxs("div",{className:"flex items-center justify-between px-4 py-2.5 bg-[#161b22] border-b border-[#30363d] flex-shrink-0",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsxs("div",{className:"flex gap-1.5",children:[g.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-cyber-neon-pink/80"}),g.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-cyber-neon-orange/80"}),g.jsx("span",{className:"w-2.5 h-2.5 rounded-full bg-cyber-neon-green/80"})]}),g.jsx("span",{className:"text-xs text-[#8b949e] font-mono tracking-wider",children:t("header.title")})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsxs("div",{className:"flex items-center gap-3 text-xs font-mono",children:[g.jsx("span",{className:"text-[#8b949e]",children:t("header.entries",{count:s.length})}),d==="running"&&g.jsxs("div",{className:"flex items-center gap-1.5",children:[g.jsx("span",{className:"w-1.5 h-1.5 bg-cyber-neon-green rounded-full shadow-glow-green-sm animate-pulse-fast"}),g.jsx("span",{className:"text-cyber-neon-green",children:t("header.active")})]})]}),g.jsx($T,{}),u!==null&&g.jsx(Ct,{variant:"ghost",size:"sm",onClick:l,className:"h-7 px-2 text-[#8b949e] hover:text-[#00ffff] hover:bg-[#00ffff]/10",title:t("header.restore"),children:g.jsx(Tf,{className:"w-4 h-4"})}),g.jsx(Ct,{variant:"ghost",size:"sm",onClick:i,disabled:s.length===0,className:"h-7 px-2 text-[#8b949e] hover:text-[#ff0080] hover:bg-[#ff0080]/10 disabled:opacity-30",title:t("header.clear"),children:g.jsx(HS,{className:"w-4 h-4"})}),g.jsx(Ct,{variant:"ghost",size:"sm",onClick:()=>r(!e),className:"h-7 px-2 text-[#8b949e] hover:text-[#00ffff] hover:bg-[#00ffff]/10",children:e?g.jsx(Pf,{className:"w-4 h-4"}):g.jsx(ev,{className:"w-4 h-4"})})]})]}),!e&&g.jsxs(g.Fragment,{children:[g.jsxs("div",{ref:h,className:"flex-1 overflow-auto p-4 font-mono text-sm terminal-scroll bg-[#0d1117] min-h-0",children:[s.length===0?g.jsxs("div",{className:"space-y-4",children:[g.jsx("pre",{className:"text-cyber-neon-cyan/70 text-xs leading-tight",children:` ╔══════════════════════════════════════════════════════╗ ║ __ __ _ _ ____ ║ ║ | \\/ | ___ __| (_) __ _/ ___|_ __ __ ___ __ ║ ║ | |\\/| |/ _ \\/ _\` | |/ _\` | | | '__/ _\` \\ \\ /\\ / / ║ ║ | | | | __/ (_| | | (_| | |___| | | (_| |\\ V V / ║ ║ |_| |_|\\___|\\__,_|_|\\__,_|\\____|_| \\__,_| \\_/\\_/ ║ ║ ║ ║ [ NEURAL EXTRACTION UNIT v1.0 ] ║ ╚══════════════════════════════════════════════════════╝`}),g.jsxs("div",{className:"text-[#c9d1d9] text-xs space-y-1",children:[g.jsx("p",{className:"text-cyber-neon-green/70",children:t("banner.systemInit")}),g.jsx("p",{className:"text-[#8b949e]",children:t("banner.configHint")})]})]}):g.jsx("div",{className:"space-y-0.5",children:s.map(p=>g.jsx(LP,{log:p},p.id))}),d==="running"&&g.jsxs("div",{className:"flex items-center gap-1 mt-3",children:[g.jsx("span",{className:"text-cyber-neon-green/80",children:"root@crawler:~$"}),g.jsx("span",{className:"w-2 h-4 bg-cyber-neon-green/80 cursor-blink"})]})]}),g.jsx("div",{className:"px-4 py-2 border-t border-[#30363d] bg-[#161b22] flex items-center justify-end flex-shrink-0",children:g.jsx("div",{className:"text-xs font-mono text-[#8b949e]",children:d.toUpperCase()})})]})]})}let bt=null,So=null,Il=0;function BT(){const t=jt(r=>r.addLog),e=x.useRef(t);return x.useEffect(()=>{e.current=t},[t]),x.useEffect(()=>{Il++;const r=()=>{if(So&&(clearTimeout(So),So=null),bt&&(bt.readyState===WebSocket.OPEN||bt.readyState===WebSocket.CONNECTING))return;const i=window.location.protocol==="https:"?"wss:":"ws:",l=window.location.host,u=`${i}//${l}/api/ws/logs`,d=new WebSocket(u);bt=d,d.onopen=()=>{bt===d&&console.log("WebSocket connected")},d.onmessage=h=>{if(bt===d){if(h.data==="ping"){d.send("pong");return}if(h.data!=="pong")try{const p=JSON.parse(h.data);p.id&&p.message&&e.current(p)}catch{console.warn("Failed to parse WebSocket message:",h.data)}}},d.onclose=()=>{bt===d&&(console.log("WebSocket disconnected"),bt=null,Il>0&&(So=setTimeout(r,2e3)))},d.onerror=h=>{bt===d&&console.error("WebSocket error:",h)}};r();const s=setInterval(()=>{bt&&bt.readyState===WebSocket.OPEN&&bt.send("ping")},3e4);return()=>{if(Il--,clearInterval(s),Il===0&&(So&&(clearTimeout(So),So=null),bt)){const i=bt;bt=null,i.close()}}},[]),{ws:bt}}function HT(){return BT(),g.jsx("main",{className:"flex-1 flex flex-col overflow-hidden min-h-0 relative z-10",children:g.jsx(UT,{})})}function VT(){const{t}=Zt("license");return g.jsx("footer",{className:"h-24 flex-shrink-0 glass-panel border-t border-cyber-border-subtle",children:g.jsxs("div",{className:"h-full px-6 flex items-center justify-center gap-6",children:[g.jsx("div",{className:"w-14 h-14 rounded-lg overflow-hidden border-2 border-cyber-neon-cyan/60 flex-shrink-0 shadow-glow-cyan-sm",children:g.jsx("img",{src:"/logos/my_logo.png",alt:"程序员阿江-Relakkes",className:"w-full h-full object-cover"})}),g.jsxs("div",{className:"flex flex-col gap-1",children:[g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx("span",{className:"text-lg font-bold text-cyber-text-primary",children:t("author.name")}),g.jsx($S,{className:"w-5 h-5 text-cyber-neon-cyan animate-pulse"})]}),g.jsx("span",{className:"text-sm text-cyber-text-muted hidden sm:inline",children:t("author.description")}),g.jsxs("div",{className:"flex items-center gap-2 text-cyber-neon-cyan",children:[g.jsx(jS,{className:"w-4 h-4 fill-current animate-pulse"}),g.jsx("span",{className:"text-sm font-medium",children:t("author.slogan")})]})]}),g.jsxs("div",{className:"flex items-center gap-3",children:[g.jsx("a",{href:"https://github.com/NanmiCoder",target:"_blank",rel:"noopener noreferrer",className:"w-11 h-11 rounded-lg flex items-center justify-center border border-cyber-border-subtle hover:border-cyber-neon-cyan hover:shadow-glow-cyan-sm transition-all bg-cyber-bg-tertiary hover:scale-110",title:"GitHub",children:g.jsx("img",{src:"/logos/github.png",alt:"GitHub",className:"w-6 h-6 object-contain"})}),g.jsx("a",{href:"https://space.bilibili.com/434377496",target:"_blank",rel:"noopener noreferrer",className:"w-11 h-11 rounded-lg flex items-center justify-center border border-cyber-border-subtle hover:border-pink-400 hover:shadow-[0_0_10px_rgba(251,113,133,0.4)] transition-all bg-cyber-bg-tertiary hover:scale-110",title:"哔哩哔哩",children:g.jsx("img",{src:"/logos/bilibili_logo.png",alt:"Bilibili",className:"w-6 h-6 object-contain"})}),g.jsx("a",{href:"https://www.xiaohongshu.com/user/profile/5f58bd990000000001003753",target:"_blank",rel:"noopener noreferrer",className:"w-11 h-11 rounded-lg flex items-center justify-center border border-cyber-border-subtle hover:border-red-400 hover:shadow-[0_0_10px_rgba(248,113,113,0.4)] transition-all bg-cyber-bg-tertiary hover:scale-110",title:"小红书",children:g.jsx("img",{src:"/logos/xiaohongshu_logo.png",alt:"小红书",className:"w-6 h-6 object-contain"})}),g.jsx("a",{href:"https://www.douyin.com/user/MS4wLjABAAAATJPY7LAlaa5X-c8uNdWkvz0jUGgpw4eeXIwu_8BhvqE",target:"_blank",rel:"noopener noreferrer",className:"w-11 h-11 rounded-lg flex items-center justify-center border border-cyber-border-subtle hover:border-cyber-text-primary hover:shadow-[0_0_10px_rgba(255,255,255,0.3)] transition-all bg-cyber-bg-tertiary hover:scale-110",title:"抖音",children:g.jsx("img",{src:"/logos/douyin.png",alt:"抖音",className:"w-6 h-6 object-contain"})})]})]})})}var WT=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],KT=WT.reduce((t,e)=>{const r=p0(`Primitive.${e}`),s=x.forwardRef((i,l)=>{const{asChild:u,...d}=i,h=u?r:e;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),g.jsx(h,{...d,ref:l})});return s.displayName=`Primitive.${e}`,{...t,[e]:s}},{}),qT="Label",ew=x.forwardRef((t,e)=>g.jsx(KT.label,{...t,ref:e,onMouseDown:r=>{var i;r.target.closest("button, input, select, textarea")||((i=t.onMouseDown)==null||i.call(t,r),!r.defaultPrevented&&r.detail>1&&r.preventDefault())}}));ew.displayName=qT;var tw=ew;const QT=_f("text-sm font-mono leading-none text-cyber-text-secondary peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),nw=x.forwardRef(({className:t,...e},r)=>g.jsx(tw,{ref:r,className:Be(QT(),t),...e}));nw.displayName=tw.displayName;const Hl=x.forwardRef(({className:t,checked:e,onCheckedChange:r,...s},i)=>g.jsxs("label",{className:"inline-flex items-center cursor-pointer",children:[g.jsx("input",{type:"checkbox",className:"sr-only peer",ref:i,checked:e,onChange:l=>r==null?void 0:r(l.target.checked),...s}),g.jsx("div",{className:Be("h-4 w-4 shrink-0 rounded-sm border border-cyber-border-DEFAULT bg-cyber-bg-tertiary ring-offset-background focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-cyber-neon-cyan disabled:cursor-not-allowed disabled:opacity-50 peer-checked:bg-cyber-neon-cyan/20 peer-checked:border-cyber-neon-cyan peer-checked:shadow-glow-cyan-sm flex items-center justify-center transition-all",t),children:g.jsx(Rf,{className:Be("h-3 w-3 text-cyber-neon-cyan transition-opacity",e?"opacity-100":"opacity-0")})})]}));Hl.displayName="Checkbox";const YT={xhs:{video:[/xiaohongshu\.com\/explore\/([a-zA-Z0-9]+)/,/xiaohongshu\.com\/discovery\/item\/([a-zA-Z0-9]+)/,/xhslink\.com\/([a-zA-Z0-9]+)/],creator:[/xiaohongshu\.com\/user\/profile\/([a-zA-Z0-9]+)/]},dy:{video:[/douyin\.com\/video\/(\d+)/,/v\.douyin\.com\/([a-zA-Z0-9]+)/,/iesdouyin\.com\/share\/video\/(\d+)/],creator:[/douyin\.com\/user\/([a-zA-Z0-9_-]+)/]},bili:{video:[/bilibili\.com\/video\/(BV[a-zA-Z0-9]+)/,/bilibili\.com\/video\/(av\d+)/,/b23\.tv\/([a-zA-Z0-9]+)/],creator:[/space\.bilibili\.com\/(\d+)/]},wb:{video:[/weibo\.com\/\d+\/([a-zA-Z0-9]+)/,/m\.weibo\.cn\/status\/(\d+)/],creator:[/weibo\.com\/u\/(\d+)/,/weibo\.com\/([a-zA-Z0-9]+)$/]},ks:{video:[/kuaishou\.com\/short-video\/([a-zA-Z0-9_-]+)/,/v\.kuaishou\.com\/([a-zA-Z0-9]+)/],creator:[/kuaishou\.com\/profile\/([a-zA-Z0-9_-]+)/]}};function GT(t,e){const r=t.trim();if(!r.includes("/")&&!r.includes("."))return{id:r,type:"unknown",original:r,isValid:r.length>0};const s=YT[e];if(!s)return{id:r,type:"unknown",original:r,isValid:!1};for(const l of s.video){const u=r.match(l);if(u&&u[1])return{id:u[1],type:"video",original:r,isValid:!0}}for(const l of s.creator){const u=r.match(l);if(u&&u[1])return{id:u[1],type:"creator",original:r,isValid:!0}}const i=r.match(/([a-zA-Z0-9_-]{6,})/);return i?{id:i[1],type:"unknown",original:r,isValid:!1}:{id:r,type:"unknown",original:r,isValid:!1}}function XT(t,e){return t.trim()?t.split(/[,\n]+/).map(s=>s.trim()).filter(Boolean).map(s=>GT(s,e)):[]}function Sy({value:t,platform:e,type:r,onRemove:s,disabled:i}){const l=x.useMemo(()=>XT(t,e),[t,e]);if(l.length===0)return null;const u=d=>{if(i||!s)return;t.split(/[,\n]+/).map(p=>p.trim()).filter(Boolean).splice(d,1),s(d)};return g.jsxs("div",{className:"space-y-1.5 mt-2",children:[g.jsxs("div",{className:"text-[10px] text-cyber-text-muted font-mono",children:["已识别 ",l.length," 个",r==="detail"?"帖子/视频":"创作者",":"]}),g.jsx("div",{className:"flex flex-wrap gap-1.5",children:l.map((d,h)=>g.jsx(JT,{item:d,expectedType:r,onRemove:i?void 0:()=>u(h)},`${d.id}-${h}`))})]})}function JT({item:t,expectedType:e,onRemove:r}){const s=t.type==="unknown"||e==="detail"&&t.type==="video"||e==="creator"&&t.type==="creator",i=!t.isValid||!s;return g.jsxs("span",{className:` inline-flex items-center gap-1 px-2 py-1 rounded-md text-[10px] font-mono ${i?"bg-cyber-neon-orange/10 border border-cyber-neon-orange/30 text-cyber-neon-orange":"bg-cyber-neon-cyan/10 border border-cyber-neon-cyan/30 text-cyber-neon-cyan"} `,title:t.original,children:[i?g.jsx(Of,{className:"w-3 h-3 flex-shrink-0"}):g.jsx(Rf,{className:"w-3 h-3 flex-shrink-0"}),g.jsx("span",{className:"max-w-[120px] truncate",children:t.id.length>20?t.id.slice(0,8)+"..."+t.id.slice(-8):t.id}),r&&g.jsx("button",{type:"button",onClick:r,className:"hover:text-cyber-neon-pink transition-colors ml-0.5",children:g.jsx(jf,{className:"w-3 h-3"})})]})}function Ld({title:t,description:e,icon:r,children:s,className:i=""}){return g.jsxs("section",{className:`rounded-lg glass-panel float-panel overflow-hidden ${i}`,children:[g.jsxs("header",{className:"px-4 py-3 border-b border-cyber-border-subtle/50 flex items-center gap-3 bg-cyber-bg-tertiary/30",children:[g.jsx("div",{className:"h-8 w-8 rounded-md bg-cyber-bg-tertiary border border-cyber-border-subtle flex items-center justify-center flex-shrink-0",children:g.jsx(r,{className:"h-4 w-4 text-cyber-neon-cyan"})}),g.jsxs("div",{className:"min-w-0",children:[g.jsx("div",{className:"text-xs font-mono font-semibold text-cyber-text-primary tracking-wide",children:t}),g.jsx("div",{className:"text-[10px] text-cyber-text-muted leading-snug truncate",children:e})]})]}),g.jsx("div",{className:"p-4 space-y-4",children:s})]})}function dr({label:t,hint:e,children:r}){return g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"space-y-0.5",children:[g.jsx(nw,{className:"text-xs text-cyber-text-secondary font-mono",children:t}),e?g.jsx("p",{className:"text-[10px] text-cyber-text-muted leading-snug",children:e}):null]}),r]})}function ZT({value:t,onChange:e,placeholder:r,disabled:s}){const[i,l]=x.useState(""),u=t?t.split(",").map(p=>p.trim()).filter(Boolean):[],d=p=>{if(p.key==="Enter"){p.preventDefault();const y=i.trim();if(y&&!u.includes(y)){const v=[...u,y];e(v.join(",")),l("")}}},h=p=>{const y=u.filter(v=>v!==p);e(y.join(","))};return g.jsxs("div",{className:"space-y-2",children:[g.jsx(Nc,{value:i,onChange:p=>l(p.target.value),onKeyDown:d,placeholder:r,disabled:s,className:"h-9 text-xs"}),u.length>0&&g.jsx("div",{className:"flex flex-wrap gap-1.5",children:u.map(p=>g.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-1 rounded-md bg-cyber-neon-cyan/10 border border-cyber-neon-cyan/30 text-cyber-neon-cyan text-xs font-mono",children:[p,!s&&g.jsx("button",{type:"button",onClick:()=>h(p),className:"hover:text-cyber-neon-pink transition-colors",children:g.jsx(jf,{className:"w-3 h-3"})})]},p))})]})}function eO(){const{t}=Zt("config"),e=jt(b=>b.config),r=jt(b=>b.updateConfig),s=jt(b=>b.status),{data:i}=Yk(),{data:l}=Gk(),{mutate:u,isPending:d}=qk(),{mutate:h,isPending:p}=Qk(),y=s==="running"||s==="stopping",v=s==="running",C=d||p||s==="stopping",w=()=>{u(e)},E=()=>{h()};return g.jsxs("div",{className:"space-y-4 animate-slide-up",children:[g.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[g.jsxs(Ld,{title:t("section.targetMatrix.title"),description:t("section.targetMatrix.description"),icon:rv,children:[g.jsx(dr,{label:t("field.platform"),children:g.jsxs(ks,{value:e.platform,onValueChange:b=>r({platform:b}),disabled:y,children:[g.jsx(ko,{className:"h-9 text-xs",children:g.jsx(Ns,{placeholder:t("field.platformPlaceholder")})}),g.jsx(No,{children:i==null?void 0:i.map(b=>g.jsx(Ro,{value:b.value,children:b.label},b.value))})]})}),g.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[g.jsx(dr,{label:t("field.crawlType"),children:g.jsxs(ks,{value:e.crawler_type,onValueChange:b=>r({crawler_type:b}),disabled:y,children:[g.jsx(ko,{className:"h-9 text-xs",children:g.jsx(Ns,{placeholder:t("field.crawlTypePlaceholder")})}),g.jsx(No,{children:l==null?void 0:l.crawler_types.map(b=>g.jsx(Ro,{value:b.value,children:b.label},b.value))})]})}),g.jsx(dr,{label:t("field.startPage"),children:g.jsx(Nc,{type:"number",min:1,value:e.start_page,onChange:b=>r({start_page:parseInt(b.target.value)||1}),disabled:y,className:"h-9 text-xs"})})]}),e.crawler_type==="search"&&g.jsx(dr,{label:t("field.keywords"),hint:t("field.keywordsHint"),children:g.jsx(ZT,{placeholder:t("field.keywordsPlaceholder"),value:e.keywords,onChange:b=>r({keywords:b}),disabled:y})}),e.crawler_type==="detail"&&g.jsxs(dr,{label:t("field.specifiedIds"),hint:t("field.specifiedIdsHint"),children:[g.jsx("textarea",{value:e.specified_ids,onChange:b=>r({specified_ids:b.target.value}),disabled:y,placeholder:t(`field.specifiedIdsPlaceholder.${e.platform}`,t("field.specifiedIdsPlaceholder.default")),className:"min-h-[60px] w-full rounded-md border border-cyber-border-DEFAULT bg-cyber-bg-tertiary px-3 py-2 text-xs font-mono text-cyber-text-primary placeholder:text-cyber-text-muted focus-visible:outline-none focus-visible:border-cyber-neon-cyan/50 focus-visible:shadow-cyber-soft disabled:cursor-not-allowed disabled:opacity-50 transition-all resize-none"}),g.jsx(Sy,{value:e.specified_ids,platform:e.platform,type:"detail",disabled:y}),e.platform==="xhs"&&g.jsx("div",{className:"mt-2 rounded-lg border border-cyber-neon-orange/30 bg-cyber-neon-orange/5 p-2 text-[10px] leading-snug text-cyber-neon-orange font-mono",children:t("warning.xhsToken")})]}),e.crawler_type==="creator"&&g.jsxs(dr,{label:t("field.creatorIds"),hint:t("field.creatorIdsHint"),children:[g.jsx("textarea",{value:e.creator_ids,onChange:b=>r({creator_ids:b.target.value}),disabled:y,placeholder:t(`field.creatorIdsPlaceholder.${e.platform}`,t("field.creatorIdsPlaceholder.default")),className:"min-h-[60px] w-full rounded-md border border-cyber-border-DEFAULT bg-cyber-bg-tertiary px-3 py-2 text-xs font-mono text-cyber-text-primary placeholder:text-cyber-text-muted focus-visible:outline-none focus-visible:border-cyber-neon-cyan/50 focus-visible:shadow-cyber-soft disabled:cursor-not-allowed disabled:opacity-50 transition-all resize-none"}),g.jsx(Sy,{value:e.creator_ids,platform:e.platform,type:"creator",disabled:y}),e.platform==="xhs"&&g.jsx("div",{className:"mt-2 rounded-lg border border-cyber-neon-orange/30 bg-cyber-neon-orange/5 p-2 text-[10px] leading-snug text-cyber-neon-orange font-mono",children:t("warning.xhsToken")})]})]}),g.jsxs(Ld,{title:t("section.authMatrix.title"),description:t("section.authMatrix.description"),icon:_S,children:[g.jsx(dr,{label:t("field.loginMethod"),children:g.jsxs(ks,{value:e.login_type,onValueChange:b=>r({login_type:b}),disabled:y,children:[g.jsx(ko,{className:"h-9 text-xs",children:g.jsx(Ns,{placeholder:t("field.loginMethodPlaceholder")})}),g.jsx(No,{children:l==null?void 0:l.login_types.map(b=>g.jsx(Ro,{value:b.value,children:b.label},b.value))})]})}),e.login_type==="cookie"?g.jsx(dr,{label:t("field.cookies"),hint:t("field.cookiesHint"),children:g.jsx("textarea",{value:e.cookies,onChange:b=>r({cookies:b.target.value}),disabled:y,placeholder:t("field.cookiesPlaceholder"),className:"min-h-[80px] w-full rounded-md border border-cyber-border-DEFAULT bg-cyber-bg-tertiary px-3 py-2 text-xs font-mono text-cyber-text-primary placeholder:text-cyber-text-muted focus-visible:outline-none focus-visible:border-cyber-neon-cyan/50 focus-visible:shadow-cyber-soft disabled:cursor-not-allowed disabled:opacity-50 transition-all resize-none"})}):null,e.login_type==="cookie"&&(e.platform==="xhs"||e.platform==="dy")?g.jsx("div",{className:"rounded-lg border border-cyber-neon-orange/30 bg-cyber-neon-orange/5 p-3 text-[11px] leading-snug text-cyber-neon-orange font-mono",children:t("warning.cookieSlider")}):null]}),g.jsxs(Ld,{title:t("section.outputConfig.title"),description:t("section.outputConfig.description"),icon:tv,children:[g.jsx(dr,{label:t("field.saveFormat"),children:g.jsxs(ks,{value:e.save_option,onValueChange:b=>r({save_option:b}),disabled:y,children:[g.jsx(ko,{className:"h-9 text-xs",children:g.jsx(Ns,{placeholder:t("field.saveFormatPlaceholder")})}),g.jsx(No,{children:l==null?void 0:l.save_options.map(b=>g.jsx(Ro,{value:b.value,children:b.label},b.value))})]})}),g.jsxs("div",{className:"space-y-2",children:[g.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-cyber-border-subtle bg-cyber-bg-tertiary/30 p-2.5 hover:border-cyber-border-DEFAULT transition-colors",children:[g.jsx(Hl,{checked:e.enable_comments,onCheckedChange:b=>{const k=b===!0;r({enable_comments:k,enable_sub_comments:k?e.enable_sub_comments:!1})},disabled:y}),g.jsxs("div",{className:"flex items-center gap-2",children:[g.jsx(LS,{className:"h-3.5 w-3.5 text-cyber-text-secondary"}),g.jsx("p",{className:"text-xs font-mono text-cyber-text-primary",children:t("field.commentExtraction")})]})]}),g.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-cyber-border-subtle bg-cyber-bg-tertiary/30 p-2.5 hover:border-cyber-border-DEFAULT transition-colors",children:[g.jsx(Hl,{checked:e.enable_sub_comments,onCheckedChange:b=>r({enable_sub_comments:b===!0}),disabled:y||!e.enable_comments}),g.jsx("p",{className:"text-xs font-mono text-cyber-text-primary",children:t("field.subComments")})]}),g.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-cyber-border-subtle bg-cyber-bg-tertiary/30 p-2.5 hover:border-cyber-border-DEFAULT transition-colors",children:[g.jsx(Hl,{checked:e.headless,onCheckedChange:b=>r({headless:b===!0}),disabled:y}),g.jsxs("div",{className:"min-w-0 flex-1",children:[g.jsx("p",{className:"text-xs font-mono text-cyber-text-primary",children:t("field.headlessMode")}),g.jsx("p",{className:"text-[10px] text-cyber-text-muted leading-snug",children:t("field.headlessModeHint")})]})]})]})]})]}),g.jsx("div",{className:"w-full",children:v?g.jsxs(Ct,{onClick:E,disabled:C,className:"w-full h-12 bg-cyber-neon-pink text-white font-mono font-bold text-sm tracking-wider hover:bg-cyber-neon-pink/90 hover:shadow-glow-pink-sm transition-all",children:[g.jsx(US,{className:"w-4 h-4"}),t(p?"button.stopping":"button.terminate")]}):g.jsxs(Ct,{onClick:w,disabled:C,className:"w-full h-12 bg-cyber-neon-cyan text-cyber-bg-primary font-mono font-bold text-sm tracking-wider hover:bg-cyber-neon-cyan/90 hover:shadow-glow-cyan-sm transition-all",children:[g.jsx(MS,{className:"w-4 h-4"}),t(d?"button.initiating":"button.initiateScan")]})})]})}const rw="mediacrawler_env_checked";function tO(){return localStorage.getItem(rw)==="true"}function nO({onCheckComplete:t}){const{t:e}=Zt("env"),[r,s]=x.useState("checking"),[i,l]=x.useState(null),[u,d]=x.useState(!1),h=async()=>{s("checking"),l(null);try{const v=await Wk.check();l(v.data),v.data.success?(s("success"),localStorage.setItem(rw,"true"),setTimeout(()=>t(!0),1500)):s("error")}catch{l({success:!1,message:e("defaultError"),error:e("defaultErrorHint")}),s("error")}};x.useEffect(()=>{h()},[]);const p=()=>{t(!1)},y=()=>{h()};return g.jsx("div",{className:"fixed inset-0 bg-black/80 backdrop-blur-sm flex items-center justify-center z-50",children:g.jsxs("div",{className:"bg-cyber-bg-panel border border-cyber-border-DEFAULT rounded-lg shadow-cyber-card p-6 max-w-md w-full mx-4 relative",children:[g.jsx("div",{className:"absolute top-0 left-0 w-4 h-4 border-t-2 border-l-2 border-cyber-neon-cyan"}),g.jsx("div",{className:"absolute top-0 right-0 w-4 h-4 border-t-2 border-r-2 border-cyber-neon-cyan"}),g.jsx("div",{className:"absolute bottom-0 left-0 w-4 h-4 border-b-2 border-l-2 border-cyber-neon-cyan"}),g.jsx("div",{className:"absolute bottom-0 right-0 w-4 h-4 border-b-2 border-r-2 border-cyber-neon-cyan"}),g.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[g.jsx(Of,{className:"w-6 h-6 text-cyber-neon-orange"}),g.jsx("h2",{className:"text-lg font-mono font-semibold text-cyber-neon-cyan glow-text-cyan",children:e("title")})]}),g.jsxs("div",{className:"bg-cyber-bg-tertiary border border-cyber-border-DEFAULT rounded-lg p-4 mb-4",children:[g.jsxs("div",{className:"flex items-center gap-3",children:[r==="checking"&&g.jsxs(g.Fragment,{children:[g.jsx(AS,{className:"w-5 h-5 text-cyber-neon-cyan animate-spin"}),g.jsx("span",{className:"text-cyber-text-primary font-mono text-sm",children:e("scanning")})]}),r==="success"&&g.jsxs(g.Fragment,{children:[g.jsx(CS,{className:"w-5 h-5 text-cyber-neon-green"}),g.jsx("span",{className:"text-cyber-neon-green font-mono text-sm",children:e("success",{message:i==null?void 0:i.message})})]}),r==="error"&&g.jsxs(g.Fragment,{children:[g.jsx(ES,{className:"w-5 h-5 text-cyber-neon-pink"}),g.jsx("span",{className:"text-cyber-neon-pink font-mono text-sm",children:e("error",{message:i==null?void 0:i.message})})]})]}),r==="error"&&(i==null?void 0:i.error)&&g.jsxs("div",{className:"mt-3",children:[g.jsx("button",{onClick:()=>d(!u),className:"text-sm text-cyber-neon-cyan hover:underline font-mono",children:e(u?"hideDetails":"showDetails")}),u&&g.jsx("pre",{className:"mt-2 p-3 bg-black text-cyber-neon-green rounded text-xs font-mono overflow-x-auto whitespace-pre-wrap border border-cyber-border-DEFAULT",children:i.error})]})]}),r==="error"&&g.jsxs("div",{className:"text-sm text-cyber-text-secondary mb-4 space-y-2 font-mono",children:[g.jsx("p",{className:"text-cyber-neon-orange",children:e("requirements")}),g.jsxs("ol",{className:"list-decimal list-inside space-y-1 pl-2 text-cyber-text-muted",children:[g.jsx("li",{children:e("requirementsList.1")}),g.jsx("li",{children:e("requirementsList.2")}),g.jsx("li",{children:e("requirementsList.3")})]})]}),g.jsxs("div",{className:"flex gap-3",children:[r==="error"&&g.jsxs(g.Fragment,{children:[g.jsx(Ct,{variant:"outline",className:"flex-1 font-mono",onClick:p,children:e("skipCheck")}),g.jsxs(Ct,{variant:"glow",className:"flex-1 font-mono",onClick:y,children:[g.jsx(Tf,{className:"w-4 h-4"}),e("retryCheck")]})]}),r==="checking"&&g.jsx(Ct,{variant:"outline",className:"w-full font-mono",onClick:p,children:e("skipCheck")})]})]})})}const ow="mediacrawler_license_accepted";function rO(){return localStorage.getItem(ow)==="true"}function oO({onAccept:t}){const{t:e}=Zt("license"),r=()=>{localStorage.setItem(ow,"true"),t()},s=()=>{try{window.close(),setTimeout(()=>{window.location.href="about:blank"},100)}catch{}setTimeout(()=>{document.body.innerHTML=`
访问已拒绝
您未同意使用条款,请关闭此标签页
`},200)};return g.jsx("div",{className:"fixed inset-0 bg-black/95 backdrop-blur-sm flex items-center justify-center z-[100] overflow-y-auto py-8",children:g.jsxs("div",{className:"bg-cyber-bg-panel border-2 border-cyber-neon-pink rounded-lg shadow-cyber-card p-6 max-w-2xl w-full mx-4 relative",children:[g.jsx("div",{className:"absolute top-0 left-0 w-6 h-6 border-t-2 border-l-2 border-cyber-neon-pink"}),g.jsx("div",{className:"absolute top-0 right-0 w-6 h-6 border-t-2 border-r-2 border-cyber-neon-pink"}),g.jsx("div",{className:"absolute bottom-0 left-0 w-6 h-6 border-b-2 border-l-2 border-cyber-neon-pink"}),g.jsx("div",{className:"absolute bottom-0 right-0 w-6 h-6 border-b-2 border-r-2 border-cyber-neon-pink"}),g.jsxs("div",{className:"flex items-center justify-center gap-3 mb-4",children:[g.jsx(zS,{className:"w-8 h-8 text-cyber-neon-pink animate-pulse"}),g.jsx("h2",{className:"text-xl font-mono font-bold text-cyber-neon-pink",children:e("title")})]}),g.jsx("div",{className:"text-center mb-4",children:g.jsx("span",{className:"text-base font-mono text-cyber-neon-orange",children:e("warning")})}),g.jsx("div",{className:"bg-black/50 border border-cyber-neon-pink/30 rounded-lg p-4 mb-4",children:g.jsxs("ul",{className:"space-y-2 text-sm font-mono",children:[g.jsxs("li",{className:"flex items-start gap-2",children:[g.jsx("span",{className:"text-cyber-neon-pink font-bold",children:"1."}),g.jsx("span",{className:"text-cyber-text-primary",children:e("content.line1")})]}),g.jsxs("li",{className:"flex items-start gap-2",children:[g.jsx("span",{className:"text-cyber-neon-pink font-bold",children:"2."}),g.jsx("span",{className:"text-cyber-text-primary",children:e("content.line2")})]}),g.jsxs("li",{className:"flex items-start gap-2",children:[g.jsx("span",{className:"text-cyber-neon-pink font-bold",children:"3."}),g.jsx("span",{className:"text-cyber-text-primary",children:e("content.line3")})]}),g.jsxs("li",{className:"flex items-start gap-2",children:[g.jsx("span",{className:"text-cyber-neon-pink font-bold",children:"4."}),g.jsx("span",{className:"text-cyber-text-primary",children:e("content.line4")})]})]})}),g.jsx("div",{className:"flex justify-center mb-6",children:g.jsxs("a",{href:"https://github.com/NanmiCoder/MediaCrawler/blob/main/LICENSE",target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1.5 text-cyber-neon-cyan hover:underline text-sm font-mono",children:[g.jsx(kS,{className:"w-4 h-4"}),e("license")]})}),g.jsxs("div",{className:"flex gap-4",children:[g.jsx(Ct,{onClick:s,variant:"outline",className:"flex-1 font-mono border-cyber-neon-pink/50 text-cyber-neon-pink hover:bg-cyber-neon-pink/10",children:e("decline")}),g.jsx(Ct,{onClick:r,className:"flex-1 font-mono bg-cyber-neon-green text-black font-bold hover:bg-cyber-neon-green/90",children:e("confirm")})]})]})})}function sO(){const[t,e]=x.useState(()=>rO()),[r,s]=x.useState(()=>tO()),[i,l]=x.useState(!1),u=()=>{s(!0)},d=()=>{e(!0),l(!1)},h=()=>{l(!0)};return g.jsxs("div",{className:"flex flex-col h-screen cyber-grid overflow-hidden relative",children:[(!t||i)&&g.jsx(oO,{onAccept:d}),t&&!i&&!r&&g.jsx(nO,{onCheckComplete:u}),g.jsx(_P,{onShowDisclaimer:h}),g.jsxs("div",{className:"flex-1 flex flex-col gap-4 p-4 overflow-hidden min-h-0",children:[g.jsx("div",{className:"flex-shrink-0",children:g.jsx(eO,{})}),g.jsx(HT,{})]}),g.jsx(VT,{}),g.jsx(vS,{position:"top-right",toastOptions:{className:"glass-panel font-mono text-cyber-text-primary",style:{fontFamily:"JetBrains Mono, monospace"}}})]})}const{slice:iO,forEach:aO}=[];function lO(t){return aO.call(iO.call(arguments,1),e=>{if(e)for(const r in e)t[r]===void 0&&(t[r]=e[r])}),t}function cO(t){return typeof t!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(r=>r.test(t))}const Cy=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,uO=function(t,e){const s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},i=encodeURIComponent(e);let l=`${t}=${i}`;if(s.maxAge>0){const u=s.maxAge-0;if(Number.isNaN(u))throw new Error("maxAge should be a Number");l+=`; Max-Age=${Math.floor(u)}`}if(s.domain){if(!Cy.test(s.domain))throw new TypeError("option domain is invalid");l+=`; Domain=${s.domain}`}if(s.path){if(!Cy.test(s.path))throw new TypeError("option path is invalid");l+=`; Path=${s.path}`}if(s.expires){if(typeof s.expires.toUTCString!="function")throw new TypeError("option expires is invalid");l+=`; Expires=${s.expires.toUTCString()}`}if(s.httpOnly&&(l+="; HttpOnly"),s.secure&&(l+="; Secure"),s.sameSite)switch(typeof s.sameSite=="string"?s.sameSite.toLowerCase():s.sameSite){case!0:l+="; SameSite=Strict";break;case"lax":l+="; SameSite=Lax";break;case"strict":l+="; SameSite=Strict";break;case"none":l+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return s.partitioned&&(l+="; Partitioned"),l},Ey={create(t,e,r,s){let i=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};r&&(i.expires=new Date,i.expires.setTime(i.expires.getTime()+r*60*1e3)),s&&(i.domain=s),document.cookie=uO(t,e,i)},read(t){const e=`${t}=`,r=document.cookie.split(";");for(let s=0;s-1&&(i=window.location.hash.substring(window.location.hash.indexOf("?")));const u=i.substring(1).split("&");for(let d=0;d0&&u[d].substring(0,h)===e&&(r=u[d].substring(h+1))}}return r}},hO={name:"hash",lookup(t){var i;let{lookupHash:e,lookupFromHashIndex:r}=t,s;if(typeof window<"u"){const{hash:l}=window.location;if(l&&l.length>2){const u=l.substring(1);if(e){const d=u.split("&");for(let h=0;h0&&d[h].substring(0,p)===e&&(s=d[h].substring(p+1))}}if(s)return s;if(!s&&r>-1){const d=l.match(/\/([a-zA-Z-]*)/g);return Array.isArray(d)?(i=d[typeof r=="number"?r:0])==null?void 0:i.replace("/",""):void 0}}}return s}};let Cs=null;const ky=()=>{if(Cs!==null)return Cs;try{if(Cs=typeof window<"u"&&window.localStorage!==null,!Cs)return!1;const t="i18next.translate.boo";window.localStorage.setItem(t,"foo"),window.localStorage.removeItem(t)}catch{Cs=!1}return Cs};var pO={name:"localStorage",lookup(t){let{lookupLocalStorage:e}=t;if(e&&ky())return window.localStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupLocalStorage:r}=e;r&&ky()&&window.localStorage.setItem(r,t)}};let Es=null;const Ny=()=>{if(Es!==null)return Es;try{if(Es=typeof window<"u"&&window.sessionStorage!==null,!Es)return!1;const t="i18next.translate.boo";window.sessionStorage.setItem(t,"foo"),window.sessionStorage.removeItem(t)}catch{Es=!1}return Es};var mO={name:"sessionStorage",lookup(t){let{lookupSessionStorage:e}=t;if(e&&Ny())return window.sessionStorage.getItem(e)||void 0},cacheUserLanguage(t,e){let{lookupSessionStorage:r}=e;r&&Ny()&&window.sessionStorage.setItem(r,t)}},gO={name:"navigator",lookup(t){const e=[];if(typeof navigator<"u"){const{languages:r,userLanguage:s,language:i}=navigator;if(r)for(let l=0;l0?e:void 0}},yO={name:"htmlTag",lookup(t){let{htmlTag:e}=t,r;const s=e||(typeof document<"u"?document.documentElement:null);return s&&typeof s.getAttribute=="function"&&(r=s.getAttribute("lang")),r}},vO={name:"path",lookup(t){var i;let{lookupFromPathIndex:e}=t;if(typeof window>"u")return;const r=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(r)?(i=r[typeof e=="number"?e:0])==null?void 0:i.replace("/",""):void 0}},xO={name:"subdomain",lookup(t){var i,l;let{lookupFromSubdomainIndex:e}=t;const r=typeof e=="number"?e+1:1,s=typeof window<"u"&&((l=(i=window.location)==null?void 0:i.hostname)==null?void 0:l.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i));if(s)return s[r]}};let sw=!1;try{document.cookie,sw=!0}catch{}const iw=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];sw||iw.splice(1,1);const wO=()=>({order:iw,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:t=>t});class aw{constructor(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(e,r)}init(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=e,this.options=lO(r,this.options||{},wO()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=i=>i.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=s,this.addDetector(dO),this.addDetector(fO),this.addDetector(pO),this.addDetector(mO),this.addDetector(gO),this.addDetector(yO),this.addDetector(vO),this.addDetector(xO),this.addDetector(hO)}addDetector(e){return this.detectors[e.name]=e,this}detect(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,r=[];return e.forEach(s=>{if(this.detectors[s]){let i=this.detectors[s].lookup(this.options);i&&typeof i=="string"&&(i=[i]),i&&(r=r.concat(i))}}),r=r.filter(s=>s!=null&&!cO(s)).map(s=>this.options.convertDetectedLanguage(s)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?r:r.length>0?r[0]:null}cacheUserLanguage(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;r&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(e)>-1||r.forEach(s=>{this.detectors[s]&&this.detectors[s].cacheUserLanguage(e,this.options)}))}}aw.type="languageDetector";const bO={active:"运行中",standby:"待机",idle:"空闲",running:"运行中",stopping:"停止中",error:"错误"},SO={title:"MediaCrawler",api:"API",local:"本地",disclaimer:"仅供个人学习研究使用,禁止商业用途",license:"查看协议"},CO={loading:"加载中...",skip:"跳过检测",retry:"重新扫描"},EO={entries:"条记录",records:"条"},kO={status:bO,sidebar:SO,action:CO,unit:EO},NO={targetMatrix:{title:"目标配置",description:"平台、模式与搜索参数"},authMatrix:{title:"登录配置",description:"登录方式配置"},outputConfig:{title:"输出配置",description:"保存格式与评论选项"},runtime:{title:"运行参数",description:"运行时参数"}},RO={platform:"平台",platformPlaceholder:"选择平台",crawlType:"爬取类型",crawlTypePlaceholder:"选择类型",startPage:"起始页",keywords:"关键词",keywordsHint:"输入关键词后按回车添加",keywordsPlaceholder:"输入关键词,按回车添加...",specifiedIds:"帖子/视频 ID",specifiedIdsHint:"输入帖子或视频的ID/URL,每行一个或用逗号分隔",specifiedIdsPlaceholder:{bili:`示例: BV1xxxx https://www.bilibili.com/video/BV1xxxx`,xhs:`示例: https://www.xiaohongshu.com/explore/xxx?xsec_token=xxx (必须包含xsec_token参数)`,dy:`示例: 7525538910311632128 https://www.douyin.com/video/xxx https://v.douyin.com/xxx (短链接)`,wb:`示例: 4982041758140155 https://weibo.com/xxx/xxx`,ks:`示例: 3xf8enb8dbj6uig https://www.kuaishou.com/short-video/xxx`,default:"输入帖子/视频 ID 或 URL..."},creatorIds:"创作者 ID",creatorIdsHint:"输入创作者的ID/URL,每行一个或用逗号分隔",creatorIdsPlaceholder:{bili:`示例: 434377496 https://space.bilibili.com/434377496`,xhs:`示例: https://www.xiaohongshu.com/user/profile/xxx?xsec_token=xxx (必须包含xsec_token参数)`,dy:`示例: MS4wLjABAAAAxxx https://www.douyin.com/user/MS4wLjABAAAAxxx`,wb:`示例: 5533390220 https://weibo.com/u/5533390220`,ks:`示例: 3x84qugg4ch9zhs https://www.kuaishou.com/profile/xxx`,default:"输入创作者 ID 或 URL..."},loginMethod:"登录方式",loginMethodPlaceholder:"选择登录方式",cookies:"Cookies",cookiesHint:"粘贴 Cookie 字符串",cookiesPlaceholder:"在此粘贴 Cookies...",saveFormat:"保存格式",saveFormatPlaceholder:"选择格式",commentExtraction:"评论抓取",subComments:"子评论",headlessMode:"无头模式",headlessModeHint:"无 GUI 运行浏览器"},PO={initiateScan:"开始爬虫",initiating:"启动中...",terminate:"终止",stopping:"停止中..."},TO={cookieSlider:"[提示] 小红书和抖音平台不建议使用 Cookie 登录,因为可能会触发滑块验证",xhsToken:"[重要] 小红书 URL 必须包含 xsec_token 参数,请从浏览器复制完整 URL"},OO={section:NO,field:RO,button:PO,warning:TO},jO={title:"系统控制台",entries:"{{count}} 条记录",active:"活跃",clear:"清除",restore:"恢复所有日志"},_O={systemInit:"[系统] 系统初始化成功",configHint:"[信息] 配置参数并启动扫描序列..."},AO={awaiting:"等待命令..."},LO={header:jO,banner:_O,footer:AO},IO={button:"数据管理",title:"数据浏览器"},DO={title:"数据文件管理",records:"{{count}} 条",rescan:"重新扫描",loading:"[加载中] 正在扫描数据目录...",noData:"暂无数据",noDataHint:"启动爬虫开始数据采集,完成后结果将显示在此处。",allCategories:"全部"},MO={entries:"{{count}} 条",extract:"下载",preview:"预览"},FO={title:"数据预览",records:"{{count}} 条记录",download:"下载",loading:"[加载中] 正在解析数据...",error:"[错误] 数据解析失败",searchPlaceholder:"搜索数据...",showing:"显示 {{filtered}} / {{total}} 条记录"},zO={dialog:IO,explorer:DO,file:MO,preview:FO},$O="环境检测",UO="[扫描] 正在分析 MediaCrawler 环境...",BO="[成功] {{message}}",HO="[错误] {{message}}",VO="无法连接到 API 服务器",WO="请确保后端服务已启动 (uvicorn api.main:app --port 8080)",KO="[+] 显示详情",qO="[-] 隐藏详情",QO="[环境要求]",YO={1:"安装 uv 包管理器",2:"在项目根目录执行 uv sync",3:"确认所有依赖已安装"},GO="跳过检测",XO="重新检测",JO={title:$O,scanning:UO,success:BO,error:HO,defaultError:VO,defaultErrorHint:WO,showDetails:KO,hideDetails:qO,requirements:QO,requirementsList:YO,skipCheck:GO,retryCheck:XO},ZO="使用须知",ej="请仔细阅读以下条款",tj={line1:"本项目仅供个人学习和研究爬虫技术使用",line2:"严禁将本项目用于任何商业用途或盈利活动",line3:"使用本项目即表示您同意遵守相关法律法规",line4:"任何因违规使用造成的后果由使用者自行承担"},nj="查看完整协议",rj="访问 GitHub 仓库",oj="我已知晓并同意上述条款",sj="不同意,退出",ij={name:"程序员阿江-Relakkes",tagline:"40K+ Star 开源项目作者",description:"40K开源项目MediaCrawler作者,专注爬虫技术和AI Agent知识分享",support:"如果觉得项目有帮助,欢迎关注作者的社交媒体账号",slogan:"开源不易,求个关注 ⭐"},aj={title:ZO,warning:ej,content:tj,license:nj,github:rj,confirm:oj,decline:sj,author:ij},lj={active:"ACTIVE",standby:"STANDBY",idle:"IDLE",running:"RUNNING",stopping:"STOPPING",error:"ERROR"},cj={title:"MediaCrawler",api:"API",local:"LOCAL",disclaimer:"For personal learning only, commercial use prohibited",license:"License"},uj={loading:"Loading...",skip:"SKIP_CHECK",retry:"RETRY_SCAN"},dj={entries:"entries",records:"records"},fj={status:lj,sidebar:cj,action:uj,unit:dj},hj={targetMatrix:{title:"TARGET_MATRIX",description:"Platform, mode & search parameters"},authMatrix:{title:"AUTH_MATRIX",description:"Login method configuration"},outputConfig:{title:"OUTPUT_CONFIG",description:"Save format & comment options"},runtime:{title:"RUNTIME",description:"Runtime parameters"}},pj={platform:"PLATFORM",platformPlaceholder:"Select platform",crawlType:"CRAWL_TYPE",crawlTypePlaceholder:"Select type",startPage:"START_PAGE",keywords:"KEYWORDS",keywordsHint:"Press Enter to add keyword",keywordsPlaceholder:"Type keyword, press Enter to add...",specifiedIds:"POST/VIDEO_ID",specifiedIdsHint:"Enter post or video ID/URL, one per line or comma-separated",specifiedIdsPlaceholder:{bili:`Examples: BV1xxxx https://www.bilibili.com/video/BV1xxxx`,xhs:`Examples: https://www.xiaohongshu.com/explore/xxx?xsec_token=xxx (must include xsec_token)`,dy:`Examples: 7525538910311632128 https://www.douyin.com/video/xxx https://v.douyin.com/xxx (short link)`,wb:`Examples: 4982041758140155 https://weibo.com/xxx/xxx`,ks:`Examples: 3xf8enb8dbj6uig https://www.kuaishou.com/short-video/xxx`,default:"Enter post/video ID or URL..."},creatorIds:"CREATOR_ID",creatorIdsHint:"Enter creator ID/URL, one per line or comma-separated",creatorIdsPlaceholder:{bili:`Examples: 434377496 https://space.bilibili.com/434377496`,xhs:`Examples: https://www.xiaohongshu.com/user/profile/xxx?xsec_token=xxx (must include xsec_token)`,dy:`Examples: MS4wLjABAAAAxxx https://www.douyin.com/user/MS4wLjABAAAAxxx`,wb:`Examples: 5533390220 https://weibo.com/u/5533390220`,ks:`Examples: 3x84qugg4ch9zhs https://www.kuaishou.com/profile/xxx`,default:"Enter creator ID or URL..."},loginMethod:"LOGIN_METHOD",loginMethodPlaceholder:"Select login method",cookies:"COOKIES",cookiesHint:"Paste cookie string",cookiesPlaceholder:"Paste cookies here...",saveFormat:"SAVE_FORMAT",saveFormatPlaceholder:"Select format",commentExtraction:"Comment Extraction",subComments:"Sub-comments",headlessMode:"HEADLESS_MODE",headlessModeHint:"Run browser without GUI"},mj={initiateScan:"INITIATE SCAN",initiating:"INITIATING...",terminate:"TERMINATE",stopping:"STOPPING..."},gj={cookieSlider:"[Note] Cookie login is not recommended for Xiaohongshu and Douyin due to slider captcha",xhsToken:"[Important] Xiaohongshu URLs must contain xsec_token parameter, please copy the full URL from browser"},yj={section:hj,field:pj,button:mj,warning:gj},vj={title:"SYSTEM_CONSOLE",entries:"{{count}} entries",active:"ACTIVE",clear:"CLEAR",restore:"RESTORE ALL LOGS"},xj={systemInit:"[SYS] System initialized successfully",configHint:"[INFO] Configure parameters and initiate scan sequence..."},wj={awaiting:"awaiting_command..."},bj={header:vj,banner:xj,footer:wj},Sj={button:"PAYLOAD_MATRIX",title:"DATA_EXPLORER"},Cj={title:"CAPTURED_PAYLOAD_MATRIX",records:"{{count}} RECORDS",rescan:"RESCAN",loading:"[LOADING] Scanning payload directory...",noData:"NO_DATA_CAPTURED",noDataHint:"Initialize crawler to begin data extraction sequence. Results will appear here upon completion.",allCategories:"ALL"},Ej={entries:"{{count}} entries",extract:"EXTRACT",preview:"PREVIEW"},kj={title:"Data Preview",records:"{{count}} RECORDS",download:"DOWNLOAD",loading:"[LOADING] Decoding payload...",error:"[ERROR] Failed to decode payload",searchPlaceholder:"Search in data...",showing:"Showing {{filtered}} of {{total}} records"},Nj={dialog:Sj,explorer:Cj,file:Ej,preview:kj},Rj="ENV_DIAGNOSTICS",Pj="[SCAN] Analyzing MediaCrawler environment...",Tj="[OK] {{message}}",Oj="[ERR] {{message}}",jj="Cannot connect to API server",_j="Please ensure backend service is running (uvicorn api.main:app --port 8080)",Aj="[+] SHOW_DETAILS",Lj="[-] HIDE_DETAILS",Ij="[REQUIREMENTS]",Dj={1:"Install uv package manager",2:"Execute uv sync in project root",3:"Verify all dependencies installed"},Mj="SKIP_CHECK",Fj="RETRY_SCAN",zj={title:Rj,scanning:Pj,success:Tj,error:Oj,defaultError:jj,defaultErrorHint:_j,showDetails:Aj,hideDetails:Lj,requirements:Ij,requirementsList:Dj,skipCheck:Mj,retryCheck:Fj},$j="Usage Notice",Uj="Please read the following terms carefully",Bj={line1:"This project is for personal learning and research purposes only",line2:"Commercial use or profit-making activities are strictly prohibited",line3:"By using this project, you agree to comply with all applicable laws",line4:"Users bear full responsibility for any consequences of misuse"},Hj="View Full License",Vj="Visit GitHub Repository",Wj="I understand and agree to the above terms",Kj="Disagree, Exit",qj={name:"Relakkes (阿江)",tagline:"40K+ Star Open Source Author",description:"Author of MediaCrawler (40K stars), focused on crawler tech and AI Agent knowledge sharing",support:"If you find this project helpful, please follow the author on social media",slogan:"Open source is hard, please star ⭐"},Qj={title:$j,warning:Uj,content:Bj,license:Hj,github:Vj,confirm:Wj,decline:Kj,author:qj},Yj={"zh-CN":{common:kO,config:OO,terminal:LO,data:zO,env:JO,license:aj},"en-US":{common:fj,config:yj,terminal:bj,data:Nj,env:zj,license:Qj}};_t.use(aw).use(bC).init({resources:Yj,fallbackLng:"zh-CN",defaultNS:"common",interpolation:{escapeValue:!1},detection:{order:["localStorage","navigator"],caches:["localStorage"],lookupLocalStorage:"mediacrawler_language"}});const Gj=new A1({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}});u1.createRoot(document.getElementById("root")).render(g.jsx(oe.StrictMode,{children:g.jsx(L1,{client:Gj,children:g.jsx(sO,{})})}));